@jxsuite/studio 10.4.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 (274) 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-v0pm96mr.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-r8sfxjjm.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-vjzw46xb.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-2f03wcgw.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-4fwngwrw.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-9gr7xs9r.js → studio-4jy967rj.js} +5 -5
  67. package/dist/chunks/{studio-4bgvvzhv.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-wmjmsw0p.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-bg8pzprg.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-evq47j2z.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-s24mhq0z.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-2pk7kc7z.js → studio-d5f7sskn.js} +4 -4
  91. package/dist/chunks/studio-dmgh2rrj.js +5 -0
  92. package/dist/chunks/{studio-nwf0c32p.js → studio-dst8y8vh.js} +4 -4
  93. package/dist/chunks/studio-ehj3csbm.js +6 -0
  94. package/dist/chunks/{studio-hfqpfmpk.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-jma2q8r9.js → studio-g65t6svn.js} +4 -4
  102. package/dist/chunks/{studio-r6mx7vm5.js → studio-gw83z798.js} +5 -5
  103. package/dist/chunks/{studio-2x972v58.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-bnc50f9h.js → studio-k05g7efh.js} +4 -4
  108. package/dist/chunks/studio-kefs4sz4.js +5 -0
  109. package/dist/chunks/{studio-2e4hry72.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-gnazwtv3.js → studio-ncwx602y.js} +4 -4
  115. package/dist/chunks/{studio-amaz545p.js → studio-nngc45ct.js} +4 -4
  116. package/dist/chunks/{studio-eqcddvc2.js → studio-nv5eq0f7.js} +173 -173
  117. package/dist/chunks/{studio-az3wvyh2.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-rr00ex23.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-61rg2cz5.js → studio-td3h1644.js} +4 -4
  129. package/dist/chunks/{studio-v7a7yb5w.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-a88ej93p.js → studio-ze1sm147.js} +6 -6
  141. package/dist/chunks/{studio-pj216fmn.js → studio-zkkt13qd.js} +4 -4
  142. package/dist/chunks/studio-zn7ysyzb.js +5 -0
  143. package/dist/chunks/{studio-xx3r3sb0.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/tab-strip.json +5 -5
  192. package/src/surfaces/tab-strip.ts +2 -2
  193. package/src/types.ts +2 -0
  194. package/src/ui/expression-editor.ts +10 -5
  195. package/src/ui/schema-form.ts +18 -1
  196. package/src/utils/edit-display.ts +27 -1
  197. package/dist/chunks/2020-906vx2dq.js +0 -4
  198. package/dist/chunks/adapter-hnvad61x.js +0 -4
  199. package/dist/chunks/cf-settings-mkbcz4z2.js +0 -4
  200. package/dist/chunks/color-04361ttk.js +0 -4
  201. package/dist/chunks/components-w5zqwva1.js +0 -4
  202. package/dist/chunks/content-source-g38w0d3f.js +0 -4
  203. package/dist/chunks/editor-wvf5e6j9.js +0 -4
  204. package/dist/chunks/entry-commands-t13dyw3c.js +0 -4
  205. package/dist/chunks/file-ops-1sghzgcr.js +0 -4
  206. package/dist/chunks/files-zrqtgt41.js +0 -4
  207. package/dist/chunks/format-host-9gy76erh.js +0 -4
  208. package/dist/chunks/fs-events-45rhg3me.js +0 -4
  209. package/dist/chunks/grid-open-t4fq6bbm.js +0 -4
  210. package/dist/chunks/iframe-host-9aq8ze3q.js +0 -4
  211. package/dist/chunks/index-f9qr7kzh.js +0 -4
  212. package/dist/chunks/jsonMode-vj30te2h.js +0 -13
  213. package/dist/chunks/jx-validate-r4ax11e3.js +0 -4
  214. package/dist/chunks/layers-m49nmwvx.js +0 -4
  215. package/dist/chunks/layers-panel-zr92pwdp.js +0 -4
  216. package/dist/chunks/lit-html-k2mb9k0r.js +0 -4
  217. package/dist/chunks/media-library-j74rt0w4.js +0 -4
  218. package/dist/chunks/media-open-mypr0k6b.js +0 -4
  219. package/dist/chunks/media-picker-pemtbsjv.js +0 -4
  220. package/dist/chunks/menu-d2jxpgma.js +0 -4
  221. package/dist/chunks/monaco-buffer-pa0g6ax7.js +0 -4
  222. package/dist/chunks/monaco-setup-0hw9f835.js +0 -4
  223. package/dist/chunks/notify-bwehrp7q.js +0 -4
  224. package/dist/chunks/platform-kv0k65cy.js +0 -4
  225. package/dist/chunks/popover-9tf4cjrk.js +0 -4
  226. package/dist/chunks/publish-panel-vg1n880b.js +0 -4
  227. package/dist/chunks/publish-workspace-jv4w2bx2.js +0 -4
  228. package/dist/chunks/quick-search-nh29rt8a.js +0 -4
  229. package/dist/chunks/references-vqyr5s9x.js +0 -4
  230. package/dist/chunks/right-panel-3ws9f2w0.js +0 -4
  231. package/dist/chunks/source-control-h3hcs5gy.js +0 -4
  232. package/dist/chunks/studio-0khd8xtx.js +0 -4
  233. package/dist/chunks/studio-1ctnw3xv.js +0 -5
  234. package/dist/chunks/studio-1ks5d9y4.js +0 -5
  235. package/dist/chunks/studio-1y9mab9m.js +0 -5
  236. package/dist/chunks/studio-2kpxm0eh.js +0 -7
  237. package/dist/chunks/studio-2zz4qbv9.js +0 -5
  238. package/dist/chunks/studio-3pz4t5a2.js +0 -5
  239. package/dist/chunks/studio-4f7thq0p.js +0 -5
  240. package/dist/chunks/studio-7rrdbvex.js +0 -5
  241. package/dist/chunks/studio-9dq7rwc7.js +0 -5
  242. package/dist/chunks/studio-acer0g8w.js +0 -5
  243. package/dist/chunks/studio-brh8d2pr.js +0 -5
  244. package/dist/chunks/studio-c2fa783p.js +0 -9
  245. package/dist/chunks/studio-cfnn70h1.js +0 -5
  246. package/dist/chunks/studio-cqxj4fcy.js +0 -5
  247. package/dist/chunks/studio-cw11h078.js +0 -5
  248. package/dist/chunks/studio-dn56z7sn.js +0 -5
  249. package/dist/chunks/studio-egnjpyde.js +0 -9
  250. package/dist/chunks/studio-ejrypvmq.js +0 -5
  251. package/dist/chunks/studio-frc16j8v.js +0 -10
  252. package/dist/chunks/studio-j0zf5x2x.js +0 -5
  253. package/dist/chunks/studio-j5fcp6gj.js +0 -5
  254. package/dist/chunks/studio-jd1qb1st.js +0 -7
  255. package/dist/chunks/studio-k1xqrgm5.js +0 -5
  256. package/dist/chunks/studio-k3we3kqb.js +0 -5
  257. package/dist/chunks/studio-knsjyx7n.js +0 -5
  258. package/dist/chunks/studio-mrjtnm62.js +0 -5
  259. package/dist/chunks/studio-n9qba0gx.js +0 -5
  260. package/dist/chunks/studio-nzemfbkk.js +0 -14
  261. package/dist/chunks/studio-pwctzka3.js +0 -16
  262. package/dist/chunks/studio-q80fg1d6.js +0 -12
  263. package/dist/chunks/studio-q9hx2qp0.js +0 -5
  264. package/dist/chunks/studio-qrzmfaf6.js +0 -5
  265. package/dist/chunks/studio-tmfcn347.js +0 -6
  266. package/dist/chunks/studio-wqfaqw4m.js +0 -5
  267. package/dist/chunks/studio-xpx91fby.js +0 -6
  268. package/dist/chunks/studio-xva3hzkv.js +0 -5
  269. package/dist/chunks/studio-z3fztxrp.js +0 -9
  270. package/dist/chunks/studio-z9453ypn.js +0 -6
  271. package/dist/chunks/tsMode-jg1dtphj.js +0 -14
  272. package/dist/chunks/workspace-6ztqcrsh.js +0 -4
  273. package/dist/chunks/workspace-home-rse9h8a0.js +0 -4
  274. package/src/content/draft-state.ts +0 -108
@@ -0,0 +1,12 @@
1
+ import{pe}from"./studio-7qqb7hb8.js";var it=pe(function(Br){Object.defineProperty(Br,"__esModule",{value:!0});Br.regexpCode=Br.getEsmExportName=Br.getProperty=Br.safeStringify=Br.stringify=Br.strConcat=Br.addCodeArg=Br.str=Br._=Br.nil=Br._Code=Br.Name=Br.IDENTIFIER=Br._CodeOrName=void 0;class pt{}Br._CodeOrName=pt;Br.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Ve extends pt{constructor(e){super();if(!Br.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Br.Name=Ve;class Y extends pt{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof Ve)t[r.str]=(t[r.str]||0)+1;return t},{})}}Br._Code=Y;Br.nil=new Y("");function Gr(e,...t){let r=[e[0]],s=0;while(s<t.length)nr(r,t[s]),r.push(e[++s]);return new Y(r)}Br._=Gr;var sr=new Y("+");function Jr(e,...t){let r=[ot(e[0])],s=0;while(s<t.length)r.push(sr),nr(r,t[s]),r.push(sr,ot(e[++s]));return Ia(r),new Y(r)}Br.str=Jr;function nr(e,t){if(t instanceof Y)e.push(...t._items);else if(t instanceof Ve)e.push(t);else e.push(Da(t))}Br.addCodeArg=nr;function Ia(e){let t=1;while(t<e.length-1){if(e[t]===sr){let r=ja(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function ja(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Ve||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Ve))return`"${e}${t.slice(1)}`;return}function Ta(e,t){return t.emptyStr()?e:e.emptyStr()?t:Jr`${e}${t}`}Br.strConcat=Ta;function Da(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ot(Array.isArray(e)?e.join(","):e)}function Ca(e){return new Y(ot(e))}Br.stringify=Ca;function ot(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Br.safeStringify=ot;function Aa(e){return typeof e=="string"&&Br.IDENTIFIER.test(e)?new Y(`.${e}`):Gr`[${e}]`}Br.getProperty=Aa;function Ma(e){if(typeof e=="string"&&Br.IDENTIFIER.test(e))return new Y(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Br.getEsmExportName=Ma;function Fa(e){return new Y(e.toString())}Br.regexpCode=Fa});var cr=pe(function(Xr){Object.defineProperty(Xr,"__esModule",{value:!0});Xr.ValueScope=Xr.ValueScopeName=Xr.Scope=Xr.varKinds=Xr.UsedValueState=void 0;var T=it();class Qr extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var yt;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(yt||(Xr.UsedValueState=yt={}));Xr.varKinds={const:new T.Name("const"),let:new T.Name("let"),var:new T.Name("var")};class ir{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof T.Name?e:this.name(e)}name(e){return new T.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Xr.Scope=ir;class ar extends T.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=T._`.${new T.Name(t)}[${r}]`}}Xr.ValueScopeName=ar;var Xa=T._`\n`;class Zr extends ir{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Xa:T.nil}}get(){return this._scope}name(e){return new ar(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:n}=s,o=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[n];if(i){let u=i.get(o);if(u)return u}else i=this._values[n]=new Map;i.set(o,s);let a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,s.setValue(t,{property:n,itemIndex:c}),s}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return T._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(s)=>{if(s.value===void 0)throw Error(`CodeGen: name "${s}" has no value`);return s.value.code},t,r)}_reduceValues(e,t,r={},s){let n=T.nil;for(let o in e){let i=e[o];if(!i)continue;let a=r[o]=r[o]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,yt.Started);let u=t(c);if(u){let l=this.opts.es5?Xr.varKinds.var:Xr.varKinds.const;n=T._`${n}${l} ${c} = ${u};${this.opts._n}`}else if(u=s===null||s===void 0?void 0:s(c))n=T._`${n}${u}${this.opts._n}`;else throw new Qr(c);a.set(c,yt.Completed)})}return n}}Xr.ValueScope=Zr});var Bt=pe(function(K){Object.defineProperty(K,"__esModule",{value:!0});K.or=K.and=K.not=K.CodeGen=K.operators=K.varKinds=K.ValueScopeName=K.ValueScope=K.Scope=K.Name=K.regexpCode=K.stringify=K.getProperty=K.nil=K.strConcat=K.str=K._=void 0;var w=it(),A=cr(),ye=it();Object.defineProperty(K,"_",{enumerable:!0,get:function(){return ye._}});Object.defineProperty(K,"str",{enumerable:!0,get:function(){return ye.str}});Object.defineProperty(K,"strConcat",{enumerable:!0,get:function(){return ye.strConcat}});Object.defineProperty(K,"nil",{enumerable:!0,get:function(){return ye.nil}});Object.defineProperty(K,"getProperty",{enumerable:!0,get:function(){return ye.getProperty}});Object.defineProperty(K,"stringify",{enumerable:!0,get:function(){return ye.stringify}});Object.defineProperty(K,"regexpCode",{enumerable:!0,get:function(){return ye.regexpCode}});Object.defineProperty(K,"Name",{enumerable:!0,get:function(){return ye.Name}});var Et=cr();Object.defineProperty(K,"Scope",{enumerable:!0,get:function(){return Et.Scope}});Object.defineProperty(K,"ValueScope",{enumerable:!0,get:function(){return Et.ValueScope}});Object.defineProperty(K,"ValueScopeName",{enumerable:!0,get:function(){return Et.ValueScopeName}});Object.defineProperty(K,"varKinds",{enumerable:!0,get:function(){return Et.varKinds}});K.operators={GT:new w._Code(">"),GTE:new w._Code(">="),LT:new w._Code("<"),LTE:new w._Code("<="),EQ:new w._Code("==="),NEQ:new w._Code("!=="),NOT:new w._Code("!"),OR:new w._Code("||"),AND:new w._Code("&&"),ADD:new w._Code("+")};class _e{optimizeNodes(){return this}optimizeNames(e,t){return this}}class es extends _e{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?A.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Ue(this.rhs,e,t);return this}get names(){return this.rhs instanceof w._CodeOrName?this.rhs.names:{}}}class dr extends _e{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof w.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Ue(this.rhs,e,t),this}get names(){let e=this.lhs instanceof w.Name?{}:{...this.lhs.names};return wt(e,this.rhs)}}class ts extends dr{constructor(e,t,r,s){super(e,r,s);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class rs extends _e{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class ss extends _e{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class ns extends _e{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class os extends _e{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Ue(this.code,e,t),this}get names(){return this.code instanceof w._CodeOrName?this.code.names:{}}}class bt extends _e{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,s=r.length;while(s--){let n=r[s];if(n.optimizeNames(e,t))continue;rc(e,n.names),r.splice(s,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Te(e,t.names),{})}}class ge extends bt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class is extends bt{}class at extends ge{}at.kind="else";class he extends ge{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new at(r):r}if(t){if(e===!1)return t instanceof he?t:t.nodes;if(this.nodes.length)return this;return new he(ds(e),t instanceof he?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Ue(this.condition,e,t),this}get names(){let e=super.names;if(wt(e,this.condition),this.else)Te(e,this.else.names);return e}}he.kind="if";class ze extends ge{}ze.kind="for";class as extends ze{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Ue(this.iteration,e,t),this}get names(){return Te(super.names,this.iteration.names)}}class cs extends ze{constructor(e,t,r,s){super();this.varKind=e,this.name=t,this.from=r,this.to=s}render(e){let t=e.es5?A.varKinds.var:this.varKind,{name:r,from:s,to:n}=this;return`for(${t} ${r}=${s}; ${r}<${n}; ${r}++)`+super.render(e)}get names(){let e=wt(super.names,this.from);return wt(e,this.to)}}class ur extends ze{constructor(e,t,r,s){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Ue(this.iterable,e,t),this}get names(){return Te(super.names,this.iterable.names)}}class _t extends ge{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}_t.kind="func";class gt extends bt{render(e){return"return "+super.render(e)}}gt.kind="return";class us extends ge{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,s;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(s=this.finally)===null||s===void 0||s.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Te(e,this.catch.names);if(this.finally)Te(e,this.finally.names);return e}}class $t extends ge{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}$t.kind="catch";class vt extends ge{render(e){return"finally"+super.render(e)}}vt.kind="finally";class ls{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
2
+ `:""},this._extScope=e,this._scope=new A.Scope({parent:e}),this._nodes=[new is]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){let n=this._scope.toName(t);if(r!==void 0&&s)this._constants[n.str]=r;return this._leafNode(new es(e,n,r)),n}const(e,t,r){return this._def(A.varKinds.const,e,t,r)}let(e,t,r){return this._def(A.varKinds.let,e,t,r)}var(e,t,r){return this._def(A.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new dr(e,t,r))}add(e,t){return this._leafNode(new ts(e,K.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==w.nil)this._leafNode(new os(e));return this}object(...e){let t=["{"];for(let[r,s]of e){if(t.length>1)t.push(",");if(t.push(r),r!==s||this.opts.es5)t.push(":"),w.addCodeArg(t,s)}return t.push("}"),new w._Code(t)}if(e,t,r){if(this._blockNode(new he(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new he(e))}else(){return this._elseNode(new at)}endIf(){return this._endBlockNode(he,at)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new as(e),t)}forRange(e,t,r,s,n=this.opts.es5?A.varKinds.var:A.varKinds.let){let o=this._scope.toName(e);return this._for(new cs(n,o,t,r),()=>s(o))}forOf(e,t,r,s=A.varKinds.const){let n=this._scope.toName(e);if(this.opts.es5){let o=t instanceof w.Name?t:this.var("_arr",t);return this.forRange("_i",0,w._`${o}.length`,(i)=>{this.var(n,w._`${o}[${i}]`),r(n)})}return this._for(new ur("of",s,n,t),()=>r(n))}forIn(e,t,r,s=this.opts.es5?A.varKinds.var:A.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,w._`Object.keys(${t})`,r);let n=this._scope.toName(e);return this._for(new ur("in",s,n,t),()=>r(n))}endFor(){return this._endBlockNode(ze)}label(e){return this._leafNode(new rs(e))}break(e){return this._leafNode(new ss(e))}return(e){let t=new gt;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(gt)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let s=new us;if(this._blockNode(s),this.code(e),t){let n=this.name("e");this._currNode=s.catch=new $t(n),t(n)}if(r)this._currNode=s.finally=new vt,this.code(r);return this._endBlockNode($t,vt)}throw(e){return this._leafNode(new ns(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=w.nil,r,s){if(this._blockNode(new _t(e,t,r)),s)this.code(s).endFunc();return this}endFunc(){return this._endBlockNode(_t)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof he))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}K.CodeGen=ls;function Te(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function wt(e,t){return t instanceof w._CodeOrName?Te(e,t.names):e}function Ue(e,t,r){if(e instanceof w.Name)return s(e);if(!n(e))return e;return new w._Code(e._items.reduce((o,i)=>{if(i instanceof w.Name)i=s(i);if(i instanceof w._Code)o.push(...i._items);else o.push(i);return o},[]));function s(o){let i=r[o.str];if(i===void 0||t[o.str]!==1)return o;return delete t[o.str],i}function n(o){return o instanceof w._Code&&o._items.some((i)=>i instanceof w.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function rc(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function ds(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:w._`!${lr(e)}`}K.not=ds;var sc=fs(K.operators.AND);function nc(...e){return e.reduce(sc)}K.and=nc;var oc=fs(K.operators.OR);function ic(...e){return e.reduce(oc)}K.or=ic;function fs(e){return(t,r)=>t===w.nil?r:r===w.nil?t:w._`${lr(t)} ${e} ${lr(r)}`}function lr(e){return e instanceof w.Name?e:w._`(${e})`}});var vn=pe(function(Es){Object.defineProperty(Es,"__esModule",{value:!0});Es.checkStrictMode=Es.getErrorPath=Es.Type=Es.useFunc=Es.setEvaluated=Es.evaluatedPropsToName=Es.mergeEvaluated=Es.eachItem=Es.unescapeJsonPointer=Es.escapeJsonPointer=Es.escapeFragment=Es.unescapeFragment=Es.schemaRefOrVal=Es.schemaHasRulesButRef=Es.schemaHasRules=Es.checkUnknownRules=Es.alwaysValidSchema=Es.toHash=void 0;var b=Bt(),ys=it();function lc(e){let t={};for(let r of e)t[r]=!0;return t}Es.toHash=lc;function dc(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return _s(e,t),!gs(t,e.self.RULES.all)}Es.alwaysValidSchema=dc;function _s(e,t=e.schema){let{opts:r,self:s}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let n=s.RULES.keywords;for(let o in t)if(!n[o])ws(e,`unknown keyword: "${o}"`)}Es.checkUnknownRules=_s;function gs(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Es.schemaHasRules=gs;function fc(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Es.schemaHasRulesButRef=fc;function hc({topSchemaRef:e,schemaPath:t},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return b._`${r}`}return b._`${e}${t}${b.getProperty(s)}`}Es.schemaRefOrVal=hc;function pc(e){return $s(decodeURIComponent(e))}Es.unescapeFragment=pc;function mc(e){return encodeURIComponent(hr(e))}Es.escapeFragment=mc;function hr(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Es.escapeJsonPointer=hr;function $s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Es.unescapeJsonPointer=$s;function yc(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Es.eachItem=yc;function ps({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:s}){return(n,o,i,a)=>{let c=i===void 0?o:i instanceof b.Name?(o instanceof b.Name?e(n,o,i):t(n,o,i),i):o instanceof b.Name?(t(n,i,o),o):r(o,i);return a===b.Name&&!(c instanceof b.Name)?s(n,c):c}}Es.mergeEvaluated={props:ps({mergeNames:(e,t,r)=>e.if(b._`${r} !== true && ${t} !== undefined`,()=>{e.if(b._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,b._`${r} || {}`).code(b._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(b._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,b._`${r} || {}`),pr(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:vs}),items:ps({mergeNames:(e,t,r)=>e.if(b._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,b._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(b._`${r} !== true`,()=>e.assign(r,t===!0?!0:b._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function vs(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",b._`{}`);if(t!==void 0)pr(e,r,t);return r}Es.evaluatedPropsToName=vs;function pr(e,t,r){Object.keys(r).forEach((s)=>e.assign(b._`${t}${b.getProperty(s)}`,!0))}Es.setEvaluated=pr;var ms={};function _c(e,t){return e.scopeValue("func",{ref:t,code:ms[t.code]||(ms[t.code]=new ys._Code(t.code))})}Es.useFunc=_c;var fr;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(fr||(Es.Type=fr={}));function gc(e,t,r){if(e instanceof b.Name){let s=t===fr.Num;return r?s?b._`"[" + ${e} + "]"`:b._`"['" + ${e} + "']"`:s?b._`"/" + ${e}`:b._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?b.getProperty(e).toString():"/"+hr(e)}Es.getErrorPath=gc;function ws(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}Es.checkStrictMode=ws});var Dc=pe(function(Ss){Object.defineProperty(Ss,"__esModule",{value:!0});var q=Bt(),Ac={data:new q.Name("data"),valCxt:new q.Name("valCxt"),instancePath:new q.Name("instancePath"),parentData:new q.Name("parentData"),parentDataProperty:new q.Name("parentDataProperty"),rootData:new q.Name("rootData"),dynamicAnchors:new q.Name("dynamicAnchors"),vErrors:new q.Name("vErrors"),errors:new q.Name("errors"),this:new q.Name("this"),self:new q.Name("self"),scope:new q.Name("scope"),json:new q.Name("json"),jsonPos:new q.Name("jsonPos"),jsonLen:new q.Name("jsonLen"),jsonPart:new q.Name("jsonPart")};Ss.default=Ac});var ct=pe(function(Rs){Object.defineProperty(Rs,"__esModule",{value:!0});Rs.extendErrors=Rs.resetErrorsCount=Rs.reportExtraError=Rs.reportError=Rs.keyword$DataError=Rs.keywordError=void 0;var E=Bt(),$e=vn(),L=Dc();Rs.keywordError={message:({keyword:e})=>E.str`must pass "${e}" keyword validation`};Rs.keyword$DataError={message:({keyword:e,schemaType:t})=>t?E.str`"${e}" keyword must be ${t} ($data)`:E.str`"${e}" keyword is invalid ($data)`};function Fc(e,t=Rs.keywordError,r,s){let{it:n}=e,{gen:o,compositeRule:i,allErrors:a}=n,c=Os(e,t,r);if(s!==null&&s!==void 0?s:i||a)Ps(o,c);else xs(n,E._`[${c}]`)}Rs.reportError=Fc;function Vc(e,t=Rs.keywordError,r){let{it:s}=e,{gen:n,compositeRule:o,allErrors:i}=s,a=Os(e,t,r);if(Ps(n,a),!(o||i))xs(s,L.default.vErrors)}Rs.reportExtraError=Vc;function zc(e,t){e.assign(L.default.errors,t),e.if(E._`${L.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(E._`${L.default.vErrors}.length`,t),()=>e.assign(L.default.vErrors,null)))}Rs.resetErrorsCount=zc;function Uc({gen:e,keyword:t,schemaValue:r,data:s,errsCount:n,it:o}){if(n===void 0)throw Error("ajv implementation error");let i=e.name("err");e.forRange("i",n,L.default.errors,(a)=>{if(e.const(i,E._`${L.default.vErrors}[${a}]`),e.if(E._`${i}.instancePath === undefined`,()=>e.assign(E._`${i}.instancePath`,E.strConcat(L.default.instancePath,o.errorPath))),e.assign(E._`${i}.schemaPath`,E.str`${o.errSchemaPath}/${t}`),o.opts.verbose)e.assign(E._`${i}.schema`,r),e.assign(E._`${i}.data`,s)})}Rs.extendErrors=Uc;function Ps(e,t){let r=e.const("err",t);e.if(E._`${L.default.vErrors} === null`,()=>e.assign(L.default.vErrors,E._`[${r}]`),E._`${L.default.vErrors}.push(${r})`),e.code(E._`${L.default.errors}++`)}function xs(e,t){let{gen:r,validateName:s,schemaEnv:n}=e;if(n.$async)r.throw(E._`new ${e.ValidationError}(${t})`);else r.assign(E._`${s}.errors`,t),r.return(!1)}var De={keyword:new E.Name("keyword"),schemaPath:new E.Name("schemaPath"),params:new E.Name("params"),propertyName:new E.Name("propertyName"),message:new E.Name("message"),schema:new E.Name("schema"),parentSchema:new E.Name("parentSchema")};function Os(e,t,r){let{createErrors:s}=e.it;if(s===!1)return E._`{}`;return Hc(e,t,r)}function Hc(e,t,r={}){let{gen:s,it:n}=e,o=[Lc(n,r),Kc(e,r)];return Gc(e,t,o),s.object(...o)}function Lc({errorPath:e},{instancePath:t}){let r=t?E.str`${e}${$e.getErrorPath(t,$e.Type.Str)}`:e;return[L.default.instancePath,E.strConcat(L.default.instancePath,r)]}function Kc({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let n=s?t:E.str`${t}/${e}`;if(r)n=E.str`${n}${$e.getErrorPath(r,$e.Type.Str)}`;return[De.schemaPath,n]}function Gc(e,{params:t,message:r},s){let{keyword:n,data:o,schemaValue:i,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:f}=a;if(s.push([De.keyword,n],[De.params,typeof t=="function"?t(e):t||E._`{}`]),c.messages)s.push([De.message,typeof r=="function"?r(e):r]);if(c.verbose)s.push([De.schema,i],[De.parentSchema,E._`${l}${f}`],[L.default.data,o]);if(u)s.push([De.propertyName,u])}});var Ds=pe(function(js){Object.defineProperty(js,"__esModule",{value:!0});js.boolOrEmptySchema=js.topBoolOrEmptySchema=void 0;var Ns=ct(),qs=Bt(),Zc=Dc(),Xc={message:"boolean schema is false"};function Yc(e){let{gen:t,schema:r,validateName:s}=e;if(r===!1)Is(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(Zc.default.data);else t.assign(qs._`${s}.errors`,null),t.return(!0)}js.topBoolOrEmptySchema=Yc;function eu(e,t){let{gen:r,schema:s}=e;if(s===!1)r.var(t,!1),Is(e);else r.var(t,!0)}js.boolOrEmptySchema=eu;function Is(e,t){let{gen:r,data:s}=e;Ns.reportError({gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},Xc,void 0,t)}});var yr=pe(function(Cs){Object.defineProperty(Cs,"__esModule",{value:!0});Cs.getRules=Cs.isJSONType=void 0;var ru=["string","number","integer","boolean","null","object","array"],su=new Set(ru);function nu(e){return typeof e=="string"&&su.has(e)}Cs.isJSONType=nu;function ou(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Cs.getRules=ou});var _r=pe(function(Vs){Object.defineProperty(Vs,"__esModule",{value:!0});Vs.shouldUseRule=Vs.shouldUseGroup=Vs.schemaHasRulesForType=void 0;function au({schema:e,self:t},r){let s=t.RULES.types[r];return s&&s!==!0&&Ms(e,s)}Vs.schemaHasRulesForType=au;function Ms(e,t){return t.rules.some((r)=>Fs(e,r))}Vs.shouldUseGroup=Ms;function Fs(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((s)=>e[s]!==void 0))}Vs.shouldUseRule=Fs});var ut=pe(function(Js){Object.defineProperty(Js,"__esModule",{value:!0});Js.reportTypeError=Js.checkDataTypes=Js.checkDataType=Js.coerceAndCheckDataType=Js.getJSONTypes=Js.getSchemaTypes=Js.DataType=void 0;var Us=yr(),Hs=_r(),Ls=ct(),_=Bt(),Pt=vn(),He;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(He||(Js.DataType=He={}));function lu(e){let t=Ks(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}Js.getSchemaTypes=lu;function Ks(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Us.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}Js.getJSONTypes=Ks;function du(e,t){let{gen:r,data:s,opts:n}=e,o=fu(t,n.coerceTypes),i=t.length>0&&!(o.length===0&&t.length===1&&Hs.schemaHasRulesForType(e,t[0]));if(i){let a=$r(t,s,n.strictNumbers,He.Wrong);r.if(a,()=>{if(o.length)hu(e,t,o);else vr(e)})}return i}Js.coerceAndCheckDataType=du;var Gs=new Set(["string","number","integer","boolean","null"]);function fu(e,t){return t?e.filter((r)=>Gs.has(r)||t==="array"&&r==="array"):[]}function hu(e,t,r){let{gen:s,data:n,opts:o}=e,i=s.let("dataType",_._`typeof ${n}`),a=s.let("coerced",_._`undefined`);if(o.coerceTypes==="array")s.if(_._`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,_._`${n}[0]`).assign(i,_._`typeof ${n}`).if($r(t,n,o.strictNumbers),()=>s.assign(a,n)));s.if(_._`${a} !== undefined`);for(let u of r)if(Gs.has(u)||u==="array"&&o.coerceTypes==="array")c(u);s.else(),vr(e),s.endIf(),s.if(_._`${a} !== undefined`,()=>{s.assign(n,a),pu(e,a)});function c(u){switch(u){case"string":s.elseIf(_._`${i} == "number" || ${i} == "boolean"`).assign(a,_._`"" + ${n}`).elseIf(_._`${n} === null`).assign(a,_._`""`);return;case"number":s.elseIf(_._`${i} == "boolean" || ${n} === null
3
+ || (${i} == "string" && ${n} && ${n} == +${n})`).assign(a,_._`+${n}`);return;case"integer":s.elseIf(_._`${i} === "boolean" || ${n} === null
4
+ || (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,_._`+${n}`);return;case"boolean":s.elseIf(_._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf(_._`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":s.elseIf(_._`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(a,null);return;case"array":s.elseIf(_._`${i} === "string" || ${i} === "number"
5
+ || ${i} === "boolean" || ${n} === null`).assign(a,_._`[${n}]`)}}}function pu({gen:e,parentData:t,parentDataProperty:r},s){e.if(_._`${t} !== undefined`,()=>e.assign(_._`${t}[${r}]`,s))}function gr(e,t,r,s=He.Correct){let n=s===He.Correct?_.operators.EQ:_.operators.NEQ,o;switch(e){case"null":return _._`${t} ${n} null`;case"array":o=_._`Array.isArray(${t})`;break;case"object":o=_._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=i(_._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=i();break;default:return _._`typeof ${t} ${n} ${e}`}return s===He.Correct?o:_.not(o);function i(a=_.nil){return _.and(_._`typeof ${t} == "number"`,a,r?_._`isFinite(${t})`:_.nil)}}Js.checkDataType=gr;function $r(e,t,r,s){if(e.length===1)return gr(e[0],t,r,s);let n,o=Pt.toHash(e);if(o.array&&o.object){let i=_._`typeof ${t} != "object"`;n=o.null?i:_._`!${t} || ${i}`,delete o.null,delete o.array,delete o.object}else n=_.nil;if(o.number)delete o.integer;for(let i in o)n=_.and(n,gr(i,t,r,s));return n}Js.checkDataTypes=$r;var mu={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?_._`{type: ${e}}`:_._`{type: ${t}}`};function vr(e){let t=yu(e);Ls.reportError(t,mu)}Js.reportTypeError=vr;function yu(e){let{gen:t,data:r,schema:s}=e,n=Pt.schemaRefOrVal(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:e}}});var Ys=pe(function(Zs){Object.defineProperty(Zs,"__esModule",{value:!0});Zs.assignDefaults=void 0;var W=Bt(),Qs=vn();function bu(e,t){let{properties:r,items:s}=e.schema;if(t==="object"&&r)for(let n in r)Ws(e,n,r[n].default);else if(t==="array"&&Array.isArray(s))s.forEach((n,o)=>Ws(e,o,n.default))}Zs.assignDefaults=bu;function Ws(e,t,r){let{gen:s,compositeRule:n,data:o,opts:i}=e;if(r===void 0)return;let a=W._`${o}${W.getProperty(t)}`;if(n){Qs.checkStrictMode(e,`default is ignored for: ${a}`);return}let c=W._`${a} === undefined`;if(i.useDefaults==="empty")c=W._`${c} || ${a} === null || ${a} === ""`;s.if(c,W._`${a} = ${W.stringify(r)}`)}});var Q=pe(function(sn){Object.defineProperty(sn,"__esModule",{value:!0});sn.validateUnion=sn.validateArray=sn.usePattern=sn.callValidateCode=sn.schemaProperties=sn.allSchemaProperties=sn.noPropertyInData=sn.propertyInData=sn.isOwnProperty=sn.hasPropFunc=sn.reportMissingProp=sn.checkMissingProp=sn.checkReportMissingProp=void 0;var S=Bt(),Le=vn(),ve=Dc(),en=vn();function Su(e,t){let{gen:r,data:s,it:n}=e;r.if(Er(r,s,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:S._`${t}`},!0),e.error()})}sn.checkReportMissingProp=Su;function Pu({gen:e,data:t,it:{opts:r}},s,n){return S.or(...s.map((o)=>S.and(Er(e,t,o,r.ownProperties),S._`${n} = ${o}`)))}sn.checkMissingProp=Pu;function xu(e,t){e.setParams({missingProperty:t},!0),e.error()}sn.reportMissingProp=xu;function tn(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:S._`Object.prototype.hasOwnProperty`})}sn.hasPropFunc=tn;function wr(e,t,r){return S._`${tn(e)}.call(${t}, ${r})`}sn.isOwnProperty=wr;function Ou(e,t,r,s){let n=S._`${t}${S.getProperty(r)} !== undefined`;return s?S._`${n} && ${wr(e,t,r)}`:n}sn.propertyInData=Ou;function Er(e,t,r,s){let n=S._`${t}${S.getProperty(r)} === undefined`;return s?S.or(n,S.not(wr(e,t,r))):n}sn.noPropertyInData=Er;function rn(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}sn.allSchemaProperties=rn;function Ru(e,t){return rn(t).filter((r)=>!Le.alwaysValidSchema(e,t[r]))}sn.schemaProperties=Ru;function ku({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:o},it:i},a,c,u){let l=u?S._`${e}, ${t}, ${s}${n}`:t,f=[[ve.default.instancePath,S.strConcat(ve.default.instancePath,o)],[ve.default.parentData,i.parentData],[ve.default.parentDataProperty,i.parentDataProperty],[ve.default.rootData,ve.default.rootData]];if(i.opts.dynamicRef)f.push([ve.default.dynamicAnchors,ve.default.dynamicAnchors]);let v=S._`${l}, ${r.object(...f)}`;return c!==S.nil?S._`${a}.call(${c}, ${v})`:S._`${a}(${v})`}sn.callValidateCode=ku;var Nu=S._`new RegExp`;function qu({gen:e,it:{opts:t}},r){let s=t.unicodeRegExp?"u":"",{regExp:n}=t.code,o=n(r,s);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:S._`${n.code==="new RegExp"?Nu:en.useFunc(e,n)}(${r}, ${s})`})}sn.usePattern=qu;function Iu(e){let{gen:t,data:r,keyword:s,it:n}=e,o=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(o,!0),i(()=>t.break()),o;function i(a){let c=t.const("len",S._`${r}.length`);t.forRange("i",0,c,(u)=>{e.subschema({keyword:s,dataProp:u,dataPropType:Le.Type.Num},o),t.if(S.not(o),a)})}}sn.validateArray=Iu;function ju(e){let{gen:t,schema:r,keyword:s,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>Le.alwaysValidSchema(n,c))&&!n.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:s,schemaProp:u,compositeRule:!0},a);if(t.assign(i,S._`${i} || ${a}`),!e.mergeValidEvaluated(l,a))t.if(S.not(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}sn.validateUnion=ju});var fn=pe(function(ln){Object.defineProperty(ln,"__esModule",{value:!0});ln.validateKeywordUsage=ln.validSchemaType=ln.funcKeywordCode=ln.macroKeywordCode=void 0;var I=Bt(),Ce=Dc(),an=Q(),cn=ct();function Gu(e,t){let{gen:r,keyword:s,schema:n,parentSchema:o,it:i}=e,a=t.macro.call(i.self,n,o,i),c=un(r,s,a);if(i.opts.validateSchema!==!1)i.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:I.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}ln.macroKeywordCode=Gu;function Ju(e,t){var r;let{gen:s,keyword:n,schema:o,parentSchema:i,$data:a,it:c}=e;Wu(c,t);let u=!a&&t.compile?t.compile.call(c.self,o,i,c):t.validate,l=un(s,n,u),f=s.let("valid");e.block$data(f,v),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function v(){if(t.errors===!1){if(h(),t.modifying)on(e);m(()=>e.error())}else{let g=t.async?y():p();if(t.modifying)on(e);m(()=>Bu(e,g))}}function y(){let g=s.let("ruleErrs",null);return s.try(()=>h(I._`await `),(O)=>s.assign(f,!1).if(I._`${O} instanceof ${c.ValidationError}`,()=>s.assign(g,I._`${O}.errors`),()=>s.throw(O))),g}function p(){let g=I._`${l}.errors`;return s.assign(g,null),h(I.nil),g}function h(g=t.async?I._`await `:I.nil){let O=c.opts.passContext?Ce.default.this:Ce.default.self,x=!(("compile"in t)&&!a||t.schema===!1);s.assign(f,I._`${g}${an.callValidateCode(e,l,O,x)}`,t.modifying)}function m(g){var O;s.if(I.not((O=t.valid)!==null&&O!==void 0?O:f),g)}}ln.funcKeywordCode=Ju;function on(e){let{gen:t,data:r,it:s}=e;t.if(s.parentData,()=>t.assign(r,I._`${s.parentData}[${s.parentDataProperty}]`))}function Bu(e,t){let{gen:r}=e;r.if(I._`Array.isArray(${t})`,()=>{r.assign(Ce.default.vErrors,I._`${Ce.default.vErrors} === null ? ${t} : ${Ce.default.vErrors}.concat(${t})`).assign(Ce.default.errors,I._`${Ce.default.vErrors}.length`),cn.extendErrors(e)},()=>e.error())}function Wu({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function un(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:I.stringify(r)})}function Qu(e,t,r=!1){return!t.length||t.some((s)=>s==="array"?Array.isArray(e):s==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==s||r&&typeof e>"u")}ln.validSchemaType=Qu;function Zu({schema:e,opts:t,self:r,errSchemaPath:s},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw Error("ajv implementation error");let i=n.dependencies;if(i===null||i===void 0?void 0:i.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}ln.validateKeywordUsage=Zu});var mn=pe(function(hn){Object.defineProperty(hn,"__esModule",{value:!0});hn.extendSubschemaMode=hn.extendSubschemaData=hn.getSubschema=void 0;var z=Bt(),xt=vn();function tl(e,{keyword:t,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:o,topSchemaRef:i}){if(t!==void 0&&s!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:z._`${e.schemaPath}${z.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:z._`${e.schemaPath}${z.getProperty(t)}${z.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${xt.escapeFragment(r)}`}}if(s!==void 0){if(n===void 0||o===void 0||i===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')}hn.getSubschema=tl;function rl(e,t,{dataProp:r,dataPropType:s,data:n,dataTypes:o,propertyName:i}){if(n!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:f}=t,v=a.let("data",z._`${t.data}${z.getProperty(r)}`,!0);c(v),e.errorPath=z.str`${u}${xt.getErrorPath(r,s,f.jsPropertySyntax)}`,e.parentDataProperty=z._`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof z.Name?n:a.let("data",n,!0);if(c(u),i!==void 0)e.propertyName=i}if(o)e.dataTypes=o;function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}hn.extendSubschemaData=rl;function sl(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:o}){if(s!==void 0)e.compositeRule=s;if(n!==void 0)e.createErrors=n;if(o!==void 0)e.allErrors=o;e.jtdDiscriminator=t,e.jtdMetadata=r}hn.extendSubschemaMode=sl});var br=pe(function(gm,yn){yn.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var s,n,o;if(Array.isArray(t)){if(s=t.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),s=o.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=s;n--!==0;){var i=o[n];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var gn=pe(function($m,_n){var we=_n.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Ot(t,s,n,e,"",e)};we.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};we.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};we.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};we.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ot(e,t,r,s,n,o,i,a,c,u){if(s&&typeof s=="object"&&!Array.isArray(s)){t(s,n,o,i,a,c,u);for(var l in s){var f=s[l];if(Array.isArray(f)){if(l in we.arrayKeywords)for(var v=0;v<f.length;v++)Ot(e,t,r,f[v],n+"/"+l+"/"+v,o,n,l,s,v)}else if(l in we.propsKeywords){if(f&&typeof f=="object")for(var y in f)Ot(e,t,r,f[y],n+"/"+l+"/"+il(y),o,n,l,s,y)}else if(l in we.keywords||e.allKeys&&!(l in we.skipKeywords))Ot(e,t,r,f,n+"/"+l,o,n,l,s)}r(s,n,o,i,a,c,u)}}function il(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var lt=pe(function(Sn){Object.defineProperty(Sn,"__esModule",{value:!0});Sn.getSchemaRefs=Sn.resolveUrl=Sn.normalizeId=Sn._getFullPath=Sn.getFullPath=Sn.inlineRef=void 0;var $n=vn(),al=br(),cl=gn(),ul=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function ll(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!Sr(e);if(!t)return!1;return wn(e)<=t}Sn.inlineRef=ll;var dl=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Sr(e){for(let t in e){if(dl.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Sr))return!0;if(typeof r=="object"&&Sr(r))return!0}return!1}function wn(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,ul.has(r))continue;if(typeof e[r]=="object")$n.eachItem(e[r],(s)=>t+=wn(s));if(t===1/0)return 1/0}return t}function En(e,t="",r){if(r!==!1)t=Ke(t);let s=e.parse(t);return bn(e,s)}Sn.getFullPath=En;function bn(e,t){return e.serialize(t).split("#")[0]+"#"}Sn._getFullPath=bn;var fl=/#\/?$/;function Ke(e){return e?e.replace(fl,""):""}Sn.normalizeId=Ke;function hl(e,t,r){return r=Ke(r),e.resolve(t,r)}Sn.resolveUrl=hl;var pl=/^[a-z_][-a-z0-9._]*$/i;function ml(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=Ke(e[r]||t),o={"":n},i=En(s,n,!1),a={},c=new Set;return cl(e,{allKeys:!0},(f,v,y,p)=>{if(p===void 0)return;let h=i+v,m=o[p];if(typeof f[r]=="string")m=g.call(this,f[r]);O.call(this,f.$anchor),O.call(this,f.$dynamicAnchor),o[v]=m;function g(x){let j=this.opts.uriResolver.resolve;if(x=Ke(m?j(m,x):x),c.has(x))throw l(x);c.add(x);let R=this.refs[x];if(typeof R=="string")R=this.refs[R];if(typeof R=="object")u(f,R.schema,x);else if(x!==Ke(h))if(x[0]==="#")u(f,a[x],x),a[x]=f;else this.refs[x]=h;return x}function O(x){if(typeof x=="string"){if(!pl.test(x))throw Error(`invalid anchor "${x}"`);g.call(this,`#${x}`)}}}),a;function u(f,v,y){if(v!==void 0&&!al(f,v))throw l(y)}function l(f){return Error(`reference "${f}" resolves to more than one schema`)}}Sn.getSchemaRefs=ml});var Qg=pe(function(Vn){Object.defineProperty(Vn,"__esModule",{value:!0});Vn.getData=Vn.KeywordCxt=Vn.validateFunctionCode=void 0;var kt=Ds(),Rt=ut(),Je=_r(),Ee=ut(),kn=Ys(),re=fn(),Ge=mn(),d=Bt(),P=Dc(),Nn=lt(),U=vn(),te=ct();function wl(e){if(jn(e)){if(Tn(e),In(e)){Sl(e);return}}qn(e,()=>kt.topBoolOrEmptySchema(e))}Vn.validateFunctionCode=wl;function qn({gen:e,validateName:t,schema:r,schemaEnv:s,opts:n},o){if(n.code.es5)e.func(t,d._`${P.default.data}, ${P.default.valCxt}`,s.$async,()=>{e.code(d._`"use strict"; ${xn(r,n)}`),bl(e,n),e.code(o)});else e.func(t,d._`${P.default.data}, ${El(n)}`,s.$async,()=>e.code(xn(r,n)).code(o))}function El(e){return d._`{${P.default.instancePath}="", ${P.default.parentData}, ${P.default.parentDataProperty}, ${P.default.rootData}=${P.default.data}${e.dynamicRef?d._`, ${P.default.dynamicAnchors}={}`:d.nil}}={}`}function bl(e,t){e.if(P.default.valCxt,()=>{if(e.var(P.default.instancePath,d._`${P.default.valCxt}.${P.default.instancePath}`),e.var(P.default.parentData,d._`${P.default.valCxt}.${P.default.parentData}`),e.var(P.default.parentDataProperty,d._`${P.default.valCxt}.${P.default.parentDataProperty}`),e.var(P.default.rootData,d._`${P.default.valCxt}.${P.default.rootData}`),t.dynamicRef)e.var(P.default.dynamicAnchors,d._`${P.default.valCxt}.${P.default.dynamicAnchors}`)},()=>{if(e.var(P.default.instancePath,d._`""`),e.var(P.default.parentData,d._`undefined`),e.var(P.default.parentDataProperty,d._`undefined`),e.var(P.default.rootData,P.default.data),t.dynamicRef)e.var(P.default.dynamicAnchors,d._`{}`)})}function Sl(e){let{schema:t,opts:r,gen:s}=e;qn(e,()=>{if(r.$comment&&t.$comment)Cn(e);if(kl(e),s.let(P.default.vErrors,null),s.let(P.default.errors,0),r.unevaluated)Pl(e);Dn(e),Il(e)});return}function Pl(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",d._`${r}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`)),t.if(d._`${e.evaluated}.dynamicItems`,()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`))}function xn(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?d._`/*# sourceURL=${r} */`:d.nil}function xl(e,t){if(jn(e)){if(Tn(e),In(e)){Ol(e,t);return}}kt.boolOrEmptySchema(e,t)}function In({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function jn(e){return typeof e.schema!="boolean"}function Ol(e,t){let{schema:r,gen:s,opts:n}=e;if(n.$comment&&r.$comment)Cn(e);Nl(e),ql(e);let o=s.const("_errs",P.default.errors);Dn(e,o),s.var(t,d._`${o} === ${P.default.errors}`)}function Tn(e){U.checkUnknownRules(e),Rl(e)}function Dn(e,t){if(e.opts.jtd)return On(e,[],!1,t);let r=Rt.getSchemaTypes(e.schema),s=Rt.coerceAndCheckDataType(e,r);On(e,r,!s,t)}function Rl(e){let{schema:t,errSchemaPath:r,opts:s,self:n}=e;if(t.$ref&&s.ignoreKeywordsWithRef&&U.schemaHasRulesButRef(t,n.RULES))n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function kl(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)U.checkStrictMode(e,"default is ignored in the schema root")}function Nl(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=Nn.resolveUrl(e.opts.uriResolver,e.baseId,t)}function ql(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function Cn({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:n}){let o=r.$comment;if(n.$comment===!0)e.code(d._`${P.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let i=d.str`${s}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(d._`${P.default.self}.opts.$comment(${o}, ${i}, ${a}.schema)`)}}function Il(e){let{gen:t,schemaEnv:r,validateName:s,ValidationError:n,opts:o}=e;if(r.$async)t.if(d._`${P.default.errors} === 0`,()=>t.return(P.default.data),()=>t.throw(d._`new ${n}(${P.default.vErrors})`));else{if(t.assign(d._`${s}.errors`,P.default.vErrors),o.unevaluated)jl(e);t.return(d._`${P.default.errors} === 0`)}}function jl({gen:e,evaluated:t,props:r,items:s}){if(r instanceof d.Name)e.assign(d._`${t}.props`,r);if(s instanceof d.Name)e.assign(d._`${t}.items`,s)}function On(e,t,r,s){let{gen:n,schema:o,data:i,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!U.schemaHasRulesButRef(o,l))){n.block(()=>Mn(e,"$ref",l.all.$ref.definition));return}if(!c.jtd)Tl(e,t);n.block(()=>{for(let v of l.rules)f(v);f(l.post)});function f(v){if(!Je.shouldUseGroup(o,v))return;if(v.type){if(n.if(Ee.checkDataType(v.type,i,c.strictNumbers)),Rn(e,v),t.length===1&&t[0]===v.type&&r)n.else(),Ee.reportTypeError(e);n.endIf()}else Rn(e,v);if(!a)n.if(d._`${P.default.errors} === ${s||0}`)}}function Rn(e,t){let{gen:r,schema:s,opts:{useDefaults:n}}=e;if(n)kn.assignDefaults(e,t.type);r.block(()=>{for(let o of t.rules)if(Je.shouldUseRule(s,o))Mn(e,o.keyword,o.definition,t.type)})}function Tl(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(Dl(e,t),!e.opts.allowUnionTypes)Cl(e,t);Al(e,e.dataTypes)}function Dl(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!An(e.dataTypes,r))Pr(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Fl(e,t)}function Cl(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))Pr(e,"use allowUnionTypes to allow union type keyword")}function Al(e,t){let r=e.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&Je.shouldUseRule(e.schema,n)){let{type:o}=n.definition;if(o.length&&!o.some((i)=>Ml(t,i)))Pr(e,`missing type "${o.join(",")}" for keyword "${s}"`)}}}function Ml(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function An(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Fl(e,t){let r=[];for(let s of e.dataTypes)if(An(t,s))r.push(s);else if(t.includes("integer")&&s==="number")r.push("integer");e.dataTypes=r}function Pr(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,U.checkStrictMode(e,t,e.opts.strictTypes)}class xr{constructor(e,t,r){if(re.validateKeywordUsage(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=U.schemaRefOrVal(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Fn(this.$data,e));else if(this.schemaCode=this.schemaValue,!re.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",P.default.errors)}result(e,t,r){this.failResult(d.not(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult(d.not(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${d.or(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?te.reportExtraError:te.reportError)(this,this.def.error,t)}$dataError(){te.reportError(this,this.def.$dataError||te.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');te.resetErrorsCount(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:s,schemaType:n,def:o}=this;if(r.if(d.or(d._`${s} === undefined`,t)),e!==d.nil)r.assign(e,!0);if(n.length||o.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:s,it:n}=this;return d.or(o(),i());function o(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return d._`${Ee.checkDataTypes(a,t,n.opts.strictNumbers,Ee.DataType.Wrong)}`}return d.nil}function i(){if(s.validateSchema){let a=e.scopeValue("validate$data",{ref:s.validateSchema});return d._`!${a}(${t})`}return d.nil}}subschema(e,t){let r=Ge.getSubschema(this.it,e);Ge.extendSubschemaData(r,this.it,e),Ge.extendSubschemaMode(r,e);let s={...this.it,...r,items:void 0,props:void 0};return xl(s,t),s}mergeEvaluated(e,t){let{it:r,gen:s}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=U.mergeEvaluated.props(s,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=U.mergeEvaluated.items(s,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:s}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return s.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}}Vn.KeywordCxt=xr;function Mn(e,t,r,s){let n=new xr(e,r,t);if("code"in r)r.code(n,s);else if(n.$data&&r.validate)re.funcKeywordCode(n,r);else if("macro"in r)re.macroKeywordCode(n,r);else if(r.compile||r.validate)re.funcKeywordCode(n,r)}var Vl=/^\/(?:[^~]|~0|~1)*$/,zl=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Fn(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let n,o;if(e==="")return P.default.rootData;if(e[0]==="/"){if(!Vl.test(e))throw Error(`Invalid JSON-pointer: ${e}`);n=e,o=P.default.rootData}else{let u=zl.exec(e);if(!u)throw Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){if(l>=t)throw Error(c("property/index",l));return s[t-l]}if(l>t)throw Error(c("data",l));if(o=r[t-l],!n)return o}let i=o,a=n.split("/");for(let u of a)if(u)o=d._`${o}${d.getProperty(U.unescapeJsonPointer(u))}`,i=d._`${i} && ${o}`;return i;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}Vn.getData=Fn});var Kv=pe(function(Hn){Object.defineProperty(Hn,"__esModule",{value:!0});class Un extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}Hn.default=Un});var eb=pe(function(Kn){Object.defineProperty(Kn,"__esModule",{value:!0});var Be=lt();class Ln extends Error{constructor(e,t,r,s){super(s||`can't resolve reference ${r} from id ${t}`);this.missingRef=Be.resolveUrl(e,t,r),this.missingSchema=Be.normalizeId(Be.getFullPath(e,this.missingRef))}}Kn.default=Ln});var NS=pe(function(Bn){Object.defineProperty(Bn,"__esModule",{value:!0});Bn.resolveSchema=Bn.getCompilingSchema=Bn.resolveRef=Bn.compileSchema=Bn.SchemaEnv=void 0;var M=Bt(),Gl=Kv(),Ae=Dc(),F=lt(),Nt=vn(),Gn=Qg();class dt{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:F.normalizeId(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}Bn.SchemaEnv=dt;function Rr(e){let t=Jn.call(this,e);if(t)return t;let r=F.getFullPath(this.opts.uriResolver,e.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:o}=this.opts,i=new M.CodeGen(this.scope,{es5:s,lines:n,ownProperties:o}),a;if(e.$async)a=i.scopeValue("Error",{ref:Gl.default,code:M._`require("ajv/dist/runtime/validation_error").default`});let c=i.scopeName("validate");e.validateName=c;let u={gen:i,allErrors:this.opts.allErrors,data:Ae.default.data,parentData:Ae.default.parentData,parentDataProperty:Ae.default.parentDataProperty,dataNames:[Ae.default.data],dataPathArr:[M.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:M.stringify(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:M.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:M._`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),Gn.validateFunctionCode(u),i.optimize(this.opts.code.optimize);let f=i.toString();if(l=`${i.scopeRefs(Ae.default.scope)}return ${f}`,this.opts.code.process)l=this.opts.code.process(l,e);let y=Function(`${Ae.default.self}`,`${Ae.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:y}),y.errors=null,y.schema=e.schema,y.schemaEnv=e,e.$async)y.$async=!0;if(this.opts.code.source===!0)y.source={validateName:c,validateCode:f,scopeValues:i._values};if(this.opts.unevaluated){let{props:p,items:h}=u;if(y.evaluated={props:p instanceof M.Name?void 0:p,items:h instanceof M.Name?void 0:h,dynamicProps:p instanceof M.Name,dynamicItems:h instanceof M.Name},y.source)y.source.evaluated=M.stringify(y.evaluated)}return e.validate=y,e}catch(f){if(delete e.validate,delete e.validateName,l)this.logger.error("Error compiling schema, function code:",l);throw f}finally{this._compilations.delete(e)}}Bn.compileSchema=Rr;function Jl(e,t,r){var s;r=F.resolveUrl(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let o=Ql.call(this,e,r);if(o===void 0){let i=(s=e.localRefs)===null||s===void 0?void 0:s[r],{schemaId:a}=this.opts;if(i)o=new dt({schema:i,schemaId:a,root:e,baseId:t})}if(o===void 0)return;return e.refs[r]=Bl.call(this,o)}Bn.resolveRef=Jl;function Bl(e){if(F.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:Rr.call(this,e)}function Jn(e){for(let t of this._compilations)if(Wl(t,e))return t}Bn.getCompilingSchema=Jn;function Wl(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Ql(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||qt.call(this,e,t)}function qt(e,t){let r=this.opts.uriResolver.parse(t),s=F._getFullPath(this.opts.uriResolver,r),n=F.getFullPath(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===n)return Or.call(this,r,e);let o=F.normalizeId(s),i=this.refs[o]||this.schemas[o];if(typeof i=="string"){let a=qt.call(this,e,i);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return Or.call(this,r,a)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)Rr.call(this,i);if(o===F.normalizeId(t)){let{schema:a}=i,{schemaId:c}=this.opts,u=a[c];if(u)n=F.resolveUrl(this.opts.uriResolver,n,u);return new dt({schema:a,schemaId:c,root:e,baseId:n})}return Or.call(this,r,i)}Bn.resolveSchema=qt;var Zl=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Or(e,{baseId:t,schema:r,root:s}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[Nt.unescapeFragment(a)];if(c===void 0)return;r=c;let u=typeof r==="object"&&r[this.opts.schemaId];if(!Zl.has(a)&&u)t=F.resolveUrl(this.opts.uriResolver,t,u)}let o;if(typeof r!="boolean"&&r.$ref&&!Nt.schemaHasRulesButRef(r,this.RULES)){let a=F.resolveUrl(this.opts.uriResolver,t,r.$ref);o=qt.call(this,s,a)}let{schemaId:i}=this.opts;if(o=o||new dt({schema:r,schemaId:i,root:s,baseId:t}),o.schema!==o.root.schema)return o;return}});var Qn=pe(function(Pm,rd){rd.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Tr=pe(function(xm,no){var sd=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Nr=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),nd=RegExp.prototype.test.bind(/^\d*$/u),Me=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),qr=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Xn=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Ir=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),od=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),G=Array(256);for(let t=0;t<256;t++)G[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function H(e){if(e<2048)return G[192|e>>6]+G[128|e&63];if(e<65536)return G[224|e>>12]+G[128|e>>6&63]+G[128|e&63];return G[240|e>>18]+G[128|e>>12&63]+G[128|e>>6&63]+G[128|e&63]}function id(e){let t="",r=0,s=0;for(s=0;s<e.length;s++){if(r=e[s].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s];break}for(s+=1;s<e.length;s++){if(r=e[s].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s]}return t}var ad=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),cd=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),ud=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),ld=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function dd(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(ud(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&Me(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Zn(e){let t=-1,r=0,s=-1,n=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(s===-1)s=a;if(n++,n>r)r=n,t=s}else s=-1,n=0;if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),i=e.slice(t+r).join(":");return o+"::"+i}function fd(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),s=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(s.length===1&&s[0]==="")s.length=0}let n=r.concat(s),o=0;for(let a=0;a<n.length;a++){let c=n[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==n.length-1||t!==-1&&s.length===0||!Nr(c))return;o+=2;continue}if(!ad(c))return;n[a]=parseInt(c,16).toString(16),o++}if(t===-1){if(o!==8)return;return Zn(n)}if(o>=8)return;let i=n.slice(0,r.length);for(let a=o;a<8;a++)i.push("0");for(let a=r.length;a<n.length;a++)i.push(n[a]);return Zn(i)}function kr(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let s=t?e.slice(1,-1):e;if(t&&cd(s))return s=s.toLowerCase(),{host:`[${s}]`,escapedHost:s,isIPV6:!1,isIPVFuture:!0};if(hd(s,":")<2)return{host:e,isIPV6:!1,error:t};let n="",o=s.indexOf("%");if(o!==-1){let a=s.slice(o,o+3).toLowerCase()==="%25"?3:1;if(n=s.slice(o+a),!dd(n))return{host:e,isIPV6:!1,error:!0};s=s.slice(0,o)}let i=fd(s);if(i===void 0)return{host:e,isIPV6:!1,error:!0};return{host:i+(n?"%"+n:""),escapedHost:i+(n?"%25"+n:""),isIPV6:!0}}function hd(e,t){let r=0;for(let s=0;s<e.length;s++)if(e[s]===t)r++;return r}function Yn(e){let t=e,r=[],s=-1,n=0;while(n=t.length){if(n===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(n===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(n===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((s=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,s)),t=t.slice(s)}return r.join("")}function pd(e){if(e===""||e[0]==="/")return Yn(e);let t=e.split("/"),r=t.length-1,s=[],n=!1;for(let o=0;o<=r;o++){let i=t[o];if(i==="."||i===".."){if(i==="..")if(s.length!==0&&s[s.length-1]!=="..")s.pop();else s.push("..");n=o===r}else s.push(i)}if(n&&s[s.length-1]!=="..")s.push("");if(s.length===0||s[0]===""||s[0].includes(":"))s.unshift(".");return s.join("/")}var md={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},yd=/[@/?#:]/g,_d=/[@/?#]/g;function eo(e,t){let r=t?_d:yd;return r.lastIndex=0,e.replace(r,(s)=>md[s])}function to(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let s=0;s<e.length;s++){if(e[s]==="%"&&s+2<e.length){let n=e.slice(s+1,s+3);if(Me(n)){let o=n.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(t&&qr(i))r+=i;else r+="%"+o;s+=2;continue}}r+=e[s]}return r}function gd(e){let t="";for(let r=0;r<e.length;r++){let s=e[r];if(s==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(Me(n)){let o=n.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(i!=="."&&qr(i))t+=i;else t+="%"+o;r+=2;continue}}if(Xn(s))t+=s;else{let n=e.charCodeAt(r);if(n<128)t+=so(n)?s:G[n];else if(n<55296||n>57343)t+=H(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=H(65536+(n-55296<<10)+(o-56320)),r++;else t+=H(65533)}else t+=H(65533)}}return t}function $d(e,t=!1){let r="",s=t&&e[0]!=="/";for(let n=0;n<e.length;n++){let o=e[n];if(o==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(Me(i)){r+="%"+i.toUpperCase(),n+=2;continue}}if(o==="/")s=!1;if(Xn(o)&&(o!==":"||!s))r+=o;else{let i=e.charCodeAt(n);if(i<128)r+=G[i];else if(i<55296||i>57343)r+=H(i);else if(i<=56319&&n+1<e.length){let a=e.charCodeAt(n+1);if(a>=56320&&a<=57343)r+=H(65536+(i-55296<<10)+(a-56320)),n++;else r+=H(65533)}else r+=H(65533)}}return r}function jr(e,t){let r="";for(let s=0;s<e.length;s++){let n=e[s];if(n==="%"&&s+2<e.length){let o=e.slice(s+1,s+3);if(Me(o)){r+="%"+o.toUpperCase(),s+=2;continue}}if(t(n))r+=n;else{let o=e.charCodeAt(s);if(o<128)r+=G[o];else if(o<55296||o>57343)r+=H(o);else if(o<=56319&&s+1<e.length){let i=e.charCodeAt(s+1);if(i>=56320&&i<=57343)r+=H(65536+(o-55296<<10)+(i-56320)),s++;else r+=H(65533)}else r+=H(65533)}}return r}function ro(e){return jr(e,od)}function vd(e){return jr(e,Ir)}function wd(e){return jr(e,Ir)}function so(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function Ed(e){let t="";for(let r=0;r<e.length;r++){let s=e[r];if(s==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(Me(n)){let o=n.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(qr(i))t+=i;else t+="%"+o;r+=2;continue}}if(Ir(s))t+=s;else{let n=e.charCodeAt(r);if(n<128)t+=so(n)?s:G[n];else if(n<55296||n>57343)t+=H(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=H(65536+(n-55296<<10)+(o-56320)),r++;else t+=H(65533)}else t+=H(65533)}}return t}function bd(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let s=e.slice(r+1,r+3);if(Me(s)){t+="%"+s.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function Sd(e){let t=[];if(e.userinfo!==void 0)t.push(ro(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!Nr(r)){let s=kr(r);if(s.isIPV6!==!0&&s.isIPVFuture!==!0)r=to(r,!0),s=kr(r);if(s.isIPV6===!0||s.isIPVFuture===!0)r=`[${s.escapedHost}]`;else r=eo(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string"){let r=String(e.port);if(!nd(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}no.exports={nonSimpleDomain:ld,recomposeAuthority:Sd,reescapeHostDelimiters:eo,normalizePercentEncoding:to,normalizePathEncoding:gd,serializePathEncoding:$d,normalizeQueryFragmentEncoding:Ed,encodeUserinfo:ro,encodeQuery:vd,encodeFragment:wd,escapePreservingEscapes:bd,removeDotSegments:Yn,removeDotSegmentsRelative:pd,isIPv4:Nr,isUUID:sd,normalizeIPv6:kr,stringArrayToHexStripped:id}});var uo=pe(function(Om,co){var{isUUID:Pd}=Tr(),xd=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,Od=["http","https","ws","wss","urn","urn:uuid"];function Rd(e){return Od.indexOf(e)!==-1}function Dr(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function oo(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function io(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function kd(e){return e.secure=Dr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Nd(e){if(e.port===(Dr(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function qd(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(xd);if(r&&r[0]===e.path){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${s}:${t.nid||e.nid}`,o=Cr(n);if(e.path=void 0,o)e=o.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function Id(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),n=`${r}:${t.nid||s}`,o=Cr(n);if(o)e=o.serialize(e,t);let i=e,a=e.nss;return i.path=`${s||t.nid}:${a}`,t.skipEscape=!0,i}function jd(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Pd(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function Td(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var ao={scheme:"http",domainHost:!0,parse:oo,serialize:io},Dd={scheme:"https",domainHost:ao.domainHost,parse:oo,serialize:io},It={scheme:"ws",domainHost:!0,parse:kd,serialize:Nd},Cd={scheme:"wss",domainHost:It.domainHost,parse:It.parse,serialize:It.serialize},Ad={scheme:"urn",parse:qd,serialize:Id,skipNormalize:!0},Md={scheme:"urn:uuid",parse:jd,serialize:Td,skipNormalize:!0},jt={http:ao,https:Dd,ws:It,wss:Cd,urn:Ad,"urn:uuid":Md};Object.setPrototypeOf(jt,null);function Cr(e){return e&&(jt[e]||jt[e.toLowerCase()])||void 0}co.exports={wsIsSecure:Dr,SCHEMES:jt,isValidSchemeName:Rd,getSchemeHandler:Cr}});var So=pe(function(Rm,At){var{normalizeIPv6:mo,removeDotSegments:ht,removeDotSegmentsRelative:yo,recomposeAuthority:Fd,normalizePercentEncoding:Ar,normalizePathEncoding:Vd,serializePathEncoding:lo,normalizeQueryFragmentEncoding:fo,encodeQuery:zd,encodeFragment:Ud,reescapeHostDelimiters:Hd,isIPv4:_o,nonSimpleDomain:Ld}=Tr(),{SCHEMES:go,getSchemeHandler:Mr}=uo(),$o=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Kd=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function ho(e){let t=String(e);if(!$o.test(t))throw TypeError("URI scheme is malformed.");return t}function Gd(e,t){if(typeof e==="string")e=tf(e,t);else if(typeof e==="object")e=Dt(Fe(e,t),t);return e}function Jd(e,t,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:u}=Tt(e,s),{parsed:l,malformedAuthorityOrPort:f,malformedPercentEncoding:v,malformedSchemeSpecific:y,malformedHost:p,malformedScheme:h}=Tt(t,s);if(o||f||i||v||a||y||c||p||u||h)throw Error(n.error||l.error||"URI is malformed.");let m=vo(n,l,s,!0),g=Mr(r&&r.scheme||m.scheme),O=m.host,x=O!==void 0&&O!==""&&(_o(O)||mo(O).isIPV6);if(Eo(m,r||{},g,x))throw Error("URI host is malformed.");wo(m,r||{},g,x);let j=O&&O.indexOf("%")!==-1&&!/\P{ASCII}/u.test(O);if(m.error&&!j)throw Error(m.error);return s.skipEscape=!0,Fe(m,s)}function vo(e,t,r,s){let n={};if(!s)e=Dt(Fe(e,r),r),t=Dt(Fe(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ht(t.path||""),n.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ht(t.path||""),n.query=t.query;else{if(!t.path)if(n.path=e.path,t.query!==void 0)n.query=t.query;else n.query=e.query;else{if(t.path[0]==="/")n.path=ht(t.path);else{let o=e.userinfo!==void 0||e.host!==void 0||e.port!==void 0;if(o&&!e.path)n.path="/"+t.path;else if(!e.path)n.path=t.path;else n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;n.path=e.scheme===void 0&&!o&&n.path[0]!=="/"?yo(n.path):ht(n.path)}n.query=t.query}n.userinfo=e.userinfo,n.host=e.host,n.port=e.port}n.scheme=e.scheme}return n.fragment=t.fragment,n}function Bd(e,t,r){let s=po(e,r),n=po(t,r);return s!==void 0&&n!==void 0&&s===n}function Fe(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),n=[];if(r.scheme)r.scheme=ho(r.scheme);let o=Mr(s.scheme||r.scheme);if(o&&o.serialize)o.serialize(r,s);let i=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=(r.scheme===void 0||s.reference==="suffix")&&!i,c=!s.skipEscape&&a;if(r.path!==void 0)if(!s.skipEscape)r.path=lo(r.path,c);else r.path=Ar(r.path);if(s.reference!=="suffix"&&r.scheme)r.scheme=ho(r.scheme),n.push(r.scheme,":");let u=Fd(r);if(u!==void 0){if(s.reference!=="suffix")n.push("//");if(n.push(u),r.path&&r.path[0]!=="/")n.push("/")}if(r.path!==void 0){let l=r.path;if(!s.absolutePath&&(!o||!o.absolutePath))l=a&&l[0]!=="/"?yo(l):ht(l);if(a)l=lo(l,!0);if(u===void 0&&l[0]==="/"&&l[1]==="/")l="/%2F"+l.slice(2);n.push(l)}if(r.query!==void 0)n.push("?",zd(r.query));if(r.fragment!==void 0)n.push("#",Ud(r.fragment));return n.join("")}var Wd=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Qd=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Zd=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Xd(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port==="number"&&(e.port<0||e.port>65535))return"URI port is malformed.";return}function ft(e){if(e===void 0)return!1;let t=e.indexOf("%");while(t!==-1){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function Ct(e){return e[0]==="["&&e[e.length-1]==="]"}function Yd(e){let t=e[4];return ft(e[3])||t!==void 0&&!Ct(t)&&ft(t)||ft(e[6])||ft(e[7])||ft(e[8])}function wo(e,t,r,s){if(Eo(e,t,r,s))return e.error=e.error||"URI host is malformed.",!0;if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!Ct(e.host)&&(t.domainHost||r&&r.domainHost)&&s===!1&&Ld(e.host)){let n;try{n=new URL("http://"+e.host)}catch(o){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+o,!0}if(!ef(n))return e.error=e.error||"URI host is malformed.",!0;e.host=n.hostname}return!1}function Eo(e,t,r,s){return Boolean(e.host&&s===!1&&!Ct(e.host)&&(t.domainHost||r&&r.domainHost)&&Kd.test(e.host))}function ef(e){return e.username===""&&e.password===""&&e.port===""&&e.pathname==="/"&&e.search===""&&e.hash===""&&e.hostname!==""}function Tt(e,t){let r=Object.assign({},t),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,o=!1,i=!1,a=!1,c=!1,u=!1,l=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let f=e.match(Qd);if(f!==null&&f[1].indexOf("\\")!==-1)s.error="URI authority must not contain a literal backslash.",n=!0;let v=e.match(Zd);if(v!==null){let p=v[1],h=p.replace(/[\t\n\r]/g,"");if(h.length>=2){if(h.slice(0,2)!=="//")s.error=s.error||"URI authority must not contain a literal backslash.",n=!0;else if(p.length!==h.length)s.error=s.error||"URI authority introducer must not contain whitespace.",n=!0}}let y=e.match(Wd);if(y){if(s.scheme=y[1],s.userinfo=y[3],s.host=y[4],s.port=parseInt(y[5],10),s.path=y[6]||"",s.query=y[7],s.fragment=y[8],s.scheme!==void 0)if($o.test(s.scheme))s.scheme=s.scheme.toLowerCase();else s.error=s.error||"URI scheme is malformed.",u=!0;if(o=Yd(y),o)s.error=s.error||"URI contains malformed percent-encoding.";if(isNaN(s.port))s.port=y[5];let p=Xd(s,y);if(p!==void 0)s.error=s.error||p,n=!0;if(s.host)if(_o(s.host)===!1){let g=Ct(s.host),O=s.host.indexOf("[")!==-1||s.host.indexOf("]")!==-1,x=mo(s.host);if(l=x.isIPV6||x.isIPVFuture===!0,c=O&&(!g||x.error===!0),s.host=l?x.host:x.host.toLowerCase(),c)s.error=s.error||"URI host is malformed.",n=!0}else l=!0;if(s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path)s.reference="same-document";else if(s.scheme===void 0)s.reference="relative";else if(s.fragment===void 0)s.reference="absolute";else s.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==s.reference)s.error=s.error||"URI is not a "+r.reference+" reference.";let h=Mr(r.scheme||s.scheme);if(!c)a=wo(s,r,h,l);if(e.indexOf("%")!==-1&&s.host!==void 0&&!c){let m=l?s.host:Ar(s.host,!0);if(!l)m=Ar(m.toLowerCase());s.host=l||r.scheme!=="null"?Hd(m,l):m}if(!h||h&&!h.skipNormalize){if(s.path)s.path=Vd(s.path);if(s.query)s.query=fo(s.query);if(s.fragment)s.fragment=fo(s.fragment)}if(h&&h.parse){if(h.parse(s,r),h===go.urn&&s.nid===void 0)i=!0}}else s.error=s.error||"URI can not be parsed.";return{parsed:s,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:u}}function Dt(e,t){return Tt(e,t).parsed}function tf(e,t){return bo(e,t).normalized}function bo(e,t){let{parsed:r,malformedAuthorityOrPort:s,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:i,malformedScheme:a}=Tt(e,t);return{normalized:s||n||o||i||a?e:Fe(r,t),malformedAuthorityOrPort:s,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:i,malformedScheme:a}}function po(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:Fe(e,t)}catch{return}let{normalized:s,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}=bo(r,t);return n||o||i||a||c?void 0:s}var Fr={SCHEMES:go,normalize:Gd,resolve:Jd,resolveComponent:vo,equal:Bd,serialize:Fe,parse:Dt};At.exports=Fr;At.exports.default=Fr;At.exports.fastUri=Fr});var Oo=pe(function(xo){Object.defineProperty(xo,"__esModule",{value:!0});var Po=So();Po.code='require("ajv/dist/runtime/uri").default';xo.default=Po});var Gk=pe(function(me){Object.defineProperty(me,"__esModule",{value:!0});me.CodeGen=me.Name=me.nil=me.stringify=me.str=me._=me.KeywordCxt=void 0;var sf=Qg();Object.defineProperty(me,"KeywordCxt",{enumerable:!0,get:function(){return sf.KeywordCxt}});var Qe=Bt();Object.defineProperty(me,"_",{enumerable:!0,get:function(){return Qe._}});Object.defineProperty(me,"str",{enumerable:!0,get:function(){return Qe.str}});Object.defineProperty(me,"stringify",{enumerable:!0,get:function(){return Qe.stringify}});Object.defineProperty(me,"nil",{enumerable:!0,get:function(){return Qe.nil}});Object.defineProperty(me,"Name",{enumerable:!0,get:function(){return Qe.Name}});Object.defineProperty(me,"CodeGen",{enumerable:!0,get:function(){return Qe.CodeGen}});var nf=Kv(),Io=eb(),jo=yr(),se=NS(),To=Bt(),ne=lt(),be=ut(),We=vn(),Ro=Qn(),of=Oo(),Do=(e,t)=>new RegExp(e,t);Do.code="new RegExp";var af=["removeAdditional","useDefaults","coerceTypes"],cf=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),uf={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},lf={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ko=200;function df(e){var t,r,s,n,o,i,a,c,u,l,f,v,y,p,h,m,g,O,x,j,R,ee,fe,er,tr;let nt=e.strict,rr=(t=e.code)===null||t===void 0?void 0:t.optimize,Lr=rr===!0||rr===void 0?1:rr||0,Kr=(s=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:Do,qa=(n=e.uriResolver)!==null&&n!==void 0?n:of.default;return{strictSchema:(i=(o=e.strictSchema)!==null&&o!==void 0?o:nt)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:nt)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:nt)!==null&&l!==void 0?l:"log",strictTuples:(v=(f=e.strictTuples)!==null&&f!==void 0?f:nt)!==null&&v!==void 0?v:"log",strictRequired:(p=(y=e.strictRequired)!==null&&y!==void 0?y:nt)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:Lr,regExp:Kr}:{optimize:Lr,regExp:Kr},loopRequired:(h=e.loopRequired)!==null&&h!==void 0?h:ko,loopEnum:(m=e.loopEnum)!==null&&m!==void 0?m:ko,meta:(g=e.meta)!==null&&g!==void 0?g:!0,messages:(O=e.messages)!==null&&O!==void 0?O:!0,inlineRefs:(x=e.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(j=e.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(R=e.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:(ee=e.validateSchema)!==null&&ee!==void 0?ee:!0,validateFormats:(fe=e.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(er=e.unicodeRegExp)!==null&&er!==void 0?er:!0,int32range:(tr=e.int32range)!==null&&tr!==void 0?tr:!0,uriResolver:qa}}class Mt{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...df(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new To.ValueScope({scope:{},prefixes:cf,es5:t,lines:r}),this.logger=_f(e.logger);let s=e.validateFormats;if(e.validateFormats=!1,this.RULES=jo.getRules(),No.call(this,uf,e,"NOT SUPPORTED"),No.call(this,lf,e,"DEPRECATED","warn"),this._metaOpts=mf.call(this),e.formats)hf.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)pf.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);ff.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,s=Ro;if(r==="id")s={...Ro},s.id=s.$id,delete s.$id;if(t&&e)this.addMetaSchema(s,s[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let s=r(t);if(!("$async"in r))this.errors=r.errors;return s}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return s.call(this,e,t);async function s(u,l){await n.call(this,u.$schema);let f=this._addSchema(u,l);return f.validate||o.call(this,f)}async function n(u){if(u&&!this.getSchema(u))await s.call(this,{$ref:u},!0)}async function o(u){try{return this._compileSchemaEnv(u)}catch(l){if(!(l instanceof Io.default))throw l;return i.call(this,l),await a.call(this,l.missingSchema),o.call(this,u)}}function i({missingSchema:u,missingRef:l}){if(this.refs[u])throw Error(`AnySchema ${u} is loaded but ${l} cannot be resolved`)}async function a(u){let l=await c.call(this,u);if(!this.refs[u])await n.call(this,l.$schema);if(!this.refs[u])this.addSchema(l,u,t)}async function c(u){let l=this._loading[u];if(l)return l;try{return await(this._loading[u]=r(u))}finally{delete this._loading[u]}}}addSchema(e,t,r,s=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,r,s);return this}let n;if(typeof e==="object"){let{schemaId:o}=this.opts;if(n=e[o],n!==void 0&&typeof n!="string")throw Error(`schema ${o} must be string`)}return t=ne.normalizeId(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(r,e);if(!s&&t){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw Error(n)}return s}getSchema(e){let t;while(typeof(t=qo.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,s=new se.SchemaEnv({schema:{},schemaId:r});if(t=se.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=qo.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=ne.normalizeId(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if($f.call(this,r,t),!t)return We.eachItem(r,(n)=>Vr.call(this,n)),this;wf.call(this,t);let s={...t,type:be.getJSONTypes(t.type),schemaType:be.getJSONTypes(t.schemaType)};return We.eachItem(r,s.type.length===0?(n)=>Vr.call(this,n,s):(n)=>s.type.forEach((o)=>Vr.call(this,n,s,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let s=r.rules.findIndex((n)=>n.keyword===e);if(s>=0)r.rules.splice(s,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((s)=>`${r}${s.instancePath} ${s.message}`).reduce((s,n)=>s+t+n)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of t){let n=s.split("/").slice(1),o=e;for(let i of n)o=o[i];for(let i in r){let a=r[i];if(typeof a!="object")continue;let{$data:c}=a.definition,u=o[i];if(c&&u)o[i]=Co(u)}}return e}_removeAllSchemas(e,t){for(let r in e){let s=e[r];if(!t||t.test(r)){if(typeof s=="string")delete e[r];else if(s&&!s.meta)this._cache.delete(s.schema),delete e[r]}}}_addSchema(e,t,r,s=this.opts.validateSchema,n=this.opts.addUsedSchema){let o,{schemaId:i}=this.opts;if(typeof e=="object")o=e[i];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=ne.normalizeId(o||r);let c=ne.getSchemaRefs.call(this,e,r);if(a=new se.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),n&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(s)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else se.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{se.compileSchema.call(this,e)}finally{this.opts=t}}}Mt.ValidationError=nf.default;Mt.MissingRefError=Io.default;me.default=Mt;function No(e,t,r,s="error"){for(let n in e){let o=n;if(o in t)this.logger[s](`${r}: option ${n}. ${e[o]}`)}}function qo(e){return e=ne.normalizeId(e),this.schemas[e]||this.refs[e]}function ff(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function hf(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function pf(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function mf(){let e={...this.opts};for(let t of af)delete e[t];return e}var yf={log(){},warn(){},error(){}};function _f(e){if(e===!1)return yf;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var gf=/^[a-z_$][a-z0-9_$:-]*$/i;function $f(e,t){let{RULES:r}=this;if(We.eachItem(e,(s)=>{if(r.keywords[s])throw Error(`Keyword ${s} is already defined`);if(!gf.test(s))throw Error(`Keyword ${s} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function Vr(e,t,r){var s;let n=t===null||t===void 0?void 0:t.post;if(r&&n)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,i=n?o.post:o.rules.find(({type:c})=>c===r);if(!i)i={type:r,rules:[]},o.rules.push(i);if(o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:be.getJSONTypes(t.type),schemaType:be.getJSONTypes(t.schemaType)}};if(t.before)vf.call(this,i,a,t.before);else i.rules.push(a);o.all[e]=a,(s=t.implements)===null||s===void 0||s.forEach((c)=>this.addKeyword(c))}function vf(e,t,r){let s=e.rules.findIndex((n)=>n.keyword===r);if(s>=0)e.rules.splice(s,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function wf(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=Co(t);e.validateSchema=this.compile(t,!0)}var Ef={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Co(e){return{anyOf:[e,Ef]}}});var Mo=pe(function(Ao){Object.defineProperty(Ao,"__esModule",{value:!0});var Pf={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ao.default=Pf});var Jk=pe(function(Vo){Object.defineProperty(Vo,"__esModule",{value:!0});Vo.callRef=Vo.getValidate=void 0;var Of=eb(),Vt=Q(),D=Bt(),Ze=Dc(),zt=NS(),Se=vn(),Rf={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:s}=e,{baseId:n,schemaEnv:o,validateName:i,opts:a,self:c}=s,{root:u}=o;if((r==="#"||r==="#/")&&n===u.baseId)return f();let l=zt.resolveRef.call(c,u,n,r);if(l===void 0)throw new Of.default(s.opts.uriResolver,n,r);if(l instanceof zt.SchemaEnv)return v(l);return y(l);function f(){if(o===u)return Ft(e,i,o,o.$async);let p=t.scopeValue("root",{ref:u});return Ft(e,D._`${p}.validate`,u,u.$async)}function v(p){let h=Fo(e,p);Ft(e,h,p,p.$async)}function y(p){let h=t.scopeValue("schema",a.code.source===!0?{ref:p,code:D.stringify(p)}:{ref:p}),m=t.name("valid"),g=e.subschema({schema:p,dataTypes:[],schemaPath:D.nil,topSchemaRef:h,errSchemaPath:r},m);e.mergeEvaluated(g),e.ok(m)}}};function Fo(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):D._`${r.scopeValue("wrapper",{ref:t})}.validate`}Vo.getValidate=Fo;function Ft(e,t,r,s){let{gen:n,it:o}=e,{allErrors:i,schemaEnv:a,opts:c}=o,u=c.passContext?Ze.default.this:D.nil;if(s)l();else f();function l(){if(!a.$async)throw Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{if(n.code(D._`await ${Vt.callValidateCode(e,t,u)}`),y(t),!i)n.assign(p,!0)},(h)=>{if(n.if(D._`!(${h} instanceof ${o.ValidationError})`,()=>n.throw(h)),v(h),!i)n.assign(p,!1)}),e.ok(p)}function f(){e.result(Vt.callValidateCode(e,t,u),()=>y(t),()=>v(t))}function v(p){let h=D._`${p}.errors`;n.assign(Ze.default.vErrors,D._`${Ze.default.vErrors} === null ? ${h} : ${Ze.default.vErrors}.concat(${h})`),n.assign(Ze.default.errors,D._`${Ze.default.vErrors}.length`)}function y(p){var h;if(!o.opts.unevaluated)return;let m=(h=r===null||r===void 0?void 0:r.validate)===null||h===void 0?void 0:h.evaluated;if(o.props!==!0)if(m&&!m.dynamicProps){if(m.props!==void 0)o.props=Se.mergeEvaluated.props(n,m.props,o.props)}else{let g=n.var("props",D._`${p}.evaluated.props`);o.props=Se.mergeEvaluated.props(n,g,o.props,D.Name)}if(o.items!==!0)if(m&&!m.dynamicItems){if(m.items!==void 0)o.items=Se.mergeEvaluated.items(n,m.items,o.items)}else{let g=n.var("items",D._`${p}.evaluated.items`);o.items=Se.mergeEvaluated.items(n,g,o.items,D.Name)}}}Vo.callRef=Ft;Vo.default=Rf});var Yk=pe(function(Uo){Object.defineProperty(Uo,"__esModule",{value:!0});var qf=Mo(),If=Jk(),jf=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",qf.default,If.default];Uo.default=jf});var Lo=pe(function(Ho){Object.defineProperty(Ho,"__esModule",{value:!0});var xe=Bt(),Pe=xe.operators,Ut={maximum:{okStr:"<=",ok:Pe.LTE,fail:Pe.GT},minimum:{okStr:">=",ok:Pe.GTE,fail:Pe.LT},exclusiveMaximum:{okStr:"<",ok:Pe.LT,fail:Pe.GTE},exclusiveMinimum:{okStr:">",ok:Pe.GT,fail:Pe.LTE}},Df={message:({keyword:e,schemaCode:t})=>xe.str`must be ${Ut[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>xe._`{comparison: ${Ut[e].okStr}, limit: ${t}}`},Cf={keyword:Object.keys(Ut),type:"number",schemaType:"number",$data:!0,error:Df,code(e){let{keyword:t,data:r,schemaCode:s}=e;e.fail$data(xe._`${r} ${Ut[t].fail} ${s} || isNaN(${r})`)}};Ho.default=Cf});var Go=pe(function(Ko){Object.defineProperty(Ko,"__esModule",{value:!0});var oe=Bt(),Mf={message:({schemaCode:e})=>oe.str`must be multiple of ${e}`,params:({schemaCode:e})=>oe._`{multipleOf: ${e}}`},Ff={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Mf,code(e){let{gen:t,data:r,schemaCode:s,it:n}=e,o=n.opts.multipleOfPrecision,i=t.let("res"),a=o?oe._`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:oe._`${i} !== parseInt(${i})`;e.fail$data(oe._`(${s} === 0 || (${i} = ${r}/${s}, ${a}))`)}};Ko.default=Ff});var Wo=pe(function(Bo){Object.defineProperty(Bo,"__esModule",{value:!0});function Jo(e){let t=e.length,r=0,s=0,n;while(s<t)if(r++,n=e.charCodeAt(s++),n>=55296&&n<=56319&&s<t){if(n=e.charCodeAt(s),(n&64512)===56320)s++}return r}Bo.default=Jo;Jo.code='require("ajv/dist/runtime/ucs2length").default'});var Xo=pe(function(Zo){Object.defineProperty(Zo,"__esModule",{value:!0});var J=Bt(),Qo=vn(),Uf=Wo(),Hf={message({keyword:e,schemaCode:t}){return J.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>J._`{limit: ${e}}`},Lf={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Hf,code(e){let{keyword:t,data:r,schemaCode:s,it:n}=e,o=t==="maxLength"?J.operators.GT:J.operators.LT,i=n.opts.unicode===!1?J._`${r}.length`:J._`${Qo.useFunc(e.gen,Uf.default)}(${r})`;e.fail$data(J._`${i} ${o} ${s}`)}};Zo.default=Lf});var ri=pe(function(ti){Object.defineProperty(ti,"__esModule",{value:!0});var Yo=Q(),ei=vn(),Z=Bt(),Gf={message:({schemaCode:e})=>Z.str`must match pattern "${e}"`,params:({schemaCode:e})=>Z._`{pattern: ${e}}`},Jf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Gf,code(e){let{gen:t,data:r,$data:s,schema:n,schemaCode:o,it:i}=e,a=i.opts.unicodeRegExp?"u":"";if(s){let{regExp:c}=i.opts.code,u=c.code==="new RegExp"?Z._`new RegExp`:ei.useFunc(t,c),l=t.let("valid");t.try(()=>t.assign(l,Z._`${u}(${o}, ${a}).test(${r})`),()=>t.assign(l,!1)),e.fail$data(Z._`!${l}`)}else{let c=Yo.usePattern(e,n);e.fail$data(Z._`!${c}.test(${r})`)}}};ti.default=Jf});var ni=pe(function(si){Object.defineProperty(si,"__esModule",{value:!0});var ie=Bt(),Wf={message({keyword:e,schemaCode:t}){return ie.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>ie._`{limit: ${e}}`},Qf={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Wf,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxProperties"?ie.operators.GT:ie.operators.LT;e.fail$data(ie._`Object.keys(${r}).length ${n} ${s}`)}};si.default=Qf});var ai=pe(function(ii){Object.defineProperty(ii,"__esModule",{value:!0});var ae=Q(),ce=Bt(),oi=vn(),Xf={message:({params:{missingProperty:e}})=>ce.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>ce._`{missingProperty: ${e}}`},Yf={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Xf,code(e){let{gen:t,schema:r,schemaCode:s,data:n,$data:o,it:i}=e,{opts:a}=i;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors)u();else l();if(a.strictRequired){let y=e.parentSchema.properties,{definedProperties:p}=e.it;for(let h of r)if((y===null||y===void 0?void 0:y[h])===void 0&&!p.has(h)){let m=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${h}" is not defined at "${m}" (strictRequired)`;oi.checkStrictMode(i,g,i.opts.strictRequired)}}function u(){if(c||o)e.block$data(ce.nil,f);else for(let y of r)ae.checkReportMissingProp(e,y)}function l(){let y=t.let("missing");if(c||o){let p=t.let("valid",!0);e.block$data(p,()=>v(y,p)),e.ok(p)}else t.if(ae.checkMissingProp(e,r,y)),ae.reportMissingProp(e,y),t.else()}function f(){t.forOf("prop",s,(y)=>{e.setParams({missingProperty:y}),t.if(ae.noPropertyInData(t,n,y,a.ownProperties),()=>e.error())})}function v(y,p){e.setParams({missingProperty:y}),t.forOf(y,s,()=>{t.assign(p,ae.propertyInData(t,n,y,a.ownProperties)),t.if(ce.not(p),()=>{e.error(),t.break()})},ce.nil)}}};ii.default=Yf});var ui=pe(function(ci){Object.defineProperty(ci,"__esModule",{value:!0});var ue=Bt(),th={message({keyword:e,schemaCode:t}){return ue.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>ue._`{limit: ${e}}`},rh={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:th,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxItems"?ue.operators.GT:ue.operators.LT;e.fail$data(ue._`${r}.length ${n} ${s}`)}};ci.default=rh});var Ht=pe(function(di){Object.defineProperty(di,"__esModule",{value:!0});var li=br();li.code='require("ajv/dist/runtime/equal").default';di.default=li});var pi=pe(function(hi){Object.defineProperty(hi,"__esModule",{value:!0});var Xe=ut(),N=Bt(),fi=vn(),oh=Ht(),ih={message:({params:{i:e,j:t}})=>N.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>N._`{i: ${e}, j: ${t}}`},ah={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ih,code(e){let{gen:t,data:r,$data:s,schema:n,parentSchema:o,schemaCode:i,it:a}=e;if(!s&&!n)return;let c=t.let("valid"),u=o.items?Xe.getSchemaTypes(o.items):[];e.block$data(c,l,N._`${i} === false`),e.ok(c);function l(){let p=t.let("i",N._`${r}.length`),h=t.let("j");e.setParams({i:p,j:h}),t.assign(c,!0),t.if(N._`${p} > 1`,()=>(f()?v:y)(p,h))}function f(){return u.length>0&&!u.some((p)=>p==="object"||p==="array")}function v(p,h){let m=t.name("item"),g=Xe.checkDataTypes(u,m,a.opts.strictNumbers,Xe.DataType.Wrong),O=t.const("indices",N._`{}`);t.for(N._`;${p}--;`,()=>{if(t.let(m,N._`${r}[${p}]`),t.if(g,N._`continue`),u.length>1)t.if(N._`typeof ${m} == "string"`,N._`${m} += "_"`);t.if(N._`typeof ${O}[${m}] == "number"`,()=>{t.assign(h,N._`${O}[${m}]`),e.error(),t.assign(c,!1).break()}).code(N._`${O}[${m}] = ${p}`)})}function y(p,h){let m=fi.useFunc(t,oh.default),g=t.name("outer");t.label(g).for(N._`;${p}--;`,()=>t.for(N._`${h} = ${p}; ${h}--;`,()=>t.if(N._`${m}(${r}[${p}], ${r}[${h}])`,()=>{e.error(),t.assign(c,!1).break(g)})))}}};hi.default=ah});var _i=pe(function(yi){Object.defineProperty(yi,"__esModule",{value:!0});var Ye=Bt(),mi=vn(),uh=Ht(),lh={message:"must be equal to constant",params:({schemaCode:e})=>Ye._`{allowedValue: ${e}}`},dh={keyword:"const",$data:!0,error:lh,code(e){let{gen:t,data:r,$data:s,schemaCode:n,schema:o}=e;if(s||o&&typeof o=="object")e.fail$data(Ye._`!${mi.useFunc(t,uh.default)}(${r}, ${n})`);else e.fail(Ye._`${o} !== ${r}`)}};yi.default=dh});var vi=pe(function($i){Object.defineProperty($i,"__esModule",{value:!0});var le=Bt(),gi=vn(),hh=Ht(),ph={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>le._`{allowedValues: ${e}}`},mh={keyword:"enum",schemaType:"array",$data:!0,error:ph,code(e){let{gen:t,data:r,$data:s,schema:n,schemaCode:o,it:i}=e;if(!s&&n.length===0)throw Error("enum must have non-empty array");let a=n.length>=i.opts.loopEnum,c,u=()=>c!==null&&c!==void 0?c:c=gi.useFunc(t,hh.default),l;if(a||s)l=t.let("valid"),e.block$data(l,f);else{if(!Array.isArray(n))throw Error("ajv implementation error");let y=t.const("vSchema",o);l=le.or(...n.map((p,h)=>v(y,h)))}e.pass(l);function f(){t.assign(l,!1),t.forOf("v",o,(y)=>t.if(le._`${u()}(${r}, ${y})`,()=>t.assign(l,!0).break()))}function v(y,p){let h=n[p];return typeof h==="object"&&h!==null?le._`${u()}(${r}, ${y}[${p}])`:le._`${r} === ${h}`}}};$i.default=mh});var Zk=pe(function(wi){Object.defineProperty(wi,"__esModule",{value:!0});var _h=Lo(),gh=Go(),$h=Xo(),vh=ri(),wh=ni(),Eh=ai(),bh=ui(),Sh=pi(),Ph=_i(),xh=vi(),Oh=[_h.default,gh.default,$h.default,vh.default,wh.default,Eh.default,bh.default,Sh.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Ph.default,xh.default];wi.default=Oh});var zr=pe(function(bi){Object.defineProperty(bi,"__esModule",{value:!0});bi.validateAdditionalItems=void 0;var B=Bt(),et=vn(),kh={message:({params:{len:e}})=>B.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>B._`{limit: ${e}}`},Nh={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:kh,code(e){let{parentSchema:t,it:r}=e,{items:s}=t;if(!Array.isArray(s)){et.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ei(e,s)}};function Ei(e,t){let{gen:r,schema:s,data:n,keyword:o,it:i}=e;i.items=!0;let a=r.const("len",B._`${n}.length`);if(s===!1)e.setParams({len:t.length}),e.pass(B._`${a} <= ${t.length}`);else if(typeof s=="object"&&!et.alwaysValidSchema(i,s)){let u=r.var("valid",B._`${a} <= ${t.length}`);r.if(B.not(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,(l)=>{if(e.subschema({keyword:o,dataProp:l,dataPropType:et.Type.Num},u),!i.allErrors)r.if(B.not(u),()=>r.break())})}}bi.validateAdditionalItems=Ei;bi.default=Nh});var Ur=pe(function(Oi){Object.defineProperty(Oi,"__esModule",{value:!0});Oi.validateTuple=void 0;var Lt=Bt(),Oe=vn(),Pi=Q(),Ih={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return xi(e,"additionalItems",t);if(r.items=!0,Oe.alwaysValidSchema(r,t))return;e.ok(Pi.validateArray(e))}};function xi(e,t,r=e.schema){let{gen:s,parentSchema:n,data:o,keyword:i,it:a}=e;if(l(n),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=Oe.mergeEvaluated.items(s,r.length,a.items);let c=s.name("valid"),u=s.const("len",Lt._`${o}.length`);r.forEach((f,v)=>{if(Oe.alwaysValidSchema(a,f))return;s.if(Lt._`${u} > ${v}`,()=>e.subschema({keyword:i,schemaProp:v,dataProp:v},c)),e.ok(c)});function l(f){let{opts:v,errSchemaPath:y}=a,p=r.length,h=p===f.minItems&&(p===f.maxItems||f[t]===!1);if(v.strictTuples&&!h){let m=`"${i}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${y}"`;Oe.checkStrictMode(a,m,v.strictTuples)}}}Oi.validateTuple=xi;Oi.default=Ih});var qi=pe(function(Ni){Object.defineProperty(Ni,"__esModule",{value:!0});var ki=Ur(),Th={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>ki.validateTuple(e,"items")};Ni.default=Th});var Ci=pe(function(Di){Object.defineProperty(Di,"__esModule",{value:!0});var Kt=Bt(),Ii=vn(),ji=Q(),Ti=zr(),Ch={message:({params:{len:e}})=>Kt.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Kt._`{limit: ${e}}`},Ah={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Ch,code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:n}=r;if(s.items=!0,Ii.alwaysValidSchema(s,t))return;if(n)Ti.validateAdditionalItems(e,n);else e.ok(ji.validateArray(e))}};Di.default=Ah});var Mi=pe(function(Ai){Object.defineProperty(Ai,"__esModule",{value:!0});var C=Bt(),Re=vn(),Fh={message:({params:{min:e,max:t}})=>t===void 0?C.str`must contain at least ${e} valid item(s)`:C.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?C._`{minContains: ${e}}`:C._`{minContains: ${e}, maxContains: ${t}}`},Vh={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Fh,code(e){let{gen:t,schema:r,parentSchema:s,data:n,it:o}=e,i,a,{minContains:c,maxContains:u}=s;if(o.opts.next)i=c===void 0?1:c,a=u;else i=1;let l=t.const("len",C._`${n}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){Re.checkStrictMode(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){Re.checkStrictMode(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if(Re.alwaysValidSchema(o,r)){let h=C._`${l} >= ${i}`;if(a!==void 0)h=C._`${h} && ${l} <= ${a}`;e.pass(h);return}o.items=!0;let f=t.name("valid");if(a===void 0&&i===1)y(f,()=>t.if(f,()=>t.break()));else if(i===0){if(t.let(f,!0),a!==void 0)t.if(C._`${n}.length > 0`,v)}else t.let(f,!1),v();e.result(f,()=>e.reset());function v(){let h=t.name("_valid"),m=t.let("count",0);y(h,()=>t.if(h,()=>p(m)))}function y(h,m){t.forRange("i",0,l,(g)=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:Re.Type.Num,compositeRule:!0},h),m()})}function p(h){if(t.code(C._`${h}++`),a===void 0)t.if(C._`${h} >= ${i}`,()=>t.assign(f,!0).break());else if(t.if(C._`${h} > ${a}`,()=>t.assign(f,!1).break()),i===1)t.assign(f,!0);else t.if(C._`${h} >= ${i}`,()=>t.assign(f,!0))}}};Ai.default=Vh});var Xk=pe(function(Ui){Object.defineProperty(Ui,"__esModule",{value:!0});Ui.validateSchemaDeps=Ui.validatePropertyDeps=Ui.error=void 0;var tt=Bt(),Fi=vn(),de=Q();Ui.error={message:({params:{property:e,depsCount:t,deps:r}})=>tt.str`must have ${t===1?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>tt._`{property: ${e},
6
+ missingProperty: ${s},
7
+ depsCount: ${t},
8
+ deps: ${r}}`};var Uh={keyword:"dependencies",type:"object",schemaType:"object",error:Ui.error,code(e){let[t,r]=Hh(e);Vi(e,t),zi(e,r)}};function Hh({schema:e}){let t={},r={};for(let s in e){if(s==="__proto__")continue;let n=Array.isArray(e[s])?t:r;n[s]=e[s]}return[t,r]}function Vi(e,t=e.schema){let{gen:r,data:s,it:n}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let c=de.propertyInData(r,s,i,n.opts.ownProperties);if(e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),n.allErrors)r.if(c,()=>{for(let u of a)de.checkReportMissingProp(e,u)});else r.if(tt._`${c} && (${de.checkMissingProp(e,a,o)})`),de.reportMissingProp(e,o),r.else()}}Ui.validatePropertyDeps=Vi;function zi(e,t=e.schema){let{gen:r,data:s,keyword:n,it:o}=e,i=r.name("valid");for(let a in t){if(Fi.alwaysValidSchema(o,t[a]))continue;r.if(de.propertyInData(r,s,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},i);e.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),e.ok(i)}}Ui.validateSchemaDeps=zi;Ui.default=Uh});var Ji=pe(function(Gi){Object.defineProperty(Gi,"__esModule",{value:!0});var Gt=Bt(),Ki=vn(),Gh={message:"property name must be valid",params:({params:e})=>Gt._`{propertyName: ${e.propertyName}}`},Jh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Gh,code(e){let{gen:t,schema:r,data:s,it:n}=e;if(Ki.alwaysValidSchema(n,r))return;let o=t.name("valid");t.forIn("key",s,(i)=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},o),t.if(Gt.not(o),()=>{if(e.error(!0),!n.allErrors)t.break()})}),e.ok(o)}};Gi.default=Jh});var Hr=pe(function(Bi){Object.defineProperty(Bi,"__esModule",{value:!0});var ke=Q(),V=Bt(),Wh=Dc(),Ne=vn(),Qh={message:"must NOT have additional properties",params:({params:e})=>V._`{additionalProperty: ${e.additionalProperty}}`},Zh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Qh,code(e){let{gen:t,schema:r,parentSchema:s,data:n,errsCount:o,it:i}=e;if(!o)throw Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&Ne.alwaysValidSchema(i,r))return;let u=ke.allSchemaProperties(s.properties),l=ke.allSchemaProperties(s.patternProperties);f(),e.ok(V._`${o} === ${Wh.default.errors}`);function f(){t.forIn("key",n,(m)=>{if(!u.length&&!l.length)p(m);else t.if(v(m),()=>p(m))})}function v(m){let g;if(u.length>8){let O=Ne.schemaRefOrVal(i,s.properties,"properties");g=ke.isOwnProperty(t,O,m)}else if(u.length)g=V.or(...u.map((O)=>V._`${m} === ${O}`));else g=V.nil;if(l.length)g=V.or(g,...l.map((O)=>V._`${ke.usePattern(e,O)}.test(${m})`));return V.not(g)}function y(m){t.code(V._`delete ${n}[${m}]`)}function p(m){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){y(m);return}if(r===!1){if(e.setParams({additionalProperty:m}),e.error(),!a)t.break();return}if(typeof r=="object"&&!Ne.alwaysValidSchema(i,r)){let g=t.name("valid");if(c.removeAdditional==="failing")h(m,g,!1),t.if(V.not(g),()=>{e.reset(),y(m)});else if(h(m,g),!a)t.if(V.not(g),()=>t.break())}}function h(m,g,O){let x={keyword:"additionalProperties",dataProp:m,dataPropType:Ne.Type.Str};if(O===!1)Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(x,g)}}};Bi.default=Zh});var Xi=pe(function(Zi){Object.defineProperty(Zi,"__esModule",{value:!0});var Qi=Qg(),Jt=Q(),rt=vn(),Wi=Hr(),Yh={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:s,data:n,it:o}=e;if(o.opts.removeAdditional==="all"&&s.additionalProperties===void 0)Wi.default.code(new Qi.KeywordCxt(o,Wi.default,"additionalProperties"));let i=Jt.allSchemaProperties(r);for(let f of i)o.definedProperties.add(f);if(o.opts.unevaluated&&i.length&&o.props!==!0)o.props=rt.mergeEvaluated.props(t,rt.toHash(i),o.props);let a=i.filter((f)=>!rt.alwaysValidSchema(o,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a){if(u(f))l(f);else{if(t.if(Jt.propertyInData(t,n,f,o.opts.ownProperties)),l(f),!o.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(f),e.ok(c)}function u(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function l(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};Zi.default=Yh});var ea=pe(function(Yi){Object.defineProperty(Yi,"__esModule",{value:!0});var Wt=Q(),qe=Bt(),Qt=vn(),Zt=vn(),tp={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:s,parentSchema:n,it:o}=e,{opts:i}=o,a=Wt.allSchemaProperties(r),c=a.filter((h)=>Qt.alwaysValidSchema(o,r[h]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let u=i.strictSchema&&!i.allowMatchingProperties&&n.properties,l=t.name("valid");if(o.props!==!0&&!(o.props instanceof qe.Name))o.props=Zt.evaluatedPropsToName(t,o.props);let{props:f}=o;v();function v(){for(let h of a){if(u)y(h);if(o.allErrors)p(h);else t.var(l,!0),p(h),t.if(l)}}function y(h){for(let m in u)if(new RegExp(h).test(m))Qt.checkStrictMode(o,`property ${m} matches pattern ${h} (use allowMatchingProperties)`)}function p(h){t.forIn("key",s,(m)=>{t.if(qe._`${Wt.usePattern(e,h)}.test(${m})`,()=>{let g=c.includes(h);if(!g)e.subschema({keyword:"patternProperties",schemaProp:h,dataProp:m,dataPropType:Zt.Type.Str},l);if(o.opts.unevaluated&&f!==!0)t.assign(qe._`${f}[${m}]`,!0);else if(!g&&!o.allErrors)t.if(qe.not(l),()=>t.break())})})}}};Yi.default=tp});var sa=pe(function(ra){Object.defineProperty(ra,"__esModule",{value:!0});var ta=vn(),sp={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:s}=e;if(ta.alwaysValidSchema(s,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ra.default=sp});var ia=pe(function(oa){Object.defineProperty(oa,"__esModule",{value:!0});var na=Q(),op={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:na.validateUnion,error:{message:"must match a schema in anyOf"}};oa.default=op});var ua=pe(function(ca){Object.defineProperty(ca,"__esModule",{value:!0});var Ie=Bt(),aa=vn(),ap={message:"must match exactly one schema in oneOf",params:({params:e})=>Ie._`{passingSchemas: ${e.passing}}`},cp={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:ap,code(e){let{gen:t,schema:r,parentSchema:s,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let o=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(i,()=>e.reset(),()=>e.error(!0));function u(){o.forEach((l,f)=>{let v;if(aa.alwaysValidSchema(n,l))t.var(c,!0);else v=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c);if(f>0)t.if(Ie._`${c} && ${i}`).assign(i,!1).assign(a,Ie._`[${a}, ${f}]`).else();t.if(c,()=>{if(t.assign(i,!0),t.assign(a,f),v)e.mergeEvaluated(v,Ie.Name)})})}}};ca.default=cp});var fa=pe(function(da){Object.defineProperty(da,"__esModule",{value:!0});var la=vn(),lp={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let n=t.name("valid");r.forEach((o,i)=>{if(la.alwaysValidSchema(s,o))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}};da.default=lp});var ma=pe(function(pa){Object.defineProperty(pa,"__esModule",{value:!0});var je=Bt(),Xt=vn(),fp={message:({params:e})=>je.str`must match "${e.ifClause}" schema`,params:({params:e})=>je._`{failingKeyword: ${e.ifClause}}`},hp={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:fp,code(e){let{gen:t,parentSchema:r,it:s}=e;if(r.then===void 0&&r.else===void 0)Xt.checkStrictMode(s,'"if" without "then" and "else" is ignored');let n=ha(s,"then"),o=ha(s,"else");if(!n&&!o)return;let i=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&o){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else if(n)t.if(a,u("then"));else t.if(je.not(a),u("else"));e.pass(i,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,f){return()=>{let v=e.subschema({keyword:l},a);if(t.assign(i,a),e.mergeValidEvaluated(v,i),f)t.assign(f,je._`${l}`);else e.setParams({ifClause:l})}}}};function ha(e,t){let r=e.schema[t];return r!==void 0&&!Xt.alwaysValidSchema(e,r)}pa.default=hp});var ga=pe(function(_a){Object.defineProperty(_a,"__esModule",{value:!0});var ya=vn(),mp={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)ya.checkStrictMode(r,`"${e}" without "if" is ignored`)}};_a.default=mp});var Qk=pe(function($a){Object.defineProperty($a,"__esModule",{value:!0});var _p=zr(),gp=qi(),$p=Ur(),vp=Ci(),wp=Mi(),Ep=Xk(),bp=Ji(),Sp=Hr(),Pp=Xi(),xp=ea(),Op=sa(),Rp=ia(),kp=ua(),Np=fa(),qp=ma(),Ip=ga();function jp(e=!1){let t=[Op.default,Rp.default,kp.default,Np.default,qp.default,Ip.default,bp.default,Sp.default,Ep.default,Pp.default,xp.default];if(e)t.push(gp.default,vp.default);else t.push(_p.default,$p.default);return t.push(wp.default),t}$a.default=jp});var wa=pe(function(va){Object.defineProperty(va,"__esModule",{value:!0});var k=Bt(),Dp={message:({schemaCode:e})=>k.str`must match format "${e}"`,params:({schemaCode:e})=>k._`{format: ${e}}`},Cp={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Dp,code(e,t){let{gen:r,data:s,$data:n,schema:o,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:f}=a;if(!c.validateFormats)return;if(n)v();else y();function v(){let p=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),h=r.const("fDef",k._`${p}[${i}]`),m=r.let("fType"),g=r.let("format");r.if(k._`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>r.assign(m,k._`${h}.type || "string"`).assign(g,k._`${h}.validate`),()=>r.assign(m,k._`"string"`).assign(g,h)),e.fail$data(k.or(O(),x()));function O(){if(c.strictSchema===!1)return k.nil;return k._`${i} && !${g}`}function x(){let j=l.$async?k._`(${h}.async ? await ${g}(${s}) : ${g}(${s}))`:k._`${g}(${s})`,R=k._`(typeof ${g} == "function" ? ${j} : ${g}.test(${s}))`;return k._`${g} && ${g} !== true && ${m} === ${t} && !${R}`}}function y(){let p=f.formats[o];if(!p){O();return}if(p===!0)return;let[h,m,g]=x(p);if(h===t)e.pass(j());function O(){if(c.strictSchema===!1){f.logger.warn(R());return}throw Error(R());function R(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function x(R){let ee=R instanceof RegExp?k.regexpCode(R):c.code.formats?k._`${c.code.formats}${k.getProperty(o)}`:void 0,fe=r.scopeValue("formats",{key:o,ref:R,code:ee});if(typeof R=="object"&&!(R instanceof RegExp))return[R.type||"string",R.validate,k._`${fe}.validate`];return["string",R,fe]}function j(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw Error("async format in sync schema");return k._`await ${g}(${s})`}return typeof m=="function"?k._`${g}(${s})`:k._`${g}.test(${s})`}}}};va.default=Cp});var eE=pe(function(Ea){Object.defineProperty(Ea,"__esModule",{value:!0});var Mp=wa(),Fp=[Mp.default];Ea.default=Fp});var tE=pe(function(ba){Object.defineProperty(ba,"__esModule",{value:!0});ba.contentVocabulary=ba.metadataVocabulary=void 0;ba.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ba.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ra=pe(function(xa){Object.defineProperty(xa,"__esModule",{value:!0});xa.DiscrError=void 0;var Pa;(function(e){e.Tag="tag",e.Mapping="mapping"})(Pa||(xa.DiscrError=Pa={}))});var nE=pe(function(Na){Object.defineProperty(Na,"__esModule",{value:!0});var X=Bt(),st=Ra(),Yt=NS(),Up=eb(),ka=vn(),Hp={message:({params:{discrError:e,tagName:t}})=>e===st.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>X._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Lp={keyword:"discriminator",type:"object",schemaType:"object",error:Hp,code(e){let{gen:t,data:r,schema:s,parentSchema:n,it:o}=e,{oneOf:i}=n;if(!o.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(s.mapping)throw Error("discriminator: mapping is not supported");if(!i)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",X._`${r}${X.getProperty(a)}`);t.if(X._`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:st.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let y=v();t.if(!1);for(let p in y)t.elseIf(X._`${u} === ${p}`),t.assign(c,f(y[p]));t.else(),e.error(!1,{discrError:st.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function f(y){let p=t.name("valid"),h=e.subschema({keyword:"oneOf",schemaProp:y},p);return e.mergeEvaluated(h,X.Name),p}function v(){var y;let p={},h=g(n),m=!0;for(let j=0;j<i.length;j++){let R=i[j];if((R===null||R===void 0?void 0:R.$ref)&&!ka.schemaHasRulesButRef(R,o.self.RULES)){let fe=R.$ref;if(R=Yt.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,fe),R instanceof Yt.SchemaEnv)R=R.schema;if(R===void 0)throw new Up.default(o.opts.uriResolver,o.baseId,fe)}let ee=(y=R===null||R===void 0?void 0:R.properties)===null||y===void 0?void 0:y[a];if(typeof ee!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);m=m&&(h||g(R)),O(ee,j)}if(!m)throw Error(`discriminator: "${a}" must be required`);return p;function g({required:j}){return Array.isArray(j)&&j.includes(a)}function O(j,R){if(j.const)x(j.const,R);else if(j.enum)for(let ee of j.enum)x(ee,R);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(j,R){if(typeof j!="string"||j in p)throw Error(`discriminator: "${a}" values must be unique strings`);p[j]=R}}}};Na.default=Lp});
9
+ export{Bt,vn,Dc,Qg,Kv,eb,NS,Gk,Jk,Yk,Zk,Xk,Qk,eE,tE,nE};
10
+
11
+ //# debugId=C2AB5F5787B2F72764756E2164756E21
12
+ //# sourceMappingURL=studio-f3awr5nc.js.map
@@ -0,0 +1,9 @@
1
+ import{pf}from"./studio-m3jrjfhy.js";import{l_,h}from"./studio-s49y6m5b.js";import{tr,xo,Lx,u}from"./studio-1d8m5s38.js";import{De}from"./studio-43pynnhz.js";import{bt,ul,ji,Wc,Pp,Wo,PL,BL}from"./studio-aaw7wxv8.js";import{b0,lT,y0}from"./studio-vswmz40d.js";import{x,wl}from"./studio-zn7ysyzb.js";import{ou}from"./studio-151kgn69.js";import{E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n,J,S,Ni,ld}from"./studio-erjccagy.js";import{ce}from"./studio-7qqb7hb8.js";var ew="Project Styles",Au="stylebook",lm="tokens",K="source",sb={elements:Au,variables:lm,code:K},BS=["elements","variables","code"],xN=BS.map((e)=>sb[e]),VS=[{id:"color",prefix:"--color-",title:"Colors"},{id:"font",prefix:"--font-",title:"Fonts"},{id:"size",prefix:"--size-",title:"Sizes & Spacing"},{id:"other",prefix:"--",title:"Other"}];function WS(e){if(e.startsWith("--color"))return"color";if(e.startsWith("--font"))return"font";if(e.startsWith("--size")||e.startsWith("--spacing")||e.startsWith("--radius"))return"size";return"other"}function Q(e){let o=WS(e);if(o==="other")return e;let{prefix:t}=VS.find((r)=>r.id===o);return l_(e,t)}function Z(e){if(!e)return[];let o=[];for(let[t,r]of Object.entries(e)){if(!t.startsWith("--"))continue;if(!n(r)&&!J(r))continue;o.push({group:WS(t),label:Q(t),name:t,value:r})}return o}function zS(e){let o=Z(e);return VS.map((t)=>({group:t,tokens:o.filter((r)=>r.group===t.id)}))}function US(e){if(!e)return[];let{featureQueries:o,sizeBreakpoints:t}=Wo(e),r=[],a=[];for(let{name:l,query:d}of o){let v=Pp(d);if(v)r.push({key:`@${l}`,kind:"scheme",label:v==="dark"?"Dark":"Light",name:l,scheme:v});else a.push({key:`@${l}`,kind:"feature",label:`@${l}`,name:l})}let i=t.map(({name:l})=>({key:`@${l}`,kind:"size",label:`@${l}`,name:l}));return[...r,...i,...a]}function D(e,o){return Ni(e,o.key)}function tw(e,o,t){let r=D(e,o)?.[t];return n(r)||J(r)?r:void 0}function wE(e,o,t,r){if(r){ld(e,o.key)[t]=r;return}let a=D(e,o);if(!a)return;if(delete a[t],Object.keys(a).length===0)delete e[o.key]}function _N(e,o,t,r=[]){let a=new Set(r.map((i)=>i.name));return o.filter((i)=>!a.has(i.name)&&tw(e,i,t)===void 0)}function W(e){return!e.startsWith(":")&&!e.startsWith(".")&&!e.startsWith("&")&&!e.startsWith("[")&&!e.startsWith("@")&&!e.startsWith("--")}function N(e){return S(e)&&!Array.isArray(e)}var L="& .element-card-preview";function nw(e){let o={},t=(r)=>{let a={};for(let[i,l]of Object.entries(r))if(i!=="@--")a[i]=l;return a};for(let[r,a]of Object.entries(e)){if(!N(a)){o[r]=a;continue}if(r==="@--")continue;if(pf(r)){o[r]=a;continue}if(r.startsWith("@")){let i={};for(let[l,d]of Object.entries(a))if(N(d)&&W(l))i[`${L} ${l}`]=t(d);else i[l]=d;o[r]=i;continue}if(W(r)){o[`${L} ${r}`]=t(a);continue}o[r]=a}return o}function A(e,o){let t=o.split(" "),r=e;for(let a of t){if(!N(r))return null;r=r[a]}return N(r)?r:null}function iw(e,o){let t=A(e,o);if(t&&Object.keys(t).length>0)return!0;for(let[r,a]of Object.entries(e)){if(!r.startsWith("@")||!N(a))continue;let i=A(a,o);if(i&&Object.keys(i).length>0)return!0}return!1}function X(e){if(!e)return null;return e.split(" ").pop()??null}function rw(e,o){let t=X(o),r=[],a=(i,l,d)=>{let v=d?`${d} ${i.tag}`:i.tag;r.push({depth:l,entry:i,path:v,selected:i.tag===t,tag:i.tag});let C=i.children?[...new Map(i.children.map((w)=>[w.tag,w])).values()]:[];for(let w of C)a(w,l+1,v)};for(let i of e)a(i,0,"");return r}function B(e){let o=new Map,t=new Map,r=e.filter.toLowerCase(),a=(s,p,g)=>{let c=s.tag===g?g:`${g} ${s.tag}`;o.set(Wc(p),c);let f=s.children??[];for(let[y,O]of f.entries())a(O,[...p,"children",y],g)},i=(s)=>{let p={...s.attributes};if(s.style)p.style=s.style;let g={tagName:s.tag};if(s.text)g.textContent=s.text;if(Object.keys(p).length>0)g.attributes=p;if(s.children)g.children=s.children.map(i);return g},l=(s,p,g,c,f)=>{o.set(Wc(c),s),o.set(Wc([...c,"children",0]),s);let y=[...c,"children",0,"children",0];if(f)a(f,y,s);else o.set(Wc(y),s);if(!t.has(s))t.set(s,c);return{attributes:{class:"element-card"},children:[{attributes:{class:"element-card-preview"},children:[g],tagName:"div"},{attributes:{class:"element-card-label"},tagName:"div",textContent:p}],tagName:"div"}},d=[],v=(s,p)=>({attributes:{class:"sb-section"},children:[{attributes:{class:"sb-label"},tagName:"div",textContent:s},{attributes:{class:"sb-body"},children:p,tagName:"div"}],tagName:"div"}),C=()=>["children",d.length,"children",1];for(let s of e.meta.$sections){let p=s.elements;if(r)p=p.filter((f)=>f.tag.includes(r)||s.label.toLowerCase().includes(r));if(e.customizedOnly)p=p.filter((f)=>iw(e.effectiveStyle,f.tag));if(p.length===0)continue;let g=C(),c=p.map((f,y)=>l(f.tag,`<${f.tag}>`,i(f),[...g,"children",y],f));d.push(v(s.label,c))}let w=[];{let s=e.components;if(r)s=s.filter((p)=>p.tagName.toLowerCase().includes(r));if(e.customizedOnly)s=s.filter((p)=>iw(e.effectiveStyle,p.tagName));if(s.length>0){let p=C(),g=s.map((c,f)=>{let y=[...p,"children",f];if(c.source!=="npm"&&c.path?.endsWith(".json")){w.push({$ref:`/${e.projectRoot?`${e.projectRoot}/`:""}${c.path}`.replace(/^\/+/,"/")});let P=e.specimens?.get(c.tagName);if(P?.kind==="props"){let m={$props:P.props,tagName:c.tagName};return l(c.tagName,`<${c.tagName}>`,m,y,null)}if(P?.kind!=="none"){let m={};for(let j of c.props??[])if(j.default!==void 0&&j.default!=="false"&&j.default!=="''")m[j.name]=String(j.default).replaceAll(/^'|'$/g,"");let M={tagName:c.tagName};if(Object.keys(m).length>0)M.attributes=m;return l(c.tagName,`<${c.tagName}>`,M,y,null)}}let z={attributes:{class:"sb-fallback"},tagName:"div",textContent:`<${c.tagName}>`};return l(c.tagName,`<${c.tagName}>`,z,y,null)});d.push(v("Components",g))}}if(d.length===0)d.push({attributes:{class:"sb-empty"},tagName:"div",textContent:e.customizedOnly?"No customized elements":"No matching elements"});let k={};if(w.length>0)k.$elements=w;if(e.effectiveHead&&e.effectiveHead.length>0)k.$head=e.effectiveHead;return k.$media=e.effectiveMedia,k.attributes={class:"sb-root"},k.children=d,k.style=nw(e.effectiveStyle),k.tagName="div",{doc:k,pathToTag:o,tagToCardPath:t}}var H={$schema:"https://jxsuite.com/schema/v1",$id:"StudioStylebookChrome",$description:"The bar across the top of the Project Styles canvas: the filter that narrows the specimen catalogue, and the toggle that reduces it to the elements this file has already styled. Both are shell state rather than document state — the adapter owns which — and the two names come in as values, because the surface is called Project Styles and the canvas view it draws is the wire word `stylebook`; nothing a reader sees here may be spelled from that. **The bar IS the kit's toolbar now.** It used to write `role=\"toolbar\"` and its own `aria-label` on a `<div>`, which is a role with none of the behaviour under it: two controls, two tab stops, and no arrow key between them. `jx-action-group` is not the element for it — that one roves `jx-action-button` and this bar's first control is a `jx-textfield` — so `jx-toolbar` is, and the field keeps its own arrows while its caret still has text to walk (ui.md §5.5).",tagName:"jx-toolbar",attributes:{part:"chrome"},$props:{label:{$ref:"#/state/title"}},style:{$description:'What `.sb-chrome` said in `styles/overlays.css`, plus the six inline declarations the template carried beside it, plus `.tb-toggle` — all three go dead with this conversion, and none of them is shared with another surface. Three repairs on the way. The bar is one element rather than a positioned box wrapping a `role="toolbar"` row that declared the same flex layout again. The flex layout is not declared here EITHER any more: `display: flex`, `align-items: center`, the `--jx-space-2` gap, the sans face and the foreground colour are all `jx-toolbar`\'s own, so what is left below is only what a positioned BAND is. And `.tb-toggle` read `var(--spectrum-font-size-50, 11px)`, which the kit spells `--jx-text-sm` at the same value; the rest of its drawing is a `jx-action-button` reaching in through `part="control"`, because what it has to look like is a small bordered chip and every fill and control height the kit draws would otherwise have to be taken back off.',position:"absolute",top:"0",left:"0",right:"0",zIndex:"15",flexShrink:"0",padding:"var(--jx-space-2) var(--jx-space-3)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",'& [part="filter"]':{flex:"1",maxWidth:"200px"},'& [part="customized"] > [part="control"]':{$description:"Bordered, unfilled and dimmed until it is on, which is what says it is a filter rather than an action: the catalogue it narrows is the thing the reader is looking at, so the control has to be quieter than its subject.",padding:"3px var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"transparent",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",":hover":{background:"var(--hover-bg)"}},'& [part="customized"][data-selected] > [part="control"]':{$description:"`data-selected` and not `selected`: the kit reflects the pressed state as a data attribute (`jx-action-button.json`), and the property this document binds never reaches the attribute of the same name.",borderColor:"var(--accent)",background:"var(--accent-15)",color:"var(--accent)"}},children:[{tagName:"jx-textfield",attributes:{part:"filter"},$props:{size:"sm",type:"search",clearable:!0,label:{$ref:"#/state/filterLabel"},placeholder:"Filter…",value:{$ref:"#/state/filter"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",$description:"`onchange` and not `onclick`: a `toggles` button owns its own pressed state and says so with `change` (`jx-action-button.json`), and an `onclick` written here would replace the element's own click handler on the same property — the toggle would stop flipping and stop announcing `aria-pressed`.",attributes:{part:"customized"},$props:{size:"sm",toggles:!0,selected:{$ref:"#/state/customizedOnly"},label:{$ref:"#/state/customizedLabel"},hint:{$ref:"#/state/customizedHint"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleCustomized"},value:[]}]},children:[{tagName:"span",textContent:"${state.customizedLabel}"}]}]};E("stylebook-chrome",H);function V(e,o){let t=document.createElement("div");t.style.display="contents";let r=b({...e,...o}),a=null,i=!1;function l(){i=!0,I("stylebook-chrome",r,t).then((d)=>{i=!1,a=d})}return l(),{host:t,update(d){if(Object.assign(r,d),i||a!==null&&t.contains(a.root))return;a?.dispose(),a=null,t.textContent="",l()}}}var q=new WeakMap;async function te(e){let{path:o}=e;if(e.source==="npm"||!o?.endsWith(".json"))return{kind:"bare"};let t=await lT(o);if(!t)return{kind:"bare"};let r=b0(t);if(r.size>0&&await y0(t,o,r))return{kind:"props",props:Object.fromEntries(r)};return await y0(t,o,new Map)?{kind:"bare"}:{kind:"none"}}async function F(e,o=te){let t=q.get(e);if(!t)t=new Map,q.set(e,t);let r=t,a=await Promise.all(e.map(async(i)=>{let l=i.path??i.tagName,d=r.get(l);if(!d)d=o(i).catch(()=>({kind:"bare"})),r.set(l,d);return[i.tagName,await d]}));return new Map(a)}var gp={$sections:[{label:"Headings",elements:[{tag:"h1",text:"Code Is Poetry"},{tag:"h2",text:"Code Is Poetry"},{tag:"h3",text:"Code Is Poetry"},{tag:"h4",text:"Code Is Poetry"},{tag:"h5",text:"Code Is Poetry"},{tag:"h6",text:"Code Is Poetry"}]},{label:"Paragraph",elements:[{tag:"p",text:"In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."}]},{label:"List",elements:[{tag:"ul",children:[{tag:"li",text:"Alice."},{tag:"li",text:"The White Rabbit."},{tag:"li",text:"The Cheshire Cat."},{tag:"li",text:"The Mad Hatter."},{tag:"li",text:"The Queen of Hearts."}]},{tag:"ol",children:[{tag:"li",text:"First item"},{tag:"li",text:"Second item"},{tag:"li",text:"Third item"}]}]},{label:"Quote",elements:[{tag:"blockquote",children:[{tag:"p",text:"In quoting others, we cite ourselves.",style:"font-size:1.25em;font-style:italic"},{tag:"p",text:"— Julio Cortázar"}]}]},{label:"Code",elements:[{tag:"pre",children:[{tag:"code",text:`// A "block" is the abstract term used
2
+ // to describe units of markup that
3
+ // when composed together, form the
4
+ // content or layout of a page.
5
+ registerBlockType( name, settings );`}]}]},{label:"Inline",elements:[{tag:"a",text:"Visit the documentation",attributes:{href:"#"}},{tag:"strong",text:"Bold text emphasis"},{tag:"em",text:"Italic text emphasis"},{tag:"small",text:"Fine print and legal text"},{tag:"mark",text:"Highlighted text"},{tag:"code",text:"const x = 42;"},{tag:"abbr",text:"HTML",attributes:{title:"HyperText Markup Language"}},{tag:"sub",text:"subscript"},{tag:"sup",text:"superscript"}]},{label:"Form",elements:[{tag:"input",attributes:{type:"text",placeholder:"Enter text…"}},{tag:"button",text:"Click Me"},{tag:"select",children:[{tag:"option",text:"Option 1"},{tag:"option",text:"Option 2"},{tag:"option",text:"Option 3"}]},{tag:"textarea",attributes:{placeholder:"Enter longer text…",rows:"3"}}]},{label:"Table",elements:[{tag:"table",children:[{tag:"thead",children:[{tag:"tr",children:[{tag:"th",text:"Name"},{tag:"th",text:"Role"},{tag:"th",text:"Status"}]}]},{tag:"tbody",children:[{tag:"tr",children:[{tag:"td",text:"Alice"},{tag:"td",text:"Developer"},{tag:"td",text:"Active"}]},{tag:"tr",children:[{tag:"td",text:"Bob"},{tag:"td",text:"Designer"},{tag:"td",text:"Away"}]},{tag:"tr",children:[{tag:"td",text:"Carol"},{tag:"td",text:"Manager"},{tag:"td",text:"Active"}]}]}]}]},{label:"Interactive",elements:[{tag:"details",attributes:{open:""},children:[{tag:"summary",text:"Click to expand details"},{tag:"p",text:"Additional detail content revealed when the disclosure widget is toggled open."}]}]},{label:"Media",elements:[{tag:"img",attributes:{alt:"Placeholder image"},style:"width:100%;max-width:400px;height:200px;background:#e0e0e0;display:block;border-radius:4px"},{tag:"video",attributes:{controls:""},style:"width:100%;max-width:400px;height:200px;background:#e0e0e0;display:block;border-radius:4px"},{tag:"audio",attributes:{controls:""},style:"width:100%"}]}],$variables:{color:{label:"Color",prefix:"--color-",placeholder:"#007acc"},font:{label:"Font",prefix:"--font-",placeholder:"system-ui, sans-serif"},size:{label:"Size",prefix:"--size-",placeholder:"16px"},other:{label:"Other",prefix:"--",placeholder:"value"}}};var G=new WeakMap;function ne(e){let o={customizedHint:"Show only the elements this file has already styled",customizedLabel:"Customized",customizedOnly:u.stylebook.customizedOnly,filter:u.stylebook.filter,filterLabel:`Filter the ${ew} catalogue`,title:ew},t=G.get(e);if(t)return t.update(o),t.host;let r=V(o,{setFilter:(a)=>{u.stylebook.filter=a},toggleCustomized:()=>{u.stylebook.customizedOnly=!u.stylebook.customizedOnly}});return G.set(e,r),r.host}function re(e,o){let t=e.filter((r)=>r.name===(o??"base"));return t.length>0?t:e.slice(0,1)}async function SN(e,o){let t=e.wrap,r=bt(e.paneId),a=u.stylebook.filter.toLowerCase(),{customizedOnly:i}=u.stylebook,l=e.renderGeneration,d=De,v=F(d),C=tr(r?.doc.document?.$media),{sizeBreakpoints:w,baseWidth:k}=Wo(C),s=w.length>0,p=ne(e);t.style.overflow="hidden";let g=[];if(s){g.push({displayName:ji("--"),name:"base",width:k});for(let m of w)g.push({displayName:ji(m.name),name:m.name,width:m.width})}let c;if(!s){let m=C["--"],M=m?`${ji("--")} (${k}px)`:null;c=[o.canvasPanelEntry(m?"base":null,M,!m,m?k:void 0)]}else c=re(g,ul(e.paneId)).map((m)=>o.canvasPanelEntry(m.name,`${m.displayName} (${m.width}px)`,!1,m.width));if(!await o.drawStage(e,{frame:"boards",framePart:"panzoom",frameVars:"--boards-inset:40px",handles:"hidden",hug:!1,innerPart:"boards",lead:"chrome",panels:c.map((m)=>m.item)},c))return;let y=o.stageHost(e,"chrome-host");if(y&&y.firstChild!==p)y.replaceChildren(p);let O=await v;if(e.renderGeneration!==l)return;let z=B({components:d,specimens:O,customizedOnly:Boolean(i),effectiveHead:Lx(r?.doc.document?.$head),effectiveMedia:C,effectiveStyle:xo(r?.doc.document?.style),filter:a,meta:gp,projectRoot:x?.projectRoot??null}),{panels:P}=e;for(let{panel:m}of c)P.push(m),PL(e.renderGeneration,z,m.canvas,m._width);if(s)o.updateActivePanelHeaders(e);o.applyTransform(e),o.observeCenterUntilStable(e)}function $d(e,o,{panCanvas:t=!1}={}){let r={activeSelector:e,rightTab:"style"};if(o!==void 0)r.activeMedia=o;if(wl(h.value,{selection:[],ui:r}),u.stylebook.selection=e,e&&t)BL(e)}var qS=[{id:"page",strip:"page",title:"Page"},{id:"properties",strip:"element",title:"Content"},{id:"style",strip:"element",title:"Style"},{id:"events",strip:"element",title:"Logic"},{id:"assistant",strip:"assistant",title:"Assistant"}],xE=[{id:"page",title:"Page"},{id:"element",title:"Element"},{id:"assistant",title:"Assistant"}];function KS(){return{saveDocument:()=>{},undo:()=>{},redo:()=>{},openInBrowser:()=>{},buildSite:()=>{},closeDocument:()=>{},duplicateSelection:()=>{},deleteSelection:()=>{},selectParent:()=>{},toggleDock:()=>{},toggleZen:()=>{},openPalette:()=>{},openProject:()=>{},newWindow:()=>{},panelRoster:[],focusPanel:()=>{},focusInspectorTab:()=>{},cycleRegion:()=>{}}}var T=(e)=>e.document.open,R=(e)=>e.selection.count>0&&e.editor.kind==="canvas",_=(e)=>!e.selection.isRoot&&e.selection.paths.every((o)=>ou(o)),U="an element selected on the canvas that has a sibling position: not the document root, a repeater's template or a switch case",Y=(e)=>e.map((o)=>`[${o.join(", ")}]`).join(" and ");function cm(e){return[{id:"file.save",title:"Save",category:"File",level:"document",icon:"floppy-disk",keybinding:"mod+s",menus:["commandbar/primary","statusbar/document","palette"],group:"1_file",undo:"none",when:T,enablement:(t)=>t.document.dirty,requires:"unsaved changes",run:()=>e.saveDocument()},{id:"document.close",title:"Close Document",category:"Document",level:"document",keybinding:"mod+w",menus:["context/tab","palette"],group:"1_file",when:T,requires:"an open document",run:()=>e.closeDocument()},{id:"view.openInBrowser",title:"Open in Browser",category:"View",level:"document",icon:"arrow-square-out",keybinding:"mod+shift+o",menus:["commandbar/primary","statusbar/document","palette"],group:"2_output",when:(t)=>t.project.isSite,enablement:T,requires:"a page to preview",run:()=>e.openInBrowser()},{id:"project.buildSite",title:"Build Site",category:"Project",level:"project",menus:["commandbar/overflow","palette"],group:"2_output",when:(t)=>t.project.isSite,requires:"a site project",run:()=>e.buildSite()},{id:"edit.undo",title:"Undo",category:"Edit",level:"document",icon:"arrow-u-up-left",keybinding:"mod+z",menus:["commandbar/primary","palette"],group:"1_history",order:1,when:T,enablement:(t)=>t.document.canUndo,requires:"a change to undo",run:()=>e.undo()},{id:"edit.redo",title:"Redo",category:"Edit",level:"document",icon:"arrow-u-up-right",keybinding:["mod+shift+z","mod+y"],menus:["commandbar/primary","palette"],group:"1_history",order:2,when:T,enablement:(t)=>t.document.canRedo,requires:"a change to redo",run:()=>e.redo()},{id:"selection.duplicate",title:"Duplicate",category:"Selection",level:"selection",keyScope:"canvas",keybinding:"mod+d",menus:["blockbar","context/element","context/layer","outline/row","palette"],group:"3_structure",undo:"document",when:R,enablement:_,requires:U,aiTool:{name:"duplicate_node",description:"Duplicate elements in the document, inserting each copy after its original, as one undoable step. The copies become the selection.",report:({after:t})=>{let r=t.selection.paths.length;return`Duplicated ${r} element${r===1?"":"s"}; the ${r===1?"copy is":"copies are"} selected at ${Y(t.selection.paths)}.`}},run:()=>e.duplicateSelection()},{id:"selection.repeat",title:"Repeat...",category:"Selection",level:"selection",keyScope:"canvas",menus:["context/element","palette"],group:"3_structure",undo:"document",when:R,enablement:(t)=>_(t)&&!t.selection.isRepeater,requires:"an element with a sibling position that is not already a repeater",run:()=>{(ce("g66r6qp1"),import("./convert-to-repeater-g66r6qp1.js")).then(({convertToRepeater:t})=>t())}},{id:"selection.delete",title:"Delete",category:"Selection",level:"selection",keyScope:"canvas",keybinding:["delete","backspace"],menus:["blockbar","context/element","context/layer","outline/row","palette"],group:"9_danger",destructive:!0,undo:"document",when:R,enablement:_,requires:U,aiTool:{name:"delete_node",description:"Delete elements from the document as one undoable step.",report:({before:t,after:r})=>{let a=t.selection.paths.length;return`Deleted ${a} element${a===1?"":"s"} at ${Y(t.selection.paths)} in one undo step; the selection is now ${r.selection.count===0?"empty":"elsewhere"}.`}},run:()=>e.deleteSelection()},{id:"selection.selectParent",title:"Select Parent",category:"Selection",level:"selection",keyScope:"canvas",keybinding:["escape","arrowleft"],menus:["palette"],group:"2_navigate",when:R,requires:"an element selection",run:()=>e.selectParent()},{id:"view.toggleNavigator",title:"Toggle Navigator Dock",category:"View",level:"application",keybinding:"mod+b",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleDock("navigator")},{id:"view.toggleInspector",title:"Toggle Inspector Dock",category:"View",level:"application",keybinding:"mod+alt+b",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleDock("inspector")},{id:"view.zen",title:"Zen Mode",category:"View",level:"application",keybinding:"mod+.",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>e.toggleZen()},{id:"palette.open",title:"Open Command Center",category:"View",level:"application",keybinding:"mod+k",menus:["palette"],group:"5_palette",run:()=>e.openPalette("picker")},{id:"palette.openFiles",title:"Go to File…",category:"File",level:"application",keybinding:"mod+p",menus:["palette"],group:"5_palette",run:()=>e.openPalette("files")},{id:"palette.openCommands",title:"Run Command…",category:"View",level:"application",keybinding:"mod+shift+p",menus:["palette"],group:"5_palette",run:()=>e.openPalette("commands")},{id:"palette.openNodes",title:"Go to Symbol in Document…",category:"Selection",level:"document",menus:["palette"],group:"5_palette",when:T,requires:"an open document",run:()=>e.openPalette("nodes")},{id:"project.open",title:"Open Project…",category:"Project",level:"project",keybinding:"mod+o",menus:["commandbar/overflow","statusbar/project","palette"],group:"1_file",when:(t)=>t.capability.openProject,requires:"a host that can open a project from a dialog",run:()=>e.openProject()},{id:"view.newWindow",title:"New Window",category:"View",level:"application",keybinding:"mod+shift+n",menus:["commandbar/overflow","palette"],group:"1_file",when:(t)=>t.capability.windowControls,requires:"a host that can hold more than one window",run:()=>e.newWindow()},{id:"project.openRecent",title:"Open Recent…",category:"Project",level:"project",menus:["commandbar/overflow","statusbar/project","palette"],group:"1_file",run:()=>e.openPalette("projects")},...ae(e),...ie(e),{id:"view.cycleRegion",title:"Focus Next Region",category:"View",level:"application",keybinding:"f6",menus:["palette"],group:"4_docks",run:()=>e.cycleRegion(1)},{id:"view.cycleRegionBack",title:"Focus Previous Region",category:"View",level:"application",keybinding:"shift+f6",menus:["palette"],group:"4_docks",run:()=>e.cycleRegion(-1)}]}function ae(e){return e.panelRoster.map((o)=>({id:`panel.focus.${o.id}`,title:`Show ${o.title}`,category:"View",level:"application",menus:["palette"],group:"4_docks",requires:"an open project",when:(t)=>t.project.open&&(o.when?.(t)??!0),run:()=>e.focusPanel(o.id)}))}function ie(e){return qS.map((o,t)=>({id:`inspector.focus.${o.id}`,title:`Show ${o.title}`,category:"View",level:"document",keybinding:`mod+shift+${t+1}`,menus:["palette"],group:"4_docks",requires:"an open document",when:(a)=>a.document.open,run:()=>e.focusInspectorTab(o.id)}))}
6
+ export{ew,Au,lm,sb,BS,xN,VS,WS,zS,US,tw,wE,_N,nw,iw,rw,gp,SN,$d,qS,xE,KS,cm};
7
+
8
+ //# debugId=9EE8CCB88E9C37C464756E2164756E21
9
+ //# sourceMappingURL=studio-f69wcajk.js.map
@@ -1,5 +1,5 @@
1
- import{ea,m,Si,Ft}from"./studio-knsjyx7n.js";import{w}from"./studio-sce30r7b.js";import{p,ye}from"./studio-4fnb5648.js";import{pv}from"./studio-hh394phe.js";import{At}from"./studio-1ks5d9y4.js";import{zd,Wd,K$,rv,nr,Vd,Yc,hh,fl,Vm}from"./studio-61rg2cz5.js";import{d2,v0}from"./studio-1410q5dw.js";import{ls,ex,Xu,rA}from"./studio-3pz4t5a2.js";import{Rp}from"./studio-cfnn70h1.js";import{Ln,E,R}from"./studio-9dq7rwc7.js";import{me,te,g,le}from"./studio-3qr08sxq.js";import{Q}from"./studio-k3we3kqb.js";import{ce}from"./studio-0939t1q1.js";var S={$schema:"https://jxsuite.com/schema/v1",$id:"StudioMediaPane",$description:"The Media viewer: a pane that SHOWS a file the studio has no document model for — an image at its own size, a video or audio player, an embedded PDF, a font set in a pangram, or an honest line about a format nothing here can draw. The adapter hands in one projection: which of the six stages to draw, the URL that loads it, the file's name and facts, the reference a document would write for it, and the documents that already do. Nothing here decides anything; a control asks the host to copy, to open a path, or to record the pixel size the browser just learned.",tagName:"div",attributes:{part:"viewer","data-jx-region":"${state.region}"},style:{$description:"What `.media-viewer`, `.media-stage`, `.media-image`, `.media-video`, `.media-embed`, `.media-audio`, `.media-specimen`, `.media-specimen-line`, `.media-unviewable`, `.media-note`, `.media-details`, `.media-name`, `.media-facts`, `.media-ref`, `.media-ref-value`, `.media-usage`, `.media-usage-title`, `.media-usage-headline`, `.media-usage-list`, `.media-usage-link` and `.media-usage-count` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. All twenty-two were this surface's alone, so the stylesheet block goes with the conversion rather than being copied. Eight `var(--spectrum-font-size-…)` names could not come with the declarations: every one of them resolves only inside `<sp-theme>`, and this document is mounted in a pane stage that is outside it, so each would silently have taken its hex fallback — they are the kit's `--jx-text-xs`, `--jx-text-sm`, `--jx-text-md` and `--jx-text-lg` instead.",height:"100%",display:"flex",gap:"var(--jx-space-5)",padding:"var(--jx-space-5)",overflowY:"auto",background:"var(--bg-panel)",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="asset-slot"], & [part="usage-slot"], & [part="list-slot"]':{$description:"A `$switch` renders its own container, and none of these three is a box: each stands exactly where its case does, so the case's own rule is the only one that lays anything out.",display:"contents"},'& [part="stage"]':{$description:"The asset takes the room and the details column keeps a fixed width, so the file is the thing being looked at and the facts about it are beside it rather than on top of it.",flex:"1",minWidth:"0",display:"flex",alignItems:"flex-start",justifyContent:"center"},'& [part="image"]':{$description:"Never larger than its own pixels: an upscaled thumbnail is a lie about the asset, and judging whether an imported image is big enough is the whole reason somebody opens this.",maxWidth:"100%",height:"auto",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-input)"},'& [part="video"], & [part="embed"]':{width:"100%",maxHeight:"70vh",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-input)"},'& [part="audio"]':{width:"100%"},'& [part="specimen"]':{$description:"A font is shown by being USED. The face itself arrives as a `@font-face` the adapter writes, under a family name generated from the path so two specimens open side by side cannot claim the same one; the element carries only that NAME, as a custom property, and the fallback stack that catches a face the browser refuses stays here where it is a rule rather than data.",width:"100%",padding:"var(--jx-space-5)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-input)",color:"var(--fg)",fontFamily:"var(--jx-specimen-family, system-ui), system-ui, sans-serif"},'& [part="specimen-line"]':{margin:"0 0 var(--jx-space-4)",lineHeight:"1.3",overflowWrap:"anywhere"},'& [part="specimen-line"][data-size="48"]':{fontSize:"48px"},'& [part="specimen-line"][data-size="32"]':{fontSize:"32px"},'& [part="specimen-line"][data-size="24"]':{fontSize:"24px"},'& [part="specimen-line"][data-size="18"]':{fontSize:"18px"},'& [part="specimen-line"][data-size="14"]':{fontSize:"var(--jx-text-lg)"},'& [part="unviewable"]':{$description:"Not a failure state. A file the browser cannot render is a zip, or a format this build has never heard of, so the box says what the file IS and that the project still builds with it in.",padding:"var(--jx-space-6)",border:"1px dashed var(--border)",borderRadius:"var(--radius)",color:"var(--fg-dim)",textAlign:"center"},'& [part="note"]':{fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="details"]':{flex:"0 0 260px",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)"},'& [part="title"]':{margin:"0",fontSize:"var(--jx-text-lg)",color:"var(--fg)",overflowWrap:"anywhere"},'& [part="facts"]':{$description:'Kind, pixel size, bytes and modified date, joined by the adapter. Each is omitted rather than zeroed when it is not known: a real file can almost be `0 × 0` or `0 B`, so neither may double as "we did not find out".',margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="ref"]':{$description:"The reference a document writes for this file — `/hero.jpg` for `public/hero.jpg`, which shares not one segment with it. Getting this wrong is the commonest way an image goes missing from a page, which is why it is on screen next to a button that copies it.",display:"flex",alignItems:"center",gap:"6px"},'& [part="ref-value"]':{flex:"1",minWidth:"0",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",background:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"3px 6px",overflowWrap:"anywhere"},'& [part="usage"]':{display:"flex",flexDirection:"column"},'& [part="group-title"]':{margin:"0 0 var(--jx-space-2)",fontSize:"var(--jx-text-md)",fontWeight:"500",color:"var(--fg-dim)"},'& [part="message"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="list"]':{listStyle:"none",margin:"var(--jx-space-3) 0 0",padding:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="row"]':{display:"flex",alignItems:"baseline",gap:"6px",fontSize:"var(--jx-text-md)"},'& [part="file-path"]':{$description:'The path is a control, not a label: it opens the document that references this file. A plain button rather than a `jx-button`, for the reason the Problems rows give — what it has to look like is a line of text, and every fill, border and control height the kit draws would have to be taken back off again. Named `file-path` and not `path` because `jx-icon` puts `part="path"` on the `<path>` of every glyph it draws, so `[part="path"]` would select this button and any SVG path beside it.',flex:"1",minWidth:"0",margin:"0",padding:"0",background:"none",border:"none",borderRadius:"var(--jx-radius-xs)",textAlign:"left",color:"var(--accent)",cursor:"pointer",font:"inherit",overflowWrap:"anywhere",":hover":{textDecoration:"underline"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}},'& [part="count"]':{flex:"0 0 auto",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"}},children:[{tagName:"div",attributes:{part:"stage"},children:[{tagName:"div",attributes:{part:"asset-slot",role:"none"},$switch:{$ref:"#/state/kind"},cases:{image:{tagName:"img",attributes:{part:"image",src:"${state.src}",alt:""},onload:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/imageLoaded"},value:[{$ref:"event#/target/naturalWidth"},{$ref:"event#/target/naturalHeight"}]}],description:"The only honest source of pixel dimensions in a browser is an image that has loaded, and this viewer is showing one at full size anyway. The host decides whether the numbers are new; a repeat load of the same picture must not repaint the pane."}},video:{tagName:"video",attributes:{part:"video",src:"${state.src}",controls:!0}},audio:{tagName:"audio",attributes:{part:"audio",src:"${state.src}",controls:!0}},embed:{tagName:"embed",attributes:{part:"embed",src:"${state.src}",type:"application/pdf",title:"${state.name}"}},font:{tagName:"div",attributes:{part:"specimen",style:"${state.specimenFamily}"},children:[{tagName:"style",textContent:"${state.fontFace}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"48"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"32"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"24"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"18"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"14"},textContent:"${state.specimen}"}]},unviewable:{tagName:"div",attributes:{part:"unviewable"},children:[{tagName:"p",children:[{tagName:"span",textContent:"Jx has no viewer for "},{tagName:"code",textContent:"${state.extLabel}"},{tagName:"span",textContent:"."}]},{tagName:"p",attributes:{part:"note"},textContent:"The file is in the project and builds normally."}]}}}]},{tagName:"div",attributes:{part:"details"},children:[{tagName:"h3",attributes:{part:"title"},textContent:"${state.name}"},{tagName:"p",attributes:{part:"facts"},textContent:"${state.facts}"},{tagName:"div",attributes:{part:"ref"},children:[{tagName:"code",attributes:{part:"ref-value"},textContent:"${state.ref}"},{tagName:"jx-action-button",$props:{size:"sm",quiet:!0,hint:"Copy the reference"},attributes:{part:"copy"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/copyRef"}}]},children:[{tagName:"span",textContent:"Copy"}]}]},{tagName:"div",attributes:{part:"usage-slot",role:"none"},$switch:{$ref:"#/state/usageState"},cases:{shown:{tagName:"div",attributes:{part:"usage"},children:[{tagName:"h4",attributes:{part:"group-title"},textContent:"Used by"},{tagName:"p",attributes:{part:"message"},textContent:"${state.usageHeadline}"},{tagName:"div",attributes:{part:"list-slot",role:"none"},$switch:{$ref:"#/state/hasUsageFiles"},cases:{true:{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/usageFiles"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"row","data-usage":"${$map.item.path}"},children:[{tagName:"button",attributes:{part:"file-path",type:"button"},textContent:"${$map.item.path}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openDocument"},value:[{$ref:"$map/item/path"}]}]}},{tagName:"span",attributes:{part:"count"},textContent:"${$map.item.count}"}]}}]}}}]}}}]}]};E("media-pane",S);function F(e,t){e.region=t.region,e.name=t.name,e.kind=t.kind,e.src=t.src,e.facts=t.facts,e.ref=t.ref,e.specimen=t.specimen,e.specimenFamily=t.specimenFamily,e.fontFace=t.fontFace,e.extLabel=t.extLabel,e.usageState=t.usageState,e.usageHeadline=t.usageHeadline,e.usageFiles=t.usageFiles,e.hasUsageFiles=t.usageFiles.length>0}function N(e,t,a){e.replaceChildren();let n=g({copyRef:a.copyRef,extLabel:"",facts:"",fontFace:"",hasUsageFiles:!1,imageLoaded:a.imageLoaded,kind:"unviewable",name:"",openDocument:a.openDocument,ref:"",region:"",specimen:"",specimenFamily:"",src:"",usageFiles:[],usageHeadline:"",usageState:"hidden"});F(n,t);let i=null,o=!1,f=R("media-pane",n,e).then((r)=>{if(o)r.dispose();else i=r;return r.root});return{attached:()=>{if(o)return!1;let r=i?.root;return r===void 0?!0:r instanceof HTMLElement&&e.contains(r)},dispose(){o=!0,i?.dispose(),i=null},ready:f,update:(r)=>F(n,r)}}var c="media",z="The quick brown fox jumps over the lazy dog",u=new Map;function x(e){return u.get(e)??null}function xL(e,t){let a=x(e);return a!==null&&a.tabId===t.id&&a.wrap.isConnected&&a.surface.attached()}function Zw(e){let t=u.get(e);if(!t)return;t.scope.stop(),t.surface.dispose(),u.delete(e)}function _L(e){let t=At(e);if(K$.has(t))return"font";let a=Wd({name:e});if(a==="image"||a==="video"||a==="audio")return a;return t===".pdf"?"embed":"unviewable"}function SL(e,t){let a=[Wd({name:e})];if(t?.width!=null&&t.height!=null)a.push(`${t.width} × ${t.height}`);if(t?.bytes!=null)a.push(Vm(t.bytes));if(t?.modified)a.push(`modified ${Rp(new Date(t.modified))}`);return a.join(" · ")}function C(e){return`jx-specimen-${e.replaceAll(/[^a-zA-Z0-9]/g,"-")}`}function CL(e){let t=C(e);return{fontFace:`@font-face { font-family: "${t}"; src: url("${nr(e)}"); }`,specimen:z,specimenFamily:`--jx-specimen-family: "${t}"`}}function kL(e){let t=rA(e);if(t===null)return{usageFiles:[],usageHeadline:"",usageState:"hidden"};return{usageFiles:(e?.status==="ready"?e.result.files:[]).map((n)=>({count:String(n.count),path:n.path})),usageHeadline:t,usageState:"shown"}}async function I(e){let{openFileInTab:t}=await (ce("zrqtgt41"),import("./files-zrqtgt41.js"));await t(e)}function XN(e,t){let{paneId:a,wrap:n}=e;if(xL(a,t))return;Zw(a);let i=t.documentPath??"",o=rv(i),f=At(i),r=_L(i),s=null,h=()=>{if(s!==null&&x(a)===s)y()},v=()=>{let d=Yc(i),l=ex(i);if(!Vd(i))hh(i).then(h);if(l===null||l.status==="pending")Xu(i).then(h);let b=CL(i);return{extLabel:f||"this file",facts:SL(i,d),fontFace:r==="font"?b.fontFace:"",kind:r,name:i.split("/").pop()??"",ref:o,region:Ln(a,"media"),specimen:b.specimen,specimenFamily:b.specimenFamily,src:nr(i),...kL(l)}},y=()=>{s?.surface.update(v())},M=me(),j=N(n,v(),{copyRef:()=>{if("clipboard"in navigator)navigator.clipboard.writeText(o)},imageLoaded:(d,l)=>{if(fl(i,d,l))h()},openDocument:(d)=>{I(d)}});s={paneId:a,scope:M,surface:j,tabId:t.id,wrap:n},u.set(a,s),M.run(()=>{te(()=>{if(x(a)!==s)return;t.documentPath,pv.value,y()})})}var A={children:[],tagName:"div"};function jb(e){return zd(e)}function EL(e){if(At(e)===".svg")return[c,"source"];if(d2(e)&&ye()&&Q(p().readFileBytes))return[c,ls];return[c]}function Zu(e,t={}){let a=m.tabs.get(e);if(a)return Ft(e,{focus:t.focus!==!1}),a;let n=Si({capabilities:{modes:EL(e)},document:structuredClone(A),documentPath:e,id:e,sourceFormat:null,...t.paneId!==void 0&&{paneId:t.paneId},...t.preview===!0&&{preview:!0},...t.focus===!1&&{focus:!1}});return H(n,e),n}var k=new WeakMap;async function H(e,t){if(!e.capabilities.modes.includes(ls))return;let a;try{a=new Uint8Array(await p().readFileBytes(t))}catch{return}let n=v0(t,a),i=m.tabs.get(t);if(n===null||!i)return;if(k.set(le(i),n),i.capabilities.modes=i.capabilities.modes.filter((o)=>o!==ls),i.session.ui.canvasMode===ls)i.session.ui.canvasMode=c,w.warn(n,{key:`image.refused:${t}`,path:t,source:"Image"})}function XS(e){if(!EL(e).includes(ls))return!1;let t=m.tabs.get(e);return!t||t.capabilities.modes.includes(ls)&&!ea(t)}function QS(){return ye()&&Q(p().readFileBytes)}function eC(e,t){let a=m.tabs.get(e);if(!a||!ea(a))return!1;let n=e.split("/").pop()??e;return w.warn(`You have read access to this session, so ${n} cannot be ${t}.`,{key:`media.readOnly:${e}`,path:e,source:"Collaboration"}),!0}function tC(e,t={}){let a=e.split("/").pop()??e;if(!EL(e).includes(ls))return w.warn(`${a} cannot be edited here.`,{detail:"The Image editor writes PNG, JPEG and WebP, on a backend that can hand Studio a file's raw bytes.",key:`image.notEditable:${e}`,path:e,source:"Image"}),null;Zu(e,t);let n=m.tabs.get(e);if(ea(n))return w.warn(`You have read access to this session, so ${a} cannot be edited.`,{key:`image.readOnly:${e}`,path:e,source:"Collaboration"}),null;if(!n.capabilities.modes.includes(ls))return w.warn(k.get(le(n))??`${a} cannot be edited here.`,{key:`image.refused:${e}`,path:e,source:"Image"}),null;return n.session.ui.canvasMode=ls,n}
2
- export{xL,Zw,_L,SL,CL,kL,XN,jb,EL,Zu,XS,QS,eC,tC};
1
+ import{ia,g,Si,Ft}from"./studio-s49y6m5b.js";import{w}from"./studio-bk0anq3b.js";import{p,ve}from"./studio-xh6rf05g.js";import{yy}from"./studio-48yzqzqr.js";import{Ot}from"./studio-z6s56dzz.js";import{Vd,Wd,rR,dy,no,zd,Yc,uh,gl,Km}from"./studio-td3h1644.js";import{SM,k_}from"./studio-zzgp5yka.js";import{cs,ax,Xu,bO}from"./studio-j3bq30yz.js";import{Ip}from"./studio-t46rt6gx.js";import{$n,E,I}from"./studio-1a7zshnv.js";import{me,te,b,le}from"./studio-9f5vcb4w.js";import{Q}from"./studio-erjccagy.js";import{ce}from"./studio-7qqb7hb8.js";var S={$schema:"https://jxsuite.com/schema/v1",$id:"StudioMediaPane",$description:"The Media viewer: a pane that SHOWS a file the studio has no document model for — an image at its own size, a video or audio player, an embedded PDF, a font set in a pangram, or an honest line about a format nothing here can draw. The adapter hands in one projection: which of the six stages to draw, the URL that loads it, the file's name and facts, the reference a document would write for it, and the documents that already do. Nothing here decides anything; a control asks the host to copy, to open a path, or to record the pixel size the browser just learned.",tagName:"div",attributes:{part:"viewer","data-jx-region":"${state.region}"},style:{$description:"What `.media-viewer`, `.media-stage`, `.media-image`, `.media-video`, `.media-embed`, `.media-audio`, `.media-specimen`, `.media-specimen-line`, `.media-unviewable`, `.media-note`, `.media-details`, `.media-name`, `.media-facts`, `.media-ref`, `.media-ref-value`, `.media-usage`, `.media-usage-title`, `.media-usage-headline`, `.media-usage-list`, `.media-usage-link` and `.media-usage-count` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. All twenty-two were this surface's alone, so the stylesheet block goes with the conversion rather than being copied. Eight `var(--spectrum-font-size-…)` names could not come with the declarations: every one of them resolves only inside `<sp-theme>`, and this document is mounted in a pane stage that is outside it, so each would silently have taken its hex fallback — they are the kit's `--jx-text-xs`, `--jx-text-sm`, `--jx-text-md` and `--jx-text-lg` instead.",height:"100%",display:"flex",gap:"var(--jx-space-5)",padding:"var(--jx-space-5)",overflowY:"auto",background:"var(--bg-panel)",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="asset-slot"], & [part="usage-slot"], & [part="list-slot"]':{$description:"A `$switch` renders its own container, and none of these three is a box: each stands exactly where its case does, so the case's own rule is the only one that lays anything out.",display:"contents"},'& [part="stage"]':{$description:"The asset takes the room and the details column keeps a fixed width, so the file is the thing being looked at and the facts about it are beside it rather than on top of it.",flex:"1",minWidth:"0",display:"flex",alignItems:"flex-start",justifyContent:"center"},'& [part="image"]':{$description:"Never larger than its own pixels: an upscaled thumbnail is a lie about the asset, and judging whether an imported image is big enough is the whole reason somebody opens this.",maxWidth:"100%",height:"auto",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-input)"},'& [part="video"], & [part="embed"]':{width:"100%",maxHeight:"70vh",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-input)"},'& [part="audio"]':{width:"100%"},'& [part="specimen"]':{$description:"A font is shown by being USED. The face itself arrives as a `@font-face` the adapter writes, under a family name generated from the path so two specimens open side by side cannot claim the same one; the element carries only that NAME, as a custom property, and the fallback stack that catches a face the browser refuses stays here where it is a rule rather than data.",width:"100%",padding:"var(--jx-space-5)",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-input)",color:"var(--fg)",fontFamily:"var(--jx-specimen-family, system-ui), system-ui, sans-serif"},'& [part="specimen-line"]':{margin:"0 0 var(--jx-space-4)",lineHeight:"1.3",overflowWrap:"anywhere"},'& [part="specimen-line"][data-size="48"]':{fontSize:"48px"},'& [part="specimen-line"][data-size="32"]':{fontSize:"32px"},'& [part="specimen-line"][data-size="24"]':{fontSize:"24px"},'& [part="specimen-line"][data-size="18"]':{fontSize:"18px"},'& [part="specimen-line"][data-size="14"]':{fontSize:"var(--jx-text-lg)"},'& [part="unviewable"]':{$description:"Not a failure state. A file the browser cannot render is a zip, or a format this build has never heard of, so the box says what the file IS and that the project still builds with it in.",padding:"var(--jx-space-6)",border:"1px dashed var(--border)",borderRadius:"var(--radius)",color:"var(--fg-dim)",textAlign:"center"},'& [part="note"]':{fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="details"]':{flex:"0 0 260px",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)"},'& [part="title"]':{margin:"0",fontSize:"var(--jx-text-lg)",color:"var(--fg)",overflowWrap:"anywhere"},'& [part="facts"]':{$description:'Kind, pixel size, bytes and modified date, joined by the adapter. Each is omitted rather than zeroed when it is not known: a real file can almost be `0 × 0` or `0 B`, so neither may double as "we did not find out".',margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="ref"]':{$description:"The reference a document writes for this file — `/hero.jpg` for `public/hero.jpg`, which shares not one segment with it. Getting this wrong is the commonest way an image goes missing from a page, which is why it is on screen next to a button that copies it.",display:"flex",alignItems:"center",gap:"6px"},'& [part="ref-value"]':{flex:"1",minWidth:"0",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",background:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"3px 6px",overflowWrap:"anywhere"},'& [part="usage"]':{display:"flex",flexDirection:"column"},'& [part="group-title"]':{margin:"0 0 var(--jx-space-2)",fontSize:"var(--jx-text-md)",fontWeight:"500",color:"var(--fg-dim)"},'& [part="message"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="list"]':{listStyle:"none",margin:"var(--jx-space-3) 0 0",padding:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="row"]':{display:"flex",alignItems:"baseline",gap:"6px",fontSize:"var(--jx-text-md)"},'& [part="file-path"]':{$description:'The path is a control, not a label: it opens the document that references this file. A plain button rather than a `jx-button`, for the reason the Problems rows give — what it has to look like is a line of text, and every fill, border and control height the kit draws would have to be taken back off again. Named `file-path` and not `path` because `jx-icon` puts `part="path"` on the `<path>` of every glyph it draws, so `[part="path"]` would select this button and any SVG path beside it.',flex:"1",minWidth:"0",margin:"0",padding:"0",background:"none",border:"none",borderRadius:"var(--jx-radius-xs)",textAlign:"left",color:"var(--accent)",cursor:"pointer",font:"inherit",overflowWrap:"anywhere",":hover":{textDecoration:"underline"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}},'& [part="count"]':{flex:"0 0 auto",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"}},children:[{tagName:"div",attributes:{part:"stage"},children:[{tagName:"div",attributes:{part:"asset-slot",role:"none"},$switch:{$ref:"#/state/kind"},cases:{image:{tagName:"img",attributes:{part:"image",src:"${state.src}",alt:""},onload:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/imageLoaded"},value:[{$ref:"event#/target/naturalWidth"},{$ref:"event#/target/naturalHeight"}]}],description:"The only honest source of pixel dimensions in a browser is an image that has loaded, and this viewer is showing one at full size anyway. The host decides whether the numbers are new; a repeat load of the same picture must not repaint the pane."}},video:{tagName:"video",attributes:{part:"video",src:"${state.src}",controls:!0}},audio:{tagName:"audio",attributes:{part:"audio",src:"${state.src}",controls:!0}},embed:{tagName:"embed",attributes:{part:"embed",src:"${state.src}",type:"application/pdf",title:"${state.name}"}},font:{tagName:"div",attributes:{part:"specimen",style:"${state.specimenFamily}"},children:[{tagName:"style",textContent:"${state.fontFace}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"48"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"32"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"24"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"18"},textContent:"${state.specimen}"},{tagName:"p",attributes:{part:"specimen-line","data-size":"14"},textContent:"${state.specimen}"}]},unviewable:{tagName:"div",attributes:{part:"unviewable"},children:[{tagName:"p",children:[{tagName:"span",textContent:"Jx has no viewer for "},{tagName:"code",textContent:"${state.extLabel}"},{tagName:"span",textContent:"."}]},{tagName:"p",attributes:{part:"note"},textContent:"The file is in the project and builds normally."}]}}}]},{tagName:"div",attributes:{part:"details"},children:[{tagName:"h3",attributes:{part:"title"},textContent:"${state.name}"},{tagName:"p",attributes:{part:"facts"},textContent:"${state.facts}"},{tagName:"div",attributes:{part:"ref"},children:[{tagName:"code",attributes:{part:"ref-value"},textContent:"${state.ref}"},{tagName:"jx-action-button",$props:{size:"sm",quiet:!0,hint:"Copy the reference"},attributes:{part:"copy"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/copyRef"}}]},children:[{tagName:"span",textContent:"Copy"}]}]},{tagName:"div",attributes:{part:"usage-slot",role:"none"},$switch:{$ref:"#/state/usageState"},cases:{shown:{tagName:"div",attributes:{part:"usage"},children:[{tagName:"h4",attributes:{part:"group-title"},textContent:"Used by"},{tagName:"p",attributes:{part:"message"},textContent:"${state.usageHeadline}"},{tagName:"div",attributes:{part:"list-slot",role:"none"},$switch:{$ref:"#/state/hasUsageFiles"},cases:{true:{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/usageFiles"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"row","data-usage":"${$map.item.path}"},children:[{tagName:"button",attributes:{part:"file-path",type:"button"},textContent:"${$map.item.path}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openDocument"},value:[{$ref:"$map/item/path"}]}]}},{tagName:"span",attributes:{part:"count"},textContent:"${$map.item.count}"}]}}]}}}]}}}]}]};E("media-pane",S);function F(e,t){e.region=t.region,e.name=t.name,e.kind=t.kind,e.src=t.src,e.facts=t.facts,e.ref=t.ref,e.specimen=t.specimen,e.specimenFamily=t.specimenFamily,e.fontFace=t.fontFace,e.extLabel=t.extLabel,e.usageState=t.usageState,e.usageHeadline=t.usageHeadline,e.usageFiles=t.usageFiles,e.hasUsageFiles=t.usageFiles.length>0}function N(e,t,a){e.replaceChildren();let n=b({copyRef:a.copyRef,extLabel:"",facts:"",fontFace:"",hasUsageFiles:!1,imageLoaded:a.imageLoaded,kind:"unviewable",name:"",openDocument:a.openDocument,ref:"",region:"",specimen:"",specimenFamily:"",src:"",usageFiles:[],usageHeadline:"",usageState:"hidden"});F(n,t);let i=null,o=!1,u=I("media-pane",n,e).then((r)=>{if(o)r.dispose();else i=r;return r.root});return{attached:()=>{if(o)return!1;let r=i?.root;return r===void 0?!0:r instanceof HTMLElement&&e.contains(r)},dispose(){o=!0,i?.dispose(),i=null},ready:u,update:(r)=>F(n,r)}}var c="media",z="The quick brown fox jumps over the lazy dog",m=new Map;function x(e){return m.get(e)??null}function I$(e,t){let a=x(e);return a!==null&&a.tabId===t.id&&a.wrap.isConnected&&a.surface.attached()}function rx(e){let t=m.get(e);if(!t)return;t.scope.stop(),t.surface.dispose(),m.delete(e)}function N$(e){let t=Ot(e);if(rR.has(t))return"font";let a=Wd({name:e});if(a==="image"||a==="video"||a==="audio")return a;return t===".pdf"?"embed":"unviewable"}function D$(e,t){let a=[Wd({name:e})];if(t?.width!=null&&t.height!=null)a.push(`${t.width} × ${t.height}`);if(t?.bytes!=null)a.push(Km(t.bytes));if(t?.modified)a.push(`modified ${Ip(new Date(t.modified))}`);return a.join(" · ")}function C(e){return`jx-specimen-${e.replaceAll(/[^a-zA-Z0-9]/g,"-")}`}function O$(e){let t=C(e);return{fontFace:`@font-face { font-family: "${t}"; src: url("${no(e)}"); }`,specimen:z,specimenFamily:`--jx-specimen-family: "${t}"`}}function A$(e){let t=bO(e);if(t===null)return{usageFiles:[],usageHeadline:"",usageState:"hidden"};return{usageFiles:(e?.status==="ready"?e.result.files:[]).map((n)=>({count:String(n.count),path:n.path})),usageHeadline:t,usageState:"shown"}}async function A(e){let{openFileInTab:t}=await (ce("b2p9y0yz"),import("./files-b2p9y0yz.js"));await t(e)}function dO(e,t){let{paneId:a,wrap:n}=e;if(I$(a,t))return;rx(a);let i=t.documentPath??"",o=dy(i),u=Ot(i),r=N$(i),s=null,f=()=>{if(s!==null&&x(a)===s)y()},v=()=>{let d=Yc(i),l=ax(i);if(!zd(i))uh(i).then(f);if(l===null||l.status==="pending")Xu(i).then(f);let h=O$(i);return{extLabel:u||"this file",facts:D$(i,d),fontFace:r==="font"?h.fontFace:"",kind:r,name:i.split("/").pop()??"",ref:o,region:$n(a,"media"),specimen:h.specimen,specimenFamily:h.specimenFamily,src:no(i),...A$(l)}},y=()=>{s?.surface.update(v())},M=me(),j=N(n,v(),{copyRef:()=>{if("clipboard"in navigator)navigator.clipboard.writeText(o)},imageLoaded:(d,l)=>{if(gl(i,d,l))f()},openDocument:(d)=>{A(d)}});s={paneId:a,scope:M,surface:j,tabId:t.id,wrap:n},m.set(a,s),M.run(()=>{te(()=>{if(x(a)!==s)return;t.documentPath,yy.value,y()})})}var H={children:[],tagName:"div"};function Vb(e){return Vd(e)}function P$(e){if(Ot(e)===".svg")return[c,"source"];if(SM(e)&&ve()&&Q(p().readFileBytes))return[c,cs];return[c]}function Zu(e,t={}){let a=g.tabs.get(e);if(a)return Ft(e,{focus:t.focus!==!1}),a;let n=Si({capabilities:{modes:P$(e)},document:structuredClone(H),documentPath:e,id:e,sourceFormat:null,...t.paneId!==void 0&&{paneId:t.paneId},...t.preview===!0&&{preview:!0},...t.focus===!1&&{focus:!1}});return D(n,e),n}var k=new WeakMap;async function D(e,t){if(!e.capabilities.modes.includes(cs))return;let a;try{a=new Uint8Array(await p().readFileBytes(t))}catch{return}let n=k_(t,a),i=g.tabs.get(t);if(n===null||!i)return;if(k.set(le(i),n),i.capabilities.modes=i.capabilities.modes.filter((o)=>o!==cs),i.session.ui.canvasMode===cs)i.session.ui.canvasMode=c,w.warn(n,{key:`image.refused:${t}`,path:t,source:"Image"})}function oC(e){if(!P$(e).includes(cs))return!1;let t=g.tabs.get(e);return!t||t.capabilities.modes.includes(cs)&&!ia(t)}function sC(){return ve()&&Q(p().readFileBytes)}function aC(e,t){let a=g.tabs.get(e);if(!a||!ia(a))return!1;let n=e.split("/").pop()??e;return w.warn(`You have read access to this session, so ${n} cannot be ${t}.`,{key:`media.readOnly:${e}`,path:e,source:"Collaboration"}),!0}function lC(e,t={}){let a=e.split("/").pop()??e;if(!P$(e).includes(cs))return w.warn(`${a} cannot be edited here.`,{detail:"The Image editor writes PNG, JPEG and WebP, on a backend that can hand Studio a file's raw bytes.",key:`image.notEditable:${e}`,path:e,source:"Image"}),null;Zu(e,t);let n=g.tabs.get(e);if(ia(n))return w.warn(`You have read access to this session, so ${a} cannot be edited.`,{key:`image.readOnly:${e}`,path:e,source:"Collaboration"}),null;if(!n.capabilities.modes.includes(cs))return w.warn(k.get(le(n))??`${a} cannot be edited here.`,{key:`image.refused:${e}`,path:e,source:"Image"}),null;return n.session.ui.canvasMode=cs,n}
2
+ export{I$,rx,N$,D$,O$,A$,dO,Vb,P$,Zu,oC,sC,aC,lC};
3
3
 
4
- //# debugId=02FEB981535AE7BB64756E2164756E21
5
- //# sourceMappingURL=studio-jma2q8r9.js.map
4
+ //# debugId=763AE97B4B36A5DD64756E2164756E21
5
+ //# sourceMappingURL=studio-g65t6svn.js.map
@@ -1,7 +1,7 @@
1
- import{ln,bv,h}from"./studio-knsjyx7n.js";import{rt,Eo,Bp,xr}from"./studio-g9brbewz.js";import{u}from"./studio-pwctzka3.js";import{C}from"./studio-4f7thq0p.js";import{g}from"./studio-3qr08sxq.js";var Wb=["application","project","document","selection"],TA=["global","canvas","caret","grid","code","dock","palette"],LA=["File","Edit","Selection","Insert","View","Document","Project","Source Control","Publish","Assistant","Collaborate","Help"],v=["commandbar/primary","commandbar/overflow","statusbar/project","statusbar/document","statusbar/selection","context/element","context/file","context/layer","context/tab","context/pane","blockbar","blockbar/format","outline/row","settings/menu","palette","never"],P={"commandbar/primary":{admits:["application","document"],note:"document only for Save / Undo / Redo / Open in Browser, by frequency; ≤5 total"},"commandbar/overflow":{admits:["application","project","document"],note:"never selection — the Command Bar is not a selection surface"},"statusbar/project":{admits:["project"],note:"the status bar's left field"},"statusbar/document":{admits:["document"],note:"the status bar's centre field"},"statusbar/selection":{admits:["selection"],note:"the status bar's right field"},"context/element":{admits:["selection"],note:"the canvas element menu acts on a selection"},"context/file":{admits:["project"],note:"a file row addresses the project's file set"},"context/layer":{admits:["selection"],note:"an outline row IS a selection"},"context/tab":{admits:["document"],note:"a tab addresses one document"},"context/pane":{admits:["document"],note:"a pane hosts one document"},blockbar:{admits:["selection"],note:"the floating bar owns selection-scoped verbs"},"blockbar/format":{admits:["selection"],note:"the bar's inline-format cluster — a range inside the selection is still the selection"},"outline/row":{admits:["selection"],note:"row actions act on the row's node"},"settings/menu":{admits:["application","project"],note:"the rail foot's gear menu — the settings family. It is a MENU, not a pinned slot, so it "+"may host two levels for the reason commandbar/overflow does: a menu prints each row's own name, chord and gate, and draws a divider where the level changes. The rail's PINNED groups stay single-level, in PANEL_PLACEMENT_MATRIX"},palette:{admits:["application","project","document","selection"],note:"the level-agnostic surface; it groups rows by level"},never:{admits:["application","project","document","selection"],note:"keyboard- and API-only; no rendered surface to be misplaced in"}},b=["rail/project","rail/document","navigator","inspector","dock.bottom"],x={"rail/project":{admits:["project"],note:"the rail's upper group — Site, and Files with the developer panels on"},"rail/document":{admits:["document"],note:"the rail's lower group — Outline, Data, and Packages with the developer panels on"},navigator:{admits:["project","document"],note:"whichever level the hosted panel declares; the panel header prints it"},inspector:{admits:["document","selection"],note:"Page is the open document's tab, Element the selection's (§6)"},"dock.bottom":{admits:["project","document"],note:"the panel header states which"}};function y(e){return e==="bottom"?"dock.bottom":e}function w(e){let t=[y(e.dock)];if(e.rail!==!1)t.push(`rail/${e.level}`);return t}function E(e){return b.some((t)=>t===e)}function c(e){let t=[];if(!d(e.level))return t.push({panelId:e.id,placement:"—",level:String(e.level),message:`declares unknown level "${String(e.level)}" (expected one of: ${Wb.join(", ")})`}),t;for(let n of w(e)){if(!E(n)){t.push({panelId:e.id,placement:n,level:e.level,message:`is level "${e.level}" and would render in "${n}", which is not a panel `+"placement — the rail has a group for project and one for document, and nothing else"});continue}let o=x[n];if(!o.admits.includes(e.level))t.push({panelId:e.id,placement:n,level:e.level,message:`is level "${e.level}" but "${n}" admits only ${o.admits.join(", ")} — ${o.note}`})}return t}function S(e){return v.some((t)=>t===e)}function d(e){return Wb.some((t)=>t===e)}function $A(e){let t=[];if(!d(e.level))return t.push({commandId:e.id,placement:"—",level:String(e.level),message:`declares unknown level "${String(e.level)}" (expected one of: ${Wb.join(", ")})`}),t;for(let n of e.menus??[]){if(!S(n)){t.push({commandId:e.id,placement:String(n),level:e.level,message:`declares unknown placement "${String(n)}"`});continue}let o=P[n];if(!o.admits.includes(e.level))t.push({commandId:e.id,placement:n,level:e.level,message:`is level "${e.level}" but "${n}" admits only ${o.admits.join(", ")} — ${o.note}`})}return t}var l="true",i=g({on:Eo(rt.developerPanels)===l});Bp((e)=>{if(e.includes(rt.developerPanels.key))i.on=Eo(rt.developerPanels)===l});function dC(){return i.on}function IA(e){i.on=e,xr(rt.developerPanels,e?l:"")}function th(){let e=bv();return e.project.open=C!==null,e.project.isMultilingual=(ln(C?.projectConfig??{}).i18n?.locales.length??0)>1,e.git.dirtyCount=u.git.status?.files.length??0,e.workspace.id=u.workspace,e.document.open=h.value!==null,e}var L=/^[a-z][\w-]*$/,a=new Map;function ei(e){if(!L.test(e.id))throw Error(`Panel id "${e.id}" is malformed — expected /^[a-z][\\w-]*$/, because the id is also `+`the region "navigator/panel:${e.id}" and the value view.setActivity accepts.`);if(a.has(e.id))throw Error(`Panel "${e.id}" is already registered — a second definition site is the defect this `+"registry exists to prevent.");let t=c({id:e.id,level:e.level,dock:e.dock,rail:e.rail});if(t.length>0){let n=t.map((o)=>` ✗ ${e.id} ${o.message}`).join(`
1
+ import{ln,_y,h}from"./studio-s49y6m5b.js";import{ot,Er,Bp,_o}from"./studio-c72v1kwc.js";import{u}from"./studio-1d8m5s38.js";import{x}from"./studio-zn7ysyzb.js";import{b}from"./studio-9f5vcb4w.js";var qb=["application","project","document","selection"],jO=["global","canvas","caret","grid","code","dock","palette"],HO=["File","Edit","Selection","Insert","View","Document","Project","Source Control","Publish","Assistant","Collaborate","Help"],v=["commandbar/primary","commandbar/overflow","statusbar/project","statusbar/document","statusbar/selection","context/element","context/file","context/layer","context/tab","context/pane","blockbar","blockbar/format","outline/row","settings/menu","palette","never"],g={"commandbar/primary":{admits:["application","document"],note:"document only for Save / Undo / Redo / Open in Browser, by frequency; ≤5 total"},"commandbar/overflow":{admits:["application","project","document"],note:"never selection — the Command Bar is not a selection surface"},"statusbar/project":{admits:["project"],note:"the status bar's left field"},"statusbar/document":{admits:["document"],note:"the status bar's centre field"},"statusbar/selection":{admits:["selection"],note:"the status bar's right field"},"context/element":{admits:["selection"],note:"the canvas element menu acts on a selection"},"context/file":{admits:["project"],note:"a file row addresses the project's file set"},"context/layer":{admits:["selection"],note:"an outline row IS a selection"},"context/tab":{admits:["document"],note:"a tab addresses one document"},"context/pane":{admits:["document"],note:"a pane hosts one document"},blockbar:{admits:["selection"],note:"the floating bar owns selection-scoped verbs"},"blockbar/format":{admits:["selection"],note:"the bar's inline-format cluster — a range inside the selection is still the selection"},"outline/row":{admits:["selection"],note:"row actions act on the row's node"},"settings/menu":{admits:["application","project"],note:"the rail foot's gear menu — the settings family. It is a MENU, not a pinned slot, so it "+"may host two levels for the reason commandbar/overflow does: a menu prints each row's own name, chord and gate, and draws a divider where the level changes. The rail's PINNED groups stay single-level, in PANEL_PLACEMENT_MATRIX"},palette:{admits:["application","project","document","selection"],note:"the level-agnostic surface; it groups rows by level"},never:{admits:["application","project","document","selection"],note:"keyboard- and API-only; no rendered surface to be misplaced in"}},P=["rail/project","rail/document","navigator","inspector","dock.bottom"],y={"rail/project":{admits:["project"],note:"the rail's upper group — Site, and Files with the developer panels on"},"rail/document":{admits:["document"],note:"the rail's lower group — Outline, Data, and Packages with the developer panels on"},navigator:{admits:["project","document"],note:"whichever level the hosted panel declares; the panel header prints it"},inspector:{admits:["document","selection"],note:"Page is the open document's tab, Element the selection's (§6)"},"dock.bottom":{admits:["project","document"],note:"the panel header states which"}};function w(e){return e==="bottom"?"dock.bottom":e}function E(e){let t=[w(e.dock)];if(e.rail!==!1)t.push(`rail/${e.level}`);return t}function C(e){return P.some((t)=>t===e)}function c(e){let t=[];if(!d(e.level))return t.push({panelId:e.id,placement:"—",level:String(e.level),message:`declares unknown level "${String(e.level)}" (expected one of: ${qb.join(", ")})`}),t;for(let n of E(e)){if(!C(n)){t.push({panelId:e.id,placement:n,level:e.level,message:`is level "${e.level}" and would render in "${n}", which is not a panel `+"placement — the rail has a group for project and one for document, and nothing else"});continue}let o=y[n];if(!o.admits.includes(e.level))t.push({panelId:e.id,placement:n,level:e.level,message:`is level "${e.level}" but "${n}" admits only ${o.admits.join(", ")} — ${o.note}`})}return t}function S(e){return v.some((t)=>t===e)}function d(e){return qb.some((t)=>t===e)}function BO(e){let t=[];if(!d(e.level))return t.push({commandId:e.id,placement:"—",level:String(e.level),message:`declares unknown level "${String(e.level)}" (expected one of: ${qb.join(", ")})`}),t;for(let n of e.menus??[]){if(!S(n)){t.push({commandId:e.id,placement:String(n),level:e.level,message:`declares unknown placement "${String(n)}"`});continue}let o=g[n];if(!o.admits.includes(e.level))t.push({commandId:e.id,placement:n,level:e.level,message:`is level "${e.level}" but "${n}" admits only ${o.admits.join(", ")} — ${o.note}`})}return t}var l="true",i=b({on:Er(ot.developerPanels)===l});Bp((e)=>{if(e.includes(ot.developerPanels.key))i.on=Er(ot.developerPanels)===l});function bC(){return i.on}function VO(e){i.on=e,_o(ot.developerPanels,e?l:"")}function th(){let e=_y();return e.project.open=x!==null,e.project.isMultilingual=(ln(x?.projectConfig??{}).i18n?.locales.length??0)>1,e.git.dirtyCount=u.git.status?.files.length??0,e.workspace.id=u.workspace,e.document.open=h.value!==null,e}var L=/^[a-z][\w-]*$/,a=new Map;function ei(e){if(!L.test(e.id))throw Error(`Panel id "${e.id}" is malformed — expected /^[a-z][\\w-]*$/, because the id is also `+`the region "navigator/panel:${e.id}" and the value view.setActivity accepts.`);if(a.has(e.id))throw Error(`Panel "${e.id}" is already registered — a second definition site is the defect this `+"registry exists to prevent.");let t=c({id:e.id,level:e.level,dock:e.dock,rail:e.rail});if(t.length>0){let n=t.map((o)=>` ✗ ${e.id} ${o.message}`).join(`
2
2
  `);throw Error(`Panel "${e.id}" violates the level × placement matrix:
3
- ${n}`)}if(e.railLabel!==void 0&&(e.railLabel.trim()===""||!e.title.startsWith(e.railLabel)))throw Error(`Panel "${e.id}" declares railLabel "${e.railLabel}", which is not a leading part of its title "${e.title}": the rail button's accessible name is the title, and the words on screen must be inside it (WCAG 2.5.3, Label in Name).`);a.set(e.id,e)}function Np(e){return a.get(e)}function rx(e){let t=[...a.values()];return e?t.filter((n)=>n.dock===e):t}function sx(e,t){return e.when?e.when(t):!0}var m=[{level:"project",label:"Project"},{level:"document",label:"Document"}];function p(){return rx().filter((e)=>e.rail!==!1)}function VL(e){let t=dC(),n=p().filter((o)=>o.rail!=="developer"||t);return m.flatMap(({level:o,label:f})=>{let r=n.filter((s)=>s.level===o&&sx(s,e));return r.length>0?[{level:o,label:f,panels:r}]:[]})}function RA(){let e=p();return m.flatMap(({level:t})=>e.filter((n)=>n.level===t))}
4
- export{Wb,TA,LA,$A,dC,IA,th,ei,Np,rx,sx,VL,RA};
3
+ ${n}`)}if(e.railLabel!==void 0&&(e.railLabel.trim()===""||!e.title.startsWith(e.railLabel)))throw Error(`Panel "${e.id}" declares railLabel "${e.railLabel}", which is not a leading part of its title "${e.title}": the rail button's accessible name is the title, and the words on screen must be inside it (WCAG 2.5.3, Label in Name).`);a.set(e.id,e)}function Dp(e){return a.get(e)}function hx(e){let t=[...a.values()];return e?t.filter((n)=>n.dock===e):t}function px(e,t){return e.when?e.when(t):!0}var m=[{level:"project",label:"Project"},{level:"document",label:"Document"}];function p(){return hx().filter((e)=>e.rail!==!1)}function eL(e){let t=bC(),n=p().filter((o)=>o.rail!=="developer"||t);return m.flatMap(({level:o,label:f})=>{let r=n.filter((s)=>s.level===o&&px(s,e));return r.length>0?[{level:o,label:f,panels:r}]:[]})}function WO(){let e=p();return m.flatMap(({level:t})=>e.filter((n)=>n.level===t))}
4
+ export{qb,jO,HO,BO,bC,VO,th,ei,Dp,hx,px,eL,WO};
5
5
 
6
- //# debugId=3270154FC82E0DFB64756E2164756E21
7
- //# sourceMappingURL=studio-r6mx7vm5.js.map
6
+ //# debugId=250B486AF377A2DD64756E2164756E21
7
+ //# sourceMappingURL=studio-gw83z798.js.map