@jxsuite/studio 6.1.2 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/chunks/2020-5wtzce5g.js +4 -0
- package/dist/chunks/adapter-5tphg7xe.js +4 -0
- package/dist/chunks/add-new-flow-psym14sn.js +4 -0
- package/dist/chunks/cf-account-picker-haqazq5r.js +4 -0
- package/dist/chunks/cf-settings-h2wrh6hq.js +4 -0
- package/dist/chunks/{color-area-0fj8a4ga.js → color-area-6rbra5dy.js} +2 -2
- package/dist/chunks/{color-field-xch8kx2g.js → color-field-gy56c94g.js} +3 -3
- package/dist/chunks/color-m7r1vk54.js +4 -0
- package/dist/chunks/{color-slider-jxd8v350.js → color-slider-sqqdyf6c.js} +2 -2
- package/dist/chunks/{combobox-p0efwjke.js → combobox-72h32ejk.js} +3 -3
- package/dist/chunks/components-r22xca09.js +4 -0
- package/dist/chunks/content-source-mmppmcyg.js +4 -0
- package/dist/chunks/convert-to-repeater-he70fc2b.js +4 -0
- package/dist/chunks/editor-ccd9jwsa.js +4 -0
- package/dist/chunks/entry-commands-6qxz9e8p.js +4 -0
- package/dist/chunks/extension-sections-0egb88dm.js +4 -0
- package/dist/chunks/file-ops-qnab36ek.js +4 -0
- package/dist/chunks/files-rcn56qvm.js +4 -0
- package/dist/chunks/format-host-yxz0kjjs.js +4 -0
- package/dist/chunks/fs-events-d1qxq4z4.js +4 -0
- package/dist/chunks/grid-open-4z1g062t.js +4 -0
- package/dist/chunks/{grid-view-d2wq9ezg.js → grid-view-qg1b5eqx.js} +25 -25
- package/dist/chunks/{icons-pnfz478q.js → icons-63bjtbs7.js} +2 -2
- package/dist/chunks/{iframe-entry-jdcktez8.js → iframe-entry-2zggzajv.js} +4 -4
- package/dist/chunks/{iframe-entry-zap785cw.js → iframe-entry-76j8vwwx.js} +4 -4
- package/dist/chunks/iframe-entry-99nr5zfb.js +5 -0
- package/dist/chunks/{iframe-entry-x0ygf2yr.js → iframe-entry-pkgmcgp0.js} +4 -4
- package/dist/chunks/iframe-host-ssv7kyj0.js +4 -0
- package/dist/chunks/{index-zpjmzqfk.js → index-32eqzv1k.js} +3 -3
- package/dist/chunks/index-f0jn7nnp.js +4 -0
- package/dist/chunks/{javascript-m54mnwp6.js → javascript-pjp734q4.js} +3 -3
- package/dist/chunks/jsonMode-njkvsa02.js +13 -0
- package/dist/chunks/jx-validate-ttasrbh7.js +4 -0
- package/dist/chunks/layers-bgyr11tr.js +4 -0
- package/dist/chunks/layers-panel-7ez66zeq.js +4 -0
- package/dist/chunks/{listbox-e74qjyq6.js → listbox-c421cf8c.js} +2 -2
- package/dist/chunks/lit-html-v9gh687x.js +4 -0
- package/dist/chunks/media-library-sq468wts.js +4 -0
- package/dist/chunks/media-picker-shfe59pt.js +4 -0
- package/dist/chunks/{menu-n6yzswmy.js → menu-bdpzbfvs.js} +2 -2
- package/dist/chunks/{monaco-binding-7gx83x3r.js → monaco-binding-vq1hgnn0.js} +3 -3
- package/dist/chunks/monaco-buffer-3afgwvbp.js +4 -0
- package/dist/chunks/monaco-setup-xrd2cbkp.js +4 -0
- package/dist/chunks/notify-kzrjr3fv.js +4 -0
- package/dist/chunks/parse-v77xtwv7.js +4 -0
- package/dist/chunks/platform-7v4rtd7m.js +4 -0
- package/dist/chunks/popover-b89sfej7.js +4 -0
- package/dist/chunks/publish-panel-2z9gw8ee.js +4 -0
- package/dist/chunks/publish-quick-qx2455cj.js +4 -0
- package/dist/chunks/publish-workspace-wrc1dgwx.js +4 -0
- package/dist/chunks/quick-search-n0t0eqxb.js +4 -0
- package/dist/chunks/references-9547rg5s.js +4 -0
- package/dist/chunks/right-panel-wsgnr9pn.js +4 -0
- package/dist/chunks/source-control-kwktr9y6.js +4 -0
- package/dist/chunks/{split-n2gfpm5m.js → split-c9zfdgxf.js} +2 -2
- package/dist/chunks/studio-03ct6yfv.js +9 -0
- package/dist/chunks/studio-07rcfje3.js +5 -0
- package/dist/chunks/studio-3e54qh39.js +7 -0
- package/dist/chunks/studio-3exxhz5g.js +5 -0
- package/dist/chunks/studio-3q40e3rj.js +5 -0
- package/dist/chunks/studio-3qeh9t0h.js +6 -0
- package/dist/chunks/studio-3qqjeep5.js +6 -0
- package/dist/chunks/studio-43sd2mam.js +4 -0
- package/dist/chunks/studio-4hp8pkyt.js +5 -0
- package/dist/chunks/studio-58xg6j2q.js +9 -0
- package/dist/chunks/studio-5g0rprdt.js +7 -0
- package/dist/chunks/{studio-2j1cb95x.js → studio-6m380wp7.js} +4 -4
- package/dist/chunks/studio-80jyh1xh.js +4 -0
- package/dist/chunks/studio-83mk4bgg.js +9 -0
- package/dist/chunks/{studio-v0jzqdjm.js → studio-881z1xrx.js} +4 -4
- package/dist/chunks/studio-8m0y2qe7.js +5 -0
- package/dist/chunks/{studio-d81xfh1g.js → studio-8tr6cfrc.js} +4 -4
- package/dist/chunks/studio-8vcvfs7r.js +6 -0
- package/dist/chunks/studio-9tmebf0s.js +5 -0
- package/dist/chunks/studio-a2bvaptz.js +5 -0
- package/dist/chunks/studio-b7y5mr30.js +5 -0
- package/dist/chunks/studio-bavb31r0.js +5 -0
- package/dist/chunks/{studio-dgz8d0c1.js → studio-bbe4c90a.js} +4 -4
- package/dist/chunks/studio-c05wdnt3.js +5 -0
- package/dist/chunks/studio-ccv2svc6.js +5 -0
- package/dist/chunks/studio-d5grtb9e.js +16 -0
- package/dist/chunks/studio-df0baea9.js +5 -0
- package/dist/chunks/studio-dgk4dqtx.js +7 -0
- package/dist/chunks/studio-e1g64q43.js +5 -0
- package/dist/chunks/studio-ed1hp6zf.js +6 -0
- package/dist/chunks/studio-ed3xx40h.js +7 -0
- package/dist/chunks/studio-f14e1zdj.js +5 -0
- package/dist/chunks/studio-fbhxxc5f.js +5 -0
- package/dist/chunks/studio-fyh0jc96.js +5 -0
- package/dist/chunks/studio-gcxk20n7.js +5 -0
- package/dist/chunks/studio-jaaz8ce9.js +5 -0
- package/dist/chunks/{studio-90pq9km1.js → studio-jcnsdaep.js} +4 -4
- package/dist/chunks/studio-jsgf2q5k.js +7 -0
- package/dist/chunks/{studio-0q988f9w.js → studio-k3xxbagr.js} +3 -3
- package/dist/chunks/{studio-5ve6bbep.js → studio-k7evxqh4.js} +4 -4
- package/dist/chunks/studio-kt3pjkwd.js +5 -0
- package/dist/chunks/studio-m8g16bgz.js +5 -0
- package/dist/chunks/studio-mn0476ag.js +5 -0
- package/dist/chunks/studio-mx1smyq0.js +5 -0
- package/dist/chunks/studio-n0c5h6mf.js +5 -0
- package/dist/chunks/{studio-485046te.js → studio-nh6d342n.js} +7 -7
- package/dist/chunks/studio-nqxqf8p2.js +4 -0
- package/dist/chunks/studio-p4nrkvqr.js +5 -0
- package/dist/chunks/{studio-1fxkaaea.js → studio-pbxa5fpc.js} +4 -4
- package/dist/chunks/studio-pgmvdv7z.js +7 -0
- package/dist/chunks/studio-ph84avkf.js +5 -0
- package/dist/chunks/{studio-tq0rtfwj.js → studio-q0mvbaq6.js} +4 -4
- package/dist/chunks/studio-q0tccd43.js +5 -0
- package/dist/chunks/studio-q7rtx6zq.js +14 -0
- package/dist/chunks/{studio-a3g98wjr.js → studio-qgh13jtz.js} +4 -4
- package/dist/chunks/studio-qmn1xc24.js +5 -0
- package/dist/chunks/studio-qwdqwkj0.js +5 -0
- package/dist/chunks/studio-r5qy30vx.js +5 -0
- package/dist/chunks/studio-rj9eamf8.js +5 -0
- package/dist/chunks/studio-rptgsk96.js +5 -0
- package/dist/chunks/studio-rthyg42z.js +928 -0
- package/dist/chunks/studio-s19tp1xr.js +5 -0
- package/dist/chunks/studio-s32578pn.js +5 -0
- package/dist/chunks/studio-svb7yyve.js +5 -0
- package/dist/chunks/studio-syreb644.js +5 -0
- package/dist/chunks/studio-tf9jryb1.js +10 -0
- package/dist/chunks/studio-tfkznv39.js +5 -0
- package/dist/chunks/studio-tft6r105.js +5 -0
- package/dist/chunks/studio-txf2kysx.js +5 -0
- package/dist/chunks/studio-v8867ddv.js +12 -0
- package/dist/chunks/studio-vxq7fcvv.js +5 -0
- package/dist/chunks/studio-w4rz9hdk.js +5 -0
- package/dist/chunks/studio-wbcjbhy1.js +9 -0
- package/dist/chunks/studio-wc649wss.js +5 -0
- package/dist/chunks/studio-wys23mxz.js +5 -0
- package/dist/chunks/studio-x1x167jh.js +5 -0
- package/dist/chunks/studio-x9hsze61.js +5 -0
- package/dist/chunks/studio-y0n7yxea.js +9 -0
- package/dist/chunks/studio-y3ahhdpx.js +5 -0
- package/dist/chunks/studio-z97c48fk.js +5 -0
- package/dist/chunks/studio-zat62m0c.js +5 -0
- package/dist/chunks/studio-zcd2e7yz.js +5 -0
- package/dist/chunks/studio-zz9qe3rw.js +64 -0
- package/dist/chunks/toast-1gv0h53h.js +4 -0
- package/dist/chunks/{toast-host-ke5z4ng7.js → toast-host-1yg5ar8d.js} +3 -3
- package/dist/chunks/{tooltip-5v8ngwj2.js → tooltip-yypz28gq.js} +3 -3
- package/dist/chunks/{tree-mdq3v5cw.js → tree-9xa4hm7n.js} +2 -2
- package/dist/chunks/tsMode-epyfz1hv.js +14 -0
- package/dist/chunks/workspace-dz7nxfhv.js +4 -0
- package/dist/chunks/workspace-home-xsd7hkjw.js +4 -0
- package/dist/chunks/{ws-client-nze0k6mv.js → ws-client-bv552sfx.js} +3 -3
- package/dist/iframe-entry.js +20 -16
- package/dist/manifest.json +77 -63
- package/dist/studio.js +103 -104
- package/dist/workers/ts.worker.js +3 -3
- package/package.json +12 -11
- package/src/browse/component-examples.ts +272 -0
- package/src/browse/library-commands.ts +64 -104
- package/src/browse/library-layouts.ts +263 -49
- package/src/browse/library-model.ts +181 -133
- package/src/browse/library-pane.ts +738 -446
- package/src/browse/library-preview.ts +149 -19
- package/src/browse/library-source.ts +308 -41
- package/src/browse/preview-root.ts +78 -0
- package/src/browse/preview-style.ts +155 -0
- package/src/canvas/asset-refs.ts +16 -1
- package/src/canvas/canvas-live-render.ts +222 -30
- package/src/canvas/canvas-origin.ts +37 -12
- package/src/canvas/canvas-page-context.ts +112 -0
- package/src/canvas/canvas-render.ts +113 -107
- package/src/canvas/canvas-utils.ts +57 -12
- package/src/canvas/iframe-drop.ts +107 -0
- package/src/canvas/iframe-entry.ts +24 -12
- package/src/canvas/iframe-host.ts +134 -62
- package/src/canvas/iframe-keys.ts +11 -0
- package/src/canvas/iframe-patch.ts +8 -7
- package/src/canvas/iframe-protocol.ts +24 -5
- package/src/canvas/iframe-render.ts +48 -1
- package/src/canvas/iframe-subtree.ts +5 -2
- package/src/canvas/npm-modules.ts +22 -0
- package/src/canvas/preview-navigate.ts +16 -0
- package/src/canvas/repeater-sources.ts +200 -0
- package/src/canvas/stage-scrollbar.ts +5 -1
- package/src/canvas/surface-registry.ts +6 -0
- package/src/commands/app-commands.ts +16 -6
- package/src/commands/budget.ts +10 -8
- package/src/commands/context.ts +35 -10
- package/src/commands/defaults.ts +69 -45
- package/src/commands/keymap.ts +9 -0
- package/src/commands/levels.ts +11 -5
- package/src/commands/live-context.ts +2 -0
- package/src/commands/registry.ts +10 -1
- package/src/content/collection-match.ts +6 -5
- package/src/content/collection-pages.ts +412 -0
- package/src/content/content-collections.ts +270 -0
- package/src/content/entry-commands.ts +51 -60
- package/src/content/entry-editor.ts +111 -18
- package/src/content/entry-fields.ts +13 -1
- package/src/content/entry-inspector.ts +225 -0
- package/src/content/entry-model.ts +17 -3
- package/src/content/entry-open.ts +80 -0
- package/src/content/entry-summaries.ts +440 -0
- package/src/content/file-record-ids.ts +80 -0
- package/src/content/file-records.ts +125 -0
- package/src/content/page-summaries.ts +129 -0
- package/src/content/record-entry.ts +201 -0
- package/src/content/writing-banner.ts +177 -0
- package/src/create/add-new-commands.ts +185 -0
- package/src/create/add-new-flow.ts +1116 -0
- package/src/create/add-new.ts +1014 -0
- package/src/create/element-name.ts +121 -0
- package/src/editor/convert-to-component.ts +67 -43
- package/src/editor/file-drop-action.ts +9 -1
- package/src/editor/inline-edit-apply.ts +44 -0
- package/src/editor/inline-edit.ts +10 -0
- package/src/editor/insert-component.ts +91 -0
- package/src/editor/insert-zone-action.ts +13 -4
- package/src/editor/shortcuts.ts +44 -22
- package/src/editor/slash-menu.ts +51 -8
- package/src/files/components.ts +74 -10
- package/src/files/file-ops.ts +15 -5
- package/src/files/files.ts +164 -150
- package/src/files/fs-events.ts +18 -7
- package/src/files/media-meta.ts +95 -1
- package/src/files/media-types.ts +55 -0
- package/src/files/media-upload.ts +209 -52
- package/src/files/new-file-name.ts +156 -0
- package/src/files/serialize-document.ts +13 -3
- package/src/format/format-host.ts +15 -0
- package/src/github/github-auth.ts +2 -2
- package/src/github/github-publish.ts +4 -3
- package/src/grid/grid-controller.ts +5 -1
- package/src/grid/grid-open.ts +0 -27
- package/src/grid/grid-panel.ts +54 -2
- package/src/grid/grid-reveal.ts +34 -0
- package/src/grid/grid-source.ts +3 -25
- package/src/grid/grid-view.ts +31 -6
- package/src/grid/sources/content-source.ts +75 -7
- package/src/grid/tabulator-tables.d.ts +6 -0
- package/src/hosting/document.ts +2 -2
- package/src/i18n/i18n-commands.ts +2 -1
- package/src/media/media-commands.ts +181 -0
- package/src/media/media-library-model.ts +232 -0
- package/src/media/media-library.ts +1283 -0
- package/src/media/media-pane.ts +47 -19
- package/src/packages/pull-package-sync.ts +1 -1
- package/src/panels/activity-panel.ts +21 -5
- package/src/panels/ai-chat/chat-markdown.ts +8 -8
- package/src/panels/block-action-bar.ts +11 -11
- package/src/panels/canvas-dnd-bridge.ts +5 -2
- package/src/panels/chat-panel.ts +6 -6
- package/src/panels/collections-panel.ts +306 -0
- package/src/panels/component-preview.ts +35 -13
- package/src/panels/data-explorer.ts +1 -1
- package/src/panels/data-grid.ts +4 -0
- package/src/panels/dnd.ts +17 -30
- package/src/panels/elements-panel.ts +9 -2
- package/src/panels/empty-state.ts +2 -2
- package/src/panels/formula-workspace.ts +2 -3
- package/src/panels/frontmatter-fields.ts +9 -9
- package/src/panels/git-diff-open.ts +9 -5
- package/src/panels/head-panel.ts +369 -103
- package/src/panels/i18n-panel.ts +11 -10
- package/src/panels/imports-panel.ts +2 -0
- package/src/panels/jump-bar.ts +27 -2
- package/src/panels/layers-panel.ts +36 -30
- package/src/panels/left-panel.ts +22 -8
- package/src/panels/navigator-panels.ts +23 -11
- package/src/panels/pane-context.ts +111 -29
- package/src/panels/pane-grid.ts +6 -6
- package/src/panels/panel-registry.ts +14 -9
- package/src/panels/properties-panel.ts +7 -3
- package/src/panels/right-panel.ts +199 -43
- package/src/panels/seo-modal.ts +41 -108
- package/src/panels/settings-menu.ts +52 -50
- package/src/panels/settings-pane.ts +268 -162
- package/src/panels/signals-panel.ts +3 -4
- package/src/panels/site-model.ts +367 -0
- package/src/panels/site-panel.ts +638 -0
- package/src/panels/style-panel.ts +37 -3
- package/src/panels/stylebook-doc.ts +142 -10
- package/src/panels/stylebook-layers-panel.ts +39 -80
- package/src/panels/stylebook-panel.ts +47 -10
- package/src/panels/styles-panel.ts +327 -0
- package/src/panels/tab-strip.ts +109 -25
- package/src/platform.ts +1 -1
- package/src/platforms/cloud.ts +28 -1
- package/src/platforms/default-platform.ts +4 -4
- package/src/platforms/devserver.ts +51 -25
- package/src/publish/deploy-checklist.ts +12 -7
- package/src/publish/pages-service.ts +38 -14
- package/src/publish/publish-changes.ts +491 -0
- package/src/publish/publish-commands.ts +83 -18
- package/src/publish/publish-ids.ts +49 -0
- package/src/publish/publish-quick.ts +148 -0
- package/src/publish/publish-workspace.ts +926 -0
- package/src/publish/source-control.ts +907 -0
- package/src/services/automation.ts +16 -20
- package/src/services/cf-settings.ts +4 -4
- package/src/services/connection.ts +2 -2
- package/src/services/directory-picker.ts +2 -2
- package/src/services/references.ts +0 -0
- package/src/services/render-critic.ts +21 -2
- package/src/services/settings/definitions.ts +25 -14
- package/src/settings/contributed-section.ts +49 -10
- package/src/settings/css-vars-editor.ts +93 -27
- package/src/settings/developer-panels.ts +43 -0
- package/src/settings/extension-sections.ts +20 -2
- package/src/settings/general-settings.ts +91 -21
- package/src/settings/preferences-dialog.ts +8 -1
- package/src/settings/project-sections.ts +27 -10
- package/src/settings/schema-field-ui.ts +3 -1
- package/src/settings/section-registry.ts +116 -11
- package/src/settings/settings-dialog.ts +192 -0
- package/src/settings/settings-document.ts +182 -162
- package/src/shell.ts +467 -431
- package/src/site-context.ts +64 -10
- package/src/state.ts +28 -9
- package/src/studio.ts +194 -41
- package/src/style/project-styles.ts +34 -0
- package/src/style/stylebook-specimens.ts +89 -0
- package/src/style/stylebook-target.ts +26 -0
- package/src/style/tag-inheritance.ts +105 -0
- package/src/style/variables-focus.ts +61 -0
- package/src/style/variables-view.ts +235 -0
- package/src/surfaces/add-new.json +1482 -0
- package/src/surfaces/add-new.ts +325 -0
- package/src/surfaces/ai-chat.ts +2 -2
- package/src/surfaces/boot-failure.json +4 -3
- package/src/surfaces/bottom-dock.json +1 -1
- package/src/surfaces/canvas-stage.json +30 -19
- package/src/surfaces/canvas-stage.ts +5 -5
- package/src/surfaces/collections-panel.json +615 -0
- package/src/surfaces/collections-panel.ts +168 -0
- package/src/surfaces/commandbar.json +241 -96
- package/src/surfaces/commandbar.ts +134 -99
- package/src/surfaces/empty-state.json +1 -1
- package/src/surfaces/entry-editor.json +136 -0
- package/src/surfaces/entry-editor.ts +21 -0
- package/src/surfaces/entry-inspector.json +371 -0
- package/src/surfaces/entry-inspector.ts +143 -0
- package/src/surfaces/inspector-dock.json +162 -14
- package/src/surfaces/inspector-dock.ts +46 -19
- package/src/surfaces/library-pane.json +670 -437
- package/src/surfaces/library-pane.ts +94 -59
- package/src/surfaces/media-browser.json +62 -6
- package/src/surfaces/media-browser.ts +15 -1
- package/src/surfaces/media-field.json +1 -1
- package/src/surfaces/media-library.json +1586 -0
- package/src/surfaces/media-library.ts +282 -0
- package/src/surfaces/media-pick-dialog.json +71 -0
- package/src/surfaces/media-pick-dialog.ts +132 -0
- package/src/surfaces/menu.ts +18 -0
- package/src/surfaces/pane-context.json +144 -77
- package/src/surfaces/pane-context.ts +24 -0
- package/src/surfaces/panel-deploy-checklist.json +12 -6
- package/src/surfaces/panel-deploy-checklist.ts +3 -1
- package/src/surfaces/panel-page.json +72 -2
- package/src/surfaces/panel-page.ts +38 -7
- package/src/surfaces/panel-signals.json +1 -1
- package/src/surfaces/panel-signals.ts +5 -5
- package/src/surfaces/panel-stylebook-layers.json +71 -204
- package/src/surfaces/panel-stylebook-layers.ts +0 -21
- package/src/surfaces/preferences.json +120 -48
- package/src/surfaces/preferences.ts +8 -0
- package/src/surfaces/publish-quick.json +428 -0
- package/src/surfaces/publish-quick.ts +165 -0
- package/src/surfaces/publish-workspace.json +2892 -0
- package/src/surfaces/publish-workspace.ts +391 -0
- package/src/surfaces/rail.json +1 -159
- package/src/surfaces/rail.ts +18 -75
- package/src/surfaces/schema-form.json +10 -2
- package/src/surfaces/schema-form.ts +2 -0
- package/src/surfaces/seo.json +1 -1
- package/src/surfaces/settings-contributed.json +5 -5
- package/src/surfaces/settings-contributed.ts +18 -2
- package/src/surfaces/settings-css-vars.json +44 -36
- package/src/surfaces/settings-css-vars.ts +77 -4
- package/src/surfaces/settings-deploy.json +2 -15
- package/src/surfaces/settings-deploy.ts +1 -1
- package/src/surfaces/settings-dialog.json +51 -0
- package/src/surfaces/settings-dialog.ts +169 -0
- package/src/surfaces/settings-overview.json +3 -3
- package/src/surfaces/settings-overview.ts +9 -2
- package/src/surfaces/settings-pane.json +269 -46
- package/src/surfaces/settings-pane.ts +85 -24
- package/src/surfaces/shell.json +2 -1
- package/src/surfaces/site-panel.json +1029 -0
- package/src/surfaces/site-panel.ts +233 -0
- package/src/surfaces/slash-menu.json +63 -21
- package/src/surfaces/slash-menu.ts +23 -0
- package/src/surfaces/statusbar.ts +39 -15
- package/src/surfaces/styles-panel.json +735 -0
- package/src/surfaces/styles-panel.ts +195 -0
- package/src/surfaces/styles-variables.json +149 -0
- package/src/surfaces/styles-variables.ts +145 -0
- package/src/surfaces/tab-strip.json +4 -4
- package/src/surfaces/welcome.ts +1 -1
- package/src/surfaces/writing-banner.json +94 -0
- package/src/surfaces/writing-banner.ts +80 -0
- package/src/tabs/bare-repeaters.ts +101 -0
- package/src/tabs/tab.ts +47 -7
- package/src/types.ts +21 -26
- package/src/ui/form-controls.ts +47 -8
- package/src/ui/layers.ts +13 -0
- package/src/ui/media-picker.ts +284 -40
- package/src/ui/regions.ts +7 -6
- package/src/ui/schema-form.ts +259 -27
- package/src/ui/virtual-window.ts +26 -1
- package/src/utils/base64.ts +3 -3
- package/src/utils/edit-display.ts +322 -67
- package/src/utils/local-day.ts +18 -0
- package/src/workspace/pane-derive.ts +4 -4
- package/src/workspace/session.ts +28 -7
- package/src/workspace/tab-workspace.ts +137 -0
- package/src/workspace/workspace-back.ts +189 -0
- package/src/workspace/workspace-home.ts +133 -0
- package/src/workspace/workspace-ids.ts +129 -0
- package/src/workspace/workspace-switch.ts +372 -0
- package/src/workspace/workspace.ts +125 -11
- package/styles/shell-frame.css +30 -7
- package/styles/shell-frame.json +15 -3
- package/dist/chunks/2020-f2gkpy8d.js +0 -4
- package/dist/chunks/adapter-4912g339.js +0 -4
- package/dist/chunks/cf-account-picker-wccaenh6.js +0 -4
- package/dist/chunks/cf-settings-br6105tr.js +0 -4
- package/dist/chunks/color-28ksk2qm.js +0 -4
- package/dist/chunks/components-db68vsn7.js +0 -4
- package/dist/chunks/content-source-1449qesq.js +0 -4
- package/dist/chunks/convert-to-repeater-5h457egj.js +0 -4
- package/dist/chunks/editor-x9jn86a7.js +0 -4
- package/dist/chunks/entry-commands-may24cpt.js +0 -4
- package/dist/chunks/extension-sections-pvr14vxr.js +0 -4
- package/dist/chunks/file-ops-x9v54pcj.js +0 -4
- package/dist/chunks/files-j3knqf0s.js +0 -4
- package/dist/chunks/format-host-tyre2trb.js +0 -4
- package/dist/chunks/fs-events-64ma9htc.js +0 -4
- package/dist/chunks/git-panel-84ps5dex.js +0 -4
- package/dist/chunks/iframe-entry-fvbk89gm.js +0 -5
- package/dist/chunks/iframe-host-ck6vejt5.js +0 -4
- package/dist/chunks/index-b8xw3vy9.js +0 -4
- package/dist/chunks/jsonMode-w15cmrcm.js +0 -13
- package/dist/chunks/jx-validate-at3zn8wa.js +0 -4
- package/dist/chunks/layers-h4xp1pss.js +0 -4
- package/dist/chunks/layers-panel-m5hw1d7g.js +0 -4
- package/dist/chunks/lit-html-8t8t3dnr.js +0 -4
- package/dist/chunks/media-picker-2cweexc5.js +0 -4
- package/dist/chunks/menu-ynw13y0s.js +0 -4
- package/dist/chunks/monaco-buffer-qzxn567r.js +0 -4
- package/dist/chunks/monaco-setup-gxf6656g.js +0 -4
- package/dist/chunks/notify-cj5zbrs2.js +0 -4
- package/dist/chunks/parse-b7ddhr8m.js +0 -4
- package/dist/chunks/platform-3dfws9js.js +0 -4
- package/dist/chunks/popover-jt2gxmzs.js +0 -4
- package/dist/chunks/publish-panel-1gvxbj21.js +0 -4
- package/dist/chunks/quick-search-0dajrwqg.js +0 -4
- package/dist/chunks/references-49qgt404.js +0 -4
- package/dist/chunks/right-panel-jm1bwe53.js +0 -4
- package/dist/chunks/section-registry-6kwc4fky.js +0 -4
- package/dist/chunks/studio-0rt52vpq.js +0 -5
- package/dist/chunks/studio-18vgbhs5.js +0 -5
- package/dist/chunks/studio-24mccdrj.js +0 -5
- package/dist/chunks/studio-2eh507zk.js +0 -9
- package/dist/chunks/studio-2hcbccfv.js +0 -5
- package/dist/chunks/studio-2jbs3rxv.js +0 -5
- package/dist/chunks/studio-4h8k4dw9.js +0 -5
- package/dist/chunks/studio-5f6n18kx.js +0 -5
- package/dist/chunks/studio-5gthpky6.js +0 -5
- package/dist/chunks/studio-6ep3js6b.js +0 -9
- package/dist/chunks/studio-6wkmf3wz.js +0 -9
- package/dist/chunks/studio-841rf3cg.js +0 -5
- package/dist/chunks/studio-8gmwgheg.js +0 -5
- package/dist/chunks/studio-8qm0ep50.js +0 -5
- package/dist/chunks/studio-924p1tm1.js +0 -6
- package/dist/chunks/studio-a3shpz9y.js +0 -5
- package/dist/chunks/studio-amsbaaar.js +0 -6
- package/dist/chunks/studio-at5spjbc.js +0 -7
- package/dist/chunks/studio-b2xv945e.js +0 -5
- package/dist/chunks/studio-bn5nkafw.js +0 -5
- package/dist/chunks/studio-bw6q5xjf.js +0 -9
- package/dist/chunks/studio-c7q0t9x1.js +0 -5
- package/dist/chunks/studio-camnhc96.js +0 -6
- package/dist/chunks/studio-cffqvnzd.js +0 -5
- package/dist/chunks/studio-efvfrsf8.js +0 -5
- package/dist/chunks/studio-er30bpcx.js +0 -5
- package/dist/chunks/studio-ezscgr64.js +0 -5
- package/dist/chunks/studio-ffrrncvz.js +0 -5
- package/dist/chunks/studio-fpphgn8y.js +0 -10
- package/dist/chunks/studio-j1kvhdjk.js +0 -4
- package/dist/chunks/studio-j430n16g.js +0 -7
- package/dist/chunks/studio-jjkg84nj.js +0 -5
- package/dist/chunks/studio-m0q32ars.js +0 -4
- package/dist/chunks/studio-m6bdst11.js +0 -5
- package/dist/chunks/studio-nv2cptd4.js +0 -64
- package/dist/chunks/studio-nwfrc98n.js +0 -5
- package/dist/chunks/studio-p1wgvp7r.js +0 -5
- package/dist/chunks/studio-pag2wncm.js +0 -5
- package/dist/chunks/studio-qvanvzfd.js +0 -5
- package/dist/chunks/studio-qwa64kt7.js +0 -5
- package/dist/chunks/studio-rk1zc4x3.js +0 -928
- package/dist/chunks/studio-se2r3ptc.js +0 -5
- package/dist/chunks/studio-sg2a0dh0.js +0 -5
- package/dist/chunks/studio-tjzjhe68.js +0 -5
- package/dist/chunks/studio-v2w7q8r1.js +0 -7
- package/dist/chunks/studio-v5vjq1h0.js +0 -4
- package/dist/chunks/studio-v8aga3vp.js +0 -14
- package/dist/chunks/studio-vfcdrfmv.js +0 -5
- package/dist/chunks/studio-vmfkgdjf.js +0 -5
- package/dist/chunks/studio-wt1816jj.js +0 -5
- package/dist/chunks/studio-wz73q5kq.js +0 -4
- package/dist/chunks/studio-y04qtxvp.js +0 -7
- package/dist/chunks/studio-y21g8zzg.js +0 -5
- package/dist/chunks/studio-y64hrt8p.js +0 -12
- package/dist/chunks/studio-ynn90f58.js +0 -16
- package/dist/chunks/studio-yxz682sx.js +0 -5
- package/dist/chunks/studio-zp7snvkq.js +0 -5
- package/dist/chunks/studio-zq4z6tm6.js +0 -5
- package/dist/chunks/toast-c9fn075p.js +0 -4
- package/dist/chunks/tsMode-sf49ee9x.js +0 -14
- package/dist/chunks/workspace-jtfahpee.js +0 -4
- package/src/panels/frontmatter-panel.ts +0 -711
- package/src/panels/git-panel.ts +0 -1108
- package/src/surfaces/doc-header.json +0 -776
- package/src/surfaces/doc-header.ts +0 -222
- package/src/surfaces/git-panel.json +0 -1880
- package/src/surfaces/git-panel.ts +0 -264
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{f,Qe}from"./studio-ffrrncvz.js";import{E}from"./studio-wz73q5kq.js";function k(e){return e.trim().replace(/\/+$/,"")}function a(e){return e.trim()}var Tt={aiBaseUrl:{default:"",key:"jx.ai.baseUrl",normalize:k,scope:"user"},aiOpenAiKey:{default:"",key:"jx.ai.openaiKey",normalize:a,scope:"user",secret:!0},aiModel:{default:"gpt-4o",key:"jx.ai.model",normalize:a,scope:"user"},keybindings:{default:"",key:"jx.keybindings",normalize:(e)=>e.trim()==="{}"?"":e.trim(),scope:"user"},theme:{default:"",key:"jx-studio-theme",normalize:a,scope:"user"},showIgnoredFiles:{default:"",key:"jx.files.showIgnored",normalize:a,scope:"user"},cfAccountId:{default:"",key:"jx.cf.accountId",normalize:a,scope:"user"},cfToken:{default:"",key:"jx.cf.token",normalize:a,scope:"user",secret:!0}},p=Object.values(Tt),l=p.filter((e)=>e.scope==="user"),P=l.map((e)=>e.key);function h(e){let t=e.schedule??queueMicrotask,n=null,i=Promise.resolve(),r=Promise.resolve();function s(){let o=n;if(n=null,!o)return i;return i=i.then(()=>e.send(o)).catch((u)=>{e.onError?.(u,o)}),i}return{enqueue(o){if(n){Object.assign(n,o);return}n={...o},r=new Promise((u)=>{t(()=>{s().then(u)})})},settled(){return r}}}var c=new Map;function m(){return typeof localStorage>"u"?void 0:localStorage}function v(e,t){try{if(t===null)m()?.removeItem(e);else m()?.setItem(e,t)}catch{}}try{for(let e of p){let t=m()?.getItem(e.key);if(t!==null&&t!==void 0)c.set(e.key,t)}}catch{}function zo(e){return c.get(e.key)??""}function UL(e){return(c.get(e.key)??"")!==""}var y=new Set;function Oy(e){return y.add(e),()=>{y.delete(e)}}function g(e){for(let t of y)t(e)}var d=h({onError(e){E("error","Your settings could not be saved.",{detail:e instanceof Error?e.message:String(e),key:"settings-write",source:"Settings"})},async send(e){if(!Qe())return;let t=f();if(!t.patchSettings)return;let n={},i=[];for(let[r,s]of Object.entries(e))if(s)n[r]=s;else i.push(r);await t.patchSettings({remove:i,set:n})}});function qL(){return d.settled()}function S(e){let t=[];for(let[n,i]of Object.entries(e)){if((c.get(n)??null)===i)continue;if(i===null)c.delete(n);else c.set(n,i);v(n,i),t.push(n)}return t}function Ay(e,t){return e.normalize?e.normalize(t):t}function as(e,t){let n=Ay(e,t),i=S({[e.key]:n});if(i.length>0)d.enqueue({[e.key]:n}),g(i)}function KL(e){let t={};for(let[i,r]of e)t[i.key]=Ay(i,r);let n=S(t);if(n.length>0)d.enqueue(t),g(n)}function ah(e){let t={};for(let i of e)t[i.key]=null;let n=S(t);if(n.length>0)d.enqueue(t),g(n)}async function GL(){if(!Qe())return;let e=f();if(!e.getSettings)return;let t;try{t=await e.getSettings()}catch{return}let n={},i=!1;for(let s of l){let o=t[s.key];if(o)n[s.key]=o;else if(c.get(s.key))i=!0}let r=S(n);if(r.length>0)g(r);if(i){let s={};for(let o of l){let u=c.get(o.key);if(u&&!t[o.key])s[o.key]=u}d.enqueue(s)}}function x(e){let t={};for(let i of l)t[i.key]=e[i.key]??null;let n=S(t);if(n.length>0)g(n)}function JL(){if(!Qe())return;f().subscribeSettings?.(x)}
|
|
2
|
-
export{Tt,zo,UL,Oy,qL,Ay,as,KL,ah,GL,JL};
|
|
3
|
-
|
|
4
|
-
//# debugId=AB7C36986080AD7E64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-vfcdrfmv.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{he,E}from"./studio-wz73q5kq.js";import{te,T}from"./studio-cffqvnzd.js";var tt={functionEditor:null,blockActionBarEl:null,selDragCleanup:null,dndCleanups:[],elementsCollapsed:new Set,elementsFilter:"",_currentDropTargetRow:null,layerDragSourceHeight:0,_completionRegistered:!1,_layersCollapsed:null};var m=0;function M$(){return m+=1,m}var l=new Map;function or(e){let r=l.get(e);if(!r)r=v(e),l.set(e,r);return r}function v(e){return{centerObserver:null,monacoDiffEditor:null,monacoEditor:null,needsCenter:!0,panX:0,panY:0,panels:[],paneId:e,panzoomWrap:null,stage:null,prevCanvasMode:null,prevStylebookCustomizedOnly:null,prevStylebookFilter:null,renderGeneration:0,sourceCollabCleanup:null,stageScrollbar:null,wrap:null}}function Xd(e){return e.wrap}function gh(){return[...l.values()]}function rc(e){if(!e)return null;for(let r of l.values())if(Xd(r)?.contains(e))return r;return null}function g(e){for(let r of e.panels)r.renderScope?.stop(),r.renderScope=null;e.panels.length=0,e.prevCanvasMode=null}function F$(e,r){let t=or(e);return t.wrap=r,g(t),t}function j$(e){if(l.get(e))H1(e);let t=v(e);return l.set(e,t),t}var S=null;function H$(e){S=e}function H1(e){let r=l.get(e);if(!r)return;S?.(r),g(r),w(e)}function w(e){l.delete(e)}var bh="commit";function b(e){return T(e)&&te(e.then)}function ng(e){let r=new Map,t=new Map,o=new Map,a=!1,u=!1,c=!1;function f(n,i){if(!b(i))return i;let s=i.finally(()=>{if(o.get(n)===s)o.delete(n)});return o.set(n,s),s}let d={arm(n,i,s){clearTimeout(r.get(n)),t.set(n,s),r.set(n,setTimeout(()=>{r.delete(n),t.delete(n),f(n,s())},i))},cancel(){for(let n of r.values())clearTimeout(n);r.clear(),t.clear()},flush(n){let i=t.get(n);if(!i)return o.get(n);return clearTimeout(r.get(n)),r.delete(n),t.delete(n),f(n,i())},ahead:()=>a,markAhead(){a=!0},typed:()=>u,markTyped(){a=!0,u=!0},markSettled(){a=!1,u=!1},shared:()=>c,markShared(){c=!0}};return e._writes=d,d}var y={logic:{holds:"The handler you were typing",reached:"written into",source:"Logic"},source:{holds:"The source you were typing",reached:"parsed into",source:"Editor"}};function p(e,r,t){if(e._writes?.typed()!==!0)return!0;let a=e._editingTab??null,u=a?.documentPath??"Untitled",{holds:c,reached:f,source:d}=y[r],n=t?{detail:h(t.error)}:{};if(n.key=`buffer-discarded:${r}:${a?.id??"none"}`,n.source=d,a?.documentPath)n.path=a.documentPath;return E.warn(`${c} was discarded — it was never ${f} "${u}".`,n),!1}function h(e){return e instanceof Error?e.stack??e.message:String(e)}function ig(e,r){let t=e?._writes;if(!e||!t)return!0;let o;try{o=t.flush(bh)}catch(a){return t.cancel(),p(e,r,{error:a})}if(t.cancel(),b(o))return o.then(()=>p(e,r,null),(a)=>p(e,r,{error:a})),!0;return p(e,r,null)}function B1(e){e?._writes?.cancel()}function qc(e){return Boolean(e?.getModel())}function yh(e,r){if(!qc(e)||e.hasTextFocus()||e._writes?.ahead()||e._writes?.shared())return!0;return r!==void 0&&e.getValue()!==r}function C(e){let r=he(e);return[...gh().map((o)=>o.monacoEditor),tt.functionEditor].filter((o)=>o!=null&&o._editingTab!=null&&he(o._editingTab)===r&&qc(o))}async function Qd(e){for(let r of C(e)){if(!qc(r))continue;try{await r._writes?.flush(bh)}catch(t){let o={detail:h(t),key:`buffer-commit:${e.id}`,source:"Editor"};if(e.documentPath)o.path=e.documentPath;E.error(`Could not save the editor's contents into "${e.documentPath??"Untitled"}".`,o)}}}function tf(e){return C(e).some((r)=>r._writes?.typed()===!0)}
|
|
2
|
-
export{tt,M$,or,Xd,gh,rc,F$,j$,H$,H1,bh,ng,ig,B1,qc,yh,Qd,tf};
|
|
3
|
-
|
|
4
|
-
//# debugId=28C71816BB71AA7364756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-vmfkgdjf.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{re}from"./studio-j1kvhdjk.js";import{f}from"./studio-ffrrncvz.js";import{v,E}from"./studio-wz73q5kq.js";import{Dd,Ju}from"./studio-zq4z6tm6.js";import{sr,I,A}from"./studio-2jbs3rxv.js";import{Ld}from"./studio-5gthpky6.js";import{uT}from"./studio-fpphgn8y.js";import{py}from"./studio-se2r3ptc.js";import{Vd}from"./studio-ynn90f58.js";import{O}from"./studio-c7q0t9x1.js";import{i,te,T,w}from"./studio-cffqvnzd.js";var k={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsContributed",$description:'The generic settings section behind `$studio.settings` (specs/extensions.md §9.1), as a Jx document over the kit. One document serves both layouts an extension may declare: "form" is a single schema form over the whole section value, "map" is master-detail — the entry keys on the left, the selected entry\'s form on the right. The adapter (`surfaces/settings-contributed.ts`) hands in the title, the layout, the entry rows already marked as selected, and whatever the reader is part-way through typing; `settings/contributed-section.ts` decides what an entry may be named, what reaches `project.json`, and what the validator said about it. The schema form itself is an ISLAND: this document renders `form-host` and nothing inside it, because a form built from a JSON Schema is `ui/schema-form.ts`\'s surface rather than this one\'s — the section places the element that surface hands back. The actions row is the second island: `panels/data-grid.ts` contributes it, and that one is still lit over Spectrum.',tagName:"section",attributes:{part:"contributed"},style:{$description:"What `.settings-section-title`, `.settings-two-col`, `.settings-list-panel`, `.settings-editor-panel`, `.settings-editor-header`, `.settings-empty-state` and `.settings-inline-form` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. This section was the LAST emitter of every one of them except `.settings-empty-state`, which `panels/settings-pane.ts` still writes when a project closes with the editor open — so those rules are dead in the stylesheet from here, and a central sweep removes them rather than this change, which owns no stylesheet. Two values could not come across. `.settings-editor-header h3` read `var(--spectrum-font-size-100, 14px)`, and a document is mounted in the pane rather than inside `<sp-theme>`, so it would have taken its hard-coded fallback every time; the entry name is a kit textfield now and carries the kit's own type ramp. And `.entry-name-input`, `.settings-form-panel`, `.settings-section` and `.contributed-section` had no rule anywhere at all — they were four entries on `check-styles.ts`'s orphan ledger, which is the ledger's point.",display:"block",'& [part="title"]':{margin:"0 0 16px",fontSize:"16px",fontWeight:"600",color:"var(--fg)"},'& [part="actions"]':{$description:"The host-contributed actions row — Test Connection, Push Schema, Open Data Grid on the data sections. `.data-section-actions` never had a rule anywhere, so the row was whatever the buttons stacked up to; it is a row with a gap under it now.",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"8px",marginBottom:"12px"},'& [part="columns"]':{$description:"The 1px gap over the border colour is the divider between the two columns: two panels on `--bg-panel` with `--border` showing through the gap, so nothing draws a rule of its own.",display:"flex",height:"100%",gap:"1px",background:"var(--border)"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"4px",padding:"12px",width:"200px",minWidth:"200px",background:"var(--bg-panel)",overflowY:"auto"},'& [part="entry"], & [part="new-open"]':{width:"100%"},'& [part="entry"] > [part="control"], & [part="new-open"] > [part="control"]':{$description:"`.settings-list-panel sp-action-button` said `width: 100%; justify-content: flex-start`, and both halves belong to the button the row is made of rather than to the row: a kit action button centres its glyph and its label, which reads as a list of centred names.",width:"100%",justifyContent:"flex-start"},'& [part="new-form"]':{display:"flex",alignItems:"center",gap:"6px"},'& [part="new-field"]':{flex:"1",minWidth:"0"},'& [part="empty"]':{flex:"1",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-panel)",color:"var(--fg-dim)",fontSize:"13px"},'& [part="editor"]':{$description:"`min-width: 0` is the one line `.settings-editor-panel` did not have and needed: a flex child's floor is its content, and the schema form inside this one is a whole form rather than the short cards Data Shapes puts here — so a long pointer or a wide row pushed the column past the right edge of the pane instead of scrolling inside it.",flex:"1",padding:"16px",background:"var(--bg-panel)",overflowY:"auto",minWidth:"0"},'& [part="editor-header"]':{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px"},'& [part="entry-name"]':{flex:"1",minWidth:"0",maxWidth:"220px"}},children:[{tagName:"h3",attributes:{part:"title"},textContent:"${state.title}"},{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/actionsState"},cases:{slot:{$description:"An island: the host renders its own actions into this node and the document renders nothing inside it.",tagName:"div",attributes:{part:"actions"}}}},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/layout"},cases:{form:{$description:"An island: `ui/schema-form.ts` draws the whole section value into this node.",tagName:"div",attributes:{part:"form-host"}},map:{tagName:"div",attributes:{part:"columns"},children:[{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/entries"},key:{$ref:"$map/item/key"},map:{tagName:"jx-action-button",attributes:{part:"entry","data-entry":"${$map.item.key}","data-jx-region":"${$map.item.region}"},$props:{label:"${$map.item.key}",selected:{$ref:"$map/item/selected"},quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/select"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.key}"}]}},{tagName:"div",attributes:{part:"new-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/newState"},cases:{closed:{tagName:"jx-action-button",attributes:{part:"new-open"},$props:{label:"New Entry",icon:"plus",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNew"},value:[]}]},children:[{tagName:"span",textContent:"New Entry"}]},open:{tagName:"div",attributes:{part:"new-form"},children:[{tagName:"jx-textfield",attributes:{part:"new-field"},$props:{label:"New entry name",placeholder:"entry-name",size:"sm",value:{$ref:"#/state/newName"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editNew"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/createNew"},value:[]}],Escape:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/cancelNew"},value:[]}]}}]}},{tagName:"jx-button",attributes:{part:"new-create"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/createNew"},value:[]}]},children:[{tagName:"span",textContent:"Create"}]}]}}}]},{tagName:"div",attributes:{part:"editor-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/editorState"},cases:{empty:{tagName:"div",attributes:{part:"empty"},textContent:"Select or create an entry"},editing:{tagName:"div",attributes:{part:"editor","data-jx-region":"${state.editorRegion}"},children:[{tagName:"div",attributes:{part:"editor-header"},children:[{tagName:"jx-textfield",attributes:{part:"entry-name"},$props:{label:"Entry name",size:"sm",value:{$ref:"#/state/entryName"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/renameEntry"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{operator:"call",target:{$ref:"#/state/renameEntry"},value:[{$ref:"event#/target/value"}]}],Escape:[{operator:"call",target:{$ref:"#/state/cancelRename"},value:[{$ref:"event#/target/value"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"delete-entry"},$props:{label:"Delete entry",hint:"Delete entry",icon:"trash",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[]}]}}]},{$description:"An island: `ui/schema-form.ts` draws the selected entry into this node.",tagName:"div",attributes:{part:"form-host"}}]}}}]}}}]};I("settings-contributed",k);function W(){return{actionsState:"none",editorRegion:"",editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:""}}function K(e){let s=i(e)?void 0:e.attributes?.part;return i(s)?s:""}function H(e,s,a){e.textContent="";let n=v({...W(),...s}),t=null,o=!1,c=A("settings-contributed",n,e,{onNodeCreated:(r,l,u)=>{if(!(r instanceof HTMLElement))return;let d=K(u);if(d==="form-host")a.formSlot(r);else if(d==="actions")a.actionsSlot(r)}}).then((r)=>{let l=r.root;if(o)return r.dispose(),l;return t=r,l});return{attached:()=>{if(o)return!1;let r=t?.root;return r===void 0?!0:r instanceof HTMLElement&&e.contains(r)},dispose(){o=!0,t?.dispose(),t=null},host:e,ready:c,update(r){n.actionsState=r.actionsState,n.editorRegion=r.editorRegion,n.editorState=r.editorState,n.entries=r.entries,n.entryName=r.entryName,n.layout=r.layout,n.newName=r.newName,n.newState=r.newState,n.title=r.title}}}var g=new Map,S=new Set,x=new Map;function cT(e,s){let a=O?.projectConfig?.[e],n=w(a)?a:{};if(!Object.hasOwn(n,s))return Object.keys(n);return g.set(e,s),null}var C=new Map;function q(e,s){let a={},n=[];for(let t of s){let o=t.indexOf(": "),c=o===-1?"":t.slice(0,o),r=o===-1?t:t.slice(o+2);if(c===e){n.push(r);continue}if(!c.startsWith(`${e}/`))continue;let[l]=c.slice(e.length+1).split("/");if(l&&a[l]===void 0)a[l]=r}return{fields:a,section:n}}async function N(e,s){let a=O?.projectConfig;if(!a)return;if(!(await Vd()).ok)return;let t=[];try{t=await Ld(a)}catch(o){E.warn(`Could not validate project.json — ${re(o)}`,{key:"settings:validator",path:"project.json",source:"Settings",tier:"problem"});return}C.set(e,q(e,t).fields),s()}function M(e,s){for(let[a,n]of Object.entries(s))if(n===void 0)delete e[a];else e[a]=n}function J(e){return e.toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z0-9-]/g,"")}function B(e,s){if(!e)return{};let a=(t)=>{let o={};for(let[c,r]of Object.entries(t))o[c]=n(r);return o},n=(t)=>{if(i(t))return t.replaceAll("${key}",s);if(Array.isArray(t))return t.map((o)=>n(o));if(w(t))return a(t);return t};return a(e)}function R(e,s,a=null){let n=f(),t={fieldKeyPrefix:`$settings.${e}`,resolvePointer:(o,c)=>{let r={projectConfig:O?.projectConfig??{}};if(w(c))r.scope=c;if(s.formats!==void 0)r.formats=s.formats;return Ju(o,r)}};if(te(n.setSecrets))t.commitSecret=async(o,c)=>{let r=uT(e,a,o);return await n.setSecrets({set:{[r]:c}}),r};return t}function h(e){let s=O?.projectConfig;if(!s)return null;let a=s[e];if(w(a))return a;let n={};return s[e]=n,n}var L=new WeakMap;function m(e){ZS(e.container,e.contribution,e.opts)}function V(e,s){e.echo=s,m(e)}function Y(e){let{container:s,contribution:a,opts:n}=e,t=a.key,o=a.title??t,c=n.actions?"slot":"none",r=py(s),l=sr(r,"editor");if((a.settings.layout??"form")!=="map")return{actionsState:c,editorRegion:l,editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:o};let u=h(t)??{},d=g.get(t)??null,y=d===null?void 0:u[d],b=d!==null&&T(y);return{actionsState:c,editorRegion:l,editorState:b?"editing":"empty",entries:Object.keys(u).map((p)=>({key:p,region:sr(r,`entry:${p}`),selected:p===d})),entryName:e.echo??(b?d:""),layout:"map",newName:x.get(t)??"",newState:S.has(t)?"open":"closed",title:o}}function F(e){let s=e.formHost;if(!s)return;let{contribution:a,opts:n}=e,t=a.key,o=a.settings.entry?.ui,c=()=>m(e),r=(p)=>{if(p.parentNode!==s)s.replaceChildren(p)};if((a.settings.layout??"form")!=="map"){let p=`/${t}`;r(Dd(`section:${t}`,a.entrySchema,h(t)??{},{context:R(t,n,null),errors:C.get(p)??{},onChange:(z)=>{let j=h(t);if(!j)return;M(j,z),c(),N(p,c)},rerender:c,...o!==void 0&&{ui:o}}));return}let l=h(t)??{},u=g.get(t)??null,d=u===null?void 0:l[u];if(u===null||!T(d)){s.replaceChildren();return}let y=d,b=`/${t}/${u}`;r(Dd(`section:${t}:${u}`,a.entrySchema,y,{context:R(t,n,u),errors:C.get(b)??{},onChange:(p)=>{M(y,p),c(),N(b,c)},rerender:c,...o!==void 0&&{ui:o}}))}function D(e){let s=e.actionsHost,{actions:a}=e.opts;if(!s)return;if(!a){s.replaceChildren();return}let n=e.contribution.key,t=(e.contribution.settings.layout??"form")==="map"?g.get(n)??null:null;a(s,{rerender:()=>m(e),sectionKey:n,selected:t})}function G(e){let s=(t)=>{e.echo=null,m(e),N(t,()=>m(e))},a=()=>{e.echo=null,m(e)},n=()=>e.contribution.key;return{cancelNew(){S.delete(n()),x.delete(n()),m(e)},cancelRename(t){V(e,t),a()},createNew(){let t=n(),o=J(x.get(t)??""),c=h(t);if(!o||!c||c[o])return;c[o]=B(e.contribution.settings.entry?.newEntry,o),g.set(t,o),S.delete(t),x.delete(t),s(`/${t}`)},editNew(t){x.set(n(),t),m(e)},openNew(){S.add(n()),m(e)},removeEntry(){let t=n(),o=g.get(t)??null,c=h(t);if(!o||!c?.[o])return;delete c[o],g.set(t,null),s(`/${t}`)},renameEntry(t){V(e,t);let o=n(),c=g.get(o)??null,r=h(o),l=J(t.trim());if(!c||!r||!l||l===c||r[l]){a();return}let u={};for(let[d,y]of Object.entries(r))u[d===c?l:d]=y,delete r[d];Object.assign(r,u),g.set(o,l),s(`/${o}`)},select(t){g.set(n(),t),e.echo=null,m(e)}}}function ZS(e,s,a={}){let n=L.get(e);if(n)n.contribution=s,n.opts=a;let t=n?.handle??null;if(!n||!t?.attached()){t?.dispose();let o={actionsHost:null,container:e,contribution:s,echo:null,formHost:null,handle:null,opts:a};L.set(e,o),t=H(e,G(o),{actionsSlot:(c)=>{o.actionsHost=c,D(o)},formSlot:(c)=>{o.formHost=c,F(o)}}),o.handle=t,n=o}t.update(Y(n)),D(n),F(n)}
|
|
2
|
-
export{cT,ZS};
|
|
3
|
-
|
|
4
|
-
//# debugId=423A1D874112B59A64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-wt1816jj.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ee}from"./studio-cffqvnzd.js";function q(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var F=Object.assign;var Ke=Object.prototype.hasOwnProperty,j=(e,t)=>Ke.call(e,t),O=Array.isArray,C=(e)=>ge(e)==="[object Map]";var de=(e)=>typeof e==="function",ze=(e)=>typeof e==="string",R=(e)=>typeof e==="symbol",D=(e)=>e!==null&&typeof e==="object";var We=Object.prototype.toString,ge=(e)=>We.call(e),me=(e)=>ge(e).slice(8,-1);var H=(e)=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var U=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},Ge=/-\w/g,_t=U((e)=>e.replace(Ge,(t)=>t.slice(1).toUpperCase())),$e=/\B([A-Z])/g,yt=U((e)=>e.replace($e,"-$1").toLowerCase()),_e=U((e)=>e.charAt(0).toUpperCase()+e.slice(1)),vt=U((e)=>e?`on${_e(e)}`:""),b=(e,t)=>!Object.is(e,t);var Ye="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var Et=q(Ye+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var d;class be{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&d)if(d.active)this.parent=d,this.index=(d.scopes||(d.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=d;try{return d=this,e()}finally{d=t}}}on(){if(++this._on===1)this.prevScope=d,d=this}off(){if(this._on>0&&--this._on===0){if(d===this)d=this.prevScope;else{let e=d;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function xe(e){return new be(e)}function bl(e,t=!1){if(d)d.cleanups.push(e)}var f;var X=new WeakSet;class W{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d)if(d.active)d.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,X.has(this))X.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))we(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ye(this),Te(this);let e=f,t=m;f=this,m=!0;try{return this.fn()}finally{Ne(this),f=e,m=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ae(e);this.deps=this.depsTail=void 0,ye(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)X.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Q(this))this.run()}get dirty(){return Q(this)}}var Se=0,M,L;function we(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=M,M=e}function re(){Se++}function se(){if(--Se>0)return;if(L){let t=L;L=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(M){let t=M;M=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function Te(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ne(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;ae(r),Be(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function Q(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ae(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ae(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===P)return;if(e.globalVersion=P,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Q(e)))return;e.flags|=2;let t=e.dep,n=f,r=m;f=e,m=!0;try{Te(e);let i=e.fn(e._value);if(t.version===0||b(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,m=r,Ne(e),e.flags&=-3}}function ae(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r)r.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)ae(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function Be(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function oe(e,t){if(e.effect instanceof W)e=e.effect.fn;let n=new W(e);if(t)F(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var m=!0,Oe=[];function kh(){Oe.push(m),m=!1}function Eh(){let e=Oe.pop();m=e===void 0?!0:e}function C_(e,t=!1){if(f instanceof W)f.cleanup=e}function ye(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var P=0;class Re{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Y{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!f||!m||f===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==f){if(t=this.activeLink=new Re(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;De(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=f.depsTail,t.nextDep=void 0,f.depsTail.nextDep=t,f.depsTail=t,f.deps===t)f.deps=n}}return t}trigger(e){this.version++,P++,this.notify(e)}notify(e){re();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{se()}}}function De(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)De(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var te=new WeakMap,x=Symbol(""),ne=Symbol(""),V=Symbol("");function h(e,t,n){if(m&&f){let r=te.get(e);if(!r)te.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new Y),i.map=r,i.key=n;i.track()}}function T(e,t,n,r,i,s){let o=te.get(e);if(!o){P++;return}let a=(c)=>{if(c)c.trigger()};if(re(),t==="clear")o.forEach(a);else{let c=O(e),l=c&&H(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,g)=>{if(g==="length"||g===V||!R(g)&&g>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(V));switch(t){case"add":if(!c){if(a(o.get(x)),C(e))a(o.get(ne))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(x)),C(e))a(o.get(ne))}break;case"set":if(C(e))a(o.get(x));break}}}se()}function k(e){let t=he(e);if(t===e)return t;if(h(t,"iterate",V),N(e))return t;if(!w(e))return t.map(y);return wg(e)?t.map((n)=>A(y(n))):t.map(A)}function ce(e){return h(e=he(e),"iterate",V),e}function _(e,t){if(w(e))return wg(e)?A(y(t)):A(t);return y(t)}var qe={__proto__:null,[Symbol.iterator](){return J(this,Symbol.iterator,(e)=>_(this,e))},concat(...e){return k(this).concat(...e.map((t)=>O(t)?k(t):t))},entries(){return J(this,"entries",(e)=>(e[1]=_(this,e[1]),e))},every(e,t){return S(this,"every",e,t,void 0,arguments)},filter(e,t){return S(this,"filter",e,t,(n)=>n.map((r)=>_(this,r)),arguments)},find(e,t){return S(this,"find",e,t,(n)=>_(this,n),arguments)},findIndex(e,t){return S(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return S(this,"findLast",e,t,(n)=>_(this,n),arguments)},findLastIndex(e,t){return S(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return S(this,"forEach",e,t,void 0,arguments)},includes(...e){return Z(this,"includes",e)},indexOf(...e){return Z(this,"indexOf",e)},join(e){return k(this).join(e)},lastIndexOf(...e){return Z(this,"lastIndexOf",e)},map(e,t){return S(this,"map",e,t,void 0,arguments)},pop(){return I(this,"pop")},push(...e){return I(this,"push",e)},reduce(e,...t){return Ee(this,"reduce",e,t)},reduceRight(e,...t){return Ee(this,"reduceRight",e,t)},shift(){return I(this,"shift")},some(e,t){return S(this,"some",e,t,void 0,arguments)},splice(...e){return I(this,"splice",e)},toReversed(){return k(this).toReversed()},toSorted(e){return k(this).toSorted(e)},toSpliced(...e){return k(this).toSpliced(...e)},unshift(...e){return I(this,"unshift",e)},values(){return J(this,"values",(e)=>_(this,e))}};function J(e,t,n){let r=ce(e),i=r[t],s=i.call(r);if(r!==e&&!N(e)){if(s[Symbol.toStringTag]==="Array Iterator"){let o=Object.create(Object.getPrototypeOf(s));if(o.next=()=>ve(s.next(),n),i!==ke[t])Object.defineProperties(o,{return:{get(){let a=s.return;return typeof a==="function"?a.bind(s):a}},throw:{get(){let a=s.throw;return typeof a==="function"?a.bind(s):a}}});return o}s._next=s.next,s.next=()=>ve(s._next(),n)}return s}function ve(e,t){if(!e.done)e.value=t(e.value);return e}var ke=Array.prototype;function S(e,t,n,r,i,s){let o=ce(e),a=o!==e&&!N(e),c=o[t];if(c!==ke[t]){let p=c.apply(e,s);return a?y(p):p}let l=n;if(o!==e){if(a)l=function(p,g){return n.call(this,_(e,p),g,e)};else if(n.length>2)l=function(p,g){return n.call(this,p,g,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function Ee(e,t,n,r){let i=ce(e),s=i!==e&&!N(e),o=n,a=!1;if(i!==e){if(s)a=r.length===0,o=function(l,u,p){if(a)a=!1,l=_(e,l);return n.call(this,l,_(e,u),p,e)};else if(n.length>3)o=function(l,u,p){return n.call(this,l,u,p,e)}}let c=i[t](o,...r);return a?_(e,c):c}function Z(e,t,n){let r=he(e);h(r,"iterate",V);let i=r[t](...n);if((i===-1||i===!1)&&ct(n[0]))return n[0]=he(n[0]),r[t](...n);return i}function I(e,t,n=[]){kh(),re();let r=he(e)[t].apply(e,n);return se(),Eh(),r}var Xe=q("__proto__,__v_isRef,__isVue"),Ce=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(R));function Je(e){if(!R(e))e=String(e);let t=he(this);return h(t,"has",e),t.hasOwnProperty(e)}class le{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(n===(r?i?ot:Pe:i?Le:Me).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=O(e);if(!r){let a;if(s&&(a=qe[t]))return a;if(t==="hasOwnProperty")return Je}let o=Reflect.get(e,t,ou(e)?e:n);if(R(t)?Ce.has(t):Xe(t))return o;if(!r)h(e,"get",t);if(i)return o;if(ou(o)){let a=s&&H(t)?o:o.value;return r&&D(a)?G(a):a}if(D(o))return r?G(o):v(o);return o}}class fe extends le{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=O(e)&&H(t);if(!this._isShallow){let c=w(i);if(!N(n)&&!w(n))i=he(i),n=he(n);if(!s&&ou(i)&&!ou(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:j(e,t),a=Reflect.set(e,t,n,ou(e)?e:r);if(e===he(r)&&a){if(!o)T(e,"add",t,n);else if(b(n,i))T(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=j(e,t),r=e[t],i=Reflect.deleteProperty(e,t);if(i&&n)T(e,"delete",t,void 0,r);return i}has(e,t){let n=Reflect.has(e,t);if(!R(t)||!Ce.has(t))h(e,"has",t);return n}ownKeys(e){return h(e,"iterate",O(e)?"length":x),Reflect.ownKeys(e)}}class Ie extends le{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Ze=new fe,Qe=new Ie,et=new fe(!0);var ie=(e)=>e,K=(e)=>Reflect.getPrototypeOf(e);function tt(e,t,n){return function(...r){let i=this.__v_raw,s=he(i),o=C(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?ie:t?A:y;return!t&&h(s,"iterate",c?ne:x),F(Object.create(l),{next(){let{value:p,done:g}=l.next();return g?{value:p,done:g}:{value:a?[u(p[0]),u(p[1])]:u(p),done:g}}})}}function z(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nt(e,t){let n={get(i){let s=this.__v_raw,o=he(s),a=he(i);if(!e){if(b(i,a))h(o,"get",i);h(o,"get",a)}let{has:c}=K(o),l=t?ie:e?A:y;if(c.call(o,i))return l(s.get(i));else if(c.call(o,a))return l(s.get(a));else if(s!==o)s.get(i)},get size(){let i=this.__v_raw;return!e&&h(he(i),"iterate",x),i.size},has(i){let s=this.__v_raw,o=he(s),a=he(i);if(!e){if(b(i,a))h(o,"has",i);h(o,"has",a)}return i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){let o=this,a=o.__v_raw,c=he(a),l=t?ie:e?A:y;return!e&&h(c,"iterate",x),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return F(n,e?{add:z("add"),set:z("set"),delete:z("delete"),clear:z("clear")}:{add(i){let s=he(this),o=K(s),a=he(i),c=!t&&!N(i)&&!w(i)?a:i;if(!(o.has.call(s,c)||b(i,c)&&o.has.call(s,i)||b(a,c)&&o.has.call(s,a)))s.add(c),T(s,"add",c,c);return this},set(i,s){if(!t&&!N(s)&&!w(s))s=he(s);let o=he(this),{has:a,get:c}=K(o),l=a.call(o,i);if(!l)i=he(i),l=a.call(o,i);let u=c.call(o,i);if(o.set(i,s),!l)T(o,"add",i,s);else if(b(s,u))T(o,"set",i,s,u);return this},delete(i){let s=he(this),{has:o,get:a}=K(s),c=o.call(s,i);if(!c)i=he(i),c=o.call(s,i);let l=a?a.call(s,i):void 0,u=s.delete(i);if(c)T(s,"delete",i,void 0,l);return u},clear(){let i=he(this),s=i.size!==0,o=void 0,a=i.clear();if(s)T(i,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{n[i]=tt(i,e,t)}),n}function ue(e,t){let n=nt(e,t);return(r,i,s)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_isShallow")return t;else if(i==="__v_raw")return r;return Reflect.get(j(n,i)&&i in r?n:r,i,s)}}var it={get:ue(!1,!1)},rt={get:ue(!1,!0)},st={get:ue(!0,!1)};var Me=new WeakMap,Le=new WeakMap,Pe=new WeakMap,ot=new WeakMap;function at(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function v(e){if(w(e))return e;return pe(e,!1,Ze,it,Me)}function vg(e){return pe(e,!1,et,rt,Le)}function G(e){return pe(e,!0,Qe,st,Pe)}function pe(e,t,n,r,i){if(!D(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=i.get(e);if(s)return s;let o=at(me(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function wg(e){if(w(e))return wg(e.__v_raw);return!!(e&&e.__v_isReactive)}function w(e){return!!(e&&e.__v_isReadonly)}function N(e){return!!(e&&e.__v_isShallow)}function ct(e){return e?!!e.__v_raw:!1}function he(e){let t=e&&e.__v_raw;return t?he(t):e}var y=(e)=>D(e)?v(e):e,A=(e)=>D(e)?G(e):e;function ou(e){return e?e.__v_isRef===!0:!1}function su(e){return Ve(e,!1)}function yl(e){return Ve(e,!0)}function Ve(e,t){if(ou(e))return e;return new Fe(e,t)}class Fe{constructor(e,t){this.dep=new Y,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:he(e),this._value=t?e:y(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||N(e)||w(e);if(e=n?e:he(e),b(e,t))this._rawValue=e,this._value=n?e:y(e),this.dep.trigger()}}class je{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Y(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=P-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&f!==this)return we(this,!0),!0}get value(){let e=this.dep.track();if(Ae(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function au(e,t,n=!1){let r,i;if(de(e))r=e;else r=e.get,i=e.set;return new je(r,i,n)}var lt={assertive:"jx-live-assertive",polite:"jx-live-polite"};function ft(e){if(typeof document>"u")return null;let t=lt[e],n=document.querySelector(`#${t}`);if(n)return n;let r=document.createElement("div");return r.id=t,r.setAttribute("aria-live",e),r.setAttribute("role",e==="assertive"?"alert":"status"),r.setAttribute("aria-atomic","true"),r.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0",document.body.append(r),r}function gv(e,t="polite"){if(e==="")return;let n=ft(t);if(!n)return;n.textContent="",setTimeout(()=>{n.textContent=e},0)}var Th=60000,He=null;function Kr(){return He??Date.now()}function fR(e){let t=e instanceof Date?e.getTime():ee(e)?e:Date.parse(e);if(!Number.isFinite(t))throw TypeError(`clock: cannot pin to ${JSON.stringify(e)}`);return He=t,t}var ut={error:"problem",info:"toast",success:"toast",warn:"toast"},pt={error:8000,info:4000,success:4000,warn:8000},Ue=0;function dt(){return Ue+=1,`n${Ue}`}var Jc=v([]),Os=v([]),ht=4;function gt(e){return e==="problem"?Os:Jc}function mt(e,t,n,r){let i={at:Kr(),id:dt(),message:t,severity:e,tier:n};if(r.action!==void 0)i.action=r.action;if(r.actionArgs!==void 0)i.actionArgs=r.actionArgs;if(r.detail!==void 0)i.detail=r.detail;if(r.source!==void 0)i.source=r.source;if(r.path!==void 0)i.path=r.path;if(r.key!==void 0)i.key=r.key;if(n==="toast")i.timeoutMs=r.timeoutMs??pt[e];return i}function E(e,t,n={}){let r=n.tier??ut[e],i=mt(e,t,r,n),s=gt(r);if(i.key!==void 0){let o=s.findIndex((a)=>a.key===i.key);if(o!==-1)s.splice(o,1)}if(s.push(i),r==="toast")while(Jc.length>ht)Jc.shift();return gv(i.source===void 0?i.message:`${i.source}: ${i.message}`,e==="error"?"assertive":"polite"),i}function B(e){return(t,n={})=>E(e,t,n)}E.success=B("success");E.info=B("info");E.warn=B("warn");E.error=B("error");function lu(e){for(let t of[Jc,Os]){let n=t.findIndex((r)=>r.id===e);if(n!==-1)return t.splice(n,1),!0}return!1}function vl(e){let t=e?Os.filter((r)=>!e(r)):[],n=Os.length-t.length;return Os.splice(0,Os.length,...t),n}function Lh(e){let t=[];for(let n of Os){if(n.source!==e)continue;let r={message:n.message,severity:n.severity};if(n.detail!==void 0)r.detail=n.detail;if(n.path!==void 0)r.path=n.path;if(n.key!==void 0)r.key=n.key;if(n.action!==void 0)r.action=n.action;if(n.actionArgs!==void 0)r.actionArgs=n.actionArgs;t.push(r)}return t}function xg(e){return e===void 0?Os.length:Os.filter((t)=>t.severity===e).length}export{xe,bl,oe,kh,Eh,C_,v,vg,wg,he,ou,su,yl,au,gv,Th,Kr,fR,Jc,Os,E,lu,vl,Lh,xg};
|
|
2
|
-
|
|
3
|
-
//# debugId=ADBBB602A61154F664756E2164756E21
|
|
4
|
-
//# sourceMappingURL=studio-wz73q5kq.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{mt}from"./studio-0q988f9w.js";import{re}from"./studio-j1kvhdjk.js";import{ae}from"./studio-v8aga3vp.js";import{I,A,un,fl,Hn}from"./studio-2jbs3rxv.js";import{v,Kr,E}from"./studio-wz73q5kq.js";import{f,Qe}from"./studio-ffrrncvz.js";import{Xt,tu,hl,sf,oa,af,rn,pl}from"./studio-nwfrc98n.js";import{Ia}from"./studio-zp7snvkq.js";import{Uo,Vp}from"./studio-jjkg84nj.js";import{bn,Br,ch,Ym,Gp,u_,si,b,fh,nc,dl,zr,F1,bi,tg,sv}from"./studio-24mccdrj.js";import{Qu,LT,$T,Xs}from"./studio-pag2wncm.js";import{Tt,zo,as}from"./studio-vfcdrfmv.js";import{Ts,PL,jL,Dy,$s,Ny}from"./studio-ynn90f58.js";import{La}from"./studio-6wkmf3wz.js";import{Xn}from"./studio-v2w7q8r1.js";import{Zl}from"./studio-4h8k4dw9.js";import{Lo,ia,ra,Is}from"./studio-485046te.js";import{Fb,Cp,kp,Qw,QE,ym}from"./studio-18vgbhs5.js";import{Vc,Py,cl}from"./studio-qvanvzfd.js";import{yT,iC}from"./studio-fpphgn8y.js";import{TT,Vo,Em,Tm}from"./studio-er30bpcx.js";import{Bt}from"./studio-1fxkaaea.js";import{Ab,Pb,Mb}from"./studio-bn5nkafw.js";import{Ss}from"./studio-tjzjhe68.js";import{Ea}from"./studio-8qm0ep50.js";import{O,oc,dn}from"./studio-c7q0t9x1.js";import{i,te,T}from"./studio-cffqvnzd.js";import{we}from"./studio-a3g98wjr.js";async function pm(){if(Fb(location.search))return!1;let e=f();if(!e.dependenciesNeedInstall||!e.installDependencies)return!1;let t=!1;try{t=await e.dependenciesNeedInstall()}catch{return!1}if(!t)return!1;let o=La({status:"Running bun install…",title:"Installing dependencies"});try{let n=await e.installDependencies();if(n.ok)return o.done(),!0;o.fail(n.log??"bun install failed")}catch(n){o.fail(n instanceof Error?n.message:String(n))}return!1}var Ye=["page","component"],Xe={components:"component",pages:"page"};function J(e){return e.replaceAll("\\","/").replace(/^\.\//,"")}function Ze(e){let t=J(e).toLowerCase();for(let[o,n]of Object.entries(Xe))if(t.startsWith(`${o}/`))return n;return null}function ne(e){return Ye.some((t)=>e.includes(t))}function et(e){let t=O?.projectConfig?.layout;if(!i(t))return!1;return J(t).toLowerCase()===J(e).toLowerCase()}function be(e){let t=[{ext:".json",label:"JSON (.json)"}];for(let o of pl(e)){let n=oa(o,"parse");if(n&&oa(o,"serialize"))t.push({ext:o,label:`${n.name} (${o})`})}return t}function xe(){return new Set([".json",...sf().flatMap((e)=>e.extensions)])}function Uw(e){if(e===null||e===void 0||e==="")return[];let t=Ze(e);if(t===null||et(e)||u_(e))return[];let o=rn(e);if(!(o?Boolean(o.capabilities.parse)&&ne(o.documentKinds):J(e).toLowerCase().endsWith(".json")))return[];let r=[];if(o)r.push({ext:".json",label:"JSON (.json)"});for(let a of pl()){let s=oa(a,"serialize");if(!s||s.name===o?.name||!ne(s.documentKinds)||!s.documentKinds.includes(t))continue;r.push({ext:a,label:`${s.name} (${a})`})}return r}function zE(){let e=new Set([".json"]);for(let t of sf()){if(!t.capabilities.serialize||!ne(t.documentKinds))continue;for(let o of t.extensions)e.add(o)}return[...e].toSorted()}var ie="jx-studio-recent-projects",Fe="jx-studio-recent-files",Pe=8,tt=10,z=[];function B(){if(!Qe())return null;let e=f();return ot(e)?e:null}function ot(e){return Boolean(e.getRecentProjects&&e.saveRecentProjects)}function nt(){try{let e=localStorage.getItem(ie);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function se(){return B()?z:nt()}function je(e){z=e;let t=B();if(t)t.saveRecentProjects(e);else try{localStorage.setItem(ie,JSON.stringify(e))}catch{}}async function UE(){let e=B();if(!e)return;try{z=await e.getRecentProjects()}catch{z=[]}}function Nb(){return se().toSorted((e,t)=>t.timestamp-e.timestamp)}function Ob(e,t){let o=se().filter((n)=>n.root!==t);if(o.unshift({name:e,root:t,timestamp:Kr()}),o.length>Pe)o.length=Pe;je(o)}function qw(e){je(se().filter((t)=>t.root!==e))}function qE(){z=[];let e=B();if(e)e.saveRecentProjects([]);else localStorage.removeItem(ie)}function Se(){try{let e=localStorage.getItem(Fe);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function KE(e){let t=Se().toSorted((o,n)=>n.timestamp-o.timestamp);return e==null?t:t.filter((o)=>o.root===e)}function fm(e){let t=Se().filter((r)=>!(r.root===e.root&&r.path===e.path));t.unshift({name:e.name,path:e.path,root:e.root,timestamp:Kr()});let o=new Map,n=[];for(let r of t.toSorted((a,s)=>s.timestamp-a.timestamp)){let a=(o.get(r.root)??0)+1;if(o.set(r.root,a),a<=tt)n.push(r)}localStorage.setItem(Fe,JSON.stringify(n))}var $e={$schema:"https://jxsuite.com/schema/v1",$id:"StudioFilesPanel",$description:'The Navigator\'s Files tree, as a Jx document over the kit. `files/files.ts` keeps every decision — which directories are listed, which entries `.gitignore` masks, which rows the window draws, what a click on a row means, what the context menu offers and what each verb does to the filesystem — and hands this document one projection: a word saying which of three things to draw, a toolbar whose state is already resolved, and rows whose every field is already a string. Nothing here asks what a file is, how tall the Navigator is, or whether a directory has been read. THE TREE IS `jx-tree`, and that is what this document no longer says: `role="tree"`, `role="treeitem"`, `aria-level`, `aria-posinset`, `aria-setsize`, the roving `tabindex` and the five arrow-key cases were each written out here and written out again in `panel-outline.json`, two copies of one keyboard contract with nothing holding them in agreement. The element owns all of it; what is left here is what this tree IS — a flat projection of rows, each already carrying its own level and set counts, because the DOM holds a WINDOW onto the model and an expanded `node_modules` is eleven rows rather than ten thousand. The window reaches the element as `padtop`/`padbottom`, and a caret move past either comes back as `move` for the flow to scroll and repaint. Four facts a row carries are bound against ONE scope field each — the current path, the selected path, the dragged path and the drop target — so moving the caret or dragging a file re-evaluates an attribute per drawn row instead of rebuilding the list under the reader\'s pointer. The pragmatic-drag-and-drop handles are an ISLAND: the document draws the rows and the tree, and the adapter attaches sources and targets to them through `onNodeCreated` (specs/studio-ui-guidelines.md §9.4).',tagName:"div",attributes:{part:"files"},style:{$description:"What the twenty `.file-tree*`, `.files-toolbar`, `.project-header` and `.project-name` rules in `styles/panels.css` said, keyed on `part` and re-pointed at the studio token layer. Three names could not come with the declarations. The five `var(--spectrum-font-size-50 | -75, …)` reads are the kit's `--jx-text-sm` and `--jx-text-md`, which are the same 11px and 12px — a `--spectrum-*` name is declared by `<sp-theme>` and by nothing else in this package, so a document that reads one is a document whose type size changes when a component it does not use is removed. The `.selected`, `.dragging`, `.drag-over` and `.drag-over-root` classes are `data-` attributes on a part, because a part is the handle now and because a state a handler adds and forgets to take off is exactly the defect a cancelled drag used to leave on screen. MOST OF THE ROW'S OWN RULES ARE GONE, and that is the point of the element rather than an omission: `jx-tree-item` declares the flex line, the one-control-height box the window reserves scroll by, the indent (`--jx-tree-indent` times one less than `level` — exactly the `8 + depth * 16` this file composed per row), the hover and focus states, the selected wash and the faded dragged row. What is left here is what is TRUE OF THIS TREE and not of trees in general: it owns its own scrollbar, a click on a row opens it, and the row a drag is over wears the drop mark this file draws.",display:"flex",flexDirection:"column",height:"100%",minHeight:"0",overflow:"hidden",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="empty"]':{$description:"The two states that are not a tree. They are two states and not one sentence: a window with no project at all and a monorepo root that has not been pointed at a site are different situations, and only the second has anything to offer (studio-ui-guidelines.md §11).",padding:"var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-4)"},'& [part="empty"] p':{margin:"0"},'& [part="frame"]':{display:"flex",flexDirection:"column",height:"100%",minHeight:"0"},'& [part="project-header"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-4)",borderBottom:"1px solid var(--border)",flexShrink:"0"},'& [part="project-name"]':{fontSize:"var(--jx-text-md)",fontWeight:"600",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="toolbar"]':{display:"flex",gap:"var(--jx-space-2)",padding:"var(--jx-space-2) var(--jx-space-3)",borderBottom:"1px solid var(--border)",alignItems:"center",flexShrink:"0"},'& [part="search"]':{flex:"1",minWidth:"0"},'& [part="tree"]':{$description:"The scroller as well as the list. `ui/virtual-window.ts` walks up from the element it is given looking for the nearest thing that scrolls, and finding itself is the shortest answer — which is why the element declares no `overflow` of its own and leaves the question to the two trees that answer it differently. The colour is re-declared because `jx-tree` sets `--jx-fg` on itself, and this panel's text colour is the studio alias of it.",flex:"1",minHeight:"0",overflowY:"auto",color:"var(--fg)"},'& [part="tree"][data-drop="true"]':{background:"var(--hover-bg)"},'& [part="row"]':{$description:"What the element does not decide. A click on a row OPENS it here — a directory unfolds, a file takes a tab — so the pointer is a pointer rather than the element's default arrow; and the gap is the wider one this tree has always drawn between a 16px file glyph and its name.",gap:"var(--jx-space-3)",cursor:"pointer"},'& [part="loading-row"]':{$description:"A directory whose listing has not arrived yet. It holds the place and it is NOT a row: it is not a `jx-tree-item`, so the caret cannot land on it, the set counts do not include it and typeahead cannot match it — and it is replaced by the real rows on the repaint the listing provokes. It draws the same box by hand because it is the only line in this tree the element does not draw, and a placeholder of a different height would desynchronise the window's scroll reservation from the rows it reserves for.",display:"flex",alignItems:"center",boxSizing:"border-box",blockSize:"var(--jx-control-h)",paddingInline:"calc(var(--jx-space-3) + var(--depth, 0) * 16px) var(--jx-space-3)",color:"var(--fg-dim)",fontStyle:"italic",cursor:"default",userSelect:"none",whiteSpace:"nowrap"},'& [part="row-icon"]':{flexShrink:"0",display:"flex",alignItems:"center","--jx-icon-size":"16px"},'& [part="locale"]':{$description:"The language chip. Deliberately declares no block size, no padding and no line height: the row above is one control-height by contract, and a chip that grew the box would desynchronise the window's scroll reservation from the height it reserves by. It only ever shrinks the text. A chip, not a filter term: the search matches the file's name alone, because a query that silently also matched a language would make “why is this file here” unanswerable from what is on screen.",marginInlineStart:"auto",flexShrink:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxInlineSize:"6em"},'& [part="view-slot"], & [part="header-slot"], & [part="locale-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"}},children:[{tagName:"div",attributes:{part:"view-slot",role:"none"},$switch:{$ref:"#/state/view"},cases:{none:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"No project loaded"}]},welcome:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Open a project folder to get started."},{tagName:"jx-button",attributes:{part:"open-project"},$props:{variant:"accent",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openProject"},value:[]}],description:"The declared `project.open` command, run through the registry — not a second opener of this surface's own. It is the one the chord, the palette and the status bar's PROJECT field already run, so a window that opens a project from here reports the outcome the same way they do (studio-ui-guidelines.md §12.5)."},children:[{tagName:"span",textContent:"Open Project"}]}]},tree:{tagName:"div",attributes:{part:"frame"},children:[{tagName:"div",attributes:{part:"header-slot",role:"none"},$switch:{$ref:"#/state/headerState"},cases:{shown:{tagName:"div",attributes:{part:"project-header"},children:[{tagName:"span",attributes:{part:"project-name",title:"${state.projectName}"},textContent:"${state.projectName}"}]}}},{tagName:"div",attributes:{part:"toolbar"},children:[{$description:"A row of quiet tools, so NOT compact. A compact group draws every member's frame and fill whatever its quiet says, which is the segmented look a choice wants and not the borderless one a toolbar wants; Spectrum's group here was `compact quiet`, a combination the kit spells as compact=false with its members' default quiet.",tagName:"jx-action-group",attributes:{part:"toolbar-actions"},$props:{compact:!1,label:"File tree actions"},children:[{tagName:"jx-action-button",attributes:{part:"new-file"},$props:{size:"sm",icon:"plus",label:"New File",hint:"New File"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/newFile"},value:[]}]}},{tagName:"jx-action-button",attributes:{part:"refresh"},$props:{size:"sm",icon:"arrows-clockwise",label:"Refresh",hint:"Refresh"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/refresh"},value:[]}],description:"The rules go with the listings. Refresh is what an author reaches for after editing a `.gitignore` by hand, and a tree that came back still hiding by the old rules would read as the button not having worked."}},{tagName:"jx-action-button",attributes:{part:"show-ignored"},$props:{size:"sm",icon:{$ref:"#/state/ignoredIcon"},label:{$ref:"#/state/ignoredLabel"},hint:{$ref:"#/state/ignoredLabel"},selected:{$ref:"#/state/ignoredSelected"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleIgnored"},value:[]}],description:"A repaint and nothing else: the ignored entries were never dropped from the cached listings, only from the rows built out of them."}}]},{tagName:"jx-textfield",attributes:{part:"search"},$props:{label:"Filter files",placeholder:"Filter files…",size:"sm",value:{$ref:"#/state/query"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/search"},value:[{$ref:"event#/target/value"}]}],description:"The query matches a file's NAME and nothing else. A directory is kept whatever it says, because hiding the folder a match sits in would leave the match with nowhere to be drawn."}}]},{$description:'The `role="tree"`, and everything that used to be spelled out under it. The element writes the role, the name, the roving tab stop and every row\'s `aria-level` / `aria-posinset` / `aria-setsize`, and it owns the whole ARIA keyboard: the arrows walk the drawn rows without wrapping, `Home` and `End` reach the ends of the MODEL by way of the pads, `ArrowRight` opens a directory and steps into an open one, `ArrowLeft` closes one and otherwise steps out to its parent, `Enter` activates and a printable character is typeahead. Every chord it does not own — cut, copy, paste, delete, rename — passes straight through to the flow, which is the WCAG 2.5.7 obligation this tree carries because dragging a file is the other way to move it. What reaches this document is five events, and each of them is a decision `files.ts` already owned.',tagName:"jx-tree",attributes:{part:"tree",label:"Project files",current:"${state.currentPath}",padtop:"${state.padTop}",padbottom:"${state.padBottom}","data-drop":"${state.rootDrop || null}"},onselect:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/select"},value:[{$ref:"event#/detail/value"}]}],description:"The reader meant that row. This tree is single-select, so the element resolves every modifier to `replace` before it gets here and the detail's `mode` and `anchor` are answers to a question this tree does not ask. There is no `change` handler beside it on purpose: the element OWNS the caret and keeps it across every repaint that does not change `current`, so a second copy of it in the flow would be a variable that only ever went stale."},onactivate:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"event#/detail"}]}],description:"`Enter` or a double click. The same verb a single click reaches, by the same name."},onexpand:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/expand"},value:[{$ref:"event#/detail/value"},{$ref:"event#/detail/expanded"}]}],description:"`ArrowRight`, `ArrowLeft` or the twisty, with ONE dispatcher between them: the detail says the state the row should be PUT INTO, so the flow never has to work out which way a toggle was going."},onmove:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/move"},value:[{$ref:"event#/detail/from"},{$ref:"event#/detail/key"}]}],description:"The caret has to reach a row the window did not draw. The element knows only that the pad on that side is not zero; where the row is in the model, and how far to scroll to bring it into view, is the flow's — which is why this is an event and not a `scrollIntoView`."},ontypeahead:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/typeahead"},value:[{$ref:"event#/detail/from"},{$ref:"event#/detail/char"}]}],description:"A printable character, on a windowed tree. The same hand-off as `onmove` and for a sharper reason: a move off the end of the slice announces itself, and a letter never does — the element's own search over the drawn rows always answers, and over a `node_modules` of ten thousand entries the answer is whichever of the eleven painted rows happened to start with that letter. So the element dispatches EVERY such character and the flow answers it over the model."},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{item:{tagName:"jx-tree-item",attributes:{part:"row",value:"${$map.item.path}",label:"${$map.item.name}",level:"${$map.item.level}",posinset:"${$map.item.posInSet}",setsize:"${$map.item.setSize}",expanded:"${$map.item.ariaExpanded}",selected:"${state.selectedPath === $map.item.path ? 'true' : 'false'}","data-type":"${$map.item.type}","data-dragging":"${state.dragPath === $map.item.path ? '' : null}","data-drop":"${state.dropPath === $map.item.path ? '' : null}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"$map/item/path"}]}],description:"A single click OPENS the row, which is this tree's own answer and not the element's. `jx-tree` answers a click with `change` and `select`, exactly as it answers an arrow key, and a tree that opened on `select` would open every file the reader arrowed past. So the opening verb is bound here, where a click is a click; what a click MEANS — unfold this directory, take a tab for that file — stays the flow's, and Enter reaches the same verb through `activate`. It does NOT stop the event, which is the correction: the tree's delegated click is what moves the caret and the selection onto the row, so a `stopPropagation` here would leave a reader who clicked a folder with the tab stop still on whatever they had open last. The twisty stops its own click, so opening a directory from the chevron does not also activate the row."},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{tagName:"jx-icon",attributes:{slot:"icon",part:"row-icon","aria-hidden":"true"},$props:{name:{$ref:"$map/item/icon"}}},{tagName:"div",attributes:{slot:"status",part:"locale-slot",role:"none"},$switch:{$ref:"$map/item/localeState"},cases:{shown:{tagName:"span",attributes:{part:"locale"},textContent:"${$map.item.locale}"}}}]},loading:{$description:"A directory whose listing has not arrived yet. Deliberately not a `jx-tree-item`: there is no file there to select, open, rename or drag, and a row the caret could land on that answers to none of the verbs the caret offers is a stop in the walk with nothing behind it.",tagName:"div",attributes:{part:"loading-row",role:"none","data-loading":"true",style:"--depth:${$map.item.depth}"},textContent:"Loading…"}}}}]}]}}}]};I("files-panel",$e);function Re(e,t){e.view=t.view,e.headerState=t.headerState,e.projectName=t.projectName,e.query=t.query,e.ignoredLabel=t.ignoredLabel,e.ignoredIcon=t.ignoredIcon,e.ignoredSelected=t.ignoredSelected,e.padTop=t.padTop,e.padBottom=t.padBottom,e.rows=t.rows,e.selectedPath=t.selectedPath,e.dragPath=t.dragPath,e.dropPath=t.dropPath,e.rootDrop=t.rootDrop,e.currentPath=t.currentPath}function U(){return{currentPath:"",dragPath:"",dropPath:"",headerState:"hidden",ignoredIcon:"eye-slash",ignoredLabel:"Show ignored files",ignoredSelected:!1,padBottom:0,padTop:0,projectName:"",query:"",rootDrop:"",rows:[],selectedPath:"",view:"none"}}function at(e){let t=i(e)?void 0:e.attributes?.part;return i(t)?t:""}function it(e){let t=e?.$map,o=T(t)&&"item"in t?t.item:void 0;if(!T(o)||!("path"in o)||!i(o.path)||!("type"in o)||!i(o.type))return null;return{path:o.path,type:o.type}}function ke(e,t,o){let n=v({...U(),...o});Re(n,t);let r=null,a=!1,s=A("files-panel",n,e,{onNodeCreated:(l,c,d,p)=>{if(a||!(l instanceof HTMLElement))return;let j=at(d);if(j==="tree"){o.treeHost(l);return}if(j!=="row")return;let g=it(p);if(g)o.rowHost(l,g.path,g.type)}}).then((l)=>{if(a){l.dispose();return}r=l});return{connected:()=>!a&&(r===null||r.root.parentNode===e),dispose(){a=!0,r?.dispose(),r=null},ready:s,update:(l)=>{Re(n,l)}}}async function _s(e){if(!O)return;try{let t=f(),[o]=await Promise.all([Uo(()=>t.listDirectory(e)),LT(e)]);O.dirs.set(e,o)}catch{O.dirs.set(e,[])}}var st=new Set(["pages","layouts","components","content","data","public","styles"]);async function mm(){if(!O)return;await _s(".");let e=[];for(let t of O.dirs.get(".")??[])if(t.type==="directory"&&st.has(t.name))e.push(t.name),O.expanded.add(t.path||t.name),await _s(t.path||t.name);O.projectDirs=e}function he(){return zo(Tt.showIgnoredFiles)==="true"}function lt(e){as(Tt.showIgnoredFiles,e?"true":"")}async function IS(){try{let e=f(),t=await e.probeRootProject();if(!t)return;let{meta:o,info:n}=t;if(tu(),Xt(),hl(e),Qu(),Vp(),oc({dirs:new Map,expanded:new Set,isSiteProject:n.isSiteProject,name:n.isSiteProject?n.projectConfig?.name||o.name:o.name,projectConfig:(n.isSiteProject?n.projectConfig:null)||null,projectDirs:n.directories||[],projectRoot:".",root:o.root,searchQuery:"",selectedPath:null}),n.isSiteProject)dl(o.root||".",n.projectConfig||null);if(n.isSiteProject){if(Ob(dn().name,o.root),await kp(),await pm())tu(),await Xt(),hl(e);await mm(),await Zl(),await gm(),Cp(o.root)}}catch{}}async function DS({renderLeftPanel:e}){try{let t=f(),o=await t.openProject();if(!o)return!1;let{config:n,handle:r}=o;if(F1({document:{children:[],tagName:"div"},id:"initial"}),TT(),tu(),Xt(),hl(t),Qu(),Vp(),oc({...O,dirs:new Map,expanded:new Set,isSiteProject:!0,name:n.name||r.name,projectConfig:n,projectRoot:r.root,searchQuery:"",selectedPath:null}),dl(r.root,n),await kp(),await pm())tu(),await Xt(),hl(t);return await mm(),await Zl(),ym(),Ny(),$s("files"),Ob(dn().name,dn().projectRoot),e(),await gm(),Cp(dn().projectRoot),!0}catch(t){return E.error("Could not open the project.",{detail:re(t),source:"Open Project"}),!1}}async function NS(e){let t=f();if(t.createDestination!=="path")return!1;try{if(await t.activate(e),(await t.gitStatus()).isRepo)return!1;return await t.gitInit(),E.success("Initialized a git repository for this project."),!0}catch(o){return E.warn("Could not initialize a git repository — the project itself was written.",{detail:re(o),source:"Source Control"}),!1}}async function Kw(){await Xt();let e=[...pl("page"),".json"],t;try{t=await f().listDirectory("pages")}catch{return null}let o=new Set(t.filter((n)=>n.type==="file").map((n)=>n.name));for(let n of e)if(o.has(`index${n}`))return`pages/index${n}`;return null}async function ct(){let e=await Kw();if(e)await Fr(e)}async function gm(){let e=jL(b.projectRoot);if(Dy(b.projectRoot),e){if(await PL(e,{ensureSecondPane:()=>{nc(si)},openFile:(o,n)=>Fr(o,{focus:!1,paneId:n})})>0)return!0}return await ct(),!1}function dt(e,t,o){if(t==="directory")return o?"folder-open":"folder";let n=e.split(".").pop()?.toLowerCase();switch(n){case"css":case"js":case"json":case"ts":return"file-code";case"md":return"file-text";default:return n!==void 0&&Py(n)?"image":"file"}}var pt=24,u=[],H=null,L=new Map,K=null,Te=null;function me(){for(let e of L.values())if(e.isConnected&&e.offsetHeight>0)return e.offsetHeight;return pt}function ut(){for(let[e,t]of L)if(!t.isConnected)L.delete(e),ze(t)}function De(e){let t=L.get(e);return t?.isConnected===!0?t:null}function ee(e){return u.find((t)=>!t.loading&&t.path===e)}function Ce(e,t,o,n){let r=dn().dirs.get(e);if(!r){_s(e).then(()=>h()),o.push({depth:t,expanded:!1,key:`loading:${e}`,loading:!0,name:"Loading…",path:e,posInSet:1,setSize:1,type:"file"});return}let a=[...r].toSorted((d,p)=>{if(d.type==="directory"&&p.type!=="directory")return-1;if(d.type!=="directory"&&p.type==="directory")return 1;return d.name.localeCompare(p.name)}),s=he()?a:a.filter((d)=>!$T(e,d.path,d.type==="directory")),l=dn().searchQuery.toLowerCase(),c=l?s.filter((d)=>d.type==="directory"||d.name.toLowerCase().includes(l)):s;for(let[d,p]of c.entries()){let g=p.type==="directory"&&dn().expanded.has(p.path);if(o.push({depth:t,expanded:g,key:p.path,loading:!1,name:p.name,path:p.path,locale:ch(p.path,n)??void 0,posInSet:d+1,setSize:c.length,type:p.type}),g)Ce(p.path,t+1,o,n)}}function Ne(e){return e===void 0?-1:u.findIndex((t)=>!t.loading&&t.path===e)}function q(e,t){for(let o=e+t;o>=0&&o<u.length;o+=t)if(!u[o].loading)return o;return-1}function ft(e){let t=u[e];if(!t)return-1;for(let o=e-1;o>=0;o--){let n=u[o];if(!n.loading&&n.depth<t.depth)return o}return-1}function ht(){if(H?.isConnected!==!0||M!=="")return;queueMicrotask(h)}function ce(){let e=H;if(e===null)return;K=Mb(K,e,{count:()=>u.length,onChange:ht,rowHeight:me})}function gt(e){let t=String(e.depth+1);if(e.loading)return{ariaExpanded:"",depth:String(e.depth),icon:"",key:e.key,kind:"loading",level:t,locale:"",localeState:"hidden",name:e.name,path:e.path,posInSet:"",setSize:"",type:e.type};return{ariaExpanded:e.type==="directory"?String(e.expanded):"",depth:String(e.depth),icon:dt(e.path,e.type,e.expanded),key:e.key,kind:"item",level:t,locale:e.locale===void 0?"":bn(e.locale),localeState:e.locale===void 0?"hidden":"shown",name:e.name,path:e.path,posInSet:String(e.posInSet),setSize:String(e.setSize),type:e.type}}function wt(){if(ut(),!O){u=[];let l={...U(),view:"none"};return F=l,l}if(!O.isSiteProject&&O.projectRoot==="."){u=[];let l={...U(),view:"welcome"};return F=l,l}let e=dn();u=[];let{i18n:t}=Br(e.projectConfig??{});Ce(".",0,u,t);let o=Ab(H,{count:u.length,rowHeight:me()}),n=u.slice(o.start,o.end),r=(e.selectedPath!==null&&ee(e.selectedPath)?e.selectedPath:"")||n.find((l)=>!l.loading)?.path||"",a=he(),s={currentPath:r,dragPath:M,dropPath:V,headerState:e.isSiteProject?"shown":"hidden",ignoredIcon:a?"eye":"eye-slash",ignoredLabel:a?"Hide ignored files":"Show ignored files",ignoredSelected:a,padBottom:o.padBottom,padTop:o.padTop,projectName:e.projectConfig?.name||e.name,query:e.searchQuery,rootDrop:oe,rows:n.map((l)=>gt(l)),selectedPath:e.selectedPath??"",view:"tree"};return F=s,s}function de(){if(!y||!F)return;F={...F,dragPath:M,dropPath:V,rootDrop:oe},y.handle.update(F)}function h(){Te?.()}async function vt(){let e=dn();e.dirs.clear(),Qu(),await _s(".");for(let t of e.expanded)await _s(t);h()}function yt(e){let t=ee(e);if(!t)return;if(t.type==="directory"){Oe(e).then(()=>h());return}Fr(e)}function bt(e,t){let o=dn();if(ee(e)?.type!=="directory"||o.expanded.has(e)===t)return;if(!t){o.expanded.delete(e),h();return}Oe(e).then(()=>h())}function Ie(e){if(!O||dn().selectedPath===e)return;dn().selectedPath=e,h()}function xt(e,t){let o=Ne(e),n;switch(t){case"Home":{n=q(-1,1);break}case"End":{n=q(u.length,-1);break}case"ArrowUp":{n=q(o,-1);break}case"ArrowLeft":{n=ft(o);break}case"ArrowDown":case"ArrowRight":{n=q(o,1);break}default:return}Le(n)}function Pt(e,t){let o=Ne(e),n=u.length;for(let r=1;r<=n;r++){let a=(o+r+n)%n,s=u[a];if(s&&!s.loading&&s.name.trim().toLowerCase().startsWith(t)){Le(a);return}}}function Le(e){let t=u[e];if(!t)return;if(Ie(t.path),De(t.path))return;Pb(H,e,me()),h()}async function Oe(e){let t=dn();if(t.expanded.has(e)){t.expanded.delete(e);return}if(t.expanded.add(e),!t.dirs.has(e))await _s(e)}var _=new Map,Y=null,M="",Q="",V="",X=!1,oe="";function Ft(e){return[...e.dataTransfer?.types??[]].includes("Files")}function Ae(e,t,o){let n=(s)=>{if(!Ft(s))return;if(s.preventDefault(),s.stopPropagation(),s.dataTransfer)s.dataTransfer.dropEffect="copy";o(!0)},r=()=>o(!1),a=(s)=>{o(!1);let l=s.dataTransfer?.files;if(!l?.length)return;s.preventDefault(),s.stopPropagation(),He(l,t,h)};return e.addEventListener("dragover",n),e.addEventListener("dragleave",r),e.addEventListener("drop",a),()=>{e.removeEventListener("dragover",n),e.removeEventListener("dragleave",r),e.removeEventListener("drop",a)}}function pe(e,t){let o=e.replaceAll("\\","/"),n=t.replaceAll("\\","/");if(!o||o===n)return!1;if(o.startsWith(`${n}/`)||n.startsWith(`${o}/`))return!1;return Z(o)!==n}function le(e,t,o){let n=e.data.path;return o==="directory"&&i(n)&&pe(n,t)}function N(e,t){let o=t?e:"";if(Q===e&&V===o)return;Q=e,V=o,Me()}function G(e){if(X===e)return;X=e,Me()}function Me(){oe=X&&Q===""?"true":"",de()}async function He(e,t,o){if((await cl([...e],{dir:t})).length===0)return;if(t!==".")dn().expanded.add(t);o()}function jt(e,t){let o=document.createElement("input");o.type="file",o.multiple=!0,o.accept=Vc(),o.addEventListener("change",()=>{if(o.files?.length)He(o.files,e,t)}),o.click()}function St(e,t,o){ze(e),L.set(t,e);let n=[Is({element:e,getInitialData(){return{entryType:o,path:t,type:"file-tree"}},onDragStart(){M=t,de()},onDrop(){M="",N("",!1),de()}}),Ae(e,o==="directory"?t:Z(t),(r)=>{N(r?t:"",r)}),ia({canDrop({source:r}){return r.data.type==="file-tree"},element:e,getData({source:r}){return le(r,t,o)?{targetDir:t,type:"file-tree-target"}:{type:"file-tree-refused"}},onDrag({source:r}){N(t,le(r,t,o))},onDragEnter({source:r}){N(t,le(r,t,o))},onDragLeave(){N("",!1)},onDrop(){N("",!1)}})];_.set(e,Lo(...n))}function ze(e){let t=_.get(e);if(t)t(),_.delete(e)}function $t(e){if(Y?.element===e)return;We(),H=e;let t=ia({canDrop({source:n}){let r=n.data.path;return n.data.type==="file-tree"&&i(r)&&pe(r,".")},element:e,getData(){return{targetDir:".",type:"file-tree-target"}},onDragEnter(){G(!0)},onDragLeave(){G(!1)},onDrop(){G(!1)}}),o=ra({onDrop({source:n,location:r}){let[a]=r.current.dropTargets;if(!a)return;if(n.data.type!=="file-tree")return;if(a.data.type!=="file-tree-target")return;let s=n.data.path,l=a.data.targetDir;if(!i(s)||!i(l)||!pe(s,l))return;let c=s.split("/").pop(),d=l==="."?c:`${l}/${c}`;Rt(s,d,h)}});Y={cleanup:Lo(t,o,Ae(e,".",G)),element:e},ce()}function We(){Y?.cleanup(),Y=null;for(let e of _.values())e();_.clear(),K?.window.destroy(),K=null,H=null,M="",Q="",V="",X=!1,oe=""}async function Rt(e,t,o){let n=f();Xs(e,t);try{let r=await n.renameFile(e,t);Ia();for(let[l]of b.tabs.entries())if(l===e)sv(e,t,t);else if(l.startsWith(`${e}/`)){let c=t+l.slice(e.length);sv(l,c,c)}let a=Z(e),s=Z(t);if(await _s(a),s!==a)await _s(s);if(s!==".")dn().expanded.add(s);Je(r,t),o(),GE(`Moved to ${t}`,r,t)}catch(r){E.error(`Could not move ${e}.`,{detail:re(r),path:e,source:"Files"})}}function Z(e){let t=e.replaceAll("\\","/"),o=t.lastIndexOf("/");return o===-1?".":t.slice(0,o)}var W=null;function _e(){W?.close(),W=null}function kt(e){let t={};if(e.type==="directory"){let o=Gp(e.path);if(o?.isSourceRoot===!0&&!o.fileBacked)t.name=o.name;return t}if(t.file=e.path,Ea(e.path))t.path=e.path;if(Uw(e.path).length>0)t.source=e.path;return t}function R(e,t,o,n={}){return{destructive:!1,disabled:!1,dividerAbove:!1,id:e,run:o,title:t,...n}}function Et(e){let t=ae();if(!t)return[];let o=kt(e),n=[];for(let r of t.forPlacement("context/file")){let a=r.args;if(!(a?.required??[]).every((c)=>(c in o)))continue;let s={};for(let c of Object.keys(a?.properties??{}))if(c in o)s[c]=o[c];let l=t.disabledReason(r.id);n.push(l===void 0?R(r.id,r.title,()=>{un(t,r.id,s,"Files")}):{destructive:!1,disabled:!0,dividerAbove:!1,id:r.id,requires:l,title:r.title})}return n}function Dt(e){let t=e.type==="directory",o=[];if(t){if(o.push(R("files.newFile","New File…",()=>{Ve(e.path,h)}),R("files.upload","Upload Files…",()=>{jt(e.path,h)})),e.path==="pages"||e.path.endsWith("/pages"))o.push(R("files.pagesGrid","Edit Pages in Grid",()=>{iC()}))}else o.push(R("files.open","Open",()=>{Fr(e.path)}));return o.push(...Et(e),R("files.rename","Rename…",()=>{Mt(e,h)},{dividerAbove:!0}),R("files.delete","Delete",()=>{Ht(e,h)},{destructive:!0})),o}function Ct(e,t,o){let n=ee(e);if(!n)return;_e();let r=De(e);W=Bt({label:"File actions",onClosed:(a)=>{if(W===a)W=null},opener:r,origin:{x:t,y:o},region:"files",rows:Dt({name:n.name,path:n.path,type:n.type})})}var Nt=JSON.stringify({children:[{children:[],tagName:"p"}],tagName:"div"},null,2),k="__other__";function Ee(e){return e.trim().toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d-]/g,"")}function ue(e){let t=e.lastIndexOf(".");return t>0?e.slice(t):""}function It(e){return[...(e.kind==="locked"?[{ext:e.ext,label:`${oa(e.ext)?.name??e.ext} (${e.ext})`}]:be(e.docKind)).map((o)=>({label:o.label,value:o.ext})),{dividerBefore:!0,label:"Other…",value:k}]}function Lt(e,t,o){let n=e.kind==="choose"?e.defaultExt:e.ext;if(n!==void 0&&t.some((a)=>a.value===n))return n;let r=ue(o);if(r!==""&&t.some((a)=>a.value===r))return r;return t[0]?.value??k}async function Gw(e){let{dir:t,format:o,source:n="Files"}=e;await Xt();let r=new Set;try{let w=await f().listDirectory(t);r=new Set(w.map((m)=>m.name.toLowerCase()))}catch{}let a=o!==void 0&&o.kind!=="fixed"?o:null,s=a===null?null:It(a),l=a===null||s===null?"":Lt(a,s,e.suggestedName??""),c=(w,m)=>{let x=w.trim();if(o===void 0||m===k)return x;if(o.kind==="fixed"){let P=Ee(x);return P===""?"":`${P}${o.ext}`}return x.toLowerCase().endsWith(m.toLowerCase())?x:`${x}${m}`},d=xe(),p=(w,m)=>{let x=w.trim();if(!x)return o?.kind==="fixed"?"Enter a name.":"Enter a file name.";if(o?.kind==="fixed"&&Ee(x)==="")return"Enter at least one letter or number.";let P=x.replaceAll("\\","/");if(P.startsWith("/")||P.endsWith("/"))return"Enter a name, not a path that starts or ends with a slash.";if(P.split("/").includes(".."))return"A name cannot step outside the destination folder.";if(P.includes("/")&&o!==void 0&&m!==k)return`Pick Other… to create a file in a subfolder of ${t==="."?"the project root":t}.`;let S=ue(P);if(m!==""&&m!==k&&S!==""&&S.toLowerCase()!==m.toLowerCase()&&d.has(S.toLowerCase()))return`You picked ${s?.find((Ke)=>Ke.value===m)?.label??m}; this name ends in ${S}.`;if(o?.kind==="locked"&&m===k){if(S!==""&&S.toLowerCase()!==o.ext.toLowerCase()&&d.has(S.toLowerCase()))return o.because}let ye=c(w,m);return r.has(ye.toLowerCase())?`${ye} already exists in ${t}/.`:""},j=l,g={confirmLabel:"Create",message:t==="."?"Creating in the project root.":`Creating in ${t}/`,select:s===null?"stem":"all",validate:p,value:e.suggestedName??"untitled.json"};if(s!==null)g.choice={initial:l,label:"Format",onChange:(w)=>{j=w},options:()=>s};if(e.suggestedName!==void 0)g.placeholder=e.suggestedName;let ge=await Hn(e.title??"New File",g);if(!ge)return null;let D=c(ge,j),C=t==="."?D:`${t}/${D}`;Xs(C);let ve=rn(D),Be=te(e.content)?await e.content(ue(D),D):e.content,Ue=o!==void 0&&j!==k,qe=Be??ve?.studio?.newFileTemplate??(ve?"":D.toLowerCase().endsWith(".json")?Ue?Nt:`{}
|
|
2
|
-
`:"");try{return await f().writeFile(C,qe),await _s(t),E.success(`Created ${C}`),C}catch(w){return E.error(`Could not create ${C}.`,{detail:re(w),path:C,source:n}),null}}async function Ve(e,t){await Xt();let o=Gp(e);if(o?.unresolvedFormat!=null)E.error(`New files in ${e}/ cannot be constrained to the collection's format.`,{detail:`The "${o.name}" content type declares format "${o.unresolvedFormat}", which no installed extension provides. Install the extension that supplies it, or correct `+"the name in Project Settings › Content Types.",path:e,source:"Files"});let n=o?.ext!=null&&o.unresolvedFormat===null,r=n&&o.isSourceRoot&&o.def.schema!==void 0,a;if(r){let{createEntry:s}=await (we("may24cpt"),import("./entry-commands-may24cpt.js"));a=await s(o.name,{dir:e})}else a=await Gw({dir:e,format:n&&o.ext!==null?{because:`${o.name} entries are ${o.ext} files, so a document of another format here would not be one.`,ext:o.ext,kind:"locked"}:{defaultExt:".json",kind:"choose"},suggestedName:"untitled"});if(a!==null)t()}async function Ot(e,t){let o=await Tm(t),n={confirmLabel:"Rename",select:"stem",validate:(r)=>r.trim()?"":"Enter a file name.",value:e};if(o!==void 0)n.message=o;return Hn("Rename",n)}function At(e,t){let o=t.references,n=t.tag?`; tag → <${t.tag.to}> (${t.tag.refsUpdated})`:"";if(o&&o.refsUpdated>0)return`Renamed to ${e}; updated ${o.refsUpdated} reference(s) in ${o.filesChanged} file(s)${n}`;if(n)return`Renamed to ${e}${n}`;return`Renamed to ${e}`}function GE(e,t,o){let n=t.errors??[];if(n.length===0){E.success(e);return}let r=n.length===1?"1 file":`${n.length} files`;E.warn(`${e} — references in ${r} could not be updated`,{detail:n.map((a)=>`${a.path}: ${a.error}`).join(`
|
|
3
|
-
`),path:o,source:"Files"})}function Je(e,t){for(let o of e.references?.files??[])if(o.path!==t&&b.tabs.has(o.path))Sp(o.path)}function fe(e){let t=e.replaceAll("\\","/");return t.includes("/")?t.slice(0,t.lastIndexOf("/")):"."}async function jI(e,t,o){Ia();let n=fe(e),r=fe(t);if(await _s(n),r!==n)await _s(r);if(dn().selectedPath===e)dn().selectedPath=t;Je(o,t)}async function Mt(e,t){let o=await Ot(e.name,e.path);if(!o||o===e.name)return;let n=fe(e.path),r=n==="."?o:`${n}/${o}`;Xs(e.path,r);try{let s=await f().renameFile(e.path,r);if(b.tabs.has(e.path))sv(e.path,r,r);await jI(e.path,r,s),t(),GE(At(o,s),s,r)}catch(a){E.error(`Could not rename ${e.name}.`,{detail:re(a),path:e.path,source:"Files"})}}async function Ht(e,t){if(!await Em(e))return;try{let n=f();Xs(e.path),await n.deleteFile(e.path),Ia();let r=e.path.replaceAll("\\","/"),a=r.includes("/")?r.slice(0,r.lastIndexOf("/")):".";if(await _s(a),dn().selectedPath===e.path)dn().selectedPath=null;t(),E.success(`Deleted ${e.name}`)}catch(n){E.error(`Could not delete ${e.name}.`,{detail:re(n),path:e.path,source:"Files"})}}function zt(e,t){let o=t.paneId,n=fh(e);if(o!==void 0&&n){if(n.activeTabId===e&&t.focus===!1)return;tg(e,o)}bi(e,{focus:t.focus!==!1})}async function Fr(e,t={}){let o=t.focus!==!1;for(let[r,a]of b.tabs.entries())if(a.documentPath===e){if(zt(r,t),o)dn().selectedPath=e;return}if(Qw(e)){if(QE(e,t),o)dn().selectedPath=e;fm({name:e.split("/").pop()||e,path:e,root:dn().projectRoot});return}if(e.toLowerCase().endsWith(".csv")){try{if(await yT(e,t),o)dn().selectedPath=e;fm({name:e.split("/").pop()||e,path:e,root:dn().projectRoot})}catch(r){E.error(`Could not open ${e}.`,{detail:re(r),path:e,source:"Open File"})}return}let n=f();try{let r=await n.readFile(e);if(!r){if(await Xt(),!rn(e)&&!e.toLowerCase().endsWith(".json"))throw af(e);return}await Xt();let a,s,l=null,c=rn(e);if(c){let p=await Vo(e,r);({document:a}=p),{frontmatter:s}=p}else if(e.endsWith(".json"))({document:a,layout:l}=Ts(r));else throw af(e);if(zr({id:e,documentPath:e,document:a,...s!=null&&{frontmatter:s},layout:l,sourceFormat:c?.name??null,...t.paneId!==void 0&&{paneId:t.paneId},...t.preview===!0&&{preview:!0},...t.focus===!1&&{focus:!1}}),o)dn().selectedPath=e;fm({name:e.split("/").pop()||e,path:e,root:dn().projectRoot})}catch(r){E.error(`Could not open ${e}.`,{detail:re(r),path:e,source:"Open File"})}}async function Jw(e,t){await Fr(t,{focus:!1,paneId:e,preview:!0})}function OS(e){if(Ym(e))return;for(let[,t]of b.tabs.entries())if(t.documentPath===e&&!t.doc.dirty){Sp(e);return}}function AS(e){for(let t of e)Sp(t,{onlyIfChanged:!0})}async function Sp(e,t={}){for(let[,o]of b.tabs.entries())if(o.documentPath===e){let n=f(),r=o.doc.dirty,a=()=>!r&&o.doc.dirty||Ym(e);try{let s=await n.readFile(e);if(!s)return;if(await Xt(),a())return;if(rn(e)){let{document:l,frontmatter:c}=await Vo(e,s);if(a())return;if(t.onlyIfChanged&&Ss(l,o.doc.document)&&Ss(c,o.doc.content.frontmatter))return;o.doc.document=l,o.doc.content.frontmatter=c}else if(e.endsWith(".json")){let l=Ts(s);if(o.doc.layout=l.layout,t.onlyIfChanged&&Ss(l.document,o.doc.document))return;o.doc.document=l.document}o.doc.dirty=!1}catch(s){E.error(`Could not reload ${e} after it changed on disk.`,{detail:re(s),key:`reload:${e}`,path:e,source:"Files"})}return}}function PS(){Xn({id:"files",title:"Files",level:"project",dock:"navigator",icon:"folder",render:()=>mt,afterRender:(e,t)=>{_t(t,e.rerender)}})}var Wt={activate:yt,contextMenu:Ct,expand:bt,move:xt,newFile:()=>{Ve(".",h)},openProject:()=>{fl("project.open",void 0,"Files")},refresh:()=>{vt()},rowHost:St,search:(e)=>{dn().searchQuery=e,h()},select:Ie,toggleIgnored:()=>{lt(!he()),h()},treeHost:$t,typeahead:Pt},y=null,F=null;function _t(e,t){let o=e.querySelector(".panel-content")??e;if(Te=t,y&&(y.host!==o||!y.handle.connected()))Vt();let n=wt();if(y)y.handle.update(n);else{let r=ke(o,n,Wt);y={handle:r,host:o},r.ready.then(ce)}queueMicrotask(ce)}function Vt(){_e(),y?.handle.dispose(),y=null,F=null,We(),L.clear(),u=[]}
|
|
4
|
-
export{pm,Uw,zE,UE,Nb,Ob,qw,qE,KE,fm,_s,mm,IS,DS,NS,Kw,gm,Gw,GE,jI,Fr,Jw,OS,AS,Sp,PS};
|
|
5
|
-
|
|
6
|
-
//# debugId=6D4C57B77AEB479064756E2164756E21
|
|
7
|
-
//# sourceMappingURL=studio-y04qtxvp.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{ee,T}from"./studio-cffqvnzd.js";function p(t){return JSON.parse(JSON.stringify(t))}function Te(t){return t===void 0||t===null?t:p(t)}function ne(t,e){let n=t;for(let r of e){if(n==null)return;n=n[r]}return n}function sg(t){if(Array.isArray(t))throw TypeError("Cannot insert into a children array; parentPath must point at a node");if(!t.children)t.children=[];if(!Array.isArray(t.children))throw TypeError("Cannot insert into mapped-array children; edit the map template instead");return t.children}function ag(t,e){let{op:n}=e;switch(e.op){case"set-key":{let r=ne(t,e.path);if(!r)throw Error(`doc-op-node-not-found:${e.path.join("/")}`);if(e.value===void 0)delete r[e.key];else r[e.key]=Te(e.value);return}case"insert-child":{i(t,e.parentPath).splice(e.index,0,Te(e.node));return}case"remove-child":{i(t,e.parentPath).splice(e.index,1);return}case"set-child":{i(t,e.parentPath).splice(e.index,1,Te(e.node));return}case"move-child":{x(e);let r=i(t,e.fromParentPath),o=i(t,e.toParentPath),[a]=r.splice(e.fromIndex,1);o.splice(e.toIndex,0,a);return}default:break}throw Error(`unknown-doc-op:${n}`)}function i(t,e){let n=ne(t,e);if(n==null)throw TypeError(`doc-op-node-not-found:${e.join("/")}`);return sg(n)}function h(t,e,n,r,o){let a=t.length,m=a<e.length&&t.every((J,b)=>J===e[b]),d=e[a+1];if(!m||e[a]!=="children"||!ee(d))return e;if(o?d<n:d<=n)return e;let c=[...e];return c[a+1]=d+r,c}function x(t){let e=[...t.fromParentPath,"children",t.fromIndex],n=t.toParentPath;if(n.length>=e.length&&e.every((r,o)=>r===n[o]))throw Error(`doc-op-move-into-self:${n.join("/")}`)}function u(t,e){return t<0?Math.max(e+t,0):Math.min(t,e)}function K1(t,e){let{op:n}=e;switch(e.op){case"set-key":{let r=ne(t,e.path);if(!r)throw Error(`doc-op-node-not-found:${e.path.join("/")}`);let o=Te(r[e.key]);return o===void 0?{key:e.key,op:"set-key",path:e.path}:{key:e.key,op:"set-key",path:e.path,value:o}}case"insert-child":{let{length:r}=l(t,e.parentPath);return{index:u(e.index,r),op:"remove-child",parentPath:e.parentPath}}case"remove-child":{let r=s(t,e.parentPath,e.index);return{index:e.index,node:r,op:"insert-child",parentPath:e.parentPath}}case"set-child":{let r=s(t,e.parentPath,e.index);return{index:e.index,node:r,op:"set-child",parentPath:e.parentPath}}case"move-child":{x(e);let r=f(t,e.fromParentPath);P(r,e.fromParentPath,e.fromIndex);let o=l(t,e.toParentPath),a=u(e.toIndex,o.length-(o===r?1:0));return{fromIndex:a,fromParentPath:h(e.fromParentPath,e.toParentPath,e.fromIndex,-1,!1),op:"move-child",toIndex:e.fromIndex,toParentPath:h(e.toParentPath,e.fromParentPath,a,1,!0)}}default:break}throw Error(`unknown-doc-op:${n}`)}function f(t,e){let n=ne(t,e);return n&&Array.isArray(n.children)?n.children:null}function P(t,e,n){if(!t||n<0||n>=t.length)throw Error(`doc-op-node-not-found:${[...e,"children",n].join("/")}`)}function s(t,e,n){let r=f(t,e);return P(r,e,n),Te(r[n])}function l(t,e){let n=ne(t,e);if(!T(n)||Array.isArray(n))throw Error(`doc-op-node-not-found:${e.join("/")}`);if(n.children===void 0)return[];if(!Array.isArray(n.children))throw TypeError(`doc-op-mapped-children:${e.join("/")}`);return n.children}
|
|
2
|
-
export{Te,ne,sg,ag,K1};
|
|
3
|
-
|
|
4
|
-
//# debugId=E94808DD50218A1264756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-y21g8zzg.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{ue}from"./studio-a3g98wjr.js";var it=ue(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)sr(r,t[s]),r.push(e[++s]);return new Y(r)}Br._=Gr;var rr=new Y("+");function Jr(e,...t){let r=[ot(e[0])],s=0;while(s<t.length)r.push(rr),sr(r,t[s]),r.push(rr,ot(e[++s]));return Na(r),new Y(r)}Br.str=Jr;function sr(e,t){if(t instanceof Y)e.push(...t._items);else if(t instanceof Ve)e.push(t);else e.push(Ia(t))}Br.addCodeArg=sr;function Na(e){let t=1;while(t<e.length-1){if(e[t]===rr){let r=Ra(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Ra(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 qa(e,t){return t.emptyStr()?e:e.emptyStr()?t:Jr`${e}${t}`}Br.strConcat=qa;function Ia(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ot(Array.isArray(e)?e.join(","):e)}function ja(e){return new Y(ot(e))}Br.stringify=ja;function ot(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Br.safeStringify=ot;function Ta(e){return typeof e=="string"&&Br.IDENTIFIER.test(e)?new Y(`.${e}`):Gr`[${e}]`}Br.getProperty=Ta;function Ca(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=Ca;function Da(e){return new Y(e.toString())}Br.regexpCode=Da});var ar=ue(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 or{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=or;class ir 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=ir;var Wa=T._`\n`;class Zr extends or{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Wa:T.nil}}get(){return this._scope}name(e){return new ir(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 Mt=ue(function(L){Object.defineProperty(L,"__esModule",{value:!0});L.or=L.and=L.not=L.CodeGen=L.operators=L.varKinds=L.ValueScopeName=L.ValueScope=L.Scope=L.Name=L.regexpCode=L.stringify=L.getProperty=L.nil=L.strConcat=L.str=L._=void 0;var w=it(),A=ar(),ye=it();Object.defineProperty(L,"_",{enumerable:!0,get:function(){return ye._}});Object.defineProperty(L,"str",{enumerable:!0,get:function(){return ye.str}});Object.defineProperty(L,"strConcat",{enumerable:!0,get:function(){return ye.strConcat}});Object.defineProperty(L,"nil",{enumerable:!0,get:function(){return ye.nil}});Object.defineProperty(L,"getProperty",{enumerable:!0,get:function(){return ye.getProperty}});Object.defineProperty(L,"stringify",{enumerable:!0,get:function(){return ye.stringify}});Object.defineProperty(L,"regexpCode",{enumerable:!0,get:function(){return ye.regexpCode}});Object.defineProperty(L,"Name",{enumerable:!0,get:function(){return ye.Name}});var Et=ar();Object.defineProperty(L,"Scope",{enumerable:!0,get:function(){return Et.Scope}});Object.defineProperty(L,"ValueScope",{enumerable:!0,get:function(){return Et.ValueScope}});Object.defineProperty(L,"ValueScopeName",{enumerable:!0,get:function(){return Et.ValueScopeName}});Object.defineProperty(L,"varKinds",{enumerable:!0,get:function(){return Et.varKinds}});L.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 lr 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 lr{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;Ya(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 pe 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 pe?t:t.nodes;if(this.nodes.length)return this;return new pe(ds(e),t instanceof pe?[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}}pe.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 cr 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 lr(e,t,r))}add(e,t){return this._leafNode(new ts(e,L.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 pe(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 pe(e))}else(){return this._elseNode(new at)}endIf(){return this._endBlockNode(pe,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 cr("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 cr("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 pe))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}}L.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 Ya(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._`!${ur(e)}`}L.not=ds;var ec=fs(L.operators.AND);function tc(...e){return e.reduce(ec)}L.and=tc;var rc=fs(L.operators.OR);function sc(...e){return e.reduce(rc)}L.or=sc;function fs(e){return(t,r)=>t===w.nil?r:r===w.nil?t:w._`${ur(t)} ${e} ${ur(r)}`}function ur(e){return e instanceof w.Name?e:w._`(${e})`}});var cn=ue(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=Mt(),ys=it();function ac(e){let t={};for(let r of e)t[r]=!0;return t}Es.toHash=ac;function cc(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=cc;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 uc(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=uc;function lc({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=lc;function dc(e){return $s(decodeURIComponent(e))}Es.unescapeFragment=dc;function fc(e){return encodeURIComponent(fr(e))}Es.escapeFragment=fc;function fr(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Es.escapeJsonPointer=fr;function $s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Es.unescapeJsonPointer=$s;function hc(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Es.eachItem=hc;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} || {}`),hr(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)hr(e,r,t);return r}Es.evaluatedPropsToName=vs;function hr(e,t,r){Object.keys(r).forEach((s)=>e.assign(b._`${t}${b.getProperty(s)}`,!0))}Es.setEvaluated=hr;var ms={};function pc(e,t){return e.scopeValue("func",{ref:t,code:ms[t.code]||(ms[t.code]=new ys._Code(t.code))})}Es.useFunc=pc;var dr;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(dr||(Es.Type=dr={}));function mc(e,t,r){if(e instanceof b.Name){let s=t===dr.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():"/"+fr(e)}Es.getErrorPath=mc;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 Wl=ue(function(Ss){Object.defineProperty(Ss,"__esModule",{value:!0});var q=Mt(),jc={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=jc});var ct=ue(function(ks){Object.defineProperty(ks,"__esModule",{value:!0});ks.extendErrors=ks.resetErrorsCount=ks.reportExtraError=ks.reportError=ks.keyword$DataError=ks.keywordError=void 0;var E=Mt(),$e=cn(),H=Wl();ks.keywordError={message:({keyword:e})=>E.str`must pass "${e}" keyword validation`};ks.keyword$DataError={message:({keyword:e,schemaType:t})=>t?E.str`"${e}" keyword must be ${t} ($data)`:E.str`"${e}" keyword is invalid ($data)`};function Cc(e,t=ks.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}]`)}ks.reportError=Cc;function Dc(e,t=ks.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,H.default.vErrors)}ks.reportExtraError=Dc;function Ac(e,t){e.assign(H.default.errors,t),e.if(E._`${H.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(E._`${H.default.vErrors}.length`,t),()=>e.assign(H.default.vErrors,null)))}ks.resetErrorsCount=Ac;function Mc({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,H.default.errors,(a)=>{if(e.const(i,E._`${H.default.vErrors}[${a}]`),e.if(E._`${i}.instancePath === undefined`,()=>e.assign(E._`${i}.instancePath`,E.strConcat(H.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)})}ks.extendErrors=Mc;function Ps(e,t){let r=e.const("err",t);e.if(E._`${H.default.vErrors} === null`,()=>e.assign(H.default.vErrors,E._`[${r}]`),E._`${H.default.vErrors}.push(${r})`),e.code(E._`${H.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 Ce={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 Fc(e,t,r)}function Fc(e,t,r={}){let{gen:s,it:n}=e,o=[Vc(n,r),zc(e,r)];return Uc(e,t,o),s.object(...o)}function Vc({errorPath:e},{instancePath:t}){let r=t?E.str`${e}${$e.getErrorPath(t,$e.Type.Str)}`:e;return[H.default.instancePath,E.strConcat(H.default.instancePath,r)]}function zc({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[Ce.schemaPath,n]}function Uc(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([Ce.keyword,n],[Ce.params,typeof t=="function"?t(e):t||E._`{}`]),c.messages)s.push([Ce.message,typeof r=="function"?r(e):r]);if(c.verbose)s.push([Ce.schema,i],[Ce.parentSchema,E._`${l}${f}`],[H.default.data,o]);if(u)s.push([Ce.propertyName,u])}});var Cs=ue(function(js){Object.defineProperty(js,"__esModule",{value:!0});js.boolOrEmptySchema=js.topBoolOrEmptySchema=void 0;var Rs=ct(),qs=Mt(),Jc=Wl(),Bc={message:"boolean schema is false"};function Wc(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(Jc.default.data);else t.assign(qs._`${s}.errors`,null),t.return(!0)}js.topBoolOrEmptySchema=Wc;function Qc(e,t){let{gen:r,schema:s}=e;if(s===!1)r.var(t,!1),Is(e);else r.var(t,!0)}js.boolOrEmptySchema=Qc;function Is(e,t){let{gen:r,data:s}=e;Rs.reportError({gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},Bc,void 0,t)}});var mr=ue(function(Ds){Object.defineProperty(Ds,"__esModule",{value:!0});Ds.getRules=Ds.isJSONType=void 0;var Xc=["string","number","integer","boolean","null","object","array"],Yc=new Set(Xc);function eu(e){return typeof e=="string"&&Yc.has(e)}Ds.isJSONType=eu;function tu(){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:{}}}Ds.getRules=tu});var yr=ue(function(Vs){Object.defineProperty(Vs,"__esModule",{value:!0});Vs.shouldUseRule=Vs.shouldUseGroup=Vs.schemaHasRulesForType=void 0;function su({schema:e,self:t},r){let s=t.RULES.types[r];return s&&s!==!0&&Ms(e,s)}Vs.schemaHasRulesForType=su;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=ue(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=mr(),Ks=yr(),Hs=ct(),_=Mt(),Pt=cn(),Ke;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ke||(Js.DataType=Ke={}));function iu(e){let t=Ls(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=iu;function Ls(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=Ls;function au(e,t){let{gen:r,data:s,opts:n}=e,o=cu(t,n.coerceTypes),i=t.length>0&&!(o.length===0&&t.length===1&&Ks.schemaHasRulesForType(e,t[0]));if(i){let a=gr(t,s,n.strictNumbers,Ke.Wrong);r.if(a,()=>{if(o.length)uu(e,t,o);else $r(e)})}return i}Js.coerceAndCheckDataType=au;var Gs=new Set(["string","number","integer","boolean","null"]);function cu(e,t){return t?e.filter((r)=>Gs.has(r)||t==="array"&&r==="array"):[]}function uu(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(gr(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(),$r(e),s.endIf(),s.if(_._`${a} !== undefined`,()=>{s.assign(n,a),lu(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 lu({gen:e,parentData:t,parentDataProperty:r},s){e.if(_._`${t} !== undefined`,()=>e.assign(_._`${t}[${r}]`,s))}function _r(e,t,r,s=Ke.Correct){let n=s===Ke.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===Ke.Correct?o:_.not(o);function i(a=_.nil){return _.and(_._`typeof ${t} == "number"`,a,r?_._`isFinite(${t})`:_.nil)}}Js.checkDataType=_r;function gr(e,t,r,s){if(e.length===1)return _r(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,_r(i,t,r,s));return n}Js.checkDataTypes=gr;var du={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?_._`{type: ${e}}`:_._`{type: ${t}}`};function $r(e){let t=fu(e);Hs.reportError(t,du)}Js.reportTypeError=$r;function fu(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=ue(function(Zs){Object.defineProperty(Zs,"__esModule",{value:!0});Zs.assignDefaults=void 0;var W=Mt(),Qs=cn();function $u(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=$u;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=ue(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=Mt(),He=cn(),ve=Wl(),en=cn();function vu(e,t){let{gen:r,data:s,it:n}=e;r.if(wr(r,s,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:S._`${t}`},!0),e.error()})}sn.checkReportMissingProp=vu;function wu({gen:e,data:t,it:{opts:r}},s,n){return S.or(...s.map((o)=>S.and(wr(e,t,o,r.ownProperties),S._`${n} = ${o}`)))}sn.checkMissingProp=wu;function Eu(e,t){e.setParams({missingProperty:t},!0),e.error()}sn.reportMissingProp=Eu;function tn(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:S._`Object.prototype.hasOwnProperty`})}sn.hasPropFunc=tn;function vr(e,t,r){return S._`${tn(e)}.call(${t}, ${r})`}sn.isOwnProperty=vr;function bu(e,t,r,s){let n=S._`${t}${S.getProperty(r)} !== undefined`;return s?S._`${n} && ${vr(e,t,r)}`:n}sn.propertyInData=bu;function wr(e,t,r,s){let n=S._`${t}${S.getProperty(r)} === undefined`;return s?S.or(n,S.not(vr(e,t,r))):n}sn.noPropertyInData=wr;function rn(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}sn.allSchemaProperties=rn;function Su(e,t){return rn(t).filter((r)=>!He.alwaysValidSchema(e,t[r]))}sn.schemaProperties=Su;function Pu({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 g=S._`${l}, ${r.object(...f)}`;return c!==S.nil?S._`${a}.call(${c}, ${g})`:S._`${a}(${g})`}sn.callValidateCode=Pu;var xu=S._`new RegExp`;function Ou({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"?xu:en.useFunc(e,n)}(${r}, ${s})`})}sn.usePattern=Ou;function ku(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:He.Type.Num},o),t.if(S.not(o),a)})}}sn.validateArray=ku;function Nu(e){let{gen:t,schema:r,keyword:s,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>He.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=Nu});var hn=ue(function(dn){Object.defineProperty(dn,"__esModule",{value:!0});dn.validateKeywordUsage=dn.validSchemaType=dn.funcKeywordCode=dn.macroKeywordCode=void 0;var I=Mt(),De=Wl(),an=Q(),un=ct();function Uu(e,t){let{gen:r,keyword:s,schema:n,parentSchema:o,it:i}=e,a=t.macro.call(i.self,n,o,i),c=ln(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))}dn.macroKeywordCode=Uu;function Ku(e,t){var r;let{gen:s,keyword:n,schema:o,parentSchema:i,$data:a,it:c}=e;Lu(c,t);let u=!a&&t.compile?t.compile.call(c.self,o,i,c):t.validate,l=ln(s,n,u),f=s.let("valid");e.block$data(f,g),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function g(){if(t.errors===!1){if(h(),t.modifying)on(e);m(()=>e.error())}else{let v=t.async?y():p();if(t.modifying)on(e);m(()=>Hu(e,v))}}function y(){let v=s.let("ruleErrs",null);return s.try(()=>h(I._`await `),(x)=>s.assign(f,!1).if(I._`${x} instanceof ${c.ValidationError}`,()=>s.assign(v,I._`${x}.errors`),()=>s.throw(x))),v}function p(){let v=I._`${l}.errors`;return s.assign(v,null),h(I.nil),v}function h(v=t.async?I._`await `:I.nil){let x=c.opts.passContext?De.default.this:De.default.self,O=!(("compile"in t)&&!a||t.schema===!1);s.assign(f,I._`${v}${an.callValidateCode(e,l,x,O)}`,t.modifying)}function m(v){var x;s.if(I.not((x=t.valid)!==null&&x!==void 0?x:f),v)}}dn.funcKeywordCode=Ku;function on(e){let{gen:t,data:r,it:s}=e;t.if(s.parentData,()=>t.assign(r,I._`${s.parentData}[${s.parentDataProperty}]`))}function Hu(e,t){let{gen:r}=e;r.if(I._`Array.isArray(${t})`,()=>{r.assign(De.default.vErrors,I._`${De.default.vErrors} === null ? ${t} : ${De.default.vErrors}.concat(${t})`).assign(De.default.errors,I._`${De.default.vErrors}.length`),un.extendErrors(e)},()=>e.error())}function Lu({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function ln(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 Gu(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")}dn.validSchemaType=Gu;function Ju({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)}}}dn.validateKeywordUsage=Ju});var yn=ue(function(pn){Object.defineProperty(pn,"__esModule",{value:!0});pn.extendSubschemaMode=pn.extendSubschemaData=pn.getSubschema=void 0;var z=Mt(),xt=cn();function Zu(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')}pn.getSubschema=Zu;function Xu(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,g=a.let("data",z._`${t.data}${z.getProperty(r)}`,!0);c(g),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]}}pn.extendSubschemaData=Xu;function Yu(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}pn.extendSubschemaMode=Yu});var Er=ue(function(mm,_n){_n.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 $n=ue(function(ym,gn){var we=gn.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 g=0;g<f.length;g++)Ot(e,t,r,f[g],n+"/"+l+"/"+g,o,n,l,s,g)}else if(l in we.propsKeywords){if(f&&typeof f=="object")for(var y in f)Ot(e,t,r,f[y],n+"/"+l+"/"+rl(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 rl(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var lt=ue(function(Sn){Object.defineProperty(Sn,"__esModule",{value:!0});Sn.getSchemaRefs=Sn.resolveUrl=Sn.normalizeId=Sn._getFullPath=Sn.getFullPath=Sn.inlineRef=void 0;var vn=cn(),sl=Er(),nl=$n(),ol=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function il(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!br(e);if(!t)return!1;return wn(e)<=t}Sn.inlineRef=il;var al=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function br(e){for(let t in e){if(al.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(br))return!0;if(typeof r=="object"&&br(r))return!0}return!1}function wn(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,ol.has(r))continue;if(typeof e[r]=="object")vn.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=Le(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 cl=/#\/?$/;function Le(e){return e?e.replace(cl,""):""}Sn.normalizeId=Le;function ul(e,t,r){return r=Le(r),e.resolve(t,r)}Sn.resolveUrl=ul;var ll=/^[a-z_][-a-z0-9._]*$/i;function dl(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=Le(e[r]||t),o={"":n},i=En(s,n,!1),a={},c=new Set;return nl(e,{allKeys:!0},(f,g,y,p)=>{if(p===void 0)return;let h=i+g,m=o[p];if(typeof f[r]=="string")m=v.call(this,f[r]);x.call(this,f.$anchor),x.call(this,f.$dynamicAnchor),o[g]=m;function v(O){let j=this.opts.uriResolver.resolve;if(O=Le(m?j(m,O):O),c.has(O))throw l(O);c.add(O);let k=this.refs[O];if(typeof k=="string")k=this.refs[k];if(typeof k=="object")u(f,k.schema,O);else if(O!==Le(h))if(O[0]==="#")u(f,a[O],O),a[O]=f;else this.refs[O]=h;return O}function x(O){if(typeof O=="string"){if(!ll.test(O))throw Error(`invalid anchor "${O}"`);v.call(this,`#${O}`)}}}),a;function u(f,g,y){if(g!==void 0&&!sl(f,g))throw l(y)}function l(f){return Error(`reference "${f}" resolves to more than one schema`)}}Sn.getSchemaRefs=dl});var Xf=ue(function(Vn){Object.defineProperty(Vn,"__esModule",{value:!0});Vn.getData=Vn.KeywordCxt=Vn.validateFunctionCode=void 0;var Nt=Cs(),kt=ut(),Je=yr(),Ee=ut(),Nn=Ys(),re=hn(),Ge=yn(),d=Mt(),P=Wl(),Rn=lt(),U=cn(),te=ct();function _l(e){if(jn(e)){if(Tn(e),In(e)){vl(e);return}}qn(e,()=>Nt.topBoolOrEmptySchema(e))}Vn.validateFunctionCode=_l;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)}`),$l(e,n),e.code(o)});else e.func(t,d._`${P.default.data}, ${gl(n)}`,s.$async,()=>e.code(xn(r,n)).code(o))}function gl(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 $l(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 vl(e){let{schema:t,opts:r,gen:s}=e;qn(e,()=>{if(r.$comment&&t.$comment)Dn(e);if(Pl(e),s.let(P.default.vErrors,null),s.let(P.default.errors,0),r.unevaluated)wl(e);Cn(e),kl(e)});return}function wl(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 El(e,t){if(jn(e)){if(Tn(e),In(e)){bl(e,t);return}}Nt.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 bl(e,t){let{schema:r,gen:s,opts:n}=e;if(n.$comment&&r.$comment)Dn(e);xl(e),Ol(e);let o=s.const("_errs",P.default.errors);Cn(e,o),s.var(t,d._`${o} === ${P.default.errors}`)}function Tn(e){U.checkUnknownRules(e),Sl(e)}function Cn(e,t){if(e.opts.jtd)return On(e,[],!1,t);let r=kt.getSchemaTypes(e.schema),s=kt.coerceAndCheckDataType(e,r);On(e,r,!s,t)}function Sl(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 Pl(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 xl(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=Rn.resolveUrl(e.opts.uriResolver,e.baseId,t)}function Ol(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function Dn({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 kl(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)Nl(e);t.return(d._`${P.default.errors} === 0`)}}function Nl({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)Rl(e,t);n.block(()=>{for(let g of l.rules)f(g);f(l.post)});function f(g){if(!Je.shouldUseGroup(o,g))return;if(g.type){if(n.if(Ee.checkDataType(g.type,i,c.strictNumbers)),kn(e,g),t.length===1&&t[0]===g.type&&r)n.else(),Ee.reportTypeError(e);n.endIf()}else kn(e,g);if(!a)n.if(d._`${P.default.errors} === ${s||0}`)}}function kn(e,t){let{gen:r,schema:s,opts:{useDefaults:n}}=e;if(n)Nn.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 Rl(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(ql(e,t),!e.opts.allowUnionTypes)Il(e,t);jl(e,e.dataTypes)}function ql(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!An(e.dataTypes,r))Sr(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Cl(e,t)}function Il(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))Sr(e,"use allowUnionTypes to allow union type keyword")}function jl(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)=>Tl(t,i)))Sr(e,`missing type "${o.join(",")}" for keyword "${s}"`)}}}function Tl(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 Cl(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 Sr(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,U.checkStrictMode(e,t,e.opts.strictTypes)}class Pr{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 El(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=Pr;function Mn(e,t,r,s){let n=new Pr(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 Dl=/^\/(?:[^~]|~0|~1)*$/,Al=/^([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(!Dl.test(e))throw Error(`Invalid JSON-pointer: ${e}`);n=e,o=P.default.rootData}else{let u=Al.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 gb=ue(function(Kn){Object.defineProperty(Kn,"__esModule",{value:!0});class Un extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}Kn.default=Un});var Qf=ue(function(Ln){Object.defineProperty(Ln,"__esModule",{value:!0});var Be=lt();class Hn 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))}}Ln.default=Hn});var ww=ue(function(Bn){Object.defineProperty(Bn,"__esModule",{value:!0});Bn.resolveSchema=Bn.getCompilingSchema=Bn.resolveRef=Bn.compileSchema=Bn.SchemaEnv=void 0;var M=Mt(),Ul=gb(),Ae=Wl(),F=lt(),Rt=cn(),Gn=Xf();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 Or(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:Ul.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=Or;function Kl(e,t,r){var s;r=F.resolveUrl(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let o=Gl.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]=Hl.call(this,o)}Bn.resolveRef=Kl;function Hl(e){if(F.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:Or.call(this,e)}function Jn(e){for(let t of this._compilations)if(Ll(t,e))return t}Bn.getCompilingSchema=Jn;function Ll(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Gl(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 xr.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 xr.call(this,r,a)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)Or.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 xr.call(this,r,i)}Bn.resolveSchema=qt;var Jl=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function xr(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[Rt.unescapeFragment(a)];if(c===void 0)return;r=c;let u=typeof r==="object"&&r[this.opts.schemaId];if(!Jl.has(a)&&u)t=F.resolveUrl(this.opts.uriResolver,t,u)}let o;if(typeof r!="boolean"&&r.$ref&&!Rt.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=ue(function(Em,Yl){Yl.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 jr=ue(function(bm,so){var ed=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),td=RegExp.prototype.test.bind(/^\d*$/u),Me=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Rr=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Xn=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),qr=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),rd=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 K(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 sd(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 nd=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),od=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),id=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),ad=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function cd(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(id(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 ud(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(!nd(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&&od(s))return s=s.toLowerCase(),{host:`[${s}]`,escapedHost:s,isIPV6:!1,isIPVFuture:!0};if(ld(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),!cd(n))return{host:e,isIPV6:!1,error:!0};s=s.slice(0,o)}let i=ud(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 ld(e,t){let r=0;for(let s=0;s<e.length;s++)if(e[s]===t)r++;return r}function dd(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("")}var fd={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},hd=/[@/?#:]/g,pd=/[@/?#]/g;function Yn(e,t){let r=t?pd:hd;return r.lastIndex=0,e.replace(r,(s)=>fd[s])}function eo(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&&Rr(i))r+=i;else r+="%"+o;s+=2;continue}}r+=e[s]}return r}function md(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!=="."&&Rr(i))t+=i;else t+="%"+o;r+=2;continue}}if(Xn(s))t+=s;else{let n=e.charCodeAt(r);if(n<128)t+=ro(n)?s:G[n];else if(n<55296||n>57343)t+=K(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=K(65536+(n-55296<<10)+(o-56320)),r++;else t+=K(65533)}else t+=K(65533)}}return t}function yd(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+=K(i);else if(i<=56319&&n+1<e.length){let a=e.charCodeAt(n+1);if(a>=56320&&a<=57343)r+=K(65536+(i-55296<<10)+(a-56320)),n++;else r+=K(65533)}else r+=K(65533)}}return r}function Ir(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+=K(o);else if(o<=56319&&s+1<e.length){let i=e.charCodeAt(s+1);if(i>=56320&&i<=57343)r+=K(65536+(o-55296<<10)+(i-56320)),s++;else r+=K(65533)}else r+=K(65533)}}return r}function to(e){return Ir(e,rd)}function _d(e){return Ir(e,qr)}function gd(e){return Ir(e,qr)}function ro(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 $d(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(Rr(i))t+=i;else t+="%"+o;r+=2;continue}}if(qr(s))t+=s;else{let n=e.charCodeAt(r);if(n<128)t+=ro(n)?s:G[n];else if(n<55296||n>57343)t+=K(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=K(65536+(n-55296<<10)+(o-56320)),r++;else t+=K(65533)}else t+=K(65533)}}return t}function vd(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 wd(e){let t=[];if(e.userinfo!==void 0)t.push(to(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=eo(r,!0),s=kr(r);if(s.isIPV6===!0||s.isIPVFuture===!0)r=`[${s.escapedHost}]`;else r=Yn(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string"){let r=String(e.port);if(!td(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}so.exports={nonSimpleDomain:ad,recomposeAuthority:wd,reescapeHostDelimiters:Yn,normalizePercentEncoding:eo,normalizePathEncoding:md,serializePathEncoding:yd,normalizeQueryFragmentEncoding:$d,encodeUserinfo:to,encodeQuery:_d,encodeFragment:gd,escapePreservingEscapes:vd,removeDotSegments:dd,isIPv4:Nr,isUUID:ed,normalizeIPv6:kr,stringArrayToHexStripped:sd}});var co=ue(function(Sm,ao){var{isUUID:Ed}=jr(),bd=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,Sd=["http","https","ws","wss","urn","urn:uuid"];function Pd(e){return Sd.indexOf(e)!==-1}function Tr(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 no(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function oo(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 xd(e){return e.secure=Tr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Od(e){if(e.port===(Tr(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 kd(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(bd);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 Nd(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 Rd(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Ed(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function qd(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var io={scheme:"http",domainHost:!0,parse:no,serialize:oo},Id={scheme:"https",domainHost:io.domainHost,parse:no,serialize:oo},It={scheme:"ws",domainHost:!0,parse:xd,serialize:Od},jd={scheme:"wss",domainHost:It.domainHost,parse:It.parse,serialize:It.serialize},Td={scheme:"urn",parse:kd,serialize:Nd,skipNormalize:!0},Cd={scheme:"urn:uuid",parse:Rd,serialize:qd,skipNormalize:!0},jt={http:io,https:Id,ws:It,wss:jd,urn:Td,"urn:uuid":Cd};Object.setPrototypeOf(jt,null);function Cr(e){return e&&(jt[e]||jt[e.toLowerCase()])||void 0}ao.exports={wsIsSecure:Tr,SCHEMES:jt,isValidSchemeName:Pd,getSchemeHandler:Cr}});var wo=ue(function(Pm,Dt){var{normalizeIPv6:po,removeDotSegments:ht,recomposeAuthority:Dd,normalizePercentEncoding:Dr,normalizePathEncoding:Ad,serializePathEncoding:uo,normalizeQueryFragmentEncoding:lo,encodeQuery:Md,encodeFragment:Fd,reescapeHostDelimiters:Vd,isIPv4:mo,nonSimpleDomain:zd}=jr(),{SCHEMES:yo,getSchemeHandler:Ar}=co(),_o=/^[A-Za-z][A-Za-z0-9+.-]*$/u;function fo(e){let t=unescape(String(e));if(!_o.test(t))throw TypeError("URI scheme is malformed.");return t}function Ud(e,t){if(typeof e==="string")e=Qd(e,t);else if(typeof e==="object")e=Ct(Fe(e,t),t);return e}function Kd(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:g,malformedSchemeSpecific:y,malformedHost:p,malformedScheme:h}=Tt(t,s);if(o||f||i||g||a||y||c||p||u||h)throw Error(n.error||l.error||"URI is malformed.");let m=go(n,l,s,!0),v=Ar(r&&r.scheme||m.scheme),x=m.host,O=x!==void 0&&x!==""&&(mo(x)||po(x).isIPV6);$o(m,r||{},v,O);let j=x&&x.indexOf("%")!==-1&&!/\P{ASCII}/u.test(x);if(m.error&&!j)throw Error(m.error);return s.skipEscape=!0,Fe(m,s)}function go(e,t,r,s){let n={};if(!s)e=Ct(Fe(e,r),r),t=Ct(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{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!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=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 Hd(e,t,r){let s=ho(e,r),n=ho(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=fo(r.scheme);let o=Ar(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=!s.skipEscape&&r.scheme===void 0&&!i;if(r.path!==void 0)if(!s.skipEscape)r.path=uo(r.path,a);else r.path=Dr(r.path);if(s.reference!=="suffix"&&r.scheme)r.scheme=fo(r.scheme),n.push(r.scheme,":");let c=Dd(r);if(c!==void 0){if(s.reference!=="suffix")n.push("//");if(n.push(c),r.path&&r.path[0]!=="/")n.push("/")}if(r.path!==void 0){let u=r.path;if(!s.absolutePath&&(!o||!o.absolutePath))u=ht(u);if(a)u=uo(u,!0);if(c===void 0&&u[0]==="/"&&u[1]==="/")u="/%2F"+u.slice(2);n.push(u)}if(r.query!==void 0)n.push("?",Md(r.query));if(r.fragment!==void 0)n.push("#",Fd(r.fragment));return n.join("")}var Ld=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Gd=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Jd=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Bd(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 Mr(e){return e[0]==="["&&e[e.length-1]==="]"}function Wd(e){let t=e[4];return ft(e[3])||t!==void 0&&!Mr(t)&&ft(t)||ft(e[6])||ft(e[7])||ft(e[8])}function $o(e,t,r,s){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!Mr(e.host)&&(t.domainHost||r&&r.domainHost)&&s===!1&&zd(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(n){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}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(Gd);if(f!==null&&f[1].indexOf("\\")!==-1)s.error="URI authority must not contain a literal backslash.",n=!0;let g=e.match(Jd);if(g!==null){let p=g[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(Ld);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){let m=unescape(s.scheme);if(_o.test(m))s.scheme=m.toLowerCase();else s.error=s.error||"URI scheme is malformed.",u=!0}if(o=Wd(y),o)s.error=s.error||"URI contains malformed percent-encoding.";if(isNaN(s.port))s.port=y[5];let p=Bd(s,y);if(p!==void 0)s.error=s.error||p,n=!0;if(s.host)if(mo(s.host)===!1){let v=Mr(s.host),x=s.host.indexOf("[")!==-1||s.host.indexOf("]")!==-1,O=po(s.host);if(l=O.isIPV6||O.isIPVFuture===!0,c=x&&(!v||O.error===!0),s.host=l?O.host:O.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=Ar(r.scheme||s.scheme);if(!c)a=$o(s,r,h,l);if(e.indexOf("%")!==-1&&s.host!==void 0&&!c){let m=l?s.host:Dr(s.host,!0);if(!l)m=Dr(m.toLowerCase());s.host=Vd(m,l)}if(!h||h&&!h.skipNormalize){if(s.path)s.path=Ad(s.path);if(s.query)s.query=lo(s.query);if(s.fragment)s.fragment=lo(s.fragment)}if(h&&h.parse){if(h.parse(s,r),h===yo.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 Ct(e,t){return Tt(e,t).parsed}function Qd(e,t){return vo(e,t).normalized}function vo(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 ho(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}=vo(r,t);return n||o||i||a||c?void 0:s}var Fr={SCHEMES:yo,normalize:Ud,resolve:Kd,resolveComponent:go,equal:Hd,serialize:Fe,parse:Ct};Dt.exports=Fr;Dt.exports.default=Fr;Dt.exports.fastUri=Fr});var So=ue(function(bo){Object.defineProperty(bo,"__esModule",{value:!0});var Eo=wo();Eo.code='require("ajv/dist/runtime/uri").default';bo.default=Eo});var j0=ue(function(me){Object.defineProperty(me,"__esModule",{value:!0});me.CodeGen=me.Name=me.nil=me.stringify=me.str=me._=me.KeywordCxt=void 0;var Xd=Xf();Object.defineProperty(me,"KeywordCxt",{enumerable:!0,get:function(){return Xd.KeywordCxt}});var Qe=Mt();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 Yd=gb(),No=Qf(),Ro=mr(),se=ww(),qo=Mt(),ne=lt(),be=ut(),We=cn(),Po=Qn(),ef=So(),Io=(e,t)=>new RegExp(e,t);Io.code="new RegExp";var tf=["removeAdditional","useDefaults","coerceTypes"],rf=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),sf={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."},nf={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},xo=200;function of(e){var t,r,s,n,o,i,a,c,u,l,f,g,y,p,h,m,v,x,O,j,k,ee,he,Yt,er;let nt=e.strict,tr=(t=e.code)===null||t===void 0?void 0:t.optimize,Hr=tr===!0||tr===void 0?1:tr||0,Lr=(s=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:Io,ka=(n=e.uriResolver)!==null&&n!==void 0?n:ef.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:(g=(f=e.strictTuples)!==null&&f!==void 0?f:nt)!==null&&g!==void 0?g:"log",strictRequired:(p=(y=e.strictRequired)!==null&&y!==void 0?y:nt)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:Hr,regExp:Lr}:{optimize:Hr,regExp:Lr},loopRequired:(h=e.loopRequired)!==null&&h!==void 0?h:xo,loopEnum:(m=e.loopEnum)!==null&&m!==void 0?m:xo,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(x=e.messages)!==null&&x!==void 0?x:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(j=e.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(k=e.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(ee=e.validateSchema)!==null&&ee!==void 0?ee:!0,validateFormats:(he=e.validateFormats)!==null&&he!==void 0?he:!0,unicodeRegExp:(Yt=e.unicodeRegExp)!==null&&Yt!==void 0?Yt:!0,int32range:(er=e.int32range)!==null&&er!==void 0?er:!0,uriResolver:ka}}class At{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,...of(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new qo.ValueScope({scope:{},prefixes:rf,es5:t,lines:r}),this.logger=ff(e.logger);let s=e.validateFormats;if(e.validateFormats=!1,this.RULES=Ro.getRules(),Oo.call(this,sf,e,"NOT SUPPORTED"),Oo.call(this,nf,e,"DEPRECATED","warn"),this._metaOpts=lf.call(this),e.formats)cf.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)uf.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);af.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,s=Po;if(r==="id")s={...Po},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 No.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=ko.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=ko.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(pf.call(this,r,t),!t)return We.eachItem(r,(n)=>Vr.call(this,n)),this;yf.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]=jo(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}}}At.ValidationError=Yd.default;At.MissingRefError=No.default;me.default=At;function Oo(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 ko(e){return e=ne.normalizeId(e),this.schemas[e]||this.refs[e]}function af(){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 cf(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function uf(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 lf(){let e={...this.opts};for(let t of tf)delete e[t];return e}var df={log(){},warn(){},error(){}};function ff(e){if(e===!1)return df;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 hf=/^[a-z_$][a-z0-9_$:-]*$/i;function pf(e,t){let{RULES:r}=this;if(We.eachItem(e,(s)=>{if(r.keywords[s])throw Error(`Keyword ${s} is already defined`);if(!hf.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)mf.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 mf(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 yf(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=jo(t);e.validateSchema=this.compile(t,!0)}var _f={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function jo(e){return{anyOf:[e,_f]}}});var Co=ue(function(To){Object.defineProperty(To,"__esModule",{value:!0});var vf={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};To.default=vf});var H0=ue(function(Ao){Object.defineProperty(Ao,"__esModule",{value:!0});Ao.callRef=Ao.getValidate=void 0;var Ef=Qf(),Vt=Q(),C=Mt(),Ze=Wl(),zt=ww(),Se=cn(),bf={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 Ef.default(s.opts.uriResolver,n,r);if(l instanceof zt.SchemaEnv)return g(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,C._`${p}.validate`,u,u.$async)}function g(p){let h=Do(e,p);Ft(e,h,p,p.$async)}function y(p){let h=t.scopeValue("schema",a.code.source===!0?{ref:p,code:C.stringify(p)}:{ref:p}),m=t.name("valid"),v=e.subschema({schema:p,dataTypes:[],schemaPath:C.nil,topSchemaRef:h,errSchemaPath:r},m);e.mergeEvaluated(v),e.ok(m)}}};function Do(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):C._`${r.scopeValue("wrapper",{ref:t})}.validate`}Ao.getValidate=Do;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:C.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(C._`await ${Vt.callValidateCode(e,t,u)}`),y(t),!i)n.assign(p,!0)},(h)=>{if(n.if(C._`!(${h} instanceof ${o.ValidationError})`,()=>n.throw(h)),g(h),!i)n.assign(p,!1)}),e.ok(p)}function f(){e.result(Vt.callValidateCode(e,t,u),()=>y(t),()=>g(t))}function g(p){let h=C._`${p}.errors`;n.assign(Ze.default.vErrors,C._`${Ze.default.vErrors} === null ? ${h} : ${Ze.default.vErrors}.concat(${h})`),n.assign(Ze.default.errors,C._`${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 v=n.var("props",C._`${p}.evaluated.props`);o.props=Se.mergeEvaluated.props(n,v,o.props,C.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 v=n.var("items",C._`${p}.evaluated.items`);o.items=Se.mergeEvaluated.items(n,v,o.items,C.Name)}}}Ao.callRef=Ft;Ao.default=bf});var B0=ue(function(Fo){Object.defineProperty(Fo,"__esModule",{value:!0});var xf=Co(),Of=H0(),kf=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",xf.default,Of.default];Fo.default=kf});var zo=ue(function(Vo){Object.defineProperty(Vo,"__esModule",{value:!0});var xe=Mt(),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}},Rf={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}}`},qf={keyword:Object.keys(Ut),type:"number",schemaType:"number",$data:!0,error:Rf,code(e){let{keyword:t,data:r,schemaCode:s}=e;e.fail$data(xe._`${r} ${Ut[t].fail} ${s} || isNaN(${r})`)}};Vo.default=qf});var Ko=ue(function(Uo){Object.defineProperty(Uo,"__esModule",{value:!0});var oe=Mt(),jf={message:({schemaCode:e})=>oe.str`must be multiple of ${e}`,params:({schemaCode:e})=>oe._`{multipleOf: ${e}}`},Tf={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:jf,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}))`)}};Uo.default=Tf});var Go=ue(function(Lo){Object.defineProperty(Lo,"__esModule",{value:!0});function Ho(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}Lo.default=Ho;Ho.code='require("ajv/dist/runtime/ucs2length").default'});var Wo=ue(function(Bo){Object.defineProperty(Bo,"__esModule",{value:!0});var J=Mt(),Jo=cn(),Af=Go(),Mf={message({keyword:e,schemaCode:t}){return J.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>J._`{limit: ${e}}`},Ff={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Mf,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._`${Jo.useFunc(e.gen,Af.default)}(${r})`;e.fail$data(J._`${i} ${o} ${s}`)}};Bo.default=Ff});var Yo=ue(function(Xo){Object.defineProperty(Xo,"__esModule",{value:!0});var Qo=Q(),Zo=cn(),Z=Mt(),zf={message:({schemaCode:e})=>Z.str`must match pattern "${e}"`,params:({schemaCode:e})=>Z._`{pattern: ${e}}`},Uf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:zf,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`:Zo.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=Qo.usePattern(e,n);e.fail$data(Z._`!${c}.test(${r})`)}}};Xo.default=Uf});var ti=ue(function(ei){Object.defineProperty(ei,"__esModule",{value:!0});var ie=Mt(),Hf={message({keyword:e,schemaCode:t}){return ie.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>ie._`{limit: ${e}}`},Lf={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Hf,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}`)}};ei.default=Lf});var ni=ue(function(si){Object.defineProperty(si,"__esModule",{value:!0});var ae=Q(),ce=Mt(),ri=cn(),Jf={message:({params:{missingProperty:e}})=>ce.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>ce._`{missingProperty: ${e}}`},Bf={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Jf,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,v=`required property "${h}" is not defined at "${m}" (strictRequired)`;ri.checkStrictMode(i,v,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,()=>g(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 g(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)}}};si.default=Bf});var ii=ue(function(oi){Object.defineProperty(oi,"__esModule",{value:!0});var le=Mt(),Zf={message({keyword:e,schemaCode:t}){return le.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>le._`{limit: ${e}}`},Yf={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Zf,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxItems"?le.operators.GT:le.operators.LT;e.fail$data(le._`${r}.length ${n} ${s}`)}};oi.default=Yf});var Kt=ue(function(ci){Object.defineProperty(ci,"__esModule",{value:!0});var ai=Er();ai.code='require("ajv/dist/runtime/equal").default';ci.default=ai});var di=ue(function(li){Object.defineProperty(li,"__esModule",{value:!0});var Xe=ut(),R=Mt(),ui=cn(),rh=Kt(),sh={message:({params:{i:e,j:t}})=>R.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>R._`{i: ${e}, j: ${t}}`},nh={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:sh,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,R._`${i} === false`),e.ok(c);function l(){let p=t.let("i",R._`${r}.length`),h=t.let("j");e.setParams({i:p,j:h}),t.assign(c,!0),t.if(R._`${p} > 1`,()=>(f()?g:y)(p,h))}function f(){return u.length>0&&!u.some((p)=>p==="object"||p==="array")}function g(p,h){let m=t.name("item"),v=Xe.checkDataTypes(u,m,a.opts.strictNumbers,Xe.DataType.Wrong),x=t.const("indices",R._`{}`);t.for(R._`;${p}--;`,()=>{if(t.let(m,R._`${r}[${p}]`),t.if(v,R._`continue`),u.length>1)t.if(R._`typeof ${m} == "string"`,R._`${m} += "_"`);t.if(R._`typeof ${x}[${m}] == "number"`,()=>{t.assign(h,R._`${x}[${m}]`),e.error(),t.assign(c,!1).break()}).code(R._`${x}[${m}] = ${p}`)})}function y(p,h){let m=ui.useFunc(t,rh.default),v=t.name("outer");t.label(v).for(R._`;${p}--;`,()=>t.for(R._`${h} = ${p}; ${h}--;`,()=>t.if(R._`${m}(${r}[${p}], ${r}[${h}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};li.default=nh});var pi=ue(function(hi){Object.defineProperty(hi,"__esModule",{value:!0});var Ye=Mt(),fi=cn(),ih=Kt(),ah={message:"must be equal to constant",params:({schemaCode:e})=>Ye._`{allowedValue: ${e}}`},ch={keyword:"const",$data:!0,error:ah,code(e){let{gen:t,data:r,$data:s,schemaCode:n,schema:o}=e;if(s||o&&typeof o=="object")e.fail$data(Ye._`!${fi.useFunc(t,ih.default)}(${r}, ${n})`);else e.fail(Ye._`${o} !== ${r}`)}};hi.default=ch});var _i=ue(function(yi){Object.defineProperty(yi,"__esModule",{value:!0});var de=Mt(),mi=cn(),lh=Kt(),dh={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>de._`{allowedValues: ${e}}`},fh={keyword:"enum",schemaType:"array",$data:!0,error:dh,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=mi.useFunc(t,lh.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=de.or(...n.map((p,h)=>g(y,h)))}e.pass(l);function f(){t.assign(l,!1),t.forOf("v",o,(y)=>t.if(de._`${u()}(${r}, ${y})`,()=>t.assign(l,!0).break()))}function g(y,p){let h=n[p];return typeof h==="object"&&h!==null?de._`${u()}(${r}, ${y}[${p}])`:de._`${r} === ${h}`}}};yi.default=fh});var V0=ue(function(gi){Object.defineProperty(gi,"__esModule",{value:!0});var ph=zo(),mh=Ko(),yh=Wo(),_h=Yo(),gh=ti(),$h=ni(),vh=ii(),wh=di(),Eh=pi(),bh=_i(),Sh=[ph.default,mh.default,yh.default,_h.default,gh.default,$h.default,vh.default,wh.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Eh.default,bh.default];gi.default=Sh});var zr=ue(function(vi){Object.defineProperty(vi,"__esModule",{value:!0});vi.validateAdditionalItems=void 0;var B=Mt(),et=cn(),xh={message:({params:{len:e}})=>B.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>B._`{limit: ${e}}`},Oh={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:xh,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}$i(e,s)}};function $i(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())})}}vi.validateAdditionalItems=$i;vi.default=Oh});var Ur=ue(function(Si){Object.defineProperty(Si,"__esModule",{value:!0});Si.validateTuple=void 0;var Ht=Mt(),Oe=cn(),Ei=Q(),Nh={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return bi(e,"additionalItems",t);if(r.items=!0,Oe.alwaysValidSchema(r,t))return;e.ok(Ei.validateArray(e))}};function bi(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",Ht._`${o}.length`);r.forEach((f,g)=>{if(Oe.alwaysValidSchema(a,f))return;s.if(Ht._`${u} > ${g}`,()=>e.subschema({keyword:i,schemaProp:g,dataProp:g},c)),e.ok(c)});function l(f){let{opts:g,errSchemaPath:y}=a,p=r.length,h=p===f.minItems&&(p===f.maxItems||f[t]===!1);if(g.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,g.strictTuples)}}}Si.validateTuple=bi;Si.default=Nh});var ki=ue(function(Oi){Object.defineProperty(Oi,"__esModule",{value:!0});var xi=Ur(),qh={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>xi.validateTuple(e,"items")};Oi.default=qh});var ji=ue(function(Ii){Object.defineProperty(Ii,"__esModule",{value:!0});var Lt=Mt(),Ni=cn(),Ri=Q(),qi=zr(),jh={message:({params:{len:e}})=>Lt.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Lt._`{limit: ${e}}`},Th={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:jh,code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:n}=r;if(s.items=!0,Ni.alwaysValidSchema(s,t))return;if(n)qi.validateAdditionalItems(e,n);else e.ok(Ri.validateArray(e))}};Ii.default=Th});var Ci=ue(function(Ti){Object.defineProperty(Ti,"__esModule",{value:!0});var D=Mt(),ke=cn(),Dh={message:({params:{min:e,max:t}})=>t===void 0?D.str`must contain at least ${e} valid item(s)`:D.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?D._`{minContains: ${e}}`:D._`{minContains: ${e}, maxContains: ${t}}`},Ah={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Dh,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",D._`${n}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){ke.checkStrictMode(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){ke.checkStrictMode(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if(ke.alwaysValidSchema(o,r)){let h=D._`${l} >= ${i}`;if(a!==void 0)h=D._`${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(D._`${n}.length > 0`,g)}else t.let(f,!1),g();e.result(f,()=>e.reset());function g(){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,(v)=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:ke.Type.Num,compositeRule:!0},h),m()})}function p(h){if(t.code(D._`${h}++`),a===void 0)t.if(D._`${h} >= ${i}`,()=>t.assign(f,!0).break());else if(t.if(D._`${h} > ${a}`,()=>t.assign(f,!1).break()),i===1)t.assign(f,!0);else t.if(D._`${h} >= ${i}`,()=>t.assign(f,!0))}}};Ti.default=Ah});var W0=ue(function(Fi){Object.defineProperty(Fi,"__esModule",{value:!0});Fi.validateSchemaDeps=Fi.validatePropertyDeps=Fi.error=void 0;var tt=Mt(),Di=cn(),fe=Q();Fi.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 Fh={keyword:"dependencies",type:"object",schemaType:"object",error:Fi.error,code(e){let[t,r]=Vh(e);Ai(e,t),Mi(e,r)}};function Vh({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 Ai(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=fe.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)fe.checkReportMissingProp(e,u)});else r.if(tt._`${c} && (${fe.checkMissingProp(e,a,o)})`),fe.reportMissingProp(e,o),r.else()}}Fi.validatePropertyDeps=Ai;function Mi(e,t=e.schema){let{gen:r,data:s,keyword:n,it:o}=e,i=r.name("valid");for(let a in t){if(Di.alwaysValidSchema(o,t[a]))continue;r.if(fe.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)}}Fi.validateSchemaDeps=Mi;Fi.default=Fh});var Hi=ue(function(Ki){Object.defineProperty(Ki,"__esModule",{value:!0});var Gt=Mt(),Ui=cn(),Kh={message:"property name must be valid",params:({params:e})=>Gt._`{propertyName: ${e.propertyName}}`},Hh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Kh,code(e){let{gen:t,schema:r,data:s,it:n}=e;if(Ui.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)}};Ki.default=Hh});var Kr=ue(function(Li){Object.defineProperty(Li,"__esModule",{value:!0});var Ne=Q(),V=Mt(),Gh=Wl(),Re=cn(),Jh={message:"must NOT have additional properties",params:({params:e})=>V._`{additionalProperty: ${e.additionalProperty}}`},Bh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Jh,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"&&Re.alwaysValidSchema(i,r))return;let u=Ne.allSchemaProperties(s.properties),l=Ne.allSchemaProperties(s.patternProperties);f(),e.ok(V._`${o} === ${Gh.default.errors}`);function f(){t.forIn("key",n,(m)=>{if(!u.length&&!l.length)p(m);else t.if(g(m),()=>p(m))})}function g(m){let v;if(u.length>8){let x=Re.schemaRefOrVal(i,s.properties,"properties");v=Ne.isOwnProperty(t,x,m)}else if(u.length)v=V.or(...u.map((x)=>V._`${m} === ${x}`));else v=V.nil;if(l.length)v=V.or(v,...l.map((x)=>V._`${Ne.usePattern(e,x)}.test(${m})`));return V.not(v)}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"&&!Re.alwaysValidSchema(i,r)){let v=t.name("valid");if(c.removeAdditional==="failing")h(m,v,!1),t.if(V.not(v),()=>{e.reset(),y(m)});else if(h(m,v),!a)t.if(V.not(v),()=>t.break())}}function h(m,v,x){let O={keyword:"additionalProperties",dataProp:m,dataPropType:Re.Type.Str};if(x===!1)Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(O,v)}}};Li.default=Bh});var Wi=ue(function(Bi){Object.defineProperty(Bi,"__esModule",{value:!0});var Ji=Xf(),Jt=Q(),rt=cn(),Gi=Kr(),Qh={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)Gi.default.code(new Ji.KeywordCxt(o,Gi.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)}}};Bi.default=Qh});var Zi=ue(function(Qi){Object.defineProperty(Qi,"__esModule",{value:!0});var Bt=Q(),qe=Mt(),Wt=cn(),Qt=cn(),Xh={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:s,parentSchema:n,it:o}=e,{opts:i}=o,a=Bt.allSchemaProperties(r),c=a.filter((h)=>Wt.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=Qt.evaluatedPropsToName(t,o.props);let{props:f}=o;g();function g(){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))Wt.checkStrictMode(o,`property ${m} matches pattern ${h} (use allowMatchingProperties)`)}function p(h){t.forIn("key",s,(m)=>{t.if(qe._`${Bt.usePattern(e,h)}.test(${m})`,()=>{let v=c.includes(h);if(!v)e.subschema({keyword:"patternProperties",schemaProp:h,dataProp:m,dataPropType:Qt.Type.Str},l);if(o.opts.unevaluated&&f!==!0)t.assign(qe._`${f}[${m}]`,!0);else if(!v&&!o.allErrors)t.if(qe.not(l),()=>t.break())})})}}};Qi.default=Xh});var ea=ue(function(Yi){Object.defineProperty(Yi,"__esModule",{value:!0});var Xi=cn(),ep={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:s}=e;if(Xi.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"}};Yi.default=ep});var sa=ue(function(ra){Object.defineProperty(ra,"__esModule",{value:!0});var ta=Q(),rp={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ta.validateUnion,error:{message:"must match a schema in anyOf"}};ra.default=rp});var ia=ue(function(oa){Object.defineProperty(oa,"__esModule",{value:!0});var Ie=Mt(),na=cn(),np={message:"must match exactly one schema in oneOf",params:({params:e})=>Ie._`{passingSchemas: ${e.passing}}`},op={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:np,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 g;if(na.alwaysValidSchema(n,l))t.var(c,!0);else g=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),g)e.mergeEvaluated(g,Ie.Name)})})}}};oa.default=op});var ua=ue(function(ca){Object.defineProperty(ca,"__esModule",{value:!0});var aa=cn(),ap={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(aa.alwaysValidSchema(s,o))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}};ca.default=ap});var fa=ue(function(da){Object.defineProperty(da,"__esModule",{value:!0});var je=Mt(),Zt=cn(),up={message:({params:e})=>je.str`must match "${e.ifClause}" schema`,params:({params:e})=>je._`{failingKeyword: ${e.ifClause}}`},lp={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:up,code(e){let{gen:t,parentSchema:r,it:s}=e;if(r.then===void 0&&r.else===void 0)Zt.checkStrictMode(s,'"if" without "then" and "else" is ignored');let n=la(s,"then"),o=la(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 g=e.subschema({keyword:l},a);if(t.assign(i,a),e.mergeValidEvaluated(g,i),f)t.assign(f,je._`${l}`);else e.setParams({ifClause:l})}}}};function la(e,t){let r=e.schema[t];return r!==void 0&&!Zt.alwaysValidSchema(e,r)}da.default=lp});var ma=ue(function(pa){Object.defineProperty(pa,"__esModule",{value:!0});var ha=cn(),fp={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)ha.checkStrictMode(r,`"${e}" without "if" is ignored`)}};pa.default=fp});var z0=ue(function(ya){Object.defineProperty(ya,"__esModule",{value:!0});var pp=zr(),mp=ki(),yp=Ur(),_p=ji(),gp=Ci(),$p=W0(),vp=Hi(),wp=Kr(),Ep=Wi(),bp=Zi(),Sp=ea(),Pp=sa(),xp=ia(),Op=ua(),kp=fa(),Np=ma();function Rp(e=!1){let t=[Sp.default,Pp.default,xp.default,Op.default,kp.default,Np.default,vp.default,wp.default,$p.default,Ep.default,bp.default];if(e)t.push(mp.default,_p.default);else t.push(pp.default,yp.default);return t.push(gp.default),t}ya.default=Rp});var ga=ue(function(_a){Object.defineProperty(_a,"__esModule",{value:!0});var N=Mt(),Ip={message:({schemaCode:e})=>N.str`must match format "${e}"`,params:({schemaCode:e})=>N._`{format: ${e}}`},jp={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Ip,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)g();else y();function g(){let p=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),h=r.const("fDef",N._`${p}[${i}]`),m=r.let("fType"),v=r.let("format");r.if(N._`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>r.assign(m,N._`${h}.type || "string"`).assign(v,N._`${h}.validate`),()=>r.assign(m,N._`"string"`).assign(v,h)),e.fail$data(N.or(x(),O()));function x(){if(c.strictSchema===!1)return N.nil;return N._`${i} && !${v}`}function O(){let j=l.$async?N._`(${h}.async ? await ${v}(${s}) : ${v}(${s}))`:N._`${v}(${s})`,k=N._`(typeof ${v} == "function" ? ${j} : ${v}.test(${s}))`;return N._`${v} && ${v} !== true && ${m} === ${t} && !${k}`}}function y(){let p=f.formats[o];if(!p){x();return}if(p===!0)return;let[h,m,v]=O(p);if(h===t)e.pass(j());function x(){if(c.strictSchema===!1){f.logger.warn(k());return}throw Error(k());function k(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function O(k){let ee=k instanceof RegExp?N.regexpCode(k):c.code.formats?N._`${c.code.formats}${N.getProperty(o)}`:void 0,he=r.scopeValue("formats",{key:o,ref:k,code:ee});if(typeof k=="object"&&!(k instanceof RegExp))return[k.type||"string",k.validate,N._`${he}.validate`];return["string",k,he]}function j(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw Error("async format in sync schema");return N._`await ${v}(${s})`}return typeof m=="function"?N._`${v}(${s})`:N._`${v}.test(${s})`}}}};_a.default=jp});var U0=ue(function($a){Object.defineProperty($a,"__esModule",{value:!0});var Cp=ga(),Dp=[Cp.default];$a.default=Dp});var q0=ue(function(va){Object.defineProperty(va,"__esModule",{value:!0});va.contentVocabulary=va.metadataVocabulary=void 0;va.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];va.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Pa=ue(function(ba){Object.defineProperty(ba,"__esModule",{value:!0});ba.DiscrError=void 0;var Ea;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ea||(ba.DiscrError=Ea={}))});var K0=ue(function(Oa){Object.defineProperty(Oa,"__esModule",{value:!0});var X=Mt(),st=Pa(),Xt=ww(),Fp=Qf(),xa=cn(),Vp={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}}`},zp={keyword:"discriminator",type:"object",schemaType:"object",error:Vp,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=g();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 g(){var y;let p={},h=v(n),m=!0;for(let j=0;j<i.length;j++){let k=i[j];if((k===null||k===void 0?void 0:k.$ref)&&!xa.schemaHasRulesButRef(k,o.self.RULES)){let he=k.$ref;if(k=Xt.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,he),k instanceof Xt.SchemaEnv)k=k.schema;if(k===void 0)throw new Fp.default(o.opts.uriResolver,o.baseId,he)}let ee=(y=k===null||k===void 0?void 0:k.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||v(k)),x(ee,j)}if(!m)throw Error(`discriminator: "${a}" must be required`);return p;function v({required:j}){return Array.isArray(j)&&j.includes(a)}function x(j,k){if(j.const)O(j.const,k);else if(j.enum)for(let ee of j.enum)O(ee,k);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function O(j,k){if(typeof j!="string"||j in p)throw Error(`discriminator: "${a}" values must be unique strings`);p[j]=k}}}};Oa.default=zp});
|
|
9
|
-
export{Mt,cn,Wl,Xf,gb,Qf,ww,j0,H0,B0,V0,W0,z0,U0,q0,K0};
|
|
10
|
-
|
|
11
|
-
//# debugId=5A64091BADFE433D64756E2164756E21
|
|
12
|
-
//# sourceMappingURL=studio-y64hrt8p.js.map
|