@jxsuite/studio 10.3.0 → 10.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/chunks/2020-7sx2vexa.js +4 -0
  2. package/dist/chunks/adapter-12dxr3z7.js +4 -0
  3. package/dist/chunks/{add-new-flow-3tkn72ey.js → add-new-flow-any4pw2q.js} +3 -3
  4. package/dist/chunks/{cf-account-picker-xb8vvt2h.js → cf-account-picker-ajh60k54.js} +3 -3
  5. package/dist/chunks/cf-settings-hbj16kh3.js +4 -0
  6. package/dist/chunks/{color-area-h8dbasp1.js → color-area-gbcftzh3.js} +2 -2
  7. package/dist/chunks/{color-field-qv5r2b16.js → color-field-85136598.js} +3 -3
  8. package/dist/chunks/{color-slider-nz2mrzky.js → color-slider-w1s3ndd8.js} +2 -2
  9. package/dist/chunks/color-thzpppyc.js +4 -0
  10. package/dist/chunks/{combobox-6hs00996.js → combobox-dk98wc5x.js} +3 -3
  11. package/dist/chunks/components-a98hzqw9.js +4 -0
  12. package/dist/chunks/content-source-jq3fjs3w.js +4 -0
  13. package/dist/chunks/{convert-to-repeater-gwzh9gar.js → convert-to-repeater-g66r6qp1.js} +3 -3
  14. package/dist/chunks/editor-rth1rzj8.js +4 -0
  15. package/dist/chunks/entry-commands-02j0s19w.js +4 -0
  16. package/dist/chunks/{extension-sections-338ee35t.js → extension-sections-rqrs7dr0.js} +3 -3
  17. package/dist/chunks/file-ops-6a49er4c.js +4 -0
  18. package/dist/chunks/files-b2p9y0yz.js +4 -0
  19. package/dist/chunks/format-host-7xe57k1s.js +4 -0
  20. package/dist/chunks/fs-events-0xsy168g.js +4 -0
  21. package/dist/chunks/grid-open-h3q4fjy5.js +4 -0
  22. package/dist/chunks/{grid-view-w9nfy203.js → grid-view-0v4hjspb.js} +17 -17
  23. package/dist/chunks/{icons-gb967qc8.js → icons-j9eksgew.js} +2 -2
  24. package/dist/chunks/{iframe-entry-btck0e9s.js → iframe-entry-4zqtn3ry.js} +4 -4
  25. package/dist/chunks/{iframe-entry-b5qgggyp.js → iframe-entry-54kwwhmg.js} +4 -4
  26. package/dist/chunks/{iframe-entry-42hpmwz5.js → iframe-entry-m24fza30.js} +4 -4
  27. package/dist/chunks/iframe-host-8jcmaktg.js +4 -0
  28. package/dist/chunks/{image-bake-4afr4y6a.js → image-bake-m8gzaan9.js} +3 -3
  29. package/dist/chunks/{image-editor-x7t8jbjn.js → image-editor-0afyws7c.js} +3 -3
  30. package/dist/chunks/{index-yjrfeks8.js → index-2q88g57p.js} +3 -3
  31. package/dist/chunks/index-7nj2375a.js +4 -0
  32. package/dist/chunks/{javascript-hy2mws8v.js → javascript-5sxtr1g7.js} +3 -3
  33. package/dist/chunks/jsonMode-m6sf47hq.js +13 -0
  34. package/dist/chunks/jx-validate-808zgbgy.js +4 -0
  35. package/dist/chunks/layers-0ffdtqjn.js +4 -0
  36. package/dist/chunks/layers-panel-rw62wtvf.js +4 -0
  37. package/dist/chunks/{listbox-7gka1h86.js → listbox-k5p41049.js} +2 -2
  38. package/dist/chunks/lit-html-9bz9rcfv.js +4 -0
  39. package/dist/chunks/media-library-2a5hdbek.js +4 -0
  40. package/dist/chunks/media-open-069kzhj4.js +4 -0
  41. package/dist/chunks/media-picker-4p4pd28y.js +4 -0
  42. package/dist/chunks/menu-26nez152.js +4 -0
  43. package/dist/chunks/{monaco-binding-a51py33c.js → monaco-binding-1s2b8snq.js} +3 -3
  44. package/dist/chunks/monaco-buffer-m9fd2dka.js +4 -0
  45. package/dist/chunks/monaco-setup-e0crh3v6.js +4 -0
  46. package/dist/chunks/notify-re3js157.js +4 -0
  47. package/dist/chunks/platform-rywy3tkg.js +4 -0
  48. package/dist/chunks/popover-fhdnt4be.js +4 -0
  49. package/dist/chunks/publish-panel-czkpg8m4.js +4 -0
  50. package/dist/chunks/{publish-quick-w3nxd7q4.js → publish-quick-b9wbhqj6.js} +3 -3
  51. package/dist/chunks/publish-workspace-yy6d23b7.js +4 -0
  52. package/dist/chunks/quick-search-tp7pjnmv.js +4 -0
  53. package/dist/chunks/references-wd2yj8s1.js +4 -0
  54. package/dist/chunks/right-panel-x971k0zc.js +4 -0
  55. package/dist/chunks/source-control-k4p00hpe.js +4 -0
  56. package/dist/chunks/{split-m5rwn31z.js → split-qh21j2b0.js} +2 -2
  57. package/dist/chunks/{studio-v5wktj6f.js → studio-151kgn69.js} +4 -4
  58. package/dist/chunks/studio-15mfah02.js +10 -0
  59. package/dist/chunks/studio-1a7zshnv.js +5 -0
  60. package/dist/chunks/studio-1d8m5s38.js +16 -0
  61. package/dist/chunks/studio-35pmfjtx.js +5 -0
  62. package/dist/chunks/{studio-3na1r48j.js → studio-3yr1zdp9.js} +8 -8
  63. package/dist/chunks/studio-43pynnhz.js +5 -0
  64. package/dist/chunks/studio-44xqe0b7.js +4 -0
  65. package/dist/chunks/{studio-hh394phe.js → studio-48yzqzqr.js} +4 -4
  66. package/dist/chunks/{studio-nskxe9q1.js → studio-4jy967rj.js} +5 -5
  67. package/dist/chunks/{studio-waekn290.js → studio-4ncxzw5m.js} +4 -4
  68. package/dist/chunks/{studio-pm17wdc4.js → studio-4s5bka8t.js} +4 -4
  69. package/dist/chunks/{studio-5tet77de.js → studio-4z0cdh16.js} +3 -3
  70. package/dist/chunks/studio-5rq3e4q5.js +5 -0
  71. package/dist/chunks/{studio-2ggfzrrd.js → studio-69g6a0jn.js} +4 -4
  72. package/dist/chunks/studio-6hcfm9q3.js +5 -0
  73. package/dist/chunks/studio-6mf31e16.js +5 -0
  74. package/dist/chunks/studio-6sxnqqw8.js +5 -0
  75. package/dist/chunks/{studio-0939t1q1.js → studio-7qqb7hb8.js} +4 -4
  76. package/dist/chunks/{studio-5n193zqd.js → studio-7qr8k0v2.js} +4 -4
  77. package/dist/chunks/{studio-0x6f3nk9.js → studio-8ncm9zwx.js} +4 -4
  78. package/dist/chunks/studio-8w5pa88p.js +7 -0
  79. package/dist/chunks/{studio-3qr08sxq.js → studio-9f5vcb4w.js} +3 -3
  80. package/dist/chunks/studio-aaw7wxv8.js +5 -0
  81. package/dist/chunks/studio-afx9brsc.js +5 -0
  82. package/dist/chunks/studio-ajfq4fmr.js +5 -0
  83. package/dist/chunks/{studio-nn4f9m9c.js → studio-ber1dgte.js} +4 -4
  84. package/dist/chunks/{studio-sce30r7b.js → studio-bk0anq3b.js} +3 -3
  85. package/dist/chunks/{studio-0gvvqj3h.js → studio-bmwgj8ez.js} +4 -4
  86. package/dist/chunks/{studio-321ym1tt.js → studio-bpzwhn88.js} +4 -4
  87. package/dist/chunks/{studio-g9brbewz.js → studio-c72v1kwc.js} +4 -4
  88. package/dist/chunks/{studio-tpxcryf2.js → studio-cv6gnjqd.js} +4 -4
  89. package/dist/chunks/{studio-90zkgne5.js → studio-czpmzs9r.js} +7 -7
  90. package/dist/chunks/{studio-3c10v2q1.js → studio-d5f7sskn.js} +4 -4
  91. package/dist/chunks/studio-dmgh2rrj.js +5 -0
  92. package/dist/chunks/{studio-b68k0z00.js → studio-dst8y8vh.js} +4 -4
  93. package/dist/chunks/studio-ehj3csbm.js +6 -0
  94. package/dist/chunks/{studio-thz5t120.js → studio-ek4fb4eb.js} +4 -4
  95. package/dist/chunks/studio-ep1384t9.js +5 -0
  96. package/dist/chunks/{studio-abh9kfdh.js → studio-eq5vqn1q.js} +4 -4
  97. package/dist/chunks/studio-erjccagy.js +5 -0
  98. package/dist/chunks/studio-ex1644g2.js +5 -0
  99. package/dist/chunks/studio-f3awr5nc.js +12 -0
  100. package/dist/chunks/studio-f69wcajk.js +9 -0
  101. package/dist/chunks/{studio-p2a03pgm.js → studio-g65t6svn.js} +4 -4
  102. package/dist/chunks/{studio-3q7mhbgx.js → studio-gw83z798.js} +5 -5
  103. package/dist/chunks/{studio-nwynxqtb.js → studio-hy936516.js} +4 -4
  104. package/dist/chunks/studio-j3bq30yz.js +5 -0
  105. package/dist/chunks/studio-j52ks8q7.js +5 -0
  106. package/dist/chunks/{studio-g0hxtcga.js → studio-jqvke4ac.js} +4 -4
  107. package/dist/chunks/{studio-bct64zmj.js → studio-k05g7efh.js} +4 -4
  108. package/dist/chunks/studio-kefs4sz4.js +5 -0
  109. package/dist/chunks/{studio-s7t4vp1d.js → studio-ketrgtph.js} +5 -5
  110. package/dist/chunks/studio-m3jrjfhy.js +14 -0
  111. package/dist/chunks/{studio-45mj4jqe.js → studio-m8hesdrw.js} +4 -4
  112. package/dist/chunks/{studio-k0xzrse2.js → studio-n271vdsg.js} +36 -36
  113. package/dist/chunks/studio-n4pnf0sw.js +5 -0
  114. package/dist/chunks/{studio-wfct4h6n.js → studio-ncwx602y.js} +4 -4
  115. package/dist/chunks/{studio-423tfdte.js → studio-nngc45ct.js} +4 -4
  116. package/dist/chunks/{studio-eqcddvc2.js → studio-nv5eq0f7.js} +173 -173
  117. package/dist/chunks/{studio-ea6r1zyr.js → studio-nzp0sqjg.js} +4 -4
  118. package/dist/chunks/{studio-k2evngrj.js → studio-pgze9p34.js} +5 -5
  119. package/dist/chunks/studio-ph17an19.js +5 -0
  120. package/dist/chunks/studio-pte5w7rf.js +9 -0
  121. package/dist/chunks/studio-pv1ts08p.js +6 -0
  122. package/dist/chunks/studio-q509sqt8.js +5 -0
  123. package/dist/chunks/{studio-stahswgb.js → studio-qarg1xf9.js} +6 -6
  124. package/dist/chunks/studio-r5g7fx7q.js +9 -0
  125. package/dist/chunks/studio-s49y6m5b.js +5 -0
  126. package/dist/chunks/studio-s4k1v7dt.js +7 -0
  127. package/dist/chunks/studio-t46rt6gx.js +5 -0
  128. package/dist/chunks/{studio-y1b86ast.js → studio-td3h1644.js} +4 -4
  129. package/dist/chunks/{studio-a65kbs2e.js → studio-thgexj3w.js} +7 -7
  130. package/dist/chunks/{studio-vpevkfxw.js → studio-veh91hjv.js} +4 -4
  131. package/dist/chunks/studio-vswmz40d.js +6 -0
  132. package/dist/chunks/{studio-daksw8kh.js → studio-w3aafbpk.js} +4 -4
  133. package/dist/chunks/studio-w4mfaaam.js +5 -0
  134. package/dist/chunks/{studio-4zd6an2b.js → studio-wn2cmf9q.js} +4 -4
  135. package/dist/chunks/studio-x5ffyssw.js +5 -0
  136. package/dist/chunks/{studio-swedpd82.js → studio-x5py815g.js} +4 -4
  137. package/dist/chunks/{studio-4fnb5648.js → studio-xh6rf05g.js} +4 -4
  138. package/dist/chunks/studio-z6s56dzz.js +5 -0
  139. package/dist/chunks/{studio-nvcn2ykc.js → studio-zav9hgb3.js} +4 -4
  140. package/dist/chunks/{studio-wse1rs8t.js → studio-ze1sm147.js} +6 -6
  141. package/dist/chunks/{studio-hfxttkyr.js → studio-zkkt13qd.js} +4 -4
  142. package/dist/chunks/studio-zn7ysyzb.js +5 -0
  143. package/dist/chunks/{studio-nf8esxxc.js → studio-ztzf8mce.js} +4 -4
  144. package/dist/chunks/{studio-1410q5dw.js → studio-zzgp5yka.js} +4 -4
  145. package/dist/chunks/{tooltip-dj1pvgz7.js → tooltip-gtx40bjg.js} +3 -3
  146. package/dist/chunks/{tree-j0ebwr5s.js → tree-a19s1c05.js} +2 -2
  147. package/dist/chunks/tsMode-3f116hth.js +14 -0
  148. package/dist/chunks/workspace-home-61n1jz3q.js +4 -0
  149. package/dist/chunks/workspace-sheek6zw.js +4 -0
  150. package/dist/chunks/{ws-client-arz2qsy9.js → ws-client-cb49m87s.js} +3 -3
  151. package/dist/iframe-entry.js +14 -14
  152. package/dist/manifest.json +82 -82
  153. package/dist/studio.js +97 -96
  154. package/dist/workers/ts.worker.js +3 -3
  155. package/package.json +11 -11
  156. package/src/browse/library-layouts.ts +9 -12
  157. package/src/browse/library-pane.ts +22 -16
  158. package/src/browse/library-source.ts +3 -4
  159. package/src/canvas/canvas-live-render.ts +2 -5
  160. package/src/canvas/canvas-page-context.ts +5 -0
  161. package/src/content/entry-commands.ts +32 -27
  162. package/src/content/entry-editor.ts +46 -44
  163. package/src/content/entry-inspector.ts +15 -12
  164. package/src/content/entry-model.ts +3 -3
  165. package/src/content/entry-summaries.ts +5 -5
  166. package/src/content/hold-state.ts +172 -0
  167. package/src/content/page-summaries.ts +10 -14
  168. package/src/editor/inline-edit.ts +6 -1
  169. package/src/editor/repeater-scope.ts +333 -74
  170. package/src/grid/sources/content-source.ts +42 -66
  171. package/src/panels/block-action-bar.ts +3 -4
  172. package/src/panels/events-panel.ts +6 -2
  173. package/src/panels/formula-workspace.ts +9 -0
  174. package/src/panels/properties-panel.ts +127 -35
  175. package/src/panels/statement-editor.ts +4 -0
  176. package/src/panels/tab-strip.ts +29 -26
  177. package/src/services/ai-project-tools.ts +3 -3
  178. package/src/services/ai-tools.ts +5 -5
  179. package/src/services/ai-write-report.ts +22 -4
  180. package/src/services/context-manager.ts +110 -2
  181. package/src/services/document-assistant.ts +2 -2
  182. package/src/services/harness/chat-reducer.ts +9 -4
  183. package/src/services/render-critic.ts +234 -12
  184. package/src/services/tool-executor.ts +16 -8
  185. package/src/surfaces/collections-panel.json +1 -1
  186. package/src/surfaces/collections-panel.ts +1 -1
  187. package/src/surfaces/entry-editor.json +10 -10
  188. package/src/surfaces/entry-editor.ts +22 -19
  189. package/src/surfaces/entry-inspector.json +11 -11
  190. package/src/surfaces/entry-inspector.ts +17 -10
  191. package/src/surfaces/inspector-dock.json +3 -3
  192. package/src/surfaces/tab-strip.json +5 -5
  193. package/src/surfaces/tab-strip.ts +2 -2
  194. package/src/types.ts +2 -0
  195. package/src/ui/expression-editor.ts +10 -5
  196. package/src/ui/schema-form.ts +18 -1
  197. package/src/utils/edit-display.ts +27 -1
  198. package/dist/chunks/2020-906vx2dq.js +0 -4
  199. package/dist/chunks/adapter-hnvad61x.js +0 -4
  200. package/dist/chunks/cf-settings-mkbcz4z2.js +0 -4
  201. package/dist/chunks/color-04361ttk.js +0 -4
  202. package/dist/chunks/components-w5zqwva1.js +0 -4
  203. package/dist/chunks/content-source-1vzxq1ba.js +0 -4
  204. package/dist/chunks/editor-wvf5e6j9.js +0 -4
  205. package/dist/chunks/entry-commands-mx2whrjx.js +0 -4
  206. package/dist/chunks/file-ops-9bxvk59j.js +0 -4
  207. package/dist/chunks/files-t07yqqej.js +0 -4
  208. package/dist/chunks/format-host-5ja5gxyk.js +0 -4
  209. package/dist/chunks/fs-events-3424ezp3.js +0 -4
  210. package/dist/chunks/grid-open-1mpq9mzb.js +0 -4
  211. package/dist/chunks/iframe-host-wsg0bn73.js +0 -4
  212. package/dist/chunks/index-f9qr7kzh.js +0 -4
  213. package/dist/chunks/jsonMode-vj30te2h.js +0 -13
  214. package/dist/chunks/jx-validate-ttr5ewf0.js +0 -4
  215. package/dist/chunks/layers-m49nmwvx.js +0 -4
  216. package/dist/chunks/layers-panel-hvy2e549.js +0 -4
  217. package/dist/chunks/lit-html-k2mb9k0r.js +0 -4
  218. package/dist/chunks/media-library-ae67q4at.js +0 -4
  219. package/dist/chunks/media-open-yp9jm834.js +0 -4
  220. package/dist/chunks/media-picker-s41ngdfr.js +0 -4
  221. package/dist/chunks/menu-d2jxpgma.js +0 -4
  222. package/dist/chunks/monaco-buffer-pa0g6ax7.js +0 -4
  223. package/dist/chunks/monaco-setup-g9kterhx.js +0 -4
  224. package/dist/chunks/notify-bwehrp7q.js +0 -4
  225. package/dist/chunks/platform-kv0k65cy.js +0 -4
  226. package/dist/chunks/popover-9tf4cjrk.js +0 -4
  227. package/dist/chunks/publish-panel-gzfxcm0t.js +0 -4
  228. package/dist/chunks/publish-workspace-dppd82tc.js +0 -4
  229. package/dist/chunks/quick-search-tdxaam55.js +0 -4
  230. package/dist/chunks/references-vqyr5s9x.js +0 -4
  231. package/dist/chunks/right-panel-0yrw4cgz.js +0 -4
  232. package/dist/chunks/source-control-6fk72me2.js +0 -4
  233. package/dist/chunks/studio-0khd8xtx.js +0 -4
  234. package/dist/chunks/studio-0w3541dg.js +0 -7
  235. package/dist/chunks/studio-15hwqgd8.js +0 -5
  236. package/dist/chunks/studio-1ks5d9y4.js +0 -5
  237. package/dist/chunks/studio-3xk9zdgb.js +0 -5
  238. package/dist/chunks/studio-4f7thq0p.js +0 -5
  239. package/dist/chunks/studio-53wy9ek3.js +0 -5
  240. package/dist/chunks/studio-7rrdbvex.js +0 -5
  241. package/dist/chunks/studio-8kx6m0rg.js +0 -5
  242. package/dist/chunks/studio-9dq7rwc7.js +0 -5
  243. package/dist/chunks/studio-9qx1ywbv.js +0 -9
  244. package/dist/chunks/studio-aam8zt8z.js +0 -5
  245. package/dist/chunks/studio-b4e0ftkt.js +0 -5
  246. package/dist/chunks/studio-bz0b5brj.js +0 -6
  247. package/dist/chunks/studio-cfnn70h1.js +0 -5
  248. package/dist/chunks/studio-e7vjyp04.js +0 -10
  249. package/dist/chunks/studio-egnjpyde.js +0 -9
  250. package/dist/chunks/studio-ejrypvmq.js +0 -5
  251. package/dist/chunks/studio-f8tyeyzt.js +0 -5
  252. package/dist/chunks/studio-fj6c905s.js +0 -5
  253. package/dist/chunks/studio-fkrr7kgg.js +0 -9
  254. package/dist/chunks/studio-fspe7m9t.js +0 -5
  255. package/dist/chunks/studio-ggx3j7nd.js +0 -5
  256. package/dist/chunks/studio-j0zf5x2x.js +0 -5
  257. package/dist/chunks/studio-jeb7hth3.js +0 -5
  258. package/dist/chunks/studio-k1xqrgm5.js +0 -5
  259. package/dist/chunks/studio-k3we3kqb.js +0 -5
  260. package/dist/chunks/studio-n9qba0gx.js +0 -5
  261. package/dist/chunks/studio-nzemfbkk.js +0 -14
  262. package/dist/chunks/studio-q80fg1d6.js +0 -12
  263. package/dist/chunks/studio-r050sez0.js +0 -6
  264. package/dist/chunks/studio-s9fng7m8.js +0 -7
  265. package/dist/chunks/studio-wgc54sxf.js +0 -5
  266. package/dist/chunks/studio-wqfaqw4m.js +0 -5
  267. package/dist/chunks/studio-x0gsfr1d.js +0 -16
  268. package/dist/chunks/studio-xpx91fby.js +0 -6
  269. package/dist/chunks/studio-yrcrncev.js +0 -5
  270. package/dist/chunks/studio-yzpskb0j.js +0 -5
  271. package/dist/chunks/studio-zfdbmhp3.js +0 -5
  272. package/dist/chunks/tsMode-jg1dtphj.js +0 -14
  273. package/dist/chunks/workspace-9btkc8tk.js +0 -4
  274. package/dist/chunks/workspace-home-qcc4z5ag.js +0 -4
  275. package/src/content/draft-state.ts +0 -108
