zframes 0.5.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +735 -9
- package/package.json +5 -5
- package/runtime/assets/{bitcoin-dominance-CxfMBVwW.js → bitcoin-dominance-rskkp4h2.js} +1 -1
- package/runtime/assets/{breakeven-BrpmE2y2.js → breakeven-DyCA3ya5.js} +1 -1
- package/runtime/assets/{breathing-Bjv7D86F.js → breathing-C8Y-Izs8.js} +1 -1
- package/runtime/assets/{btc-blocks-Cy-YFeqC.js → btc-blocks-BxS4aEAB.js} +1 -1
- package/runtime/assets/{btc-difficulty-CQ_30M6B.js → btc-difficulty-CNFxEiPh.js} +1 -1
- package/runtime/assets/{btc-fees-DsYgskwn.js → btc-fees-Db-5JKh9.js} +1 -1
- package/runtime/assets/{btc-hashrate-C0dYT_WJ.js → btc-hashrate-Dy2c30Gb.js} +1 -1
- package/runtime/assets/{btc-mempool-DipekM7O.js → btc-mempool-DFgUVk8y.js} +1 -1
- package/runtime/assets/{calculator-zC8onHXp.js → calculator-v01_FkZv.js} +1 -1
- package/runtime/assets/chain-activity-CuA1eiPY.js +1 -0
- package/runtime/assets/{chart-utils-BYIZMM9J.js → chart-utils-Ct7WziT9.js} +1 -1
- package/runtime/assets/{checklist-baxMKxEm.js → checklist-Be_y1aTE.js} +1 -1
- package/runtime/assets/{clock-x9v1tYQm.js → clock-BWFux5om.js} +1 -1
- package/runtime/assets/{coin-movers-fIxzBuhy.js → coin-movers-BcXfoFc6.js} +1 -1
- package/runtime/assets/{countdown-BlyeM771.js → countdown-CXSOeUWD.js} +1 -1
- package/runtime/assets/cycle-shared-pyXzkgt1.js +1 -0
- package/runtime/assets/cycle-signals-BrKJX2c6.js +1 -0
- package/runtime/assets/{d3-xK4fOkBU.js → d3-Dr3MHXm3.js} +1 -1
- package/runtime/assets/{daily-analysis-DxjxE53t.js → daily-analysis-CWluVygw.js} +1 -1
- package/runtime/assets/{day-meter-9YEIbKbk.js → day-meter-Bi5OZCC4.js} +1 -1
- package/runtime/assets/defi-revenue-CFNSNfG7.js +1 -0
- package/runtime/assets/dex-hot-pools-C4TrRB17.js +1 -0
- package/runtime/assets/dex-pool-treemap-DqvlN1Jo.js +1 -0
- package/runtime/assets/{dex-volume-chart-CIN2oKpJ.js → dex-volume-chart-BLR-L_B0.js} +1 -1
- package/runtime/assets/{dex-volume-treemap-CqHdMsnd.js → dex-volume-treemap-qyEBx4ll.js} +1 -1
- package/runtime/assets/{dice-DnddcY-J.js → dice-CuzcQipj.js} +1 -1
- package/runtime/assets/{dino-game-D6AH1SSj.js → dino-game-CiGWzsag.js} +1 -1
- package/runtime/assets/{divider-Bu8aGlm1.js → divider-DvK5oM9v.js} +1 -1
- package/runtime/assets/{drawdy-BhOQeakE.js → drawdy-Bxr7eJ-7.js} +1 -1
- package/runtime/assets/dxy-CVbZmRsT.js +1 -0
- package/runtime/assets/editor-CQM8mtD8.css +1 -0
- package/runtime/assets/editor-EOEtB4_n.js +68 -0
- package/runtime/assets/etf-flows-Cl1WliDl.js +1 -0
- package/runtime/assets/etf-flows-chart-B4Im9TVy.js +1 -0
- package/runtime/assets/eth-staking-_q2b8DEx.js +1 -0
- package/runtime/assets/eth-supply-55OpYYBL.js +1 -0
- package/runtime/assets/{fear-greed-i87oWLnT.js → fear-greed-CywOCckQ.js} +1 -1
- package/runtime/assets/{filings-feed-Cxg9eG9S.js → filings-feed-CosEi4NL.js} +1 -1
- package/runtime/assets/{financial-stress-Bv_reW65.js → financial-stress-DBCae4TA.js} +1 -1
- package/runtime/assets/{flappy-bird-BENHBDEL.js → flappy-bird-CBVgwfgX.js} +1 -1
- package/runtime/assets/{fundamentals-AlhngJ8G.js → fundamentals-zRwGUcmb.js} +1 -1
- package/runtime/assets/funding-comparison-wCNoCb1H.js +1 -0
- package/runtime/assets/{funding-heatmap-B4RGXX4K.js → funding-heatmap-a4zdnKi9.js} +1 -1
- package/runtime/assets/{funding-rate-chart-Cg6gi0YC.js → funding-rate-chart-Da9WMKyJ.js} +1 -1
- package/runtime/assets/{fx-board-BqGsP0Xx.js → fx-board-CxhwDBHO.js} +1 -1
- package/runtime/assets/{heading-Dr7Q6vy_.js → heading-b5H33lig.js} +1 -1
- package/runtime/assets/{holiday-calendar-C1fruUVL.js → holiday-calendar-C77t3m6c.js} +1 -1
- package/runtime/assets/{image-BulRsYTV.js → image-C8ZSUHEx.js} +1 -1
- package/runtime/assets/{index-XGtH5pVY.css → index-BXLwJuoo.css} +1 -1
- package/runtime/assets/index-C-VdMqKb.css +1 -0
- package/runtime/assets/index-DKixdHYB.js +1 -0
- package/runtime/assets/index-kB-TyxKi.js +1073 -0
- package/runtime/assets/indicators-CogwjDn9.js +1 -0
- package/runtime/assets/{inflation-pulse-Q-3bZn55.js → inflation-pulse-CoXcuabd.js} +1 -1
- package/runtime/assets/{journal-log-FuAPC6JH.js → journal-log-BDu39CBE.js} +1 -1
- package/runtime/assets/{journal-open-BREaG6Cs.js → journal-open-FejLOzlA.js} +1 -1
- package/runtime/assets/{journal-results-Y_pKQcgg.js → journal-results-CtKy6MZM.js} +1 -1
- package/runtime/assets/{journal-score-ZATtCKrj.js → journal-score-Bd7IDYl4.js} +1 -1
- package/runtime/assets/{journal-ui-C_1ADbUX.js → journal-ui-C_htu3aM.js} +1 -1
- package/runtime/assets/{labor-market-DVybIeSN.js → labor-market-DR0j05Gy.js} +1 -1
- package/runtime/assets/{lightning-stats-ByvWkKyP.js → lightning-stats-botYMCIX.js} +1 -1
- package/runtime/assets/{link-grid-CJC48i5r.js → link-grid-DFuD6XVK.js} +1 -1
- package/runtime/assets/ma-multiplier-s6ix-kL8.js +1 -0
- package/runtime/assets/macro-calendar-Dhnx2n5Q.js +1 -0
- package/runtime/assets/{market-cap-treemap-CpnOP_gY.js → market-cap-treemap-BWtivvac.js} +1 -1
- package/runtime/assets/{market-hours-B9zPCvQk.js → market-hours-wSrW5Elv.js} +1 -1
- package/runtime/assets/{marquee-D8GTgVmy.js → marquee-NHBiLJUk.js} +1 -1
- package/runtime/assets/mayer-multiple-CZC5q6ra.js +1 -0
- package/runtime/assets/{mini-line-chart-CHM5UBjJ.js → mini-line-chart-QWeuTPfP.js} +1 -1
- package/runtime/assets/{mining-pools-DiyEBr6a.js → mining-pools-BxipfJmv.js} +1 -1
- package/runtime/assets/{mover-row-CO2STKkw.js → mover-row-CUd1i2yt.js} +1 -1
- package/runtime/assets/mvrv-BIwCiyRN.js +1 -0
- package/runtime/assets/{national-debt-CcTydivP.js → national-debt-DwC5azy3.js} +1 -1
- package/runtime/assets/{news-feed-D4xS-sLD.js → news-feed-BhAsJ6gt.js} +1 -1
- package/runtime/assets/nft-collections-sD-yDfKU.js +1 -0
- package/runtime/assets/nft-treemap-Bqhk41Of.js +1 -0
- package/runtime/assets/{note-BXsj5NlE.js → note-C1-RPOvR.js} +1 -1
- package/runtime/assets/nupl-U-WHVDJ0.js +1 -0
- package/runtime/assets/{open-interest-DaFRJd2O.js → open-interest-C0_M6MkH.js} +1 -1
- package/runtime/assets/{options-iv-MpSqgS3E.js → options-iv-CIHzBULM.js} +1 -1
- package/runtime/assets/{options-oi-strike-BHF28ASR.js → options-oi-strike-Db8lP27S.js} +1 -1
- package/runtime/assets/{options-put-call-_ZFaepBW.js → options-put-call-5ex7Ablt.js} +1 -1
- package/runtime/assets/pi-cycle-eACZGQhd.js +1 -0
- package/runtime/assets/{pomodoro-CxHVmgqp.js → pomodoro-CaS6y-eQ.js} +1 -1
- package/runtime/assets/portfolio-allocation-NR-4wbGL.js +1 -0
- package/runtime/assets/{portfolio-common-DnESc3oR.js → portfolio-common-Cfpnudvk.js} +1 -1
- package/runtime/assets/{portfolio-holdings-2vYKEk7f.js → portfolio-holdings-D-SG9B5X.js} +1 -1
- package/runtime/assets/{portfolio-value-B-7uIpG4.js → portfolio-value-DPKyirHc.js} +1 -1
- package/runtime/assets/prediction-markets-Cnf0KZba.js +1 -0
- package/runtime/assets/{price-chart-Cx_2scgb.js → price-chart-BEnpZLyb.js} +1 -1
- package/runtime/assets/{price-compare-DQcEOpnr.js → price-compare-8LvkF-xq.js} +1 -1
- package/runtime/assets/{price-liveline-TTo-aOFd.js → price-liveline-DkTeXuC2.js} +1 -1
- package/runtime/assets/{price-ticker-Cp7yYsNm.js → price-ticker-DgDJ3k4b.js} +1 -1
- package/runtime/assets/{protocol-fees-treemap-D-koQrKr.js → protocol-fees-treemap-fvVOfUFt.js} +1 -1
- package/runtime/assets/{protocol-tvl-chart-CDZkrQuF.js → protocol-tvl-chart-BfrszRqq.js} +1 -1
- package/runtime/assets/{protocol-tvl-treemap-I8fjLZU7.js → protocol-tvl-treemap-v5kaQdP4.js} +1 -1
- package/runtime/assets/puell-multiple-BdOLF9Wh.js +1 -0
- package/runtime/assets/{quote-CKEEp9tF.js → quote-slpulzHo.js} +1 -1
- package/runtime/assets/{rates-board-BElUHlYN.js → rates-board-B6hHyiDM.js} +1 -1
- package/runtime/assets/realized-price-dn6bApj-.js +1 -0
- package/runtime/assets/reserve-risk-_07r_h5w.js +1 -0
- package/runtime/assets/{returns-projector-DjIbvas1.js → returns-projector-NBs7iGAV.js} +1 -1
- package/runtime/assets/{risk-reward-pVHqmm_g.js → risk-reward-Baq_TRho.js} +1 -1
- package/runtime/assets/rsi-momentum-B6oTu5W6.js +1 -0
- package/runtime/assets/{rules-card-uMZQ6oP0.js → rules-card-D98hKEwY.js} +1 -1
- package/runtime/assets/sector-performance-DlnYIM-L.js +1 -0
- package/runtime/assets/sector-treemap-C3sX3Q9o.js +1 -0
- package/runtime/assets/{session-progress-Djhvb1G5.js → session-progress-BYwNuuP-.js} +1 -1
- package/runtime/assets/{short-volume-CiBfmCKw.js → short-volume-CxBDSjP6.js} +1 -1
- package/runtime/assets/{snake-CYXVjy8d.js → snake-CGV0Kg4z.js} +1 -1
- package/runtime/assets/sopr-DAn99w9D.js +1 -0
- package/runtime/assets/{spotify-embed-CGYKFOmX.js → spotify-embed-BBfim9vk.js} +1 -1
- package/runtime/assets/stablecoin-chains-D4EKi_YR.js +1 -0
- package/runtime/assets/stablecoin-supply-1m6FGR7-.js +1 -0
- package/runtime/assets/{stopwatch-Cl10sfaX.js → stopwatch-CCqsSaII.js} +1 -1
- package/runtime/assets/{top-movers-vvOomk6S.js → top-movers-CAqBZOUL.js} +1 -1
- package/runtime/assets/{treasury-auctions-JMoATy9T.js → treasury-auctions-Bl19yaM_.js} +1 -1
- package/runtime/assets/{treemap-leaf-DNIoJEK-.js → treemap-leaf-A45Ge4-e.js} +1 -1
- package/runtime/assets/trending-coins-Dm9R9zGQ.js +1 -0
- package/runtime/assets/{tvl-treemap-B28_19EZ.js → tvl-treemap-CSM9ioUr.js} +1 -1
- package/runtime/assets/{utils-DaT-yT0k.js → utils-DxneYyA_.js} +1 -1
- package/runtime/assets/{video-DjiOnvMm.js → video-CkvIGlHg.js} +1 -1
- package/runtime/assets/volume-profile-UJPTgNwV.js +1 -0
- package/runtime/assets/{yield-curve-Dj5vJwI4.js → yield-curve-DlXQg4sl.js} +1 -1
- package/runtime/assets/yield-scanner-Qm88hZuv.js +1 -0
- package/runtime/index.html +2 -2
- package/runtime/assets/editor-BMMobjrE.css +0 -1
- package/runtime/assets/editor-Ca-voh3h.js +0 -68
- package/runtime/assets/index-BgSQpj_B.js +0 -936
- package/runtime/assets/index-BqHx9BjX.css +0 -1
- package/runtime/assets/index-DK7jWlTL.js +0 -1
- package/runtime/assets/portfolio-allocation-Cf251dcH.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zf-editor{--zf-accent: hsl(var(--zf-accent-hue, 242) var(--zf-accent-sat, 90%) 76%);--font-dmsans: var(--zf-font-family, "DM Sans", sans-serif);--zf-ease-out: cubic-bezier(.23, 1, .32, 1);--zf-ease-drawer: cubic-bezier(.32, .72, 0, 1);position:relative}.zf-editor-main{display:flex;align-items:flex-start}.zf-editor-grid{flex:1;min-width:0;min-height:360px;padding-inline:var(--zf-pad-x, 0);border-radius:18px;border:1px dashed transparent;transition:border-color .2s var(--zf-ease-out),opacity .24s var(--zf-ease-out),filter .24s var(--zf-ease-out),transform .24s var(--zf-ease-out)}.zf-editor-grid[data-switching=true]{opacity:.15;filter:blur(10px);transform:scale(.985);transition:opacity .14s var(--zf-ease-out),filter .14s var(--zf-ease-out),transform .14s var(--zf-ease-out)}@media(prefers-reduced-motion:reduce){.zf-editor-grid[data-switching=true]{filter:none;transform:none}}.zf-editor.zf-customise .zf-editor-grid{border-color:#ffffff14}.zf-editor[data-mode=flow-horizontal] .zf-editor-grid{overflow-x:auto;overflow-y:hidden}.zf-editor .grid-stack>.grid-stack-item>.grid-stack-item-content{overflow:visible}@media(hover:hover){.zf-editor:not(.zf-customise) .grid-stack-item-content:hover>.zf-frame{transform:translateY(-2px);border-color:var( --zf-frame-border-hover, hsl(var(--zf-accent-hue, 242) 90% 76% / .42) )}.zf-editor:not(.zf-customise) .grid-stack-item-content:hover>.zf-frame:not(.zf-frame--error):after{opacity:1}}.zf-fill{width:100%;height:100%}.zf-editor .zf-frame,.zf-editor .zf-bare{animation:none}.zf-editor.zf-customise .grid-stack-item>.grid-stack-item-content{outline:2px dashed rgba(255,255,255,.08);outline-offset:-2px;border-radius:18px;transition:outline-color .2s var(--zf-ease-out)}.zf-editor.zf-customise .grid-stack-item>.grid-stack-item-content>*{pointer-events:none}.zf-editor.zf-customise .grid-stack-item:hover>.grid-stack-item-content{outline-color:var(--zf-accent)}.zf-editor.zf-customise .grid-stack-item>.grid-stack-item-content{cursor:grab}body.zf-dragging,body.zf-dragging *{cursor:grabbing!important}@keyframes zf-wiggle{0%,to{transform:rotate(-.4deg)}50%{transform:rotate(.4deg)}}.zf-editor.zf-customise:not([data-wiggle=off]) .grid-stack-item>.grid-stack-item-content{animation:zf-wiggle .32s ease-in-out infinite}.zf-editor.zf-customise .grid-stack-item:nth-child(2n)>.grid-stack-item-content{animation-delay:.05s;animation-duration:.28s}.zf-editor.zf-customise .grid-stack-item:nth-child(3n)>.grid-stack-item-content{animation-delay:.1s;animation-duration:.34s}.zf-editor.zf-customise .grid-stack-item:nth-child(5n)>.grid-stack-item-content{animation-delay:.15s;animation-duration:.26s}.zf-editor.zf-customise .grid-stack-item.ui-draggable-dragging>.grid-stack-item-content,.zf-editor.zf-customise .grid-stack-item.ui-resizing>.grid-stack-item-content{animation:none}@media(prefers-reduced-motion:reduce){.zf-editor.zf-customise .grid-stack-item>.grid-stack-item-content{animation:none}}.zf-del-btn{position:absolute;top:0;right:0;width:24px;height:24px;border-radius:9999px;background:linear-gradient(180deg,#f87171d1,#dc2626db);border:1px solid rgba(255,255,255,.28);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transform:scale(.8);-webkit-backdrop-filter:blur(12px) saturate(150%);backdrop-filter:blur(12px) saturate(150%);box-shadow:inset 0 1px #ffffff59,0 1px 2px #0000004d,0 8px 20px -12px #dc2626b3;transition:opacity .2s var(--zf-ease-out),transform .2s var(--zf-ease-out),background .2s var(--zf-ease-out),border-color .2s var(--zf-ease-out),box-shadow .2s var(--zf-ease-out);z-index:100;font-size:14px;font-weight:700;line-height:1;padding:0}.zf-del-btn:hover{background:linear-gradient(180deg,#f87171f2,#dc2626fa);border-color:#ffffff6b;transform:scale(1.1);box-shadow:inset 0 1px #ffffff6b,0 2px 6px #00000052,0 12px 26px -12px #dc2626d9}.zf-del-btn:active{transform:scale(.98);transition-duration:0s}.zf-editor.zf-customise .grid-stack-item:hover>.zf-del-btn{opacity:1;transform:scale(1)}.zf-cfg-btn{position:absolute;top:0;right:28px;width:24px;height:24px;border-radius:9999px;background:linear-gradient(180deg,#262838b8,#13141fc7);border:1px solid rgba(255,255,255,.16);color:#ffffffeb;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transform:scale(.8);-webkit-backdrop-filter:blur(14px) saturate(150%);backdrop-filter:blur(14px) saturate(150%);box-shadow:inset 0 1px #ffffff1a,0 1px 2px #00000052,0 8px 20px -12px #000c;transition:opacity .2s var(--zf-ease-out),transform .2s var(--zf-ease-out),color .2s var(--zf-ease-out),border-color .2s var(--zf-ease-out),box-shadow .2s var(--zf-ease-out);z-index:100;padding:0}.zf-cfg-btn:hover{color:hsl(var(--zf-accent-hue, 242) 96% 82%);border-color:hsl(var(--zf-accent-hue, 242) 90% 76% / .6);transform:scale(1.1);box-shadow:inset 0 1px #ffffff24,0 2px 6px #00000057,0 12px 26px -14px #000000d1}.zf-cfg-btn:active{transform:scale(.98);transition-duration:0s}.zf-cfg-btn>svg{display:block}.zf-editor.zf-customise .grid-stack-item:hover>.zf-cfg-btn{opacity:1;transform:scale(1)}.zf-editor .grid-stack-placeholder>.placeholder-content{background:hsl(var(--zf-accent-hue, 242) 90% 76% / .15);border:2px dashed hsl(var(--zf-accent-hue, 242) 90% 76% / .55);border-radius:18px}.ui-draggable-dragging>.zf-drag-ghost{box-sizing:border-box;width:100%;height:100%;display:flex;align-items:center;gap:10px;padding:0 14px;direction:ltr;border-radius:12px;background:linear-gradient(165deg,#222332f2,#0d0e15f5);border:1px solid hsl(var(--zf-accent-hue, 242) var(--zf-accent-sat, 90%) 76% / .55);box-shadow:inset 0 1px #ffffff14,0 22px 50px -20px #000000d9,0 0 0 1px hsl(var(--zf-accent-hue, 242) var(--zf-accent-sat, 90%) 76% / .22);color:#eef1f8;font-family:var(--font-dmsans, "DM Sans", system-ui, sans-serif);-webkit-backdrop-filter:blur(10px) saturate(140%);backdrop-filter:blur(10px) saturate(140%);overflow:hidden}.ui-draggable-dragging>.zf-drag-ghost>.zf-drag-ghost-icon{width:30px;height:30px;flex:none;border-radius:7px;object-fit:cover}.ui-draggable-dragging>.zf-drag-ghost>.zf-drag-ghost-name{font-size:13px;font-weight:700;letter-spacing:.01em;text-transform:capitalize;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body:has(.ui-draggable-dragging),body:has(.ui-draggable-dragging) *{cursor:grabbing!important}.zf-editor-bar{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:14px}.zf-editor-bar-spacer{flex:1}.zf-btn{font:inherit;font-size:13px;font-weight:600;line-height:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 15px;border-radius:10px;cursor:pointer;border:1px solid rgba(255,255,255,.14);background:linear-gradient(180deg,#262838b8,#13141fc7);color:#ffffffeb;-webkit-backdrop-filter:blur(14px) saturate(150%);backdrop-filter:blur(14px) saturate(150%);box-shadow:inset 0 1px #ffffff14,0 1px 2px #00000052,0 10px 24px -14px #000c;transition:background .18s var(--zf-ease-out),border-color .18s var(--zf-ease-out),color .18s var(--zf-ease-out),box-shadow .18s var(--zf-ease-out),transform .18s var(--zf-ease-out)}.zf-btn:hover{background:linear-gradient(180deg,#323447d1,#1a1b29db);border-color:#ffffff38;transform:translateY(-1px);box-shadow:inset 0 1px #ffffff1a,0 2px 6px #00000057,0 16px 30px -16px #000000d1}.zf-btn:active{transform:translateY(0) scale(.97);transition-duration:0s;box-shadow:inset 0 1px 3px #00000073,0 1px 2px #0000004d}.zf-btn:focus-visible{outline:none;border-color:hsl(var(--zf-accent-hue, 242) 90% 76% / .7);box-shadow:inset 0 1px #ffffff14,0 0 0 3px hsl(var(--zf-accent-hue, 242) 90% 76% / .35)}.zf-btn--primary{border-color:hsl(var(--zf-accent-hue, 242) 90% 72% / .7);background:linear-gradient(180deg,hsl(var(--zf-accent-hue, 242) 96% 81%),hsl(var(--zf-accent-hue, 242) 88% 72%));color:#0b0c13;box-shadow:inset 0 1px #fff6,0 1px 2px #0000004d,0 12px 26px -12px hsl(var(--zf-accent-hue, 242) 85% 60% / .7)}.zf-btn--primary:hover{border-color:hsl(var(--zf-accent-hue, 242) 95% 78% / .85);background:linear-gradient(180deg,hsl(var(--zf-accent-hue, 242) 100% 85%),hsl(var(--zf-accent-hue, 242) 92% 76%));box-shadow:inset 0 1px #ffffff73,0 2px 6px #0000004d,0 18px 34px -14px hsl(var(--zf-accent-hue, 242) 85% 60% / .8)}.zf-btn--primary:focus-visible{box-shadow:inset 0 1px #fff6,0 0 0 3px hsl(var(--zf-accent-hue, 242) 90% 76% / .45)}.zf-btn--danger{border-color:#f2155352;color:#ff9aab}.zf-btn--danger:hover{border-color:#f215538c;color:#ffb3bf;background:linear-gradient(180deg,#781c349e,#4a1224b8)}.zf-btn--danger:focus-visible{border-color:#f21553b3;box-shadow:inset 0 1px #ffffff14,0 0 0 3px #f2155359}.zf-btn--ghost{border-color:#ffffff1a;background:linear-gradient(180deg,#1e1f2c80,#10111a94);color:#ffffffc7}.zf-btn--ghost:hover{color:#fffffff2}.zf-btn--icon{padding:0;width:38px;height:38px;border-radius:11px;color:#ffffffd9}.zf-btn--icon:hover{color:hsl(var(--zf-accent-hue, 242) 96% 82%);border-color:hsl(var(--zf-accent-hue, 242) 90% 76% / .55)}.zf-btn--icon>svg{display:block}@media(prefers-reduced-motion:reduce){.zf-btn:hover,.zf-btn:active,.zf-del-btn:active,.zf-cfg-btn:active,.zf-rail-tab:active,.zf-dialog-close:active{transform:none}}.zf-rail{flex:none;width:0;margin-left:0;overflow:hidden;position:sticky;top:12px;transition:width .32s var(--zf-ease-drawer),margin-left .32s var(--zf-ease-drawer)}.zf-editor.zf-customise .zf-rail{width:320px;margin-left:16px}.zf-editor.zf-customise[data-mode=flow-horizontal] .zf-rail{margin-right:24px}.zf-rail-inner{box-sizing:border-box;width:320px;display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:14px;background:linear-gradient(180deg,#141622b3,#0b0c13cc);border:1px solid rgba(255,255,255,.08);max-height:calc(100vh - 24px);overflow-x:hidden;overflow-y:auto;opacity:0;transition:opacity .2s var(--zf-ease-out)}.zf-editor.zf-customise .zf-rail-inner{opacity:1;transition-delay:.12s}.zf-rail-actions{display:flex;flex:none;gap:8px}.zf-rail-actions .zf-btn{flex:1}.zf-rail-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:16px}@media(prefers-reduced-motion:reduce){.zf-rail,.zf-rail-inner{transition:none}}.zf-rail-tabs{display:flex;gap:4px;padding:3px;border-radius:9px;background:#00000047;border:1px solid rgba(255,255,255,.07)}.zf-rail-tab{flex:1;font:inherit;font-size:11px;font-weight:600;letter-spacing:.04em;color:#ffffff80;background:transparent;border:0;border-radius:7px;padding:6px 8px;cursor:pointer;transition:background .15s var(--zf-ease-out),color .15s var(--zf-ease-out),box-shadow .15s var(--zf-ease-out),transform .15s var(--zf-ease-out)}.zf-rail-tab:hover{color:#ffffffd1}.zf-rail-tab:active{transform:scale(.97);transition-duration:0s}.zf-rail-tab.is-active{color:#fff;background:hsl(var(--zf-accent-hue, 242) 90% 70% / .22);box-shadow:inset 0 0 0 1px hsl(var(--zf-accent-hue, 242) 90% 76% / .4)}.zf-rail-tab:focus-visible{outline:2px solid hsl(var(--zf-accent-hue, 242) 90% 76% / .7);outline-offset:1px}.zf-mode-seg{display:flex;gap:4px;padding:3px;border-radius:9px;background:#00000047;border:1px solid rgba(255,255,255,.07)}.zf-mode-seg-btn{flex:1;font:inherit;font-size:11px;font-weight:600;letter-spacing:.04em;color:#ffffff80;background:transparent;border:0;border-radius:7px;padding:6px 8px;cursor:pointer;transition:background .15s var(--zf-ease-out),color .15s var(--zf-ease-out),box-shadow .15s var(--zf-ease-out),transform .15s var(--zf-ease-out)}.zf-mode-seg-btn:hover:not(:disabled){color:#ffffffd1}.zf-mode-seg-btn:active:not(:disabled){transform:scale(.97);transition-duration:0s}.zf-mode-seg-btn.is-active{color:#fff;background:hsl(var(--zf-accent-hue, 242) 90% 70% / .22);box-shadow:inset 0 0 0 1px hsl(var(--zf-accent-hue, 242) 90% 76% / .4)}.zf-mode-seg-btn:disabled{opacity:.4;cursor:not-allowed}.zf-mode-seg-btn:focus-visible{outline:2px solid hsl(var(--zf-accent-hue, 242) 90% 76% / .7);outline-offset:1px}.zf-mode-seg-hint{margin:8px 1px 0;font-size:10.5px;line-height:1.4;color:#ffffff6b}.zf-rail-title{font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#ffffff75;margin:0 0 8px}.zf-palette-hint{font-size:11px;color:#fff6;margin:-4px 0 8px}.zf-palette-search{display:flex;align-items:center;gap:7px;height:34px;margin:0 0 8px;padding:0 9px;border-radius:9px;border:1px solid rgba(255,255,255,.11);background:#00000047;color:#ffffff7a}.zf-palette-search:focus-within{border-color:var(--zf-accent);box-shadow:0 0 0 3px hsl(var(--zf-accent-hue, 242) 90% 76% / .12)}.zf-palette-search input{min-width:0;flex:1;border:0;outline:0;padding:0;background:transparent;color:#ffffffe6;font:inherit;font-size:12px}.zf-palette-search input::placeholder{color:#ffffff57}.zf-palette-search-clear{display:flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;padding:0;border:0;border-radius:5px;background:transparent;color:#ffffff80;cursor:pointer;transition:background .15s var(--zf-ease-out),color .15s var(--zf-ease-out)}.zf-palette-search-clear:hover{background:#ffffff14;color:#fff}.zf-palette-search-clear svg{width:12px;height:12px}.zf-palette-empty{font-size:12px;color:#ffffff73;padding:6px 2px;margin:0}.zf-palette-cats{display:flex;flex-direction:column;gap:6px}.zf-palette-cat{border-radius:10px;border:1px solid rgba(255,255,255,.06);background:#ffffff05;overflow:hidden;transition:background .15s var(--zf-ease-out),border-color .15s var(--zf-ease-out)}.zf-palette-cat.is-open{background:#ffffff09;border-color:#ffffff1a}.zf-palette-cat-header{display:flex;align-items:center;gap:9px;width:100%;font:inherit;text-align:left;cursor:pointer;padding:10px 11px;background:transparent;border:0;color:#fffc;transition:background .15s var(--zf-ease-out),color .15s var(--zf-ease-out)}.zf-palette-cat-header:hover{background:#ffffff0b;color:#fff}.zf-palette-cat-header:focus-visible{outline:2px solid hsl(var(--zf-accent-hue, 242) 90% 76% / .7);outline-offset:-2px}.zf-palette-cat-chevron{width:13px;height:13px;flex:none;color:#fff6;transition:transform .18s var(--zf-ease-out),color .15s var(--zf-ease-out)}.zf-palette-cat.is-open .zf-palette-cat-chevron{transform:rotate(90deg);color:hsl(var(--zf-accent-hue, 242) 70% 80% / .9)}.zf-palette-cat-label{flex:1;min-width:0;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.zf-palette-cat.is-open .zf-palette-cat-label{color:hsl(var(--zf-accent-hue, 242) 72% 84% / .95)}.zf-palette-cat-count{flex:none;font-size:10px;font-weight:600;font-variant-numeric:tabular-nums;color:#ffffff80;background:#ffffff12;border-radius:999px;padding:1px 7px;min-width:22px;text-align:center}.zf-palette-cat-body{padding:0 8px 9px;animation:zf-cat-in .18s var(--zf-ease-out)}@keyframes zf-cat-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.zf-palette-cat-body{animation:none}.zf-palette-cat-chevron{transition:none}}.zf-palette-cat-desc{font-size:10.5px;line-height:1.45;color:#ffffff61;margin:0 2px 9px}.zf-palette{display:flex;flex-direction:column;gap:6px}.zf-newwidget{display:flex;align-items:center;gap:10px;text-align:left;cursor:grab;user-select:none;-webkit-user-select:none;min-height:58px;padding:7px 10px 7px 8px;border-radius:9px;background:#ffffff0a;border:1px solid rgba(255,255,255,.07);transition:background .15s var(--zf-ease-out),border-color .15s var(--zf-ease-out)}.zf-newwidget:hover{background:#ffffff17;border-color:hsl(var(--zf-accent-hue, 242) 90% 76% / .4)}.zf-newwidget:active{cursor:grabbing}.zf-newwidget-icon{width:42px;height:42px;flex:none;border-radius:10px;object-fit:cover;background:#ffffff0d;box-shadow:inset 0 0 0 1px #ffffff14,0 8px 18px #00000038}.zf-newwidget-copy{min-width:0}.zf-newwidget-name{font-size:12px;font-weight:600;color:#ffffffe6;text-transform:capitalize}.zf-newwidget-desc{font-size:11px;color:#fff6;margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.zf-field{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}.zf-field label{font-size:11px;color:#ffffff8c}.zf-field-hint{font-size:10px;color:#ffffff61;line-height:1.4;margin:0}.zf-input,.zf-textarea{font:inherit;font-size:12px;color:#ffffffe6;background:#0000004d;border:1px solid rgba(255,255,255,.12);border-radius:7px;padding:7px 9px;width:100%;box-sizing:border-box}.zf-textarea{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;min-height:120px;resize:vertical;line-height:1.45}.zf-input:focus,.zf-textarea:focus{outline:none;border-color:var(--zf-accent)}.zf-checkbox{display:flex;align-items:center;gap:7px;font-size:12px;color:#ffffffb3;margin-bottom:10px;cursor:pointer}.zf-config-error{font-size:11px;color:#ff8b9d;line-height:1.45;margin:-4px 0 10px;white-space:pre-wrap}.zf-rail-empty{font-size:12px;color:#fff6;line-height:1.5}.zf-select{font:inherit;font-size:12px;color:#ffffffe6;background:#0000004d;border:1px solid rgba(255,255,255,.12);border-radius:7px;padding:7px 28px 7px 9px;width:100%;box-sizing:border-box;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='0.55' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}.zf-select:focus{outline:none;border-color:var(--zf-accent)}.zf-select option{color:#0b0c13}.zf-field-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.zf-field-num{font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;color:#ffffffd1}.zf-range{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:6px;margin:4px 0 2px;border-radius:9999px;outline:none;cursor:pointer;background:#ffffff21}.zf-range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:15px;height:15px;border-radius:9999px;background:var(--zf-accent);border:2px solid #fff;box-shadow:0 1px 4px #00000080;cursor:pointer}.zf-range::-moz-range-thumb{width:15px;height:15px;border-radius:9999px;background:var(--zf-accent);border:2px solid #fff;box-shadow:0 1px 4px #00000080;cursor:pointer}.zf-range:focus-visible{box-shadow:0 0 0 3px hsl(var(--zf-accent-hue, 242) 90% 76% / .3)}.zf-color-row{display:flex;gap:8px}.zf-color{flex:none;width:40px;height:34px;padding:2px;border-radius:7px;border:1px solid rgba(255,255,255,.12);background:#0000004d;cursor:pointer}.zf-textarea--prose{font-family:inherit;min-height:76px}.zf-taglist{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:2px}.zf-tag{display:inline-flex;align-items:center;gap:5px;padding:4px 5px 4px 9px;border-radius:9999px;border:1px solid rgba(255,255,255,.1);background:#0000003d;font-size:11px;font-weight:600;letter-spacing:.02em;color:#ffffffd1}.zf-symbol-editor{position:relative;display:flex;flex-direction:column;gap:9px;margin:0 0 12px;padding:10px;border-radius:11px;border:1px solid hsl(var(--zf-accent-hue, 242) 90% 76% / .16);background:linear-gradient(135deg,hsl(var(--zf-accent-hue, 242) 90% 76% / .1),#ffffff09 45%,#00000029),#ffffff08}.zf-symbol-head,.zf-holding-row,.zf-holding-main,.zf-selected-symbol,.zf-symbol-search,.zf-symbol-chip{display:flex;align-items:center}.zf-symbol-head{justify-content:space-between;gap:10px}.zf-symbol-label{font-size:10px;font-weight:700;letter-spacing:.11em;text-transform:uppercase;color:#ffffff75}.zf-symbol-detail{margin-top:2px;font-size:13px;font-weight:700;color:#ffffffe0}.zf-symbol-source{flex:none;padding:4px 7px;border-radius:9999px;border:1px solid rgba(255,255,255,.09);background:#0003;font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#ffffff7a}.zf-symbol-source.is-loading{color:var(--zf-accent);border-color:hsl(var(--zf-accent-hue, 242) 90% 76% / .24)}.zf-selected-symbol{min-width:0;gap:8px;padding:7px 8px;border-radius:9px;border:1px solid rgba(255,255,255,.08);background:#00000038}.zf-selected-symbol.is-compact{gap:6px;padding:0;border:0;background:transparent}.zf-selected-symbol-text{min-width:0;display:flex;flex-direction:column;gap:1px}.zf-selected-symbol-text strong,.zf-symbol-option-main strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#ffffffe6}.zf-selected-symbol-text em,.zf-symbol-option-main em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-size:10px;color:#fff6}.zf-selected-symbol-price{margin-left:auto;font-variant-numeric:tabular-nums;font-size:12px;font-weight:700;color:#ffffffb8}.zf-symbol-avatar{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;font-size:9px;font-weight:800;letter-spacing:.02em;line-height:1}.zf-symbol-avatar--stock{background:#ffffffeb;color:#151821;box-shadow:inset 0 0 0 1px #00000014}.zf-symbol-avatar--crypto{background:hsl(var(--zf-accent-hue, 242) 90% 76% / .18);color:var(--zf-accent);box-shadow:inset 0 0 0 1px hsl(var(--zf-accent-hue, 242) 90% 76% / .22)}.zf-symbol-avatar--logo{object-fit:contain}.zf-symbol-avatar--logo.zf-symbol-avatar--stock{padding:2px}.zf-symbol-avatar--logo.zf-symbol-avatar--crypto{border-radius:9999px;background:transparent;box-shadow:none}.zf-symbol-chips{display:flex;flex-wrap:wrap;gap:6px}.zf-symbol-chip{min-width:0;gap:6px;max-width:100%;padding:6px 6px 6px 7px;border-radius:9999px;border:1px solid rgba(255,255,255,.08);background:#00000038}.zf-symbol-remove{flex:none;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9999px;padding:0;cursor:pointer;background:#ffffff0f;color:#ffffff80}.zf-symbol-remove:hover{background:#ef44442e;color:#ff8b9d}.zf-symbol-empty{padding:7px 8px;border-radius:8px;border:1px dashed rgba(255,255,255,.09);color:#ffffff5c;font-size:11px}.zf-symbol-combo{position:relative}.zf-symbol-search{gap:7px;height:34px;border-radius:9px;padding:0 9px;border:1px solid rgba(255,255,255,.11);background:#00000047;color:#ffffff7a}.zf-symbol-search:focus-within{border-color:var(--zf-accent);box-shadow:0 0 0 3px hsl(var(--zf-accent-hue, 242) 90% 76% / .12)}.zf-symbol-search.is-disabled{opacity:.55}.zf-symbol-search input{min-width:0;flex:1;border:0;outline:0;padding:0;background:transparent;color:#ffffffe6;font:inherit;font-size:12px}.zf-symbol-search input::placeholder{color:#ffffff57}.zf-symbol-menu{position:absolute;z-index:120;top:calc(100% + 6px);left:0;right:0;display:flex;flex-direction:column;gap:3px;max-height:286px;overflow-y:auto;padding:6px;border-radius:11px;border:1px solid rgba(255,255,255,.12);background:#0b0c13f5;box-shadow:0 18px 36px #00000075,0 0 0 1px #0000004d;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.zf-symbol-option{width:100%;min-width:0;display:grid;grid-template-columns:22px minmax(0,1fr) auto 16px;align-items:center;gap:8px;min-height:40px;padding:7px;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;cursor:pointer}.zf-symbol-option:hover,.zf-symbol-option:focus-visible{outline:none;background:#ffffff13}.zf-symbol-option:disabled{cursor:default;opacity:.52}.zf-symbol-option.is-selected{background:hsl(var(--zf-accent-hue, 242) 90% 76% / .1)}.zf-symbol-option--custom{border-top:1px solid rgba(255,255,255,.06);border-radius:0 0 8px 8px}.zf-symbol-option-main{min-width:0;display:flex;flex-direction:column;gap:1px}.zf-symbol-option-meta{display:flex;flex-direction:column;align-items:flex-end;gap:1px;font-variant-numeric:tabular-nums;font-size:10px;color:#ffffff70}.zf-symbol-change{font-size:10px;font-weight:800}.zf-symbol-change.is-up{color:#42d67a}.zf-symbol-change.is-down{color:#ff637d}.zf-symbol-custom-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;background:#ffffff12;color:var(--zf-accent)}.zf-symbol-menu-status{padding:10px 8px;color:#ffffff61;font-size:11px}.zf-holding-list{display:flex;flex-direction:column;gap:6px}.zf-holding-row{justify-content:space-between;gap:8px;min-width:0;padding:7px;border-radius:9px;border:1px solid rgba(255,255,255,.08);background:#0000002e}.zf-holding-main{min-width:0;gap:7px}.zf-holding-amount{flex:none;font-variant-numeric:tabular-nums;font-size:11px;color:#ffffff70}.zf-theme{margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.07)}.zf-theme-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.zf-theme-val{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-variant-numeric:tabular-nums;color:#ffffff8c}.zf-theme-swatch{width:11px;height:11px;border-radius:9999px;background:var(--zf-accent);box-shadow:0 0 8px hsl(var(--zf-accent-hue, 242) var(--zf-accent-sat, 90%) 76% / .9)}.zf-theme-knob-end{display:inline-flex;align-items:center;gap:10px}.zf-theme-reset{background:none;border:none;padding:0;font:inherit;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#ffffff61;cursor:pointer}.zf-theme-reset:hover{color:var(--zf-accent)}.zf-hue-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:10px;border-radius:9999px;outline:none;cursor:pointer;border:1px solid rgba(255,255,255,.12);background:linear-gradient(to right,#f98b8b,#f9f98b,#8bf98b,#8bf9f9,#8b8bf9,#f98bf9,#f98b8b)}.zf-hue-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:9999px;background:var(--zf-accent);border:2px solid #fff;box-shadow:0 1px 4px #00000080;cursor:pointer}.zf-hue-slider::-moz-range-thumb{width:16px;height:16px;border-radius:9999px;background:var(--zf-accent);border:2px solid #fff;box-shadow:0 1px 4px #00000080;cursor:pointer}.zf-presets{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.zf-preset{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:10px;border:1px solid rgba(255,255,255,.1);background:#ffffff08;color:#ffffffb3;font:inherit;font-size:11px;font-weight:600;cursor:pointer;text-align:left;transition:border-color .15s var(--zf-ease-out, ease),background .15s var(--zf-ease-out, ease),color .15s var(--zf-ease-out, ease)}.zf-preset:hover{border-color:#ffffff38;color:#ffffffe6}.zf-preset.is-active{border-color:var(--zf-accent);color:#fff;box-shadow:0 0 0 1px var(--zf-accent)}.zf-preset-swatch{width:16px;height:16px;flex:none;border-radius:5px;border:1px solid rgba(255,255,255,.18)}.zf-preset-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.zf-seg{display:flex;gap:6px}.zf-seg-btn{flex:1;padding:7px 6px;border-radius:9px;border:1px solid rgba(255,255,255,.1);background:#ffffff08;color:#ffffff9e;font:inherit;font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .15s var(--zf-ease-out, ease),background .15s var(--zf-ease-out, ease),color .15s var(--zf-ease-out, ease)}.zf-seg-btn:hover{border-color:#ffffff38;color:#ffffffd9}.zf-seg-btn.is-active{border-color:var(--zf-accent);background:hsl(var(--zf-accent-hue, 242) var(--zf-accent-sat, 90%) 60% / .14);color:#fff}.zf-color{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:22px;height:16px;padding:0;border:1px solid rgba(255,255,255,.18);border-radius:5px;background:none;cursor:pointer;vertical-align:middle}.zf-color::-webkit-color-swatch-wrapper{padding:0}.zf-color::-webkit-color-swatch{border:none;border-radius:4px}.zf-color::-moz-color-swatch{border:none;border-radius:4px}.zf-dialog-backdrop{--zf-accent: hsl(var(--zf-accent-hue, 242) var(--zf-accent-sat, 90%) 76%);--zf-ease-out: cubic-bezier(.23, 1, .32, 1);position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;background:#06070c9e;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);animation:zf-dialog-fade .16s var(--zf-ease-out)}.zf-dialog{width:min(440px,100%);max-height:calc(100vh - 48px);display:flex;flex-direction:column;border-radius:16px;border:1px solid rgba(255,255,255,.1);background:linear-gradient(180deg,#141622fa,#0b0c13fc);box-shadow:0 30px 80px -20px #000c,0 0 0 1px #0006;animation:zf-dialog-pop .18s cubic-bezier(.32,.72,0,1)}.zf-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px 12px;border-bottom:1px solid rgba(255,255,255,.07)}.zf-dialog-title{margin:0;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#ffffff9e}.zf-dialog-close{flex:none;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;border:1px solid rgba(255,255,255,.1);background:#ffffff0a;color:#ffffffb3;cursor:pointer;transition:background .15s var(--zf-ease-out),color .15s var(--zf-ease-out),border-color .15s var(--zf-ease-out),transform .15s var(--zf-ease-out)}.zf-dialog-close:hover{background:#ffffff17;border-color:#ffffff2e;color:#fff}.zf-dialog-close:active{transform:scale(.94);transition-duration:0s}.zf-dialog-close>svg{display:block}.zf-dialog-body{padding:16px;overflow-y:auto;scrollbar-gutter:stable}.zf-dialog-body>:first-child{margin-top:0}.zf-dialog-foot{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px 16px;border-top:1px solid rgba(255,255,255,.07)}@keyframes zf-dialog-fade{0%{opacity:0}to{opacity:1}}@keyframes zf-dialog-pop{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.zf-dialog-backdrop,.zf-dialog{animation:none}}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import{r,j as e,c as Os,a as is}from"./react-qoZPGuNy.js";import{G as ls}from"./gridstack-BxxvPIFU.js";import{t as pt,u as Gs,B as we,T as cs,F as os,a as Ds,b as _s,c as Ws,d as Us,N as us,e as ms}from"./index-kB-TyxKi.js";function qs(t){const a=t.trim().toLowerCase();return a?a.split(/\s+/):[]}function Ks(t,a,n){if(n.length===0)return!0;const m=`${t.label} ${t.description??""} ${t.name} ${a}`.toLowerCase();return n.every(j=>m.includes(j))}/**
|
|
2
|
+
* @license lucide-react v1.21.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ys=(...t)=>t.filter((a,n,m)=>!!a&&a.trim()!==""&&m.indexOf(a)===n).join(" ").trim();/**
|
|
7
|
+
* @license lucide-react v1.21.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Vs=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
12
|
+
* @license lucide-react v1.21.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Xs=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,m)=>m?m.toUpperCase():n.toLowerCase());/**
|
|
17
|
+
* @license lucide-react v1.21.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ds=t=>{const a=Xs(t);return a.charAt(0).toUpperCase()+a.slice(1)};/**
|
|
22
|
+
* @license lucide-react v1.21.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var lt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
27
|
+
* @license lucide-react v1.21.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Ys=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},Zs=r.createContext({}),Js=()=>r.useContext(Zs),Qs=r.forwardRef(({color:t,size:a,strokeWidth:n,absoluteStrokeWidth:m,className:j="",children:d,iconNode:h,...o},f)=>{const{size:p=24,strokeWidth:u=2,absoluteStrokeWidth:z=!1,color:N="currentColor",className:x=""}=Js()??{},R=m??z?Number(n??u)*24/Number(a??p):n??u;return r.createElement("svg",{ref:f,...lt,width:a??p??lt.width,height:a??p??lt.height,stroke:t??N,strokeWidth:R,className:ys("lucide",x,j),...!d&&!Ys(o)&&{"aria-hidden":"true"},...o},[...h.map(([T,w])=>r.createElement(T,w)),...Array.isArray(d)?d:[d]])});/**
|
|
32
|
+
* @license lucide-react v1.21.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const ye=(t,a)=>{const n=r.forwardRef(({className:m,...j},d)=>r.createElement(Qs,{ref:d,iconNode:a,className:ys(`lucide-${Vs(ds(t))}`,`lucide-${t}`,m),...j}));return n.displayName=ds(t),n};/**
|
|
37
|
+
* @license lucide-react v1.21.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const ea=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ta=ye("check",ea);/**
|
|
42
|
+
* @license lucide-react v1.21.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const sa=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],aa=ye("chevron-down",sa);/**
|
|
47
|
+
* @license lucide-react v1.21.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const ra=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],na=ye("plus",ra);/**
|
|
52
|
+
* @license lucide-react v1.21.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const ia=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],zs=ye("search",ia);/**
|
|
57
|
+
* @license lucide-react v1.21.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const la=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],ca=ye("sliders-horizontal",la);/**
|
|
62
|
+
* @license lucide-react v1.21.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const oa=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ge=ye("x",oa),js=["xyz:XYZ100","xyz:SP500","xyz:NVDA","xyz:TSLA","xyz:AAPL","xyz:MSFT","xyz:GOOGL","xyz:META","xyz:AMZN","xyz:MU","xyz:AMD","xyz:AVGO","xyz:ARM","xyz:TSM","xyz:SKHX","xyz:MSTR","xyz:COIN","xyz:HOOD","xyz:PLTR","xyz:SPCX","xyz:GOLD","xyz:SILVER","xyz:CL","xyz:BRENTOIL","xyz:COPPER","xyz:EUR","xyz:JPY","xyz:SMH","BTC","ETH","SOL","HYPE","BNB","XRP","DOGE","LINK","AVAX","SUI"],Ns=new Map(js.map((t,a)=>[t,a]));function Se(t){const a=t.indexOf(":");return(a===-1?t:t.slice(a+1)).toUpperCase()}function gt(t){return t.includes(":")?"Stock":"Crypto"}function ua(t){const a=t.indexOf(":");if(a!==-1){const n=t.slice(a+1);return`https://assets.parqet.com/logos/symbol/${encodeURIComponent(n)}?format=png`}return`https://assets.coincap.io/assets/icons/${t.toLowerCase()}@2x.png`}function ma(t){const a=t.trim().replace(/\s+/g,"");if(!a)return"";const n=a.indexOf(":");return n===-1?a.toUpperCase():`${a.slice(0,n).toLowerCase()}:${a.slice(n+1).toUpperCase()}`}function mt(t,a,n=Ns.get(t)??1e4){return{symbol:t,ticker:Se(t),kind:gt(t),markPx:a==null?void 0:a.markPx,changePct:a==null?void 0:a.changePct,rank:n}}function vs(t){if(!Number.isFinite(t))return"";const a=t;return a>=1e3?`$${a.toLocaleString(void 0,{maximumFractionDigits:0})}`:a>=100?`$${a.toFixed(2)}`:a>=1?`$${a.toFixed(3)}`:`$${a.toPrecision(3)}`}function da(t){if(!Number.isFinite(t))return"";const a=t;return`${a>=0?"+":""}${a.toFixed(2)}%`}function ks(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function H(t,a){return t!=null&&t.type?Array.isArray(t.type)?t.type.includes(a):t.type===a:!1}function ws(t){const a=t==null?void 0:t.items;return!!a&&H(t,"array")&&H(a,"string")}function fa(t){var a,n,m;try{const d=pt(t.schema,{io:"input"}).properties??{};if(H(d.symbol,"string"))return{kind:"single"};if(ws(d.symbols))return{kind:"symbols",minItems:(a=d.symbols)==null?void 0:a.minItems,maxItems:(n=d.symbols)==null?void 0:n.maxItems};const h=d.holdings,o=((m=h==null?void 0:h.items)==null?void 0:m.properties)??{};if(H(h,"array")&&H(o.symbol,"string"))return{kind:"holdings",minItems:h==null?void 0:h.minItems,maxItems:h==null?void 0:h.maxItems}}catch{}return t.name==="price-chart"?{kind:"single"}:["price-liveline","price-ticker","funding-rate-chart","funding-heatmap","price-compare"].includes(t.name)?{kind:"symbols"}:null}function ha(t,a){return t.kind==="single"?typeof a.symbol=="string"&&a.symbol?[a.symbol]:[]:t.kind==="symbols"?Array.isArray(a.symbols)?a.symbols.filter(n=>typeof n=="string"):[]:Array.isArray(a.holdings)?a.holdings.map(n=>ks(n)&&typeof n.symbol=="string"?n.symbol:"").filter(Boolean):[]}const pa=new Set(["symbol","symbols","holdings"]);function xt(t){const a=t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return a?a.charAt(0).toUpperCase()+a.slice(1):t}function ga(t){let a;try{a=pt(t.schema,{io:"input"})}catch{return[]}return Object.entries(a.properties??{}).filter(([n])=>!pa.has(n)).map(([n,m])=>({key:n,label:xt(n),shape:m}))}const fs=["xyz:TSLA","xyz:NVDA","xyz:AAPL","xyz:MSFT","xyz:SP500","xyz:GOLD","xyz:GOOGL","xyz:AMZN"];function xa(t,a){return t==="symbol"?fs[a%fs.length]:t==="url"?"https://":t==="text"?"New note":t==="title"?"Heading":xt(t)||"value"}function dt(t,a,n=0){var m;if(t.default!==void 0)return t.default;if(Array.isArray(t.enum)&&t.enum.length)return t.enum[0];if(H(t,"string"))return xa(a,n);if(H(t,"number")||H(t,"integer"))return t.exclusiveMinimum!==void 0?t.exclusiveMinimum+1:t.minimum??0;if(H(t,"boolean"))return!1;if(H(t,"array")){const j=t.items??{},d=a==="symbols"?"symbol":a;return Array.from({length:t.minItems??0},(h,o)=>dt(j,d,o))}if(H(t,"object")){const j={};for(const d of t.required??[]){const h=(m=t.properties)==null?void 0:m[d];h&&(j[d]=dt(h,d,n))}return j}return null}function ba(t){const a=t.schema.safeParse({});if(a.success)return a.data;let n;try{n=pt(t.schema,{io:"input"})}catch{return{}}const m={},j=new Set(n.required??[]);for(const[h,o]of Object.entries(n.properties??{}))j.has(h)&&(m[h]=dt(o,h));const d=t.schema.safeParse(m);return d.success?d.data:m}function ya(t,a){const n=r.useMemo(()=>t.find(f=>f.capabilities.includes("day-stats")),[t]),[m,j]=r.useState({}),[d,h]=r.useState(!1);return r.useEffect(()=>{if(!a||!(n!=null&&n.getDayStats)){h(!1);return}let f=!1;return h(!0),Promise.allSettled([n.getDayStats(),n.getDayStats(["xyz:*"])]).then(p=>{if(f)return;const u={};for(const z of p)z.status==="fulfilled"&&Object.assign(u,z.value);j(u)}).finally(()=>{f||h(!1)}),()=>{f=!0}},[a,n]),{options:r.useMemo(()=>{const f=new Map;return js.forEach((p,u)=>{f.set(p,mt(p,m[p],u))}),Object.entries(m).forEach(([p,u])=>{f.set(p,mt(p,u,Ns.get(p)??1e4))}),[...f.values()].sort((p,u)=>p.rank!==u.rank?p.rank-u.rank:p.kind!==u.kind?p.kind==="Stock"?-1:1:p.ticker.localeCompare(u.ticker))},[m]),loading:d}}function za({instance:t,registry:a,instancesRef:n,symbolUniverse:m,accentHue:j,onApply:d,onClose:h}){const o=a.get(t.frame),f=r.useMemo(()=>o?fa(o):null,[o]),p=r.useMemo(()=>o?ga(o):[],[o]),[u,z]=r.useState(()=>({...t.config??{}})),[N,x]=r.useState(null),[R,T]=r.useState(t.title??""),w=t.id,b=r.useCallback(S=>{if(z(S),o){const ce=o.schema.safeParse(S);if(!ce.success){x(ce.error.issues.map(ze=>`${ze.path.join(".")||"(root)"}: ${ze.message}`).join(`
|
|
67
|
+
`));return}}x(null);const P=n.current.get(w);P&&(n.current.set(w,{...P,config:S}),d(w))},[o,w,n,d]),A=r.useCallback(S=>{T(S);const P=n.current.get(w);if(!P)return;const ce=S.trim();n.current.set(w,{...P,title:ce===""?void 0:ce}),d(w)},[w,n,d]);r.useEffect(()=>{const S=P=>{P.key==="Escape"&&h()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[h]);const I=(S,P)=>b({...u,[S]:P}),le=(o==null?void 0:o.label)??t.frame.replace(/-/g," ");return e.jsx("div",{className:"zf-dialog-backdrop",style:{"--zf-accent-hue":j},onMouseDown:S=>{S.target===S.currentTarget&&h()},children:e.jsxs("div",{className:"zf-dialog",role:"dialog","aria-modal":"true","aria-label":`Configure ${le}`,children:[e.jsxs("header",{className:"zf-dialog-head",children:[e.jsxs("h3",{className:"zf-dialog-title",children:["Configure · ",le]}),e.jsx("button",{type:"button",className:"zf-dialog-close",onClick:h,"aria-label":"Close",title:"Close",children:e.jsx(Ge,{size:16,"aria-hidden":"true"})})]}),e.jsxs("div",{className:"zf-dialog-body",children:[(o==null?void 0:o.chrome)!=="bare"&&e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:"zf-instance-title",title:"Card title shown in the frame's chrome.",children:"Title"}),e.jsx("input",{id:"zf-instance-title",className:"zf-input",value:R,placeholder:o!=null&&o.titleContent?"Auto (live)":le,spellCheck:!1,onChange:S=>A(S.target.value)}),e.jsx("p",{className:"zf-field-hint",children:"Leave blank to use the frame’s default."})]}),f&&e.jsx(wa,{control:f,config:u,loading:m.loading,options:m.options,onChangeSymbol:S=>b({...u,symbol:S}),onChangeSymbols:S=>b({...u,symbols:S}),onChangeHoldings:S=>b({...u,holdings:S})}),p.map(S=>e.jsx(ja,{field:S,value:u[S.key],onChange:P=>I(S.key,P)},S.key)),!f&&p.length===0&&e.jsx("p",{className:"zf-rail-empty",children:"This frame has no settings."}),N&&e.jsx("div",{className:"zf-config-error",children:N})]}),e.jsx("footer",{className:"zf-dialog-foot",children:e.jsx("button",{type:"button",className:"zf-btn zf-btn--primary",onClick:h,children:"Done"})})]})})}function ja({field:t,value:a,onChange:n}){const{key:m,label:j,shape:d}=t,h=`zf-cfg-${m}`,o=d.description;if(H(d,"boolean")){const p=typeof a=="boolean"?a:!!d.default;return e.jsxs("label",{className:"zf-checkbox",title:o,children:[e.jsx("input",{type:"checkbox",checked:p,onChange:u=>n(u.target.checked)}),j]})}const f=Array.isArray(d.enum)&&d.enum.every(p=>typeof p=="string")?d.enum:null;if(f&&f.length>0){const p=typeof d.default=="string"?d.default:f[0],u=typeof a=="string"&&f.includes(a)?a:p;return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:h,title:o,children:j}),e.jsx("select",{id:h,className:"zf-select",value:u,onChange:z=>n(z.target.value),children:f.map(z=>e.jsx("option",{value:z,children:xt(z)},z))})]})}return H(d,"integer")||H(d,"number")?e.jsx(Na,{id:h,field:t,value:a,onChange:n}):ws(d)?e.jsx(ka,{id:h,field:t,value:a,onChange:n}):e.jsx(va,{id:h,field:t,value:a,onChange:n})}function Na({id:t,field:a,value:n,onChange:m}){const{label:j,shape:d}=a,h=d.description,o=typeof d.minimum=="number"?d.minimum:void 0,f=typeof d.maximum=="number"?d.maximum:void 0,p=H(d,"integer"),u=p?1:"any",z=typeof d.default=="number"?d.default:o??0,N=typeof n=="number"&&Number.isFinite(n)?n:void 0;if(o!==void 0&&f!==void 0){const x=N??z;return e.jsxs("div",{className:"zf-field",children:[e.jsxs("div",{className:"zf-field-row",children:[e.jsx("label",{htmlFor:t,title:h,children:j}),e.jsx("span",{className:"zf-field-num",children:x})]}),e.jsx("input",{id:t,type:"range",className:"zf-range",min:o,max:f,step:u,value:x,onChange:R=>m(p?Math.round(Number(R.target.value)):Number(R.target.value))})]})}return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:h,children:j}),e.jsx("input",{id:t,type:"number",className:"zf-input",min:o,max:f,step:u,value:n==null?"":String(n),onChange:x=>m(x.target.value===""?"":Number(x.target.value))})]})}function va({id:t,field:a,value:n,onChange:m}){const{key:j,label:d,shape:h}=a,o=h.description,f=typeof n=="string"?n:"",p=typeof h.default=="string"?h.default:"",u=typeof h.default=="string"&&/^#[0-9a-f]{6}$/i.test(h.default)?h.default:null;if(j==="color"||u){const z=/^#[0-9a-f]{6}$/i.test(f)?f:u??"#8b8df9";return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:o,children:d}),e.jsxs("div",{className:"zf-color-row",children:[e.jsx("input",{type:"color",className:"zf-color",value:z,"aria-label":`${d} swatch`,onChange:N=>m(N.target.value)}),e.jsx("input",{id:t,className:"zf-input",value:f,placeholder:p,spellCheck:!1,onChange:N=>m(N.target.value)})]})]})}return j==="text"?e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:o,children:d}),e.jsx("textarea",{id:t,className:"zf-textarea zf-textarea--prose",value:f,placeholder:p,onChange:z=>m(z.target.value)})]}):e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:o,children:d}),e.jsx("input",{id:t,className:"zf-input",value:f,placeholder:p,spellCheck:!1,onChange:z=>m(z.target.value)})]})}function ka({id:t,field:a,value:n,onChange:m}){const{label:j,shape:d}=a,h=d.description,o=Array.isArray(n)?n.filter(x=>typeof x=="string"):[],[f,p]=r.useState(""),u=typeof d.maxItems=="number"?d.maxItems:void 0,z=u!==void 0&&o.length>=u,N=x=>{const R=x.trim().toUpperCase();p(""),!(!R||o.includes(R)||z)&&m([...o,R])};return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:h,children:j}),o.length>0&&e.jsx("div",{className:"zf-taglist",children:o.map(x=>e.jsxs("span",{className:"zf-tag",children:[x,e.jsx("button",{type:"button",className:"zf-symbol-remove","aria-label":`Remove ${x}`,onClick:()=>m(o.filter(R=>R!==x)),children:e.jsx(Ge,{size:12,"aria-hidden":"true"})})]},x))}),e.jsx("input",{id:t,className:"zf-input",value:f,disabled:z,spellCheck:!1,placeholder:z?"Maximum reached":"Type a code, Enter to add",onChange:x=>p(x.target.value),onBlur:()=>N(f),onKeyDown:x=>{x.key==="Enter"||x.key===","?(x.preventDefault(),N(f)):x.key==="Backspace"&&f===""&&o.length>0&&m(o.slice(0,-1))}})]})}function wa({control:t,config:a,loading:n,options:m,onChangeSymbol:j,onChangeSymbols:d,onChangeHoldings:h}){const o=ha(t,a);if(t.kind==="single"){const u=o[0]??"";return e.jsxs("div",{className:"zf-symbol-editor",children:[e.jsx(ct,{title:"Ticker",detail:u?Se(u):"None",loading:n}),u?e.jsx(ht,{symbol:u,option:ft(u,m)}):null,e.jsx(ot,{loading:n,options:m,selectedSymbols:u?[u]:[],placeholder:"Search TSLA, BTC...",onSelect:j})]})}if(t.kind==="symbols"){const u=typeof t.maxItems=="number"&&o.length>=t.maxItems;return e.jsxs("div",{className:"zf-symbol-editor",children:[e.jsx(ct,{title:"Tickers",detail:hs(o.length,t),loading:n}),e.jsx(Sa,{symbols:o,options:m,onRemove:z=>d(o.filter(N=>N!==z))}),e.jsx(ot,{disabled:u,loading:n,options:m,selectedSymbols:o,placeholder:u?"Maximum tickers added":"Add ticker",keepOpenOnSelect:!0,onSelect:z=>{o.includes(z)||u||d([...o,z])}})]})}const f=Array.isArray(a.holdings)?a.holdings.filter(ks):[],p=typeof t.maxItems=="number"&&f.length>=t.maxItems;return e.jsxs("div",{className:"zf-symbol-editor",children:[e.jsx(ct,{title:"Holding tickers",detail:hs(f.length,t),loading:n}),e.jsx("div",{className:"zf-holding-list",children:f.map((u,z)=>{const N=typeof u.symbol=="string"?u.symbol:"";return e.jsxs("div",{className:"zf-holding-row",children:[e.jsxs("div",{className:"zf-holding-main",children:[N?e.jsx(ht,{symbol:N,option:ft(N,m),compact:!0}):e.jsx("span",{className:"zf-symbol-empty",children:"No ticker"}),typeof u.amount=="number"&&e.jsxs("span",{className:"zf-holding-amount",children:["x ",u.amount]})]}),e.jsx("button",{type:"button",className:"zf-symbol-remove","aria-label":`Remove ${N||"holding"}`,onClick:()=>{h(f.filter((x,R)=>R!==z))},children:e.jsx(Ge,{size:13,"aria-hidden":"true"})})]},`${N}-${z}`)})}),e.jsx(ot,{disabled:p,loading:n,options:m,selectedSymbols:o,placeholder:p?"Maximum holdings added":"Add holding",keepOpenOnSelect:!0,onSelect:u=>{p||h([...f,{symbol:u,amount:1}])}})]})}function ct({title:t,detail:a,loading:n}){return e.jsxs("div",{className:"zf-symbol-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"zf-symbol-label",children:t}),e.jsx("div",{className:"zf-symbol-detail",children:a})]}),e.jsx("span",{className:n?"zf-symbol-source is-loading":"zf-symbol-source",children:n?"Loading":"Live list"})]})}function hs(t,a){return typeof a.maxItems=="number"?`${t}/${a.maxItems}`:typeof a.minItems=="number"&&t<a.minItems?`${t}/${a.minItems}+`:String(t)}function ft(t,a){return a.find(n=>n.symbol===t)??mt(t)}function Sa({symbols:t,options:a,onRemove:n}){return t.length===0?e.jsx("div",{className:"zf-symbol-empty",children:"No tickers selected"}):e.jsx("div",{className:"zf-symbol-chips",children:t.map(m=>e.jsxs("span",{className:"zf-symbol-chip",children:[e.jsx(ht,{symbol:m,option:ft(m,a),compact:!0}),e.jsx("button",{type:"button",className:"zf-symbol-remove","aria-label":`Remove ${m}`,onClick:()=>n(m),children:e.jsx(Ge,{size:13,"aria-hidden":"true"})})]},m))})}function ht({symbol:t,option:a,compact:n=!1}){return e.jsxs("span",{className:n?"zf-selected-symbol is-compact":"zf-selected-symbol",children:[e.jsx(Ss,{symbol:t}),e.jsxs("span",{className:"zf-selected-symbol-text",children:[e.jsx("strong",{children:Se(t)}),!n&&e.jsx("em",{children:t})]}),!n&&a.markPx!==void 0&&e.jsx("span",{className:"zf-selected-symbol-price",children:vs(a.markPx)})]})}function ot({disabled:t=!1,loading:a,options:n,selectedSymbols:m,placeholder:j,keepOpenOnSelect:d=!1,onSelect:h}){const[o,f]=r.useState(""),[p,u]=r.useState(!1),z=r.useMemo(()=>new Set(m),[m]),N=r.useMemo(()=>new Set(n.map(b=>b.symbol)),[n]),x=ma(o),R=r.useMemo(()=>{const b=o.trim().toLowerCase();return(b?n.filter(I=>I.ticker.toLowerCase().includes(b)||I.symbol.toLowerCase().includes(b)):n.slice(0,28)).slice().sort((I,le)=>ps(I,b)-ps(le,b)).slice(0,36)},[n,o]),T=r.useMemo(()=>{if(!x)return[];const b=x.includes(":")?[x]:[`xyz:${x}`,x];return b.filter((A,I)=>b.indexOf(A)===I&&!N.has(A)&&!z.has(A))},[N,x,z]),w=b=>{!b||d&&z.has(b)||(h(b),f(""),u(d))};return e.jsxs("div",{className:"zf-symbol-combo",onBlur:b=>{b.currentTarget.contains(b.relatedTarget)||u(!1)},children:[e.jsxs("div",{className:t?"zf-symbol-search is-disabled":"zf-symbol-search",children:[e.jsx(zs,{size:14,"aria-hidden":"true"}),e.jsx("input",{value:o,disabled:t,placeholder:j,"aria-label":j,role:"combobox","aria-expanded":p,onFocus:()=>u(!0),onChange:b=>{f(b.target.value),u(!0)},onKeyDown:b=>{var A;b.key==="Enter"&&(b.preventDefault(),w(((A=R[0])==null?void 0:A.symbol)??T[0]??x))}}),e.jsx(aa,{size:14,"aria-hidden":"true"})]}),p&&!t&&e.jsxs("div",{className:"zf-symbol-menu",role:"listbox",children:[a&&e.jsx("div",{className:"zf-symbol-menu-status",children:"Loading live universe..."}),R.map(b=>{const A=z.has(b.symbol);return e.jsxs("button",{type:"button",className:A?"zf-symbol-option is-selected":"zf-symbol-option",disabled:d&&A,role:"option","aria-selected":A,onMouseDown:I=>{I.preventDefault(),w(b.symbol)},onClick:I=>{I.detail===0&&w(b.symbol)},children:[e.jsx(Ss,{symbol:b.symbol}),e.jsxs("span",{className:"zf-symbol-option-main",children:[e.jsx("strong",{children:b.ticker}),e.jsx("em",{children:b.symbol})]}),e.jsxs("span",{className:"zf-symbol-option-meta",children:[e.jsx("span",{children:vs(b.markPx)||b.kind}),b.changePct!==void 0&&e.jsx("span",{className:b.changePct>=0?"zf-symbol-change is-up":"zf-symbol-change is-down",children:da(b.changePct)})]}),A&&e.jsx(ta,{size:14,"aria-hidden":"true"})]},b.symbol)}),T.map(b=>e.jsxs("button",{type:"button",className:"zf-symbol-option zf-symbol-option--custom",onMouseDown:A=>{A.preventDefault(),w(b)},onClick:A=>{A.detail===0&&w(b)},children:[e.jsx("span",{className:"zf-symbol-custom-icon",children:e.jsx(na,{size:13,"aria-hidden":"true"})}),e.jsxs("span",{className:"zf-symbol-option-main",children:[e.jsx("strong",{children:Se(b)}),e.jsx("em",{children:b})]}),e.jsx("span",{className:"zf-symbol-option-meta",children:e.jsx("span",{children:gt(b)})})]},b)),!a&&R.length===0&&T.length===0&&e.jsx("div",{className:"zf-symbol-menu-status",children:"No matches"})]})]})}function ps(t,a){if(!a)return t.rank;const n=t.ticker.toLowerCase(),m=t.symbol.toLowerCase();return n===a||m===a?-40+t.rank/1e4:n.startsWith(a)?-20+t.rank/1e4:m.startsWith(a)?-10+t.rank/1e4:t.rank}function Ss({symbol:t}){const a=gt(t).toLowerCase(),[n,m]=r.useState(!1);return r.useEffect(()=>m(!1),[t]),n?e.jsx("span",{className:`zf-symbol-avatar zf-symbol-avatar--${a}`,children:Se(t).slice(0,2)}):e.jsx("img",{className:`zf-symbol-avatar zf-symbol-avatar--logo zf-symbol-avatar--${a}`,src:ua(t),alt:"","aria-hidden":"true",draggable:!1,loading:"lazy",onError:()=>m(!0)})}const Ca=24;function gs(t,a){var n;return a==="flow-horizontal"?(n=t.layouts)==null?void 0:n["flow-horizontal"]:t.position}function xs(t,a){const n=t.reduce((m,j)=>m+Math.max(1,j.position.w)*Math.min(Math.max(1,j.position.h),a),0);return Math.max(Ca,Math.ceil(n/a*1.25)+8)}function bs(t,a,n){var h;const m=new Set,j=(o,f,p,u)=>{for(let z=0;z<p;z++)for(let N=0;N<u;N++){const x=o+z,R=f+N;x>=0&&R>=0&&m.add(`${x},${R}`)}},d=(o,f,p,u)=>{if(o+p>a||f+u>n)return!1;for(let z=0;z<p;z++)for(let N=0;N<u;N++)if(m.has(`${o+z},${f+N}`))return!1;return!0};for(const o of t){const f=(h=o.layouts)==null?void 0:h["flow-horizontal"];f&&j(f.x,f.y,f.w,Math.min(f.h,n))}return t.map(o=>{var z;if((z=o.layouts)!=null&&z["flow-horizontal"])return o;const f=Math.min(Math.max(1,o.position.w),a),p=Math.min(Math.max(1,o.position.h),n);let u={x:0,y:0,w:f,h:p};e:for(let N=0;N<=a-f;N++)for(let x=0;x<=n-p;x++)if(d(N,x,f,p)){u={x:N,y:x,w:f,h:p};break e}return j(u.x,u.y,u.w,u.h),{...o,layouts:{...o.layouts,"flow-horizontal":u}}})}const Ra='<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>';function ut(t){queueMicrotask(()=>t.unmount())}function Ta({spec:t,registry:a,onSave:n,customiseButtonTarget:m,onAccentHueChange:j,onAccentSatChange:d,onFontScaleChange:h,onUpColorChange:o,onDownColorChange:f,onModeChange:p,onBackgroundChange:u}){const z=Gs(),N=r.useRef(null),x=r.useRef(null),R=r.useRef(!1),T=r.useRef(t.grid.mode),w=r.useRef(new Map),b=r.useRef(new Map),A=r.useRef(new Map),I=r.useRef([]),le=r.useRef(t.theme.accentHue),S=r.useRef(t.theme.accentSat),P=r.useRef(t.theme.baseHue),ce=r.useRef(t.theme.baseSat),ze=r.useRef(t.theme.upColor),bt=r.useRef(t.theme.downColor),yt=r.useRef(t.grid.gap),zt=r.useRef(t.grid.paddingX),De=r.useRef(t.grid.mode),je=r.useRef(null),jt=r.useRef(t.appearance.radius),Nt=r.useRef(t.appearance.borderStrength),vt=r.useRef(t.appearance.surfaceOpacity),kt=r.useRef(t.appearance.density),wt=r.useRef(t.appearance.elevation),St=r.useRef(t.typography.fontFamily),Ct=r.useRef(t.typography.numericStyle),Rt=r.useRef(t.typography.scale),At=r.useRef(t.background.type),Mt=r.useRef(t.background.projectId),Et=r.useRef(t.background.opacity),Tt=r.useRef(t.background.color),Lt=r.useRef(t.background.gradientFrom),Ft=r.useRef(t.background.gradientTo),It=r.useRef(t.background.gradientAngle),$t=r.useRef(0),[L,_e]=r.useState(!1),Cs=ya(z,L),[Rs,Ne]=r.useState(t.frames.length),[O,Ce]=r.useState(t.theme.accentHue),[D,Re]=r.useState(t.theme.accentSat),[_,Ae]=r.useState(t.theme.baseHue),[W,Me]=r.useState(t.theme.baseSat),[U,We]=r.useState(t.theme.upColor),[q,Ue]=r.useState(t.theme.downColor),[$,Ht]=r.useState(t.grid.mode),[As,Pt]=r.useState(!1),[Q,qe]=r.useState(t.grid.gap),[oe,Ke]=r.useState(t.grid.paddingX),[K,Ee]=r.useState(t.appearance.radius),[V,Te]=r.useState(t.appearance.borderStrength),[X,Le]=r.useState(t.appearance.surfaceOpacity),[Y,Fe]=r.useState(t.appearance.density),[Z,Ie]=r.useState(t.appearance.elevation),[ee,Ve]=r.useState(t.typography.fontFamily),[te,Xe]=r.useState(t.typography.numericStyle),[se,Ye]=r.useState(t.typography.scale),[G,Ze]=r.useState(t.background.type),[J,Je]=r.useState(t.background.projectId??we[0].projectId),[ae,Qe]=r.useState(t.background.opacity),[re,et]=r.useState(t.background.color),[ue,Bt]=r.useState(t.background.gradientFrom),[me,Ot]=r.useState(t.background.gradientTo),[ne,tt]=r.useState(t.background.gradientAngle),Ms=r.useCallback(s=>{Ce(s.theme.accentHue),Re(s.theme.accentSat),Ae(s.theme.baseHue),Me(s.theme.baseSat),Ve(s.typography.fontFamily),Xe(s.typography.numericStyle),Ee(s.appearance.radius),Te(s.appearance.borderStrength),Le(s.appearance.surfaceOpacity),Fe(s.appearance.density),Ie(s.appearance.elevation);const i=we.find(l=>l.key===s.scene);i&&(Ze("unicorn"),Je(i.projectId))},[]),Gt=r.useMemo(()=>{var s;return((s=cs.find(i=>{var l;return i.theme.accentHue===O&&i.theme.accentSat===D&&i.theme.baseHue===_&&i.theme.baseSat===W&&i.typography.fontFamily===ee&&i.typography.numericStyle===te&&i.appearance.radius===K&&i.appearance.borderStrength===V&&i.appearance.surfaceOpacity===X&&i.appearance.density===Y&&i.appearance.elevation===Z&&G==="unicorn"&&((l=we.find(g=>g.key===i.scene))==null?void 0:l.projectId)===J}))==null?void 0:s.key)??null},[O,D,_,W,ee,te,K,V,X,Y,Z,G,J]),[de,Dt]=r.useState("frames"),[st,he]=r.useState(null),_t=r.useRef(null);_t.current=st,r.useEffect(()=>{j==null||j(O)},[O,j]),r.useEffect(()=>{d==null||d(D)},[D,d]),r.useEffect(()=>{h==null||h(se)},[se,h]),r.useEffect(()=>{o==null||o(U)},[U,o]),r.useEffect(()=>{f==null||f(q)},[q,f]),r.useEffect(()=>{T.current=$,p==null||p($)},[$,p]),r.useEffect(()=>{u==null||u({...t.background,type:G,projectId:J,opacity:ae,color:re,gradientFrom:ue,gradientTo:me,gradientAngle:ne})},[G,J,ae,re,ue,me,ne,t.background,u]),r.useEffect(()=>{var s;(s=x.current)==null||s.margin(Q/2)},[Q]);const Wt=r.useRef(z);Wt.current=z;const pe=r.useRef(a);pe.current=a;const ge=r.useMemo(()=>{const s=new Map;for(const c of a.values()){const y=c.category??"other",k=s.get(y);k?k.push(c):s.set(y,[c])}const i=os.map(c=>c.key),l=os.map(c=>({key:c.key,label:c.label,description:c.description,frames:s.get(c.key)??[]})),g=[...s.entries()].filter(([c])=>!i.includes(c)).flatMap(([,c])=>c);return g.length&&l.push({key:"other",label:"Other",description:"",frames:g}),l.filter(c=>c.frames.length>0).map(c=>({...c,frames:[...c.frames].sort((y,k)=>y.name.localeCompare(k.name))}))},[a]),[xe,at]=r.useState(""),$e=r.useMemo(()=>qs(xe),[xe]),Ut=$e.length>0,qt=r.useMemo(()=>$e.length===0?ge:ge.map(s=>({...s,frames:s.frames.filter(i=>Ks(i,s.label,$e))})).filter(s=>s.frames.length>0),[ge,$e]),[Kt,Es]=r.useState(()=>new Set(ge[0]?[ge[0].key]:[])),Ts=r.useCallback(s=>{Es(i=>{const l=new Set(i);return l.has(s)?l.delete(s):l.add(s),l})},[]),ve=r.useCallback(s=>s?ba(s):{},[]),He=r.useCallback(s=>{let i=`${s}-${++$t.current}`;for(;w.current.has(i);)i=`${s}-${++$t.current}`;return i},[]),Pe=r.useRef(null),ie=r.useCallback(s=>{const i=A.current.get(s),l=w.current.get(s);if(!i||!l)return;let g=b.current.get(s);g||(i.innerHTML="",g=Os.createRoot(i),b.current.set(s,g)),g.render(e.jsx(Ds,{providers:Wt.current,children:e.jsx(_s.Provider,{value:c=>{var y;return(y=Pe.current)==null?void 0:y.call(Pe,s,c)},children:e.jsx(Ws,{instance:l,registry:pe.current,className:"zf-fill"})})}))},[]),Ls=r.useCallback((s,i)=>{const l=w.current.get(s);l&&(w.current.set(s,{...l,config:{...l.config,...i}}),ie(s))},[ie]);Pe.current=Ls;const Vt=r.useCallback(s=>{const i=x.current;if(!i)return;const l=s.getAttribute("gs-id");if(l){const g=b.current.get(l);g&&ut(g),b.current.delete(l),A.current.delete(l),w.current.delete(l),_t.current===l&&he(null)}i.removeWidget(s,!0),Ne(i.getGridItems().length)},[]),fe=r.useCallback(s=>{if(!s.querySelector(".zf-cfg-btn")){const i=document.createElement("button");i.className="zf-cfg-btn",i.type="button",i.title="Edit frame",i.setAttribute("aria-label","Edit frame"),i.innerHTML=Ra,i.addEventListener("click",l=>{l.stopPropagation();const g=s.getAttribute("gs-id");g&&he(g)}),s.appendChild(i)}if(!s.querySelector(".zf-del-btn")){const i=document.createElement("button");i.className="zf-del-btn",i.type="button",i.title="Remove frame",i.innerHTML="×",i.addEventListener("click",l=>{l.stopPropagation(),Vt(s)}),s.appendChild(i)}},[Vt]),Xt=r.useCallback(s=>{var i,l;(i=s.querySelector(".zf-cfg-btn"))==null||i.remove(),(l=s.querySelector(".zf-del-btn"))==null||l.remove()},[]),Be=r.useCallback((s,i=!1)=>{const l=T.current,g=l==="flow-horizontal",c=gs(s,l),y=(c==null?void 0:c.w)??s.position.w,k=(c==null?void 0:c.h)??s.position.h,v=g?Math.min(k,t.grid.rows):k,E=pe.current.get(s.frame),C=E==null?void 0:E.layout,M=document.createElement("div");M.className="grid-stack-item",M.setAttribute("gs-id",s.id),M.setAttribute("data-frame",s.frame),i||!c?M.setAttribute("gs-auto-position","true"):(M.setAttribute("gs-x",String(c.x)),M.setAttribute("gs-y",String(c.y))),M.setAttribute("gs-w",String(y)),M.setAttribute("gs-h",String(v)),C!=null&&C.minW&&M.setAttribute("gs-min-w",String(C.minW)),C!=null&&C.minH&&M.setAttribute("gs-min-h",String(C.minH)),C!=null&&C.maxW&&M.setAttribute("gs-max-w",String(C.maxW)),C!=null&&C.maxH&&M.setAttribute("gs-max-h",String(C.maxH));const F=document.createElement("div");return F.className="grid-stack-item-content",M.appendChild(F),A.current.set(s.id,F),M},[t.grid.rows]),ke=r.useCallback(s=>{const i=x.current;if(i){b.current.forEach(ut),b.current.clear(),A.current.clear(),w.current=new Map(s.map(l=>[l.id,l])),i.removeAll(!0),i.el.querySelectorAll(".grid-stack-item").forEach(l=>l.remove()),i.batchUpdate();for(const l of s){const g=Be(l);i.el.appendChild(g),i.makeWidget(g),ie(l.id)}i.batchUpdate(!1),Ne(s.length)}},[Be,ie]),Yt=r.useCallback(s=>{var k,v;const i=x.current;if(!i)return;const l=pe.current.get(s),g=He(s),c={id:g,frame:s,position:{x:0,y:0,w:((k=l==null?void 0:l.layout)==null?void 0:k.w)??4,h:((v=l==null?void 0:l.layout)==null?void 0:v.h)??3},config:ve(l)};w.current.set(g,c);const y=Be(c,!0);i.el.appendChild(y),i.makeWidget(y),ie(g),fe(y),Ne(i.getGridItems().length),he(g)},[Be,fe,ve,ie,He]),Oe=r.useCallback(()=>{var g,c;const s=typeof window<"u"?window.innerHeight:800,i=((c=(g=N.current)==null?void 0:g.parentElement)==null?void 0:c.getBoundingClientRect().top)??120,l=s-i-56;return Math.max(80,Math.floor(l/t.grid.rows))},[t.grid.rows]),rt=r.useCallback(()=>{const s=x.current;if(!s)return;const i=s.el;s.off("dropped"),s.off("removed"),s.off("drag"),s.off("dragstart"),s.off("dragstop"),document.body.classList.remove("zf-dragging"),b.current.forEach(ut),b.current.clear(),A.current.clear(),s.destroy(!1),i&&(i.querySelectorAll(".grid-stack-item").forEach(l=>l.remove()),i.style.width="",i.style.height=""),x.current=null},[]),nt=r.useCallback((s,i)=>{const l=s==="flow-horizontal",g=l?Oe():t.grid.rowHeight,c=ls.init({column:l?i:t.grid.columns,cellHeight:g,margin:t.grid.gap/2,float:!0,...l?{maxRow:t.grid.rows,minRow:t.grid.rows}:{},animate:!0,acceptWidgets:!0,disableDrag:!0,disableResize:!0},N.current);return c.el.style.width=l?`${i*g}px`:"",c.on("dropped",(y,k,v)=>{var rs,ns;const E=v==null?void 0:v.el;if(!E)return;const C=E.querySelector(".grid-stack-item-content"),M=E.getAttribute("data-frame");if(!C||!M)return;const F=E.getAttribute("gs-id")||He(M);E.setAttribute("gs-id",F);const B=pe.current.get(M),ts=(v==null?void 0:v.w)??((rs=B==null?void 0:B.layout)==null?void 0:rs.w)??4,ss=(v==null?void 0:v.h)??((ns=B==null?void 0:B.layout)==null?void 0:ns.h)??3,as={x:(v==null?void 0:v.x)??0,y:(v==null?void 0:v.y)??0,w:ts,h:ss},Bs=T.current==="flow-horizontal"?{id:F,frame:M,position:{x:0,y:0,w:ts,h:ss},layouts:{"flow-horizontal":as},config:ve(B)}:{id:F,frame:M,position:as,config:ve(B)};w.current.set(F,Bs),A.current.set(F,C),ie(F),fe(E),Ne(c.getGridItems().length),he(F)}),c.on("removed",()=>Ne(c.getGridItems().length)),c.on("dragstart",()=>document.body.classList.add("zf-dragging")),c.on("dragstop",()=>document.body.classList.remove("zf-dragging")),l&&c.on("drag",y=>{var M,F,B;const k=(M=N.current)==null?void 0:M.parentElement;if(!k)return;const v=k.getBoundingClientRect(),E=y.clientX??((B=(F=y.touches)==null?void 0:F[0])==null?void 0:B.clientX);if(E==null)return;const C=64;E<v.left+C?k.scrollLeft-=18:E>v.right-C&&(k.scrollLeft+=18)}),c},[Oe,t.grid.columns,t.grid.rowHeight,t.grid.rows,t.grid.gap,He,ve,ie,fe]);r.useEffect(()=>{if(!N.current||R.current)return;R.current=!0;const s=T.current==="flow-horizontal",i=s?xs(t.frames,t.grid.rows):t.grid.columns;return x.current=nt(T.current,i),ke(s?bs(t.frames,i,t.grid.rows):t.frames),()=>{rt(),R.current=!1}},[]),r.useEffect(()=>{const s=x.current;s&&(s.enableMove(L),s.enableResize(L),L?s.getGridItems().forEach(fe):s.getGridItems().forEach(Xt))},[L,fe,Xt]),r.useEffect(()=>{const s=x.current;if(!s||T.current!=="flow-horizontal")return;const i=requestAnimationFrame(()=>{const l=Oe();s.cellHeight(l),s.el.style.width=`${s.getColumn()*l}px`});return()=>cancelAnimationFrame(i)},[L,Oe]),r.useEffect(()=>{!L||de!=="frames"||!x.current||ls.setupDragIn(".zf-newwidget",{appendTo:"body",helper:s=>{var C;const l=(s.closest(".zf-newwidget")??s).dataset.frame??"",g=pe.current.get(l),c=g==null?void 0:g.layout,y=document.createElement("div");y.className="grid-stack-item",y.setAttribute("data-frame",l),y.setAttribute("gs-w",String((c==null?void 0:c.w)??4)),y.setAttribute("gs-h",String((c==null?void 0:c.h)??3)),c!=null&&c.minW&&y.setAttribute("gs-min-w",String(c.minW)),c!=null&&c.minH&&y.setAttribute("gs-min-h",String(c.minH)),c!=null&&c.maxW&&y.setAttribute("gs-max-w",String(c.maxW)),c!=null&&c.maxH&&y.setAttribute("gs-max-h",String(c.maxH));const k=(C=N.current)==null?void 0:C.closest(".zf-editor");if(k){const M=getComputedStyle(k);for(const F of["--zf-accent-hue","--zf-accent-sat","--font-dmsans"]){const B=M.getPropertyValue(F).trim();B&&y.style.setProperty(F,B)}}const v=l.replace(/-/g," "),E=g!=null&&g.iconUrl?`<img class="zf-drag-ghost-icon" src="${g.iconUrl}" alt="" />`:"";return y.innerHTML=`<div class="grid-stack-item-content zf-drag-ghost" data-frame="${l}">${E}<span class="zf-drag-ghost-name">${v}</span></div>`,y}})},[L,de,ge,Kt]);const be=r.useCallback(()=>{const s=x.current,i=[];if(s)for(const l of s.getGridItems()){const g=l.getAttribute("gs-id");if(!g)continue;const c=w.current.get(g);if(!c)continue;const y=l.gridstackNode,k=gs(c,$)??c.position,v={x:(y==null?void 0:y.x)??k.x,y:(y==null?void 0:y.y)??k.y,w:(y==null?void 0:y.w)??k.w,h:(y==null?void 0:y.h)??k.h};i.push($==="flow-horizontal"?{...c,layouts:{...c.layouts,"flow-horizontal":v}}:{...c,position:v})}return i.sort((l,g)=>l.position.y-g.position.y||l.position.x-g.position.x),{...t,grid:{...t.grid,gap:Q,paddingX:oe,mode:$},background:{...t.background,type:G,projectId:J,opacity:ae,color:re,gradientFrom:ue,gradientTo:me,gradientAngle:ne},theme:{...t.theme,accentHue:O,accentSat:D,baseHue:_,baseSat:W,upColor:U,downColor:q},typography:{...t.typography,fontFamily:ee,numericStyle:te,scale:se},appearance:{...t.appearance,radius:K,borderStrength:V,surfaceOpacity:X,density:Y,elevation:Z},frames:i}},[t,O,D,_,W,U,q,ee,te,se,Q,oe,$,K,V,X,Y,Z,G,J,ae,re,ue,me,ne]),Zt=r.useCallback(s=>{const i=new Blob([`${JSON.stringify(s,null,2)}
|
|
68
|
+
`],{type:"application/json"}),l=URL.createObjectURL(i),g=document.createElement("a");g.href=l,g.download="dashboard.json",g.click(),setTimeout(()=>URL.revokeObjectURL(l),0)},[]),Fs=r.useCallback(()=>{I.current=be().frames,le.current=O,S.current=D,P.current=_,ce.current=W,ze.current=U,bt.current=q,yt.current=Q,zt.current=oe,De.current=$,jt.current=K,Nt.current=V,vt.current=X,kt.current=Y,wt.current=Z,St.current=ee,Ct.current=te,Rt.current=se,At.current=G,Mt.current=J,Et.current=ae,Tt.current=re,Lt.current=ue,Ft.current=me,It.current=ne,_e(!0)},[be,O,D,_,W,U,q,Q,oe,$,K,V,X,Y,Z,ee,te,se,G,J,ae,re,ue,me,ne]),Is=r.useCallback(()=>{(De.current!==T.current||JSON.stringify(be().frames)!==JSON.stringify(I.current))&&ke(I.current),Ce(le.current),Re(S.current),Ae(P.current),Me(ce.current),We(ze.current),Ue(bt.current),qe(yt.current),Ke(zt.current),Ht(De.current),Ee(jt.current),Te(Nt.current),Le(vt.current),Fe(kt.current),Ie(wt.current),Ve(St.current),Xe(Ct.current),Ye(Rt.current),Ze(At.current),Je(Mt.current??we[0].projectId),Qe(Et.current),et(Tt.current),Bt(Lt.current),Ot(Ft.current),tt(It.current),he(null),_e(!1)},[ke,be]),$s=r.useCallback(async()=>{const s=be();_e(!1),he(null),n?await n(s):Zt(s)},[be,n,Zt]),Hs=r.useCallback(()=>{var s;(s=x.current)==null||s.compact(T.current==="flow-horizontal"?"list":"compact")},[]),Jt=r.useCallback(()=>{const s=x.current;if(!s)return;const i=T.current;for(const l of s.getGridItems()){const g=l.getAttribute("gs-id");if(!g)continue;const c=w.current.get(g);if(!c)continue;const y=l.gridstackNode;if(!y)continue;const k={x:y.x??0,y:y.y??0,w:y.w??1,h:y.h??1};w.current.set(g,i==="flow-horizontal"?{...c,layouts:{...c.layouts,"flow-horizontal":k}}:{...c,position:k})}},[]),Qt=r.useCallback(s=>{var g;if(s===T.current)return;const i=()=>{Jt();const c=[...w.current.values()],y=L,k=s==="flow-horizontal",v=k?xs(c,t.grid.rows):t.grid.columns;rt(),T.current=s,Ht(s);const E=nt(s,v);x.current=E,ke(k?bs(c,v,t.grid.rows):c),y&&(E.enableMove(!0),E.enableResize(!0),E.getGridItems().forEach(fe))};if(typeof window<"u"&&((g=window.matchMedia)==null?void 0:g.call(window,"(prefers-reduced-motion: reduce)").matches)){i();return}je.current&&clearTimeout(je.current),Pt(!0),je.current=setTimeout(()=>{i(),requestAnimationFrame(()=>Pt(!1))},150)},[L,Jt,rt,nt,ke,fe,t.grid.rows,t.grid.columns]);r.useEffect(()=>()=>{je.current&&clearTimeout(je.current)},[]);const es=()=>e.jsx("button",{type:"button",className:"zf-btn zf-btn--icon",onClick:Fs,"aria-label":"Customise",title:"Customise",children:e.jsx(ca,{size:18,"aria-hidden":"true"})}),it=L&&st?w.current.get(st):void 0,Ps=$==="flow-horizontal";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:Us}),m&&!L?is.createPortal(es(),m):null,e.jsxs("div",{className:L?"zf-editor zf-customise":"zf-editor","data-mode":$,"data-wiggle":L&&Rs>12?"off":void 0,style:{"--zf-accent-hue":O,"--zf-accent-sat":`${D}%`,"--zf-base-hue":_,"--zf-base-sat":`${W}%`,"--zf-up":U,"--zf-down":q,"--zf-font-family":ms[ee],"--zf-numeric":us[te],"--zf-frame-radius":`${K}px`,"--zf-border-alpha":V,"--zf-surface-opacity":X,"--zf-density":Y,"--zf-elevation":Z,"--zf-pad-x":`${oe}px`},children:[(L||!m)&&e.jsxs("div",{className:"zf-editor-bar",children:[e.jsx("div",{className:"zf-editor-bar-spacer"}),L?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"zf-btn zf-btn--ghost",onClick:Hs,title:"Reclaim empty grid space",children:"Tidy"}),e.jsx("button",{type:"button",className:"zf-btn zf-btn--ghost",onClick:Is,children:"Cancel"}),e.jsx("button",{type:"button",className:"zf-btn zf-btn--primary",onClick:$s,children:"Save"})]}):es()]}),e.jsxs("div",{className:"zf-editor-main",children:[e.jsx("div",{className:"zf-editor-grid","data-switching":As,children:e.jsx("div",{ref:N,className:"grid-stack"})}),e.jsx("aside",{className:"zf-rail","aria-hidden":!L,inert:!L,children:e.jsxs("div",{className:"zf-rail-inner",children:[e.jsxs("div",{className:"zf-rail-tabs",role:"tablist","aria-label":"Customise",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":de==="frames",className:de==="frames"?"zf-rail-tab is-active":"zf-rail-tab",onClick:()=>Dt("frames"),children:"Frames"}),e.jsx("button",{type:"button",role:"tab","aria-selected":de==="cosmetics",className:de==="cosmetics"?"zf-rail-tab is-active":"zf-rail-tab",onClick:()=>Dt("cosmetics"),children:"Cosmetics"})]}),de==="cosmetics"&&e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",style:{margin:0},children:"Presets"}),e.jsx("div",{className:"zf-presets",children:cs.map(s=>e.jsxs("button",{type:"button",className:Gt===s.key?"zf-preset is-active":"zf-preset",title:s.description,"aria-pressed":Gt===s.key,onClick:()=>Ms(s),children:[e.jsx("span",{className:"zf-preset-swatch",style:{background:`linear-gradient(135deg, hsl(${s.theme.baseHue} ${s.theme.baseSat}% 16%) 0 52%, hsl(${s.theme.accentHue} ${s.theme.accentSat}% 62%) 52% 100%)`}}),e.jsx("span",{className:"zf-preset-label",children:s.label})]},s.key))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",style:{margin:0},children:"Accent"}),e.jsxs("div",{className:"zf-theme-row",style:{margin:"10px 0 0"},children:[e.jsxs("span",{className:"zf-theme-val",children:[e.jsx("span",{className:"zf-theme-swatch"}),"Hue ",O,"°"]}),O!==242&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ce(242),children:"Reset"})]}),e.jsx("input",{type:"range",className:"zf-hue-slider",min:0,max:360,value:O,"aria-label":"Accent hue",onChange:s=>Ce(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Saturation"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[D!==90&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Re(90),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[D,"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:100,value:D,"aria-label":"Accent saturation",onChange:s=>Re(Number(s.target.value))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Surface"}),e.jsxs("div",{className:"zf-theme-row",style:{margin:"10px 0 0"},children:[e.jsxs("span",{className:"zf-theme-val",children:[e.jsx("span",{className:"zf-theme-swatch",style:{background:`hsl(${_} ${W}% 32%)`,boxShadow:"none"}}),"Tint ",_,"°"]}),_!==233&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ae(233),children:"Reset"})]}),e.jsx("input",{type:"range",className:"zf-hue-slider",min:0,max:360,value:_,"aria-label":"Surface tint hue",onChange:s=>Ae(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Tint strength"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[W!==20&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Me(20),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[W,"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:100,value:W,"aria-label":"Surface tint strength",onChange:s=>Me(Number(s.target.value))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Gain / Loss"}),e.jsxs("div",{className:"zf-theme-row",style:{margin:"10px 0 0"},children:[e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:U,"aria-label":"Gain (up) colour",onChange:s=>We(s.target.value)}),"Up ",U]}),U.toLowerCase()!=="#3fd08f"&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>We("#3fd08f"),children:"Reset"})]}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:9},children:[e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:q,"aria-label":"Loss (down) colour",onChange:s=>Ue(s.target.value)}),"Down ",q]}),q.toLowerCase()!=="#ff6b81"&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ue("#ff6b81"),children:"Reset"})]})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Background"}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Background style",children:["none","color","gradient","unicorn"].map(s=>e.jsx("button",{type:"button",className:G===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":G===s,onClick:()=>Ze(s),children:s==="none"?"Glow":s==="color"?"Color":s==="gradient"?"Gradient":"Scene"},s))}),G==="color"&&e.jsxs("div",{className:"zf-theme-row",style:{marginTop:12},children:[e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:re,"aria-label":"Background colour",onChange:s=>et(s.target.value)}),re]}),re.toLowerCase()!=="#0a0a12"&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>et("#0a0a12"),children:"Reset"})]}),G==="gradient"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"zf-theme-row",style:{marginTop:12},children:e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:ue,"aria-label":"Gradient start colour",onChange:s=>Bt(s.target.value)}),"From ",ue]})}),e.jsx("div",{className:"zf-theme-row",style:{marginTop:9},children:e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:me,"aria-label":"Gradient end colour",onChange:s=>Ot(s.target.value)}),"To ",me]})}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Angle"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[ne!==160&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>tt(160),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[ne,"°"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:360,value:ne,"aria-label":"Gradient angle",onChange:s=>tt(Number(s.target.value))})]}),G==="unicorn"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"zf-presets",style:{marginTop:12},role:"group","aria-label":"Background scene",children:we.map(s=>e.jsxs("button",{type:"button",className:J===s.projectId?"zf-preset is-active":"zf-preset",title:s.description,"aria-pressed":J===s.projectId,onClick:()=>Je(s.projectId),children:[e.jsx("span",{className:"zf-preset-swatch",style:{background:s.swatch}}),e.jsx("span",{className:"zf-preset-label",children:s.label})]},s.key))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Opacity"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[ae!==.16&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Qe(.16),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(ae*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:.6,step:.02,value:ae,"aria-label":"Background scene opacity",onChange:s=>Qe(Math.round(Number(s.target.value)*100)/100)})]})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Layout"}),e.jsx("div",{className:"zf-theme-row",children:e.jsx("span",{className:"zf-theme-val",children:"Direction"})}),e.jsxs("div",{className:"zf-mode-seg",role:"group","aria-label":"Dashboard layout direction",children:[e.jsx("button",{type:"button",className:$==="flow-vertical"?"zf-mode-seg-btn is-active":"zf-mode-seg-btn","aria-pressed":$==="flow-vertical",onClick:()=>Qt("flow-vertical"),children:"Vertical"}),e.jsx("button",{type:"button",className:$==="flow-horizontal"?"zf-mode-seg-btn is-active":"zf-mode-seg-btn","aria-pressed":$==="flow-horizontal",onClick:()=>Qt("flow-horizontal"),children:"Horizontal"})]}),Ps&&e.jsx("p",{className:"zf-mode-seg-hint",children:"Rows fill the height; the board scrolls sideways. Arrange it freely — this layout is saved separately from Vertical."}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Frame gap"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[Q!==12&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>qe(12),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Q,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:12,value:Q,"aria-label":"Frame gap",onChange:s=>qe(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Side padding"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[oe!==0&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ke(0),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[oe,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:96,step:4,value:oe,"aria-label":"Grid side padding",onChange:s=>Ke(Number(s.target.value))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Appearance"}),e.jsxs("div",{className:"zf-theme-row",children:[e.jsx("span",{className:"zf-theme-val",children:"Corner radius"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[K!==18&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ee(18),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[K,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:32,value:K,"aria-label":"Corner radius",onChange:s=>Ee(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Border"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[V!==.22&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Te(.22),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(V*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:1,step:.01,value:V,"aria-label":"Border strength",onChange:s=>Te(Math.round(Number(s.target.value)*100)/100)}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Card opacity"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[X!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Le(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(X*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:.3,max:1,step:.05,value:X,"aria-label":"Card opacity",onChange:s=>Le(Math.round(Number(s.target.value)*100)/100)}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Density"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[Y!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Fe(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(Y*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:.6,max:1.4,step:.05,value:Y,"aria-label":"Card density",onChange:s=>Fe(Math.round(Number(s.target.value)*100)/100)}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Elevation"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[Z!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ie(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Z.toFixed(1),"×"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:2,step:.1,value:Z,"aria-label":"Card elevation",onChange:s=>Ie(Math.round(Number(s.target.value)*10)/10)})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Typography"}),e.jsx("div",{className:"zf-theme-row",children:e.jsx("span",{className:"zf-theme-val",children:"Font"})}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Font family",children:["sans","mono","serif"].map(s=>e.jsx("button",{type:"button",className:ee===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":ee===s,style:{fontFamily:ms[s]},onClick:()=>Ve(s),children:s==="sans"?"Sans":s==="mono"?"Mono":"Serif"},s))}),e.jsx("div",{className:"zf-theme-row",style:{marginTop:13},children:e.jsx("span",{className:"zf-theme-val",children:"Numbers"})}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Numeric style",children:["proportional","tabular"].map(s=>e.jsx("button",{type:"button",className:te===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":te===s,onClick:()=>Xe(s),children:e.jsx("span",{style:{fontVariantNumeric:us[s]},children:s==="proportional"?"Normal 1,071":"Tabular 1,071"})},s))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Text size"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[se!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ye(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(se*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:.85,max:1.25,step:.05,value:se,"aria-label":"Text size",onChange:s=>Ye(Math.round(Number(s.target.value)*100)/100)})]})]}),de==="frames"&&e.jsxs("section",{children:[e.jsx("h3",{className:"zf-rail-title",children:"Add a frame"}),e.jsx("p",{className:"zf-palette-hint",children:"Search, or open a category, then click a frame to add it — or drag it onto the grid."}),e.jsxs("div",{className:"zf-palette-search",children:[e.jsx(zs,{size:14,"aria-hidden":"true"}),e.jsx("input",{type:"text",value:xe,placeholder:"Search frames…","aria-label":"Search frames",autoComplete:"off",spellCheck:!1,onChange:s=>at(s.target.value),onKeyDown:s=>{s.key==="Escape"&&xe&&(s.preventDefault(),at(""))}}),xe&&e.jsx("button",{type:"button",className:"zf-palette-search-clear","aria-label":"Clear search",onClick:()=>at(""),children:e.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"zf-palette-cats",children:[Ut&&qt.length===0&&e.jsxs("p",{className:"zf-palette-empty",children:["No frames match “",xe.trim(),"”."]}),qt.map(s=>{const i=Ut||Kt.has(s.key);return e.jsxs("div",{className:i?"zf-palette-cat is-open":"zf-palette-cat",children:[e.jsxs("button",{type:"button",className:"zf-palette-cat-header","aria-expanded":i,onClick:()=>Ts(s.key),children:[e.jsx("svg",{className:"zf-palette-cat-chevron",viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("span",{className:"zf-palette-cat-label",children:s.label}),e.jsx("span",{className:"zf-palette-cat-count",children:s.frames.length})]}),i&&e.jsxs("div",{className:"zf-palette-cat-body",children:[s.description&&e.jsx("p",{className:"zf-palette-cat-desc",children:s.description}),e.jsx("div",{className:"zf-palette",children:s.frames.map(l=>{var g,c,y,k,v,E;return e.jsxs("div",{className:"grid-stack-item zf-newwidget","data-frame":l.name,"gs-w":((g=l.layout)==null?void 0:g.w)??4,"gs-h":((c=l.layout)==null?void 0:c.h)??3,"gs-min-w":(y=l.layout)==null?void 0:y.minW,"gs-min-h":(k=l.layout)==null?void 0:k.minH,"gs-max-w":(v=l.layout)==null?void 0:v.maxW,"gs-max-h":(E=l.layout)==null?void 0:E.maxH,role:"button",tabIndex:0,title:`Drag onto the board, or click to add ${l.label}`,onClick:()=>Yt(l.name),onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),Yt(l.name))},children:[l.iconUrl&&e.jsx("img",{className:"zf-newwidget-icon",src:l.iconUrl,alt:"",loading:"lazy",draggable:!1}),e.jsxs("div",{className:"zf-newwidget-copy",children:[e.jsx("div",{className:"zf-newwidget-name",children:l.label}),e.jsx("div",{className:"zf-newwidget-desc",children:l.description})]})]},l.name)})})]})]},s.key)})]})]})]})})]})]}),it?is.createPortal(e.jsx(za,{instance:it,registry:a,instancesRef:w,symbolUniverse:Cs,accentHue:O,onApply:s=>ie(s),onClose:()=>he(null)},it.id),document.body):null]})}export{Ta as DashboardEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{c as a,f as o}from"./format-CfAcS4D8.js";import{M as d}from"./metric-row-BVVhjsjK.js";import{f as m,bz as n,bA as x}from"./index-kB-TyxKi.js";import{F as r,s as p}from"./ui-Bq3RQsdJ.js";n.schema;const i=e=>e>=0?`+${o(e)}`:o(e);function u({config:e}){const{flows:l,isLoading:c}=x(e.asset);if(c)return s.jsx(r,{loading:!0,children:"loading ETF flows…"});if(!l)return s.jsx(r,{children:"ETF flows unavailable"});const f=l.issuers.slice(0,e.limit);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"caption text-soft",children:[e.asset.toUpperCase()," spot ETF · net flow",l.date?` · ${l.date}`:""]}),s.jsx("div",{className:"metric-lg leading-none",style:{color:a(l.dailyTotalNetInflow)},children:i(l.dailyTotalNetInflow)})]}),s.jsx("div",{className:`${p} flex flex-col`,children:f.map(t=>s.jsx(d,{label:t.ticker,meta:t.institute,value:s.jsx("span",{style:{color:a(t.dailyNetInflow)},children:i(t.dailyNetInflow)})},t.ticker))})]})}const g=m({...n,component:u});export{g as etfFlowsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as s}from"./react-qoZPGuNy.js";import{f as c}from"./format-CfAcS4D8.js";import{f as h,bI as l,bA as d}from"./index-kB-TyxKi.js";import{F as n}from"./ui-Bq3RQsdJ.js";import{a as r,C}from"./chart-utils-Ct7WziT9.js";import{M}from"./index-DKixdHYB.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";const F={"1M":{ms:30*864e5,timeframe:r["1M"]},"3M":{ms:90*864e5,timeframe:r["3M"]},"6M":{ms:180*864e5,timeframe:r.YTD}};l.schema;function w({config:t}){const{ms:o,timeframe:u}=F[t.lookback],m=f.useMemo(()=>Date.now()-o,[o]),{flows:e,isLoading:p}=d(t.asset),i=f.useMemo(()=>[{id:t.asset,name:`${t.asset.toUpperCase()} net flow`,color:C[0],data:((e==null?void 0:e.history)??[]).filter(a=>a.time>=m).map(a=>({date:new Date(a.time).toISOString(),value:a.value}))}],[e,t.asset,m]);return p?s.jsx(n,{loading:!0,children:"loading ETF flows…"}):i[0].data.length===0?s.jsx(n,{children:"ETF flows unavailable"}):s.jsx(M,{series:i,timeframe:u,height:220,formatValue:c})}const I=h({...l,component:w});export{I as etfFlowsChartFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./react-qoZPGuNy.js";import{M as e,Z as a}from"./cycle-shared-pyXzkgt1.js";import{U as n,b as s}from"./format-CfAcS4D8.js";import{f as p,bw as m,bv as l}from"./index-kB-TyxKi.js";import{F as i}from"./ui-Bq3RQsdJ.js";import"./indicators-CogwjDn9.js";import"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";function u(){const{supply:r,isLoading:o}=l();return o?t.jsx(i,{loading:!0,children:"loading staking APR…"}):r?t.jsx(e,{caption:"ETH Staking APR",headline:s(r.stakingAprPct),headlineColor:n,zone:{label:"validator yield",color:a},sub:"issuance + MEV + tips",sparkline:[],sparkColor:a}):t.jsx(i,{children:"no ETH data yet"})}const b=p({...m,component:u});export{b as ethStakingFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{M as s}from"./cycle-shared-pyXzkgt1.js";import{U as p,D as l}from"./format-CfAcS4D8.js";import{f as u,bu as m,bv as y}from"./index-kB-TyxKi.js";import{F as a}from"./ui-Bq3RQsdJ.js";import"./indicators-CogwjDn9.js";import"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";const n=r=>`${Math.round(r).toLocaleString("en-US")} ETH/yr`;function c(){const{supply:r,isLoading:i}=y();if(i)return e.jsx(a,{loading:!0,children:"loading ETH supply…"});if(!r)return e.jsx(a,{children:"no ETH data yet"});const t=r.supplyGrowthYearlyPct,o=t<=0?p:l;return e.jsx(s,{caption:"ETH Net Supply Growth · yr",headline:`${t>=0?"+":""}${t.toFixed(2)}%`,headlineColor:o,zone:{label:t<=0?"Deflationary":"Inflationary",color:o},sub:`burn ${n(r.burnRateYearlyEth)} · issue ${n(r.issuanceRateYearlyEth)}`,sparkline:r.history,sparkColor:o})}const F=u({...m,component:c});export{F as ethSupplyFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{f as u,C as l,D as m}from"./index-
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{f as u,C as l,D as m}from"./index-kB-TyxKi.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{M as p}from"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";l.schema;function x(r){return r<=25?"#F21553":r<=45?"#F97316":r<=55?"#F59E0B":r<=75?"#84CC16":"#25A78D"}function f({config:r}){const{points:s,isLoading:o}=m(r.sparklineDays),t=s[0],d=c.useMemo(()=>[...s].reverse().map(n=>({date:new Date(n.time).toISOString(),value:n.value})),[s]);if(o)return e.jsx(i,{loading:!0,children:"loading index…"});if(!t)return e.jsx(i,{children:"no sentiment data yet"});const a=x(t.value);return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2.5",children:[e.jsx("div",{className:"metric-xl leading-none",style:{color:a,textShadow:`0 0 28px ${a}55`},children:t.value}),e.jsx("div",{className:"body-sm rounded-full px-2.5 py-0.5 font-semibold uppercase tracking-wide",style:{color:a,background:`${a}1f`,border:`1px solid ${a}33`},children:t.classification}),e.jsxs("div",{className:"relative w-full max-w-[180px] overflow-hidden rounded-xl",children:[e.jsx("div",{className:"h-[11px] w-full opacity-40",style:{background:"linear-gradient(90deg, #FF1F5F 4.89%, #464646 34.15%, #464646 69.98%, #81FE90 100%)"}}),e.jsx("div",{className:"absolute left-0 top-0 h-full w-full",style:{background:"repeating-linear-gradient(to right, var(--color-background-terminal), var(--color-background-terminal) 2px, transparent 2px, transparent 3px)"}}),e.jsx("div",{className:"absolute top-1/2 h-3 w-[3px] -translate-x-1/2 -translate-y-1/2 rounded-xs",style:{left:`${t.value}%`,background:a}})]}),e.jsx(p,{data:d,width:150,height:30,color:a}),e.jsxs("div",{className:"caption text-soft",children:["crypto fear & greed · ",r.sparklineDays,"d"]})]})}const b=u({...l,component:f});export{b as fearGreedFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f,E as p,G as h,h as u,A as F}from"./index-
|
|
1
|
+
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f,E as p,G as h,h as u,A as F}from"./index-kB-TyxKi.js";import{F as j}from"./feed-row-mVg1d5Zj.js";import{t as b}from"./format-CfAcS4D8.js";import{F as a,s as y}from"./ui-Bq3RQsdJ.js";p.schema;const n={"10-K":"Annual report","10-Q":"Quarterly report","8-K":"Material event","20-F":"Annual report (foreign)","40-F":"Annual report (foreign)","6-K":"Foreign interim report","S-1":"Registration","S-3":"Registration","S-4":"Registration (M&A)","DEF 14A":"Proxy statement",DEFA14A:"Proxy materials","SC 13D":"Activist stake","SC 13G":"Passive stake",SD:"Specialized disclosure",3:"Initial insider ownership",4:"Insider transaction",5:"Annual insider ownership",144:"Proposed insider sale","11-K":"Employee benefit plan"},A=/^(10-K|10-Q|8-K|20-F|40-F|6-K|S-|F-|424|DEF |DEFA|DEFM|11-K|SC 13|25)/i,E=/^(3|4|5|144)(\/A)?$/;function l(e){return e.replace(/^SCHEDULE /i,"SC ").trim()}function S(e,s){return s==="all"?!0:s==="insider"?E.test(e):A.test(e)}function D(e){const s=l(e.form);if(n[s])return n[s];const r=s.replace(/\/A$/,"");return r!==s&&n[r]?`${n[r]} (amended)`:e.description&&e.description.toUpperCase()!==e.form.toUpperCase()?e.description:s}function N({filing:e}){return t.jsx(j,{href:e.url,titleAttr:e.form,leading:t.jsx("span",{className:"caption text-strong inline-flex w-16 shrink-0 justify-center truncate rounded bg-white/[0.06] px-1.5 py-1 font-bold",children:l(e.form)}),title:D(e),subtitle:e.reportDate?`period ${e.reportDate}`:e.items?`items ${e.items}`:e.accessionNumber,meta:e.filingDate?b(new Date(e.filingDate).getTime()):void 0})}function v({config:e}){const{data:s,isLoading:r}=h(e.symbol),m=x.useMemo(()=>((s==null?void 0:s.filings)??[]).filter(i=>S(l(i.form),e.forms)).slice(0,e.count),[s==null?void 0:s.filings,e.forms,e.count]);if(r)return t.jsx(a,{loading:!0,children:"loading SEC filings…"});if(!s)return t.jsxs(a,{children:["no SEC data for “",u(e.symbol),"”"]});const o=s.tickers[0],c=e.symbol.includes(":")?e.symbol:o?`xyz:${o}`:null,d=[s.exchanges[0],s.category].filter(Boolean).join(" · ");return t.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c&&t.jsx(F,{symbol:c,size:22}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:s.name||o||u(e.symbol)}),d&&t.jsx("div",{className:"caption text-soft truncate",children:d})]})]}),t.jsx("div",{className:"caption text-soft shrink-0 text-right",children:"filings"})]}),t.jsx("div",{className:y,children:m.length>0?m.map(i=>t.jsx(N,{filing:i},i.accessionNumber)):t.jsxs(a,{children:["no ",e.forms==="all"?"":`${e.forms} `,"filings yet"]})})]})}const k=f({...p,component:v});export{k as filingsFeedFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{D as m,U as x}from"./format-CfAcS4D8.js";import{f as h,J as l,K as u}from"./index-
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{D as m,U as x}from"./format-CfAcS4D8.js";import{f as h,J as l,K as u}from"./index-kB-TyxKi.js";import{F as r}from"./ui-Bq3RQsdJ.js";import{M as f}from"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";l.schema;function n(t){return t>0?m:x}function p(t){return t>=2.5?"high stress":t>=1?"elevated":t>-1?"near average":"below average"}function j({config:t}){const{stress:s,isLoading:d}=u(),o=c.useMemo(()=>((s==null?void 0:s.trend)??[]).slice(-t.trendDays).map(a=>({date:new Date(a.time).toISOString(),value:a.value})),[t.trendDays,s==null?void 0:s.trend]);if(d)return e.jsx(r,{loading:!0,children:"loading stress index…"});if(!s)return e.jsx(r,{children:"no stress-index data yet"});const i=n(s.value);return e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"OFR FSI"}),e.jsx("div",{className:"body-sm text-normal",children:s.date})]}),e.jsx("div",{className:"caption text-soft text-right",children:"daily"})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"metric-xl leading-none",style:{color:i,textShadow:`0 0 24px ${i}44`},children:[s.value>0?"+":"",s.value.toFixed(2)]}),e.jsx("div",{className:"caption text-soft mt-1",children:p(s.value)})]}),e.jsxs("div",{className:"caption text-soft max-w-[46%] text-right leading-snug",children:["0 = long-run average",e.jsx("br",{}),"higher = more stress"]})]}),e.jsx(f,{data:o,width:210,height:42,color:i}),t.showCategories&&s.categories.length>0&&e.jsx("div",{className:"grid grid-cols-2 gap-1.5 border-t border-white/[0.08] pt-2",children:s.categories.map(a=>e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"caption text-soft truncate",children:a.label}),e.jsxs("span",{className:"body-sm font-bold tabular-nums",style:{color:n(a.value)},children:[a.value>0?"+":"",a.value.toFixed(2)]})]},a.label))})]})}const y=h({...l,component:j});export{y as financialStressFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as x}from"./react-qoZPGuNy.js";import{a as F,d as _,G as I}from"./game-ui-Dy_QYsPr.js";import{f as O,aB as v}from"./index-
|
|
1
|
+
import{r as i,j as x}from"./react-qoZPGuNy.js";import{a as F,d as _,G as I}from"./game-ui-Dy_QYsPr.js";import{f as O,aB as v}from"./index-kB-TyxKi.js";import"./format-CfAcS4D8.js";const L=.225,j=-3.6,b=52,A=132,z=210,U=1.3,C=64,p=12,M=28,N=28,R={bird:"rgba(255, 255, 255, 0.95)",eye:"rgba(0, 0, 0, 0.8)",pipe:"hsla(160, 64%, 40%, 0.9)",ground:"rgba(255, 255, 255, 0.1)"};function B(t,r,f,d){t.save(),t.translate(C,r),t.rotate(Math.max(-.5,Math.min(.9,f*.06))),t.fillStyle=R.bird,t.beginPath(),t.arc(0,0,p,0,Math.PI*2),t.fill(),t.fillStyle=d,t.fillRect(-p+2,0,10,5),t.fillStyle=R.eye,t.beginPath(),t.arc(5,-4,2,0,Math.PI*2),t.fill(),t.restore()}function V(t,r,f,d,y,h){r.clearRect(0,0,t.width,t.height);const c=t.height-M;r.fillStyle=R.ground,r.fillRect(0,c,t.width,2),B(r,t.height/2,0,h),r.textAlign="center",f==="idle"?(r.fillStyle=I.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText("Press SPACE or tap to fly",t.width/2,t.height/2-40)):(r.fillStyle=I.gameOver,r.font='bold 20px "DM Sans", sans-serif',r.fillText("GAME OVER",t.width/2,t.height/2-50),r.fillStyle=I.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText(`Score: ${d}`,t.width/2,t.height/2-22),r.fillStyle=I.textSoft,r.fillText("Press SPACE or tap to retry",t.width/2,t.height/2+6)),r.textAlign="left",_(t,r,d,y,h)}function X(){const t=i.useRef(null),r=i.useRef(null),[f,d]=i.useState("idle"),[y,h]=i.useState(0),[c,H]=i.useState(()=>{if(typeof window<"u"){const e=localStorage.getItem("zframes-flappy-bird-high-score");return e?parseInt(e,10):0}return 0}),[,k]=i.useState(!1),u=i.useRef(0),g=i.useRef(c),E=i.useRef(f),m=i.useRef(F(null));i.useEffect(()=>{g.current=c,c>0&&localStorage.setItem("zframes-flappy-bird-high-score",String(c))},[c]),i.useEffect(()=>{E.current=f},[f]);const w=i.useRef({birdY:0,birdVel:0,pipes:[],frameCount:0}),G=i.useCallback(e=>{const n=e.height-M,a=N,l=n-N-A;return a+Math.random()*Math.max(0,l-a)},[]),T=i.useCallback(()=>{const e=t.current;e&&(w.current={birdY:e.height/2,birdVel:0,pipes:[{x:e.width+60,gapY:G(e),passed:!1}],frameCount:0},u.current=0,h(0))},[G]),P=i.useCallback(()=>{var e;if((e=r.current)==null||e.focus(),E.current!=="playing"){T(),d("playing");return}w.current.birdVel=j},[T]);return i.useEffect(()=>{const e=a=>{const l=a.target;l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable||(a.code==="Space"||a.code==="ArrowUp")&&(a.preventDefault(),P())},n=r.current;if(n)return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)},[P]),i.useLayoutEffect(()=>{const e=t.current;if(!e)return;const n=()=>{const l=e.parentElement;if(l&&l.clientWidth>0&&l.clientHeight>0){e.width=l.clientWidth,e.height=l.clientHeight,m.current=F(e);const S=e.getContext("2d");E.current!=="playing"&&(w.current.birdY=e.height/2,S&&V(e,S,E.current,u.current,g.current,m.current)),k(Y=>!Y)}};n();const a=new ResizeObserver(n);return a.observe(e.parentElement),()=>a.disconnect()},[]),i.useEffect(()=>{if(f!=="playing")return;const e=t.current,n=e==null?void 0:e.getContext("2d");if(!e||!n)return;let a;const l=e.height-M,S=()=>{u.current>g.current&&(g.current=u.current,H(u.current)),d("gameover")},Y=()=>{const o=w.current;n.clearRect(0,0,e.width,e.height),o.birdVel+=L,o.birdY+=o.birdVel,o.pipes=o.pipes.filter(s=>s.x>-b),o.pipes.forEach(s=>s.x-=U);const D=o.pipes[o.pipes.length-1];if((!D||D.x<e.width-z)&&o.pipes.push({x:e.width,gapY:G(e),passed:!1}),o.birdY-p<=0||o.birdY+p>=l){S();return}for(const s of o.pipes){if(C+p>s.x&&C-p<s.x+b&&(o.birdY-p<s.gapY||o.birdY+p>s.gapY+A)){S();return}!s.passed&&s.x+b<C&&(s.passed=!0,u.current+=1,h(u.current))}n.fillStyle=R.pipe;for(const s of o.pipes)n.fillRect(s.x,0,b,s.gapY),n.fillRect(s.x,s.gapY+A,b,l-(s.gapY+A));n.fillStyle=R.ground,n.fillRect(0,l,e.width,2),B(n,o.birdY,o.birdVel,m.current),_(e,n,u.current,g.current,m.current),o.frameCount++,a=requestAnimationFrame(Y)};return a=requestAnimationFrame(Y),()=>cancelAnimationFrame(a)},[f]),i.useEffect(()=>{if(f==="playing")return;const e=t.current,n=e==null?void 0:e.getContext("2d");!e||!n||V(e,n,f,y,c,m.current)},[f,y,c]),x.jsx("div",{ref:r,tabIndex:0,className:"relative h-full w-full cursor-pointer select-none overflow-hidden outline-none",onClick:P,onTouchStart:P,role:"application","aria-label":"Flappy bird game. Press space or tap to flap.",children:x.jsx("canvas",{ref:t,className:"h-full w-full"})})}const Q=O({...v,component:X});export{Q as flappyBirdFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./react-qoZPGuNy.js";import{f as c,H as r,I as o,h as i}from"./index-
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{f as c,H as r,I as o,h as i}from"./index-kB-TyxKi.js";import{d as m,e as d,f}from"./format-CfAcS4D8.js";import{F as n,s as u}from"./ui-Bq3RQsdJ.js";r.schema;function x(a){return a.unit==="USD/shares"?m(a.value):a.unit==="shares"?d(a.value):f(a.value)}function h({config:a}){const{data:t,isLoading:l}=o(a.symbol);return l?s.jsx(n,{loading:!0,children:"loading SEC financials…"}):!t||t.metrics.length===0?s.jsxs(n,{children:["no SEC financials for “",i(a.symbol),"”"]}):s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:t.entityName||i(a.symbol)}),s.jsx("div",{className:"caption text-soft truncate",children:"SEC EDGAR · XBRL company facts"})]}),s.jsx("div",{className:"caption text-soft shrink-0 text-right",children:"on filing"})]}),s.jsx("div",{className:`grid grid-cols-2 content-start gap-2 ${u}`,children:t.metrics.map(e=>s.jsxs("div",{className:"rounded bg-white/[0.04] px-3 py-2",children:[s.jsx("div",{className:"caption text-soft truncate",children:e.label}),s.jsx("div",{className:"metric-sm text-strong",children:x(e)}),s.jsx("div",{className:"caption text-soft truncate",children:e.fiscalPeriod})]},e.label))})]})}const N=c({...r,component:h});export{N as fundamentalsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./react-qoZPGuNy.js";import{b as a}from"./format-CfAcS4D8.js";import{M as l}from"./metric-row-BVVhjsjK.js";import{f as d,bs as r,bt as u}from"./index-kB-TyxKi.js";import{F as e,s as f}from"./ui-Bq3RQsdJ.js";r.schema;function p({config:t}){const{comparison:m,isLoading:c}=u(),s=m.slice(0,t.limit);return c?o.jsx(e,{loading:!0,children:"loading funding…"}):s.length===0?o.jsx(e,{children:"no funding data yet"}):o.jsx("div",{className:`${f} flex flex-col`,children:s.map(n=>o.jsx(l,{label:n.coin,meta:n.venues.map(i=>`${i.venue.slice(0,3)} ${a(i.annualizedPct,1)}`).join(" · "),value:`${a(n.spreadPct,1)} sprd`},n.coin))})}const C=d({...r,component:p});export{C as fundingComparisonFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as k,r as c,j as i}from"./react-qoZPGuNy.js";import{f as L,S as N,U as X,h as Y}from"./index-
|
|
1
|
+
import{R as k,r as c,j as i}from"./react-qoZPGuNy.js";import{f as L,S as N,U as X,h as Y}from"./index-kB-TyxKi.js";import{h as q}from"./format-CfAcS4D8.js";import{F as D}from"./ui-Bq3RQsdJ.js";import{c as B}from"./utils-DxneYyA_.js";const z="4px",G=6,P=80,K=24;function J({data:u,className:_,CellComponent:R,getColorValue:g,gap:x=G,showLabels:l=!1,rowLabelWidth:p=P,columnLabelHeight:b=K}){const j=c.useRef(null),[,M]=c.useTransition(),[m,w]=c.useState({width:0,height:0});c.useEffect(()=>{const t=j.current;if(t){const e=new ResizeObserver(()=>{M(()=>{w({width:t.offsetWidth,height:t.offsetHeight})})});return e.observe(t),()=>{e.disconnect()}}},[]);const{uniqueRows:v,uniqueColumns:I,rowToIndex:C,columnToIndex:E}=c.useMemo(()=>{const t=new Set,e=new Set,n=[],r=[];for(const s of u)t.has(s.row)||(t.add(s.row),n.push(s.row)),e.has(s.column)||(e.add(s.column),r.push(s.column));const a=new Map(n.map((s,f)=>[s,f])),d=new Map(r.map((s,f)=>[s,f]));return{uniqueRows:n,uniqueColumns:r,rowToIndex:a,columnToIndex:d}},[u]),h=c.useMemo(()=>{const t=l?p:0,e=l?b:0;return{x:t,y:e,width:Math.max(0,m.width-t),height:Math.max(0,m.height-e)}},[m,l,p,b]),y=c.useMemo(()=>{const t=I.length,e=v.length,n=t>0?Math.max(0,(h.width-x*(t-1))/t):0,r=e>0?Math.max(0,(h.height-x*(e-1))/e):0;return{cellWidth:n,cellHeight:r,columnX:s=>s*(n+x),rowY:s=>s*(r+x)}},[v.length,I.length,h,x]),S=c.useMemo(()=>{const t=u.map(o=>g?g(o):o.value),e=t.filter(o=>o>=0),n=t.filter(o=>o<0),r=e.length>0?Math.min(...e):0,a=e.length>0?Math.max(...e):0,d=n.length>0?Math.min(...n):0,s=n.length>0?Math.max(...n):0,f=o=>o<0?s===d?1:(o-s)/(d-s):a===r?1:(o-r)/(a-r);return u.map(o=>{const T=g?g(o):o.value,$=f(T),W=T>=0;return{cell:o,colorValue:T,intensity:$,isPositive:W}})},[u,g]),F=(t,e)=>{if(e){const a=Math.round(34+t*16);return`hsl(152 ${Math.round(42+t*20)}% ${a}%)`}const n=Math.round(36+t*15);return`hsl(350 ${Math.round(48+t*22)}% ${n}%)`},A=c.useMemo(()=>{const{cellWidth:t,cellHeight:e,columnX:n,rowY:r}=y;return t<=0||e<=0?null:S.map(({cell:a,intensity:d,isPositive:s})=>{const f=C.get(a.row),o=E.get(a.column);if(f===void 0||o===void 0)return null;const T=F(d,s);return i.jsx("div",{className:"group absolute cursor-pointer border border-transparent hover:bg-[radial-gradient(146.13%_118.42%_at_50%_-15.5%,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0)_99.59%)] hover:bg-gradient-to-t",style:{left:h.x+n(o),top:h.y+r(f),width:t,height:e,borderRadius:z,backgroundColor:T},children:i.jsx(R,{width:t,height:e,data:a,rowIndex:f,columnIndex:o,colorIntensity:d,isPositive:s})},a.id)})},[S,y,h,C,E,R]),O=c.useMemo(()=>{if(!l)return null;const{cellHeight:t,rowY:e}=y;return v.map((n,r)=>i.jsx("div",{className:"absolute flex items-center justify-end pr-2 text-xs text-white/60",style:{left:0,top:h.y+e(r),width:p,height:t},children:i.jsx("span",{className:"truncate",children:n})},`row-${n}`))},[l,v,y,h,p]),U=c.useMemo(()=>{if(!l)return null;const{cellWidth:t,columnX:e}=y;return I.map((n,r)=>i.jsx("div",{className:"absolute flex items-end justify-center pb-1 text-xs text-white/60",style:{left:h.x+e(r),top:0,width:t,height:b},children:i.jsx("span",{className:"truncate",children:n})},`col-${n}`))},[l,I,y,h,b]);return i.jsx("div",{className:B("h-full w-full",_),ref:j,children:i.jsxs("div",{className:"relative overflow-hidden",style:{height:m.height,width:m.width},children:[O,U,A]})})}const Q=k.memo(J);N.schema;const H=1440*60*1e3,Z=10080*60*1e3;function V({data:u,width:_}){return _<44?null:i.jsx("div",{className:"flex h-full w-full items-center justify-center",children:i.jsx("span",{className:"caption text-normal tabular-nums",children:q(u.rate*100)})})}function tt({config:u}){const _=c.useMemo(()=>Date.now()-Z,[]),{history:R,isLoading:g}=X(u.symbols,_),x=c.useMemo(()=>{const l=[];for(const p of u.symbols){const b=R[p]??[],j=new Map;for(const M of b){const m=Math.floor(M.time/H)*H,w=j.get(m)??{sum:0,n:0};w.sum+=M.fundingRate,w.n+=1,j.set(m,w)}for(const[M,{sum:m,n:w}]of j){const v=m/w,C=new Date(M).toLocaleDateString("en-US",{month:"short",day:"numeric"});l.push({id:`${p}-${M}`,row:Y(p),column:C,value:v*1e4,rate:v})}}return l},[R,u.symbols]);return g?i.jsx(D,{loading:!0,children:"loading funding…"}):x.length===0?i.jsx(D,{children:"no funding data"}):i.jsx(Q,{data:x,CellComponent:V,gap:3,showLabels:!0,rowLabelWidth:48,columnLabelHeight:20})}const ct=L({...N,component:tt});export{ct as fundingHeatmapFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as a}from"./react-qoZPGuNy.js";import{f as l,V as d,U as C,h as M}from"./index-
|
|
1
|
+
import{r as o,j as a}from"./react-qoZPGuNy.js";import{f as l,V as d,U as C,h as M}from"./index-kB-TyxKi.js";import{h as R}from"./format-CfAcS4D8.js";import{F as f}from"./ui-Bq3RQsdJ.js";import{a as r,C as u}from"./chart-utils-Ct7WziT9.js";import{M as S}from"./index-DKixdHYB.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";const x={"24h":{ms:1440*60*1e3,timeframe:r["24h"]},"7D":{ms:10080*60*1e3,timeframe:r["7D"]},"1M":{ms:720*60*60*1e3,timeframe:r["1M"]}};d.schema;function F({config:e}){const{ms:s,timeframe:h}=x[e.lookback],c=o.useMemo(()=>Date.now()-s,[s]),{history:m,isLoading:p}=C(e.symbols,c),i=o.useMemo(()=>e.symbols.map((t,g)=>({id:t,name:M(t),color:u[g%u.length],data:(m[t]??[]).map(n=>({date:new Date(n.time).toISOString(),value:n.fundingRate*100}))})),[e.symbols,m]);return p?a.jsx(f,{loading:!0,children:"loading funding rates…"}):i.every(t=>t.data.length===0)?a.jsx(f,{children:"no funding data yet"}):a.jsx(S,{series:i,timeframe:h,height:250,formatValue:R})}const I=l({...d,component:F});export{I as fundingRateChartFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{c as x,i as p,a as f}from"./format-CfAcS4D8.js";import{f as b,ad as d,ae as j}from"./index-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{c as x,i as p,a as f}from"./format-CfAcS4D8.js";import{f as b,ad as d,ae as j}from"./index-kB-TyxKi.js";import{F as c}from"./ui-Bq3RQsdJ.js";import{M as u}from"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";d.schema;function g({config:a}){var n,o;const{rates:t,isLoading:h}=j(a.base,a.symbols);if(h)return e.jsx(c,{loading:!0,children:"loading FX rates…"});if(!t.length)return e.jsx(c,{children:"no FX data yet"});const r=(o=(n=t[0])==null?void 0:n.history.at(-1))==null?void 0:o.time;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"FX rates"}),e.jsxs("div",{className:"body-sm text-normal",children:["1 ",a.base.toUpperCase()," buys"]})]}),e.jsx("div",{className:"caption text-soft text-right",children:r?new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric"}):"ECB daily"})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:t.map(s=>{const i=x(s.changePct),l=s.history.map(m=>({date:new Date(m.time).toISOString(),value:m.value}));return e.jsxs("div",{className:"flex items-center gap-3 border-b border-white/[0.06] py-1.5 last:border-b-0",children:[e.jsx("span",{className:"body-sm w-9 font-bold text-strong",children:s.symbol}),e.jsx("div",{className:"flex-1"}),a.showSparkline&&l.length>1&&e.jsx(u,{data:l,width:72,height:20,color:i}),e.jsxs("span",{className:"whitespace-nowrap text-right tabular-nums",children:[e.jsx("span",{className:"body-sm text-strong",children:p(s.rate)}),e.jsx("span",{className:"caption ml-2 font-bold",style:{color:i},children:f(s.changePct)})]})]},s.symbol)})})]})}const B=b({...d,component:g});export{B as fxBoardFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{f as l,W as s}from"./index-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{f as l,W as s}from"./index-kB-TyxKi.js";s.schema;function n({config:a}){return e.jsxs("div",{className:"flex h-full w-full items-end gap-3 pb-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-[5px] w-[5px] shrink-0 rounded-full",style:{background:"var(--color-highlight)",boxShadow:"0 0 8px var(--color-highlight)"}}),e.jsx("h2",{className:"body-md text-strong font-extrabold uppercase leading-none tracking-[0.14em]",children:a.title})]}),a.subtitle&&e.jsx("p",{className:"caption text-soft pl-[13px] leading-none",children:a.subtitle})]}),e.jsx("span",{className:"mb-[5px] h-px flex-1",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 65%, transparent)"}})]})}const i=l({...s,component:n});export{i as headingFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./react-qoZPGuNy.js";import{E as d,a as u,n as h}from"./market-data-CvmpLFSo.js";import{M as f}from"./metric-row-BVVhjsjK.js";import{f as x,
|
|
1
|
+
import{j as n}from"./react-qoZPGuNy.js";import{E as d,a as u,n as h}from"./market-data-CvmpLFSo.js";import{M as f}from"./metric-row-BVVhjsjK.js";import{f as x,bL as m}from"./index-kB-TyxKi.js";import{F as i,s as p}from"./ui-Bq3RQsdJ.js";m.schema;function y(e,o){const[t,a,s]=e.split("-").map(Number),[l,r,c]=o.split("-").map(Number);return Math.round((Date.UTC(l,r-1,c)-Date.UTC(t,a-1,s))/864e5)}function b(e){const[o,t,a]=e.split("-").map(Number);return new Date(Date.UTC(o,t-1,a)).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"})}function C(e){return e<=0?"today":e===1?"tomorrow":`in ${e}d`}function j({config:e}){var l;if(!d[e.exchange])return n.jsx(i,{children:"unknown exchange"});const t=(l=u(e.exchange))==null?void 0:l.ymd,a=h(e.exchange,e.count),s=e.label.trim();return!t||a.length===0?n.jsx(i,{children:"no upcoming holidays on file"}):n.jsxs("div",{className:"flex h-full w-full flex-col",children:[s&&n.jsx("div",{className:"caption text-soft mb-1 shrink-0 uppercase tracking-[0.12em]",children:s}),n.jsx("div",{className:`min-h-0 flex-1 ${p}`,children:a.map(r=>n.jsx(f,{label:b(r),value:C(y(t,r))},r))})]})}const k=x({...m,component:j});export{k as holidayCalendarFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as e}from"./react-qoZPGuNy.js";import{f as l,X as o}from"./index-
|
|
1
|
+
import{r as s,j as e}from"./react-qoZPGuNy.js";import{f as l,X as o}from"./index-kB-TyxKi.js";import{F as i}from"./ui-Bq3RQsdJ.js";o.schema;function n({config:a}){const[t,r]=s.useState("loading");return s.useEffect(()=>r("loading"),[a.url]),t==="error"?e.jsx(i,{children:"image unavailable"}):e.jsxs("div",{className:"relative flex h-full w-full items-center justify-center overflow-hidden rounded-md",children:[t==="loading"&&e.jsx("div",{className:"absolute inset-0 z-10",children:e.jsx(i,{loading:!0,children:"loading image…"})}),e.jsx("img",{src:a.url,alt:a.alt,className:`h-full w-full transition-opacity duration-300 ${t==="loaded"?"opacity-100":"opacity-0"}`,style:{objectFit:a.fit},onLoad:()=>r("loaded"),onError:()=>r("error")})]})}const c=l({...o,component:n});export{c as imageFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes dnaStrand1Move{0%,to{translate:0 0px}50%{translate:0 18px}}@keyframes dnaStrand1Scale{0%,to{scale:.7}25%{scale:1}50%{scale:.7}75%{scale:.7}}@keyframes dnaStrand1Color{0%,to{background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}25%{background-color:hsl(calc(var(--zf-accent-hue, 242) + 21) 83% 75%)}50%{background-color:#fff6}75%{background-color:#ffffff4d}}@keyframes dnaStrand2Move{0%,to{translate:0 18px}50%{translate:0 0px}}@keyframes dnaStrand2Scale{0%,to{scale:.7}25%{scale:.7}50%{scale:1}75%{scale:1}}@keyframes dnaStrand2Color{0%,to{background-color:#fff6}25%{background-color:#ffffff4d}50%{background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}75%{background-color:hsl(calc(var(--zf-accent-hue, 242) + 21) 83% 75%)}}
|
|
1
|
+
@keyframes dnaStrand1Move{0%,to{translate:0 0px}50%{translate:0 18px}}@keyframes dnaStrand1Scale{0%,to{scale:.7}25%{scale:1}50%{scale:.7}75%{scale:.7}}@keyframes dnaStrand1Color{0%,to{background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}25%{background-color:hsl(calc(var(--zf-accent-hue, 242) + 21) 83% 75%)}50%{background-color:#fff6}75%{background-color:#ffffff4d}}@keyframes dnaStrand2Move{0%,to{translate:0 18px}50%{translate:0 0px}}@keyframes dnaStrand2Scale{0%,to{scale:.7}25%{scale:.7}50%{scale:1}75%{scale:1}}@keyframes dnaStrand2Color{0%,to{background-color:#fff6}25%{background-color:#ffffff4d}50%{background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}75%{background-color:hsl(calc(var(--zf-accent-hue, 242) + 21) 83% 75%)}}@keyframes dnaPulse{0%,to{opacity:.35}50%{opacity:.8}}@media(prefers-reduced-motion:reduce){.loading-orb-dot{animation:dnaPulse 2s ease-in-out infinite!important;background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}}
|