@shineuix/ssr 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +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--YwzuGO4.js +1 -0
- package/dist/components/p-1XW6gKXd.js +1 -0
- package/dist/components/p-5IOXzr3D.js +1 -0
- package/dist/components/p-7Ti-Ht9x.js +1 -0
- package/dist/components/p-8BHOb7Dy.js +1 -0
- package/dist/components/p-9ma1-eiT.js +1 -0
- package/dist/components/p-B-eMraLN.js +1 -0
- package/dist/components/p-B0NNDkks.js +1 -0
- package/dist/components/p-BE4gZZNA.js +1 -0
- package/dist/components/p-BEa7fx4d.js +1 -0
- package/dist/components/p-BHB1Wprj.js +1 -0
- package/dist/components/p-BJXb6pu9.js +1 -0
- package/dist/components/p-BM1Zzj1H.js +1 -0
- package/dist/components/p-BOdn2vI7.js +1 -0
- package/dist/components/p-BPGiU7Vj.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-BfkKvKcf.js +1 -0
- package/dist/components/p-BiSaIyr0.js +1 -0
- package/dist/components/p-BioVIgkG.js +1 -0
- package/dist/components/p-BirQihPv.js +1 -0
- package/dist/components/p-BmmgLDk2.js +1 -0
- package/dist/components/p-BnZU02lM.js +1 -0
- package/dist/components/p-BpxmwysK.js +1 -0
- package/dist/components/p-Bt5Kx3zM.js +1 -0
- package/dist/components/p-Btp15dVO.js +1 -0
- package/dist/components/p-BuyjS5bS.js +1 -0
- package/dist/components/p-Bv5xqCDb.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-C0MrkGLb.js +1 -0
- package/dist/components/p-C2EJFbyf.js +1 -0
- package/dist/components/p-C6DEF4nA.js +1 -0
- package/dist/components/p-C6T8Kp68.js +1 -0
- package/dist/components/p-C6hsDVJk.js +1 -0
- package/dist/components/p-CAeBVGwP.js +1 -0
- package/dist/components/p-CCVYcPwO.js +1 -0
- package/dist/components/p-CDJMRbCX.js +1 -0
- package/dist/components/p-CGWvlrv_.js +1 -0
- package/dist/components/p-CJT4wCXG.js +47 -0
- package/dist/components/p-CN5x4MC8.js +1 -0
- package/dist/components/p-COO9uV7W.js +1 -0
- package/dist/components/p-CR0heQtR.js +1 -0
- package/dist/components/p-CSPVrtqf.js +1 -0
- package/dist/components/p-CT6aJe8X.js +1 -0
- package/dist/components/p-CYZG3LOZ.js +1 -0
- package/dist/components/p-CYlxvoVo.js +1 -0
- package/dist/components/p-CZWUeOlG.js +1 -0
- package/dist/components/p-CbnOosJi.js +1 -0
- package/dist/components/p-CeVlau-G.js +1 -0
- package/dist/components/p-CekHtBpA.js +1 -0
- package/dist/components/p-CjVByuTx.js +1 -0
- package/dist/components/p-CmqQjlaI.js +1 -0
- package/dist/components/p-CrVcfwMC.js +1 -0
- package/dist/components/p-Cs2X0Kih.js +1 -0
- package/dist/components/p-CyBxJm67.js +1 -0
- package/dist/components/p-D0KZcTn9.js +1 -0
- package/dist/components/p-D31mbQ3e.js +1 -0
- package/dist/components/p-D7L5Nhsy.js +1 -0
- package/dist/components/p-D9rbC_yY.js +1 -0
- package/dist/components/p-DAfCbU7H.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-DNgqy3W8.js +1 -0
- package/dist/components/p-DRMr6xXH.js +1 -0
- package/dist/components/p-DSNURte-.js +1 -0
- package/dist/components/p-DSjolNQa.js +1 -0
- package/dist/components/p-DXIDl7cw.js +1 -0
- package/dist/components/p-DZRA7Q7l.js +1 -0
- package/dist/components/p-D_S99uS1.js +1 -0
- package/dist/components/p-D_hGdmbW.js +1 -0
- package/dist/components/p-Da6TsjCG.js +1 -0
- package/dist/components/p-DbF8ArKE.js +1 -0
- package/dist/components/p-DdsE4HI6.js +1 -0
- package/dist/components/p-Deadvw27.js +1 -0
- package/dist/components/p-DgXzRiP4.js +1 -0
- package/dist/components/p-DgiZgZCh.js +1 -0
- package/dist/components/p-Dgl_qIYT.js +1 -0
- package/dist/components/p-DhYPkfV2.js +1 -0
- package/dist/components/p-Ds9HpZbg.js +1 -0
- package/dist/components/p-DskQyZoR.js +1 -0
- package/dist/components/p-DtI1DFsR.js +1 -0
- package/dist/components/p-DuJmXwMk.js +1 -0
- package/dist/components/p-Dxh8L0dt.js +1 -0
- package/dist/components/p-ES48zkCT.js +1 -0
- package/dist/components/p-GAnFXayY.js +1 -0
- package/dist/components/p-Hej7hALV.js +1 -0
- package/dist/components/p-M0fYQCIv.js +1 -0
- package/dist/components/p-MsqFuhDd.js +1 -0
- package/dist/components/p-NpX9eEW0.js +1 -0
- package/dist/components/p-RwPlJzMY.js +1 -0
- package/dist/components/p-TBwsYzWO.js +1 -0
- package/dist/components/p-U06fVoGD.js +1 -0
- package/dist/components/p-UtUl_rX-.js +1 -0
- package/dist/components/p-eoxRNwfF.js +1 -0
- package/dist/components/p-iKk1YZ0M.js +1 -0
- package/dist/components/p-l4ru8vIR.js +1 -0
- package/dist/components/p-mF7K10Wh.js +1 -0
- package/dist/components/p-mdFjb4l0.js +1 -0
- package/dist/components/p-n4-59tbj.js +1 -0
- package/dist/components/p-nX8XMRk5.js +1 -0
- package/dist/components/p-pJYXPDB_.js +1 -0
- package/dist/components/p-q0JbXN8q.js +1 -0
- package/dist/components/p-qjuvplfX.js +1 -0
- package/dist/components/p-v0MrzKlW.js +1 -0
- package/dist/components/p-vN2wl76B.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 +126 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function n(t){return Array.isArray(t)?function(t){let e=[];for(let r=0,o=t.length;r<o;r++)e[r]=n(t[r]);return e}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let e={};for(let r in t)e[r]=n(t[r]);return e}(t):t}function e(t,...n){return n.forEach((n=>{for(let e in n)t[e]=n[e]})),t}function r(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?r(t.substring(0,t.length-1)):t.substr(1+~n)}var o=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,i=class{static hasCaptures(t){return null!==t&&(o.lastIndex=0,o.test(t))}static replaceCaptures(t,n,e){return t.replace(o,((t,r,o,i)=>{let l=e[parseInt(r||o,10)];if(!l)return t;{let t=n.substring(l.start,l.end);for(;"."===t[0];)t=t.substring(1);switch(i){case"downcase":return t.toLowerCase();case"upcase":return t.toUpperCase();default:return t}}}))}};function l(t,n){return t<n?-1:t>n?1:0}function s(t,n){if(null===t&&null===n)return 0;if(!t)return-1;if(!n)return 1;let e=t.length,r=n.length;if(e===r){for(let r=0;r<e;r++){let e=l(t[r],n[r]);if(0!==e)return e}return 0}return e-r}function a(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function u(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var c=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const n=this.fn(t);return this.cache.set(t,n),n}},h=class{constructor(t,n,e){this._colorMap=t,this._defaults=n,this._root=e}static createFromRawTheme(t,n){return this.createFromParsedTheme(function(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let n=t.settings,e=[],r=0;for(let t=0,o=n.length;t<o;t++){let o,i=n[t];if(!i.settings)continue;if("string"==typeof i.scope){let t=i.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),o=t.split(",")}else o=Array.isArray(i.scope)?i.scope:[""];let l=-1;if("string"==typeof i.settings.fontStyle){l=0;let t=i.settings.fontStyle.split(" ");for(let n=0,e=t.length;n<e;n++)switch(t[n]){case"italic":l|=1;break;case"bold":l|=2;break;case"underline":l|=4;break;case"strikethrough":l|=8}}let s=null;"string"==typeof i.settings.foreground&&a(i.settings.foreground)&&(s=i.settings.foreground);let u=null;"string"==typeof i.settings.background&&a(i.settings.background)&&(u=i.settings.background);for(let n=0,i=o.length;n<i;n++){let i=o[n].trim().split(" "),a=i[i.length-1],c=null;i.length>1&&(c=i.slice(0,i.length-1),c.reverse()),e[r++]=new p(a,c,t,l,s,u)}}return e}(t),n)}static createFromParsedTheme(t,n){return function(t,n){t.sort(((t,n)=>{let e=l(t.scope,n.scope);return 0!==e?e:(e=s(t.parentScopes,n.parentScopes),0!==e?e:t.index-n.index)}));let e=0,r="#000000",o="#ffffff";for(;t.length>=1&&""===t[0].scope;){let n=t.shift();-1!==n.fontStyle&&(e=n.fontStyle),null!==n.foreground&&(r=n.foreground),null!==n.background&&(o=n.background)}let i=new y(n),a=new g(e,i.getId(r),i.getId(o)),u=new k(new w(0,null,-1,0,0),[]);for(let n=0,e=t.length;n<e;n++){let e=t[n];u.insert(0,e.scope,e.parentScopes,e.fontStyle,i.getId(e.foreground),i.getId(e.background))}return new h(i,a,u)}(t,n)}_cachedMatchRoot=new c((t=>this._root.match(t)));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(null===t)return this._defaults;const n=this._cachedMatchRoot.get(t.scopeName).find((n=>function(t,n){if(0===n.length)return!0;for(let e=0;e<n.length;e++){let r=n[e],o=!1;if(">"===r){if(e===n.length-1)return!1;r=n[++e],o=!0}for(;t&&!d(t.scopeName,r);){if(o)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}(t.parent,n.parentScopes)));return n?new g(n.fontStyle,n.foreground,n.background):null}},f=class t{constructor(t,n){this.parent=t,this.scopeName=n}static push(n,e){for(const r of e)n=new t(n,r);return n}static from(...n){let e=null;for(let r=0;r<n.length;r++)e=new t(e,n[r]);return e}push(n){return new t(this,n)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t||null!==this.parent&&this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let e=this;for(;e&&e!==t;)n.push(e.scopeName),e=e.parent;return e===t?n.reverse():void 0}};function d(t,n){return n===t||t.startsWith(n)&&"."===t[n.length]}var g=class{constructor(t,n,e){this.fontStyle=t,this.foregroundId=n,this.backgroundId=e}},p=class{constructor(t,n,e,r,o,i){this.scope=t,this.parentScopes=n,this.index=e,this.fontStyle=r,this.foreground=o,this.background=i}},m=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(m||{}),y=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let n=0,e=t.length;n<e;n++)this._color2id[t[n]]=n,this._id2color[n]=t[n]}else this._isFrozen=!1}getId(t){if(null===t)return 0;t=t.toUpperCase();let n=this._color2id[t];if(n)return n;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return n=++this._lastColorId,this._color2id[t]=n,this._id2color[n]=t,n}getColorMap(){return this._id2color.slice(0)}},b=Object.freeze([]),w=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,e,r,o){this.scopeDepth=t,this.parentScopes=n||b,this.fontStyle=e,this.foreground=r,this.background=o}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let e=0,r=t.length;e<r;e++)n[e]=t[e].clone();return n}acceptOverwrite(t,n,e,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,-1!==n&&(this.fontStyle=n),0!==e&&(this.foreground=e),0!==r&&(this.background=r)}},k=class t{constructor(t,n=[],e={}){this._mainRule=t,this._children=e,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let e=0,r=0;for(;">"===t.parentScopes[e]&&e++,">"===n.parentScopes[r]&&r++,!(e>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[e].length;if(0!==o)return o;e++,r++}return n.parentScopes.length-t.parentScopes.length}match(n){if(""!==n){let t,e,r=n.indexOf(".");if(-1===r?(t=n,e=""):(t=n.substring(0,r),e=n.substring(r+1)),this._children.hasOwnProperty(t))return this._children[t].match(e)}const e=this._rulesWithParentScopes.concat(this._mainRule);return e.sort(t._cmpBySpecificity),e}insert(n,e,r,o,i,l){if(""===e)return void this._doInsertHere(n,r,o,i,l);let s,a,u,c=e.indexOf(".");-1===c?(s=e,a=""):(s=e.substring(0,c),a=e.substring(c+1)),this._children.hasOwnProperty(s)?u=this._children[s]:(u=new t(this._mainRule.clone(),w.cloneArr(this._rulesWithParentScopes)),this._children[s]=u),u.insert(n+1,a,r,o,i,l)}_doInsertHere(t,n,e,r,o){if(null!==n){for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let l=this._rulesWithParentScopes[i];if(0===s(l.parentScopes,n))return void l.acceptOverwrite(t,e,r,o)}-1===e&&(e=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new w(t,n,e,r,o))}else this._mainRule.acceptOverwrite(t,e,r,o)}},v=class t{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(n){const e=t.getLanguageId(n),r=t.getTokenType(n),o=t.getFontStyle(n),i=t.getForeground(n),l=t.getBackground(n);console.log({languageId:e,tokenType:r,fontStyle:o,foreground:i,background:l})}static getLanguageId(t){return(255&t)>>>0}static getTokenType(t){return(768&t)>>>8}static containsBalancedBrackets(t){return!!(1024&t)}static getFontStyle(t){return(30720&t)>>>11}static getForeground(t){return(16744448&t)>>>15}static getBackground(t){return(4278190080&t)>>>24}static set(n,e,r,o,i,l,s){let a=t.getLanguageId(n),u=t.getTokenType(n),c=t.containsBalancedBrackets(n)?1:0,h=t.getFontStyle(n),f=t.getForeground(n),d=t.getBackground(n);return 0!==e&&(a=e),8!==r&&(u=r),null!==o&&(c=o?1:0),-1!==i&&(h=i),0!==l&&(f=l),0!==s&&(d=s),(a|u<<8|c<<10|h<<11|f<<15|d<<24)>>>0}};function S(t,n){const e=[],r=function(t){let n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,e=n.exec(t);return{next:()=>{if(!e)return null;const r=e[0];return e=n.exec(t),r}}}(t);let o=r.next();for(;null!==o;){let t=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":t=1;break;case"L":t=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let n=l();if(e.push({matcher:n,priority:t}),","!==o)break;o=r.next()}return e;function i(){if("-"===o){o=r.next();const t=i();return n=>!!t&&!t(n)}if("("===o){o=r.next();const t=function(){const t=[];let n=l();for(;n&&(t.push(n),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);n=l()}return n=>t.some((t=>t(n)))}();return")"===o&&(o=r.next()),t}if(C(o)){const t=[];do{t.push(o),o=r.next()}while(C(o));return e=>n(t,e)}return null}function l(){const t=[];let n=i();for(;n;)t.push(n),n=i();return n=>t.every((t=>t(n)))}}function C(t){return!!t&&!!t.match(/[\w\.:]+/)}function x(t){"function"==typeof t.dispose&&t.dispose()}var T=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},A=class{constructor(t,n){this.scopeName=t,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}},E=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const n=t.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(t))}},O=class{constructor(t,n){this.repo=t,this.initialScopeName=n,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new T(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const n=new E;for(const e of t)P(e,this.initialScopeName,this.repo,n);for(const t of n.references)if(t instanceof T){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName))continue;if(this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function P(t,n,e,r){const o=e.lookup(t.scopeName);if(!o){if(t.scopeName===n)throw new Error(`No grammar provided for <${n}>`);return}const i=e.lookup(n);t instanceof T?L({baseGrammar:i,selfGrammar:o},r):M(t.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const l=e.injections(t.scopeName);if(l)for(const t of l)r.add(new T(t))}function M(t,n,e){n.repository&&n.repository[t]&&$([n.repository[t]],n,e)}function L(t,n){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&$(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},n),t.selfGrammar.injections&&$(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},n)}function $(t,n,r){for(const o of t){if(r.visitedRule.has(o))continue;r.visitedRule.add(o);const t=o.repository?e({},n.repository,o.repository):n.repository;Array.isArray(o.patterns)&&$(o.patterns,{...n,repository:t},r);const i=o.include;if(!i)continue;const l=N(i);switch(l.kind){case 0:L({...n,selfGrammar:n.baseGrammar},r);break;case 1:L(n,r);break;case 2:M(l.ruleName,{...n,repository:t},r);break;case 3:case 4:const e=l.scopeName===n.selfGrammar.scopeName?n.selfGrammar:l.scopeName===n.baseGrammar.scopeName?n.baseGrammar:void 0;if(e){const o={baseGrammar:n.baseGrammar,selfGrammar:e,repository:t};4===l.kind?M(l.ruleName,o,r):L(o,r)}else r.add(4===l.kind?new A(l.scopeName,l.ruleName):new T(l.scopeName))}}}var R=class{kind=0},_=class{kind=1},D=class{constructor(t){this.ruleName=t}kind=2},B=class{constructor(t){this.scopeName=t}kind=3},I=class{constructor(t,n){this.scopeName=t,this.ruleName=n}kind=4};function N(t){if("$base"===t)return new R;if("$self"===t)return new _;const n=t.indexOf("#");if(-1===n)return new B(t);if(0===n)return new D(t.substring(1));{const e=t.substring(0,n),r=t.substring(n+1);return new I(e,r)}}var F=/\\(\d+)/,G=/\\(\d+)/g,j=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,n,e,r){this.$location=t,this.id=n,this._name=e||null,this._nameIsCapturing=i.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=i.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${r(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,n){return this._nameIsCapturing&&null!==this._name&&null!==t&&null!==n?i.replaceCaptures(this._name,t,n):this._name}getContentName(t,n){return this._contentNameIsCapturing&&null!==this._contentName?i.replaceCaptures(this._contentName,t,n):this._contentName}},U=class extends j{retokenizeCapturedWithRuleId;constructor(t,n,e,r,o){super(t,n,e,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,e,r){throw new Error("Not supported!")}},z=class extends j{_match;captures;_cachedCompiledPatterns;constructor(t,n,e,r,o){super(t,n,e,null),this._match=new K(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,e,r){return this._getCachedCompiledPatterns(t).compileAG(t,e,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},q=class extends j{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,e,r,o){super(t,n,e,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const e of this.patterns)t.getRule(e).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,e,r){return this._getCachedCompiledPatterns(t).compileAG(t,e,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},H=class extends j{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,e,r,o,i,l,s,a,u){super(t,n,e,r),this._begin=new K(o,this.id),this.beginCaptures=i,this._end=new K(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=a||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,e,r){return this._getCachedCompiledPatterns(t,n).compileAG(t,e,r)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&this._cachedCompiledPatterns.setSource(this.applyEndPatternLast?this._cachedCompiledPatterns.length()-1:0,n),this._cachedCompiledPatterns}},W=class extends j{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,n,e,r,o,i,l,s,a){super(t,n,e,r),this._begin=new K(o,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=new K(l,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,e,r){return this._getCachedCompiledPatterns(t).compileAG(t,e,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,e,r){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,e,r)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new V,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Y=class t{static createCaptureRule(t,n,e,r,o){return t.registerRule((t=>new U(n,t,e,r,o)))}static getCompiledRuleId(n,r,o){return n.id||r.registerRule((i=>{if(n.id=i,n.match)return new z(n.$vscodeTextmateLocation,n.id,n.name,n.match,t._compileCaptures(n.captures,r,o));if(void 0===n.begin){n.repository&&(o=e({},o,n.repository));let i=n.patterns;return void 0===i&&n.include&&(i=[{include:n.include}]),new q(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,t._compilePatterns(i,r,o))}return n.while?new W(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,t._compileCaptures(n.beginCaptures||n.captures,r,o),n.while,t._compileCaptures(n.whileCaptures||n.captures,r,o),t._compilePatterns(n.patterns,r,o)):new H(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,t._compileCaptures(n.beginCaptures||n.captures,r,o),n.end,t._compileCaptures(n.endCaptures||n.captures,r,o),n.applyEndPatternLast,t._compilePatterns(n.patterns,r,o))})),n.id}static _compileCaptures(n,e,r){let o=[];if(n){let i=0;for(const t in n){if("$vscodeTextmateLocation"===t)continue;const n=parseInt(t,10);n>i&&(i=n)}for(let t=0;t<=i;t++)o[t]=null;for(const i in n){if("$vscodeTextmateLocation"===i)continue;const l=parseInt(i,10);let s=0;n[i].patterns&&(s=t.getCompiledRuleId(n[i],e,r)),o[l]=t.createCaptureRule(e,n[i].$vscodeTextmateLocation,n[i].name,n[i].contentName,s)}}return o}static _compilePatterns(n,e,r){let o=[];if(n)for(let i=0,l=n.length;i<l;i++){const l=n[i];let s=-1;if(l.include){const n=N(l.include);switch(n.kind){case 0:case 1:s=t.getCompiledRuleId(r[l.include],e,r);break;case 2:let o=r[n.ruleName];o&&(s=t.getCompiledRuleId(o,e,r));break;case 3:case 4:const i=4===n.kind?n.ruleName:null,a=e.getExternalGrammar(n.scopeName,r);if(a)if(i){let n=a.repository[i];n&&(s=t.getCompiledRuleId(n,e,a.repository))}else s=t.getCompiledRuleId(a.repository.$self,e,a.repository)}}else s=t.getCompiledRuleId(l,e,r);if(-1!==s){const t=e.getRule(s);let n=!1;if((t instanceof q||t instanceof H||t instanceof W)&&t.hasMissingPatterns&&0===t.patterns.length&&(n=!0),n)continue;o.push(s)}}return{patterns:o,hasMissingPatterns:(n?n.length:0)!==o.length}}},K=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&"string"==typeof t){const n=t.length;let e=0,r=[],o=!1;for(let i=0;i<n;i++)if("\\"===t.charAt(i)&&i+1<n){const n=t.charAt(i+1);"z"===n?(r.push(t.substring(e,i)),r.push("$(?!\\n)(?<!\\n)"),e=i+2):"A"!==n&&"G"!==n||(o=!0),i++}this.hasAnchor=o,0===e?this.source=t:(r.push(t.substring(e,n)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=t;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=n,this.hasBackReferences="string"==typeof this.source&&F.test(this.source)}clone(){return new t(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e=n.map((n=>t.substring(n.start,n.end)));return G.lastIndex=0,this.source.replace(G,((t,n)=>u(e[parseInt(n,10)]||"")))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let t,n,e,r,o=[],i=[],l=[],s=[];for(t=0,n=this.source.length;t<n;t++)e=this.source.charAt(t),o[t]=e,i[t]=e,l[t]=e,s[t]=e,"\\"===e&&t+1<n&&(r=this.source.charAt(t+1),"A"===r?(o[t+1]="",i[t+1]="",l[t+1]="A",s[t+1]="A"):"G"===r?(o[t+1]="",i[t+1]="G",l[t+1]="",s[t+1]="G"):(o[t+1]=r,i[t+1]=r,l[t+1]=r,s[t+1]=r),t++);return{A0_G0:o.join(""),A0_G1:i.join(""),A1_G0:l.join(""),A1_G1:s.join("")}}resolveAnchors(t,n){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},V=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,n){this._items[t].source!==n&&(this._disposeCaches(),this._items[t].setSource(n))}compile(t){if(!this._cached){let n=this._items.map((t=>t.source));this._cached=new J(t,n,this._items.map((t=>t.ruleId)))}return this._cached}compileAG(t,n,e){return this._hasAnchors?n?e?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,n,e)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,n,e)),this._anchorCache.A1_G0):e?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,n,e)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,n,e)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,n,e){let r=this._items.map((t=>t.resolveAnchors(n,e)));return new J(t,r,this._items.map((t=>t.ruleId)))}},J=class{constructor(t,n,e){this.regExps=n,this.rules=e,this.scanner=t.createOnigScanner(n)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const t=[];for(let n=0,e=this.rules.length;n<e;n++)t.push(" - "+this.rules[n]+": "+this.regExps[n]);return t.join("\n")}findNextMatchSync(t,n,e){const r=this.scanner.findNextMatchSync(t,n,e);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},X=class{constructor(t,n){this.languageId=t,this.tokenType=n}},Z=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new X(t,8),this._embeddedLanguagesMatcher=new Q(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(n){return null===n?t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(n)}static _NULL_SCOPE_METADATA=new X(0,0);_getBasicScopeAttributes=new c((t=>{const n=this._scopeToLanguage(t),e=this._toStandardTokenType(t);return new X(n,e)}));_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(n){const e=n.match(t.STANDARD_TOKEN_TYPE_REGEXP);if(!e)return 8;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Q=class{values;scopesRegExp;constructor(t){if(0===t.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const n=t.map((([t,n])=>u(t)));n.sort(),n.reverse(),this.scopesRegExp=new RegExp(`^((${n.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const n=t.match(this.scopesRegExp);return n?this.values.get(n[1]):void 0}};"undefined"!=typeof process&&process;var tt=class{constructor(t,n){this.stack=t,this.stoppedEarly=n}};function nt(t,n,e,r,o,i,l,s){const a=n.content.length;let u=!1,c=-1;if(l){const l=function(t,n,e,r,o,i){let l=o.beginRuleCapturedEOL?0:-1;const s=[];for(let n=o;n;n=n.pop()){const e=n.getRule(t);e instanceof W&&s.push({rule:e,stack:n})}for(let a=s.pop();a;a=s.pop()){const{ruleScanner:s,findOptions:u}=rt(a.rule,t,a.stack.endRule,e,r===l),c=s.findNextMatchSync(n,r,u);if(!c){o=a.stack.pop();break}if(-2!==c.ruleId){o=a.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(i.produce(a.stack,c.captureIndices[0].start),ot(t,n,e,a.stack,i,a.rule.whileCaptures,c.captureIndices),i.produce(a.stack,c.captureIndices[0].end),l=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,e=!1))}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:e}}(t,n,e,r,o,i);o=l.stack,r=l.linePos,e=l.isFirstLine,c=l.anchorPosition}const h=Date.now();for(;!u;){if(0!==s&&Date.now()-h>s)return new tt(o,!0);f()}return new tt(o,!1);function f(){const l=function(t,n,e,r,o,i){const l=function(t,n,e,r,o,i){const l=o.getRule(t),{ruleScanner:s,findOptions:a}=et(l,t,o.endRule,e,r===i),u=s.findNextMatchSync(n,r,a);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}(t,n,e,r,o,i),s=t.getInjections();if(0===s.length)return l;const a=function(t,n,e,r,o,i,l){let s,a=Number.MAX_VALUE,u=null,c=0;const h=i.contentNameScopesList.getScopeNames();for(let i=0,f=t.length;i<f;i++){const f=t[i];if(!f.matcher(h))continue;const d=n.getRule(f.ruleId),{ruleScanner:g,findOptions:p}=et(d,n,null,r,o===l),m=g.findNextMatchSync(e,o,p);if(!m)continue;const y=m.captureIndices[0].start;if(!(y>=a)&&(a=y,u=m.captureIndices,s=m.ruleId,c=f.priority,a===o))break}return u?{priorityMatch:-1===c,captureIndices:u,matchedRuleId:s}:null}(s,t,n,e,r,o,i);if(!a)return l;if(!l)return a;const u=l.captureIndices[0].start,c=a.captureIndices[0].start;return c<u||a.priorityMatch&&c===u?a:l}(t,n,e,r,o,c);if(!l)return i.produce(o,a),void(u=!0);const s=l.captureIndices,h=l.matchedRuleId,f=!!(s&&s.length>0)&&s[0].end>r;if(-1===h){const l=o.getRule(t);i.produce(o,s[0].start),o=o.withContentNameScopesList(o.nameScopesList),ot(t,n,e,o,i,l.endCaptures,s),i.produce(o,s[0].end);const h=o;if(o=o.parent,c=h.getAnchorPos(),!f&&h.getEnterPos()===r)return i.produce(o=h,a),void(u=!0)}else{const l=t.getRule(h);i.produce(o,s[0].start);const d=o,g=l.getName(n.content,s),p=o.contentNameScopesList.pushAttributed(g,t);if(o=o.push(h,r,c,s[0].end===a,null,p,p),l instanceof H){const r=l;ot(t,n,e,o,i,r.beginCaptures,s),i.produce(o,s[0].end),c=s[0].end;const h=r.getContentName(n.content,s),g=p.pushAttributed(h,t);if(o=o.withContentNameScopesList(g),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(n.content,s))),!f&&d.hasSameRuleAs(o))return o=o.pop(),i.produce(o,a),void(u=!0)}else if(l instanceof W){const r=l;ot(t,n,e,o,i,r.beginCaptures,s),i.produce(o,s[0].end),c=s[0].end;const h=r.getContentName(n.content,s),g=p.pushAttributed(h,t);if(o=o.withContentNameScopesList(g),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(n.content,s))),!f&&d.hasSameRuleAs(o))return o=o.pop(),i.produce(o,a),void(u=!0)}else if(ot(t,n,e,o,i,l.captures,s),i.produce(o,s[0].end),o=o.pop(),!f)return o=o.safePop(),i.produce(o,a),void(u=!0)}s[0].end>r&&(r=s[0].end,e=!1)}}function et(t,n,e,r,o){return{ruleScanner:t.compileAG(n,e,r,o),findOptions:0}}function rt(t,n,e,r,o){return{ruleScanner:t.compileWhileAG(n,e,r,o),findOptions:0}}function ot(t,n,e,r,o,i,l){if(0===i.length)return;const s=n.content,a=Math.min(i.length,l.length),u=[],c=l[0].end;for(let n=0;n<a;n++){const a=i[n];if(null===a)continue;const h=l[n];if(0===h.length)continue;if(h.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),a.retokenizeCapturedWithRuleId){const n=a.getName(s,l),i=r.contentNameScopesList.pushAttributed(n,t),u=a.getContentName(s,l),c=i.pushAttributed(u,t),f=r.push(a.retokenizeCapturedWithRuleId,h.start,-1,!1,null,i,c),d=t.createOnigString(s.substring(0,h.end));nt(t,d,e&&0===h.start,h.start,f,o,!1,0),x(d);continue}const f=a.getName(s,l);if(null!==f){const n=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(f,t);u.push(new it(n,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var it=class{scopes;endPos;constructor(t,n){this.scopes=t,this.endPos=n}};function lt(t,n,e,r,o){const i=S(n,st),l=Y.getCompiledRuleId(e,r,o.repository);for(const e of i)t.push({debugSelector:n,matcher:e.matcher,ruleId:l,grammar:o,priority:e.priority})}function st(t,n){if(n.length<t.length)return!1;let e=0;return t.every((t=>{for(let r=e;r<n.length;r++)if(at(n[r],t))return e=r+1,!0;return!1}))}function at(t,n){if(!t)return!1;if(t===n)return!0;const e=n.length;return t.length>e&&t.substr(0,e)===n&&"."===t[e]}var ut=class{constructor(t,n,e,r,o,i,l,s){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=s,this._basicScopeAttributesProvider=new Z(e,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=ct(n,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const t of Object.keys(o)){const n=S(t,st);for(const e of n)this._tokenTypeMatchers.push({matcher:e.matcher,type:o[t]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t=[],n=this._rootScopeName,e=(t=>t===this._rootScopeName?this._grammar:this.getExternalGrammar(t))(n);if(e){const r=e.injections;if(r)for(let n in r)lt(t,n,r[n],this,e);const o=this._grammarRepository.injections(n);o&&o.forEach((n=>{const e=this.getExternalGrammar(n);if(e){const n=e.injectionSelector;n&<(t,n,e,this,e)}}))}return t.sort(((t,n)=>t.priority-n.priority)),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const n=++this._lastRuleId,e=t(n);return this._ruleId2desc[n]=e,e}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,n){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const e=this._grammarRepository.lookup(t);if(e)return this._includedGrammars[t]=ct(e,n&&n.$base),this._includedGrammars[t]}}tokenizeLine(t,n,e=0){const r=this._tokenize(t,n,!1,e);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,n,e=0){const r=this._tokenize(t,n,!0,e);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,n,e,r){let o;if(-1===this._rootId&&(this._rootId=Y.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),n&&n!==ft.NULL)o=!1,n.reset();else{o=!0;const t=this._basicScopeAttributesProvider.getDefaultAttributes(),e=this.themeProvider.getDefaults(),r=v.set(0,t.languageId,t.tokenType,null,e.fontStyle,e.foregroundId,e.backgroundId),i=this.getRule(this._rootId).getName(null,null);let l;l=i?ht.createRootAndLookUpScopeName(i,r,this):ht.createRoot("unknown",r),n=new ft(null,this._rootId,-1,-1,!1,null,l,l)}const i=this.createOnigString(t+="\n"),l=i.content.length,s=new gt(e,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=nt(this,i,o,0,n,s,!0,r);return x(i),{lineLength:l,lineTokens:s,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function ct(t,e){return(t=n(t)).repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ht=class t{constructor(t,n,e){this.parent=t,this.scopePath=n,this.tokenAttributes=e}static fromExtension(n,e){let r=n,o=n?.scopePath??null;for(const n of e)o=f.push(o,n.scopeNames),r=new t(r,o,n.encodedTokenAttributes);return r}static createRoot(n,e){return new t(null,new f(null,n),e)}static createRootAndLookUpScopeName(n,e,r){const o=r.getMetadataForScope(n),i=new f(null,n),l=r.themeProvider.themeMatch(i),s=t.mergeAttributes(e,o,l);return new t(null,i,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(n){return t.equals(this,n)}static equals(t,n){for(;;){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n)return!1;if(t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}}static mergeAttributes(t,n,e){let r=-1,o=0,i=0;return null!==e&&(r=e.fontStyle,o=e.foregroundId,i=e.backgroundId),v.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(n,e){if(null===n)return this;if(-1===n.indexOf(" "))return t._pushAttributed(this,n,e);const r=n.split(/ /g);let o=this;for(const n of r)o=t._pushAttributed(o,n,e);return o}static _pushAttributed(n,e,r){const o=r.getMetadataForScope(e),i=n.scopePath.push(e),l=r.themeProvider.themeMatch(i),s=t.mergeAttributes(n.tokenAttributes,o,l);return new t(n,i,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let e=this;for(;e&&e!==t;)n.push({encodedTokenAttributes:e.tokenAttributes,scopeNames:e.scopePath.getExtensionIfDefined(e.parent?.scopePath??null)}),e=e.parent;return e===t?n.reverse():void 0}},ft=class t{constructor(t,n,e,r,o,i,l,s){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=e,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(n){return null!==n&&t._equals(this,n)}static _equals(t,n){return t===n||!!this._structuralEquals(t,n)&&ht.equals(t.contentNameScopesList,n.contentNameScopesList)}static _structuralEquals(t,n){for(;;){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n)return!1;if(t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(n,e,r,o,i,l,s){return new t(this,n,e,r,o,i,l,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(n){return this.endRule===n?this:new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,n,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(n,e){const r=ht.fromExtension(n?.nameScopesList??null,e.nameScopesList);return new t(n,e.ruleId,e.enterPos??-1,e.anchorPos??-1,e.beginRuleCapturedEOL,e.endRule,r,ht.fromExtension(r,e.contentNameScopesList))}},dt=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,n){this.balancedBracketScopes=t.flatMap((t=>"*"===t?(this.allowAny=!0,[]):S(t,st).map((t=>t.matcher)))),this.unbalancedBracketScopes=n.flatMap((t=>S(t,st).map((t=>t.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(t){for(const n of this.unbalancedBracketScopes)if(n(t))return!1;for(const n of this.balancedBracketScopes)if(n(t))return!0;return this.allowAny}},gt=class{constructor(t,n,e,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=e,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,n){this.produceFromScopes(t.contentNameScopesList,n)}produceFromScopes(t,n){if(this._lastTokenEndIndex>=n)return;if(this._emitBinaryTokens){let e=t?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const n=t?.getScopeNames()??[];for(const t of this._tokenTypeOverrides)t.matcher(n)&&(e=v.set(e,0,t.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(n))}return r&&(e=v.set(e,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===e||(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(e)),void(this._lastTokenEndIndex=n)}const e=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:n,scopes:e}),this._lastTokenEndIndex=n}getResult(t,n){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===n-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,n){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===n-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._binaryTokens[this._binaryTokens.length-2]=0);const e=new Uint32Array(this._binaryTokens.length);for(let t=0,n=this._binaryTokens.length;t<n;t++)e[t]=this._binaryTokens[t];return e}},pt=class{constructor(t,n){this._onigLib=n,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,n){this._rawGrammars.set(t.scopeName,t),n&&this._injectionGrammars.set(t.scopeName,n)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,n,e,r,o){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,function(t,n,e,r,o,i,l,s){return new ut(t,n,e,r,o,i,l,s)}(t,i,n,e,r,o,this,this._onigLib))}return this._grammars.get(t)}},mt=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new pt(h.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(h.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,e){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:e})}loadGrammarWithConfiguration(t,n,e){return this._loadGrammar(t,n,e.embeddedLanguages,e.tokenTypes,new dt(e.balancedBracketSelectors||[],e.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,e,r,o){const i=new O(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map((t=>this._loadSingleGrammar(t.scopeName))),i.processQueue();return this._grammarForScopeName(t,n,e,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const e="function"==typeof this._options.getInjections?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,e)}}addGrammar(t,n=[],e=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,e,r)}_grammarForScopeName(t,n=0,e=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,e,r,o)}},yt=ft.NULL;const bt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class wt{constructor(t,n,e){this.normal=n,this.property=t,e&&(this.space=e)}}function kt(t,n){const e={},r={};for(const n of t)Object.assign(e,n.property),Object.assign(r,n.normal);return new wt(e,r,n)}function vt(t){return t.toLowerCase()}wt.prototype.normal={},wt.prototype.property={},wt.prototype.space=void 0;class St{constructor(t,n){this.attribute=n,this.property=t}}St.prototype.attribute="",St.prototype.booleanish=!1,St.prototype.boolean=!1,St.prototype.commaOrSpaceSeparated=!1,St.prototype.commaSeparated=!1,St.prototype.defined=!1,St.prototype.mustUseProperty=!1,St.prototype.number=!1,St.prototype.overloadedBoolean=!1,St.prototype.property="",St.prototype.spaceSeparated=!1,St.prototype.space=void 0;let Ct=0;const xt=Lt(),Tt=Lt(),At=Lt(),Et=Lt(),Ot=Lt(),Pt=Lt(),Mt=Lt();function Lt(){return 2**++Ct}var $t=Object.freeze({__proto__:null,boolean:xt,booleanish:Tt,commaOrSpaceSeparated:Mt,commaSeparated:Pt,number:Et,overloadedBoolean:At,spaceSeparated:Ot});const Rt=Object.keys($t);class _t extends St{constructor(t,n,e,r){let o=-1;if(super(t,n),Dt(this,"space",r),"number"==typeof e)for(;++o<Rt.length;){const t=Rt[o];Dt(this,Rt[o],(e&$t[t])===$t[t])}}}function Dt(t,n,e){e&&(t[n]=e)}function Bt(t){const n={},e={};for(const[r,o]of Object.entries(t.properties)){const i=new _t(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),n[r]=i,e[vt(r)]=r,e[vt(i.attribute)]=r}return new wt(n,e,t.space)}_t.prototype.defined=!0;const It=Bt({properties:{ariaActiveDescendant:null,ariaAtomic:Tt,ariaAutoComplete:null,ariaBusy:Tt,ariaChecked:Tt,ariaColCount:Et,ariaColIndex:Et,ariaColSpan:Et,ariaControls:Ot,ariaCurrent:null,ariaDescribedBy:Ot,ariaDetails:null,ariaDisabled:Tt,ariaDropEffect:Ot,ariaErrorMessage:null,ariaExpanded:Tt,ariaFlowTo:Ot,ariaGrabbed:Tt,ariaHasPopup:null,ariaHidden:Tt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ot,ariaLevel:Et,ariaLive:null,ariaModal:Tt,ariaMultiLine:Tt,ariaMultiSelectable:Tt,ariaOrientation:null,ariaOwns:Ot,ariaPlaceholder:null,ariaPosInSet:Et,ariaPressed:Tt,ariaReadOnly:Tt,ariaRelevant:null,ariaRequired:Tt,ariaRoleDescription:Ot,ariaRowCount:Et,ariaRowIndex:Et,ariaRowSpan:Et,ariaSelected:Tt,ariaSetSize:Et,ariaSort:null,ariaValueMax:Et,ariaValueMin:Et,ariaValueNow:Et,ariaValueText:null,role:null},transform:(t,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function Nt(t,n){return n in t?t[n]:n}function Ft(t,n){return Nt(t,n.toLowerCase())}const Gt=Bt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,acceptCharset:Ot,accessKey:Ot,action:null,allow:null,allowFullScreen:xt,allowPaymentRequest:xt,allowUserMedia:xt,alpha:xt,alt:null,as:null,async:xt,autoCapitalize:null,autoComplete:Ot,autoFocus:xt,autoPlay:xt,blocking:Ot,capture:null,charSet:null,checked:xt,cite:null,className:Ot,closedBy:null,colorSpace:null,cols:Et,colSpan:Et,command:null,commandFor:null,content:null,contentEditable:Tt,controls:xt,controlsList:Ot,coords:Et|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:xt,defer:xt,dir:null,dirName:null,disabled:xt,download:At,draggable:Tt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:xt,formTarget:null,headers:Ot,height:Et,hidden:At,high:Et,href:null,hrefLang:null,htmlFor:Ot,httpEquiv:Ot,id:null,imageSizes:null,imageSrcSet:null,inert:xt,inputMode:null,integrity:null,is:null,isMap:xt,itemId:null,itemProp:Ot,itemRef:Ot,itemScope:xt,itemType:Ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:xt,low:Et,manifest:null,max:null,maxLength:Et,media:null,method:null,min:null,minLength:Et,multiple:xt,muted:xt,name:null,nonce:null,noModule:xt,noValidate:xt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:xt,optimum:Et,pattern:null,ping:Ot,placeholder:null,playsInline:xt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:xt,referrerPolicy:null,rel:Ot,required:xt,reversed:xt,rows:Et,rowSpan:Et,sandbox:Ot,scope:null,scoped:xt,seamless:xt,selected:xt,shadowRootClonable:xt,shadowRootCustomElementRegistry:xt,shadowRootDelegatesFocus:xt,shadowRootMode:null,shadowRootSerializable:xt,shape:null,size:Et,sizes:null,slot:null,span:Et,spellCheck:Tt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Et,step:null,style:null,tabIndex:Et,target:null,title:null,translate:null,type:null,typeMustMatch:xt,useMap:null,value:Tt,width:Et,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ot,axis:null,background:null,bgColor:null,border:Et,borderColor:null,bottomMargin:Et,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:xt,declare:xt,event:null,face:null,frame:null,frameBorder:null,hSpace:Et,leftMargin:Et,link:null,longDesc:null,lowSrc:null,marginHeight:Et,marginWidth:Et,noResize:xt,noHref:xt,noShade:xt,noWrap:xt,object:null,profile:null,prompt:null,rev:null,rightMargin:Et,rules:null,scheme:null,scrolling:Tt,standby:null,summary:null,text:null,topMargin:Et,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Et,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:xt,disablePictureInPicture:xt,disableRemotePlayback:xt,exportParts:Pt,part:Ot,prefix:null,property:null,results:Et,security:null,unselectable:null},space:"html",transform:Ft}),jt=Bt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Mt,accentHeight:Et,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Et,amplitude:Et,arabicForm:null,ascent:Et,attributeName:null,attributeType:null,azimuth:Et,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Et,by:null,calcMode:null,capHeight:Et,className:Ot,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Et,diffuseConstant:Et,direction:null,display:null,dur:null,divisor:Et,dominantBaseline:null,download:xt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Et,enableBackground:null,end:null,event:null,exponent:Et,externalResourcesRequired:null,fill:null,fillOpacity:Et,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pt,g2:Pt,glyphName:Pt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Et,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Et,horizOriginX:Et,horizOriginY:Et,id:null,ideographic:Et,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Et,k:Et,k1:Et,k2:Et,k3:Et,k4:Et,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Et,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Et,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Et,overlineThickness:Et,paintOrder:null,panose1:null,path:null,pathLength:Et,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Et,pointsAtY:Et,pointsAtZ:Et,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Et,specularExponent:Et,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Et,strikethroughThickness:Et,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Et,strokeOpacity:Et,strokeWidth:null,style:null,surfaceScale:Et,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:Et,tableValues:null,target:null,targetX:Et,targetY:Et,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Et,underlineThickness:Et,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Et,values:null,vAlphabetic:Et,vMathematical:Et,vectorEffect:null,vHanging:Et,vIdeographic:Et,version:null,vertAdvY:Et,vertOriginX:Et,vertOriginY:Et,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Et,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nt}),Ut=Bt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(t,n)=>"xlink:"+n.slice(5).toLowerCase()}),zt=Bt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ft}),qt=Bt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(t,n)=>"xml:"+n.slice(3).toLowerCase()}),Ht=/[A-Z]/g,Wt=/-[a-z]/g,Yt=/^data[-\w.:]+$/i;function Kt(t){return"-"+t.toLowerCase()}function Vt(t){return t.charAt(1).toUpperCase()}const Jt=kt([It,Gt,Ut,zt,qt],"html"),Xt=kt([It,jt,Ut,zt,qt],"svg"),Zt={}.hasOwnProperty,Qt=/["&'<>`]/g,tn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,nn=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,en=/[|\\{}()[\]^$+*?.]/g,rn=new WeakMap;const on=/[\dA-Fa-f]/,ln=/\d/,sn=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],an={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},un=["cent","copy","divide","gt","lt","not","para","times"],cn={}.hasOwnProperty,hn={};let fn;for(fn in an)cn.call(an,fn)&&(hn[an[fn]]=fn);const dn=/[^\dA-Za-z]/;function gn(t,n,e){let r,o=function(t,n,e){const r="&#x"+t.toString(16).toUpperCase();return e&&n&&!on.test(String.fromCharCode(n))?r:r+";"}(t,n,e.omitOptionalSemicolons);if((e.useNamedReferences||e.useShortestReferences)&&(r=function(t,n,e,r){const o=String.fromCharCode(t);if(cn.call(hn,o)){const t=hn[o],i="&"+t;return e&&sn.includes(t)&&!un.includes(t)&&(!r||n&&61!==n&&dn.test(String.fromCharCode(n)))?i:i+";"}return""}(t,n,e.omitOptionalSemicolons,e.attribute)),(e.useShortestReferences||!r)&&e.useShortestReferences){const r=function(t,n,e){const r="&#"+String(t);return e&&n&&!ln.test(String.fromCharCode(n))?r:r+";"}(t,n,e.omitOptionalSemicolons);r.length<o.length&&(o=r)}return r&&(!e.useShortestReferences||r.length<o.length)?r:o}function pn(t,n){return function(t,n){return t=t.replace(n.subset?function(t){let n=rn.get(t);return n||(n=function(t){const n=[];let e=-1;for(;++e<t.length;)n.push(t[e].replace(en,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}(t),rn.set(t,n)),n}(n.subset):Qt,e),n.subset||n.escapeOnly?t:t.replace(tn,(function(t,e,r){return n.format(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536,r.charCodeAt(e+2),n)})).replace(nn,e);function e(t,e,r){return n.format(t.charCodeAt(0),r.charCodeAt(e+1),n)}}(t,Object.assign({format:gn},n))}const mn=/^>|^->|<!--|-->|--!>|<!-$/g,yn=[">"],bn=["<",">"];function wn(t,n){const e=String(t);if("string"!=typeof n)throw new TypeError("Expected character");let r=0,o=e.indexOf(n);for(;-1!==o;)r++,o=e.indexOf(n,o+n.length);return r}function kn(t,n){const e=n||{};return(""===t[t.length-1]?[...t,""]:t).join((e.padRight?" ":"")+","+(!1===e.padLeft?"":" ")).trim()}function vn(t){return t.join(" ").trim()}const Sn=/[ \t\n\f\r]/g;function Cn(t){return"object"==typeof t?"text"===t.type&&xn(t.value):xn(t)}function xn(t){return""===t.replace(Sn,"")}const Tn=On(1),An=On(-1),En=[];function On(t){return function(n,e,r){const o=n?n.children:En;let i=(e||0)+t,l=o[i];if(!r)for(;l&&Cn(l);)i+=t,l=o[i];return l}}const Pn={}.hasOwnProperty;function Mn(t){return function(n,e,r){return Pn.call(t,n.tagName)&&t[n.tagName](n,e,r)}}const Ln=Mn({body:function(t,n,e){const r=Tn(e,n);return!r||"comment"!==r.type},caption:$n,colgroup:$n,dd:function(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(t,n,e){const r=Tn(e,n);return Boolean(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:$n,html:function(t,n,e){const r=Tn(e,n);return!r||"comment"!==r.type},li:function(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(t,n,e){const r=Tn(e,n);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!e||!("element"===e.type&&("a"===e.tagName||"audio"===e.tagName||"del"===e.tagName||"ins"===e.tagName||"map"===e.tagName||"noscript"===e.tagName||"video"===e.tagName))},rp:Rn,rt:Rn,tbody:function(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:_n,tfoot:function(t,n,e){return!Tn(e,n)},th:_n,thead:function(t,n,e){const r=Tn(e,n);return Boolean(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&"tr"===r.tagName}});function $n(t,n,e){const r=Tn(e,n,!0);return!r||"comment"!==r.type&&!("text"===r.type&&Cn(r.value.charAt(0)))}function Rn(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function _n(t,n,e){const r=Tn(e,n);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}const Dn=Mn({body:function(t){const n=Tn(t,-1,!0);return!(n&&("comment"===n.type||"text"===n.type&&Cn(n.value.charAt(0))||"element"===n.type&&("meta"===n.tagName||"link"===n.tagName||"script"===n.tagName||"style"===n.tagName||"template"===n.tagName)))},colgroup:function(t,n,e){const r=An(e,n),o=Tn(t,-1,!0);return!(e&&r&&"element"===r.type&&"colgroup"===r.tagName&&Ln(r,e.children.indexOf(r),e))&&Boolean(o&&"element"===o.type&&"col"===o.tagName)},head:function(t){const n=new Set;for(const e of t.children)if("element"===e.type&&("base"===e.tagName||"title"===e.tagName)){if(n.has(e.tagName))return!1;n.add(e.tagName)}const e=t.children[0];return!e||"element"===e.type},html:function(t){const n=Tn(t,-1);return!n||"comment"!==n.type},tbody:function(t,n,e){const r=An(e,n),o=Tn(t,-1);return(!e||!r||"element"!==r.type||"thead"!==r.tagName&&"tbody"!==r.tagName||!Ln(r,e.children.indexOf(r),e))&&Boolean(o&&"element"===o.type&&"tr"===o.tagName)}}),Bn={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function In(t,n,e){const r=function(t,n){const e=vt(n);let r=n,o=St;if(e in t.normal)return t.property[t.normal[e]];if(e.length>4&&"data"===e.slice(0,4)&&Yt.test(n)){if("-"===n.charAt(4)){const t=n.slice(5).replace(Wt,Vt);r="data"+t.charAt(0).toUpperCase()+t.slice(1)}else{const t=n.slice(4);if(!Wt.test(t)){let e=t.replace(Ht,Kt);"-"!==e.charAt(0)&&(e="-"+e),n="data"+e}}o=_t}return new o(r,n)}(t.schema,n),o=t.settings.allowParseErrors&&"html"===t.schema.space?0:1,i=t.settings.allowDangerousCharacters?0:1;let l,s=t.quote;if(!r.overloadedBoolean||e!==r.attribute&&""!==e?!r.boolean&&!r.overloadedBoolean||"string"==typeof e&&e!==r.attribute&&""!==e||(e=Boolean(e)):e=!0,null==e||!1===e||"number"==typeof e&&Number.isNaN(e))return"";const a=pn(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Bn.name[o][i]}));return!0===e?a:(e=Array.isArray(e)?(r.commaSeparated?kn:vn)(e,{padLeft:!t.settings.tightCommaSeparatedLists}):String(e),t.settings.collapseEmptyAttributes&&!e?a:(t.settings.preferUnquoted&&(l=pn(e,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Bn.unquoted[o][i]}))),l!==e&&(t.settings.quoteSmart&&wn(e,s)>wn(e,t.alternative)&&(s=t.alternative),l=s+pn(e,Object.assign({},t.settings.characterReferences,{subset:("'"===s?Bn.single:Bn.double)[o][i],attribute:!0}))+s),a+(l?"="+l:l)))}const Nn=["<","&"];function Fn(t,n,e,r){return!e||"element"!==e.type||"script"!==e.tagName&&"style"!==e.tagName?pn(t.value,Object.assign({},r.settings.characterReferences,{subset:Nn})):t.value}const Gn=function(t,n){const e=n||{};function r(n,...e){let o=r.invalid;const i=r.handlers;if(n&&Zt.call(n,t)){const e=String(n[t]);o=Zt.call(i,e)?i[e]:r.unknown}if(o)return o.call(this,n,...e)}return r.handlers=e.handlers||{},r.invalid=e.invalid,r.unknown=e.unknown,r}("type",{invalid:function(t){throw new Error("Expected node, not `"+t+"`")},unknown:function(t){throw new Error("Cannot compile unknown node `"+t.type+"`")},handlers:{comment:function(t,n,e,r){return r.settings.bogusComments?"<?"+pn(t.value,Object.assign({},r.settings.characterReferences,{subset:yn}))+">":"\x3c!--"+t.value.replace(mn,(function(t){return pn(t,Object.assign({},r.settings.characterReferences,{subset:bn}))}))+"--\x3e"},doctype:function(t,n,e,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(t,n,e,r){const o=r.schema,i="svg"!==o.space&&r.settings.omitOptionalTags;let l="svg"===o.space?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const s=[];let a;"html"===o.space&&"svg"===t.tagName&&(r.schema=Xt);const u=function(t,n){const e=[];let r,o=-1;if(n)for(r in n)if(null!=n[r]){const o=In(t,r,n[r]);o&&e.push(o)}for(;++o<e.length;){const n=t.settings.tightAttributes?e[o].charAt(e[o].length-1):void 0;o!==e.length-1&&'"'!==n&&"'"!==n&&(e[o]+=" ")}return e.join("")}(r,t.properties),c=r.all("html"===o.space&&"template"===t.tagName?t.content:t);return r.schema=o,c&&(l=!1),!u&&i&&Dn(t,n,e)||(s.push("<",t.tagName,u?" "+u:""),l&&("svg"===o.space||r.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!r.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&s.push(" "),s.push("/")),s.push(">")),s.push(c),l||i&&Ln(t,n,e)||s.push("</"+t.tagName+">"),s.join("")},raw:function(t,n,e,r){return r.settings.allowDangerousHtml?t.value:Fn(t,0,e,r)},root:function(t,n,e,r){return r.all(t)},text:Fn}}),jn={},Un={},zn=[];function qn(t,n,e){return Gn(t,n,e,this)}function Hn(t){const n=[],e=t&&t.children||zn;let r=-1;for(;++r<e.length;)n[r]=this.one(e[r],r,t);return n.join("")}function Wn(t,n){const e="string"==typeof t?{}:{...t.colorReplacements},r="string"==typeof t?t:t.name;for(const[t,o]of Object.entries(n?.colorReplacements||{}))"string"==typeof o?e[t]=o:t===r&&Object.assign(e,o);return e}function Yn(t,n){return t&&n?.[t?.toLowerCase()]||t}function Kn(t){return Array.isArray(t)?t:[t]}async function Vn(t){return Promise.resolve("function"==typeof t?t():t).then((t=>t.default||t))}function Jn(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Xn(t){return"ansi"===t||Jn(t)}function Zn(t){return"none"===t}function Qn(t){return Zn(t)}function te(t,n){if(!n)return t;t.properties||={},t.properties.class||=[],"string"==typeof t.properties.class&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const e=Array.isArray(n)?n:n.split(/\s+/g);for(const n of e)n&&!t.properties.class.includes(n)&&t.properties.class.push(n);return t}function ne(t,n=!1){if(0===t.length)return[["",0]];const e=t.split(/(\r?\n)/g);let r=0;const o=[];for(let t=0;t<e.length;t+=2)o.push([n?e[t]+(e[t+1]||""):e[t],r]),r+=e[t].length,r+=e[t+1]?.length||0;return o}function ee(t){const n=ne(t,!0).map((([t])=>t));return{lines:n,indexToPos:function(e){if(e===t.length)return{line:n.length-1,character:n[n.length-1].length};let r=e,o=0;for(const t of n){if(r<t.length)break;r-=t.length,o++}return{line:o,character:r}},posToIndex:function(t,e){let r=0;for(let e=0;e<t;e++)r+=n[e].length;return r+=e,r}}}function re(t,n,e){const r=new Set;for(const n of t.matchAll(/:?lang=["']([^"']+)["']/g)){const t=n[1].toLowerCase().trim();t&&r.add(t)}for(const n of t.matchAll(/(?:```|~~~)([\w-]+)/g)){const t=n[1].toLowerCase().trim();t&&r.add(t)}for(const n of t.matchAll(/\\begin\{([\w-]+)\}/g)){const t=n[1].toLowerCase().trim();t&&r.add(t)}for(const n of t.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const t=n[1].toLowerCase().trim(),e=t.includes("/")?t.split("/").pop():t;e&&r.add(e)}if(!e)return Array.from(r);const o=e.getBundledLanguages();return Array.from(r).filter((t=>t&&o[t]))}const oe="light-dark()",ie=["color","background-color"];function le(t,n){let e=0;const r=[];for(const o of n)o>e&&r.push({...t,content:t.content.slice(e,o),offset:t.offset+e}),e=o;return e<t.content.length&&r.push({...t,content:t.content.slice(e),offset:t.offset+e}),r}function se(t,n){const e=Array.from(n instanceof Set?n:new Set(n)).sort(((t,n)=>t-n));return e.length?t.map((t=>t.flatMap((t=>{const n=e.filter((n=>t.offset<n&&n<t.offset+t.content.length)).map((n=>n-t.offset)).sort(((t,n)=>t-n));return n.length?le(t,n):t})))):t}function ae(n,e,r,o,i="css-vars"){const l={content:n.content,explanation:n.explanation,offset:n.offset},s=e.map((t=>ue(n.variants[t]))),a=new Set(s.flatMap((t=>Object.keys(t)))),u={},c=(t,n)=>r+e[t]+("color"===n||"color"===n?"":"background-color"===n?"-bg":`-${n}`);return s.forEach(((n,r)=>{for(const l of a){const a=n[l]||"inherit";if(0===r&&o&&ie.includes(l))if(o===oe&&s.length>1){const n=e.findIndex((t=>"light"===t)),o=e.findIndex((t=>"dark"===t));if(-1===n||-1===o)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');u[l]=`light-dark(${s[n][l]||"inherit"}, ${s[o][l]||"inherit"})`,"css-vars"===i&&(u[c(r,l)]=a)}else u[l]=a;else"css-vars"===i&&(u[c(r,l)]=a)}})),l.htmlStyle=u,l}function ue(t){const n={};if(t.color&&(n.color=t.color),t.bgColor&&(n["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&m.Italic&&(n["font-style"]="italic"),t.fontStyle&m.Bold&&(n["font-weight"]="bold");const e=[];t.fontStyle&m.Underline&&e.push("underline"),t.fontStyle&m.Strikethrough&&e.push("line-through"),e.length&&(n["text-decoration"]=e.join(" "))}return n}function ce(t){return"string"==typeof t?t:Object.entries(t).map((([t,n])=>`${t}:${n}`)).join(";")}const he=new WeakMap;function fe(t,n){he.set(t,n)}function de(t){return he.get(t)}class ge{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new ge(Object.fromEntries(Kn(n).map((t=>[t,yt]))),t)}constructor(...t){if(2===t.length){const[n,e]=t;this.lang=e,this._stacks=n}else{const[n,e,r]=t;this.lang=e,this._stacks={[r]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return function(t){const n=[],e=new Set;return function t(r){if(e.has(r))return;e.add(r);const o=r?.nameScopesList?.scopeName;o&&n.push(o),r.parent&&t(r.parent)}(t),n}(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function pe(){const n=new WeakMap;function e(e){if(!n.has(e.meta)){let r=function(n){if("number"==typeof n){if(n<0||n>e.source.length)throw new t(`Invalid decoration offset: ${n}. Code length: ${e.source.length}`);return{...o.indexToPos(n),offset:n}}{const e=o.lines[n.line];if(void 0===e)throw new t(`Invalid decoration position ${JSON.stringify(n)}. Lines length: ${o.lines.length}`);let r=n.character;if(r<0&&(r=e.length+r),r<0||r>e.length)throw new t(`Invalid decoration position ${JSON.stringify(n)}. Line ${n.line} length: ${e.length}`);return{...n,character:r,offset:o.posToIndex(n.line,r)}}};const o=ee(e.source),i=(e.options.decorations||[]).map((t=>({...t,start:r(t.start),end:r(t.end)})));!function(n){for(let e=0;e<n.length;e++){const r=n[e];if(r.start.offset>r.end.offset)throw new t(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let o=e+1;o<n.length;o++){const e=n[o],i=r.start.offset<=e.start.offset&&e.start.offset<r.end.offset,l=r.start.offset<e.end.offset&&e.end.offset<=r.end.offset,s=e.start.offset<=r.start.offset&&r.start.offset<e.end.offset,a=e.start.offset<r.end.offset&&r.end.offset<=e.end.offset;if(i||l||s||a){if(i&&l)continue;if(s&&a)continue;if(s&&r.start.offset===r.end.offset)continue;if(l&&e.start.offset===e.end.offset)continue;throw new t(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(e.start)} intersect.`)}}}}(i),n.set(e.meta,{decorations:i,converter:o,source:e.source})}return n.get(e.meta)}return{name:"shiki:decorations",tokens(t){if(this.options.decorations?.length)return se(t,e(this).decorations.flatMap((t=>[t.start.offset,t.end.offset])))},code(n){if(!this.options.decorations?.length)return;const r=e(this),o=Array.from(n.children).filter((t=>"element"===t.type&&"span"===t.tagName));if(o.length!==r.converter.lines.length)throw new t(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(n,e,r,i){const l=o[n];let a="",u=-1,c=-1;if(0===e&&(u=0),0===r&&(c=0),r===Number.POSITIVE_INFINITY&&(c=l.children.length),-1===u||-1===c)for(let t=0;t<l.children.length;t++)a+=me(l.children[t]),-1===u&&a.length===e&&(u=t+1),-1===c&&a.length===r&&(c=t+1);if(-1===u)throw new t(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===c)throw new t(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);const h=l.children.slice(u,c);if(i.alwaysWrap||h.length!==l.children.length)if(i.alwaysWrap||1!==h.length||"element"!==h[0].type){const t={type:"element",tagName:"span",properties:{},children:h};s(t,i,"wrapper"),l.children.splice(u,h.length,t)}else s(h[0],i,"token");else s(l,i,"line")}function l(t,n){o[t]=s(o[t],n,"line")}function s(t,n,e){const r=n.properties||{},o=n.transform||(t=>t);return t.tagName=n.tagName||"span",t.properties={...t.properties,...r,class:t.properties.class},n.properties?.class&&te(t,n.properties.class),o(t,e)||t}const a=[],u=r.decorations.sort(((t,n)=>n.start.offset-t.start.offset||t.end.offset-n.end.offset));for(const t of u){const{start:n,end:e}=t;if(n.line===e.line)i(n.line,n.character,e.character,t);else if(n.line<e.line){i(n.line,n.character,Number.POSITIVE_INFINITY,t);for(let r=n.line+1;r<e.line;r++)a.unshift((()=>l(r,t)));i(e.line,0,e.character,t)}}a.forEach((t=>t()))}}}function me(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(me).join(""):""}const ye=[pe()];function be(t){const n=function(t){const n=[],e=[],r=[];for(const o of t)switch(o.enforce){case"pre":n.push(o);break;case"post":e.push(o);break;default:r.push(o)}return{pre:n,post:e,normal:r}}(t.transformers||[]);return[...n.pre,...n.normal,...n.post,...ye]}var we=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ke={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ve(t,n){const e=t.indexOf("",n);if(-1!==e&&"["===t[e+1]){const n=t.indexOf("m",e);if(-1!==n)return{sequence:t.substring(e+2,n).split(";"),startPosition:e,position:n+1}}return{position:t.length}}function Se(t){const n=t.shift();if("2"===n){const n=t.splice(0,3).map((t=>Number.parseInt(t)));if(3!==n.length||n.some((t=>Number.isNaN(t))))return;return{type:"rgb",rgb:n}}if("5"===n){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Ce(t){const n=[];for(;t.length>0;){const e=t.shift();if(!e)continue;const r=Number.parseInt(e);if(!Number.isNaN(r))if(0===r)n.push({type:"resetAll"});else if(r<=9)ke[r]&&n.push({type:"setDecoration",value:ke[r]});else if(r<=29){const t=ke[r-20];t&&(n.push({type:"resetDecoration",value:t}),"dim"===t&&n.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)n.push({type:"setForegroundColor",value:{type:"named",name:we[r-30]}});else if(38===r){const e=Se(t);e&&n.push({type:"setForegroundColor",value:e})}else if(39===r)n.push({type:"resetForegroundColor"});else if(r<=47)n.push({type:"setBackgroundColor",value:{type:"named",name:we[r-40]}});else if(48===r){const e=Se(t);e&&n.push({type:"setBackgroundColor",value:e})}else 49===r?n.push({type:"resetBackgroundColor"}):53===r?n.push({type:"setDecoration",value:"overline"}):55===r?n.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?n.push({type:"setForegroundColor",value:{type:"named",name:we[r-90+8]}}):r>=100&&r<=107&&n.push({type:"setBackgroundColor",value:{type:"named",name:we[r-100+8]}})}return n}var xe={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Te(t=xe){function n(n){return t[n]}function e(t){return`#${t.map((t=>Math.max(0,Math.min(t,255)).toString(16).padStart(2,"0"))).join("")}`}let r;return{value:function(t){switch(t.type){case"named":return n(t.name);case"rgb":return e(t.rgb);case"table":return o=t.index,function(){if(r)return r;r=[];for(let t=0;t<we.length;t++)r.push(n(we[t]));let t=[0,95,135,175,215,255];for(let n=0;n<6;n++)for(let o=0;o<6;o++)for(let i=0;i<6;i++)r.push(e([t[n],t[o],t[i]]));let o=8;for(let t=0;t<24;t++,o+=10)r.push(e([o,o,o]));return r}()[o]}var o}}}const Ae={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Ee(t,n,e){const r=Wn(t,e),o=ne(n),i=Object.fromEntries(we.map((n=>{const e=`terminal.ansi${n[0].toUpperCase()}${n.substring(1)}`,r=t.colors?.[e];return[n,r||Ae[n]]}))),l=Te(i),s=function(){let t=null,n=null,e=new Set;return{parse(r){const o=[];let i=0;do{const l=ve(r,i),s=l.sequence?r.substring(i,l.startPosition):r.substring(i);if(s.length>0&&o.push({value:s,foreground:t,background:n,decorations:new Set(e)}),l.sequence){const r=Ce(l.sequence);for(const o of r)"resetAll"===o.type?(t=null,n=null,e.clear()):"resetForegroundColor"===o.type?t=null:"resetBackgroundColor"===o.type?n=null:"resetDecoration"===o.type&&e.delete(o.value);for(const o of r)"setForegroundColor"===o.type?t=o.value:"setBackgroundColor"===o.type?n=o.value:"setDecoration"===o.type&&e.add(o.value)}i=l.position}while(i<r.length);return o}}}();return o.map((n=>s.parse(n[0]).map((e=>{let o,i;e.decorations.has("reverse")?(o=e.background?l.value(e.background):t.bg,i=e.foreground?l.value(e.foreground):t.fg):(o=e.foreground?l.value(e.foreground):t.fg,i=e.background?l.value(e.background):void 0),o=Yn(o,r),i=Yn(i,r),e.decorations.has("dim")&&(o=function(t){const n=t.match(/#([0-9a-f]{3,8})/i);if(n){const t=n[1];if(8===t.length){const n=Math.round(Number.parseInt(t.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${t.slice(0,6)}${n}`}if(6===t.length)return`#${t}80`;if(4===t.length){const n=t[0],e=t[1],r=t[2],o=t[3];return`#${n}${n}${e}${e}${r}${r}${Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0")}`}if(3===t.length){const n=t[0],e=t[1],r=t[2];return`#${n}${n}${e}${e}${r}${r}80`}}const e=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return e?`var(${e[1]}-dim)`:t}(o));let s=m.None;return e.decorations.has("bold")&&(s|=m.Bold),e.decorations.has("italic")&&(s|=m.Italic),e.decorations.has("underline")&&(s|=m.Underline),e.decorations.has("strikethrough")&&(s|=m.Strikethrough),{content:e.value,offset:n[1],color:o,bgColor:i,fontStyle:s}}))))}function Oe(n,e,r={}){const{theme:o=n.getLoadedThemes()[0]}=r,i=n.resolveLangAlias(r.lang||"text");if(Jn(i)||Zn(o))return ne(e).map((t=>[{content:t[0],offset:t[1]}]));const{theme:l,colorMap:s}=n.setTheme(o);if("ansi"===i)return Ee(l,e,r);const a=n.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==a.name)throw new t(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${a.name}"`);if(!r.grammarState.themes.includes(l.name))throw new t(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${l.name}"`)}return Me(e,a,l,s,r)}function Pe(...n){if(2===n.length)return de(n[1]);const[e,r,o={}]=n,{lang:i="text",theme:l=e.getLoadedThemes()[0]}=o;if(Jn(i)||Zn(l))throw new t("Plain language does not have grammar state");if("ansi"===i)throw new t("ANSI language does not have grammar state");const{theme:s,colorMap:a}=e.setTheme(l),u=e.getLanguage(i);return new ge(Le(r,u,s,a,o).stateStack,u.name,s.name)}function Me(t,n,e,r,o){const i=Le(t,n,e,r,o),l=new ge(i.stateStack,n.name,e.name);return fe(i.tokens,l),i.tokens}function Le(n,e,r,o,i){const l=Wn(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500}=i,u=ne(n);let c=i.grammarState?function(n,e){if(!(n instanceof ge))throw new t("Invalid grammar state");return n.getInternalStack(e)}(i.grammarState,r.name)??yt:null!=i.grammarContextCode?Le(i.grammarContextCode,e,r,o,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:yt,h=[];const f=[];for(let t=0,n=u.length;t<n;t++){const[n,g]=u[t];if(""===n){h=[],f.push([]);continue}if(s>0&&n.length>=s){h=[],f.push([{content:n,offset:g,color:"",fontStyle:0}]);continue}let p,m,y;i.includeExplanation&&(p=e.tokenizeLine(n,c,a),m=p.tokens,y=0);const b=e.tokenizeLine2(n,c,a),w=b.tokens.length/2;for(let t=0;t<w;t++){const e=b.tokens[2*t],s=t+1<w?b.tokens[2*t+2]:n.length;if(e===s)continue;const a=b.tokens[2*t+1],u=Yn(o[v.getForeground(a)],l),c=v.getFontStyle(a),f={content:n.substring(e,s),offset:g+e,color:u,fontStyle:c};if(i.includeExplanation){const t=[];if("scopeName"!==i.includeExplanation)for(const n of r.settings){let e;switch(typeof n.scope){case"string":e=n.scope.split(/,/).map((t=>t.trim()));break;case"object":e=n.scope;break;default:continue}t.push({settings:n,selectors:e.map((t=>t.split(/ /)))})}f.explanation=[];let o=0;for(;e+o<s;){const e=m[y],r=n.substring(e.startIndex,e.endIndex);o+=r.length,f.explanation.push({content:r,scopes:"scopeName"===i.includeExplanation?(d=e.scopes,d.map((t=>({scopeName:t})))):$e(t,e.scopes)}),y+=1}}h.push(f)}f.push(h),h=[],c=b.ruleStack}var d;return{tokens:f,stateStack:c}}function $e(t,n){const e=[];for(let r=0,o=n.length;r<o;r++){const o=n[r];e[r]={scopeName:o,themeMatches:De(t,o,n.slice(0,r))}}return e}function Re(t,n){return t===n||n.substring(0,t.length)===t&&"."===n[t.length]}function _e(t,n,e){if(!Re(t[t.length-1],n))return!1;let r=t.length-2,o=e.length-1;for(;r>=0&&o>=0;)Re(t[r],e[o])&&(r-=1),o-=1;return-1===r}function De(t,n,e){const r=[];for(const{selectors:o,settings:i}of t)for(const t of o)if(_e(t,n,e)){r.push(i);break}return r}function Be(t,n,e){const r=Object.entries(e.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))),o=r.map((r=>{const o=Oe(t,n,{...e,theme:r.theme});return{tokens:o,state:de(o),theme:"string"==typeof r.theme?r.theme:r.theme.name}})),i=function(...t){const n=t.map((()=>[])),e=t.length;for(let r=0;r<t[0].length;r++){const o=t.map((t=>t[r])),i=n.map((()=>[]));n.forEach(((t,n)=>t.push(i[n])));const l=o.map((()=>0)),s=o.map((t=>t[0]));for(;s.every((t=>t));){const t=Math.min(...s.map((t=>t.content.length)));for(let n=0;n<e;n++){const e=s[n];e.content.length===t?(i[n].push(e),l[n]+=1,s[n]=o[n][l[n]]):(i[n].push({...e,content:e.content.slice(0,t)}),s[n]={...e,content:e.content.slice(t),offset:e.offset+t})}}}return n}(...o.map((t=>t.tokens))),l=i[0].map(((t,n)=>t.map(((t,o)=>{const l={content:t.content,variants:{},offset:t.offset};return"includeExplanation"in e&&e.includeExplanation&&(l.explanation=t.explanation),i.forEach(((t,e)=>{const{content:i,explanation:s,offset:a,...u}=t[n][o];l.variants[r[e].color]=u})),l})))),s=o[0].state?new ge(Object.fromEntries(o.map((t=>[t.theme,t.state?.getInternalStack(t.theme)]))),o[0].state.lang):void 0;return s&&fe(l,s),l}function Ie(n,e,r){let o,i,l,s,a,u;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:h="--shiki-",colorsRendering:f="css-vars"}=r,d=Object.entries(r.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))).sort(((t,n)=>t.color===c?-1:n.color===c?1:0));if(0===d.length)throw new t("`themes` option must not be empty");const g=Be(n,e,r);if(u=de(g),c&&oe!==c&&!d.find((t=>t.color===c)))throw new t(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=d.map((t=>n.getTheme(t.theme))),m=d.map((t=>t.color));l=g.map((t=>t.map((t=>ae(t,m,h,c,f))))),u&&fe(l,u);const y=d.map((t=>Wn(t.theme,r)));i=Ne(d,p,y,h,c,"fg",f),o=Ne(d,p,y,h,c,"bg",f),s=`shiki-themes ${p.map((t=>t.name)).join(" ")}`,a=c?void 0:[i,o].join(";")}else{if(!("theme"in r))throw new t("Invalid options, either `theme` or `themes` must be provided");{const t=Wn(r.theme,r);l=Oe(n,e,r);const a=n.getTheme(r.theme);o=Yn(a.bg,t),i=Yn(a.fg,t),s=a.name,u=de(l)}}return{tokens:l,fg:i,bg:o,themeName:s,rootStyle:a,grammarState:u}}function Ne(n,e,r,o,i,l,s){return n.map(((a,u)=>{const c=Yn(e[u][l],r[u])||"inherit",h=`${o+a.color}${"bg"===l?"-bg":""}:${c}`;if(0===u&&i){if(i===oe&&n.length>1){const o=n.findIndex((t=>"light"===t.color)),i=n.findIndex((t=>"dark"===t.color));if(-1===o||-1===i)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Yn(e[o][l],r[o])||"inherit"}, ${Yn(e[i][l],r[i])||"inherit"});${h}`}return c}return"css-vars"===s?h:null})).filter((t=>!!t)).join(";")}function Fe(t,n,e,r={meta:{},options:e,codeToHast:(n,e)=>Fe(t,n,e),codeToTokens:(n,e)=>Ie(t,n,e)}){let o=n;for(const t of be(e))o=t.preprocess?.call(r,o,e)||o;let{tokens:i,fg:l,bg:s,themeName:a,rootStyle:u,grammarState:c}=Ie(t,o,e);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:f=!1}=e;!0===h?i=function(t){return t.map((t=>{const n=[];let e,r="";return t.forEach(((o,i)=>{const l=!(o.fontStyle&&(o.fontStyle&m.Underline||o.fontStyle&m.Strikethrough));l&&o.content.match(/^\s+$/)&&t[i+1]?(void 0===e&&(e=o.offset),r+=o.content):r?(l?n.push({...o,offset:e,content:r+o.content}):n.push({content:r,offset:e},o),e=void 0,r=""):n.push(o)})),n}))}(i):"never"===h&&(i=function(t){return t.map((t=>t.flatMap((t=>{if(t.content.match(/^\s+$/))return t;const n=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return t;const[,e,r,o]=n;if(!e&&!o)return t;const i=[{...t,offset:t.offset+e.length,content:r}];return e&&i.unshift({content:e,offset:t.offset}),o&&i.push({content:o,offset:t.offset+e.length+r.length}),i}))))}(i)),f&&(i=function(t){return t.map((t=>{const n=[];for(const e of t){if(0===n.length){n.push({...e});continue}const t=n[n.length-1],r=ce(t.htmlStyle||ue(t)),o=ce(e.htmlStyle||ue(e));t.fontStyle&&(t.fontStyle&m.Underline||t.fontStyle&m.Strikethrough)||e.fontStyle&&(e.fontStyle&m.Underline||e.fontStyle&m.Strikethrough)||r!==o?n.push({...e}):t.content+=e.content}return n}))}(i));const d={...r,get source(){return o}};for(const t of be(e))i=t.tokens?.call(d,i)||i;return Ge(i,{...e,fg:l,bg:s,themeName:a,rootStyle:!1!==e.rootStyle&&(e.rootStyle??u)},d,c)}function Ge(t,n,e,r=de(t)){const o=be(n),i=[],l={type:"root",children:[]},{structure:s="classic",tabindex:a="0"}=n,u={class:`shiki ${n.themeName||""}`};!1!==n.rootStyle&&(u.style=null!=n.rootStyle?n.rootStyle:`background-color:${n.bg};color:${n.fg}`),!1!==a&&null!=a&&(u.tabindex=a.toString());for(const[t,e]of Object.entries(n.meta||{}))t.startsWith("_")||(u[t]=e);let c={type:"element",tagName:"pre",properties:u,children:[],data:n.data},h={type:"element",tagName:"code",properties:{},children:i};const f=[],d={...e,structure:s,addClassToHast:te,get source(){return e.source},get tokens(){return t},get options(){return n},get root(){return l},get pre(){return c},get code(){return h},get lines(){return f}};if(t.forEach(((t,n)=>{n&&("inline"===s?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&i.push({type:"text",value:"\n"}));let e={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(const i of t){let t={type:"element",tagName:"span",properties:{...i.htmlAttrs},children:[{type:"text",value:i.content}]};const a=ce(i.htmlStyle||ue(i));a&&(t.properties.style=a);for(const l of o)t=l?.span?.call(d,t,n+1,r,e,i)||t;"inline"===s?l.children.push(t):"classic"===s&&e.children.push(t),r+=i.content.length}if("classic"===s){for(const t of o)e=t?.line?.call(d,e,n+1)||e;f.push(e),i.push(e)}else"inline"===s&&f.push(e)})),"classic"===s){for(const t of o)h=t?.code?.call(d,h)||h;c.children.push(h);for(const t of o)c=t?.pre?.call(d,c)||c;l.children.push(c)}else if("inline"===s){const t=[];let n={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const e of l.children)"element"===e.type&&"br"===e.tagName?(t.push(n),n={type:"element",tagName:"span",properties:{class:"line"},children:[]}):"element"!==e.type&&"text"!==e.type||n.children.push(e);t.push(n);let e={type:"element",tagName:"code",properties:{},children:t};for(const t of o)e=t?.code?.call(d,e)||e;l.children=[];for(let t=0;t<e.children.length;t++){t>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const n=e.children[t];"element"===n.type&&l.children.push(...n.children)}}let g=l;for(const t of o)g=t?.root?.call(d,g)||g;return r&&fe(g,r),g}const je=function(t,n){const e=n||jn,r=e.quote||'"',o='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qn,all:Hn,settings:{omitOptionalTags:e.omitOptionalTags||!1,allowParseErrors:e.allowParseErrors||!1,allowDangerousCharacters:e.allowDangerousCharacters||!1,quoteSmart:e.quoteSmart||!1,preferUnquoted:e.preferUnquoted||!1,tightAttributes:e.tightAttributes||!1,upperDoctype:e.upperDoctype||!1,tightDoctype:e.tightDoctype||!1,bogusComments:e.bogusComments||!1,tightCommaSeparatedLists:e.tightCommaSeparatedLists||!1,tightSelfClosing:e.tightSelfClosing||!1,collapseEmptyAttributes:e.collapseEmptyAttributes||!1,allowDangerousHtml:e.allowDangerousHtml||!1,voids:e.voids||bt,characterReferences:e.characterReferences||Un,closeSelfClosing:e.closeSelfClosing||!1,closeEmptyElements:e.closeEmptyElements||!1},schema:"svg"===e.space?Xt:Jt,quote:r,alternative:o}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)};function Ue(t,n,e){const r={meta:{},options:e,codeToHast:(n,e)=>Fe(t,n,e),codeToTokens:(n,e)=>Ie(t,n,e)};let o=je(Fe(t,n,e,r));for(const t of be(e))o=t.postprocess?.call(r,o,e)||o;return o}const ze="__shiki_resolved";function qe(t){if(t?.[ze])return t;const n={...t};n.tokenColors&&!n.settings&&(n.settings=n.tokenColors,delete n.tokenColors),n.type||="dark",n.colorReplacements={...n.colorReplacements},n.settings||=[];let{bg:e,fg:r}=n;if(!e||!r){const t=n.settings?n.settings.find((t=>!t.name&&!t.scope)):void 0;t?.settings?.foreground&&(r=t.settings.foreground),t?.settings?.background&&(e=t.settings.background),!r&&n?.colors?.["editor.foreground"]&&(r=n.colors["editor.foreground"]),!e&&n?.colors?.["editor.background"]&&(e=n.colors["editor.background"]),r||(r="light"===n.type?"#333333":"#bbbbbb"),e||(e="light"===n.type?"#fffffe":"#1e1e1e"),n.fg=r,n.bg=e}n.settings[0]&&n.settings[0].settings&&!n.settings[0].scope||n.settings.unshift({settings:{foreground:n.fg,background:n.bg}});let o=0;const i=new Map;function l(t){if(i.has(t))return i.get(t);o+=1;const e=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return n.colorReplacements?.[`#${e}`]?l(t):(i.set(t,e),e)}n.settings=n.settings.map((t=>{const e=t.settings?.foreground&&!t.settings.foreground.startsWith("#"),r=t.settings?.background&&!t.settings.background.startsWith("#");if(!e&&!r)return t;const o={...t,settings:{...t.settings}};if(e){const e=l(t.settings.foreground);n.colorReplacements[e]=t.settings.foreground,o.settings.foreground=e}if(r){const e=l(t.settings.background);n.colorReplacements[e]=t.settings.background,o.settings.background=e}return o}));for(const t of Object.keys(n.colors||{}))if(("editor.foreground"===t||"editor.background"===t||t.startsWith("terminal.ansi"))&&!n.colors[t]?.startsWith("#")){const e=l(n.colors[t]);n.colorReplacements[e]=n.colors[t],n.colors[t]=e}return Object.defineProperty(n,ze,{enumerable:!1,writable:!1,value:!0}),n}async function He(t){return Array.from(new Set((await Promise.all(t.filter((t=>!Xn(t))).map((async t=>await Vn(t).then((t=>Array.isArray(t)?t:[t])))))).flat()))}async function We(t){return(await Promise.all(t.map((async t=>Qn(t)?null:qe(await Vn(t)))))).filter((t=>!!t))}let Ye=3,Ke=!1;function Ve(t=!0,n=!1){Ye=t,Ke=n}function Je(t,n=3){if(Ye&&!("number"==typeof Ye&&n>Ye)){if(Ke)throw new Error(`[SHIKI DEPRECATE]: ${t}`);console.trace(`[SHIKI DEPRECATE]: ${t}`)}}class Xe extends Error{constructor(t){super(t),this.name="ShikiError"}}function Ze(t,n){if(!n)return t;if(n[t]){const e=new Set([t]);for(;n[t];){if(e.has(t=n[t]))throw new Xe(`Circular alias \`${Array.from(e).join(" -> ")} -> ${t}\``);e.add(t)}}return t}class Qe extends mt{constructor(t,n,e,r={}){super(t),this._resolver=t,this._themes=n,this._langs=e,this._alias=r,this._themes.map((t=>this.loadTheme(t))),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return"string"==typeof t?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=qe(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=h.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Ze(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter((n=>n.embeddedLangsLazy?.includes(t.name))));this._resolver.addLanguage(t);const e={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const r=this.loadGrammarWithConfiguration(t.scopeName,1,e);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach((n=>{this._alias[n]=t.name})),this._loadedLanguagesCache=null,n.size)for(const t of n)this._resolvedGrammars.delete(t.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(t.scopeName),this._syncRegistry?._grammars?.delete(t.scopeName),this.loadLanguage(this._langMap.get(t.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const n of t)this.resolveEmbeddedLanguages(n);const n=Array.from(this._langGraph.entries()),e=n.filter((([t,n])=>!n));if(e.length){const t=n.filter((([t,n])=>{if(!n)return!1;const r=n.embeddedLanguages||n.embeddedLangs;return r?.some((t=>e.map((([t])=>t)).includes(t)))})).filter((t=>!e.includes(t)));throw new Xe(`Missing languages ${e.map((([t])=>`\`${t}\``)).join(", ")}, required by ${t.map((([t])=>`\`${t}\``)).join(", ")}`)}for(const[t,e]of n)this._resolver.addLanguage(e);for(const[t,e]of n)this.loadLanguage(e)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const t of n)this._langGraph.set(t,this._langMap.get(t))}}class tr{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},n.forEach((t=>this.addLanguage(t)))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach((n=>{this._langs.set(n,t)})),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach((n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)}))}getInjections(t){const n=t.split(".");let e=[];for(let t=1;t<=n.length;t++){const r=n.slice(0,t).join(".");e=[...e,...this._injections.get(r)||[]]}return e}}let nr=0;function er(t){nr+=1,!1!==t.warnings&&nr>=10&&nr%10==0&&console.warn(`[Shiki] ${nr} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!t.engine)throw new Xe("`engine` option is required for synchronous mode");const e=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(qe),o=new tr(t.engine,e),i=new Qe(o,r,e,t.langAlias);let l;function s(t){if("none"===t)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();const n=i.getTheme(t);if(!n)throw new Xe(`Theme \`${t}\` not found, you may need to load it first`);return n}function a(...t){c(),i.loadLanguages(t.flat(1))}function u(...t){c();for(const n of t.flat(1))i.loadTheme(n)}function c(){if(n)throw new Xe("Shiki instance has been disposed")}function h(){n||(n=!0,i.dispose(),nr-=1)}return{setTheme:function(t){c();const n=s(t);return l!==t&&(i.setTheme(n),l=t),{theme:n,colorMap:i.getColorMap()}},getTheme:s,getLanguage:function(t){c();const n=i.getGrammar("string"==typeof t?t:t.name);if(!n)throw new Xe(`Language \`${t}\` not found, you may need to load it first`);return n},getLoadedThemes:function(){return c(),i.getLoadedThemes()},getLoadedLanguages:function(){return c(),i.getLoadedLanguages()},resolveLangAlias:function(n){return Ze(n,t.langAlias)},loadLanguage:async function(...t){return a(await He(t))},loadLanguageSync:a,loadTheme:async function(...t){return c(),u(await We(t))},loadThemeSync:u,dispose:h,[Symbol.dispose]:h}}async function rr(t){t.engine||Je("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[n,e,r]=await Promise.all([We(t.themes||[]),He(t.langs||[]),t.engine]);return er({...t,themes:n,langs:e,engine:r})}async function or(t){const n=await rr(t);return{getLastGrammarState:(...t)=>Pe(n,...t),codeToTokensBase:(t,e)=>Oe(n,t,e),codeToTokensWithThemes:(t,e)=>Be(n,t,e),codeToTokens:(t,e)=>Ie(n,t,e),codeToHast:(t,e)=>Fe(n,t,e),codeToHtml:(t,e)=>Ue(n,t,e),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...n,getInternalContext:()=>n}}function ir(t){const n=er(t);return{getLastGrammarState:(...t)=>Pe(n,...t),codeToTokensBase:(t,e)=>Oe(n,t,e),codeToTokensWithThemes:(t,e)=>Be(n,t,e),codeToTokens:(t,e)=>Ie(n,t,e),codeToHast:(t,e)=>Fe(n,t,e),codeToHtml:(t,e)=>Ue(n,t,e),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...n,getInternalContext:()=>n}}function lr(t){let n;return async function(e){if(n){const t=await n;return await Promise.all([t.loadTheme(...e.themes||[]),t.loadLanguage(...e.langs||[])]),t}return n=t({...e,themes:e.themes||[],langs:e.langs||[]}),n}}const sr=lr(or);function ar(n){const e=n.langs,r=n.themes,o=n.engine;return async function(n){function i(r){if("string"==typeof r){if(Xn(r=n.langAlias?.[r]||r))return[];const o=e[r];if(!o)throw new t(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);return o}return r}function l(n){if(Qn(n))return"none";if("string"==typeof n){const e=r[n];if(!e)throw new t(`Theme \`${n}\` is not included in this bundle. You may want to load it from external source.`);return e}return n}const s=(n.themes??[]).map((t=>l(t))),a=(n.langs??[]).map((t=>i(t))),u=await or({engine:n.engine??o(),...n,themes:s,langs:a});return{...u,loadLanguage:(...t)=>u.loadLanguage(...t.map(i)),loadTheme:(...t)=>u.loadTheme(...t.map(l)),getBundledLanguages:()=>e,getBundledThemes:()=>r}}}function ur(t){let n;return async function(e={}){if(n){const t=await n;return await Promise.all([t.loadTheme(...e.themes||[]),t.loadLanguage(...e.langs||[])]),t}{n=t({...e,themes:[],langs:[]});const r=await n;return await Promise.all([r.loadTheme(...e.themes||[]),r.loadLanguage(...e.langs||[])]),r}}}function cr(t,n){const e=ur(t);async function r(t,r){const o=await e({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)}),i=await(n?.guessEmbeddedLanguages?.(t,r.lang,o));return i&&await o.loadLanguage(...i),o}return{getSingletonHighlighter:t=>e(t),codeToHtml:async(t,n)=>(await r(t,n)).codeToHtml(t,n),codeToHast:async(t,n)=>(await r(t,n)).codeToHast(t,n),codeToTokens:async(t,n)=>(await r(t,n)).codeToTokens(t,n),codeToTokensBase:async(t,n)=>(await r(t,n)).codeToTokensBase(t,n),codeToTokensWithThemes:async(t,n)=>(await r(t,n)).codeToTokensWithThemes(t,n),getLastGrammarState:async(t,n)=>(await e({langs:[n.lang],themes:[n.theme]})).getLastGrammarState(t,n)}}const hr=ar;function fr(t={}){const{name:n="css-variables",variablePrefix:e="--shiki-",fontStyle:r=!0}=t,o=n=>t.variableDefaults?.[n]?`var(${e}${n}, ${t.variableDefaults[n]})`:`var(${e}${n})`,i={name:n,type:"dark",colors:{"editor.foreground":o("foreground"),"editor.background":o("background"),"terminal.ansiBlack":o("ansi-black"),"terminal.ansiRed":o("ansi-red"),"terminal.ansiGreen":o("ansi-green"),"terminal.ansiYellow":o("ansi-yellow"),"terminal.ansiBlue":o("ansi-blue"),"terminal.ansiMagenta":o("ansi-magenta"),"terminal.ansiCyan":o("ansi-cyan"),"terminal.ansiWhite":o("ansi-white"),"terminal.ansiBrightBlack":o("ansi-bright-black"),"terminal.ansiBrightRed":o("ansi-bright-red"),"terminal.ansiBrightGreen":o("ansi-bright-green"),"terminal.ansiBrightYellow":o("ansi-bright-yellow"),"terminal.ansiBrightBlue":o("ansi-bright-blue"),"terminal.ansiBrightMagenta":o("ansi-bright-magenta"),"terminal.ansiBrightCyan":o("ansi-bright-cyan"),"terminal.ansiBrightWhite":o("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:o("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:o("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:o("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:o("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:o("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:o("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:o("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:o("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:o("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:o("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:o("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:o("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:o("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:o("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:o("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:o("token-changed")}}]};return r||(i.tokenColors=i.tokenColors?.map((t=>(t.settings?.fontStyle&&delete t.settings.fontStyle,t)))),i}export{t as ShikiError,te as addClassToHast,Yn as applyColorReplacements,Fe as codeToHast,Ue as codeToHtml,Ie as codeToTokens,Oe as codeToTokensBase,Be as codeToTokensWithThemes,ar as createBundledHighlighter,fr as createCssVariablesTheme,or as createHighlighterCore,ir as createHighlighterCoreSync,ee as createPositionConverter,rr as createShikiInternal,er as createShikiInternalSync,cr as createSingletonShorthands,hr as createdBundledHighlighter,Ve as enableDeprecationWarnings,ae as flatTokenVariants,sr as getSingletonHighlighterCore,ue as getTokenStyleObject,re as guessEmbeddedLanguages,je as hastToHtml,Zn as isNoneTheme,Jn as isPlainLang,Xn as isSpecialLang,Qn as isSpecialTheme,ur as makeSingletonHighlighter,lr as makeSingletonHighlighterCore,Vn as normalizeGetter,qe as normalizeTheme,Wn as resolveColorReplacements,ne as splitLines,le as splitToken,se as splitTokens,ce as stringifyTokenStyle,Kn as toArray,Ee as tokenizeAnsiWithTheme,Me as tokenizeWithTheme,Ge as tokensToHast,pe as transformerDecorations,Je as warnDeprecated}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./p-DXIDl7cw.js";import{h as t}from"./p-Hej7hALV.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 d=()=>{void 0!==i&&(clearTimeout(i),i=void 0)},s=()=>"undefined"!=typeof document&&"hidden"===document.visibilityState,p=()=>{d();const t=(()=>{const e=Math.floor(Number(o.interval()));return Number.isFinite(e)&&e>0?e:0})();!u||!t||r||c||s()||e()||(i=setTimeout(m,t))},m=()=>{i=void 0,u&&(!1!==o.advance()?p():u=!1)},a=()=>{r=!0,d()},f=()=>{r=!1,p()},l=t({parts:()=>[n],enter:()=>{c=!0,d()},leave:()=>{c=!1,p()}}),v=e=>l.focusin(e),h=e=>l.focusout(e),y=()=>s()?d():p();return n.addEventListener("pointerenter",a),n.addEventListener("pointerleave",f),n.addEventListener("focusin",v),n.addEventListener("focusout",h),"undefined"!=typeof document&&document.addEventListener("visibilitychange",y),{start(){u=!0,p()},stop(){u=!1,d()},get active(){return u},dispose(){u=!1,d(),n.removeEventListener("pointerenter",a),n.removeEventListener("pointerleave",f),n.removeEventListener("focusin",v),n.removeEventListener("focusout",h),l.reset(),"undefined"!=typeof document&&document.removeEventListener("visibilitychange",y)}}}export{o as a,n as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={isDev:!1,isServer:!1},n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(e||{}),l="type",o="value",s="serialized:";function r(t,n,e){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,n);if(l&&(!e||l.get))return l;t=Object.getPrototypeOf(t)}}var i=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=r(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(e)?t[e]=n.o.get(e):void 0!==l&&(t[e]=l)}}))},c=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},u=(t,n)=>n in t,f=(t,n)=>(0,console.error)(t,n),a=new Map,d="s-id",$="sty-id",p="c-id",v="http://www.w3.org/1999/xlink",h=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],b="undefined"!=typeof window?window:{},y=b.HTMLElement||class{},m={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},g=(()=>{var t;let n=!1;try{null==(t=b.document)||t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){n=!0}}))}catch(t){}return n})(),w=(()=>{try{return!!b.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),j=!!w&&(()=>!!b.document&&Object.getOwnPropertyDescriptor(b.document.adoptedStyleSheets,"length").writable)(),O=!1,S=[],k=[],N=()=>{var t;return(null==(t=b.document)?void 0:t.hidden)?E(C):m.raf(C)},x=(t,n)=>e=>{t.push(e),O||(O=!0,n&&4&m.i?E(C):N())},M=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){f(t)}t.length=0},C=()=>{M(S),M(k),(O=S.length>0)&&N()},E=t=>Promise.resolve(undefined).then(t),I=x(k,!0),A=t=>{const n=new URL(t,m.u);return n.origin!==b.location.origin?n.href:n.pathname},L=t=>m.u=t,R=t=>{const n=W(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&_(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!D(t,B(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&W(t,"childNodes").length&&R(t)}};function _(t,n,e){let l,o=0,s=[];for(;o<t.length;o++){if(l=t[o],l["s-sr"]&&(!n||l["s-hn"]===n)&&(void 0===e||B(l)===e)&&(s.push(l),void 0!==e))return s;s=[...s,..._(W(l,"childNodes"),n,e)]}return s}var D=(t,n,e=!0)=>{const l=[];(e&&t["s-sr"]||!t["s-sr"])&&l.push(t);let o=t;for(;o=o.nextSibling;)B(o)!==n||!e&&o["s-sr"]||l.push(o);return l},T=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,F=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,r=W(s,e?"prepend":"appendChild");if(void 0!==l){o["s-oo"]=l;const t=W(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>r.call(s,t)))}else r.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]},B=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function U(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n})(o.childNodes)).forEach((t=>{l===B(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}function V(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function H(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const l=t["s-sn"]=B(t)||"";return{slotNode:_(W(n,"childNodes"),n.tagName,l)[0],slotName:l}}var P=t=>{t.__appendChild||(t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:n,slotNode:e}=H(t,this);if(e){F(t,e);const l=D(e,n),o=l[l.length-1],s=W(o,"parentNode"),r=W(s,"insertBefore")(t,o.nextSibling);return V(e),R(this),r}return this.__appendChild(t)})};function W(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var z=new WeakMap,q=t=>"sc-"+t.$,Y=t=>"object"==(t=typeof t)||"function"===t,J=(t,n,...e)=>{let l=null,o=null,s=null,r=!1,i=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)if(l=n[e],Array.isArray(l))u(l);else if(null!=l&&"boolean"!=typeof l){if(r="function"!=typeof t&&!Y(l))l=String(l);else if("function"!=typeof t&&void 0===l.i){f("Invalid vNode child");continue}r&&i?c[c.length-1].p+=l:c.push(r?Z(null,l):l),i=r}};if(u(e),n){n.key&&(o=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,K);const a=Z(t,null);return a.v=n,c.length>0&&(a.h=c),a.m=o,a.j=s,a},Z=(t,n)=>({i:0,O:t,p:null!=n?n:null,S:null,h:null,v:null,m:null,j:null}),G={},K={forEach:(t,n)=>t.map(Q).forEach(n),map:(t,n)=>t.map(Q).map(n).map(X)},Q=t=>({vattrs:t.v,vchildren:t.h,vkey:t.m,vname:t.j,vtag:t.O,vtext:t.p}),X=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),J(t.vtag,n,...t.vchildren||[])}const n=Z(t.vtag,t.vtext);return n.v=t.vattrs,n.h=t.vchildren,n.m=t.vkey,n.j=t.vname,n},tt=(t,n,e,l,o,s,r,i=[])=>{let c,u,f,a;const d=o["s-sc"];if(1===s.nodeType){if(c=s.getAttribute(p),c&&(u=c.split("."),u[0]===r||"0"===u[0])){f=et({i:0,k:u[0],N:u[1],M:u[2],C:u[3],O:s.tagName.toLowerCase(),S:s,v:{class:s.className||""}}),n.push(f),s.removeAttribute(p),t.h||(t.h=[]),d&&u[0]===r&&(s["s-si"]=d,f.v.class+=" "+d);const l=f.S.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.O&&(lt(l,u[2],f,s,t,n,e,0,i),d&&s.classList.add(d)),f.S["s-sn"]=l,f.S.removeAttribute("s-sn")),void 0!==f.C&&(t.h[f.C]=f),t=f}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)tt(t,n,e,l,o,s.shadowRoot.childNodes[a],r,i);const $=s.__childNodes||s.childNodes;for(a=$.length-1;a>=0;a--)tt(t,n,e,l,o,$[a],r,i)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===r||"0"===u[1])&&(c=u[0],f=et({k:u[1],N:u[2],M:u[3],C:u[4]||"0",S:s,v:null,h:null,m:null,j:null,O:null,p:null}),"t"===c?(f.S=st(s,3),f.S&&3===f.S.nodeType&&(f.p=f.S.textContent,n.push(f),s.remove(),r===f.k&&(t.h||(t.h=[]),t.h[f.C]=f))):"c"===c?(f.S=st(s,8),f.S&&8===f.S.nodeType&&(n.push(f),s.remove())):f.k===r&&("s"===c?lt(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,0,i):"r"===c&&(o["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.O){const n=Z(null,s.textContent);n.S=s,n.C="0",t.h=[n]}return t},nt=(t,n)=>{if(1===t.nodeType){const e=t[d]||t.getAttribute(d);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)nt(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)nt(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},et=t=>({i:0,k:null,N:null,M:null,C:"0",S:null,v:null,h:null,m:null,j:null,O:null,p:null,...t});function lt(t,n,e,l,o,s,r,i,c){l["s-sr"]=!0,e.j=t||null,e.O="slot";const u=(null==o?void 0:o.S)?o.S["s-id"]||o.S.getAttribute("s-id"):"";{const s=e.S,r=u&&u!==e.k&&o.S.shadowRoot;ot(c,n,t,l,r?u:e.k),U(l),r&&o.S.insertBefore(s,o.S.children[0])}s.push(e),r.push(e),o.h||(o.h=[]),o.h[e.C]=e}var ot=(t,n,e,l,o)=>{var s,r;let i=l.nextSibling;if(t[n]=t[n]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==e&&(""!==e||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=e,t[n].push({slot:l,node:i,hostId:o})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},st=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},rt=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const l of n){if(e)break;for(const n of t[l])if("string"==typeof n){e=!0;break}}if(!e)return t;const l={};for(const e of n)l[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return l},it=class t{static fromLocalValue(n){const e=n[l],s=o in n?n[o]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,l]of s){const o="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(l);n.set(o,s)}return n;case"object":const l={};for(const[n,e]of s)l[n]=t.fromLocalValue(e);return l;case"regexp":const{pattern:o,flags:r}=s;return new RegExp(o,r);case"set":const i=new Set;for(const n of s)i.add(t.fromLocalValue(n));return i;case"symbol":return Symbol(s);default:throw new Error(`Unsupported type: ${e}`)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(l))return!1;const s=t[l];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(o))}};var ct,ut,ft,at=(t,n,e)=>{return"string"==typeof t&&t.startsWith(s)?t="string"==typeof(l=t)&&l.startsWith(s)?it.fromLocalValue(JSON.parse(function(t){const n=atob(t),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return(new TextDecoder).decode(e)}(l.slice(11)))):l:null==t||Y(t)?t:4&n?(e&&"string"==typeof t||"false"!==t)&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?String(t):t;var l},dt=(t,n,e)=>{const l=t;return{emit:t=>$t(l,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},$t=(t,n,e)=>{const l=m.ce(n,e);return t.dispatchEvent(l),l},pt=(t,n,e,l,o,s,r)=>{if(e===l)return;let i=u(t,n),f=n.toLowerCase();if("class"===n){const n=t.classList,o=yt(e);let s=yt(l);if((t["s-si"]||t["s-sc"])&&r){const e=t["s-sc"]||t["s-si"];s.push(e),o.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...o.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===n){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&Ut(l,t);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let o;{const n=c(t);if(n&&n.l&&n.l.t){const t=n.l.t[e];t&&t[1]&&(o=t[1])}}return o||(o=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===l?"":l))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=l}catch(t){}return}{const r=Y(l);if((i||r&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[n]!==l&&(t[n]=l);else{const o=null==l?"":l;"list"===n?i=!1:null!=e&&t[n]===o||("function"==typeof t.__lookupSetter__(n)?t[n]=o:t.setAttribute(n,o))}}catch(t){}let c=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(n=f,c=!0),null==l||!1===l?(!1!==l||""===t.getAttribute(n)||4&s&&!ht(n))&&(c?t.removeAttributeNS(v,n):t.removeAttribute(n)):(!i||4&s||o)&&!r&&1===t.nodeType&&(l=!0===l?"":l,c?t.setAttributeNS(v,n,l):t.setAttribute(n,l))}}else if(n="-"===n[2]?n.slice(3):u(b,f)?f.slice(2):f[2]+n.slice(3),e||l){const o=n.endsWith(mt);n=n.replace(gt,""),e&&m.rel(t,n,e,o),l&&m.ael(t,n,l,o)}},vt=new Set(["draggable","contenteditable","spellcheck"]),ht=t=>vt.has(t)||t.startsWith("aria-"),bt=/\s/,yt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(bt):[]),mt="Capture",gt=new RegExp(mt+"$"),wt=(t,n,e,l)=>{const o=11===n.S.nodeType&&n.S.host?n.S.host:n.S,s=t&&t.v||{},r=n.v||{};for(const t of jt(Object.keys(s)))t in r||pt(o,t,s[t],void 0,e,n.i,l);for(const t of jt(Object.keys(r)))pt(o,t,s[t],r[t],e,n.i,l)};function jt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Ot=!1,St=!1,kt=!1,Nt=!1,xt=[],Mt=[],Ct=(t,n,e)=>{var l;const o=n.h[e];let s,r,i,c=0;if(Ot||(kt=!0,"slot"===o.O&&(o.i|=o.h?2:1)),null!=o.p)s=o.S=b.document.createTextNode(o.p);else if(1&o.i)s=o.S=b.document.createTextNode(""),wt(null,o,Nt);else{if(Nt||(Nt="svg"===o.O),!b.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=o.S=b.document.createElementNS(Nt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Ot&&2&o.i?"slot-fb":o.O),Nt&&"foreignObject"===o.O&&(Nt=!1),wt(null,o,Nt),null!=(u=ct)&&void 0!==u&&s["s-si"]!==ct&&s.classList.add(s["s-si"]=ct),o.h){const n="template"===o.O?s.content:s;for(c=0;c<o.h.length;++c)r=Ct(t,o,c),r&&n.appendChild(r)}"svg"===o.O?Nt=!1:"foreignObject"===s.tagName&&(Nt=!0)}var u;return s["s-hn"]=ft,3&o.i&&(s["s-sr"]=!0,s["s-cr"]=ut,s["s-sn"]=o.j||"",s["s-rf"]=null==(l=o.v)?void 0:l.ref,U(s),i=t&&t.h&&t.h[e],i&&i.O===o.O&&t.S&&Et(t.S),Ht(ut,s,n.S,null==t?void 0:t.S)),s},Et=t=>{m.i|=1;const n=t.closest(ft.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of e?l.reverse():l)null!=t["s-sh"]&&(Vt(n,t,null!=e?e:null),t["s-sh"]=void 0,kt=!0)}m.i&=-2},It=(t,n)=>{m.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===ft&&e.push(n)}for(let t=e.length-1;t>=0;t--){const l=e[t];l["s-hn"]!==ft&&l["s-ol"]&&(Vt(_t(l).parentNode,l,_t(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,kt=!0),n&&It(l,n)}m.i&=-2},At=(t,n,e,l,o,s)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.O&&(i=i.content);o<=s;++o)l[o]&&(r=Ct(null,e,o),r&&(l[o].S=r,Vt(i,r,_t(n))))},Lt=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.S;Bt(n),t&&(St=!0,t["s-ol"]?t["s-ol"].remove():It(t,!0),t.remove())}}},Rt=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.j===n.j:e?(e&&!t.m&&n.m&&(t.m=n.m),!0):t.m===n.m),_t=t=>t&&t["s-ol"]||t,Dt=(t,n,e=!1)=>{const l=n.S=t.S,o=t.h,s=n.h,r=n.O,i=n.p;let c;null==i?(Nt="svg"===r||"foreignObject"!==r&&Nt,"slot"!==r||Ot||t.j!==n.j&&(n.S["s-sn"]=n.j||"",Et(n.S.parentElement)),wt(t,n,Nt,e),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=n.length-1,d=n[0],$=n[a],p=l.length-1,v=l[0],h=l[p];const b="template"===e.O?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=n[++i];else if(null==$)$=n[--a];else if(null==v)v=l[++c];else if(null==h)h=l[--p];else if(Rt(d,v,o))Dt(d,v,o),d=n[++i],v=l[++c];else if(Rt($,h,o))Dt($,h,o),$=n[--a],h=l[--p];else if(Rt(d,h,o))"slot"!==d.O&&"slot"!==h.O||It(d.S.parentNode,!1),Dt(d,h,o),Vt(b,d.S,$.S.nextSibling),d=n[++i],h=l[--p];else if(Rt($,v,o))"slot"!==d.O&&"slot"!==h.O||It($.S.parentNode,!1),Dt($,v,o),Vt(b,$.S,d.S),$=n[--a],v=l[++c];else{for(u=-1,f=i;f<=a;++f)if(n[f]&&null!==n[f].m&&n[f].m===v.m){u=f;break}u>=0?(r=n[u],r.O!==v.O?s=Ct(n&&n[c],e,u):(Dt(r,v,o),n[u]=void 0,s=r.S),v=l[++c]):(s=Ct(n&&n[c],e,c),v=l[++c]),s&&Vt(_t(d.S).parentNode,s,_t(d.S))}i>a?At(t,null==l[p+1]?null:l[p+1].S,e,l,c,p):c>p&&Lt(n,i,a)})(l,o,n,s,e):null!==s?(null!==t.p&&(l.textContent=""),At(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.h=o):Lt(o,0,o.length-1),Nt&&"svg"===r&&(Nt=!1)):(c=l["s-cr"])?c.parentNode.textContent=i:t.p!==i&&(l.data=i)},Tt=[],Ft=t=>{let n,e,l;const o=t.__childNodes||t.childNodes;for(const t of o){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const o=t["s-sn"];for(l=e.length-1;l>=0;l--)if(n=e[l],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==t["s-hn"]&&(!n["s-sh"]||n["s-sh"]!==t["s-hn"]||""!==o&&B(n)===o))if(T(n,o)){let e=Tt.find((t=>t.I===n));St=!0,n["s-sn"]=n["s-sn"]||o,e?(e.I["s-sh"]=t["s-hn"],e.A=t):(n["s-sh"]=t["s-hn"],Tt.push({A:t,I:n})),n["s-sr"]&&Tt.map((t=>{T(t.I,n["s-sn"])&&(e=Tt.find((t=>t.I===n)),e&&!t.A&&(t.A=e.A))}))}else Tt.some((t=>t.I===n))||Tt.push({I:n})}1===t.nodeType&&Ft(t)}},Bt=t=>{t.v&&t.v.ref&&xt.push((()=>t.v.ref(null))),t.h&&t.h.map(Bt)},Ut=(t,n)=>{Mt.push((()=>t(n)))},Vt=(t,n,e,l)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])Ht(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:o}=H(n);return o&&!l&&V(o),n}return(null==t?void 0:t.__insertBefore)?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function Ht(t,n,e,l){var o,s;let r;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(r=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],i=n["s-hn"];if(null==(o=e.classList)||o.add(r+"-s"),l&&(null==(s=l.classList)?void 0:s.contains(r+"-s"))){let n=(l.__childNodes||l.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===i&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||l.classList.remove(r+"-s")}}}var Pt=(t,n,e=!1)=>{var l,o,s,r,i;const c=t.$hostElement$,u=t.l,f=t.L||Z(null,null);var a;const d=(a=n)&&a.O===G?n:J(null,null,n);if(ft=c.tagName,u.R&&(d.v=d.v||{},u.R.forEach((([t,n])=>{d.v[n]=c[t]}))),e&&d.v)for(const t of Object.keys(d.v))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.v[t]=c[t]);if(d.O=null,d.i|=4,t.L=d,d.S=f.S=c,ct=c["s-sc"],Ot=false,ut=c["s-cr"],St=!1,Dt(f,d,e),m.i|=1,kt){Ft(d.S);for(const t of Tt){const n=t.I;if(!n["s-ol"]&&b.document){const t=b.document.createTextNode("");t["s-nr"]=n,Vt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Tt){const n=t.I,i=t.A;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(l=n.hidden)&&l),i){const t=i.parentNode;let l=i.nextSibling;if(l&&1===l.nodeType){let e=null==(o=n["s-ol"])?void 0:o.previousSibling;for(;e;){let o=null!=(s=e["s-nr"])?s:null;if(o&&o["s-sn"]===n["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===n||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){l=o;break}}e=e.previousSibling}}if((!l&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==l)&&n!==l){if(Vt(t,n,l,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=b.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof i["s-rf"]&&i["s-rf"](i)}else 1===n.nodeType&&(n.hidden=!0)}}if(St&&R(d.S),m.i&=-2,Tt.length=0,!Ot&&!(1&u.i)&&c["s-cr"]){const t=d.S.__childNodes||d.S.childNodes;for(const n of t)if(n["s-hn"]!==ft&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(i=n.hidden)&&i),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=b.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}ut=void 0,xt.forEach((t=>t())),xt.length=0,Mt.forEach((t=>t())),Mt.length=0},Wt=(t,n)=>{if(n&&!t._&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t._=()=>{n["s-p"].splice(e-1,1),l()})))}},zt=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Wt(t,t.D);const e=()=>qt(t,n);if(!n)return I(e);queueMicrotask((()=>{e()}))},qt=(t,n)=>{const e=t.$hostElement$,l=e;if(!l)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=tn(l,n?"componentWillLoad":"componentWillUpdate",void 0,e),o=Yt(o,(()=>tn(l,"componentWillRender",void 0,e))),Yt(o,(()=>Zt(t,l,n)))},Yt=(t,n)=>Jt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Jt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Zt=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l,e=t.$hostElement$,l=n.i,o=((t,n)=>{var e,l,o;const s=q(n),r=a.get(s);if(!b.document)return s;if(t=11===t.nodeType?t:b.document,r)if("string"==typeof r){let o,i=z.get(t=t.head||t);i||z.set(t,i=new Set);const c=t.querySelector(`[${$}="${s}"]`);if(c)c.textContent=r;else if(!i.has(s)){o=b.document.createElement("style"),o.textContent=r;const c=null!=(e=m.T)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=b.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=c&&o.setAttribute("nonce",c),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(w){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(r),j?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=r+n.textContent:t.prepend(o)}else t.append(o);1&n.i&&t.insertBefore(o,null),4&n.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let n=z.get(t);if(n||z.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(r.constructor===e.CSSStyleSheet)l=r;else{l=new e.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)l.insertRule(r.cssRules[t].cssText,t)}if(j?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s),"host"in t){const n=t.querySelector(`[${$}="${s}"]`);n&&I((()=>n.remove()))}}}return s})(e.getRootNode(),n);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(t);Gt(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>Kt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},Gt=(t,n,e,l)=>{try{n=n.render(),t.i&=-17,t.i|=2,Pt(t,n,l)}catch(n){f(n,t.$hostElement$)}return null},Kt=t=>{const n=t.$hostElement$,e=n,l=t.D;tn(e,"componentDidRender",void 0,n),64&t.i?tn(e,"componentDidUpdate",void 0,n):(t.i|=64,nn(n),tn(e,"componentDidLoad",void 0,n),t.F(n),l||Xt()),t._&&(t._(),t._=void 0),512&t.i&&E((()=>zt(t,!1))),t.i&=-517},Qt=t=>{var n;{const e=c(t),l=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return l&&2==(18&e.i)&&zt(e,!1),l}},Xt=()=>{var t;E((()=>$t(b,"appload",{detail:{namespace:"shineui"}}))),(null==(t=m.B)?void 0:t.size)&&m.B.clear()},tn=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){f(t,l)}},nn=t=>t.classList.add("hydrated"),en=(t,n,e,l)=>{const o=c(t);if(!o)return;const s=t,r=o.o.get(n),i=o.i,u=s;e=at(e,l.t[n][0],!!(64&l.i));const a=Number.isNaN(r)&&Number.isNaN(e);if(e!==r&&!a){if(o.o.set(n,e),l.U){const t=l.U[n];t&&t.map((t=>{try{const[[l,s]]=Object.entries(t);(128&i||1&s)&&(u?u[l](e,r,n):o.V.push((()=>{o.H[l](e,r,n)})))}catch(t){f(t,s)}}))}if(2&i){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,r,n)&&!(16&i))return;16&i||zt(o,!1)}}},ln=(t,n,e)=>{var l,o;const s=t.prototype;64&n.i&&1&e&&h.forEach((t=>{const n=s[t];Object.defineProperty(s,t,{value(...e){var l;const o=c(this),s=this;s?"function"==typeof n&&n.call(s,...e):null==(l=null==o?void 0:o.P)||l.then((n=>{const l=n[t];"function"==typeof l&&l.call(n,...e)}))}})}));{t.watchers&&!n.U&&(n.U=rt(t.watchers)),t.deserializers&&!n.W&&(n.W=t.deserializers),t.serializers&&!n.q&&(n.q=t.serializers);const e=Object.entries(null!=(l=n.t)?l:{});e.map((([t,[e]])=>{if(31&e||32&e){const{get:l,set:o}=r(s,t)||{};l&&(n.t[t][0]|=2048),o&&(n.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return l?l.apply(this):(n=t,c(this).o.get(n));var n},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=c(this);if(s){if(o)return void 0===(32&e?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(l=s.o.get(t)),o.apply(this,[at(l,e,!!(64&n.i))]),void en(this,t,l=32&e?this[t]:s.$hostElement$[t],n);en(this,t,l,n)}}})}}));{const l=new Map;s.attributeChangedCallback=function(t,o,r){m.jmp((()=>{var i;const u=l.get(t),f=c(this);if(this.hasOwnProperty(u),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==r)return;if(null==u){const e=null==f?void 0:f.i;if(f&&e&&!(8&e)&&r!==o){const l=this,s=null==(i=n.U)?void 0:i[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=l[s]&&(128&e||1&i)&&l[s].call(l,r,o,t)}))}return}const a=e.find((([t])=>t===u)),d=a?a[1][0]:0,$=4&d;if(512&d&&8&d&&!Y(this[u])&&(null==(p=this[u])||!1===p?null:!0===p?"":String(p))===r)return;var p;const v=$&&null===r&&void 0===this[u];$&&(r=null!==r&&"false"!==r);const h=Object.getOwnPropertyDescriptor(s,u);v||r==this[u]||h.get&&!h.set||(this[u]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=n.U)?o:{}),...e.filter((([t,n])=>31&n[0])).map((([t,e])=>{var o;const s=e[1]||t;return l.set(s,t),512&e[0]&&(null==(o=n.R)||o.push([t,s])),s}))]))}}return t},on=async(t,n,e)=>{let l;try{if(!(32&n.i)&&(n.i|=32,n.i&=-1025,l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const n=q(e);if(!a.has(n)){const l=()=>{};((t,n,e)=>{let l=a.get(t);w&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,a.set(t,l)})(n,t,!!(1&e.i)),l()}}const o=n.D,s=()=>zt(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(e){f(e,t),n._&&(n._(),n._=void 0),!n.F||1024&n.i||n.F(t)}},sn=t=>{if(!b.document)return;const n=t["s-cr"]=b.document.createComment("");n["s-cn"]=!0,Vt(t,n,t.firstChild)},rn=(t,n)=>{const e={i:n[0],$:n[1]};try{e.t=n[2],e.Y=n[3],e.U=rt(t.U),e.W=t.W,e.q=t.q,e.R=[],!(1&e.i)&&256&e.i&&P(t.prototype);const l=t.prototype.connectedCallback,o=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const e={i:0,$hostElement$:t,l:n,o:new Map,J:new Map};e.P=new Promise((t=>e.F=t)),t["s-p"]=[],t["s-rc"]=[];const l=e;t.__stencil__getHostRef=()=>l,512&n.i&&i(t,e)})(this,e)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=c(this);if(!t)return;cn(this,t,e.Y),this.__hasHostListenerAttached=!0}(t=>{if(!(1&m.i)){const n=c(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.i)cn(t,n,e.Y),(null==n?void 0:n.H)||(1024&n.i?setTimeout((()=>on(t,n,e)),1e3):(null==n?void 0:n.P)&&n.P.then((()=>{})));else{let l;if(n.i|=1,l=t.getAttribute(d),l){if(2&e.i){const n=q(e);t["s-sc"]=n}((t,n,e,l)=>{var o,s,r,i;const u=t.shadowRoot,f=[],a=[],$=[],p=Z(n,null);let v;p.S=t;{const n=l.l;n&&10&n.i&&t["s-sc"]?(v=t["s-sc"],t.classList.add(v+"-h")):t["s-sc"]&&delete t["s-sc"]}!b.document||m.B&&m.B.size||nt(b.document.body,m.B=new Map),t[d]=e,t.removeAttribute(d),l.L=tt(p,f,a,null,t,t,e,$);let h=0;const y=f.length;let g;for(;h<y;h++){g=f[h];const e=g.k+"."+g.N,l=m.B.get(e),s=g.S;if(u){if((null==(o=g.O)?void 0:o.toString().includes("-"))&&"slot-fb"!==g.O&&!g.S.shadowRoot){const t=c(g.S);if(t){const n=q(t.l),e=b.document.querySelector(`style[sty-id="${n}"]`);e&&null.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===g.O&&(s["s-cr"]=t["s-cr"]);"slot"===g.O&&(g.j=g.S["s-sn"]||g.S.name||null,g.h?(g.i|=2,g.S.childNodes.length||g.h.forEach((t=>{g.S.appendChild(t.S)}))):g.i|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt(g.N))),l&&!l["s-id"]&&m.B.delete(e)}const w=[],j=$.length;let O,S,k,N,x=0,M=0;for(;x<j;x++)if(O=$[x],O&&O.length)for(k=O.length,S=0;S<k;S++){if(N=O[S],w[N.hostId]||(w[N.hostId]=m.B.get(N.hostId)),!w[N.hostId])continue;const t=w[N.hostId];t.shadowRoot&&N.node.parentElement!==t&&t.insertBefore(N.node,null==(r=null==(s=O[S-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(N.slot["s-cr"]||(N.slot["s-cr"]=t["s-cr"],N.slot["s-cr"]=!N.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),F(N.node,N.slot,!1,N.node["s-oo"]||M),(null==(i=N.node.parentElement)?void 0:i.shadowRoot)&&N.node.getAttribute&&N.node.getAttribute("slot")&&N.node.removeAttribute("slot")),M=(N.node["s-oo"]||M)+1}v&&a.length&&a.forEach((t=>{t.S.parentElement.classList.add(v+"-s")})),l.$hostElement$=t})(t,e.$,l,n)}l||12&e.i&&sn(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Wt(n,n.D=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),on(t,n,e)}l()}})(this),l&&l.call(this)},disconnectedCallback(){(async t=>{if(!(1&m.i)){const n=c(t);(null==n?void 0:n.Z)&&(n.Z.map((t=>t())),n.Z=void 0)}z.has(t)&&z.delete(t),t.shadowRoot&&z.has(t.shadowRoot)&&z.delete(t.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){this.shadowRoot=this}}),Object.defineProperty(t,"is",{value:e.$,configurable:!0}),ln(t,e,3)}catch(n){return f(n),t}},cn=(t,n,e)=>{e&&b.document&&e.map((([e,l,o])=>{const s=t,r=un(n,o),i=fn(e);m.ael(s,l,r,i),(n.Z=n.Z||[]).push((()=>m.rel(s,l,r,i)))}))},un=(t,n)=>e=>{try{t.$hostElement$[n](e)}catch(n){f(n,t.$hostElement$)}},fn=t=>g?{passive:!!(1&t),capture:!!(2&t)}:!!(2&t),an=t=>m.T=t,dn=t=>Object.assign(m,t),$n=new WeakMap;function pn(t,n){let e=$n.get(n);e||(e={i:0,l:{i:0,$:n.tagName},$hostElement$:n},$n.set(n,e)),Pt(e,t)}function vn(t){return t}export{t as B,y as H,G as a,an as b,dt as c,dn as d,Qt as f,A as g,J as h,rn as p,pn as r,L as s,vn as t}
|
|
@@ -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-TBwsYzWO.js";import{G as o,w as a,y as l}from"./p-DdsE4HI6.js";import{i as c,a as d}from"./p-Cs2X0Kih.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"],T=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";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},m=e("input",{key:"a4c8c21dfb522a74b4fbf3878796755e0e5789ff",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:"0ea6de51137e5f48f992f045262d0fdc49159cd9",label:p?void 0:this.label,required:this.required,help:this.help,error:this.error,htmlFor:this.fieldId,descId:this.fieldId},e("div",{key:"41735dbe06d8836322aad8e355ddd87519f5360b",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(o,{glyph:a})),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(o,{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%)}.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.currency.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],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 j(){"undefined"!=typeof customElements&&["sui-input-number"].forEach((i=>{"sui-input-number"===i&&(customElements.get(u(i))||customElements.define(u(i),T))}))}export{T as SuiInputNumber,j as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as n}from"./p-COO9uV7W.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 O="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(" "),P=["MV"],B="BH DZ EG IL IQ JO KW LY OM QA SA SD SY YE".split(" "),E=["AF"],H=["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 W(n){const{info:t,region:e}=K(n);return t&&"number"==typeof t.firstDay?t.firstDay%7:O.includes(e)?0:T.includes(e)?6:P.includes(e)?5:1}function Y(n){const{info:t,region:e}=K(n);return t&&Array.isArray(t.weekend)&&t.weekend.length?t.weekend.map((n=>n%7)):B.includes(e)?[5,6]:E.includes(e)?[4,5]:H.includes(e)?[5]:G.includes(e)?[0]:[6,0]}const J=new Map,Z=new Map;function k(n,t="en-US"){let e=Z.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)}Z.set(t,e)}return e.format(n)}function L(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=J.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"})}J.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{Y as a,$ as b,a as c,o as d,N as e,L as f,w as g,k as h,e as i,r as j,s as k,W 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
|
+
function t(t,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(r){if("default"!==r&&!(r in t)){var e=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,e.get?e:{enumerable:!0,get:function(){return n[r]}})}}))})),Object.freeze(t)}function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,e,o={};function i(){return e?r:(e=1,r=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var u,c={},f={};function s(){if(u)return f;let t;u=1;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return f.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},f.getSymbolTotalCodewords=function(t){return n[t]},f.getBCHDigit=function(t){let n=0;for(;0!==t;)n++,t>>>=1;return n},f.setToSJISFunction=function(n){if("function"!=typeof n)throw new Error('"toSJISFunc" is not a valid function.');t=n},f.isKanjiModeEnabled=function(){return void 0!==t},f.toSJIS=function(n){return t(n)},f}var a,h,l,d,w,v={};function g(){return a||(a=1,(t=v).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}(n)}catch(t){return r}}),v;var t}var p,m,E,y,A={},b={},M={},T={};function x(){if(y)return T;y=1;const t=g(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return T.getBlocksCount=function(r,e){switch(e){case t.L:return n[4*(r-1)+0];case t.M:return n[4*(r-1)+1];case t.Q:return n[4*(r-1)+2];case t.H:return n[4*(r-1)+3];default:return}},T.getTotalCodewordsCount=function(n,e){switch(e){case t.L:return r[4*(n-1)+0];case t.M:return r[4*(n-1)+1];case t.Q:return r[4*(n-1)+2];case t.H:return r[4*(n-1)+3];default:return}},T}var R,I,P,U,F={},N={};var k,_={},B={},C={};function j(){return k||(k=1,C.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),C}var O,$,Q,S={};function Z(){if(O)return S;O=1;const t="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";S.KANJI=new RegExp(n,"g"),S.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),S.BYTE=new RegExp(r,"g"),S.NUMERIC=new RegExp(t,"g"),S.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const e=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return S.testKanji=function(t){return e.test(t)},S.testNumeric=function(t){return o.test(t)},S.testAlphanumeric=function(t){return i.test(t)},S}function q(){return $||($=1,function(t){const n=j(),r=Z();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(n){return r.testNumeric(n)?t.NUMERIC:r.testAlphanumeric(n)?t.ALPHANUMERIC:r.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}(n)}catch(t){return r}}}(B)),B}var L,z,D,J,H,K,Y,G,V,W,X,tt,nt={},rt={},et={exports:{}};function ot(){return W||(W=1,function(t){var n={single_source_shortest_paths:function(t,r,e){var o={},i={};i[r]=0;var u,c,f,s,a,h,l=n.PriorityQueue.make();for(l.push(r,0);!l.empty();)for(f in s=(u=l.pop()).cost,a=t[c=u.value]||{})a.hasOwnProperty(f)&&(h=s+a[f],(void 0===i[f]||i[f]>h)&&(i[f]=h,l.push(f,h),o[f]=c));if(void 0!==e&&void 0===i[e]){var d=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,n){for(var r=[],e=n;e;)r.push(e),e=t[e];return r.reverse(),r},find_path:function(t,r,e){var o=n.single_source_shortest_paths(t,r,e);return n.extract_shortest_path_from_predecessor_list(o,e)},PriorityQueue:{make:function(t){var r,e=n.PriorityQueue,o={};for(r in t=t||{},e)e.hasOwnProperty(r)&&(o[r]=e[r]);return o.queue=[],o.sorter=t.sorter||e.default_sorter,o},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){this.queue.push({value:t,cost:n}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=n}(et)),et.exports}function it(){if(tt)return c;tt=1;const t=s(),n=g(),r=function(){if(l)return h;function t(){this.buffer=[],this.length=0}return l=1,t.prototype={get:function(t){const n=Math.floor(t/8);return 1==(this.buffer[n]>>>7-t%8&1)},put:function(t,n){for(let r=0;r<n;r++)this.putBit(1==(t>>>n-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},h=t}(),e=function(){if(w)return d;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return w=1,t.prototype.set=function(t,n,r,e){const o=t*this.size+n;this.data[o]=r,e&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,n){return this.data[t*this.size+n]},t.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},t.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},d=t}(),o=(p||(p=1,function(t){const n=s().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const r=Math.floor(t/7)+2,e=n(t),o=145===e?26:2*Math.ceil((e-13)/(2*r-2)),i=[e-7];for(let t=1;t<r-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},t.getPositions=function(n){const r=[],e=t.getRowColCoords(n),o=e.length;for(let t=0;t<o;t++)for(let n=0;n<o;n++)0===t&&0===n||0===t&&n===o-1||t===o-1&&0===n||r.push([e[t],e[n]]);return r}}(A)),A),i=function(){if(m)return b;m=1;const t=s().getSymbolSize;return b.getPositions=function(n){const r=t(n);return[[0,0],[r-7,0],[0,r-7]]},b}(),u=(E||(E=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(n,r,e){switch(n){case t.Patterns.PATTERN000:return(r+e)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return e%3==0;case t.Patterns.PATTERN011:return(r+e)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(e/3))%2==0;case t.Patterns.PATTERN101:return r*e%2+r*e%3==0;case t.Patterns.PATTERN110:return(r*e%2+r*e%3)%2==0;case t.Patterns.PATTERN111:return(r*e%3+(r+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,e=0,o=0,i=null,u=null;for(let c=0;c<n;c++){e=o=0,i=u=null;for(let f=0;f<n;f++){let n=t.get(c,f);n===i?e++:(e>=5&&(r+=e-5+3),i=n,e=1),n=t.get(f,c),n===u?o++:(o>=5&&(r+=o-5+3),u=n,o=1)}e>=5&&(r+=e-5+3),o>=5&&(r+=o-5+3)}return r},t.getPenaltyN2=function(t){const n=t.size;let r=0;for(let e=0;e<n-1;e++)for(let o=0;o<n-1;o++){const n=t.get(e,o)+t.get(e,o+1)+t.get(e+1,o)+t.get(e+1,o+1);4!==n&&0!==n||r++}return 3*r},t.getPenaltyN3=function(t){const n=t.size;let r=0,e=0,o=0;for(let i=0;i<n;i++){e=o=0;for(let u=0;u<n;u++)e=e<<1&2047|t.get(i,u),u>=10&&(1488===e||93===e)&&r++,o=o<<1&2047|t.get(u,i),u>=10&&(1488===o||93===o)&&r++}return 40*r},t.getPenaltyN4=function(t){let n=0;const r=t.data.length;for(let e=0;e<r;e++)n+=t.data[e];return 10*Math.abs(Math.ceil(100*n/r/5)-10)},t.applyMask=function(t,r){const e=r.size;for(let o=0;o<e;o++)for(let i=0;i<e;i++)r.isReserved(i,o)||r.xor(i,o,n(t,i,o))},t.getBestMask=function(n,r){const e=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let u=0;u<e;u++){r(u),t.applyMask(u,n);const e=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),e<i&&(i=e,o=u)}return o}}(M)),M),f=x(),a=function(){if(U)return P;U=1;const t=(I||(I=1,function(t){const n=function(){if(R)return N;R=1;const t=new Uint8Array(512),n=new Uint8Array(256);return function(){let r=1;for(let e=0;e<255;e++)t[e]=r,n[r]=e,r<<=1,256&r&&(r^=285);for(let n=255;n<512;n++)t[n]=t[n-255]}(),N.log=function(t){if(t<1)throw new Error("log("+t+")");return n[t]},N.exp=function(n){return t[n]},N.mul=function(r,e){return 0===r||0===e?0:t[n[r]+n[e]]},N}();t.mul=function(t,r){const e=new Uint8Array(t.length+r.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<r.length;i++)e[o+i]^=n.mul(t[o],r[i]);return e},t.mod=function(t,r){let e=new Uint8Array(t);for(;e.length-r.length>=0;){const t=e[0];for(let o=0;o<r.length;o++)e[o]^=n.mul(r[o],t);let o=0;for(;o<e.length&&0===e[o];)o++;e=e.slice(o)}return e},t.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let o=0;o<r;o++)e=t.mul(e,new Uint8Array([1,n.exp(o)]));return e}}(F)),F);function n(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},n.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const e=t.mod(r,this.genPoly),o=this.degree-e.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(e,o),t}return e},P=n}(),v=(Q||(Q=1,function(t){const n=s(),r=x(),e=g(),o=q(),i=j(),u=n.getBCHDigit(7973);function c(t,n){return o.getCharCountIndicator(t,n)+4}function f(t,n){let r=0;return t.forEach((function(t){const e=c(t.mode,n);r+=e+t.getBitsLength()})),r}t.from=function(t,n){return i.isValid(t)?parseInt(t,10):n},t.getCapacity=function(t,e,u){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===u&&(u=o.BYTE);const f=8*(n.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(u===o.MIXED)return f;const s=f-c(u,t);switch(u){case o.NUMERIC:return Math.floor(s/10*3);case o.ALPHANUMERIC:return Math.floor(s/11*2);case o.KANJI:return Math.floor(s/13);default:return Math.floor(s/8)}},t.getBestVersionForData=function(n,r){let i;const u=e.from(r,e.M);if(Array.isArray(n)){if(n.length>1)return function(n,r){for(let e=1;e<=40;e++)if(f(n,e)<=t.getCapacity(e,r,o.MIXED))return e}(n,u);if(0===n.length)return 1;i=n[0]}else i=n;return function(n,r,e){for(let o=1;o<=40;o++)if(r<=t.getCapacity(o,e,n))return o}(i.mode,i.getLength(),u)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;n.getBCHDigit(r)-u>=0;)r^=7973<<n.getBCHDigit(r)-u;return t<<12|r}}(_)),_),y=function(){if(L)return nt;L=1;const t=s(),n=t.getBCHDigit(1335);return nt.getEncodedBits=function(r,e){const o=r.bit<<3|e;let i=o<<10;for(;t.getBCHDigit(i)-n>=0;)i^=1335<<t.getBCHDigit(i)-n;return 21522^(o<<10|i)},nt}(),T=q(),k=(X||(X=1,function(t){const n=q(),r=function(){if(D)return z;D=1;const t=q();function n(n){this.mode=t.NUMERIC,this.data=n.toString()}return n.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n,r,e;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),e=parseInt(r,10),t.put(e,10);const o=this.data.length-n;o>0&&(r=this.data.substr(n),e=parseInt(r,10),t.put(e,3*o+1))},z=n}(),e=function(){if(H)return J;H=1;const t=q(),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=t.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let e=45*n.indexOf(this.data[r]);e+=n.indexOf(this.data[r+1]),t.put(e,11)}this.data.length%2&&t.put(n.indexOf(this.data[r]),6)},J=r}(),o=function(){if(Y)return K;Y=1;const t=q();function n(n){this.mode=t.BYTE,this.data="string"==typeof n?(new TextEncoder).encode(n):new Uint8Array(n)}return n.getBitsLength=function(t){return 8*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){for(let n=0,r=this.data.length;n<r;n++)t.put(this.data[n],8)},K=n}(),i=function(){if(V)return G;V=1;const t=q(),n=s();function r(n){this.mode=t.KANJI,this.data=n}return r.getBitsLength=function(t){return 13*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r<this.data.length;r++){let e=n.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}},G=r}(),u=Z(),c=s(),f=ot();function a(t){return unescape(encodeURIComponent(t)).length}function h(t,n,r){const e=[];let o;for(;null!==(o=t.exec(r));)e.push({data:o[0],index:o.index,mode:n,length:o[0].length});return e}function l(t){const r=h(u.NUMERIC,n.NUMERIC,t),e=h(u.ALPHANUMERIC,n.ALPHANUMERIC,t);let o,i;return c.isKanjiModeEnabled()?(o=h(u.BYTE,n.BYTE,t),i=h(u.KANJI,n.KANJI,t)):(o=h(u.BYTE_KANJI,n.BYTE,t),i=[]),r.concat(e,o,i).sort((function(t,n){return t.index-n.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,u){switch(u){case n.NUMERIC:return r.getBitsLength(t);case n.ALPHANUMERIC:return e.getBitsLength(t);case n.KANJI:return i.getBitsLength(t);case n.BYTE:return o.getBitsLength(t)}}function w(t,u){let f;const s=n.getBestModeForData(t);if(f=n.from(u,s),f!==n.BYTE&&f.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(f)+".\n Suggested mode is: "+n.toString(s));switch(f!==n.KANJI||c.isKanjiModeEnabled()||(f=n.BYTE),f){case n.NUMERIC:return new r(t);case n.ALPHANUMERIC:return new e(t);case n.KANJI:return new i(t);case n.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,n){return"string"==typeof n?t.push(w(n,null)):n.data&&t.push(w(n.data,n.mode)),t}),[])},t.fromString=function(r,e){const o=function(t,r){const e={},o={start:{}};let i=["start"];for(let u=0;u<t.length;u++){const c=t[u],f=[];for(let t=0;t<c.length;t++){const s=c[t],a=""+u+t;f.push(a),e[a]={node:s,lastCount:0},o[a]={};for(let t=0;t<i.length;t++){const u=i[t];e[u]&&e[u].node.mode===s.mode?(o[u][a]=d(e[u].lastCount+s.length,s.mode)-d(e[u].lastCount,s.mode),e[u].lastCount+=s.length):(e[u]&&(e[u].lastCount=s.length),o[u][a]=d(s.length,s.mode)+4+n.getCharCountIndicator(s.mode,r))}}i=f}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:e}}(function(t){const r=[];for(let e=0;e<t.length;e++){const o=t[e];switch(o.mode){case n.NUMERIC:r.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:r.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:r.push([o,{data:o.data,mode:n.BYTE,length:a(o.data)}]);break;case n.BYTE:r.push([{data:o.data,mode:n.BYTE,length:a(o.data)}])}}return r}(l(r,c.isKanjiModeEnabled())),e),i=f.find_path(o.map,"start","end"),u=[];for(let t=1;t<i.length-1;t++)u.push(o.table[i[t]].node);return t.fromArray(u.reduce((function(t,n){const r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)}),[]))},t.rawSplit=function(n){return t.fromArray(l(n,c.isKanjiModeEnabled()))}}(rt)),rt);function B(t,n,r){const e=t.size,o=y.getEncodedBits(n,r);let i,u;for(i=0;i<15;i++)u=1==(o>>i&1),t.set(i<6?i:i<8?i+1:e-15+i,8,u,!0),t.set(8,i<8?e-i-1:i<9?15-i-1+1:15-i-1,u,!0);t.set(e-8,8,1,!0)}function C(n,c,s,h){let l;if(Array.isArray(n))l=k.fromArray(n);else{if("string"!=typeof n)throw new Error("Invalid data");{let t=c;if(!t){const r=k.rawSplit(n);t=v.getBestVersionForData(r,s)}l=k.fromString(n,t||40)}}const d=v.getBestVersionForData(l,s);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(c){if(c<d)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+d+".\n")}else c=d;const w=function(n,e,o){const i=new r;o.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),T.getCharCountIndicator(t.mode,n)),t.write(i)}));const u=8*(t.getSymbolTotalCodewords(n)-f.getTotalCodewordsCount(n,e));for(i.getLengthInBits()+4<=u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const c=(u-i.getLengthInBits())/8;for(let t=0;t<c;t++)i.put(t%2?17:236,8);return function(n,r,e){const o=t.getSymbolTotalCodewords(r),i=o-f.getTotalCodewordsCount(r,e),u=f.getBlocksCount(r,e),c=u-o%u,s=Math.floor(o/u),h=Math.floor(i/u),l=h+1,d=s-h,w=new a(d);let v=0;const g=new Array(u),p=new Array(u);let m=0;const E=new Uint8Array(n.buffer);for(let t=0;t<u;t++){const n=t<c?h:l;g[t]=E.slice(v,v+n),p[t]=w.encode(g[t]),v+=n,m=Math.max(m,n)}const y=new Uint8Array(o);let A,b,M=0;for(A=0;A<m;A++)for(b=0;b<u;b++)A<g[b].length&&(y[M++]=g[b][A]);for(A=0;A<d;A++)for(b=0;b<u;b++)y[M++]=p[b][A];return y}(i,n,e)}(c,s,l),g=t.getSymbolSize(c),p=new e(g);return function(t,n){const r=t.size,e=i.getPositions(n);for(let n=0;n<e.length;n++){const o=e[n][0],i=e[n][1];for(let n=-1;n<=7;n++)if(!(o+n<=-1||r<=o+n))for(let e=-1;e<=7;e++)i+e<=-1||r<=i+e||t.set(o+n,i+e,n>=0&&n<=6&&(0===e||6===e)||e>=0&&e<=6&&(0===n||6===n)||n>=2&&n<=4&&e>=2&&e<=4,!0)}}(p,c),function(t){const n=t.size;for(let r=8;r<n-8;r++){const n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(p),function(t,n){const r=o.getPositions(n);for(let n=0;n<r.length;n++){const e=r[n][0],o=r[n][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)t.set(e+n,o+r,-2===n||2===n||-2===r||2===r||0===n&&0===r,!0)}}(p,c),B(p,s,0),c>=7&&function(t,n){const r=t.size,e=v.getEncodedBits(n);let o,i,u;for(let n=0;n<18;n++)o=Math.floor(n/3),i=n%3+r-8-3,u=1==(e>>n&1),t.set(o,i,u,!0),t.set(i,o,u,!0)}(p,c),function(t,n){const r=t.size;let e=-1,o=r-1,i=7,u=0;for(let c=r-1;c>0;c-=2)for(6===c&&c--;;){for(let r=0;r<2;r++)if(!t.isReserved(o,c-r)){let e=!1;u<n.length&&(e=1==(n[u]>>>i&1)),t.set(o,c-r,e),i--,-1===i&&(u++,i=7)}if(o+=e,o<0||r<=o){o-=e,e=-e;break}}}(p,w),isNaN(h)&&(h=u.getBestMask(p,B.bind(null,p,s))),u.applyMask(h,p),B(p,s,h),{modules:p,version:c,errorCorrectionLevel:s,maskPattern:h,segments:l}}return c.create=function(r,e){if(void 0===r||""===r)throw new Error("No input text");let o,i,c=n.M;return void 0!==e&&(c=n.from(e.errorCorrectionLevel,n.M),o=v.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&t.setToSJISFunction(e.toSJISFunc)),C(r,o,c,i)},c}var ut,ct,ft={},st={};function at(){return ut||(ut=1,function(t){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+t);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map((function(t){return[t,t]})))),6===n.length&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const r=t.width&&t.width>=21?t.width:void 0;return{width:r,scale:r?4:t.scale||4,margin:null==t.margin||t.margin<0?4:t.margin,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,n){return n.width&&n.width>=t+2*n.margin?n.width/(t+2*n.margin):n.scale},t.getImageWidth=function(n,r){const e=t.getScale(n,r);return Math.floor((n+2*r.margin)*e)},t.qrToImageData=function(n,r,e){const o=r.modules.size,i=r.modules.data,u=t.getScale(o,e),c=Math.floor((o+2*e.margin)*u),f=e.margin*u,s=[e.color.light,e.color.dark];for(let t=0;t<c;t++)for(let r=0;r<c;r++){let a=4*(t*c+r),h=e.color.light;t>=f&&r>=f&&t<c-f&&r<c-f&&(h=s[i[Math.floor((t-f)/u)*o+Math.floor((r-f)/u)]?1:0]),n[a++]=h.r,n[a++]=h.g,n[a++]=h.b,n[a]=h.a}}}(st)),st}var ht,lt,dt={};var wt=function(){if(lt)return o;lt=1;const t=i(),n=it(),r=(ct||(ct=1,function(t){const n=at();t.render=function(t,r,e){let o=e,i=r;void 0!==o||r&&r.getContext||(o=r,r=void 0),r||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=n.getOptions(o);const u=n.getImageWidth(t.modules.size,o),c=i.getContext("2d"),f=c.createImageData(u,u);return n.qrToImageData(f.data,t,o),function(t,n,r){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=r,n.width=r,n.style.height=r+"px",n.style.width=r+"px"}(c,i,u),c.putImageData(f,0,0),i},t.renderToDataURL=function(n,r,e){let o=e;return void 0!==o||r&&r.getContext||(o=r,r=void 0),o||(o={}),t.render(n,r,o).toDataURL(o.type||"image/png",(o.rendererOpts||{}).quality)}}(ft)),ft),e=function(){if(ht)return dt;ht=1;const t=at();function n(t,n){const r=t.a/255,e=n+'="'+t.hex+'"';return r<1?e+" "+n+'-opacity="'+r.toFixed(2).slice(1)+'"':e}function r(t,n,r){let e=t+n;return void 0!==r&&(e+=" "+r),e}return dt.render=function(e,o,i){const u=t.getOptions(o),c=e.modules.size,f=e.modules.data,s=c+2*u.margin,a=u.color.light.a?"<path "+n(u.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",h="<path "+n(u.color.dark,"stroke")+' d="'+function(t,n,e){let o="",i=0,u=!1,c=0;for(let f=0;f<t.length;f++){const s=Math.floor(f%n),a=Math.floor(f/n);s||u||(u=!0),t[f]?(c++,f>0&&s>0&&t[f-1]||(o+=u?r("M",s+e,.5+a+e):r("m",i,0),i=0,u=!1),s+1<n&&t[f+1]||(o+=r("h",c),c=0)):i++}return o}(f,c,u.margin)+'"/>',l='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+'viewBox="0 0 '+s+" "+s+'" shape-rendering="crispEdges">'+a+h+"</svg>\n";return"function"==typeof i&&i(null,l),l},dt}();function u(r,e,o,i,u){const c=[].slice.call(arguments,1),f=c.length,s="function"==typeof c[f-1];if(!s&&!t())throw new Error("Callback required as last argument");if(!s){if(f<1)throw new Error("Too few arguments provided");return 1===f?(o=e,e=i=void 0):2!==f||e.getContext||(i=o,o=e,e=void 0),new Promise((function(t,u){try{const u=n.create(o,i);t(r(u,e,i))}catch(t){u(t)}}))}if(f<2)throw new Error("Too few arguments provided");2===f?(u=o,o=e,e=i=void 0):3===f&&(e.getContext&&void 0===u?(u=i,i=void 0):(u=i,i=o,o=e,e=void 0));try{const t=n.create(o,i);u(null,r(t,e,i))}catch(t){u(t)}}return o.create=n.create,o.toCanvas=u.bind(null,r.render),o.toDataURL=u.bind(null,r.renderToDataURL),o.toString=u.bind(null,(function(t,n,r){return e.render(t,r)})),o}(),vt=t({__proto__:null,default:n(wt)},[wt]);export{vt as b}
|