@@ -0,0 +1,5 @@
1
+ import{n,m}from"./studio-erjccagy.js";var A=500;class h extends Error{constructor(){super();this.name="MaxOpsExceededError"}}function Ks(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((i,r)=>Ks(i,t[r]));if(m(e)&&m(t)){let i=Object.keys(e),r=Object.keys(t);return i.length===r.length&&i.every((a)=>(a in t)&&Ks(e[a],t[a]))}return!1}function D(e){let t=5381;for(let i=0;i<e.length;i++)t=Math.imul(t,33)+(e.codePointAt(i)??0);return t.toString(36)}function g(e){return n(e)?`s:${e}`:`n:${D(JSON.stringify(e))}`}function y(e){if(n(e))return"s";let{attributes:t,$props:i}=e,r=(m(t)?t.id:void 0)??(m(i)?i.key:void 0)??"";return`w:${String(e.tagName??"")}:${String(r)}`}function b(e,t,i=Number.POSITIVE_INFINITY){let r=e.length,a=t.length;if(r===0||a===0||r*a>i)return[];let l=Array.from({length:r+1},()=>Array.from({length:a+1},()=>0));for(let s=r-1;s>=0;s--)for(let c=a-1;c>=0;c--)l[s][c]=e[s]===t[c]?l[s+1][c+1]+1:Math.max(l[s+1][c],l[s][c+1]);let f=[],o=0,u=0;while(o<r&&u<a)if(e[o]===t[u])f.push([o,u]),o+=1,u+=1;else if(l[o+1][u]>=l[o][u+1])o+=1;else u+=1;return f}function i$(e,t,i={}){let r=i.maxCells??Number.POSITIVE_INFINITY,a=b(e.map((s)=>g(s)),t.map((s)=>g(s)),r),l=[],f=-1,o=-1,u=[];for(let[s,c]of a)u.push([f+1,s,o+1,c]),l.push({aIndex:s,bIndex:c,identical:!0}),f=s,o=c;u.push([f+1,e.length,o+1,t.length]);for(let[s,c,x,J]of u){let O=e.slice(s,c),M=t.slice(x,J);for(let[N,S]of b(O.map((p)=>y(p)),M.map((p)=>y(p)),r))l.push({aIndex:s+N,bIndex:x+S,identical:!1})}return l.toSorted((s,c)=>s.aIndex-c.aIndex)}function d(e,t){if(e.ops.length>=e.maxOps)throw new h;e.ops.push(t)}function I(e,t,i,r){for(let f of new Set([...Object.keys(i),...Object.keys(r)])){if(f==="children")continue;if(!(f in r))d(e,{key:f,op:"set-key",path:t});else if(!Ks(i[f],r[f]))d(e,{key:f,op:"set-key",path:t,value:r[f]})}let a=i.children,l=r.children;if(Array.isArray(a)&&Array.isArray(l))k(e,t,a,l);else if(!Ks(a,l))d(e,{key:"children",op:"set-key",path:t,value:l})}function k(e,t,i,r){let a=i$(i,r),l=new Set(a.map((o)=>o.aIndex)),f=new Map(a.map((o)=>[o.bIndex,o]));for(let o=i.length-1;o>=0;o--)if(!l.has(o))d(e,{index:o,op:"remove-child",parentPath:t});for(let[o,u]of r.entries()){let s=f.get(o);if(!s){d(e,{index:o,node:u,op:"insert-child",parentPath:t});continue}if(s.identical)continue;let c=i[s.aIndex];if(m(c)&&m(u))I(e,[...t,"children",o],c,u);else if(!Ks(c,u))d(e,{index:o,node:u,op:"set-child",parentPath:t})}}function IF(e,t,i={}){let r={maxOps:i.maxOps??A,ops:[]};try{I(r,[],e,t)}catch(a){if(a instanceof h)return null;throw a}return r.ops}
2
+ export{Ks,i$,IF};
3
+
4
+ //# debugId=4856AAD0346B09FC64756E2164756E21
5
+ //# sourceMappingURL=studio-6hcfm9q3.js.map
@@ -0,0 +1,5 @@
1
+ import{wh}from"./studio-s49y6m5b.js";import{Im}from"./studio-15mfah02.js";import{x}from"./studio-zn7ysyzb.js";import{n,S}from"./studio-erjccagy.js";function KT(){return Object.keys(x?.projectConfig?.content??{})}function qs(e){let t=Im(e);if(!t)return null;if(/\.[a-z\d]+$/i.test(t.dir))return null;return{def:t.def,dir:t.dir,ext:t.ext,name:t.name,schema:t.def.schema??null}}function Kw(){return KT().map((e)=>qs(e)).filter((e)=>e!==null)}function sl(e){let t=wh(e??null,x?.projectConfig);return t?qs(t.name):null}function GD(e){let t=wh(e??null,x?.projectConfig),r=t?Im(t.name):null;if(!t||!r)return null;return{def:r.def,dir:r.dir,ext:r.ext,name:r.name,schema:t.schema}}function c(e){if(e===null||!S(e))return e;return JSON.parse(JSON.stringify(e))}function u(e){if(n(e.$ref))return"";switch(e.type){case"boolean":return!1;case"integer":case"number":return 0;case"array":return[];case"object":return GT(e);default:return""}}function GT(e){let t=e?.properties;if(!t)return{};let r=new Set(Array.isArray(e.required)?e.required:[]),o={};for(let[i,l]of Object.entries(t))if(l.default!==void 0)o[i]=c(l.default);else if(r.has(i))o[i]=u(l);return o}function JD(e,t){return(Array.isArray(e?.required)?e.required:[]).filter((o)=>t[o]===void 0)}
2
+ export{KT,qs,Kw,sl,GD,GT,JD};
3
+
4
+ //# debugId=E08E0990BAD73C1E64756E2164756E21
5
+ //# sourceMappingURL=studio-6mf31e16.js.map
@@ -0,0 +1,5 @@
1
+ import{p}from"./studio-xh6rf05g.js";import{jt,fn}from"./studio-ex1644g2.js";import{St,ti,Se,Fe,wh,g,Si,Ft}from"./studio-s49y6m5b.js";import{Ls,Ud}from"./studio-k05g7efh.js";import{ea,dt}from"./studio-cv6gnjqd.js";import{Fd,QT,G0,t$,n$}from"./studio-15mfah02.js";import{Pb,as,Zl,Yw,Zw,$p,Qr,Lp}from"./studio-ek4fb4eb.js";import{x}from"./studio-zn7ysyzb.js";import{E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n,J,Q,xf}from"./studio-erjccagy.js";var B=["id","sku","slug","Slug"];function H(e){let r=new Set;return e.map((t,o)=>{let i=t.trim()===""?`column${o+1}`:t;if(r.has(i))i=`${i}__${o+1}`;return r.add(i),i})}function L(e,r){for(let t of B){let o=e.indexOf(t);if(o===-1)continue;let i=r.rows.map((s)=>s[o]??"");if(i.every((s)=>s!=="")&&new Set(i).size===i.length)return t}return null}function P(e,r){let t=Fd(e),o=H(t.headers),i=L(o,t),s=i?o.indexOf(i):-1,c=t.rows.map((d,u)=>s===-1?String(u):d[s]),f=new Map(c.map((d,u)=>[d,u])),a=wh(r,x?.projectConfig),l=a?.schema.properties??{},h=t.rows.slice(0,50).map((d)=>{let u={};for(let[S,C]of o.entries())u[C]=d[S]??"";return u}),m=new Map(Zw(h).map((d)=>[d.field,d])),y=new Map(Yw(a?.schema,{idField:i??void 0}).map((d)=>[d.field,d]));return{columns:o.map((d,u)=>{let C=(d in l?y.get(d):void 0)??m.get(d)??{editable:!0,field:d,kind:"string",title:t.headers[u]||d};return{...C,pk:d===i,title:t.headers[u]?.trim()||C.title}}),doc:t,fields:o,keys:c,keyToIndex:f,loadText:e}}function z(e,r){let t={},o=e.doc.rows[r]??[];for(let[i,s]of e.fields.entries()){let c=e.columns[i],f=o[i]??"";t[s]=c.kind==="string"||c.kind==="text"||c.kind==="readonly"?f:$p(f,c)}return t}function T(e,r){let t=e.doc.rows.map((s)=>[...s]),o=(s)=>e.fields.indexOf(s);for(let s of r.cells){let c=e.keyToIndex.get(s.rowKey),f=o(s.field);if(c===void 0||f===-1)continue;t[c][f]=Qr(s.value)}for(let s of r.inserts){let c=e.fields.map((f)=>Qr(s.cells[f]??null));t.push(c)}let i=r.deletes.map((s)=>e.keyToIndex.get(s.rowKey)).filter((s)=>s!==void 0).toSorted((s,c)=>c-s);for(let s of i)t.splice(s,1);return{...e.doc,rows:t}}function j(e,r){return{cells:e.cells.map((t)=>({field:t.field,rowKey:t.rowKey,...r})),deletes:e.deletes.map((t)=>({rowKey:t.rowKey,...r})),inserts:e.inserts.map((t)=>({error:r.error,ok:r.ok,tempKey:t.tempKey}))}}function U0(e){let r=null,t=(o=!1)=>{if(!o&&r)return r;return r=p().readFile(e).then((i)=>P(i,e)),r};return{backingPaths:()=>new Map([[e,"*"]]),capabilities:{delete:!0,insert:!0,remotePaging:!1,remoteSort:!1},async columns(){return(await t()).columns},async commit(o){let i=await t(),s=p(),c=null;try{c=await s.readFile(e)}catch{c=null}if(c!==i.loadText&&!Ud(e))return j(o,{error:"File changed on disk — refresh to reload",ok:!1,stale:!0});let f=T(i,o),a=QT(f);return Ls(e),await s.writeFile(e,a),r=Promise.resolve(P(a,e)),j(o,{ok:!0})},id:e,label:e.split("/").pop()??e,async refresh(){await t(!0)},async rows(){let o=await t(),i=o.doc.rows.map((s,c)=>({cells:z(o,c),key:o.keys[c]}));return{rows:i,total:i.length}},async serializeForSource(o){let i=await t();return QT(T(i,o))}}}var K={$schema:"https://jxsuite.com/schema/v1",$id:"StudioGridOpen",$description:"Every grid-able source a project has, grouped by where it comes from: the project's own pages and content collections first, then each connection's tables. It is the ISLAND of a confirm dialog rather than a dialog of its own — `ui/layers.ts`'s dialog owns the headline, the cancel button, modality and focus, and this document is only the list — because a second answer to \"what is a dialog\" is a defect (studio-ui-guidelines.md §12.5). Group headings are why it is not the kit menu: a menu row can carry a divider above it and cannot carry a name for the run it opens.",tagName:"div",attributes:{part:"sources"},style:{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",minWidth:"280px",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="group-title"]':{margin:"0",fontSize:"var(--jx-text-xs)",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",gap:"1px",marginTop:"var(--jx-space-1)"},'& [part="source"]':{textAlign:"left",background:"none",border:"none",color:"var(--fg)",font:"inherit",padding:"var(--jx-space-2) var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)",cursor:"pointer"},'& [part="source"]:hover':{background:"var(--bg-hover)"},'& [part="source"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"},'& [part="group-empty"]':{margin:"0",padding:"var(--jx-space-2)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"}},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/key"},map:{$description:"One origin of grid-able sources. A connection with no tables says why it has none instead of drawing an empty box — an author who has not pushed a schema yet is exactly the reader who needs the sentence.",tagName:"section",attributes:{part:"group","data-group":"${$map.item.key}"},children:[{tagName:"h3",attributes:{part:"group-title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"rows"},$switch:{$ref:"$map/item/state"},cases:{listed:{tagName:"div",attributes:{part:"rows-list",role:"none"},style:{display:"contents"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/id"},map:{tagName:"button",attributes:{part:"source",type:"button","data-source":"${$map.item.id}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/id"}]}]},textContent:"${$map.item.label}"}}]},empty:{tagName:"p",attributes:{part:"group-empty"},textContent:"${$map.item.emptyMessage}"}}}]}}]};E("grid-open",K);function M(e,r,t){let o=b({groups:r,open:t}),i=null,s=!1,c=I("grid-open",o,e).then((f)=>{let a=f.root;if(s)return f.dispose(),a;return i=f,a});return{dispose(){s=!0,i?.dispose(),i=null},ready:c}}function G(){try{return p()}catch{return null}}function z0(){return Q(G()?.dataRows)}async function O(){let e=G();if(!Q(e?.dataConnections))return null;return e.dataConnections()}async function YD(e){let r=G();if(!Q(r?.dataConnectionTest))return{error:"Connection tests are not supported by this backend",ok:!1};try{return await r.dataConnectionTest(e)}catch(t){return{error:t instanceof Error?t.message:String(t),ok:!1}}}async function JT(e){let r=G();if(!Q(r?.dataPush))return{applied:!1,errors:["Schema push is not supported by this backend"],plan:[]};try{return await r.dataPush(e)}catch(t){return{applied:!1,errors:[t instanceof Error?t.message:String(t)],plan:[]}}}function R(e){let t=G()?.[e];if(t===void 0)throw Error(`The ${String(e)} surface is not supported by this backend`);return t}function k(e){return R("dataRows")(e)}function A(e){return R("dataInsertRow")(e)}function F(e){return R("dataUpdateRow")(e)}function _(e){return R("dataDeleteRow")(e)}function ZD(e,r,t){let o=(c)=>c.replaceAll(/([a-z0-9])([A-Z])/g,"$1_$2").replaceAll(/[^A-Za-z0-9]+/g,"_").replaceAll(/^_+|_+$/g,"").toUpperCase(),s=[r??e,t.replace(/Env$/,"")].flatMap((c)=>{let f=o(c);return f?[f]:[]}).join("_")||"SECRET";return/^\d/.test(s)?`JX_${s}`:s}var q=50;function Z(e){let r=e.toLowerCase();if(/(int|real|floa|doub|num|dec)/.test(r))return"number";if(r.includes("bool"))return"boolean";if(/(timestamp|datetime|date)/.test(r))return"date";return"string"}function W(e){return!e.pk&&e.name!=="created_at"&&e.name!=="updated_at"}function X(e){if(e===void 0)return null;if(xf(e))return e;return JSON.stringify(e)}function N(e,r){let t=[],o="id",i=new Map,s=(a)=>{if(a.length>0)t=a,o=a.find((l)=>l.pk)?.name??"id"},c=(a)=>{let l={table:r};if(e)l.connection=e;if(l.limit=a?.limit??q,l.offset=a?.offset??0,a?.orderBy)l.dir=a.dir??"asc",l.orderBy=a.orderBy;return l},f=(a,l)=>{let h=a[o];if(n(h)||J(h))return i.set(String(h),h),String(h);return`row-${l}`};return{capabilities:{delete:!0,insert:!0,remotePaging:!0,remoteSort:!0},async columns(){if(t.length===0){let a=await k(c({limit:1,offset:0}));s(a.columns)}return t.map((a)=>{let l=W(a)?Z(a.type):"readonly";return{editable:l!=="readonly",field:a.name,kind:l,pk:a.pk===!0,title:a.name,widthHint:a.pk?80:void 0}})},async commit(a){let l={cells:[],deletes:[],inserts:[]},h=new Map;for(let m of a.cells){let y=h.get(m.rowKey)??[];y.push({field:m.field,value:m.value}),h.set(m.rowKey,y)}for(let[m,y]of h){let w=i.get(m),d=(u,S)=>{for(let C of y)l.cells.push({error:S,field:C.field,ok:u,rowKey:m})};if(w===void 0){d(!1,"Row has no primary key — refresh the grid");continue}try{let u={};for(let C of y)u[C.field]=C.value;let S={pk:w,set:u,table:r};if(e)S.connection=e;await F(S),d(!0)}catch(u){d(!1,u instanceof Error?u.message:String(u))}}for(let m of a.inserts)try{let y={};for(let[C,D]of Object.entries(m.cells))if(D!==null)y[C]=D;let w={table:r,values:y};if(e)w.connection=e;let{row:d}=await A(w),u=d[o],S;if(n(u)||J(u))S=String(u),i.set(S,u);l.inserts.push({newKey:S,ok:!0,tempKey:m.tempKey})}catch(y){l.inserts.push({error:y instanceof Error?y.message:String(y),ok:!1,tempKey:m.tempKey})}for(let m of a.deletes){let y=i.get(m.rowKey);if(y===void 0){l.deletes.push({error:"Row has no primary key — refresh the grid",ok:!1,rowKey:m.rowKey});continue}try{let w={pk:y,table:r};if(e)w.connection=e;await _(w),l.deletes.push({ok:!0,rowKey:m.rowKey})}catch(w){l.deletes.push({error:w instanceof Error?w.message:String(w),ok:!1,rowKey:m.rowKey})}}return l},id:as({connection:e??"default",kind:"data",table:r}),label:r,async refresh(){t=[],i.clear()},async rows(a){let l=await k(c(a));return s(l.columns),{rows:l.rows.map((m,y)=>{let w=f(m,y),d={};for(let u of t)d[u.name]=X(m[u.name]);return{cells:d,key:w}}),total:l.total}}}}async function YT(e,r={}){let t=g.tabs.get(e);if(t)return Ft(e,{focus:r.focus!==!1}),t;try{await jt()}catch{}let o=U0(e),i=Si({capabilities:{modes:["grid","source"]},document:structuredClone(Pb),documentPath:e,id:e,sourceFormat:fn(e)?.name??null,...r.paneId!==void 0&&{paneId:r.paneId},...r.preview===!0&&{preview:!0},...r.focus===!1&&{focus:!1}});return Lp(i,o).load(),i}function v(e){let r=Si({capabilities:{modes:["grid"]},document:structuredClone(Pb),documentPath:null,id:e.id});return Lp(r,e).load(),r}function XD(e){let r=as({kind:"collection",name:e}),t=g.tabs.get(r);if(t)return Ft(r),t;return v(t$(e))}function q0(){let e=as({kind:"pages"}),r=g.tabs.get(e);if(r)return Ft(e),r;return v(n$())}function V(e,r){let t=as({connection:e??"default",kind:"data",table:r}),o=g.tabs.get(t);if(o)return Ft(t),o;return v(N(e,r))}function Y(e){let r=Zl(e);if(r?.kind==="pages")q0();else if(r?.kind==="collection")XD(r.name);else if(r?.kind==="data")V(r.connection,r.table)}function ee(e,r){return[{emptyMessage:"",key:"project",rows:[{id:as({kind:"pages"}),label:"Pages"},...e.map(({name:t})=>({id:as({kind:"collection",name:t}),label:`Collection: ${t}`}))],state:"listed",title:"Project"},...r.map((t)=>({emptyMessage:"No tables — push a schema first.",key:`data:${t.name}`,rows:t.tables.map((o)=>({id:as({connection:t.name,kind:"data",table:o}),label:o})),state:t.tables.length===0?"empty":"listed",title:`Data · ${t.name}`}))]}async function ZT(){let e=G0(),r=[];if(z0())r=(await O().catch(()=>null))?.connections??[];let t=null,o=ea({cancelLabel:"Cancel",confirmLabel:"",headline:"Open Grid",island:(i)=>{t=M(i,ee(e,r),(s)=>{o.close(),Y(s)})},layer:dt("dialog"),onCancel:()=>o.close(),onClosed:()=>{t?.dispose(),t=null},onConfirm:()=>{},region:"grid/open"});o.ready}function te(){return[{args:Se({name:Fe("The content collection's name, as project.json declares it.")}),category:"Project",id:"collection.editInGrid",level:"project",menus:["context/file","palette"],group:"5_data",requires:"a project that declares content collections",when:(e)=>e.project.open,run:(e,r)=>{let t=St("collection.editInGrid",r,"name"),o=G0().map((i)=>i.name);if(!o.includes(t))throw RangeError(`command "collection.editInGrid" argument "name": "${t}" is not a content `+"collection this project declares — it declares: "+`${o.length>0?o.join(", "):"none"}`);XD(t)},title:"Edit Collection in Grid"},{args:{additionalProperties:!1,properties:{connection:Fe('The connection name from project.json. Defaults to "default".'),table:Fe("The table to open.")},required:["table"],type:"object"},category:"Project",id:"data.openGrid",level:"project",menus:["palette"],group:"5_data",requires:"a platform that serves the data routes",when:(e)=>e.project.open,enablement:(e)=>e.capability.dataRows,run:(e,r)=>{let t=St("data.openGrid",r,"table");V(ti("data.openGrid",r,"connection"),t)},title:"Open Data Grid"}]}function XT(e){e.registerAll(te())}
2
+ export{z0,YD,JT,ZD,U0,YT,XD,q0,ZT,XT};
3
+
4
+ //# debugId=9FB10496DA71723C64756E2164756E21
5
+ //# sourceMappingURL=studio-6sxnqqw8.js.map
@@ -1,5 +1,5 @@
1
- var s=Object.create;var{getPrototypeOf:t,defineProperty:n,getOwnPropertyNames:u}=Object;var q=Object.prototype.hasOwnProperty;function v(a){return this[a]}var w,x,pp=(a,b,c)=>{var i=a!=null&&typeof a==="object";if(i){var f=b?w??=new WeakMap:x??=new WeakMap,d=f.get(a);if(d)return d}c=a!=null?s(t(a)):{};let g=b||!a||!a.__esModule||!q.call(a,"default")?n(c,"default",{value:a,enumerable:!0}):c;if(a&&typeof a==="object"||typeof a==="function"){for(let e of u(a))if(!q.call(g,e))n(g,e,{get:v.bind(a,e),enumerable:!0})}if(i)f.set(a,g);return g};var pe=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var y=(a)=>a;function z(a,b){this[a]=y.bind(null,b)}var eo=(a,b)=>{for(var c in b)n(a,c,{get:b[c],enumerable:!0,configurable:!0,set:z.bind(b,c)})};var r,o,m,ce=(a,b)=>{for(var[c,i,f]of r||[])for(var d=[a],g=globalThis,e=g.document,p,k,l,h,j;k=d.pop();)if(!o[k]&&(l=i[k])){o[k]=1;for(h=1;h<l.length;h++)d.push(f[l[h]]);if(!b&&k!==a&&(p=e&&e.head)){if(m===void 0)m=(h=e.querySelector("meta[property=csp-nonce]"))&&(h.nonce||h.getAttribute("nonce"))||"";if(j=e.createElement("link"),j.rel="modulepreload",j.crossOrigin="",m)j.nonce=m;j.href=new g.URL(l[0],c),p.appendChild(j)}}},aF=(a,b,c,i)=>{for(var f={},d=0;d<b.length;d++)f[b[d]]=c[d];(r||=[]).push([a,f,b]),o||={},ce(b[i],1)};
2
- export{pp,pe,eo,ce,aF};
1
+ var s=Object.create;var{getPrototypeOf:t,defineProperty:n,getOwnPropertyNames:u}=Object;var q=Object.prototype.hasOwnProperty;function v(a){return this[a]}var w,x,up=(a,b,c)=>{var i=a!=null&&typeof a==="object";if(i){var f=b?w??=new WeakMap:x??=new WeakMap,d=f.get(a);if(d)return d}c=a!=null?s(t(a)):{};let g=b||!a||!a.__esModule||!q.call(a,"default")?n(c,"default",{value:a,enumerable:!0}):c;if(a&&typeof a==="object"||typeof a==="function"){for(let e of u(a))if(!q.call(g,e))n(g,e,{get:v.bind(a,e),enumerable:!0})}if(i)f.set(a,g);return g};var pe=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var y=(a)=>a;function z(a,b){this[a]=y.bind(null,b)}var er=(a,b)=>{for(var c in b)n(a,c,{get:b[c],enumerable:!0,configurable:!0,set:z.bind(b,c)})};var r,o,m,ce=(a,b)=>{for(var[c,i,f]of r||[])for(var d=[a],g=globalThis,e=g.document,p,k,l,h,j;k=d.pop();)if(!o[k]&&(l=i[k])){o[k]=1;for(h=1;h<l.length;h++)d.push(f[l[h]]);if(!b&&k!==a&&(p=e&&e.head)){if(m===void 0)m=(h=e.querySelector("meta[property=csp-nonce]"))&&(h.nonce||h.getAttribute("nonce"))||"";if(j=e.createElement("link"),j.rel="modulepreload",j.crossOrigin="",m)j.nonce=m;j.href=new g.URL(l[0],c),p.appendChild(j)}}},xF=(a,b,c,i)=>{for(var f={},d=0;d<b.length;d++)f[b[d]]=c[d];(r||=[]).push([a,f,b]),o||={},ce(b[i],1)};
2
+ export{up,pe,er,ce,xF};
3
3
 
4
- //# debugId=A8ADD9DB296B6E6D64756E2164756E21
5
- //# sourceMappingURL=studio-0939t1q1.js.map
4
+ //# debugId=08591CAC91A181D664756E2164756E21
5
+ //# sourceMappingURL=studio-7qqb7hb8.js.map
@@ -1,5 +1,5 @@
1
- import{p}from"./studio-4fnb5648.js";import{jt,Aa,wl}from"./studio-aam8zt8z.js";import{Tn,nt,Xs}from"./studio-tpxcryf2.js";import{ae}from"./studio-wqfaqw4m.js";import{h}from"./studio-yrcrncev.js";import{Nw,AN,$b,_i}from"./studio-wse1rs8t.js";import{kh,kr,C}from"./studio-4f7thq0p.js";import{E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{n,wf}from"./studio-k3we3kqb.js";var I={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPalette",$description:'The command palette: a `role="combobox"` field over the kit\'s `jx-listbox`, whose rows are `jx-option`s the host projects. `rows` is the ranked set for the current mode and query; `activeId` is the highlight, and it is ONE string — the id the field points `aria-activedescendant` at and the id the listbox is handed as `active`, so a key moves the caret without the rows reconciling and no row re-decides its own flag. The FIELD is not a `jx-combobox`: this one carries a mode chip inside its box, its Enter runs a command rather than committing a value, and its panel is a centred scrim rather than a popover under a control. Every gesture calls back into panels/quick-search.ts, which owns the modes, the ranking, the recents and what a row does.',tagName:"div",attributes:{part:"palette"},style:{display:"contents",'& [part="overlay"]':{position:"fixed",inset:"0",zIndex:"1000",display:"flex",justifyContent:"center",paddingTop:"60px",background:"rgba(0, 0, 0, 0.4)"},'& [part="overlay"][hidden]':{display:"none"},'& [part="panel"]':{width:"560px",maxWidth:"calc(100vw - 32px)",maxHeight:"420px",display:"flex",flexDirection:"column",alignSelf:"flex-start",background:"var(--jx-bg-overlay)",border:"1px solid var(--jx-border)",borderRadius:"var(--jx-radius-md)",boxShadow:"var(--jx-shadow-dialog)",color:"var(--jx-fg)",fontFamily:"var(--jx-font-sans)",overflow:"hidden"},'& [part="input-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",paddingLeft:"var(--jx-space-4)",background:"var(--jx-bg-input)",borderBottom:"1px solid var(--jx-border)"},'& [part="chip-slot"], & [part="empty-slot"], & [part="section-slot"], & [part="trailing-slot"]':{display:"contents"},'& [part="chip"]':{display:"inline-flex",alignItems:"center",gap:"var(--jx-space-1)",flexShrink:"0",padding:"2px var(--jx-space-1) 2px var(--jx-space-3)",borderRadius:"var(--jx-radius-sm)",background:"var(--jx-accent-solid)",color:"var(--jx-accent-fg)",fontSize:"var(--jx-text-sm)"},'& [part="chip-remove"] > [part="control"]':{color:"inherit",opacity:"0.8",":hover":{opacity:"1",background:"transparent"}},'& [part="input"]':{flex:"1",minWidth:"0",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-4) var(--jx-space-1)",font:"inherit",fontSize:"var(--jx-text-lg)",border:"none",outline:"none",background:"none",color:"var(--jx-fg)","::placeholder":{color:"var(--jx-fg-muted)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="results"]':{$description:"The list is the kit's: a `jx-listbox` of `jx-option`, so the highlight is ONE id — `active`, the same string the field points `aria-activedescendant` at — and the listbox's sidecar is the single writer of every row's `selected`. What this surface still decides is density. The kit's row pads itself by `--jx-space-3`; the other half of the 16px optical margin the panel has always had sits here, on the list, so the heading, the rows and the empty sentence line up on one edge instead of each naming it.",flex:"1",paddingInline:"var(--jx-space-3)"},'& [part="option"] [part="label"]':{fontWeight:"500"},'& [part="option"] [part="description"]':{$description:"A `jx-select` row's note is a category at the END of the row, so the kit pushes it there with an auto margin. A palette row's note is a CONTINUATION of its name — the file's directory, the command's category — and the far edge belongs to the chord, which is how this surface teaches the keyboard it replaced. So the auto margin moves to the end slot.",marginInlineStart:"0"},'& [part="option"] [part="end"]':{marginInlineStart:"auto"},'& [part="option"][aria-disabled="true"]':{$description:"An unavailable command is greyed with its `requires` sentence as the subtitle, and that sentence is the reason the row is on screen at all. The kit fades the whole row to 0.45, which would take a muted grey below any readable contrast — so the row keeps its ink and only the name and the glyph dim.",opacity:"1"},'& [part="option"][aria-disabled="true"] [part="label"], & [part="option"][aria-disabled="true"] [part="icon"]':{opacity:"0.45"},'& [part="chord"]':{flexShrink:"0",fontFamily:"inherit",fontSize:"var(--jx-text-xs)",color:"var(--jx-fg-muted)",border:"1px solid var(--jx-border)",borderRadius:"var(--jx-radius-sm)",padding:"0 5px"},'& [part="option"][aria-selected="true"] [part="chord"]':{color:"inherit",borderColor:"currentColor"},'& [part="badge"]':{fontSize:"var(--jx-text-xs)",padding:"1px var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)",background:"var(--jx-border)",color:"var(--jx-fg-dim)"},'& [part="hint"]':{padding:"var(--jx-space-2) var(--jx-space-5)",borderTop:"1px solid var(--jx-border)",color:"var(--jx-fg-muted)",fontSize:"var(--jx-text-xs)"},'& [part="hint"] kbd':{fontFamily:"inherit",color:"var(--jx-fg-dim)"}},children:[{tagName:"div",attributes:{part:"overlay",hidden:"${state.open ? null : ''}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/close"},value:[]}]},children:[{tagName:"div",attributes:{part:"panel"},onclick:{$prototype:"Function",body:[{stopPropagation:!0}]},children:[{tagName:"div",attributes:{part:"input-row"},children:[{tagName:"span",attributes:{part:"chip-slot",role:"none"},$switch:{$ref:"#/state/hasChip"},cases:{true:{tagName:"span",attributes:{part:"chip"},children:[{tagName:"span",attributes:{part:"chip-label"},textContent:"${state.chipLabel}"},{tagName:"jx-action-button",$props:{label:"Clear mode",hint:"Clear mode (Backspace)",icon:"x",size:"sm"},attributes:{part:"chip-remove"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearMode"},value:[]}]}}]}}},{tagName:"input",attributes:{part:"input",type:"text",role:"combobox","aria-controls":"quick-search-listbox","aria-expanded":"${state.expanded ? 'true' : 'false'}","aria-activedescendant":"${state.activeId || null}","aria-autocomplete":"list","aria-label":"${state.placeholder}",placeholder:"${state.placeholder}"},value:{$ref:"#/state/query"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/input"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{ArrowDown:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/move"},value:[1]}],ArrowUp:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/move"},value:[-1]}],Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/activate"},value:[]}],Escape:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/close"},value:[]}],Backspace:[{$switch:{$ref:"#/state/canClearMode"},cases:{true:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/clearMode"},value:[]}]}}]}}]}}]},{tagName:"jx-listbox",attributes:{part:"results",id:"quick-search-listbox"},$props:{label:"Results",active:"${state.activeId}"},onselect:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activateRow"},value:[{$ref:"event#/detail"}]}],description:"One handler for every row, because a row's `select` bubbles. The detail is the row's `value`, which is the index it occupies in `rows` — the same number a hover names, and the number the id is built from."},children:[{tagName:"div",attributes:{part:"empty-slot",role:"none"},$switch:{$ref:"#/state/isEmpty"},cases:{true:{tagName:"div",attributes:{part:"empty"},textContent:"${state.emptyHint}"}}},{tagName:"div",attributes:{part:"section-slot",role:"none"},$switch:{$ref:"#/state/showSection"},cases:{true:{tagName:"div",attributes:{part:"group-heading"},textContent:"${state.sectionLabel}"}}},{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/key"},map:{tagName:"jx-option",attributes:{part:"option",id:"quick-search-option-${$map.index}","data-kind":"${$map.item.kind}"},$props:{value:"${$map.index}",label:{$ref:"$map/item/name"},description:{$ref:"$map/item/detail"},disabled:{$ref:"$map/item/disabled"}},onmouseenter:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/hover"},value:[{$ref:"$map/index"}]}]},children:[{tagName:"jx-icon",attributes:{slot:"icon"},$props:{name:{$ref:"$map/item/icon"}}},{tagName:"span",attributes:{slot:"end",part:"trailing-slot"},$switch:{$ref:"$map/item/trailing"},cases:{chord:{tagName:"kbd",attributes:{part:"chord"},textContent:"${$map.item.chord}"},recent:{tagName:"span",attributes:{part:"badge"},textContent:"recent"}}}]}}]},{tagName:"div",attributes:{part:"hint"},children:[{tagName:"kbd",textContent:"↑↓"}," move · ",{tagName:"kbd",textContent:"↵"}," run · ",{tagName:"kbd",textContent:"?"}," modes · ",{tagName:"kbd",textContent:">"}," commands · ",{tagName:"kbd",textContent:"@"}," elements"]}]}]}]};var S=[{mode:"files",prefix:"",chip:"Files",placeholder:"Go to a file…",description:"Open a file by any part of its path — pgblog finds pages/blog/index.md."},{mode:"commands",prefix:">",chip:"Commands",placeholder:"Run a command…",description:"Run anything Studio can do, with its keyboard shortcut printed beside it."},{mode:"nodes",prefix:"@",chip:"Symbols",placeholder:"Go to an element in this document…",description:"Select an element in the open document by its Outline name."},{mode:"projects",prefix:"",chip:"Recent Projects",placeholder:"Open a recent project…",description:"Reopen a project you have had open before."},{mode:"picker",prefix:"?",chip:"Modes",placeholder:"Type ? for modes, > for commands, @ for elements…",description:"List these modes."}],X=new Map(S.map((e)=>[e.mode,e])),O=S.filter((e)=>e.prefix!=="");function _(e){return X.get(e)??S[0]}function L(e,t,o){let a=O.find((s)=>t.startsWith(s.prefix));if(a)return L(a.mode,t.slice(1),o);let i=e;if(i==="picker"&&t.trim()!=="")i="files";if(i==="files"&&!o)i="projects";return{mode:i,query:t}}var Y=new Set(["/","-","_","."," "]);function Z(e,t){if(t==="")return 0;let o=e.toLowerCase(),a=t.toLowerCase(),i=o.lastIndexOf("/")+1,s=0,r=0,v=-2;for(let K of a){let u=o.indexOf(K,r);if(u===-1)return null;if(u===v+1)s+=8;if(u===0||Y.has(o[u-1]??""))s+=6;if(u>=i)s+=4;v=u,r=u+1}return s-v*0.01-o.length*0.001}function w(e,t,o){let a=[];for(let[i,s]of e.entries()){let r=Z(o(s),t);if(r!==null)a.push({index:i,item:s,score:r})}return a.toSorted((i,s)=>s.score-i.score||i.index-s.index).map((i)=>i.item)}function q(e){let t=e.args,o=t?.properties;if(!t||!o)return{kind:"none"};let a=Object.keys(o);if(a.length!==1)return{kind:"unsupported"};let i=a[0],s=o[i];if(s.enum)return{kind:"choice",name:i,choices:s.enum.map((r)=>({label:String(r),value:r}))};if(s.type==="boolean")return{kind:"choice",name:i,choices:[{label:"on",value:!0},{label:"off",value:!1}]};return{kind:"unsupported"}}function N(e){return`quick-search-option-${e}`}var D="jx-studio-recent-commands",ee=6;function H(){try{let e=JSON.parse(localStorage.getItem(D)||"[]");return Array.isArray(e)?e.filter((t)=>n(t)):[]}catch{return[]}}function te(e){let t=[e,...H().filter((o)=>o!==e)].slice(0,ee);try{localStorage.setItem(D,JSON.stringify(t))}catch{}}var z=null,x=!1,b="picker",l="",d=0,y=null,j=!1,c=null;function B(){return Xs("popover","quick-search")}function jE(e){z=e??null}function mb(e="files"){x=!0,b=e,l="",d=0,c=null,y=null,m(),ye(),M()}function k(){x=!1,c=null,m()}function Q(){return C?C.projectRoot:null}function W(){return C!=null}function J(){return L(b,l,W())}function U(e){let t=e.split("/");return t.pop(),t.length>0?t.join("/"):""}function ne(e){if(e.startsWith("/home/"))return`~/${e.split("/").slice(3).join("/")}`;return e}async function M(){if(!x||y!==null||j||!W())return;j=!0,m();try{await jt(),y=(await p().searchFiles("",wl())).map((t)=>({kind:"file",path:t.path,name:t.name??t.path.split("/").pop()??"",detail:U(t.path),recent:!1}))}catch{y=[]}j=!1,m()}function oe(e){if(e.trim()==="")return AN(Q()??void 0).map((t)=>({kind:"file",path:t.path,name:t.name,detail:U(t.path),recent:!0}));return w(y??[],e.trim(),(t)=>t.path)}function re(e){let t=Nw().map((o)=>({kind:"project",root:o.root,name:o.name,detail:ne(o.root)}));return w(t,e.trim(),(o)=>`${o.name}/${o.root}`)}function ie(e,t){let o=H(),a=[];for(let r of e.visible()){if(q(r).kind==="unsupported")continue;if(!(r.menus??["palette"]).includes("palette"))continue;a.push({kind:"command",id:r.id,name:`${r.category}: ${r.title}`,detail:e.disabledReason(r.id)??"",chord:e.keymap.formatBinding(r.id)??"",enabled:e.isEnabled(r.id),recent:o.includes(r.id)})}let i=w(a,t.trim(),(r)=>r.name);if(t.trim()!=="")return i;let s=o.map((r)=>i.find((v)=>v.id===r)).filter((r)=>r!==void 0);return[...s,...i.filter((r)=>!s.includes(r))]}function se(e){let t=h.value;if(!t)return[];let o=kh(t.doc.document).map((a)=>({kind:"node",path:a.path,name:wf(a.node)?String(a.node).slice(0,60):kr(a.node),detail:a.nodeType}));return w(o,e.trim(),(a)=>a.name)}function ce(){return S.flatMap((e)=>e.mode==="picker"?[]:[{kind:"mode",mode:e.mode,name:e.chip,detail:e.description,chord:e.prefix}])}function de(e){let t=c,o=t.choices.map((a)=>({kind:"arg",commandId:t.command.id,argName:t.name,value:a.value,name:a.label,detail:`${t.command.title} → ${t.name}`}));return w(o,e.trim(),(a)=>a.name)}function le(){let{mode:e,query:t}=J();if(c)return{rows:de(t),showingRecent:!1};switch(e){case"commands":{let o=ae();return{rows:o?ie(o,t):[],showingRecent:t.trim()===""}}case"nodes":return{rows:se(t),showingRecent:!1};case"projects":return{rows:re(t),showingRecent:t.trim()===""};case"picker":return{rows:ce(),showingRecent:!1};default:return{rows:oe(t),showingRecent:t.trim()===""}}}function pe(e){let t=O.find((o)=>e.startsWith(o.prefix));if(t)b=t.mode,l=e.slice(1);else l=e;if(d=0,e!==l)P().query=e;m(),M()}function me(){b="picker",c=null,d=0,m()}function ue(e){b=e,l="",d=0,m(),M()}function G(e,t){let o=ae();if(!o)return;te(e.id),k(),Tn(o,e.id,t,"Palette")}function A(e){switch(e.kind){case"project":{k(),z?.openRecentProject(e.root);return}case"file":{k(),$b({name:e.name,path:e.path,root:Q()??""}),_i(e.path);return}case"mode":{ue(e.mode);return}case"node":{k(),nt("selection.set",{path:e.path},"Palette");return}case"arg":{G(c.command,{[e.argName]:e.value});return}default:he(e)}}function he(e){let t=ae(),o=t?.get(e.id);if(!t||!o||!e.enabled)return;let a=q(o);if(a.kind==="choice"){c={choices:a.choices,command:o,name:a.name},l="",d=0,m();return}G(o)}function fe(e){let t=e.split(".").pop()?.toLowerCase();if(t==="json")return"file-code";if(t&&Aa(t))return"file-text";return"file"}function ge(e){switch(e.kind){case"project":return"folder-open";case"file":return fe(e.name);case"command":return"play";case"node":return"stack";default:return"caret-right"}}function xe(e,t){if((e.kind==="command"||e.kind==="mode")&&e.chord)return"chord";if(e.kind==="command"&&e.recent)return"recent";return t?"recent":"none"}function be(e){switch(e.kind){case"project":return`project:${e.root}`;case"file":return`file:${e.path}`;case"command":return`command:${e.id}`;case"node":return`node:${e.path.join("/")}`;case"mode":return`mode:${e.mode}`;default:return`arg:${e.value}`}}function ve(e,t){if(j)return"Reading the project's files…";if(t.trim()!=="")return"No results";switch(e){case"projects":return"No recent projects — open one to get started";case"nodes":return"Open a document to jump to its elements";case"commands":return"Type to find any command in Studio";default:return _(e).placeholder}}E("palette",I);var T=null,F=null,f=[];function P(){return T??=g({activate:()=>{let e=f[d];if(e)A(e)},activateRow:(e)=>{let t=f[Number(e)];if(t)A(t)},activeId:"",canClearMode:!1,chipLabel:"",clearMode:me,close:k,emptyHint:"",expanded:!1,hasChip:!1,hover:(e)=>{d=e,P().activeId=N(e)},input:pe,isEmpty:!0,move:(e)=>{if(f.length===0)return;d=Math.max(0,Math.min(d+e,f.length-1)),P().activeId=N(d)},open:!1,placeholder:"",query:"",rows:[],sectionLabel:"",showSection:!1}),T}function ye(){setTimeout(()=>{if(x)B().querySelector('[part="input"]')?.focus()},0)}function m(){let e=P();if(!F)F=R("palette",e,B());if(e.open=x,!x){f=[];return}let{mode:t,query:o}=J(),{rows:a,showingRecent:i}=le(),s=_(t);f=a,e.placeholder=c?`Choose a ${c.name}…`:s.placeholder,e.hasChip=c!==null||t!=="picker",e.chipLabel=c?c.command.title:s.chip,e.query=l,e.canClearMode=l===""&&(c!==null||b!=="picker"),e.rows=a.map((r)=>({chord:(r.kind==="command"||r.kind==="mode")&&r.chord?r.chord:"",detail:r.detail,disabled:r.kind==="command"&&!r.enabled,icon:ge(r),key:be(r),kind:r.kind,name:r.name,trailing:xe(r,i)})),e.expanded=a.length>0,e.activeId=a.length>0?N(d):"",e.isEmpty=a.length===0,e.emptyHint=ve(t,o),e.showSection=i&&a.length>0,e.sectionLabel=c?`${c.command.title} — ${c.name}`:t==="projects"?"Recent projects":t==="commands"?"Recently used":"Recently opened"}
2
- export{jE,mb};
1
+ import{p}from"./studio-xh6rf05g.js";import{jt,Pa,_l}from"./studio-ex1644g2.js";import{Tn,nt,ta}from"./studio-cv6gnjqd.js";import{ae}from"./studio-q509sqt8.js";import{h}from"./studio-s49y6m5b.js";import{jw,UD,Db,_i}from"./studio-ze1sm147.js";import{Ch,Eo,x}from"./studio-zn7ysyzb.js";import{E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n,xf}from"./studio-erjccagy.js";var M={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPalette",$description:'The command palette: a `role="combobox"` field over the kit\'s `jx-listbox`, whose rows are `jx-option`s the host projects. `rows` is the ranked set for the current mode and query; `activeId` is the highlight, and it is ONE string — the id the field points `aria-activedescendant` at and the id the listbox is handed as `active`, so a key moves the caret without the rows reconciling and no row re-decides its own flag. The FIELD is not a `jx-combobox`: this one carries a mode chip inside its box, its Enter runs a command rather than committing a value, and its panel is a centred scrim rather than a popover under a control. Every gesture calls back into panels/quick-search.ts, which owns the modes, the ranking, the recents and what a row does.',tagName:"div",attributes:{part:"palette"},style:{display:"contents",'& [part="overlay"]':{position:"fixed",inset:"0",zIndex:"1000",display:"flex",justifyContent:"center",paddingTop:"60px",background:"rgba(0, 0, 0, 0.4)"},'& [part="overlay"][hidden]':{display:"none"},'& [part="panel"]':{width:"560px",maxWidth:"calc(100vw - 32px)",maxHeight:"420px",display:"flex",flexDirection:"column",alignSelf:"flex-start",background:"var(--jx-bg-overlay)",border:"1px solid var(--jx-border)",borderRadius:"var(--jx-radius-md)",boxShadow:"var(--jx-shadow-dialog)",color:"var(--jx-fg)",fontFamily:"var(--jx-font-sans)",overflow:"hidden"},'& [part="input-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",paddingLeft:"var(--jx-space-4)",background:"var(--jx-bg-input)",borderBottom:"1px solid var(--jx-border)"},'& [part="chip-slot"], & [part="empty-slot"], & [part="section-slot"], & [part="trailing-slot"]':{display:"contents"},'& [part="chip"]':{display:"inline-flex",alignItems:"center",gap:"var(--jx-space-1)",flexShrink:"0",padding:"2px var(--jx-space-1) 2px var(--jx-space-3)",borderRadius:"var(--jx-radius-sm)",background:"var(--jx-accent-solid)",color:"var(--jx-accent-fg)",fontSize:"var(--jx-text-sm)"},'& [part="chip-remove"] > [part="control"]':{color:"inherit",opacity:"0.8",":hover":{opacity:"1",background:"transparent"}},'& [part="input"]':{flex:"1",minWidth:"0",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-4) var(--jx-space-1)",font:"inherit",fontSize:"var(--jx-text-lg)",border:"none",outline:"none",background:"none",color:"var(--jx-fg)","::placeholder":{color:"var(--jx-fg-muted)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="results"]':{$description:"The list is the kit's: a `jx-listbox` of `jx-option`, so the highlight is ONE id — `active`, the same string the field points `aria-activedescendant` at — and the listbox's sidecar is the single writer of every row's `selected`. What this surface still decides is density. The kit's row pads itself by `--jx-space-3`; the other half of the 16px optical margin the panel has always had sits here, on the list, so the heading, the rows and the empty sentence line up on one edge instead of each naming it.",flex:"1",paddingInline:"var(--jx-space-3)"},'& [part="option"] [part="label"]':{fontWeight:"500"},'& [part="option"] [part="description"]':{$description:"A `jx-select` row's note is a category at the END of the row, so the kit pushes it there with an auto margin. A palette row's note is a CONTINUATION of its name — the file's directory, the command's category — and the far edge belongs to the chord, which is how this surface teaches the keyboard it replaced. So the auto margin moves to the end slot.",marginInlineStart:"0"},'& [part="option"] [part="end"]':{marginInlineStart:"auto"},'& [part="option"][aria-disabled="true"]':{$description:"An unavailable command is greyed with its `requires` sentence as the subtitle, and that sentence is the reason the row is on screen at all. The kit fades the whole row to 0.45, which would take a muted grey below any readable contrast — so the row keeps its ink and only the name and the glyph dim.",opacity:"1"},'& [part="option"][aria-disabled="true"] [part="label"], & [part="option"][aria-disabled="true"] [part="icon"]':{opacity:"0.45"},'& [part="chord"]':{flexShrink:"0",fontFamily:"inherit",fontSize:"var(--jx-text-xs)",color:"var(--jx-fg-muted)",border:"1px solid var(--jx-border)",borderRadius:"var(--jx-radius-sm)",padding:"0 5px"},'& [part="option"][aria-selected="true"] [part="chord"]':{color:"inherit",borderColor:"currentColor"},'& [part="badge"]':{fontSize:"var(--jx-text-xs)",padding:"1px var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)",background:"var(--jx-border)",color:"var(--jx-fg-dim)"},'& [part="hint"]':{padding:"var(--jx-space-2) var(--jx-space-5)",borderTop:"1px solid var(--jx-border)",color:"var(--jx-fg-muted)",fontSize:"var(--jx-text-xs)"},'& [part="hint"] kbd':{fontFamily:"inherit",color:"var(--jx-fg-dim)"}},children:[{tagName:"div",attributes:{part:"overlay",hidden:"${state.open ? null : ''}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/close"},value:[]}]},children:[{tagName:"div",attributes:{part:"panel"},onclick:{$prototype:"Function",body:[{stopPropagation:!0}]},children:[{tagName:"div",attributes:{part:"input-row"},children:[{tagName:"span",attributes:{part:"chip-slot",role:"none"},$switch:{$ref:"#/state/hasChip"},cases:{true:{tagName:"span",attributes:{part:"chip"},children:[{tagName:"span",attributes:{part:"chip-label"},textContent:"${state.chipLabel}"},{tagName:"jx-action-button",$props:{label:"Clear mode",hint:"Clear mode (Backspace)",icon:"x",size:"sm"},attributes:{part:"chip-remove"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearMode"},value:[]}]}}]}}},{tagName:"input",attributes:{part:"input",type:"text",role:"combobox","aria-controls":"quick-search-listbox","aria-expanded":"${state.expanded ? 'true' : 'false'}","aria-activedescendant":"${state.activeId || null}","aria-autocomplete":"list","aria-label":"${state.placeholder}",placeholder:"${state.placeholder}"},value:{$ref:"#/state/query"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/input"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{ArrowDown:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/move"},value:[1]}],ArrowUp:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/move"},value:[-1]}],Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/activate"},value:[]}],Escape:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/close"},value:[]}],Backspace:[{$switch:{$ref:"#/state/canClearMode"},cases:{true:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/clearMode"},value:[]}]}}]}}]}}]},{tagName:"jx-listbox",attributes:{part:"results",id:"quick-search-listbox"},$props:{label:"Results",active:"${state.activeId}"},onselect:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activateRow"},value:[{$ref:"event#/detail"}]}],description:"One handler for every row, because a row's `select` bubbles. The detail is the row's `value`, which is the index it occupies in `rows` — the same number a hover names, and the number the id is built from."},children:[{tagName:"div",attributes:{part:"empty-slot",role:"none"},$switch:{$ref:"#/state/isEmpty"},cases:{true:{tagName:"div",attributes:{part:"empty"},textContent:"${state.emptyHint}"}}},{tagName:"div",attributes:{part:"section-slot",role:"none"},$switch:{$ref:"#/state/showSection"},cases:{true:{tagName:"div",attributes:{part:"group-heading"},textContent:"${state.sectionLabel}"}}},{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/key"},map:{tagName:"jx-option",attributes:{part:"option",id:"quick-search-option-${$map.index}","data-kind":"${$map.item.kind}"},$props:{value:"${$map.index}",label:{$ref:"$map/item/name"},description:{$ref:"$map/item/detail"},disabled:{$ref:"$map/item/disabled"}},onmouseenter:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/hover"},value:[{$ref:"$map/index"}]}]},children:[{tagName:"jx-icon",attributes:{slot:"icon"},$props:{name:{$ref:"$map/item/icon"}}},{tagName:"span",attributes:{slot:"end",part:"trailing-slot"},$switch:{$ref:"$map/item/trailing"},cases:{chord:{tagName:"kbd",attributes:{part:"chord"},textContent:"${$map.item.chord}"},recent:{tagName:"span",attributes:{part:"badge"},textContent:"recent"}}}]}}]},{tagName:"div",attributes:{part:"hint"},children:[{tagName:"kbd",textContent:"↑↓"}," move · ",{tagName:"kbd",textContent:"↵"}," run · ",{tagName:"kbd",textContent:"?"}," modes · ",{tagName:"kbd",textContent:">"}," commands · ",{tagName:"kbd",textContent:"@"}," elements"]}]}]}]};var C=[{mode:"files",prefix:"",chip:"Files",placeholder:"Go to a file…",description:"Open a file by any part of its path — pgblog finds pages/blog/index.md."},{mode:"commands",prefix:">",chip:"Commands",placeholder:"Run a command…",description:"Run anything Studio can do, with its keyboard shortcut printed beside it."},{mode:"nodes",prefix:"@",chip:"Symbols",placeholder:"Go to an element in this document…",description:"Select an element in the open document by its Outline name."},{mode:"projects",prefix:"",chip:"Recent Projects",placeholder:"Open a recent project…",description:"Reopen a project you have had open before."},{mode:"picker",prefix:"?",chip:"Modes",placeholder:"Type ? for modes, > for commands, @ for elements…",description:"List these modes."}],X=new Map(C.map((e)=>[e.mode,e])),O=C.filter((e)=>e.prefix!=="");function _(e){return X.get(e)??C[0]}function L(e,t,o){let a=O.find((s)=>t.startsWith(s.prefix));if(a)return L(a.mode,t.slice(1),o);let i=e;if(i==="picker"&&t.trim()!=="")i="files";if(i==="files"&&!o)i="projects";return{mode:i,query:t}}var Y=new Set(["/","-","_","."," "]);function Z(e,t){if(t==="")return 0;let o=e.toLowerCase(),a=t.toLowerCase(),i=o.lastIndexOf("/")+1,s=0,r=0,y=-2;for(let K of a){let u=o.indexOf(K,r);if(u===-1)return null;if(u===y+1)s+=8;if(u===0||Y.has(o[u-1]??""))s+=6;if(u>=i)s+=4;y=u,r=u+1}return s-y*0.01-o.length*0.001}function R(e,t,o){let a=[];for(let[i,s]of e.entries()){let r=Z(o(s),t);if(r!==null)a.push({index:i,item:s,score:r})}return a.toSorted((i,s)=>s.score-i.score||i.index-s.index).map((i)=>i.item)}function q(e){let t=e.args,o=t?.properties;if(!t||!o)return{kind:"none"};let a=Object.keys(o);if(a.length!==1)return{kind:"unsupported"};let i=a[0],s=o[i];if(s.enum)return{kind:"choice",name:i,choices:s.enum.map((r)=>({label:String(r),value:r}))};if(s.type==="boolean")return{kind:"choice",name:i,choices:[{label:"on",value:!0},{label:"off",value:!1}]};return{kind:"unsupported"}}function S(e){return`quick-search-option-${e}`}var D="jx-studio-recent-commands",ee=6;function H(){try{let e=JSON.parse(localStorage.getItem(D)||"[]");return Array.isArray(e)?e.filter((t)=>n(t)):[]}catch{return[]}}function te(e){let t=[e,...H().filter((o)=>o!==e)].slice(0,ee);try{localStorage.setItem(D,JSON.stringify(t))}catch{}}var z=null,g=!1,v="picker",l="",d=0,k=null,j=!1,c=null;function B(){return ta("popover","quick-search")}function YE(e){z=e??null}function yb(e="files"){g=!0,v=e,l="",d=0,c=null,k=null,m(),ye(),N()}function w(){g=!1,c=null,m()}function Q(){return x?x.projectRoot:null}function W(){return x!=null}function J(){return L(v,l,W())}function U(e){let t=e.split("/");return t.pop(),t.length>0?t.join("/"):""}function ne(e){if(e.startsWith("/home/"))return`~/${e.split("/").slice(3).join("/")}`;return e}async function N(){if(!g||k!==null||j||!W())return;j=!0,m();try{await jt(),k=(await p().searchFiles("",_l())).map((t)=>({kind:"file",path:t.path,name:t.name??t.path.split("/").pop()??"",detail:U(t.path),recent:!1}))}catch{k=[]}j=!1,m()}function oe(e){if(e.trim()==="")return UD(Q()??void 0).map((t)=>({kind:"file",path:t.path,name:t.name,detail:U(t.path),recent:!0}));return R(k??[],e.trim(),(t)=>t.path)}function re(e){let t=jw().map((o)=>({kind:"project",root:o.root,name:o.name,detail:ne(o.root)}));return R(t,e.trim(),(o)=>`${o.name}/${o.root}`)}function ie(e,t){let o=H(),a=[];for(let r of e.visible()){if(q(r).kind==="unsupported")continue;if(!(r.menus??["palette"]).includes("palette"))continue;a.push({kind:"command",id:r.id,name:`${r.category}: ${r.title}`,detail:e.disabledReason(r.id)??"",chord:e.keymap.formatBinding(r.id)??"",enabled:e.isEnabled(r.id),recent:o.includes(r.id)})}let i=R(a,t.trim(),(r)=>r.name);if(t.trim()!=="")return i;let s=o.map((r)=>i.find((y)=>y.id===r)).filter((r)=>r!==void 0);return[...s,...i.filter((r)=>!s.includes(r))]}function se(e){let t=h.value;if(!t)return[];let o=Ch(t.doc.document).map((a)=>({kind:"node",path:a.path,name:xf(a.node)?String(a.node).slice(0,60):Eo(a.node),detail:a.nodeType}));return R(o,e.trim(),(a)=>a.name)}function ce(){return C.flatMap((e)=>e.mode==="picker"?[]:[{kind:"mode",mode:e.mode,name:e.chip,detail:e.description,chord:e.prefix}])}function de(e){let t=c,o=t.choices.map((a)=>({kind:"arg",commandId:t.command.id,argName:t.name,value:a.value,name:a.label,detail:`${t.command.title} → ${t.name}`}));return R(o,e.trim(),(a)=>a.name)}function le(){let{mode:e,query:t}=J();if(c)return{rows:de(t),showingRecent:!1};switch(e){case"commands":{let o=ae();return{rows:o?ie(o,t):[],showingRecent:t.trim()===""}}case"nodes":return{rows:se(t),showingRecent:!1};case"projects":return{rows:re(t),showingRecent:t.trim()===""};case"picker":return{rows:ce(),showingRecent:!1};default:return{rows:oe(t),showingRecent:t.trim()===""}}}function pe(e){let t=O.find((o)=>e.startsWith(o.prefix));if(t)v=t.mode,l=e.slice(1);else l=e;if(d=0,e!==l)P().query=e;m(),N()}function me(){v="picker",c=null,d=0,m()}function ue(e){v=e,l="",d=0,m(),N()}function G(e,t){let o=ae();if(!o)return;te(e.id),w(),Tn(o,e.id,t,"Palette")}function A(e){switch(e.kind){case"project":{w(),z?.openRecentProject(e.root);return}case"file":{w(),Db({name:e.name,path:e.path,root:Q()??""}),_i(e.path);return}case"mode":{ue(e.mode);return}case"node":{w(),nt("selection.set",{path:e.path},"Palette");return}case"arg":{G(c.command,{[e.argName]:e.value});return}default:he(e)}}function he(e){let t=ae(),o=t?.get(e.id);if(!t||!o||!e.enabled)return;let a=q(o);if(a.kind==="choice"){c={choices:a.choices,command:o,name:a.name},l="",d=0,m();return}G(o)}function fe(e){let t=e.split(".").pop()?.toLowerCase();if(t==="json")return"file-code";if(t&&Pa(t))return"file-text";return"file"}function ge(e){switch(e.kind){case"project":return"folder-open";case"file":return fe(e.name);case"command":return"play";case"node":return"stack";default:return"caret-right"}}function xe(e,t){if((e.kind==="command"||e.kind==="mode")&&e.chord)return"chord";if(e.kind==="command"&&e.recent)return"recent";return t?"recent":"none"}function be(e){switch(e.kind){case"project":return`project:${e.root}`;case"file":return`file:${e.path}`;case"command":return`command:${e.id}`;case"node":return`node:${e.path.join("/")}`;case"mode":return`mode:${e.mode}`;default:return`arg:${e.value}`}}function ve(e,t){if(j)return"Reading the project's files…";if(t.trim()!=="")return"No results";switch(e){case"projects":return"No recent projects — open one to get started";case"nodes":return"Open a document to jump to its elements";case"commands":return"Type to find any command in Studio";default:return _(e).placeholder}}E("palette",M);var T=null,F=null,f=[];function P(){return T??=b({activate:()=>{let e=f[d];if(e)A(e)},activateRow:(e)=>{let t=f[Number(e)];if(t)A(t)},activeId:"",canClearMode:!1,chipLabel:"",clearMode:me,close:w,emptyHint:"",expanded:!1,hasChip:!1,hover:(e)=>{d=e,P().activeId=S(e)},input:pe,isEmpty:!0,move:(e)=>{if(f.length===0)return;d=Math.max(0,Math.min(d+e,f.length-1)),P().activeId=S(d)},open:!1,placeholder:"",query:"",rows:[],sectionLabel:"",showSection:!1}),T}function ye(){setTimeout(()=>{if(g)B().querySelector('[part="input"]')?.focus()},0)}function m(){let e=P();if(!F)F=I("palette",e,B());if(e.open=g,!g){f=[];return}let{mode:t,query:o}=J(),{rows:a,showingRecent:i}=le(),s=_(t);f=a,e.placeholder=c?`Choose a ${c.name}…`:s.placeholder,e.hasChip=c!==null||t!=="picker",e.chipLabel=c?c.command.title:s.chip,e.query=l,e.canClearMode=l===""&&(c!==null||v!=="picker"),e.rows=a.map((r)=>({chord:(r.kind==="command"||r.kind==="mode")&&r.chord?r.chord:"",detail:r.detail,disabled:r.kind==="command"&&!r.enabled,icon:ge(r),key:be(r),kind:r.kind,name:r.name,trailing:xe(r,i)})),e.expanded=a.length>0,e.activeId=a.length>0?S(d):"",e.isEmpty=a.length===0,e.emptyHint=ve(t,o),e.showSection=i&&a.length>0,e.sectionLabel=c?`${c.command.title} — ${c.name}`:t==="projects"?"Recent projects":t==="commands"?"Recently used":"Recently opened"}
2
+ export{YE,yb};
3
3
 
4
- //# debugId=F78126B5DB3BC80364756E2164756E21
5
- //# sourceMappingURL=studio-5n193zqd.js.map
4
+ //# debugId=9E53E9012ED9D6E264756E2164756E21
5
+ //# sourceMappingURL=studio-7qr8k0v2.js.map
@@ -1,5 +1,5 @@
1
- function m(s,n={}){let t=n.baseMs??1000,o=n.maxMs??30000,i=n.random??Math.random,e=Math.min(o,t*2**Math.max(0,s));return e/2+i()*e/2}function Qy(s,n={}){let t=n.win??(typeof window>"u"?void 0:window),o=n.doc??(typeof document>"u"?void 0:document),i=0,e=null,r=!1,a=()=>{if(e=null,!r)s()},c=()=>{if(r||e===null)return;clearTimeout(e),i=0,a()},u=(d)=>{if(d.persisted)c()},l=()=>{if(o?.visibilityState==="visible")c()};return t?.addEventListener("online",c),t?.addEventListener("pageshow",u),o?.addEventListener("visibilitychange",l),{dispose(){if(r)return;if(r=!0,e!==null)clearTimeout(e),e=null;t?.removeEventListener("online",c),t?.removeEventListener("pageshow",u),o?.removeEventListener("visibilitychange",l)},opened(){i=0},scheduleRetry(){if(r||e!==null)return;let d=m(i,n);i+=1,e=setTimeout(a,d)},wake:c}}
2
- export{Qy};
1
+ function m(s,n={}){let t=n.baseMs??1000,o=n.maxMs??30000,i=n.random??Math.random,e=Math.min(o,t*2**Math.max(0,s));return e/2+i()*e/2}function ow(s,n={}){let t=n.win??(typeof window>"u"?void 0:window),o=n.doc??(typeof document>"u"?void 0:document),i=0,e=null,r=!1,a=()=>{if(e=null,!r)s()},c=()=>{if(r||e===null)return;clearTimeout(e),i=0,a()},u=(d)=>{if(d.persisted)c()},l=()=>{if(o?.visibilityState==="visible")c()};return t?.addEventListener("online",c),t?.addEventListener("pageshow",u),o?.addEventListener("visibilitychange",l),{dispose(){if(r)return;if(r=!0,e!==null)clearTimeout(e),e=null;t?.removeEventListener("online",c),t?.removeEventListener("pageshow",u),o?.removeEventListener("visibilitychange",l)},opened(){i=0},scheduleRetry(){if(r||e!==null)return;let d=m(i,n);i+=1,e=setTimeout(a,d)},wake:c}}
2
+ export{ow};
3
3
 
4
- //# debugId=4365CBD5361E35B064756E2164756E21
5
- //# sourceMappingURL=studio-0x6f3nk9.js.map
4
+ //# debugId=70E2AF39E9E88F0E64756E2164756E21
5
+ //# sourceMappingURL=studio-8ncm9zwx.js.map
@@ -0,0 +1,7 @@
1
+ import{Wt,bl,xy,an,xn,ia,Kn,Da,wh,Z,Jd,Xd,fi,g,h,pn,Co,ng,f1,sc,ig,rg,td,w1,h_,IR,Qd,Ft,Ry}from"./studio-s49y6m5b.js";import{w,xl}from"./studio-bk0anq3b.js";import{tu,ef}from"./studio-x5py815g.js";import{p}from"./studio-xh6rf05g.js";import{CA,fl,Rx,u,sy}from"./studio-1d8m5s38.js";import{ae}from"./studio-q509sqt8.js";import{zu,Jl}from"./studio-ep1384t9.js";import{Tn,nt,Kr,i1}from"./studio-cv6gnjqd.js";import{Vt}from"./studio-w3aafbpk.js";import{Kl,T0,Ib,LD,ST,CT,kT,ET}from"./studio-pte5w7rf.js";import{aa,Ot}from"./studio-z6s56dzz.js";import{Ep,Rm,ks,QD,Tp}from"./studio-15mfah02.js";import{ll}from"./studio-j3bq30yz.js";import{bt,Yb,ec,Vc,oh,Op,EC,ji}from"./studio-aaw7wxv8.js";import{ml,zo,Zs,Xs,Uo}from"./studio-czpmzs9r.js";import{Zl,Nm,Rp}from"./studio-ek4fb4eb.js";import{ju,iT}from"./studio-zkkt13qd.js";import{_i}from"./studio-ze1sm147.js";import{mT}from"./studio-nngc45ct.js";import{qs,sl}from"./studio-6mf31e16.js";import{Xc}from"./studio-w4mfaaam.js";import{tf,x,wn,wl}from"./studio-zn7ysyzb.js";import{hf,E,I}from"./studio-1a7zshnv.js";import{Me,v_}from"./studio-bmwgj8ez.js";import{me,te,b}from"./studio-9f5vcb4w.js";import{n,qe,m}from"./studio-erjccagy.js";import{ce}from"./studio-7qqb7hb8.js";var je={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEmptyState",$description:"The one empty-state pattern (studio-ui-guidelines.md §11), as the document every region draws it from. Nine surfaces had already copied it into their own JSON — the Source Control panel's (since folded into `publish-workspace.json`), `logic-panel.json`, `panel-outline.json` and the rest each carry a `[part=\"empty\"]` block written from the same rules — because `panels/empty-state.ts` is a lit template a document cannot call. This is the copy those were waiting for: the region that has NO document of its own hands its box to this one instead of rendering the helper, so a shell with three surfaces still lit and eight converted has one empty state rather than two. The copy rules stay where they are stated, in `panels/empty-state.ts`'s header: one sentence saying what the region is FOR, the action that fills it, and one shared verb across equivalent surfaces. Nothing here decides any of them — the adapter is handed a message, an optional second sentence and a list of buttons, and this draws exactly that.",tagName:"div",attributes:{part:"empty","data-compact":"${state.compact ? '' : null}"},style:{$description:"What `.empty-state`, `.empty-state--teach`, `.empty-state-message`, `.empty-state-detail`, `.empty-state-actions`, `.empty-state-action` and the `--compact` pair said across `styles/overlays.css` and `styles/panels.css`, keyed on `part`. Neither stylesheet loses its rules: `ui/expression-editor.ts` still renders the lit helper for its own compact state, so this is a copy until that surface converts. Two values did not travel. `.empty-state`'s `font-size: 13px` was a number nothing else in the shell uses and is the kit's `--jx-text-md`; `.empty-state-detail`'s `var(--spectrum-font-size-50, 11px)` resolves only inside `<sp-theme>`, and a document mounted into a Navigator body or a canvas stage is outside it, so it would silently have taken its hard-coded fallback on every paint — it is `--jx-text-sm`, which is the step it was.",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",'& [part="empty-message"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{$description:"The second sentence: where the region's content comes from. Dimmer than the first, because the first is the one a reader has to take in.",margin:"0",maxWidth:"34ch",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",opacity:"0.8"},'& [part="empty-actions"]':{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"var(--jx-space-3)"},'& [part="empty-action"]':{flex:"none"},"&[data-compact]":{$description:"An inline section inside an otherwise populated panel — tighter and left-aligned, because it sits directly above its own add form rather than filling a region on its own.",alignItems:"flex-start",gap:"var(--jx-space-2)",padding:"var(--jx-space-3) var(--jx-space-4)",textAlign:"left",fontSize:"var(--jx-text-sm)"},'&[data-compact] [part="empty-actions"]':{justifyContent:"flex-start"}},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.message}"},{tagName:"div",attributes:{part:"empty-detail-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDetail"},cases:{true:{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.detail}"}}},{tagName:"div",attributes:{part:"empty-actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasActions"},cases:{true:{tagName:"div",attributes:{part:"empty-actions"},children:[{$prototype:"Array",items:{$ref:"#/state/actions"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"empty-action"},$props:{size:"sm",variant:"secondary",disabled:{$ref:"$map/item/disabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}}}]};E("empty-state",je);function Tt(e){let t=document.createElement("div");t.style.display="contents";let a=[],r=b({...Ce(e),runAction:(s)=>{a[Number(s)]?.()}});a=Oe(e);let i=null,o=!1;return I("empty-state",r,t).then((s)=>{if(o){s.dispose();return}i=s}),{dispose(){o=!0,i?.dispose(),i=null,t.replaceChildren()},host:t,update(s){a=Oe(s),Object.assign(r,Ce(s))}}}function Ce(e){let t=e.actions??[];return{actions:t.map((a,r)=>({disabled:Boolean(a.disabled),id:String(r),label:a.label})),compact:Boolean(e.compact),detail:e.detail??"",hasActions:t.length>0,hasDetail:(e.detail??"")!=="",message:e.message}}function Oe(e){return(e.actions??[]).map((t)=>t.run)}var Fe=new WeakMap;function Mu(e,t){let a=Fe.get(e);if(a)return a.update(t),a.host;let r=Tt(t);return Fe.set(e,r),r.host}var kt=new Set(["entry"]);function cb(e){let t=bl(e.id);if(t)return t;let a=e.session.ui.canvasMode;if(a==="git-diff")return"publish";if(a==="media"||a==="image")return"media";if(kt.has(a))return"content";let r=Zl(e.id);if(r)return r.kind==="data"?"design":"content";if(e.documentPath===an)return"styles";return Kn(e.documentPath)?"content":"design"}var Et=new Set(["edit","design","stylebook"]);function kE(e){return e.documentPath!==null&&Zl(e.id)===null&&Et.has(e.session.ui.canvasMode)}function Ac(e,t=u.workspace){let a=g.tabs.get(e);return a!==void 0&&cb(a)===t}function ne(e,t=u.workspace){return e.tabOrder.filter((a)=>Ac(a,t))}function IN(e){let t=g.mruOrder.find((a)=>Ac(a,e));if(t)return t;for(let a of g.panes){let r=a.tabOrder.find((i)=>Ac(i,e));if(r)return r}return null}function EE(e,t){if(e.activeTabId&&Ac(e.activeTabId,t))return e.activeTabId;return g.mruOrder.find((a)=>e.tabOrder.includes(a)&&Ac(a,t))??e.tabOrder.find((a)=>Ac(a,t))??null}var Le={$schema:"https://jxsuite.com/schema/v1",$id:"StudioTabStrip",$description:"One pane's tab strip, as a Jx document over the kit: a real `tablist` of `jx-tab`s, or — for a pane that owns no document — the derivation chip naming what it is a projection of, and in both cases one trailing button. `panels/tab-strip.ts` keeps every decision: which pane a host is drawing, what each tab is called (the shortest unique suffix, and a page's ROUTE), what its tooltip says, whether closing it needs a prompt, what the overflow chevron lists and what the context menu offers. This document owns the markup, the ARIA, the keyboard and the style, and it holds THREE things the old chip drew by hand and the kit now draws: the tab's own selected state (`aria-selected`, not an `.active` class), its close button, and its dirty dot. The three that are Studio's alone go in `jx-tab`'s slots — the drill-in marker in `icon`, the hold pill in `status`, the pin toggle in `actions` (ui.md §5.4) — which is the gap that kept this strip out of the tab pattern until now. **Drag is `@atlaskit/pragmatic-drag-and-drop`, not native HTML5 DnD**: a chip carries no `draggable` attribute and no `ondrag*` handler, because `panels/tab-strip.ts` registers every chip and every strip as a pragmatic source/target through `onNodeCreated` and resolves a completed drag in `panels/tab-drop.ts`. What is left here is three SCOPE comparisons, exactly as `files-panel.json` marks a row under drag: `data-dragging` on the chip being carried, `data-drop` on the chip a drop would land beside, `data-drop-tail` on the strip when the drop is its empty tail.",tagName:"div",attributes:{part:"strip-row","data-focused":"${state.focused ? '' : null}",hidden:"${state.mode === 'empty' ? '' : null}"},onmousedown:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/focusPane"},value:[]}]},style:{$description:"`styles/shell.css`'s `.tab-strip*` rules and `styles/canvas.css`'s pane-state rules, keyed on `part` and carried in. What did NOT come with them is the point: the chip's own hover, its selected underline, its close button and its dirty dot are `jx-tab`'s, and the strip's flex row and hairline are `jx-tabs`'s. What is left here is the pane strip's own shape — the scroll container the chevron exists for, the 11px type of a chrome row, the states the PANE model adds (pinned, preview, dragging, an unfocused pane's dimmed underline), and the three slotted marks.",display:"flex",alignItems:"stretch",minWidth:"0",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontFamily:"var(--jx-font-sans)","&[hidden]":{display:"none"},'& [part="tabs"]':{$description:"`.tab-strip`. The kit's strip draws its own hairline; the ROW draws this one, so the strip's is taken off rather than doubled. The scrollbar is hidden by design — the wheel handler is a mouse affordance and the chevron is the pointer-independent route to the same tabs — so `overflow-x: auto` here is a scrolling box with no visible bar.",flex:"1 1 auto",minWidth:"0",gap:"0",padding:"0 var(--jx-space-2)",border:"0",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none",fontSize:"var(--jx-text-sm)","&::-webkit-scrollbar":{display:"none"}},'& [part="tabs"][data-drop-tail]::after':{$description:"The strip's own tail target: a drop onto the empty space after the last chip, or onto a pane whose strip carries no chips at all — an empty pane made a target during a drag by `panels/tab-strip.ts`'s `project`. A fixed-width bar rather than a background tint, so it reads the same as a chip's own `data-drop` edge instead of a second visual language for the same gesture.",content:'""',flex:"0 0 2px",alignSelf:"stretch",background:"var(--accent)"},'& [part="tab"]':{$description:"`.tab-strip-tab`. The kit's tab caps itself at 220px and reserves a control's height; a chrome row is tighter than that and its labels are the shortest unique suffix, so both are re-declared. `flex-shrink: 0` is what makes the strip scroll rather than squeeze fifteen documents into one width.",gap:"var(--jx-space-1)",padding:"4px var(--jx-space-2)",minHeight:"0",maxWidth:"none",flexShrink:"0",marginBlockEnd:"0",color:"var(--fg-dim)",cursor:"pointer",":hover":{color:"var(--fg)",background:"var(--hover-bg)"},'&[aria-selected="true"]':{color:"var(--fg)",borderBlockEndColor:"var(--accent)"},"&[data-dragging]":{opacity:"0.4"},"&[data-drop]":{$description:"The chip a drop would land BESIDE. An inset shadow rather than a border, so the indicator draws no layout shift mid-drag — the same reason `files-panel.json`'s row indicators are backgrounds rather than borders.",boxShadow:"inset 2px 0 0 var(--accent)"}},'& [part="tab"] [part="label"]':{maxWidth:"140px"},'& [part="tab"][data-preview] [part="label"]':{fontStyle:"italic"},'&:not([data-focused]) [part="tab"][aria-selected="true"]':{$description:"The unfocused pane's strip still says which of ITS documents is current, in a colour that does not compete with the pane holding the keyboard.",borderBlockEndColor:"var(--border)"},'& [part="tab"] [part="close"]':{$description:"`.tab-strip-close`'s reveal, applied to the kit's own close button: a row of fifteen ✕ glyphs is noise, so the affordance appears on the tab under the pointer and on the current one. The button keeps its own 24px target either way (SC 2.5.8) — this moves no pixel of layout.",opacity:"0"},'& [part="tab"]:hover [part="close"], & [part="tab"][aria-selected="true"] [part="close"]':{opacity:"1"},'& [part="origin"]':{$description:"`.tab-strip-origin` — the drill-in marker, in `jx-tab`'s icon slot. Hidden from assistive technology by the document that writes it: a reader hears where a document was opened from in the tooltip, and an arrow announced beside a file name says nothing.",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"1"},'& [part="pill"]':{$description:'`.entry-pill` — the hold pill (site-architecture.md §7.6), in `jx-tab`\'s status slot. It is ON THE CHIP and not only inside the entry editor because the mistake it prevents, publishing something you believed was private, is made while glancing at a row of tabs. "Published" is deliberately as visible as "Draft": a state you can only see one half of is a state you cannot check. The two Spectrum colours it used to name are `--jx-signal` against `--jx-bg`, which flips with the theme where a fixed yellow and a fixed black did not.',padding:"0 5px",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"15px",whiteSpace:"nowrap"},'& [part="pill"][data-held]':{background:"var(--jx-signal)",color:"var(--jx-bg)"},'& [part="pin"]':{$description:"`.tab-strip-pin`, in `jx-tab`'s actions slot, on the current chip and on a pinned one (the rule below). A click on it never also selects the tab, and that is the KIT's doing now rather than a `stopPropagation` this document has to remember: `jx-tab` stops a click inside its actions slot exactly as it stops one on its own close button.",display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",padding:"0",border:"none",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-md)",lineHeight:"1",borderRadius:"var(--radius)",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-1px"}},'& [part="tab"]:not([aria-selected="true"]):not([data-pinned]) [part="pin"]':{$description:"An inactive, unpinned chip draws no pin and keeps no box for one. It was `opacity: 0` here and revealed on hover, so the invisible button still took 16px of the chip and every click on it: the centre of a short chip (the Media home's, beside its viewer tab) was the pin, so the click toggled a pin nobody could see and the tab did not activate. A box that takes clicks is a control, and a control is either shown or absent. The current chip shows its pin, a pinned chip shows its mark, and any chip pins from its context menu (`document.togglePinned`).",display:"none"},'& [part="tab"][data-pinned] [part="pin"]':{color:"var(--accent)"},'& [part="derivation"]':{$description:"A LENS pane's strip: one chip naming the projection and the document it projects, where an ordinary pane draws tab chips. It is not a tab and must not look like one — no close ✕ of its own, because a lens owns no document to close. Its vertical box is a tab chip's, `4px` top and bottom plus the 2px underline `[part=\"tab\"]` reserves, so the lens's one-chip row sits on the same baseline grid as the tab row in the pane beside it; `tab-strip.test.ts` compares the two declarations rather than the two boxes, because happy-dom lays nothing out and a 19px strip against a 28px one is the class of defect only a picture catches. Horizontally it is 10px rather than a chip's 8px: this row is one chip wide with nothing to sit beside, and a chip's tighter inset exists so several of them read as a series.",display:"flex",flex:"1 1 auto",alignItems:"baseline",gap:"6px",minWidth:"0",padding:"4px 10px",borderBottom:"2px solid transparent",whiteSpace:"nowrap",overflow:"hidden"},'& [part="preset"]':{color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="subject"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",textOverflow:"ellipsis",overflow:"hidden"},'& [part="overflow"]':{$description:"`.tab-strip-overflow`. It sits OUTSIDE the scrolling strip, so it stays reachable at any scroll offset — which is the whole point of it. One button draws both trailing affordances, because they are the same control in the same place: the chevron that lists the tabs currently out of view, and, on a derived pane, the ✕ that is a lens's only exit.",flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",width:"22px",padding:"0",border:"none",borderLeft:"1px solid var(--border)",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-lg)",lineHeight:"1",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="overflow"][hidden]':{display:"none"}},children:[{$description:"One row draws one pane, and a pane is either a set of open documents or a projection of somebody else's. A third answer — a pane with neither — draws nothing at all, which is the case with no branch here: the row itself is `hidden`.",tagName:"div",attributes:{part:"body"},style:{$description:"The switch container generates no box: the branch inside it IS the row's flex item, so a lens chip and a tab strip sit at the same depth and take the same `flex` the row gives them.",display:"contents"},$switch:{$ref:"#/state/mode"},cases:{tabs:{tagName:"jx-tabs",attributes:{part:"tabs",label:"${state.stripLabel}",selected:"${state.active}","data-drop-tail":"${state.dropTail ? '' : null}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"event#/detail"}]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"event#/detail"}]}]},onwheel:{$ref:"#/state/wheel"},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"tab","data-tab":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",title:"${$map.item.title}",closable:"",dirty:"${$map.item.dirty ? '' : null}","data-pinned":"${$map.item.pinned ? '' : null}","data-preview":"${$map.item.preview ? '' : null}","data-dragging":"${state.dragKey === $map.item.key ? '' : null}","data-drop":"${state.dropIndex === $map.item.index ? '' : null}"},ondblclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/promote"},value:[{$ref:"$map/item/key"}]}]},onauxclick:{$prototype:"Function",body:[{if:{operator:"===",target:{$ref:"event#/button"},value:1},then:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"$map/item/key"}]}]}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/context"},value:[{$ref:"$map/item/key"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{$description:"The drill-in marker: this document was opened FROM another one. `jx-tab`'s icon slot draws it before the label, which is where it has always been.",tagName:"span",attributes:{slot:"icon",part:"origin","aria-hidden":"true",hidden:"${$map.item.origin ? null : ''}"},textContent:"↳"},{$description:"The hold pill. It is a `<span>` in the status slot rather than a mounted document of its own, which is what kept it a lit fragment inside `content/entry-editor.ts` until the strip converted: a document mounted per chip would be an async mount inside a synchronous rebuild. `entryHoldPill` states the two facts; this draws them.",tagName:"span",attributes:{slot:"status",part:"pill",title:"${$map.item.pillTitle}","data-held":"${$map.item.held ? '' : null}",hidden:"${$map.item.pill ? null : ''}"},textContent:"${$map.item.pill}"},{$description:"The pin, in the actions slot. `title` is the whole accessible name (studio-ui-guidelines.md §10): the glyph is hidden, so a matching `aria-label` would announce it twice. `tabindex` follows the tab's own selectedness, exactly as the close button's does — the strip is ONE stop in the tab order, and a control inside every chip that took the platform's default would make fifteen.",tagName:"button",attributes:{slot:"actions",part:"pin",type:"button",title:"${$map.item.pinTitle}",tabindex:"${$map.item.tabindex}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePin"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",attributes:{part:"pin-glyph","aria-hidden":"true"},textContent:"${$map.item.pinGlyph}"}]}]}}]},derivation:{$description:`THE CHIP FINISHES ITS OWN SENTENCE, and both halves are the flow's: two of the presets are labelled with an unfinished phrase — "Same page at", "Same page in" — because the interesting half is the value, and a chip whose source pane shows nothing says "no document" rather than trailing off.`,tagName:"div",attributes:{part:"derivation",title:"${state.chipTitle}"},children:[{tagName:"span",attributes:{part:"preset"},textContent:"${state.preset}"},{tagName:"span",attributes:{part:"subject"},textContent:"${state.subject}"}]}}},{tagName:"button",attributes:{part:"overflow",type:"button",title:"${state.trailingTitle}",hidden:"${state.trailing ? null : ''}"},onclick:{$prototype:"Function",body:[{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/openTrailing"},value:[{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",attributes:{part:"overflow-glyph","aria-hidden":"true"},textContent:"${state.trailingGlyph}"}]}]};E("tab-strip",Le);function Nt(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Ht(e){let t=e?.$map,a=m(t)?t.item:void 0,r=m(a)?a.key:void 0;return n(r)?r:""}function Ae(e,t,a){let r=b({...t,...a,dragKey:"",dropIndex:-1,dropTail:!1});e.replaceChildren();let i=null,o=!1,s=null;return I("tab-strip",r,e,{onNodeCreated:(l,c,d,f)=>{if(o||!(l instanceof HTMLElement))return;let y=Nt(d);if(y==="tabs"){s=l,a.stripHost(l);return}if(y==="tab"){let S=Ht(f);if(S)a.chipHost(l,S)}}}).then((l)=>{if(o){l.dispose();return}i=l}),{dispose(){o=!0,i?.dispose(),i=null,s=null,e.replaceChildren()},drag(l){r.dragKey=l.dragKey,r.dropIndex=l.dropIndex,r.dropTail=l.dropTail},strip:()=>s,update(l){r.focused=l.focused,r.stripLabel=l.stripLabel,r.active=l.active,r.tabs=l.tabs,r.preset=l.preset,r.subject=l.subject,r.chipTitle=l.chipTitle,r.trailing=l.trailing,r.trailingTitle=l.trailingTitle,r.trailingGlyph=l.trailingGlyph,r.mode=l.mode}}}function De(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),a.push.apply(a,r)}return a}function Re(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?De(Object(a),!0).forEach(function(r){ml(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):De(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}var It={top:function e(t,a){return Math.abs(a.y-t.top)},right:function e(t,a){return Math.abs(t.right-a.x)},bottom:function e(t,a){return Math.abs(t.bottom-a.y)},left:function e(t,a){return Math.abs(a.x-t.left)}};function fe(e,t){var a,r,{element:i,input:o,allowedEdges:s}=t,l={x:o.clientX,y:o.clientY},c=i.getBoundingClientRect(),d=s.map(function(y){return{edge:y,value:It[y](c,l)}}),f=(a=(r=d.sort(function(y,S){return y.value-S.value})[0])===null||r===void 0?void 0:r.edge)!==null&&a!==void 0?a:null;return Re(Re({},e),{},ml({},re,f))}function he(e){var t;return(t=e[re])!==null&&t!==void 0?t:null}var re=Symbol("closestEdge");function _e(e){var{startIndex:t,closestEdgeOfTarget:a,indexOfTarget:r,axis:i}=e;if(t===-1||r===-1)return t;if(t===r)return t;if(a==null)return r;var o=i==="vertical"&&a==="bottom"||i==="horizontal"&&a==="right",s=t<r;if(s)return o?r:r-1;return o?r+1:r}function Pu(e){return m(e)&&(e.type==="tab"||e.type==="file-tree"&&e.entryType==="file")}function ge(e,t,a){if(pn(t)?.derived)iT(t);if(!Ry(e,t,a))return;td(e),Ft(e)}async function jt(e,t,a){let r=[...g.tabs.values()].find((o)=>o.documentPath===e);if(r){ge(r.id,t,a);return}await _i(e,{focus:!0,paneId:t});let i=[...g.tabs.values()].find((o)=>o.documentPath===e);if(i)ge(i.id,t,a)}function Je(e,t){if(e.tabId===void 0)return e.index;return t==="left"?e.index:e.index+1}async function Mt(e,t){let a=he(t);if(e.type==="tab"){if(e.paneId===t.paneId){let r=pn(t.paneId);if(!r)return;let i=r.tabOrder.indexOf(e.tabId);if(i===-1)return;let o=t.tabId===void 0?r.tabOrder.length-1:_e({axis:"horizontal",closestEdgeOfTarget:a,indexOfTarget:t.index,startIndex:i});if(o!==i)IR(e.tabId,o);return}ge(e.tabId,t.paneId,Je(t,a));return}await jt(e.path,t.paneId,Je(t,a))}async function Ct(e,t){if(e.type==="tab"){if(f1(e.tabId))td(e.tabId);return}let a=sc(t.paneId);if(await _i(e.path,{paneId:a.id}),![...g.tabs.values()].some((i)=>i.documentPath===e.path)&&rg(a))ig(a.id)}async function Ve(e,t){if(!t||!Pu(e.data))return;let a=e.data;if(t.data.type==="tab-slot"){await Mt(a,t.data);return}if(t.data.type==="pane-edge")await Ct(a,t.data)}var we=null,ie=null,z=new Map,_=new Map,k=new Map,L=new Map,O=new Map,J=null,j=null,N=null,U=new Map,oe=new Map,ve=null;function Lt(e){return`pane.${e}/tabs`}function At(e){return hf(Lt(e.id))??we}function NN(e){Dt(),we=e,ve=Xs({onDragStart({source:t}){if(!Pu(t.data))return;j=t.data.type==="tab"?{kind:"tab",tabId:t.data.tabId}:{kind:"file",path:t.data.path},be(),ye()},onDrag({location:t}){if(!j)return;let[a]=t.current.dropTargets,r=a?.data;N=r?.type==="tab-slot"?{index:r.tabId===void 0?-1:r.index,paneId:r.paneId,tail:r.tabId===void 0}:null,ye()},onDrop({location:t,source:a}){if(!Pu(a.data))return;let[r]=t.current.dropTargets;j=null,N=null,ye(),be(),Ve(a,r)}}),ie=me(),ie.run(()=>{te(()=>{g.activePaneId;for(let t of g.panes)t.id,t.tabOrder,t.activeTabId;u.workspace;for(let t of g.tabs.values()){t.session.ui.canvasMode,t.doc.dirty,ll(t),t.documentPath,t.pinned,t.preview,t.session.openedFrom;for(let a of QD(sl(t.documentPath)?.def))t.doc.content.frontmatter[a]}w1(),be()})})}function Dt(){Jt(),Se(),ze(),ie?.stop(),ie=null,ve?.(),ve=null;for(let e of k.keys())$e(e);for(let e of k.values())e.dispose();k.clear(),L.clear(),we=null,j=null,N=null,z.clear(),O.clear(),_.clear()}function $e(e){let t=U.get(e);if(t){for(let a of t.values())a();U.delete(e)}oe.get(e)?.(),oe.delete(e)}function be(){let e=sy(),t=new Map;for(let r of g.panes){let i=At(r);if(i&&(!t.has(i)||ng(r.id)))t.set(i,r)}let a=new Set;for(let[r,i]of t){if(e||i.derived)Rt(i,r);_.set(i.id,r),a.add(i.id)}for(let[r,i]of _){if(a.has(r))continue;if(_.delete(r),z.delete(r),O.delete(r),!t.has(i))$e(i),k.get(i)?.dispose(),k.delete(i),L.delete(i)}}function Rt(e,t){let a=We(e);L.set(t,{mode:a.mode,paneId:e.id});let r=k.get(t);if(r)r.update(a);else k.set(t,Ae(t,a,Ut(t)));if(Xt(t,a),k.get(t)?.strip()&&e.activeTabId!==z.get(e.id))z.set(e.id,e.activeTabId),le.add(t);_t(t)}var V=new Map,le=new Set;function _t(e){if(V.has(e))return;V.set(e,requestAnimationFrame(()=>{V.delete(e);let t=F(e);if(t&&sy())zt(t,e);le.delete(e)}))}function Jt(){for(let e of V.values())cancelAnimationFrame(e);V.clear(),le.clear()}function zt(e,t){let a=k.get(t)?.strip();if(a&&le.has(t))[...a.children].find((r)=>r instanceof HTMLElement&&r.dataset.tab===e.activeTabId)?.scrollIntoView({block:"nearest",inline:"nearest"});Zt(e,t)}function F(e){let t=L.get(e)?.paneId;return g.panes.find((a)=>a.id===t)??null}function Ut(e){return{activate:(t)=>{Ft(t)},chipHost:(t,a)=>{Kt(e,t,a)},closeTab:(t)=>{db(t)},context:(t,a,r)=>{let i=g.tabs.get(t);if(i)la(i,a,r)},focusPane:()=>{Co(F(e)?.id??fi)},openTrailing:(t)=>{Qt(e,t)},promote:(t)=>{td(t)},stripHost:(t)=>{Yt(e,t)},togglePin:(t)=>{let a=g.tabs.get(t);if(a)h_(t,!a.pinned)},wheel:(t,a)=>{ea(a)}}}function Bt(e,t){let a=ae(),r=bt(e.id)??bt(t.sourcePaneId),i=t.kind==="lens"&&t.preset==="breakpoint"?`${ju.breakpoint} ${t.media?ji(t.media):"Base"}`:t.kind==="companion"&&t.preset==="locale"?`${ju.locale} ${t.locale?Wt(t.locale):"—"}`:ju[t.preset],o=r?Ld(r):"no document";return{active:"",chipTitle:`${i} · ${r?.documentPath??"no document"}`,focused:ng(e.id),mode:"derivation",preset:i,stripLabel:se(e),subject:o,tabs:[],trailing:!0,trailingGlyph:"✕",trailingTitle:a?.get("pane.unsplit")?.title??"Close Side Pane"}}function se(e){return e.id===fi?"Open documents":"Open documents in the side pane"}function Gt(e){return{active:"",chipTitle:"",focused:ng(e.id),mode:"empty",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"",trailingTitle:""}}function We(e){let{derived:t}=e,a=ne(e);if(t&&a.length===0)return Bt(e,t);if(a.length===0){if(j)return{active:"",chipTitle:"",focused:ng(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"};return z.set(e.id,null),O.set(e.id,!1),Gt(e)}let r=Ue(e);return{active:e.activeTabId??"",chipTitle:"",focused:ng(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:a.flatMap((i)=>qt(e,i,e.tabOrder.indexOf(i),r)),trailing:O.get(e.id)===!0,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"}}function qt(e,t,a,r){let i=g.tabs.get(t);if(!i)return[];let o=LD(i);return[{dirty:i.doc.dirty||ll(i),held:o?.held??!1,index:a,key:t,label:r.get(t)??"Untitled",origin:Boolean(i.session.openedFrom),pill:o?.text??"",pillTitle:o?.title??"",pinGlyph:i.pinned?"◉":"◎",pinTitle:i.pinned?"Unpin":"Pin",pinned:i.pinned,preview:i.preview,tabindex:t===e.activeTabId?"0":"-1",title:ca(i)}]}function Kt(e,t,a){let r=U.get(e);if(!r)r=new Map,U.set(e,r);r.get(a)?.();let i=zo(Uo({element:t,canDrag({input:o}){let s=v_(o.clientX,o.clientY);return!(s instanceof Element&&s.closest('[part="pin"], [part="close"]'))},getInitialData(){return{paneId:F(e)?.id,tabId:a,type:"tab"}}}),Zs({canDrop({source:o}){return Pu(o.data)},element:t,getData({element:o,input:s}){let l=F(e);if(!l)return{type:"tab-slot-refused"};return fe({index:l.tabOrder.indexOf(a),paneId:l.id,tabId:a,type:"tab-slot"},{allowedEdges:["left","right"],element:o,input:s})}}));r.set(a,i)}function Yt(e,t){oe.get(e)?.();let a=Zs({canDrop({source:r}){return Pu(r.data)},element:t,getData(){let r=F(e);return r?{index:r.tabOrder.length,paneId:r.id,type:"tab-slot"}:{type:"tab-slot-refused"}}});oe.set(e,a)}function Xt(e,t){if(t.mode!=="tabs"){$e(e);return}let a=new Set(t.tabs.map((i)=>i.key)),r=U.get(e);if(!r)return;for(let[i,o]of r)if(!a.has(i))o(),r.delete(i)}function ye(){let e=j?.kind==="tab"?j.tabId:"";for(let[t,a]of L){let r=k.get(t);if(!r)continue;let i=N!==null&&N.paneId===a.paneId;r.drag({dragKey:e,dropIndex:i&&N?N.index:-1,dropTail:i&&N?N.tail:!1})}}function Zt(e,t){let a=k.get(t),r=a?.strip();if(!a||!r)return;let i=r.scrollWidth>r.clientWidth;if(i!==(O.get(e.id)===!0))O.set(e.id,i),a.update(We(e))}function Qt(e,t){let a=F(e);if(!a)return;if(L.get(e)?.mode==="derivation"){nt("pane.unsplit",void 0,"Tabs");return}na(a,Ue(a),t)}function ea(e){if(e.ctrlKey)return;let t=e.currentTarget;if(!(t instanceof HTMLElement)||t.scrollWidth<=t.clientWidth)return;let a=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;if(!a)return;e.preventDefault(),t.scrollLeft+=a}function ta(e=g.activePaneId){let t=g.panes.find((d)=>d.id===e),a=_.get(e),r=a?k.get(a)?.strip()??null:null;if(!t||!r)return[];let i=r.scrollLeft,o=i+r.clientWidth,s=[],l=ne(t),c=[...r.querySelectorAll('[part="tab"]')];for(let[d,f]of c.entries()){let y=l[d];if(y&&(f.offsetLeft<i||f.offsetLeft+f.offsetWidth>o))s.push(y)}return s}function Se(){J?.close(),J=null}function na(e,t,a){Se();let r=ta(e.id),i=r.length>0?r:ne(e),o=Me(a??document.body);J=Vt({label:"Hidden tabs",onClosed:(s)=>{if(J===s)J=null},opener:a,place:(s)=>({x:Math.max(4,o.right-s.width),y:o.bottom}),placement:"block-end span-inline-start",region:"tab-overflow",rows:i.map((s)=>({checked:s===e.activeTabId?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:s,run:()=>{Ft(s)},title:t.get(s)??"Untitled"}))})}var W=null;function ze(){W?.close(),W=null}function ra(e){let t={},a=ks(sl(e.documentPath)?.def);if(a)t.hold=Kl(e)[a.field]!==!0;return t}function oa(e){let t=Object.entries(e),a=t.length===1?t[0]?.[1]:void 0;if(!qe(a))return;return a?"false":"true"}function sa(e){let t=ae();if(!t)return[];let a=ra(e),r=[],i;for(let o of t.forPlacement("context/tab")){let s=o.args;if(!(s?.required??[]).every((S)=>(S in a)))continue;let l={};for(let S of Object.keys(s?.properties??{}))if(S in a)l[S]=a[S];let c=r.length>0&&o.group!==i;({group:i}=o);let d=t.disabledReason(o.id),f=oa(l),y={destructive:o.destructive===!0,dividerAbove:c,id:o.id,title:o.title};if(f!==void 0)y.checked=f;r.push(d===void 0?{...y,disabled:!1,run:()=>{Tn(t,o.id,l,"Tabs")}}:{...y,disabled:!0,requires:d})}return r}function la(e,t,a){ze(),Se(),Ft(e.id);let r=sa(e);if(r.length===0)return;W=Vt({label:"Tab actions",onClosed:(i)=>{if(W===i)W=null},origin:{x:t,y:a},region:"tab",rows:r})}function dm(e){let t=e.replace(/^\.\//,"");if(!t.startsWith("pages/"))return null;let r=t.slice(6).replace(/\.[^./]+$/,"").split("/").filter((i)=>i!=="");if(r.at(-1)==="index")r.pop();return`/${r.join("/")}`}function da(e){let t=e.map((a)=>{let r=a.documentPath;if(!r)return{depth:0,fixed:!0,id:a.id,label:a.fallback,parts:[]};let i=dm(r);if(i!==null)return{depth:0,fixed:!0,id:a.id,label:i,parts:[]};let o=r.split("/").filter((s)=>s!==""&&s!==".");return{depth:1,fixed:!1,id:a.id,label:o.slice(-1).join("/")||r,parts:o}});for(;;){let a=new Map;for(let i of t){let o=a.get(i.label);if(o)o.push(i);else a.set(i.label,[i])}let r=!1;for(let i of a.values()){if(i.length<2)continue;for(let o of i){if(o.fixed||o.depth>=o.parts.length)continue;o.depth+=1,o.label=o.parts.slice(-o.depth).join("/"),r=!0}}if(!r)break}return new Map(t.map((a)=>[a.id,a.label]))}function Ue(e){return da(e.tabOrder.flatMap((t)=>{let a=g.tabs.get(t);return a?[{documentPath:a.documentPath,fallback:Nm(a.id)??xy(a.id)??"Untitled",id:t}]:[]}))}function ca(e){let t=e.documentPath||Nm(e.id)||xy(e.id)||"Untitled",a=e.session.openedFrom,r=a?.documentPath?`${t}
2
+ Opened from ${a.documentPath}`:t;return e.preview?`${r}
3
+ Preview — double-click to keep open`:r}function Ld(e){let t=e.documentPath;if(!t)return Nm(e.id)??"Untitled";return dm(t)??t.split("/").at(-1)??t}function Be(e){let t=ef(e),a=ll(e);if(!e.doc.dirty&&!t&&!a)return!1;let r=xn(e);if(!r.active)return!0;if(ia(e))return!0;if(t||a)return!0;return r.peers.filter((o)=>o.state.focusedPath===e.documentPath).length===0}function xe(e){if(ia(e))return`You have read access to this session, so "${Ld(e)}" has changes that were never published and have nowhere to be saved. Closing discards them.`;if(ef(e))return`"${Ld(e)}" has text in its editor that the document could not be given — the `+"source does not parse, or a collaborator holds the source lock. Saving would write the file without it, so it is not offered. Closing discards that text.";return null}async function pa(e){let t=xe(e);if(t)return Kr("Changes Cannot Be Saved",t,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let a=await i1("Unsaved Changes",`"${Ld(e)}" has unsaved changes.`,{discardLabel:"Close Without Saving"});if(a==="cancel")return!1;return a==="discard"||await Rp(e)}async function db(e){let t=g.tabs.get(e);if(!t)return;if(await tu(t),!g.tabs.has(e))return;if(Be(t)&&!await pa(t))return;Qd(e)}async function TE(e){let t=[...g.tabs.values()];for(let c of t)await tu(c);let a=[...g.tabs.values()].filter((c)=>Be(c));if(a.length===0)return!0;let r=a.length===1?`"${Ld(a[0])}" has unsaved changes`:`${a.length} documents have unsaved changes`,i=a.filter((c)=>xe(c)!==null),o=a.filter((c)=>xe(c)===null),s=i.length===1?`"${Ld(i[0])}"`:`${i.length} of them`;if(o.length===0)return Kr("Changes Cannot Be Saved",`${e} closes every open document, and ${r}. ${s} cannot be saved at all, so saving would leave work behind. Closing discards it.`,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let l=await i1("Unsaved Changes",i.length===0?`${e} closes every open document, and ${r}.`:`${e} closes every open document, and ${r}. ${s} cannot be saved at `+`all — saving writes the other ${o.length} and discards ${i.length===1?"that one":"those"}.`,{discardLabel:"Close Without Saving",saveLabel:i.length===0?"Save All":`Save ${o.length} of ${a.length}`});if(l==="cancel")return!1;if(l==="discard")return!0;for(let c of o)if(!await Rp(c))return!1;return!0}function Ge(e,t){if(!n(t)||t.trim()==="")return[...e];return[{attributes:{content:t,name:"description"},tagName:"meta"},...e]}function Ke(e,t,a){let r=e.doc.content.frontmatter,i=wh(e.documentPath,t),o=i?.schema,s=o?.properties,l=new Set(o?.required||[]),c=[];if(s){for(let[d,f]of Object.entries(s)){if(a.has(d))continue;c.push({entry:f,field:d,value:r[d]})}for(let[d,f]of Object.entries(r)){if(s[d]||d.startsWith("$")||a.has(d))continue;c.push({entry:{type:qe(f)?"boolean":"string"},field:d,value:f})}}else for(let[d,f]of Object.entries(r)){if(d.startsWith("$")||a.has(d))continue;c.push({entry:{type:qe(f)?"boolean":"string"},field:d,value:f})}return{collection:i,fields:c,hasSchema:Boolean(s),requiredFields:l}}function B(e){return n(e)?e:""}function ua(e){return{checked:!1,hasNote:!1,hasThumb:!1,isSet:!1,kind:"text",label:e,note:"",options:[],placeholder:"",thumb:"",value:""}}function Ye(e,t,a,r,i){let o=e.replaceAll(/([A-Z])/g," $1").replace(/^./,(d)=>d.toUpperCase()),s=ua(o+(r.has(e)?" *":""));s.isSet=a!==void 0&&a!==""&&a!==!1;let l=(d)=>String(d)||void 0,c=zu(t);if(c!==null){let d=B(a),f=mT(c,i.rerender);if(s.kind="select",s.value=d,f===null)return s.options=[{label:"Loading…",value:d}],{parse:l,row:s};if("error"in f)return s.kind="text",s.hasNote=!0,s.note=`Could not list ${c} entries — ${f.error}`,{parse:l,row:s};let y=d!==""&&!f.ids.includes(d);if(s.options=[{label:"—",value:""},...y?[{label:`${d} — not found`,value:d}]:[],...f.ids.map((S)=>({label:S,value:S}))],f.ids.length===0)s.hasNote=!0,s.note=`No ${c} entries yet.`;return{parse:l,row:s}}if(t.type==="boolean")return s.kind="boolean",s.checked=Boolean(a),{parse:(d)=>d===!0?!0:void 0,row:s};if(t.type==="array")return s.value=Array.isArray(a)?a.join(", "):B(a),s.placeholder="comma, separated",{parse:(d)=>{let f=String(d);return f?f.split(",").map((y)=>y.trim()).filter(Boolean):void 0},row:s};if(Array.isArray(t.enum))return s.kind="select",s.value=B(a),s.options=[{label:"—",value:""},...t.enum.map((d)=>({label:d,value:d}))],{parse:l,row:s};if(Da(t.format)){let d=B(a);return s.kind="media",s.value=d,s.hasThumb=d!==""&&aa.has(Ot(d)),s.thumb=s.hasThumb?Xc(d):"",{parse:l,row:s}}if(t.type==="number")return s.kind="number",s.value=a===void 0?"":String(a),{parse:(d)=>{let f=String(d).trim(),y=Number(f);return f===""||Number.isNaN(y)?void 0:y},row:s};return s.value=B(a),s.placeholder=t.format==="date"?"YYYY-MM-DD":"",{parse:l,row:s}}var Xe="https://fonts.googleapis.com/css2?",Ze=["https://fonts.googleapis.com","https://fonts.gstatic.com"];function sw(e){return e?.tagName==="link"&&e.attributes?.rel==="stylesheet"&&n(e.attributes.href)&&e.attributes.href.startsWith(Xe)}function Te(e){return e?.tagName==="link"&&e.attributes?.rel==="preconnect"&&n(e.attributes.href)&&Ze.includes(e.attributes.href)}function TN(e){let t=e.match(/family=([^&:]+)/);if(!t)return"";return decodeURIComponent(t[1].replaceAll("+"," "))}function $N(e){return`${Xe}family=${encodeURIComponent(e).replaceAll("%20","+")}&display=swap`}function LN(e){for(let t of Ze)if(!e.some((r)=>r?.tagName==="link"&&r.attributes?.rel==="preconnect"&&r.attributes.href===t)){let r={href:t,rel:"preconnect"};if(t==="https://fonts.gstatic.com")r.crossorigin="";e.push({attributes:r,tagName:"link"})}}function RN(e){if(!e.some((a)=>sw(a)))return e.filter((a)=>!Te(a));return e}var Qe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelPage",$description:"The Inspector's Page tab (specs/studio.md §6), the former Navigator Page panel: everything the open document says about itself before anybody reads its body — its frontmatter, the layout it is poured into, its title, description, viewport and icon, its OpenGraph card, and the raw `$head` tags no structured control owns. ONE row vocabulary across the first four sections, told apart by `kind`, because a Title, a Layout picker and a schema-driven frontmatter field differ in what they COMMIT rather than in what they look like — and what they commit is `panels/head-panel.ts`'s decision, reached by the row's `key`. Nothing here knows what a `$head` entry is, which of them are managed, what a content collection is or that a page has a layout: the flow hands over sections whose every field is already a string and this draws them. The Custom Tags section is the one different shape — a read-only list plus the form that adds to it — because those rows are markup a reader is being SHOWN rather than a value they are editing.",tagName:"div",attributes:{part:"page"},style:{$description:"The eleven `.imports-*` and four `.head-*` rules in `styles/panels.css` plus the row vocabulary the panel used to borrow from `styles/inspector.css` (`.style-row`, `.style-row-label`, `.set-dot`) and `styles/overlays.css` (`.media-picker`, `.media-picker-thumb`). The borrowed ones are TRANSCRIBED rather than shared, because a document emits no class, so a class cannot style it, and the lit panels that still draw a `.style-row` go on owning those rules until they convert. Four token repairs travel with them. `--spectrum-font-size-50` resolved only inside `<sp-theme>` and a document is mounted outside it, so every rule that read it would silently have taken its 11px fallback and stopped following the theme; each is `--jx-text-sm` here, and the two bare `10px` literals are `--jx-text-xs`. `.imports-count` read `--text-hint`, a name NO stylesheet in this package defines — an unresolvable custom property makes the whole declaration invalid at computed-value time, so the count has been inheriting its colour rather than taking the one written for it, and it says `--fg-dim`, which is what it was drawing anyway. And `.head-section-body .style-row > sp-textfield` reached INSIDE another component to widen it, which a part cannot do and no longer has to: `[part=\"widget\"]` is the field itself. Two things changed on purpose. THE CLEAR DOT IS A BUTTON — it was a `<span>` with a click handler and no role, so a row's only route to clearing its value could not be reached from the keyboard at all. AND THE ADD FORM IS STATE, not three `ref()` handles read at submit time: a document binding writes only when the scope moves, so the flow states what each field holds and clearing one after a successful add is a real change the runtime carries back.",display:"block",overflowY:"auto",padding:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="section"]':{marginBottom:"var(--jx-space-4)"},'& [part="section-header"]':{$description:'The uppercase band every section opens with. It is the only thing that ever styled a section title, which is why `[part="title"]` carries no declaration of its own: the weight, the size, the colour and the letter-spacing are all inherited from here.',display:"flex",alignItems:"center",gap:"6px",padding:"6px 8px 2px",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)",textTransform:"uppercase",letterSpacing:"0.5px"},'& [part="count"]':{fontWeight:"400",color:"var(--fg-dim)"},'& [part="seo-button"]':{$description:"The door to Search appearance, pushed to the right edge of the band so the section still reads as a heading and the button as its affordance. The band's own uppercasing and tracking stop here: this is a sentence, not a heading.",marginLeft:"auto",textTransform:"none",letterSpacing:"normal"},'& [part="body"]':{padding:"0 var(--jx-space-2)"},'& [part="row"]':{$description:"studio-ui-guidelines.md §4.1's standard form row, stacked: the label sits above a control that takes the whole width. `min-width: 0` is what keeps it honest in a 240px dock (studio-ui-guidelines.md §4.6) — a field refuses to shrink below its own min-content without it.",display:"flex",flexDirection:"column",alignItems:"stretch",gap:"2px",padding:"2px 0",minWidth:"0"},'& [part="row-label"]':{display:"flex",alignItems:"center",gap:"4px",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="chip"]':{$description:"studio-ui-guidelines.md §4.2's set dot: a 6px accent dot, drawn only where the value is set on this document, that clears it when pressed. A real `button` — it is pressable, and it is the row's only keyboard route to clearing — stripped of the chrome a button brings so the row still reads as a label with a dot beside it.",width:"6px",height:"6px",padding:"0",border:"none",borderRadius:"50%",background:"var(--accent)",cursor:"pointer",flexShrink:"0"},'& [part="chip"]:hover':{background:"var(--danger)"},'& [part="chip"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="row-name"]':{$description:"The visible label, `aria-hidden` in the markup: every control in the row carries the same words as its own accessible name, so a label node in the tree as well would have each field announced twice. That is the trade the kit's naming makes — a control names itself — and it is also why this row needs no minted ids.",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="widget"]':{width:"100%",minWidth:"0"},'& [part="readout"]':{$description:"A derived value set as text in the field's place, monospaced because a URL is read character by character.",display:"block",padding:"2px 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-sm)"},'& [part="row-action"]':{alignSelf:"flex-start"},'& [part="note"]':{$description:"What the row could not find out — the entries of a referenced collection that is empty, or the reason listing it failed. A sentence under the control, in the row's own label size, so it reads as part of the field rather than as an error banner.",margin:"0",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="media"]':{display:"flex",alignItems:"center",gap:"4px",minWidth:"0"},'& [part="media"] [part="widget"]':{flex:"1",minWidth:"0"},'& [part="thumb"]':{width:"24px",height:"24px",objectFit:"cover",borderRadius:"var(--radius)",border:"1px solid var(--border)",flexShrink:"0"},'& [part="list"]':{padding:"0 var(--jx-space-2)"},'& [part="tag-row"]':{display:"flex",alignItems:"center",gap:"4px",padding:"3px var(--jx-space-2)",borderRadius:"var(--radius)",fontSize:"var(--jx-text-sm)"},'& [part="tag-row"]:hover':{background:"var(--hover-bg)"},'& [part="tag-name"]':{fontWeight:"500",whiteSpace:"nowrap"},'& [part="tag-value"]':{$description:"What the tag says. It takes the row's slack and ellipses rather than wrapping, because a row is a line and a wrapped value would push the remove button off the one the eye is on. The `title` beside it is what makes the full text readable when it does.",flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="empty"]':{$description:"The compact teaching state, drawn here rather than by `panels/empty-state.ts`: that helper is a lit template, and a surface is a document or a lit template and never a mix. It keeps the compact variant's shape — left-aligned, above the add form that IS its action, so it offers no button of its own (empty-state rule 2's stated exception).",margin:"0",padding:"var(--jx-space-3) var(--jx-space-4)",maxWidth:"34ch",lineHeight:"1.5",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="add"]':{display:"flex",alignItems:"center",gap:"4px",padding:"var(--jx-space-2)"},'& [part="add"] [part="field"]':{flex:"1",minWidth:"0"},'& [part="tag-picker"]':{minWidth:"70px"}},children:[{$prototype:"Array",items:{$ref:"#/state/sections"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"section","data-section":"${$map.item.key}"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"seo-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSeo"},cases:{true:{tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this page appears in search and when shared"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}}}]},{tagName:"div",attributes:{part:"body"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row","data-prop":"${$map.item.prop}"},children:[{tagName:"div",attributes:{part:"row-label"},children:[{tagName:"div",attributes:{part:"chip-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/isSet"},cases:{true:{tagName:"button",attributes:{part:"chip",type:"button",title:"${$map.item.clearLabel}","aria-label":"${$map.item.clearLabel}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clear"},value:[{$ref:"$map/item/key"}]}]}}}},{tagName:"span",attributes:{part:"row-name","aria-hidden":"true"},textContent:"${$map.item.label}"}]},{tagName:"div",attributes:{part:"widget-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},textarea:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",multiline:!0,rows:3,label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setNumber"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},boolean:{tagName:"jx-checkbox",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",checked:{$ref:"$map/item/checked"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBoolean"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},readout:{$description:"A value the document derives rather than stores, such as a page's URL, which is its file's place under `pages/`. Shown, never edited here: an editable URL would be a rename, and a rename is the file tree's.",tagName:"output",attributes:{part:"readout","aria-label":"${$map.item.label}"},textContent:"${$map.item.value}"},select:{tagName:"jx-select",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setChoice"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},media:{tagName:"div",attributes:{part:"media"},children:[{tagName:"div",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasThumb"},cases:{true:{tagName:"img",attributes:{part:"thumb",src:"${$map.item.thumb}",alt:""}}}},{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:"/image.jpg",value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"upload"},$props:{size:"sm",quiet:!0,icon:"upload-simple",label:"Upload media",hint:"Upload media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/upload"},value:[{$ref:"$map/item/key"}]}]}},{tagName:"jx-action-button",attributes:{part:"browse"},$props:{size:"sm",quiet:!0,icon:"image",label:"Browse media",hint:"Browse media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/browse"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]}}]}}},{tagName:"div",attributes:{part:"action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{$description:"The row's one door elsewhere, named for what it opens: the Layout row's Edit template opens the layout in Design.",tagName:"jx-button",attributes:{part:"row-action"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runRowAction"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.action}"}]}}},{tagName:"div",attributes:{part:"note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasNote"},cases:{true:{tagName:"p",attributes:{part:"note"},textContent:"${$map.item.note}"}}}]}}]}]}},{tagName:"div",attributes:{part:"section","data-section":"custom"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"Custom Tags"},{tagName:"span",attributes:{part:"count"},textContent:"${state.customCount}"}]},{tagName:"div",attributes:{part:"custom-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/customState"},cases:{empty:{tagName:"p",attributes:{part:"empty"},textContent:"Custom tags add your own meta, link and script elements to this page — analytics, verification, a webfont. Add one below."},listed:{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/customEntries"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"tag-row","data-tag":"${$map.item.key}"},children:[{tagName:"span",attributes:{part:"tag-name",title:"${$map.item.value}"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"tag-value"},textContent:"${$map.item.value}"},{tagName:"jx-action-button",attributes:{part:"remove"},$props:{icon:"x",size:"sm",quiet:!0,label:"${$map.item.removeLabel}",hint:"Remove"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[{$ref:"$map/item/key"}]}]}}]}}]}}},{tagName:"div",attributes:{part:"add","data-add":"tag"},children:[{tagName:"jx-select",attributes:{part:"tag-picker","data-field":"tag"},$props:{size:"sm",label:"Tag",options:{$ref:"#/state/tagOptions"},value:{$ref:"#/state/addTag"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editTag"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"attr"},$props:{size:"sm",label:"Attribute",placeholder:"Attribute (e.g. name)",value:{$ref:"#/state/addAttr"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editAttr"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"value"},$props:{size:"sm",label:"Value",placeholder:"Value",value:{$ref:"#/state/addValue"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editValue"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-action-button",attributes:{part:"add-button","data-add":"tag"},$props:{icon:"plus",size:"sm",quiet:!0,label:"Add tag",hint:"Add tag"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}]}]};E("panel-page",Qe);function et(e,t){e.sections=t.sections,e.customCount=t.customCount,e.customState=t.customState,e.customEntries=t.customEntries,e.addTag=t.addTag,e.addAttr=t.addAttr,e.addValue=t.addValue,e.tagOptions=t.tagOptions}function fa(){return{addAttr:"",addTag:"",addValue:"",customCount:"0",customEntries:[],customState:"empty",sections:[],tagOptions:[]}}var G=new WeakMap;function tt(e,t,a){let r=G.get(e);if(r&&(r.handle===null||r.handle.root.isConnected)){et(r.scope,t);return}r?.handle?.dispose(),e.textContent="";let i=b({...fa(),...a});et(i,t);let o={handle:null,scope:i};G.set(e,o),I("panel-page",i,e).then((s)=>{if(G.get(e)!==o){s.dispose();return}o.handle=s})}function de(e){let t=G.get(e);if(!t)return;G.delete(e),t.handle?.dispose(),e.textContent=""}var at={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEntryInspector",$description:"The Inspector's Entry tab (specs/studio.md §6, §22.5): one collection entry's own settings while it is written on the canvas, the Content-Entry board's sidebar. Its status (a hold rule's label, or Published), its fields as the collection's schema types them, the URL its collection page publishes it at, and the file it is stored in. `content/entry-inspector.ts` keeps every decision; the field form is an island it fills, `ui/schema-form.ts`'s, the same form the form-only entry editor draws.",tagName:"div",attributes:{part:"entry","data-jx-region":"${state.region}"},style:{$description:"A column of sections, each a small uppercase heading over its rows, like the Page tab beside it.",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="section"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="section-title"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="head"]':{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--jx-space-2)"},'& [part="kind"]':{fontWeight:"600"},'& [part="status"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="status"][data-held="true"]':{color:"var(--warning)"},'& [part="note"]':{margin:"0",fontSize:"var(--jx-text-sm)",lineHeight:"1.5",color:"var(--fg-dim)"},'& [part="url"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",wordBreak:"break-all"},'& [part="path"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)",wordBreak:"break-all"},'& [part="fields-head"]':{display:"flex",alignItems:"center",justifyContent:"space-between"}},children:[{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-entry"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-entry"},textContent:"Entry"},{tagName:"span",attributes:{part:"status","data-held":"${state.held ? 'true' : 'false'}"},textContent:"${state.status}"}]},{tagName:"span",attributes:{part:"kind"},textContent:"${state.kind}"},{tagName:"div",attributes:{part:"hold-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/holdSwitch"},cases:{shown:{$description:"The entry's hold switch, on a collection whose rules offer one: the one field every such collection has in common. The state this shares (site-architecture.md §7.6). A setter: the switch names the state it reaches.",tagName:"jx-switch",attributes:{part:"hold"},$props:{checked:{$ref:"#/state/holdOn"},hint:"${state.holdHint}",size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setHold"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"${state.holdLabel}"}]}}}]},{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-fields"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-fields"},textContent:"Fields"},{tagName:"jx-action-button",attributes:{part:"edit-fields"},$props:{size:"sm",quiet:!0,hint:"Edit this collection's fields in Project Settings",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFields"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"fields-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/fieldsState"},cases:{form:{tagName:"div",attributes:{part:"fields"}},none:{tagName:"p",attributes:{part:"note"},textContent:"This collection declares no fields. Edit adds some in Project Settings."}}}]},{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-page"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-page"},textContent:"Page"},{$description:"The door to Search appearance, the same `document.openSeo` the Page tab's button runs: an entry's search title, description and social image are its frontmatter too (studio.md §4.2).",tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this entry appears in search and when shared",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/urlState"},cases:{shown:{tagName:"code",attributes:{part:"url"},textContent:"${state.url}"},none:{tagName:"p",attributes:{part:"note"},textContent:"Entries of this collection have no page of their own."},unlisted:{$description:"The collection has a page, but the page lists the ids it publishes (`$paths.values`) and this entry is not one of them: naming a URL the build never writes would be a link to nothing.",tagName:"p",attributes:{part:"note"},textContent:"Not published: this collection's page lists the entries it publishes, and this is not one of them."},loading:{tagName:"p",attributes:{part:"note"},textContent:"Finding the page this entry is published at…"}}},{tagName:"p",attributes:{part:"note"},children:[{tagName:"span",textContent:"Stored as "},{tagName:"code",attributes:{part:"path"},textContent:"${state.path}"},{tagName:"span",textContent:"${state.storage}"}]}]}]};E("entry-inspector",at);function ga(e,t){e.region=t.region,e.kind=t.kind,e.status=t.status,e.holdSwitch=t.holdSwitch,e.holdOn=t.holdOn,e.holdLabel=t.holdLabel,e.holdHint=t.holdHint,e.held=t.held,e.fieldsState=t.fieldsState,e.urlState=t.urlState,e.url=t.url,e.path=t.path,e.storage=t.storage}function ba(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function rt(e,t,a,r){e.replaceChildren();let i=b({...t,...a}),o=null,s=!1,l=I("entry-inspector",i,e,{onNodeCreated:(c,d,f)=>{if(!s&&c instanceof HTMLElement&&ba(f)==="fields")r.fieldsSlot(c)}}).then((c)=>{if(s)c.dispose();else o=c;return c});return{attached:()=>{if(s)return!1;let c=o?.root;return c===void 0?!0:e.contains(c)},dispose(){s=!0,o?.dispose(),o=null},ready:l,update:(c)=>ga(i,c)}}var ya="inspector/entry";function ot(e){let t=Kn(e?.documentPath);return t!==null&&!t.fileBacked}function st(e){let t=e.documentPath??"",r=Kn(t)?.name??"",i=qs(r),o=Kl(e),s=i?.def,l=Ep(s,o),c=ks(s),d=r===""?null:oh(r,Vc(t)),f=d?EC(d,t,o):null,y=t.endsWith(".json");return{fieldsState:i?.schema?"form":"none",held:l!==null,holdHint:Tp(l),holdLabel:c?.label??"",holdOn:c!==null&&o[c.field]===!0,holdSwitch:c?"shown":"hidden",kind:Yb(ec(r)?.item??"entry"),path:t,region:ya,status:Rm(s,o),storage:y?". Its fields are the file itself.":". Fields are its frontmatter, and the body is its Markdown.",url:f??"",urlState:d===void 0?"loading":f?"shown":d?"unlisted":"none"}}var v=null;function lt(e,t){let a=qs(Kn(t.documentPath)?.name??"");if(!e.formHost||!a?.schema)return;let r=Kl(t),i=Jl("entry-inspector",ET(a.schema,a.schema,r),r,{context:CT(t),errors:kT(a,r),onChange:(o)=>T0(t,o),rerender:e.redraw,ui:ST(a.schema)});if(i.parentNode!==e.formHost)e.formHost.replaceChildren(i)}function it(e,t){let a=st(t);if(a.fieldsState==="none")e.formHost=null;e.handle.update(a),lt(e,t)}function q(e){if(!v||e!==void 0&&v.host!==e)return;v.unlisten(),v.scope.stop(),v.handle.dispose(),v=null}function dt(e,t){if(v&&v.host===e&&v.tabId===t.id&&v.handle.attached()){it(v,t);return}q();let a=me(),r=()=>{if(v===i)it(i,t)},i={formHost:null,handle:rt(e,st(t),{openFields:()=>{let o=Kn(t.documentPath)?.name;nt("settings.open",o?{entry:o,section:"content"}:{section:"content"},"Entry")},openSeo:()=>{nt("document.openSeo",void 0,"Entry")},setHold:(o)=>Ib(t,o)},{fieldsSlot:(o)=>{if(v===i)i.formHost=o,lt(i,t)}}),host:e,redraw:r,scope:a,tabId:t.id,unlisten:Op(r)};v=i,a.run(()=>{te(()=>{t.doc.document,t.doc.content.frontmatter,x?.projectConfig?.content,r()})})}var A=null;async function $E(){try{A=(await p().listDirectory("layouts")).filter((a)=>a.type==="file"&&a.name.endsWith(".json")).map((a)=>({name:a.name.replace(/\.json$/,"").replaceAll(/[-_]+/g," ").replaceAll(/\b\w/g,(r)=>r.toUpperCase()),path:`./layouts/${a.name}`}))}catch{A=[]}return A}async function va(){await $E(),wn("rightPanel","seoModal")}function aw(){A=null,ja()}function xa(){if(A===null)va();return A}var lw=[{attr:"name",key:"description",label:"Description"},{attr:"name",key:"viewport",label:"Viewport"}],cw=[{attr:"property",key:"og:title",label:"Title"},{attr:"property",key:"og:description",label:"Description",multiline:!0},{attr:"property",key:"og:image",label:"Image",media:!0},{attr:"property",key:"og:type",label:"Type"}],ct=new Set([...lw,...cw].map((e)=>e.key)),pt=new Set(["title"]);function wa(e){return He(e)?new Set([...pt,"description"]):pt}function LE(e){let t=dw(e.$head??[],"name","description");if(t)return String(t.attributes?.content??"");return n(e.description)?e.description:""}function YS(e,t){if(!dw(e.$head??[],"name","description")&&n(e.description)){if(t)e.description=t;else delete e.description;return}uw(e,"name","description",t)}function dw(e,t,a){return e.find((r)=>r?.tagName==="meta"&&r.attributes?.[t]===a)}function RE(e,t){return e.find((a)=>a?.tagName==="link"&&a.attributes?.rel===t)}function $a(e){if(!e?.tagName)return!1;if(e.tagName==="meta"){let t=String(e.attributes?.name??""),a=String(e.attributes?.property??"");return Boolean(t&&ct.has(t))||Boolean(a&&ct.has(a))}if(e.tagName==="link"&&e.attributes?.rel==="icon")return!0;return!1}function uw(e,t,a,r){if(!e.$head)e.$head=[];let i=e.$head.findIndex((o)=>o?.tagName==="meta"&&o.attributes?.[t]===a);if(r){let o={attributes:{[t]:a,content:r},tagName:"meta"};if(i!==-1)e.$head[i]=o;else e.$head.push(o)}else if(i!==-1)e.$head.splice(i,1)}function ZS(e,t,a){if(!e.$head)e.$head=[];let r=e.$head.findIndex((i)=>i?.tagName==="link"&&i.attributes?.rel===t);if(a){let i={attributes:{href:a,rel:t},tagName:"link"};if(r!==-1)e.$head[r]=i;else e.$head.push(i)}else if(r!==-1)e.$head.splice(r,1)}function Sa(e){if(!e?.tagName)return"unknown";let t=e.attributes??{};if(t.name)return`<meta name="${String(t.name)}">`;if(t.property)return`<meta property="${String(t.property)}">`;if(t.rel&&t.href)return`<link rel="${String(t.rel)}">`;if(t.src)return`<script src="${String(t.src)}">`;if(t.charset)return`<meta charset="${String(t.charset)}">`;return`<${e.tagName}>`}function Ta(e){let t=e?.attributes??{};return String(t.content??t.href??t.src??e?.textContent??"")}var yt="Jx Site",vt={donor:null,source:"none",value:""};function ke(e,t,a){let r=null;for(let i of e)if(i?.tagName==="meta"&&i.attributes?.[t]===a)r=String(i.attributes.content??"");return r}function K(e,t,a){let r=ke(e.page,t,a);if(r!==null)return{donor:null,source:"page",value:r};let i=ke(e.layout,t,a);if(i!==null)return{donor:e.layoutName??"the layout",source:"layout",value:i};let o=ke(e.site,t,a);if(o!==null)return{donor:"Site head",source:"site",value:o};return vt}function ka(e,t){let a=e.trim();if(a)return{donor:null,source:"page",value:a};let r=t?.trim();if(r)return{donor:"Site name",source:"site",value:r};return{donor:"the build",source:"build",value:yt}}function Ea(e,t){let a=e??"",r=a.split("/").filter((s)=>s!=="");if(!t||e===null)return{crumb:a||"/",host:"",href:null};let i;try{i=new URL(a,t)}catch{return{crumb:a||"/",host:"",href:null}}let{host:o}=i;return{crumb:[o,...r].join(" › "),host:o,href:i.href}}var xt=new Map([["description",160],["og:description",200],["og:title",60],["title",60]]),Pa=new Intl.Segmenter("en-US",{granularity:"grapheme"});function IE(e){let t=0;for(let a of Pa.segment(e))t+=1;return t}var ut="Search appearance";function DN(e,t){xl((a)=>a.source===ut);for(let a of e.warnings){let r={action:"document.openSeo",key:`seo.${a.id}`,source:ut,tier:"problem"};if(t!==void 0)r.path=t;w.warn(a.message,r)}return e.warnings.length}function ub(e,t){return e.fields.find((a)=>a.key===t)??{...vt,key:t,label:t,limit:xt.get(t)??null}}function Na(e){return[...e.site,...e.layout,...e.page].some((t)=>t?.tagName==="title")}function Ha(e,t){let a=[],r=(o)=>e.fields.find((s)=>s.key===o);if(r("title")?.source==="build")a.push({field:"title",id:"title-missing",message:`Neither this page nor the project names a title, so the build ships “${yt}”.`});if(r("description")?.value.trim()==="")a.push({field:"description",id:"description-missing",message:"No description reaches this page from the site, its layout or the page itself — a "+"result row shows whatever text the engine picks instead."});if(r("og:title")?.value.trim()==="")a.push({field:"og:title",id:"og-title-missing",message:"No og:title — a shared link carries no headline of its own."});if(r("og:description")?.value.trim()==="")a.push({field:"og:description",id:"og-description-missing",message:"No og:description — a shared link carries no summary of its own."});if(r("og:image")?.value.trim()==="")a.push({field:"og:image",id:"og-image-missing",message:"No og:image — a shared link renders as a text-only card."});for(let o of e.fields){let s=IE(o.value);if(o.limit!==null&&s>o.limit){let l=o.key.endsWith("description")?"summaries":"headlines";a.push({field:o.key,id:`${o.key}-long`,message:`${o.label} is ${s} characters; ${l} are cut near ${o.limit}.`})}}if(e.url.href===null)a.push({field:"url",id:"site-url-missing",message:"Project Settings names no site URL, so the build emits no canonical link and no og:url."});if(Na(t))a.push({field:"title",id:"head-title-ignored",message:"A <title> element in $head is discarded — the build writes the title from the "+"document's own title property."});return a}function Ia(e,t){let a=(s,l,c)=>({...c,key:s,label:l,limit:xt.get(s)??null}),r=[a("title","Title",ka(t.pageTitle,t.siteName)),a("description","Description",K(e,"name","description")),a("og:title","Social title",K(e,"property","og:title")),a("og:description","Social description",K(e,"property","og:description")),a("og:image","Social image",K(e,"property","og:image")),a("og:type","Social type",K(e,"property","og:type"))],i=Ea(t.route,t.siteUrl),o={fields:r,url:i};return{...o,warnings:Ha(o,e)}}var Pe=null,Ne=[],Y=null;function ja(){Pe=null,Ne=[],Y=null}async function Ma(e){if(Y===e)return;Y=e;let t=await Rx(e);if(Y!==e)return;Y=null,Pe=e,Ne=t?.$head??[],wn("seoModal")}function wt(e){return e.replace(/^\.\//,"").replace(/^layouts\//,"").replace(/\.json$/,"").replaceAll(/[-_/]+/g," ").replaceAll(/\b\w/g,(t)=>t.toUpperCase())||e}function Ca(e,t){let a=He(e)?fl(t):null;if(a===null)return{entries:[],name:null};let r=wt(a);if(a===Pe)return{entries:Ne,name:r};return Ma(a),{entries:[],name:r}}function NE(e,t){let a=x?.projectConfig,r=Ca(e,t.$layout),i=e?.documentPath,o={pageTitle:n(t.title)?t.title:"",route:i?dm(i):null};if(a?.name!==void 0)o.siteName=a.name;if(a?.url!==void 0)o.siteUrl=a.url;return Ia({layout:r.entries,layoutName:r.name,page:Ge(t.$head??[],t.description),site:a?.$head??[]},o)}function He(e){let t=e?.documentPath;return Boolean(t&&x?.isSiteProject&&(t.startsWith("pages/")||t.startsWith("./pages/")))}function XS(e,t){let a={...e};if(t.title!==void 0)a.title=t.title;if(n(t.description))a.description=t.description;if(n(t.$layout)||t.$layout===!1)a.$layout=t.$layout;if(t.$head!==void 0)a.$head=t.$head;return a}function DE(e,t,a){if(!e)return;let r=e.doc.content.frontmatter,i=XS({},r).$head,o={};if(n(r.title))o.title=r.title;if(n(r.description))o.description=r.description;if(i)o.$head=[...i];if(n(r.$layout)||r.$layout===!1)o.$layout=r.$layout;a(o);let s=o.$head&&o.$head.length>0?o.$head:void 0,l=o.$layout!==r.$layout,c=o.title!==r.title,d=n(r.description)&&o.description!==r.description,f=JSON.stringify(s)!==JSON.stringify(i);if(l||c||d||f)Z(e,(y)=>{if(l)Xd(y,"$layout",n(o.$layout)||o.$layout===!1?o.$layout:void 0);if(c)Xd(y,"title",o.title);if(d)Xd(y,"description",n(o.description)?o.description:void 0);if(f)Xd(y,"$head",s)});t()}var P=null,H=null,ue="meta",Q="",ee="",T=new Map,Ie=new Map;function Oa(e){let t=e?.documentPath?dm(e.documentPath):null;if(t===null)return null;return{...C("__url","url","URL"),kind:"readout",value:t}}var Ee=new Map,R=new Map,Fa=[{label:"meta",value:"meta"},{label:"link",value:"link"},{label:"script",value:"script"}];function C(e,t,a){return{action:"",checked:!1,clearLabel:`Clear ${t}`,hasAction:!1,hasNote:!1,hasThumb:!1,isSet:!1,key:e,kind:"text",label:a,note:"",options:[],placeholder:"",prop:t,thumb:"",value:""}}function $t(e,t){e.hasThumb=t!==""&&aa.has(Ot(t)),e.thumb=e.hasThumb?Xc(t):""}function La(e,t){let a=n(e.title)?e.title:"";return T.set("title",{images:!1,clear:()=>t((r)=>{delete r.title}),commit:(r)=>t((i)=>{let o=String(r).trim();if(o)i.title=o;else delete i.title})}),{...C("title","title","Title"),clearLabel:"Clear title",isSet:Boolean(a),placeholder:"Page title…",value:a}}function mt(e,t,a){let r=String(dw(t,e.attr,e.key)?.attributes?.content??""),i=`meta:${e.attr}:${e.key}`;T.set(i,{images:e.media===!0,clear:()=>a((s)=>uw(s,e.attr,e.key,"")),commit:(s)=>a((l)=>uw(l,e.attr,e.key,e.media?String(s):String(s).trim()))});let o=C(i,e.key,e.label);if(o.isSet=Boolean(r),o.value=r,e.media)return o.kind="media",$t(o,r),o;return o.kind=e.multiline?"textarea":"text",o.placeholder=e.key==="viewport"?"width=device-width, initial-scale=1":`${e.label}…`,o}function Aa(e,t){let a=LE(e),r="meta:name:description";T.set("meta:name:description",{images:!1,clear:()=>t((o)=>YS(o,"")),commit:(o)=>t((s)=>YS(s,String(o).trim()))});let i=C("meta:name:description","description","Description");return i.isSet=Boolean(a),i.value=a,i.kind="text",i.placeholder="Description…",i}function Ra(e,t){let a=String(RE(e,"icon")?.attributes?.href??"");T.set("link:icon",{images:!0,clear:()=>t((i)=>ZS(i,"icon","")),commit:(i)=>t((o)=>ZS(o,"icon",String(i)))});let r=C("link:icon","icon","Icon");return r.isSet=Boolean(a),r.kind="media",r.value=a,$t(r,a),r}function _a(e,t,a){if(!He(e))return null;let r=xa();if(r===null)return null;let i=t.$layout,o=x?.projectConfig?.defaults?.layout,s=o?wt(o):"";T.set("__layout",{images:!1,clear:()=>a((d)=>{delete d.$layout}),commit:(d)=>{let f=String(d);a((y)=>{if(f==="__default__")delete y.$layout;else if(f==="__none__")y.$layout=!1;else y.$layout=f}),CA()}});let l=C("__layout","layout","Layout");l.kind="select",l.isSet=i!==void 0,l.options=[{label:s?`Default (${s})`:"Default",value:"__default__"},{label:"None",value:"__none__"},...r.map((d)=>({label:d.name,value:d.path}))],l.value=i===!1?"__none__":i||"__default__";let c=fl(i);if(c)l.action="Edit template",l.hasAction=!0,Ie.set("__layout",()=>{(ce("b2p9y0yz"),import("./files-b2p9y0yz.js")).then(({openFileInTab:d})=>d(c.replace(/^\.\//,"")))});return{hasSeo:!1,key:"layout",rows:[l],title:"Layout"}}function Ja(e){if(!e||e.doc.mode!=="content")return null;let{collection:t,fields:a,hasSchema:r,requiredFields:i}=Ke(e,x?.projectConfig,wa(e));if(a.length===0&&!r)return null;return{hasSeo:!1,key:"frontmatter",rows:a.map((s)=>{let l=`fm:${s.field}`,{parse:c,row:d}=Ye(s.field,s.entry,s.value,i,{rerender:D});return T.set(l,{images:d.kind==="media"&&s.entry.format==="image",clear:()=>Z(e,(f)=>Xd(f,s.field)),commit:(f)=>Z(e,(y)=>Xd(y,s.field,c(f)))}),Object.assign(C(l,s.field,d.label),d,{clearLabel:`Clear ${s.field}`})}),title:t?`Frontmatter (${t.name})`:"Frontmatter"}}function Va(e){Ee.clear();let t=[];for(let a of e){if($a(a)||sw(a)||Te(a))continue;let r=`tag:${t.length}`;Ee.set(r,a);let i=Sa(a);t.push({key:r,label:i,removeLabel:`Remove ${i}`,value:Ta(a)})}return t}function Wa(e){T.clear(),Ie.clear();let t=h.value,a=e.document,r=a.$head??[],i=[],o=Ja(t);if(o)i.push(o);let s=_a(t,a,e.applyMutation);if(s)i.push(s);let l=Oa(t);i.push({hasSeo:!0,key:"page",rows:[La(a,e.applyMutation),...l?[l]:[],...lw.map((d)=>d.key==="description"?Aa(a,e.applyMutation):mt(d,r,e.applyMutation)),Ra(r,e.applyMutation)],title:"Page"},{hasSeo:!1,key:"opengraph",rows:cw.map((d)=>mt(d,r,e.applyMutation)),title:"OpenGraph"});let c=Va(r);return{addAttr:Q,addTag:ue,addValue:ee,customCount:String(c.length),customEntries:c,customState:c.length===0?"empty":"listed",sections:i,tagOptions:Fa}}function D(){if(!P||!H)return;tt(P,Wa(H),Ba)}function ft(){for(let{timer:e}of R.values())clearTimeout(e);R.clear()}function X(e){let t=R.get(e);if(t)clearTimeout(t.timer),R.delete(e)}function pe(e,t){X(e),T.get(e)?.commit(t)}function za(){let e=H,t=Q.trim(),a=ee.trim();if(!e||!t||!a)return;let r=ue||"meta";Q="",ee="",D();let i={attributes:{},tagName:r};if(r==="meta")i.attributes={content:a,name:t};else if(r==="link")i.attributes={href:a,rel:t};else if(r==="script")i.attributes={[t]:a};e.applyMutation((o)=>{if(!o.$head)o.$head=[];o.$head.push(i)}),e.rerender()}function Ua(e){let t=H,a=Ee.get(e);if(!t||!a)return;t.applyMutation((r)=>{if(!r.$head)return;let i=r.$head.indexOf(a);if(i!==-1)r.$head.splice(i,1)}),t.rerender()}var ht=null;function gt(){return ht??=(ce("4p4pd28y"),import("./media-picker-4p4pd28y.js")),ht}var Ba={addEntry:za,browse:(e,t)=>{X(e),gt().then((a)=>{if(t instanceof HTMLElement)a.showMediaPickerPopover(t,(r)=>{T.get(e)?.commit(r)},{images:T.get(e)?.images??!0})})},clear:(e)=>{X(e),T.get(e)?.clear()},commitText:(e,t)=>pe(e,t),editAttr:(e)=>{Q=e,D()},editText:(e,t)=>{X(e);let a=()=>{R.delete(e),T.get(e)?.commit(t)};R.set(e,{commit:a,timer:setTimeout(a,tf)})},editTag:(e)=>{ue=e,D()},editValue:(e)=>{ee=e,D()},openSeo:()=>{ae()?.run("document.openSeo")},removeEntry:Ua,runRowAction:(e)=>{Ie.get(e)?.()},setBoolean:(e,t)=>pe(e,t),setChoice:(e,t)=>pe(e,t),setNumber:(e,t)=>pe(e,t),upload:(e)=>{X(e),gt().then((t)=>{t.pickAndUpload((a)=>{T.get(e)?.commit(a)})})}};function Ga(e,t){if(e!==P)ue="meta",Q="",ee="",ft();if(t.document!==H?.document)ft();P=e,H=t,D()}function OE(e){if(!e)return"Document";if(e.startsWith("pages/"))return"Page";if(e.startsWith("layouts/"))return"Template";if(e.startsWith("components/"))return"Component";let t=Kn(e);return t&&!t.fileBacked?"Entry":"Document"}var qa="A component has no page settings: its title, search and social details come from the page that uses it.";function Ka(e){return{actions:[{label:"Edit tag and props",run:()=>{wl(e,{selection:[[]],ui:{rightTab:"properties"}})}}],detail:"Its tag name and the props it takes are set on its root element.",message:qa}}var ON="Open a page to edit its title, description and social preview.",M=null;function AE(e){if(M&&M!==e){if(q(M),de(M),P===M)P=null,H=null}M=e,hw()}function hw(){let e=M;if(!e)return;let t=h.value;if(!t||ot(t)){if(de(e),P===e)P=null,H=null;if(t)dt(e,t);else q(e);return}if(q(e),OE(t.documentPath)==="Component"){if(de(e),P===e)P=null,H=null;let r=Mu(e,Ka(t));if(e.firstChild!==r||e.childNodes.length!==1)e.replaceChildren(r);return}let a=t.doc.mode==="content";Ga(e,{applyMutation:a?(r)=>DE(h.value,hw,r):(r)=>{Jd(h.value,r)},document:a?XS(t.doc.document,t.doc.content.frontmatter):t.doc.document,rerender:hw})}
4
+ export{sw,TN,$N,LN,RN,cb,kE,Ac,IN,EE,Pu,NN,dm,Ld,db,TE,Mu,$E,aw,lw,cw,LE,YS,dw,RE,uw,ZS,IE,DN,ub,NE,XS,DE,OE,ON,AE,hw};
5
+
6
+ //# debugId=CA946FC0407F0B0864756E2164756E21
7
+ //# sourceMappingURL=studio-8w5pa88p.js.map
@@ -1,4 +1,4 @@
1
- function Y(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var V=Object.assign;var Ve=Object.prototype.hasOwnProperty,F=(e,t)=>Ve.call(e,t),A=Array.isArray,C=(e)=>pe(e)==="[object Map]";var ue=(e)=>typeof e==="function",Fe=(e)=>typeof e==="string",R=(e)=>typeof e==="symbol",x=(e)=>e!==null&&typeof e==="object";var je=Object.prototype.toString,pe=(e)=>je.call(e),he=(e)=>pe(e).slice(8,-1);var j=(e)=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var H=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},He=/-\w/g,rt=H((e)=>e.replace(He,(t)=>t.slice(1).toUpperCase())),Ue=/\B([A-Z])/g,st=H((e)=>e.replace(Ue,"-$1").toLowerCase()),de=H((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ot=H((e)=>e?`on${de(e)}`:""),E=(e,t)=>!Object.is(e,t);var Ke="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var at=Y(Ke+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var h;class ye{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&h)if(h.active)this.parent=h,this.index=(h.scopes||(h.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=h;try{return h=this,e()}finally{h=t}}}on(){if(++this._on===1)this.prevScope=h,h=this}off(){if(this._on>0&&--this._on===0){if(h===this)h=this.prevScope;else{let e=h;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function me(e){return new ye(e)}function ia(e,t=!1){if(h)h.cleanups.push(e)}var f;var B=new WeakSet;class z{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,h)if(h.active)h.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,B.has(this))B.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))be(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ge(this),Se(this);let e=f,t=m;f=this,m=!0;try{return this.fn()}finally{we(this),f=e,m=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)re(e);this.deps=this.depsTail=void 0,ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)B.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(J(this))this.run()}get dirty(){return J(this)}}var Ee=0,I,L;function be(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=I,I=e}function ne(){Ee++}function ie(){if(--Ee>0)return;if(L){let t=L;L=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(I){let t=I;I=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function Se(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function we(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;re(r),ze(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function J(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Te(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Te(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===M)return;if(e.globalVersion=M,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!J(e)))return;e.flags|=2;let t=e.dep,n=f,r=m;f=e,m=!0;try{Se(e);let i=e.fn(e._value);if(t.version===0||E(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,m=r,we(e),e.flags&=-3}}function re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r)r.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)re(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function te(e,t){if(e.effect instanceof z)e=e.effect.fn;let n=new z(e);if(t)V(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var m=!0,Ne=[];function Gr(){Ne.push(m),m=!1}function Kr(){let e=Ne.pop();m=e===void 0?!0:e}function y1(e,t=!1){if(f instanceof z)f.cleanup=e}function ge(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var M=0;class Oe{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class G{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!f||!m||f===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==f){if(t=this.activeLink=new Oe(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;Ae(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=f.depsTail,t.nextDep=void 0,f.depsTail.nextDep=t,f.depsTail=t,f.deps===t)f.deps=n}}return t}trigger(e){this.version++,M++,this.notify(e)}notify(e){ne();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{ie()}}}function Ae(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ae(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var Z=new WeakMap,N=Symbol(""),Q=Symbol(""),P=Symbol("");function d(e,t,n){if(m&&f){let r=Z.get(e);if(!r)Z.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new G),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=Z.get(e);if(!o){M++;return}let a=(c)=>{if(c)c.trigger()};if(ne(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&j(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,_)=>{if(_==="length"||_===P||!R(_)&&_>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(P));switch(t){case"add":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}break;case"set":if(C(e))a(o.get(N));break}}}ie()}function D(e){let t=le(e);if(t===e)return t;if(d(t,"iterate",P),T(e))return t;if(!S(e))return t.map(y);return Vv(e)?t.map((n)=>O(y(n))):t.map(O)}function se(e){return d(e=le(e),"iterate",P),e}function v(e,t){if(S(e))return Vv(e)?O(y(t)):O(t);return y(t)}var We={__proto__:null,[Symbol.iterator](){return q(this,Symbol.iterator,(e)=>v(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return q(this,"entries",(e)=>(e[1]=v(this,e[1]),e))},every(e,t){return b(this,"every",e,t,void 0,arguments)},filter(e,t){return b(this,"filter",e,t,(n)=>n.map((r)=>v(this,r)),arguments)},find(e,t){return b(this,"find",e,t,(n)=>v(this,n),arguments)},findIndex(e,t){return b(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return b(this,"findLast",e,t,(n)=>v(this,n),arguments)},findLastIndex(e,t){return b(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return b(this,"forEach",e,t,void 0,arguments)},includes(...e){return X(this,"includes",e)},indexOf(...e){return X(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return X(this,"lastIndexOf",e)},map(e,t){return b(this,"map",e,t,void 0,arguments)},pop(){return k(this,"pop")},push(...e){return k(this,"push",e)},reduce(e,...t){return ve(this,"reduce",e,t)},reduceRight(e,...t){return ve(this,"reduceRight",e,t)},shift(){return k(this,"shift")},some(e,t){return b(this,"some",e,t,void 0,arguments)},splice(...e){return k(this,"splice",e)},toReversed(){return D(this).toReversed()},toSorted(e){return D(this).toSorted(e)},toSpliced(...e){return D(this).toSpliced(...e)},unshift(...e){return k(this,"unshift",e)},values(){return q(this,"values",(e)=>v(this,e))}};function q(e,t,n){let r=se(e),i=r[t],s=i.call(r);if(r!==e&&!T(e)){if(s[Symbol.toStringTag]==="Array Iterator"){let o=Object.create(Object.getPrototypeOf(s));if(o.next=()=>_e(s.next(),n),i!==Re[t])Object.defineProperties(o,{return:{get(){let a=s.return;return typeof a==="function"?a.bind(s):a}},throw:{get(){let a=s.throw;return typeof a==="function"?a.bind(s):a}}});return o}s._next=s.next,s.next=()=>_e(s._next(),n)}return s}function _e(e,t){if(!e.done)e.value=t(e.value);return e}var Re=Array.prototype;function b(e,t,n,r,i,s){let o=se(e),a=o!==e&&!T(e),c=o[t];if(c!==Re[t]){let p=c.apply(e,s);return a?y(p):p}let l=n;if(o!==e){if(a)l=function(p,_){return n.call(this,v(e,p),_,e)};else if(n.length>2)l=function(p,_){return n.call(this,p,_,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function ve(e,t,n,r){let i=se(e),s=i!==e&&!T(e),o=n,a=!1;if(i!==e){if(s)a=r.length===0,o=function(l,u,p){if(a)a=!1,l=v(e,l);return n.call(this,l,v(e,u),p,e)};else if(n.length>3)o=function(l,u,p){return n.call(this,l,u,p,e)}}let c=i[t](o,...r);return a?v(e,c):c}function X(e,t,n){let r=le(e);d(r,"iterate",P);let i=r[t](...n);if((i===-1||i===!1)&&it(n[0]))return n[0]=le(n[0]),r[t](...n);return i}function k(e,t,n=[]){Gr(),ne();let r=le(e)[t].apply(e,n);return ie(),Kr(),r}var Ge=Y("__proto__,__v_isRef,__isVue"),xe=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(R));function Ye(e){if(!R(e))e=String(e);let t=le(this);return d(t,"has",e),t.hasOwnProperty(e)}class oe{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(n===(r?i?tt:Ie:i?ke:Ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=We[t]))return a;if(t==="hasOwnProperty")return Ye}let o=Reflect.get(e,t,Oh(e)?e:n);if(R(t)?xe.has(t):Ge(t))return o;if(!r)d(e,"get",t);if(i)return o;if(Oh(o)){let a=s&&j(t)?o:o.value;return r&&x(a)?W(a):a}if(x(o))return r?W(o):g(o);return o}}class ae extends oe{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&j(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=le(i),n=le(n);if(!s&&Oh(i)&&!Oh(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:F(e,t),a=Reflect.set(e,t,n,Oh(e)?e:r);if(e===le(r)&&a){if(!o)w(e,"add",t,n);else if(E(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=F(e,t),r=e[t],i=Reflect.deleteProperty(e,t);if(i&&n)w(e,"delete",t,void 0,r);return i}has(e,t){let n=Reflect.has(e,t);if(!R(t)||!xe.has(t))d(e,"has",t);return n}ownKeys(e){return d(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class De extends oe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Be=new ae,$e=new De,qe=new ae(!0);var ee=(e)=>e,U=(e)=>Reflect.getPrototypeOf(e);function Xe(e,t,n){return function(...r){let i=this.__v_raw,s=le(i),o=C(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?ee:t?O:y;return!t&&d(s,"iterate",c?Q:N),V(Object.create(l),{next(){let{value:p,done:_}=l.next();return _?{value:p,done:_}:{value:a?[u(p[0]),u(p[1])]:u(p),done:_}}})}}function K(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Je(e,t){let n={get(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(E(i,a))d(o,"get",i);d(o,"get",a)}let{has:c}=U(o),l=t?ee:e?O:y;if(c.call(o,i))return l(s.get(i));else if(c.call(o,a))return l(s.get(a));else if(s!==o)s.get(i)},get size(){let i=this.__v_raw;return!e&&d(le(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(E(i,a))d(o,"has",i);d(o,"has",a)}return i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){let o=this,a=o.__v_raw,c=le(a),l=t?ee:e?O:y;return!e&&d(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return V(n,e?{add:K("add"),set:K("set"),delete:K("delete"),clear:K("clear")}:{add(i){let s=le(this),o=U(s),a=le(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||E(i,c)&&o.has.call(s,i)||E(a,c)&&o.has.call(s,a)))s.add(c),w(s,"add",c,c);return this},set(i,s){if(!t&&!T(s)&&!S(s))s=le(s);let o=le(this),{has:a,get:c}=U(o),l=a.call(o,i);if(!l)i=le(i),l=a.call(o,i);let u=c.call(o,i);if(o.set(i,s),!l)w(o,"add",i,s);else if(E(s,u))w(o,"set",i,s,u);return this},delete(i){let s=le(this),{has:o,get:a}=U(s),c=o.call(s,i);if(!c)i=le(i),c=o.call(s,i);let l=a?a.call(s,i):void 0,u=s.delete(i);if(c)w(s,"delete",i,void 0,l);return u},clear(){let i=le(this),s=i.size!==0,o=void 0,a=i.clear();if(s)w(i,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{n[i]=Xe(i,e,t)}),n}function ce(e,t){let n=Je(e,t);return(r,i,s)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_isShallow")return t;else if(i==="__v_raw")return r;return Reflect.get(F(n,i)&&i in r?n:r,i,s)}}var Ze={get:ce(!1,!1)},Qe={get:ce(!1,!0)},et={get:ce(!0,!1)};var Ce=new WeakMap,ke=new WeakMap,Ie=new WeakMap,tt=new WeakMap;function nt(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function g(e){if(S(e))return e;return fe(e,!1,Be,Ze,Ce)}function Wv(e){return fe(e,!1,qe,Qe,ke)}function W(e){return fe(e,!0,$e,et,Ie)}function fe(e,t,n,r,i){if(!x(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=i.get(e);if(s)return s;let o=nt(he(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function Vv(e){if(S(e))return Vv(e.__v_raw);return!!(e&&e.__v_isReactive)}function S(e){return!!(e&&e.__v_isReadonly)}function T(e){return!!(e&&e.__v_isShallow)}function it(e){return e?!!e.__v_raw:!1}function le(e){let t=e&&e.__v_raw;return t?le(t):e}var y=(e)=>x(e)?g(e):e,O=(e)=>x(e)?W(e):e;function Oh(e){return e?e.__v_isRef===!0:!1}function Mh(e){return Le(e,!1)}function ja(e){return Le(e,!0)}function Le(e,t){if(Oh(e))return e;return new Me(e,t)}class Me{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:le(e),this._value=t?e:y(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||T(e)||S(e);if(e=n?e:le(e),E(e,t))this._rawValue=e,this._value=n?e:y(e),this.dep.trigger()}}class Pe{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&f!==this)return be(this,!0),!0}get value(){let e=this.dep.track();if(Te(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function Ph(e,t,n=!1){let r,i;if(ue(e))r=e;else r=e.get,i=e.set;return new Pe(r,i,n)}export{me,ia,te,Gr,Kr,y1,g,Wv,Vv,le,Oh,Mh,ja,Ph};
1
+ function Y(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var V=Object.assign;var Ve=Object.prototype.hasOwnProperty,F=(e,t)=>Ve.call(e,t),A=Array.isArray,C=(e)=>pe(e)==="[object Map]";var ue=(e)=>typeof e==="function",Fe=(e)=>typeof e==="string",R=(e)=>typeof e==="symbol",x=(e)=>e!==null&&typeof e==="object";var je=Object.prototype.toString,pe=(e)=>je.call(e),he=(e)=>pe(e).slice(8,-1);var j=(e)=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var H=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},He=/-\w/g,rt=H((e)=>e.replace(He,(t)=>t.slice(1).toUpperCase())),Ue=/\B([A-Z])/g,st=H((e)=>e.replace(Ue,"-$1").toLowerCase()),de=H((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ot=H((e)=>e?`on${de(e)}`:""),y=(e,t)=>!Object.is(e,t);var Ke="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var at=Y(Ke+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var h;class ye{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&h)if(h.active)this.parent=h,this.index=(h.scopes||(h.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=h;try{return h=this,e()}finally{h=t}}}on(){if(++this._on===1)this.prevScope=h,h=this}off(){if(this._on>0&&--this._on===0){if(h===this)h=this.prevScope;else{let e=h;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function me(e){return new ye(e)}function Ds(e,t=!1){if(h)h.cleanups.push(e)}var f;var B=new WeakSet;class z{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,h)if(h.active)h.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,B.has(this))B.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))be(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ge(this),Se(this);let e=f,t=_;f=this,_=!0;try{return this.fn()}finally{we(this),f=e,_=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)re(e);this.deps=this.depsTail=void 0,ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)B.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(J(this))this.run()}get dirty(){return J(this)}}var Ee=0,I,L;function be(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=I,I=e}function ne(){Ee++}function ie(){if(--Ee>0)return;if(L){let t=L;L=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(I){let t=I;I=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function Se(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function we(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;re(r),ze(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function J(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Te(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Te(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===M)return;if(e.globalVersion=M,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!J(e)))return;e.flags|=2;let t=e.dep,n=f,r=_;f=e,_=!0;try{Se(e);let i=e.fn(e._value);if(t.version===0||y(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,_=r,we(e),e.flags&=-3}}function re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r)r.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)re(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function te(e,t){if(e.effect instanceof z)e=e.effect.fn;let n=new z(e);if(t)V(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var _=!0,Ne=[];function $o(){Ne.push(_),_=!1}function Lo(){let e=Ne.pop();_=e===void 0?!0:e}function R1(e,t=!1){if(f instanceof z)f.cleanup=e}function ge(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var M=0;class Oe{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class G{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!f||!_||f===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==f){if(t=this.activeLink=new Oe(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;Ae(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=f.depsTail,t.nextDep=void 0,f.depsTail.nextDep=t,f.depsTail=t,f.deps===t)f.deps=n}}return t}trigger(e){this.version++,M++,this.notify(e)}notify(e){ne();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{ie()}}}function Ae(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ae(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var Z=new WeakMap,N=Symbol(""),Q=Symbol(""),P=Symbol("");function d(e,t,n){if(_&&f){let r=Z.get(e);if(!r)Z.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new G),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=Z.get(e);if(!o){M++;return}let a=(c)=>{if(c)c.trigger()};if(ne(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&j(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,g)=>{if(g==="length"||g===P||!R(g)&&g>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(P));switch(t){case"add":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}break;case"set":if(C(e))a(o.get(N));break}}}ie()}function D(e){let t=le(e);if(t===e)return t;if(d(t,"iterate",P),T(e))return t;if(!S(e))return t.map(v);return Jy(e)?t.map((n)=>O(v(n))):t.map(O)}function se(e){return d(e=le(e),"iterate",P),e}function m(e,t){if(S(e))return Jy(e)?O(v(t)):O(t);return v(t)}var We={__proto__:null,[Symbol.iterator](){return q(this,Symbol.iterator,(e)=>m(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return q(this,"entries",(e)=>(e[1]=m(this,e[1]),e))},every(e,t){return E(this,"every",e,t,void 0,arguments)},filter(e,t){return E(this,"filter",e,t,(n)=>n.map((r)=>m(this,r)),arguments)},find(e,t){return E(this,"find",e,t,(n)=>m(this,n),arguments)},findIndex(e,t){return E(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return E(this,"findLast",e,t,(n)=>m(this,n),arguments)},findLastIndex(e,t){return E(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return E(this,"forEach",e,t,void 0,arguments)},includes(...e){return X(this,"includes",e)},indexOf(...e){return X(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return X(this,"lastIndexOf",e)},map(e,t){return E(this,"map",e,t,void 0,arguments)},pop(){return k(this,"pop")},push(...e){return k(this,"push",e)},reduce(e,...t){return ve(this,"reduce",e,t)},reduceRight(e,...t){return ve(this,"reduceRight",e,t)},shift(){return k(this,"shift")},some(e,t){return E(this,"some",e,t,void 0,arguments)},splice(...e){return k(this,"splice",e)},toReversed(){return D(this).toReversed()},toSorted(e){return D(this).toSorted(e)},toSpliced(...e){return D(this).toSpliced(...e)},unshift(...e){return k(this,"unshift",e)},values(){return q(this,"values",(e)=>m(this,e))}};function q(e,t,n){let r=se(e),i=r[t],s=i.call(r);if(r!==e&&!T(e)){if(s[Symbol.toStringTag]==="Array Iterator"){let o=Object.create(Object.getPrototypeOf(s));if(o.next=()=>_e(s.next(),n),i!==Re[t])Object.defineProperties(o,{return:{get(){let a=s.return;return typeof a==="function"?a.bind(s):a}},throw:{get(){let a=s.throw;return typeof a==="function"?a.bind(s):a}}});return o}s._next=s.next,s.next=()=>_e(s._next(),n)}return s}function _e(e,t){if(!e.done)e.value=t(e.value);return e}var Re=Array.prototype;function E(e,t,n,r,i,s){let o=se(e),a=o!==e&&!T(e),c=o[t];if(c!==Re[t]){let p=c.apply(e,s);return a?v(p):p}let l=n;if(o!==e){if(a)l=function(p,g){return n.call(this,m(e,p),g,e)};else if(n.length>2)l=function(p,g){return n.call(this,p,g,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function ve(e,t,n,r){let i=se(e),s=i!==e&&!T(e),o=n,a=!1;if(i!==e){if(s)a=r.length===0,o=function(l,u,p){if(a)a=!1,l=m(e,l);return n.call(this,l,m(e,u),p,e)};else if(n.length>3)o=function(l,u,p){return n.call(this,l,u,p,e)}}let c=i[t](o,...r);return a?m(e,c):c}function X(e,t,n){let r=le(e);d(r,"iterate",P);let i=r[t](...n);if((i===-1||i===!1)&&it(n[0]))return n[0]=le(n[0]),r[t](...n);return i}function k(e,t,n=[]){$o(),ne();let r=le(e)[t].apply(e,n);return ie(),Lo(),r}var Ge=Y("__proto__,__v_isRef,__isVue"),xe=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(R));function Ye(e){if(!R(e))e=String(e);let t=le(this);return d(t,"has",e),t.hasOwnProperty(e)}class oe{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(n===(r?i?tt:Ie:i?ke:Ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=We[t]))return a;if(t==="hasOwnProperty")return Ye}let o=Reflect.get(e,t,Dh(e)?e:n);if(R(t)?xe.has(t):Ge(t))return o;if(!r)d(e,"get",t);if(i)return o;if(Dh(o)){let a=s&&j(t)?o:o.value;return r&&x(a)?W(a):a}if(x(o))return r?W(o):b(o);return o}}class ae extends oe{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&j(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=le(i),n=le(n);if(!s&&Dh(i)&&!Dh(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:F(e,t),a=Reflect.set(e,t,n,Dh(e)?e:r);if(e===le(r)&&a){if(!o)w(e,"add",t,n);else if(y(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=F(e,t),r=e[t],i=Reflect.deleteProperty(e,t);if(i&&n)w(e,"delete",t,void 0,r);return i}has(e,t){let n=Reflect.has(e,t);if(!R(t)||!xe.has(t))d(e,"has",t);return n}ownKeys(e){return d(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class De extends oe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Be=new ae,$e=new De,qe=new ae(!0);var ee=(e)=>e,U=(e)=>Reflect.getPrototypeOf(e);function Xe(e,t,n){return function(...r){let i=this.__v_raw,s=le(i),o=C(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?ee:t?O:v;return!t&&d(s,"iterate",c?Q:N),V(Object.create(l),{next(){let{value:p,done:g}=l.next();return g?{value:p,done:g}:{value:a?[u(p[0]),u(p[1])]:u(p),done:g}}})}}function K(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Je(e,t){let n={get(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(y(i,a))d(o,"get",i);d(o,"get",a)}let{has:c}=U(o),l=t?ee:e?O:v;if(c.call(o,i))return l(s.get(i));else if(c.call(o,a))return l(s.get(a));else if(s!==o)s.get(i)},get size(){let i=this.__v_raw;return!e&&d(le(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(y(i,a))d(o,"has",i);d(o,"has",a)}return i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){let o=this,a=o.__v_raw,c=le(a),l=t?ee:e?O:v;return!e&&d(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return V(n,e?{add:K("add"),set:K("set"),delete:K("delete"),clear:K("clear")}:{add(i){let s=le(this),o=U(s),a=le(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||y(i,c)&&o.has.call(s,i)||y(a,c)&&o.has.call(s,a)))s.add(c),w(s,"add",c,c);return this},set(i,s){if(!t&&!T(s)&&!S(s))s=le(s);let o=le(this),{has:a,get:c}=U(o),l=a.call(o,i);if(!l)i=le(i),l=a.call(o,i);let u=c.call(o,i);if(o.set(i,s),!l)w(o,"add",i,s);else if(y(s,u))w(o,"set",i,s,u);return this},delete(i){let s=le(this),{has:o,get:a}=U(s),c=o.call(s,i);if(!c)i=le(i),c=o.call(s,i);let l=a?a.call(s,i):void 0,u=s.delete(i);if(c)w(s,"delete",i,void 0,l);return u},clear(){let i=le(this),s=i.size!==0,o=void 0,a=i.clear();if(s)w(i,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{n[i]=Xe(i,e,t)}),n}function ce(e,t){let n=Je(e,t);return(r,i,s)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_isShallow")return t;else if(i==="__v_raw")return r;return Reflect.get(F(n,i)&&i in r?n:r,i,s)}}var Ze={get:ce(!1,!1)},Qe={get:ce(!1,!0)},et={get:ce(!0,!1)};var Ce=new WeakMap,ke=new WeakMap,Ie=new WeakMap,tt=new WeakMap;function nt(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function b(e){if(S(e))return e;return fe(e,!1,Be,Ze,Ce)}function Gy(e){return fe(e,!1,qe,Qe,ke)}function W(e){return fe(e,!0,$e,et,Ie)}function fe(e,t,n,r,i){if(!x(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=i.get(e);if(s)return s;let o=nt(he(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function Jy(e){if(S(e))return Jy(e.__v_raw);return!!(e&&e.__v_isReactive)}function S(e){return!!(e&&e.__v_isReadonly)}function T(e){return!!(e&&e.__v_isShallow)}function it(e){return e?!!e.__v_raw:!1}function le(e){let t=e&&e.__v_raw;return t?le(t):e}var v=(e)=>x(e)?b(e):e,O=(e)=>x(e)?W(e):e;function Dh(e){return e?e.__v_isRef===!0:!1}function Oh(e){return Le(e,!1)}function Ha(e){return Le(e,!0)}function Le(e,t){if(Dh(e))return e;return new Me(e,t)}class Me{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:le(e),this._value=t?e:v(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||T(e)||S(e);if(e=n?e:le(e),y(e,t))this._rawValue=e,this._value=n?e:v(e),this.dep.trigger()}}class Pe{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&f!==this)return be(this,!0),!0}get value(){let e=this.dep.track();if(Te(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function Ah(e,t,n=!1){let r,i;if(ue(e))r=e;else r=e.get,i=e.set;return new Pe(r,i,n)}export{me,Ds,te,$o,Lo,R1,b,Gy,Jy,le,Dh,Oh,Ha,Ah};
2
2
 
3
- //# debugId=69C4DF0D8FE8976A64756E2164756E21
4
- //# sourceMappingURL=studio-3qr08sxq.js.map
3
+ //# debugId=B96B950E031C715664756E2164756E21
4
+ //# sourceMappingURL=studio-9f5vcb4w.js.map