openpond 0.2.55 → 0.2.56
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/dist/app-server.d.ts +10545 -10254
- package/dist/app-server.js +1 -1
- package/dist/chunks/actions-command-QU4H53OG.js +2 -0
- package/dist/chunks/{app-layer-Y2UERCPY.js → app-layer-NSTE5HIT.js} +1 -1
- package/dist/chunks/app-server-connected-apps-JHGWLBXT.js +2 -0
- package/dist/chunks/app-server-evaluations-GJPFWIDA.js +2 -0
- package/dist/chunks/app-server-harness-services-IH4G6POY.js +2 -0
- package/dist/chunks/app-server-runtime-DVKOZ5B6.js +2 -0
- package/dist/chunks/apps-BKTOR4F7.js +2 -0
- package/dist/chunks/chunk-25MBPJVY.js +2 -0
- package/dist/chunks/chunk-2D4Y3HNW.js +2 -0
- package/dist/chunks/chunk-2IHO4GDJ.js +2 -0
- package/dist/chunks/chunk-2QUCCP6Z.js +2 -0
- package/dist/chunks/chunk-3K4VVB7S.js +6 -0
- package/dist/chunks/chunk-3QIB5FXI.js +10 -0
- package/dist/chunks/chunk-3RCRSMWZ.js +17 -0
- package/dist/chunks/chunk-3VUATFZD.js +2 -0
- package/dist/chunks/chunk-3Z47M3YY.js +2 -0
- package/dist/chunks/{chunk-UA5DA5I2.js → chunk-4D7HWVWD.js} +1 -1
- package/dist/chunks/chunk-4EPSHPZL.js +2 -0
- package/dist/chunks/chunk-4NESNOK5.js +2 -0
- package/dist/chunks/chunk-523TE4BI.js +2 -0
- package/dist/chunks/{chunk-B7QDZPNX.js → chunk-5MCNZCVQ.js} +1 -1
- package/dist/chunks/{chunk-DLVPSCTB.js → chunk-6QSSIT62.js} +1 -1
- package/dist/chunks/chunk-6ZFPQYHG.js +2 -0
- package/dist/chunks/chunk-74IIXVAE.js +2 -0
- package/dist/chunks/chunk-74ZXXBGN.js +6 -0
- package/dist/chunks/chunk-773TH7FN.js +2 -0
- package/dist/chunks/chunk-7E6T7GP5.js +2 -0
- package/dist/chunks/chunk-7ED24PP6.js +2 -0
- package/dist/chunks/chunk-7HPDGZOR.js +86 -0
- package/dist/chunks/chunk-7KWD2I6W.js +2 -0
- package/dist/chunks/chunk-7PXZ4X4P.js +2 -0
- package/dist/chunks/chunk-A6USMRWK.js +2 -0
- package/dist/chunks/chunk-ABD5M2D2.js +2 -0
- package/dist/chunks/chunk-ACYFMLWG.js +10 -0
- package/dist/chunks/chunk-AN525SPP.js +6 -0
- package/dist/chunks/chunk-APB2STJK.js +2 -0
- package/dist/chunks/chunk-AY64VY4E.js +2 -0
- package/dist/chunks/{chunk-G6JMQGX7.js → chunk-B7RFL4N2.js} +1 -1
- package/dist/chunks/chunk-BLXEAZCQ.js +12 -0
- package/dist/chunks/chunk-D74JEERO.js +5 -0
- package/dist/chunks/{chunk-U2YMBCX7.js → chunk-DARVPBZ4.js} +1 -1
- package/dist/chunks/chunk-DBK66CJP.js +8 -0
- package/dist/chunks/chunk-DDMZSZFL.js +1 -0
- package/dist/chunks/chunk-DIO5CB6U.js +2 -0
- package/dist/chunks/chunk-DMFUEUAZ.js +5 -0
- package/dist/chunks/chunk-DMVD2RFZ.js +2 -0
- package/dist/chunks/chunk-DUURYZOI.js +2 -0
- package/dist/chunks/chunk-DZUAT3TP.js +1 -0
- package/dist/chunks/chunk-EIEZHFIW.js +6 -0
- package/dist/chunks/chunk-EIRYMSEG.js +19 -0
- package/dist/chunks/{chunk-R27YGT77.js → chunk-EKM2D7JU.js} +1 -1
- package/dist/chunks/chunk-EQFGBL3O.js +2 -0
- package/dist/chunks/chunk-EYPCBBMS.js +2 -0
- package/dist/chunks/chunk-F4KOGISR.js +10 -0
- package/dist/chunks/chunk-F74GBN6K.js +2 -0
- package/dist/chunks/chunk-FEAKTSRS.js +2 -0
- package/dist/chunks/chunk-FFRFSDBM.js +2 -0
- package/dist/chunks/chunk-FTEOCCPB.js +23 -0
- package/dist/chunks/chunk-FUOEIDMA.js +8 -0
- package/dist/chunks/{chunk-BQAF5P7K.js → chunk-FV2R5RUN.js} +2 -2
- package/dist/chunks/chunk-FWIPHEVA.js +12 -0
- package/dist/chunks/chunk-FY5KHLMW.js +2 -0
- package/dist/chunks/chunk-G3RXYI2L.js +6 -0
- package/dist/chunks/chunk-GJ2ZJFDD.js +2 -0
- package/dist/chunks/chunk-GLDYJM7O.js +1 -0
- package/dist/chunks/chunk-GPVCOEUH.js +2 -0
- package/dist/chunks/chunk-GW766ZSO.js +5 -0
- package/dist/chunks/chunk-GWCHDF2C.js +4 -0
- package/dist/chunks/chunk-GZ7M5XBP.js +2 -0
- package/dist/chunks/chunk-H6IW2R22.js +140 -0
- package/dist/chunks/chunk-HCYX6RHP.js +2 -0
- package/dist/chunks/chunk-HDL5YSAA.js +2 -0
- package/dist/chunks/chunk-HIOKCIL7.js +2 -0
- package/dist/chunks/{chunk-IODUCRBA.js → chunk-HY3GOBFJ.js} +1 -1
- package/dist/chunks/chunk-HZEIRHEB.js +2 -0
- package/dist/chunks/chunk-I2NXNMRZ.js +2 -0
- package/dist/chunks/chunk-I7AQMAQI.js +33 -0
- package/dist/chunks/chunk-IZ6DLEVY.js +2 -0
- package/dist/chunks/chunk-J2TWKFML.js +1871 -0
- package/dist/chunks/chunk-JDEEWOD7.js +2 -0
- package/dist/chunks/chunk-JFXWI3EN.js +6 -0
- package/dist/chunks/chunk-JYKRR7E5.js +5 -0
- package/dist/chunks/chunk-KCJVFLBB.js +2 -0
- package/dist/chunks/{chunk-5CMKGD43.js → chunk-KG325WTN.js} +1 -1
- package/dist/chunks/chunk-KUERKVEU.js +3 -0
- package/dist/chunks/chunk-KVTBX2UP.js +2 -0
- package/dist/chunks/chunk-L3KS6MOV.js +2 -0
- package/dist/chunks/chunk-L6K7ERG5.js +2 -0
- package/dist/chunks/{chunk-MH3LHSGX.js → chunk-LQQNBVEB.js} +1 -1
- package/dist/chunks/{chunk-BTI4N7YO.js → chunk-M4JWQSV7.js} +1 -1
- package/dist/chunks/chunk-MQULU465.js +2 -0
- package/dist/chunks/chunk-N4FFQPLR.js +2 -0
- package/dist/chunks/chunk-N73MU2C3.js +2 -0
- package/dist/chunks/chunk-NHQ36THU.js +3 -0
- package/dist/chunks/chunk-O6ULLQJ6.js +2 -0
- package/dist/chunks/chunk-O72BSKSO.js +2 -0
- package/dist/chunks/chunk-OGDADQGH.js +143 -0
- package/dist/chunks/chunk-OIUTWU6K.js +2 -0
- package/dist/chunks/chunk-OLLLZVHF.js +2 -0
- package/dist/chunks/chunk-OPNRWESL.js +3 -0
- package/dist/chunks/chunk-OQKJGTTO.js +4 -0
- package/dist/chunks/chunk-OQPJ7FJF.js +9 -0
- package/dist/chunks/{chunk-TERVLCRG.js → chunk-OS3LO5J3.js} +1 -1
- package/dist/chunks/chunk-OUVIWDL2.js +2 -0
- package/dist/chunks/chunk-PCSIOUHF.js +7 -0
- package/dist/chunks/chunk-PF5R6CMP.js +21 -0
- package/dist/chunks/chunk-PPAPVGJP.js +3 -0
- package/dist/chunks/chunk-PRGBLQVH.js +2 -0
- package/dist/chunks/chunk-PSGGOZFM.js +2 -0
- package/dist/chunks/chunk-PUZQU66L.js +2 -0
- package/dist/chunks/{chunk-NOTXPD2T.js → chunk-Q2QL6UWN.js} +1 -1
- package/dist/chunks/chunk-Q4TBTRIG.js +2 -0
- package/dist/chunks/chunk-Q5LEXXJG.js +16 -0
- package/dist/chunks/chunk-QDC4OW3S.js +2 -0
- package/dist/chunks/chunk-QEFHOJFE.js +7 -0
- package/dist/chunks/chunk-QHWGQ3A4.js +5 -0
- package/dist/chunks/chunk-QIKWJ2AA.js +11 -0
- package/dist/chunks/chunk-QNG27G3T.js +6 -0
- package/dist/chunks/chunk-QOGJAQDO.js +3 -0
- package/dist/chunks/chunk-QOTVNQDI.js +4 -0
- package/dist/chunks/{chunk-NNIRIUSY.js → chunk-RAXOSUSW.js} +1 -1
- package/dist/chunks/chunk-RNIAFXMB.js +50 -0
- package/dist/chunks/{chunk-SHQOIROR.js → chunk-S5ESN275.js} +3 -3
- package/dist/chunks/chunk-SDAUS5PY.js +2 -0
- package/dist/chunks/chunk-SDXFLO7J.js +5 -0
- package/dist/chunks/chunk-SH5CBAFC.js +2 -0
- package/dist/chunks/chunk-SWUEFLOH.js +2 -0
- package/dist/chunks/chunk-SYUKES6H.js +3 -0
- package/dist/chunks/chunk-T5AACNJI.js +2 -0
- package/dist/chunks/chunk-TRQQNFMO.js +4 -0
- package/dist/chunks/chunk-TVQAPBLZ.js +2 -0
- package/dist/chunks/chunk-UCPGRPWY.js +2 -0
- package/dist/chunks/chunk-UGL7WF3W.js +2 -0
- package/dist/chunks/chunk-UHFZHBGW.js +2 -0
- package/dist/chunks/{chunk-C6D4WAYN.js → chunk-UKMA4R6X.js} +2 -2
- package/dist/chunks/{chunk-4WEUCGJ3.js → chunk-VRIEKBBH.js} +1 -1
- package/dist/chunks/chunk-VYLGI3IH.js +13 -0
- package/dist/chunks/chunk-W45RKGM6.js +1 -0
- package/dist/chunks/chunk-WJ43MJ3F.js +2 -0
- package/dist/chunks/chunk-WMKYHXVM.js +3 -0
- package/dist/chunks/chunk-WN3V6KDN.js +3 -0
- package/dist/chunks/chunk-X4OSOOSU.js +3 -0
- package/dist/chunks/chunk-XDQMGUWL.js +2 -0
- package/dist/chunks/chunk-XTFPDQMH.js +3 -0
- package/dist/chunks/chunk-XVDFJ3ZF.js +2 -0
- package/dist/chunks/chunk-XW6HGSIT.js +8 -0
- package/dist/chunks/chunk-XXYGGNVM.js +2 -0
- package/dist/chunks/chunk-Y4OWBBDD.js +184 -0
- package/dist/chunks/chunk-YBT2NB32.js +2 -0
- package/dist/chunks/chunk-YCJO3YVD.js +10 -0
- package/dist/chunks/{chunk-QRAKXZOC.js → chunk-YOBN7KTF.js} +6 -6
- package/dist/chunks/chunk-YOQRYNLP.js +2 -0
- package/dist/chunks/chunk-YY7LEQGP.js +2 -0
- package/dist/chunks/chunk-Z4Z5UOZM.js +22 -0
- package/dist/chunks/chunk-Z54O534A.js +3 -0
- package/dist/chunks/chunk-ZCHXGRRU.js +2 -0
- package/dist/chunks/chunk-ZFSHBFG5.js +40 -0
- package/dist/chunks/chunk-ZGTOK7ZK.js +12 -0
- package/dist/chunks/{chunk-Q7AXHFZV.js → chunk-ZRDGQDZL.js} +1 -1
- package/dist/chunks/chunk-ZUJ3XUCP.js +2 -0
- package/dist/chunks/chunk-ZZWAQBA2.js +2 -0
- package/dist/chunks/cli-X25RSO2X.js +2 -0
- package/dist/chunks/configuration-command-6C5UO7GE.js +2 -0
- package/dist/chunks/connected-app-executor-IVLGQP65.js +2 -0
- package/dist/chunks/connected-evidence-GH2ATNEX.js +2 -0
- package/dist/chunks/connection-HTF6CC7M.js +2 -0
- package/dist/chunks/{continual-TTGJ6YTR.js → continual-6CQAMTTR.js} +3 -3
- package/dist/chunks/core-commands-A2DGGIPS.js +2 -0
- package/dist/chunks/datasets-7BNMVJOY.js +2 -0
- package/dist/chunks/desktop-test-3CUHVLXV.js +3 -0
- package/dist/chunks/dist-OMGUJYPD.js +2 -0
- package/dist/chunks/dist-VYC5VMQB.js +2 -0
- package/dist/chunks/{dist-FAJX2UBW.js → dist-ZVJPJLXR.js} +1 -1
- package/dist/chunks/enclave-QS4BUNDU.js +2 -0
- package/dist/chunks/evaluation-coordination-XEF5L7KZ.js +2 -0
- package/dist/chunks/experiment-improvements-KRX2DP27.js +2 -0
- package/dist/chunks/experiments-DFGQYA4O.js +2 -0
- package/dist/chunks/experiments-VFQGE4HC.js +2 -0
- package/dist/chunks/{extension-DWMY6D2R.js → extension-XKXXOP5N.js} +1 -1
- package/dist/chunks/{help-A72QDRNG.js → help-S7THC6IE.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-JJQWJUBT.js +2 -0
- package/dist/chunks/host-profile-external-dataset-K3ICDHIP.js +2 -0
- package/dist/chunks/hosted-app-server-composition-BCOO5ANF.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-NFSVS5TU.js +3 -0
- package/dist/chunks/hosted-harness-runtime-723S5ZSH.js +2 -0
- package/dist/chunks/hosted-profile-candidate-2S5LFUWD.js +3 -0
- package/dist/chunks/hosted-profile-compiler-2DQIFSXW.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-76BTRTYD.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-V6Z3A5XJ.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-IDJYREW3.js +3 -0
- package/dist/chunks/hosted-tasksets-ANAE2PIW.js +2 -0
- package/dist/chunks/human-review-WR777ODH.js +2 -0
- package/dist/chunks/import-MLZUHITH.js +4 -0
- package/dist/chunks/learning-ACEVFL5M.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-JIQ6ZVDW.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XVYTGAGK.js +2 -0
- package/dist/chunks/local-scope-HVF2GZ5W.js +2 -0
- package/dist/chunks/model-projects-QPO22JPA.js +2 -0
- package/dist/chunks/opchat-T4QTNEIY.js +3 -0
- package/dist/chunks/organizations-75L5DZDV.js +2 -0
- package/dist/chunks/{profile-NOZ6TVXL.js → profile-TFZMUEDR.js} +1 -1
- package/dist/chunks/profile-training-source-6GOT7AHM.js +2 -0
- package/dist/chunks/project-action-payload-7VGL7OER.js +2 -0
- package/dist/chunks/project-agent-6RRO233B.js +2 -0
- package/dist/chunks/published-experiment-source-DZFENAQA.js +2 -0
- package/dist/chunks/refiner-profile-service-UUIWFJVT.js +2 -0
- package/dist/chunks/runtime-A7OZXM43.js +6 -0
- package/dist/chunks/sandbox-command-IU5XFTJP.js +2 -0
- package/dist/chunks/{sandbox-template-LKGBDVJ4.js → sandbox-template-C4V6T36U.js} +1 -1
- package/dist/chunks/saved-work-6BMBFP43.js +2 -0
- package/dist/chunks/send-turn-XTAIS2JN.js +2 -0
- package/dist/chunks/src-CJM6HY5Y.js +326 -0
- package/dist/chunks/{src-ZWJ5IO7A.js → src-LMC3K6LH.js} +1 -1
- package/dist/chunks/standalone-experiment-turn-owner-JCY5LL5R.js +2 -0
- package/dist/chunks/store-chat-workflows-S72HZXQR.js +18 -0
- package/dist/chunks/store-continual-support-reviews-HHA6NX7K.js +7 -0
- package/dist/chunks/store-conversation-serving-KPC62UEY.js +2 -0
- package/dist/chunks/store-create-improve-QV54XIZW.js +40 -0
- package/dist/chunks/store-datasets-RXJ33SUN.js +86 -0
- package/dist/chunks/store-evaluation-results-3F3P527G.js +7 -0
- package/dist/chunks/store-harness-evaluation-review-settings-I2R3HPO3.js +29 -0
- package/dist/chunks/store-harness-memory-VINCZ4GK.js +17 -0
- package/dist/chunks/store-harness-refinement-candidates-EA5KFQPH.js +21 -0
- package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +2 -0
- package/dist/chunks/store-human-review-RAH7WMIP.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-4CI2IRUF.js +2 -0
- package/dist/chunks/store-learning-WLG6KFIO.js +2 -0
- package/dist/chunks/store-learning-credentials-WZQJ4HPJ.js +2 -0
- package/dist/chunks/store-local-experiments-5LUJR7GI.js +97 -0
- package/dist/chunks/store-model-batch-review-YEGX327M.js +2 -0
- package/dist/chunks/store-model-configuration-5ZURQATB.js +3 -0
- package/dist/chunks/store-preference-comparison-LV32MHVL.js +6 -0
- package/dist/chunks/store-schedules-VGTEQVKH.js +53 -0
- package/dist/chunks/store-sidebar-file-bookmarks-VB5GTLFY.js +18 -0
- package/dist/chunks/store-sidebar-preferences-GWIOG2NH.js +16 -0
- package/dist/chunks/store-subagents-T7R2Z6TB.js +67 -0
- package/dist/chunks/store-task-inbox-JJTBW76C.js +33 -0
- package/dist/chunks/store-task-inventory-OB3F2APC.js +10 -0
- package/dist/chunks/store-taskset-drafts-EKQWWFYQ.js +9 -0
- package/dist/chunks/store-training-G6YLFSIR.js +70 -0
- package/dist/chunks/store-training-jobs-RC46YBF6.js +19 -0
- package/dist/chunks/store-training-models-6BA43IPP.js +49 -0
- package/dist/chunks/store-usage-IE2U2FD3.js +63 -0
- package/dist/chunks/store-work-evidence-QQDKM5AQ.js +8 -0
- package/dist/chunks/taskset-EQRFQBYM.js +2 -0
- package/dist/chunks/taskset-packages-XC6HEE3K.js +2 -0
- package/dist/chunks/{teams-bot-H7XT23XB.js → teams-bot-EAPGPTHZ.js} +1 -1
- package/dist/chunks/training-UF6RPI4T.js +2 -0
- package/dist/chunks/web-search-CZ3NCLPY.js +2 -0
- package/dist/chunks/workspaces-EKKE5NAC.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/web/assets/{App-CTlAPuCY.css → App-CaRMZoxo.css} +1 -1
- package/dist/web/assets/App-s-CJswyt.js +154 -0
- package/dist/web/assets/{AppDialog-CPHTPqrx.js → AppDialog-t2Fx5tK3.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-BVj5Tj93.js → AppTerminalPanel-Dj1Y32oI.js} +2 -2
- package/dist/web/assets/{AppsView-O69zEBY3.js → AppsView-BYE5EBDJ.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-Pr_Kpe8p.js → BrowserSidebar-jhWi4rVm.js} +1 -1
- package/dist/web/assets/{CartesianChart-JPqo6YOf.js → CartesianChart-C1DIx0Ia.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-CAJcQFn2.js → CollaborationTabs-Bdr-HmOL.js} +1 -1
- package/dist/web/assets/{CommandMenu-B-w53n9A.js → CommandMenu-Ux2yOHAc.js} +1 -1
- package/dist/web/assets/{CommunityView-DbZKK8_P.js → CommunityView-DPEeVKFn.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-3_083PF4.js → ComposerCreateImproveStrip-CEgh4OtN.js} +1 -1
- package/dist/web/assets/{GetStartedView-D7JGm_6c.js → GetStartedView-CFHP0AaI.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-DwgMfZ7_.js → HostedModelLearningReview-D8BGTPVN.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-JRfQadRl.js → HostedModelLearningSettings-JS1S7vNO.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-BUYflJY_.js → LabModelVersionDetailPage-Dx5Q3xV2.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-BBiqk7Rf.js → LabSkillSidebar-BxffN-pN.js} +1 -1
- package/dist/web/assets/{LabsRoute-Ci6vUnSd.js → LabsRoute-CyYF8-dw.js} +4 -4
- package/dist/web/assets/{MainChatThread-BQK3oI2N.js → MainChatThread-DZpcFRFl.js} +2 -2
- package/dist/web/assets/MainPane-5DTtwVCk.js +65 -0
- package/dist/web/assets/MainPane-BIM_UJ3q.css +1 -0
- package/dist/web/assets/{MarkdownText-DOdOVFXL.js → MarkdownText-BR4V6lNO.js} +21 -21
- package/dist/web/assets/{NativeSkillSidebar-CRI_ri8z.js → NativeSkillSidebar-DU9IEgIO.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-DhYtfE68.js → NewExperienceSwitcher-mIy6FzCj.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-D8sy1gOz.js → NewProjectDialog-RfTZTHxl.js} +1 -1
- package/dist/web/assets/{OutputsPage-CbWgrhXA.js → OutputsPage-Cr1Spf7S.js} +1 -1
- package/dist/web/assets/{ProjectsPage-DLB67lyA.js → ProjectsPage-CE6QUB-b.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-ozSKnDyX.js → RightChatPanelStack-T6VRWuHo.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-CK0rP3WT.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-Cafv_QnR.js → ScheduledWorkPage-vOrYv8pp.js} +1 -1
- package/dist/web/assets/SettingsView-DCKVrfjj.js +5 -0
- package/dist/web/assets/SettingsView-Dulr_xlq.css +1 -0
- package/dist/web/assets/{TeamChatView-vIrmXOY_.js → TeamChatView-Bwrjr-vk.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-CAmF__Dq.js → TerminalOverlay-DhPoKZAq.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-BXHfohNm.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-D7XZePAk.js → TrainingDraftPanel-C9cRX5qf.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CYTmp7PG.js → UsageSettingsSection-CrdcSGeW.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-DSSikNFQ.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-DQGoIjH9.js → WorkspaceDiffPanel-BAFo0CPN.js} +6 -6
- package/dist/web/assets/{WorkspaceEnvironmentMenu-c1pHDskn.js → WorkspaceEnvironmentMenu-BVHAhwnJ.js} +1 -1
- package/dist/web/assets/WorkspaceGitDialogs-CwVoiDQ2.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-BCKzvSj2.js → WorkspaceMonacoEditor-TxLyhzNp.js} +3 -3
- package/dist/web/assets/{arrow-up-right-CP4hZdrJ.js → arrow-up-right-C9aE8Mfz.js} +1 -1
- package/dist/web/assets/{chunk-NOJECMB7-Bhcms-w5.js → chunk-P3BRSSRD-DUGfuKA8.js} +1 -1
- package/dist/web/assets/{clipboard-BgrXorn-.js → clipboard-Dk158Qp4.js} +1 -1
- package/dist/web/assets/{cloud-upload-B_zYztb6.js → cloud-upload-k9eqBsHr.js} +1 -1
- package/dist/web/assets/{cssMode-DanjGgA8.js → cssMode-CO35ARZp.js} +1 -1
- package/dist/web/assets/{folder-open-CdVKbtGq.js → folder-open-sYgceW_f.js} +1 -1
- package/dist/web/assets/{folder-plus-Cc5KElB6.js → folder-plus-CS0R49m9.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CjGIIgRi.js → git-commit-horizontal-DrGxH2h4.js} +1 -1
- package/dist/web/assets/{htmlMode-DRGDF_UL.js → htmlMode-REMmzdfq.js} +1 -1
- package/dist/web/assets/index-3iPNbbER.css +1 -0
- package/dist/web/assets/{index-BE-wXZ5R.js → index-C8aCGagb.js} +2 -2
- package/dist/web/assets/{info-BLj0RvhA.js → info-DLdbiUrh.js} +1 -1
- package/dist/web/assets/{jsonMode-CCu0j2GD.js → jsonMode-KEdMfkIf.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-s_Lhm7P6.js → lspLanguageFeatures-5KZwEoxW.js} +1 -1
- package/dist/web/assets/{minimize-2-Cyg_zD9z.js → minimize-2-CqcI4zcM.js} +1 -1
- package/dist/web/assets/{monaco.contribution-CY7mRgOB.js → monaco.contribution-BJGj65F9.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CAzXvYkn.js → monaco.contribution-Cly9Wt7L.js} +2 -2
- package/dist/web/assets/{monaco.contribution-mUPNK9ra.js → monaco.contribution-DO10L0zW.js} +2 -2
- package/dist/web/assets/{monaco.contribution-aUeLcBEg.js → monaco.contribution-omszXBEj.js} +2 -2
- package/dist/web/assets/{monitor-DZvOs_wC.js → monitor-BFVCcbxp.js} +1 -1
- package/dist/web/assets/{play-BJPzemuY.js → play-C469pVZq.js} +1 -1
- package/dist/web/assets/{python-B_qnnVaG.js → python-Dw0YcVy9.js} +1 -1
- package/dist/web/assets/{save-BDy9tA3E.js → save-CtSjPydi.js} +1 -1
- package/dist/web/assets/{square-Cb2c5td4.js → square-BuImvLhT.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-MhO1JLyR.js → toggleHighContrast-DjCO9lIP.js} +1 -1
- package/dist/web/assets/{tsMode-DfBXJb9V.js → tsMode-BAOnxKd6.js} +1 -1
- package/dist/web/assets/{upload-D56kThRh.js → upload-2JkFZo3h.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-DMnGfswi.js → useLocalAgentSchedules-BNqAisfS.js} +1 -1
- package/dist/web/assets/useProviderSettings-C4L4wDoh.js +5 -0
- package/dist/web/assets/{useProviderSettings-Bw-csWbH.css → useProviderSettings-CmL_BaxP.css} +1 -1
- package/dist/web/assets/{useSessionTurnCache-ClAY8gze.js → useSessionTurnCache-BHU2-Jmz.js} +1 -1
- package/dist/web/assets/{wifi-off-C9lWJmVm.js → wifi-off-CpOAH62M.js} +1 -1
- package/dist/web/assets/{workers-BYzrH8by.js → workers-0QvlA2T5.js} +1 -1
- package/dist/web/assets/{yaml-D3T8UkT3.js → yaml-BK3qxo7D.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunks/actions-command-WTFZA7LF.js +0 -2
- package/dist/chunks/app-server-runtime-2RM3N4I6.js +0 -2
- package/dist/chunks/apps-KDNWYO3G.js +0 -2
- package/dist/chunks/chunk-2DFR7PJ4.js +0 -2460
- package/dist/chunks/chunk-4CRM2ADK.js +0 -2
- package/dist/chunks/chunk-55G6B54U.js +0 -6
- package/dist/chunks/chunk-73G5UYBB.js +0 -12
- package/dist/chunks/chunk-ARQEJOEK.js +0 -33
- package/dist/chunks/chunk-CGBI2VYJ.js +0 -2
- package/dist/chunks/chunk-GGIG3XU7.js +0 -3
- package/dist/chunks/chunk-JIMU3KDA.js +0 -24
- package/dist/chunks/chunk-JUJSA7KI.js +0 -22
- package/dist/chunks/chunk-K5SBVO3B.js +0 -195
- package/dist/chunks/chunk-KD3QVRIJ.js +0 -21
- package/dist/chunks/chunk-L4235TRQ.js +0 -140
- package/dist/chunks/chunk-MVF3F5QS.js +0 -2
- package/dist/chunks/chunk-OULAKUIN.js +0 -2
- package/dist/chunks/chunk-OWNLDB2O.js +0 -2
- package/dist/chunks/chunk-QDHMP5FS.js +0 -2
- package/dist/chunks/chunk-QKD5OMDI.js +0 -2
- package/dist/chunks/chunk-R2BSIRYL.js +0 -3
- package/dist/chunks/chunk-STDMBJOQ.js +0 -9
- package/dist/chunks/chunk-T4QGDQHP.js +0 -4
- package/dist/chunks/chunk-USMZT5FZ.js +0 -18
- package/dist/chunks/chunk-VJEZPDBS.js +0 -5
- package/dist/chunks/chunk-WDFLCNRC.js +0 -8
- package/dist/chunks/chunk-WZYRAR7X.js +0 -16
- package/dist/chunks/chunk-YDT7L3VZ.js +0 -24
- package/dist/chunks/chunk-YUPBAWBJ.js +0 -554
- package/dist/chunks/cli-465VC2WP.js +0 -2
- package/dist/chunks/configuration-command-LAAP2EXT.js +0 -2
- package/dist/chunks/connected-evidence-XM626247.js +0 -2
- package/dist/chunks/core-commands-W7EK552V.js +0 -2
- package/dist/chunks/datasets-QJWYTTQL.js +0 -2
- package/dist/chunks/desktop-test-3B2D34NF.js +0 -3
- package/dist/chunks/dist-HUAE2KFZ.js +0 -2
- package/dist/chunks/evaluation-coordination-2MONR4AX.js +0 -2
- package/dist/chunks/experiment-improvements-WVQ5FK46.js +0 -2
- package/dist/chunks/experiments-S5UQ32QB.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-2OWOQLHC.js +0 -3
- package/dist/chunks/hosted-harness-runtime-TGFMAV7W.js +0 -2
- package/dist/chunks/hosted-profile-candidate-WQSI6HZO.js +0 -3
- package/dist/chunks/hosted-profile-compiler-Z2A4TEA6.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-FKGARUEE.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-QOY2JKV4.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-WVP6CALP.js +0 -3
- package/dist/chunks/human-review-TGHQKXFZ.js +0 -2
- package/dist/chunks/import-4UE5XNSG.js +0 -4
- package/dist/chunks/learning-R2XBMMEM.js +0 -2
- package/dist/chunks/opchat-WULL6CUP.js +0 -3
- package/dist/chunks/organizations-I37HISVX.js +0 -2
- package/dist/chunks/project-agent-T6XKC54C.js +0 -2
- package/dist/chunks/sandbox-command-STB47FRY.js +0 -2
- package/dist/chunks/src-T3KWWCAH.js +0 -322
- package/dist/chunks/taskset-RNYDR4GS.js +0 -2
- package/dist/chunks/training-M6FAPRSJ.js +0 -2
- package/dist/chunks/workspaces-MFZ3OO6O.js +0 -2
- package/dist/web/assets/App-CLFfy_Av.js +0 -154
- package/dist/web/assets/MainPane-D3ojiN-p.js +0 -18
- package/dist/web/assets/MainPane-DOWsSew1.css +0 -1
- package/dist/web/assets/RightSidebarHomePanel-CKs3OwhD.js +0 -1
- package/dist/web/assets/SettingsView-BnANbPLS.css +0 -1
- package/dist/web/assets/SettingsView-T1vYDPjh.js +0 -5
- package/dist/web/assets/TrainingCreationPanel-D75K0yk5.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-CODMjVHY.js +0 -1
- package/dist/web/assets/WorkspaceGitDialogs-DrVtapQQ.js +0 -1
- package/dist/web/assets/index-B5re-RJy.css +0 -1
- package/dist/web/assets/useProviderSettings-Bv5B9eNk.js +0 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as kn,b as Pn,v as eo,w as to}from"./chunk-TVQAPBLZ.js";import{b as k,c as b,d as X,e as wn,f as D,h as Ie,i as $n,j as Sn,l as Ct,m as S,n as ht}from"./chunk-KGNCKIFP.js";import{b as s}from"./chunk-ES2ISFJC.js";import{a as i,c as w,e as cu}from"./chunk-FTQLQJQV.js";var Kt=w(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.regexpCode=z.getEsmExportName=z.getProperty=z.safeStringify=z.stringify=z.strConcat=z.addCodeArg=z.str=z._=z.nil=z._Code=z.Name=z.IDENTIFIER=z._CodeOrName=void 0;var zt=class{static{i(this,"_CodeOrName")}};z._CodeOrName=zt;z.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var et=class extends zt{static{i(this,"Name")}constructor(t){if(super(),!z.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};z.Name=et;var be=class extends zt{static{i(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof et&&(r[n.str]=(r[n.str]||0)+1),r),{})}};z._Code=be;z.nil=new be("");function vo(e,...t){let r=[e[0]],n=0;for(;n<t.length;)On(r,t[n]),r.push(e[++n]);return new be(r)}i(vo,"_");z._=vo;var qn=new be("+");function bo(e,...t){let r=[Vt(e[0])],n=0;for(;n<t.length;)r.push(qn),On(r,t[n]),r.push(qn,Vt(e[++n]));return Iu(r),new be(r)}i(bo,"str");z.str=bo;function On(e,t){t instanceof be?e.push(...t._items):t instanceof et?e.push(t):e.push(Ou(t))}i(On,"addCodeArg");z.addCodeArg=On;function Iu(e){let t=1;for(;t<e.length-1;){if(e[t]===qn){let r=ju(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}i(Iu,"optimize");function ju(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof et||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof et))return`"${e}${t.slice(1)}`}i(ju,"mergeExprItems");function qu(e,t){return t.emptyStr()?e:e.emptyStr()?t:bo`${e}${t}`}i(qu,"strConcat");z.strConcat=qu;function Ou(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Vt(Array.isArray(e)?e.join(","):e)}i(Ou,"interpolate");function Au(e){return new be(Vt(e))}i(Au,"stringify");z.stringify=Au;function Vt(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}i(Vt,"safeStringify");z.safeStringify=Vt;function Tu(e){return typeof e=="string"&&z.IDENTIFIER.test(e)?new be(`.${e}`):vo`[${e}]`}i(Tu,"getProperty");z.getProperty=Tu;function Nu(e){if(typeof e=="string"&&z.IDENTIFIER.test(e))return new be(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}i(Nu,"getEsmExportName");z.getEsmExportName=Nu;function Hu(e){return new be(e.toString())}i(Hu,"regexpCode");z.regexpCode=Hu});var Nn=w(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.ValueScope=ue.ValueScopeName=ue.Scope=ue.varKinds=ue.UsedValueState=void 0;var le=Kt(),An=class extends Error{static{i(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},jr;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(jr||(ue.UsedValueState=jr={}));ue.varKinds={const:new le.Name("const"),let:new le.Name("let"),var:new le.Name("var")};var qr=class{static{i(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof le.Name?t:this.name(t)}name(t){return new le.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};ue.Scope=qr;var Or=class extends le.Name{static{i(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,le._)`.${new le.Name(r)}[${n}]`}};ue.ValueScopeName=Or;var Cu=(0,le._)`\n`,Tn=class extends qr{static{i(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Cu:le.nil}}get(){return this._scope}name(t){return new Or(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(t),{prefix:c}=a,o=(n=r.key)!==null&&n!==void 0?n:r.ref,l=this._values[c];if(l){let f=l.get(o);if(f)return f}else l=this._values[c]=new Map;l.set(o,a);let d=this._scope[c]||(this._scope[c]=[]),u=d.length;return d[u]=r.ref,a.setValue(r,{property:c,itemIndex:u}),a}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,le._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},r,n)}_reduceValues(t,r,n={},a){let c=le.nil;for(let o in t){let l=t[o];if(!l)continue;let d=n[o]=n[o]||new Map;l.forEach(u=>{if(d.has(u))return;d.set(u,jr.Started);let f=r(u);if(f){let m=this.opts.es5?ue.varKinds.var:ue.varKinds.const;c=(0,le._)`${c}${m} ${u} = ${f};${this.opts._n}`}else if(f=a?.(u))c=(0,le._)`${c}${f}${this.opts._n}`;else throw new An(u);d.set(u,jr.Completed)})}return c}};ue.ValueScope=Tn});var j=w(A=>{"use strict";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 C=Kt(),Pe=Nn(),Le=Kt();Object.defineProperty(A,"_",{enumerable:!0,get:i(function(){return Le._},"get")});Object.defineProperty(A,"str",{enumerable:!0,get:i(function(){return Le.str},"get")});Object.defineProperty(A,"strConcat",{enumerable:!0,get:i(function(){return Le.strConcat},"get")});Object.defineProperty(A,"nil",{enumerable:!0,get:i(function(){return Le.nil},"get")});Object.defineProperty(A,"getProperty",{enumerable:!0,get:i(function(){return Le.getProperty},"get")});Object.defineProperty(A,"stringify",{enumerable:!0,get:i(function(){return Le.stringify},"get")});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:i(function(){return Le.regexpCode},"get")});Object.defineProperty(A,"Name",{enumerable:!0,get:i(function(){return Le.Name},"get")});var Hr=Nn();Object.defineProperty(A,"Scope",{enumerable:!0,get:i(function(){return Hr.Scope},"get")});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:i(function(){return Hr.ValueScope},"get")});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:i(function(){return Hr.ValueScopeName},"get")});Object.defineProperty(A,"varKinds",{enumerable:!0,get:i(function(){return Hr.varKinds},"get")});A.operators={GT:new C._Code(">"),GTE:new C._Code(">="),LT:new C._Code("<"),LTE:new C._Code("<="),EQ:new C._Code("==="),NEQ:new C._Code("!=="),NOT:new C._Code("!"),OR:new C._Code("||"),AND:new C._Code("&&"),ADD:new C._Code("+")};var Ce=class{static{i(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},Hn=class extends Ce{static{i(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Pe.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=yt(this.rhs,t,r)),this}get names(){return this.rhs instanceof C._CodeOrName?this.rhs.names:{}}},Ar=class extends Ce{static{i(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof C.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=yt(this.rhs,t,r),this}get names(){let t=this.lhs instanceof C.Name?{}:{...this.lhs.names};return Nr(t,this.rhs)}},Cn=class extends Ar{static{i(this,"AssignOp")}constructor(t,r,n,a){super(t,n,a),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Dn=class extends Ce{static{i(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Mn=class extends Ce{static{i(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},zn=class extends Ce{static{i(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Vn=class extends Ce{static{i(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=yt(this.code,t,r),this}get names(){return this.code instanceof C._CodeOrName?this.code.names:{}}},Lt=class extends Ce{static{i(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,a=n.length;for(;a--;){let c=n[a];c.optimizeNames(t,r)||(Du(t,c.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>nt(t,r.names),{})}},De=class extends Lt{static{i(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Kn=class extends Lt{static{i(this,"Root")}},gt=class extends De{static{i(this,"Else")}};gt.kind="else";var tt=class e extends De{static{i(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new gt(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(_o(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=yt(this.condition,t,r),this}get names(){let t=super.names;return Nr(t,this.condition),this.else&&nt(t,this.else.names),t}};tt.kind="if";var rt=class extends De{static{i(this,"For")}};rt.kind="for";var Ln=class extends rt{static{i(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=yt(this.iteration,t,r),this}get names(){return nt(super.names,this.iteration.names)}},Fn=class extends rt{static{i(this,"ForRange")}constructor(t,r,n,a){super(),this.varKind=t,this.name=r,this.from=n,this.to=a}render(t){let r=t.es5?Pe.varKinds.var:this.varKind,{name:n,from:a,to:c}=this;return`for(${r} ${n}=${a}; ${n}<${c}; ${n}++)`+super.render(t)}get names(){let t=Nr(super.names,this.from);return Nr(t,this.to)}},Tr=class extends rt{static{i(this,"ForIter")}constructor(t,r,n,a){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=a}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=yt(this.iterable,t,r),this}get names(){return nt(super.names,this.iterable.names)}},Ft=class extends De{static{i(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Ft.kind="func";var Ut=class extends Lt{static{i(this,"Return")}render(t){return"return "+super.render(t)}};Ut.kind="return";var Un=class extends De{static{i(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,a;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(a=this.finally)===null||a===void 0||a.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&nt(t,this.catch.names),this.finally&&nt(t,this.finally.names),t}},Gt=class extends De{static{i(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Gt.kind="catch";var Bt=class extends De{static{i(this,"Finally")}render(t){return"finally"+super.render(t)}};Bt.kind="finally";var Gn=class{static{i(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
3
|
+
`:""},this._extScope=t,this._scope=new Pe.Scope({parent:t}),this._nodes=[new Kn]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,a){let c=this._scope.toName(r);return n!==void 0&&a&&(this._constants[c.str]=n),this._leafNode(new Hn(t,c,n)),c}const(t,r,n){return this._def(Pe.varKinds.const,t,r,n)}let(t,r,n){return this._def(Pe.varKinds.let,t,r,n)}var(t,r,n){return this._def(Pe.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Ar(t,r,n))}add(t,r){return this._leafNode(new Cn(t,A.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==C.nil&&this._leafNode(new Vn(t)),this}object(...t){let r=["{"];for(let[n,a]of t)r.length>1&&r.push(","),r.push(n),(n!==a||this.opts.es5)&&(r.push(":"),(0,C.addCodeArg)(r,a));return r.push("}"),new C._Code(r)}if(t,r,n){if(this._blockNode(new tt(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new tt(t))}else(){return this._elseNode(new gt)}endIf(){return this._endBlockNode(tt,gt)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ln(t),r)}forRange(t,r,n,a,c=this.opts.es5?Pe.varKinds.var:Pe.varKinds.let){let o=this._scope.toName(t);return this._for(new Fn(c,o,r,n),()=>a(o))}forOf(t,r,n,a=Pe.varKinds.const){let c=this._scope.toName(t);if(this.opts.es5){let o=r instanceof C.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,C._)`${o}.length`,l=>{this.var(c,(0,C._)`${o}[${l}]`),n(c)})}return this._for(new Tr("of",a,c,r),()=>n(c))}forIn(t,r,n,a=this.opts.es5?Pe.varKinds.var:Pe.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,C._)`Object.keys(${r})`,n);let c=this._scope.toName(t);return this._for(new Tr("in",a,c,r),()=>n(c))}endFor(){return this._endBlockNode(rt)}label(t){return this._leafNode(new Dn(t))}break(t){return this._leafNode(new Mn(t))}return(t){let r=new Ut;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ut)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Un;if(this._blockNode(a),this.code(t),r){let c=this.name("e");this._currNode=a.catch=new Gt(c),r(c)}return n&&(this._currNode=a.finally=new Bt,this.code(n)),this._endBlockNode(Gt,Bt)}throw(t){return this._leafNode(new zn(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=C.nil,n,a){return this._blockNode(new Ft(t,r,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Ft)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof tt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};A.CodeGen=Gn;function nt(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}i(nt,"addNames");function Nr(e,t){return t instanceof C._CodeOrName?nt(e,t.names):e}i(Nr,"addExprNames");function yt(e,t,r){if(e instanceof C.Name)return n(e);if(!a(e))return e;return new C._Code(e._items.reduce((c,o)=>(o instanceof C.Name&&(o=n(o)),o instanceof C._Code?c.push(...o._items):c.push(o),c),[]));function n(c){let o=r[c.str];return o===void 0||t[c.str]!==1?c:(delete t[c.str],o)}function a(c){return c instanceof C._Code&&c._items.some(o=>o instanceof C.Name&&t[o.str]===1&&r[o.str]!==void 0)}}i(yt,"optimizeExpr");function Du(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}i(Du,"subtractNames");function _o(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,C._)`!${Bn(e)}`}i(_o,"not");A.not=_o;var Mu=wo(A.operators.AND);function zu(...e){return e.reduce(Mu)}i(zu,"and");A.and=zu;var Vu=wo(A.operators.OR);function Ku(...e){return e.reduce(Vu)}i(Ku,"or");A.or=Ku;function wo(e){return(t,r)=>t===C.nil?r:r===C.nil?t:(0,C._)`${Bn(t)} ${e} ${Bn(r)}`}i(wo,"mappend");function Bn(e){return e instanceof C.Name?e:(0,C._)`(${e})`}i(Bn,"par")});var N=w(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.checkStrictMode=T.getErrorPath=T.Type=T.useFunc=T.setEvaluated=T.evaluatedPropsToName=T.mergeEvaluated=T.eachItem=T.unescapeJsonPointer=T.escapeJsonPointer=T.escapeFragment=T.unescapeFragment=T.schemaRefOrVal=T.schemaHasRulesButRef=T.schemaHasRules=T.checkUnknownRules=T.alwaysValidSchema=T.toHash=void 0;var F=j(),Lu=Kt();function Fu(e){let t={};for(let r of e)t[r]=!0;return t}i(Fu,"toHash");T.toHash=Fu;function Uu(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ko(e,t),!Po(t,e.self.RULES.all))}i(Uu,"alwaysValidSchema");T.alwaysValidSchema=Uu;function ko(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let a=n.RULES.keywords;for(let c in t)a[c]||Ro(e,`unknown keyword: "${c}"`)}i(ko,"checkUnknownRules");T.checkUnknownRules=ko;function Po(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}i(Po,"schemaHasRules");T.schemaHasRules=Po;function Gu(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}i(Gu,"schemaHasRulesButRef");T.schemaHasRulesButRef=Gu;function Bu({topSchemaRef:e,schemaPath:t},r,n,a){if(!a){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,F._)`${r}`}return(0,F._)`${e}${t}${(0,F.getProperty)(n)}`}i(Bu,"schemaRefOrVal");T.schemaRefOrVal=Bu;function Ju(e){return xo(decodeURIComponent(e))}i(Ju,"unescapeFragment");T.unescapeFragment=Ju;function Wu(e){return encodeURIComponent(Wn(e))}i(Wu,"escapeFragment");T.escapeFragment=Wu;function Wn(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}i(Wn,"escapeJsonPointer");T.escapeJsonPointer=Wn;function xo(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}i(xo,"unescapeJsonPointer");T.unescapeJsonPointer=xo;function Xu(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}i(Xu,"eachItem");T.eachItem=Xu;function $o({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(a,c,o,l)=>{let d=o===void 0?c:o instanceof F.Name?(c instanceof F.Name?e(a,c,o):t(a,c,o),o):c instanceof F.Name?(t(a,o,c),c):r(c,o);return l===F.Name&&!(d instanceof F.Name)?n(a,d):d}}i($o,"makeMergeEvaluated");T.mergeEvaluated={props:$o({mergeNames:i((e,t,r)=>e.if((0,F._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,F._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,F._)`${r} || {}`).code((0,F._)`Object.assign(${r}, ${t})`))}),"mergeNames"),mergeToName:i((e,t,r)=>e.if((0,F._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,F._)`${r} || {}`),Xn(e,r,t))}),"mergeToName"),mergeValues:i((e,t)=>e===!0?!0:{...e,...t},"mergeValues"),resultToName:Eo}),items:$o({mergeNames:i((e,t,r)=>e.if((0,F._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,F._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),"mergeNames"),mergeToName:i((e,t,r)=>e.if((0,F._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,F._)`${r} > ${t} ? ${r} : ${t}`)),"mergeToName"),mergeValues:i((e,t)=>e===!0?!0:Math.max(e,t),"mergeValues"),resultToName:i((e,t)=>e.var("items",t),"resultToName")})};function Eo(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,F._)`{}`);return t!==void 0&&Xn(e,r,t),r}i(Eo,"evaluatedPropsToName");T.evaluatedPropsToName=Eo;function Xn(e,t,r){Object.keys(r).forEach(n=>e.assign((0,F._)`${t}${(0,F.getProperty)(n)}`,!0))}i(Xn,"setEvaluated");T.setEvaluated=Xn;var So={};function Yu(e,t){return e.scopeValue("func",{ref:t,code:So[t.code]||(So[t.code]=new Lu._Code(t.code))})}i(Yu,"useFunc");T.useFunc=Yu;var Jn;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Jn||(T.Type=Jn={}));function Zu(e,t,r){if(e instanceof F.Name){let n=t===Jn.Num;return r?n?(0,F._)`"[" + ${e} + "]"`:(0,F._)`"['" + ${e} + "']"`:n?(0,F._)`"/" + ${e}`:(0,F._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,F.getProperty)(e).toString():"/"+Wn(e)}i(Zu,"getErrorPath");T.getErrorPath=Zu;function Ro(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}i(Ro,"checkStrictMode");T.checkStrictMode=Ro});var _e=w(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});var re=j(),Qu={data:new re.Name("data"),valCxt:new re.Name("valCxt"),instancePath:new re.Name("instancePath"),parentData:new re.Name("parentData"),parentDataProperty:new re.Name("parentDataProperty"),rootData:new re.Name("rootData"),dynamicAnchors:new re.Name("dynamicAnchors"),vErrors:new re.Name("vErrors"),errors:new re.Name("errors"),this:new re.Name("this"),self:new re.Name("self"),scope:new re.Name("scope"),json:new re.Name("json"),jsonPos:new re.Name("jsonPos"),jsonLen:new re.Name("jsonLen"),jsonPart:new re.Name("jsonPart")};Yn.default=Qu});var Jt=w(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.extendErrors=ne.resetErrorsCount=ne.reportExtraError=ne.reportError=ne.keyword$DataError=ne.keywordError=void 0;var M=j(),Cr=N(),se=_e();ne.keywordError={message:i(({keyword:e})=>(0,M.str)`must pass "${e}" keyword validation`,"message")};ne.keyword$DataError={message:i(({keyword:e,schemaType:t})=>t?(0,M.str)`"${e}" keyword must be ${t} ($data)`:(0,M.str)`"${e}" keyword is invalid ($data)`,"message")};function ed(e,t=ne.keywordError,r,n){let{it:a}=e,{gen:c,compositeRule:o,allErrors:l}=a,d=qo(e,t,r);n??(o||l)?Io(c,d):jo(a,(0,M._)`[${d}]`)}i(ed,"reportError");ne.reportError=ed;function td(e,t=ne.keywordError,r){let{it:n}=e,{gen:a,compositeRule:c,allErrors:o}=n,l=qo(e,t,r);Io(a,l),c||o||jo(n,se.default.vErrors)}i(td,"reportExtraError");ne.reportExtraError=td;function rd(e,t){e.assign(se.default.errors,t),e.if((0,M._)`${se.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,M._)`${se.default.vErrors}.length`,t),()=>e.assign(se.default.vErrors,null)))}i(rd,"resetErrorsCount");ne.resetErrorsCount=rd;function nd({gen:e,keyword:t,schemaValue:r,data:n,errsCount:a,it:c}){if(a===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",a,se.default.errors,l=>{e.const(o,(0,M._)`${se.default.vErrors}[${l}]`),e.if((0,M._)`${o}.instancePath === undefined`,()=>e.assign((0,M._)`${o}.instancePath`,(0,M.strConcat)(se.default.instancePath,c.errorPath))),e.assign((0,M._)`${o}.schemaPath`,(0,M.str)`${c.errSchemaPath}/${t}`),c.opts.verbose&&(e.assign((0,M._)`${o}.schema`,r),e.assign((0,M._)`${o}.data`,n))})}i(nd,"extendErrors");ne.extendErrors=nd;function Io(e,t){let r=e.const("err",t);e.if((0,M._)`${se.default.vErrors} === null`,()=>e.assign(se.default.vErrors,(0,M._)`[${r}]`),(0,M._)`${se.default.vErrors}.push(${r})`),e.code((0,M._)`${se.default.errors}++`)}i(Io,"addError");function jo(e,t){let{gen:r,validateName:n,schemaEnv:a}=e;a.$async?r.throw((0,M._)`new ${e.ValidationError}(${t})`):(r.assign((0,M._)`${n}.errors`,t),r.return(!1))}i(jo,"returnErrors");var at={keyword:new M.Name("keyword"),schemaPath:new M.Name("schemaPath"),params:new M.Name("params"),propertyName:new M.Name("propertyName"),message:new M.Name("message"),schema:new M.Name("schema"),parentSchema:new M.Name("parentSchema")};function qo(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,M._)`{}`:ad(e,t,r)}i(qo,"errorObjectCode");function ad(e,t,r={}){let{gen:n,it:a}=e,c=[sd(a,r),od(e,r)];return id(e,t,c),n.object(...c)}i(ad,"errorObject");function sd({errorPath:e},{instancePath:t}){let r=t?(0,M.str)`${e}${(0,Cr.getErrorPath)(t,Cr.Type.Str)}`:e;return[se.default.instancePath,(0,M.strConcat)(se.default.instancePath,r)]}i(sd,"errorInstancePath");function od({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let a=n?t:(0,M.str)`${t}/${e}`;return r&&(a=(0,M.str)`${a}${(0,Cr.getErrorPath)(r,Cr.Type.Str)}`),[at.schemaPath,a]}i(od,"errorSchemaPath");function id(e,{params:t,message:r},n){let{keyword:a,data:c,schemaValue:o,it:l}=e,{opts:d,propertyName:u,topSchemaRef:f,schemaPath:m}=l;n.push([at.keyword,a],[at.params,typeof t=="function"?t(e):t||(0,M._)`{}`]),d.messages&&n.push([at.message,typeof r=="function"?r(e):r]),d.verbose&&n.push([at.schema,o],[at.parentSchema,(0,M._)`${f}${m}`],[se.default.data,c]),u&&n.push([at.propertyName,u])}i(id,"extraErrorProps")});var Ao=w(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.boolOrEmptySchema=vt.topBoolOrEmptySchema=void 0;var cd=Jt(),ld=j(),ud=_e(),dd={message:"boolean schema is false"};function md(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Oo(e,!1):typeof r=="object"&&r.$async===!0?t.return(ud.default.data):(t.assign((0,ld._)`${n}.errors`,null),t.return(!0))}i(md,"topBoolOrEmptySchema");vt.topBoolOrEmptySchema=md;function fd(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Oo(e)):r.var(t,!0)}i(fd,"boolOrEmptySchema");vt.boolOrEmptySchema=fd;function Oo(e,t){let{gen:r,data:n}=e,a={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,cd.reportError)(a,dd,void 0,t)}i(Oo,"falseSchemaError")});var Zn=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.getRules=bt.isJSONType=void 0;var pd=["string","number","integer","boolean","null","object","array"],hd=new Set(pd);function gd(e){return typeof e=="string"&&hd.has(e)}i(gd,"isJSONType");bt.isJSONType=gd;function yd(){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:{}}}i(yd,"getRules");bt.getRules=yd});var Qn=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.shouldUseRule=Fe.shouldUseGroup=Fe.schemaHasRulesForType=void 0;function vd({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&To(e,n)}i(vd,"schemaHasRulesForType");Fe.schemaHasRulesForType=vd;function To(e,t){return t.rules.some(r=>No(e,r))}i(To,"shouldUseGroup");Fe.shouldUseGroup=To;function No(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))}i(No,"shouldUseRule");Fe.shouldUseRule=No});var Wt=w(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.reportTypeError=ae.checkDataTypes=ae.checkDataType=ae.coerceAndCheckDataType=ae.getJSONTypes=ae.getSchemaTypes=ae.DataType=void 0;var bd=Zn(),_d=Qn(),wd=Jt(),q=j(),Ho=N(),_t;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(_t||(ae.DataType=_t={}));function $d(e){let t=Co(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}i($d,"getSchemaTypes");ae.getSchemaTypes=$d;function Co(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(bd.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}i(Co,"getJSONTypes");ae.getJSONTypes=Co;function Sd(e,t){let{gen:r,data:n,opts:a}=e,c=kd(t,a.coerceTypes),o=t.length>0&&!(c.length===0&&t.length===1&&(0,_d.schemaHasRulesForType)(e,t[0]));if(o){let l=ta(t,n,a.strictNumbers,_t.Wrong);r.if(l,()=>{c.length?Pd(e,t,c):ra(e)})}return o}i(Sd,"coerceAndCheckDataType");ae.coerceAndCheckDataType=Sd;var Do=new Set(["string","number","integer","boolean","null"]);function kd(e,t){return t?e.filter(r=>Do.has(r)||t==="array"&&r==="array"):[]}i(kd,"coerceToTypes");function Pd(e,t,r){let{gen:n,data:a,opts:c}=e,o=n.let("dataType",(0,q._)`typeof ${a}`),l=n.let("coerced",(0,q._)`undefined`);c.coerceTypes==="array"&&n.if((0,q._)`${o} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,q._)`${a}[0]`).assign(o,(0,q._)`typeof ${a}`).if(ta(t,a,c.strictNumbers),()=>n.assign(l,a))),n.if((0,q._)`${l} !== undefined`);for(let u of r)(Do.has(u)||u==="array"&&c.coerceTypes==="array")&&d(u);n.else(),ra(e),n.endIf(),n.if((0,q._)`${l} !== undefined`,()=>{n.assign(a,l),xd(e,l)});function d(u){switch(u){case"string":n.elseIf((0,q._)`${o} == "number" || ${o} == "boolean"`).assign(l,(0,q._)`"" + ${a}`).elseIf((0,q._)`${a} === null`).assign(l,(0,q._)`""`);return;case"number":n.elseIf((0,q._)`${o} == "boolean" || ${a} === null
|
|
4
|
+
|| (${o} == "string" && ${a} && ${a} == +${a})`).assign(l,(0,q._)`+${a}`);return;case"integer":n.elseIf((0,q._)`${o} === "boolean" || ${a} === null
|
|
5
|
+
|| (${o} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(l,(0,q._)`+${a}`);return;case"boolean":n.elseIf((0,q._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(l,!1).elseIf((0,q._)`${a} === "true" || ${a} === 1`).assign(l,!0);return;case"null":n.elseIf((0,q._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(l,null);return;case"array":n.elseIf((0,q._)`${o} === "string" || ${o} === "number"
|
|
6
|
+
|| ${o} === "boolean" || ${a} === null`).assign(l,(0,q._)`[${a}]`)}}i(d,"coerceSpecificType")}i(Pd,"coerceData");function xd({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,q._)`${t} !== undefined`,()=>e.assign((0,q._)`${t}[${r}]`,n))}i(xd,"assignParentData");function ea(e,t,r,n=_t.Correct){let a=n===_t.Correct?q.operators.EQ:q.operators.NEQ,c;switch(e){case"null":return(0,q._)`${t} ${a} null`;case"array":c=(0,q._)`Array.isArray(${t})`;break;case"object":c=(0,q._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":c=o((0,q._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":c=o();break;default:return(0,q._)`typeof ${t} ${a} ${e}`}return n===_t.Correct?c:(0,q.not)(c);function o(l=q.nil){return(0,q.and)((0,q._)`typeof ${t} == "number"`,l,r?(0,q._)`isFinite(${t})`:q.nil)}}i(ea,"checkDataType");ae.checkDataType=ea;function ta(e,t,r,n){if(e.length===1)return ea(e[0],t,r,n);let a,c=(0,Ho.toHash)(e);if(c.array&&c.object){let o=(0,q._)`typeof ${t} != "object"`;a=c.null?o:(0,q._)`!${t} || ${o}`,delete c.null,delete c.array,delete c.object}else a=q.nil;c.number&&delete c.integer;for(let o in c)a=(0,q.and)(a,ea(o,t,r,n));return a}i(ta,"checkDataTypes");ae.checkDataTypes=ta;var Ed={message:i(({schema:e})=>`must be ${e}`,"message"),params:i(({schema:e,schemaValue:t})=>typeof e=="string"?(0,q._)`{type: ${e}}`:(0,q._)`{type: ${t}}`,"params")};function ra(e){let t=Rd(e);(0,wd.reportError)(t,Ed)}i(ra,"reportTypeError");ae.reportTypeError=ra;function Rd(e){let{gen:t,data:r,schema:n}=e,a=(0,Ho.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:e}}i(Rd,"getTypeErrorContext")});var zo=w(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.assignDefaults=void 0;var wt=j(),Id=N();function jd(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let a in r)Mo(e,a,r[a].default);else t==="array"&&Array.isArray(n)&&n.forEach((a,c)=>Mo(e,c,a.default))}i(jd,"assignDefaults");Dr.assignDefaults=jd;function Mo(e,t,r){let{gen:n,compositeRule:a,data:c,opts:o}=e;if(r===void 0)return;let l=(0,wt._)`${c}${(0,wt.getProperty)(t)}`;if(a){(0,Id.checkStrictMode)(e,`default is ignored for: ${l}`);return}let d=(0,wt._)`${l} === undefined`;o.useDefaults==="empty"&&(d=(0,wt._)`${d} || ${l} === null || ${l} === ""`),n.if(d,(0,wt._)`${l} = ${(0,wt.stringify)(r)}`)}i(Mo,"assignDefault")});var we=w(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.validateUnion=L.validateArray=L.usePattern=L.callValidateCode=L.schemaProperties=L.allSchemaProperties=L.noPropertyInData=L.propertyInData=L.isOwnProperty=L.hasPropFunc=L.reportMissingProp=L.checkMissingProp=L.checkReportMissingProp=void 0;var G=j(),na=N(),Ue=_e(),qd=N();function Od(e,t){let{gen:r,data:n,it:a}=e;r.if(sa(r,n,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,G._)`${t}`},!0),e.error()})}i(Od,"checkReportMissingProp");L.checkReportMissingProp=Od;function Ad({gen:e,data:t,it:{opts:r}},n,a){return(0,G.or)(...n.map(c=>(0,G.and)(sa(e,t,c,r.ownProperties),(0,G._)`${a} = ${c}`)))}i(Ad,"checkMissingProp");L.checkMissingProp=Ad;function Td(e,t){e.setParams({missingProperty:t},!0),e.error()}i(Td,"reportMissingProp");L.reportMissingProp=Td;function Vo(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,G._)`Object.prototype.hasOwnProperty`})}i(Vo,"hasPropFunc");L.hasPropFunc=Vo;function aa(e,t,r){return(0,G._)`${Vo(e)}.call(${t}, ${r})`}i(aa,"isOwnProperty");L.isOwnProperty=aa;function Nd(e,t,r,n){let a=(0,G._)`${t}${(0,G.getProperty)(r)} !== undefined`;return n?(0,G._)`${a} && ${aa(e,t,r)}`:a}i(Nd,"propertyInData");L.propertyInData=Nd;function sa(e,t,r,n){let a=(0,G._)`${t}${(0,G.getProperty)(r)} === undefined`;return n?(0,G.or)(a,(0,G.not)(aa(e,t,r))):a}i(sa,"noPropertyInData");L.noPropertyInData=sa;function Ko(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}i(Ko,"allSchemaProperties");L.allSchemaProperties=Ko;function Hd(e,t){return Ko(t).filter(r=>!(0,na.alwaysValidSchema)(e,t[r]))}i(Hd,"schemaProperties");L.schemaProperties=Hd;function Cd({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:c},it:o},l,d,u){let f=u?(0,G._)`${e}, ${t}, ${n}${a}`:t,m=[[Ue.default.instancePath,(0,G.strConcat)(Ue.default.instancePath,c)],[Ue.default.parentData,o.parentData],[Ue.default.parentDataProperty,o.parentDataProperty],[Ue.default.rootData,Ue.default.rootData]];o.opts.dynamicRef&&m.push([Ue.default.dynamicAnchors,Ue.default.dynamicAnchors]);let p=(0,G._)`${f}, ${r.object(...m)}`;return d!==G.nil?(0,G._)`${l}.call(${d}, ${p})`:(0,G._)`${l}(${p})`}i(Cd,"callValidateCode");L.callValidateCode=Cd;var Dd=(0,G._)`new RegExp`;function Md({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:a}=t.code,c=a(r,n);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:(0,G._)`${a.code==="new RegExp"?Dd:(0,qd.useFunc)(e,a)}(${r}, ${n})`})}i(Md,"usePattern");L.usePattern=Md;function zd(e){let{gen:t,data:r,keyword:n,it:a}=e,c=t.name("valid");if(a.allErrors){let l=t.let("valid",!0);return o(()=>t.assign(l,!1)),l}return t.var(c,!0),o(()=>t.break()),c;function o(l){let d=t.const("len",(0,G._)`${r}.length`);t.forRange("i",0,d,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:na.Type.Num},c),t.if((0,G.not)(c),l)})}i(o,"validateItems")}i(zd,"validateArray");L.validateArray=zd;function Vd(e){let{gen:t,schema:r,keyword:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(d=>(0,na.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let o=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((d,u)=>{let f=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},l);t.assign(o,(0,G._)`${o} || ${l}`),e.mergeValidEvaluated(f,l)||t.if((0,G.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}i(Vd,"validateUnion");L.validateUnion=Vd});var Uo=w(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.validateKeywordUsage=qe.validSchemaType=qe.funcKeywordCode=qe.macroKeywordCode=void 0;var oe=j(),st=_e(),Kd=we(),Ld=Jt();function Fd(e,t){let{gen:r,keyword:n,schema:a,parentSchema:c,it:o}=e,l=t.macro.call(o.self,a,c,o),d=Fo(r,n,l);o.opts.validateSchema!==!1&&o.self.validateSchema(l,!0);let u=r.name("valid");e.subschema({schema:l,schemaPath:oe.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}i(Fd,"macroKeywordCode");qe.macroKeywordCode=Fd;function Ud(e,t){var r;let{gen:n,keyword:a,schema:c,parentSchema:o,$data:l,it:d}=e;Bd(d,t);let u=!l&&t.compile?t.compile.call(d.self,c,o,d):t.validate,f=Fo(n,a,u),m=n.let("valid");e.block$data(m,p),e.ok((r=t.valid)!==null&&r!==void 0?r:m);function p(){if(t.errors===!1)y(),t.modifying&&Lo(e),v(()=>e.error());else{let $=t.async?h():g();t.modifying&&Lo(e),v(()=>Gd(e,$))}}i(p,"validateKeyword");function h(){let $=n.let("ruleErrs",null);return n.try(()=>y((0,oe._)`await `),I=>n.assign(m,!1).if((0,oe._)`${I} instanceof ${d.ValidationError}`,()=>n.assign($,(0,oe._)`${I}.errors`),()=>n.throw(I))),$}i(h,"validateAsync");function g(){let $=(0,oe._)`${f}.errors`;return n.assign($,null),y(oe.nil),$}i(g,"validateSync");function y($=t.async?(0,oe._)`await `:oe.nil){let I=d.opts.passContext?st.default.this:st.default.self,E=!("compile"in t&&!l||t.schema===!1);n.assign(m,(0,oe._)`${$}${(0,Kd.callValidateCode)(e,f,I,E)}`,t.modifying)}i(y,"assignValid");function v($){var I;n.if((0,oe.not)((I=t.valid)!==null&&I!==void 0?I:m),$)}i(v,"reportErrs")}i(Ud,"funcKeywordCode");qe.funcKeywordCode=Ud;function Lo(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,oe._)`${n.parentData}[${n.parentDataProperty}]`))}i(Lo,"modifyData");function Gd(e,t){let{gen:r}=e;r.if((0,oe._)`Array.isArray(${t})`,()=>{r.assign(st.default.vErrors,(0,oe._)`${st.default.vErrors} === null ? ${t} : ${st.default.vErrors}.concat(${t})`).assign(st.default.errors,(0,oe._)`${st.default.vErrors}.length`),(0,Ld.extendErrors)(e)},()=>e.error())}i(Gd,"addErrs");function Bd({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}i(Bd,"checkAsyncKeyword");function Fo(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,oe.stringify)(r)})}i(Fo,"useKeyword");function Jd(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")}i(Jd,"validSchemaType");qe.validSchemaType=Jd;function Wd({schema:e,opts:t,self:r,errSchemaPath:n},a,c){if(Array.isArray(a.keyword)?!a.keyword.includes(c):a.keyword!==c)throw new Error("ajv implementation error");let o=a.dependencies;if(o?.some(l=>!Object.prototype.hasOwnProperty.call(e,l)))throw new Error(`parent schema must have dependencies of ${c}: ${o.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[c])){let d=`keyword "${c}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(d);else throw new Error(d)}}i(Wd,"validateKeywordUsage");qe.validateKeywordUsage=Wd});var Bo=w(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.extendSubschemaMode=Ge.extendSubschemaData=Ge.getSubschema=void 0;var Oe=j(),Go=N();function Xd(e,{keyword:t,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:c,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let l=e.schema[t];return r===void 0?{schema:l,schemaPath:(0,Oe._)`${e.schemaPath}${(0,Oe.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:l[r],schemaPath:(0,Oe._)`${e.schemaPath}${(0,Oe.getProperty)(t)}${(0,Oe.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Go.escapeFragment)(r)}`}}if(n!==void 0){if(a===void 0||c===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:o,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}i(Xd,"getSubschema");Ge.getSubschema=Xd;function Yd(e,t,{dataProp:r,dataPropType:n,data:a,dataTypes:c,propertyName:o}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:l}=t;if(r!==void 0){let{errorPath:u,dataPathArr:f,opts:m}=t,p=l.let("data",(0,Oe._)`${t.data}${(0,Oe.getProperty)(r)}`,!0);d(p),e.errorPath=(0,Oe.str)`${u}${(0,Go.getErrorPath)(r,n,m.jsPropertySyntax)}`,e.parentDataProperty=(0,Oe._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(a!==void 0){let u=a instanceof Oe.Name?a:l.let("data",a,!0);d(u),o!==void 0&&(e.propertyName=o)}c&&(e.dataTypes=c);function d(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}i(d,"dataContextProps")}i(Yd,"extendSubschemaData");Ge.extendSubschemaData=Yd;function Zd(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:c}){n!==void 0&&(e.compositeRule=n),a!==void 0&&(e.createErrors=a),c!==void 0&&(e.allErrors=c),e.jtdDiscriminator=t,e.jtdMetadata=r}i(Zd,"extendSubschemaMode");Ge.extendSubschemaMode=Zd});var oa=w((m0,Jo)=>{"use strict";Jo.exports=i(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,a,c;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!e(t[a],r[a]))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(c=Object.keys(t),n=c.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,c[a]))return!1;for(a=n;a--!==0;){var o=c[a];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},"equal")});var Xo=w((p0,Wo)=>{"use strict";var Be=Wo.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};Mr(t,n,a,e,"",e)};Be.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Be.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Be.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Be.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 Mr(e,t,r,n,a,c,o,l,d,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,a,c,o,l,d,u);for(var f in n){var m=n[f];if(Array.isArray(m)){if(f in Be.arrayKeywords)for(var p=0;p<m.length;p++)Mr(e,t,r,m[p],a+"/"+f+"/"+p,c,a,f,n,p)}else if(f in Be.propsKeywords){if(m&&typeof m=="object")for(var h in m)Mr(e,t,r,m[h],a+"/"+f+"/"+Qd(h),c,a,f,n,h)}else(f in Be.keywords||e.allKeys&&!(f in Be.skipKeywords))&&Mr(e,t,r,m,a+"/"+f,c,a,f,n)}r(n,a,c,o,l,d,u)}}i(Mr,"_traverse");function Qd(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}i(Qd,"escapeJsonPtr")});var Xt=w(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.getSchemaRefs=de.resolveUrl=de.normalizeId=de._getFullPath=de.getFullPath=de.inlineRef=void 0;var em=N(),tm=oa(),rm=Xo(),nm=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function am(e,t=!0){return typeof e=="boolean"?!0:t===!0?!ia(e):t?Yo(e)<=t:!1}i(am,"inlineRef");de.inlineRef=am;var sm=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ia(e){for(let t in e){if(sm.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(ia)||typeof r=="object"&&ia(r))return!0}return!1}i(ia,"hasRef");function Yo(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!nm.has(r)&&(typeof e[r]=="object"&&(0,em.eachItem)(e[r],n=>t+=Yo(n)),t===1/0))return 1/0}return t}i(Yo,"countKeys");function Zo(e,t="",r){r!==!1&&(t=$t(t));let n=e.parse(t);return Qo(e,n)}i(Zo,"getFullPath");de.getFullPath=Zo;function Qo(e,t){return e.serialize(t).split("#")[0]+"#"}i(Qo,"_getFullPath");de._getFullPath=Qo;var om=/#\/?$/;function $t(e){return e?e.replace(om,""):""}i($t,"normalizeId");de.normalizeId=$t;function im(e,t,r){return r=$t(r),e.resolve(t,r)}i(im,"resolveUrl");de.resolveUrl=im;var cm=/^[a-z_][-a-z0-9._]*$/i;function lm(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,a=$t(e[r]||t),c={"":a},o=Zo(n,a,!1),l={},d=new Set;return rm(e,{allKeys:!0},(m,p,h,g)=>{if(g===void 0)return;let y=o+p,v=c[g];typeof m[r]=="string"&&(v=$.call(this,m[r])),I.call(this,m.$anchor),I.call(this,m.$dynamicAnchor),c[p]=v;function $(E){let O=this.opts.uriResolver.resolve;if(E=$t(v?O(v,E):E),d.has(E))throw f(E);d.add(E);let x=this.refs[E];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(m,x.schema,E):E!==$t(y)&&(E[0]==="#"?(u(m,l[E],E),l[E]=m):this.refs[E]=y),E}i($,"addRef");function I(E){if(typeof E=="string"){if(!cm.test(E))throw new Error(`invalid anchor "${E}"`);$.call(this,`#${E}`)}}i(I,"addAnchor")}),l;function u(m,p,h){if(p!==void 0&&!tm(m,p))throw f(h)}i(u,"checkAmbiguosRef");function f(m){return new Error(`reference "${m}" resolves to more than one schema`)}i(f,"ambiguos")}i(lm,"getSchemaRefs");de.getSchemaRefs=lm});var Qt=w(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.getData=Je.KeywordCxt=Je.validateFunctionCode=void 0;var ai=Ao(),ei=Wt(),la=Qn(),zr=Wt(),um=zo(),Zt=Uo(),ca=Bo(),P=j(),R=_e(),dm=Xt(),Me=N(),Yt=Jt();function mm(e){if(ii(e)&&(ci(e),oi(e))){hm(e);return}si(e,()=>(0,ai.topBoolOrEmptySchema)(e))}i(mm,"validateFunctionCode");Je.validateFunctionCode=mm;function si({gen:e,validateName:t,schema:r,schemaEnv:n,opts:a},c){a.code.es5?e.func(t,(0,P._)`${R.default.data}, ${R.default.valCxt}`,n.$async,()=>{e.code((0,P._)`"use strict"; ${ti(r,a)}`),pm(e,a),e.code(c)}):e.func(t,(0,P._)`${R.default.data}, ${fm(a)}`,n.$async,()=>e.code(ti(r,a)).code(c))}i(si,"validateFunction");function fm(e){return(0,P._)`{${R.default.instancePath}="", ${R.default.parentData}, ${R.default.parentDataProperty}, ${R.default.rootData}=${R.default.data}${e.dynamicRef?(0,P._)`, ${R.default.dynamicAnchors}={}`:P.nil}}={}`}i(fm,"destructureValCxt");function pm(e,t){e.if(R.default.valCxt,()=>{e.var(R.default.instancePath,(0,P._)`${R.default.valCxt}.${R.default.instancePath}`),e.var(R.default.parentData,(0,P._)`${R.default.valCxt}.${R.default.parentData}`),e.var(R.default.parentDataProperty,(0,P._)`${R.default.valCxt}.${R.default.parentDataProperty}`),e.var(R.default.rootData,(0,P._)`${R.default.valCxt}.${R.default.rootData}`),t.dynamicRef&&e.var(R.default.dynamicAnchors,(0,P._)`${R.default.valCxt}.${R.default.dynamicAnchors}`)},()=>{e.var(R.default.instancePath,(0,P._)`""`),e.var(R.default.parentData,(0,P._)`undefined`),e.var(R.default.parentDataProperty,(0,P._)`undefined`),e.var(R.default.rootData,R.default.data),t.dynamicRef&&e.var(R.default.dynamicAnchors,(0,P._)`{}`)})}i(pm,"destructureValCxtES5");function hm(e){let{schema:t,opts:r,gen:n}=e;si(e,()=>{r.$comment&&t.$comment&&ui(e),_m(e),n.let(R.default.vErrors,null),n.let(R.default.errors,0),r.unevaluated&&gm(e),li(e),Sm(e)})}i(hm,"topSchemaObjCode");function gm(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,P._)`${r}.evaluated`),t.if((0,P._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,P._)`${e.evaluated}.props`,(0,P._)`undefined`)),t.if((0,P._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,P._)`${e.evaluated}.items`,(0,P._)`undefined`))}i(gm,"resetEvaluated");function ti(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,P._)`/*# sourceURL=${r} */`:P.nil}i(ti,"funcSourceUrl");function ym(e,t){if(ii(e)&&(ci(e),oi(e))){vm(e,t);return}(0,ai.boolOrEmptySchema)(e,t)}i(ym,"subschemaCode");function oi({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}i(oi,"schemaCxtHasRules");function ii(e){return typeof e.schema!="boolean"}i(ii,"isSchemaObj");function vm(e,t){let{schema:r,gen:n,opts:a}=e;a.$comment&&r.$comment&&ui(e),wm(e),$m(e);let c=n.const("_errs",R.default.errors);li(e,c),n.var(t,(0,P._)`${c} === ${R.default.errors}`)}i(vm,"subSchemaObjCode");function ci(e){(0,Me.checkUnknownRules)(e),bm(e)}i(ci,"checkKeywords");function li(e,t){if(e.opts.jtd)return ri(e,[],!1,t);let r=(0,ei.getSchemaTypes)(e.schema),n=(0,ei.coerceAndCheckDataType)(e,r);ri(e,r,!n,t)}i(li,"typeAndKeywords");function bm(e){let{schema:t,errSchemaPath:r,opts:n,self:a}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Me.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}i(bm,"checkRefsAndKeywords");function _m(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Me.checkStrictMode)(e,"default is ignored in the schema root")}i(_m,"checkNoDefault");function wm(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,dm.resolveUrl)(e.opts.uriResolver,e.baseId,t))}i(wm,"updateContext");function $m(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}i($m,"checkAsyncSchema");function ui({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:a}){let c=r.$comment;if(a.$comment===!0)e.code((0,P._)`${R.default.self}.logger.log(${c})`);else if(typeof a.$comment=="function"){let o=(0,P.str)`${n}/$comment`,l=e.scopeValue("root",{ref:t.root});e.code((0,P._)`${R.default.self}.opts.$comment(${c}, ${o}, ${l}.schema)`)}}i(ui,"commentKeyword");function Sm(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:a,opts:c}=e;r.$async?t.if((0,P._)`${R.default.errors} === 0`,()=>t.return(R.default.data),()=>t.throw((0,P._)`new ${a}(${R.default.vErrors})`)):(t.assign((0,P._)`${n}.errors`,R.default.vErrors),c.unevaluated&&km(e),t.return((0,P._)`${R.default.errors} === 0`))}i(Sm,"returnResults");function km({gen:e,evaluated:t,props:r,items:n}){r instanceof P.Name&&e.assign((0,P._)`${t}.props`,r),n instanceof P.Name&&e.assign((0,P._)`${t}.items`,n)}i(km,"assignEvaluated");function ri(e,t,r,n){let{gen:a,schema:c,data:o,allErrors:l,opts:d,self:u}=e,{RULES:f}=u;if(c.$ref&&(d.ignoreKeywordsWithRef||!(0,Me.schemaHasRulesButRef)(c,f))){a.block(()=>mi(e,"$ref",f.all.$ref.definition));return}d.jtd||Pm(e,t),a.block(()=>{for(let p of f.rules)m(p);m(f.post)});function m(p){(0,la.shouldUseGroup)(c,p)&&(p.type?(a.if((0,zr.checkDataType)(p.type,o,d.strictNumbers)),ni(e,p),t.length===1&&t[0]===p.type&&r&&(a.else(),(0,zr.reportTypeError)(e)),a.endIf()):ni(e,p),l||a.if((0,P._)`${R.default.errors} === ${n||0}`))}i(m,"groupKeywords")}i(ri,"schemaKeywords");function ni(e,t){let{gen:r,schema:n,opts:{useDefaults:a}}=e;a&&(0,um.assignDefaults)(e,t.type),r.block(()=>{for(let c of t.rules)(0,la.shouldUseRule)(n,c)&&mi(e,c.keyword,c.definition,t.type)})}i(ni,"iterateKeywords");function Pm(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(xm(e,t),e.opts.allowUnionTypes||Em(e,t),Rm(e,e.dataTypes))}i(Pm,"checkStrictTypes");function xm(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{di(e.dataTypes,r)||ua(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),jm(e,t)}}i(xm,"checkContextTypes");function Em(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ua(e,"use allowUnionTypes to allow union type keyword")}i(Em,"checkMultipleTypes");function Rm(e,t){let r=e.self.RULES.all;for(let n in r){let a=r[n];if(typeof a=="object"&&(0,la.shouldUseRule)(e.schema,a)){let{type:c}=a.definition;c.length&&!c.some(o=>Im(t,o))&&ua(e,`missing type "${c.join(",")}" for keyword "${n}"`)}}}i(Rm,"checkKeywordTypes");function Im(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}i(Im,"hasApplicableType");function di(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}i(di,"includesType");function jm(e,t){let r=[];for(let n of e.dataTypes)di(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}i(jm,"narrowSchemaTypes");function ua(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Me.checkStrictMode)(e,t,e.opts.strictTypes)}i(ua,"strictTypesError");var Vr=class{static{i(this,"KeywordCxt")}constructor(t,r,n){if((0,Zt.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Me.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",fi(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Zt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",R.default.errors))}result(t,r,n){this.failResult((0,P.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,P.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,P._)`${r} !== undefined && (${(0,P.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Yt.reportExtraError:Yt.reportError)(this,this.def.error,r)}$dataError(){(0,Yt.reportError)(this,this.def.$dataError||Yt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Yt.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=P.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=P.nil,r=P.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:c,def:o}=this;n.if((0,P.or)((0,P._)`${a} === undefined`,r)),t!==P.nil&&n.assign(t,!0),(c.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==P.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:a,it:c}=this;return(0,P.or)(o(),l());function o(){if(n.length){if(!(r instanceof P.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,P._)`${(0,zr.checkDataTypes)(d,r,c.opts.strictNumbers,zr.DataType.Wrong)}`}return P.nil}function l(){if(a.validateSchema){let d=t.scopeValue("validate$data",{ref:a.validateSchema});return(0,P._)`!${d}(${r})`}return P.nil}}subschema(t,r){let n=(0,ca.getSubschema)(this.it,t);(0,ca.extendSubschemaData)(n,this.it,t),(0,ca.extendSubschemaMode)(n,t);let a={...this.it,...n,items:void 0,props:void 0};return ym(a,r),a}mergeEvaluated(t,r){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Me.mergeEvaluated.props(a,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Me.mergeEvaluated.items(a,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(t,P.Name)),!0}};Je.KeywordCxt=Vr;function mi(e,t,r,n){let a=new Vr(e,r,t);"code"in r?r.code(a,n):a.$data&&r.validate?(0,Zt.funcKeywordCode)(a,r):"macro"in r?(0,Zt.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,Zt.funcKeywordCode)(a,r)}i(mi,"keywordCode");var qm=/^\/(?:[^~]|~0|~1)*$/,Om=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fi(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let a,c;if(e==="")return R.default.rootData;if(e[0]==="/"){if(!qm.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,c=R.default.rootData}else{let u=Om.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+u[1];if(a=u[2],a==="#"){if(f>=t)throw new Error(d("property/index",f));return n[t-f]}if(f>t)throw new Error(d("data",f));if(c=r[t-f],!a)return c}let o=c,l=a.split("/");for(let u of l)u&&(c=(0,P._)`${c}${(0,P.getProperty)((0,Me.unescapeJsonPointer)(u))}`,o=(0,P._)`${o} && ${c}`);return o;function d(u,f){return`Cannot access ${u} ${f} levels up, current level is ${t}`}}i(fi,"getData");Je.getData=fi});var Kr=w(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});var da=class extends Error{static{i(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};ma.default=da});var er=w(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});var fa=Xt(),pa=class extends Error{static{i(this,"MissingRefError")}constructor(t,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,fa.resolveUrl)(t,r,n),this.missingSchema=(0,fa.normalizeId)((0,fa.getFullPath)(t,this.missingRef))}};ha.default=pa});var tr=w($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.resolveSchema=$e.getCompilingSchema=$e.resolveRef=$e.compileSchema=$e.SchemaEnv=void 0;var xe=j(),Am=Kr(),ot=_e(),Ee=Xt(),pi=N(),Tm=Qt(),St=class{static{i(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ee.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};$e.SchemaEnv=St;function ya(e){let t=hi.call(this,e);if(t)return t;let r=(0,Ee.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:c}=this.opts,o=new xe.CodeGen(this.scope,{es5:n,lines:a,ownProperties:c}),l;e.$async&&(l=o.scopeValue("Error",{ref:Am.default,code:(0,xe._)`require("ajv/dist/runtime/validation_error").default`}));let d=o.scopeName("validate");e.validateName=d;let u={gen:o,allErrors:this.opts.allErrors,data:ot.default.data,parentData:ot.default.parentData,parentDataProperty:ot.default.parentDataProperty,dataNames:[ot.default.data],dataPathArr:[xe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,xe.stringify)(e.schema)}:{ref:e.schema}),validateName:d,ValidationError:l,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:xe.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xe._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,Tm.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let m=o.toString();f=`${o.scopeRefs(ot.default.scope)}return ${m}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let h=new Function(`${ot.default.self}`,`${ot.default.scope}`,f)(this,this.scope.get());if(this.scope.value(d,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:d,validateCode:m,scopeValues:o._values}),this.opts.unevaluated){let{props:g,items:y}=u;h.evaluated={props:g instanceof xe.Name?void 0:g,items:y instanceof xe.Name?void 0:y,dynamicProps:g instanceof xe.Name,dynamicItems:y instanceof xe.Name},h.source&&(h.source.evaluated=(0,xe.stringify)(h.evaluated))}return e.validate=h,e}catch(m){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),m}finally{this._compilations.delete(e)}}i(ya,"compileSchema");$e.compileSchema=ya;function Nm(e,t,r){var n;r=(0,Ee.resolveUrl)(this.opts.uriResolver,t,r);let a=e.refs[r];if(a)return a;let c=Dm.call(this,e,r);if(c===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:l}=this.opts;o&&(c=new St({schema:o,schemaId:l,root:e,baseId:t}))}if(c!==void 0)return e.refs[r]=Hm.call(this,c)}i(Nm,"resolveRef");$e.resolveRef=Nm;function Hm(e){return(0,Ee.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:ya.call(this,e)}i(Hm,"inlineOrCompile");function hi(e){for(let t of this._compilations)if(Cm(t,e))return t}i(hi,"getCompilingSchema");$e.getCompilingSchema=hi;function Cm(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}i(Cm,"sameSchemaEnv");function Dm(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Lr.call(this,e,t)}i(Dm,"resolve");function Lr(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Ee._getFullPath)(this.opts.uriResolver,r),a=(0,Ee.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===a)return ga.call(this,r,e);let c=(0,Ee.normalizeId)(n),o=this.refs[c]||this.schemas[c];if(typeof o=="string"){let l=Lr.call(this,e,o);return typeof l?.schema!="object"?void 0:ga.call(this,r,l)}if(typeof o?.schema=="object"){if(o.validate||ya.call(this,o),c===(0,Ee.normalizeId)(t)){let{schema:l}=o,{schemaId:d}=this.opts,u=l[d];return u&&(a=(0,Ee.resolveUrl)(this.opts.uriResolver,a,u)),new St({schema:l,schemaId:d,root:e,baseId:a})}return ga.call(this,r,o)}}i(Lr,"resolveSchema");$e.resolveSchema=Lr;var Mm=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ga(e,{baseId:t,schema:r,root:n}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let l of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let d=r[(0,pi.unescapeFragment)(l)];if(d===void 0)return;r=d;let u=typeof r=="object"&&r[this.opts.schemaId];!Mm.has(l)&&u&&(t=(0,Ee.resolveUrl)(this.opts.uriResolver,t,u))}let c;if(typeof r!="boolean"&&r.$ref&&!(0,pi.schemaHasRulesButRef)(r,this.RULES)){let l=(0,Ee.resolveUrl)(this.opts.uriResolver,t,r.$ref);c=Lr.call(this,n,l)}let{schemaId:o}=this.opts;if(c=c||new St({schema:r,schemaId:o,root:n,baseId:t}),c.schema!==c.root.schema)return c}i(ga,"getJsonPointer")});var gi=w((x0,zm)=>{zm.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 _a=w((E0,$i)=>{"use strict";var Vm=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),vi=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),va=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),bi=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Km=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function ba(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){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}i(ba,"stringArrayToHexStripped");var Lm=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function yi(e){return e.length=0,!0}i(yi,"consumeIsZone");function Fm(e,t,r){if(e.length){let n=ba(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}i(Fm,"consumeHextets");function Um(e){let t=0,r={error:!1,address:"",zone:""},n=[],a=[],c=!1,o=!1,l=Fm;for(let d=0;d<e.length;d++){let u=e[d];if(!(u==="["||u==="]"))if(u===":"){if(c===!0&&(o=!0),!l(a,n,r))break;if(++t>7){r.error=!0;break}d>0&&e[d-1]===":"&&(c=!0),n.push(":");continue}else if(u==="%"){if(!l(a,n,r))break;l=yi}else{a.push(u);continue}}return a.length&&(l===yi?r.zone=a.join(""):o?n.push(a.join("")):n.push(ba(a))),r.address=n.join(""),r}i(Um,"getIPV6");function _i(e){if(Gm(e,":")<2)return{host:e,isIPV6:!1};let t=Um(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}i(_i,"normalizeIPv6");function Gm(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}i(Gm,"findToken");function Bm(e){let t=e,r=[],n=-1,a=0;for(;a=t.length;){if(a===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(a===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(a===3&&t==="/.."){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]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){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("")}i(Bm,"removeDotSegments");var Jm={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Wm=/[@/?#:]/g,Xm=/[@/?#]/g;function wi(e,t){let r=t?Xm:Wm;return r.lastIndex=0,e.replace(r,n=>Jm[n])}i(wi,"reescapeHostDelimiters");function Ym(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 a=e.slice(n+1,n+3);if(va(a)){let c=a.toUpperCase(),o=String.fromCharCode(parseInt(c,16));t&&bi(o)?r+=o:r+="%"+c,n+=2;continue}}r+=e[n]}return r}i(Ym,"normalizePercentEncoding");function Zm(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(va(n)){let a=n.toUpperCase(),c=String.fromCharCode(parseInt(a,16));c!=="."&&bi(c)?t+=c:t+="%"+a,r+=2;continue}}Km(e[r])?t+=e[r]:t+=escape(e[r])}return t}i(Zm,"normalizePathEncoding");function Qm(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(va(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}i(Qm,"escapePreservingEscapes");function ef(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!vi(r)){let n=_i(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=wi(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}i(ef,"recomposeAuthority");$i.exports={nonSimpleDomain:Lm,recomposeAuthority:ef,reescapeHostDelimiters:wi,normalizePercentEncoding:Ym,normalizePathEncoding:Zm,escapePreservingEscapes:Qm,removeDotSegments:Bm,isIPv4:vi,isUUID:Vm,normalizeIPv6:_i,stringArrayToHexStripped:ba}});var Ei=w((I0,xi)=>{"use strict";var{isUUID:tf}=_a(),rf=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,nf=["http","https","ws","wss","urn","urn:uuid"];function af(e){return nf.indexOf(e)!==-1}i(af,"isValidSchemeName");function wa(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?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"):!1}i(wa,"wsIsSecure");function Si(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}i(Si,"httpParse");function ki(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}i(ki,"httpSerialize");function sf(e){return e.secure=wa(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}i(sf,"wsParse");function of(e){if((e.port===(wa(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}i(of,"wsSerialize");function cf(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(rf);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let a=`${n}:${t.nid||e.nid}`,c=$a(a);e.path=void 0,c&&(e=c.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}i(cf,"urnParse");function lf(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),a=`${r}:${t.nid||n}`,c=$a(a);c&&(e=c.serialize(e,t));let o=e,l=e.nss;return o.path=`${n||t.nid}:${l}`,t.skipEscape=!0,o}i(lf,"urnSerialize");function uf(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!tf(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}i(uf,"urnuuidParse");function df(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}i(df,"urnuuidSerialize");var Pi={scheme:"http",domainHost:!0,parse:Si,serialize:ki},mf={scheme:"https",domainHost:Pi.domainHost,parse:Si,serialize:ki},Fr={scheme:"ws",domainHost:!0,parse:sf,serialize:of},ff={scheme:"wss",domainHost:Fr.domainHost,parse:Fr.parse,serialize:Fr.serialize},pf={scheme:"urn",parse:cf,serialize:lf,skipNormalize:!0},hf={scheme:"urn:uuid",parse:uf,serialize:df,skipNormalize:!0},Ur={http:Pi,https:mf,ws:Fr,wss:ff,urn:pf,"urn:uuid":hf};Object.setPrototypeOf(Ur,null);function $a(e){return e&&(Ur[e]||Ur[e.toLowerCase()])||void 0}i($a,"getSchemeHandler");xi.exports={wsIsSecure:wa,SCHEMES:Ur,isValidSchemeName:af,getSchemeHandler:$a}});var Ai=w((q0,Gr)=>{"use strict";var{normalizeIPv6:gf,removeDotSegments:rr,recomposeAuthority:yf,normalizePercentEncoding:vf,normalizePathEncoding:bf,escapePreservingEscapes:_f,reescapeHostDelimiters:wf,isIPv4:$f,nonSimpleDomain:Sf}=_a(),{SCHEMES:kf,getSchemeHandler:Ii}=Ei();function Pf(e,t){return typeof e=="string"?e=jf(e,t):typeof e=="object"&&(e=kt(it(e,t),t)),e}i(Pf,"normalize");function xf(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},a=ji(kt(e,n),kt(t,n),n,!0);return n.skipEscape=!0,it(a,n)}i(xf,"resolve");function ji(e,t,r,n){let a={};return n||(e=kt(it(e,r),r),t=kt(it(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=rr(t.path||""),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=rr(t.path||""),a.query=t.query):(t.path?(t.path[0]==="/"?a.path=rr(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path="/"+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path,a.path=rr(a.path)),a.query=t.query):(a.path=e.path,t.query!==void 0?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}i(ji,"resolveComponent");function Ef(e,t,r){let n=Ri(e,r),a=Ri(t,r);return n!==void 0&&a!==void 0&&n.toLowerCase()===a.toLowerCase()}i(Ef,"equal");function it(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),a=[],c=Ii(n.scheme||r.scheme);c&&c.serialize&&c.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=vf(r.path):(r.path=_f(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&a.push(r.scheme,":");let o=yf(r);if(o!==void 0&&(n.reference!=="suffix"&&a.push("//"),a.push(o),r.path&&r.path[0]!=="/"&&a.push("/")),r.path!==void 0){let l=r.path;!n.absolutePath&&(!c||!c.absolutePath)&&(l=rr(l)),o===void 0&&l[0]==="/"&&l[1]==="/"&&(l="/%2F"+l.slice(2)),a.push(l)}return r.query!==void 0&&a.push("?",r.query),r.fragment!==void 0&&a.push("#",r.fragment),a.join("")}i(it,"serialize");var Rf=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function If(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."}i(If,"getParseError");function qi(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},a=!1,c=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let o=e.match(Rf);if(o){n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]);let l=If(n,o);if(l!==void 0&&(n.error=n.error||l,a=!0),n.host)if($f(n.host)===!1){let f=gf(n.host);n.host=f.host.toLowerCase(),c=f.isIPV6}else c=!0;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":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let d=Ii(r.scheme||n.scheme);if(!r.unicodeSupport&&(!d||!d.unicodeSupport)&&n.host&&(r.domainHost||d&&d.domainHost)&&c===!1&&Sf(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}if((!d||d&&!d.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=wf(unescape(n.host),c))),n.path&&(n.path=bf(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}d&&d.parse&&d.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:a}}i(qi,"parseWithStatus");function kt(e,t){return qi(e,t).parsed}i(kt,"parse");function jf(e,t){return Oi(e,t).normalized}i(jf,"normalizeString");function Oi(e,t){let{parsed:r,malformedAuthorityOrPort:n}=qi(e,t);return{normalized:n?e:it(r,t),malformedAuthorityOrPort:n}}i(Oi,"normalizeStringWithStatus");function Ri(e,t){if(typeof e=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Oi(e,t);return n?void 0:r}if(typeof e=="object")return it(e,t)}i(Ri,"normalizeComparableURI");var Sa={SCHEMES:kf,normalize:Pf,resolve:xf,resolveComponent:ji,equal:Ef,serialize:it,parse:kt};Gr.exports=Sa;Gr.exports.default=Sa;Gr.exports.fastUri=Sa});var Ni=w(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});var Ti=Ai();Ti.code='require("ajv/dist/runtime/uri").default';ka.default=Ti});var Li=w(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.CodeGen=Q.Name=Q.nil=Q.stringify=Q.str=Q._=Q.KeywordCxt=void 0;var qf=Qt();Object.defineProperty(Q,"KeywordCxt",{enumerable:!0,get:i(function(){return qf.KeywordCxt},"get")});var Pt=j();Object.defineProperty(Q,"_",{enumerable:!0,get:i(function(){return Pt._},"get")});Object.defineProperty(Q,"str",{enumerable:!0,get:i(function(){return Pt.str},"get")});Object.defineProperty(Q,"stringify",{enumerable:!0,get:i(function(){return Pt.stringify},"get")});Object.defineProperty(Q,"nil",{enumerable:!0,get:i(function(){return Pt.nil},"get")});Object.defineProperty(Q,"Name",{enumerable:!0,get:i(function(){return Pt.Name},"get")});Object.defineProperty(Q,"CodeGen",{enumerable:!0,get:i(function(){return Pt.CodeGen},"get")});var Of=Kr(),zi=er(),Af=Zn(),nr=tr(),Tf=j(),ar=Xt(),Br=Wt(),xa=N(),Hi=gi(),Nf=Ni(),Vi=i((e,t)=>new RegExp(e,t),"defaultRegExp");Vi.code="new RegExp";var Hf=["removeAdditional","useDefaults","coerceTypes"],Cf=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Df={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."},Mf={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ci=200;function zf(e){var t,r,n,a,c,o,l,d,u,f,m,p,h,g,y,v,$,I,E,O,x,W,ie,ce,Nt;let Ye=e.strict,Ht=(t=e.code)===null||t===void 0?void 0:t.optimize,Sr=Ht===!0||Ht===void 0?1:Ht||0,kr=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Vi,yn=(a=e.uriResolver)!==null&&a!==void 0?a:Nf.default;return{strictSchema:(o=(c=e.strictSchema)!==null&&c!==void 0?c:Ye)!==null&&o!==void 0?o:!0,strictNumbers:(d=(l=e.strictNumbers)!==null&&l!==void 0?l:Ye)!==null&&d!==void 0?d:!0,strictTypes:(f=(u=e.strictTypes)!==null&&u!==void 0?u:Ye)!==null&&f!==void 0?f:"log",strictTuples:(p=(m=e.strictTuples)!==null&&m!==void 0?m:Ye)!==null&&p!==void 0?p:"log",strictRequired:(g=(h=e.strictRequired)!==null&&h!==void 0?h:Ye)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:Sr,regExp:kr}:{optimize:Sr,regExp:kr},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:Ci,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:Ci,meta:($=e.meta)!==null&&$!==void 0?$:!0,messages:(I=e.messages)!==null&&I!==void 0?I:!0,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(O=e.schemaId)!==null&&O!==void 0?O:"$id",addUsedSchema:(x=e.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(W=e.validateSchema)!==null&&W!==void 0?W:!0,validateFormats:(ie=e.validateFormats)!==null&&ie!==void 0?ie:!0,unicodeRegExp:(ce=e.unicodeRegExp)!==null&&ce!==void 0?ce:!0,int32range:(Nt=e.int32range)!==null&&Nt!==void 0?Nt:!0,uriResolver:yn}}i(zf,"requiredOptions");var sr=class{static{i(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...zf(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new Tf.ValueScope({scope:{},prefixes:Cf,es5:r,lines:n}),this.logger=Gf(t.logger);let a=t.validateFormats;t.validateFormats=!1,this.RULES=(0,Af.getRules)(),Di.call(this,Df,t,"NOT SUPPORTED"),Di.call(this,Mf,t,"DEPRECATED","warn"),this._metaOpts=Ff.call(this),t.formats&&Kf.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&Lf.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),Vf.call(this),t.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,a=Hi;n==="id"&&(a={...Hi},a.id=a.$id,delete a.$id),r&&t&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let a=n(r);return"$async"in n||(this.errors=n.errors),a}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,t,r);async function a(f,m){await c.call(this,f.$schema);let p=this._addSchema(f,m);return p.validate||o.call(this,p)}async function c(f){f&&!this.getSchema(f)&&await a.call(this,{$ref:f},!0)}async function o(f){try{return this._compileSchemaEnv(f)}catch(m){if(!(m instanceof zi.default))throw m;return l.call(this,m),await d.call(this,m.missingSchema),o.call(this,f)}}function l({missingSchema:f,missingRef:m}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${m} cannot be resolved`)}async function d(f){let m=await u.call(this,f);this.refs[f]||await c.call(this,m.$schema),this.refs[f]||this.addSchema(m,f,r)}async function u(f){let m=this._loading[f];if(m)return m;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,a=this.opts.validateSchema){if(Array.isArray(t)){for(let o of t)this.addSchema(o,void 0,n,a);return this}let c;if(typeof t=="object"){let{schemaId:o}=this.opts;if(c=t[o],c!==void 0&&typeof c!="string")throw new Error(`schema ${o} must be string`)}return r=(0,ar.normalizeId)(r||c),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,a,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,t);if(!a&&r){let c="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(c);else throw new Error(c)}return a}getSchema(t){let r;for(;typeof(r=Mi.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,a=new nr.SchemaEnv({schema:{},schemaId:n});if(r=nr.resolveSchema.call(this,a,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Mi.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,ar.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Jf.call(this,n,r),!r)return(0,xa.eachItem)(n,c=>Pa.call(this,c)),this;Xf.call(this,r);let a={...r,type:(0,Br.getJSONTypes)(r.type),schemaType:(0,Br.getJSONTypes)(r.schemaType)};return(0,xa.eachItem)(n,a.type.length===0?c=>Pa.call(this,c,a):c=>a.type.forEach(o=>Pa.call(this,c,a,o))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let a=n.rules.findIndex(c=>c.keyword===t);a>=0&&n.rules.splice(a,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,c)=>a+r+c)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let a of r){let c=a.split("/").slice(1),o=t;for(let l of c)o=o[l];for(let l in n){let d=n[l];if(typeof d!="object")continue;let{$data:u}=d.definition,f=o[l];u&&f&&(o[l]=Ki(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let a=t[n];(!r||r.test(n))&&(typeof a=="string"?delete t[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete t[n]))}}_addSchema(t,r,n,a=this.opts.validateSchema,c=this.opts.addUsedSchema){let o,{schemaId:l}=this.opts;if(typeof t=="object")o=t[l];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let d=this._cache.get(t);if(d!==void 0)return d;n=(0,ar.normalizeId)(o||n);let u=ar.getSchemaRefs.call(this,t,n);return d=new nr.SchemaEnv({schema:t,schemaId:l,meta:r,baseId:n,localRefs:u}),this._cache.set(d.schema,d),c&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(t,!0),d}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):nr.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{nr.compileSchema.call(this,t)}finally{this.opts=r}}};sr.ValidationError=Of.default;sr.MissingRefError=zi.default;Q.default=sr;function Di(e,t,r,n="error"){for(let a in e){let c=a;c in t&&this.logger[n](`${r}: option ${a}. ${e[c]}`)}}i(Di,"checkOptions");function Mi(e){return e=(0,ar.normalizeId)(e),this.schemas[e]||this.refs[e]}i(Mi,"getSchEnv");function Vf(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}i(Vf,"addInitialSchemas");function Kf(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}i(Kf,"addInitialFormats");function Lf(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];r.keyword||(r.keyword=t),this.addKeyword(r)}}i(Lf,"addInitialKeywords");function Ff(){let e={...this.opts};for(let t of Hf)delete e[t];return e}i(Ff,"getMetaSchemaOptions");var Uf={log(){},warn(){},error(){}};function Gf(e){if(e===!1)return Uf;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}i(Gf,"getLogger");var Bf=/^[a-z_$][a-z0-9_$:-]*$/i;function Jf(e,t){let{RULES:r}=this;if((0,xa.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Bf.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}i(Jf,"checkKeyword");function Pa(e,t,r){var n;let a=t?.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:c}=this,o=a?c.post:c.rules.find(({type:d})=>d===r);if(o||(o={type:r,rules:[]},c.rules.push(o)),c.keywords[e]=!0,!t)return;let l={keyword:e,definition:{...t,type:(0,Br.getJSONTypes)(t.type),schemaType:(0,Br.getJSONTypes)(t.schemaType)}};t.before?Wf.call(this,o,l,t.before):o.rules.push(l),c.all[e]=l,(n=t.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}i(Pa,"addRule");function Wf(e,t,r){let n=e.rules.findIndex(a=>a.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}i(Wf,"addBeforeRule");function Xf(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Ki(t)),e.validateSchema=this.compile(t,!0))}i(Xf,"keywordMetaschema");var Yf={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ki(e){return{anyOf:[e,Yf]}}i(Ki,"schemaOrData")});var Fi=w(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});var Zf={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ea.default=Zf});var Xr=w(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.callRef=ct.getValidate=void 0;var Qf=er(),Ui=we(),me=j(),xt=_e(),Gi=tr(),Jr=N(),ep={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:a,schemaEnv:c,validateName:o,opts:l,self:d}=n,{root:u}=c;if((r==="#"||r==="#/")&&a===u.baseId)return m();let f=Gi.resolveRef.call(d,u,a,r);if(f===void 0)throw new Qf.default(n.opts.uriResolver,a,r);if(f instanceof Gi.SchemaEnv)return p(f);return h(f);function m(){if(c===u)return Wr(e,o,c,c.$async);let g=t.scopeValue("root",{ref:u});return Wr(e,(0,me._)`${g}.validate`,u,u.$async)}function p(g){let y=Bi(e,g);Wr(e,y,g,g.$async)}function h(g){let y=t.scopeValue("schema",l.code.source===!0?{ref:g,code:(0,me.stringify)(g)}:{ref:g}),v=t.name("valid"),$=e.subschema({schema:g,dataTypes:[],schemaPath:me.nil,topSchemaRef:y,errSchemaPath:r},v);e.mergeEvaluated($),e.ok(v)}}};function Bi(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,me._)`${r.scopeValue("wrapper",{ref:t})}.validate`}i(Bi,"getValidate");ct.getValidate=Bi;function Wr(e,t,r,n){let{gen:a,it:c}=e,{allErrors:o,schemaEnv:l,opts:d}=c,u=d.passContext?xt.default.this:me.nil;n?f():m();function f(){if(!l.$async)throw new Error("async schema referenced by sync schema");let g=a.let("valid");a.try(()=>{a.code((0,me._)`await ${(0,Ui.callValidateCode)(e,t,u)}`),h(t),o||a.assign(g,!0)},y=>{a.if((0,me._)`!(${y} instanceof ${c.ValidationError})`,()=>a.throw(y)),p(y),o||a.assign(g,!1)}),e.ok(g)}i(f,"callAsyncRef");function m(){e.result((0,Ui.callValidateCode)(e,t,u),()=>h(t),()=>p(t))}i(m,"callSyncRef");function p(g){let y=(0,me._)`${g}.errors`;a.assign(xt.default.vErrors,(0,me._)`${xt.default.vErrors} === null ? ${y} : ${xt.default.vErrors}.concat(${y})`),a.assign(xt.default.errors,(0,me._)`${xt.default.vErrors}.length`)}i(p,"addErrorsFrom");function h(g){var y;if(!c.opts.unevaluated)return;let v=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(c.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(c.props=Jr.mergeEvaluated.props(a,v.props,c.props));else{let $=a.var("props",(0,me._)`${g}.evaluated.props`);c.props=Jr.mergeEvaluated.props(a,$,c.props,me.Name)}if(c.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(c.items=Jr.mergeEvaluated.items(a,v.items,c.items));else{let $=a.var("items",(0,me._)`${g}.evaluated.items`);c.items=Jr.mergeEvaluated.items(a,$,c.items,me.Name)}}i(h,"addEvaluatedFrom")}i(Wr,"callRef");ct.callRef=Wr;ct.default=ep});var Ji=w(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var tp=Fi(),rp=Xr(),np=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",tp.default,rp.default];Ra.default=np});var Wi=w(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var Yr=j(),We=Yr.operators,Zr={maximum:{okStr:"<=",ok:We.LTE,fail:We.GT},minimum:{okStr:">=",ok:We.GTE,fail:We.LT},exclusiveMaximum:{okStr:"<",ok:We.LT,fail:We.GTE},exclusiveMinimum:{okStr:">",ok:We.GT,fail:We.LTE}},ap={message:i(({keyword:e,schemaCode:t})=>(0,Yr.str)`must be ${Zr[e].okStr} ${t}`,"message"),params:i(({keyword:e,schemaCode:t})=>(0,Yr._)`{comparison: ${Zr[e].okStr}, limit: ${t}}`,"params")},sp={keyword:Object.keys(Zr),type:"number",schemaType:"number",$data:!0,error:ap,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Yr._)`${r} ${Zr[t].fail} ${n} || isNaN(${r})`)}};Ia.default=sp});var Xi=w(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var or=j(),op={message:i(({schemaCode:e})=>(0,or.str)`must be multiple of ${e}`,"message"),params:i(({schemaCode:e})=>(0,or._)`{multipleOf: ${e}}`,"params")},ip={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:op,code(e){let{gen:t,data:r,schemaCode:n,it:a}=e,c=a.opts.multipleOfPrecision,o=t.let("res"),l=c?(0,or._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${c}`:(0,or._)`${o} !== parseInt(${o})`;e.fail$data((0,or._)`(${n} === 0 || (${o} = ${r}/${n}, ${l}))`)}};ja.default=ip});var Zi=w(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});function Yi(e){let t=e.length,r=0,n=0,a;for(;n<t;)r++,a=e.charCodeAt(n++),a>=55296&&a<=56319&&n<t&&(a=e.charCodeAt(n),(a&64512)===56320&&n++);return r}i(Yi,"ucs2length");qa.default=Yi;Yi.code='require("ajv/dist/runtime/ucs2length").default'});var Qi=w(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var lt=j(),cp=N(),lp=Zi(),up={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,lt.str)`must NOT have ${r} than ${t} characters`},params:i(({schemaCode:e})=>(0,lt._)`{limit: ${e}}`,"params")},dp={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:up,code(e){let{keyword:t,data:r,schemaCode:n,it:a}=e,c=t==="maxLength"?lt.operators.GT:lt.operators.LT,o=a.opts.unicode===!1?(0,lt._)`${r}.length`:(0,lt._)`${(0,cp.useFunc)(e.gen,lp.default)}(${r})`;e.fail$data((0,lt._)`${o} ${c} ${n}`)}};Oa.default=dp});var ec=w(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var mp=we(),fp=N(),Et=j(),pp={message:i(({schemaCode:e})=>(0,Et.str)`must match pattern "${e}"`,"message"),params:i(({schemaCode:e})=>(0,Et._)`{pattern: ${e}}`,"params")},hp={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:pp,code(e){let{gen:t,data:r,$data:n,schema:a,schemaCode:c,it:o}=e,l=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:d}=o.opts.code,u=d.code==="new RegExp"?(0,Et._)`new RegExp`:(0,fp.useFunc)(t,d),f=t.let("valid");t.try(()=>t.assign(f,(0,Et._)`${u}(${c}, ${l}).test(${r})`),()=>t.assign(f,!1)),e.fail$data((0,Et._)`!${f}`)}else{let d=(0,mp.usePattern)(e,a);e.fail$data((0,Et._)`!${d}.test(${r})`)}}};Aa.default=hp});var tc=w(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});var ir=j(),gp={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,ir.str)`must NOT have ${r} than ${t} properties`},params:i(({schemaCode:e})=>(0,ir._)`{limit: ${e}}`,"params")},yp={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:gp,code(e){let{keyword:t,data:r,schemaCode:n}=e,a=t==="maxProperties"?ir.operators.GT:ir.operators.LT;e.fail$data((0,ir._)`Object.keys(${r}).length ${a} ${n}`)}};Ta.default=yp});var rc=w(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var cr=we(),lr=j(),vp=N(),bp={message:i(({params:{missingProperty:e}})=>(0,lr.str)`must have required property '${e}'`,"message"),params:i(({params:{missingProperty:e}})=>(0,lr._)`{missingProperty: ${e}}`,"params")},_p={keyword:"required",type:"object",schemaType:"array",$data:!0,error:bp,code(e){let{gen:t,schema:r,schemaCode:n,data:a,$data:c,it:o}=e,{opts:l}=o;if(!c&&r.length===0)return;let d=r.length>=l.loopRequired;if(o.allErrors?u():f(),l.strictRequired){let h=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(h?.[y]===void 0&&!g.has(y)){let v=o.schemaEnv.baseId+o.errSchemaPath,$=`required property "${y}" is not defined at "${v}" (strictRequired)`;(0,vp.checkStrictMode)(o,$,o.opts.strictRequired)}}function u(){if(d||c)e.block$data(lr.nil,m);else for(let h of r)(0,cr.checkReportMissingProp)(e,h)}i(u,"allErrorsMode");function f(){let h=t.let("missing");if(d||c){let g=t.let("valid",!0);e.block$data(g,()=>p(h,g)),e.ok(g)}else t.if((0,cr.checkMissingProp)(e,r,h)),(0,cr.reportMissingProp)(e,h),t.else()}i(f,"exitOnErrorMode");function m(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,cr.noPropertyInData)(t,a,h,l.ownProperties),()=>e.error())})}i(m,"loopAllRequired");function p(h,g){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(g,(0,cr.propertyInData)(t,a,h,l.ownProperties)),t.if((0,lr.not)(g),()=>{e.error(),t.break()})},lr.nil)}i(p,"loopUntilMissing")}};Na.default=_p});var nc=w(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var ur=j(),wp={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,ur.str)`must NOT have ${r} than ${t} items`},params:i(({schemaCode:e})=>(0,ur._)`{limit: ${e}}`,"params")},$p={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:wp,code(e){let{keyword:t,data:r,schemaCode:n}=e,a=t==="maxItems"?ur.operators.GT:ur.operators.LT;e.fail$data((0,ur._)`${r}.length ${a} ${n}`)}};Ha.default=$p});var Qr=w(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var ac=oa();ac.code='require("ajv/dist/runtime/equal").default';Ca.default=ac});var sc=w(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});var Da=Wt(),ee=j(),Sp=N(),kp=Qr(),Pp={message:i(({params:{i:e,j:t}})=>(0,ee.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,"message"),params:i(({params:{i:e,j:t}})=>(0,ee._)`{i: ${e}, j: ${t}}`,"params")},xp={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Pp,code(e){let{gen:t,data:r,$data:n,schema:a,parentSchema:c,schemaCode:o,it:l}=e;if(!n&&!a)return;let d=t.let("valid"),u=c.items?(0,Da.getSchemaTypes)(c.items):[];e.block$data(d,f,(0,ee._)`${o} === false`),e.ok(d);function f(){let g=t.let("i",(0,ee._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(d,!0),t.if((0,ee._)`${g} > 1`,()=>(m()?p:h)(g,y))}i(f,"validateUniqueItems");function m(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}i(m,"canOptimize");function p(g,y){let v=t.name("item"),$=(0,Da.checkDataTypes)(u,v,l.opts.strictNumbers,Da.DataType.Wrong),I=t.const("indices",(0,ee._)`{}`);t.for((0,ee._)`;${g}--;`,()=>{t.let(v,(0,ee._)`${r}[${g}]`),t.if($,(0,ee._)`continue`),u.length>1&&t.if((0,ee._)`typeof ${v} == "string"`,(0,ee._)`${v} += "_"`),t.if((0,ee._)`typeof ${I}[${v}] == "number"`,()=>{t.assign(y,(0,ee._)`${I}[${v}]`),e.error(),t.assign(d,!1).break()}).code((0,ee._)`${I}[${v}] = ${g}`)})}i(p,"loopN");function h(g,y){let v=(0,Sp.useFunc)(t,kp.default),$=t.name("outer");t.label($).for((0,ee._)`;${g}--;`,()=>t.for((0,ee._)`${y} = ${g}; ${y}--;`,()=>t.if((0,ee._)`${v}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(d,!1).break($)})))}i(h,"loopN2")}};Ma.default=xp});var oc=w(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var za=j(),Ep=N(),Rp=Qr(),Ip={message:"must be equal to constant",params:i(({schemaCode:e})=>(0,za._)`{allowedValue: ${e}}`,"params")},jp={keyword:"const",$data:!0,error:Ip,code(e){let{gen:t,data:r,$data:n,schemaCode:a,schema:c}=e;n||c&&typeof c=="object"?e.fail$data((0,za._)`!${(0,Ep.useFunc)(t,Rp.default)}(${r}, ${a})`):e.fail((0,za._)`${c} !== ${r}`)}};Va.default=jp});var ic=w(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var dr=j(),qp=N(),Op=Qr(),Ap={message:"must be equal to one of the allowed values",params:i(({schemaCode:e})=>(0,dr._)`{allowedValues: ${e}}`,"params")},Tp={keyword:"enum",schemaType:"array",$data:!0,error:Ap,code(e){let{gen:t,data:r,$data:n,schema:a,schemaCode:c,it:o}=e;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let l=a.length>=o.opts.loopEnum,d,u=i(()=>d??(d=(0,qp.useFunc)(t,Op.default)),"getEql"),f;if(l||n)f=t.let("valid"),e.block$data(f,m);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let h=t.const("vSchema",c);f=(0,dr.or)(...a.map((g,y)=>p(h,y)))}e.pass(f);function m(){t.assign(f,!1),t.forOf("v",c,h=>t.if((0,dr._)`${u()}(${r}, ${h})`,()=>t.assign(f,!0).break()))}i(m,"loopEnum");function p(h,g){let y=a[g];return typeof y=="object"&&y!==null?(0,dr._)`${u()}(${r}, ${h}[${g}])`:(0,dr._)`${r} === ${y}`}i(p,"equalCode")}};Ka.default=Tp});var cc=w(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var Np=Wi(),Hp=Xi(),Cp=Qi(),Dp=ec(),Mp=tc(),zp=rc(),Vp=nc(),Kp=sc(),Lp=oc(),Fp=ic(),Up=[Np.default,Hp.default,Cp.default,Dp.default,Mp.default,zp.default,Vp.default,Kp.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Lp.default,Fp.default];La.default=Up});var Ua=w(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.validateAdditionalItems=void 0;var ut=j(),Fa=N(),Gp={message:i(({params:{len:e}})=>(0,ut.str)`must NOT have more than ${e} items`,"message"),params:i(({params:{len:e}})=>(0,ut._)`{limit: ${e}}`,"params")},Bp={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Gp,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Fa.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}lc(e,n)}};function lc(e,t){let{gen:r,schema:n,data:a,keyword:c,it:o}=e;o.items=!0;let l=r.const("len",(0,ut._)`${a}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,ut._)`${l} <= ${t.length}`);else if(typeof n=="object"&&!(0,Fa.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,ut._)`${l} <= ${t.length}`);r.if((0,ut.not)(u),()=>d(u)),e.ok(u)}function d(u){r.forRange("i",t.length,l,f=>{e.subschema({keyword:c,dataProp:f,dataPropType:Fa.Type.Num},u),o.allErrors||r.if((0,ut.not)(u),()=>r.break())})}i(d,"validateItems")}i(lc,"validateAdditionalItems");mr.validateAdditionalItems=lc;mr.default=Bp});var Ga=w(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateTuple=void 0;var uc=j(),en=N(),Jp=we(),Wp={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return dc(e,"additionalItems",t);r.items=!0,!(0,en.alwaysValidSchema)(r,t)&&e.ok((0,Jp.validateArray)(e))}};function dc(e,t,r=e.schema){let{gen:n,parentSchema:a,data:c,keyword:o,it:l}=e;f(a),l.opts.unevaluated&&r.length&&l.items!==!0&&(l.items=en.mergeEvaluated.items(n,r.length,l.items));let d=n.name("valid"),u=n.const("len",(0,uc._)`${c}.length`);r.forEach((m,p)=>{(0,en.alwaysValidSchema)(l,m)||(n.if((0,uc._)`${u} > ${p}`,()=>e.subschema({keyword:o,schemaProp:p,dataProp:p},d)),e.ok(d))});function f(m){let{opts:p,errSchemaPath:h}=l,g=r.length,y=g===m.minItems&&(g===m.maxItems||m[t]===!1);if(p.strictTuples&&!y){let v=`"${o}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,en.checkStrictMode)(l,v,p.strictTuples)}}i(f,"checkStrictTuple")}i(dc,"validateTuple");fr.validateTuple=dc;fr.default=Wp});var mc=w(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var Xp=Ga(),Yp={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i(e=>(0,Xp.validateTuple)(e,"items"),"code")};Ba.default=Yp});var pc=w(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var fc=j(),Zp=N(),Qp=we(),eh=Ua(),th={message:i(({params:{len:e}})=>(0,fc.str)`must NOT have more than ${e} items`,"message"),params:i(({params:{len:e}})=>(0,fc._)`{limit: ${e}}`,"params")},rh={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:th,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,!(0,Zp.alwaysValidSchema)(n,t)&&(a?(0,eh.validateAdditionalItems)(e,a):e.ok((0,Qp.validateArray)(e)))}};Ja.default=rh});var hc=w(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var Se=j(),tn=N(),nh={message:i(({params:{min:e,max:t}})=>t===void 0?(0,Se.str)`must contain at least ${e} valid item(s)`:(0,Se.str)`must contain at least ${e} and no more than ${t} valid item(s)`,"message"),params:i(({params:{min:e,max:t}})=>t===void 0?(0,Se._)`{minContains: ${e}}`:(0,Se._)`{minContains: ${e}, maxContains: ${t}}`,"params")},ah={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:nh,code(e){let{gen:t,schema:r,parentSchema:n,data:a,it:c}=e,o,l,{minContains:d,maxContains:u}=n;c.opts.next?(o=d===void 0?1:d,l=u):o=1;let f=t.const("len",(0,Se._)`${a}.length`);if(e.setParams({min:o,max:l}),l===void 0&&o===0){(0,tn.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&o>l){(0,tn.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,tn.alwaysValidSchema)(c,r)){let y=(0,Se._)`${f} >= ${o}`;l!==void 0&&(y=(0,Se._)`${y} && ${f} <= ${l}`),e.pass(y);return}c.items=!0;let m=t.name("valid");l===void 0&&o===1?h(m,()=>t.if(m,()=>t.break())):o===0?(t.let(m,!0),l!==void 0&&t.if((0,Se._)`${a}.length > 0`,p)):(t.let(m,!1),p()),e.result(m,()=>e.reset());function p(){let y=t.name("_valid"),v=t.let("count",0);h(y,()=>t.if(y,()=>g(v)))}i(p,"validateItemsWithCount");function h(y,v){t.forRange("i",0,f,$=>{e.subschema({keyword:"contains",dataProp:$,dataPropType:tn.Type.Num,compositeRule:!0},y),v()})}i(h,"validateItems");function g(y){t.code((0,Se._)`${y}++`),l===void 0?t.if((0,Se._)`${y} >= ${o}`,()=>t.assign(m,!0).break()):(t.if((0,Se._)`${y} > ${l}`,()=>t.assign(m,!1).break()),o===1?t.assign(m,!0):t.if((0,Se._)`${y} >= ${o}`,()=>t.assign(m,!0)))}i(g,"checkLimits")}};Wa.default=ah});var rn=w(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.validateSchemaDeps=Ae.validatePropertyDeps=Ae.error=void 0;var Xa=j(),sh=N(),pr=we();Ae.error={message:i(({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Xa.str)`must have ${n} ${r} when property ${e} is present`},"message"),params:i(({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Xa._)`{property: ${e},
|
|
7
|
+
missingProperty: ${n},
|
|
8
|
+
depsCount: ${t},
|
|
9
|
+
deps: ${r}}`,"params")};var oh={keyword:"dependencies",type:"object",schemaType:"object",error:Ae.error,code(e){let[t,r]=ih(e);gc(e,t),yc(e,r)}};function ih({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let a=Array.isArray(e[n])?t:r;a[n]=e[n]}return[t,r]}i(ih,"splitDependencies");function gc(e,t=e.schema){let{gen:r,data:n,it:a}=e;if(Object.keys(t).length===0)return;let c=r.let("missing");for(let o in t){let l=t[o];if(l.length===0)continue;let d=(0,pr.propertyInData)(r,n,o,a.opts.ownProperties);e.setParams({property:o,depsCount:l.length,deps:l.join(", ")}),a.allErrors?r.if(d,()=>{for(let u of l)(0,pr.checkReportMissingProp)(e,u)}):(r.if((0,Xa._)`${d} && (${(0,pr.checkMissingProp)(e,l,c)})`),(0,pr.reportMissingProp)(e,c),r.else())}}i(gc,"validatePropertyDeps");Ae.validatePropertyDeps=gc;function yc(e,t=e.schema){let{gen:r,data:n,keyword:a,it:c}=e,o=r.name("valid");for(let l in t)(0,sh.alwaysValidSchema)(c,t[l])||(r.if((0,pr.propertyInData)(r,n,l,c.opts.ownProperties),()=>{let d=e.subschema({keyword:a,schemaProp:l},o);e.mergeValidEvaluated(d,o)},()=>r.var(o,!0)),e.ok(o))}i(yc,"validateSchemaDeps");Ae.validateSchemaDeps=yc;Ae.default=oh});var bc=w(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var vc=j(),ch=N(),lh={message:"property name must be valid",params:i(({params:e})=>(0,vc._)`{propertyName: ${e.propertyName}}`,"params")},uh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:lh,code(e){let{gen:t,schema:r,data:n,it:a}=e;if((0,ch.alwaysValidSchema)(a,r))return;let c=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},c),t.if((0,vc.not)(c),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(c)}};Ya.default=uh});var Qa=w(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var nn=we(),Re=j(),dh=_e(),an=N(),mh={message:"must NOT have additional properties",params:i(({params:e})=>(0,Re._)`{additionalProperty: ${e.additionalProperty}}`,"params")},fh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:mh,code(e){let{gen:t,schema:r,parentSchema:n,data:a,errsCount:c,it:o}=e;if(!c)throw new Error("ajv implementation error");let{allErrors:l,opts:d}=o;if(o.props=!0,d.removeAdditional!=="all"&&(0,an.alwaysValidSchema)(o,r))return;let u=(0,nn.allSchemaProperties)(n.properties),f=(0,nn.allSchemaProperties)(n.patternProperties);m(),e.ok((0,Re._)`${c} === ${dh.default.errors}`);function m(){t.forIn("key",a,v=>{!u.length&&!f.length?g(v):t.if(p(v),()=>g(v))})}i(m,"checkAdditionalProperties");function p(v){let $;if(u.length>8){let I=(0,an.schemaRefOrVal)(o,n.properties,"properties");$=(0,nn.isOwnProperty)(t,I,v)}else u.length?$=(0,Re.or)(...u.map(I=>(0,Re._)`${v} === ${I}`)):$=Re.nil;return f.length&&($=(0,Re.or)($,...f.map(I=>(0,Re._)`${(0,nn.usePattern)(e,I)}.test(${v})`))),(0,Re.not)($)}i(p,"isAdditional");function h(v){t.code((0,Re._)`delete ${a}[${v}]`)}i(h,"deleteAdditional");function g(v){if(d.removeAdditional==="all"||d.removeAdditional&&r===!1){h(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),l||t.break();return}if(typeof r=="object"&&!(0,an.alwaysValidSchema)(o,r)){let $=t.name("valid");d.removeAdditional==="failing"?(y(v,$,!1),t.if((0,Re.not)($),()=>{e.reset(),h(v)})):(y(v,$),l||t.if((0,Re.not)($),()=>t.break()))}}i(g,"additionalPropertyCode");function y(v,$,I){let E={keyword:"additionalProperties",dataProp:v,dataPropType:an.Type.Str};I===!1&&Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(E,$)}i(y,"applyAdditionalSchema")}};Za.default=fh});var $c=w(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var ph=Qt(),_c=we(),es=N(),wc=Qa(),hh={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:a,it:c}=e;c.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&wc.default.code(new ph.KeywordCxt(c,wc.default,"additionalProperties"));let o=(0,_c.allSchemaProperties)(r);for(let m of o)c.definedProperties.add(m);c.opts.unevaluated&&o.length&&c.props!==!0&&(c.props=es.mergeEvaluated.props(t,(0,es.toHash)(o),c.props));let l=o.filter(m=>!(0,es.alwaysValidSchema)(c,r[m]));if(l.length===0)return;let d=t.name("valid");for(let m of l)u(m)?f(m):(t.if((0,_c.propertyInData)(t,a,m,c.opts.ownProperties)),f(m),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(m),e.ok(d);function u(m){return c.opts.useDefaults&&!c.compositeRule&&r[m].default!==void 0}i(u,"hasDefault");function f(m){e.subschema({keyword:"properties",schemaProp:m,dataProp:m},d)}i(f,"applyPropertySchema")}};ts.default=hh});var xc=w(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var Sc=we(),sn=j(),kc=N(),Pc=N(),gh={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:a,it:c}=e,{opts:o}=c,l=(0,Sc.allSchemaProperties)(r),d=l.filter(y=>(0,kc.alwaysValidSchema)(c,r[y]));if(l.length===0||d.length===l.length&&(!c.opts.unevaluated||c.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&a.properties,f=t.name("valid");c.props!==!0&&!(c.props instanceof sn.Name)&&(c.props=(0,Pc.evaluatedPropsToName)(t,c.props));let{props:m}=c;p();function p(){for(let y of l)u&&h(y),c.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}i(p,"validatePatternProperties");function h(y){for(let v in u)new RegExp(y).test(v)&&(0,kc.checkStrictMode)(c,`property ${v} matches pattern ${y} (use allowMatchingProperties)`)}i(h,"checkMatchingProperties");function g(y){t.forIn("key",n,v=>{t.if((0,sn._)`${(0,Sc.usePattern)(e,y)}.test(${v})`,()=>{let $=d.includes(y);$||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:v,dataPropType:Pc.Type.Str},f),c.opts.unevaluated&&m!==!0?t.assign((0,sn._)`${m}[${v}]`,!0):!$&&!c.allErrors&&t.if((0,sn.not)(f),()=>t.break())})})}i(g,"validateProperties")}};rs.default=gh});var Ec=w(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var yh=N(),vh={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,yh.alwaysValidSchema)(n,r)){e.fail();return}let a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ns.default=vh});var Rc=w(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var bh=we(),_h={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bh.validateUnion,error:{message:"must match a schema in anyOf"}};as.default=_h});var Ic=w(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});var on=j(),wh=N(),$h={message:"must match exactly one schema in oneOf",params:i(({params:e})=>(0,on._)`{passingSchemas: ${e.passing}}`,"params")},Sh={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$h,code(e){let{gen:t,schema:r,parentSchema:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let c=r,o=t.let("valid",!1),l=t.let("passing",null),d=t.name("_valid");e.setParams({passing:l}),t.block(u),e.result(o,()=>e.reset(),()=>e.error(!0));function u(){c.forEach((f,m)=>{let p;(0,wh.alwaysValidSchema)(a,f)?t.var(d,!0):p=e.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},d),m>0&&t.if((0,on._)`${d} && ${o}`).assign(o,!1).assign(l,(0,on._)`[${l}, ${m}]`).else(),t.if(d,()=>{t.assign(o,!0),t.assign(l,m),p&&e.mergeEvaluated(p,on.Name)})})}i(u,"validateOneOf")}};ss.default=Sh});var jc=w(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var kh=N(),Ph={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let a=t.name("valid");r.forEach((c,o)=>{if((0,kh.alwaysValidSchema)(n,c))return;let l=e.subschema({keyword:"allOf",schemaProp:o},a);e.ok(a),e.mergeEvaluated(l)})}};os.default=Ph});var Ac=w(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var cn=j(),Oc=N(),xh={message:i(({params:e})=>(0,cn.str)`must match "${e.ifClause}" schema`,"message"),params:i(({params:e})=>(0,cn._)`{failingKeyword: ${e.ifClause}}`,"params")},Eh={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:xh,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Oc.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=qc(n,"then"),c=qc(n,"else");if(!a&&!c)return;let o=t.let("valid",!0),l=t.name("_valid");if(d(),e.reset(),a&&c){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(l,u("then",f),u("else",f))}else a?t.if(l,u("then")):t.if((0,cn.not)(l),u("else"));e.pass(o,()=>e.error(!0));function d(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(f)}i(d,"validateIf");function u(f,m){return()=>{let p=e.subschema({keyword:f},l);t.assign(o,l),e.mergeValidEvaluated(p,o),m?t.assign(m,(0,cn._)`${f}`):e.setParams({ifClause:f})}}i(u,"validateClause")}};function qc(e,t){let r=e.schema[t];return r!==void 0&&!(0,Oc.alwaysValidSchema)(e,r)}i(qc,"hasSchema");is.default=Eh});var Tc=w(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var Rh=N(),Ih={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Rh.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};cs.default=Ih});var Nc=w(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var jh=Ua(),qh=mc(),Oh=Ga(),Ah=pc(),Th=hc(),Nh=rn(),Hh=bc(),Ch=Qa(),Dh=$c(),Mh=xc(),zh=Ec(),Vh=Rc(),Kh=Ic(),Lh=jc(),Fh=Ac(),Uh=Tc();function Gh(e=!1){let t=[zh.default,Vh.default,Kh.default,Lh.default,Fh.default,Uh.default,Hh.default,Ch.default,Nh.default,Dh.default,Mh.default];return e?t.push(qh.default,Ah.default):t.push(jh.default,Oh.default),t.push(Th.default),t}i(Gh,"getApplicator");ls.default=Gh});var ds=w(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.dynamicAnchor=void 0;var us=j(),Bh=_e(),Hc=tr(),Jh=Xr(),Wh={keyword:"$dynamicAnchor",schemaType:"string",code:i(e=>Cc(e,e.schema),"code")};function Cc(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let a=(0,us._)`${Bh.default.dynamicAnchors}${(0,us.getProperty)(t)}`,c=n.errSchemaPath==="#"?n.validateName:Xh(e);r.if((0,us._)`!${a}`,()=>r.assign(a,c))}i(Cc,"dynamicAnchor");hr.dynamicAnchor=Cc;function Xh(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:c,localRefs:o,meta:l}=t.root,{schemaId:d}=n.opts,u=new Hc.SchemaEnv({schema:r,schemaId:d,root:a,baseId:c,localRefs:o,meta:l});return Hc.compileSchema.call(n,u),(0,Jh.getValidate)(e,u)}i(Xh,"_getValidate");hr.default=Wh});var ms=w(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.dynamicRef=void 0;var Dc=j(),Yh=_e(),Mc=Xr(),Zh={keyword:"$dynamicRef",schemaType:"string",code:i(e=>zc(e,e.schema),"code")};function zc(e,t){let{gen:r,keyword:n,it:a}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let c=t.slice(1);if(a.allErrors)o();else{let d=r.let("valid",!1);o(d),e.ok(d)}function o(d){if(a.schemaEnv.root.dynamicAnchors[c]){let u=r.let("_v",(0,Dc._)`${Yh.default.dynamicAnchors}${(0,Dc.getProperty)(c)}`);r.if(u,l(u,d),l(a.validateName,d))}else l(a.validateName,d)()}i(o,"_dynamicRef");function l(d,u){return u?()=>r.block(()=>{(0,Mc.callRef)(e,d),r.let(u,!0)}):()=>(0,Mc.callRef)(e,d)}i(l,"_callRef")}i(zc,"dynamicRef");gr.dynamicRef=zc;gr.default=Zh});var Vc=w(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var Qh=ds(),eg=N(),tg={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,Qh.dynamicAnchor)(e,""):(0,eg.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};fs.default=tg});var Kc=w(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var rg=ms(),ng={keyword:"$recursiveRef",schemaType:"string",code:i(e=>(0,rg.dynamicRef)(e,e.schema),"code")};ps.default=ng});var Lc=w(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var ag=ds(),sg=ms(),og=Vc(),ig=Kc(),cg=[ag.default,sg.default,og.default,ig.default];hs.default=cg});var Uc=w(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Fc=rn(),lg={keyword:"dependentRequired",type:"object",schemaType:"object",error:Fc.error,code:i(e=>(0,Fc.validatePropertyDeps)(e),"code")};gs.default=lg});var Gc=w(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var ug=rn(),dg={keyword:"dependentSchemas",type:"object",schemaType:"object",code:i(e=>(0,ug.validateSchemaDeps)(e),"code")};ys.default=dg});var Bc=w(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var mg=N(),fg={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,mg.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};vs.default=fg});var Jc=w(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var pg=Uc(),hg=Gc(),gg=Bc(),yg=[pg.default,hg.default,gg.default];bs.default=yg});var Xc=w(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});var Xe=j(),Wc=N(),vg=_e(),bg={message:"must NOT have unevaluated properties",params:i(({params:e})=>(0,Xe._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`,"params")},_g={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:bg,code(e){let{gen:t,schema:r,data:n,errsCount:a,it:c}=e;if(!a)throw new Error("ajv implementation error");let{allErrors:o,props:l}=c;l instanceof Xe.Name?t.if((0,Xe._)`${l} !== true`,()=>t.forIn("key",n,m=>t.if(u(l,m),()=>d(m)))):l!==!0&&t.forIn("key",n,m=>l===void 0?d(m):t.if(f(l,m),()=>d(m))),c.props=!0,e.ok((0,Xe._)`${a} === ${vg.default.errors}`);function d(m){if(r===!1){e.setParams({unevaluatedProperty:m}),e.error(),o||t.break();return}if(!(0,Wc.alwaysValidSchema)(c,r)){let p=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:Wc.Type.Str},p),o||t.if((0,Xe.not)(p),()=>t.break())}}i(d,"unevaluatedPropCode");function u(m,p){return(0,Xe._)`!${m} || !${m}[${p}]`}i(u,"unevaluatedDynamic");function f(m,p){let h=[];for(let g in m)m[g]===!0&&h.push((0,Xe._)`${p} !== ${g}`);return(0,Xe.and)(...h)}i(f,"unevaluatedStatic")}};_s.default=_g});var Zc=w(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var dt=j(),Yc=N(),wg={message:i(({params:{len:e}})=>(0,dt.str)`must NOT have more than ${e} items`,"message"),params:i(({params:{len:e}})=>(0,dt._)`{limit: ${e}}`,"params")},$g={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:wg,code(e){let{gen:t,schema:r,data:n,it:a}=e,c=a.items||0;if(c===!0)return;let o=t.const("len",(0,dt._)`${n}.length`);if(r===!1)e.setParams({len:c}),e.fail((0,dt._)`${o} > ${c}`);else if(typeof r=="object"&&!(0,Yc.alwaysValidSchema)(a,r)){let d=t.var("valid",(0,dt._)`${o} <= ${c}`);t.if((0,dt.not)(d),()=>l(d,c)),e.ok(d)}a.items=!0;function l(d,u){t.forRange("i",u,o,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:Yc.Type.Num},d),a.allErrors||t.if((0,dt.not)(d),()=>t.break())})}i(l,"validateItems")}};ws.default=$g});var Qc=w($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Sg=Xc(),kg=Zc(),Pg=[Sg.default,kg.default];$s.default=Pg});var el=w(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var J=j(),xg={message:i(({schemaCode:e})=>(0,J.str)`must match format "${e}"`,"message"),params:i(({schemaCode:e})=>(0,J._)`{format: ${e}}`,"params")},Eg={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:xg,code(e,t){let{gen:r,data:n,$data:a,schema:c,schemaCode:o,it:l}=e,{opts:d,errSchemaPath:u,schemaEnv:f,self:m}=l;if(!d.validateFormats)return;a?p():h();function p(){let g=r.scopeValue("formats",{ref:m.formats,code:d.code.formats}),y=r.const("fDef",(0,J._)`${g}[${o}]`),v=r.let("fType"),$=r.let("format");r.if((0,J._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(v,(0,J._)`${y}.type || "string"`).assign($,(0,J._)`${y}.validate`),()=>r.assign(v,(0,J._)`"string"`).assign($,y)),e.fail$data((0,J.or)(I(),E()));function I(){return d.strictSchema===!1?J.nil:(0,J._)`${o} && !${$}`}i(I,"unknownFmt");function E(){let O=f.$async?(0,J._)`(${y}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,J._)`${$}(${n})`,x=(0,J._)`(typeof ${$} == "function" ? ${O} : ${$}.test(${n}))`;return(0,J._)`${$} && ${$} !== true && ${v} === ${t} && !${x}`}i(E,"invalidFmt")}i(p,"validate$DataFormat");function h(){let g=m.formats[c];if(!g){I();return}if(g===!0)return;let[y,v,$]=E(g);y===t&&e.pass(O());function I(){if(d.strictSchema===!1){m.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${c}" ignored in schema at path "${u}"`}}i(I,"unknownFormat");function E(x){let W=x instanceof RegExp?(0,J.regexpCode)(x):d.code.formats?(0,J._)`${d.code.formats}${(0,J.getProperty)(c)}`:void 0,ie=r.scopeValue("formats",{key:c,ref:x,code:W});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,J._)`${ie}.validate`]:["string",x,ie]}i(E,"getFormat");function O(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,J._)`await ${$}(${n})`}return typeof v=="function"?(0,J._)`${$}(${n})`:(0,J._)`${$}.test(${n})`}i(O,"validCondition")}i(h,"validateFormat")}};Ss.default=Eg});var tl=w(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var Rg=el(),Ig=[Rg.default];ks.default=Ig});var rl=w(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.contentVocabulary=Rt.metadataVocabulary=void 0;Rt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Rt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var al=w(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var jg=Ji(),qg=cc(),Og=Nc(),Ag=Lc(),Tg=Jc(),Ng=Qc(),Hg=tl(),nl=rl(),Cg=[Ag.default,jg.default,qg.default,(0,Og.default)(!0),Hg.default,nl.metadataVocabulary,nl.contentVocabulary,Tg.default,Ng.default];Ps.default=Cg});var ol=w(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.DiscrError=void 0;var sl;(function(e){e.Tag="tag",e.Mapping="mapping"})(sl||(ln.DiscrError=sl={}))});var cl=w(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var It=j(),xs=ol(),il=tr(),Dg=er(),Mg=N(),zg={message:i(({params:{discrError:e,tagName:t}})=>e===xs.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,"message"),params:i(({params:{discrError:e,tag:t,tagName:r}})=>(0,It._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`,"params")},Vg={keyword:"discriminator",type:"object",schemaType:"object",error:zg,code(e){let{gen:t,data:r,schema:n,parentSchema:a,it:c}=e,{oneOf:o}=a;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");let l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let d=t.let("valid",!1),u=t.const("tag",(0,It._)`${r}${(0,It.getProperty)(l)}`);t.if((0,It._)`typeof ${u} == "string"`,()=>f(),()=>e.error(!1,{discrError:xs.DiscrError.Tag,tag:u,tagName:l})),e.ok(d);function f(){let h=p();t.if(!1);for(let g in h)t.elseIf((0,It._)`${u} === ${g}`),t.assign(d,m(h[g]));t.else(),e.error(!1,{discrError:xs.DiscrError.Mapping,tag:u,tagName:l}),t.endIf()}i(f,"validateMapping");function m(h){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:h},g);return e.mergeEvaluated(y,It.Name),g}i(m,"applyTagSchema");function p(){var h;let g={},y=$(a),v=!0;for(let O=0;O<o.length;O++){let x=o[O];if(x?.$ref&&!(0,Mg.schemaHasRulesButRef)(x,c.self.RULES)){let ie=x.$ref;if(x=il.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,ie),x instanceof il.SchemaEnv&&(x=x.schema),x===void 0)throw new Dg.default(c.opts.uriResolver,c.baseId,ie)}let W=(h=x?.properties)===null||h===void 0?void 0:h[l];if(typeof W!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);v=v&&(y||$(x)),I(W,O)}if(!v)throw new Error(`discriminator: "${l}" must be required`);return g;function $({required:O}){return Array.isArray(O)&&O.includes(l)}function I(O,x){if(O.const)E(O.const,x);else if(O.enum)for(let W of O.enum)E(W,x);else throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}function E(O,x){if(typeof O!="string"||O in g)throw new Error(`discriminator: "${l}" values must be unique strings`);g[O]=x}}i(p,"getMapping")}};Es.default=Vg});var ll=w((f_,Kg)=>{Kg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var ul=w((p_,Lg)=>{Lg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var dl=w((h_,Fg)=>{Fg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var ml=w((g_,Ug)=>{Ug.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var fl=w((y_,Gg)=>{Gg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var pl=w((v_,Bg)=>{Bg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var hl=w((b_,Jg)=>{Jg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var gl=w((__,Wg)=>{Wg.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var yl=w(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var Xg=ll(),Yg=ul(),Zg=dl(),Qg=ml(),ey=fl(),ty=pl(),ry=hl(),ny=gl(),ay=["/properties"];function sy(e){return[Xg,Yg,Zg,Qg,ey,t(this,ty),ry,t(this,ny)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,ay):n}i(t,"with$data")}i(sy,"addMetaSchema2020");Rs.default=sy});var vl=w((B,js)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.MissingRefError=B.ValidationError=B.CodeGen=B.Name=B.nil=B.stringify=B.str=B._=B.KeywordCxt=B.Ajv2020=void 0;var oy=Li(),iy=al(),cy=cl(),ly=yl(),Is="https://json-schema.org/draft/2020-12/schema",jt=class extends oy.default{static{i(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),iy.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(cy.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(ly.default.call(this,t),this.refs["http://json-schema.org/schema"]=Is)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Is)?Is:void 0)}};B.Ajv2020=jt;js.exports=B=jt;js.exports.Ajv2020=jt;Object.defineProperty(B,"__esModule",{value:!0});B.default=jt;var uy=Qt();Object.defineProperty(B,"KeywordCxt",{enumerable:!0,get:i(function(){return uy.KeywordCxt},"get")});var qt=j();Object.defineProperty(B,"_",{enumerable:!0,get:i(function(){return qt._},"get")});Object.defineProperty(B,"str",{enumerable:!0,get:i(function(){return qt.str},"get")});Object.defineProperty(B,"stringify",{enumerable:!0,get:i(function(){return qt.stringify},"get")});Object.defineProperty(B,"nil",{enumerable:!0,get:i(function(){return qt.nil},"get")});Object.defineProperty(B,"Name",{enumerable:!0,get:i(function(){return qt.Name},"get")});Object.defineProperty(B,"CodeGen",{enumerable:!0,get:i(function(){return qt.CodeGen},"get")});var dy=Kr();Object.defineProperty(B,"ValidationError",{enumerable:!0,get:i(function(){return dy.default},"get")});var my=er();Object.defineProperty(B,"MissingRefError",{enumerable:!0,get:i(function(){return my.default},"get")})});var ro=s.string().regex(/^[a-z][a-z0-9_-]{0,119}$/),no=s.string().min(1).max(2e3).refine(e=>!e.includes("\\")&&!e.includes(":")&&!e.startsWith("/")&&e.split("/").every(t=>t!==""&&t!=="."&&t!==".."),"workflow references require portable relative paths"),lu=s.object({id:ro,label:s.string().trim().min(1).max(240),description:s.string().max(4e3),inputSchema:s.record(s.string(),s.unknown()),invocation:s.discriminatedUnion("kind",[s.object({kind:s.literal("instructions"),instructions:s.string().min(1).max(1e5).refine(e=>!!e.trim())}).strict(),s.object({kind:s.literal("agent_action"),actionId:s.string().trim().min(1).max(240)}).strict()]),skillPaths:s.array(no).max(100)}).strict(),uu=s.object({schemaVersion:s.literal("openpond.profileWorkflows.v1"),workflows:s.array(lu).max(1e3)}).strict(),du=s.object({id:s.string().trim().min(1).max(240),agentId:s.string().regex(/^[a-zA-Z0-9_-]{1,240}$/),sourceActionId:s.string().trim().min(1).max(240),inputSchema:s.record(s.string(),s.unknown())}).strict(),mu=s.object({schemaVersion:s.literal("openpond.profileWorkflowActions.v1"),actions:s.array(du).max(200)}).strict();function fu(e){let t=uu.parse(e.catalog),r=new Set;for(let n of t.workflows){if(r.has(n.id))throw new Error(`Duplicate Profile workflow id ${n.id}.`);r.add(n.id);for(let a of n.skillPaths)if(!e.sourcePaths.has(a))throw new Error(`Profile workflow ${n.id} references missing Skill ${a}.`);if(n.invocation.kind==="agent_action"&&!e.actionIds.has(n.invocation.actionId))throw new Error(`Profile workflow ${n.id} references missing action ${n.invocation.actionId}.`)}return t}i(fu,"validateProfileWorkflowCatalog");var pu=s.object({schemaVersion:s.literal("openpond.profileWorkflowBinding.v1"),profileId:s.string().trim().min(1).max(240),sourceRevision:s.string().trim().min(1).max(240),harnessRelease:D,catalogHash:b,workflowId:ro}).strict(),bv=s.object({schemaVersion:s.literal("openpond.profileComponentBinding.v1"),profileId:s.string().trim().min(1).max(240),sourceRevision:s.string().trim().min(1).max(240),harnessRelease:D,target:s.discriminatedUnion("kind",[s.object({kind:s.literal("profile")}).strict(),s.object({kind:s.literal("skill"),skillPath:no}).strict(),s.object({kind:s.literal("agent_action"),actionId:s.string().trim().min(1).max(240)}).strict()])}).strict();function ao(e){let t=e.harnessRelease.files.find(o=>o.path==="workflows/catalog.json"),r=e.harnessRelease.files.find(o=>o.path==="workflows/actions.json");if(!t||t.visibility!=="policy"||!e.catalogBytes||Ct(e.catalogBytes)!==t.contentHash)throw new Error("Released Profile workflow catalog is unavailable or invalid.");if(!r||r.visibility!=="policy"||!e.actionBytes||Ct(e.actionBytes)!==r.contentHash)throw new Error("Released Profile workflow actions are unavailable or invalid.");let n=mu.parse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(e.actionBytes))).actions,a=new Set;for(let o of n){if(a.has(o.id))throw new Error(`Duplicate released Profile action ${o.id}.`);if(a.add(o.id),!e.harnessRelease.files.some(l=>l.path.startsWith(`agents/${o.agentId}/`)))throw new Error(`Released Profile action ${o.id} lacks its Agent source.`)}let c=fu({catalog:JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(e.catalogBytes)),sourcePaths:new Set(e.agentSnapshot.skills.map(o=>o.path)),actionIds:a});return{catalog:c,catalogHash:S(c),actions:n}}i(ao,"loadReleasedProfileWorkflowCatalogAssets");function _v(e){let t=pu.parse(e.binding);if(t.harnessRelease.id!==e.harnessRelease.id||t.harnessRelease.contentHash!==e.harnessRelease.contentHash)throw new Error("Profile workflow binding differs from the released source package.");if(t.catalogHash!==e.catalogHash)throw new Error("Profile workflow catalog differs from its binding.");let r=e.harnessRelease.metadata.profile;if(!r||typeof r!="object")throw new Error("Released source lacks Profile provenance.");let n=r;if(n.id!==t.profileId||n.sourceRevision!==t.sourceRevision)throw new Error("Profile workflow binding differs from released Profile provenance.");let a=e.catalog.workflows.find(c=>c.id===t.workflowId);if(!a)throw new Error(`Profile workflow ${t.workflowId} is absent from its bound catalog.`);return a}i(_v,"resolveReleasedProfileWorkflowCatalogBinding");var so=s.object({candidateId:s.string().min(1).max(240),frozenRevision:s.number().int().positive(),frozenHash:s.string().regex(/^[a-f0-9]{64}$/),harnessRelease:D,protectedClosureHash:s.string().regex(/^[a-f0-9]{64}$/)}).strict();var oo=s.string().trim().min(1).max(240),hu=s.string().trim().min(1).max(1e3).refine(e=>!/[\\:\0]/.test(e)&&e.split("/").every(t=>t&&t!=="."&&t!==".."&&!t.startsWith(".env")),"Metric modules must use a safe relative path."),xn=s.object({schemaVersion:s.literal("openpond.tasksetMetricPolicy.v1"),primaryMetric:oo,aggregation:s.enum(["mean_score","pass_rate","weighted_mean","custom"]),missingReward:s.enum(["zero","exclude"]),taskWeights:s.record(oo,s.number().positive().max(1e6)).optional(),customAggregator:s.object({module:hu,exportName:s.string().trim().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/),contentHash:b,timeoutMs:s.number().int().positive().max(3e5),networkPolicy:s.literal("none")}).strict().nullable()}).strict().superRefine((e,t)=>{e.aggregation==="custom"!=(e.customAggregator!==null)&&t.addIssue({code:"custom",path:["customAggregator"],message:"Only custom aggregation requires a content-hashed module."}),(e.aggregation==="weighted_mean"?!e.taskWeights||!Object.keys(e.taskWeights).length:e.taskWeights!==void 0)&&t.addIssue({code:"custom",path:["taskWeights"],message:"Only weighted means require explicit positive task weights."})}),gu=s.object({schemaVersion:s.literal("openpond.tasksetMetricResult.v1"),runManifest:D,tasksetRelease:D,policy:xn,policyHash:b,receiptRefs:s.array(D).min(1).max(1e6),includedCount:s.number().int().nonnegative(),missingRewardCount:s.number().int().nonnegative(),excludedCount:s.number().int().nonnegative(),value:s.number().min(0).max(1).nullable()}).strict(),yu=gu.extend({contentHash:b}).strict();function Rv(e){let t=yu.parse(e);if(ht(t,"Taskset metric result"),t.policyHash!==S(t.policy))throw new Error("Taskset metric policy hash differs from its policy.");if(t.includedCount+t.excludedCount!==t.receiptRefs.length||t.includedCount===0!=(t.value===null)||t.missingRewardCount>(t.policy.missingReward==="zero"?t.includedCount:t.excludedCount)||new Set(t.receiptRefs.map(r=>r.id)).size!==t.receiptRefs.length)throw new Error("Taskset metric population differs from its receipt references.")}i(Rv,"assertTasksetMetricResult");var U=k,Ke=b,io=s.object({id:U,revision:s.number().int().positive(),contentHash:Ke}).strict(),Ir=s.object({kind:s.literal("owner_attested_local"),ownerActorId:U,teamId:U,executionHash:Ke,configurationHash:Ke,retainedAttemptHash:Ke,traceHash:Ke,publicationCutoffHash:Ke}).strict(),co=Ir.omit({publicationCutoffHash:!0,kind:!0}).extend({kind:s.literal("native_local")}).strict(),vu=s.object({origin:Ir,executionId:U,receiptId:U,taskId:U,targetId:U,familyKey:U,split:s.enum(["train","validation","test","frozen_eval"]),input:s.record(s.string(),s.unknown()),policyVisibleContext:s.record(s.string(),s.unknown()),output:s.string().nullable(),error:s.string().nullable(),events:s.array(s.record(s.string(),s.unknown())).max(1e3),coverage:s.object({sourceEventCount:s.number().int().nonnegative().max(2e4),publishedEventCount:s.number().int().nonnegative().max(1e3),traceLimited:s.boolean(),artifactsIncluded:s.literal(!1)}).strict()}).strict().superRefine((e,t)=>{(e.events.length!==e.coverage.publishedEventCount||e.coverage.sourceEventCount<e.events.length||e.coverage.traceLimited!==e.coverage.sourceEventCount>e.events.length)&&t.addIssue({code:"custom",message:"Publication coverage must describe its actual retained event population."}),S(e.events)!==e.origin.publicationCutoffHash&&t.addIssue({code:"custom",message:"Published trace cutoff changed."})}),bu=s.object({schemaVersion:s.literal("openpond.humanLocalEvidenceExport.v1"),actorId:U,scope:U,projectId:U,dataset:io,graderId:U,compiledGraderHash:Ke,attempts:s.array(vu).min(1).max(2),sealedAt:X}).strict().superRefine((e,t)=>{e.attempts.some(r=>r.origin.ownerActorId!==e.actorId||r.origin.teamId!==e.scope)&&t.addIssue({code:"custom",message:"Local publication belongs to another actor/workspace."})}),_u=bu.safeExtend({contentHash:Ke}).strict().superRefine((e,t)=>{let{contentHash:r,...n}=e;S(n)!==r&&t.addIssue({code:"custom",message:"Local evidence export bytes changed."})}),En=s.object({endpoint:s.literal("export_local"),scope:U,projectId:U,graderId:U,selections:s.array(s.object({executionId:U,receiptId:U}).strict()).min(1).max(2)}).strict(),lo=s.object({endpoint:s.literal("publish_local"),scope:U,projectId:U,operationId:U,audience:s.array(U).max(100),workspaceVisible:s.boolean(),evidence:_u}).strict(),uo=En.omit({endpoint:!0}).extend({endpoint:s.literal("share_local"),operationId:U,audience:s.array(U).max(100),workspaceVisible:s.boolean()}).strict(),mo=s.object({endpoint:s.literal("local_publications"),scope:U,executionId:U}).strict(),fo=s.object({endpoint:s.literal("revoke_local"),scope:U,publication:io}).strict();var ho=i((e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},"E"),wu=ho((e,t)=>{"use strict";t.exports=i(function r(n,a){if(n===a)return!0;if(n&&a&&typeof n=="object"&&typeof a=="object"){if(n.constructor!==a.constructor)return!1;var c,o,l;if(Array.isArray(n)){if(c=n.length,c!=a.length)return!1;for(o=c;o--!==0;)if(!r(n[o],a[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===a.source&&n.flags===a.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===a.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===a.toString();if(l=Object.keys(n),c=l.length,c!==Object.keys(a).length)return!1;for(o=c;o--!==0;)if(!Object.prototype.hasOwnProperty.call(a,l[o]))return!1;for(o=c;o--!==0;){var d=l[o];if(!r(n[d],a[d]))return!1}return!0}return n!==n&&a!==a},"e")}),$u=ho(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=wu();t.code='require("ajv/dist/runtime/equal").default',e.default=t});var Rn=V,po={$defs:{schemaMap:{type:"object",additionalProperties:{$ref:"#"}},schemaArray:{type:"array",items:{$ref:"#"},minItems:1,maxItems:32},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0},natural:{type:"integer",minimum:0},schemaType:{enum:["array","boolean","integer","null","number","object","string"]}},type:["object","boolean"],additionalProperties:!1,properties:{$schema:{const:"https://json-schema.org/draft/2020-12/schema"},$ref:{type:"string"},$comment:{type:"string"},$defs:{$ref:"#/$defs/schemaMap"},properties:{$ref:"#/$defs/schemaMap"},dependentSchemas:{$ref:"#/$defs/schemaMap"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},additionalProperties:{$ref:"#"},not:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},contains:{$ref:"#"},unevaluatedProperties:{$ref:"#"},unevaluatedItems:{$ref:"#"},propertyNames:{$ref:"#"},type:{anyOf:[{$ref:"#/$defs/schemaType"},{type:"array",items:{$ref:"#/$defs/schemaType"},minItems:1,uniqueItems:!0}]},enum:{type:"array",minItems:1},const:!0,default:!0,title:{type:"string"},description:{type:"string"},examples:{type:"array"},readOnly:{type:"boolean"},writeOnly:{type:"boolean"},deprecated:{type:"boolean"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/natural"},minLength:{$ref:"#/$defs/natural"},maxItems:{$ref:"#/$defs/natural"},minItems:{$ref:"#/$defs/natural"},maxContains:{$ref:"#/$defs/natural"},minContains:{$ref:"#/$defs/natural"},maxProperties:{$ref:"#/$defs/natural"},minProperties:{$ref:"#/$defs/natural"},uniqueItems:{type:"boolean"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},contentEncoding:{type:"string"},contentMediaType:{type:"string"}}},Su=Object.prototype.hasOwnProperty,ku=$u().default,H={validate:V};function pe(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:a=e,dynamicAnchors:c={}}={}){let o=null,l=0,d=pe.evaluated;if(d.dynamicProps&&(d.props=void 0),d.dynamicItems&&(d.items=void 0),l===0)if(e&&typeof e=="object"&&!Array.isArray(e))for(let f in e){let m=l;H.validate(e[f],{instancePath:t+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:f,rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=m===l;if(!u)break}else return pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"}}],!1;return pe.errors=o,l===0}i(pe,"h");pe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Z(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:a=e,dynamicAnchors:c={}}={}){let o=null,l=0,d=Z.evaluated;if(d.dynamicProps&&(d.props=void 0),d.dynamicItems&&(d.items=void 0),l===0)if(Array.isArray(e)){if(e.length>32)return Z.errors=[{instancePath:t,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit:32}}],!1;if(e.length<1)return Z.errors=[{instancePath:t,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1}}],!1;{var u=!0;let f=e.length;for(let m=0;m<f;m++){let p=l;H.validate(e[m],{instancePath:t+"/"+m,parentData:e,parentDataProperty:m,rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=p===l;if(!u)break}}}else return Z.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"}}],!1;return Z.errors=o,l===0}i(Z,"v");Z.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};var Pu={enum:["array","boolean","integer","null","number","object","string"]};function je(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:a=e,dynamicAnchors:c={}}={}){let o=null,l=0,d=je.evaluated;return d.dynamicProps&&(d.props=void 0),d.dynamicItems&&(d.items=void 0),e==="array"||e==="boolean"||e==="integer"||e==="null"||e==="number"||e==="object"||e==="string"?(je.errors=o,l===0):(je.errors=[{instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:Pu.enum}}],!1)}i(je,"I");je.evaluated={dynamicProps:!1,dynamicItems:!1};function K(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:a=e,dynamicAnchors:c={}}={}){let o=null,l=0,d=K.evaluated;return d.dynamicProps&&(d.props=void 0),d.dynamicItems&&(d.items=void 0),typeof e=="number"&&!(e%1)&&!isNaN(e)&&isFinite(e)?l===0&&typeof e=="number"&&isFinite(e)&&(e<0||isNaN(e))?(K.errors=[{instancePath:t,schemaPath:"#/minimum",keyword:"minimum",params:{comparison:">=",limit:0}}],!1):(K.errors=o,l===0):(K.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"integer"}}],!1)}i(K,"u");K.evaluated={dynamicProps:!1,dynamicItems:!1};function ye(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:a=e,dynamicAnchors:c={}}={}){let o=null,l=0,d=ye.evaluated;if(d.dynamicProps&&(d.props=void 0),d.dynamicItems&&(d.items=void 0),l===0)if(Array.isArray(e)){var u=!0;let f=e.length;for(let m=0;m<f;m++){let p=l;if(typeof e[m]!="string")return ye.errors=[{instancePath:t+"/"+m,schemaPath:"#/items/type",keyword:"type",params:{type:"string"}}],!1;var u=p===l;if(!u)break}if(u){let m=e.length,p;if(m>1){let h={};for(;m--;){let g=e[m];if(typeof g=="string"){if(typeof h[g]=="number")return p=h[g],ye.errors=[{instancePath:t,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i:m,j:p}}],!1;h[g]=m}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"}}],!1;return ye.errors=o,l===0}i(ye,"P");ye.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function V(e,{instancePath:t="",parentData:r,parentDataProperty:n,rootData:a=e,dynamicAnchors:c={}}={}){let o=null,l=0,d=V.evaluated;if(d.dynamicProps&&(d.props=void 0),d.dynamicItems&&(d.items=void 0),!(e&&typeof e=="object"&&!Array.isArray(e))&&typeof e!="boolean")return V.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:po.type}}],!1;if(l===0&&e&&typeof e=="object"&&!Array.isArray(e)){let h=l;for(let g in e)if(!Su.call(po.properties,g))return V.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g}}],!1;if(h===l){if(e.$schema!==void 0){let g=l;if(e.$schema!=="https://json-schema.org/draft/2020-12/schema")return V.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/const",keyword:"const",params:{allowedValue:"https://json-schema.org/draft/2020-12/schema"}}],!1;var u=g===l}else var u=!0;if(u){if(e.$ref!==void 0){let y=l;if(typeof e.$ref!="string")return V.errors=[{instancePath:t+"/$ref",schemaPath:"#/properties/%24ref/type",keyword:"type",params:{type:"string"}}],!1;var u=y===l}else var u=!0;if(u){if(e.$comment!==void 0){let v=l;if(typeof e.$comment!="string")return V.errors=[{instancePath:t+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"}}],!1;var u=v===l}else var u=!0;if(u){if(e.$defs!==void 0){let $=l;pe(e.$defs,{instancePath:t+"/$defs",parentData:e,parentDataProperty:"$defs",rootData:a,dynamicAnchors:c})||(o=o===null?pe.errors:o.concat(pe.errors),l=o.length);var u=$===l}else var u=!0;if(u){if(e.properties!==void 0){let I=l;pe(e.properties,{instancePath:t+"/properties",parentData:e,parentDataProperty:"properties",rootData:a,dynamicAnchors:c})||(o=o===null?pe.errors:o.concat(pe.errors),l=o.length);var u=I===l}else var u=!0;if(u){if(e.dependentSchemas!==void 0){let E=l;pe(e.dependentSchemas,{instancePath:t+"/dependentSchemas",parentData:e,parentDataProperty:"dependentSchemas",rootData:a,dynamicAnchors:c})||(o=o===null?pe.errors:o.concat(pe.errors),l=o.length);var u=E===l}else var u=!0;if(u){if(e.allOf!==void 0){let O=l;Z(e.allOf,{instancePath:t+"/allOf",parentData:e,parentDataProperty:"allOf",rootData:a,dynamicAnchors:c})||(o=o===null?Z.errors:o.concat(Z.errors),l=o.length);var u=O===l}else var u=!0;if(u){if(e.anyOf!==void 0){let x=l;Z(e.anyOf,{instancePath:t+"/anyOf",parentData:e,parentDataProperty:"anyOf",rootData:a,dynamicAnchors:c})||(o=o===null?Z.errors:o.concat(Z.errors),l=o.length);var u=x===l}else var u=!0;if(u){if(e.oneOf!==void 0){let W=l;Z(e.oneOf,{instancePath:t+"/oneOf",parentData:e,parentDataProperty:"oneOf",rootData:a,dynamicAnchors:c})||(o=o===null?Z.errors:o.concat(Z.errors),l=o.length);var u=W===l}else var u=!0;if(u){if(e.prefixItems!==void 0){let ie=l;Z(e.prefixItems,{instancePath:t+"/prefixItems",parentData:e,parentDataProperty:"prefixItems",rootData:a,dynamicAnchors:c})||(o=o===null?Z.errors:o.concat(Z.errors),l=o.length);var u=ie===l}else var u=!0;if(u){if(e.items!==void 0){let ce=l;H.validate(e.items,{instancePath:t+"/items",parentData:e,parentDataProperty:"items",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=ce===l}else var u=!0;if(u){if(e.additionalProperties!==void 0){let Nt=l;H.validate(e.additionalProperties,{instancePath:t+"/additionalProperties",parentData:e,parentDataProperty:"additionalProperties",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Nt===l}else var u=!0;if(u){if(e.not!==void 0){let Ye=l;H.validate(e.not,{instancePath:t+"/not",parentData:e,parentDataProperty:"not",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Ye===l}else var u=!0;if(u){if(e.if!==void 0){let Ht=l;H.validate(e.if,{instancePath:t+"/if",parentData:e,parentDataProperty:"if",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Ht===l}else var u=!0;if(u){if(e.then!==void 0){let Sr=l;H.validate(e.then,{instancePath:t+"/then",parentData:e,parentDataProperty:"then",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Sr===l}else var u=!0;if(u){if(e.else!==void 0){let kr=l;H.validate(e.else,{instancePath:t+"/else",parentData:e,parentDataProperty:"else",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=kr===l}else var u=!0;if(u){if(e.contains!==void 0){let yn=l;H.validate(e.contains,{instancePath:t+"/contains",parentData:e,parentDataProperty:"contains",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=yn===l}else var u=!0;if(u){if(e.unevaluatedProperties!==void 0){let Jl=l;H.validate(e.unevaluatedProperties,{instancePath:t+"/unevaluatedProperties",parentData:e,parentDataProperty:"unevaluatedProperties",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Jl===l}else var u=!0;if(u){if(e.unevaluatedItems!==void 0){let Wl=l;H.validate(e.unevaluatedItems,{instancePath:t+"/unevaluatedItems",parentData:e,parentDataProperty:"unevaluatedItems",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Wl===l}else var u=!0;if(u){if(e.propertyNames!==void 0){let Xl=l;H.validate(e.propertyNames,{instancePath:t+"/propertyNames",parentData:e,parentDataProperty:"propertyNames",rootData:a,dynamicAnchors:c})||(o=o===null?H.validate.errors:o.concat(H.validate.errors),l=o.length);var u=Xl===l}else var u=!0;if(u){if(e.type!==void 0){let He=e.type,Pr=l,Ve=l,Ze=!1,vn=l;je(He,{instancePath:t+"/type",parentData:e,parentDataProperty:"type",rootData:a,dynamicAnchors:c})||(o=o===null?je.errors:o.concat(je.errors),l=o.length);var m=vn===l;Ze=Ze||m;let xr=l;if(l===xr)if(Array.isArray(He))if(He.length<1){let he={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1}};o===null?o=[he]:o.push(he),l++}else{var f=!0;let he=He.length;for(let te=0;te<he;te++){let ge=l;je(He[te],{instancePath:t+"/type/"+te,parentData:He,parentDataProperty:te,rootData:a,dynamicAnchors:c})||(o=o===null?je.errors:o.concat(je.errors),l=o.length);var f=ge===l;if(!f)break}if(f){let te=He.length,ge;if(te>1){e:for(;te--;)for(ge=te;ge--;)if(ku(He[te],He[ge])){let Qe={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:te,j:ge}};o===null?o=[Qe]:o.push(Qe),l++;break e}}}}else{let he={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"}};o===null?o=[he]:o.push(he),l++}var m=xr===l;if(Ze=Ze||m,Ze)l=Ve,o!==null&&(Ve?o.length=Ve:o=null);else{let he={instancePath:t+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{}};return o===null?o=[he]:o.push(he),l++,V.errors=o,!1}var u=Pr===l}else var u=!0;if(u){if(e.enum!==void 0){let Pr=e.enum,Ve=l;if(l===Ve)if(Array.isArray(Pr)){if(Pr.length<1)return V.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1}}],!1}else return V.errors=[{instancePath:t+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"}}],!1;var u=Ve===l}else var u=!0;if(u){if(e.title!==void 0){let Ve=l;if(typeof e.title!="string")return V.errors=[{instancePath:t+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"}}],!1;var u=Ve===l}else var u=!0;if(u){if(e.description!==void 0){let Ze=l;if(typeof e.description!="string")return V.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"}}],!1;var u=Ze===l}else var u=!0;if(u){if(e.examples!==void 0){let vn=l;if(!Array.isArray(e.examples))return V.errors=[{instancePath:t+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"}}],!1;var u=vn===l}else var u=!0;if(u){if(e.readOnly!==void 0){let xr=l;if(typeof e.readOnly!="boolean")return V.errors=[{instancePath:t+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"}}],!1;var u=xr===l}else var u=!0;if(u){if(e.writeOnly!==void 0){let Yl=l;if(typeof e.writeOnly!="boolean")return V.errors=[{instancePath:t+"/writeOnly",schemaPath:"#/properties/writeOnly/type",keyword:"type",params:{type:"boolean"}}],!1;var u=Yl===l}else var u=!0;if(u){if(e.deprecated!==void 0){let he=l;if(typeof e.deprecated!="boolean")return V.errors=[{instancePath:t+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"}}],!1;var u=he===l}else var u=!0;if(u){if(e.multipleOf!==void 0){let te=e.multipleOf,ge=l;if(l===ge)if(typeof te=="number"&&isFinite(te)){if(te<=0||isNaN(te))return V.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0}}],!1}else return V.errors=[{instancePath:t+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"}}],!1;var u=ge===l}else var u=!0;if(u){if(e.maximum!==void 0){let ge=e.maximum,Qe=l;if(!(typeof ge=="number"&&isFinite(ge)))return V.errors=[{instancePath:t+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"}}],!1;var u=Qe===l}else var u=!0;if(u){if(e.exclusiveMaximum!==void 0){let Qe=e.exclusiveMaximum,Er=l;if(!(typeof Qe=="number"&&isFinite(Qe)))return V.errors=[{instancePath:t+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"}}],!1;var u=Er===l}else var u=!0;if(u){if(e.minimum!==void 0){let Er=e.minimum,Rr=l;if(!(typeof Er=="number"&&isFinite(Er)))return V.errors=[{instancePath:t+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"}}],!1;var u=Rr===l}else var u=!0;if(u){if(e.exclusiveMinimum!==void 0){let Rr=e.exclusiveMinimum,bn=l;if(!(typeof Rr=="number"&&isFinite(Rr)))return V.errors=[{instancePath:t+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"}}],!1;var u=bn===l}else var u=!0;if(u){if(e.maxLength!==void 0){let bn=l;K(e.maxLength,{instancePath:t+"/maxLength",parentData:e,parentDataProperty:"maxLength",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=bn===l}else var u=!0;if(u){if(e.minLength!==void 0){let Zl=l;K(e.minLength,{instancePath:t+"/minLength",parentData:e,parentDataProperty:"minLength",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=Zl===l}else var u=!0;if(u){if(e.maxItems!==void 0){let Ql=l;K(e.maxItems,{instancePath:t+"/maxItems",parentData:e,parentDataProperty:"maxItems",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=Ql===l}else var u=!0;if(u){if(e.minItems!==void 0){let eu=l;K(e.minItems,{instancePath:t+"/minItems",parentData:e,parentDataProperty:"minItems",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=eu===l}else var u=!0;if(u){if(e.maxContains!==void 0){let tu=l;K(e.maxContains,{instancePath:t+"/maxContains",parentData:e,parentDataProperty:"maxContains",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=tu===l}else var u=!0;if(u){if(e.minContains!==void 0){let ru=l;K(e.minContains,{instancePath:t+"/minContains",parentData:e,parentDataProperty:"minContains",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=ru===l}else var u=!0;if(u){if(e.maxProperties!==void 0){let nu=l;K(e.maxProperties,{instancePath:t+"/maxProperties",parentData:e,parentDataProperty:"maxProperties",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=nu===l}else var u=!0;if(u){if(e.minProperties!==void 0){let au=l;K(e.minProperties,{instancePath:t+"/minProperties",parentData:e,parentDataProperty:"minProperties",rootData:a,dynamicAnchors:c})||(o=o===null?K.errors:o.concat(K.errors),l=o.length);var u=au===l}else var u=!0;if(u){if(e.uniqueItems!==void 0){let su=l;if(typeof e.uniqueItems!="boolean")return V.errors=[{instancePath:t+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"}}],!1;var u=su===l}else var u=!0;if(u){if(e.required!==void 0){let ou=l;ye(e.required,{instancePath:t+"/required",parentData:e,parentDataProperty:"required",rootData:a,dynamicAnchors:c})||(o=o===null?ye.errors:o.concat(ye.errors),l=o.length);var u=ou===l}else var u=!0;if(u){if(e.dependentRequired!==void 0){let ft=e.dependentRequired,pt=l;if(l===pt)if(ft&&typeof ft=="object"&&!Array.isArray(ft))for(let _n in ft){let iu=l;ye(ft[_n],{instancePath:t+"/dependentRequired/"+_n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:ft,parentDataProperty:_n,rootData:a,dynamicAnchors:c})||(o=o===null?ye.errors:o.concat(ye.errors),l=o.length);var p=iu===l;if(!p)break}else return V.errors=[{instancePath:t+"/dependentRequired",schemaPath:"#/properties/dependentRequired/type",keyword:"type",params:{type:"object"}}],!1;var u=pt===l}else var u=!0;if(u){if(e.contentEncoding!==void 0){let pt=l;if(typeof e.contentEncoding!="string")return V.errors=[{instancePath:t+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"}}],!1;var u=pt===l}else var u=!0;if(u)if(e.contentMediaType!==void 0){let pt=l;if(typeof e.contentMediaType!="string")return V.errors=[{instancePath:t+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"}}],!1;var u=pt===l}else var u=!0}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return V.errors=o,l===0}i(V,"p");V.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var In="https://json-schema.org/draft/2020-12/schema",go=1048576,yo=32768,xu=new Set(["properties","$defs","dependentSchemas"]),Eu=new Set(["allOf","anyOf","oneOf","prefixItems"]),Ru=new Set(["items","additionalProperties","not","if","then","else","contains","unevaluatedProperties","unevaluatedItems","propertyNames"]);function ve(e,t=go){let r=[{value:e,depth:0}],n=new Set,a=0;for(;r.length;){let c=r.pop();if(c.exit){n.delete(c.value);continue}if(++a>1e5||c.depth>48)throw new Error("task_json_complexity_exceeded");if(c.value===null||typeof c.value=="string"||typeof c.value=="boolean"||typeof c.value=="number"&&Number.isFinite(c.value))continue;if(typeof c.value!="object")throw new Error("task_json_value_invalid");if(n.has(c.value))throw new Error("task_json_cycle");n.add(c.value),r.push({...c,exit:!0});let o=Object.getPrototypeOf(c.value);if(!Array.isArray(c.value)&&o!==Object.prototype&&o!==null)throw new Error("task_json_object_invalid");if(Object.getOwnPropertySymbols(c.value).length)throw new Error("task_json_symbol_invalid");if(Object.hasOwn(c.value,"toJSON"))throw new Error("task_json_serializer_invalid");if(Array.isArray(c.value)&&(c.value.length>1e4||Object.keys(c.value).length!==c.value.length))throw new Error("task_json_array_invalid");for(let[l,d]of Object.entries(Object.getOwnPropertyDescriptors(c.value))){if(d.get||d.set)throw new Error("task_json_accessor_invalid");if(Array.isArray(c.value)&&l!=="length"&&(!/^(0|[1-9]\d*)$/u.test(l)||Number(l)>=c.value.length))throw new Error("task_json_array_invalid");d.enumerable&&r.push({value:d.value,depth:c.depth+1})}}if(new TextEncoder().encode(JSON.stringify(e)).byteLength>t)throw new Error("task_json_size_exceeded")}i(ve,"assertBoundedTaskJson");function Mt(e){try{return jn(e),{valid:!0,issues:[]}}catch(t){return{valid:!1,issues:[{path:"",code:"task_schema_invalid",message:t instanceof Error?t.message:"Task schema is invalid."}]}}}i(Mt,"validateTaskSchema");function jn(e){if(ve(e,yo),Dt(e,e,new Set,0,{remaining:2048}),!Rn(e)){let t=Rn.errors?.[0];throw new Error(`Task schema ${t?.instancePath||"/"} violates ${t?.keyword??"schema"}.`)}}i(jn,"assertTaskSchema");function Dt(e,t,r,n,a){if(--a.remaining<0)throw new Error("Task schema reference expansion exceeds the validation budget.");if(typeof e=="boolean")return;if(!e||typeof e!="object"||Array.isArray(e))throw new Error("A task schema must be an object or boolean.");if(n>24||r.has(e))throw new Error("Recursive or deeply nested task schemas are not supported.");let c=new Set(r).add(e),o=e;if(o.$schema!==void 0&&o.$schema!==In)throw new Error(`Task schemas must use ${In}.`);for(let[l,d]of Object.entries(o))if(l==="$ref"){if(typeof d!="string"||!d.startsWith("#/$defs/"))throw new Error("Task schema references must be local JSON pointers into $defs.");let u=t;for(let f of d.slice(2).split("/")){if(/~(?![01])/u.test(f))throw new Error("Invalid task schema JSON pointer.");let m=f.replaceAll("~1","/").replaceAll("~0","~");if(!u||typeof u!="object"||!Object.hasOwn(u,m))throw new Error(`Task schema reference ${d} is missing.`);u=u[m]}Dt(u,t,c,n+1,a)}else if(xu.has(l)){if(!d||typeof d!="object"||Array.isArray(d))throw new Error(`Invalid schema map ${l}.`);for(let u of Object.values(d))Dt(u,t,c,n+1,a)}else if(Eu.has(l)){if(!Array.isArray(d)||d.length>32)throw new Error(`Schema ${l} must contain at most 32 alternatives.`);for(let u of d)Dt(u,t,c,n+1,a)}else Ru.has(l)&&Dt(d,t,c,n+1,a)}i(Dt,"inspectSchema");var bl=cu(vl(),1);var yr=new Map;function qs(e,t){try{ve(t);let r=fy(e),n=r(t);return{valid:n,issues:n?[]:(r.errors??[]).slice(0,20).map(a=>({path:a.instancePath,code:a.keyword,message:a.message??"Value does not match the task schema."}))}}catch(r){return{valid:!1,issues:[{path:"",code:"task_validation_unavailable",message:r instanceof Error?r.message:"Task validation failed."}]}}}i(qs,"validateTaskValue");function fy(e){jn(e);let t=S(e),r=yr.get(t);if(r)return r;let a=new bl.Ajv2020({allErrors:!1,ownProperties:!0,strict:!0,strictSchema:!1,strictTypes:!1,strictTuples:!1,strictRequired:!1,validateFormats:!1,validateSchema:!1,inlineRefs:!1,loopRequired:32,loopEnum:32}).compile(e);return yr.size>=64&&yr.delete(yr.keys().next().value),yr.set(t,a),a}i(fy,"validator");var _l=s.object({taskId:k,input:s.record(s.string(),s.unknown()),policyVisibleContext:s.record(s.string(),s.unknown()),expectedOutput:s.record(s.string(),s.unknown()).nullable().optional(),tags:s.array(k).max(100).optional()}).strict(),Ot=s.object({schemaVersion:s.literal("openpond.humanTaskProposal.v1"),tasks:s.array(_l).min(1).max(1e3),contentHash:b}).strict().superRefine((e,t)=>{let{contentHash:r,...n}=e;r!==S(n)&&t.addIssue({code:"custom",message:"Task proposal content hash differs."}),new Set(e.tasks.map(a=>a.taskId)).size!==e.tasks.length&&t.addIssue({code:"custom",message:"Each task may be proposed once."});try{ve(e,1048576)}catch{t.addIssue({code:"custom",message:"Task proposal exceeds retained data bounds."})}}),Os=s.object({schemaVersion:s.literal("openpond.humanTaskProposal.v1"),tasks:s.array(_l).min(1).max(1e3),contentHash:b,referenceRedacted:s.literal(!0).optional()}).strict().superRefine((e,t)=>{e.referenceRedacted?e.tasks.some(r=>r.expectedOutput!==void 0)&&t.addIssue({code:"custom",message:"Redacted proposals cannot include reference outputs."}):Ot.safeParse(e).success||t.addIssue({code:"custom",message:"Task proposal integrity differs."})});function T_(e){return!e||!e.tasks.some(t=>t.expectedOutput!==void 0)?e:{...e,referenceRedacted:!0,tasks:e.tasks.map(t=>{let{expectedOutput:r,...n}=t;return n})}}i(T_,"redactHumanTaskProposal");function N_(e,t){if(e.kind!=="author"){if(t)throw new Error("human_task_proposal_unexpected");return}if(!t)throw new Error("human_task_proposal_required");let r=e.evidence.taskIds??[];if(t.tasks.length!==r.length||t.tasks.some(n=>!r.includes(n.taskId)))throw new Error("human_task_proposal_selection_mismatch")}i(N_,"assertHumanTaskProposal");function H_(e,t){let r=new Map(t.tasks.map(n=>[n.taskId,n]));if(t.tasks.some(n=>!e.some(a=>a.id===n.taskId)))throw new Error("human_task_proposal_source_unavailable");return e.map(n=>{let a=r.get(n.id);return a?{...n,input:a.input,policyVisibleContext:a.policyVisibleContext,...a.expectedOutput===void 0?{}:{expectedOutput:a.expectedOutput},...a.tags===void 0?{}:{tags:a.tags}}:n})}i(H_,"applyHumanTaskProposal");var _=k,fe=s.object({id:_,revision:s.number().int().positive(),contentHash:b}).strict(),py=s.discriminatedUnion("kind",[s.object({id:_,label:s.string().trim().min(1).max(500),instructions:s.string().max(2e4),required:s.boolean(),allowAbstain:s.boolean(),requireRationale:s.boolean().optional(),anchors:s.array(s.object({value:s.union([s.number(),s.string(),s.boolean()]),description:s.string().min(1).max(2e3)}).strict()).max(100).optional(),kind:s.literal("score"),minimum:s.number().finite(),maximum:s.number().finite(),step:s.number().positive().finite()}).strict().refine(e=>e.minimum<e.maximum&&e.step<=e.maximum-e.minimum,"Use an increasing raw score range and a step within that range."),s.object({id:_,label:s.string().trim().min(1).max(500),instructions:s.string().max(2e4),required:s.boolean(),allowAbstain:s.boolean(),requireRationale:s.boolean().optional(),anchors:s.array(s.object({value:s.union([s.number(),s.string(),s.boolean()]),description:s.string().min(1).max(2e3)}).strict()).max(100).optional(),kind:s.literal("category"),options:s.array(s.string().trim().min(1).max(500)).min(2).max(100)}).strict().refine(e=>new Set(e.options).size===e.options.length,"Category options must be unique."),s.object({id:_,label:s.string().trim().min(1).max(500),instructions:s.string().max(2e4),required:s.boolean(),allowAbstain:s.boolean(),requireRationale:s.boolean().optional(),anchors:s.array(s.object({value:s.union([s.number(),s.string(),s.boolean()]),description:s.string().min(1).max(2e3)}).strict()).max(100).optional(),kind:s.literal("boolean")}).strict(),s.object({id:_,label:s.string().trim().min(1).max(500),instructions:s.string().max(2e4),required:s.boolean(),allowAbstain:s.boolean(),requireRationale:s.boolean().optional(),anchors:s.array(s.object({value:s.union([s.number(),s.string(),s.boolean()]),description:s.string().min(1).max(2e3)}).strict()).max(100).optional(),kind:s.literal("text"),minimumLength:s.number().int().nonnegative().max(2e4).optional(),maximumLength:s.number().int().positive().max(2e4)}).strict(),s.object({id:_,label:s.string().trim().min(1).max(500),instructions:s.string().max(2e4),required:s.boolean(),allowAbstain:s.boolean(),requireRationale:s.boolean().optional(),anchors:s.array(s.object({value:s.union([s.number(),s.string(),s.boolean()]),description:s.string().min(1).max(2e3)}).strict()).max(100).optional(),kind:s.literal("preference"),requireStrength:s.boolean().optional(),allowTie:s.boolean()}).strict()]),dn=s.object({schemaVersion:s.literal("openpond.humanForm.v1"),mode:s.enum(["individual","pairwise"]),instructions:s.string().max(2e4),criteria:s.array(py).min(1).max(100)}).strict().superRefine((e,t)=>{e.criteria.forEach((r,n)=>{r.kind==="text"&&(r.minimumLength??0)>r.maximumLength&&t.addIssue({code:"custom",path:["criteria",n,"minimumLength"],message:"Minimum text length must not exceed maximum length."});let a=new Set;r.anchors?.forEach((c,o)=>{let l=c.value,d=r.kind==="score"?typeof l=="number"&&Number.isFinite(l)&&l>=r.minimum&&l<=r.maximum&&Math.abs((l-r.minimum)/r.step-Math.round((l-r.minimum)/r.step))<1e-8:r.kind==="category"?typeof l=="string"&&r.options.includes(l):r.kind==="boolean"?typeof l=="boolean":r.kind==="preference"?["A","B",...r.allowTie?["tie"]:[]].includes(String(l)):typeof l=="string",u=JSON.stringify(l);(!d||a.has(u))&&t.addIssue({code:"custom",path:["criteria",n,"anchors",o,"value"],message:"Each anchor must describe a unique valid raw value."}),a.add(u)})}),new Set(e.criteria.map(r=>r.id)).size!==e.criteria.length&&t.addIssue({code:"custom",path:["criteria"],message:"Criterion IDs must be unique."}),e.mode==="individual"&&e.criteria.some(r=>r.kind==="preference")&&t.addIssue({code:"custom",path:["criteria"],message:"Preferences require an explicit pair."})}),hy=s.object({localSource:s.union([Ir,co]).optional(),recordedSource:s.object({id:_,snapshotHash:b,boundaryId:_,boundaryRevisionHash:b}).strict().optional(),experimentId:_,attemptId:_,taskId:_,targetId:_,output:fe,trace:fe.nullable(),familyKey:_,split:s.enum(["train","validation","test","frozen_eval"])}).strict(),As=s.object({publication:fe.optional(),dataset:fe,grader:fe,graderBinding:s.object({id:_,version:s.string().min(1).max(100),contentHash:b}).strict(),rubric:fe,attempts:s.array(hy).max(2),taskIds:s.array(_).min(1).max(1e3).optional()}).strict().superRefine((e,t)=>{!e.attempts.length&&!e.taskIds?.length&&t.addIssue({code:"custom",message:"Select retained attempts or exact tasks."}),e.taskIds&&new Set(e.taskIds).size!==e.taskIds.length&&t.addIssue({code:"custom",path:["taskIds"],message:"Select each task once."}),e.attempts.length===2&&(e.attempts[0].attemptId===e.attempts[1].attemptId||e.attempts[0].taskId!==e.attempts[1].taskId||e.attempts[0].familyKey!==e.attempts[1].familyKey||e.attempts[0].split!==e.attempts[1].split)&&t.addIssue({code:"custom",path:["attempts"],message:"A/B review requires distinct attempts of the same task, family and split."})}),br=s.object({criterionId:_,value:s.union([s.number().finite(),s.boolean(),s.string().max(2e4),s.null()]),abstain:s.boolean(),note:s.string().max(2e4),strength:s.enum(["slight","moderate","strong"]).optional()}).strict(),wl=s.object({approval:s.enum(["none","manager"]),minimumRaters:s.number().int().min(1).max(100),managerIds:s.array(_).max(100),reviewerIds:s.array(_).max(100),queueClaim:s.boolean(),teamVisible:s.boolean(),distinctManager:s.boolean().optional(),independentRaters:s.boolean().optional(),blindPair:s.boolean().optional()}).strict().superRefine((e,t)=>{e.approval==="none"&&e.minimumRaters!==1&&t.addIssue({code:"custom",path:["minimumRaters"],message:"Multi-rater review requires explicit adjudication."})}),$l=s.object({taskProposal:Ot.optional(),id:_,revision:s.number().int().positive(),actorId:_,generation:s.number().int().positive(),evidenceHash:b,formHash:b,answers:s.array(br).max(100),note:s.string().max(2e4),submittedAt:X,supersedes:_.nullable(),contentHash:b}).strict(),vr=s.object({taskProposalHash:b.optional(),id:_,revision:s.number().int().positive(),actorId:_,outcome:s.enum(["accept","reject","request_changes"]),submissions:s.array(s.object({id:_,contentHash:b}).strict()).min(1).max(100),answers:s.array(br).max(100),note:s.string().max(2e4),decidedAt:X,contentHash:b}).strict(),un=s.object({schemaVersion:s.literal("openpond.humanReview.v1"),id:_,revision:s.number().int().positive(),scope:_,projectId:_,createdBy:_,kind:s.enum(["author","execute","grade"]),dueAt:X.optional(),title:s.string().trim().min(1).max(500),authorPublication:s.object({proposalHash:b,dataset:fe,operationId:_,publishedBy:_,publishedAt:X}).strict().nullable(),evidence:As,form:dn,policy:wl,status:s.enum(["queued","assigned","in_progress","submitted","returned","accepted","rejected","cancelled"]),assigneeId:_.nullable(),generation:s.number().int().positive(),drafts:s.array(s.object({taskProposal:Ot.optional(),actorId:_,generation:s.number().int().positive(),answers:s.array(br).max(100),note:s.string().max(2e4),updatedAt:X}).strict()).max(100),submissions:s.array($l).max(1e3),decisions:s.array(vr).max(1e3),audit:s.array(s.object({actorId:_,action:s.enum(["claim","reassign","cancel"]),priorAssigneeId:_.nullable(),assigneeId:_.nullable(),generation:s.number().int().positive(),note:s.string().max(2e4),occurredAt:X}).strict()).max(1e3),execution:s.object({executionId:_.nullable(),operationId:_,boundBy:_,configurationHash:b,generation:s.number().int().positive(),result:fe.nullable()}).strict().nullable(),createdAt:X,updatedAt:X,contentHash:b}).strict(),Te={operationId:_,id:_,expectedRevision:s.number().int().nonnegative()},gy=s.discriminatedUnion("action",[s.object({...Te,action:s.literal("create"),projectId:_,kind:un.shape.kind,title:un.shape.title,dueAt:X.optional(),evidence:As,form:dn,policy:wl,assigneeId:_.nullable()}).strict(),s.object({...Te,action:s.literal("claim")}).strict(),s.object({...Te,action:s.literal("bind_author_publication"),proposalHash:b,dataset:fe}).strict(),s.object({...Te,action:s.literal("reserve_execution"),generation:s.number().int().positive(),runOperationId:_,configurationHash:b}).strict(),s.object({...Te,action:s.literal("bind_execution"),generation:s.number().int().positive(),executionId:_,runOperationId:_,configurationHash:b}).strict(),s.object({...Te,action:s.literal("reassign"),assigneeId:_.nullable(),note:s.string().trim().min(1).max(2e4)}).strict(),s.object({...Te,action:s.literal("cancel"),note:s.string().max(2e4)}).strict(),s.object({...Te,action:s.literal("save_draft"),taskProposal:Ot.optional(),generation:s.number().int().positive(),answers:s.array(br).max(100),note:s.string().max(2e4)}).strict(),s.object({...Te,action:s.literal("submit"),taskProposal:Ot.optional(),generation:s.number().int().positive(),evidenceHash:b,formHash:b,executionResult:fe.optional(),answers:s.array(br).max(100),note:s.string().max(2e4)}).strict(),s.object({...Te,action:s.literal("decide"),taskProposalHash:b.optional(),outcome:vr.shape.outcome,submissions:vr.shape.submissions,answers:vr.shape.answers,note:vr.shape.note}).strict()]),yy=s.discriminatedUnion("endpoint",[s.object({endpoint:s.literal("command"),scope:_,command:gy}).strict(),s.object({endpoint:s.literal("get"),scope:_,id:_,revision:s.number().int().positive().optional()}).strict(),s.object({endpoint:s.literal("inbox"),scope:_,projectId:_.optional(),view:s.enum(["mine","team","approval"]),status:s.enum(["active","history"]),afterId:_.optional(),limit:s.number().int().min(1).max(100)}).strict()]);function L_(e){return{...e,contentHash:S(e)}}i(L_,"sealHumanRecord");function F_(e,t,r){if(new Set(t.map(n=>n.criterionId)).size!==t.length)throw new Error("human_duplicate_criterion");for(let n of t){let a=e.criteria.find(l=>l.id===n.criterionId);if(!a)throw new Error("human_unknown_criterion");if(r&&a.requireRationale&&!n.note.trim())throw new Error("human_rationale_required");if(r&&a.kind==="preference"&&a.requireStrength&&!n.strength&&!n.abstain)throw new Error("human_preference_strength_required");if(n.abstain){if(!a.allowAbstain||n.value!==null||!n.note.trim())throw new Error("human_abstention_invalid");continue}let c=n.value;if(!r&&c===null)continue;if(!(a.kind==="score"?typeof c=="number"&&c>=a.minimum&&c<=a.maximum&&Math.abs((c-a.minimum)/a.step-Math.round((c-a.minimum)/a.step))<1e-8:a.kind==="category"?typeof c=="string"&&a.options.includes(c):a.kind==="boolean"?typeof c=="boolean":a.kind==="preference"?["A","B",...a.allowTie?["tie"]:[]].includes(String(c)):typeof c=="string"&&c.length>=(a.minimumLength??0)&&c.length<=a.maximumLength&&(!a.required||!!c.trim())))throw new Error("human_answer_invalid")}if(r&&e.criteria.some(n=>n.required&&!t.some(a=>a.criterionId===n.id)))throw new Error("human_required_answer_missing")}i(F_,"assertHumanAnswers");var vy=un.omit({evidence:!0,drafts:!0,submissions:!0}).extend({drafts:s.array(un.shape.drafts.element.omit({taskProposal:!0}).extend({taskProposal:Os.optional()})).max(100),submissions:s.array($l.omit({taskProposal:!0}).extend({taskProposal:Os.optional()})).max(1e3),evidence:As.nullable(),evidenceHash:b,formHash:b,permissions:s.object({owner:s.boolean(),manager:s.boolean(),reviewer:s.boolean(),claim:s.boolean()}).strict()}).strict(),U_=s.object({items:s.array(vy).max(100),nextCursor:_.nullable(),actionCount:s.number().int().nonnegative(),approvalAvailable:s.boolean()}).strict(),Sl=s.object({endpoint:s.literal("snapshot"),scope:_,projectId:_,graderId:_,selections:s.array(s.object({executionId:_,receiptId:_}).strict()).min(1).max(2)}).strict(),by=s.object({endpoint:s.literal("snapshot_tasks"),scope:_,projectId:_,graderId:_,dataset:fe,taskIds:s.array(_).min(1).max(1e3).optional(),all:s.literal(!0).optional()}).strict().refine(e=>!!e.all!=!!e.taskIds,"Choose an exact selected task list or the server-frozen full Dataset."),_y=s.object({endpoint:s.literal("inspect"),scope:_,id:_,slot:s.number().int().min(0).max(1).optional(),afterId:s.string().min(1).max(500).optional()}).strict(),wy=s.object({endpoint:s.literal("results"),scope:_,executionId:_,selection:s.array(fe).max(1e4).optional()}).strict(),$y=s.object({endpoint:s.literal("members"),scope:_}).strict(),Sy=s.object({endpoint:s.literal("execute"),scope:_,id:_,expectedRevision:s.number().int().positive(),generation:s.number().int().positive(),operationId:_,configuration:s.unknown()}).strict(),ky=s.object({endpoint:s.literal("execution"),scope:_,id:_,action:s.enum(["status","result","cancel"])}).strict(),Py=Sl.omit({endpoint:!0}).extend({endpoint:s.literal("publish_evidence"),operationId:_,audience:s.array(_).max(100),workspaceVisible:s.boolean()}).strict(),xy=s.object({endpoint:s.literal("publication_access"),scope:_,projectId:_}).strict(),Ey=s.object({endpoint:s.literal("revoke_publication"),scope:_,publication:fe}).strict(),Ry=s.object({endpoint:s.literal("publish_author"),scope:_,id:_,expectedRevision:s.number().int().positive(),operationId:_,proposalHash:b,workspaceId:_.optional(),expectedWorkspaceRevision:s.number().int().positive().optional()}).strict(),Iy=s.object({endpoint:s.literal("author_tasks"),scope:_,id:_,includeReference:s.literal(!0).optional()}).strict(),jy=s.object({endpoint:s.literal("graders"),scope:_,projectId:_,dataset:fe}).strict(),G_=s.array(s.object({id:_,name:s.string(),version:s.string(),contentHash:b,mode:s.enum(["individual","pairwise"])}).strict()).max(1e3),B_=s.union([fo,mo,En,lo,uo,xy,Ry,Iy,jy,Py,Ey,Sy,ky,yy,Sl,by,_y,wy,$y]),J_=s.array(s.object({origin:s.literal("owner_attested_local").optional(),coverage:s.object({sourceEventCount:s.number().int().nonnegative(),publishedEventCount:s.number().int().nonnegative(),traceLimited:s.boolean(),artifactsIncluded:s.literal(!1)}).strict().optional(),reviewId:_,reviewRevision:s.number().int().positive(),evidenceHash:b,slot:s.string(),input:s.unknown(),output:s.unknown(),error:s.string().nullable(),events:s.array(s.record(s.string(),s.unknown())),eventCount:s.number().int().nonnegative(),evidenceLimited:s.boolean(),nextEventCursor:s.string().nullable(),slotIndex:s.number().int().nonnegative(),executionId:_.optional(),receiptId:_.optional()}).strict()).max(1e3);var _r=s.enum(["train","validation","test","frozen_eval"]),qy=s.object({path:s.string().trim().min(1).max(2e3).refine(My),mediaType:s.string().trim().min(1).max(200),schemaRef:Ie.nullable().default(null),maxBytes:s.number().int().positive().max(25e7).nullable().default(null),metadata:wn}).strict(),Oy=s.object({policyVisibleFields:s.array(k).max(1e3).default([]),privilegedFields:s.array(k).max(1e3).default([]),hiddenGraderRefs:s.array(k).max(1e3).default([]),connectedAppScopes:s.array(k).max(100).default([])}).strict(),Ay=s.object({protocolVersion:s.literal("openpond.environment.v1"),kind:s.enum(["text","agent","work","custom_program"]),entrypoint:s.string().trim().min(1).max(1e3),stateful:s.boolean(),deterministicSeeds:s.boolean(),lifecycle:s.array(s.enum(["create","reset","step","collect","destroy"])).min(5).max(5),networkPolicy:s.enum(["none","declared_read_only","declared_scoped"]),defaultTimeoutMs:s.number().int().positive().max(36e5)}).strict(),mn=s.object({id:k,version:s.string().trim().min(1).max(100),weight:s.number().nonnegative().max(1e3).default(1),hardGate:s.boolean().default(!1),rewardEligible:s.boolean().default(!1),privileged:s.boolean().default(!1)}),Ts=mn.extend({kind:s.enum(["content","schema","artifact","runtime_event","state"]),config:s.record(s.string(),s.unknown())}).strict(),Ns=mn.extend({kind:s.literal("model_judge"),rubricRef:Ie,calibrationStatus:s.enum(["pending","passed","failed"]),model:s.object({providerId:k,modelId:k,revision:s.string().trim().min(1).max(500).nullable()}).strict().optional(),temperature:s.number().min(0).max(2).optional()}).strict(),Ty=s.enum(["isolated_javascript","sandbox_process"]),Hs=mn.extend({kind:s.literal("custom_verifier"),runtime:Ty.optional(),verifierRef:Ie,exportName:s.string().trim().min(1).max(240).optional(),timeoutMs:s.number().int().positive().max(3e5),networkPolicy:s.literal("none")}).strict(),Cs=mn.extend({kind:s.literal("human"),rubricRef:Ie,reviewerRole:s.string().trim().min(1).max(500),form:dn.optional()}).strict(),Ds=s.union([Ts,Ns,Hs,Cs]),Ny=s.object({id:k,clusterKey:k,split:_r,input:s.record(s.string(),s.unknown()),expectedOutput:s.record(s.string(),s.unknown()).nullable(),policyVisibleContext:s.record(s.string(),s.unknown()).default({}),privilegedContextRef:k.nullable(),artifactRefs:s.array(Ie).max(1e3).default([]),requiredOutputs:s.array(qy).max(1e3).optional(),tags:s.array(k).max(100).default([])}).strict(),kl=s.object({schemaVersion:s.literal("openpond.tasksetRelease.v2"),id:k,revision:s.number().int().positive(),policy:Oy,environment:Ay,environmentRelease:s.object({id:k,contentHash:b}).strict().optional(),tools:s.array(kn).max(200),capabilities:s.array(Pn).max(200),tasks:s.array(Ny).min(1).max(1e6),graders:s.array(Ds).max(1e3),verifierSetRelease:s.object({id:k,contentHash:b}).strict().optional(),metrics:xn.optional(),metadata:wn}).strict(),Hy=kl.extend({contentHash:b}).strict();function Cy(e){let t=Hy.safeParse(e);if(!t.success)return{valid:!1,taskset:null,computedHash:null,issues:t.error.issues.map(d=>({code:"schema_invalid",severity:"error",message:d.message,path:d.path.join(".")}))};let r=t.data,n=[];!!r.environmentRelease!=!!r.verifierSetRelease&&n.push({code:"execution_release_binding_incomplete",severity:"error",message:"A Taskset Release must bind both Environment and Verifier Set releases or neither during v2 migration.",path:"environmentRelease"});let a=new Map;for(let d of r.tasks){r.metrics?.aggregation==="weighted_mean"&&!Object.hasOwn(r.metrics.taskWeights,d.id)&&n.push({code:"metric_task_weight_missing",severity:"error",message:`Metric policy has no weight for task ${d.id}.`,path:"metrics.taskWeights"});let u=a.get(d.clusterKey)??new Set;u.add(d.split),a.set(d.clusterKey,u)}for(let[d,u]of a)u.size>1&&n.push({code:"split_cluster_contamination",severity:"error",message:`Source cluster ${d} appears in multiple splits.`,path:"tasks"});r.tasks.some(d=>d.split==="frozen_eval")||n.push({code:"frozen_eval_missing",severity:"warning",message:"The release has no frozen-evaluation task.",path:"tasks"});let{contentHash:c,...o}=r,l=S(kl.parse(o));return l!==r.contentHash&&n.push({code:"content_hash_mismatch",severity:"error",message:`Taskset contentHash is ${r.contentHash}; expected ${l}.`,path:"contentHash"}),{valid:!n.some(d=>d.severity==="error"),taskset:r,computedHash:l,issues:n}}i(Cy,"validateTasksetRelease");function tw(e){ht(e,"Taskset release");let r=Cy(e).issues.find(n=>n.severity==="error");if(r)throw new Error(r.message)}i(tw,"assertTasksetRelease");function Dy(e){return{id:e.id,input:structuredClone(e.input),policyVisibleContext:structuredClone(e.policyVisibleContext),artifactRefs:e.artifactRefs.filter(t=>t.visibility==="policy"),tags:[...e.tags]}}i(Dy,"policyTaskView");function rw(e){return e.tasks.filter(t=>t.split!=="frozen_eval").map(Dy)}i(rw,"trainingPolicyTaskViews");function My(e){let t=e.replaceAll("\\","/");return!t||t.startsWith("/")||t.includes("\0")?!1:!t.split("/").some(r=>!r||r==="."||r==="..")}i(My,"safeRelativePath");var zy=s.string().min(1).max(2e3).refine(e=>!e.includes("\\")&&!e.includes(":")&&!e.startsWith("/")&&e.split("/").every(t=>t!==""&&t!=="."&&t!==".."),"Evaluation paths must be portable and relative."),At=s.discriminatedUnion("kind",[s.object({kind:s.literal("profile")}).strict(),s.object({kind:s.literal("workflow"),workflowId:k}).strict(),s.object({kind:s.literal("skill"),skillPath:zy}).strict(),s.object({kind:s.literal("agent_action"),actionId:k}).strict()]);var Vy=s.object({taskId:k,seed:s.string().min(1).max(500),fixtureId:k.nullable()}).strict(),Pl=s.string().min(1).max(200).refine(e=>!["__proto__","prototype","constructor"].includes(e),"Use an ordinary field name."),xl=s.enum(["input","output","expectedOutput","evaluatorContext"]),Ky=s.array(s.object({graderId:k,fields:s.array(s.object({destination:xl,path:s.array(Pl).min(1).max(20),source:xl,sourcePath:s.array(Pl).max(20)}).strict()).max(100)}).strict()).max(100),Ly=s.object({execution:D,originalEvidence:D,members:s.array(s.object({caseId:k,seed:s.string().min(1).max(500),fixtureId:b,sourceId:k,snapshotHash:b,boundaryRevisionHash:b}).strict()).min(1).max(500)}).strict(),Fy=s.object({release:D.extend({revision:s.union([s.number().int().positive(),s.string().min(1).max(200)])}).strict(),feedbackKey:s.string().min(1).max(240),configurationHash:b,output:s.enum(["boolean","score","category"]),categories:s.array(s.string().min(1).max(120)).max(50)}).strict(),El=s.object({schemaVersion:s.literal("openpond.profileExternalDatasetBinding.v1"),dataset:D.extend({revision:s.number().int().positive()}).strict(),packageHash:b,profileId:k,target:At,declaredProfileCatalogHash:b.nullable(),protectedProfileClosureHash:b,recordedOrigin:Ly.optional(),gradingSource:s.object({pass:D,evidence:D}).strict().optional(),split:_r,population:s.array(Vy).min(1).max(1e4),evaluators:s.array(Fy).min(1).max(100),fieldMappingsHash:b,fieldMappings:Ky,environmentHash:b,privateDatasetClosureHash:b,criterion:s.object({minimumPassRate:s.number().min(0).max(1),requireComplete:s.boolean()}).strict()}).strict().superRefine((e,t)=>{e.recordedOrigin&&(e.recordedOrigin.members.length!==e.population.length||e.recordedOrigin.members.some((r,n)=>r.caseId!==e.population[n].taskId||r.seed!==e.population[n].seed||r.fixtureId!==r.snapshotHash||e.population[n].fixtureId!==null))&&t.addIssue({code:"custom",message:"Recorded-to-rerun mapping must preserve every exact ordered cutoff and seed while admitting new target attempts."}),S(e.fieldMappings)!==e.fieldMappingsHash&&t.addIssue({code:"custom",message:"Field mappings differ from their sealed hash."}),new Set(e.fieldMappings.map(r=>r.graderId)).size!==e.fieldMappings.length&&t.addIssue({code:"custom",message:"Field mappings must name each grader once."}),new Set(e.population.map(r=>JSON.stringify([r.taskId,r.seed,r.fixtureId]))).size!==e.population.length&&t.addIssue({code:"custom",message:"External Dataset population must be unique."}),new Set(e.evaluators.map(r=>r.feedbackKey)).size!==e.evaluators.length&&t.addIssue({code:"custom",message:"External Dataset feedback keys must be unique."});for(let r of e.evaluators)r.output==="category"!=r.categories.length>0&&t.addIssue({code:"custom",message:"Only category grading declares categories."})}),Ms=El.safeExtend({contentHash:b}).strict();function Rl(e){let t=Ms.parse(e),{contentHash:r,...n}=t;if(S(n)!==r)throw new Error("External Dataset binding integrity failed.");return t}i(Rl,"verifyProfileExternalDatasetBinding");function fw(e){let t=El.parse(e);return Rl({...t,contentHash:S(t)})}i(fw,"createProfileExternalDatasetBinding");var pw=i(e=>`external-dataset-${Rl(e).contentHash.slice(0,40)}`,"externalDatasetDefinitionId");var Uy=s.object({id:k,label:s.string().trim().min(1).max(240),description:s.string().max(4e3),target:At,tasksetRelease:D,split:_r,taskIds:s.array(k).min(1).max(1e5),seeds:s.array(s.string().trim().min(1).max(500)).min(1).max(100),criterion:s.object({minimumPassRate:s.number().min(0).max(1),requireComplete:s.boolean()}).strict()}).strict().superRefine((e,t)=>{new Set(e.taskIds).size!==e.taskIds.length&&t.addIssue({code:"custom",path:["taskIds"],message:"Evaluation task identities must be unique."}),new Set(e.seeds).size!==e.seeds.length&&t.addIssue({code:"custom",path:["seeds"],message:"Evaluation seeds must be unique."})}),Gy=s.object({id:k,label:s.string().trim().min(1).max(240),scope:s.enum(["component","profile"]),definitionIds:s.array(k).min(1).max(1e3)}).strict(),Il=s.object({schemaVersion:s.literal("openpond.profileEvaluations.v1"),definitions:s.array(Uy).max(1e3),suites:s.array(Gy).max(100)}).strict(),zs=s.object({profileId:k,sourceRevision:s.string().trim().min(1).max(240),harnessRelease:D,catalogHash:b,definitionId:k,definitionHash:b,target:At,environmentHash:b,externalDatasetBinding:Ms.optional(),sourceCandidate:so.optional()}).strict();function By(e){let t=Il.parse(e.catalog),r=new Set;for(let a of t.definitions){if(r.has(a.id))throw new Error(`Duplicate Profile evaluation ${a.id}.`);switch(r.add(a.id),a.target.kind){case"workflow":if(!e.workflowIds.has(a.target.workflowId))throw new Error(`Profile evaluation ${a.id} references a missing workflow.`);break;case"skill":if(!e.skillPaths.has(a.target.skillPath))throw new Error(`Profile evaluation ${a.id} references a missing Skill.`);break;case"agent_action":if(!e.actionIds.has(a.target.actionId))throw new Error(`Profile evaluation ${a.id} references a missing Agent action.`);break}}let n=new Set;for(let a of t.suites){if(n.has(a.id))throw new Error(`Duplicate Profile evaluation suite ${a.id}.`);if(n.add(a.id),new Set(a.definitionIds).size!==a.definitionIds.length)throw new Error(`Profile evaluation suite ${a.id} repeats a definition.`);for(let c of a.definitionIds)if(!r.has(c))throw new Error(`Profile evaluation suite ${a.id} references missing definition ${c}.`);if(a.scope==="profile"&&a.definitionIds.every(c=>t.definitions.find(o=>o.id===c)?.target.kind!=="profile"))throw new Error(`Profile evaluation suite ${a.id} needs an end-to-end Profile definition.`)}return{catalog:t,contentHash:S(t)}}i(By,"validateProfileEvaluationCatalog");function Sw(e){let t=Il.parse(e.catalog),r=t.definitions.find(n=>n.id===e.definitionId);if(!r)throw new Error(`Profile evaluation ${e.definitionId} is absent from its catalog.`);return zs.parse({profileId:e.profileId,sourceRevision:e.sourceRevision,harnessRelease:e.harnessRelease,catalogHash:S(t),definitionId:r.id,definitionHash:S(r),target:r.target,environmentHash:e.environmentHash})}i(Sw,"resolveProfileEvaluationRunSource");function kw(e){let t=eo(e),r=to(t);return{...Jy({agentSnapshot:t.agentSnapshot,harnessRelease:t.harnessRelease,catalogBytes:r.get("evals/catalog.json"),workflowBytes:r.get("workflows/catalog.json"),actionBytes:r.get("workflows/actions.json")}),harnessRelease:{id:t.harnessRelease.id,contentHash:t.harnessRelease.contentHash}}}i(kw,"loadReleasedProfileEvaluationCatalog");function Jy(e){let t=e.harnessRelease.files.find(o=>o.path==="evals/catalog.json"),r=e.catalogBytes;if(!t||t.visibility!=="verifier"||!r||Ct(r)!==t.contentHash)throw new Error("Released Profile evaluation catalog is unavailable or not verifier-private.");let n=e.workflowBytes||e.actionBytes?ao({agentSnapshot:e.agentSnapshot,harnessRelease:e.harnessRelease,catalogBytes:e.workflowBytes,actionBytes:e.actionBytes}):null,{catalog:a,contentHash:c}=By({catalog:JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(r)),workflowIds:new Set(n?.catalog.workflows.map(o=>o.id)??[]),skillPaths:new Set(e.agentSnapshot.skills.map(o=>o.path)),actionIds:new Set(n?.actions.map(o=>o.id)??[])});return{catalog:a,catalogHash:c}}i(Jy,"loadReleasedProfileEvaluationCatalogAssets");var Y=class extends Error{static{i(this,"LearningDomainError")}code;status;constructor(t,r=422,n){super(n?`${t}: ${n}`:t),this.code=t,this.status=r,this.name="LearningDomainError"}};function Vs(e){let{grader:t,task:r,evidence:n}=e,a=t.config;if(t.kind==="content"){let l=ze(a.outputField)??"text",d=ze(n.output[l]);if(a.operator==="exact_equals"){let m=ze(a.expectedValue);if(m===null)return ke("Exact content grading requires an expected value.");let p=i(h=>{let g=a.normalizeUnicode===!0?h.normalize("NFC"):h;return a.trimWhitespace===!0?g.trim():g},"normalize");return Ne(d!==null&&p(d)===p(m))}if(a.operator!==void 0&&a.operator!=="final_answer_equals_expected")return ke("Unsupported content grader operator.");if(a.operator===void 0&&(a.includes!==void 0||a.excludes!==void 0)){let m=wr(a.includes),p=wr(a.excludes);if(!m.length&&!p.length)return ke("Content grading requires a nonempty check.");let h=typeof n.output.text=="string"?n.output.text:JSON.stringify(n.output);return Ne(m.every(g=>h.includes(g))&&p.every(g=>!h.includes(g)))}let u=ze(a.expectedValue)??ze(r.expectedOutput?.[ze(a.expectedField)??"text"]),f=a.operator==="final_answer_equals_expected"?Xy:jl;return u===null||!f(u)?ke("Content grading requires a nonempty expected value."):Ne(d!==null&&f(d)===f(u))}if(t.kind==="schema"){if(a.operator!==void 0&&a.operator!=="json_schema_subset")return ke("Unsupported schema grader operator.");let l=a.operator==="json_schema_subset"?a.schema:a.jsonSchema;if(l!==void 0){let u=Mt(l);if(!u.valid)return ke(u.issues[0].message);let f=n.output;if(a.operator==="json_schema_subset"){let p=n.output[ze(a.jsonField)??"text"];if(typeof p=="string")try{f=JSON.parse(p.trim().replace(/^```(?:json)?\s*/i,"").replace(/\s*```$/,""))}catch{return Ne(!1,"The model output was not valid JSON.")}}let m=qs(l,f);return Ne(m.valid,m.valid?void 0:m.issues.map(p=>p.message).join(" "))}let d=wr(a.requiredKeys);return d.length?Ne(d.every(u=>Object.hasOwn(n.output,u))):ke("Schema grading requires a JSON Schema or explicit required keys.")}if(t.kind==="artifact"){let l=ze(a.refIncludes);return l?Ne(n.artifactRefs.some(d=>d.includes(l))):ke("Artifact grading requires a declared artifact reference.")}if(t.kind==="runtime_event"){let l=wr(a.requiredEvents);return l.length?Ne(l.every(d=>n.runtimeEventRefs.some(u=>u.includes(d)))):ke("Runtime event grading requires declared events.")}if(a.operator==="output_field_equals"){let l=ze(a.outputField);return!l||!Object.hasOwn(a,"expectedValue")?ke("Output comparison requires a field and expected value."):Ne(Object.hasOwn(n.output,l)&&S(n.output[l])===S(a.expectedValue))}if(a.operator!==void 0)return ke("Unsupported state grader operator.");let c=wr(a.fields),o=c.length?c:Object.keys(r.expectedOutput??{});return!o.length||o.some(l=>!r.expectedOutput||!Object.hasOwn(r.expectedOutput,l))?ke("State grading requires expected values for every compared field."):Ne(o.every(l=>Object.hasOwn(n.output,l)&&S(n.output[l])===S(r.expectedOutput[l])))}i(Vs,"evaluateDeterministicGrader");function Wy(e){if(e.kind==="file"){let{pathIncludes:t,...r}=e.config;return{kind:"artifact",config:{...r,...t===void 0?{}:{refIncludes:t}}}}return e.kind==="diff"||e.kind==="test"?{kind:"state",config:{operator:"output_field_equals",outputField:e.kind==="test"?"testsPassed":"diffAccepted",expectedValue:!0}}:{kind:e.kind,config:e.config}}i(Wy,"portableDeterministicCheck");function Ne(e,t){return{score:Number(e),passed:e,feedback:t??(e?"Deterministic grader passed.":"Deterministic grader failed.")}}i(Ne,"outcome");function ke(e){return{score:null,passed:!1,feedback:e}}i(ke,"unavailable");function ze(e){return typeof e=="string"?e:null}i(ze,"text");function wr(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim().length>0):[]}i(wr,"strings");function jl(e){return e.normalize("NFKC").trim().replace(/[,,]/g,"").replace(/[.\s]+$/g,"").replace(/\s+/g," ")}i(jl,"normalizeContent");function Xy(e){let t=[...e.matchAll(/\\boxed\{([^{}]+)\}/g)].at(-1)?.[1],r=e.match(/####\s*([^\n\r]+)/)?.[1],n=e.match(/(?:final\s+answer|answer)\s*(?::|is|=)\s*([^\n\r]+)/i)?.[1];return jl((t??r??n??e).normalize("NFKC").trim().replace(/^\$+|\$+$/g,"").replace(/^\\\(|\\\)$/g,""))}i(Xy,"normalizeFinalAnswer");var Yy=s.object({schemaVersion:s.literal("openpond.modelJudgeTransportPolicy.v1"),responseFormat:s.literal("judgment_json_schema"),reasoningEffort:s.enum(["off","low","medium","high","xhigh","max"]),maximumOutputTokens:s.number().int().positive().max(1e6)}).strict(),Zy=s.object({schemaVersion:s.literal("openpond.modelJudgeReceipt.v1"),providerId:s.string().trim().min(1).max(200),modelId:s.string().trim().min(1).max(500),modelRevision:s.string().trim().min(1).max(500).nullable(),responseId:s.string().trim().min(1).max(500).nullable(),requestHash:b,responseHash:b,inputTokens:s.number().int().nonnegative().nullable(),outputTokens:s.number().int().nonnegative().nullable(),costUsd:s.number().finite().nonnegative().nullable(),transportPolicy:Yy.optional(),effectiveRequestHash:b.optional(),finishReason:s.string().trim().min(1).max(200).nullable().optional(),reasoningTokens:s.number().int().nonnegative().nullable().optional()}).strict(),ql=s.object({schemaVersion:s.literal("openpond.graderEvidence.v1"),graderId:k,graderVersion:s.string().trim().min(1).max(100),status:s.enum(["scored","pending","unavailable","failed"]).optional(),score:s.number().min(0).max(1).nullable(),passed:s.boolean(),rewardEligible:s.boolean(),failureClass:Sn.nullable(),feedback:s.array(s.string().max(2e4)).max(1e3),visibleEvidenceRefs:s.array(k).max(1e4),privilegedEvidenceRefs:s.array(k).max(1e4),modelJudgeReceipt:Zy.optional()}).strict(),fn=ql.extend({contentHash:b}).strict();async function Ls(e){return e.evidence.infrastructureError?e.graders.map(t=>mt(t,{score:null,passed:!1,rewardEligible:!1,failureClass:"infrastructure_failure",feedback:[e.evidence.infrastructureError],visibleEvidenceRefs:[],privilegedEvidenceRefs:[]})):Promise.all(e.graders.map(async t=>{if(t.kind==="model_judge"){if(!e.modelJudge||t.calibrationStatus!=="passed"&&e.purpose!=="fixture_calibration")return mt(t,Ks("Model judge is unavailable or uncalibrated."));e.signal?.throwIfAborted();let r=await e.modelJudge({grader:t,task:e.task,evidence:e.evidence,evaluatorContext:e.evaluatorContext,signal:e.signal});return mt(t,{...r,rewardEligible:e.purpose==="fixture_calibration"?!1:r.rewardEligible})}return t.kind==="custom_verifier"?e.customVerifier?mt(t,await e.customVerifier({grader:t,task:e.task,evidence:e.evidence})):mt(t,Ks("Custom verifier is unavailable.")):t.kind==="human"?mt(t,{score:null,passed:!1,rewardEligible:!1,failureClass:null,status:"pending",feedback:["Human review is pending."],visibleEvidenceRefs:[],privilegedEvidenceRefs:[]}):mt(t,Qy(t,e.task,e.evidence))}))}i(Ls,"gradeEvidence");function Qy(e,t,r){let n=Vs({grader:e,task:t,evidence:r});return n.score===null?Ks(n.feedback):{score:n.score,passed:n.passed,rewardEligible:e.rewardEligible,failureClass:n.passed?null:"policy_failure",feedback:[n.feedback],visibleEvidenceRefs:[...r.runtimeEventRefs,...r.artifactRefs],privilegedEvidenceRefs:e.privileged?[t.privilegedContextRef].filter(a=>a!==null):[]}}i(Qy,"gradeDeterministic");function mt(e,t){let r=ql.parse({schemaVersion:"openpond.graderEvidence.v1",graderId:e.id,graderVersion:e.version,...t,rewardEligible:e.rewardEligible&&t.rewardEligible&&t.score!==null});return fn.parse({...r,contentHash:S(r)})}i(mt,"evidence");function Ks(e){return{score:null,passed:!1,rewardEligible:!1,failureClass:"grader_failure",feedback:[e],visibleEvidenceRefs:[],privilegedEvidenceRefs:[]}}i(Ks,"unavailable");var Fs=s.object({score:s.number().min(0).max(1).nullable(),passed:s.boolean(),rewardEligible:s.boolean(),failureClass:Sn.nullable(),gradingStatus:s.enum(["scored","pending","unscorable","not_configured"])}).strict();function Ol(e){if(new Set(e.graders.map(p=>p.id)).size!==e.graders.length||e.components.length!==e.graders.length)throw new Error("Grade population differs from its declared graders.");let r=new Map(e.components.map(p=>[p.graderId,p]));if(r.size!==e.components.length)throw new Error("Grade population contains duplicate graders.");let n=0,a=0,c=!1,o=!0,l=!1,d=!1,u=!1,f=!!e.infrastructureError;for(let p of e.graders){let h=r.get(p.id);if(!h||h.graderVersion!==p.version)throw new Error("Grade identity differs from its declared grader.");if(!Number.isFinite(p.weight)||p.weight<0||h.score!==null&&(!Number.isFinite(h.score)||h.score<0||h.score>1))throw new Error("Grade scores and weights must be finite and within their declared range.");f||=h.failureClass==="infrastructure_failure",u||=h.status==="pending",d||=h.status!=="pending"&&(h.score===null||h.failureClass!==null&&h.failureClass!=="policy_failure"),c||=p.hardGate&&!h.passed,o&&=h.passed,l||=p.rewardEligible&&h.rewardEligible,a+=p.weight,n+=(h.score??0)*p.weight}let m=f||d||u||a<=0?null:c?0:n/a;return o=m!==null&&!c&&o,Fs.parse({score:m,passed:o,rewardEligible:m!==null&&l,failureClass:f?"infrastructure_failure":u&&!d?null:m===null?"grader_failure":o?null:"policy_failure",gradingStatus:!e.graders.length&&!f?"not_configured":u&&!d&&!f?"pending":m===null?"unscorable":"scored"})}i(Ol,"aggregateGraderScores");var Al=Fs.extend({schemaVersion:s.literal("openpond.taskGrade.v1"),taskHash:b,evidenceHash:b,graderSetHash:b,components:s.array(fn).max(1e3),contentHash:b}).strict();async function Dw(e){let t=await Ls(e),r={schemaVersion:"openpond.taskGrade.v1",taskHash:S(e.task),evidenceHash:S(e.evidence),graderSetHash:S(e.graders),components:t,...Ol({graders:e.graders,components:t,infrastructureError:e.evidence.infrastructureError})};return Al.parse({...r,contentHash:S(r)})}i(Dw,"gradeTaskEvidence");function Mw(e,t){let r=Al.parse(e),{contentHash:n,...a}=r;if(n!==S(a)||r.taskHash!==S(t.task)||r.evidenceHash!==S(t.evidence)||r.graderSetHash!==S(t.graders))throw new Error("Task grade differs from its admitted task, evidence or graders.");for(let o of r.components){let{contentHash:l,...d}=o;if(l!==S(d))throw new Error("Grader evidence integrity failed.")}let c=Ol({graders:t.graders,components:r.components,infrastructureError:t.evidence.infrastructureError});if(S(Fs.parse({score:r.score,passed:r.passed,rewardEligible:r.rewardEligible,failureClass:r.failureClass,gradingStatus:r.gradingStatus}))!==S(c))throw new Error("Task grade summary differs from its grader evidence.");return r}i(Mw,"verifyTaskGrade");var pn={id:!0,version:!0,weight:!0,hardGate:!0,rewardEligible:!0,privileged:!0},hn=s.string().regex(/^[a-z][a-z0-9_]{0,79}$/);function Ww(e){return e.feedbackKey??`reward_${S(e.id).slice(0,24)}`}i(Ww,"feedbackKeyForReward");var ev=s.union([Ts.omit(pn),Ns.omit(pn),Hs.omit(pn),Cs.omit(pn),s.object({kind:s.literal("learned_model"),modelVersion:D,inputContract:Ie}).strict()]),Tl=s.object({schemaVersion:s.literal("openpond.rewardRelease.v1"),id:k,revision:s.number().int().positive(),name:s.string().trim().min(1).max(500),description:s.string().max(1e4),feedbackKey:hn.optional(),implementation:ev,rawScore:s.object({minimum:s.number().finite(),maximum:s.number().finite()}).strict(),assets:s.array(Ie).max(1e3),fixtureSetRef:Ie.optional(),calibrationCheckRef:D.extend({revision:s.number().int().positive()}).optional()}).strict().superRefine((e,t)=>{if(e.fixtureSetRef&&(e.fixtureSetRef.visibility!=="verifier"||!e.assets.some(r=>S(r)===S(e.fixtureSetRef)))&&t.addIssue({code:"custom",path:["fixtureSetRef"],message:"Reward fixtures must be included as a private verifier asset."}),e.rawScore.minimum>=e.rawScore.maximum&&t.addIssue({code:"custom",path:["rawScore"],message:"A raw score contract requires minimum < maximum."}),e.implementation.kind!=="learned_model"&&(e.rawScore.minimum!==0||e.rawScore.maximum!==1)&&t.addIssue({code:"custom",path:["rawScore"],message:"Portable graders currently return scores in [0, 1]."}),e.implementation.kind==="schema"){let r=Mt(e.implementation.config.jsonSchema);r.valid||t.addIssue({code:"custom",path:["implementation","config","jsonSchema"],message:r.issues[0].message})}}),Nl=Tl.safeExtend({contentHash:b}).strict(),gn=D.extend({revision:s.number().int().positive()}).strict(),tv=s.discriminatedUnion("kind",[s.object({kind:s.literal("identity")}).strict(),s.object({kind:s.literal("linear"),minimum:s.number().finite(),maximum:s.number().finite(),direction:s.enum(["higher","lower"])}).strict()]),rv=s.object({graderId:k,reward:gn,role:s.enum(["training","evaluation"]),normalization:tv,weight:s.number().nonnegative().max(1e3),required:s.boolean(),hardGate:s.boolean(),privileged:s.boolean(),fixtureRefs:s.array(D).max(1e3)}).strict(),Hl=s.object({schemaVersion:s.literal("openpond.rewardBinding.v1"),id:k,revision:s.number().int().positive(),name:s.string().trim().min(1).max(500).optional(),description:s.string().max(1e4).optional(),recipeRef:gn.optional(),sources:s.array(rv).max(100),aggregation:s.literal("weighted_mean"),unscorable:s.literal("exclude_optional_require_all_required")}).strict().superRefine((e,t)=>{new Set(e.sources.map(r=>r.graderId)).size!==e.sources.length&&t.addIssue({code:"custom",path:["sources"],message:"Bound grader identities must be unique."}),e.sources.length&&!e.sources.some(r=>r.weight>0)&&t.addIssue({code:"custom",path:["sources"],message:"A configured binding needs at least one positively weighted source."});for(let[r,n]of e.sources.entries())n.hardGate&&!n.required&&t.addIssue({code:"custom",path:["sources",r],message:"A hard gate must be required."}),n.normalization.kind==="linear"&&n.normalization.minimum>=n.normalization.maximum&&t.addIssue({code:"custom",path:["sources",r,"normalization"],message:"Linear normalization requires minimum < maximum."})}),Gs=Hl.safeExtend({contentHash:b}).strict(),Bs=s.object({graderId:k,reward:gn,role:s.enum(["training","evaluation"]),status:s.enum(["scored","pending","unavailable","failed"]),rawScore:s.number().finite().nullable(),normalizedScore:s.number().min(0).max(1).nullable(),passed:s.boolean().nullable(),evidenceHashes:s.array(b).max(1e3),graderEvidence:fn.optional(),message:s.string().max(2e4).nullable()}).strict(),Cl=s.object({schemaVersion:s.literal("openpond.rewardComposition.v1"),binding:gn,taskHash:b,outputHash:b,results:s.array(Bs).max(100),training:s.object({status:s.enum(["scored","pending","unscorable","not_configured"]),score:s.number().min(0).max(1).nullable(),passed:s.boolean().nullable()}).strict(),evaluation:s.object({status:s.enum(["scored","pending","unscorable","not_configured"]),score:s.number().min(0).max(1).nullable(),passed:s.boolean().nullable()}).strict()}).strict(),nv=Cl.extend({contentHash:b}).strict();function Xw(e){ve(e);let t=Tl.parse(e);return Nl.parse({...t,contentHash:S(t)})}i(Xw,"createRewardRelease");function Yw(e,t){let r=Hl.parse(e),n=Gs.parse({...r,contentHash:S(r)});return Js(n,t),n}i(Yw,"createRewardBinding");function Js(e,t){let r=Gs.parse(e);return Us(r),r.sources.map(n=>{let a=t.find(o=>o.id===n.reward.id&&o.revision===n.reward.revision&&o.contentHash===n.reward.contentHash);if(!a)throw new Y("reward_release_missing",422,n.graderId);let c=Nl.parse(a);if(Us(c),c.implementation.kind==="human"&&n.role==="training")throw new Y("human_reward_not_executable",422,n.graderId);if(n.normalization.kind==="identity"&&(c.rawScore.minimum<0||c.rawScore.maximum>1))throw new Y("reward_normalization_required",422,n.graderId);if(n.normalization.kind==="linear"&&(n.normalization.minimum!==c.rawScore.minimum||n.normalization.maximum!==c.rawScore.maximum))throw new Y("reward_normalization_contract_mismatch",422,n.graderId);return{source:n,reward:c}})}i(Js,"resolveBoundRewards");function Zw(e,t){return Js(e,t).map(({source:r,reward:n})=>{if(n.implementation.kind==="learned_model")throw new Y("learned_reward_requires_model_execution_adapter");return Dl(r,n)})}i(Zw,"compileBoundGraders");async function Qw(e){let t=Js(e.binding,e.rewards);if(e.purpose==="fixture_calibration"&&t.some(({source:n})=>n.role!=="evaluation"))throw new Y("reward_calibration_requires_evaluation_binding");let r=[];for(let{source:n,reward:a}of t){e.signal?.throwIfAborted();let c={graderId:n.graderId,reward:n.reward,role:n.role,status:"unavailable",rawScore:null,normalizedScore:null,passed:null,evidenceHashes:[],message:null};try{if(a.implementation.kind==="human")c.status="pending",c.message="Human review is pending.";else if(a.implementation.kind==="learned_model")if(!e.learnedReward)c.message="Learned reward execution is not configured.";else{let o=await e.learnedReward({reward:a,task:e.task,evidence:e.evidence,signal:e.signal});Object.assign(c,{status:"scored",...o})}else{let[o]=await Ls({task:e.task,evidence:e.evidence,evaluatorContext:e.evaluatorContext,graders:[Dl(n,a)],modelJudge:e.modelJudge,customVerifier:e.customVerifier,purpose:e.purpose,signal:e.signal});if(!o)throw new Y("reward_evidence_missing");Object.assign(c,{status:o.score===null?"unavailable":"scored",rawScore:o.score,passed:o.score===null?null:o.passed,evidenceHashes:[o.contentHash],graderEvidence:o,message:o.feedback.join(`
|
|
10
|
+
`)})}if(c.status==="scored"){if(c.rawScore===null||!Number.isFinite(c.rawScore)||c.rawScore<a.rawScore.minimum||c.rawScore>a.rawScore.maximum)throw new Y("reward_raw_score_outside_contract");let o=n.normalization;c.normalizedScore=o.kind==="identity"?c.rawScore:(c.rawScore-o.minimum)/(o.maximum-o.minimum),o.kind==="linear"&&o.direction==="lower"&&(c.normalizedScore=1-c.normalizedScore)}}catch(o){e.signal?.throwIfAborted(),Object.assign(c,{status:"failed",rawScore:null,normalizedScore:null,passed:null,message:o instanceof Error?o.message:"Reward execution failed."})}r.push(Bs.parse(c))}return av({binding:e.binding,taskHash:S(e.task),outputHash:S(e.evidence),results:r})}i(Qw,"executeRewardBinding");function av(e){let t=Gs.parse(e.binding);Us(t);let r=e.results.map(c=>Bs.parse(c));if(r.length!==t.sources.length||new Set(r.map(c=>c.graderId)).size!==r.length)throw new Y("reward_result_set_incomplete");for(let c of t.sources){let o=r.find(l=>l.graderId===c.graderId);if(!o||S(o.reward)!==S(c.reward)||o.role!==c.role)throw new Y("reward_result_binding_mismatch");if(o.graderEvidence){let{contentHash:l,...d}=o.graderEvidence;if(S(d)!==l||!o.evidenceHashes.includes(l)||d.graderId!==c.graderId||d.graderVersion!==String(c.reward.revision))throw new Y("reward_grader_evidence_mismatch");if(o.status==="scored"&&(d.score!==o.rawScore||d.passed!==o.passed))throw new Y("reward_grader_evidence_score_mismatch")}if(o.status==="scored"!=(o.rawScore!==null&&o.normalizedScore!==null&&o.passed!==null))throw new Y("reward_result_score_state_invalid");if(o.status!=="scored"&&(o.rawScore!==null||o.normalizedScore!==null||o.passed!==null))throw new Y("unscorable_reward_contains_score");if(o.status==="scored"){let l=c.normalization,d=l.kind==="identity"?o.rawScore:(o.rawScore-l.minimum)/(l.maximum-l.minimum),u=l.kind==="linear"&&l.direction==="lower"?1-d:d;if(Math.abs(u-o.normalizedScore)>1e-12)throw new Y("reward_normalization_mismatch")}}let n=Cl.parse({schemaVersion:"openpond.rewardComposition.v1",binding:{id:t.id,revision:t.revision,contentHash:t.contentHash},taskHash:e.taskHash,outputHash:e.outputHash,results:r,training:a("training"),evaluation:a("evaluation")});return nv.parse({...n,contentHash:S(n)});function a(c){let o=t.sources.filter(f=>f.role===c).map(f=>({source:f,result:r.find(m=>m.graderId===f.graderId)}));if(!o.length)return{status:"not_configured",score:null,passed:null};if(o.some(({source:f,result:m})=>f.required&&m.status!=="scored"&&m.status!=="pending"))return{status:"unscorable",score:null,passed:null};if(o.some(({source:f,result:m})=>f.required&&m.status==="pending"))return{status:"pending",score:null,passed:null};let l=o.filter(({result:f})=>f.status==="scored"),d=l.reduce((f,{source:m})=>f+m.weight,0);if(d===0)return{status:"unscorable",score:null,passed:null};let u=l.some(({source:f,result:m})=>f.hardGate&&!m.passed);return{status:"scored",score:u?0:l.reduce((f,{source:m,result:p})=>f+m.weight*p.normalizedScore,0)/d,passed:!u&&l.every(({result:f})=>f.passed)}}}i(av,"composeBoundRewards");function Us(e){if(ve(e),S(sv(e))!==e.contentHash)throw new Y("reward_content_hash_mismatch")}i(Us,"assertRewardHash");function sv(e){let{contentHash:t,...r}=e;return r}i(sv,"withoutRewardHash");function Dl(e,t){if(t.implementation.kind==="learned_model")throw new Y("learned_reward_requires_model_execution_adapter");return Ds.parse({...t.implementation,id:e.graderId,version:String(t.revision),weight:e.weight,hardGate:e.hardGate,rewardEligible:e.role==="training",privileged:e.privileged})}i(Dl,"compileSource");var Tt=s.object({harnessRelease:D,agentSnapshot:D,sourcePackageHash:b}).strict(),ov=64;function Ml(e){return[e.agentSnapshot.metadata,e.harnessRelease.metadata].some(t=>typeof t.profileRepositoryId=="string"||t.profile!==void 0&&t.profile!==null)}i(Ml,"harnessExperimentSourceRequiresProfile");var zl=new Set(["harness_inspect","skill_inspect","profile_skill_read","context_read"]);function iv(e){if(Ml(e))throw new Error("This source is bound to a Profile; select Model + Harness + Profile.");return Vl(e)}i(iv,"standaloneHarnessExperimentTools");function Vl(e){let t=e.agentSnapshot.capabilityRequirements.find(n=>n.required);if(t)throw new Error(`Standalone Harness capability requires an admitted case environment: ${t.id}.`);let r=new Map;for(let n of[...e.agentSnapshot.toolDeclarations,...e.harnessRelease.tools]){if(!zl.has(n.name)||n.sideEffect!=="read")throw new Error(`Standalone Harness tool requires an admitted case environment: ${n.name}.`);if(S(n.inputSchema)!==n.inputSchemaHash)throw new Error(`Standalone Harness tool schema differs from its declaration: ${n.name}.`);let a=r.get(n.name);if(a&&S(a)!==S(n))throw new Error(`Standalone Harness has conflicting tool declarations: ${n.name}.`);r.set(n.name,n)}return[...r.values()]}i(Vl,"harnessExperimentReadToolDeclarations");var Ws=s.string().trim().min(1).max(200),Kl=s.object({sessionId:Ws,turnId:Ws,source:Tt,admissionHash:b,modelConfigurationHash:b,traceHash:b,runtimeEventRefs:s.array(Ws).max(1e4),startedAt:X,completedAt:X,outputHash:b,partialOutputAvailable:s.boolean()}).strict().superRefine((e,t)=>{new Set(e.runtimeEventRefs).size!==e.runtimeEventRefs.length&&t.addIssue({code:"custom",path:["runtimeEventRefs"],message:"Native event references must be unique."}),Date.parse(e.completedAt)<Date.parse(e.startedAt)&&t.addIssue({code:"custom",path:["completedAt"],message:"Native completion precedes its start."})}),Xs=s.object({schemaVersion:s.literal("openpond.nativeHarnessExperimentAttempt.v1"),taskId:s.string().min(1).max(500),status:s.enum(["completed","cancelled","timed_out","policy_failure"]),output:s.string().max(8388608).nullable(),error:s.string().max(2e3).nullable(),messages:s.array(s.unknown()).max(4002),collected:s.boolean(),environmentCleanupComplete:s.literal(!0),snapshot:s.null(),native:Kl}).strict().superRefine((e,t)=>{let r=e.status==="completed";(r!==e.collected||r!==(e.output!==null)||r!==(e.error===null))&&t.addIssue({code:"custom",message:"Native status, output, collection and error must agree."}),r&&(e.native.partialOutputAvailable||e.native.outputHash!==S(e.output))&&t.addIssue({code:"custom",path:["native","outputHash"],message:"Native output differs from its retained evidence."})}),Ys=Xs.extend({contentHash:b}).strict();function cv(e){ve(e,16777216);let t=Xs.parse(e);return Ys.parse({...t,contentHash:S(t)})}i(cv,"createNativeHarnessExperimentAttempt");function lv(e,t){ve(e,16777216);let r=Ys.parse(e),{contentHash:n,...a}=r;if(S(a)!==n||r.taskId!==t.taskId||S(r.native.source)!==S(Tt.parse(t.source))||r.native.admissionHash!==t.admissionHash||r.native.modelConfigurationHash!==t.modelConfigurationHash||r.native.traceHash!==t.traceHash)throw new Error("Native Harness attempt differs from its admitted case or retained trace.");return r}i(lv,"verifyNativeHarnessExperimentAttempt");var Ll=s.number().finite().nonnegative(),uv=s.discriminatedUnion("kind",[s.object({kind:s.literal("model"),modelId:k,configurationHash:b}).strict(),s.object({kind:s.literal("harness"),source:zs,model:s.object({modelId:k,configurationHash:b}).strict()}).strict(),s.object({kind:s.literal("agent"),source:Tt,model:s.object({modelId:k,configurationHash:b}).strict()}).strict(),s.object({kind:s.literal("fixture"),configurationHash:b}).strict()]),Fl=s.object({release:D.extend({revision:s.union([s.number().int().positive(),s.string().trim().min(1).max(200)])}).strict(),feedbackKey:hn,configurationHash:b.optional(),output:s.enum(["boolean","score","category"]),categories:s.array(s.string().trim().min(1).max(500)).max(100)}).strict().superRefine((e,t)=>{e.output==="category"!=e.categories.length>0&&t.addIssue({code:"custom",path:["categories"],message:"Only category feedback declares categories."}),new Set(e.categories).size!==e.categories.length&&t.addIssue({code:"custom",path:["categories"],message:"Feedback categories must be unique."})}),Zs=s.object({caseId:k,seed:s.string().trim().min(1).max(500),fixtureId:k.nullable()}).strict();function $r(e){let t=Zs.parse(e);return JSON.stringify([t.caseId,t.seed,t.fixtureId])}i($r,"experimentCaseKey");function dv(e,t,r){return`human-projection-${S({originalManifest:e,selectionHash:t,rulesHash:r}).slice(0,48)}`}i(dv,"humanProjectionViewId");var Ul=s.object({schemaVersion:s.literal("openpond.experimentManifest.v1"),id:k,name:s.string().trim().min(1).max(500),teamId:k,operationId:k,maximumCostUsd:Ll.nullable(),dataset:D.extend({revision:s.number().int().positive()}).strict(),target:uv,execution:s.object({packageHash:b,runtimeTargetHash:b,metricPolicyHash:b,compatibility:s.object({protocol:s.literal("openpond.evaluation-execution.v1"),targetKind:s.enum(["model","agent","harness","fixture"])}).strict().optional()}).strict().optional(),lineage:s.object({definition:D.extend({revision:s.number().int().positive()}).strict().nullable(),execution:D,scoringPassId:k.nullable(),humanProjection:s.object({originalManifest:D,selectionHash:b,rulesHash:b}).strict().optional()}).strict().optional(),evaluators:s.array(Fl).max(100),population:s.array(Zs).min(1).max(1e4),createdAt:X}).strict().superRefine((e,t)=>{if(e.execution?.compatibility&&e.execution.compatibility.targetKind!==e.target.kind&&t.addIssue({code:"custom",path:["execution","compatibility"],message:"Execution compatibility differs from its admitted target kind."}),e.lineage){let r=e.lineage.scoringPassId??e.lineage.execution.id,n=e.lineage.humanProjection;n?(n.originalManifest.id!==r||n.originalManifest.id.startsWith("human-projection-")||e.id!==dv(n.originalManifest,n.selectionHash,n.rulesHash))&&t.addIssue({code:"custom",path:["lineage","humanProjection"],message:"Human view must bind its original execution or scoring pass and deterministic selection identity."}):e.id!==r&&t.addIssue({code:"custom",path:["lineage"],message:"Experiment identity must match its execution or independent scoring pass."})}new Set(e.population.map($r)).size!==e.population.length&&t.addIssue({code:"custom",path:["population"],message:"Experiment cases must be unique."}),new Set(e.evaluators.map(r=>r.feedbackKey)).size!==e.evaluators.length&&t.addIssue({code:"custom",path:["evaluators"],message:"Experiment feedback keys must be unique."})}),Qs=Ul.extend({contentHash:b}).strict(),mv=s.object({feedbackKey:hn,evaluator:Fl.shape.release,status:s.enum(["scored","unavailable","failed","pending"]),value:s.union([s.boolean(),s.number().finite(),s.string().max(500)]).nullable(),passed:s.boolean().nullable().optional(),reasoning:s.string().max(2e4).nullable(),evidenceRefs:s.array($n).max(1e3)}).strict(),fv=s.object({inputTokens:s.number().int().nonnegative().nullable(),outputTokens:s.number().int().nonnegative().nullable(),totalTokens:s.number().int().nonnegative().nullable(),costUsd:Ll.nullable(),latencyMs:s.number().finite().nonnegative().nullable()}).strict().superRefine((e,t)=>{e.inputTokens!==null&&e.outputTokens!==null&&e.totalTokens!==null&&e.totalTokens<e.inputTokens+e.outputTokens&&t.addIssue({code:"custom",path:["totalTokens"],message:"Total tokens cannot be less than input plus output."})}),pv=s.object({identity:Zs,status:s.enum(["completed","failed","cancelled","unavailable"]),output:s.unknown().nullable(),error:s.object({code:k,message:s.string().max(2e3)}).strict().nullable(),feedback:s.array(mv).max(100),usage:fv,traceRef:$n.nullable(),startedAt:X.nullable(),completedAt:X.nullable()}).strict(),Gl=s.object({schemaVersion:s.literal("openpond.experimentResult.v1"),manifest:D,status:s.enum(["completed","failed","cancelled"]),cases:s.array(pv).min(1).max(1e4),completedAt:X}).strict(),Bl=Gl.extend({contentHash:b}).strict();function y$(e){let t=Ul.parse(e);return Qs.parse({...t,contentHash:S(t)})}i(y$,"createExperimentManifest");function hv(e,t){Qs.parse(t),ht(t,"Experiment manifest");let r=Gl.parse(e);if(r.manifest.id!==t.id||r.manifest.contentHash!==t.contentHash)throw new Error("Experiment result differs from its manifest.");let n=new Set(t.population.map($r)),a=new Set,c=new Map(t.evaluators.map(o=>[o.feedbackKey,o]));for(let o of r.cases){let l=$r(o.identity);if(!n.has(l)||a.has(l))throw new Error("Experiment result has an unexpected or repeated case.");a.add(l);let d=new Set;for(let u of o.feedback){let f=c.get(u.feedbackKey);if(!f||d.has(u.feedbackKey)||u.evaluator.id!==f.release.id||u.evaluator.contentHash!==f.release.contentHash||u.evaluator.revision!==f.release.revision)throw new Error("Experiment feedback differs from its pinned evaluator.");if(d.add(u.feedbackKey),u.status==="scored"){if(u.value===null||typeof u.value!=={boolean:"boolean",score:"number",category:"string"}[f.output]||f.output==="category"&&!f.categories.includes(u.value)||f.output==="score"&&(u.value<0||u.value>1))throw new Error("Experiment feedback value violates its output contract.")}else if(u.value!==null||u.passed!==null&&u.passed!==void 0)throw new Error("Unscored experiment feedback cannot claim a value or pass decision.")}}if(a.size!==n.size)throw new Error("Experiment result omits admitted cases.");return Bl.parse({...r,contentHash:S(r)})}i(hv,"createExperimentResult");function gv(e){let t=Qs.parse(e.manifest),r=Bl.parse(e.result),{contentHash:n,...a}=r;if(S(a)!==n)throw new Error("Experiment result integrity failed.");return hv(a,t),{manifest:t,result:r}}i(gv,"verifyExperimentEvidence");function v$(e,t){for(let m of[e,t])gv(m);let r=[];e.manifest.teamId!==t.manifest.teamId&&r.push("different_workspace"),(e.manifest.dataset.id!==t.manifest.dataset.id||e.manifest.dataset.contentHash!==t.manifest.dataset.contentHash||e.manifest.dataset.revision!==t.manifest.dataset.revision)&&r.push("different_dataset_version"),e.manifest.target.kind!==t.manifest.target.kind&&r.push("different_target_kind");let n=i(m=>{let p=m.execution;if(!p?.compatibility)return p??null;let{runtimeTargetHash:h,...g}=p;return g},"executionContract");if(S(n(e.manifest))!==S(n(t.manifest))&&r.push("different_execution_contract"),e.manifest.target.kind==="harness"&&t.manifest.target.kind==="harness"){let m=e.manifest.target.source,p=t.manifest.target.source;(m.profileId!==p.profileId||S(m.target)!==S(p.target))&&r.push("different_component");let h=e.manifest.execution?.compatibility&&t.manifest.execution?.compatibility&&e.manifest.execution.packageHash===t.manifest.execution.packageHash;m.environmentHash!==p.environmentHash&&!h&&r.push("different_environment"),(m.definitionId!==p.definitionId||m.definitionHash!==p.definitionHash)&&r.push("different_evaluation_definition")}let a=i(m=>[...m.evaluators].sort((p,h)=>p.feedbackKey.localeCompare(h.feedbackKey)),"orderedEvaluators");S(a(e.manifest))!==S(a(t.manifest))&&r.push("different_evaluators");let c=new Map(e.result.cases.map(m=>[$r(m.identity),m])),o=new Map(t.result.cases.map(m=>[$r(m.identity),m])),l=[...new Set([...c.keys(),...o.keys()])].sort();(c.size!==o.size||l.some(m=>!c.has(m)||!o.has(m)))&&r.push("different_population");let d=r.length===0,u=l.map(m=>{let p=c.get(m)??null,h=o.get(m)??null,g=new Map(p?.feedback.map(v=>[v.feedbackKey,v])??[]),y=new Map(h?.feedback.map(v=>[v.feedbackKey,v])??[]);return{identity:(p??h).identity,baseline:p,candidate:h,feedback:e.manifest.evaluators.map(v=>{let $=g.get(v.feedbackKey),I=y.get(v.feedbackKey),E=d?!p||!h?"missing_case":p.status!=="completed"||h.status!=="completed"||p.error||h.error?"case_not_completed":!$||!I||$.status!=="scored"||I.status!=="scored"?"feedback_unavailable":v.output==="category"?"categorical_feedback":null:"incompatible_experiments",O=i(ce=>typeof ce?.value=="boolean"?Number(ce.value):typeof ce?.value=="number"?ce.value:null,"numeric"),x=E?null:O($),W=E?null:O(I),ie=i(ce=>E?null:typeof ce?.value=="boolean"?ce.value:ce?.passed??null,"pass");return{feedbackKey:v.feedbackKey,eligible:E===null,reason:E,baseline:x,candidate:W,delta:x===null||W===null?null:W-x,baselinePassed:ie($),candidatePassed:ie(I)}})}}),f=e.manifest.evaluators.map((m,p)=>{let h=u.map(O=>O.feedback[p]).filter(O=>O.eligible),g=i(O=>h.length?h.reduce((x,W)=>x+W[O],0)/h.length:null,"mean"),y=g("baseline"),v=g("candidate"),$=i(O=>h.length&&h.every(x=>x[O]!==null)?h.reduce((x,W)=>x+Number(W[O]),0)/h.length:null,"passRate"),I=$("baselinePassed"),E=$("candidatePassed");return{feedbackKey:m.feedbackKey,eligibleCount:h.length,excludedCount:u.length-h.length,baseline:y,candidate:v,delta:y===null||v===null?null:v-y,baselinePassRate:I,candidatePassRate:E,passRateDelta:I===null||E===null?null:E-I}});return{comparable:d,reasons:r,cases:u,metrics:f}}i(v$,"compareExperiments");export{uu as a,mu as b,fu as c,pu as d,bv as e,ao as f,_v as g,Y as h,In as i,go as j,yo as k,ve as l,Mt as m,qs as n,Vs as o,Wy as p,Yy as q,Zy as r,ql as s,fn as t,Ls as u,Ol as v,Al as w,Dw as x,Mw as y,xn as z,gu as A,yu as B,Rv as C,_u as D,En as E,uo as F,mo as G,fo as H,T_ as I,N_ as J,H_ as K,fe as L,dn as M,As as N,br as O,un as P,gy as Q,yy as R,L_ as S,F_ as T,vy as U,U_ as V,by as W,_y as X,wy as Y,Sy as Z,ky as _,Ry as $,Iy as aa,jy as ba,B_ as ca,J_ as da,_r as ea,qy as fa,Oy as ga,Ay as ha,Ts as ia,Ns as ja,Ty as ka,Hs as la,Cs as ma,Ds as na,Ny as oa,kl as pa,Hy as qa,Cy as ra,tw as sa,Dy as ta,rw as ua,hn as va,Ww as wa,ev as xa,Tl as ya,Nl as za,gn as Aa,tv as Ba,rv as Ca,Hl as Da,Gs as Ea,Bs as Fa,Cl as Ga,nv as Ha,Xw as Ia,Yw as Ja,Js as Ka,Zw as La,Qw as Ma,av as Na,Us as Oa,so as Pa,At as Qa,Ky as Ra,El as Sa,Ms as Ta,Rl as Ua,fw as Va,pw as Wa,Uy as Xa,Gy as Ya,Il as Za,zs as _a,By as $a,Sw as ab,kw as bb,Jy as cb,Tt as db,ov as eb,Ml as fb,zl as gb,iv as hb,Vl as ib,Kl as jb,Xs as kb,Ys as lb,cv as mb,lv as nb,uv as ob,Fl as pb,Zs as qb,$r as rb,dv as sb,Ul as tb,Qs as ub,mv as vb,fv as wb,pv as xb,Gl as yb,Bl as zb,y$ as Ab,hv as Bb,gv as Cb,v$ as Db};
|