@shineuix/ssr 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +111 -2
- package/THIRD-PARTY-NOTICES.md +256 -0
- package/dist/components/index.d.ts +329 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-0NNDSmh0.js +1 -0
- package/dist/components/p-1XW6gKXd.js +1 -0
- package/dist/components/p-2OGp7Y2F.js +1 -0
- package/dist/components/p-3rGcn3Dk.js +1 -0
- package/dist/components/p-B-eMraLN.js +1 -0
- package/dist/components/p-B1-k9bVs.js +1 -0
- package/dist/components/p-B3hr5-fa.js +1 -0
- package/dist/components/p-BB3IbuND.js +1 -0
- package/dist/components/p-BBNN1byS.js +1 -0
- package/dist/components/p-BE4gZZNA.js +1 -0
- package/dist/components/p-BHB1Wprj.js +1 -0
- package/dist/components/p-BJYToX7G.js +1 -0
- package/dist/components/p-BLK-elHV.js +1 -0
- package/dist/components/p-BLxI_QCP.js +1 -0
- package/dist/components/p-BM1Zzj1H.js +1 -0
- package/dist/components/p-BOdn2vI7.js +1 -0
- package/dist/components/p-BQJXtvhG.js +1 -0
- package/dist/components/p-BSSeip34.js +1 -0
- package/dist/components/p-BU3LJP5B.js +1 -0
- package/dist/components/p-BUqcDxTK.js +1 -0
- package/dist/components/p-BWkzTEZX.js +1 -0
- package/dist/components/p-BeYfX4rQ.js +1 -0
- package/dist/components/p-BfkKvKcf.js +1 -0
- package/dist/components/p-BglXr2C4.js +1 -0
- package/dist/components/p-BirQihPv.js +1 -0
- package/dist/components/p-BkdpcGfq.js +1 -0
- package/dist/components/p-BnZU02lM.js +1 -0
- package/dist/components/p-Bpr2o3vT.js +1 -0
- package/dist/components/p-BpxmwysK.js +1 -0
- package/dist/components/p-Bt5Kx3zM.js +1 -0
- package/dist/components/p-BtgC2u2Q.js +1 -0
- package/dist/components/p-Btp15dVO.js +1 -0
- package/dist/components/p-BuyjS5bS.js +1 -0
- package/dist/components/p-BwHBOv1l.js +1 -0
- package/dist/components/p-BwkaZsaT.js +1 -0
- package/dist/components/p-Bzu70qWq.js +1 -0
- package/dist/components/p-C-6_KLLy.js +1 -0
- package/dist/components/p-C-tuu2jV.js +1 -0
- package/dist/components/p-C2EJFbyf.js +1 -0
- package/dist/components/p-C5TSOOMd.js +1 -0
- package/dist/components/p-C6J9xhWE.js +1 -0
- package/dist/components/p-C6hsDVJk.js +1 -0
- package/dist/components/p-CBiEHE-i.js +1 -0
- package/dist/components/p-CDaU9b47.js +1 -0
- package/dist/components/p-CDiy2nTd.js +1 -0
- package/dist/components/p-CFn_q23Q.js +1 -0
- package/dist/components/p-CGWvlrv_.js +1 -0
- package/dist/components/p-CJT4wCXG.js +47 -0
- package/dist/components/p-CSPVrtqf.js +1 -0
- package/dist/components/p-CUB_NKYi.js +1 -0
- package/dist/components/p-CYlxvoVo.js +1 -0
- package/dist/components/p-CZ4DDtn8.js +1 -0
- package/dist/components/p-CZWUeOlG.js +1 -0
- package/dist/components/p-CaekSnKG.js +1 -0
- package/dist/components/p-Cb1wtfPJ.js +1 -0
- package/dist/components/p-Cb50ss23.js +1 -0
- package/dist/components/p-Cbd6cMaD.js +1 -0
- package/dist/components/p-CeVlau-G.js +1 -0
- package/dist/components/p-CiFpI_XW.js +1 -0
- package/dist/components/p-CmEfiaNv.js +1 -0
- package/dist/components/p-CmqQjlaI.js +1 -0
- package/dist/components/p-CqvOA-0K.js +1 -0
- package/dist/components/p-CrVcfwMC.js +1 -0
- package/dist/components/p-D00-pPuH.js +1 -0
- package/dist/components/p-D0BIoHLP.js +1 -0
- package/dist/components/p-D0WdoZzs.js +1 -0
- package/dist/components/p-D1HckqwW.js +1 -0
- package/dist/components/p-D3Vt3xcn.js +1 -0
- package/dist/components/p-DAfCbU7H.js +1 -0
- package/dist/components/p-DDyzuLfq.js +1 -0
- package/dist/components/p-DIvvXo_w.js +1 -0
- package/dist/components/p-DNXYH-fW.js +1 -0
- package/dist/components/p-DRMr6xXH.js +1 -0
- package/dist/components/p-DW6x7zfX.js +1 -0
- package/dist/components/p-DWqzHMCu.js +1 -0
- package/dist/components/p-DX9wgxoJ.js +1 -0
- package/dist/components/p-DZRA7Q7l.js +1 -0
- package/dist/components/p-D_S99uS1.js +1 -0
- package/dist/components/p-Da6TsjCG.js +1 -0
- package/dist/components/p-DbF8ArKE.js +1 -0
- package/dist/components/p-Dh0O8nfH.js +1 -0
- package/dist/components/p-DpbLhd6d.js +1 -0
- package/dist/components/p-DquILvXX.js +1 -0
- package/dist/components/p-DsHK25q3.js +1 -0
- package/dist/components/p-DthM6mDw.js +1 -0
- package/dist/components/p-DuYxgKgU.js +1 -0
- package/dist/components/p-ES48zkCT.js +1 -0
- package/dist/components/p-FKYMQPFB.js +1 -0
- package/dist/components/p-G2jDNXXR.js +1 -0
- package/dist/components/p-GAnFXayY.js +1 -0
- package/dist/components/p-M0fYQCIv.js +1 -0
- package/dist/components/p-MsqFuhDd.js +1 -0
- package/dist/components/p-U06fVoGD.js +1 -0
- package/dist/components/p-UtUl_rX-.js +1 -0
- package/dist/components/p-VFpQ6hXH.js +1 -0
- package/dist/components/p-b5Ks_pUg.js +1 -0
- package/dist/components/p-czkAmPgI.js +1 -0
- package/dist/components/p-hbVWBG4S.js +1 -0
- package/dist/components/p-kDhmjEYc.js +1 -0
- package/dist/components/p-lu4HWrMJ.js +1 -0
- package/dist/components/p-mEOcDy5S.js +1 -0
- package/dist/components/p-nX8XMRk5.js +1 -0
- package/dist/components/p-piEUki9n.js +1 -0
- package/dist/components/p-q0JbXN8q.js +1 -0
- package/dist/components/p-qjuvplfX.js +1 -0
- package/dist/components/p-qtQ1008P.js +1 -0
- package/dist/components/p-qut9RP2y.js +1 -0
- package/dist/components/p-wknHx00K.js +1 -0
- package/dist/components/sui-accordion-item.d.ts +11 -0
- package/dist/components/sui-accordion-item.js +1 -0
- package/dist/components/sui-accordion.d.ts +11 -0
- package/dist/components/sui-accordion.js +1 -0
- package/dist/components/sui-anchor.d.ts +11 -0
- package/dist/components/sui-anchor.js +1 -0
- package/dist/components/sui-auto-complete.d.ts +11 -0
- package/dist/components/sui-auto-complete.js +1 -0
- package/dist/components/sui-avatar-group.d.ts +11 -0
- package/dist/components/sui-avatar-group.js +1 -0
- package/dist/components/sui-avatar.d.ts +11 -0
- package/dist/components/sui-avatar.js +1 -0
- package/dist/components/sui-badge.d.ts +11 -0
- package/dist/components/sui-badge.js +1 -0
- package/dist/components/sui-block-ui.d.ts +11 -0
- package/dist/components/sui-block-ui.js +1 -0
- package/dist/components/sui-board.d.ts +11 -0
- package/dist/components/sui-board.js +1 -0
- package/dist/components/sui-bottom-nav.d.ts +11 -0
- package/dist/components/sui-bottom-nav.js +1 -0
- package/dist/components/sui-breadcrumb.d.ts +11 -0
- package/dist/components/sui-breadcrumb.js +1 -0
- package/dist/components/sui-button-group.d.ts +11 -0
- package/dist/components/sui-button-group.js +1 -0
- package/dist/components/sui-button.d.ts +11 -0
- package/dist/components/sui-button.js +1 -0
- package/dist/components/sui-calendar.d.ts +11 -0
- package/dist/components/sui-calendar.js +1 -0
- package/dist/components/sui-card.d.ts +11 -0
- package/dist/components/sui-card.js +1 -0
- package/dist/components/sui-carousel.d.ts +11 -0
- package/dist/components/sui-carousel.js +1 -0
- package/dist/components/sui-cascade-select.d.ts +11 -0
- package/dist/components/sui-cascade-select.js +1 -0
- package/dist/components/sui-chart-bar.d.ts +11 -0
- package/dist/components/sui-chart-bar.js +1 -0
- package/dist/components/sui-chart-candlestick.d.ts +11 -0
- package/dist/components/sui-chart-candlestick.js +1 -0
- package/dist/components/sui-chart-combo.d.ts +11 -0
- package/dist/components/sui-chart-combo.js +1 -0
- package/dist/components/sui-chart-gauge.d.ts +11 -0
- package/dist/components/sui-chart-gauge.js +1 -0
- package/dist/components/sui-chart-heatmap.d.ts +11 -0
- package/dist/components/sui-chart-heatmap.js +1 -0
- package/dist/components/sui-chart-line.d.ts +11 -0
- package/dist/components/sui-chart-line.js +1 -0
- package/dist/components/sui-chart-navigator.d.ts +11 -0
- package/dist/components/sui-chart-navigator.js +1 -0
- package/dist/components/sui-chart-pie.d.ts +11 -0
- package/dist/components/sui-chart-pie.js +1 -0
- package/dist/components/sui-chart-radar.d.ts +11 -0
- package/dist/components/sui-chart-radar.js +1 -0
- package/dist/components/sui-chart-scatter.d.ts +11 -0
- package/dist/components/sui-chart-scatter.js +1 -0
- package/dist/components/sui-chart-synced.d.ts +11 -0
- package/dist/components/sui-chart-synced.js +1 -0
- package/dist/components/sui-chart-treemap.d.ts +11 -0
- package/dist/components/sui-chart-treemap.js +1 -0
- package/dist/components/sui-chart-waterfall.d.ts +11 -0
- package/dist/components/sui-chart-waterfall.js +1 -0
- package/dist/components/sui-checkbox-group.d.ts +11 -0
- package/dist/components/sui-checkbox-group.js +1 -0
- package/dist/components/sui-checkbox.d.ts +11 -0
- package/dist/components/sui-checkbox.js +1 -0
- package/dist/components/sui-chip.d.ts +11 -0
- package/dist/components/sui-chip.js +1 -0
- package/dist/components/sui-choice-cards.d.ts +11 -0
- package/dist/components/sui-choice-cards.js +1 -0
- package/dist/components/sui-code-block.d.ts +11 -0
- package/dist/components/sui-code-block.js +1 -0
- package/dist/components/sui-color-editor.d.ts +11 -0
- package/dist/components/sui-color-editor.js +1 -0
- package/dist/components/sui-color-picker.d.ts +11 -0
- package/dist/components/sui-color-picker.js +1 -0
- package/dist/components/sui-command-palette.d.ts +11 -0
- package/dist/components/sui-command-palette.js +1 -0
- package/dist/components/sui-config-list.d.ts +11 -0
- package/dist/components/sui-config-list.js +1 -0
- package/dist/components/sui-config-row.d.ts +11 -0
- package/dist/components/sui-config-row.js +1 -0
- package/dist/components/sui-confirm-dialog.d.ts +11 -0
- package/dist/components/sui-confirm-dialog.js +1 -0
- package/dist/components/sui-confirm-popup.d.ts +11 -0
- package/dist/components/sui-confirm-popup.js +1 -0
- package/dist/components/sui-context-menu.d.ts +11 -0
- package/dist/components/sui-context-menu.js +1 -0
- package/dist/components/sui-copy-button.d.ts +11 -0
- package/dist/components/sui-copy-button.js +1 -0
- package/dist/components/sui-data-grid.d.ts +11 -0
- package/dist/components/sui-data-grid.js +1 -0
- package/dist/components/sui-data-table.d.ts +11 -0
- package/dist/components/sui-data-table.js +1 -0
- package/dist/components/sui-data-view.d.ts +11 -0
- package/dist/components/sui-data-view.js +1 -0
- package/dist/components/sui-date-picker.d.ts +11 -0
- package/dist/components/sui-date-picker.js +1 -0
- package/dist/components/sui-description-list.d.ts +11 -0
- package/dist/components/sui-description-list.js +1 -0
- package/dist/components/sui-dialog.d.ts +11 -0
- package/dist/components/sui-dialog.js +1 -0
- package/dist/components/sui-divider.d.ts +11 -0
- package/dist/components/sui-divider.js +1 -0
- package/dist/components/sui-dock.d.ts +11 -0
- package/dist/components/sui-dock.js +1 -0
- package/dist/components/sui-drawer.d.ts +11 -0
- package/dist/components/sui-drawer.js +1 -0
- package/dist/components/sui-edit-box.d.ts +11 -0
- package/dist/components/sui-edit-box.js +1 -0
- package/dist/components/sui-empty-state.d.ts +11 -0
- package/dist/components/sui-empty-state.js +1 -0
- package/dist/components/sui-fieldset.d.ts +11 -0
- package/dist/components/sui-fieldset.js +1 -0
- package/dist/components/sui-file-upload.d.ts +11 -0
- package/dist/components/sui-file-upload.js +1 -0
- package/dist/components/sui-filter-builder.d.ts +11 -0
- package/dist/components/sui-filter-builder.js +1 -0
- package/dist/components/sui-filter-panel.d.ts +11 -0
- package/dist/components/sui-filter-panel.js +1 -0
- package/dist/components/sui-float-label.d.ts +11 -0
- package/dist/components/sui-float-label.js +1 -0
- package/dist/components/sui-fluid.d.ts +11 -0
- package/dist/components/sui-fluid.js +1 -0
- package/dist/components/sui-form-actions.d.ts +11 -0
- package/dist/components/sui-form-actions.js +1 -0
- package/dist/components/sui-form-layout.d.ts +11 -0
- package/dist/components/sui-form-layout.js +1 -0
- package/dist/components/sui-form.d.ts +11 -0
- package/dist/components/sui-form.js +1 -0
- package/dist/components/sui-galleria.d.ts +11 -0
- package/dist/components/sui-galleria.js +1 -0
- package/dist/components/sui-icon-button.d.ts +11 -0
- package/dist/components/sui-icon-button.js +1 -0
- package/dist/components/sui-icon-field.d.ts +11 -0
- package/dist/components/sui-icon-field.js +1 -0
- package/dist/components/sui-ifta-label.d.ts +11 -0
- package/dist/components/sui-ifta-label.js +1 -0
- package/dist/components/sui-image-compare.d.ts +11 -0
- package/dist/components/sui-image-compare.js +1 -0
- package/dist/components/sui-image.d.ts +11 -0
- package/dist/components/sui-image.js +1 -0
- package/dist/components/sui-inplace.d.ts +11 -0
- package/dist/components/sui-inplace.js +1 -0
- package/dist/components/sui-input-group-addon.d.ts +11 -0
- package/dist/components/sui-input-group-addon.js +1 -0
- package/dist/components/sui-input-group.d.ts +11 -0
- package/dist/components/sui-input-group.js +1 -0
- package/dist/components/sui-input-mask.d.ts +11 -0
- package/dist/components/sui-input-mask.js +1 -0
- package/dist/components/sui-input-number.d.ts +11 -0
- package/dist/components/sui-input-number.js +1 -0
- package/dist/components/sui-input-otp.d.ts +11 -0
- package/dist/components/sui-input-otp.js +1 -0
- package/dist/components/sui-input-tags.d.ts +11 -0
- package/dist/components/sui-input-tags.js +1 -0
- package/dist/components/sui-input-text.d.ts +11 -0
- package/dist/components/sui-input-text.js +1 -0
- package/dist/components/sui-kbd.d.ts +11 -0
- package/dist/components/sui-kbd.js +1 -0
- package/dist/components/sui-knob.d.ts +11 -0
- package/dist/components/sui-knob.js +1 -0
- package/dist/components/sui-list.d.ts +11 -0
- package/dist/components/sui-list.js +1 -0
- package/dist/components/sui-listbox.d.ts +11 -0
- package/dist/components/sui-listbox.js +1 -0
- package/dist/components/sui-mega-menu.d.ts +11 -0
- package/dist/components/sui-mega-menu.js +1 -0
- package/dist/components/sui-menu.d.ts +11 -0
- package/dist/components/sui-menu.js +1 -0
- package/dist/components/sui-menubar.d.ts +11 -0
- package/dist/components/sui-menubar.js +1 -0
- package/dist/components/sui-message.d.ts +11 -0
- package/dist/components/sui-message.js +1 -0
- package/dist/components/sui-meter-group.d.ts +11 -0
- package/dist/components/sui-meter-group.js +1 -0
- package/dist/components/sui-mini-toolbar.d.ts +11 -0
- package/dist/components/sui-mini-toolbar.js +1 -0
- package/dist/components/sui-multi-select.d.ts +11 -0
- package/dist/components/sui-multi-select.js +1 -0
- package/dist/components/sui-notification-center.d.ts +11 -0
- package/dist/components/sui-notification-center.js +1 -0
- package/dist/components/sui-order-list.d.ts +11 -0
- package/dist/components/sui-order-list.js +1 -0
- package/dist/components/sui-org-chart.d.ts +11 -0
- package/dist/components/sui-org-chart.js +1 -0
- package/dist/components/sui-overlay-badge.d.ts +11 -0
- package/dist/components/sui-overlay-badge.js +1 -0
- package/dist/components/sui-page-header.d.ts +11 -0
- package/dist/components/sui-page-header.js +1 -0
- package/dist/components/sui-paginator.d.ts +11 -0
- package/dist/components/sui-paginator.js +1 -0
- package/dist/components/sui-panel-menu.d.ts +11 -0
- package/dist/components/sui-panel-menu.js +1 -0
- package/dist/components/sui-panel.d.ts +11 -0
- package/dist/components/sui-panel.js +1 -0
- package/dist/components/sui-password.d.ts +11 -0
- package/dist/components/sui-password.js +1 -0
- package/dist/components/sui-persona.d.ts +11 -0
- package/dist/components/sui-persona.js +1 -0
- package/dist/components/sui-pick-list.d.ts +11 -0
- package/dist/components/sui-pick-list.js +1 -0
- package/dist/components/sui-popover.d.ts +11 -0
- package/dist/components/sui-popover.js +1 -0
- package/dist/components/sui-progress-bar.d.ts +11 -0
- package/dist/components/sui-progress-bar.js +1 -0
- package/dist/components/sui-progress-ring.d.ts +11 -0
- package/dist/components/sui-progress-ring.js +1 -0
- package/dist/components/sui-progress-spinner.d.ts +11 -0
- package/dist/components/sui-progress-spinner.js +1 -0
- package/dist/components/sui-qr-code.d.ts +11 -0
- package/dist/components/sui-qr-code.js +1 -0
- package/dist/components/sui-radio-button.d.ts +11 -0
- package/dist/components/sui-radio-button.js +1 -0
- package/dist/components/sui-radio-group.d.ts +11 -0
- package/dist/components/sui-radio-group.js +1 -0
- package/dist/components/sui-rating.d.ts +11 -0
- package/dist/components/sui-rating.js +1 -0
- package/dist/components/sui-rich-text-editor.d.ts +11 -0
- package/dist/components/sui-rich-text-editor.js +1 -0
- package/dist/components/sui-save-status.d.ts +11 -0
- package/dist/components/sui-save-status.js +1 -0
- package/dist/components/sui-scheduler-builder.d.ts +11 -0
- package/dist/components/sui-scheduler-builder.js +1 -0
- package/dist/components/sui-scroll-panel.d.ts +11 -0
- package/dist/components/sui-scroll-panel.js +1 -0
- package/dist/components/sui-scroll-top.d.ts +11 -0
- package/dist/components/sui-scroll-top.js +1 -0
- package/dist/components/sui-select-button.d.ts +11 -0
- package/dist/components/sui-select-button.js +1 -0
- package/dist/components/sui-select.d.ts +11 -0
- package/dist/components/sui-select.js +1 -0
- package/dist/components/sui-side-nav.d.ts +11 -0
- package/dist/components/sui-side-nav.js +1 -0
- package/dist/components/sui-skeleton-card.d.ts +11 -0
- package/dist/components/sui-skeleton-card.js +1 -0
- package/dist/components/sui-skeleton.d.ts +11 -0
- package/dist/components/sui-skeleton.js +1 -0
- package/dist/components/sui-slider.d.ts +11 -0
- package/dist/components/sui-slider.js +1 -0
- package/dist/components/sui-sparkline.d.ts +11 -0
- package/dist/components/sui-sparkline.js +1 -0
- package/dist/components/sui-speed-dial.d.ts +11 -0
- package/dist/components/sui-speed-dial.js +1 -0
- package/dist/components/sui-split-button.d.ts +11 -0
- package/dist/components/sui-split-button.js +1 -0
- package/dist/components/sui-splitter.d.ts +11 -0
- package/dist/components/sui-splitter.js +1 -0
- package/dist/components/sui-spoiler.d.ts +11 -0
- package/dist/components/sui-spoiler.js +1 -0
- package/dist/components/sui-stat-card.d.ts +11 -0
- package/dist/components/sui-stat-card.js +1 -0
- package/dist/components/sui-stepper.d.ts +11 -0
- package/dist/components/sui-stepper.js +1 -0
- package/dist/components/sui-tab.d.ts +11 -0
- package/dist/components/sui-tab.js +1 -0
- package/dist/components/sui-tabs.d.ts +11 -0
- package/dist/components/sui-tabs.js +1 -0
- package/dist/components/sui-tag.d.ts +11 -0
- package/dist/components/sui-tag.js +1 -0
- package/dist/components/sui-terminal.d.ts +11 -0
- package/dist/components/sui-terminal.js +1 -0
- package/dist/components/sui-textarea.d.ts +11 -0
- package/dist/components/sui-textarea.js +1 -0
- package/dist/components/sui-theme-picker.d.ts +11 -0
- package/dist/components/sui-theme-picker.js +1 -0
- package/dist/components/sui-tiered-menu.d.ts +11 -0
- package/dist/components/sui-tiered-menu.js +1 -0
- package/dist/components/sui-time-picker.d.ts +11 -0
- package/dist/components/sui-time-picker.js +1 -0
- package/dist/components/sui-timeline.d.ts +11 -0
- package/dist/components/sui-timeline.js +1 -0
- package/dist/components/sui-toast-host.d.ts +11 -0
- package/dist/components/sui-toast-host.js +1 -0
- package/dist/components/sui-toggle-button.d.ts +11 -0
- package/dist/components/sui-toggle-button.js +1 -0
- package/dist/components/sui-toggle-switch.d.ts +11 -0
- package/dist/components/sui-toggle-switch.js +1 -0
- package/dist/components/sui-toolbar.d.ts +11 -0
- package/dist/components/sui-toolbar.js +1 -0
- package/dist/components/sui-tooltip.d.ts +11 -0
- package/dist/components/sui-tooltip.js +1 -0
- package/dist/components/sui-tour.d.ts +11 -0
- package/dist/components/sui-tour.js +1 -0
- package/dist/components/sui-tree-select.d.ts +11 -0
- package/dist/components/sui-tree-select.js +1 -0
- package/dist/components/sui-tree-table.d.ts +11 -0
- package/dist/components/sui-tree-table.js +1 -0
- package/dist/components/sui-tree.d.ts +11 -0
- package/dist/components/sui-tree.js +1 -0
- package/dist/components/sui-trend.d.ts +11 -0
- package/dist/components/sui-trend.js +1 -0
- package/dist/components/sui-virtual-scroller.d.ts +11 -0
- package/dist/components/sui-virtual-scroller.js +1 -0
- package/dist/hydrate/index.d.ts +287 -0
- package/dist/hydrate/index.js +1 -0
- package/dist/hydrate/index.mjs +1 -0
- package/dist/hydrate/package.json +13 -0
- package/dist/index.cjs +55 -0
- package/dist/index.d.cts +28 -0
- package/dist/index.d.mts +28 -0
- package/dist/index.mjs +59 -0
- package/package.json +131 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,c as s,h as r,a as o,t as e}from"./p-CeVlau-G.js";import{r as a}from"./p-BnZU02lM.js";import{i as u}from"./p-wknHx00K.js";import{d as n}from"./p-BHB1Wprj.js";import{d}from"./p-b5Ks_pUg.js";const c=["sm","md","lg"],l=["horizontal","vertical"],b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.suiActiveChange=s(this,"suiActiveChange",3),this.suiPick=s(this,"suiPick",7)}get host(){return this}items=[];size="md";orientation="horizontal";selectable=!1;active=-1;disabled=!1;suiActiveChange;suiPick;hostLabel;group;dispose;stopAria;connectedCallback(){n(this.host,(()=>this.focusTarget())),this.stopAria?.(),this.stopAria=u(this.host,(t=>{this.hostLabel=t})),this.arm()}componentDidLoad(){this.arm()}componentDidUpdate(){this.arm()}disconnectedCallback(){this.stopAria?.(),this.stopAria=void 0,this.dispose?.(),this.dispose=void 0,this.group?.removeEventListener("keydown",this.onArrowSelect)}async setFocus(){this.focusTarget()?.focus()}focusTarget(){if(this.disabled||!this.group)return null;const t=this.group.querySelector('button.item[tabindex="0"]');if(t)return t;const i=this.tabStopIndex();return i<0?null:this.group.querySelector(`button.item[data-index="${i}"]`)}resolvedSize(){return c.includes(this.size)?this.size:"md"}resolvedOrientation(){return l.includes(this.orientation)?this.orientation:"horizontal"}itemOff(t){return this.disabled||!t||!!t.disabled}rovingAxis(){return this.selectable?"both":"vertical"===this.resolvedOrientation()?"vertical":"horizontal"}arm(){this.group&&(this.dispose?.(),this.group.removeEventListener("keydown",this.onArrowSelect),this.dispose=a(this.group,"button.item",this.rovingAxis()),this.group.addEventListener("keydown",this.onArrowSelect))}press(t){const i=(this.items||[])[t];this.itemOff(i)||(this.selectable&&this.active!==t&&(this.active=t,this.suiActiveChange.emit(t)),this.suiPick.emit(i),i.command?.())}onArrowSelect=t=>{if(this.disabled||!this.selectable||!t.defaultPrevented)return;if(!["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End"].includes(t.key))return;const i="undefined"!=typeof document?document.activeElement:null;if(i&&i.classList.contains("item")&&this.group?.contains(i)){const t=Number(i.getAttribute("data-index"));Number.isNaN(t)||this.press(t)}};tabStopIndex(){if(this.disabled)return-1;const t=this.items||[],i=t.findIndex((t=>!t.disabled));return this.selectable&&t[this.active]&&!t[this.active].disabled?this.active:i}tabIndexFor(t){return t===this.tabStopIndex()?0:-1}render(){const t=this.items||[],i=t.length,s=this.resolvedSize(),e="vertical"===this.resolvedOrientation();return r(o,{key:"a1d9af89b0bec96d4188728bfedfab3bd67d004f"},r("div",{key:"9999d2e08f284b560e215e564ac4eb1ca034412d",ref:t=>this.group=t,class:{group:!0,[s]:!0,vertical:e,disabled:this.disabled},role:this.selectable?"radiogroup":"toolbar","aria-label":this.hostLabel,"aria-orientation":e?"vertical":null,"aria-disabled":this.disabled?"true":null},t.map(((t,s)=>{const o=this.selectable&&this.active===s,e=!t.label,a=this.itemOff(t),u=r("button",{type:"button",class:{item:!0,on:o,first:0===s,last:s===i-1,"icon-only":e},role:this.selectable?"radio":void 0,"aria-checked":this.selectable?o?"true":"false":null,"aria-label":t.ariaLabel,disabled:a,"data-index":s,"data-value":t.value??null,tabIndex:this.tabIndexFor(s),onClick:()=>this.press(s)},t.icon?r("i",{class:`${t.icon} icon`,"aria-hidden":"true"}):null,t.label?r("span",{class:"lbl"},t.label):null);return e&&t.ariaLabel?r("sui-tooltip",{key:s,content:t.ariaLabel,position:"top"},u):r("span",{key:s,class:"cell"},u)}))))}static get style(){return".sc-sui-button-group-h{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;font-family:var(--font-sans)}.group.sc-sui-button-group{display:inline-flex;align-items:stretch;box-sizing:border-box;max-width:100%;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface)}.group.vertical.sc-sui-button-group{flex-direction:column}.cell.sc-sui-button-group{display:inline-flex}.vertical.sc-sui-button-group .cell.sc-sui-button-group,.vertical.sc-sui-button-group sui-tooltip.sc-sui-button-group{display:flex;width:100%}.item.sc-sui-button-group{display:inline-flex;align-items:center;justify-content:center;gap:7px;box-sizing:border-box;margin:0;padding:0 var(--sui-button-group-pad-x, 13px);height:var(--control-md);border:none;border-inline-start:1px solid var(--border);border-radius:0;background:transparent;color:var(--ink);font-family:var(--font-sans);font-size:13px;font-weight:var(--w-semibold);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.item.icon-only.sc-sui-button-group{padding:0 10px}.item.first.sc-sui-button-group{border-inline-start:none;border-start-start-radius:calc(var(--radius-md) - 1px);border-end-start-radius:calc(var(--radius-md) - 1px)}.item.last.sc-sui-button-group{border-start-end-radius:calc(var(--radius-md) - 1px);border-end-end-radius:calc(var(--radius-md) - 1px)}.item.first.last.sc-sui-button-group{border-radius:calc(var(--radius-md) - 1px)}.vertical.sc-sui-button-group .item.sc-sui-button-group{width:100%;border-inline-start:none;border-top:1px solid var(--border)}.vertical.sc-sui-button-group .item.first.sc-sui-button-group{border-top:none;border-radius:calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0}.vertical.sc-sui-button-group .item.last.sc-sui-button-group{border-radius:0 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px)}.vertical.sc-sui-button-group .item.first.last.sc-sui-button-group{border-radius:calc(var(--radius-md) - 1px)}.sm.sc-sui-button-group .item.sc-sui-button-group{height:var(--control-sm);font-size:12.5px;padding:0 var(--sui-button-group-pad-x, 8px)}.lg.sc-sui-button-group .item.sc-sui-button-group{height:var(--control-lg)}.item.sc-sui-button-group:hover:not(:disabled):not(.on){background:var(--surface-hover)}.item.sc-sui-button-group:active:not(:disabled):not(.on){background:var(--surface-pressed)}.item.on.sc-sui-button-group{background:var(--brand);color:var(--brand-contrast);font-weight:var(--w-bold)}.item.sc-sui-button-group:disabled{color:var(--disabled-ink);cursor:not-allowed}.item.sc-sui-button-group:disabled:not(.on){background:transparent}.item.on.sc-sui-button-group:disabled{background:var(--disabled-bg)}.item.sc-sui-button-group:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow);position:relative;z-index:1;border-radius:var(--radius-sm)}.item.first.sc-sui-button-group:focus-visible{border-start-start-radius:calc(var(--radius-md) - 1px);border-end-start-radius:calc(var(--radius-md) - 1px)}.item.last.sc-sui-button-group:focus-visible{border-start-end-radius:calc(var(--radius-md) - 1px);border-end-end-radius:calc(var(--radius-md) - 1px)}.vertical.sc-sui-button-group .item.first.sc-sui-button-group:focus-visible{border-radius:calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) var(--radius-sm) var(--radius-sm)}.vertical.sc-sui-button-group .item.last.sc-sui-button-group:focus-visible{border-radius:var(--radius-sm) var(--radius-sm) calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px)}.item.first.last.sc-sui-button-group:focus-visible,.vertical.sc-sui-button-group .item.first.last.sc-sui-button-group:focus-visible{border-radius:calc(var(--radius-md) - 1px)}.icon.sc-sui-button-group{font-size:var(--icon-size-sm);color:var(--ink-muted)}.item.on.sc-sui-button-group .icon.sc-sui-button-group{color:inherit}.item.sc-sui-button-group:disabled .icon.sc-sui-button-group{color:var(--disabled-ink)}@media (forced-colors: active){.item.on.sc-sui-button-group{forced-color-adjust:none;background:Highlight;color:HighlightText;border-color:Highlight}.item.on.sc-sui-button-group:focus-visible{outline-color:CanvasText;box-shadow:none}.item.sc-sui-button-group:disabled{background:GrayText;color:Canvas;border-color:GrayText}.item.sc-sui-button-group:disabled:not(.on){background:Canvas;color:GrayText}.item.sc-sui-button-group:disabled .icon.sc-sui-button-group{color:inherit}}"}},[514,"sui-button-group",{items:[16],size:[513],orientation:[513],selectable:[516],active:[1026],disabled:[516],hostLabel:[32],setFocus:[64]}]);function p(){"undefined"!=typeof customElements&&["sui-button-group","sui-tooltip"].forEach((t=>{switch(t){case"sui-button-group":customElements.get(e(t))||customElements.define(e(t),b);break;case"sui-tooltip":customElements.get(e(t))||d()}}))}export{b as S,p as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t}from"./p-BtgC2u2Q.js";import{c as e,d as n,e as o,g as r,h as u,i,j as c,F as s,f as a}from"./p-DsHK25q3.js";import{d as f}from"./p-BWkzTEZX.js";const l=s.join(","),d='[aria-live]:not([aria-live="off"]), [role="status"], [role="alert"], [role="log"]',p="[data-sui-keep-live]",m=`${d}, ${p}`,y=["data-sui-keep-live","aria-live","role"],b=new Set(["script","style","link","template","noscript","meta","title","base"]),v=t=>!!document.body&&document.body.contains(t),w=t=>t.filter((e=>!t.some((t=>t!==e&&t.contains(e))))),S=[];let g,k,h=new Set,A=[];function C(t){return Array.from(document.querySelectorAll(p)).filter((e=>!e.contains(t)))}function j(){if("undefined"==typeof document)return;for(let t=S.length-1;t>=0;t--)v(S[t])||S.splice(t,1);const t=S[S.length-1],{out:e,keep:n}=t?function(t){const e=new Set,n=document.body;if(!n||!n.contains(t))return{out:e,keep:[]};const o=[t,...c(t),...Array.from(document.querySelectorAll(d)),...C(t)].filter((t=>n.contains(t))),r=new Set(w(o)),u=new Set;return r.forEach((t=>{for(let e=t.parentElement;e&&!u.has(e)&&(u.add(e),e!==n);e=e.parentElement);})),u.forEach((t=>{f(t).forEach((t=>{r.has(t)||u.has(t)||b.has(t.localName)||e.add(t)}))})),{out:e,keep:Array.from(r)}}(t):{out:new Set,keep:[]};A=n;const o=new Set;var r;h.forEach((t=>{e.has(t)?o.add(t):t.removeAttribute("inert")})),e.forEach((t=>{o.has(t)||t.hasAttribute("inert")||(t.setAttribute("inert",""),o.add(t))})),h=o,(r=!!t)&&!k&&"undefined"!=typeof MutationObserver&&document.body?(k=new MutationObserver((t=>{S.length&&(t&&t.length&&!t.some(x)||j())})),k.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:y})):!r&&k&&(k.disconnect(),k=void 0)}function x(t){const e=t.target;if("attributes"===t.type){const t=A.indexOf(e)>=0;return!(!t&&A.some((t=>t.contains(e))))&&t!==("function"==typeof e.matches&&e.matches(m))}if(A.some((t=>t.contains(e))))return!1;const n=Array.from(t.addedNodes).filter((t=>1===t.nodeType));return!!n.length&&("function"!=typeof e.closest||!e.closest("[inert]")||n.some((t=>t.matches(m)||!!t.querySelector(m))))}const F=new Set;let $;function M(){if(F.forEach((t=>{t.owner&&!v(t.owner)&&F.delete(t)})),$&&$.html!==document.documentElement&&($=void 0),F.size&&!$){const t=document.documentElement,e=document.body,n="undefined"!=typeof window?Math.max(0,window.innerWidth-t.clientWidth):0,o={overflow:t.style.overflow,gutter:t.style.getPropertyValue("scrollbar-gutter"),pad:e.style.paddingInlineEnd};if(n>0&&"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("scrollbar-gutter","stable"))t.style.setProperty("scrollbar-gutter","stable");else if(n>0){const t=parseFloat(getComputedStyle(e).paddingInlineEnd)||0;e.style.paddingInlineEnd=`${t+n}px`}t.style.overflow="hidden",$={html:t,unlock:()=>{t.style.overflow=o.overflow,o.gutter?t.style.setProperty("scrollbar-gutter",o.gutter):t.style.removeProperty("scrollbar-gutter"),e.style.paddingInlineEnd=o.pad}}}else if(!F.size&&$){const{unlock:t}=$;$=void 0,t()}}function B(t,c={}){const s=c.onEscape?e(c.onEscape):void 0,a=n(t)||t,f=o(t,{initial:()=>("function"==typeof c.initialFocus?c.initialFocus():c.initialFocus)||t,returnFocus:c.returnFocus,within:e=>i(t,e),companions:()=>function(t){return w(Array.from(document.querySelectorAll(`[data-sui-layer="toast"], ${p}`)).filter((e=>!e.contains(t))))}(a)}),l=function(t){const e=S.findIndex((e=>t!==e&&t.contains(e)));e>=0?S.splice(e,0,t):S.push(t),g||(g=u(j)),j();let n=!1;return()=>{if(n)return;n=!0;const e=S.lastIndexOf(t);e>=0&&S.splice(e,1),S.length||(g?.(),g=void 0),j()}}(a),d=function(t){if("undefined"==typeof document||!document.documentElement||!document.body)return()=>{};const e={owner:t};return M(),F.add(e),M(),()=>{F.delete(e)&&M()}}(t);let m=!1;return{refocus:()=>f.refocus(),release(){m||(m=!0,r(t),s?.(),l(),d(),f.release())}}}function O(t){return t&&a(t)[0]||void 0}function q(e,n){if(!e||!n)return;let o=null;try{o=e.querySelector(n)}catch{return}if(!o)return;const r="function"==typeof o.matches&&o.matches(l)?o:t(o);return r&&!r.hasAttribute("disabled")?r:void 0}function z(t,e){if(!e)return;const n=t.isConnected&&"function"==typeof t.getRootNode?t.getRootNode():null;return q(n&&"function"==typeof n.querySelector?n:document,e)}function D(t){if(t&&t.scrollHeight>t.clientHeight)return t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t}export{q as a,O as f,z as n,B as o,D as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,h as i,a as n,t as o}from"./p-CeVlau-G.js";import{i as u,b as e,c as a}from"./p-wknHx00K.js";import{d as b}from"./p-BHB1Wprj.js";import{a as r,G as d}from"./p-BeYfX4rQ.js";const c=["accent","brand","outline","ghost","danger","link"],l=["sm","md","lg","xl"],v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get host(){return this}variant="outline";tone;size="md";label;icon;iconPos="start";disabled=!1;loading=!1;block=!1;pill=!1;type="button";form;name;value;href;target;rel;hostLabel;hostDisabled=!1;hostDescribedby;stopAria;stopAriaDisabled;stopAriaDescribedby;connectedCallback(){b(this.host,(()=>this.btn)),this.stopAria=u(this.host,(t=>{this.hostLabel=t})),this.stopAriaDisabled=e(this.host,(t=>{this.hostDisabled=t})),this.stopAriaDescribedby=a(this.host,(t=>{this.hostDescribedby=t}))}disconnectedCallback(){this.stopAria?.(),this.stopAria=void 0,this.stopAriaDisabled?.(),this.stopAriaDisabled=void 0,this.stopAriaDescribedby?.(),this.stopAriaDescribedby=void 0}btn;async setFocus(){this.btn?.focus()}get held(){return this.hostDisabled&&!this.disabled}get blocked(){return this.held||(this.href?this.loading||this.disabled:this.loading&&!this.disabled)}get linkRel(){return this.rel??("_blank"===this.target?"noopener":void 0)}onClick=t=>{this.blocked&&(t.preventDefault(),t.stopImmediatePropagation())};onHostClick(t){t.target===this.host&&(this.disabled||this.blocked)&&(t.preventDefault(),t.stopImmediatePropagation())}render(){const t=this.loading,s=this.disabled,o=this.held,u=!!this.href,e=u&&!s&&!this.blocked,a=c.includes(this.variant)?this.variant:"outline",b=l.includes(this.size)?this.size:"md",v="outline"===a||"ghost"===a||"link"===a,g="danger"===this.tone&&v,h="inverse"===this.tone&&v,f=t?i(d,{glyph:r,class:"sui-btn-spin sui-btn-icon"}):this.icon?i("i",{class:`${this.icon} sui-btn-icon`,"aria-hidden":"true"}):null;return i(n,{key:"ecfa207238c205b83e79b0d012cba904a27b60b9"},i(u?"a":"button",{key:"bfd2a6fb1e08f8c34f32d421965bab1135778d8f",ref:t=>this.btn=t,class:{"sui-btn":!0,[a]:!0,[b]:!0,"tone-danger":g,inverse:h,block:this.block,pill:this.pill,loading:t&&!s&&!o,disabled:u&&s||o},type:u?void 0:this.type,form:u?void 0:this.form,name:u?void 0:this.name,value:u?void 0:this.value,disabled:u?void 0:s,href:e?this.href:void 0,target:e?this.target:void 0,rel:e?this.linkRel:void 0,role:u&&!e?"link":void 0,tabIndex:!u||e||s?void 0:0,"aria-disabled":this.blocked?"true":void 0,"aria-label":this.hostLabel,"aria-describedby":this.hostDescribedby,"aria-busy":t?"true":"false",onClick:this.onClick},"end"===this.iconPos?null:f,this.label?i("span",{class:"sui-btn-label"},this.label):null,i("slot",{key:"eeb7ea82feaca996f3e01bf845468e430ffa6176"}),"end"===this.iconPos?f:null))}static get style(){return".sc-sui-button-h{display:inline-block;vertical-align:middle;font-family:var(--font-sans)}[block].sc-sui-button-h{display:block}.sui-btn.sc-sui-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;box-sizing:border-box;border:1px solid transparent;border-radius:var(--sui-button-radius, var(--radius-md));font-family:var(--font-sans);line-height:1;white-space:nowrap;user-select:none;cursor:pointer;text-decoration:none;margin:0;transition:background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.sui-btn.block.sc-sui-button{display:flex;width:100%}.sui-btn.pill.sc-sui-button{border-radius:var(--radius-pill)}.sui-btn.sc-sui-button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:var(--sui-button-focus-offset, 1px);box-shadow:var(--sui-button-focus-shadow, var(--focus-shadow))}.sui-btn.sm.sc-sui-button{height:var(--sui-button-height, var(--control-sm));padding:0 10px;font-size:12.5px}.sui-btn.md.sc-sui-button{height:var(--sui-button-height, var(--control-md));padding:0 var(--button-pad-x);font-size:13px}.sui-btn.lg.sc-sui-button{height:var(--sui-button-height, var(--control-lg));padding:0 var(--button-pad-x-lg);font-size:14px}.sui-btn.xl.sc-sui-button{height:var(--sui-button-height, var(--control-xl));padding:0 var(--button-pad-x-lg);font-size:14px}.sui-btn.sm.sc-sui-button .sui-btn-icon.sc-sui-button{font-size:11px}.sui-btn.md.sc-sui-button .sui-btn-icon.sc-sui-button{font-size:12px}.sui-btn.lg.sc-sui-button .sui-btn-icon.sc-sui-button,.sui-btn.xl.sc-sui-button .sui-btn-icon.sc-sui-button{font-size:14px}.sui-btn.accent.sc-sui-button{background:var(--accent);color:var(--accent-contrast);font-weight:var(--w-heavy)}.sui-btn.accent.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--accent-hover)}.sui-btn.accent.sc-sui-button:focus-visible{outline-color:var(--sui-button-focus-accent, var(--focus-ring))}.sui-btn.accent.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--accent-active)}.sui-btn.brand.sc-sui-button{background:var(--brand);color:var(--brand-contrast);font-weight:var(--w-bold)}.sui-btn.brand.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--brand-hover)}.sui-btn.brand.sc-sui-button:focus-visible{outline-color:var(--sui-button-focus-brand, var(--focus-ring))}.sui-btn.brand.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--brand-active)}.sui-btn.outline.sc-sui-button{background:var(--surface);color:var(--ink);border-color:var(--sui-button-border, var(--control-border));font-weight:var(--w-semibold);background-clip:padding-box}.sui-btn.outline.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{border-color:var(--sui-button-hover-border, color-mix(in srgb, var(--ink) 30%, var(--control-border)));background:var(--brand-soft)}.sui-btn.outline.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:color-mix(in srgb, var(--brand-soft) 92%, var(--ink))}.sui-btn.ghost.sc-sui-button{background:transparent;color:var(--ink);font-weight:var(--w-semibold)}.sui-btn.ghost.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--brand-soft)}.sui-btn.ghost.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:color-mix(in srgb, var(--brand-soft) 92%, var(--ink))}.sui-btn.danger.sc-sui-button{background:var(--danger-fill);color:var(--danger-contrast);font-weight:var(--w-heavy);box-shadow:inset 0 0 0 1.5px var(--danger-fill-edge)}.sui-btn.danger.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--danger-hover)}.sui-btn.danger.sc-sui-button:focus-visible{outline-color:var(--sui-button-focus-danger, var(--focus-ring))}.sui-btn.danger.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--danger-active)}.sui-btn.link.sc-sui-button{background:transparent;color:var(--link);font-weight:var(--w-semibold);position:relative}.sui-btn.link.sm.sc-sui-button,.sui-btn.link.md.sc-sui-button,.sui-btn.link.lg.sc-sui-button,.sui-btn.link.xl.sc-sui-button{padding-inline:0;border-inline-width:0}.sui-btn.link.sc-sui-button::after{content:'';position:absolute;inset:0 -6px;border-radius:var(--sui-button-radius, var(--radius-md))}.sui-btn.link.sc-sui-button:focus-visible{outline:none;box-shadow:none}.sui-btn.link.sc-sui-button:focus-visible::after{outline:2px solid var(--focus-ring);outline-offset:-2px}.sui-btn.link.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{text-decoration:underline}.sui-btn.link.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{text-decoration:underline}.sui-btn.link.sc-sui-button:not(.inverse):not(.tone-danger):active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{color:color-mix(in srgb, var(--link) 70%, var(--ink))}.sui-btn.inverse.sc-sui-button{--focus-ring:var(--ink-inverse);--focus-shadow:none}.sui-btn.outline.inverse.sc-sui-button{background:transparent;color:var(--ink-inverse-muted);border-color:var(--border-inverse)}.sui-btn.ghost.inverse.sc-sui-button,.sui-btn.link.inverse.sc-sui-button{background:transparent;color:var(--ink-inverse-muted)}.sui-btn.outline.inverse.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button,.sui-btn.ghost.inverse.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--border-inverse);color:var(--ink-inverse)}.sui-btn.outline.inverse.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button,.sui-btn.ghost.inverse.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:color-mix(in srgb, var(--ink-inverse) 22%, transparent);color:var(--ink-inverse)}.sui-btn.link.inverse.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{color:var(--ink-inverse)}.sui-btn.outline.tone-danger.sc-sui-button{color:var(--danger);border-color:var(--danger)}.sui-btn.ghost.tone-danger.sc-sui-button,.sui-btn.link.tone-danger.sc-sui-button{color:var(--danger);font-weight:var(--w-bold)}.sui-btn.outline.tone-danger.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button,.sui-btn.ghost.tone-danger.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:var(--danger-soft);color:var(--danger-soft-ink)}.sui-btn.outline.tone-danger.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button,.sui-btn.ghost.tone-danger.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{background:color-mix(in srgb, var(--danger-soft) 84%, var(--danger));color:var(--danger-soft-ink)}.sui-btn.outline.tone-danger.sc-sui-button:hover:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button,.sui-btn.outline.tone-danger.sc-sui-button:active:not(:disabled,.loading.sc-sui-button,.disabled).sc-sui-button{border-color:var(--danger)}.sui-btn.sc-sui-button:disabled,.sui-btn.disabled.sc-sui-button{cursor:not-allowed}.sui-btn.loading.sc-sui-button{cursor:progress}.sui-btn.sc-sui-button:disabled:not(.loading),.sui-btn.disabled.sc-sui-button:not(.loading){color:var(--disabled-ink);border-color:transparent}.sui-btn.accent.sc-sui-button:disabled:not(.loading),.sui-btn.brand.sc-sui-button:disabled:not(.loading),.sui-btn.danger.sc-sui-button:disabled:not(.loading),.sui-btn.accent.disabled.sc-sui-button,.sui-btn.brand.disabled.sc-sui-button,.sui-btn.danger.disabled.sc-sui-button{background:var(--disabled-bg);box-shadow:none}.sui-btn.outline.sc-sui-button:disabled:not(.loading),.sui-btn.outline.disabled.sc-sui-button{background:var(--surface);border-color:var(--border)}.sui-btn.ghost.sc-sui-button:disabled:not(.loading),.sui-btn.link.sc-sui-button:disabled:not(.loading),.sui-btn.ghost.disabled.sc-sui-button,.sui-btn.link.disabled.sc-sui-button{background:transparent}.sui-btn.inverse.sc-sui-button:disabled:not(.loading),.sui-btn.inverse.disabled.sc-sui-button{background:transparent;color:var(--ink-inverse-faint)}.sui-btn.outline.inverse.sc-sui-button:disabled:not(.loading),.sui-btn.outline.inverse.disabled.sc-sui-button{border-color:var(--border-inverse)}.sui-btn-spin.sc-sui-button{animation:sb-spin 0.8s linear infinite}@media (prefers-reduced-motion: reduce){.sui-btn-spin.sc-sui-button{animation-duration:2s}}@media (forced-colors: active){.sui-btn.disabled.sc-sui-button{color:GrayText;border-color:GrayText}}"}},[774,"sui-button",{variant:[513],tone:[513],size:[513],label:[1],icon:[1],iconPos:[513,"icon-pos"],disabled:[516],loading:[516],block:[516],pill:[516],type:[513],form:[1],name:[1],value:[1],href:[1],target:[1],rel:[1],hostLabel:[32],hostDisabled:[32],hostDescribedby:[32],setFocus:[64]},[[2,"click","onHostClick"]]]);function g(){"undefined"!=typeof customElements&&["sui-button"].forEach((t=>{"sui-button"===t&&(customElements.get(o(t))||customElements.define(o(t),v))}))}export{v as SuiButton,g as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as t}from"./p-GAnFXayY.js";import{B as n}from"./p-CeVlau-G.js";import{d as e}from"./p-CZ4DDtn8.js";const o=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'],r=o.map((t=>`${t}:not([tabindex="-1"])`)).join(","),u=[],c=new WeakMap;let i=null;const f=t=>{const n=t.target;i=n&&"function"==typeof n.closest&&n.closest('a[href], button, input, select, textarea, summary, [tabindex], [contenteditable="true"]')||null},s=()=>{i=null};function d(t){return(null!==t.offsetParent||t===document.activeElement||"fixed"===getComputedStyle(t).position)&&!function(t){for(let n=t;n;n=n.parentElement)if(n.inert||n.hasAttribute("inert"))return!0;return!1}(t)}function a(t){return Array.from(t.querySelectorAll(r)).filter(d)}function l(t){const n="function"==typeof t.matches&&t.matches(r)&&d(t),e=a(t);return n?[t,...e]:e}function m(t){const n=[];for(let e=t;e.parentElement&&e!==document.body;e=e.parentElement)n.push({parent:e.parentElement,before:e.previousElementSibling,after:e.nextElementSibling});return n}function p(t,n,e="after"){for(const{parent:o,before:r,after:u}of t){if(!document.contains(o))continue;const t=()=>{for(let t=u&&u.parentElement===o?u:null;t;t=t.nextElementSibling)if(l(t).some(n))return!0;return!1},c=()=>{for(let t=r&&r.parentElement===o?r:null;t;t=t.previousElementSibling)if(l(t).reverse().some(n))return!0;return!1};if("after"===e?t()||c():c()||t())return!0;if(l(o).some(n))return!0}return!1}function y(t,n={}){const e=document.activeElement,o=function(t,n){const e=i;return e&&document.contains(e)&&!n.contains(e)&&(!t||t===document.body||t===document.documentElement||t!==e&&t.contains(e))?e:null}(e,t)||(e&&e!==document.body&&e!==document.documentElement?e:null),r=o?m(o):[],f=m(t),s=e=>!!e&&(t.contains(e)||!(!n.within||!n.within(e))),d=()=>(n.companions?n.companions():[]).filter((n=>!!n&&document.contains(n)&&!t.contains(n)&&!n.contains(t))),l=t=>!!t&&d().some((n=>n.contains(t))),y=()=>d().reduce(((t,n)=>t.concat(a(n))),[]),h=()=>u[u.length-1]===C,w=[];let b;const v=()=>("function"==typeof n.initial?n.initial():n.initial)||a(t)[0]||t,x=(n,e=3)=>{n!==t||t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}),document.activeElement===n||e<=0||"function"!=typeof requestAnimationFrame||requestAnimationFrame((()=>{if(u.indexOf(C)<0||!document.contains(t))return;const n=document.activeElement;n&&n!==document.body&&s(n)||x(v(),e-1)}))},g=()=>x((()=>{for(let n=w.length-1;n>=0;n--)if((t=w[n])&&document.contains(t)&&!t.hasAttribute("disabled"))return w[n];var t;return null})()||a(t)[0]||t),k=(n,e)=>{n.preventDefault(),e?e.focus():x(t)},M=n=>{if("Tab"!==n.key||n.defaultPrevented)return;const e=a(t),o=y();if(!e.length&&!o.length)return void n.preventDefault();const r=e[0],u=e[e.length-1],c=document.activeElement,i=!t.contains(c);!n.shiftKey||e.length&&c!==r&&c!==t&&!i?n.shiftKey||e.length&&c!==u&&!i||k(n,o[0]||r):k(n,o[o.length-1]||u)},S=n=>{if("Tab"!==n.key||n.defaultPrevented||!h())return;const e=n.target;if(!e||t.contains(e)||document.activeElement!==e)return;const o=d().find((t=>t.contains(e)));if(!o)return;const r=a(o),u=r.indexOf(e);if(u>=0&&(n.shiftKey?u>0:u<r.length-1))return;const c=a(t),i=y(),f=i.indexOf(e);k(n,n.shiftKey?f>0?i[f-1]:c[c.length-1]:f>=0&&f<i.length-1?i[f+1]:c[0])},T=n=>{const e=n.target;if(s(e)){if(t.contains(e)&&e!==t){const t=w.indexOf(e);t>=0&&w.splice(t,1),w.push(e),w.length>8&&w.shift()}}else h()&&!l(e)&&g()},A=t=>{if(t.relatedTarget||!h())return;const n=t.target;(s(n)||l(n))&&(clearTimeout(b),b=setTimeout((()=>{if(b=void 0,!h())return;if("function"==typeof document.hasFocus&&!document.hasFocus())return;const t=document.activeElement;t&&t!==document.body&&t!==document.documentElement||g()}),0))};t.addEventListener("keydown",M),document.addEventListener("keydown",S),document.addEventListener("focusin",T),document.addEventListener("focusout",A);const F=()=>x(v()),C={refocus:F,release(){const e=u.indexOf(C);e<0||(clearTimeout(b),b=void 0,t.removeEventListener("keydown",M),document.removeEventListener("keydown",S),document.removeEventListener("focusin",T),document.removeEventListener("focusout",A),u.splice(e,1),!1!==n.restore&&(()=>{let e;for(let t=u.length-1;t>=0&&!e;t--){const n=c.get(u[t]);n&&document.contains(n.container)&&(e=n)}const i=n=>{if(!n||!document.contains(n)||t.contains(n)||n.hasAttribute("disabled")||e&&!e.accepts(n))return!1;n.focus({preventScroll:!0});const o=document.activeElement;return!o||o===n};i("function"==typeof n.returnFocus?n.returnFocus():n.returnFocus)||o&&(i(o)||p(r,i)||(e?e.pull():p(f,i,"before")))})())}};return u.push(C),c.set(C,{container:t,accepts:t=>s(t)||l(t),pull:g}),F(),C}"undefined"!=typeof document&&"function"==typeof document.addEventListener&&(document.removeEventListener("pointerdown",f,!0),document.addEventListener("pointerdown",f,!0),document.removeEventListener("keydown",s,!0),document.addEventListener("keydown",s,!0));const h={surface:0,toast:1,tooltip:2},w=[],b=new Set;let v;const x=new Set;function g(t){if(t.hasAttribute("popover")){try{t.hidePopover?.()}catch{}t.removeAttribute("popover")}}function k(t){if(!t.isConnected)return!1;const n=t.ownerDocument,e="function"==typeof t.getRootNode?t.getRootNode():n;return!n||e!==n||!n.body||n.body.contains(t)}function M(){x.forEach((t=>t()))}function S(t){const n=w.indexOf(t);if(n>=0&&w.splice(n,1),w.push(t),k(t.el)&&t.el.hasAttribute("popover"))try{t.el.hidePopover?.(),t.el.showPopover?.()}catch{}}function T(t,e="surface"){if(!t||"undefined"==typeof document||n.isServer)return()=>{};!function(){for(let t=w.length-1;t>=0;t--)k(w[t].el)||w.splice(t,1)}();const o=w.find((n=>n.el===t));o&&w.splice(w.indexOf(o),1);const r={el:t,tier:e};return t.setAttribute("data-sui-layer",e),o&&g(t),function(t){if(function(t){return"function"==typeof t.showPopover}(t)&&t.isConnected){t.setAttribute("popover","manual");try{t.showPopover()}catch{t.removeAttribute("popover")}}}(t),w.push(r),w.filter((n=>n!==r&&t.contains(n.el))).forEach(S),w.filter((t=>h[t.tier]>h[e])).forEach(S),M(),()=>{const n=w.indexOf(r);n<0||(w.splice(n,1),g(t),t.removeAttribute("data-sui-layer"),b.add(t),void 0===v&&(v=setTimeout((()=>{b.clear(),v=void 0}),0)),M())}}function A(t){return w.some((n=>n.el===t))}function F(t){const n=w.filter((n=>k(n.el)&&n.el.contains(t))).map((t=>t.el));return n.find((t=>!n.some((n=>n!==t&&t.contains(n)))))||null}function C(t){const n=w.findIndex((n=>n.el===t));return n<0?[]:w.filter(((t,e)=>k(t.el)&&(e>n||h[t.tier]>0))).map((t=>t.el))}function $(t,n){return w.filter((e=>e.el!==n&&k(e.el)&&t.contains(e.el))).map((t=>t.el))}function j(t){if($(t).length)return!0;for(const n of b)if(t.contains(n))return!0;return!1}function q(t){return x.add(t),()=>{x.delete(t)}}const z=new Set(["hidden","auto","scroll","clip","overlay"]);function D(n,e,o="bottom",r=6,u="center"){const c=n.getBoundingClientRect();if(!(c.width||c.height||c.top||c.left||"function"!=typeof n.getClientRects||0!==n.getClientRects().length))return{top:0,left:0,side:o,hidden:!0};if(function(t,n){if("function"!=typeof getComputedStyle)return!1;const e=t.ownerDocument?.body;for(let o=t.parentElement;o&&o!==e;o=o.parentElement){if(A(o))return!1;const t=getComputedStyle(o),e=z.has(t.overflowX),r=z.has(t.overflowY);if(!e&&!r)continue;const u=o.getBoundingClientRect();if(e&&(n.right<=u.left||n.left>=u.right)||r&&(n.bottom<=u.top||n.top>=u.bottom))return!0}return!1}(n,c))return{top:0,left:0,side:o,hidden:!0};const i=e.getBoundingClientRect(),f=window.innerWidth,s=window.innerHeight,d=c.bottom<0||c.top>s||c.right<0||c.left>f,a={top:c.top-i.height-r>=8,bottom:c.bottom+i.height+r<=s-8,left:c.left-i.width-r>=8,right:c.right+i.width+r<=f-8},l={top:"bottom",bottom:"top",left:"right",right:"left"},m={top:c.top,bottom:s-c.bottom,left:c.left,right:f-c.right},p=d||a[o]?o:a[l[o]]||m[l[o]]>m[o]?l[o]:o;let y=0,h=0;if("top"===p||"bottom"===p){y="top"===p?c.top-i.height-r:c.bottom+r;const e="center"===u?"center":"start"===u!==t(n)?"left":"right",o="left"===e?c.left:"right"===e?c.right-i.width:c.left+c.width/2-i.width/2;h=d?o:Math.min(Math.max(8,o),Math.max(8,f-i.width-8))}else{h="left"===p?c.left-i.width-r:c.right+r;const t="start"===u?c.top:"end"===u?c.bottom-i.height:c.top+c.height/2-i.height/2;y=d?t:Math.min(Math.max(8,t),Math.max(8,s-i.height-8))}return{top:y,left:h,side:p}}function E(t,n){if(n.hidden)return t.style.visibility="hidden",void t.setAttribute("data-anchor-hidden","");t.hasAttribute("data-anchor-hidden")&&(t.style.visibility="",t.removeAttribute("data-anchor-hidden")),t.style.position="fixed",t.style.top=`${Math.round(n.top)}px`,t.style.left=`${Math.round(n.left)}px`,t.setAttribute("data-side",n.side)}const G=new Set;function B(t,n){const e=e=>{const o=e.composedPath(),r=t().filter((t=>!!t));if(r.some((t=>o.includes(t))))return;const u=e.target;u&&r.some((t=>W(t,u)))||n(e)},o={inside:t,close:n};return G.add(o),document.addEventListener("pointerdown",e,!0),()=>{G.delete(o),document.removeEventListener("pointerdown",e,!0)}}function V(t){Array.from(G).forEach((n=>{G.has(n)&&n.inside().some((n=>n&&n!==t&&t.contains(n)))&&n.close()}))}function W(t,n){const e=new Set,o=n=>{if(t.contains(n))return!0;for(const t of G){if(e.has(t))continue;const r=t.inside().filter((t=>!!t));if(r.some((t=>t.contains(n)))&&(e.add(t),r.some((t=>o(t)))))return!0}return!1};return o(n)}const X=[],Y=t=>{if("Escape"!==t.key||t.defaultPrevented)return;const n=X[X.length-1];n&&(t.preventDefault(),n.onEscape())};function Z(t){const n={onEscape:t};return X.push(n),document.removeEventListener("keydown",Y),document.addEventListener("keydown",Y),()=>{const t=X.indexOf(n);t<0||(X.splice(t,1),document.removeEventListener("keydown",Y),X.length&&document.addEventListener("keydown",Y))}}function H(t){let n;return{arm(){n||(n=Z(t))},disarm(){const t=n;n=void 0,t?.()}}}function I(t){let n=null;const e=()=>{null===n&&(n=requestAnimationFrame((()=>{n=null,t()})))};return window.addEventListener("scroll",e,{capture:!0,passive:!0}),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),null!==n&&cancelAnimationFrame(n),n=null}}function J(t){if(t.inert)return;t.inert=!0;let n=!1;const e=()=>{n||(n=!0,document.removeEventListener("focusin",e,!0),t.inert=!1)};document.addEventListener("focusin",e,!0),setTimeout(e,0)}function K(t,n,e){if("Tab"!==t.key||!n||t.defaultPrevented)return!1;const o=a(n),r=document.activeElement,u=o[0],c=o[o.length-1],i=t.shiftKey&&(!u||r===u||r===n);if((t.shiftKey||c&&r!==c)&&!i)return!1;e();const f=document.activeElement;return f&&f!==document.body&&n.contains(f)||(i?t.preventDefault():J(n)),!0}function L(t,n,e=0){n.style.minWidth=`${Math.max(e,t.getBoundingClientRect().width)}px`}function N(t){let n,o;const r=()=>{void 0!==o&&clearTimeout(o),o=void 0,n?.removeEventListener("animationend",c),n=void 0},u=()=>{r(),t()},c=t=>{const e=t.animationName;if("string"==typeof e&&e&&!/-out$/.test(e))return;const o=t.target;(o===n||o&&o.parentElement===n)&&u()};return{get active(){return void 0!==n},begin(t){r();const i=t?e("--duration-fast",t):0;return!!(t&&i>0)&&(n=t,t.addEventListener("animationend",c),o=setTimeout(u,i+80),!0)},cancel:r}}export{o as F,B as a,I as b,Z as c,F as d,y as e,a as f,V as g,q as h,W as i,C as j,H as k,D as l,E as m,$ as n,N as o,T as p,L as q,j as r,J as s,K as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as s,H as t,h as a,a as i,t as r}from"./p-CeVlau-G.js";import{r as e}from"./p-DRMr6xXH.js";const o=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost()}label="";severity;icon;size="md";resolve(){return e(this.severity,"neutral")}render(){const s=this.resolve();return a(i,{key:"bdcb45a18b9d3ccf05d4e119af1a2e2c8c6f2d0b"},a("span",{key:"dc80258e6964d833311235b2cdad6274c529a712",class:{"sui-tag":!0,[s]:!0,[this.size]:!0}},this.icon?a("i",{class:this.icon,"aria-hidden":"true"}):null,this.label))}static get style(){return".sc-sui-tag-h{display:inline-block;vertical-align:middle;font-family:var(--font-sans)}.sui-tag.sc-sui-tag{display:inline-flex;align-items:center;gap:5px;border-radius:var(--radius-pill);border:1px solid transparent;font-family:var(--font-sans);font-weight:650;white-space:nowrap}.sui-tag.md.sc-sui-tag{padding:3px 10px;font-size:11.5px}.sui-tag.sm.sc-sui-tag{padding:2px 8px;font-size:10.5px}.sui-tag.md.sc-sui-tag i.sc-sui-tag{font-size:10px}.sui-tag.sm.sc-sui-tag i.sc-sui-tag{font-size:9px}.sui-tag.positive.sc-sui-tag{background:var(--status-positive-bg);color:var(--status-positive-ink);border-color:var(--status-positive-edge)}.sui-tag.info.sc-sui-tag{background:var(--status-info-bg);color:var(--status-info-ink);border-color:var(--status-info-accent)}.sui-tag.attention.sc-sui-tag{background:var(--status-attention-bg);color:var(--status-attention-ink);border-color:var(--status-attention-accent)}.sui-tag.critical.sc-sui-tag{background:var(--danger-soft);color:var(--danger-soft-ink);border-color:var(--danger)}.sui-tag.neutral.sc-sui-tag{background:var(--status-neutral-bg);color:var(--status-neutral-ink);border-color:var(--status-neutral-border)}"}},[514,"sui-tag",{label:[1],severity:[513],icon:[1],size:[513]}]);function n(){"undefined"!=typeof customElements&&["sui-tag"].forEach((s=>{"sui-tag"===s&&(customElements.get(r(s))||customElements.define(r(s),o))}))}export{o as S,n as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./p-CZ4DDtn8.js";import{h as t}from"./p-B1-k9bVs.js";function n(e,t,n={}){if("mouse"===e.pointerType||"undefined"==typeof document)return;const o="y"===n.axis,i=o?e.clientY:e.clientX;let u=!0;const r=()=>{u=!1,document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",r)},c=e=>{if(!u)return;const n=(o?e.clientY:e.clientX)-i;r(),Math.abs(n)>=40&&t(n<0?1:-1)};return document.addEventListener("pointerup",c),document.addEventListener("pointercancel",r),r}function o(n,o){let i,u=!1,r=!1,c=!1;const s=()=>{void 0!==i&&(clearTimeout(i),i=void 0)},d=()=>"undefined"!=typeof document&&"hidden"===document.visibilityState,p=()=>{s();const t=(()=>{const e=Math.floor(Number(o.interval()));return Number.isFinite(e)&&e>0?e:0})();!u||!t||r||c||d()||e()||(i=setTimeout(m,t))},m=()=>{i=void 0,u&&(!1!==o.advance()?p():u=!1)},a=()=>{r=!0,s()},f=()=>{r=!1,p()},l=t({parts:()=>[n],enter:()=>{c=!0,s()},leave:()=>{c=!1,p()}}),v=e=>l.focusin(e),y=e=>l.focusout(e),b=()=>d()?s():p();return n.addEventListener("pointerenter",a),n.addEventListener("pointerleave",f),n.addEventListener("focusin",v),n.addEventListener("focusout",y),"undefined"!=typeof document&&document.addEventListener("visibilitychange",b),{start(){u=!0,p()},stop(){u=!1,s()},get active(){return u},dispose(){u=!1,s(),n.removeEventListener("pointerenter",a),n.removeEventListener("pointerleave",f),n.removeEventListener("focusin",v),n.removeEventListener("focusout",y),l.reset(),"undefined"!=typeof document&&document.removeEventListener("visibilitychange",b)}}}export{o as a,n as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,n,r){const e=[],o=[];let s=null;for(let i=Math.max(0,n);i<(t||[]).length;i++){const n=r(t[i]),u=!(!n.items||!n.items.length);null!==s&&u!==s&&(e.push({separator:!0}),o.push(-1)),e.push(n),o.push(i),s=u}return{rows:e,itemAt:o}}function n(t){const n=[];return(t||[]).forEach(((t,r)=>{t.heading?n.push({section:t.heading}):r>0&&n.push({separator:!0}),n.push(...t.links||[])})),n}function r(t){if("function"!=typeof getComputedStyle)return 0;try{const n=getComputedStyle(t);return parseFloat(n.columnGap||(n.getPropertyValue?n.getPropertyValue("column-gap"):""))||0}catch{return 0}}function e(t,n,e){if(!t||"function"!=typeof t.getBoundingClientRect)return null;const o=t.getBoundingClientRect().width;if(!o)return null;const s=t.style,i=t.hasAttribute("style"),u=s.cssText;s.setProperty("width","max-content");try{return{width:o,content:t.getBoundingClientRect().width,gap:r(t),drawn:n.map((t=>t?t.getBoundingClientRect().width:0)),more:e?e.getBoundingClientRect().width:void 0}}finally{s.cssText=u,i||s.length||t.removeAttribute("style")}}class o{widths=[];moreWidth=0;forget(){this.widths=[],this.moreWidth=0}get knowsMore(){return this.moreWidth>0}foldAt(t,n){n.drawn.some(((t,n)=>void 0!==this.widths[n]&&Math.abs(this.widths[n]-t)>1))&&n.drawn.length<t&&(this.widths=[]),n.drawn.forEach(((t,n)=>this.widths[n]=t)),n.more&&(this.moreWidth=n.more);const r=[];for(let n=0;n<t;n++){const t=this.widths[n];if(void 0===t)return null;r.push(t)}const e=function(t,n,r,e,o){const s=r-n+.5;if(t.reduce(((t,n)=>t+n+e),0)<=s)return t.length;let i=o+e,u=0;for(;u<t.length&&i+t[u]+e<=s;)i+=t[u]+e,u++;return u}(r,n.content-n.drawn.reduce(((t,r)=>t+r+n.gap),0)-(n.more?n.more+n.gap:0),n.width,n.gap,this.moreWidth||80);return e>=t?-1:e}}function s(t,n,r){const e=new Set([n]),o=t=>{t.classList.contains("spacer")||e.add(t)};return Array.from(n.children).forEach((t=>{o(t),t.classList.contains("items")&&Array.from(t.children).forEach(o)})),r.forEach((n=>{e.has(n)||t.unobserve(n)})),e.forEach((n=>{r.has(n)||t.observe(n)})),e}function i(t){return(t||[]).map((t=>`${t&&t.label}${t&&t.icon||""}${t&&t.items&&t.items.length?1:0}`)).join("")}export{o as F,n as c,t as f,i,e as r,s as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as i,H as s,c as n,h as e,t as u}from"./p-CeVlau-G.js";import{F as t,d as r}from"./p-piEUki9n.js";import{G as a,w as o,y as l}from"./p-BeYfX4rQ.js";import{i as c,a as d}from"./p-wknHx00K.js";import{u as p}from"./p-U06fVoGD.js";import{i as b,d as m,s as h,r as f}from"./p-BHB1Wprj.js";import{k as v}from"./p-BM1Zzj1H.js";import{i as x,l as g,a as y}from"./p-BuyjS5bS.js";import{b as k,c as w,f as z,p as B}from"./p-BpxmwysK.js";import{f as F}from"./p-CGWvlrv_.js";const D=["sm","md","lg"],j=i(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.suiChange=n(this,"suiChange",7),this.suiInput=n(this,"suiInput",7),this.suiFocus=n(this,"suiFocus",3),this.suiBlur=n(this,"suiBlur",3),this.internals=this.attachInternals()}get host(){return this}internals;label;required=!1;help;error;size="md";variant="default";tone;invalid=!1;disabled=!1;readOnly=!1;value=null;min;max;step=1;money=!1;currency="USD";align;locale;prefixText;suffixText;decimals;hideButtons=!1;name;placeholder;autocomplete;suiChange;suiInput;suiFocus;suiBlur;text="";hostLabel;hostLabelledby;stopAria;stopLabelledby;formDisabled=!1;focused=!1;fieldId=p("sui-input-number");input;initial=null;get isDisabled(){return this.disabled||this.formDisabled}committing=!1;disposeFilter;connectedCallback(){b(this.host,this.internals),m(this.host,(()=>this.input)),this.stopAria?.(),this.stopAria=c(this.host,(i=>{this.hostLabel=i})),this.stopLabelledby?.(),this.stopLabelledby=d(this.host,(i=>{this.hostLabelledby=i})),this.input&&this.attachFilter()}componentWillLoad(){this.value=this.coerce(this.value),this.value=this.normalizeValue(this.value),this.initial=this.value,this.text=this.fmt(this.value),this.syncForm()}componentDidLoad(){this.attachFilter(),this.syncForm()}disconnectedCallback(){this.disposeFilter?.(),this.disposeFilter=void 0,this.stopAria?.(),this.stopLabelledby?.()}onValue(i){const s=this.normalizeValue(i);s===i?(this.committing||(this.text=this.fmt(s)),this.syncForm()):this.value=s}componentDidRender(){this.syncForm()}syncForm(){h(this.internals,this.isDisabled?null:null==this.value?"":String(this.value)),f(this.internals,this.required&&!this.isDisabled&&!this.readOnly,null==this.value,this.label,this.input,this.error)}onBounds(){const i=this.normalizeValue(this.value);i!==this.value?this.value=i:this.text=this.fmt(i)}get loc(){return x(this.locale)}onLocale(){this.attachFilter(),this.onBounds()}attachFilter(){this.disposeFilter?.(),this.input&&(this.disposeFilter=v(this.input,new RegExp(`^[${k(this.loc)}]$`)))}formResetCallback(){this.value=this.initial,this.text=this.fmt(this.initial),this.input&&(this.input.value=this.text),this.syncForm()}formDisabledCallback(i){this.formDisabled=F(this.host,this.disabled,i),this.syncForm()}async select(){this.input?.select()}async setFocus(){this.input?.focus()}coerce(i){if(null==i||""===i)return null;const s="number"==typeof i?i:parseFloat(String(i));return isNaN(s)?null:s}get isMoney(){return this.money}shape(){const i=w(this.currency||"USD",this.loc);return{prefix:i.prefix.trim(),suffix:i.suffix.trim(),fractionDigits:i.fractionDigits}}dec(){return null!=this.decimals?this.decimals:this.isMoney?this.shape().fractionDigits:0}fmt(i){return null==i||isNaN(i)?"":z(i,this.dec(),this.loc)}parse(i){return B(i,this.loc)}clamp(i){return Math.min(null!=this.max?this.max:1/0,Math.max(null!=this.min?this.min:-1/0,i))}normalizeValue(i){const s=this.coerce(i);if(null==s)return null;const n=Math.pow(10,this.dec());return this.clamp(Math.round(s*n)/n)}stepSize(){const i=Number(this.step);return Number.isFinite(i)&&i>0?i:1}valueText(){if(null==this.value)return null;const i=this.isMoney,s=i?this.shape():null,n=i?s.prefix:this.prefixText,e=[i?s.suffix:"",this.suffixText||""].filter(Boolean).join(" "),u=`${n||""}${this.fmt(this.value)}${e?` ${e}`:""}`;return u===String(this.value)?null:u}stepLabel(i){const s=this.label;return i>0?s?g(void 0,"input-number.incrementField",void 0,"Increment {field}",{field:s}):y(void 0,"input-number.increment",void 0,"Increment"):s?g(void 0,"input-number.decrementField",void 0,"Decrement {field}",{field:s}):y(void 0,"input-number.decrement",void 0,"Decrement")}onWrapMouseDown=i=>{if(this.isDisabled)return;const s=i.target;s===this.input||s.closest(".steppers")||(i.preventDefault(),this.input?.focus())};commit(i){const s=this.value,n=this.normalizeValue(i);this.committing=!0,this.value=n,this.text=this.fmt(n),this.committing=!1,n!==s&&this.suiChange.emit(n)}stepBy(i,s=1){this.isDisabled||this.readOnly||this.commit((this.value||0)+i*this.stepSize()*s)}onInput=i=>{const s=i.target,n=s.value.replace(new RegExp(`[^${k(this.loc)}\\s]`,"g"),"");n!==s.value&&(s.value=n),this.text=n,this.suiInput.emit(this.parse(n))};onFocus=()=>{this.focused=!0,this.suiFocus.emit()};onBlur=()=>{this.focused=!1,this.commit(this.parse(this.text)),this.suiBlur.emit()};onKeyDown=i=>{if("Enter"===i.key)return void this.commit(this.parse(this.text));const s="ArrowUp"===i.key||"PageUp"===i.key;(s||"ArrowDown"===i.key||"PageDown"===i.key)&&(i.preventDefault(),this.stepBy(s?1:-1,i.key.startsWith("Page")?10:1))};render(){const i=this.invalid||!!this.error,s=D.includes(this.size)?this.size:"md",n=this.isMoney,u=n?this.shape():null,c=n?u.prefix:this.prefixText,d=[n?u.suffix:"",this.suffixText||""].filter(Boolean).join(" "),p="quiet"===this.variant,b=p?{"sui-inline":!0,text:!0,[s]:!0,invalid:i,disabled:this.isDisabled,readonly:this.readOnly,shell:this.focused,inverse:"inverse"===this.tone}:{"sui-input":!0,"sui-frame":!0,"sui-number":!0,[s]:!0,invalid:i,disabled:this.isDisabled,readonly:this.readOnly,currency:n,end:"end"===(this.align??(n?"end":"start"))},m=e("input",{key:"44d4cfd31b446097bd297a4d65b469e36665f68d",ref:i=>this.input=i,id:this.fieldId,class:"field",type:"text",size:p?1:void 0,inputMode:0===this.dec()&&null!=this.min&&this.min>=0?"numeric":"decimal",role:"spinbutton","aria-label":p?this.label||this.hostLabel:this.label?void 0:this.hostLabel,"aria-labelledby":this.label?void 0:this.hostLabelledby,value:this.text,placeholder:this.placeholder,autocomplete:this.autocomplete,disabled:this.isDisabled,readOnly:this.readOnly,required:this.required,"aria-valuenow":null==this.value?null:this.value,"aria-valuetext":this.valueText(),"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-invalid":i?"true":null,"aria-describedby":r(this.fieldId,this.help,this.error),onFocus:this.onFocus,onBlur:this.onBlur,onInput:this.onInput,onKeyDown:this.onKeyDown});return e(t,{key:"6a4509fbe04a7ce3aaa1278410747ef599890e3e",label:p?void 0:this.label,required:this.required,help:this.help,error:this.error,htmlFor:this.fieldId,descId:this.fieldId},e("div",{key:"1662135e4297eae51bd49d7fe8b2fdd66c9804ae",class:b,onMouseDown:this.onWrapMouseDown},c?e("span",{class:"affix prefix","aria-hidden":"true"},c):null,p?e("span",{class:"fit","data-value":this.text||this.placeholder||""},m):m,d?e("span",{class:"affix suffix"},d):null,this.hideButtons?null:e("div",{class:"steppers"},e("button",{type:"button",class:"step",tabIndex:-1,disabled:this.isDisabled||this.readOnly,"aria-label":this.stepLabel(1),onClick:()=>this.stepBy(1)},e(a,{glyph:o})),e("div",{class:"step-rule","aria-hidden":"true"}),e("button",{type:"button",class:"step",tabIndex:-1,disabled:this.isDisabled||this.readOnly,"aria-label":this.stepLabel(-1),onClick:()=>this.stepBy(-1)},e(a,{glyph:l})))))}static get formAssociated(){return!0}static get watchers(){return{value:[{onValue:0}],required:[{syncForm:0}],error:[{syncForm:0}],disabled:[{syncForm:0}],readOnly:[{syncForm:0}],label:[{syncForm:0}],min:[{onBounds:0}],max:[{onBounds:0}],decimals:[{onBounds:0}],money:[{onBounds:0}],currency:[{onBounds:0}],locale:[{onLocale:0}]}}static get style(){return".sc-sui-input-number-h{display:block;font-family:var(--font-sans);min-inline-size:min(180px, 100%)}[align].sc-sui-input-number-h{text-align:inherit}.sc-sui-input-number-h .sui-input.sui-number.sc-sui-input-number{display:flex;align-items:stretch;overflow:hidden;padding:0;cursor:text}.sui-number.sc-sui-input-number .field.sc-sui-input-number{flex:1 1 0;width:0;min-width:0;border:none;outline:none;background:transparent;color:inherit;font-family:var(--font-sans);font-weight:460;font-feature-settings:'tnum';text-align:start}.sui-number.sc-sui-input-number .field.sc-sui-input-number:disabled{color:var(--disabled-ink);cursor:not-allowed}.sui-input.sui-number.readonly.sc-sui-input-number:not(.disabled){background:var(--surface-sunken)}.sui-number.end.sc-sui-input-number .field.sc-sui-input-number{text-align:end}.sui-number.sc-sui-input-number .affix.sc-sui-input-number{display:flex;align-items:center;color:var(--ink-faint)}.sui-number.disabled.sc-sui-input-number .affix.sc-sui-input-number{color:var(--ink-placeholder)}.sui-number.sm.sc-sui-input-number .field.sc-sui-input-number{padding:0 10px;font-size:12.5px}.sui-number.md.sc-sui-input-number .field.sc-sui-input-number,.sui-number.lg.sc-sui-input-number .field.sc-sui-input-number{padding:0 var(--control-pad-x)}.sui-number.md.sc-sui-input-number .field.sc-sui-input-number{font-size:13px}.sui-number.lg.sc-sui-input-number .field.sc-sui-input-number{font-size:14px}.sui-number.sm.sc-sui-input-number .prefix.sc-sui-input-number{padding-inline-start:10px;font-size:12.5px}.sui-number.md.sc-sui-input-number .prefix.sc-sui-input-number,.sui-number.lg.sc-sui-input-number .prefix.sc-sui-input-number{padding-inline-start:var(--control-pad-x)}.sui-number.sm.sc-sui-input-number .suffix.sc-sui-input-number{padding-inline-end:10px;font-size:12.5px}.sui-number.md.sc-sui-input-number .suffix.sc-sui-input-number,.sui-number.lg.sc-sui-input-number .suffix.sc-sui-input-number{padding-inline-end:var(--control-pad-x)}.sui-number.md.sc-sui-input-number .affix.sc-sui-input-number{font-size:13px}.sui-number.lg.sc-sui-input-number .affix.sc-sui-input-number{font-size:14px}.sui-number.currency.sc-sui-input-number .field.sc-sui-input-number{padding-inline-start:4px}.steppers.sc-sui-input-number{display:flex;flex-direction:column;width:26px;align-self:stretch;flex:none}.step.sc-sui-input-number{flex:1;display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;border-inline-start:1px solid var(--border);background:var(--surface-sunken);color:var(--ink-muted);cursor:pointer;font-family:inherit;transition:background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.step.sc-sui-input-number .sui-glyph.sc-sui-input-number{font-size:9px}.step.sc-sui-input-number:hover:not(:disabled){color:var(--ink)}.step.sc-sui-input-number:active:not(:disabled){background:var(--brand-soft)}.step.sc-sui-input-number:disabled{cursor:not-allowed;color:var(--ink-placeholder)}.step.sc-sui-input-number:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.step-rule.sc-sui-input-number{height:1px;background:var(--border);margin-inline-start:1px}.sc-sui-input-number-h .sui-inline.sc-sui-input-number{gap:4px;font-feature-settings:'tnum'}.sui-inline.sc-sui-input-number .affix.sc-sui-input-number{display:flex;align-items:center;color:var(--ink-faint)}.sui-inline.disabled.sc-sui-input-number .affix.sc-sui-input-number{color:var(--ink-placeholder)}.sui-inline.sc-sui-input-number .steppers.sc-sui-input-number{width:18px;visibility:hidden}.sui-inline.sc-sui-input-number:hover .steppers.sc-sui-input-number,.sui-inline.shell.sc-sui-input-number .steppers.sc-sui-input-number{visibility:visible}.sui-inline.sc-sui-input-number .step.sc-sui-input-number{border-inline-start:none}.sui-inline.sc-sui-input-number .step.sc-sui-input-number:not(:active){background:transparent}.sui-inline.sc-sui-input-number .step.sc-sui-input-number:active:not(:disabled){background:var(--surface-pressed);border-radius:var(--radius-sm)}.sui-inline.sc-sui-input-number .step-rule.sc-sui-input-number{display:none}@media (forced-colors: active){.step-rule.sc-sui-input-number{background:CanvasText}.sui-number.disabled.sc-sui-input-number .affix.sc-sui-input-number,.sui-inline.disabled.sc-sui-input-number .affix.sc-sui-input-number{color:GrayText}}.sui-field.sc-sui-input-number{display:flex;flex-direction:column;gap:6px;font-family:var(--font-sans);min-width:0}.sui-field-label.sc-sui-input-number{font-size:12.5px;font-weight:620;color:var(--ink);line-height:1.3}.sui-field.invalid.sc-sui-input-number .sui-field-label.sc-sui-input-number{color:var(--danger)}.sui-field-req.sc-sui-input-number{color:var(--danger);margin-inline-start:3px}.sui-field-help.sc-sui-input-number{font-size:12px;color:var(--ink-faint);line-height:1.4}.sui-field-error.sc-sui-input-number{font-size:12px;font-weight:600;color:var(--danger);display:flex;align-items:center;gap:5px;line-height:1.4}.sui-field-error.sc-sui-input-number .sui-glyph.sc-sui-input-number{font-size:11px}.sui-frame.sc-sui-input-number{box-sizing:border-box;background:var(--sui-field-bg, var(--surface));border:1px solid var(--sui-field-border, var(--control-border));border-radius:var(--sui-field-radius, var(--radius-md));box-shadow:none;outline:none;transition:border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out)}.sui-frame.sc-sui-input-number:hover{border-color:var(--sui-field-border, color-mix(in srgb, var(--control-border) 55%, var(--ink)))}.sui-frame[readonly].sc-sui-input-number,.sui-frame.readonly.sc-sui-input-number{border-color:var(--sui-field-border, var(--control-border));background:var(--sui-field-bg, var(--surface-sunken))}.sui-frame.sc-sui-input-number:focus-within,.sui-frame.focus.sc-sui-input-number,.sui-frame.open.sc-sui-input-number{border-color:var(--sui-field-border, var(--focus-ring));outline:var(--sui-field-edge, 1px solid var(--focus-ring));outline-offset:-2px;box-shadow:var(--sui-field-halo, 0 0 0 3px var(--focus-halo))}.sui-frame.invalid.sc-sui-input-number{border-color:var(--sui-field-border, var(--danger));outline:var(--sui-field-edge, 1px solid var(--danger));outline-offset:-2px}.sui-frame.invalid.sc-sui-input-number:focus-within,.sui-frame.invalid.focus.sc-sui-input-number,.sui-frame.invalid.open.sc-sui-input-number{outline-width:2px;outline-offset:-3px;box-shadow:var(--sui-field-halo, 0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent))}.sui-frame.sc-sui-input-number:disabled,.sui-frame.disabled.sc-sui-input-number{--ink-muted:var(--disabled-ink);--ink-faint:var(--disabled-ink);border-color:var(--sui-field-border, var(--border));outline:none;box-shadow:none;background:var(--sui-field-bg, var(--disabled-bg));color:var(--disabled-ink);cursor:not-allowed}.sui-input.sc-sui-input-number{width:100%;color:var(--ink);font-family:var(--font-sans);font-weight:460}.sui-input.sc-sui-input-number::placeholder{color:var(--ink-placeholder)}.sui-input.sm.sc-sui-input-number{height:var(--sui-field-height, var(--control-sm));padding:0 10px;font-size:12.5px}.sui-input.md.sc-sui-input-number{height:var(--sui-field-height, var(--control-md));padding:0 var(--control-pad-x);font-size:13px}.sui-input.lg.sc-sui-input-number{height:var(--sui-field-height, var(--control-lg));padding:0 var(--control-pad-x);font-size:14px}@media (forced-colors: active){.sui-frame.sc-sui-input-number:focus-within,.sui-frame.focus.sc-sui-input-number,.sui-frame.open.sc-sui-input-number{outline:2px solid Highlight;outline-offset:1px}.sui-frame.sc-sui-input-number:disabled,.sui-frame.disabled.sc-sui-input-number{color:GrayText;border-color:GrayText}}.sui-inline.sc-sui-input-number{box-sizing:border-box;display:inline-flex;align-items:center;align-self:flex-start;gap:8px;max-width:calc(100% + 18px);min-height:var(--control-md);padding:2px 8px;margin:-3px -9px;background:transparent;color:var(--ink);border:1px solid transparent;border-radius:var(--radius-md);box-shadow:none;font:inherit;cursor:pointer;user-select:none;text-align:start;transition:background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out)}.sui-inline.sm.sc-sui-input-number{min-height:var(--control-sm)}.sui-inline.md.sc-sui-input-number{min-height:var(--control-md)}.sui-inline.lg.sc-sui-input-number{min-height:var(--control-lg)}.sui-inline.text.sc-sui-input-number{cursor:text;user-select:auto}.sui-inline.text.readonly.sc-sui-input-number{cursor:default}.sui-inline.sc-sui-input-number:hover:not(:disabled):not(.disabled):not(.readonly):not(.shell){--ink-faint:var(--ink-muted);background:var(--surface-hover)}.sui-inline.sc-sui-input-number:focus{outline:none}.sui-inline.sc-sui-input-number:focus-visible:not(.shell){outline:2px solid var(--sui-inline-ring, var(--focus-ring));outline-offset:1px;box-shadow:var(--sui-inline-halo, var(--focus-shadow))}.sui-inline.shell.sc-sui-input-number{border-color:var(--focus-ring);outline:1px solid var(--focus-ring);outline-offset:-2px;background:var(--surface);box-shadow:0 0 0 3px var(--focus-halo)}.sui-inline.invalid.sc-sui-input-number{border-color:var(--danger);--sui-inline-ring:var(--danger);--sui-inline-halo:0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent)}.sui-inline.invalid.shell.sc-sui-input-number{border-color:var(--danger);outline:2px solid var(--danger);outline-offset:-3px;box-shadow:var(--sui-inline-halo)}.sui-inline.sc-sui-input-number:disabled,.sui-inline.disabled.sc-sui-input-number{color:var(--disabled-ink);cursor:not-allowed}.sui-inline.sc-sui-input-number .icon.sc-sui-input-number,.sui-inline.sc-sui-input-number .lead.sc-sui-input-number{font-size:12px;width:15px;text-align:center;color:var(--ink-muted);flex-shrink:0}.sui-inline.sc-sui-input-number:disabled .icon.sc-sui-input-number,.sui-inline.disabled.sc-sui-input-number .icon.sc-sui-input-number,.sui-inline.disabled.sc-sui-input-number .lead.sc-sui-input-number{color:var(--ink-placeholder)}.sui-inline.sc-sui-input-number .val.sc-sui-input-number{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sui-inline.placeholder.sc-sui-input-number .val.sc-sui-input-number{color:var(--ink-muted)}.sui-inline.sc-sui-input-number:disabled.placeholder .val.sc-sui-input-number,.sui-inline.disabled.placeholder.sc-sui-input-number .val.sc-sui-input-number{color:var(--ink-placeholder)}.sui-inline.sc-sui-input-number .fit.sc-sui-input-number{display:inline-grid;align-items:stretch;min-width:0;max-width:100%}.sui-inline.sc-sui-input-number .fit.sc-sui-input-number::after{content:attr(data-value);grid-area:1 / 1;visibility:hidden;white-space:pre;font:inherit}.sui-inline.sc-sui-input-number .fit.sc-sui-input-number input.sc-sui-input-number{grid-area:1 / 1;width:0;min-width:100%;padding:0;margin:0;border:none;outline:none;background:transparent;color:inherit;font:inherit;text-align:start;text-overflow:ellipsis}.sui-inline.sc-sui-input-number .fit.sc-sui-input-number input.sc-sui-input-number::placeholder{color:var(--ink-muted)}.sui-inline.sc-sui-input-number .fit.sc-sui-input-number input.sc-sui-input-number:disabled{cursor:not-allowed}.sui-inline.sc-sui-input-number .fit.sc-sui-input-number input.sc-sui-input-number:disabled::placeholder{color:var(--ink-placeholder)}.sui-inline.sc-sui-input-number .clear.sc-sui-input-number{display:inline-flex;padding:2px;color:var(--ink-faint);font-size:11px;cursor:pointer;border-radius:4px;visibility:hidden}.sui-inline.sc-sui-input-number .clear.sc-sui-input-number:hover{color:var(--ink)}.sui-inline.sc-sui-input-number .chev.sc-sui-input-number{font-size:10px;color:var(--ink-faint);visibility:hidden;transition:transform var(--duration-fast) var(--ease-out)}.sui-inline.open.sc-sui-input-number .chev.sc-sui-input-number{transform:rotate(180deg)}.sui-inline.sc-sui-input-number:hover .clear.sc-sui-input-number,.sui-inline.sc-sui-input-number:focus-visible .clear.sc-sui-input-number,.sui-inline.shell.sc-sui-input-number .clear.sc-sui-input-number,.sui-inline.sc-sui-input-number:hover .chev.sc-sui-input-number,.sui-inline.sc-sui-input-number:focus-visible .chev.sc-sui-input-number,.sui-inline.shell.sc-sui-input-number .chev.sc-sui-input-number{visibility:visible}.sui-inline.sc-sui-input-number .spin.sc-sui-input-number{font-size:11px;color:var(--ink-faint)}.sui-inline.text.sc-sui-input-number .clear.sc-sui-input-number,.sui-inline.text.sc-sui-input-number .chev.sc-sui-input-number{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:var(--ink-faint);cursor:pointer;visibility:visible;opacity:0;pointer-events:none;transition:opacity var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.sui-inline.text.sc-sui-input-number .clear.sc-sui-input-number .sui-glyph.sc-sui-input-number{font-size:11px}.sui-inline.text.sc-sui-input-number .chev.sc-sui-input-number .sui-glyph.sc-sui-input-number{font-size:10px;transition:transform var(--duration-fast) var(--ease-out)}.sui-inline.text.sc-sui-input-number .clear.sc-sui-input-number:hover:not(:disabled),.sui-inline.text.sc-sui-input-number .chev.sc-sui-input-number:hover:not(:disabled){color:var(--ink)}.sui-inline.text.sc-sui-input-number .clear.sc-sui-input-number:focus-visible,.sui-inline.text.sc-sui-input-number .chev.sc-sui-input-number:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.sui-inline.text.sc-sui-input-number .clear.sc-sui-input-number:disabled,.sui-inline.text.sc-sui-input-number .chev.sc-sui-input-number:disabled{color:var(--ink-placeholder);cursor:not-allowed}.sui-inline.text.sc-sui-input-number:hover .clear.sc-sui-input-number,.sui-inline.text.sc-sui-input-number:focus-within .clear.sc-sui-input-number,.sui-inline.text.shell.sc-sui-input-number .clear.sc-sui-input-number,.sui-inline.text.sc-sui-input-number:hover .chev.sc-sui-input-number,.sui-inline.text.sc-sui-input-number:focus-within .chev.sc-sui-input-number,.sui-inline.text.shell.sc-sui-input-number .chev.sc-sui-input-number{opacity:1;pointer-events:auto}.sui-inline.inverse.sc-sui-input-number:not(.shell){--ink:var(--ink-inverse);--ink-muted:var(--ink-inverse-muted);--ink-faint:var(--ink-inverse-muted);--ink-placeholder:var(--ink-inverse-faint);--disabled-ink:var(--ink-inverse-faint);--surface-hover:color-mix(in srgb, var(--ink-inverse) 8%, transparent);--focus-ring:var(--ink-inverse);--focus-shadow:none}.sui-inline.inverse.sc-sui-input-number .chev.sc-sui-input-number{visibility:visible}.sui-inline.inverse.text.sc-sui-input-number .chev.sc-sui-input-number{opacity:1;pointer-events:auto}.sui-inline.inverse.sc-sui-input-number:not(.shell) sui-chip.sc-sui-input-number{--brand-soft:color-mix(in srgb, var(--ink-inverse) 16%, transparent)}@media (forced-colors: active){.sui-inline.sc-sui-input-number{border-color:CanvasText}.sui-inline.sc-sui-input-number:hover:not(:disabled):not(.disabled):not(.readonly):not(.shell){border-color:Highlight}.sui-inline.shell.sc-sui-input-number{border-color:CanvasText;outline:2px solid Highlight;outline-offset:1px}.sui-inline.sc-sui-input-number:disabled,.sui-inline.disabled.sc-sui-input-number{color:GrayText;border-color:GrayText}.sui-inline.sc-sui-input-number:disabled .icon.sc-sui-input-number,.sui-inline.disabled.sc-sui-input-number .icon.sc-sui-input-number,.sui-inline.disabled.sc-sui-input-number .lead.sc-sui-input-number{color:GrayText}.sui-inline.placeholder.sc-sui-input-number .val.sc-sui-input-number{color:GrayText}}"}},[578,"sui-input-number",{label:[1],required:[516],help:[1],error:[1],size:[513],variant:[513],tone:[513],invalid:[516],disabled:[516],readOnly:[516,"readonly"],value:[1026],min:[2],max:[2],step:[2],money:[516],currency:[1],align:[513],locale:[1],prefixText:[1,"prefix-text"],suffixText:[1,"suffix-text"],decimals:[2],hideButtons:[516,"hide-buttons"],name:[513],placeholder:[1],autocomplete:[1],text:[32],hostLabel:[32],hostLabelledby:[32],formDisabled:[32],focused:[32],select:[64],setFocus:[64]},void 0,{value:[{onValue:0}],required:[{syncForm:0}],error:[{syncForm:0}],disabled:[{syncForm:0}],readOnly:[{syncForm:0}],label:[{syncForm:0}],min:[{onBounds:0}],max:[{onBounds:0}],decimals:[{onBounds:0}],money:[{onBounds:0}],currency:[{onBounds:0}],locale:[{onLocale:0}]}]);function T(){"undefined"!=typeof customElements&&["sui-input-number"].forEach((i=>{"sui-input-number"===i&&(customElements.get(u(i))||customElements.define(u(i),j))}))}export{j as SuiInputNumber,T as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as i,H as s,h as o,a as t,t as e}from"./p-CeVlau-G.js";import{o as n,h as r}from"./p-BWkzTEZX.js";const c=i(class extends s{constructor(i){super(),!1!==i&&this.__registerHost()}get host(){return this}term="";description;variant;breakpoint=560;previewColumn=!1;controlWidth;controlAlign="start";hasPreview=!1;narrow=!1;dispose;resizeObserver;width=0;loaded=!1;connectedCallback(){this.loaded&&this.watch(!0)}componentWillLoad(){this.detect()}onBreakpoint(){this.measure(this.width)}componentDidLoad(){this.loaded=!0,this.watch()}watch(i=!1){this.dispose?.(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.dispose=n(this.host,(()=>this.detect()),{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((i=>{this.measure(i.length?i[0].contentRect.width:this.host.clientWidth||0)})),this.resizeObserver.observe(this.host)),i&&Promise.resolve().then((()=>{this.host.isConnected&&(this.detect(),this.resizeObserver&&this.measure(this.host.clientWidth||0))}))}measure(i){this.width=i,this.narrow=this.breakpoint>0&&i>0&&i<this.breakpoint}disconnectedCallback(){this.dispose?.(),this.dispose=void 0,this.resizeObserver?.disconnect(),this.resizeObserver=void 0}detect(){this.hasPreview=r(this.host,"preview")}render(){const i=this.variant?"mobile"===this.variant:this.narrow,s=this.previewColumn||this.hasPreview;return o(t,{key:"68948128749749c17e631b7f0a295649cf65ef4e"},o("div",{key:"5a707fd1bec08a76014ae2c8e33d5e1b93877a3f",class:{row:!0,desktop:!i,mobile:i,"with-preview":!i&&s}},o("div",{key:"6c730b0a08a10522ce66b446ed235ab7248155b6",class:"rail"},o("div",{key:"abcab9ad23e83ccee1a4c21e49215a7aa8a0c636",class:"term"},this.term),this.description?o("div",{class:"description"},this.description):null),o("div",{key:"c8680903096b17117c326c2b887009120062119a",class:{control:!0,end:"end"===this.controlAlign},style:this.controlWidth?{width:this.controlWidth}:void 0},o("slot",{key:"bcdf3684be7652238af5c4e1676519c0e907474f",name:"control"})),i?this.hasPreview?o("div",{class:"preview panel"},o("slot",{name:"preview"})):null:s?o("div",{class:"preview"},this.hasPreview?o("slot",{name:"preview"}):null):null))}static get watchers(){return{breakpoint:[{onBreakpoint:0}]}}static get style(){return".sc-sui-config-row-h{display:block;font-family:var(--font-sans);color:var(--ink);border-top:1px solid var(--hairline)}.sc-sui-config-row-h:first-of-type{border-top:none}.row.desktop.sc-sui-config-row{display:grid;grid-template-columns:200px minmax(0, 1fr);gap:24px;padding:18px 20px}.row.desktop.with-preview.sc-sui-config-row{grid-template-columns:200px minmax(0, 1fr) 240px}.row.mobile.sc-sui-config-row{padding:14px 16px}.term.sc-sui-config-row{font-size:13.5px;font-weight:700}.description.sc-sui-config-row{font-size:12px;color:var(--ink-muted);line-height:1.5;margin-top:4px;text-wrap:pretty}.mobile.sc-sui-config-row .description.sc-sui-config-row{margin-top:3px}.control.sc-sui-config-row,.preview.sc-sui-config-row{min-width:0}.control.sc-sui-config-row{max-width:100%;box-sizing:border-box}.desktop.sc-sui-config-row .control.end.sc-sui-config-row{justify-self:end}.desktop.sc-sui-config-row .control.end.sc-sui-config-row{text-align:end}.desktop .control.end.sc-sui-config-row-s>*,.desktop .control.end .sc-sui-config-row-s>*{text-align:start}.desktop .control.end.sc-sui-config-row-s>div:not([class]):not([style]),.desktop .control.end .sc-sui-config-row-s>div:not([class]):not([style]){display:contents}.mobile.sc-sui-config-row .control.sc-sui-config-row{margin-top:10px}.mobile.sc-sui-config-row .control.end.sc-sui-config-row{width:max-content;margin-inline-start:auto}.preview.panel.sc-sui-config-row{margin-top:10px;background:var(--surface-sunken);border:1px solid var(--hairline);border-radius:var(--radius-md);padding:10px 12px}"}},[774,"sui-config-row",{term:[1],description:[1],variant:[513],breakpoint:[2],previewColumn:[516,"preview-column"],controlWidth:[1,"control-width"],controlAlign:[513,"control-align"],hasPreview:[32],narrow:[32]},void 0,{breakpoint:[{onBreakpoint:0}]}]);function a(){"undefined"!=typeof customElements&&["sui-config-row"].forEach((i=>{"sui-config-row"===i&&(customElements.get(e(i))||customElements.define(e(i),c))}))}export{c as S,a as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){if(!t)return!1;if("function"==typeof getComputedStyle){let n="";try{n=getComputedStyle(t).direction||""}catch{n=""}if("rtl"===n)return!0;if("ltr"===n)return!1}const n="function"==typeof t.closest?t.closest("[dir]"):null;return!!n&&"rtl"===String(n.getAttribute("dir")||"").toLowerCase()}function n(n){const r=n.scrollLeft||0;return t(n)?0-r:r}function r(n,r){const e=Math.max(0,r||0);n.scrollLeft=t(n)?0-e:e}export{r as a,t as i,n as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as n}from"./p-CeVlau-G.js";function t(n){return"string"==typeof n||"number"==typeof n?{label:String(n),value:n}:n}function r(n){const r=[];return(Array.isArray(n)?n:[]).forEach((n=>{var e;null!=n&&((e=n)&&"object"==typeof e&&Array.isArray(e.items)?n.items.forEach((e=>{null!=e&&r.push({...t(e),group:n.label})})):r.push({...t(n)}))})),r}const e=new WeakMap;function o(t,r,o){if(Array.isArray(t))return t;if(null!=t&&n.isDev){const n=e.get(r)??new Set;n.has(o)||(n.add(o),e.set(r,n),console.warn(`<${r.localName}> ${o} takes an array, set as a property, and was given a ${typeof t}; it reads as empty.`))}return[]}function u(n,t){return n===t||null!=n&&null!=t&&"object"!=typeof n&&"object"!=typeof t&&String(n)===String(t)}function a(n,t){return n.some((n=>u(n,t)))}function s(n){return null==n||""===n}function i(n){return null==n?"":String(n)}function l(n){const t=[];return n.forEach(((n,r)=>{const e=t[t.length-1];e&&e.group===n.group?e.rows.push({o:n,i:r}):t.push({group:n.group,rows:[{o:n,i:r}]})})),t}export{r as f,a as h,i as k,o as l,s as n,l as o,u as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=["inputmode","enterkeyhint"];function n(n,e){const o=()=>{const o={};for(const e of t){const t=n.getAttribute(e);null!==t&&(o[e]=t)}e(o)};if(o(),"undefined"==typeof MutationObserver)return()=>{};const r=new MutationObserver(o);return r.observe(n,{attributes:!0,attributeFilter:t}),()=>r.disconnect()}export{n as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=0;function u(u="sui"){return t+=1,`${u}-${t.toString(36)}`}export{u}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Slice as t,Fragment as e,Mark as r,MarkType as i,ReplaceError as n,Node as s}from"./p-BU3LJP5B.js";const h=Math.pow(2,16);function l(t,e){return t+e*h}function o(t){return 65535&t}class u{constructor(t,e,r){this.pos=t,this.delInfo=e,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class f{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&f.empty)return f.empty}recover(t){let e=0,r=o(t);if(!this.inverted)for(let t=0;t<r;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*r]+e+function(t){return(t-(65535&t))/h}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,r){let i=0,n=this.inverted?2:1,s=this.inverted?1:2;for(let h=0;h<this.ranges.length;h+=3){let o=this.ranges[h]-(this.inverted?i:0);if(o>t)break;let f=this.ranges[h+n],a=this.ranges[h+s],c=o+f;if(t<=c){let n=o+i+((f?t==o?-1:t==c?1:e:e)<0?0:a);if(r)return n;let s=t==(e<0?o:c)?null:l(h/3,t-o),p=t==o?2:t==c?1:4;return(e<0?t!=o:t!=c)&&(p|=8),new u(n,p,s)}i+=a-f}return r?t+i:new u(t+i,0,null)}touches(t,e){let r=0,i=o(e),n=this.inverted?2:1,s=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let h=this.ranges[e]-(this.inverted?r:0);if(h>t)break;let l=this.ranges[e+n];if(t<=h+l&&e==3*i)return!0;r+=this.ranges[e+s]-l}return!1}forEach(t){let e=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,n=0;i<this.ranges.length;i+=3){let s=this.ranges[i],h=s-(this.inverted?n:0),l=s+(this.inverted?0:n),o=this.ranges[i+e],u=this.ranges[i+r];t(h,h+o,l,l+u),n+=u-o}}invert(){return new f(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?f.empty:new f(t<0?[0,-t,0]:[0,0,t])}}f.empty=new f([]);class a{constructor(t,e,r=0,i=(t?t.length:0)){this.mirror=e,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(t=0,e=this.maps.length){return new a(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,r=this._maps.length;e<t._maps.length;e++){let i=t.getMirror(e);this.appendMap(t._maps[e],null!=i&&i<e?r+i:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,r=this._maps.length+t._maps.length;e>=0;e--){let i=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=i&&i>e?r-i-1:void 0)}}invert(){let t=new a;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,r){let i=0;for(let r=this.from;r<this.to;r++){let n=this._maps[r].mapResult(t,e);if(null!=n.recover){let e=this.getMirror(r);if(null!=e&&e>r&&e<this.to){r=e,t=this._maps[e].recover(n.recover);continue}}i|=n.delInfo,t=n.pos}return r?t:new u(t,i,null)}}const c=Object.create(null);class p{getMap(){return f.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=c[e.stepType];if(!r)throw new RangeError(`No step type ${e.stepType} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in c)throw new RangeError("Duplicate use of step JSON ID "+t);return c[t]=e,e.prototype.jsonID=t,e}}class w{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new w(t,null)}static fail(t){return new w(null,t)}static fromReplace(t,e,r,i){try{return w.ok(t.replace(e,r,i))}catch(t){if(t instanceof n)return w.fail(t.message);throw t}}}function d(t,r,i){let n=[];for(let e=0;e<t.childCount;e++){let s=t.child(e);s.content.size&&(s=s.copy(d(s.content,r,s))),s.isInline&&(s=r(s,i,e)),n.push(s)}return e.fromArray(n)}class m extends p{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(e){let r=e.slice(this.from,this.to),i=e.resolve(this.from),n=i.node(i.sharedDepth(this.to)),s=new t(d(r.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),n),r.openStart,r.openEnd);return w.fromReplace(e,this.from,this.to,s)}invert(){return new g(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new m(e.pos,r.pos,this.mark)}merge(t){return t instanceof m&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new m(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new m(e.from,e.to,t.markFromJSON(e.mark))}}p.jsonID("addMark",m);class g extends p{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(e){let r=e.slice(this.from,this.to),i=new t(d(r.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),e),r.openStart,r.openEnd);return w.fromReplace(e,this.from,this.to,i)}invert(){return new m(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new g(e.pos,r.pos,this.mark)}merge(t){return t instanceof g&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new g(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new g(e.from,e.to,t.markFromJSON(e.mark))}}p.jsonID("removeMark",g);class S extends p{constructor(t,e){super(),this.pos=t,this.mark=e}apply(r){let i=r.nodeAt(this.pos);if(!i)return w.fail("No node at mark step's position");let n=i.type.create(i.attrs,null,this.mark.addToSet(i.marks));return w.fromReplace(r,this.pos,this.pos+1,new t(e.from(n),0,i.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let r=0;r<e.marks.length;r++)if(!e.marks[r].isInSet(t))return new S(this.pos,e.marks[r]);return new S(this.pos,this.mark)}}return new y(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new S(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new S(e.pos,t.markFromJSON(e.mark))}}p.jsonID("addNodeMark",S);class y extends p{constructor(t,e){super(),this.pos=t,this.mark=e}apply(r){let i=r.nodeAt(this.pos);if(!i)return w.fail("No node at mark step's position");let n=i.type.create(i.attrs,null,this.mark.removeFromSet(i.marks));return w.fromReplace(r,this.pos,this.pos+1,new t(e.from(n),0,i.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new S(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new y(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new y(e.pos,t.markFromJSON(e.mark))}}p.jsonID("removeNodeMark",y);class N extends p{constructor(t,e,r,i=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=i}apply(t){return this.structure&&v(t,this.from,this.to)?w.fail("Structure replace would overwrite content"):w.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new f([this.from,this.to-this.from,this.slice.size])}invert(t){return new N(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.to,-1),r=this.from==this.to&&N.MAP_BIAS<0?e:t.mapResult(this.from,1);return r.deletedAcross&&e.deletedAcross?null:new N(r.pos,Math.max(r.pos,e.pos),this.slice,this.structure)}merge(e){if(!(e instanceof N)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let r=this.slice.size+e.slice.size==0?t.empty:new t(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new N(e.from,this.to,r,this.structure)}}{let r=this.slice.size+e.slice.size==0?t.empty:new t(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new N(this.from,this.to+(e.to-e.from),r,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(e,r){if("number"!=typeof r.from||"number"!=typeof r.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new N(r.from,r.to,t.fromJSON(e,r.slice),!!r.structure)}}N.MAP_BIAS=1,p.jsonID("replace",N);class k extends p{constructor(t,e,r,i,n,s,h=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=i,this.slice=n,this.insert=s,this.structure=h}apply(t){if(this.structure&&(v(t,this.from,this.gapFrom)||v(t,this.gapTo,this.to)))return w.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return w.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?w.fromReplace(t,this.from,this.to,r):w.fail("Content does not fit in gap")}getMap(){return new f([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new k(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),n=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||i<e.pos||n>r.pos?null:new k(e.pos,r.pos,i,n,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(e,r){if("number"!=typeof r.from||"number"!=typeof r.to||"number"!=typeof r.gapFrom||"number"!=typeof r.gapTo||"number"!=typeof r.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new k(r.from,r.to,r.gapFrom,r.gapTo,t.fromJSON(e,r.slice),r.insert,!!r.structure)}}function v(t,e,r){let i=t.resolve(e),n=r-e,s=i.depth;for(;n>0&&s>0&&i.indexAfter(s)==i.node(s).childCount;)s--,n--;if(n>0){let t=i.node(s).maybeChild(i.indexAfter(s));for(;n>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,n--}}return!1}function M(r,i,n,s=n.contentMatch,h=!0){let l=r.doc.nodeAt(i),o=[],u=i+1;for(let i=0;i<l.childCount;i++){let f=l.child(i),a=u+f.nodeSize,c=s.matchType(f.type);if(c){s=c;for(let t=0;t<f.marks.length;t++)n.allowsMarkType(f.marks[t].type)||r.step(new g(u,a,f.marks[t]));if(h&&f.isText&&"pre"!=n.whitespace){let r,i,s=/\r?\n|\r/g;for(;r=s.exec(f.text);)i||(i=new t(e.from(n.schema.text(" ",n.allowedMarks(f.marks))),0,0)),o.push(new N(u+r.index,u+r.index+r[0].length,i))}}else o.push(new N(u,a,t.empty));u=a}if(!s.validEnd){let i=s.fillBefore(e.empty,!0);r.replace(u,u,new t(i,0,0))}for(let t=o.length-1;t>=0;t--)r.step(o[t])}function O(t,e,r){return(0==e||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function b(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,n=0;;--r){let s=t.$from.node(r),h=t.$from.index(r)+i,l=t.$to.indexAfter(r)-n;if(r<t.depth&&s.canReplace(h,l,e))return r;if(0==r||s.type.spec.isolating||!O(s,h,l))break;h&&(i=1),l<s.childCount&&(n=1)}return null}function J(t,e,r=null,i=t){let n=function(t,e){let{parent:r,startIndex:i,endIndex:n}=t,s=r.contentMatchAt(i).findWrapping(e);return s&&r.canReplaceWith(i,n,s.length?s[0]:e)?s:null}(t,e),s=n&&function(t,e){let{parent:r,startIndex:i,endIndex:n}=t,s=r.child(i),h=e.contentMatch.findWrapping(s.type);if(!h)return null;let l=(h.length?h[h.length-1]:e).contentMatch;for(let t=i;l&&t<n;t++)l=l.matchType(r.child(t).type);return l&&l.validEnd?h:null}(i,e);return s?n.map(R).concat({type:e,attrs:r}).concat(s.map(R)):null}function R(t){return{type:t,attrs:null}}function E(t,e,r,i){e.forEach(((n,s)=>{if(n.isText){let h,l=/\r?\n|\r/g;for(;h=l.exec(n.text);){let n=t.mapping.slice(i).map(r+1+s+h.index);t.replaceWith(n,n+1,e.type.schema.linebreakReplacement.create())}}}))}function I(t,e,r,i){e.forEach(((n,s)=>{if(n.type==n.type.schema.linebreakReplacement){let n=t.mapping.slice(i).map(r+1+s);t.replaceWith(n,n+1,e.type.schema.text("\n"))}}))}function T(t,e,r=1,i){let n=t.resolve(e),s=n.depth-r,h=i&&i[i.length-1]||n.parent;if(s<0||n.parent.type.spec.isolating||!n.parent.canReplace(n.index(),n.parent.childCount)||!h.type.validContent(n.parent.content.cutByIndex(n.index(),n.parent.childCount)))return!1;for(let t=n.depth-1,e=r-2;t>s;t--,e--){let r=n.node(t),s=n.index(t);if(r.type.spec.isolating)return!1;let h=r.content.cutByIndex(s,r.childCount),l=i&&i[e+1];l&&(h=h.replaceChild(0,l.type.create(l.attrs)));let o=i&&i[e]||r;if(!r.canReplace(s+1,r.childCount)||!o.type.validContent(h))return!1}let l=n.indexAfter(s),o=i&&i[0];return n.node(s).canReplaceWith(l,l,o?o.type:n.node(s+1).type)}function x(t,e){let r=t.resolve(e),i=r.index();return j(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(i,i+1)}function j(t,e){return!(!t||!e||t.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:i}=t.type.schema;for(let n=0;n<e.childCount;n++){let s=e.child(n);if(r=r.matchType(s.type==i?t.type.schema.nodes.text:s.type),!r)return!1;if(!t.type.allowsMarks(s.marks))return!1}return r.validEnd}(t,e))}function A(t,e,r=-1){let i=t.resolve(e);for(let t=i.depth;;t--){let n,s,h=i.index(t);if(t==i.depth?(n=i.nodeBefore,s=i.nodeAfter):r>0?(n=i.node(t+1),h++,s=i.node(t).maybeChild(h)):(n=i.node(t).maybeChild(h-1),s=i.node(t+1)),n&&!n.isTextblock&&j(n,s)&&i.node(t).canReplace(h,h+1))return e;if(0==t)break;e=r<0?i.before(t):i.after(t)}}function D(t,e,r){let i=t.resolve(e);if(!r.content.size)return e;let n=r.content;for(let t=0;t<r.openStart;t++)n=n.firstChild.content;for(let t=1;t<=(0==r.openStart&&r.size?2:1);t++)for(let e=i.depth;e>=0;e--){let r=e==i.depth?0:i.pos<=(i.start(e+1)+i.end(e+1))/2?-1:1,s=i.index(e)+(r>0?1:0),h=i.node(e),l=!1;if(1==t)l=h.canReplace(s,s,n);else{let t=h.contentMatchAt(s).findWrapping(n.firstChild.type);l=t&&h.canReplaceWith(s,s,t[0])}if(l)return 0==r?i.pos:r<0?i.before(e+1):i.after(e+1)}return null}function $(e,r,i=r,n=t.empty){if(r==i&&!n.size)return null;let s=e.resolve(r),h=e.resolve(i);return B(s,h,n)?new N(r,i,n):new F(s,h,n).fit()}function B(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}p.jsonID("replaceAround",k);class F{constructor(t,r,i){this.$from=t,this.$to=r,this.unplaced=i,this.frontier=[],this.placed=e.empty;for(let e=0;e<=t.depth;e++){let r=t.node(e);this.frontier.push({type:r.type,match:r.contentMatchAt(t.indexAfter(e))})}for(let r=t.depth;r>0;r--)this.placed=e.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,i=this.$from,n=this.close(e<0?this.$to:i.doc.resolve(e));if(!n)return null;let s=this.placed,h=i.depth,l=n.depth;for(;h&&l&&1==s.childCount;)s=s.firstChild.content,h--,l--;let o=new t(s,h,l);return e>-1?new k(i.pos,e,this.$to.pos,this.$to.end(),o,r):o.size||i.pos!=this.$to.pos?new N(i.pos,n.pos,o):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let n=e.firstChild;if(e.childCount>1&&(i=0),n.type.spec.isolating&&i<=r){t=r;break}e=n.content}for(let r=1;r<=2;r++)for(let i=1==r?t:this.unplaced.openStart;i>=0;i--){let t,n=null;i?(n=q(this.unplaced.content,i-1).firstChild,t=n.content):t=this.unplaced.content;let s=t.firstChild;for(let t=this.depth;t>=0;t--){let h,{type:l,match:o}=this.frontier[t],u=null;if(1==r&&(s?o.matchType(s.type)||(u=o.fillBefore(e.from(s),!1)):n&&l.compatibleContent(n.type)))return{sliceDepth:i,frontierDepth:t,parent:n,inject:u};if(2==r&&s&&(h=o.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:t,parent:n,wrap:h};if(n&&o.matchType(n.type))break}}}openMore(){let{content:e,openStart:r,openEnd:i}=this.unplaced;return!(G(e,-1)<=r||(this.unplaced.size>1&&G(e,1)>i&&i++,this.unplaced=new t(e,r+1,i),0))}dropNode(){let{content:e,openStart:r,openEnd:i}=this.unplaced,n=q(e,r);if(n.childCount<=1&&r>0){let s=e.size-r<=r+n.size;this.unplaced=new t(_(e,r-1,1),r-1,s?r-1:i)}else this.unplaced=new t(_(e,r,1),r,i)}placeNodes({sliceDepth:r,frontierDepth:i,parent:n,inject:s,wrap:h}){for(;this.depth>i;)this.closeFrontierNode();if(h)for(let t=0;t<h.length;t++)this.openFrontierNode(h[t]);let l=this.unplaced,o=n?n.content:l.content,u=l.openStart-r,f=0,a=[],{match:c,type:p}=this.frontier[i];if(s){for(let t=0;t<s.childCount;t++)a.push(s.child(t));c=c.matchFragment(s)}let w=o.size+r-(l.content.size-l.openEnd);for(;f<o.childCount;){let t=o.child(f),e=c.matchType(t.type);if(!e)break;f++,(f>1||0==u||t.content.size)&&(c=e,a.push(P(t.mark(p.allowedMarks(t.marks)),1==f?u:0,f==o.childCount?w:-1)))}let d=f==o.childCount;d||(w=-1),this.placed=W(this.placed,i,e.from(a)),this.frontier[i].match=c,d&&w<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=o;t<w;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=d?0==r?t.empty:new t(_(l.content,r-1,1),r-1,w<0?l.openEnd:r-1):new t(_(l.content,r,f),l.openStart,l.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!C(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:r,type:i}=this.frontier[e],n=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),s=C(t,e,i,r,n);if(s){for(let r=e-1;r>=0;r--){let{match:e,type:i}=this.frontier[r],n=C(t,r,i,e,!0);if(!n||n.childCount)continue t}return{depth:e,fit:s,move:n?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=W(this.placed,e.depth,e.fit)),t=e.move;for(let r=e.depth+1;r<=t.depth;r++){let e=t.node(r),i=e.type.contentMatch.fillBefore(e.content,!0,t.index(r));this.openFrontierNode(e.type,e.attrs,i)}return t}openFrontierNode(t,r=null,i){let n=this.frontier[this.depth];n.match=n.match.matchType(t),this.placed=W(this.placed,this.depth,e.from(t.create(r,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(e.empty,!0);t.childCount&&(this.placed=W(this.placed,this.frontier.length,t))}}function _(t,e,r){return 0==e?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(_(t.firstChild.content,e-1,r)))}function W(t,e,r){return 0==e?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(W(t.lastChild.content,e-1,r)))}function q(t,e){for(let r=0;r<e;r++)t=t.firstChild.content;return t}function P(t,r,i){if(r<=0)return t;let n=t.content;return r>1&&(n=n.replaceChild(0,P(n.firstChild,r-1,1==n.childCount?i-1:0))),r>0&&(n=t.type.contentMatch.fillBefore(n).append(n),i<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(e.empty,!0)))),t.copy(n)}function C(t,e,r,i,n){let s=t.node(e),h=n?t.indexAfter(e):t.index(e);if(h==s.childCount&&!r.compatibleContent(s.type))return null;let l=i.fillBefore(s.content,!0,h);return l&&!function(t,e,r){for(let i=r;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}(r,s.content,h)?l:null}function G(t,e){for(let r=0;;r++){let i=e<0?t.firstChild:t.lastChild;if(!i||i.isAtom)return r;t=i.content}}function L(t,r,i,n,s){if(r<i){let e=t.firstChild;t=t.replaceChild(0,e.copy(L(e.content,r+1,i,n,e)))}if(r>n){let r=s.contentMatchAt(0),i=r.fillBefore(t).append(t);t=i.append(r.matchFragment(i).fillBefore(e.empty,!0))}return t}function V(t,e){let r=[];for(let i=Math.min(t.depth,e.depth);i>=0;i--){let n=t.start(i);if(n<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(n==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==n-1)&&r.push(i)}return r}class K extends p{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(r){let i=r.nodeAt(this.pos);if(!i)return w.fail("No node at attribute step's position");let n=Object.create(null);for(let t in i.attrs)n[t]=i.attrs[t];n[this.attr]=this.value;let s=i.type.create(n,null,i.marks);return w.fromReplace(r,this.pos,this.pos+1,new t(e.from(s),0,i.isLeaf?0:1))}getMap(){return f.empty}invert(t){return new K(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new K(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new K(e.pos,e.attr,e.value)}}p.jsonID("attr",K);class U extends p{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let r in t.attrs)e[r]=t.attrs[r];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return w.ok(r)}getMap(){return f.empty}invert(t){return new U(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new U(e.attr,e.value)}}p.jsonID("docAttr",U);let z=class extends Error{};z=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r},(z.prototype=Object.create(Error.prototype)).constructor=z,z.prototype.name="TransformError";class H{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new a}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new z(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,e=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),e=i.map(e,-1)),i.forEach(((r,i,n,s)=>{t=Math.min(t,n),e=Math.max(e,s)}))}return 1e9==t?null:{from:t,to:e}}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(e,r=e,i=t.empty){let n=$(this.doc,e,r,i);return n&&this.step(n),this}replaceWith(r,i,n){return this.replace(r,i,new t(e.from(n),0,0))}delete(e,r){return this.replace(e,r,t.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(e,r,i){return function(e,r,i,n){if(!n.size)return e.deleteRange(r,i);let s=e.doc.resolve(r),h=e.doc.resolve(i);if(B(s,h,n))return e.step(new N(r,i,n));let l=V(s,h);0==l[l.length-1]&&l.pop();let o=-(s.depth+1);l.unshift(o);for(let t=s.depth,e=s.pos-1;t>0;t--,e--){let r=s.node(t).type.spec;if(r.defining||r.definingAsContext||r.isolating)break;l.indexOf(t)>-1?o=t:s.before(t)==e&&l.splice(1,0,-t)}let u=l.indexOf(o),f=[],a=n.openStart;for(let t=n.content,e=0;;e++){let r=t.firstChild;if(f.push(r),e==n.openStart)break;t=r.content}for(let t=a-1;t>=0;t--){let e=f[t],r=(c=e.type).spec.defining||c.spec.definingForContent;if(r&&!e.sameMarkup(s.node(Math.abs(o)-1)))a=t;else if(r||!e.type.isTextblock)break}var c;for(let r=n.openStart;r>=0;r--){let o=(r+a+1)%(n.openStart+1),c=f[o];if(c)for(let r=0;r<l.length;r++){let f=l[(r+u)%l.length],a=!0;f<0&&(a=!1,f=-f);let p=s.node(f-1),w=s.index(f-1);if(p.canReplaceWith(w,w,c.type,c.marks))return e.replace(s.before(f),a?h.after(f):i,new t(L(n.content,0,n.openStart,o),o,n.openEnd))}}let p=e.steps.length;for(let t=l.length-1;t>=0&&(e.replace(r,i,n),!(e.steps.length>p));t--){let e=l[t];e<0||(r=s.before(e),i=h.after(e))}}(this,e,r,i),this}replaceRangeWith(r,i,n){return function(r,i,n,s){if(!s.isInline&&i==n&&r.doc.resolve(i).parent.content.size){let t=function(t,e,r){let i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),r))return e;if(0==i.parentOffset)for(let t=i.depth-1;t>=0;t--){let e=i.index(t);if(i.node(t).canReplaceWith(e,e,r))return i.before(t+1);if(e>0)return null}if(i.parentOffset==i.parent.content.size)for(let t=i.depth-1;t>=0;t--){let e=i.indexAfter(t);if(i.node(t).canReplaceWith(e,e,r))return i.after(t+1);if(e<i.node(t).childCount)return null}return null}(r.doc,i,s.type);null!=t&&(i=n=t)}r.replaceRange(i,n,new t(e.from(s),0,0))}(this,r,i,n),this}deleteRange(t,e){return function(t,e,r){let i=t.doc.resolve(e),n=t.doc.resolve(r);if(i.parent.isTextblock&&n.parent.isTextblock&&i.start()!=n.start()&&0==i.parentOffset&&0==n.parentOffset){let s=i.sharedDepth(r),h=!1;for(let t=i.depth;t>s;t--)i.node(t).type.spec.isolating&&(h=!0);for(let t=n.depth;t>s;t--)n.node(t).type.spec.isolating&&(h=!0);if(!h){for(let t=i.depth;t>0&&e==i.start(t);t--)e=i.before(t);for(let t=n.depth;t>0&&r==n.start(t);t--)r=n.before(t);i=t.doc.resolve(e),n=t.doc.resolve(r)}}let s=V(i,n);for(let e=0;e<s.length;e++){let r=s[e],h=e==s.length-1;if(h&&0==r||i.node(r).type.contentMatch.validEnd)return t.delete(i.start(r),n.end(r));if(r>0&&(h||i.node(r-1).canReplace(i.index(r-1),n.indexAfter(r-1))))return t.delete(i.before(r),n.after(r))}for(let s=1;s<=i.depth&&s<=n.depth;s++)if(e-i.start(s)==i.depth-s&&r>i.end(s)&&n.end(s)-r!=n.depth-s&&i.start(s-1)==n.start(s-1)&&i.node(s-1).canReplace(i.index(s-1),n.index(s-1)))return t.delete(i.before(s),r);t.delete(e,r)}(this,t,e),this}lift(r,i){return function(r,i,n){let{$from:s,$to:h,depth:l}=i,o=s.before(l+1),u=h.after(l+1),f=o,a=u,c=e.empty,p=0;for(let t=l,r=!1;t>n;t--)r||s.index(t)>0?(r=!0,c=e.from(s.node(t).copy(c)),p++):f--;let w=e.empty,d=0;for(let t=l,r=!1;t>n;t--)r||h.after(t+1)<h.end(t)?(r=!0,w=e.from(h.node(t).copy(w)),d++):a++;r.step(new k(f,a,o,u,new t(c.append(w),p,d),c.size-p,!0))}(this,r,i),this}join(e,r=1){return function(e,r,i){let n=null,{linebreakReplacement:s}=e.doc.type.schema,h=e.doc.resolve(r-i),l=h.node().type;if(s&&l.inlineContent){let t="pre"==l.whitespace,e=!!l.contentMatch.matchType(s);t&&!e?n=!1:!t&&e&&(n=!0)}let o=e.steps.length;if(!1===n){let t=e.doc.resolve(r+i);I(e,t.node(),t.before(),o)}l.inlineContent&&M(e,r+i-1,l,h.node().contentMatchAt(h.index()),null==n);let u=e.mapping.slice(o),f=u.map(r-i);if(e.step(new N(f,u.map(r+i,-1),t.empty,!0)),!0===n){let t=e.doc.resolve(f);E(e,t.node(),t.before(),e.steps.length)}}(this,e,r),this}wrap(r,i){return function(r,i,n){let s=e.empty;for(let t=n.length-1;t>=0;t--){if(s.size){let e=n[t].type.contentMatch.matchFragment(s);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=e.from(n[t].type.create(n[t].attrs,s))}let h=i.start,l=i.end;r.step(new k(h,l,h,l,new t(s,0,0),n.length,!0))}(this,r,i),this}setBlockType(r,i=r,n,s=null){return function(r,i,n,s,h){if(!s.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let l=r.steps.length;r.doc.nodesBetween(i,n,((i,n)=>{let o="function"==typeof h?h(i):h;if(i.isTextblock&&!i.hasMarkup(s,o)&&function(t,e,r){let i=t.resolve(e),n=i.index();return i.parent.canReplaceWith(n,n+1,r)}(r.doc,r.mapping.slice(l).map(n),s)){let h=null;if(s.schema.linebreakReplacement){let t="pre"==s.whitespace,e=!!s.contentMatch.matchType(s.schema.linebreakReplacement);t&&!e?h=!1:!t&&e&&(h=!0)}!1===h&&I(r,i,n,l),M(r,r.mapping.slice(l).map(n,1),s,void 0,null===h);let u=r.mapping.slice(l),f=u.map(n,1),a=u.map(n+i.nodeSize,1);return r.step(new k(f,a,f+1,a-1,new t(e.from(s.create(o,null,i.marks)),0,0),1,!0)),!0===h&&E(r,i,n,l),!1}}))}(this,r,i,n,s),this}setNodeMarkup(r,i,n=null,s){return function(r,i,n,s,h){let l=r.doc.nodeAt(i);if(!l)throw new RangeError("No node at given position");n||(n=l.type);let o=n.create(s,null,h||l.marks);if(l.isLeaf)return r.replaceWith(i,i+l.nodeSize,o);if(!n.validContent(l.content))throw new RangeError("Invalid content for node type "+n.name);r.step(new k(i,i+l.nodeSize,i+1,i+l.nodeSize-1,new t(e.from(o),0,0),1,!0))}(this,r,i,n,s),this}setNodeAttribute(t,e,r){return this.step(new K(t,e,r)),this}setDocAttribute(t,e){return this.step(new U(t,e)),this}addNodeMark(t,e){return this.step(new S(t,e)),this}removeNodeMark(t,e){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(e instanceof r)e.isInSet(i.marks)&&this.step(new y(t,e));else{let r,n=i.marks,s=[];for(;r=e.isInSet(n);)s.push(new y(t,r)),n=r.removeFromSet(n);for(let t=s.length-1;t>=0;t--)this.step(s[t])}return this}split(r,i=1,n){return function(r,i,n=1,s){let h=r.doc.resolve(i),l=e.empty,o=e.empty;for(let t=h.depth,r=h.depth-n,i=n-1;t>r;t--,i--){l=e.from(h.node(t).copy(l));let r=s&&s[i];o=e.from(r?r.type.create(r.attrs,o):h.node(t).copy(o))}r.step(new N(i,i,new t(l.append(o),n,n),!0))}(this,r,i,n),this}addMark(t,e,r){return function(t,e,r,i){let n,s,h=[],l=[];t.doc.nodesBetween(e,r,((t,o,u)=>{if(!t.isInline)return;let f=t.marks;if(!i.isInSet(f)&&u.type.allowsMarkType(i.type)){let u=Math.max(o,e),a=Math.min(o+t.nodeSize,r),c=i.addToSet(f);for(let t=0;t<f.length;t++)f[t].isInSet(c)||(n&&n.to==u&&n.mark.eq(f[t])?n.to=a:h.push(n=new g(u,a,f[t])));s&&s.to==u?s.to=a:l.push(s=new m(u,a,i))}})),h.forEach((e=>t.step(e))),l.forEach((e=>t.step(e)))}(this,t,e,r),this}removeMark(t,e,r){return function(t,e,r,n){let s=[],h=0;t.doc.nodesBetween(e,r,((t,l)=>{if(!t.isInline)return;h++;let o=null;if(n instanceof i){let e,r=t.marks;for(;e=n.isInSet(r);)(o||(o=[])).push(e),r=e.removeFromSet(r)}else n?n.isInSet(t.marks)&&(o=[n]):o=t.marks;if(o&&o.length){let i=Math.min(l+t.nodeSize,r);for(let t=0;t<o.length;t++){let r,n=o[t];for(let t=0;t<s.length;t++){let e=s[t];e.step==h-1&&n.eq(s[t].style)&&(r=e)}r?(r.to=i,r.step=h):s.push({style:n,from:Math.max(l,e),to:i,step:h})}}})),s.forEach((e=>t.step(new g(e.from,e.to,e.style))))}(this,t,e,r),this}clearIncompatible(t,e,r){return M(this,t,e,r),this}}const Q=Object.create(null);class X{constructor(t,e,r){this.$anchor=t,this.$head=e,this.ranges=r||[new Y(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,r=t.empty){let i=r.content.lastChild,n=null;for(let t=0;t<r.openEnd;t++)n=i,i=i.lastChild;let s=e.steps.length,h=this.ranges;for(let l=0;l<h.length;l++){let{$from:o,$to:u}=h[l],f=e.mapping.slice(s);e.replaceRange(f.map(o.pos),f.map(u.pos),l?t.empty:r),0==l&&ot(e,s,(i?i.isInline:n&&n.isTextblock)?-1:1)}}replaceWith(t,e){let r=t.steps.length,i=this.ranges;for(let n=0;n<i.length;n++){let{$from:s,$to:h}=i[n],l=t.mapping.slice(r),o=l.map(s.pos),u=l.map(h.pos);n?t.deleteRange(o,u):(t.replaceRangeWith(o,u,e),ot(t,r,e.isInline?-1:1))}}static findFrom(t,e,r=!1){let i=t.parent.inlineContent?new et(t):lt(t.node(0),t.parent,t.pos,t.index(),e,r);if(i)return i;for(let i=t.depth-1;i>=0;i--){let n=e<0?lt(t.node(0),t.node(i),t.before(i+1),t.index(i),e,r):lt(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,r);if(n)return n}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new st(t.node(0))}static atStart(t){return lt(t,t,0,0,1)||new st(t)}static atEnd(t){return lt(t,t,t.content.size,t.childCount,-1)||new st(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Q[e.type];if(!r)throw new RangeError(`No selection type ${e.type} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in Q)throw new RangeError("Duplicate use of selection JSON ID "+t);return Q[t]=e,e.prototype.jsonID=t,e}getBookmark(){return et.between(this.$anchor,this.$head).getBookmark()}}X.prototype.visible=!0;class Y{constructor(t,e){this.$from=t,this.$to=e}}let Z=!1;function tt(t){Z||t.parent.inlineContent||(Z=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class et extends X{constructor(t,e=t){tt(t),tt(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let r=t.resolve(e.map(this.head));if(!r.parent.inlineContent)return X.near(r);let i=t.resolve(e.map(this.anchor));return new et(i.parent.inlineContent?i:r,r)}replace(e,r=t.empty){if(super.replace(e,r),r==t.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof et&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new rt(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new et(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,r=e){let i=t.resolve(e);return new this(i,r==e?i:t.resolve(r))}static between(t,e,r){let i=t.pos-e.pos;if(r&&!i||(r=i>=0?1:-1),!e.parent.inlineContent){let t=X.findFrom(e,r,!0)||X.findFrom(e,-r,!0);if(!t)return X.near(e,r);e=t.$head}return t.parent.inlineContent||(0==i||(t=(X.findFrom(t,-r,!0)||X.findFrom(t,r,!0)).$anchor).pos<e.pos!=i<0)&&(t=e),new et(t,e)}}X.jsonID("text",et);class rt{constructor(t,e){this.anchor=t,this.head=e}map(t){return new rt(t.map(this.anchor),t.map(this.head))}resolve(t){return et.between(t.resolve(this.anchor),t.resolve(this.head))}}class it extends X{constructor(t){let e=t.nodeAfter,r=t.node(0).resolve(t.pos+e.nodeSize);super(t,r),this.node=e}map(t,e){let{deleted:r,pos:i}=e.mapResult(this.anchor),n=t.resolve(i);return r?X.near(n):new it(n)}content(){return new t(e.from(this.node),0,0)}eq(t){return t instanceof it&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new nt(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new it(t.resolve(e.anchor))}static create(t,e){return new it(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}it.prototype.visible=!1,X.jsonID("node",it);class nt{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:r}=t.mapResult(this.anchor);return e?new rt(r,r):new nt(r)}resolve(t){let e=t.resolve(this.anchor),r=e.nodeAfter;return r&&it.isSelectable(r)?new it(e):X.near(e)}}class st extends X{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(e,r=t.empty){if(r==t.empty){e.delete(0,e.doc.content.size);let t=X.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,r)}toJSON(){return{type:"all"}}static fromJSON(t){return new st(t)}map(t){return new st(t)}eq(t){return t instanceof st}getBookmark(){return ht}}X.jsonID("all",st);const ht={map(){return this},resolve:t=>new st(t)};function lt(t,e,r,i,n,s=!1){if(e.inlineContent)return et.create(t,r);for(let h=i-(n>0?0:1);n>0?h<e.childCount:h>=0;h+=n){let i=e.child(h);if(i.isAtom){if(!s&&it.isSelectable(i))return it.create(t,r-(n<0?i.nodeSize:0))}else{let e=lt(t,i,r+n,n<0?i.childCount:0,n,s);if(e)return e}r+=i.nodeSize*n}return null}function ot(t,e,r){let i=t.steps.length-1;if(i<e)return;let n,s=t.steps[i];(s instanceof N||s instanceof k)&&(t.mapping.maps[i].forEach(((t,e,r,i)=>{null==n&&(n=i)})),t.setSelection(X.near(t.doc.resolve(n),r)))}class ut extends H{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let i=this.selection;return e&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||r.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,r){let i=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(null==r&&(r=e),!t)return this.deleteRange(e,r);let n=this.storedMarks;if(!n){let t=this.doc.resolve(e);n=r==e?t.marks():t.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(e,r,i.text(t,n)),this.selection.empty||this.selection.to!=e+t.length||this.setSelection(X.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function ft(t,e){return e&&t?t.bind(e):t}class at{constructor(t,e,r){this.name=t,this.init=ft(e.init,r),this.apply=ft(e.apply,r)}}const ct=[new at("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new at("selection",{init:(t,e)=>t.selection||X.atStart(e.doc),apply:t=>t.selection}),new at("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,r,i)=>i.selection.$cursor?t.storedMarks:null}),new at("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class pt{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=ct.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new at(t.key,t.spec.state,t))}))}}class wt{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=e){let e=this.config.plugins[r];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],r=this.applyInner(t),i=null;for(;;){let n=!1;for(let s=0;s<this.config.plugins.length;s++){let h=this.config.plugins[s];if(h.spec.appendTransaction){let l=i?i[s].n:0,o=i?i[s].state:this,u=l<e.length&&h.spec.appendTransaction.call(h,l?e.slice(l):e,o,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",t),!i){i=[];for(let t=0;t<this.config.plugins.length;t++)i.push(t<s?{state:r,n:e.length}:{state:this,n:0})}e.push(u),r=r.applyInner(u),n=!0}i&&(i[s]={state:r,n:e.length})}}if(!n)return{state:r,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new wt(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let n=r[i];e[n.name]=n.apply(t,this[n.name],this,e)}return e}get tr(){return new ut(this)}static create(t){let e=new pt(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new wt(e);for(let i=0;i<e.fields.length;i++)r[e.fields[i].name]=e.fields[i].init(t,r);return r}reconfigure(t){let e=new pt(this.schema,t.plugins),r=e.fields,i=new wt(e);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let r in t){if("doc"==r||"selection"==r)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],n=i.spec.state;n&&n.toJSON&&(e[r]=n.toJSON.call(i,this[i.key]))}return e}static fromJSON(t,e,r){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new pt(t.schema,t.plugins),n=new wt(i);return i.fields.forEach((i=>{if("doc"==i.name)n.doc=s.fromJSON(t.schema,e.doc);else if("selection"==i.name)n.selection=X.fromJSON(n.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(n.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let h=r[s],l=h.spec.state;if(h.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,s))return void(n[i.name]=l.fromJSON.call(h,t,e[s],n))}n[i.name]=i.init(t,n)}})),n}}function dt(t,e,r){for(let i in t){let n=t[i];n instanceof Function?n=n.bind(e):"handleDOMEvents"==i&&(n=dt(n,e,{})),r[i]=n}return r}class mt{constructor(t){this.spec=t,this.props={},t.props&&dt(t.props,this,this.props),this.key=t.key?t.key.key:St("plugin")}getState(t){return t[this.key]}}const gt=Object.create(null);function St(t){return t in gt?t+"$"+ ++gt[t]:(gt[t]=0,t+"$")}class yt{constructor(t="key"){this.key=St(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var Nt=Object.freeze({__proto__:null,AllSelection:st,EditorState:wt,NodeSelection:it,Plugin:mt,PluginKey:yt,Selection:X,SelectionRange:Y,TextSelection:et,Transaction:ut});export{st as A,a as M,it as N,mt as P,k as R,X as S,et as T,x as a,N as b,T as c,D as d,Y as e,J as f,yt as g,Nt as i,A as j,b as l,$ as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"./p-CeVlau-G.js";import{G as s,i as e}from"./p-BeYfX4rQ.js";const i=({text:i,compact:r,inverse:l})=>a("span",{class:{"sui-media-fallback":!0,compact:!!r,inverse:!!l},role:"img","aria-label":i},a(s,{glyph:e}),r?null:a("span",{class:"sui-mf-text","aria-hidden":"true"},i));export{i as M}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,c as s,h as o,a as e,t as n}from"./p-CeVlau-G.js";import{o as h,b as a,p as r,h as c,n as l,m as p,l as d}from"./p-DsHK25q3.js";import{f as u}from"./p-BtgC2u2Q.js";import{h as m,o as f}from"./p-BWkzTEZX.js";import{u as b}from"./p-U06fVoGD.js";const y=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.suiClose=s(this,"suiClose",3)}get host(){return this}content;position="top";tone="brand";disabled=!1;openDelay=350;closeDelay=0;open=!1;suiClose;hover=!1;hasContentSlot=!1;closing=!1;fieldId=b("sui-tip");tip;described;dispose;demote;offLayers;unobserve;openTimer;closeTimer;hugKey="";exit=h((()=>this.exited()));loaded=!1;get hasContent(){return!(!this.content||!this.content.trim())||this.hasContentSlot}get visible(){return(this.open||this.hover)&&!this.disabled&&this.hasContent}get capsuleTone(){return"light"===this.tone?"light":"brand"}contentSlotted(){return m(this.host,"content")}componentWillLoad(){this.hasContentSlot=this.contentSlotted()}connectedCallback(){this.loaded&&(this.watchSlots(),Promise.resolve().then((()=>{this.host.isConnected&&(this.hasContentSlot=this.contentSlotted(),this.syncDescribedBy(),this.visible&&this.arm())})))}componentDidLoad(){this.loaded=!0,this.syncDescribedBy(),this.watchSlots(),this.visible&&this.arm()}watchSlots(){this.unobserve?.(),this.unobserve=f(this.host,(()=>{this.hasContentSlot=this.contentSlotted(),this.syncDescribedBy()}))}componentDidRender(){this.visible&&this.reposition()}disconnectedCallback(){this.clearTimers(),this.hover=!1,this.disarm(),this.exit.cancel(),this.exited(),this.unobserve?.(),this.unobserve=void 0}onOpenChange(t){t?this.arm():this.hover||this.disarm()}onDisabledChange(t){this.syncDescribedBy(),t&&(this.clearTimers(),this.hover=!1,this.disarm())}onContentChange(){this.syncDescribedBy()}syncDescribedBy(){const t=this.hasContent&&!this.disabled?u(this.host,this.tip):null;t!==this.described&&(this.described&&this.described.getAttribute("aria-describedby")===this.fieldId&&this.described.removeAttribute("aria-describedby"),this.described=void 0,t&&!t.getAttribute("aria-describedby")&&(t.setAttribute("aria-describedby",this.fieldId),this.described=t))}arm(){this.host.isConnected&&(this.exit.cancel(),this.closing=!1,document.addEventListener("keydown",this.onKey),this.dispose?.(),this.dispose=a((()=>this.reposition())),!this.demote&&this.tip&&(this.demote=r(this.tip,"tooltip")),this.offLayers||(this.offLayers=c((()=>{this.popupUp()&&Promise.resolve().then((()=>this.makeWay()))}))))}popupUp(){return l(this.host,this.tip).length>0}makeWay(){this.popupUp()&&(this.clearTimers(),this.hover&&(this.hover=!1,this.open||this.disarm()))}disarm(){document.removeEventListener("keydown",this.onKey),this.dispose?.(),this.dispose=void 0,this.offLayers?.(),this.offLayers=void 0,this.demote&&this.exit.begin(this.tip)?this.closing=!0:this.exited()}exited(){this.demote?.(),this.demote=void 0,this.closing=!1}clearTimers(){clearTimeout(this.openTimer),clearTimeout(this.closeTimer)}reposition(){this.visible&&this.tip&&(this.hug(this.tip),p(this.tip,d(this.host,this.tip,this.position,7,"center")))}hug(t){const i=`${t.textContent}|${window.innerWidth}`;if(i===this.hugKey)return;if(this.hugKey=i,t.style.width="","function"!=typeof document.createRange)return;const s=document.createRange();s.selectNodeContents(t);const o=Array.from(s.getClientRects()).filter((t=>t.width>0));if(new Set(o.map((t=>Math.round(t.top)))).size<2)return;const e=getComputedStyle(t),n=t=>parseFloat(t)||0,h=n(e.paddingLeft)+n(e.paddingRight)+n(e.borderLeftWidth)+n(e.borderRightWidth),a=Math.max(...o.map((t=>t.right)))-Math.min(...o.map((t=>t.left)));t.style.width=`${Math.ceil(a+h)}px`}onKey=t=>{"Escape"===t.key&&(this.open&&this.suiClose.emit("escape").defaultPrevented||(this.clearTimers(),this.hover=!1,this.open=!1,this.disarm()))};reveal(t){if(!this.disabled&&!this.popupUp()&&(clearTimeout(this.closeTimer),!this.hover)){if(clearTimeout(this.openTimer),t<=0)return this.hover=!0,void this.arm();this.openTimer=setTimeout((()=>{this.popupUp()||(this.hover=!0,this.arm())}),t)}}conceal(){if(clearTimeout(this.openTimer),!this.hover)return;const t=()=>{this.hover=!1,this.open||this.disarm()};this.closeDelay>0?this.closeTimer=setTimeout(t,this.closeDelay):t()}enter=()=>this.reveal(this.openDelay);focusIn=()=>this.reveal(0);leave=()=>this.conceal();focusOut=t=>{const i=t.relatedTarget;i&&this.host.contains(i)||this.conceal()};render(){const t=this.visible;return o(e,{key:"566c9b3cce3ff2cae343afb51ef70eb471d2d828",onMouseEnter:this.enter,onMouseLeave:this.leave,onFocusin:this.focusIn,onFocusout:this.focusOut},o("slot",{key:"c91b9ad296ecce16529cda5982f2131820d00246"}),o("span",{key:"e6c36ce6cc53fca76eb04c8ce1dad194386901e0",ref:t=>this.tip=t,id:this.fieldId,role:"tooltip",class:{tip:!0,[this.capsuleTone]:!0,show:t||this.closing,closing:this.closing},"aria-hidden":t?null:"true"},this.content,o("slot",{key:"29de9b98a960e9269705616c807dedfbe4f499f5",name:"content"})))}static get watchers(){return{open:[{onOpenChange:0}],disabled:[{onDisabledChange:0}],content:[{onContentChange:0}]}}static get style(){return".sc-sui-tooltip-h{display:inline-flex;position:relative;font-family:var(--font-sans)}.tip.sc-sui-tooltip{display:none;position:fixed;top:0;left:0;z-index:var(--z-tooltip);box-sizing:border-box;width:max-content;max-width:min(320px, calc(100vw - 16px));overflow-wrap:break-word;text-wrap:balance;font-family:var(--font-sans);font-size:11.5px;font-weight:620;line-height:1.3;padding:calc(6px - 0.15em) 9px;border-radius:6px;box-shadow:var(--shadow-pop);pointer-events:none;border:1px solid transparent}.tip.show.sc-sui-tooltip{display:inline-block;animation:sui-tooltip-in var(--duration-overlay) var(--ease-out)}.tip.show[data-side='bottom'].sc-sui-tooltip{animation-name:sui-tooltip-in-bottom}.tip.show[data-side='left'].sc-sui-tooltip{animation-name:sui-tooltip-in-left}.tip.show[data-side='right'].sc-sui-tooltip{animation-name:sui-tooltip-in-right}.tip.show.closing.sc-sui-tooltip{animation:sui-tooltip-out var(--duration-fast) var(--ease-out) forwards}.tip.brand.sc-sui-tooltip{background:var(--brand);color:var(--brand-contrast);border-color:transparent}.tip.light.sc-sui-tooltip{background:var(--surface-raised);color:var(--ink);border-color:var(--border)}@keyframes sui-tooltip-in{from{opacity:0;margin-top:4px}}@keyframes sui-tooltip-in-bottom{from{opacity:0;margin-top:-4px}}@keyframes sui-tooltip-in-left{from{opacity:0;margin-left:4px}}@keyframes sui-tooltip-in-right{from{opacity:0;margin-left:-4px}}@keyframes sui-tooltip-out{to{opacity:0}}@media (forced-colors: active){.tip.brand.sc-sui-tooltip,.tip.light.sc-sui-tooltip{border-color:CanvasText}}"}},[774,"sui-tooltip",{content:[1],position:[513],tone:[513],disabled:[516],openDelay:[2,"open-delay"],closeDelay:[2,"close-delay"],open:[1540],hover:[32],hasContentSlot:[32],closing:[32]},void 0,{open:[{onOpenChange:0}],disabled:[{onDisabledChange:0}],content:[{onContentChange:0}]}]);function g(){"undefined"!=typeof customElements&&["sui-tooltip"].forEach((t=>{"sui-tooltip"===t&&(customElements.get(n(t))||customElements.define(n(t),y))}))}export{y as S,g as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as n}from"./p-qut9RP2y.js";function t(n){if(null==n||""===n)return null;if(n instanceof Date)return isNaN(n.getTime())?null:new Date(n.getFullYear(),n.getMonth(),n.getDate());const t=String(n).trim(),e=/^(\d{4})-(\d{1,2})-(\d{1,2})(?:$|[T\s])/.exec(t);if(e)return new Date(+e[1],+e[2]-1,+e[3]);const r=new Date(t);return isNaN(r.getTime())?null:new Date(r.getFullYear(),r.getMonth(),r.getDate())}const e=t=>`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`,r=(n,t)=>new Date(n,t+1,0).getDate(),o=(n,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t),u=new Map;function c(n,t){const e=`${n}|${JSON.stringify(t)}`;let r=u.get(e);if(!r){try{r=new Intl.DateTimeFormat(n,t)}catch{r=new Intl.DateTimeFormat("en-US",t)}u.set(e,r)}return r}function a(n,t="en-US",e="medium"){return n?c(t,{dateStyle:e}).format(n):""}function i(n,t,e="en-US"){return c(e,{month:"long",year:"numeric"}).format(new Date(n,t,1))}function s(n,t,e="en-US"){return c(e,{month:"long",day:"numeric"}).format(new Date(2e3,n,t))}function f(n,t="en-US"){return c(t,{weekday:"short",month:"short",day:"numeric",year:"numeric"}).format(n)}const l=new Map;function y(n="en-US",t="long"){const e=`m|${n}|${t}`;let r=l.get(e);if(!r){const o=c(n,{month:t});r=Array.from({length:12},((n,t)=>o.format(new Date(2e3,t,1)))),l.set(e,r)}return r}function w(n="en-US",t="long"){const e=`w|${n}|${t}`;let r=l.get(e);if(!r){const o=c(n,{weekday:t});r=Array.from({length:7},((n,t)=>o.format(new Date(2023,0,1+t)))),l.set(e,r)}return r}function h(n="en-US"){return w(n,"short").map((n=>n.replace(/\.$/,"").slice(0,2)))}const m=n=>n.toLowerCase().replace(/\.$/,"");function d(n,t){const e=m(n),r=y(t,"short").map(m);return y(t,"long").map(m).findIndex(((n,t)=>n===e||r[t]===e))}function S(n,t){const e=m(n);return e.length<3?-1:y(t,"long").map(m).findIndex((n=>n.startsWith(e)||e.startsWith(n)))}function D(n,t){const e=m(n);return w(t,"long").some((n=>m(n)===e))||w(t,"short").some((n=>m(n)===e))}function g(n,t,e){if(!Number.isInteger(n)||t<1||t>12||e<1||e>r(n,t-1))return null;const o=new Date(n,t-1,e);return o.setFullYear(n),o}function I(n,t="en-US",e="medium",r=new Date){const o=(n||"").trim();if(!o)return null;const u=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(o);if(u)return g(+u[1],+u[2],+u[3]);const a=o.match(/\d+|[^\d\s/.,\-–—:;'"()]+/g);if(!a)return null;let i=null;const s=[];for(const n of a){if(/^\d+$/.test(n)){s.push(n);continue}let e=d(n,t);if(e<0){if(D(n,t))continue;e=S(n,t)}if(!(e<0)){if(null!=i)return null;i=e+1}}const f=function(n,t){return c(n,{dateStyle:t}).formatToParts(new Date(2001,11,24)).map((n=>n.type)).filter((n=>"day"===n||"month"===n||"year"===n))}(t,e).filter((n=>!("month"===n&&null!=i)));if(s.length!==f.length)return null;let l=NaN,y=i??NaN,w=NaN;return f.forEach(((n,t)=>{const e=s[t];"year"===n?l=4===e.length?+e:e.length<=2?function(n,t){const e=100*Math.floor(t.getFullYear()/100)+n;return e>t.getFullYear()+10?e-100:e}(+e,r):NaN:"month"===n?y=+e:w=+e})),g(l,y,w)}function M(n,t){return(n.match(/\d+|[^\d\s/.,\-–—:;'"()]+/g)||[]).some((n=>/^\d+$/.test(n)||d(n,t)>=0||S(n,t)>=0||D(n,t)))}const N=(n,t)=>{const e=new Date(n.getFullYear(),n.getMonth()+t,1);return new Date(e.getFullYear(),e.getMonth(),Math.min(n.getDate(),r(e.getFullYear(),e.getMonth())))},U=n=>(Math.round(n)%7+7)%7,A=(n,t)=>o(n,-(n.getDay()-U(t)+7)%7),$=(n,t)=>{const e=A(n,t);return Array.from({length:7},((n,t)=>o(e,t)))};function p(n,t,e,u=6){const c=A(new Date(n,t,1),e),a=Math.ceil(((new Date(n,t,1).getDay()-U(e)+7)%7+r(n,t))/7),i=u>0?u:a,s=[];for(let n=0;n<i;n++)s.push(Array.from({length:7},((t,e)=>o(c,7*n+e))));return s}const P="AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN IS JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW".split(" "),T="AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY".split(" "),B=["MV"],E="BH DZ EG IL IQ JO KW LY OM QA SA SD SY YE".split(" "),H=["AF"],O=["IR"],G=["IN","UG"];function K(n){const t=(n||"").trim();if(!t||"undefined"==typeof Intl||"function"!=typeof Intl.Locale)return{info:null,region:""};let e;try{e=new Intl.Locale(t)}catch{return{info:null,region:""}}let r=null;try{const n="function"==typeof e.getWeekInfo?e.getWeekInfo():e.weekInfo;n&&"object"==typeof n&&(r=n)}catch{}let o=e.region;if(!o)try{o=e.maximize().region}catch{o=void 0}return{info:r,region:(o||"").toUpperCase()}}function Y(n){const{info:t,region:e}=K(n);return t&&"number"==typeof t.firstDay?t.firstDay%7:P.includes(e)?0:T.includes(e)?6:B.includes(e)?5:1}function J(n){const{info:t,region:e}=K(n);return t&&Array.isArray(t.weekend)&&t.weekend.length?t.weekend.map((n=>n%7)):E.includes(e)?[5,6]:H.includes(e)?[4,5]:O.includes(e)?[5]:G.includes(e)?[0]:[6,0]}const R=new Map,W=new Map;function Z(n,t="en-US"){let e=W.get(t);if(!e){const n={weekday:"long",month:"long",day:"numeric"};try{e=new Intl.DateTimeFormat(t,n)}catch{e=new Intl.DateTimeFormat("en-US",n)}W.set(t,e)}return e.format(n)}function k(n,t,e,r="en-US"){if("week"===n){const n=$(t,e);return function(n,t,e="en-US"){const r=e;let o=R.get(r);if(!o){try{o=new Intl.DateTimeFormat(e,{month:"short",day:"numeric",year:"numeric"})}catch{o=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"})}R.set(r,o)}const u=o;if("function"==typeof u.formatRange)try{return u.formatRange(n,t)}catch{}return`${a(n,e,"medium")} – ${a(t,e,"medium")}`}(n[0],n[6],r)}return i(t.getFullYear(),t.getMonth(),r)}export{J as a,$ as b,a as c,o as d,N as e,k as f,w as g,Z as h,e as i,r as j,s as k,Y as l,p as m,h as n,y as o,f as p,I as q,M as r,i as s,t,U as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as o,H as s,c as e,h as i,a as t,t as c}from"./p-CeVlau-G.js";import{d as r}from"./p-BHB1Wprj.js";import{c as n}from"./p-C-6_KLLy.js";import{a,l}from"./p-BuyjS5bS.js";import{G as d,a4 as u,k as p,l as h,a5 as g}from"./p-BeYfX4rQ.js";import{d as b}from"./p-b5Ks_pUg.js";const f={name:"shineui-dark",type:"dark",colors:{"editor.background":"#0D1538","editor.foreground":"#DCE3EC"},tokenColors:[{scope:["comment","punctuation.definition.comment"],settings:{foreground:"#8E9CAF",fontStyle:"italic"}},{scope:["string","string.quoted","string.template","punctuation.definition.string"],settings:{foreground:"#FFC98F"}},{scope:["constant.numeric","constant.language","support.constant","constant.other"],settings:{foreground:"#FFB65C"}},{scope:["keyword","storage.type","storage.modifier"],settings:{foreground:"#FF9422"}},{scope:["entity.name.tag","support.class.component"],settings:{foreground:"#FF9422"}},{scope:["entity.other.attribute-name","support.type.property-name","meta.object-literal.key"],settings:{foreground:"#9AA6BD"}},{scope:["entity.name.function","support.function","entity.name.type","support.class"],settings:{foreground:"#FFFFFF"}},{scope:["variable","variable.parameter","variable.other"],settings:{foreground:"#DCE3EC"}},{scope:["keyword.operator","punctuation","meta.brace"],settings:{foreground:"#8E9CAF"}}]},m={"#0D1538":"--sui-code-bg","#FFFFFF":"--sui-code-bright","#DCE3EC":"--sui-code-fg","#9AA6BD":"--sui-code-muted","#8E9CAF":"--sui-code-dim","#FF9422":"--sui-code-key","#FFB65C":"--sui-code-num","#FFC98F":"--sui-code-str"},k=[[1,"t-i"],[2,"t-b"],[4,"t-u"],[8,"t-s"]];function v(o,s){const e=[],i=o?m[o.toUpperCase()]:void 0;i&&e.push("t-"+i.slice(11));for(const[o,i]of k)s&&s>0&&s&o&&e.push(i);return e.join(" ")}const x={jsx:"jsx",tsx:"tsx",js:"javascript",ts:"typescript",html:"html",css:"css",json:"json",bash:"bash"},y={jsx:()=>import("./p-CrVcfwMC.js"),tsx:()=>import("./p-C6hsDVJk.js"),js:()=>import("./p-B-eMraLN.js"),ts:()=>import("./p-BfkKvKcf.js"),html:()=>import("./p-C2EJFbyf.js"),css:()=>import("./p-BirQihPv.js"),json:()=>import("./p-BOdn2vI7.js"),bash:()=>import("./p-nX8XMRk5.js")};let w;const C=new Map;const F=o(class extends s{constructor(o){super(),!1!==o&&this.__registerHost(),this.suiCopy=e(this,"suiCopy",7),this.suiCopyError=e(this,"suiCopyError",7)}get host(){return this}code;lines;language="jsx";label;noCopy=!1;size="md";maxHeight;wrap=!1;wrapToggle=!1;suiCopy;suiCopyError;tokens;copied=!1;scrollable=!1;copiedTimer;run=0;pane;ro;componentWillLoad(){this.highlight()}connectedCallback(){r(this.host,(()=>this.focusTarget())),this.pane&&this.watchPane()}async setFocus(){this.focusTarget()?.focus()}focusTarget(){return this.host.querySelector('button.tool, .pane[tabindex="0"]')||void 0}componentDidLoad(){this.watchPane()}componentDidRender(){Promise.resolve().then((()=>this.measure()))}disconnectedCallback(){clearTimeout(this.copiedTimer),this.copied=!1,this.run++,this.ro?.disconnect(),this.ro=void 0}watchPane(){this.ro?.disconnect(),"undefined"!=typeof ResizeObserver&&this.pane&&(this.ro=new ResizeObserver((()=>this.measure())),this.ro.observe(this.pane))}measure(){const o=this.pane;if(!o||!this.host.isConnected)return;const s=o.scrollWidth>o.clientWidth+1||o.scrollHeight>o.clientHeight+1;s!==this.scrollable&&(this.scrollable=s)}highlight(){const o=++this.run,s=this.source(),e=this.language;"undefined"!=typeof window&&function(o){return Object.prototype.hasOwnProperty.call(y,o)}(e)?Promise.resolve().then((()=>async function(o,s,e){const i=await function(o){return w||(w=(async()=>{const[{createHighlighterCore:s},{createJavaScriptRegexEngine:e}]=await Promise.all([import("./p-CZWUeOlG.js"),import("./p-CJT4wCXG.js")]);return s({themes:[o],langs:[],engine:e({forgiving:!0})})})(),w.catch((()=>{w=void 0}))),w}(e);await function(o,s){let e=C.get(s);return e||(e=y[s]().then((s=>o.loadLanguage(s.default))),e.catch((()=>C.delete(s))),C.set(s,e)),e}(i,s);const{tokens:t}=i.codeToTokens(o,{lang:x[s],theme:e.name||"shineui-dark"});return t.map((o=>o.map((o=>({content:o.content,classes:v(o.color,o.fontStyle)})))))}(s,e,f))).then((s=>{o===this.run&&(this.tokens=s)})).catch((()=>{o===this.run&&(this.tokens=void 0)})):this.tokens=void 0}source(){return null!=this.code?String(this.code):(this.lines||[]).join("\n")}copy=()=>{this.write()};async write(){const o=this.source(),s=this.run,e=await n(o);this.host.isConnected&&(e?(s===this.run&&(clearTimeout(this.copiedTimer),this.copied=!0,this.copiedTimer=setTimeout((()=>this.copied=!1),1400)),this.suiCopy.emit(o)):this.suiCopyError.emit(o))}toggleWrap=()=>{this.wrap=!this.wrap};renderTokens(o){return i("pre",{class:{hl:!0,wrap:this.wrap}},i("code",null,o.map(((o,s)=>[s?"\n":null,i("span",{class:"line"},o.map((o=>o.classes?i("span",{class:o.classes},o.content):o.content)))]))))}renderTools(){const o=this.wrap?a(void 0,"code-block.stopWrapping",void 0,"Stop wrapping lines"):a(void 0,"code-block.wrapLines",void 0,"Wrap long lines"),s=[];return this.wrapToggle&&s.push(i("sui-tooltip",{content:o,position:"top",tone:"light",key:"w"},i("button",{type:"button",class:{tool:!0,on:this.wrap},"aria-pressed":this.wrap?"true":"false","aria-label":o,onClick:this.toggleWrap},i(d,{glyph:u,class:"turn"})))),this.noCopy||s.push(i("sui-tooltip",{content:a(void 0,"code-block.copyToClipboard",void 0,"Copy to clipboard"),position:"top",tone:"light",key:"c"},i("button",{type:"button",class:{tool:!0,on:this.copied},"aria-label":a(void 0,"code-block.copyToClipboard",void 0,"Copy to clipboard"),onClick:this.copy},i(d,{glyph:this.copied?p:h})))),s}render(){const o=this.source(),s=this.renderTools();return i(t,{key:"1ba3e2a18fcc19a65863eac12e911039bd7351ec"},i("div",{key:"560968c30c219d3c7c6d2bc66657f22a3238943f",class:"sui-code-block","data-code-selection":"true"},this.label?i("div",{class:"head"},i(d,{glyph:g}),i("span",{class:"name"},this.label),i("span",{class:"lang"},this.language),s):null,!this.label&&s.length?i("div",{class:"float"},s):null,i("div",{key:"0cdf8b5169625f90f5d98f353e1e414da22f80d7",ref:o=>this.pane=o,class:{pane:!0,[this.size]:!0,wrap:this.wrap},role:"group",tabindex:this.scrollable?"0":void 0,"aria-label":this.label?l(void 0,"code-block.namedCode",void 0,"{name}, code",{name:this.label}):l(void 0,"code-block.languageCode",void 0,"{language} code",{language:this.language}),"data-sb-code":this.wrap?"wrap":"true","data-scroll":"code",style:this.maxHeight?{maxHeight:`${this.maxHeight}px`}:void 0},this.tokens?this.renderTokens(this.tokens):i("pre",{class:{plain:!0,wrap:this.wrap}},o))),i("span",{key:"49c0dd356dc23048c60742c002419d398e788e7f",class:"sr-status",role:"status","aria-live":"polite"},this.copied?a(void 0,"code-block.copied",void 0,"Copied"):""))}static get watchers(){return{code:[{highlight:0}],lines:[{highlight:0}],language:[{highlight:0}]}}static get style(){return".sc-sui-code-block-h{display:block;min-width:0;font-family:var(--font-sans)}.sui-code-block.sc-sui-code-block{position:relative;background:var(--sui-code-bg);border-radius:var(--radius-lg);overflow:hidden;outline:1px solid var(--sui-code-edge);outline-offset:-1px}.head.sc-sui-code-block{display:flex;align-items:center;gap:9px;padding:8px 13px;background:var(--sui-code-head);border-bottom:1px solid color-mix(in srgb, var(--sui-code-line) 8%, transparent)}.head.sc-sui-code-block>.sui-glyph.sc-sui-code-block{font-size:10px;color:var(--sui-code-key)}.name.sc-sui-code-block{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:620 11px var(--font-sans);color:color-mix(in srgb, var(--sui-code-line) 68%, var(--sui-code-head));letter-spacing:0.03em}.lang.sc-sui-code-block{font:650 9px var(--font-sans);letter-spacing:0.09em;text-transform:uppercase;color:color-mix(in srgb, var(--sui-code-line) 68%, var(--sui-code-head))}.float.sc-sui-code-block{position:absolute;top:8px;right:8px;display:flex;gap:6px;z-index:2}.tool.sc-sui-code-block{appearance:none;margin:0;flex-shrink:0;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;line-height:1;font-size:var(--icon-size-sm);border:1px solid color-mix(in srgb, var(--sui-code-line) 18%, transparent);background:var(--sui-code-chip);color:var(--sui-code-bright);border-radius:var(--radius-pill);cursor:pointer;transition:background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out)}.tool.sc-sui-code-block:hover{background:color-mix(in srgb, var(--sui-code-bright) 14%, var(--sui-code-chip))}.tool.sc-sui-code-block .turn.sc-sui-code-block{transform:rotate(90deg)}.tool.on.sc-sui-code-block{background:var(--sui-code-chip-on);color:var(--sui-code-chip-on-ink);border-color:color-mix(in srgb, var(--sui-code-chip-on-ink) 55%, transparent)}.tool.sc-sui-code-block:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.pane.sc-sui-code-block{direction:ltr;text-align:left;padding:13px 15px;overflow:auto;box-sizing:border-box;font-family:var(--font-mono);font-variant-ligatures:none;line-height:1.65;color:var(--sui-code-fg);overflow-wrap:normal}.pane.md.sc-sui-code-block{font-size:12px}.pane.sm.sc-sui-code-block{font-size:11px}.pane.wrap.sc-sui-code-block{overflow-wrap:anywhere}.pane.sc-sui-code-block:focus-visible{outline:none}.sc-sui-code-block-h:has(.pane:focus-visible) .sui-code-block.sc-sui-code-block{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.plain.sc-sui-code-block,.hl.sc-sui-code-block{margin:0;padding:0;font:inherit;color:inherit;white-space:pre;background:transparent}.plain.wrap.sc-sui-code-block,.hl.wrap.sc-sui-code-block{white-space:pre-wrap}.hl.sc-sui-code-block code.sc-sui-code-block{font:inherit}.t-bright.sc-sui-code-block{color:var(--sui-code-bright)}.t-fg.sc-sui-code-block{color:var(--sui-code-fg)}.t-muted.sc-sui-code-block{color:var(--sui-code-muted)}.t-dim.sc-sui-code-block{color:var(--sui-code-dim)}.t-key.sc-sui-code-block{color:var(--sui-code-key)}.t-num.sc-sui-code-block{color:var(--sui-code-num)}.t-str.sc-sui-code-block{color:var(--sui-code-str)}.t-i.sc-sui-code-block{font-style:italic}.t-b.sc-sui-code-block{font-weight:700}.t-u.sc-sui-code-block{text-decoration:underline}.t-s.sc-sui-code-block{text-decoration:line-through}.sr-status.sc-sui-code-block{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (forced-colors: active){.tool.on.sc-sui-code-block{forced-color-adjust:none;background:Highlight;color:HighlightText;border-color:HighlightText;outline-color:CanvasText;box-shadow:none}}"}},[514,"sui-code-block",{code:[1],lines:[16],language:[513],label:[1],noCopy:[516,"no-copy"],size:[513],maxHeight:[2,"max-height"],wrap:[1540],wrapToggle:[516,"wrap-toggle"],tokens:[32],copied:[32],scrollable:[32],setFocus:[64]},void 0,{code:[{highlight:0}],lines:[{highlight:0}],language:[{highlight:0}]}]);function j(){"undefined"!=typeof customElements&&["sui-code-block","sui-tooltip"].forEach((o=>{switch(o){case"sui-code-block":customElements.get(c(o))||customElements.define(c(o),F);break;case"sui-tooltip":customElements.get(c(o))||b()}}))}export{F as S,j as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as i,H as t,h as s,a as o,t as e}from"./p-CeVlau-G.js";import{d as a}from"./p-BHB1Wprj.js";import{r}from"./p-BnZU02lM.js";import{o as n}from"./p-DsHK25q3.js";import{o as h}from"./p-BWkzTEZX.js";const d="button, a[href]",l=i(class extends t{constructor(i){super(),!1!==i&&this.__registerHost()}get host(){return this}open=!1;x=0;y=0;closing=!1;disposeRoving;disposeObserver;exit=n((()=>this.closing=!1));loaded=!1;connectedCallback(){a(this.host,(()=>this.tabStop())),this.loaded&&this.watch()}async setFocus(){this.tabStop()?.focus()}tabStop(){return this.open?Array.from(this.host.querySelectorAll(d)).find((i=>"0"===i.getAttribute("tabindex")))??this.host.querySelector(d):null}componentDidLoad(){this.loaded=!0,this.watch()}disconnectedCallback(){this.disposeRoving?.(),this.disposeRoving=void 0,this.disposeObserver?.(),this.disposeObserver=void 0,this.exit.active&&(this.exit.cancel(),this.closing=!1)}watch(){this.arm(),this.disposeObserver?.(),this.disposeObserver=h(this.host,(()=>this.arm()))}onOpenChange(i){if(i)return this.exit.cancel(),void(this.closing=!1);this.closing=this.exit.begin(this.host)}arm(){this.disposeRoving?.(),this.disposeRoving=r(this.host,d,"horizontal")}render(){return s(o,{key:"f99a3f1159c7233f014d265220396ddd748e5150",role:"toolbar",class:{hidden:!this.open&&!this.closing,closing:this.closing},inert:this.closing,"aria-hidden":this.open?null:"true",style:{left:`${Number(this.x)||0}px`,top:`${Number(this.y)||0}px`}},s("slot",{key:"9bd890a80350c47f0a5692ce058129b75c8a7681"}))}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return".sc-sui-mini-toolbar-h{position:absolute;left:0;top:0;z-index:var(--z-dropdown);box-sizing:border-box;display:inline-flex;align-items:center;gap:2px;padding:4px;white-space:nowrap;background:var(--surface-raised);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-pop);font-family:var(--font-sans);color:var(--ink);animation:sui-mini-toolbar-in var(--duration-overlay) var(--ease-out)}.hidden.sc-sui-mini-toolbar-h{display:none}.closing.sc-sui-mini-toolbar-h{animation:sui-mini-toolbar-out var(--duration-fast) var(--ease-out) forwards;pointer-events:none}@keyframes sui-mini-toolbar-in{from{opacity:0;transform:translateY(4px)}}@keyframes sui-mini-toolbar-out{to{opacity:0}}"}},[774,"sui-mini-toolbar",{open:[516],x:[2],y:[2],closing:[32],setFocus:[64]},void 0,{open:[{onOpenChange:0}]}]);function p(){"undefined"!=typeof customElements&&["sui-mini-toolbar"].forEach((i=>{"sui-mini-toolbar"===i&&(customElements.get(e(i))||customElements.define(e(i),l))}))}export{l as S,p as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as n}from"./p-CeVlau-G.js";import{i as e}from"./p-GAnFXayY.js";import{G as r,k as t,q as u}from"./p-BeYfX4rQ.js";function a(n){return function(n){return!!n&&!n.separator&&null==n.section}(n)&&!n.disabled}function i(n){return n.findIndex(a)}function o(n){for(let e=n.length-1;e>=0;e--)if(a(n[e]))return e;return-1}function s(n,e,r){const t=n.length;if(!t)return-1;if(e<0)return r>0?i(n):o(n);let u=e;for(let e=0;e<t;e++)if(u=(u+r+t)%t,a(n[u]))return u;return-1}function l(n,r,t){const u=function(n){const e=c(n),r=e?Number(e.getAttribute("data-index")):NaN;return Number.isFinite(r)?r:-1}(n);u>=0&&u<r.length&&(t=u);const l=(e,r=t)=>(n.preventDefault(),{action:e,index:r}),d=e(n.currentTarget||n.target);switch(n.key){case"ArrowDown":return l("move",s(r,t,1));case"ArrowUp":return l("move",s(r,t,-1));case"Home":return l("move",i(r));case"End":return l("move",o(r));case"Enter":case" ":{const e=function(n){const e=c(n);return e&&"A"===e.tagName&&e.hasAttribute("href")?e:null}(n);return e?(" "===n.key&&(n.preventDefault(),e.click()),{action:"link",index:t}):l("activate")}case"Escape":return l("escape");case"ArrowRight":return l(d?"back":"forward");case"ArrowLeft":return l(d?"forward":"back");default:if(1===n.key.length&&!n.ctrlKey&&!n.metaKey&&!n.altKey){const e=function(n,e,r){const t=r.toLowerCase(),u=n.length;for(let r=1;r<=u;r++){const i=(e+r+u)%u,o=n[i];if(a(o)&&(o.label||"").toLowerCase().startsWith(t))return i}return-1}(r,t,n.key);if(e>=0)return l("move",e)}return{action:null,index:t}}}function c(n){const e=n.target;return e&&"function"==typeof e.closest?e.closest("[data-index]"):null}function d(n,e){if(!n||e<0)return;const r=n.querySelector(`[data-index="${e}"]`);r?.focus()}function f(n){if(" "!==n.key)return!1;const e=n.currentTarget;return!(!e||"A"!==e.tagName||!e.hasAttribute("href")||(n.preventDefault(),e.click(),0))}const m=[[/⌘|cmd|command/gi,"Meta"],[/⌃|ctrl|control/gi,"Control"],[/⇧|shift/gi,"Shift"],[/⌥|opt|option|alt/gi,"Alt"]];function p(n){let e=n.trim();for(const[n,r]of m)e=e.replace(n,`${r}+`);return e.replace(/\s*\+\s*/g,"+").replace(/\s+/g,"+").replace(/\++/g,"+").replace(/^\+|\+$/g,"")}const v=e=>{const o=e.items||[],s=e.activeIndex??-1,l=e.openIndex??-1,c=s>=0&&a(o[s])?s:i(o),d=o.some((n=>void 0!==n.checked));return n("div",{class:{"sui-menu-list":!0,fill:!!e.fill},role:"menu",id:e.menuId,"aria-label":e.ariaLabel,style:e.fill?void 0:{width:`${e.width??220}px`},ref:e.menuRef,onKeyDown:e.onKeyDown,onMouseLeave:e.onLeave},o.map(((i,o)=>{if(i.separator)return n("div",{class:"sui-menu-sep",role:"separator"});if(null!=i.section)return n("div",{class:"sui-menu-section",role:"presentation"},i.section);const f=!!e.nests&&!(!i.items||!i.items.length),m=function(n){return a(n)&&!!n.href&&!(n.items&&n.items.length)}(i),v=n(m?"a":"div",{id:e.idBase?`${e.idBase}-${o}`:void 0,class:{"sui-menu-item":!0,active:o===s&&!i.disabled,open:o===l,danger:!!i.danger,disabled:!!i.disabled,current:!!i.current},role:void 0===i.checked?"menuitem":"menuitemradio","aria-checked":void 0===i.checked?null:i.checked?"true":"false","data-index":o,tabIndex:o===c?0:-1,href:m?i.href:void 0,target:m?i.target:void 0,rel:m&&"_blank"===i.target?"noopener":void 0,"aria-current":i.current?"page":null,"aria-disabled":i.disabled?"true":null,"aria-label":null!=i.badge?`${i.label}, ${i.badge}`:null,"aria-keyshortcuts":i.shortcut?p(i.shortcut):null,"aria-haspopup":f?"menu":null,"aria-expanded":f?o===l?"true":"false":null,"aria-controls":f&&o===l&&e.controls?e.controls:null,onMouseEnter:()=>{i.disabled||e.onHover?.(o)},onClick:()=>{i.disabled||e.onPick?.(i,o)}},d?n("span",{class:"sui-menu-check","aria-hidden":"true"},i.checked?n(r,{glyph:t}):null):null,i.icon?n("i",{class:`sui-menu-icon ${i.icon}`,"aria-hidden":"true"}):null,n("span",{class:"sui-menu-label"},i.label),null!=i.badge?n("span",{class:"sui-menu-badge","aria-hidden":"true"},i.badge):null,i.shortcut?n("span",{class:"sui-menu-shortcut","aria-hidden":"true"},i.shortcut):null,f?n(r,{glyph:u,class:"sui-menu-chev"}):null);return e.renderAfter?n("div",{class:"sui-menu-row",role:"presentation"},v,e.renderAfter(i,o)):v})))};export{v as M,i as a,d as f,a as i,o as l,l as m,f as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as i,H as s,c as e,h as c,a as t,t as a}from"./p-CeVlau-G.js";import{d as o}from"./p-BHB1Wprj.js";import{l as r}from"./p-BuyjS5bS.js";import{G as h,x as n}from"./p-BeYfX4rQ.js";const l=i(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.suiRemove=e(this,"suiRemove",7)}get host(){return this}label="";value;icon;initial;image;removable=!1;size="md";selected=!1;disabled=!1;clickable=!1;suiRemove;imageFailed=!1;onImage(){this.imageFailed=!1}connectedCallback(){o(this.host,(()=>this.focusTarget()))}async setFocus(){this.focusTarget()?.focus()}focusTarget(){if(!this.disabled)return this.clickable?this.host:this.removable&&this.host.querySelector("button.remove")||void 0}removed(){return null!=this.value&&""!==this.value?String(this.value):this.label}onCaptureClick(i){this.disabled&&(i.stopImmediatePropagation(),i.preventDefault())}onKeyDown=i=>{if(!this.disabled)return!this.removable||"Backspace"!==i.key&&"Delete"!==i.key?void(this.clickable&&i.target===this.host&&("Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.host.click()))):(i.preventDefault(),void this.suiRemove.emit(this.removed()))};onRemove=i=>{i.stopPropagation(),this.disabled||this.suiRemove.emit(this.removed())};render(){const i=!!this.image&&!this.imageFailed;return c(t,{key:"e4c871fb1446dab090cb90b0018db30b9d87e833",role:this.clickable?"button":null,tabIndex:this.clickable&&!this.disabled?0:null,"aria-disabled":this.clickable&&this.disabled?"true":null,"aria-pressed":this.clickable?String(this.selected):null,"aria-keyshortcuts":this.removable&&this.clickable?"Backspace":null,onKeyDown:this.onKeyDown},c("span",{key:"c8759870b4c4f0bf38db63c3a63b92e434c712f2",class:{"sui-chip":!0,selected:this.selected,disabled:this.disabled,"with-initial":i||!!this.initial}},i?c("img",{class:"image",src:this.image,alt:"","aria-hidden":"true",onError:()=>this.imageFailed=!0}):this.initial?c("span",{class:"initial","aria-hidden":"true"},this.initial):null,this.icon?c("i",{class:`${this.icon} icon`,"aria-hidden":"true"}):null,c("span",{key:"f24a2e98e3e6661542be213f5a72bb924c612876",class:"label"},this.label),this.removable&&this.clickable?c("span",{class:"remove","aria-hidden":"true",onClick:this.onRemove},c(h,{glyph:n})):this.removable?c("button",{type:"button",class:"remove","aria-label":r(void 0,"chip.remove",void 0,"Remove {name}",{name:this.label}),disabled:this.disabled,tabIndex:this.disabled?-1:0,onClick:this.onRemove},c(h,{glyph:n})):null))}static get watchers(){return{image:[{onImage:0}]}}static get style(){return'.sc-sui-chip-h{display:inline-block;vertical-align:middle;max-width:100%;border-radius:var(--radius-pill);font-family:var(--font-sans);line-height:0}.sc-sui-chip-h:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}[clickable].sc-sui-chip-h:not([disabled]){cursor:pointer}[disabled].sc-sui-chip-h{cursor:not-allowed}.sui-chip.sc-sui-chip{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 11px;box-sizing:border-box;max-width:100%;border-radius:var(--radius-pill);background:var(--brand-soft);color:var(--ink);font-family:var(--font-sans);font-size:12.5px;font-weight:620;line-height:1;white-space:nowrap;user-select:none;cursor:default;transition:background var(--duration-fast) var(--ease-out)}.sui-chip.with-initial.sc-sui-chip{padding:0 10px;padding-inline-start:3px}.label.sc-sui-chip{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:1.4}[clickable].sc-sui-chip-h:not([disabled]) .sui-chip.sc-sui-chip{cursor:pointer}[clickable].sc-sui-chip-h:not([disabled]):hover .sui-chip.sc-sui-chip:not(.selected){background:var(--border)}.sui-chip.selected.sc-sui-chip{background:var(--brand);color:var(--brand-contrast)}.sui-chip.disabled.sc-sui-chip{background:var(--disabled-bg);color:var(--disabled-ink);cursor:not-allowed}.initial.sc-sui-chip{width:22px;height:22px;border-radius:50%;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:var(--brand);color:var(--brand-contrast);font-size:9.5px;font-weight:720}.sui-chip.selected.sc-sui-chip .initial.sc-sui-chip{background:var(--accent);color:var(--accent-contrast)}.image.sc-sui-chip{width:22px;height:22px;border-radius:50%;flex-shrink:0;display:block;object-fit:cover;background:var(--surface-sunken)}.icon.sc-sui-chip{font-size:11px;color:var(--ink-muted)}.sui-chip.selected.sc-sui-chip .icon.sc-sui-chip{color:var(--ink-inverse-muted)}.sui-chip.disabled.sc-sui-chip .icon.sc-sui-chip{color:var(--disabled-ink)}.remove.sc-sui-chip{appearance:none;display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;border-radius:50%;width:16px;height:16px;margin-inline-end:-3px;color:var(--ink-muted);font-size:10px;line-height:1;cursor:pointer}.remove.sc-sui-chip:hover{color:var(--ink)}.remove.sc-sui-chip:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px;box-shadow:var(--focus-shadow)}.remove.sc-sui-chip:disabled{cursor:not-allowed;color:var(--ink-placeholder)}.sui-chip.disabled.sc-sui-chip span.remove.sc-sui-chip{cursor:not-allowed;color:var(--disabled-ink)}.sui-chip.selected.sc-sui-chip .remove.sc-sui-chip{color:var(--ink-inverse-muted)}.sui-chip.selected.sc-sui-chip .remove.sc-sui-chip:hover{color:var(--brand-contrast)}[size="sm"].sc-sui-chip-h .sui-chip.sc-sui-chip{height:22px;padding:0 9px;font-size:12px;gap:5px}[size="sm"].sc-sui-chip-h .sui-chip.with-initial.sc-sui-chip{padding:0 8px;padding-inline-start:2px}[size="sm"].sc-sui-chip-h .initial.sc-sui-chip{width:18px;height:18px;font-size:8.5px}[size="sm"].sc-sui-chip-h .image.sc-sui-chip{width:18px;height:18px}[size="sm"].sc-sui-chip-h .icon.sc-sui-chip{font-size:10px}[size="sm"].sc-sui-chip-h .remove.sc-sui-chip{width:14px;height:14px;margin-inline-end:-2px}@media (forced-colors: active){.sui-chip.sc-sui-chip{border:1px solid CanvasText}.initial.sc-sui-chip{border:1px solid CanvasText}.sui-chip.selected.sc-sui-chip{forced-color-adjust:none;background:Highlight;color:HighlightText;border-color:HighlightText}.sui-chip.selected.sc-sui-chip .initial.sc-sui-chip{background:HighlightText;color:Highlight;border-color:HighlightText}.sui-chip.selected.sc-sui-chip .image.sc-sui-chip{background:Highlight}.sui-chip.selected.sc-sui-chip .icon.sc-sui-chip,.sui-chip.selected.sc-sui-chip .remove.sc-sui-chip,.sui-chip.selected.sc-sui-chip .remove.sc-sui-chip:hover{color:HighlightText}.sui-chip.selected.sc-sui-chip .remove.sc-sui-chip:focus-visible{outline-color:CanvasText;box-shadow:none}.sui-chip.disabled.sc-sui-chip{forced-color-adjust:auto;background:Canvas;color:GrayText;border-color:GrayText}.sui-chip.disabled.sc-sui-chip .initial.sc-sui-chip{background:Canvas;color:GrayText;border-color:GrayText}.sui-chip.disabled.sc-sui-chip .icon.sc-sui-chip,.sui-chip.disabled.sc-sui-chip span.remove.sc-sui-chip{color:GrayText}}'}},[514,"sui-chip",{label:[1],value:[1],icon:[1],initial:[1],image:[1],removable:[516],size:[513],selected:[516],disabled:[516],clickable:[516],imageFailed:[32],setFocus:[64]},[[2,"click","onCaptureClick"]],{image:[{onImage:0}]}]);function u(){"undefined"!=typeof customElements&&["sui-chip"].forEach((i=>{"sui-chip"===i&&(customElements.get(a(i))||customElements.define(a(i),l))}))}export{l as S,u as d}
|