decocms 4.523.2 → 4.524.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-BiggFcjT.js → ActiveShapeUtils-gwLrBsiR.js} +1 -1
- package/dist/client/assets/{AlertCircle-DuL_FFHx.js → AlertCircle-COLuN3Qe.js} +1 -1
- package/dist/client/assets/{AreaChart-CwzHmgIC.js → AreaChart-Dud7jvcC.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D94SnK45.js → ArrowLeft-BYNlToA0.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dn7IgtbA.js → ArrowUp-CRFAWnPc.js} +1 -1
- package/dist/client/assets/{BarChart-cNHCiDCi.js → BarChart-JFNliGSV.js} +1 -1
- package/dist/client/assets/{Building02-BmRvdezs.js → Building02-DinMBe3_.js} +1 -1
- package/dist/client/assets/{CartesianChart-iNB7Klro.js → CartesianChart-Cjgu2ECY.js} +1 -1
- package/dist/client/assets/{CategoricalChart-C1fCYXI1.js → CategoricalChart-Bx8yFu23.js} +1 -1
- package/dist/client/assets/{CheckCircle-BCzuQhZn.js → CheckCircle-DCMOdEuL.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CxqUMZg6.js → ChevronSelectorVertical-Dwu4Nr-2.js} +1 -1
- package/dist/client/assets/{ChevronUp-DWUYL4oz.js → ChevronUp-4EkxqYyz.js} +1 -1
- package/dist/client/assets/{Copy01-B5Qm_DvO.js → Copy01-Tog1jA1S.js} +1 -1
- package/dist/client/assets/{CreditCard01-8EhoJBRm.js → CreditCard01-B7MC6SfH.js} +1 -1
- package/dist/client/assets/{DotsVertical-BmVaGWAg.js → DotsVertical-qUaZHjqd.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-7FUCCj8N.js → ErrorBarContext-C1p765z-.js} +1 -1
- package/dist/client/assets/{Globe04-KfEeo3Pn.js → Globe04-CGEgYyKw.js} +1 -1
- package/dist/client/assets/{Image01-KdUybmWt.js → Image01-CW7Pcq-W.js} +1 -1
- package/dist/client/assets/{Key01-6z52NoNj.js → Key01-D_nzK0xg.js} +1 -1
- package/dist/client/assets/{Link01-oKshySD_.js → Link01-CpcYQ7Qt.js} +1 -1
- package/dist/client/assets/{LinkBroken01-edPm2SIJ.js → LinkBroken01-Ctb4MZUK.js} +1 -1
- package/dist/client/assets/{Minus-BvqQFZHP.js → Minus-DoRDGpun.js} +1 -1
- package/dist/client/assets/{Monitor01-DZmeiH6p.js → Monitor01-L9jyZGZ2.js} +1 -1
- package/dist/client/assets/{Play-3WH9Ikap.js → Play-Du5BNsRy.js} +1 -1
- package/dist/client/assets/{Plus-D3sv1Vc5.js → Plus-BfnmJh1R.js} +1 -1
- package/dist/client/assets/{ReferenceLine-D2o1nZW0.js → ReferenceLine-DCCnHWMQ.js} +1 -1
- package/dist/client/assets/{SearchMd-DzFzOALq.js → SearchMd-JUAl7Zv6.js} +1 -1
- package/dist/client/assets/{Sector-DlWxPN8J.js → Sector-DL6Ad47o.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B1nTczbE.js → ShoppingBag01-usYkWunw.js} +1 -1
- package/dist/client/assets/{Sun-D5qn9wPg.js → Sun-B7TolJAG.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DQQsmdwN.js → SwitchHorizontal01-DcP8c_x_.js} +1 -1
- package/dist/client/assets/{Tool01-Bhj-QHDu.js → Tool01-Bon-ixH5.js} +1 -1
- package/dist/client/assets/{Trash01-DT07olaT.js → Trash01-cH2tYIUn.js} +1 -1
- package/dist/client/assets/{Upload01-BocTk920.js → Upload01-Bo60o4T6.js} +1 -1
- package/dist/client/assets/{UserSquare-zP4-JvXz.js → UserSquare-DsAVH788.js} +1 -1
- package/dist/client/assets/{Users01-DfLHZjoX.js → Users01-Bo_9DitT.js} +1 -1
- package/dist/client/assets/{XClose-1FEelrZ4.js → XClose-DhoOL-T1.js} +1 -1
- package/dist/client/assets/{ZoomOut-DH4NDKgS.js → ZoomOut-B1U_CHeD.js} +1 -1
- package/dist/client/assets/access-gate-CGDwkzkf.js +1 -0
- package/dist/client/assets/{add-connection-dialog-B9X2bENr.js → add-connection-dialog-8gQOdlVv.js} +1 -1
- package/dist/client/assets/agent-analytics-Bd5QSkcr.js +1 -0
- package/dist/client/assets/agent-app-DSGhLy_N.js +1 -0
- package/dist/client/assets/agent-assets-Q4lV98mF.js +1 -0
- package/dist/client/assets/agent-automation-Dsupi3DF.js +20 -0
- package/dist/client/assets/agent-automations-BonoDEyJ.js +1 -0
- package/dist/client/assets/agent-calendar-WpcQ_E3l.js +1 -0
- package/dist/client/assets/agent-connect-sources-C0oR1IIZ.js +1 -0
- package/dist/client/assets/agent-deck-Y0SX6UB9.js +1 -0
- package/dist/client/assets/agent-e2e-nbY2lllw.js +1 -0
- package/dist/client/assets/agent-experiments-XS7LGaQh.js +1 -0
- package/dist/client/assets/agent-file-DKmgj6b-.js +1 -0
- package/dist/client/assets/agent-hosting-BC5YnVoX.js +1 -0
- package/dist/client/assets/agent-icon-CVEMdYFU.js +1 -0
- package/dist/client/assets/agent-library-CYxkIVFl.js +1 -0
- package/dist/client/assets/agent-library-file-DPhxbUtG.js +1 -0
- package/dist/client/assets/agent-monitor-C01cwPL-.js +1 -0
- package/dist/client/assets/agent-overview-DU1IP4XS.js +1 -0
- package/dist/client/assets/agent-releases-BuXXsH8W.js +2 -0
- package/dist/client/assets/agent-settings-B7CchDfJ.js +1 -0
- package/dist/client/assets/{agent-site-editor-Ccqk13sk.js → agent-site-editor-DSqJlDXx.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-uiPbclqT.js +2 -0
- package/dist/client/assets/agent-site-editor-content-B9B2SztQ.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CQGXtn5w.js +1 -0
- package/dist/client/assets/agent-view-BNK8YJ86.js +1 -0
- package/dist/client/assets/{agent-view-guard-BQQDslge.js → agent-view-guard-Bvqt9A7d.js} +1 -1
- package/dist/client/assets/agents-list-BV-RY6eO.js +1 -0
- package/dist/client/assets/{ai-providers-DZoJeRvf.js → ai-providers-D8opLVHp.js} +2 -2
- package/dist/client/assets/{alert-SHlQi_f5.js → alert-CYZdSIKq.js} +1 -1
- package/dist/client/assets/analytics-sections-BqhdlzKZ.js +1 -0
- package/dist/client/assets/analytics-tab-BWgFTW72.js +2 -0
- package/dist/client/assets/api-keys-Dj50tYQ9.js +1 -0
- package/dist/client/assets/api-keys-MofJBQfW.js +1 -0
- package/dist/client/assets/app-editor-BcJaA3eR.js +1 -0
- package/dist/client/assets/{asset-utils-B48ApnSg.js → asset-utils-DcPLl2K6.js} +1 -1
- package/dist/client/assets/{auth--QyNLTbP.js → auth-CEIITB7d.js} +1 -1
- package/dist/client/assets/{auth-catchall-9FBGni3X.js → auth-catchall-CEBn1SGS.js} +1 -1
- package/dist/client/assets/{auth-entry-Bb0XRefn.js → auth-entry-iXHgBQJV.js} +1 -1
- package/dist/client/assets/{auth-split-layout-aJ5w9glJ.js → auth-split-layout-CsXqgaOS.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D2Ooe96m.js → authenticate-and-persist-oauth-CN-ocXe3.js} +1 -1
- package/dist/client/assets/automation-list-row-JOMePUFR.js +1 -0
- package/dist/client/assets/automation-runs-KPGkDZAM.js +1 -0
- package/dist/client/assets/automations-BTtfVGNa.js +1 -0
- package/dist/client/assets/{autosend-CUttN5XY.js → autosend-CbkP_bEt.js} +1 -1
- package/dist/client/assets/{badge-DVaine1x.js → badge-DeNt4-FX.js} +1 -1
- package/dist/client/assets/{block-document-Dsg6Fb4A.js → block-document-BzAW7wGZ.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-DrgIe1RS.js → blocks-preview-workspace-context-aUwmyorT.js} +1 -1
- package/dist/client/assets/blocks-tab-states-PBqE8hLO.js +1 -0
- package/dist/client/assets/blog-schema-BYLQdC9S.js +1 -0
- package/dist/client/assets/buckets-CFL4z0d-.js +1 -0
- package/dist/client/assets/build-improve-prompt-doc-BpkVMxpg.js +2 -0
- package/dist/client/assets/{calendar-CpwMOIuL.js → calendar-GMyXKkbA.js} +1 -1
- package/dist/client/assets/campaigns-view-iaGM9YLd.js +1 -0
- package/dist/client/assets/{capability-load-error-DvFhO1Pk.js → capability-load-error-juzFeQ-_.js} +1 -1
- package/dist/client/assets/category-editor-lTx7E71S.js +1 -0
- package/dist/client/assets/{cdn-tab-9Pvplnml.js → cdn-tab-QH34WF_J.js} +1 -1
- package/dist/client/assets/{chart-DMJIFNic.js → chart-D9k22T0E.js} +1 -1
- package/dist/client/assets/{chat-context-DwIrrO5r.js → chat-context-C56OVvQP.js} +7 -7
- package/dist/client/assets/{chat-draft-stAhUvyw.js → chat-draft-DNgi8tda.js} +1 -1
- package/dist/client/assets/{checkbox-aTYJ3HOV.js → checkbox-B6N4ay58.js} +1 -1
- package/dist/client/assets/choose-editor-CcEH03W4.js +1 -0
- package/dist/client/assets/{cli-auth-success-CuJJaXpQ.js → cli-auth-success-CkyWspHU.js} +1 -1
- package/dist/client/assets/{client-icons-Du3qqcxN.js → client-icons-DyjyTud6.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CjDcV3Uq.js +1 -0
- package/dist/client/assets/{collapsible-Btd20NT7.js → collapsible-D3gNdr7N.js} +1 -1
- package/dist/client/assets/collection-detail-D66AIxA0.js +1 -0
- package/dist/client/assets/collection-display-button-C28fH98T.js +1 -0
- package/dist/client/assets/{collection-search-C3Qx3Y9p.js → collection-search-BIuQ3VPN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BzK9w_p-.js → collection-table-wrapper-7w5ciWB4.js} +1 -1
- package/dist/client/assets/{collection-tabs-D5iCdwPv.js → collection-tabs-m2567Q_Z.js} +1 -1
- package/dist/client/assets/{column-rules-UU8JLygo.js → column-rules-DsLrWs5p.js} +2 -2
- package/dist/client/assets/{combobox-PWtcP6b2.js → combobox-BEVN0Tvl.js} +1 -1
- package/dist/client/assets/{command-Dqne3j1N.js → command-N9BazZHl.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-kvftD547.js → companion-mcps-section-BQyuFD3F.js} +1 -1
- package/dist/client/assets/{config-CJdQI2Ik.js → config-BmN9tmsx.js} +1 -1
- package/dist/client/assets/{connect-CaOmDTIh.js → connect-CefgSXIv.js} +3 -3
- package/dist/client/assets/{connect-layout-Dx_3veD9.js → connect-layout-CUTmKBkE.js} +1 -1
- package/dist/client/assets/connect-source-dialog-CBjVXCAe.js +1 -0
- package/dist/client/assets/{connection-DJp1XqBL.js → connection-CQKYiXol.js} +1 -1
- package/dist/client/assets/{connection-card-CwHoa3H_.js → connection-card-CvmG6XsV.js} +1 -1
- package/dist/client/assets/connection-detail-BloLauxz.js +1 -0
- package/dist/client/assets/{connection-form-helpers-BThulWcJ.js → connection-form-helpers-ytOA1Nl6.js} +1 -1
- package/dist/client/assets/connections-BxS3FS9g.js +1 -0
- package/dist/client/assets/content-tab-BwyJP-DI.js +22 -0
- package/dist/client/assets/context-BakNzIE5.js +1 -0
- package/dist/client/assets/{context-menu-Bsyqk_Km.js → context-menu-C4h1P6Vl.js} +1 -1
- package/dist/client/assets/{context-shell-DFZc3RTT.js → context-shell-BxB7W0br.js} +5 -5
- package/dist/client/assets/{core.esm-BRS9Ks9b.js → core.esm-BYOMVmVh.js} +1 -1
- package/dist/client/assets/create-organization-dialog-DqU6G9od.js +1 -0
- package/dist/client/assets/{daily-pulse-BqDvmnPn.js → daily-pulse-BlxIy31E.js} +1 -1
- package/dist/client/assets/discover-DMRyKZWE.js +1 -0
- package/dist/client/assets/{domain-settings-jCTqOxdl.js → domain-settings-Cj-cRa8T.js} +1 -1
- package/dist/client/assets/{drawer-DePU4o02.js → drawer-B7ajVnwC.js} +1 -1
- package/dist/client/assets/{editor-wUI_HNkS.js → editor-B7sIq_vQ.js} +1 -1
- package/dist/client/assets/{editor-classes-B3UoGQQP.js → editor-classes-BinXFbFk.js} +1 -1
- package/dist/client/assets/{empty-state-cJTBr2cU.js → empty-state-Cc_qF1X6.js} +1 -1
- package/dist/client/assets/{empty-state-W9_vBymb.js → empty-state-RpLaBfip.js} +1 -1
- package/dist/client/assets/experiments-tab-BlgfPezU.js +1 -0
- package/dist/client/assets/experiments-tab-choice-DZqY092h.js +1 -0
- package/dist/client/assets/{extract-connection-data-DFv9Bgl-.js → extract-connection-data-ClMH8dL9.js} +1 -1
- package/dist/client/assets/{feature-gate-B4srxCCI.js → feature-gate-Wo8Dn-M0.js} +1 -1
- package/dist/client/assets/{feature-paywall-CnDJ3rvy.js → feature-paywall-C1_xpbwO.js} +1 -1
- package/dist/client/assets/file-explorer-DCgzwH3u.js +2 -0
- package/dist/client/assets/{file-preview-bA4ayYHL.js → file-preview-DFHvVsCR.js} +1 -1
- package/dist/client/assets/{file-share-button-BLIlQQod.js → file-share-button-DMtXDXf3.js} +2 -2
- package/dist/client/assets/{file-type-icon-DTTBg-Cp.js → file-type-icon-may_hs3N.js} +1 -1
- package/dist/client/assets/{folder-icon-I00h66JN.js → folder-icon-DREaQWIx.js} +2 -2
- package/dist/client/assets/{form-KgHP-Hpi.js → form-Gz8fbLdb.js} +1 -1
- package/dist/client/assets/general-DBULqBSQ.js +1 -0
- package/dist/client/assets/held-block-view-DTUWWRfL.js +20 -0
- package/dist/client/assets/home-DnXsGhyo.js +1 -0
- package/dist/client/assets/{icon-button-uPrtYnSE.js → icon-button-TQkFyvqB.js} +1 -1
- package/dist/client/assets/{index-D4ru75Fc.js → index-B9NLvHLf.js} +1 -1
- package/dist/client/assets/index-BEX8cmtV.js +1 -0
- package/dist/client/assets/index-BGcfYf5c.js +4 -0
- package/dist/client/assets/index-BNmzMNlZ.js +253 -0
- package/dist/client/assets/{index-CvNALbEH.js → index-BNtuHmZB.js} +2 -2
- package/dist/client/assets/{index-BfC50J0F.js → index-C6_m0mjP.js} +1 -1
- package/dist/client/assets/{index-XCP5r1I_.js → index-CaH8ekvn.js} +1 -1
- package/dist/client/assets/{index-Cbee4-AB.js → index-CqFACk2B.js} +3 -3
- package/dist/client/assets/{index-BX1aT4SZ.js → index-DENKa8lW.js} +6 -6
- package/dist/client/assets/{index-DdXWXy9i.js → index-DNHxXhrW.js} +9 -9
- package/dist/client/assets/{index-DqOQgVM6.js → index-DgWAoWIc.js} +1 -1
- package/dist/client/assets/{index-CDrRsU-I.js → index-DusHyRie.js} +1 -1
- package/dist/client/assets/{index-DKUcI8bc.js → index-bf-OLKAU.js} +1 -1
- package/dist/client/assets/{index-DL_9Zurb.js → index-iynQP1if.js} +1 -1
- package/dist/client/assets/{index-WWkbzoL4.js → index-kd3fyZ9a.js} +1 -1
- package/dist/client/assets/{index-redirect-BQkqIeGD.js → index-redirect-DAPRiYQw.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-6MK6GS3o.js → infiniteQueryObserver-ClGIthQz.js} +1 -1
- package/dist/client/assets/{infra-billing-3yuTy4Pj.js → infra-billing-Bn8rlKTp.js} +1 -1
- package/dist/client/assets/{input-BY2tBiEb.js → input-BS4EACP3.js} +7 -7
- package/dist/client/assets/{input-BUcDagSA.js → input-DZSiMfCa.js} +1 -1
- package/dist/client/assets/{integration-icon-BwzO3Wq9.js → integration-icon-BrTM8z-s.js} +1 -1
- package/dist/client/assets/{jira-icon-g2GVH5bw.js → jira-icon-CvveHm37.js} +1 -1
- package/dist/client/assets/{label-CG_DMVpg.js → label-BCxqhVIq.js} +1 -1
- package/dist/client/assets/{layout-CsbDSI6l.js → layout-C_-T37yU.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-HN0h-Vgf.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-CS4Abpwd.js → legacy-main-redirect-HqwAGFUC.js} +1 -1
- package/dist/client/assets/library-D2Mrm5WM.js +1 -0
- package/dist/client/assets/{login-DW5wI5H0.js → login-D25rkjo_.js} +1 -1
- package/dist/client/assets/{markdown-D5ryQAkZ.js → markdown-P8cO0xLZ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BYcHi_da.js → mcp-app-renderer-CKUvsXnq.js} +2 -2
- package/dist/client/assets/{mcp-oauth-Bn5p4oSU.js → mcp-oauth-C9hLQucs.js} +1 -1
- package/dist/client/assets/{mcp-oauth-4UvGlLYO.js → mcp-oauth-DBMA8wIh.js} +1 -1
- package/dist/client/assets/members-C_tx9w5g.js +1 -0
- package/dist/client/assets/{memory-FU3t5-1z.js → memory-CsXGZJq1.js} +2 -2
- package/dist/client/assets/{mini-report-page-BBST8cjq.js → mini-report-page-DGZYey3l.js} +1 -1
- package/dist/client/assets/{mock-board-igDH_YVZ.js → mock-board-BWzTY2k-.js} +5 -5
- package/dist/client/assets/{monaco-editor-eDEJF7LD.js → monaco-editor-CBJkBgIU.js} +2 -2
- package/dist/client/assets/monitoring-BLnrFAQj.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-D5LuoYp3.js → monitoring-stats-row-vWHUOUB3.js} +1 -1
- package/dist/client/assets/{multi-select-DYiX5KEM.js → multi-select-BNfLnIfI.js} +1 -1
- package/dist/client/assets/mustache-Crsi4VAX.js +4 -0
- package/dist/client/assets/{named-rule-uses-BrQiTKM3.js → named-rule-uses-D5gjZwOp.js} +1 -1
- package/dist/client/assets/named-rule-view-BVCpec2I.js +1 -0
- package/dist/client/assets/{new-project-dialog-B9qWs4Pr.js → new-project-dialog-BzJmdXI6.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dtw5ILTB.js → oauth-callback-CwZ-b3nE.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BSRRr6Yq.js → oauth-callback-ai-provider-CujNNAU2.js} +1 -1
- package/dist/client/assets/onboarding-Csy3KW6h.js +1 -0
- package/dist/client/assets/openai-conversation-DJfgyA82.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-CU6JI5UK.js → optimistic-project-sidebar-views-XzUayXF_.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D7HisKzI.js → order-monitor-day-BUk1fjA6.js} +1 -1
- package/dist/client/assets/organization-choice-BG-EMl8L.js +1 -0
- package/dist/client/assets/orgs-BOi51Yxa.js +1 -0
- package/dist/client/assets/page-seo-form-D4gneorY.js +1 -0
- package/dist/client/assets/{pair-9h1O_BO7.js → pair-Dh_1oqHi.js} +8 -8
- package/dist/client/assets/parse-sections-B30A8ECY.js +1 -0
- package/dist/client/assets/plan-BXu8SQ3T.js +1 -0
- package/dist/client/assets/{plan-ladder-Dz8bCoAd.js → plan-ladder-CN5p5ylK.js} +1 -1
- package/dist/client/assets/{popover-Cdz7pgAQ.js → popover-DauDBkON.js} +1 -1
- package/dist/client/assets/post-calendar-Ceopsk1u.js +1 -0
- package/dist/client/assets/post-editor-BChaRDNt.js +2 -0
- package/dist/client/assets/{preview-content-BNxnqe7O.js → preview-content-BvhoJjFR.js} +1 -1
- package/dist/client/assets/{preview-dialog-tDLXXdPQ.js → preview-dialog-iRKqzeeN.js} +1 -1
- package/dist/client/assets/{preview-panel-D04CDEWQ.js → preview-panel-DcbhbW1H.js} +1 -1
- package/dist/client/assets/preview-tab-ClK0lOMy.js +551 -0
- package/dist/client/assets/{product-picker-dialog-B9YEPxMK.js → product-picker-dialog-CsTqbwXT.js} +1 -1
- package/dist/client/assets/profile-DE1V4tEF.js +1 -0
- package/dist/client/assets/project-app-view-BpeI5cMf.js +1 -0
- package/dist/client/assets/{project-apps-nQXtEtz0.js → project-apps-CNRV3DAE.js} +1 -1
- package/dist/client/assets/project-feed-BcaTqzKD.js +1 -0
- package/dist/client/assets/{project-icon-BqAOVSaG.js → project-icon-9kbQzXfH.js} +1 -1
- package/dist/client/assets/project-reports-DZCmLCmE.js +1 -0
- package/dist/client/assets/project-tasks-D6qNETK3.js +1 -0
- package/dist/client/assets/projects-Kz2HQD_e.js +1 -0
- package/dist/client/assets/{projects-empty-state-dd0PXzD2.js → projects-empty-state-Df7eS0pA.js} +1 -1
- package/dist/client/assets/{prompts-C-zf2EeW.js → prompts-B4KLkb4I.js} +1 -1
- package/dist/client/assets/record-editor-C5XOx_LV.js +1 -0
- package/dist/client/assets/redirect-editor-BxKT3ntE.js +1 -0
- package/dist/client/assets/releases-api-BDl7LEw1.js +1 -0
- package/dist/client/assets/{reports-Dvk3psp8.js → reports-Cp14zg57.js} +1 -1
- package/dist/client/assets/reports-DBFNTtm-.js +1 -0
- package/dist/client/assets/reports-onboarding-D2UqC4mS.js +1 -0
- package/dist/client/assets/reports-tab-C51R-6vi.js +2 -0
- package/dist/client/assets/repositories-C77B6dOt.js +1 -0
- package/dist/client/assets/repositories-CHKGn0VU.js +1 -0
- package/dist/client/assets/repository-binding-BZ7FmJ0X.js +1 -0
- package/dist/client/assets/{repository-import-picker-B0yxPI2j.js → repository-import-picker-Bjws7k2-.js} +1 -1
- package/dist/client/assets/repository-picker-DkvIZLAj.js +1 -0
- package/dist/client/assets/{require-capability-BFyuzPqV.js → require-capability-Bm5pde_M.js} +1 -1
- package/dist/client/assets/{required-auth-layout--9OrAOrr.js → required-auth-layout-Dn8nNstE.js} +1 -1
- package/dist/client/assets/{reset-password-C3K9ZZ2t.js → reset-password-CHMCFAp9.js} +1 -1
- package/dist/client/assets/{resizable-BqY6-uYR.js → resizable-BYZDi11K.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-H3Wty7u7.js → resolve-tab-icon-DLcHhSBW.js} +1 -1
- package/dist/client/assets/review-settings-DEFTQSp0.js +1 -0
- package/dist/client/assets/roles-BIj8m30-.js +1 -0
- package/dist/client/assets/route-CwIKlFpH.js +1 -0
- package/dist/client/assets/route-DQxiKHs8.js +1 -0
- package/dist/client/assets/route-L2EzRsks.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CXn37zMt.js → sandbox-lifecycle-context-DMfngoi-.js} +1 -1
- package/dist/client/assets/{schema-D2gJoNK3.js → schema-DEyBWI2y.js} +1 -1
- package/dist/client/assets/{schema-D5kxh02n.js → schema-DoiqvTL7.js} +1 -1
- package/dist/client/assets/{scroll-area-DvfamsPF.js → scroll-area-Cfsm1vBV.js} +1 -1
- package/dist/client/assets/search-input-DBKkXR0y.js +1 -0
- package/dist/client/assets/{search-toggle-CdGIHwQK.js → search-toggle-CzYTwp_L.js} +1 -1
- package/dist/client/assets/secret-ciphertext-cTA7BSVY.js +1 -0
- package/dist/client/assets/secret-picker-CqxG24X7.js +1 -0
- package/dist/client/assets/secrets-CtByih4R.js +1 -0
- package/dist/client/assets/{sections-p-TiUqOZ.js → sections-CCcpB_PT.js} +1 -1
- package/dist/client/assets/sections-editor-DpO_mTF7.js +1 -0
- package/dist/client/assets/{select-DAagAjcm.js → select-CTAm_W2d.js} +1 -1
- package/dist/client/assets/{select-model-DMBmIlHh.js → select-model-Cvj2OnbU.js} +1 -1
- package/dist/client/assets/seo-editor-BPToAJRY.js +1 -0
- package/dist/client/assets/{separator-Caw0JVLD.js → separator-BeYssz5V.js} +1 -1
- package/dist/client/assets/settings-tab-BRtykuoH.js +1 -0
- package/dist/client/assets/{sheet-BHsKOUfF.js → sheet-C52S-h6R.js} +1 -1
- package/dist/client/assets/shell-layout-DYY0I41_.js +1 -0
- package/dist/client/assets/site-draft-actions-DwqQ-cQC.js +12 -0
- package/dist/client/assets/site-draft-view-CiKU2Icp.js +2 -0
- package/dist/client/assets/site-editor-CuXmo07G.js +1 -0
- package/dist/client/assets/site-editor-toast-CT4NtD1f.js +1 -0
- package/dist/client/assets/skills-_WDetSCi.js +1 -0
- package/dist/client/assets/{slider-D9yxsjlo.js → slider-rNbrBC-4.js} +1 -1
- package/dist/client/assets/{sortable.esm-B7h1ef6s.js → sortable.esm-Cw5kBwgn.js} +1 -1
- package/dist/client/assets/sso-DSG3YPMw.js +1 -0
- package/dist/client/assets/{suggestion-CMN-fEG6.js → suggestion-Dd_Uy5Bv.js} +2 -2
- package/dist/client/assets/{switch-DpD3lo_J.js → switch-nUFQi60k.js} +1 -1
- package/dist/client/assets/{symbol-Hd-wRYbC.js → symbol-C3kEOGZ_.js} +1 -1
- package/dist/client/assets/synced-repos-DBmibobg.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-XxQjDugr.js → tab-icon-glyph-Bzpngl6a.js} +1 -1
- package/dist/client/assets/{table-Cc4crfQ0.js → table-CxQHf5NT.js} +1 -1
- package/dist/client/assets/{tabs-BpLvUwhr.js → tabs-BwD6LFyC.js} +1 -1
- package/dist/client/assets/task-assignee-avatar-Bg9ijzoY.js +1 -0
- package/dist/client/assets/{task-board-M_bY8eys.js → task-board-DreQgJBj.js} +1 -1
- package/dist/client/assets/{task-route-Cz8IMljw.js → task-route-B6QYswnx.js} +1 -1
- package/dist/client/assets/{task-status-D4WkmdQN.js → task-status-DcCdeelW.js} +1 -1
- package/dist/client/assets/taskboard-analytics-C_aUAX7S.js +1 -0
- package/dist/client/assets/tasks-CYY9XlJ3.js +4 -0
- package/dist/client/assets/tasks-CeouZ3tS.js +1 -0
- package/dist/client/assets/{textarea--yDYOLyf.js → textarea-y7TWtoua.js} +1 -1
- package/dist/client/assets/thread-analytics-BD8n1a8E.js +1 -0
- package/dist/client/assets/{thread-intent-DSZI851P.js → thread-intent-cB2EtHpg.js} +6 -6
- package/dist/client/assets/thread-route-Cr5f3jw8.js +1 -0
- package/dist/client/assets/{thread-route-BLXCdzrT.js → thread-route-D01w_vQB.js} +1 -1
- package/dist/client/assets/thread-sheet-body-C0IyWshl.js +1 -0
- package/dist/client/assets/{time-range-picker-C3BbzoOH.js → time-range-picker-bp6BeGMC.js} +1 -1
- package/dist/client/assets/toggle-group-BIu6qfZV.js +1 -0
- package/dist/client/assets/{tool-namespace-CzQWuXDV.js → tool-namespace-Crbzrqv8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-7gQeG_XH.js → toolbar-icon-button-ByMmG3VL.js} +1 -1
- package/dist/client/assets/{tooltip-rhtdmPcj.js → tooltip-DibJz0Jl.js} +1 -1
- package/dist/client/assets/{tooltipContext-Db2Lu1qi.js → tooltipContext-BzrsG1UN.js} +1 -1
- package/dist/client/assets/track-C-8tVJFa.js +1 -0
- package/dist/client/assets/{types-s41XNAq6.js → types-BdOsWOEi.js} +9 -9
- package/dist/client/assets/{url-slug-DQ6KErQd.js → url-slug-CPCergXm.js} +1 -1
- package/dist/client/assets/{usage-stats-DBiTgJdn.js → usage-stats-DDafRqWC.js} +7 -7
- package/dist/client/assets/{use-ai-providers-DeyDa8Td.js → use-ai-providers-Bsehd5pg.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-CeNTU7vM.js +1 -0
- package/dist/client/assets/{use-automations-CAga8LHD.js → use-automations-BscjsX1o.js} +1 -1
- package/dist/client/assets/use-autosave-D0y0c0lt.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-P4eOAh0Q.js → use-chat-layout-state-DpOxQYv4.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DKd3Khi0.js → use-clock-tick-jRUiEK1v.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CXaOPPYN.js → use-connect-companion-BGtpVGmA.js} +1 -1
- package/dist/client/assets/use-connection-CAR6Cxbr.js +1 -0
- package/dist/client/assets/{use-content-sync-D83lTU1r.js → use-content-sync-bYlxy6np.js} +1 -1
- package/dist/client/assets/{use-copy-D2ar5QXj.js → use-copy-Dpm_jhm-.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C5_jirS7.js → use-create-virtual-mcp-DcCX7uo7.js} +1 -1
- package/dist/client/assets/use-date-fns-locale-hUyExEVb.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-QgHKWEfB.js → use-debounced-autosave-By6os5xD.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CNkh6EY5.js → use-debounced-value-BtR2lyTj.js} +1 -1
- package/dist/client/assets/use-deco-credits-DRIA1g3T.js +1 -0
- package/dist/client/assets/{use-decopilot-events-DGj-wEwB.js → use-decopilot-events-C4OBhauN.js} +1 -1
- package/dist/client/assets/use-delete-connection-BM5PcuGQ.js +1 -0
- package/dist/client/assets/{use-deployment-admin-CR9n1OEp.js → use-deployment-admin-BmDeutjQ.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DKL4b1dE.js → use-fast-preview-draft-url-BUDoPHon.js} +1 -1
- package/dist/client/assets/{use-file-configs-D3Cv6-L2.js → use-file-configs-CuVchUT-.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CVakZcHF.js → use-inbox-feed-Bi03vVLM.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DcjLDU4h.js → use-infinite-scroll-0YRynoMy.js} +1 -1
- package/dist/client/assets/use-join-requests-BhMSzUBO.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-QcdwwtJ8.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DX7pkWco.js → use-mcp-auth-status-Ddp-NElL.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BYbk6jXo.js → use-mcp-client-ClU7gdfw.js} +10 -10
- package/dist/client/assets/{use-mcp-prompts-B78UkAZ_.js → use-mcp-prompts-CFFfSPcj.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-COs5QQOc.js → use-mcp-tools-CsGOzrhW.js} +1 -1
- package/dist/client/assets/{use-mobile-19frZVl2.js → use-mobile-nW9hYb6L.js} +1 -1
- package/dist/client/assets/use-move-blocks-BKlQlSno.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-Bh4JZJoL.js → use-navigate-to-agent-CvuO-uuz.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CUDKmO6U.js → use-open-billing-url-6zduD8ZA.js} +1 -1
- package/dist/client/assets/{use-org-fs-BFFpcHJy.js → use-org-fs-BcT14y41.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C29Ouwht.js → use-org-repo-syncs-BdTpYW4-.js} +1 -1
- package/dist/client/assets/{use-org-sso-BlWFmoCA.js → use-org-sso-DdzTjSOo.js} +1 -1
- package/dist/client/assets/use-organization-roles-DQlsWqEE.js +1 -0
- package/dist/client/assets/{use-organization-settings-XPH6XBPi.js → use-organization-settings-DeXdcCtZ.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BKTq-N_H.js → use-panel-navigate-BrjENNrA.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-aJpFnShz.js → use-project-native-view-presence-OgGOYaV4.js} +1 -1
- package/dist/client/assets/{use-project-scope-hi480z1p.js → use-project-scope-DryffHrf.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DII4SRHf.js → use-recent-apps-CMgGjBH4.js} +1 -1
- package/dist/client/assets/{use-releases-GaRydy_l.js → use-releases-BQePeR_j.js} +1 -1
- package/dist/client/assets/use-reports-diagnostic-KZB3C_26.js +1 -0
- package/dist/client/assets/{use-sandbox-events-CsNrKmda.js → use-sandbox-events-ClbDdVRn.js} +2 -2
- package/dist/client/assets/{use-secrets-DJcOfixK.js → use-secrets-Cjihb12f.js} +1 -1
- package/dist/client/assets/use-section-preview-base-go9VMYa4.js +1 -0
- package/dist/client/assets/use-session-runtime-CQOTzbKn.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-8USbBI0-.js → use-sidebar-collapsed-CUSnfCt-.js} +1 -1
- package/dist/client/assets/{use-tags-DvW8yrHX.js → use-tags-CMyUN8Qd.js} +1 -1
- package/dist/client/assets/use-task-board-analytics-BWzR51Kh.js +1 -0
- package/dist/client/assets/{use-task-board-events-De3JY1Pe.js → use-task-board-events-DlFBtyOL.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CXzTAmMM.js → use-task-board-item-prs-D9Aj6NRX.js} +1 -1
- package/dist/client/assets/{use-task-metadata-9cyD8qGI.js → use-task-metadata-DcdDwiSS.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DltmG-kv.js → use-thread-analytics-cLhxQI8B.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BKCBvLqB.js → use-thread-outputs-D8Bvo55q.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DWVaUM2t.js +1 -0
- package/dist/client/assets/useQueries-B8DPRYfS.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-6Ovi3jRe.js +1 -0
- package/dist/client/assets/users-BIP3dsuH.js +1 -0
- package/dist/client/assets/{utils-BnP8cv1B.js → utils-DeFulDMz.js} +1 -1
- package/dist/client/assets/variant-calendar-C37bfPDk.js +1 -0
- package/dist/client/assets/variant-matcher-override-B4pYtxaz.js +1 -0
- package/dist/client/assets/{virtual-mcp-B8cZ7VfA.js → virtual-mcp-D_aBBfQL.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DYaS1vyu.js → watch-sse-pool-Bk0Yni6j.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +783 -783
- package/package.json +1 -1
- package/dist/client/assets/User01-BqHvPhUP.js +0 -1
- package/dist/client/assets/access-gate-DyUtzmE9.js +0 -1
- package/dist/client/assets/agent-analytics-vIfEsYvC.js +0 -1
- package/dist/client/assets/agent-app-BrsqSpps.js +0 -1
- package/dist/client/assets/agent-assets-Cmwamjo6.js +0 -1
- package/dist/client/assets/agent-automation-DTP-nUve.js +0 -20
- package/dist/client/assets/agent-automations-DMzq_O24.js +0 -1
- package/dist/client/assets/agent-calendar-XJ6NXM0R.js +0 -1
- package/dist/client/assets/agent-connect-sources-BcRlDvxt.js +0 -1
- package/dist/client/assets/agent-deck-DDf8uIAO.js +0 -1
- package/dist/client/assets/agent-e2e-C9yo2VIy.js +0 -1
- package/dist/client/assets/agent-experiments-CBXMu_zo.js +0 -1
- package/dist/client/assets/agent-file-NVbz9x8-.js +0 -1
- package/dist/client/assets/agent-hosting--zgA3Vth.js +0 -1
- package/dist/client/assets/agent-icon-B_vqhfDt.js +0 -1
- package/dist/client/assets/agent-library-DnuSkP9c.js +0 -1
- package/dist/client/assets/agent-library-file-BvLizRc3.js +0 -1
- package/dist/client/assets/agent-monitor-rNkT_MKe.js +0 -1
- package/dist/client/assets/agent-overview-5SBfPz9h.js +0 -1
- package/dist/client/assets/agent-releases-Ln3sIMtS.js +0 -2
- package/dist/client/assets/agent-settings-D6bOK1ga.js +0 -1
- package/dist/client/assets/agent-site-editor-code-0Vxgov65.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CoS3vIfM.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-7txrWBOo.js +0 -1
- package/dist/client/assets/agent-view-C8DZj3zZ.js +0 -1
- package/dist/client/assets/agents-list-CUtOSk6b.js +0 -1
- package/dist/client/assets/alert-dialog-Bjihy8X7.js +0 -7
- package/dist/client/assets/analytics-sections-B_qn34eY.js +0 -1
- package/dist/client/assets/analytics-tab-DluP6EHx.js +0 -2
- package/dist/client/assets/api-keys-B5pbeuIW.js +0 -1
- package/dist/client/assets/api-keys-DRbQ6j-D.js +0 -1
- package/dist/client/assets/app-editor-l5QnxgXk.js +0 -1
- package/dist/client/assets/automation-list-row-DfibF1_j.js +0 -1
- package/dist/client/assets/automation-runs-CzCUPkiw.js +0 -1
- package/dist/client/assets/automations-CEr5Md2h.js +0 -1
- package/dist/client/assets/avatar-C5-kxiV_.js +0 -1
- package/dist/client/assets/blocks-tab-states-DSvvcfKU.js +0 -1
- package/dist/client/assets/blog-schema-7PNm5SA8.js +0 -1
- package/dist/client/assets/buckets-B99EVfxO.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Dx-5MdwQ.js +0 -2
- package/dist/client/assets/campaigns-view-_4Aj2Qex.js +0 -1
- package/dist/client/assets/category-editor-Bz5Ohuf6.js +0 -1
- package/dist/client/assets/choose-editor-BpBHfKld.js +0 -1
- package/dist/client/assets/cms-settings-editor-DgOpqRn9.js +0 -1
- package/dist/client/assets/collection-detail-B4JsebMy.js +0 -1
- package/dist/client/assets/collection-display-button-BFEeUD4b.js +0 -1
- package/dist/client/assets/connect-source-dialog-BucnBQV1.js +0 -1
- package/dist/client/assets/connection-detail-BUrc4tQa.js +0 -1
- package/dist/client/assets/connections-UgNbDD55.js +0 -1
- package/dist/client/assets/content-tab-BzJzqdaq.js +0 -22
- package/dist/client/assets/context-BQ17H5cY.js +0 -1
- package/dist/client/assets/create-organization-dialog-4e3oT20D.js +0 -1
- package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
- package/dist/client/assets/discover-Du9d6I7b.js +0 -1
- package/dist/client/assets/experiments-tab-BGSl9C7j.js +0 -1
- package/dist/client/assets/experiments-tab-choice-C5L5-OKs.js +0 -1
- package/dist/client/assets/file-explorer-CSFyTcCU.js +0 -2
- package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
- package/dist/client/assets/general-DDniHgaA.js +0 -1
- package/dist/client/assets/home-BRa0QePQ.js +0 -1
- package/dist/client/assets/index-BSPqDg2b.js +0 -243
- package/dist/client/assets/index-BV9YjMM8.js +0 -4
- package/dist/client/assets/index-CoCFpkNq.js +0 -1
- package/dist/client/assets/legacy-agents-deep-D4dQPRbz.js +0 -1
- package/dist/client/assets/library-CvZRvu0t.js +0 -1
- package/dist/client/assets/members-DV5nm69j.js +0 -1
- package/dist/client/assets/monitoring-L8Ph-qIO.js +0 -1
- package/dist/client/assets/mustache-DcAMNVPe.js +0 -4
- package/dist/client/assets/named-rule-view-DPJVdujZ.js +0 -1
- package/dist/client/assets/onboarding-CJ1-Q27q.js +0 -1
- package/dist/client/assets/openai-conversation-rJmL2Chq.js +0 -3
- package/dist/client/assets/organization-choice-B3HKKRFg.js +0 -1
- package/dist/client/assets/orgs-BGahARMX.js +0 -1
- package/dist/client/assets/page-seo-form-BiLzLwOU.js +0 -1
- package/dist/client/assets/parse-sections-DS7cH63b.js +0 -1
- package/dist/client/assets/plan-TS8UDjIx.js +0 -1
- package/dist/client/assets/post-calendar-BVj47Msq.js +0 -1
- package/dist/client/assets/post-editor-C7Epq6Gf.js +0 -2
- package/dist/client/assets/preview-tab-CstRd2P8.js +0 -551
- package/dist/client/assets/profile-HCYVLr3x.js +0 -1
- package/dist/client/assets/project-app-view-CsgTKaq6.js +0 -1
- package/dist/client/assets/project-feed-CSKm059T.js +0 -1
- package/dist/client/assets/project-reports-N6Np5HVd.js +0 -1
- package/dist/client/assets/project-tasks-hQ8mdw3x.js +0 -1
- package/dist/client/assets/projects-BR95BuCh.js +0 -1
- package/dist/client/assets/record-editor-gFz45d56.js +0 -1
- package/dist/client/assets/redirect-editor-DPpKBLYS.js +0 -1
- package/dist/client/assets/releases-api-CSVCy8ox.js +0 -1
- package/dist/client/assets/reports-BVHdd1DX.js +0 -1
- package/dist/client/assets/reports-onboarding-UQrdSX_1.js +0 -1
- package/dist/client/assets/reports-tab-ppUXZsCY.js +0 -2
- package/dist/client/assets/repositories-5RxDBg9o.js +0 -1
- package/dist/client/assets/repositories-DZ7Jj2ky.js +0 -1
- package/dist/client/assets/repository-binding-BPraGDH6.js +0 -1
- package/dist/client/assets/repository-picker-C8ArkEMp.js +0 -1
- package/dist/client/assets/review-settings-CdVHPED2.js +0 -1
- package/dist/client/assets/roles-OamyC7La.js +0 -1
- package/dist/client/assets/route-C9Fxdgiw.js +0 -1
- package/dist/client/assets/route-CwPF8ORe.js +0 -1
- package/dist/client/assets/route-u0GAyBX0.js +0 -1
- package/dist/client/assets/runnable-block-editor-Bp72FsGX.js +0 -20
- package/dist/client/assets/search-input-5CsF8kzc.js +0 -1
- package/dist/client/assets/secret-ciphertext-DjJJ47rv.js +0 -1
- package/dist/client/assets/secret-picker-BO4uK8to.js +0 -1
- package/dist/client/assets/secrets-D1oNMOlx.js +0 -1
- package/dist/client/assets/sections-editor-DR2QTs_8.js +0 -4
- package/dist/client/assets/seo-editor-_CrgKo3u.js +0 -1
- package/dist/client/assets/settings-tab-CXub7dpW.js +0 -1
- package/dist/client/assets/shell-layout-CnFOD7IR.js +0 -1
- package/dist/client/assets/site-draft-actions-DahX0dKS.js +0 -12
- package/dist/client/assets/site-draft-view-D6OUnR3H.js +0 -2
- package/dist/client/assets/site-editor-FcBrQD_V.js +0 -1
- package/dist/client/assets/site-editor-toast-CrL8-myE.js +0 -1
- package/dist/client/assets/skills-dBhtb1Gn.js +0 -1
- package/dist/client/assets/sso-K3rjig-T.js +0 -1
- package/dist/client/assets/synced-repos-Dnzg3gpT.js +0 -1
- package/dist/client/assets/task-assignee-avatar-ZgHLf6ou.js +0 -1
- package/dist/client/assets/taskboard-analytics-BkUf4gRJ.js +0 -1
- package/dist/client/assets/tasks-CAS-CTER.js +0 -4
- package/dist/client/assets/tasks-qaZFyecx.js +0 -1
- package/dist/client/assets/thread-analytics-DUGo9IpI.js +0 -1
- package/dist/client/assets/thread-route-GuSmOAXN.js +0 -1
- package/dist/client/assets/thread-sheet-body-BFLCqyyQ.js +0 -1
- package/dist/client/assets/toggle-group-6nw88m-B.js +0 -1
- package/dist/client/assets/track-CZFERlEy.js +0 -1
- package/dist/client/assets/use-apply-named-rule-CTNrtoG8.js +0 -1
- package/dist/client/assets/use-autosave-BhBt5LM5.js +0 -1
- package/dist/client/assets/use-connection-CjozY_rG.js +0 -1
- package/dist/client/assets/use-date-fns-locale-QW50a7Gw.js +0 -1
- package/dist/client/assets/use-deco-credits-B57v3A_1.js +0 -1
- package/dist/client/assets/use-delete-connection-C8eU1V0w.js +0 -1
- package/dist/client/assets/use-join-requests-Cbj3PHUb.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-CO8s8ZiU.js +0 -1
- package/dist/client/assets/use-members-Dyl3oSqD.js +0 -1
- package/dist/client/assets/use-move-blocks-DJK_Y1io.js +0 -1
- package/dist/client/assets/use-org-auth-client-Dw_o5R0I.js +0 -1
- package/dist/client/assets/use-organization-roles-DaU1N-it.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-BCaZjPYS.js +0 -1
- package/dist/client/assets/use-section-preview-base-BqthfvXx.js +0 -1
- package/dist/client/assets/use-session-runtime-GSil35TM.js +0 -1
- package/dist/client/assets/use-task-board-analytics-CzI79mN4.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BMw5-0ES.js +0 -1
- package/dist/client/assets/useQueries-MmC9BfTO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BzZNrnpe.js +0 -1
- package/dist/client/assets/users-DwCtEgjJ.js +0 -1
- package/dist/client/assets/variant-calendar-2sbluJx7.js +0 -1
- package/dist/client/assets/variant-matcher-override-BuVYz4je.js +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import{fY as ke,c$ as Zs,aH as L,aY as _e,bV as Lt,c_ as es,bX as we,cY as Or,d1 as Ve,bW as Su,fZ as pn,aG as ae,f_ as ts,f$ as Xs,g0 as wu,d4 as ju,g1 as Wa,g2 as Ou,g3 as Au,g4 as Eu,cT as Ha,cx as Cu,cL as _u,cX as Iu,cZ as Fr,er as Tu,c as je,j as h,P as Nu,n as Qs,a2 as ns,a as Pu,b as nt,an as Fu,t as mr,cv as rs,r as N,g5 as Ga,cw as $u,g6 as Du,ej as Ru,bv as Ka,bt as is,el as ku,em as Mu,en as Uu,bw as Lu,bx as Bu,by as qu,ep as Vu,bD as $r,bB as ss,eo as zu,bE as Ii,eq as Ya,dp as Wu,bQ as Ja,bJ as Hu,bU as Gu,l as os,x as Ku,eH as Yu,af as Ju,I as Zu,B as Dr,h as as,d as Xu,H as Qu,fL as ed}from"./index-BSPqDg2b.js";import{E as Za}from"./empty-state-cJTBr2cU.js";import{b as td,d as nd,n as rd,A as Xa,S as id,C as sd,u as od}from"./use-mcp-client-BYbk6jXo.js";import{b as ad}from"./use-mcp-tools-COs5QQOc.js";import{A as Qa,a as ld}from"./agent-icon-B_vqhfDt.js";import{i as cd}from"./Key01-6z52NoNj.js";import{b as ud,u as dd,c as fd}from"./use-connection-CjozY_rG.js";import{U as On,b as Qr,c as eo}from"./auth--QyNLTbP.js";import{e as hd}from"./extract-connection-data-DFv9Bgl-.js";import{s as md}from"./Plus-D3sv1Vc5.js";import{S as pd,b as gd,a as yd,d as bd,c as xd}from"./select-DAagAjcm.js";import{R as to}from"./index-DqOQgVM6.js";import{a as vd,T as Sd,R as wd,b as jd}from"./index-BfC50J0F.js";import{_ as Bt}from"./index-WWkbzoL4.js";import{a as Od,b as Ad,P as Ed}from"./popover-Cdz7pgAQ.js";import{a as Cd,T as _d,b as Id,c as Td}from"./tooltip-rhtdmPcj.js";import{b as Nd}from"./repository-binding-BPraGDH6.js";import{i as Pd}from"./SearchMd-DzFzOALq.js";import{u as Fd}from"./use-mobile-19frZVl2.js";import{u as $d}from"./use-create-virtual-mcp-C5_jirS7.js";import{a as Dd}from"./schema-D2gJoNK3.js";var Rd=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||_e();i instanceof pn&&(t.number=i.int())}}},kd=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=Ve(n):typeof n=="number"?t.number=Ve(n):typeof n=="boolean"?t.boolean=Ve(n):n===null?t.null=es():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Md=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?es():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return Ve(t[0]);if(e==="string")return Su(t);if(e==="number"){const[n,r,...i]=t;return Or([Ve(n),Ve(r),...i.map(s=>Ve(s))])}return e==="boolean"?Or([Ve(!0),Ve(!1)]):!1}},Ud=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=Eu();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)),t.file=r,t.string=!1}}},Ld=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=L())}},Bd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||L();r instanceof ts&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},qd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||L();r instanceof ts&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Vd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||L();if(r instanceof ts){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},zd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.min(n.minimum))}}},Wd=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.max(n.maximum))}}},Hd=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},Gd=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},Kd=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.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}`}))}}},Yd=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=we(ke()))}},Jd=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||we(ke())).min(n.minItems))}},Zd=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||we(ke())).max(n.maxItems))}},Xd=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||we(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=we(r);if(t.array&&t.array instanceof wu){const s=t.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))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||we(ke()):t.array=we(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||we(ke()):n.prefixItems&&(t.array=t.array||we(ke()))}},Qd=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=Xs([]):i=Xs(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},ef=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||ae({}).passthrough())}},tf=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=ae({}).passthrough())}},nf=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||ae({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},rf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||ae({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Wn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>Wn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Wn(t[i],e[i]))}return!1}function sf(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Wn(n,i))?!1:(e.push(n),!0))}}function Ar(t,e){return t.safeParse(e).success}var of=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Ar(n,r),{message:"Value must not match the 'not' schema"})}},af=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(sf(),{message:"Array items must be unique"})}},lf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Wa(r,i),t)}},cf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Or([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Wa(t,n)}},uf=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Ie(r));return t.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"})}},df=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Ar(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(!Ar(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},ff=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof Ou||t instanceof Au){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 t.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"})}},hf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Wn(r,i)),{message:"Value must match one of the enum values"})}},mf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>Wn(r,n),{message:"Value must equal the const value"})}},pf=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},gf=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:ke().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},yf=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)Ar(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},bf=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},xf=[new kd,new Md,new Rd,new Ud,new Ld,new Yd,new tf,new Bd,new qd,new Vd,new zd,new Wd,new Hd,new Gd,new Kd,new Qd,new Jd,new Zd,new Xd,new nf,new rf,new ef],vf=[new gf,new hf,new mf,new lf,new cf,new uf,new df,new ff,new yf,new of,new af,new bf,new pf];function Ie(t){if(typeof t=="boolean")return t?ke():Zs();const e={};for(const i of xf)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||L()),e.number!==!1&&n.push(e.number||_e()),e.boolean!==!1&&n.push(e.boolean||Lt()),e.null!==!1&&n.push(e.null||es()),e.array!==!1&&n.push(e.array||we(ke())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=ju(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=Zs():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Or(n):r=ke();for(const i of vf)r=i.apply(r,t);return r}class no extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(ro(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(ro(this),n)}}function Sf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function Ti(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(Ti).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${Ti(t.cause)}`:t.message:`${t}`}function ro(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var el=t=>{throw TypeError(t)},ls=(t,e,n)=>e.has(t)||el("Cannot "+n),Z=(t,e,n)=>(ls(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?el("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pe=(t,e,n,r)=>(ls(t,e,"write to private field"),e.set(t,n),n),ot=(t,e,n)=>(ls(t,e,"access private method"),n),Pe,Pt,Jt,pr,Er,Rn,en,kn,bt,Zt,sn,Xt,Tn,qe,Ni,Pi,Fi,io,$i,Di,Nn,Ri,ki;class gr extends EventTarget{constructor(e,n){var r,i;super(),ve(this,qe),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ve(this,Pe),ve(this,Pt),ve(this,Jt),ve(this,pr),ve(this,Er),ve(this,Rn),ve(this,en),ve(this,kn,null),ve(this,bt),ve(this,Zt),ve(this,sn,null),ve(this,Xt,null),ve(this,Tn,null),ve(this,Pi,async s=>{var o;Z(this,Zt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){ot(this,qe,Nn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?pe(this,Jt,new URL(s.url)):pe(this,Jt,void 0),c!==200){ot(this,qe,Nn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){ot(this,qe,Nn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.OPEN);const d=new Event("open");if((o=Z(this,Tn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){ot(this,qe,Nn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const m=new TextDecoder,g=a.getReader();let f=!0;do{const{done:p,value:y}=await g.read();y&&Z(this,Zt).feed(m.decode(y,{stream:!p})),p&&(f=!1,Z(this,Zt).reset(),ot(this,qe,Ri).call(this))}while(f)}),ve(this,Fi,s=>{pe(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&ot(this,qe,Ri).call(this,Ti(s))}),ve(this,$i,s=>{typeof s.id=="string"&&pe(this,kn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:Z(this,Jt)?Z(this,Jt).origin:Z(this,Pt).origin,lastEventId:s.id||""});Z(this,Xt)&&(!s.event||s.event==="message")&&Z(this,Xt).call(this,o),this.dispatchEvent(o)}),ve(this,Di,s=>{pe(this,Rn,s)}),ve(this,ki,()=>{pe(this,en,void 0),Z(this,Pe)===this.CONNECTING&&ot(this,qe,Ni).call(this)});try{if(e instanceof URL)pe(this,Pt,e);else if(typeof e=="string")pe(this,Pt,new URL(e,wf()));else throw new Error("Invalid URL")}catch{throw Sf("An invalid or illegal string was specified")}pe(this,Zt,td({onEvent:Z(this,$i),onRetry:Z(this,Di)})),pe(this,Pe,this.CONNECTING),pe(this,Rn,3e3),pe(this,Er,(r=n?.fetch)!=null?r:globalThis.fetch),pe(this,pr,(i=n?.withCredentials)!=null?i:!1),ot(this,qe,Ni).call(this)}get readyState(){return Z(this,Pe)}get url(){return Z(this,Pt).href}get withCredentials(){return Z(this,pr)}get onerror(){return Z(this,sn)}set onerror(e){pe(this,sn,e)}get onmessage(){return Z(this,Xt)}set onmessage(e){pe(this,Xt,e)}get onopen(){return Z(this,Tn)}set onopen(e){pe(this,Tn,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){Z(this,en)&&clearTimeout(Z(this,en)),Z(this,Pe)!==this.CLOSED&&(Z(this,bt)&&Z(this,bt).abort(),pe(this,Pe,this.CLOSED),pe(this,bt,void 0))}}Pe=new WeakMap,Pt=new WeakMap,Jt=new WeakMap,pr=new WeakMap,Er=new WeakMap,Rn=new WeakMap,en=new WeakMap,kn=new WeakMap,bt=new WeakMap,Zt=new WeakMap,sn=new WeakMap,Xt=new WeakMap,Tn=new WeakMap,qe=new WeakSet,Ni=function(){pe(this,Pe,this.CONNECTING),pe(this,bt,new AbortController),Z(this,Er)(Z(this,Pt),ot(this,qe,io).call(this)).then(Z(this,Pi)).catch(Z(this,Fi))},Pi=new WeakMap,Fi=new WeakMap,io=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Z(this,kn)?{"Last-Event-ID":Z(this,kn)}:void 0},cache:"no-store",signal:(t=Z(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},$i=new WeakMap,Di=new WeakMap,Nn=function(t,e){var n;Z(this,Pe)!==this.CLOSED&&pe(this,Pe,this.CLOSED);const r=new no("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r)},Ri=function(t,e){var n;if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.CONNECTING);const r=new no("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r),pe(this,en,setTimeout(Z(this,ki),Z(this,Rn)))},ki=new WeakMap,gr.CONNECTING=0,gr.OPEN=1,gr.CLOSED=2;function wf(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class jf extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class Of{constructor(e,n){this._url=e,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=nd(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new On("No auth provider");let e;try{e=await Qr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new On;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=rd(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new gr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=eo(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 jf(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=Ha.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(e){if(!this._authProvider)throw new On("No auth provider");if(await Qr(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new On("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){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(e),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}=eo(i);if(this._resourceMetadataUrl=o,this._scope=a,await Qr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new On;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const Af="mcp";class Ef{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,Af),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=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Ha.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}function Cf(){const t=new Xa({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return Cu(t),t}class _f{#e=Cf();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=If(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(e,i),i}}function If(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const Tf=new _f;var so;(function(t){t.Completable="McpCompletable"})(so||(so={}));class Nf extends id{constructor(e,n){super(e,n)}send(e,n){const r=Pf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function Pf(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Ff extends sd{constructor(e,n){super(e,{jsonSchemaValidator:Tf,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},_u,n)}}const $f=async(t,e,n)=>{const r=Df(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Ff({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Df=(t,e,n)=>{if(t.type==="Websocket")return new Ef(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new Of(new URL(t.url),s)}return new Nf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},oo=t=>{try{return JSON.parse(t)}catch{return t}},Rf=500,Ft=new Map;function kf(t,e){if(Ft.set(t,e),Ft.size>Rf){const n=Ft.keys().next().value;n!==void 0&&Ft.delete(n)}}const ao=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Ie(t.inputSchema):void 0,outputSchema:t.outputSchema?Ie(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function Mf(t){const e=n=>"connection"in t?$f({connection:t.connection},void 0,n):t.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=t?.debugId?.(),d=u?{"x-trace-debug-id":u}:void 0,{client:m}=await e(d),{structuredContent:g,isError:f,content:p}=await m.callTool({name:String(c),arguments:l});if(f){const v=p?.[0]?.text,w=typeof v=="string"?oo(v):null,A=w?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(w.code,w.message,w.traceId):null;throw A||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?oo(y):void 0}async function s(){const{client:l}=await e(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in t))return s();const l=t.connection,c=JSON.stringify(l);try{return Ft.has(c)||kf(c,s()),await Ft.get(c)}catch(u){console.error("Failed to list tools",u),Ft.delete(c);return}}async function a(){return(await o()??[]).map(c=>ao(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 ao(c,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>lo({connection:n}):e==="forClient"?n=>lo({client:n}):globalThis[e]}});function lo(t){return Mf(t)}function Uf(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const Lf=ae({specversion:Ve("1.0").describe("CloudEvents specification version"),id:L().describe("Unique identifier for this event (UUID recommended)"),source:L().describe("Connection ID of the event publisher"),type:L().describe("Event type (e.g., 'order.created', 'user.signup')"),time:L().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:L().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:L().optional().default("application/json").describe("Content type of the data attribute"),dataschema:L().url().optional().describe("URI to the schema for the data attribute"),data:Iu().optional().describe("Event payload (any JSON value)")});ae({events:we(Lf).min(1).describe("Batch of CloudEvents to process")});const Bf=ae({success:Lt().optional().describe("Whether this event was processed successfully"),error:L().optional().describe("Error message for this event"),retryAfter:_e().int().positive().optional().describe("Re-deliver this event after this many ms")});ae({success:Lt().optional().describe("Batch success - applies to events not in results"),error:L().optional().describe("Batch error message - applies to events not in results"),processedCount:_e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:_e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Fr(L(),Bf).optional().describe("Per-event results keyed by event ID")});const qf=ae({type:Ve("string"),enum:we(L()).optional(),description:L().optional()}),Vf=ae({type:L(),description:L(),paramsSchema:Fr(L(),qf)});ae({});ae({triggers:we(Vf)});ae({type:L(),params:Fr(L(),L()),enabled:Lt(),callbackUrl:Tu().optional(),callbackToken:L().min(1).optional()});ae({success:Lt()});ae({prefix:L().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:_e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:L().optional().describe("Token for pagination from previous response"),delimiter:L().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});ae({objects:we(ae({key:L().describe("Object key/path"),size:_e().describe("Object size in bytes"),lastModified:L().describe("Last modified timestamp"),etag:L().describe("Entity tag for the object")})),nextContinuationToken:L().optional().describe("Token for fetching next page of results"),isTruncated:Lt().describe("Whether there are more results available"),commonPrefixes:we(L()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});ae({key:L().describe("Object key/path to get metadata for")});ae({contentType:L().optional().describe("MIME type of the object"),contentLength:_e().describe("Size of the object in bytes"),lastModified:L().describe("Last modified timestamp"),etag:L().describe("Entity tag for the object"),metadata:Fr(L(),L()).optional().describe("Custom metadata key-value pairs")});ae({key:L().describe("Object key/path to generate URL for"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});ae({url:L().describe("Presigned URL for downloading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});ae({key:L().describe("Object key/path for the upload"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:L().optional().describe("MIME type for the object being uploaded")});ae({url:L().describe("Presigned URL for uploading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});ae({key:L().describe("Object key/path to delete")});ae({success:Lt().describe("Whether the deletion was successful"),key:L().describe("The key that was deleted")});ae({keys:we(L()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});ae({deleted:we(L()).describe("Array of successfully deleted keys"),errors:we(ae({key:L(),message:L()})).describe("Array of errors for failed deletions")});const zf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Wf(t){if(t)return zf[t]}function yO(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return Uf(i).isImplementedBy(r)}function bO(t){const e=je.c(7),{children:n,leading:r}=t;let i;e[0]!==r?(i=r&&h.jsx(Nu.Toolbar.Left.Portal,{fallback:r,children:r}),e[0]=r,e[1]=i):i=e[1];let s;e[2]!==n?(s=h.jsx(Qs.Content,{children:n}),e[2]=n,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o=h.jsxs(Qs,{children:[i,s]}),e[4]=i,e[5]=s,e[6]=o):o=e[6],o}function Hf(){const t=je.c(9),{org:e}=ns(),{data:n}=Pu.useSession(),r=ud(),i=nt(),s=Fu();let o;t[0]!==r.create||t[1]!==e||t[2]!==n||t[3]!==s||t[4]!==i?(o=async c=>{if(!e||!n?.user?.id){mr.error(i("details.mcpConfigurationForm.notAuthenticated"));return}const{item:u}=await s.call("COLLECTION_REGISTRY_APP_GET",{name:c});if(!u){mr.error(i("details.mcpConfigurationForm.registryItemNotFound",{bindingType:c}));return}const d=hd(u,e.id,n.user.id),m=d.connection_type==="STDIO",g=!!d.connection_url,f=m&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!g&&!f){mr.error(i("details.mcpConfigurationForm.registryItemNotConnectable"));return}return await r.create.mutateAsync(d),{id:d.id,connection:d}},t[0]=r.create,t[1]=e,t[2]=n,t[3]=s,t[4]=i,t[5]=o):o=t[5];const a=o;let l;return t[6]!==r.create.isPending||t[7]!==a?(l={installByBinding:a,isInstalling:r.create.isPending},t[6]=r.create.isPending,t[7]=a,t[8]=l):l=t[8],l}function V(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function Gf(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),V(t.additionalItems)}function co(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const at="__additional_property",tn="additionalProperties",Ot="allOf",Q="anyOf",Ne="const",Dt="default",cs="dependencies",Kf="enum",Ee="__errors",de="$id",us="if",an="items",Yf="_$junk_option_schema_id$_",yr="$name",W="oneOf",Mi="patternProperties",se="properties",ei="readonly",tl="required",Cr="submitButtonOptions",ue="$ref",Mn="__rjsf_ref",Pn="$schema",nl="root",rl="_",Jf=["discriminator","propertyName"],uo="formContext",Zf="layoutGridLookupMap",ds="__rjsf_additionalProperties",il="__rjsf_rootSchema",Xf="ui:field",fs="ui:widget",vt="ui:options",Ui="ui:globalOptions",Qf="ui:definitions",eh="https://json-schema.org/draft/2019-09/schema",br="https://json-schema.org/draft/2020-12/schema";function M(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===fs&&V(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&V(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function sl(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=M(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var ol=typeof global=="object"&&global&&global.Object===Object&&global,th=typeof self=="object"&&self&&self.Object===Object&&self,rt=ol||th||Function("return this")(),Me=rt.Symbol,al=Object.prototype,nh=al.hasOwnProperty,rh=al.toString,An=Me?Me.toStringTag:void 0;function ih(t){var e=nh.call(t,An),n=t[An];try{t[An]=void 0;var r=!0}catch{}var i=rh.call(t);return r&&(e?t[An]=n:delete t[An]),i}var sh=Object.prototype,oh=sh.toString;function ah(t){return oh.call(t)}var lh="[object Null]",ch="[object Undefined]",fo=Me?Me.toStringTag:void 0;function ct(t){return t==null?t===void 0?ch:lh:fo&&fo in Object(t)?ih(t):ah(t)}function ll(t,e){return function(n){return t(e(n))}}var Rr=ll(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var uh="[object Object]",dh=Function.prototype,fh=Object.prototype,cl=dh.toString,hh=fh.hasOwnProperty,mh=cl.call(Object);function At(t){if(!Ue(t)||ct(t)!=uh)return!1;var e=Rr(t);if(e===null)return!0;var n=hh.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&cl.call(n)==mh}function Li(t){const e={[Ee]:[],addError(n){this[Ee].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:Li(r)}),e);if(At(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:Li(n[i])}),e)}return e}var Se=Array.isArray,ph="[object Symbol]";function Qn(t){return typeof t=="symbol"||Ue(t)&&ct(t)==ph}var gh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yh=/^\w*$/;function hs(t,e){if(Se(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Qn(t)?!0:yh.test(t)||!gh.test(t)||e!=null&&t in Object(e)}function te(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var bh="[object AsyncFunction]",xh="[object Function]",vh="[object GeneratorFunction]",Sh="[object Proxy]";function er(t){if(!te(t))return!1;var e=ct(t);return e==xh||e==vh||e==bh||e==Sh}var ti=rt["__core-js_shared__"],ho=(function(){var t=/[^.]+$/.exec(ti&&ti.keys&&ti.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function wh(t){return!!ho&&ho in t}var jh=Function.prototype,Oh=jh.toString;function qt(t){if(t!=null){try{return Oh.call(t)}catch{}try{return t+""}catch{}}return""}var Ah=/[\\^$.*+?()[\]{}|]/g,Eh=/^\[object .+?Constructor\]$/,Ch=Function.prototype,_h=Object.prototype,Ih=Ch.toString,Th=_h.hasOwnProperty,Nh=RegExp("^"+Ih.call(Th).replace(Ah,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ph(t){if(!te(t)||wh(t))return!1;var e=er(t)?Nh:Eh;return e.test(qt(t))}function Fh(t,e){return t?.[e]}function Vt(t,e){var n=Fh(t,e);return Ph(n)?n:void 0}var Hn=Vt(Object,"create");function $h(){this.__data__=Hn?Hn(null):{},this.size=0}function Dh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Rh="__lodash_hash_undefined__",kh=Object.prototype,Mh=kh.hasOwnProperty;function Uh(t){var e=this.__data__;if(Hn){var n=e[t];return n===Rh?void 0:n}return Mh.call(e,t)?e[t]:void 0}var Lh=Object.prototype,Bh=Lh.hasOwnProperty;function qh(t){var e=this.__data__;return Hn?e[t]!==void 0:Bh.call(e,t)}var Vh="__lodash_hash_undefined__";function zh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Hn&&e===void 0?Vh:e,this}function Rt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Rt.prototype.clear=$h;Rt.prototype.delete=Dh;Rt.prototype.get=Uh;Rt.prototype.has=qh;Rt.prototype.set=zh;function Wh(){this.__data__=[],this.size=0}function tr(t,e){return t===e||t!==t&&e!==e}function kr(t,e){for(var n=t.length;n--;)if(tr(t[n][0],e))return n;return-1}var Hh=Array.prototype,Gh=Hh.splice;function Kh(t){var e=this.__data__,n=kr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Gh.call(e,n,1),--this.size,!0}function Yh(t){var e=this.__data__,n=kr(e,t);return n<0?void 0:e[n][1]}function Jh(t){return kr(this.__data__,t)>-1}function Zh(t,e){var n=this.__data__,r=kr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ut(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ut.prototype.clear=Wh;ut.prototype.delete=Kh;ut.prototype.get=Yh;ut.prototype.has=Jh;ut.prototype.set=Zh;var Gn=Vt(rt,"Map");function Xh(){this.size=0,this.__data__={hash:new Rt,map:new(Gn||ut),string:new Rt}}function Qh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Mr(t,e){var n=t.__data__;return Qh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function em(t){var e=Mr(this,t).delete(t);return this.size-=e?1:0,e}function tm(t){return Mr(this,t).get(t)}function nm(t){return Mr(this,t).has(t)}function rm(t,e){var n=Mr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=Xh;dt.prototype.delete=em;dt.prototype.get=tm;dt.prototype.has=nm;dt.prototype.set=rm;var im="Expected a function";function ms(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(im);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(ms.Cache||dt),n}ms.Cache=dt;var sm=500;function om(t){var e=ms(t,function(r){return n.size===sm&&n.clear(),r}),n=e.cache;return e}var am=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lm=/\\(\\)?/g,ul=om(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(am,function(n,r,i,s){e.push(i?s.replace(lm,"$1"):r||n)}),e});function gn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var mo=Me?Me.prototype:void 0,po=mo?mo.toString:void 0;function dl(t){if(typeof t=="string")return t;if(Se(t))return gn(t,dl)+"";if(Qn(t))return po?po.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ps(t){return t==null?"":dl(t)}function yn(t,e){return Se(t)?t:hs(t,e)?[t]:ul(ps(t))}function Et(t){if(typeof t=="string"||Qn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Ur(t,e){e=yn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Et(e[n++])];return n&&n==r?t:void 0}function D(t,e,n){var r=t==null?void 0:Ur(t,e);return r===void 0?n:r}const{getOwnPropertyNames:cm,getOwnPropertySymbols:um}=Object,{hasOwnProperty:dm}=Object.prototype;function ni(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function cr(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=t(n,r,i);return s.delete(n),s.delete(r),l}}function go(t){return cm(t).concat(um(t))}const fm=Object.hasOwn||((t,e)=>dm.call(t,e)),hm="__v",mm="__o",pm="_owner",{getOwnPropertyDescriptor:yo,keys:bo}=Object,zt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function gm(t,e){return t===e}function ym(t,e){return t.byteLength===e.byteLength&&_r(new Uint8Array(t),new Uint8Array(e))}function bm(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function xm(t,e){return t.byteLength===e.byteLength&&_r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function vm(t,e){return zt(t.getTime(),e.getTime())}function Sm(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function xo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const c=e.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(i[d]){d++;continue}const m=o.value,g=a.value;if(n.equals(m[0],g[0],l,d,t,e,n)&&n.equals(m[1],g[1],m[0],g[0],t,e,n)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}function wm(t,e,n){const r=bo(t);let i=r.length;if(bo(e).length!==i)return!1;for(;i-- >0;)if(!fl(t,e,n,r[i]))return!1;return!0}function En(t,e,n){const r=go(t);let i=r.length;if(go(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!fl(t,e,n,s)||(o=yo(t,s),a=yo(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function jm(t,e){return zt(t.valueOf(),e.valueOf())}function Om(t,e){return t.source===e.source&&t.flags===e.flags}function vo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function _r(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Am(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function fl(t,e,n,r){return(r===pm||r===mm||r===hm)&&(t.$$typeof||e.$$typeof)?!0:fm(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Em=Object.prototype.toString;function Cm(t){const e=Nm(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:c,getUnsupportedCustomComparator:u}=t;return function(m,g,f){if(m===g)return!0;if(m==null||g==null)return!1;const p=typeof m;if(p!==typeof g)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(m,g,f):p==="function"?i(m,g,f):!1;const y=m.constructor;if(y!==g.constructor)return!1;if(y===Object)return a(m,g,f);if(y===Array)return n(m,g,f);if(y===Date)return r(m,g,f);if(y===RegExp)return l(m,g,f);if(y===Map)return s(m,g,f);if(y===Set)return c(m,g,f);if(y===Promise)return!1;if(Array.isArray(m))return n(m,g,f);const v=Em.call(m),w=e[v];if(w)return w(m,g,f);const A=u&&u(m,g,f,v);return A?A(m,g,f):!1}}function _m({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:ym,areArraysEqual:n?En:bm,areDataViewsEqual:xm,areDatesEqual:vm,areErrorsEqual:Sm,areFunctionsEqual:gm,areMapsEqual:n?ni(xo,En):xo,areNumbersEqual:zt,areObjectsEqual:n?En:wm,arePrimitiveWrappersEqual:jm,areRegExpsEqual:Om,areSetsEqual:n?ni(vo,En):vo,areTypedArraysEqual:n?ni(_r,En):_r,areUrlsEqual:Am,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=cr(r.areArraysEqual),s=cr(r.areMapsEqual),o=cr(r.areObjectsEqual),a=cr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Im(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Tm({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:i})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,s)}}function Nm({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:m,areUrlsEqual:g}){return{"[object Arguments]":l,"[object Array]":e,"[object ArrayBuffer]":t,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":m,"[object BigUint64Array]":m,"[object Boolean]":c,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":m,"[object Float32Array]":m,"[object Float64Array]":m,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":m,"[object Int16Array]":m,"[object Int32Array]":m,"[object Map]":o,"[object Number]":c,"[object Object]":(f,p,y)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,y),"[object RegExp]":u,"[object Set]":d,"[object String]":c,"[object URL]":g,"[object Uint8Array]":m,"[object Uint8ClampedArray]":m,"[object Uint16Array]":m,"[object Uint32Array]":m}}ft();ft({strict:!0});ft({circular:!0});ft({circular:!0,strict:!0});ft({createInternalComparator:()=>zt});ft({strict:!0,createInternalComparator:()=>zt});ft({circular:!0,createInternalComparator:()=>zt});ft({circular:!0,createInternalComparator:()=>zt,strict:!0});function ft(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=_m(t),o=Cm(s),a=n?n(o):Im(o);return Tm({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ft({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Cn={exports:{}},ri,So;function hl(){if(So)return ri;So=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(b){let x="",S=0,j=0;for(j=0;j<b.length;j++)if(S=b[j].charCodeAt(0),S!==48){if(!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return"";x+=b[j];break}for(j+=1;j<b.length;j++){if(S=b[j].charCodeAt(0),!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return"";x+=b[j]}return x}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function l(b,x,S){if(b.length){const j=s(b);if(j!=="")x.push(j);else return S.error=!0,!1;b.length=0}return!0}function c(b){let x=0;const S={error:!1,address:"",zone:""},j=[],E=[];let C=!1,_=!1,I=l;for(let T=0;T<b.length;T++){const P=b[T];if(!(P==="["||P==="]"))if(P===":"){if(C===!0&&(_=!0),!I(E,j,S))break;if(++x>7){S.error=!0;break}T>0&&b[T-1]===":"&&(C=!0),j.push(":");continue}else if(P==="%"){if(!I(E,j,S))break;I=a}else{E.push(P);continue}}return E.length&&(I===a?S.zone=E.join(""):_?j.push(E.join("")):j.push(s(E))),S.address=j.join(""),S}function u(b){if(d(b,":")<2)return{host:b,isIPV6:!1};const x=c(b);if(x.error)return{host:b,isIPV6:!1};{let S=x.address,j=x.address;return x.zone&&(S+="%"+x.zone,j+="%25"+x.zone),{host:S,isIPV6:!0,escapedHost:j}}}function d(b,x){let S=0;for(let j=0;j<b.length;j++)b[j]===x&&S++;return S}function m(b){let x=b;const S=[];let j=-1,E=0;for(;E=x.length;){if(E===1){if(x===".")break;if(x==="/"){S.push("/");break}else{S.push(x);break}}else if(E===2){if(x[0]==="."){if(x[1]===".")break;if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&(x[1]==="."||x[1]==="/")){S.push("/");break}}else if(E===3&&x==="/.."){S.length!==0&&S.pop(),S.push("/");break}if(x[0]==="."){if(x[1]==="."){if(x[2]==="/"){x=x.slice(3);continue}}else if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&x[1]==="."){if(x[2]==="/"){x=x.slice(2);continue}else if(x[2]==="."&&x[3]==="/"){x=x.slice(3),S.length!==0&&S.pop();continue}}if((j=x.indexOf("/",1))===-1){S.push(x);break}else S.push(x.slice(0,j)),x=x.slice(j)}return S.join("")}const g={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function y(b,x){const S=x?p:f;return S.lastIndex=0,b.replace(S,j=>g[j])}function v(b,x=!1){if(b.indexOf("%")===-1)return b;let S="";for(let j=0;j<b.length;j++){if(b[j]==="%"&&j+2<b.length){const E=b.slice(j+1,j+3);if(n(E)){const C=E.toUpperCase(),_=String.fromCharCode(parseInt(C,16));x&&r(_)?S+=_:S+="%"+C,j+=2;continue}}S+=b[j]}return S}function w(b){let x="";for(let S=0;S<b.length;S++){if(b[S]==="%"&&S+2<b.length){const j=b.slice(S+1,S+3);if(n(j)){const E=j.toUpperCase(),C=String.fromCharCode(parseInt(E,16));C!=="."&&r(C)?x+=C:x+="%"+E,S+=2;continue}}i(b[S])?x+=b[S]:x+=escape(b[S])}return x}function A(b){let x="";for(let S=0;S<b.length;S++){if(b[S]==="%"&&S+2<b.length){const j=b.slice(S+1,S+3);if(n(j)){x+="%"+j.toUpperCase(),S+=2;continue}}x+=escape(b[S])}return x}function O(b){const x=[];if(b.userinfo!==void 0&&(x.push(b.userinfo),x.push("@")),b.host!==void 0){let S=unescape(b.host);if(!e(S)){const j=u(S);j.isIPV6===!0?S=`[${j.escapedHost}]`:S=y(S,!1)}x.push(S)}return(typeof b.port=="number"||typeof b.port=="string")&&(x.push(":"),x.push(String(b.port))),x.length?x.join(""):void 0}return ri={nonSimpleDomain:o,recomposeAuthority:O,reescapeHostDelimiters:y,normalizePercentEncoding:v,normalizePathEncoding:w,escapePreservingEscapes:A,removeDotSegments:m,isIPv4:e,isUUID:t,normalizeIPv6:u,stringArrayToHexStripped:s},ri}var ii,wo;function Pm(){if(wo)return ii;wo=1;const{isUUID:t}=hl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(b){return n.indexOf(b)!==-1}function i(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function s(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function o(b){const x=String(b.scheme).toLowerCase()==="https";return(b.port===(x?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function a(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function l(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[x,S]=b.resourceName.split("?");b.path=x&&x!=="/"?x:void 0,b.query=S,b.resourceName=void 0}return b.fragment=void 0,b}function c(b,x){if(!b.path)return b.error="URN can not be parsed",b;const S=b.path.match(e);if(S){const j=x.scheme||b.scheme||"urn";b.nid=S[1].toLowerCase(),b.nss=S[2];const E=`${j}:${x.nid||b.nid}`,C=O(E);b.path=void 0,C&&(b=C.parse(b,x))}else b.error=b.error||"URN can not be parsed.";return b}function u(b,x){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=x.scheme||b.scheme||"urn",j=b.nid.toLowerCase(),E=`${S}:${x.nid||j}`,C=O(E);C&&(b=C.serialize(b,x));const _=b,I=b.nss;return _.path=`${j||x.nid}:${I}`,x.skipEscape=!0,_}function d(b,x){const S=b;return S.uuid=S.nss,S.nss=void 0,!x.tolerant&&(!S.uuid||!t(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function m(b){const x=b;return x.nss=(b.uuid||"").toLowerCase(),x}const g={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:g.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},y={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},A={http:g,https:f,ws:p,wss:y,urn:{scheme:"urn",parse:c,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(A,null);function O(b){return b&&(A[b]||A[b.toLowerCase()])||void 0}return ii={wsIsSecure:i,SCHEMES:A,isValidSchemeName:r,getSchemeHandler:O},ii}var jo;function Fm(){if(jo)return Cn.exports;jo=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=hl(),{SCHEMES:c,getSchemeHandler:u}=Pm();function d(j,E){return typeof j=="string"?j=O(j,E):typeof j=="object"&&(j=A(p(j,E),E)),j}function m(j,E,C){const _=C?Object.assign({scheme:"null"},C):{scheme:"null"},I=g(A(j,_),A(E,_),_,!0);return _.skipEscape=!0,p(I,_)}function g(j,E,C,_){const I={};return _||(j=A(p(j,C),C),E=A(p(E,C),C)),C=C||{},!C.tolerant&&E.scheme?(I.scheme=E.scheme,I.userinfo=E.userinfo,I.host=E.host,I.port=E.port,I.path=e(E.path||""),I.query=E.query):(E.userinfo!==void 0||E.host!==void 0||E.port!==void 0?(I.userinfo=E.userinfo,I.host=E.host,I.port=E.port,I.path=e(E.path||""),I.query=E.query):(E.path?(E.path[0]==="/"?I.path=e(E.path):((j.userinfo!==void 0||j.host!==void 0||j.port!==void 0)&&!j.path?I.path="/"+E.path:j.path?I.path=j.path.slice(0,j.path.lastIndexOf("/")+1)+E.path:I.path=E.path,I.path=e(I.path)),I.query=E.query):(I.path=j.path,E.query!==void 0?I.query=E.query:I.query=j.query),I.userinfo=j.userinfo,I.host=j.host,I.port=j.port),I.scheme=j.scheme),I.fragment=E.fragment,I}function f(j,E,C){const _=x(j,C),I=x(E,C);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(j,E){const C={host:j.host,scheme:j.scheme,userinfo:j.userinfo,port:j.port,path:j.path,query:j.query,nid:j.nid,nss:j.nss,uuid:j.uuid,fragment:j.fragment,reference:j.reference,resourceName:j.resourceName,secure:j.secure,error:""},_=Object.assign({},E),I=[],T=u(_.scheme||C.scheme);T&&T.serialize&&T.serialize(C,_),C.path!==void 0&&(_.skipEscape?C.path=r(C.path):(C.path=s(C.path),C.scheme!==void 0&&(C.path=C.path.split("%3A").join(":")))),_.reference!=="suffix"&&C.scheme&&I.push(C.scheme,":");const P=n(C);if(P!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(P),C.path&&C.path[0]!=="/"&&I.push("/")),C.path!==void 0){let F=C.path;!_.absolutePath&&(!T||!T.absolutePath)&&(F=e(F)),P===void 0&&F[0]==="/"&&F[1]==="/"&&(F="/%2F"+F.slice(2)),I.push(F)}return C.query!==void 0&&I.push("?",C.query),C.fragment!==void 0&&I.push("#",C.fragment),I.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(j,E){if(E[2]!==void 0&&j.path&&j.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof j.port=="number"&&(j.port<0||j.port>65535))return"URI port is malformed."}function w(j,E){const C=Object.assign({},E),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;C.reference==="suffix"&&(C.scheme?j=C.scheme+":"+j:j="//"+j);const P=j.match(y);if(P){_.scheme=P[1],_.userinfo=P[3],_.host=P[4],_.port=parseInt(P[5],10),_.path=P[6]||"",_.query=P[7],_.fragment=P[8],isNaN(_.port)&&(_.port=P[5]);const F=v(_,P);if(F!==void 0&&(_.error=_.error||F,I=!0),_.host)if(a(_.host)===!1){const B=t(_.host);_.host=B.host.toLowerCase(),T=B.isIPV6}else T=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",C.reference&&C.reference!=="suffix"&&C.reference!==_.reference&&(_.error=_.error||"URI is not a "+C.reference+" reference.");const $=u(C.scheme||_.scheme);if(!C.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(C.domainHost||$&&$.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(R){_.error=_.error||"Host's domain name can not be converted to ASCII: "+R}if((!$||$&&!$.skipNormalize)&&(j.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=o(unescape(_.host),T))),_.path&&(_.path=i(_.path)),_.fragment))try{_.fragment=encodeURI(decodeURIComponent(_.fragment))}catch{_.error=_.error||"URI malformed"}$&&$.parse&&$.parse(_,C)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function A(j,E){return w(j,E).parsed}function O(j,E){return b(j,E).normalized}function b(j,E){const{parsed:C,malformedAuthorityOrPort:_}=w(j,E);return{normalized:_?j:p(C,E),malformedAuthorityOrPort:_}}function x(j,E){if(typeof j=="string"){const{normalized:C,malformedAuthorityOrPort:_}=b(j,E);return _?void 0:C}if(typeof j=="object")return p(j,E)}const S={SCHEMES:c,normalize:d,resolve:m,resolveComponent:g,equal:f,serialize:p,parse:A};return Cn.exports=S,Cn.exports.default=S,Cn.exports.fastUri=S,Cn.exports}var $m=Fm();const gs=rs($m);var _n={},Oo;function Dm(){if(Oo)return _n;Oo=1;var t=/~/,e=/~[01]/g;function n(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function r(c){return t.test(c)?c.replace(e,n):c}function i(c,u,d){for(var m,g,f=1,p=u.length;f<p;){if(u[f]==="constructor"||u[f]==="prototype"||u[f]==="__proto__")return c;if(m=r(u[f++]),g=p>f,typeof c[m]>"u"&&(Array.isArray(c)&&m==="-"&&(m=c.length),g&&(u[f]!==""&&u[f]<1/0||u[f]==="-"?c[m]=[]:c[m]={})),!g)break;c=c[m]}var y=c[m];return d===void 0?delete c[m]:c[m]=d,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 d=u.length;if(d===1)return c;for(var m=1;m<d;){if(c=c[r(u[m++])],d===m)return c;if(typeof c!="object"||c===null)return}}function a(c,u,d){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,d)}function l(c){var u=s(c);return{get:function(d){return o(d,u)},set:function(d,m){return a(d,u,m)}}}return _n.get=o,_n.set=a,_n.compile=l,_n}var Rm=Dm();const si=rs(Rm);var km=Object.prototype;function Lr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||km;return t===n}var Mm=ll(Object.keys,Object),Um=Object.prototype,Lm=Um.hasOwnProperty;function ml(t){if(!Lr(t))return Mm(t);var e=[];for(var n in Object(t))Lm.call(t,n)&&n!="constructor"&&e.push(n);return e}var Bi=Vt(rt,"DataView"),qi=Vt(rt,"Promise"),on=Vt(rt,"Set"),Vi=Vt(rt,"WeakMap"),Ao="[object Map]",Bm="[object Object]",Eo="[object Promise]",Co="[object Set]",_o="[object WeakMap]",Io="[object DataView]",qm=qt(Bi),Vm=qt(Gn),zm=qt(qi),Wm=qt(on),Hm=qt(Vi),Re=ct;(Bi&&Re(new Bi(new ArrayBuffer(1)))!=Io||Gn&&Re(new Gn)!=Ao||qi&&Re(qi.resolve())!=Eo||on&&Re(new on)!=Co||Vi&&Re(new Vi)!=_o)&&(Re=function(t){var e=ct(t),n=e==Bm?t.constructor:void 0,r=n?qt(n):"";if(r)switch(r){case qm:return Io;case Vm:return Ao;case zm:return Eo;case Wm:return Co;case Hm:return _o}return e});var Gm="[object Arguments]";function To(t){return Ue(t)&&ct(t)==Gm}var pl=Object.prototype,Km=pl.hasOwnProperty,Ym=pl.propertyIsEnumerable,ln=To((function(){return arguments})())?To:function(t){return Ue(t)&&Km.call(t,"callee")&&!Ym.call(t,"callee")},Jm=9007199254740991;function ys(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Jm}function Wt(t){return t!=null&&ys(t.length)&&!er(t)}function Zm(){return!1}var gl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,No=gl&&typeof module=="object"&&module&&!module.nodeType&&module,Xm=No&&No.exports===gl,Po=Xm?rt.Buffer:void 0,Qm=Po?Po.isBuffer:void 0,kt=Qm||Zm,ep="[object Arguments]",tp="[object Array]",np="[object Boolean]",rp="[object Date]",ip="[object Error]",sp="[object Function]",op="[object Map]",ap="[object Number]",lp="[object Object]",cp="[object RegExp]",up="[object Set]",dp="[object String]",fp="[object WeakMap]",hp="[object ArrayBuffer]",mp="[object DataView]",pp="[object Float32Array]",gp="[object Float64Array]",yp="[object Int8Array]",bp="[object Int16Array]",xp="[object Int32Array]",vp="[object Uint8Array]",Sp="[object Uint8ClampedArray]",wp="[object Uint16Array]",jp="[object Uint32Array]",me={};me[pp]=me[gp]=me[yp]=me[bp]=me[xp]=me[vp]=me[Sp]=me[wp]=me[jp]=!0;me[ep]=me[tp]=me[hp]=me[np]=me[mp]=me[rp]=me[ip]=me[sp]=me[op]=me[ap]=me[lp]=me[cp]=me[up]=me[dp]=me[fp]=!1;function Op(t){return Ue(t)&&ys(t.length)&&!!me[ct(t)]}function bs(t){return function(e){return t(e)}}var yl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Un=yl&&typeof module=="object"&&module&&!module.nodeType&&module,Ap=Un&&Un.exports===yl,oi=Ap&&ol.process,cn=(function(){try{var t=Un&&Un.require&&Un.require("util").types;return t||oi&&oi.binding&&oi.binding("util")}catch{}})(),Fo=cn&&cn.isTypedArray,nr=Fo?bs(Fo):Op,Ep="[object Map]",Cp="[object Set]",_p=Object.prototype,Ip=_p.hasOwnProperty;function ge(t){if(t==null)return!0;if(Wt(t)&&(Se(t)||typeof t=="string"||typeof t.splice=="function"||kt(t)||nr(t)||ln(t)))return!t.length;var e=Re(t);if(e==Ep||e==Cp)return!t.size;if(Lr(t))return!ml(t).length;for(var n in t)if(Ip.call(t,n))return!1;return!0}function Tp(){this.__data__=new ut,this.size=0}function Np(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Pp(t){return this.__data__.get(t)}function Fp(t){return this.__data__.has(t)}var $p=200;function Dp(t,e){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!Gn||r.length<$p-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ut(t);this.size=e.size}We.prototype.clear=Tp;We.prototype.delete=Np;We.prototype.get=Pp;We.prototype.has=Fp;We.prototype.set=Dp;function xs(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Ir=(function(){try{var t=Vt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function vs(t,e,n){e=="__proto__"&&Ir?Ir(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Rp=Object.prototype,kp=Rp.hasOwnProperty;function Ss(t,e,n){var r=t[e];(!(kp.call(t,e)&&tr(r,n))||n===void 0&&!(e in t))&&vs(t,e,n)}function bn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?vs(n,a,l):Ss(n,a,l)}return n}function bl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Mp=9007199254740991,Up=/^(?:0|[1-9]\d*)$/;function Br(t,e){var n=typeof t;return e=e??Mp,!!e&&(n=="number"||n!="symbol"&&Up.test(t))&&t>-1&&t%1==0&&t<e}var Lp=Object.prototype,Bp=Lp.hasOwnProperty;function xl(t,e){var n=Se(t),r=!n&&ln(t),i=!n&&!r&&kt(t),s=!n&&!r&&!i&&nr(t),o=n||r||i||s,a=o?bl(t.length,String):[],l=a.length;for(var c in t)(e||Bp.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Br(c,l)))&&a.push(c);return a}function ze(t){return Wt(t)?xl(t):ml(t)}function qp(t,e){return t&&bn(e,ze(e),t)}function Vp(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var zp=Object.prototype,Wp=zp.hasOwnProperty;function Hp(t){if(!te(t))return Vp(t);var e=Lr(t),n=[];for(var r in t)r=="constructor"&&(e||!Wp.call(t,r))||n.push(r);return n}function rr(t){return Wt(t)?xl(t,!0):Hp(t)}function Gp(t,e){return t&&bn(e,rr(e),t)}var vl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$o=vl&&typeof module=="object"&&module&&!module.nodeType&&module,Kp=$o&&$o.exports===vl,Do=Kp?rt.Buffer:void 0,Ro=Do?Do.allocUnsafe:void 0;function Sl(t,e){if(e)return t.slice();var n=t.length,r=Ro?Ro(n):new t.constructor(n);return t.copy(r),r}function ws(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Yp(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function wl(){return[]}var Jp=Object.prototype,Zp=Jp.propertyIsEnumerable,ko=Object.getOwnPropertySymbols,js=ko?function(t){return t==null?[]:(t=Object(t),Yp(ko(t),function(e){return Zp.call(t,e)}))}:wl;function Xp(t,e){return bn(t,js(t),e)}function Os(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Qp=Object.getOwnPropertySymbols,jl=Qp?function(t){for(var e=[];t;)Os(e,js(t)),t=Rr(t);return e}:wl;function eg(t,e){return bn(t,jl(t),e)}function Ol(t,e,n){var r=e(t);return Se(t)?r:Os(r,n(t))}function zi(t){return Ol(t,ze,js)}function As(t){return Ol(t,rr,jl)}var tg=Object.prototype,ng=tg.hasOwnProperty;function rg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&ng.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Tr=rt.Uint8Array;function Es(t){var e=new t.constructor(t.byteLength);return new Tr(e).set(new Tr(t)),e}function ig(t,e){var n=e?Es(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var sg=/\w*$/;function og(t){var e=new t.constructor(t.source,sg.exec(t));return e.lastIndex=t.lastIndex,e}var Mo=Me?Me.prototype:void 0,Uo=Mo?Mo.valueOf:void 0;function ag(t){return Uo?Object(Uo.call(t)):{}}function Al(t,e){var n=e?Es(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var lg="[object Boolean]",cg="[object Date]",ug="[object Map]",dg="[object Number]",fg="[object RegExp]",hg="[object Set]",mg="[object String]",pg="[object Symbol]",gg="[object ArrayBuffer]",yg="[object DataView]",bg="[object Float32Array]",xg="[object Float64Array]",vg="[object Int8Array]",Sg="[object Int16Array]",wg="[object Int32Array]",jg="[object Uint8Array]",Og="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Eg="[object Uint32Array]";function Cg(t,e,n){var r=t.constructor;switch(e){case gg:return Es(t);case lg:case cg:return new r(+t);case yg:return ig(t,n);case bg:case xg:case vg:case Sg:case wg:case jg:case Og:case Ag:case Eg:return Al(t,n);case ug:return new r;case dg:case mg:return new r(t);case fg:return og(t);case hg:return new r;case pg:return ag(t)}}var Lo=Object.create,El=(function(){function t(){}return function(e){if(!te(e))return{};if(Lo)return Lo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Cl(t){return typeof t.constructor=="function"&&!Lr(t)?El(Rr(t)):{}}var _g="[object Map]";function Ig(t){return Ue(t)&&Re(t)==_g}var Bo=cn&&cn.isMap,Tg=Bo?bs(Bo):Ig,Ng="[object Set]";function Pg(t){return Ue(t)&&Re(t)==Ng}var qo=cn&&cn.isSet,Fg=qo?bs(qo):Pg,$g=1,Dg=2,Rg=4,_l="[object Arguments]",kg="[object Array]",Mg="[object Boolean]",Ug="[object Date]",Lg="[object Error]",Il="[object Function]",Bg="[object GeneratorFunction]",qg="[object Map]",Vg="[object Number]",Tl="[object Object]",zg="[object RegExp]",Wg="[object Set]",Hg="[object String]",Gg="[object Symbol]",Kg="[object WeakMap]",Yg="[object ArrayBuffer]",Jg="[object DataView]",Zg="[object Float32Array]",Xg="[object Float64Array]",Qg="[object Int8Array]",ey="[object Int16Array]",ty="[object Int32Array]",ny="[object Uint8Array]",ry="[object Uint8ClampedArray]",iy="[object Uint16Array]",sy="[object Uint32Array]",he={};he[_l]=he[kg]=he[Yg]=he[Jg]=he[Mg]=he[Ug]=he[Zg]=he[Xg]=he[Qg]=he[ey]=he[ty]=he[qg]=he[Vg]=he[Tl]=he[zg]=he[Wg]=he[Hg]=he[Gg]=he[ny]=he[ry]=he[iy]=he[sy]=!0;he[Lg]=he[Il]=he[Kg]=!1;function Ln(t,e,n,r,i,s){var o,a=e&$g,l=e&Dg,c=e&Rg;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!te(t))return t;var u=Se(t);if(u){if(o=rg(t),!a)return ws(t,o)}else{var d=Re(t),m=d==Il||d==Bg;if(kt(t))return Sl(t,a);if(d==Tl||d==_l||m&&!i){if(o=l||m?{}:Cl(t),!a)return l?eg(t,Gp(o,t)):Xp(t,qp(o,t))}else{if(!he[d])return i?t:{};o=Cg(t,d,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),Fg(t)?t.forEach(function(y){o.add(Ln(y,e,n,y,t,s))}):Tg(t)&&t.forEach(function(y,v){o.set(v,Ln(y,e,n,v,t,s))});var f=c?l?As:zi:l?rr:ze,p=u?void 0:f(t);return xs(p||t,function(y,v){p&&(v=y,y=t[v]),Ss(o,v,Ln(y,e,n,v,t,s))}),o}function Nl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function oy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ay(t,e){return e.length<2?t:Ur(t,oy(e,0,-1))}var ly=Object.prototype,cy=ly.hasOwnProperty;function Pl(t,e){e=yn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=Et(e[n]);if(i==="__proto__"&&!cy.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=ay(t,e);return s==null||delete s[Et(Nl(e))]}function uy(t){return At(t)?void 0:t}var Vo=Me?Me.isConcatSpreadable:void 0;function dy(t){return Se(t)||ln(t)||!!(Vo&&t&&t[Vo])}function ir(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=dy),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?ir(a,e-1,n,r,i):Os(i,a):r||(i[i.length]=a)}return i}function Wi(t){var e=t==null?0:t.length;return e?ir(t,1):[]}function fy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var zo=Math.max;function Fl(t,e,n){return e=zo(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=zo(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),fy(t,this,a)}}function hy(t){return function(){return t}}function qr(t){return t}var my=Ir?function(t,e){return Ir(t,"toString",{configurable:!0,enumerable:!1,value:hy(e),writable:!0})}:qr,py=800,gy=16,yy=Date.now;function by(t){var e=0,n=0;return function(){var r=yy(),i=gy-(r-n);if(n=r,i>0){if(++e>=py)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var $l=by(my);function Dl(t){return $l(Fl(t,void 0,Wi),t+"")}var xy=1,vy=2,Sy=4,un=Dl(function(t,e){var n={};if(t==null)return n;var r=!1;e=gn(e,function(s){return s=yn(s,t),r||(r=s.length>1),s}),bn(t,As(t),n),r&&(n=Ln(n,xy|vy|Sy,uy));for(var i=e.length;i--;)Pl(n,e[i]);return n});function Nr(t,e){if(de in t&&gs.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(te(r)){const i=Nr(r,e);if(i!==void 0)return i}}else if(te(n)){const r=Nr(n,e);if(r!==void 0)return r}}function Hi(t,e){const n=D(t,de,e);let r=t;ue in r&&(r={...r,[ue]:gs.resolve(n,r[ue])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>te(o)?Hi(o,n):o)}:te(s)&&(r={...r,[i]:Hi(s,n)});return r}function Cs(t,e){const n=e[t];return[un(e,[t]),n]}function Rl(t,e={},n=[],r=D(e,[de])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||de in e&&e[de]===o?s=si.get(e,l):e[Pn]===br&&(s=Nr(e,o.replace(/\/$/,"")),s!==void 0&&(s=si.get(s,l)))}else if(e[Pn]===br){const l=o?gs.resolve(o,i):i,[c,...u]=l.replace(/#\/?$/,"").split("#");s=Nr(e,c.replace(/\/$/,"")),s!==void 0&&(o=s[de],ge(u)||(s=si.get(s,decodeURIComponent(u.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[ue];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...m]=n,g=[...m,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${g}`)}const[l,c]=Cs(ue,s),u=Rl(c,e,[...n,i],o);return Object.keys(l).length>0?e[Pn]===eh||e[Pn]===br?{[Ot]:[l,u]}:{...l,...u}:u}return s}function Kn(t,e={},n=D(e,[de])){return Rl(t,e,[],n)}var wy=Object.prototype,jy=wy.hasOwnProperty;function Oy(t,e){return t!=null&&jy.call(t,e)}function kl(t,e,n){e=yn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=Et(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&ys(i)&&Br(o,i)&&(Se(t)||ln(t)))}function X(t,e){return t!=null&&kl(t,e,Oy)}var Ay="[object String]";function Ct(t){return typeof t=="string"||!Se(t)&&Ue(t)&&ct(t)==Ay}function He(t){let e;const n=D(t,Jf);return Ct(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var Ey=1/0;function Cy(t){var e=t==null?0:t.length;return e?ir(t,Ey):[]}function Gi(t,e,n){(n!==void 0&&!tr(t[e],n)||n===void 0&&!(e in t))&&vs(t,e,n)}function _y(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var Ml=_y();function Yn(t){return Ue(t)&&Wt(t)}function Ki(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Iy(t){return bn(t,rr(t))}function Ty(t,e,n,r,i,s,o){var a=Ki(t,n),l=Ki(e,n),c=o.get(l);if(c){Gi(t,n,c);return}var u=s?s(a,l,n+"",t,e,o):void 0,d=u===void 0;if(d){var m=Se(l),g=!m&&kt(l),f=!m&&!g&&nr(l);u=l,m||g||f?Se(a)?u=a:Yn(a)?u=ws(a):g?(d=!1,u=Sl(l,!0)):f?(d=!1,u=Al(l,!0)):u=[]:At(l)||ln(l)?(u=a,ln(a)?u=Iy(a):(!te(a)||er(a))&&(u=Cl(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),Gi(t,n,u)}function Ul(t,e,n,r,i){t!==e&&Ml(e,function(s,o){if(i||(i=new We),te(s))Ty(t,e,o,n,Ul,r,i);else{var a=r?r(Ki(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Gi(t,o,a)}},rr)}function Vr(t,e){return $l(Fl(t,e,qr),t+"")}function Ny(t,e,n){if(!te(n))return!1;var r=typeof e;return(r=="number"?Wt(n)&&Br(e,n.length):r=="string"&&e in n)?tr(n[e],t):!1}function Py(t){return Vr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&Ny(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var Fy=Py(function(t,e,n){Ul(t,e,n)});function _s(t,e,n,r){if(!te(t))return t;e=yn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=Et(e[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var u=a[l];c=r?r(u,l,a):void 0,c===void 0&&(c=te(u)?u:Br(e[i+1])?[]:{})}Ss(a,l,c),a=a[l]}return t}function ce(t,e,n){return t==null?t:_s(t,e,n)}function Ll(t){return typeof t=="function"?t:qr}var $y=/\s/;function Dy(t){for(var e=t.length;e--&&$y.test(t.charAt(e)););return e}var Ry=/^\s+/;function ky(t){return t&&t.slice(0,Dy(t)+1).replace(Ry,"")}var Wo=NaN,My=/^[-+]0x[0-9a-f]+$/i,Uy=/^0b[01]+$/i,Ly=/^0o[0-7]+$/i,By=parseInt;function qy(t){if(typeof t=="number")return t;if(Qn(t))return Wo;if(te(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=te(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ky(t);var n=Uy.test(t);return n||Ly.test(t)?By(t.slice(2),n?2:8):My.test(t)?Wo:+t}var Ho=1/0,Vy=17976931348623157e292;function zy(t){if(!t)return t===0?t:0;if(t=qy(t),t===Ho||t===-Ho){var e=t<0?-1:1;return e*Vy}return t===t?t:0}function Bl(t){var e=zy(t),n=e%1;return e===e?n?e-n:e:0}var Wy=9007199254740991,ai=4294967295,Hy=Math.min;function ql(t,e){if(t=Bl(t),t<1||t>Wy)return[];var n=ai,r=Hy(t,ai);e=Ll(e),t-=ai;for(var i=bl(r,e);++n<t;)e(n);return i}function Vl(t,e){return t&&Ml(t,e,ze)}var Gy="__lodash_hash_undefined__";function Ky(t){return this.__data__.set(t,Gy),this}function Yy(t){return this.__data__.has(t)}function Mt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dt;++e<n;)this.add(t[e])}Mt.prototype.add=Mt.prototype.push=Ky;Mt.prototype.has=Yy;function Jy(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Jn(t,e){return t.has(e)}var Zy=1,Xy=2;function zl(t,e,n,r,i,s){var o=n&Zy,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(t),u=s.get(e);if(c&&u)return c==e&&u==t;var d=-1,m=!0,g=n&Xy?new Mt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var y=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(y!==void 0){if(y)continue;m=!1;break}if(g){if(!Jy(e,function(v,w){if(!Jn(g,w)&&(f===v||i(f,v,n,r,s)))return g.push(w)})){m=!1;break}}else if(!(f===p||i(f,p,n,r,s))){m=!1;break}}return s.delete(t),s.delete(e),m}function Qy(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Is(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var eb=1,tb=2,nb="[object Boolean]",rb="[object Date]",ib="[object Error]",sb="[object Map]",ob="[object Number]",ab="[object RegExp]",lb="[object Set]",cb="[object String]",ub="[object Symbol]",db="[object ArrayBuffer]",fb="[object DataView]",Go=Me?Me.prototype:void 0,li=Go?Go.valueOf:void 0;function hb(t,e,n,r,i,s,o){switch(n){case fb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case db:return!(t.byteLength!=e.byteLength||!s(new Tr(t),new Tr(e)));case nb:case rb:case ob:return tr(+t,+e);case ib:return t.name==e.name&&t.message==e.message;case ab:case cb:return t==e+"";case sb:var a=Qy;case lb:var l=r&eb;if(a||(a=Is),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;r|=tb,o.set(t,e);var u=zl(a(t),a(e),r,i,s,o);return o.delete(t),u;case ub:if(li)return li.call(t)==li.call(e)}return!1}var mb=1,pb=Object.prototype,gb=pb.hasOwnProperty;function yb(t,e,n,r,i,s){var o=n&mb,a=zi(t),l=a.length,c=zi(e),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var m=a[d];if(!(o?m in e:gb.call(e,m)))return!1}var g=s.get(t),f=s.get(e);if(g&&f)return g==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++d<l;){m=a[d];var v=t[m],w=e[m];if(r)var A=o?r(w,v,m,e,t,s):r(v,w,m,t,e,s);if(!(A===void 0?v===w||i(v,w,n,r,s):A)){p=!1;break}y||(y=m=="constructor")}if(p&&!y){var O=t.constructor,b=e.constructor;O!=b&&"constructor"in t&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof b=="function"&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}var bb=1,Ko="[object Arguments]",Yo="[object Array]",ur="[object Object]",xb=Object.prototype,Jo=xb.hasOwnProperty;function vb(t,e,n,r,i,s){var o=Se(t),a=Se(e),l=o?Yo:Re(t),c=a?Yo:Re(e);l=l==Ko?ur:l,c=c==Ko?ur:c;var u=l==ur,d=c==ur,m=l==c;if(m&&kt(t)){if(!kt(e))return!1;o=!0,u=!1}if(m&&!u)return s||(s=new We),o||nr(t)?zl(t,e,n,r,i,s):hb(t,e,l,n,r,i,s);if(!(n&bb)){var g=u&&Jo.call(t,"__wrapped__"),f=d&&Jo.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,y=f?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return m?(s||(s=new We),yb(t,e,n,r,i,s)):!1}function zr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:vb(t,e,n,r,zr,i)}var Sb=1,wb=2;function jb(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],c=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var u=new We,d;if(!(d===void 0?zr(c,l,Sb|wb,r,u):d))return!1}}return!0}function Wl(t){return t===t&&!te(t)}function Ob(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Wl(i)]}return e}function Hl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Ab(t){var e=Ob(t);return e.length==1&&e[0][2]?Hl(e[0][0],e[0][1]):function(n){return n===t||jb(n,t,e)}}function Eb(t,e){return t!=null&&e in Object(t)}function Gl(t,e){return t!=null&&kl(t,e,Eb)}var Cb=1,_b=2;function Ib(t,e){return hs(t)&&Wl(e)?Hl(Et(t),e):function(n){var r=D(n,t);return r===void 0&&r===e?Gl(n,t):zr(e,r,Cb|_b)}}function Tb(t){return function(e){return e?.[t]}}function Nb(t){return function(e){return Ur(e,t)}}function Pb(t){return hs(t)?Tb(Et(t)):Nb(t)}function Ts(t){return typeof t=="function"?t:t==null?qr:typeof t=="object"?Se(t)?Ib(t[0],t[1]):Ab(t):Pb(t)}function Fb(t,e,n){var r=Se(t),i=r||kt(t)||nr(t);if(e=Ts(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:te(t)?n=er(s)?El(Rr(t)):{}:n={}}return(i?xs:Vl)(t,function(o,a,l){return e(n,o,a,l)}),n}function $b(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Db(t){return t!==t}function Rb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Kl(t,e,n){return e===e?Rb(t,e,n):$b(t,Db,n)}function Ns(t,e){var n=t==null?0:t.length;return!!n&&Kl(t,e,0)>-1}function xr(){}var kb=1/0,Mb=on&&1/Is(new on([,-0]))[1]==kb?function(t){return new on(t)}:xr,Ub=200;function Yl(t,e,n){var r=-1,i=Ns,s=t.length,o=!0,a=[],l=a;if(s>=Ub){var c=Mb(t);if(c)return Is(c);o=!1,i=Jn,l=new Mt}else l=a;e:for(;++r<s;){var u=t[r],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=l.length;m--;)if(l[m]===d)continue e;a.push(u)}else i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}function Jl(t){return t&&t.length?Yl(t):[]}function Zn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?"number":typeof t=="object"?"object":"string"}var Lb=Vr(function(t){return Yl(ir(t,1,Yn,!0))});function Le(t){let{type:e}=t;return!e&&t.const?Zn(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function lt(t,e){const n={...t};return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&V(o)?r[i]=lt(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===tl&&Array.isArray(s)&&Array.isArray(o)?r[i]=Lb(s,o):r[i]=o,r},n)}var Bb="[object Number]";function Zl(t){return typeof t=="number"||Ue(t)&&ct(t)==Bb}function Xl(t,e,n){var r;if(t&&n){const i=D(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=D(o,[se,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Pr(t,e,n,r,i){if(e===void 0)return 0;const s=Xl(e,n,i);if(Zl(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&X(a,[se,i])){const l=D(e,i),c=D(a,[se,i],{});if(t.isValid(c,l,r))return o}else if(a[se]){const l={anyOf:Object.keys(a[se]).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={...a,...l};if(delete c.required,t.isValid(c,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}const qb=Object.prototype;function Fn(t){for(const e in t)if(qb.hasOwnProperty.call(t,e))return!1;return!0}const Vb=["array","boolean","integer","null","number","object","string"];new Set(Vb);const zb=["$defs","definitions","properties","patternProperties","dependencies"];new Set(zb);const Wb=["items","allOf","oneOf","anyOf"];new Set(Wb);const Hb=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Hb);function vr(t){return typeof t=="object"}function Ye(t){return vr(t)?Fn(t):t===!0}function nn(t,e){return t<e?-1:t>e?1:0}function ci(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function Gb(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function Zo(t){return t.length===0}function ui(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function Ql(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){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(t(c,o[u])===0)continue e;a=o.push(c)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function Kb(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const u=e;e=n,n=u;const d=i;i=s,s=d}const o=[...e].sort(t),a=[...n].sort(t);let l=0,c=0;for(;l<i&&c<s;){const u=t(o[l],a[c]);u===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,c++):u<0?l++:c++}return r}}function Yb(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const Xo=Yb,ec=()=>0,Jb=t=>t===void 0,Zb=t=>typeof t!="object",Qo={boolean:0,number:1,string:2};function Xb(t,e){const n=typeof t,r=typeof e;return n===r?nn(t,e):Qo[n]-Qo[r]}function Qb(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Wr(t,e,n=ec){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Qt(t){return Wr(Jb,t)}function pt(t,e){return Wr(n=>n===void 0||t(n),e)}function di(t,e){return Wr(Array.isArray,t,e)}const be=Qt(nn),fi=pt(t=>t===0,(t,e)=>t-e);function e0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=Xo(e,p=>Object.keys(p).sort());function r(p){return(y,v)=>{const w=n(y),A=n(v),O=Math.min(w.length,A.length);for(let b=0;b<O;b++){const x=nn(w[b],A[b]);if(x!==0)return x}if(w.length!==A.length)return w.length-A.length;for(let b=0;b<O;b++){const x=w[b],S=p(y[x],v[x]);if(S!==0)return S}return 0}}function i(p){const y=ui(p),v=Xo(t,Ql(p,{threshold:0}));return(w,A)=>y(v(w),v(A))}const s=i(nn);function o(p,y){if(vr(p)){if(vr(y)){const v=Object.keys(p),w=Object.keys(y),A=Qb(v,w),O=A.length;for(let b=0;b<O;b++){const x=A[b];if(p[x]===y[x])continue;const j=(f[x]??a)(p[x],y[x]);if(j!==0)return j}return 0}return y===!0&&Fn(p)?0:1}return vr(y)?p===!0&&Fn(y)?0:-1:nn(p,y)}const a=Qt(c),l=Wr(Zb,di(r(a),ui(c)),Xb);function c(p,y){return p===null?-1:y===null?1:l(p,y)}const u=Qt(o),d=pt(Fn,r(u)),m=Qt(i(o)),g=pt(Ye,o),f={$id:be,$comment:be,$defs:d,$ref:be,$schema:be,const:a,contains:u,contentEncoding:be,contentMediaType:be,default:a,definitions:d,description:be,else:u,examples:a,exclusiveMaximum:be,exclusiveMinimum:be,format:be,if:u,maximum:be,maxItems:be,maxLength:be,maxProperties:be,minimum:be,multipleOf:be,not:u,pattern:be,propertyNames:u,readOnly:be,then:u,title:be,writeOnly:be,uniqueItems:pt(p=>p===!1,ec),minLength:fi,minItems:fi,minProperties:fi,required:pt(Zo,s),enum:pt(Zo,i(c)),type:Qt((p,y)=>{const v=Array.isArray(p),w=Array.isArray(y);return!v&&!w?nn(p,y):s(v?p:[p],w?y:[y])}),items:pt(p=>!Array.isArray(p)&&Ye(p),di(o,ui(o))),anyOf:m,allOf:m,oneOf:m,properties:d,patternProperties:d,additionalProperties:g,additionalItems:g,dependencies:pt(Fn,r(Qt(di(o,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:o}}function ea(t){return t}const tc=(t,e)=>t?tc(e%t,t):e,t0=(t,e)=>Math.abs(t*e)/tc(t,e);function n0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function hi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function mi(t,e){return t||e}function ta(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function r0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Tt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const i0=["properties","patternProperties","additionalProperties"];function na(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const ra=[[],[]];function ia(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const s0=["items","additionalItems"],o0=["if","then","else"];function sa(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function pi(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function a0(t){const e=new Map;for(const[n,r,i]of t){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=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const l0=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function c0({mergePatterns:t=n0,isSubRegExp:e=Object.is,intersectJson:n=Gb,deduplicateJsonSchemaDef:r=ea,defaultMerger:i=ea,assigners:s=[],checks:o=l0,mergers:a}={}){function l(O){const b=O.length;let x=O[0];for(let S=1;S<b;S++){const j=v(x,O[S]);if(j===!1)return!1;Ye(j)||(x=j)}return x}function c(O,b,x,S,j,E,C){if(O.length=0,x===!1)return!1;if(O.push(x),j!==void 0){if(j===!1)return!1;O.push(j)}if(ia(O,b,E))return!1;const I=O.length<2;if(C===!1){if(I)return;if(ia(O,b,S))return!1}else I&&C!==void 0&&O.push(C);return O.length===1?O[0]:l(O)}function u(O,b,x,S,j,E){const C=x.length;if(C>0&&j!==!1)if(E)Object.assign(O,b);else for(let _=0;_<C;_++){const I=x[_];S.has(I)||(O[I]=v(b[I],j))}return O}const d=(O,{properties:b={},patternProperties:x,additionalProperties:S=!0},{properties:j={},patternProperties:E,additionalProperties:C=!0})=>{const _=Ye(S),I=Ye(C);if(_&&I)return Tt(O,"properties",w(b,j)),Tt(O,"patternProperties",x&&E?w(x,E):x??E),delete O.additionalProperties,O;const T=v(S,C);Tt(O,"additionalProperties",T);const P={},F=Object.keys(b),$=F.length,[R,B]=x?na(x):ra,[U,Y]=E?na(E):ra,ne=[],fe=new Set,ye=I?void 0:C;for(let z=0;z<$;z++){const re=F[z];fe.add(re);const oe=c(ne,re,b[re],R,j[re],U,ye);oe!==void 0&&(P[re]=oe)}const k=Object.keys(j),le=k.length,ee=_?void 0:S;for(let z=0;z<le;z++){const re=k[z];if(fe.has(re))continue;const oe=c(ne,re,j[re],U,void 0,R,ee);oe!==void 0&&(P[re]=oe)}Tt(O,"properties",P);let H={};const G=new Set;return B.length>0&&Y.length>0&&hi(B,Y,(z,re)=>{e(z,re)&&G.add(z),e(re,z)&&G.add(re),H[t(z,re)]=v(x[z],E[re])}),H=u(H,x,B,G,C,I),H=u(H,E,Y,G,S,_),Tt(O,"patternProperties",H),O},m=(O,{items:b=[],additionalItems:x},{items:S=[],additionalItems:j})=>{const E=Array.isArray(b),C=Array.isArray(S),_=[];if(O.items=_,E&&C){const[I,T,P]=b.length<S.length?[b.length,x,S]:[S.length,j,b];let F=0;for(;F<I;F++)_.push(v(b[F],S[F]));if(T===!1)O.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;F<P.length;F++)_.push($?P[F]:v(P[F],T));Tt(O,"additionalItems",x!==void 0&&j!==void 0?v(x,j):x??j)}}else if(E||C){const[I,T,P]=E?[b,S,x]:[S,b,j];Tt(O,"additionalItems",P&&v(P,T));for(let F=0;F<I.length;F++)_.push(v(I[F],T))}else delete O.additionalItems,O.items=v(b,S);return O},g=(O,b,x)=>{sa(O,b);const S=sa({},x);return O.allOf===void 0?O.allOf=[S]:O.allOf=O.allOf.concat(S),O};function f(O,b){const x=[];if(hi(O,b,(S,j)=>{try{x.push(v(S,j))}catch{}}),x.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(O)}" and "${JSON.stringify(b)}"; the merged result is empty`);return r(x)}const p=r0([[i0,d],[s0,m],[o0,g],...s]),y=a0(o);function v(O,b){if(O===!1||b===!1)return!1;if(Ye(O))return Ye(b)?!0:b;if(Ye(b))return O;let x={...O};const S=new Set,j=new Set,E=Object.keys(b),C=E.length;for(let _=0;_<C;_++){const I=E[_],T=b[I];if(T===void 0)continue;const P=y.get(I);if(P!==void 0){const B=P.length;for(let U=0;U<B;U++){const Y=P[U];O[Y.oppositeKey]!==void 0&&j.add(Y.check)}}const F=O[I];if(F===void 0){x[I]=T;continue}const $=p.get(I);if($){S.add($);continue}const R=A[I]??i;x[I]=R(F,T)}for(const _ of S)x=_(x,O,b);for(const _ of j)_(x);return x}const w=ta(v),A={$id:i,$ref:i,$schema:i,$comment:i,$defs:w,definitions:w,type:(O,b)=>{if(O===b)return O;const x=Array.isArray(O),S=Array.isArray(b);if(!x&&!S){const j=pi(O,b);if(j!==void 0)return j}else if(x||S){const j=new Set;if(x&&S)hi(O,b,(C,_)=>{const I=pi(C,_);I!==void 0&&j.add(I)});else{const C=x?O:b,_=x?b:O,I=C.length;for(let T=0;T<I;T++){const P=pi(_,C[T]);P!==void 0&&j.add(P)}}const E=j.size;if(E===1)return j.values().next().value;if(E>1)return Array.from(j)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${O.toString()}, ${b.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(O,b)=>{const x=r([O,b]);return x.length===1?x[0]:{anyOf:x}},pattern:t,readOnly:mi,writeOnly:mi,enum:(O,b)=>{const x=n(O,b);if(x.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(O)}", "${JSON.stringify(b)}"`);return x},anyOf:f,oneOf:f,allOf:(O,b)=>r(O.concat(b)),propertyNames:v,contains:v,dependencies:ta((O,b)=>Array.isArray(O)?Array.isArray(b)?ci(O,b):v(b,{required:O}):Array.isArray(b)?v(O,{required:b}):v(O,b)),examples:(O,b)=>{if(!Array.isArray(O)||!Array.isArray(b))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(O)}" and "${JSON.stringify(b)}"`);return ci(O,b)},multipleOf:(O,b)=>{let x=1;for(;!Number.isInteger(O)||!Number.isInteger(b);)x*=10,O*=10,b*=10;return t0(O,b)/x},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:mi,required:ci,...a};return{mergeSchemaDefinitions:v,mergeArrayOfSchemaDefinitions:l}}function u0(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function d0(t){return e=>t(u0(e))}const{compareSchemaDefinitions:f0,compareSchemaValues:h0}=e0(),{mergeArrayOfSchemaDefinitions:m0}=c0({intersectJson:Kb(h0),deduplicateJsonSchemaDef:Ql(f0)}),nc=d0(m0);function Ce(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function p0(t,e,n,r,i,s,o){const{if:a,then:l,else:c,...u}=e,d=t.isValid(a,s||{},n);let m=[u],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ze(t,l,n,s,r,i,o))),c&&typeof c!="boolean"&&(g=g.concat(Ze(t,c,n,s,r,i,o)));else{const f=d?l:c;f&&typeof f!="boolean"&&(g=g.concat(Ze(t,f,n,s,r,i,o)))}return g.length&&(m=g.map(f=>lt(u,f))),m.flatMap(f=>Ze(t,f,n,s,r,i,o))}function rc(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>ql(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function ic(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function g0(t,e,n,r,i,s,o,a){const l=sc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(cs in e)return ac(t,e,n,r,i,s,o).flatMap(u=>Ze(t,u,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const c=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return rc(c).map(d=>({...e,allOf:d}))}return[e]}function sc(t,e,n,r,i,s,o,a){const l=St(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function St(t,e,n,r,i){if(!V(t))return t;let s=t,o=r;if(ue in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...Kn(a,e,o),...l,[Mn]:a},de in s&&(o=s[de])}if(se in s){const a=[],l=Fb(s[se],(c,u,d)=>{const m=[...n];c[d]=St(u,e,m,o,i),a.push(m)},{});Fy(n,Jl(Cy(a))),s={...s,[se]:l}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:St(s.items,e,n,o,i)}),i){let a,l;Q in t&&Array.isArray(t[Q])?(a=Q,l=s[Q]):W in t&&Array.isArray(t[W])&&(a=W,l=s[W]),a&&l&&(s={...s,[a]:l.map(c=>St(c,e,n,o,i))})}return ie(t,s)?t:s}function y0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&V(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Mi in s){const l=ic(s,a);if(!ge(l)){s.properties[a]=Ce(t,{[Ot]:Object.values(l)},n,D(o,[a]),i),ce(s.properties,[a,at],!0);return}}if(tn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ce(t,{[ue]:D(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:Q in s.additionalProperties||W in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:Zn(D(o,[a]))}:l={type:Zn(D(o,[a]))},s.properties[a]=l,ce(s.properties,[a,at],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,at],!0)}}),s}function b0(t){return nc(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return V(e)?g0(t,e,n,i,s,r,o,a).flatMap(c=>{var u;let d=c;if(us in d)return p0(t,d,n,i,s,r,o);if(Ot in d){if(i){const{allOf:g,...f}=d;return[...g,f]}try{const g=[],f=[];(u=d.allOf)===null||u===void 0||u.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):f.push(p)}),g.length&&(d={...d,allOf:f}),d=o?o(d):b0(d),g.length&&(d.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
|
|
2
|
-
`,g);const{allOf:f,...p}=d;return p}}return se in d&&Mi in d&&(d=Object.keys(d.properties).reduce((g,f)=>{const p=ic(g,f);return ge(p)||(g.properties[f]=Ce(t,{allOf:[g.properties[f],...Object.values(p)]},n,D(r,[f]),o)),g},{...d,properties:{...d.properties}})),Mi in d||tn in d&&d.additionalProperties!==!1?y0(t,d,n,r,o):d}):[{}]}function x0(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const c=i===void 0&&r?{}:i,u=He(e);s=s.map(m=>St(m,n,[]));const d=Pr(t,c,s,n,u);if(r){const m=oc(s,!1,n);return Pr(t,c,m,n,u),s.map(g=>lt(l,g))}return[lt(l,s[d])]}return[e]}function oc(t,e=!1,n){return t.map(r=>{if(!V(r))return r?{}:{not:{}};const i=e&&n?St(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function ac(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return x0(t,l,n,r,s).flatMap(u=>lc(t,a,u,n,r,i,s,o))}function lc(t,e,n,r,i,s,o,a){let l=[n];for(const c in e)if((i||D(o,[c])!==void 0)&&(!n.properties||c in n.properties)){const[u,d]=Cs(c,e);return Array.isArray(d)?l[0]=v0(n,d):V(d)&&(l=S0(t,n,r,c,d,i,s,o,a)),l.flatMap(m=>lc(t,u,m,r,i,s,o,a))}return l}function v0(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function S0(t,e,n,r,i,s,o,a,l){return Ze(t,i,n,a,s,o,l).flatMap(u=>{const{oneOf:d,...m}=u,g=lt(e,m);if(d===void 0)return g;const f=d.map(y=>typeof y=="boolean"||!(ue in y)?[y]:sc(t,y,n,s,o,a));return rc(f).flatMap(y=>w0(t,g,n,r,y,s,o,a,l))})}function w0(t,e,n,r,i,s,o,a,l){const c=i.filter(u=>{if(typeof u=="boolean"||!u||!u.properties)return!1;const{[r]:d}=u.properties;if(d){const m={type:"object",properties:{[r]:d}};return t.isValid(m,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"),[e]):c.flatMap(u=>{const d=u,[m]=Cs(r,d.properties),g={...d,properties:m};return Ze(t,g,n,a,s,o,l).map(p=>lt(e,p))})}function $n(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=He(n)||r,c=n[i].map(d=>Ce(t,d,e,s,o)),u=D(s,l);if(u!==void 0)return c.find(d=>ie(D(d,[se,l,Dt],D(d,[se,l,Ne])),u))}}function cc(t,e,n,r,i){let s=n;if(X(n,ue)&&(s=Ce(t,n,e,void 0,i)),ge(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&X(s,a))return s=D(s,a),cc(t,e,s,l,i)}function Sr(t,e,n,r,i,s){const o=cc(t,e,n,r,s);return o===void 0?i:o}const oa={title:"!@#$_UNKNOWN_$#@!"};function j0(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop(),c=String(l);o.length&&o.forEach(g=>{a=Sr(t,e,a,[se,g],{},s),X(a,W)?a=$n(t,e,a,c,W,D(i,g),s):X(a,Q)&&(a=$n(t,e,a,c,Q,D(i,g),s))}),X(a,W)?a=$n(t,e,a,c,W,i,s):X(a,Q)&&(a=$n(t,e,a,c,Q,i,s));let u=Sr(t,e,a,[se,l],oa,s);u===oa&&(u=void 0);const d=Sr(t,e,a,tl,[],s);let m;return u&&Array.isArray(d)&&(m=d.includes(c)),{field:u,isRequired:m}}function O0(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function A0(t,e){return function(n,r){if(n==null)return n;if(!Wt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var uc=A0(Vl);function E0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function C0(t,e,n){var r=Se(t)?O0:E0,i=arguments.length<3;return r(t,Ts(e),n,i,uc)}const _0={type:"object",$id:Yf,properties:{__not_really_there__:{type:"number"}}};function Yi(t,e,n,r,i){let s=0;return n&&(te(n.properties)?s+=C0(n.properties,(o,a,l)=>{const c=D(r,l);if(typeof a=="boolean")return o;if(X(a,ue)){const u=Ce(t,a,e,c,i);return o+Yi(t,e,u,c||{},i)}if((X(a,W)||X(a,Q))&&c){const u=X(a,W)?W:Q,d=He(a);return o+dn(t,e,c,D(a,u),-1,d,i)}if(a.type==="object"){const u=te(c)?1:0;return o+u+Yi(t,e,a,c,i)}if(a.type===Zn(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):Ct(n.type)&&n.type===Zn(r)&&(s+=1)),s}function dn(t,e,n,r,i=-1,s,o){const a=r.map(m=>St(m,e,[])),l=Xl(n,r,s);if(Zl(l))return l;const c=a.reduce((m,g,f)=>(Pr(t,n,[_0,g],e,s)===1&&m.push(f),m),[]);if(c.length===1)return c[0];c.length||ql(a.length,m=>c.push(m));const u=new Set,{bestIndex:d}=c.reduce((m,g)=>{const{bestScore:f}=m,p=a[g],y=Yi(t,e,p,n,o);return u.add(y),y>f?{bestIndex:g,bestScore:y}:m},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function dc(t){const e=t[Ne],n=Le(t);return V(e)&&Ct(e?.$data)&&n!=="object"&&n!=="array"}function fc(t){return Array.isArray(t.enum)&&t.enum.length===1||Ne in t}function Ps(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>V(e))}function fn(t){return t==null}function Xn(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((c,u)=>a[u]!==void 0?Xn(s[u],e[u],n,r,i):c);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(V(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const c=D(e,a),u=V(t)&&a in t,d=a in e,m=(l=D(t,a))!==null&&l!==void 0?l:{},g=u&&V(m)&&Object.values(m).some(y=>V(y)),f=u&&V(D(t,a)),p=d&&V(c);return f&&p&&!g?(o[a]={...D(t,a),...c},o):(o[a]=Xn(D(t,a),c,n,r,i&&(u||!d)),s)},s)}return r&&(t!==void 0&&fn(e)||typeof e=="number"&&Number.isNaN(e))||i&&!fn(e)?t:e}function Ut(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&V(o))r[i]=Ut(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},{...t})}function I0(t){if(Kf in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(Ne in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function T0(t,e){const n=new Map(t.map(s=>[String(s.value),s])),r=new Set(e.filter(s=>s!=="*").map(String)),i=t.filter(s=>!r.has(String(s.value)));return e.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function hn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:c}=M(e);s=l,o=c}let a=t.enum.map((l,c)=>({label:Array.isArray(s)?s[c]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=T0(a,o)),a}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=He(t);if(e){const{optionsSchemaSelector:s=i}=M(e);i=s}return n&&n.map((s,o)=>{const{title:a}=M(r?.[o]),l=s;let c,u=a;if(i){const d=D(l,[se,i],{});c=D(d,Dt,D(d,Ne)),u=u||d?.title||l.title||String(c)}else c=I0(l),u=u||l.title||String(c);return{schema:l,label:u,value:c}})}function Hr(t,e,n={},r){const i=Ce(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&fc(o)):!1}function Fs(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Hr(t,e.items,n,r)}const N0=["string","number","integer","boolean","null"];var mn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(mn||(mn={}));function gi(t,e=mn.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==mn.Ignore&&V(t.additionalItems)?t.additionalItems:{}}function hc(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ge(e)&&n===null?null:e}function aa(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!V(n)||!ge(n))&&(t[e]=n);else if(c!=="skipDefaults"){const u=i===void 0?s.includes(e):i;V(n)?c==="skipEmptyDefaults"?ge(n)||(t[e]=n):(!ge(n)||s.includes(e))&&(u||c!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||u&&s.includes(e))&&(t[e]=n)}}function wt(t,e,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:d=!1,initialDefaultsGenerated:m}=n;let g=V(i)?i:{};const f=V(e)?e:{};let p=r,y=null,v=l,w=a;if(f[Ne]!==void 0&&l?.constAsDefaults!=="never"&&!dc(f))p=f[Ne];else if(V(p)&&V(f.default)&&!f[Q]&&!f[W]&&!f[ue])p=Ut(p,f.default);else if(Dt in f&&!f[Q]&&!f[W]&&!f[ue])p=f.default;else if(ue in f){const b=f[ue];a.includes(b)||(w=a.concat(b),y=Kn(b,s));const x=i===void 0||V(i)&&ge(i);y&&!p&&x&&(p=f.default),d&&y&&!V(i)&&(g=i)}else if(cs in f){const b={...la(t,f,n,p),...g};[y]=ac(t,f,s,!1,[],b,c)}else if(Ps(f))p=f.items.map((b,x)=>wt(t,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:Array.isArray(r)?r[x]:void 0,rawFormData:g,required:u,shouldMergeDefaultsIntoFormData:d}));else if(W in f){const{oneOf:b,...x}=f;if(b.length===0)return;const S=He(f),{type:j="null"}=x;!Array.isArray(j)&&N0.includes(j)&&v?.constAsDefaults==="skipOneOf"&&(v={...v,constAsDefaults:"never"}),y=b[dn(t,s,i??f.default,b,0,S,c)],y=lt(x,y)}else if(Q in f){const{anyOf:b,...x}=f;if(b.length===0)return;const S=He(f);y=b[dn(t,s,i??f.default,b,0,S,c)],y=lt(x,y)}if(y)return wt(t,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:w,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:c,parentDefaults:p,rawFormData:i??g,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m});p===void 0&&(p=f.default);const A=la(t,f,n,p);let O=A??p;if(d){const{arrayMinItems:b={}}=l||{},{mergeExtraDefaults:x}=b,S=P0(t,f,s,i,l,c);(!V(i)||Ot in f)&&(O=Xn(O,S,x,!0))}return O}function P0(t,e,n,r,i,s){const o=!fc(e)&&Hr(t,e,n,s);let a=r;if(o){const c=hn(e);a=c?.some(d=>ie(d.value,r))?r:void 0}return e[Ne]&&i?.constAsDefaults==="always"&&(a=e.const),a}function F0(t,e,{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}={},d){{const m=V(n)?n:{},g=e,p=o?.allOf==="populateDefaults"&&Ot in g||o?.emptyObjectFields!=="skipEmptyDefaults"&&us in g?Ce(t,g,r,m,a):g,y=p[Ne],v=Object.keys(p.properties||{}).reduce((w,A)=>{var O;const b=D(p,[se,A],{}),x=V(y)&&y[A]!==void 0,S=(V(b)&&Ne in b||x)&&o?.constAsDefaults!=="never"&&!dc(b),j=wt(t,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[A]),rawFormData:D(m,[A]),required:(O=p.required)===null||O===void 0?void 0:O.includes(A),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});return aa(w,A,j,i,l,p.required,o,S,b?.type==="null"),w},{});if(p.additionalProperties&&!u){const w=V(p.additionalProperties)?p.additionalProperties:{},A=new Set,O=[];Object.keys(m).filter(b=>!p.properties||!p.properties[b]).forEach(b=>{A.add(b),O.push(b)}),V(d)&&O.length===0&&Object.keys(d).filter(b=>!p.properties||!p.properties[b]).forEach(b=>A.add(b)),A.forEach(b=>{var x;const S=wt(t,w,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[b]),rawFormData:D(m,[b]),required:(x=p.required)===null||x===void 0?void 0:x.includes(b),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});aa(v,b,S,i,l,O)})}return hc(e,v)}}function $0(t,e,{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}={},d){var m,g;let f=d;const p=e,y=(m=s?.arrayMinItems)!==null&&m!==void 0?m:{},{populate:v,mergeExtraDefaults:w}=y,A=v==="never",O=v==="requiredOnly",b=v==="all"||!A&&!O,x=(g=y?.computeSkipPopulate)!==null&&g!==void 0?g:(()=>!1),j=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=gi(p,mn.Fallback,I),P=Array.isArray(n)?n[I]:void 0;return wt(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:P,required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u})})),Array.isArray(n)){const _=gi(p);if(A)f=n;else{const I=n.map((P,F)=>wt(t,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:P,parentDefaults:D(f,[F]),required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}));f=Xn(f,I,(O&&a||b)&&w)}}if(A)return f??j;if(O&&!a)return f||void 0;let E;const C=Array.isArray(f)?f.length:0;if(!p.minItems||Fs(t,p,r,o)||x(t,p,r)||p.minItems<=C)E=f||!a&&!l?f:j;else{const _=f||[],I=gi(p,mn.Invert),T=I.default,P=Array.from({length:p.minItems-C},()=>wt(t,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:c}));E=_.concat(P)}return hc(e,E)}function la(t,e,n={},r){switch(Le(e)){case"object":return F0(t,e,n,r);case"array":return $0(t,e,n,r);default:return}}function mc(t,e,n,r,i=!1,s,o,a){if(!V(e))throw new Error(`Invalid schema: ${e}`);const l=Ce(t,e,r,n,o),c=wt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&V(l.default))return{...c,...n};if(V(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:u}=s||{};return Xn(c,n,!0,u==="useDefaultIfFormDataUndefined",!0)}return c}function pc(t={}){return"widget"in M(t)&&M(t).widget!=="hidden"}function gc(t,e,n={},r,i){if(n[fs]==="files")return!0;if(e.items){const s=Ce(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function D0(t,e,n={},r,i,s){const o=M(n,i),{label:a=!0}=o;let l=!!a;if(l){const c=Le(e),u=D(e,at,!1);c==="array"&&(l=u||Fs(t,e,r,s)||gc(t,e,n,r,s)||pc(n)),c==="object"&&(l=u),c==="boolean"&&n&&!n[fs]&&(l=!1),n&&n[Xf]&&(l=!1)}return l}function yc(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=Ur(t,o);n(a,o)&&_s(s,yn(o,t),a)}return s}function R0(t,e){return yc(t,e,function(n,r){return Gl(t,r)})}var $s=Dl(function(t,e){return t==null?{}:R0(t,e)});function k0(t,e){if(e.length===0&&typeof t!="object")return t;const n=$s(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function M0(t,e){const n=(i,s)=>typeof i!="object"||ge(i)||s&&!ge(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(d=>[...d,l]);c[ds]&&c[yr]!==""?s.push(c[yr]):r(c,s,u)}else l===yr&&c!==""&&o.forEach(u=>{const d=D(e,u),m=a.length===1;(n(d,m)||Array.isArray(d)&&d.every(g=>n(g,m)))&&s.push(u)})}),s};return r(t)}function Bn(t){return fn(t)||t===""?!0:Array.isArray(t)?t.length===0:V(t)?Object.values(t).every(Bn):!1}function U0(t,e){return e?e(t):nc(t)}function L0(t,e,n={},r,i){function s(f){return V(f)}function o(f){return V(f)}function a(f,p,y){var v;const{properties:w,additionalProperties:A,patternProperties:O,propertyNames:b}=f,x=new Set((v=f.required)!==null&&v!==void 0?v:[]);function S(E,C,_,I=!1){var T;const P=g(C,_,y[E]);if(!I&&V(P)){let F=o(C)?C:{};F.$ref!==void 0&&(F=Kn(F.$ref,n));const $=new Set((T=F.required)!==null&&T!==void 0?T:[]);if(Object.entries(P).every(([B,U])=>!$.has(B)&&Bn(U)))return}P!==void 0&&(y[E]=P)}if(w!==void 0)for(const[E,C]of Object.entries(w))S(E,C,p[E],x.has(E));let j;if(O!==void 0){j=[];const E=Object.entries(O).map(([_,I])=>[new RegExp(_),I]),C=new Set(Object.keys(w??{}));for(const[_,I]of Object.entries(p))if(!C.has(_)){const T=E.find(([P])=>P.test(_));T===void 0?j.push(_):S(_,T[1],I)}}if(A!==void 0&&A!==!1){const E=A;if(j!==void 0)for(const C of j)S(C,E,p[C]);else{const C=new Set(Object.keys(w??{}));for(const[_,I]of Object.entries(p))C.has(_)||S(_,E,I)}}if(b!==void 0)for(const[E,C]of Object.entries(p))y[E]=C;return y}function l(f,p,y){const{items:v,additionalItems:w}=f;if(v!==void 0)if(Array.isArray(v))for(let A=0;A<v.length;A+=1)y.push(g(v[A],p[A]));else for(let A=0;A<p.length;A+=1)y.push(g(v,p[A]));if(w)for(let A=y.length;A<p.length;A+=1)y.push(g(w,p[A]));return y}function c(f,p,y){const{if:v,then:w,else:A}=f;if(v===void 0)return y;const b=(o(v)?t.isValid(v,p,n):v)?w:A;return b===void 0?y:g(b,p,y)}function u(f,p,y,v){if(!Array.isArray(f)||Hr(t,p,n,i))return v;const w=oc(f,!0,n),A=dn(t,n,y,w,0,He(p),i),O=f[A],b=V(O)?St(O,n,[]):w[A];return g(b,y,v)}function d(f,p,y){const{anyOf:v}=f;if(!Array.isArray(v))return y;if(p===void 0||Array.isArray(p)&&p.length===0||V(p)&&Object.keys(p).length===0){let w=y;for(const A of v)w=g(A,p,w);return w}return u(v,f,p,y)}function m(f,p,y){const{dependencies:v}=f;if(v===void 0||!s(p))return y;let w=y;for(const[A,O]of Object.entries(v))A in p&&!Array.isArray(O)&&(w=g(O,p,w));return w}function g(f,p,y){if(p===void 0||f===!1)return;if(f===!0||ge(f))return p;let v=f;const{$ref:w,allOf:A}=v;if(w!==void 0)return g(Kn(w,n),p,y);A&&(v=U0(v,i));let O=d(v,p,u(v.oneOf,v,p,y));const b=Le(v);if(b==="object"){if(!s(p))return;O=a(v,p,s(O)?O:{})}else if(b==="array"){if(!Array.isArray(p))return;O=l(v,p,Array.isArray(O)?O:[])}else O===void 0&&(O=p);return m(v,p,c(v,p,O))}return g(e,r)}const De=Symbol("no Value");function bc(t){if(Array.isArray(t.enum))return t.enum;const e=t.oneOf||t.anyOf;if(!Array.isArray(e))return;const n=e.map(r=>Ne in r?r[Ne]:Array.isArray(r.enum)&&r.enum.length===1?r.enum[0]:De).filter(r=>r!==De);return n.length>0?n:void 0}function B0(t,e){const n=bc(t);if(!n||n.some(i=>ie(i,e)))return De;const r=D(t,Dt,De);return r!==De&&n.some(i=>ie(i,r))?r:n.length===1?n[0]:void 0}function Ji(t,e,n,r,i={},s){let o;if(X(n,se)){const a={};if(X(r,se)){const u=D(r,se,{});Object.keys(u).forEach(d=>{X(i,d)&&(a[d]=void 0)})}const l=Object.keys(D(n,se,{})),c={};l.forEach(u=>{const d=D(i,u);let m=D(r,[se,u],{}),g=D(n,[se,u],{});X(m,ue)&&(m=Ce(t,m,e,d,s)),X(g,ue)&&(g=Ce(t,g,e,d,s));const f=D(m,"type"),p=D(g,"type");if(!f||f===p)if(X(a,u)&&delete a[u],p==="object"||p==="array"&&Array.isArray(d)){const y=Ji(t,e,g,m,d,s);(y!==void 0||p==="array")&&(c[u]=y)}else{const y=D(g,Dt,De),v=D(m,Dt,De);y!==De&&y!==d&&(v===d?a[u]=y:D(g,"readOnly")===!0&&(a[u]=void 0));const w=D(g,Ne,De),A=D(m,Ne,De);if(w!==De&&w!==d&&(a[u]=A===d?w:void 0),X(i,u)){const O=B0(g,d);O!==De&&(a[u]=O)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...c}}else if(D(r,"type")==="array"&&D(n,"type")==="array"&&Array.isArray(i)){let a=D(r,"items"),l=D(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){X(a,ue)&&(a=Ce(t,a,e,i,s)),X(l,ue)&&(l=Ce(t,l,e,i,s));const c=D(a,"type"),u=D(l,"type");if(!c||c===u){const d=D(n,"maxItems",-1);if(u==="object")o=i.reduce((m,g)=>{const f=Ji(t,e,l,a,g,s);return f!==void 0&&(d<0||m.length<d)&&m.push(f),m},[]);else{const m=bc(l),g=m?i.filter(f=>m.some(p=>ie(p,f))):i;o=d>0&&g.length>d?g.slice(0,d):g}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function gt(t,e,n,r,i,s=[],o){if(ue in e||cs in e||Ot in e||us in e){const l=Ce(t,e,r,i,o);if(s.findIndex(u=>ie(u,l))===-1)return gt(t,l,n,r,i,s.concat(l),o)}let a={[yr]:n.replace(/^\./,"")};if(W in e||Q in e){const l=W in e?e.oneOf:e.anyOf,c=He(e),u=dn(t,r,i,l,0,c,o),d=l[u];a={...a,...gt(t,d,n,r,i,s,o)}}if(tn in e&&e[tn]!==!1){ce(a,ds,!0);const l=te(e[tn])?e[tn]:{},c=D(e,se,{});for(const u of Object.keys(i??{}))u in c||(a[u]=gt(t,l,`${n}.${u}`,r,D(i,[u]),s,o))}if(an in e&&Array.isArray(i)){const{items:l,additionalItems:c}=e;Array.isArray(l)?i.forEach((u,d)=>{l[d]?a[d]=gt(t,l[d],`${n}.${d}`,r,u,s,o):c?a[d]=gt(t,c,`${n}.${d}`,r,u,s,o):console.warn(`Unable to generate path schema for "${n}.${d}". No schema defined for it`)}):i.forEach((u,d)=>{a[d]=gt(t,l,`${n}.${d}`,r,u,s,o)})}else if(se in e)for(const l in e.properties){const c=D(e,[se,l],{});a[l]=gt(t,c,`${n}.${l}`,r,D(i,[l]),s,o)}return a}function q0(t,e,n="",r,i,s){return gt(t,e,n,r,i,void 0,s)}class V0{constructor(e,n,r,i){n&&n[Pn]===br?this.rootSchema=Hi(n,D(n,de,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!ie(this.rootSchema,n)||!ie(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return j0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return $n(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return mc(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return D0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return dn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Pr(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Sr(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return gc(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Fs(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Hr(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return L0(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return Ce(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return Ji(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return q0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function z0(t,e,n={},r){return new V0(t,e,n,r)}function W0(t){var e;if(!t.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=t.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(((e=a.map(u=>u.split("=")).find(([u])=>u==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const u=atob(s),d=new Array(u.length);for(let g=0;g<u.length;g+=1)d[g]=u.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:c}}catch(u){throw new Error(`File is invalid: ${u.message}`)}}function yt(t,e){let n=String(t);for(;n.length<e;)n=`0${n}`;return n}function xc(t,e){const n=t<=0&&e<=0,r=t<0||e<0;if(!n&&r)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=n?i+t:t,o=n?i+e:e;if(s>o)return xc(e,t).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:yt(l,2)});return a}function H0(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function G0(t,e){return H0(t,e)}function Gr(t,e=[],n){if(Array.isArray(t))return t.map(s=>Gr(s,e)).filter(s=>s!==void 0);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function vc(t,e,n=[]){const r=Gr(t,n);return Array.isArray(e)?e.filter(i=>!ie(i,r)):ie(r,e)?void 0:e}function sr(t,e){return Array.isArray(e)?e.some(n=>ie(n,t)):ie(e,t)}function K0(t,e=[],n=!1){const r=e.map((i,s)=>sr(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Sc(t,e,n,r="indexed",i){if(typeof t>"u"||n&&Array.isArray(t)&&t.length<1||!n&&t===i)return i;if(r==="realValue")return n?t.map(String):String(t);const o=K0(t,e,n);return typeof o>"u"?i:o}function wc(t,e,n=[]){const r=Gr(t,n);if(!fn(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}function ca(t,e,n){if(t===""||!Array.isArray(e))return n;const r=e.find(s=>String(s.value)===t);if(r)return r.value;const i=Number(t);return!Number.isNaN(i)&&i>=0&&i<e.length?e[i].value:n}function Te(t,e,n="indexed",r){return n!=="realValue"?Gr(t,e,r):Array.isArray(t)?t.map(i=>ca(i,e,r)):ca(t,e,r)}function or(t,e,n="indexed"){return n!=="realValue"?String(e):fn(t)?"":String(typeof t=="object"?e:t)}var Y0=1,J0=4;function Ds(t){return Ln(t,Y0|J0)}function Z0(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:_s(t,e,n,r)}class jc{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?D(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},Z0(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Ds(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=D(r,Ee);return Array.isArray(i)||(i=[],r[Ee]=i),Array.isArray(e)?ce(r,Ee,[...new Set([...i,...e])]):ce(r,Ee,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ce(r,Ee,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ce(n,Ee,[]),this}}var X0=200;function Q0(t,e,n,r){var i=-1,s=Ns,o=!0,a=t.length,l=[],c=e.length;if(!a)return l;e.length>=X0&&(s=Jn,o=!1,e=new Mt(e));e:for(;++i<a;){var u=t[i],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=c;m--;)if(e[m]===d)continue e;l.push(u)}else s(e,d,r)||l.push(u)}return l}var ex=Vr(function(t,e){return Yn(t)?Q0(t,ir(e,1,Yn,!0)):[]});function tx(t,e){if(t==null)return{};var n=gn(As(t),function(r){return[r]});return e=Ts(e),yc(t,n,function(r,i){return e(r,i[0])})}function ua(t,e){const n=At(t),r=At(e);if(t===e||!n&&!r)return[];if(n&&!r)return ze(t);if(!n&&r)return ze(e);const i=ze(tx(t,(o,a)=>!ie(o,D(e,a)))),s=ex(ze(e),ze(t));return[...i,...s]}function nx(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:c}=t,u={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},m={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(d,u,m);break;case"DMY":g.push(u,d,m);break;default:g.push(m,d,u)}return e&&g.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:c}),g}function Oc(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Ac(t,e,n={},r=!0){const i={type:e||"text",...Oc(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(t.formatMinimum!==void 0&&(i.min=t.formatMinimum),t.formatMaximum!==void 0&&(i.max=t.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function xn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const da={props:{disabled:!1},submitText:"Submit",norender:!1};function Ec(t={}){const e=M(t);if(e&&e[Cr]){const n=e[Cr];return{...da,...n}}return da}function q(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var rx=0;function Cc(t){var e=++rx;return ps(t)+e}function Rs(){if(D(globalThis,"process.env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Cc("test-id-")),t.get(n)}})}const yi={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 ix(t){let e=D(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>h.jsx(t,{options:{...n,...r},...i}),ce(t,"MergedWidget",e)}return e}function tt(t,e,n={}){const r=Le(t);if(typeof e=="function"||e&&to.isForwardRef(N.createElement(e))||to.isMemo(e))return ix(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return tt(t,i,n)}if(typeof r=="string"){if(!(r in yi))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in yi[r]){const i=n[yi[r][e]];return tt(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function sx(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e&=e}return e.toString(16)}function ox(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function Xe(t){return sx(ox(t))}function ax(t){return Xe(t)}function lx(t,e,n={}){try{return tt(t,e,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 Ht(t,e){return`${Ct(t)?t:t[de]}__${e}`}function Gt(t){return Ht(t,"description")}function ks(t){return Ht(t,"error")}function Kr(t){return Ht(t,"examples")}function Ms(t){return Ht(t,"help")}function Yr(t){return Ht(t,"title")}function Fe(t,e=!1){const n=e?` ${Kr(t)}`:"";return`${ks(t)} ${Gt(t)} ${Ms(t)}${n}`}function $t(t,e){return`${t}-${e}`}function Qe(t,e){return Ht(t,e)}function bi(t,e){return Ht(t,`optional${e}`)}function vn(t){return!fn(t)&&(!te(t)||Array.isArray(t)||!ge(t))}function cx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ie(e,n))return!0;if(ue in n){const i=r.retrieveSchema(n);return ie(e,un(i,Mn))}return!1}function _c(t,e,n){return e?n:t}function ux(t){return t?new Date(t).toJSON():void 0}function Us(t,e,n){const r=[Zf];return X(t,uo)&&r.unshift(uo),D(t,[...r,e],n)}function dx(t,e){if(!Array.isArray(e))return t;const n=u=>u.reduce((d,m)=>(d[m]=!0,d),{}),r=u=>u.length>1?`properties '${u.join("', '")}'`:`property '${u[0]}'`,i=n(t),s=e.filter(u=>u==="*"||i[u]),o=n(s),a=t.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 xi(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error(`Unable to parse date ${t}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function rn(t,e,n,r){if(!V(e))return r;const i=Ce(t,e,n,r);if(Array.isArray(r)){const u=i.items;if(!u)return r;let d=!1;const m=r.map((g,f)=>{let p=u;Array.isArray(u)&&(p=u[f]||i.additionalItems||{});const y=rn(t,p,n,g);return y!==g&&(d=!0),y===void 0?{}:y});return d?m:r}const{properties:s,required:o=[]}=i;if(!V(r)||!s)return r;const a={},l=r;let c=!1;for(const u of Object.keys(l)){const d=l[u],m=s[u]||{},g=o.includes(u),f=V(d),p=Array.isArray(d);if((f||p)&&s[u]){const y=rn(t,m,n,d);(g||!Bn(y))&&(a[u]=y,c=!0)}else(g||!Bn(d)||!s[u])&&(a[u]=d,Bn(d)||(c=!0))}if(!(!c&&Object.keys(a).length===0))return a}function fx(t,e,n){var r,i;const s=(r=t[Mn])!==null&&r!==void 0?r:t[ue],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ge(e)?l={...a}:l=Ut(a,e):l=e||{},o){let c=t;if(s&&t[ue]&&!t[Mn])try{c=Kn(s,n.rootSchema)}catch(u){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
3
|
-
`,u),l}for(const u of[W,Q]){const d=c[u];if(Array.isArray(d)&&d.length>0){const m=l[u],g=Array.isArray(m)?[...m]:[];let f=!1;for(let p=0;p<d.length;p++){const y=d[p],v=(i=y?.[Mn])!==null&&i!==void 0?i:y?.[ue];if(v&&v in o){const w=g[p]||{};g[p]=Ut(o[v],w),f=!0}}f&&(l[u]=g)}}}return l}function qn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return qn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return qn(t.oneOf[0]);if(t.allOf){const e=n=>qn(n);return t.allOf.some(e)}return!1}function fa(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.hasOwn(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function Ic(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!fa(o,e)||!fa(a,n)}const{props:i,state:s}=t;return!ie(i,e)||!ie(s,n)}function ha(t){const e=Jl(t.map(n=>te(n)?Le(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function ar(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=M(r,t.globalUiOptions);let s;return Q in e&&Array.isArray(e[Q])?s=ha(e[Q]):W in e&&Array.isArray(e[W])?s=ha(e[W]):s=Le(e),!cx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function ma(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),c=new Date(l).toJSON();return e?c:c.slice(0,10)}function Ls(t,e=[]){if(!t)return[];let n=[];return Ee in t&&(n=n.concat(t[Ee].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==Ee){const s=t[i];if(At(s))return r.concat(Ls(s,[...e,i]))}return r},n)}function Tc(t){return Se(t)?gn(t,Et):Qn(t)?[t]:ws(ul(ps(t)))}function hx(t){const e=new jc;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Tc(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Be(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[de]:a,...l!==void 0&&{name:l}}}function Nc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;const r=t[n];return At(r)?{...e,[n]:Nc(r)}:{...e,[n]:r}},{})}function mx(t){return Object.values(t).every(e=>e!==-1)}function px(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:c,autofocus:u,registry:d,onBlur:m,onFocus:g}=t,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,y=N.useCallback(v=>s(n,v),[s,n]);return h.jsx(p,{schema:{type:"integer"},id:f,name:a,className:e,options:{enumOptions:xc(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:c,autofocus:u,onChange:y,onBlur:m,onFocus:g,registry:d,label:"","aria-describedby":Fe(o)})}function gx(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(xi(o,e));N.useEffect(()=>{l(xi(o,e))},[e,o]);const c=N.useCallback((g,f)=>{const p={...a,[g]:typeof f>"u"?-1:f};mx(p)?s(ma(p,e)):l(p)},[a,s,e]),u=N.useCallback(g=>{g.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=N.useCallback(g=>{if(g.preventDefault(),n||r)return;const f=xi(new Date().toJSON(),e);s(ma(f,e))},[n,r,e,s]);return{elements:N.useMemo(()=>nx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:c,handleClear:u,handleSetNow:d}}function Kt(t){const e=N.useRef(t);return ie(t,e.current)||(e.current=t),e.current}function yx(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function bx(t){const{name:e,size:n,type:r}=t;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:yx(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function xx(t){return Promise.all(Array.from(t).map(bx))}function pa(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=W0(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function vx(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?pa(t):pa([t||""]),[t]),s=N.useCallback(async a=>{const c=(await xx(a)).map(u=>u.dataURL||null);e(n?r.concat(...c):c[0])},[r,n,e]),o=N.useCallback(a=>{if(n){const l=r.filter((c,u)=>u!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Sx(t){if(!t)return"";const e=new Date(t),n=yt(e.getFullYear(),4),r=yt(e.getMonth()+1,2),i=yt(e.getDate(),2),s=yt(e.getHours(),2),o=yt(e.getMinutes(),2),a=yt(e.getSeconds(),2),l=yt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Dn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Ls(e),o=e;return ge(i)||(o=Ut(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function wx(t){const e=t;for(const n in e)if(Object.hasOwn(e,n)){const r=e[n];n===ue&&typeof r=="string"&&r.startsWith("#")?e[n]=il+r:e[n]=Bs(r)}return t}function jx(t){return t.map(e=>Bs(e))}function Bs(t){return Array.isArray(t)?jx([...t]):te(t)?wx({...t}):t}var K;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.DeprecatedLabel="%1 (deprecated)",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(K||(K={}));function Ox(t,e){var n=Se(t)?xs:uc;return n(t,Ll(e))}function Ax(t,e){return t==null?!0:Pl(t,e)}function Zi(){return Cc("rjsf-array-item-")}function ga(t){return Array.isArray(t)?t.map(e=>({key:Zi(),item:e})):[]}function Pc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function Ex(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function Fc(t,e,n,r){let{addable:i}=M(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function $c(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function Cx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Ps(e)&&Gf(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function _x(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:c,onBlur:u,onFocus:d,registry:m,rawErrors:g,name:f,onSelectChange:p}=t,{widgets:y,schemaUtils:v,globalFormOptions:w,globalUiOptions:A}=m,O=v.retrieveSchema(e.items,i),b=r?.items??r,x=hn(O,b),{widget:S="select",title:j,...E}=M(r,A),C=tt(e,S,y),_=j??e.title??f,I=v.getDisplayLabel(e,r,A),T=Kt(Be("",w,n,!0));return h.jsx(C,{id:T[de],name:f,multiple:!0,onChange:p,onBlur:u,onFocus:d,options:{...E,enumOptions:x},schema:e,uiSchema:r,registry:m,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:c,autofocus:a,rawErrors:g,htmlName:T.name})}function Ix(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:c,onBlur:u,onFocus:d,formData:m=[],registry:g,rawErrors:f,name:p,onSelectChange:y}=t,{widgets:v,schemaUtils:w,globalFormOptions:A,globalUiOptions:O}=g,{widget:b,title:x,...S}=M(r,O),j=tt(e,b,v),E=x??e.title??p,C=w.getDisplayLabel(e,r,O),_=Kt(Be("",A,n,!0));return h.jsx(j,{id:_[de],name:p,multiple:!0,onChange:y,onBlur:u,onFocus:d,options:S,schema:e,uiSchema:r,registry:g,value:m,disabled:i,readonly:s,hideError:l,required:a,label:E,hideLabel:!C,placeholder:c,autofocus:o,rawErrors:f,htmlName:_.name})}function Tx(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:c,onFocus:u,registry:d,formData:m=[],rawErrors:g,onSelectChange:f}=t,{widgets:p,schemaUtils:y,globalFormOptions:v,globalUiOptions:w}=d,{widget:A="files",title:O,...b}=M(n,w),x=tt(e,A,p),S=O??e.title??i,j=y.getDisplayLabel(e,n,w),E=Kt(Be("",v,r,!0));return h.jsx(x,{options:b,id:E[de],name:i,multiple:!0,onChange:f,onBlur:c,onFocus:u,schema:e,uiSchema:n,value:m,disabled:s,readonly:o,required:l,registry:d,autofocus:a,rawErrors:g,label:S,hideLabel:!j,htmlName:E.name})}function Dc(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:c,canAdd:u,canRemove:d=!0,canMoveUp:m,canMoveDown:g,itemSchema:f,itemData:p,itemUiSchema:y,itemFieldPathId:v,itemErrorSchema:w,autofocus:A,onBlur:O,onFocus:b,onChange:x,rawErrors:S,totalItems:j,title:E,handleAddItem:C,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=t,{schemaUtils:P,fields:{ArraySchemaField:F,SchemaField:$},globalUiOptions:R}=a,B=Kt(v),U=F||$,Y=q("ArrayFieldItemTemplate",a,l),ne=P.getDisplayLabel(f,y,R),{description:fe}=M(y),ye=!!fe||!!f.description,{orderable:k=!0,removable:le=!0,copyable:ee=!1}=l,H={moveUp:k&&m,moveDown:k&&g,copy:ee&&u,remove:le&&d,toolbar:!1};H.toolbar=Object.keys(H).some(xe=>H[xe]);const G=N.useCallback(xe=>{C(xe,n+1)},[C,n]),z=N.useCallback(xe=>{_(xe,n)},[_,n]),re=N.useCallback(xe=>{I(xe,n)},[I,n]),oe=N.useCallback(xe=>{T(xe,n,n-1)},[T,n]),Oe=N.useCallback(xe=>{T(xe,n,n+1)},[T,n]),Ae={children:h.jsx(U,{name:r,title:E,index:n,schema:f,uiSchema:y,formData:p,errorSchema:w,fieldPathId:B,required:Ex(f),onChange:x,onBlur:O,onFocus:b,registry:a,disabled:i,readonly:o,hideError:s,autofocus:A,rawErrors:S}),buttonsProps:{fieldPathId:B,disabled:i,readonly:o,canAdd:u,hasCopy:H.copy,hasMoveUp:H.moveUp,hasMoveDown:H.moveDown,hasRemove:H.remove,index:n,totalItems:j,onAddItem:G,onCopyItem:z,onRemoveItem:re,onMoveUpItem:oe,onMoveDownItem:Oe,registry:a,schema:f,uiSchema:y},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:H.toolbar,index:n,totalItems:j,readonly:o,registry:a,schema:f,uiSchema:y,parentUiSchema:c,displayLabel:ne,hasDescription:ye};return h.jsx(Y,{...Ae})}function Nx(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:m=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,onChange:v,keyedFormData:w,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x}=t,S=e.title||a||o,{schemaUtils:j,fields:E,formContext:C,globalFormOptions:_,globalUiOptions:I}=g,{OptionalDataControlsField:T}=E,P=M(n,I),F=te(e.items)?e.items:{},$=j.retrieveSchema(F),R=Pc(w),B=ar(g,e,d,n),U=vn(s),Y=Fc(g,e,R,n)&&(!B||U),ne=U?w:[],fe=B?" rjsf-optional-array-field":"",ye=t.childFieldPathId??i,k=B?h.jsx(T,{...t,fieldPathId:ye}):void 0,le={canAdd:Y,items:ne.map((H,G)=>{const{key:z,item:re}=H,oe=re,Oe=j.retrieveSchema(F,oe),Ae=r?r[G]:void 0,xe=Be(G,_,ye),$e=$c(n,re,G,C),ht={itemKey:z,index:G,name:o&&`${o}-${G}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:m,readonly:c,disabled:l,required:d,title:S?`${S}-${G+1}`:void 0,canAdd:Y,canMoveUp:G>0,canMoveDown:G<R.length-1,itemSchema:Oe,itemFieldPathId:xe,itemErrorSchema:Ae,itemData:oe,itemUiSchema:$e,autofocus:u&&G===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:w.length,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x,onChange:v};return h.jsx(Dc,{...ht},z)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:A,readonly:c,required:d,schema:e,title:S,formData:R,rawErrors:y,registry:g,optionalDataControl:k},ee=q("ArrayFieldTemplate",g,P);return h.jsx(ee,{...le})}function Px(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:m=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,keyedFormData:v,onChange:w,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x}=t;let{formData:S=[]}=t;const j=e.title||a||o,{schemaUtils:E,fields:C,formContext:_,globalFormOptions:I,globalUiOptions:T}=g,P=M(n,T),{OptionalDataControlsField:F}=C,$=ar(g,e,d,n),R=vn(r),U=(te(e.items)?e.items:[]).map((G,z)=>E.retrieveSchema(G,S[z])),Y=te(e.additionalItems)?E.retrieveSchema(e.additionalItems,r):null,ne=t.childFieldPathId??s;S.length<U.length&&(S=S.concat(new Array(U.length-S.length)));const fe=R?v:[],ye=$?" rjsf-optional-array-field":"",k=$?h.jsx(F,{...t,fieldPathId:ne}):void 0,le=Fc(g,e,S,n)&&!!Y&&(!$||R),ee={canAdd:le,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${ye}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((G,z)=>{const{key:re,item:oe}=G,Oe=oe,Ae=z>=U.length,xe=(Ae&&te(e.additionalItems)?E.retrieveSchema(e.additionalItems,Oe):U[z])||{},$e=Be(z,I,ne);let ht;Ae?ht=n.additionalItems:Array.isArray(n.items)?ht=n.items[z]:ht=$c(n,oe,z,_);const wn=i?i[z]:void 0,jn={index:z,itemKey:re,name:o&&`${o}-${z}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:m,readonly:c,disabled:l,required:d,title:j?`${j}-${z+1}`:void 0,canAdd:le,canRemove:Ae,canMoveUp:z>=U.length+1,canMoveDown:Ae&&z<S.length-1,itemSchema:xe,itemData:Oe,itemUiSchema:ht,itemFieldPathId:$e,itemErrorSchema:wn,autofocus:u&&z===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:v.length,onChange:w,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x};return h.jsx(Dc,{...jn},re)}),onAddClick:A,readonly:c,required:d,registry:g,schema:e,uiSchema:n,title:j,errorSchema:i,rawErrors:y,optionalDataControl:k},H=q("ArrayFieldTemplate",g,P);return h.jsx(H,{...ee})}function Fx(t=[]){const e=N.useMemo(()=>Xe(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:ga(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((c,u)=>({key:c.key,item:a[u]})):ga(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=Pc(a),c=Xe(l);return r({formDataHash:c,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function $x(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:c,translateString:u}=s,{keyedFormData:d,updateKeyedFormData:m}=Fx(o),g=t.childFieldPathId??i,f=N.useCallback((x,S)=>{x&&x.preventDefault();let j;if(r){j={};for(const _ in r){const I=parseInt(_);S===void 0||I<S?ce(j,[I],r[_]):I>=S&&ce(j,[I+1],r[_])}}const E={key:Zi(),item:Cx(s,e)},C=[...d];S!==void 0?C.splice(S,0,E):C.push(E),a(m(C),g.path,j)},[d,s,e,a,m,r,g]),p=N.useCallback((x,S)=>{x&&x.preventDefault();let j;if(r){j={};for(const _ in r){const I=parseInt(_);I<=S?ce(j,[I],r[_]):I>S&&ce(j,[I+1],r[_])}}const E={key:Zi(),item:Ds(d[S].item)},C=[...d];S!==void 0?C.splice(S+1,0,E):C.push(E),a(m(C),g.path,j)},[d,a,m,r,g]),y=N.useCallback((x,S)=>{x&&x.preventDefault();let j;if(r){j={};for(const C in r){const _=parseInt(C);_<S?ce(j,[_],r[C]):_>S&&ce(j,[_-1],r[C])}}const E=d.filter((C,_)=>_!==S);a(m(E),g.path,j)},[d,a,m,r,g]),v=N.useCallback((x,S,j)=>{x&&(x.preventDefault(),x.currentTarget.blur());let E;if(r){E={};for(const I in r){const T=parseInt(I);T==S?ce(E,[j],r[S]):T==j?ce(E,[S],r[j]):ce(E,[I],r[T])}}function C(){const I=d.slice();return I.splice(S,1),I.splice(j,0,d[S]),I}const _=C();a(m(_),g.path,E)},[d,a,m,r,g]),w=N.useCallback((x,S,j,E)=>{a(x===void 0?null:x,S,j,E)},[a]),A=N.useCallback(x=>{a(x,g.path,void 0,g?.[de])},[a,g]),O={...t,formData:o,fieldPathId:g,onSelectChange:A},b={...t,handleAddItem:f,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:v,keyedFormData:d,onChange:w};if(!(an in e)){if(!l.useFallbackUiForUnsupportedType){const S=M(n),j=q("UnsupportedFieldTemplate",s,S);return h.jsx(j,{schema:e,fieldPathId:i,reason:u(K.MissingItems),registry:s})}const x={...e,[an]:{type:void 0}};O.schema=x,b.schema=x}return c.isMultiSelect(O.schema)?h.jsx(_x,{...O}):pc(n)?h.jsx(Ix,{...O}):Ps(O.schema)?h.jsx(Px,{...b}):c.isFilesArray(O.schema,n)?h.jsx(Tx,{...O}):h.jsx(Nx,{...b})}function Dx(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:c,hideError:u,autofocus:d,title:m,onChange:g,onFocus:f,onBlur:p,rawErrors:y}=t,{title:v}=e,{widgets:w,translateString:A,globalUiOptions:O}=o,{widget:b="checkbox",title:x,label:S=!0,enumNames:j,...E}=M(r,O),C=tt(e,b,w),_=A(K.YesLabel),I=A(K.NoLabel);let T;const P=x??v??m??n;if(Array.isArray(e.oneOf))T=hn({oneOf:e.oneOf.map($=>{if(te($))return{...$,title:$.title||($.const===!0?_:I)}}).filter($=>$)},r);else{const $=e.enum??[!0,!1];!j&&$.length===2&&$.every(R=>typeof R=="boolean")?T=[{value:$[0],label:$[0]?_:I},{value:$[1],label:$[1]?_:I}]:T=hn({enum:$},r)}const F=N.useCallback(($,R,B)=>g($,i.path,R,B),[g,i]);return h.jsx(C,{options:{...E,enumOptions:T},schema:e,uiSchema:r,id:i.$id,name:n,onChange:F,onFocus:f,onBlur:p,label:P,hideLabel:!S,value:s,required:a,disabled:l,readonly:c,hideError:u,registry:o,autofocus:d,rawErrors:y,htmlName:i.name})}function Rx(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function kx(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function Mx(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function Ux(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:c=!1,onBlur:u,onFocus:d,registry:m,fieldPathId:g,onChange:f,errorSchema:p}=t,{translateString:y,fields:v,globalFormOptions:w}=m,[A,O]=N.useState(kx(n)),b=M(o),x=Kt(Be("__internal_type_selector",w,g)),S=y(K.Type),j=N.useMemo(()=>Rx(S),[S]),E=I=>{I!=null&&(O(I),f(Mx(n,I),g.path,p,e))};if(!w.useFallbackUiForUnsupportedType){const{reason:I=y(K.UnknownFieldType,[String(i.type)])}=t,T=q("UnsupportedFieldTemplate",m,b);return h.jsx(T,{schema:i,fieldPathId:g,reason:I,registry:m})}const C=q("FallbackFieldTemplate",m,b),{SchemaField:_}=v;return h.jsx(C,{schema:i,registry:m,typeSelector:h.jsx(_,{fieldPathId:x,name:`${s}__fallback_type`,schema:j,formData:A,onChange:E,onBlur:u,onFocus:d,registry:m,hideLabel:!r,disabled:l,readonly:c,required:a},n?Xe(n):"__empty__"),schemaField:h.jsx(_,{...t,schema:{type:A,title:y(K.Value),...A==="object"&&{additionalProperties:!0}}})})}function Lx(t,e){return gn(e,function(n){return t[n]})}function Bx(t){return t==null?[]:Lx(t,ze(t))}var qx=Math.max;function Vx(t,e,n,r){t=Wt(t)?t:Bx(t),n=n?Bl(n):0;var i=t.length;return n<0&&(n=qx(i+n,0)),Ct(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Kl(t,e,n)>-1}var zx=Math.min;function Wx(t,e,n){for(var r=Ns,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,c=[];o--;){var u=t[o];l=zx(u.length,l),a[o]=i>=120&&u.length>=120?new Mt(o&&u):void 0}u=t[0];var d=-1,m=a[0];e:for(;++d<i&&c.length<l;){var g=u[d],f=g;if(g=g!==0?g:0,!(m?Jn(m,f):r(c,f))){for(o=s;--o;){var p=a[o];if(!(p?Jn(p,f):r(t[o],f)))continue e}m&&m.push(f),c.push(g)}}return c}function Hx(t){return Yn(t)?t:[]}var ya=Vr(function(t){var e=gn(t,Hx);return e.length&&e[0]===t[0]?Wx(e):[]});function wr(t,e){return zr(t,e)}function Rc(t){return t===void 0}var et;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(et||(et={}));var Vn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Vn||(Vn={}));const Gx=/^\$lookup=(.+)/,vi="layoutGrid";function ba(t,e){return t??e}function Kx(t){return/^\d+?$/.test(t)}const jt=Rs();function Yx(t,e,n,r,i){const s=D(n,[Ui],{}),o=D(n,t),a={...D(o,[vt],{}),...e,...s},l={...o};ge(a)||ce(l,[vt],a),ge(s)||ce(l,[Ui],s);let{readonly:c}=M(l);return(i===!0||Rc(c)&&r===!0)&&(c=!0,X(a,ei)?ce(l,[vt,ei],!0):ce(l,`ui:${ei}`,!0)),{fieldUiSchema:l,uiReadonly:c}}function Jx(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Wi([e]).sort(),i=Wi([n]).sort();switch(t){case Vn.ALL:return wr(r,i);case Vn.SOME:return ya(r,i).length>0;case Vn.NONE:return ya(r,i).length===0;default:return!1}}function Jr(t,e,n){let r={},i=t[e];if(At(i)){const{children:s,className:o,...a}=i;if(i=s,o){const c=o.split(" ").map(u=>Us(n,u,u)).join(" ");r={...a,className:c}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function xa(t,e,n){let r;if(Kx(n)&&t&&t?.type==="array"&&X(t,an)){const i=Number(n),s=t[an];Array.isArray(s)?i>s.length?r=Nl(s):r=s[i]:r=s,e={[de]:e[de],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function Zx(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const c=e.split("."),u=c.pop();let d=s.retrieveSchema(a,r),m=r,g=d.readOnly;c.forEach(y=>{if(l=Be(y,o,l),X(d,se))a=D(d,[se,y],{});else if(d&&(X(d,W)||X(d,Q))){const v=X(d,W)?W:Q,w=s.findSelectedOptionInXxxOf(d,y,v,m);a=D(w,[se,y],{})}else{const v=xa(d,l,y);a=v.rawSchema??{},l=v.fieldPathId}m=D(m,y,{}),d=s.retrieveSchema(a,m),g=ba(d.readOnly,g)});let f,p=!1;if(ge(d)&&(d=void 0),d&&u){if(d&&(X(d,W)||X(d,Q))){const v=X(d,W)?W:Q;d=s.findSelectedOptionInXxxOf(d,u,v,m)}l=Be(u,o,l),p=d!==void 0&&Array.isArray(d.required)&&Vx(d.required,u);const y=xa(d,l,u);if(y.rawSchema?(d=y.rawSchema,l=y.fieldPathId):(d=D(d,[se,u]),d=d&&s.retrieveSchema(d)),g=ba(d?.readOnly,g),d&&(X(d,W)||X(d,Q))){const v=X(d,W)?W:Q,w=He(d);f={options:d[v],hasDiscriminator:!!w}}}return{schema:d,isRequired:p,isReadonly:g,optionsInfo:f,fieldPathId:l}}function Xx(t,e){let n=t;return Ct(n)&&(n=Us(e,n)),er(n)?n:null}function Qx(t,e){let n,r=null,i={},s;if(Ct(e)||Rc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ge(i)||Ox(i,(c,u)=>{if(Ct(c)){const d=Gx.exec(c);if(Array.isArray(d)&&d.length>1){const m=d[1];i[u]=Us(t,m,m)}}}),r=Xx(a,t),!o&&r&&(s=h.jsx(r,{...l,"data-testid":jt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function Zr(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>N.createElement(qs,{...n,key:`layoutGrid-${Xe(l)}`,schema:a,layoutGridSchema:l}))}function ev(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=Jr(e,et.CONDITION,i),{operator:a,field:l="",value:c}=o,u=D(r,l,null);return Jx(a,u,c)?h.jsx(Zr,{...n,childrenLayoutGridSchemaId:s}):null}function tv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Jr(e,et.COLUMN,r),a=M(i),l=q("GridTemplate",r,a);return h.jsx(l,{column:!0,"data-testid":jt.col,...o,children:h.jsx(Zr,{...n,childrenLayoutGridSchemaId:s})})}function nv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Jr(e,et.COLUMNS,r),a=M(i),l=q("GridTemplate",r,a);return s.map(c=>h.jsx(l,{column:!0,"data-testid":jt.col,...o,children:h.jsx(Zr,{...n,childrenLayoutGridSchemaId:[c]})},`column-${Xe(c)}`))}function rv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Jr(e,et.ROW,r),a=M(i),l=q("GridTemplate",r,a);return h.jsx(l,{...o,"data-testid":jt.row,children:h.jsx(Zr,{...n,childrenLayoutGridSchemaId:s})})}function iv(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:c,registry:u,layoutGridSchema:d,...m}=t,{onChange:g}=m,{fields:f}=u,{SchemaField:p,LayoutMultiSchemaField:y}=f,v=Qx(u,e),{name:w,UIComponent:A,uiProps:O}=v,{schema:b,isRequired:x,isReadonly:S,optionsInfo:j,fieldPathId:E}=Zx(u,w,n,l,s),C=Kt(E);if(v.rendered)return v.rendered;if(b){const _=j?.hasDiscriminator?y:p,{fieldUiSchema:I,uiReadonly:T}=Yx(w,O,r,S,c);return h.jsx(_,{"data-testid":j?.hasDiscriminator?jt.layoutMultiSchemaField:jt.field,...m,name:w,required:x,readonly:T,schema:b,uiSchema:I,errorSchema:D(i,w),fieldPathId:C,formData:D(l,w),onChange:g,onBlur:o,onFocus:a,options:j?.options,registry:u})}return A?h.jsx(A,{"data-testid":jt.uiComponent,...m,name:w,required:x,formData:l,readOnly:!!S||c,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:u,...O}):null}function qs(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=M(e);if(!n&&vi in r&&te(r[vi])&&(n=r[vi]),te(n)){if(et.ROW in n)return h.jsx(rv,{...t,layoutGridSchema:n});if(et.COLUMN in n)return h.jsx(tv,{...t,layoutGridSchema:n});if(et.COLUMNS in n)return h.jsx(nv,{...t,layoutGridSchema:n});if(et.CONDITION in n)return h.jsx(ev,{...t,layoutGridSchema:n})}return h.jsx(iv,{...t,gridSchema:n})}qs.TEST_IDS=jt;function sv(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=M(i,o.globalUiOptions),{title:c}=l,{title:u}=r,d=c||n||u||a;if(!d)return null;const m=q("TitleFieldTemplate",o,l);return h.jsx(m,{id:Yr(e),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Si(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=D(s,[se,e]);return D(o,Dt,D(o,Ne,r))===n})}function va(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;X(t,W)?o={...t,[W]:s}:X(t,Q)&&(o={...t,[Q]:s});const a=hn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function ov(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:c,registry:u,uiSchema:d,schema:m,autofocus:g,readonly:f,required:p,errorSchema:y,hideError:v=!1}=t,{widgets:w,schemaUtils:A,globalUiOptions:O}=u,[b,x]=N.useState(va(m,l,A,d,i)),S=D(s,de),j=He(m),E=q("FieldErrorTemplate",u,l),C=q("FieldTemplate",u,l),_=Xe(m),I=Xe(l),T=d?Xe(d):"",P=i?Xe(i):"";N.useEffect(()=>{x(va(m,l,A,d,i))},[_,I,A,T,P]);const{widget:F=j?"radio":"select",title:$="",placeholder:R="",optionsSchemaSelector:B=j,hideError:U,...Y}=M(d);if(!B)throw new Error("No selector field provided for the LayoutMultiSchemaField");const ne=D(i,B);let fe=D(b[0]?.schema,[se,B],{});const ye=Si(b,B,ne);fe=fe?.type?fe:{...fe,type:ye?.type||n};const k=tt(fe,F,w),le=U===void 0?v:!!U,ee=D(y,[Ee],[]),H=un(y,[Ee]),G=A.getDisplayLabel(m,d,O),z=Oe=>{const Ae=Si(b,B,Oe),xe=Si(b,B,ne);let $e=A.sanitizeDataForNewSchema(Ae,xe,i);$e&&Ae&&($e=A.getDefaultFormState(Ae,$e,"excludeObjectChildren")),$e&&ce($e,B,Oe),a($e,s.path,void 0,S)},re={enumOptions:b,...Y},oe=!le&&ee.length>0?h.jsx(E,{fieldPathId:s,schema:m,errors:ee,registry:u}):void 0;return h.jsx(C,{fieldPathId:s,id:S,schema:m,label:($||m.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,required:p,readonly:!!f,registry:u,displayLabel:G,errors:oe,onChange:a,onKeyRename:xr,onKeyRenameBlur:xr,onRemoveProperty:xr,children:h.jsx(k,{id:S,name:e,schema:m,label:($||m.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,autofocus:g,readonly:f,required:p,registry:u,multiple:!1,rawErrors:ee,hideError:le,hideLabel:!G,errorSchema:H,placeholder:R,onChange:z,onBlur:o,onFocus:c,value:ne,options:re,htmlName:s.name})})}class Sa extends N.Component{constructor(e){super(e);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(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!ie(e.options,i)){const{registry:{schemaUtils:l}}=this.props,c=i.map(u=>l.retrieveSchema(u,r));a={selectedOption:o,retrievedOptions:c}}if(!ie(r,e.formData)&&s.$id===e.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(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=He(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,c=e!==void 0?parseInt(e,10):-1;if(c===n)return;const u=c>=0?r[c]:void 0,d=n>=0?r[n]:void 0;let m=l.sanitizeDataForNewSchema(u,d,i);u&&(m=l.getDefaultFormState(u,m,"excludeObjectChildren")),this.setState({selectedOption:c},()=>{s(m,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:c,schema:u,uiSchema:d}=this.props,{widgets:m,fields:g,translateString:f,globalUiOptions:p,schemaUtils:y}=c,{SchemaField:v}=g,w=q("MultiSchemaFieldTemplate",c,p),A=ar(c,u,l,d),O=vn(i),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S="select",placeholder:j,autofocus:E,autocomplete:C,title:_=u.title,...I}=M(d,p),T=tt({type:"number"},S,m),P=D(r,Ee,[]),F=un(r,[Ee]),$=y.getDisplayLabel(u,d,p),R=b>=0&&x[b]||null;let B;if(R){const{required:ee}=u;B=ee?lt({required:ee},R):R}let U=[];W in u&&d&&W in d?Array.isArray(d[W])?U=d[W]:console.warn(`uiSchema.oneOf is not an array for "${_||e}"`):Q in u&&d&&Q in d&&(Array.isArray(d[Q])?U=d[Q]:console.warn(`uiSchema.anyOf is not an array for "${_||e}"`));let Y=d;b>=0&&U.length>b&&(Y=U[b]);const ne=_?K.TitleOptionPrefix:K.OptionPrefix,fe=_?[_]:[],ye=x.map((ee,H)=>{const{title:G=ee.title}=M(U[H]);return{label:G||f(ne,fe.concat(String(H+1))),value:H}}),k=!A||O?h.jsx(T,{id:this.getFieldId(),name:`${e}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||ge(ye),multiple:!1,rawErrors:P,errorSchema:F,value:b>=0?b:void 0,options:{enumOptions:ye,...I},registry:c,placeholder:j,autocomplete:C,autofocus:E,label:_??e,hideLabel:!$,readonly:a}):void 0,le=B&&B.type!=="null"&&h.jsx(v,{...this.props,schema:B,uiSchema:Y})||null;return h.jsx(w,{schema:u,registry:c,uiSchema:d,selector:k,optionSchemaField:le})}}const av=/\.([0-9]*0)*$/,lv=/[0.]0*$/;function cv(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=N.useState(i),{StringField:a}=e.fields;let l=r;const c=N.useCallback((u,d,m,g)=>{o(u),`${u}`.charAt(0)==="."&&(u=`0${u}`);const f=typeof u=="string"&&u.match(av)?co(u.replace(lv,"")):co(u);n(f,d,m,g)},[n]);if(typeof s=="string"&&typeof l=="number"){const u=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(u)&&(l=s)}return h.jsx(a,{...t,formData:l,onChange:c})}function Je(){return Je=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Je.apply(null,arguments)}const dr=["strong","em","del","mark"],wa=[["**",dr[0]],["__",dr[0]],["~~",dr[2]],["==",dr[3]],["*","em"],["_","em"]];function uv(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function dv(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=wa[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=wa[o][1];break}}if(!r)return null;for(var l=i,c=!1,u=!1,d="",m=0,g="",f=!1,p="";l<t.length;){var y=t[l];if(f)g+=y,f=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||m!==0){if(y==="["&&!c&&m===0){var v=uv(t,l);if(v!==-1){g+=t.slice(l,v),l=v,p=t[v-1];continue}}if(u)g+=y,d?y===d&&(d=""):y==='"'||y==="'"?d=y:y===">"&&(u=!1),p=y,l++;else if(y!=="<"||c){if(y===`
|
|
1
|
+
import{hu as ke,d_ as Zs,aL as L,b9 as _e,cR as Lt,dZ as es,cT as we,dX as Or,e0 as Ve,cS as Su,hv as pn,aK as ae,hw as ts,hx as Xs,hy as wu,e3 as ju,hz as Wa,hA as Ou,hB as Au,hC as Eu,dS as Ha,dw as Cu,dK as _u,dW as Iu,dY as Pr,fL as Tu,c as je,j as h,P as Nu,n as Qs,a4 as ns,a as Fu,b as nt,aq as Pu,t as mr,du as rs,r as N,hD as Ga,dv as $u,hE as Du,fv as Ru,cq as Ka,cr as is,fC as ku,fD as Mu,fE as Uu,cs as Lu,ct as Bu,cu as qu,fG as Vu,cz as $r,cx as ss,fF as zu,cA as Ii,fH as Ya,eo as Wu,cM as Ja,cF as Hu,cQ as Gu,l as os,z as Ku,g1 as Yu,ai as Ju,I as Zu,B as Dr,h as as,d as Xu,M as Qu,hb as ed}from"./index-BNmzMNlZ.js";import{E as Za}from"./empty-state-Cc_qF1X6.js";import{b as td,d as nd,n as rd,A as Xa,S as id,C as sd,u as od}from"./use-mcp-client-ClU7gdfw.js";import{b as ad}from"./use-mcp-tools-CsGOzrhW.js";import{A as Qa,a as ld}from"./agent-icon-CVEMdYFU.js";import{i as cd}from"./Key01-D_nzK0xg.js";import{b as ud,u as dd,c as fd}from"./use-connection-CAR6Cxbr.js";import{U as On,b as Qr,c as eo}from"./auth-CEIITB7d.js";import{e as hd}from"./extract-connection-data-ClMH8dL9.js";import{s as md}from"./Plus-BfnmJh1R.js";import{S as pd,b as gd,a as yd,d as bd,c as xd}from"./select-CTAm_W2d.js";import{R as to}from"./index-DgWAoWIc.js";import{a as vd,T as Sd,R as wd,b as jd}from"./index-C6_m0mjP.js";import{_ as Bt}from"./index-kd3fyZ9a.js";import{a as Od,b as Ad,P as Ed}from"./popover-DauDBkON.js";import{a as Cd,T as _d,b as Id,c as Td}from"./tooltip-DibJz0Jl.js";import{b as Nd}from"./repository-binding-BZ7FmJ0X.js";import{i as Fd}from"./SearchMd-JUAl7Zv6.js";import{u as Pd}from"./use-mobile-nW9hYb6L.js";import{u as $d}from"./use-create-virtual-mcp-DcCX7uo7.js";import{a as Dd}from"./schema-DEyBWI2y.js";var Rd=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||_e();i instanceof pn&&(t.number=i.int())}}},kd=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=Ve(n):typeof n=="number"?t.number=Ve(n):typeof n=="boolean"?t.boolean=Ve(n):n===null?t.null=es():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Md=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?es():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return Ve(t[0]);if(e==="string")return Su(t);if(e==="number"){const[n,r,...i]=t;return Or([Ve(n),Ve(r),...i.map(s=>Ve(s))])}return e==="boolean"?Or([Ve(!0),Ve(!1)]):!1}},Ud=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=Eu();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)),t.file=r,t.string=!1}}},Ld=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=L())}},Bd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||L();r instanceof ts&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},qd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||L();r instanceof ts&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Vd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||L();if(r instanceof ts){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},zd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.min(n.minimum))}}},Wd=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.max(n.maximum))}}},Hd=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},Gd=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},Kd=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.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}`}))}}},Yd=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=we(ke()))}},Jd=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||we(ke())).min(n.minItems))}},Zd=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||we(ke())).max(n.maxItems))}},Xd=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||we(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=we(r);if(t.array&&t.array instanceof wu){const s=t.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))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||we(ke()):t.array=we(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||we(ke()):n.prefixItems&&(t.array=t.array||we(ke()))}},Qd=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=Xs([]):i=Xs(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},ef=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||ae({}).passthrough())}},tf=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=ae({}).passthrough())}},nf=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||ae({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},rf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||ae({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Wn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>Wn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Wn(t[i],e[i]))}return!1}function sf(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Wn(n,i))?!1:(e.push(n),!0))}}function Ar(t,e){return t.safeParse(e).success}var of=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Ar(n,r),{message:"Value must not match the 'not' schema"})}},af=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(sf(),{message:"Array items must be unique"})}},lf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Wa(r,i),t)}},cf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Or([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Wa(t,n)}},uf=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Ie(r));return t.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"})}},df=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Ar(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(!Ar(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},ff=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof Ou||t instanceof Au){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 t.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"})}},hf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Wn(r,i)),{message:"Value must match one of the enum values"})}},mf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>Wn(r,n),{message:"Value must equal the const value"})}},pf=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},gf=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:ke().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},yf=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)Ar(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},bf=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},xf=[new kd,new Md,new Rd,new Ud,new Ld,new Yd,new tf,new Bd,new qd,new Vd,new zd,new Wd,new Hd,new Gd,new Kd,new Qd,new Jd,new Zd,new Xd,new nf,new rf,new ef],vf=[new gf,new hf,new mf,new lf,new cf,new uf,new df,new ff,new yf,new of,new af,new bf,new pf];function Ie(t){if(typeof t=="boolean")return t?ke():Zs();const e={};for(const i of xf)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||L()),e.number!==!1&&n.push(e.number||_e()),e.boolean!==!1&&n.push(e.boolean||Lt()),e.null!==!1&&n.push(e.null||es()),e.array!==!1&&n.push(e.array||we(ke())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=ju(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=Zs():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Or(n):r=ke();for(const i of vf)r=i.apply(r,t);return r}class no extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(ro(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(ro(this),n)}}function Sf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function Ti(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(Ti).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${Ti(t.cause)}`:t.message:`${t}`}function ro(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var el=t=>{throw TypeError(t)},ls=(t,e,n)=>e.has(t)||el("Cannot "+n),Z=(t,e,n)=>(ls(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?el("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pe=(t,e,n,r)=>(ls(t,e,"write to private field"),e.set(t,n),n),ot=(t,e,n)=>(ls(t,e,"access private method"),n),Fe,Ft,Jt,pr,Er,Rn,en,kn,bt,Zt,sn,Xt,Tn,qe,Ni,Fi,Pi,io,$i,Di,Nn,Ri,ki;class gr extends EventTarget{constructor(e,n){var r,i;super(),ve(this,qe),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ve(this,Fe),ve(this,Ft),ve(this,Jt),ve(this,pr),ve(this,Er),ve(this,Rn),ve(this,en),ve(this,kn,null),ve(this,bt),ve(this,Zt),ve(this,sn,null),ve(this,Xt,null),ve(this,Tn,null),ve(this,Fi,async s=>{var o;Z(this,Zt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){ot(this,qe,Nn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?pe(this,Jt,new URL(s.url)):pe(this,Jt,void 0),c!==200){ot(this,qe,Nn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){ot(this,qe,Nn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(Z(this,Fe)===this.CLOSED)return;pe(this,Fe,this.OPEN);const d=new Event("open");if((o=Z(this,Tn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){ot(this,qe,Nn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const m=new TextDecoder,g=a.getReader();let f=!0;do{const{done:p,value:y}=await g.read();y&&Z(this,Zt).feed(m.decode(y,{stream:!p})),p&&(f=!1,Z(this,Zt).reset(),ot(this,qe,Ri).call(this))}while(f)}),ve(this,Pi,s=>{pe(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&ot(this,qe,Ri).call(this,Ti(s))}),ve(this,$i,s=>{typeof s.id=="string"&&pe(this,kn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:Z(this,Jt)?Z(this,Jt).origin:Z(this,Ft).origin,lastEventId:s.id||""});Z(this,Xt)&&(!s.event||s.event==="message")&&Z(this,Xt).call(this,o),this.dispatchEvent(o)}),ve(this,Di,s=>{pe(this,Rn,s)}),ve(this,ki,()=>{pe(this,en,void 0),Z(this,Fe)===this.CONNECTING&&ot(this,qe,Ni).call(this)});try{if(e instanceof URL)pe(this,Ft,e);else if(typeof e=="string")pe(this,Ft,new URL(e,wf()));else throw new Error("Invalid URL")}catch{throw Sf("An invalid or illegal string was specified")}pe(this,Zt,td({onEvent:Z(this,$i),onRetry:Z(this,Di)})),pe(this,Fe,this.CONNECTING),pe(this,Rn,3e3),pe(this,Er,(r=n?.fetch)!=null?r:globalThis.fetch),pe(this,pr,(i=n?.withCredentials)!=null?i:!1),ot(this,qe,Ni).call(this)}get readyState(){return Z(this,Fe)}get url(){return Z(this,Ft).href}get withCredentials(){return Z(this,pr)}get onerror(){return Z(this,sn)}set onerror(e){pe(this,sn,e)}get onmessage(){return Z(this,Xt)}set onmessage(e){pe(this,Xt,e)}get onopen(){return Z(this,Tn)}set onopen(e){pe(this,Tn,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){Z(this,en)&&clearTimeout(Z(this,en)),Z(this,Fe)!==this.CLOSED&&(Z(this,bt)&&Z(this,bt).abort(),pe(this,Fe,this.CLOSED),pe(this,bt,void 0))}}Fe=new WeakMap,Ft=new WeakMap,Jt=new WeakMap,pr=new WeakMap,Er=new WeakMap,Rn=new WeakMap,en=new WeakMap,kn=new WeakMap,bt=new WeakMap,Zt=new WeakMap,sn=new WeakMap,Xt=new WeakMap,Tn=new WeakMap,qe=new WeakSet,Ni=function(){pe(this,Fe,this.CONNECTING),pe(this,bt,new AbortController),Z(this,Er)(Z(this,Ft),ot(this,qe,io).call(this)).then(Z(this,Fi)).catch(Z(this,Pi))},Fi=new WeakMap,Pi=new WeakMap,io=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Z(this,kn)?{"Last-Event-ID":Z(this,kn)}:void 0},cache:"no-store",signal:(t=Z(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},$i=new WeakMap,Di=new WeakMap,Nn=function(t,e){var n;Z(this,Fe)!==this.CLOSED&&pe(this,Fe,this.CLOSED);const r=new no("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r)},Ri=function(t,e){var n;if(Z(this,Fe)===this.CLOSED)return;pe(this,Fe,this.CONNECTING);const r=new no("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r),pe(this,en,setTimeout(Z(this,ki),Z(this,Rn)))},ki=new WeakMap,gr.CONNECTING=0,gr.OPEN=1,gr.CLOSED=2;function wf(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class jf extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class Of{constructor(e,n){this._url=e,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=nd(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new On("No auth provider");let e;try{e=await Qr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new On;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=rd(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new gr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=eo(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 jf(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=Ha.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(e){if(!this._authProvider)throw new On("No auth provider");if(await Qr(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new On("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){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(e),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}=eo(i);if(this._resourceMetadataUrl=o,this._scope=a,await Qr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new On;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const Af="mcp";class Ef{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,Af),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=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Ha.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}function Cf(){const t=new Xa({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return Cu(t),t}class _f{#e=Cf();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=If(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(e,i),i}}function If(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const Tf=new _f;var so;(function(t){t.Completable="McpCompletable"})(so||(so={}));class Nf extends id{constructor(e,n){super(e,n)}send(e,n){const r=Ff(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function Ff(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Pf extends sd{constructor(e,n){super(e,{jsonSchemaValidator:Tf,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},_u,n)}}const $f=async(t,e,n)=>{const r=Df(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Pf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Df=(t,e,n)=>{if(t.type==="Websocket")return new Ef(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new Of(new URL(t.url),s)}return new Nf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},oo=t=>{try{return JSON.parse(t)}catch{return t}},Rf=500,Pt=new Map;function kf(t,e){if(Pt.set(t,e),Pt.size>Rf){const n=Pt.keys().next().value;n!==void 0&&Pt.delete(n)}}const ao=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Ie(t.inputSchema):void 0,outputSchema:t.outputSchema?Ie(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function Mf(t){const e=n=>"connection"in t?$f({connection:t.connection},void 0,n):t.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=t?.debugId?.(),d=u?{"x-trace-debug-id":u}:void 0,{client:m}=await e(d),{structuredContent:g,isError:f,content:p}=await m.callTool({name:String(c),arguments:l});if(f){const v=p?.[0]?.text,w=typeof v=="string"?oo(v):null,A=w?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(w.code,w.message,w.traceId):null;throw A||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?oo(y):void 0}async function s(){const{client:l}=await e(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in t))return s();const l=t.connection,c=JSON.stringify(l);try{return Pt.has(c)||kf(c,s()),await Pt.get(c)}catch(u){console.error("Failed to list tools",u),Pt.delete(c);return}}async function a(){return(await o()??[]).map(c=>ao(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 ao(c,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>lo({connection:n}):e==="forClient"?n=>lo({client:n}):globalThis[e]}});function lo(t){return Mf(t)}function Uf(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const Lf=ae({specversion:Ve("1.0").describe("CloudEvents specification version"),id:L().describe("Unique identifier for this event (UUID recommended)"),source:L().describe("Connection ID of the event publisher"),type:L().describe("Event type (e.g., 'order.created', 'user.signup')"),time:L().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:L().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:L().optional().default("application/json").describe("Content type of the data attribute"),dataschema:L().url().optional().describe("URI to the schema for the data attribute"),data:Iu().optional().describe("Event payload (any JSON value)")});ae({events:we(Lf).min(1).describe("Batch of CloudEvents to process")});const Bf=ae({success:Lt().optional().describe("Whether this event was processed successfully"),error:L().optional().describe("Error message for this event"),retryAfter:_e().int().positive().optional().describe("Re-deliver this event after this many ms")});ae({success:Lt().optional().describe("Batch success - applies to events not in results"),error:L().optional().describe("Batch error message - applies to events not in results"),processedCount:_e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:_e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Pr(L(),Bf).optional().describe("Per-event results keyed by event ID")});const qf=ae({type:Ve("string"),enum:we(L()).optional(),description:L().optional()}),Vf=ae({type:L(),description:L(),paramsSchema:Pr(L(),qf)});ae({});ae({triggers:we(Vf)});ae({type:L(),params:Pr(L(),L()),enabled:Lt(),callbackUrl:Tu().optional(),callbackToken:L().min(1).optional()});ae({success:Lt()});ae({prefix:L().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:_e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:L().optional().describe("Token for pagination from previous response"),delimiter:L().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});ae({objects:we(ae({key:L().describe("Object key/path"),size:_e().describe("Object size in bytes"),lastModified:L().describe("Last modified timestamp"),etag:L().describe("Entity tag for the object")})),nextContinuationToken:L().optional().describe("Token for fetching next page of results"),isTruncated:Lt().describe("Whether there are more results available"),commonPrefixes:we(L()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});ae({key:L().describe("Object key/path to get metadata for")});ae({contentType:L().optional().describe("MIME type of the object"),contentLength:_e().describe("Size of the object in bytes"),lastModified:L().describe("Last modified timestamp"),etag:L().describe("Entity tag for the object"),metadata:Pr(L(),L()).optional().describe("Custom metadata key-value pairs")});ae({key:L().describe("Object key/path to generate URL for"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});ae({url:L().describe("Presigned URL for downloading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});ae({key:L().describe("Object key/path for the upload"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:L().optional().describe("MIME type for the object being uploaded")});ae({url:L().describe("Presigned URL for uploading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});ae({key:L().describe("Object key/path to delete")});ae({success:Lt().describe("Whether the deletion was successful"),key:L().describe("The key that was deleted")});ae({keys:we(L()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});ae({deleted:we(L()).describe("Array of successfully deleted keys"),errors:we(ae({key:L(),message:L()})).describe("Array of errors for failed deletions")});const zf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Wf(t){if(t)return zf[t]}function yO(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return Uf(i).isImplementedBy(r)}function bO(t){const e=je.c(7),{children:n,leading:r}=t;let i;e[0]!==r?(i=r&&h.jsx(Nu.Toolbar.Left.Portal,{fallback:r,children:r}),e[0]=r,e[1]=i):i=e[1];let s;e[2]!==n?(s=h.jsx(Qs.Content,{children:n}),e[2]=n,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o=h.jsxs(Qs,{children:[i,s]}),e[4]=i,e[5]=s,e[6]=o):o=e[6],o}function Hf(){const t=je.c(9),{org:e}=ns(),{data:n}=Fu.useSession(),r=ud(),i=nt(),s=Pu();let o;t[0]!==r.create||t[1]!==e||t[2]!==n||t[3]!==s||t[4]!==i?(o=async c=>{if(!e||!n?.user?.id){mr.error(i("details.mcpConfigurationForm.notAuthenticated"));return}const{item:u}=await s.call("COLLECTION_REGISTRY_APP_GET",{name:c});if(!u){mr.error(i("details.mcpConfigurationForm.registryItemNotFound",{bindingType:c}));return}const d=hd(u,e.id,n.user.id),m=d.connection_type==="STDIO",g=!!d.connection_url,f=m&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!g&&!f){mr.error(i("details.mcpConfigurationForm.registryItemNotConnectable"));return}return await r.create.mutateAsync(d),{id:d.id,connection:d}},t[0]=r.create,t[1]=e,t[2]=n,t[3]=s,t[4]=i,t[5]=o):o=t[5];const a=o;let l;return t[6]!==r.create.isPending||t[7]!==a?(l={installByBinding:a,isInstalling:r.create.isPending},t[6]=r.create.isPending,t[7]=a,t[8]=l):l=t[8],l}function V(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function Gf(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),V(t.additionalItems)}function co(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const at="__additional_property",tn="additionalProperties",Ot="allOf",Q="anyOf",Ne="const",Dt="default",cs="dependencies",Kf="enum",Ee="__errors",de="$id",us="if",an="items",Yf="_$junk_option_schema_id$_",yr="$name",W="oneOf",Mi="patternProperties",se="properties",ei="readonly",tl="required",Cr="submitButtonOptions",ue="$ref",Mn="__rjsf_ref",Fn="$schema",nl="root",rl="_",Jf=["discriminator","propertyName"],uo="formContext",Zf="layoutGridLookupMap",ds="__rjsf_additionalProperties",il="__rjsf_rootSchema",Xf="ui:field",fs="ui:widget",vt="ui:options",Ui="ui:globalOptions",Qf="ui:definitions",eh="https://json-schema.org/draft/2019-09/schema",br="https://json-schema.org/draft/2020-12/schema";function M(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===fs&&V(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&V(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function sl(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=M(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var ol=typeof global=="object"&&global&&global.Object===Object&&global,th=typeof self=="object"&&self&&self.Object===Object&&self,rt=ol||th||Function("return this")(),Me=rt.Symbol,al=Object.prototype,nh=al.hasOwnProperty,rh=al.toString,An=Me?Me.toStringTag:void 0;function ih(t){var e=nh.call(t,An),n=t[An];try{t[An]=void 0;var r=!0}catch{}var i=rh.call(t);return r&&(e?t[An]=n:delete t[An]),i}var sh=Object.prototype,oh=sh.toString;function ah(t){return oh.call(t)}var lh="[object Null]",ch="[object Undefined]",fo=Me?Me.toStringTag:void 0;function ct(t){return t==null?t===void 0?ch:lh:fo&&fo in Object(t)?ih(t):ah(t)}function ll(t,e){return function(n){return t(e(n))}}var Rr=ll(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var uh="[object Object]",dh=Function.prototype,fh=Object.prototype,cl=dh.toString,hh=fh.hasOwnProperty,mh=cl.call(Object);function At(t){if(!Ue(t)||ct(t)!=uh)return!1;var e=Rr(t);if(e===null)return!0;var n=hh.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&cl.call(n)==mh}function Li(t){const e={[Ee]:[],addError(n){this[Ee].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:Li(r)}),e);if(At(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:Li(n[i])}),e)}return e}var Se=Array.isArray,ph="[object Symbol]";function Qn(t){return typeof t=="symbol"||Ue(t)&&ct(t)==ph}var gh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yh=/^\w*$/;function hs(t,e){if(Se(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Qn(t)?!0:yh.test(t)||!gh.test(t)||e!=null&&t in Object(e)}function te(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var bh="[object AsyncFunction]",xh="[object Function]",vh="[object GeneratorFunction]",Sh="[object Proxy]";function er(t){if(!te(t))return!1;var e=ct(t);return e==xh||e==vh||e==bh||e==Sh}var ti=rt["__core-js_shared__"],ho=(function(){var t=/[^.]+$/.exec(ti&&ti.keys&&ti.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function wh(t){return!!ho&&ho in t}var jh=Function.prototype,Oh=jh.toString;function qt(t){if(t!=null){try{return Oh.call(t)}catch{}try{return t+""}catch{}}return""}var Ah=/[\\^$.*+?()[\]{}|]/g,Eh=/^\[object .+?Constructor\]$/,Ch=Function.prototype,_h=Object.prototype,Ih=Ch.toString,Th=_h.hasOwnProperty,Nh=RegExp("^"+Ih.call(Th).replace(Ah,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Fh(t){if(!te(t)||wh(t))return!1;var e=er(t)?Nh:Eh;return e.test(qt(t))}function Ph(t,e){return t?.[e]}function Vt(t,e){var n=Ph(t,e);return Fh(n)?n:void 0}var Hn=Vt(Object,"create");function $h(){this.__data__=Hn?Hn(null):{},this.size=0}function Dh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Rh="__lodash_hash_undefined__",kh=Object.prototype,Mh=kh.hasOwnProperty;function Uh(t){var e=this.__data__;if(Hn){var n=e[t];return n===Rh?void 0:n}return Mh.call(e,t)?e[t]:void 0}var Lh=Object.prototype,Bh=Lh.hasOwnProperty;function qh(t){var e=this.__data__;return Hn?e[t]!==void 0:Bh.call(e,t)}var Vh="__lodash_hash_undefined__";function zh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Hn&&e===void 0?Vh:e,this}function Rt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Rt.prototype.clear=$h;Rt.prototype.delete=Dh;Rt.prototype.get=Uh;Rt.prototype.has=qh;Rt.prototype.set=zh;function Wh(){this.__data__=[],this.size=0}function tr(t,e){return t===e||t!==t&&e!==e}function kr(t,e){for(var n=t.length;n--;)if(tr(t[n][0],e))return n;return-1}var Hh=Array.prototype,Gh=Hh.splice;function Kh(t){var e=this.__data__,n=kr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Gh.call(e,n,1),--this.size,!0}function Yh(t){var e=this.__data__,n=kr(e,t);return n<0?void 0:e[n][1]}function Jh(t){return kr(this.__data__,t)>-1}function Zh(t,e){var n=this.__data__,r=kr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ut(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ut.prototype.clear=Wh;ut.prototype.delete=Kh;ut.prototype.get=Yh;ut.prototype.has=Jh;ut.prototype.set=Zh;var Gn=Vt(rt,"Map");function Xh(){this.size=0,this.__data__={hash:new Rt,map:new(Gn||ut),string:new Rt}}function Qh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Mr(t,e){var n=t.__data__;return Qh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function em(t){var e=Mr(this,t).delete(t);return this.size-=e?1:0,e}function tm(t){return Mr(this,t).get(t)}function nm(t){return Mr(this,t).has(t)}function rm(t,e){var n=Mr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=Xh;dt.prototype.delete=em;dt.prototype.get=tm;dt.prototype.has=nm;dt.prototype.set=rm;var im="Expected a function";function ms(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(im);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(ms.Cache||dt),n}ms.Cache=dt;var sm=500;function om(t){var e=ms(t,function(r){return n.size===sm&&n.clear(),r}),n=e.cache;return e}var am=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lm=/\\(\\)?/g,ul=om(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(am,function(n,r,i,s){e.push(i?s.replace(lm,"$1"):r||n)}),e});function gn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var mo=Me?Me.prototype:void 0,po=mo?mo.toString:void 0;function dl(t){if(typeof t=="string")return t;if(Se(t))return gn(t,dl)+"";if(Qn(t))return po?po.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ps(t){return t==null?"":dl(t)}function yn(t,e){return Se(t)?t:hs(t,e)?[t]:ul(ps(t))}function Et(t){if(typeof t=="string"||Qn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Ur(t,e){e=yn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Et(e[n++])];return n&&n==r?t:void 0}function D(t,e,n){var r=t==null?void 0:Ur(t,e);return r===void 0?n:r}const{getOwnPropertyNames:cm,getOwnPropertySymbols:um}=Object,{hasOwnProperty:dm}=Object.prototype;function ni(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function cr(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=t(n,r,i);return s.delete(n),s.delete(r),l}}function go(t){return cm(t).concat(um(t))}const fm=Object.hasOwn||((t,e)=>dm.call(t,e)),hm="__v",mm="__o",pm="_owner",{getOwnPropertyDescriptor:yo,keys:bo}=Object,zt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function gm(t,e){return t===e}function ym(t,e){return t.byteLength===e.byteLength&&_r(new Uint8Array(t),new Uint8Array(e))}function bm(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function xm(t,e){return t.byteLength===e.byteLength&&_r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function vm(t,e){return zt(t.getTime(),e.getTime())}function Sm(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function xo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const c=e.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(i[d]){d++;continue}const m=o.value,g=a.value;if(n.equals(m[0],g[0],l,d,t,e,n)&&n.equals(m[1],g[1],m[0],g[0],t,e,n)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}function wm(t,e,n){const r=bo(t);let i=r.length;if(bo(e).length!==i)return!1;for(;i-- >0;)if(!fl(t,e,n,r[i]))return!1;return!0}function En(t,e,n){const r=go(t);let i=r.length;if(go(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!fl(t,e,n,s)||(o=yo(t,s),a=yo(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function jm(t,e){return zt(t.valueOf(),e.valueOf())}function Om(t,e){return t.source===e.source&&t.flags===e.flags}function vo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function _r(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Am(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function fl(t,e,n,r){return(r===pm||r===mm||r===hm)&&(t.$$typeof||e.$$typeof)?!0:fm(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Em=Object.prototype.toString;function Cm(t){const e=Nm(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:c,getUnsupportedCustomComparator:u}=t;return function(m,g,f){if(m===g)return!0;if(m==null||g==null)return!1;const p=typeof m;if(p!==typeof g)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(m,g,f):p==="function"?i(m,g,f):!1;const y=m.constructor;if(y!==g.constructor)return!1;if(y===Object)return a(m,g,f);if(y===Array)return n(m,g,f);if(y===Date)return r(m,g,f);if(y===RegExp)return l(m,g,f);if(y===Map)return s(m,g,f);if(y===Set)return c(m,g,f);if(y===Promise)return!1;if(Array.isArray(m))return n(m,g,f);const v=Em.call(m),w=e[v];if(w)return w(m,g,f);const A=u&&u(m,g,f,v);return A?A(m,g,f):!1}}function _m({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:ym,areArraysEqual:n?En:bm,areDataViewsEqual:xm,areDatesEqual:vm,areErrorsEqual:Sm,areFunctionsEqual:gm,areMapsEqual:n?ni(xo,En):xo,areNumbersEqual:zt,areObjectsEqual:n?En:wm,arePrimitiveWrappersEqual:jm,areRegExpsEqual:Om,areSetsEqual:n?ni(vo,En):vo,areTypedArraysEqual:n?ni(_r,En):_r,areUrlsEqual:Am,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=cr(r.areArraysEqual),s=cr(r.areMapsEqual),o=cr(r.areObjectsEqual),a=cr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Im(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Tm({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:i})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,s)}}function Nm({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:m,areUrlsEqual:g}){return{"[object Arguments]":l,"[object Array]":e,"[object ArrayBuffer]":t,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":m,"[object BigUint64Array]":m,"[object Boolean]":c,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":m,"[object Float32Array]":m,"[object Float64Array]":m,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":m,"[object Int16Array]":m,"[object Int32Array]":m,"[object Map]":o,"[object Number]":c,"[object Object]":(f,p,y)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,y),"[object RegExp]":u,"[object Set]":d,"[object String]":c,"[object URL]":g,"[object Uint8Array]":m,"[object Uint8ClampedArray]":m,"[object Uint16Array]":m,"[object Uint32Array]":m}}ft();ft({strict:!0});ft({circular:!0});ft({circular:!0,strict:!0});ft({createInternalComparator:()=>zt});ft({strict:!0,createInternalComparator:()=>zt});ft({circular:!0,createInternalComparator:()=>zt});ft({circular:!0,createInternalComparator:()=>zt,strict:!0});function ft(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=_m(t),o=Cm(s),a=n?n(o):Im(o);return Tm({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ft({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Cn={exports:{}},ri,So;function hl(){if(So)return ri;So=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(b){let x="",S=0,j=0;for(j=0;j<b.length;j++)if(S=b[j].charCodeAt(0),S!==48){if(!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return"";x+=b[j];break}for(j+=1;j<b.length;j++){if(S=b[j].charCodeAt(0),!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return"";x+=b[j]}return x}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function l(b,x,S){if(b.length){const j=s(b);if(j!=="")x.push(j);else return S.error=!0,!1;b.length=0}return!0}function c(b){let x=0;const S={error:!1,address:"",zone:""},j=[],E=[];let C=!1,_=!1,I=l;for(let T=0;T<b.length;T++){const F=b[T];if(!(F==="["||F==="]"))if(F===":"){if(C===!0&&(_=!0),!I(E,j,S))break;if(++x>7){S.error=!0;break}T>0&&b[T-1]===":"&&(C=!0),j.push(":");continue}else if(F==="%"){if(!I(E,j,S))break;I=a}else{E.push(F);continue}}return E.length&&(I===a?S.zone=E.join(""):_?j.push(E.join("")):j.push(s(E))),S.address=j.join(""),S}function u(b){if(d(b,":")<2)return{host:b,isIPV6:!1};const x=c(b);if(x.error)return{host:b,isIPV6:!1};{let S=x.address,j=x.address;return x.zone&&(S+="%"+x.zone,j+="%25"+x.zone),{host:S,isIPV6:!0,escapedHost:j}}}function d(b,x){let S=0;for(let j=0;j<b.length;j++)b[j]===x&&S++;return S}function m(b){let x=b;const S=[];let j=-1,E=0;for(;E=x.length;){if(E===1){if(x===".")break;if(x==="/"){S.push("/");break}else{S.push(x);break}}else if(E===2){if(x[0]==="."){if(x[1]===".")break;if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&(x[1]==="."||x[1]==="/")){S.push("/");break}}else if(E===3&&x==="/.."){S.length!==0&&S.pop(),S.push("/");break}if(x[0]==="."){if(x[1]==="."){if(x[2]==="/"){x=x.slice(3);continue}}else if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&x[1]==="."){if(x[2]==="/"){x=x.slice(2);continue}else if(x[2]==="."&&x[3]==="/"){x=x.slice(3),S.length!==0&&S.pop();continue}}if((j=x.indexOf("/",1))===-1){S.push(x);break}else S.push(x.slice(0,j)),x=x.slice(j)}return S.join("")}const g={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function y(b,x){const S=x?p:f;return S.lastIndex=0,b.replace(S,j=>g[j])}function v(b,x=!1){if(b.indexOf("%")===-1)return b;let S="";for(let j=0;j<b.length;j++){if(b[j]==="%"&&j+2<b.length){const E=b.slice(j+1,j+3);if(n(E)){const C=E.toUpperCase(),_=String.fromCharCode(parseInt(C,16));x&&r(_)?S+=_:S+="%"+C,j+=2;continue}}S+=b[j]}return S}function w(b){let x="";for(let S=0;S<b.length;S++){if(b[S]==="%"&&S+2<b.length){const j=b.slice(S+1,S+3);if(n(j)){const E=j.toUpperCase(),C=String.fromCharCode(parseInt(E,16));C!=="."&&r(C)?x+=C:x+="%"+E,S+=2;continue}}i(b[S])?x+=b[S]:x+=escape(b[S])}return x}function A(b){let x="";for(let S=0;S<b.length;S++){if(b[S]==="%"&&S+2<b.length){const j=b.slice(S+1,S+3);if(n(j)){x+="%"+j.toUpperCase(),S+=2;continue}}x+=escape(b[S])}return x}function O(b){const x=[];if(b.userinfo!==void 0&&(x.push(b.userinfo),x.push("@")),b.host!==void 0){let S=unescape(b.host);if(!e(S)){const j=u(S);j.isIPV6===!0?S=`[${j.escapedHost}]`:S=y(S,!1)}x.push(S)}return(typeof b.port=="number"||typeof b.port=="string")&&(x.push(":"),x.push(String(b.port))),x.length?x.join(""):void 0}return ri={nonSimpleDomain:o,recomposeAuthority:O,reescapeHostDelimiters:y,normalizePercentEncoding:v,normalizePathEncoding:w,escapePreservingEscapes:A,removeDotSegments:m,isIPv4:e,isUUID:t,normalizeIPv6:u,stringArrayToHexStripped:s},ri}var ii,wo;function Fm(){if(wo)return ii;wo=1;const{isUUID:t}=hl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(b){return n.indexOf(b)!==-1}function i(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function s(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function o(b){const x=String(b.scheme).toLowerCase()==="https";return(b.port===(x?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function a(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function l(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[x,S]=b.resourceName.split("?");b.path=x&&x!=="/"?x:void 0,b.query=S,b.resourceName=void 0}return b.fragment=void 0,b}function c(b,x){if(!b.path)return b.error="URN can not be parsed",b;const S=b.path.match(e);if(S){const j=x.scheme||b.scheme||"urn";b.nid=S[1].toLowerCase(),b.nss=S[2];const E=`${j}:${x.nid||b.nid}`,C=O(E);b.path=void 0,C&&(b=C.parse(b,x))}else b.error=b.error||"URN can not be parsed.";return b}function u(b,x){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=x.scheme||b.scheme||"urn",j=b.nid.toLowerCase(),E=`${S}:${x.nid||j}`,C=O(E);C&&(b=C.serialize(b,x));const _=b,I=b.nss;return _.path=`${j||x.nid}:${I}`,x.skipEscape=!0,_}function d(b,x){const S=b;return S.uuid=S.nss,S.nss=void 0,!x.tolerant&&(!S.uuid||!t(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function m(b){const x=b;return x.nss=(b.uuid||"").toLowerCase(),x}const g={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:g.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},y={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},A={http:g,https:f,ws:p,wss:y,urn:{scheme:"urn",parse:c,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(A,null);function O(b){return b&&(A[b]||A[b.toLowerCase()])||void 0}return ii={wsIsSecure:i,SCHEMES:A,isValidSchemeName:r,getSchemeHandler:O},ii}var jo;function Pm(){if(jo)return Cn.exports;jo=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=hl(),{SCHEMES:c,getSchemeHandler:u}=Fm();function d(j,E){return typeof j=="string"?j=O(j,E):typeof j=="object"&&(j=A(p(j,E),E)),j}function m(j,E,C){const _=C?Object.assign({scheme:"null"},C):{scheme:"null"},I=g(A(j,_),A(E,_),_,!0);return _.skipEscape=!0,p(I,_)}function g(j,E,C,_){const I={};return _||(j=A(p(j,C),C),E=A(p(E,C),C)),C=C||{},!C.tolerant&&E.scheme?(I.scheme=E.scheme,I.userinfo=E.userinfo,I.host=E.host,I.port=E.port,I.path=e(E.path||""),I.query=E.query):(E.userinfo!==void 0||E.host!==void 0||E.port!==void 0?(I.userinfo=E.userinfo,I.host=E.host,I.port=E.port,I.path=e(E.path||""),I.query=E.query):(E.path?(E.path[0]==="/"?I.path=e(E.path):((j.userinfo!==void 0||j.host!==void 0||j.port!==void 0)&&!j.path?I.path="/"+E.path:j.path?I.path=j.path.slice(0,j.path.lastIndexOf("/")+1)+E.path:I.path=E.path,I.path=e(I.path)),I.query=E.query):(I.path=j.path,E.query!==void 0?I.query=E.query:I.query=j.query),I.userinfo=j.userinfo,I.host=j.host,I.port=j.port),I.scheme=j.scheme),I.fragment=E.fragment,I}function f(j,E,C){const _=x(j,C),I=x(E,C);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(j,E){const C={host:j.host,scheme:j.scheme,userinfo:j.userinfo,port:j.port,path:j.path,query:j.query,nid:j.nid,nss:j.nss,uuid:j.uuid,fragment:j.fragment,reference:j.reference,resourceName:j.resourceName,secure:j.secure,error:""},_=Object.assign({},E),I=[],T=u(_.scheme||C.scheme);T&&T.serialize&&T.serialize(C,_),C.path!==void 0&&(_.skipEscape?C.path=r(C.path):(C.path=s(C.path),C.scheme!==void 0&&(C.path=C.path.split("%3A").join(":")))),_.reference!=="suffix"&&C.scheme&&I.push(C.scheme,":");const F=n(C);if(F!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(F),C.path&&C.path[0]!=="/"&&I.push("/")),C.path!==void 0){let P=C.path;!_.absolutePath&&(!T||!T.absolutePath)&&(P=e(P)),F===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),I.push(P)}return C.query!==void 0&&I.push("?",C.query),C.fragment!==void 0&&I.push("#",C.fragment),I.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(j,E){if(E[2]!==void 0&&j.path&&j.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof j.port=="number"&&(j.port<0||j.port>65535))return"URI port is malformed."}function w(j,E){const C=Object.assign({},E),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;C.reference==="suffix"&&(C.scheme?j=C.scheme+":"+j:j="//"+j);const F=j.match(y);if(F){_.scheme=F[1],_.userinfo=F[3],_.host=F[4],_.port=parseInt(F[5],10),_.path=F[6]||"",_.query=F[7],_.fragment=F[8],isNaN(_.port)&&(_.port=F[5]);const P=v(_,F);if(P!==void 0&&(_.error=_.error||P,I=!0),_.host)if(a(_.host)===!1){const B=t(_.host);_.host=B.host.toLowerCase(),T=B.isIPV6}else T=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",C.reference&&C.reference!=="suffix"&&C.reference!==_.reference&&(_.error=_.error||"URI is not a "+C.reference+" reference.");const $=u(C.scheme||_.scheme);if(!C.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(C.domainHost||$&&$.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(R){_.error=_.error||"Host's domain name can not be converted to ASCII: "+R}if((!$||$&&!$.skipNormalize)&&(j.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=o(unescape(_.host),T))),_.path&&(_.path=i(_.path)),_.fragment))try{_.fragment=encodeURI(decodeURIComponent(_.fragment))}catch{_.error=_.error||"URI malformed"}$&&$.parse&&$.parse(_,C)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function A(j,E){return w(j,E).parsed}function O(j,E){return b(j,E).normalized}function b(j,E){const{parsed:C,malformedAuthorityOrPort:_}=w(j,E);return{normalized:_?j:p(C,E),malformedAuthorityOrPort:_}}function x(j,E){if(typeof j=="string"){const{normalized:C,malformedAuthorityOrPort:_}=b(j,E);return _?void 0:C}if(typeof j=="object")return p(j,E)}const S={SCHEMES:c,normalize:d,resolve:m,resolveComponent:g,equal:f,serialize:p,parse:A};return Cn.exports=S,Cn.exports.default=S,Cn.exports.fastUri=S,Cn.exports}var $m=Pm();const gs=rs($m);var _n={},Oo;function Dm(){if(Oo)return _n;Oo=1;var t=/~/,e=/~[01]/g;function n(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function r(c){return t.test(c)?c.replace(e,n):c}function i(c,u,d){for(var m,g,f=1,p=u.length;f<p;){if(u[f]==="constructor"||u[f]==="prototype"||u[f]==="__proto__")return c;if(m=r(u[f++]),g=p>f,typeof c[m]>"u"&&(Array.isArray(c)&&m==="-"&&(m=c.length),g&&(u[f]!==""&&u[f]<1/0||u[f]==="-"?c[m]=[]:c[m]={})),!g)break;c=c[m]}var y=c[m];return d===void 0?delete c[m]:c[m]=d,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 d=u.length;if(d===1)return c;for(var m=1;m<d;){if(c=c[r(u[m++])],d===m)return c;if(typeof c!="object"||c===null)return}}function a(c,u,d){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,d)}function l(c){var u=s(c);return{get:function(d){return o(d,u)},set:function(d,m){return a(d,u,m)}}}return _n.get=o,_n.set=a,_n.compile=l,_n}var Rm=Dm();const si=rs(Rm);var km=Object.prototype;function Lr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||km;return t===n}var Mm=ll(Object.keys,Object),Um=Object.prototype,Lm=Um.hasOwnProperty;function ml(t){if(!Lr(t))return Mm(t);var e=[];for(var n in Object(t))Lm.call(t,n)&&n!="constructor"&&e.push(n);return e}var Bi=Vt(rt,"DataView"),qi=Vt(rt,"Promise"),on=Vt(rt,"Set"),Vi=Vt(rt,"WeakMap"),Ao="[object Map]",Bm="[object Object]",Eo="[object Promise]",Co="[object Set]",_o="[object WeakMap]",Io="[object DataView]",qm=qt(Bi),Vm=qt(Gn),zm=qt(qi),Wm=qt(on),Hm=qt(Vi),Re=ct;(Bi&&Re(new Bi(new ArrayBuffer(1)))!=Io||Gn&&Re(new Gn)!=Ao||qi&&Re(qi.resolve())!=Eo||on&&Re(new on)!=Co||Vi&&Re(new Vi)!=_o)&&(Re=function(t){var e=ct(t),n=e==Bm?t.constructor:void 0,r=n?qt(n):"";if(r)switch(r){case qm:return Io;case Vm:return Ao;case zm:return Eo;case Wm:return Co;case Hm:return _o}return e});var Gm="[object Arguments]";function To(t){return Ue(t)&&ct(t)==Gm}var pl=Object.prototype,Km=pl.hasOwnProperty,Ym=pl.propertyIsEnumerable,ln=To((function(){return arguments})())?To:function(t){return Ue(t)&&Km.call(t,"callee")&&!Ym.call(t,"callee")},Jm=9007199254740991;function ys(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Jm}function Wt(t){return t!=null&&ys(t.length)&&!er(t)}function Zm(){return!1}var gl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,No=gl&&typeof module=="object"&&module&&!module.nodeType&&module,Xm=No&&No.exports===gl,Fo=Xm?rt.Buffer:void 0,Qm=Fo?Fo.isBuffer:void 0,kt=Qm||Zm,ep="[object Arguments]",tp="[object Array]",np="[object Boolean]",rp="[object Date]",ip="[object Error]",sp="[object Function]",op="[object Map]",ap="[object Number]",lp="[object Object]",cp="[object RegExp]",up="[object Set]",dp="[object String]",fp="[object WeakMap]",hp="[object ArrayBuffer]",mp="[object DataView]",pp="[object Float32Array]",gp="[object Float64Array]",yp="[object Int8Array]",bp="[object Int16Array]",xp="[object Int32Array]",vp="[object Uint8Array]",Sp="[object Uint8ClampedArray]",wp="[object Uint16Array]",jp="[object Uint32Array]",me={};me[pp]=me[gp]=me[yp]=me[bp]=me[xp]=me[vp]=me[Sp]=me[wp]=me[jp]=!0;me[ep]=me[tp]=me[hp]=me[np]=me[mp]=me[rp]=me[ip]=me[sp]=me[op]=me[ap]=me[lp]=me[cp]=me[up]=me[dp]=me[fp]=!1;function Op(t){return Ue(t)&&ys(t.length)&&!!me[ct(t)]}function bs(t){return function(e){return t(e)}}var yl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Un=yl&&typeof module=="object"&&module&&!module.nodeType&&module,Ap=Un&&Un.exports===yl,oi=Ap&&ol.process,cn=(function(){try{var t=Un&&Un.require&&Un.require("util").types;return t||oi&&oi.binding&&oi.binding("util")}catch{}})(),Po=cn&&cn.isTypedArray,nr=Po?bs(Po):Op,Ep="[object Map]",Cp="[object Set]",_p=Object.prototype,Ip=_p.hasOwnProperty;function ge(t){if(t==null)return!0;if(Wt(t)&&(Se(t)||typeof t=="string"||typeof t.splice=="function"||kt(t)||nr(t)||ln(t)))return!t.length;var e=Re(t);if(e==Ep||e==Cp)return!t.size;if(Lr(t))return!ml(t).length;for(var n in t)if(Ip.call(t,n))return!1;return!0}function Tp(){this.__data__=new ut,this.size=0}function Np(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Fp(t){return this.__data__.get(t)}function Pp(t){return this.__data__.has(t)}var $p=200;function Dp(t,e){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!Gn||r.length<$p-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ut(t);this.size=e.size}We.prototype.clear=Tp;We.prototype.delete=Np;We.prototype.get=Fp;We.prototype.has=Pp;We.prototype.set=Dp;function xs(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Ir=(function(){try{var t=Vt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function vs(t,e,n){e=="__proto__"&&Ir?Ir(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Rp=Object.prototype,kp=Rp.hasOwnProperty;function Ss(t,e,n){var r=t[e];(!(kp.call(t,e)&&tr(r,n))||n===void 0&&!(e in t))&&vs(t,e,n)}function bn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?vs(n,a,l):Ss(n,a,l)}return n}function bl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Mp=9007199254740991,Up=/^(?:0|[1-9]\d*)$/;function Br(t,e){var n=typeof t;return e=e??Mp,!!e&&(n=="number"||n!="symbol"&&Up.test(t))&&t>-1&&t%1==0&&t<e}var Lp=Object.prototype,Bp=Lp.hasOwnProperty;function xl(t,e){var n=Se(t),r=!n&&ln(t),i=!n&&!r&&kt(t),s=!n&&!r&&!i&&nr(t),o=n||r||i||s,a=o?bl(t.length,String):[],l=a.length;for(var c in t)(e||Bp.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Br(c,l)))&&a.push(c);return a}function ze(t){return Wt(t)?xl(t):ml(t)}function qp(t,e){return t&&bn(e,ze(e),t)}function Vp(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var zp=Object.prototype,Wp=zp.hasOwnProperty;function Hp(t){if(!te(t))return Vp(t);var e=Lr(t),n=[];for(var r in t)r=="constructor"&&(e||!Wp.call(t,r))||n.push(r);return n}function rr(t){return Wt(t)?xl(t,!0):Hp(t)}function Gp(t,e){return t&&bn(e,rr(e),t)}var vl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$o=vl&&typeof module=="object"&&module&&!module.nodeType&&module,Kp=$o&&$o.exports===vl,Do=Kp?rt.Buffer:void 0,Ro=Do?Do.allocUnsafe:void 0;function Sl(t,e){if(e)return t.slice();var n=t.length,r=Ro?Ro(n):new t.constructor(n);return t.copy(r),r}function ws(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Yp(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function wl(){return[]}var Jp=Object.prototype,Zp=Jp.propertyIsEnumerable,ko=Object.getOwnPropertySymbols,js=ko?function(t){return t==null?[]:(t=Object(t),Yp(ko(t),function(e){return Zp.call(t,e)}))}:wl;function Xp(t,e){return bn(t,js(t),e)}function Os(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Qp=Object.getOwnPropertySymbols,jl=Qp?function(t){for(var e=[];t;)Os(e,js(t)),t=Rr(t);return e}:wl;function eg(t,e){return bn(t,jl(t),e)}function Ol(t,e,n){var r=e(t);return Se(t)?r:Os(r,n(t))}function zi(t){return Ol(t,ze,js)}function As(t){return Ol(t,rr,jl)}var tg=Object.prototype,ng=tg.hasOwnProperty;function rg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&ng.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Tr=rt.Uint8Array;function Es(t){var e=new t.constructor(t.byteLength);return new Tr(e).set(new Tr(t)),e}function ig(t,e){var n=e?Es(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var sg=/\w*$/;function og(t){var e=new t.constructor(t.source,sg.exec(t));return e.lastIndex=t.lastIndex,e}var Mo=Me?Me.prototype:void 0,Uo=Mo?Mo.valueOf:void 0;function ag(t){return Uo?Object(Uo.call(t)):{}}function Al(t,e){var n=e?Es(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var lg="[object Boolean]",cg="[object Date]",ug="[object Map]",dg="[object Number]",fg="[object RegExp]",hg="[object Set]",mg="[object String]",pg="[object Symbol]",gg="[object ArrayBuffer]",yg="[object DataView]",bg="[object Float32Array]",xg="[object Float64Array]",vg="[object Int8Array]",Sg="[object Int16Array]",wg="[object Int32Array]",jg="[object Uint8Array]",Og="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Eg="[object Uint32Array]";function Cg(t,e,n){var r=t.constructor;switch(e){case gg:return Es(t);case lg:case cg:return new r(+t);case yg:return ig(t,n);case bg:case xg:case vg:case Sg:case wg:case jg:case Og:case Ag:case Eg:return Al(t,n);case ug:return new r;case dg:case mg:return new r(t);case fg:return og(t);case hg:return new r;case pg:return ag(t)}}var Lo=Object.create,El=(function(){function t(){}return function(e){if(!te(e))return{};if(Lo)return Lo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Cl(t){return typeof t.constructor=="function"&&!Lr(t)?El(Rr(t)):{}}var _g="[object Map]";function Ig(t){return Ue(t)&&Re(t)==_g}var Bo=cn&&cn.isMap,Tg=Bo?bs(Bo):Ig,Ng="[object Set]";function Fg(t){return Ue(t)&&Re(t)==Ng}var qo=cn&&cn.isSet,Pg=qo?bs(qo):Fg,$g=1,Dg=2,Rg=4,_l="[object Arguments]",kg="[object Array]",Mg="[object Boolean]",Ug="[object Date]",Lg="[object Error]",Il="[object Function]",Bg="[object GeneratorFunction]",qg="[object Map]",Vg="[object Number]",Tl="[object Object]",zg="[object RegExp]",Wg="[object Set]",Hg="[object String]",Gg="[object Symbol]",Kg="[object WeakMap]",Yg="[object ArrayBuffer]",Jg="[object DataView]",Zg="[object Float32Array]",Xg="[object Float64Array]",Qg="[object Int8Array]",ey="[object Int16Array]",ty="[object Int32Array]",ny="[object Uint8Array]",ry="[object Uint8ClampedArray]",iy="[object Uint16Array]",sy="[object Uint32Array]",he={};he[_l]=he[kg]=he[Yg]=he[Jg]=he[Mg]=he[Ug]=he[Zg]=he[Xg]=he[Qg]=he[ey]=he[ty]=he[qg]=he[Vg]=he[Tl]=he[zg]=he[Wg]=he[Hg]=he[Gg]=he[ny]=he[ry]=he[iy]=he[sy]=!0;he[Lg]=he[Il]=he[Kg]=!1;function Ln(t,e,n,r,i,s){var o,a=e&$g,l=e&Dg,c=e&Rg;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!te(t))return t;var u=Se(t);if(u){if(o=rg(t),!a)return ws(t,o)}else{var d=Re(t),m=d==Il||d==Bg;if(kt(t))return Sl(t,a);if(d==Tl||d==_l||m&&!i){if(o=l||m?{}:Cl(t),!a)return l?eg(t,Gp(o,t)):Xp(t,qp(o,t))}else{if(!he[d])return i?t:{};o=Cg(t,d,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),Pg(t)?t.forEach(function(y){o.add(Ln(y,e,n,y,t,s))}):Tg(t)&&t.forEach(function(y,v){o.set(v,Ln(y,e,n,v,t,s))});var f=c?l?As:zi:l?rr:ze,p=u?void 0:f(t);return xs(p||t,function(y,v){p&&(v=y,y=t[v]),Ss(o,v,Ln(y,e,n,v,t,s))}),o}function Nl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function oy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ay(t,e){return e.length<2?t:Ur(t,oy(e,0,-1))}var ly=Object.prototype,cy=ly.hasOwnProperty;function Fl(t,e){e=yn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=Et(e[n]);if(i==="__proto__"&&!cy.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=ay(t,e);return s==null||delete s[Et(Nl(e))]}function uy(t){return At(t)?void 0:t}var Vo=Me?Me.isConcatSpreadable:void 0;function dy(t){return Se(t)||ln(t)||!!(Vo&&t&&t[Vo])}function ir(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=dy),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?ir(a,e-1,n,r,i):Os(i,a):r||(i[i.length]=a)}return i}function Wi(t){var e=t==null?0:t.length;return e?ir(t,1):[]}function fy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var zo=Math.max;function Pl(t,e,n){return e=zo(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=zo(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),fy(t,this,a)}}function hy(t){return function(){return t}}function qr(t){return t}var my=Ir?function(t,e){return Ir(t,"toString",{configurable:!0,enumerable:!1,value:hy(e),writable:!0})}:qr,py=800,gy=16,yy=Date.now;function by(t){var e=0,n=0;return function(){var r=yy(),i=gy-(r-n);if(n=r,i>0){if(++e>=py)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var $l=by(my);function Dl(t){return $l(Pl(t,void 0,Wi),t+"")}var xy=1,vy=2,Sy=4,un=Dl(function(t,e){var n={};if(t==null)return n;var r=!1;e=gn(e,function(s){return s=yn(s,t),r||(r=s.length>1),s}),bn(t,As(t),n),r&&(n=Ln(n,xy|vy|Sy,uy));for(var i=e.length;i--;)Fl(n,e[i]);return n});function Nr(t,e){if(de in t&&gs.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(te(r)){const i=Nr(r,e);if(i!==void 0)return i}}else if(te(n)){const r=Nr(n,e);if(r!==void 0)return r}}function Hi(t,e){const n=D(t,de,e);let r=t;ue in r&&(r={...r,[ue]:gs.resolve(n,r[ue])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>te(o)?Hi(o,n):o)}:te(s)&&(r={...r,[i]:Hi(s,n)});return r}function Cs(t,e){const n=e[t];return[un(e,[t]),n]}function Rl(t,e={},n=[],r=D(e,[de])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||de in e&&e[de]===o?s=si.get(e,l):e[Fn]===br&&(s=Nr(e,o.replace(/\/$/,"")),s!==void 0&&(s=si.get(s,l)))}else if(e[Fn]===br){const l=o?gs.resolve(o,i):i,[c,...u]=l.replace(/#\/?$/,"").split("#");s=Nr(e,c.replace(/\/$/,"")),s!==void 0&&(o=s[de],ge(u)||(s=si.get(s,decodeURIComponent(u.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[ue];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...m]=n,g=[...m,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${g}`)}const[l,c]=Cs(ue,s),u=Rl(c,e,[...n,i],o);return Object.keys(l).length>0?e[Fn]===eh||e[Fn]===br?{[Ot]:[l,u]}:{...l,...u}:u}return s}function Kn(t,e={},n=D(e,[de])){return Rl(t,e,[],n)}var wy=Object.prototype,jy=wy.hasOwnProperty;function Oy(t,e){return t!=null&&jy.call(t,e)}function kl(t,e,n){e=yn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=Et(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&ys(i)&&Br(o,i)&&(Se(t)||ln(t)))}function X(t,e){return t!=null&&kl(t,e,Oy)}var Ay="[object String]";function Ct(t){return typeof t=="string"||!Se(t)&&Ue(t)&&ct(t)==Ay}function He(t){let e;const n=D(t,Jf);return Ct(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var Ey=1/0;function Cy(t){var e=t==null?0:t.length;return e?ir(t,Ey):[]}function Gi(t,e,n){(n!==void 0&&!tr(t[e],n)||n===void 0&&!(e in t))&&vs(t,e,n)}function _y(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var Ml=_y();function Yn(t){return Ue(t)&&Wt(t)}function Ki(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Iy(t){return bn(t,rr(t))}function Ty(t,e,n,r,i,s,o){var a=Ki(t,n),l=Ki(e,n),c=o.get(l);if(c){Gi(t,n,c);return}var u=s?s(a,l,n+"",t,e,o):void 0,d=u===void 0;if(d){var m=Se(l),g=!m&&kt(l),f=!m&&!g&&nr(l);u=l,m||g||f?Se(a)?u=a:Yn(a)?u=ws(a):g?(d=!1,u=Sl(l,!0)):f?(d=!1,u=Al(l,!0)):u=[]:At(l)||ln(l)?(u=a,ln(a)?u=Iy(a):(!te(a)||er(a))&&(u=Cl(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),Gi(t,n,u)}function Ul(t,e,n,r,i){t!==e&&Ml(e,function(s,o){if(i||(i=new We),te(s))Ty(t,e,o,n,Ul,r,i);else{var a=r?r(Ki(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Gi(t,o,a)}},rr)}function Vr(t,e){return $l(Pl(t,e,qr),t+"")}function Ny(t,e,n){if(!te(n))return!1;var r=typeof e;return(r=="number"?Wt(n)&&Br(e,n.length):r=="string"&&e in n)?tr(n[e],t):!1}function Fy(t){return Vr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&Ny(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var Py=Fy(function(t,e,n){Ul(t,e,n)});function _s(t,e,n,r){if(!te(t))return t;e=yn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=Et(e[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var u=a[l];c=r?r(u,l,a):void 0,c===void 0&&(c=te(u)?u:Br(e[i+1])?[]:{})}Ss(a,l,c),a=a[l]}return t}function ce(t,e,n){return t==null?t:_s(t,e,n)}function Ll(t){return typeof t=="function"?t:qr}var $y=/\s/;function Dy(t){for(var e=t.length;e--&&$y.test(t.charAt(e)););return e}var Ry=/^\s+/;function ky(t){return t&&t.slice(0,Dy(t)+1).replace(Ry,"")}var Wo=NaN,My=/^[-+]0x[0-9a-f]+$/i,Uy=/^0b[01]+$/i,Ly=/^0o[0-7]+$/i,By=parseInt;function qy(t){if(typeof t=="number")return t;if(Qn(t))return Wo;if(te(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=te(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ky(t);var n=Uy.test(t);return n||Ly.test(t)?By(t.slice(2),n?2:8):My.test(t)?Wo:+t}var Ho=1/0,Vy=17976931348623157e292;function zy(t){if(!t)return t===0?t:0;if(t=qy(t),t===Ho||t===-Ho){var e=t<0?-1:1;return e*Vy}return t===t?t:0}function Bl(t){var e=zy(t),n=e%1;return e===e?n?e-n:e:0}var Wy=9007199254740991,ai=4294967295,Hy=Math.min;function ql(t,e){if(t=Bl(t),t<1||t>Wy)return[];var n=ai,r=Hy(t,ai);e=Ll(e),t-=ai;for(var i=bl(r,e);++n<t;)e(n);return i}function Vl(t,e){return t&&Ml(t,e,ze)}var Gy="__lodash_hash_undefined__";function Ky(t){return this.__data__.set(t,Gy),this}function Yy(t){return this.__data__.has(t)}function Mt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dt;++e<n;)this.add(t[e])}Mt.prototype.add=Mt.prototype.push=Ky;Mt.prototype.has=Yy;function Jy(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Jn(t,e){return t.has(e)}var Zy=1,Xy=2;function zl(t,e,n,r,i,s){var o=n&Zy,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(t),u=s.get(e);if(c&&u)return c==e&&u==t;var d=-1,m=!0,g=n&Xy?new Mt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var y=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(y!==void 0){if(y)continue;m=!1;break}if(g){if(!Jy(e,function(v,w){if(!Jn(g,w)&&(f===v||i(f,v,n,r,s)))return g.push(w)})){m=!1;break}}else if(!(f===p||i(f,p,n,r,s))){m=!1;break}}return s.delete(t),s.delete(e),m}function Qy(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Is(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var eb=1,tb=2,nb="[object Boolean]",rb="[object Date]",ib="[object Error]",sb="[object Map]",ob="[object Number]",ab="[object RegExp]",lb="[object Set]",cb="[object String]",ub="[object Symbol]",db="[object ArrayBuffer]",fb="[object DataView]",Go=Me?Me.prototype:void 0,li=Go?Go.valueOf:void 0;function hb(t,e,n,r,i,s,o){switch(n){case fb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case db:return!(t.byteLength!=e.byteLength||!s(new Tr(t),new Tr(e)));case nb:case rb:case ob:return tr(+t,+e);case ib:return t.name==e.name&&t.message==e.message;case ab:case cb:return t==e+"";case sb:var a=Qy;case lb:var l=r&eb;if(a||(a=Is),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;r|=tb,o.set(t,e);var u=zl(a(t),a(e),r,i,s,o);return o.delete(t),u;case ub:if(li)return li.call(t)==li.call(e)}return!1}var mb=1,pb=Object.prototype,gb=pb.hasOwnProperty;function yb(t,e,n,r,i,s){var o=n&mb,a=zi(t),l=a.length,c=zi(e),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var m=a[d];if(!(o?m in e:gb.call(e,m)))return!1}var g=s.get(t),f=s.get(e);if(g&&f)return g==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++d<l;){m=a[d];var v=t[m],w=e[m];if(r)var A=o?r(w,v,m,e,t,s):r(v,w,m,t,e,s);if(!(A===void 0?v===w||i(v,w,n,r,s):A)){p=!1;break}y||(y=m=="constructor")}if(p&&!y){var O=t.constructor,b=e.constructor;O!=b&&"constructor"in t&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof b=="function"&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}var bb=1,Ko="[object Arguments]",Yo="[object Array]",ur="[object Object]",xb=Object.prototype,Jo=xb.hasOwnProperty;function vb(t,e,n,r,i,s){var o=Se(t),a=Se(e),l=o?Yo:Re(t),c=a?Yo:Re(e);l=l==Ko?ur:l,c=c==Ko?ur:c;var u=l==ur,d=c==ur,m=l==c;if(m&&kt(t)){if(!kt(e))return!1;o=!0,u=!1}if(m&&!u)return s||(s=new We),o||nr(t)?zl(t,e,n,r,i,s):hb(t,e,l,n,r,i,s);if(!(n&bb)){var g=u&&Jo.call(t,"__wrapped__"),f=d&&Jo.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,y=f?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return m?(s||(s=new We),yb(t,e,n,r,i,s)):!1}function zr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:vb(t,e,n,r,zr,i)}var Sb=1,wb=2;function jb(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],c=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var u=new We,d;if(!(d===void 0?zr(c,l,Sb|wb,r,u):d))return!1}}return!0}function Wl(t){return t===t&&!te(t)}function Ob(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Wl(i)]}return e}function Hl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Ab(t){var e=Ob(t);return e.length==1&&e[0][2]?Hl(e[0][0],e[0][1]):function(n){return n===t||jb(n,t,e)}}function Eb(t,e){return t!=null&&e in Object(t)}function Gl(t,e){return t!=null&&kl(t,e,Eb)}var Cb=1,_b=2;function Ib(t,e){return hs(t)&&Wl(e)?Hl(Et(t),e):function(n){var r=D(n,t);return r===void 0&&r===e?Gl(n,t):zr(e,r,Cb|_b)}}function Tb(t){return function(e){return e?.[t]}}function Nb(t){return function(e){return Ur(e,t)}}function Fb(t){return hs(t)?Tb(Et(t)):Nb(t)}function Ts(t){return typeof t=="function"?t:t==null?qr:typeof t=="object"?Se(t)?Ib(t[0],t[1]):Ab(t):Fb(t)}function Pb(t,e,n){var r=Se(t),i=r||kt(t)||nr(t);if(e=Ts(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:te(t)?n=er(s)?El(Rr(t)):{}:n={}}return(i?xs:Vl)(t,function(o,a,l){return e(n,o,a,l)}),n}function $b(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Db(t){return t!==t}function Rb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Kl(t,e,n){return e===e?Rb(t,e,n):$b(t,Db,n)}function Ns(t,e){var n=t==null?0:t.length;return!!n&&Kl(t,e,0)>-1}function xr(){}var kb=1/0,Mb=on&&1/Is(new on([,-0]))[1]==kb?function(t){return new on(t)}:xr,Ub=200;function Yl(t,e,n){var r=-1,i=Ns,s=t.length,o=!0,a=[],l=a;if(s>=Ub){var c=Mb(t);if(c)return Is(c);o=!1,i=Jn,l=new Mt}else l=a;e:for(;++r<s;){var u=t[r],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=l.length;m--;)if(l[m]===d)continue e;a.push(u)}else i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}function Jl(t){return t&&t.length?Yl(t):[]}function Zn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?"number":typeof t=="object"?"object":"string"}var Lb=Vr(function(t){return Yl(ir(t,1,Yn,!0))});function Le(t){let{type:e}=t;return!e&&t.const?Zn(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function lt(t,e){const n={...t};return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&V(o)?r[i]=lt(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===tl&&Array.isArray(s)&&Array.isArray(o)?r[i]=Lb(s,o):r[i]=o,r},n)}var Bb="[object Number]";function Zl(t){return typeof t=="number"||Ue(t)&&ct(t)==Bb}function Xl(t,e,n){var r;if(t&&n){const i=D(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=D(o,[se,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Fr(t,e,n,r,i){if(e===void 0)return 0;const s=Xl(e,n,i);if(Zl(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&X(a,[se,i])){const l=D(e,i),c=D(a,[se,i],{});if(t.isValid(c,l,r))return o}else if(a[se]){const l={anyOf:Object.keys(a[se]).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={...a,...l};if(delete c.required,t.isValid(c,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}const qb=Object.prototype;function Pn(t){for(const e in t)if(qb.hasOwnProperty.call(t,e))return!1;return!0}const Vb=["array","boolean","integer","null","number","object","string"];new Set(Vb);const zb=["$defs","definitions","properties","patternProperties","dependencies"];new Set(zb);const Wb=["items","allOf","oneOf","anyOf"];new Set(Wb);const Hb=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Hb);function vr(t){return typeof t=="object"}function Ye(t){return vr(t)?Pn(t):t===!0}function nn(t,e){return t<e?-1:t>e?1:0}function ci(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function Gb(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function Zo(t){return t.length===0}function ui(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function Ql(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){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(t(c,o[u])===0)continue e;a=o.push(c)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function Kb(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const u=e;e=n,n=u;const d=i;i=s,s=d}const o=[...e].sort(t),a=[...n].sort(t);let l=0,c=0;for(;l<i&&c<s;){const u=t(o[l],a[c]);u===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,c++):u<0?l++:c++}return r}}function Yb(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const Xo=Yb,ec=()=>0,Jb=t=>t===void 0,Zb=t=>typeof t!="object",Qo={boolean:0,number:1,string:2};function Xb(t,e){const n=typeof t,r=typeof e;return n===r?nn(t,e):Qo[n]-Qo[r]}function Qb(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Wr(t,e,n=ec){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Qt(t){return Wr(Jb,t)}function pt(t,e){return Wr(n=>n===void 0||t(n),e)}function di(t,e){return Wr(Array.isArray,t,e)}const be=Qt(nn),fi=pt(t=>t===0,(t,e)=>t-e);function e0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=Xo(e,p=>Object.keys(p).sort());function r(p){return(y,v)=>{const w=n(y),A=n(v),O=Math.min(w.length,A.length);for(let b=0;b<O;b++){const x=nn(w[b],A[b]);if(x!==0)return x}if(w.length!==A.length)return w.length-A.length;for(let b=0;b<O;b++){const x=w[b],S=p(y[x],v[x]);if(S!==0)return S}return 0}}function i(p){const y=ui(p),v=Xo(t,Ql(p,{threshold:0}));return(w,A)=>y(v(w),v(A))}const s=i(nn);function o(p,y){if(vr(p)){if(vr(y)){const v=Object.keys(p),w=Object.keys(y),A=Qb(v,w),O=A.length;for(let b=0;b<O;b++){const x=A[b];if(p[x]===y[x])continue;const j=(f[x]??a)(p[x],y[x]);if(j!==0)return j}return 0}return y===!0&&Pn(p)?0:1}return vr(y)?p===!0&&Pn(y)?0:-1:nn(p,y)}const a=Qt(c),l=Wr(Zb,di(r(a),ui(c)),Xb);function c(p,y){return p===null?-1:y===null?1:l(p,y)}const u=Qt(o),d=pt(Pn,r(u)),m=Qt(i(o)),g=pt(Ye,o),f={$id:be,$comment:be,$defs:d,$ref:be,$schema:be,const:a,contains:u,contentEncoding:be,contentMediaType:be,default:a,definitions:d,description:be,else:u,examples:a,exclusiveMaximum:be,exclusiveMinimum:be,format:be,if:u,maximum:be,maxItems:be,maxLength:be,maxProperties:be,minimum:be,multipleOf:be,not:u,pattern:be,propertyNames:u,readOnly:be,then:u,title:be,writeOnly:be,uniqueItems:pt(p=>p===!1,ec),minLength:fi,minItems:fi,minProperties:fi,required:pt(Zo,s),enum:pt(Zo,i(c)),type:Qt((p,y)=>{const v=Array.isArray(p),w=Array.isArray(y);return!v&&!w?nn(p,y):s(v?p:[p],w?y:[y])}),items:pt(p=>!Array.isArray(p)&&Ye(p),di(o,ui(o))),anyOf:m,allOf:m,oneOf:m,properties:d,patternProperties:d,additionalProperties:g,additionalItems:g,dependencies:pt(Pn,r(Qt(di(o,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:o}}function ea(t){return t}const tc=(t,e)=>t?tc(e%t,t):e,t0=(t,e)=>Math.abs(t*e)/tc(t,e);function n0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function hi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function mi(t,e){return t||e}function ta(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function r0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Tt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const i0=["properties","patternProperties","additionalProperties"];function na(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const ra=[[],[]];function ia(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const s0=["items","additionalItems"],o0=["if","then","else"];function sa(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function pi(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function a0(t){const e=new Map;for(const[n,r,i]of t){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=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const l0=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function c0({mergePatterns:t=n0,isSubRegExp:e=Object.is,intersectJson:n=Gb,deduplicateJsonSchemaDef:r=ea,defaultMerger:i=ea,assigners:s=[],checks:o=l0,mergers:a}={}){function l(O){const b=O.length;let x=O[0];for(let S=1;S<b;S++){const j=v(x,O[S]);if(j===!1)return!1;Ye(j)||(x=j)}return x}function c(O,b,x,S,j,E,C){if(O.length=0,x===!1)return!1;if(O.push(x),j!==void 0){if(j===!1)return!1;O.push(j)}if(ia(O,b,E))return!1;const I=O.length<2;if(C===!1){if(I)return;if(ia(O,b,S))return!1}else I&&C!==void 0&&O.push(C);return O.length===1?O[0]:l(O)}function u(O,b,x,S,j,E){const C=x.length;if(C>0&&j!==!1)if(E)Object.assign(O,b);else for(let _=0;_<C;_++){const I=x[_];S.has(I)||(O[I]=v(b[I],j))}return O}const d=(O,{properties:b={},patternProperties:x,additionalProperties:S=!0},{properties:j={},patternProperties:E,additionalProperties:C=!0})=>{const _=Ye(S),I=Ye(C);if(_&&I)return Tt(O,"properties",w(b,j)),Tt(O,"patternProperties",x&&E?w(x,E):x??E),delete O.additionalProperties,O;const T=v(S,C);Tt(O,"additionalProperties",T);const F={},P=Object.keys(b),$=P.length,[R,B]=x?na(x):ra,[U,Y]=E?na(E):ra,ne=[],fe=new Set,ye=I?void 0:C;for(let z=0;z<$;z++){const re=P[z];fe.add(re);const oe=c(ne,re,b[re],R,j[re],U,ye);oe!==void 0&&(F[re]=oe)}const k=Object.keys(j),le=k.length,ee=_?void 0:S;for(let z=0;z<le;z++){const re=k[z];if(fe.has(re))continue;const oe=c(ne,re,j[re],U,void 0,R,ee);oe!==void 0&&(F[re]=oe)}Tt(O,"properties",F);let H={};const G=new Set;return B.length>0&&Y.length>0&&hi(B,Y,(z,re)=>{e(z,re)&&G.add(z),e(re,z)&&G.add(re),H[t(z,re)]=v(x[z],E[re])}),H=u(H,x,B,G,C,I),H=u(H,E,Y,G,S,_),Tt(O,"patternProperties",H),O},m=(O,{items:b=[],additionalItems:x},{items:S=[],additionalItems:j})=>{const E=Array.isArray(b),C=Array.isArray(S),_=[];if(O.items=_,E&&C){const[I,T,F]=b.length<S.length?[b.length,x,S]:[S.length,j,b];let P=0;for(;P<I;P++)_.push(v(b[P],S[P]));if(T===!1)O.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;P<F.length;P++)_.push($?F[P]:v(F[P],T));Tt(O,"additionalItems",x!==void 0&&j!==void 0?v(x,j):x??j)}}else if(E||C){const[I,T,F]=E?[b,S,x]:[S,b,j];Tt(O,"additionalItems",F&&v(F,T));for(let P=0;P<I.length;P++)_.push(v(I[P],T))}else delete O.additionalItems,O.items=v(b,S);return O},g=(O,b,x)=>{sa(O,b);const S=sa({},x);return O.allOf===void 0?O.allOf=[S]:O.allOf=O.allOf.concat(S),O};function f(O,b){const x=[];if(hi(O,b,(S,j)=>{try{x.push(v(S,j))}catch{}}),x.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(O)}" and "${JSON.stringify(b)}"; the merged result is empty`);return r(x)}const p=r0([[i0,d],[s0,m],[o0,g],...s]),y=a0(o);function v(O,b){if(O===!1||b===!1)return!1;if(Ye(O))return Ye(b)?!0:b;if(Ye(b))return O;let x={...O};const S=new Set,j=new Set,E=Object.keys(b),C=E.length;for(let _=0;_<C;_++){const I=E[_],T=b[I];if(T===void 0)continue;const F=y.get(I);if(F!==void 0){const B=F.length;for(let U=0;U<B;U++){const Y=F[U];O[Y.oppositeKey]!==void 0&&j.add(Y.check)}}const P=O[I];if(P===void 0){x[I]=T;continue}const $=p.get(I);if($){S.add($);continue}const R=A[I]??i;x[I]=R(P,T)}for(const _ of S)x=_(x,O,b);for(const _ of j)_(x);return x}const w=ta(v),A={$id:i,$ref:i,$schema:i,$comment:i,$defs:w,definitions:w,type:(O,b)=>{if(O===b)return O;const x=Array.isArray(O),S=Array.isArray(b);if(!x&&!S){const j=pi(O,b);if(j!==void 0)return j}else if(x||S){const j=new Set;if(x&&S)hi(O,b,(C,_)=>{const I=pi(C,_);I!==void 0&&j.add(I)});else{const C=x?O:b,_=x?b:O,I=C.length;for(let T=0;T<I;T++){const F=pi(_,C[T]);F!==void 0&&j.add(F)}}const E=j.size;if(E===1)return j.values().next().value;if(E>1)return Array.from(j)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${O.toString()}, ${b.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(O,b)=>{const x=r([O,b]);return x.length===1?x[0]:{anyOf:x}},pattern:t,readOnly:mi,writeOnly:mi,enum:(O,b)=>{const x=n(O,b);if(x.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(O)}", "${JSON.stringify(b)}"`);return x},anyOf:f,oneOf:f,allOf:(O,b)=>r(O.concat(b)),propertyNames:v,contains:v,dependencies:ta((O,b)=>Array.isArray(O)?Array.isArray(b)?ci(O,b):v(b,{required:O}):Array.isArray(b)?v(O,{required:b}):v(O,b)),examples:(O,b)=>{if(!Array.isArray(O)||!Array.isArray(b))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(O)}" and "${JSON.stringify(b)}"`);return ci(O,b)},multipleOf:(O,b)=>{let x=1;for(;!Number.isInteger(O)||!Number.isInteger(b);)x*=10,O*=10,b*=10;return t0(O,b)/x},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:mi,required:ci,...a};return{mergeSchemaDefinitions:v,mergeArrayOfSchemaDefinitions:l}}function u0(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function d0(t){return e=>t(u0(e))}const{compareSchemaDefinitions:f0,compareSchemaValues:h0}=e0(),{mergeArrayOfSchemaDefinitions:m0}=c0({intersectJson:Kb(h0),deduplicateJsonSchemaDef:Ql(f0)}),nc=d0(m0);function Ce(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function p0(t,e,n,r,i,s,o){const{if:a,then:l,else:c,...u}=e,d=t.isValid(a,s||{},n);let m=[u],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ze(t,l,n,s,r,i,o))),c&&typeof c!="boolean"&&(g=g.concat(Ze(t,c,n,s,r,i,o)));else{const f=d?l:c;f&&typeof f!="boolean"&&(g=g.concat(Ze(t,f,n,s,r,i,o)))}return g.length&&(m=g.map(f=>lt(u,f))),m.flatMap(f=>Ze(t,f,n,s,r,i,o))}function rc(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>ql(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function ic(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function g0(t,e,n,r,i,s,o,a){const l=sc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(cs in e)return ac(t,e,n,r,i,s,o).flatMap(u=>Ze(t,u,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const c=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return rc(c).map(d=>({...e,allOf:d}))}return[e]}function sc(t,e,n,r,i,s,o,a){const l=St(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function St(t,e,n,r,i){if(!V(t))return t;let s=t,o=r;if(ue in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...Kn(a,e,o),...l,[Mn]:a},de in s&&(o=s[de])}if(se in s){const a=[],l=Pb(s[se],(c,u,d)=>{const m=[...n];c[d]=St(u,e,m,o,i),a.push(m)},{});Py(n,Jl(Cy(a))),s={...s,[se]:l}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:St(s.items,e,n,o,i)}),i){let a,l;Q in t&&Array.isArray(t[Q])?(a=Q,l=s[Q]):W in t&&Array.isArray(t[W])&&(a=W,l=s[W]),a&&l&&(s={...s,[a]:l.map(c=>St(c,e,n,o,i))})}return ie(t,s)?t:s}function y0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&V(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Mi in s){const l=ic(s,a);if(!ge(l)){s.properties[a]=Ce(t,{[Ot]:Object.values(l)},n,D(o,[a]),i),ce(s.properties,[a,at],!0);return}}if(tn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ce(t,{[ue]:D(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:Q in s.additionalProperties||W in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:Zn(D(o,[a]))}:l={type:Zn(D(o,[a]))},s.properties[a]=l,ce(s.properties,[a,at],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,at],!0)}}),s}function b0(t){return nc(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return V(e)?g0(t,e,n,i,s,r,o,a).flatMap(c=>{var u;let d=c;if(us in d)return p0(t,d,n,i,s,r,o);if(Ot in d){if(i){const{allOf:g,...f}=d;return[...g,f]}try{const g=[],f=[];(u=d.allOf)===null||u===void 0||u.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):f.push(p)}),g.length&&(d={...d,allOf:f}),d=o?o(d):b0(d),g.length&&(d.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
|
|
2
|
+
`,g);const{allOf:f,...p}=d;return p}}return se in d&&Mi in d&&(d=Object.keys(d.properties).reduce((g,f)=>{const p=ic(g,f);return ge(p)||(g.properties[f]=Ce(t,{allOf:[g.properties[f],...Object.values(p)]},n,D(r,[f]),o)),g},{...d,properties:{...d.properties}})),Mi in d||tn in d&&d.additionalProperties!==!1?y0(t,d,n,r,o):d}):[{}]}function x0(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const c=i===void 0&&r?{}:i,u=He(e);s=s.map(m=>St(m,n,[]));const d=Fr(t,c,s,n,u);if(r){const m=oc(s,!1,n);return Fr(t,c,m,n,u),s.map(g=>lt(l,g))}return[lt(l,s[d])]}return[e]}function oc(t,e=!1,n){return t.map(r=>{if(!V(r))return r?{}:{not:{}};const i=e&&n?St(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function ac(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return x0(t,l,n,r,s).flatMap(u=>lc(t,a,u,n,r,i,s,o))}function lc(t,e,n,r,i,s,o,a){let l=[n];for(const c in e)if((i||D(o,[c])!==void 0)&&(!n.properties||c in n.properties)){const[u,d]=Cs(c,e);return Array.isArray(d)?l[0]=v0(n,d):V(d)&&(l=S0(t,n,r,c,d,i,s,o,a)),l.flatMap(m=>lc(t,u,m,r,i,s,o,a))}return l}function v0(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function S0(t,e,n,r,i,s,o,a,l){return Ze(t,i,n,a,s,o,l).flatMap(u=>{const{oneOf:d,...m}=u,g=lt(e,m);if(d===void 0)return g;const f=d.map(y=>typeof y=="boolean"||!(ue in y)?[y]:sc(t,y,n,s,o,a));return rc(f).flatMap(y=>w0(t,g,n,r,y,s,o,a,l))})}function w0(t,e,n,r,i,s,o,a,l){const c=i.filter(u=>{if(typeof u=="boolean"||!u||!u.properties)return!1;const{[r]:d}=u.properties;if(d){const m={type:"object",properties:{[r]:d}};return t.isValid(m,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"),[e]):c.flatMap(u=>{const d=u,[m]=Cs(r,d.properties),g={...d,properties:m};return Ze(t,g,n,a,s,o,l).map(p=>lt(e,p))})}function $n(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=He(n)||r,c=n[i].map(d=>Ce(t,d,e,s,o)),u=D(s,l);if(u!==void 0)return c.find(d=>ie(D(d,[se,l,Dt],D(d,[se,l,Ne])),u))}}function cc(t,e,n,r,i){let s=n;if(X(n,ue)&&(s=Ce(t,n,e,void 0,i)),ge(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&X(s,a))return s=D(s,a),cc(t,e,s,l,i)}function Sr(t,e,n,r,i,s){const o=cc(t,e,n,r,s);return o===void 0?i:o}const oa={title:"!@#$_UNKNOWN_$#@!"};function j0(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop(),c=String(l);o.length&&o.forEach(g=>{a=Sr(t,e,a,[se,g],{},s),X(a,W)?a=$n(t,e,a,c,W,D(i,g),s):X(a,Q)&&(a=$n(t,e,a,c,Q,D(i,g),s))}),X(a,W)?a=$n(t,e,a,c,W,i,s):X(a,Q)&&(a=$n(t,e,a,c,Q,i,s));let u=Sr(t,e,a,[se,l],oa,s);u===oa&&(u=void 0);const d=Sr(t,e,a,tl,[],s);let m;return u&&Array.isArray(d)&&(m=d.includes(c)),{field:u,isRequired:m}}function O0(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function A0(t,e){return function(n,r){if(n==null)return n;if(!Wt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var uc=A0(Vl);function E0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function C0(t,e,n){var r=Se(t)?O0:E0,i=arguments.length<3;return r(t,Ts(e),n,i,uc)}const _0={type:"object",$id:Yf,properties:{__not_really_there__:{type:"number"}}};function Yi(t,e,n,r,i){let s=0;return n&&(te(n.properties)?s+=C0(n.properties,(o,a,l)=>{const c=D(r,l);if(typeof a=="boolean")return o;if(X(a,ue)){const u=Ce(t,a,e,c,i);return o+Yi(t,e,u,c||{},i)}if((X(a,W)||X(a,Q))&&c){const u=X(a,W)?W:Q,d=He(a);return o+dn(t,e,c,D(a,u),-1,d,i)}if(a.type==="object"){const u=te(c)?1:0;return o+u+Yi(t,e,a,c,i)}if(a.type===Zn(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):Ct(n.type)&&n.type===Zn(r)&&(s+=1)),s}function dn(t,e,n,r,i=-1,s,o){const a=r.map(m=>St(m,e,[])),l=Xl(n,r,s);if(Zl(l))return l;const c=a.reduce((m,g,f)=>(Fr(t,n,[_0,g],e,s)===1&&m.push(f),m),[]);if(c.length===1)return c[0];c.length||ql(a.length,m=>c.push(m));const u=new Set,{bestIndex:d}=c.reduce((m,g)=>{const{bestScore:f}=m,p=a[g],y=Yi(t,e,p,n,o);return u.add(y),y>f?{bestIndex:g,bestScore:y}:m},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function dc(t){const e=t[Ne],n=Le(t);return V(e)&&Ct(e?.$data)&&n!=="object"&&n!=="array"}function fc(t){return Array.isArray(t.enum)&&t.enum.length===1||Ne in t}function Fs(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>V(e))}function fn(t){return t==null}function Xn(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((c,u)=>a[u]!==void 0?Xn(s[u],e[u],n,r,i):c);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(V(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const c=D(e,a),u=V(t)&&a in t,d=a in e,m=(l=D(t,a))!==null&&l!==void 0?l:{},g=u&&V(m)&&Object.values(m).some(y=>V(y)),f=u&&V(D(t,a)),p=d&&V(c);return f&&p&&!g?(o[a]={...D(t,a),...c},o):(o[a]=Xn(D(t,a),c,n,r,i&&(u||!d)),s)},s)}return r&&(t!==void 0&&fn(e)||typeof e=="number"&&Number.isNaN(e))||i&&!fn(e)?t:e}function Ut(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&V(o))r[i]=Ut(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},{...t})}function I0(t){if(Kf in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(Ne in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function T0(t,e){const n=new Map(t.map(s=>[String(s.value),s])),r=new Set(e.filter(s=>s!=="*").map(String)),i=t.filter(s=>!r.has(String(s.value)));return e.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function hn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:c}=M(e);s=l,o=c}let a=t.enum.map((l,c)=>({label:Array.isArray(s)?s[c]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=T0(a,o)),a}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=He(t);if(e){const{optionsSchemaSelector:s=i}=M(e);i=s}return n&&n.map((s,o)=>{const{title:a}=M(r?.[o]),l=s;let c,u=a;if(i){const d=D(l,[se,i],{});c=D(d,Dt,D(d,Ne)),u=u||d?.title||l.title||String(c)}else c=I0(l),u=u||l.title||String(c);return{schema:l,label:u,value:c}})}function Hr(t,e,n={},r){const i=Ce(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&fc(o)):!1}function Ps(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Hr(t,e.items,n,r)}const N0=["string","number","integer","boolean","null"];var mn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(mn||(mn={}));function gi(t,e=mn.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==mn.Ignore&&V(t.additionalItems)?t.additionalItems:{}}function hc(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ge(e)&&n===null?null:e}function aa(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!V(n)||!ge(n))&&(t[e]=n);else if(c!=="skipDefaults"){const u=i===void 0?s.includes(e):i;V(n)?c==="skipEmptyDefaults"?ge(n)||(t[e]=n):(!ge(n)||s.includes(e))&&(u||c!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||u&&s.includes(e))&&(t[e]=n)}}function wt(t,e,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:d=!1,initialDefaultsGenerated:m}=n;let g=V(i)?i:{};const f=V(e)?e:{};let p=r,y=null,v=l,w=a;if(f[Ne]!==void 0&&l?.constAsDefaults!=="never"&&!dc(f))p=f[Ne];else if(V(p)&&V(f.default)&&!f[Q]&&!f[W]&&!f[ue])p=Ut(p,f.default);else if(Dt in f&&!f[Q]&&!f[W]&&!f[ue])p=f.default;else if(ue in f){const b=f[ue];a.includes(b)||(w=a.concat(b),y=Kn(b,s));const x=i===void 0||V(i)&&ge(i);y&&!p&&x&&(p=f.default),d&&y&&!V(i)&&(g=i)}else if(cs in f){const b={...la(t,f,n,p),...g};[y]=ac(t,f,s,!1,[],b,c)}else if(Fs(f))p=f.items.map((b,x)=>wt(t,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:Array.isArray(r)?r[x]:void 0,rawFormData:g,required:u,shouldMergeDefaultsIntoFormData:d}));else if(W in f){const{oneOf:b,...x}=f;if(b.length===0)return;const S=He(f),{type:j="null"}=x;!Array.isArray(j)&&N0.includes(j)&&v?.constAsDefaults==="skipOneOf"&&(v={...v,constAsDefaults:"never"}),y=b[dn(t,s,i??f.default,b,0,S,c)],y=lt(x,y)}else if(Q in f){const{anyOf:b,...x}=f;if(b.length===0)return;const S=He(f);y=b[dn(t,s,i??f.default,b,0,S,c)],y=lt(x,y)}if(y)return wt(t,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:w,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:c,parentDefaults:p,rawFormData:i??g,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m});p===void 0&&(p=f.default);const A=la(t,f,n,p);let O=A??p;if(d){const{arrayMinItems:b={}}=l||{},{mergeExtraDefaults:x}=b,S=F0(t,f,s,i,l,c);(!V(i)||Ot in f)&&(O=Xn(O,S,x,!0))}return O}function F0(t,e,n,r,i,s){const o=!fc(e)&&Hr(t,e,n,s);let a=r;if(o){const c=hn(e);a=c?.some(d=>ie(d.value,r))?r:void 0}return e[Ne]&&i?.constAsDefaults==="always"&&(a=e.const),a}function P0(t,e,{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}={},d){{const m=V(n)?n:{},g=e,p=o?.allOf==="populateDefaults"&&Ot in g||o?.emptyObjectFields!=="skipEmptyDefaults"&&us in g?Ce(t,g,r,m,a):g,y=p[Ne],v=Object.keys(p.properties||{}).reduce((w,A)=>{var O;const b=D(p,[se,A],{}),x=V(y)&&y[A]!==void 0,S=(V(b)&&Ne in b||x)&&o?.constAsDefaults!=="never"&&!dc(b),j=wt(t,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[A]),rawFormData:D(m,[A]),required:(O=p.required)===null||O===void 0?void 0:O.includes(A),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});return aa(w,A,j,i,l,p.required,o,S,b?.type==="null"),w},{});if(p.additionalProperties&&!u){const w=V(p.additionalProperties)?p.additionalProperties:{},A=new Set,O=[];Object.keys(m).filter(b=>!p.properties||!p.properties[b]).forEach(b=>{A.add(b),O.push(b)}),V(d)&&O.length===0&&Object.keys(d).filter(b=>!p.properties||!p.properties[b]).forEach(b=>A.add(b)),A.forEach(b=>{var x;const S=wt(t,w,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[b]),rawFormData:D(m,[b]),required:(x=p.required)===null||x===void 0?void 0:x.includes(b),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});aa(v,b,S,i,l,O)})}return hc(e,v)}}function $0(t,e,{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}={},d){var m,g;let f=d;const p=e,y=(m=s?.arrayMinItems)!==null&&m!==void 0?m:{},{populate:v,mergeExtraDefaults:w}=y,A=v==="never",O=v==="requiredOnly",b=v==="all"||!A&&!O,x=(g=y?.computeSkipPopulate)!==null&&g!==void 0?g:(()=>!1),j=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=gi(p,mn.Fallback,I),F=Array.isArray(n)?n[I]:void 0;return wt(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:F,required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u})})),Array.isArray(n)){const _=gi(p);if(A)f=n;else{const I=n.map((F,P)=>wt(t,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:F,parentDefaults:D(f,[P]),required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}));f=Xn(f,I,(O&&a||b)&&w)}}if(A)return f??j;if(O&&!a)return f||void 0;let E;const C=Array.isArray(f)?f.length:0;if(!p.minItems||Ps(t,p,r,o)||x(t,p,r)||p.minItems<=C)E=f||!a&&!l?f:j;else{const _=f||[],I=gi(p,mn.Invert),T=I.default,F=Array.from({length:p.minItems-C},()=>wt(t,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:c}));E=_.concat(F)}return hc(e,E)}function la(t,e,n={},r){switch(Le(e)){case"object":return P0(t,e,n,r);case"array":return $0(t,e,n,r);default:return}}function mc(t,e,n,r,i=!1,s,o,a){if(!V(e))throw new Error(`Invalid schema: ${e}`);const l=Ce(t,e,r,n,o),c=wt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&V(l.default))return{...c,...n};if(V(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:u}=s||{};return Xn(c,n,!0,u==="useDefaultIfFormDataUndefined",!0)}return c}function pc(t={}){return"widget"in M(t)&&M(t).widget!=="hidden"}function gc(t,e,n={},r,i){if(n[fs]==="files")return!0;if(e.items){const s=Ce(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function D0(t,e,n={},r,i,s){const o=M(n,i),{label:a=!0}=o;let l=!!a;if(l){const c=Le(e),u=D(e,at,!1);c==="array"&&(l=u||Ps(t,e,r,s)||gc(t,e,n,r,s)||pc(n)),c==="object"&&(l=u),c==="boolean"&&n&&!n[fs]&&(l=!1),n&&n[Xf]&&(l=!1)}return l}function yc(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=Ur(t,o);n(a,o)&&_s(s,yn(o,t),a)}return s}function R0(t,e){return yc(t,e,function(n,r){return Gl(t,r)})}var $s=Dl(function(t,e){return t==null?{}:R0(t,e)});function k0(t,e){if(e.length===0&&typeof t!="object")return t;const n=$s(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function M0(t,e){const n=(i,s)=>typeof i!="object"||ge(i)||s&&!ge(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(d=>[...d,l]);c[ds]&&c[yr]!==""?s.push(c[yr]):r(c,s,u)}else l===yr&&c!==""&&o.forEach(u=>{const d=D(e,u),m=a.length===1;(n(d,m)||Array.isArray(d)&&d.every(g=>n(g,m)))&&s.push(u)})}),s};return r(t)}function Bn(t){return fn(t)||t===""?!0:Array.isArray(t)?t.length===0:V(t)?Object.values(t).every(Bn):!1}function U0(t,e){return e?e(t):nc(t)}function L0(t,e,n={},r,i){function s(f){return V(f)}function o(f){return V(f)}function a(f,p,y){var v;const{properties:w,additionalProperties:A,patternProperties:O,propertyNames:b}=f,x=new Set((v=f.required)!==null&&v!==void 0?v:[]);function S(E,C,_,I=!1){var T;const F=g(C,_,y[E]);if(!I&&V(F)){let P=o(C)?C:{};P.$ref!==void 0&&(P=Kn(P.$ref,n));const $=new Set((T=P.required)!==null&&T!==void 0?T:[]);if(Object.entries(F).every(([B,U])=>!$.has(B)&&Bn(U)))return}F!==void 0&&(y[E]=F)}if(w!==void 0)for(const[E,C]of Object.entries(w))S(E,C,p[E],x.has(E));let j;if(O!==void 0){j=[];const E=Object.entries(O).map(([_,I])=>[new RegExp(_),I]),C=new Set(Object.keys(w??{}));for(const[_,I]of Object.entries(p))if(!C.has(_)){const T=E.find(([F])=>F.test(_));T===void 0?j.push(_):S(_,T[1],I)}}if(A!==void 0&&A!==!1){const E=A;if(j!==void 0)for(const C of j)S(C,E,p[C]);else{const C=new Set(Object.keys(w??{}));for(const[_,I]of Object.entries(p))C.has(_)||S(_,E,I)}}if(b!==void 0)for(const[E,C]of Object.entries(p))y[E]=C;return y}function l(f,p,y){const{items:v,additionalItems:w}=f;if(v!==void 0)if(Array.isArray(v))for(let A=0;A<v.length;A+=1)y.push(g(v[A],p[A]));else for(let A=0;A<p.length;A+=1)y.push(g(v,p[A]));if(w)for(let A=y.length;A<p.length;A+=1)y.push(g(w,p[A]));return y}function c(f,p,y){const{if:v,then:w,else:A}=f;if(v===void 0)return y;const b=(o(v)?t.isValid(v,p,n):v)?w:A;return b===void 0?y:g(b,p,y)}function u(f,p,y,v){if(!Array.isArray(f)||Hr(t,p,n,i))return v;const w=oc(f,!0,n),A=dn(t,n,y,w,0,He(p),i),O=f[A],b=V(O)?St(O,n,[]):w[A];return g(b,y,v)}function d(f,p,y){const{anyOf:v}=f;if(!Array.isArray(v))return y;if(p===void 0||Array.isArray(p)&&p.length===0||V(p)&&Object.keys(p).length===0){let w=y;for(const A of v)w=g(A,p,w);return w}return u(v,f,p,y)}function m(f,p,y){const{dependencies:v}=f;if(v===void 0||!s(p))return y;let w=y;for(const[A,O]of Object.entries(v))A in p&&!Array.isArray(O)&&(w=g(O,p,w));return w}function g(f,p,y){if(p===void 0||f===!1)return;if(f===!0||ge(f))return p;let v=f;const{$ref:w,allOf:A}=v;if(w!==void 0)return g(Kn(w,n),p,y);A&&(v=U0(v,i));let O=d(v,p,u(v.oneOf,v,p,y));const b=Le(v);if(b==="object"){if(!s(p))return;O=a(v,p,s(O)?O:{})}else if(b==="array"){if(!Array.isArray(p))return;O=l(v,p,Array.isArray(O)?O:[])}else O===void 0&&(O=p);return m(v,p,c(v,p,O))}return g(e,r)}const De=Symbol("no Value");function bc(t){if(Array.isArray(t.enum))return t.enum;const e=t.oneOf||t.anyOf;if(!Array.isArray(e))return;const n=e.map(r=>Ne in r?r[Ne]:Array.isArray(r.enum)&&r.enum.length===1?r.enum[0]:De).filter(r=>r!==De);return n.length>0?n:void 0}function B0(t,e){const n=bc(t);if(!n||n.some(i=>ie(i,e)))return De;const r=D(t,Dt,De);return r!==De&&n.some(i=>ie(i,r))?r:n.length===1?n[0]:void 0}function Ji(t,e,n,r,i={},s){let o;if(X(n,se)){const a={};if(X(r,se)){const u=D(r,se,{});Object.keys(u).forEach(d=>{X(i,d)&&(a[d]=void 0)})}const l=Object.keys(D(n,se,{})),c={};l.forEach(u=>{const d=D(i,u);let m=D(r,[se,u],{}),g=D(n,[se,u],{});X(m,ue)&&(m=Ce(t,m,e,d,s)),X(g,ue)&&(g=Ce(t,g,e,d,s));const f=D(m,"type"),p=D(g,"type");if(!f||f===p)if(X(a,u)&&delete a[u],p==="object"||p==="array"&&Array.isArray(d)){const y=Ji(t,e,g,m,d,s);(y!==void 0||p==="array")&&(c[u]=y)}else{const y=D(g,Dt,De),v=D(m,Dt,De);y!==De&&y!==d&&(v===d?a[u]=y:D(g,"readOnly")===!0&&(a[u]=void 0));const w=D(g,Ne,De),A=D(m,Ne,De);if(w!==De&&w!==d&&(a[u]=A===d?w:void 0),X(i,u)){const O=B0(g,d);O!==De&&(a[u]=O)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...c}}else if(D(r,"type")==="array"&&D(n,"type")==="array"&&Array.isArray(i)){let a=D(r,"items"),l=D(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){X(a,ue)&&(a=Ce(t,a,e,i,s)),X(l,ue)&&(l=Ce(t,l,e,i,s));const c=D(a,"type"),u=D(l,"type");if(!c||c===u){const d=D(n,"maxItems",-1);if(u==="object")o=i.reduce((m,g)=>{const f=Ji(t,e,l,a,g,s);return f!==void 0&&(d<0||m.length<d)&&m.push(f),m},[]);else{const m=bc(l),g=m?i.filter(f=>m.some(p=>ie(p,f))):i;o=d>0&&g.length>d?g.slice(0,d):g}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function gt(t,e,n,r,i,s=[],o){if(ue in e||cs in e||Ot in e||us in e){const l=Ce(t,e,r,i,o);if(s.findIndex(u=>ie(u,l))===-1)return gt(t,l,n,r,i,s.concat(l),o)}let a={[yr]:n.replace(/^\./,"")};if(W in e||Q in e){const l=W in e?e.oneOf:e.anyOf,c=He(e),u=dn(t,r,i,l,0,c,o),d=l[u];a={...a,...gt(t,d,n,r,i,s,o)}}if(tn in e&&e[tn]!==!1){ce(a,ds,!0);const l=te(e[tn])?e[tn]:{},c=D(e,se,{});for(const u of Object.keys(i??{}))u in c||(a[u]=gt(t,l,`${n}.${u}`,r,D(i,[u]),s,o))}if(an in e&&Array.isArray(i)){const{items:l,additionalItems:c}=e;Array.isArray(l)?i.forEach((u,d)=>{l[d]?a[d]=gt(t,l[d],`${n}.${d}`,r,u,s,o):c?a[d]=gt(t,c,`${n}.${d}`,r,u,s,o):console.warn(`Unable to generate path schema for "${n}.${d}". No schema defined for it`)}):i.forEach((u,d)=>{a[d]=gt(t,l,`${n}.${d}`,r,u,s,o)})}else if(se in e)for(const l in e.properties){const c=D(e,[se,l],{});a[l]=gt(t,c,`${n}.${l}`,r,D(i,[l]),s,o)}return a}function q0(t,e,n="",r,i,s){return gt(t,e,n,r,i,void 0,s)}class V0{constructor(e,n,r,i){n&&n[Fn]===br?this.rootSchema=Hi(n,D(n,de,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!ie(this.rootSchema,n)||!ie(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return j0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return $n(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return mc(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return D0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return dn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Fr(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Sr(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return gc(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Ps(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Hr(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return L0(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return Ce(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return Ji(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return q0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function z0(t,e,n={},r){return new V0(t,e,n,r)}function W0(t){var e;if(!t.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=t.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(((e=a.map(u=>u.split("=")).find(([u])=>u==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const u=atob(s),d=new Array(u.length);for(let g=0;g<u.length;g+=1)d[g]=u.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:c}}catch(u){throw new Error(`File is invalid: ${u.message}`)}}function yt(t,e){let n=String(t);for(;n.length<e;)n=`0${n}`;return n}function xc(t,e){const n=t<=0&&e<=0,r=t<0||e<0;if(!n&&r)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=n?i+t:t,o=n?i+e:e;if(s>o)return xc(e,t).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:yt(l,2)});return a}function H0(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function G0(t,e){return H0(t,e)}function Gr(t,e=[],n){if(Array.isArray(t))return t.map(s=>Gr(s,e)).filter(s=>s!==void 0);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function vc(t,e,n=[]){const r=Gr(t,n);return Array.isArray(e)?e.filter(i=>!ie(i,r)):ie(r,e)?void 0:e}function sr(t,e){return Array.isArray(e)?e.some(n=>ie(n,t)):ie(e,t)}function K0(t,e=[],n=!1){const r=e.map((i,s)=>sr(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Sc(t,e,n,r="indexed",i){if(typeof t>"u"||n&&Array.isArray(t)&&t.length<1||!n&&t===i)return i;if(r==="realValue")return n?t.map(String):String(t);const o=K0(t,e,n);return typeof o>"u"?i:o}function wc(t,e,n=[]){const r=Gr(t,n);if(!fn(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}function ca(t,e,n){if(t===""||!Array.isArray(e))return n;const r=e.find(s=>String(s.value)===t);if(r)return r.value;const i=Number(t);return!Number.isNaN(i)&&i>=0&&i<e.length?e[i].value:n}function Te(t,e,n="indexed",r){return n!=="realValue"?Gr(t,e,r):Array.isArray(t)?t.map(i=>ca(i,e,r)):ca(t,e,r)}function or(t,e,n="indexed"){return n!=="realValue"?String(e):fn(t)?"":String(typeof t=="object"?e:t)}var Y0=1,J0=4;function Ds(t){return Ln(t,Y0|J0)}function Z0(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:_s(t,e,n,r)}class jc{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?D(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},Z0(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Ds(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=D(r,Ee);return Array.isArray(i)||(i=[],r[Ee]=i),Array.isArray(e)?ce(r,Ee,[...new Set([...i,...e])]):ce(r,Ee,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ce(r,Ee,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ce(n,Ee,[]),this}}var X0=200;function Q0(t,e,n,r){var i=-1,s=Ns,o=!0,a=t.length,l=[],c=e.length;if(!a)return l;e.length>=X0&&(s=Jn,o=!1,e=new Mt(e));e:for(;++i<a;){var u=t[i],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=c;m--;)if(e[m]===d)continue e;l.push(u)}else s(e,d,r)||l.push(u)}return l}var ex=Vr(function(t,e){return Yn(t)?Q0(t,ir(e,1,Yn,!0)):[]});function tx(t,e){if(t==null)return{};var n=gn(As(t),function(r){return[r]});return e=Ts(e),yc(t,n,function(r,i){return e(r,i[0])})}function ua(t,e){const n=At(t),r=At(e);if(t===e||!n&&!r)return[];if(n&&!r)return ze(t);if(!n&&r)return ze(e);const i=ze(tx(t,(o,a)=>!ie(o,D(e,a)))),s=ex(ze(e),ze(t));return[...i,...s]}function nx(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:c}=t,u={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},m={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(d,u,m);break;case"DMY":g.push(u,d,m);break;default:g.push(m,d,u)}return e&&g.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:c}),g}function Oc(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Ac(t,e,n={},r=!0){const i={type:e||"text",...Oc(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(t.formatMinimum!==void 0&&(i.min=t.formatMinimum),t.formatMaximum!==void 0&&(i.max=t.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function xn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const da={props:{disabled:!1},submitText:"Submit",norender:!1};function Ec(t={}){const e=M(t);if(e&&e[Cr]){const n=e[Cr];return{...da,...n}}return da}function q(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var rx=0;function Cc(t){var e=++rx;return ps(t)+e}function Rs(){if(D(globalThis,"process.env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Cc("test-id-")),t.get(n)}})}const yi={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 ix(t){let e=D(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>h.jsx(t,{options:{...n,...r},...i}),ce(t,"MergedWidget",e)}return e}function tt(t,e,n={}){const r=Le(t);if(typeof e=="function"||e&&to.isForwardRef(N.createElement(e))||to.isMemo(e))return ix(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return tt(t,i,n)}if(typeof r=="string"){if(!(r in yi))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in yi[r]){const i=n[yi[r][e]];return tt(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function sx(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e&=e}return e.toString(16)}function ox(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function Xe(t){return sx(ox(t))}function ax(t){return Xe(t)}function lx(t,e,n={}){try{return tt(t,e,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 Ht(t,e){return`${Ct(t)?t:t[de]}__${e}`}function Gt(t){return Ht(t,"description")}function ks(t){return Ht(t,"error")}function Kr(t){return Ht(t,"examples")}function Ms(t){return Ht(t,"help")}function Yr(t){return Ht(t,"title")}function Pe(t,e=!1){const n=e?` ${Kr(t)}`:"";return`${ks(t)} ${Gt(t)} ${Ms(t)}${n}`}function $t(t,e){return`${t}-${e}`}function Qe(t,e){return Ht(t,e)}function bi(t,e){return Ht(t,`optional${e}`)}function vn(t){return!fn(t)&&(!te(t)||Array.isArray(t)||!ge(t))}function cx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ie(e,n))return!0;if(ue in n){const i=r.retrieveSchema(n);return ie(e,un(i,Mn))}return!1}function _c(t,e,n){return e?n:t}function ux(t){return t?new Date(t).toJSON():void 0}function Us(t,e,n){const r=[Zf];return X(t,uo)&&r.unshift(uo),D(t,[...r,e],n)}function dx(t,e){if(!Array.isArray(e))return t;const n=u=>u.reduce((d,m)=>(d[m]=!0,d),{}),r=u=>u.length>1?`properties '${u.join("', '")}'`:`property '${u[0]}'`,i=n(t),s=e.filter(u=>u==="*"||i[u]),o=n(s),a=t.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 xi(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error(`Unable to parse date ${t}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function rn(t,e,n,r){if(!V(e))return r;const i=Ce(t,e,n,r);if(Array.isArray(r)){const u=i.items;if(!u)return r;let d=!1;const m=r.map((g,f)=>{let p=u;Array.isArray(u)&&(p=u[f]||i.additionalItems||{});const y=rn(t,p,n,g);return y!==g&&(d=!0),y===void 0?{}:y});return d?m:r}const{properties:s,required:o=[]}=i;if(!V(r)||!s)return r;const a={},l=r;let c=!1;for(const u of Object.keys(l)){const d=l[u],m=s[u]||{},g=o.includes(u),f=V(d),p=Array.isArray(d);if((f||p)&&s[u]){const y=rn(t,m,n,d);(g||!Bn(y))&&(a[u]=y,c=!0)}else(g||!Bn(d)||!s[u])&&(a[u]=d,Bn(d)||(c=!0))}if(!(!c&&Object.keys(a).length===0))return a}function fx(t,e,n){var r,i;const s=(r=t[Mn])!==null&&r!==void 0?r:t[ue],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ge(e)?l={...a}:l=Ut(a,e):l=e||{},o){let c=t;if(s&&t[ue]&&!t[Mn])try{c=Kn(s,n.rootSchema)}catch(u){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
3
|
+
`,u),l}for(const u of[W,Q]){const d=c[u];if(Array.isArray(d)&&d.length>0){const m=l[u],g=Array.isArray(m)?[...m]:[];let f=!1;for(let p=0;p<d.length;p++){const y=d[p],v=(i=y?.[Mn])!==null&&i!==void 0?i:y?.[ue];if(v&&v in o){const w=g[p]||{};g[p]=Ut(o[v],w),f=!0}}f&&(l[u]=g)}}}return l}function qn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return qn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return qn(t.oneOf[0]);if(t.allOf){const e=n=>qn(n);return t.allOf.some(e)}return!1}function fa(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.hasOwn(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function Ic(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!fa(o,e)||!fa(a,n)}const{props:i,state:s}=t;return!ie(i,e)||!ie(s,n)}function ha(t){const e=Jl(t.map(n=>te(n)?Le(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function ar(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=M(r,t.globalUiOptions);let s;return Q in e&&Array.isArray(e[Q])?s=ha(e[Q]):W in e&&Array.isArray(e[W])?s=ha(e[W]):s=Le(e),!cx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function ma(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),c=new Date(l).toJSON();return e?c:c.slice(0,10)}function Ls(t,e=[]){if(!t)return[];let n=[];return Ee in t&&(n=n.concat(t[Ee].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==Ee){const s=t[i];if(At(s))return r.concat(Ls(s,[...e,i]))}return r},n)}function Tc(t){return Se(t)?gn(t,Et):Qn(t)?[t]:ws(ul(ps(t)))}function hx(t){const e=new jc;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Tc(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Be(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[de]:a,...l!==void 0&&{name:l}}}function Nc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;const r=t[n];return At(r)?{...e,[n]:Nc(r)}:{...e,[n]:r}},{})}function mx(t){return Object.values(t).every(e=>e!==-1)}function px(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:c,autofocus:u,registry:d,onBlur:m,onFocus:g}=t,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,y=N.useCallback(v=>s(n,v),[s,n]);return h.jsx(p,{schema:{type:"integer"},id:f,name:a,className:e,options:{enumOptions:xc(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:c,autofocus:u,onChange:y,onBlur:m,onFocus:g,registry:d,label:"","aria-describedby":Pe(o)})}function gx(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(xi(o,e));N.useEffect(()=>{l(xi(o,e))},[e,o]);const c=N.useCallback((g,f)=>{const p={...a,[g]:typeof f>"u"?-1:f};mx(p)?s(ma(p,e)):l(p)},[a,s,e]),u=N.useCallback(g=>{g.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=N.useCallback(g=>{if(g.preventDefault(),n||r)return;const f=xi(new Date().toJSON(),e);s(ma(f,e))},[n,r,e,s]);return{elements:N.useMemo(()=>nx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:c,handleClear:u,handleSetNow:d}}function Kt(t){const e=N.useRef(t);return ie(t,e.current)||(e.current=t),e.current}function yx(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function bx(t){const{name:e,size:n,type:r}=t;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:yx(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function xx(t){return Promise.all(Array.from(t).map(bx))}function pa(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=W0(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function vx(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?pa(t):pa([t||""]),[t]),s=N.useCallback(async a=>{const c=(await xx(a)).map(u=>u.dataURL||null);e(n?r.concat(...c):c[0])},[r,n,e]),o=N.useCallback(a=>{if(n){const l=r.filter((c,u)=>u!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Sx(t){if(!t)return"";const e=new Date(t),n=yt(e.getFullYear(),4),r=yt(e.getMonth()+1,2),i=yt(e.getDate(),2),s=yt(e.getHours(),2),o=yt(e.getMinutes(),2),a=yt(e.getSeconds(),2),l=yt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Dn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Ls(e),o=e;return ge(i)||(o=Ut(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function wx(t){const e=t;for(const n in e)if(Object.hasOwn(e,n)){const r=e[n];n===ue&&typeof r=="string"&&r.startsWith("#")?e[n]=il+r:e[n]=Bs(r)}return t}function jx(t){return t.map(e=>Bs(e))}function Bs(t){return Array.isArray(t)?jx([...t]):te(t)?wx({...t}):t}var K;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.DeprecatedLabel="%1 (deprecated)",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(K||(K={}));function Ox(t,e){var n=Se(t)?xs:uc;return n(t,Ll(e))}function Ax(t,e){return t==null?!0:Fl(t,e)}function Zi(){return Cc("rjsf-array-item-")}function ga(t){return Array.isArray(t)?t.map(e=>({key:Zi(),item:e})):[]}function Fc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function Ex(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function Pc(t,e,n,r){let{addable:i}=M(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function $c(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function Cx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Fs(e)&&Gf(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function _x(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:c,onBlur:u,onFocus:d,registry:m,rawErrors:g,name:f,onSelectChange:p}=t,{widgets:y,schemaUtils:v,globalFormOptions:w,globalUiOptions:A}=m,O=v.retrieveSchema(e.items,i),b=r?.items??r,x=hn(O,b),{widget:S="select",title:j,...E}=M(r,A),C=tt(e,S,y),_=j??e.title??f,I=v.getDisplayLabel(e,r,A),T=Kt(Be("",w,n,!0));return h.jsx(C,{id:T[de],name:f,multiple:!0,onChange:p,onBlur:u,onFocus:d,options:{...E,enumOptions:x},schema:e,uiSchema:r,registry:m,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:c,autofocus:a,rawErrors:g,htmlName:T.name})}function Ix(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:c,onBlur:u,onFocus:d,formData:m=[],registry:g,rawErrors:f,name:p,onSelectChange:y}=t,{widgets:v,schemaUtils:w,globalFormOptions:A,globalUiOptions:O}=g,{widget:b,title:x,...S}=M(r,O),j=tt(e,b,v),E=x??e.title??p,C=w.getDisplayLabel(e,r,O),_=Kt(Be("",A,n,!0));return h.jsx(j,{id:_[de],name:p,multiple:!0,onChange:y,onBlur:u,onFocus:d,options:S,schema:e,uiSchema:r,registry:g,value:m,disabled:i,readonly:s,hideError:l,required:a,label:E,hideLabel:!C,placeholder:c,autofocus:o,rawErrors:f,htmlName:_.name})}function Tx(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:c,onFocus:u,registry:d,formData:m=[],rawErrors:g,onSelectChange:f}=t,{widgets:p,schemaUtils:y,globalFormOptions:v,globalUiOptions:w}=d,{widget:A="files",title:O,...b}=M(n,w),x=tt(e,A,p),S=O??e.title??i,j=y.getDisplayLabel(e,n,w),E=Kt(Be("",v,r,!0));return h.jsx(x,{options:b,id:E[de],name:i,multiple:!0,onChange:f,onBlur:c,onFocus:u,schema:e,uiSchema:n,value:m,disabled:s,readonly:o,required:l,registry:d,autofocus:a,rawErrors:g,label:S,hideLabel:!j,htmlName:E.name})}function Dc(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:c,canAdd:u,canRemove:d=!0,canMoveUp:m,canMoveDown:g,itemSchema:f,itemData:p,itemUiSchema:y,itemFieldPathId:v,itemErrorSchema:w,autofocus:A,onBlur:O,onFocus:b,onChange:x,rawErrors:S,totalItems:j,title:E,handleAddItem:C,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=t,{schemaUtils:F,fields:{ArraySchemaField:P,SchemaField:$},globalUiOptions:R}=a,B=Kt(v),U=P||$,Y=q("ArrayFieldItemTemplate",a,l),ne=F.getDisplayLabel(f,y,R),{description:fe}=M(y),ye=!!fe||!!f.description,{orderable:k=!0,removable:le=!0,copyable:ee=!1}=l,H={moveUp:k&&m,moveDown:k&&g,copy:ee&&u,remove:le&&d,toolbar:!1};H.toolbar=Object.keys(H).some(xe=>H[xe]);const G=N.useCallback(xe=>{C(xe,n+1)},[C,n]),z=N.useCallback(xe=>{_(xe,n)},[_,n]),re=N.useCallback(xe=>{I(xe,n)},[I,n]),oe=N.useCallback(xe=>{T(xe,n,n-1)},[T,n]),Oe=N.useCallback(xe=>{T(xe,n,n+1)},[T,n]),Ae={children:h.jsx(U,{name:r,title:E,index:n,schema:f,uiSchema:y,formData:p,errorSchema:w,fieldPathId:B,required:Ex(f),onChange:x,onBlur:O,onFocus:b,registry:a,disabled:i,readonly:o,hideError:s,autofocus:A,rawErrors:S}),buttonsProps:{fieldPathId:B,disabled:i,readonly:o,canAdd:u,hasCopy:H.copy,hasMoveUp:H.moveUp,hasMoveDown:H.moveDown,hasRemove:H.remove,index:n,totalItems:j,onAddItem:G,onCopyItem:z,onRemoveItem:re,onMoveUpItem:oe,onMoveDownItem:Oe,registry:a,schema:f,uiSchema:y},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:H.toolbar,index:n,totalItems:j,readonly:o,registry:a,schema:f,uiSchema:y,parentUiSchema:c,displayLabel:ne,hasDescription:ye};return h.jsx(Y,{...Ae})}function Nx(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:m=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,onChange:v,keyedFormData:w,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x}=t,S=e.title||a||o,{schemaUtils:j,fields:E,formContext:C,globalFormOptions:_,globalUiOptions:I}=g,{OptionalDataControlsField:T}=E,F=M(n,I),P=te(e.items)?e.items:{},$=j.retrieveSchema(P),R=Fc(w),B=ar(g,e,d,n),U=vn(s),Y=Pc(g,e,R,n)&&(!B||U),ne=U?w:[],fe=B?" rjsf-optional-array-field":"",ye=t.childFieldPathId??i,k=B?h.jsx(T,{...t,fieldPathId:ye}):void 0,le={canAdd:Y,items:ne.map((H,G)=>{const{key:z,item:re}=H,oe=re,Oe=j.retrieveSchema(P,oe),Ae=r?r[G]:void 0,xe=Be(G,_,ye),$e=$c(n,re,G,C),ht={itemKey:z,index:G,name:o&&`${o}-${G}`,registry:g,uiOptions:F,parentUiSchema:n,hideError:m,readonly:c,disabled:l,required:d,title:S?`${S}-${G+1}`:void 0,canAdd:Y,canMoveUp:G>0,canMoveDown:G<R.length-1,itemSchema:Oe,itemFieldPathId:xe,itemErrorSchema:Ae,itemData:oe,itemUiSchema:$e,autofocus:u&&G===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:w.length,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x,onChange:v};return h.jsx(Dc,{...ht},z)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:A,readonly:c,required:d,schema:e,title:S,formData:R,rawErrors:y,registry:g,optionalDataControl:k},ee=q("ArrayFieldTemplate",g,F);return h.jsx(ee,{...le})}function Fx(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:m=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,keyedFormData:v,onChange:w,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x}=t;let{formData:S=[]}=t;const j=e.title||a||o,{schemaUtils:E,fields:C,formContext:_,globalFormOptions:I,globalUiOptions:T}=g,F=M(n,T),{OptionalDataControlsField:P}=C,$=ar(g,e,d,n),R=vn(r),U=(te(e.items)?e.items:[]).map((G,z)=>E.retrieveSchema(G,S[z])),Y=te(e.additionalItems)?E.retrieveSchema(e.additionalItems,r):null,ne=t.childFieldPathId??s;S.length<U.length&&(S=S.concat(new Array(U.length-S.length)));const fe=R?v:[],ye=$?" rjsf-optional-array-field":"",k=$?h.jsx(P,{...t,fieldPathId:ne}):void 0,le=Pc(g,e,S,n)&&!!Y&&(!$||R),ee={canAdd:le,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${ye}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((G,z)=>{const{key:re,item:oe}=G,Oe=oe,Ae=z>=U.length,xe=(Ae&&te(e.additionalItems)?E.retrieveSchema(e.additionalItems,Oe):U[z])||{},$e=Be(z,I,ne);let ht;Ae?ht=n.additionalItems:Array.isArray(n.items)?ht=n.items[z]:ht=$c(n,oe,z,_);const wn=i?i[z]:void 0,jn={index:z,itemKey:re,name:o&&`${o}-${z}`,registry:g,uiOptions:F,parentUiSchema:n,hideError:m,readonly:c,disabled:l,required:d,title:j?`${j}-${z+1}`:void 0,canAdd:le,canRemove:Ae,canMoveUp:z>=U.length+1,canMoveDown:Ae&&z<S.length-1,itemSchema:xe,itemData:Oe,itemUiSchema:ht,itemFieldPathId:$e,itemErrorSchema:wn,autofocus:u&&z===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:v.length,onChange:w,handleAddItem:A,handleCopyItem:O,handleRemoveItem:b,handleReorderItems:x};return h.jsx(Dc,{...jn},re)}),onAddClick:A,readonly:c,required:d,registry:g,schema:e,uiSchema:n,title:j,errorSchema:i,rawErrors:y,optionalDataControl:k},H=q("ArrayFieldTemplate",g,F);return h.jsx(H,{...ee})}function Px(t=[]){const e=N.useMemo(()=>Xe(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:ga(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((c,u)=>({key:c.key,item:a[u]})):ga(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=Fc(a),c=Xe(l);return r({formDataHash:c,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function $x(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:c,translateString:u}=s,{keyedFormData:d,updateKeyedFormData:m}=Px(o),g=t.childFieldPathId??i,f=N.useCallback((x,S)=>{x&&x.preventDefault();let j;if(r){j={};for(const _ in r){const I=parseInt(_);S===void 0||I<S?ce(j,[I],r[_]):I>=S&&ce(j,[I+1],r[_])}}const E={key:Zi(),item:Cx(s,e)},C=[...d];S!==void 0?C.splice(S,0,E):C.push(E),a(m(C),g.path,j)},[d,s,e,a,m,r,g]),p=N.useCallback((x,S)=>{x&&x.preventDefault();let j;if(r){j={};for(const _ in r){const I=parseInt(_);I<=S?ce(j,[I],r[_]):I>S&&ce(j,[I+1],r[_])}}const E={key:Zi(),item:Ds(d[S].item)},C=[...d];S!==void 0?C.splice(S+1,0,E):C.push(E),a(m(C),g.path,j)},[d,a,m,r,g]),y=N.useCallback((x,S)=>{x&&x.preventDefault();let j;if(r){j={};for(const C in r){const _=parseInt(C);_<S?ce(j,[_],r[C]):_>S&&ce(j,[_-1],r[C])}}const E=d.filter((C,_)=>_!==S);a(m(E),g.path,j)},[d,a,m,r,g]),v=N.useCallback((x,S,j)=>{x&&(x.preventDefault(),x.currentTarget.blur());let E;if(r){E={};for(const I in r){const T=parseInt(I);T==S?ce(E,[j],r[S]):T==j?ce(E,[S],r[j]):ce(E,[I],r[T])}}function C(){const I=d.slice();return I.splice(S,1),I.splice(j,0,d[S]),I}const _=C();a(m(_),g.path,E)},[d,a,m,r,g]),w=N.useCallback((x,S,j,E)=>{a(x===void 0?null:x,S,j,E)},[a]),A=N.useCallback(x=>{a(x,g.path,void 0,g?.[de])},[a,g]),O={...t,formData:o,fieldPathId:g,onSelectChange:A},b={...t,handleAddItem:f,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:v,keyedFormData:d,onChange:w};if(!(an in e)){if(!l.useFallbackUiForUnsupportedType){const S=M(n),j=q("UnsupportedFieldTemplate",s,S);return h.jsx(j,{schema:e,fieldPathId:i,reason:u(K.MissingItems),registry:s})}const x={...e,[an]:{type:void 0}};O.schema=x,b.schema=x}return c.isMultiSelect(O.schema)?h.jsx(_x,{...O}):pc(n)?h.jsx(Ix,{...O}):Fs(O.schema)?h.jsx(Fx,{...b}):c.isFilesArray(O.schema,n)?h.jsx(Tx,{...O}):h.jsx(Nx,{...b})}function Dx(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:c,hideError:u,autofocus:d,title:m,onChange:g,onFocus:f,onBlur:p,rawErrors:y}=t,{title:v}=e,{widgets:w,translateString:A,globalUiOptions:O}=o,{widget:b="checkbox",title:x,label:S=!0,enumNames:j,...E}=M(r,O),C=tt(e,b,w),_=A(K.YesLabel),I=A(K.NoLabel);let T;const F=x??v??m??n;if(Array.isArray(e.oneOf))T=hn({oneOf:e.oneOf.map($=>{if(te($))return{...$,title:$.title||($.const===!0?_:I)}}).filter($=>$)},r);else{const $=e.enum??[!0,!1];!j&&$.length===2&&$.every(R=>typeof R=="boolean")?T=[{value:$[0],label:$[0]?_:I},{value:$[1],label:$[1]?_:I}]:T=hn({enum:$},r)}const P=N.useCallback(($,R,B)=>g($,i.path,R,B),[g,i]);return h.jsx(C,{options:{...E,enumOptions:T},schema:e,uiSchema:r,id:i.$id,name:n,onChange:P,onFocus:f,onBlur:p,label:F,hideLabel:!S,value:s,required:a,disabled:l,readonly:c,hideError:u,registry:o,autofocus:d,rawErrors:y,htmlName:i.name})}function Rx(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function kx(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function Mx(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function Ux(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:c=!1,onBlur:u,onFocus:d,registry:m,fieldPathId:g,onChange:f,errorSchema:p}=t,{translateString:y,fields:v,globalFormOptions:w}=m,[A,O]=N.useState(kx(n)),b=M(o),x=Kt(Be("__internal_type_selector",w,g)),S=y(K.Type),j=N.useMemo(()=>Rx(S),[S]),E=I=>{I!=null&&(O(I),f(Mx(n,I),g.path,p,e))};if(!w.useFallbackUiForUnsupportedType){const{reason:I=y(K.UnknownFieldType,[String(i.type)])}=t,T=q("UnsupportedFieldTemplate",m,b);return h.jsx(T,{schema:i,fieldPathId:g,reason:I,registry:m})}const C=q("FallbackFieldTemplate",m,b),{SchemaField:_}=v;return h.jsx(C,{schema:i,registry:m,typeSelector:h.jsx(_,{fieldPathId:x,name:`${s}__fallback_type`,schema:j,formData:A,onChange:E,onBlur:u,onFocus:d,registry:m,hideLabel:!r,disabled:l,readonly:c,required:a},n?Xe(n):"__empty__"),schemaField:h.jsx(_,{...t,schema:{type:A,title:y(K.Value),...A==="object"&&{additionalProperties:!0}}})})}function Lx(t,e){return gn(e,function(n){return t[n]})}function Bx(t){return t==null?[]:Lx(t,ze(t))}var qx=Math.max;function Vx(t,e,n,r){t=Wt(t)?t:Bx(t),n=n?Bl(n):0;var i=t.length;return n<0&&(n=qx(i+n,0)),Ct(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Kl(t,e,n)>-1}var zx=Math.min;function Wx(t,e,n){for(var r=Ns,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,c=[];o--;){var u=t[o];l=zx(u.length,l),a[o]=i>=120&&u.length>=120?new Mt(o&&u):void 0}u=t[0];var d=-1,m=a[0];e:for(;++d<i&&c.length<l;){var g=u[d],f=g;if(g=g!==0?g:0,!(m?Jn(m,f):r(c,f))){for(o=s;--o;){var p=a[o];if(!(p?Jn(p,f):r(t[o],f)))continue e}m&&m.push(f),c.push(g)}}return c}function Hx(t){return Yn(t)?t:[]}var ya=Vr(function(t){var e=gn(t,Hx);return e.length&&e[0]===t[0]?Wx(e):[]});function wr(t,e){return zr(t,e)}function Rc(t){return t===void 0}var et;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(et||(et={}));var Vn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Vn||(Vn={}));const Gx=/^\$lookup=(.+)/,vi="layoutGrid";function ba(t,e){return t??e}function Kx(t){return/^\d+?$/.test(t)}const jt=Rs();function Yx(t,e,n,r,i){const s=D(n,[Ui],{}),o=D(n,t),a={...D(o,[vt],{}),...e,...s},l={...o};ge(a)||ce(l,[vt],a),ge(s)||ce(l,[Ui],s);let{readonly:c}=M(l);return(i===!0||Rc(c)&&r===!0)&&(c=!0,X(a,ei)?ce(l,[vt,ei],!0):ce(l,`ui:${ei}`,!0)),{fieldUiSchema:l,uiReadonly:c}}function Jx(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Wi([e]).sort(),i=Wi([n]).sort();switch(t){case Vn.ALL:return wr(r,i);case Vn.SOME:return ya(r,i).length>0;case Vn.NONE:return ya(r,i).length===0;default:return!1}}function Jr(t,e,n){let r={},i=t[e];if(At(i)){const{children:s,className:o,...a}=i;if(i=s,o){const c=o.split(" ").map(u=>Us(n,u,u)).join(" ");r={...a,className:c}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function xa(t,e,n){let r;if(Kx(n)&&t&&t?.type==="array"&&X(t,an)){const i=Number(n),s=t[an];Array.isArray(s)?i>s.length?r=Nl(s):r=s[i]:r=s,e={[de]:e[de],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function Zx(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const c=e.split("."),u=c.pop();let d=s.retrieveSchema(a,r),m=r,g=d.readOnly;c.forEach(y=>{if(l=Be(y,o,l),X(d,se))a=D(d,[se,y],{});else if(d&&(X(d,W)||X(d,Q))){const v=X(d,W)?W:Q,w=s.findSelectedOptionInXxxOf(d,y,v,m);a=D(w,[se,y],{})}else{const v=xa(d,l,y);a=v.rawSchema??{},l=v.fieldPathId}m=D(m,y,{}),d=s.retrieveSchema(a,m),g=ba(d.readOnly,g)});let f,p=!1;if(ge(d)&&(d=void 0),d&&u){if(d&&(X(d,W)||X(d,Q))){const v=X(d,W)?W:Q;d=s.findSelectedOptionInXxxOf(d,u,v,m)}l=Be(u,o,l),p=d!==void 0&&Array.isArray(d.required)&&Vx(d.required,u);const y=xa(d,l,u);if(y.rawSchema?(d=y.rawSchema,l=y.fieldPathId):(d=D(d,[se,u]),d=d&&s.retrieveSchema(d)),g=ba(d?.readOnly,g),d&&(X(d,W)||X(d,Q))){const v=X(d,W)?W:Q,w=He(d);f={options:d[v],hasDiscriminator:!!w}}}return{schema:d,isRequired:p,isReadonly:g,optionsInfo:f,fieldPathId:l}}function Xx(t,e){let n=t;return Ct(n)&&(n=Us(e,n)),er(n)?n:null}function Qx(t,e){let n,r=null,i={},s;if(Ct(e)||Rc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ge(i)||Ox(i,(c,u)=>{if(Ct(c)){const d=Gx.exec(c);if(Array.isArray(d)&&d.length>1){const m=d[1];i[u]=Us(t,m,m)}}}),r=Xx(a,t),!o&&r&&(s=h.jsx(r,{...l,"data-testid":jt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function Zr(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>N.createElement(qs,{...n,key:`layoutGrid-${Xe(l)}`,schema:a,layoutGridSchema:l}))}function ev(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=Jr(e,et.CONDITION,i),{operator:a,field:l="",value:c}=o,u=D(r,l,null);return Jx(a,u,c)?h.jsx(Zr,{...n,childrenLayoutGridSchemaId:s}):null}function tv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Jr(e,et.COLUMN,r),a=M(i),l=q("GridTemplate",r,a);return h.jsx(l,{column:!0,"data-testid":jt.col,...o,children:h.jsx(Zr,{...n,childrenLayoutGridSchemaId:s})})}function nv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Jr(e,et.COLUMNS,r),a=M(i),l=q("GridTemplate",r,a);return s.map(c=>h.jsx(l,{column:!0,"data-testid":jt.col,...o,children:h.jsx(Zr,{...n,childrenLayoutGridSchemaId:[c]})},`column-${Xe(c)}`))}function rv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Jr(e,et.ROW,r),a=M(i),l=q("GridTemplate",r,a);return h.jsx(l,{...o,"data-testid":jt.row,children:h.jsx(Zr,{...n,childrenLayoutGridSchemaId:s})})}function iv(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:c,registry:u,layoutGridSchema:d,...m}=t,{onChange:g}=m,{fields:f}=u,{SchemaField:p,LayoutMultiSchemaField:y}=f,v=Qx(u,e),{name:w,UIComponent:A,uiProps:O}=v,{schema:b,isRequired:x,isReadonly:S,optionsInfo:j,fieldPathId:E}=Zx(u,w,n,l,s),C=Kt(E);if(v.rendered)return v.rendered;if(b){const _=j?.hasDiscriminator?y:p,{fieldUiSchema:I,uiReadonly:T}=Yx(w,O,r,S,c);return h.jsx(_,{"data-testid":j?.hasDiscriminator?jt.layoutMultiSchemaField:jt.field,...m,name:w,required:x,readonly:T,schema:b,uiSchema:I,errorSchema:D(i,w),fieldPathId:C,formData:D(l,w),onChange:g,onBlur:o,onFocus:a,options:j?.options,registry:u})}return A?h.jsx(A,{"data-testid":jt.uiComponent,...m,name:w,required:x,formData:l,readOnly:!!S||c,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:u,...O}):null}function qs(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=M(e);if(!n&&vi in r&&te(r[vi])&&(n=r[vi]),te(n)){if(et.ROW in n)return h.jsx(rv,{...t,layoutGridSchema:n});if(et.COLUMN in n)return h.jsx(tv,{...t,layoutGridSchema:n});if(et.COLUMNS in n)return h.jsx(nv,{...t,layoutGridSchema:n});if(et.CONDITION in n)return h.jsx(ev,{...t,layoutGridSchema:n})}return h.jsx(iv,{...t,gridSchema:n})}qs.TEST_IDS=jt;function sv(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=M(i,o.globalUiOptions),{title:c}=l,{title:u}=r,d=c||n||u||a;if(!d)return null;const m=q("TitleFieldTemplate",o,l);return h.jsx(m,{id:Yr(e),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Si(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=D(s,[se,e]);return D(o,Dt,D(o,Ne,r))===n})}function va(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;X(t,W)?o={...t,[W]:s}:X(t,Q)&&(o={...t,[Q]:s});const a=hn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function ov(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:c,registry:u,uiSchema:d,schema:m,autofocus:g,readonly:f,required:p,errorSchema:y,hideError:v=!1}=t,{widgets:w,schemaUtils:A,globalUiOptions:O}=u,[b,x]=N.useState(va(m,l,A,d,i)),S=D(s,de),j=He(m),E=q("FieldErrorTemplate",u,l),C=q("FieldTemplate",u,l),_=Xe(m),I=Xe(l),T=d?Xe(d):"",F=i?Xe(i):"";N.useEffect(()=>{x(va(m,l,A,d,i))},[_,I,A,T,F]);const{widget:P=j?"radio":"select",title:$="",placeholder:R="",optionsSchemaSelector:B=j,hideError:U,...Y}=M(d);if(!B)throw new Error("No selector field provided for the LayoutMultiSchemaField");const ne=D(i,B);let fe=D(b[0]?.schema,[se,B],{});const ye=Si(b,B,ne);fe=fe?.type?fe:{...fe,type:ye?.type||n};const k=tt(fe,P,w),le=U===void 0?v:!!U,ee=D(y,[Ee],[]),H=un(y,[Ee]),G=A.getDisplayLabel(m,d,O),z=Oe=>{const Ae=Si(b,B,Oe),xe=Si(b,B,ne);let $e=A.sanitizeDataForNewSchema(Ae,xe,i);$e&&Ae&&($e=A.getDefaultFormState(Ae,$e,"excludeObjectChildren")),$e&&ce($e,B,Oe),a($e,s.path,void 0,S)},re={enumOptions:b,...Y},oe=!le&&ee.length>0?h.jsx(E,{fieldPathId:s,schema:m,errors:ee,registry:u}):void 0;return h.jsx(C,{fieldPathId:s,id:S,schema:m,label:($||m.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,required:p,readonly:!!f,registry:u,displayLabel:G,errors:oe,onChange:a,onKeyRename:xr,onKeyRenameBlur:xr,onRemoveProperty:xr,children:h.jsx(k,{id:S,name:e,schema:m,label:($||m.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,autofocus:g,readonly:f,required:p,registry:u,multiple:!1,rawErrors:ee,hideError:le,hideLabel:!G,errorSchema:H,placeholder:R,onChange:z,onBlur:o,onFocus:c,value:ne,options:re,htmlName:s.name})})}class Sa extends N.Component{constructor(e){super(e);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(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!ie(e.options,i)){const{registry:{schemaUtils:l}}=this.props,c=i.map(u=>l.retrieveSchema(u,r));a={selectedOption:o,retrievedOptions:c}}if(!ie(r,e.formData)&&s.$id===e.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(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=He(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,c=e!==void 0?parseInt(e,10):-1;if(c===n)return;const u=c>=0?r[c]:void 0,d=n>=0?r[n]:void 0;let m=l.sanitizeDataForNewSchema(u,d,i);u&&(m=l.getDefaultFormState(u,m,"excludeObjectChildren")),this.setState({selectedOption:c},()=>{s(m,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:c,schema:u,uiSchema:d}=this.props,{widgets:m,fields:g,translateString:f,globalUiOptions:p,schemaUtils:y}=c,{SchemaField:v}=g,w=q("MultiSchemaFieldTemplate",c,p),A=ar(c,u,l,d),O=vn(i),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S="select",placeholder:j,autofocus:E,autocomplete:C,title:_=u.title,...I}=M(d,p),T=tt({type:"number"},S,m),F=D(r,Ee,[]),P=un(r,[Ee]),$=y.getDisplayLabel(u,d,p),R=b>=0&&x[b]||null;let B;if(R){const{required:ee}=u;B=ee?lt({required:ee},R):R}let U=[];W in u&&d&&W in d?Array.isArray(d[W])?U=d[W]:console.warn(`uiSchema.oneOf is not an array for "${_||e}"`):Q in u&&d&&Q in d&&(Array.isArray(d[Q])?U=d[Q]:console.warn(`uiSchema.anyOf is not an array for "${_||e}"`));let Y=d;b>=0&&U.length>b&&(Y=U[b]);const ne=_?K.TitleOptionPrefix:K.OptionPrefix,fe=_?[_]:[],ye=x.map((ee,H)=>{const{title:G=ee.title}=M(U[H]);return{label:G||f(ne,fe.concat(String(H+1))),value:H}}),k=!A||O?h.jsx(T,{id:this.getFieldId(),name:`${e}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||ge(ye),multiple:!1,rawErrors:F,errorSchema:P,value:b>=0?b:void 0,options:{enumOptions:ye,...I},registry:c,placeholder:j,autocomplete:C,autofocus:E,label:_??e,hideLabel:!$,readonly:a}):void 0,le=B&&B.type!=="null"&&h.jsx(v,{...this.props,schema:B,uiSchema:Y})||null;return h.jsx(w,{schema:u,registry:c,uiSchema:d,selector:k,optionSchemaField:le})}}const av=/\.([0-9]*0)*$/,lv=/[0.]0*$/;function cv(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=N.useState(i),{StringField:a}=e.fields;let l=r;const c=N.useCallback((u,d,m,g)=>{o(u),`${u}`.charAt(0)==="."&&(u=`0${u}`);const f=typeof u=="string"&&u.match(av)?co(u.replace(lv,"")):co(u);n(f,d,m,g)},[n]);if(typeof s=="string"&&typeof l=="number"){const u=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(u)&&(l=s)}return h.jsx(a,{...t,formData:l,onChange:c})}function Je(){return Je=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Je.apply(null,arguments)}const dr=["strong","em","del","mark"],wa=[["**",dr[0]],["__",dr[0]],["~~",dr[2]],["==",dr[3]],["*","em"],["_","em"]];function uv(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function dv(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=wa[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=wa[o][1];break}}if(!r)return null;for(var l=i,c=!1,u=!1,d="",m=0,g="",f=!1,p="";l<t.length;){var y=t[l];if(f)g+=y,f=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||m!==0){if(y==="["&&!c&&m===0){var v=uv(t,l);if(v!==-1){g+=t.slice(l,v),l=v,p=t[v-1];continue}}if(u)g+=y,d?y===d&&(d=""):y==='"'||y==="'"?d=y:y===">"&&(u=!1),p=y,l++;else if(y!=="<"||c){if(y===`
|
|
4
4
|
`&&p===`
|
|
5
5
|
`&&!c&&m===0)return null;if(!c&&m===0){for(var w=0;l+w<t.length&&t[l+w]===r[0];)w++;if(w>=i&&(i!==1||r!=="*"&&r!=="_"||t[l-1]!==r&&t[l+1]!==r)){var A=[t.slice(0,l+w),s,g+t.slice(l+i,l+w)];return A.index=0,A.input=t,A}}g+=y,p=y,l++}else{var O=t[l+1],b=t.indexOf(">",l);if(b!==-1){var x=t.slice(l,b+1).endsWith("/>");O==="/"?m=Math.max(0,m-1):x||m++}u=!0,g+=y,p=y,l++}}else c=!c,g+=y,p=y,l++;else g+=y,f=!0,p=y,l++}return null}const fv=["children","options"],ja=["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((t,e)=>(t[e.toLowerCase()]=e,t),{class:"className",for:"htmlFor"}),Oa={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},hv=["style","script","pre"],mv=["src","href","data","formAction","srcDoc","action"],pv=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,gv=/\n{2,}$/,Aa=/^(\s*>[\s\S]*?)(?=\n\n|$)/,yv=/^ *> ?/gm,bv=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,xv=/^ {2,}\n/,vv=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Ea=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Ca=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Sv=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,wv=/^(?:\n *)*\n/,jv=/\r\n?/g,Ov=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Av=/^\[\^([^\]]+)]/,Ev=/\f/g,Cv=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,_v=/^\[(x|\s)\]/,_a=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ia=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ta=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Vs=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Iv(t){const e=Vs.exec(t);if(!e)return null;const n=e[1],r=n.toLowerCase(),i=r.length+1;let s=e[0].length;t[s]===`
|
|
6
6
|
`&&s++;const o=s;let a=s,l=1;const c=t.length;for(;l>0;){const d=t.indexOf("<",s);if(d===-1)return null;let m=-1,g=-1;if(t[d+1]==="/")g=d;else if(t[d+1]===r[0]||t[d+1]===n[0]){let f=!0;for(let p=0;p<r.length;p++){const y=t[d+1+p];if(y!==r[p]&&y!==n[p]){f=!1;break}}!f||t[d+i]!==" "&&t[d+i]!==">"||(m=d)}if(m!==-1||g!==-1)if(m!==-1&&(g===-1||m<g))s=m+i+1,l++;else{let f=g+2;for(;f<c;){const y=t[f];if(y!==" "&&y!==" "&&y!==`
|
|
7
7
|
`&&y!=="\r")break;f++}if(f+r.length>c)return null;let p=!0;for(let y=0;y<r.length;y++){const v=t[f+y];if(v!==r[y]&&v!==n[y]){p=!1;break}}if(!p){s=f;continue}for(f+=r.length;f<c;){const y=t[f];if(y!==" "&&y!==" "&&y!==`
|
|
8
8
|
`&&y!=="\r")break;f++}if(f>=c||t[f]!==">"){s=f;continue}a=g,s=f+1,l--}else s=d+1}let u=0;for(;s+u<c&&t[s+u]===`
|
|
9
|
-
`;)u++;return[t.slice(0,s+u),n,e[2],t.slice(o,a)]}const Tv=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Na=/^<!--[\s\S]*?(?:-->)/,Nv=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Xi=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,
|
|
9
|
+
`;)u++;return[t.slice(0,s+u),n,e[2],t.slice(o,a)]}const Tv=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Na=/^<!--[\s\S]*?(?:-->)/,Nv=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Xi=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Fv=/^\{.*\}$/,Pv=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,$v=/^<([^ >]+[:@\/][^ >]+)>/,Dv=/-([a-z])?/gi,Fa=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Rv=/^[^\n]+(?: \n|\n{2,})/,kv=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Mv=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Uv=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Lv=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Bv=/\t/g,qv=/(^ *\||\| *$)/g,Vv=/^ *:-+: *$/,zv=/^ *:-+ *$/,Wv=/^ *-+: *$/,Hv=/^(:[a-zA-Z0-9-_]+:)/,Gv=/^\\([^0-9A-Za-z\s])/,Kv=/\\([^0-9A-Za-z\s])/g,Yv=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Jv=/^\n+/,Zv=/^([ \t]*)/,Xv=/(?:^|\n)( *)$/,zs="(?:\\d+\\.)",Ws="(?:[*+-])";function kc(t){return"( *)("+(t===1?zs:Ws)+") +"}const Mc=kc(1),Uc=kc(2);function Lc(t){return RegExp("^"+(t===1?Mc:Uc))}const Qv=Lc(1),e1=Lc(2);function Bc(t){return RegExp("^"+(t===1?Mc:Uc)+"[^\\n]*(?:\\n(?!\\1"+(t===1?zs:Ws)+" )[^\\n]*)*(\\n|$)","gm")}const t1=Bc(1),n1=Bc(2);function qc(t){const e=t===1?zs:Ws;return RegExp("^( *)("+e+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+e+" (?!"+e+" ))\\n*|\\s*\\n*$)")}const Vc=qc(1),zc=qc(2);function Pa(t,e){const n=e===1,r=n?Vc:zc,i=n?t1:n1,s=n?Qv:e1;return{t:o=>s.test(o),o:xt(function(o,a){const l=Xv.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(gv,`
|
|
10
10
|
`).match(i),d=s.exec(u[0]),m=RegExp("^ {1,"+(d?d[0].length:0)+"}","gm");let g=!1;return{items:u.map(function(f,p){const y=f.replace(m,"").replace(s,""),v=p===u.length-1,w=Ge(y,`
|
|
11
11
|
|
|
12
12
|
`)||v&&g;g=w;const A=l.inline,O=l.list;let b;l.list=!0,w?(l.inline=!1,b=zn(y)+`
|
|
13
13
|
|
|
14
14
|
`):(l.inline=!0,b=zn(y));const x=a(b,l);return l.inline=A,l.list=O,x}),ordered:n,start:c}}}}const r1=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),i1=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $a(t){return typeof t=="string"}function zn(t){let e=t.length;for(;e>0&&t[e-1]<=" ";)e--;return t.slice(0,e)}function Qi(t,e){return t.startsWith(e)}function Ge(t,e){return t.indexOf(e)!==-1}function s1(t,e,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(Qi(t,n[r]))return!0;return!1}return n(t,e)}function In(t){return t.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 o1(t){return Wv.test(t)?"right":Vv.test(t)?"center":zv.test(t)?"left":null}function Da(t,e,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,e(o,n)),o=""}return t.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 a1(t,e,n){n.inline=!0;const r=t[2]?t[2].replace(qv,"").split("|").map(o1):[],i=t[3]?(function(o,a,l){return o.trim().split(`
|
|
15
|
-
`).map(function(c){return Da(c,a,l,!0)})})(t[3],e,n):[],s=Da(t[1],e,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function Ra(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function xt(t){return t.inline=1,t}function mt(t){return xt(function(e,n){return n.inline?t.exec(e):null})}function fr(t){return xt(function(e,n){return n.inline||n.simple?t.exec(e):null})}function st(t){return function(e,n){return n.inline||n.simple?null:t.exec(e)}}function ka(t){return xt(function(e){return t.exec(e)})}const l1=/(javascript|vbscript|data(?!:image)):/i;function c1(t){try{const e=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(l1.test(e))return null}catch{return null}return t}function Ke(t){return t&&t.replace(Kv,"$1")}function jr(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function u1(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function d1(t,e,n){const r=n.inline||!1;n.inline=!1;const i=t(e,n);return n.inline=r,i}const f1=(t,e,n)=>({children:jr(e,t[2],n)});function wi(){return{}}function h1(...t){return t.filter(Boolean).join(" ")}function ji(t,e,n){let r=t;const i=e.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Oi(t,e,n,r){if(!e||!e.trim())return null;const i=e.match(pv);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(d){return d.indexOf("-")!==-1&&d.match(Nv)===null&&(d=d.replace(Dv,function(m,g){return g.toUpperCase()})),d})(o.slice(0,a)).trim(),c=ja[l]||l;if(c==="ref")return s;const u=s[c]=(function(d,m,g,f){return m==="style"?(function(p){const y=[];if(!p)return y;let v="",w=0,A="";for(let b=0;b<p.length;b++){const x=p[b];if(x==='"'||x==="'")A?x===A&&(A="",w--):(A=x,w++);else if(x==="("&&v.endsWith("url"))w++;else if(x===")"&&w>0)w--;else if(x===";"&&w===0){const S=v.indexOf(":");S>0&&y.push([v.slice(0,S).trim(),v.slice(S+1).trim()]),v="";continue}v+=x}const O=v.indexOf(":");return O>0&&y.push([v.slice(0,O).trim(),v.slice(O+1).trim()]),y})(g).reduce(function(p,[y,v]){return p[y.replace(/(-[a-z])/g,w=>w[1].toUpperCase())]=f(v,d,y),p},{}):mv.indexOf(m)!==-1?f(Ke(g),d,m):(g.match(
|
|
15
|
+
`).map(function(c){return Da(c,a,l,!0)})})(t[3],e,n):[],s=Da(t[1],e,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function Ra(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function xt(t){return t.inline=1,t}function mt(t){return xt(function(e,n){return n.inline?t.exec(e):null})}function fr(t){return xt(function(e,n){return n.inline||n.simple?t.exec(e):null})}function st(t){return function(e,n){return n.inline||n.simple?null:t.exec(e)}}function ka(t){return xt(function(e){return t.exec(e)})}const l1=/(javascript|vbscript|data(?!:image)):/i;function c1(t){try{const e=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(l1.test(e))return null}catch{return null}return t}function Ke(t){return t&&t.replace(Kv,"$1")}function jr(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function u1(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function d1(t,e,n){const r=n.inline||!1;n.inline=!1;const i=t(e,n);return n.inline=r,i}const f1=(t,e,n)=>({children:jr(e,t[2],n)});function wi(){return{}}function h1(...t){return t.filter(Boolean).join(" ")}function ji(t,e,n){let r=t;const i=e.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Oi(t,e,n,r){if(!e||!e.trim())return null;const i=e.match(pv);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(d){return d.indexOf("-")!==-1&&d.match(Nv)===null&&(d=d.replace(Dv,function(m,g){return g.toUpperCase()})),d})(o.slice(0,a)).trim(),c=ja[l]||l;if(c==="ref")return s;const u=s[c]=(function(d,m,g,f){return m==="style"?(function(p){const y=[];if(!p)return y;let v="",w=0,A="";for(let b=0;b<p.length;b++){const x=p[b];if(x==='"'||x==="'")A?x===A&&(A="",w--):(A=x,w++);else if(x==="("&&v.endsWith("url"))w++;else if(x===")"&&w>0)w--;else if(x===";"&&w===0){const S=v.indexOf(":");S>0&&y.push([v.slice(0,S).trim(),v.slice(S+1).trim()]),v="";continue}v+=x}const O=v.indexOf(":");return O>0&&y.push([v.slice(0,O).trim(),v.slice(O+1).trim()]),y})(g).reduce(function(p,[y,v]){return p[y.replace(/(-[a-z])/g,w=>w[1].toUpperCase())]=f(v,d,y),p},{}):mv.indexOf(m)!==-1?f(Ke(g),d,m):(g.match(Fv)&&(g=Ke(g.slice(1,g.length-1))),g==="true"||g!=="false"&&g)})(t,l,(function(d){const m=d[0];return(m==='"'||m==="'")&&d.length>=2&&d[d.length-1]===m?d.slice(1,-1):d})(o.slice(a+1).trim()),n);typeof u=="string"&&(Vs.test(u)||Xi.test(u))&&(s[c]=r(u.trim()))}else o!=="style"&&(s[ja[o]||o]=!0);return s},{}):null}function Ma(t,e){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0;return!1}function m1(t="",e={}){e.overrides=e.overrides||{},e.namedCodesToUnicode=e.namedCodesToUnicode?Je({},Oa,e.namedCodesToUnicode):Oa;const n=e.slugify||In,r=e.sanitizer||c1,i=e.createElement||N.createElement,s=[Aa,Ea,Ca,e.enforceAtxHeadings?Ia:_a,Ta,Fa,Vc,zc],o=[...s,Rv,Vs,Na,Xi];function a(f,p,...y){const v=ji(e.overrides,f+".props",{});return i((function(w,A){const O=ji(A,w);return O?typeof O=="function"||typeof O=="object"&&"render"in O?O:ji(A,w+".component",w):w})(f,e.overrides),Je({},p,v,{className:h1(p?.className,v.className)||void 0}),...y)}function l(f){f=f.replace(Cv,"");let p=!1;e.forceInline?p=!0:e.forceBlock||(p=Lv.test(f)===!1);const y=m(p?f:zn(f).replace(Jv,"")+`
|
|
16
16
|
|
|
17
17
|
`,{inline:p});if(e.ast)return y;const v=g(y);for(;$a(v[v.length-1])&&!v[v.length-1].trim();)v.pop();if(c.length&&v.push(a("footer",{key:"footer"},c.map(function(O){return a("div",{id:n(O.identifier,In),key:O.identifier},O.identifier,g(m(O.footnote,{inline:!0})))}))),e.wrapper===null)return v;const w=e.wrapper||(p?"span":"div");let A;if(v.length>1||e.forceWrapper)A=v;else{if(v.length===1)return A=v[0],typeof A=="string"?a("span",{key:"outer"},A):A;A=null}return i(w,Je({key:"outer"},e.wrapperProps),A)}const c=[],u={},d={0:{t:[">"],o:st(Aa),u:1,i(f,p,y){const[,v,w]=f[0].replace(yv,"").match(bv);return{alert:v,children:p(w,y)}}},1:{t:[" "],o:mt(xv),u:1,i:wi},2:{t:function(f,p){if(p.inline||p.simple)return!1;var y=f[0];return y==="-"||y==="*"||y==="_"},o:st(vv),u:1,i:wi},3:{t:[" "],o:st(Ca),u:0,i:f=>({lang:void 0,text:Ke(zn(f[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:st(Ea),u:0,i:f=>({attrs:Oi("code",f[3]||"",r,l),lang:f[2]||void 0,text:f[4],type:"3"})},5:{t:["`"],o:fr(Sv),u:3,i:f=>({text:Ke(f[2])})},6:{t:["[^"],o:st(Ov),u:0,i:f=>(c.push({footnote:f[2],identifier:f[1]}),{})},7:{t:["[^"],o:mt(Av),u:1,i:f=>({target:"#"+n(f[1],In),text:f[1]})},8:{t:["[ ]","[x]"],o:mt(_v),u:1,i:f=>({completed:f[1].toLowerCase()==="x"})},9:{t:["#"],o:st(e.enforceAtxHeadings?Ia:_a),u:1,i:(f,p,y)=>({children:jr(p,f[2],y),id:n(f[2],In),level:f[1].length})},10:{t:f=>{const p=f.indexOf(`
|
|
18
|
-
`);return p>0&&p<f.length-1&&(f[p+1]==="="||f[p+1]==="-")},o:st(Ta),u:1,i:(f,p,y)=>({children:jr(p,f[1],y),level:f[2]==="="?1:2,type:"9"})},11:{t:["<"],o:xt(Iv),u:1,i(f,p,y){const[,v]=f[3].match(Zv),w=RegExp("^"+v,"gm"),A=f[3].replace(w,""),O=Ma(o,A)?d1:jr,b=f[1].toLowerCase(),x=hv.indexOf(b)!==-1,S=(x?b:f[1]).trim(),j={attrs:Oi(S,f[2],r,l),noInnerParse:x,tag:S};if(y.inAnchor=y.inAnchor||b==="a",x)j.text=f[3];else{const E=y.inHTML;y.inHTML=!0,j.children=O(p,A,y),y.inHTML=E}return y.inAnchor=!1,j}},13:{t:["<"],o:ka(Xi),u:1,i(f){const p=f[1].trim();return{attrs:Oi(p,f[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:ka(Na),u:1,i:()=>({})},14:{t:["!["],o:fr(i1),u:1,i:f=>({alt:Ke(f[1]),target:Ke(f[2]),title:Ke(f[3])})},15:{t:["["],o:mt(r1),u:3,i:(f,p,y)=>({children:u1(p,f[1],y),target:Ke(f[2]),title:Ke(f[3])})},16:{t:function(f,p){return!(!p.inline||p.inAnchor)&&f[0]==="<"&&(Ge(f,":")||Ge(f,"@")||Ge(f,"/"))},o:mt($v),u:0,i(f){let p=f[1],y=!1;return Ge(p,"@")&&!Ge(p,"//")&&(y=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:y?"mailto:"+p:p,type:"15"}}},17:{t:(f,p)=>!p.inAnchor&&!e.disableAutoLink&&Qi(f,"http"),o:mt(
|
|
18
|
+
`);return p>0&&p<f.length-1&&(f[p+1]==="="||f[p+1]==="-")},o:st(Ta),u:1,i:(f,p,y)=>({children:jr(p,f[1],y),level:f[2]==="="?1:2,type:"9"})},11:{t:["<"],o:xt(Iv),u:1,i(f,p,y){const[,v]=f[3].match(Zv),w=RegExp("^"+v,"gm"),A=f[3].replace(w,""),O=Ma(o,A)?d1:jr,b=f[1].toLowerCase(),x=hv.indexOf(b)!==-1,S=(x?b:f[1]).trim(),j={attrs:Oi(S,f[2],r,l),noInnerParse:x,tag:S};if(y.inAnchor=y.inAnchor||b==="a",x)j.text=f[3];else{const E=y.inHTML;y.inHTML=!0,j.children=O(p,A,y),y.inHTML=E}return y.inAnchor=!1,j}},13:{t:["<"],o:ka(Xi),u:1,i(f){const p=f[1].trim();return{attrs:Oi(p,f[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:ka(Na),u:1,i:()=>({})},14:{t:["!["],o:fr(i1),u:1,i:f=>({alt:Ke(f[1]),target:Ke(f[2]),title:Ke(f[3])})},15:{t:["["],o:mt(r1),u:3,i:(f,p,y)=>({children:u1(p,f[1],y),target:Ke(f[2]),title:Ke(f[3])})},16:{t:function(f,p){return!(!p.inline||p.inAnchor)&&f[0]==="<"&&(Ge(f,":")||Ge(f,"@")||Ge(f,"/"))},o:mt($v),u:0,i(f){let p=f[1],y=!1;return Ge(p,"@")&&!Ge(p,"//")&&(y=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:y?"mailto:"+p:p,type:"15"}}},17:{t:(f,p)=>!p.inAnchor&&!e.disableAutoLink&&Qi(f,"http"),o:mt(Pv),u:0,i:f=>({children:[{text:f[1],type:"27"}],target:f[1],title:void 0,type:"15"})},20:Pa(0,1),30:Pa(0,2),19:{t:[`
|
|
19
19
|
`],o:st(wv),u:3,i:wi},21:{t:function(f,p){return!p.inline&&!p.simple},o:xt(function(f,p){if(p.inline||p.simple||p.inHTML&&!Ge(f,`
|
|
20
20
|
|
|
21
21
|
`)&&!Ge(p.prevCapture,`
|
|
22
22
|
|
|
23
23
|
`))return null;let y="",v=0;for(;;){const A=f.indexOf(`
|
|
24
|
-
`,v),O=f.slice(v,A===-1?void 0:A+1),b=f[v];if((b===">"||b==="#"||b==="|"||b==="`"||b==="~"||b==="*"||b==="-"||b==="_"||b===" ")&&Ma(s,O)||(y+=O,A===-1||!O.trim()))break;v=A+1}const w=zn(y);return w===""?null:[y,,w]}),u:3,i:f1},22:{t:["["],o:mt(kv),u:0,i:f=>(u[f[1]]={target:f[2],title:f[4]},{})},23:{t:["!["],o:fr(Mv),u:0,i:f=>({alt:f[1]?Ke(f[1]):void 0,ref:f[2]})},24:{t:f=>f[0]==="["&&!Ge(f,"]("),o:mt(Uv),u:0,i:(f,p,y)=>({children:p(f[1],y),fallbackChildren:f[0],ref:f[2]})},25:{t:["|"],o:st(
|
|
25
|
-
`).replace(Ev,"").replace(Bv," ")})(v),w)}})(d),g=(function(f,p,y,v,w){function A(O){return Array.isArray(O)?O.map(b=>"text"in b?b.text:""):"text"in O?O.text:""}return function O(b,x={}){const S=(x.renderDepth||0)+1;if(S>2500)return A(b);x.renderDepth=S;try{if(Array.isArray(b)){const E=x.key,C=[];let _=!1;for(let I=0;I<b.length;I++){x.key=I;const T=O(b[I],x),
|
|
26
|
-
`;case"21":return $("p",{key:F.key},P(T.children,F));default:return null}})(E,C,_,p,y,v,w);return f?f(I,E,C,_):I()})(b,O,x);return x.renderDepth=S-1,j}catch(j){if(j instanceof RangeError&&j.message.includes("Maximum call stack"))return A(b);throw j}}})(e.renderRule,a,r,n,u);return l(t)}const lr=t=>{let{children:e,options:n}=t,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})(t,fv);return m1(e??"",Je({},n,{wrapperProps:Je({},n?.wrapperProps,r)}))},Wc=Symbol("remove-this-key"),Ua=Symbol("reset");function p1(t,e){return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}function g1(t,e){switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return t(K.NewStringDefault)}}function y1(t){const{fieldPathId:e,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:c,disabled:u,readonly:d,required:m,hideError:g,propertyName:f,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:v}=t,[w,A]=N.useState(!1),{globalFormOptions:O,fields:b}=r,{SchemaField:x}=b,S=Kt(Be(f,O,e.path)),j=N.useCallback((I,T,P,F)=>{I===void 0&&v&&(I=""),a(I,T,P,F)},[a,v]),E=N.useCallback(I=>{f!==I&&A(!0),p(f,I)},[f,p]),C=N.useCallback(I=>{const{target:{value:T}}=I;E(T)},[E]),_=N.useCallback(()=>{y(f)},[f,y]);return h.jsx(x,{name:f,required:m,schema:n,uiSchema:i,errorSchema:s,fieldPathId:S,formData:o,wasPropertyKeyModified:w,onKeyRename:E,onKeyRenameBlur:C,onRemoveProperty:_,onChange:j,onBlur:l,onFocus:c,registry:r,disabled:u,readonly:d,hideError:g})}function b1(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:c,hideError:u,onBlur:d,onFocus:m,onChange:g,registry:f,title:p}=t,{fields:y,schemaUtils:v,translateString:w,globalUiOptions:A}=f,{OptionalDataControlsField:O}=y,b=N.useRef(r);b.current=r;const x=v.retrieveSchema(e,r,!0),S=M(n,A),{properties:j={}}=x,E=t.childFieldPathId??s,C=N.useRef({previousKey:"",currentKey:void 0}),_=S.title??x.title??p??o,I=S.description??x.description,T=ar(f,x,a,n),P=vn(r);let F=[];const $=N.useCallback((k,le)=>{const{duplicateKeySuffixSeparator:ee="-"}=M(n,A);let H=0,G=k;for(;X(le,G);)G=`${k}${ee}${++H}`;return G},[n,A]),R=N.useCallback(()=>{if(!(x.additionalProperties||x.patternProperties))return;const{translateString:k}=f,le={...r},ee=$("newKey",le);if(x.patternProperties)ce(le,ee,null);else{let H,G,z;if(te(x.additionalProperties)){H=x.additionalProperties.type,G=x.additionalProperties.const,z=x.additionalProperties.default;let oe=x.additionalProperties;if(ue in oe){const{schemaUtils:Oe}=f;oe=Oe.retrieveSchema({[ue]:oe[ue]},r),H=oe.type,G=oe.const,z=oe.default}!H&&(Q in oe||W in oe)&&(H="object")}const re=G??z??g1(k,H);ce(le,ee,re)}C.current.previousKey===ee&&(C.current.currentKey=ee,C.current.previousKey=$(ee,le)),g(le,E.path)},[r,g,f,E,$,x]),B=N.useCallback((k,le)=>{if(k!==le){const ee=b.current,H=$(le,ee),G={...ee},z={[k]:H},re=Object.keys(G).map(Oe=>({[z[Oe]||Oe]:G[Oe]})),oe=Object.assign({},...re);b.current=oe,k!==C.current.currentKey&&(C.current.previousKey=k),C.current.currentKey=H,g(oe,E.path)}},[g,E,$]),U=N.useCallback(k=>{g(Wc,[...E.path,k])},[g,E]),Y=N.useCallback(k=>C.current.currentKey===k?C.current.previousKey:k,[]);if(!T||P)try{const k=Object.keys(j);F=dx(k,S.order)}catch(k){return h.jsxs("div",{children:[h.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:h.jsx(lr,{options:{disableParsingRawHTML:!0},children:w(K.InvalidObjectField,[o||"root",k.message])})}),h.jsx("pre",{children:JSON.stringify(x)})]})}const ne=q("ObjectFieldTemplate",f,S),fe=T?h.jsx(O,{...t,fieldPathId:E,schema:x}):void 0,ye={title:S.label===!1?"":_,description:S.label===!1?void 0:I,properties:F.map(k=>{const le=X(x,[se,k,at]),ee=le?n.additionalProperties:n[k],H=M(ee).widget==="hidden";return{content:h.jsx(y1,{propertyName:k,required:p1(x,k),schema:D(x,[se,k],{}),uiSchema:ee,errorSchema:D(i,[k]),fieldPathId:E,formData:D(r,[k]),handleKeyRename:B,handleRemoveProperty:U,addedByAdditionalProperties:le,onChange:g,onBlur:d,onFocus:m,registry:f,disabled:l,readonly:c,hideError:u},Y(k)),name:k,readonly:c,disabled:l,required:a,hidden:H}}),readonly:c,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:x,formData:r,registry:f,optionalDataControl:fe,className:T?"rjsf-optional-object-field":void 0};return h.jsx(ne,{...ye,onAddProperty:R})}function x1(t){const{schema:e,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:c}=t,{globalUiOptions:u={},schemaUtils:d,translateString:m}=c,g=M(n,u),f=q("OptionalDataControlsTemplate",c,g),p=vn(r);let y,v,w,A;if(i||s)y=bi(l,"Msg"),v=p?void 0:m(K.OptionalObjectEmptyMsg);else{const O=p?K.OptionalObjectRemove:K.OptionalObjectAdd;v=m(O),p?(y=bi(l,"Remove"),A=()=>o(void 0,l.path,a)):(y=bi(l,"Add"),w=()=>{let b=d.getDefaultFormState(e,r,"excludeObjectChildren");b===void 0&&(b=Le(e)==="array"?[]:{}),o(b,l.path,a)})}return v&&h.jsx(f,{id:y,registry:c,schema:e,uiSchema:n,label:v,onAddClick:w,onRemoveClick:A})}const v1={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function S1(t,e,n){const r=e.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=Le(t),o=Array.isArray(s)?s[0]:s||"",a=t.$id;let l=v1[o];return a&&a in i&&(l=a),!l&&(t.anyOf||t.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function w1(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:d=!1,registry:m,wasPropertyKeyModified:g=!1}=t,{schemaUtils:f,globalFormOptions:p,globalUiOptions:y,fields:v}=m,{AnyOfField:w,OneOfField:A}=v,O=fx(e,r,m),b=M(O,y),x=q("FieldTemplate",m,b),S=q("DescriptionFieldTemplate",m,b),j=q("FieldHelpTemplate",m,b),E=q("FieldErrorTemplate",m,b),C=f.retrieveSchema(e,i),_=n[de],I=N.useCallback((wn,jn,It,vu)=>a(wn,jn,It,vu||_),[_,a]),T=S1(C,b,m),P=!!(b.disabled??t.disabled),F=!!(b.readonly??(t.readonly||t.schema.readOnly||C.readOnly)),$=b.hideError,R=$===void 0?t.hideError:!!$,B=!!(b.autofocus??t.autofocus);if(Object.keys(C).length===0)return null;let U=f.getDisplayLabel(C,O,y);const Y=b.field&&b.fieldReplacesAnyOrOneOf===!0;let ne,fe,ye={fieldPathId:n};if((Q in C||W in C)&&!Y&&!f.isSelect(C)){C[Q]?(ne=w,fe=C[Q].map(It=>f.retrieveSchema(te(It)?It:{},i))):C[W]&&(ne=A,fe=C[W].map(It=>f.retrieveSchema(te(It)?It:{},i)));const wn=ar(m,C,d,O),jn=vn(i);U=U&&(!wn||jn),ye={childFieldPathId:n,fieldPathId:Be("XxxOf",p,n)}}const{__errors:k,...le}=s||{},ee=un(O,["ui:classNames","classNames","ui:style"]);vt in ee&&(ee[vt]=un(ee[vt],["classNames","style"]));const H=h.jsx(T,{...t,onChange:I,...ye,schema:C,uiSchema:ee,disabled:P,readonly:F,hideError:R,autofocus:B,errorSchema:le,rawErrors:k}),G=n[de];let z;g?z=o:z=at in C?o:b.title||t.schema.title||C.title||t.title||o;const re=b.description||t.schema.description||C.description||"",oe=b.help,Oe=b.widget==="hidden",Ae=["rjsf-field",`rjsf-field-${Le(C)}`];!R&&k&&k.length>0&&Ae.push("rjsf-field-error"),b.classNames&&Ae.push(b.classNames);const xe=h.jsx(j,{help:oe,fieldPathId:n,schema:C,uiSchema:O,hasErrors:!R&&k&&k.length>0,registry:m}),$e=R||ne&&!f.isSelect(C)?void 0:h.jsx(E,{errors:k,errorSchema:s,fieldPathId:n,schema:C,uiSchema:O,registry:m}),ht={description:h.jsx(S,{id:Gt(G),description:re,schema:C,uiSchema:O,registry:m}),rawDescription:re,help:xe,rawHelp:typeof oe=="string"?oe:void 0,errors:$e,rawErrors:R?void 0:k,fieldPathId:n,id:G,label:z,hidden:Oe,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:d,disabled:P,readonly:F,hideError:R,displayLabel:U,classNames:Ae.join(" ").trim(),style:b.style,formData:i,schema:C,uiSchema:O,registry:m};return h.jsx(x,{...ht,children:h.jsxs(h.Fragment,{children:[H,ne&&h.jsx(ne,{name:o,disabled:P,readonly:F,hideError:R,errorSchema:s,formData:i,fieldPathId:n,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:fe,registry:m,required:d,schema:C,uiSchema:O})]})})}class j1 extends N.Component{shouldComponentUpdate(e){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return Ic(this,e,this.state,r)}render(){return h.jsx(w1,{...this.props})}}function O1(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:c=!1,onChange:u,onBlur:d,onFocus:m,registry:g,rawErrors:f,hideError:p,title:y}=t,{title:v,format:w}=e,{widgets:A,schemaUtils:O,globalUiOptions:b}=g,x=O.isSelect(e)?hn(e,r):void 0;let S=x?"select":"text";w&&lx(e,w,A)&&(S=w);const{widget:j=S,placeholder:E="",title:C,..._}=M(r),I=O.getDisplayLabel(e,r,b),T=C??y??v??n,P=tt(e,j,A),F=N.useCallback(($,R,B)=>u($,i.path,R,B),[u,i]);return h.jsx(P,{options:{..._,enumOptions:x},schema:e,uiSchema:r,id:i.$id,name:n,label:T,hideLabel:!I,hideError:p,value:s,onChange:F,onBlur:d,onFocus:m,required:o,disabled:a,readonly:l,autofocus:c,registry:g,placeholder:E,rawErrors:f,htmlName:i.name})}function A1(t){const{formData:e,onChange:n,fieldPathId:r}=t;return N.useEffect(()=>{e===void 0&&n(null,r.path)},[r,e,n]),null}function E1(){return{AnyOfField:Sa,ArrayField:$x,BooleanField:Dx,FallbackField:Ux,LayoutGridField:qs,LayoutHeaderField:sv,LayoutMultiSchemaField:ov,NumberField:cv,ObjectField:b1,OneOfField:Sa,OptionalDataControlsField:x1,SchemaField:j1,StringField:O1,NullField:A1}}function C1(t){const{fieldPathId:e,description:n,registry:r,schema:i,uiSchema:s}=t,o=M(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=q("DescriptionFieldTemplate",r,o);return h.jsx(l,{id:Gt(e),description:n,schema:i,uiSchema:s,registry:r})}function _1(t){const{children:e,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=t,c=M(l),u=q("ArrayFieldItemButtonsTemplate",a,c),d={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},m=s?31:9,g={display:"flex",alignItems:i?"center":"baseline"},f={display:"flex",justifyContent:"flex-end",marginTop:i?`${m}px`:0};return h.jsxs("div",{className:n,style:g,children:[h.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:e}),o&&h.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:h.jsx("div",{className:"btn-group",style:f,children:h.jsx(u,{...r,style:d})})})]})}function I1(t){const{disabled:e,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:c,onMoveUpItem:u,readonly:d,registry:m,uiSchema:g}=t,{CopyButton:f,MoveDownButton:p,MoveUpButton:y,RemoveButton:v}=m.templates.ButtonTemplates;return h.jsxs(h.Fragment,{children:[(i||r)&&h.jsx(y,{id:Qe(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:e||d||!i,onClick:u,uiSchema:g,registry:m}),(i||r)&&h.jsx(p,{id:Qe(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:e||d||!r,onClick:c,uiSchema:g,registry:m}),n&&h.jsx(f,{id:Qe(o,"copy"),className:"rjsf-array-item-copy",disabled:e||d,onClick:a,uiSchema:g,registry:m}),s&&h.jsx(v,{id:Qe(o,"remove"),className:"rjsf-array-item-remove",disabled:e||d,onClick:l,uiSchema:g,registry:m})]})}function T1(t){const{canAdd:e,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:c,registry:u,required:d,schema:m,title:g}=t,f=M(s),p=q("ArrayFieldDescriptionTemplate",u,f),y=q("ArrayFieldTitleTemplate",u,f),v=!c&&!r,{ButtonTemplates:{AddButton:w}}=u.templates;return h.jsxs("fieldset",{className:n,id:i.$id,children:[h.jsx(y,{fieldPathId:i,title:f.title||g,required:d,schema:m,uiSchema:s,registry:u,optionalDataControl:v?a:void 0}),h.jsx(p,{fieldPathId:i,description:f.description||m.description,schema:m,uiSchema:s,registry:u}),v?void 0:a,h.jsx("div",{className:"row array-item-list",children:o}),e&&h.jsx(w,{id:Qe(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||c,uiSchema:s,registry:u})]})}function N1(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=t,l=M(i,o.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const u=q("TitleFieldTemplate",o,l);return h.jsx(u,{id:Yr(e),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function Hc(t){const{id:e,schema:n}=t,{examples:r,default:i}=n;return Array.isArray(r)?h.jsx("datalist",{id:Kr(e),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>h.jsx("option",{value:s},String(s)))},`datalist_${e}`):null}function P1(t){const{id:e,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:c,onChange:u,onChangeOverride:d,options:m,schema:g,uiSchema:f,registry:p,rawErrors:y,type:v,hideLabel:w,hideError:A,...O}=t,{ClearButton:b}=p.templates.ButtonTemplates;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const x={...O,...Ac(g,v,m)};let S;x.type==="number"||x.type==="integer"?S=i||i===0?i:"":S=i??"";const j=N.useCallback(({target:{value:I}})=>u(I===""?m.emptyValue:I),[u,m]),E=N.useCallback(({target:I})=>l(e,I&&I.value),[l,e]),C=N.useCallback(({target:I})=>c(e,I&&I.value),[c,e]),_=N.useCallback(I=>{I.preventDefault(),I.stopPropagation(),u(m.emptyValue??"")},[u,m.emptyValue]);return h.jsxs(h.Fragment,{children:[h.jsx("input",{id:e,name:r||e,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:S,...x,list:g.examples?Kr(e):void 0,onChange:d||j,onBlur:E,onFocus:C,"aria-describedby":Fe(e,!!g.examples)}),m.allowClearTextInputs&&!s&&!o&&S&&h.jsx(b,{registry:p,onClick:_}),h.jsx(Hc,{id:e,schema:g})]})}function F1({uiSchema:t}){const{submitText:e,norender:n,props:r={}}=Ec(t);return n?null:h.jsx("div",{children:h.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:e})})}function _t(t){const{iconType:e="default",icon:n,className:r,uiSchema:i,registry:s,...o}=t;return h.jsx("button",{type:"button",className:`btn btn-${e} ${r}`,...o,children:h.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function $1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.CopyButton),...t,icon:"copy"})}function D1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.MoveDownButton),...t,icon:"arrow-down"})}function R1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.MoveUpButton),...t,icon:"arrow-up"})}function k1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.RemoveButton),...t,iconType:"danger",icon:"remove"})}function M1({id:t,className:e,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return h.jsx(_t,{id:t,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(K.ClearButton),onClick:n,disabled:r,registry:i,...s})}function U1({id:t,className:e,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return h.jsx("div",{className:"row",children:h.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 ${e}`,children:h.jsx(_t,{id:t,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(K.AddButton),onClick:n,disabled:r,registry:i})})})}function L1(){return{SubmitButton:F1,AddButton:U1,CopyButton:$1,MoveDownButton:D1,MoveUpButton:R1,RemoveButton:k1,ClearButton:M1}}const Gc=Rs();function Hs({description:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return M(n,r).enableMarkdownInDescription&&typeof t=="string"?h.jsx(lr,{options:{disableParsingRawHTML:!0},"data-testid":Gc.markdown,children:t}):t}Hs.TEST_IDS=Gc;function B1(t){const{id:e,description:n,registry:r,uiSchema:i}=t;return n?h.jsx("div",{id:e,className:"field-description",children:h.jsx(Hs,{description:n,registry:r,uiSchema:i})}):null}function q1({errors:t,registry:e}){const{translateString:n}=e;return h.jsxs("div",{className:"panel panel-danger errors",children:[h.jsx("div",{className:"panel-heading",children:h.jsx("h3",{className:"panel-title",children:n(K.ErrorsLabel)})}),h.jsx("ul",{className:"list-group",children:t.map((r,i)=>h.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function V1(t){const{schema:e,registry:n,typeSelector:r,schemaField:i}=t,s=q("MultiSchemaFieldTemplate",n);return h.jsx(s,{selector:r,optionSchemaField:i,schema:e,registry:n})}const z1="*";function Kc(t){const{label:e,required:n,id:r}=t;return e?h.jsxs("label",{className:"control-label",htmlFor:r,children:[e,n&&h.jsx("span",{className:"required",children:z1})]}):null}function W1(t){const{id:e,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:c,registry:u,uiSchema:d}=t,m=M(d),g=q("WrapIfAdditionalTemplate",u,m);if(a)return h.jsx("div",{className:"hidden",children:r});const f=m.widget==="checkbox";return h.jsxs(g,{...t,children:[c&&!f&&h.jsx(Kc,{label:n,required:l,id:e}),c&&o?o:null,r,i,s]})}function H1(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=ks(n);return h.jsx("div",{children:h.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,s)=>h.jsx("li",{className:"text-danger",children:i},s))})})}const Yc=Rs();function Gs({help:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return M(n,r).enableMarkdownInHelp&&typeof t=="string"?h.jsx(lr,{options:{disableParsingRawHTML:!0},"data-testid":Yc.markdown,children:t}):t}Gs.TEST_IDS=Yc;function G1(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i}=t;return n?h.jsx("div",{id:Ms(e),className:"help-block",children:h.jsx(Gs,{help:n,registry:i,uiSchema:r})}):null}function K1(t){const{children:e,column:n,className:r,...i}=t;return h.jsx("div",{className:r,...i,children:e})}function Y1(t){const{selector:e,optionSchemaField:n}=t;return h.jsxs("div",{className:"panel panel-default panel-body",children:[h.jsx("div",{className:"form-group",children:e}),n]})}function J1(t){const{className:e,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:c,registry:u,required:d,schema:m,title:g,uiSchema:f}=t,p=M(f),y=q("TitleFieldTemplate",u,p),v=q("DescriptionFieldTemplate",u,p);if((m.oneOf||m.anyOf)&&!m.properties&&l.length===0)return null;const A=!c&&!r,{ButtonTemplates:{AddButton:O}}=u.templates;return h.jsxs("fieldset",{className:e,id:s.$id,children:[g&&h.jsx(y,{id:Yr(s),title:g,required:d,schema:m,uiSchema:f,registry:u,optionalDataControl:A?a:void 0}),n&&h.jsx(v,{id:Gt(s),description:n,schema:m,uiSchema:f,registry:u}),A?void 0:a,l.map(b=>b.content),sl(m,f,i)&&h.jsx(O,{id:Qe(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||c,uiSchema:f,registry:u})]})}function Z1(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?h.jsx(_t,{id:e,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?h.jsx(_t,{id:e,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):h.jsx("em",{id:e,children:r})}const X1="*";function Q1(t){const{id:e,title:n,required:r,optionalDataControl:i}=t;return h.jsxs("legend",{id:e,children:[n,r&&h.jsx("span",{className:"required",children:X1}),i&&h.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function eS(t){const{schema:e,fieldPathId:n,reason:r,registry:i}=t,{translateString:s}=i;let o=K.UnsupportedField;const a=[];return n&&n.$id&&(o=K.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===K.UnsupportedField?K.UnsupportedFieldWithReason:K.UnsupportedFieldWithIdAndReason,a.push(r)),h.jsxs("div",{className:"unsupported-field",children:[h.jsx("p",{children:h.jsx(lr,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),e&&h.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function tS(t){const{id:e,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:c,readonly:u,required:d,schema:m,hideError:g,rawErrors:f,children:p,uiSchema:y,registry:v}=t,{templates:w,translateString:A}=v,{RemoveButton:O}=w.ButtonTemplates,b=A(K.KeyLabel,[o]),x=at in m,S=!!c,j=["form-group",n];!g&&f&&f.length>0&&j.push("has-error has-danger");const E=j.join(" ").trim();if(!x)return h.jsx("div",{className:E,style:r,children:p});const C=S?46:26;return h.jsx("div",{className:E,style:r,children:h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-xs-5 form-additional",children:h.jsxs("div",{className:"form-group",children:[s&&h.jsx(Kc,{label:b,required:d,id:`${e}-key`}),s&&c&&h.jsx("div",{children:" "}),h.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:a,defaultValue:o},o)]})}),h.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),h.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${C}px`:void 0},children:h.jsx(O,{id:Qe(e,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l,uiSchema:y,registry:v})})]})})}function nS(){return{ArrayFieldDescriptionTemplate:C1,ArrayFieldItemTemplate:_1,ArrayFieldItemButtonsTemplate:I1,ArrayFieldTemplate:T1,ArrayFieldTitleTemplate:N1,ButtonTemplates:L1(),BaseInputTemplate:P1,DescriptionFieldTemplate:B1,ErrorListTemplate:q1,FallbackFieldTemplate:V1,FieldTemplate:W1,FieldErrorTemplate:H1,FieldHelpTemplate:G1,GridTemplate:K1,MultiSchemaFieldTemplate:Y1,ObjectFieldTemplate:J1,OptionalDataControlsTemplate:Z1,TitleFieldTemplate:Q1,UnsupportedFieldTemplate:eS,WrapIfAdditionalTemplate:tS}}function rS(t){const{disabled:e=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:c}=t,{translateString:u}=a,{elements:d,handleChange:m,handleClear:g,handleSetNow:f}=gx(t);return h.jsxs("ul",{className:"list-inline",children:[d.map((p,y)=>h.jsx("li",{className:"list-inline-item",children:h.jsx(px,{rootId:s,name:o,select:m,...p,disabled:e,readonly:n,registry:a,onBlur:l,onFocus:c,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&h.jsx("li",{className:"list-inline-item",children:h.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:f,children:u(K.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&h.jsx("li",{className:"list-inline-item",children:h.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:g,children:u(K.ClearLabel)})})]})}function iS({time:t=!0,...e}){const{AltDateWidget:n}=e.registry.widgets;return h.jsx(n,{time:t,...e})}function sS({schema:t,uiSchema:e,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:c=!1,onBlur:u,onFocus:d,onChange:m,registry:g,htmlName:f}){const p=q("DescriptionFieldTemplate",g,n),y=qn(t),v=N.useCallback(S=>m(S.target.checked),[m]),w=N.useCallback(S=>u(r,S.target.checked),[u,r]),A=N.useCallback(S=>d(r,S.target.checked),[d,r]),x=M(e).widget==="checkbox"?void 0:n.description??t.description;return h.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&x&&h.jsx(p,{id:Gt(r),description:x,schema:t,uiSchema:e,registry:g}),h.jsxs("label",{children:[h.jsx("input",{type:"checkbox",id:r,name:f||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:c,onChange:v,onBlur:w,onFocus:A,"aria-describedby":Fe(r)}),_c(h.jsx("span",{children:a}),l)]})]})}function oS({id:t,disabled:e,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:c}){const{inline:u=!1,enumOptions:d,enumDisabled:m,emptyValue:g}=n,f=xn(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:w})=>a(t,Te(w&&w.value,d,f,g)),[a,t,d,g,f]),v=N.useCallback(({target:w})=>l(t,Te(w&&w.value,d,f,g)),[l,t,d,g,f]);return h.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(d)&&d.map((w,A)=>{const O=sr(w.value,p),b=Array.isArray(m)&&m.indexOf(w.value)!==-1,x=e||b||s?"disabled":"",S=E=>{E.target.checked?o(wc(A,p,d)):o(vc(A,p,d))},j=h.jsxs("span",{children:[h.jsx("input",{type:"checkbox",id:$t(t,A),name:c||t,checked:O,value:or(w.value,A,f),disabled:e||b||s,autoFocus:i&&A===0,onChange:S,onBlur:y,onFocus:v,"aria-describedby":Fe(t)}),h.jsx("span",{children:w.label})]});return u?h.jsx("label",{className:`checkbox-inline ${x}`,children:j},A):h.jsx("div",{className:`checkbox ${x}`,children:h.jsx("label",{children:j})},A)})})}function aS(t){const{disabled:e,readonly:n,options:r,registry:i}=t,s=q("BaseInputTemplate",i,r);return h.jsx(s,{type:"color",...t,disabled:e||n})}function lS(t){const{onChange:e,options:n,registry:r}=t,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o||void 0),[e]);return h.jsx(i,{type:"date",...t,onChange:s})}function cS(t){const{onChange:e,value:n,options:r,registry:i}=t,s=q("BaseInputTemplate",i,r);return h.jsx(s,{type:"datetime-local",...t,value:Sx(n),onChange:o=>e(ux(o))})}function uS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"email",...t})}function dS({fileInfo:t,registry:e}){const{translateString:n}=e,{dataURL:r,type:i,name:s}=t;return r?["image/jpeg","image/png"].includes(i)?h.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):h.jsxs(h.Fragment,{children:[" ",h.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(K.PreviewLabel)})]}):null}function fS({filesInfo:t,registry:e,preview:n,onRemove:r,options:i}){if(t.length===0)return null;const{translateString:s}=e,{RemoveButton:o}=q("ButtonTemplates",e,i);return h.jsx("ul",{className:"file-info",children:t.map((a,l)=>{const{name:c,size:u,type:d}=a,m=()=>r(l);return h.jsxs("li",{children:[h.jsx(lr,{children:s(K.FilesInfo,[c,d,String(u)])}),n&&h.jsx(dS,{fileInfo:a,registry:e}),h.jsx(o,{onClick:m,registry:e})]},l)})})}function hS(t){const{disabled:e,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=t,{filesInfo:c,handleChange:u,handleRemove:d}=vx(o,s,i),m=q("BaseInputTemplate",l,a),g=f=>{f.target.files&&u(f.target.files)};return h.jsxs("div",{children:[h.jsx(m,{...t,disabled:e||n,type:"file",required:o?!1:r,onChangeOverride:g,value:"",accept:a.accept?String(a.accept):void 0}),h.jsx(fS,{filesInfo:c,onRemove:d,registry:l,preview:a.filePreview,options:a})]})}function mS({id:t,value:e,htmlName:n}){return h.jsx("input",{type:"hidden",id:t,name:n||t,value:typeof e>"u"?"":e})}function pS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"password",...t})}function gS({options:t,value:e,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:c,htmlName:u}){const{enumOptions:d,enumDisabled:m,inline:g,emptyValue:f}=t,p=xn(t),y=N.useCallback(({target:w})=>o(c,Te(w&&w.value,d,p,f)),[o,d,f,c,p]),v=N.useCallback(({target:w})=>a(c,Te(w&&w.value,d,p,f)),[a,d,f,c,p]);return h.jsx("div",{className:"field-radio-group",id:c,role:"radiogroup",children:Array.isArray(d)&&d.map((w,A)=>{const O=sr(w.value,e),b=Array.isArray(m)&&m.indexOf(w.value)!==-1,x=r||b||i?"disabled":"",S=()=>l(w.value),j=h.jsxs("span",{children:[h.jsx("input",{type:"radio",id:$t(c,A),checked:O,name:u||c,required:n,value:or(w.value,A,p),disabled:r||b||i,autoFocus:s&&A===0,onChange:S,onBlur:y,onFocus:v,"aria-describedby":Fe(c)}),h.jsx("span",{children:w.label})]});return g?h.jsx("label",{className:`radio-inline ${x}`,children:j},A):h.jsx("div",{className:`radio ${x}`,children:h.jsx("label",{children:j})},A)})})}function yS(t){const{value:e,registry:{templates:{BaseInputTemplate:n}}}=t;return h.jsxs("div",{className:"field-range-wrapper",children:[h.jsx(n,{type:"range",...t}),h.jsx("span",{className:"range-view",children:e})]})}function bS({id:t,value:e,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:c,options:u,htmlName:d}){const{stars:m=5,shape:g="star"}=u,f=c.maximum?Math.min(c.maximum,5):Math.min(Math.max(m,1),5),p=c.minimum||0,y=N.useCallback(O=>{!r&&!i&&o(O)},[o,r,i]),v=N.useCallback(O=>{if(a){const b=Number(O.target.dataset.value);a(t,b)}},[a,t]),w=N.useCallback(O=>{if(l){const b=Number(O.target.dataset.value);l(t,b)}},[l,t]),A=O=>g==="heart"?O?"♥":"♡":O?"★":"☆";return h.jsx(h.Fragment,{children:h.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(f)].map((O,b)=>{const x=p+b,S=x<=e;return h.jsx("span",{onClick:()=>y(x),onFocus:v,onBlur:w,"data-value":x,tabIndex:r||i?-1:0,role:"radio","aria-checked":x===e,"aria-label":`${x} ${g==="heart"?"heart":"star"}${x===1?"":"s"}`,style:{color:S?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:A(S)},b)}),h.jsx("input",{type:"hidden",id:t,name:d||t,value:e||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function Ai(t,e){return e?Array.from(t.target.options).slice().filter(n=>n.selected).map(n=>n.value):t.target.value}function xS({schema:t,id:e,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:c,onBlur:u,onFocus:d,placeholder:m,htmlName:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=n,v=a?[]:"",w=xn(n),A=N.useCallback(j=>{const E=Ai(j,a);return d(e,Te(E,f,w,y))},[d,e,a,f,y,w]),O=N.useCallback(j=>{const E=Ai(j,a);return u(e,Te(E,f,w,y))},[u,e,a,f,y,w]),b=N.useCallback(j=>{const E=Ai(j,a);return c(Te(E,f,w,y))},[c,a,f,y,w]),x=Sc(r,f,a,w,v),S=!a&&t.default===void 0;return h.jsxs("select",{id:e,name:g||e,multiple:a,role:"combobox",className:"form-control",value:x,required:i,disabled:s||o,autoFocus:l,onBlur:O,onFocus:A,onChange:b,"aria-describedby":Fe(e),children:[S&&h.jsx("option",{value:"",children:m}),Array.isArray(f)&&f.map(({value:j,label:E},C)=>{const _=p&&p.indexOf(j)!==-1;return h.jsx("option",{value:or(j,C,w),disabled:_,children:E},C)})]})}function vS({id:t,options:e={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:c,onFocus:u,htmlName:d}){const m=N.useCallback(({target:{value:p}})=>l(p===""?e.emptyValue:p),[l,e.emptyValue]),g=N.useCallback(({target:p})=>c(t,p&&p.value),[c,t]),f=N.useCallback(({target:p})=>u(t,p&&p.value),[t,u]);return h.jsx("textarea",{id:t,name:d||t,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:e.rows,onBlur:g,onFocus:f,onChange:m,"aria-describedby":Fe(t)})}function SS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{...t})}function wS(t){const{onChange:e,options:n,registry:r}=t,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o?`${o}:00`:void 0),[e]);return h.jsx(i,{type:"time",...t,onChange:s})}function jS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"url",...t})}function OS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"number",...t})}function AS(){return{AltDateWidget:rS,AltDateTimeWidget:iS,CheckboxWidget:sS,CheckboxesWidget:oS,ColorWidget:aS,DateWidget:lS,DateTimeWidget:cS,EmailWidget:uS,FileWidget:hS,HiddenWidget:mS,PasswordWidget:pS,RadioWidget:gS,RangeWidget:yS,RatingWidget:bS,SelectWidget:xS,TextWidget:SS,TextareaWidget:vS,TimeWidget:wS,UpDownWidget:OS,URLWidget:jS}}function ES(){return{fields:E1(),templates:nS(),widgets:AS(),rootSchema:{},formContext:{},translateString:G0,globalFormOptions:{idPrefix:nl,idSeparator:rl,useFallbackUiForUnsupportedType:!1}}}function Yt(t,e){return{...$s(t,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...e!==void 0&&{status:e}}}let CS=class extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,n){if(e.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return e.extraErrors&&({errors:i,errorSchema:s}=Dn(r,e.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=Dn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:i,errorSchema:s}}return null}constructor(e){if(super(e),!e.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=e,s=n??r;this.state={...this.getStateFromProps(e,s,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},i&&!ie(this.state.formData,s)&&i(Yt(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(e,n){if(!ie(this.props,e)){const r=ua(this.props.formData,e.formData),i=ua(this.props.formData,this.state.formData),s=!ie(e.schema,this.props.schema),o=r.length>0||!ie(e.formData,this.props.formData),a=i.length>0||!ie(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=!ie(l,n);return{nextState:l,shouldUpdate:c}}return{shouldUpdate:!1}}componentDidUpdate(e,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!ie(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!ie(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Yt(i)),this.setState(i)}}getStateFromProps(e,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in e?e.schema:this.props.schema,c="validator"in e?e.validator:this.props.validator,u=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},d=e.formData===void 0&&this.props.formData===void 0,m=typeof n<"u",g="liveValidate"in e?e.liveValidate:this.props.liveValidate,f=m&&!e.noValidate&&g,p="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let v=a.schemaUtils;(!v||v.doesSchemaUtilsDiffer(c,l,p,y))&&(v=z0(c,l,p,y));const w=v.getRootSchema();let A=n;n===Ua?A=void 0:n===void 0&&d&&(A=a.formData);const O=v.getDefaultFormState(w,A,!1,a.initialDefaultsGenerated),b=this.updateRetrievedSchema(r??v.retrieveSchema(w,O)),x=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let S,j,E=a.schemaValidationErrors,C=a.schemaValidationErrorSchema;if(f&&!o){const F=this.liveValidate(w,v,a.errorSchema,O,void 0,a.customErrors,r,r!==void 0);S=F.errors,j=F.errorSchema,E=F.schemaValidationErrors,C=F.schemaValidationErrorSchema}else{const F=x();if(S=F.errors,j=F.errorSchema,s.length>0&&!f){const R=s.reduce((B,U)=>(B[U]=void 0,B),{});j=C=Ut(F.errorSchema,R,"preventDuplicates")}const $=this.mergeErrors({errorSchema:j,errors:S},e.extraErrors,a.customErrors);S=$.errors,j=$.errorSchema}const _=this.getRegistry(e,w,v),I=ie(a.registry,_)?a.registry:_,T=a.fieldPathId&&a.fieldPathId?.[de]===I.globalFormOptions.idPrefix?a.fieldPathId:Be("",I.globalFormOptions);return{schemaUtils:v,schema:w,uiSchema:u,fieldPathId:T,formData:O,edit:m,errors:S,errorSchema:j,schemaValidationErrors:E,schemaValidationErrorSchema:C,retrievedSchema:b,initialDefaultsGenerated:!0,registry:I}}shouldComponentUpdate(e,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return Ic(this,e,n,r)}validate(e,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,e);return s.getValidator().validateFormData(e,c,o,a,l)}renderErrors(e){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=M(s),a=q("ErrorListTemplate",e,o);return n&&n.length?h.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:e}):null}mergeErrors(e,n,r){let i=e.errorSchema,s=e.errors;if(n){const o=Dn(e,n);i=o.errorSchema,s=o.errors}if(r){const o=Dn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(e,n,r,i,s,o,a,l=!1){const c=this.validate(i,e,n,a),u=c.errors;let d=c.errorSchema;l&&(d=Ut(r,c.errorSchema,"preventDuplicates"));const m=u,g=d;return{...this.mergeErrors({errorSchema:d,errors:u},s,o),schemaValidationErrors:m,schemaValidationErrorSchema:g}}getUsedFormData=(e,n)=>k0(e,n);getFieldNames=(e,n)=>M0(e,n);omitExtraData=e=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,e)};setFieldValue=(e,n)=>{const{registry:r}=this.state,i=Array.isArray(e)?e:e.split("."),s=Be("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[de])};onChange=(e,n,r,i)=>{this.pendingChanges.push({newValue:e,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:e,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:d}=this.props,{formData:m,schemaUtils:g,schema:f,fieldPathId:p,schemaValidationErrorSchema:y,errors:v}=this.state;let{customErrors:w,errorSchema:A}=this.state;const O=p.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===O;let x=this.state.retrievedSchema,S=b?e:Ds(m);const j=V(S)&&Object.keys(S).length>0&&Object.values(S).every(P=>P===void 0),E=m==null,C=j&&E?void 0:S;if(V(S)||Array.isArray(S)){e===Wc?Ax(S,n):b||ce(S,n,e);const P=this.getStateFromProps(this.props,C,void 0,void 0,void 0,!0);S=P.formData,x=P.retrievedSchema}const _=!l&&(c===!0||c==="onChange");let I={formData:S,schema:f},T=S;if(o===!0&&(a===!0||a==="onChange")&&(T=this.omitExtraData(S),I={formData:T}),d&&(T=rn(g.getValidator(),f,g.getRootSchema(),T),I={...I,formData:T}),i){const P=b?y:D(y,n);if(!ge(P))b?A=i:ce(A,n,i);else if(w||(w=new jc),b){const F=D(i,Ee);F&&w.setErrors(F)}else ce(w.ErrorSchema,n,i)}else w&&D(w.ErrorSchema,[...n,Ee])&&w.clearErrors(n);if(_&&this.pendingChanges.length===1){const P=this.liveValidate(f,g,A,T,s,w,x);I={formData:T,...P,customErrors:w}}else if(!l&&i){const P=this.mergeErrors({errorSchema:A,errors:v},s,w);I={formData:T,...P,customErrors:w}}this.setState(I,()=>{u&&u(Yt({...this.state,...I}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return ie(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{const{formData:e,initialFormData:n=Ua,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,e??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Yt({...this.state,...o})))};onBlur=(e,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(e,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:c}=this.props,{formData:u,schemaUtils:d,schema:m}=this.state;let g=u,f={formData:g};if(i===!0&&s==="onBlur"&&(g=this.omitExtraData(u),f={formData:g}),a&&(g=rn(d.getValidator(),m,d.getRootSchema(),g),f={...f,formData:g}),o==="onBlur"){const{schema:y,schemaUtils:v,errorSchema:w,customErrors:A,retrievedSchema:O}=this.state,b=this.liveValidate(y,v,w,g,c,A,O);f={formData:g,...b,customErrors:A}}const p=Object.keys(f).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const v=D(this.state,y),w=D(f,y);return!ie(v,w)});this.setState(f,()=>{l&&p&&l(Yt({...this.state,...f}),e)})}};onFocus=(e,n)=>{const{onFocus:r}=this.props;r&&r(e,n)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.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=rn(l.getValidator(),c,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},c=r?Ls(r):[];this.setState({formData:a,errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Yt({...this.state,formData:a},"submitted"),e)})}};getGlobalFormOptions(e){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=rl,idPrefix:s=nl,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=e;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(e,n,r){const{translateString:i,uiSchema:s={}}=e,{fields:o,templates:a,widgets:l,formContext:c,translateString:u}=ES();return{fields:{...o,...e.fields},templates:{...a,...e.templates,ButtonTemplates:{...a.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...l,...e.widgets},rootSchema:n,formContext:e.formContext||c,schemaUtils:r,translateString:i||u,globalUiOptions:s[Ui],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:s[Qf]??{}}}submit=()=>{if(this.formElement.current){const e=new CustomEvent("submit",{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=e,s=Tc(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=e=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(e),{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:e,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(e===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=rn(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:e,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:c,enctype:u,acceptCharset:d,noHtml5Validate:m=!1,disabled:g,readonly:f,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:v,uiSchema:w,formData:A,errorSchema:O,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:j}=x.templates.ButtonTemplates,E=y?i:void 0,C=y||i||"form";let{[Cr]:_={}}=M(w);g&&(_={..._,props:{..._.props,disabled:!0}});const I={[vt]:{[Cr]:_}};return h.jsxs(C,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:c,encType:u,acceptCharset:d,noValidate:m,onSubmit:this.onSubmit,as:E,ref:this.formElement,children:[p==="top"&&this.renderErrors(x),h.jsx(S,{name:"",schema:v,uiSchema:w,errorSchema:O,fieldPathId:b,formData:A,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:g,readonly:f}),e||h.jsx(j,{uiSchema:I,registry:x}),p==="bottom"&&this.renderErrors(x)]})}};function _S(t){return N.forwardRef(({fields:e,widgets:n,templates:r,...i},s)=>(e={...t?.fields,...e},n={...t?.widgets,...n},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},h.jsx(CS,{...t,...i,fields:e,widgets:n,templates:r,ref:s})))}function IS(t,e="none"){return e==="all"?t:t.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=e!=="anyOf"?s?.indexOf(`/${Q}/`):void 0,a=e!=="oneOf"?s?.indexOf(`/${W}/`):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 d;return u.message===i&&((d=u.schemaPath)===null||d===void 0?void 0:d.startsWith(l))})||n.push(r),n},[])}function TS(t=[],e,n){const r=t.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:c,parentSchema:u,...d}=i;let{message:m=""}=d,g=o.replace(/\//g,"."),f=`${g} ${m}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(v=>v);if(y.length>0)y.forEach(v=>{const w=g?`${g}.${v}`:v;let A=M(D(e,w.replace(/^\./,""))).title;if(A===void 0){const O=c.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([v]);A=M(D(e,O)).title}if(A)m=m.replace(`'${v}'`,`'${A}'`),p=A;else{const O=D(u,[se,v,"title"]);O&&(m=m.replace(`'${v}'`,`'${O}'`),p=O)}}),f=m;else{const v=M(D(e,g.replace(/^\./,""))).title;if(v)f=`'${v}' ${m}`.trim(),p=v;else{const w=u?.title;w&&(f=`'${w}' ${m}`.trim(),p=w)}}return"missingProperty"in l&&(g=g?`${g}.${l.missingProperty}`:l.missingProperty),{name:a,property:g,message:m,params:l,stack:f,schemaPath:c,title:p}});return IS(r,n)}function NS(t,e,n,r,i,s,o,a){const{validationError:l}=e;let c=TS(e.errors,o,a);l&&(c=[...c,{stack:l.message}]),typeof s=="function"&&(c=s(c,o));let u=hx(c);if(l&&(u={...u,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:u};const d=mc(t,r,n,r,!0),m=i(d,Li(d),o,u),g=Nc(m);return Dn({errors:c,errorSchema:u},g)}var hr={exports:{}},Ei={},La;function PS(){return La||(La=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(E,C){return{validate:E,compare:C}}t.fullFormats={date:e(s,o),time:e(l,c),"date-time":e(d,m),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:j,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:v,int32:{type:"number",validate:O},int64:{type:"number",validate:b},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":e(/^\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,m),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},t.formatNames=Object.keys(t.fullFormats);function n(E){return E%4===0&&(E%100!==0||E%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(E){const C=r.exec(E);if(!C)return!1;const _=+C[1],I=+C[2],T=+C[3];return I>=1&&I<=12&&T>=1&&T<=(I===2&&n(_)?29:i[I])}function o(E,C){if(E&&C)return E>C?1:E<C?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(E,C){const _=a.exec(E);if(!_)return!1;const I=+_[1],T=+_[2],P=+_[3],F=_[5];return(I<=23&&T<=59&&P<=59||I===23&&T===59&&P===60)&&(!C||F!=="")}function c(E,C){if(!(E&&C))return;const _=a.exec(E),I=a.exec(C);if(_&&I)return E=_[1]+_[2]+_[3]+(_[4]||""),C=I[1]+I[2]+I[3]+(I[4]||""),E>C?1:E<C?-1:0}const u=/t|\s/i;function d(E){const C=E.split(u);return C.length===2&&s(C[0])&&l(C[1],!0)}function m(E,C){if(!(E&&C))return;const[_,I]=E.split(u),[T,P]=C.split(u),F=o(_,T);if(F!==void 0)return F||c(I,P)}const g=/\/|:/,f=/^(?:[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(E){return g.test(E)&&f.test(E)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function v(E){return y.lastIndex=0,y.test(E)}const w=-2147483648,A=2**31-1;function O(E){return Number.isInteger(E)&&E<=A&&E>=w}function b(E){return Number.isInteger(E)}function x(){return!0}const S=/[^\\]\\Z/;function j(E){if(S.test(E))return!1;try{return new RegExp(E),!0}catch{return!1}}})(Ei)),Ei}var Ci={},Ba;function FS(){return Ba||(Ba=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=$u(),n=Ga(),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}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:c,schemaCode:u,keyword:d,it:m}=a,{opts:g,self:f}=m;if(!g.validateFormats)return;const p=new e.KeywordCxt(m,f.RULES.all.format.definition,"format");p.$data?y():v();function y(){const A=l.scopeValue("formats",{ref:f.formats,code:g.code.formats}),O=l.const("fmt",n._`${A}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${O} != "object"`,n._`${O} instanceof RegExp`,n._`typeof ${O}.compare != "function"`,w(O)))}function v(){const A=p.schema,O=f.formats[A];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${d}": format "${A}" does not define "compare" function`);const b=l.scopeValue("formats",{key:A,ref:O,code:g.code.formats?n._`${g.code.formats}${n.getProperty(A)}`:void 0});a.fail$data(w(b))}function w(A){return n._`${A}.compare(${c}, ${u}) ${i[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Ci)),Ci}var qa;function $S(){return qa||(qa=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=PS(),r=FS(),i=Ga(),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[d,m]=u.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],g=u.formats||n.formatNames;return l(c,g,d,m),u.keywords&&r.default(c),c};a.get=(c,u="full")=>{const m=(u==="fast"?n.fastFormats:n.fullFormats)[c];if(!m)throw new Error(`Unknown format "${c}"`);return m};function l(c,u,d,m){var g,f;(g=(f=c.opts.code).formats)!==null&&g!==void 0||(f.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const p of u)c.addFormat(p,d[p])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(hr,hr.exports)),hr.exports}var DS=$S();const Va=rs(DS),RS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},kS=/^(#?([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*\)))$/,MS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function US(t,e,n={},r,i=Xa,s){let o=new i({...RS,...n});return r?Va(o,r):r!==!1&&Va(o),o.addFormat("data-url",MS),o.addFormat("color",kS),o.addKeyword(at),o.addKeyword(ds),Array.isArray(t)&&o.addMetaSchema(t),te(e)&&Object.keys(e).forEach(a=>{o.addFormat(a,e[a])}),s&&(o=s(o)),o}class LS{constructor(e,n){this.hasRegisteredRootSchema=!1;const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:c}=e;this.ajv=US(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(e,n){var r,i;let s,o;try{e[de]&&(o=this.ajv.getSchema(e[de])),o===void 0&&(o=this.ajv.compile(e)),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 d;!((d=l.params)===null||d===void 0)&&d[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 d;!((d=l.params)===null||d===void 0)&&d[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(e,n,r,i,s){const o=this.rawValidation(n,e);return NS(this,o,e,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){var n,r;if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;const i=(n=e[de])!==null&&n!==void 0?n:il;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(e,i):ie(e,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(e,i)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,n,r){var i;try{this.handleSchemaUpdate(r);const s=Bs(e),o=(i=s[de])!==null&&i!==void 0?i:ax(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 BS(t={},e){return new LS(t,e)}const qS=BS();const Jc=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const VS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const zS=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const za=t=>{const e=zS(t);return e.charAt(0).toUpperCase()+e.slice(1)};var _i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const WS=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},HS=N.createContext({}),GS=()=>N.useContext(HS),KS=N.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:g=""}=GS()??{},f=r??d?Number(n??u)*24/Number(e??c):n??u;return N.createElement("svg",{ref:l,..._i,width:e??c??_i.width,height:e??c??_i.height,stroke:t??m,strokeWidth:f,className:Jc("lucide",g,i),...!s&&!WS(a)&&{"aria-hidden":"true"},...a},[...o.map(([p,y])=>N.createElement(p,y)),...Array.isArray(s)?s:[s]])});const it=(t,e)=>{const n=N.forwardRef(({className:r,...i},s)=>N.createElement(KS,{ref:s,iconNode:e,className:Jc(`lucide-${VS(za(t))}`,`lucide-${t}`,r),...i}));return n.displayName=za(t),n};const YS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],JS=it("check",YS);const ZS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zc=it("chevron-down",ZS);const XS=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],QS=it("chevron-up",XS);const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],tw=it("circle-alert",ew);const nw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Xc=it("circle-plus",nw);const rw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iw=it("circle",rw);const sw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ow=it("copy",sw);const aw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lw=it("search",aw);const cw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],uw=it("trash-2",cw);const dw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qc=it("x",dw);function J(...t){return Du(Ru(t))}const fw=is("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ks({className:t,variant:e,size:n,asChild:r=!1,...i}){const s=r?Ka:"button";return h.jsx(s,{"data-slot":"button",className:J(fw({variant:e,size:n,className:t})),...i})}function hw({uiSchema:t,registry:e,className:n,...r}){const{translateString:i}=e;return h.jsx("div",{className:"p-0 m-0",children:h.jsxs(Ks,{...r,className:J("w-fit gap-2",n),variant:"outline",type:"button",children:[h.jsx(Xc,{size:16})," ",i(K.AddItemButton)]})})}function mw(t){const{children:e,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:o,registry:a}=t,l=M(o),c=q("ArrayFieldItemButtonsTemplate",a,l),u=i?-6:22;return h.jsx("div",{children:h.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[h.jsx("div",{className:"grow shrink",children:e}),h.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&h.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${u}px`:void 0},children:h.jsx(c,{...n})})})]})})}function pw(t){const{canAdd:e,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:o,onAddClick:a,readonly:l,registry:c,required:u,schema:d,title:m}=t,g=M(i),f=q("ArrayFieldDescriptionTemplate",c,g),p=q("ArrayFieldTitleTemplate",c,g),y=!l&&!n,{ButtonTemplates:{AddButton:v}}=c.templates;return h.jsx("div",{children:h.jsx("div",{className:"m-0 flex p-0",children:h.jsxs("div",{className:"m-0 w-full p-0",children:[h.jsx(p,{fieldPathId:r,title:g.title||m,schema:d,uiSchema:i,required:u,registry:c,optionalDataControl:y?o:void 0}),h.jsx(f,{fieldPathId:r,description:g.description||d.description,schema:d,uiSchema:i,registry:c}),h.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[y?void 0:o,s,e&&h.jsx("div",{className:"mt-2 flex justify-end",children:h.jsx(v,{id:Qe(r,"add"),className:"rjsf-array-item-add",onClick:a,disabled:n||l,uiSchema:i,registry:c})})]},`array-item-list-${r.$id}`)]})})})}function eu({className:t,type:e,...n}){return h.jsx("input",{type:e,"data-slot":"input",className:J("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}function gw({id:t,htmlName:e,placeholder:n,required:r,readonly:i,disabled:s,type:o,value:a,onChange:l,onChangeOverride:c,onBlur:u,onFocus:d,autofocus:m,options:g,schema:f,rawErrors:p=[],children:y,extraProps:v,className:w,registry:A}){const{ClearButton:O}=A.templates.ButtonTemplates,b={...v,...Ac(f,o,g)},x=({target:{value:C}})=>l(C===""?g.emptyValue:C),S=({target:C})=>u(t,C&&C.value),j=({target:C})=>d(t,C&&C.value),E=N.useCallback(C=>{var _;C.preventDefault(),C.stopPropagation(),l((_=g.emptyValue)!==null&&_!==void 0?_:"")},[l,g.emptyValue]);return h.jsxs("div",{className:"p-0.5",children:[h.jsx(eu,{id:t,name:e||t,type:o,placeholder:n,autoFocus:m,required:r,disabled:s,readOnly:i,className:J({"border-destructive focus-visible:ring-0":p.length>0},w),list:f.examples?Kr(t):void 0,...b,value:a||a===0?a:"",onChange:c||x,onBlur:S,onFocus:j,"aria-describedby":Fe(t,!!f.examples)}),g.allowClearTextInputs&&!i&&!s&&a&&h.jsx(O,{onClick:E,registry:A}),y,h.jsx(Hc,{id:t,schema:f})]})}function yw({id:t,description:e,registry:n,uiSchema:r}){return e?h.jsx("div",{children:h.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:h.jsx(Hs,{description:e,registry:n,uiSchema:r})})}):null}const bw=is("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function xw({className:t,variant:e,...n}){return h.jsx("div",{"data-slot":"alert",role:"alert",className:J(bw({variant:e}),t),...n})}function vw({className:t,...e}){return h.jsx("div",{"data-slot":"alert-title",className:J("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Sw({className:t,...e}){return h.jsx("div",{"data-slot":"alert-description",className:J("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function ww({errors:t,registry:e}){const{translateString:n}=e;return h.jsxs(xw,{variant:"destructive",className:"mb-2",children:[h.jsx(tw,{className:"h-4 w-4"}),h.jsx(vw,{children:n(K.ErrorsLabel)}),h.jsx(Sw,{className:"flex flex-col gap-1",children:t.map((r,i)=>h.jsxs("span",{children:["• ",r.stack]},i))})]})}function jw(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=ks(n);return h.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((i,s)=>h.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function Ow(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i,hasErrors:s}=t;return n?h.jsx("span",{className:J("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:Ms(e),children:h.jsx(Gs,{help:n,registry:i,uiSchema:r})}):null}function Aw({id:t,children:e,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:o,rawDescription:a,classNames:l,style:c,disabled:u,label:d,hidden:m,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,readonly:y,required:v,schema:w,uiSchema:A,registry:O}){const b=M(A),x=q("WrapIfAdditionalTemplate",O,b);if(m)return h.jsx("div",{className:"hidden",children:e});const S=b.widget==="checkbox";return h.jsx(x,{classNames:l,style:c,disabled:u,id:t,label:d,displayLabel:n,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,rawDescription:a,readonly:y,required:v,schema:w,uiSchema:A,registry:O,children:h.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!S&&h.jsxs("label",{className:J("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[d,v?"*":null]}),e,n&&a&&!S&&h.jsx("span",{className:J("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:o}),i,s]})})}function Ew(t){const{children:e,column:n,className:r,...i}=t;return h.jsx("div",{className:J("grid gap-2",r),...i,children:e})}function Cw(t){const{icon:e,iconType:n,className:r,uiSchema:i,registry:s,...o}=t;return h.jsx(Ks,{size:"icon",variant:"outline",className:r,...o,type:"button",children:e})}const Sn=N.memo(Cw);function _w(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.CopyButton),...t,icon:h.jsx(ow,{className:"h-4 w-4"})})}const Iw=N.memo(_w);function Tw(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.MoveDownButton),...t,icon:h.jsx(Zc,{className:"h-4 w-4"})})}const Nw=N.memo(Tw);function Pw(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.MoveUpButton),...t,icon:h.jsx(QS,{className:"h-4 w-4"})})}const Fw=N.memo(Pw);function $w(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.RemoveButton),...t,className:"border-destructive",icon:h.jsx(uw,{className:"h-4 w-4 stroke-destructive"})})}const tu=N.memo($w);function Dw(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.ClearButton),...t,icon:h.jsx(Qc,{})})}const Rw=N.memo(Dw);function kw({selector:t,optionSchemaField:e}){return h.jsxs("div",{className:J("p-4 border rounded-md bg-background shadow-sm"),children:[h.jsx("div",{className:J("mb-4"),children:t}),e]})}function Mw({description:t,title:e,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:o,formData:a,optionalDataControl:l,onAddProperty:c,disabled:u,readonly:d,registry:m}){const g=M(i),f=q("TitleFieldTemplate",m,g),p=q("DescriptionFieldTemplate",m,g),y=!d&&!u,{ButtonTemplates:{AddButton:v}}=m.templates;return h.jsxs(h.Fragment,{children:[e&&h.jsx(f,{id:Yr(s),title:e,required:r,schema:o,uiSchema:i,registry:m,optionalDataControl:y?l:void 0}),t&&h.jsx(p,{id:Gt(s),description:t,schema:o,uiSchema:i,registry:m}),h.jsxs("div",{className:"flex flex-col gap-2",children:[y?void 0:l,n.map(w=>h.jsx("div",{className:`${w.hidden?"hidden":""} flex`,children:h.jsx("div",{className:"w-full",children:w.content})},w.name)),sl(o,i,a)?h.jsx("div",{className:"mt-2 flex justify-end",children:h.jsx(v,{id:Qe(s,"add"),onClick:c,disabled:u||d,className:"rjsf-object-property-expand",uiSchema:i,registry:m})}):null]})]})}function Uw(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?h.jsx(Sn,{id:e,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:h.jsx(Xc,{}),size:"xs"}):s?h.jsx(tu,{id:e,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):h.jsx("em",{id:e,children:r})}function Lw(t){const{submitText:e,norender:n,props:r}=Ec(t.uiSchema);return n?null:h.jsx("div",{children:h.jsx(Ks,{type:"submit",...r,className:J("my-2",r?.className),children:e})})}function nu({className:t,orientation:e="horizontal",decorative:n=!0,...r}){return h.jsx(ku,{"data-slot":"separator",decorative:n,orientation:e,className:J("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Bw({id:t,title:e,uiSchema:n,optionalDataControl:r}){const i=M(n);let s=h.jsx("h5",{children:i.title||e});return r&&(s=h.jsxs("div",{className:"flex flex-row",children:[h.jsx("div",{className:"flex-grow",children:s}),h.jsx("div",{className:"flex",children:r})]})),h.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[s,h.jsx(nu,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function qw({classNames:t,style:e,children:n,disabled:r,id:i,label:s,displayLabel:o,onRemoveProperty:a,onKeyRenameBlur:l,rawDescription:c,readonly:u,required:d,schema:m,uiSchema:g,registry:f}){const{templates:p,translateString:y}=f,{RemoveButton:v}=p.ButtonTemplates,w=y(K.KeyLabel,[s]);if(!(at in m))return h.jsx("div",{className:t,style:e,children:n});const b=o?22+(c?-28:0):0,x=`${i}-key`;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[h.jsx("div",{className:"grid gap-2 col-span-5",children:h.jsxs("div",{className:"flex flex-col gap-2",children:[o&&h.jsx("label",{htmlFor:x,className:"text-sm font-medium text-muted-foreground leading-none",children:w}),h.jsx("div",{className:"pl-0.5",children:h.jsx(eu,{required:d,defaultValue:s,disabled:r||u,id:x,name:x,onBlur:u?void 0:l,type:"text",className:"w-full border shadow-sm"},s)}),!!c&&h.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),h.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),h.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${b}px`},children:h.jsx(v,{id:Qe(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||u,onClick:a,uiSchema:g,registry:f})})]}),h.jsx(nu,{dir:"horizontal",className:"mt-2"})]})}function Vw(){return{ArrayFieldItemTemplate:mw,ArrayFieldTemplate:pw,BaseInputTemplate:gw,ButtonTemplates:{AddButton:hw,CopyButton:Iw,MoveDownButton:Nw,MoveUpButton:Fw,RemoveButton:tu,SubmitButton:Lw,ClearButton:Rw},DescriptionFieldTemplate:yw,ErrorListTemplate:ww,FieldErrorTemplate:jw,FieldHelpTemplate:Ow,FieldTemplate:Aw,GridTemplate:Ew,MultiSchemaFieldTemplate:kw,ObjectFieldTemplate:Mw,OptionalDataControlsTemplate:Uw,TitleFieldTemplate:Bw,WrapIfAdditionalTemplate:qw}}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Ww=["color"],Hw=N.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=zw(t,Ww);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),N.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function ru({className:t,...e}){return h.jsx(Mu,{"data-slot":"checkbox",className:J("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:h.jsx(Uu,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:h.jsx(Hw,{className:"size-3.5"})})})}function Ys({className:t,...e}){return h.jsx(Lu,{"data-slot":"label",className:J("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function Gw({id:t,htmlName:e,disabled:n,options:r,value:i,autofocus:s,readonly:o,required:a,onChange:l,onBlur:c,onFocus:u,className:d}){const{enumOptions:m,enumDisabled:g,inline:f,emptyValue:p}=r,y=xn(r),v=Array.isArray(i)?i:[i],w=({target:O})=>c(t,Te(O&&O.value,m,y,p)),A=({target:O})=>u(t,Te(O&&O.value,m,y,p));return h.jsx("div",{className:J({"flex flex-col gap-2":!f,"flex flex-row gap-4 flex-wrap":f}),children:Array.isArray(m)&&m.map((O,b)=>{const x=sr(O.value,v),S=Array.isArray(g)&&g.includes(O.value),j=$t(t,b);return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ru,{id:j,name:e||t,required:a,disabled:n||S||o,onCheckedChange:E=>{l(E?wc(b,v,m):vc(b,v,m))},className:d,checked:x,autoFocus:s&&b===0,onBlur:w,onFocus:A,"aria-describedby":Fe(t)}),h.jsx(Ys,{className:"leading-tight",htmlFor:$t(t,b),children:O.label})]},j)})})}function Kw(t){const{id:e,htmlName:n,value:r,disabled:i,readonly:s,label:o,hideLabel:a,schema:l,autofocus:c,options:u,onChange:d,onBlur:m,onFocus:g,registry:f,uiSchema:p,className:y}=t,v=qn(l),w=q("DescriptionFieldTemplate",f,u),A=S=>d(S),O=()=>m(e,r),b=()=>g(e,r),x=u.description||l.description;return h.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":Fe(e),children:[!a&&x&&h.jsx(w,{id:Gt(e),description:x,schema:l,uiSchema:p,registry:f}),h.jsxs("div",{className:"flex items-center gap-2 my-2",children:[h.jsx(ru,{id:e,name:n||e,checked:typeof r>"u"?!1:!!r,required:v,disabled:i||s,autoFocus:c,onCheckedChange:A,onBlur:O,onFocus:b,className:y}),h.jsx(Ys,{className:"leading-tight",htmlFor:e,children:_c(o,a||!o)})]})]})}var Js="Radio",[Yw,iu]=Ja(Js),[Jw,Zw]=Yw(Js),su=N.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,form:c,...u}=t,[d,m]=N.useState(null),g=ss(e,y=>m(y)),f=N.useRef(!1),p=d?c||!!d.closest("form"):!0;return h.jsxs(Jw,{scope:n,checked:i,disabled:o,children:[h.jsx($r.button,{type:"button",role:"radio","aria-checked":i,"data-state":cu(i),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:g,onClick:Ii(t.onClick,y=>{i||l?.(),p&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})}),p&&h.jsx(lu,{control:d,bubbles:!f.current,name:r,value:a,checked:i,required:s,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});su.displayName=Js;var ou="RadioIndicator",au=N.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,s=Zw(ou,n);return h.jsx(Wu,{present:r||s.checked,children:h.jsx($r.span,{"data-state":cu(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e})})});au.displayName=ou;var Xw="RadioBubbleInput",lu=N.forwardRef(({__scopeRadio:t,control:e,checked:n,bubbles:r=!0,...i},s)=>{const o=N.useRef(null),a=ss(o,s),l=Hu(n),c=Gu(e);return N.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&g){const f=new Event("click",{bubbles:r});g.call(u,n),u.dispatchEvent(f)}},[l,n,r]),h.jsx($r.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});lu.displayName=Xw;function cu(t){return t?"checked":"unchecked"}var Qw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xr="RadioGroup",[ej]=Ja(Xr,[Ya,iu]),uu=Ya(),du=iu(),[tj,nj]=ej(Xr),fu=N.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...m}=t,g=uu(n),f=Bu(c),[p,y]=qu({prop:s,defaultProp:i??null,onChange:d,caller:Xr});return h.jsx(tj,{scope:n,name:r,required:o,disabled:a,value:p,onValueChange:y,children:h.jsx(Vu,{asChild:!0,...g,orientation:l,dir:f,loop:u,children:h.jsx($r.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:f,...m,ref:e})})})});fu.displayName=Xr;var hu="RadioGroupItem",mu=N.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,s=nj(hu,n),o=s.disabled||r,a=uu(n),l=du(n),c=N.useRef(null),u=ss(e,c),d=s.value===i.value,m=N.useRef(!1);return N.useEffect(()=>{const g=p=>{Qw.includes(p.key)&&(m.current=!0)},f=()=>m.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",f),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",f)}},[]),h.jsx(zu,{asChild:!0,...a,focusable:!o,active:d,children:h.jsx(su,{disabled:o,required:s.required,checked:d,...l,...i,name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ii(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Ii(i.onFocus,()=>{m.current&&c.current?.click()})})})});mu.displayName=hu;var rj="RadioGroupIndicator",pu=N.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=du(n);return h.jsx(au,{...i,...r,ref:e})});pu.displayName=rj;var ij=fu,sj=mu,oj=pu;function aj({className:t,...e}){return h.jsx(ij,{"data-slot":"radio-group",className:J("grid gap-3",t),...e})}function lj({className:t,...e}){return h.jsx(sj,{"data-slot":"radio-group-item",className:J("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:h.jsx(oj,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:h.jsx(iw,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function cj({id:t,options:e,value:n,required:r,disabled:i,readonly:s,onChange:o,onBlur:a,onFocus:l,className:c}){const{enumOptions:u,enumDisabled:d,emptyValue:m}=e,g=xn(e),f=w=>o(Te(w,u,g,m)),p=({target:w})=>a(t,Te(w&&w.value,u,g,m)),y=({target:w})=>l(t,Te(w&&w.value,u,g,m)),v=!!(e&&e.inline);return h.jsx("div",{className:"mb-0",children:h.jsx(aj,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:w=>{f(w)},onBlur:p,onFocus:y,"aria-describedby":Fe(t),orientation:v?"horizontal":"vertical",className:J("flex flex-wrap",{"flex-col":!v},c),children:Array.isArray(u)&&u.map((w,A)=>{const O=Array.isArray(d)&&d.includes(w.value),b=sr(w.value,n);return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(lj,{checked:b,value:or(w.value,A,g),id:$t(t,A),disabled:O}),h.jsx(Ys,{className:"leading-tight",htmlFor:$t(t,A),children:w.label})]},$t(t,A))})})})}function uj({className:t,defaultValue:e,value:n,min:r=0,max:i=100,...s}){const o=N.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,i],[n,e,r,i]);return h.jsxs(vd,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:i,className:J("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...s,children:[h.jsx(Sd,{"data-slot":"slider-track",className:J("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:h.jsx(wd,{"data-slot":"slider-range",className:J("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(a,l)=>h.jsx(jd,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}const dj=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function fj({value:t,readonly:e,disabled:n,options:r,schema:i,onChange:s,label:o,id:a}){const l=d=>s(d[0]),c={...Oc(i)},u={id:a,...$s(r.props||{},dj)};return h.jsxs(h.Fragment,{children:[h.jsx(uj,{disabled:n||e,min:c.min,max:c.max,step:c.step,value:[t],onValueChange:l,...u,"aria-describedby":Fe(a)}),t]})}const hj=is("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function mj({className:t,variant:e,asChild:n=!1,...r}){const i=n?Ka:"span";return h.jsx(i,{"data-slot":"badge",className:J(hj({variant:e}),t),...r})}const gu=N.forwardRef(({className:t,...e},n)=>h.jsx(Bt,{ref:n,"data-slot":"command",className:J("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),pj=N.forwardRef(({className:t,...e},n)=>h.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[h.jsx(lw,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),h.jsx(Bt.Input,{ref:n,className:J("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));pj.displayName=Bt.Input.displayName;function yu({className:t,...e}){return h.jsx(Bt.List,{"data-slot":"command-list",className:J("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function bu({className:t,...e}){return h.jsx(Bt.Group,{"data-slot":"command-group",className:J("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function xu({className:t,...e}){return h.jsx(Bt.Item,{"data-slot":"command-item",className:J("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function gj({multiple:t,items:e=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:o,ariaPlaceholder:a,onFocus:l,onBlur:c,className:u,id:d}){const m=N.useRef(null),[g,f]=N.useState(!1),[p,y]=N.useState(""),v=N.useMemo(()=>e.filter(S=>n.some(j=>wr(S.value,j))),[e,n]),w=N.useMemo(()=>e.filter(S=>!v.some(j=>wr(j.value,S.value))),[e,v]),A=N.useCallback(S=>{if(s)return;const j=v.filter(E=>!wr(E.value,S.value));r?.(j.map(E=>E.index))},[v,r,s]),O=N.useCallback(S=>{if(!(s||!m.current||m.current.value!==""))if(S.key==="Delete"||S.key==="Backspace"){const j=v.slice(0,-1);r?.(j.map(E=>E.index))}else S.key==="Escape"&&m.current.blur()},[v,r,s]),b=N.useCallback(S=>{if(s)return;y("");const j=t?[...v,S]:[S];r?.(j.map(E=>E.index))},[t,v,r,s]),x=N.useCallback(S=>{s||f(!0),l?.(S)},[s,l]);return h.jsxs(gu,{onKeyDown:O,className:J("overflow-visible bg-transparent",u),autoFocus:i,"aria-disabled":s,onBlur:c,onFocus:x,"aria-describedby":o,"aria-placeholder":a,children:[h.jsx("div",{className:J("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:h.jsxs("div",{className:"flex gap-1 flex-wrap",children:[v.map(S=>h.jsxs(mj,{variant:"secondary",children:[S.label,h.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:j=>j.key==="Enter"&&!s&&A(S),onMouseDown:j=>{j.preventDefault(),j.stopPropagation()},onClick:()=>A(S),disabled:s,children:h.jsx(Qc,{className:J("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},S.value)),h.jsx(Bt.Input,{ref:m,value:p,onValueChange:y,onBlur:()=>f(!1),onFocus:()=>!s&&f(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),g&&!s&&w.length>0&&h.jsx("div",{className:"relative mt-2",children:h.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:h.jsx(bu,{className:"h-full overflow-auto",children:h.jsx(yu,{children:w.map(S=>h.jsx(xu,{disabled:S.disabled,onMouseDown:j=>{j.preventDefault(),j.stopPropagation()},"aria-controls":`${S.value}-command-item`,"aria-labelledby":`${S.value}-command-item`,id:`${S.value}-command-item`,onSelect:()=>b(S),className:"cursor-pointer",children:S.label},`${S.value}-command-item`))})})})})]})}function yj({items:t,selected:e,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:o="Select...",ariaDescribedby:a,ariaPlaceholder:l,onFocus:c,onBlur:u,className:d}){const[m,g]=N.useState(!1),f=t?.find(w=>w.value===e),p=N.useRef(null),y=N.useRef(null);N.useEffect(()=>{m&&p.current&&requestAnimationFrame(()=>{var w;(w=p.current)===null||w===void 0||w.scrollIntoView({block:"nearest"})})},[m]);const v=w=>{y.current&&!y.current.contains(w.relatedTarget)&&g(!1),u?.(w)};return h.jsxs(gu,{ref:y,className:J("overflow-visible bg-transparent",d),autoFocus:r,"aria-disabled":i,onBlur:v,onFocus:c,"aria-describedby":a,"aria-placeholder":l,children:[h.jsxs("div",{role:"button",tabIndex:i?-1:0,onClick:()=>!i&&g(!m),onKeyDown:w=>(w.key==="Enter"||w.key===" ")&&!i&&g(!m),className:J("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!f&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",d),children:[h.jsx("span",{className:J("flex-1 line-clamp-1",!f&&"text-muted-foreground"),children:f?.label||o}),h.jsx(Zc,{className:"h-4 w-4 opacity-50"})]}),h.jsx("div",{className:"relative",children:m&&t&&t.length>0?h.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:h.jsx(bu,{className:"h-full overflow-auto",children:h.jsx(yu,{children:t.map(w=>h.jsxs(xu,{ref:w.value===e?p:void 0,onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},onSelect:()=>{w.disabled||(n?.(w.value),g(!1))},className:J("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",w.value===e&&"font-semibold",w.disabled&&"opacity-50 cursor-not-allowed"),children:[h.jsx("span",{children:w.label}),h.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:w.value===e&&h.jsx(JS,{className:"h-4 w-4"})})]},w.value))})})}):null})]})}function bj({id:t,options:e,required:n,disabled:r,readonly:i,value:s,multiple:o,autofocus:a,onChange:l,onBlur:c,onFocus:u,placeholder:d,rawErrors:m=[],className:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=e,v=xn(e),w=()=>{u(t,Te(s,f,v,y))},A=()=>{c(t,Te(s,f,v,y))},O=f?.map(({value:x,label:S},j)=>({value:o?x:or(x,j,v),label:S,index:j,disabled:Array.isArray(p)&&p.includes(x)})),b=J({"border-destructive":m.length>0},g);return h.jsx("div",{className:"p-0.5",children:o?h.jsx(gj,{id:t,autoFocus:a,disabled:r||i,multiple:!0,className:b,items:O,selected:s,onValueChange:x=>{l(Te(x.map(String),f,v,y))},onFocus:w,onBlur:A}):h.jsx(yj,{items:O,selected:Sc(s,f,!1,v,""),onValueChange:x=>{l(Te(x,f,v,y))},autoFocus:a,disabled:r||i,required:n,placeholder:d,className:b,onFocus:w,onBlur:A,ariaDescribedby:Fe(t)})})}function xj({className:t,...e}){return h.jsx("textarea",{"data-slot":"textarea",className:J("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function vj({id:t,htmlName:e,placeholder:n,value:r,required:i,disabled:s,autofocus:o,readonly:a,onBlur:l,onFocus:c,onChange:u,options:d,className:m}){const g=({target:{value:y}})=>u(y===""?d.emptyValue:y),f=({target:y})=>l(t,y&&y.value),p=({target:y})=>c(t,y&&y.value);return h.jsx("div",{className:"flex p-0.5",children:h.jsx(xj,{id:t,name:e||t,placeholder:n,disabled:s,readOnly:a,value:r??"",required:i,autoFocus:o,rows:d.rows||5,onChange:g,onBlur:f,onFocus:p,"aria-describedby":Fe(t),className:m})})}function Sj(){return{CheckboxWidget:Kw,CheckboxesWidget:Gw,RadioWidget:cj,RangeWidget:fj,SelectWidget:bj,TextareaWidget:vj}}function wj(){return{templates:Vw(),widgets:Sj()}}function jj(){return _S(wj())}const Oj=jj();function Aj(t){const e=je.c(21),{virtualMcp:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=os("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",i),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==n.icon||e[3]!==n.title?(o=h.jsx(Qa,{icon:n.icon,name:n.title,size:"sm"}),e[2]=n.icon,e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n.title?(a=h.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[5]=n.title,e[6]=a):a=e[6];let l;e[7]!==r?(l=r&&h.jsx(Ju,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=l):l=e[8];let c;e[9]!==a||e[10]!==l?(c=h.jsxs("div",{className:"flex items-center justify-between",children:[a,l]}),e[9]=a,e[10]=l,e[11]=c):c=e[11];let u;e[12]!==n.description?(u=n.description&&h.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[12]=n.description,e[13]=u):u=e[13];let d;e[14]!==c||e[15]!==u?(d=h.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[c,u]}),e[14]=c,e[15]=u,e[16]=d):d=e[16];let m;return e[17]!==s||e[18]!==o||e[19]!==d?(m=h.jsxs("div",{className:s,children:[o,d]}),e[17]=s,e[18]=o,e[19]=d,e[20]=m):m=e[20],m}function Ej(){const t=je.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(as,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Cj(t){const e=je.c(40),{selectedVirtualMcpId:n,onVirtualMcpChange:r,searchInputRef:i}=t,s=nt(),o=Nd(),[a,l]=N.useState(""),c=N.useRef(null),u=i??c;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={navigateOnCreate:!0},e[0]=d):d=e[0];const{createVirtualMCP:m,isCreating:g}=$d(d);let f,p,y,v;if(e[1]!==m||e[2]!==u||e[3]!==g||e[4]!==r||e[5]!==a||e[6]!==n||e[7]!==s||e[8]!==o){let O;e:{const P=o.filter(_j);if(!a.trim()){O=P;break e}const F=a.toLowerCase();O=P.filter($=>$.title.toLowerCase().includes(F)||$.description?.toLowerCase().includes(F))}const b=O;let x;e[13]!==r?(x=P=>{r(P),l("")},e[13]=r,e[14]=x):x=e[14];const S=x;y="flex flex-col max-h-[min(400px,60dvh)]";let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=h.jsx(Pd,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[15]=j):j=e[15];let E;e[16]!==s?(E=s("chat.selectVirtualMcp.searchPlaceholder"),e[16]=s,e[17]=E):E=e[17];let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=P=>l(P.target.value),e[18]=C):C=e[18];let _;e[19]!==u||e[20]!==a||e[21]!==E?(_=h.jsx(Zu,{ref:u,type:"text",placeholder:E,value:a,onChange:C,className:"flex-1 h-8 text-sm border-0 shadow-none p-0"}),e[19]=u,e[20]=a,e[21]=E,e[22]=_):_=e[22];let I;e[23]!==g||e[24]!==s?(I=s(g?"chat.selectVirtualMcp.creating":"chat.selectVirtualMcp.createAgent"),e[23]=g,e[24]=s,e[25]=I):I=e[25];let T;e[26]!==m||e[27]!==g||e[28]!==I?(T=h.jsx(Dr,{onClick:m,variant:"outline",className:"shrink-0",disabled:g,children:I}),e[26]=m,e[27]=g,e[28]=I,e[29]=T):T=e[29],e[30]!==_||e[31]!==T?(v=h.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:h.jsxs("div",{className:"relative flex items-center gap-2",children:[j,_,T]})}),e[30]=_,e[31]=T,e[32]=v):v=e[32],f="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",p=b.length>0?h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:b.map(P=>h.jsx("div",{role:"button",tabIndex:0,onClick:()=>S(P.id),onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),S(P.id))},className:"focus-ring rounded-xl",children:h.jsx(Aj,{virtualMcp:P,isSelected:P.id===n})},P.id))}):h.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:s("chat.selectVirtualMcp.noAgentsFound")}),e[1]=m,e[2]=u,e[3]=g,e[4]=r,e[5]=a,e[6]=n,e[7]=s,e[8]=o,e[9]=f,e[10]=p,e[11]=y,e[12]=v}else f=e[9],p=e[10],y=e[11],v=e[12];let w;e[33]!==f||e[34]!==p?(w=h.jsx("div",{className:f,children:p}),e[33]=f,e[34]=p,e[35]=w):w=e[35];let A;return e[36]!==y||e[37]!==v||e[38]!==w?(A=h.jsxs("div",{className:y,children:[v,w]}),e[36]=y,e[37]=v,e[38]=w,e[39]=A):A=e[39],A}function _j(t){return!t.id||!Yu(t.id)}function Ij(t){const e=je.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=h.jsx(Ej,{}),e[0]=n):n=e[0];let r;return e[1]!==t?(r=h.jsx(N.Suspense,{fallback:n,children:h.jsx(Cj,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function Tj(t){const e=je.c(35),{selectedVirtualMcpId:n,selectedVirtualMcp:r,onVirtualMcpChange:i,className:s,showTooltip:o,disabled:a}=t,l=o===void 0?!0:o,c=a===void 0?!1:a,u=nt(),[d,m]=N.useState(!1),g=N.useRef(null);let f;e[0]!==i?(f=$=>{i($),m(!1)},e[0]=i,e[1]=f):f=e[1];const p=f,y=Fd();let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=$=>{m($)},e[2]=v):v=e[2];const w=v;let A,O;e[3]!==y||e[4]!==d?(A=()=>{d&&!y&&setTimeout(()=>{g.current?.focus()},0)},O=[d,y],e[3]=y,e[4]=d,e[5]=A,e[6]=O):(A=e[5],O=e[6]),N.useEffect(A,O);const b=c?!1:d,x=c?void 0:w,S=c?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let j;e[7]!==s||e[8]!==S?(j=os("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",S,s),e[7]=s,e[8]=S,e[9]=j):j=e[9];let E;e[10]!==u?(E=u("chat.selectVirtualMcp.selectAgent"),e[10]=u,e[11]=E):E=e[11];let C;e[12]!==r?(C=r?h.jsx(Qa,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):h.jsxs(h.Fragment,{children:[h.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[h.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),h.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),h.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),h.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),h.jsx(Ku,{size:16})]}),e[12]=r,e[13]=C):C=e[13];let _;e[14]!==c||e[15]!==j||e[16]!==E||e[17]!==C?(_=h.jsx(_d,{asChild:!0,children:h.jsx(Od,{asChild:!0,children:h.jsx("button",{type:"button",disabled:c,className:j,"aria-label":E,children:C})})}),e[14]=c,e[15]=j,e[16]=E,e[17]=C,e[18]=_):_=e[18];let I;e[19]!==d||e[20]!==r?.title||e[21]!==l||e[22]!==u?(I=l&&!d&&h.jsx(Cd,{side:"top",className:"text-xs",children:r?.title??u("chat.selectVirtualMcp.chooseAgentTooltip")}),e[19]=d,e[20]=r?.title,e[21]=l,e[22]=u,e[23]=I):I=e[23];let T;e[24]!==_||e[25]!==I?(T=h.jsx(Id,{children:h.jsxs(Td,{children:[_,I]})}),e[24]=_,e[25]=I,e[26]=T):T=e[26];let P;e[27]!==p||e[28]!==n?(P=h.jsx(Ad,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:h.jsx(Ij,{selectedVirtualMcpId:n,onVirtualMcpChange:p,searchInputRef:g})}),e[27]=p,e[28]=n,e[29]=P):P=e[29];let F;return e[30]!==T||e[31]!==P||e[32]!==b||e[33]!==x?(F=h.jsxs(Ed,{open:b,onOpenChange:x,children:[T,P]}),e[30]=T,e[31]=P,e[32]=b,e[33]=x,e[34]=F):F=e[34],F}function Nj(t){const e=t.properties;if(!e)return!1;const n=e.__type,r=e.__binding;return!!(n?.const||r?.const)}function Pj(t){const e=t.properties;if(!e)return{};const n=e.__type,r=e.__binding;return{bindingType:n?.const,bindingSchema:r?.const}}function Fj(t){const e=je.c(10),{bindingSchema:n,bindingType:r,currentValue:i,onValueChange:s,placeholder:o,onAddNew:a,className:l}=t;let c;e[0]!==r?(c=Wf(r),e[0]=r,e[1]=c):c=e[1];const d=c??(typeof n=="string"?n:n??void 0);let m;return e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==a||e[6]!==s||e[7]!==o||e[8]!==d?(m=h.jsx($j,{value:i,onValueChange:s,placeholder:o,binding:d,bindingType:r,onAddNew:a,className:l}),e[2]=r,e[3]=l,e[4]=i,e[5]=a,e[6]=s,e[7]=o,e[8]=d,e[9]=m):m=e[9],m}function $j({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:s,className:o}){const a=nt(),[l,c]=N.useState(!1),{installByBinding:u,isInstalling:d}=Hf(),m=l||d,g=r?void 0:i||void 0,f=dd(r?{binding:r}:g?{filters:[{column:"app_name",value:g}]}:{}),p=fd(t&&!f.some(A=>A.id===t)?t:void 0),y=p?[p,...f]:f,v=i?.startsWith("@"),w=async()=>{if(v&&i){c(!0);try{const A=await u(i);A&&e(A.id)}catch(A){const O=A instanceof Error?A.message:String(A);mr.error(a("details.mcpConfigurationForm.failedToConnectMcp",{message:O}))}finally{c(!1)}return}s?.()};return h.jsxs(pd,{value:t,onValueChange:e,children:[h.jsx(gd,{size:"sm",className:os("w-[200px]",o),children:h.jsx(yd,{placeholder:n})}),h.jsxs(bd,{children:[y.length===0?h.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:a("details.mcpConfigurationForm.noConnectionsFound")}):y.map(A=>h.jsx(xd,{value:A.id,children:h.jsxs("div",{className:"flex items-center gap-2",children:[A.icon?h.jsx("img",{src:A.icon,alt:A.title,className:"w-4 h-4 rounded"}):h.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:A.title.slice(0,1).toUpperCase()}),h.jsx("span",{children:A.title})]})},A.id)),(s||v)&&h.jsx("div",{className:"border-t border-border",children:h.jsx(Dr,{onClick:A=>{A.preventDefault(),A.stopPropagation(),w()},disabled:m,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-accent text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:m?h.jsxs(h.Fragment,{children:[h.jsx(as,{className:"size-4"}),h.jsx("span",{children:a("details.mcpConfigurationForm.connecting")})]}):h.jsxs(h.Fragment,{children:[h.jsx(md,{size:16}),h.jsx("span",{children:a("details.mcpConfigurationForm.customConnection")})]})})})]})]})}function Dj(t){const e=je.c(54),n=nt(),{schema:r,formData:i,title:s,description:o,registry:a}=t,l=a.formContext,c=s||"",u=s||"";if(Nj(r)){const g=r;let f;e[0]!==g?(f=Pj(g),e[0]=g,e[1]=f):f=e[1];const{bindingType:p,bindingSchema:y}=f,w=(l?.formData?.[c]?.value??i?.value)||"";let A;e[2]!==p||e[3]!==c||e[4]!==l||e[5]!==i?(A=F=>{const $={...i,value:F??"",...p&&{__type:p}};l?.onFieldChange(c,$)},e[2]=p,e[3]=c,e[4]=l,e[5]=i,e[6]=A):A=e[6];const O=A,b=kj;let x;e[7]!==u||e[8]!==c||e[9]!==s?(x=b(s||u||c),e[7]=u,e[8]=c,e[9]=s,e[10]=x):x=e[10];const S=x;if(p==="@deco/agent"){let F;e[11]!==S?(F=h.jsx("label",{className:"text-sm font-medium truncate block",children:S}),e[11]=S,e[12]=F):F=e[12];let $;e[13]!==o?($=o&&h.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[13]=o,e[14]=$):$=e[14];let R;e[15]!==F||e[16]!==$?(R=h.jsxs("div",{className:"flex-1 min-w-0",children:[F,$]}),e[15]=F,e[16]=$,e[17]=R):R=e[17];const B=w||void 0;let U;e[18]!==S||e[19]!==n?(U=n("details.mcpConfigurationForm.selectPlaceholder",{title:S.toLowerCase()}),e[18]=S,e[19]=n,e[20]=U):U=e[20];let Y;e[21]!==O||e[22]!==B||e[23]!==U?(Y=h.jsx(Tj,{selectedVirtualMcpId:B,onVirtualMcpChange:O,variant:"bordered",placeholder:U,className:"w-[200px] shrink-0"}),e[21]=O,e[22]=B,e[23]=U,e[24]=Y):Y=e[24];let ne;return e[25]!==R||e[26]!==Y?(ne=h.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[R,Y]}),e[25]=R,e[26]=Y,e[27]=ne):ne=e[27],ne}let j;e[28]!==S?(j=h.jsx("label",{className:"text-sm font-medium truncate block",children:S}),e[28]=S,e[29]=j):j=e[29];let E;e[30]!==o?(E=o&&h.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[30]=o,e[31]=E):E=e[31];let C;e[32]!==j||e[33]!==E?(C=h.jsxs("div",{className:"flex-1 min-w-0",children:[j,E]}),e[32]=j,e[33]=E,e[34]=C):C=e[34];let _;e[35]!==S||e[36]!==n?(_=n("details.mcpConfigurationForm.selectPlaceholder",{title:S.toLowerCase()}),e[35]=S,e[36]=n,e[37]=_):_=e[37];let I;e[38]!==l?(I=()=>l?.onAddNew(),e[38]=l,e[39]=I):I=e[39];let T;e[40]!==y||e[41]!==p||e[42]!==w||e[43]!==O||e[44]!==_||e[45]!==I?(T=h.jsx(Fj,{bindingSchema:y,bindingType:p,currentValue:w,onValueChange:O,placeholder:_,onAddNew:I,className:"w-[200px] shrink-0"}),e[40]=y,e[41]=p,e[42]=w,e[43]=O,e[44]=_,e[45]=I,e[46]=T):T=e[46];let P;return e[47]!==C||e[48]!==T?(P=h.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[C,T]}),e[47]=C,e[48]=T,e[49]=P):P=e[49],P}let d;e[50]!==t.properties?(d=t.properties.map(Rj),e[50]=t.properties,e[51]=d):d=e[51];let m;return e[52]!==d?(m=h.jsx("div",{className:"flex flex-col gap-4",children:d}),e[52]=d,e[53]=m):m=e[53],m}function Rj(t){return t.content}function kj(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,Mj)}function Mj(t){return t.toUpperCase()}function Uj(t){const e=je.c(13),{label:n,children:r,description:i,id:s,schema:o}=t;if(s.includes("__type")||s.includes("__binding"))return null;if(o.type==="object")return r;let a;e[0]!==s||e[1]!==n?(a=n&&h.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==i?(l=i&&h.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i}),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=h.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let u;e[8]!==r?(u=h.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=u):u=e[9];let d;return e[10]!==c||e[11]!==u?(d=h.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[c,u]}),e[10]=c,e[11]=u,e[12]=d):d=e[12],d}const Lj={ObjectFieldTemplate:Dj,FieldTemplate:Uj};function Bj(t){const e=je.c(19),{formKey:n,formState:r,onFormStateChange:i,stateSchema:s}=t,{org:o}=ns(),a=Xu();let l;e[0]!==i?(l=w=>{w.formData&&i(w.formData)},e[0]=i,e[1]=l):l=e[1];const c=l;let u;e[2]!==r||e[3]!==i?(u=(w,A)=>{const O={...r,[w]:A};i(O)},e[2]=r,e[3]=i,e[4]=u):u=e[4];const d=u;let m;e[5]!==a||e[6]!==o?(m=()=>{a({to:"/$org/settings/connections",params:{org:o.slug},search:{action:"create"}})},e[5]=a,e[6]=o,e[7]=m):m=e[7];const g=m;let f;e[8]!==r||e[9]!==g||e[10]!==d?(f={onFieldChange:d,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=d,e[11]=f):f=e[11];const p=f;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=h.jsx(h.Fragment,{}),e[12]=y):y=e[12];let v;return e[13]!==p||e[14]!==n||e[15]!==r||e[16]!==c||e[17]!==s?(v=h.jsx("div",{className:"flex flex-col h-full overflow-auto",children:h.jsx(Oj,{schema:s,validator:qS,formData:r,onChange:c,formContext:p,liveValidate:!1,showErrorList:!1,templates:Lj,children:y},n)}),e[13]=p,e[14]=n,e[15]=r,e[16]=c,e[17]=s,e[18]=v):v=e[18],v}function qj(t){const e=je.c(14),{org:n}=ns();let r;e[0]!==t||e[1]!==n.id||e[2]!==n.slug?(r={connectionId:t,orgId:n.id,orgSlug:n.slug},e[0]=t,e[1]=n.id,e[2]=n.slug,e[3]=r):r=e[3];const i=od(r);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={},e[4]=s):s=e[4];let o;e[5]!==i?(o={client:i,toolName:"MCP_CONFIGURATION",toolArguments:s,select:Vj},e[5]=i,e[6]=o):o=e[6];const{data:a}=ad(o);let l;e[7]!==a.stateSchema?(l=a.stateSchema??{type:"object",properties:{}},e[7]=a.stateSchema,e[8]=l):l=e[8];const c=l;let u;e[9]!==a.scopes?(u=a.scopes??[],e[9]=a.scopes,e[10]=u):u=e[10];const d=u;let m;return e[11]!==d||e[12]!==c?(m={stateSchema:c,scopes:d},e[11]=d,e[12]=c,e[13]=m):m=e[13],m}function Vj(t){return t.structuredContent??t}function zj(t){const e=je.c(20),{onAuthenticate:n,buttonText:r}=t,i=nt();let s;e[0]!==i?(s=i("details.settingsTab.authenticationRequired"),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==s?(o=h.jsx("h3",{className:"text-sm font-semibold",children:s}),e[2]=s,e[3]=o):o=e[3];let a;e[4]!==i?(a=i("details.settingsTab.oauthAuthenticationDescription"),e[4]=i,e[5]=a):a=e[5];let l;e[6]!==a?(l=h.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:a}),e[6]=a,e[7]=l):l=e[7];let c;e[8]!==o||e[9]!==l?(c=h.jsxs("div",{className:"flex flex-col gap-2",children:[o,l]}),e[8]=o,e[9]=l,e[10]=c):c=e[10];let u;e[11]!==r||e[12]!==i?(u=r??i("details.settingsTab.authenticate"),e[11]=r,e[12]=i,e[13]=u):u=e[13];let d;e[14]!==n||e[15]!==u?(d=h.jsx(Dr,{onClick:n,size:"default",children:u}),e[14]=n,e[15]=u,e[16]=d):d=e[16];let m;return e[17]!==c||e[18]!==d?(m=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[c,d]})}),e[17]=c,e[18]=d,e[19]=m):m=e[19],m}function Wj(t){const e=je.c(19),{hasReadme:n,onViewReadme:r}=t,i=nt();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=h.jsx(cd,{size:36,className:"text-muted-foreground"}),e[0]=s):s=e[0];let o;e[1]!==i?(o=i("details.settingsTab.manualAuthenticationRequired"),e[1]=i,e[2]=o):o=e[2];let a;e[3]!==o?(a=h.jsx("h3",{className:"text-sm font-semibold",children:o}),e[3]=o,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("details.settingsTab.manualAuthenticationDescription"),e[5]=i,e[6]=l):l=e[6];let c;e[7]!==l?(c=h.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:l}),e[7]=l,e[8]=c):c=e[8];let u;e[9]!==a||e[10]!==c?(u=h.jsxs("div",{className:"flex flex-col gap-2",children:[a,c]}),e[9]=a,e[10]=c,e[11]=u):u=e[11];let d;e[12]!==n||e[13]!==r||e[14]!==i?(d=n&&r&&h.jsxs(Dr,{onClick:r,variant:"outline",size:"lg",children:[h.jsx(ld,{size:18,className:"mr-2"}),i("details.settingsTab.viewReadme")]}),e[12]=n,e[13]=r,e[14]=i,e[15]=d):d=e[15];let m;return e[16]!==u||e[17]!==d?(m=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[s,u,d]})}),e[16]=u,e[17]=d,e[18]=m):m=e[18],m}function Hj(){const t=je.c(12),e=nt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=h.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("details.settingsTab.serverError"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==r?(i=h.jsx("h3",{className:"text-lg font-semibold",children:r}),t[3]=r,t[4]=i):i=t[4];let s;t[5]!==e?(s=e("details.settingsTab.serverErrorDescription"),t[5]=e,t[6]=s):s=t[6];let o;t[7]!==s?(o=h.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:s}),t[7]=s,t[8]=o):o=t[8];let a;return t[9]!==i||t[10]!==o?(a=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[n,h.jsxs("div",{className:"flex flex-col gap-2",children:[i,o]})]})}),t[9]=i,t[10]=o,t[11]=a):a=t[11],a}function Gj(t){const e=je.c(21),{connection:n,form:r}=t,i=nt(),{stateSchema:s,scopes:o}=qj(n.id);let a;e[0]!==r.control?(a={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=a):a=e[1];const l=ed(a);let c;e[2]!==n.configuration_scopes||e[3]!==r||e[4]!==o?(c=f=>{r.setValue("configuration_state",f,{shouldDirty:!0}),r.setValue("configuration_scopes",Dd(n.configuration_scopes??[],o,f),{shouldDirty:!0})},e[2]=n.configuration_scopes,e[3]=r,e[4]=o,e[5]=c):c=e[5];const u=c;if(!(s&&s.properties&&typeof s.properties=="object"&&Object.keys(s.properties).length>0)){let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=h.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[6]=f):f=e[6];let p;e[7]!==i?(p=i("details.settingsTab.serverAllSet"),e[7]=i,e[8]=p):p=e[8];let y;e[9]!==i?(y=i("details.settingsTab.noAdditionalConfigurationNeeded"),e[9]=i,e[10]=y):y=e[10];let v;return e[11]!==p||e[12]!==y?(v=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsx(Za,{image:f,title:p,description:y})}),e[11]=p,e[12]=y,e[13]=v):v=e[13],v}let m;e[14]!==l?(m=l??{},e[14]=l,e[15]=m):m=e[15];let g;return e[16]!==n.id||e[17]!==u||e[18]!==s||e[19]!==m?(g=h.jsx("div",{className:"flex-1 overflow-auto",children:h.jsx(Bj,{formKey:n.id,stateSchema:s,formState:m,onFormStateChange:u})}),e[16]=n.id,e[17]=u,e[18]=s,e[19]=m,e[20]=g):g=e[20],g}function Kj(t){const e=je.c(18),n=nt(),{connection:r,form:i,hasMcpBinding:s,isMCPAuthenticated:o,supportsOAuth:a,isServerError:l,onAuthenticate:c,onViewReadme:u}=t,m=!!r?.metadata?.repository?.url;if(!o){if(l){let y;return e[0]===Symbol.for("react.memo_cache_sentinel")?(y=h.jsx(Hj,{}),e[0]=y):y=e[0],y}if(a){let y;return e[1]!==c?(y=h.jsx(zj,{onAuthenticate:c}),e[1]=c,e[2]=y):y=e[2],y}let p;return e[3]!==m||e[4]!==u?(p=h.jsx(Wj,{hasReadme:m,onViewReadme:u}),e[3]=m,e[4]=u,e[5]=p):p=e[5],p}if(!s){let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=h.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[6]=p):p=e[6];let y;e[7]!==n?(y=n("details.settingsTab.serverAllSet"),e[7]=n,e[8]=y):y=e[8];let v;e[9]!==n?(v=n("details.settingsTab.noAdditionalConfigurationNeeded"),e[9]=n,e[10]=v):v=e[10];let w;return e[11]!==y||e[12]!==v?(w=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsx(Za,{image:p,title:y,description:v})}),e[11]=y,e[12]=v,e[13]=w):w=e[13],w}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsx(as,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let f;return e[15]!==r||e[16]!==i?(f=h.jsx(Qu,{children:h.jsx(N.Suspense,{fallback:g,children:h.jsx(Gj,{connection:r,form:i})})}),e[15]=r,e[16]=i,e[17]=f):f=e[17],f}function vO(t){const e=je.c(2);let n;return e[0]!==t?(n=h.jsx("div",{className:"flex-1 flex h-full",children:h.jsx(Kj,{...t})}),e[0]=t,e[1]=n):n=e[1],n}export{bO as D,Wj as M,zj as O,vO as S,yO as c};
|
|
24
|
+
`,v),O=f.slice(v,A===-1?void 0:A+1),b=f[v];if((b===">"||b==="#"||b==="|"||b==="`"||b==="~"||b==="*"||b==="-"||b==="_"||b===" ")&&Ma(s,O)||(y+=O,A===-1||!O.trim()))break;v=A+1}const w=zn(y);return w===""?null:[y,,w]}),u:3,i:f1},22:{t:["["],o:mt(kv),u:0,i:f=>(u[f[1]]={target:f[2],title:f[4]},{})},23:{t:["!["],o:fr(Mv),u:0,i:f=>({alt:f[1]?Ke(f[1]):void 0,ref:f[2]})},24:{t:f=>f[0]==="["&&!Ge(f,"]("),o:mt(Uv),u:0,i:(f,p,y)=>({children:p(f[1],y),fallbackChildren:f[0],ref:f[2]})},25:{t:["|"],o:st(Fa),u:1,i:a1},27:{o:xt(function(f,p){let y;return Qi(f,":")&&(y=Hv.exec(f)),y||Yv.exec(f)}),u:4,i(f){const p=f[0];return{text:Ge(p,"&")?p.replace(Tv,(y,v)=>e.namedCodesToUnicode[v]||y):p}}},34:{t:["*","_","~","="],o:xt(dv),u:2,i:(f,p,y)=>({children:p(f[2],y),tag:f[1]})},28:{t:["\\"],o:fr(Gv),u:1,i:f=>({text:f[1],type:"27"})}};e.disableParsingRawHTML===!0&&(delete d[11],delete d[13]);const m=(function(f){var p=Object.keys(f);function y(v,w){var A=[];if(w.prevCapture=w.prevCapture||"",v.trim())for(;v;)for(var O=0;O<p.length;){var b=p[O],x=f[b];if(!x.t||s1(v,w,x.t)){var S=x.o(v,w);if(S&&S[0]){v=v.substring(S[0].length);var j=x.i(S,y,w);w.prevCapture+=S[0],j.type||(j.type=b),A.push(j);break}O++}else O++}return w.prevCapture="",A}return p.sort(function(v,w){return f[v].u-f[w].u||(v<w?-1:1)}),function(v,w){return y((function(A){return A.replace(jv,`
|
|
25
|
+
`).replace(Ev,"").replace(Bv," ")})(v),w)}})(d),g=(function(f,p,y,v,w){function A(O){return Array.isArray(O)?O.map(b=>"text"in b?b.text:""):"text"in O?O.text:""}return function O(b,x={}){const S=(x.renderDepth||0)+1;if(S>2500)return A(b);x.renderDepth=S;try{if(Array.isArray(b)){const E=x.key,C=[];let _=!1;for(let I=0;I<b.length;I++){x.key=I;const T=O(b[I],x),F=$a(T);F&&_?C[C.length-1]+=T:T!==null&&C.push(T),_=F}return x.key=E,x.renderDepth=S-1,C}const j=(function(E,C,_){const I=()=>(function(T,F,P,$,R,B,U){switch(T.type){case"0":{const Y={key:P.key};return T.alert&&(Y.className="markdown-alert-"+B(T.alert.toLowerCase(),In),T.children.unshift({attrs:{},children:[{type:"27",text:T.alert}],noInnerParse:!0,type:"11",tag:"header"})),$("blockquote",Y,F(T.children,P))}case"1":return $("br",{key:P.key});case"2":return $("hr",{key:P.key});case"3":return $("pre",{key:P.key},$("code",Je({},T.attrs,{className:T.lang?"lang-"+T.lang:""}),T.text));case"5":return $("code",{key:P.key},T.text);case"7":return $("a",{key:P.key,href:R(T.target,"a","href")},$("sup",{key:P.key},T.text));case"8":return $("input",{checked:T.completed,key:P.key,readOnly:!0,type:"checkbox"});case"9":return $("h"+T.level,{id:T.id,key:P.key},F(T.children,P));case"11":return $(T.tag,Je({key:P.key},T.attrs),T.text||(T.children?F(T.children,P):""));case"13":return $(T.tag,Je({},T.attrs,{key:P.key}));case"14":return $("img",{key:P.key,alt:T.alt||void 0,title:T.title||void 0,src:R(T.target,"img","src")});case"15":return $("a",{key:P.key,href:R(T.target,"a","href"),title:T.title},F(T.children,P));case"23":return U[T.ref]?$("img",{key:P.key,alt:T.alt,src:R(U[T.ref].target,"img","src"),title:U[T.ref].title}):null;case"24":return U[T.ref]?$("a",{key:P.key,href:R(U[T.ref].target,"a","href"),title:U[T.ref].title},F(T.children,P)):$("span",{key:P.key},T.fallbackChildren);case"25":{const Y=T;return $("table",{key:P.key},$("thead",null,$("tr",null,Y.header.map(function(ne,fe){return $("th",{key:fe,style:Ra(Y,fe)},F(ne,P))}))),$("tbody",null,Y.cells.map(function(ne,fe){return $("tr",{key:fe},ne.map(function(ye,k){return $("td",{key:k,style:Ra(Y,k)},F(ye,P))}))})))}case"27":return T.text;case"34":return $(T.tag,{key:P.key},F(T.children,P));case"20":case"30":return $(T.ordered?"ol":"ul",{key:P.key,start:T.type==="20"?T.start:void 0},T.items.map(function(Y,ne){return $("li",{key:ne},F(Y,P))}));case"19":return`
|
|
26
|
+
`;case"21":return $("p",{key:P.key},F(T.children,P));default:return null}})(E,C,_,p,y,v,w);return f?f(I,E,C,_):I()})(b,O,x);return x.renderDepth=S-1,j}catch(j){if(j instanceof RangeError&&j.message.includes("Maximum call stack"))return A(b);throw j}}})(e.renderRule,a,r,n,u);return l(t)}const lr=t=>{let{children:e,options:n}=t,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})(t,fv);return m1(e??"",Je({},n,{wrapperProps:Je({},n?.wrapperProps,r)}))},Wc=Symbol("remove-this-key"),Ua=Symbol("reset");function p1(t,e){return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}function g1(t,e){switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return t(K.NewStringDefault)}}function y1(t){const{fieldPathId:e,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:c,disabled:u,readonly:d,required:m,hideError:g,propertyName:f,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:v}=t,[w,A]=N.useState(!1),{globalFormOptions:O,fields:b}=r,{SchemaField:x}=b,S=Kt(Be(f,O,e.path)),j=N.useCallback((I,T,F,P)=>{I===void 0&&v&&(I=""),a(I,T,F,P)},[a,v]),E=N.useCallback(I=>{f!==I&&A(!0),p(f,I)},[f,p]),C=N.useCallback(I=>{const{target:{value:T}}=I;E(T)},[E]),_=N.useCallback(()=>{y(f)},[f,y]);return h.jsx(x,{name:f,required:m,schema:n,uiSchema:i,errorSchema:s,fieldPathId:S,formData:o,wasPropertyKeyModified:w,onKeyRename:E,onKeyRenameBlur:C,onRemoveProperty:_,onChange:j,onBlur:l,onFocus:c,registry:r,disabled:u,readonly:d,hideError:g})}function b1(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:c,hideError:u,onBlur:d,onFocus:m,onChange:g,registry:f,title:p}=t,{fields:y,schemaUtils:v,translateString:w,globalUiOptions:A}=f,{OptionalDataControlsField:O}=y,b=N.useRef(r);b.current=r;const x=v.retrieveSchema(e,r,!0),S=M(n,A),{properties:j={}}=x,E=t.childFieldPathId??s,C=N.useRef({previousKey:"",currentKey:void 0}),_=S.title??x.title??p??o,I=S.description??x.description,T=ar(f,x,a,n),F=vn(r);let P=[];const $=N.useCallback((k,le)=>{const{duplicateKeySuffixSeparator:ee="-"}=M(n,A);let H=0,G=k;for(;X(le,G);)G=`${k}${ee}${++H}`;return G},[n,A]),R=N.useCallback(()=>{if(!(x.additionalProperties||x.patternProperties))return;const{translateString:k}=f,le={...r},ee=$("newKey",le);if(x.patternProperties)ce(le,ee,null);else{let H,G,z;if(te(x.additionalProperties)){H=x.additionalProperties.type,G=x.additionalProperties.const,z=x.additionalProperties.default;let oe=x.additionalProperties;if(ue in oe){const{schemaUtils:Oe}=f;oe=Oe.retrieveSchema({[ue]:oe[ue]},r),H=oe.type,G=oe.const,z=oe.default}!H&&(Q in oe||W in oe)&&(H="object")}const re=G??z??g1(k,H);ce(le,ee,re)}C.current.previousKey===ee&&(C.current.currentKey=ee,C.current.previousKey=$(ee,le)),g(le,E.path)},[r,g,f,E,$,x]),B=N.useCallback((k,le)=>{if(k!==le){const ee=b.current,H=$(le,ee),G={...ee},z={[k]:H},re=Object.keys(G).map(Oe=>({[z[Oe]||Oe]:G[Oe]})),oe=Object.assign({},...re);b.current=oe,k!==C.current.currentKey&&(C.current.previousKey=k),C.current.currentKey=H,g(oe,E.path)}},[g,E,$]),U=N.useCallback(k=>{g(Wc,[...E.path,k])},[g,E]),Y=N.useCallback(k=>C.current.currentKey===k?C.current.previousKey:k,[]);if(!T||F)try{const k=Object.keys(j);P=dx(k,S.order)}catch(k){return h.jsxs("div",{children:[h.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:h.jsx(lr,{options:{disableParsingRawHTML:!0},children:w(K.InvalidObjectField,[o||"root",k.message])})}),h.jsx("pre",{children:JSON.stringify(x)})]})}const ne=q("ObjectFieldTemplate",f,S),fe=T?h.jsx(O,{...t,fieldPathId:E,schema:x}):void 0,ye={title:S.label===!1?"":_,description:S.label===!1?void 0:I,properties:P.map(k=>{const le=X(x,[se,k,at]),ee=le?n.additionalProperties:n[k],H=M(ee).widget==="hidden";return{content:h.jsx(y1,{propertyName:k,required:p1(x,k),schema:D(x,[se,k],{}),uiSchema:ee,errorSchema:D(i,[k]),fieldPathId:E,formData:D(r,[k]),handleKeyRename:B,handleRemoveProperty:U,addedByAdditionalProperties:le,onChange:g,onBlur:d,onFocus:m,registry:f,disabled:l,readonly:c,hideError:u},Y(k)),name:k,readonly:c,disabled:l,required:a,hidden:H}}),readonly:c,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:x,formData:r,registry:f,optionalDataControl:fe,className:T?"rjsf-optional-object-field":void 0};return h.jsx(ne,{...ye,onAddProperty:R})}function x1(t){const{schema:e,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:c}=t,{globalUiOptions:u={},schemaUtils:d,translateString:m}=c,g=M(n,u),f=q("OptionalDataControlsTemplate",c,g),p=vn(r);let y,v,w,A;if(i||s)y=bi(l,"Msg"),v=p?void 0:m(K.OptionalObjectEmptyMsg);else{const O=p?K.OptionalObjectRemove:K.OptionalObjectAdd;v=m(O),p?(y=bi(l,"Remove"),A=()=>o(void 0,l.path,a)):(y=bi(l,"Add"),w=()=>{let b=d.getDefaultFormState(e,r,"excludeObjectChildren");b===void 0&&(b=Le(e)==="array"?[]:{}),o(b,l.path,a)})}return v&&h.jsx(f,{id:y,registry:c,schema:e,uiSchema:n,label:v,onAddClick:w,onRemoveClick:A})}const v1={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function S1(t,e,n){const r=e.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=Le(t),o=Array.isArray(s)?s[0]:s||"",a=t.$id;let l=v1[o];return a&&a in i&&(l=a),!l&&(t.anyOf||t.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function w1(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:d=!1,registry:m,wasPropertyKeyModified:g=!1}=t,{schemaUtils:f,globalFormOptions:p,globalUiOptions:y,fields:v}=m,{AnyOfField:w,OneOfField:A}=v,O=fx(e,r,m),b=M(O,y),x=q("FieldTemplate",m,b),S=q("DescriptionFieldTemplate",m,b),j=q("FieldHelpTemplate",m,b),E=q("FieldErrorTemplate",m,b),C=f.retrieveSchema(e,i),_=n[de],I=N.useCallback((wn,jn,It,vu)=>a(wn,jn,It,vu||_),[_,a]),T=S1(C,b,m),F=!!(b.disabled??t.disabled),P=!!(b.readonly??(t.readonly||t.schema.readOnly||C.readOnly)),$=b.hideError,R=$===void 0?t.hideError:!!$,B=!!(b.autofocus??t.autofocus);if(Object.keys(C).length===0)return null;let U=f.getDisplayLabel(C,O,y);const Y=b.field&&b.fieldReplacesAnyOrOneOf===!0;let ne,fe,ye={fieldPathId:n};if((Q in C||W in C)&&!Y&&!f.isSelect(C)){C[Q]?(ne=w,fe=C[Q].map(It=>f.retrieveSchema(te(It)?It:{},i))):C[W]&&(ne=A,fe=C[W].map(It=>f.retrieveSchema(te(It)?It:{},i)));const wn=ar(m,C,d,O),jn=vn(i);U=U&&(!wn||jn),ye={childFieldPathId:n,fieldPathId:Be("XxxOf",p,n)}}const{__errors:k,...le}=s||{},ee=un(O,["ui:classNames","classNames","ui:style"]);vt in ee&&(ee[vt]=un(ee[vt],["classNames","style"]));const H=h.jsx(T,{...t,onChange:I,...ye,schema:C,uiSchema:ee,disabled:F,readonly:P,hideError:R,autofocus:B,errorSchema:le,rawErrors:k}),G=n[de];let z;g?z=o:z=at in C?o:b.title||t.schema.title||C.title||t.title||o;const re=b.description||t.schema.description||C.description||"",oe=b.help,Oe=b.widget==="hidden",Ae=["rjsf-field",`rjsf-field-${Le(C)}`];!R&&k&&k.length>0&&Ae.push("rjsf-field-error"),b.classNames&&Ae.push(b.classNames);const xe=h.jsx(j,{help:oe,fieldPathId:n,schema:C,uiSchema:O,hasErrors:!R&&k&&k.length>0,registry:m}),$e=R||ne&&!f.isSelect(C)?void 0:h.jsx(E,{errors:k,errorSchema:s,fieldPathId:n,schema:C,uiSchema:O,registry:m}),ht={description:h.jsx(S,{id:Gt(G),description:re,schema:C,uiSchema:O,registry:m}),rawDescription:re,help:xe,rawHelp:typeof oe=="string"?oe:void 0,errors:$e,rawErrors:R?void 0:k,fieldPathId:n,id:G,label:z,hidden:Oe,onChange:a,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:d,disabled:F,readonly:P,hideError:R,displayLabel:U,classNames:Ae.join(" ").trim(),style:b.style,formData:i,schema:C,uiSchema:O,registry:m};return h.jsx(x,{...ht,children:h.jsxs(h.Fragment,{children:[H,ne&&h.jsx(ne,{name:o,disabled:F,readonly:P,hideError:R,errorSchema:s,formData:i,fieldPathId:n,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:fe,registry:m,required:d,schema:C,uiSchema:O})]})})}class j1 extends N.Component{shouldComponentUpdate(e){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return Ic(this,e,this.state,r)}render(){return h.jsx(w1,{...this.props})}}function O1(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:c=!1,onChange:u,onBlur:d,onFocus:m,registry:g,rawErrors:f,hideError:p,title:y}=t,{title:v,format:w}=e,{widgets:A,schemaUtils:O,globalUiOptions:b}=g,x=O.isSelect(e)?hn(e,r):void 0;let S=x?"select":"text";w&&lx(e,w,A)&&(S=w);const{widget:j=S,placeholder:E="",title:C,..._}=M(r),I=O.getDisplayLabel(e,r,b),T=C??y??v??n,F=tt(e,j,A),P=N.useCallback(($,R,B)=>u($,i.path,R,B),[u,i]);return h.jsx(F,{options:{..._,enumOptions:x},schema:e,uiSchema:r,id:i.$id,name:n,label:T,hideLabel:!I,hideError:p,value:s,onChange:P,onBlur:d,onFocus:m,required:o,disabled:a,readonly:l,autofocus:c,registry:g,placeholder:E,rawErrors:f,htmlName:i.name})}function A1(t){const{formData:e,onChange:n,fieldPathId:r}=t;return N.useEffect(()=>{e===void 0&&n(null,r.path)},[r,e,n]),null}function E1(){return{AnyOfField:Sa,ArrayField:$x,BooleanField:Dx,FallbackField:Ux,LayoutGridField:qs,LayoutHeaderField:sv,LayoutMultiSchemaField:ov,NumberField:cv,ObjectField:b1,OneOfField:Sa,OptionalDataControlsField:x1,SchemaField:j1,StringField:O1,NullField:A1}}function C1(t){const{fieldPathId:e,description:n,registry:r,schema:i,uiSchema:s}=t,o=M(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=q("DescriptionFieldTemplate",r,o);return h.jsx(l,{id:Gt(e),description:n,schema:i,uiSchema:s,registry:r})}function _1(t){const{children:e,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=t,c=M(l),u=q("ArrayFieldItemButtonsTemplate",a,c),d={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},m=s?31:9,g={display:"flex",alignItems:i?"center":"baseline"},f={display:"flex",justifyContent:"flex-end",marginTop:i?`${m}px`:0};return h.jsxs("div",{className:n,style:g,children:[h.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:e}),o&&h.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:h.jsx("div",{className:"btn-group",style:f,children:h.jsx(u,{...r,style:d})})})]})}function I1(t){const{disabled:e,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:c,onMoveUpItem:u,readonly:d,registry:m,uiSchema:g}=t,{CopyButton:f,MoveDownButton:p,MoveUpButton:y,RemoveButton:v}=m.templates.ButtonTemplates;return h.jsxs(h.Fragment,{children:[(i||r)&&h.jsx(y,{id:Qe(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:e||d||!i,onClick:u,uiSchema:g,registry:m}),(i||r)&&h.jsx(p,{id:Qe(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:e||d||!r,onClick:c,uiSchema:g,registry:m}),n&&h.jsx(f,{id:Qe(o,"copy"),className:"rjsf-array-item-copy",disabled:e||d,onClick:a,uiSchema:g,registry:m}),s&&h.jsx(v,{id:Qe(o,"remove"),className:"rjsf-array-item-remove",disabled:e||d,onClick:l,uiSchema:g,registry:m})]})}function T1(t){const{canAdd:e,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:c,registry:u,required:d,schema:m,title:g}=t,f=M(s),p=q("ArrayFieldDescriptionTemplate",u,f),y=q("ArrayFieldTitleTemplate",u,f),v=!c&&!r,{ButtonTemplates:{AddButton:w}}=u.templates;return h.jsxs("fieldset",{className:n,id:i.$id,children:[h.jsx(y,{fieldPathId:i,title:f.title||g,required:d,schema:m,uiSchema:s,registry:u,optionalDataControl:v?a:void 0}),h.jsx(p,{fieldPathId:i,description:f.description||m.description,schema:m,uiSchema:s,registry:u}),v?void 0:a,h.jsx("div",{className:"row array-item-list",children:o}),e&&h.jsx(w,{id:Qe(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||c,uiSchema:s,registry:u})]})}function N1(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=t,l=M(i,o.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const u=q("TitleFieldTemplate",o,l);return h.jsx(u,{id:Yr(e),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function Hc(t){const{id:e,schema:n}=t,{examples:r,default:i}=n;return Array.isArray(r)?h.jsx("datalist",{id:Kr(e),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>h.jsx("option",{value:s},String(s)))},`datalist_${e}`):null}function F1(t){const{id:e,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:c,onChange:u,onChangeOverride:d,options:m,schema:g,uiSchema:f,registry:p,rawErrors:y,type:v,hideLabel:w,hideError:A,...O}=t,{ClearButton:b}=p.templates.ButtonTemplates;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const x={...O,...Ac(g,v,m)};let S;x.type==="number"||x.type==="integer"?S=i||i===0?i:"":S=i??"";const j=N.useCallback(({target:{value:I}})=>u(I===""?m.emptyValue:I),[u,m]),E=N.useCallback(({target:I})=>l(e,I&&I.value),[l,e]),C=N.useCallback(({target:I})=>c(e,I&&I.value),[c,e]),_=N.useCallback(I=>{I.preventDefault(),I.stopPropagation(),u(m.emptyValue??"")},[u,m.emptyValue]);return h.jsxs(h.Fragment,{children:[h.jsx("input",{id:e,name:r||e,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:S,...x,list:g.examples?Kr(e):void 0,onChange:d||j,onBlur:E,onFocus:C,"aria-describedby":Pe(e,!!g.examples)}),m.allowClearTextInputs&&!s&&!o&&S&&h.jsx(b,{registry:p,onClick:_}),h.jsx(Hc,{id:e,schema:g})]})}function P1({uiSchema:t}){const{submitText:e,norender:n,props:r={}}=Ec(t);return n?null:h.jsx("div",{children:h.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:e})})}function _t(t){const{iconType:e="default",icon:n,className:r,uiSchema:i,registry:s,...o}=t;return h.jsx("button",{type:"button",className:`btn btn-${e} ${r}`,...o,children:h.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function $1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.CopyButton),...t,icon:"copy"})}function D1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.MoveDownButton),...t,icon:"arrow-down"})}function R1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.MoveUpButton),...t,icon:"arrow-up"})}function k1(t){const{registry:{translateString:e}}=t;return h.jsx(_t,{title:e(K.RemoveButton),...t,iconType:"danger",icon:"remove"})}function M1({id:t,className:e,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return h.jsx(_t,{id:t,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(K.ClearButton),onClick:n,disabled:r,registry:i,...s})}function U1({id:t,className:e,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return h.jsx("div",{className:"row",children:h.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 ${e}`,children:h.jsx(_t,{id:t,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(K.AddButton),onClick:n,disabled:r,registry:i})})})}function L1(){return{SubmitButton:P1,AddButton:U1,CopyButton:$1,MoveDownButton:D1,MoveUpButton:R1,RemoveButton:k1,ClearButton:M1}}const Gc=Rs();function Hs({description:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return M(n,r).enableMarkdownInDescription&&typeof t=="string"?h.jsx(lr,{options:{disableParsingRawHTML:!0},"data-testid":Gc.markdown,children:t}):t}Hs.TEST_IDS=Gc;function B1(t){const{id:e,description:n,registry:r,uiSchema:i}=t;return n?h.jsx("div",{id:e,className:"field-description",children:h.jsx(Hs,{description:n,registry:r,uiSchema:i})}):null}function q1({errors:t,registry:e}){const{translateString:n}=e;return h.jsxs("div",{className:"panel panel-danger errors",children:[h.jsx("div",{className:"panel-heading",children:h.jsx("h3",{className:"panel-title",children:n(K.ErrorsLabel)})}),h.jsx("ul",{className:"list-group",children:t.map((r,i)=>h.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function V1(t){const{schema:e,registry:n,typeSelector:r,schemaField:i}=t,s=q("MultiSchemaFieldTemplate",n);return h.jsx(s,{selector:r,optionSchemaField:i,schema:e,registry:n})}const z1="*";function Kc(t){const{label:e,required:n,id:r}=t;return e?h.jsxs("label",{className:"control-label",htmlFor:r,children:[e,n&&h.jsx("span",{className:"required",children:z1})]}):null}function W1(t){const{id:e,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:c,registry:u,uiSchema:d}=t,m=M(d),g=q("WrapIfAdditionalTemplate",u,m);if(a)return h.jsx("div",{className:"hidden",children:r});const f=m.widget==="checkbox";return h.jsxs(g,{...t,children:[c&&!f&&h.jsx(Kc,{label:n,required:l,id:e}),c&&o?o:null,r,i,s]})}function H1(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=ks(n);return h.jsx("div",{children:h.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,s)=>h.jsx("li",{className:"text-danger",children:i},s))})})}const Yc=Rs();function Gs({help:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return M(n,r).enableMarkdownInHelp&&typeof t=="string"?h.jsx(lr,{options:{disableParsingRawHTML:!0},"data-testid":Yc.markdown,children:t}):t}Gs.TEST_IDS=Yc;function G1(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i}=t;return n?h.jsx("div",{id:Ms(e),className:"help-block",children:h.jsx(Gs,{help:n,registry:i,uiSchema:r})}):null}function K1(t){const{children:e,column:n,className:r,...i}=t;return h.jsx("div",{className:r,...i,children:e})}function Y1(t){const{selector:e,optionSchemaField:n}=t;return h.jsxs("div",{className:"panel panel-default panel-body",children:[h.jsx("div",{className:"form-group",children:e}),n]})}function J1(t){const{className:e,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:c,registry:u,required:d,schema:m,title:g,uiSchema:f}=t,p=M(f),y=q("TitleFieldTemplate",u,p),v=q("DescriptionFieldTemplate",u,p);if((m.oneOf||m.anyOf)&&!m.properties&&l.length===0)return null;const A=!c&&!r,{ButtonTemplates:{AddButton:O}}=u.templates;return h.jsxs("fieldset",{className:e,id:s.$id,children:[g&&h.jsx(y,{id:Yr(s),title:g,required:d,schema:m,uiSchema:f,registry:u,optionalDataControl:A?a:void 0}),n&&h.jsx(v,{id:Gt(s),description:n,schema:m,uiSchema:f,registry:u}),A?void 0:a,l.map(b=>b.content),sl(m,f,i)&&h.jsx(O,{id:Qe(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||c,uiSchema:f,registry:u})]})}function Z1(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?h.jsx(_t,{id:e,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?h.jsx(_t,{id:e,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):h.jsx("em",{id:e,children:r})}const X1="*";function Q1(t){const{id:e,title:n,required:r,optionalDataControl:i}=t;return h.jsxs("legend",{id:e,children:[n,r&&h.jsx("span",{className:"required",children:X1}),i&&h.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function eS(t){const{schema:e,fieldPathId:n,reason:r,registry:i}=t,{translateString:s}=i;let o=K.UnsupportedField;const a=[];return n&&n.$id&&(o=K.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===K.UnsupportedField?K.UnsupportedFieldWithReason:K.UnsupportedFieldWithIdAndReason,a.push(r)),h.jsxs("div",{className:"unsupported-field",children:[h.jsx("p",{children:h.jsx(lr,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),e&&h.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function tS(t){const{id:e,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:c,readonly:u,required:d,schema:m,hideError:g,rawErrors:f,children:p,uiSchema:y,registry:v}=t,{templates:w,translateString:A}=v,{RemoveButton:O}=w.ButtonTemplates,b=A(K.KeyLabel,[o]),x=at in m,S=!!c,j=["form-group",n];!g&&f&&f.length>0&&j.push("has-error has-danger");const E=j.join(" ").trim();if(!x)return h.jsx("div",{className:E,style:r,children:p});const C=S?46:26;return h.jsx("div",{className:E,style:r,children:h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-xs-5 form-additional",children:h.jsxs("div",{className:"form-group",children:[s&&h.jsx(Kc,{label:b,required:d,id:`${e}-key`}),s&&c&&h.jsx("div",{children:" "}),h.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:a,defaultValue:o},o)]})}),h.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),h.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${C}px`:void 0},children:h.jsx(O,{id:Qe(e,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l,uiSchema:y,registry:v})})]})})}function nS(){return{ArrayFieldDescriptionTemplate:C1,ArrayFieldItemTemplate:_1,ArrayFieldItemButtonsTemplate:I1,ArrayFieldTemplate:T1,ArrayFieldTitleTemplate:N1,ButtonTemplates:L1(),BaseInputTemplate:F1,DescriptionFieldTemplate:B1,ErrorListTemplate:q1,FallbackFieldTemplate:V1,FieldTemplate:W1,FieldErrorTemplate:H1,FieldHelpTemplate:G1,GridTemplate:K1,MultiSchemaFieldTemplate:Y1,ObjectFieldTemplate:J1,OptionalDataControlsTemplate:Z1,TitleFieldTemplate:Q1,UnsupportedFieldTemplate:eS,WrapIfAdditionalTemplate:tS}}function rS(t){const{disabled:e=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:c}=t,{translateString:u}=a,{elements:d,handleChange:m,handleClear:g,handleSetNow:f}=gx(t);return h.jsxs("ul",{className:"list-inline",children:[d.map((p,y)=>h.jsx("li",{className:"list-inline-item",children:h.jsx(px,{rootId:s,name:o,select:m,...p,disabled:e,readonly:n,registry:a,onBlur:l,onFocus:c,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&h.jsx("li",{className:"list-inline-item",children:h.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:f,children:u(K.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&h.jsx("li",{className:"list-inline-item",children:h.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:g,children:u(K.ClearLabel)})})]})}function iS({time:t=!0,...e}){const{AltDateWidget:n}=e.registry.widgets;return h.jsx(n,{time:t,...e})}function sS({schema:t,uiSchema:e,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:c=!1,onBlur:u,onFocus:d,onChange:m,registry:g,htmlName:f}){const p=q("DescriptionFieldTemplate",g,n),y=qn(t),v=N.useCallback(S=>m(S.target.checked),[m]),w=N.useCallback(S=>u(r,S.target.checked),[u,r]),A=N.useCallback(S=>d(r,S.target.checked),[d,r]),x=M(e).widget==="checkbox"?void 0:n.description??t.description;return h.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&x&&h.jsx(p,{id:Gt(r),description:x,schema:t,uiSchema:e,registry:g}),h.jsxs("label",{children:[h.jsx("input",{type:"checkbox",id:r,name:f||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:c,onChange:v,onBlur:w,onFocus:A,"aria-describedby":Pe(r)}),_c(h.jsx("span",{children:a}),l)]})]})}function oS({id:t,disabled:e,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:c}){const{inline:u=!1,enumOptions:d,enumDisabled:m,emptyValue:g}=n,f=xn(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:w})=>a(t,Te(w&&w.value,d,f,g)),[a,t,d,g,f]),v=N.useCallback(({target:w})=>l(t,Te(w&&w.value,d,f,g)),[l,t,d,g,f]);return h.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(d)&&d.map((w,A)=>{const O=sr(w.value,p),b=Array.isArray(m)&&m.indexOf(w.value)!==-1,x=e||b||s?"disabled":"",S=E=>{E.target.checked?o(wc(A,p,d)):o(vc(A,p,d))},j=h.jsxs("span",{children:[h.jsx("input",{type:"checkbox",id:$t(t,A),name:c||t,checked:O,value:or(w.value,A,f),disabled:e||b||s,autoFocus:i&&A===0,onChange:S,onBlur:y,onFocus:v,"aria-describedby":Pe(t)}),h.jsx("span",{children:w.label})]});return u?h.jsx("label",{className:`checkbox-inline ${x}`,children:j},A):h.jsx("div",{className:`checkbox ${x}`,children:h.jsx("label",{children:j})},A)})})}function aS(t){const{disabled:e,readonly:n,options:r,registry:i}=t,s=q("BaseInputTemplate",i,r);return h.jsx(s,{type:"color",...t,disabled:e||n})}function lS(t){const{onChange:e,options:n,registry:r}=t,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o||void 0),[e]);return h.jsx(i,{type:"date",...t,onChange:s})}function cS(t){const{onChange:e,value:n,options:r,registry:i}=t,s=q("BaseInputTemplate",i,r);return h.jsx(s,{type:"datetime-local",...t,value:Sx(n),onChange:o=>e(ux(o))})}function uS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"email",...t})}function dS({fileInfo:t,registry:e}){const{translateString:n}=e,{dataURL:r,type:i,name:s}=t;return r?["image/jpeg","image/png"].includes(i)?h.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):h.jsxs(h.Fragment,{children:[" ",h.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(K.PreviewLabel)})]}):null}function fS({filesInfo:t,registry:e,preview:n,onRemove:r,options:i}){if(t.length===0)return null;const{translateString:s}=e,{RemoveButton:o}=q("ButtonTemplates",e,i);return h.jsx("ul",{className:"file-info",children:t.map((a,l)=>{const{name:c,size:u,type:d}=a,m=()=>r(l);return h.jsxs("li",{children:[h.jsx(lr,{children:s(K.FilesInfo,[c,d,String(u)])}),n&&h.jsx(dS,{fileInfo:a,registry:e}),h.jsx(o,{onClick:m,registry:e})]},l)})})}function hS(t){const{disabled:e,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=t,{filesInfo:c,handleChange:u,handleRemove:d}=vx(o,s,i),m=q("BaseInputTemplate",l,a),g=f=>{f.target.files&&u(f.target.files)};return h.jsxs("div",{children:[h.jsx(m,{...t,disabled:e||n,type:"file",required:o?!1:r,onChangeOverride:g,value:"",accept:a.accept?String(a.accept):void 0}),h.jsx(fS,{filesInfo:c,onRemove:d,registry:l,preview:a.filePreview,options:a})]})}function mS({id:t,value:e,htmlName:n}){return h.jsx("input",{type:"hidden",id:t,name:n||t,value:typeof e>"u"?"":e})}function pS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"password",...t})}function gS({options:t,value:e,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:c,htmlName:u}){const{enumOptions:d,enumDisabled:m,inline:g,emptyValue:f}=t,p=xn(t),y=N.useCallback(({target:w})=>o(c,Te(w&&w.value,d,p,f)),[o,d,f,c,p]),v=N.useCallback(({target:w})=>a(c,Te(w&&w.value,d,p,f)),[a,d,f,c,p]);return h.jsx("div",{className:"field-radio-group",id:c,role:"radiogroup",children:Array.isArray(d)&&d.map((w,A)=>{const O=sr(w.value,e),b=Array.isArray(m)&&m.indexOf(w.value)!==-1,x=r||b||i?"disabled":"",S=()=>l(w.value),j=h.jsxs("span",{children:[h.jsx("input",{type:"radio",id:$t(c,A),checked:O,name:u||c,required:n,value:or(w.value,A,p),disabled:r||b||i,autoFocus:s&&A===0,onChange:S,onBlur:y,onFocus:v,"aria-describedby":Pe(c)}),h.jsx("span",{children:w.label})]});return g?h.jsx("label",{className:`radio-inline ${x}`,children:j},A):h.jsx("div",{className:`radio ${x}`,children:h.jsx("label",{children:j})},A)})})}function yS(t){const{value:e,registry:{templates:{BaseInputTemplate:n}}}=t;return h.jsxs("div",{className:"field-range-wrapper",children:[h.jsx(n,{type:"range",...t}),h.jsx("span",{className:"range-view",children:e})]})}function bS({id:t,value:e,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:c,options:u,htmlName:d}){const{stars:m=5,shape:g="star"}=u,f=c.maximum?Math.min(c.maximum,5):Math.min(Math.max(m,1),5),p=c.minimum||0,y=N.useCallback(O=>{!r&&!i&&o(O)},[o,r,i]),v=N.useCallback(O=>{if(a){const b=Number(O.target.dataset.value);a(t,b)}},[a,t]),w=N.useCallback(O=>{if(l){const b=Number(O.target.dataset.value);l(t,b)}},[l,t]),A=O=>g==="heart"?O?"♥":"♡":O?"★":"☆";return h.jsx(h.Fragment,{children:h.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(f)].map((O,b)=>{const x=p+b,S=x<=e;return h.jsx("span",{onClick:()=>y(x),onFocus:v,onBlur:w,"data-value":x,tabIndex:r||i?-1:0,role:"radio","aria-checked":x===e,"aria-label":`${x} ${g==="heart"?"heart":"star"}${x===1?"":"s"}`,style:{color:S?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:A(S)},b)}),h.jsx("input",{type:"hidden",id:t,name:d||t,value:e||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function Ai(t,e){return e?Array.from(t.target.options).slice().filter(n=>n.selected).map(n=>n.value):t.target.value}function xS({schema:t,id:e,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:c,onBlur:u,onFocus:d,placeholder:m,htmlName:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=n,v=a?[]:"",w=xn(n),A=N.useCallback(j=>{const E=Ai(j,a);return d(e,Te(E,f,w,y))},[d,e,a,f,y,w]),O=N.useCallback(j=>{const E=Ai(j,a);return u(e,Te(E,f,w,y))},[u,e,a,f,y,w]),b=N.useCallback(j=>{const E=Ai(j,a);return c(Te(E,f,w,y))},[c,a,f,y,w]),x=Sc(r,f,a,w,v),S=!a&&t.default===void 0;return h.jsxs("select",{id:e,name:g||e,multiple:a,role:"combobox",className:"form-control",value:x,required:i,disabled:s||o,autoFocus:l,onBlur:O,onFocus:A,onChange:b,"aria-describedby":Pe(e),children:[S&&h.jsx("option",{value:"",children:m}),Array.isArray(f)&&f.map(({value:j,label:E},C)=>{const _=p&&p.indexOf(j)!==-1;return h.jsx("option",{value:or(j,C,w),disabled:_,children:E},C)})]})}function vS({id:t,options:e={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:c,onFocus:u,htmlName:d}){const m=N.useCallback(({target:{value:p}})=>l(p===""?e.emptyValue:p),[l,e.emptyValue]),g=N.useCallback(({target:p})=>c(t,p&&p.value),[c,t]),f=N.useCallback(({target:p})=>u(t,p&&p.value),[t,u]);return h.jsx("textarea",{id:t,name:d||t,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:e.rows,onBlur:g,onFocus:f,onChange:m,"aria-describedby":Pe(t)})}function SS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{...t})}function wS(t){const{onChange:e,options:n,registry:r}=t,i=q("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o?`${o}:00`:void 0),[e]);return h.jsx(i,{type:"time",...t,onChange:s})}function jS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"url",...t})}function OS(t){const{options:e,registry:n}=t,r=q("BaseInputTemplate",n,e);return h.jsx(r,{type:"number",...t})}function AS(){return{AltDateWidget:rS,AltDateTimeWidget:iS,CheckboxWidget:sS,CheckboxesWidget:oS,ColorWidget:aS,DateWidget:lS,DateTimeWidget:cS,EmailWidget:uS,FileWidget:hS,HiddenWidget:mS,PasswordWidget:pS,RadioWidget:gS,RangeWidget:yS,RatingWidget:bS,SelectWidget:xS,TextWidget:SS,TextareaWidget:vS,TimeWidget:wS,UpDownWidget:OS,URLWidget:jS}}function ES(){return{fields:E1(),templates:nS(),widgets:AS(),rootSchema:{},formContext:{},translateString:G0,globalFormOptions:{idPrefix:nl,idSeparator:rl,useFallbackUiForUnsupportedType:!1}}}function Yt(t,e){return{...$s(t,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...e!==void 0&&{status:e}}}let CS=class extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,n){if(e.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return e.extraErrors&&({errors:i,errorSchema:s}=Dn(r,e.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=Dn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:i,errorSchema:s}}return null}constructor(e){if(super(e),!e.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=e,s=n??r;this.state={...this.getStateFromProps(e,s,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},i&&!ie(this.state.formData,s)&&i(Yt(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(e,n){if(!ie(this.props,e)){const r=ua(this.props.formData,e.formData),i=ua(this.props.formData,this.state.formData),s=!ie(e.schema,this.props.schema),o=r.length>0||!ie(e.formData,this.props.formData),a=i.length>0||!ie(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=!ie(l,n);return{nextState:l,shouldUpdate:c}}return{shouldUpdate:!1}}componentDidUpdate(e,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!ie(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!ie(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Yt(i)),this.setState(i)}}getStateFromProps(e,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in e?e.schema:this.props.schema,c="validator"in e?e.validator:this.props.validator,u=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},d=e.formData===void 0&&this.props.formData===void 0,m=typeof n<"u",g="liveValidate"in e?e.liveValidate:this.props.liveValidate,f=m&&!e.noValidate&&g,p="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let v=a.schemaUtils;(!v||v.doesSchemaUtilsDiffer(c,l,p,y))&&(v=z0(c,l,p,y));const w=v.getRootSchema();let A=n;n===Ua?A=void 0:n===void 0&&d&&(A=a.formData);const O=v.getDefaultFormState(w,A,!1,a.initialDefaultsGenerated),b=this.updateRetrievedSchema(r??v.retrieveSchema(w,O)),x=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let S,j,E=a.schemaValidationErrors,C=a.schemaValidationErrorSchema;if(f&&!o){const P=this.liveValidate(w,v,a.errorSchema,O,void 0,a.customErrors,r,r!==void 0);S=P.errors,j=P.errorSchema,E=P.schemaValidationErrors,C=P.schemaValidationErrorSchema}else{const P=x();if(S=P.errors,j=P.errorSchema,s.length>0&&!f){const R=s.reduce((B,U)=>(B[U]=void 0,B),{});j=C=Ut(P.errorSchema,R,"preventDuplicates")}const $=this.mergeErrors({errorSchema:j,errors:S},e.extraErrors,a.customErrors);S=$.errors,j=$.errorSchema}const _=this.getRegistry(e,w,v),I=ie(a.registry,_)?a.registry:_,T=a.fieldPathId&&a.fieldPathId?.[de]===I.globalFormOptions.idPrefix?a.fieldPathId:Be("",I.globalFormOptions);return{schemaUtils:v,schema:w,uiSchema:u,fieldPathId:T,formData:O,edit:m,errors:S,errorSchema:j,schemaValidationErrors:E,schemaValidationErrorSchema:C,retrievedSchema:b,initialDefaultsGenerated:!0,registry:I}}shouldComponentUpdate(e,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return Ic(this,e,n,r)}validate(e,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,e);return s.getValidator().validateFormData(e,c,o,a,l)}renderErrors(e){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=M(s),a=q("ErrorListTemplate",e,o);return n&&n.length?h.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:e}):null}mergeErrors(e,n,r){let i=e.errorSchema,s=e.errors;if(n){const o=Dn(e,n);i=o.errorSchema,s=o.errors}if(r){const o=Dn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(e,n,r,i,s,o,a,l=!1){const c=this.validate(i,e,n,a),u=c.errors;let d=c.errorSchema;l&&(d=Ut(r,c.errorSchema,"preventDuplicates"));const m=u,g=d;return{...this.mergeErrors({errorSchema:d,errors:u},s,o),schemaValidationErrors:m,schemaValidationErrorSchema:g}}getUsedFormData=(e,n)=>k0(e,n);getFieldNames=(e,n)=>M0(e,n);omitExtraData=e=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,e)};setFieldValue=(e,n)=>{const{registry:r}=this.state,i=Array.isArray(e)?e:e.split("."),s=Be("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[de])};onChange=(e,n,r,i)=>{this.pendingChanges.push({newValue:e,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:e,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:d}=this.props,{formData:m,schemaUtils:g,schema:f,fieldPathId:p,schemaValidationErrorSchema:y,errors:v}=this.state;let{customErrors:w,errorSchema:A}=this.state;const O=p.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===O;let x=this.state.retrievedSchema,S=b?e:Ds(m);const j=V(S)&&Object.keys(S).length>0&&Object.values(S).every(F=>F===void 0),E=m==null,C=j&&E?void 0:S;if(V(S)||Array.isArray(S)){e===Wc?Ax(S,n):b||ce(S,n,e);const F=this.getStateFromProps(this.props,C,void 0,void 0,void 0,!0);S=F.formData,x=F.retrievedSchema}const _=!l&&(c===!0||c==="onChange");let I={formData:S,schema:f},T=S;if(o===!0&&(a===!0||a==="onChange")&&(T=this.omitExtraData(S),I={formData:T}),d&&(T=rn(g.getValidator(),f,g.getRootSchema(),T),I={...I,formData:T}),i){const F=b?y:D(y,n);if(!ge(F))b?A=i:ce(A,n,i);else if(w||(w=new jc),b){const P=D(i,Ee);P&&w.setErrors(P)}else ce(w.ErrorSchema,n,i)}else w&&D(w.ErrorSchema,[...n,Ee])&&w.clearErrors(n);if(_&&this.pendingChanges.length===1){const F=this.liveValidate(f,g,A,T,s,w,x);I={formData:T,...F,customErrors:w}}else if(!l&&i){const F=this.mergeErrors({errorSchema:A,errors:v},s,w);I={formData:T,...F,customErrors:w}}this.setState(I,()=>{u&&u(Yt({...this.state,...I}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return ie(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{const{formData:e,initialFormData:n=Ua,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,e??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Yt({...this.state,...o})))};onBlur=(e,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(e,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:c}=this.props,{formData:u,schemaUtils:d,schema:m}=this.state;let g=u,f={formData:g};if(i===!0&&s==="onBlur"&&(g=this.omitExtraData(u),f={formData:g}),a&&(g=rn(d.getValidator(),m,d.getRootSchema(),g),f={...f,formData:g}),o==="onBlur"){const{schema:y,schemaUtils:v,errorSchema:w,customErrors:A,retrievedSchema:O}=this.state,b=this.liveValidate(y,v,w,g,c,A,O);f={formData:g,...b,customErrors:A}}const p=Object.keys(f).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const v=D(this.state,y),w=D(f,y);return!ie(v,w)});this.setState(f,()=>{l&&p&&l(Yt({...this.state,...f}),e)})}};onFocus=(e,n)=>{const{onFocus:r}=this.props;r&&r(e,n)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.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=rn(l.getValidator(),c,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},c=r?Ls(r):[];this.setState({formData:a,errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Yt({...this.state,formData:a},"submitted"),e)})}};getGlobalFormOptions(e){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=rl,idPrefix:s=nl,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=e;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(e,n,r){const{translateString:i,uiSchema:s={}}=e,{fields:o,templates:a,widgets:l,formContext:c,translateString:u}=ES();return{fields:{...o,...e.fields},templates:{...a,...e.templates,ButtonTemplates:{...a.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...l,...e.widgets},rootSchema:n,formContext:e.formContext||c,schemaUtils:r,translateString:i||u,globalUiOptions:s[Ui],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:s[Qf]??{}}}submit=()=>{if(this.formElement.current){const e=new CustomEvent("submit",{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=e,s=Tc(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=e=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(e),{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:e,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(e===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=rn(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:e,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:c,enctype:u,acceptCharset:d,noHtml5Validate:m=!1,disabled:g,readonly:f,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:v,uiSchema:w,formData:A,errorSchema:O,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:j}=x.templates.ButtonTemplates,E=y?i:void 0,C=y||i||"form";let{[Cr]:_={}}=M(w);g&&(_={..._,props:{..._.props,disabled:!0}});const I={[vt]:{[Cr]:_}};return h.jsxs(C,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:c,encType:u,acceptCharset:d,noValidate:m,onSubmit:this.onSubmit,as:E,ref:this.formElement,children:[p==="top"&&this.renderErrors(x),h.jsx(S,{name:"",schema:v,uiSchema:w,errorSchema:O,fieldPathId:b,formData:A,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:g,readonly:f}),e||h.jsx(j,{uiSchema:I,registry:x}),p==="bottom"&&this.renderErrors(x)]})}};function _S(t){return N.forwardRef(({fields:e,widgets:n,templates:r,...i},s)=>(e={...t?.fields,...e},n={...t?.widgets,...n},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},h.jsx(CS,{...t,...i,fields:e,widgets:n,templates:r,ref:s})))}function IS(t,e="none"){return e==="all"?t:t.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=e!=="anyOf"?s?.indexOf(`/${Q}/`):void 0,a=e!=="oneOf"?s?.indexOf(`/${W}/`):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 d;return u.message===i&&((d=u.schemaPath)===null||d===void 0?void 0:d.startsWith(l))})||n.push(r),n},[])}function TS(t=[],e,n){const r=t.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:c,parentSchema:u,...d}=i;let{message:m=""}=d,g=o.replace(/\//g,"."),f=`${g} ${m}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(v=>v);if(y.length>0)y.forEach(v=>{const w=g?`${g}.${v}`:v;let A=M(D(e,w.replace(/^\./,""))).title;if(A===void 0){const O=c.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([v]);A=M(D(e,O)).title}if(A)m=m.replace(`'${v}'`,`'${A}'`),p=A;else{const O=D(u,[se,v,"title"]);O&&(m=m.replace(`'${v}'`,`'${O}'`),p=O)}}),f=m;else{const v=M(D(e,g.replace(/^\./,""))).title;if(v)f=`'${v}' ${m}`.trim(),p=v;else{const w=u?.title;w&&(f=`'${w}' ${m}`.trim(),p=w)}}return"missingProperty"in l&&(g=g?`${g}.${l.missingProperty}`:l.missingProperty),{name:a,property:g,message:m,params:l,stack:f,schemaPath:c,title:p}});return IS(r,n)}function NS(t,e,n,r,i,s,o,a){const{validationError:l}=e;let c=TS(e.errors,o,a);l&&(c=[...c,{stack:l.message}]),typeof s=="function"&&(c=s(c,o));let u=hx(c);if(l&&(u={...u,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:u};const d=mc(t,r,n,r,!0),m=i(d,Li(d),o,u),g=Nc(m);return Dn({errors:c,errorSchema:u},g)}var hr={exports:{}},Ei={},La;function FS(){return La||(La=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(E,C){return{validate:E,compare:C}}t.fullFormats={date:e(s,o),time:e(l,c),"date-time":e(d,m),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:j,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:v,int32:{type:"number",validate:O},int64:{type:"number",validate:b},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":e(/^\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,m),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},t.formatNames=Object.keys(t.fullFormats);function n(E){return E%4===0&&(E%100!==0||E%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(E){const C=r.exec(E);if(!C)return!1;const _=+C[1],I=+C[2],T=+C[3];return I>=1&&I<=12&&T>=1&&T<=(I===2&&n(_)?29:i[I])}function o(E,C){if(E&&C)return E>C?1:E<C?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(E,C){const _=a.exec(E);if(!_)return!1;const I=+_[1],T=+_[2],F=+_[3],P=_[5];return(I<=23&&T<=59&&F<=59||I===23&&T===59&&F===60)&&(!C||P!=="")}function c(E,C){if(!(E&&C))return;const _=a.exec(E),I=a.exec(C);if(_&&I)return E=_[1]+_[2]+_[3]+(_[4]||""),C=I[1]+I[2]+I[3]+(I[4]||""),E>C?1:E<C?-1:0}const u=/t|\s/i;function d(E){const C=E.split(u);return C.length===2&&s(C[0])&&l(C[1],!0)}function m(E,C){if(!(E&&C))return;const[_,I]=E.split(u),[T,F]=C.split(u),P=o(_,T);if(P!==void 0)return P||c(I,F)}const g=/\/|:/,f=/^(?:[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(E){return g.test(E)&&f.test(E)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function v(E){return y.lastIndex=0,y.test(E)}const w=-2147483648,A=2**31-1;function O(E){return Number.isInteger(E)&&E<=A&&E>=w}function b(E){return Number.isInteger(E)}function x(){return!0}const S=/[^\\]\\Z/;function j(E){if(S.test(E))return!1;try{return new RegExp(E),!0}catch{return!1}}})(Ei)),Ei}var Ci={},Ba;function PS(){return Ba||(Ba=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=$u(),n=Ga(),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}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:c,schemaCode:u,keyword:d,it:m}=a,{opts:g,self:f}=m;if(!g.validateFormats)return;const p=new e.KeywordCxt(m,f.RULES.all.format.definition,"format");p.$data?y():v();function y(){const A=l.scopeValue("formats",{ref:f.formats,code:g.code.formats}),O=l.const("fmt",n._`${A}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${O} != "object"`,n._`${O} instanceof RegExp`,n._`typeof ${O}.compare != "function"`,w(O)))}function v(){const A=p.schema,O=f.formats[A];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${d}": format "${A}" does not define "compare" function`);const b=l.scopeValue("formats",{key:A,ref:O,code:g.code.formats?n._`${g.code.formats}${n.getProperty(A)}`:void 0});a.fail$data(w(b))}function w(A){return n._`${A}.compare(${c}, ${u}) ${i[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Ci)),Ci}var qa;function $S(){return qa||(qa=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=FS(),r=PS(),i=Ga(),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[d,m]=u.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],g=u.formats||n.formatNames;return l(c,g,d,m),u.keywords&&r.default(c),c};a.get=(c,u="full")=>{const m=(u==="fast"?n.fastFormats:n.fullFormats)[c];if(!m)throw new Error(`Unknown format "${c}"`);return m};function l(c,u,d,m){var g,f;(g=(f=c.opts.code).formats)!==null&&g!==void 0||(f.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const p of u)c.addFormat(p,d[p])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(hr,hr.exports)),hr.exports}var DS=$S();const Va=rs(DS),RS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},kS=/^(#?([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*\)))$/,MS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function US(t,e,n={},r,i=Xa,s){let o=new i({...RS,...n});return r?Va(o,r):r!==!1&&Va(o),o.addFormat("data-url",MS),o.addFormat("color",kS),o.addKeyword(at),o.addKeyword(ds),Array.isArray(t)&&o.addMetaSchema(t),te(e)&&Object.keys(e).forEach(a=>{o.addFormat(a,e[a])}),s&&(o=s(o)),o}class LS{constructor(e,n){this.hasRegisteredRootSchema=!1;const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:c}=e;this.ajv=US(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(e,n){var r,i;let s,o;try{e[de]&&(o=this.ajv.getSchema(e[de])),o===void 0&&(o=this.ajv.compile(e)),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 d;!((d=l.params)===null||d===void 0)&&d[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 d;!((d=l.params)===null||d===void 0)&&d[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(e,n,r,i,s){const o=this.rawValidation(n,e);return NS(this,o,e,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){var n,r;if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;const i=(n=e[de])!==null&&n!==void 0?n:il;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(e,i):ie(e,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(e,i)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,n,r){var i;try{this.handleSchemaUpdate(r);const s=Bs(e),o=(i=s[de])!==null&&i!==void 0?i:ax(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 BS(t={},e){return new LS(t,e)}const qS=BS();const Jc=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const VS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const zS=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const za=t=>{const e=zS(t);return e.charAt(0).toUpperCase()+e.slice(1)};var _i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const WS=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},HS=N.createContext({}),GS=()=>N.useContext(HS),KS=N.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:g=""}=GS()??{},f=r??d?Number(n??u)*24/Number(e??c):n??u;return N.createElement("svg",{ref:l,..._i,width:e??c??_i.width,height:e??c??_i.height,stroke:t??m,strokeWidth:f,className:Jc("lucide",g,i),...!s&&!WS(a)&&{"aria-hidden":"true"},...a},[...o.map(([p,y])=>N.createElement(p,y)),...Array.isArray(s)?s:[s]])});const it=(t,e)=>{const n=N.forwardRef(({className:r,...i},s)=>N.createElement(KS,{ref:s,iconNode:e,className:Jc(`lucide-${VS(za(t))}`,`lucide-${t}`,r),...i}));return n.displayName=za(t),n};const YS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],JS=it("check",YS);const ZS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zc=it("chevron-down",ZS);const XS=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],QS=it("chevron-up",XS);const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],tw=it("circle-alert",ew);const nw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Xc=it("circle-plus",nw);const rw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iw=it("circle",rw);const sw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ow=it("copy",sw);const aw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lw=it("search",aw);const cw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],uw=it("trash-2",cw);const dw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qc=it("x",dw);function J(...t){return Du(Ru(t))}const fw=is("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ks({className:t,variant:e,size:n,asChild:r=!1,...i}){const s=r?Ka:"button";return h.jsx(s,{"data-slot":"button",className:J(fw({variant:e,size:n,className:t})),...i})}function hw({uiSchema:t,registry:e,className:n,...r}){const{translateString:i}=e;return h.jsx("div",{className:"p-0 m-0",children:h.jsxs(Ks,{...r,className:J("w-fit gap-2",n),variant:"outline",type:"button",children:[h.jsx(Xc,{size:16})," ",i(K.AddItemButton)]})})}function mw(t){const{children:e,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:o,registry:a}=t,l=M(o),c=q("ArrayFieldItemButtonsTemplate",a,l),u=i?-6:22;return h.jsx("div",{children:h.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[h.jsx("div",{className:"grow shrink",children:e}),h.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&h.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${u}px`:void 0},children:h.jsx(c,{...n})})})]})})}function pw(t){const{canAdd:e,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:o,onAddClick:a,readonly:l,registry:c,required:u,schema:d,title:m}=t,g=M(i),f=q("ArrayFieldDescriptionTemplate",c,g),p=q("ArrayFieldTitleTemplate",c,g),y=!l&&!n,{ButtonTemplates:{AddButton:v}}=c.templates;return h.jsx("div",{children:h.jsx("div",{className:"m-0 flex p-0",children:h.jsxs("div",{className:"m-0 w-full p-0",children:[h.jsx(p,{fieldPathId:r,title:g.title||m,schema:d,uiSchema:i,required:u,registry:c,optionalDataControl:y?o:void 0}),h.jsx(f,{fieldPathId:r,description:g.description||d.description,schema:d,uiSchema:i,registry:c}),h.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[y?void 0:o,s,e&&h.jsx("div",{className:"mt-2 flex justify-end",children:h.jsx(v,{id:Qe(r,"add"),className:"rjsf-array-item-add",onClick:a,disabled:n||l,uiSchema:i,registry:c})})]},`array-item-list-${r.$id}`)]})})})}function eu({className:t,type:e,...n}){return h.jsx("input",{type:e,"data-slot":"input",className:J("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}function gw({id:t,htmlName:e,placeholder:n,required:r,readonly:i,disabled:s,type:o,value:a,onChange:l,onChangeOverride:c,onBlur:u,onFocus:d,autofocus:m,options:g,schema:f,rawErrors:p=[],children:y,extraProps:v,className:w,registry:A}){const{ClearButton:O}=A.templates.ButtonTemplates,b={...v,...Ac(f,o,g)},x=({target:{value:C}})=>l(C===""?g.emptyValue:C),S=({target:C})=>u(t,C&&C.value),j=({target:C})=>d(t,C&&C.value),E=N.useCallback(C=>{var _;C.preventDefault(),C.stopPropagation(),l((_=g.emptyValue)!==null&&_!==void 0?_:"")},[l,g.emptyValue]);return h.jsxs("div",{className:"p-0.5",children:[h.jsx(eu,{id:t,name:e||t,type:o,placeholder:n,autoFocus:m,required:r,disabled:s,readOnly:i,className:J({"border-destructive focus-visible:ring-0":p.length>0},w),list:f.examples?Kr(t):void 0,...b,value:a||a===0?a:"",onChange:c||x,onBlur:S,onFocus:j,"aria-describedby":Pe(t,!!f.examples)}),g.allowClearTextInputs&&!i&&!s&&a&&h.jsx(O,{onClick:E,registry:A}),y,h.jsx(Hc,{id:t,schema:f})]})}function yw({id:t,description:e,registry:n,uiSchema:r}){return e?h.jsx("div",{children:h.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:h.jsx(Hs,{description:e,registry:n,uiSchema:r})})}):null}const bw=is("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function xw({className:t,variant:e,...n}){return h.jsx("div",{"data-slot":"alert",role:"alert",className:J(bw({variant:e}),t),...n})}function vw({className:t,...e}){return h.jsx("div",{"data-slot":"alert-title",className:J("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Sw({className:t,...e}){return h.jsx("div",{"data-slot":"alert-description",className:J("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function ww({errors:t,registry:e}){const{translateString:n}=e;return h.jsxs(xw,{variant:"destructive",className:"mb-2",children:[h.jsx(tw,{className:"h-4 w-4"}),h.jsx(vw,{children:n(K.ErrorsLabel)}),h.jsx(Sw,{className:"flex flex-col gap-1",children:t.map((r,i)=>h.jsxs("span",{children:["• ",r.stack]},i))})]})}function jw(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=ks(n);return h.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((i,s)=>h.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function Ow(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i,hasErrors:s}=t;return n?h.jsx("span",{className:J("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:Ms(e),children:h.jsx(Gs,{help:n,registry:i,uiSchema:r})}):null}function Aw({id:t,children:e,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:o,rawDescription:a,classNames:l,style:c,disabled:u,label:d,hidden:m,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,readonly:y,required:v,schema:w,uiSchema:A,registry:O}){const b=M(A),x=q("WrapIfAdditionalTemplate",O,b);if(m)return h.jsx("div",{className:"hidden",children:e});const S=b.widget==="checkbox";return h.jsx(x,{classNames:l,style:c,disabled:u,id:t,label:d,displayLabel:n,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,rawDescription:a,readonly:y,required:v,schema:w,uiSchema:A,registry:O,children:h.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!S&&h.jsxs("label",{className:J("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[d,v?"*":null]}),e,n&&a&&!S&&h.jsx("span",{className:J("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:o}),i,s]})})}function Ew(t){const{children:e,column:n,className:r,...i}=t;return h.jsx("div",{className:J("grid gap-2",r),...i,children:e})}function Cw(t){const{icon:e,iconType:n,className:r,uiSchema:i,registry:s,...o}=t;return h.jsx(Ks,{size:"icon",variant:"outline",className:r,...o,type:"button",children:e})}const Sn=N.memo(Cw);function _w(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.CopyButton),...t,icon:h.jsx(ow,{className:"h-4 w-4"})})}const Iw=N.memo(_w);function Tw(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.MoveDownButton),...t,icon:h.jsx(Zc,{className:"h-4 w-4"})})}const Nw=N.memo(Tw);function Fw(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.MoveUpButton),...t,icon:h.jsx(QS,{className:"h-4 w-4"})})}const Pw=N.memo(Fw);function $w(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.RemoveButton),...t,className:"border-destructive",icon:h.jsx(uw,{className:"h-4 w-4 stroke-destructive"})})}const tu=N.memo($w);function Dw(t){const{registry:{translateString:e}}=t;return h.jsx(Sn,{title:e(K.ClearButton),...t,icon:h.jsx(Qc,{})})}const Rw=N.memo(Dw);function kw({selector:t,optionSchemaField:e}){return h.jsxs("div",{className:J("p-4 border rounded-md bg-background shadow-sm"),children:[h.jsx("div",{className:J("mb-4"),children:t}),e]})}function Mw({description:t,title:e,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:o,formData:a,optionalDataControl:l,onAddProperty:c,disabled:u,readonly:d,registry:m}){const g=M(i),f=q("TitleFieldTemplate",m,g),p=q("DescriptionFieldTemplate",m,g),y=!d&&!u,{ButtonTemplates:{AddButton:v}}=m.templates;return h.jsxs(h.Fragment,{children:[e&&h.jsx(f,{id:Yr(s),title:e,required:r,schema:o,uiSchema:i,registry:m,optionalDataControl:y?l:void 0}),t&&h.jsx(p,{id:Gt(s),description:t,schema:o,uiSchema:i,registry:m}),h.jsxs("div",{className:"flex flex-col gap-2",children:[y?void 0:l,n.map(w=>h.jsx("div",{className:`${w.hidden?"hidden":""} flex`,children:h.jsx("div",{className:"w-full",children:w.content})},w.name)),sl(o,i,a)?h.jsx("div",{className:"mt-2 flex justify-end",children:h.jsx(v,{id:Qe(s,"add"),onClick:c,disabled:u||d,className:"rjsf-object-property-expand",uiSchema:i,registry:m})}):null]})]})}function Uw(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?h.jsx(Sn,{id:e,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:h.jsx(Xc,{}),size:"xs"}):s?h.jsx(tu,{id:e,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):h.jsx("em",{id:e,children:r})}function Lw(t){const{submitText:e,norender:n,props:r}=Ec(t.uiSchema);return n?null:h.jsx("div",{children:h.jsx(Ks,{type:"submit",...r,className:J("my-2",r?.className),children:e})})}function nu({className:t,orientation:e="horizontal",decorative:n=!0,...r}){return h.jsx(ku,{"data-slot":"separator",decorative:n,orientation:e,className:J("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Bw({id:t,title:e,uiSchema:n,optionalDataControl:r}){const i=M(n);let s=h.jsx("h5",{children:i.title||e});return r&&(s=h.jsxs("div",{className:"flex flex-row",children:[h.jsx("div",{className:"flex-grow",children:s}),h.jsx("div",{className:"flex",children:r})]})),h.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[s,h.jsx(nu,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function qw({classNames:t,style:e,children:n,disabled:r,id:i,label:s,displayLabel:o,onRemoveProperty:a,onKeyRenameBlur:l,rawDescription:c,readonly:u,required:d,schema:m,uiSchema:g,registry:f}){const{templates:p,translateString:y}=f,{RemoveButton:v}=p.ButtonTemplates,w=y(K.KeyLabel,[s]);if(!(at in m))return h.jsx("div",{className:t,style:e,children:n});const b=o?22+(c?-28:0):0,x=`${i}-key`;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[h.jsx("div",{className:"grid gap-2 col-span-5",children:h.jsxs("div",{className:"flex flex-col gap-2",children:[o&&h.jsx("label",{htmlFor:x,className:"text-sm font-medium text-muted-foreground leading-none",children:w}),h.jsx("div",{className:"pl-0.5",children:h.jsx(eu,{required:d,defaultValue:s,disabled:r||u,id:x,name:x,onBlur:u?void 0:l,type:"text",className:"w-full border shadow-sm"},s)}),!!c&&h.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:h.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),h.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),h.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${b}px`},children:h.jsx(v,{id:Qe(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||u,onClick:a,uiSchema:g,registry:f})})]}),h.jsx(nu,{dir:"horizontal",className:"mt-2"})]})}function Vw(){return{ArrayFieldItemTemplate:mw,ArrayFieldTemplate:pw,BaseInputTemplate:gw,ButtonTemplates:{AddButton:hw,CopyButton:Iw,MoveDownButton:Nw,MoveUpButton:Pw,RemoveButton:tu,SubmitButton:Lw,ClearButton:Rw},DescriptionFieldTemplate:yw,ErrorListTemplate:ww,FieldErrorTemplate:jw,FieldHelpTemplate:Ow,FieldTemplate:Aw,GridTemplate:Ew,MultiSchemaFieldTemplate:kw,ObjectFieldTemplate:Mw,OptionalDataControlsTemplate:Uw,TitleFieldTemplate:Bw,WrapIfAdditionalTemplate:qw}}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Ww=["color"],Hw=N.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=zw(t,Ww);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),N.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function ru({className:t,...e}){return h.jsx(Mu,{"data-slot":"checkbox",className:J("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:h.jsx(Uu,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:h.jsx(Hw,{className:"size-3.5"})})})}function Ys({className:t,...e}){return h.jsx(Lu,{"data-slot":"label",className:J("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function Gw({id:t,htmlName:e,disabled:n,options:r,value:i,autofocus:s,readonly:o,required:a,onChange:l,onBlur:c,onFocus:u,className:d}){const{enumOptions:m,enumDisabled:g,inline:f,emptyValue:p}=r,y=xn(r),v=Array.isArray(i)?i:[i],w=({target:O})=>c(t,Te(O&&O.value,m,y,p)),A=({target:O})=>u(t,Te(O&&O.value,m,y,p));return h.jsx("div",{className:J({"flex flex-col gap-2":!f,"flex flex-row gap-4 flex-wrap":f}),children:Array.isArray(m)&&m.map((O,b)=>{const x=sr(O.value,v),S=Array.isArray(g)&&g.includes(O.value),j=$t(t,b);return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ru,{id:j,name:e||t,required:a,disabled:n||S||o,onCheckedChange:E=>{l(E?wc(b,v,m):vc(b,v,m))},className:d,checked:x,autoFocus:s&&b===0,onBlur:w,onFocus:A,"aria-describedby":Pe(t)}),h.jsx(Ys,{className:"leading-tight",htmlFor:$t(t,b),children:O.label})]},j)})})}function Kw(t){const{id:e,htmlName:n,value:r,disabled:i,readonly:s,label:o,hideLabel:a,schema:l,autofocus:c,options:u,onChange:d,onBlur:m,onFocus:g,registry:f,uiSchema:p,className:y}=t,v=qn(l),w=q("DescriptionFieldTemplate",f,u),A=S=>d(S),O=()=>m(e,r),b=()=>g(e,r),x=u.description||l.description;return h.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":Pe(e),children:[!a&&x&&h.jsx(w,{id:Gt(e),description:x,schema:l,uiSchema:p,registry:f}),h.jsxs("div",{className:"flex items-center gap-2 my-2",children:[h.jsx(ru,{id:e,name:n||e,checked:typeof r>"u"?!1:!!r,required:v,disabled:i||s,autoFocus:c,onCheckedChange:A,onBlur:O,onFocus:b,className:y}),h.jsx(Ys,{className:"leading-tight",htmlFor:e,children:_c(o,a||!o)})]})]})}var Js="Radio",[Yw,iu]=Ja(Js),[Jw,Zw]=Yw(Js),su=N.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,form:c,...u}=t,[d,m]=N.useState(null),g=ss(e,y=>m(y)),f=N.useRef(!1),p=d?c||!!d.closest("form"):!0;return h.jsxs(Jw,{scope:n,checked:i,disabled:o,children:[h.jsx($r.button,{type:"button",role:"radio","aria-checked":i,"data-state":cu(i),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:g,onClick:Ii(t.onClick,y=>{i||l?.(),p&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})}),p&&h.jsx(lu,{control:d,bubbles:!f.current,name:r,value:a,checked:i,required:s,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});su.displayName=Js;var ou="RadioIndicator",au=N.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,s=Zw(ou,n);return h.jsx(Wu,{present:r||s.checked,children:h.jsx($r.span,{"data-state":cu(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e})})});au.displayName=ou;var Xw="RadioBubbleInput",lu=N.forwardRef(({__scopeRadio:t,control:e,checked:n,bubbles:r=!0,...i},s)=>{const o=N.useRef(null),a=ss(o,s),l=Hu(n),c=Gu(e);return N.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&g){const f=new Event("click",{bubbles:r});g.call(u,n),u.dispatchEvent(f)}},[l,n,r]),h.jsx($r.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});lu.displayName=Xw;function cu(t){return t?"checked":"unchecked"}var Qw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xr="RadioGroup",[ej]=Ja(Xr,[Ya,iu]),uu=Ya(),du=iu(),[tj,nj]=ej(Xr),fu=N.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...m}=t,g=uu(n),f=Bu(c),[p,y]=qu({prop:s,defaultProp:i??null,onChange:d,caller:Xr});return h.jsx(tj,{scope:n,name:r,required:o,disabled:a,value:p,onValueChange:y,children:h.jsx(Vu,{asChild:!0,...g,orientation:l,dir:f,loop:u,children:h.jsx($r.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:f,...m,ref:e})})})});fu.displayName=Xr;var hu="RadioGroupItem",mu=N.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,s=nj(hu,n),o=s.disabled||r,a=uu(n),l=du(n),c=N.useRef(null),u=ss(e,c),d=s.value===i.value,m=N.useRef(!1);return N.useEffect(()=>{const g=p=>{Qw.includes(p.key)&&(m.current=!0)},f=()=>m.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",f),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",f)}},[]),h.jsx(zu,{asChild:!0,...a,focusable:!o,active:d,children:h.jsx(su,{disabled:o,required:s.required,checked:d,...l,...i,name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ii(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Ii(i.onFocus,()=>{m.current&&c.current?.click()})})})});mu.displayName=hu;var rj="RadioGroupIndicator",pu=N.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=du(n);return h.jsx(au,{...i,...r,ref:e})});pu.displayName=rj;var ij=fu,sj=mu,oj=pu;function aj({className:t,...e}){return h.jsx(ij,{"data-slot":"radio-group",className:J("grid gap-3",t),...e})}function lj({className:t,...e}){return h.jsx(sj,{"data-slot":"radio-group-item",className:J("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:h.jsx(oj,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:h.jsx(iw,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function cj({id:t,options:e,value:n,required:r,disabled:i,readonly:s,onChange:o,onBlur:a,onFocus:l,className:c}){const{enumOptions:u,enumDisabled:d,emptyValue:m}=e,g=xn(e),f=w=>o(Te(w,u,g,m)),p=({target:w})=>a(t,Te(w&&w.value,u,g,m)),y=({target:w})=>l(t,Te(w&&w.value,u,g,m)),v=!!(e&&e.inline);return h.jsx("div",{className:"mb-0",children:h.jsx(aj,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:w=>{f(w)},onBlur:p,onFocus:y,"aria-describedby":Pe(t),orientation:v?"horizontal":"vertical",className:J("flex flex-wrap",{"flex-col":!v},c),children:Array.isArray(u)&&u.map((w,A)=>{const O=Array.isArray(d)&&d.includes(w.value),b=sr(w.value,n);return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(lj,{checked:b,value:or(w.value,A,g),id:$t(t,A),disabled:O}),h.jsx(Ys,{className:"leading-tight",htmlFor:$t(t,A),children:w.label})]},$t(t,A))})})})}function uj({className:t,defaultValue:e,value:n,min:r=0,max:i=100,...s}){const o=N.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,i],[n,e,r,i]);return h.jsxs(vd,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:i,className:J("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...s,children:[h.jsx(Sd,{"data-slot":"slider-track",className:J("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:h.jsx(wd,{"data-slot":"slider-range",className:J("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(a,l)=>h.jsx(jd,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}const dj=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function fj({value:t,readonly:e,disabled:n,options:r,schema:i,onChange:s,label:o,id:a}){const l=d=>s(d[0]),c={...Oc(i)},u={id:a,...$s(r.props||{},dj)};return h.jsxs(h.Fragment,{children:[h.jsx(uj,{disabled:n||e,min:c.min,max:c.max,step:c.step,value:[t],onValueChange:l,...u,"aria-describedby":Pe(a)}),t]})}const hj=is("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function mj({className:t,variant:e,asChild:n=!1,...r}){const i=n?Ka:"span";return h.jsx(i,{"data-slot":"badge",className:J(hj({variant:e}),t),...r})}const gu=N.forwardRef(({className:t,...e},n)=>h.jsx(Bt,{ref:n,"data-slot":"command",className:J("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),pj=N.forwardRef(({className:t,...e},n)=>h.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[h.jsx(lw,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),h.jsx(Bt.Input,{ref:n,className:J("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));pj.displayName=Bt.Input.displayName;function yu({className:t,...e}){return h.jsx(Bt.List,{"data-slot":"command-list",className:J("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function bu({className:t,...e}){return h.jsx(Bt.Group,{"data-slot":"command-group",className:J("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function xu({className:t,...e}){return h.jsx(Bt.Item,{"data-slot":"command-item",className:J("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function gj({multiple:t,items:e=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:o,ariaPlaceholder:a,onFocus:l,onBlur:c,className:u,id:d}){const m=N.useRef(null),[g,f]=N.useState(!1),[p,y]=N.useState(""),v=N.useMemo(()=>e.filter(S=>n.some(j=>wr(S.value,j))),[e,n]),w=N.useMemo(()=>e.filter(S=>!v.some(j=>wr(j.value,S.value))),[e,v]),A=N.useCallback(S=>{if(s)return;const j=v.filter(E=>!wr(E.value,S.value));r?.(j.map(E=>E.index))},[v,r,s]),O=N.useCallback(S=>{if(!(s||!m.current||m.current.value!==""))if(S.key==="Delete"||S.key==="Backspace"){const j=v.slice(0,-1);r?.(j.map(E=>E.index))}else S.key==="Escape"&&m.current.blur()},[v,r,s]),b=N.useCallback(S=>{if(s)return;y("");const j=t?[...v,S]:[S];r?.(j.map(E=>E.index))},[t,v,r,s]),x=N.useCallback(S=>{s||f(!0),l?.(S)},[s,l]);return h.jsxs(gu,{onKeyDown:O,className:J("overflow-visible bg-transparent",u),autoFocus:i,"aria-disabled":s,onBlur:c,onFocus:x,"aria-describedby":o,"aria-placeholder":a,children:[h.jsx("div",{className:J("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:h.jsxs("div",{className:"flex gap-1 flex-wrap",children:[v.map(S=>h.jsxs(mj,{variant:"secondary",children:[S.label,h.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:j=>j.key==="Enter"&&!s&&A(S),onMouseDown:j=>{j.preventDefault(),j.stopPropagation()},onClick:()=>A(S),disabled:s,children:h.jsx(Qc,{className:J("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},S.value)),h.jsx(Bt.Input,{ref:m,value:p,onValueChange:y,onBlur:()=>f(!1),onFocus:()=>!s&&f(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),g&&!s&&w.length>0&&h.jsx("div",{className:"relative mt-2",children:h.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:h.jsx(bu,{className:"h-full overflow-auto",children:h.jsx(yu,{children:w.map(S=>h.jsx(xu,{disabled:S.disabled,onMouseDown:j=>{j.preventDefault(),j.stopPropagation()},"aria-controls":`${S.value}-command-item`,"aria-labelledby":`${S.value}-command-item`,id:`${S.value}-command-item`,onSelect:()=>b(S),className:"cursor-pointer",children:S.label},`${S.value}-command-item`))})})})})]})}function yj({items:t,selected:e,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:o="Select...",ariaDescribedby:a,ariaPlaceholder:l,onFocus:c,onBlur:u,className:d}){const[m,g]=N.useState(!1),f=t?.find(w=>w.value===e),p=N.useRef(null),y=N.useRef(null);N.useEffect(()=>{m&&p.current&&requestAnimationFrame(()=>{var w;(w=p.current)===null||w===void 0||w.scrollIntoView({block:"nearest"})})},[m]);const v=w=>{y.current&&!y.current.contains(w.relatedTarget)&&g(!1),u?.(w)};return h.jsxs(gu,{ref:y,className:J("overflow-visible bg-transparent",d),autoFocus:r,"aria-disabled":i,onBlur:v,onFocus:c,"aria-describedby":a,"aria-placeholder":l,children:[h.jsxs("div",{role:"button",tabIndex:i?-1:0,onClick:()=>!i&&g(!m),onKeyDown:w=>(w.key==="Enter"||w.key===" ")&&!i&&g(!m),className:J("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!f&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",d),children:[h.jsx("span",{className:J("flex-1 line-clamp-1",!f&&"text-muted-foreground"),children:f?.label||o}),h.jsx(Zc,{className:"h-4 w-4 opacity-50"})]}),h.jsx("div",{className:"relative",children:m&&t&&t.length>0?h.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:h.jsx(bu,{className:"h-full overflow-auto",children:h.jsx(yu,{children:t.map(w=>h.jsxs(xu,{ref:w.value===e?p:void 0,onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},onSelect:()=>{w.disabled||(n?.(w.value),g(!1))},className:J("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",w.value===e&&"font-semibold",w.disabled&&"opacity-50 cursor-not-allowed"),children:[h.jsx("span",{children:w.label}),h.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:w.value===e&&h.jsx(JS,{className:"h-4 w-4"})})]},w.value))})})}):null})]})}function bj({id:t,options:e,required:n,disabled:r,readonly:i,value:s,multiple:o,autofocus:a,onChange:l,onBlur:c,onFocus:u,placeholder:d,rawErrors:m=[],className:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=e,v=xn(e),w=()=>{u(t,Te(s,f,v,y))},A=()=>{c(t,Te(s,f,v,y))},O=f?.map(({value:x,label:S},j)=>({value:o?x:or(x,j,v),label:S,index:j,disabled:Array.isArray(p)&&p.includes(x)})),b=J({"border-destructive":m.length>0},g);return h.jsx("div",{className:"p-0.5",children:o?h.jsx(gj,{id:t,autoFocus:a,disabled:r||i,multiple:!0,className:b,items:O,selected:s,onValueChange:x=>{l(Te(x.map(String),f,v,y))},onFocus:w,onBlur:A}):h.jsx(yj,{items:O,selected:Sc(s,f,!1,v,""),onValueChange:x=>{l(Te(x,f,v,y))},autoFocus:a,disabled:r||i,required:n,placeholder:d,className:b,onFocus:w,onBlur:A,ariaDescribedby:Pe(t)})})}function xj({className:t,...e}){return h.jsx("textarea",{"data-slot":"textarea",className:J("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function vj({id:t,htmlName:e,placeholder:n,value:r,required:i,disabled:s,autofocus:o,readonly:a,onBlur:l,onFocus:c,onChange:u,options:d,className:m}){const g=({target:{value:y}})=>u(y===""?d.emptyValue:y),f=({target:y})=>l(t,y&&y.value),p=({target:y})=>c(t,y&&y.value);return h.jsx("div",{className:"flex p-0.5",children:h.jsx(xj,{id:t,name:e||t,placeholder:n,disabled:s,readOnly:a,value:r??"",required:i,autoFocus:o,rows:d.rows||5,onChange:g,onBlur:f,onFocus:p,"aria-describedby":Pe(t),className:m})})}function Sj(){return{CheckboxWidget:Kw,CheckboxesWidget:Gw,RadioWidget:cj,RangeWidget:fj,SelectWidget:bj,TextareaWidget:vj}}function wj(){return{templates:Vw(),widgets:Sj()}}function jj(){return _S(wj())}const Oj=jj();function Aj(t){const e=je.c(21),{virtualMcp:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=os("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",i),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==n.icon||e[3]!==n.title?(o=h.jsx(Qa,{icon:n.icon,name:n.title,size:"sm"}),e[2]=n.icon,e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n.title?(a=h.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[5]=n.title,e[6]=a):a=e[6];let l;e[7]!==r?(l=r&&h.jsx(Ju,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=l):l=e[8];let c;e[9]!==a||e[10]!==l?(c=h.jsxs("div",{className:"flex items-center justify-between",children:[a,l]}),e[9]=a,e[10]=l,e[11]=c):c=e[11];let u;e[12]!==n.description?(u=n.description&&h.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[12]=n.description,e[13]=u):u=e[13];let d;e[14]!==c||e[15]!==u?(d=h.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[c,u]}),e[14]=c,e[15]=u,e[16]=d):d=e[16];let m;return e[17]!==s||e[18]!==o||e[19]!==d?(m=h.jsxs("div",{className:s,children:[o,d]}),e[17]=s,e[18]=o,e[19]=d,e[20]=m):m=e[20],m}function Ej(){const t=je.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(as,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Cj(t){const e=je.c(40),{selectedVirtualMcpId:n,onVirtualMcpChange:r,searchInputRef:i}=t,s=nt(),o=Nd(),[a,l]=N.useState(""),c=N.useRef(null),u=i??c;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={navigateOnCreate:!0},e[0]=d):d=e[0];const{createVirtualMCP:m,isCreating:g}=$d(d);let f,p,y,v;if(e[1]!==m||e[2]!==u||e[3]!==g||e[4]!==r||e[5]!==a||e[6]!==n||e[7]!==s||e[8]!==o){let O;e:{const F=o.filter(_j);if(!a.trim()){O=F;break e}const P=a.toLowerCase();O=F.filter($=>$.title.toLowerCase().includes(P)||$.description?.toLowerCase().includes(P))}const b=O;let x;e[13]!==r?(x=F=>{r(F),l("")},e[13]=r,e[14]=x):x=e[14];const S=x;y="flex flex-col max-h-[min(400px,60dvh)]";let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=h.jsx(Fd,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[15]=j):j=e[15];let E;e[16]!==s?(E=s("chat.selectVirtualMcp.searchPlaceholder"),e[16]=s,e[17]=E):E=e[17];let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=F=>l(F.target.value),e[18]=C):C=e[18];let _;e[19]!==u||e[20]!==a||e[21]!==E?(_=h.jsx(Zu,{ref:u,type:"text",placeholder:E,value:a,onChange:C,className:"flex-1 h-8 text-sm border-0 shadow-none p-0"}),e[19]=u,e[20]=a,e[21]=E,e[22]=_):_=e[22];let I;e[23]!==g||e[24]!==s?(I=s(g?"chat.selectVirtualMcp.creating":"chat.selectVirtualMcp.createAgent"),e[23]=g,e[24]=s,e[25]=I):I=e[25];let T;e[26]!==m||e[27]!==g||e[28]!==I?(T=h.jsx(Dr,{onClick:m,variant:"outline",className:"shrink-0",disabled:g,children:I}),e[26]=m,e[27]=g,e[28]=I,e[29]=T):T=e[29],e[30]!==_||e[31]!==T?(v=h.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:h.jsxs("div",{className:"relative flex items-center gap-2",children:[j,_,T]})}),e[30]=_,e[31]=T,e[32]=v):v=e[32],f="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",p=b.length>0?h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:b.map(F=>h.jsx("div",{role:"button",tabIndex:0,onClick:()=>S(F.id),onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),S(F.id))},className:"focus-ring rounded-xl",children:h.jsx(Aj,{virtualMcp:F,isSelected:F.id===n})},F.id))}):h.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:s("chat.selectVirtualMcp.noAgentsFound")}),e[1]=m,e[2]=u,e[3]=g,e[4]=r,e[5]=a,e[6]=n,e[7]=s,e[8]=o,e[9]=f,e[10]=p,e[11]=y,e[12]=v}else f=e[9],p=e[10],y=e[11],v=e[12];let w;e[33]!==f||e[34]!==p?(w=h.jsx("div",{className:f,children:p}),e[33]=f,e[34]=p,e[35]=w):w=e[35];let A;return e[36]!==y||e[37]!==v||e[38]!==w?(A=h.jsxs("div",{className:y,children:[v,w]}),e[36]=y,e[37]=v,e[38]=w,e[39]=A):A=e[39],A}function _j(t){return!t.id||!Yu(t.id)}function Ij(t){const e=je.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=h.jsx(Ej,{}),e[0]=n):n=e[0];let r;return e[1]!==t?(r=h.jsx(N.Suspense,{fallback:n,children:h.jsx(Cj,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function Tj(t){const e=je.c(35),{selectedVirtualMcpId:n,selectedVirtualMcp:r,onVirtualMcpChange:i,className:s,showTooltip:o,disabled:a}=t,l=o===void 0?!0:o,c=a===void 0?!1:a,u=nt(),[d,m]=N.useState(!1),g=N.useRef(null);let f;e[0]!==i?(f=$=>{i($),m(!1)},e[0]=i,e[1]=f):f=e[1];const p=f,y=Pd();let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=$=>{m($)},e[2]=v):v=e[2];const w=v;let A,O;e[3]!==y||e[4]!==d?(A=()=>{d&&!y&&setTimeout(()=>{g.current?.focus()},0)},O=[d,y],e[3]=y,e[4]=d,e[5]=A,e[6]=O):(A=e[5],O=e[6]),N.useEffect(A,O);const b=c?!1:d,x=c?void 0:w,S=c?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let j;e[7]!==s||e[8]!==S?(j=os("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",S,s),e[7]=s,e[8]=S,e[9]=j):j=e[9];let E;e[10]!==u?(E=u("chat.selectVirtualMcp.selectAgent"),e[10]=u,e[11]=E):E=e[11];let C;e[12]!==r?(C=r?h.jsx(Qa,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):h.jsxs(h.Fragment,{children:[h.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[h.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),h.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),h.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),h.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),h.jsx(Ku,{size:16})]}),e[12]=r,e[13]=C):C=e[13];let _;e[14]!==c||e[15]!==j||e[16]!==E||e[17]!==C?(_=h.jsx(_d,{asChild:!0,children:h.jsx(Od,{asChild:!0,children:h.jsx("button",{type:"button",disabled:c,className:j,"aria-label":E,children:C})})}),e[14]=c,e[15]=j,e[16]=E,e[17]=C,e[18]=_):_=e[18];let I;e[19]!==d||e[20]!==r?.title||e[21]!==l||e[22]!==u?(I=l&&!d&&h.jsx(Cd,{side:"top",className:"text-xs",children:r?.title??u("chat.selectVirtualMcp.chooseAgentTooltip")}),e[19]=d,e[20]=r?.title,e[21]=l,e[22]=u,e[23]=I):I=e[23];let T;e[24]!==_||e[25]!==I?(T=h.jsx(Id,{children:h.jsxs(Td,{children:[_,I]})}),e[24]=_,e[25]=I,e[26]=T):T=e[26];let F;e[27]!==p||e[28]!==n?(F=h.jsx(Ad,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:h.jsx(Ij,{selectedVirtualMcpId:n,onVirtualMcpChange:p,searchInputRef:g})}),e[27]=p,e[28]=n,e[29]=F):F=e[29];let P;return e[30]!==T||e[31]!==F||e[32]!==b||e[33]!==x?(P=h.jsxs(Ed,{open:b,onOpenChange:x,children:[T,F]}),e[30]=T,e[31]=F,e[32]=b,e[33]=x,e[34]=P):P=e[34],P}function Nj(t){const e=t.properties;if(!e)return!1;const n=e.__type,r=e.__binding;return!!(n?.const||r?.const)}function Fj(t){const e=t.properties;if(!e)return{};const n=e.__type,r=e.__binding;return{bindingType:n?.const,bindingSchema:r?.const}}function Pj(t){const e=je.c(10),{bindingSchema:n,bindingType:r,currentValue:i,onValueChange:s,placeholder:o,onAddNew:a,className:l}=t;let c;e[0]!==r?(c=Wf(r),e[0]=r,e[1]=c):c=e[1];const d=c??(typeof n=="string"?n:n??void 0);let m;return e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==a||e[6]!==s||e[7]!==o||e[8]!==d?(m=h.jsx($j,{value:i,onValueChange:s,placeholder:o,binding:d,bindingType:r,onAddNew:a,className:l}),e[2]=r,e[3]=l,e[4]=i,e[5]=a,e[6]=s,e[7]=o,e[8]=d,e[9]=m):m=e[9],m}function $j({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:s,className:o}){const a=nt(),[l,c]=N.useState(!1),{installByBinding:u,isInstalling:d}=Hf(),m=l||d,g=r?void 0:i||void 0,f=dd(r?{binding:r}:g?{filters:[{column:"app_name",value:g}]}:{}),p=fd(t&&!f.some(A=>A.id===t)?t:void 0),y=p?[p,...f]:f,v=i?.startsWith("@"),w=async()=>{if(v&&i){c(!0);try{const A=await u(i);A&&e(A.id)}catch(A){const O=A instanceof Error?A.message:String(A);mr.error(a("details.mcpConfigurationForm.failedToConnectMcp",{message:O}))}finally{c(!1)}return}s?.()};return h.jsxs(pd,{value:t,onValueChange:e,children:[h.jsx(gd,{size:"sm",className:os("w-[200px]",o),children:h.jsx(yd,{placeholder:n})}),h.jsxs(bd,{children:[y.length===0?h.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:a("details.mcpConfigurationForm.noConnectionsFound")}):y.map(A=>h.jsx(xd,{value:A.id,children:h.jsxs("div",{className:"flex items-center gap-2",children:[A.icon?h.jsx("img",{src:A.icon,alt:A.title,className:"w-4 h-4 rounded"}):h.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:A.title.slice(0,1).toUpperCase()}),h.jsx("span",{children:A.title})]})},A.id)),(s||v)&&h.jsx("div",{className:"border-t border-border",children:h.jsx(Dr,{onClick:A=>{A.preventDefault(),A.stopPropagation(),w()},disabled:m,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-accent text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:m?h.jsxs(h.Fragment,{children:[h.jsx(as,{className:"size-4"}),h.jsx("span",{children:a("details.mcpConfigurationForm.connecting")})]}):h.jsxs(h.Fragment,{children:[h.jsx(md,{size:16}),h.jsx("span",{children:a("details.mcpConfigurationForm.customConnection")})]})})})]})]})}function Dj(t){const e=je.c(54),n=nt(),{schema:r,formData:i,title:s,description:o,registry:a}=t,l=a.formContext,c=s||"",u=s||"";if(Nj(r)){const g=r;let f;e[0]!==g?(f=Fj(g),e[0]=g,e[1]=f):f=e[1];const{bindingType:p,bindingSchema:y}=f,w=(l?.formData?.[c]?.value??i?.value)||"";let A;e[2]!==p||e[3]!==c||e[4]!==l||e[5]!==i?(A=P=>{const $={...i,value:P??"",...p&&{__type:p}};l?.onFieldChange(c,$)},e[2]=p,e[3]=c,e[4]=l,e[5]=i,e[6]=A):A=e[6];const O=A,b=kj;let x;e[7]!==u||e[8]!==c||e[9]!==s?(x=b(s||u||c),e[7]=u,e[8]=c,e[9]=s,e[10]=x):x=e[10];const S=x;if(p==="@deco/agent"){let P;e[11]!==S?(P=h.jsx("label",{className:"text-sm font-medium truncate block",children:S}),e[11]=S,e[12]=P):P=e[12];let $;e[13]!==o?($=o&&h.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[13]=o,e[14]=$):$=e[14];let R;e[15]!==P||e[16]!==$?(R=h.jsxs("div",{className:"flex-1 min-w-0",children:[P,$]}),e[15]=P,e[16]=$,e[17]=R):R=e[17];const B=w||void 0;let U;e[18]!==S||e[19]!==n?(U=n("details.mcpConfigurationForm.selectPlaceholder",{title:S.toLowerCase()}),e[18]=S,e[19]=n,e[20]=U):U=e[20];let Y;e[21]!==O||e[22]!==B||e[23]!==U?(Y=h.jsx(Tj,{selectedVirtualMcpId:B,onVirtualMcpChange:O,variant:"bordered",placeholder:U,className:"w-[200px] shrink-0"}),e[21]=O,e[22]=B,e[23]=U,e[24]=Y):Y=e[24];let ne;return e[25]!==R||e[26]!==Y?(ne=h.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[R,Y]}),e[25]=R,e[26]=Y,e[27]=ne):ne=e[27],ne}let j;e[28]!==S?(j=h.jsx("label",{className:"text-sm font-medium truncate block",children:S}),e[28]=S,e[29]=j):j=e[29];let E;e[30]!==o?(E=o&&h.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[30]=o,e[31]=E):E=e[31];let C;e[32]!==j||e[33]!==E?(C=h.jsxs("div",{className:"flex-1 min-w-0",children:[j,E]}),e[32]=j,e[33]=E,e[34]=C):C=e[34];let _;e[35]!==S||e[36]!==n?(_=n("details.mcpConfigurationForm.selectPlaceholder",{title:S.toLowerCase()}),e[35]=S,e[36]=n,e[37]=_):_=e[37];let I;e[38]!==l?(I=()=>l?.onAddNew(),e[38]=l,e[39]=I):I=e[39];let T;e[40]!==y||e[41]!==p||e[42]!==w||e[43]!==O||e[44]!==_||e[45]!==I?(T=h.jsx(Pj,{bindingSchema:y,bindingType:p,currentValue:w,onValueChange:O,placeholder:_,onAddNew:I,className:"w-[200px] shrink-0"}),e[40]=y,e[41]=p,e[42]=w,e[43]=O,e[44]=_,e[45]=I,e[46]=T):T=e[46];let F;return e[47]!==C||e[48]!==T?(F=h.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[C,T]}),e[47]=C,e[48]=T,e[49]=F):F=e[49],F}let d;e[50]!==t.properties?(d=t.properties.map(Rj),e[50]=t.properties,e[51]=d):d=e[51];let m;return e[52]!==d?(m=h.jsx("div",{className:"flex flex-col gap-4",children:d}),e[52]=d,e[53]=m):m=e[53],m}function Rj(t){return t.content}function kj(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,Mj)}function Mj(t){return t.toUpperCase()}function Uj(t){const e=je.c(13),{label:n,children:r,description:i,id:s,schema:o}=t;if(s.includes("__type")||s.includes("__binding"))return null;if(o.type==="object")return r;let a;e[0]!==s||e[1]!==n?(a=n&&h.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==i?(l=i&&h.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i}),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=h.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let u;e[8]!==r?(u=h.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=u):u=e[9];let d;return e[10]!==c||e[11]!==u?(d=h.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[c,u]}),e[10]=c,e[11]=u,e[12]=d):d=e[12],d}const Lj={ObjectFieldTemplate:Dj,FieldTemplate:Uj};function Bj(t){const e=je.c(19),{formKey:n,formState:r,onFormStateChange:i,stateSchema:s}=t,{org:o}=ns(),a=Xu();let l;e[0]!==i?(l=w=>{w.formData&&i(w.formData)},e[0]=i,e[1]=l):l=e[1];const c=l;let u;e[2]!==r||e[3]!==i?(u=(w,A)=>{const O={...r,[w]:A};i(O)},e[2]=r,e[3]=i,e[4]=u):u=e[4];const d=u;let m;e[5]!==a||e[6]!==o?(m=()=>{a({to:"/$org/settings/connections",params:{org:o.slug},search:{action:"create"}})},e[5]=a,e[6]=o,e[7]=m):m=e[7];const g=m;let f;e[8]!==r||e[9]!==g||e[10]!==d?(f={onFieldChange:d,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=d,e[11]=f):f=e[11];const p=f;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=h.jsx(h.Fragment,{}),e[12]=y):y=e[12];let v;return e[13]!==p||e[14]!==n||e[15]!==r||e[16]!==c||e[17]!==s?(v=h.jsx("div",{className:"flex flex-col h-full overflow-auto",children:h.jsx(Oj,{schema:s,validator:qS,formData:r,onChange:c,formContext:p,liveValidate:!1,showErrorList:!1,templates:Lj,children:y},n)}),e[13]=p,e[14]=n,e[15]=r,e[16]=c,e[17]=s,e[18]=v):v=e[18],v}function qj(t){const e=je.c(14),{org:n}=ns();let r;e[0]!==t||e[1]!==n.id||e[2]!==n.slug?(r={connectionId:t,orgId:n.id,orgSlug:n.slug},e[0]=t,e[1]=n.id,e[2]=n.slug,e[3]=r):r=e[3];const i=od(r);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={},e[4]=s):s=e[4];let o;e[5]!==i?(o={client:i,toolName:"MCP_CONFIGURATION",toolArguments:s,select:Vj},e[5]=i,e[6]=o):o=e[6];const{data:a}=ad(o);let l;e[7]!==a.stateSchema?(l=a.stateSchema??{type:"object",properties:{}},e[7]=a.stateSchema,e[8]=l):l=e[8];const c=l;let u;e[9]!==a.scopes?(u=a.scopes??[],e[9]=a.scopes,e[10]=u):u=e[10];const d=u;let m;return e[11]!==d||e[12]!==c?(m={stateSchema:c,scopes:d},e[11]=d,e[12]=c,e[13]=m):m=e[13],m}function Vj(t){return t.structuredContent??t}function zj(t){const e=je.c(20),{onAuthenticate:n,buttonText:r}=t,i=nt();let s;e[0]!==i?(s=i("details.settingsTab.authenticationRequired"),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==s?(o=h.jsx("h3",{className:"text-sm font-semibold",children:s}),e[2]=s,e[3]=o):o=e[3];let a;e[4]!==i?(a=i("details.settingsTab.oauthAuthenticationDescription"),e[4]=i,e[5]=a):a=e[5];let l;e[6]!==a?(l=h.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:a}),e[6]=a,e[7]=l):l=e[7];let c;e[8]!==o||e[9]!==l?(c=h.jsxs("div",{className:"flex flex-col gap-2",children:[o,l]}),e[8]=o,e[9]=l,e[10]=c):c=e[10];let u;e[11]!==r||e[12]!==i?(u=r??i("details.settingsTab.authenticate"),e[11]=r,e[12]=i,e[13]=u):u=e[13];let d;e[14]!==n||e[15]!==u?(d=h.jsx(Dr,{onClick:n,size:"default",children:u}),e[14]=n,e[15]=u,e[16]=d):d=e[16];let m;return e[17]!==c||e[18]!==d?(m=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[c,d]})}),e[17]=c,e[18]=d,e[19]=m):m=e[19],m}function Wj(t){const e=je.c(19),{hasReadme:n,onViewReadme:r}=t,i=nt();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=h.jsx(cd,{size:36,className:"text-muted-foreground"}),e[0]=s):s=e[0];let o;e[1]!==i?(o=i("details.settingsTab.manualAuthenticationRequired"),e[1]=i,e[2]=o):o=e[2];let a;e[3]!==o?(a=h.jsx("h3",{className:"text-sm font-semibold",children:o}),e[3]=o,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("details.settingsTab.manualAuthenticationDescription"),e[5]=i,e[6]=l):l=e[6];let c;e[7]!==l?(c=h.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:l}),e[7]=l,e[8]=c):c=e[8];let u;e[9]!==a||e[10]!==c?(u=h.jsxs("div",{className:"flex flex-col gap-2",children:[a,c]}),e[9]=a,e[10]=c,e[11]=u):u=e[11];let d;e[12]!==n||e[13]!==r||e[14]!==i?(d=n&&r&&h.jsxs(Dr,{onClick:r,variant:"outline",size:"lg",children:[h.jsx(ld,{size:18,className:"mr-2"}),i("details.settingsTab.viewReadme")]}),e[12]=n,e[13]=r,e[14]=i,e[15]=d):d=e[15];let m;return e[16]!==u||e[17]!==d?(m=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[s,u,d]})}),e[16]=u,e[17]=d,e[18]=m):m=e[18],m}function Hj(){const t=je.c(12),e=nt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=h.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("details.settingsTab.serverError"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==r?(i=h.jsx("h3",{className:"text-lg font-semibold",children:r}),t[3]=r,t[4]=i):i=t[4];let s;t[5]!==e?(s=e("details.settingsTab.serverErrorDescription"),t[5]=e,t[6]=s):s=t[6];let o;t[7]!==s?(o=h.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:s}),t[7]=s,t[8]=o):o=t[8];let a;return t[9]!==i||t[10]!==o?(a=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[n,h.jsxs("div",{className:"flex flex-col gap-2",children:[i,o]})]})}),t[9]=i,t[10]=o,t[11]=a):a=t[11],a}function Gj(t){const e=je.c(21),{connection:n,form:r}=t,i=nt(),{stateSchema:s,scopes:o}=qj(n.id);let a;e[0]!==r.control?(a={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=a):a=e[1];const l=ed(a);let c;e[2]!==n.configuration_scopes||e[3]!==r||e[4]!==o?(c=f=>{r.setValue("configuration_state",f,{shouldDirty:!0}),r.setValue("configuration_scopes",Dd(n.configuration_scopes??[],o,f),{shouldDirty:!0})},e[2]=n.configuration_scopes,e[3]=r,e[4]=o,e[5]=c):c=e[5];const u=c;if(!(s&&s.properties&&typeof s.properties=="object"&&Object.keys(s.properties).length>0)){let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=h.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[6]=f):f=e[6];let p;e[7]!==i?(p=i("details.settingsTab.serverAllSet"),e[7]=i,e[8]=p):p=e[8];let y;e[9]!==i?(y=i("details.settingsTab.noAdditionalConfigurationNeeded"),e[9]=i,e[10]=y):y=e[10];let v;return e[11]!==p||e[12]!==y?(v=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsx(Za,{image:f,title:p,description:y})}),e[11]=p,e[12]=y,e[13]=v):v=e[13],v}let m;e[14]!==l?(m=l??{},e[14]=l,e[15]=m):m=e[15];let g;return e[16]!==n.id||e[17]!==u||e[18]!==s||e[19]!==m?(g=h.jsx("div",{className:"flex-1 overflow-auto",children:h.jsx(Bj,{formKey:n.id,stateSchema:s,formState:m,onFormStateChange:u})}),e[16]=n.id,e[17]=u,e[18]=s,e[19]=m,e[20]=g):g=e[20],g}function Kj(t){const e=je.c(18),n=nt(),{connection:r,form:i,hasMcpBinding:s,isMCPAuthenticated:o,supportsOAuth:a,isServerError:l,onAuthenticate:c,onViewReadme:u}=t,m=!!r?.metadata?.repository?.url;if(!o){if(l){let y;return e[0]===Symbol.for("react.memo_cache_sentinel")?(y=h.jsx(Hj,{}),e[0]=y):y=e[0],y}if(a){let y;return e[1]!==c?(y=h.jsx(zj,{onAuthenticate:c}),e[1]=c,e[2]=y):y=e[2],y}let p;return e[3]!==m||e[4]!==u?(p=h.jsx(Wj,{hasReadme:m,onViewReadme:u}),e[3]=m,e[4]=u,e[5]=p):p=e[5],p}if(!s){let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=h.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[6]=p):p=e[6];let y;e[7]!==n?(y=n("details.settingsTab.serverAllSet"),e[7]=n,e[8]=y):y=e[8];let v;e[9]!==n?(v=n("details.settingsTab.noAdditionalConfigurationNeeded"),e[9]=n,e[10]=v):v=e[10];let w;return e[11]!==y||e[12]!==v?(w=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsx(Za,{image:p,title:y,description:v})}),e[11]=y,e[12]=v,e[13]=w):w=e[13],w}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsx(as,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let f;return e[15]!==r||e[16]!==i?(f=h.jsx(Qu,{children:h.jsx(N.Suspense,{fallback:g,children:h.jsx(Gj,{connection:r,form:i})})}),e[15]=r,e[16]=i,e[17]=f):f=e[17],f}function vO(t){const e=je.c(2);let n;return e[0]!==t?(n=h.jsx("div",{className:"flex-1 flex h-full",children:h.jsx(Kj,{...t})}),e[0]=t,e[1]=n):n=e[1],n}export{bO as D,Wj as M,zj as O,vO as S,yO as c};
|