@objectstack/console 5.1.0 → 7.1.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/LICENSE.apache +202 -0
- package/README.md +33 -50
- package/dist/assets/AiPendingActionsPage-DfPQB-bV.js +1 -0
- package/dist/assets/ApiConsolePage-CVt86JW9.js +1 -0
- package/dist/assets/AppManagementPage-DuIaI8a2.js +1 -0
- package/dist/assets/ApprovalsInboxPage-BRv2RqN4.js +1 -0
- package/dist/assets/AuditLogPage-CDXmY4Lg.js +1 -0
- package/dist/assets/ComponentNavView-B2VAx_8W.js +1 -0
- package/dist/assets/ConsoleFloatingChatbot-c1A9X4w7.js +1 -0
- package/dist/assets/DeveloperHubPage-E4ydudW4.js +1 -0
- package/dist/assets/FlowRunsPage-CF-nkx9E.js +1 -0
- package/dist/assets/MonacoImpl-CKoKq1tG.js +11 -0
- package/dist/assets/ProfilePage-4wnWye8l.js +1 -0
- package/dist/assets/PublicFormsPage-B1cdfwoQ.js +1 -0
- package/dist/assets/SettingsHub-B4d9Pn8t.js +1 -0
- package/dist/assets/SettingsView-cRQBVn6H.js +1 -0
- package/dist/assets/SystemHubPage-DIKmhwy1.js +1 -0
- package/dist/assets/abap-CLvhMVsD.js +1 -0
- package/dist/assets/actionscript-3--17pq3dv.js +1 -0
- package/dist/assets/ada-C5qYipkI.js +1 -0
- package/dist/assets/andromeeda-vGVdxbeo.js +1 -0
- package/dist/assets/angular-html-B9s24XBK.js +1 -0
- package/dist/assets/angular-ts-C7DCn4N7.js +1 -0
- package/dist/assets/apache-U0d_L8uA.js +1 -0
- package/dist/assets/apex-VAyPSnFM.js +1 -0
- package/dist/assets/apl-BFSpAsVe.js +1 -0
- package/dist/assets/applescript-CCn79oCD.js +1 -0
- package/dist/assets/ara-4CJ0cIlV.js +1 -0
- package/dist/assets/asciidoc-DE70LPWp.js +1 -0
- package/dist/assets/asm-Cmm7eHzH.js +1 -0
- package/dist/assets/astro-By5nmri_.js +1 -0
- package/dist/assets/aurora-x-CDeNXAV0.js +1 -0
- package/dist/assets/awk-BWXHIvNe.js +1 -0
- package/dist/assets/ayu-dark-DluEY0Gj.js +1 -0
- package/dist/assets/ayu-light-C3h-C4tm.js +1 -0
- package/dist/assets/ayu-mirage-Bqwy1Gya.js +1 -0
- package/dist/assets/ballerina-B7ZEbQpA.js +1 -0
- package/dist/assets/bat-Bo4NYOV-.js +1 -0
- package/dist/assets/beancount-D-usSTwE.js +1 -0
- package/dist/assets/berry-DKpUyyne.js +1 -0
- package/dist/assets/bibtex-Ci_nEsc7.js +1 -0
- package/dist/assets/bicep-CUHmPFLl.js +1 -0
- package/dist/assets/bird2-C6vDhewU.js +1 -0
- package/dist/assets/blade-BEsyb4Es.js +1 -0
- package/dist/assets/bsl-BkkzgIyY.js +1 -0
- package/dist/assets/c-CwKsiqWD.js +1 -0
- package/dist/assets/c3-BFHwR3_K.js +1 -0
- package/dist/assets/cadence-CQ2zXKGN.js +1 -0
- package/dist/assets/cairo-DLTphjLi.js +1 -0
- package/dist/assets/catppuccin-frappe-3VR1Za6u.js +1 -0
- package/dist/assets/catppuccin-latte-DwIHMF0Q.js +1 -0
- package/dist/assets/catppuccin-macchiato-DYnBP6_5.js +1 -0
- package/dist/assets/catppuccin-mocha-DYhrFGRu.js +1 -0
- package/dist/assets/clarity-SemFz856.js +1 -0
- package/dist/assets/clojure-DqKBuwfJ.js +1 -0
- package/dist/assets/cmake-Bj61d0ZC.js +1 -0
- package/dist/assets/cobol-AtgRrYrD.js +1 -0
- package/dist/assets/codeowners-C8r90Shi.js +1 -0
- package/dist/assets/codeql-oeQT6MSM.js +1 -0
- package/dist/assets/coffee-Dx9BrBX9.js +1 -0
- package/dist/assets/common-lisp-Cv5bFMCO.js +1 -0
- package/dist/assets/coq-BrsZFFmf.js +1 -0
- package/dist/assets/cpp-DNQ-Fj9i.js +1 -0
- package/dist/assets/crystal-BFAqiLnY.js +1 -0
- package/dist/assets/csharp-oqKa8noW.js +1 -0
- package/dist/assets/css-76WQuunA.js +1 -0
- package/dist/assets/csv-Dx-8-gkx.js +1 -0
- package/dist/assets/cue-CE9AQfxI.js +1 -0
- package/dist/assets/cypher-ClKdZ_lG.js +1 -0
- package/dist/assets/d-qD-0Kul2.js +1 -0
- package/dist/assets/dark-plus-Cs2F2srj.js +1 -0
- package/dist/assets/dart-CnvKMtbv.js +1 -0
- package/dist/assets/data-adapter-Be-s1kWX.js +1 -0
- package/dist/assets/dax-BkyTk9wS.js +1 -0
- package/dist/assets/desktop-Dlh5hvp9.js +1 -0
- package/dist/assets/diff-woXpYk--.js +1 -0
- package/dist/assets/docker-IyjqRm3v.js +1 -0
- package/dist/assets/dotenv-_5a1GRtc.js +1 -0
- package/dist/assets/dracula-BHWKrbxM.js +1 -0
- package/dist/assets/dracula-soft-5eyTD99u.js +1 -0
- package/dist/assets/dream-maker-DW3nJb8Q.js +1 -0
- package/dist/assets/edge-BEfBxc5h.js +1 -0
- package/dist/assets/elixir-Bi1LyDCo.js +1 -0
- package/dist/assets/elm-BMPZeG5i.js +1 -0
- package/dist/assets/emacs-lisp-B4R74twV.js +1 -0
- package/dist/assets/erb-Pmcx6TTx.js +1 -0
- package/dist/assets/erlang-Cphh6RMH.js +1 -0
- package/dist/assets/everforest-dark-sB-x3p7T.js +1 -0
- package/dist/assets/everforest-light-Df2xbC6M.js +1 -0
- package/dist/assets/fennel-DQxkIbk2.js +1 -0
- package/dist/assets/fish-BJitypiv.js +1 -0
- package/dist/assets/fluent-C03EYrpw.js +1 -0
- package/dist/assets/fortran-fixed-form-DEKoE2YW.js +1 -0
- package/dist/assets/fortran-free-form-CYNrtFtB.js +1 -0
- package/dist/assets/framework-ClI3DbWX.js +34 -0
- package/dist/assets/fsharp-D13ZGOAj.js +1 -0
- package/dist/assets/gdresource-C0sCabJj.js +1 -0
- package/dist/assets/gdscript-Cp2uCuqX.js +1 -0
- package/dist/assets/gdshader-CBce3t8t.js +1 -0
- package/dist/assets/genie-CV2tkWYe.js +1 -0
- package/dist/assets/gherkin-DExj1W_8.js +1 -0
- package/dist/assets/git-commit-BSykSTBG.js +1 -0
- package/dist/assets/git-rebase-Dj7t0bix.js +1 -0
- package/dist/assets/github-dark-C-LZuMrd.js +1 -0
- package/dist/assets/github-dark-default-DXG-b-1a.js +1 -0
- package/dist/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
- package/dist/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
- package/dist/assets/github-light-EUqPIrTm.js +1 -0
- package/dist/assets/github-light-default-BXViO-2h.js +1 -0
- package/dist/assets/github-light-high-contrast-B68TUdTA.js +1 -0
- package/dist/assets/gleam-CSRkHgEL.js +1 -0
- package/dist/assets/glimmer-js-DTpMHWUo.js +1 -0
- package/dist/assets/glimmer-ts-BKOVQU61.js +1 -0
- package/dist/assets/glsl-DDNdYp2B.js +1 -0
- package/dist/assets/gn-ilITqXS6.js +1 -0
- package/dist/assets/gnuplot-7GGW24-e.js +1 -0
- package/dist/assets/go-rLFTqkRN.js +1 -0
- package/dist/assets/graphql-C-akFyqE.js +1 -0
- package/dist/assets/groovy-CacY0gHj.js +1 -0
- package/dist/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
- package/dist/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
- package/dist/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
- package/dist/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
- package/dist/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
- package/dist/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
- package/dist/assets/hack-Z382E4IB.js +1 -0
- package/dist/assets/haml-DCWQJgln.js +1 -0
- package/dist/assets/handlebars-D_RRtkV5.js +1 -0
- package/dist/assets/haskell-D8IpX4py.js +1 -0
- package/dist/assets/haxe-OTjmBuCE.js +1 -0
- package/dist/assets/hcl-Dh228itO.js +1 -0
- package/dist/assets/highlighted-body-OFNGDK62-Dynkkk0t.js +1 -0
- package/dist/assets/hjson-CxZEssPk.js +1 -0
- package/dist/assets/hlsl-Cvrh5tZx.js +1 -0
- package/dist/assets/horizon-CE9ld1lL.js +1 -0
- package/dist/assets/horizon-bright-DSNQnXHK.js +1 -0
- package/dist/assets/houston-CsvMBhTu.js +1 -0
- package/dist/assets/html-BqDo3pKb.js +1 -0
- package/dist/assets/html-derivative-DncxUXSH.js +1 -0
- package/dist/assets/http-CrTHj6_t.js +1 -0
- package/dist/assets/hurl-BdeVL_ga.js +1 -0
- package/dist/assets/hxml-B0Qn7Nwc.js +1 -0
- package/dist/assets/hy-CZbG8q4J.js +1 -0
- package/dist/assets/imba-DsUTQ-LC.js +1 -0
- package/dist/assets/index-D7iz-IIn.js +24 -0
- package/dist/assets/index-Db8Nmh4R.css +2 -0
- package/dist/assets/infrastructure-ezj3FgNE.js +3 -0
- package/dist/assets/ini-B5eOa1yu.js +1 -0
- package/dist/assets/java-DKFHmTAg.js +1 -0
- package/dist/assets/javascript-Jx16aUBb.js +1 -0
- package/dist/assets/jinja-CQEVrK23.js +1 -0
- package/dist/assets/jison-BJRgvE0A.js +1 -0
- package/dist/assets/json-DlFP2GYa.js +1 -0
- package/dist/assets/json5-BR5RXkoi.js +1 -0
- package/dist/assets/jsonc-CYpm1nAK.js +1 -0
- package/dist/assets/jsonl-CmCQp5Yx.js +1 -0
- package/dist/assets/jsonnet-CJTPZ8u_.js +1 -0
- package/dist/assets/jssm-DXw9l8Rf.js +1 -0
- package/dist/assets/jsx-CIwpwN-u.js +1 -0
- package/dist/assets/julia-D4zLZb0D.js +1 -0
- package/dist/assets/just-BbmgE3ZP.js +1 -0
- package/dist/assets/kanagawa-dragon-CXtmUGW6.js +1 -0
- package/dist/assets/kanagawa-lotus-BN08jTvb.js +1 -0
- package/dist/assets/kanagawa-wave-CTweb8Dz.js +1 -0
- package/dist/assets/kdl-CsD5j6eV.js +1 -0
- package/dist/assets/kotlin-DhhofPvG.js +1 -0
- package/dist/assets/kusto-C7mF5XQf.js +1 -0
- package/dist/assets/laserwave-C_8bwKvT.js +1 -0
- package/dist/assets/latex-BUDs7Dcl.js +1 -0
- package/dist/assets/lean-CewbzKMR.js +1 -0
- package/dist/assets/less-DVTAwKKz.js +1 -0
- package/dist/assets/light-plus-DVQuIRkW.js +1 -0
- package/dist/assets/liquid-Bc0s0G9S.js +1 -0
- package/dist/assets/llvm-Cm23YOpf.js +1 -0
- package/dist/assets/log-BNLmms1o.js +1 -0
- package/dist/assets/logo-Cluzi2Zq.js +1 -0
- package/dist/assets/lua-dQaszIi_.js +1 -0
- package/dist/assets/luau-FMPmPwt6.js +1 -0
- package/dist/assets/make-Dixweg8N.js +1 -0
- package/dist/assets/{maplibre-gl-fFz1l9Ly.js → maplibre-gl-CoREonuK.js} +1 -1
- package/dist/assets/markdown-BYOwaDjH.js +1 -0
- package/dist/assets/marko-B5Uea28G.js +1 -0
- package/dist/assets/material-theme-Bm3Qr25_.js +1 -0
- package/dist/assets/material-theme-darker-2IIEA8gg.js +1 -0
- package/dist/assets/material-theme-lighter-uhdI0v04.js +1 -0
- package/dist/assets/material-theme-ocean-CHQ94UKr.js +1 -0
- package/dist/assets/material-theme-palenight-B5W6OYN7.js +1 -0
- package/dist/assets/matlab-D7qyCx1q.js +1 -0
- package/dist/assets/mdc-CwQcy7BI.js +1 -0
- package/dist/assets/mdx-DQZ5AkYe.js +1 -0
- package/dist/assets/mermaid-Bk4SNUv9.js +1 -0
- package/dist/assets/mermaid-GHXKKRXX-DJsGdxYj.js +1 -0
- package/dist/assets/min-dark-BSWPekZh.js +1 -0
- package/dist/assets/min-light-DDpmG2fV.js +1 -0
- package/dist/assets/mipsasm-BMqwQI7S.js +1 -0
- package/dist/assets/mojo-BgCJLMeH.js +1 -0
- package/dist/assets/monokai-CdkpiU2Y.js +1 -0
- package/dist/assets/moonbit-CaWjb8XO.js +1 -0
- package/dist/assets/move-B1IS1UjX.js +1 -0
- package/dist/assets/narrat-_X_XdTYD.js +1 -0
- package/dist/assets/nextflow-BJtWHP5T.js +1 -0
- package/dist/assets/nextflow-groovy-DJMQeKeT.js +1 -0
- package/dist/assets/nginx-SzmDaWuK.js +1 -0
- package/dist/assets/night-owl-DhmEMT88.js +1 -0
- package/dist/assets/night-owl-light-eJ-hLW7d.js +1 -0
- package/dist/assets/nim-CO_A6I25.js +1 -0
- package/dist/assets/nix-IvuFDN5E.js +1 -0
- package/dist/assets/nord-Cb4Vim4T.js +1 -0
- package/dist/assets/nushell-DcLAeLz5.js +1 -0
- package/dist/assets/objective-c-D1A_Heim.js +1 -0
- package/dist/assets/objective-cpp-BsSzOQcm.js +1 -0
- package/dist/assets/ocaml-O90oeIOV.js +1 -0
- package/dist/assets/odin-B1RWQWA5.js +1 -0
- package/dist/assets/one-dark-pro-CLwyXe_n.js +1 -0
- package/dist/assets/one-light-D7Lr4KcI.js +1 -0
- package/dist/assets/openscad-BUDT5pXO.js +1 -0
- package/dist/assets/pascal-4ZHwLPI5.js +1 -0
- package/dist/assets/perl-DXgLsVg8.js +1 -0
- package/dist/assets/php-C4KCWpl8.js +1 -0
- package/dist/assets/pkl-ot-7Btpt.js +1 -0
- package/dist/assets/plastic-DQwYfKfQ.js +1 -0
- package/dist/assets/plsql-DGHpHOYJ.js +1 -0
- package/dist/assets/plugin-calendar-wl24Whh9.js +1 -0
- package/dist/assets/plugin-charts-Mt2y8Sdm.js +7 -0
- package/dist/assets/plugin-chatbot-DXGXTdLU.js +120 -0
- package/dist/assets/plugin-dashboard-DqF5vvlQ.js +3 -0
- package/dist/assets/plugin-form-BBc-xwrZ.js +1 -0
- package/dist/assets/plugin-gantt-scBgVq2Q.js +1 -0
- package/dist/assets/plugin-grid-u5JmW5Ui.js +6 -0
- package/dist/assets/plugin-kanban-0qj1Kr3T.js +1 -0
- package/dist/assets/plugin-map-CjA33cHV.js +1 -0
- package/dist/assets/plugin-map-CsMXqW6n.css +1 -0
- package/dist/assets/plugin-markdown-BPsaoDf-.js +7 -0
- package/dist/assets/plugin-report-C35V4A8F.js +59 -0
- package/dist/assets/plugin-timeline-Bmy8v-AN.js +1 -0
- package/dist/assets/plugin-view-tV_8MnpT.js +1 -0
- package/dist/assets/plugins-views-DM6-O61C.js +4 -0
- package/dist/assets/po-BiJDBrnU.js +1 -0
- package/dist/assets/poimandres-DRFjx7u4.js +1 -0
- package/dist/assets/polar-C7UOKdEL.js +1 -0
- package/dist/assets/postcss-BXeXVLqQ.js +1 -0
- package/dist/assets/powerquery-DNMTfnFr.js +1 -0
- package/dist/assets/powershell-DshXNtvi.js +1 -0
- package/dist/assets/prisma-BsRQq5mF.js +1 -0
- package/dist/assets/prolog-iXnhIJG7.js +1 -0
- package/dist/assets/proto-DB4EqR-F.js +1 -0
- package/dist/assets/pug-bpEG1CVZ.js +1 -0
- package/dist/assets/puppet-CDv2pdJW.js +1 -0
- package/dist/assets/purescript-9MfHhQsQ.js +1 -0
- package/dist/assets/python-gzcpVVnB.js +1 -0
- package/dist/assets/qml-DGJzHzg9.js +1 -0
- package/dist/assets/qmldir-DCQb3MpD.js +1 -0
- package/dist/assets/qss-Fe1Jh2GI.js +1 -0
- package/dist/assets/r-CZt9UGEb.js +1 -0
- package/dist/assets/racket-DcIDlBhZ.js +1 -0
- package/dist/assets/raku-B3gFvitq.js +1 -0
- package/dist/assets/razor-mTLK-dma.js +1 -0
- package/dist/assets/red-CJ3rzSJv.js +1 -0
- package/dist/assets/reg-CRGYupPL.js +1 -0
- package/dist/assets/regexp-DX5QhPdx.js +1 -0
- package/dist/assets/rel-BtDbiS_P.js +1 -0
- package/dist/assets/riscv-Ckw8ddFX.js +1 -0
- package/dist/assets/rolldown-runtime-CMxvf4Kt.js +1 -0
- package/dist/assets/ron-VUp2lXgN.js +1 -0
- package/dist/assets/rose-pine-BthvhNj6.js +1 -0
- package/dist/assets/rose-pine-dawn-Dg85fqjY.js +1 -0
- package/dist/assets/rose-pine-moon-hon4tzzS.js +1 -0
- package/dist/assets/rosmsg-CAekHB0j.js +1 -0
- package/dist/assets/rst-t-F-oATV.js +1 -0
- package/dist/assets/ruby-D9DDGNv3.js +1 -0
- package/dist/assets/rust-Cfkwpbl8.js +1 -0
- package/dist/assets/sas-BAEs8TsV.js +1 -0
- package/dist/assets/sass-DXrisJhu.js +1 -0
- package/dist/assets/scala-DKOlJaKm.js +1 -0
- package/dist/assets/scheme-DQCgrYNe.js +1 -0
- package/dist/assets/scss-B6B5DSWC.js +1 -0
- package/dist/assets/sdbl-bTVj8UrX.js +1 -0
- package/dist/assets/shaderlab-TOUzSsQk.js +1 -0
- package/dist/assets/shellscript-DXt7nqYk.js +1 -0
- package/dist/assets/shellsession-DQ4guRhR.js +1 -0
- package/dist/assets/slack-dark-DnToyrRv.js +1 -0
- package/dist/assets/slack-ochin-B2OO5cIa.js +1 -0
- package/dist/assets/smalltalk-B16xEiuN.js +1 -0
- package/dist/assets/snazzy-light-4G7pJPwS.js +1 -0
- package/dist/assets/solarized-dark-DV17i1UV.js +1 -0
- package/dist/assets/solarized-light-DSh2HLQt.js +1 -0
- package/dist/assets/solidity-CKzVLygQ.js +1 -0
- package/dist/assets/soy-DtwGS8Y2.js +1 -0
- package/dist/assets/sparql-D_iOobhT.js +1 -0
- package/dist/assets/splunk-BC2Px7Mm.js +1 -0
- package/dist/assets/sql-ArzG0FT1.js +1 -0
- package/dist/assets/src-BJJhwsID.js +2 -0
- package/dist/assets/ssh-config-BgfXC-Er.js +1 -0
- package/dist/assets/stata-CdQ318yb.js +1 -0
- package/dist/assets/stylus-B6D30XZt.js +1 -0
- package/dist/assets/surrealql-RyXJ8VfM.js +1 -0
- package/dist/assets/svelte-CXkGIk7i.js +1 -0
- package/dist/assets/swift-DonLKvLd.js +1 -0
- package/dist/assets/synthwave-84-nFMaYfgc.js +1 -0
- package/dist/assets/system-verilog-DJ5XKQeo.js +1 -0
- package/dist/assets/systemd-BxMlprV5.js +1 -0
- package/dist/assets/talonscript-CohzipZa.js +1 -0
- package/dist/assets/tasl-DMoTqEGO.js +1 -0
- package/dist/assets/tcl-CZd0xW_V.js +1 -0
- package/dist/assets/templ-CJz86NIj.js +1 -0
- package/dist/assets/terraform-DswuEJGm.js +1 -0
- package/dist/assets/tex-C71esTKh.js +1 -0
- package/dist/assets/tokyo-night-oM2G3aXe.js +1 -0
- package/dist/assets/toml-CcmNWLt0.js +1 -0
- package/dist/assets/ts-tags-Qszjvpax.js +1 -0
- package/dist/assets/tsv-sltzmVWM.js +1 -0
- package/dist/assets/tsx-BEhriTf8.js +1 -0
- package/dist/assets/turtle-ByJddavk.js +1 -0
- package/dist/assets/twig-CbaWuFm3.js +1 -0
- package/dist/assets/types-BsFD2pPK.js +1 -0
- package/dist/assets/typescript-CBu4i5lG.js +1 -0
- package/dist/assets/typespec-BRdr0IET.js +1 -0
- package/dist/assets/typst-DI99ib-x.js +1 -0
- package/dist/assets/ui-components-BL3SEdAz.css +1 -0
- package/dist/assets/ui-components-DYQ4Pai7.js +41 -0
- package/dist/assets/ui-layout-Dmw4Ab7P.js +1 -0
- package/dist/assets/v-DETTlOr0.js +1 -0
- package/dist/assets/vala-zf12oZj6.js +1 -0
- package/dist/assets/vb-Djn5o6TS.js +1 -0
- package/dist/assets/vendor-charts-vh1WJI0j.js +36 -0
- package/dist/assets/vendor-dndkit-0jp7h5ty.js +5 -0
- package/dist/assets/vendor-i18n-CnFu8bdi.js +1 -0
- package/dist/assets/vendor-icons-core-D5MicM14.js +1 -0
- package/dist/assets/vendor-markdown-CvMSBmgq.js +38 -0
- package/dist/assets/vendor-objectstack-CwZ3saTl.js +65 -0
- package/dist/assets/vendor-radix-BNWIlSsV.js +56 -0
- package/dist/assets/vendor-react-CIpZOxG3.js +13 -0
- package/dist/assets/vendor-sentry-D5yZpZ5X.js +484 -0
- package/dist/assets/vendor-ui-utils-D3GsyZyi.js +1 -0
- package/dist/assets/vendor-zod-BzP-Jkm3.js +1 -0
- package/dist/assets/verilog-CiiDBU1e.js +1 -0
- package/dist/assets/vesper-DdrHHSXu.js +1 -0
- package/dist/assets/vhdl-BroJfC0k.js +1 -0
- package/dist/assets/viml-DvXPmvsu.js +1 -0
- package/dist/assets/vitesse-black-fwtXNY1n.js +1 -0
- package/dist/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/dist/assets/vitesse-light-VbXTXTou.js +1 -0
- package/dist/assets/vue-Bruwzb-A.js +1 -0
- package/dist/assets/vue-html-C-3Ma2tD.js +1 -0
- package/dist/assets/vue-vine-DQAt9DTg.js +1 -0
- package/dist/assets/vyper-CgoNMtux.js +1 -0
- package/dist/assets/wasm-BnjxR4X6.js +1 -0
- package/dist/assets/wasm-ByWQv1Qj.js +1 -0
- package/dist/assets/wenyan-C8pVoKbM.js +1 -0
- package/dist/assets/wgsl-BsKzXJz4.js +1 -0
- package/dist/assets/wikitext-ClFFjSW2.js +1 -0
- package/dist/assets/wit-DdvCle-K.js +1 -0
- package/dist/assets/wolfram-DLL8P-h_.js +1 -0
- package/dist/assets/xml-BS2GSQw_.js +1 -0
- package/dist/assets/xsl-CCmfIdf4.js +1 -0
- package/dist/assets/yaml-C1LY7x4K.js +1 -0
- package/dist/assets/zenscript-BnlCZFoB.js +1 -0
- package/dist/assets/zig-CMLA9XwU.js +1 -0
- package/dist/index.html +24 -5
- package/dist/manifest.json +19 -0
- package/dist/vite.svg +25 -0
- package/package.json +18 -59
- package/dist/assets/app-shell-CaJU0zqc.js +0 -263
- package/dist/assets/dist-DxiImE7o.js +0 -1
- package/dist/assets/framework-CT7trS8g.js +0 -1
- package/dist/assets/index-DRq36Jb9.js +0 -1
- package/dist/assets/index-sNORrJSP.css +0 -1
- package/dist/assets/plugin-calendar-N01daPoe.js +0 -1
- package/dist/assets/plugin-charts-BxPL3e--.js +0 -9
- package/dist/assets/plugin-kanban-Cy0iBS_w.js +0 -0
- package/dist/assets/plugins-views-CIpa21Ck.js +0 -58
- package/dist/assets/rolldown-runtime-aKtaBQYM.js +0 -1
- package/dist/assets/vendor-react-BnXfQgq5.js +0 -9
- /package/dist/assets/{app-shell-DnNKJB60.css → plugin-dashboard-DnNKJB60.css} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{a as t,d as n,g as r,r as i}from"./vendor-react-CIpZOxG3.js";import{n as a,t as o}from"./infrastructure-ezj3FgNE.js";import{C as s,F as c,I as l,L as u,M as d,V as f,at as p,ct as m,f as h,k as g,l as _,m as v,p as y,r as b,st as x,ut as S,w as C,z as w}from"./framework-ClI3DbWX.js";import{$ as T,$i as E,$n as D,$o as O,$t as k,A,Ai as j,At as M,Bi as N,Bo as P,Bt as F,Ca as ee,Ci as I,Co as te,Dt as L,Et as R,Fi as ne,Ft as re,Ga as ie,Go as ae,H as z,Hn as B,Ht as oe,Ii as se,It as V,Jo as H,Ka as ce,Kn as U,Ko as W,Kr as le,Mi as ue,Mr as de,Mt as G,N as fe,Nt as pe,Oi as me,Oo as K,Ot as he,Pr as ge,Qn as _e,Qr as ve,Qt as q,Ra as ye,Ro as be,Rt as xe,Sa as Se,So as J,Ti as Ce,U as we,Ua as Y,Un as Te,Vo as Ee,Vt as De,W as Oe,Wa as ke,Wn as Ae,Xa as je,Xi as Me,Xn as Ne,Yn as Pe,Yr as Fe,Zr as Ie,Zt as Le,aa as Re,an as ze,ar as Be,b as Ve,bo as He,ci as Ue,cn as We,cr as Ge,dr as Ke,ei as qe,en as Je,er as Ye,es as X,et as Xe,f as Ze,fa as Qe,fr as $e,gi as et,gr as tt,hi as nt,hr as rt,ia as it,io as at,ir as ot,j as st,ja as ct,jt as lt,k as ut,ka as dt,kr as ft,kt as pt,l as mt,li as ht,lr as gt,m as _t,mi as vt,mn as yt,mr as Z,nr as bt,ns as xt,nt as St,oi as Ct,on as wt,or as Tt,po as Et,q as Dt,qn as Ot,qo as kt,ra as At,rr as jt,rs as Mt,sr as Nt,ta as Pt,ti as Ft,to as It,tr as Lt,tt as Rt,ui as zt,ur as Bt,xa as Vt,xo as Ht,xr as Ut,y as Wt,ya as Gt,yr as Kt,za as qt,zo as Jt,zt as Yt}from"./ui-components-DYQ4Pai7.js";import{a as Xt}from"./plugin-grid-u5JmW5Ui.js";var Q=e(r(),1),$=i(),Zt={grid:(0,$.jsx)(ct,{className:`h-4 w-4`}),kanban:(0,$.jsx)(Qe,{className:`h-4 w-4`}),gallery:(0,$.jsx)(Se,{className:`h-4 w-4`}),calendar:(0,$.jsx)(K,{className:`h-4 w-4`}),timeline:(0,$.jsx)(O,{className:`h-4 w-4`}),gantt:(0,$.jsx)(ve,{className:`h-4 w-4`}),map:(0,$.jsx)(E,{className:`h-4 w-4`})},Qt={grid:`Grid`,kanban:`Kanban`,gallery:`Gallery`,calendar:`Calendar`,timeline:`Timeline`,gantt:`Gantt`,map:`Map`},$t=({currentView:e,availableViews:t=[`grid`,`kanban`],onViewChange:n,className:r,animated:i=!0})=>{let a=Q.useCallback(t=>{if(!i||t===e){n(t);return}typeof document<`u`&&`startViewTransition`in document?document.startViewTransition(()=>n(t)):n(t)},[i,e,n]);return(0,$.jsx)(`div`,{className:X(`flex items-center gap-1 bg-transparent oui-view-switcher`,r),children:t.map(t=>{let n=e===t;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>a(t),"aria-label":Qt[t],title:Qt[t],"aria-pressed":n,"data-state":n?`on`:`off`,className:X(`inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`,`hover:bg-muted hover:text-muted-foreground`,`gap-2 px-3 py-2`,`data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm border-transparent border data-[state=on]:border-border/50`),children:[Zt[t],(0,$.jsx)(`span`,{className:`hidden sm:inline-block text-xs font-medium`,children:Qt[t]})]},t)})})};function en(e){return e?tt[e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)]??null:null}function tn(e){return e.filter(e=>e.pinned||e.visible!==`false`&&e.visible!==!1).sort((e,t)=>(e.order??0)-(t.order??0))}var nn=({tabs:e,activeTab:t,onTabChange:n,className:r})=>{let i=Q.useMemo(()=>tn(e),[e]),a=Q.useMemo(()=>i.find(e=>e.isDefault)?.name??i[0]?.name,[i]),[o,s]=Q.useState(a),c=t??o,l=Q.useCallback(e=>{s(e.name),n?.(e)},[n]);return i.length===0?null:(0,$.jsx)(`div`,{className:X(`px-2 sm:px-4 py-1 flex items-center gap-0.5 bg-background`,r),"data-testid":`view-tabs`,role:`tablist`,children:i.map(e=>{let t=en(e.icon),n=c===e.name;return(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:X(`h-7 px-2.5 py-1 text-xs rounded-md transition-colors duration-150`,n?`font-medium text-foreground bg-muted`:`text-muted-foreground hover:text-foreground hover:bg-transparent`),"data-testid":`view-tab-${e.name}`,role:`tab`,"aria-selected":n,onClick:()=>l(e),children:[t&&(0,$.jsx)(t,{className:`h-3 w-3 mr-1.5`}),e.label]},e.name)})})},rn=({tabs:e,activeTab:t,onTabChange:n,className:r})=>{let i=Q.useMemo(()=>tn(e),[e]),a=Q.useMemo(()=>i.find(e=>e.isDefault)?.name??i[0]?.name,[i]),[o,s]=Q.useState(a),c=t??o,l=Q.useMemo(()=>i.find(e=>e.name===c)??i[0],[i,c]),u=Q.useCallback(e=>{s(e.name),n?.(e)},[n]);if(i.length===0)return null;let d=en(l?.icon);return(0,$.jsx)(`div`,{className:X(`px-2 py-1`,r),"data-testid":`view-tabs-select`,children:(0,$.jsxs)(ze,{children:[(0,$.jsx)(yt,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs font-medium text-foreground gap-1.5 max-w-[60vw] truncate`,"aria-label":`Switch view`,children:[d&&(0,$.jsx)(d,{className:`h-3.5 w-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:l?.label??``}),(0,$.jsx)(J,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`})]})}),(0,$.jsx)(wt,{align:`start`,className:`w-56 max-h-72 overflow-y-auto`,children:i.map(e=>{let t=en(e.icon);return(0,$.jsxs)(We,{onClick:()=>u(e),className:X(`text-sm`,c===e.name&&`font-medium bg-muted`),"data-testid":`view-tab-select-${e.name}`,children:[t&&(0,$.jsx)(t,{className:`h-3.5 w-3.5 mr-2 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.label})]},e.name)})})]})})};function an({title:e,badge:t,onClear:n,clearLabel:r,defaultOpen:i=!0,children:a}){let[o,s]=Q.useState(i);return(0,$.jsxs)(`div`,{className:`border-b last:border-b-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>s(e=>!e),className:`flex items-center gap-1.5 text-xs font-medium text-foreground/80 hover:text-foreground`,children:[(0,$.jsx)(J,{className:X(`h-3.5 w-3.5 transition-transform`,!o&&`-rotate-90`)}),e,typeof t==`number`&&t>0&&(0,$.jsx)(`span`,{className:`ml-1 inline-flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 px-1 text-[10px] text-primary tabular-nums`,children:t})]}),n&&(0,$.jsx)(`button`,{type:`button`,onClick:n,className:`text-[11px] text-muted-foreground hover:text-foreground`,children:r})]}),o&&(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:a})]})}function on(e){let{t,allFields:n,showGroup:r,groupingConfig:i,setGroupingConfig:a,showColor:o,rowColorConfig:s,setRowColorConfig:c,showDensity:l,density:u,showHideFields:d,hiddenFields:f,updateHiddenFields:p}=e,[m,h]=Q.useState(!1),g=[!!i?.fields?.length,!!s?.field,u&&u.mode!==`compact`,(f?.size??0)>0].filter(Boolean).length,_=u?.mode===`compact`?vt:u?.mode===`comfortable`?nt:et,v=t(`list.viewSettings`,{defaultValue:`View settings`});return(0,$.jsxs)(Le,{open:m,onOpenChange:h,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,"aria-label":v,title:v,className:X(`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,g>0&&`text-foreground font-medium`),"data-testid":`view-settings-trigger`,children:[(0,$.jsx)(Ue,{className:`h-3.5 w-3.5 sm:mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v}),g>0&&(0,$.jsx)(`span`,{className:`ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums`,children:g})]})}),(0,$.jsxs)(q,{align:`end`,className:`w-80 p-0`,"data-testid":`view-settings-content`,children:[(0,$.jsxs)(`div`,{className:`px-3 py-2 border-b`,children:[(0,$.jsx)(`div`,{className:`text-sm font-semibold`,children:v}),(0,$.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:t(`list.viewSettingsHint`,{defaultValue:`Grouping, color, density, and visible fields.`})})]}),r&&a&&(0,$.jsx)(an,{title:t(`list.group`,{defaultValue:`Group`}),badge:i?.fields?.length||0,onClear:i?()=>a(void 0):void 0,clearLabel:t(`list.clear`,{defaultValue:`Clear`}),children:(0,$.jsx)(st,{value:i,fieldOptions:n.map(e=>({value:e.name,label:e.label||e.name})),maxLevels:3,labels:{addGroup:t(`list.addGroup`,`Add group field`),collapseTitle:t(`list.collapsedByDefault`,`Collapsed by default`),removeTitle:t(`list.removeGroup`,`Remove`)},onChange:e=>a(e)})}),o&&c&&(0,$.jsxs)(an,{title:t(`list.color`,{defaultValue:`Row color`}),onClear:s?()=>c(void 0):void 0,clearLabel:t(`list.clear`,{defaultValue:`Clear`}),defaultOpen:!!s,children:[(0,$.jsx)(`label`,{className:`block text-[11px] text-muted-foreground mb-1`,children:t(`list.colorByField`,{defaultValue:`Color by field`})}),(0,$.jsxs)(`select`,{className:`w-full h-8 rounded border border-input bg-background px-2 text-xs`,value:s?.field||``,onChange:e=>{let t=e.target.value;c(t?{field:t,colors:s?.colors||{}}:void 0)},"data-testid":`color-field-select`,children:[(0,$.jsx)(`option`,{value:``,children:t(`list.none`,{defaultValue:`None`})}),n.map(e=>(0,$.jsx)(`option`,{value:e.name,children:e.label||e.name},e.name))]})]}),l&&u&&(0,$.jsx)(an,{title:t(`grid.toolbar.densityMode`,{defaultValue:`Density`}),defaultOpen:u.mode!==`compact`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1.5`,onClick:u.cycle,"data-testid":`view-settings-density-cycle`,children:[(0,$.jsx)(_,{className:`h-3.5 w-3.5`}),(0,$.jsx)(`span`,{className:`text-xs`,children:u.mode===`compact`?t(`grid.toolbar.densityCompact`,{defaultValue:`Compact`}):u.mode===`comfortable`?t(`grid.toolbar.densityComfortable`,{defaultValue:`Comfortable`}):t(`grid.toolbar.densitySpacious`,{defaultValue:`Spacious`})})]}),(0,$.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:t(`grid.toolbar.densityCycleShortHint`,{defaultValue:`Click to cycle`})})]})}),d&&f&&p&&(0,$.jsx)(an,{title:t(`list.hideFieldsTitle`,{defaultValue:`Hide fields`}),badge:f.size,onClear:f.size>0?()=>p(new Set):void 0,clearLabel:t(`list.showAll`,{defaultValue:`Show all`}),defaultOpen:f.size>0,children:(0,$.jsx)(`div`,{className:`max-h-48 overflow-y-auto space-y-0.5`,children:n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs py-1 px-1 rounded hover:bg-muted cursor-pointer`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:!f.has(e.name),onChange:()=>{let t=new Set(f);t.has(e.name)?t.delete(e.name):t.add(e.name),p(t)},className:`rounded border-input`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.label||e.name})]},e.name))})})]})]})}function sn(){try{let{t:e}=b(),t=e(`common.more`);return!t||t===`common.more`?`More`:t}catch{return`More`}}var cn=new Set([`lookup`,`master_detail`,`user`,`owner`]);function ln({config:e,objectDef:t,data:n=[],onFilterChange:r,maxVisible:i,className:a}){switch(e.element){case`dropdown`:return(0,$.jsx)(dn,{fields:e.fields||[],objectDef:t,data:n,onFilterChange:r,maxVisible:i,className:a});case`tabs`:return(0,$.jsx)(fn,{tabs:e.tabs||[],showAllRecords:e.showAllRecords!==!1,allowAddTab:e.allowAddTab,onFilterChange:r,className:a});case`toggle`:return(0,$.jsx)(pn,{fields:e.fields||[],onFilterChange:r,className:a});default:return null}}function un(e,t,n,r){return e.map(e=>{let i=e.options?[...e.options]:[],a=e.type,o,s,c;if(t?.fields){let n=Array.isArray(t.fields)?t.fields.find(t=>t.name===e.field):t.fields[e.field];n&&(a||=n.type,o=n.reference_to??n.reference,s=n.display_field??n.reference_field,c=n.id_field,i.length===0&&n.options&&(i=Array.isArray(n.options)?n.options.map(e=>({label:e.label??String(e.value??e),value:e.value??e,color:e.color})):Object.entries(n.options).map(([e,t])=>({label:t?.label||e,value:e,color:t?.color}))))}i.length===0&&a===`boolean`&&(i=[{label:`True`,value:!0},{label:`False`,value:!1}]),e.showCount&&n.length>0&&(i=i.map(t=>({...t,count:n.filter(n=>n[e.field]===t.value).length})));let l=e.label;return r?.objectName&&(i=r.translateOptions(r.objectName,e.field,i),l=r.fieldLabel(r.objectName,e.field,e.label||e.field)),{...e,label:l,type:a,options:i,referenceTo:o,displayField:s,idField:c}})}function dn({fields:e,objectDef:t,data:n,onFilterChange:r,maxVisible:i,className:a}){let{fieldLabel:o,translateOptions:s}=Mt(),c=sn(),l=t?.name,[u,d]=Q.useState(()=>{let t={};return e.forEach(e=>{e.defaultValues&&e.defaultValues.length>0&&(t[e.field]=e.defaultValues)}),t}),f=Q.useMemo(()=>un(e,t,n,{objectName:l,fieldLabel:o,translateOptions:s}),[e,t,n,l,o,s]),p=Q.useCallback(e=>{r(Object.entries(e).filter(([,e])=>e.length>0).map(([e,t])=>[e,`in`,t]))},[r]),m=(e,t)=>{let n={...u,[e]:t};d(n),p(n)};Q.useEffect(()=>{Object.values(u).some(e=>e.length>0)&&p(u)},[]);let h=i!==void 0&&i<f.length?f.slice(0,i):f,g=i!==void 0&&i<f.length?f.slice(i):[],_=e=>{let t=u[e.field]||[],n=t.length>0,r=cn.has(e.type||``)&&e.options.length===0&&(e.referenceTo||e.type===`user`||e.type===`owner`),i=r?`w-72`:`w-56`;return(0,$.jsxs)(Le,{children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(`button`,{"data-testid":`filter-badge-${e.field}`,className:X(`inline-flex items-center gap-1 h-7 px-2 text-xs transition-colors shrink-0 rounded-md`,n?`text-foreground font-medium`:`text-muted-foreground hover:text-foreground`),children:[(0,$.jsx)(`span`,{className:`truncate max-w-[100px]`,children:e.label||e.field}),n&&(0,$.jsx)(`span`,{className:`text-[10px] text-muted-foreground/80 tabular-nums`,children:t.length}),n?(0,$.jsx)(Ut,{className:`h-3 w-3 opacity-60 hover:opacity-100`,"data-testid":`filter-clear-${e.field}`,onClick:t=>{t.stopPropagation(),m(e.field,[])}}):(0,$.jsx)(J,{className:`h-3 w-3 opacity-60`})]})}),(0,$.jsx)(q,{align:`start`,className:X(i,`p-2`),children:r?(0,$.jsx)(`div`,{"data-testid":`filter-lookup-${e.field}`,children:(0,$.jsx)(Oe,{field:{value:e.field,label:e.label||e.field,type:e.type,referenceTo:e.referenceTo,displayField:e.displayField,idField:e.idField},value:t,multiple:!0,onChange:t=>{let n=Array.isArray(t)?t:t==null||t===``?[]:[t];m(e.field,n)}})}):(0,$.jsx)(`div`,{className:`max-h-60 overflow-y-auto space-y-0.5`,"data-testid":`filter-options-${e.field}`,children:e.options.length===0?(0,$.jsx)(`div`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:`No options`}):e.options.map(n=>(0,$.jsxs)(`label`,{className:X(`flex items-center gap-2 text-sm py-1.5 px-2 rounded cursor-pointer`,t.includes(n.value)?`bg-primary/5 text-primary`:`hover:bg-muted`),children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:t.includes(n.value),onChange:()=>{let r=t.includes(n.value)?t.filter(e=>e!==n.value):[...t,n.value];m(e.field,r)},className:`rounded border-input`}),n.color&&(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full shrink-0`,style:{backgroundColor:n.color}}),(0,$.jsx)(`span`,{className:`truncate flex-1`,children:n.label}),n.count!==void 0&&(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n.count})]},String(n.value)))})})]},e.field)};return(0,$.jsx)(`div`,{className:X(`flex items-center gap-0.5 overflow-x-auto`,a),"data-testid":`user-filters-dropdown`,children:f.length===0?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`user-filters-empty`,children:`No filter fields`}):(0,$.jsxs)($.Fragment,{children:[h.map(_),g.length>0&&(0,$.jsxs)(Le,{children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(`button`,{"data-testid":`user-filters-more`,className:`inline-flex items-center gap-1 h-7 px-2 text-xs text-muted-foreground hover:text-foreground transition-colors shrink-0 rounded-md`,children:[(0,$.jsx)(`span`,{children:c}),(0,$.jsx)(`span`,{className:`text-[10px] text-muted-foreground/80 tabular-nums`,children:g.length}),(0,$.jsx)(J,{className:`h-3 w-3 opacity-60`})]})}),(0,$.jsx)(q,{align:`start`,className:`w-64 p-2`,"data-testid":`user-filters-more-content`,children:(0,$.jsx)(`div`,{className:`space-y-1`,children:g.map(_)})})]})]})})}function fn({tabs:e,showAllRecords:t,allowAddTab:n,onFilterChange:r,className:i}){let[a,o]=Q.useState(()=>e.find(e=>e.default)?.id||(t?`__all__`:e[0]?.id||``)),s=Q.useCallback(t=>{o(t),r(t===`__all__`?[]:e.find(e=>e.id===t)?.filters||[])},[e,r]),c=Q.useMemo(()=>{let n=[...e];return t&&n.push({id:`__all__`,label:`All records`,filters:[]}),n},[e,t]);return Q.useEffect(()=>{let t=e.find(e=>e.default);t&&r(t.filters||[])},[]),(0,$.jsxs)(`div`,{className:X(`flex items-center gap-0.5 overflow-x-auto`,i),"data-testid":`user-filters-tabs`,children:[c.map(e=>(0,$.jsx)(`button`,{"data-testid":`filter-tab-${e.id}`,onClick:()=>s(e.id),className:X(`inline-flex items-center h-7 px-3 text-xs font-medium rounded-md transition-colors shrink-0`,a===e.id?`bg-primary text-primary-foreground`:`text-muted-foreground hover:text-foreground hover:bg-muted`),children:e.label},e.id)),n&&(0,$.jsx)(`button`,{className:`inline-flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted shrink-0`,"data-testid":`filter-tab-add`,title:`Add filter tab`,children:(0,$.jsx)(Ce,{className:`h-3.5 w-3.5`})})]})}function pn({fields:e,onFilterChange:t,className:n}){let[r,i]=Q.useState(()=>{let t=new Set;return e.forEach(e=>{e.defaultValues&&e.defaultValues.length>0&&t.add(e.field)}),t}),a=Q.useCallback(n=>{t(Array.from(n).map(t=>{let n=e.find(e=>e.field===t);return n?.defaultValues?[t,`in`,n.defaultValues]:[t,`!=`,null]}))},[e,t]),o=e=>{i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),a(n),n})};return Q.useEffect(()=>{r.size>0&&a(r)},[]),(0,$.jsx)(`div`,{className:X(`flex items-center gap-1 overflow-x-auto`,n),"data-testid":`user-filters-toggle`,children:e.map(e=>(0,$.jsx)(Z,{variant:r.has(e.field)?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs shrink-0`,"data-testid":`filter-toggle-${e.field}`,onClick:()=>o(e.field),children:e.label||e.field},e.field))})}function mn(e){switch(e){case`equals`:case`eq`:return`=`;case`notEquals`:case`ne`:case`neq`:return`!=`;case`contains`:return`contains`;case`notContains`:return`notcontains`;case`greaterThan`:case`gt`:return`>`;case`greaterOrEqual`:case`gte`:return`>=`;case`lessThan`:case`lt`:return`<`;case`lessOrEqual`:case`lte`:return`<=`;case`in`:return`in`;case`notIn`:return`not in`;case`before`:return`<`;case`after`:return`>`;default:return e}}function hn(e){if(!Array.isArray(e)||e.length<3)return e;let[t,n,r]=e;return typeof t==`string`&&(t===`and`||t===`or`)?[t,...e.slice(1).map(e=>Array.isArray(e)?hn(e):e)]:n===`in`&&Array.isArray(r)?r.length===0?[]:r.length===1?[t,`=`,r[0]]:[`or`,...r.map(e=>[t,`=`,e])]:n===`not in`&&Array.isArray(r)?r.length===0?[]:r.length===1?[t,`!=`,r[0]]:[`and`,...r.map(e=>[t,`!=`,e])]:e}function gn(e){return e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function _n(e){return!Array.isArray(e)||e.length===0?[]:e.map(e=>Array.isArray(e)?hn(e):e).filter(e=>Array.isArray(e)&&e.length>0)}function vn(e){if(!e||!e.conditions||e.conditions.length===0)return[];let t=_n(e.conditions.map(e=>e.operator===`isEmpty`?[e.field,`=`,null]:e.operator===`isNotEmpty`?[e.field,`!=`,null]:[e.field,mn(e.operator),e.value]));return t.length===0?[]:t.length===1?t[0]:[e.logic,...t]}var yn={"list.recordCount":`{{count}} records`,"list.recordCountOne":`{{count}} record`,"list.noItems":`No items found`,"list.noItemsMessage":`There are no records to display. Try adjusting your filters or adding new data.`,"list.loading":`Loading records…`,"list.search":`Search`,"list.filter":`Filter`,"list.filterRecords":`Filter Records`,"list.sort":`Sort`,"list.sortRecords":`Sort Records`,"list.group":`Group`,"list.groupBy":`Group By`,"list.export":`Export`,"list.exportAs":`Export as {{format}}`,"list.color":`Color`,"list.rowColor":`Row Color`,"list.colorByField":`Color by field`,"list.clear":`Clear`,"list.none":`None`,"list.hideFields":`Hide fields`,"list.showAll":`Show all`,"list.pullToRefresh":`Pull to refresh`,"list.refreshing":`Refreshing…`,"list.dataLimitReached":`Showing first {{limit}} records. More data may be available.`,"list.addRecord":`Add record`,"list.tabs":`Tabs`,"list.allRecords":`All Records`,"list.share":`Share`,"list.print":`Print`,"list.hideFieldsTitle":`Hide Fields`,"table.rowsPerPage":`Rows per page`,"grid.toolbar.densityMode":`Density`,"grid.toolbar.densityCompact":`Compact`,"grid.toolbar.densityComfortable":`Comfortable`,"grid.toolbar.densitySpacious":`Spacious`,"grid.toolbar.densityCycleHint":`{{label}} (click to cycle)`,"grid.toolbar.densityCycleShortHint":`Click to cycle`,"list.viewSettings":`View settings`,"list.viewSettingsHint":`Grouping, color, density, and visible fields.`},bn=(e,t,n)=>n,xn=(e,t)=>{let n=yn[e]||e;if(t)for(let[e,r]of Object.entries(t))n=n.replace(`{{${e}}}`,String(r));return n};function Sn(){try{let e=b();return e.t(`list.recordCount`)===`list.recordCount`?{t:xn}:{t:e.t}}catch{return{t:xn}}}function Cn(){try{let{fieldLabel:e,actionLabel:t}=xt();return{fieldLabel:e,actionLabel:t}}catch{return{fieldLabel:bn,actionLabel:void 0}}}var wn=Q.forwardRef(({schema:e,className:t,onViewChange:n,onFilterChange:r,onSortChange:i,onSearchChange:o,onHiddenFieldsChange:s,onColumnStateChange:c,onRowClick:l,showViewSwitcher:f=!1,...h},_)=>{let{t:v}=Sn(),{fieldLabel:y,actionLabel:b}=Cn(),{translateOptions:S}=Mt(),C=Q.useMemo(()=>e.viewType?e:{...e,viewType:`grid`},[e]),w=Q.useCallback((e,t)=>C.objectName?y(C.objectName,e,t):t,[C.objectName,y]),T=Q.useCallback(e=>{let t=gn(e);return C.objectName&&typeof b==`function`?b(C.objectName,e,t):t},[C.objectName,b]),E=Q.useMemo(()=>{let e=C.userActions,t=C.addRecord?.enabled===!0&&e?.addRecordForm!==!1;return{showSearch:e?.search===void 0?C.showSearch!==!1:e.search,showSort:e?.sort===void 0?C.showSort!==!1:e.sort,showFilters:e?.filter===void 0?C.showFilters!==!1:e.filter,showDensity:e?.rowHeight===void 0?C.showDensity!==!1:e.rowHeight,showHideFields:C.showHideFields===!0,showGroup:C.showGroup!==!1,showColor:C.showColor===!0,compactToolbar:C.compactToolbar===!0,showAddRecord:t,addRecordPosition:C.addRecord?.position===`bottom`?`bottom`:`top`}},[C.userActions,C.showSearch,C.showSort,C.showFilters,C.showDensity,C.showHideFields,C.showGroup,C.showColor,C.compactToolbar,C.addRecord,C.userActions?.addRecordForm]),[D,O]=Q.useState(C.viewType),[j,M]=Q.useState(``),[P,F]=Q.useState(!1),[ee,te]=Q.useState(!1),[L,R]=Q.useState(()=>C.sort&&C.sort.length>0?C.sort.map(e=>{if(typeof e==`string`){let t=e.trim().split(/\s+/);return{id:crypto.randomUUID(),field:t[0],order:t[1]?.toLowerCase()===`desc`?`desc`:`asc`}}return{id:crypto.randomUUID(),field:e.field,order:e.order||`asc`}}):[]),ne=Q.useMemo(()=>JSON.stringify(C.sort||[]),[C.sort]);Q.useEffect(()=>{C.sort&&C.sort.length>0?R(C.sort.map(e=>{if(typeof e==`string`){let t=e.trim().split(/\s+/);return{id:crypto.randomUUID(),field:t[0],order:t[1]?.toLowerCase()===`desc`?`desc`:`asc`}}return{id:crypto.randomUUID(),field:e.field,order:e.order||`asc`}})):R([])},[ne]);let[re,B]=Q.useState(!1),[oe,se]=Q.useState({id:`root`,logic:`and`,conditions:[]}),[V,H]=Q.useState(()=>{if(!(!C.tabs||C.tabs.length===0))return C.tabs.find(e=>e.isDefault)?.name??C.tabs[0]?.name}),ce=Q.useCallback(e=>{if(H(e.name),e.filter){let t={id:`tab-filter-${e.name}`,logic:e.filter.logic||`and`,conditions:e.filter.conditions||[]};se(t),r?.(t)}else{let e={id:`root`,logic:`and`,conditions:[]};se(e),r?.(e)}},[r]),U=h.dataSource,[W,le]=Q.useState([]),[ue,de]=Q.useState(()=>!(Array.isArray(C.data)||C.data&&typeof C.data==`object`&&C.data.provider===`value`&&Array.isArray(C.data.items))),[G,pe]=Q.useState(null),[me,K]=Q.useState(!1),[he,_e]=Q.useState(0),[ve,ye]=Q.useState(!1);Q.useImperativeHandle(_,()=>({refresh:()=>_e(e=>e+1)}),[]),Q.useEffect(()=>{if(!(!U?.onMutation||!C.objectName||C.refreshTrigger))return U.onMutation(e=>{e.resource===C.objectName&&_e(e=>e+1)})},[U,C.objectName,C.refreshTrigger]);let[be,xe]=Q.useState(void 0),Se=be??C.pagination?.pageSize??100,J=Q.useMemo(()=>{if(C.grouping?.fields?.length)return C.grouping;let e=typeof C.groupBy==`string`?C.groupBy.trim():``,t=typeof C.groupBy2==`string`?C.groupBy2.trim():``,n=[];return e&&n.push({field:e,order:`asc`,collapsed:!1}),t&&t!==e&&n.push({field:t,order:`asc`,collapsed:!1}),n.length>0?{fields:n}:void 0},[C.grouping,C.groupBy,C.groupBy2]),[Y,Te]=Q.useState(J),[Ee,De]=Q.useState(!1),Oe=Q.useRef(J);Q.useEffect(()=>{Oe.current!==J&&(Oe.current=J,Te(J))},[J]);let[ke,Ae]=Q.useState(C.rowColor),[Me,Ne]=Q.useState(!1),[Pe,Fe]=Q.useState([]),Re=Q.useRef(0),[ze,Be]=Q.useState(()=>{let e=new Set;return C.quickFilters?.forEach(t=>{let n=x(t);n.defaultActive&&e.add(n.id)}),e}),[Ve,He]=Q.useState([]),Ue=Q.useMemo(()=>{if(C.userFilters)return C.userFilters;if(!G?.fields)return;let e=new Set([`select`,`multi-select`,`boolean`]),t=[],n=Array.isArray(G.fields)?G.fields.map(e=>[e.name,e]):Object.entries(G.fields);for(let[r,i]of n)(e.has(i.type)||i.options&&!i.type)&&t.push({field:r,label:w(r,i.label||r),type:i.type===`boolean`?`boolean`:i.type===`multi-select`?`multi-select`:`select`});if(t.length!==0)return{element:`dropdown`,fields:t}},[C.userFilters,G]),[We,Ge]=Q.useState(()=>new Set(C.hiddenFields||[])),Ke=Q.useMemo(()=>JSON.stringify(C.hiddenFields||[]),[C.hiddenFields]);Q.useEffect(()=>{Ge(new Set(C.hiddenFields||[]))},[Ke]);let qe=Q.useCallback(e=>{Ge(e),s?.(Array.from(e))},[s]),[Ye,Xe]=Q.useState(!1),[Ze,Qe]=Q.useState(!1),$e=Q.useMemo(()=>m(C.quickFilters),[C.quickFilters]),rt=Q.useMemo(()=>{if(C.exportOptions)return Array.isArray(C.exportOptions)?{formats:C.exportOptions}:C.exportOptions},[C.exportOptions]),it=g(Q.useMemo(()=>C.densityMode?C.densityMode:C.rowHeight?{compact:`compact`,short:`compact`,medium:`comfortable`,tall:`spacious`,extra_tall:`spacious`}[C.rowHeight]||`comfortable`:`compact`,[C.densityMode,C.rowHeight]),{onChange:C.onDensityChange}),at=Q.useMemo(()=>`objectui:gallery:density:${C.objectName??`default`}`,[C.objectName]),[ot,ct]=Q.useState(()=>{if(typeof window>`u`)return C.gallery?.cardSize??`medium`;try{let e=window.localStorage.getItem(at);if(e===`small`||e===`medium`||e===`large`)return e}catch{}return C.gallery?.cardSize??`medium`}),lt=Q.useCallback(()=>{ct(e=>{let t=e===`large`?`medium`:e===`medium`?`small`:`large`;try{window.localStorage.setItem(at,t)}catch{}return t})},[at]),{ref:ft,isRefreshing:pt,pullDistance:mt}=Xt({onRefresh:Q.useCallback(async()=>{_e(e=>e+1)},[]),enabled:!!U&&!!C.objectName}),ht=Q.useMemo(()=>C.id?`listview-${C.objectName}-${C.id}-view`:`listview-${C.objectName}-view`,[C.objectName,C.id]);Q.useEffect(()=>{let e=!0;return K(!1),pe(null),(async()=>{if(!U||!C.objectName){K(!0);return}if(typeof U.getObjectSchema!=`function`){K(!0);return}try{let t=await U.getObjectSchema(C.objectName);e&&pe(t)}catch(e){console.warn(`Failed to fetch object schema for ListView:`,e)}finally{e&&K(!0)}})(),()=>{e=!1}},[C.objectName,U]);let gt=Q.useMemo(()=>{let e=Array.isArray(C.fields)?C.fields.map(e=>typeof e==`string`?e:e?.field).filter(e=>typeof e==`string`&&e.length>0):[],t=new Set(e),n=e=>{if(!e)return;let n=[e.groupField,e.groupBy,e.titleField,e.cardTitle,e.startDateField,e.endDateField,e.dateField,e.endField,e.colorField,e.allDayField,e.coverField,e.imageField,e.subtitleField,e.swimlaneField,e.valueField,...Array.isArray(e.cardFields)?e.cardFields:[],...Array.isArray(e.visibleFields)?e.visibleFields:[],...Array.isArray(e.metaFields)?e.metaFields:[]];for(let e of n)typeof e==`string`&&e&&t.add(e)};n(C.kanban),n(C.options?.kanban),n(C.calendar),n(C.options?.calendar),n(C.gallery),n(C.options?.gallery),n(C.timeline),n(C.options?.timeline),n(C.gantt),n(C.options?.gantt);let r=t.size>0?Array.from(t):void 0;return p(G?.fields,r)},[G?.fields,C.fields,C.kanban,C.calendar,C.gallery,C.timeline,C.gantt,C.options]),_t=a();Q.useEffect(()=>{let e=!0,t=++Re.current;if(C.data&&typeof C.data==`object`&&!Array.isArray(C.data)){let e=C.data;if(e.provider===`value`&&Array.isArray(e.items)){let t=e.items;if(j){let e=j.toLowerCase();t=t.filter(t=>Object.values(t).some(t=>t!=null&&String(t).toLowerCase().includes(e)))}le(t),de(!1),ye(!1);return}}if(Array.isArray(C.data)){let e=C.data;if(j){let t=j.toLowerCase();e=e.filter(e=>Object.values(e).some(e=>e!=null&&String(e).toLowerCase().includes(t)))}le(e),de(!1),ye(!1);return}return me?((async()=>{if(!U||!C.objectName){de(!1);return}de(!0);try{let n=[],r=C.filters||[],i=vn(oe),a=[];$e&&ze.size>0&&$e.forEach(e=>{ze.has(e.id)&&e.filters&&e.filters.length>0&&a.push(e.filters)});let o=_n(Ve),s=[...r.length>0?[r]:[],...i.length>0?[i]:[],...a,...o].filter(e=>Array.isArray(e)&&e.length>0);s.length>1?n=[`and`,...s]:s.length===1&&(n=s[0]);let c=L.length>0?L.filter(e=>e.field).map(e=>({field:e.field,order:e.order})):void 0,l=(()=>{let e=Array.isArray(C.fields)?C.fields.map(e=>typeof e==`string`?e:e?.field).filter(e=>typeof e==`string`&&e.length>0):[],t=_t?.isLoaded&&C.objectName?e.filter(e=>_t.checkField(C.objectName,e,`read`)):e;if(t.length===0)return;let n=new Set([`id`]);for(let e of t)n.add(e);for(let e of gt)n.add(e);let r=e=>{if(!e)return;let t=[e.groupField,e.groupBy,e.titleField,e.cardTitle,e.startDateField,e.endDateField,e.dateField,e.endField,e.colorField,e.allDayField,e.coverField,e.imageField,e.subtitleField,e.swimlaneField,e.valueField,...Array.isArray(e.cardFields)?e.cardFields:[],...Array.isArray(e.visibleFields)?e.visibleFields:[],...Array.isArray(e.metaFields)?e.metaFields:[]];for(let e of t)typeof e==`string`&&e&&n.add(e)};r(C.kanban),r(C.options?.kanban),r(C.calendar),r(C.options?.calendar),r(C.gallery),r(C.options?.gallery),r(C.timeline),r(C.options?.timeline);{let e=C.timeline??C.options?.timeline;e&&!Array.isArray(e.metaFields)&&(n.add(`status`),n.add(`priority`))}return r(C.gantt),r(C.options?.gantt),Array.from(n)})(),u=Array.isArray(n)?n.length>0:!!n&&Object.keys(n).length>0,d=await U.find(C.objectName,{...u?{$filter:n}:{},$orderby:c,$top:Se,...l?{$select:l}:{},...gt.length>0?{$expand:gt}:{},...j?{$search:j,...C.searchableFields&&C.searchableFields.length>0?{$searchFields:C.searchableFields}:{}}:{}});if(!e||t!==Re.current)return;let f=[];Array.isArray(d)?f=d:d&&typeof d==`object`&&(Array.isArray(d.data)?f=d.data:Array.isArray(d.records)?f=d.records:Array.isArray(d.value)&&(f=d.value)),le(f),ye(f.length>=Se)}catch(e){t===Re.current&&console.error(`ListView data fetch error:`,e)}finally{e&&t===Re.current&&de(!1)}})(),()=>{e=!1}):void 0},[C.objectName,C.data,U,C.filters,Se,L,oe,ze,$e,Ve,he,j,C.searchableFields,gt,me,C.refreshTrigger,_t]);let yt=Q.useMemo(()=>{if(C.appearance?.allowedVisualizations&&C.appearance.allowedVisualizations.length>0)return C.appearance.allowedVisualizations.filter(e=>[`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`].includes(e));let e=[`grid`];return(C.kanban?.groupField||C.options?.kanban?.groupField)&&e.push(`kanban`),(C.gallery?.coverField||C.gallery?.imageField||C.options?.gallery?.imageField)&&e.push(`gallery`),(C.calendar?.startDateField||C.options?.calendar?.startDateField)&&e.push(`calendar`),(C.timeline?.startDateField||C.options?.timeline?.startDateField||C.options?.timeline?.dateField||C.options?.calendar?.startDateField)&&e.push(`timeline`),(C.gantt?.startDateField||C.options?.gantt?.startDateField)&&e.push(`gantt`),(C.options?.map?.locationField||C.options?.map?.latitudeField&&C.options?.map?.longitudeField)&&e.push(`map`),C.viewType&&!e.includes(C.viewType)&&[`grid`,`kanban`,`calendar`,`timeline`,`gantt`,`map`,`gallery`].includes(C.viewType)&&e.push(C.viewType),e},[C.options,C.viewType,C.kanban,C.calendar,C.gantt,C.gallery,C.timeline,C.appearance?.allowedVisualizations]);Q.useEffect(()=>{C.viewType&&O(C.viewType)},[C.viewType]);let bt=Q.useCallback(e=>{O(e);try{localStorage.setItem(ht,e)}catch(e){console.warn(`Failed to save view preference to localStorage:`,e)}n?.(e)},[ht,n]),xt=Q.useCallback(e=>{M(e),o?.(e)},[o]),St=d({navigation:C.navigation,objectName:C.objectName,onNavigate:C.onNavigate,onRowClick:l}),wt=Q.useMemo(()=>{let e=C.fields||[];if(Array.isArray(e)||(e=[]),_t?.isLoaded&&C.objectName&&(e=e.filter(e=>{let t=typeof e==`string`?e:e?.name||e?.fieldName||e?.field;return t?_t.checkField(C.objectName,t,`read`):!0})),We.size>0&&(e=e.filter(e=>{let t=typeof e==`string`?e:e?.name||e?.fieldName||e?.field;return t!=null&&!We.has(t)})),C.fieldOrder&&C.fieldOrder.length>0){let t=new Map(C.fieldOrder.map((e,t)=>[e,t]));e=[...e].sort((e,n)=>{let r=typeof e==`string`?e:e?.name||e?.fieldName||e?.field,i=typeof n==`string`?n:n?.name||n?.fieldName||n?.field;return(t.get(r)??1/0)-(t.get(i)??1/0)})}return e},[C.fields,C.objectName,We,C.fieldOrder,_t]),Tt=Q.useMemo(()=>{let e=it.mode===`compact`?`compact`:it.mode===`spacious`?`tall`:`medium`,t={objectName:C.objectName,fields:wt,filters:C.filters,sort:L,className:`h-full w-full`,showSearch:!1,onRowClick:St.handleClick,rowHeight:e,hideRowHeightToggle:!0,...C.striped==null?{}:{striped:C.striped},...C.bordered==null?{}:{bordered:C.bordered},...c?{onColumnStateChange:c}:{},...C.columnState?{columnState:C.columnState}:{}};switch(D){case`grid`:return{type:`object-grid`,...t,columns:wt,...C.conditionalFormatting?{conditionalFormatting:C.conditionalFormatting}:{},...C.inlineEdit==null?{}:{editable:C.inlineEdit},...C.wrapHeaders==null?{}:{wrapHeaders:C.wrapHeaders},...C.virtualScroll==null?{}:{virtualScroll:C.virtualScroll},...C.resizable==null?{}:{resizable:C.resizable},...C.selection?{selection:C.selection}:{},...C.pagination?{pagination:C.pagination}:{},...Y?{grouping:Y}:{},...ke?{rowColor:ke}:{},...C.rowActions?{rowActions:C.rowActions}:{},...C.rowActionDefs?{rowActionDefs:C.rowActionDefs}:{},...C.bulkActions?{batchActions:C.bulkActions}:{},...C.bulkActionDefs?{bulkActionDefs:C.bulkActionDefs}:{},...C.options?.grid||{}};case`kanban`:return{type:`object-kanban`,...t,groupBy:C.kanban?.groupField||C.options?.kanban?.groupField||`status`,groupField:C.kanban?.groupField||C.options?.kanban?.groupField||`status`,...C.kanban?.titleField||C.options?.kanban?.titleField?{titleField:C.kanban?.titleField||C.options?.kanban?.titleField}:{},cardFields:C.kanban?.cardFields||wt||[],...Y?{grouping:Y}:{},...C.options?.kanban||{},...C.kanban||{}};case`calendar`:return{type:`object-calendar`,...t,startDateField:C.calendar?.startDateField||C.options?.calendar?.startDateField||`start_date`,endDateField:C.calendar?.endDateField||C.options?.calendar?.endDateField||`end_date`,...C.calendar?.titleField||C.options?.calendar?.titleField?{titleField:C.calendar?.titleField||C.options?.calendar?.titleField}:{},...C.calendar?.defaultView?{defaultView:C.calendar.defaultView}:{},...C.options?.calendar||{},...C.calendar||{}};case`gallery`:{let e={...C.options?.gallery||{},...C.gallery||{},cardSize:ot};return{type:`object-gallery`,...t,gallery:Object.keys(e).length>0?e:void 0,imageField:C.gallery?.coverField||C.gallery?.imageField||C.options?.gallery?.imageField,titleField:C.gallery?.titleField||C.options?.gallery?.titleField||`name`,subtitleField:C.gallery?.subtitleField||C.options?.gallery?.subtitleField,...Y?{grouping:Y}:{}}}case`timeline`:{let e={...C.options?.timeline||{},...C.timeline||{}};return{type:`object-timeline`,...t,timeline:Object.keys(e).length>0?e:void 0,startDateField:C.timeline?.startDateField||C.options?.timeline?.startDateField||C.options?.timeline?.dateField||`created_at`,titleField:C.timeline?.titleField||C.options?.timeline?.titleField||`name`,...C.timeline?.endDateField?{endDateField:C.timeline.endDateField}:{},...C.timeline?.groupByField?{groupByField:C.timeline.groupByField}:{},...C.timeline?.colorField?{colorField:C.timeline.colorField}:{},...C.timeline?.scale?{scale:C.timeline.scale}:{}}}case`gantt`:return{type:`object-gantt`,...t,startDateField:C.gantt?.startDateField||C.options?.gantt?.startDateField||`start_date`,endDateField:C.gantt?.endDateField||C.options?.gantt?.endDateField||`end_date`,progressField:C.gantt?.progressField||C.options?.gantt?.progressField||`progress`,dependenciesField:C.gantt?.dependenciesField||C.options?.gantt?.dependenciesField||`dependencies`,...C.gantt?.titleField?{titleField:C.gantt.titleField}:{},...C.options?.gantt||{},...C.gantt||{}};case`map`:return{type:`object-map`,...t,locationField:C.options?.map?.locationField||`location`,...C.options?.map||{}};default:return t}},[D,C,L,wt,Y,ke,St.handleClick,it.mode,ot]),Et=oe.conditions&&oe.conditions.length>0,Dt=Q.useMemo(()=>{let e,t=(e,t)=>{if(!t)return;let n=Array.isArray(t)?t.map(e=>({value:e?.value??e,label:e?.label??String(e?.value??e),...e&&typeof e==`object`?e:{}})):Object.entries(t).map(([e,t])=>({value:e,label:t?.label||e,...t}));return C.objectName?S(C.objectName,e,n):n};if(e=G?.fields?Object.entries(G.fields).map(([e,n])=>({value:e,label:w(e,n.label||e),type:n.type||`text`,options:t(e,n.options),referenceTo:n.reference_to||n.reference,displayField:n.display_field||n.reference_field,idField:n.id_field})):(C.fields||[]).map(e=>{if(typeof e==`string`)return{value:e,label:e,type:`text`};let n=e.name||e.fieldName;return{value:n,label:w(n,e.label||e.name),type:e.type||`text`,options:t(n,e.options),referenceTo:e.reference_to||e.reference,displayField:e.display_field||e.reference_field,idField:e.id_field}}),C.filterableFields&&C.filterableFields.length>0){let t=new Set(C.filterableFields);e=e.filter(e=>t.has(e.value))}return e},[G,C.fields,C.filterableFields,C.objectName,w,S]),Ot=Q.useCallback(e=>{Be(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),kt=Q.useCallback(e=>{let t=rt,n=t?.maxRecords||0,r=t?.includeHeaders!==!1,i=t?.fileNamePrefix||C.objectName||`export`,a=n>0?W.slice(0,n):W;if(e===`csv`){let e=wt.map(e=>typeof e==`string`?e:e.name||e.fieldName||e.field),t=[];r&&t.push(e.join(`,`)),a.forEach(n=>{t.push(e.map(e=>{let t=n[e],r;return r=t==null?``:Array.isArray(t)?t.map(e=>typeof e==`object`&&e?JSON.stringify(e):String(e??``)).join(`; `):typeof t==`object`?JSON.stringify(t):String(t),r.includes(`,`)||r.includes(`"`)||r.includes(`
|
|
2
|
+
`)||r.includes(`\r`)?`"${r.replace(/"/g,`""`)}"`:r}).join(`,`))});let n=new Blob([t.join(`
|
|
3
|
+
`)],{type:`text/csv;charset=utf-8;`}),o=URL.createObjectURL(n),s=document.createElement(`a`);s.href=o,s.download=`${i}.csv`,s.click(),URL.revokeObjectURL(o)}else if(e===`json`){let e=new Blob([JSON.stringify(a,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${i}.json`,n.click(),URL.revokeObjectURL(t)}Qe(!1)},[W,wt,rt,C.objectName]),At=Q.useMemo(()=>(C.fields||[]).map(e=>{if(typeof e==`string`)return{name:e,label:w(e,e)};let t=e.name||e.fieldName||e.field;return{name:t,label:w(t,e.label||e.name||e.field)}}),[C.fields,w]);return(0,$.jsxs)(`div`,{ref:ft,className:X(`flex flex-col h-full bg-background relative min-w-0 overflow-hidden`,t),...C.aria?.label?{"aria-label":C.aria.label}:{},...C.aria?.describedBy?{"aria-describedby":C.aria.describedBy}:{},...C.aria?.live?{"aria-live":C.aria.live}:{},role:`region`,children:[mt>0&&(0,$.jsx)(`div`,{className:`flex items-center justify-center text-xs text-muted-foreground`,style:{height:mt},children:v(pt?`list.refreshing`:`list.pullToRefresh`)}),f&&(0,$.jsx)(`div`,{className:`px-4 py-1 flex items-center bg-background`,children:(0,$.jsx)($t,{currentView:D,availableViews:yt,onViewChange:bt})}),C.description&&C.appearance?.showDescription!==!1&&(0,$.jsx)(`div`,{className:`px-4 pt-1.5 text-xs text-muted-foreground bg-background`,"data-testid":`view-description`,children:typeof C.description==`string`?C.description:``}),(0,$.jsxs)(`div`,{className:`border-b px-2 sm:px-4 py-1.5 flex items-center justify-between gap-1 sm:gap-2 bg-background`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 overflow-x-auto min-w-0`,children:[C.tabs&&C.tabs.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`hidden sm:block shrink-0`,children:(0,$.jsx)(nn,{tabs:C.tabs,activeTab:V,onTabChange:ce,className:`!px-0 !py-0`})}),(0,$.jsx)(`div`,{className:`sm:hidden shrink-0`,children:(0,$.jsx)(rn,{tabs:C.tabs,activeTab:V,onTabChange:ce,className:`!px-0 !py-0`})})]}),C.tabs&&C.tabs.length>0&&Ue&&(0,$.jsx)(`div`,{className:`hidden sm:block h-4 w-px bg-border/60 mx-1 shrink-0`}),Ue&&(0,$.jsx)(`div`,{className:`shrink-0 min-w-0 overflow-x-auto`,"data-testid":`user-filters`,children:(0,$.jsx)(ln,{config:Ue,objectDef:G,data:W,onFilterChange:He,maxVisible:3})})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-0 shrink-0 rounded-lg border border-border bg-muted/40 p-0.5 shadow-sm`,children:[E.showHideFields&&!E.compactToolbar&&(0,$.jsxs)(Le,{open:Ye,onOpenChange:Xe,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:X(`hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,We.size>0&&`text-primary`),children:[(0,$.jsx)(ie,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.hideFields`)}),We.size>0&&(0,$.jsx)(`span`,{className:`ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums`,children:We.size})]})}),(0,$.jsx)(q,{align:`start`,className:`w-64 p-3`,children:(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-2`,children:[(0,$.jsx)(`h4`,{className:`font-medium text-sm`,children:v(`list.hideFieldsTitle`)}),We.size>0&&(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-xs`,onClick:()=>qe(new Set),children:v(`list.showAll`)})]}),(0,$.jsx)(`div`,{className:`max-h-60 overflow-y-auto space-y-1`,children:At.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm py-1 px-1 rounded hover:bg-muted cursor-pointer`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:!We.has(e.name),onChange:()=>{let t=new Set(We);t.has(e.name)?t.delete(e.name):t.add(e.name),qe(t)},className:`rounded border-input`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.label})]},e.name))})]})})]}),E.showHideFields&&!E.compactToolbar&&(E.showFilters||E.showSort||E.showGroup)&&(0,$.jsx)(`div`,{className:`hidden sm:block h-5 w-px bg-border/50 mx-1 shrink-0`}),E.showFilters&&(0,$.jsxs)(Le,{open:re,onOpenChange:B,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:X(`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,Et&&`text-foreground font-medium`),children:[(0,$.jsx)(Ft,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.filter`)}),Et&&(0,$.jsx)(`span`,{className:`ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums`,children:oe.conditions?.length||0})]})}),(0,$.jsx)(q,{align:`start`,className:`w-[calc(100vw-2rem)] sm:w-[600px] max-w-[600px] p-3 sm:p-4`,children:(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(`div`,{className:`flex items-center justify-between border-b pb-2`,children:(0,$.jsx)(`h4`,{className:`font-medium text-sm`,children:v(`list.filterRecords`)})}),(0,$.jsx)(we,{fields:Dt,value:oe,onChange:e=>{se(e),r&&r(e)}})]})})]}),E.showGroup&&!E.compactToolbar&&(0,$.jsxs)(Le,{open:Ee,onOpenChange:De,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:X(`hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,Y&&`text-foreground font-medium`),children:[(0,$.jsx)(dt,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.group`)}),Y&&Y.fields?.length>0&&(0,$.jsx)(`span`,{className:`ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums`,children:Y.fields.length})]})}),(0,$.jsx)(q,{align:`start`,className:`w-72 p-3`,children:(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-2`,children:[(0,$.jsx)(`h4`,{className:`font-medium text-sm`,children:v(`list.groupBy`)}),Y&&(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-xs`,onClick:()=>Te(void 0),"data-testid":`clear-grouping`,children:v(`list.clear`)})]}),(0,$.jsx)(`div`,{"data-testid":`group-field-list`,children:(0,$.jsx)(st,{value:Y,fieldOptions:At.map(e=>({value:e.name,label:e.label||e.name})),maxLevels:3,labels:{addGroup:v(`list.addGroup`,{defaultValue:`Add group field`}),collapseTitle:v(`list.collapsedByDefault`,{defaultValue:`Collapsed by default`}),removeTitle:v(`list.removeGroup`,{defaultValue:`Remove`})},onChange:e=>Te(e)})})]})})]}),E.showSort&&(0,$.jsxs)(Le,{open:ee,onOpenChange:te,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:X(`hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,L.length>0&&`text-foreground font-medium`),children:[(0,$.jsx)(ae,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.sort`)}),L.length>0&&(0,$.jsx)(`span`,{className:`ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums`,children:L.length})]})}),(0,$.jsx)(q,{align:`start`,className:`w-[calc(100vw-2rem)] sm:w-[600px] max-w-[600px] p-3 sm:p-4`,children:(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(`div`,{className:`flex items-center justify-between border-b pb-2`,children:(0,$.jsx)(`h4`,{className:`font-medium text-sm`,children:v(`list.sortRecords`)})}),(0,$.jsx)(z,{fields:Dt,value:L,onChange:e=>{R(e),i&&i(e)}})]})})]}),!E.compactToolbar&&(E.showFilters||E.showSort||E.showGroup)&&(E.showColor||E.showDensity)&&(0,$.jsx)(`div`,{className:`hidden sm:block h-5 w-px bg-border/50 mx-1 shrink-0`}),E.showColor&&!E.compactToolbar&&(0,$.jsxs)(Le,{open:Me,onOpenChange:Ne,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:X(`hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,ke&&`text-foreground font-medium`),children:[(0,$.jsx)(N,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.color`)})]})}),(0,$.jsx)(q,{align:`start`,className:`w-64 p-3`,children:(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-2`,children:[(0,$.jsx)(`h4`,{className:`font-medium text-sm`,children:v(`list.rowColor`)}),ke&&(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-xs`,onClick:()=>Ae(void 0),"data-testid":`clear-row-color`,children:v(`list.clear`)})]}),(0,$.jsxs)(`div`,{className:`space-y-2`,"data-testid":`color-field-list`,children:[(0,$.jsx)(`label`,{className:`text-xs text-muted-foreground`,children:v(`list.colorByField`)}),(0,$.jsxs)(`select`,{className:`w-full h-8 rounded border border-input bg-background px-2 text-xs`,value:ke?.field||``,onChange:e=>{let t=e.target.value;Ae(t?{field:t,colors:ke?.colors||{}}:void 0)},"data-testid":`color-field-select`,children:[(0,$.jsx)(`option`,{value:``,children:v(`list.none`)}),At.map(e=>(0,$.jsx)(`option`,{value:e.name,children:e.label},e.name))]})]})]})})]}),E.showDensity&&!E.compactToolbar&&D!==`gallery`&&(()=>{let e=it.mode===`compact`?vt:it.mode===`comfortable`?nt:et,t=it.mode===`compact`?v(`grid.toolbar.densityCompact`,{defaultValue:`Compact`}):it.mode===`comfortable`?v(`grid.toolbar.densityComfortable`,{defaultValue:`Comfortable`}):v(`grid.toolbar.densitySpacious`,{defaultValue:`Spacious`}),n=`${v(`grid.toolbar.densityMode`,{defaultValue:`Density`})}: ${t}`,r=v(`grid.toolbar.densityCycleHint`,{defaultValue:`{{label}} (click to cycle)`,label:n});return(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,"aria-label":n,className:X(`hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary transition-colors duration-150`,it.mode!==`compact`&&`text-foreground font-medium`),onClick:it.cycle,title:r,children:(0,$.jsx)(e,{className:`h-3.5 w-3.5`})})})(),E.showDensity&&!E.compactToolbar&&D===`gallery`&&(()=>{let e=ot===`small`?vt:ot===`medium`?nt:et,t=ot===`small`?v(`grid.toolbar.densityCompact`,{defaultValue:`Compact`}):ot===`medium`?v(`grid.toolbar.densityComfortable`,{defaultValue:`Comfortable`}):v(`grid.toolbar.densitySpacious`,{defaultValue:`Spacious`}),n=`${v(`grid.toolbar.densityMode`,{defaultValue:`Density`})}: ${t}`,r=v(`grid.toolbar.densityCycleHint`,{defaultValue:`{{label}} (click to cycle)`,label:n});return(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,"aria-label":n,className:X(`hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary transition-colors duration-150`,ot!==`small`&&`text-foreground font-medium`),onClick:lt,title:r,children:(0,$.jsx)(e,{className:`h-3.5 w-3.5`})})})(),E.compactToolbar&&(E.showGroup||E.showColor||E.showDensity||E.showHideFields)&&(0,$.jsx)(on,{t:v,allFields:At,showGroup:E.showGroup,groupingConfig:Y,setGroupingConfig:Te,showColor:E.showColor,rowColorConfig:ke,setRowColorConfig:Ae,showDensity:E.showDensity,density:it,showHideFields:E.showHideFields,hiddenFields:We,updateHiddenFields:qe}),(E.showColor||E.showDensity||E.compactToolbar)&&rt&&C.allowExport!==!1&&(0,$.jsx)(`div`,{className:`h-5 w-px bg-border/50 mx-1 shrink-0`}),rt&&C.allowExport!==!1&&(0,$.jsxs)(Le,{open:Ze,onOpenChange:Qe,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,children:[(0,$.jsx)(je,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.export`)})]})}),(0,$.jsx)(q,{align:`start`,className:`w-48 p-2`,children:(0,$.jsx)(`div`,{className:`space-y-1`,children:(rt.formats||[`csv`,`json`]).map(e=>(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`w-full justify-start h-8 text-xs`,onClick:()=>kt(e),children:[(0,$.jsx)(je,{className:`h-3.5 w-3.5 mr-2`}),v(`list.exportAs`,{format:e.toUpperCase()})]},e))})})]}),(C.sharing?.enabled||C.sharing?.type)&&(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,title:`Sharing: ${C.sharing?.visibility||C.sharing?.type||`private`}`,"data-testid":`share-button`,children:[(0,$.jsx)(Ct,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.share`)})]}),C.allowPrinting&&(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,onClick:()=>window.print(),"data-testid":`print-button`,children:[(0,$.jsx)(I,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.print`)})]}),(()=>{let e=C.allowPrinting||C.sharing?.enabled||C.sharing?.type||rt&&C.allowExport!==!1;return E.showSearch&&e?(0,$.jsx)(`div`,{className:`h-5 w-px bg-border/50 mx-1 shrink-0`}):null})(),E.showSearch&&(0,$.jsxs)(Le,{open:P,onOpenChange:F,children:[(0,$.jsx)(k,{asChild:!0,children:(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,className:X(`hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,j&&`text-foreground font-medium`),"data-testid":`search-icon-button`,title:v(`list.search`),children:(0,$.jsx)(zt,{className:`h-3.5 w-3.5`})})}),(0,$.jsx)(q,{align:`end`,className:`w-[calc(100vw-2rem)] sm:w-64 p-2`,"data-testid":`search-popover`,children:(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(zt,{className:`absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground`}),(0,$.jsx)(Je,{placeholder:v(`list.search`)+`...`,value:j,onChange:e=>xt(e.target.value),className:`pl-7 h-8 text-xs`,autoFocus:!0}),j&&(0,$.jsx)(Z,{variant:`ghost`,size:`sm`,className:`absolute right-0.5 top-1/2 -translate-y-1/2 h-5 w-5 p-0 hover:bg-muted-foreground/20`,onClick:()=>xt(``),children:(0,$.jsx)(Ut,{className:`h-3 w-3`})})]})})]}),E.showAddRecord&&E.addRecordPosition===`top`&&(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,"data-testid":`add-record-button`,onClick:()=>h.onAddRecord?.(),children:[(0,$.jsx)(Ce,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.addRecord`)})]})]})]}),$e&&$e.length>0&&(0,$.jsx)(`div`,{className:`hidden sm:flex border-b px-2 sm:px-4 py-1 items-center gap-1 flex-wrap bg-background`,"data-testid":`quick-filters`,children:$e.map(e=>{let t=ze.has(e.id),n=e.icon?tt[e.icon.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)]??null:null;return(0,$.jsxs)(Z,{variant:t?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>Ot(e.id),children:[n&&(0,$.jsx)(n,{className:`h-3 w-3 mr-1.5`}),e.label]},e.id)})}),(0,$.jsxs)(`div`,{className:`flex-1 min-h-0 bg-background relative overflow-hidden animate-in fade-in-0 duration-200`,children:[(0,$.jsx)(A,{active:ue&&W.length>0}),ue&&W.length===0?(0,$.jsxs)(`div`,{className:`flex flex-col h-full min-h-[200px] p-4 gap-2`,"data-testid":`list-loading`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:v(`list.loading`)}),[0,1,2,3,4,5].map(e=>(0,$.jsx)(`div`,{className:`h-9 rounded bg-muted/60 animate-pulse`,style:{opacity:Math.max(.25,1-e*.12)}},e))]}):!ue&&W.length===0&&D===`grid`?(()=>{let e=C.emptyState?.icon,t=e?tt[e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)]??Vt:Vt,n=(typeof C.emptyState?.title==`string`?C.emptyState.title:void 0)??v(`list.noItems`),r=(typeof C.emptyState?.message==`string`?C.emptyState.message:void 0)??v(`list.noItemsMessage`);return(0,$.jsx)(ut,{"data-testid":`empty-state`,className:`h-full min-h-[200px] p-8 gap-1 [&>h3]:text-lg [&>h3]:font-medium [&>h3]:text-foreground [&>p]:max-w-md`,icon:(0,$.jsx)(t,{className:`h-12 w-12 text-muted-foreground/50`}),iconWrapperClassName:`mb-3`,title:n,description:r,action:E.showAddRecord?(0,$.jsxs)(Z,{variant:`default`,size:`sm`,"data-testid":`empty-state-add-record`,onClick:()=>h.onAddRecord?.(),children:[(0,$.jsx)(Ce,{className:`h-4 w-4 mr-1.5`}),v(`list.addRecord`)]}):void 0})})():(0,$.jsx)(u,{schema:Tt,...h,data:W,loading:ue,onRowSelect:Fe})]},D),E.showAddRecord&&E.addRecordPosition===`bottom`&&(0,$.jsx)(`div`,{className:`border-t px-2 sm:px-4 py-1 bg-background shrink-0`,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150`,"data-testid":`add-record-button`,onClick:()=>h.onAddRecord?.(),children:[(0,$.jsx)(Ce,{className:`h-3.5 w-3.5 mr-1.5`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:v(`list.addRecord`)})]})}),C.bulkActions&&C.bulkActions.length>0&&Pe.length>0&&D!==`grid`&&(0,$.jsxs)(`div`,{className:`border-t border-primary/30 px-4 py-2 flex items-center gap-2 text-xs bg-primary/10 text-foreground shrink-0 shadow-sm`,role:`region`,"aria-label":`Bulk actions`,"data-testid":`bulk-actions-bar`,children:[(0,$.jsx)(Ie,{className:`h-3.5 w-3.5 text-primary shrink-0`}),(0,$.jsxs)(`span`,{className:`font-medium`,children:[Pe.length,` `,Pe.length===1?`item`:`items`,` selected`]}),(0,$.jsx)(`div`,{className:`flex items-center gap-1.5 ml-3`,children:C.bulkActions.map(e=>{let t=String(e).toLowerCase(),n=t.includes(`delete`)||t.includes(`remove`)||t.includes(`destroy`),r=n?ge:null;return(0,$.jsxs)(Z,{variant:n?`destructive`:`outline`,size:`sm`,className:`h-7 px-2.5 text-xs gap-1.5`,onClick:()=>h.onBulkAction?.(e,Pe),"data-testid":`bulk-action-${e}`,children:[r&&(0,$.jsx)(r,{className:`h-3 w-3`}),T(e)]},e)})}),(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs ml-auto gap-1`,onClick:()=>Fe([]),children:[(0,$.jsx)(Ut,{className:`h-3 w-3`}),`Clear`]})]}),!ue&&W.length>0&&C.showRecordCount!==!1&&(0,$.jsxs)(`div`,{className:`border-t px-4 py-2 flex items-center gap-3 text-xs text-muted-foreground bg-background shrink-0`,"data-testid":`record-count-bar`,children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground/80`,children:W.length===1?v(`list.recordCountOne`,{count:W.length}):v(`list.recordCount`,{count:W.length})}),ve&&(0,$.jsx)(`span`,{className:`text-amber-600`,"data-testid":`data-limit-warning`,children:v(`list.dataLimitReached`,{limit:Se})}),C.pagination?.pageSizeOptions&&C.pagination.pageSizeOptions.length>0&&(0,$.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,$.jsx)(`span`,{children:v(`table.rowsPerPage`,{defaultValue:`Rows per page`})}),(0,$.jsx)(`select`,{"data-testid":`page-size-selector`,className:`h-7 w-[72px] px-2 py-1 text-xs rounded-md border border-input bg-background`,value:String(Se),onChange:e=>{let t=Number(e.target.value);xe(t),h.onPageSizeChange&&h.onPageSizeChange(t)},children:C.pagination.pageSizeOptions.map(e=>(0,$.jsx)(`option`,{value:String(e),children:e},e))})]})]}),St.isOverlay&&(0,$.jsx)(fe,{...St,title:C.label?`${C.label} Detail`:C.objectName?`${C.objectName.charAt(0).toUpperCase()+C.objectName.slice(1)} Detail`:`Record Detail`,children:e=>(0,$.jsx)(`div`,{className:`space-y-3`,children:Object.entries(e).map(([e,t])=>(0,$.jsxs)(`div`,{className:`flex flex-col`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wide`,children:e.replace(/_/g,` `)}),(0,$.jsx)(`span`,{className:`text-sm`,children:String(t??`—`)})]},e))})})]})});wn.displayName=`ListView`;var Tn={small:`grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6`,medium:`grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4`,large:`grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3`},En={small:`aspect-square`,medium:`aspect-[4/3]`,large:`aspect-[16/10]`},Dn=new Set([`number`,`currency`,`percent`,`integer`,`decimal`]),On=[{bg:`from-indigo-500/15 via-indigo-500/5 to-purple-500/10`,ring:`ring-indigo-500/15`,text:`text-indigo-600/70 dark:text-indigo-300/70`},{bg:`from-sky-500/15 via-sky-500/5 to-cyan-500/10`,ring:`ring-sky-500/15`,text:`text-sky-600/70 dark:text-sky-300/70`},{bg:`from-emerald-500/15 via-emerald-500/5 to-teal-500/10`,ring:`ring-emerald-500/15`,text:`text-emerald-600/70 dark:text-emerald-300/70`},{bg:`from-amber-500/15 via-amber-500/5 to-orange-500/10`,ring:`ring-amber-500/15`,text:`text-amber-600/70 dark:text-amber-300/70`},{bg:`from-rose-500/15 via-rose-500/5 to-pink-500/10`,ring:`ring-rose-500/15`,text:`text-rose-600/70 dark:text-rose-300/70`},{bg:`from-violet-500/15 via-violet-500/5 to-fuchsia-500/10`,ring:`ring-violet-500/15`,text:`text-violet-600/70 dark:text-violet-300/70`}];function kn(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n);return On[Math.abs(t)%On.length]}S.register(`object-gallery`,e=>{let{schema:t}=e,n=(0,Q.useContext)(w),r=e.dataSource||n?.dataSource,i=f(t.bind),[a,o]=(0,Q.useState)([]),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),m=d({navigation:t.navigation,objectName:t.objectName,onRowClick:e.onRowClick??e.onCardClick}),h=t.gallery,g=h?.coverField??t.imageField??`image`,_=h?.coverFit??`cover`,v=h?.cardSize??`medium`,y=h?.titleField??t.titleField??`name`,b=h?.visibleFields,{fieldLabel:x,fieldOptionLabel:S}=Mt(),C=(0,Q.useCallback)(e=>{let n=l?.fields?.[e],r={name:e};if(n){n.type&&(r.type=n.type),n.label&&(r.label=n.label),n.options&&(r.options=n.options),n.currency&&(r.currency=n.currency),n.precision!==void 0&&(r.precision=n.precision),n.format&&(r.format=n.format);let e=n.reference_to||n.reference;e&&(r.reference_to=e),n.reference_field&&(r.reference_field=n.reference_field)}if(t.objectName){let n=String(r.label??e);r.label=x(t.objectName,e,n)}return t.objectName&&Array.isArray(r.options)&&(r.options=r.options.map(n=>{let r=String(n?.value??n),i=String(n?.label??r);return{...n,value:r,label:S(t.objectName,e,r,i)}})),r},[l,t.objectName,x,S]);(0,Q.useEffect)(()=>{let e=!0;return(async()=>{if(!(!r||typeof r.getObjectSchema!=`function`||!t.objectName))try{let n=await r.getObjectSchema(t.objectName);e&&u(n)}catch(e){console.warn(`Failed to fetch object def for ObjectGallery`,e)}})(),()=>{e=!1}},[t.objectName,r]),(0,Q.useEffect)(()=>{let n=!0;if(e.data&&Array.isArray(e.data)){o(e.data);return}return t.objectName&&!i&&!t.data&&!e.data&&(async()=>{if(!(!r||typeof r.find!=`function`||!t.objectName)){n&&c(!0);try{let e=p(l?.fields),i=await r.find(t.objectName,{$filter:t.filter,...e.length>0?{$expand:e}:{}}),a=[];if(Array.isArray(i))a=i;else if(i&&typeof i==`object`){let e=i;Array.isArray(e.records)?a=e.records:Array.isArray(e.data)&&(a=e.data)}n&&o(a)}catch(e){console.error(`[ObjectGallery] Fetch error:`,e)}finally{n&&c(!1)}}})(),()=>{n=!1}},[t.objectName,r,i,t.data,t.filter,e.data,l]);let T=e.data||i||t.data||a||[],E=(0,Q.useMemo)(()=>T.some(e=>typeof e[g]==`string`&&!!e[g]),[T,g]),D=t.grouping?.fields,O=!!(D&&D.length>0),[k,A]=(0,Q.useState)({}),j=(0,Q.useMemo)(()=>D?D.some(e=>e.collapsed):!1,[D]),M=(0,Q.useCallback)(e=>{A(t=>({...t,[e]:t[e]===void 0?!j:!t[e]}))},[j]),N=(0,Q.useMemo)(()=>{if(!O||!D)return[];let e=new Map,t=[];for(let n of T){let r=D.map(e=>String(n[e.field]??``)).join(` / `);if(!e.has(r)){let i=D.map(e=>{let t=n[e.field];return t!=null&&t!==``?String(t):`(empty)`}).join(` / `);e.set(r,{label:i,items:[]}),t.push(r)}e.get(r).items.push(n)}let n=D[0]?.order??`asc`;return t.sort((e,t)=>{let r=e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`});return n===`desc`?-r:r}),t.map(t=>{let n=e.get(t),r=t in k?k[t]:j;return{key:t,label:n.label,items:n.items,collapsed:r}})},[T,D,O,k,j]);if(s&&!T.length)return(0,$.jsx)(`div`,{className:`p-4 text-sm text-muted-foreground`,children:`Loading Gallery...`});if(!T.length)return(0,$.jsx)(`div`,{className:`p-4 text-sm text-muted-foreground`,children:`No items to display`});let P=(n,r)=>{let i=n.id??n._id??r,a=String(n[y]??`Untitled`),o=n[g],s=kn(String(i)+`|`+a);return(0,$.jsxs)(U,{role:`listitem`,className:X(`group relative overflow-hidden border-border/60 bg-card`,`transition-all duration-200 ease-out`,`hover:shadow-lg hover:border-border hover:-translate-y-0.5`,(e.onCardClick||e.onRowClick||t.navigation)&&`cursor-pointer`),onClick:e=>m.handleClick(n,e),children:[!E&&(0,$.jsx)(`div`,{"aria-hidden":!0,className:X(`absolute inset-x-0 top-0 h-[3px] bg-gradient-to-r`,s.bg)}),(0,$.jsx)(`div`,{className:X(`w-full overflow-hidden relative`,En[v]),hidden:!E,children:o?(0,$.jsx)(`img`,{src:o,alt:a,className:X(`h-full w-full transition-transform duration-300 ease-out group-hover:scale-[1.04]`,_===`cover`&&`object-cover`,_===`contain`&&`object-contain`)}):(0,$.jsx)(`div`,{className:X(`flex h-full w-full items-center justify-center bg-gradient-to-br ring-1 ring-inset`,s.bg,s.ring),children:(0,$.jsx)(`span`,{className:X(`text-5xl font-semibold tracking-tight opacity-90`,s.text),children:a[0]?.toUpperCase()})})}),(0,$.jsxs)(Ot,{className:X(`p-3`,E&&`border-t border-border/60`),children:[(0,$.jsx)(`h3`,{className:`font-semibold tracking-tight truncate text-sm leading-tight text-foreground`,title:a,children:a}),b&&b.length>0&&(0,$.jsx)(`div`,{className:`mt-1.5 space-y-1`,children:b.map(e=>{let t=n[e];if(t==null||t===``)return null;let r=C(e),i=_t(r)||r.type||`text`,a=mt(i),o=r?.label&&String(r.label).trim()?String(r.label):void 0,s=o!=null&&Dn.has(i);return(0,$.jsxs)(`div`,{className:X(`text-xs text-muted-foreground truncate [&_*]:!text-xs`,s&&`flex items-baseline gap-1.5`),onClick:e=>{e.target.closest(`a,button`)&&e.stopPropagation()},children:[s&&(0,$.jsx)(`span`,{className:`shrink-0 text-muted-foreground/70 tabular-nums`,children:o}),(0,$.jsx)(a,{value:t,field:r})]},e)})})]})]},i)},F=e=>(0,$.jsx)(`div`,{className:X(`grid gap-4 p-4 auto-rows-min content-start`,Tn[v],t.className),role:`list`,children:e.map((e,t)=>P(e,t))});return(0,$.jsxs)($.Fragment,{children:[O?(0,$.jsx)(`div`,{className:`space-y-2`,children:N.map(e=>(0,$.jsxs)(`div`,{className:`border rounded-md`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 px-3 py-2 text-sm font-medium text-left bg-muted/50 hover:bg-muted transition-colors`,onClick:()=>M(e.key),children:[e.collapsed?(0,$.jsx)(He,{className:`h-4 w-4 shrink-0`}):(0,$.jsx)(J,{className:`h-4 w-4 shrink-0`}),(0,$.jsx)(`span`,{children:e.label}),(0,$.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:e.items.length})]}),!e.collapsed&&F(e.items)]},e.key))}):F(T),m.isOverlay&&(0,$.jsx)(fe,{...m,title:`Gallery Item`,children:e=>(0,$.jsx)(`div`,{className:`space-y-3`,children:Object.entries(e).map(([e,t])=>(0,$.jsxs)(`div`,{className:`flex flex-col`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wide`,children:e.replace(/_/g,` `)}),(0,$.jsx)(`span`,{className:`text-sm`,children:String(t??`—`)})]},e))})})]})},{namespace:`plugin-list`,label:`Gallery View`,category:`view`}),S.register(`list-view`,wn,{namespace:`plugin-list`,label:`List View`,category:`Views`,icon:`LayoutList`,inputs:[{name:`objectName`,type:`string`,label:`Object Name`,required:!0},{name:`viewType`,type:`enum`,label:`Default View`,enum:[{label:`Grid`,value:`grid`},{label:`Kanban`,value:`kanban`},{label:`Gallery`,value:`gallery`},{label:`Calendar`,value:`calendar`},{label:`Timeline`,value:`timeline`},{label:`Gantt`,value:`gantt`},{label:`Map`,value:`map`}],defaultValue:`grid`},{name:`fields`,type:`array`,label:`Fields`},{name:`filters`,type:`array`,label:`Filters`},{name:`sort`,type:`array`,label:`Sort`},{name:`options`,type:`object`,label:`View Options`}],defaultProps:{objectName:``,viewType:`grid`,fields:[],filters:[],sort:[],options:{}}}),S.register(`list`,wn,{namespace:`view`,category:`view`,label:`List`,icon:`LayoutList`,inputs:[{name:`objectName`,type:`string`,label:`Object Name`,required:!0},{name:`viewType`,type:`enum`,label:`Default View`,enum:[{label:`Grid`,value:`grid`},{label:`Kanban`,value:`kanban`},{label:`Gallery`,value:`gallery`},{label:`Calendar`,value:`calendar`},{label:`Timeline`,value:`timeline`},{label:`Gantt`,value:`gantt`},{label:`Map`,value:`map`}],defaultValue:`grid`},{name:`fields`,type:`array`,label:`Fields`},{name:`filters`,type:`array`,label:`Filters`},{name:`sort`,type:`array`,label:`Sort`},{name:`options`,type:`object`,label:`View Options`}]});var An=new Set([`textarea`,`markdown`,`html`,`grid`,`rich-text`,`field:textarea`,`field:markdown`,`field:html`,`field:grid`,`field:rich-text`]);function jn(e){return An.has(e)}function Mn(e,t){let n;return n=e<=3?1:2,t!==void 0&&t<640?Math.min(n,1):n}function Nn(e,t){return t<=1?e:e.map(e=>e.span===void 0&&e.type&&jn(e.type)?{...e,span:t}:e)}function Pn(e,t,n){if(t!==void 0)return{fields:Nn(e,t),columns:t};let r=Mn(e.length,n);return{fields:Nn(e,r),columns:r}}function Fn(e,t){return function(){try{let n=b();return n.t(t)===t?{t:(t,n)=>{let r=e[t]||t;if(n)for(let[e,t]of Object.entries(n))r=r.replace(`{{${e}}}`,String(t));return r}}:{t:n.t}}catch{return{t:(t,n)=>{let r=e[t]||t;if(n)for(let[e,t]of Object.entries(n))r=r.replace(`{{${e}}}`,String(t));return r}}}}}var In=Fn({"detail.back":`Back`,"detail.edit":`Edit`,"detail.editInline":`Edit`,"detail.save":`Save`,"detail.saveChanges":`Save changes`,"detail.editFieldsInline":`Edit fields inline`,"detail.cancel":`Cancel`,"detail.cancelEdit":`Discard changes`,"detail.openInNewTab":`Open in new tab`,"detail.share":`Share`,"detail.duplicate":`Duplicate`,"detail.export":`Export`,"detail.viewHistory":`View history`,"detail.delete":`Delete`,"detail.moreActions":`More actions`,"detail.addToFavorites":`Add to favorites`,"detail.removeFromFavorites":`Remove from favorites`,"detail.previousRecord":`Previous record`,"detail.nextRecord":`Next record`,"detail.recordOf":`{{current}} of {{total}}`,"detail.recordNotFound":`Record not found`,"detail.recordNotFoundDescription":`The record you are looking for does not exist or may have been deleted.`,"detail.goBack":`Go back`,"detail.details":`Details`,"detail.related":`Related`,"detail.relatedRecords":`{{count}} records`,"detail.relatedRecordOne":`{{count}} record`,"detail.noRelatedRecords":`No related records found`,"detail.loading":`Loading...`,"detail.copyToClipboard":`Copy to clipboard`,"detail.copied":`Copied!`,"detail.deleteConfirmation":`Are you sure you want to delete this record?`,"detail.editRecord":`Edit record`,"detail.viewAll":`View All`,"detail.new":`New`,"detail.emptyValue":`—`,"detail.noValue":`No value`,"detail.activity":`Activity`,"detail.copyRecordId":`Copy record ID`,"detail.showEmptyFields":`Show {{count}} empty fields`,"detail.hideEmptyFields":`Hide empty fields`,"detail.editRow":`Edit`,"detail.deleteRow":`Delete`,"detail.deleteRowConfirmation":`Are you sure you want to delete this record?`,"detail.actions":`Actions`,"detail.previousPage":`Previous`,"detail.nextPage":`Next`,"detail.pageOf":`Page {{current}} of {{total}}`,"detail.sortBy":`Sort by`,"detail.filterPlaceholder":`Filter...`,"detail.highlightFields":`Key Fields`,"detail.comments":`Comments`,"detail.searchComments":`Search comments…`,"detail.addCommentPlaceholder":`Add a comment… (Ctrl+Enter to submit)`,"detail.noMatchingComments":`No matching comments`,"detail.noCommentsYet":`No comments yet`,"detail.pinned":`Pinned`,"detail.pin":`Pin`,"detail.unpin":`Unpin`,"detail.justNow":`just now`,"detail.minutesAgo":`{{count}}m ago`,"detail.hoursAgo":`{{count}}h ago`,"detail.daysAgo":`{{count}}d ago`,"detail.createdBy":`Created by`,"detail.updatedBy":`Updated by`,"detail.dropFilesToUpload":`Drop files here or click to upload`,"detail.attachmentCount":`{{count}} attachment`,"detail.attachmentCountPlural":`{{count}} attachments`,"detail.removeAttachment":`Remove attachment`,"detail.unifiedDiff":`Unified diff`,"detail.sideBySideDiff":`Side-by-side diff`,"detail.noChanges":`No changes`,"detail.previousVersion":`Previous`,"detail.currentVersion":`Current`,"detail.discussion":`Discussion`,"detail.showDiscussion":`Show Discussion ({{count}})`,"detail.hideDiscussion":`Hide discussion`,"detail.bold":`Bold (Ctrl+B)`,"detail.italic":`Italic (Ctrl+I)`,"detail.listFormat":`List`,"detail.inlineCode":`Inline code`,"detail.mentionSomeone":`Mention someone`,"detail.preview":`Preview`,"detail.submitComment":`Submit (Ctrl+Enter)`,"detail.sendComment":`Send`,"detail.writeComment":`Write a comment…`,"detail.subscribedTooltip":`Subscribed — click to unsubscribe`,"detail.unsubscribedTooltip":`Subscribe to notifications`,"detail.firstRecord":`First record (Home)`,"detail.previousRecordKey":`Previous record (←)`,"detail.nextRecordKey":`Next record (→)`,"detail.lastRecord":`Last record (End)`,"detail.noRecords":`No records`,"detail.showEmptyRelated_one":`+ {{count}} empty`,"detail.showEmptyRelated_other":`+ {{count}} empty`,"detail.searchWhileNavigating":`Search while navigating`,"detail.searchRecords":`Search records…`,"detail.allActivity":`All Activity`,"detail.commentsOnly":`Comments Only`,"detail.fieldChangesFilter":`Field Changes`,"detail.tasksOnly":`Tasks Only`,"detail.leaveCommentPlaceholder":`Leave a comment… (Ctrl+Enter to submit)`,"detail.noActivity":`No activity recorded`,"detail.loadMore":`Load more`,"detail.edited":`(edited)`,"detail.via":`via {{source}}`,"detail.replyCount":`{{count}} reply`,"detail.replyCountPlural":`{{count}} replies`,"detail.replyPlaceholder":`Reply…`,"detail.filterActivity":`Filter activity`,"detail.openDiscussion":`Open discussion panel`,"detail.closeDiscussion":`Close discussion panel`,"detail.subscribeAriaLabel":`Subscribe to notifications`,"detail.unsubscribeAriaLabel":`Unsubscribe from notifications`,"detail.clearSearch":`Clear search`,"detail.concurrentUpdateTitle":`This record was modified by someone else`,"detail.concurrentUpdateDescription":`Another user saved a newer version of {{field}} while you were editing. To prevent silently overwriting their change, please choose how to resolve the conflict.`,"detail.concurrentUpdateYourEdit":`Your edit`,"detail.concurrentUpdateCurrentValue":`Current value`,"detail.concurrentUpdateUpdatedBy":`Updated by {{name}}`,"detail.concurrentUpdateUpdatedAt":`Updated at {{when}}`,"detail.concurrentUpdateReload":`Reload latest`,"detail.concurrentUpdateOverwrite":`Overwrite anyway`,"detail.concurrentUpdateCancel":`Cancel`},`detail.back`);function Ln(e,t){return!e||e<=1||t<=1?``:t===2?e>=2?`md:col-span-2`:``:e===2?`md:col-span-2`:e>=3?`md:col-span-2 lg:col-span-3`:``}var Rn=({section:e,data:t,className:n,objectSchema:r,objectName:i,isEditing:a=!1,onFieldChange:o,virtualScroll:s})=>{let[c,l]=Q.useState(e.defaultCollapsed??!1),[d,f]=Q.useState(null),[p,m]=Q.useState(void 0),[h,g]=Q.useState(!1),{t:_}=In(),{fieldLabel:v,translateOptions:y}=Mt(),b=Q.useCallback((e,t)=>{let n=t==null?``:String(t);navigator.clipboard.writeText(n).then(()=>{f(e),setTimeout(()=>f(null),2e3)})},[]),x=Q.useCallback(e=>{let n=t?.[e.name]??e.value;return n==null||n===``},[t]),S=Q.useMemo(()=>e.fields.filter(x).length,[e.fields,x]),C=lt(),w=C?3:4,T=C?.2:.25,E=e.fields.length-S,D=!e.hideEmpty&&!a&&e.fields.length>=w&&S/e.fields.length>=T&&E>0,O=!h&&(e.hideEmpty||D)?e.fields.filter(e=>!x(e)):e.fields;if(O.length===0&&S===e.fields.length)return null;let{fields:k,columns:A}=Pn(O,e.columns),j=e=>{let n=t?.[e.name]??e.value;if(e.render)return(0,$.jsx)(u,{schema:e.render,data:{...t,value:n}});let s=Ln(e.span,A),c=r?.fields?.[e.name],l={...e};if(c){!e.type&&c.type&&(l.type=c.type),c.options&&!l.options&&(l.options=c.options),c.currency&&!l.currency&&(l.currency=c.currency),c.precision!==void 0&&l.precision===void 0&&(l.precision=c.precision),c.format&&!l.format&&(l.format=c.format);let t=c.reference_to||c.reference;t&&!l.reference_to&&(l.reference_to=t),c.reference_field&&!l.reference_field&&(l.reference_field=c.reference_field)}i&&Array.isArray(l.options)&&l.options.length>0&&(l.options=y(i,e.name,l.options));let f=(()=>{if(n==null||n===``)return(0,$.jsx)(`span`,{className:`text-muted-foreground/60 text-sm select-none`,"aria-label":_(`detail.noValue`,{defaultValue:`No value`}),title:_(`detail.noValue`,{defaultValue:`No value`}),children:`—`});let t=_t(l)||e.type;if(t){let e=mt(t);if(e)return(0,$.jsx)(e,{value:n,field:l})}return String(n)})(),p=n!=null&&n!==``,m=d===e.name;return(0,$.jsxs)(`div`,{className:X(`space-y-1.5 group`,s),children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wide`,children:v(i||``,e.name,e.label||e.name)}),a&&!e.readonly?(0,$.jsx)(`div`,{className:`min-h-[44px] sm:min-h-0`,children:(()=>{let t=l.type||e.type;if(t===`select`&&Array.isArray(l.options)&&l.options.length>0)return(0,$.jsx)(Wt,{field:l,value:n==null?``:String(n),onChange:t=>o?.(e.name,t)});if(t===`boolean`)return(0,$.jsx)(Ve,{field:l,value:!!n,onChange:t=>o?.(e.name,t)});let r=t===`date`||t===`datetime`;return(0,$.jsx)(`input`,{type:t===`number`?`number`:r?`date`:`text`,className:`w-full px-2 py-1.5 text-sm border rounded-md bg-background focus:outline-none focus:ring-2 focus:ring-ring`,value:n==null?``:r?(()=>{let e=String(n);if(/^\d{4}-\d{2}-\d{2}/.test(e))return e.slice(0,10);let t=new Date(e);return isNaN(t.getTime())?``:t.toLocaleDateString(`en-CA`)})():String(n),onChange:t=>{let n=t.target.value;if(r&&n){let t=new Date(n+`T00:00:00`).toISOString();o?.(e.name,t)}else o?.(e.name,n)}})})()}):(0,$.jsxs)(`div`,{className:X(`flex items-start justify-between gap-2 min-h-[44px] sm:min-h-0 rounded-md`,p&&`cursor-pointer active:bg-muted/60 transition-colors`),onClick:p?()=>b(e.name,n):void 0,onKeyDown:p?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),b(e.name,n))}:void 0,role:p?`button`:void 0,tabIndex:p?0:void 0,children:[(0,$.jsx)(`div`,{className:`text-sm flex-1 break-words py-1`,children:f}),p&&(0,$.jsx)(he,{children:(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity shrink-0`,onClick:t=>{t.stopPropagation(),b(e.name,n)},children:m?(0,$.jsx)(te,{className:`h-3 w-3 text-green-600`}):(0,$.jsx)(It,{className:`h-3 w-3`})})}),(0,$.jsx)(L,{children:_(m?`detail.copied`:`detail.copyToClipboard`)})]})})]})]},e.name)},M=s?.enabled===!0,N=s?.batchSize??20;Q.useEffect(()=>{if(!M){m(void 0);return}if(k.length<=N){m(void 0);return}m(N);let e=setTimeout(()=>m(void 0),100);return()=>clearTimeout(e)},[M,k.length,N]);let P=p===void 0?k:k.slice(0,p),F=S>0&&(e.hideEmpty||D),ee=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:X(`grid gap-3 sm:gap-4`,A===1?`grid-cols-1`:A===2?`grid-cols-1 md:grid-cols-2`:`grid-cols-1 md:grid-cols-2 lg:grid-cols-3`),children:P.map(j)}),F&&(0,$.jsx)(`div`,{className:`mt-3 -ml-2`,children:(0,$.jsxs)(Z,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>g(e=>!e),className:`h-7 px-2 text-xs text-muted-foreground hover:text-foreground`,children:[h?(0,$.jsx)(ie,{className:`h-3.5 w-3.5 mr-1.5`}):(0,$.jsx)(ke,{className:`h-3.5 w-3.5 mr-1.5`}),h?_(`detail.hideEmptyFields`,{defaultValue:`Hide empty fields`}):_(`detail.showEmptyFields`,{count:S,defaultValue:`Show ${S} empty field${S===1?``:`s`}`})]})})]});return!e.title&&!e.collapsible&&e.showBorder===!1?(0,$.jsx)(`div`,{className:X(n),children:ee}):e.collapsible?(0,$.jsx)(B,{open:!c,onOpenChange:e=>l(!e),className:n,children:(0,$.jsxs)(U,{children:[(0,$.jsx)(Ae,{asChild:!0,children:(0,$.jsxs)(Pe,{className:X(`py-3 px-4 sm:py-4 sm:px-6 cursor-pointer hover:bg-muted/50 transition-colors`,e.headerColor&&`bg-${e.headerColor}`),children:[(0,$.jsxs)(Ne,{className:`flex items-center justify-between text-base font-semibold tracking-tight`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,$.jsx)(`span`,{children:e.title})]}),(0,$.jsx)(`div`,{className:`flex items-center gap-2`,children:c?(0,$.jsx)(He,{className:`h-4 w-4 text-muted-foreground`}):(0,$.jsx)(J,{className:`h-4 w-4 text-muted-foreground`})})]}),e.description&&!c&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:e.description})]})}),(0,$.jsx)(Te,{children:(0,$.jsx)(Ot,{className:`pt-3 sm:pt-4 px-3 sm:px-6 pb-4 sm:pb-5`,children:ee})})]})}):(0,$.jsxs)(U,{className:X(e.showBorder===!1?`border-none shadow-none`:``,n),children:[e.title&&(0,$.jsxs)(Pe,{className:X(`py-3 px-4 sm:py-4 sm:px-6`,e.headerColor&&`bg-${e.headerColor}`),children:[(0,$.jsx)(Ne,{className:`flex items-center justify-between text-base font-semibold tracking-tight`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,$.jsx)(`span`,{children:e.title})]})}),e.description&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:e.description})]}),(0,$.jsx)(Ot,{className:`pt-3 sm:pt-4 px-3 sm:px-6 pb-4 sm:pb-5`,children:ee})]})},zn=({tabs:e,data:t,className:n})=>{let[r,i]=Q.useState(e[0]?.key),a=e.filter(e=>typeof e.visible==`boolean`?e.visible:(e.visible,!0));return(0,$.jsxs)(T,{value:r,onValueChange:i,className:n,children:[(0,$.jsx)(Rt,{className:`w-full justify-start border-b rounded-none bg-transparent p-0`,children:a.map(e=>(0,$.jsx)(St,{value:e.key,className:`relative rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,$.jsx)(`span`,{children:e.icon}),(0,$.jsx)(`span`,{children:e.label}),e.badge&&(0,$.jsx)(_e,{variant:`secondary`,className:`ml-1`,children:e.badge})]})},e.key))}),a.map(e=>(0,$.jsx)(Xe,{value:e.key,className:`mt-4 motion-safe:data-[state=active]:animate-in motion-safe:data-[state=active]:fade-in-0 motion-safe:duration-150`,children:(0,$.jsx)(Q.Suspense,{fallback:null,children:Array.isArray(e.content)?(0,$.jsx)(`div`,{className:`space-y-4`,children:e.content.map((e,n)=>(0,$.jsx)(u,{schema:e,data:t},n))}):(0,$.jsx)(u,{schema:e.content,data:t})})},e.key))]})};function Bn(e){return e&&tt[e.split(/[-_\s]/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)]||Vt}var Vn=({title:e,type:t,api:n,data:r,schema:i,columns:o,className:s,dataSource:c,objectName:l,onNew:d,onViewAll:f,onRowEdit:p,onRowDelete:m,onRowClick:h,maxColumns:g=6,pageSize:_,sortable:v=!1,filterable:y=!1,collapsible:b=!1,defaultCollapsed:x=!1,referenceField:S,parentId:C,icon:w})=>{let T=r!==void 0,E=r??[],[D,O]=Q.useState(E),[k,A]=Q.useState(()=>!!n&&!T),[j,M]=Q.useState(0),[N,P]=Q.useState(null),[F,ee]=Q.useState(`asc`),[I,te]=Q.useState(``),[L,R]=Q.useState(null),[ne,re]=Q.useState(x),[ie,z]=Q.useState({}),{t:B}=In(),{fieldLabel:oe}=Mt();Q.useEffect(()=>{T&&O(r??[])},[r,T]),Q.useEffect(()=>{n&&c?.getObjectSchema&&!o?.length&&c.getObjectSchema(n).then(R).catch(e=>{console.warn(`[RelatedList] Failed to fetch schema for ${n}:`,e)})},[n,c,o]),Q.useEffect(()=>{if(n&&!T){if(!(S&&C!=null&&C!==``)){n&&(C==null||C===``)&&!S&&console.warn(`[RelatedList] "${n}" has no referenceField/parentId — refusing to fetch all rows. Pass relationshipField + parentId to scope the query.`),O([]),A(!1);return}A(!0);let e={[S]:C};if(c&&typeof c.find==`function`)c.find(n,{$filter:e}).then(e=>{O(Array.isArray(e)?e:Array.isArray(e?.data)?e.data:[]),A(!1)}).catch(e=>{console.error(`Failed to fetch related data:`,e),A(!1)});else{let e=new URLSearchParams({[`filter[${S}]`]:String(C)}).toString();fetch(`${n}?${e}`).then(e=>e.json()).then(e=>{O(Array.isArray(e)?e:e?.data||[])}).catch(e=>{console.error(`Failed to fetch related data:`,e)}).finally(()=>A(!1))}}},[n,T,c,S,C]),Q.useEffect(()=>{if(!c?.find||!L?.fields||!D.length)return;let e=L.fields,t=[];for(let[n,r]of Object.entries(e)){if(!r||r.type!==`lookup`&&r.type!==`master_detail`)continue;let e=r.reference_to||r.reference;if(!e)continue;let i=new Set;for(let e of D){let t=e?.[n];t!=null&&(typeof t==`string`&&t?i.add(t):typeof t==`number`&&i.add(String(t)))}let a=ie[n]||{},o=Array.from(i).filter(e=>!(e in a));o.length>0&&t.push({fieldName:n,target:e,ids:o})}if(t.length===0)return;let n=!1;return Promise.all(t.map(({fieldName:e,target:t,ids:n})=>c.find(t,{$filter:{id:{$in:n}},$top:n.length}).then(t=>{let n=Array.isArray(t)?t:t?.data||[],r={};for(let e of n){let t=e?.id||e?._id;t&&(r[String(t)]=e?.full_name||e?.fullname||e?.display_name||e?.name||e?.subject||e?.title||e?.label||e?.code||String(t))}return{fieldName:e,map:r}}).catch(t=>(console.warn(`[RelatedList] Failed to resolve lookups for ${e}:`,t),{fieldName:e,map:{}})))).then(e=>{n||z(t=>{let n={...t};for(let{fieldName:t,map:r}of e)n[t]={...n[t]||{},...r};return n})}),()=>{n=!0}},[c,L,D]);let se=Q.useMemo(()=>{if(!I)return D;let e=I.toLowerCase();return D.filter(t=>Object.values(t).some(t=>t!=null&&String(t).toLowerCase().includes(e)))},[D,I]),V=Q.useMemo(()=>N?[...se].sort((e,t)=>{let n=e[N],r=t[N];if(n==null&&r==null)return 0;if(n==null)return 1;if(r==null)return-1;let i=String(n).localeCompare(String(r),void 0,{numeric:!0});return F===`asc`?i:-i}):se,[se,N,F]),H=_&&_>0?_:0,W=H?Math.max(1,Math.ceil(V.length/H)):1,le=H?V.slice(j*H,(j+1)*H):V;Q.useEffect(()=>{M(0)},[I,N,F]);let ue=Q.useCallback(e=>{N===e?ee(e=>e===`asc`?`desc`:`asc`):(P(e),ee(`asc`))},[N]),[de,G]=Q.useState(null),fe=Q.useCallback(e=>{G(e)},[]),pe=Q.useCallback(()=>{de&&m?.(de),G(null)},[de,m]),me=a(),K=Q.useMemo(()=>{let e=l||n||``,t=t=>!me?.isLoaded||!e?t:t.filter(t=>{let n=t?.accessorKey||t?.field||t?.name;return n?me.checkField(e,String(n),`read`):!0}),r=e=>S?e.filter(e=>(e?.accessorKey||e?.field||e?.name)!==S):e,i=e=>e==null||typeof e==`string`&&e.trim()===``||Array.isArray(e)&&e.length===0,a=e=>D.length?e.filter(e=>{let t=e?.accessorKey||e?.field||e?.name;return t?D.some(e=>!i(e?.[t])):!0}):e,s=t=>{if(typeof t!=`string`)return t;let n=L?.fields?.[t];return{accessorKey:t,header:n?.label||oe(e,t,n)||t,fieldDef:n,fieldType:n?.type}};if(o&&o.length>0)return a(t(r(o.map(s))));if(!L?.fields)return[];let c=e,u=new Set([`image`,`file`,`attachment`,`rich_text`,`html`,`json`]),d=[`name`,`full_name`,`fullname`,`title`,`subject`,`label`,`code`,`number`],f=Object.entries(L.fields).filter(([e,t])=>!(e.startsWith(`_`)||e===`id`||e===S||t?.hidden||t?.type&&u.has(t.type)||me?.isLoaded&&c&&!me.checkField(c,e,`read`)));return f.sort(([e,t],[n,r])=>{let i=d.indexOf(e),a=d.indexOf(n),o=i>=0?i:100,s=a>=0?a:100;if(o!==s)return o-s;let c=t?.type===`select`||e.includes(`status`);return c===(r?.type===`select`||n.includes(`status`))?0:c?-1:1}),a(f.map(([e,t])=>{let n={accessorKey:e,header:oe(c,e,t.label||e)};if(t.type){let r=mt(_t({type:t.type,format:t.format})||t.type);if(r){let i=t.type===`lookup`||t.type===`master_detail`?ie[e]:void 0,a=i&&Object.keys(i).length>0?Object.entries(i).map(([e,t])=>({value:e,label:t})):void 0,o={name:e,label:t.label||e,type:t.type,...(a||t.options)&&{options:a||t.options},...t.currency&&{currency:t.currency},...t.precision!==void 0&&{precision:t.precision},...t.format&&{format:t.format},...(t.reference_to||t.reference)&&{reference_to:t.reference_to||t.reference},...t.reference_field&&{reference_field:t.reference_field}};n.cell=e=>e==null?Q.createElement(`span`,{className:`text-muted-foreground/50 text-xs italic`},`—`):Q.createElement(r,{value:e,field:o})}}return n})).slice(0,Math.max(1,g))},[o,L,l,n,oe,S,D,g,ie,me]),he=!!p||!!m,ge=lt(),ve=Q.useMemo(()=>{if(i)return i;if(ge&&(t===`grid`||t===`table`)){let e=K[0]?.accessorKey||K[0]?.field||K[0]?.name,t=K.slice(1,4).map(e=>e.accessorKey||e.field||e.name).filter(Boolean);return{type:`object-gallery`,data:le,objectName:n,gallery:{titleField:e||`name`,visibleFields:t,cardSize:`medium`},onRowClick:h}}switch(t){case`grid`:case`table`:return{type:`data-table`,data:le,columns:K,pagination:!1,pageSize:H||10,searchable:!1,exportable:!1,rowActions:he,onRowEdit:p,onRowDelete:m?fe:void 0,onRowClick:h};case`list`:return{type:`data-list`,data:le};default:return{type:`div`,children:`No view configured`}}},[t,le,K,i,H,he,p,m,fe,h,ge,n]),q=b?`cursor-pointer select-none`:void 0,ye=b?()=>re(e=>!e):void 0,be=Bn(w),xe=!k&&D.length===0,Se=y;return(0,$.jsxs)(U,{className:X(`shadow-none border-border/60 bg-transparent`,xe&&`bg-muted/10`,s),children:[(0,$.jsx)(Pe,{className:X(`py-3 px-4 sm:py-3 min-h-12 sm:min-h-0`,q),onClick:ye,children:(0,$.jsxs)(Ne,{className:`flex items-center justify-between gap-2 text-sm font-semibold`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[b&&(ne?(0,$.jsx)(He,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}):(0,$.jsx)(J,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`})),(0,$.jsx)(be,{className:`h-4 w-4 text-muted-foreground shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:X(`truncate`,xe&&`text-muted-foreground font-medium`),children:e}),(0,$.jsx)(_e,{variant:`secondary`,className:X(`text-xs font-normal h-5 px-1.5`,D.length===0&&`bg-muted text-muted-foreground`),"aria-label":`${D.length} records`,children:D.length}),xe&&(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground/70 italic ml-1 truncate`,children:B(`detail.noRelatedRecords`)})]}),(0,$.jsx)(`div`,{className:`flex items-center gap-1 shrink-0`,children:d&&(0,$.jsxs)(Z,{variant:xe?`ghost`:`outline`,size:`sm`,onClick:e=>{e.stopPropagation(),d()},className:`gap-1 h-9 sm:h-7 text-xs shadow-none`,children:[(0,$.jsx)(Ce,{className:`h-3.5 w-3.5`}),B(`detail.new`)]})})]})}),!ne&&!xe&&(0,$.jsxs)(Ot,{className:X(`pt-0 pb-4 px-4`),children:[Se&&(0,$.jsx)(`div`,{className:`mb-3`,children:(0,$.jsx)(Je,{placeholder:B(`detail.filterPlaceholder`),value:I,onChange:e=>te(e.target.value),className:`h-8 text-sm`})}),v&&K&&K.length>0&&D.length>0&&(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-3`,children:K.map(e=>{let t=e.accessorKey||e.field||e.name;if(!t)return null;let n=e.header||e.label||t,r=N===t;return(0,$.jsxs)(Z,{variant:r?`secondary`:`ghost`,size:`sm`,className:`gap-1 h-7 text-xs`,onClick:()=>ue(t),children:[(0,$.jsx)(ae,{className:`h-3 w-3`}),n,r&&(F===`asc`?` ↑`:` ↓`)]},t)})}),k?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-6 text-muted-foreground text-sm`,children:B(`detail.loading`)}):(0,$.jsx)(u,{schema:ve}),H>0&&V.length>H&&(0,$.jsxs)(`div`,{className:`flex items-center justify-between mt-3 pt-3 border-t`,children:[(0,$.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs gap-1`,disabled:j===0,onClick:()=>M(e=>Math.max(0,e-1)),children:[(0,$.jsx)(Ht,{className:`h-3 w-3`}),B(`detail.previousPage`)]}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:B(`detail.pageOf`,{current:j+1,total:W})}),(0,$.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs gap-1`,disabled:j>=W-1,onClick:()=>M(e=>Math.min(W-1,e+1)),children:[B(`detail.nextPage`),(0,$.jsx)(He,{className:`h-3 w-3`})]})]}),f&&!xe&&H>0&&V.length>H&&(0,$.jsx)(`div`,{className:`mt-3 pt-3 border-t flex justify-center`,children:(0,$.jsxs)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),f()},className:`text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1 transition-colors`,children:[B(`detail.viewAll`),(0,$.jsx)(ce,{className:`h-3 w-3`})]})})]}),(0,$.jsx)(Be,{open:de!==null,onOpenChange:e=>{e||G(null)},children:(0,$.jsxs)(Ge,{children:[(0,$.jsxs)(Ke,{children:[(0,$.jsx)($e,{children:B(`detail.deleteRowTitle`,{defaultValue:`Delete record`})}),(0,$.jsx)(gt,{children:B(`detail.deleteRowConfirmation`)})]}),(0,$.jsxs)(Bt,{children:[(0,$.jsx)(Nt,{children:B(`detail.cancel`,{defaultValue:`Cancel`})}),(0,$.jsx)(Tt,{onClick:pe,className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:B(`detail.delete`,{defaultValue:`Delete`})})]})]})})]})},Hn=({group:e,data:t,className:n,objectSchema:r,objectName:i,isEditing:a=!1,onFieldChange:o})=>{let s=e.collapsible??!0,[c,l]=Q.useState(e.defaultCollapsed??!1),u=(0,$.jsx)(`div`,{className:`space-y-3 sm:space-y-4`,children:e.sections.map((e,n)=>(0,$.jsx)(Rn,{section:e,data:t,objectSchema:r,objectName:i,isEditing:a,onFieldChange:o},n))});return s?(0,$.jsxs)(B,{open:!c,onOpenChange:e=>l(!e),className:n,children:[(0,$.jsx)(Ae,{asChild:!0,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pb-2 border-b cursor-pointer hover:bg-muted/50 transition-colors rounded-t-md px-2 py-1.5`,children:[c?(0,$.jsx)(He,{className:`h-4 w-4 text-muted-foreground shrink-0`}):(0,$.jsx)(J,{className:`h-4 w-4 text-muted-foreground shrink-0`}),e.icon&&(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,$.jsx)(`h3`,{className:`text-lg font-semibold`,children:e.title})]})}),e.description&&!c&&(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description}),(0,$.jsx)(Te,{children:(0,$.jsx)(`div`,{className:`mt-3`,children:u})})]}):(0,$.jsxs)(`div`,{className:X(`space-y-3`,n),children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pb-2 border-b`,children:[e.icon&&(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,$.jsx)(`h3`,{className:`text-lg font-semibold`,children:e.title})]}),e.description&&(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description}),u]})},Un=({fields:e,data:t,className:n,objectName:r,objectSchema:i})=>{let{fieldLabel:a}=Mt();if(!e.length||!t)return null;let o=e.filter(e=>{let n=t?.[e.name];return n!=null&&n!==``});return o.length===0?null:(0,$.jsx)(`section`,{className:X(`@container border-b border-border/60 pb-4`,n),"aria-label":`Record highlights`,children:(0,$.jsx)(`div`,{className:X(`flex flex-wrap gap-x-8 gap-y-3`),children:o.map(e=>{let n=t[e.name],o=i?.fields?.[e.name],s=e.type||o?.type,c={name:e.name,label:e.label,type:s||`text`,...o?.options&&{options:o.options},...o?.currency&&{currency:o.currency},...o?.precision!==void 0&&{precision:o.precision},...o?.format&&{format:o.format}},l=mt(_t(c)||s||`text`),u=s===`number`||s===`integer`||s===`currency`||s===`percent`||s===`decimal`,d=s===`email`||s===`url`||s===`textarea`,f=s===`boolean`;return(0,$.jsxs)(`div`,{className:X(`flex flex-col gap-1 min-w-[8rem] basis-[10rem]`,d?`max-w-[24rem] basis-[16rem]`:`max-w-[16rem]`),children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wide`,children:a(r||``,e.name,e.label)}),f?n?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 self-start rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-600 ring-1 ring-inset ring-emerald-500/30 dark:text-emerald-400`,children:[(0,$.jsx)(te,{className:`h-3 w-3`,"aria-hidden":!0}),`Yes`]}):(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 self-start rounded-full bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-700 ring-1 ring-inset ring-amber-500/30 dark:text-amber-400`,children:[(0,$.jsx)(Ut,{className:`h-3 w-3`,"aria-hidden":!0}),`No`]}):(0,$.jsx)(`span`,{className:X(`block min-w-0 truncate`,u?`text-xl md:text-2xl font-semibold leading-tight tabular-nums tracking-tight`:`text-sm font-semibold`),children:(0,$.jsx)(l,{value:n,field:c})})]},e.name)})})})};function Wn(e){try{let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<7?`${a}d ago`:t.toLocaleDateString()}catch{return e}}var Gn=({comments:e,onAddComment:t,onTogglePin:n,searchable:r=!1,className:i})=>{let{t:a}=In(),[o,s]=Q.useState(``),[c,l]=Q.useState(!1),[u,d]=Q.useState(``),f=Q.useCallback(async()=>{let e=o.trim();if(!(!e||!t)){l(!0);try{await t(e),s(``)}finally{l(!1)}}},[o,t]),p=Q.useCallback(e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),f())},[f]),m=Q.useMemo(()=>[...u.trim()?e.filter(e=>{let t=u.trim().toLowerCase();return e.text.toLowerCase().includes(t)||e.author.toLowerCase().includes(t)}):e].sort((e,t)=>e.pinned&&!t.pinned?-1:!e.pinned&&t.pinned?1:0),[e,u]);return(0,$.jsxs)(U,{className:X(``,i),children:[(0,$.jsx)(Pe,{children:(0,$.jsxs)(Ne,{className:`flex items-center gap-2 text-base`,children:[(0,$.jsx)(Me,{className:`h-4 w-4`}),a(`detail.comments`),(0,$.jsxs)(`span`,{className:`text-sm font-normal text-muted-foreground`,children:[`(`,e.length,`)`]})]})}),(0,$.jsxs)(Ot,{className:`space-y-4`,children:[r&&(0,$.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,$.jsxs)(`div`,{className:`relative flex-1`,children:[(0,$.jsx)(zt,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground`}),(0,$.jsx)(`input`,{className:`w-full rounded-md border border-input bg-background pl-8 pr-8 py-1.5 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,placeholder:a(`detail.searchComments`),value:u,onChange:e=>d(e.target.value),"aria-label":a(`detail.searchComments`)}),u&&(0,$.jsx)(`button`,{className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>d(``),"aria-label":a(`detail.clearSearch`),type:`button`,children:(0,$.jsx)(Ut,{className:`h-3.5 w-3.5`})})]})}),t&&(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(`textarea`,{className:`flex-1 min-h-[60px] rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring resize-none`,placeholder:a(`detail.addCommentPlaceholder`),value:o,onChange:e=>s(e.target.value),onKeyDown:p,disabled:c}),(0,$.jsx)(Z,{size:`icon`,variant:`default`,onClick:f,disabled:!o.trim()||c,className:`shrink-0 self-end`,children:(0,$.jsx)(ht,{className:`h-4 w-4`})})]}),m.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-4`,children:u.trim()?a(`detail.noMatchingComments`):a(`detail.noCommentsYet`)}):(0,$.jsx)(`div`,{className:`space-y-3`,children:m.map(e=>(0,$.jsxs)(`div`,{className:X(`flex gap-3`,e.pinned&&`bg-muted/40 rounded-md p-2 -mx-2`),children:[(0,$.jsx)(`div`,{className:`shrink-0`,children:e.avatarUrl?(0,$.jsx)(`img`,{src:e.avatarUrl,alt:e.author,className:`h-8 w-8 rounded-full object-cover`}):(0,$.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground`,children:e.author.charAt(0).toUpperCase()})}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.author}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:Wn(e.createdAt)}),e.pinned&&(0,$.jsxs)(`span`,{className:`text-xs text-amber-600 flex items-center gap-0.5`,children:[(0,$.jsx)(me,{className:`h-3 w-3`}),a(`detail.pinned`)]})]}),(0,$.jsx)(`p`,{className:`text-sm whitespace-pre-wrap break-words`,children:e.text}),n&&(0,$.jsxs)(`button`,{type:`button`,className:`mt-1 text-xs text-muted-foreground hover:text-foreground flex items-center gap-1`,onClick:()=>n(e.id),"aria-label":e.pinned?a(`detail.unpin`):a(`detail.pin`),children:[(0,$.jsx)(me,{className:`h-3 w-3`}),e.pinned?a(`detail.unpin`):a(`detail.pin`)]})]})]},e.id))})]})]})},Kn={field_change:Fe,create:Et,delete:ge,comment:Me,status_change:kt},qn={field_change:`bg-blue-100 text-blue-600`,create:`bg-green-100 text-green-600`,delete:`bg-red-100 text-red-600`,comment:`bg-purple-100 text-purple-600`,status_change:`bg-amber-100 text-amber-600`};function Jn(e){try{let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<7?`${a}d ago`:t.toLocaleDateString()}catch{return e}}function Yn(e){return e.description?e.description:e.type===`field_change`&&e.field?`Changed ${e.field.charAt(0).toUpperCase()+e.field.slice(1).replace(/_/g,` `)} from "${e.oldValue==null?`(empty)`:String(e.oldValue)}" to "${e.newValue==null?`(empty)`:String(e.newValue)}"`:e.type===`create`?`Created this record`:e.type===`delete`?`Deleted this record`:e.type===`status_change`&&e.field?`Changed status to "${e.newValue==null?`(empty)`:String(e.newValue)}"`:`Updated record`}var Xn={all:`All`,field_change:`Field Changes`,create:`Creates`,delete:`Deletes`,comment:`Comments`,status_change:`Status Changes`},Zn=({activities:e,filterable:t=!1,defaultFilter:n=`all`,className:r})=>{let[i,a]=Q.useState(n),o=Q.useMemo(()=>i===`all`?e:e.filter(e=>e.type===i),[e,i]);return(0,$.jsxs)(U,{className:X(``,r),children:[(0,$.jsx)(Pe,{children:(0,$.jsxs)(Ne,{className:`flex items-center gap-2 text-base`,children:[(0,$.jsx)(O,{className:`h-4 w-4`}),`Activity`,(0,$.jsxs)(`span`,{className:`text-sm font-normal text-muted-foreground`,children:[`(`,o.length,`)`]})]})}),(0,$.jsxs)(Ot,{children:[t&&(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-4`,role:`group`,"aria-label":`Activity type filter`,children:Object.keys(Xn).map(e=>(0,$.jsxs)(`button`,{type:`button`,className:X(`inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors`,i===e?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`),onClick:()=>a(e),"aria-pressed":i===e,children:[e!==`all`&&Q.createElement(Kn[e]||Fe,{className:`h-3 w-3`}),Xn[e]]},e))}),o.length===0?(0,$.jsx)(ut,{title:`No activity recorded`,className:`py-6`}):(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(`div`,{className:`absolute left-4 top-2 bottom-2 w-px bg-border`}),(0,$.jsx)(`div`,{className:`space-y-4`,children:o.map(e=>{let t=Kn[e.type]||Fe;return(0,$.jsxs)(`div`,{className:`flex gap-3 relative`,children:[(0,$.jsx)(`div`,{className:X(`shrink-0 h-8 w-8 rounded-full flex items-center justify-center z-10`,qn[e.type]||`bg-gray-100 text-gray-600`),children:(0,$.jsx)(t,{className:`h-3.5 w-3.5`})}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0 pt-1`,children:[(0,$.jsxs)(`p`,{className:`text-sm`,children:[(0,$.jsx)(`span`,{className:`font-medium`,children:e.user}),` `,(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:Yn(e)})]}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:Jn(e.timestamp)})]})]},e.id)})})]})]})]})},Qn={create:`default`,update:`secondary`,delete:`destructive`,restore:`outline`,login:`outline`,logout:`outline`,permission_change:`secondary`,config_change:`secondary`,export:`outline`,import:`outline`};function $n(e){if(!e)return``;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString()}var er=[[60,`second`],[60,`minute`],[24,`hour`],[7,`day`],[4.34524,`week`],[12,`month`],[1/0,`year`]];function tr(e,t){if(!e)return``;let n=e instanceof Date?e:new Date(e);if(Number.isNaN(n.getTime()))return String(e);let r=(n.getTime()-Date.now())/1e3;for(let[n,i]of er){if(Math.abs(r)<n)try{return new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(Math.round(r),i)}catch{return $n(e)}r/=n}return $n(e)}function nr(e){if(!e)return`?`;let t=e.trim().split(/\s+/).filter(Boolean).slice(0,2);return t.length===0?`?`:t.map(e=>e.charAt(0).toUpperCase()).join(``)}function rr(e){if(e==null||e===``)return`—`;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function ir({entries:e,loading:t,emptyText:n,className:r,locale:i}){return t?(0,$.jsx)(`div`,{className:X(`space-y-3`,r),children:Array.from({length:4}).map((e,t)=>(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,$.jsx)(M,{className:`h-8 w-8 rounded-full`}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,$.jsx)(M,{className:`h-4 w-1/3`}),(0,$.jsx)(M,{className:`h-3 w-1/2`})]})]},t))}):!e||e.length===0?(0,$.jsx)(`div`,{className:X(`flex items-center justify-center rounded-md border border-dashed py-10 text-sm text-muted-foreground`,r),children:n??`No history yet`}):(0,$.jsx)(he,{delayDuration:150,children:(0,$.jsx)(`ol`,{className:X(`space-y-4`,r),children:e.map((e,t)=>{let n=(e.action??``).toLowerCase(),r=Qn[n]??`outline`,a=typeof e.user_name==`string`&&e.user_name.trim()||`Unknown user`,o=$n(e.created_at),s=tr(e.created_at,i),c=typeof e.user_avatar==`string`?e.user_avatar:void 0;return(0,$.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,$.jsxs)(D,{className:`h-8 w-8 mt-0.5 shrink-0`,children:[c?(0,$.jsx)(Lt,{src:c,alt:a}):null,(0,$.jsx)(Ye,{className:`text-[10px] font-medium`,children:nr(e.user_name)})]}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:a}),e.action&&(0,$.jsx)(_e,{variant:r,className:`text-[10px] uppercase tracking-wide`,children:e.action}),o&&(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground cursor-help`,"aria-label":o,children:s||o})}),(0,$.jsx)(L,{children:o})]})]}),e.summary&&(0,$.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e.summary}),e.changes&&e.changes.length>0&&(n===`create`?(0,$.jsxs)(`details`,{className:`mt-1 group`,children:[(0,$.jsxs)(`summary`,{className:`cursor-pointer list-none text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1 select-none`,children:[(0,$.jsx)(`span`,{className:`transition-transform group-open:rotate-90`,children:`▸`}),(0,$.jsx)(`span`,{children:e.changes.length===1?`1 field populated`:`${e.changes.length} fields populated`})]}),(0,$.jsx)(`ul`,{className:`mt-1.5 space-y-0.5 text-xs text-muted-foreground pl-4`,children:e.changes.map(e=>(0,$.jsxs)(`li`,{className:`leading-relaxed`,children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label||e.field}),`: `,(0,$.jsx)(`span`,{className:`text-foreground`,children:rr(e.to)})]},e.field))})]}):(0,$.jsx)(`ul`,{className:`mt-1.5 space-y-0.5 text-xs text-muted-foreground`,children:e.changes.map(e=>(0,$.jsxs)(`li`,{className:`leading-relaxed`,children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label||e.field}),`: `,(0,$.jsx)(`span`,{className:`line-through opacity-70`,children:rr(e.from)}),` → `,(0,$.jsx)(`span`,{className:`text-foreground`,children:rr(e.to)})]},e.field))}))]})]},e.id??t)})})})}var ar={createdAt:`created_at`,createdBy:`created_by`,updatedAt:`updated_at`,updatedBy:`updated_by`};function or(e){if(!e)return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;if(typeof e==`string`||typeof e==`number`){let t=new Date(e);return isNaN(t.getTime())?null:t}return null}function sr(e,t){let n=Date.now()-e.getTime(),r=Math.max(0,Math.floor(n/1e3));if(r<60)return t(`detail.justNow`);let i=Math.floor(r/60);if(i<60)return t(`detail.minutesAgo`,{count:i});let a=Math.floor(i/60);return a<24?t(`detail.hoursAgo`,{count:a}):t(`detail.daysAgo`,{count:Math.floor(a/24)})}function cr(e){try{return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(e)}catch{return e.toISOString()}}var lr=({value:e,objectSchema:t,fieldName:n})=>{if(e==null||e===``)return null;let r=t?.fields?.[n],i=r?.reference_to||r?.reference,a={name:n,type:r?.type||(i?`lookup`:`text`),...i&&{reference_to:i},...r?.reference_field&&{reference_field:r.reference_field}},o=_t(a)||a.type;if(o){let t=mt(o);if(t)return(0,$.jsx)(`span`,{className:`inline-flex items-center [&_a]:text-inherit [&_a]:hover:underline`,children:(0,$.jsx)(t,{value:e,field:a})})}return(0,$.jsx)(`span`,{children:String(e)})},ur=({label:e,user:t,date:n,objectSchema:r,userField:i,t:a})=>{if(!t&&!n)return null;let o=n?(0,$.jsx)(he,{delayDuration:200,children:(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(`time`,{dateTime:n.toISOString(),className:`cursor-default underline decoration-dotted decoration-muted-foreground/40 underline-offset-2`,children:sr(n,a)})}),(0,$.jsx)(L,{side:`top`,children:cr(n)})]})}):null;return(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground/70`,children:e}),t?(0,$.jsx)(lr,{value:t,objectSchema:r,fieldName:i}):null,t&&o?(0,$.jsx)(`span`,{className:`text-muted-foreground/40`,children:`·`}):null,o]})},dr=({data:e,objectSchema:t,objectName:n,className:r})=>{let{t:i}=In();if(!e)return null;let a=or(e[ar.createdAt]),o=or(e[ar.updatedAt]),s=e[ar.createdBy],c=e[ar.updatedBy],l=!!(a||s),u=a&&o&&Math.abs(o.getTime()-a.getTime())<2e3,d=!!(o||c)&&!(u&&(s!=null&&c!=null&&String(s)===String(c)||!c));return!l&&!d?null:(0,$.jsxs)(`div`,{className:X(`mt-6 pt-3 border-t border-border/40`,`flex flex-wrap items-center gap-x-4 gap-y-1`,`text-xs text-muted-foreground`,r),"data-testid":`record-meta-footer`,children:[l&&(0,$.jsx)(ur,{label:i(`detail.createdBy`),user:s,date:a,objectSchema:t,userField:ar.createdBy,t:i}),d&&(0,$.jsx)(ur,{label:i(`detail.updatedBy`),user:c,date:o,objectSchema:t,userField:ar.updatedBy,t:i})]})},fr=5;function pr(e,t,n,r){if(e&&typeof e==`object`){if(t.primaryField){let n=e[t.primaryField];if(n!=null&&n!==``)return String(n)}let r=n?.titleFormat,i=typeof r==`string`?r:r&&typeof r==`object`&&typeof r.source==`string`?r.source:void 0;if(i){let t=`[-\\u2013\\u2014|/·,:]`,n=!1,r=i.replace(/\{([^{}]+)\}/g,(t,r)=>{let i=String(r).trim().split(`.`),a=e;for(let e of i){if(a==null)break;a=a[e]}if(a&&typeof a==`object`){let e=a,t=e.name??e.full_name??e.display_name??e.label??e.title??e.subject??null;(t==null||typeof t==`string`&&!t.trim())&&(t=[e.salutation,e.first_name,e.last_name].filter(e=>typeof e==`string`&&e.trim()).map(e=>e.trim()).join(` `)||(typeof e.email==`string`&&e.email.trim()?e.email.trim():null)),a=t}return a!=null&&a!==``?(n=!0,String(a)):`\0`});if(n){let e=r.replace(RegExp(`\\s*${t}\\s*`,`g`),``).replace(RegExp(`\\s*${t}\\s*`,`g`),``).replace(RegExp(`\0`,`g`),``).replace(/\s+/g,` `).trim();if(e)return e}}}if(t.title)return t.title;if(e&&typeof e==`object`)for(let t of[`name`,`full_name`,`fullName`,`title`,`subject`,`label`,`display_name`,`displayName`]){let n=e[t];if(typeof n==`string`&&n.trim())return n.trim();if(n!=null&&n!==``)return String(n)}return r}var mr=({schema:e,dataSource:t,className:n,onEdit:r,onDelete:i,onBack:o,inlineEdit:s=!1,onFieldSave:c,discussionSlot:l,rightRail:d,objectLabel:f,onDataLoaded:m,isFavorite:h,onToggleFavorite:g})=>{let[_,v]=Q.useState(e.data),[y,b]=Q.useState(!e.data&&!!(e.api&&e.resourceId||t&&e.objectName&&e.resourceId)),[x,S]=Q.useState(!1),C=h??x,[w,E]=Q.useState(!1),[D,O]=Q.useState({}),[k,A]=Q.useState(!1),[j,N]=Q.useState(null),[P,F]=Q.useState(null),[ee,I]=Q.useState(!1),[ne,re]=Q.useState(0),[ie,ae]=Q.useState(!1),{t:z}=In(),{fieldOptionLabel:B}=Mt(),oe=lt(),se=a(),V=Q.useMemo(()=>{if(!se?.isLoaded||!e.objectName)return e;let t=t=>se.checkField(e.objectName,t,`read`),n=e=>e&&e.filter(e=>{let n=typeof e==`string`?e:e?.name;return!n||t(n)});return{...e,fields:n(e.fields),sections:e.sections?.map(e=>({...e,fields:n(e.fields)})),summaryFields:n(e.summaryFields)}},[e,se]);Q.useEffect(()=>{_&&m&&m(_)},[_,m]);let ce=Q.useMemo(()=>{if(V.summaryFields&&V.summaryFields.length>0)return[];let e=[...V.sections?.flatMap(e=>e.fields)||[],...V.fields||[]],t={};for(let n of e)t[n.name]||(t[n.name]=n);if(P?.fields)for(let[e,n]of Object.entries(P.fields))t[e]={...t[e]||{},...n,name:e};let n=e=>_?.[e]!==void 0&&_?.[e]!==null&&_?.[e]!==``,r=[],i=[`status`,`stage`,`state`,`phase`].find(e=>t[e]&&n(e))||Object.keys(t).find(e=>t[e]?.type===`select`&&n(e));i&&r.push(i);let a=Object.keys(t).find(e=>(t[e]?.type===`currency`||/amount|revenue|value|total|price/i.test(e))&&n(e));a&&!r.includes(a)&&r.push(a);let o=Object.keys(t).find(e=>(t[e]?.type===`date`||t[e]?.type===`datetime`)&&/close|due|start|end|expected/i.test(e)&&n(e));return o&&!r.includes(o)&&r.push(o),r},[V.summaryFields,V.sections,V.fields,P,_]),U=V.summaryFields&&V.summaryFields.length>0?V.summaryFields:ce,W=Q.useCallback(()=>{V.resourceId&&navigator.clipboard.writeText(String(V.resourceId)).then(()=>{I(!0),setTimeout(()=>I(!1),1500)})},[V.resourceId]);Q.useEffect(()=>{let e=!0;if(V.data)return v(V.data),b(!1),t?.getObjectSchema&&V.objectName&&t.getObjectSchema(V.objectName).then(t=>{e&&F(t)}).catch(()=>{}),()=>{e=!1};if(t&&V.objectName&&V.resourceId){b(!0),F(null),v(null);let n=V.objectName,r=V.resourceId,i=`${n}-`,a=[...V.sections?.flatMap(e=>e.fields)||[],...V.fields||[]];(t.getObjectSchema?t.getObjectSchema(n).catch(()=>null):Promise.resolve(null)).then(o=>{if(!e)return;F(o);let s=p(o?.fields,a),c=s.length>0?{$expand:s}:void 0,l=c?t.findOne(n,r,c):t.findOne(n,r),u=()=>{let a=String(r),o=a.startsWith(i)?a.slice(i.length):`${i}${a}`;return(c?t.findOne(n,o,c):t.findOne(n,o)).then(t=>{e&&(v(t),b(!1))}).catch(()=>{e&&(v(null),b(!1))})};return l.catch(()=>null).then(t=>{if(e){if(t){v(t),b(!1);return}return u()}})}).catch(t=>{e&&(console.error(`Failed to fetch detail data:`,t),b(!1))})}else V.api&&V.resourceId&&(b(!0),fetch(`${V.api}/${V.resourceId}`).then(e=>e.json()).then(t=>{e&&v(t?.data||t)}).catch(e=>{console.error(`Failed to fetch detail data:`,e)}).finally(()=>{e&&b(!1)}));return()=>{e=!1}},[V.api,V.resourceId,V.objectName,t,V.sections,V.fields,ne]);let ue=Q.useCallback(()=>{if(o)o();else if(V.onNavigate){let e=V.backUrl||(V.objectName?`/${V.objectName}`:`/`);V.onNavigate(e,{replace:!0})}else V.backUrl?window.location.href=V.backUrl:window.history.back()},[o,V]),de=Q.useCallback(()=>{r?r():V.onNavigate&&V.editUrl?V.onNavigate(V.editUrl):V.onNavigate&&V.objectName&&V.resourceId?V.onNavigate(`/${V.objectName}/${V.resourceId}/edit`):V.editUrl&&(window.location.href=V.editUrl)},[r,V]),G=Q.useCallback(async()=>{if(!t?.cancelPendingApproval||!V.objectName||!V.resourceId){N(z(`detail.cancelApprovalUnavailable`));return}ae(!0),N(null);try{if(await t.cancelPendingApproval(String(V.objectName),String(V.resourceId)),t.findOne)try{let e=await t.findOne(String(V.objectName),String(V.resourceId));e&&v(e)}catch{}re(e=>e+1);try{window.dispatchEvent(new CustomEvent(`objectui:record-changed`,{detail:{objectName:String(V.objectName),recordId:String(V.resourceId),reason:`approval-recalled`}}))}catch{}}catch(e){let t=(e?.message||e?.error||String(e??`Cancel failed`)).replace(/^\[[^\]]+\]\s*/,``).replace(/^[A-Z][A-Z0-9_]+:\s*/,``);N(`${z(`detail.cancelApprovalFailed`)}: ${t}`)}finally{ae(!1)}},[t,V.objectName,V.resourceId,z]),fe=Q.useCallback(()=>{let e=V.deleteConfirmation||z(`detail.deleteConfirmation`);window.confirm(e)&&(i?.(),V.onNavigate&&V.objectName&&V.onNavigate(`/${V.objectName}`,{replace:!0}))},[i,V]),pe=Q.useCallback(()=>{navigator.share&&V.objectName&&V.resourceId?navigator.share({title:V.title||z(`detail.details`),text:`${V.objectName} #${V.resourceId}`,url:window.location.href}).catch(e=>console.log(`Share failed:`,e)):navigator.clipboard.writeText(window.location.href).then(()=>{console.log(`Link copied to clipboard`)})},[V]),me=Q.useCallback(()=>{let e=!C;g&&g(e),h===void 0&&S(e)},[C,h,g]),K=Q.useCallback(async()=>{if(w){let e=Object.entries(D);if(e.length>0){let t=_,n={..._,...D};v(n),N(null),A(!0);try{if(c)for(let[t,r]of e)await c(t,r,n);O({}),E(!1)}catch(e){v(t),N((e?.message||e?.error||String(e??`Save failed`)).replace(/^\[[^\]]+\]\s*/,``).replace(/^[A-Z][A-Z0-9_]+:\s*/,``))}finally{A(!1)}return}O({})}E(!w),N(null)},[w,D,_,c]),ge=Q.useCallback(()=>{O({}),E(!1),N(null)},[]),ve=Q.useCallback((e,t)=>{O(n=>({...n,[e]:t}))},[]);Q.useEffect(()=>{if(!V.recordNavigation)return;let e=V.recordNavigation,t=t=>{let n=t.target?.tagName;n===`INPUT`||n===`TEXTAREA`||t.target?.isContentEditable||(t.key===`ArrowLeft`&&e.currentIndex>0?(t.preventDefault(),e.onNavigate(e.recordIds[e.currentIndex-1])):t.key===`ArrowRight`&&e.currentIndex<e.recordIds.length-1&&(t.preventDefault(),e.onNavigate(e.recordIds[e.currentIndex+1])))};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[V.recordNavigation]),Q.useEffect(()=>{if(!s||V.showHeader!==!1)return;let e=`objectui:record:inline-edit-toggle`,t=e=>{let t=e.detail;t?.recordId&&V.recordId&&t.recordId!==V.recordId||t?.objectName&&V.objectName&&t.objectName!==V.objectName||K()};return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[s,V.showHeader,V.recordId,V.objectName,K]);let q=Q.useMemo(()=>V.related??[],[V.related]),ye=Q.useMemo(()=>{let e=[];return e.push({name:`sys_share`,label:z(`detail.share`),icon:`share-2`,type:`script`,onClick:pe}),V.showEdit&&e.push({name:`sys_edit_mobile`,label:z(`detail.edit`),icon:`edit`,type:`script`,className:`sm:hidden`,onClick:de}),s&&e.push({name:`sys_toggle_inline_edit_mobile`,label:z(w?`detail.save`:`detail.editInline`),icon:`edit`,type:`script`,className:`sm:hidden`,onClick:K}),V.showDelete&&e.push({name:`sys_delete`,label:z(`detail.delete`),icon:`trash-2`,type:`script`,variant:`destructive`,tags:[`separator-before`],onClick:fe}),e},[z,V.showEdit,V.showDelete,s,w,pe,de,K,fe]),be=Q.useMemo(()=>{let e=V.actions??[];if(ye.length===0)return e;let t=!1,n=e.map(e=>{let n=e;if(n&&typeof n==`object`&&n.type===`action:bar`&&(!n.location||n.location===`record_header`)){t=!0;let e=Array.isArray(n.systemActions)?n.systemActions:[];return{...n,systemActions:[...e,...ye]}}return e});return t||n.push({type:`action:bar`,location:`record_header`,systemActions:ye}),n},[V.actions,ye]);return y||V.loading?(0,$.jsxs)(`div`,{className:X(`space-y-4`,n),children:[(0,$.jsx)(M,{className:`h-10 w-full`}),(0,$.jsx)(M,{className:`h-64 w-full`}),(0,$.jsx)(M,{className:`h-48 w-full`})]}):!_&&!V.data?(0,$.jsxs)(`div`,{className:X(`flex flex-col items-center justify-center py-16 text-center`,n),children:[(0,$.jsx)(`p`,{className:`text-lg font-semibold`,children:z(`detail.recordNotFound`)}),(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:z(`detail.recordNotFoundDescription`)}),(V.showBack??!0)&&(0,$.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:ue,className:`mt-4 gap-2`,children:[(0,$.jsx)(H,{className:`h-4 w-4`}),z(`detail.goBack`)]})]}):(0,$.jsx)(he,{children:(0,$.jsxs)(`div`,{className:X(`space-y-6`,n),children:[V.showHeader!==!1&&(0,$.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start justify-between gap-3 sm:gap-4 pb-4 border-b`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2 sm:gap-3 flex-1 min-w-0`,children:[(V.showBack??!0)&&(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,onClick:ue,className:`shrink-0 mt-1`,children:(0,$.jsx)(H,{className:`h-4 w-4`})})}),(0,$.jsx)(L,{children:z(`detail.back`)})]}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold truncate`,children:pr(_,V,P,z(`detail.details`))}),U.map(e=>{let t=_?.[e];if(t==null||t===``)return null;let n=(V.sections||[]).flatMap(e=>e.fields).concat(V.fields||[]).find(t=>t.name===e),r=P?.fields?.[e],i=n?.type||r?.type,a=String(t),o=null;try{if(i===`currency`){let e=Number(t);if(!Number.isNaN(e)){let t=n?.currency||r?.currency;a=t?new Intl.NumberFormat(void 0,{style:`currency`,currency:t,maximumFractionDigits:0}).format(e):new Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e)}}else if(i===`date`||i===`datetime`){let e=new Date(t);Number.isNaN(e.getTime())||(a=i===`datetime`?e.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):e.toLocaleDateString(void 0,{dateStyle:`medium`}))}else if(i===`percent`){let e=Number(t);if(!Number.isNaN(e)){a=`${e}%`;let t=e<=1?e*100:e;o=Math.max(0,Math.min(100,t))}}else if(i===`select`||i===`status`||i===`multiselect`){let i=n?.options||r?.options,o=String(t);if(Array.isArray(i)){let e=i.find(e=>String(e?.value??e)===String(t));e?.label&&(o=e.label)}else if(i&&typeof i==`object`){let e=i[String(t)];e?.label&&(o=e.label)}a=V.objectName?B(V.objectName,e,String(t),o):o}}catch{}return o===null?(0,$.jsx)(_e,{variant:`secondary`,className:`text-xs bg-primary/10 text-primary border-transparent hover:bg-primary/15`,"aria-label":`${e}: ${a}`,children:a},e):(0,$.jsxs)(_e,{variant:`secondary`,className:`text-xs bg-primary/10 text-primary border-transparent hover:bg-primary/15 gap-1.5 pl-2 pr-2`,"aria-label":`${e}: ${a}`,children:[(0,$.jsx)(`span`,{className:`relative inline-block h-1.5 w-12 rounded-full bg-primary/20 overflow-hidden`,"aria-hidden":!0,children:(0,$.jsx)(`span`,{className:`absolute inset-y-0 left-0 rounded-full bg-primary`,style:{width:`${o}%`}})}),a]},e)}),(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-6 w-6 shrink-0`,onClick:me,"aria-label":z(C?`detail.removeFromFavorites`:`detail.addToFavorites`),children:C?(0,$.jsx)(le,{className:`h-4 w-4 fill-yellow-400 text-yellow-400`}):(0,$.jsx)(le,{className:`h-4 w-4 text-muted-foreground`})})}),(0,$.jsx)(L,{children:z(C?`detail.removeFromFavorites`:`detail.addToFavorites`)})]})]}),V.objectName&&(0,$.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-1 flex items-center gap-1`,children:[(0,$.jsx)(`span`,{className:`font-medium`,children:f||V.objectName}),V.resourceId&&(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground/60 hover:text-foreground`,onClick:W,"aria-label":z(`detail.copyRecordId`,{defaultValue:`Copy record ID`}),children:ee?(0,$.jsx)(te,{className:`h-3 w-3 text-green-600`}):(0,$.jsx)(It,{className:`h-3 w-3`})})}),(0,$.jsx)(L,{children:ee?z(`detail.copied`,{defaultValue:`Copied`}):z(`detail.copyRecordId`,{defaultValue:`Copy record ID`})})]})]})]})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 shrink-0 w-full sm:w-auto`,children:[V.recordNavigation&&(0,$.jsxs)(`div`,{className:`flex items-center gap-1 mr-2`,children:[(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:`outline`,size:`icon`,className:`h-8 w-8`,disabled:V.recordNavigation.currentIndex<=0,onClick:()=>{let e=V.recordNavigation;e.currentIndex>0&&e.onNavigate(e.recordIds[e.currentIndex-1])},children:(0,$.jsx)(Ht,{className:`h-4 w-4`})})}),(0,$.jsx)(L,{children:z(`detail.previousRecord`)})]}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground whitespace-nowrap px-1`,children:z(`detail.recordOf`,{current:V.recordNavigation.currentIndex+1,total:V.recordNavigation.recordIds.length})}),(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:`outline`,size:`icon`,className:`h-8 w-8`,disabled:V.recordNavigation.currentIndex>=V.recordNavigation.recordIds.length-1,onClick:()=>{let e=V.recordNavigation;e.currentIndex<e.recordIds.length-1&&e.onNavigate(e.recordIds[e.currentIndex+1])},children:(0,$.jsx)(He,{className:`h-4 w-4`})})}),(0,$.jsx)(L,{children:z(`detail.nextRecord`)})]})]}),s&&(0,$.jsxs)($.Fragment,{children:[w&&(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:ge,className:`gap-2 hidden sm:inline-flex`,children:[(0,$.jsx)(Ut,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:z(`detail.cancel`)})]})}),(0,$.jsx)(L,{children:z(`detail.cancelEdit`)})]}),(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsx)(Z,{variant:w?`default`:`outline`,size:`sm`,onClick:K,className:`gap-2 hidden sm:inline-flex`,children:w?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(te,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:z(`detail.save`)})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Fe,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:z(`detail.editInline`)})]})})}),(0,$.jsx)(L,{children:z(w?`detail.saveChanges`:`detail.editFieldsInline`)})]})]}),V.showEdit&&(0,$.jsxs)(R,{children:[(0,$.jsx)(pt,{asChild:!0,children:(0,$.jsxs)(Z,{variant:`default`,onClick:de,className:`gap-2 hidden sm:inline-flex`,children:[(0,$.jsx)(Fe,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:z(`detail.edit`)})]})}),(0,$.jsx)(L,{children:z(`detail.editRecord`)})]}),be.map((e,t)=>(0,$.jsx)(u,{schema:e,data:_},`header-action-${t}`))]})]}),V.header&&(0,$.jsx)(`div`,{children:(0,$.jsx)(u,{schema:V.header,data:_})}),V.highlightFields&&V.highlightFields.length>0&&(0,$.jsx)(Un,{fields:V.highlightFields,data:_,objectName:V.objectName,objectSchema:P}),s&&V.showHeader===!1&&(()=>{let e=_?.approval_status,n=e===`pending`||e===`in_approval`;return!w&&!k&&!j&&!n?null:(0,$.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[n&&!w&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{role:`status`,className:`inline-flex items-center gap-1 rounded-md border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-800`,title:z(`detail.lockedTooltip`),children:[(0,$.jsx)(At,{className:`h-3 w-3`}),(0,$.jsx)(`span`,{children:z(`detail.lockedByApproval`)})]}),t?.cancelPendingApproval&&(0,$.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:G,disabled:ie,className:`gap-2 border-amber-300 text-amber-800 hover:bg-amber-50`,title:z(`detail.cancelApprovalTooltip`),children:[(0,$.jsx)(Ut,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{children:z(ie?`detail.cancelApprovalInFlight`:`detail.cancelApproval`)})]})]}),w&&(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:ge,className:`gap-2`,disabled:k,children:[(0,$.jsx)(Ut,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{children:z(`detail.cancel`)})]}),(0,$.jsxs)(Z,{variant:w?`default`:`outline`,size:`sm`,onClick:K,className:`gap-2`,disabled:k||n&&!w,title:n&&!w?z(`detail.lockedTooltip`):void 0,children:[w?(0,$.jsx)(te,{className:`h-4 w-4`}):(0,$.jsx)(Fe,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{children:z(k?`detail.saving`:w?`detail.save`:`detail.editFieldsInline`)})]})]}),j&&(0,$.jsx)(`div`,{role:`alert`,className:`text-xs text-destructive bg-destructive/10 border border-destructive/20 rounded-md px-2 py-1 max-w-md text-right`,children:j})]})})(),V.autoTabs&&!V.tabs?.length?(()=>{let e=q.length>0,n=!!V.activities&&V.activities.length>0,r=!!l,i=!!V.history,a=(0,$.jsxs)(`div`,{className:`space-y-3 sm:space-y-4`,children:[V.sectionGroups&&V.sectionGroups.length>0&&V.sectionGroups.map((e,t)=>(0,$.jsx)(Hn,{group:e,data:{..._,...D},objectSchema:P,objectName:V.objectName,isEditing:w,onFieldChange:ve},t)),V.sections&&V.sections.length>0&&V.sections.map((e,t)=>(0,$.jsx)(Rn,{section:e,data:{..._,...D},objectSchema:P,objectName:V.objectName,isEditing:w,onFieldChange:ve},t)),V.fields&&V.fields.length>0&&!V.sections?.length&&(0,$.jsx)(Rn,{section:{fields:V.fields,columns:V.columns},data:{..._,...D},objectSchema:P,objectName:V.objectName,isEditing:w,onFieldChange:ve}),V.comments&&(0,$.jsx)(Gn,{comments:V.comments,onAddComment:V.onAddComment})]});return!e&&!n&&!r&&!i?(0,$.jsx)(`div`,{className:`mt-2`,children:a}):(0,$.jsxs)(T,{defaultValue:`details`,className:`w-full`,children:[(0,$.jsxs)(Rt,{className:`w-full justify-start border-b rounded-none bg-transparent p-0`,children:[(0,$.jsx)(St,{value:`details`,className:`relative rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent`,children:z(`detail.details`)}),e&&(0,$.jsx)(St,{value:`related`,className:`relative rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent`,children:(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[z(`detail.related`),(0,$.jsx)(_e,{variant:`secondary`,className:`text-xs bg-primary/10 text-primary border-transparent`,children:q.length})]})}),n&&(0,$.jsx)(St,{value:`activity`,className:`relative rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent`,children:(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[z(`detail.activity`),(0,$.jsx)(_e,{variant:`secondary`,className:`text-xs bg-primary/10 text-primary border-transparent`,children:V.activities.length})]})}),r&&(0,$.jsx)(St,{value:`discussion`,className:`relative rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent`,children:z(`detail.discussion`,{defaultValue:`Discussion`})}),i&&(0,$.jsx)(St,{value:`history`,className:`relative rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent`,children:(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[z(`detail.history`,{defaultValue:`History`}),!V.history.loading&&V.history.entries.length>0&&(0,$.jsx)(_e,{variant:`secondary`,className:`text-xs bg-primary/10 text-primary border-transparent`,children:V.history.entries.length})]})})]}),(0,$.jsx)(Xe,{value:`details`,className:`mt-4 motion-safe:data-[state=active]:animate-in motion-safe:data-[state=active]:fade-in-0 motion-safe:duration-150`,children:a}),e&&(0,$.jsx)(Xe,{value:`related`,className:`mt-4 motion-safe:data-[state=active]:animate-in motion-safe:data-[state=active]:fade-in-0 motion-safe:duration-150`,children:(0,$.jsx)(`div`,{className:`space-y-3`,children:q.map((e,n)=>(0,$.jsx)(Vn,{title:e.title,type:e.type,api:e.api,data:e.data,columns:e.columns,dataSource:t,objectName:e.api,referenceField:e.referenceField,icon:e.icon,onNew:e.onNew,onViewAll:e.onViewAll,onRowClick:e.onRowClick,onRowEdit:e.onRowEdit,onRowDelete:e.onRowDelete,collapsible:!0,defaultCollapsed:oe&&n>0,pageSize:fr},n))})}),n&&(0,$.jsx)(Xe,{value:`activity`,className:`mt-4 motion-safe:data-[state=active]:animate-in motion-safe:data-[state=active]:fade-in-0 motion-safe:duration-150`,children:(0,$.jsx)(Zn,{activities:V.activities})}),r&&(0,$.jsx)(Xe,{value:`discussion`,className:`mt-4 motion-safe:data-[state=active]:animate-in motion-safe:data-[state=active]:fade-in-0 motion-safe:duration-150`,children:l}),i&&(0,$.jsx)(Xe,{value:`history`,className:`mt-4 motion-safe:data-[state=active]:animate-in motion-safe:data-[state=active]:fade-in-0 motion-safe:duration-150`,children:(0,$.jsx)(ir,{entries:V.history.entries,loading:V.history.loading,emptyText:V.history.emptyText??z(`detail.historyEmpty`,{defaultValue:`No history yet`})})})]})})():(0,$.jsxs)($.Fragment,{children:[V.sectionGroups&&V.sectionGroups.length>0&&(0,$.jsx)(`div`,{className:`space-y-3 sm:space-y-4`,children:V.sectionGroups.map((e,t)=>(0,$.jsx)(Hn,{group:e,data:{..._,...D},objectSchema:P,objectName:V.objectName,isEditing:w,onFieldChange:ve},t))}),V.sections&&V.sections.length>0&&(0,$.jsx)(`div`,{className:`space-y-3 sm:space-y-4`,children:V.sections.map((e,t)=>(0,$.jsx)(Rn,{section:e,data:{..._,...D},objectSchema:P,objectName:V.objectName,isEditing:w,onFieldChange:ve},t))}),V.fields&&V.fields.length>0&&!V.sections?.length&&(0,$.jsx)(Rn,{section:{fields:V.fields,columns:V.columns},data:{..._,...D},objectSchema:P,objectName:V.objectName,isEditing:w,onFieldChange:ve}),V.tabs&&V.tabs.length>0&&(0,$.jsx)(zn,{tabs:V.tabs,data:_}),q.length>0&&(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(`h2`,{className:`text-lg font-semibold`,children:z(`detail.related`)}),q.map((e,n)=>(0,$.jsx)(Vn,{title:e.title,type:e.type,api:e.api,data:e.data,columns:e.columns,dataSource:t,objectName:e.api,referenceField:e.referenceField,icon:e.icon,onNew:e.onNew,onViewAll:e.onViewAll,onRowClick:e.onRowClick,onRowEdit:e.onRowEdit,onRowDelete:e.onRowDelete,collapsible:!0,defaultCollapsed:oe&&n>0,pageSize:fr},n))]}),V.comments&&(0,$.jsx)(Gn,{comments:V.comments,onAddComment:V.onAddComment}),V.activities&&V.activities.length>0&&(0,$.jsx)(Zn,{activities:V.activities})]}),(0,$.jsx)(dr,{data:{..._,...D},objectSchema:P,objectName:V.objectName}),V.footer&&(0,$.jsx)(`div`,{children:(0,$.jsx)(u,{schema:V.footer,data:_})})]})})},hr=e=>{if(e==null)return`—`;if(typeof e==`string`)return e.length>0?e:`""`;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}},gr=e=>{if(typeof e!=`string`||e.length===0)return null;let t=/\d{4}-\d{2}-\d{2}[ T]/.test(e)?e.replace(` `,`T`):e,n=new Date(t);if(Number.isNaN(n.getTime()))return null;try{return n.toLocaleString()}catch{return n.toISOString()}},_r=({open:e,conflict:t,onReload:n,onOverwrite:r,onCancel:i,busy:a=!1})=>{let{t:o}=In(),s=t?.label||t?.field||``,c=t?hr(t.pendingValue):``,l=t?hr(t.currentValue):``,u=t?.currentRecord??{},d=(()=>{let e=[u.updated_by_name,u.updated_by_label];for(let t of e)if(typeof t==`string`&&t.length>0)return t;let t=u.updated_by;return typeof t!=`string`||t.length===0||t.length>=16&&!/\s/.test(t)&&/^[A-Za-z0-9_-]+$/.test(t)?null:t})(),f=gr(u.updated_at??t?.currentVersion),[p,m]=o(`detail.concurrentUpdateDescription`,{field:`{{field}}`}).split(`{{field}}`);return(0,$.jsx)(Be,{open:e,onOpenChange:e=>{!e&&!a&&i()},children:(0,$.jsxs)(Ge,{className:`max-w-lg`,children:[(0,$.jsx)(Ke,{children:(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,$.jsx)(`span`,{className:`inline-flex h-9 w-9 flex-none items-center justify-center rounded-full bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300`,"aria-hidden":`true`,children:(0,$.jsx)(de,{className:`h-5 w-5`})}),(0,$.jsxs)(`div`,{className:`flex-1`,children:[(0,$.jsx)($e,{children:o(`detail.concurrentUpdateTitle`)}),(0,$.jsxs)(gt,{className:`mt-1`,children:[p,(0,$.jsx)(`strong`,{className:`font-semibold`,children:s}),m]})]})]})}),(0,$.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,$.jsxs)(`div`,{className:`rounded-md border border-amber-200/70 bg-amber-50/60 p-3 dark:border-amber-500/30 dark:bg-amber-500/10`,children:[(0,$.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-wide text-amber-800 dark:text-amber-300`,children:o(`detail.concurrentUpdateYourEdit`)}),(0,$.jsx)(`div`,{className:`mt-1 break-all font-mono text-foreground`,children:c})]}),(0,$.jsxs)(`div`,{className:`rounded-md border border-sky-200/70 bg-sky-50/60 p-3 dark:border-sky-500/30 dark:bg-sky-500/10`,children:[(0,$.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,$.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-wide text-sky-800 dark:text-sky-300`,children:o(`detail.concurrentUpdateCurrentValue`)}),(d||f)&&(0,$.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[d&&(0,$.jsx)(`span`,{children:o(`detail.concurrentUpdateUpdatedBy`,{name:d})}),d&&f&&(0,$.jsx)(`span`,{children:` · `}),f&&(0,$.jsx)(`span`,{children:o(`detail.concurrentUpdateUpdatedAt`,{when:f})})]})]}),(0,$.jsx)(`div`,{className:`mt-1 break-all font-mono text-foreground`,children:l})]})]}),(0,$.jsxs)(Bt,{className:`gap-2 sm:gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,disabled:a,onClick:i,className:X(rt({variant:`ghost`}),`mt-2 sm:mt-0`),children:o(`detail.concurrentUpdateCancel`)}),(0,$.jsx)(`button`,{type:`button`,disabled:a,onClick:r,className:X(rt({variant:`outline`}),`mt-2 sm:mt-0 text-destructive border-destructive/40 hover:bg-destructive/10 hover:text-destructive`),children:o(`detail.concurrentUpdateOverwrite`)}),(0,$.jsx)(`button`,{type:`button`,disabled:a,onClick:n,autoFocus:!0,className:X(rt({variant:`default`}),`mt-2 sm:mt-0`),children:o(`detail.concurrentUpdateReload`)})]})]})})};function vr(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.code===`CONCURRENT_UPDATE`||t.name===`ConcurrentUpdateError`}var yr=e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.field||e.name)||null,br=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},xr=({schema:e={},className:t,...n})=>{let r=y(),{designer:i}=br(n);if(!r)return(0,$.jsx)(`div`,{className:t,"data-record-details-placeholder":!0,...i,children:(0,$.jsx)(`div`,{className:`text-xs text-muted-foreground italic px-3 py-2 border border-dashed rounded`,children:`record:details — bind a record to preview`})});let s=e.layout===`inline`||e.layout===`compact`?`horizontal`:`vertical`,c=r.objectName||``,l=a(),{readableFields:u}=o(c),{sectionLabel:d}=Mt(),f=Array.isArray(e.requiredPermissions)?e.requiredPermissions:[];if(f.length>0&&c&&!f.every(e=>l.can(c,e)))return(0,$.jsx)(`div`,{className:t,...i,role:`status`,"aria-live":`polite`,children:(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground italic`,children:`Insufficient permissions to view details.`})});let p=e.enforceFieldSecurity===!0,m=Array.isArray(e.redactFields)?e.redactFields:[],g=e=>{if(!e||!p&&m.length===0)return e;let t=e.map(yr).filter(e=>!!e),n=new Set((p&&c?u(t):t).filter(e=>!m.includes(e)));return e.filter(e=>{let t=yr(e);return t?n.has(t):!0})},_=e=>typeof e==`string`?{name:e}:e&&typeof e==`object`&&!e.name&&e.field?{...e,name:e.field}:e,v=e=>Array.isArray(e)?e.map(_):e,b=h(),x=new Set((Array.isArray(e.hideFields)?e.hideFields:[]).map(e=>typeof e==`string`?e:yr(e)).filter(e=>!!e));for(let e of b)x.add(e);let S=r.objectSchema,C=r.data??{},w=[S?.primaryField,`name`,`full_name`,`title`,`subject`,`display_name`,`label`].filter(e=>typeof e==`string`&&e.length>0);for(let e of w)if(C[e]!==void 0&&C[e]!==null&&C[e]!==``){x.add(e);break}let T=e=>!e||x.size===0?e:e.filter(e=>{let t=yr(e);return t?!x.has(t):!0}),E=T(v(g(e.fields))),D=Array.isArray(e.sections)?e.sections.map(e=>{let t=e.title??e.label,n=e.name&&c?d(c,e.name,t??e.name):t;return{...e,title:n,showBorder:e.showBorder??!!n,hideEmpty:e.hideEmpty??!0,fields:T(v(g(e.fields)))}}):e.sections,O=e.inlineEdit??!0,[k,A]=Q.useState(null),[j,M]=Q.useState(!1),N=Q.useCallback(t=>{let n=[...Array.isArray(e.fields)?e.fields:[],...(Array.isArray(e.sections)?e.sections:[]).flatMap(e=>Array.isArray(e?.fields)?e.fields:[])];for(let e of n)if((typeof e==`string`?e:e?.name||e?.field)===t)return typeof e==`object`?e?.label:void 0},[e.fields,e.sections]),P=Q.useCallback(async(e,t)=>{let n=r.dataSource,i=r.recordId,a=r.objectName;if(!n||!i||!a)return;let o=typeof r.data?.updated_at==`string`?r.data.updated_at:void 0,s=o?{ifMatch:o}:void 0;try{if(typeof n.update==`function`)await n.update(a,i,{[e]:t},s);else if(typeof n.updateOne==`function`)await n.updateOne(a,i,{[e]:t},s);else if(typeof n.patch==`function`)await n.patch(a,i,{[e]:t},s);else{console.warn(`[record:details] DataSource exposes no update/updateOne/patch method; cannot persist inline edit`);return}typeof r.refresh==`function`&&await r.refresh()}catch(n){if(vr(n)){let r=n.currentRecord??null;throw A({field:e,label:N(e),pendingValue:t,currentValue:r?r[e]:void 0,currentVersion:n.currentVersion,currentRecord:r}),n}throw console.error(`[record:details] Inline-edit save failed`,n),n}},[r.dataSource,r.recordId,r.objectName,r.data,r.refresh,N]),F=Q.useCallback(()=>{A(null),M(!1)},[]),ee=Q.useCallback(async()=>{M(!0);try{typeof r.refresh==`function`&&await r.refresh()}finally{F()}},[r.refresh,F]),I=Q.useCallback(async()=>{if(!k){F();return}let e=r.dataSource,t=r.recordId,n=r.objectName;if(!e||!t||!n){F();return}M(!0);try{let i=k.currentVersion?{ifMatch:k.currentVersion}:void 0;typeof e.update==`function`?await e.update(n,t,{[k.field]:k.pendingValue},i):typeof e.updateOne==`function`?await e.updateOne(n,t,{[k.field]:k.pendingValue},i):typeof e.patch==`function`&&await e.patch(n,t,{[k.field]:k.pendingValue},i),typeof r.refresh==`function`&&await r.refresh()}catch(e){console.error(`[record:details] Overwrite-on-conflict failed`,e)}finally{F()}},[k,r.dataSource,r.recordId,r.objectName,r.refresh,F]),te={type:`detail-view`,objectName:r.objectName,resourceId:r.recordId,data:r.data,layout:s,columns:e.columns,sections:D,fields:E,showBack:!1,showHeader:e.showHeader??!1,inlineEdit:O};return(0,$.jsxs)(`div`,{className:t,...i,children:[(0,$.jsx)(mr,{schema:te,dataSource:r.dataSource,inlineEdit:O,onFieldSave:P}),(0,$.jsx)(_r,{open:!!k,conflict:k,busy:j,onCancel:F,onReload:ee,onOverwrite:I})]})},Sr=e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.field||e.name||e.key)||null,Cr=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},wr=({schema:e={},className:t,...n})=>{let r=y(),{designer:i}=Cr(n),s=Mt(),c=e.objectName,l=c&&s.objectLabel?s.objectLabel({name:c,label:Ze(c)}):c?Ze(c):``,u=e.title||l||`Related`;if(!c)return(0,$.jsx)(`div`,{className:t,...i,children:(0,$.jsx)(`div`,{className:`text-xs text-muted-foreground italic px-3 py-2 border border-dashed rounded`,children:`record:related_list — missing objectName`})});let d=a(),{readableFields:f}=o(c),p=Array.isArray(e.requiredPermissions)?e.requiredPermissions:[];if(p.length>0&&!p.every(e=>d.can(c,e)))return(0,$.jsx)(`div`,{className:t,...i,role:`status`,"aria-live":`polite`,children:(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground italic`,children:`Insufficient permissions to view related list.`})});let m=e.enforceFieldSecurity===!0,h=Array.isArray(e.redactFields)?e.redactFields:[],g=Array.isArray(e.columns)?e.columns:[],_=g;if(m||h.length>0){let e=g.map(Sr).filter(e=>!!e),t=new Set((m?f(e):e).filter(e=>!h.includes(e)));_=g.filter(e=>{let n=Sr(e);return n?t.has(n):!0})}return(0,$.jsx)(`div`,{className:t,...i,children:(0,$.jsx)(Vn,{title:u,type:`table`,api:c,objectName:c,referenceField:e.relationshipField,parentId:r?.recordId,columns:_,pageSize:e.limit,dataSource:r?.dataSource})})},Tr=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},Er=({schema:e={},className:t,...n})=>{let r=y(),{designer:i}=Tr(n),s=r?.objectName||``,c=a(),{readableFields:l}=o(s),u=Array.isArray(e.requiredPermissions)?e.requiredPermissions:[];if(u.length>0&&s&&!u.every(e=>c.can(s,e)))return(0,$.jsx)(`div`,{className:t,...i,role:`status`,"aria-live":`polite`,children:(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground italic`,children:`Insufficient permissions to view highlights.`})});let d=(Array.isArray(e.fields)?e.fields:[]).map(e=>typeof e==`string`?{name:e}:{name:e?.name,label:e?.label,icon:e?.icon,type:e?.type}).filter(e=>typeof e.name==`string`&&e.name.length>0),f=e.enforceFieldSecurity===!0,p=Array.isArray(e.redactFields)?e.redactFields:[],m=f&&s?new Set(l(d.map(e=>e.name))):null,h=d.filter(e=>!(p.includes(e.name)||m&&!m.has(e.name)));return v(Q.useId(),h.map(e=>e.name)),(0,$.jsx)(`div`,{className:t,...i,children:(0,$.jsx)(Un,{fields:h,data:r?.data,objectName:r?.objectName,objectSchema:r?.objectSchema})})},Dr=({change:e,className:t})=>{let n=e.fieldLabel??e.field.charAt(0).toUpperCase()+e.field.slice(1).replace(/_/g,` `),r=e.oldDisplayValue??(e.oldValue==null?`(empty)`:String(e.oldValue)),i=e.newDisplayValue??(e.newValue==null?`(empty)`:String(e.newValue));return(0,$.jsxs)(`div`,{className:X(`flex items-center gap-1.5 text-sm flex-wrap`,t),children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:n}),(0,$.jsx)(`span`,{className:`text-muted-foreground line-through`,children:r}),(0,$.jsx)(W,{className:`h-3 w-3 text-muted-foreground shrink-0`}),(0,$.jsx)(`span`,{className:`text-foreground`,children:i})]})},Or=[`👍`,`❤️`,`🎉`,`😂`,`😮`,`😢`],kr=({reactions:e,onToggleReaction:t,emojiOptions:n=Or,className:r})=>{let[i,a]=Q.useState(!1),o=Q.useCallback(e=>{t?.(e),a(!1)},[t]);return(0,$.jsxs)(`div`,{className:X(`flex items-center gap-1 flex-wrap`,r),children:[e.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:X(`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs border transition-colors`,e.reacted?`bg-primary/10 border-primary/30 text-primary`:`bg-muted border-border text-muted-foreground hover:bg-muted/80`),onClick:()=>o(e.emoji),disabled:!t,"aria-label":`${e.emoji} ${e.count} reaction${e.count===1?``:`s`}`,children:[(0,$.jsx)(`span`,{children:e.emoji}),(0,$.jsx)(`span`,{children:e.count})]},e.emoji)),t&&(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-6 w-6`,onClick:()=>a(!i),"aria-label":`Add reaction`,children:(0,$.jsx)(qe,{className:`h-3.5 w-3.5`})}),i&&(0,$.jsx)(`div`,{className:`absolute bottom-full mb-1 left-0 bg-popover border rounded-md shadow-md z-50 p-1.5 flex gap-1`,role:`listbox`,"aria-label":`Emoji picker`,children:n.map(t=>(0,$.jsx)(`button`,{type:`button`,className:`hover:bg-accent rounded p-1 text-base transition-colors`,onClick:()=>o(t),role:`option`,"aria-selected":e.some(e=>e.emoji===t&&e.reacted),children:t},t))})]})]})};function Ar(e){try{let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<7?`${a}d ago`:t.toLocaleDateString()}catch{return e}}var jr=({parentItem:e,replies:t,onAddReply:n,showReplyInput:r=!0,className:i})=>{let{t:a}=In(),[o,s]=Q.useState(!1),[c,l]=Q.useState(``),[u,d]=Q.useState(!1),f=Q.useCallback(async()=>{let t=c.trim();if(!(!t||!n)){d(!0);try{await n(e.id,t),l(``)}finally{d(!1)}}},[c,n,e.id]),p=Q.useCallback(e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),f())},[f]);return t.length===0&&!r?null:(0,$.jsxs)(`div`,{className:X(`ml-10 mt-1`,i),children:[t.length>0&&(0,$.jsxs)(`button`,{type:`button`,className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors mb-1`,onClick:()=>s(!o),"aria-expanded":o,children:[o?(0,$.jsx)(J,{className:`h-3 w-3`}):(0,$.jsx)(He,{className:`h-3 w-3`}),(0,$.jsx)(Me,{className:`h-3 w-3`}),(0,$.jsx)(`span`,{children:t.length===1?a(`detail.replyCount`,{count:t.length}):a(`detail.replyCountPlural`,{count:t.length})})]}),o&&(0,$.jsx)(`div`,{className:`space-y-2 border-l-2 border-border pl-3`,children:t.map(e=>(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(`div`,{className:`shrink-0`,children:e.actorAvatarUrl?(0,$.jsx)(`img`,{src:e.actorAvatarUrl,alt:e.actor,className:`h-6 w-6 rounded-full object-cover`}):(0,$.jsx)(`div`,{className:`h-6 w-6 rounded-full bg-muted flex items-center justify-center text-[10px] font-medium text-muted-foreground`,children:e.actor.charAt(0).toUpperCase()})}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium`,children:e.actor}),(0,$.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:Ar(e.createdAt)})]}),(0,$.jsx)(`p`,{className:`text-xs whitespace-pre-wrap break-words`,children:e.body})]})]},e.id))}),r&&n&&(0,$.jsxs)(`div`,{className:`flex gap-1.5 mt-1.5`,children:[(0,$.jsx)(`input`,{className:`flex-1 rounded-md border border-input bg-background px-2 py-1 text-xs placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,placeholder:a(`detail.replyPlaceholder`),value:c,onChange:e=>l(e.target.value),onKeyDown:p,disabled:u}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-6 w-6 shrink-0`,onClick:f,disabled:!c.trim()||u,"aria-label":`Send reply`,children:(0,$.jsx)(ht,{className:`h-3 w-3`})})]})]})},Mr=({subscription:e,onToggle:t,className:n})=>{let{t:r}=In(),[i,a]=Q.useState(!1),o=Q.useCallback(async()=>{if(t){a(!0);try{await t(!e.subscribed)}finally{a(!1)}}},[t,e.subscribed]);return(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:X(`h-8 w-8`,n),onClick:o,disabled:i||!t,"aria-label":e.subscribed?r(`detail.unsubscribeAriaLabel`):r(`detail.subscribeAriaLabel`),title:e.subscribed?r(`detail.subscribedTooltip`):r(`detail.unsubscribedTooltip`),children:e.subscribed?(0,$.jsx)(Jt,{className:`h-4 w-4 text-primary`}):(0,$.jsx)(P,{className:`h-4 w-4 text-muted-foreground`})})};function Nr(e){let t=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/```([\s\S]*?)```/g,`<pre class="bg-muted rounded p-2 text-xs font-mono my-1 overflow-x-auto">$1</pre>`).replace(/`([^`]+)`/g,`<code class="bg-muted rounded px-1 py-0.5 text-xs font-mono">$1</code>`).replace(/\*\*(.+?)\*\*/g,`<strong>$1</strong>`).replace(/\*(.+?)\*/g,`<em>$1</em>`).replace(/@(\w+)/g,`<span class="text-primary font-medium">@$1</span>`).replace(/^- (.+)$/gm,`<li class="ml-4 list-disc">$1</li>`).replace(/\n/g,`<br/>`);return t=t.replace(/(<li[^>]*>.*?<\/li>(?:<br\/>)?)+/g,e=>`<ul class="my-1">${e.replace(/<br\/>/g,``)}</ul>`),t}var Pr=({value:e,onChange:t,onSubmit:n,mentionSuggestions:r=[],placeholder:i,className:a,disabled:o=!1,extraSlot:s,canSubmitEmpty:c=!1})=>{let{t:l}=In(),[u,d]=Q.useState(!1),[f,p]=Q.useState(!1),[m,h]=Q.useState(``),[g,_]=Q.useState(0),v=Q.useRef(null),y=Q.useMemo(()=>{if(!m)return r;let e=m.toLowerCase();return r.filter(t=>t.label.toLowerCase().includes(e))},[m,r]),b=Q.useCallback((n,r=``)=>{let i=v.current;if(!i)return;let a=i.selectionStart,o=i.selectionEnd,s=e.slice(a,o);t(e.slice(0,a)+n+s+r+e.slice(o)),requestAnimationFrame(()=>{i.focus();let e=a+n.length+s.length;i.setSelectionRange(e,e)})},[e,t]),x=Q.useCallback(()=>b(`**`,`**`),[b]),S=Q.useCallback(()=>b(`*`,`*`),[b]),C=Q.useCallback(()=>b(`
|
|
4
|
+
- `,``),[b]),w=Q.useCallback(()=>b("`","`"),[b]),T=Q.useCallback(()=>{b(`@`,``),p(!0),h(``),_(0)},[b]),E=Q.useCallback(n=>{let r=v.current;if(!r)return;let i=r.selectionStart,a=e.slice(0,i).lastIndexOf(`@`);a!==-1&&t(e.slice(0,a)+`@${n.label} `+e.slice(i)),p(!1),h(``),requestAnimationFrame(()=>r.focus())},[e,t]),D=Q.useCallback(e=>{let n=e.target.value;t(n);let r=e.target.selectionStart,i=n.slice(0,r),a=i.lastIndexOf(`@`);if(a!==-1){let e=i.slice(a+1),t=a>0?i[a-1]:` `;if(/\s/.test(t)&&!/\s/.test(e)){p(!0),h(e),_(0);return}}p(!1)},[t]),O=Q.useCallback(e=>{if(f&&y.length>0){if(e.key===`ArrowDown`){e.preventDefault(),_(e=>e<y.length-1?e+1:0);return}if(e.key===`ArrowUp`){e.preventDefault(),_(e=>e>0?e-1:y.length-1);return}if(e.key===`Enter`||e.key===`Tab`){e.preventDefault(),E(y[g]);return}if(e.key===`Escape`){p(!1);return}}e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),n?.())},[f,y,g,E,n]);return(0,$.jsxs)(`div`,{className:X(`border rounded-md`,a),children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-0.5 px-2 py-1.5 border-b bg-muted/30`,children:[(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:x,disabled:o||u,title:l(`detail.bold`),children:(0,$.jsx)(be,{className:`h-3.5 w-3.5`})}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:S,disabled:o||u,title:l(`detail.italic`),children:(0,$.jsx)(Gt,{className:`h-3.5 w-3.5`})}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:C,disabled:o||u,title:l(`detail.listFormat`),children:(0,$.jsx)(Re,{className:`h-3.5 w-3.5`})}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:w,disabled:o||u,title:l(`detail.inlineCode`),children:(0,$.jsx)(at,{className:`h-3.5 w-3.5`})}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:T,disabled:o||u,title:l(`detail.mentionSomeone`),children:(0,$.jsx)(Ee,{className:`h-3.5 w-3.5`})}),(0,$.jsx)(`div`,{className:`flex-1`}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:()=>d(!u),title:l(u?`detail.edit`:`detail.preview`),children:u?(0,$.jsx)(Fe,{className:`h-3.5 w-3.5`}):(0,$.jsx)(ke,{className:`h-3.5 w-3.5`})}),n&&(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:n,disabled:o||!c&&!e.trim(),title:l(`detail.submitComment`),children:(0,$.jsx)(ht,{className:`h-3.5 w-3.5`})})]}),(0,$.jsx)(`div`,{className:`relative`,children:u?(0,$.jsx)(`div`,{className:`min-h-[80px] px-3 py-2 text-sm prose prose-sm max-w-none`,dangerouslySetInnerHTML:{__html:Nr(e)}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`textarea`,{ref:v,className:`w-full min-h-[80px] px-3 py-2 text-sm bg-transparent resize-none focus:outline-none placeholder:text-muted-foreground`,placeholder:i??l(`detail.writeComment`),value:e,onChange:D,onKeyDown:O,disabled:o}),f&&y.length>0&&(0,$.jsx)(`div`,{className:`absolute left-2 bottom-full mb-1 w-56 bg-popover border rounded-md shadow-md z-50 max-h-40 overflow-y-auto`,children:y.map((e,t)=>(0,$.jsxs)(`button`,{type:`button`,className:X(`w-full text-left px-3 py-1.5 text-sm flex items-center gap-2 hover:bg-accent transition-colors`,t===g&&`bg-accent`),onMouseDown:t=>{t.preventDefault(),E(e)},children:[e.avatarUrl?(0,$.jsx)(`img`,{src:e.avatarUrl,alt:e.label,className:`h-5 w-5 rounded-full object-cover`}):(0,$.jsx)(`div`,{className:`h-5 w-5 rounded-full bg-muted flex items-center justify-center text-[10px] font-medium`,children:e.label.charAt(0).toUpperCase()}),(0,$.jsx)(`span`,{children:e.label})]},e.id))})]})}),s&&(0,$.jsx)(`div`,{className:`border-t px-2 py-2 bg-muted/20`,children:s})]})};function Fr(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ir(e){return e.startsWith(`image/`)}function Lr(e){return Ir(e)?ee:e.includes(`pdf`)||e.includes(`document`)||e.includes(`text`)?qt:e.includes(`zip`)||e.includes(`archive`)||e.includes(`compressed`)?Y:ye}var Rr=({attachments:e,onUpload:t,onRemove:n,className:r,readOnly:i=!1})=>{let{t:a}=In(),[o,s]=Q.useState(!1),c=Q.useRef(null),l=Q.useCallback(e=>{e.preventDefault(),e.stopPropagation(),s(!0)},[]),u=Q.useCallback(e=>{e.preventDefault(),e.stopPropagation(),s(!1)},[]),d=Q.useCallback(e=>{e.preventDefault(),e.stopPropagation(),s(!1),t&&e.dataTransfer.files.length>0&&t(e.dataTransfer.files)},[t]),f=Q.useCallback(e=>{t&&e.target.files&&e.target.files.length>0&&(t(e.target.files),e.target.value=``)},[t]);return(0,$.jsxs)(`div`,{className:X(`space-y-2`,r),children:[t&&!i&&(0,$.jsxs)(`div`,{className:X(`border-2 border-dashed rounded-md px-4 py-3 text-center transition-colors cursor-pointer`,o?`border-primary bg-primary/5`:`border-muted-foreground/25 hover:border-muted-foreground/40`),onDragOver:l,onDragLeave:u,onDrop:d,onClick:()=>c.current?.click(),role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),c.current?.click())},children:[(0,$.jsx)(ft,{className:`h-5 w-5 mx-auto text-muted-foreground mb-1`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:a(`detail.dropFilesToUpload`)}),(0,$.jsx)(`input`,{ref:c,type:`file`,multiple:!0,className:`hidden`,onChange:f})]}),e.length>0&&(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(ue,{className:`h-3 w-3`}),(0,$.jsx)(`span`,{children:e.length===1?a(`detail.attachmentCount`,{count:e.length}):a(`detail.attachmentCountPlural`,{count:e.length})})]}),(0,$.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2`,children:e.map(e=>{let t=Ir(e.type),r=Lr(e.type);return(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border px-2.5 py-2 bg-muted/30 group`,children:[t&&(e.thumbnailUrl||e.url)?(0,$.jsx)(`img`,{src:e.thumbnailUrl||e.url,alt:e.name,className:`h-10 w-10 rounded object-cover shrink-0`}):(0,$.jsx)(`div`,{className:`h-10 w-10 rounded bg-muted flex items-center justify-center shrink-0`,children:(0,$.jsx)(r,{className:`h-5 w-5 text-muted-foreground`})}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium truncate`,children:e.name}),(0,$.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:Fr(e.size)})]}),n&&!i&&(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity`,onClick:()=>n(e.id),title:a(`detail.removeAttachment`),children:(0,$.jsx)(Ut,{className:`h-3.5 w-3.5`})})]},e.id)})})]})]})},zr={comment:Me,field_change:Fe,task:Ie,event:K,system:Kt,email:Pt,call:j},Br={comment:`bg-purple-100 text-purple-600`,field_change:`bg-blue-100 text-blue-600`,task:`bg-green-100 text-green-600`,event:`bg-amber-100 text-amber-600`,system:`bg-gray-100 text-gray-600`,email:`bg-indigo-100 text-indigo-600`,call:`bg-teal-100 text-teal-600`};function Vr(e){return[{value:`all`,label:e(`detail.allActivity`)},{value:`comments_only`,label:e(`detail.commentsOnly`)},{value:`changes_only`,label:e(`detail.fieldChangesFilter`)},{value:`tasks_only`,label:e(`detail.tasksOnly`)}]}function Hr(e){try{let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<7?`${a}d ago`:t.toLocaleDateString()}catch{return e}}function Ur(e,t){switch(t){case`comments_only`:return e.filter(e=>e.type===`comment`);case`changes_only`:return e.filter(e=>e.type===`field_change`);case`tasks_only`:return e.filter(e=>e.type===`task`);default:return e}}var Wr=({items:e,config:t,filterMode:n,onFilterChange:r,hasMore:i=!1,onLoadMore:a,loading:o=!1,onAddComment:s,onAddReply:c,onToggleReaction:l,subscription:u,onToggleSubscription:d,collapseWhenEmpty:f=!1,mentionSuggestions:p,onUploadAttachments:m,titleLabel:h,emptyLabel:g,className:_})=>{let{t:v}=In(),[y,b]=Q.useState(`all`),[x,S]=Q.useState(``),[C,w]=Q.useState(!1),[T,E]=Q.useState(!1),[D,k]=Q.useState([]),[A,j]=Q.useState(!1),M=n??y,N=t?.showFilterToggle!==!1,P=t?.showCommentInput!==!1&&!!s,ee=t?.enableReactions??!1,I=t?.enableThreading??!1,te=t?.showSubscriptionToggle??!1,L=Q.useMemo(()=>Ur(e,M),[e,M]),R=Q.useMemo(()=>I?L.filter(e=>!e.parentId):L,[L,I]),ne=Q.useMemo(()=>{if(!I)return new Map;let e=new Map;for(let t of L)if(t.parentId){let n=e.get(t.parentId)??[];n.push(t),e.set(t.parentId,n)}return e},[L,I]),re=Q.useCallback(e=>{r?r(e):b(e)},[r]),ie=Q.useCallback(async()=>{let e=x.trim();if(s&&!(!e&&D.length===0)){w(!0);try{await s(e,D.length>0?D:void 0),S(``),k([])}finally{w(!1)}}},[x,D,s]),ae=Q.useCallback(async e=>{if(!(!m||e.length===0)){j(!0);try{let t=await m(e);Array.isArray(t)&&t.length>0&&k(e=>[...e,...t])}finally{j(!1)}}},[m]),z=Q.useCallback(e=>{k(t=>t.filter(t=>t.id!==e))},[]),B=Q.useCallback(async()=>{if(a){E(!0);try{await a()}finally{E(!1)}}},[a]);return(0,$.jsxs)(`section`,{className:X(`border-t border-border/60 pt-5`,_),"aria-label":`Discussion`,children:[(0,$.jsx)(`header`,{className:`mb-4`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`h2`,{className:`flex items-center gap-2 text-base font-semibold leading-none tracking-tight`,children:[(0,$.jsx)(O,{className:`h-4 w-4`}),h??v(`detail.activity`),(0,$.jsxs)(`span`,{className:`text-sm font-normal text-muted-foreground`,children:[`(`,L.length,`)`]})]}),(0,$.jsx)(`div`,{className:`flex items-center gap-1`,children:te&&u&&(0,$.jsx)(Mr,{subscription:u,onToggle:d})})]})}),(0,$.jsxs)(`div`,{className:`space-y-4`,children:[N&&(0,$.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,$.jsxs)(xe,{value:M,onValueChange:e=>re(e),children:[(0,$.jsx)(De,{"aria-label":v(`detail.filterActivity`),className:`h-8 w-auto min-w-[140px] py-1 text-sm`,children:(0,$.jsx)(oe,{})}),(0,$.jsx)(Yt,{children:Vr(v).map(e=>(0,$.jsx)(F,{value:e.value,children:e.label},e.value))})]})}),P&&(0,$.jsx)(Pr,{value:x,onChange:S,onSubmit:ie,mentionSuggestions:p,placeholder:v(`detail.leaveCommentPlaceholder`),disabled:C,canSubmitEmpty:D.length>0,extraSlot:m?(0,$.jsx)(Rr,{attachments:D,onUpload:ae,onRemove:z,readOnly:C||A}):D.length>0?(0,$.jsx)(Rr,{attachments:D,onRemove:z,readOnly:C}):void 0}),L.length===0?f?null:(0,$.jsx)(ut,{title:g??v(`detail.noActivity`),className:`py-6`}):(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(`div`,{className:`absolute left-4 top-2 bottom-2 w-px bg-border`}),(0,$.jsx)(`div`,{className:`space-y-4`,children:R.map(e=>{let t=zr[e.type]||Kt,n=Br[e.type]||`bg-gray-100 text-gray-600`,r=ne.get(e.id)??[];return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`flex gap-3 relative`,children:[(0,$.jsx)(`div`,{className:X(`shrink-0 h-8 w-8 rounded-full flex items-center justify-center z-10`,n),children:e.actorAvatarUrl?(0,$.jsx)(`img`,{src:e.actorAvatarUrl,alt:e.actor,className:`h-8 w-8 rounded-full object-cover`}):(0,$.jsx)(t,{className:`h-3.5 w-3.5`})}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0 pt-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium`,children:e.actor}),e.source&&(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:v(`detail.via`,{source:e.source})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:Hr(e.createdAt)}),e.edited&&(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground italic`,children:v(`detail.edited`)}),e.pinned&&(0,$.jsxs)(`span`,{className:`text-xs text-amber-600`,children:[`📌 `,v(`detail.pinned`)]})]}),e.body&&(0,$.jsx)(`p`,{className:`text-sm whitespace-pre-wrap break-words text-muted-foreground`,children:e.body}),e.type===`field_change`&&e.fieldChanges&&(0,$.jsx)(`div`,{className:`space-y-1 mt-1`,children:e.fieldChanges.map((e,t)=>(0,$.jsx)(Dr,{change:e},t))}),ee&&e.reactions&&e.reactions.length>0&&(0,$.jsx)(`div`,{className:`mt-1.5`,children:(0,$.jsx)(kr,{reactions:e.reactions,onToggleReaction:l?t=>l(e.id,t):void 0})}),ee&&(!e.reactions||e.reactions.length===0)&&l&&(0,$.jsx)(`div`,{className:`mt-1.5`,children:(0,$.jsx)(kr,{reactions:[],onToggleReaction:t=>l(e.id,t)})})]})]}),I&&(e.replyCount??0)>0&&(0,$.jsx)(jr,{parentItem:e,replies:r,onAddReply:c,showReplyInput:!!c})]},e.id)})})]}),i&&(0,$.jsx)(`div`,{className:`text-center pt-2`,children:(0,$.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:B,disabled:T,"aria-label":v(`detail.loadMore`),children:[T?(0,$.jsx)(it,{className:`h-4 w-4 animate-spin mr-1`}):(0,$.jsx)(J,{className:`h-4 w-4 mr-1`}),v(`detail.loadMore`)]})})]})]})},Gr=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},Kr=({schema:e={},className:t,...n})=>{y();let{designer:r}=Gr(n);return(0,$.jsx)(`div`,{className:t,...r,children:(0,$.jsx)(Wr,{items:[],config:e})})},qr=({config:e,items:t,hasMore:n,onLoadMore:r,loading:i,onAddComment:a,onAddReply:o,onToggleReaction:s,subscription:c,onToggleSubscription:l,filterMode:u,onFilterChange:d,collapseWhenEmpty:f=!1,mentionSuggestions:p,onUploadAttachments:m,className:h})=>{let g=e?.position??`right`,_=e?.width??`360px`,v=e?.collapsible??!0,y=f&&t.length===0||(e?.defaultCollapsed??!1),{t:b}=In(),[x,S]=Q.useState(y);return g===`right`||g===`left`?x&&v?(0,$.jsx)(`div`,{className:X(`flex items-start pt-4`,g===`right`?`border-l`:`border-r`,h),children:(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-8 w-8 mx-1`,onClick:()=>S(!1),"aria-label":b(`detail.openDiscussion`),children:(0,$.jsx)(ne,{className:`h-4 w-4`})})}):(0,$.jsxs)(`div`,{className:X(`flex flex-col overflow-hidden`,g===`right`?`border-l`:`border-r`,h),style:{width:_,minWidth:_},children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Me,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{className:`text-sm font-medium`,children:b(`detail.discussion`)})]}),v&&(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:()=>S(!0),"aria-label":b(`detail.closeDiscussion`),children:(0,$.jsx)(Ut,{className:`h-3.5 w-3.5`})})]}),(0,$.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,$.jsx)(Wr,{items:t,config:e?.feed,hasMore:n,onLoadMore:r,loading:i,onAddComment:a,onAddReply:o,onToggleReaction:s,subscription:c,onToggleSubscription:l,filterMode:u,onFilterChange:d,collapseWhenEmpty:f,mentionSuggestions:p,onUploadAttachments:m,titleLabel:b(`detail.discussion`),emptyLabel:b(`detail.noCommentsYet`),className:`border-0 shadow-none`})})]}):(0,$.jsx)(`div`,{className:X(``,h),children:v&&x?(0,$.jsxs)(Z,{variant:`ghost`,className:`w-full justify-start gap-2 text-muted-foreground`,onClick:()=>S(!1),"aria-label":b(`detail.showDiscussion`,{count:t.length}),children:[(0,$.jsx)(Me,{className:`h-4 w-4`}),(0,$.jsx)(`span`,{children:b(`detail.showDiscussion`,{count:t.length})})]}):(0,$.jsxs)(`div`,{children:[v&&(0,$.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,$.jsx)(Me,{className:`h-4 w-4`}),b(`detail.discussion`)]}),(0,$.jsx)(Z,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:()=>S(!0),"aria-label":b(`detail.hideDiscussion`),children:(0,$.jsx)(se,{className:`h-3.5 w-3.5`})})]}),(0,$.jsx)(Wr,{items:t,config:e?.feed,hasMore:n,onLoadMore:r,loading:i,onAddComment:a,onAddReply:o,onToggleReaction:s,subscription:c,onToggleSubscription:l,filterMode:u,onFilterChange:d,collapseWhenEmpty:f,mentionSuggestions:p,onUploadAttachments:m,titleLabel:b(`detail.discussion`),emptyLabel:b(`detail.noCommentsYet`)})]})})},Jr=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},Yr=({schema:e={},className:t,...n})=>{y();let r=_(),{designer:i}=Jr(n),a={position:`bottom`,collapsible:!1,feed:{enableReactions:!0,enableThreading:!0,showCommentInput:!0},...e};return(0,$.jsx)(`div`,{className:t,...i,children:(0,$.jsx)(qr,{items:r?.items||[],config:a,onAddComment:r?.onAddComment,onAddReply:r?.onAddReply,onToggleReaction:r?.onToggleReaction,mentionSuggestions:r?.mentionSuggestions,onUploadAttachments:r?.onUploadAttachments})})},Xr=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},Zr=({schema:e={},className:t,...n})=>{let r=y(),{translateOptions:i}=Mt(),{designer:a}=Xr(n),o=Array.isArray(e.stages)?e.stages:[],s=e.statusField,c=Q.useMemo(()=>{if(o.length===0||!s||!r?.objectName)return o;let e=i(r.objectName,s,o);return Array.isArray(e)&&e.length===o.length?o.map((t,n)=>({...t,label:e[n]?.label??t.label})):o},[o,s,r?.objectName,i]),l=s&&r?.data?r.data[s]:void 0,u=/(^|[_-\s])(closed_)?(lost|failed?|cancell?ed|失败|流失|丢单|败)([_-\s]|$)/i,d=/(^|[_-\s])(closed_)?(won|success|成交|赢|完成)([_-\s]|$)/i,f=c.map(e=>{if(e.terminal)return e.terminal;let t=`${String(e.value??``)} ${String(e.label??``)}`;if(u.test(t))return`lost`;if(d.test(t))return`won`}),p=f.findIndex(e=>e===`lost`),m=p===-1?c:c.slice(0,p),h=p===-1?[]:c.slice(p),g=p===-1?f:f.slice(0,p),_=c.findIndex(e=>e.value===l);_<0&&(_=-1);let v=p!==-1&&_>=p;if(c.length===0)return(0,$.jsx)(`div`,{className:t,...a,children:(0,$.jsx)(`div`,{className:`text-xs text-muted-foreground italic px-3 py-2 border border-dashed rounded`,children:`record:path — no stages configured`})});let b=(e,t)=>{if(c.length!==1)return e===0?`polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%)`:e===t?`polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%)`:`polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%)`},x=m.length-1;return(0,$.jsxs)(`div`,{className:X(`w-full`,t),...a,children:[(0,$.jsxs)(`div`,{className:`hidden sm:flex w-full items-stretch gap-2`,role:`list`,"aria-label":e.aria?.label||`Record path`,children:[(0,$.jsx)(`div`,{className:`flex flex-1 items-stretch`,children:m.map((e,t)=>{let n=!v&&_>=0&&t<_,r=!v&&t===_,i=g[t]===`won`&&t===x,a=b(t,x);return(0,$.jsx)(`div`,{role:`listitem`,"aria-current":r?`step`:void 0,style:a?{clipPath:a,WebkitClipPath:a}:void 0,className:X(`relative flex-1 min-w-0 px-5 py-2 text-xs font-medium text-center`,t>0&&`-ml-2`,m.length===1&&`rounded-md border`,r&&`bg-primary text-primary-foreground shadow-sm ring-1 ring-primary/40`,n&&`bg-emerald-500/15 text-emerald-800 dark:text-emerald-200`,!r&&!n&&i&&`bg-emerald-500/5 text-emerald-700/85 dark:text-emerald-300/85 border border-emerald-500/20`,!r&&!n&&!i&&`bg-background text-foreground/85 border border-border/60`),children:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 truncate`,style:{paddingLeft:t===0?0:`${14/2}px`,paddingRight:t===x?0:`${14/2}px`},children:[n&&(0,$.jsx)(`span`,{"aria-hidden":!0,className:`text-emerald-600 dark:text-emerald-400 font-semibold`,children:`✓`}),i&&!r&&(0,$.jsx)(`span`,{"aria-hidden":!0,className:`opacity-70`,children:`🏆`}),e.label]})},`${e.value}-${t}`)})}),h.length>0&&(0,$.jsx)(`div`,{className:`flex items-stretch gap-1 pl-2 border-l border-border/40`,"aria-label":`Alternative terminal stages`,children:h.map((e,t)=>{let n=p+t===_;return(0,$.jsx)(`div`,{role:`listitem`,"aria-current":n?`step`:void 0,className:X(`shrink-0 px-3 py-2 text-xs font-medium rounded-md border whitespace-nowrap`,n&&`bg-destructive text-destructive-foreground border-destructive shadow-sm ring-1 ring-destructive/40`,!n&&`bg-destructive/5 text-destructive/85 border-destructive/20`),children:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`opacity-70`,children:`✗`}),e.label]})},`${e.value}-lost-${t}`)})})]}),(0,$.jsx)(`div`,{className:`flex sm:hidden w-full items-stretch gap-1 overflow-x-auto pb-1 -mx-1 px-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,role:`list`,"aria-label":e.aria?.label||`Record path`,children:c.map((e,t)=>{let n=f[t]===`lost`,r=!n&&!v&&_>=0&&t<_,i=t===_;return(0,$.jsx)(`div`,{role:`listitem`,"aria-current":i?`step`:void 0,className:X(`shrink-0 px-3 py-1.5 rounded-full text-xs font-medium border whitespace-nowrap`,n&&i&&`bg-destructive text-destructive-foreground border-destructive shadow-sm`,n&&!i&&`bg-destructive/5 text-destructive/85 border-destructive/20`,!n&&i&&`bg-primary text-primary-foreground border-primary shadow-sm ring-1 ring-primary/40`,!n&&r&&`bg-emerald-500/15 text-emerald-800 dark:text-emerald-200 border-emerald-500/30`,!n&&!i&&!r&&`bg-background text-foreground/85 border-border/60`),children:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[n&&(0,$.jsx)(`span`,{"aria-hidden":!0,className:`opacity-70`,children:`✗`}),!n&&r&&(0,$.jsx)(`span`,{"aria-hidden":!0,className:`text-emerald-600 dark:text-emerald-400 font-semibold`,children:`✓`}),e.label]})},`${e.value}-${t}-m`)})})]})},Qr=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},$r=({schema:e={},className:t,...n})=>{let r=y(),{designer:i}=Qr(n),o=a(),c=Array.isArray(e.actions)?e.actions:Array.isArray(e.properties?.actions)?e.properties.actions:[],l=Array.isArray(e.actionNames)?e.actionNames:Array.isArray(e.properties?.actionNames)?e.properties.actionNames:[],u=r?.objectName||``,d=l.length>0?l:Array.isArray(c)&&c.every(e=>typeof e==`string`)?c:[],f=d.length>0&&!!u,{item:p}=s(`object`,f?u:null),m=f?(()=>{let e=Array.isArray(p?.actions)?p.actions:[],t=new Map(e.map(e=>[e.name,e]));return d.map(e=>t.get(e)).filter(e=>!!e)})():Array.isArray(c)?c:[],h=Array.isArray(e.requiredPermissions)?e.requiredPermissions:[];if(h.length>0&&u&&!h.every(e=>o.can(u,e)))return(0,$.jsx)(`div`,{className:t,...i,role:`status`,"aria-live":`polite`,children:(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground italic`,children:`Insufficient permissions to view quick actions.`})});let g=e.location||`record_header`,{getActionsForLocation:_,executeAction:v}=C({actions:m,context:{record:r?.data,recordId:r?.recordId,objectName:r?.objectName}}),b=m.length>0?_(g):[];if(b.length===0)return(0,$.jsx)(`div`,{className:t,...i,children:(0,$.jsx)(`div`,{className:`text-xs text-muted-foreground italic px-3 py-2 border border-dashed rounded`,children:`record:quick_actions — no actions configured`})});let x=e.align||`end`,S=x===`start`?`justify-start`:x===`center`?`justify-center`:`justify-end`;return(0,$.jsx)(`div`,{className:X(`flex flex-wrap items-center gap-2`,g===`record_header`&&!e.inline&&`-mt-12 sm:-mt-14 mb-2 relative z-10`,S,t),role:`toolbar`,"aria-label":e.aria?.label||`Quick actions`,...i,children:b.map((t,n)=>{let r=t.label||t.name||`Action ${n+1}`;return(0,$.jsx)(Z,{variant:t.variant||e.variant||`default`,size:t.size||e.size||`sm`,disabled:typeof t.disabled==`boolean`?t.disabled:void 0,onClick:()=>{if(typeof t.onClick==`function`){t.onClick();return}t.name&&v(t.name)},children:r},t.name||`qa-${n}`)})})},ei=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},ti=({schema:e={},className:t,...n})=>{let{designer:r}=ei(n),i=Array.isArray(e.entries)?e.entries:Array.isArray(e.properties?.entries)?e.properties.entries:[],a=e.loading??e.properties?.loading??!1,o=e.emptyText??e.properties?.emptyText;return(0,$.jsx)(`div`,{className:t,...r,children:(0,$.jsx)(ir,{entries:i,loading:a,emptyText:o})})},ni=e=>{let{"data-obj-id":t,"data-obj-type":n,style:r,...i}=e||{};return{designer:{"data-obj-id":t,"data-obj-type":n,style:r},rest:i}},ri=e=>e.replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim(),ii=(e,t)=>t&&e?.[t]!=null&&e[t]!==``?String(e[t]):e?.name||e?.title||e?.subject||e?.label||e?.email||e?.username||e?.code||e?.slug||e?.provider_id||e?.user_agent||e?.ip_address||e?.id||`—`,ai=({schema:e={},className:r,...i})=>{let a=y(),o=Mt(),{t:s}=In(),{designer:c}=ni(i),l=n().appName,u=Array.isArray(e.entries)?e.entries:Array.isArray(e.properties?.entries)?e.properties.entries:[],d=a?.recordId,f=a?.dataSource,[p,m]=Q.useState({});if(Q.useEffect(()=>{if(!f?.find||!d||u.length===0)return;let e=!1;return u.forEach(t=>{let n=t.objectName;m(e=>({...e,[n]:{loading:!0,total:0,items:e[n]?.items||[]}})),f.find(t.objectName,{$filter:{[t.relationshipField]:d},$top:t.limit??3,$count:!0}).then(t=>{if(e)return;let r=Array.isArray(t)?t:t?.data||[],i=typeof t?.total==`number`?t.total:typeof t?.count==`number`?t.count:r.length;m(e=>({...e,[n]:{loading:!1,total:i,items:r}}))}).catch(t=>{e||m(e=>({...e,[n]:{loading:!1,total:0,items:[],error:String(t?.message||t)}}))})}),()=>{e=!0}},[f,d,JSON.stringify(u.map(e=>`${e.objectName}:${e.relationshipField}:${e.limit??3}`))]),u.length===0)return null;let h=e.hideEmpty!==!1,[g,_]=Q.useState(!1),v=new Set(u.filter(e=>{let t=p[e.objectName];return h&&t&&!t.loading&&!t.error&&t.total===0}).map(e=>e.objectName)),b=u.filter(e=>g||!v.has(e.objectName)),x=u.filter(e=>v.has(e.objectName)).map(e=>e.title||(o?.objectLabel?o.objectLabel({name:e.objectName,label:ri(e.objectName)}):ri(e.objectName)));return(0,$.jsxs)(`div`,{className:X(`flex flex-col gap-3`,e.className,r),...c,children:[b.map(e=>{let n=e.objectName,r=p[n]||{loading:!0,total:0,items:[]};return(0,$.jsxs)(U,{className:`overflow-hidden`,children:[(0,$.jsxs)(Pe,{className:`flex flex-row items-center justify-between gap-2 py-3 px-4 space-y-0 border-b`,children:[(0,$.jsx)(Ne,{className:`text-sm font-semibold tracking-tight truncate`,children:e.title||(o?.objectLabel?o.objectLabel({name:e.objectName,label:ri(e.objectName)}):ri(e.objectName))}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[!r.loading&&(0,$.jsx)(_e,{variant:`secondary`,className:`tabular-nums`,children:r.total}),l&&d&&(0,$.jsx)(t,{to:`/apps/${l}/${e.objectName}?filter%5B${e.relationshipField}%5D=${encodeURIComponent(String(d))}`,className:`text-[11px] font-medium text-muted-foreground hover:text-foreground transition-colors`,title:s(`detail.viewAll`,{defaultValue:`View all`}),children:s(`detail.viewAll`,{defaultValue:`View all`})})]})]}),(0,$.jsx)(Ot,{className:`p-0`,children:r.loading?(0,$.jsxs)(`div`,{className:`space-y-1.5 p-3`,children:[(0,$.jsx)(M,{className:`h-3.5 w-4/5`}),(0,$.jsx)(M,{className:`h-3.5 w-3/5`}),(0,$.jsx)(M,{className:`h-3.5 w-2/3`})]}):r.items.length===0?(0,$.jsx)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:s(`detail.noRecords`)}):(0,$.jsx)(`ul`,{className:`divide-y`,children:r.items.map(n=>{let r=n.id||n._id,i=ii(n,e.displayField),a=r?`../${e.objectName}/record/${encodeURIComponent(String(r))}`:void 0;return(0,$.jsx)(`li`,{className:`px-4 py-2`,children:a?(0,$.jsxs)(t,{to:a,className:`group flex items-center justify-between gap-2 text-xs hover:text-foreground text-muted-foreground transition-colors`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:i}),(0,$.jsx)(He,{className:`h-3 w-3 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity`})]}):(0,$.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:i})},String(r||i))})})})]},n)}),!g&&x.length>0&&(0,$.jsxs)(`button`,{type:`button`,onClick:()=>_(!0),className:`self-start inline-flex items-center gap-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors px-2.5 py-1 rounded-md border border-dashed border-border/60 hover:border-border bg-background`,title:x.join(` · `),children:[(0,$.jsx)(`span`,{children:s(`detail.showEmptyRelated`,{defaultValue:`+ {{count}} empty`,count:x.length})}),(0,$.jsxs)(`span`,{className:`truncate max-w-[180px] text-muted-foreground/70`,children:[`(`,x.join(` · `),`)`]})]})]})},oi={info:{wrap:`border-blue-300/60 bg-blue-50 text-blue-900 dark:border-blue-700/40 dark:bg-blue-950/30 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-300`,icon:`Info`},warning:{wrap:`border-amber-300/60 bg-amber-50 text-amber-900 dark:border-amber-700/40 dark:bg-amber-950/30 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-300`,icon:`AlertTriangle`},error:{wrap:`border-destructive/60 bg-destructive/10 text-destructive dark:bg-destructive/20 [&>svg]:text-destructive`,icon:`AlertCircle`},success:{wrap:`border-emerald-300/60 bg-emerald-50 text-emerald-900 dark:border-emerald-700/40 dark:bg-emerald-950/30 dark:text-emerald-100 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-300`,icon:`CheckCircle2`}};function si(e){let t=e?.properties??{};return{...e,...t}}var ci=({schema:e={},className:t})=>{let n=si(e),r=y(),i=r?.data,a=r?.objectName||``,o=r?.recordId??i?.id,u=[`info`,`warning`,`error`,`success`].includes(n.severity)?n.severity:`info`,d=oi[u],f=n.icon||d.icon,p=c(n.visible),m=l(p,{record:i}),h=Q.useMemo(()=>{if(!n.dismissible)return null;let e=n.dismissKey||n.title||u;return`os.record-alert:${a}:${o??`_`}:${e}`},[n.dismissible,n.dismissKey,n.title,u,a,o]),[g,_]=Q.useState(()=>{if(!h||typeof window>`u`)return!1;try{return window.localStorage.getItem(h)===`1`}catch{return!1}}),v=n.action?.actionName,{item:b}=s(`object`,v&&a?a:null),x=Q.useMemo(()=>{if(!(!v||!b?.actions))return b.actions.find(e=>e.name===v)},[v,b]),{executeAction:S}=C({actions:Q.useMemo(()=>x?[x]:[],[x]),context:{record:i,recordId:o,objectName:a}});return g||!i||Object.keys(i).length===0||p!==void 0&&!m?null:(0,$.jsxs)(bt,{className:X(`relative pr-12`,d.wrap,t),role:u===`error`?`alert`:`status`,"aria-live":u===`error`?`assertive`:`polite`,children:[(0,$.jsx)(Dt,{name:f,className:`h-4 w-4`,"aria-hidden":`true`}),n.title?(0,$.jsx)(ot,{children:n.title}):null,n.body||x?(0,$.jsxs)(jt,{children:[n.body?(0,$.jsx)(`p`,{className:`mb-2 last:mb-0`,children:n.body}):null,x?(0,$.jsx)(Z,{size:`sm`,variant:n.action?.variant||(u===`error`?`destructive`:`default`),onClick:()=>{x?.name&&S(x.name)},children:n.action?.label||x.label||x.name}):null]}):null,n.dismissible?(0,$.jsx)(`button`,{type:`button`,onClick:()=>{if(_(!0),h)try{window.localStorage.setItem(h,`1`)}catch{}},"aria-label":`Dismiss`,className:`absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground/80 hover:bg-foreground/5 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring`,children:(0,$.jsx)(Dt,{name:`X`,className:`h-4 w-4`,"aria-hidden":`true`})}):null]})},li=new Set([`id`,`_id`,`__v`,`created_at`,`updated_at`,`createdAt`,`updatedAt`,`created_by`,`updated_by`,`organization_id`,`tenant_id`,`owner_id`,`deleted_at`,`is_deleted`]),ui=480,di=95;function fi({open:e,onClose:t,title:n,record:r,objectName:i,recordId:a,dataSource:o,objectSchema:s,width:c=`min(960px, 60vw)`,columns:l=2,systemFields:u=li,onFieldSave:d,onDelete:f,resizable:p=!0,fullPageHref:m}){let{t:h}=In(),g=`objectui.drawerWidth.${i}`,[_,v]=Q.useState(()=>{if(typeof window>`u`||!p)return null;try{let e=window.localStorage.getItem(g);if(e){let t=parseInt(e,10);if(Number.isFinite(t)&&t>=ui)return t}}catch{}return null}),y=Q.useMemo(()=>p&&_!=null?`${_}px`:typeof c==`number`?`${c}px`:c,[p,_,c]),b=y?{width:y,maxWidth:y}:void 0,x=Q.useRef(null),S=Q.useCallback(e=>{if(!p)return;e.preventDefault();let t=_??(typeof window<`u`?Math.min(window.innerWidth*.6,960):720);x.current={startX:e.clientX,startWidth:t};let n=e=>{let t=x.current;if(!t)return;let n=t.startX-e.clientX,r=typeof window<`u`?window.innerWidth*di/100:1600,i=Math.min(r,Math.max(ui,t.startWidth+n));v(Math.round(i))},r=()=>{x.current,x.current=null,window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,r);try{v(e=>(e!=null&&window.localStorage.setItem(g,String(e)),e))}catch{}};window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,r),window.addEventListener(`pointercancel`,r)},[p,_,g]),C=s?.fields??{},w=(Object.keys(C).length?Object.keys(C):Object.keys(r)).filter(e=>!u.has(e)&&!e.startsWith(`__`)).filter(e=>e in r).filter(e=>!C[e]?.hidden).map(e=>{let t=C[e]||{},n=t.type===`lookup`||t.type===`master_detail`||t.type===`reference`;return{name:e,label:t.label,type:t.type,readonly:!!t.readonly||n,options:t.options,currency:t.currency,precision:t.precision,format:t.format,reference_to:t.reference_to??t.referenceTo??t.target,reference_field:t.reference_field??t.referenceField,required:t.required,validation:t.validation,placeholder:t.placeholder,description:t.description}});return(0,$.jsx)(G,{open:e,onOpenChange:e=>{e||t()},children:(0,$.jsxs)(pe,{side:`right`,className:`w-full overflow-y-auto p-0 sm:!max-w-none`,style:b,onOpenAutoFocus:e=>e.preventDefault(),children:[p&&(0,$.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize drawer`,onPointerDown:S,className:`hidden sm:block absolute left-0 top-0 h-full w-1.5 cursor-col-resize select-none bg-transparent hover:bg-primary/30 active:bg-primary/50 transition-colors z-10`}),(0,$.jsx)(re,{className:`sr-only`,children:(0,$.jsx)(V,{children:n})}),(0,$.jsx)(`div`,{className:`px-6 pt-6 pb-6`,children:(0,$.jsx)(mr,{dataSource:o,inlineEdit:!0,schema:{type:`detail-view`,objectName:i,resourceId:String(a),data:r,showDelete:!0,columns:l,fields:w,actions:m?[{type:`action:bar`,location:`record_header`,systemActions:[{name:`sys_open_new_tab`,label:h(`detail.openInNewTab`),icon:`external-link`,type:`script`,onClick:()=>window.open(m,`_blank`,`noopener`)}]}]:void 0},onFieldSave:async(e,t)=>{try{await d?.(e,t)}catch(e){console.error(`[RecordDetailDrawer] inline field save failed:`,e)}},onDelete:async()=>{try{await f?.(),t()}catch(e){console.error(`[RecordDetailDrawer] delete failed:`,e)}}})})]})})}function pi(e,t){if(typeof window>`u`)return null;let n=window.location.pathname,r=`/${e}`,i=n.indexOf(r);return`${i>=0?n.slice(0,i):n.replace(/\/$/,``)}/${e}/record/${encodeURIComponent(String(t))}`}function mi(e,t){if(!e||!t.length)return[];let n=[...t].sort((e,t)=>t.label.length-e.label.length),r=e,i=new Set;for(let e of n){if(!e.label)continue;let t=e.label.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),n=RegExp(`@${t}(?![\\p{L}\\p{N}_])`,`gu`);n.test(r)&&(i.add(e.id),r=r.replace(n,e=>` `.repeat(e.length)))}return[...i]}function hi(e){return e==null?[]:Array.isArray(e)?e.filter(e=>e!=null):[e]}function gi(e){if(!e)return null;if(e.stageField)return e.stageField;let t=e.fields||{};for(let e of[`status`,`stage`,`state`,`phase`])if(e in t)return e;for(let[e,n]of Object.entries(t)){let t=(n?.type||``).toLowerCase();if(t===`status`||t===`stage`)return e}return null}function _i(e,t){if(!e||!t)return null;let n=e.fields?.[t]?.options;return!Array.isArray(n)||n.length===0?null:n.map(e=>({value:e.value,label:e.label}))}function vi(e,t,n=4){if(!e)return[];if(Array.isArray(e.highlightFields)&&e.highlightFields.length>0)return e.highlightFields.slice(0,n);let r=new Set([`id`,`_id`,`created_at`,`updated_at`,`deleted_at`,`created_by`,`updated_by`,`deleted_by`,`organization_id`,`workspace_id`,`tenant_id`,`org_id`]);t&&r.add(t),e.primaryField&&r.add(e.primaryField);for(let t of[`name`,`full_name`,`title`,`subject`,`display_name`])t in(e.fields||{})&&r.add(t);let i=[`owner`,`owner_id`,`amount`,`rating`,`source`,`priority`,`industry`,`phone`,`email`,`close_date`,`due_date`,`start_date`,`expected_close_date`,`account`,`account_id`,`contact`,`contact_id`],a=new Set([`currency`,`number`,`integer`,`decimal`,`percent`,`date`,`datetime`,`time`,`reference`,`lookup`,`user`,`owner`,`select`,`enum`,`multiselect`,`status`,`email`,`phone`,`url`,`text`,`string`]),o=[],s=e.fields||{};for(let e of i)if(e in s&&!r.has(e)&&o.push(e),o.length>=n)return o;for(let e of Object.keys(s)){if(o.includes(e)||r.has(e))continue;let t=s[e]?.type;if(!(t&&!a.has(t))&&(o.push(e),o.length>=n))break}return o}function yi(e,t={}){return{type:`page:header`,recordChrome:t.recordChrome!==!1,...Array.isArray(t.actions)&&t.actions.length>0?{actions:t.actions}:{}}}function bi(e,t={}){let n=t.statusField??gi(e),r=t.stages??(n?_i(e,n):null),i=t.highlightFields??vi(e,n),a=[];return!t.hideHighlights&&i.length>0&&a.push({type:`record:highlights`,fields:i}),!t.hidePath&&n&&r&&r.length>0&&a.push({type:`record:path`,statusField:n,stages:r}),a}function xi(e,t,n){return{type:`record:details`,sections:t,...n&&n.length>0?{hideFields:n}:{}}}function Si(e,t={}){let n=t.statusField??gi(e),r=t.highlightFields??vi(e,n),i=[{label:`Details`,children:[xi(e,t.sections,r)]}];return!t.hideRelatedTab&&Array.isArray(t.related)&&t.related.length>0&&i.push({label:`Related`,children:t.related.map(e=>({type:`record:related_list`,title:e.title,objectName:e.objectName,relationshipField:e.relationshipField,...e.columns?{columns:e.columns}:{},...e.limit?{limit:e.limit}:{},...e.icon?{icon:e.icon}:{}}))}),t.showActivity&&i.push({label:`Activity`,children:[{type:`record:activity`}]}),t.history&&i.push({label:`History`,children:[{type:`record:history`,entries:t.history.entries,loading:t.history.loading,emptyText:t.history.emptyText}]}),{type:`page:tabs`,items:i}}function Ci(){return{type:`record:discussion`}}function wi(e,t={}){let n=t.slots||{},r=[];`header`in n&&n.header!==void 0?r.push(...hi(n.header)):r.push(yi(e,{recordChrome:t.recordChrome,actions:t.headerActions})),`actions`in n&&n.actions!==void 0&&r.push(...hi(n.actions)),`alerts`in n&&n.alerts!==void 0&&r.push(...hi(n.alerts)),`highlights`in n&&n.highlights!==void 0?r.push(...hi(n.highlights)):r.push(...bi(e,{highlightFields:t.highlightFields,statusField:t.statusField,stages:t.stages,hideHighlights:t.hideHighlights,hidePath:t.hidePath}));let i=!t.hideReferenceRail&&Array.isArray(t.related)&&t.related.length>=2,a=t.hideRelatedTab??i;if(`tabs`in n&&n.tabs!==void 0)r.push(...hi(n.tabs));else if(`details`in n&&n.details!==void 0){let i=hi(n.details),o=Si(e,{sections:t.sections,related:t.related,showActivity:t.showActivity,history:t.history,highlightFields:t.highlightFields,statusField:t.statusField,hideRelatedTab:a});Array.isArray(o.items)&&o.items.length>0&&(o.items[0]={...o.items[0],children:i}),r.push(o)}else r.push(Si(e,{sections:t.sections,related:t.related,showActivity:t.showActivity,history:t.history,highlightFields:t.highlightFields,statusField:t.statusField,hideRelatedTab:a}));`discussion`in n&&n.discussion!==void 0?r.push(...hi(n.discussion)):t.hideDiscussion||r.push(Ci());let o=[{name:`main`,width:`full`,components:r}],s=hi(n.rightRail);if(i||s.length>0){let e=[];i&&e.push({type:`record:reference_rail`,entries:t.related.map(e=>({objectName:e.objectName,relationshipField:e.relationshipField,title:e.title,icon:e.icon,displayField:e.displayField,limit:3}))}),s.length>0&&e.push(...s),o.push({name:`aside`,width:`small`,className:`hidden xl:flex flex-col gap-4`,components:e})}return{type:`record`,pageType:`record`,object:e?.name,template:`full-width`,regions:o}}S.register(`detail-view`,mr,{namespace:`plugin-detail`,label:`Detail View`,category:`Views`,icon:`FileText`,inputs:[{name:`title`,type:`string`,label:`Title`},{name:`objectName`,type:`string`,label:`Object Name`},{name:`resourceId`,type:`string`,label:`Resource ID`},{name:`api`,type:`string`,label:`API Endpoint`},{name:`data`,type:`object`,label:`Data`},{name:`layout`,type:`enum`,label:`Layout Mode`,enum:[`vertical`,`horizontal`,`grid`]},{name:`columns`,type:`number`,label:`Grid Columns`},{name:`sections`,type:`array`,label:`Sections`},{name:`fields`,type:`array`,label:`Fields`},{name:`tabs`,type:`array`,label:`Tabs`},{name:`related`,type:`array`,label:`Related Lists`},{name:`actions`,type:`array`,label:`Actions`},{name:`showBack`,type:`boolean`,label:`Show Back Button`,defaultValue:!0},{name:`backUrl`,type:`string`,label:`Back URL`},{name:`showEdit`,type:`boolean`,label:`Show Edit Button`,defaultValue:!1},{name:`editUrl`,type:`string`,label:`Edit URL`},{name:`showDelete`,type:`boolean`,label:`Show Delete Button`,defaultValue:!1},{name:`deleteConfirmation`,type:`string`,label:`Delete Confirmation Message`},{name:`loading`,type:`boolean`,label:`Show Loading State`},{name:`header`,type:`object`,label:`Custom Header`},{name:`footer`,type:`object`,label:`Custom Footer`}],defaultProps:{title:`Detail View`,showBack:!0,showEdit:!1,showDelete:!1,sections:[],fields:[],tabs:[],related:[]}}),S.register(`detail-section`,Rn,{namespace:`plugin-detail`,label:`Detail Section`,category:`Detail Components`,inputs:[{name:`title`,type:`string`,label:`Title`},{name:`description`,type:`string`,label:`Description`},{name:`fields`,type:`array`,label:`Fields`,required:!0},{name:`collapsible`,type:`boolean`,label:`Collapsible`,defaultValue:!1},{name:`defaultCollapsed`,type:`boolean`,label:`Default Collapsed`,defaultValue:!1},{name:`columns`,type:`number`,label:`Columns`,defaultValue:2},{name:`showBorder`,type:`boolean`,label:`Show Border`,defaultValue:!0},{name:`headerColor`,type:`string`,label:`Header Color`}]}),S.register(`related-list`,Vn,{namespace:`plugin-detail`,label:`Related List`,category:`Detail Components`,inputs:[{name:`title`,type:`string`,label:`Title`,required:!0},{name:`type`,type:`enum`,label:`Type`,enum:[{label:`List`,value:`list`},{label:`Grid`,value:`grid`},{label:`Table`,value:`table`}],defaultValue:`table`},{name:`api`,type:`string`,label:`API Endpoint`},{name:`data`,type:`array`,label:`Data`},{name:`columns`,type:`array`,label:`Columns`}]}),S.register(`detail`,mr,{namespace:`view`,category:`view`,label:`Detail`,icon:`FileText`,inputs:[{name:`objectName`,type:`string`,label:`Object Name`,required:!0},{name:`recordId`,type:`string`,label:`Record ID`},{name:`fields`,type:`array`,label:`Fields`}]}),S.register(`record:details`,xr,{namespace:`record`,category:`record`,label:`Record Details`,icon:`FileText`}),S.register(`record:related_list`,wr,{namespace:`record`,category:`record`,label:`Related List`,icon:`List`}),S.register(`record:highlights`,Er,{namespace:`record`,category:`record`,label:`Highlights Panel`,icon:`Star`}),S.register(`record:activity`,Kr,{namespace:`record`,category:`record`,label:`Activity Timeline`,icon:`Activity`}),S.register(`record:chatter`,Yr,{namespace:`record`,category:`record`,label:`Chatter Feed`,icon:`MessageSquare`}),S.register(`record:discussion`,Yr,{namespace:`record`,category:`record`,label:`Discussion`,icon:`MessageSquare`}),S.register(`record:path`,Zr,{namespace:`record`,category:`record`,label:`Path / Stepper`,icon:`GitBranch`}),S.register(`record:quick_actions`,$r,{namespace:`record`,category:`record`,label:`Quick Actions`,icon:`Zap`}),S.register(`record:history`,ti,{namespace:`record`,category:`record`,label:`History Timeline`,icon:`Clock`}),S.register(`record:reference_rail`,ai,{namespace:`record`,category:`record`,label:`Reference Rail`,icon:`PanelRight`}),S.register(`record:alert`,ci,{namespace:`record`,category:`record`,label:`Alert Banner`,icon:`AlertTriangle`});export{qr as a,pi as i,mi as n,mr as o,fi as r,wn as s,wi as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[Object.freeze(JSON.parse(`{"displayName":"Gettext PO","fileTypes":["po","pot","potx"],"name":"po","patterns":[{"begin":"^(?:(?=(msg(?:id(_plural)?|ctxt))\\\\s*\\"[^\\"])|\\\\s*$)","end":"\\\\z","patterns":[{"include":"#body"}]},{"include":"#comments"},{"match":"^msg(id|str)\\\\s+\\"\\"\\\\s*$\\\\n?","name":"comment.line.number-sign.po"},{"captures":{"1":{"name":"constant.language.po"},"2":{"name":"punctuation.separator.key-value.po"},"3":{"name":"string.other.po"}},"match":"^\\"(?:([^:\\\\s]+)(:)\\\\s+)?([^\\"]*)\\"\\\\s*$\\\\n?","name":"meta.header.po"}],"repository":{"body":{"patterns":[{"begin":"^(msgid(_plural)?)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.msgid.po"}},"end":"^(?!\\")","name":"meta.scope.msgid.po","patterns":[{"begin":"(\\\\G|^)\\"","end":"\\"","name":"string.quoted.double.po","patterns":[{"match":"\\\\\\\\[\\"\\\\\\\\]","name":"constant.character.escape.po"}]}]},{"begin":"^(msgstr)(?:(\\\\[)(\\\\d+)(]))?\\\\s+","beginCaptures":{"1":{"name":"keyword.control.msgstr.po"},"2":{"name":"keyword.control.msgstr.po"},"3":{"name":"constant.numeric.po"},"4":{"name":"keyword.control.msgstr.po"}},"end":"^(?!\\")","name":"meta.scope.msgstr.po","patterns":[{"begin":"(\\\\G|^)\\"","end":"\\"","name":"string.quoted.double.po","patterns":[{"match":"\\\\\\\\[\\"\\\\\\\\]","name":"constant.character.escape.po"}]}]},{"begin":"^(msgctxt)(?:(\\\\[)(\\\\d+)(]))?\\\\s+","beginCaptures":{"1":{"name":"keyword.control.msgctxt.po"},"2":{"name":"keyword.control.msgctxt.po"},"3":{"name":"constant.numeric.po"},"4":{"name":"keyword.control.msgctxt.po"}},"end":"^(?!\\")","name":"meta.scope.msgctxt.po","patterns":[{"begin":"(\\\\G|^)\\"","end":"\\"","name":"string.quoted.double.po","patterns":[{"match":"\\\\\\\\[\\"\\\\\\\\]","name":"constant.character.escape.po"}]}]},{"captures":{"1":{"name":"punctuation.definition.comment.po"}},"match":"^(#~).*$\\\\n?","name":"comment.line.number-sign.obsolete.po"},{"include":"#comments"},{"match":"^(?!\\\\s*$)[^\\"#].*$\\\\n?","name":"invalid.illegal.po"}]},"comments":{"patterns":[{"begin":"^(?=#)","end":"(?!\\\\G)","patterns":[{"begin":"(#,)\\\\s+","beginCaptures":{"1":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.flag.po","patterns":[{"captures":{"1":{"name":"entity.name.type.flag.po"}},"match":"(?:\\\\G|,\\\\s*)(fuzzy|(?:no-)?(?:c|objc|sh|lisp|elisp|librep|scheme|smalltalk|java|csharp|awk|object-pascal|ycp|tcl|perl|perl-brace|php|gcc-internal|qt|boost)-format)"}]},{"begin":"#\\\\.","beginCaptures":{"0":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.extracted.po"},{"begin":"(#:)[\\\\t ]*","beginCaptures":{"1":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.reference.po","patterns":[{"match":"(\\\\S+:)([;\\\\d]*)","name":"storage.type.class.po"}]},{"begin":"#\\\\|","beginCaptures":{"0":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.previous.po"},{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.po"}]}]}},"scopeName":"source.po","aliases":["pot","potx"]}`))];export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse(`{"colors":{"activityBar.activeBorder":"#a6accd","activityBar.background":"#1b1e28","activityBar.dropBorder":"#a6accd","activityBar.foreground":"#a6accd","activityBar.inactiveForeground":"#a6accd66","activityBarBadge.background":"#303340","activityBarBadge.foreground":"#e4f0fb","badge.background":"#303340","badge.foreground":"#e4f0fb","breadcrumb.activeSelectionForeground":"#e4f0fb","breadcrumb.background":"#00000000","breadcrumb.focusForeground":"#e4f0fb","breadcrumb.foreground":"#767c9dcc","breadcrumbPicker.background":"#1b1e28","button.background":"#303340","button.foreground":"#ffffff","button.hoverBackground":"#50647750","button.secondaryBackground":"#a6accd","button.secondaryForeground":"#ffffff","button.secondaryHoverBackground":"#a6accd","charts.blue":"#ADD7FF","charts.foreground":"#a6accd","charts.green":"#5DE4c7","charts.lines":"#a6accd80","charts.orange":"#89ddff","charts.purple":"#f087bd","charts.red":"#d0679d","charts.yellow":"#fffac2","checkbox.background":"#1b1e28","checkbox.border":"#ffffff10","checkbox.foreground":"#e4f0fb","debugConsole.errorForeground":"#d0679d","debugConsole.infoForeground":"#ADD7FF","debugConsole.sourceForeground":"#a6accd","debugConsole.warningForeground":"#fffac2","debugConsoleInputIcon.foreground":"#a6accd","debugExceptionWidget.background":"#d0679d","debugExceptionWidget.border":"#d0679d","debugIcon.breakpointCurrentStackframeForeground":"#fffac2","debugIcon.breakpointDisabledForeground":"#7390AA","debugIcon.breakpointForeground":"#d0679d","debugIcon.breakpointStackframeForeground":"#5fb3a1","debugIcon.breakpointUnverifiedForeground":"#7390AA","debugIcon.continueForeground":"#ADD7FF","debugIcon.disconnectForeground":"#d0679d","debugIcon.pauseForeground":"#ADD7FF","debugIcon.restartForeground":"#5fb3a1","debugIcon.startForeground":"#5fb3a1","debugIcon.stepBackForeground":"#ADD7FF","debugIcon.stepIntoForeground":"#ADD7FF","debugIcon.stepOutForeground":"#ADD7FF","debugIcon.stepOverForeground":"#ADD7FF","debugIcon.stopForeground":"#d0679d","debugTokenExpression.boolean":"#89ddff","debugTokenExpression.error":"#d0679d","debugTokenExpression.name":"#e4f0fb","debugTokenExpression.number":"#5fb3a1","debugTokenExpression.string":"#89ddff","debugTokenExpression.value":"#a6accd99","debugToolBar.background":"#303340","debugView.exceptionLabelBackground":"#d0679d","debugView.exceptionLabelForeground":"#e4f0fb","debugView.stateLabelBackground":"#303340","debugView.stateLabelForeground":"#a6accd","debugView.valueChangedHighlight":"#89ddff","descriptionForeground":"#a6accdb3","diffEditor.diagonalFill":"#a6accd33","diffEditor.insertedTextBackground":"#50647715","diffEditor.removedTextBackground":"#d0679d20","dropdown.background":"#1b1e28","dropdown.border":"#ffffff10","dropdown.foreground":"#e4f0fb","editor.background":"#1b1e28","editor.findMatchBackground":"#ADD7FF40","editor.findMatchBorder":"#ADD7FF","editor.findMatchHighlightBackground":"#ADD7FF40","editor.findRangeHighlightBackground":"#ADD7FF40","editor.focusedStackFrameHighlightBackground":"#7abd7a4d","editor.foldBackground":"#717cb40b","editor.foreground":"#a6accd","editor.hoverHighlightBackground":"#264f7840","editor.inactiveSelectionBackground":"#717cb425","editor.lineHighlightBackground":"#717cb425","editor.lineHighlightBorder":"#00000000","editor.linkedEditingBackground":"#d0679d4d","editor.rangeHighlightBackground":"#ffffff0b","editor.selectionBackground":"#717cb425","editor.selectionHighlightBackground":"#00000000","editor.selectionHighlightBorder":"#ADD7FF80","editor.snippetFinalTabstopHighlightBorder":"#525252","editor.snippetTabstopHighlightBackground":"#7c7c7c4d","editor.stackFrameHighlightBackground":"#ffff0033","editor.symbolHighlightBackground":"#89ddff60","editor.wordHighlightBackground":"#ADD7FF20","editor.wordHighlightStrongBackground":"#ADD7FF40","editorBracketMatch.background":"#00000000","editorBracketMatch.border":"#e4f0fb40","editorCodeLens.foreground":"#a6accd","editorCursor.foreground":"#a6accd","editorError.foreground":"#d0679d","editorGroup.border":"#00000030","editorGroup.dropBackground":"#7390AA80","editorGroupHeader.noTabsBackground":"#1b1e28","editorGroupHeader.tabsBackground":"#1b1e28","editorGutter.addedBackground":"#5fb3a140","editorGutter.background":"#1b1e28","editorGutter.commentRangeForeground":"#a6accd","editorGutter.deletedBackground":"#d0679d40","editorGutter.foldingControlForeground":"#a6accd","editorGutter.modifiedBackground":"#ADD7FF20","editorHint.foreground":"#7390AAb3","editorHoverWidget.background":"#1b1e28","editorHoverWidget.border":"#ffffff10","editorHoverWidget.foreground":"#a6accd","editorHoverWidget.statusBarBackground":"#202430","editorIndentGuide.activeBackground":"#e3e4e229","editorIndentGuide.background":"#303340","editorInfo.foreground":"#ADD7FF","editorInlineHint.background":"#a6accd","editorInlineHint.foreground":"#1b1e28","editorLightBulb.foreground":"#fffac2","editorLightBulbAutoFix.foreground":"#ADD7FF","editorLineNumber.activeForeground":"#a6accd","editorLineNumber.foreground":"#767c9d50","editorLink.activeForeground":"#ADD7FF","editorMarkerNavigation.background":"#2d2d30","editorMarkerNavigationError.background":"#d0679d","editorMarkerNavigationInfo.background":"#ADD7FF","editorMarkerNavigationWarning.background":"#fffac2","editorOverviewRuler.addedForeground":"#5fb3a199","editorOverviewRuler.border":"#00000000","editorOverviewRuler.bracketMatchForeground":"#a0a0a0","editorOverviewRuler.commonContentForeground":"#a6accd66","editorOverviewRuler.currentContentForeground":"#5fb3a180","editorOverviewRuler.deletedForeground":"#d0679d99","editorOverviewRuler.errorForeground":"#d0679db3","editorOverviewRuler.findMatchForeground":"#e4f0fb20","editorOverviewRuler.incomingContentForeground":"#89ddff80","editorOverviewRuler.infoForeground":"#ADD7FF","editorOverviewRuler.modifiedForeground":"#89ddff99","editorOverviewRuler.rangeHighlightForeground":"#89ddff99","editorOverviewRuler.selectionHighlightForeground":"#a0a0a0cc","editorOverviewRuler.warningForeground":"#fffac2","editorOverviewRuler.wordHighlightForeground":"#a0a0a0cc","editorOverviewRuler.wordHighlightStrongForeground":"#89ddffcc","editorPane.background":"#1b1e28","editorRuler.foreground":"#e4f0fb10","editorSuggestWidget.background":"#1b1e28","editorSuggestWidget.border":"#ffffff10","editorSuggestWidget.foreground":"#a6accd","editorSuggestWidget.highlightForeground":"#5DE4c7","editorSuggestWidget.selectedBackground":"#00000050","editorUnnecessaryCode.opacity":"#000000aa","editorWarning.foreground":"#fffac2","editorWhitespace.foreground":"#303340","editorWidget.background":"#1b1e28","editorWidget.border":"#a6accd","editorWidget.foreground":"#a6accd","errorForeground":"#d0679d","extensionBadge.remoteBackground":"#303340","extensionBadge.remoteForeground":"#e4f0fb","extensionButton.prominentBackground":"#30334090","extensionButton.prominentForeground":"#ffffff","extensionButton.prominentHoverBackground":"#303340","extensionIcon.starForeground":"#fffac2","focusBorder":"#00000000","foreground":"#a6accd","gitDecoration.addedResourceForeground":"#5fb3a1","gitDecoration.conflictingResourceForeground":"#d0679d","gitDecoration.deletedResourceForeground":"#d0679d","gitDecoration.ignoredResourceForeground":"#767c9d70","gitDecoration.modifiedResourceForeground":"#ADD7FF","gitDecoration.renamedResourceForeground":"#5DE4c7","gitDecoration.stageDeletedResourceForeground":"#d0679d","gitDecoration.stageModifiedResourceForeground":"#ADD7FF","gitDecoration.submoduleResourceForeground":"#89ddff","gitDecoration.untrackedResourceForeground":"#5DE4c7","icon.foreground":"#a6accd","imagePreview.border":"#303340","input.background":"#ffffff05","input.border":"#ffffff10","input.foreground":"#e4f0fb","input.placeholderForeground":"#a6accd60","inputOption.activeBackground":"#00000000","inputOption.activeBorder":"#00000000","inputOption.activeForeground":"#ffffff","inputValidation.errorBackground":"#1b1e28","inputValidation.errorBorder":"#d0679d","inputValidation.errorForeground":"#d0679d","inputValidation.infoBackground":"#506477","inputValidation.infoBorder":"#89ddff","inputValidation.warningBackground":"#506477","inputValidation.warningBorder":"#fffac2","list.activeSelectionBackground":"#30334080","list.activeSelectionForeground":"#e4f0fb","list.deemphasizedForeground":"#767c9d","list.dropBackground":"#506477","list.errorForeground":"#d0679d","list.filterMatchBackground":"#89ddff60","list.focusBackground":"#30334080","list.focusForeground":"#a6accd","list.focusOutline":"#00000000","list.highlightForeground":"#5fb3a1","list.hoverBackground":"#30334080","list.hoverForeground":"#e4f0fb","list.inactiveSelectionBackground":"#30334080","list.inactiveSelectionForeground":"#e4f0fb","list.invalidItemForeground":"#fffac2","list.warningForeground":"#fffac2","listFilterWidget.background":"#303340","listFilterWidget.noMatchesOutline":"#d0679d","listFilterWidget.outline":"#00000000","menu.background":"#1b1e28","menu.foreground":"#e4f0fb","menu.selectionBackground":"#303340","menu.selectionForeground":"#7390AA","menu.separatorBackground":"#767c9d","menubar.selectionBackground":"#717cb425","menubar.selectionForeground":"#a6accd","merge.commonContentBackground":"#a6accd29","merge.commonHeaderBackground":"#a6accd66","merge.currentContentBackground":"#5fb3a133","merge.currentHeaderBackground":"#5fb3a180","merge.incomingContentBackground":"#89ddff33","merge.incomingHeaderBackground":"#89ddff80","minimap.errorHighlight":"#d0679d","minimap.findMatchHighlight":"#ADD7FF","minimap.selectionHighlight":"#e4f0fb40","minimap.warningHighlight":"#fffac2","minimapGutter.addedBackground":"#5fb3a180","minimapGutter.deletedBackground":"#d0679d80","minimapGutter.modifiedBackground":"#ADD7FF80","minimapSlider.activeBackground":"#a6accd30","minimapSlider.background":"#a6accd20","minimapSlider.hoverBackground":"#a6accd30","notebook.cellBorderColor":"#1b1e28","notebook.cellInsertionIndicator":"#00000000","notebook.cellStatusBarItemHoverBackground":"#ffffff26","notebook.cellToolbarSeparator":"#303340","notebook.focusedCellBorder":"#00000000","notebook.focusedEditorBorder":"#00000000","notebook.focusedRowBorder":"#00000000","notebook.inactiveFocusedCellBorder":"#00000000","notebook.outputContainerBackgroundColor":"#1b1e28","notebook.rowHoverBackground":"#30334000","notebook.selectedCellBackground":"#303340","notebook.selectedCellBorder":"#1b1e28","notebook.symbolHighlightBackground":"#ffffff0b","notebookScrollbarSlider.activeBackground":"#a6accd25","notebookScrollbarSlider.background":"#00000050","notebookScrollbarSlider.hoverBackground":"#a6accd25","notebookStatusErrorIcon.foreground":"#d0679d","notebookStatusRunningIcon.foreground":"#a6accd","notebookStatusSuccessIcon.foreground":"#5fb3a1","notificationCenterHeader.background":"#303340","notificationLink.foreground":"#ADD7FF","notifications.background":"#1b1e28","notifications.border":"#303340","notifications.foreground":"#e4f0fb","notificationsErrorIcon.foreground":"#d0679d","notificationsInfoIcon.foreground":"#ADD7FF","notificationsWarningIcon.foreground":"#fffac2","panel.background":"#1b1e28","panel.border":"#00000030","panel.dropBorder":"#a6accd","panelSection.border":"#1b1e28","panelSection.dropBackground":"#7390AA80","panelSectionHeader.background":"#303340","panelTitle.activeBorder":"#a6accd","panelTitle.activeForeground":"#a6accd","panelTitle.inactiveForeground":"#a6accd99","peekView.border":"#00000030","peekViewEditor.background":"#a6accd05","peekViewEditor.matchHighlightBackground":"#303340","peekViewEditorGutter.background":"#a6accd05","peekViewResult.background":"#a6accd05","peekViewResult.fileForeground":"#ffffff","peekViewResult.lineForeground":"#a6accd","peekViewResult.matchHighlightBackground":"#303340","peekViewResult.selectionBackground":"#717cb425","peekViewResult.selectionForeground":"#ffffff","peekViewTitle.background":"#a6accd05","peekViewTitleDescription.foreground":"#a6accd60","peekViewTitleLabel.foreground":"#ffffff","pickerGroup.border":"#a6accd","pickerGroup.foreground":"#89ddff","problemsErrorIcon.foreground":"#d0679d","problemsInfoIcon.foreground":"#ADD7FF","problemsWarningIcon.foreground":"#fffac2","progressBar.background":"#89ddff","quickInput.background":"#1b1e28","quickInput.foreground":"#a6accd","quickInputList.focusBackground":"#a6accd10","quickInputTitle.background":"#ffffff1b","sash.hoverBorder":"#00000000","scm.providerBorder":"#e4f0fb10","scrollbar.shadow":"#00000000","scrollbarSlider.activeBackground":"#a6accd25","scrollbarSlider.background":"#00000080","scrollbarSlider.hoverBackground":"#a6accd25","searchEditor.findMatchBackground":"#ADD7FF50","searchEditor.textInputBorder":"#ffffff10","selection.background":"#a6accd","settings.checkboxBackground":"#1b1e28","settings.checkboxBorder":"#ffffff10","settings.checkboxForeground":"#e4f0fb","settings.dropdownBackground":"#1b1e28","settings.dropdownBorder":"#ffffff10","settings.dropdownForeground":"#e4f0fb","settings.dropdownListBorder":"#e4f0fb10","settings.focusedRowBackground":"#00000000","settings.headerForeground":"#e4f0fb","settings.modifiedItemIndicator":"#ADD7FF","settings.numberInputBackground":"#ffffff05","settings.numberInputBorder":"#ffffff10","settings.numberInputForeground":"#e4f0fb","settings.textInputBackground":"#ffffff05","settings.textInputBorder":"#ffffff10","settings.textInputForeground":"#e4f0fb","sideBar.background":"#1b1e28","sideBar.dropBackground":"#7390AA80","sideBar.foreground":"#767c9d","sideBarSectionHeader.background":"#1b1e28","sideBarSectionHeader.foreground":"#a6accd","sideBarTitle.foreground":"#a6accd","statusBar.background":"#1b1e28","statusBar.debuggingBackground":"#303340","statusBar.debuggingForeground":"#ffffff","statusBar.foreground":"#a6accd","statusBar.noFolderBackground":"#1b1e28","statusBar.noFolderForeground":"#a6accd","statusBarItem.activeBackground":"#ffffff2e","statusBarItem.errorBackground":"#d0679d","statusBarItem.errorForeground":"#ffffff","statusBarItem.hoverBackground":"#ffffff1f","statusBarItem.prominentBackground":"#00000080","statusBarItem.prominentForeground":"#a6accd","statusBarItem.prominentHoverBackground":"#0000004d","statusBarItem.remoteBackground":"#303340","statusBarItem.remoteForeground":"#e4f0fb","symbolIcon.arrayForeground":"#a6accd","symbolIcon.booleanForeground":"#a6accd","symbolIcon.classForeground":"#fffac2","symbolIcon.colorForeground":"#a6accd","symbolIcon.constantForeground":"#a6accd","symbolIcon.constructorForeground":"#f087bd","symbolIcon.enumeratorForeground":"#fffac2","symbolIcon.enumeratorMemberForeground":"#ADD7FF","symbolIcon.eventForeground":"#fffac2","symbolIcon.fieldForeground":"#ADD7FF","symbolIcon.fileForeground":"#a6accd","symbolIcon.folderForeground":"#a6accd","symbolIcon.functionForeground":"#f087bd","symbolIcon.interfaceForeground":"#ADD7FF","symbolIcon.keyForeground":"#a6accd","symbolIcon.keywordForeground":"#a6accd","symbolIcon.methodForeground":"#f087bd","symbolIcon.moduleForeground":"#a6accd","symbolIcon.namespaceForeground":"#a6accd","symbolIcon.nullForeground":"#a6accd","symbolIcon.numberForeground":"#a6accd","symbolIcon.objectForeground":"#a6accd","symbolIcon.operatorForeground":"#a6accd","symbolIcon.packageForeground":"#a6accd","symbolIcon.propertyForeground":"#a6accd","symbolIcon.referenceForeground":"#a6accd","symbolIcon.snippetForeground":"#a6accd","symbolIcon.stringForeground":"#a6accd","symbolIcon.structForeground":"#a6accd","symbolIcon.textForeground":"#a6accd","symbolIcon.typeParameterForeground":"#a6accd","symbolIcon.unitForeground":"#a6accd","symbolIcon.variableForeground":"#ADD7FF","tab.activeBackground":"#30334080","tab.activeForeground":"#e4f0fb","tab.activeModifiedBorder":"#ADD7FF","tab.border":"#00000000","tab.inactiveBackground":"#1b1e28","tab.inactiveForeground":"#767c9d","tab.inactiveModifiedBorder":"#ADD7FF80","tab.lastPinnedBorder":"#00000000","tab.unfocusedActiveBackground":"#1b1e28","tab.unfocusedActiveForeground":"#a6accd","tab.unfocusedActiveModifiedBorder":"#ADD7FF40","tab.unfocusedInactiveBackground":"#1b1e28","tab.unfocusedInactiveForeground":"#a6accd80","tab.unfocusedInactiveModifiedBorder":"#ADD7FF40","terminal.ansiBlack":"#1b1e28","terminal.ansiBlue":"#89ddff","terminal.ansiBrightBlack":"#a6accd","terminal.ansiBrightBlue":"#ADD7FF","terminal.ansiBrightCyan":"#ADD7FF","terminal.ansiBrightGreen":"#5DE4c7","terminal.ansiBrightMagenta":"#f087bd","terminal.ansiBrightRed":"#d0679d","terminal.ansiBrightWhite":"#ffffff","terminal.ansiBrightYellow":"#fffac2","terminal.ansiCyan":"#89ddff","terminal.ansiGreen":"#5DE4c7","terminal.ansiMagenta":"#f087bd","terminal.ansiRed":"#d0679d","terminal.ansiWhite":"#ffffff","terminal.ansiYellow":"#fffac2","terminal.border":"#00000000","terminal.foreground":"#a6accd","terminal.selectionBackground":"#717cb425","terminalCommandDecoration.defaultBackground":"#767c9d","terminalCommandDecoration.errorBackground":"#d0679d","terminalCommandDecoration.successBackground":"#5DE4c7","testing.iconErrored":"#d0679d","testing.iconFailed":"#d0679d","testing.iconPassed":"#5DE4c7","testing.iconQueued":"#fffac2","testing.iconSkipped":"#7390AA","testing.iconUnset":"#7390AA","testing.message.error.decorationForeground":"#d0679d","testing.message.error.lineBackground":"#d0679d33","testing.message.hint.decorationForeground":"#7390AAb3","testing.message.info.decorationForeground":"#ADD7FF","testing.message.info.lineBackground":"#89ddff33","testing.message.warning.decorationForeground":"#fffac2","testing.message.warning.lineBackground":"#fffac233","testing.peekBorder":"#d0679d","testing.runAction":"#5DE4c7","textBlockQuote.background":"#7390AA1a","textBlockQuote.border":"#89ddff80","textCodeBlock.background":"#00000050","textLink.activeForeground":"#ADD7FF","textLink.foreground":"#ADD7FF","textPreformat.foreground":"#e4f0fb","textSeparator.foreground":"#ffffff2e","titleBar.activeBackground":"#1b1e28","titleBar.activeForeground":"#a6accd","titleBar.inactiveBackground":"#1b1e28","titleBar.inactiveForeground":"#767c9d","tree.indentGuidesStroke":"#303340","tree.tableColumnsBorder":"#a6accd20","welcomePage.progress.background":"#ffffff05","welcomePage.progress.foreground":"#5fb3a1","welcomePage.tileBackground":"#1b1e28","welcomePage.tileHoverBackground":"#303340","widget.shadow":"#00000030"},"displayName":"Poimandres","name":"poimandres","tokenColors":[{"scope":["comment","punctuation.definition.comment"],"settings":{"fontStyle":"italic","foreground":"#767c9dB0"}},{"scope":"meta.parameters comment.block","settings":{"fontStyle":"italic","foreground":"#a6accd"}},{"scope":["variable.other.constant.object","variable.other.readwrite.alias","meta.import variable.other.readwrite"],"settings":{"foreground":"#ADD7FF"}},{"scope":["variable.other","support.type.object"],"settings":{"foreground":"#e4f0fb"}},{"scope":["variable.other.object.property","variable.other.property","support.variable.property"],"settings":{"foreground":"#e4f0fb"}},{"scope":["entity.name.function.method","string.unquoted","meta.object.member"],"settings":{"foreground":"#ADD7FF"}},{"scope":["variable - meta.import","constant.other.placeholder","meta.object-literal.key-meta.object.member"],"settings":{"foreground":"#e4f0fb"}},{"scope":["keyword.control.flow"],"settings":{"foreground":"#5DE4c7c0"}},{"scope":["keyword.operator.new","keyword.control.new"],"settings":{"foreground":"#5DE4c7"}},{"scope":["variable.language.this","storage.modifier.async","storage.modifier","variable.language.super"],"settings":{"foreground":"#5DE4c7"}},{"scope":["support.class.error","keyword.control.trycatch","keyword.operator.expression.delete","keyword.operator.expression.void","keyword.operator.void","keyword.operator.delete","constant.language.null","constant.language.boolean.false","constant.language.undefined"],"settings":{"foreground":"#d0679d"}},{"scope":["variable.parameter","variable.other.readwrite.js","meta.definition.variable variable.other.constant","meta.definition.variable variable.other.readwrite"],"settings":{"foreground":"#e4f0fb"}},{"scope":["constant.other.color"],"settings":{"foreground":"#ffffff"}},{"scope":["invalid","invalid.illegal"],"settings":{"foreground":"#d0679d"}},{"scope":["invalid.deprecated"],"settings":{"foreground":"#d0679d"}},{"scope":["keyword.control","keyword"],"settings":{"foreground":"#a6accd"}},{"scope":["keyword.operator","storage.type"],"settings":{"foreground":"#91B4D5"}},{"scope":["keyword.control.module","keyword.control.import","keyword.control.export","keyword.control.default","meta.import","meta.export"],"settings":{"foreground":"#5DE4c7"}},{"scope":["Keyword","Storage"],"settings":{"fontStyle":"italic"}},{"scope":["keyword-meta.export"],"settings":{"foreground":"#ADD7FF"}},{"scope":["meta.brace","punctuation","keyword.operator.existential"],"settings":{"foreground":"#a6accd"}},{"scope":["constant.other.color","meta.tag","punctuation.definition.tag","punctuation.separator.inheritance.php","punctuation.definition.tag.html","punctuation.definition.tag.begin.html","punctuation.definition.tag.end.html","punctuation.section.embedded","keyword.other.template","keyword.other.substitution","meta.objectliteral"],"settings":{"foreground":"#e4f0fb"}},{"scope":["support.class.component"],"settings":{"foreground":"#5DE4c7"}},{"scope":["entity.name.tag","entity.name.tag","meta.tag.sgml","markup.deleted.git_gutter"],"settings":{"foreground":"#5DE4c7"}},{"scope":"variable.function, source meta.function-call entity.name.function, source meta.function-call entity.name.function, source meta.method-call entity.name.function, meta.class meta.group.braces.curly meta.function-call variable.function, meta.class meta.field.declaration meta.function-call entity.name.function, variable.function.constructor, meta.block meta.var.expr meta.function-call entity.name.function, support.function.console, meta.function-call support.function, meta.property.class variable.other.class, punctuation.definition.entity.css","settings":{"foreground":"#e4f0fbd0"}},{"scope":"entity.name.function, meta.class entity.name.class, meta.class entity.name.type.class, meta.class meta.function-call variable.function, keyword.other.important","settings":{"foreground":"#ADD7FF"}},{"scope":["source.cpp meta.block variable.other"],"settings":{"foreground":"#ADD7FF"}},{"scope":["support.other.variable","string.other.link"],"settings":{"foreground":"#5DE4c7"}},{"scope":["constant.numeric","support.constant","constant.character","constant.escape","keyword.other.unit","keyword.other","string","constant.language","constant.other.symbol","constant.other.key","markup.heading","markup.inserted.git_gutter","meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js","text.html.derivative"],"settings":{"foreground":"#5DE4c7"}},{"scope":["entity.other.inherited-class"],"settings":{"foreground":"#ADD7FF"}},{"scope":["meta.type.declaration"],"settings":{"foreground":"#ADD7FF"}},{"scope":["entity.name.type.alias"],"settings":{"foreground":"#a6accd"}},{"scope":["keyword.control.as","entity.name.type","support.type"],"settings":{"foreground":"#a6accdC0"}},{"scope":["entity.name","support.orther.namespace.use.php","meta.use.php","support.other.namespace.php","markup.changed.git_gutter","support.type.sys-types"],"settings":{"foreground":"#91B4D5"}},{"scope":["support.class","support.constant","variable.other.constant.object"],"settings":{"foreground":"#ADD7FF"}},{"scope":["source.css support.type.property-name","source.sass support.type.property-name","source.scss support.type.property-name","source.less support.type.property-name","source.stylus support.type.property-name","source.postcss support.type.property-name"],"settings":{"foreground":"#ADD7FF"}},{"scope":["entity.name.module.js","variable.import.parameter.js","variable.other.class.js"],"settings":{"foreground":"#e4f0fb"}},{"scope":["variable.language"],"settings":{"fontStyle":"italic","foreground":"#ADD7FF"}},{"scope":["entity.name.method.js"],"settings":{"fontStyle":"italic","foreground":"#91B4D5"}},{"scope":["meta.class-method.js entity.name.function.js","variable.function.constructor"],"settings":{"foreground":"#91B4D5"}},{"scope":["entity.other.attribute-name"],"settings":{"fontStyle":"italic","foreground":"#91B4D5"}},{"scope":["text.html.basic entity.other.attribute-name.html","text.html.basic entity.other.attribute-name"],"settings":{"fontStyle":"italic","foreground":"#5fb3a1"}},{"scope":["entity.other.attribute-name.class"],"settings":{"foreground":"#5fb3a1"}},{"scope":["source.sass keyword.control"],"settings":{"foreground":"#42675A"}},{"scope":["markup.inserted"],"settings":{"foreground":"#ADD7FF"}},{"scope":["markup.deleted"],"settings":{"foreground":"#506477"}},{"scope":["markup.changed"],"settings":{"foreground":"#91B4D5"}},{"scope":["string.regexp"],"settings":{"foreground":"#5fb3a1"}},{"scope":["constant.character.escape"],"settings":{"foreground":"#5fb3a1"}},{"scope":["*url*","*link*","*uri*"],"settings":{"fontStyle":"underline","foreground":"#ADD7FF"}},{"scope":["tag.decorator.js entity.name.tag.js","tag.decorator.js punctuation.definition.tag.js"],"settings":{"fontStyle":"italic","foreground":"#42675A"}},{"scope":["source.js constant.other.object.key.js string.unquoted.label.js"],"settings":{"fontStyle":"italic","foreground":"#5fb3a1"}},{"scope":["source.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#e4f0fb"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#ADD7FF"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#91B4D5"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#7390AA"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#e4f0fb"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#ADD7FF"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#91B4D5"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#7390AA"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#e4f0fb"}},{"scope":["text.html.markdown","punctuation.definition.list_item.markdown"],"settings":{"foreground":"#e4f0fb"}},{"scope":["text.html.markdown markup.inline.raw.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown"],"settings":{"foreground":"#91B4D5"}},{"scope":["markdown.heading","markup.heading | markup.heading entity.name","markup.heading.markdown punctuation.definition.heading.markdown"],"settings":{"foreground":"#e4f0fb"}},{"scope":["markup.italic"],"settings":{"fontStyle":"italic","foreground":"#7390AA"}},{"scope":["markup.bold","markup.bold string"],"settings":{"fontStyle":"bold","foreground":"#7390AA"}},{"scope":["markup.bold markup.italic","markup.italic markup.bold","markup.quote markup.bold","markup.bold markup.italic string","markup.italic markup.bold string","markup.quote markup.bold string"],"settings":{"fontStyle":"bold","foreground":"#7390AA"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline","foreground":"#7390AA"}},{"scope":["markup.strike"],"settings":{"fontStyle":"italic"}},{"scope":["markup.quote punctuation.definition.blockquote.markdown"],"settings":{"foreground":"#5DE4c7"}},{"scope":["markup.quote"],"settings":{"fontStyle":"italic"}},{"scope":["string.other.link.title.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["string.other.link.description.title.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["constant.other.reference.link.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["markup.raw.block"],"settings":{"foreground":"#ADD7FF"}},{"scope":["markup.raw.block.fenced.markdown"],"settings":{"foreground":"#50647750"}},{"scope":["punctuation.definition.fenced.markdown"],"settings":{"foreground":"#50647750"}},{"scope":["markup.raw.block.fenced.markdown","variable.language.fenced.markdown","punctuation.section.class.end"],"settings":{"foreground":"#91B4D5"}},{"scope":["variable.language.fenced.markdown"],"settings":{"foreground":"#91B4D5"}},{"scope":["meta.separator"],"settings":{"fontStyle":"bold","foreground":"#7390AA"}},{"scope":["markup.table"],"settings":{"foreground":"#ADD7FF"}},{"scope":"token.info-token","settings":{"foreground":"#89ddff"}},{"scope":"token.warn-token","settings":{"foreground":"#fffac2"}},{"scope":"token.error-token","settings":{"foreground":"#d0679d"}},{"scope":"token.debug-token","settings":{"foreground":"#e4f0fb"}},{"scope":["entity.name.section.markdown","markup.heading.setext.1.markdown","markup.heading.setext.2.markdown"],"settings":{"fontStyle":"bold","foreground":"#e4f0fb"}},{"scope":"meta.paragraph.markdown","settings":{"foreground":"#e4f0fbd0"}},{"scope":["punctuation.definition.from-file.diff","meta.diff.header.from-file"],"settings":{"foreground":"#506477"}},{"scope":"markup.inline.raw.string.markdown","settings":{"foreground":"#7390AA"}},{"scope":"meta.separator.markdown","settings":{"foreground":"#767c9d"}},{"scope":"markup.bold.markdown","settings":{"fontStyle":"bold"}},{"scope":"markup.italic.markdown","settings":{"fontStyle":"italic"}},{"scope":["beginning.punctuation.definition.list.markdown","punctuation.definition.list.begin.markdown","markup.list.unnumbered.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["string.other.link.description.title.markdown punctuation.definition.string.markdown","meta.link.inline.markdown string.other.link.description.title.markdown","string.other.link.description.title.markdown punctuation.definition.string.begin.markdown","string.other.link.description.title.markdown punctuation.definition.string.end.markdown","meta.image.inline.markdown string.other.link.description.title.markdown"],"settings":{"fontStyle":"","foreground":"#ADD7FF"}},{"scope":["meta.link.inline.markdown string.other.link.title.markdown","meta.link.reference.markdown string.other.link.title.markdown","meta.link.reference.def.markdown markup.underline.link.markdown"],"settings":{"fontStyle":"underline","foreground":"#ADD7FF"}},{"scope":["markup.underline.link.markdown","string.other.link.description.title.markdown"],"settings":{"foreground":"#5DE4c7"}},{"scope":["fenced_code.block.language","markup.inline.raw.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["punctuation.definition.markdown","punctuation.definition.raw.markdown","punctuation.definition.heading.markdown","punctuation.definition.bold.markdown","punctuation.definition.italic.markdown"],"settings":{"foreground":"#ADD7FF"}},{"scope":["source.ignore","log.error","log.exception"],"settings":{"foreground":"#d0679d"}},{"scope":["log.verbose"],"settings":{"foreground":"#a6accd"}}],"type":"dark"}`));export{e as default};
|