decocms 3.3.0 → 3.3.2
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/client/assets/{AlertCircle-CQVrG_vJ.js → AlertCircle-f1EMyhcF.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-RSgKJAKz.js → ArrowUpRight-DDOS_CqL.js} +1 -1
- package/dist/client/assets/{Check-_9fGuqcU.js → Check-CtI-OH3k.js} +1 -1
- package/dist/client/assets/{CheckCircle-BrIielg3.js → CheckCircle-Dk0E48Vj.js} +1 -1
- package/dist/client/assets/{ChevronDown-D8ki1YTV.js → ChevronDown-BL2fNdeZ.js} +1 -1
- package/dist/client/assets/{ChevronLeft-Bn25DZii.js → ChevronLeft-ItYaMHNU.js} +1 -1
- package/dist/client/assets/{ChevronRight-sANym5JO.js → ChevronRight-TMlXoq-Z.js} +1 -1
- package/dist/client/assets/{ChevronUp-DWIsv9KU.js → ChevronUp-O10NbvHe.js} +1 -1
- package/dist/client/assets/{Container-I8CLKgQT.js → Container-B1sUXs1U.js} +1 -1
- package/dist/client/assets/{DotsVertical-UEiFsiMu.js → DotsVertical-DNPNHBpl.js} +1 -1
- package/dist/client/assets/{Eye-MExi_r3W.js → Eye-DWIY-6KS.js} +1 -1
- package/dist/client/assets/{FilterLines-4rC1xrIb.js → FilterLines-CWRo79Yt.js} +1 -1
- package/dist/client/assets/{Globe01-Dv5kpprP.js → Globe01-Cjaw-3jR.js} +1 -1
- package/dist/client/assets/{HardDrive-D9IQyxX5.js → HardDrive-Ddx5WtDi.js} +1 -1
- package/dist/client/assets/{Key01-CjH_GA8o.js → Key01-ChvR9ujt.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bh2jIX62.js → LinkExternal01-Bo28LxVY.js} +1 -1
- package/dist/client/assets/{Monitor01-A1_9QQaN.js → Monitor01-Cx9Nl0mU.js} +1 -1
- package/dist/client/assets/{Palette-BKIsz_ok.js → Palette-DkgVQjRz.js} +1 -1
- package/dist/client/assets/{Play-m26DvF8I.js → Play-VGEgQ-36.js} +1 -1
- package/dist/client/assets/{Plus-zYQzJd1M.js → Plus-DXVOsj8b.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-D0f_Eh8k.js → RefreshCcw01-CxP3kNii.js} +1 -1
- package/dist/client/assets/{SearchMd-DeMPnpHH.js → SearchMd-B9xeWi0e.js} +1 -1
- package/dist/client/assets/{Settings02-TwTRrSvQ.js → Settings02-DYlioLKt.js} +1 -1
- package/dist/client/assets/{Shield01-CohVSmIO.js → Shield01-CLHpjaQL.js} +1 -1
- package/dist/client/assets/{Star01-DxtsQeOL.js → Star01-BT882_xb.js} +1 -1
- package/dist/client/assets/{Stars01-oKRH_HZK.js → Stars01-DDxsFd_C.js} +1 -1
- package/dist/client/assets/{Stars02-CFg4uA06.js → Stars02-lM9wDOP9.js} +1 -1
- package/dist/client/assets/{Sun-prsTZZ-c.js → Sun-CNIfXy2-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DtrvJRJv.js → SwitchHorizontal01-Den03c4j.js} +1 -1
- package/dist/client/assets/{Tool01-Blh-dWzw.js → Tool01-D7SzxWeU.js} +1 -1
- package/dist/client/assets/{Trash01-BtO3xPfa.js → Trash01-C2MDqKmR.js} +1 -1
- package/dist/client/assets/{Upload01-DuGEhzNC.js → Upload01-BTsf5tML.js} +1 -1
- package/dist/client/assets/{User01-Cbs3uEng.js → User01-B1vfX-f8.js} +1 -1
- package/dist/client/assets/{Users01-D1iLhJqh.js → Users01-dpqTHJ7Y.js} +1 -1
- package/dist/client/assets/{Users03-BpVRJS2k.js → Users03-e9b5gRLu.js} +1 -1
- package/dist/client/assets/{X-C7X3rsvo.js → X-DvNDI9Zw.js} +1 -1
- package/dist/client/assets/{XCircle-28kRMNtc.js → XCircle-DBS00WN3.js} +1 -1
- package/dist/client/assets/{XClose-C-93XSA0.js → XClose-BdAeKt9F.js} +1 -1
- package/dist/client/assets/{Zap-Dv5TVml0.js → Zap-aFVcxgaa.js} +1 -1
- package/dist/client/assets/{ZapSquare-C0D82h8r.js → ZapSquare-CC0ClMfp.js} +1 -1
- package/dist/client/assets/{ZoomOut-DsFvQG0e.js → ZoomOut-Bj5jamAx.js} +1 -1
- package/dist/client/assets/{access-gate-baJeia1A.js → access-gate-B8AAPT1T.js} +1 -1
- package/dist/client/assets/{accordion-CBzWT5bz.js → accordion-BFQ7Yu8X.js} +1 -1
- package/dist/client/assets/{add-section-modal-BWU52XJT.js → add-section-modal-BmCzDi10.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DcmXZCtP.js → agent-capabilities-BE7hHGoA.js} +1 -1
- package/dist/client/assets/{agent-icon-DqIYS1ir.js → agent-icon-D4vfmbIE.js} +1 -1
- package/dist/client/assets/{agent-icons-DZENi63W.js → agent-icons-UJTit2wi.js} +1 -1
- package/dist/client/assets/{agents-list-DafoPLUH.js → agents-list-LpRFwfeM.js} +1 -1
- package/dist/client/assets/{ai-providers-BdnACxNs.js → ai-providers-BqYvRcM4.js} +1 -1
- package/dist/client/assets/{alert-DQ3f-8ft.js → alert-DkX6LwPv.js} +1 -1
- package/dist/client/assets/{alert-dialog-DFtcSlfd.js → alert-dialog-DKXzP7Bt.js} +1 -1
- package/dist/client/assets/app-editor-CIaq7eCO.js +1 -0
- package/dist/client/assets/{auth-catchall-CDPdAyEO.js → auth-catchall-CmwVLqj-.js} +1 -1
- package/dist/client/assets/{auth-split-layout-RuDPAksj.js → auth-split-layout-COIVkHnQ.js} +1 -1
- package/dist/client/assets/{automation-list-row-CCCDTeX2.js → automation-list-row-c065EJtO.js} +1 -1
- package/dist/client/assets/{automation-runs-CWg3SAkQ.js → automation-runs-CPH-3xtw.js} +1 -1
- package/dist/client/assets/{automations-CUUdoVDT.js → automations-jHIRR-Gp.js} +1 -1
- package/dist/client/assets/{avatar-Ht4phHyw.js → avatar-ETg7Q-GU.js} +1 -1
- package/dist/client/assets/{badge-793iqcSm.js → badge-C8j1DE3m.js} +1 -1
- package/dist/client/assets/{brand-context-CKrOzy_j.js → brand-context-pJc99xfz.js} +1 -1
- package/dist/client/assets/{buckets-Cuou8oZr.js → buckets-CD20kw5y.js} +1 -1
- package/dist/client/assets/{calendar-BcwgSBqk.js → calendar-CLbDOOHw.js} +1 -1
- package/dist/client/assets/{capability-load-error-C5U_XP-e.js → capability-load-error-DVzMymKs.js} +1 -1
- package/dist/client/assets/{card-Bp1tvcjx.js → card-lOxFSSkP.js} +1 -1
- package/dist/client/assets/{chat-context-2VONJLj0.js → chat-context-Bnval_3z.js} +1 -1
- package/dist/client/assets/{checkbox-DjyXVlr3.js → checkbox-DWa4G7u9.js} +1 -1
- package/dist/client/assets/{cli-auth-success-WSYP5g8Z.js → cli-auth-success-BGZNVK0p.js} +1 -1
- package/dist/client/assets/{collection-detail-d9ogG-zy.js → collection-detail-BQV4fFQi.js} +1 -1
- package/dist/client/assets/{collection-display-button-DnHMSi9n.js → collection-display-button-NMk2O1lx.js} +1 -1
- package/dist/client/assets/{collection-search-7VpMRm-O.js → collection-search-BPGQygd8.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dupw7cC8.js → collection-table-wrapper-BXPnPT96.js} +1 -1
- package/dist/client/assets/{collection-tabs-FGkin6ZU.js → collection-tabs-C_qWo2-y.js} +1 -1
- package/dist/client/assets/{collections-q49v565i.js → collections-NKJwWp8f.js} +1 -1
- package/dist/client/assets/{command-HR08HRGs.js → command-B3U7wd2O.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DlfiZAax.js → connect-desktop-dialog-CqBwflr-.js} +1 -1
- package/dist/client/assets/{connection-card-BcO2lPF3.js → connection-card-DG_N0P2G.js} +1 -1
- package/dist/client/assets/{connection-detail-B5bRn-XD.js → connection-detail-BxZdoV6Y.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bh0i7TML.js → connection-form-helpers-D79c5tFA.js} +1 -1
- package/dist/client/assets/{connections-m2A2Bnzk.js → connections-BKRkcjPX.js} +1 -1
- package/dist/client/assets/{constants-DcPOVd9N.js → constants-Oykg5_q9.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-C7otyoNt.js → decopilot-sse-pool-02ukeQqS.js} +1 -1
- package/dist/client/assets/{dialog-BTuyAnJD.js → dialog-DCjJZndp.js} +1 -1
- package/dist/client/assets/{domain-settings-44sFM9Gz.js → domain-settings-Jn9iDH8k.js} +1 -1
- package/dist/client/assets/{drawer-NfOOjKiq.js → drawer-BTJhbpa8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Ci4-mVLy.js → dropdown-menu-BnsK64En.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CyE7k6GQ.js → dynamic-plugin-layout-DI1tAQQN.js} +1 -1
- package/dist/client/assets/{empty-state-CeClTvy4.js → empty-state-C-NWO5ph.js} +1 -1
- package/dist/client/assets/{empty-state-DtzOtYNQ.js → empty-state-CKyi-9Wl.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CnlTupOc.js → extract-connection-data-AirIeyvr.js} +1 -1
- package/dist/client/assets/{features-CK9ndiq8.js → features-CCh1HKhB.js} +1 -1
- package/dist/client/assets/{file-explorer-BJRVDBLN.js → file-explorer-BQmgDEDi.js} +1 -1
- package/dist/client/assets/{file-type-icon-Dj99fHuB.js → file-type-icon-DM9XMqae.js} +1 -1
- package/dist/client/assets/{files-CMweUrQp.js → files-BuO1w5Lh.js} +1 -1
- package/dist/client/assets/{form-BBZRauXH.js → form-DMPH0FOJ.js} +1 -1
- package/dist/client/assets/{general-BmyzjAV8.js → general-BorJGZAV.js} +1 -1
- package/dist/client/assets/{generate-id-D_UH3sxI.js → generate-id-i1xx8q5L.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CWWi7O1C.js → github-repo-picker-CTcBo2fn.js} +1 -1
- package/dist/client/assets/{header-tab-button-jijhwXxy.js → header-tab-button-CJMFloVi.js} +1 -1
- package/dist/client/assets/{hover-card-CV9VXkH7.js → hover-card-CxtN1xCB.js} +1 -1
- package/dist/client/assets/{image-field-Crbqbizw.js → image-field-HoCNk-1B.js} +1 -1
- package/dist/client/assets/{index-CpOkTB99.js → index-BNc5J02Q.js} +1 -1
- package/dist/client/assets/{index-Dpo5EC2L.js → index-Bja6OpPs.js} +3 -3
- package/dist/client/assets/{index-BRntdJGH.js → index-C6M-_40T.js} +1 -1
- package/dist/client/assets/{index-c6-XkL5H.js → index-C7oVr4Gj.js} +1 -1
- package/dist/client/assets/{index-sKMKGB16.js → index-CALXjj7d.js} +1 -1
- package/dist/client/assets/{index-Bp1M4ln7.js → index-CB2ubqvZ.js} +1 -1
- package/dist/client/assets/{index-Dwsjb3YT.js → index-CTo6iOJE.js} +1 -1
- package/dist/client/assets/{index-B-uccEBH.js → index-DRkA4nnL.js} +1 -1
- package/dist/client/assets/{index-BQLIK8jZ.js → index-DUzjuDnX.js} +1 -1
- package/dist/client/assets/{index-DjxxQl8A.js → index-DtSBWsbe.js} +1 -1
- package/dist/client/assets/{index-DVzdQ0e0.js → index-N_rB2zyq.js} +1 -1
- package/dist/client/assets/{index-C5ZyXQHr.js → index-lU9yS_Jh.js} +1 -1
- package/dist/client/assets/{index-redirect-Ey8lx3Da.js → index-redirect-Bh1l7WCU.js} +1 -1
- package/dist/client/assets/{index-DlJh9T8T.js → index-tZSWGe84.js} +1 -1
- package/dist/client/assets/{index-DJ3cGaJ6.js → index-t_7wQBv1.js} +4 -4
- package/dist/client/assets/{index-DHRRSUmw.js → index-xAwaYY9z.js} +15 -15
- package/dist/client/assets/{infiniteQueryObserver-Ykg8iLnd.js → infiniteQueryObserver-DFB-ygfX.js} +1 -1
- package/dist/client/assets/{input-DdFNzbfV.js → input-D9gxUyjr.js} +1 -1
- package/dist/client/assets/{integration-icon-DZLuTxs6.js → integration-icon-BffTGZN4.js} +1 -1
- package/dist/client/assets/{label-e4yRWBjb.js → label-BL0BsZ1B.js} +1 -1
- package/dist/client/assets/{layout-D67abH6w.js → layout-CfSS4bsq.js} +1 -1
- package/dist/client/assets/{login-By3dhxoa.js → login-BuZSwsso.js} +1 -1
- package/dist/client/assets/{members-D2YkNBZt.js → members-D7WrKG_A.js} +1 -1
- package/dist/client/assets/{monaco-editor-0uL_TQZd.js → monaco-editor-DtMcxLSi.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-GIY4z6nm.js → monitoring-stats-row-fp6agr8k.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D4kRRNKX.js → oauth-callback-ai-provider-CkKiZhn4.js} +1 -1
- package/dist/client/assets/{oauth-callback-DfXh9mNP.js → oauth-callback-d6LUyXrn.js} +1 -1
- package/dist/client/assets/{onboarding-DQobqsv0.js → onboarding-DfbOcrIX.js} +1 -1
- package/dist/client/assets/{org-install-CiC9K4Ph.js → org-install-CFDYPwCg.js} +1 -1
- package/dist/client/assets/{org-layout-jmM6ngno.js → org-layout-WeQp4B6-.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-CHHdNNaK.js → org-plugin-layout-CtY6eOb7.js} +1 -1
- package/dist/client/assets/{page-seo-form-C-Kp4kFq.js → page-seo-form-BAg1yciU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CG4OfDmr.js +1 -0
- package/dist/client/assets/{pair-DywksGK8.js → pair-CCKXkNYO.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CyOhDphY.js → plugin-empty-state-9CxATRN3.js} +1 -1
- package/dist/client/assets/{plugin-header-hE0fGQHf.js → plugin-header-7GRdizIh.js} +1 -1
- package/dist/client/assets/{plugin-layout-DavzLUS9.js → plugin-layout-CJOy-tZB.js} +1 -1
- package/dist/client/assets/{popover-C68whzsY.js → popover-OiarPewu.js} +1 -1
- package/dist/client/assets/{post-editor-BPISWxsB.js → post-editor-BQ_9KZ48.js} +1 -1
- package/dist/client/assets/{primitives-BqT_BizM.js → primitives-pd_yvF0S.js} +1 -1
- package/dist/client/assets/{profile-BN88mKeH.js → profile-BQDabc6t.js} +1 -1
- package/dist/client/assets/project-app-view-B6xEMwDB.js +1 -0
- package/dist/client/assets/record-editor-DeENCgCd.js +1 -0
- package/dist/client/assets/registry-C8DHcJ9B.js +2 -0
- package/dist/client/assets/{registry-layout-DnclO53f.js → registry-layout-D6FuqVAe.js} +1 -1
- package/dist/client/assets/{require-capability-BSwqUQcE.js → require-capability-DVkbMmft.js} +1 -1
- package/dist/client/assets/{required-auth-layout-2LAJNWxM.js → required-auth-layout-CRGKVRTF.js} +1 -1
- package/dist/client/assets/{reset-password-DivAvSnW.js → reset-password-DsVXpYD9.js} +1 -1
- package/dist/client/assets/{resizable-0Wn5JpiT.js → resizable-a1gJgrB1.js} +1 -1
- package/dist/client/assets/{roles-C16A7h0o.js → roles-CX312B39.js} +1 -1
- package/dist/client/assets/{save-status-Ba2w8UKP.js → save-status-DRXktsXS.js} +1 -1
- package/dist/client/assets/{schema-form-Ca7i7qHP.js → schema-form-DvpyibqS.js} +1 -1
- package/dist/client/assets/{scroll-area-JdApnymr.js → scroll-area-Ds73tc0J.js} +1 -1
- package/dist/client/assets/{search-input-BAlo7hPY.js → search-input-BNN911DE.js} +1 -1
- package/dist/client/assets/{secrets-QyqqDJ7A.js → secrets-BeeL9rnH.js} +1 -1
- package/dist/client/assets/{sections-editor-BkVG_0Sr.js → sections-editor-6P4Yegkk.js} +1 -1
- package/dist/client/assets/{select-BcoiasFF.js → select-fwtyEN3G.js} +1 -1
- package/dist/client/assets/{select-model-bFQD_87Y.js → select-model-D7RFa4up.js} +1 -1
- package/dist/client/assets/{seo-editor-D1uGcych.js → seo-editor-CsFpa8ZP.js} +1 -1
- package/dist/client/assets/{settings-layout-YokPajU7.js → settings-layout-DwCpTLea.js} +1 -1
- package/dist/client/assets/{settings-section-C-qvClXS.js → settings-section-T0fDyncu.js} +1 -1
- package/dist/client/assets/{sheet-BtJYdh0l.js → sheet-IM6_8Cdx.js} +1 -1
- package/dist/client/assets/{shell-controls-D7CASrif.js → shell-controls-VlzjU05Z.js} +1 -1
- package/dist/client/assets/{shell-layout-0P_-b-nq.js → shell-layout-I9tl7R9J.js} +1 -1
- package/dist/client/assets/{shell-route-loading-DHB1qvk5.js → shell-route-loading-CdGn4Kpm.js} +1 -1
- package/dist/client/assets/{sidebar-DA2nzz_x.js → sidebar-CAkfGpdS.js} +1 -1
- package/dist/client/assets/{skeleton-CpdmEGkq.js → skeleton-CM-Pi0cm.js} +1 -1
- package/dist/client/assets/{sortable.esm-X7KYMyOP.js → sortable.esm-KFDeRhD3.js} +1 -1
- package/dist/client/assets/{spinner-D1gJYDcd.js → spinner-D4UjUyLz.js} +1 -1
- package/dist/client/assets/{sso-BbX9axOk.js → sso-B5mHZmOT.js} +1 -1
- package/dist/client/assets/{store-BcoC_jAQ.js → store-DVYNpmdS.js} +1 -1
- package/dist/client/assets/store-registry-DRdcwU2X.js +2 -0
- package/dist/client/assets/{switch-NrMSEE-I.js → switch-DB7mlnDa.js} +1 -1
- package/dist/client/assets/{tab-id-Bd9aEZGd.js → tab-id-BFVzx5fb.js} +1 -1
- package/dist/client/assets/{table-HsedM5wi.js → table-Cd_YQk4M.js} +1 -1
- package/dist/client/assets/{tabs-CF-_gZ_h.js → tabs-Dsmq9_wP.js} +1 -1
- package/dist/client/assets/{task-status-DwULjc9j.js → task-status-C990ALOP.js} +1 -1
- package/dist/client/assets/{textarea-Dlde-1OC.js → textarea-DGZy_omr.js} +1 -1
- package/dist/client/assets/{toggle-group-CaJEsTJW.js → toggle-group-BkLJ1frl.js} +1 -1
- package/dist/client/assets/{toolbar-1jwB3OBh.js → toolbar-Bnt0c2J3.js} +1 -1
- package/dist/client/assets/{tools-list-bR0GQjtD.js → tools-list-Dpd5zOg1.js} +1 -1
- package/dist/client/assets/{tooltip-CnTONKZv.js → tooltip-BvIsFjJR.js} +1 -1
- package/dist/client/assets/{types-Cy_Ngnr7.js → types-Dn1K45P2.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Dc4GEqMk.js → use-ai-providers-BQwBnNI3.js} +1 -1
- package/dist/client/assets/{use-automations-wbB32tlZ.js → use-automations-BEPg-aek.js} +1 -1
- package/dist/client/assets/{use-capability-BgKTO1vN.js → use-capability-rrurYBXm.js} +1 -1
- package/dist/client/assets/{use-collections-C6vSjty8.js → use-collections-e25i0NM-.js} +1 -1
- package/dist/client/assets/{use-connection-DHFQC4eq.js → use-connection-BQxCYR_o.js} +1 -1
- package/dist/client/assets/{use-copy-zJQ-7Mci.js → use-copy-BKbXbMuY.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DXgKXXwR.js → use-create-virtual-mcp-trxCQUHO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CegS5org.js → use-debounced-autosave-Oryp4cAP.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Crgi2dup.js → use-delete-connection-DEEK0oTT.js} +1 -1
- package/dist/client/assets/{use-file-configs-BGEpvSvj.js → use-file-configs-Qrd6eZyZ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-rNa7__7x.js → use-infinite-scroll-DcQNoJ7_.js} +1 -1
- package/dist/client/assets/{use-list-state-DTqrRKHV.js → use-list-state-BoOb09L9.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B_UVPJoG.js → use-mcp-prompts-D9JZQ88U.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DO4I7PYX.js → use-mcp-tools-DkcEQK3V.js} +1 -1
- package/dist/client/assets/{use-members-WKgQqTSP.js → use-members-DERsL77r.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-k6jWIqgZ.js → use-navigate-to-agent-sJoZ-Wbv.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DY5JwLAM.js → use-org-auth-client-CF8P1btO.js} +1 -1
- package/dist/client/assets/{use-org-sso-C5ckgDRh.js → use-org-sso-D2JNbrnR.js} +1 -1
- package/dist/client/assets/{use-organization-roles-KNrmN_Ah.js → use-organization-roles-Ca1byRHM.js} +1 -1
- package/dist/client/assets/{use-organization-settings-pl01D-rl.js → use-organization-settings-CVmm-jyI.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Drhpxg0Z.js → use-registry-connections-B6OVBI_G.js} +1 -1
- package/dist/client/assets/{use-secrets-NYjq8Fmy.js → use-secrets-_k7d1I4Z.js} +1 -1
- package/dist/client/assets/{use-status-sounds-lg6Y6CRj.js → use-status-sounds-gVglgYnC.js} +1 -1
- package/dist/client/assets/{use-view-mode-DzNy4Hyk.js → use-view-mode-DdD0TD2N.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CJt6reVB.js → use-virtual-mcp-BNfSbQBW.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bj3r3xlf.js +1 -0
- package/dist/client/assets/{useRouterState-D3ymnfxm.js → useRouterState-CI4Wmw4H.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BbAiO9h1.js +1 -0
- package/dist/client/assets/{user-Cg4afsI8.js → user-ChT4iOGQ.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-COafKFpZ.js → view-mode-toggle-DCljG_Km.js} +1 -1
- package/dist/client/assets/{workflow-B4FJSGuD.js → workflow-BbaQXvps.js} +1 -1
- package/dist/client/assets/workflow-detail-CU9YTyf_.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +510 -464
- package/dist/server/migrate.js +108 -108
- package/dist/server/server.js +291 -291
- package/package.json +1 -1
- package/dist/client/assets/app-editor-BD2ZoSqj.js +0 -1
- package/dist/client/assets/page-seo-sheet-voFjiS6Q.js +0 -1
- package/dist/client/assets/project-app-view-BcSwLB1G.js +0 -1
- package/dist/client/assets/record-editor-ts0XVKWT.js +0 -1
- package/dist/client/assets/registry-DNnKhVDs.js +0 -2
- package/dist/client/assets/store-registry-CVC0Fzo_.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BQyXdojd.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DZbKMeAX.js +0 -1
- package/dist/client/assets/workflow-detail-DhzF6uRf.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dL as Fe,bO as Os,U as oe,T as ge,aJ as ti,ck as _i,aG as Ie,bM as mt,bi as qe,aH as mr,dM as rn,R as _e,dN as Ii,dO as ws,dP as ec,ci as tc,dQ as ia,dR as nc,dS as rc,dT as ic,c$ as fn,d0 as Cr,d1 as xs,ca as sa,c2 as sc,b6 as ze,cj as oc,aI as On,bv as Ti,dU as ac,r as N,j as w,dV as oa,cO as lc}from"./index-Dpo5EC2L.js";import{d as cc,e as uc,n as fc,f as dc,C as hc,A as pc}from"./constants-DcPOVd9N.js";import{B as Ci,c as Pi}from"./collections-q49v565i.js";import{R as Es}from"./index-BRntdJGH.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Tc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Cc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Cn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Cn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Cn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Cn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Cn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Cn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Tc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Cc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Te,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Te),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Te)===this.CLOSED)return;he(this,Te,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Te)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Te,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Te)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Te)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Te,this.CLOSED),he(this,ct,void 0))}}Te=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Te,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Te)!==this.CLOSED&&he(this,Te,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Te)===this.CLOSED)return;he(this,Te,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Cr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Cr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Cr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Ts=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Cs=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Ts(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Ts(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Cs(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Cs(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
|
|
1
|
+
import{dL as Fe,bO as Os,U as oe,T as ge,aJ as ti,ck as _i,aG as _e,bM as mt,bi as qe,aH as mr,dM as rn,R as Ae,dN as Ii,dO as ws,dP as nc,ci as rc,dQ as oa,dR as ic,dS as sc,dT as oc,c$ as fn,d0 as Cr,d1 as xs,ca as aa,c2 as ac,b6 as ze,cj as lc,aI as On,bv as Ti,dU as cc,r as N,j as w,dV as la,cO as uc}from"./index-Bja6OpPs.js";import{d as fc,e as dc,n as hc,f as pc,C as mc,A as yc}from"./constants-Oykg5_q9.js";import{B as Ci,c as Pi}from"./collections-NKJwWp8f.js";import{R as Es}from"./index-C6M-_40T.js";var gc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},bc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},Sc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},vc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=oc();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Oc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},wc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},xc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Ec=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},Ac=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},_c=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ic=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},Tc=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Cc=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Pc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=_e(Fe()))}},Fc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||_e(Fe())).min(n.minItems))}},jc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||_e(Fe())).max(n.maxItems))}},$c=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||_e(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=_e(r);if(e.array&&e.array instanceof nc){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||_e(Fe()):e.array=_e(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||_e(Fe()):n.prefixItems&&(e.array=e.array||_e(Fe()))}},Dc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},Nc=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||Ae({}).passthrough())}},Rc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=Ae({}).passthrough())}},Mc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||Ae({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Uc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||Ae({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Cn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Cn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Cn(e[i],t[i]))}return!1}function kc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Cn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Lc=class{apply(e,t){if(!t.not)return e;const n=Ie(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},Bc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(kc(),{message:"Array items must be unique"})}},Wc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ie(r)).reduce((r,i)=>oa(r,i),e)}},qc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ie(t.anyOf[0]):mt([Ie(t.anyOf[0]),Ie(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ie(r))]);return oa(e,n)}},Vc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ie(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},Hc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ie(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Kc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof ic||e instanceof sc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ie(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?Ae(r):Ae(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ie(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Gc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Cn(r,i)),{message:"Value must match one of the enum values"})}},zc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Cn(r,n),{message:"Value must equal the const value"})}},Yc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},Jc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Zc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Xc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Qc=[new bc,new Sc,new gc,new vc,new Oc,new Pc,new Rc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new Tc,new Cc,new Dc,new Fc,new jc,new $c,new Mc,new Uc,new Nc],eu=[new Jc,new Gc,new zc,new Wc,new qc,new Vc,new Hc,new Kc,new Zc,new Lc,new Bc,new Xc,new Yc];function Ie(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Qc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||_e(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=rc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of eu)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function tu(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var ca=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||ca("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?ca("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Te,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Te),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Te)===this.CLOSED)return;he(this,Te,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Te)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,nu()));else throw new Error("Invalid URL")}catch{throw tu("An invalid or illegal string was specified")}he(this,Lt,fc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Te,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Te)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Te)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Te,this.CLOSED),he(this,ct,void 0))}}Te=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Te,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Te)!==this.CLOSED&&he(this,Te,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Te)===this.CLOSED)return;he(this,Te,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function nu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class ru extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class iu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=dc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Cr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=hc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new ru(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=aa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Cr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Cr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const su="mcp";class ou{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,su),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=aa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class au extends pc{constructor(t,n){super(t,n)}send(t,n){const r=lu(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function lu(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class cu extends mc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},ac,n)}}const uu=async(e,t,n)=>{const r=fu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new cu({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},fu=(e,t,n)=>{if(e.type==="Websocket")return new ou(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new iu(new URL(e.url),s)}return new au(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Ts=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Cs=new Map,Ps=e=>{const t=JSON.stringify(e),n=Cs.get(t);if(n!==void 0)return n;const r=Ie(e);return Cs.set(t,r),r},Fs=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ps(e.inputSchema):void 0,outputSchema:e.outputSchema?Ps(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function du(e){const t=n=>"connection"in e?uu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Ts(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Ts(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Fs(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Fs(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>hu({connection:n}):global[t]}});function hu(e){return du(e)}const pu=Ae({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),mu=Ae({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
|
|
2
2
|
The stepInput is the resolved value of the references in the input field. Example:
|
|
3
3
|
{
|
|
4
4
|
"input": {
|
|
@@ -7,7 +7,7 @@ import{dL as Fe,bO as Os,U as oe,T as ge,aJ as ti,ck as _i,aG as Ie,bM as mt,bi
|
|
|
7
7
|
},
|
|
8
8
|
"code": "export default function(stepInput): Output { return { result: \`\${stepInput.name} is \${stepInput.age} years old.\` } }"
|
|
9
9
|
}
|
|
10
|
-
`)});
|
|
10
|
+
`)});Ae({signalName:oe().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const yu=mt([pu.describe("Call an external tool via MCP connection. "),mu.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),gu=Ae({ref:oe().describe("@ref to resolve and evaluate, e.g. '@validate.shouldStop' or '@input.skipProcessing'"),eq:ze().optional().describe("Step bails if resolved value equals this"),neq:ze().optional().describe("Step bails if resolved value does NOT equal this"),gt:ge().optional().describe("Step bails if resolved value is greater than this"),lt:ge().optional().describe("Step bails if resolved value is less than this")}),bu=Ae({maxAttempts:ge().int().min(1).max(10).optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:ge().int().min(100).max(6e4).optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:ge().int().min(100).max(864e5).optional().describe("Max execution time in ms before step fails (default: 30000). Upper bound 24h."),onError:mr(["fail","continue"]).optional().describe("What to do when this step fails: 'fail' aborts the workflow, 'continue' skips the error and proceeds")}),ji=lc(()=>Ae({type:oe().optional(),properties:On(oe(),ze()).optional(),required:_e(oe()).optional(),description:oe().optional(),additionalProperties:mt([ti(),On(oe(),ze())]).optional(),additionalItems:mt([ti(),On(oe(),ze())]).optional(),items:ji.optional()}).passthrough()),js=["input","item","index","ctx"],Su=Ae({name:oe().min(1).refine(e=>!js.includes(e),{message:`Step name is reserved. Reserved names: ${js.join(", ")}`}).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:oe().optional().describe("What this step does"),action:yu,input:On(oe(),ze()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context), @ctx.execution_id (current execution ID). Example: { 'userId': '@input.user_id', 'data': '@fetch.result', 'executionId': '@ctx.execution_id' }"),outputSchema:ji.optional().describe("Optional JSON Schema describing the expected output of the step."),config:bu.optional().describe("Retry and timeout settings"),forEach:Ae({ref:oe().describe("@ ref to the step to iterate over"),concurrency:ge().optional().default(1).describe("max parallel iterations. default is 1 (sequential)")}).optional(),bail:mt([qe(!0),gu]).optional().describe("Early return: if true, the workflow exits with this step's output on successful completion. If a condition object, the workflow exits only when the condition is met. Bail is ignored on step error.")}),vu=mr(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),ua=Ci.extend({virtual_mcp_id:oe().describe("ID of the virtual MCP (agent) that will be used to execute the workflow"),status:vu.describe("Current status of the workflow execution"),input:On(oe(),ze()).optional().describe("Input data for the workflow execution"),output:ze().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:ge().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:ge().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:ge().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:ge().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:ze().nullish().describe("Error that occurred during the workflow execution"),completed_steps:Ae({success:_e(Ae({name:oe(),completed_at_epoch_ms:ge()})).describe("Names of the steps that were completed successfully"),error:_e(oe()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status"),running_steps:_e(oe()).optional().describe("Names of the steps that are currently running")}),Ou=mr(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);Ci.extend({execution_id:oe(),type:Ou,name:oe().nullish(),payload:ze().optional(),visible_at:ge().nullish(),consumed_at:ge().nullish(),source_execution_id:oe().nullish()});const wu=Ci.extend({description:oe().optional().describe("Human-readable summary of what this workflow does"),input_schema:ji.optional().describe("Optional JSON Schema describing the expected input for this workflow."),steps:_e(Su).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")});Pi("workflow",wu);const xu={maxAttempts:1,timeoutMs:3e4},iv={name:"Initial Step",action:{code:`
|
|
11
11
|
interface Input {
|
|
12
12
|
example: string;
|
|
13
13
|
}
|
|
@@ -20,29 +20,29 @@ import{dL as Fe,bO as Os,U as oe,T as ge,aJ as ti,ck as _i,aG as Ie,bM as mt,bi
|
|
|
20
20
|
return {
|
|
21
21
|
result: stepInput.example
|
|
22
22
|
}
|
|
23
|
-
}`},config:Ou,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}};Pi("workflow_execution",la);Pi("workflow_execution",la);function W(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function wu(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),W(e.additionalItems)}function Fs(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const ft="__additional_property",Vt="additionalProperties",yt="allOf",Y="anyOf",je="const",yr="default",$i="dependencies",xu="enum",Ee="__errors",le="$id",Di="if",Jt="items",Eu="_$junk_option_schema_id$_",tr="$name",B="oneOf",ui="patternProperties",Q="properties",Pr="readonly",ca="required",fr="submitButtonOptions",ae="$ref",En="__rjsf_ref",gn="$schema",ua="root",fa="_",Au=["discriminator","propertyName"],js="formContext",_u="layoutGridLookupMap",Ni="__rjsf_additionalProperties",da="__rjsf_rootSchema",Iu="ui:field",Ri="ui:widget",dt="ui:options",fi="ui:globalOptions",Tu="ui:definitions",Cu="https://json-schema.org/draft/2019-09/schema",nr="https://json-schema.org/draft/2020-12/schema";function M(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===Ri&&W(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===dt&&W(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t}):{...t}}function Pu(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=M(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var ha=typeof global=="object"&&global&&global.Object===Object&&global,Fu=typeof self=="object"&&self&&self.Object===Object&&self,Ze=ha||Fu||Function("return this")(),$e=Ze.Symbol,pa=Object.prototype,ju=pa.hasOwnProperty,$u=pa.toString,dn=$e?$e.toStringTag:void 0;function Du(e){var t=ju.call(e,dn),n=e[dn];try{e[dn]=void 0;var r=!0}catch{}var i=$u.call(e);return r&&(t?e[dn]=n:delete e[dn]),i}var Nu=Object.prototype,Ru=Nu.toString;function Mu(e){return Ru.call(e)}var Uu="[object Null]",ku="[object Undefined]",$s=$e?$e.toStringTag:void 0;function tt(e){return e==null?e===void 0?ku:Uu:$s&&$s in Object(e)?Du(e):Mu(e)}function ma(e,t){return function(n){return e(t(n))}}var gr=ma(Object.getPrototypeOf,Object);function De(e){return e!=null&&typeof e=="object"}var Lu="[object Object]",Bu=Function.prototype,Wu=Object.prototype,ya=Bu.toString,qu=Wu.hasOwnProperty,Vu=ya.call(Object);function gt(e){if(!De(e)||tt(e)!=Lu)return!1;var t=gr(e);if(t===null)return!0;var n=qu.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ya.call(n)==Vu}function di(e){const t={[Ee]:[],addError(n){this[Ee].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:di(r)}),t);if(gt(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:di(n[i])}),t)}return t}function Hu(){this.__data__=[],this.size=0}function Un(e,t){return e===t||e!==e&&t!==t}function br(e,t){for(var n=e.length;n--;)if(Un(e[n][0],t))return n;return-1}var Ku=Array.prototype,Gu=Ku.splice;function zu(e){var t=this.__data__,n=br(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Gu.call(t,n,1),--this.size,!0}function Yu(e){var t=this.__data__,n=br(t,e);return n<0?void 0:t[n][1]}function Ju(e){return br(this.__data__,e)>-1}function Zu(e,t){var n=this.__data__,r=br(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nt.prototype.clear=Hu;nt.prototype.delete=zu;nt.prototype.get=Yu;nt.prototype.has=Ju;nt.prototype.set=Zu;function Xu(){this.__data__=new nt,this.size=0}function Qu(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ef(e){return this.__data__.get(e)}function tf(e){return this.__data__.has(e)}function Z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nf="[object AsyncFunction]",rf="[object Function]",sf="[object GeneratorFunction]",of="[object Proxy]";function kn(e){if(!Z(e))return!1;var t=tt(e);return t==rf||t==sf||t==nf||t==of}var Fr=Ze["__core-js_shared__"],Ds=(function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function af(e){return!!Ds&&Ds in e}var lf=Function.prototype,cf=lf.toString;function Ft(e){if(e!=null){try{return cf.call(e)}catch{}try{return e+""}catch{}}return""}var uf=/[\\^$.*+?()[\]{}|]/g,ff=/^\[object .+?Constructor\]$/,df=Function.prototype,hf=Object.prototype,pf=df.toString,mf=hf.hasOwnProperty,yf=RegExp("^"+pf.call(mf).replace(uf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gf(e){if(!Z(e)||af(e))return!1;var t=kn(e)?yf:ff;return t.test(Ft(e))}function bf(e,t){return e?.[t]}function jt(e,t){var n=bf(e,t);return gf(n)?n:void 0}var Pn=jt(Ze,"Map"),Fn=jt(Object,"create");function Sf(){this.__data__=Fn?Fn(null):{},this.size=0}function vf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Of="__lodash_hash_undefined__",wf=Object.prototype,xf=wf.hasOwnProperty;function Ef(e){var t=this.__data__;if(Fn){var n=t[e];return n===Of?void 0:n}return xf.call(t,e)?t[e]:void 0}var Af=Object.prototype,_f=Af.hasOwnProperty;function If(e){var t=this.__data__;return Fn?t[e]!==void 0:_f.call(t,e)}var Tf="__lodash_hash_undefined__";function Cf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Fn&&t===void 0?Tf:t,this}function It(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}It.prototype.clear=Sf;It.prototype.delete=vf;It.prototype.get=Ef;It.prototype.has=If;It.prototype.set=Cf;function Pf(){this.size=0,this.__data__={hash:new It,map:new(Pn||nt),string:new It}}function Ff(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Sr(e,t){var n=e.__data__;return Ff(t)?n[typeof t=="string"?"string":"hash"]:n.map}function jf(e){var t=Sr(this,e).delete(e);return this.size-=t?1:0,t}function $f(e){return Sr(this,e).get(e)}function Df(e){return Sr(this,e).has(e)}function Nf(e,t){var n=Sr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rt.prototype.clear=Pf;rt.prototype.delete=jf;rt.prototype.get=$f;rt.prototype.has=Df;rt.prototype.set=Nf;var Rf=200;function Mf(e,t){var n=this.__data__;if(n instanceof nt){var r=n.__data__;if(!Pn||r.length<Rf-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rt(r)}return n.set(e,t),this.size=n.size,this}function Ue(e){var t=this.__data__=new nt(e);this.size=t.size}Ue.prototype.clear=Xu;Ue.prototype.delete=Qu;Ue.prototype.get=ef;Ue.prototype.has=tf;Ue.prototype.set=Mf;var Uf="__lodash_hash_undefined__";function kf(e){return this.__data__.set(e,Uf),this}function Lf(e){return this.__data__.has(e)}function Tt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new rt;++t<n;)this.add(e[t])}Tt.prototype.add=Tt.prototype.push=kf;Tt.prototype.has=Lf;function Bf(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function jn(e,t){return e.has(t)}var Wf=1,qf=2;function ga(e,t,n,r,i,s){var o=n&Wf,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var f=-1,h=!0,m=n&qf?new Tt:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var d=e[f],p=t[f];if(r)var y=o?r(p,d,f,t,e,s):r(d,p,f,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(m){if(!Bf(t,function(S,O){if(!jn(m,O)&&(d===S||i(d,S,n,r,s)))return m.push(O)})){h=!1;break}}else if(!(d===p||i(d,p,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var dr=Ze.Uint8Array;function Vf(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Mi(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Hf=1,Kf=2,Gf="[object Boolean]",zf="[object Date]",Yf="[object Error]",Jf="[object Map]",Zf="[object Number]",Xf="[object RegExp]",Qf="[object Set]",ed="[object String]",td="[object Symbol]",nd="[object ArrayBuffer]",rd="[object DataView]",Ns=$e?$e.prototype:void 0,jr=Ns?Ns.valueOf:void 0;function id(e,t,n,r,i,s,o){switch(n){case rd:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case nd:return!(e.byteLength!=t.byteLength||!s(new dr(e),new dr(t)));case Gf:case zf:case Zf:return Un(+e,+t);case Yf:return e.name==t.name&&e.message==t.message;case Xf:case ed:return e==t+"";case Jf:var a=Vf;case Qf:var l=r&Hf;if(a||(a=Mi),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=Kf,o.set(e,t);var u=ga(a(e),a(t),r,i,s,o);return o.delete(e),u;case td:if(jr)return jr.call(e)==jr.call(t)}return!1}function Ui(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ve=Array.isArray;function ba(e,t,n){var r=t(e);return ve(e)?r:Ui(r,n(e))}function sd(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Sa(){return[]}var od=Object.prototype,ad=od.propertyIsEnumerable,Rs=Object.getOwnPropertySymbols,ki=Rs?function(e){return e==null?[]:(e=Object(e),sd(Rs(e),function(t){return ad.call(e,t)}))}:Sa;function va(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ld="[object Arguments]";function Ms(e){return De(e)&&tt(e)==ld}var Oa=Object.prototype,cd=Oa.hasOwnProperty,ud=Oa.propertyIsEnumerable,Zt=Ms((function(){return arguments})())?Ms:function(e){return De(e)&&cd.call(e,"callee")&&!ud.call(e,"callee")};function fd(){return!1}var wa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Us=wa&&typeof module=="object"&&module&&!module.nodeType&&module,dd=Us&&Us.exports===wa,ks=dd?Ze.Buffer:void 0,hd=ks?ks.isBuffer:void 0,Ct=hd||fd,pd=9007199254740991,md=/^(?:0|[1-9]\d*)$/;function vr(e,t){var n=typeof e;return t=t??pd,!!t&&(n=="number"||n!="symbol"&&md.test(e))&&e>-1&&e%1==0&&e<t}var yd=9007199254740991;function Li(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yd}var gd="[object Arguments]",bd="[object Array]",Sd="[object Boolean]",vd="[object Date]",Od="[object Error]",wd="[object Function]",xd="[object Map]",Ed="[object Number]",Ad="[object Object]",_d="[object RegExp]",Id="[object Set]",Td="[object String]",Cd="[object WeakMap]",Pd="[object ArrayBuffer]",Fd="[object DataView]",jd="[object Float32Array]",$d="[object Float64Array]",Dd="[object Int8Array]",Nd="[object Int16Array]",Rd="[object Int32Array]",Md="[object Uint8Array]",Ud="[object Uint8ClampedArray]",kd="[object Uint16Array]",Ld="[object Uint32Array]",de={};de[jd]=de[$d]=de[Dd]=de[Nd]=de[Rd]=de[Md]=de[Ud]=de[kd]=de[Ld]=!0;de[gd]=de[bd]=de[Pd]=de[Sd]=de[Fd]=de[vd]=de[Od]=de[wd]=de[xd]=de[Ed]=de[Ad]=de[_d]=de[Id]=de[Td]=de[Cd]=!1;function Bd(e){return De(e)&&Li(e.length)&&!!de[tt(e)]}function Bi(e){return function(t){return e(t)}}var xa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,An=xa&&typeof module=="object"&&module&&!module.nodeType&&module,Wd=An&&An.exports===xa,$r=Wd&&ha.process,Xt=(function(){try{var e=An&&An.require&&An.require("util").types;return e||$r&&$r.binding&&$r.binding("util")}catch{}})(),Ls=Xt&&Xt.isTypedArray,Ln=Ls?Bi(Ls):Bd,qd=Object.prototype,Vd=qd.hasOwnProperty;function Ea(e,t){var n=ve(e),r=!n&&Zt(e),i=!n&&!r&&Ct(e),s=!n&&!r&&!i&&Ln(e),o=n||r||i||s,a=o?va(e.length,String):[],l=a.length;for(var c in e)(t||Vd.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vr(c,l)))&&a.push(c);return a}var Hd=Object.prototype;function Or(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Hd;return e===n}var Kd=ma(Object.keys,Object),Gd=Object.prototype,zd=Gd.hasOwnProperty;function Aa(e){if(!Or(e))return Kd(e);var t=[];for(var n in Object(e))zd.call(e,n)&&n!="constructor"&&t.push(n);return t}function $t(e){return e!=null&&Li(e.length)&&!kn(e)}function Me(e){return $t(e)?Ea(e):Aa(e)}function hi(e){return ba(e,Me,ki)}var Yd=1,Jd=Object.prototype,Zd=Jd.hasOwnProperty;function Xd(e,t,n,r,i,s){var o=n&Yd,a=hi(e),l=a.length,c=hi(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var h=a[f];if(!(o?h in t:Zd.call(t,h)))return!1}var m=s.get(e),d=s.get(t);if(m&&d)return m==t&&d==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=o;++f<l;){h=a[f];var S=e[h],O=t[h];if(r)var E=o?r(O,S,h,t,e,s):r(S,O,h,e,t,s);if(!(E===void 0?S===O||i(S,O,n,r,s):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var b=e.constructor,g=t.constructor;b!=g&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof g=="function"&&g instanceof g)&&(p=!1)}return s.delete(e),s.delete(t),p}var pi=jt(Ze,"DataView"),mi=jt(Ze,"Promise"),zt=jt(Ze,"Set"),yi=jt(Ze,"WeakMap"),Bs="[object Map]",Qd="[object Object]",Ws="[object Promise]",qs="[object Set]",Vs="[object WeakMap]",Hs="[object DataView]",eh=Ft(pi),th=Ft(Pn),nh=Ft(mi),rh=Ft(zt),ih=Ft(yi),Pe=tt;(pi&&Pe(new pi(new ArrayBuffer(1)))!=Hs||Pn&&Pe(new Pn)!=Bs||mi&&Pe(mi.resolve())!=Ws||zt&&Pe(new zt)!=qs||yi&&Pe(new yi)!=Vs)&&(Pe=function(e){var t=tt(e),n=t==Qd?e.constructor:void 0,r=n?Ft(n):"";if(r)switch(r){case eh:return Hs;case th:return Bs;case nh:return Ws;case rh:return qs;case ih:return Vs}return t});var sh=1,Ks="[object Arguments]",Gs="[object Array]",Yn="[object Object]",oh=Object.prototype,zs=oh.hasOwnProperty;function ah(e,t,n,r,i,s){var o=ve(e),a=ve(t),l=o?Gs:Pe(e),c=a?Gs:Pe(t);l=l==Ks?Yn:l,c=c==Ks?Yn:c;var u=l==Yn,f=c==Yn,h=l==c;if(h&&Ct(e)){if(!Ct(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new Ue),o||Ln(e)?ga(e,t,n,r,i,s):id(e,t,l,n,r,i,s);if(!(n&sh)){var m=u&&zs.call(e,"__wrapped__"),d=f&&zs.call(t,"__wrapped__");if(m||d){var p=m?e.value():e,y=d?t.value():t;return s||(s=new Ue),i(p,y,n,r,s)}}return h?(s||(s=new Ue),Xd(e,t,n,r,i,s)):!1}function Bn(e,t,n,r,i){return e===t?!0:e==null||t==null||!De(e)&&!De(t)?e!==e&&t!==t:ah(e,t,n,r,Bn,i)}function lh(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Bn(e,t,void 0,n):!!r}function fe(e,t){return lh(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}var ch="[object Symbol]";function Wn(e){return typeof e=="symbol"||De(e)&&tt(e)==ch}var uh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fh=/^\w*$/;function Wi(e,t){if(ve(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Wn(e)?!0:fh.test(e)||!uh.test(e)||t!=null&&e in Object(t)}var dh="Expected a function";function qi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dh);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(qi.Cache||rt),n}qi.Cache=rt;var hh=500;function ph(e){var t=qi(e,function(r){return n.size===hh&&n.clear(),r}),n=t.cache;return t}var mh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yh=/\\(\\)?/g,_a=ph(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(mh,function(n,r,i,s){t.push(i?s.replace(yh,"$1"):r||n)}),t});function sn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ys=$e?$e.prototype:void 0,Js=Ys?Ys.toString:void 0;function Ia(e){if(typeof e=="string")return e;if(ve(e))return sn(e,Ia)+"";if(Wn(e))return Js?Js.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Vi(e){return e==null?"":Ia(e)}function on(e,t){return ve(e)?e:Wi(e,t)?[e]:_a(Vi(e))}function bt(e){if(typeof e=="string"||Wn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wr(e,t){t=on(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[bt(t[n++])];return n&&n==r?e:void 0}function F(e,t,n){var r=e==null?void 0:wr(e,t);return r===void 0?n:r}var gh=Object.prototype,bh=gh.hasOwnProperty;function Sh(e,t){return e!=null&&bh.call(e,t)}function Ta(e,t,n){t=on(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=bt(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Li(i)&&vr(o,i)&&(ve(e)||Zt(e)))}function z(e,t){return e!=null&&Ta(e,t,Sh)}function $n(e,t){return Bn(e,t)}var hr=(function(){try{var e=jt(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Hi(e,t,n){t=="__proto__"&&hr?hr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var vh=Object.prototype,Oh=vh.hasOwnProperty;function Ki(e,t,n){var r=e[t];(!(Oh.call(e,t)&&Un(r,n))||n===void 0&&!(t in e))&&Hi(e,t,n)}function Gi(e,t,n,r){if(!Z(e))return e;t=on(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var l=bt(t[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=o){var u=a[l];c=r?r(u,l,a):void 0,c===void 0&&(c=Z(u)?u:vr(t[i+1])?[]:{})}Ki(a,l,c),a=a[l]}return e}function se(e,t,n){return e==null?e:Gi(e,t,n)}function xr(e){return e}function Ca(e){return typeof e=="function"?e:xr}var wh=/\s/;function xh(e){for(var t=e.length;t--&&wh.test(e.charAt(t)););return t}var Eh=/^\s+/;function Ah(e){return e&&e.slice(0,xh(e)+1).replace(Eh,"")}var Zs=NaN,_h=/^[-+]0x[0-9a-f]+$/i,Ih=/^0b[01]+$/i,Th=/^0o[0-7]+$/i,Ch=parseInt;function Ph(e){if(typeof e=="number")return e;if(Wn(e))return Zs;if(Z(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Z(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ah(e);var n=Ih.test(e);return n||Th.test(e)?Ch(e.slice(2),n?2:8):_h.test(e)?Zs:+e}var Xs=1/0,Fh=17976931348623157e292;function jh(e){if(!e)return e===0?e:0;if(e=Ph(e),e===Xs||e===-Xs){var t=e<0?-1:1;return t*Fh}return e===e?e:0}function Pa(e){var t=jh(e),n=t%1;return t===t?n?t-n:t:0}var $h=9007199254740991,Dr=4294967295,Dh=Math.min;function Fa(e,t){if(e=Pa(e),e<1||e>$h)return[];var n=Dr,r=Dh(e,Dr);t=Ca(t),e-=Dr;for(var i=va(r,t);++n<e;)t(n);return i}function zi(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Qs=Object.create,ja=(function(){function e(){}return function(t){if(!Z(t))return{};if(Qs)return Qs(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function Nh(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var $a=Nh();function Da(e,t){return e&&$a(e,t,Me)}var Rh=1,Mh=2;function Uh(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var a=o[0],l=e[a],c=o[1];if(o[2]){if(l===void 0&&!(a in e))return!1}else{var u=new Ue,f;if(!(f===void 0?Bn(c,l,Rh|Mh,r,u):f))return!1}}return!0}function Na(e){return e===e&&!Z(e)}function kh(e){for(var t=Me(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Na(i)]}return t}function Ra(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Lh(e){var t=kh(e);return t.length==1&&t[0][2]?Ra(t[0][0],t[0][1]):function(n){return n===e||Uh(n,e,t)}}function Bh(e,t){return e!=null&&t in Object(e)}function Ma(e,t){return e!=null&&Ta(e,t,Bh)}var Wh=1,qh=2;function Vh(e,t){return Wi(e)&&Na(t)?Ra(bt(e),t):function(n){var r=F(n,e);return r===void 0&&r===t?Ma(n,e):Bn(t,r,Wh|qh)}}function Hh(e){return function(t){return t?.[e]}}function Kh(e){return function(t){return wr(t,e)}}function Gh(e){return Wi(e)?Hh(bt(e)):Kh(e)}function Yi(e){return typeof e=="function"?e:e==null?xr:typeof e=="object"?ve(e)?Vh(e[0],e[1]):Lh(e):Gh(e)}function zh(e,t,n){var r=ve(e),i=r||Ct(e)||Ln(e);if(t=Yi(t),n==null){var s=e&&e.constructor;i?n=r?new s:[]:Z(e)?n=kn(s)?ja(gr(e)):{}:n={}}return(i?zi:Da)(e,function(o,a,l){return t(n,o,a,l)}),n}function gi(e,t,n){(n!==void 0&&!Un(e[t],n)||n===void 0&&!(t in e))&&Hi(e,t,n)}var Ua=typeof exports=="object"&&exports&&!exports.nodeType&&exports,eo=Ua&&typeof module=="object"&&module&&!module.nodeType&&module,Yh=eo&&eo.exports===Ua,to=Yh?Ze.Buffer:void 0,no=to?to.allocUnsafe:void 0;function ka(e,t){if(t)return e.slice();var n=e.length,r=no?no(n):new e.constructor(n);return e.copy(r),r}function Ji(e){var t=new e.constructor(e.byteLength);return new dr(t).set(new dr(e)),t}function La(e,t){var n=t?Ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Zi(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ba(e){return typeof e.constructor=="function"&&!Or(e)?ja(gr(e)):{}}function Dn(e){return De(e)&&$t(e)}function bi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function an(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?Hi(n,a,l):Ki(n,a,l)}return n}function Jh(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Zh=Object.prototype,Xh=Zh.hasOwnProperty;function Qh(e){if(!Z(e))return Jh(e);var t=Or(e),n=[];for(var r in e)r=="constructor"&&(t||!Xh.call(e,r))||n.push(r);return n}function qn(e){return $t(e)?Ea(e,!0):Qh(e)}function ep(e){return an(e,qn(e))}function tp(e,t,n,r,i,s,o){var a=bi(e,n),l=bi(t,n),c=o.get(l);if(c){gi(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,f=u===void 0;if(f){var h=ve(l),m=!h&&Ct(l),d=!h&&!m&&Ln(l);u=l,h||m||d?ve(a)?u=a:Dn(a)?u=Zi(a):m?(f=!1,u=ka(l,!0)):d?(f=!1,u=La(l,!0)):u=[]:gt(l)||Zt(l)?(u=a,Zt(a)?u=ep(a):(!Z(a)||kn(a))&&(u=Ba(l))):f=!1}f&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),gi(e,n,u)}function Wa(e,t,n,r,i){e!==t&&$a(t,function(s,o){if(i||(i=new Ue),Z(s))tp(e,t,o,n,Wa,r,i);else{var a=r?r(bi(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),gi(e,o,a)}},qn)}function np(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ro=Math.max;function qa(e,t,n){return t=ro(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=ro(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),np(e,this,a)}}function rp(e){return function(){return e}}var ip=hr?function(e,t){return hr(e,"toString",{configurable:!0,enumerable:!1,value:rp(t),writable:!0})}:xr,sp=800,op=16,ap=Date.now;function lp(e){var t=0,n=0;return function(){var r=ap(),i=op-(r-n);if(n=r,i>0){if(++t>=sp)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Va=lp(ip);function Er(e,t){return Va(qa(e,t,xr),e+"")}function cp(e,t,n){if(!Z(n))return!1;var r=typeof t;return(r=="number"?$t(n)&&vr(t,n.length):r=="string"&&t in n)?Un(n[t],e):!1}function up(e){return Er(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&cp(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var fp=up(function(e,t,n){Wa(e,t,n)}),io=$e?$e.isConcatSpreadable:void 0;function dp(e){return ve(e)||Zt(e)||!!(io&&e&&e[io])}function Vn(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=dp),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?Vn(a,t-1,n,r,i):Ui(i,a):r||(i[i.length]=a)}return i}var hp=1/0;function pp(e){var t=e==null?0:e.length;return t?Vn(e,hp):[]}function mp(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function yp(e){return e!==e}function gp(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ha(e,t,n){return t===t?gp(e,t,n):mp(e,yp,n)}function Xi(e,t){var n=e==null?0:e.length;return!!n&&Ha(e,t,0)>-1}function rr(){}var bp=1/0,Sp=zt&&1/Mi(new zt([,-0]))[1]==bp?function(e){return new zt(e)}:rr,vp=200;function Ka(e,t,n){var r=-1,i=Xi,s=e.length,o=!0,a=[],l=a;if(s>=vp){var c=Sp(e);if(c)return Mi(c);o=!1,i=jn,l=new Tt}else l=a;e:for(;++r<s;){var u=e[r],f=u;if(u=u!==0?u:0,o&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;a.push(u)}else i(l,f,n)||(l!==a&&l.push(f),a.push(u))}return a}function Ga(e){return e&&e.length?Ka(e):[]}var Op="[object Map]",wp="[object Set]",xp=Object.prototype,Ep=xp.hasOwnProperty;function pe(e){if(e==null)return!0;if($t(e)&&(ve(e)||typeof e=="string"||typeof e.splice=="function"||Ct(e)||Ln(e)||Zt(e)))return!e.length;var t=Pe(e);if(t==Op||t==wp)return!e.size;if(Or(e))return!Aa(e).length;for(var n in e)if(Ep.call(e,n))return!1;return!0}const Ap=Object.prototype;function bn(e){for(const t in e)if(Ap.hasOwnProperty.call(e,t))return!1;return!0}const _p=["array","boolean","integer","null","number","object","string"];new Set(_p);const Ip=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Ip);const Tp=["items","allOf","oneOf","anyOf"];new Set(Tp);const Cp=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Cp);function ir(e){return typeof e=="object"}function We(e){return ir(e)?bn(e):e===!0}function Ht(e,t){return e<t?-1:e>t?1:0}function Nr(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const i=new Set(e);for(let s=0;s<r;s++)i.add(t[s]);return Array.from(i)}function Pp(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const i=e;e=t,t=i}const r=new Set(t);for(let i=0;i<e.length&&r.size>0;i++){const s=e[i];r.delete(s)&&n.push(s)}return n}function so(e){return e.length===0}function Rr(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let i=0;i<t.length;i++)if(t[i]!==n[i]){const s=e(t[i],n[i]);if(s!==0)return s}return 0}}function za(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const o=[];let a=0;e:for(let l=0;l<r;l++){const c=n[l];for(let u=0;u<a;u++)if(e(c,o[u])===0)continue e;a=o.push(c)}return o}const i=n.slice().sort(e);let s=0;for(let o=1;o<r;o++)e(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function Fp(e){return(t,n)=>{const r=[];let i=t.length,s=n.length;if(i===0||s===0)return r;if(i>s){const u=t;t=n,n=u;const f=i;i=s,s=f}const o=[...t].sort(e),a=[...n].sort(e);let l=0,c=0;for(;l<i&&c<s;){const u=e(o[l],a[c]);u===0?((r.length===0||e(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,c++):u<0?l++:c++}return r}}function jp(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const oo=jp,Ya=()=>0,$p=e=>e===void 0,Dp=e=>typeof e!="object",ao={boolean:0,number:1,string:2};function Np(e,t){const n=typeof e,r=typeof t;return n===r?Ht(e,t):ao[n]-ao[r]}function Rp(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const o=e;e=t,t=o}const i=new Set(e),s=t.length;for(let o=0;o<s;o++){const a=t[o];i.has(a)||e.push(a)}return e}function Ar(e,t,n=Ya){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function Wt(e){return Ar($p,e)}function ot(e,t){return Ar(n=>n===void 0||e(n),t)}function Mr(e,t){return Ar(Array.isArray,e,t)}const ye=Wt(Ht),Ur=ot(e=>e===0,(e,t)=>e-t);function Mp({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=oo(t,p=>Object.keys(p).sort());function r(p){return(y,S)=>{const O=n(y),E=n(S),b=Math.min(O.length,E.length);for(let g=0;g<b;g++){const v=Ht(O[g],E[g]);if(v!==0)return v}if(O.length!==E.length)return O.length-E.length;for(let g=0;g<b;g++){const v=O[g],x=p(y[v],S[v]);if(x!==0)return x}return 0}}function i(p){const y=Rr(p),S=oo(e,za(p,{threshold:0}));return(O,E)=>y(S(O),S(E))}const s=i(Ht);function o(p,y){if(ir(p)){if(ir(y)){const S=Object.keys(p),O=Object.keys(y),E=Rp(S,O),b=E.length;for(let g=0;g<b;g++){const v=E[g];if(p[v]===y[v])continue;const A=(d[v]??a)(p[v],y[v]);if(A!==0)return A}return 0}return y===!0&&bn(p)?0:1}return ir(y)?p===!0&&bn(y)?0:-1:Ht(p,y)}const a=Wt(c),l=Ar(Dp,Mr(r(a),Rr(c)),Np);function c(p,y){return p===null?-1:y===null?1:l(p,y)}const u=Wt(o),f=ot(bn,r(u)),h=Wt(i(o)),m=ot(We,o),d={$id:ye,$comment:ye,$defs:f,$ref:ye,$schema:ye,const:a,contains:u,contentEncoding:ye,contentMediaType:ye,default:a,definitions:f,description:ye,else:u,examples:a,exclusiveMaximum:ye,exclusiveMinimum:ye,format:ye,if:u,maximum:ye,maxItems:ye,maxLength:ye,maxProperties:ye,minimum:ye,multipleOf:ye,not:u,pattern:ye,propertyNames:u,readOnly:ye,then:u,title:ye,writeOnly:ye,uniqueItems:ot(p=>p===!1,Ya),minLength:Ur,minItems:Ur,minProperties:Ur,required:ot(so,s),enum:ot(so,i(c)),type:Wt((p,y)=>{const S=Array.isArray(p),O=Array.isArray(y);return!S&&!O?Ht(p,y):s(S?p:[p],O?y:[y])}),items:ot(p=>!Array.isArray(p)&&We(p),Mr(o,Rr(o))),anyOf:h,allOf:h,oneOf:h,properties:f,patternProperties:f,additionalProperties:m,additionalItems:m,dependencies:ot(bn,r(Wt(Mr(o,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:o}}function lo(e){return e}const Ja=(e,t)=>e?Ja(t%e,e):t,Up=(e,t)=>Math.abs(e*t)/Ja(e,t);function kp(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function kr(e,t,n){const r=e.length,i=t.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=e[s];for(let a=0;a<i;a++)n(o,t[a])}}function Lr(e,t){return e||t}function co(e){return(t,n)=>{const r={...t},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function Lp(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function wt(e,t,n){n===void 0||We(n)?delete e[t]:e[t]=n}const Bp=["properties","patternProperties","additionalProperties"];function uo(e){const t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){const s=t[i];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const fo=[[],[]];function ho(e,t,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(t))continue;const o=s.schema;if(o===!1)return!0;e.push(o)}return!1}const Wp=["items","additionalItems"],qp=["if","then","else"];function po(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function Br(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function xt(e,t,n){return[e,t,n]}function Vp(e){const t=new Map;for(const[n,r,i]of e){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=t.get(o[0]);a===void 0&&(a=[],t.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return t}const Hp=[xt("minimum","maximum",e=>e.maximum>=e.minimum),xt("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),xt("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),xt("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),xt("minLength","maxLength",e=>e.maxLength>=e.minLength),xt("minItems","maxItems",e=>e.maxItems>=e.minItems),xt("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function Kp({mergePatterns:e=kp,isSubRegExp:t=Object.is,intersectJson:n=Pp,deduplicateJsonSchemaDef:r=lo,defaultMerger:i=lo,assigners:s=[],checks:o=Hp,mergers:a}={}){function l(b){const g=b.length;let v=b[0];for(let x=1;x<g;x++){const A=S(v,b[x]);if(A===!1)return!1;We(A)||(v=A)}return v}function c(b,g,v,x,A,_,I){if(b.length=0,v===!1)return!1;if(b.push(v),A!==void 0){if(A===!1)return!1;b.push(A)}if(ho(b,g,_))return!1;const T=b.length<2;if(I===!1){if(T)return;if(ho(b,g,x))return!1}else T&&I!==void 0&&b.push(I);return b.length===1?b[0]:l(b)}function u(b,g,v,x,A,_){const I=v.length;if(I>0&&A!==!1)if(_)Object.assign(b,g);else for(let P=0;P<I;P++){const T=v[P];x.has(T)||(b[T]=S(g[T],A))}return b}const f=(b,{properties:g={},patternProperties:v,additionalProperties:x=!0},{properties:A={},patternProperties:_,additionalProperties:I=!0})=>{const P=We(x),T=We(I);if(P&&T)return wt(b,"properties",O(g,A)),wt(b,"patternProperties",v&&_?O(v,_):v??_),delete b.additionalProperties,b;const C=S(x,I);wt(b,"additionalProperties",C);const D={},j=Object.keys(g),$=j.length,[k,K]=v?uo(v):fo,[L,ee]=_?uo(_):fo,re=[],ce=new Set,me=T?void 0:I;for(let U=0;U<$;U++){const X=j[U];ce.add(X);const ne=c(re,X,g[X],k,A[X],L,me);ne!==void 0&&(D[X]=ne)}const R=Object.keys(A),ie=R.length,J=P?void 0:x;for(let U=0;U<ie;U++){const X=R[U];if(ce.has(X))continue;const ne=c(re,X,A[X],L,void 0,k,J);ne!==void 0&&(D[X]=ne)}wt(b,"properties",D);let V={};const H=new Set;return K.length>0&&ee.length>0&&kr(K,ee,(U,X)=>{t(U,X)&&H.add(U),t(X,U)&&H.add(X),V[e(U,X)]=S(v[U],_[X])}),V=u(V,v,K,H,I,T),V=u(V,_,ee,H,x,P),wt(b,"patternProperties",V),b},h=(b,{items:g=[],additionalItems:v},{items:x=[],additionalItems:A})=>{const _=Array.isArray(g),I=Array.isArray(x),P=[];if(b.items=P,_&&I){const[T,C,D]=g.length<x.length?[g.length,v,x]:[x.length,A,g];let j=0;for(;j<T;j++)P.push(S(g[j],x[j]));if(C===!1)b.additionalItems=!1;else{const $=C===void 0||We(C);for(;j<D.length;j++)P.push($?D[j]:S(D[j],C));wt(b,"additionalItems",v!==void 0&&A!==void 0?S(v,A):v??A)}}else if(_||I){const[T,C,D]=_?[g,x,v]:[x,g,A];wt(b,"additionalItems",D&&S(D,C));for(let j=0;j<T.length;j++)P.push(S(T[j],C))}else delete b.additionalItems,b.items=S(g,x);return b},m=(b,g,v)=>{po(b,g);const x=po({},v);return b.allOf===void 0?b.allOf=[x]:b.allOf=b.allOf.concat(x),b};function d(b,g){const v=[];if(kr(b,g,(x,A)=>{try{v.push(S(x,A))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(b)}" and "${JSON.stringify(g)}"; the merged result is empty`);return r(v)}const p=Lp([[Bp,f],[Wp,h],[qp,m],...s]),y=Vp(o);function S(b,g){if(b===!1||g===!1)return!1;if(We(b))return We(g)?!0:g;if(We(g))return b;let v={...b};const x=new Set,A=new Set,_=Object.keys(g),I=_.length;for(let P=0;P<I;P++){const T=_[P],C=g[T];if(C===void 0)continue;const D=y.get(T);if(D!==void 0){const K=D.length;for(let L=0;L<K;L++){const ee=D[L];b[ee.oppositeKey]!==void 0&&A.add(ee.check)}}const j=b[T];if(j===void 0){v[T]=C;continue}const $=p.get(T);if($){x.add($);continue}const k=E[T]??i;v[T]=k(j,C)}for(const P of x)v=P(v,b,g);for(const P of A)P(v);return v}const O=co(S),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:O,definitions:O,type:(b,g)=>{if(b===g)return b;const v=Array.isArray(b),x=Array.isArray(g);if(!v&&!x){const A=Br(b,g);if(A!==void 0)return A}else if(v||x){const A=new Set;if(v&&x)kr(b,g,(I,P)=>{const T=Br(I,P);T!==void 0&&A.add(T)});else{const I=v?b:g,P=v?g:b,T=I.length;for(let C=0;C<T;C++){const D=Br(P,I[C]);D!==void 0&&A.add(D)}}const _=A.size;if(_===1)return A.values().next().value;if(_>1)return Array.from(A)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${b.toString()}, ${g.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(b,g)=>{const v=r([b,g]);return v.length===1?v[0]:{anyOf:v}},pattern:e,readOnly:Lr,writeOnly:Lr,enum:(b,g)=>{const v=n(b,g);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(b)}", "${JSON.stringify(g)}"`);return v},anyOf:d,oneOf:d,allOf:(b,g)=>r(b.concat(g)),propertyNames:S,contains:S,dependencies:co((b,g)=>Array.isArray(b)?Array.isArray(g)?Nr(b,g):S(g,{required:b}):Array.isArray(g)?S(b,{required:g}):S(b,g)),examples:(b,g)=>{if(!Array.isArray(b)||!Array.isArray(g))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(b)}" and "${JSON.stringify(g)}"`);return Nr(b,g)},multipleOf:(b,g)=>{let v=1;for(;!Number.isInteger(b)||!Number.isInteger(g);)v*=10,b*=10,g*=10;return Up(b,g)/v},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Lr,required:Nr,...a};return{mergeSchemaDefinitions:S,mergeArrayOfSchemaDefinitions:l}}function Gp(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:i,...s}=r;t.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return t}function zp(e){return t=>e(Gp(t))}var hn={},mo;function Yp(){if(mo)return hn;mo=1;var e=/~/,t=/~[01]/g;function n(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function r(c){return e.test(c)?c.replace(t,n):c}function i(c,u,f){for(var h,m,d=1,p=u.length;d<p;){if(u[d]==="constructor"||u[d]==="prototype"||u[d]==="__proto__")return c;if(h=r(u[d++]),m=p>d,typeof c[h]>"u"&&(Array.isArray(c)&&h==="-"&&(h=c.length),m&&(u[d]!==""&&u[d]<1/0||u[d]==="-"?c[h]=[]:c[h]={})),!m)break;c=c[h]}var y=c[h];return f===void 0?delete c[h]:c[h]=f,y}function s(c){if(typeof c=="string"){if(c=c.split("/"),c[0]==="")return c;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(c)){for(const u of c)if(typeof u!="string"&&typeof u!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return c}throw new Error("Invalid JSON pointer.")}function o(c,u){if(typeof c!="object")throw new Error("Invalid input object.");u=s(u);var f=u.length;if(f===1)return c;for(var h=1;h<f;){if(c=c[r(u[h++])],f===h)return c;if(typeof c!="object"||c===null)return}}function a(c,u,f){if(typeof c!="object")throw new Error("Invalid input object.");if(u=s(u),u.length===0)throw new Error("Invalid JSON pointer for set.");return i(c,u,f)}function l(c){var u=s(c);return{get:function(f){return o(f,u)},set:function(f,h){return a(f,u,h)}}}return hn.get=o,hn.set=a,hn.compile=l,hn}var Jp=Yp();const Wr=Ti(Jp);function Zp(e,t){return e&&an(t,Me(t),e)}function Xp(e,t){return e&&an(t,qn(t),e)}function Qp(e,t){return an(e,ki(e),t)}var em=Object.getOwnPropertySymbols,Za=em?function(e){for(var t=[];e;)Ui(t,ki(e)),e=gr(e);return t}:Sa;function tm(e,t){return an(e,Za(e),t)}function Qi(e){return ba(e,qn,Za)}var nm=Object.prototype,rm=nm.hasOwnProperty;function im(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&rm.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function sm(e,t){var n=t?Ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var om=/\w*$/;function am(e){var t=new e.constructor(e.source,om.exec(e));return t.lastIndex=e.lastIndex,t}var yo=$e?$e.prototype:void 0,go=yo?yo.valueOf:void 0;function lm(e){return go?Object(go.call(e)):{}}var cm="[object Boolean]",um="[object Date]",fm="[object Map]",dm="[object Number]",hm="[object RegExp]",pm="[object Set]",mm="[object String]",ym="[object Symbol]",gm="[object ArrayBuffer]",bm="[object DataView]",Sm="[object Float32Array]",vm="[object Float64Array]",Om="[object Int8Array]",wm="[object Int16Array]",xm="[object Int32Array]",Em="[object Uint8Array]",Am="[object Uint8ClampedArray]",_m="[object Uint16Array]",Im="[object Uint32Array]";function Tm(e,t,n){var r=e.constructor;switch(t){case gm:return Ji(e);case cm:case um:return new r(+e);case bm:return sm(e,n);case Sm:case vm:case Om:case wm:case xm:case Em:case Am:case _m:case Im:return La(e,n);case fm:return new r;case dm:case mm:return new r(e);case hm:return am(e);case pm:return new r;case ym:return lm(e)}}var Cm="[object Map]";function Pm(e){return De(e)&&Pe(e)==Cm}var bo=Xt&&Xt.isMap,Fm=bo?Bi(bo):Pm,jm="[object Set]";function $m(e){return De(e)&&Pe(e)==jm}var So=Xt&&Xt.isSet,Dm=So?Bi(So):$m,Nm=1,Rm=2,Mm=4,Xa="[object Arguments]",Um="[object Array]",km="[object Boolean]",Lm="[object Date]",Bm="[object Error]",Qa="[object Function]",Wm="[object GeneratorFunction]",qm="[object Map]",Vm="[object Number]",el="[object Object]",Hm="[object RegExp]",Km="[object Set]",Gm="[object String]",zm="[object Symbol]",Ym="[object WeakMap]",Jm="[object ArrayBuffer]",Zm="[object DataView]",Xm="[object Float32Array]",Qm="[object Float64Array]",ey="[object Int8Array]",ty="[object Int16Array]",ny="[object Int32Array]",ry="[object Uint8Array]",iy="[object Uint8ClampedArray]",sy="[object Uint16Array]",oy="[object Uint32Array]",ue={};ue[Xa]=ue[Um]=ue[Jm]=ue[Zm]=ue[km]=ue[Lm]=ue[Xm]=ue[Qm]=ue[ey]=ue[ty]=ue[ny]=ue[qm]=ue[Vm]=ue[el]=ue[Hm]=ue[Km]=ue[Gm]=ue[zm]=ue[ry]=ue[iy]=ue[sy]=ue[oy]=!0;ue[Bm]=ue[Qa]=ue[Ym]=!1;function _n(e,t,n,r,i,s){var o,a=t&Nm,l=t&Rm,c=t&Mm;if(n&&(o=i?n(e,r,i,s):n(e)),o!==void 0)return o;if(!Z(e))return e;var u=ve(e);if(u){if(o=im(e),!a)return Zi(e,o)}else{var f=Pe(e),h=f==Qa||f==Wm;if(Ct(e))return ka(e,a);if(f==el||f==Xa||h&&!i){if(o=l||h?{}:Ba(e),!a)return l?tm(e,Xp(o,e)):Qp(e,Zp(o,e))}else{if(!ue[f])return i?e:{};o=Tm(e,f,a)}}s||(s=new Ue);var m=s.get(e);if(m)return m;s.set(e,o),Dm(e)?e.forEach(function(y){o.add(_n(y,t,n,y,e,s))}):Fm(e)&&e.forEach(function(y,S){o.set(S,_n(y,t,n,S,e,s))});var d=c?l?Qi:hi:l?qn:Me,p=u?void 0:d(e);return zi(p||e,function(y,S){p&&(S=y,y=e[S]),Ki(o,S,_n(y,t,n,S,e,s))}),o}function tl(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function ay(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function ly(e,t){return t.length<2?e:wr(e,ay(t,0,-1))}var cy=Object.prototype,uy=cy.hasOwnProperty;function nl(e,t){t=on(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=bt(t[n]);if(i==="__proto__"&&!uy.call(e,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=ly(e,t);return s==null||delete s[bt(tl(t))]}function fy(e){return gt(e)?void 0:e}function Si(e){var t=e==null?0:e.length;return t?Vn(e,1):[]}function rl(e){return Va(qa(e,void 0,Si),e+"")}var dy=1,hy=2,py=4,Qt=rl(function(e,t){var n={};if(e==null)return n;var r=!1;t=sn(t,function(s){return s=on(s,e),r||(r=s.length>1),s}),an(e,Qi(e),n),r&&(n=_n(n,dy|hy|py,fy));for(var i=t.length;i--;)nl(n,t[i]);return n}),my=ac();const es=Ti(my);function pr(e,t){if(le in e&&es.equal(e[le],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Z(r)){const i=pr(r,t);if(i!==void 0)return i}}else if(Z(n)){const r=pr(n,t);if(r!==void 0)return r}}function vi(e,t){const n=F(e,le,t);ae in e&&(e={...e,[ae]:es.resolve(n,e[ae])});for(const[r,i]of Object.entries(e))Array.isArray(i)?e={...e,[r]:i.map(s=>Z(s)?vi(s,n):s)}:Z(i)&&(e={...e,[r]:vi(i,n)});return e}function ts(e,t){const n=t[e];return[Qt(t,[e]),n]}function il(e,t={},n=[],r=F(t,[le])){const i=e||"";let s;if(i.startsWith("#")){const a=decodeURIComponent(i.substring(1));r===void 0||le in t&&t[le]===r?s=Wr.get(t,a):t[gn]===nr&&(s=pr(t,r.replace(/\/$/,"")),s!==void 0&&(s=Wr.get(s,a)))}else if(t[gn]===nr){const a=r?es.resolve(r,i):i,[l,...c]=a.replace(/#\/?$/,"").split("#");s=pr(t,l.replace(/\/$/,"")),s!==void 0&&(r=s[le],pe(c)||(s=Wr.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const o=s[ae];if(o){if(n.includes(o)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[u,...f]=n,h=[...f,i,u].join(" -> ");throw new Error(`Definition for ${u} contains a circular reference through ${h}`)}const[a,l]=ts(ae,s),c=il(l,t,[...n,i],r);return Object.keys(a).length>0?t[gn]===Cu||t[gn]===nr?{[yt]:[a,c]}:{...a,...c}:c}return s}function ns(e,t={},n=F(t,[le])){return il(e,t,[],n)}var yy="[object String]";function St(e){return typeof e=="string"||!ve(e)&&De(e)&&tt(e)==yy}function Ye(e){let t;const n=F(e,Au);return St(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Nn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var gy=Er(function(e){return Ka(Vn(e,1,Dn,!0))});function ke(e){let{type:t}=e;return!t&&e.const?Nn(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function et(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];return e&&i in e&&W(o)?r[i]=et(s,o):e&&t&&(ke(e)==="object"||ke(t)==="object")&&i===ca&&Array.isArray(s)&&Array.isArray(o)?r[i]=gy(s,o):r[i]=o,r},n)}var by="[object Number]";function sl(e){return typeof e=="number"||De(e)&&tt(e)==by}function ol(e,t,n){var r;if(e&&n){const i=F(e,n);if(i===void 0)return;for(let s=0;s<t.length;s++){const o=t[s],a=F(o,[Q,n],{});if(!(a.type==="object"||a.type==="array")&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function rs(e,t,n,r,i){if(t===void 0)return 0;const s=ol(t,n,i);if(sl(s))return s;for(let o=0;o<n.length;o++){const a=n[o];if(i&&z(a,[Q,i])){const l=F(t,i),c=F(a,[Q,i],{});if(e.isValid(c,l,r))return o}else if(a[Q]){const l={anyOf:Object.keys(a[Q]).map(u=>({required:[u]}))};let c;if(a.anyOf){const{...u}=a;u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},a,l);if(delete c.required,e.isValid(c,t,r))return o}else if(e.isValid(a,t,r))return o}return 0}function Oe(e,t,n={},r,i,s=!1){return He(e,t,n,r,void 0,void 0,i,s)[0]}function Sy(e,t,n,r,i,s,o){const{if:a,then:l,else:c,...u}=t,f=e.isValid(a,s||{},n);let h=[u],m=[];if(r)l&&typeof l!="boolean"&&(m=m.concat(He(e,l,n,s,r,i,o))),c&&typeof c!="boolean"&&(m=m.concat(He(e,c,n,s,r,i,o)));else{const d=f?l:c;d&&typeof d!="boolean"&&(m=m.concat(He(e,d,n,s,r,i,o)))}return m.length&&(h=m.map(d=>et(u,d))),h.flatMap(d=>He(e,d,n,s,r,i,o))}function al(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>Fa(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function ll(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(se(n,[r],e.patternProperties[r]),n),{})}function vy(e,t,n,r,i,s,o,a){const l=cl(e,t,n,r,i,s,o,a);if(l.length>1||l[0]!==t)return l;if($i in t)return ul(e,t,n,r,i,s,o).flatMap(u=>He(e,u,n,s,r,i,o));if(yt in t&&Array.isArray(t[yt])){const c=t.allOf.map(f=>He(e,f,n,s,r,i,o));return al(c).map(f=>({...t,allOf:f}))}return[t]}function cl(e,t,n,r,i,s,o,a){const l=Yt(t,n,i,void 0,a);return l!==t?He(e,l,n,s,r,i,o,a):[t]}function Yt(e,t,n,r,i){if(!W(e))return e;let s=e;if(ae in s){const{$ref:o,...a}=s;if(n.includes(o))return s;n.push(o),s={...ns(o,t,r),...a,[En]:o},le in s&&(r=s[le])}if(Q in s){const o=[],a=zh(s[Q],(l,c,u)=>{const f=[...n];l[u]=Yt(c,t,f,r,i),o.push(f)},{});fp(n,Ga(pp(o))),s={...s,[Q]:a}}if(Jt in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Yt(s.items,t,n,r,i)}),i){let o,a;Y in e&&Array.isArray(e[Y])?(o=Y,a=s[Y]):B in e&&Array.isArray(e[B])&&(o=B,a=s[B]),o&&a&&(s={...s,[o]:a.map(l=>Yt(l,t,n,r,i))})}return fe(e,s)?e:s}function Oy(e,t,n,r,i){const s={...t,properties:{...t.properties}},o=r&&W(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(ui in s){const l=ll(s,a);if(!pe(l)){s.properties[a]=Oe(e,{[yt]:Object.values(l)},n,F(o,[a]),i),se(s.properties,[a,ft],!0);return}}if(Vt in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ae in s.additionalProperties?l=Oe(e,{[ae]:F(s.additionalProperties,[ae])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:Y in s.additionalProperties||B in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:Nn(F(o,[a]))}:l={type:Nn(F(o,[a]))},s.properties[a]=l,se(s.properties,[a,ft],!0)}else s.properties[a]={type:"null"},se(s.properties,[a,ft],!0)}}),s}const{compareSchemaDefinitions:wy,compareSchemaValues:xy}=Mp(),{mergeArrayOfSchemaDefinitions:Ey}=Kp({intersectJson:Fp(xy),deduplicateJsonSchemaDef:za(wy)}),Ay=zp(Ey);function _y(e){return Ay(e)}function He(e,t,n,r,i=!1,s=[],o,a){return W(t)?vy(e,t,n,i,s,r,o,a).flatMap(c=>{var u;let f=c;if(Di in f)return Sy(e,f,n,i,s,r,o);if(yt in f){if(i){const{allOf:m,...d}=f;return[...m,d]}try{const m=[],d=[];(u=f.allOf)===null||u===void 0||u.forEach(p=>{typeof p=="object"&&p.contains?m.push(p):d.push(p)}),m.length&&(f={...f,allOf:d}),f=o?o(f):_y(f),m.length&&(f.allOf=m)}catch(m){console.warn(`could not merge subschemas in allOf:
|
|
24
|
-
`,m);const{allOf:d,...p}=f;return p}}return Q in f&&ui in f&&(f=Object.keys(f.properties).reduce((m,d)=>{const p=ll(m,d);return pe(p)||(m.properties[d]=Oe(e,{allOf:[m.properties[d],...Object.values(p)]},n,F(r,[d]),o)),m},{...f,properties:{...f.properties}})),ui in f||Vt in f&&f.additionalProperties!==!1?Oy(e,f,n,r,o):f}):[{}]}function Iy(e,t,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=t;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const c=i===void 0&&r?{}:i,u=Ye(t);s=s.map(h=>Yt(h,n,[]));const f=rs(e,c,s,n,u);if(r)return s.map(h=>et(l,h));t=et(l,s[f])}return[t]}function ul(e,t,n,r,i,s,o){const{dependencies:a,...l}=t;return Iy(e,l,n,r,s).flatMap(u=>fl(e,a,u,n,r,i,s,o))}function fl(e,t,n,r,i,s,o,a){let l=[n];for(const c in t){if(!i&&F(o,[c])===void 0||n.properties&&!(c in n.properties))continue;const[u,f]=ts(c,t);return Array.isArray(f)?l[0]=Ty(n,f):W(f)&&(l=Cy(e,n,r,c,f,i,s,o,a)),l.flatMap(h=>fl(e,u,h,r,i,s,o,a))}return l}function Ty(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Cy(e,t,n,r,i,s,o,a,l){return He(e,i,n,a,s,o,l).flatMap(u=>{const{oneOf:f,...h}=u;if(t=et(t,h),f===void 0)return t;const m=f.map(p=>typeof p=="boolean"||!(ae in p)?[p]:cl(e,p,n,s,o,a));return al(m).flatMap(p=>Py(e,t,n,r,p,s,o,a,l))})}function Py(e,t,n,r,i,s,o,a,l){const c=i.filter(u=>{if(typeof u=="boolean"||!u||!u.properties)return!1;const{[r]:f}=u.properties;if(f){const h={type:"object",properties:{[r]:f}};return e.isValid(h,a,n)||s}return!1});return!s&&c.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):c.flatMap(u=>{const f=u,[h]=ts(r,f.properties),m={...f,properties:h};return He(e,m,n,a,s,o,l).map(p=>et(t,p))})}function Sn(e,t,n,r,i,s={},o){if(Array.isArray(n[i])){const l=Ye(n)||r,c=n[i].map(f=>Oe(e,f,t,s,o)),u=F(s,l);if(u!==void 0)return c.find(f=>$n(F(f,[Q,l,yr],F(f,[Q,l,je])),u))}}function dl(e,t,n,r,i){let s=n;if(z(n,ae)&&(s=Oe(e,n,t,void 0,i)),pe(r))return s;const o=Array.isArray(r)?r:r.split("."),[a,...l]=o;if(a&&z(s,a))return s=F(s,a),dl(e,t,s,l,i)}function sr(e,t,n,r,i,s){const o=dl(e,t,n,r,s);return o===void 0?i:o}const vo={title:"!@#$_UNKNOWN_$#@!"};function Fy(e,t,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop();o.length&&o.forEach(h=>{a=sr(e,t,a,[Q,h],{},s),z(a,B)?a=Sn(e,t,a,l,B,F(i,h),s):z(a,Y)&&(a=Sn(e,t,a,l,Y,F(i,h),s))}),z(a,B)?a=Sn(e,t,a,l,B,i,s):z(a,Y)&&(a=Sn(e,t,a,l,Y,i,s));let c=sr(e,t,a,[Q,l],vo,s);c===vo&&(c=void 0);const u=sr(e,t,a,ca,[],s);let f;return c&&Array.isArray(u)&&(f=u.includes(l)),{field:c,isRequired:f}}function jy(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function $y(e,t){return function(n,r){if(n==null)return n;if(!$t(n))return e(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var hl=$y(Da);function Dy(e,t,n,r,i){return i(e,function(s,o,a){n=r?(r=!1,s):t(n,s,o,a)}),n}function Ny(e,t,n){var r=ve(e)?jy:Dy,i=arguments.length<3;return r(e,Yi(t),n,i,hl)}const Ry={type:"object",$id:Eu,properties:{__not_really_there__:{type:"number"}}};function Oi(e,t,n,r,i){let s=0;return n&&(Z(n.properties)?s+=Ny(n.properties,(o,a,l)=>{const c=F(r,l);if(typeof a=="boolean")return o;if(z(a,ae)){const u=Oe(e,a,t,c,i);return o+Oi(e,t,u,c||{},i)}if((z(a,B)||z(a,Y))&&c){const u=z(a,B)?B:Y,f=Ye(a);return o+Rn(e,t,c,F(a,u),-1,f,i)}if(a.type==="object")return Z(c)&&(o+=1),o+Oi(e,t,a,c,i);if(a.type===Nn(c)){let u=o+1;return a.default?u+=c===a.default?1:-1:a.const&&(u+=c===a.const?1:-1),u}return o},0):St(n.type)&&n.type===Nn(r)&&(s+=1)),s}function Rn(e,t,n,r,i=-1,s,o){const a=r.map(h=>Yt(h,t,[])),l=ol(n,r,s);if(sl(l))return l;const c=a.reduce((h,m,d)=>(rs(e,n,[Ry,m],t,s)===1&&h.push(d),h),[]);if(c.length===1)return c[0];c.length||Fa(a.length,h=>c.push(h));const u=new Set,{bestIndex:f}=c.reduce((h,m)=>{const{bestScore:d}=h,p=a[m],y=Oi(e,t,p,n,o);return u.add(y),y>d?{bestIndex:m,bestScore:y}:h},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:f}function is(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>W(t))}function en(e){return e==null}function Mn(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],o=i?s:t,a=i?t:s,l=o.map((c,u)=>a[u]!==void 0?Mn(s[u],t[u],n,r,i):c);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(W(t)){const s=Object.assign({},e);return Object.keys(t).reduce((o,a)=>{var l;const c=F(t,a),u=W(e)&&a in e,f=a in t,h=(l=F(e,a))!==null&&l!==void 0?l:{},m=u&&Object.entries(h).some(([,y])=>W(y)),d=u&&W(F(e,a)),p=f&&W(c);return d&&p&&!m?(o[a]={...F(e,a),...c},o):(o[a]=Mn(F(e,a),c,n,r,i&&(u||!f)),o)},s)}return r&&(e!==void 0&&en(t)||typeof t=="number"&&isNaN(t))||i&&!en(t)?e:t}function Pt(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];if(e&&i in e&&W(o))r[i]=Pt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,c)=>(s.includes(c)||l.push(c),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},Object.assign({},e))}function pl(e){return Array.isArray(e.enum)&&e.enum.length===1||je in e}function ss(e,t,n={},r){const i=Oe(e,t,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&pl(o)):!1}function os(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:ss(e,t.items,n,r)}function ml(e){const t=e[je],n=ke(e);return W(t)&&St(t?.$data)&&n!=="object"&&n!=="array"}function My(e){if(xu in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(je in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Uy(e,t){const n=new Map(e.map(s=>[String(s.value),s])),r=new Set(t.filter(s=>s!=="*").map(String)),i=e.filter(s=>!r.has(String(s.value)));return t.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function tn(e,t){if(e.enum){let s,o;if(t){const{enumNames:l,enumOrder:c}=M(t);s=l,o=c}let a=e.enum.map((l,c)=>({label:Array.isArray(s)?s[c]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=Uy(a,o)),a}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Ye(e);if(t){const{optionsSchemaSelector:s=i}=M(t);i=s}return n&&n.map((s,o)=>{const{title:a}=M(r?.[o]),l=s;let c,u=a;if(i){const f=F(l,[Q,i],{});c=F(f,yr,F(f,je)),u=u||f?.title||l.title||String(c)}else c=My(l),u=u||l.title||String(c);return{schema:l,label:u,value:c}})}const ky=["string","number","integer","boolean","null"];var nn;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(nn||(nn={}));function qr(e,t=nn.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==nn.Ignore&&W(e.additionalItems)?e.additionalItems:{}}function yl(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&pe(t)&&n===null?null:t}function Oo(e,t,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r===!0||a)e[t]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!W(n)||!pe(n))&&(e[t]=n);else if(c!=="skipDefaults"){const u=i===void 0?s.includes(t):i;W(n)?c==="skipEmptyDefaults"?pe(n)||(e[t]=n):(!pe(n)||s.includes(t))&&(u||c!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||u&&s.includes(t))&&(e[t]=n)}}function ht(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:f=!1,initialDefaultsGenerated:h}=n;let m=W(i)?i:{};const d=W(t)?t:{};let p=r,y=null,S=l,O=a;if(d[je]!==void 0&&l?.constAsDefaults!=="never"&&!ml(d))p=d[je];else if(W(p)&&W(d.default)&&!d[Y]&&!d[B]&&!d[ae])p=Pt(p,d.default);else if(yr in d&&!d[Y]&&!d[B]&&!d[ae])p=d.default;else if(ae in d){const g=d[ae];a.includes(g)||(O=a.concat(g),y=ns(g,s));const v=i===void 0||W(i)&&pe(i);y&&!p&&v&&(p=d.default),f&&y&&!W(i)&&(m=i)}else if($i in d){const g={...wo(e,d,n,p),...m};y=ul(e,d,s,!1,[],g,c)[0]}else if(is(d))p=d.items.map((g,v)=>ht(e,g,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:Array.isArray(r)?r[v]:void 0,rawFormData:m,required:u,shouldMergeDefaultsIntoFormData:f}));else if(B in d){const{oneOf:g,...v}=d;if(g.length===0)return;const x=Ye(d),{type:A="null"}=v;!Array.isArray(A)&&ky.includes(A)&&S?.constAsDefaults==="skipOneOf"&&(S={...S,constAsDefaults:"never"}),y=g[Rn(e,s,i??d.default,g,0,x,c)],y=et(v,y)}else if(Y in d){const{anyOf:g,...v}=d;if(g.length===0)return;const x=Ye(d);y=g[Rn(e,s,i??d.default,g,0,x,c)],y=et(v,y)}if(y)return ht(e,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:O,experimental_defaultFormStateBehavior:S,experimental_customMergeAllOf:c,parentDefaults:p,rawFormData:i??m,required:u,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h});p===void 0&&(p=d.default);const E=wo(e,d,n,p);let b=E??p;if(f){const{arrayMinItems:g={}}=l||{},{mergeExtraDefaults:v}=g,x=Ly(e,d,s,i,l,c);(!W(i)||yt in d)&&(b=Mn(b,x,v,!0))}return b}function Ly(e,t,n,r,i,s){const o=!pl(t)&&ss(e,t,n,s);let a=r;if(o){const c=tn(t);a=c?.some(f=>fe(f.value,r))?r:void 0}return t[je]&&i?.constAsDefaults==="always"&&(a=t.const),a}function By(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},f){{const h=W(n)?n:{},m=t,p=o?.allOf==="populateDefaults"&&yt in m||o?.emptyObjectFields!=="skipEmptyDefaults"&&Di in m?Oe(e,m,r,h,a):m,y=p[je],S=Object.keys(p.properties||{}).reduce((O,E)=>{var b;const g=F(p,[Q,E],{}),v=W(y)&&y[E]!==void 0,x=(W(g)&&je in g||v)&&o?.constAsDefaults!=="never"&&!ml(g),A=ht(e,g,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:F(f,[E]),rawFormData:F(h,[E]),required:(b=p.required)===null||b===void 0?void 0:b.includes(E),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});return Oo(O,E,A,i,l,p.required,o,x,g?.type==="null"),O},{});if(p.additionalProperties&&!u){const O=W(p.additionalProperties)?p.additionalProperties:{},E=new Set;W(f)&&Object.keys(f).filter(g=>!p.properties||!p.properties[g]).forEach(g=>E.add(g));const b=[];Object.keys(h).filter(g=>!p.properties||!p.properties[g]).forEach(g=>{E.add(g),b.push(g)}),E.forEach(g=>{var v;const x=ht(e,O,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:F(f,[g]),rawFormData:F(h,[g]),required:(v=p.required)===null||v===void 0?void 0:v.includes(g),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});Oo(S,g,x,i,l,b)})}return yl(t,S)}}function Wy(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},f){var h,m;const d=t,p=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:y,mergeExtraDefaults:S}=p,O=y==="never",E=y==="requiredOnly",b=y==="all"||!O&&!E,g=(m=p?.computeSkipPopulate)!==null&&m!==void 0?m:(()=>!1),x=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((P,T)=>{const C=qr(d,nn.Fallback,T),D=Array.isArray(n)?n[T]:void 0;return ht(e,C,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:P,rawFormData:D,required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u})})),Array.isArray(n)){const P=qr(d);if(O)f=n;else{const T=n.map((D,j)=>ht(e,P,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:D,parentDefaults:F(f,[j]),required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}));f=Mn(f,T,(E&&a||b)&&S)}}if((W(d)&&je in d&&s?.constAsDefaults!=="never")===!1){if(O)return f??x;if(E&&!a)return f||void 0}let _;const I=Array.isArray(f)?f.length:0;if(!d.minItems||os(e,d,r,o)||g(e,d,r)||d.minItems<=I)_=f||!a&&!l?f:x;else{const P=f||[],T=qr(d,nn.Invert),C=T.default,D=Array.from({length:d.minItems-I},()=>ht(e,T,{parentDefaults:C,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:c}));_=P.concat(D)}return yl(t,_)}function wo(e,t,n={},r){switch(ke(t)){case"object":return By(e,t,n,r);case"array":return Wy(e,t,n,r)}}function gl(e,t,n,r,i=!1,s,o,a){if(!W(t))throw new Error("Invalid schema: "+t);const l=Oe(e,t,r,n,o),c=ht(e,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&W(l.default))return{...c,...n};if(W(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:u}=s||{};return Mn(c,n,!0,u==="useDefaultIfFormDataUndefined",!0)}return c}function bl(e={}){return"widget"in M(e)&&M(e).widget!=="hidden"}function Sl(e,t,n={},r,i){if(n[Ri]==="files")return!0;if(t.items){const s=Oe(e,t.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function qy(e,t,n={},r,i,s){const o=M(n,i),{label:a=!0}=o;let l=!!a;if(l){const c=ke(t),u=F(t,ft,!1);c==="array"&&(l=u||os(e,t,r,s)||Sl(e,t,n,r,s)||bl(n)),c==="object"&&(l=u),c==="boolean"&&n&&!n[Ri]&&(l=!1),n&&n[Iu]&&(l=!1)}return l}function vl(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=wr(e,o);n(a,o)&&Gi(s,on(o,e),a)}return s}function Vy(e,t){return vl(e,t,function(n,r){return Ma(e,r)})}var Ol=rl(function(e,t){return e==null?{}:Vy(e,t)});function at(e,t,n,r,i,s=[],o){if(ae in t||$i in t||yt in t||Di in t){const l=Oe(e,t,r,i,o);if(s.findIndex(u=>fe(u,l))===-1)return at(e,l,n,r,i,s.concat(l),o)}let a={[tr]:n.replace(/^\./,"")};if(B in t||Y in t){const l=B in t?t.oneOf:t.anyOf,c=Ye(t),u=Rn(e,r,i,l,0,c,o),f=l[u];a={...a,...at(e,f,n,r,i,s,o)}}if(Vt in t&&t[Vt]!==!1){se(a,Ni,!0);const l=Z(t[Vt])?t[Vt]:{},c=F(t,Q,{});for(const u of Object.keys(i??{}))u in c||(a[u]=at(e,l,`${n}.${u}`,r,F(i,[u]),s,o))}if(Jt in t&&Array.isArray(i)){const{items:l,additionalItems:c}=t;Array.isArray(l)?i.forEach((u,f)=>{l[f]?a[f]=at(e,l[f],`${n}.${f}`,r,u,s,o):c?a[f]=at(e,c,`${n}.${f}`,r,u,s,o):console.warn(`Unable to generate path schema for "${n}.${f}". No schema defined for it`)}):i.forEach((u,f)=>{a[f]=at(e,l,`${n}.${f}`,r,u,s,o)})}else if(Q in t)for(const l in t.properties){const c=F(t,[Q,l],{});a[l]=at(e,c,`${n}.${l}`,r,F(i,[l]),s,o)}return a}function wl(e,t,n="",r,i,s){return at(e,t,n,r,i,void 0,s)}function xl(e,t){if(t.length===0&&typeof e!="object")return e;const n=Ol(e,t);return Array.isArray(e)?Object.keys(n).map(r=>n[r]):n}function El(e,t){const n=(i,s)=>typeof i!="object"||pe(i)||s&&!pe(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const c=i[l];if(typeof c=="object"){const u=o.map(f=>[...f,l]);c[Ni]&&c[tr]!==""?s.push(c[tr]):r(c,s,u)}else l===tr&&c!==""&&o.forEach(u=>{const f=F(t,u),h=a.length===1;(n(f,h)||Array.isArray(f)&&f.every(m=>n(m,h)))&&s.push(u)})}),s};return r(e)}function Hy(e,t,n={},r){const i=Oe(e,t,n,r),s=wl(e,i,"",n,r),a=El(s,r).map(l=>Array.isArray(l)?l.join("."):l);return xl(r,a)}const Mt=Symbol("no Value");function wi(e,t,n,r,i={},s){let o;if(z(n,Q)){const a={};if(z(r,Q)){const u=F(r,Q,{});Object.keys(u).forEach(f=>{z(i,f)&&(a[f]=void 0)})}const l=Object.keys(F(n,Q,{})),c={};l.forEach(u=>{const f=F(i,u);let h=F(r,[Q,u],{}),m=F(n,[Q,u],{});z(h,ae)&&(h=Oe(e,h,t,f,s)),z(m,ae)&&(m=Oe(e,m,t,f,s));const d=F(h,"type"),p=F(m,"type");if(!d||d===p)if(z(a,u)&&delete a[u],p==="object"||p==="array"&&Array.isArray(f)){const y=wi(e,t,m,h,f,s);(y!==void 0||p==="array")&&(c[u]=y)}else{const y=F(m,"default",Mt),S=F(h,"default",Mt);y!==Mt&&y!==f&&(S===f?a[u]=y:F(m,"readOnly")===!0&&(a[u]=void 0));const O=F(m,"const",Mt),E=F(h,"const",Mt);O!==Mt&&O!==f&&(a[u]=E===f?O:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...c}}else if(F(r,"type")==="array"&&F(n,"type")==="array"&&Array.isArray(i)){let a=F(r,"items"),l=F(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){z(a,ae)&&(a=Oe(e,a,t,i,s)),z(l,ae)&&(l=Oe(e,l,t,i,s));const c=F(a,"type"),u=F(l,"type");if(!c||c===u){const f=F(n,"maxItems",-1);u==="object"?o=i.reduce((h,m)=>{const d=wi(e,t,l,a,m,s);return d!==void 0&&(f<0||h.length<f)&&h.push(d),h},[]):o=f>0&&i.length>f?i.slice(0,f):i}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}class Ky{constructor(t,n,r,i){n&&n[gn]===nr?this.rootSchema=vi(n,F(n,le,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!fe(this.rootSchema,n)||!fe(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,n,r){return Fy(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,i){return Sn(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,i){return gl(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(t,n,r){return qy(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return Rn(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return rs(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return sr(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return Sl(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return os(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return ss(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,n){return Hy(this.validator,t,this.rootSchema,n)}retrieveSchema(t,n,r){return Oe(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return wi(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return wl(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function Gy(e,t,n={},r){return new Ky(e,t,n,r)}function zy(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",c=decodeURI(((t=a.map(u=>u.split("=")).find(([u])=>u==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const u=atob(s),f=new Array(u.length);for(let m=0;m<u.length;m++)f[m]=u.charCodeAt(m);return{blob:new window.Blob([new Uint8Array(f)],{type:l}),name:c}}catch(u){throw new Error("File is invalid: "+u.message)}}function lt(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function Al(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return Al(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:lt(r,2)});return n}function xo(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function Yy(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function Jy(e,t){return Yy(e,t)}function as(e,t){return Array.isArray(t)?t.some(n=>fe(n,e)):fe(t,e)}function Zy(e,t=[],n=!1){const r=t.map((i,s)=>as(i.value,e)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Xy(e,t,n,r="indexed",i){if(typeof e>"u"||n&&Array.isArray(e)&&e.length<1||!n&&e===i)return i;if(r==="realValue")return n?e.map(String):String(e);const o=Zy(e,t,n);return typeof o>"u"?i:o}function _r(e,t=[],n){if(Array.isArray(e))return e.map(s=>_r(s,t)).filter(s=>s!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function Eo(e,t,n){if(e===""||!Array.isArray(t))return n;const r=t.find(s=>String(s.value)===e);if(r)return r.value;const i=Number(e);return!isNaN(i)&&i>=0&&i<t.length?t[i].value:n}function _t(e,t,n="indexed",r){return n!=="realValue"?_r(e,t,r):Array.isArray(e)?e.map(i=>Eo(i,t,r)):Eo(e,t,r)}function ls(e,t,n="indexed"){return n!=="realValue"?String(t):en(e)?"":String(typeof e=="object"?t:e)}function Qy(e,t,n=[]){const r=_r(e,n);return Array.isArray(t)?t.filter(i=>!fe(i,r)):fe(r,t)?void 0:t}function eg(e,t,n=[]){const r=_r(e,n);if(!en(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return t.slice(0,i).concat(r,t.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return t}var tg=1,ng=4;function cs(e){return _n(e,tg|ng)}function rg(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:Gi(e,t,n,r)}class _l{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?F(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},rg(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?cs(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=F(r,Ee);return Array.isArray(i)||(i=[],r[Ee]=i),Array.isArray(t)?se(r,Ee,[...new Set([...i,...t])]):se(r,Ee,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return se(r,Ee,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return se(n,Ee,[]),this}}function ig(e,t){if(e==null)return{};var n=sn(Qi(e),function(r){return[r]});return t=Yi(t),vl(e,n,function(r,i){return t(r,i[0])})}var sg=200;function og(e,t,n,r){var i=-1,s=Xi,o=!0,a=e.length,l=[],c=t.length;if(!a)return l;t.length>=sg&&(s=jn,o=!1,t=new Tt(t));e:for(;++i<a;){var u=e[i],f=u;if(u=u!==0?u:0,o&&f===f){for(var h=c;h--;)if(t[h]===f)continue e;l.push(u)}else s(t,f,r)||l.push(u)}return l}var ag=Er(function(e,t){return Dn(e)?og(e,Vn(t,1,Dn,!0)):[]});function Ao(e,t){const n=gt(e),r=gt(t);if(e===t||!n&&!r)return[];if(n&&!r)return Me(e);if(!n&&r)return Me(t);{const i=Me(ig(e,(o,a)=>!fe(o,F(t,a)))),s=ag(Me(t),Me(e));return[...i,...s]}}function lg(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:c}=e,u={type:"day",range:[1,31],value:i},f={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},m=[];switch(r){case"MDY":m.push(f,u,h);break;case"DMY":m.push(u,f,h);break;default:m.push(h,f,u)}return t&&m.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:c}),m}function cg(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function ug(e,t,n={},r=!0){const i={type:t||"text",...cg(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function us(e){var t;return(t=e?.optionValueFormat)!==null&&t!==void 0?t:"indexed"}const _o={props:{disabled:!1},submitText:"Submit",norender:!1};function fg(e={}){const t=M(e);if(t&&t[fr]){const n=t[fr];return{..._o,...n}}return _o}function q(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const i=n[e];return r[i]}return n[e]||r[e]}var dg=0;function Il(e){var t=++dg;return Vi(e)+t}function fs(){if(typeof process>"u"||F(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,Il("test-id-")),e.get(n)}})}const Vr={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function hg(e){let t=F(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>w.jsx(e,{options:{...n,...r},...i}),se(e,"MergedWidget",t)}return t}function Je(e,t,n={}){const r=ke(e);if(typeof t=="function"||t&&Es.isForwardRef(N.createElement(t))||Es.isMemo(t))return hg(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const i=n[t];return Je(e,i,n)}if(typeof r=="string"){if(!(r in Vr))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in Vr[r]){const i=n[Vr[r][t]];return Je(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function pg(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function mg(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Ke(e){return pg(mg(e))}function yg(e){return Ke(e)}function gg(e,t,n={}){try{return Je(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Dt(e,t){return`${St(e)?e:e[le]}__${t}`}function Hn(e){return Dt(e,"description")}function Tl(e){return Dt(e,"error")}function ds(e){return Dt(e,"examples")}function Cl(e){return Dt(e,"help")}function hs(e){return Dt(e,"title")}function Nt(e,t=!1){const n=t?` ${ds(e)}`:"";return`${Tl(e)} ${Hn(e)} ${Cl(e)}${n}`}function Pl(e,t){return`${e}-${t}`}function At(e,t){return Dt(e,t)}function Hr(e,t){return Dt(e,`optional${t}`)}function ln(e){return!en(e)&&(!Z(e)||Array.isArray(e)||!pe(e))}function bg(e,t){const{rootSchema:n,schemaUtils:r}=e;if($n(t,n))return!0;if(ae in n){const i=r.retrieveSchema(n);return $n(t,Qt(i,En))}return!1}function Sg(e,t,n){return t?n:e}function vg(e){return e?new Date(e).toJSON():void 0}function ps(e,t,n){const r=[_u];return z(e,js)&&r.unshift(js),F(e,[...r,t],n)}function or(e){if(en(e)||e==="")return!0;if(Array.isArray(e))return e.length===0;if(W(e)){const t=e;return Object.keys(t).every(r=>or(t[r]))}return!1}function Kt(e,t,n,r){if(!W(t))return r;const i=Oe(e,t,n,r);if(Array.isArray(r)){const u=i.items;if(!u)return r;let f=!1;const h=r.map((m,d)=>{let p=u;Array.isArray(u)&&(p=u[d]||i.additionalItems||{});const y=Kt(e,p,n,m);return y!==m&&(f=!0),y===void 0?{}:y});return f?h:r}const{properties:s,required:o=[]}=i;if(!W(r)||!s)return r;const a={},l=r;let c=!1;for(const u of Object.keys(l)){const f=l[u],h=s[u]||{},m=o.includes(u),d=W(f),p=Array.isArray(f);if((d||p)&&s[u]){const y=Kt(e,h,n,f);if(!m&&or(y))continue;a[u]=y,c=!0}else{if(!m&&or(f)&&s[u])continue;a[u]=f,or(f)||(c=!0)}}if(!(!c&&Object.keys(a).length===0))return a}function Og(e,t){if(!Array.isArray(t))return e;const n=u=>u.reduce((f,h)=>(f[h]=!0,f),{}),r=u=>u.length>1?`properties '${u.join("', '")}'`:`property '${u[0]}'`,i=n(e),s=t.filter(u=>u==="*"||i[u]),o=n(s),a=e.filter(u=>!o[u]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const c=[...s];return c.splice(l,1,...a),c}function Kr(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function wg(e,t,n){var r,i;const s=(r=e[En])!==null&&r!==void 0?r:e[ae],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!t||pe(t)?l={...a}:l=Pt(a,t):l=t||{},o){let c=e;if(s&&e[ae]&&!e[En])try{c=ns(s,n.rootSchema)}catch(u){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
25
|
-
`,u),l}for(const u of[B,Y]){const f=c[u];if(!Array.isArray(f)||f.length===0)continue;const h=l[u],m=Array.isArray(h)?[...h]:[];let d=!1;for(let p=0;p<f.length;p++){const y=f[p],S=(i=y?.[En])!==null&&i!==void 0?i:y?.[ae];if(S&&S in o){const O=m[p]||{};m[p]=Pt(o[S],O),d=!0}}d&&(l[u]=m)}}return l}function ar(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return ar(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return ar(e.oneOf[0]);if(e.allOf){const t=n=>ar(n);return e.allOf.some(t)}return!1}function Fl(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=e;return!xo(o,t)||!xo(a,n)}const{props:i,state:s}=e;return!fe(i,t)||!fe(s,n)}function Io(e){const t=Ga(e.map(n=>Z(n)?ke(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Kn(e,t,n,r){const{enableOptionalDataFieldForType:i=[]}=M(r,e.globalUiOptions);let s;return Y in t&&Array.isArray(t[Y])?s=Io(t[Y]):B in t&&Array.isArray(t[B])?s=Io(t[B]):s=ke(t),!bg(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function To(e,t=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=e,l=Date.UTC(n,r-1,i,s,o,a),c=new Date(l).toJSON();return t?c:c.slice(0,10)}function ms(e,t=[]){if(!e)return[];let n=[];return Ee in e&&(n=n.concat(e[Ee].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Ee){const s=e[i];gt(s)&&(r=r.concat(ms(s,[...t,i])))}return r},n)}function jl(e){return ve(e)?sn(e,bt):Wn(e)?[e]:Zi(_a(Vi(e)))}function xg(e){const t=new _l;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:jl(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&t.addErrors(i,s)}),t.ErrorSchema}function Ne(e,t,n,r){const i=Array.isArray(n)?n:n?.path,s=e===""?[]:[e],o=i?i.concat(...s):s,a=[t.idPrefix,...o].join(t.idSeparator);let l;return t.nameGenerator&&o.length>0&&(l=t.nameGenerator(o,t.idPrefix,r)),{path:o,[le]:a,...l!==void 0&&{name:l}}}function $l(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return gt(r)?{...t,[n]:$l(r)}:{...t,[n]:r}}},{})}function Eg(e){return Object.values(e).every(t=>t!==-1)}function Ag(e){const{className:t="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:c,autofocus:u,registry:f,onBlur:h,onFocus:m}=e,d=`${o}_${n}`,{SelectWidget:p}=f.widgets,y=N.useCallback(S=>s(n,S),[s,n]);return w.jsx(p,{schema:{type:"integer"},id:d,name:a,className:t,options:{enumOptions:Al(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:c,autofocus:u,onChange:y,onBlur:h,onFocus:m,registry:f,label:"","aria-describedby":Nt(o)})}function _g(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=e,[a,l]=N.useState(Kr(o,t));N.useEffect(()=>{l(Kr(o,t))},[t,o]);const c=N.useCallback((m,d)=>{const p={...a,[m]:typeof d>"u"?-1:d};Eg(p)?s(To(p,t)):l(p)},[a,s,t]),u=N.useCallback(m=>{m.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),f=N.useCallback(m=>{if(m.preventDefault(),n||r)return;const d=Kr(new Date().toJSON(),t);s(To(d,t))},[n,r,t,s]);return{elements:N.useMemo(()=>lg(a,t,i.yearsRange,i.format),[a,t,i.yearsRange,i.format]),handleChange:c,handleClear:u,handleSetNow:f}}function Rt(e){const t=N.useRef(e);return $n(e,t.current)||(t.current=e),t.current}function Ig(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Tg(e){const{name:t,size:n,type:r}=e;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:Ig(a.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function Cg(e){return Promise.all(Array.from(e).map(Tg))}function Co(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=zy(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function Pg(e,t,n=!1){const r=N.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),i=N.useMemo(()=>Array.isArray(e)?Co(e):Co([e||""]),[e]),s=N.useCallback(a=>{Cg(a).then(l=>{const c=l.map(u=>u.dataURL||null);t(n?r.concat(...c):c[0])})},[r,n,t]),o=N.useCallback(a=>{if(n){const l=r.filter((c,u)=>u!==a);t(l)}else t(void 0)},[r,n,t]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Fg(e){if(!e)return"";const t=new Date(e),n=lt(t.getFullYear(),4),r=lt(t.getMonth()+1,2),i=lt(t.getDate(),2),s=lt(t.getHours(),2),o=lt(t.getMinutes(),2),a=lt(t.getSeconds(),2),l=lt(t.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function vn(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:i}=e;let s=ms(t),o=t;return pe(i)||(o=Pt(i,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function jg(e){for(const t in e){const n=e,r=n[t];t===ae&&typeof r=="string"&&r.startsWith("#")?n[t]=da+r:n[t]=ys(r)}return e}function $g(e){for(let t=0;t<e.length;t++)e[t]=ys(e[t]);return e}function ys(e){return Array.isArray(e)?$g([...e]):Z(e)?jg({...e}):e}var te;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(te||(te={}));function Dg(e,t){var n=ve(e)?zi:hl;return n(e,Ca(t))}function Ng(e,t){return e==null?!0:nl(e,t)}function xi(){return Il("rjsf-array-item-")}function Po(e){return Array.isArray(e)?e.map(t=>({key:xi(),item:t})):[]}function Dl(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Rg(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function Nl(e,t,n,r){let{addable:i}=M(r,e.globalUiOptions);return i!==!1&&(t.maxItems!==void 0?i=n.length<t.maxItems:i=!0),i}function Rl(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return e.items}function Mg(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:is(t)&&wu(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Ug(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:c,onBlur:u,onFocus:f,registry:h,rawErrors:m,name:d,onSelectChange:p}=e,{widgets:y,schemaUtils:S,globalFormOptions:O,globalUiOptions:E}=h,b=S.retrieveSchema(t.items,i),g=r?.items??r,v=tn(b,g),{widget:x="select",title:A,..._}=M(r,E),I=Je(t,x,y),P=A??t.title??d,T=S.getDisplayLabel(t,r,E),C=Rt(Ne("",O,n,!0));return w.jsx(I,{id:C[le],name:d,multiple:!0,onChange:p,onBlur:u,onFocus:f,options:{..._,enumOptions:v},schema:t,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:P,hideLabel:!T,placeholder:c,autofocus:a,rawErrors:m,htmlName:C.name})}function kg(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:c,onBlur:u,onFocus:f,formData:h=[],registry:m,rawErrors:d,name:p,onSelectChange:y}=e,{widgets:S,schemaUtils:O,globalFormOptions:E,globalUiOptions:b}=m,{widget:g,title:v,...x}=M(r,b),A=Je(t,g,S),_=v??t.title??p,I=O.getDisplayLabel(t,r,b),P=Rt(Ne("",E,n,!0));return w.jsx(A,{id:P[le],name:p,multiple:!0,onChange:y,onBlur:u,onFocus:f,options:x,schema:t,uiSchema:r,registry:m,value:h,disabled:i,readonly:s,hideError:l,required:a,label:_,hideLabel:!I,placeholder:c,autofocus:o,rawErrors:d,htmlName:P.name})}function Lg(e){const{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:c,onFocus:u,registry:f,formData:h=[],rawErrors:m,onSelectChange:d}=e,{widgets:p,schemaUtils:y,globalFormOptions:S,globalUiOptions:O}=f,{widget:E="files",title:b,...g}=M(n,O),v=Je(t,E,p),x=b??t.title??i,A=y.getDisplayLabel(t,n,O),_=Rt(Ne("",S,r,!0));return w.jsx(v,{options:g,id:_[le],name:i,multiple:!0,onChange:d,onBlur:c,onFocus:u,schema:t,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:f,autofocus:a,rawErrors:m,label:x,hideLabel:!A,htmlName:_.name})}function Ml(e){const{itemKey:t,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:c,canAdd:u,canRemove:f=!0,canMoveUp:h,canMoveDown:m,itemSchema:d,itemData:p,itemUiSchema:y,itemFieldPathId:S,itemErrorSchema:O,autofocus:E,onBlur:b,onFocus:g,onChange:v,rawErrors:x,totalItems:A,title:_,handleAddItem:I,handleCopyItem:P,handleRemoveItem:T,handleReorderItems:C}=e,{schemaUtils:D,fields:{ArraySchemaField:j,SchemaField:$},globalUiOptions:k}=a,K=Rt(S),L=j||$,ee=q("ArrayFieldItemTemplate",a,l),re=D.getDisplayLabel(d,y,k),{description:ce}=M(y),me=!!ce||!!d.description,{orderable:R=!0,removable:ie=!0,copyable:J=!1}=l,V={moveUp:R&&h,moveDown:R&&m,copy:J&&u,remove:ie&&f,toolbar:!1};V.toolbar=Object.keys(V).some(be=>V[be]);const H=N.useCallback(be=>{I(be,n+1)},[I,n]),U=N.useCallback(be=>{P(be,n)},[P,n]),X=N.useCallback(be=>{T(be,n)},[T,n]),ne=N.useCallback(be=>{C(be,n,n-1)},[C,n]),we=N.useCallback(be=>{C(be,n,n+1)},[C,n]),xe={children:w.jsx(L,{name:r,title:_,index:n,schema:d,uiSchema:y,formData:p,errorSchema:O,fieldPathId:K,required:Rg(d),onChange:v,onBlur:b,onFocus:g,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:x}),buttonsProps:{fieldPathId:K,disabled:i,readonly:o,canAdd:u,hasCopy:V.copy,hasMoveUp:V.moveUp,hasMoveDown:V.moveDown,hasRemove:V.remove,index:n,totalItems:A,onAddItem:H,onCopyItem:U,onRemoveItem:X,onMoveUpItem:ne,onMoveDownItem:we,registry:a,schema:d,uiSchema:y},itemKey:t,className:"rjsf-array-item",disabled:i,hasToolbar:V.toolbar,index:n,totalItems:A,readonly:o,registry:a,schema:d,uiSchema:y,parentUiSchema:c,displayLabel:re,hasDescription:me};return w.jsx(ee,{...xe})}function Bg(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:f=!1,hideError:h=!1,registry:m,onBlur:d,onFocus:p,rawErrors:y,onChange:S,keyedFormData:O,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v}=e,x=t.title||a||o,{schemaUtils:A,fields:_,formContext:I,globalFormOptions:P,globalUiOptions:T}=m,{OptionalDataControlsField:C}=_,D=M(n,T),j=Z(t.items)?t.items:{},$=A.retrieveSchema(j),k=Dl(O),K=Kn(m,t,f,n),L=ln(s),ee=Nl(m,t,k,n)&&(!K||L),re=L?O:[],ce=K?" rjsf-optional-array-field":"",me=e.childFieldPathId??i,R=K?w.jsx(C,{...e,fieldPathId:me}):void 0,ie={canAdd:ee,items:re.map((V,H)=>{const{key:U,item:X}=V,ne=X,we=A.retrieveSchema(j,ne),xe=r?r[H]:void 0,be=Ne(H,P,me),Ce=Rl(n,X,H,I),it={itemKey:U,index:H,name:o&&`${o}-${H}`,registry:m,uiOptions:D,parentUiSchema:n,hideError:h,readonly:c,disabled:l,required:f,title:x?`${x}-${H+1}`:void 0,canAdd:ee,canMoveUp:H>0,canMoveDown:H<k.length-1,itemSchema:we,itemFieldPathId:be,itemErrorSchema:xe,itemData:ne,itemUiSchema:Ce,autofocus:u&&H===0,onBlur:d,onFocus:p,rawErrors:y,totalItems:O.length,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v,onChange:S};return w.jsx(Ml,{...it},U)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${ce}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:c,required:f,schema:t,title:x,formData:k,rawErrors:y,registry:m,optionalDataControl:R},J=q("ArrayFieldTemplate",m,D);return w.jsx(J,{...ie})}function Wg(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:f=!1,hideError:h=!1,registry:m,onBlur:d,onFocus:p,rawErrors:y,keyedFormData:S,onChange:O,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v}=e;let{formData:x=[]}=e;const A=t.title||a||o,{schemaUtils:_,fields:I,formContext:P,globalFormOptions:T,globalUiOptions:C}=m,D=M(n,C),{OptionalDataControlsField:j}=I,$=Kn(m,t,f,n),k=ln(r),L=(Z(t.items)?t.items:[]).map((H,U)=>_.retrieveSchema(H,x[U])),ee=Z(t.additionalItems)?_.retrieveSchema(t.additionalItems,r):null,re=e.childFieldPathId??s;x.length<L.length&&(x=x.concat(new Array(L.length-x.length)));const ce=k?S:[],me=$?" rjsf-optional-array-field":"",R=$?w.jsx(j,{...e,fieldPathId:re}):void 0,ie=Nl(m,t,x,n)&&!!ee&&(!$||k),J={canAdd:ie,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${me}`,disabled:l,fieldPathId:s,formData:r,items:ce.map((H,U)=>{const{key:X,item:ne}=H,we=ne,xe=U>=L.length,be=(xe&&Z(t.additionalItems)?_.retrieveSchema(t.additionalItems,we):L[U])||{},Ce=Ne(U,T,re);let it;xe?it=n.additionalItems:Array.isArray(n.items)?it=n.items[U]:it=Rl(n,ne,U,P);const cn=i?i[U]:void 0,un={index:U,itemKey:X,name:o&&`${o}-${U}`,registry:m,uiOptions:D,parentUiSchema:n,hideError:h,readonly:c,disabled:l,required:f,title:A?`${A}-${U+1}`:void 0,canAdd:ie,canRemove:xe,canMoveUp:U>=L.length+1,canMoveDown:xe&&U<x.length-1,itemSchema:be,itemData:we,itemUiSchema:it,itemFieldPathId:Ce,itemErrorSchema:cn,autofocus:u&&U===0,onBlur:d,onFocus:p,rawErrors:y,totalItems:S.length,onChange:O,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v};return w.jsx(Ml,{...un},X)}),onAddClick:E,readonly:c,required:f,registry:m,schema:t,uiSchema:n,title:A,errorSchema:i,rawErrors:y,optionalDataControl:R},V=q("ArrayFieldTemplate",m,D);return w.jsx(V,{...J})}function qg(e=[]){const t=N.useMemo(()=>Ke(e),[e]),[n,r]=N.useState(()=>({formDataHash:t,keyedFormData:Po(e)}));let{keyedFormData:i,formDataHash:s}=n;if(t!==s){const a=Array.isArray(e)?e:[],l=i||[];i=a.length===l.length?l.map((c,u)=>({key:c.key,item:a[u]})):Po(a),s=t,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=Dl(a),c=Ke(l);return r({formDataHash:c,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Vg(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=e,{globalFormOptions:l,schemaUtils:c,translateString:u}=s,{keyedFormData:f,updateKeyedFormData:h}=qg(o),m=e.childFieldPathId??i,d=N.useCallback((v,x)=>{v&&v.preventDefault();let A;if(r){A={};for(const P in r){const T=parseInt(P);x===void 0||T<x?se(A,[T],r[P]):T>=x&&se(A,[T+1],r[P])}}const _={key:xi(),item:Mg(s,t)},I=[...f];x!==void 0?I.splice(x,0,_):I.push(_),a(h(I),m.path,A)},[f,s,t,a,h,r,m]),p=N.useCallback((v,x)=>{v&&v.preventDefault();let A;if(r){A={};for(const P in r){const T=parseInt(P);T<=x?se(A,[T],r[P]):T>x&&se(A,[T+1],r[P])}}const _={key:xi(),item:cs(f[x].item)},I=[...f];x!==void 0?I.splice(x+1,0,_):I.push(_),a(h(I),m.path,A)},[f,a,h,r,m]),y=N.useCallback((v,x)=>{v&&v.preventDefault();let A;if(r){A={};for(const I in r){const P=parseInt(I);P<x?se(A,[P],r[I]):P>x&&se(A,[P-1],r[I])}}const _=f.filter((I,P)=>P!==x);a(h(_),m.path,A)},[f,a,h,r,m]),S=N.useCallback((v,x,A)=>{v&&(v.preventDefault(),v.currentTarget.blur());let _;if(r){_={};for(const T in r){const C=parseInt(T);C==x?se(_,[A],r[x]):C==A?se(_,[x],r[A]):se(_,[T],r[C])}}function I(){const T=f.slice();return T.splice(x,1),T.splice(A,0,f[x]),T}const P=I();a(h(P),m.path,_)},[f,a,h,r,m]),O=N.useCallback((v,x,A,_)=>{a(v===void 0?null:v,x,A,_)},[a]),E=N.useCallback(v=>{a(v,m.path,void 0,m?.[le])},[a,m]),b={...e,formData:o,fieldPathId:m,onSelectChange:E},g={...e,handleAddItem:d,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:S,keyedFormData:f,onChange:O};if(!(Jt in t)){if(!l.useFallbackUiForUnsupportedType){const x=M(n),A=q("UnsupportedFieldTemplate",s,x);return w.jsx(A,{schema:t,fieldPathId:i,reason:u(te.MissingItems),registry:s})}const v={...t,[Jt]:{type:void 0}};b.schema=v,g.schema=v}return c.isMultiSelect(b.schema)?w.jsx(Ug,{...b}):bl(n)?w.jsx(kg,{...b}):is(b.schema)?w.jsx(Wg,{...g}):c.isFilesArray(b.schema,n)?w.jsx(Lg,{...b}):w.jsx(Bg,{...g})}function Hg(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:c,hideError:u,autofocus:f,title:h,onChange:m,onFocus:d,onBlur:p,rawErrors:y}=e,{title:S}=t,{widgets:O,translateString:E,globalUiOptions:b}=o,{widget:g="checkbox",title:v,label:x=!0,enumNames:A,..._}=M(r,b),I=Je(t,g,O),P=E(te.YesLabel),T=E(te.NoLabel);let C;const D=v??S??h??n;if(Array.isArray(t.oneOf))C=tn({oneOf:t.oneOf.map($=>{if(Z($))return{...$,title:$.title||($.const===!0?P:T)}}).filter($=>$)},r);else{const $=t.enum??[!0,!1];!A&&$.length===2&&$.every(k=>typeof k=="boolean")?C=[{value:$[0],label:$[0]?P:T},{value:$[1],label:$[1]?P:T}]:C=tn({enum:$},r)}const j=N.useCallback(($,k,K)=>m($,i.path,k,K),[m,i]);return w.jsx(I,{options:{..._,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,onChange:j,onFocus:d,onBlur:p,label:D,hideLabel:!x,value:s,required:a,disabled:l,readonly:c,hideError:u,registry:o,autofocus:f,rawErrors:y,htmlName:i.name})}function Kg(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Gg(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function zg(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function Yg(e){const{id:t,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:c=!1,onBlur:u,onFocus:f,registry:h,fieldPathId:m,onChange:d,errorSchema:p}=e,{translateString:y,fields:S,globalFormOptions:O}=h,[E,b]=N.useState(Gg(n)),g=M(o),v=Rt(Ne("__internal_type_selector",O,m)),x=y(te.Type),A=N.useMemo(()=>Kg(x),[x]),_=T=>{T!=null&&(b(T),d(zg(n,T),m.path,p,t))};if(!O.useFallbackUiForUnsupportedType){const{reason:T=y(te.UnknownFieldType,[String(i.type)])}=e,C=q("UnsupportedFieldTemplate",h,g);return w.jsx(C,{schema:i,fieldPathId:m,reason:T,registry:h})}const I=q("FallbackFieldTemplate",h,g),{SchemaField:P}=S;return w.jsx(I,{schema:i,registry:h,typeSelector:w.jsx(P,{fieldPathId:v,name:`${s}__fallback_type`,schema:A,formData:E,onChange:_,onBlur:u,onFocus:f,registry:h,hideLabel:!r,disabled:l,readonly:c,required:a},n?Ke(n):"__empty__"),schemaField:w.jsx(P,{...e,schema:{type:E,title:y(te.Value),...E==="object"&&{additionalProperties:!0}}})})}function Jg(e,t){return sn(t,function(n){return e[n]})}function Zg(e){return e==null?[]:Jg(e,Me(e))}var Xg=Math.max;function Qg(e,t,n,r){e=$t(e)?e:Zg(e),n=n?Pa(n):0;var i=e.length;return n<0&&(n=Xg(i+n,0)),St(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ha(e,t,n)>-1}var eb=Math.min;function tb(e,t,n){for(var r=Xi,i=e[0].length,s=e.length,o=s,a=Array(s),l=1/0,c=[];o--;){var u=e[o];l=eb(u.length,l),a[o]=i>=120&&u.length>=120?new Tt(o&&u):void 0}u=e[0];var f=-1,h=a[0];e:for(;++f<i&&c.length<l;){var m=u[f],d=m;if(m=m!==0?m:0,!(h?jn(h,d):r(c,d))){for(o=s;--o;){var p=a[o];if(!(p?jn(p,d):r(e[o],d)))continue e}h&&h.push(d),c.push(m)}}return c}function nb(e){return Dn(e)?e:[]}var Fo=Er(function(e){var t=sn(e,nb);return t.length&&t[0]===e[0]?tb(t):[]});function Ul(e){return e===void 0}var Ge;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Ge||(Ge={}));var In;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(In||(In={}));const rb=/^\$lookup=(.+)/,Gr="layoutGrid";function jo(e,t){return e??t}function ib(e){return/^\d+?$/.test(e)}const pt=fs();function sb(e,t,n,r,i){const s=F(n,[fi],{}),o=F(n,e),a={...F(o,[dt],{}),...t,...s},l={...o};pe(a)||se(l,[dt],a),pe(s)||se(l,[fi],s);let{readonly:c}=M(l);return(i===!0||Ul(c)&&r===!0)&&(c=!0,z(a,Pr)?se(l,[dt,Pr],!0):se(l,`ui:${Pr}`,!0)),{fieldUiSchema:l,uiReadonly:c}}function ob(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=Si([t]).sort(),i=Si([n]).sort();switch(e){case In.ALL:return $n(r,i);case In.SOME:return Fo(r,i).length>0;case In.NONE:return Fo(r,i).length===0;default:return!1}}function Ir(e,t,n){let r={},i=e[t];if(gt(i)){const{children:s,className:o,...a}=i;if(i=s,o){const c=o.split(" ").map(u=>ps(n,u,u)).join(" ");r={...a,className:c}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function $o(e,t,n){let r;if(ib(n)&&e&&e?.type==="array"&&z(e,Jt)){const i=Number(n),s=e[Jt];Array.isArray(s)?i>s.length?r=tl(s):r=s[i]:r=s,t={[le]:t[le],path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function ab(e,t,n,r,i){const{schemaUtils:s,globalFormOptions:o}=e;let a=n,l=i;const c=t.split("."),u=c.pop();let f=s.retrieveSchema(a,r),h=r,m=f.readOnly;c.forEach(y=>{if(l=Ne(y,o,l),z(f,Q))a=F(f,[Q,y],{});else if(f&&(z(f,B)||z(f,Y))){const S=z(f,B)?B:Y,O=s.findSelectedOptionInXxxOf(f,y,S,h);a=F(O,[Q,y],{})}else{const S=$o(f,l,y);a=S.rawSchema??{},l=S.fieldPathId}h=F(h,y,{}),f=s.retrieveSchema(a,h),m=jo(f.readOnly,m)});let d,p=!1;if(pe(f)&&(f=void 0),f&&u){if(f&&(z(f,B)||z(f,Y))){const S=z(f,B)?B:Y;f=s.findSelectedOptionInXxxOf(f,u,S,h)}l=Ne(u,o,l),p=f!==void 0&&Array.isArray(f.required)&&Qg(f.required,u);const y=$o(f,l,u);if(y.rawSchema?(f=y.rawSchema,l=y.fieldPathId):(f=F(f,[Q,u]),f=f&&s.retrieveSchema(f)),m=jo(f?.readOnly,m),f&&(z(f,B)||z(f,Y))){const S=z(f,B)?B:Y,O=Ye(f);d={options:f[S],hasDiscriminator:!!O}}}return{schema:f,isRequired:p,isReadonly:m,optionsInfo:d,fieldPathId:l}}function lb(e,t){let n=e;return St(n)&&(n=ps(t,n)),kn(n)?n:null}function cb(e,t){let n,r=null,i={},s;if(St(t)||Ul(t))n=t??"";else{const{name:o="",render:a,...l}=t;n=o,i=l,pe(i)||Dg(i,(c,u)=>{if(St(c)){const f=rb.exec(c);if(Array.isArray(f)&&f.length>1){const h=f[1];i[u]=ps(e,h,h)}}}),r=lb(a,e),!o&&r&&(s=w.jsx(r,{...l,"data-testid":pt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function Tr(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return t.map(l=>N.createElement(gs,{...n,key:`layoutGrid-${Ke(l)}`,schema:a,layoutGridSchema:l}))}function ub(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:s,gridProps:o}=Ir(t,Ge.CONDITION,i),{operator:a,field:l="",value:c}=o,u=F(r,l,null);return ob(a,u,c)?w.jsx(Tr,{...n,childrenLayoutGridSchemaId:s}):null}function fb(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Ir(t,Ge.COLUMN,r),a=M(i),l=q("GridTemplate",r,a);return w.jsx(l,{column:!0,"data-testid":pt.col,...o,children:w.jsx(Tr,{...n,childrenLayoutGridSchemaId:s})})}function db(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Ir(t,Ge.COLUMNS,r),a=M(i),l=q("GridTemplate",r,a);return s.map(c=>w.jsx(l,{column:!0,"data-testid":pt.col,...o,children:w.jsx(Tr,{...n,childrenLayoutGridSchemaId:[c]})},`column-${Ke(c)}`))}function hb(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Ir(t,Ge.ROW,r),a=M(i),l=q("GridTemplate",r,a);return w.jsx(l,{...o,"data-testid":pt.row,children:w.jsx(Tr,{...n,childrenLayoutGridSchemaId:s})})}function pb(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:c,registry:u,layoutGridSchema:f,...h}=e,{onChange:m}=h,{fields:d}=u,{SchemaField:p,LayoutMultiSchemaField:y}=d,S=cb(u,t),{name:O,UIComponent:E,uiProps:b}=S,{schema:g,isRequired:v,isReadonly:x,optionsInfo:A,fieldPathId:_}=ab(u,O,n,l,s),I=Rt(_);if(S.rendered)return S.rendered;if(g){const P=A?.hasDiscriminator?y:p,{fieldUiSchema:T,uiReadonly:C}=sb(O,b,r,x,c);return w.jsx(P,{"data-testid":A?.hasDiscriminator?pt.layoutMultiSchemaField:pt.field,...h,name:O,required:v,readonly:C,schema:g,uiSchema:T,errorSchema:F(i,O),fieldPathId:I,formData:F(l,O),onChange:m,onBlur:o,onFocus:a,options:A?.options,registry:u})}return E?w.jsx(E,{"data-testid":pt.uiComponent,...h,name:O,required:v,formData:l,readOnly:!!x||c,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:u,...b}):null}function gs(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=M(t);if(!n&&Gr in r&&Z(r[Gr])&&(n=r[Gr]),Z(n)){if(Ge.ROW in n)return w.jsx(hb,{...e,layoutGridSchema:n});if(Ge.COLUMN in n)return w.jsx(fb,{...e,layoutGridSchema:n});if(Ge.COLUMNS in n)return w.jsx(db,{...e,layoutGridSchema:n});if(Ge.CONDITION in n)return w.jsx(ub,{...e,layoutGridSchema:n})}return w.jsx(pb,{...e,gridSchema:n})}gs.TEST_IDS=pt;function mb(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=e,l=M(i,o.globalUiOptions),{title:c}=l,{title:u}=r,f=c||n||u||a;if(!f)return null;const h=q("TitleFieldTemplate",o,l);return w.jsx(h,{id:hs(t),title:f,required:s,schema:r,uiSchema:i,registry:o})}function zr(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const o=F(s,[Q,t]);return F(o,yr,F(o,je,r))===n})}function Do(e,t,n,r,i){const s=t.map(l=>n.retrieveSchema(l,i));let o=e;z(e,B)?o={...e,[B]:s}:z(e,Y)&&(o={...e,[Y]:s});const a=tn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function yb(e){const{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:c,registry:u,uiSchema:f,schema:h,autofocus:m,readonly:d,required:p,errorSchema:y,hideError:S=!1}=e,{widgets:O,schemaUtils:E,globalUiOptions:b}=u,[g,v]=N.useState(Do(h,l,E,f,i)),x=F(s,le),A=Ye(h),_=q("FieldErrorTemplate",u,l),I=q("FieldTemplate",u,l),P=Ke(h),T=Ke(l),C=f?Ke(f):"",D=i?Ke(i):"";N.useEffect(()=>{v(Do(h,l,E,f,i))},[P,T,E,C,D]);const{widget:j=A?"radio":"select",title:$="",placeholder:k="",optionsSchemaSelector:K=A,hideError:L,...ee}=M(f);if(!K)throw new Error("No selector field provided for the LayoutMultiSchemaField");const re=F(i,K);let ce=F(g[0]?.schema,[Q,K],{});const me=zr(g,K,re);ce=ce?.type?ce:{...ce,type:me?.type||n};const R=Je(ce,j,O),ie=L===void 0?S:!!L,J=F(y,[Ee],[]),V=Qt(y,[Ee]),H=E.getDisplayLabel(h,f,b),U=we=>{const xe=zr(g,K,we),be=zr(g,K,re);let Ce=E.sanitizeDataForNewSchema(xe,be,i);Ce&&xe&&(Ce=E.getDefaultFormState(xe,Ce,"excludeObjectChildren")),Ce&&se(Ce,K,we),a(Ce,s.path,void 0,x)},X={enumOptions:g,...ee},ne=!ie&&J.length>0?w.jsx(_,{fieldPathId:s,schema:h,errors:J,registry:u}):void 0;return w.jsx(I,{fieldPathId:s,id:x,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(g)&&pe(g),uiSchema:f,required:p,readonly:!!d,registry:u,displayLabel:H,errors:ne,onChange:a,onKeyRename:rr,onKeyRenameBlur:rr,onRemoveProperty:rr,children:w.jsx(R,{id:x,name:t,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(g)&&pe(g),uiSchema:f,autofocus:m,readonly:d,required:p,registry:u,multiple:!1,rawErrors:J,hideError:ie,hideLabel:!H,errorSchema:V,placeholder:k,onChange:U,onBlur:o,onFocus:c,value:re,options:X,htmlName:s.name})})}class No extends N.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(t,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!fe(t.options,i)){const{registry:{schemaUtils:l}}=this.props,c=i.map(u=>l.retrieveSchema(u,r));a={selectedOption:o,retrievedOptions:c}}if(!fe(r,t.formData)&&s.$id===t.fieldPathId.$id){const{retrievedOptions:l}=a,c=this.getMatchingOption(o,r,l);n&&c!==o&&(a={selectedOption:c,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(t,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=Ye(i);return s.getClosestMatchingOption(n,r,t,o)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,c=t!==void 0?parseInt(t,10):-1;if(c===n)return;const u=c>=0?r[c]:void 0,f=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(u,f,i);u&&(h=l.getDefaultFormState(u,h,"excludeObjectChildren")),this.setState({selectedOption:c},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:c,schema:u,uiSchema:f}=this.props,{widgets:h,fields:m,translateString:d,globalUiOptions:p,schemaUtils:y}=c,{SchemaField:S}=m,O=q("MultiSchemaFieldTemplate",c,p),E=Kn(c,u,l,f),b=ln(i),{selectedOption:g,retrievedOptions:v}=this.state,{widget:x="select",placeholder:A,autofocus:_,autocomplete:I,title:P=u.title,...T}=M(f,p),C=Je({type:"number"},x,h),D=F(r,Ee,[]),j=Qt(r,[Ee]),$=y.getDisplayLabel(u,f,p),k=g>=0&&v[g]||null;let K;if(k){const{required:J}=u;K=J?et({required:J},k):k}let L=[];B in u&&f&&B in f?Array.isArray(f[B])?L=f[B]:console.warn(`uiSchema.oneOf is not an array for "${P||t}"`):Y in u&&f&&Y in f&&(Array.isArray(f[Y])?L=f[Y]:console.warn(`uiSchema.anyOf is not an array for "${P||t}"`));let ee=f;g>=0&&L.length>g&&(ee=L[g]);const re=P?te.TitleOptionPrefix:te.OptionPrefix,ce=P?[P]:[],me=v.map((J,V)=>{const{title:H=J.title}=M(L[V]);return{label:H||d(re,ce.concat(String(V+1))),value:V}}),R=!E||b?w.jsx(C,{id:this.getFieldId(),name:`${t}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||pe(me),multiple:!1,rawErrors:D,errorSchema:j,value:g>=0?g:void 0,options:{enumOptions:me,...T},registry:c,placeholder:A,autocomplete:I,autofocus:_,label:P??t,hideLabel:!$,readonly:a}):void 0,ie=K&&K.type!=="null"&&w.jsx(S,{...this.props,schema:K,uiSchema:ee})||null;return w.jsx(O,{schema:u,registry:c,uiSchema:f,selector:R,optionSchemaField:ie})}}const gb=/\.([0-9]*0)*$/,bb=/[0.]0*$/;function Sb(e){const{registry:t,onChange:n,formData:r,value:i}=e,[s,o]=N.useState(i),{StringField:a}=t.fields;let l=r;const c=N.useCallback((u,f,h,m)=>{o(u),`${u}`.charAt(0)==="."&&(u=`0${u}`);const d=typeof u=="string"&&u.match(gb)?Fs(u.replace(bb,"")):Fs(u);n(d,f,h,m)},[n]);if(typeof s=="string"&&typeof l=="number"){const u=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(u)&&(l=s)}return w.jsx(a,{...e,formData:l,onChange:c})}function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ve.apply(null,arguments)}const Jn=["strong","em","del","mark"],Ro=[["**",Jn[0]],["__",Jn[0]],["~~",Jn[2]],["==",Jn[3]],["*","em"],["_","em"]];function vb(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var i=e[r]==="("?")":"]",s=1;for(r++;r<e.length&&s>0;)e[r]!=="\\"?(e[r]==="("&&i===")"&&s++,e[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function Ob(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=Ro[o][0];if(e.startsWith(a)&&e.length>=2*a.length){r=a,i=a.length,s=Ro[o][1];break}}if(!r)return null;for(var l=i,c=!1,u=!1,f="",h=0,m="",d=!1,p="";l<e.length;){var y=e[l];if(d)m+=y,d=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||h!==0){if(y==="["&&!c&&h===0){var S=vb(e,l);if(S!==-1){m+=e.slice(l,S),l=S,p=e[S-1];continue}}if(u)m+=y,f?y===f&&(f=""):y==='"'||y==="'"?f=y:y===">"&&(u=!1),p=y,l++;else if(y!=="<"||c){if(y===`
|
|
23
|
+
}`},config:xu,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}};Pi("workflow_execution",ua);Pi("workflow_execution",ua);function W(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Eu(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),W(e.additionalItems)}function $s(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const ft="__additional_property",Vt="additionalProperties",yt="allOf",Y="anyOf",je="const",yr="default",$i="dependencies",Au="enum",Ee="__errors",le="$id",Di="if",Jt="items",_u="_$junk_option_schema_id$_",tr="$name",B="oneOf",ui="patternProperties",Q="properties",Pr="readonly",fa="required",fr="submitButtonOptions",ae="$ref",En="__rjsf_ref",gn="$schema",da="root",ha="_",Iu=["discriminator","propertyName"],Ds="formContext",Tu="layoutGridLookupMap",Ni="__rjsf_additionalProperties",pa="__rjsf_rootSchema",Cu="ui:field",Ri="ui:widget",dt="ui:options",fi="ui:globalOptions",Pu="ui:definitions",Fu="https://json-schema.org/draft/2019-09/schema",nr="https://json-schema.org/draft/2020-12/schema";function M(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===Ri&&W(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===dt&&W(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t}):{...t}}function ju(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=M(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var ma=typeof global=="object"&&global&&global.Object===Object&&global,$u=typeof self=="object"&&self&&self.Object===Object&&self,Ze=ma||$u||Function("return this")(),$e=Ze.Symbol,ya=Object.prototype,Du=ya.hasOwnProperty,Nu=ya.toString,dn=$e?$e.toStringTag:void 0;function Ru(e){var t=Du.call(e,dn),n=e[dn];try{e[dn]=void 0;var r=!0}catch{}var i=Nu.call(e);return r&&(t?e[dn]=n:delete e[dn]),i}var Mu=Object.prototype,Uu=Mu.toString;function ku(e){return Uu.call(e)}var Lu="[object Null]",Bu="[object Undefined]",Ns=$e?$e.toStringTag:void 0;function tt(e){return e==null?e===void 0?Bu:Lu:Ns&&Ns in Object(e)?Ru(e):ku(e)}function ga(e,t){return function(n){return e(t(n))}}var gr=ga(Object.getPrototypeOf,Object);function De(e){return e!=null&&typeof e=="object"}var Wu="[object Object]",qu=Function.prototype,Vu=Object.prototype,ba=qu.toString,Hu=Vu.hasOwnProperty,Ku=ba.call(Object);function gt(e){if(!De(e)||tt(e)!=Wu)return!1;var t=gr(e);if(t===null)return!0;var n=Hu.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ba.call(n)==Ku}function di(e){const t={[Ee]:[],addError(n){this[Ee].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:di(r)}),t);if(gt(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:di(n[i])}),t)}return t}function Gu(){this.__data__=[],this.size=0}function Un(e,t){return e===t||e!==e&&t!==t}function br(e,t){for(var n=e.length;n--;)if(Un(e[n][0],t))return n;return-1}var zu=Array.prototype,Yu=zu.splice;function Ju(e){var t=this.__data__,n=br(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Yu.call(t,n,1),--this.size,!0}function Zu(e){var t=this.__data__,n=br(t,e);return n<0?void 0:t[n][1]}function Xu(e){return br(this.__data__,e)>-1}function Qu(e,t){var n=this.__data__,r=br(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nt.prototype.clear=Gu;nt.prototype.delete=Ju;nt.prototype.get=Zu;nt.prototype.has=Xu;nt.prototype.set=Qu;function ef(){this.__data__=new nt,this.size=0}function tf(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nf(e){return this.__data__.get(e)}function rf(e){return this.__data__.has(e)}function Z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sf="[object AsyncFunction]",of="[object Function]",af="[object GeneratorFunction]",lf="[object Proxy]";function kn(e){if(!Z(e))return!1;var t=tt(e);return t==of||t==af||t==sf||t==lf}var Fr=Ze["__core-js_shared__"],Rs=(function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function cf(e){return!!Rs&&Rs in e}var uf=Function.prototype,ff=uf.toString;function Ft(e){if(e!=null){try{return ff.call(e)}catch{}try{return e+""}catch{}}return""}var df=/[\\^$.*+?()[\]{}|]/g,hf=/^\[object .+?Constructor\]$/,pf=Function.prototype,mf=Object.prototype,yf=pf.toString,gf=mf.hasOwnProperty,bf=RegExp("^"+yf.call(gf).replace(df,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Sf(e){if(!Z(e)||cf(e))return!1;var t=kn(e)?bf:hf;return t.test(Ft(e))}function vf(e,t){return e?.[t]}function jt(e,t){var n=vf(e,t);return Sf(n)?n:void 0}var Pn=jt(Ze,"Map"),Fn=jt(Object,"create");function Of(){this.__data__=Fn?Fn(null):{},this.size=0}function wf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xf="__lodash_hash_undefined__",Ef=Object.prototype,Af=Ef.hasOwnProperty;function _f(e){var t=this.__data__;if(Fn){var n=t[e];return n===xf?void 0:n}return Af.call(t,e)?t[e]:void 0}var If=Object.prototype,Tf=If.hasOwnProperty;function Cf(e){var t=this.__data__;return Fn?t[e]!==void 0:Tf.call(t,e)}var Pf="__lodash_hash_undefined__";function Ff(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Fn&&t===void 0?Pf:t,this}function It(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}It.prototype.clear=Of;It.prototype.delete=wf;It.prototype.get=_f;It.prototype.has=Cf;It.prototype.set=Ff;function jf(){this.size=0,this.__data__={hash:new It,map:new(Pn||nt),string:new It}}function $f(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Sr(e,t){var n=e.__data__;return $f(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Df(e){var t=Sr(this,e).delete(e);return this.size-=t?1:0,t}function Nf(e){return Sr(this,e).get(e)}function Rf(e){return Sr(this,e).has(e)}function Mf(e,t){var n=Sr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rt.prototype.clear=jf;rt.prototype.delete=Df;rt.prototype.get=Nf;rt.prototype.has=Rf;rt.prototype.set=Mf;var Uf=200;function kf(e,t){var n=this.__data__;if(n instanceof nt){var r=n.__data__;if(!Pn||r.length<Uf-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rt(r)}return n.set(e,t),this.size=n.size,this}function Ue(e){var t=this.__data__=new nt(e);this.size=t.size}Ue.prototype.clear=ef;Ue.prototype.delete=tf;Ue.prototype.get=nf;Ue.prototype.has=rf;Ue.prototype.set=kf;var Lf="__lodash_hash_undefined__";function Bf(e){return this.__data__.set(e,Lf),this}function Wf(e){return this.__data__.has(e)}function Tt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new rt;++t<n;)this.add(e[t])}Tt.prototype.add=Tt.prototype.push=Bf;Tt.prototype.has=Wf;function qf(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function jn(e,t){return e.has(t)}var Vf=1,Hf=2;function Sa(e,t,n,r,i,s){var o=n&Vf,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var f=-1,h=!0,m=n&Hf?new Tt:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var d=e[f],p=t[f];if(r)var y=o?r(p,d,f,t,e,s):r(d,p,f,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(m){if(!qf(t,function(S,O){if(!jn(m,O)&&(d===S||i(d,S,n,r,s)))return m.push(O)})){h=!1;break}}else if(!(d===p||i(d,p,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var dr=Ze.Uint8Array;function Kf(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Mi(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Gf=1,zf=2,Yf="[object Boolean]",Jf="[object Date]",Zf="[object Error]",Xf="[object Map]",Qf="[object Number]",ed="[object RegExp]",td="[object Set]",nd="[object String]",rd="[object Symbol]",id="[object ArrayBuffer]",sd="[object DataView]",Ms=$e?$e.prototype:void 0,jr=Ms?Ms.valueOf:void 0;function od(e,t,n,r,i,s,o){switch(n){case sd:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case id:return!(e.byteLength!=t.byteLength||!s(new dr(e),new dr(t)));case Yf:case Jf:case Qf:return Un(+e,+t);case Zf:return e.name==t.name&&e.message==t.message;case ed:case nd:return e==t+"";case Xf:var a=Kf;case td:var l=r&Gf;if(a||(a=Mi),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=zf,o.set(e,t);var u=Sa(a(e),a(t),r,i,s,o);return o.delete(e),u;case rd:if(jr)return jr.call(e)==jr.call(t)}return!1}function Ui(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ve=Array.isArray;function va(e,t,n){var r=t(e);return ve(e)?r:Ui(r,n(e))}function ad(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Oa(){return[]}var ld=Object.prototype,cd=ld.propertyIsEnumerable,Us=Object.getOwnPropertySymbols,ki=Us?function(e){return e==null?[]:(e=Object(e),ad(Us(e),function(t){return cd.call(e,t)}))}:Oa;function wa(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ud="[object Arguments]";function ks(e){return De(e)&&tt(e)==ud}var xa=Object.prototype,fd=xa.hasOwnProperty,dd=xa.propertyIsEnumerable,Zt=ks((function(){return arguments})())?ks:function(e){return De(e)&&fd.call(e,"callee")&&!dd.call(e,"callee")};function hd(){return!1}var Ea=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ls=Ea&&typeof module=="object"&&module&&!module.nodeType&&module,pd=Ls&&Ls.exports===Ea,Bs=pd?Ze.Buffer:void 0,md=Bs?Bs.isBuffer:void 0,Ct=md||hd,yd=9007199254740991,gd=/^(?:0|[1-9]\d*)$/;function vr(e,t){var n=typeof e;return t=t??yd,!!t&&(n=="number"||n!="symbol"&&gd.test(e))&&e>-1&&e%1==0&&e<t}var bd=9007199254740991;function Li(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bd}var Sd="[object Arguments]",vd="[object Array]",Od="[object Boolean]",wd="[object Date]",xd="[object Error]",Ed="[object Function]",Ad="[object Map]",_d="[object Number]",Id="[object Object]",Td="[object RegExp]",Cd="[object Set]",Pd="[object String]",Fd="[object WeakMap]",jd="[object ArrayBuffer]",$d="[object DataView]",Dd="[object Float32Array]",Nd="[object Float64Array]",Rd="[object Int8Array]",Md="[object Int16Array]",Ud="[object Int32Array]",kd="[object Uint8Array]",Ld="[object Uint8ClampedArray]",Bd="[object Uint16Array]",Wd="[object Uint32Array]",de={};de[Dd]=de[Nd]=de[Rd]=de[Md]=de[Ud]=de[kd]=de[Ld]=de[Bd]=de[Wd]=!0;de[Sd]=de[vd]=de[jd]=de[Od]=de[$d]=de[wd]=de[xd]=de[Ed]=de[Ad]=de[_d]=de[Id]=de[Td]=de[Cd]=de[Pd]=de[Fd]=!1;function qd(e){return De(e)&&Li(e.length)&&!!de[tt(e)]}function Bi(e){return function(t){return e(t)}}var Aa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,An=Aa&&typeof module=="object"&&module&&!module.nodeType&&module,Vd=An&&An.exports===Aa,$r=Vd&&ma.process,Xt=(function(){try{var e=An&&An.require&&An.require("util").types;return e||$r&&$r.binding&&$r.binding("util")}catch{}})(),Ws=Xt&&Xt.isTypedArray,Ln=Ws?Bi(Ws):qd,Hd=Object.prototype,Kd=Hd.hasOwnProperty;function _a(e,t){var n=ve(e),r=!n&&Zt(e),i=!n&&!r&&Ct(e),s=!n&&!r&&!i&&Ln(e),o=n||r||i||s,a=o?wa(e.length,String):[],l=a.length;for(var c in e)(t||Kd.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vr(c,l)))&&a.push(c);return a}var Gd=Object.prototype;function Or(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Gd;return e===n}var zd=ga(Object.keys,Object),Yd=Object.prototype,Jd=Yd.hasOwnProperty;function Ia(e){if(!Or(e))return zd(e);var t=[];for(var n in Object(e))Jd.call(e,n)&&n!="constructor"&&t.push(n);return t}function $t(e){return e!=null&&Li(e.length)&&!kn(e)}function Me(e){return $t(e)?_a(e):Ia(e)}function hi(e){return va(e,Me,ki)}var Zd=1,Xd=Object.prototype,Qd=Xd.hasOwnProperty;function eh(e,t,n,r,i,s){var o=n&Zd,a=hi(e),l=a.length,c=hi(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var h=a[f];if(!(o?h in t:Qd.call(t,h)))return!1}var m=s.get(e),d=s.get(t);if(m&&d)return m==t&&d==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=o;++f<l;){h=a[f];var S=e[h],O=t[h];if(r)var E=o?r(O,S,h,t,e,s):r(S,O,h,e,t,s);if(!(E===void 0?S===O||i(S,O,n,r,s):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var b=e.constructor,g=t.constructor;b!=g&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof g=="function"&&g instanceof g)&&(p=!1)}return s.delete(e),s.delete(t),p}var pi=jt(Ze,"DataView"),mi=jt(Ze,"Promise"),zt=jt(Ze,"Set"),yi=jt(Ze,"WeakMap"),qs="[object Map]",th="[object Object]",Vs="[object Promise]",Hs="[object Set]",Ks="[object WeakMap]",Gs="[object DataView]",nh=Ft(pi),rh=Ft(Pn),ih=Ft(mi),sh=Ft(zt),oh=Ft(yi),Pe=tt;(pi&&Pe(new pi(new ArrayBuffer(1)))!=Gs||Pn&&Pe(new Pn)!=qs||mi&&Pe(mi.resolve())!=Vs||zt&&Pe(new zt)!=Hs||yi&&Pe(new yi)!=Ks)&&(Pe=function(e){var t=tt(e),n=t==th?e.constructor:void 0,r=n?Ft(n):"";if(r)switch(r){case nh:return Gs;case rh:return qs;case ih:return Vs;case sh:return Hs;case oh:return Ks}return t});var ah=1,zs="[object Arguments]",Ys="[object Array]",Yn="[object Object]",lh=Object.prototype,Js=lh.hasOwnProperty;function ch(e,t,n,r,i,s){var o=ve(e),a=ve(t),l=o?Ys:Pe(e),c=a?Ys:Pe(t);l=l==zs?Yn:l,c=c==zs?Yn:c;var u=l==Yn,f=c==Yn,h=l==c;if(h&&Ct(e)){if(!Ct(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new Ue),o||Ln(e)?Sa(e,t,n,r,i,s):od(e,t,l,n,r,i,s);if(!(n&ah)){var m=u&&Js.call(e,"__wrapped__"),d=f&&Js.call(t,"__wrapped__");if(m||d){var p=m?e.value():e,y=d?t.value():t;return s||(s=new Ue),i(p,y,n,r,s)}}return h?(s||(s=new Ue),eh(e,t,n,r,i,s)):!1}function Bn(e,t,n,r,i){return e===t?!0:e==null||t==null||!De(e)&&!De(t)?e!==e&&t!==t:ch(e,t,n,r,Bn,i)}function uh(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Bn(e,t,void 0,n):!!r}function fe(e,t){return uh(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}var fh="[object Symbol]";function Wn(e){return typeof e=="symbol"||De(e)&&tt(e)==fh}var dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hh=/^\w*$/;function Wi(e,t){if(ve(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Wn(e)?!0:hh.test(e)||!dh.test(e)||t!=null&&e in Object(t)}var ph="Expected a function";function qi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ph);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(qi.Cache||rt),n}qi.Cache=rt;var mh=500;function yh(e){var t=qi(e,function(r){return n.size===mh&&n.clear(),r}),n=t.cache;return t}var gh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bh=/\\(\\)?/g,Ta=yh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gh,function(n,r,i,s){t.push(i?s.replace(bh,"$1"):r||n)}),t});function sn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Zs=$e?$e.prototype:void 0,Xs=Zs?Zs.toString:void 0;function Ca(e){if(typeof e=="string")return e;if(ve(e))return sn(e,Ca)+"";if(Wn(e))return Xs?Xs.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Vi(e){return e==null?"":Ca(e)}function on(e,t){return ve(e)?e:Wi(e,t)?[e]:Ta(Vi(e))}function bt(e){if(typeof e=="string"||Wn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wr(e,t){t=on(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[bt(t[n++])];return n&&n==r?e:void 0}function F(e,t,n){var r=e==null?void 0:wr(e,t);return r===void 0?n:r}var Sh=Object.prototype,vh=Sh.hasOwnProperty;function Oh(e,t){return e!=null&&vh.call(e,t)}function Pa(e,t,n){t=on(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=bt(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Li(i)&&vr(o,i)&&(ve(e)||Zt(e)))}function z(e,t){return e!=null&&Pa(e,t,Oh)}function $n(e,t){return Bn(e,t)}var hr=(function(){try{var e=jt(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Hi(e,t,n){t=="__proto__"&&hr?hr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var wh=Object.prototype,xh=wh.hasOwnProperty;function Ki(e,t,n){var r=e[t];(!(xh.call(e,t)&&Un(r,n))||n===void 0&&!(t in e))&&Hi(e,t,n)}function Gi(e,t,n,r){if(!Z(e))return e;t=on(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var l=bt(t[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=o){var u=a[l];c=r?r(u,l,a):void 0,c===void 0&&(c=Z(u)?u:vr(t[i+1])?[]:{})}Ki(a,l,c),a=a[l]}return e}function se(e,t,n){return e==null?e:Gi(e,t,n)}function xr(e){return e}function Fa(e){return typeof e=="function"?e:xr}var Eh=/\s/;function Ah(e){for(var t=e.length;t--&&Eh.test(e.charAt(t)););return t}var _h=/^\s+/;function Ih(e){return e&&e.slice(0,Ah(e)+1).replace(_h,"")}var Qs=NaN,Th=/^[-+]0x[0-9a-f]+$/i,Ch=/^0b[01]+$/i,Ph=/^0o[0-7]+$/i,Fh=parseInt;function jh(e){if(typeof e=="number")return e;if(Wn(e))return Qs;if(Z(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Z(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ih(e);var n=Ch.test(e);return n||Ph.test(e)?Fh(e.slice(2),n?2:8):Th.test(e)?Qs:+e}var eo=1/0,$h=17976931348623157e292;function Dh(e){if(!e)return e===0?e:0;if(e=jh(e),e===eo||e===-eo){var t=e<0?-1:1;return t*$h}return e===e?e:0}function ja(e){var t=Dh(e),n=t%1;return t===t?n?t-n:t:0}var Nh=9007199254740991,Dr=4294967295,Rh=Math.min;function $a(e,t){if(e=ja(e),e<1||e>Nh)return[];var n=Dr,r=Rh(e,Dr);t=Fa(t),e-=Dr;for(var i=wa(r,t);++n<e;)t(n);return i}function zi(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var to=Object.create,Da=(function(){function e(){}return function(t){if(!Z(t))return{};if(to)return to(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function Mh(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var Na=Mh();function Ra(e,t){return e&&Na(e,t,Me)}var Uh=1,kh=2;function Lh(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var a=o[0],l=e[a],c=o[1];if(o[2]){if(l===void 0&&!(a in e))return!1}else{var u=new Ue,f;if(!(f===void 0?Bn(c,l,Uh|kh,r,u):f))return!1}}return!0}function Ma(e){return e===e&&!Z(e)}function Bh(e){for(var t=Me(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ma(i)]}return t}function Ua(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Wh(e){var t=Bh(e);return t.length==1&&t[0][2]?Ua(t[0][0],t[0][1]):function(n){return n===e||Lh(n,e,t)}}function qh(e,t){return e!=null&&t in Object(e)}function ka(e,t){return e!=null&&Pa(e,t,qh)}var Vh=1,Hh=2;function Kh(e,t){return Wi(e)&&Ma(t)?Ua(bt(e),t):function(n){var r=F(n,e);return r===void 0&&r===t?ka(n,e):Bn(t,r,Vh|Hh)}}function Gh(e){return function(t){return t?.[e]}}function zh(e){return function(t){return wr(t,e)}}function Yh(e){return Wi(e)?Gh(bt(e)):zh(e)}function Yi(e){return typeof e=="function"?e:e==null?xr:typeof e=="object"?ve(e)?Kh(e[0],e[1]):Wh(e):Yh(e)}function Jh(e,t,n){var r=ve(e),i=r||Ct(e)||Ln(e);if(t=Yi(t),n==null){var s=e&&e.constructor;i?n=r?new s:[]:Z(e)?n=kn(s)?Da(gr(e)):{}:n={}}return(i?zi:Ra)(e,function(o,a,l){return t(n,o,a,l)}),n}function gi(e,t,n){(n!==void 0&&!Un(e[t],n)||n===void 0&&!(t in e))&&Hi(e,t,n)}var La=typeof exports=="object"&&exports&&!exports.nodeType&&exports,no=La&&typeof module=="object"&&module&&!module.nodeType&&module,Zh=no&&no.exports===La,ro=Zh?Ze.Buffer:void 0,io=ro?ro.allocUnsafe:void 0;function Ba(e,t){if(t)return e.slice();var n=e.length,r=io?io(n):new e.constructor(n);return e.copy(r),r}function Ji(e){var t=new e.constructor(e.byteLength);return new dr(t).set(new dr(e)),t}function Wa(e,t){var n=t?Ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Zi(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function qa(e){return typeof e.constructor=="function"&&!Or(e)?Da(gr(e)):{}}function Dn(e){return De(e)&&$t(e)}function bi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function an(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?Hi(n,a,l):Ki(n,a,l)}return n}function Xh(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Qh=Object.prototype,ep=Qh.hasOwnProperty;function tp(e){if(!Z(e))return Xh(e);var t=Or(e),n=[];for(var r in e)r=="constructor"&&(t||!ep.call(e,r))||n.push(r);return n}function qn(e){return $t(e)?_a(e,!0):tp(e)}function np(e){return an(e,qn(e))}function rp(e,t,n,r,i,s,o){var a=bi(e,n),l=bi(t,n),c=o.get(l);if(c){gi(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,f=u===void 0;if(f){var h=ve(l),m=!h&&Ct(l),d=!h&&!m&&Ln(l);u=l,h||m||d?ve(a)?u=a:Dn(a)?u=Zi(a):m?(f=!1,u=Ba(l,!0)):d?(f=!1,u=Wa(l,!0)):u=[]:gt(l)||Zt(l)?(u=a,Zt(a)?u=np(a):(!Z(a)||kn(a))&&(u=qa(l))):f=!1}f&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),gi(e,n,u)}function Va(e,t,n,r,i){e!==t&&Na(t,function(s,o){if(i||(i=new Ue),Z(s))rp(e,t,o,n,Va,r,i);else{var a=r?r(bi(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),gi(e,o,a)}},qn)}function ip(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var so=Math.max;function Ha(e,t,n){return t=so(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=so(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),ip(e,this,a)}}function sp(e){return function(){return e}}var op=hr?function(e,t){return hr(e,"toString",{configurable:!0,enumerable:!1,value:sp(t),writable:!0})}:xr,ap=800,lp=16,cp=Date.now;function up(e){var t=0,n=0;return function(){var r=cp(),i=lp-(r-n);if(n=r,i>0){if(++t>=ap)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ka=up(op);function Er(e,t){return Ka(Ha(e,t,xr),e+"")}function fp(e,t,n){if(!Z(n))return!1;var r=typeof t;return(r=="number"?$t(n)&&vr(t,n.length):r=="string"&&t in n)?Un(n[t],e):!1}function dp(e){return Er(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&fp(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var hp=dp(function(e,t,n){Va(e,t,n)}),oo=$e?$e.isConcatSpreadable:void 0;function pp(e){return ve(e)||Zt(e)||!!(oo&&e&&e[oo])}function Vn(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=pp),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?Vn(a,t-1,n,r,i):Ui(i,a):r||(i[i.length]=a)}return i}var mp=1/0;function yp(e){var t=e==null?0:e.length;return t?Vn(e,mp):[]}function gp(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function bp(e){return e!==e}function Sp(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ga(e,t,n){return t===t?Sp(e,t,n):gp(e,bp,n)}function Xi(e,t){var n=e==null?0:e.length;return!!n&&Ga(e,t,0)>-1}function rr(){}var vp=1/0,Op=zt&&1/Mi(new zt([,-0]))[1]==vp?function(e){return new zt(e)}:rr,wp=200;function za(e,t,n){var r=-1,i=Xi,s=e.length,o=!0,a=[],l=a;if(s>=wp){var c=Op(e);if(c)return Mi(c);o=!1,i=jn,l=new Tt}else l=a;e:for(;++r<s;){var u=e[r],f=u;if(u=u!==0?u:0,o&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;a.push(u)}else i(l,f,n)||(l!==a&&l.push(f),a.push(u))}return a}function Ya(e){return e&&e.length?za(e):[]}var xp="[object Map]",Ep="[object Set]",Ap=Object.prototype,_p=Ap.hasOwnProperty;function pe(e){if(e==null)return!0;if($t(e)&&(ve(e)||typeof e=="string"||typeof e.splice=="function"||Ct(e)||Ln(e)||Zt(e)))return!e.length;var t=Pe(e);if(t==xp||t==Ep)return!e.size;if(Or(e))return!Ia(e).length;for(var n in e)if(_p.call(e,n))return!1;return!0}const Ip=Object.prototype;function bn(e){for(const t in e)if(Ip.hasOwnProperty.call(e,t))return!1;return!0}const Tp=["array","boolean","integer","null","number","object","string"];new Set(Tp);const Cp=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Cp);const Pp=["items","allOf","oneOf","anyOf"];new Set(Pp);const Fp=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Fp);function ir(e){return typeof e=="object"}function We(e){return ir(e)?bn(e):e===!0}function Ht(e,t){return e<t?-1:e>t?1:0}function Nr(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const i=new Set(e);for(let s=0;s<r;s++)i.add(t[s]);return Array.from(i)}function jp(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const i=e;e=t,t=i}const r=new Set(t);for(let i=0;i<e.length&&r.size>0;i++){const s=e[i];r.delete(s)&&n.push(s)}return n}function ao(e){return e.length===0}function Rr(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let i=0;i<t.length;i++)if(t[i]!==n[i]){const s=e(t[i],n[i]);if(s!==0)return s}return 0}}function Ja(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const o=[];let a=0;e:for(let l=0;l<r;l++){const c=n[l];for(let u=0;u<a;u++)if(e(c,o[u])===0)continue e;a=o.push(c)}return o}const i=n.slice().sort(e);let s=0;for(let o=1;o<r;o++)e(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function $p(e){return(t,n)=>{const r=[];let i=t.length,s=n.length;if(i===0||s===0)return r;if(i>s){const u=t;t=n,n=u;const f=i;i=s,s=f}const o=[...t].sort(e),a=[...n].sort(e);let l=0,c=0;for(;l<i&&c<s;){const u=e(o[l],a[c]);u===0?((r.length===0||e(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,c++):u<0?l++:c++}return r}}function Dp(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const lo=Dp,Za=()=>0,Np=e=>e===void 0,Rp=e=>typeof e!="object",co={boolean:0,number:1,string:2};function Mp(e,t){const n=typeof e,r=typeof t;return n===r?Ht(e,t):co[n]-co[r]}function Up(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const o=e;e=t,t=o}const i=new Set(e),s=t.length;for(let o=0;o<s;o++){const a=t[o];i.has(a)||e.push(a)}return e}function Ar(e,t,n=Za){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function Wt(e){return Ar(Np,e)}function ot(e,t){return Ar(n=>n===void 0||e(n),t)}function Mr(e,t){return Ar(Array.isArray,e,t)}const ye=Wt(Ht),Ur=ot(e=>e===0,(e,t)=>e-t);function kp({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=lo(t,p=>Object.keys(p).sort());function r(p){return(y,S)=>{const O=n(y),E=n(S),b=Math.min(O.length,E.length);for(let g=0;g<b;g++){const v=Ht(O[g],E[g]);if(v!==0)return v}if(O.length!==E.length)return O.length-E.length;for(let g=0;g<b;g++){const v=O[g],x=p(y[v],S[v]);if(x!==0)return x}return 0}}function i(p){const y=Rr(p),S=lo(e,Ja(p,{threshold:0}));return(O,E)=>y(S(O),S(E))}const s=i(Ht);function o(p,y){if(ir(p)){if(ir(y)){const S=Object.keys(p),O=Object.keys(y),E=Up(S,O),b=E.length;for(let g=0;g<b;g++){const v=E[g];if(p[v]===y[v])continue;const A=(d[v]??a)(p[v],y[v]);if(A!==0)return A}return 0}return y===!0&&bn(p)?0:1}return ir(y)?p===!0&&bn(y)?0:-1:Ht(p,y)}const a=Wt(c),l=Ar(Rp,Mr(r(a),Rr(c)),Mp);function c(p,y){return p===null?-1:y===null?1:l(p,y)}const u=Wt(o),f=ot(bn,r(u)),h=Wt(i(o)),m=ot(We,o),d={$id:ye,$comment:ye,$defs:f,$ref:ye,$schema:ye,const:a,contains:u,contentEncoding:ye,contentMediaType:ye,default:a,definitions:f,description:ye,else:u,examples:a,exclusiveMaximum:ye,exclusiveMinimum:ye,format:ye,if:u,maximum:ye,maxItems:ye,maxLength:ye,maxProperties:ye,minimum:ye,multipleOf:ye,not:u,pattern:ye,propertyNames:u,readOnly:ye,then:u,title:ye,writeOnly:ye,uniqueItems:ot(p=>p===!1,Za),minLength:Ur,minItems:Ur,minProperties:Ur,required:ot(ao,s),enum:ot(ao,i(c)),type:Wt((p,y)=>{const S=Array.isArray(p),O=Array.isArray(y);return!S&&!O?Ht(p,y):s(S?p:[p],O?y:[y])}),items:ot(p=>!Array.isArray(p)&&We(p),Mr(o,Rr(o))),anyOf:h,allOf:h,oneOf:h,properties:f,patternProperties:f,additionalProperties:m,additionalItems:m,dependencies:ot(bn,r(Wt(Mr(o,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:o}}function uo(e){return e}const Xa=(e,t)=>e?Xa(t%e,e):t,Lp=(e,t)=>Math.abs(e*t)/Xa(e,t);function Bp(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function kr(e,t,n){const r=e.length,i=t.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=e[s];for(let a=0;a<i;a++)n(o,t[a])}}function Lr(e,t){return e||t}function fo(e){return(t,n)=>{const r={...t},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function Wp(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function wt(e,t,n){n===void 0||We(n)?delete e[t]:e[t]=n}const qp=["properties","patternProperties","additionalProperties"];function ho(e){const t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){const s=t[i];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const po=[[],[]];function mo(e,t,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(t))continue;const o=s.schema;if(o===!1)return!0;e.push(o)}return!1}const Vp=["items","additionalItems"],Hp=["if","then","else"];function yo(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function Br(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function xt(e,t,n){return[e,t,n]}function Kp(e){const t=new Map;for(const[n,r,i]of e){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=t.get(o[0]);a===void 0&&(a=[],t.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return t}const Gp=[xt("minimum","maximum",e=>e.maximum>=e.minimum),xt("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),xt("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),xt("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),xt("minLength","maxLength",e=>e.maxLength>=e.minLength),xt("minItems","maxItems",e=>e.maxItems>=e.minItems),xt("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function zp({mergePatterns:e=Bp,isSubRegExp:t=Object.is,intersectJson:n=jp,deduplicateJsonSchemaDef:r=uo,defaultMerger:i=uo,assigners:s=[],checks:o=Gp,mergers:a}={}){function l(b){const g=b.length;let v=b[0];for(let x=1;x<g;x++){const A=S(v,b[x]);if(A===!1)return!1;We(A)||(v=A)}return v}function c(b,g,v,x,A,_,I){if(b.length=0,v===!1)return!1;if(b.push(v),A!==void 0){if(A===!1)return!1;b.push(A)}if(mo(b,g,_))return!1;const T=b.length<2;if(I===!1){if(T)return;if(mo(b,g,x))return!1}else T&&I!==void 0&&b.push(I);return b.length===1?b[0]:l(b)}function u(b,g,v,x,A,_){const I=v.length;if(I>0&&A!==!1)if(_)Object.assign(b,g);else for(let P=0;P<I;P++){const T=v[P];x.has(T)||(b[T]=S(g[T],A))}return b}const f=(b,{properties:g={},patternProperties:v,additionalProperties:x=!0},{properties:A={},patternProperties:_,additionalProperties:I=!0})=>{const P=We(x),T=We(I);if(P&&T)return wt(b,"properties",O(g,A)),wt(b,"patternProperties",v&&_?O(v,_):v??_),delete b.additionalProperties,b;const C=S(x,I);wt(b,"additionalProperties",C);const D={},j=Object.keys(g),$=j.length,[k,K]=v?ho(v):po,[L,ee]=_?ho(_):po,re=[],ce=new Set,me=T?void 0:I;for(let U=0;U<$;U++){const X=j[U];ce.add(X);const ne=c(re,X,g[X],k,A[X],L,me);ne!==void 0&&(D[X]=ne)}const R=Object.keys(A),ie=R.length,J=P?void 0:x;for(let U=0;U<ie;U++){const X=R[U];if(ce.has(X))continue;const ne=c(re,X,A[X],L,void 0,k,J);ne!==void 0&&(D[X]=ne)}wt(b,"properties",D);let V={};const H=new Set;return K.length>0&&ee.length>0&&kr(K,ee,(U,X)=>{t(U,X)&&H.add(U),t(X,U)&&H.add(X),V[e(U,X)]=S(v[U],_[X])}),V=u(V,v,K,H,I,T),V=u(V,_,ee,H,x,P),wt(b,"patternProperties",V),b},h=(b,{items:g=[],additionalItems:v},{items:x=[],additionalItems:A})=>{const _=Array.isArray(g),I=Array.isArray(x),P=[];if(b.items=P,_&&I){const[T,C,D]=g.length<x.length?[g.length,v,x]:[x.length,A,g];let j=0;for(;j<T;j++)P.push(S(g[j],x[j]));if(C===!1)b.additionalItems=!1;else{const $=C===void 0||We(C);for(;j<D.length;j++)P.push($?D[j]:S(D[j],C));wt(b,"additionalItems",v!==void 0&&A!==void 0?S(v,A):v??A)}}else if(_||I){const[T,C,D]=_?[g,x,v]:[x,g,A];wt(b,"additionalItems",D&&S(D,C));for(let j=0;j<T.length;j++)P.push(S(T[j],C))}else delete b.additionalItems,b.items=S(g,x);return b},m=(b,g,v)=>{yo(b,g);const x=yo({},v);return b.allOf===void 0?b.allOf=[x]:b.allOf=b.allOf.concat(x),b};function d(b,g){const v=[];if(kr(b,g,(x,A)=>{try{v.push(S(x,A))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(b)}" and "${JSON.stringify(g)}"; the merged result is empty`);return r(v)}const p=Wp([[qp,f],[Vp,h],[Hp,m],...s]),y=Kp(o);function S(b,g){if(b===!1||g===!1)return!1;if(We(b))return We(g)?!0:g;if(We(g))return b;let v={...b};const x=new Set,A=new Set,_=Object.keys(g),I=_.length;for(let P=0;P<I;P++){const T=_[P],C=g[T];if(C===void 0)continue;const D=y.get(T);if(D!==void 0){const K=D.length;for(let L=0;L<K;L++){const ee=D[L];b[ee.oppositeKey]!==void 0&&A.add(ee.check)}}const j=b[T];if(j===void 0){v[T]=C;continue}const $=p.get(T);if($){x.add($);continue}const k=E[T]??i;v[T]=k(j,C)}for(const P of x)v=P(v,b,g);for(const P of A)P(v);return v}const O=fo(S),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:O,definitions:O,type:(b,g)=>{if(b===g)return b;const v=Array.isArray(b),x=Array.isArray(g);if(!v&&!x){const A=Br(b,g);if(A!==void 0)return A}else if(v||x){const A=new Set;if(v&&x)kr(b,g,(I,P)=>{const T=Br(I,P);T!==void 0&&A.add(T)});else{const I=v?b:g,P=v?g:b,T=I.length;for(let C=0;C<T;C++){const D=Br(P,I[C]);D!==void 0&&A.add(D)}}const _=A.size;if(_===1)return A.values().next().value;if(_>1)return Array.from(A)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${b.toString()}, ${g.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(b,g)=>{const v=r([b,g]);return v.length===1?v[0]:{anyOf:v}},pattern:e,readOnly:Lr,writeOnly:Lr,enum:(b,g)=>{const v=n(b,g);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(b)}", "${JSON.stringify(g)}"`);return v},anyOf:d,oneOf:d,allOf:(b,g)=>r(b.concat(g)),propertyNames:S,contains:S,dependencies:fo((b,g)=>Array.isArray(b)?Array.isArray(g)?Nr(b,g):S(g,{required:b}):Array.isArray(g)?S(b,{required:g}):S(b,g)),examples:(b,g)=>{if(!Array.isArray(b)||!Array.isArray(g))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(b)}" and "${JSON.stringify(g)}"`);return Nr(b,g)},multipleOf:(b,g)=>{let v=1;for(;!Number.isInteger(b)||!Number.isInteger(g);)v*=10,b*=10,g*=10;return Lp(b,g)/v},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Lr,required:Nr,...a};return{mergeSchemaDefinitions:S,mergeArrayOfSchemaDefinitions:l}}function Yp(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:i,...s}=r;t.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return t}function Jp(e){return t=>e(Yp(t))}var hn={},go;function Zp(){if(go)return hn;go=1;var e=/~/,t=/~[01]/g;function n(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function r(c){return e.test(c)?c.replace(t,n):c}function i(c,u,f){for(var h,m,d=1,p=u.length;d<p;){if(u[d]==="constructor"||u[d]==="prototype"||u[d]==="__proto__")return c;if(h=r(u[d++]),m=p>d,typeof c[h]>"u"&&(Array.isArray(c)&&h==="-"&&(h=c.length),m&&(u[d]!==""&&u[d]<1/0||u[d]==="-"?c[h]=[]:c[h]={})),!m)break;c=c[h]}var y=c[h];return f===void 0?delete c[h]:c[h]=f,y}function s(c){if(typeof c=="string"){if(c=c.split("/"),c[0]==="")return c;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(c)){for(const u of c)if(typeof u!="string"&&typeof u!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return c}throw new Error("Invalid JSON pointer.")}function o(c,u){if(typeof c!="object")throw new Error("Invalid input object.");u=s(u);var f=u.length;if(f===1)return c;for(var h=1;h<f;){if(c=c[r(u[h++])],f===h)return c;if(typeof c!="object"||c===null)return}}function a(c,u,f){if(typeof c!="object")throw new Error("Invalid input object.");if(u=s(u),u.length===0)throw new Error("Invalid JSON pointer for set.");return i(c,u,f)}function l(c){var u=s(c);return{get:function(f){return o(f,u)},set:function(f,h){return a(f,u,h)}}}return hn.get=o,hn.set=a,hn.compile=l,hn}var Xp=Zp();const Wr=Ti(Xp);function Qp(e,t){return e&&an(t,Me(t),e)}function em(e,t){return e&&an(t,qn(t),e)}function tm(e,t){return an(e,ki(e),t)}var nm=Object.getOwnPropertySymbols,Qa=nm?function(e){for(var t=[];e;)Ui(t,ki(e)),e=gr(e);return t}:Oa;function rm(e,t){return an(e,Qa(e),t)}function Qi(e){return va(e,qn,Qa)}var im=Object.prototype,sm=im.hasOwnProperty;function om(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&sm.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function am(e,t){var n=t?Ji(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var lm=/\w*$/;function cm(e){var t=new e.constructor(e.source,lm.exec(e));return t.lastIndex=e.lastIndex,t}var bo=$e?$e.prototype:void 0,So=bo?bo.valueOf:void 0;function um(e){return So?Object(So.call(e)):{}}var fm="[object Boolean]",dm="[object Date]",hm="[object Map]",pm="[object Number]",mm="[object RegExp]",ym="[object Set]",gm="[object String]",bm="[object Symbol]",Sm="[object ArrayBuffer]",vm="[object DataView]",Om="[object Float32Array]",wm="[object Float64Array]",xm="[object Int8Array]",Em="[object Int16Array]",Am="[object Int32Array]",_m="[object Uint8Array]",Im="[object Uint8ClampedArray]",Tm="[object Uint16Array]",Cm="[object Uint32Array]";function Pm(e,t,n){var r=e.constructor;switch(t){case Sm:return Ji(e);case fm:case dm:return new r(+e);case vm:return am(e,n);case Om:case wm:case xm:case Em:case Am:case _m:case Im:case Tm:case Cm:return Wa(e,n);case hm:return new r;case pm:case gm:return new r(e);case mm:return cm(e);case ym:return new r;case bm:return um(e)}}var Fm="[object Map]";function jm(e){return De(e)&&Pe(e)==Fm}var vo=Xt&&Xt.isMap,$m=vo?Bi(vo):jm,Dm="[object Set]";function Nm(e){return De(e)&&Pe(e)==Dm}var Oo=Xt&&Xt.isSet,Rm=Oo?Bi(Oo):Nm,Mm=1,Um=2,km=4,el="[object Arguments]",Lm="[object Array]",Bm="[object Boolean]",Wm="[object Date]",qm="[object Error]",tl="[object Function]",Vm="[object GeneratorFunction]",Hm="[object Map]",Km="[object Number]",nl="[object Object]",Gm="[object RegExp]",zm="[object Set]",Ym="[object String]",Jm="[object Symbol]",Zm="[object WeakMap]",Xm="[object ArrayBuffer]",Qm="[object DataView]",ey="[object Float32Array]",ty="[object Float64Array]",ny="[object Int8Array]",ry="[object Int16Array]",iy="[object Int32Array]",sy="[object Uint8Array]",oy="[object Uint8ClampedArray]",ay="[object Uint16Array]",ly="[object Uint32Array]",ue={};ue[el]=ue[Lm]=ue[Xm]=ue[Qm]=ue[Bm]=ue[Wm]=ue[ey]=ue[ty]=ue[ny]=ue[ry]=ue[iy]=ue[Hm]=ue[Km]=ue[nl]=ue[Gm]=ue[zm]=ue[Ym]=ue[Jm]=ue[sy]=ue[oy]=ue[ay]=ue[ly]=!0;ue[qm]=ue[tl]=ue[Zm]=!1;function _n(e,t,n,r,i,s){var o,a=t&Mm,l=t&Um,c=t&km;if(n&&(o=i?n(e,r,i,s):n(e)),o!==void 0)return o;if(!Z(e))return e;var u=ve(e);if(u){if(o=om(e),!a)return Zi(e,o)}else{var f=Pe(e),h=f==tl||f==Vm;if(Ct(e))return Ba(e,a);if(f==nl||f==el||h&&!i){if(o=l||h?{}:qa(e),!a)return l?rm(e,em(o,e)):tm(e,Qp(o,e))}else{if(!ue[f])return i?e:{};o=Pm(e,f,a)}}s||(s=new Ue);var m=s.get(e);if(m)return m;s.set(e,o),Rm(e)?e.forEach(function(y){o.add(_n(y,t,n,y,e,s))}):$m(e)&&e.forEach(function(y,S){o.set(S,_n(y,t,n,S,e,s))});var d=c?l?Qi:hi:l?qn:Me,p=u?void 0:d(e);return zi(p||e,function(y,S){p&&(S=y,y=e[S]),Ki(o,S,_n(y,t,n,S,e,s))}),o}function rl(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function cy(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function uy(e,t){return t.length<2?e:wr(e,cy(t,0,-1))}var fy=Object.prototype,dy=fy.hasOwnProperty;function il(e,t){t=on(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=bt(t[n]);if(i==="__proto__"&&!dy.call(e,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=uy(e,t);return s==null||delete s[bt(rl(t))]}function hy(e){return gt(e)?void 0:e}function Si(e){var t=e==null?0:e.length;return t?Vn(e,1):[]}function sl(e){return Ka(Ha(e,void 0,Si),e+"")}var py=1,my=2,yy=4,Qt=sl(function(e,t){var n={};if(e==null)return n;var r=!1;t=sn(t,function(s){return s=on(s,e),r||(r=s.length>1),s}),an(e,Qi(e),n),r&&(n=_n(n,py|my|yy,hy));for(var i=t.length;i--;)il(n,t[i]);return n}),gy=cc();const es=Ti(gy);function pr(e,t){if(le in e&&es.equal(e[le],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Z(r)){const i=pr(r,t);if(i!==void 0)return i}}else if(Z(n)){const r=pr(n,t);if(r!==void 0)return r}}function vi(e,t){const n=F(e,le,t);ae in e&&(e={...e,[ae]:es.resolve(n,e[ae])});for(const[r,i]of Object.entries(e))Array.isArray(i)?e={...e,[r]:i.map(s=>Z(s)?vi(s,n):s)}:Z(i)&&(e={...e,[r]:vi(i,n)});return e}function ts(e,t){const n=t[e];return[Qt(t,[e]),n]}function ol(e,t={},n=[],r=F(t,[le])){const i=e||"";let s;if(i.startsWith("#")){const a=decodeURIComponent(i.substring(1));r===void 0||le in t&&t[le]===r?s=Wr.get(t,a):t[gn]===nr&&(s=pr(t,r.replace(/\/$/,"")),s!==void 0&&(s=Wr.get(s,a)))}else if(t[gn]===nr){const a=r?es.resolve(r,i):i,[l,...c]=a.replace(/#\/?$/,"").split("#");s=pr(t,l.replace(/\/$/,"")),s!==void 0&&(r=s[le],pe(c)||(s=Wr.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const o=s[ae];if(o){if(n.includes(o)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[u,...f]=n,h=[...f,i,u].join(" -> ");throw new Error(`Definition for ${u} contains a circular reference through ${h}`)}const[a,l]=ts(ae,s),c=ol(l,t,[...n,i],r);return Object.keys(a).length>0?t[gn]===Fu||t[gn]===nr?{[yt]:[a,c]}:{...a,...c}:c}return s}function ns(e,t={},n=F(t,[le])){return ol(e,t,[],n)}var by="[object String]";function St(e){return typeof e=="string"||!ve(e)&&De(e)&&tt(e)==by}function Ye(e){let t;const n=F(e,Iu);return St(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Nn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var Sy=Er(function(e){return za(Vn(e,1,Dn,!0))});function ke(e){let{type:t}=e;return!t&&e.const?Nn(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function et(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];return e&&i in e&&W(o)?r[i]=et(s,o):e&&t&&(ke(e)==="object"||ke(t)==="object")&&i===fa&&Array.isArray(s)&&Array.isArray(o)?r[i]=Sy(s,o):r[i]=o,r},n)}var vy="[object Number]";function al(e){return typeof e=="number"||De(e)&&tt(e)==vy}function ll(e,t,n){var r;if(e&&n){const i=F(e,n);if(i===void 0)return;for(let s=0;s<t.length;s++){const o=t[s],a=F(o,[Q,n],{});if(!(a.type==="object"||a.type==="array")&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function rs(e,t,n,r,i){if(t===void 0)return 0;const s=ll(t,n,i);if(al(s))return s;for(let o=0;o<n.length;o++){const a=n[o];if(i&&z(a,[Q,i])){const l=F(t,i),c=F(a,[Q,i],{});if(e.isValid(c,l,r))return o}else if(a[Q]){const l={anyOf:Object.keys(a[Q]).map(u=>({required:[u]}))};let c;if(a.anyOf){const{...u}=a;u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},a,l);if(delete c.required,e.isValid(c,t,r))return o}else if(e.isValid(a,t,r))return o}return 0}function Oe(e,t,n={},r,i,s=!1){return He(e,t,n,r,void 0,void 0,i,s)[0]}function Oy(e,t,n,r,i,s,o){const{if:a,then:l,else:c,...u}=t,f=e.isValid(a,s||{},n);let h=[u],m=[];if(r)l&&typeof l!="boolean"&&(m=m.concat(He(e,l,n,s,r,i,o))),c&&typeof c!="boolean"&&(m=m.concat(He(e,c,n,s,r,i,o)));else{const d=f?l:c;d&&typeof d!="boolean"&&(m=m.concat(He(e,d,n,s,r,i,o)))}return m.length&&(h=m.map(d=>et(u,d))),h.flatMap(d=>He(e,d,n,s,r,i,o))}function cl(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>$a(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function ul(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(se(n,[r],e.patternProperties[r]),n),{})}function wy(e,t,n,r,i,s,o,a){const l=fl(e,t,n,r,i,s,o,a);if(l.length>1||l[0]!==t)return l;if($i in t)return dl(e,t,n,r,i,s,o).flatMap(u=>He(e,u,n,s,r,i,o));if(yt in t&&Array.isArray(t[yt])){const c=t.allOf.map(f=>He(e,f,n,s,r,i,o));return cl(c).map(f=>({...t,allOf:f}))}return[t]}function fl(e,t,n,r,i,s,o,a){const l=Yt(t,n,i,void 0,a);return l!==t?He(e,l,n,s,r,i,o,a):[t]}function Yt(e,t,n,r,i){if(!W(e))return e;let s=e;if(ae in s){const{$ref:o,...a}=s;if(n.includes(o))return s;n.push(o),s={...ns(o,t,r),...a,[En]:o},le in s&&(r=s[le])}if(Q in s){const o=[],a=Jh(s[Q],(l,c,u)=>{const f=[...n];l[u]=Yt(c,t,f,r,i),o.push(f)},{});hp(n,Ya(yp(o))),s={...s,[Q]:a}}if(Jt in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Yt(s.items,t,n,r,i)}),i){let o,a;Y in e&&Array.isArray(e[Y])?(o=Y,a=s[Y]):B in e&&Array.isArray(e[B])&&(o=B,a=s[B]),o&&a&&(s={...s,[o]:a.map(l=>Yt(l,t,n,r,i))})}return fe(e,s)?e:s}function xy(e,t,n,r,i){const s={...t,properties:{...t.properties}},o=r&&W(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(ui in s){const l=ul(s,a);if(!pe(l)){s.properties[a]=Oe(e,{[yt]:Object.values(l)},n,F(o,[a]),i),se(s.properties,[a,ft],!0);return}}if(Vt in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ae in s.additionalProperties?l=Oe(e,{[ae]:F(s.additionalProperties,[ae])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:Y in s.additionalProperties||B in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:Nn(F(o,[a]))}:l={type:Nn(F(o,[a]))},s.properties[a]=l,se(s.properties,[a,ft],!0)}else s.properties[a]={type:"null"},se(s.properties,[a,ft],!0)}}),s}const{compareSchemaDefinitions:Ey,compareSchemaValues:Ay}=kp(),{mergeArrayOfSchemaDefinitions:_y}=zp({intersectJson:$p(Ay),deduplicateJsonSchemaDef:Ja(Ey)}),Iy=Jp(_y);function Ty(e){return Iy(e)}function He(e,t,n,r,i=!1,s=[],o,a){return W(t)?wy(e,t,n,i,s,r,o,a).flatMap(c=>{var u;let f=c;if(Di in f)return Oy(e,f,n,i,s,r,o);if(yt in f){if(i){const{allOf:m,...d}=f;return[...m,d]}try{const m=[],d=[];(u=f.allOf)===null||u===void 0||u.forEach(p=>{typeof p=="object"&&p.contains?m.push(p):d.push(p)}),m.length&&(f={...f,allOf:d}),f=o?o(f):Ty(f),m.length&&(f.allOf=m)}catch(m){console.warn(`could not merge subschemas in allOf:
|
|
24
|
+
`,m);const{allOf:d,...p}=f;return p}}return Q in f&&ui in f&&(f=Object.keys(f.properties).reduce((m,d)=>{const p=ul(m,d);return pe(p)||(m.properties[d]=Oe(e,{allOf:[m.properties[d],...Object.values(p)]},n,F(r,[d]),o)),m},{...f,properties:{...f.properties}})),ui in f||Vt in f&&f.additionalProperties!==!1?xy(e,f,n,r,o):f}):[{}]}function Cy(e,t,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=t;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const c=i===void 0&&r?{}:i,u=Ye(t);s=s.map(h=>Yt(h,n,[]));const f=rs(e,c,s,n,u);if(r)return s.map(h=>et(l,h));t=et(l,s[f])}return[t]}function dl(e,t,n,r,i,s,o){const{dependencies:a,...l}=t;return Cy(e,l,n,r,s).flatMap(u=>hl(e,a,u,n,r,i,s,o))}function hl(e,t,n,r,i,s,o,a){let l=[n];for(const c in t){if(!i&&F(o,[c])===void 0||n.properties&&!(c in n.properties))continue;const[u,f]=ts(c,t);return Array.isArray(f)?l[0]=Py(n,f):W(f)&&(l=Fy(e,n,r,c,f,i,s,o,a)),l.flatMap(h=>hl(e,u,h,r,i,s,o,a))}return l}function Py(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Fy(e,t,n,r,i,s,o,a,l){return He(e,i,n,a,s,o,l).flatMap(u=>{const{oneOf:f,...h}=u;if(t=et(t,h),f===void 0)return t;const m=f.map(p=>typeof p=="boolean"||!(ae in p)?[p]:fl(e,p,n,s,o,a));return cl(m).flatMap(p=>jy(e,t,n,r,p,s,o,a,l))})}function jy(e,t,n,r,i,s,o,a,l){const c=i.filter(u=>{if(typeof u=="boolean"||!u||!u.properties)return!1;const{[r]:f}=u.properties;if(f){const h={type:"object",properties:{[r]:f}};return e.isValid(h,a,n)||s}return!1});return!s&&c.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):c.flatMap(u=>{const f=u,[h]=ts(r,f.properties),m={...f,properties:h};return He(e,m,n,a,s,o,l).map(p=>et(t,p))})}function Sn(e,t,n,r,i,s={},o){if(Array.isArray(n[i])){const l=Ye(n)||r,c=n[i].map(f=>Oe(e,f,t,s,o)),u=F(s,l);if(u!==void 0)return c.find(f=>$n(F(f,[Q,l,yr],F(f,[Q,l,je])),u))}}function pl(e,t,n,r,i){let s=n;if(z(n,ae)&&(s=Oe(e,n,t,void 0,i)),pe(r))return s;const o=Array.isArray(r)?r:r.split("."),[a,...l]=o;if(a&&z(s,a))return s=F(s,a),pl(e,t,s,l,i)}function sr(e,t,n,r,i,s){const o=pl(e,t,n,r,s);return o===void 0?i:o}const wo={title:"!@#$_UNKNOWN_$#@!"};function $y(e,t,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop();o.length&&o.forEach(h=>{a=sr(e,t,a,[Q,h],{},s),z(a,B)?a=Sn(e,t,a,l,B,F(i,h),s):z(a,Y)&&(a=Sn(e,t,a,l,Y,F(i,h),s))}),z(a,B)?a=Sn(e,t,a,l,B,i,s):z(a,Y)&&(a=Sn(e,t,a,l,Y,i,s));let c=sr(e,t,a,[Q,l],wo,s);c===wo&&(c=void 0);const u=sr(e,t,a,fa,[],s);let f;return c&&Array.isArray(u)&&(f=u.includes(l)),{field:c,isRequired:f}}function Dy(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function Ny(e,t){return function(n,r){if(n==null)return n;if(!$t(n))return e(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var ml=Ny(Ra);function Ry(e,t,n,r,i){return i(e,function(s,o,a){n=r?(r=!1,s):t(n,s,o,a)}),n}function My(e,t,n){var r=ve(e)?Dy:Ry,i=arguments.length<3;return r(e,Yi(t),n,i,ml)}const Uy={type:"object",$id:_u,properties:{__not_really_there__:{type:"number"}}};function Oi(e,t,n,r,i){let s=0;return n&&(Z(n.properties)?s+=My(n.properties,(o,a,l)=>{const c=F(r,l);if(typeof a=="boolean")return o;if(z(a,ae)){const u=Oe(e,a,t,c,i);return o+Oi(e,t,u,c||{},i)}if((z(a,B)||z(a,Y))&&c){const u=z(a,B)?B:Y,f=Ye(a);return o+Rn(e,t,c,F(a,u),-1,f,i)}if(a.type==="object")return Z(c)&&(o+=1),o+Oi(e,t,a,c,i);if(a.type===Nn(c)){let u=o+1;return a.default?u+=c===a.default?1:-1:a.const&&(u+=c===a.const?1:-1),u}return o},0):St(n.type)&&n.type===Nn(r)&&(s+=1)),s}function Rn(e,t,n,r,i=-1,s,o){const a=r.map(h=>Yt(h,t,[])),l=ll(n,r,s);if(al(l))return l;const c=a.reduce((h,m,d)=>(rs(e,n,[Uy,m],t,s)===1&&h.push(d),h),[]);if(c.length===1)return c[0];c.length||$a(a.length,h=>c.push(h));const u=new Set,{bestIndex:f}=c.reduce((h,m)=>{const{bestScore:d}=h,p=a[m],y=Oi(e,t,p,n,o);return u.add(y),y>d?{bestIndex:m,bestScore:y}:h},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:f}function is(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>W(t))}function en(e){return e==null}function Mn(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],o=i?s:t,a=i?t:s,l=o.map((c,u)=>a[u]!==void 0?Mn(s[u],t[u],n,r,i):c);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(W(t)){const s=Object.assign({},e);return Object.keys(t).reduce((o,a)=>{var l;const c=F(t,a),u=W(e)&&a in e,f=a in t,h=(l=F(e,a))!==null&&l!==void 0?l:{},m=u&&Object.entries(h).some(([,y])=>W(y)),d=u&&W(F(e,a)),p=f&&W(c);return d&&p&&!m?(o[a]={...F(e,a),...c},o):(o[a]=Mn(F(e,a),c,n,r,i&&(u||!f)),o)},s)}return r&&(e!==void 0&&en(t)||typeof t=="number"&&isNaN(t))||i&&!en(t)?e:t}function Pt(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];if(e&&i in e&&W(o))r[i]=Pt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,c)=>(s.includes(c)||l.push(c),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},Object.assign({},e))}function yl(e){return Array.isArray(e.enum)&&e.enum.length===1||je in e}function ss(e,t,n={},r){const i=Oe(e,t,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&yl(o)):!1}function os(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:ss(e,t.items,n,r)}function gl(e){const t=e[je],n=ke(e);return W(t)&&St(t?.$data)&&n!=="object"&&n!=="array"}function ky(e){if(Au in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(je in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Ly(e,t){const n=new Map(e.map(s=>[String(s.value),s])),r=new Set(t.filter(s=>s!=="*").map(String)),i=e.filter(s=>!r.has(String(s.value)));return t.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function tn(e,t){if(e.enum){let s,o;if(t){const{enumNames:l,enumOrder:c}=M(t);s=l,o=c}let a=e.enum.map((l,c)=>({label:Array.isArray(s)?s[c]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=Ly(a,o)),a}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Ye(e);if(t){const{optionsSchemaSelector:s=i}=M(t);i=s}return n&&n.map((s,o)=>{const{title:a}=M(r?.[o]),l=s;let c,u=a;if(i){const f=F(l,[Q,i],{});c=F(f,yr,F(f,je)),u=u||f?.title||l.title||String(c)}else c=ky(l),u=u||l.title||String(c);return{schema:l,label:u,value:c}})}const By=["string","number","integer","boolean","null"];var nn;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(nn||(nn={}));function qr(e,t=nn.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==nn.Ignore&&W(e.additionalItems)?e.additionalItems:{}}function bl(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&pe(t)&&n===null?null:t}function xo(e,t,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r===!0||a)e[t]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!W(n)||!pe(n))&&(e[t]=n);else if(c!=="skipDefaults"){const u=i===void 0?s.includes(t):i;W(n)?c==="skipEmptyDefaults"?pe(n)||(e[t]=n):(!pe(n)||s.includes(t))&&(u||c!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||u&&s.includes(t))&&(e[t]=n)}}function ht(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:f=!1,initialDefaultsGenerated:h}=n;let m=W(i)?i:{};const d=W(t)?t:{};let p=r,y=null,S=l,O=a;if(d[je]!==void 0&&l?.constAsDefaults!=="never"&&!gl(d))p=d[je];else if(W(p)&&W(d.default)&&!d[Y]&&!d[B]&&!d[ae])p=Pt(p,d.default);else if(yr in d&&!d[Y]&&!d[B]&&!d[ae])p=d.default;else if(ae in d){const g=d[ae];a.includes(g)||(O=a.concat(g),y=ns(g,s));const v=i===void 0||W(i)&&pe(i);y&&!p&&v&&(p=d.default),f&&y&&!W(i)&&(m=i)}else if($i in d){const g={...Eo(e,d,n,p),...m};y=dl(e,d,s,!1,[],g,c)[0]}else if(is(d))p=d.items.map((g,v)=>ht(e,g,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:Array.isArray(r)?r[v]:void 0,rawFormData:m,required:u,shouldMergeDefaultsIntoFormData:f}));else if(B in d){const{oneOf:g,...v}=d;if(g.length===0)return;const x=Ye(d),{type:A="null"}=v;!Array.isArray(A)&&By.includes(A)&&S?.constAsDefaults==="skipOneOf"&&(S={...S,constAsDefaults:"never"}),y=g[Rn(e,s,i??d.default,g,0,x,c)],y=et(v,y)}else if(Y in d){const{anyOf:g,...v}=d;if(g.length===0)return;const x=Ye(d);y=g[Rn(e,s,i??d.default,g,0,x,c)],y=et(v,y)}if(y)return ht(e,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:O,experimental_defaultFormStateBehavior:S,experimental_customMergeAllOf:c,parentDefaults:p,rawFormData:i??m,required:u,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h});p===void 0&&(p=d.default);const E=Eo(e,d,n,p);let b=E??p;if(f){const{arrayMinItems:g={}}=l||{},{mergeExtraDefaults:v}=g,x=Wy(e,d,s,i,l,c);(!W(i)||yt in d)&&(b=Mn(b,x,v,!0))}return b}function Wy(e,t,n,r,i,s){const o=!yl(t)&&ss(e,t,n,s);let a=r;if(o){const c=tn(t);a=c?.some(f=>fe(f.value,r))?r:void 0}return t[je]&&i?.constAsDefaults==="always"&&(a=t.const),a}function qy(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},f){{const h=W(n)?n:{},m=t,p=o?.allOf==="populateDefaults"&&yt in m||o?.emptyObjectFields!=="skipEmptyDefaults"&&Di in m?Oe(e,m,r,h,a):m,y=p[je],S=Object.keys(p.properties||{}).reduce((O,E)=>{var b;const g=F(p,[Q,E],{}),v=W(y)&&y[E]!==void 0,x=(W(g)&&je in g||v)&&o?.constAsDefaults!=="never"&&!gl(g),A=ht(e,g,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:F(f,[E]),rawFormData:F(h,[E]),required:(b=p.required)===null||b===void 0?void 0:b.includes(E),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});return xo(O,E,A,i,l,p.required,o,x,g?.type==="null"),O},{});if(p.additionalProperties&&!u){const O=W(p.additionalProperties)?p.additionalProperties:{},E=new Set;W(f)&&Object.keys(f).filter(g=>!p.properties||!p.properties[g]).forEach(g=>E.add(g));const b=[];Object.keys(h).filter(g=>!p.properties||!p.properties[g]).forEach(g=>{E.add(g),b.push(g)}),E.forEach(g=>{var v;const x=ht(e,O,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:F(f,[g]),rawFormData:F(h,[g]),required:(v=p.required)===null||v===void 0?void 0:v.includes(g),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});xo(S,g,x,i,l,b)})}return bl(t,S)}}function Vy(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},f){var h,m;const d=t,p=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:y,mergeExtraDefaults:S}=p,O=y==="never",E=y==="requiredOnly",b=y==="all"||!O&&!E,g=(m=p?.computeSkipPopulate)!==null&&m!==void 0?m:(()=>!1),x=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((P,T)=>{const C=qr(d,nn.Fallback,T),D=Array.isArray(n)?n[T]:void 0;return ht(e,C,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:P,rawFormData:D,required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u})})),Array.isArray(n)){const P=qr(d);if(O)f=n;else{const T=n.map((D,j)=>ht(e,P,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:D,parentDefaults:F(f,[j]),required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}));f=Mn(f,T,(E&&a||b)&&S)}}if((W(d)&&je in d&&s?.constAsDefaults!=="never")===!1){if(O)return f??x;if(E&&!a)return f||void 0}let _;const I=Array.isArray(f)?f.length:0;if(!d.minItems||os(e,d,r,o)||g(e,d,r)||d.minItems<=I)_=f||!a&&!l?f:x;else{const P=f||[],T=qr(d,nn.Invert),C=T.default,D=Array.from({length:d.minItems-I},()=>ht(e,T,{parentDefaults:C,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:c}));_=P.concat(D)}return bl(t,_)}function Eo(e,t,n={},r){switch(ke(t)){case"object":return qy(e,t,n,r);case"array":return Vy(e,t,n,r)}}function Sl(e,t,n,r,i=!1,s,o,a){if(!W(t))throw new Error("Invalid schema: "+t);const l=Oe(e,t,r,n,o),c=ht(e,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&W(l.default))return{...c,...n};if(W(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:u}=s||{};return Mn(c,n,!0,u==="useDefaultIfFormDataUndefined",!0)}return c}function vl(e={}){return"widget"in M(e)&&M(e).widget!=="hidden"}function Ol(e,t,n={},r,i){if(n[Ri]==="files")return!0;if(t.items){const s=Oe(e,t.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function Hy(e,t,n={},r,i,s){const o=M(n,i),{label:a=!0}=o;let l=!!a;if(l){const c=ke(t),u=F(t,ft,!1);c==="array"&&(l=u||os(e,t,r,s)||Ol(e,t,n,r,s)||vl(n)),c==="object"&&(l=u),c==="boolean"&&n&&!n[Ri]&&(l=!1),n&&n[Cu]&&(l=!1)}return l}function wl(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=wr(e,o);n(a,o)&&Gi(s,on(o,e),a)}return s}function Ky(e,t){return wl(e,t,function(n,r){return ka(e,r)})}var xl=sl(function(e,t){return e==null?{}:Ky(e,t)});function at(e,t,n,r,i,s=[],o){if(ae in t||$i in t||yt in t||Di in t){const l=Oe(e,t,r,i,o);if(s.findIndex(u=>fe(u,l))===-1)return at(e,l,n,r,i,s.concat(l),o)}let a={[tr]:n.replace(/^\./,"")};if(B in t||Y in t){const l=B in t?t.oneOf:t.anyOf,c=Ye(t),u=Rn(e,r,i,l,0,c,o),f=l[u];a={...a,...at(e,f,n,r,i,s,o)}}if(Vt in t&&t[Vt]!==!1){se(a,Ni,!0);const l=Z(t[Vt])?t[Vt]:{},c=F(t,Q,{});for(const u of Object.keys(i??{}))u in c||(a[u]=at(e,l,`${n}.${u}`,r,F(i,[u]),s,o))}if(Jt in t&&Array.isArray(i)){const{items:l,additionalItems:c}=t;Array.isArray(l)?i.forEach((u,f)=>{l[f]?a[f]=at(e,l[f],`${n}.${f}`,r,u,s,o):c?a[f]=at(e,c,`${n}.${f}`,r,u,s,o):console.warn(`Unable to generate path schema for "${n}.${f}". No schema defined for it`)}):i.forEach((u,f)=>{a[f]=at(e,l,`${n}.${f}`,r,u,s,o)})}else if(Q in t)for(const l in t.properties){const c=F(t,[Q,l],{});a[l]=at(e,c,`${n}.${l}`,r,F(i,[l]),s,o)}return a}function El(e,t,n="",r,i,s){return at(e,t,n,r,i,void 0,s)}function Al(e,t){if(t.length===0&&typeof e!="object")return e;const n=xl(e,t);return Array.isArray(e)?Object.keys(n).map(r=>n[r]):n}function _l(e,t){const n=(i,s)=>typeof i!="object"||pe(i)||s&&!pe(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const c=i[l];if(typeof c=="object"){const u=o.map(f=>[...f,l]);c[Ni]&&c[tr]!==""?s.push(c[tr]):r(c,s,u)}else l===tr&&c!==""&&o.forEach(u=>{const f=F(t,u),h=a.length===1;(n(f,h)||Array.isArray(f)&&f.every(m=>n(m,h)))&&s.push(u)})}),s};return r(e)}function Gy(e,t,n={},r){const i=Oe(e,t,n,r),s=El(e,i,"",n,r),a=_l(s,r).map(l=>Array.isArray(l)?l.join("."):l);return Al(r,a)}const Mt=Symbol("no Value");function wi(e,t,n,r,i={},s){let o;if(z(n,Q)){const a={};if(z(r,Q)){const u=F(r,Q,{});Object.keys(u).forEach(f=>{z(i,f)&&(a[f]=void 0)})}const l=Object.keys(F(n,Q,{})),c={};l.forEach(u=>{const f=F(i,u);let h=F(r,[Q,u],{}),m=F(n,[Q,u],{});z(h,ae)&&(h=Oe(e,h,t,f,s)),z(m,ae)&&(m=Oe(e,m,t,f,s));const d=F(h,"type"),p=F(m,"type");if(!d||d===p)if(z(a,u)&&delete a[u],p==="object"||p==="array"&&Array.isArray(f)){const y=wi(e,t,m,h,f,s);(y!==void 0||p==="array")&&(c[u]=y)}else{const y=F(m,"default",Mt),S=F(h,"default",Mt);y!==Mt&&y!==f&&(S===f?a[u]=y:F(m,"readOnly")===!0&&(a[u]=void 0));const O=F(m,"const",Mt),E=F(h,"const",Mt);O!==Mt&&O!==f&&(a[u]=E===f?O:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...c}}else if(F(r,"type")==="array"&&F(n,"type")==="array"&&Array.isArray(i)){let a=F(r,"items"),l=F(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){z(a,ae)&&(a=Oe(e,a,t,i,s)),z(l,ae)&&(l=Oe(e,l,t,i,s));const c=F(a,"type"),u=F(l,"type");if(!c||c===u){const f=F(n,"maxItems",-1);u==="object"?o=i.reduce((h,m)=>{const d=wi(e,t,l,a,m,s);return d!==void 0&&(f<0||h.length<f)&&h.push(d),h},[]):o=f>0&&i.length>f?i.slice(0,f):i}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}class zy{constructor(t,n,r,i){n&&n[gn]===nr?this.rootSchema=vi(n,F(n,le,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!fe(this.rootSchema,n)||!fe(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,n,r){return $y(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,i){return Sn(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,i){return Sl(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(t,n,r){return Hy(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return Rn(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return rs(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return sr(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return Ol(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return os(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return ss(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,n){return Gy(this.validator,t,this.rootSchema,n)}retrieveSchema(t,n,r){return Oe(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return wi(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return El(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function Yy(e,t,n={},r){return new zy(e,t,n,r)}function Jy(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",c=decodeURI(((t=a.map(u=>u.split("=")).find(([u])=>u==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const u=atob(s),f=new Array(u.length);for(let m=0;m<u.length;m++)f[m]=u.charCodeAt(m);return{blob:new window.Blob([new Uint8Array(f)],{type:l}),name:c}}catch(u){throw new Error("File is invalid: "+u.message)}}function lt(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function Il(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return Il(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:lt(r,2)});return n}function Ao(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function Zy(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function Xy(e,t){return Zy(e,t)}function as(e,t){return Array.isArray(t)?t.some(n=>fe(n,e)):fe(t,e)}function Qy(e,t=[],n=!1){const r=t.map((i,s)=>as(i.value,e)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function eg(e,t,n,r="indexed",i){if(typeof e>"u"||n&&Array.isArray(e)&&e.length<1||!n&&e===i)return i;if(r==="realValue")return n?e.map(String):String(e);const o=Qy(e,t,n);return typeof o>"u"?i:o}function _r(e,t=[],n){if(Array.isArray(e))return e.map(s=>_r(s,t)).filter(s=>s!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function _o(e,t,n){if(e===""||!Array.isArray(t))return n;const r=t.find(s=>String(s.value)===e);if(r)return r.value;const i=Number(e);return!isNaN(i)&&i>=0&&i<t.length?t[i].value:n}function _t(e,t,n="indexed",r){return n!=="realValue"?_r(e,t,r):Array.isArray(e)?e.map(i=>_o(i,t,r)):_o(e,t,r)}function ls(e,t,n="indexed"){return n!=="realValue"?String(t):en(e)?"":String(typeof e=="object"?t:e)}function tg(e,t,n=[]){const r=_r(e,n);return Array.isArray(t)?t.filter(i=>!fe(i,r)):fe(r,t)?void 0:t}function ng(e,t,n=[]){const r=_r(e,n);if(!en(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return t.slice(0,i).concat(r,t.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return t}var rg=1,ig=4;function cs(e){return _n(e,rg|ig)}function sg(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:Gi(e,t,n,r)}class Tl{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?F(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},sg(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?cs(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=F(r,Ee);return Array.isArray(i)||(i=[],r[Ee]=i),Array.isArray(t)?se(r,Ee,[...new Set([...i,...t])]):se(r,Ee,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return se(r,Ee,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return se(n,Ee,[]),this}}function og(e,t){if(e==null)return{};var n=sn(Qi(e),function(r){return[r]});return t=Yi(t),wl(e,n,function(r,i){return t(r,i[0])})}var ag=200;function lg(e,t,n,r){var i=-1,s=Xi,o=!0,a=e.length,l=[],c=t.length;if(!a)return l;t.length>=ag&&(s=jn,o=!1,t=new Tt(t));e:for(;++i<a;){var u=e[i],f=u;if(u=u!==0?u:0,o&&f===f){for(var h=c;h--;)if(t[h]===f)continue e;l.push(u)}else s(t,f,r)||l.push(u)}return l}var cg=Er(function(e,t){return Dn(e)?lg(e,Vn(t,1,Dn,!0)):[]});function Io(e,t){const n=gt(e),r=gt(t);if(e===t||!n&&!r)return[];if(n&&!r)return Me(e);if(!n&&r)return Me(t);{const i=Me(og(e,(o,a)=>!fe(o,F(t,a)))),s=cg(Me(t),Me(e));return[...i,...s]}}function ug(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:c}=e,u={type:"day",range:[1,31],value:i},f={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},m=[];switch(r){case"MDY":m.push(f,u,h);break;case"DMY":m.push(u,f,h);break;default:m.push(h,f,u)}return t&&m.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:c}),m}function fg(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function dg(e,t,n={},r=!0){const i={type:t||"text",...fg(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function us(e){var t;return(t=e?.optionValueFormat)!==null&&t!==void 0?t:"indexed"}const To={props:{disabled:!1},submitText:"Submit",norender:!1};function hg(e={}){const t=M(e);if(t&&t[fr]){const n=t[fr];return{...To,...n}}return To}function q(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const i=n[e];return r[i]}return n[e]||r[e]}var pg=0;function Cl(e){var t=++pg;return Vi(e)+t}function fs(){if(typeof process>"u"||F(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,Cl("test-id-")),e.get(n)}})}const Vr={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function mg(e){let t=F(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>w.jsx(e,{options:{...n,...r},...i}),se(e,"MergedWidget",t)}return t}function Je(e,t,n={}){const r=ke(e);if(typeof t=="function"||t&&Es.isForwardRef(N.createElement(t))||Es.isMemo(t))return mg(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const i=n[t];return Je(e,i,n)}if(typeof r=="string"){if(!(r in Vr))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in Vr[r]){const i=n[Vr[r][t]];return Je(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function yg(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function gg(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Ke(e){return yg(gg(e))}function bg(e){return Ke(e)}function Sg(e,t,n={}){try{return Je(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Dt(e,t){return`${St(e)?e:e[le]}__${t}`}function Hn(e){return Dt(e,"description")}function Pl(e){return Dt(e,"error")}function ds(e){return Dt(e,"examples")}function Fl(e){return Dt(e,"help")}function hs(e){return Dt(e,"title")}function Nt(e,t=!1){const n=t?` ${ds(e)}`:"";return`${Pl(e)} ${Hn(e)} ${Fl(e)}${n}`}function jl(e,t){return`${e}-${t}`}function At(e,t){return Dt(e,t)}function Hr(e,t){return Dt(e,`optional${t}`)}function ln(e){return!en(e)&&(!Z(e)||Array.isArray(e)||!pe(e))}function vg(e,t){const{rootSchema:n,schemaUtils:r}=e;if($n(t,n))return!0;if(ae in n){const i=r.retrieveSchema(n);return $n(t,Qt(i,En))}return!1}function Og(e,t,n){return t?n:e}function wg(e){return e?new Date(e).toJSON():void 0}function ps(e,t,n){const r=[Tu];return z(e,Ds)&&r.unshift(Ds),F(e,[...r,t],n)}function or(e){if(en(e)||e==="")return!0;if(Array.isArray(e))return e.length===0;if(W(e)){const t=e;return Object.keys(t).every(r=>or(t[r]))}return!1}function Kt(e,t,n,r){if(!W(t))return r;const i=Oe(e,t,n,r);if(Array.isArray(r)){const u=i.items;if(!u)return r;let f=!1;const h=r.map((m,d)=>{let p=u;Array.isArray(u)&&(p=u[d]||i.additionalItems||{});const y=Kt(e,p,n,m);return y!==m&&(f=!0),y===void 0?{}:y});return f?h:r}const{properties:s,required:o=[]}=i;if(!W(r)||!s)return r;const a={},l=r;let c=!1;for(const u of Object.keys(l)){const f=l[u],h=s[u]||{},m=o.includes(u),d=W(f),p=Array.isArray(f);if((d||p)&&s[u]){const y=Kt(e,h,n,f);if(!m&&or(y))continue;a[u]=y,c=!0}else{if(!m&&or(f)&&s[u])continue;a[u]=f,or(f)||(c=!0)}}if(!(!c&&Object.keys(a).length===0))return a}function xg(e,t){if(!Array.isArray(t))return e;const n=u=>u.reduce((f,h)=>(f[h]=!0,f),{}),r=u=>u.length>1?`properties '${u.join("', '")}'`:`property '${u[0]}'`,i=n(e),s=t.filter(u=>u==="*"||i[u]),o=n(s),a=e.filter(u=>!o[u]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const c=[...s];return c.splice(l,1,...a),c}function Kr(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Eg(e,t,n){var r,i;const s=(r=e[En])!==null&&r!==void 0?r:e[ae],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!t||pe(t)?l={...a}:l=Pt(a,t):l=t||{},o){let c=e;if(s&&e[ae]&&!e[En])try{c=ns(s,n.rootSchema)}catch(u){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
25
|
+
`,u),l}for(const u of[B,Y]){const f=c[u];if(!Array.isArray(f)||f.length===0)continue;const h=l[u],m=Array.isArray(h)?[...h]:[];let d=!1;for(let p=0;p<f.length;p++){const y=f[p],S=(i=y?.[En])!==null&&i!==void 0?i:y?.[ae];if(S&&S in o){const O=m[p]||{};m[p]=Pt(o[S],O),d=!0}}d&&(l[u]=m)}}return l}function ar(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return ar(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return ar(e.oneOf[0]);if(e.allOf){const t=n=>ar(n);return e.allOf.some(t)}return!1}function $l(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=e;return!Ao(o,t)||!Ao(a,n)}const{props:i,state:s}=e;return!fe(i,t)||!fe(s,n)}function Co(e){const t=Ya(e.map(n=>Z(n)?ke(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Kn(e,t,n,r){const{enableOptionalDataFieldForType:i=[]}=M(r,e.globalUiOptions);let s;return Y in t&&Array.isArray(t[Y])?s=Co(t[Y]):B in t&&Array.isArray(t[B])?s=Co(t[B]):s=ke(t),!vg(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function Po(e,t=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=e,l=Date.UTC(n,r-1,i,s,o,a),c=new Date(l).toJSON();return t?c:c.slice(0,10)}function ms(e,t=[]){if(!e)return[];let n=[];return Ee in e&&(n=n.concat(e[Ee].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Ee){const s=e[i];gt(s)&&(r=r.concat(ms(s,[...t,i])))}return r},n)}function Dl(e){return ve(e)?sn(e,bt):Wn(e)?[e]:Zi(Ta(Vi(e)))}function Ag(e){const t=new Tl;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Dl(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&t.addErrors(i,s)}),t.ErrorSchema}function Ne(e,t,n,r){const i=Array.isArray(n)?n:n?.path,s=e===""?[]:[e],o=i?i.concat(...s):s,a=[t.idPrefix,...o].join(t.idSeparator);let l;return t.nameGenerator&&o.length>0&&(l=t.nameGenerator(o,t.idPrefix,r)),{path:o,[le]:a,...l!==void 0&&{name:l}}}function Nl(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return gt(r)?{...t,[n]:Nl(r)}:{...t,[n]:r}}},{})}function _g(e){return Object.values(e).every(t=>t!==-1)}function Ig(e){const{className:t="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:c,autofocus:u,registry:f,onBlur:h,onFocus:m}=e,d=`${o}_${n}`,{SelectWidget:p}=f.widgets,y=N.useCallback(S=>s(n,S),[s,n]);return w.jsx(p,{schema:{type:"integer"},id:d,name:a,className:t,options:{enumOptions:Il(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:c,autofocus:u,onChange:y,onBlur:h,onFocus:m,registry:f,label:"","aria-describedby":Nt(o)})}function Tg(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=e,[a,l]=N.useState(Kr(o,t));N.useEffect(()=>{l(Kr(o,t))},[t,o]);const c=N.useCallback((m,d)=>{const p={...a,[m]:typeof d>"u"?-1:d};_g(p)?s(Po(p,t)):l(p)},[a,s,t]),u=N.useCallback(m=>{m.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),f=N.useCallback(m=>{if(m.preventDefault(),n||r)return;const d=Kr(new Date().toJSON(),t);s(Po(d,t))},[n,r,t,s]);return{elements:N.useMemo(()=>ug(a,t,i.yearsRange,i.format),[a,t,i.yearsRange,i.format]),handleChange:c,handleClear:u,handleSetNow:f}}function Rt(e){const t=N.useRef(e);return $n(e,t.current)||(t.current=e),t.current}function Cg(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Pg(e){const{name:t,size:n,type:r}=e;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:Cg(a.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function Fg(e){return Promise.all(Array.from(e).map(Pg))}function Fo(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=Jy(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function jg(e,t,n=!1){const r=N.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),i=N.useMemo(()=>Array.isArray(e)?Fo(e):Fo([e||""]),[e]),s=N.useCallback(a=>{Fg(a).then(l=>{const c=l.map(u=>u.dataURL||null);t(n?r.concat(...c):c[0])})},[r,n,t]),o=N.useCallback(a=>{if(n){const l=r.filter((c,u)=>u!==a);t(l)}else t(void 0)},[r,n,t]);return{filesInfo:i,handleChange:s,handleRemove:o}}function $g(e){if(!e)return"";const t=new Date(e),n=lt(t.getFullYear(),4),r=lt(t.getMonth()+1,2),i=lt(t.getDate(),2),s=lt(t.getHours(),2),o=lt(t.getMinutes(),2),a=lt(t.getSeconds(),2),l=lt(t.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function vn(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:i}=e;let s=ms(t),o=t;return pe(i)||(o=Pt(i,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function Dg(e){for(const t in e){const n=e,r=n[t];t===ae&&typeof r=="string"&&r.startsWith("#")?n[t]=pa+r:n[t]=ys(r)}return e}function Ng(e){for(let t=0;t<e.length;t++)e[t]=ys(e[t]);return e}function ys(e){return Array.isArray(e)?Ng([...e]):Z(e)?Dg({...e}):e}var te;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(te||(te={}));function Rg(e,t){var n=ve(e)?zi:ml;return n(e,Fa(t))}function Mg(e,t){return e==null?!0:il(e,t)}function xi(){return Cl("rjsf-array-item-")}function jo(e){return Array.isArray(e)?e.map(t=>({key:xi(),item:t})):[]}function Rl(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Ug(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function Ml(e,t,n,r){let{addable:i}=M(r,e.globalUiOptions);return i!==!1&&(t.maxItems!==void 0?i=n.length<t.maxItems:i=!0),i}function Ul(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return e.items}function kg(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:is(t)&&Eu(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Lg(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:c,onBlur:u,onFocus:f,registry:h,rawErrors:m,name:d,onSelectChange:p}=e,{widgets:y,schemaUtils:S,globalFormOptions:O,globalUiOptions:E}=h,b=S.retrieveSchema(t.items,i),g=r?.items??r,v=tn(b,g),{widget:x="select",title:A,..._}=M(r,E),I=Je(t,x,y),P=A??t.title??d,T=S.getDisplayLabel(t,r,E),C=Rt(Ne("",O,n,!0));return w.jsx(I,{id:C[le],name:d,multiple:!0,onChange:p,onBlur:u,onFocus:f,options:{..._,enumOptions:v},schema:t,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:P,hideLabel:!T,placeholder:c,autofocus:a,rawErrors:m,htmlName:C.name})}function Bg(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:c,onBlur:u,onFocus:f,formData:h=[],registry:m,rawErrors:d,name:p,onSelectChange:y}=e,{widgets:S,schemaUtils:O,globalFormOptions:E,globalUiOptions:b}=m,{widget:g,title:v,...x}=M(r,b),A=Je(t,g,S),_=v??t.title??p,I=O.getDisplayLabel(t,r,b),P=Rt(Ne("",E,n,!0));return w.jsx(A,{id:P[le],name:p,multiple:!0,onChange:y,onBlur:u,onFocus:f,options:x,schema:t,uiSchema:r,registry:m,value:h,disabled:i,readonly:s,hideError:l,required:a,label:_,hideLabel:!I,placeholder:c,autofocus:o,rawErrors:d,htmlName:P.name})}function Wg(e){const{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:c,onFocus:u,registry:f,formData:h=[],rawErrors:m,onSelectChange:d}=e,{widgets:p,schemaUtils:y,globalFormOptions:S,globalUiOptions:O}=f,{widget:E="files",title:b,...g}=M(n,O),v=Je(t,E,p),x=b??t.title??i,A=y.getDisplayLabel(t,n,O),_=Rt(Ne("",S,r,!0));return w.jsx(v,{options:g,id:_[le],name:i,multiple:!0,onChange:d,onBlur:c,onFocus:u,schema:t,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:f,autofocus:a,rawErrors:m,label:x,hideLabel:!A,htmlName:_.name})}function kl(e){const{itemKey:t,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:c,canAdd:u,canRemove:f=!0,canMoveUp:h,canMoveDown:m,itemSchema:d,itemData:p,itemUiSchema:y,itemFieldPathId:S,itemErrorSchema:O,autofocus:E,onBlur:b,onFocus:g,onChange:v,rawErrors:x,totalItems:A,title:_,handleAddItem:I,handleCopyItem:P,handleRemoveItem:T,handleReorderItems:C}=e,{schemaUtils:D,fields:{ArraySchemaField:j,SchemaField:$},globalUiOptions:k}=a,K=Rt(S),L=j||$,ee=q("ArrayFieldItemTemplate",a,l),re=D.getDisplayLabel(d,y,k),{description:ce}=M(y),me=!!ce||!!d.description,{orderable:R=!0,removable:ie=!0,copyable:J=!1}=l,V={moveUp:R&&h,moveDown:R&&m,copy:J&&u,remove:ie&&f,toolbar:!1};V.toolbar=Object.keys(V).some(be=>V[be]);const H=N.useCallback(be=>{I(be,n+1)},[I,n]),U=N.useCallback(be=>{P(be,n)},[P,n]),X=N.useCallback(be=>{T(be,n)},[T,n]),ne=N.useCallback(be=>{C(be,n,n-1)},[C,n]),we=N.useCallback(be=>{C(be,n,n+1)},[C,n]),xe={children:w.jsx(L,{name:r,title:_,index:n,schema:d,uiSchema:y,formData:p,errorSchema:O,fieldPathId:K,required:Ug(d),onChange:v,onBlur:b,onFocus:g,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:x}),buttonsProps:{fieldPathId:K,disabled:i,readonly:o,canAdd:u,hasCopy:V.copy,hasMoveUp:V.moveUp,hasMoveDown:V.moveDown,hasRemove:V.remove,index:n,totalItems:A,onAddItem:H,onCopyItem:U,onRemoveItem:X,onMoveUpItem:ne,onMoveDownItem:we,registry:a,schema:d,uiSchema:y},itemKey:t,className:"rjsf-array-item",disabled:i,hasToolbar:V.toolbar,index:n,totalItems:A,readonly:o,registry:a,schema:d,uiSchema:y,parentUiSchema:c,displayLabel:re,hasDescription:me};return w.jsx(ee,{...xe})}function qg(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:f=!1,hideError:h=!1,registry:m,onBlur:d,onFocus:p,rawErrors:y,onChange:S,keyedFormData:O,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v}=e,x=t.title||a||o,{schemaUtils:A,fields:_,formContext:I,globalFormOptions:P,globalUiOptions:T}=m,{OptionalDataControlsField:C}=_,D=M(n,T),j=Z(t.items)?t.items:{},$=A.retrieveSchema(j),k=Rl(O),K=Kn(m,t,f,n),L=ln(s),ee=Ml(m,t,k,n)&&(!K||L),re=L?O:[],ce=K?" rjsf-optional-array-field":"",me=e.childFieldPathId??i,R=K?w.jsx(C,{...e,fieldPathId:me}):void 0,ie={canAdd:ee,items:re.map((V,H)=>{const{key:U,item:X}=V,ne=X,we=A.retrieveSchema(j,ne),xe=r?r[H]:void 0,be=Ne(H,P,me),Ce=Ul(n,X,H,I),it={itemKey:U,index:H,name:o&&`${o}-${H}`,registry:m,uiOptions:D,parentUiSchema:n,hideError:h,readonly:c,disabled:l,required:f,title:x?`${x}-${H+1}`:void 0,canAdd:ee,canMoveUp:H>0,canMoveDown:H<k.length-1,itemSchema:we,itemFieldPathId:be,itemErrorSchema:xe,itemData:ne,itemUiSchema:Ce,autofocus:u&&H===0,onBlur:d,onFocus:p,rawErrors:y,totalItems:O.length,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v,onChange:S};return w.jsx(kl,{...it},U)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${ce}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:c,required:f,schema:t,title:x,formData:k,rawErrors:y,registry:m,optionalDataControl:R},J=q("ArrayFieldTemplate",m,D);return w.jsx(J,{...ie})}function Vg(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:f=!1,hideError:h=!1,registry:m,onBlur:d,onFocus:p,rawErrors:y,keyedFormData:S,onChange:O,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v}=e;let{formData:x=[]}=e;const A=t.title||a||o,{schemaUtils:_,fields:I,formContext:P,globalFormOptions:T,globalUiOptions:C}=m,D=M(n,C),{OptionalDataControlsField:j}=I,$=Kn(m,t,f,n),k=ln(r),L=(Z(t.items)?t.items:[]).map((H,U)=>_.retrieveSchema(H,x[U])),ee=Z(t.additionalItems)?_.retrieveSchema(t.additionalItems,r):null,re=e.childFieldPathId??s;x.length<L.length&&(x=x.concat(new Array(L.length-x.length)));const ce=k?S:[],me=$?" rjsf-optional-array-field":"",R=$?w.jsx(j,{...e,fieldPathId:re}):void 0,ie=Ml(m,t,x,n)&&!!ee&&(!$||k),J={canAdd:ie,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${me}`,disabled:l,fieldPathId:s,formData:r,items:ce.map((H,U)=>{const{key:X,item:ne}=H,we=ne,xe=U>=L.length,be=(xe&&Z(t.additionalItems)?_.retrieveSchema(t.additionalItems,we):L[U])||{},Ce=Ne(U,T,re);let it;xe?it=n.additionalItems:Array.isArray(n.items)?it=n.items[U]:it=Ul(n,ne,U,P);const cn=i?i[U]:void 0,un={index:U,itemKey:X,name:o&&`${o}-${U}`,registry:m,uiOptions:D,parentUiSchema:n,hideError:h,readonly:c,disabled:l,required:f,title:A?`${A}-${U+1}`:void 0,canAdd:ie,canRemove:xe,canMoveUp:U>=L.length+1,canMoveDown:xe&&U<x.length-1,itemSchema:be,itemData:we,itemUiSchema:it,itemFieldPathId:Ce,itemErrorSchema:cn,autofocus:u&&U===0,onBlur:d,onFocus:p,rawErrors:y,totalItems:S.length,onChange:O,handleAddItem:E,handleCopyItem:b,handleRemoveItem:g,handleReorderItems:v};return w.jsx(kl,{...un},X)}),onAddClick:E,readonly:c,required:f,registry:m,schema:t,uiSchema:n,title:A,errorSchema:i,rawErrors:y,optionalDataControl:R},V=q("ArrayFieldTemplate",m,D);return w.jsx(V,{...J})}function Hg(e=[]){const t=N.useMemo(()=>Ke(e),[e]),[n,r]=N.useState(()=>({formDataHash:t,keyedFormData:jo(e)}));let{keyedFormData:i,formDataHash:s}=n;if(t!==s){const a=Array.isArray(e)?e:[],l=i||[];i=a.length===l.length?l.map((c,u)=>({key:c.key,item:a[u]})):jo(a),s=t,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=Rl(a),c=Ke(l);return r({formDataHash:c,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Kg(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=e,{globalFormOptions:l,schemaUtils:c,translateString:u}=s,{keyedFormData:f,updateKeyedFormData:h}=Hg(o),m=e.childFieldPathId??i,d=N.useCallback((v,x)=>{v&&v.preventDefault();let A;if(r){A={};for(const P in r){const T=parseInt(P);x===void 0||T<x?se(A,[T],r[P]):T>=x&&se(A,[T+1],r[P])}}const _={key:xi(),item:kg(s,t)},I=[...f];x!==void 0?I.splice(x,0,_):I.push(_),a(h(I),m.path,A)},[f,s,t,a,h,r,m]),p=N.useCallback((v,x)=>{v&&v.preventDefault();let A;if(r){A={};for(const P in r){const T=parseInt(P);T<=x?se(A,[T],r[P]):T>x&&se(A,[T+1],r[P])}}const _={key:xi(),item:cs(f[x].item)},I=[...f];x!==void 0?I.splice(x+1,0,_):I.push(_),a(h(I),m.path,A)},[f,a,h,r,m]),y=N.useCallback((v,x)=>{v&&v.preventDefault();let A;if(r){A={};for(const I in r){const P=parseInt(I);P<x?se(A,[P],r[I]):P>x&&se(A,[P-1],r[I])}}const _=f.filter((I,P)=>P!==x);a(h(_),m.path,A)},[f,a,h,r,m]),S=N.useCallback((v,x,A)=>{v&&(v.preventDefault(),v.currentTarget.blur());let _;if(r){_={};for(const T in r){const C=parseInt(T);C==x?se(_,[A],r[x]):C==A?se(_,[x],r[A]):se(_,[T],r[C])}}function I(){const T=f.slice();return T.splice(x,1),T.splice(A,0,f[x]),T}const P=I();a(h(P),m.path,_)},[f,a,h,r,m]),O=N.useCallback((v,x,A,_)=>{a(v===void 0?null:v,x,A,_)},[a]),E=N.useCallback(v=>{a(v,m.path,void 0,m?.[le])},[a,m]),b={...e,formData:o,fieldPathId:m,onSelectChange:E},g={...e,handleAddItem:d,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:S,keyedFormData:f,onChange:O};if(!(Jt in t)){if(!l.useFallbackUiForUnsupportedType){const x=M(n),A=q("UnsupportedFieldTemplate",s,x);return w.jsx(A,{schema:t,fieldPathId:i,reason:u(te.MissingItems),registry:s})}const v={...t,[Jt]:{type:void 0}};b.schema=v,g.schema=v}return c.isMultiSelect(b.schema)?w.jsx(Lg,{...b}):vl(n)?w.jsx(Bg,{...b}):is(b.schema)?w.jsx(Vg,{...g}):c.isFilesArray(b.schema,n)?w.jsx(Wg,{...b}):w.jsx(qg,{...g})}function Gg(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:c,hideError:u,autofocus:f,title:h,onChange:m,onFocus:d,onBlur:p,rawErrors:y}=e,{title:S}=t,{widgets:O,translateString:E,globalUiOptions:b}=o,{widget:g="checkbox",title:v,label:x=!0,enumNames:A,..._}=M(r,b),I=Je(t,g,O),P=E(te.YesLabel),T=E(te.NoLabel);let C;const D=v??S??h??n;if(Array.isArray(t.oneOf))C=tn({oneOf:t.oneOf.map($=>{if(Z($))return{...$,title:$.title||($.const===!0?P:T)}}).filter($=>$)},r);else{const $=t.enum??[!0,!1];!A&&$.length===2&&$.every(k=>typeof k=="boolean")?C=[{value:$[0],label:$[0]?P:T},{value:$[1],label:$[1]?P:T}]:C=tn({enum:$},r)}const j=N.useCallback(($,k,K)=>m($,i.path,k,K),[m,i]);return w.jsx(I,{options:{..._,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,onChange:j,onFocus:d,onBlur:p,label:D,hideLabel:!x,value:s,required:a,disabled:l,readonly:c,hideError:u,registry:o,autofocus:f,rawErrors:y,htmlName:i.name})}function zg(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Yg(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Jg(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function Zg(e){const{id:t,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:c=!1,onBlur:u,onFocus:f,registry:h,fieldPathId:m,onChange:d,errorSchema:p}=e,{translateString:y,fields:S,globalFormOptions:O}=h,[E,b]=N.useState(Yg(n)),g=M(o),v=Rt(Ne("__internal_type_selector",O,m)),x=y(te.Type),A=N.useMemo(()=>zg(x),[x]),_=T=>{T!=null&&(b(T),d(Jg(n,T),m.path,p,t))};if(!O.useFallbackUiForUnsupportedType){const{reason:T=y(te.UnknownFieldType,[String(i.type)])}=e,C=q("UnsupportedFieldTemplate",h,g);return w.jsx(C,{schema:i,fieldPathId:m,reason:T,registry:h})}const I=q("FallbackFieldTemplate",h,g),{SchemaField:P}=S;return w.jsx(I,{schema:i,registry:h,typeSelector:w.jsx(P,{fieldPathId:v,name:`${s}__fallback_type`,schema:A,formData:E,onChange:_,onBlur:u,onFocus:f,registry:h,hideLabel:!r,disabled:l,readonly:c,required:a},n?Ke(n):"__empty__"),schemaField:w.jsx(P,{...e,schema:{type:E,title:y(te.Value),...E==="object"&&{additionalProperties:!0}}})})}function Xg(e,t){return sn(t,function(n){return e[n]})}function Qg(e){return e==null?[]:Xg(e,Me(e))}var eb=Math.max;function tb(e,t,n,r){e=$t(e)?e:Qg(e),n=n?ja(n):0;var i=e.length;return n<0&&(n=eb(i+n,0)),St(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ga(e,t,n)>-1}var nb=Math.min;function rb(e,t,n){for(var r=Xi,i=e[0].length,s=e.length,o=s,a=Array(s),l=1/0,c=[];o--;){var u=e[o];l=nb(u.length,l),a[o]=i>=120&&u.length>=120?new Tt(o&&u):void 0}u=e[0];var f=-1,h=a[0];e:for(;++f<i&&c.length<l;){var m=u[f],d=m;if(m=m!==0?m:0,!(h?jn(h,d):r(c,d))){for(o=s;--o;){var p=a[o];if(!(p?jn(p,d):r(e[o],d)))continue e}h&&h.push(d),c.push(m)}}return c}function ib(e){return Dn(e)?e:[]}var $o=Er(function(e){var t=sn(e,ib);return t.length&&t[0]===e[0]?rb(t):[]});function Ll(e){return e===void 0}var Ge;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Ge||(Ge={}));var In;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(In||(In={}));const sb=/^\$lookup=(.+)/,Gr="layoutGrid";function Do(e,t){return e??t}function ob(e){return/^\d+?$/.test(e)}const pt=fs();function ab(e,t,n,r,i){const s=F(n,[fi],{}),o=F(n,e),a={...F(o,[dt],{}),...t,...s},l={...o};pe(a)||se(l,[dt],a),pe(s)||se(l,[fi],s);let{readonly:c}=M(l);return(i===!0||Ll(c)&&r===!0)&&(c=!0,z(a,Pr)?se(l,[dt,Pr],!0):se(l,`ui:${Pr}`,!0)),{fieldUiSchema:l,uiReadonly:c}}function lb(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=Si([t]).sort(),i=Si([n]).sort();switch(e){case In.ALL:return $n(r,i);case In.SOME:return $o(r,i).length>0;case In.NONE:return $o(r,i).length===0;default:return!1}}function Ir(e,t,n){let r={},i=e[t];if(gt(i)){const{children:s,className:o,...a}=i;if(i=s,o){const c=o.split(" ").map(u=>ps(n,u,u)).join(" ");r={...a,className:c}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function No(e,t,n){let r;if(ob(n)&&e&&e?.type==="array"&&z(e,Jt)){const i=Number(n),s=e[Jt];Array.isArray(s)?i>s.length?r=rl(s):r=s[i]:r=s,t={[le]:t[le],path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function cb(e,t,n,r,i){const{schemaUtils:s,globalFormOptions:o}=e;let a=n,l=i;const c=t.split("."),u=c.pop();let f=s.retrieveSchema(a,r),h=r,m=f.readOnly;c.forEach(y=>{if(l=Ne(y,o,l),z(f,Q))a=F(f,[Q,y],{});else if(f&&(z(f,B)||z(f,Y))){const S=z(f,B)?B:Y,O=s.findSelectedOptionInXxxOf(f,y,S,h);a=F(O,[Q,y],{})}else{const S=No(f,l,y);a=S.rawSchema??{},l=S.fieldPathId}h=F(h,y,{}),f=s.retrieveSchema(a,h),m=Do(f.readOnly,m)});let d,p=!1;if(pe(f)&&(f=void 0),f&&u){if(f&&(z(f,B)||z(f,Y))){const S=z(f,B)?B:Y;f=s.findSelectedOptionInXxxOf(f,u,S,h)}l=Ne(u,o,l),p=f!==void 0&&Array.isArray(f.required)&&tb(f.required,u);const y=No(f,l,u);if(y.rawSchema?(f=y.rawSchema,l=y.fieldPathId):(f=F(f,[Q,u]),f=f&&s.retrieveSchema(f)),m=Do(f?.readOnly,m),f&&(z(f,B)||z(f,Y))){const S=z(f,B)?B:Y,O=Ye(f);d={options:f[S],hasDiscriminator:!!O}}}return{schema:f,isRequired:p,isReadonly:m,optionsInfo:d,fieldPathId:l}}function ub(e,t){let n=e;return St(n)&&(n=ps(t,n)),kn(n)?n:null}function fb(e,t){let n,r=null,i={},s;if(St(t)||Ll(t))n=t??"";else{const{name:o="",render:a,...l}=t;n=o,i=l,pe(i)||Rg(i,(c,u)=>{if(St(c)){const f=sb.exec(c);if(Array.isArray(f)&&f.length>1){const h=f[1];i[u]=ps(e,h,h)}}}),r=ub(a,e),!o&&r&&(s=w.jsx(r,{...l,"data-testid":pt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function Tr(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return t.map(l=>N.createElement(gs,{...n,key:`layoutGrid-${Ke(l)}`,schema:a,layoutGridSchema:l}))}function db(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:s,gridProps:o}=Ir(t,Ge.CONDITION,i),{operator:a,field:l="",value:c}=o,u=F(r,l,null);return lb(a,u,c)?w.jsx(Tr,{...n,childrenLayoutGridSchemaId:s}):null}function hb(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Ir(t,Ge.COLUMN,r),a=M(i),l=q("GridTemplate",r,a);return w.jsx(l,{column:!0,"data-testid":pt.col,...o,children:w.jsx(Tr,{...n,childrenLayoutGridSchemaId:s})})}function pb(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Ir(t,Ge.COLUMNS,r),a=M(i),l=q("GridTemplate",r,a);return s.map(c=>w.jsx(l,{column:!0,"data-testid":pt.col,...o,children:w.jsx(Tr,{...n,childrenLayoutGridSchemaId:[c]})},`column-${Ke(c)}`))}function mb(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Ir(t,Ge.ROW,r),a=M(i),l=q("GridTemplate",r,a);return w.jsx(l,{...o,"data-testid":pt.row,children:w.jsx(Tr,{...n,childrenLayoutGridSchemaId:s})})}function yb(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:c,registry:u,layoutGridSchema:f,...h}=e,{onChange:m}=h,{fields:d}=u,{SchemaField:p,LayoutMultiSchemaField:y}=d,S=fb(u,t),{name:O,UIComponent:E,uiProps:b}=S,{schema:g,isRequired:v,isReadonly:x,optionsInfo:A,fieldPathId:_}=cb(u,O,n,l,s),I=Rt(_);if(S.rendered)return S.rendered;if(g){const P=A?.hasDiscriminator?y:p,{fieldUiSchema:T,uiReadonly:C}=ab(O,b,r,x,c);return w.jsx(P,{"data-testid":A?.hasDiscriminator?pt.layoutMultiSchemaField:pt.field,...h,name:O,required:v,readonly:C,schema:g,uiSchema:T,errorSchema:F(i,O),fieldPathId:I,formData:F(l,O),onChange:m,onBlur:o,onFocus:a,options:A?.options,registry:u})}return E?w.jsx(E,{"data-testid":pt.uiComponent,...h,name:O,required:v,formData:l,readOnly:!!x||c,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:u,...b}):null}function gs(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=M(t);if(!n&&Gr in r&&Z(r[Gr])&&(n=r[Gr]),Z(n)){if(Ge.ROW in n)return w.jsx(mb,{...e,layoutGridSchema:n});if(Ge.COLUMN in n)return w.jsx(hb,{...e,layoutGridSchema:n});if(Ge.COLUMNS in n)return w.jsx(pb,{...e,layoutGridSchema:n});if(Ge.CONDITION in n)return w.jsx(db,{...e,layoutGridSchema:n})}return w.jsx(yb,{...e,gridSchema:n})}gs.TEST_IDS=pt;function gb(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=e,l=M(i,o.globalUiOptions),{title:c}=l,{title:u}=r,f=c||n||u||a;if(!f)return null;const h=q("TitleFieldTemplate",o,l);return w.jsx(h,{id:hs(t),title:f,required:s,schema:r,uiSchema:i,registry:o})}function zr(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const o=F(s,[Q,t]);return F(o,yr,F(o,je,r))===n})}function Ro(e,t,n,r,i){const s=t.map(l=>n.retrieveSchema(l,i));let o=e;z(e,B)?o={...e,[B]:s}:z(e,Y)&&(o={...e,[Y]:s});const a=tn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function bb(e){const{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:c,registry:u,uiSchema:f,schema:h,autofocus:m,readonly:d,required:p,errorSchema:y,hideError:S=!1}=e,{widgets:O,schemaUtils:E,globalUiOptions:b}=u,[g,v]=N.useState(Ro(h,l,E,f,i)),x=F(s,le),A=Ye(h),_=q("FieldErrorTemplate",u,l),I=q("FieldTemplate",u,l),P=Ke(h),T=Ke(l),C=f?Ke(f):"",D=i?Ke(i):"";N.useEffect(()=>{v(Ro(h,l,E,f,i))},[P,T,E,C,D]);const{widget:j=A?"radio":"select",title:$="",placeholder:k="",optionsSchemaSelector:K=A,hideError:L,...ee}=M(f);if(!K)throw new Error("No selector field provided for the LayoutMultiSchemaField");const re=F(i,K);let ce=F(g[0]?.schema,[Q,K],{});const me=zr(g,K,re);ce=ce?.type?ce:{...ce,type:me?.type||n};const R=Je(ce,j,O),ie=L===void 0?S:!!L,J=F(y,[Ee],[]),V=Qt(y,[Ee]),H=E.getDisplayLabel(h,f,b),U=we=>{const xe=zr(g,K,we),be=zr(g,K,re);let Ce=E.sanitizeDataForNewSchema(xe,be,i);Ce&&xe&&(Ce=E.getDefaultFormState(xe,Ce,"excludeObjectChildren")),Ce&&se(Ce,K,we),a(Ce,s.path,void 0,x)},X={enumOptions:g,...ee},ne=!ie&&J.length>0?w.jsx(_,{fieldPathId:s,schema:h,errors:J,registry:u}):void 0;return w.jsx(I,{fieldPathId:s,id:x,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(g)&&pe(g),uiSchema:f,required:p,readonly:!!d,registry:u,displayLabel:H,errors:ne,onChange:a,onKeyRename:rr,onKeyRenameBlur:rr,onRemoveProperty:rr,children:w.jsx(R,{id:x,name:t,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(g)&&pe(g),uiSchema:f,autofocus:m,readonly:d,required:p,registry:u,multiple:!1,rawErrors:J,hideError:ie,hideLabel:!H,errorSchema:V,placeholder:k,onChange:U,onBlur:o,onFocus:c,value:re,options:X,htmlName:s.name})})}class Mo extends N.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(t,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!fe(t.options,i)){const{registry:{schemaUtils:l}}=this.props,c=i.map(u=>l.retrieveSchema(u,r));a={selectedOption:o,retrievedOptions:c}}if(!fe(r,t.formData)&&s.$id===t.fieldPathId.$id){const{retrievedOptions:l}=a,c=this.getMatchingOption(o,r,l);n&&c!==o&&(a={selectedOption:c,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(t,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=Ye(i);return s.getClosestMatchingOption(n,r,t,o)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,c=t!==void 0?parseInt(t,10):-1;if(c===n)return;const u=c>=0?r[c]:void 0,f=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(u,f,i);u&&(h=l.getDefaultFormState(u,h,"excludeObjectChildren")),this.setState({selectedOption:c},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:c,schema:u,uiSchema:f}=this.props,{widgets:h,fields:m,translateString:d,globalUiOptions:p,schemaUtils:y}=c,{SchemaField:S}=m,O=q("MultiSchemaFieldTemplate",c,p),E=Kn(c,u,l,f),b=ln(i),{selectedOption:g,retrievedOptions:v}=this.state,{widget:x="select",placeholder:A,autofocus:_,autocomplete:I,title:P=u.title,...T}=M(f,p),C=Je({type:"number"},x,h),D=F(r,Ee,[]),j=Qt(r,[Ee]),$=y.getDisplayLabel(u,f,p),k=g>=0&&v[g]||null;let K;if(k){const{required:J}=u;K=J?et({required:J},k):k}let L=[];B in u&&f&&B in f?Array.isArray(f[B])?L=f[B]:console.warn(`uiSchema.oneOf is not an array for "${P||t}"`):Y in u&&f&&Y in f&&(Array.isArray(f[Y])?L=f[Y]:console.warn(`uiSchema.anyOf is not an array for "${P||t}"`));let ee=f;g>=0&&L.length>g&&(ee=L[g]);const re=P?te.TitleOptionPrefix:te.OptionPrefix,ce=P?[P]:[],me=v.map((J,V)=>{const{title:H=J.title}=M(L[V]);return{label:H||d(re,ce.concat(String(V+1))),value:V}}),R=!E||b?w.jsx(C,{id:this.getFieldId(),name:`${t}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||pe(me),multiple:!1,rawErrors:D,errorSchema:j,value:g>=0?g:void 0,options:{enumOptions:me,...T},registry:c,placeholder:A,autocomplete:I,autofocus:_,label:P??t,hideLabel:!$,readonly:a}):void 0,ie=K&&K.type!=="null"&&w.jsx(S,{...this.props,schema:K,uiSchema:ee})||null;return w.jsx(O,{schema:u,registry:c,uiSchema:f,selector:R,optionSchemaField:ie})}}const Sb=/\.([0-9]*0)*$/,vb=/[0.]0*$/;function Ob(e){const{registry:t,onChange:n,formData:r,value:i}=e,[s,o]=N.useState(i),{StringField:a}=t.fields;let l=r;const c=N.useCallback((u,f,h,m)=>{o(u),`${u}`.charAt(0)==="."&&(u=`0${u}`);const d=typeof u=="string"&&u.match(Sb)?$s(u.replace(vb,"")):$s(u);n(d,f,h,m)},[n]);if(typeof s=="string"&&typeof l=="number"){const u=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(u)&&(l=s)}return w.jsx(a,{...e,formData:l,onChange:c})}function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ve.apply(null,arguments)}const Jn=["strong","em","del","mark"],Uo=[["**",Jn[0]],["__",Jn[0]],["~~",Jn[2]],["==",Jn[3]],["*","em"],["_","em"]];function wb(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var i=e[r]==="("?")":"]",s=1;for(r++;r<e.length&&s>0;)e[r]!=="\\"?(e[r]==="("&&i===")"&&s++,e[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function xb(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=Uo[o][0];if(e.startsWith(a)&&e.length>=2*a.length){r=a,i=a.length,s=Uo[o][1];break}}if(!r)return null;for(var l=i,c=!1,u=!1,f="",h=0,m="",d=!1,p="";l<e.length;){var y=e[l];if(d)m+=y,d=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||h!==0){if(y==="["&&!c&&h===0){var S=wb(e,l);if(S!==-1){m+=e.slice(l,S),l=S,p=e[S-1];continue}}if(u)m+=y,f?y===f&&(f=""):y==='"'||y==="'"?f=y:y===">"&&(u=!1),p=y,l++;else if(y!=="<"||c){if(y===`
|
|
26
26
|
`&&p===`
|
|
27
|
-
`&&!c&&h===0)return null;if(!c&&h===0){for(var O=0;l+O<e.length&&e[l+O]===r[0];)O++;if(O>=i&&(i!==1||r!=="*"&&r!=="_"||e[l-1]!==r&&e[l+1]!==r)){var E=[e.slice(0,l+O),s,m+e.slice(l+i,l+O)];return E.index=0,E.input=e,E}}m+=y,p=y,l++}else{var b=e[l+1],g=e.indexOf(">",l);if(g!==-1){var v=e.slice(l,g+1).endsWith("/>");b==="/"?h=Math.max(0,h-1):v||h++}u=!0,m+=y,p=y,l++}}else c=!c,m+=y,p=y,l++;else m+=y,d=!0,p=y,l++}return null}const
|
|
27
|
+
`&&!c&&h===0)return null;if(!c&&h===0){for(var O=0;l+O<e.length&&e[l+O]===r[0];)O++;if(O>=i&&(i!==1||r!=="*"&&r!=="_"||e[l-1]!==r&&e[l+1]!==r)){var E=[e.slice(0,l+O),s,m+e.slice(l+i,l+O)];return E.index=0,E.input=e,E}}m+=y,p=y,l++}else{var b=e[l+1],g=e.indexOf(">",l);if(g!==-1){var v=e.slice(l,g+1).endsWith("/>");b==="/"?h=Math.max(0,h-1):v||h++}u=!0,m+=y,p=y,l++}}else c=!c,m+=y,p=y,l++;else m+=y,d=!0,p=y,l++}return null}const Eb=["children","options"],ko=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),Lo={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Ab=["style","script","pre"],_b=["src","href","data","formAction","srcDoc","action"],Ib=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Tb=/\n{2,}$/,Bo=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Cb=/^ *> ?/gm,Pb=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Fb=/^ {2,}\n/,jb=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Wo=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,qo=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,$b=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Db=/^(?:\n *)*\n/,Nb=/\r\n?/g,Rb=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Mb=/^\[\^([^\]]+)]/,Ub=/\f/g,kb=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Lb=/^\[(x|\s)\]/,Vo=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ho=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ko=/^([^\n]+)\n *(=|-)\2{2,} *\n/,bs=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Bb(e){const t=bs.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),i=r.length+1;let s=t[0].length;e[s]===`
|
|
28
28
|
`&&s++;const o=s;let a=s,l=1;const c=e.length;for(;l>0;){const f=e.indexOf("<",s);if(f===-1)return null;let h=-1,m=-1;if(e[f+1]==="/")m=f;else if(e[f+1]===r[0]||e[f+1]===n[0]){let d=!0;for(let p=0;p<r.length;p++){const y=e[f+1+p];if(y!==r[p]&&y!==n[p]){d=!1;break}}!d||e[f+i]!==" "&&e[f+i]!==">"||(h=f)}if(h!==-1||m!==-1)if(h!==-1&&(m===-1||h<m))s=h+i+1,l++;else{let d=m+2;for(;d<c;){const y=e[d];if(y!==" "&&y!==" "&&y!==`
|
|
29
29
|
`&&y!=="\r")break;d++}if(d+r.length>c)return null;let p=!0;for(let y=0;y<r.length;y++){const S=e[d+y];if(S!==r[y]&&S!==n[y]){p=!1;break}}if(!p){s=d;continue}for(d+=r.length;d<c;){const y=e[d];if(y!==" "&&y!==" "&&y!==`
|
|
30
30
|
`&&y!=="\r")break;d++}if(d>=c||e[d]!==">"){s=d;continue}a=m,s=d+1,l--}else s=f+1}let u=0;for(;s+u<c&&e[s+u]===`
|
|
31
|
-
`;)u++;return[e.slice(0,s+u),n,t[2],e.slice(o,a)]}const
|
|
31
|
+
`;)u++;return[e.slice(0,s+u),n,t[2],e.slice(o,a)]}const Wb=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Go=/^<!--[\s\S]*?(?:-->)/,qb=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ei=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Vb=/^\{.*\}$/,Hb=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Kb=/^<([^ >]+[:@\/][^ >]+)>/,Gb=/-([a-z])?/gi,zo=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,zb=/^[^\n]+(?: \n|\n{2,})/,Yb=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Jb=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Zb=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Xb=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Qb=/\t/g,e0=/(^ *\||\| *$)/g,t0=/^ *:-+: *$/,n0=/^ *:-+ *$/,r0=/^ *-+: *$/,i0=/^(:[a-zA-Z0-9-_]+:)/,s0=/^\\([^0-9A-Za-z\s])/,o0=/\\([^0-9A-Za-z\s])/g,a0=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,l0=/^\n+/,c0=/^([ \t]*)/,u0=/(?:^|\n)( *)$/,Ss="(?:\\d+\\.)",vs="(?:[*+-])";function Bl(e){return"( *)("+(e===1?Ss:vs)+") +"}const Wl=Bl(1),ql=Bl(2);function Vl(e){return RegExp("^"+(e===1?Wl:ql))}const f0=Vl(1),d0=Vl(2);function Hl(e){return RegExp("^"+(e===1?Wl:ql)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Ss:vs)+" )[^\\n]*)*(\\n|$)","gm")}const h0=Hl(1),p0=Hl(2);function Kl(e){const t=e===1?Ss:vs;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Gl=Kl(1),zl=Kl(2);function Yo(e,t){const n=t===1,r=n?Gl:zl,i=n?h0:p0,s=n?f0:d0;return{t:o=>s.test(o),o:ut(function(o,a){const l=u0.exec(a.prevCapture);return l&&(a.list||!a.inline&&!a.simple)?r.exec(o=l[1]+o):null}),u:1,i(o,a,l){const c=n?+o[2]:void 0,u=o[0].replace(Tb,`
|
|
32
32
|
`).match(i),f=s.exec(u[0]),h=RegExp("^ {1,"+(f?f[0].length:0)+"}","gm");let m=!1;return{items:u.map(function(d,p){const y=d.replace(h,"").replace(s,""),S=p===u.length-1,O=Le(y,`
|
|
33
33
|
|
|
34
34
|
`)||S&&m;m=O;const E=l.inline,b=l.list;let g;l.list=!0,O?(l.inline=!1,g=Tn(y)+`
|
|
35
35
|
|
|
36
|
-
`):(l.inline=!0,g=Tn(y));const v=a(g,l);return l.inline=E,l.list=b,v}),ordered:n,start:c}}}}const
|
|
37
|
-
`).map(function(c){return
|
|
36
|
+
`):(l.inline=!0,g=Tn(y));const v=a(g,l);return l.inline=E,l.list=b,v}),ordered:n,start:c}}}}const m0=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),y0=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Jo(e){return typeof e=="string"}function Tn(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function Ai(e,t){return e.startsWith(t)}function Le(e,t){return e.indexOf(t)!==-1}function g0(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(Ai(e,n[r]))return!0;return!1}return n(e,t)}function pn(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function b0(e){return r0.test(e)?"right":t0.test(e)?"center":n0.test(e)?"left":null}function Zo(e,t,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],o="";function a(){if(!o)return;const l=s[s.length-1];l.push.apply(l,t(o,n)),o=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,c,u)=>{l.trim()==="|"&&(a(),r)?c!==0&&c!==u.length-1&&s.push([]):o+=l}),a(),n.inTable=i,s}function S0(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(e0,"").split("|").map(b0):[],i=e[3]?(function(o,a,l){return o.trim().split(`
|
|
37
|
+
`).map(function(c){return Zo(c,a,l,!0)})})(e[3],t,n):[],s=Zo(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function Xo(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function ut(e){return e.inline=1,e}function st(e){return ut(function(t,n){return n.inline?e.exec(t):null})}function Zn(e){return ut(function(t,n){return n.inline||n.simple?e.exec(t):null})}function Xe(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Qo(e){return ut(function(t){return e.exec(t)})}const v0=/(javascript|vbscript|data(?!:image)):/i;function O0(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(v0.test(t))return null}catch{return null}return e}function Be(e){return e&&e.replace(o0,"$1")}function lr(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=i,s}function w0(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=i,s}function x0(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const E0=(e,t,n)=>({children:lr(t,e[2],n)});function Yr(){return{}}function A0(...e){return e.filter(Boolean).join(" ")}function Jr(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Zr(e,t,n,r){if(!t||!t.trim())return null;const i=t.match(Ib);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(f){return f.indexOf("-")!==-1&&f.match(qb)===null&&(f=f.replace(Gb,function(h,m){return m.toUpperCase()})),f})(o.slice(0,a)).trim(),c=ko[l]||l;if(c==="ref")return s;const u=s[c]=(function(f,h,m,d){return h==="style"?(function(p){const y=[];if(!p)return y;let S="",O=0,E="";for(let g=0;g<p.length;g++){const v=p[g];if(v==='"'||v==="'")E?v===E&&(E="",O--):(E=v,O++);else if(v==="("&&S.endsWith("url"))O++;else if(v===")"&&O>0)O--;else if(v===";"&&O===0){const x=S.indexOf(":");x>0&&y.push([S.slice(0,x).trim(),S.slice(x+1).trim()]),S="";continue}S+=v}const b=S.indexOf(":");return b>0&&y.push([S.slice(0,b).trim(),S.slice(b+1).trim()]),y})(m).reduce(function(p,[y,S]){return p[y.replace(/(-[a-z])/g,O=>O[1].toUpperCase())]=d(S,f,y),p},{}):_b.indexOf(h)!==-1?d(Be(m),f,h):(m.match(Vb)&&(m=Be(m.slice(1,m.length-1))),m==="true"||m!=="false"&&m)})(e,l,(function(f){const h=f[0];return(h==='"'||h==="'")&&f.length>=2&&f[f.length-1]===h?f.slice(1,-1):f})(o.slice(a+1).trim()),n);typeof u=="string"&&(bs.test(u)||Ei.test(u))&&(s[c]=r(u.trim()))}else o!=="style"&&(s[ko[o]||o]=!0);return s},{}):null}function ea(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function _0(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Ve({},Lo,t.namedCodesToUnicode):Lo;const n=t.slugify||pn,r=t.sanitizer||O0,i=t.createElement||N.createElement,s=[Bo,Wo,qo,t.enforceAtxHeadings?Ho:Vo,Ko,zo,Gl,zl],o=[...s,zb,bs,Go,Ei];function a(d,p,...y){const S=Jr(t.overrides,d+".props",{});return i((function(O,E){const b=Jr(E,O);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:Jr(E,O+".component",O):O})(d,t.overrides),Ve({},p,S,{className:A0(p?.className,S.className)||void 0}),...y)}function l(d){d=d.replace(kb,"");let p=!1;t.forceInline?p=!0:t.forceBlock||(p=Xb.test(d)===!1);const y=h(p?d:Tn(d).replace(l0,"")+`
|
|
38
38
|
|
|
39
|
-
`,{inline:p});if(t.ast)return y;const S=m(y);for(;
|
|
40
|
-
`);return p>0&&p<d.length-1&&(d[p+1]==="="||d[p+1]==="-")},o:Xe(
|
|
41
|
-
`],o:Xe(
|
|
39
|
+
`,{inline:p});if(t.ast)return y;const S=m(y);for(;Jo(S[S.length-1])&&!S[S.length-1].trim();)S.pop();if(c.length&&S.push(a("footer",{key:"footer"},c.map(function(b){return a("div",{id:n(b.identifier,pn),key:b.identifier},b.identifier,m(h(b.footnote,{inline:!0})))}))),t.wrapper===null)return S;const O=t.wrapper||(p?"span":"div");let E;if(S.length>1||t.forceWrapper)E=S;else{if(S.length===1)return E=S[0],typeof E=="string"?a("span",{key:"outer"},E):E;E=null}return i(O,Ve({key:"outer"},t.wrapperProps),E)}const c=[],u={},f={0:{t:[">"],o:Xe(Bo),u:1,i(d,p,y){const[,S,O]=d[0].replace(Cb,"").match(Pb);return{alert:S,children:p(O,y)}}},1:{t:[" "],o:st(Fb),u:1,i:Yr},2:{t:function(d,p){if(p.inline||p.simple)return!1;var y=d[0];return y==="-"||y==="*"||y==="_"},o:Xe(jb),u:1,i:Yr},3:{t:[" "],o:Xe(qo),u:0,i:d=>({lang:void 0,text:Be(Tn(d[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:Xe(Wo),u:0,i:d=>({attrs:Zr("code",d[3]||"",r,l),lang:d[2]||void 0,text:d[4],type:"3"})},5:{t:["`"],o:Zn($b),u:3,i:d=>({text:Be(d[2])})},6:{t:["[^"],o:Xe(Rb),u:0,i:d=>(c.push({footnote:d[2],identifier:d[1]}),{})},7:{t:["[^"],o:st(Mb),u:1,i:d=>({target:"#"+n(d[1],pn),text:d[1]})},8:{t:["[ ]","[x]"],o:st(Lb),u:1,i:d=>({completed:d[1].toLowerCase()==="x"})},9:{t:["#"],o:Xe(t.enforceAtxHeadings?Ho:Vo),u:1,i:(d,p,y)=>({children:lr(p,d[2],y),id:n(d[2],pn),level:d[1].length})},10:{t:d=>{const p=d.indexOf(`
|
|
40
|
+
`);return p>0&&p<d.length-1&&(d[p+1]==="="||d[p+1]==="-")},o:Xe(Ko),u:1,i:(d,p,y)=>({children:lr(p,d[1],y),level:d[2]==="="?1:2,type:"9"})},11:{t:["<"],o:ut(Bb),u:1,i(d,p,y){const[,S]=d[3].match(c0),O=RegExp("^"+S,"gm"),E=d[3].replace(O,""),b=ea(o,E)?x0:lr,g=d[1].toLowerCase(),v=Ab.indexOf(g)!==-1,x=(v?g:d[1]).trim(),A={attrs:Zr(x,d[2],r,l),noInnerParse:v,tag:x};if(y.inAnchor=y.inAnchor||g==="a",v)A.text=d[3];else{const _=y.inHTML;y.inHTML=!0,A.children=b(p,E,y),y.inHTML=_}return y.inAnchor=!1,A}},13:{t:["<"],o:Qo(Ei),u:1,i(d){const p=d[1].trim();return{attrs:Zr(p,d[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:Qo(Go),u:1,i:()=>({})},14:{t:["!["],o:Zn(y0),u:1,i:d=>({alt:Be(d[1]),target:Be(d[2]),title:Be(d[3])})},15:{t:["["],o:st(m0),u:3,i:(d,p,y)=>({children:w0(p,d[1],y),target:Be(d[2]),title:Be(d[3])})},16:{t:function(d,p){return!(!p.inline||p.inAnchor)&&d[0]==="<"&&(Le(d,":")||Le(d,"@")||Le(d,"/"))},o:st(Kb),u:0,i(d){let p=d[1],y=!1;return Le(p,"@")&&!Le(p,"//")&&(y=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:y?"mailto:"+p:p,type:"15"}}},17:{t:(d,p)=>!p.inAnchor&&!t.disableAutoLink&&Ai(d,"http"),o:st(Hb),u:0,i:d=>({children:[{text:d[1],type:"27"}],target:d[1],title:void 0,type:"15"})},20:Yo(0,1),30:Yo(0,2),19:{t:[`
|
|
41
|
+
`],o:Xe(Db),u:3,i:Yr},21:{t:function(d,p){return!p.inline&&!p.simple},o:ut(function(d,p){if(p.inline||p.simple||p.inHTML&&!Le(d,`
|
|
42
42
|
|
|
43
43
|
`)&&!Le(p.prevCapture,`
|
|
44
44
|
|
|
45
45
|
`))return null;let y="",S=0;for(;;){const E=d.indexOf(`
|
|
46
|
-
`,S),b=d.slice(S,E===-1?void 0:E+1),g=d[S];if((g===">"||g==="#"||g==="|"||g==="`"||g==="~"||g==="*"||g==="-"||g==="_"||g===" ")&&
|
|
47
|
-
`).replace(
|
|
48
|
-
`;case"21":return $("p",{key:j.key},D(C.children,j));default:return null}})(_,I,P,p,y,S,O);return d?d(T,_,I,P):T()})(g,b,v);return v.renderDepth=x-1,A}catch(A){if(A instanceof RangeError&&A.message.includes("Maximum call stack"))return E(g);throw A}}})(t.renderRule,a,r,n,u);return l(e)}const Gn=e=>{let{children:t,options:n}=e,r=(function(i,s){if(i==null)return{};var o={};for(var a in i)if({}.hasOwnProperty.call(i,a)){if(s.indexOf(a)!==-1)continue;o[a]=i[a]}return o})(e,wb);return E0(t??"",Ve({},n,{wrapperProps:Ve({},n?.wrapperProps,r)}))},Gl=Symbol("remove-this-key"),Qo=Symbol("reset");function A0(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function _0(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return e(te.NewStringDefault)}}function I0(e){const{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:c,disabled:u,readonly:f,required:h,hideError:m,propertyName:d,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:S}=e,[O,E]=N.useState(!1),{globalFormOptions:b,fields:g}=r,{SchemaField:v}=g,x=Rt(Ne(d,b,t.path)),A=N.useCallback((T,C,D,j)=>{T===void 0&&S&&(T=""),a(T,C,D,j)},[a,S]),_=N.useCallback(T=>{d!==T&&E(!0),p(d,T)},[d,p]),I=N.useCallback(T=>{const{target:{value:C}}=T;_(C)},[_]),P=N.useCallback(()=>{y(d)},[d,y]);return w.jsx(v,{name:d,required:h,schema:n,uiSchema:i,errorSchema:s,fieldPathId:x,formData:o,wasPropertyKeyModified:O,onKeyRename:_,onKeyRenameBlur:I,onRemoveProperty:P,onChange:A,onBlur:l,onFocus:c,registry:r,disabled:u,readonly:f,hideError:m})}function T0(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:c,hideError:u,onBlur:f,onFocus:h,onChange:m,registry:d,title:p}=e,{fields:y,schemaUtils:S,translateString:O,globalUiOptions:E}=d,{OptionalDataControlsField:b}=y,g=N.useRef(r);g.current=r;const v=S.retrieveSchema(t,r,!0),x=M(n,E),{properties:A={}}=v,_=e.childFieldPathId??s,I=N.useRef({previousKey:"",currentKey:void 0}),P=x.title??v.title??p??o,T=x.description??v.description,C=Kn(d,v,a,n),D=ln(r);let j=[];const $=N.useCallback((R,ie)=>{const{duplicateKeySuffixSeparator:J="-"}=M(n,E);let V=0,H=R;for(;z(ie,H);)H=`${R}${J}${++V}`;return H},[n,E]),k=N.useCallback(()=>{if(!(v.additionalProperties||v.patternProperties))return;const{translateString:R}=d,ie={...r},J=$("newKey",ie);if(v.patternProperties)se(ie,J,null);else{let V,H,U;if(Z(v.additionalProperties)){V=v.additionalProperties.type,H=v.additionalProperties.const,U=v.additionalProperties.default;let ne=v.additionalProperties;if(ae in ne){const{schemaUtils:we}=d;ne=we.retrieveSchema({[ae]:ne[ae]},r),V=ne.type,H=ne.const,U=ne.default}!V&&(Y in ne||B in ne)&&(V="object")}const X=H??U??_0(R,V);se(ie,J,X)}I.current.previousKey===J&&(I.current.currentKey=J,I.current.previousKey=$(J,ie)),m(ie,_.path)},[r,m,d,_,$,v]),K=N.useCallback((R,ie)=>{if(R!==ie){const J=g.current,V=$(ie,J),H={...J},U={[R]:V},X=Object.keys(H).map(we=>({[U[we]||we]:H[we]})),ne=Object.assign({},...X);g.current=ne,R!==I.current.currentKey&&(I.current.previousKey=R),I.current.currentKey=V,m(ne,_.path)}},[m,_,$]),L=N.useCallback(R=>{m(Gl,[..._.path,R])},[m,_]),ee=N.useCallback(R=>I.current.currentKey===R?I.current.previousKey:R,[]);if(!C||D)try{const R=Object.keys(A);j=Og(R,x.order)}catch(R){return w.jsxs("div",{children:[w.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:w.jsx(Gn,{options:{disableParsingRawHTML:!0},children:O(te.InvalidObjectField,[o||"root",R.message])})}),w.jsx("pre",{children:JSON.stringify(v)})]})}const re=q("ObjectFieldTemplate",d,x),ce=C?w.jsx(b,{...e,fieldPathId:_,schema:v}):void 0,me={title:x.label===!1?"":P,description:x.label===!1?void 0:T,properties:j.map(R=>{const ie=z(v,[Q,R,ft]),J=ie?n.additionalProperties:n[R],V=M(J).widget==="hidden";return{content:w.jsx(I0,{propertyName:R,required:A0(v,R),schema:F(v,[Q,R],{}),uiSchema:J,errorSchema:F(i,[R]),fieldPathId:_,formData:F(r,[R]),handleKeyRename:K,handleRemoveProperty:L,addedByAdditionalProperties:ie,onChange:m,onBlur:f,onFocus:h,registry:d,disabled:l,readonly:c,hideError:u},ee(R)),name:R,readonly:c,disabled:l,required:a,hidden:V}}),readonly:c,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:v,formData:r,registry:d,optionalDataControl:ce,className:C?"rjsf-optional-object-field":void 0};return w.jsx(re,{...me,onAddProperty:k})}function C0(e){const{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:c}=e,{globalUiOptions:u={},schemaUtils:f,translateString:h}=c,m=M(n,u),d=q("OptionalDataControlsTemplate",c,m),p=ln(r);let y,S,O,E;if(i||s)y=Hr(l,"Msg"),S=p?void 0:h(te.OptionalObjectEmptyMsg);else{const b=p?te.OptionalObjectRemove:te.OptionalObjectAdd;S=h(b),p?(y=Hr(l,"Remove"),E=()=>o(void 0,l.path,a)):(y=Hr(l,"Add"),O=()=>{let g=f.getDefaultFormState(t,r,"excludeObjectChildren");g===void 0&&(g=ke(t)==="array"?[]:{}),o(g,l.path,a)})}return S&&w.jsx(d,{id:y,registry:c,schema:t,uiSchema:n,label:S,onAddClick:O,onRemoveClick:E})}const P0={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function F0(e,t,n){const r=t.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=ke(e),o=Array.isArray(s)?s[0]:s||"",a=e.$id;let l=P0[o];return a&&a in i&&(l=a),!l&&(e.anyOf||e.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function j0(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:f=!1,registry:h,wasPropertyKeyModified:m=!1}=e,{schemaUtils:d,globalFormOptions:p,globalUiOptions:y,fields:S}=h,{AnyOfField:O,OneOfField:E}=S,b=wg(t,r,h),g=M(b,y),v=q("FieldTemplate",h,g),x=q("DescriptionFieldTemplate",h,g),A=q("FieldHelpTemplate",h,g),_=q("FieldErrorTemplate",h,g),I=d.retrieveSchema(t,i),P=n[le],T=N.useCallback((cn,un,Ot,Ql)=>a(cn,un,Ot,Ql||P),[P,a]),C=F0(I,g,h),D=!!(g.disabled??e.disabled),j=!!(g.readonly??(e.readonly||e.schema.readOnly||I.readOnly)),$=g.hideError,k=$===void 0?e.hideError:!!$,K=!!(g.autofocus??e.autofocus);if(Object.keys(I).length===0)return null;let L=d.getDisplayLabel(I,b,y);const ee=g.field&&g.fieldReplacesAnyOrOneOf===!0;let re,ce,me={fieldPathId:n};if((Y in I||B in I)&&!ee&&!d.isSelect(I)){I[Y]?(re=O,ce=I[Y].map(Ot=>d.retrieveSchema(Z(Ot)?Ot:{},i))):I[B]&&(re=E,ce=I[B].map(Ot=>d.retrieveSchema(Z(Ot)?Ot:{},i)));const cn=Kn(h,I,f,b),un=ln(i);L=L&&(!cn||un),me={childFieldPathId:n,fieldPathId:Ne("XxxOf",p,n)}}const{__errors:R,...ie}=s||{},J=Qt(b,["ui:classNames","classNames","ui:style"]);dt in J&&(J[dt]=Qt(J[dt],["classNames","style"]));const V=w.jsx(C,{...e,onChange:T,...me,schema:I,uiSchema:J,disabled:D,readonly:j,hideError:k,autofocus:K,errorSchema:ie,rawErrors:R}),H=n[le];let U;m?U=o:U=ft in I?o:g.title||e.schema.title||I.title||e.title||o;const X=g.description||e.schema.description||I.description||"",ne=g.help,we=g.widget==="hidden",xe=["rjsf-field",`rjsf-field-${ke(I)}`];!k&&R&&R.length>0&&xe.push("rjsf-field-error"),g.classNames&&xe.push(g.classNames);const be=w.jsx(A,{help:ne,fieldPathId:n,schema:I,uiSchema:b,hasErrors:!k&&R&&R.length>0,registry:h}),Ce=k||re&&!d.isSelect(I)?void 0:w.jsx(_,{errors:R,errorSchema:s,fieldPathId:n,schema:I,uiSchema:b,registry:h}),it={description:w.jsx(x,{id:Hn(H),description:X,schema:I,uiSchema:b,registry:h}),rawDescription:X,help:be,rawHelp:typeof ne=="string"?ne:void 0,errors:Ce,rawErrors:k?void 0:R,fieldPathId:n,id:H,label:U,hidden:we,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:f,disabled:D,readonly:j,hideError:k,displayLabel:L,classNames:xe.join(" ").trim(),style:g.style,formData:i,schema:I,uiSchema:b,registry:h};return w.jsx(v,{...it,children:w.jsxs(w.Fragment,{children:[V,re&&w.jsx(re,{name:o,disabled:D,readonly:j,hideError:k,errorSchema:s,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:ce,registry:h,required:f,schema:I,uiSchema:b})]})})}class $0 extends N.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return Fl(this,t,this.state,r)}render(){return w.jsx(j0,{...this.props})}}function D0(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:c=!1,onChange:u,onBlur:f,onFocus:h,registry:m,rawErrors:d,hideError:p,title:y}=e,{title:S,format:O}=t,{widgets:E,schemaUtils:b,globalUiOptions:g}=m,v=b.isSelect(t)?tn(t,r):void 0;let x=v?"select":"text";O&&gg(t,O,E)&&(x=O);const{widget:A=x,placeholder:_="",title:I,...P}=M(r),T=b.getDisplayLabel(t,r,g),C=I??y??S??n,D=Je(t,A,E),j=N.useCallback(($,k,K)=>u($,i.path,k,K),[u,i]);return w.jsx(D,{options:{...P,enumOptions:v},schema:t,uiSchema:r,id:i.$id,name:n,label:C,hideLabel:!T,hideError:p,value:s,onChange:j,onBlur:f,onFocus:h,required:o,disabled:a,readonly:l,autofocus:c,registry:m,placeholder:_,rawErrors:d,htmlName:i.name})}function N0(e){const{formData:t,onChange:n,fieldPathId:r}=e;return N.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function R0(){return{AnyOfField:No,ArrayField:Vg,BooleanField:Hg,FallbackField:Yg,LayoutGridField:gs,LayoutHeaderField:mb,LayoutMultiSchemaField:yb,NumberField:Sb,ObjectField:T0,OneOfField:No,OptionalDataControlsField:C0,SchemaField:$0,StringField:D0,NullField:N0}}function M0(e){const{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:s}=e,o=M(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=q("DescriptionFieldTemplate",r,o);return w.jsx(l,{id:Hn(t),description:n,schema:i,uiSchema:s,registry:r})}function U0(e){const{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=e,c=M(l),u=q("ArrayFieldItemButtonsTemplate",a,c),f={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,m={display:"flex",alignItems:i?"center":"baseline"},d={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return w.jsxs("div",{className:n,style:m,children:[w.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),o&&w.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:w.jsx("div",{className:"btn-group",style:d,children:w.jsx(u,{...r,style:f})})})]})}function k0(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:c,onMoveUpItem:u,readonly:f,registry:h,uiSchema:m}=e,{CopyButton:d,MoveDownButton:p,MoveUpButton:y,RemoveButton:S}=h.templates.ButtonTemplates;return w.jsxs(w.Fragment,{children:[(i||r)&&w.jsx(y,{id:At(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||f||!i,onClick:u,uiSchema:m,registry:h}),(i||r)&&w.jsx(p,{id:At(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||f||!r,onClick:c,uiSchema:m,registry:h}),n&&w.jsx(d,{id:At(o,"copy"),className:"rjsf-array-item-copy",disabled:t||f,onClick:a,uiSchema:m,registry:h}),s&&w.jsx(S,{id:At(o,"remove"),className:"rjsf-array-item-remove",disabled:t||f,onClick:l,uiSchema:m,registry:h})]})}function L0(e){const{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:c,registry:u,required:f,schema:h,title:m}=e,d=M(s),p=q("ArrayFieldDescriptionTemplate",u,d),y=q("ArrayFieldTitleTemplate",u,d),S=!c&&!r,{ButtonTemplates:{AddButton:O}}=u.templates;return w.jsxs("fieldset",{className:n,id:i.$id,children:[w.jsx(y,{fieldPathId:i,title:d.title||m,required:f,schema:h,uiSchema:s,registry:u,optionalDataControl:S?a:void 0}),w.jsx(p,{fieldPathId:i,description:d.description||h.description,schema:h,uiSchema:s,registry:u}),S?void 0:a,w.jsx("div",{className:"row array-item-list",children:o}),t&&w.jsx(O,{id:At(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||c,uiSchema:s,registry:u})]})}function B0(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=e,l=M(i,o.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const u=q("TitleFieldTemplate",o,l);return w.jsx(u,{id:hs(t),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function W0(e){const{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?w.jsx("datalist",{id:ds(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>w.jsx("option",{value:s},String(s)))},`datalist_${t}`):null}function q0(e){const{id:t,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:c,onChange:u,onChangeOverride:f,options:h,schema:m,uiSchema:d,registry:p,rawErrors:y,type:S,hideLabel:O,hideError:E,...b}=e,{ClearButton:g}=p.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const v={...b,...ug(m,S,h)};let x;v.type==="number"||v.type==="integer"?x=i||i===0?i:"":x=i??"";const A=N.useCallback(({target:{value:T}})=>u(T===""?h.emptyValue:T),[u,h]),_=N.useCallback(({target:T})=>l(t,T&&T.value),[l,t]),I=N.useCallback(({target:T})=>c(t,T&&T.value),[c,t]),P=N.useCallback(T=>{T.preventDefault(),T.stopPropagation(),u(h.emptyValue??"")},[u,h.emptyValue]);return w.jsxs(w.Fragment,{children:[w.jsx("input",{id:t,name:r||t,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:x,...v,list:m.examples?ds(t):void 0,onChange:f||A,onBlur:_,onFocus:I,"aria-describedby":Nt(t,!!m.examples)}),h.allowClearTextInputs&&!s&&!o&&x&&w.jsx(g,{registry:p,onClick:P}),w.jsx(W0,{id:t,schema:m})]})}function V0({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=fg(e);return n?null:w.jsx("div",{children:w.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function vt(e){const{iconType:t="default",icon:n,className:r,uiSchema:i,registry:s,...o}=e;return w.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...o,children:w.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function H0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.CopyButton),...e,icon:"copy"})}function K0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.MoveDownButton),...e,icon:"arrow-down"})}function G0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.MoveUpButton),...e,icon:"arrow-up"})}function z0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Y0({id:e,className:t,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return w.jsx(vt,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(te.ClearButton),onClick:n,disabled:r,registry:i,...s})}function J0({id:e,className:t,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return w.jsx("div",{className:"row",children:w.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:w.jsx(vt,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(te.AddButton),onClick:n,disabled:r,registry:i})})})}function Z0(){return{SubmitButton:V0,AddButton:J0,CopyButton:H0,MoveDownButton:K0,MoveUpButton:G0,RemoveButton:z0,ClearButton:Y0}}const zl=fs();function Yl({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return M(n,r).enableMarkdownInDescription&&typeof e=="string"?w.jsx(Gn,{options:{disableParsingRawHTML:!0},"data-testid":zl.markdown,children:e}):e}Yl.TEST_IDS=zl;function X0(e){const{id:t,description:n,registry:r,uiSchema:i}=e;return n?w.jsx("div",{id:t,className:"field-description",children:w.jsx(Yl,{description:n,registry:r,uiSchema:i})}):null}function Q0({errors:e,registry:t}){const{translateString:n}=t;return w.jsxs("div",{className:"panel panel-danger errors",children:[w.jsx("div",{className:"panel-heading",children:w.jsx("h3",{className:"panel-title",children:n(te.ErrorsLabel)})}),w.jsx("ul",{className:"list-group",children:e.map((r,i)=>w.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function eS(e){const{schema:t,registry:n,typeSelector:r,schemaField:i}=e,s=q("MultiSchemaFieldTemplate",n);return w.jsx(s,{selector:r,optionSchemaField:i,schema:t,registry:n})}const tS="*";function Jl(e){const{label:t,required:n,id:r}=e;return t?w.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&w.jsx("span",{className:"required",children:tS})]}):null}function nS(e){const{id:t,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:c,registry:u,uiSchema:f}=e,h=M(f),m=q("WrapIfAdditionalTemplate",u,h);if(a)return w.jsx("div",{className:"hidden",children:r});const d=h.widget==="checkbox";return w.jsxs(m,{...e,children:[c&&!d&&w.jsx(Jl,{label:n,required:l,id:t}),c&&o?o:null,r,i,s]})}function rS(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=Tl(n);return w.jsx("div",{children:w.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,s)=>w.jsx("li",{className:"text-danger",children:i},s))})})}const Zl=fs();function Xl({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return M(n,r).enableMarkdownInHelp&&typeof e=="string"?w.jsx(Gn,{options:{disableParsingRawHTML:!0},"data-testid":Zl.markdown,children:e}):e}Xl.TEST_IDS=Zl;function iS(e){const{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?w.jsx("div",{id:Cl(t),className:"help-block",children:w.jsx(Xl,{help:n,registry:i,uiSchema:r})}):null}function sS(e){const{children:t,column:n,className:r,...i}=e;return w.jsx("div",{className:r,...i,children:t})}function oS(e){const{selector:t,optionSchemaField:n}=e;return w.jsxs("div",{className:"panel panel-default panel-body",children:[w.jsx("div",{className:"form-group",children:t}),n]})}function aS(e){const{className:t,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:c,registry:u,required:f,schema:h,title:m,uiSchema:d}=e,p=M(d),y=q("TitleFieldTemplate",u,p),S=q("DescriptionFieldTemplate",u,p);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const E=!c&&!r,{ButtonTemplates:{AddButton:b}}=u.templates;return w.jsxs("fieldset",{className:t,id:s.$id,children:[m&&w.jsx(y,{id:hs(s),title:m,required:f,schema:h,uiSchema:d,registry:u,optionalDataControl:E?a:void 0}),n&&w.jsx(S,{id:Hn(s),description:n,schema:h,uiSchema:d,registry:u}),E?void 0:a,l.map(g=>g.content),Pu(h,d,i)&&w.jsx(b,{id:At(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||c,uiSchema:d,registry:u})]})}function lS(e){const{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:s}=e;return i?w.jsx(vt,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?w.jsx(vt,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):w.jsx("em",{id:t,children:r})}const cS="*";function uS(e){const{id:t,title:n,required:r,optionalDataControl:i}=e;return w.jsxs("legend",{id:t,children:[n,r&&w.jsx("span",{className:"required",children:cS}),i&&w.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function fS(e){const{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:s}=i;let o=te.UnsupportedField;const a=[];return n&&n.$id&&(o=te.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===te.UnsupportedField?te.UnsupportedFieldWithReason:te.UnsupportedFieldWithIdAndReason,a.push(r)),w.jsxs("div",{className:"unsupported-field",children:[w.jsx("p",{children:w.jsx(Gn,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),t&&w.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function dS(e){const{id:t,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:c,readonly:u,required:f,schema:h,hideError:m,rawErrors:d,children:p,uiSchema:y,registry:S}=e,{templates:O,translateString:E}=S,{RemoveButton:b}=O.ButtonTemplates,g=E(te.KeyLabel,[o]),v=ft in h,x=!!c,A=["form-group",n];!m&&d&&d.length>0&&A.push("has-error has-danger");const _=A.join(" ").trim();if(!v)return w.jsx("div",{className:_,style:r,children:p});const I=x?46:26;return w.jsx("div",{className:_,style:r,children:w.jsxs("div",{className:"row",children:[w.jsx("div",{className:"col-xs-5 form-additional",children:w.jsxs("div",{className:"form-group",children:[s&&w.jsx(Jl,{label:g,required:f,id:`${t}-key`}),s&&c&&w.jsx("div",{children:" "}),w.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:a,defaultValue:o},o)]})}),w.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),w.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${I}px`:void 0},children:w.jsx(b,{id:At(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l,uiSchema:y,registry:S})})]})})}function hS(){return{ArrayFieldDescriptionTemplate:M0,ArrayFieldItemTemplate:U0,ArrayFieldItemButtonsTemplate:k0,ArrayFieldTemplate:L0,ArrayFieldTitleTemplate:B0,ButtonTemplates:Z0(),BaseInputTemplate:q0,DescriptionFieldTemplate:X0,ErrorListTemplate:Q0,FallbackFieldTemplate:eS,FieldTemplate:nS,FieldErrorTemplate:rS,FieldHelpTemplate:iS,GridTemplate:sS,MultiSchemaFieldTemplate:oS,ObjectFieldTemplate:aS,OptionalDataControlsTemplate:lS,TitleFieldTemplate:uS,UnsupportedFieldTemplate:fS,WrapIfAdditionalTemplate:dS}}function pS(e){const{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:c}=e,{translateString:u}=a,{elements:f,handleChange:h,handleClear:m,handleSetNow:d}=_g(e);return w.jsxs("ul",{className:"list-inline",children:[f.map((p,y)=>w.jsx("li",{className:"list-inline-item",children:w.jsx(Ag,{rootId:s,name:o,select:h,...p,disabled:t,readonly:n,registry:a,onBlur:l,onFocus:c,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&w.jsx("li",{className:"list-inline-item",children:w.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:d,children:u(te.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&w.jsx("li",{className:"list-inline-item",children:w.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:m,children:u(te.ClearLabel)})})]})}function mS({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return w.jsx(n,{time:e,...t})}function yS({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:c=!1,onBlur:u,onFocus:f,onChange:h,registry:m,htmlName:d}){const p=q("DescriptionFieldTemplate",m,n),y=ar(e),S=N.useCallback(x=>h(x.target.checked),[h]),O=N.useCallback(x=>u(r,x.target.checked),[u,r]),E=N.useCallback(x=>f(r,x.target.checked),[f,r]),v=M(t).widget==="checkbox"?void 0:n.description??e.description;return w.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&v&&w.jsx(p,{id:Hn(r),description:v,schema:e,uiSchema:t,registry:m}),w.jsxs("label",{children:[w.jsx("input",{type:"checkbox",id:r,name:d||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:c,onChange:S,onBlur:O,onFocus:E,"aria-describedby":Nt(r)}),Sg(w.jsx("span",{children:a}),l)]})]})}function gS({id:e,disabled:t,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:c}){const{inline:u=!1,enumOptions:f,enumDisabled:h,emptyValue:m}=n,d=us(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:O})=>a(e,_t(O&&O.value,f,d,m)),[a,e,f,m,d]),S=N.useCallback(({target:O})=>l(e,_t(O&&O.value,f,d,m)),[l,e,f,m,d]);return w.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(f)&&f.map((O,E)=>{const b=as(O.value,p),g=Array.isArray(h)&&h.indexOf(O.value)!==-1,v=t||g||s?"disabled":"",x=_=>{_.target.checked?o(eg(E,p,f)):o(Qy(E,p,f))},A=w.jsxs("span",{children:[w.jsx("input",{type:"checkbox",id:Pl(e,E),name:c||e,checked:b,value:ls(O.value,E,d),disabled:t||g||s,autoFocus:i&&E===0,onChange:x,onBlur:y,onFocus:S,"aria-describedby":Nt(e)}),w.jsx("span",{children:O.label})]});return u?w.jsx("label",{className:`checkbox-inline ${v}`,children:A},E):w.jsx("div",{className:`checkbox ${v}`,children:w.jsx("label",{children:A})},E)})})}function bS(e){const{disabled:t,readonly:n,options:r,registry:i}=e,s=q("BaseInputTemplate",i,r);return w.jsx(s,{type:"color",...e,disabled:t||n})}function SS(e){const{onChange:t,options:n,registry:r}=e,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>t(o||void 0),[t]);return w.jsx(i,{type:"date",...e,onChange:s})}function vS(e){const{onChange:t,value:n,options:r,registry:i}=e,s=q("BaseInputTemplate",i,r);return w.jsx(s,{type:"datetime-local",...e,value:Fg(n),onChange:o=>t(vg(o))})}function OS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"email",...e})}function wS({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:i,name:s}=e;return r?["image/jpeg","image/png"].includes(i)?w.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):w.jsxs(w.Fragment,{children:[" ",w.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(te.PreviewLabel)})]}):null}function xS({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;const{translateString:s}=t,{RemoveButton:o}=q("ButtonTemplates",t,i);return w.jsx("ul",{className:"file-info",children:e.map((a,l)=>{const{name:c,size:u,type:f}=a,h=()=>r(l);return w.jsxs("li",{children:[w.jsx(Gn,{children:s(te.FilesInfo,[c,f,String(u)])}),n&&w.jsx(wS,{fileInfo:a,registry:t}),w.jsx(o,{onClick:h,registry:t})]},l)})})}function ES(e){const{disabled:t,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=e,{filesInfo:c,handleChange:u,handleRemove:f}=Pg(o,s,i),h=q("BaseInputTemplate",l,a),m=d=>{d.target.files&&u(d.target.files)};return w.jsxs("div",{children:[w.jsx(h,{...e,disabled:t||n,type:"file",required:o?!1:r,onChangeOverride:m,value:"",accept:a.accept?String(a.accept):void 0}),w.jsx(xS,{filesInfo:c,onRemove:f,registry:l,preview:a.filePreview,options:a})]})}function AS({id:e,value:t,htmlName:n}){return w.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function _S(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"password",...e})}function IS({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:c,htmlName:u}){const{enumOptions:f,enumDisabled:h,inline:m,emptyValue:d}=e,p=us(e),y=N.useCallback(({target:O})=>o(c,_t(O&&O.value,f,p,d)),[o,f,d,c,p]),S=N.useCallback(({target:O})=>a(c,_t(O&&O.value,f,p,d)),[a,f,d,c,p]);return w.jsx("div",{className:"field-radio-group",id:c,role:"radiogroup",children:Array.isArray(f)&&f.map((O,E)=>{const b=as(O.value,t),g=Array.isArray(h)&&h.indexOf(O.value)!==-1,v=r||g||i?"disabled":"",x=()=>l(O.value),A=w.jsxs("span",{children:[w.jsx("input",{type:"radio",id:Pl(c,E),checked:b,name:u||c,required:n,value:ls(O.value,E,p),disabled:r||g||i,autoFocus:s&&E===0,onChange:x,onBlur:y,onFocus:S,"aria-describedby":Nt(c)}),w.jsx("span",{children:O.label})]});return m?w.jsx("label",{className:`radio-inline ${v}`,children:A},E):w.jsx("div",{className:`radio ${v}`,children:w.jsx("label",{children:A})},E)})})}function TS(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return w.jsxs("div",{className:"field-range-wrapper",children:[w.jsx(n,{type:"range",...e}),w.jsx("span",{className:"range-view",children:t})]})}function CS({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:c,options:u,htmlName:f}){const{stars:h=5,shape:m="star"}=u,d=c.maximum?Math.min(c.maximum,5):Math.min(Math.max(h,1),5),p=c.minimum||0,y=N.useCallback(b=>{!r&&!i&&o(b)},[o,r,i]),S=N.useCallback(b=>{if(a){const g=Number(b.target.dataset.value);a(e,g)}},[a,e]),O=N.useCallback(b=>{if(l){const g=Number(b.target.dataset.value);l(e,g)}},[l,e]),E=b=>m==="heart"?b?"♥":"♡":b?"★":"☆";return w.jsx(w.Fragment,{children:w.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(d)].map((b,g)=>{const v=p+g,x=v<=t;return w.jsx("span",{onClick:()=>y(v),onFocus:S,onBlur:O,"data-value":v,tabIndex:r||i?-1:0,role:"radio","aria-checked":v===t,"aria-label":`${v} ${m==="heart"?"heart":"star"}${v===1?"":"s"}`,style:{color:x?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(x)},g)}),w.jsx("input",{type:"hidden",id:e,name:f||e,value:t||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function Xr(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function PS({schema:e,id:t,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:c,onBlur:u,onFocus:f,placeholder:h,htmlName:m}){const{enumOptions:d,enumDisabled:p,emptyValue:y}=n,S=a?[]:"",O=us(n),E=N.useCallback(A=>{const _=Xr(A,a);return f(t,_t(_,d,O,y))},[f,t,a,d,y,O]),b=N.useCallback(A=>{const _=Xr(A,a);return u(t,_t(_,d,O,y))},[u,t,a,d,y,O]),g=N.useCallback(A=>{const _=Xr(A,a);return c(_t(_,d,O,y))},[c,a,d,y,O]),v=Xy(r,d,a,O,S),x=!a&&e.default===void 0;return w.jsxs("select",{id:t,name:m||t,multiple:a,role:"combobox",className:"form-control",value:v,required:i,disabled:s||o,autoFocus:l,onBlur:b,onFocus:E,onChange:g,"aria-describedby":Nt(t),children:[x&&w.jsx("option",{value:"",children:h}),Array.isArray(d)&&d.map(({value:A,label:_},I)=>{const P=p&&p.indexOf(A)!==-1;return w.jsx("option",{value:ls(A,I,O),disabled:P,children:_},I)})]})}function FS({id:e,options:t={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:c,onFocus:u,htmlName:f}){const h=N.useCallback(({target:{value:p}})=>l(p===""?t.emptyValue:p),[l,t.emptyValue]),m=N.useCallback(({target:p})=>c(e,p&&p.value),[c,e]),d=N.useCallback(({target:p})=>u(e,p&&p.value),[e,u]);return w.jsx("textarea",{id:e,name:f||e,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:t.rows,onBlur:m,onFocus:d,onChange:h,"aria-describedby":Nt(e)})}function jS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{...e})}function $S(e){const{onChange:t,options:n,registry:r}=e,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>t(o?`${o}:00`:void 0),[t]);return w.jsx(i,{type:"time",...e,onChange:s})}function DS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"url",...e})}function NS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"number",...e})}function RS(){return{AltDateWidget:pS,AltDateTimeWidget:mS,CheckboxWidget:yS,CheckboxesWidget:gS,ColorWidget:bS,DateWidget:SS,DateTimeWidget:vS,EmailWidget:OS,FileWidget:ES,HiddenWidget:AS,PasswordWidget:_S,RadioWidget:IS,RangeWidget:TS,RatingWidget:CS,SelectWidget:PS,TextWidget:jS,TextareaWidget:FS,TimeWidget:$S,UpDownWidget:NS,URLWidget:DS}}function MS(){return{fields:R0(),templates:hS(),widgets:RS(),rootSchema:{},formContext:{},translateString:Jy,globalFormOptions:{idPrefix:ua,idSeparator:fa,useFallbackUiForUnsupportedType:!1}}}function Ut(e,t){return{...Ol(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class rv extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(t,n){if(t.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return t.extraErrors&&({errors:i,errorSchema:s}=vn(r,t.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=vn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:t.extraErrors,errors:i,errorSchema:s}}return null}constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=t,s=n??r;this.state={...this.getStateFromProps(t,s,void 0,void 0,void 0,!0),_prevExtraErrors:t.extraErrors},i&&!fe(this.state.formData,s)&&i(Ut(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(t,n){if(!fe(this.props,t)){const r=Ao(this.props.formData,t.formData),i=Ao(this.props.formData,this.state.formData),s=!fe(t.schema,this.props.schema),o=r.length>0||!fe(t.formData,this.props.formData),a=i.length>0||!fe(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||o?void 0:this.state.retrievedSchema,s,r,!a),c=!fe(l,n);return{nextState:l,shouldUpdate:c}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!fe(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!fe(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Ut(i)),this.setState(i)}}getStateFromProps(t,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in t?t.schema:this.props.schema,c="validator"in t?t.validator:this.props.validator,u=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},f=t.formData===void 0&&this.props.formData===void 0,h=typeof n<"u",m="liveValidate"in t?t.liveValidate:this.props.liveValidate,d=h&&!t.noValidate&&m,p="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let S=a.schemaUtils;(!S||S.doesSchemaUtilsDiffer(c,l,p,y))&&(S=Gy(c,l,p,y));const O=S.getRootSchema();let E=n;n===Qo?E=void 0:n===void 0&&f&&(E=a.formData);const b=S.getDefaultFormState(O,E,!1,a.initialDefaultsGenerated),g=this.updateRetrievedSchema(r??S.retrieveSchema(O,b)),v=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let x,A,_=a.schemaValidationErrors,I=a.schemaValidationErrorSchema;if(d&&!o){const j=this.liveValidate(O,S,a.errorSchema,b,void 0,a.customErrors,r,r!==void 0);x=j.errors,A=j.errorSchema,_=j.schemaValidationErrors,I=j.schemaValidationErrorSchema}else{const j=v();if(x=j.errors,A=j.errorSchema,s.length>0&&!d){const k=s.reduce((K,L)=>(K[L]=void 0,K),{});A=I=Pt(j.errorSchema,k,"preventDuplicates")}const $=this.mergeErrors({errorSchema:A,errors:x},t.extraErrors,a.customErrors);x=$.errors,A=$.errorSchema}const P=this.getRegistry(t,O,S),T=fe(a.registry,P)?a.registry:P,C=a.fieldPathId&&a.fieldPathId?.[le]===T.globalFormOptions.idPrefix?a.fieldPathId:Ne("",T.globalFormOptions);return{schemaUtils:S,schema:O,uiSchema:u,fieldPathId:C,formData:b,edit:h,errors:x,errorSchema:A,schemaValidationErrors:_,schemaValidationErrorSchema:I,retrievedSchema:g,initialDefaultsGenerated:!0,registry:T}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return Fl(this,t,n,r)}validate(t,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:o,transformErrors:a,uiSchema:l}=this.props,c=i??s.retrieveSchema(n,t);return s.getValidator().validateFormData(t,c,o,a,l)}renderErrors(t){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=M(s),a=q("ErrorListTemplate",t,o);return n&&n.length?w.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:t}):null}mergeErrors(t,n,r){let i=t.errorSchema,s=t.errors;if(n){const o=vn(t,n);i=o.errorSchema,s=o.errors}if(r){const o=vn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(t,n,r,i,s,o,a,l=!1){const c=this.validate(i,t,n,a),u=c.errors;let f=c.errorSchema;l&&(f=Pt(r,c.errorSchema,"preventDuplicates"));const h=u,m=f;return{...this.mergeErrors({errorSchema:f,errors:u},s,o),schemaValidationErrors:h,schemaValidationErrorSchema:m}}getUsedFormData=(t,n)=>xl(t,n);getFieldNames=(t,n)=>El(t,n);omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,t)};setFieldValue=(t,n)=>{const{registry:r}=this.state,i=Array.isArray(t)?t:t.split("."),s=Ne("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[le])};onChange=(t,n,r,i)=>{this.pendingChanges.push({newValue:t,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:o,liveOmit:a,noValidate:l,liveValidate:c,onChange:u,removeEmptyOptionalObjects:f}=this.props,{formData:h,schemaUtils:m,schema:d,fieldPathId:p,schemaValidationErrorSchema:y,errors:S}=this.state;let{customErrors:O,errorSchema:E}=this.state;const b=p.path[0]||"",g=!n||n.length===0||n.length===1&&n[0]===b;let v=this.state.retrievedSchema,x=g?t:cs(h);const A=W(x)&&Object.keys(x).length>0&&Object.values(x).every(D=>D===void 0),_=h==null,I=A&&_?void 0:x;if(W(x)||Array.isArray(x)){t===Gl?Ng(x,n):g||se(x,n,t);const D=this.getStateFromProps(this.props,I,void 0,void 0,void 0,!0);x=D.formData,v=D.retrievedSchema}const P=!l&&(c===!0||c==="onChange");let T={formData:x,schema:d},C=x;if(o===!0&&(a===!0||a==="onChange")&&(C=this.omitExtraData(x),T={formData:C}),f&&(C=Kt(m.getValidator(),d,m.getRootSchema(),C),T={...T,formData:C}),i){const D=g?y:F(y,n);if(!pe(D))g?E=i:se(E,n,i);else if(O||(O=new _l),g){const j=F(i,Ee);j&&O.setErrors(j)}else se(O.ErrorSchema,n,i)}else O&&F(O.ErrorSchema,[...n,Ee])&&O.clearErrors(n);if(P&&this.pendingChanges.length===1){const D=this.liveValidate(d,m,E,C,s,O,v);T={formData:C,...D,customErrors:O}}else if(!l&&i){const D=this.mergeErrors({errorSchema:E,errors:S},s,O);T={formData:C,...D,customErrors:O}}this.setState(T,()=>{u&&u(Ut({...this.state,...T}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return fe(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:n=Qo,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,t??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Ut({...this.state,...o})))};onBlur=(t,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(t,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:c}=this.props,{formData:u,schemaUtils:f,schema:h}=this.state;let m=u,d={formData:m};if(i===!0&&s==="onBlur"&&(m=this.omitExtraData(u),d={formData:m}),a&&(m=Kt(f.getValidator(),h,f.getRootSchema(),m),d={...d,formData:m}),o==="onBlur"){const{schema:y,schemaUtils:S,errorSchema:O,customErrors:E,retrievedSchema:b}=this.state,g=this.liveValidate(y,S,O,m,c,E,b);d={formData:m,...g,customErrors:E}}const p=Object.keys(d).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const S=F(this.state,y),O=F(d,y);return!fe(S,O)});this.setState(d,()=>{l&&p&&l(Ut({...this.state,...d}),t)})}};onFocus=(t,n)=>{const{onFocus:r}=this.props;r&&r(t,n)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s,removeEmptyOptionalObjects:o}=this.props;let{formData:a}=this.state;if(n===!0&&(a=this.omitExtraData(a)),o){const{schemaUtils:l,schema:c}=this.state;a=Kt(l.getValidator(),c,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},c=r?ms(r):[];this.setState({formData:a,errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Ut({...this.state,formData:a},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=fa,idPrefix:s=ua,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=t;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(t,n,r){const{translateString:i,uiSchema:s={}}=t,{fields:o,templates:a,widgets:l,formContext:c,translateString:u}=MS();return{fields:{...o,...t.fields},templates:{...a,...t.templates,ButtonTemplates:{...a.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...l,...t.widgets},rootSchema:n,formContext:t.formContext||c,schemaUtils:r,translateString:i||u,globalUiOptions:s[fi],globalFormOptions:this.getGlobalFormOptions(t),uiSchemaDefinitions:s[Tu]??{}}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=t,s=jl(i);s[0]===""?s[0]=n:s.unshift(n);const o=s.join(r);let a=this.formElement.current.elements[o];a||(a=this.formElement.current.querySelector(`input[id^="${o}"], button[id^="${o}"]`)),a&&a.length&&(a=a[0]),a&&a.focus()}validateFormWithFormData=t=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(t),{errors:l,errorSchema:c}=n?this.mergeErrors(a,n):a,u=a.errors.length>0||n&&r;return u?(i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:c,schemaValidationErrors:a.errors,schemaValidationErrorSchema:a.errorSchema},()=>{s?s(l):console.error("Form validation failed",l)})):l.length>0?this.setState({errors:l,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!u};validateForm(){const{omitExtraData:t,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(t===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=Kt(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:t,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:c,enctype:u,acceptCharset:f,noHtml5Validate:h=!1,disabled:m,readonly:d,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:S,uiSchema:O,formData:E,errorSchema:b,fieldPathId:g,registry:v}=this.state,{SchemaField:x}=v.fields,{SubmitButton:A}=v.templates.ButtonTemplates,_=y?i:void 0,I=y||i||"form";let{[fr]:P={}}=M(O);m&&(P={...P,props:{...P.props,disabled:!0}});const T={[dt]:{[fr]:P}};return w.jsxs(I,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:c,encType:u,acceptCharset:f,noValidate:h,onSubmit:this.onSubmit,as:_,ref:this.formElement,children:[p==="top"&&this.renderErrors(v),w.jsx(x,{name:"",schema:S,uiSchema:O,errorSchema:b,fieldPathId:g,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:v,disabled:m,readonly:d}),t||w.jsx(A,{uiSchema:T,registry:v}),p==="bottom"&&this.renderErrors(v)]})}}var Xn={exports:{}},Qr={},ea;function US(){return ea||(ea=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(_,I){return{validate:_,compare:I}}e.fullFormats={date:t(s,o),time:t(l,c),"date-time":t(f,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:S,int32:{type:"number",validate:b},int64:{type:"number",validate:g},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(_){return _%4===0&&(_%100!==0||_%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(_){const I=r.exec(_);if(!I)return!1;const P=+I[1],T=+I[2],C=+I[3];return T>=1&&T<=12&&C>=1&&C<=(T===2&&n(P)?29:i[T])}function o(_,I){if(_&&I)return _>I?1:_<I?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(_,I){const P=a.exec(_);if(!P)return!1;const T=+P[1],C=+P[2],D=+P[3],j=P[5];return(T<=23&&C<=59&&D<=59||T===23&&C===59&&D===60)&&(!I||j!=="")}function c(_,I){if(!(_&&I))return;const P=a.exec(_),T=a.exec(I);if(P&&T)return _=P[1]+P[2]+P[3]+(P[4]||""),I=T[1]+T[2]+T[3]+(T[4]||""),_>I?1:_<I?-1:0}const u=/t|\s/i;function f(_){const I=_.split(u);return I.length===2&&s(I[0])&&l(I[1],!0)}function h(_,I){if(!(_&&I))return;const[P,T]=_.split(u),[C,D]=I.split(u),j=o(P,C);if(j!==void 0)return j||c(T,D)}const m=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(_){return m.test(_)&&d.test(_)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function S(_){return y.lastIndex=0,y.test(_)}const O=-2147483648,E=2**31-1;function b(_){return Number.isInteger(_)&&_<=E&&_>=O}function g(_){return Number.isInteger(_)}function v(){return!0}const x=/[^\\]\\Z/;function A(_){if(x.test(_))return!1;try{return new RegExp(_),!0}catch{return!1}}})(Qr)),Qr}var ei={},ta;function kS(){return ta||(ta=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=lc(),n=oa(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:c,schemaCode:u,keyword:f,it:h}=a,{opts:m,self:d}=h;if(!m.validateFormats)return;const p=new t.KeywordCxt(h,d.RULES.all.format.definition,"format");p.$data?y():S();function y(){const E=l.scopeValue("formats",{ref:d.formats,code:m.code.formats}),b=l.const("fmt",n._`${E}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${b} != "object"`,n._`${b} instanceof RegExp`,n._`typeof ${b}.compare != "function"`,O(b)))}function S(){const E=p.schema,b=d.formats[E];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${f}": format "${E}" does not define "compare" function`);const g=l.scopeValue("formats",{key:E,ref:b,code:m.code.formats?n._`${m.code.formats}${n.getProperty(E)}`:void 0});a.fail$data(O(g))}function O(E){return n._`${E}.compare(${c}, ${u}) ${i[f].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=o})(ei)),ei}var na;function LS(){return na||(na=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=US(),r=kS(),i=oa(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(c,u={keywords:!0})=>{if(Array.isArray(u))return l(c,u,n.fullFormats,s),c;const[f,h]=u.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],m=u.formats||n.formatNames;return l(c,m,f,h),u.keywords&&r.default(c),c};a.get=(c,u="full")=>{const h=(u==="fast"?n.fastFormats:n.fullFormats)[c];if(!h)throw new Error(`Unknown format "${c}"`);return h};function l(c,u,f,h){var m,d;(m=(d=c.opts.code).formats)!==null&&m!==void 0||(d.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const p of u)c.addFormat(p,f[p])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a})(Xn,Xn.exports)),Xn.exports}var BS=LS();const ra=Ti(BS),WS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},qS=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,VS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function HS(e,t,n={},r,i=pc,s){let o=new i({...WS,...n});return r?ra(o,r):r!==!1&&ra(o),o.addFormat("data-url",VS),o.addFormat("color",qS),o.addKeyword(ft),o.addKeyword(Ni),Array.isArray(e)&&o.addMetaSchema(e),Z(t)&&Object.keys(t).forEach(a=>{o.addFormat(a,t[a])}),s&&(o=s(o)),o}function KS(e,t="none"){return t==="all"?e:e.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=t!=="anyOf"?s?.indexOf(`/${Y}/`):void 0,a=t!=="oneOf"?s?.indexOf(`/${B}/`):void 0;let l;return o&&o>=0?l=s?.substring(0,o):a&&a>=0&&(l=s?.substring(0,a)),l&&n.find(u=>{var f;return u.message===i&&((f=u.schemaPath)===null||f===void 0?void 0:f.startsWith(l))})||n.push(r),n},[])}function GS(e=[],t,n){const r=e.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:c,parentSchema:u,...f}=i;let{message:h=""}=f,m=o.replace(/\//g,"."),d=`${m} ${h}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(S=>S);if(y.length>0)y.forEach(S=>{const O=m?`${m}.${S}`:S;let E=M(F(t,`${O.replace(/^\./,"")}`)).title;if(E===void 0){const b=c.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([S]);E=M(F(t,b)).title}if(E)h=h.replace(`'${S}'`,`'${E}'`),p=E;else{const b=F(u,[Q,S,"title"]);b&&(h=h.replace(`'${S}'`,`'${b}'`),p=b)}}),d=h;else{const S=M(F(t,`${m.replace(/^\./,"")}`)).title;if(S)d=`'${S}' ${h}`.trim(),p=S;else{const O=u?.title;O&&(d=`'${O}' ${h}`.trim(),p=O)}}return"missingProperty"in l&&(m=m?`${m}.${l.missingProperty}`:l.missingProperty),{name:a,property:m,message:h,params:l,stack:d,schemaPath:c,title:p}});return KS(r,n)}function zS(e,t,n,r,i,s,o,a){const{validationError:l}=t;let c=GS(t.errors,o,a);l&&(c=[...c,{stack:l.message}]),typeof s=="function"&&(c=s(c,o));let u=xg(c);if(l&&(u={...u,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:u};const f=gl(e,r,n,r,!0),h=i(f,di(f),o,u),m=$l(h);return vn({errors:c,errorSchema:u},m)}class YS{constructor(t,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:c}=t;this.ajv=HS(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema()}rawValidation(t,n){var r,i;let s,o;try{t[le]&&(o=this.ajv.getSchema(t[le])),o===void 0&&(o=this.ajv.compile(t)),o(n)}catch(l){s=l}let a;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(l=>{var c;["missingProperty","property"].forEach(u=>{var f;!((f=l.params)===null||f===void 0)&&f[u]&&(l.params[u]=`'${l.params[u]}'`)}),!((c=l.params)===null||c===void 0)&&c.deps&&(l.params.deps=l.params.deps.split(", ").map(u=>`'${u}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(l=>{var c;["missingProperty","property"].forEach(u=>{var f;!((f=l.params)===null||f===void 0)&&f[u]&&(l.params[u]=l.params[u].slice(1,-1))}),!((c=l.params)===null||c===void 0)&&c.deps&&(l.params.deps=l.params.deps.split(", ").map(u=>u.slice(1,-1)).join(", "))})),a=o.errors||void 0,o.errors=null),{errors:a,validationError:s}}validateFormData(t,n,r,i,s){const o=this.rawValidation(n,t);return zS(this,o,t,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(t){var n,r;const i=(n=t[le])!==null&&n!==void 0?n:da;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):fe(t,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,n,r){var i;try{this.handleSchemaUpdate(r);const s=ys(t),o=(i=s[le])!==null&&i!==void 0?i:yg(s);let a;return a=this.ajv.getSchema(o),a===void 0&&(a=this.ajv.addSchema(s,o).getSchema(o)||this.ajv.compile(s)),a(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function JS(e={},t){return new YS(e,t)}const iv=JS();export{ft as A,iv as B,nv as D,rv as F,Yl as R,W0 as S,te as T,q as a,At as b,ug as c,Nt as d,ds as e,Tl as f,M as g,Xl as h,Cl as i,Hn as j,Pu as k,fg as l,Sg as m,us as n,as as o,eg as p,Qy as q,Pl as r,ar as s,hs as t,_t as u,ls as v,cg as w,Ol as x,$n as y,Xy as z};
|
|
46
|
+
`,S),b=d.slice(S,E===-1?void 0:E+1),g=d[S];if((g===">"||g==="#"||g==="|"||g==="`"||g==="~"||g==="*"||g==="-"||g==="_"||g===" ")&&ea(s,b)||(y+=b,E===-1||!b.trim()))break;S=E+1}const O=Tn(y);return O===""?null:[y,,O]}),u:3,i:E0},22:{t:["["],o:st(Yb),u:0,i:d=>(u[d[1]]={target:d[2],title:d[4]},{})},23:{t:["!["],o:Zn(Jb),u:0,i:d=>({alt:d[1]?Be(d[1]):void 0,ref:d[2]})},24:{t:d=>d[0]==="["&&!Le(d,"]("),o:st(Zb),u:0,i:(d,p,y)=>({children:p(d[1],y),fallbackChildren:d[0],ref:d[2]})},25:{t:["|"],o:Xe(zo),u:1,i:S0},27:{o:ut(function(d,p){let y;return Ai(d,":")&&(y=i0.exec(d)),y||a0.exec(d)}),u:4,i(d){const p=d[0];return{text:Le(p,"&")?p.replace(Wb,(y,S)=>t.namedCodesToUnicode[S]||y):p}}},34:{t:["*","_","~","="],o:ut(xb),u:2,i:(d,p,y)=>({children:p(d[2],y),tag:d[1]})},28:{t:["\\"],o:Zn(s0),u:1,i:d=>({text:d[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete f[11],delete f[13]);const h=(function(d){var p=Object.keys(d);function y(S,O){var E=[];if(O.prevCapture=O.prevCapture||"",S.trim())for(;S;)for(var b=0;b<p.length;){var g=p[b],v=d[g];if(!v.t||g0(S,O,v.t)){var x=v.o(S,O);if(x&&x[0]){S=S.substring(x[0].length);var A=v.i(x,y,O);O.prevCapture+=x[0],A.type||(A.type=g),E.push(A);break}b++}else b++}return O.prevCapture="",E}return p.sort(function(S,O){return d[S].u-d[O].u||(S<O?-1:1)}),function(S,O){return y((function(E){return E.replace(Nb,`
|
|
47
|
+
`).replace(Ub,"").replace(Qb," ")})(S),O)}})(f),m=(function(d,p,y,S,O){function E(b){return Array.isArray(b)?b.map(g=>"text"in g?g.text:""):"text"in b?b.text:""}return function b(g,v={}){const x=(v.renderDepth||0)+1;if(x>2500)return E(g);v.renderDepth=x;try{if(Array.isArray(g)){const _=v.key,I=[];let P=!1;for(let T=0;T<g.length;T++){v.key=T;const C=b(g[T],v),D=Jo(C);D&&P?I[I.length-1]+=C:C!==null&&I.push(C),P=D}return v.key=_,v.renderDepth=x-1,I}const A=(function(_,I,P){const T=()=>(function(C,D,j,$,k,K,L){switch(C.type){case"0":{const ee={key:j.key};return C.alert&&(ee.className="markdown-alert-"+K(C.alert.toLowerCase(),pn),C.children.unshift({attrs:{},children:[{type:"27",text:C.alert}],noInnerParse:!0,type:"11",tag:"header"})),$("blockquote",ee,D(C.children,j))}case"1":return $("br",{key:j.key});case"2":return $("hr",{key:j.key});case"3":return $("pre",{key:j.key},$("code",Ve({},C.attrs,{className:C.lang?"lang-"+C.lang:""}),C.text));case"5":return $("code",{key:j.key},C.text);case"7":return $("a",{key:j.key,href:k(C.target,"a","href")},$("sup",{key:j.key},C.text));case"8":return $("input",{checked:C.completed,key:j.key,readOnly:!0,type:"checkbox"});case"9":return $("h"+C.level,{id:C.id,key:j.key},D(C.children,j));case"11":return $(C.tag,Ve({key:j.key},C.attrs),C.text||(C.children?D(C.children,j):""));case"13":return $(C.tag,Ve({},C.attrs,{key:j.key}));case"14":return $("img",{key:j.key,alt:C.alt||void 0,title:C.title||void 0,src:k(C.target,"img","src")});case"15":return $("a",{key:j.key,href:k(C.target,"a","href"),title:C.title},D(C.children,j));case"23":return L[C.ref]?$("img",{key:j.key,alt:C.alt,src:k(L[C.ref].target,"img","src"),title:L[C.ref].title}):null;case"24":return L[C.ref]?$("a",{key:j.key,href:k(L[C.ref].target,"a","href"),title:L[C.ref].title},D(C.children,j)):$("span",{key:j.key},C.fallbackChildren);case"25":{const ee=C;return $("table",{key:j.key},$("thead",null,$("tr",null,ee.header.map(function(re,ce){return $("th",{key:ce,style:Xo(ee,ce)},D(re,j))}))),$("tbody",null,ee.cells.map(function(re,ce){return $("tr",{key:ce},re.map(function(me,R){return $("td",{key:R,style:Xo(ee,R)},D(me,j))}))})))}case"27":return C.text;case"34":return $(C.tag,{key:j.key},D(C.children,j));case"20":case"30":return $(C.ordered?"ol":"ul",{key:j.key,start:C.type==="20"?C.start:void 0},C.items.map(function(ee,re){return $("li",{key:re},D(ee,j))}));case"19":return`
|
|
48
|
+
`;case"21":return $("p",{key:j.key},D(C.children,j));default:return null}})(_,I,P,p,y,S,O);return d?d(T,_,I,P):T()})(g,b,v);return v.renderDepth=x-1,A}catch(A){if(A instanceof RangeError&&A.message.includes("Maximum call stack"))return E(g);throw A}}})(t.renderRule,a,r,n,u);return l(e)}const Gn=e=>{let{children:t,options:n}=e,r=(function(i,s){if(i==null)return{};var o={};for(var a in i)if({}.hasOwnProperty.call(i,a)){if(s.indexOf(a)!==-1)continue;o[a]=i[a]}return o})(e,Eb);return _0(t??"",Ve({},n,{wrapperProps:Ve({},n?.wrapperProps,r)}))},Yl=Symbol("remove-this-key"),ta=Symbol("reset");function I0(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function T0(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return e(te.NewStringDefault)}}function C0(e){const{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:c,disabled:u,readonly:f,required:h,hideError:m,propertyName:d,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:S}=e,[O,E]=N.useState(!1),{globalFormOptions:b,fields:g}=r,{SchemaField:v}=g,x=Rt(Ne(d,b,t.path)),A=N.useCallback((T,C,D,j)=>{T===void 0&&S&&(T=""),a(T,C,D,j)},[a,S]),_=N.useCallback(T=>{d!==T&&E(!0),p(d,T)},[d,p]),I=N.useCallback(T=>{const{target:{value:C}}=T;_(C)},[_]),P=N.useCallback(()=>{y(d)},[d,y]);return w.jsx(v,{name:d,required:h,schema:n,uiSchema:i,errorSchema:s,fieldPathId:x,formData:o,wasPropertyKeyModified:O,onKeyRename:_,onKeyRenameBlur:I,onRemoveProperty:P,onChange:A,onBlur:l,onFocus:c,registry:r,disabled:u,readonly:f,hideError:m})}function P0(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:c,hideError:u,onBlur:f,onFocus:h,onChange:m,registry:d,title:p}=e,{fields:y,schemaUtils:S,translateString:O,globalUiOptions:E}=d,{OptionalDataControlsField:b}=y,g=N.useRef(r);g.current=r;const v=S.retrieveSchema(t,r,!0),x=M(n,E),{properties:A={}}=v,_=e.childFieldPathId??s,I=N.useRef({previousKey:"",currentKey:void 0}),P=x.title??v.title??p??o,T=x.description??v.description,C=Kn(d,v,a,n),D=ln(r);let j=[];const $=N.useCallback((R,ie)=>{const{duplicateKeySuffixSeparator:J="-"}=M(n,E);let V=0,H=R;for(;z(ie,H);)H=`${R}${J}${++V}`;return H},[n,E]),k=N.useCallback(()=>{if(!(v.additionalProperties||v.patternProperties))return;const{translateString:R}=d,ie={...r},J=$("newKey",ie);if(v.patternProperties)se(ie,J,null);else{let V,H,U;if(Z(v.additionalProperties)){V=v.additionalProperties.type,H=v.additionalProperties.const,U=v.additionalProperties.default;let ne=v.additionalProperties;if(ae in ne){const{schemaUtils:we}=d;ne=we.retrieveSchema({[ae]:ne[ae]},r),V=ne.type,H=ne.const,U=ne.default}!V&&(Y in ne||B in ne)&&(V="object")}const X=H??U??T0(R,V);se(ie,J,X)}I.current.previousKey===J&&(I.current.currentKey=J,I.current.previousKey=$(J,ie)),m(ie,_.path)},[r,m,d,_,$,v]),K=N.useCallback((R,ie)=>{if(R!==ie){const J=g.current,V=$(ie,J),H={...J},U={[R]:V},X=Object.keys(H).map(we=>({[U[we]||we]:H[we]})),ne=Object.assign({},...X);g.current=ne,R!==I.current.currentKey&&(I.current.previousKey=R),I.current.currentKey=V,m(ne,_.path)}},[m,_,$]),L=N.useCallback(R=>{m(Yl,[..._.path,R])},[m,_]),ee=N.useCallback(R=>I.current.currentKey===R?I.current.previousKey:R,[]);if(!C||D)try{const R=Object.keys(A);j=xg(R,x.order)}catch(R){return w.jsxs("div",{children:[w.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:w.jsx(Gn,{options:{disableParsingRawHTML:!0},children:O(te.InvalidObjectField,[o||"root",R.message])})}),w.jsx("pre",{children:JSON.stringify(v)})]})}const re=q("ObjectFieldTemplate",d,x),ce=C?w.jsx(b,{...e,fieldPathId:_,schema:v}):void 0,me={title:x.label===!1?"":P,description:x.label===!1?void 0:T,properties:j.map(R=>{const ie=z(v,[Q,R,ft]),J=ie?n.additionalProperties:n[R],V=M(J).widget==="hidden";return{content:w.jsx(C0,{propertyName:R,required:I0(v,R),schema:F(v,[Q,R],{}),uiSchema:J,errorSchema:F(i,[R]),fieldPathId:_,formData:F(r,[R]),handleKeyRename:K,handleRemoveProperty:L,addedByAdditionalProperties:ie,onChange:m,onBlur:f,onFocus:h,registry:d,disabled:l,readonly:c,hideError:u},ee(R)),name:R,readonly:c,disabled:l,required:a,hidden:V}}),readonly:c,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:v,formData:r,registry:d,optionalDataControl:ce,className:C?"rjsf-optional-object-field":void 0};return w.jsx(re,{...me,onAddProperty:k})}function F0(e){const{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:c}=e,{globalUiOptions:u={},schemaUtils:f,translateString:h}=c,m=M(n,u),d=q("OptionalDataControlsTemplate",c,m),p=ln(r);let y,S,O,E;if(i||s)y=Hr(l,"Msg"),S=p?void 0:h(te.OptionalObjectEmptyMsg);else{const b=p?te.OptionalObjectRemove:te.OptionalObjectAdd;S=h(b),p?(y=Hr(l,"Remove"),E=()=>o(void 0,l.path,a)):(y=Hr(l,"Add"),O=()=>{let g=f.getDefaultFormState(t,r,"excludeObjectChildren");g===void 0&&(g=ke(t)==="array"?[]:{}),o(g,l.path,a)})}return S&&w.jsx(d,{id:y,registry:c,schema:t,uiSchema:n,label:S,onAddClick:O,onRemoveClick:E})}const j0={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function $0(e,t,n){const r=t.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=ke(e),o=Array.isArray(s)?s[0]:s||"",a=e.$id;let l=j0[o];return a&&a in i&&(l=a),!l&&(e.anyOf||e.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function D0(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:f=!1,registry:h,wasPropertyKeyModified:m=!1}=e,{schemaUtils:d,globalFormOptions:p,globalUiOptions:y,fields:S}=h,{AnyOfField:O,OneOfField:E}=S,b=Eg(t,r,h),g=M(b,y),v=q("FieldTemplate",h,g),x=q("DescriptionFieldTemplate",h,g),A=q("FieldHelpTemplate",h,g),_=q("FieldErrorTemplate",h,g),I=d.retrieveSchema(t,i),P=n[le],T=N.useCallback((cn,un,Ot,tc)=>a(cn,un,Ot,tc||P),[P,a]),C=$0(I,g,h),D=!!(g.disabled??e.disabled),j=!!(g.readonly??(e.readonly||e.schema.readOnly||I.readOnly)),$=g.hideError,k=$===void 0?e.hideError:!!$,K=!!(g.autofocus??e.autofocus);if(Object.keys(I).length===0)return null;let L=d.getDisplayLabel(I,b,y);const ee=g.field&&g.fieldReplacesAnyOrOneOf===!0;let re,ce,me={fieldPathId:n};if((Y in I||B in I)&&!ee&&!d.isSelect(I)){I[Y]?(re=O,ce=I[Y].map(Ot=>d.retrieveSchema(Z(Ot)?Ot:{},i))):I[B]&&(re=E,ce=I[B].map(Ot=>d.retrieveSchema(Z(Ot)?Ot:{},i)));const cn=Kn(h,I,f,b),un=ln(i);L=L&&(!cn||un),me={childFieldPathId:n,fieldPathId:Ne("XxxOf",p,n)}}const{__errors:R,...ie}=s||{},J=Qt(b,["ui:classNames","classNames","ui:style"]);dt in J&&(J[dt]=Qt(J[dt],["classNames","style"]));const V=w.jsx(C,{...e,onChange:T,...me,schema:I,uiSchema:J,disabled:D,readonly:j,hideError:k,autofocus:K,errorSchema:ie,rawErrors:R}),H=n[le];let U;m?U=o:U=ft in I?o:g.title||e.schema.title||I.title||e.title||o;const X=g.description||e.schema.description||I.description||"",ne=g.help,we=g.widget==="hidden",xe=["rjsf-field",`rjsf-field-${ke(I)}`];!k&&R&&R.length>0&&xe.push("rjsf-field-error"),g.classNames&&xe.push(g.classNames);const be=w.jsx(A,{help:ne,fieldPathId:n,schema:I,uiSchema:b,hasErrors:!k&&R&&R.length>0,registry:h}),Ce=k||re&&!d.isSelect(I)?void 0:w.jsx(_,{errors:R,errorSchema:s,fieldPathId:n,schema:I,uiSchema:b,registry:h}),it={description:w.jsx(x,{id:Hn(H),description:X,schema:I,uiSchema:b,registry:h}),rawDescription:X,help:be,rawHelp:typeof ne=="string"?ne:void 0,errors:Ce,rawErrors:k?void 0:R,fieldPathId:n,id:H,label:U,hidden:we,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:f,disabled:D,readonly:j,hideError:k,displayLabel:L,classNames:xe.join(" ").trim(),style:g.style,formData:i,schema:I,uiSchema:b,registry:h};return w.jsx(v,{...it,children:w.jsxs(w.Fragment,{children:[V,re&&w.jsx(re,{name:o,disabled:D,readonly:j,hideError:k,errorSchema:s,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:ce,registry:h,required:f,schema:I,uiSchema:b})]})})}class N0 extends N.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return $l(this,t,this.state,r)}render(){return w.jsx(D0,{...this.props})}}function R0(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:c=!1,onChange:u,onBlur:f,onFocus:h,registry:m,rawErrors:d,hideError:p,title:y}=e,{title:S,format:O}=t,{widgets:E,schemaUtils:b,globalUiOptions:g}=m,v=b.isSelect(t)?tn(t,r):void 0;let x=v?"select":"text";O&&Sg(t,O,E)&&(x=O);const{widget:A=x,placeholder:_="",title:I,...P}=M(r),T=b.getDisplayLabel(t,r,g),C=I??y??S??n,D=Je(t,A,E),j=N.useCallback(($,k,K)=>u($,i.path,k,K),[u,i]);return w.jsx(D,{options:{...P,enumOptions:v},schema:t,uiSchema:r,id:i.$id,name:n,label:C,hideLabel:!T,hideError:p,value:s,onChange:j,onBlur:f,onFocus:h,required:o,disabled:a,readonly:l,autofocus:c,registry:m,placeholder:_,rawErrors:d,htmlName:i.name})}function M0(e){const{formData:t,onChange:n,fieldPathId:r}=e;return N.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function U0(){return{AnyOfField:Mo,ArrayField:Kg,BooleanField:Gg,FallbackField:Zg,LayoutGridField:gs,LayoutHeaderField:gb,LayoutMultiSchemaField:bb,NumberField:Ob,ObjectField:P0,OneOfField:Mo,OptionalDataControlsField:F0,SchemaField:N0,StringField:R0,NullField:M0}}function k0(e){const{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:s}=e,o=M(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=q("DescriptionFieldTemplate",r,o);return w.jsx(l,{id:Hn(t),description:n,schema:i,uiSchema:s,registry:r})}function L0(e){const{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=e,c=M(l),u=q("ArrayFieldItemButtonsTemplate",a,c),f={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,m={display:"flex",alignItems:i?"center":"baseline"},d={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return w.jsxs("div",{className:n,style:m,children:[w.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),o&&w.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:w.jsx("div",{className:"btn-group",style:d,children:w.jsx(u,{...r,style:f})})})]})}function B0(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:c,onMoveUpItem:u,readonly:f,registry:h,uiSchema:m}=e,{CopyButton:d,MoveDownButton:p,MoveUpButton:y,RemoveButton:S}=h.templates.ButtonTemplates;return w.jsxs(w.Fragment,{children:[(i||r)&&w.jsx(y,{id:At(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||f||!i,onClick:u,uiSchema:m,registry:h}),(i||r)&&w.jsx(p,{id:At(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||f||!r,onClick:c,uiSchema:m,registry:h}),n&&w.jsx(d,{id:At(o,"copy"),className:"rjsf-array-item-copy",disabled:t||f,onClick:a,uiSchema:m,registry:h}),s&&w.jsx(S,{id:At(o,"remove"),className:"rjsf-array-item-remove",disabled:t||f,onClick:l,uiSchema:m,registry:h})]})}function W0(e){const{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:c,registry:u,required:f,schema:h,title:m}=e,d=M(s),p=q("ArrayFieldDescriptionTemplate",u,d),y=q("ArrayFieldTitleTemplate",u,d),S=!c&&!r,{ButtonTemplates:{AddButton:O}}=u.templates;return w.jsxs("fieldset",{className:n,id:i.$id,children:[w.jsx(y,{fieldPathId:i,title:d.title||m,required:f,schema:h,uiSchema:s,registry:u,optionalDataControl:S?a:void 0}),w.jsx(p,{fieldPathId:i,description:d.description||h.description,schema:h,uiSchema:s,registry:u}),S?void 0:a,w.jsx("div",{className:"row array-item-list",children:o}),t&&w.jsx(O,{id:At(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||c,uiSchema:s,registry:u})]})}function q0(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=e,l=M(i,o.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const u=q("TitleFieldTemplate",o,l);return w.jsx(u,{id:hs(t),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function V0(e){const{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?w.jsx("datalist",{id:ds(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>w.jsx("option",{value:s},String(s)))},`datalist_${t}`):null}function H0(e){const{id:t,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:c,onChange:u,onChangeOverride:f,options:h,schema:m,uiSchema:d,registry:p,rawErrors:y,type:S,hideLabel:O,hideError:E,...b}=e,{ClearButton:g}=p.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const v={...b,...dg(m,S,h)};let x;v.type==="number"||v.type==="integer"?x=i||i===0?i:"":x=i??"";const A=N.useCallback(({target:{value:T}})=>u(T===""?h.emptyValue:T),[u,h]),_=N.useCallback(({target:T})=>l(t,T&&T.value),[l,t]),I=N.useCallback(({target:T})=>c(t,T&&T.value),[c,t]),P=N.useCallback(T=>{T.preventDefault(),T.stopPropagation(),u(h.emptyValue??"")},[u,h.emptyValue]);return w.jsxs(w.Fragment,{children:[w.jsx("input",{id:t,name:r||t,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:x,...v,list:m.examples?ds(t):void 0,onChange:f||A,onBlur:_,onFocus:I,"aria-describedby":Nt(t,!!m.examples)}),h.allowClearTextInputs&&!s&&!o&&x&&w.jsx(g,{registry:p,onClick:P}),w.jsx(V0,{id:t,schema:m})]})}function K0({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=hg(e);return n?null:w.jsx("div",{children:w.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function vt(e){const{iconType:t="default",icon:n,className:r,uiSchema:i,registry:s,...o}=e;return w.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...o,children:w.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function G0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.CopyButton),...e,icon:"copy"})}function z0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.MoveDownButton),...e,icon:"arrow-down"})}function Y0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.MoveUpButton),...e,icon:"arrow-up"})}function J0(e){const{registry:{translateString:t}}=e;return w.jsx(vt,{title:t(te.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Z0({id:e,className:t,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return w.jsx(vt,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(te.ClearButton),onClick:n,disabled:r,registry:i,...s})}function X0({id:e,className:t,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return w.jsx("div",{className:"row",children:w.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:w.jsx(vt,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(te.AddButton),onClick:n,disabled:r,registry:i})})})}function Q0(){return{SubmitButton:K0,AddButton:X0,CopyButton:G0,MoveDownButton:z0,MoveUpButton:Y0,RemoveButton:J0,ClearButton:Z0}}const Jl=fs();function Zl({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return M(n,r).enableMarkdownInDescription&&typeof e=="string"?w.jsx(Gn,{options:{disableParsingRawHTML:!0},"data-testid":Jl.markdown,children:e}):e}Zl.TEST_IDS=Jl;function eS(e){const{id:t,description:n,registry:r,uiSchema:i}=e;return n?w.jsx("div",{id:t,className:"field-description",children:w.jsx(Zl,{description:n,registry:r,uiSchema:i})}):null}function tS({errors:e,registry:t}){const{translateString:n}=t;return w.jsxs("div",{className:"panel panel-danger errors",children:[w.jsx("div",{className:"panel-heading",children:w.jsx("h3",{className:"panel-title",children:n(te.ErrorsLabel)})}),w.jsx("ul",{className:"list-group",children:e.map((r,i)=>w.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function nS(e){const{schema:t,registry:n,typeSelector:r,schemaField:i}=e,s=q("MultiSchemaFieldTemplate",n);return w.jsx(s,{selector:r,optionSchemaField:i,schema:t,registry:n})}const rS="*";function Xl(e){const{label:t,required:n,id:r}=e;return t?w.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&w.jsx("span",{className:"required",children:rS})]}):null}function iS(e){const{id:t,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:c,registry:u,uiSchema:f}=e,h=M(f),m=q("WrapIfAdditionalTemplate",u,h);if(a)return w.jsx("div",{className:"hidden",children:r});const d=h.widget==="checkbox";return w.jsxs(m,{...e,children:[c&&!d&&w.jsx(Xl,{label:n,required:l,id:t}),c&&o?o:null,r,i,s]})}function sS(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=Pl(n);return w.jsx("div",{children:w.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,s)=>w.jsx("li",{className:"text-danger",children:i},s))})})}const Ql=fs();function ec({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return M(n,r).enableMarkdownInHelp&&typeof e=="string"?w.jsx(Gn,{options:{disableParsingRawHTML:!0},"data-testid":Ql.markdown,children:e}):e}ec.TEST_IDS=Ql;function oS(e){const{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?w.jsx("div",{id:Fl(t),className:"help-block",children:w.jsx(ec,{help:n,registry:i,uiSchema:r})}):null}function aS(e){const{children:t,column:n,className:r,...i}=e;return w.jsx("div",{className:r,...i,children:t})}function lS(e){const{selector:t,optionSchemaField:n}=e;return w.jsxs("div",{className:"panel panel-default panel-body",children:[w.jsx("div",{className:"form-group",children:t}),n]})}function cS(e){const{className:t,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:c,registry:u,required:f,schema:h,title:m,uiSchema:d}=e,p=M(d),y=q("TitleFieldTemplate",u,p),S=q("DescriptionFieldTemplate",u,p);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const E=!c&&!r,{ButtonTemplates:{AddButton:b}}=u.templates;return w.jsxs("fieldset",{className:t,id:s.$id,children:[m&&w.jsx(y,{id:hs(s),title:m,required:f,schema:h,uiSchema:d,registry:u,optionalDataControl:E?a:void 0}),n&&w.jsx(S,{id:Hn(s),description:n,schema:h,uiSchema:d,registry:u}),E?void 0:a,l.map(g=>g.content),ju(h,d,i)&&w.jsx(b,{id:At(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||c,uiSchema:d,registry:u})]})}function uS(e){const{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:s}=e;return i?w.jsx(vt,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?w.jsx(vt,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):w.jsx("em",{id:t,children:r})}const fS="*";function dS(e){const{id:t,title:n,required:r,optionalDataControl:i}=e;return w.jsxs("legend",{id:t,children:[n,r&&w.jsx("span",{className:"required",children:fS}),i&&w.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function hS(e){const{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:s}=i;let o=te.UnsupportedField;const a=[];return n&&n.$id&&(o=te.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===te.UnsupportedField?te.UnsupportedFieldWithReason:te.UnsupportedFieldWithIdAndReason,a.push(r)),w.jsxs("div",{className:"unsupported-field",children:[w.jsx("p",{children:w.jsx(Gn,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),t&&w.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function pS(e){const{id:t,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:c,readonly:u,required:f,schema:h,hideError:m,rawErrors:d,children:p,uiSchema:y,registry:S}=e,{templates:O,translateString:E}=S,{RemoveButton:b}=O.ButtonTemplates,g=E(te.KeyLabel,[o]),v=ft in h,x=!!c,A=["form-group",n];!m&&d&&d.length>0&&A.push("has-error has-danger");const _=A.join(" ").trim();if(!v)return w.jsx("div",{className:_,style:r,children:p});const I=x?46:26;return w.jsx("div",{className:_,style:r,children:w.jsxs("div",{className:"row",children:[w.jsx("div",{className:"col-xs-5 form-additional",children:w.jsxs("div",{className:"form-group",children:[s&&w.jsx(Xl,{label:g,required:f,id:`${t}-key`}),s&&c&&w.jsx("div",{children:" "}),w.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:a,defaultValue:o},o)]})}),w.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),w.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${I}px`:void 0},children:w.jsx(b,{id:At(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l,uiSchema:y,registry:S})})]})})}function mS(){return{ArrayFieldDescriptionTemplate:k0,ArrayFieldItemTemplate:L0,ArrayFieldItemButtonsTemplate:B0,ArrayFieldTemplate:W0,ArrayFieldTitleTemplate:q0,ButtonTemplates:Q0(),BaseInputTemplate:H0,DescriptionFieldTemplate:eS,ErrorListTemplate:tS,FallbackFieldTemplate:nS,FieldTemplate:iS,FieldErrorTemplate:sS,FieldHelpTemplate:oS,GridTemplate:aS,MultiSchemaFieldTemplate:lS,ObjectFieldTemplate:cS,OptionalDataControlsTemplate:uS,TitleFieldTemplate:dS,UnsupportedFieldTemplate:hS,WrapIfAdditionalTemplate:pS}}function yS(e){const{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:c}=e,{translateString:u}=a,{elements:f,handleChange:h,handleClear:m,handleSetNow:d}=Tg(e);return w.jsxs("ul",{className:"list-inline",children:[f.map((p,y)=>w.jsx("li",{className:"list-inline-item",children:w.jsx(Ig,{rootId:s,name:o,select:h,...p,disabled:t,readonly:n,registry:a,onBlur:l,onFocus:c,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&w.jsx("li",{className:"list-inline-item",children:w.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:d,children:u(te.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&w.jsx("li",{className:"list-inline-item",children:w.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:m,children:u(te.ClearLabel)})})]})}function gS({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return w.jsx(n,{time:e,...t})}function bS({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:c=!1,onBlur:u,onFocus:f,onChange:h,registry:m,htmlName:d}){const p=q("DescriptionFieldTemplate",m,n),y=ar(e),S=N.useCallback(x=>h(x.target.checked),[h]),O=N.useCallback(x=>u(r,x.target.checked),[u,r]),E=N.useCallback(x=>f(r,x.target.checked),[f,r]),v=M(t).widget==="checkbox"?void 0:n.description??e.description;return w.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&v&&w.jsx(p,{id:Hn(r),description:v,schema:e,uiSchema:t,registry:m}),w.jsxs("label",{children:[w.jsx("input",{type:"checkbox",id:r,name:d||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:c,onChange:S,onBlur:O,onFocus:E,"aria-describedby":Nt(r)}),Og(w.jsx("span",{children:a}),l)]})]})}function SS({id:e,disabled:t,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:c}){const{inline:u=!1,enumOptions:f,enumDisabled:h,emptyValue:m}=n,d=us(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:O})=>a(e,_t(O&&O.value,f,d,m)),[a,e,f,m,d]),S=N.useCallback(({target:O})=>l(e,_t(O&&O.value,f,d,m)),[l,e,f,m,d]);return w.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(f)&&f.map((O,E)=>{const b=as(O.value,p),g=Array.isArray(h)&&h.indexOf(O.value)!==-1,v=t||g||s?"disabled":"",x=_=>{_.target.checked?o(ng(E,p,f)):o(tg(E,p,f))},A=w.jsxs("span",{children:[w.jsx("input",{type:"checkbox",id:jl(e,E),name:c||e,checked:b,value:ls(O.value,E,d),disabled:t||g||s,autoFocus:i&&E===0,onChange:x,onBlur:y,onFocus:S,"aria-describedby":Nt(e)}),w.jsx("span",{children:O.label})]});return u?w.jsx("label",{className:`checkbox-inline ${v}`,children:A},E):w.jsx("div",{className:`checkbox ${v}`,children:w.jsx("label",{children:A})},E)})})}function vS(e){const{disabled:t,readonly:n,options:r,registry:i}=e,s=q("BaseInputTemplate",i,r);return w.jsx(s,{type:"color",...e,disabled:t||n})}function OS(e){const{onChange:t,options:n,registry:r}=e,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>t(o||void 0),[t]);return w.jsx(i,{type:"date",...e,onChange:s})}function wS(e){const{onChange:t,value:n,options:r,registry:i}=e,s=q("BaseInputTemplate",i,r);return w.jsx(s,{type:"datetime-local",...e,value:$g(n),onChange:o=>t(wg(o))})}function xS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"email",...e})}function ES({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:i,name:s}=e;return r?["image/jpeg","image/png"].includes(i)?w.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):w.jsxs(w.Fragment,{children:[" ",w.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(te.PreviewLabel)})]}):null}function AS({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;const{translateString:s}=t,{RemoveButton:o}=q("ButtonTemplates",t,i);return w.jsx("ul",{className:"file-info",children:e.map((a,l)=>{const{name:c,size:u,type:f}=a,h=()=>r(l);return w.jsxs("li",{children:[w.jsx(Gn,{children:s(te.FilesInfo,[c,f,String(u)])}),n&&w.jsx(ES,{fileInfo:a,registry:t}),w.jsx(o,{onClick:h,registry:t})]},l)})})}function _S(e){const{disabled:t,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=e,{filesInfo:c,handleChange:u,handleRemove:f}=jg(o,s,i),h=q("BaseInputTemplate",l,a),m=d=>{d.target.files&&u(d.target.files)};return w.jsxs("div",{children:[w.jsx(h,{...e,disabled:t||n,type:"file",required:o?!1:r,onChangeOverride:m,value:"",accept:a.accept?String(a.accept):void 0}),w.jsx(AS,{filesInfo:c,onRemove:f,registry:l,preview:a.filePreview,options:a})]})}function IS({id:e,value:t,htmlName:n}){return w.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function TS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"password",...e})}function CS({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:c,htmlName:u}){const{enumOptions:f,enumDisabled:h,inline:m,emptyValue:d}=e,p=us(e),y=N.useCallback(({target:O})=>o(c,_t(O&&O.value,f,p,d)),[o,f,d,c,p]),S=N.useCallback(({target:O})=>a(c,_t(O&&O.value,f,p,d)),[a,f,d,c,p]);return w.jsx("div",{className:"field-radio-group",id:c,role:"radiogroup",children:Array.isArray(f)&&f.map((O,E)=>{const b=as(O.value,t),g=Array.isArray(h)&&h.indexOf(O.value)!==-1,v=r||g||i?"disabled":"",x=()=>l(O.value),A=w.jsxs("span",{children:[w.jsx("input",{type:"radio",id:jl(c,E),checked:b,name:u||c,required:n,value:ls(O.value,E,p),disabled:r||g||i,autoFocus:s&&E===0,onChange:x,onBlur:y,onFocus:S,"aria-describedby":Nt(c)}),w.jsx("span",{children:O.label})]});return m?w.jsx("label",{className:`radio-inline ${v}`,children:A},E):w.jsx("div",{className:`radio ${v}`,children:w.jsx("label",{children:A})},E)})})}function PS(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return w.jsxs("div",{className:"field-range-wrapper",children:[w.jsx(n,{type:"range",...e}),w.jsx("span",{className:"range-view",children:t})]})}function FS({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:c,options:u,htmlName:f}){const{stars:h=5,shape:m="star"}=u,d=c.maximum?Math.min(c.maximum,5):Math.min(Math.max(h,1),5),p=c.minimum||0,y=N.useCallback(b=>{!r&&!i&&o(b)},[o,r,i]),S=N.useCallback(b=>{if(a){const g=Number(b.target.dataset.value);a(e,g)}},[a,e]),O=N.useCallback(b=>{if(l){const g=Number(b.target.dataset.value);l(e,g)}},[l,e]),E=b=>m==="heart"?b?"♥":"♡":b?"★":"☆";return w.jsx(w.Fragment,{children:w.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(d)].map((b,g)=>{const v=p+g,x=v<=t;return w.jsx("span",{onClick:()=>y(v),onFocus:S,onBlur:O,"data-value":v,tabIndex:r||i?-1:0,role:"radio","aria-checked":v===t,"aria-label":`${v} ${m==="heart"?"heart":"star"}${v===1?"":"s"}`,style:{color:x?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(x)},g)}),w.jsx("input",{type:"hidden",id:e,name:f||e,value:t||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function Xr(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function jS({schema:e,id:t,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:c,onBlur:u,onFocus:f,placeholder:h,htmlName:m}){const{enumOptions:d,enumDisabled:p,emptyValue:y}=n,S=a?[]:"",O=us(n),E=N.useCallback(A=>{const _=Xr(A,a);return f(t,_t(_,d,O,y))},[f,t,a,d,y,O]),b=N.useCallback(A=>{const _=Xr(A,a);return u(t,_t(_,d,O,y))},[u,t,a,d,y,O]),g=N.useCallback(A=>{const _=Xr(A,a);return c(_t(_,d,O,y))},[c,a,d,y,O]),v=eg(r,d,a,O,S),x=!a&&e.default===void 0;return w.jsxs("select",{id:t,name:m||t,multiple:a,role:"combobox",className:"form-control",value:v,required:i,disabled:s||o,autoFocus:l,onBlur:b,onFocus:E,onChange:g,"aria-describedby":Nt(t),children:[x&&w.jsx("option",{value:"",children:h}),Array.isArray(d)&&d.map(({value:A,label:_},I)=>{const P=p&&p.indexOf(A)!==-1;return w.jsx("option",{value:ls(A,I,O),disabled:P,children:_},I)})]})}function $S({id:e,options:t={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:c,onFocus:u,htmlName:f}){const h=N.useCallback(({target:{value:p}})=>l(p===""?t.emptyValue:p),[l,t.emptyValue]),m=N.useCallback(({target:p})=>c(e,p&&p.value),[c,e]),d=N.useCallback(({target:p})=>u(e,p&&p.value),[e,u]);return w.jsx("textarea",{id:e,name:f||e,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:t.rows,onBlur:m,onFocus:d,onChange:h,"aria-describedby":Nt(e)})}function DS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{...e})}function NS(e){const{onChange:t,options:n,registry:r}=e,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>t(o?`${o}:00`:void 0),[t]);return w.jsx(i,{type:"time",...e,onChange:s})}function RS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"url",...e})}function MS(e){const{options:t,registry:n}=e,r=q("BaseInputTemplate",n,t);return w.jsx(r,{type:"number",...e})}function US(){return{AltDateWidget:yS,AltDateTimeWidget:gS,CheckboxWidget:bS,CheckboxesWidget:SS,ColorWidget:vS,DateWidget:OS,DateTimeWidget:wS,EmailWidget:xS,FileWidget:_S,HiddenWidget:IS,PasswordWidget:TS,RadioWidget:CS,RangeWidget:PS,RatingWidget:FS,SelectWidget:jS,TextWidget:DS,TextareaWidget:$S,TimeWidget:NS,UpDownWidget:MS,URLWidget:RS}}function kS(){return{fields:U0(),templates:mS(),widgets:US(),rootSchema:{},formContext:{},translateString:Xy,globalFormOptions:{idPrefix:da,idSeparator:ha,useFallbackUiForUnsupportedType:!1}}}function Ut(e,t){return{...xl(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class sv extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(t,n){if(t.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return t.extraErrors&&({errors:i,errorSchema:s}=vn(r,t.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=vn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:t.extraErrors,errors:i,errorSchema:s}}return null}constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=t,s=n??r;this.state={...this.getStateFromProps(t,s,void 0,void 0,void 0,!0),_prevExtraErrors:t.extraErrors},i&&!fe(this.state.formData,s)&&i(Ut(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(t,n){if(!fe(this.props,t)){const r=Io(this.props.formData,t.formData),i=Io(this.props.formData,this.state.formData),s=!fe(t.schema,this.props.schema),o=r.length>0||!fe(t.formData,this.props.formData),a=i.length>0||!fe(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||o?void 0:this.state.retrievedSchema,s,r,!a),c=!fe(l,n);return{nextState:l,shouldUpdate:c}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!fe(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!fe(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Ut(i)),this.setState(i)}}getStateFromProps(t,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in t?t.schema:this.props.schema,c="validator"in t?t.validator:this.props.validator,u=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},f=t.formData===void 0&&this.props.formData===void 0,h=typeof n<"u",m="liveValidate"in t?t.liveValidate:this.props.liveValidate,d=h&&!t.noValidate&&m,p="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let S=a.schemaUtils;(!S||S.doesSchemaUtilsDiffer(c,l,p,y))&&(S=Yy(c,l,p,y));const O=S.getRootSchema();let E=n;n===ta?E=void 0:n===void 0&&f&&(E=a.formData);const b=S.getDefaultFormState(O,E,!1,a.initialDefaultsGenerated),g=this.updateRetrievedSchema(r??S.retrieveSchema(O,b)),v=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let x,A,_=a.schemaValidationErrors,I=a.schemaValidationErrorSchema;if(d&&!o){const j=this.liveValidate(O,S,a.errorSchema,b,void 0,a.customErrors,r,r!==void 0);x=j.errors,A=j.errorSchema,_=j.schemaValidationErrors,I=j.schemaValidationErrorSchema}else{const j=v();if(x=j.errors,A=j.errorSchema,s.length>0&&!d){const k=s.reduce((K,L)=>(K[L]=void 0,K),{});A=I=Pt(j.errorSchema,k,"preventDuplicates")}const $=this.mergeErrors({errorSchema:A,errors:x},t.extraErrors,a.customErrors);x=$.errors,A=$.errorSchema}const P=this.getRegistry(t,O,S),T=fe(a.registry,P)?a.registry:P,C=a.fieldPathId&&a.fieldPathId?.[le]===T.globalFormOptions.idPrefix?a.fieldPathId:Ne("",T.globalFormOptions);return{schemaUtils:S,schema:O,uiSchema:u,fieldPathId:C,formData:b,edit:h,errors:x,errorSchema:A,schemaValidationErrors:_,schemaValidationErrorSchema:I,retrievedSchema:g,initialDefaultsGenerated:!0,registry:T}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return $l(this,t,n,r)}validate(t,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:o,transformErrors:a,uiSchema:l}=this.props,c=i??s.retrieveSchema(n,t);return s.getValidator().validateFormData(t,c,o,a,l)}renderErrors(t){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=M(s),a=q("ErrorListTemplate",t,o);return n&&n.length?w.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:t}):null}mergeErrors(t,n,r){let i=t.errorSchema,s=t.errors;if(n){const o=vn(t,n);i=o.errorSchema,s=o.errors}if(r){const o=vn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(t,n,r,i,s,o,a,l=!1){const c=this.validate(i,t,n,a),u=c.errors;let f=c.errorSchema;l&&(f=Pt(r,c.errorSchema,"preventDuplicates"));const h=u,m=f;return{...this.mergeErrors({errorSchema:f,errors:u},s,o),schemaValidationErrors:h,schemaValidationErrorSchema:m}}getUsedFormData=(t,n)=>Al(t,n);getFieldNames=(t,n)=>_l(t,n);omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,t)};setFieldValue=(t,n)=>{const{registry:r}=this.state,i=Array.isArray(t)?t:t.split("."),s=Ne("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[le])};onChange=(t,n,r,i)=>{this.pendingChanges.push({newValue:t,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:o,liveOmit:a,noValidate:l,liveValidate:c,onChange:u,removeEmptyOptionalObjects:f}=this.props,{formData:h,schemaUtils:m,schema:d,fieldPathId:p,schemaValidationErrorSchema:y,errors:S}=this.state;let{customErrors:O,errorSchema:E}=this.state;const b=p.path[0]||"",g=!n||n.length===0||n.length===1&&n[0]===b;let v=this.state.retrievedSchema,x=g?t:cs(h);const A=W(x)&&Object.keys(x).length>0&&Object.values(x).every(D=>D===void 0),_=h==null,I=A&&_?void 0:x;if(W(x)||Array.isArray(x)){t===Yl?Mg(x,n):g||se(x,n,t);const D=this.getStateFromProps(this.props,I,void 0,void 0,void 0,!0);x=D.formData,v=D.retrievedSchema}const P=!l&&(c===!0||c==="onChange");let T={formData:x,schema:d},C=x;if(o===!0&&(a===!0||a==="onChange")&&(C=this.omitExtraData(x),T={formData:C}),f&&(C=Kt(m.getValidator(),d,m.getRootSchema(),C),T={...T,formData:C}),i){const D=g?y:F(y,n);if(!pe(D))g?E=i:se(E,n,i);else if(O||(O=new Tl),g){const j=F(i,Ee);j&&O.setErrors(j)}else se(O.ErrorSchema,n,i)}else O&&F(O.ErrorSchema,[...n,Ee])&&O.clearErrors(n);if(P&&this.pendingChanges.length===1){const D=this.liveValidate(d,m,E,C,s,O,v);T={formData:C,...D,customErrors:O}}else if(!l&&i){const D=this.mergeErrors({errorSchema:E,errors:S},s,O);T={formData:C,...D,customErrors:O}}this.setState(T,()=>{u&&u(Ut({...this.state,...T}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return fe(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:n=ta,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,t??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Ut({...this.state,...o})))};onBlur=(t,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(t,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:c}=this.props,{formData:u,schemaUtils:f,schema:h}=this.state;let m=u,d={formData:m};if(i===!0&&s==="onBlur"&&(m=this.omitExtraData(u),d={formData:m}),a&&(m=Kt(f.getValidator(),h,f.getRootSchema(),m),d={...d,formData:m}),o==="onBlur"){const{schema:y,schemaUtils:S,errorSchema:O,customErrors:E,retrievedSchema:b}=this.state,g=this.liveValidate(y,S,O,m,c,E,b);d={formData:m,...g,customErrors:E}}const p=Object.keys(d).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const S=F(this.state,y),O=F(d,y);return!fe(S,O)});this.setState(d,()=>{l&&p&&l(Ut({...this.state,...d}),t)})}};onFocus=(t,n)=>{const{onFocus:r}=this.props;r&&r(t,n)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s,removeEmptyOptionalObjects:o}=this.props;let{formData:a}=this.state;if(n===!0&&(a=this.omitExtraData(a)),o){const{schemaUtils:l,schema:c}=this.state;a=Kt(l.getValidator(),c,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},c=r?ms(r):[];this.setState({formData:a,errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Ut({...this.state,formData:a},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=ha,idPrefix:s=da,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=t;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(t,n,r){const{translateString:i,uiSchema:s={}}=t,{fields:o,templates:a,widgets:l,formContext:c,translateString:u}=kS();return{fields:{...o,...t.fields},templates:{...a,...t.templates,ButtonTemplates:{...a.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...l,...t.widgets},rootSchema:n,formContext:t.formContext||c,schemaUtils:r,translateString:i||u,globalUiOptions:s[fi],globalFormOptions:this.getGlobalFormOptions(t),uiSchemaDefinitions:s[Pu]??{}}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=t,s=Dl(i);s[0]===""?s[0]=n:s.unshift(n);const o=s.join(r);let a=this.formElement.current.elements[o];a||(a=this.formElement.current.querySelector(`input[id^="${o}"], button[id^="${o}"]`)),a&&a.length&&(a=a[0]),a&&a.focus()}validateFormWithFormData=t=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(t),{errors:l,errorSchema:c}=n?this.mergeErrors(a,n):a,u=a.errors.length>0||n&&r;return u?(i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:c,schemaValidationErrors:a.errors,schemaValidationErrorSchema:a.errorSchema},()=>{s?s(l):console.error("Form validation failed",l)})):l.length>0?this.setState({errors:l,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!u};validateForm(){const{omitExtraData:t,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(t===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=Kt(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:t,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:c,enctype:u,acceptCharset:f,noHtml5Validate:h=!1,disabled:m,readonly:d,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:S,uiSchema:O,formData:E,errorSchema:b,fieldPathId:g,registry:v}=this.state,{SchemaField:x}=v.fields,{SubmitButton:A}=v.templates.ButtonTemplates,_=y?i:void 0,I=y||i||"form";let{[fr]:P={}}=M(O);m&&(P={...P,props:{...P.props,disabled:!0}});const T={[dt]:{[fr]:P}};return w.jsxs(I,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:c,encType:u,acceptCharset:f,noValidate:h,onSubmit:this.onSubmit,as:_,ref:this.formElement,children:[p==="top"&&this.renderErrors(v),w.jsx(x,{name:"",schema:S,uiSchema:O,errorSchema:b,fieldPathId:g,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:v,disabled:m,readonly:d}),t||w.jsx(A,{uiSchema:T,registry:v}),p==="bottom"&&this.renderErrors(v)]})}}var Xn={exports:{}},Qr={},na;function LS(){return na||(na=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(_,I){return{validate:_,compare:I}}e.fullFormats={date:t(s,o),time:t(l,c),"date-time":t(f,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:S,int32:{type:"number",validate:b},int64:{type:"number",validate:g},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(_){return _%4===0&&(_%100!==0||_%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(_){const I=r.exec(_);if(!I)return!1;const P=+I[1],T=+I[2],C=+I[3];return T>=1&&T<=12&&C>=1&&C<=(T===2&&n(P)?29:i[T])}function o(_,I){if(_&&I)return _>I?1:_<I?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(_,I){const P=a.exec(_);if(!P)return!1;const T=+P[1],C=+P[2],D=+P[3],j=P[5];return(T<=23&&C<=59&&D<=59||T===23&&C===59&&D===60)&&(!I||j!=="")}function c(_,I){if(!(_&&I))return;const P=a.exec(_),T=a.exec(I);if(P&&T)return _=P[1]+P[2]+P[3]+(P[4]||""),I=T[1]+T[2]+T[3]+(T[4]||""),_>I?1:_<I?-1:0}const u=/t|\s/i;function f(_){const I=_.split(u);return I.length===2&&s(I[0])&&l(I[1],!0)}function h(_,I){if(!(_&&I))return;const[P,T]=_.split(u),[C,D]=I.split(u),j=o(P,C);if(j!==void 0)return j||c(T,D)}const m=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(_){return m.test(_)&&d.test(_)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function S(_){return y.lastIndex=0,y.test(_)}const O=-2147483648,E=2**31-1;function b(_){return Number.isInteger(_)&&_<=E&&_>=O}function g(_){return Number.isInteger(_)}function v(){return!0}const x=/[^\\]\\Z/;function A(_){if(x.test(_))return!1;try{return new RegExp(_),!0}catch{return!1}}})(Qr)),Qr}var ei={},ra;function BS(){return ra||(ra=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=uc(),n=la(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:c,schemaCode:u,keyword:f,it:h}=a,{opts:m,self:d}=h;if(!m.validateFormats)return;const p=new t.KeywordCxt(h,d.RULES.all.format.definition,"format");p.$data?y():S();function y(){const E=l.scopeValue("formats",{ref:d.formats,code:m.code.formats}),b=l.const("fmt",n._`${E}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${b} != "object"`,n._`${b} instanceof RegExp`,n._`typeof ${b}.compare != "function"`,O(b)))}function S(){const E=p.schema,b=d.formats[E];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${f}": format "${E}" does not define "compare" function`);const g=l.scopeValue("formats",{key:E,ref:b,code:m.code.formats?n._`${m.code.formats}${n.getProperty(E)}`:void 0});a.fail$data(O(g))}function O(E){return n._`${E}.compare(${c}, ${u}) ${i[f].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=o})(ei)),ei}var ia;function WS(){return ia||(ia=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=LS(),r=BS(),i=la(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(c,u={keywords:!0})=>{if(Array.isArray(u))return l(c,u,n.fullFormats,s),c;const[f,h]=u.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],m=u.formats||n.formatNames;return l(c,m,f,h),u.keywords&&r.default(c),c};a.get=(c,u="full")=>{const h=(u==="fast"?n.fastFormats:n.fullFormats)[c];if(!h)throw new Error(`Unknown format "${c}"`);return h};function l(c,u,f,h){var m,d;(m=(d=c.opts.code).formats)!==null&&m!==void 0||(d.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const p of u)c.addFormat(p,f[p])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a})(Xn,Xn.exports)),Xn.exports}var qS=WS();const sa=Ti(qS),VS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},HS=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,KS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function GS(e,t,n={},r,i=yc,s){let o=new i({...VS,...n});return r?sa(o,r):r!==!1&&sa(o),o.addFormat("data-url",KS),o.addFormat("color",HS),o.addKeyword(ft),o.addKeyword(Ni),Array.isArray(e)&&o.addMetaSchema(e),Z(t)&&Object.keys(t).forEach(a=>{o.addFormat(a,t[a])}),s&&(o=s(o)),o}function zS(e,t="none"){return t==="all"?e:e.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=t!=="anyOf"?s?.indexOf(`/${Y}/`):void 0,a=t!=="oneOf"?s?.indexOf(`/${B}/`):void 0;let l;return o&&o>=0?l=s?.substring(0,o):a&&a>=0&&(l=s?.substring(0,a)),l&&n.find(u=>{var f;return u.message===i&&((f=u.schemaPath)===null||f===void 0?void 0:f.startsWith(l))})||n.push(r),n},[])}function YS(e=[],t,n){const r=e.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:c,parentSchema:u,...f}=i;let{message:h=""}=f,m=o.replace(/\//g,"."),d=`${m} ${h}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(S=>S);if(y.length>0)y.forEach(S=>{const O=m?`${m}.${S}`:S;let E=M(F(t,`${O.replace(/^\./,"")}`)).title;if(E===void 0){const b=c.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([S]);E=M(F(t,b)).title}if(E)h=h.replace(`'${S}'`,`'${E}'`),p=E;else{const b=F(u,[Q,S,"title"]);b&&(h=h.replace(`'${S}'`,`'${b}'`),p=b)}}),d=h;else{const S=M(F(t,`${m.replace(/^\./,"")}`)).title;if(S)d=`'${S}' ${h}`.trim(),p=S;else{const O=u?.title;O&&(d=`'${O}' ${h}`.trim(),p=O)}}return"missingProperty"in l&&(m=m?`${m}.${l.missingProperty}`:l.missingProperty),{name:a,property:m,message:h,params:l,stack:d,schemaPath:c,title:p}});return zS(r,n)}function JS(e,t,n,r,i,s,o,a){const{validationError:l}=t;let c=YS(t.errors,o,a);l&&(c=[...c,{stack:l.message}]),typeof s=="function"&&(c=s(c,o));let u=Ag(c);if(l&&(u={...u,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:u};const f=Sl(e,r,n,r,!0),h=i(f,di(f),o,u),m=Nl(h);return vn({errors:c,errorSchema:u},m)}class ZS{constructor(t,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:c}=t;this.ajv=GS(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema()}rawValidation(t,n){var r,i;let s,o;try{t[le]&&(o=this.ajv.getSchema(t[le])),o===void 0&&(o=this.ajv.compile(t)),o(n)}catch(l){s=l}let a;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(l=>{var c;["missingProperty","property"].forEach(u=>{var f;!((f=l.params)===null||f===void 0)&&f[u]&&(l.params[u]=`'${l.params[u]}'`)}),!((c=l.params)===null||c===void 0)&&c.deps&&(l.params.deps=l.params.deps.split(", ").map(u=>`'${u}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(l=>{var c;["missingProperty","property"].forEach(u=>{var f;!((f=l.params)===null||f===void 0)&&f[u]&&(l.params[u]=l.params[u].slice(1,-1))}),!((c=l.params)===null||c===void 0)&&c.deps&&(l.params.deps=l.params.deps.split(", ").map(u=>u.slice(1,-1)).join(", "))})),a=o.errors||void 0,o.errors=null),{errors:a,validationError:s}}validateFormData(t,n,r,i,s){const o=this.rawValidation(n,t);return JS(this,o,t,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(t){var n,r;const i=(n=t[le])!==null&&n!==void 0?n:pa;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):fe(t,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,n,r){var i;try{this.handleSchemaUpdate(r);const s=ys(t),o=(i=s[le])!==null&&i!==void 0?i:bg(s);let a;return a=this.ajv.getSchema(o),a===void 0&&(a=this.ajv.addSchema(s,o).getSchema(o)||this.ajv.compile(s)),a(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function XS(e={},t){return new ZS(e,t)}const ov=XS();export{ft as A,ov as B,iv as D,sv as F,Zl as R,V0 as S,te as T,q as a,At as b,dg as c,Nt as d,ds as e,Pl as f,M as g,ec as h,Fl as i,Hn as j,ju as k,hg as l,Og as m,us as n,as as o,ng as p,tg as q,jl as r,ar as s,hs as t,_t as u,ls as v,fg as w,xl as x,$n as y,eg as z};
|