@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
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{p,_e}from"./studio-w4rz9hdk.js";import{C}from"./studio-43sd2mam.js";function v(e){return e.trim().replace(/\/+$/,"")}function u(e){return e.trim()}var pt={aiBaseUrl:{default:"",key:"jx.ai.baseUrl",normalize:v,scope:"user"},aiOpenAiKey:{default:"",key:"jx.ai.openaiKey",normalize:u,scope:"user",secret:!0},aiModel:{default:"gpt-4o",key:"jx.ai.model",normalize:u,scope:"user"},keybindings:{default:"",key:"jx.keybindings",normalize:(e)=>e.trim()==="{}"?"":e.trim(),scope:"user"},theme:{default:"",key:"jx-studio-theme",normalize:u,scope:"user"},showIgnoredFiles:{default:"",key:"jx.files.showIgnored",normalize:u,scope:"user"},developerPanels:{default:"",key:"jx.panels.developer",normalize:u,scope:"user"},cfAccountId:{default:"",key:"jx.cf.accountId",normalize:u,scope:"user"},cfToken:{default:"",key:"jx.cf.token",normalize:u,scope:"user",secret:!0}},S=Object.values(pt),f=S.filter((e)=>e.scope==="user"),P=f.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((a)=>{e.onError?.(a,o)}),i}return{enqueue(o){if(n){Object.assign(n,o);return}n={...o},r=new Promise((a)=>{t(()=>{s().then(a)})})},settled(){return r}}}var c=new Map;function m(){return typeof localStorage>"u"?void 0:localStorage}function k(e,t){try{if(t===null)m()?.removeItem(e);else m()?.setItem(e,t)}catch{}}try{for(let e of S){let t=m()?.getItem(e.key);if(t!==null&&t!==void 0)c.set(e.key,t)}}catch{}function Go(e){return c.get(e.key)??""}function RA(e){return(c.get(e.key)??"")!==""}var y=new Set;function Ap(e){return y.add(e),()=>{y.delete(e)}}function l(e){for(let t of y)t(e)}var g=h({onError(e){C("error","Your settings could not be saved.",{detail:e instanceof Error?e.message:String(e),key:"settings-write",source:"Settings"})},async send(e){if(!_e())return;let t=p();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 DA(){return g.settled()}function d(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);k(n,i),t.push(n)}return t}function px(e,t){return e.normalize?e.normalize(t):t}function Cr(e,t){let n=px(e,t),i=d({[e.key]:n});if(i.length>0)g.enqueue({[e.key]:n}),l(i)}function NA(e){let t={};for(let[i,r]of e)t[i.key]=px(i,r);let n=d(t);if(n.length>0)g.enqueue(t),l(n)}function Op(e){let t={};for(let i of e)t[i.key]=null;let n=d(t);if(n.length>0)g.enqueue(t),l(n)}async function AA(){if(!_e())return;let e=p();if(!e.getSettings)return;let t;try{t=await e.getSettings()}catch{return}let n={},i=!1;for(let s of f){let o=t[s.key];if(o)n[s.key]=o;else if(c.get(s.key))i=!0}let r=d(n);if(r.length>0)l(r);if(i){let s={};for(let o of f){let a=c.get(o.key);if(a&&!t[o.key])s[o.key]=a}g.enqueue(s)}}function x(e){let t={};for(let i of f)t[i.key]=e[i.key]??null;let n=d(t);if(n.length>0)l(n)}function OA(){if(!_e())return;p().subscribeSettings?.(x)}
|
|
2
|
+
export{pt,Go,RA,Ap,DA,px,Cr,NA,Op,AA,OA};
|
|
3
|
+
|
|
4
|
+
//# debugId=1DB30B7D96F210EF64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-s32578pn.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n,S}from"./studio-vxq7fcvv.js";var w=["order","widths","hidden","sort","groupBy","filter"],g="jx-grid-layout:";function c(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function u(e){let t=c()?.getItem(g+e);if(!t)return null;try{let r=JSON.parse(t);return S(r)?r:null}catch{return null}}function f(e,t){c()?.setItem(g+e,JSON.stringify(t))}function a(e){let t={};for(let r of w)if(e[r]!==void 0)Object.assign(t,{[r]:e[r]});return t}function v(e){return JSON.stringify(w.map((t)=>e[t]??null))}function Ed(e){let t=u(e);return t?a(t):null}function Qf(e,t){if(!c())return;let o=u(e)??{},s={...o,widths:{...o.widths,...t.widths}};for(let i of w)if(i!=="widths"&&t[i]!==void 0)Object.assign(s,{[i]:t[i]});f(e,s)}function Kk(e){let t=u(e);if(!t)return;let r={active:null};if(t.views)r.views=t.views;f(e,r)}function Nu(e){let t=u(e)?.views;return Array.isArray(t)?t.filter((r)=>G(r)):[]}function G(e){return S(e)&&"name"in e&&n(e.name)}function $_(e){return u(e)?.active??null}function WR(e){let t=u(e),r=t?.active;if(!t||!r)return!1;let o=Nu(e).find((s)=>s.name===r);return o?v(a(o))!==v(a(t)):!1}function VR(e,t){let r=t.trim(),o=c();if(r===""||!o)return null;let s=u(e)??{},i={name:r,...a(s)},d=Nu(e).filter((l)=>l.name!==r);return d.push(i),f(e,{...s,active:r,views:d}),i}function By(e,t){let r=Nu(e).find((i)=>i.name===t);if(!r||!c())return null;let o=u(e)??{},s=a(r);return f(e,{active:r.name,views:o.views??[],...s}),s}function Jk(e,t){let r=u(e);if(!r||!c())return!1;let o=Nu(e),s=o.filter((i)=>i.name!==t);if(s.length===o.length)return!1;return f(e,{...r,active:r.active===t?null:r.active??null,views:s}),!0}function UR(e,t){if(!t)return e;let r=new Set(t.hidden),o=[];for(let i of e){if(i.field!==void 0&&r.has(i.field))continue;let d=i.field?t.widths?.[i.field]:void 0;o.push(d?{...i,width:d}:i)}if(!t.order?.length)return o;let s=new Map(t.order.map((i,d)=>[i,d]));return o.map((i,d)=>({def:i,index:d})).toSorted((i,d)=>{let l=s.get(i.def.field??"")??t.order.length+i.index,p=s.get(d.def.field??"")??t.order.length+d.index;return l-p}).map(({def:i})=>i)}
|
|
2
|
+
export{Ed,Qf,Kk,Nu,$_,WR,VR,By,Jk,UR};
|
|
3
|
+
|
|
4
|
+
//# debugId=622F033EDD65010464756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-svb7yyve.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Q}from"./studio-nqxqf8p2.js";import{cI,p,_e}from"./studio-w4rz9hdk.js";import{Ys,on}from"./studio-ph84avkf.js";import{cn}from"./studio-z97c48fk.js";import{Ln,m,u,_i,Bt}from"./studio-c05wdnt3.js";import{g,dr,C}from"./studio-43sd2mam.js";import{Pt,Nt}from"./studio-q7rtx6zq.js";import{Tw}from"./studio-x1x167jh.js";import{h}from"./studio-d5grtb9e.js";import{qe,ft,T,R,Jt,tt,Ko,xi,w$}from"./studio-x9hsze61.js";import{dS}from"./studio-dgk4dqtx.js";import{Us,aN,tl}from"./studio-y0n7yxea.js";import{ci,mm,Ul,bL,yL,Db}from"./studio-rj9eamf8.js";import{KD}from"./studio-s19tp1xr.js";import{VO,x,GO,cr}from"./studio-gcxk20n7.js";import{n,te,S,v}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";var wt={children:[],tagName:"div"},vt=new Set(["bunfig.json","jsconfig.json","package-lock.json","package.json","tsconfig.json","wrangler.json"]);function ub(t){let e=t.slice(t.lastIndexOf("/")+1);if(vt.has(e)||e.endsWith(".schema.json"))return!1;return t.endsWith(".json")||Boolean(cn(t))}function B(t,e){if(t.startsWith("../")||t.includes("/../"))return`"${t}" is outside this project, so its comparison belongs to the project that owns it.`;if(e==="R")return"A renamed file's comparison needs both paths, and Studio does not model the old name yet.";if(Tw(t))return`"${t}" is an image or media file, and a comparison of one is not text.`;return null}function xt(){return["git-diff"]}function St(t){let e=m.tabs.get(t);if(e)return Bt(t),e;return _i({capabilities:{modes:xt()},document:structuredClone(wt),documentPath:t,id:t,sourceFormat:null})}async function V(t){if(!ub(t))return St(t);let e=await (le("rcn56qvm"),import("./files-rcn56qvm.js"));return await e.openFileInTab(t,{canvasMode:"git-diff"}),[...m.tabs.values()].find((o)=>o.documentPath===t)??null}var W={$schema:"https://jxsuite.com/schema/v1",$id:"StudioGithubPublish",$description:"Create GitHub Repository: the three things the flow needs before it calls the API — the repository's name, an optional description, and whether it is private. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop, and the kit draws both answer buttons. Nothing here reaches GitHub: `github/github-publish.ts` keeps the token, the request and the activity, and this document only collects.",tagName:"jx-dialog",$props:{headline:"Create GitHub Repository",confirmLabel:"Create Repository",cancelLabel:"Cancel",size:"sm"},attributes:{part:"github-publish"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:'What is NOT here is most of the conversion. `.github-publish-dialog` was a flex column with an 8px gap and `8px 0` of padding: the gap is the one thing it said that nothing else draws, and `jx-dialog`\'s own body already pads the content, so only the gap survives. `.github-publish-dialog sp-textfield { width: 100% }` had nothing to transcribe either — a `jx-field` row is a grid whose control cell stretches, so the field fills the row without being told to. The three `sp-field-label`s are gone with them, because `jx-field` draws the label AND names the control from it; the third of them carried no `for` at all, so "Visibility" was text beside a switch rather than a name for it.','& [part="rows"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"}},children:[{tagName:"div",attributes:{part:"rows"},children:[{tagName:"jx-field",$props:{span:!0,label:"Repository name"},attributes:{part:"row","data-field":"name"},children:[{tagName:"jx-textfield",$props:{placeholder:"my-project",value:{$ref:"#/state/name"}},attributes:{part:"field"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setName"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"Description (optional)"},attributes:{part:"row","data-field":"description"},children:[{tagName:"jx-textfield",$props:{placeholder:"A brief description",value:{$ref:"#/state/description"}},attributes:{part:"field"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setDescription"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"Visibility"},attributes:{part:"row","data-field":"visibility"},children:[{tagName:"div",$description:'The row opens with a plain `div`, and that is the whole reason it exists: `jx-field` names the first thing slotted into it that observes `labelledby`, so a switch slotted straight in would be announced "Visibility" over the top of the words printed beside it. A `div` observes no naming, so the switch keeps the name its own label gives it.',attributes:{part:"visibility-row"},children:[{tagName:"jx-switch",attributes:{part:"toggle"},$props:{checked:{$ref:"#/state/isPrivate"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setPrivate"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Private repository"}]}]}]}]}]};T("github-publish",W);function q(t){let e=document.createElement("div");e.style.pointerEvents="auto",e.setAttribute(qe,ft("dialog","github-publish")),t.layer.append(e);let o=!1,r=()=>{if(o)return;o=!0,t.onClosed()},i=()=>o,a=g({cancel:()=>{t.onCancel()},closed:r,confirm:()=>{t.onConfirm({description:a.description,isPrivate:a.isPrivate,name:a.name})},description:"",isPrivate:!0,name:t.name,setDescription:(l)=>{a.description=l},setName:(l)=>{a.name=l},setPrivate:(l)=>{a.isPrivate=l}}),s=null,d=R("github-publish",a,e).then(async(l)=>{s=l;let f=l.root;if(i())return l.dispose(),f;if(await Jt(f),i())return f;return Pt(f),f});return{close(){if(o)return;let l=s?.root;if(l instanceof HTMLElement)Nt(l);s?.dispose(),s=null,e.remove(),r()},host:e,ready:d}}var j=["Create the repository","Add the remote","Push"];function kt(t){return new Promise((e)=>{let o=!1,r=(a)=>{if(o)return;o=!0,e(a)},i=q({layer:tt("dialog"),name:t,onCancel:()=>{i.close()},onClosed:()=>{r(null)},onConfirm:(a)=>{r({...a,name:a.name||t}),i.close()}})})}async function z({projectName:t}){let e=await dS();if(!e)return!1;let o=await kt(t);if(!o)return!1;let r=Us({source:"Source Control",status:`Creating ${o.name}…`,steps:[...j],title:"Create GitHub repository"});r.step(j[0]);let i;try{i=await fetch("https://api.github.com/user/repos",{body:JSON.stringify({auto_init:!1,description:o.description,name:o.name,private:o.isPrivate}),headers:{Accept:"application/vnd.github+json",Authorization:`Bearer ${e}`,"Content-Type":"application/json"},method:"POST"})}catch(c){return r.log(Q(c)),r.fail("Could not reach GitHub to create the repository.",{action:"git.createGithubRepository"}),!1}if(!i.ok){let c=await i.json();return r.log(c.errors?.[0]?.message||c.message||`GitHub answered ${i.status}.`),r.fail("Could not create the GitHub repository.",{action:"git.createGithubRepository"}),!1}let a=await i.json();r.log(`Created ${a.html_url}`);let s=p();r.step(j[1]);try{await s.gitAddRemote("origin",a.clone_url)}catch(c){return r.log(Q(c)),r.fail("The repository was created, but the remote could not be added.",{action:"view.setWorkspace",actionArgs:{workspace:"publish"}}),!1}r.step(j[2]);try{await s.gitPush({setUpstream:!0})}catch(c){return r.log(Q(c)),r.fail("The repository was created, but the push failed.",{action:"git.push"}),!1}let{refreshGitStatus:d}=await (le("kwktr9y6"),import("./source-control-kwktr9y6.js"));return await d(),r.done(a.html_url),C.success(`Repository created: ${a.html_url}`,{key:"github.repo"}),!0}var w=[];function jt(){return _e()&&te(p().listProjects)}async function rS(){if(!jt()){w=[];return}try{w=await p().listProjects?.()??[]}catch{w=[]}}function UD(){return w}function X(t){w=t}var K=2,Rt=1e4;class Z extends Error{blockedBy;constructor(t,e){super(t.length===0?`Studio did not report ${K} consecutive quiet frames within ${e}ms`:`Studio was not idle after ${e}ms — blocked by ${t.join("; ")}`);this.name="NotIdleError",this.blockedBy=t}}function Y(){return[{blockers:()=>{let t=GO();return t>0?[`render: ${t} renderer(s) mid-paint`]:[]},name:"render"},{blockers:bL,name:"canvas"},{blockers:()=>{let t=cI();if(t.length===0)return[];return[`platform: ${t.length} in-flight (${[...new Set(t)].join(", ")})`]},name:"platform"},{blockers:w$,name:"overlay"},{blockers:aN,name:"activity"},{blockers:KD,name:"grid"}]}function At(t=Y()){let e=[];for(let o of t)e.push(...o.blockers());return e}function et(t={}){let{frames:e=K,now:o=()=>Date.now(),raf:r=(s)=>{requestAnimationFrame(()=>s())},sources:i=Y(),timeoutMs:a=Rt}=t;return new Promise((s,d)=>{let c=o()+a,l=0,f=!1,J=[],H=()=>{if(f)return;let k=At(i);if(k.length>0)J=k,l=0;else if(l+=1,l>=e){f=!0,s();return}if(o()>=c){f=!0,d(new Z(k.length>0?k:J,a));return}r(H)};r(H)})}var ot=/\.toggle[A-Z]/;function $t(t){return t.replace(/\.toggle([A-Z])/,(e,o)=>`.set${o}`)}function rt(t){return!ot.test(t.id)}var Dt={"file.contextMenu":{disposition:"refused",note:"opening a menu to press an item names a control; the ITEM is the command"},"layers.contextMenu":{disposition:"refused",note:"matched RENDERED TEXT, which R1 of scripts/screenshots/README.md forbids; a row is addressed by its data-jx-path"},"project.showWelcome":{disposition:"refused",note:"cold start is a startup profile (?profile=fresh), not an action"},"settings.setSection":{disposition:"refused",note:`mirrored the section registry's LABELS; say settings.open { section: "contexts" }`},"view.setStatus":{disposition:"refused",note:"the status bar is not staged — if a capture needs a calm shell, the app must BE calm"}},Et=new Map(Object.entries(Dt)),Tt={openSettings:'a user opens Settings — run("settings.open")',select:'a user selects a node — run("selection.set", { path })',setActivity:'a user picks a Navigator panel — run("navigator.showPanel", { panel })',setRightTab:'a user picks an Inspector tab — run("inspector.setTab", { tab })',setStatus:"the status bar reports what the app just did; staging it is the one lie the Remote Rule (studio.md §13.5) names outright",setZoom:'a user zooms — run("canvas.setZoom", { zoom })'},Gt=new Map(Object.entries(Tt));function U(t,e){let o=t[e];if(o===void 0)return[];if(!Array.isArray(o))throw TypeError(`seed argument "${e}" must be an array`);return o}function It(t,e){let o=t[e];if(!S(o))throw TypeError(`seed argument "${e}" must be an object`);return o}function Ut(t,e){let o=t[e];if(o===void 0)return;if(!n(o))throw TypeError(`seed argument "${e}" must be a string`);return o}function Lt(t){return[{boundary:"the assistant's model stream",id:"seed.assistant",run:(e)=>{t.seedAssistantMessages(U(e,"messages"))}},{boundary:"the collaboration websocket (awareness + sync)",id:"seed.collab",run:(e)=>{let o=u.value;if(!o)return;let r=Ln(o);r.status="synced",r.active=!0;let i=[];for(let a of U(e,"peers")){let s={...a.state};s.focusedPath??=o.documentPath,i.push({...a,state:s})}r.peers=i,cr()}},{boundary:"the Cloudflare Pages API",id:"seed.publish",run:(e)=>{let o=Ut(e,"accountId"),r={deployment:It(e,"deployment")};if(o)r.accountId=o;t.seedPublishConnected(r)}},{boundary:"the platform's git routes (`gitStatus` / `gitBranches` / `gitLog`)",id:"seed.git",run:(e)=>{let{status:o,branches:r,log:i}=e;h.git.status=o??null,h.git.branches=r??null,h.git.logEntries=i??null,h.git.loading=!1,h.git.error=null,cr()}},{boundary:"the platform's recent-projects store (desktop IPC / cloud API)",id:"seed.projectList",run:(e)=>{X(U(e,"projects")),cr()}}]}class L extends Error{id;constructor(t,e){super(`automation refuses "${t}" — ${e}`);this.name="AutomationRefusedError",this.id=t}}function Mt(t){let e=[];for(let o of t.visible()){if(!rt(o))continue;let r=t.disabledReason(o.id),i={enabled:r===void 0,id:o.id,title:o.title};if(o.args)i.args=o.args;if(r!==void 0)i.requires=r;e.push(i)}return e}function Ot(t,e,o){if(o.has(t))return`"${t}" is a seed, not a command — call seed("${t}", …)`;let r=Et.get(t);if(r)return`"${t}" is refused by spec §13.5: ${r.note}`;let i=e.list().filter((a)=>rt(a)).map((a)=>a.id);return`unknown command "${t}" — the registry declares ${i.length} scriptable id(s)`}function Ft(t){let e=new Map(Lt(t).map((r)=>[r.id,r])),o=new Set(e.keys());return{probe:{commands:()=>Mt(t.registry),idle:(r={})=>et(r),pointAt:(r)=>yL(r.path),revealPath:(r)=>Db(r),seeds:()=>[...e.values()].map((r)=>({boundary:r.boundary,id:r.id})),state:()=>t.registry.context()},async run(r,i={}){if(ot.test(r))throw new L(r,`it names a delta against state the caller cannot observe; call "${$t(r)}"`);let{registry:a}=t;if(!a.get(r))throw Error(Ot(r,a,o));await a.run(r,i)},async seed(r,i={}){let a=r.startsWith("seed.")?r.slice(5):r,s=Gt.get(a);if(s)throw new L(r,`a seed stands in for a remote, never for a user: ${s}`);let d=e.get(r.startsWith("seed.")?r:`seed.${r}`);if(!d)throw Error(`unknown seed "${r}" — declared seeds are ${[...e.keys()].join(", ")}`);await d.run(i)}}}function bw(t){return new URLSearchParams(t).get("automation")==="1"}function qD(t){if(!bw(location.search))return!1;return globalThis.__jxAutomation=Ft(t),!0}var nt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioJxsuiteUpdate",$description:"The on-open offer to bring a project's `@jxsuite/*` dependencies up to their newest published versions: one sentence, and the packages that would move. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop, and the kit draws both answers. Nothing here asks the registry or writes a manifest: `packages/jxsuite-update.ts` keeps the lookup, the dismissal key and the install, and this document only says what is on offer.",tagName:"jx-dialog",$props:{headline:"Update @jxsuite packages?",confirmLabel:"Update",cancelLabel:"Not now",size:"sm"},attributes:{part:"jxsuite-update"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:'The old body was a lit template with no stylesheet at all, which is why the conversion is mostly a deletion. Two `<br />`s stood in for a paragraph break, and one `<span style="white-space: pre-line">` held every package as a single `\\n`-joined string — a list spelled as whitespace. Neither is addressable and neither announces as what it is, so a screen reader read one run-on line and a test could only match a substring of it. It is a `<ul>` of keyed rows now: the list says how many packages there are, and each row is `[data-package]`. The one token repair travels with it — that span asked for `--spectrum-font-size-75`, which resolves only inside `<sp-theme>`, and a document mounted in the dialog layer is outside it, so the size silently fell back to the hard-coded `12px` written beside it.','& [part="offer"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="lede"]':{margin:"0"},'& [part="list"]':{$description:"Capped and scrolling, because the count is the registry's rather than this dialog's: a project that has not been opened in a year can have every `@jxsuite/*` package behind at once, and a dialog that grows past the viewport puts its own Update button off screen.",listStyle:"none",margin:"0",padding:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",maxHeight:"240px",overflowY:"auto"},'& [part="package"]':{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:"var(--jx-space-3)",fontSize:"var(--jx-text-sm)"},'& [part="package-name"]':{color:"var(--fg)"},'& [part="package-move"]':{$description:"Tabular figures, so a column of versions does not jitter between rows of different widths.",color:"var(--fg-dim)",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap"}},children:[{tagName:"div",attributes:{part:"offer"},children:[{tagName:"p",attributes:{part:"lede"},textContent:"Newer versions of these packages have been published. Update the project to them?"},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/packages"},key:{$ref:"$map/item/name"},map:{tagName:"li",attributes:{part:"package","data-package":"${$map.item.name}"},children:[{tagName:"span",attributes:{part:"package-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"package-move"},textContent:"${$map.item.current} → ${$map.item.target}"}]}}]}]}]};T("jxsuite-update",nt);function it(t){let e=document.createElement("div");e.style.pointerEvents="auto",e.setAttribute(qe,ft("dialog","jxsuite-update")),t.layer.append(e);let o=!1,r=()=>{if(o)return;o=!0,t.onClosed()},i=()=>o,a=g({cancel:()=>{t.onCancel()},closed:r,confirm:()=>{t.onConfirm()},packages:t.packages}),s=null,d=R("jxsuite-update",a,e).then(async(c)=>{s=c;let l=c.root;if(i())return c.dispose(),l;if(await Jt(l),i())return l;return Pt(l),l});return{close(){let c=s?.root;if(c instanceof HTMLElement)Nt(c);s?.dispose(),s=null,e.remove(),r()},host:e,ready:d}}function vw(t){return t.replace(/^[\^~>=<v\s]+/,"").trim().split(/\s+/)[0]??""}function at(t){if(t.includes(":"))return!1;return/^\d+\.\d+/.test(vw(t))}function st(t){let e=vw(t).split(/[-+]/)[0]??"",[o=0,r=0,i=0]=e.split(".").map((a)=>Math.trunc(Number(a))||0);return[o,r,i]}function Ht(t,e){let o=st(t),r=st(e);for(let i=0;i<3;i++){let a=o[i]??0,s=r[i]??0;if(a!==s)return a<s?-1:1}return 0}function sS(t,e){if(!at(t)||!at(e))return!1;return Ht(e,t)>0}var M="@jxsuite/";async function N(){let t=p();if(!t.packageVersions)return[];let e;try{e=await t.packageVersions()}catch{return[]}let o=[];for(let r of e)if(r.name.startsWith(M)&&sS(r.current,r.latest))o.push({current:r.current,dev:Boolean(r.dev),latest:r.latest,name:r.name});return o}function ct(t,e){let o=e.map((r)=>`${r.name}@${r.latest}`).toSorted().join(",");return`jx:jxsuite-update-dismissed:${t}:${o}`}function Vt(t,e){try{return localStorage.getItem(ct(t,e))==="1"}catch{return!1}}function Wt(t,e){try{localStorage.setItem(ct(t,e),"1")}catch{}}async function O(t){let e=p();if(!e.setPackageVersions||t.length===0)return;let o=tl({status:"Updating @jxsuite packages…",title:"Updating dependencies"});try{let r=await e.setPackageVersions(t.map((i)=>({dev:i.dev,name:i.name,version:`^${i.latest}`})));if(r.ok)o.done(),C.success(`Updated ${t.length} @jxsuite package(s) to their latest versions.`);else o.fail(r.log??"Update failed")}catch(r){o.fail(r instanceof Error?r.message:String(r))}}function qt(t){return new Promise((e)=>{let o=!1,r=(d)=>{if(o)return;o=!0,e(d)},i=!1,a=()=>{if(i)return;i=!0,s.close()},s=it({layer:tt("dialog"),onCancel:()=>{a()},onClosed:()=>{r(!1),a()},onConfirm:()=>{r(!0),a()},packages:t.map((d)=>({current:d.current,name:d.name,target:`^${d.latest}`}))})})}async function um(t){if(bw(location.search))return;if(!p().setPackageVersions)return;let o=await N();if(o.length===0||Vt(t,o))return;if(!await qt(o)){Wt(t,o);return}await O(o)}var A=["package.json","bun.lock","bun.lockb"],zt=new Set(["??","U"]),Xt=25;function D(t){if(Array.isArray(t))return t.map((e)=>D(e));if(v(t)){let e={};for(let[o,r]of Object.entries(t).toSorted(([i],[a])=>i<a?-1:1))e[o]=D(r);return e}return t}function lt(t){let e={...t};for(let o of["dependencies","devDependencies"]){let r=e[o];if(!v(r))continue;let i={...r};for(let a of Object.keys(i))if(a.startsWith(M))i[a]="*";e[o]=i}return e}function Kt(t,e){if(t===null||e===null)return!1;let o,r;try{o=JSON.parse(t),r=JSON.parse(e)}catch{return!1}if(!v(o)||!v(r))return!1;return JSON.stringify(D(lt(o)))===JSON.stringify(D(lt(r)))}async function E(t,e){try{return await p().gitShow({path:t,ref:e})}catch{return null}}async function pt(t){try{return await p().readFile(t)}catch{return null}}async function dt(t){let e=[],o=[],r=!0;for(let i of A){let a=t.files.filter((c)=>c.path===i);if(a.length===0)continue;let s=await E(i,"@{u}");if(a.every((c)=>zt.has(c.status))){if(s!==null)o.push(i);continue}let d=await E(i,"HEAD");if(s===null||s===d)continue;if(e.push(i),i==="package.json")r&&=Kt(d,await pt(i))}return{automated:r,discard:e,removeUntracked:o}}function mt(t){return t.discard.length===0&&t.removeUntracked.length===0}async function Zt(t){let e=[...new Set(t.files.filter((o)=>!A.includes(o.path)).map((o)=>o.path))];if(e.length>Xt)return!0;for(let o of e){let r=await E(o,"@{u}");if(r!==null&&r!==await E(o,"HEAD"))return!0}return!1}async function Qt(t){let e=p();if(t.discard.length>0)await e.gitUnstage(t.discard),await e.gitDiscard(t.discard);for(let o of t.removeUntracked)await e.deleteFile(o)}async function F(){let t=p(),e=[];try{e=await N()}catch{e=[]}if(e.length>0&&t.setPackageVersions){await O(e);return}if(!t.installDependencies)return;let o=tl({status:"Running bun install…",title:"Syncing dependencies"});try{let r=await t.installDependencies();if(r.ok)o.done();else o.fail(r.log??"bun install failed")}catch(r){o.fail(Q(r))}}async function gt(t){let e=p();try{await Qt(t)}catch(o){throw Error(`Could not reset local package files: ${Q(o)}`,{cause:o})}try{await e.gitPull()}catch(o){throw await F(),o}C.warn("Local package updates were superseded by pulled changes.",{source:"Source Control"}),await F()}async function Yt(t){let e=p(),o;try{o=await e.gitStatus()}catch{throw t}if(!(o.behind>0))throw t;let r=await dt(o);if(mt(r)||await Zt(o))throw t;if(!r.automated){if(!await Ko("Discard local package changes?","package.json / bun.lock have local edits that conflict with incoming changes. Discard them, pull, and re-sync packages?",{confirmLabel:"Discard and pull",destructive:!0}))throw t}await gt(r)}async function ut(){let t;try{let e=await p().listDirectory("");t=new Set(e.filter((o)=>o.type==="file").map((o)=>o.name))}catch{t=new Set(A)}return Promise.all(A.map((e)=>t.has(e)?pt(e):Promise.resolve(null)))}async function _(){let t=p(),e=await ut(),o=null;try{await t.gitFetch(),o=await t.gitStatus()}catch{o=null}if(o&&o.behind>0){let i=await dt(o);if(!mt(i)&&i.automated){await gt(i);return}}try{await t.gitPull()}catch(i){await Yt(i);return}let r=await ut();if(e.some((i,a)=>i!==r[a]))await F()}async function hm(){let t=p();try{let e=await t.gitStatus();if(!e.isRepo||!Array.isArray(e.remotes)||e.remotes.length===0)return}catch{return}C.info("Syncing project…",{key:"project.sync",source:"Source Control"});try{await _()}catch(e){C.warn("The project could not be synced with its remote.",{detail:Q(e),key:"project.sync",source:"Source Control",tier:"problem"})}}async function ee(){let t=p(),{git:e}=h,o;try{o=await t.gitStatus()}catch(r){e.error=Q(r);return}if(e.status=o,!o.isRepo){e.branches=null;return}try{e.branches=await t.gitBranches()}catch(r){e.error=Q(r)}}async function Vs(){if(!x)return;let{git:t}=h;t.loading=!0,t.error=null;try{if(await ee(),t.lastUpdated=dr(),t.rev+=1,await oe(),t.logEntries!==null)await aS()}catch(e){t.error=Q(e)}finally{t.loading=!1}}async function oe(){let t=h.git.diffState;if(!t)return;let e=h.git.status?.files.find((o)=>o.path===t.filePath);if(!e||!ht(e.status)){h.git.diffState=null;return}try{h.git.diffState=await I(t.filePath,e.status)}catch{}}async function rT(t){if(h.git.rev+=1,!h.git.loading)Vs();let e=h.git.diffState;if(!t||e?.filePath!==t)return;try{h.git.diffState=await I(t,e.fileStatus)}catch{}}async function aS(){try{h.git.logEntries=await p().gitLog(30)}catch(t){h.git.error=Q(t)}}async function lS(t){let e=p();if(!e.gitClone){C.warn("Cloning is not supported on this platform.",{source:"Source Control"});return}let o=await xi("Clone Git Repository",{confirmLabel:"Clone",message:"Repository URL",placeholder:"https://github.com/user/repo.git",validate:(r)=>r.trim()?"":"Enter a repository URL."});if(!o)return;try{C.info("Cloning repository…",{key:"git.clone",source:"Source Control"});let r=await e.gitClone(o);if(r.root)C.success("Clone complete.",{key:"git.clone"}),await t.openRecentProject(r.root)}catch(r){C.error("Could not clone the repository.",{detail:Q(r),key:"git.clone",source:"Source Control"})}}function hb(){return _e()&&Boolean(p().gitClone)}function xa(){return _e()&&p().gitHosted===!0}function sT(){return _e()&&te(p().createPullRequest)}var re=new Map([["A","added"],["D","deleted"],["M","modified"],["R","renamed"],["U","untracked"]]);function ne(t){return re.get(t)??"changed"}var ie=new Map([["A","NEW"],["D","DELETED"],["M","EDIT"],["R","RENAMED"],["U","NEW"]]);function aT(t){return ie.get(t)??"EDIT"}var ae=new Set(["M","A","U","D"]);function ht(t){return ae.has(t)}async function I(t,e){let o=p(),r=e!=="A"&&e!=="U",i=e!=="D",[a,s]=await Promise.all([r?o.gitShow({path:t,ref:"HEAD"}):Promise.resolve(""),i?o.readFile(t):Promise.resolve("")]);return{currentContent:s,filePath:t,fileStatus:e,originalContent:a}}async function lT(t,e){try{return await I(t,e)}catch(o){return console.warn("loadDiffForLens:",Q(o)),null}}var G={};function cT(t){G=t}function dT(){G.cloneRepository?.()}function yt(t){return h.git.status?.files.find((e)=>e.path===t)}async function uT(t){let e=yt(t);if(!e)return;let o=ht(e.status)?B(e.path,e.status):`"${e.path}" has no change this view can open.`;if(o){h.git.error=o;return}try{h.git.loading=!0;let r=await I(e.path,e.status);h.git.diffState=r,G.setGitDiffState?.(r);let i=await V(e.path);if(i)G.setCanvasMode?.(i,"git-diff")}catch(r){h.git.error=`Failed to load diff: ${Q(r)}`}finally{h.git.loading=!1}}async function y(t){let e=p();h.git.loading=!0,h.git.error=null;try{return await t(e),await Vs(),!0}catch(o){return h.git.error=Q(o),h.git.loading=!1,!1}}async function se(){try{C.info("Initializing repository…",{key:"git.init"}),await p().gitInit(),C.success("Repository initialized.",{key:"git.init"})}catch(t){C.error("Could not initialize the repository.",{action:"git.init",detail:Q(t),key:"git.init",source:"Source Control"});return}await Vs()}async function ce(){await y((t)=>t.gitPush())}async function hT(){await y((t)=>t.gitFetch())}async function pT(){h.git.loading=!0,h.git.error=null;try{await _(),await Vs()}catch(t){h.git.error=Q(t),h.git.loading=!1}}async function ue(){await z({projectName:x?.name||"my-project"})}async function pe(){if(await dS())C.success("Signed in to GitHub.",{key:"github.auth"})}async function fT(t,e){await y((o)=>e?o.gitStage([t]):o.gitUnstage([t]))}async function mT(t){let e=(h.git.status?.files??[]).filter((o)=>Boolean(o.staged)!==t).map((o)=>o.path);if(e.length===0)return;await y((o)=>t?o.gitStage(e):o.gitUnstage(e))}var b={paths:new Set,root:""};function de(){let t=x?.projectRoot??"";if(b.root!==t)b={paths:new Set,root:t};let e=h.git.status?.files??[],o=new Set(e.map((i)=>i.path));for(let i of b.paths)if(!o.has(i))b.paths.delete(i);let r=e.filter((i)=>!b.paths.has(i.path));for(let i of r)b.paths.add(i.path);return r.filter((i)=>!i.staged).map((i)=>i.path)}async function gT(){if(h.git.loading||!h.git.status?.isRepo)return;let t=de();if(t.length>0)await y((e)=>e.gitStage(t))}async function bT(t){if(yt(t)?.status==="U")return;if(!await Ko("Discard Changes",`Discard changes to ${t}?`,{confirmLabel:"Discard",destructive:!0}))return;await y((o)=>o.gitDiscard([t]))}async function vT(){let{branches:t,status:e}=h.git,o=await xi("New Branch",{confirmLabel:"Create",message:`Branching from ${t?.current||e?.branch||"the current branch"}.`,placeholder:"feature/my-change",validate:(r)=>r.trim()?"":"Enter a branch name."});if(o)await y((r)=>r.gitCreateBranch(o.trim()))}async function yT(t){if(t===h.git.branches?.current)return;if(xa()){if(!await Ko("Switch Branch",`Each branch opens in its own session, so switching to ${t} reloads Studio on that branch.`,{confirmLabel:"Switch and reload"}))return}await y((e)=>e.gitCheckout(t))}function cS(t){let e=t.path.split("/"),o=e.pop()??t.path,r=e.join("/"),i=ne(t.status);return{cannotDiscard:t.status==="U",dir:r,hasDir:r!=="",included:Boolean(t.staged),key:t.path,label:`${t.path}, ${i}`,name:o,path:t.path,status:t.status,statusWord:i}}var bt=[["components","Components"],["layouts","Layouts"],["styles","Styles"]];function me(t){let e=Ul(t);if(e!==null)return e;let[o]=t.split("/");if(o==="pages")return ci;if(bt.some(([r])=>r===o))return`folder:${o}`;return Ys.has(on(t))?"media":"other"}function wT(t){let e=[...mm().map((r)=>[r.key,r.title]),...bt.map(([r,i])=>[`folder:${r}`,i]),["media","Media"],["other","Other"]],o=new Map;for(let r of t){let i=me(r.path);o.set(i,[...o.get(i)??[],r])}return e.flatMap(([r,i])=>{let a=o.get(r);return a?[{files:a.map((s)=>cS(s)),key:r,name:i}]:[]})}function xT(t){return{hash:t.hash.slice(0,7),key:t.hash,message:t.message,meta:`${t.author} · ${yw(t.date)}`}}function yw(t){let e=new Date(t),o=dr()-e.getTime(),r=Math.floor(o/60000);if(r<1)return"just now";if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);if(a<30)return`${a}d ago`;return e.toLocaleDateString()}function _T(t){return t?`Last updated ${new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:""}var P=null;function ST(){if(P)return;P=setInterval(()=>{if(h.workspace==="publish"&&!h.git.loading)Vs()},VO)}function pb(){if(P)clearInterval(P),P=null;b={paths:new Set,root:""}}function fe(){return[{category:"Source Control",id:"git.init",level:"project",menus:["commandbar/overflow","palette"],group:"7_scm",requires:"an open project that git is not already tracking",when:(t)=>t.project.open,enablement:(t)=>!t.project.isRepo,run:async()=>{await se()},title:"Initialize Repository"},{category:"Source Control",id:"git.createGithubRepository",level:"project",menus:["commandbar/overflow","palette"],group:"7_scm",requires:"a project tracked by git",when:(t)=>t.project.open,enablement:(t)=>t.project.isRepo,run:async()=>{await ue()},title:"Create GitHub Repository"},{category:"Source Control",id:"git.push",level:"project",menus:["commandbar/overflow","palette"],group:"7_scm",requires:"a project tracked by git",when:(t)=>t.project.open,enablement:(t)=>t.project.isRepo,run:async()=>{await ce()},title:"Push"},{category:"Source Control",id:"git.signInToGithub",level:"application",menus:["palette"],group:"7_scm",run:async()=>{await pe()},title:"Sign In to GitHub"}]}function CT(t){t.registerAll(fe())}
|
|
2
|
+
export{rS,UD,bw,qD,vw,sS,um,hm,ub,Vs,rT,aS,lS,hb,xa,sT,aT,lT,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,cS,wT,xT,yw,_T,ST,pb,CT};
|
|
3
|
+
|
|
4
|
+
//# debugId=70F1BFAA3695C3E164756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-syreb644.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{p}from"./studio-w4rz9hdk.js";import{Jd,m}from"./studio-c05wdnt3.js";import{g}from"./studio-43sd2mam.js";import{Ot,Wi,cn,hl,ur,Oa}from"./studio-z97c48fk.js";import{Io}from"./studio-8tr6cfrc.js";import{$a,Vd}from"./studio-r5qy30vx.js";import{Fw}from"./studio-rj9eamf8.js";import{cs,Iw,Rw,ir,or}from"./studio-q0tccd43.js";import{x}from"./studio-gcxk20n7.js";import{n,Z,S,of}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";var ks="draft",wp="Marked a draft. Studio filters drafts out of its own lists; the build does not exclude them yet.";function Bl(e){return e?.[ks]===!0}function W(e){return e?.properties?.[ks]?.type==="boolean"}function Oc(e,t){return W(e)||Bl(t)}var I=g({includeDrafts:!1});function T(){return I.includeDrafts}function QD(e){I.includeDrafts=e}function K(e,t,r){return r?e:e.filter((o)=>!Bl(t(o)))}function _(e){let t=[],r=[],o="",s=!1,l=!1,u=()=>{r.push(o),o="",l=!1},C=()=>{if(u(),r.length===1&&r[0]===""){r=[];return}t.push(r),r=[]};for(let F=0;F<e.length;F++){let b=e[F];if(s){if(b==='"')if(e[F+1]==='"')o+='"',F+=1;else s=!1;else o+=b;continue}if(b==='"'&&!l)s=!0,l=!0;else if(b==='"')o+=b;else if(b===",")u();else if(b===`
|
|
2
|
+
`)C();else if(b==="\r"){if(e[F+1]===`
|
|
3
|
+
`)F+=1;C()}else o+=b,l=!0}if(o!==""||r.length>0)C();return t}function Md(e){let t=(e.match(/\r\n/g)??[]).length,r=(e.match(/(?<!\r)\n/g)??[]).length,o=t>r?`\r
|
|
4
|
+
`:`
|
|
5
|
+
`,s=e.endsWith(`
|
|
6
|
+
`),l=_(e),u=l[0]??[],C=l.slice(1),F=Math.max(u.length,...C.map((b)=>b.length),0);while(u.length<F)u.push("");for(let b of C)while(b.length<F)b.push("");return{eol:o,headers:u,rows:C,trailingNewline:s}}function z(e){if(/[",\n\r]/.test(e))return`"${e.replaceAll('"','""')}"`;return e}function HT(e){return[e.headers,...e.rows].map((r)=>r.map((o)=>z(o)).join(",")).join(e.eol)+(e.trailingNewline?e.eol:"")}function q(e,t){let{headers:r,rows:o}=Md(e),s=[t,"id","sku","slug","Slug"].flatMap((l)=>{let u=l===void 0?-1:r.indexOf(l);return u===-1?[]:[u]});return o.filter((l)=>l.some((u)=>u.trim()!=="")).map((l,u)=>{let C=s.find((F)=>(l[F]??"")!=="");return C===void 0?String(u):l[C]})}function B(e,t){let r;try{r=JSON.parse(e)}catch{return[]}let o=(s,l)=>{let u=S(s)&&!Array.isArray(s)?s.id:void 0;return n(u)||Z(u)?String(u):l};if(!Array.isArray(r))return[o(r,t)];return r.map((s,l)=>o(s,`${t}-${l}`))}function j(e,t,r){let o=e.toLowerCase();if(o.endsWith(".csv"))return q(t,r);if(o.endsWith(".json")){let s=(e.split("/").pop()??e).replace(/\.json$/i,"");return B(t,s)}return[]}var D="__path";function O(){return x?.projectConfig?.content??{}}function mb(e){let t=O()[e];if(!t?.source)return null;let r=t.source.replace(/^\.\//,"").replace(/\/$/,""),o=t.format==="json"?".json":Wi(t.format)?.extensions[0]??ur()?.extensions[0]??".json";return{def:t,dir:r,ext:o,name:e}}function vS(){return Object.entries(O()).filter(([,e])=>{let t=e.source?.replace(/^\.\//,"")??"";return t!==""&&!/\.[a-z0-9]+$/i.test(t)}).map(([e,t])=>({dir:t.source.replace(/^\.\//,"").replace(/\/$/,""),name:e}))}async function V(e,t){let r=p(),o=[],s=async(l)=>{let u;try{u=await r.listDirectory(l)}catch{return}for(let C of u)if(C.type==="directory")await s(C.path);else if(t.some((F)=>C.path.endsWith(F)))o.push(C.path)};return await s(e),o.toSorted()}async function yS(e){let t=e.dir.indexOf(Io);if(t===-1)return[e.dir];let r=e.dir.slice(0,t).replace(/\/$/,""),o=e.dir.slice(t+Io.length),s;try{s=await p().listDirectory(r)}catch{return[]}return s.filter((l)=>l.type==="directory").map((l)=>`${l.path}${o}`.replace(/\/$/,"")).filter((l)=>Jd(l)?.name===e.name).toSorted()}async function L(e){let t=await yS(e);return(await Promise.all(t.map((o)=>V(o,[e.ext])))).flat().toSorted()}async function H(e){let t=Fw(e.name);if(t===null)return null;let r;try{r=await p().readFile(t)}catch{return[]}return j(t,r,e.def.idField)}async function gb(e){await Ot().catch(()=>{});let t=mb(e);if(!t)return[];let r=await H(t);if(r!==null)return r;return(await L(t)).map((s)=>{let l=s.split("/").pop()??s;return l.slice(0,l.length-t.ext.length)})}async function Q(e,t,r){let o=Array.from({length:e.length}),s=0,l=Array.from({length:Math.min(t,e.length)},async()=>{while(s<e.length){let u=s;s+=1,o[u]=await r(e[u])}});return await Promise.all(l),o}function A(e){if(e===void 0)return null;if(of(e))return e;if(Array.isArray(e)&&e.every((t)=>!S(t)))return e.map(String);return JSON.stringify(e)}function N(e){for(let t of m.tabs.values())if(t.documentPath===e)return t;return null}function U(e,t){return e.every((r)=>{let o=r[t];return!n(o)||!o.startsWith("{")&&!o.startsWith("[")})}var J=new WeakSet;async function BT(){let e=[];for(let t of m.tabs.values()){let r=ir(t);if(r&&J.has(r.source))e.push(r.load())}await Promise.all(e)}function M(e){let t=X(e);if(e.drafts)J.add(t);return t}function X(e){let t=new Map,r=null,o=null,s=(d=!1)=>{if(!d&&r)return r;return r=(async()=>{await Ot().catch(()=>{});let h=p(),f=await e.list();t.clear(),o=null;let y=await Q(f,32,async(i)=>{try{let a=await h.readFile(i),c=await or(i,a);return{document:c.document,formatName:c.format.name,frontmatter:c.frontmatter,rawText:a}}catch{return null}});for(let[i,a]of f.entries()){let c=y[i];if(c)t.set(a,c)}})(),r},l=()=>{if(o)return o;let d={editable:!1,field:D,insertOnly:!0,kind:"string",pk:!0,required:!0,title:"Path",widthHint:220},h=Iw(e.schema()),f=new Set([D,...h.map((a)=>a.field)]),y=[...t.values()].map((a)=>{let c={};for(let[w,E]of Object.entries(a.frontmatter))if(!f.has(w)&&!w.startsWith("$"))c[w]=A(E);return c}),i=Rw(y);for(let a of i)a.editable=a.kind!=="text"||U(y,a.field);if(e.priorityFields?.length){let a=(c)=>{let w=e.priorityFields.indexOf(c.field);return w===-1?e.priorityFields.length:w};i.sort((c,w)=>a(c)-a(w))}return o=C([d,...h,...i]),o},u=()=>{if(!e.drafts)return!1;let d=e.schema();return Oc(d)||[...t.values()].some((h)=>Oc(d,h.frontmatter))},C=(d)=>{let h=d.findIndex((y)=>y.field===ks);if(h<1||!u())return d;let f=d.filter((y)=>y.field!==ks);return[f[0],d[h],...f.slice(1)]},F=(d,h)=>{let f={[D]:d};for(let y of l()){if(y.field===D)continue;f[y.field]=A(h.frontmatter[y.field])}return{cells:f,fingerprint:h.rawText,key:d}},b=async(d,h,f)=>{let y=p(),i={...h.frontmatter};for(let E of f)if(E.value===null)delete i[E.field];else i[E.field]=E.value;let a=h.document,c={...i,...a,children:a.children??[]},w=await Oa(h.formatName,c,{mode:"roundtrip",source:h.rawText});$a(d),await y.writeFile(d,w),t.set(d,{...h,frontmatter:i,rawText:w})};return{backingPaths:()=>new Map([...t.keys()].map((d)=>[d,d])),capabilities:{delete:!0,insert:!0,remotePaging:!1,remoteSort:!1},async columns(){return await s(),l()},async commit(d){await s();let h=p(),f={cells:[],deletes:[],inserts:[]},y=new Map;for(let i of d.cells){let a=y.get(i.rowKey)??[];a.push({field:i.field,value:i.value}),y.set(i.rowKey,a)}for(let[i,a]of y){let c=(R,v,G)=>{for(let k of a)f.cells.push({error:v,field:k.field,ok:R,rowKey:i,stale:G})},w=t.get(i);if(!w){c(!1,"Entry no longer loaded — refresh the grid");continue}let E=N(i);if(E?.doc.dirty){c(!1,"Open in a tab with unsaved changes — save or close it first");continue}let P=null;try{P=await h.readFile(i)}catch{P=null}if(P!==w.rawText&&!Vd(i)){c(!1,"File changed on disk — refresh to reload",!0);continue}try{if(await b(i,w,a),c(!0),E){let{reloadFileInTab:R}=await (le("rcn56qvm"),import("./files-rcn56qvm.js"));R(i)}}catch(R){c(!1,R instanceof Error?R.message:String(R))}}for(let i of d.inserts){let a=i.cells[D];if(!n(a)||a.trim()===""){f.inserts.push({error:"Path is required",ok:!1,tempKey:i.tempKey});continue}let c=e.resolveInsertPath(a),w=t.has(c);if(!w)try{await h.readFile(c),w=!0}catch{w=!1}if(w){f.inserts.push({error:`${c} already exists`,ok:!1,tempKey:i.tempKey});continue}let E=e.insertFormatName(c);if(!E){f.inserts.push({error:`No format can serialize ${c}`,ok:!1,tempKey:i.tempKey});continue}try{let P={};for(let[G,k]of Object.entries(i.cells))if(G!==D&&k!==null)P[G]=k;let R=await Oa(E,{...P,children:[]},{frontmatter:Object.keys(P).length>0,mode:"roundtrip"});$a(c),await h.writeFile(c,R);let v=await or(c,R);t.set(c,{document:v.document,formatName:v.format.name,frontmatter:v.frontmatter,rawText:R}),f.inserts.push({newKey:c,ok:!0,tempKey:i.tempKey})}catch(P){f.inserts.push({error:P instanceof Error?P.message:String(P),ok:!1,tempKey:i.tempKey})}}for(let i of d.deletes){if(N(i.rowKey)){f.deletes.push({error:"Open in a tab — close it first",ok:!1,rowKey:i.rowKey});continue}try{$a(i.rowKey),await h.deleteFile(i.rowKey),t.delete(i.rowKey),f.deletes.push({ok:!0,rowKey:i.rowKey})}catch(a){f.deletes.push({error:a instanceof Error?a.message:String(a),ok:!1,rowKey:i.rowKey})}}return f},id:e.id,label:e.label,async refresh(){await s(!0)},async rows(){await s();let h=(e.drafts?K([...t.entries()],([,f])=>f.frontmatter,T()):[...t.entries()]).map(([f,y])=>F(f,y));return{rows:h,total:h.length}}}}function zT(e){let t=()=>{let r=mb(e);if(!r)throw Error(`No content collection named "${e}" in project.json`);return r};return M({drafts:!0,id:cs({kind:"collection",name:e}),insertFormatName:(r)=>{let o=t();return(o.def.format?Wi(o.def.format)?.name:void 0)??cn(r)?.name??ur()?.name??null},label:e,list:()=>L(t()),resolveInsertPath:(r)=>{let o=t(),s=r.trim().replace(/^\.\//,"").replace(/^\//,"");if(!s.includes("/"))s=`${o.dir}/${s}`;if(!s.endsWith(o.ext))s=`${s}${o.ext}`;return s},schema:()=>t().def.schema})}function WT(){let e=()=>{let t=hl("page").filter((r)=>r!==".json");return t.length>0?t:[".md"]};return M({id:cs({kind:"pages"}),insertFormatName:(t)=>cn(t)?.name??null,label:"Pages",list:()=>V("pages",e()),priorityFields:["title","description"],resolveInsertPath:(t)=>{let r=t.trim().replace(/^\.\//,"").replace(/^\//,"");if(!r.startsWith("pages/"))r=`pages/${r}`;if(!e().some((o)=>r.endsWith(o)))r=`${r}${e()[0]}`;return r},schema:()=>null})}
|
|
7
|
+
export{Md,HT,ks,wp,Bl,Oc,QD,mb,vS,yS,gb,BT,zT,WT};
|
|
8
|
+
|
|
9
|
+
//# debugId=830105B7A435DF6664756E2164756E21
|
|
10
|
+
//# sourceMappingURL=studio-tf9jryb1.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n,v}from"./studio-vxq7fcvv.js";var S=500;class h extends Error{constructor(){super();this.name="MaxOpsExceededError"}}function Ws(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((i,r)=>Ws(i,t[r]));if(v(e)&&v(t)){let i=Object.keys(e),r=Object.keys(t);return i.length===r.length&&i.every((a)=>(a in t)&&Ws(e[a],t[a]))}return!1}function A(e){let t=5381;for(let i=0;i<e.length;i++)t=Math.imul(t,33)+(e.codePointAt(i)??0);return t.toString(36)}function m(e){return n(e)?`s:${e}`:`n:${A(JSON.stringify(e))}`}function g(e){if(n(e))return"s";let{attributes:t,$props:i}=e,r=(v(t)?t.id:void 0)??(v(i)?i.key:void 0)??"";return`w:${String(e.tagName??"")}:${String(r)}`}function y(e,t,i=Number.POSITIVE_INFINITY){let r=e.length,a=t.length;if(r===0||a===0||r*a>i)return[];let l=Array.from({length:r+1},()=>Array.from({length:a+1},()=>0));for(let s=r-1;s>=0;s--)for(let c=a-1;c>=0;c--)l[s][c]=e[s]===t[c]?l[s+1][c+1]+1:Math.max(l[s+1][c],l[s][c+1]);let f=[],o=0,u=0;while(o<r&&u<a)if(e[o]===t[u])f.push([o,u]),o+=1,u+=1;else if(l[o+1][u]>=l[o][u+1])o+=1;else u+=1;return f}function oT(e,t,i={}){let r=i.maxCells??Number.POSITIVE_INFINITY,a=y(e.map((s)=>m(s)),t.map((s)=>m(s)),r),l=[],f=-1,o=-1,u=[];for(let[s,c]of a)u.push([f+1,s,o+1,c]),l.push({aIndex:s,bIndex:c,identical:!0}),f=s,o=c;u.push([f+1,e.length,o+1,t.length]);for(let[s,c,x,I]of u){let J=e.slice(s,c),O=t.slice(x,I);for(let[M,N]of y(J.map((p)=>g(p)),O.map((p)=>g(p)),r))l.push({aIndex:s+M,bIndex:x+N,identical:!1})}return l.toSorted((s,c)=>s.aIndex-c.aIndex)}function d(e,t){if(e.ops.length>=e.maxOps)throw new h;e.ops.push(t)}function b(e,t,i,r){for(let f of new Set([...Object.keys(i),...Object.keys(r)])){if(f==="children")continue;if(!(f in r))d(e,{key:f,op:"set-key",path:t});else if(!Ws(i[f],r[f]))d(e,{key:f,op:"set-key",path:t,value:r[f]})}let a=i.children,l=r.children;if(Array.isArray(a)&&Array.isArray(l))D(e,t,a,l);else if(!Ws(a,l))d(e,{key:"children",op:"set-key",path:t,value:l})}function D(e,t,i,r){let a=oT(i,r),l=new Set(a.map((o)=>o.aIndex)),f=new Map(a.map((o)=>[o.bIndex,o]));for(let o=i.length-1;o>=0;o--)if(!l.has(o))d(e,{index:o,op:"remove-child",parentPath:t});for(let[o,u]of r.entries()){let s=f.get(o);if(!s){d(e,{index:o,node:u,op:"insert-child",parentPath:t});continue}if(s.identical)continue;let c=i[s.aIndex];if(v(c)&&v(u))b(e,[...t,"children",o],c,u);else if(!Ws(c,u))d(e,{index:o,node:u,op:"set-child",parentPath:t})}}function X2(e,t,i={}){let r={maxOps:i.maxOps??S,ops:[]};try{b(r,[],e,t)}catch(a){if(a instanceof h)return null;throw a}return r.ops}
|
|
2
|
+
export{Ws,oT,X2};
|
|
3
|
+
|
|
4
|
+
//# debugId=13CB015F780E573A64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-tfkznv39.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var tS="__other__";function ls(n){return n.trim().toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d-]/g,"")}function XE(n){let e=n.lastIndexOf(".");return e>0?n.slice(e):""}function QE(n,e,i){let t=n.trim();if(i===void 0||e==="__other__")return t;if(i.kind==="fixed"){let o=ls(t);return o===""?"":`${o}${i.ext}`}return t.toLowerCase().endsWith(e.toLowerCase())?t:`${t}${e}`}function db(n,e,i){let{choice:t,dir:o,known:l=new Set,rows:f=null,taken:u}=i,a=n.trim();if(!a)return t?.kind==="fixed"?"Enter a name.":"Enter a file name.";if(t?.kind==="fixed"&&ls(a)==="")return"Enter at least one letter or number.";let s=a.replaceAll("\\","/");if(s.startsWith("/")||s.endsWith("/"))return"Enter a name, not a path that starts or ends with a slash.";if(s.split("/").includes(".."))return"A name cannot step outside the destination folder.";if(s.includes("/")&&t!==void 0&&e!=="__other__")return`Pick Other… to create a file in a subfolder of ${o==="."?"the project root":o}.`;let r=XE(s);if(e!==""&&e!=="__other__"&&r!==""&&r.toLowerCase()!==e.toLowerCase()&&l.has(r.toLowerCase()))return`You picked ${f?.find((g)=>g.value===e)?.label??e}; this name ends in ${r}.`;if(t?.kind==="locked"&&e==="__other__"){if(r!==""&&r.toLowerCase()!==t.ext.toLowerCase()&&l.has(r.toLowerCase()))return t.because}let d=QE(n,e,t);return u.has(d.toLowerCase())?`${d} already exists in ${o}/.`:""}
|
|
2
|
+
export{tS,ls,XE,QE,db};
|
|
3
|
+
|
|
4
|
+
//# debugId=9B221E936F83A57064756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-tft6r105.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Un,m,Bt}from"./studio-c05wdnt3.js";import{TD}from"./studio-03ct6yfv.js";import{eh}from"./studio-rj9eamf8.js";import{le}from"./studio-qgh13jtz.js";var e="edit",a=new Set(["edit","design"]);function r(t){for(let i of m.tabs.values())if(i.documentPath===t)return i;return null}async function Pl(t){if(!eh(t)){let o=Un(t);if(o&&!o.fileBacked)return TD(t);let{openFileInTab:s}=await (le("rcn56qvm"),import("./files-rcn56qvm.js"));return await s(t),r(t)}let{openFileInTab:i}=await (le("rcn56qvm"),import("./files-rcn56qvm.js"));await i(t);let n=r(t);if(!n)return null;if(!a.has(n.session.ui.canvasMode)&&n.capabilities.modes.includes(e))n.session.ui.canvasMode=e,n.session.ui.preview=!1;return Bt(n.id),n}
|
|
2
|
+
export{Pl};
|
|
3
|
+
|
|
4
|
+
//# debugId=5A9B9E977BBCE27164756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-txf2kysx.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{pe}from"./studio-qgh13jtz.js";var xe=pe(function(Ir){Object.defineProperty(Ir,"__esModule",{value:!0});Ir.regexpCode=Ir.getEsmExportName=Ir.getProperty=Ir.safeStringify=Ir.stringify=Ir.strConcat=Ir.addCodeArg=Ir.str=Ir._=Ir.nil=Ir._Code=Ir.Name=Ir.IDENTIFIER=Ir._CodeOrName=void 0;class Le{}Ir._CodeOrName=Le;Ir.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class he extends Le{constructor(e){super();if(!Ir.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}}}Ir.Name=he;class U extends Le{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 he)t[r.str]=(t[r.str]||0)+1;return t},{})}}Ir._Code=U;Ir.nil=new U("");function Rr(e,...t){let r=[e[0]],n=0;while(n<t.length)Nt(r,t[n]),r.push(e[++n]);return new U(r)}Ir._=Rr;var Ot=new U("+");function qr(e,...t){let r=[Pe(e[0])],n=0;while(n<t.length)r.push(Ot),Nt(r,t[n]),r.push(Ot,Pe(e[++n]));return Gi(r),new U(r)}Ir.str=qr;function Nt(e,t){if(t instanceof U)e.push(...t._items);else if(t instanceof he)e.push(t);else e.push(Wi(t))}Ir.addCodeArg=Nt;function Gi(e){let t=1;while(t<e.length-1){if(e[t]===Ot){let r=Ji(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Ji(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof he||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 he))return`"${e}${t.slice(1)}`;return}function Bi(e,t){return t.emptyStr()?e:e.emptyStr()?t:qr`${e}${t}`}Ir.strConcat=Bi;function Wi(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pe(Array.isArray(e)?e.join(","):e)}function Qi(e){return new U(Pe(e))}Ir.stringify=Qi;function Pe(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ir.safeStringify=Pe;function Zi(e){return typeof e=="string"&&Ir.IDENTIFIER.test(e)?new U(`.${e}`):Rr`[${e}]`}Ir.getProperty=Zi;function Xi(e){if(typeof e=="string"&&Ir.IDENTIFIER.test(e))return new U(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ir.getEsmExportName=Xi;function Yi(e){return new U(e.toString())}Ir.regexpCode=Yi});var Tt=pe(function(Dr){Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ValueScope=Dr.ValueScopeName=Dr.Scope=Dr.varKinds=Dr.UsedValueState=void 0;var D=xe();class jr extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Je;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Je||(Dr.UsedValueState=Je={}));Dr.varKinds={const:new D.Name("const"),let:new D.Name("let"),var:new D.Name("var")};class qt{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof D.Name?e:this.name(e)}name(e){return new D.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}}}Dr.Scope=qt;class It extends D.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=D._`.${new D.Name(t)}[${r}]`}}Dr.ValueScopeName=It;var fa=D._`\n`;class Cr extends qt{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?fa:D.nil}}get(){return this._scope}name(e){return new It(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,s=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[o];if(i){let d=i.get(s);if(d)return d}else i=this._values[o]=new Map;i.set(s,n);let a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}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 D._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let o=D.nil;for(let s in e){let i=e[s];if(!i)continue;let a=r[s]=r[s]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,Je.Started);let d=t(c);if(d){let u=this.opts.es5?Dr.varKinds.var:Dr.varKinds.const;o=D._`${o}${u} ${c} = ${d};${this.opts._n}`}else if(d=n===null||n===void 0?void 0:n(c))o=D._`${o}${d}${this.opts._n}`;else throw new jr(c);a.set(c,Je.Completed)})}return o}}Dr.ValueScope=Cr});var Wt=pe(function(A){Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var P=xe(),K=Tt(),Y=xe();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return Y._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return Y.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return Y.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return Y.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return Y.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return Y.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return Y.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return Y.Name}});var Ye=Tt();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return Ye.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return Ye.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return Ye.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return Ye.varKinds}});A.operators={GT:new P._Code(">"),GTE:new P._Code(">="),LT:new P._Code("<"),LTE:new P._Code("<="),EQ:new P._Code("==="),NEQ:new P._Code("!=="),NOT:new P._Code("!"),OR:new P._Code("||"),AND:new P._Code("&&"),ADD:new P._Code("+")};class ee{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Mr extends ee{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?K.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=_e(this.rhs,e,t);return this}get names(){return this.rhs instanceof P._CodeOrName?this.rhs.names:{}}}class Dt extends ee{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 P.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=_e(this.rhs,e,t),this}get names(){let e=this.lhs instanceof P.Name?{}:{...this.lhs.names};return Xe(e,this.rhs)}}class Fr extends Dt{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Vr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class zr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Ur extends ee{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class Kr extends ee{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=_e(this.code,e,t),this}get names(){return this.code instanceof P._CodeOrName?this.code.names:{}}}class et extends ee{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,n=r.length;while(n--){let o=r[n];if(o.optimizeNames(e,t))continue;_a(e,o.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>se(e,t.names),{})}}class te extends et{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Hr extends et{}class ke extends te{}ke.kind="else";class Q extends te{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 ke(r):r}if(t){if(e===!1)return t instanceof Q?t:t.nodes;if(this.nodes.length)return this;return new Q(Wr(e),t instanceof Q?[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=_e(this.condition,e,t),this}get names(){let e=super.names;if(Xe(e,this.condition),this.else)se(e,this.else.names);return e}}Q.kind="if";class me extends te{}me.kind="for";class Lr extends me{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=_e(this.iteration,e,t),this}get names(){return se(super.names,this.iteration.names)}}class Gr extends me{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?K.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Xe(super.names,this.from);return Xe(e,this.to)}}class jt extends me{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}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=_e(this.iterable,e,t),this}get names(){return se(super.names,this.iterable.names)}}class Be extends te{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)}}Be.kind="func";class We extends et{render(e){return"return "+super.render(e)}}We.kind="return";class Jr extends te{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,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)se(e,this.catch.names);if(this.finally)se(e,this.finally.names);return e}}class Qe extends te{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Qe.kind="catch";class Ze extends te{render(e){return"finally"+super.render(e)}}Ze.kind="finally";class Br{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
2
|
+
`:""},this._extScope=e,this._scope=new K.Scope({parent:e}),this._nodes=[new Hr]}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,n){let o=this._scope.toName(t);if(r!==void 0&&n)this._constants[o.str]=r;return this._leafNode(new Mr(e,o,r)),o}const(e,t,r){return this._def(K.varKinds.const,e,t,r)}let(e,t,r){return this._def(K.varKinds.let,e,t,r)}var(e,t,r){return this._def(K.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Dt(e,t,r))}add(e,t){return this._leafNode(new Fr(e,A.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==P.nil)this._leafNode(new Kr(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),P.addCodeArg(t,n)}return t.push("}"),new P._Code(t)}if(e,t,r){if(this._blockNode(new Q(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 Q(e))}else(){return this._elseNode(new ke)}endIf(){return this._endBlockNode(Q,ke)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Lr(e),t)}forRange(e,t,r,n,o=this.opts.es5?K.varKinds.var:K.varKinds.let){let s=this._scope.toName(e);return this._for(new Gr(o,s,t,r),()=>n(s))}forOf(e,t,r,n=K.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=t instanceof P.Name?t:this.var("_arr",t);return this.forRange("_i",0,P._`${s}.length`,(i)=>{this.var(o,P._`${s}[${i}]`),r(o)})}return this._for(new jt("of",n,o,t),()=>r(o))}forIn(e,t,r,n=this.opts.es5?K.varKinds.var:K.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,P._`Object.keys(${t})`,r);let o=this._scope.toName(e);return this._for(new jt("in",n,o,t),()=>r(o))}endFor(){return this._endBlockNode(me)}label(e){return this._leafNode(new Vr(e))}break(e){return this._leafNode(new zr(e))}return(e){let t=new We;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(We)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new Jr;if(this._blockNode(n),this.code(e),t){let o=this.name("e");this._currNode=n.catch=new Qe(o),t(o)}if(r)this._currNode=n.finally=new Ze,this.code(r);return this._endBlockNode(Qe,Ze)}throw(e){return this._leafNode(new Ur(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=P.nil,r,n){if(this._blockNode(new Be(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Be)}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 Q))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}}A.CodeGen=Br;function se(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Xe(e,t){return t instanceof P._CodeOrName?se(e,t.names):e}function _e(e,t,r){if(e instanceof P.Name)return n(e);if(!o(e))return e;return new P._Code(e._items.reduce((s,i)=>{if(i instanceof P.Name)i=n(i);if(i instanceof P._Code)s.push(...i._items);else s.push(i);return s},[]));function n(s){let i=r[s.str];if(i===void 0||t[s.str]!==1)return s;return delete t[s.str],i}function o(s){return s instanceof P._Code&&s._items.some((i)=>i instanceof P.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function _a(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Wr(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:P._`!${Ct(e)}`}A.not=Wr;var ga=Qr(A.operators.AND);function ya(...e){return e.reduce(ga)}A.and=ya;var $a=Qr(A.operators.OR);function va(...e){return e.reduce($a)}A.or=va;function Qr(e){return(t,r)=>t===P.nil?r:r===P.nil?t:P._`${Ct(t)} ${e} ${Ct(r)}`}function Ct(e){return e instanceof P.Name?e:P._`(${e})`}});var yn=pe(function(sn){Object.defineProperty(sn,"__esModule",{value:!0});sn.checkStrictMode=sn.getErrorPath=sn.Type=sn.useFunc=sn.setEvaluated=sn.evaluatedPropsToName=sn.mergeEvaluated=sn.eachItem=sn.unescapeJsonPointer=sn.escapeJsonPointer=sn.escapeFragment=sn.unescapeFragment=sn.schemaRefOrVal=sn.schemaHasRulesButRef=sn.schemaHasRules=sn.checkUnknownRules=sn.alwaysValidSchema=sn.toHash=void 0;var O=Wt(),Sa=xe();function Pa(e){let t={};for(let r of e)t[r]=!0;return t}sn.toHash=Pa;function xa(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return en(e,t),!tn(t,e.self.RULES.all)}sn.alwaysValidSchema=xa;function en(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let o=n.RULES.keywords;for(let s in t)if(!o[s])on(e,`unknown keyword: "${s}"`)}sn.checkUnknownRules=en;function tn(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}sn.schemaHasRules=tn;function ka(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}sn.schemaHasRulesButRef=ka;function Oa({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return O._`${r}`}return O._`${e}${t}${O.getProperty(n)}`}sn.schemaRefOrVal=Oa;function Na(e){return rn(decodeURIComponent(e))}sn.unescapeFragment=Na;function Ra(e){return encodeURIComponent(Mt(e))}sn.escapeFragment=Ra;function Mt(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}sn.escapeJsonPointer=Mt;function rn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}sn.unescapeJsonPointer=rn;function qa(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}sn.eachItem=qa;function Xr({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let c=i===void 0?s:i instanceof O.Name?(s instanceof O.Name?e(o,s,i):t(o,s,i),i):s instanceof O.Name?(t(o,i,s),s):r(s,i);return a===O.Name&&!(c instanceof O.Name)?n(o,c):c}}sn.mergeEvaluated={props:Xr({mergeNames:(e,t,r)=>e.if(O._`${r} !== true && ${t} !== undefined`,()=>{e.if(O._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,O._`${r} || {}`).code(O._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(O._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,O._`${r} || {}`),Ft(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:nn}),items:Xr({mergeNames:(e,t,r)=>e.if(O._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,O._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(O._`${r} !== true`,()=>e.assign(r,t===!0?!0:O._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function nn(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",O._`{}`);if(t!==void 0)Ft(e,r,t);return r}sn.evaluatedPropsToName=nn;function Ft(e,t,r){Object.keys(r).forEach((n)=>e.assign(O._`${t}${O.getProperty(n)}`,!0))}sn.setEvaluated=Ft;var Yr={};function Ia(e,t){return e.scopeValue("func",{ref:t,code:Yr[t.code]||(Yr[t.code]=new Sa._Code(t.code))})}sn.useFunc=Ia;var At;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(At||(sn.Type=At={}));function Ta(e,t,r){if(e instanceof O.Name){let n=t===At.Num;return r?n?O._`"[" + ${e} + "]"`:O._`"['" + ${e} + "']"`:n?O._`"/" + ${e}`:O._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?O.getProperty(e).toString():"/"+Mt(e)}sn.getErrorPath=Ta;function on(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}sn.checkStrictMode=on});var Lc=pe(function(cn){Object.defineProperty(cn,"__esModule",{value:!0});var I=Wt(),Za={data:new I.Name("data"),valCxt:new I.Name("valCxt"),instancePath:new I.Name("instancePath"),parentData:new I.Name("parentData"),parentDataProperty:new I.Name("parentDataProperty"),rootData:new I.Name("rootData"),dynamicAnchors:new I.Name("dynamicAnchors"),vErrors:new I.Name("vErrors"),errors:new I.Name("errors"),this:new I.Name("this"),self:new I.Name("self"),scope:new I.Name("scope"),json:new I.Name("json"),jsonPos:new I.Name("jsonPos"),jsonLen:new I.Name("jsonLen"),jsonPart:new I.Name("jsonPart")};cn.default=Za});var Oe=pe(function(fn){Object.defineProperty(fn,"__esModule",{value:!0});fn.extendErrors=fn.resetErrorsCount=fn.reportExtraError=fn.reportError=fn.keyword$DataError=fn.keywordError=void 0;var x=Wt(),rt=yn(),j=Lc();fn.keywordError={message:({keyword:e})=>x.str`must pass "${e}" keyword validation`};fn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?x.str`"${e}" keyword must be ${t} ($data)`:x.str`"${e}" keyword is invalid ($data)`};function Ya(e,t=fn.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,c=ln(e,t,r);if(n!==null&&n!==void 0?n:i||a)dn(s,c);else un(o,x._`[${c}]`)}fn.reportError=Ya;function ec(e,t=fn.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=ln(e,t,r);if(dn(o,a),!(s||i))un(n,j.default.vErrors)}fn.reportExtraError=ec;function tc(e,t){e.assign(j.default.errors,t),e.if(x._`${j.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(x._`${j.default.vErrors}.length`,t),()=>e.assign(j.default.vErrors,null)))}fn.resetErrorsCount=tc;function rc({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,j.default.errors,(a)=>{if(e.const(i,x._`${j.default.vErrors}[${a}]`),e.if(x._`${i}.instancePath === undefined`,()=>e.assign(x._`${i}.instancePath`,x.strConcat(j.default.instancePath,s.errorPath))),e.assign(x._`${i}.schemaPath`,x.str`${s.errSchemaPath}/${t}`),s.opts.verbose)e.assign(x._`${i}.schema`,r),e.assign(x._`${i}.data`,n)})}fn.extendErrors=rc;function dn(e,t){let r=e.const("err",t);e.if(x._`${j.default.vErrors} === null`,()=>e.assign(j.default.vErrors,x._`[${r}]`),x._`${j.default.vErrors}.push(${r})`),e.code(x._`${j.default.errors}++`)}function un(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;if(o.$async)r.throw(x._`new ${e.ValidationError}(${t})`);else r.assign(x._`${n}.errors`,t),r.return(!1)}var ie={keyword:new x.Name("keyword"),schemaPath:new x.Name("schemaPath"),params:new x.Name("params"),propertyName:new x.Name("propertyName"),message:new x.Name("message"),schema:new x.Name("schema"),parentSchema:new x.Name("parentSchema")};function ln(e,t,r){let{createErrors:n}=e.it;if(n===!1)return x._`{}`;return nc(e,t,r)}function nc(e,t,r={}){let{gen:n,it:o}=e,s=[oc(o,r),sc(e,r)];return ic(e,t,s),n.object(...s)}function oc({errorPath:e},{instancePath:t}){let r=t?x.str`${e}${rt.getErrorPath(t,rt.Type.Str)}`:e;return[j.default.instancePath,x.strConcat(j.default.instancePath,r)]}function sc({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:x.str`${t}/${e}`;if(r)o=x.str`${o}${rt.getErrorPath(r,rt.Type.Str)}`;return[ie.schemaPath,o]}function ic(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:c,propertyName:d,topSchemaRef:u,schemaPath:l}=a;if(n.push([ie.keyword,o],[ie.params,typeof t=="function"?t(e):t||x._`{}`]),c.messages)n.push([ie.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([ie.schema,i],[ie.parentSchema,x._`${u}${l}`],[j.default.data,s]);if(d)n.push([ie.propertyName,d])}});var gn=pe(function(mn){Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var lc=Oe(),fc=Wt(),hc=Lc(),pc={message:"boolean schema is false"};function mc(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)pn(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(hc.default.data);else t.assign(fc._`${n}.errors`,null),t.return(!0)}mn.topBoolOrEmptySchema=mc;function _c(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),pn(e);else r.var(t,!0)}mn.boolOrEmptySchema=_c;function pn(e,t){let{gen:r,data:n}=e;lc.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},pc,void 0,t)}});var zt=pe(function($n){Object.defineProperty($n,"__esModule",{value:!0});$n.getRules=$n.isJSONType=void 0;var yc=["string","number","integer","boolean","null","object","array"],$c=new Set(yc);function vc(e){return typeof e=="string"&&$c.has(e)}$n.isJSONType=vc;function wc(){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:{}}}$n.getRules=wc});var Ut=pe(function(bn){Object.defineProperty(bn,"__esModule",{value:!0});bn.shouldUseRule=bn.shouldUseGroup=bn.schemaHasRulesForType=void 0;function bc({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&wn(e,n)}bn.schemaHasRulesForType=bc;function wn(e,t){return t.rules.some((r)=>En(e,r))}bn.shouldUseGroup=wn;function En(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}bn.shouldUseRule=En});var Ne=pe(function(On){Object.defineProperty(On,"__esModule",{value:!0});On.reportTypeError=On.checkDataTypes=On.checkDataType=On.coerceAndCheckDataType=On.getJSONTypes=On.getSchemaTypes=On.DataType=void 0;var xc=zt(),kc=Ut(),Oc=Oe(),S=Wt(),Pn=yn(),ge;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ge||(On.DataType=ge={}));function Nc(e){let t=xn(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}On.getSchemaTypes=Nc;function xn(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(xc.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}On.getJSONTypes=xn;function Rc(e,t){let{gen:r,data:n,opts:o}=e,s=qc(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&kc.schemaHasRulesForType(e,t[0]));if(i){let a=Ht(t,n,o.strictNumbers,ge.Wrong);r.if(a,()=>{if(s.length)Ic(e,t,s);else Lt(e)})}return i}On.coerceAndCheckDataType=Rc;var kn=new Set(["string","number","integer","boolean","null"]);function qc(e,t){return t?e.filter((r)=>kn.has(r)||t==="array"&&r==="array"):[]}function Ic(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",S._`typeof ${o}`),a=n.let("coerced",S._`undefined`);if(s.coerceTypes==="array")n.if(S._`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,S._`${o}[0]`).assign(i,S._`typeof ${o}`).if(Ht(t,o,s.strictNumbers),()=>n.assign(a,o)));n.if(S._`${a} !== undefined`);for(let d of r)if(kn.has(d)||d==="array"&&s.coerceTypes==="array")c(d);n.else(),Lt(e),n.endIf(),n.if(S._`${a} !== undefined`,()=>{n.assign(o,a),Tc(e,a)});function c(d){switch(d){case"string":n.elseIf(S._`${i} == "number" || ${i} == "boolean"`).assign(a,S._`"" + ${o}`).elseIf(S._`${o} === null`).assign(a,S._`""`);return;case"number":n.elseIf(S._`${i} == "boolean" || ${o} === null
|
|
3
|
+
|| (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,S._`+${o}`);return;case"integer":n.elseIf(S._`${i} === "boolean" || ${o} === null
|
|
4
|
+
|| (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,S._`+${o}`);return;case"boolean":n.elseIf(S._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf(S._`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf(S._`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf(S._`${i} === "string" || ${i} === "number"
|
|
5
|
+
|| ${i} === "boolean" || ${o} === null`).assign(a,S._`[${o}]`)}}}function Tc({gen:e,parentData:t,parentDataProperty:r},n){e.if(S._`${t} !== undefined`,()=>e.assign(S._`${t}[${r}]`,n))}function Kt(e,t,r,n=ge.Correct){let o=n===ge.Correct?S.operators.EQ:S.operators.NEQ,s;switch(e){case"null":return S._`${t} ${o} null`;case"array":s=S._`Array.isArray(${t})`;break;case"object":s=S._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i(S._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return S._`typeof ${t} ${o} ${e}`}return n===ge.Correct?s:S.not(s);function i(a=S.nil){return S.and(S._`typeof ${t} == "number"`,a,r?S._`isFinite(${t})`:S.nil)}}On.checkDataType=Kt;function Ht(e,t,r,n){if(e.length===1)return Kt(e[0],t,r,n);let o,s=Pn.toHash(e);if(s.array&&s.object){let i=S._`typeof ${t} != "object"`;o=s.null?i:S._`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=S.nil;if(s.number)delete s.integer;for(let i in s)o=S.and(o,Kt(i,t,r,n));return o}On.checkDataTypes=Ht;var jc={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?S._`{type: ${e}}`:S._`{type: ${t}}`};function Lt(e){let t=Cc(e);Oc.reportError(t,jc)}On.reportTypeError=Lt;function Cc(e){let{gen:t,data:r,schema:n}=e,o=Pn.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var Tn=pe(function(qn){Object.defineProperty(qn,"__esModule",{value:!0});qn.assignDefaults=void 0;var ye=Wt(),Uc=yn();function Kc(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)Rn(e,o,r[o].default);else if(t==="array"&&Array.isArray(n))n.forEach((o,s)=>Rn(e,s,o.default))}qn.assignDefaults=Kc;function Rn(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=ye._`${s}${ye.getProperty(t)}`;if(o){Uc.checkStrictMode(e,`default is ignored for: ${a}`);return}let c=ye._`${a} === undefined`;if(i.useDefaults==="empty")c=ye._`${c} || ${a} === null || ${a} === ""`;n.if(c,ye._`${a} = ${ye.stringify(r)}`)}});var V=pe(function(Dn){Object.defineProperty(Dn,"__esModule",{value:!0});Dn.validateUnion=Dn.validateArray=Dn.usePattern=Dn.callValidateCode=Dn.schemaProperties=Dn.allSchemaProperties=Dn.noPropertyInData=Dn.propertyInData=Dn.isOwnProperty=Dn.hasPropFunc=Dn.reportMissingProp=Dn.checkMissingProp=Dn.checkReportMissingProp=void 0;var N=Wt(),Gt=yn(),re=Lc(),Hc=yn();function Gc(e,t){let{gen:r,data:n,it:o}=e;r.if(Bt(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:N._`${t}`},!0),e.error()})}Dn.checkReportMissingProp=Gc;function Jc({gen:e,data:t,it:{opts:r}},n,o){return N.or(...n.map((s)=>N.and(Bt(e,t,s,r.ownProperties),N._`${o} = ${s}`)))}Dn.checkMissingProp=Jc;function Bc(e,t){e.setParams({missingProperty:t},!0),e.error()}Dn.reportMissingProp=Bc;function jn(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:N._`Object.prototype.hasOwnProperty`})}Dn.hasPropFunc=jn;function Jt(e,t,r){return N._`${jn(e)}.call(${t}, ${r})`}Dn.isOwnProperty=Jt;function Wc(e,t,r,n){let o=N._`${t}${N.getProperty(r)} !== undefined`;return n?N._`${o} && ${Jt(e,t,r)}`:o}Dn.propertyInData=Wc;function Bt(e,t,r,n){let o=N._`${t}${N.getProperty(r)} === undefined`;return n?N.or(o,N.not(Jt(e,t,r))):o}Dn.noPropertyInData=Bt;function Cn(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}Dn.allSchemaProperties=Cn;function Qc(e,t){return Cn(t).filter((r)=>!Gt.alwaysValidSchema(e,t[r]))}Dn.schemaProperties=Qc;function Zc({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,c,d){let u=d?N._`${e}, ${t}, ${n}${o}`:t,l=[[re.default.instancePath,N.strConcat(re.default.instancePath,s)],[re.default.parentData,i.parentData],[re.default.parentDataProperty,i.parentDataProperty],[re.default.rootData,re.default.rootData]];if(i.opts.dynamicRef)l.push([re.default.dynamicAnchors,re.default.dynamicAnchors]);let _=N._`${u}, ${r.object(...l)}`;return c!==N.nil?N._`${a}.call(${c}, ${_})`:N._`${a}(${_})`}Dn.callValidateCode=Zc;var Xc=N._`new RegExp`;function Yc({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:N._`${o.code==="new RegExp"?Xc:Hc.useFunc(e,o)}(${r}, ${n})`})}Dn.usePattern=Yc;function ed(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let c=t.const("len",N._`${r}.length`);t.forRange("i",0,c,(d)=>{e.subschema({keyword:n,dataProp:d,dataPropType:Gt.Type.Num},s),t.if(N.not(s),a)})}}Dn.validateArray=ed;function td(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>Gt.alwaysValidSchema(o,c))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,d)=>{let u=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},a);if(t.assign(i,N._`${i} || ${a}`),!e.mergeValidEvaluated(u,a))t.if(N.not(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}Dn.validateUnion=td});var Un=pe(function(Vn){Object.defineProperty(Vn,"__esModule",{value:!0});Vn.validateKeywordUsage=Vn.validSchemaType=Vn.funcKeywordCode=Vn.macroKeywordCode=void 0;var C=Wt(),ae=Lc(),pd=V(),md=Oe();function _d(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),c=Fn(r,n,a);if(i.opts.validateSchema!==!1)i.self.validateSchema(a,!0);let d=r.name("valid");e.subschema({schema:a,schemaPath:C.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}Vn.macroKeywordCode=_d;function gd(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:c}=e;$d(c,t);let d=!a&&t.compile?t.compile.call(c.self,s,i,c):t.validate,u=Fn(n,o,d),l=n.let("valid");e.block$data(l,_),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function _(){if(t.errors===!1){if(f(),t.modifying)Mn(e);p(()=>e.error())}else{let g=t.async?m():h();if(t.modifying)Mn(e);p(()=>yd(e,g))}}function m(){let g=n.let("ruleErrs",null);return n.try(()=>f(C._`await `),(w)=>n.assign(l,!1).if(C._`${w} instanceof ${c.ValidationError}`,()=>n.assign(g,C._`${w}.errors`),()=>n.throw(w))),g}function h(){let g=C._`${u}.errors`;return n.assign(g,null),f(C.nil),g}function f(g=t.async?C._`await `:C.nil){let w=c.opts.passContext?ae.default.this:ae.default.self,E=!(("compile"in t)&&!a||t.schema===!1);n.assign(l,C._`${g}${pd.callValidateCode(e,u,w,E)}`,t.modifying)}function p(g){var w;n.if(C.not((w=t.valid)!==null&&w!==void 0?w:l),g)}}Vn.funcKeywordCode=gd;function Mn(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,C._`${n.parentData}[${n.parentDataProperty}]`))}function yd(e,t){let{gen:r}=e;r.if(C._`Array.isArray(${t})`,()=>{r.assign(ae.default.vErrors,C._`${ae.default.vErrors} === null ? ${t} : ${ae.default.vErrors}.concat(${t})`).assign(ae.default.errors,C._`${ae.default.vErrors}.length`),md.extendErrors(e)},()=>e.error())}function $d({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function Fn(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:C.stringify(r)})}function vd(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Vn.validSchemaType=vd;function wd({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw Error("ajv implementation error");let i=o.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 ${s}: ${i.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}Vn.validateKeywordUsage=wd});var Gn=pe(function(Hn){Object.defineProperty(Hn,"__esModule",{value:!0});Hn.extendSubschemaMode=Hn.extendSubschemaData=Hn.getSubschema=void 0;var B=Wt(),Kn=yn();function Pd(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==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:B._`${e.schemaPath}${B.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:B._`${e.schemaPath}${B.getProperty(t)}${B.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${Kn.escapeFragment(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')}Hn.getSubschema=Pd;function xd(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==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:d,dataPathArr:u,opts:l}=t,_=a.let("data",B._`${t.data}${B.getProperty(r)}`,!0);c(_),e.errorPath=B.str`${d}${Kn.getErrorPath(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=B._`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(o!==void 0){let d=o instanceof B.Name?o:a.let("data",o,!0);if(c(d),i!==void 0)e.propertyName=i}if(s)e.dataTypes=s;function c(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}}Hn.extendSubschemaData=xd;function kd(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(o!==void 0)e.createErrors=o;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t,e.jtdMetadata=r}Hn.extendSubschemaMode=kd});var Qt=pe(function(hm,Jn){Jn.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 n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))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(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var Wn=pe(function(pm,Bn){var ne=Bn.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};nt(t,n,o,e,"",e)};ne.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ne.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ne.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ne.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 nt(e,t,r,n,o,s,i,a,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,c,d);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in ne.arrayKeywords)for(var _=0;_<l.length;_++)nt(e,t,r,l[_],o+"/"+u+"/"+_,s,o,u,n,_)}else if(u in ne.propsKeywords){if(l&&typeof l=="object")for(var m in l)nt(e,t,r,l[m],o+"/"+u+"/"+Rd(m),s,o,u,n,m)}else if(u in ne.keywords||e.allKeys&&!(u in ne.skipKeywords))nt(e,t,r,l,o+"/"+u,s,o,u,n)}r(n,o,s,i,a,c,d)}}function Rd(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Re=pe(function(Yn){Object.defineProperty(Yn,"__esModule",{value:!0});Yn.getSchemaRefs=Yn.resolveUrl=Yn.normalizeId=Yn._getFullPath=Yn.getFullPath=Yn.inlineRef=void 0;var qd=yn(),Id=Qt(),Td=Wn(),jd=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Cd(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!Zt(e);if(!t)return!1;return Qn(e)<=t}Yn.inlineRef=Cd;var Dd=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zt(e){for(let t in e){if(Dd.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Zt))return!0;if(typeof r=="object"&&Zt(r))return!0}return!1}function Qn(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,jd.has(r))continue;if(typeof e[r]=="object")qd.eachItem(e[r],(n)=>t+=Qn(n));if(t===1/0)return 1/0}return t}function Zn(e,t="",r){if(r!==!1)t=$e(t);let n=e.parse(t);return Xn(e,n)}Yn.getFullPath=Zn;function Xn(e,t){return e.serialize(t).split("#")[0]+"#"}Yn._getFullPath=Xn;var Ad=/#\/?$/;function $e(e){return e?e.replace(Ad,""):""}Yn.normalizeId=$e;function Md(e,t,r){return r=$e(r),e.resolve(t,r)}Yn.resolveUrl=Md;var Fd=/^[a-z_][-a-z0-9._]*$/i;function Vd(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=$e(e[r]||t),s={"":o},i=Zn(n,o,!1),a={},c=new Set;return Td(e,{allKeys:!0},(l,_,m,h)=>{if(h===void 0)return;let f=i+_,p=s[h];if(typeof l[r]=="string")p=g.call(this,l[r]);w.call(this,l.$anchor),w.call(this,l.$dynamicAnchor),s[_]=p;function g(E){let k=this.opts.uriResolver.resolve;if(E=$e(p?k(p,E):E),c.has(E))throw u(E);c.add(E);let b=this.refs[E];if(typeof b=="string")b=this.refs[b];if(typeof b=="object")d(l,b.schema,E);else if(E!==$e(f))if(E[0]==="#")d(l,a[E],E),a[E]=l;else this.refs[E]=f;return E}function w(E){if(typeof E=="string"){if(!Fd.test(E))throw Error(`invalid anchor "${E}"`);g.call(this,`#${E}`)}}}),a;function d(l,_,m){if(_!==void 0&&!Id(l,_))throw u(m)}function u(l){return Error(`reference "${l}" resolves to more than one schema`)}}Yn.getSchemaRefs=Vd});var Ig=pe(function(_o){Object.defineProperty(_o,"__esModule",{value:!0});_o.getData=_o.KeywordCxt=_o.validateFunctionCode=void 0;var oo=gn(),so=Ne(),Xt=Ut(),ot=Ne(),Gd=Tn(),qe=Un(),Yt=Gn(),y=Wt(),v=Lc(),Jd=Re(),Z=yn(),Ie=Oe();function Bd(e){if(co(e)){if(uo(e),ao(e)){Zd(e);return}}io(e,()=>oo.topBoolOrEmptySchema(e))}_o.validateFunctionCode=Bd;function io({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){if(o.code.es5)e.func(t,y._`${v.default.data}, ${v.default.valCxt}`,n.$async,()=>{e.code(y._`"use strict"; ${to(r,o)}`),Qd(e,o),e.code(s)});else e.func(t,y._`${v.default.data}, ${Wd(o)}`,n.$async,()=>e.code(to(r,o)).code(s))}function Wd(e){return y._`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${e.dynamicRef?y._`, ${v.default.dynamicAnchors}={}`:y.nil}}={}`}function Qd(e,t){e.if(v.default.valCxt,()=>{if(e.var(v.default.instancePath,y._`${v.default.valCxt}.${v.default.instancePath}`),e.var(v.default.parentData,y._`${v.default.valCxt}.${v.default.parentData}`),e.var(v.default.parentDataProperty,y._`${v.default.valCxt}.${v.default.parentDataProperty}`),e.var(v.default.rootData,y._`${v.default.valCxt}.${v.default.rootData}`),t.dynamicRef)e.var(v.default.dynamicAnchors,y._`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{if(e.var(v.default.instancePath,y._`""`),e.var(v.default.parentData,y._`undefined`),e.var(v.default.parentDataProperty,y._`undefined`),e.var(v.default.rootData,v.default.data),t.dynamicRef)e.var(v.default.dynamicAnchors,y._`{}`)})}function Zd(e){let{schema:t,opts:r,gen:n}=e;io(e,()=>{if(r.$comment&&t.$comment)fo(e);if(ru(e),n.let(v.default.vErrors,null),n.let(v.default.errors,0),r.unevaluated)Xd(e);lo(e),su(e)});return}function Xd(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",y._`${r}.evaluated`),t.if(y._`${e.evaluated}.dynamicProps`,()=>t.assign(y._`${e.evaluated}.props`,y._`undefined`)),t.if(y._`${e.evaluated}.dynamicItems`,()=>t.assign(y._`${e.evaluated}.items`,y._`undefined`))}function to(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?y._`/*# sourceURL=${r} */`:y.nil}function Yd(e,t){if(co(e)){if(uo(e),ao(e)){eu(e,t);return}}oo.boolOrEmptySchema(e,t)}function ao({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 co(e){return typeof e.schema!="boolean"}function eu(e,t){let{schema:r,gen:n,opts:o}=e;if(o.$comment&&r.$comment)fo(e);nu(e),ou(e);let s=n.const("_errs",v.default.errors);lo(e,s),n.var(t,y._`${s} === ${v.default.errors}`)}function uo(e){Z.checkUnknownRules(e),tu(e)}function lo(e,t){if(e.opts.jtd)return ro(e,[],!1,t);let r=so.getSchemaTypes(e.schema),n=so.coerceAndCheckDataType(e,r);ro(e,r,!n,t)}function tu(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&Z.schemaHasRulesButRef(t,o.RULES))o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ru(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)Z.checkStrictMode(e,"default is ignored in the schema root")}function nu(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=Jd.resolveUrl(e.opts.uriResolver,e.baseId,t)}function ou(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function fo({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code(y._`${v.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=y.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(y._`${v.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function su(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;if(r.$async)t.if(y._`${v.default.errors} === 0`,()=>t.return(v.default.data),()=>t.throw(y._`new ${o}(${v.default.vErrors})`));else{if(t.assign(y._`${n}.errors`,v.default.vErrors),s.unevaluated)iu(e);t.return(y._`${v.default.errors} === 0`)}}function iu({gen:e,evaluated:t,props:r,items:n}){if(r instanceof y.Name)e.assign(y._`${t}.props`,r);if(n instanceof y.Name)e.assign(y._`${t}.items`,n)}function ro(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:c,self:d}=e,{RULES:u}=d;if(s.$ref&&(c.ignoreKeywordsWithRef||!Z.schemaHasRulesButRef(s,u))){o.block(()=>po(e,"$ref",u.all.$ref.definition));return}if(!c.jtd)au(e,t);o.block(()=>{for(let _ of u.rules)l(_);l(u.post)});function l(_){if(!Xt.shouldUseGroup(s,_))return;if(_.type){if(o.if(ot.checkDataType(_.type,i,c.strictNumbers)),no(e,_),t.length===1&&t[0]===_.type&&r)o.else(),ot.reportTypeError(e);o.endIf()}else no(e,_);if(!a)o.if(y._`${v.default.errors} === ${n||0}`)}}function no(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;if(o)Gd.assignDefaults(e,t.type);r.block(()=>{for(let s of t.rules)if(Xt.shouldUseRule(n,s))po(e,s.keyword,s.definition,t.type)})}function au(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(cu(e,t),!e.opts.allowUnionTypes)du(e,t);uu(e,e.dataTypes)}function cu(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!ho(e.dataTypes,r))er(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),fu(e,t)}function du(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))er(e,"use allowUnionTypes to allow union type keyword")}function uu(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&Xt.shouldUseRule(e.schema,o)){let{type:s}=o.definition;if(s.length&&!s.some((i)=>lu(t,i)))er(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function lu(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function ho(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function fu(e,t){let r=[];for(let n of e.dataTypes)if(ho(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function er(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,Z.checkStrictMode(e,t,e.opts.strictTypes)}class tr{constructor(e,t,r){if(qe.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=Z.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",mo(this.$data,e));else if(this.schemaCode=this.schemaValue,!qe.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",v.default.errors)}result(e,t,r){this.failResult(y.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(y.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(y._`${t} !== undefined && (${y.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?Ie.reportExtraError:Ie.reportError)(this,this.def.error,t)}$dataError(){Ie.reportError(this,this.def.$dataError||Ie.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');Ie.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=y.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=y.nil,t=y.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:o,def:s}=this;if(r.if(y.or(y._`${n} === undefined`,t)),e!==y.nil)r.assign(e,!0);if(o.length||s.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==y.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return y.or(s(),i());function s(){if(r.length){if(!(t instanceof y.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return y._`${ot.checkDataTypes(a,t,o.opts.strictNumbers,ot.DataType.Wrong)}`}return y.nil}function i(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return y._`!${a}(${t})`}return y.nil}}subschema(e,t){let r=Yt.getSubschema(this.it,e);Yt.extendSubschemaData(r,this.it,e),Yt.extendSubschemaMode(r,e);let n={...this.it,...r,items:void 0,props:void 0};return Yd(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=Z.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=Z.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,y.Name)),!0}}_o.KeywordCxt=tr;function po(e,t,r,n){let o=new tr(e,r,t);if("code"in r)r.code(o,n);else if(o.$data&&r.validate)qe.funcKeywordCode(o,r);else if("macro"in r)qe.macroKeywordCode(o,r);else if(r.compile||r.validate)qe.funcKeywordCode(o,r)}var hu=/^\/(?:[^~]|~0|~1)*$/,pu=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function mo(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return v.default.rootData;if(e[0]==="/"){if(!hu.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,s=v.default.rootData}else{let d=pu.exec(e);if(!d)throw Error(`Invalid JSON-pointer: ${e}`);let u=+d[1];if(o=d[2],o==="#"){if(u>=t)throw Error(c("property/index",u));return n[t-u]}if(u>t)throw Error(c("data",u));if(s=r[t-u],!o)return s}let i=s,a=o.split("/");for(let d of a)if(d)s=y._`${s}${y.getProperty(Z.unescapeJsonPointer(d))}`,i=y._`${i} && ${s}`;return i;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${t}`}}_o.getData=mo});var _y=pe(function($o){Object.defineProperty($o,"__esModule",{value:!0});class yo extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}$o.default=yo});var Rg=pe(function(wo){Object.defineProperty(wo,"__esModule",{value:!0});var rr=Re();class vo extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=rr.resolveUrl(e,t,r),this.missingSchema=rr.normalizeId(rr.getFullPath(e,this.missingRef))}}wo.default=vo});var Z0=pe(function(So){Object.defineProperty(So,"__esModule",{value:!0});So.resolveSchema=So.getCompilingSchema=So.resolveRef=So.compileSchema=So.SchemaEnv=void 0;var H=Wt(),$u=_y(),ce=Lc(),L=Re(),Eo=yn(),vu=Ig();class Te{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:L.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={}}}So.SchemaEnv=Te;function or(e){let t=bo.call(this,e);if(t)return t;let r=L.getFullPath(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new H.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;if(e.$async)a=i.scopeValue("Error",{ref:$u.default,code:H._`require("ajv/dist/runtime/validation_error").default`});let c=i.scopeName("validate");e.validateName=c;let d={gen:i,allErrors:this.opts.allErrors,data:ce.default.data,parentData:ce.default.parentData,parentDataProperty:ce.default.parentDataProperty,dataNames:[ce.default.data],dataPathArr:[H.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:H.stringify(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:H.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:H._`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),vu.validateFunctionCode(d),i.optimize(this.opts.code.optimize);let l=i.toString();if(u=`${i.scopeRefs(ce.default.scope)}return ${l}`,this.opts.code.process)u=this.opts.code.process(u,e);let m=Function(`${ce.default.self}`,`${ce.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async)m.$async=!0;if(this.opts.code.source===!0)m.source={validateName:c,validateCode:l,scopeValues:i._values};if(this.opts.unevaluated){let{props:h,items:f}=d;if(m.evaluated={props:h instanceof H.Name?void 0:h,items:f instanceof H.Name?void 0:f,dynamicProps:h instanceof H.Name,dynamicItems:f instanceof H.Name},m.source)m.source.evaluated=H.stringify(m.evaluated)}return e.validate=m,e}catch(l){if(delete e.validate,delete e.validateName,u)this.logger.error("Error compiling schema, function code:",u);throw l}finally{this._compilations.delete(e)}}So.compileSchema=or;function wu(e,t,r){var n;r=L.resolveUrl(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=Su.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(i)s=new Te({schema:i,schemaId:a,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=Eu.call(this,s)}So.resolveRef=wu;function Eu(e){if(L.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:or.call(this,e)}function bo(e){for(let t of this._compilations)if(bu(t,e))return t}So.getCompilingSchema=bo;function bu(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Su(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||st.call(this,e,t)}function st(e,t){let r=this.opts.uriResolver.parse(t),n=L._getFullPath(this.opts.uriResolver,r),o=L.getFullPath(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return nr.call(this,r,e);let s=L.normalizeId(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=st.call(this,e,i);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return nr.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(s===L.normalizeId(t)){let{schema:a}=i,{schemaId:c}=this.opts,d=a[c];if(d)o=L.resolveUrl(this.opts.uriResolver,o,d);return new Te({schema:a,schemaId:c,root:e,baseId:o})}return nr.call(this,r,i)}So.resolveSchema=st;var Pu=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function nr(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[Eo.unescapeFragment(a)];if(c===void 0)return;r=c;let d=typeof r==="object"&&r[this.opts.schemaId];if(!Pu.has(a)&&d)t=L.resolveUrl(this.opts.uriResolver,t,d)}let s;if(typeof r!="boolean"&&r.$ref&&!Eo.schemaHasRulesButRef(r,this.RULES)){let a=L.resolveUrl(this.opts.uriResolver,t,r.$ref);s=st.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Te({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s;return}});var xo=pe(function(vm,Ru){Ru.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 ur=pe(function(wm,To){var qu=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ir=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),Iu=RegExp.prototype.test.bind(/^\d*$/u),de=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),ar=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Oo=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),cr=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Tu=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),M=Array(256);for(let t=0;t<256;t++)M[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function T(e){if(e<2048)return M[192|e>>6]+M[128|e&63];if(e<65536)return M[224|e>>12]+M[128|e>>6&63]+M[128|e&63];return M[240|e>>18]+M[128|e>>12&63]+M[128|e>>6&63]+M[128|e&63]}function ju(e){let t="",r=0,n=0;for(n=0;n<e.length;n++){if(r=e[n].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var Cu=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Du=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),Au=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Mu=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Fu(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(Au(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&de(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function ko(e){let t=-1,r=0,n=-1,o=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(n===-1)n=a;if(o++,o>r)r=o,t=n}else n=-1,o=0;if(r<2)return e.join(":");let s=e.slice(0,t).join(":"),i=e.slice(t+r).join(":");return s+"::"+i}function Vu(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(":"),n=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(n.length===1&&n[0]==="")n.length=0}let o=r.concat(n),s=0;for(let a=0;a<o.length;a++){let c=o[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==o.length-1||t!==-1&&n.length===0||!ir(c))return;s+=2;continue}if(!Cu(c))return;o[a]=parseInt(c,16).toString(16),s++}if(t===-1){if(s!==8)return;return ko(o)}if(s>=8)return;let i=o.slice(0,r.length);for(let a=s;a<8;a++)i.push("0");for(let a=r.length;a<o.length;a++)i.push(o[a]);return ko(i)}function sr(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 n=t?e.slice(1,-1):e;if(t&&Du(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(zu(n,":")<2)return{host:e,isIPV6:!1,error:t};let o="",s=n.indexOf("%");if(s!==-1){let a=n.slice(s,s+3).toLowerCase()==="%25"?3:1;if(o=n.slice(s+a),!Fu(o))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,s)}let i=Vu(n);if(i===void 0)return{host:e,isIPV6:!1,error:!0};return{host:i+(o?"%"+o:""),escapedHost:i+(o?"%25"+o:""),isIPV6:!0}}function zu(e,t){let r=0;for(let n=0;n<e.length;n++)if(e[n]===t)r++;return r}function Uu(e){let t=e,r=[],n=-1,o=0;while(o=t.length){if(o===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(o===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(o===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((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}var Ku={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Hu=/[@/?#:]/g,Lu=/[@/?#]/g;function No(e,t){let r=t?Lu:Hu;return r.lastIndex=0,e.replace(r,(n)=>Ku[n])}function Ro(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let o=e.slice(n+1,n+3);if(de(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));if(t&&ar(i))r+=i;else r+="%"+s;n+=2;continue}}r+=e[n]}return r}function Gu(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let o=e.slice(r+1,r+3);if(de(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));if(i!=="."&&ar(i))t+=i;else t+="%"+s;r+=2;continue}}if(Oo(n))t+=n;else{let o=e.charCodeAt(r);if(o<128)t+=Io(o)?n:M[o];else if(o<55296||o>57343)t+=T(o);else if(o<=56319&&r+1<e.length){let s=e.charCodeAt(r+1);if(s>=56320&&s<=57343)t+=T(65536+(o-55296<<10)+(s-56320)),r++;else t+=T(65533)}else t+=T(65533)}}return t}function Ju(e,t=!1){let r="",n=t&&e[0]!=="/";for(let o=0;o<e.length;o++){let s=e[o];if(s==="%"&&o+2<e.length){let i=e.slice(o+1,o+3);if(de(i)){r+="%"+i.toUpperCase(),o+=2;continue}}if(s==="/")n=!1;if(Oo(s)&&(s!==":"||!n))r+=s;else{let i=e.charCodeAt(o);if(i<128)r+=M[i];else if(i<55296||i>57343)r+=T(i);else if(i<=56319&&o+1<e.length){let a=e.charCodeAt(o+1);if(a>=56320&&a<=57343)r+=T(65536+(i-55296<<10)+(a-56320)),o++;else r+=T(65533)}else r+=T(65533)}}return r}function dr(e,t){let r="";for(let n=0;n<e.length;n++){let o=e[n];if(o==="%"&&n+2<e.length){let s=e.slice(n+1,n+3);if(de(s)){r+="%"+s.toUpperCase(),n+=2;continue}}if(t(o))r+=o;else{let s=e.charCodeAt(n);if(s<128)r+=M[s];else if(s<55296||s>57343)r+=T(s);else if(s<=56319&&n+1<e.length){let i=e.charCodeAt(n+1);if(i>=56320&&i<=57343)r+=T(65536+(s-55296<<10)+(i-56320)),n++;else r+=T(65533)}else r+=T(65533)}}return r}function qo(e){return dr(e,Tu)}function Bu(e){return dr(e,cr)}function Wu(e){return dr(e,cr)}function Io(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 Qu(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let o=e.slice(r+1,r+3);if(de(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));if(ar(i))t+=i;else t+="%"+s;r+=2;continue}}if(cr(n))t+=n;else{let o=e.charCodeAt(r);if(o<128)t+=Io(o)?n:M[o];else if(o<55296||o>57343)t+=T(o);else if(o<=56319&&r+1<e.length){let s=e.charCodeAt(r+1);if(s>=56320&&s<=57343)t+=T(65536+(o-55296<<10)+(s-56320)),r++;else t+=T(65533)}else t+=T(65533)}}return t}function Zu(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(de(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function Xu(e){let t=[];if(e.userinfo!==void 0)t.push(qo(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!ir(r)){let n=sr(r);if(n.isIPV6!==!0&&n.isIPVFuture!==!0)r=Ro(r,!0),n=sr(r);if(n.isIPV6===!0||n.isIPVFuture===!0)r=`[${n.escapedHost}]`;else r=No(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string"){let r=String(e.port);if(!Iu(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}To.exports={nonSimpleDomain:Mu,recomposeAuthority:Xu,reescapeHostDelimiters:No,normalizePercentEncoding:Ro,normalizePathEncoding:Gu,serializePathEncoding:Ju,normalizeQueryFragmentEncoding:Qu,encodeUserinfo:qo,encodeQuery:Bu,encodeFragment:Wu,escapePreservingEscapes:Zu,removeDotSegments:Uu,isIPv4:ir,isUUID:qu,normalizeIPv6:sr,stringArrayToHexStripped:ju}});var Mo=pe(function(Em,Ao){var{isUUID:Yu}=ur(),el=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,tl=["http","https","ws","wss","urn","urn:uuid"];function rl(e){return tl.indexOf(e)!==-1}function lr(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 jo(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function Co(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 nl(e){return e.secure=lr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function ol(e){if(e.port===(lr(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 sl(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(el);if(r&&r[0]===e.path){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=fr(o);if(e.path=void 0,s)e=s.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function il(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=fr(o);if(s)e=s.serialize(e,t);let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function al(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Yu(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function cl(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Do={scheme:"http",domainHost:!0,parse:jo,serialize:Co},dl={scheme:"https",domainHost:Do.domainHost,parse:jo,serialize:Co},it={scheme:"ws",domainHost:!0,parse:nl,serialize:ol},ul={scheme:"wss",domainHost:it.domainHost,parse:it.parse,serialize:it.serialize},ll={scheme:"urn",parse:sl,serialize:il,skipNormalize:!0},fl={scheme:"urn:uuid",parse:al,serialize:cl,skipNormalize:!0},at={http:Do,https:dl,ws:it,wss:ul,urn:ll,"urn:uuid":fl};Object.setPrototypeOf(at,null);function fr(e){return e&&(at[e]||at[e.toLowerCase()])||void 0}Ao.exports={wsIsSecure:lr,SCHEMES:at,isValidSchemeName:rl,getSchemeHandler:fr}});var Qo=pe(function(bm,ut){var{normalizeIPv6:Ko,removeDotSegments:Ce,recomposeAuthority:hl,normalizePercentEncoding:hr,normalizePathEncoding:pl,serializePathEncoding:Fo,normalizeQueryFragmentEncoding:Vo,encodeQuery:ml,encodeFragment:_l,reescapeHostDelimiters:gl,isIPv4:Ho,nonSimpleDomain:yl}=ur(),{SCHEMES:Lo,getSchemeHandler:pr}=Mo(),Go=/^[A-Za-z][A-Za-z0-9+.-]*$/u;function zo(e){let t=unescape(String(e));if(!Go.test(t))throw TypeError("URI scheme is malformed.");return t}function $l(e,t){if(typeof e==="string")e=kl(e,t);else if(typeof e==="object")e=dt(ue(e,t),t);return e}function vl(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:o,malformedAuthorityOrPort:s,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:d}=ct(e,n),{parsed:u,malformedAuthorityOrPort:l,malformedPercentEncoding:_,malformedSchemeSpecific:m,malformedHost:h,malformedScheme:f}=ct(t,n);if(s||l||i||_||a||m||c||h||d||f)throw Error(o.error||u.error||"URI is malformed.");let p=Jo(o,u,n,!0),g=pr(r&&r.scheme||p.scheme),w=p.host,E=w!==void 0&&w!==""&&(Ho(w)||Ko(w).isIPV6);Bo(p,r||{},g,E);let k=w&&w.indexOf("%")!==-1&&!/\P{ASCII}/u.test(w);if(p.error&&!k)throw Error(p.error);return n.skipEscape=!0,ue(p,n)}function Jo(e,t,r,n){let o={};if(!n)e=dt(ue(e,r),r),t=dt(ue(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Ce(t.path||""),o.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Ce(t.path||""),o.query=t.query;else{if(!t.path)if(o.path=e.path,t.query!==void 0)o.query=t.query;else o.query=e.query;else{if(t.path[0]==="/")o.path=Ce(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)o.path="/"+t.path;else if(!e.path)o.path=t.path;else o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;o.path=Ce(o.path)}o.query=t.query}o.userinfo=e.userinfo,o.host=e.host,o.port=e.port}o.scheme=e.scheme}return o.fragment=t.fragment,o}function wl(e,t,r){let n=Uo(e,r),o=Uo(t,r);return n!==void 0&&o!==void 0&&n===o}function ue(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:""},n=Object.assign({},t),o=[];if(r.scheme)r.scheme=zo(r.scheme);let s=pr(n.scheme||r.scheme);if(s&&s.serialize)s.serialize(r,n);let i=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!n.skipEscape&&r.scheme===void 0&&!i;if(r.path!==void 0)if(!n.skipEscape)r.path=Fo(r.path,a);else r.path=hr(r.path);if(n.reference!=="suffix"&&r.scheme)r.scheme=zo(r.scheme),o.push(r.scheme,":");let c=hl(r);if(c!==void 0){if(n.reference!=="suffix")o.push("//");if(o.push(c),r.path&&r.path[0]!=="/")o.push("/")}if(r.path!==void 0){let d=r.path;if(!n.absolutePath&&(!s||!s.absolutePath))d=Ce(d);if(a)d=Fo(d,!0);if(c===void 0&&d[0]==="/"&&d[1]==="/")d="/%2F"+d.slice(2);o.push(d)}if(r.query!==void 0)o.push("?",ml(r.query));if(r.fragment!==void 0)o.push("#",_l(r.fragment));return o.join("")}var El=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,bl=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Sl=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Pl(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 je(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 xl(e){let t=e[4];return je(e[3])||t!==void 0&&!mr(t)&&je(t)||je(e[6])||je(e[7])||je(e[8])}function Bo(e,t,r,n){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!mr(e.host)&&(t.domainHost||r&&r.domainHost)&&n===!1&&yl(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(o){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+o,!0}return!1}function ct(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,s=!1,i=!1,a=!1,c=!1,d=!1,u=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let l=e.match(bl);if(l!==null&&l[1].indexOf("\\")!==-1)n.error="URI authority must not contain a literal backslash.",o=!0;let _=e.match(Sl);if(_!==null){let h=_[1],f=h.replace(/[\t\n\r]/g,"");if(f.length>=2){if(f.slice(0,2)!=="//")n.error=n.error||"URI authority must not contain a literal backslash.",o=!0;else if(h.length!==f.length)n.error=n.error||"URI authority introducer must not contain whitespace.",o=!0}}let m=e.match(El);if(m){if(n.scheme=m[1],n.userinfo=m[3],n.host=m[4],n.port=parseInt(m[5],10),n.path=m[6]||"",n.query=m[7],n.fragment=m[8],n.scheme!==void 0){let p=unescape(n.scheme);if(Go.test(p))n.scheme=p.toLowerCase();else n.error=n.error||"URI scheme is malformed.",d=!0}if(s=xl(m),s)n.error=n.error||"URI contains malformed percent-encoding.";if(isNaN(n.port))n.port=m[5];let h=Pl(n,m);if(h!==void 0)n.error=n.error||h,o=!0;if(n.host)if(Ho(n.host)===!1){let g=mr(n.host),w=n.host.indexOf("[")!==-1||n.host.indexOf("]")!==-1,E=Ko(n.host);if(u=E.isIPV6||E.isIPVFuture===!0,c=w&&(!g||E.error===!0),n.host=u?E.host:E.host.toLowerCase(),c)n.error=n.error||"URI host is malformed.",o=!0}else u=!0;if(n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path)n.reference="same-document";else if(n.scheme===void 0)n.reference="relative";else if(n.fragment===void 0)n.reference="absolute";else n.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==n.reference)n.error=n.error||"URI is not a "+r.reference+" reference.";let f=pr(r.scheme||n.scheme);if(!c)a=Bo(n,r,f,u);if(e.indexOf("%")!==-1&&n.host!==void 0&&!c){let p=u?n.host:hr(n.host,!0);if(!u)p=hr(p.toLowerCase());n.host=gl(p,u)}if(!f||f&&!f.skipNormalize){if(n.path)n.path=pl(n.path);if(n.query)n.query=Vo(n.query);if(n.fragment)n.fragment=Vo(n.fragment)}if(f&&f.parse){if(f.parse(n,r),f===Lo.urn&&n.nid===void 0)i=!0}}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:d}}function dt(e,t){return ct(e,t).parsed}function kl(e,t){return Wo(e,t).normalized}function Wo(e,t){let{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:i,malformedScheme:a}=ct(e,t);return{normalized:n||o||s||i||a?e:ue(r,t),malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:i,malformedScheme:a}}function Uo(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:ue(e,t)}catch{return}let{normalized:n,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}=Wo(r,t);return o||s||i||a||c?void 0:n}var _r={SCHEMES:Lo,normalize:$l,resolve:vl,resolveComponent:Jo,equal:wl,serialize:ue,parse:dt};ut.exports=_r;ut.exports.default=_r;ut.exports.fastUri=_r});var Yo=pe(function(Xo){Object.defineProperty(Xo,"__esModule",{value:!0});var Zo=Qo();Zo.code='require("ajv/dist/runtime/uri").default';Xo.default=Zo});var ok=pe(function(X){Object.defineProperty(X,"__esModule",{value:!0});X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=void 0;var Nl=Ig();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return Nl.KeywordCxt}});var ve=Wt();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return ve._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return ve.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return ve.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return ve.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return ve.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return ve.CodeGen}});var Rl=_y(),os=Rg(),ql=zt(),Ae=Z0(),Il=Wt(),De=Re(),lt=Ne(),yr=yn(),es=xo(),Tl=Yo(),ss=(e,t)=>new RegExp(e,t);ss.code="new RegExp";var jl=["removeAdditional","useDefaults","coerceTypes"],Cl=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Dl={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."},Al={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ts=200;function Ml(e){var t,r,n,o,s,i,a,c,d,u,l,_,m,h,f,p,g,w,E,k,b,J,W,Pt,xt;let Se=e.strict,kt=(t=e.code)===null||t===void 0?void 0:t.optimize,Or=kt===!0||kt===void 0?1:kt||0,Nr=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:ss,Li=(o=e.uriResolver)!==null&&o!==void 0?o:Tl.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:Se)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Se)!==null&&c!==void 0?c:!0,strictTypes:(u=(d=e.strictTypes)!==null&&d!==void 0?d:Se)!==null&&u!==void 0?u:"log",strictTuples:(_=(l=e.strictTuples)!==null&&l!==void 0?l:Se)!==null&&_!==void 0?_:"log",strictRequired:(h=(m=e.strictRequired)!==null&&m!==void 0?m:Se)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:Or,regExp:Nr}:{optimize:Or,regExp:Nr},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:ts,loopEnum:(p=e.loopEnum)!==null&&p!==void 0?p:ts,meta:(g=e.meta)!==null&&g!==void 0?g:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(k=e.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(b=e.addUsedSchema)!==null&&b!==void 0?b:!0,validateSchema:(J=e.validateSchema)!==null&&J!==void 0?J:!0,validateFormats:(W=e.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(Pt=e.unicodeRegExp)!==null&&Pt!==void 0?Pt:!0,int32range:(xt=e.int32range)!==null&&xt!==void 0?xt:!0,uriResolver:Li}}class ft{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,...Ml(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new Il.ValueScope({scope:{},prefixes:Cl,es5:t,lines:r}),this.logger=Hl(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=ql.getRules(),rs.call(this,Dl,e,"NOT SUPPORTED"),rs.call(this,Al,e,"DEPRECATED","warn"),this._metaOpts=Ul.call(this),e.formats)Vl.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)zl.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);Fl.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=es;if(r==="id")n={...es},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[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 n=r(t);if(!("$async"in r))this.errors=r.errors;return n}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 n.call(this,e,t);async function n(d,u){await o.call(this,d.$schema);let l=this._addSchema(d,u);return l.validate||s.call(this,l)}async function o(d){if(d&&!this.getSchema(d))await n.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof os.default))throw u;return i.call(this,u),await a.call(this,u.missingSchema),s.call(this,d)}}function i({missingSchema:d,missingRef:u}){if(this.refs[d])throw Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function a(d){let u=await c.call(this,d);if(!this.refs[d])await o.call(this,u.$schema);if(!this.refs[d])this.addSchema(u,d,t)}async function c(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,n);return this}let o;if(typeof e==="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw Error(`schema ${s} must be string`)}return t=De.normalizeId(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!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 n=this.validate(r,e);if(!n&&t){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw Error(o)}return n}getSchema(e){let t;while(typeof(t=ns.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Ae.SchemaEnv({schema:{},schemaId:r});if(t=Ae.resolveSchema.call(this,n,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=ns.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=De.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(Gl.call(this,r,t),!t)return yr.eachItem(r,(o)=>gr.call(this,o)),this;Bl.call(this,t);let n={...t,type:lt.getJSONTypes(t.type),schemaType:lt.getJSONTypes(t.schemaType)};return yr.eachItem(r,n.type.length===0?(o)=>gr.call(this,o,n):(o)=>n.type.forEach((s)=>gr.call(this,o,n,s))),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 n=r.rules.findIndex((o)=>o.keyword===e);if(n>=0)r.rules.splice(n,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((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,o)=>n+t+o)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let o=n.split("/").slice(1),s=e;for(let i of o)s=s[i];for(let i in r){let a=r[i];if(typeof a!="object")continue;let{$data:c}=a.definition,d=s[i];if(c&&d)s[i]=is(d)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:i}=this.opts;if(typeof e=="object")s=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=De.normalizeId(s||r);let c=De.getSchemaRefs.call(this,e,r);if(a=new Ae.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),o&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)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 Ae.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{Ae.compileSchema.call(this,e)}finally{this.opts=t}}}ft.ValidationError=Rl.default;ft.MissingRefError=os.default;X.default=ft;function rs(e,t,r,n="error"){for(let o in e){let s=o;if(s in t)this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function ns(e){return e=De.normalizeId(e),this.schemas[e]||this.refs[e]}function Fl(){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 Vl(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function zl(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 Ul(){let e={...this.opts};for(let t of jl)delete e[t];return e}var Kl={log(){},warn(){},error(){}};function Hl(e){if(e===!1)return Kl;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 Ll=/^[a-z_$][a-z0-9_$:-]*$/i;function Gl(e,t){let{RULES:r}=this;if(yr.eachItem(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!Ll.test(n))throw Error(`Keyword ${n} 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 gr(e,t,r){var n;let o=t===null||t===void 0?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:c})=>c===r);if(!i)i={type:r,rules:[]},s.rules.push(i);if(s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:lt.getJSONTypes(t.type),schemaType:lt.getJSONTypes(t.schemaType)}};if(t.before)Jl.call(this,i,a,t.before);else i.rules.push(a);s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function Jl(e,t,r){let n=e.rules.findIndex((o)=>o.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function Bl(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=is(t);e.validateSchema=this.compile(t,!0)}var Wl={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function is(e){return{anyOf:[e,Wl]}}});var us=pe(function(cs){Object.defineProperty(cs,"__esModule",{value:!0});cs.DiscrError=void 0;var as;(function(e){e.Tag="tag",e.Mapping="mapping"})(as||(cs.DiscrError=as={}))});var hk=pe(function(fs){Object.defineProperty(fs,"__esModule",{value:!0});var we=Wt(),$r=us(),ls=Z0(),Xl=Rg(),Yl=yn(),ef={message:({params:{discrError:e,tagName:t}})=>e===$r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>we._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},tf={keyword:"discriminator",type:"object",schemaType:"object",error:ef,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!i)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),d=t.const("tag",we._`${r}${we.getProperty(a)}`);t.if(we._`typeof ${d} == "string"`,()=>u(),()=>e.error(!1,{discrError:$r.DiscrError.Tag,tag:d,tagName:a})),e.ok(c);function u(){let m=_();t.if(!1);for(let h in m)t.elseIf(we._`${d} === ${h}`),t.assign(c,l(m[h]));t.else(),e.error(!1,{discrError:$r.DiscrError.Mapping,tag:d,tagName:a}),t.endIf()}function l(m){let h=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},h);return e.mergeEvaluated(f,we.Name),h}function _(){var m;let h={},f=g(o),p=!0;for(let k=0;k<i.length;k++){let b=i[k];if((b===null||b===void 0?void 0:b.$ref)&&!Yl.schemaHasRulesButRef(b,s.self.RULES)){let W=b.$ref;if(b=ls.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,W),b instanceof ls.SchemaEnv)b=b.schema;if(b===void 0)throw new Xl.default(s.opts.uriResolver,s.baseId,W)}let J=(m=b===null||b===void 0?void 0:b.properties)===null||m===void 0?void 0:m[a];if(typeof J!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);p=p&&(f||g(b)),w(J,k)}if(!p)throw Error(`discriminator: "${a}" must be required`);return h;function g({required:k}){return Array.isArray(k)&&k.includes(a)}function w(k,b){if(k.const)E(k.const,b);else if(k.enum)for(let J of k.enum)E(J,b);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function E(k,b){if(typeof k!="string"||k in h)throw Error(`discriminator: "${a}" values must be unique strings`);h[k]=b}}}};fs.default=tf});var ps=pe(function(hs){Object.defineProperty(hs,"__esModule",{value:!0});var nf={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};hs.default=nf});var rk=pe(function(ys){Object.defineProperty(ys,"__esModule",{value:!0});ys.callRef=ys.getValidate=void 0;var sf=Rg(),ms=V(),F=Wt(),Ee=Lc(),_s=Z0(),ht=yn(),af={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:c}=n,{root:d}=s;if((r==="#"||r==="#/")&&o===d.baseId)return l();let u=_s.resolveRef.call(c,d,o,r);if(u===void 0)throw new sf.default(n.opts.uriResolver,o,r);if(u instanceof _s.SchemaEnv)return _(u);return m(u);function l(){if(s===d)return pt(e,i,s,s.$async);let h=t.scopeValue("root",{ref:d});return pt(e,F._`${h}.validate`,d,d.$async)}function _(h){let f=gs(e,h);pt(e,f,h,h.$async)}function m(h){let f=t.scopeValue("schema",a.code.source===!0?{ref:h,code:F.stringify(h)}:{ref:h}),p=t.name("valid"),g=e.subschema({schema:h,dataTypes:[],schemaPath:F.nil,topSchemaRef:f,errSchemaPath:r},p);e.mergeEvaluated(g),e.ok(p)}}};function gs(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):F._`${r.scopeValue("wrapper",{ref:t})}.validate`}ys.getValidate=gs;function pt(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:c}=s,d=c.passContext?Ee.default.this:F.nil;if(n)u();else l();function u(){if(!a.$async)throw Error("async schema referenced by sync schema");let h=o.let("valid");o.try(()=>{if(o.code(F._`await ${ms.callValidateCode(e,t,d)}`),m(t),!i)o.assign(h,!0)},(f)=>{if(o.if(F._`!(${f} instanceof ${s.ValidationError})`,()=>o.throw(f)),_(f),!i)o.assign(h,!1)}),e.ok(h)}function l(){e.result(ms.callValidateCode(e,t,d),()=>m(t),()=>_(t))}function _(h){let f=F._`${h}.errors`;o.assign(Ee.default.vErrors,F._`${Ee.default.vErrors} === null ? ${f} : ${Ee.default.vErrors}.concat(${f})`),o.assign(Ee.default.errors,F._`${Ee.default.vErrors}.length`)}function m(h){var f;if(!s.opts.unevaluated)return;let p=(f=r===null||r===void 0?void 0:r.validate)===null||f===void 0?void 0:f.evaluated;if(s.props!==!0)if(p&&!p.dynamicProps){if(p.props!==void 0)s.props=ht.mergeEvaluated.props(o,p.props,s.props)}else{let g=o.var("props",F._`${h}.evaluated.props`);s.props=ht.mergeEvaluated.props(o,g,s.props,F.Name)}if(s.items!==!0)if(p&&!p.dynamicItems){if(p.items!==void 0)s.items=ht.mergeEvaluated.items(o,p.items,s.items)}else{let g=o.var("items",F._`${h}.evaluated.items`);s.items=ht.mergeEvaluated.items(o,g,s.items,F.Name)}}}ys.callRef=pt;ys.default=af});var sk=pe(function(vs){Object.defineProperty(vs,"__esModule",{value:!0});var uf=ps(),lf=rk(),ff=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",uf.default,lf.default];vs.default=ff});var Es=pe(function(ws){Object.defineProperty(ws,"__esModule",{value:!0});var _t=Wt(),oe=_t.operators,mt={maximum:{okStr:"<=",ok:oe.LTE,fail:oe.GT},minimum:{okStr:">=",ok:oe.GTE,fail:oe.LT},exclusiveMaximum:{okStr:"<",ok:oe.LT,fail:oe.GTE},exclusiveMinimum:{okStr:">",ok:oe.GT,fail:oe.LTE}},pf={message:({keyword:e,schemaCode:t})=>_t.str`must be ${mt[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>_t._`{comparison: ${mt[e].okStr}, limit: ${t}}`},mf={keyword:Object.keys(mt),type:"number",schemaType:"number",$data:!0,error:pf,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(_t._`${r} ${mt[t].fail} ${n} || isNaN(${r})`)}};ws.default=mf});var Ss=pe(function(bs){Object.defineProperty(bs,"__esModule",{value:!0});var Me=Wt(),gf={message:({schemaCode:e})=>Me.str`must be multiple of ${e}`,params:({schemaCode:e})=>Me._`{multipleOf: ${e}}`},yf={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gf,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?Me._`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:Me._`${i} !== parseInt(${i})`;e.fail$data(Me._`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};bs.default=yf});var ks=pe(function(xs){Object.defineProperty(xs,"__esModule",{value:!0});function Ps(e){let t=e.length,r=0,n=0,o;while(n<t)if(r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t){if(o=e.charCodeAt(n),(o&64512)===56320)n++}return r}xs.default=Ps;Ps.code='require("ajv/dist/runtime/ucs2length").default'});var Ns=pe(function(Os){Object.defineProperty(Os,"__esModule",{value:!0});var le=Wt(),wf=yn(),Ef=ks(),bf={message({keyword:e,schemaCode:t}){return le.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>le._`{limit: ${e}}`},Sf={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:bf,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?le.operators.GT:le.operators.LT,i=o.opts.unicode===!1?le._`${r}.length`:le._`${wf.useFunc(e.gen,Ef.default)}(${r})`;e.fail$data(le._`${i} ${s} ${n}`)}};Os.default=Sf});var qs=pe(function(Rs){Object.defineProperty(Rs,"__esModule",{value:!0});var xf=V(),kf=yn(),be=Wt(),Of={message:({schemaCode:e})=>be.str`must match pattern "${e}"`,params:({schemaCode:e})=>be._`{pattern: ${e}}`},Nf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Of,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e,a=i.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=i.opts.code,d=c.code==="new RegExp"?be._`new RegExp`:kf.useFunc(t,c),u=t.let("valid");t.try(()=>t.assign(u,be._`${d}(${s}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data(be._`!${u}`)}else{let c=xf.usePattern(e,o);e.fail$data(be._`!${c}.test(${r})`)}}};Rs.default=Nf});var Ts=pe(function(Is){Object.defineProperty(Is,"__esModule",{value:!0});var Fe=Wt(),qf={message({keyword:e,schemaCode:t}){return Fe.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>Fe._`{limit: ${e}}`},If={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:qf,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Fe.operators.GT:Fe.operators.LT;e.fail$data(Fe._`Object.keys(${r}).length ${o} ${n}`)}};Is.default=If});var Cs=pe(function(js){Object.defineProperty(js,"__esModule",{value:!0});var ze=V(),Ve=Wt(),jf=yn(),Cf={message:({params:{missingProperty:e}})=>Ve.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Ve._`{missingProperty: ${e}}`},Df={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Cf,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors)d();else u();if(a.strictRequired){let m=e.parentSchema.properties,{definedProperties:h}=e.it;for(let f of r)if((m===null||m===void 0?void 0:m[f])===void 0&&!h.has(f)){let p=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${f}" is not defined at "${p}" (strictRequired)`;jf.checkStrictMode(i,g,i.opts.strictRequired)}}function d(){if(c||s)e.block$data(Ve.nil,l);else for(let m of r)ze.checkReportMissingProp(e,m)}function u(){let m=t.let("missing");if(c||s){let h=t.let("valid",!0);e.block$data(h,()=>_(m,h)),e.ok(h)}else t.if(ze.checkMissingProp(e,r,m)),ze.reportMissingProp(e,m),t.else()}function l(){t.forOf("prop",n,(m)=>{e.setParams({missingProperty:m}),t.if(ze.noPropertyInData(t,o,m,a.ownProperties),()=>e.error())})}function _(m,h){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(h,ze.propertyInData(t,o,m,a.ownProperties)),t.if(Ve.not(h),()=>{e.error(),t.break()})},Ve.nil)}}};js.default=Df});var As=pe(function(Ds){Object.defineProperty(Ds,"__esModule",{value:!0});var Ue=Wt(),Mf={message({keyword:e,schemaCode:t}){return Ue.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>Ue._`{limit: ${e}}`},Ff={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Mf,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Ue.operators.GT:Ue.operators.LT;e.fail$data(Ue._`${r}.length ${o} ${n}`)}};Ds.default=Ff});var gt=pe(function(Fs){Object.defineProperty(Fs,"__esModule",{value:!0});var Ms=Qt();Ms.code='require("ajv/dist/runtime/equal").default';Fs.default=Ms});var zs=pe(function(Vs){Object.defineProperty(Vs,"__esModule",{value:!0});var vr=Ne(),q=Wt(),Uf=yn(),Kf=gt(),Hf={message:({params:{i:e,j:t}})=>q.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>q._`{i: ${e}, j: ${t}}`},Lf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Hf,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let c=t.let("valid"),d=s.items?vr.getSchemaTypes(s.items):[];e.block$data(c,u,q._`${i} === false`),e.ok(c);function u(){let h=t.let("i",q._`${r}.length`),f=t.let("j");e.setParams({i:h,j:f}),t.assign(c,!0),t.if(q._`${h} > 1`,()=>(l()?_:m)(h,f))}function l(){return d.length>0&&!d.some((h)=>h==="object"||h==="array")}function _(h,f){let p=t.name("item"),g=vr.checkDataTypes(d,p,a.opts.strictNumbers,vr.DataType.Wrong),w=t.const("indices",q._`{}`);t.for(q._`;${h}--;`,()=>{if(t.let(p,q._`${r}[${h}]`),t.if(g,q._`continue`),d.length>1)t.if(q._`typeof ${p} == "string"`,q._`${p} += "_"`);t.if(q._`typeof ${w}[${p}] == "number"`,()=>{t.assign(f,q._`${w}[${p}]`),e.error(),t.assign(c,!1).break()}).code(q._`${w}[${p}] = ${h}`)})}function m(h,f){let p=Uf.useFunc(t,Kf.default),g=t.name("outer");t.label(g).for(q._`;${h}--;`,()=>t.for(q._`${f} = ${h}; ${f}--;`,()=>t.if(q._`${p}(${r}[${h}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(g)})))}}};Vs.default=Lf});var Ks=pe(function(Us){Object.defineProperty(Us,"__esModule",{value:!0});var wr=Wt(),Jf=yn(),Bf=gt(),Wf={message:"must be equal to constant",params:({schemaCode:e})=>wr._`{allowedValue: ${e}}`},Qf={keyword:"const",$data:!0,error:Wf,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;if(n||s&&typeof s=="object")e.fail$data(wr._`!${Jf.useFunc(t,Bf.default)}(${r}, ${o})`);else e.fail(wr._`${s} !== ${r}`)}};Us.default=Qf});var Ls=pe(function(Hs){Object.defineProperty(Hs,"__esModule",{value:!0});var Ke=Wt(),Xf=yn(),Yf=gt(),eh={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Ke._`{allowedValues: ${e}}`},th={keyword:"enum",schemaType:"array",$data:!0,error:eh,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,c,d=()=>c!==null&&c!==void 0?c:c=Xf.useFunc(t,Yf.default),u;if(a||n)u=t.let("valid"),e.block$data(u,l);else{if(!Array.isArray(o))throw Error("ajv implementation error");let m=t.const("vSchema",s);u=Ke.or(...o.map((h,f)=>_(m,f)))}e.pass(u);function l(){t.assign(u,!1),t.forOf("v",s,(m)=>t.if(Ke._`${d()}(${r}, ${m})`,()=>t.assign(u,!0).break()))}function _(m,h){let f=o[h];return typeof f==="object"&&f!==null?Ke._`${d()}(${r}, ${m}[${h}])`:Ke._`${r} === ${f}`}}};Hs.default=th});var ak=pe(function(Gs){Object.defineProperty(Gs,"__esModule",{value:!0});var nh=Es(),oh=Ss(),sh=Ns(),ih=qs(),ah=Ts(),ch=Cs(),dh=As(),uh=zs(),lh=Ks(),fh=Ls(),hh=[nh.default,oh.default,sh.default,ih.default,ah.default,ch.default,dh.default,uh.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lh.default,fh.default];Gs.default=hh});var br=pe(function(Bs){Object.defineProperty(Bs,"__esModule",{value:!0});Bs.validateAdditionalItems=void 0;var fe=Wt(),Er=yn(),mh={message:({params:{len:e}})=>fe.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>fe._`{limit: ${e}}`},_h={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:mh,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){Er.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Js(e,n)}};function Js(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",fe._`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(fe._`${a} <= ${t.length}`);else if(typeof n=="object"&&!Er.alwaysValidSchema(i,n)){let d=r.var("valid",fe._`${a} <= ${t.length}`);r.if(fe.not(d),()=>c(d)),e.ok(d)}function c(d){r.forRange("i",t.length,a,(u)=>{if(e.subschema({keyword:s,dataProp:u,dataPropType:Er.Type.Num},d),!i.allErrors)r.if(fe.not(d),()=>r.break())})}}Bs.validateAdditionalItems=Js;Bs.default=_h});var Sr=pe(function(Xs){Object.defineProperty(Xs,"__esModule",{value:!0});Xs.validateTuple=void 0;var Qs=Wt(),yt=yn(),yh=V(),$h={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Zs(e,"additionalItems",t);if(r.items=!0,yt.alwaysValidSchema(r,t))return;e.ok(yh.validateArray(e))}};function Zs(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;if(u(o),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=yt.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),d=n.const("len",Qs._`${s}.length`);r.forEach((l,_)=>{if(yt.alwaysValidSchema(a,l))return;n.if(Qs._`${d} > ${_}`,()=>e.subschema({keyword:i,schemaProp:_,dataProp:_},c)),e.ok(c)});function u(l){let{opts:_,errSchemaPath:m}=a,h=r.length,f=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(_.strictTuples&&!f){let p=`"${i}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;yt.checkStrictMode(a,p,_.strictTuples)}}}Xs.validateTuple=Zs;Xs.default=$h});var ti=pe(function(ei){Object.defineProperty(ei,"__esModule",{value:!0});var wh=Sr(),Eh={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>wh.validateTuple(e,"items")};ei.default=Eh});var oi=pe(function(ni){Object.defineProperty(ni,"__esModule",{value:!0});var ri=Wt(),Sh=yn(),Ph=V(),xh=br(),kh={message:({params:{len:e}})=>ri.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ri._`{limit: ${e}}`},Oh={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:kh,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;if(n.items=!0,Sh.alwaysValidSchema(n,t))return;if(o)xh.validateAdditionalItems(e,o);else e.ok(Ph.validateArray(e))}};ni.default=Oh});var ii=pe(function(si){Object.defineProperty(si,"__esModule",{value:!0});var z=Wt(),$t=yn(),Rh={message:({params:{min:e,max:t}})=>t===void 0?z.str`must contain at least ${e} valid item(s)`:z.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?z._`{minContains: ${e}}`:z._`{minContains: ${e}, maxContains: ${t}}`},qh={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Rh,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:c,maxContains:d}=n;if(s.opts.next)i=c===void 0?1:c,a=d;else i=1;let u=t.const("len",z._`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){$t.checkStrictMode(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){$t.checkStrictMode(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if($t.alwaysValidSchema(s,r)){let f=z._`${u} >= ${i}`;if(a!==void 0)f=z._`${f} && ${u} <= ${a}`;e.pass(f);return}s.items=!0;let l=t.name("valid");if(a===void 0&&i===1)m(l,()=>t.if(l,()=>t.break()));else if(i===0){if(t.let(l,!0),a!==void 0)t.if(z._`${o}.length > 0`,_)}else t.let(l,!1),_();e.result(l,()=>e.reset());function _(){let f=t.name("_valid"),p=t.let("count",0);m(f,()=>t.if(f,()=>h(p)))}function m(f,p){t.forRange("i",0,u,(g)=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:$t.Type.Num,compositeRule:!0},f),p()})}function h(f){if(t.code(z._`${f}++`),a===void 0)t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0).break());else if(t.if(z._`${f} > ${a}`,()=>t.assign(l,!1).break()),i===1)t.assign(l,!0);else t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0))}}};si.default=qh});var lk=pe(function(di){Object.defineProperty(di,"__esModule",{value:!0});di.validateSchemaDeps=di.validatePropertyDeps=di.error=void 0;var Pr=Wt(),Th=yn(),He=V();di.error={message:({params:{property:e,depsCount:t,deps:r}})=>Pr.str`must have ${t===1?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>Pr._`{property: ${e},
|
|
6
|
+
missingProperty: ${n},
|
|
7
|
+
depsCount: ${t},
|
|
8
|
+
deps: ${r}}`};var jh={keyword:"dependencies",type:"object",schemaType:"object",error:di.error,code(e){let[t,r]=Ch(e);ai(e,t),ci(e,r)}};function Ch({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function ai(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let c=He.propertyInData(r,n,i,o.opts.ownProperties);if(e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors)r.if(c,()=>{for(let d of a)He.checkReportMissingProp(e,d)});else r.if(Pr._`${c} && (${He.checkMissingProp(e,a,s)})`),He.reportMissingProp(e,s),r.else()}}di.validatePropertyDeps=ai;function ci(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t){if(Th.alwaysValidSchema(s,t[a]))continue;r.if(He.propertyInData(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),e.ok(i)}}di.validateSchemaDeps=ci;di.default=jh});var pi=pe(function(hi){Object.defineProperty(hi,"__esModule",{value:!0});var fi=Wt(),Mh=yn(),Fh={message:"property name must be valid",params:({params:e})=>fi._`{propertyName: ${e.propertyName}}`},Vh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Fh,code(e){let{gen:t,schema:r,data:n,it:o}=e;if(Mh.alwaysValidSchema(o,r))return;let s=t.name("valid");t.forIn("key",n,(i)=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if(fi.not(s),()=>{if(e.error(!0),!o.allErrors)t.break()})}),e.ok(s)}};hi.default=Vh});var xr=pe(function(mi){Object.defineProperty(mi,"__esModule",{value:!0});var vt=V(),G=Wt(),Uh=Lc(),wt=yn(),Kh={message:"must NOT have additional properties",params:({params:e})=>G._`{additionalProperty: ${e.additionalProperty}}`},Hh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Kh,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&wt.alwaysValidSchema(i,r))return;let d=vt.allSchemaProperties(n.properties),u=vt.allSchemaProperties(n.patternProperties);l(),e.ok(G._`${s} === ${Uh.default.errors}`);function l(){t.forIn("key",o,(p)=>{if(!d.length&&!u.length)h(p);else t.if(_(p),()=>h(p))})}function _(p){let g;if(d.length>8){let w=wt.schemaRefOrVal(i,n.properties,"properties");g=vt.isOwnProperty(t,w,p)}else if(d.length)g=G.or(...d.map((w)=>G._`${p} === ${w}`));else g=G.nil;if(u.length)g=G.or(g,...u.map((w)=>G._`${vt.usePattern(e,w)}.test(${p})`));return G.not(g)}function m(p){t.code(G._`delete ${o}[${p}]`)}function h(p){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(p);return}if(r===!1){if(e.setParams({additionalProperty:p}),e.error(),!a)t.break();return}if(typeof r=="object"&&!wt.alwaysValidSchema(i,r)){let g=t.name("valid");if(c.removeAdditional==="failing")f(p,g,!1),t.if(G.not(g),()=>{e.reset(),m(p)});else if(f(p,g),!a)t.if(G.not(g),()=>t.break())}}function f(p,g,w){let E={keyword:"additionalProperties",dataProp:p,dataPropType:wt.Type.Str};if(w===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(E,g)}}};mi.default=Hh});var $i=pe(function(yi){Object.defineProperty(yi,"__esModule",{value:!0});var Gh=Ig(),gi=V(),kr=yn(),_i=xr(),Jh={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0)_i.default.code(new Gh.KeywordCxt(s,_i.default,"additionalProperties"));let i=gi.allSchemaProperties(r);for(let l of i)s.definedProperties.add(l);if(s.opts.unevaluated&&i.length&&s.props!==!0)s.props=kr.mergeEvaluated.props(t,kr.toHash(i),s.props);let a=i.filter((l)=>!kr.alwaysValidSchema(s,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a){if(d(l))u(l);else{if(t.if(gi.propertyInData(t,o,l,s.opts.ownProperties)),u(l),!s.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(l),e.ok(c)}function d(l){return s.opts.useDefaults&&!s.compositeRule&&r[l].default!==void 0}function u(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};yi.default=Jh});var Si=pe(function(bi){Object.defineProperty(bi,"__esModule",{value:!0});var vi=V(),Et=Wt(),wi=yn(),Ei=yn(),Wh={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=vi.allSchemaProperties(r),c=a.filter((f)=>wi.alwaysValidSchema(s,r[f]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let d=i.strictSchema&&!i.allowMatchingProperties&&o.properties,u=t.name("valid");if(s.props!==!0&&!(s.props instanceof Et.Name))s.props=Ei.evaluatedPropsToName(t,s.props);let{props:l}=s;_();function _(){for(let f of a){if(d)m(f);if(s.allErrors)h(f);else t.var(u,!0),h(f),t.if(u)}}function m(f){for(let p in d)if(new RegExp(f).test(p))wi.checkStrictMode(s,`property ${p} matches pattern ${f} (use allowMatchingProperties)`)}function h(f){t.forIn("key",n,(p)=>{t.if(Et._`${vi.usePattern(e,f)}.test(${p})`,()=>{let g=c.includes(f);if(!g)e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:p,dataPropType:Ei.Type.Str},u);if(s.opts.unevaluated&&l!==!0)t.assign(Et._`${l}[${p}]`,!0);else if(!g&&!s.allErrors)t.if(Et.not(u),()=>t.break())})})}}};bi.default=Wh});var xi=pe(function(Pi){Object.defineProperty(Pi,"__esModule",{value:!0});var Zh=yn(),Xh={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if(Zh.alwaysValidSchema(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Pi.default=Xh});var Oi=pe(function(ki){Object.defineProperty(ki,"__esModule",{value:!0});var ep=V(),tp={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ep.validateUnion,error:{message:"must match a schema in anyOf"}};ki.default=tp});var Ri=pe(function(Ni){Object.defineProperty(Ni,"__esModule",{value:!0});var bt=Wt(),np=yn(),op={message:"must match exactly one schema in oneOf",params:({params:e})=>bt._`{passingSchemas: ${e.passing}}`},sp={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:op,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(d),e.result(i,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((u,l)=>{let _;if(np.alwaysValidSchema(o,u))t.var(c,!0);else _=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c);if(l>0)t.if(bt._`${c} && ${i}`).assign(i,!1).assign(a,bt._`[${a}, ${l}]`).else();t.if(c,()=>{if(t.assign(i,!0),t.assign(a,l),_)e.mergeEvaluated(_,bt.Name)})})}}};Ni.default=sp});var Ii=pe(function(qi){Object.defineProperty(qi,"__esModule",{value:!0});var ap=yn(),cp={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if(ap.alwaysValidSchema(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};qi.default=cp});var Di=pe(function(Ci){Object.defineProperty(Ci,"__esModule",{value:!0});var St=Wt(),ji=yn(),up={message:({params:e})=>St.str`must match "${e.ifClause}" schema`,params:({params:e})=>St._`{failingKeyword: ${e.ifClause}}`},lp={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:up,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)ji.checkStrictMode(n,'"if" without "then" and "else" is ignored');let o=Ti(n,"then"),s=Ti(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),o&&s){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,d("then",u),d("else",u))}else if(o)t.if(a,d("then"));else t.if(St.not(a),d("else"));e.pass(i,()=>e.error(!0));function c(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function d(u,l){return()=>{let _=e.subschema({keyword:u},a);if(t.assign(i,a),e.mergeValidEvaluated(_,i),l)t.assign(l,St._`${u}`);else e.setParams({ifClause:u})}}}};function Ti(e,t){let r=e.schema[t];return r!==void 0&&!ji.alwaysValidSchema(e,r)}Ci.default=lp});var Mi=pe(function(Ai){Object.defineProperty(Ai,"__esModule",{value:!0});var hp=yn(),pp={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)hp.checkStrictMode(r,`"${e}" without "if" is ignored`)}};Ai.default=pp});var ck=pe(function(Fi){Object.defineProperty(Fi,"__esModule",{value:!0});var _p=br(),gp=ti(),yp=Sr(),$p=oi(),vp=ii(),wp=lk(),Ep=pi(),bp=xr(),Sp=$i(),Pp=Si(),xp=xi(),kp=Oi(),Op=Ri(),Np=Ii(),Rp=Di(),qp=Mi();function Ip(e=!1){let t=[xp.default,kp.default,Op.default,Np.default,Rp.default,qp.default,Ep.default,bp.default,wp.default,Sp.default,Pp.default];if(e)t.push(gp.default,$p.default);else t.push(_p.default,yp.default);return t.push(vp.default),t}Fi.default=Ip});var zi=pe(function(Vi){Object.defineProperty(Vi,"__esModule",{value:!0});var R=Wt(),jp={message:({schemaCode:e})=>R.str`must match format "${e}"`,params:({schemaCode:e})=>R._`{format: ${e}}`},Cp={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jp,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:d,schemaEnv:u,self:l}=a;if(!c.validateFormats)return;if(o)_();else m();function _(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),f=r.const("fDef",R._`${h}[${i}]`),p=r.let("fType"),g=r.let("format");r.if(R._`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(p,R._`${f}.type || "string"`).assign(g,R._`${f}.validate`),()=>r.assign(p,R._`"string"`).assign(g,f)),e.fail$data(R.or(w(),E()));function w(){if(c.strictSchema===!1)return R.nil;return R._`${i} && !${g}`}function E(){let k=u.$async?R._`(${f}.async ? await ${g}(${n}) : ${g}(${n}))`:R._`${g}(${n})`,b=R._`(typeof ${g} == "function" ? ${k} : ${g}.test(${n}))`;return R._`${g} && ${g} !== true && ${p} === ${t} && !${b}`}}function m(){let h=l.formats[s];if(!h){w();return}if(h===!0)return;let[f,p,g]=E(h);if(f===t)e.pass(k());function w(){if(c.strictSchema===!1){l.logger.warn(b());return}throw Error(b());function b(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function E(b){let J=b instanceof RegExp?R.regexpCode(b):c.code.formats?R._`${c.code.formats}${R.getProperty(s)}`:void 0,W=r.scopeValue("formats",{key:s,ref:b,code:J});if(typeof b=="object"&&!(b instanceof RegExp))return[b.type||"string",b.validate,R._`${W}.validate`];return["string",b,W]}function k(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw Error("async format in sync schema");return R._`await ${g}(${n})`}return typeof p=="function"?R._`${g}(${n})`:R._`${g}.test(${n})`}}}};Vi.default=Cp});var dk=pe(function(Ui){Object.defineProperty(Ui,"__esModule",{value:!0});var Ap=zi(),Mp=[Ap.default];Ui.default=Mp});var uk=pe(function(Ki){Object.defineProperty(Ki,"__esModule",{value:!0});Ki.contentVocabulary=Ki.metadataVocabulary=void 0;Ki.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ki.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});
|
|
9
|
+
export{Wt,yn,Lc,Ig,_y,Rg,Z0,ok,rk,sk,ak,lk,ck,dk,uk,hk};
|
|
10
|
+
|
|
11
|
+
//# debugId=C15970F47D4D9A7D64756E2164756E21
|
|
12
|
+
//# sourceMappingURL=studio-v8867ddv.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
function n(e){return typeof e==="string"}function Z(e){return typeof e==="number"}function Xe(e){return typeof e==="boolean"}function rM(e){return typeof e==="bigint"}function Lv(e){return typeof e==="symbol"}function te(e){return typeof e==="function"}function S(e){return typeof e==="object"&&e!==null}function of(e){return e===null||n(e)||Z(e)||Xe(e)}function v(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ie(e){return v(e)&&typeof e.$ref==="string"}function Ma(e){return v(e)&&e.$prototype==="Function"}function oc(e){return v(e)&&v(e.$expression)}function Xx(e){return oc(e)&&Array.isArray(e.parameters)&&e.parameters.length>0}function uI(e){return Ma(e)&&Array.isArray(e.body)}function $v(e){return v(e)&&typeof e.$prototype==="string"&&e.$prototype!=="Function"}function hI(e){return v(e)&&e.timing==="server"&&typeof e.$src==="string"&&typeof e.$export==="string"&&!e.$prototype}function Yo(e){return v(e)&&e.$prototype==="Array"}function _n(e){return v(e)}function Pa(e){return typeof e==="string"&&e.includes("${")}function pI(e){return/\breturn\b[^\S\n]*(?![;}\s]|$)/.test(e)}function pl(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ni(e,t){let r=e?.[t];return pl(r)?r:void 0}function rd(e,t){let r=e[t];if(pl(r))return r;let o={};return e[t]=o,o}function rf(e){return Ie(e)||Ma(e)||oc(e)}function Gm(e,t){let r=e[t];return rf(r)?r:void 0}function Qx(e){if(!e)return[];return e.map((t)=>n(t)?t:t.name)}function i(e){return typeof e==="string"}function Ih(e){if(typeof e!=="object"||e===null||Array.isArray(e)||!v(e.$expression))return!1;let t=e.$expression;if(t.operator==="?:")return typeof t.value==="string"&&typeof t.initial==="string";if(t.operator==="switch")return v(t.cases)&&Object.values(t.cases).every((r)=>n(r))&&typeof t.default==="string";return!1}function fI(e){if(i(e))return[e];if(!Ih(e))return[];let t=e.$expression;if(t.operator==="?:")return[...new Set([t.value,t.initial])];return[...new Set([...Object.values(t.cases),t.default])]}function it(e){return i(e)?e:fI(e).join("|")}function rc(e){return e.startsWith("#")}
|
|
2
|
+
export{n,Z,Xe,rM,Lv,te,S,of,v,Ie,Ma,oc,Xx,uI,$v,hI,Yo,_n,Pa,pI,pl,Ni,rd,rf,Gm,Qx,Ih,fI,it,rc};
|
|
3
|
+
|
|
4
|
+
//# debugId=0F191DD3A85CB4D564756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-vxq7fcvv.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n,te,S}from"./studio-vxq7fcvv.js";function lI(r){globalThis.__jxPlatform=r}function Tv(){return globalThis.__jxLauncher}var u=new Map;function cI(){let r=[];for(let[o,i]of u)for(let t=0;t<i;t++)r.push(o);return r}function s(r){u.set(r,(u.get(r)??0)+1)}function c(r){let o=(u.get(r)??1)-1;if(o>0)u.set(r,o);else u.delete(r)}function g(r){return(S(r)||te(r))&&"then"in r&&te(r.then)}function d(r,o,i){return(...t)=>{let e=o.apply(i,t);if(!g(e))return e;s(r);let a=()=>{c(r)};return e.then(a,a),e}}function m(r){let o=new Map;return new Proxy(r,{get(i,t){let e=i[t];if(!te(e)||!n(t))return e;let a=o.get(t);if(a&&a.raw===e)return a.wrapper;let f=d(t,e,i);return o.set(t,{raw:e,wrapper:f}),f}})}var l=null;function p(){let r=globalThis.__jxPlatform;if(!r)throw Error("No platform registered. Call registerPlatform() before starting Studio.");if(l?.raw!==r)l={raw:r,wrapped:m(r)};return l.wrapped}function _e(){return globalThis.__jxPlatform!=null}
|
|
2
|
+
export{lI,Tv,cI,p,_e};
|
|
3
|
+
|
|
4
|
+
//# debugId=90E5200F7312E28364756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-w4rz9hdk.js.map
|