texlite 0.8.2 → 0.8.4
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/DESIGN.md +8 -1
- package/dist/client/assets/AdminUsers-CqOmV9rq.js +1 -0
- package/dist/client/assets/CitationLibraryDialog-BmWFXTW2.js +1 -0
- package/dist/client/assets/Dashboard-BfN2bCgZ.js +2 -0
- package/dist/client/assets/GitDialog-BCfSHuMB.js +3 -0
- package/dist/client/assets/HistoryDialog-BtQhyTr9.js +5 -0
- package/dist/client/assets/{LatexEditor-DbU8fMFZ.js → LatexEditor-DSopAHbC.js} +2 -2
- package/dist/client/assets/PdfPreview-BDkU20jP.js +1 -0
- package/dist/client/assets/ProjectIconPickerDialog-GAd8HGOx.js +1 -0
- package/dist/client/assets/ProjectNavigationDialogs-BTLcRY7i.js +1 -0
- package/dist/client/assets/ProjectSettings-BJWTkoZq.js +1 -0
- package/dist/client/assets/ProjectWorkspace-WLYA7BSv.js +27 -0
- package/dist/client/assets/SystemMetricsDialog-C9P4TSQl.js +1 -0
- package/dist/client/assets/TagManagementDialog-LYbib36_.js +1 -0
- package/dist/client/assets/WordCountDialog-BFg0GeJy.js +1 -0
- package/dist/client/assets/check-bnimQPun.js +1 -0
- package/dist/client/assets/chevron-left-DNM7mhNi.js +1 -0
- package/dist/client/assets/citationLibrary-ZeQPCv5O.js +26 -0
- package/dist/client/assets/hard-drive-CF3WDfkG.js +1 -0
- package/dist/client/assets/index-CzVDvC5h.js +14 -0
- package/dist/client/assets/index-RjUuWk8F.css +1 -0
- package/dist/client/assets/key-round-BaIj7Jch.js +1 -0
- package/dist/client/assets/{minus-B08vgSQJ.js → minus-Beso_n-6.js} +1 -1
- package/dist/client/assets/plus-BfEC7mzf.js +1 -0
- package/dist/client/assets/{react-BoEjKzFZ.js → react-BVUjbTTn.js} +1 -1
- package/dist/client/assets/refresh-cw-FZs9MtoA.js +1 -0
- package/dist/client/assets/search-DL2UGvdj.js +1 -0
- package/dist/client/assets/sigma-CSRwPPkk.js +1 -0
- package/dist/client/assets/{spellCheck-9fdyhJtV.js → spellCheck-L9gD2d1M.js} +1 -1
- package/dist/client/assets/tags-CjkWzXqX.js +1 -0
- package/dist/client/assets/type-D1mmDdLM.js +1 -0
- package/dist/client/assets/user-plus-YJ3ftuL5.js +1 -0
- package/dist/client/assets/x-BDSEosRE.js +1 -0
- package/dist/client/index.html +3 -3
- package/dist/server/collaboration.js +12 -5
- package/dist/server/db.js +4 -1
- package/dist/server/latexCompletion.js +37 -10
- package/dist/server/lucideIcons.js +37 -38
- package/dist/server/projects.js +34 -12
- package/dist/shared/lucide-icons/a-arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/a-arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/a-large-small.svg +1 -0
- package/dist/shared/lucide-icons/accessibility.svg +1 -0
- package/dist/shared/lucide-icons/activity.svg +1 -0
- package/dist/shared/lucide-icons/air-vent.svg +1 -0
- package/dist/shared/lucide-icons/airplay.svg +1 -0
- package/dist/shared/lucide-icons/alarm-clock-check.svg +1 -0
- package/dist/shared/lucide-icons/alarm-clock-minus.svg +1 -0
- package/dist/shared/lucide-icons/alarm-clock-off.svg +1 -0
- package/dist/shared/lucide-icons/alarm-clock-plus.svg +1 -0
- package/dist/shared/lucide-icons/alarm-clock.svg +1 -0
- package/dist/shared/lucide-icons/alarm-smoke.svg +1 -0
- package/dist/shared/lucide-icons/album.svg +1 -0
- package/dist/shared/lucide-icons/align-center-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/align-center-vertical.svg +1 -0
- package/dist/shared/lucide-icons/align-center.svg +1 -0
- package/dist/shared/lucide-icons/align-end-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/align-end-vertical.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-distribute-center.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-distribute-end.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-distribute-start.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-justify-center.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-justify-end.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-justify-start.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-space-around.svg +1 -0
- package/dist/shared/lucide-icons/align-horizontal-space-between.svg +1 -0
- package/dist/shared/lucide-icons/align-justify.svg +1 -0
- package/dist/shared/lucide-icons/align-left.svg +1 -0
- package/dist/shared/lucide-icons/align-right.svg +1 -0
- package/dist/shared/lucide-icons/align-start-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/align-start-vertical.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-distribute-center.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-distribute-end.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-distribute-start.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-justify-center.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-justify-end.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-justify-start.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-space-around.svg +1 -0
- package/dist/shared/lucide-icons/align-vertical-space-between.svg +1 -0
- package/dist/shared/lucide-icons/ambulance.svg +1 -0
- package/dist/shared/lucide-icons/ampersand.svg +1 -0
- package/dist/shared/lucide-icons/ampersands.svg +1 -0
- package/dist/shared/lucide-icons/amphora.svg +1 -0
- package/dist/shared/lucide-icons/anchor.svg +1 -0
- package/dist/shared/lucide-icons/angry.svg +1 -0
- package/dist/shared/lucide-icons/annoyed.svg +1 -0
- package/dist/shared/lucide-icons/antenna.svg +1 -0
- package/dist/shared/lucide-icons/anvil.svg +1 -0
- package/dist/shared/lucide-icons/aperture.svg +1 -0
- package/dist/shared/lucide-icons/app-window-mac.svg +1 -0
- package/dist/shared/lucide-icons/app-window.svg +1 -0
- package/dist/shared/lucide-icons/apple.svg +1 -0
- package/dist/shared/lucide-icons/archive-restore.svg +1 -0
- package/dist/shared/lucide-icons/archive-x.svg +1 -0
- package/dist/shared/lucide-icons/archive.svg +1 -0
- package/dist/shared/lucide-icons/armchair.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-down-dash.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-down.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-left-dash.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-left.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-right-dash.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-right.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-up-dash.svg +1 -0
- package/dist/shared/lucide-icons/arrow-big-up.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-az.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-from-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-left.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-narrow-wide.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-right.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-to-dot.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-to-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-up.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-wide-narrow.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down-za.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down01.svg +1 -0
- package/dist/shared/lucide-icons/arrow-down10.svg +1 -0
- package/dist/shared/lucide-icons/arrow-left-from-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-left-right.svg +1 -0
- package/dist/shared/lucide-icons/arrow-left-to-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-left.svg +1 -0
- package/dist/shared/lucide-icons/arrow-right-from-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-right-left.svg +1 -0
- package/dist/shared/lucide-icons/arrow-right-to-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-right.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-az.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-down.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-from-dot.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-from-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-left.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-narrow-wide.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-right.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-to-line.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-wide-narrow.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up-za.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up01.svg +1 -0
- package/dist/shared/lucide-icons/arrow-up10.svg +1 -0
- package/dist/shared/lucide-icons/arrows-up-from-line.svg +1 -0
- package/dist/shared/lucide-icons/asterisk.svg +1 -0
- package/dist/shared/lucide-icons/at-sign.svg +1 -0
- package/dist/shared/lucide-icons/atom.svg +1 -0
- package/dist/shared/lucide-icons/audio-lines.svg +1 -0
- package/dist/shared/lucide-icons/audio-waveform.svg +1 -0
- package/dist/shared/lucide-icons/award.svg +1 -0
- package/dist/shared/lucide-icons/axe.svg +1 -0
- package/dist/shared/lucide-icons/axis3d.svg +1 -0
- package/dist/shared/lucide-icons/baby.svg +1 -0
- package/dist/shared/lucide-icons/backpack.svg +1 -0
- package/dist/shared/lucide-icons/badge-alert.svg +1 -0
- package/dist/shared/lucide-icons/badge-cent.svg +1 -0
- package/dist/shared/lucide-icons/badge-check.svg +1 -0
- package/dist/shared/lucide-icons/badge-dollar-sign.svg +1 -0
- package/dist/shared/lucide-icons/badge-euro.svg +1 -0
- package/dist/shared/lucide-icons/badge-help.svg +1 -0
- package/dist/shared/lucide-icons/badge-indian-rupee.svg +1 -0
- package/dist/shared/lucide-icons/badge-info.svg +1 -0
- package/dist/shared/lucide-icons/badge-japanese-yen.svg +1 -0
- package/dist/shared/lucide-icons/badge-minus.svg +1 -0
- package/dist/shared/lucide-icons/badge-percent.svg +1 -0
- package/dist/shared/lucide-icons/badge-plus.svg +1 -0
- package/dist/shared/lucide-icons/badge-pound-sterling.svg +1 -0
- package/dist/shared/lucide-icons/badge-russian-ruble.svg +1 -0
- package/dist/shared/lucide-icons/badge-swiss-franc.svg +1 -0
- package/dist/shared/lucide-icons/badge-x.svg +1 -0
- package/dist/shared/lucide-icons/badge.svg +1 -0
- package/dist/shared/lucide-icons/baggage-claim.svg +1 -0
- package/dist/shared/lucide-icons/ban.svg +1 -0
- package/dist/shared/lucide-icons/banana.svg +1 -0
- package/dist/shared/lucide-icons/bandage.svg +1 -0
- package/dist/shared/lucide-icons/banknote.svg +1 -0
- package/dist/shared/lucide-icons/barcode.svg +1 -0
- package/dist/shared/lucide-icons/baseline.svg +1 -0
- package/dist/shared/lucide-icons/bath.svg +1 -0
- package/dist/shared/lucide-icons/battery-charging.svg +1 -0
- package/dist/shared/lucide-icons/battery-full.svg +1 -0
- package/dist/shared/lucide-icons/battery-low.svg +1 -0
- package/dist/shared/lucide-icons/battery-medium.svg +1 -0
- package/dist/shared/lucide-icons/battery-warning.svg +1 -0
- package/dist/shared/lucide-icons/battery.svg +1 -0
- package/dist/shared/lucide-icons/beaker.svg +1 -0
- package/dist/shared/lucide-icons/bean-off.svg +1 -0
- package/dist/shared/lucide-icons/bean.svg +1 -0
- package/dist/shared/lucide-icons/bed-double.svg +1 -0
- package/dist/shared/lucide-icons/bed-single.svg +1 -0
- package/dist/shared/lucide-icons/bed.svg +1 -0
- package/dist/shared/lucide-icons/beef.svg +1 -0
- package/dist/shared/lucide-icons/beer-off.svg +1 -0
- package/dist/shared/lucide-icons/beer.svg +1 -0
- package/dist/shared/lucide-icons/bell-dot.svg +1 -0
- package/dist/shared/lucide-icons/bell-electric.svg +1 -0
- package/dist/shared/lucide-icons/bell-minus.svg +1 -0
- package/dist/shared/lucide-icons/bell-off.svg +1 -0
- package/dist/shared/lucide-icons/bell-plus.svg +1 -0
- package/dist/shared/lucide-icons/bell-ring.svg +1 -0
- package/dist/shared/lucide-icons/bell.svg +1 -0
- package/dist/shared/lucide-icons/between-horizontal-end.svg +1 -0
- package/dist/shared/lucide-icons/between-horizontal-start.svg +1 -0
- package/dist/shared/lucide-icons/between-vertical-end.svg +1 -0
- package/dist/shared/lucide-icons/between-vertical-start.svg +1 -0
- package/dist/shared/lucide-icons/biceps-flexed.svg +1 -0
- package/dist/shared/lucide-icons/bike.svg +1 -0
- package/dist/shared/lucide-icons/binary.svg +1 -0
- package/dist/shared/lucide-icons/binoculars.svg +1 -0
- package/dist/shared/lucide-icons/biohazard.svg +1 -0
- package/dist/shared/lucide-icons/bird.svg +1 -0
- package/dist/shared/lucide-icons/bitcoin.svg +1 -0
- package/dist/shared/lucide-icons/blend.svg +1 -0
- package/dist/shared/lucide-icons/blinds.svg +1 -0
- package/dist/shared/lucide-icons/blocks.svg +1 -0
- package/dist/shared/lucide-icons/bluetooth-connected.svg +1 -0
- package/dist/shared/lucide-icons/bluetooth-off.svg +1 -0
- package/dist/shared/lucide-icons/bluetooth-searching.svg +1 -0
- package/dist/shared/lucide-icons/bluetooth.svg +1 -0
- package/dist/shared/lucide-icons/bold.svg +1 -0
- package/dist/shared/lucide-icons/bolt.svg +1 -0
- package/dist/shared/lucide-icons/bomb.svg +1 -0
- package/dist/shared/lucide-icons/bone.svg +1 -0
- package/dist/shared/lucide-icons/book-a.svg +1 -0
- package/dist/shared/lucide-icons/book-audio.svg +1 -0
- package/dist/shared/lucide-icons/book-check.svg +1 -0
- package/dist/shared/lucide-icons/book-copy.svg +1 -0
- package/dist/shared/lucide-icons/book-dashed.svg +1 -0
- package/dist/shared/lucide-icons/book-down.svg +1 -0
- package/dist/shared/lucide-icons/book-headphones.svg +1 -0
- package/dist/shared/lucide-icons/book-heart.svg +1 -0
- package/dist/shared/lucide-icons/book-image.svg +1 -0
- package/dist/shared/lucide-icons/book-key.svg +1 -0
- package/dist/shared/lucide-icons/book-lock.svg +1 -0
- package/dist/shared/lucide-icons/book-marked.svg +1 -0
- package/dist/shared/lucide-icons/book-minus.svg +1 -0
- package/dist/shared/lucide-icons/book-open-check.svg +1 -0
- package/dist/shared/lucide-icons/book-open-text.svg +1 -0
- package/dist/shared/lucide-icons/book-open.svg +1 -0
- package/dist/shared/lucide-icons/book-plus.svg +1 -0
- package/dist/shared/lucide-icons/book-text.svg +1 -0
- package/dist/shared/lucide-icons/book-type.svg +1 -0
- package/dist/shared/lucide-icons/book-up.svg +1 -0
- package/dist/shared/lucide-icons/book-up2.svg +1 -0
- package/dist/shared/lucide-icons/book-user.svg +1 -0
- package/dist/shared/lucide-icons/book-x.svg +1 -0
- package/dist/shared/lucide-icons/book.svg +1 -0
- package/dist/shared/lucide-icons/bookmark-check.svg +1 -0
- package/dist/shared/lucide-icons/bookmark-minus.svg +1 -0
- package/dist/shared/lucide-icons/bookmark-plus.svg +1 -0
- package/dist/shared/lucide-icons/bookmark-x.svg +1 -0
- package/dist/shared/lucide-icons/bookmark.svg +1 -0
- package/dist/shared/lucide-icons/boom-box.svg +1 -0
- package/dist/shared/lucide-icons/bot-message-square.svg +1 -0
- package/dist/shared/lucide-icons/bot-off.svg +1 -0
- package/dist/shared/lucide-icons/bot.svg +1 -0
- package/dist/shared/lucide-icons/box.svg +1 -0
- package/dist/shared/lucide-icons/boxes.svg +1 -0
- package/dist/shared/lucide-icons/braces.svg +1 -0
- package/dist/shared/lucide-icons/brackets.svg +1 -0
- package/dist/shared/lucide-icons/brain-circuit.svg +1 -0
- package/dist/shared/lucide-icons/brain-cog.svg +1 -0
- package/dist/shared/lucide-icons/brain.svg +1 -0
- package/dist/shared/lucide-icons/brick-wall.svg +1 -0
- package/dist/shared/lucide-icons/briefcase-business.svg +1 -0
- package/dist/shared/lucide-icons/briefcase-conveyor-belt.svg +1 -0
- package/dist/shared/lucide-icons/briefcase-medical.svg +1 -0
- package/dist/shared/lucide-icons/briefcase.svg +1 -0
- package/dist/shared/lucide-icons/bring-to-front.svg +1 -0
- package/dist/shared/lucide-icons/brush.svg +1 -0
- package/dist/shared/lucide-icons/bug-off.svg +1 -0
- package/dist/shared/lucide-icons/bug-play.svg +1 -0
- package/dist/shared/lucide-icons/bug.svg +1 -0
- package/dist/shared/lucide-icons/building.svg +1 -0
- package/dist/shared/lucide-icons/building2.svg +1 -0
- package/dist/shared/lucide-icons/bus-front.svg +1 -0
- package/dist/shared/lucide-icons/bus.svg +1 -0
- package/dist/shared/lucide-icons/cable-car.svg +1 -0
- package/dist/shared/lucide-icons/cable.svg +1 -0
- package/dist/shared/lucide-icons/cake-slice.svg +1 -0
- package/dist/shared/lucide-icons/cake.svg +1 -0
- package/dist/shared/lucide-icons/calculator.svg +1 -0
- package/dist/shared/lucide-icons/calendar-arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/calendar-arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/calendar-check.svg +1 -0
- package/dist/shared/lucide-icons/calendar-check2.svg +1 -0
- package/dist/shared/lucide-icons/calendar-clock.svg +1 -0
- package/dist/shared/lucide-icons/calendar-cog.svg +1 -0
- package/dist/shared/lucide-icons/calendar-days.svg +1 -0
- package/dist/shared/lucide-icons/calendar-fold.svg +1 -0
- package/dist/shared/lucide-icons/calendar-heart.svg +1 -0
- package/dist/shared/lucide-icons/calendar-minus.svg +1 -0
- package/dist/shared/lucide-icons/calendar-minus2.svg +1 -0
- package/dist/shared/lucide-icons/calendar-off.svg +1 -0
- package/dist/shared/lucide-icons/calendar-plus.svg +1 -0
- package/dist/shared/lucide-icons/calendar-plus2.svg +1 -0
- package/dist/shared/lucide-icons/calendar-range.svg +1 -0
- package/dist/shared/lucide-icons/calendar-search.svg +1 -0
- package/dist/shared/lucide-icons/calendar-sync.svg +1 -0
- package/dist/shared/lucide-icons/calendar-x.svg +1 -0
- package/dist/shared/lucide-icons/calendar-x2.svg +1 -0
- package/dist/shared/lucide-icons/calendar.svg +1 -0
- package/dist/shared/lucide-icons/calendar1.svg +1 -0
- package/dist/shared/lucide-icons/camera-off.svg +1 -0
- package/dist/shared/lucide-icons/camera.svg +1 -0
- package/dist/shared/lucide-icons/candy-cane.svg +1 -0
- package/dist/shared/lucide-icons/candy-off.svg +1 -0
- package/dist/shared/lucide-icons/candy.svg +1 -0
- package/dist/shared/lucide-icons/cannabis.svg +1 -0
- package/dist/shared/lucide-icons/captions-off.svg +1 -0
- package/dist/shared/lucide-icons/captions.svg +1 -0
- package/dist/shared/lucide-icons/car-front.svg +1 -0
- package/dist/shared/lucide-icons/car-taxi-front.svg +1 -0
- package/dist/shared/lucide-icons/car.svg +1 -0
- package/dist/shared/lucide-icons/caravan.svg +1 -0
- package/dist/shared/lucide-icons/carrot.svg +1 -0
- package/dist/shared/lucide-icons/case-lower.svg +1 -0
- package/dist/shared/lucide-icons/case-sensitive.svg +1 -0
- package/dist/shared/lucide-icons/case-upper.svg +1 -0
- package/dist/shared/lucide-icons/cassette-tape.svg +1 -0
- package/dist/shared/lucide-icons/cast.svg +1 -0
- package/dist/shared/lucide-icons/castle.svg +1 -0
- package/dist/shared/lucide-icons/cat.svg +1 -0
- package/dist/shared/lucide-icons/cctv.svg +1 -0
- package/dist/shared/lucide-icons/chart-area.svg +1 -0
- package/dist/shared/lucide-icons/chart-bar-big.svg +1 -0
- package/dist/shared/lucide-icons/chart-bar-decreasing.svg +1 -0
- package/dist/shared/lucide-icons/chart-bar-increasing.svg +1 -0
- package/dist/shared/lucide-icons/chart-bar-stacked.svg +1 -0
- package/dist/shared/lucide-icons/chart-bar.svg +1 -0
- package/dist/shared/lucide-icons/chart-candlestick.svg +1 -0
- package/dist/shared/lucide-icons/chart-column-big.svg +1 -0
- package/dist/shared/lucide-icons/chart-column-decreasing.svg +1 -0
- package/dist/shared/lucide-icons/chart-column-increasing.svg +1 -0
- package/dist/shared/lucide-icons/chart-column-stacked.svg +1 -0
- package/dist/shared/lucide-icons/chart-column.svg +1 -0
- package/dist/shared/lucide-icons/chart-gantt.svg +1 -0
- package/dist/shared/lucide-icons/chart-line.svg +1 -0
- package/dist/shared/lucide-icons/chart-network.svg +1 -0
- package/dist/shared/lucide-icons/chart-no-axes-column-decreasing.svg +1 -0
- package/dist/shared/lucide-icons/chart-no-axes-column-increasing.svg +1 -0
- package/dist/shared/lucide-icons/chart-no-axes-column.svg +1 -0
- package/dist/shared/lucide-icons/chart-no-axes-combined.svg +1 -0
- package/dist/shared/lucide-icons/chart-no-axes-gantt.svg +1 -0
- package/dist/shared/lucide-icons/chart-pie.svg +1 -0
- package/dist/shared/lucide-icons/chart-scatter.svg +1 -0
- package/dist/shared/lucide-icons/chart-spline.svg +1 -0
- package/dist/shared/lucide-icons/check-check.svg +1 -0
- package/dist/shared/lucide-icons/check.svg +1 -0
- package/dist/shared/lucide-icons/chef-hat.svg +1 -0
- package/dist/shared/lucide-icons/cherry.svg +1 -0
- package/dist/shared/lucide-icons/chevron-down.svg +1 -0
- package/dist/shared/lucide-icons/chevron-first.svg +1 -0
- package/dist/shared/lucide-icons/chevron-last.svg +1 -0
- package/dist/shared/lucide-icons/chevron-left.svg +1 -0
- package/dist/shared/lucide-icons/chevron-right.svg +1 -0
- package/dist/shared/lucide-icons/chevron-up.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-down-up.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-down.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-left-right-ellipsis.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-left-right.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-left.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-right-left.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-right.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-up-down.svg +1 -0
- package/dist/shared/lucide-icons/chevrons-up.svg +1 -0
- package/dist/shared/lucide-icons/chrome.svg +1 -0
- package/dist/shared/lucide-icons/church.svg +1 -0
- package/dist/shared/lucide-icons/cigarette-off.svg +1 -0
- package/dist/shared/lucide-icons/cigarette.svg +1 -0
- package/dist/shared/lucide-icons/circle-alert.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-left.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-out-down-left.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-out-down-right.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-out-up-left.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-out-up-right.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-right.svg +1 -0
- package/dist/shared/lucide-icons/circle-arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/circle-check-big.svg +1 -0
- package/dist/shared/lucide-icons/circle-check.svg +1 -0
- package/dist/shared/lucide-icons/circle-chevron-down.svg +1 -0
- package/dist/shared/lucide-icons/circle-chevron-left.svg +1 -0
- package/dist/shared/lucide-icons/circle-chevron-right.svg +1 -0
- package/dist/shared/lucide-icons/circle-chevron-up.svg +1 -0
- package/dist/shared/lucide-icons/circle-dashed.svg +1 -0
- package/dist/shared/lucide-icons/circle-divide.svg +1 -0
- package/dist/shared/lucide-icons/circle-dollar-sign.svg +1 -0
- package/dist/shared/lucide-icons/circle-dot-dashed.svg +1 -0
- package/dist/shared/lucide-icons/circle-dot.svg +1 -0
- package/dist/shared/lucide-icons/circle-ellipsis.svg +1 -0
- package/dist/shared/lucide-icons/circle-equal.svg +1 -0
- package/dist/shared/lucide-icons/circle-fading-arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/circle-fading-plus.svg +1 -0
- package/dist/shared/lucide-icons/circle-gauge.svg +1 -0
- package/dist/shared/lucide-icons/circle-help.svg +1 -0
- package/dist/shared/lucide-icons/circle-minus.svg +1 -0
- package/dist/shared/lucide-icons/circle-off.svg +1 -0
- package/dist/shared/lucide-icons/circle-parking-off.svg +1 -0
- package/dist/shared/lucide-icons/circle-parking.svg +1 -0
- package/dist/shared/lucide-icons/circle-pause.svg +1 -0
- package/dist/shared/lucide-icons/circle-percent.svg +1 -0
- package/dist/shared/lucide-icons/circle-play.svg +1 -0
- package/dist/shared/lucide-icons/circle-plus.svg +1 -0
- package/dist/shared/lucide-icons/circle-power.svg +1 -0
- package/dist/shared/lucide-icons/circle-slash.svg +1 -0
- package/dist/shared/lucide-icons/circle-slash2.svg +1 -0
- package/dist/shared/lucide-icons/circle-stop.svg +1 -0
- package/dist/shared/lucide-icons/circle-user-round.svg +1 -0
- package/dist/shared/lucide-icons/circle-user.svg +1 -0
- package/dist/shared/lucide-icons/circle-x.svg +1 -0
- package/dist/shared/lucide-icons/circle.svg +1 -0
- package/dist/shared/lucide-icons/circuit-board.svg +1 -0
- package/dist/shared/lucide-icons/citrus.svg +1 -0
- package/dist/shared/lucide-icons/clapperboard.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-check.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-copy.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-list.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-minus.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-paste.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-pen-line.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-pen.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-plus.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-type.svg +1 -0
- package/dist/shared/lucide-icons/clipboard-x.svg +1 -0
- package/dist/shared/lucide-icons/clipboard.svg +1 -0
- package/dist/shared/lucide-icons/clock-alert.svg +1 -0
- package/dist/shared/lucide-icons/clock-arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/clock-arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/clock.svg +1 -0
- package/dist/shared/lucide-icons/clock1.svg +1 -0
- package/dist/shared/lucide-icons/clock10.svg +1 -0
- package/dist/shared/lucide-icons/clock11.svg +1 -0
- package/dist/shared/lucide-icons/clock12.svg +1 -0
- package/dist/shared/lucide-icons/clock2.svg +1 -0
- package/dist/shared/lucide-icons/clock3.svg +1 -0
- package/dist/shared/lucide-icons/clock4.svg +1 -0
- package/dist/shared/lucide-icons/clock5.svg +1 -0
- package/dist/shared/lucide-icons/clock6.svg +1 -0
- package/dist/shared/lucide-icons/clock7.svg +1 -0
- package/dist/shared/lucide-icons/clock8.svg +1 -0
- package/dist/shared/lucide-icons/clock9.svg +1 -0
- package/dist/shared/lucide-icons/cloud-alert.svg +1 -0
- package/dist/shared/lucide-icons/cloud-cog.svg +1 -0
- package/dist/shared/lucide-icons/cloud-download.svg +1 -0
- package/dist/shared/lucide-icons/cloud-drizzle.svg +1 -0
- package/dist/shared/lucide-icons/cloud-fog.svg +1 -0
- package/dist/shared/lucide-icons/cloud-hail.svg +1 -0
- package/dist/shared/lucide-icons/cloud-lightning.svg +1 -0
- package/dist/shared/lucide-icons/cloud-moon-rain.svg +1 -0
- package/dist/shared/lucide-icons/cloud-moon.svg +1 -0
- package/dist/shared/lucide-icons/cloud-off.svg +1 -0
- package/dist/shared/lucide-icons/cloud-rain-wind.svg +1 -0
- package/dist/shared/lucide-icons/cloud-rain.svg +1 -0
- package/dist/shared/lucide-icons/cloud-snow.svg +1 -0
- package/dist/shared/lucide-icons/cloud-sun-rain.svg +1 -0
- package/dist/shared/lucide-icons/cloud-sun.svg +1 -0
- package/dist/shared/lucide-icons/cloud-upload.svg +1 -0
- package/dist/shared/lucide-icons/cloud.svg +1 -0
- package/dist/shared/lucide-icons/cloudy.svg +1 -0
- package/dist/shared/lucide-icons/clover.svg +1 -0
- package/dist/shared/lucide-icons/club.svg +1 -0
- package/dist/shared/lucide-icons/code-xml.svg +1 -0
- package/dist/shared/lucide-icons/code.svg +1 -0
- package/dist/shared/lucide-icons/codepen.svg +1 -0
- package/dist/shared/lucide-icons/codesandbox.svg +1 -0
- package/dist/shared/lucide-icons/coffee.svg +1 -0
- package/dist/shared/lucide-icons/cog.svg +1 -0
- package/dist/shared/lucide-icons/coins.svg +1 -0
- package/dist/shared/lucide-icons/columns2.svg +1 -0
- package/dist/shared/lucide-icons/columns3.svg +1 -0
- package/dist/shared/lucide-icons/columns4.svg +1 -0
- package/dist/shared/lucide-icons/combine.svg +1 -0
- package/dist/shared/lucide-icons/command.svg +1 -0
- package/dist/shared/lucide-icons/compass.svg +1 -0
- package/dist/shared/lucide-icons/component.svg +1 -0
- package/dist/shared/lucide-icons/computer.svg +1 -0
- package/dist/shared/lucide-icons/concierge-bell.svg +1 -0
- package/dist/shared/lucide-icons/cone.svg +1 -0
- package/dist/shared/lucide-icons/construction.svg +1 -0
- package/dist/shared/lucide-icons/contact-round.svg +1 -0
- package/dist/shared/lucide-icons/contact.svg +1 -0
- package/dist/shared/lucide-icons/container.svg +1 -0
- package/dist/shared/lucide-icons/contrast.svg +1 -0
- package/dist/shared/lucide-icons/cookie.svg +1 -0
- package/dist/shared/lucide-icons/cooking-pot.svg +1 -0
- package/dist/shared/lucide-icons/copy-check.svg +1 -0
- package/dist/shared/lucide-icons/copy-minus.svg +1 -0
- package/dist/shared/lucide-icons/copy-plus.svg +1 -0
- package/dist/shared/lucide-icons/copy-slash.svg +1 -0
- package/dist/shared/lucide-icons/copy-x.svg +1 -0
- package/dist/shared/lucide-icons/copy.svg +1 -0
- package/dist/shared/lucide-icons/copyleft.svg +1 -0
- package/dist/shared/lucide-icons/copyright.svg +1 -0
- package/dist/shared/lucide-icons/corner-down-left.svg +1 -0
- package/dist/shared/lucide-icons/corner-down-right.svg +1 -0
- package/dist/shared/lucide-icons/corner-left-down.svg +1 -0
- package/dist/shared/lucide-icons/corner-left-up.svg +1 -0
- package/dist/shared/lucide-icons/corner-right-down.svg +1 -0
- package/dist/shared/lucide-icons/corner-right-up.svg +1 -0
- package/dist/shared/lucide-icons/corner-up-left.svg +1 -0
- package/dist/shared/lucide-icons/corner-up-right.svg +1 -0
- package/dist/shared/lucide-icons/cpu.svg +1 -0
- package/dist/shared/lucide-icons/creative-commons.svg +1 -0
- package/dist/shared/lucide-icons/credit-card.svg +1 -0
- package/dist/shared/lucide-icons/croissant.svg +1 -0
- package/dist/shared/lucide-icons/crop.svg +1 -0
- package/dist/shared/lucide-icons/cross.svg +1 -0
- package/dist/shared/lucide-icons/crosshair.svg +1 -0
- package/dist/shared/lucide-icons/crown.svg +1 -0
- package/dist/shared/lucide-icons/cuboid.svg +1 -0
- package/dist/shared/lucide-icons/cup-soda.svg +1 -0
- package/dist/shared/lucide-icons/currency.svg +1 -0
- package/dist/shared/lucide-icons/cylinder.svg +1 -0
- package/dist/shared/lucide-icons/dam.svg +1 -0
- package/dist/shared/lucide-icons/database-backup.svg +1 -0
- package/dist/shared/lucide-icons/database-zap.svg +1 -0
- package/dist/shared/lucide-icons/database.svg +1 -0
- package/dist/shared/lucide-icons/delete.svg +1 -0
- package/dist/shared/lucide-icons/dessert.svg +1 -0
- package/dist/shared/lucide-icons/diameter.svg +1 -0
- package/dist/shared/lucide-icons/diamond-minus.svg +1 -0
- package/dist/shared/lucide-icons/diamond-percent.svg +1 -0
- package/dist/shared/lucide-icons/diamond-plus.svg +1 -0
- package/dist/shared/lucide-icons/diamond.svg +1 -0
- package/dist/shared/lucide-icons/dice1.svg +1 -0
- package/dist/shared/lucide-icons/dice2.svg +1 -0
- package/dist/shared/lucide-icons/dice3.svg +1 -0
- package/dist/shared/lucide-icons/dice4.svg +1 -0
- package/dist/shared/lucide-icons/dice5.svg +1 -0
- package/dist/shared/lucide-icons/dice6.svg +1 -0
- package/dist/shared/lucide-icons/dices.svg +1 -0
- package/dist/shared/lucide-icons/diff.svg +1 -0
- package/dist/shared/lucide-icons/disc-album.svg +1 -0
- package/dist/shared/lucide-icons/disc.svg +1 -0
- package/dist/shared/lucide-icons/disc2.svg +1 -0
- package/dist/shared/lucide-icons/disc3.svg +1 -0
- package/dist/shared/lucide-icons/divide.svg +1 -0
- package/dist/shared/lucide-icons/dna-off.svg +1 -0
- package/dist/shared/lucide-icons/dna.svg +1 -0
- package/dist/shared/lucide-icons/dock.svg +1 -0
- package/dist/shared/lucide-icons/dog.svg +1 -0
- package/dist/shared/lucide-icons/dollar-sign.svg +1 -0
- package/dist/shared/lucide-icons/donut.svg +1 -0
- package/dist/shared/lucide-icons/door-closed.svg +1 -0
- package/dist/shared/lucide-icons/door-open.svg +1 -0
- package/dist/shared/lucide-icons/dot.svg +1 -0
- package/dist/shared/lucide-icons/download.svg +1 -0
- package/dist/shared/lucide-icons/drafting-compass.svg +1 -0
- package/dist/shared/lucide-icons/drama.svg +1 -0
- package/dist/shared/lucide-icons/dribbble.svg +1 -0
- package/dist/shared/lucide-icons/drill.svg +1 -0
- package/dist/shared/lucide-icons/droplet-off.svg +1 -0
- package/dist/shared/lucide-icons/droplet.svg +1 -0
- package/dist/shared/lucide-icons/droplets.svg +1 -0
- package/dist/shared/lucide-icons/drum.svg +1 -0
- package/dist/shared/lucide-icons/drumstick.svg +1 -0
- package/dist/shared/lucide-icons/dumbbell.svg +1 -0
- package/dist/shared/lucide-icons/ear-off.svg +1 -0
- package/dist/shared/lucide-icons/ear.svg +1 -0
- package/dist/shared/lucide-icons/earth-lock.svg +1 -0
- package/dist/shared/lucide-icons/earth.svg +1 -0
- package/dist/shared/lucide-icons/eclipse.svg +1 -0
- package/dist/shared/lucide-icons/egg-fried.svg +1 -0
- package/dist/shared/lucide-icons/egg-off.svg +1 -0
- package/dist/shared/lucide-icons/egg.svg +1 -0
- package/dist/shared/lucide-icons/ellipsis-vertical.svg +1 -0
- package/dist/shared/lucide-icons/ellipsis.svg +1 -0
- package/dist/shared/lucide-icons/equal-approximately.svg +1 -0
- package/dist/shared/lucide-icons/equal-not.svg +1 -0
- package/dist/shared/lucide-icons/equal.svg +1 -0
- package/dist/shared/lucide-icons/eraser.svg +1 -0
- package/dist/shared/lucide-icons/ethernet-port.svg +1 -0
- package/dist/shared/lucide-icons/euro.svg +1 -0
- package/dist/shared/lucide-icons/expand.svg +1 -0
- package/dist/shared/lucide-icons/external-link.svg +1 -0
- package/dist/shared/lucide-icons/eye-closed.svg +1 -0
- package/dist/shared/lucide-icons/eye-off.svg +1 -0
- package/dist/shared/lucide-icons/eye.svg +1 -0
- package/dist/shared/lucide-icons/facebook.svg +1 -0
- package/dist/shared/lucide-icons/factory.svg +1 -0
- package/dist/shared/lucide-icons/fan.svg +1 -0
- package/dist/shared/lucide-icons/fast-forward.svg +1 -0
- package/dist/shared/lucide-icons/feather.svg +1 -0
- package/dist/shared/lucide-icons/fence.svg +1 -0
- package/dist/shared/lucide-icons/ferris-wheel.svg +1 -0
- package/dist/shared/lucide-icons/figma.svg +1 -0
- package/dist/shared/lucide-icons/file-archive.svg +1 -0
- package/dist/shared/lucide-icons/file-audio.svg +1 -0
- package/dist/shared/lucide-icons/file-audio2.svg +1 -0
- package/dist/shared/lucide-icons/file-axis3d.svg +1 -0
- package/dist/shared/lucide-icons/file-badge.svg +1 -0
- package/dist/shared/lucide-icons/file-badge2.svg +1 -0
- package/dist/shared/lucide-icons/file-box.svg +1 -0
- package/dist/shared/lucide-icons/file-chart-column-increasing.svg +1 -0
- package/dist/shared/lucide-icons/file-chart-column.svg +1 -0
- package/dist/shared/lucide-icons/file-chart-line.svg +1 -0
- package/dist/shared/lucide-icons/file-chart-pie.svg +1 -0
- package/dist/shared/lucide-icons/file-check.svg +1 -0
- package/dist/shared/lucide-icons/file-check2.svg +1 -0
- package/dist/shared/lucide-icons/file-clock.svg +1 -0
- package/dist/shared/lucide-icons/file-code.svg +1 -0
- package/dist/shared/lucide-icons/file-code2.svg +1 -0
- package/dist/shared/lucide-icons/file-cog.svg +1 -0
- package/dist/shared/lucide-icons/file-diff.svg +1 -0
- package/dist/shared/lucide-icons/file-digit.svg +1 -0
- package/dist/shared/lucide-icons/file-down.svg +1 -0
- package/dist/shared/lucide-icons/file-heart.svg +1 -0
- package/dist/shared/lucide-icons/file-image.svg +1 -0
- package/dist/shared/lucide-icons/file-input.svg +1 -0
- package/dist/shared/lucide-icons/file-json.svg +1 -0
- package/dist/shared/lucide-icons/file-json2.svg +1 -0
- package/dist/shared/lucide-icons/file-key.svg +1 -0
- package/dist/shared/lucide-icons/file-key2.svg +1 -0
- package/dist/shared/lucide-icons/file-lock.svg +1 -0
- package/dist/shared/lucide-icons/file-lock2.svg +1 -0
- package/dist/shared/lucide-icons/file-minus.svg +1 -0
- package/dist/shared/lucide-icons/file-minus2.svg +1 -0
- package/dist/shared/lucide-icons/file-music.svg +1 -0
- package/dist/shared/lucide-icons/file-output.svg +1 -0
- package/dist/shared/lucide-icons/file-pen-line.svg +1 -0
- package/dist/shared/lucide-icons/file-pen.svg +1 -0
- package/dist/shared/lucide-icons/file-plus.svg +1 -0
- package/dist/shared/lucide-icons/file-plus2.svg +1 -0
- package/dist/shared/lucide-icons/file-question.svg +1 -0
- package/dist/shared/lucide-icons/file-scan.svg +1 -0
- package/dist/shared/lucide-icons/file-search.svg +1 -0
- package/dist/shared/lucide-icons/file-search2.svg +1 -0
- package/dist/shared/lucide-icons/file-sliders.svg +1 -0
- package/dist/shared/lucide-icons/file-spreadsheet.svg +1 -0
- package/dist/shared/lucide-icons/file-stack.svg +1 -0
- package/dist/shared/lucide-icons/file-symlink.svg +1 -0
- package/dist/shared/lucide-icons/file-terminal.svg +1 -0
- package/dist/shared/lucide-icons/file-text.svg +1 -0
- package/dist/shared/lucide-icons/file-type.svg +1 -0
- package/dist/shared/lucide-icons/file-type2.svg +1 -0
- package/dist/shared/lucide-icons/file-up.svg +1 -0
- package/dist/shared/lucide-icons/file-user.svg +1 -0
- package/dist/shared/lucide-icons/file-video.svg +1 -0
- package/dist/shared/lucide-icons/file-video2.svg +1 -0
- package/dist/shared/lucide-icons/file-volume.svg +1 -0
- package/dist/shared/lucide-icons/file-volume2.svg +1 -0
- package/dist/shared/lucide-icons/file-warning.svg +1 -0
- package/dist/shared/lucide-icons/file-x.svg +1 -0
- package/dist/shared/lucide-icons/file-x2.svg +1 -0
- package/dist/shared/lucide-icons/file.svg +1 -0
- package/dist/shared/lucide-icons/files.svg +1 -0
- package/dist/shared/lucide-icons/film.svg +1 -0
- package/dist/shared/lucide-icons/filter-x.svg +1 -0
- package/dist/shared/lucide-icons/filter.svg +1 -0
- package/dist/shared/lucide-icons/fingerprint.svg +1 -0
- package/dist/shared/lucide-icons/fire-extinguisher.svg +1 -0
- package/dist/shared/lucide-icons/fish-off.svg +1 -0
- package/dist/shared/lucide-icons/fish-symbol.svg +1 -0
- package/dist/shared/lucide-icons/fish.svg +1 -0
- package/dist/shared/lucide-icons/flag-off.svg +1 -0
- package/dist/shared/lucide-icons/flag-triangle-left.svg +1 -0
- package/dist/shared/lucide-icons/flag-triangle-right.svg +1 -0
- package/dist/shared/lucide-icons/flag.svg +1 -0
- package/dist/shared/lucide-icons/flame-kindling.svg +1 -0
- package/dist/shared/lucide-icons/flame.svg +1 -0
- package/dist/shared/lucide-icons/flashlight-off.svg +1 -0
- package/dist/shared/lucide-icons/flashlight.svg +1 -0
- package/dist/shared/lucide-icons/flask-conical-off.svg +1 -0
- package/dist/shared/lucide-icons/flask-conical.svg +1 -0
- package/dist/shared/lucide-icons/flask-round.svg +1 -0
- package/dist/shared/lucide-icons/flip-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/flip-horizontal2.svg +1 -0
- package/dist/shared/lucide-icons/flip-vertical.svg +1 -0
- package/dist/shared/lucide-icons/flip-vertical2.svg +1 -0
- package/dist/shared/lucide-icons/flower.svg +1 -0
- package/dist/shared/lucide-icons/flower2.svg +1 -0
- package/dist/shared/lucide-icons/focus.svg +1 -0
- package/dist/shared/lucide-icons/fold-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/fold-vertical.svg +1 -0
- package/dist/shared/lucide-icons/folder-archive.svg +1 -0
- package/dist/shared/lucide-icons/folder-check.svg +1 -0
- package/dist/shared/lucide-icons/folder-clock.svg +1 -0
- package/dist/shared/lucide-icons/folder-closed.svg +1 -0
- package/dist/shared/lucide-icons/folder-code.svg +1 -0
- package/dist/shared/lucide-icons/folder-cog.svg +1 -0
- package/dist/shared/lucide-icons/folder-dot.svg +1 -0
- package/dist/shared/lucide-icons/folder-down.svg +1 -0
- package/dist/shared/lucide-icons/folder-git.svg +1 -0
- package/dist/shared/lucide-icons/folder-git2.svg +1 -0
- package/dist/shared/lucide-icons/folder-heart.svg +1 -0
- package/dist/shared/lucide-icons/folder-input.svg +1 -0
- package/dist/shared/lucide-icons/folder-kanban.svg +1 -0
- package/dist/shared/lucide-icons/folder-key.svg +1 -0
- package/dist/shared/lucide-icons/folder-lock.svg +1 -0
- package/dist/shared/lucide-icons/folder-minus.svg +1 -0
- package/dist/shared/lucide-icons/folder-open-dot.svg +1 -0
- package/dist/shared/lucide-icons/folder-open.svg +1 -0
- package/dist/shared/lucide-icons/folder-output.svg +1 -0
- package/dist/shared/lucide-icons/folder-pen.svg +1 -0
- package/dist/shared/lucide-icons/folder-plus.svg +1 -0
- package/dist/shared/lucide-icons/folder-root.svg +1 -0
- package/dist/shared/lucide-icons/folder-search.svg +1 -0
- package/dist/shared/lucide-icons/folder-search2.svg +1 -0
- package/dist/shared/lucide-icons/folder-symlink.svg +1 -0
- package/dist/shared/lucide-icons/folder-sync.svg +1 -0
- package/dist/shared/lucide-icons/folder-tree.svg +1 -0
- package/dist/shared/lucide-icons/folder-up.svg +1 -0
- package/dist/shared/lucide-icons/folder-x.svg +1 -0
- package/dist/shared/lucide-icons/folder.svg +1 -0
- package/dist/shared/lucide-icons/folders.svg +1 -0
- package/dist/shared/lucide-icons/footprints.svg +1 -0
- package/dist/shared/lucide-icons/forklift.svg +1 -0
- package/dist/shared/lucide-icons/forward.svg +1 -0
- package/dist/shared/lucide-icons/frame.svg +1 -0
- package/dist/shared/lucide-icons/framer.svg +1 -0
- package/dist/shared/lucide-icons/frown.svg +1 -0
- package/dist/shared/lucide-icons/fuel.svg +1 -0
- package/dist/shared/lucide-icons/fullscreen.svg +1 -0
- package/dist/shared/lucide-icons/gallery-horizontal-end.svg +1 -0
- package/dist/shared/lucide-icons/gallery-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/gallery-thumbnails.svg +1 -0
- package/dist/shared/lucide-icons/gallery-vertical-end.svg +1 -0
- package/dist/shared/lucide-icons/gallery-vertical.svg +1 -0
- package/dist/shared/lucide-icons/gamepad.svg +1 -0
- package/dist/shared/lucide-icons/gamepad2.svg +1 -0
- package/dist/shared/lucide-icons/gauge.svg +1 -0
- package/dist/shared/lucide-icons/gavel.svg +1 -0
- package/dist/shared/lucide-icons/gem.svg +1 -0
- package/dist/shared/lucide-icons/ghost.svg +1 -0
- package/dist/shared/lucide-icons/gift.svg +1 -0
- package/dist/shared/lucide-icons/git-branch-plus.svg +1 -0
- package/dist/shared/lucide-icons/git-branch.svg +1 -0
- package/dist/shared/lucide-icons/git-commit-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/git-commit-vertical.svg +1 -0
- package/dist/shared/lucide-icons/git-compare-arrows.svg +1 -0
- package/dist/shared/lucide-icons/git-compare.svg +1 -0
- package/dist/shared/lucide-icons/git-fork.svg +1 -0
- package/dist/shared/lucide-icons/git-graph.svg +1 -0
- package/dist/shared/lucide-icons/git-merge.svg +1 -0
- package/dist/shared/lucide-icons/git-pull-request-arrow.svg +1 -0
- package/dist/shared/lucide-icons/git-pull-request-closed.svg +1 -0
- package/dist/shared/lucide-icons/git-pull-request-create-arrow.svg +1 -0
- package/dist/shared/lucide-icons/git-pull-request-create.svg +1 -0
- package/dist/shared/lucide-icons/git-pull-request-draft.svg +1 -0
- package/dist/shared/lucide-icons/git-pull-request.svg +1 -0
- package/dist/shared/lucide-icons/github.svg +1 -0
- package/dist/shared/lucide-icons/gitlab.svg +1 -0
- package/dist/shared/lucide-icons/glass-water.svg +1 -0
- package/dist/shared/lucide-icons/glasses.svg +1 -0
- package/dist/shared/lucide-icons/globe-lock.svg +1 -0
- package/dist/shared/lucide-icons/globe.svg +1 -0
- package/dist/shared/lucide-icons/goal.svg +1 -0
- package/dist/shared/lucide-icons/grab.svg +1 -0
- package/dist/shared/lucide-icons/graduation-cap.svg +1 -0
- package/dist/shared/lucide-icons/grape.svg +1 -0
- package/dist/shared/lucide-icons/grid2x2-check.svg +1 -0
- package/dist/shared/lucide-icons/grid2x2-plus.svg +1 -0
- package/dist/shared/lucide-icons/grid2x2-x.svg +1 -0
- package/dist/shared/lucide-icons/grid2x2.svg +1 -0
- package/dist/shared/lucide-icons/grid3x3.svg +1 -0
- package/dist/shared/lucide-icons/grip-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/grip-vertical.svg +1 -0
- package/dist/shared/lucide-icons/grip.svg +1 -0
- package/dist/shared/lucide-icons/group.svg +1 -0
- package/dist/shared/lucide-icons/guitar.svg +1 -0
- package/dist/shared/lucide-icons/ham.svg +1 -0
- package/dist/shared/lucide-icons/hammer.svg +1 -0
- package/dist/shared/lucide-icons/hand-coins.svg +1 -0
- package/dist/shared/lucide-icons/hand-heart.svg +1 -0
- package/dist/shared/lucide-icons/hand-helping.svg +1 -0
- package/dist/shared/lucide-icons/hand-metal.svg +1 -0
- package/dist/shared/lucide-icons/hand-platter.svg +1 -0
- package/dist/shared/lucide-icons/hand.svg +1 -0
- package/dist/shared/lucide-icons/handshake.svg +1 -0
- package/dist/shared/lucide-icons/hard-drive-download.svg +1 -0
- package/dist/shared/lucide-icons/hard-drive-upload.svg +1 -0
- package/dist/shared/lucide-icons/hard-drive.svg +1 -0
- package/dist/shared/lucide-icons/hard-hat.svg +1 -0
- package/dist/shared/lucide-icons/hash.svg +1 -0
- package/dist/shared/lucide-icons/haze.svg +1 -0
- package/dist/shared/lucide-icons/hdmi-port.svg +1 -0
- package/dist/shared/lucide-icons/heading.svg +1 -0
- package/dist/shared/lucide-icons/heading1.svg +1 -0
- package/dist/shared/lucide-icons/heading2.svg +1 -0
- package/dist/shared/lucide-icons/heading3.svg +1 -0
- package/dist/shared/lucide-icons/heading4.svg +1 -0
- package/dist/shared/lucide-icons/heading5.svg +1 -0
- package/dist/shared/lucide-icons/heading6.svg +1 -0
- package/dist/shared/lucide-icons/headphone-off.svg +1 -0
- package/dist/shared/lucide-icons/headphones.svg +1 -0
- package/dist/shared/lucide-icons/headset.svg +1 -0
- package/dist/shared/lucide-icons/heart-crack.svg +1 -0
- package/dist/shared/lucide-icons/heart-handshake.svg +1 -0
- package/dist/shared/lucide-icons/heart-off.svg +1 -0
- package/dist/shared/lucide-icons/heart-pulse.svg +1 -0
- package/dist/shared/lucide-icons/heart.svg +1 -0
- package/dist/shared/lucide-icons/heater.svg +1 -0
- package/dist/shared/lucide-icons/hexagon.svg +1 -0
- package/dist/shared/lucide-icons/highlighter.svg +1 -0
- package/dist/shared/lucide-icons/history.svg +1 -0
- package/dist/shared/lucide-icons/hop-off.svg +1 -0
- package/dist/shared/lucide-icons/hop.svg +1 -0
- package/dist/shared/lucide-icons/hospital.svg +1 -0
- package/dist/shared/lucide-icons/hotel.svg +1 -0
- package/dist/shared/lucide-icons/hourglass.svg +1 -0
- package/dist/shared/lucide-icons/house-plug.svg +1 -0
- package/dist/shared/lucide-icons/house-plus.svg +1 -0
- package/dist/shared/lucide-icons/house.svg +1 -0
- package/dist/shared/lucide-icons/ice-cream-bowl.svg +1 -0
- package/dist/shared/lucide-icons/ice-cream-cone.svg +1 -0
- package/dist/shared/lucide-icons/id-card.svg +1 -0
- package/dist/shared/lucide-icons/image-down.svg +1 -0
- package/dist/shared/lucide-icons/image-minus.svg +1 -0
- package/dist/shared/lucide-icons/image-off.svg +1 -0
- package/dist/shared/lucide-icons/image-play.svg +1 -0
- package/dist/shared/lucide-icons/image-plus.svg +1 -0
- package/dist/shared/lucide-icons/image-up.svg +1 -0
- package/dist/shared/lucide-icons/image-upscale.svg +1 -0
- package/dist/shared/lucide-icons/image.svg +1 -0
- package/dist/shared/lucide-icons/images.svg +1 -0
- package/dist/shared/lucide-icons/import.svg +1 -0
- package/dist/shared/lucide-icons/inbox.svg +1 -0
- package/dist/shared/lucide-icons/indent-decrease.svg +1 -0
- package/dist/shared/lucide-icons/indent-increase.svg +1 -0
- package/dist/shared/lucide-icons/indian-rupee.svg +1 -0
- package/dist/shared/lucide-icons/infinity.svg +1 -0
- package/dist/shared/lucide-icons/info.svg +1 -0
- package/dist/shared/lucide-icons/inspection-panel.svg +1 -0
- package/dist/shared/lucide-icons/instagram.svg +1 -0
- package/dist/shared/lucide-icons/italic.svg +1 -0
- package/dist/shared/lucide-icons/iteration-ccw.svg +1 -0
- package/dist/shared/lucide-icons/iteration-cw.svg +1 -0
- package/dist/shared/lucide-icons/japanese-yen.svg +1 -0
- package/dist/shared/lucide-icons/joystick.svg +1 -0
- package/dist/shared/lucide-icons/kanban.svg +1 -0
- package/dist/shared/lucide-icons/key-round.svg +1 -0
- package/dist/shared/lucide-icons/key-square.svg +1 -0
- package/dist/shared/lucide-icons/key.svg +1 -0
- package/dist/shared/lucide-icons/keyboard-music.svg +1 -0
- package/dist/shared/lucide-icons/keyboard-off.svg +1 -0
- package/dist/shared/lucide-icons/keyboard.svg +1 -0
- package/dist/shared/lucide-icons/lamp-ceiling.svg +1 -0
- package/dist/shared/lucide-icons/lamp-desk.svg +1 -0
- package/dist/shared/lucide-icons/lamp-floor.svg +1 -0
- package/dist/shared/lucide-icons/lamp-wall-down.svg +1 -0
- package/dist/shared/lucide-icons/lamp-wall-up.svg +1 -0
- package/dist/shared/lucide-icons/lamp.svg +1 -0
- package/dist/shared/lucide-icons/land-plot.svg +1 -0
- package/dist/shared/lucide-icons/landmark.svg +1 -0
- package/dist/shared/lucide-icons/languages.svg +1 -0
- package/dist/shared/lucide-icons/laptop-minimal-check.svg +1 -0
- package/dist/shared/lucide-icons/laptop-minimal.svg +1 -0
- package/dist/shared/lucide-icons/laptop.svg +1 -0
- package/dist/shared/lucide-icons/lasso-select.svg +1 -0
- package/dist/shared/lucide-icons/lasso.svg +1 -0
- package/dist/shared/lucide-icons/laugh.svg +1 -0
- package/dist/shared/lucide-icons/layers.svg +1 -0
- package/dist/shared/lucide-icons/layers2.svg +1 -0
- package/dist/shared/lucide-icons/layout-dashboard.svg +1 -0
- package/dist/shared/lucide-icons/layout-grid.svg +1 -0
- package/dist/shared/lucide-icons/layout-list.svg +1 -0
- package/dist/shared/lucide-icons/layout-panel-left.svg +1 -0
- package/dist/shared/lucide-icons/layout-panel-top.svg +1 -0
- package/dist/shared/lucide-icons/layout-template.svg +1 -0
- package/dist/shared/lucide-icons/leaf.svg +1 -0
- package/dist/shared/lucide-icons/leafy-green.svg +1 -0
- package/dist/shared/lucide-icons/lectern.svg +1 -0
- package/dist/shared/lucide-icons/letter-text.svg +1 -0
- package/dist/shared/lucide-icons/library-big.svg +1 -0
- package/dist/shared/lucide-icons/library.svg +1 -0
- package/dist/shared/lucide-icons/life-buoy.svg +1 -0
- package/dist/shared/lucide-icons/ligature.svg +1 -0
- package/dist/shared/lucide-icons/lightbulb-off.svg +1 -0
- package/dist/shared/lucide-icons/lightbulb.svg +1 -0
- package/dist/shared/lucide-icons/link.svg +1 -0
- package/dist/shared/lucide-icons/link2-off.svg +1 -0
- package/dist/shared/lucide-icons/link2.svg +1 -0
- package/dist/shared/lucide-icons/linkedin.svg +1 -0
- package/dist/shared/lucide-icons/list-check.svg +1 -0
- package/dist/shared/lucide-icons/list-checks.svg +1 -0
- package/dist/shared/lucide-icons/list-collapse.svg +1 -0
- package/dist/shared/lucide-icons/list-end.svg +1 -0
- package/dist/shared/lucide-icons/list-filter-plus.svg +1 -0
- package/dist/shared/lucide-icons/list-filter.svg +1 -0
- package/dist/shared/lucide-icons/list-minus.svg +1 -0
- package/dist/shared/lucide-icons/list-music.svg +1 -0
- package/dist/shared/lucide-icons/list-ordered.svg +1 -0
- package/dist/shared/lucide-icons/list-plus.svg +1 -0
- package/dist/shared/lucide-icons/list-restart.svg +1 -0
- package/dist/shared/lucide-icons/list-start.svg +1 -0
- package/dist/shared/lucide-icons/list-todo.svg +1 -0
- package/dist/shared/lucide-icons/list-tree.svg +1 -0
- package/dist/shared/lucide-icons/list-video.svg +1 -0
- package/dist/shared/lucide-icons/list-x.svg +1 -0
- package/dist/shared/lucide-icons/list.svg +1 -0
- package/dist/shared/lucide-icons/loader-circle.svg +1 -0
- package/dist/shared/lucide-icons/loader-pinwheel.svg +1 -0
- package/dist/shared/lucide-icons/loader.svg +1 -0
- package/dist/shared/lucide-icons/locate-fixed.svg +1 -0
- package/dist/shared/lucide-icons/locate-off.svg +1 -0
- package/dist/shared/lucide-icons/locate.svg +1 -0
- package/dist/shared/lucide-icons/lock-keyhole-open.svg +1 -0
- package/dist/shared/lucide-icons/lock-keyhole.svg +1 -0
- package/dist/shared/lucide-icons/lock-open.svg +1 -0
- package/dist/shared/lucide-icons/lock.svg +1 -0
- package/dist/shared/lucide-icons/log-in.svg +1 -0
- package/dist/shared/lucide-icons/log-out.svg +1 -0
- package/dist/shared/lucide-icons/logs.svg +1 -0
- package/dist/shared/lucide-icons/lollipop.svg +1 -0
- package/dist/shared/lucide-icons/luggage.svg +1 -0
- package/dist/shared/lucide-icons/magnet.svg +1 -0
- package/dist/shared/lucide-icons/mail-check.svg +1 -0
- package/dist/shared/lucide-icons/mail-minus.svg +1 -0
- package/dist/shared/lucide-icons/mail-open.svg +1 -0
- package/dist/shared/lucide-icons/mail-plus.svg +1 -0
- package/dist/shared/lucide-icons/mail-question.svg +1 -0
- package/dist/shared/lucide-icons/mail-search.svg +1 -0
- package/dist/shared/lucide-icons/mail-warning.svg +1 -0
- package/dist/shared/lucide-icons/mail-x.svg +1 -0
- package/dist/shared/lucide-icons/mail.svg +1 -0
- package/dist/shared/lucide-icons/mailbox.svg +1 -0
- package/dist/shared/lucide-icons/mails.svg +1 -0
- package/dist/shared/lucide-icons/manifest.json +1 -0
- package/dist/shared/lucide-icons/map-pin-check-inside.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-check.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-house.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-minus-inside.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-minus.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-off.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-plus-inside.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-plus.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-x-inside.svg +1 -0
- package/dist/shared/lucide-icons/map-pin-x.svg +1 -0
- package/dist/shared/lucide-icons/map-pin.svg +1 -0
- package/dist/shared/lucide-icons/map-pinned.svg +1 -0
- package/dist/shared/lucide-icons/map.svg +1 -0
- package/dist/shared/lucide-icons/martini.svg +1 -0
- package/dist/shared/lucide-icons/maximize.svg +1 -0
- package/dist/shared/lucide-icons/maximize2.svg +1 -0
- package/dist/shared/lucide-icons/medal.svg +1 -0
- package/dist/shared/lucide-icons/megaphone-off.svg +1 -0
- package/dist/shared/lucide-icons/megaphone.svg +1 -0
- package/dist/shared/lucide-icons/meh.svg +1 -0
- package/dist/shared/lucide-icons/memory-stick.svg +1 -0
- package/dist/shared/lucide-icons/menu.svg +1 -0
- package/dist/shared/lucide-icons/merge.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-code.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-dashed.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-heart.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-more.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-off.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-plus.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-question.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-reply.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-warning.svg +1 -0
- package/dist/shared/lucide-icons/message-circle-x.svg +1 -0
- package/dist/shared/lucide-icons/message-circle.svg +1 -0
- package/dist/shared/lucide-icons/message-square-code.svg +1 -0
- package/dist/shared/lucide-icons/message-square-dashed.svg +1 -0
- package/dist/shared/lucide-icons/message-square-diff.svg +1 -0
- package/dist/shared/lucide-icons/message-square-dot.svg +1 -0
- package/dist/shared/lucide-icons/message-square-heart.svg +1 -0
- package/dist/shared/lucide-icons/message-square-lock.svg +1 -0
- package/dist/shared/lucide-icons/message-square-more.svg +1 -0
- package/dist/shared/lucide-icons/message-square-off.svg +1 -0
- package/dist/shared/lucide-icons/message-square-plus.svg +1 -0
- package/dist/shared/lucide-icons/message-square-quote.svg +1 -0
- package/dist/shared/lucide-icons/message-square-reply.svg +1 -0
- package/dist/shared/lucide-icons/message-square-share.svg +1 -0
- package/dist/shared/lucide-icons/message-square-text.svg +1 -0
- package/dist/shared/lucide-icons/message-square-warning.svg +1 -0
- package/dist/shared/lucide-icons/message-square-x.svg +1 -0
- package/dist/shared/lucide-icons/message-square.svg +1 -0
- package/dist/shared/lucide-icons/messages-square.svg +1 -0
- package/dist/shared/lucide-icons/mic-off.svg +1 -0
- package/dist/shared/lucide-icons/mic-vocal.svg +1 -0
- package/dist/shared/lucide-icons/mic.svg +1 -0
- package/dist/shared/lucide-icons/microchip.svg +1 -0
- package/dist/shared/lucide-icons/microscope.svg +1 -0
- package/dist/shared/lucide-icons/microwave.svg +1 -0
- package/dist/shared/lucide-icons/milestone.svg +1 -0
- package/dist/shared/lucide-icons/milk-off.svg +1 -0
- package/dist/shared/lucide-icons/milk.svg +1 -0
- package/dist/shared/lucide-icons/minimize.svg +1 -0
- package/dist/shared/lucide-icons/minimize2.svg +1 -0
- package/dist/shared/lucide-icons/minus.svg +1 -0
- package/dist/shared/lucide-icons/monitor-check.svg +1 -0
- package/dist/shared/lucide-icons/monitor-cog.svg +1 -0
- package/dist/shared/lucide-icons/monitor-dot.svg +1 -0
- package/dist/shared/lucide-icons/monitor-down.svg +1 -0
- package/dist/shared/lucide-icons/monitor-off.svg +1 -0
- package/dist/shared/lucide-icons/monitor-pause.svg +1 -0
- package/dist/shared/lucide-icons/monitor-play.svg +1 -0
- package/dist/shared/lucide-icons/monitor-smartphone.svg +1 -0
- package/dist/shared/lucide-icons/monitor-speaker.svg +1 -0
- package/dist/shared/lucide-icons/monitor-stop.svg +1 -0
- package/dist/shared/lucide-icons/monitor-up.svg +1 -0
- package/dist/shared/lucide-icons/monitor-x.svg +1 -0
- package/dist/shared/lucide-icons/monitor.svg +1 -0
- package/dist/shared/lucide-icons/moon-star.svg +1 -0
- package/dist/shared/lucide-icons/moon.svg +1 -0
- package/dist/shared/lucide-icons/mountain-snow.svg +1 -0
- package/dist/shared/lucide-icons/mountain.svg +1 -0
- package/dist/shared/lucide-icons/mouse-off.svg +1 -0
- package/dist/shared/lucide-icons/mouse-pointer-ban.svg +1 -0
- package/dist/shared/lucide-icons/mouse-pointer-click.svg +1 -0
- package/dist/shared/lucide-icons/mouse-pointer.svg +1 -0
- package/dist/shared/lucide-icons/mouse-pointer2.svg +1 -0
- package/dist/shared/lucide-icons/mouse.svg +1 -0
- package/dist/shared/lucide-icons/move-diagonal.svg +1 -0
- package/dist/shared/lucide-icons/move-diagonal2.svg +1 -0
- package/dist/shared/lucide-icons/move-down-left.svg +1 -0
- package/dist/shared/lucide-icons/move-down-right.svg +1 -0
- package/dist/shared/lucide-icons/move-down.svg +1 -0
- package/dist/shared/lucide-icons/move-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/move-left.svg +1 -0
- package/dist/shared/lucide-icons/move-right.svg +1 -0
- package/dist/shared/lucide-icons/move-up-left.svg +1 -0
- package/dist/shared/lucide-icons/move-up-right.svg +1 -0
- package/dist/shared/lucide-icons/move-up.svg +1 -0
- package/dist/shared/lucide-icons/move-vertical.svg +1 -0
- package/dist/shared/lucide-icons/move.svg +1 -0
- package/dist/shared/lucide-icons/move3d.svg +1 -0
- package/dist/shared/lucide-icons/music.svg +1 -0
- package/dist/shared/lucide-icons/music2.svg +1 -0
- package/dist/shared/lucide-icons/music3.svg +1 -0
- package/dist/shared/lucide-icons/music4.svg +1 -0
- package/dist/shared/lucide-icons/navigation-off.svg +1 -0
- package/dist/shared/lucide-icons/navigation.svg +1 -0
- package/dist/shared/lucide-icons/navigation2-off.svg +1 -0
- package/dist/shared/lucide-icons/navigation2.svg +1 -0
- package/dist/shared/lucide-icons/network.svg +1 -0
- package/dist/shared/lucide-icons/newspaper.svg +1 -0
- package/dist/shared/lucide-icons/nfc.svg +1 -0
- package/dist/shared/lucide-icons/notebook-pen.svg +1 -0
- package/dist/shared/lucide-icons/notebook-tabs.svg +1 -0
- package/dist/shared/lucide-icons/notebook-text.svg +1 -0
- package/dist/shared/lucide-icons/notebook.svg +1 -0
- package/dist/shared/lucide-icons/notepad-text-dashed.svg +1 -0
- package/dist/shared/lucide-icons/notepad-text.svg +1 -0
- package/dist/shared/lucide-icons/nut-off.svg +1 -0
- package/dist/shared/lucide-icons/nut.svg +1 -0
- package/dist/shared/lucide-icons/octagon-alert.svg +1 -0
- package/dist/shared/lucide-icons/octagon-minus.svg +1 -0
- package/dist/shared/lucide-icons/octagon-pause.svg +1 -0
- package/dist/shared/lucide-icons/octagon-x.svg +1 -0
- package/dist/shared/lucide-icons/octagon.svg +1 -0
- package/dist/shared/lucide-icons/omega.svg +1 -0
- package/dist/shared/lucide-icons/option.svg +1 -0
- package/dist/shared/lucide-icons/orbit.svg +1 -0
- package/dist/shared/lucide-icons/origami.svg +1 -0
- package/dist/shared/lucide-icons/package-check.svg +1 -0
- package/dist/shared/lucide-icons/package-minus.svg +1 -0
- package/dist/shared/lucide-icons/package-open.svg +1 -0
- package/dist/shared/lucide-icons/package-plus.svg +1 -0
- package/dist/shared/lucide-icons/package-search.svg +1 -0
- package/dist/shared/lucide-icons/package-x.svg +1 -0
- package/dist/shared/lucide-icons/package.svg +1 -0
- package/dist/shared/lucide-icons/package2.svg +1 -0
- package/dist/shared/lucide-icons/paint-bucket.svg +1 -0
- package/dist/shared/lucide-icons/paint-roller.svg +1 -0
- package/dist/shared/lucide-icons/paintbrush-vertical.svg +1 -0
- package/dist/shared/lucide-icons/paintbrush.svg +1 -0
- package/dist/shared/lucide-icons/palette.svg +1 -0
- package/dist/shared/lucide-icons/panel-bottom-close.svg +1 -0
- package/dist/shared/lucide-icons/panel-bottom-dashed.svg +1 -0
- package/dist/shared/lucide-icons/panel-bottom-open.svg +1 -0
- package/dist/shared/lucide-icons/panel-bottom.svg +1 -0
- package/dist/shared/lucide-icons/panel-left-close.svg +1 -0
- package/dist/shared/lucide-icons/panel-left-dashed.svg +1 -0
- package/dist/shared/lucide-icons/panel-left-open.svg +1 -0
- package/dist/shared/lucide-icons/panel-left.svg +1 -0
- package/dist/shared/lucide-icons/panel-right-close.svg +1 -0
- package/dist/shared/lucide-icons/panel-right-dashed.svg +1 -0
- package/dist/shared/lucide-icons/panel-right-open.svg +1 -0
- package/dist/shared/lucide-icons/panel-right.svg +1 -0
- package/dist/shared/lucide-icons/panel-top-close.svg +1 -0
- package/dist/shared/lucide-icons/panel-top-dashed.svg +1 -0
- package/dist/shared/lucide-icons/panel-top-open.svg +1 -0
- package/dist/shared/lucide-icons/panel-top.svg +1 -0
- package/dist/shared/lucide-icons/panels-left-bottom.svg +1 -0
- package/dist/shared/lucide-icons/panels-right-bottom.svg +1 -0
- package/dist/shared/lucide-icons/panels-top-left.svg +1 -0
- package/dist/shared/lucide-icons/paperclip.svg +1 -0
- package/dist/shared/lucide-icons/parentheses.svg +1 -0
- package/dist/shared/lucide-icons/parking-meter.svg +1 -0
- package/dist/shared/lucide-icons/party-popper.svg +1 -0
- package/dist/shared/lucide-icons/pause.svg +1 -0
- package/dist/shared/lucide-icons/paw-print.svg +1 -0
- package/dist/shared/lucide-icons/pc-case.svg +1 -0
- package/dist/shared/lucide-icons/pen-line.svg +1 -0
- package/dist/shared/lucide-icons/pen-off.svg +1 -0
- package/dist/shared/lucide-icons/pen-tool.svg +1 -0
- package/dist/shared/lucide-icons/pen.svg +1 -0
- package/dist/shared/lucide-icons/pencil-line.svg +1 -0
- package/dist/shared/lucide-icons/pencil-off.svg +1 -0
- package/dist/shared/lucide-icons/pencil-ruler.svg +1 -0
- package/dist/shared/lucide-icons/pencil.svg +1 -0
- package/dist/shared/lucide-icons/pentagon.svg +1 -0
- package/dist/shared/lucide-icons/percent.svg +1 -0
- package/dist/shared/lucide-icons/person-standing.svg +1 -0
- package/dist/shared/lucide-icons/philippine-peso.svg +1 -0
- package/dist/shared/lucide-icons/phone-call.svg +1 -0
- package/dist/shared/lucide-icons/phone-forwarded.svg +1 -0
- package/dist/shared/lucide-icons/phone-incoming.svg +1 -0
- package/dist/shared/lucide-icons/phone-missed.svg +1 -0
- package/dist/shared/lucide-icons/phone-off.svg +1 -0
- package/dist/shared/lucide-icons/phone-outgoing.svg +1 -0
- package/dist/shared/lucide-icons/phone.svg +1 -0
- package/dist/shared/lucide-icons/pi.svg +1 -0
- package/dist/shared/lucide-icons/piano.svg +1 -0
- package/dist/shared/lucide-icons/pickaxe.svg +1 -0
- package/dist/shared/lucide-icons/picture-in-picture.svg +1 -0
- package/dist/shared/lucide-icons/picture-in-picture2.svg +1 -0
- package/dist/shared/lucide-icons/piggy-bank.svg +1 -0
- package/dist/shared/lucide-icons/pilcrow-left.svg +1 -0
- package/dist/shared/lucide-icons/pilcrow-right.svg +1 -0
- package/dist/shared/lucide-icons/pilcrow.svg +1 -0
- package/dist/shared/lucide-icons/pill-bottle.svg +1 -0
- package/dist/shared/lucide-icons/pill.svg +1 -0
- package/dist/shared/lucide-icons/pin-off.svg +1 -0
- package/dist/shared/lucide-icons/pin.svg +1 -0
- package/dist/shared/lucide-icons/pipette.svg +1 -0
- package/dist/shared/lucide-icons/pizza.svg +1 -0
- package/dist/shared/lucide-icons/plane-landing.svg +1 -0
- package/dist/shared/lucide-icons/plane-takeoff.svg +1 -0
- package/dist/shared/lucide-icons/plane.svg +1 -0
- package/dist/shared/lucide-icons/play.svg +1 -0
- package/dist/shared/lucide-icons/plug-zap.svg +1 -0
- package/dist/shared/lucide-icons/plug.svg +1 -0
- package/dist/shared/lucide-icons/plug2.svg +1 -0
- package/dist/shared/lucide-icons/plus.svg +1 -0
- package/dist/shared/lucide-icons/pocket-knife.svg +1 -0
- package/dist/shared/lucide-icons/pocket.svg +1 -0
- package/dist/shared/lucide-icons/podcast.svg +1 -0
- package/dist/shared/lucide-icons/pointer-off.svg +1 -0
- package/dist/shared/lucide-icons/pointer.svg +1 -0
- package/dist/shared/lucide-icons/popcorn.svg +1 -0
- package/dist/shared/lucide-icons/popsicle.svg +1 -0
- package/dist/shared/lucide-icons/pound-sterling.svg +1 -0
- package/dist/shared/lucide-icons/power-off.svg +1 -0
- package/dist/shared/lucide-icons/power.svg +1 -0
- package/dist/shared/lucide-icons/presentation.svg +1 -0
- package/dist/shared/lucide-icons/printer-check.svg +1 -0
- package/dist/shared/lucide-icons/printer.svg +1 -0
- package/dist/shared/lucide-icons/projector.svg +1 -0
- package/dist/shared/lucide-icons/proportions.svg +1 -0
- package/dist/shared/lucide-icons/puzzle.svg +1 -0
- package/dist/shared/lucide-icons/pyramid.svg +1 -0
- package/dist/shared/lucide-icons/qr-code.svg +1 -0
- package/dist/shared/lucide-icons/quote.svg +1 -0
- package/dist/shared/lucide-icons/rabbit.svg +1 -0
- package/dist/shared/lucide-icons/radar.svg +1 -0
- package/dist/shared/lucide-icons/radiation.svg +1 -0
- package/dist/shared/lucide-icons/radical.svg +1 -0
- package/dist/shared/lucide-icons/radio-receiver.svg +1 -0
- package/dist/shared/lucide-icons/radio-tower.svg +1 -0
- package/dist/shared/lucide-icons/radio.svg +1 -0
- package/dist/shared/lucide-icons/radius.svg +1 -0
- package/dist/shared/lucide-icons/rail-symbol.svg +1 -0
- package/dist/shared/lucide-icons/rainbow.svg +1 -0
- package/dist/shared/lucide-icons/rat.svg +1 -0
- package/dist/shared/lucide-icons/ratio.svg +1 -0
- package/dist/shared/lucide-icons/receipt-cent.svg +1 -0
- package/dist/shared/lucide-icons/receipt-euro.svg +1 -0
- package/dist/shared/lucide-icons/receipt-indian-rupee.svg +1 -0
- package/dist/shared/lucide-icons/receipt-japanese-yen.svg +1 -0
- package/dist/shared/lucide-icons/receipt-pound-sterling.svg +1 -0
- package/dist/shared/lucide-icons/receipt-russian-ruble.svg +1 -0
- package/dist/shared/lucide-icons/receipt-swiss-franc.svg +1 -0
- package/dist/shared/lucide-icons/receipt-text.svg +1 -0
- package/dist/shared/lucide-icons/receipt.svg +1 -0
- package/dist/shared/lucide-icons/rectangle-ellipsis.svg +1 -0
- package/dist/shared/lucide-icons/rectangle-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/rectangle-vertical.svg +1 -0
- package/dist/shared/lucide-icons/recycle.svg +1 -0
- package/dist/shared/lucide-icons/redo-dot.svg +1 -0
- package/dist/shared/lucide-icons/redo.svg +1 -0
- package/dist/shared/lucide-icons/redo2.svg +1 -0
- package/dist/shared/lucide-icons/refresh-ccw-dot.svg +1 -0
- package/dist/shared/lucide-icons/refresh-ccw.svg +1 -0
- package/dist/shared/lucide-icons/refresh-cw-off.svg +1 -0
- package/dist/shared/lucide-icons/refresh-cw.svg +1 -0
- package/dist/shared/lucide-icons/refrigerator.svg +1 -0
- package/dist/shared/lucide-icons/regex.svg +1 -0
- package/dist/shared/lucide-icons/remove-formatting.svg +1 -0
- package/dist/shared/lucide-icons/repeat.svg +1 -0
- package/dist/shared/lucide-icons/repeat1.svg +1 -0
- package/dist/shared/lucide-icons/repeat2.svg +1 -0
- package/dist/shared/lucide-icons/replace-all.svg +1 -0
- package/dist/shared/lucide-icons/replace.svg +1 -0
- package/dist/shared/lucide-icons/reply-all.svg +1 -0
- package/dist/shared/lucide-icons/reply.svg +1 -0
- package/dist/shared/lucide-icons/rewind.svg +1 -0
- package/dist/shared/lucide-icons/ribbon.svg +1 -0
- package/dist/shared/lucide-icons/rocket.svg +1 -0
- package/dist/shared/lucide-icons/rocking-chair.svg +1 -0
- package/dist/shared/lucide-icons/roller-coaster.svg +1 -0
- package/dist/shared/lucide-icons/rotate-ccw-square.svg +1 -0
- package/dist/shared/lucide-icons/rotate-ccw.svg +1 -0
- package/dist/shared/lucide-icons/rotate-cw-square.svg +1 -0
- package/dist/shared/lucide-icons/rotate-cw.svg +1 -0
- package/dist/shared/lucide-icons/rotate3d.svg +1 -0
- package/dist/shared/lucide-icons/route-off.svg +1 -0
- package/dist/shared/lucide-icons/route.svg +1 -0
- package/dist/shared/lucide-icons/router.svg +1 -0
- package/dist/shared/lucide-icons/rows2.svg +1 -0
- package/dist/shared/lucide-icons/rows3.svg +1 -0
- package/dist/shared/lucide-icons/rows4.svg +1 -0
- package/dist/shared/lucide-icons/rss.svg +1 -0
- package/dist/shared/lucide-icons/ruler.svg +1 -0
- package/dist/shared/lucide-icons/russian-ruble.svg +1 -0
- package/dist/shared/lucide-icons/sailboat.svg +1 -0
- package/dist/shared/lucide-icons/salad.svg +1 -0
- package/dist/shared/lucide-icons/sandwich.svg +1 -0
- package/dist/shared/lucide-icons/satellite-dish.svg +1 -0
- package/dist/shared/lucide-icons/satellite.svg +1 -0
- package/dist/shared/lucide-icons/save-all.svg +1 -0
- package/dist/shared/lucide-icons/save-off.svg +1 -0
- package/dist/shared/lucide-icons/save.svg +1 -0
- package/dist/shared/lucide-icons/scale.svg +1 -0
- package/dist/shared/lucide-icons/scale3d.svg +1 -0
- package/dist/shared/lucide-icons/scaling.svg +1 -0
- package/dist/shared/lucide-icons/scan-barcode.svg +1 -0
- package/dist/shared/lucide-icons/scan-eye.svg +1 -0
- package/dist/shared/lucide-icons/scan-face.svg +1 -0
- package/dist/shared/lucide-icons/scan-heart.svg +1 -0
- package/dist/shared/lucide-icons/scan-line.svg +1 -0
- package/dist/shared/lucide-icons/scan-qr-code.svg +1 -0
- package/dist/shared/lucide-icons/scan-search.svg +1 -0
- package/dist/shared/lucide-icons/scan-text.svg +1 -0
- package/dist/shared/lucide-icons/scan.svg +1 -0
- package/dist/shared/lucide-icons/school.svg +1 -0
- package/dist/shared/lucide-icons/scissors-line-dashed.svg +1 -0
- package/dist/shared/lucide-icons/scissors.svg +1 -0
- package/dist/shared/lucide-icons/screen-share-off.svg +1 -0
- package/dist/shared/lucide-icons/screen-share.svg +1 -0
- package/dist/shared/lucide-icons/scroll-text.svg +1 -0
- package/dist/shared/lucide-icons/scroll.svg +1 -0
- package/dist/shared/lucide-icons/search-check.svg +1 -0
- package/dist/shared/lucide-icons/search-code.svg +1 -0
- package/dist/shared/lucide-icons/search-slash.svg +1 -0
- package/dist/shared/lucide-icons/search-x.svg +1 -0
- package/dist/shared/lucide-icons/search.svg +1 -0
- package/dist/shared/lucide-icons/section.svg +1 -0
- package/dist/shared/lucide-icons/send-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/send-to-back.svg +1 -0
- package/dist/shared/lucide-icons/send.svg +1 -0
- package/dist/shared/lucide-icons/separator-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/separator-vertical.svg +1 -0
- package/dist/shared/lucide-icons/server-cog.svg +1 -0
- package/dist/shared/lucide-icons/server-crash.svg +1 -0
- package/dist/shared/lucide-icons/server-off.svg +1 -0
- package/dist/shared/lucide-icons/server.svg +1 -0
- package/dist/shared/lucide-icons/settings.svg +1 -0
- package/dist/shared/lucide-icons/settings2.svg +1 -0
- package/dist/shared/lucide-icons/shapes.svg +1 -0
- package/dist/shared/lucide-icons/share.svg +1 -0
- package/dist/shared/lucide-icons/share2.svg +1 -0
- package/dist/shared/lucide-icons/sheet.svg +1 -0
- package/dist/shared/lucide-icons/shell.svg +1 -0
- package/dist/shared/lucide-icons/shield-alert.svg +1 -0
- package/dist/shared/lucide-icons/shield-ban.svg +1 -0
- package/dist/shared/lucide-icons/shield-check.svg +1 -0
- package/dist/shared/lucide-icons/shield-ellipsis.svg +1 -0
- package/dist/shared/lucide-icons/shield-half.svg +1 -0
- package/dist/shared/lucide-icons/shield-minus.svg +1 -0
- package/dist/shared/lucide-icons/shield-off.svg +1 -0
- package/dist/shared/lucide-icons/shield-plus.svg +1 -0
- package/dist/shared/lucide-icons/shield-question.svg +1 -0
- package/dist/shared/lucide-icons/shield-x.svg +1 -0
- package/dist/shared/lucide-icons/shield.svg +1 -0
- package/dist/shared/lucide-icons/ship-wheel.svg +1 -0
- package/dist/shared/lucide-icons/ship.svg +1 -0
- package/dist/shared/lucide-icons/shirt.svg +1 -0
- package/dist/shared/lucide-icons/shopping-bag.svg +1 -0
- package/dist/shared/lucide-icons/shopping-basket.svg +1 -0
- package/dist/shared/lucide-icons/shopping-cart.svg +1 -0
- package/dist/shared/lucide-icons/shovel.svg +1 -0
- package/dist/shared/lucide-icons/shower-head.svg +1 -0
- package/dist/shared/lucide-icons/shrink.svg +1 -0
- package/dist/shared/lucide-icons/shrub.svg +1 -0
- package/dist/shared/lucide-icons/shuffle.svg +1 -0
- package/dist/shared/lucide-icons/sigma.svg +1 -0
- package/dist/shared/lucide-icons/signal-high.svg +1 -0
- package/dist/shared/lucide-icons/signal-low.svg +1 -0
- package/dist/shared/lucide-icons/signal-medium.svg +1 -0
- package/dist/shared/lucide-icons/signal-zero.svg +1 -0
- package/dist/shared/lucide-icons/signal.svg +1 -0
- package/dist/shared/lucide-icons/signature.svg +1 -0
- package/dist/shared/lucide-icons/signpost-big.svg +1 -0
- package/dist/shared/lucide-icons/signpost.svg +1 -0
- package/dist/shared/lucide-icons/siren.svg +1 -0
- package/dist/shared/lucide-icons/skip-back.svg +1 -0
- package/dist/shared/lucide-icons/skip-forward.svg +1 -0
- package/dist/shared/lucide-icons/skull.svg +1 -0
- package/dist/shared/lucide-icons/slack.svg +1 -0
- package/dist/shared/lucide-icons/slash.svg +1 -0
- package/dist/shared/lucide-icons/slice.svg +1 -0
- package/dist/shared/lucide-icons/sliders-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/sliders-vertical.svg +1 -0
- package/dist/shared/lucide-icons/smartphone-charging.svg +1 -0
- package/dist/shared/lucide-icons/smartphone-nfc.svg +1 -0
- package/dist/shared/lucide-icons/smartphone.svg +1 -0
- package/dist/shared/lucide-icons/smile-plus.svg +1 -0
- package/dist/shared/lucide-icons/smile.svg +1 -0
- package/dist/shared/lucide-icons/snail.svg +1 -0
- package/dist/shared/lucide-icons/snowflake.svg +1 -0
- package/dist/shared/lucide-icons/sofa.svg +1 -0
- package/dist/shared/lucide-icons/soup.svg +1 -0
- package/dist/shared/lucide-icons/space.svg +1 -0
- package/dist/shared/lucide-icons/spade.svg +1 -0
- package/dist/shared/lucide-icons/sparkle.svg +1 -0
- package/dist/shared/lucide-icons/sparkles.svg +1 -0
- package/dist/shared/lucide-icons/speaker.svg +1 -0
- package/dist/shared/lucide-icons/speech.svg +1 -0
- package/dist/shared/lucide-icons/spell-check.svg +1 -0
- package/dist/shared/lucide-icons/spell-check2.svg +1 -0
- package/dist/shared/lucide-icons/spline.svg +1 -0
- package/dist/shared/lucide-icons/split.svg +1 -0
- package/dist/shared/lucide-icons/spray-can.svg +1 -0
- package/dist/shared/lucide-icons/sprout.svg +1 -0
- package/dist/shared/lucide-icons/square-activity.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-down-left.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-down-right.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-left.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-out-down-left.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-out-down-right.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-out-up-left.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-out-up-right.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-right.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-up-left.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-up-right.svg +1 -0
- package/dist/shared/lucide-icons/square-arrow-up.svg +1 -0
- package/dist/shared/lucide-icons/square-asterisk.svg +1 -0
- package/dist/shared/lucide-icons/square-bottom-dashed-scissors.svg +1 -0
- package/dist/shared/lucide-icons/square-chart-gantt.svg +1 -0
- package/dist/shared/lucide-icons/square-check-big.svg +1 -0
- package/dist/shared/lucide-icons/square-check.svg +1 -0
- package/dist/shared/lucide-icons/square-chevron-down.svg +1 -0
- package/dist/shared/lucide-icons/square-chevron-left.svg +1 -0
- package/dist/shared/lucide-icons/square-chevron-right.svg +1 -0
- package/dist/shared/lucide-icons/square-chevron-up.svg +1 -0
- package/dist/shared/lucide-icons/square-code.svg +1 -0
- package/dist/shared/lucide-icons/square-dashed-bottom-code.svg +1 -0
- package/dist/shared/lucide-icons/square-dashed-bottom.svg +1 -0
- package/dist/shared/lucide-icons/square-dashed-kanban.svg +1 -0
- package/dist/shared/lucide-icons/square-dashed-mouse-pointer.svg +1 -0
- package/dist/shared/lucide-icons/square-dashed.svg +1 -0
- package/dist/shared/lucide-icons/square-divide.svg +1 -0
- package/dist/shared/lucide-icons/square-dot.svg +1 -0
- package/dist/shared/lucide-icons/square-equal.svg +1 -0
- package/dist/shared/lucide-icons/square-function.svg +1 -0
- package/dist/shared/lucide-icons/square-kanban.svg +1 -0
- package/dist/shared/lucide-icons/square-library.svg +1 -0
- package/dist/shared/lucide-icons/square-m.svg +1 -0
- package/dist/shared/lucide-icons/square-menu.svg +1 -0
- package/dist/shared/lucide-icons/square-minus.svg +1 -0
- package/dist/shared/lucide-icons/square-mouse-pointer.svg +1 -0
- package/dist/shared/lucide-icons/square-parking-off.svg +1 -0
- package/dist/shared/lucide-icons/square-parking.svg +1 -0
- package/dist/shared/lucide-icons/square-pen.svg +1 -0
- package/dist/shared/lucide-icons/square-percent.svg +1 -0
- package/dist/shared/lucide-icons/square-pi.svg +1 -0
- package/dist/shared/lucide-icons/square-pilcrow.svg +1 -0
- package/dist/shared/lucide-icons/square-play.svg +1 -0
- package/dist/shared/lucide-icons/square-plus.svg +1 -0
- package/dist/shared/lucide-icons/square-power.svg +1 -0
- package/dist/shared/lucide-icons/square-radical.svg +1 -0
- package/dist/shared/lucide-icons/square-scissors.svg +1 -0
- package/dist/shared/lucide-icons/square-sigma.svg +1 -0
- package/dist/shared/lucide-icons/square-slash.svg +1 -0
- package/dist/shared/lucide-icons/square-split-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/square-split-vertical.svg +1 -0
- package/dist/shared/lucide-icons/square-square.svg +1 -0
- package/dist/shared/lucide-icons/square-stack.svg +1 -0
- package/dist/shared/lucide-icons/square-terminal.svg +1 -0
- package/dist/shared/lucide-icons/square-user-round.svg +1 -0
- package/dist/shared/lucide-icons/square-user.svg +1 -0
- package/dist/shared/lucide-icons/square-x.svg +1 -0
- package/dist/shared/lucide-icons/square.svg +1 -0
- package/dist/shared/lucide-icons/squircle.svg +1 -0
- package/dist/shared/lucide-icons/squirrel.svg +1 -0
- package/dist/shared/lucide-icons/stamp.svg +1 -0
- package/dist/shared/lucide-icons/star-half.svg +1 -0
- package/dist/shared/lucide-icons/star-off.svg +1 -0
- package/dist/shared/lucide-icons/star.svg +1 -0
- package/dist/shared/lucide-icons/step-back.svg +1 -0
- package/dist/shared/lucide-icons/step-forward.svg +1 -0
- package/dist/shared/lucide-icons/stethoscope.svg +1 -0
- package/dist/shared/lucide-icons/sticker.svg +1 -0
- package/dist/shared/lucide-icons/sticky-note.svg +1 -0
- package/dist/shared/lucide-icons/store.svg +1 -0
- package/dist/shared/lucide-icons/stretch-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/stretch-vertical.svg +1 -0
- package/dist/shared/lucide-icons/strikethrough.svg +1 -0
- package/dist/shared/lucide-icons/subscript.svg +1 -0
- package/dist/shared/lucide-icons/sun-dim.svg +1 -0
- package/dist/shared/lucide-icons/sun-medium.svg +1 -0
- package/dist/shared/lucide-icons/sun-moon.svg +1 -0
- package/dist/shared/lucide-icons/sun-snow.svg +1 -0
- package/dist/shared/lucide-icons/sun.svg +1 -0
- package/dist/shared/lucide-icons/sunrise.svg +1 -0
- package/dist/shared/lucide-icons/sunset.svg +1 -0
- package/dist/shared/lucide-icons/superscript.svg +1 -0
- package/dist/shared/lucide-icons/swatch-book.svg +1 -0
- package/dist/shared/lucide-icons/swiss-franc.svg +1 -0
- package/dist/shared/lucide-icons/switch-camera.svg +1 -0
- package/dist/shared/lucide-icons/sword.svg +1 -0
- package/dist/shared/lucide-icons/swords.svg +1 -0
- package/dist/shared/lucide-icons/syringe.svg +1 -0
- package/dist/shared/lucide-icons/table-cells-merge.svg +1 -0
- package/dist/shared/lucide-icons/table-cells-split.svg +1 -0
- package/dist/shared/lucide-icons/table-columns-split.svg +1 -0
- package/dist/shared/lucide-icons/table-of-contents.svg +1 -0
- package/dist/shared/lucide-icons/table-properties.svg +1 -0
- package/dist/shared/lucide-icons/table-rows-split.svg +1 -0
- package/dist/shared/lucide-icons/table.svg +1 -0
- package/dist/shared/lucide-icons/table2.svg +1 -0
- package/dist/shared/lucide-icons/tablet-smartphone.svg +1 -0
- package/dist/shared/lucide-icons/tablet.svg +1 -0
- package/dist/shared/lucide-icons/tablets.svg +1 -0
- package/dist/shared/lucide-icons/tag.svg +1 -0
- package/dist/shared/lucide-icons/tags.svg +1 -0
- package/dist/shared/lucide-icons/tally1.svg +1 -0
- package/dist/shared/lucide-icons/tally2.svg +1 -0
- package/dist/shared/lucide-icons/tally3.svg +1 -0
- package/dist/shared/lucide-icons/tally4.svg +1 -0
- package/dist/shared/lucide-icons/tally5.svg +1 -0
- package/dist/shared/lucide-icons/tangent.svg +1 -0
- package/dist/shared/lucide-icons/target.svg +1 -0
- package/dist/shared/lucide-icons/telescope.svg +1 -0
- package/dist/shared/lucide-icons/tent-tree.svg +1 -0
- package/dist/shared/lucide-icons/tent.svg +1 -0
- package/dist/shared/lucide-icons/terminal.svg +1 -0
- package/dist/shared/lucide-icons/test-tube-diagonal.svg +1 -0
- package/dist/shared/lucide-icons/test-tube.svg +1 -0
- package/dist/shared/lucide-icons/test-tubes.svg +1 -0
- package/dist/shared/lucide-icons/text-cursor-input.svg +1 -0
- package/dist/shared/lucide-icons/text-cursor.svg +1 -0
- package/dist/shared/lucide-icons/text-quote.svg +1 -0
- package/dist/shared/lucide-icons/text-search.svg +1 -0
- package/dist/shared/lucide-icons/text-select.svg +1 -0
- package/dist/shared/lucide-icons/text.svg +1 -0
- package/dist/shared/lucide-icons/theater.svg +1 -0
- package/dist/shared/lucide-icons/thermometer-snowflake.svg +1 -0
- package/dist/shared/lucide-icons/thermometer-sun.svg +1 -0
- package/dist/shared/lucide-icons/thermometer.svg +1 -0
- package/dist/shared/lucide-icons/thumbs-down.svg +1 -0
- package/dist/shared/lucide-icons/thumbs-up.svg +1 -0
- package/dist/shared/lucide-icons/ticket-check.svg +1 -0
- package/dist/shared/lucide-icons/ticket-minus.svg +1 -0
- package/dist/shared/lucide-icons/ticket-percent.svg +1 -0
- package/dist/shared/lucide-icons/ticket-plus.svg +1 -0
- package/dist/shared/lucide-icons/ticket-slash.svg +1 -0
- package/dist/shared/lucide-icons/ticket-x.svg +1 -0
- package/dist/shared/lucide-icons/ticket.svg +1 -0
- package/dist/shared/lucide-icons/tickets-plane.svg +1 -0
- package/dist/shared/lucide-icons/tickets.svg +1 -0
- package/dist/shared/lucide-icons/timer-off.svg +1 -0
- package/dist/shared/lucide-icons/timer-reset.svg +1 -0
- package/dist/shared/lucide-icons/timer.svg +1 -0
- package/dist/shared/lucide-icons/toggle-left.svg +1 -0
- package/dist/shared/lucide-icons/toggle-right.svg +1 -0
- package/dist/shared/lucide-icons/toilet.svg +1 -0
- package/dist/shared/lucide-icons/tornado.svg +1 -0
- package/dist/shared/lucide-icons/torus.svg +1 -0
- package/dist/shared/lucide-icons/touchpad-off.svg +1 -0
- package/dist/shared/lucide-icons/touchpad.svg +1 -0
- package/dist/shared/lucide-icons/tower-control.svg +1 -0
- package/dist/shared/lucide-icons/toy-brick.svg +1 -0
- package/dist/shared/lucide-icons/tractor.svg +1 -0
- package/dist/shared/lucide-icons/traffic-cone.svg +1 -0
- package/dist/shared/lucide-icons/train-front-tunnel.svg +1 -0
- package/dist/shared/lucide-icons/train-front.svg +1 -0
- package/dist/shared/lucide-icons/train-track.svg +1 -0
- package/dist/shared/lucide-icons/tram-front.svg +1 -0
- package/dist/shared/lucide-icons/trash.svg +1 -0
- package/dist/shared/lucide-icons/trash2.svg +1 -0
- package/dist/shared/lucide-icons/tree-deciduous.svg +1 -0
- package/dist/shared/lucide-icons/tree-palm.svg +1 -0
- package/dist/shared/lucide-icons/tree-pine.svg +1 -0
- package/dist/shared/lucide-icons/trees.svg +1 -0
- package/dist/shared/lucide-icons/trello.svg +1 -0
- package/dist/shared/lucide-icons/trending-down.svg +1 -0
- package/dist/shared/lucide-icons/trending-up-down.svg +1 -0
- package/dist/shared/lucide-icons/trending-up.svg +1 -0
- package/dist/shared/lucide-icons/triangle-alert.svg +1 -0
- package/dist/shared/lucide-icons/triangle-right.svg +1 -0
- package/dist/shared/lucide-icons/triangle.svg +1 -0
- package/dist/shared/lucide-icons/trophy.svg +1 -0
- package/dist/shared/lucide-icons/truck.svg +1 -0
- package/dist/shared/lucide-icons/turtle.svg +1 -0
- package/dist/shared/lucide-icons/tv-minimal-play.svg +1 -0
- package/dist/shared/lucide-icons/tv-minimal.svg +1 -0
- package/dist/shared/lucide-icons/tv.svg +1 -0
- package/dist/shared/lucide-icons/twitch.svg +1 -0
- package/dist/shared/lucide-icons/twitter.svg +1 -0
- package/dist/shared/lucide-icons/type-outline.svg +1 -0
- package/dist/shared/lucide-icons/type.svg +1 -0
- package/dist/shared/lucide-icons/umbrella-off.svg +1 -0
- package/dist/shared/lucide-icons/umbrella.svg +1 -0
- package/dist/shared/lucide-icons/underline.svg +1 -0
- package/dist/shared/lucide-icons/undo-dot.svg +1 -0
- package/dist/shared/lucide-icons/undo.svg +1 -0
- package/dist/shared/lucide-icons/undo2.svg +1 -0
- package/dist/shared/lucide-icons/unfold-horizontal.svg +1 -0
- package/dist/shared/lucide-icons/unfold-vertical.svg +1 -0
- package/dist/shared/lucide-icons/ungroup.svg +1 -0
- package/dist/shared/lucide-icons/university.svg +1 -0
- package/dist/shared/lucide-icons/unlink.svg +1 -0
- package/dist/shared/lucide-icons/unlink2.svg +1 -0
- package/dist/shared/lucide-icons/unplug.svg +1 -0
- package/dist/shared/lucide-icons/upload.svg +1 -0
- package/dist/shared/lucide-icons/usb.svg +1 -0
- package/dist/shared/lucide-icons/user-check.svg +1 -0
- package/dist/shared/lucide-icons/user-cog.svg +1 -0
- package/dist/shared/lucide-icons/user-minus.svg +1 -0
- package/dist/shared/lucide-icons/user-pen.svg +1 -0
- package/dist/shared/lucide-icons/user-plus.svg +1 -0
- package/dist/shared/lucide-icons/user-round-check.svg +1 -0
- package/dist/shared/lucide-icons/user-round-cog.svg +1 -0
- package/dist/shared/lucide-icons/user-round-minus.svg +1 -0
- package/dist/shared/lucide-icons/user-round-pen.svg +1 -0
- package/dist/shared/lucide-icons/user-round-plus.svg +1 -0
- package/dist/shared/lucide-icons/user-round-search.svg +1 -0
- package/dist/shared/lucide-icons/user-round-x.svg +1 -0
- package/dist/shared/lucide-icons/user-round.svg +1 -0
- package/dist/shared/lucide-icons/user-search.svg +1 -0
- package/dist/shared/lucide-icons/user-x.svg +1 -0
- package/dist/shared/lucide-icons/user.svg +1 -0
- package/dist/shared/lucide-icons/users-round.svg +1 -0
- package/dist/shared/lucide-icons/users.svg +1 -0
- package/dist/shared/lucide-icons/utensils-crossed.svg +1 -0
- package/dist/shared/lucide-icons/utensils.svg +1 -0
- package/dist/shared/lucide-icons/utility-pole.svg +1 -0
- package/dist/shared/lucide-icons/variable.svg +1 -0
- package/dist/shared/lucide-icons/vault.svg +1 -0
- package/dist/shared/lucide-icons/vegan.svg +1 -0
- package/dist/shared/lucide-icons/venetian-mask.svg +1 -0
- package/dist/shared/lucide-icons/vibrate-off.svg +1 -0
- package/dist/shared/lucide-icons/vibrate.svg +1 -0
- package/dist/shared/lucide-icons/video-off.svg +1 -0
- package/dist/shared/lucide-icons/video.svg +1 -0
- package/dist/shared/lucide-icons/videotape.svg +1 -0
- package/dist/shared/lucide-icons/view.svg +1 -0
- package/dist/shared/lucide-icons/voicemail.svg +1 -0
- package/dist/shared/lucide-icons/volleyball.svg +1 -0
- package/dist/shared/lucide-icons/volume-off.svg +1 -0
- package/dist/shared/lucide-icons/volume-x.svg +1 -0
- package/dist/shared/lucide-icons/volume.svg +1 -0
- package/dist/shared/lucide-icons/volume1.svg +1 -0
- package/dist/shared/lucide-icons/volume2.svg +1 -0
- package/dist/shared/lucide-icons/vote.svg +1 -0
- package/dist/shared/lucide-icons/wallet-cards.svg +1 -0
- package/dist/shared/lucide-icons/wallet-minimal.svg +1 -0
- package/dist/shared/lucide-icons/wallet.svg +1 -0
- package/dist/shared/lucide-icons/wallpaper.svg +1 -0
- package/dist/shared/lucide-icons/wand-sparkles.svg +1 -0
- package/dist/shared/lucide-icons/wand.svg +1 -0
- package/dist/shared/lucide-icons/warehouse.svg +1 -0
- package/dist/shared/lucide-icons/washing-machine.svg +1 -0
- package/dist/shared/lucide-icons/watch.svg +1 -0
- package/dist/shared/lucide-icons/waves-ladder.svg +1 -0
- package/dist/shared/lucide-icons/waves.svg +1 -0
- package/dist/shared/lucide-icons/waypoints.svg +1 -0
- package/dist/shared/lucide-icons/webcam.svg +1 -0
- package/dist/shared/lucide-icons/webhook-off.svg +1 -0
- package/dist/shared/lucide-icons/webhook.svg +1 -0
- package/dist/shared/lucide-icons/weight.svg +1 -0
- package/dist/shared/lucide-icons/wheat-off.svg +1 -0
- package/dist/shared/lucide-icons/wheat.svg +1 -0
- package/dist/shared/lucide-icons/whole-word.svg +1 -0
- package/dist/shared/lucide-icons/wifi-high.svg +1 -0
- package/dist/shared/lucide-icons/wifi-low.svg +1 -0
- package/dist/shared/lucide-icons/wifi-off.svg +1 -0
- package/dist/shared/lucide-icons/wifi-zero.svg +1 -0
- package/dist/shared/lucide-icons/wifi.svg +1 -0
- package/dist/shared/lucide-icons/wind-arrow-down.svg +1 -0
- package/dist/shared/lucide-icons/wind.svg +1 -0
- package/dist/shared/lucide-icons/wine-off.svg +1 -0
- package/dist/shared/lucide-icons/wine.svg +1 -0
- package/dist/shared/lucide-icons/workflow.svg +1 -0
- package/dist/shared/lucide-icons/worm.svg +1 -0
- package/dist/shared/lucide-icons/wrap-text.svg +1 -0
- package/dist/shared/lucide-icons/wrench.svg +1 -0
- package/dist/shared/lucide-icons/x.svg +1 -0
- package/dist/shared/lucide-icons/youtube.svg +1 -0
- package/dist/shared/lucide-icons/zap-off.svg +1 -0
- package/dist/shared/lucide-icons/zap.svg +1 -0
- package/dist/shared/lucide-icons/zoom-in.svg +1 -0
- package/dist/shared/lucide-icons/zoom-out.svg +1 -0
- package/dist/{server → shared}/projectIcons.js +2 -2
- package/package.json +6 -4
- package/preview-1.png +0 -0
- package/dist/client/assets/GitDialog-ULwrGkKd.js +0 -3
- package/dist/client/assets/HistoryDialog-BE7jyWWP.js +0 -5
- package/dist/client/assets/PdfPreview-BputjYeR.js +0 -1
- package/dist/client/assets/ProjectNavigationDialogs-BVE1JsHd.js +0 -1
- package/dist/client/assets/SystemMetricsDialog-DxQsGcIH.js +0 -1
- package/dist/client/assets/index-Dx9UqMyC.js +0 -64
- package/dist/client/assets/index-DzzqNm9b.css +0 -1
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-BputjYeR.js","assets/react-BoEjKzFZ.js","assets/pdf-BB1XvBIF.js","assets/minus-B08vgSQJ.js","assets/SystemMetricsDialog-DxQsGcIH.js","assets/spellCheck-9fdyhJtV.js","assets/LatexEditor-DbU8fMFZ.js","assets/editor-CiK7TK0p.js","assets/GitDialog-ULwrGkKd.js","assets/HistoryDialog-BE7jyWWP.js","assets/ProjectNavigationDialogs-BVE1JsHd.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as rp,u as Qe,j as i,r as f,R as Ur,a as Uu,b as ip,P as Yi,c as zo,d as ap,e as op}from"./react-BoEjKzFZ.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var ja={};const Pe=t=>typeof t=="string",pr=()=>{let t,e;const n=new Promise((s,r)=>{t=s,e=r});return n.resolve=t,n.reject=e,n},Dl=t=>t==null?"":""+t,cp=(t,e,n)=>{t.forEach(s=>{e[s]&&(n[s]=e[s])})},lp=/###/g,yl=t=>t&&t.indexOf("###")>-1?t.replace(lp,"."):t,bl=t=>!t||Pe(t),Cr=(t,e,n)=>{const s=Pe(e)?e.split("."):e;let r=0;for(;r<s.length-1;){if(bl(t))return{};const a=yl(s[r]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++r}return bl(t)?{}:{obj:t,k:yl(s[r])}},Fl=(t,e,n)=>{const{obj:s,k:r}=Cr(t,e,Object);if(s!==void 0||e.length===1){s[r]=n;return}let a=e[e.length-1],o=e.slice(0,e.length-1),c=Cr(t,o,Object);for(;c.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),c=Cr(t,o,Object),c?.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},up=(t,e,n,s)=>{const{obj:r,k:a}=Cr(t,e,Object);r[a]=r[a]||[],r[a].push(n)},Ei=(t,e)=>{const{obj:n,k:s}=Cr(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,s))return n[s]},dp=(t,e,n)=>{const s=Ei(t,n);return s!==void 0?s:Ei(e,n)},Hu=(t,e,n)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in t?Pe(t[s])||t[s]instanceof String||Pe(e[s])||e[s]instanceof String?n&&(t[s]=e[s]):Hu(t[s],e[s],n):t[s]=e[s]);return t},is=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hp={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const fp=t=>Pe(t)?t.replace(/[&<>"'\/]/g,e=>hp[e]):t;class mp{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const pp=[" ",",","?","!",";"],gp=new mp(20),Dp=(t,e,n)=>{e=e||"",n=n||"";const s=pp.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(s.length===0)return!0;const r=gp.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!r.test(t);if(!a){const o=t.indexOf(n);o>0&&!r.test(t.substring(0,o))&&(a=!0)}return a},ro=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const s=e.split(n);let r=t;for(let a=0;a<s.length;){if(!r||typeof r!="object")return;let o,c="";for(let l=a;l<s.length;++l)if(l!==a&&(c+=n),c+=s[l],o=r[c],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<s.length-1)continue;a+=l-a+1;break}r=o}return r},Ar=t=>t?.replace(/_/g,"-"),yp={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class xi{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||yp,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,s,r){return r&&!this.debug?null:(Pe(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new xi(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xi(this.logger,e)}}var wn=new xi;class Xi{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const r=this.observers[s].get(n)||0;this.observers[s].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,a])=>{for(let o=0;o<a;o++)r(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,a])=>{for(let o=0;o<a;o++)r.apply(r,[e,...n])})}}class Cl extends Xi{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,s,r={}){const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;e.indexOf(".")>-1?c=e.split("."):(c=[e,n],s&&(Array.isArray(s)?c.push(...s):Pe(s)&&a?c.push(...s.split(a)):c.push(s)));const l=Ei(this.data,c);return!l&&!n&&!s&&e.indexOf(".")>-1&&(e=c[0],n=c[1],s=c.slice(2).join(".")),l||!o||!Pe(s)?l:ro(this.data?.[e]?.[n],s,a)}addResource(e,n,s,r,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[e,n];s&&(c=c.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(c=e.split("."),r=n,n=c[1]),this.addNamespaces(n),Fl(this.data,c,r),a.silent||this.emit("added",e,n,s,r)}addResources(e,n,s,r={silent:!1}){for(const a in s)(Pe(s[a])||Array.isArray(s[a]))&&this.addResource(e,n,a,s[a],{silent:!0});r.silent||this.emit("added",e,n,s)}addResourceBundle(e,n,s,r,a,o={silent:!1,skipCopy:!1}){let c=[e,n];e.indexOf(".")>-1&&(c=e.split("."),r=s,s=n,n=c[1]),this.addNamespaces(n);let l=Ei(this.data,c)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),r?Hu(l,s,a):l={...l,...s},Fl(this.data,c,l),o.silent||this.emit("added",e,n,s)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var Vu={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,s,r){return t.forEach(a=>{e=this.processors[a]?.process(e,n,s,r)??e}),e}};const qu=Symbol("i18next/PATH_KEY");function bp(){const t=[],e=Object.create(null);let n;return e.get=(s,r)=>(n?.revoke?.(),r===qu?t:(t.push(r),n=Proxy.revocable(s,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function Os(t,e){const{[qu]:n}=t(bp()),s=e?.keySeparator??".",r=e?.nsSeparator??":";if(n.length>1&&r){const a=e?.ns,o=Array.isArray(a)?a:null;if(o&&o.length>1&&o.slice(1).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(s)}`}return n.join(s)}const wl={},Sa=t=>!Pe(t)&&typeof t!="boolean"&&typeof t!="number";class vi extends Xi{constructor(e,n={}){super(),cp(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const s={...n};if(e==null)return!1;const r=this.resolve(e,s);if(r?.res===void 0)return!1;const a=Sa(r.res);return!(s.returnObjects===!1&&a)}extractFromKey(e,n){let s=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Dp(e,s,r);if(o&&!c){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:Pe(a)?[a]:a};const u=e.split(s);(s!==r||s===r&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(r)}return{key:e,namespaces:Pe(a)?[a]:a}}translate(e,n,s){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=Os(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(K=>typeof K=="function"?Os(K,{...this.options,...r}):String(K));const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:c,namespaces:l}=this.extractFromKey(e[e.length-1],r),u=l[l.length-1];let d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return p?a?{res:`${u}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${d}${c}`:a?{res:c,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:c;const m=this.resolve(e,r);let D=m?.res;const C=m?.usedKey||c,b=m?.exactUsedKey||c,w=["[object Number]","[object Function]","[object RegExp]"],x=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject,L=r.count!==void 0&&!Pe(r.count),T=vi.hasDefaultValue(r),_=L?this.pluralResolver.getSuffix(h,r.count,r):"",$=r.ordinal&&L?this.pluralResolver.getSuffix(h,r.count,{ordinal:!1}):"",O=L&&!r.ordinal&&r.count===0,J=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${_}`]||r[`defaultValue${$}`]||r.defaultValue;let z=D;N&&!D&&T&&(z=J);const ae=Sa(z),M=Object.prototype.toString.apply(z);if(N&&z&&ae&&w.indexOf(M)<0&&!(Pe(x)&&Array.isArray(z))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,z,{...r,ns:l}):`key '${c} (${this.language})' returned an object instead of string.`;return a?(m.res=K,m.usedParams=this.getUsedParamsDetails(r),m):K}if(o){const K=Array.isArray(z),R=K?[]:{},A=K?b:C;for(const P in z)if(Object.prototype.hasOwnProperty.call(z,P)){const pe=`${A}${o}${P}`;T&&!D?R[P]=this.translate(pe,{...r,defaultValue:Sa(J)?J[P]:void 0,joinArrays:!1,ns:l}):R[P]=this.translate(pe,{...r,joinArrays:!1,ns:l}),R[P]===pe&&(R[P]=z[P])}D=R}}else if(N&&Pe(x)&&Array.isArray(D))D=D.join(x),D&&(D=this.extendTranslation(D,e,r,s));else{let K=!1,R=!1;!this.isValidLookup(D)&&T&&(K=!0,D=J),this.isValidLookup(D)||(R=!0,D=c);const P=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:D,pe=T&&J!==D&&this.options.updateMissing;if(R||K||pe){if(this.logger.log(pe?"updateKey":"missingKey",h,u,c,pe?J:D),o){const Ce=this.resolve(c,{...r,keySeparator:!1});Ce&&Ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let we=[];const Fe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Fe&&Fe[0])for(let Ce=0;Ce<Fe.length;Ce++)we.push(Fe[Ce]);else this.options.saveMissingTo==="all"?we=this.languageUtils.toResolveHierarchy(r.lng||this.language):we.push(r.lng||this.language);const Ne=(Ce,v,ue)=>{const Z=T&&ue!==D?ue:P;this.options.missingKeyHandler?this.options.missingKeyHandler(Ce,u,v,Z,pe,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(Ce,u,v,Z,pe,r),this.emit("missingKey",Ce,u,v,D)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?we.forEach(Ce=>{const v=this.pluralResolver.getSuffixes(Ce,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&v.indexOf(`${this.options.pluralSeparator}zero`)<0&&v.push(`${this.options.pluralSeparator}zero`),v.forEach(ue=>{Ne([Ce],c+ue,r[`defaultValue${ue}`]||J)})}):Ne(we,c,J))}D=this.extendTranslation(D,e,r,m,s),R&&D===c&&this.options.appendNamespaceToMissingKey&&(D=`${u}${d}${c}`),(R||K)&&this.options.parseMissingKeyHandler&&(D=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${c}`:c,K?D:void 0,r))}return a?(m.res=D,m.usedParams=this.getUsedParamsDetails(r),m):D}extendTranslation(e,n,s,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const l=Pe(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const h=e.match(this.interpolator.nestingRegexp);u=h&&h.length}let d=s.replace&&!Pe(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,s.lng||this.language||r.usedLng,s),l){const h=e.match(this.interpolator.nestingRegexp),p=h&&h.length;u<p&&(s.nest=!1)}!s.lng&&r&&r.res&&(s.lng=this.language||r.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>a?.[0]===h[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,c=Pe(o)?[o]:o;return e!=null&&c?.length&&s.applyPostProcessor!==!1&&(e=Vu.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,n={}){let s,r,a,o,c;return Pe(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?Os(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,n),d=u.key;r=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=n.count!==void 0&&!Pe(n.count),m=p&&!n.ordinal&&n.count===0,D=n.context!==void 0&&(Pe(n.context)||typeof n.context=="number")&&n.context!=="",C=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(b=>{this.isValidLookup(s)||(c=b,!wl[`${C[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(c)&&(wl[`${C[0]}-${b}`]=!0,this.logger.warn(`key "${r}" for languages "${C.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(w=>{if(this.isValidLookup(s))return;o=w;const x=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,w,b,n);else{let L;p&&(L=this.pluralResolver.getSuffix(w,n.count,n));const T=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&L.indexOf(_)===0&&x.push(d+L.replace(_,this.options.pluralSeparator)),x.push(d+L),m&&x.push(d+T)),D){const $=`${d}${this.options.contextSeparator||"_"}${n.context}`;x.push($),p&&(n.ordinal&&L.indexOf(_)===0&&x.push($+L.replace(_,this.options.pluralSeparator)),x.push($+L),m&&x.push($+T))}}let N;for(;N=x.pop();)this.isValidLookup(s)||(a=N,s=this.getResource(w,b,N,n))}))})}),{res:s,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:c}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,s,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,s,r):this.resourceStore.getResource(e,n,s,r)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!Pe(e.replace);let r=s?e.replace:e;if(s&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!s){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&n===s.substring(0,n.length)&&e[s]!==void 0)return!0;return!1}}class El{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wn.create("languageUtils")}getScriptPartFromCode(e){if(e=Ar(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Ar(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Pe(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(s=>{if(n)return;const r=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(s=>{if(n)return;const r=this.getScriptPartFromCode(s);if(this.isSupportedCode(r))return n=r;const a=this.getLanguagePartFromCode(s);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Pe(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let s=e[n];return s||(s=e[this.getScriptPartFromCode(n)]),s||(s=e[this.formatLanguageCode(n)]),s||(s=e[this.getLanguagePartFromCode(n)]),s||(s=e.default),s||[]}toResolveHierarchy(e,n){const s=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),r=[],a=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Pe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Pe(e)&&a(this.formatLanguageCode(e)),s.forEach(o=>{r.indexOf(o)<0&&a(this.formatLanguageCode(o))}),r}}const xl={zero:0,one:1,two:2,few:3,many:4,other:5},vl={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Fp{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=wn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const s=Ar(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:s,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(s,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),vl;if(!e.match(/-|_/))return vl;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,n)}return this.pluralRulesCache[a]=o,o}needsPlural(e,n={}){let s=this.getRule(e,n);return s||(s=this.getRule("dev",n)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,s={}){return this.getSuffixes(e,s).map(r=>`${n}${r}`)}getSuffixes(e,n={}){let s=this.getRule(e,n);return s||(s=this.getRule("dev",n)),s?s.resolvedOptions().pluralCategories.sort((r,a)=>xl[r]-xl[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,n,s={}){const r=this.getRule(e,s);return r?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,s))}}const kl=(t,e,n,s=".",r=!0)=>{let a=dp(t,e,n);return!a&&r&&Pe(n)&&(a=ro(t,n,s),a===void 0&&(a=ro(e,n,s))),a},Ta=t=>t.replace(/\$/g,"$$$$");class Al{constructor(e={}){this.logger=wn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:s,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:c,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:m,nestingSuffix:D,nestingSuffixEscaped:C,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=n!==void 0?n:fp,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=a?is(a):o||"{{",this.suffix=c?is(c):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?is(p):m||is("$t("),this.nestingSuffix=D?is(D):C||is(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,s)=>n?.source===s?(n.lastIndex=0,n):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,s,r){let a,o,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const w=kl(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,s,{...r,...n,interpolationkey:m}):w}const D=m.split(this.formatSeparator),C=D.shift().trim(),b=D.join(this.formatSeparator).trim();return this.format(kl(n,l,C,this.options.keySeparator,this.options.ignoreJSONStructure),b,s,{...r,...n,interpolationkey:C})};this.resetRegExp();const d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Ta(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Ta(this.escape(m)):Ta(m)}].forEach(m=>{for(c=0;a=m.regex.exec(e);){const D=a[1].trim();if(o=u(D),o===void 0)if(typeof d=="function"){const b=d(e,a,r);o=Pe(b)?b:""}else if(r&&Object.prototype.hasOwnProperty.call(r,D))o="";else if(h){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${D} for interpolating ${e}`),o="";else!Pe(o)&&!this.useRawValueToEscape&&(o=Dl(o));const C=m.safeValue(o);if(e=e.replace(a[0],C),h?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,n,s={}){let r,a,o;const c=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const h=l.split(new RegExp(`${is(d)}[ ]*{`));let p=`{${h[1]}`;l=h[0],p=this.interpolate(p,o);const m=p.match(/'/g),D=p.match(/"/g);((m?.length??0)%2===0&&!D||(D?.length??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),u&&(o={...u,...o})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,C),`${l}${d}${p}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&!Pe(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(l=r[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),a=n(c.call(this,r[1].trim(),o),o),a&&r[0]===e&&!Pe(a))return a;Pe(a)||(a=Dl(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,h)=>this.format(d,h,s.lng,{...s,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const Cp=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const s=t.split("(");e=s[0].toLowerCase().trim();const r=s[1].substring(0,s[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(o=>{if(o){const[c,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},jl=t=>{const e={};return(n,s,r)=>{let a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a={...a,[r.interpolationkey]:void 0});const o=s+JSON.stringify(a);let c=e[o];return c||(c=t(Ar(s),r),e[o]=c),c(n)}},wp=t=>(e,n,s)=>t(Ar(n),s)(e);class Ep{constructor(e={}){this.logger=wn.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const s=n.cacheInBuiltFormats?jl:wp;this.formats={number:s((r,a)=>{const o=new Intl.NumberFormat(r,{...a});return c=>o.format(c)}),currency:s((r,a)=>{const o=new Intl.NumberFormat(r,{...a,style:"currency"});return c=>o.format(c)}),datetime:s((r,a)=>{const o=new Intl.DateTimeFormat(r,{...a});return c=>o.format(c)}),relativetime:s((r,a)=>{const o=new Intl.RelativeTimeFormat(r,{...a});return c=>o.format(c,a.range||"day")}),list:s((r,a)=>{const o=new Intl.ListFormat(r,{...a});return c=>o.format(c)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=jl(n)}format(e,n,s,r={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,l)=>{const{formatName:u,formatOptions:d}=Cp(l);if(this.formats[u]){let h=c;try{const p=r?.formatParams?.[r.interpolationkey]||{},m=p.locale||p.lng||r.locale||r.lng||s;h=this.formats[u](c,m,{...d,...r,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${u}`);return c},e)}}const xp=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class vp extends Xi{constructor(e,n,s,r={}){super(),this.backend=e,this.store=n,this.services=s,this.languageUtils=s.languageUtils,this.options=r,this.logger=wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,r.backend,r)}queueLoad(e,n,s,r){const a={},o={},c={},l={};return e.forEach(u=>{let d=!0;n.forEach(h=>{const p=`${u}|${h}`;!s.reload&&this.store.hasResourceBundle(u,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,d=!1,o[p]===void 0&&(o[p]=!0),a[p]===void 0&&(a[p]=!0),l[h]===void 0&&(l[h]=!0)))}),d||(c[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(e,n,s){const r=e.split("|"),a=r[0],o=r[1];n&&this.emit("failedLoading",a,o,n),!n&&s&&this.store.addResourceBundle(a,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&s&&(this.state[e]=0);const c={};this.queue.forEach(l=>{up(l.loaded,[a],o),xp(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{c[u]||(c[u]={});const d=l.loaded[u];d.length&&d.forEach(h=>{c[u][h]===void 0&&(c[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(e,n,s,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:s,tried:r,wait:a,callback:o});return}this.readingCalls++;const c=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,s,r+1,a*2,o)},a);return}o(u,d)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>c(null,d)).catch(c):c(null,u)}catch(u){c(u)}return}return l(e,n,c)}prepareLoading(e,n,s={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Pe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Pe(n)&&(n=[n]);const a=this.queueLoad(e,n,s,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,s){this.prepareLoading(e,n,{},s)}reload(e,n,s){this.prepareLoading(e,n,{reload:!0},s)}loadOne(e,n=""){const s=e.split("|"),r=s[0],a=s[1];this.read(r,a,"read",void 0,void 0,(o,c)=>{o&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,o),!o&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,c),this.loaded(e,o,c)})}saveMissing(e,n,s,r,a,o={},c=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${s}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend?.create){const l={...o,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,s,r,l):d=u(e,n,s,r),d&&typeof d.then=="function"?d.then(h=>c(null,h)).catch(c):c(null,d)}catch(d){c(d)}else u(e,n,s,r,c,l)}!e||!e[0]||this.store.addResource(e[0],n,s,r)}}}const Ba=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Pe(t[1])&&(e.defaultValue=t[1]),Pe(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(s=>{e[s]=n[s]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Sl=t=>(Pe(t.ns)&&(t.ns=[t.ns]),Pe(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Pe(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),ai=()=>{},kp=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},Wu="__i18next_supportNoticeShown",Ap=()=>!!(typeof globalThis<"u"&&globalThis[Wu]||typeof process<"u"&&ja&&ja.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&ja),jp=()=>{typeof globalThis<"u"&&(globalThis[Wu]=!0)},Sp=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class wr extends Xi{constructor(e={},n){if(super(),this.options=Sl(e),this.services={},this.logger=wn,this.modules={external:[]},kp(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(Pe(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=Ba();this.options={...s,...this.options,...Sl(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Sp(this)&&!Ap()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),jp());const r=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?wn.init(r(this.modules.logger),this.options):wn.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Ep;const d=new El(this.options);this.store=new Cl(this.options.resources,this.options);const h=this.services;h.logger=wn,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new Fp(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=r(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Al(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new vp(r(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(m,...D)=>{this.emit(m,...D)}),this.modules.languageDetector&&(h.languageDetector=r(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=r(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new vi(this.services,this.options),this.translator.on("*",(m,...D)=>{this.emit(m,...D)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ai),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const c=pr(),l=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),n(d,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),c}loadResources(e,n=ai){let s=n;const r=Pe(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const a=[],o=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(c=>o(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(c)})}else s(null)}reloadResources(e,n,s){const r=pr();return typeof e=="function"&&(s=e,e=void 0),typeof n=="function"&&(s=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),s||(s=ai),this.services.backendConnector.reload(e,n,a=>{r.resolve(),s(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Vu.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const s=this.languages[n];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const s=pr();this.emit("languageChanging",e);const r=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,l)=>{l?this.isLanguageChangingTo===e&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,s.resolve((...u)=>this.t(...u)),n&&n(c,(...u)=>this.t(...u))},o=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const l=Pe(c)?c:c&&c[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Pe(c)?[c]:c);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),s}getFixedT(e,n,s){const r=(a,o,...c)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([a,o].concat(c)):l={...o},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||r.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=Os(l.keyPrefix,u));const d=this.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(a)?h=a.map(p=>(typeof p=="function"&&(p=Os(p,u)),`${l.keyPrefix}${d}${p}`)):(typeof a=="function"&&(a=Os(a,u)),h=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(h,l)};return Pe(e)?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=s,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(c,l)=>{const u=this.services.backendConnector.state[`${c}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const c=n.precheck(this,o);if(c!==void 0)return c}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!r||o(a,e)))}loadNamespaces(e,n){const s=pr();return this.options.ns?(Pe(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{s.resolve(),n&&n(r)}),s):(n&&n(),Promise.resolve())}loadLanguages(e,n){const s=pr();Pe(e)&&(e=[e]);const r=this.options.preload||[],a=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=r.concat(a),this.loadResources(o=>{s.resolve(),n&&n(o)}),s):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const a=r.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services?.languageUtils||new El(Ba());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const s=new wr(e,n);return s.createInstance=wr.createInstance,s}cloneInstance(e={},n=ai){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new wr(r);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},s){const c=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,h)=>(d[h]={...l[u][h]},d),l[u]),l),{});a.store=new Cl(c,r),a.services.resourceStore=a.store}if(e.interpolation){const l={...Ba().interpolation,...this.options.interpolation,...e.interpolation},u={...r,interpolation:l};a.services.interpolator=new Al(u)}return a.translator=new vi(a.services,r),a.translator.on("*",(c,...l)=>{a.emit(c,...l)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ke=wr.createInstance();Ke.createInstance;Ke.dir;Ke.init;Ke.loadResources;Ke.reloadResources;Ke.use;Ke.changeLanguage;Ke.getFixedT;Ke.t;Ke.exists;Ke.setDefaultNamespace;Ke.hasLoadedNamespace;Ke.loadNamespaces;Ke.loadLanguages;const{slice:Tp,forEach:Bp}=[];function Np(t){return Bp.call(Tp.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function Lp(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const Tl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Rp=function(t,e){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e);let a=`${t}=${r}`;if(s.maxAge>0){const o=s.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(s.domain){if(!Tl.test(s.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${s.domain}`}if(s.path){if(!Tl.test(s.path))throw new TypeError("option path is invalid");a+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(a+="; HttpOnly"),s.secure&&(a+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(a+="; Partitioned"),a},Bl={create(t,e,n,s){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),s&&(r.domain=s),document.cookie=Rp(t,e,r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let s=0;s<n.length;s++){let r=n[s];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var Op={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return Bl.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:s,cookieDomain:r,cookieOptions:a}=e;n&&typeof document<"u"&&Bl.create(n,t,s,r,a)}},Pp={name:"querystring",lookup(t){let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const a=s.substring(1).split("&");for(let o=0;o<a.length;o++){const c=a[o].indexOf("=");c>0&&a[o].substring(0,c)===e&&(n=a[o].substring(c+1))}}return n}},Ip={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,s;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const a=r.substring(1);if(e){const o=a.split("&");for(let c=0;c<o.length;c++){const l=o[c].indexOf("=");l>0&&o[c].substring(0,l)===e&&(s=o[c].substring(l+1))}}if(s)return s;if(!s&&n>-1){const o=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?o[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return s}};let xs=null;const Nl=()=>{if(xs!==null)return xs;try{if(xs=typeof window<"u"&&window.localStorage!==null,!xs)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{xs=!1}return xs};var Mp={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&Nl())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&Nl()&&window.localStorage.setItem(n,t)}};let vs=null;const Ll=()=>{if(vs!==null)return vs;try{if(vs=typeof window<"u"&&window.sessionStorage!==null,!vs)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{vs=!1}return vs};var _p={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Ll())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&Ll()&&window.sessionStorage.setItem(n,t)}},$p={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:s,language:r}=navigator;if(n)for(let a=0;a<n.length;a++)e.push(n[a]);s&&e.push(s),r&&e.push(r)}return e.length>0?e:void 0}},zp={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const s=e||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(n=s.getAttribute("lang")),n}},Up={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},Hp={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,s=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[n]}};let Ku=!1;try{document.cookie,Ku=!0}catch{}const Gu=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Ku||Gu.splice(1,1);const Vp=()=>({order:Gu,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class Yu{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Np(n,this.options||{},Vp()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(Op),this.addDetector(Pp),this.addDetector(Mp),this.addDetector(_p),this.addDetector($p),this.addDetector(zp),this.addDetector(Up),this.addDetector(Hp),this.addDetector(Ip)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(s=>{if(this.detectors[s]){let r=this.detectors[s].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.filter(s=>s!=null&&!Lp(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(e,this.options)}))}}Yu.type="languageDetector";const qp={cancel:"Cancel",create:"Create",add:"Add",remove:"Remove",delete:"Delete",close:"Close",user:"User",permission:"Permission",readOnly:"Read only",readWrite:"Read & write",settings:"Settings",comments:"Comments",files:"Files",outline:"Outline",version:"Version",loading:"Loading…",enabled:"Enabled",disabled:"Disabled",normal:"Active",admin:"Administrator",language:"Language",save:"Save",edit:"Edit",retry:"Retry",reload:"Reload page",languageEnglish:"English",languageChinese:"中文"},Wp={tagline:"A lightweight LaTeX writing environment",username:"Username",password:"Password",login:"Sign in",contact:"Need an account? Contact {{email}}",firstLogin:"Change your temporary password to continue",currentPassword:"Current password",newPassword:"New password",confirmPassword:"Confirm new password",updatePassword:"Update password",mismatch:"The new passwords do not match",passwordMinimum:"At least {{count}} characters",sessionExpired:"Your session has expired. Please sign in again.",logout:"Sign out"},Kp={title:"Projects",subtitle:"Create, edit and share LaTeX documents",restricted:"You can access projects shared with you. Project creation requires administrator permission.",new:"New project",newDescription:"The project will use the configured default LaTeX engine.",name:"Project name",emptyTitle:"Let’s build something great",emptyDescription:"Create a project or upload an existing LaTeX archive to get started.",emptyRestricted:"Projects shared with you will appear here.",noMatches:"No projects match the current search or tag filter.",upload:"Upload project",uploadDescription:"Upload a ZIP archive. A single top-level folder is removed automatically. Maximum file size: {{size}} MB.",zipFile:"ZIP archive",import:"Import project",importing:"Importing…",search:"Search projects…",grid:"Grid",list:"List",scope:"Project status",active:"Active",archived:"Archived",archive:"Archive",unarchive:"Restore",noArchived:"No archived projects.",allTags:"All tags",sortBy:"Sort",sortModified:"Last modified",sortCreated:"Created",pagination:"Project pages",pageOf:"Page {{page}} of {{totalPages}} · {{count}} projects",previousPage:"Previous",nextPage:"Next",owner:"Owner",created:"Created",modified:"Last modified",actions:"Actions",openProject:"Open {{project}}",projectActions:"Actions for {{project}}",relativeHoursPast:"{{hours}}h ago",relativeHoursMinutesPast:"{{hours}}h {{minutes}}m ago",relativeHoursFuture:"in {{hours}}h",relativeHoursMinutesFuture:"in {{hours}}h {{minutes}}m",relativeDaysPast:"{{days}}d ago",relativeDaysHoursPast:"{{days}}d {{hours}}h ago",relativeDaysFuture:"in {{days}}d",relativeDaysHoursFuture:"in {{days}}d {{hours}}h",comments:"Comments",unresolvedComments:"{{count}} unresolved comments",unresolvedCommentsTooltip:"{{unresolved}} unresolved / {{total}} total comments",allResolved:"All resolved ({{count}})",allCommentsResolvedTooltip:"All {{count}} comments resolved",noComments:"No comments",unresolvedCount:"{{count}} unresolved",modifiedBy:"Modified by",byUser:"By {{user}}",modifiedByUser:"{{time}} · By {{user}}",deletedUser:"Deleted user",filterTags:"Filter by tag",rename:"Rename",renameTitle:"Rename project",duplicate:"Duplicate",duplicating:"Duplicating…",duplicateTitle:"Duplicate project",duplicateDescription:"Create an independent copy of {{project}}. Files and project settings are copied; members, comments, Git history and compile output are not.",transfer:"Transfer",transferOwnership:"Transfer ownership",transferDescription:"Choose a new owner for {{project}}.",newOwner:"New owner",chooseNewOwner:"Choose a user",noTransferUsers:"No other active users",transferWarning:"You will keep read/write access. Source files, history, comments and members remain; the saved GitHub token is removed so the new owner can add their own credential.",transferForbidden:"Only the current project owner can transfer ownership.",transferTargetInvalid:"Choose a new project owner.",transferSelf:"You already own this project.",download:"Download",deleteTitle:"Delete project",deleteDescription:"Permanently delete {{project}} and all of its files? This cannot be undone.",chooseZip:"Choose a ZIP project",dropZip:"Drag and drop a ZIP archive here",browse:"Browse files",selectedFileSize:"Selected · {{size}}",clearFile:"Clear selected file"},Gp={title:"Choose project icon",description:"Choose a visual marker for {{project}}. This shared setting can be changed by the project owner.",change:"Change project icon",search:"Search icons…",save:"Save icon",useInitial:"Use project initial",noMatches:"No icons match “{{query}}”.",advancedName:"Advanced: Lucide icon slug",advancedNamePlaceholder:"For example: file-text",advancedNameDescription:"Enter an official Lucide short name such as file-text. Values copied from Iconify as lucide:file-text also work. This is separate from the curated search above.",advancedPreview:"Advanced icon preview",browse:"Browse Lucide icons",icons:{"file-text":{name:"Document",keywords:"document paper manuscript article text"},"book-open":{name:"Book",keywords:"book reading reference literature"},"notebook-pen":{name:"Notebook",keywords:"notebook notes writing draft"},"book-marked":{name:"Bookmarked",keywords:"book bookmark reading literature"},"scroll-text":{name:"Scroll",keywords:"scroll text manuscript archive"},library:{name:"Library",keywords:"library references literature collection"},"graduation-cap":{name:"Thesis",keywords:"thesis dissertation degree academic"},presentation:{name:"Presentation",keywords:"presentation slides talk report"},image:{name:"Image",keywords:"image figure visual photo"},"folder-kanban":{name:"Project",keywords:"project board tasks planning"},microscope:{name:"Research",keywords:"research microscope experiment science"},"flask-conical":{name:"Experiment",keywords:"experiment chemistry laboratory flask"},"test-tube-diagonal":{name:"Chemistry",keywords:"chemistry test laboratory experiment"},atom:{name:"Physics",keywords:"physics atom science"},dna:{name:"Biology",keywords:"biology genetics dna life"},telescope:{name:"Astronomy",keywords:"astronomy telescope space"},earth:{name:"Earth",keywords:"earth global geography world"},map:{name:"Map",keywords:"map geography location spatial"},languages:{name:"Languages",keywords:"languages translation multilingual"},university:{name:"University",keywords:"university education academic"},landmark:{name:"Economics",keywords:"economics finance policy institution"},scale:{name:"Law",keywords:"law justice policy balance"},"code-2":{name:"Code",keywords:"code programming software development"},"file-code-2":{name:"Source code",keywords:"source code program file software"},database:{name:"Database",keywords:"database data storage"},server:{name:"Server",keywords:"server system infrastructure"},network:{name:"Network",keywords:"network graph connection"},"circuit-board":{name:"Engineering",keywords:"engineering circuit hardware electronics"},brain:{name:"Thinking",keywords:"thinking cognition mind"},"brain-circuit":{name:"AI",keywords:"artificial intelligence ai machine learning"},bot:{name:"Automation",keywords:"bot robot automation"},"shield-check":{name:"Security",keywords:"security protection privacy"},"lock-keyhole":{name:"Encryption",keywords:"lock encryption privacy security"},workflow:{name:"Workflow",keywords:"workflow process pipeline"},blocks:{name:"Modules",keywords:"modules blocks components build"},sigma:{name:"Mathematics",keywords:"mathematics formula statistics sigma"},calculator:{name:"Calculation",keywords:"calculation arithmetic mathematics"},"function-square":{name:"Function",keywords:"function mathematics formula"},"chart-no-axes-combined":{name:"Analysis",keywords:"analysis chart data"},"line-chart":{name:"Trend",keywords:"trend line chart data"},"bar-chart-3":{name:"Bar chart",keywords:"bar chart statistics data"},"pie-chart":{name:"Pie chart",keywords:"pie chart distribution data"},"chart-scatter":{name:"Scatter plot",keywords:"scatter plot data analysis"},"chart-spline":{name:"Curve",keywords:"curve spline data analysis"},"file-spreadsheet":{name:"Spreadsheet",keywords:"spreadsheet table data workbook"},"file-chart-column-increasing":{name:"Report",keywords:"report chart data results"},lightbulb:{name:"Idea",keywords:"idea inspiration creative"},rocket:{name:"Innovation",keywords:"innovation launch progress"},target:{name:"Goal",keywords:"goal target focus"},sparkles:{name:"General",keywords:"general sparkle highlight"},"wand-sparkles":{name:"Tools",keywords:"tools magic optimize utility"},"file-pen-line":{name:"Manuscript",keywords:"manuscript draft writing paper document"},"file-stack":{name:"File collection",keywords:"files stack documents collection"},folder:{name:"Folder",keywords:"folder directory files"},"folder-open":{name:"Open folder",keywords:"folder directory files open"},"folder-archive":{name:"Archived files",keywords:"folder archive files storage"},archive:{name:"Archive",keywords:"archive storage history"},book:{name:"Closed book",keywords:"book reading literature reference"},bookmark:{name:"Bookmark",keywords:"bookmark reference reading"},newspaper:{name:"Paper",keywords:"paper newspaper publication article"},"notepad-text":{name:"Notes",keywords:"notes notepad writing ideas"},"sticky-note":{name:"Sticky note",keywords:"note reminder idea"},"pen-tool":{name:"Writing",keywords:"writing pen author edit"},quote:{name:"Quotation",keywords:"quote citation reference text"},"list-tree":{name:"Outline",keywords:"outline structure chapters list tree"},"file-search":{name:"Search documents",keywords:"search documents research files"},beaker:{name:"Beaker",keywords:"beaker chemistry laboratory science"},"test-tubes":{name:"Tests",keywords:"test tubes laboratory experiment science"},syringe:{name:"Medicine",keywords:"medicine health clinical syringe"},radiation:{name:"Nuclear science",keywords:"radiation nuclear physics science"},satellite:{name:"Satellite",keywords:"satellite space remote sensing"},"map-pinned":{name:"Location",keywords:"location map pin geography"},route:{name:"Route",keywords:"route path transport geography"},"folder-git-2":{name:"Git repository",keywords:"git repository version control source"},"git-branch":{name:"Branch",keywords:"git branch version control"},"git-commit-horizontal":{name:"Commit",keywords:"git commit version control"},terminal:{name:"Terminal",keywords:"terminal command shell developer"},braces:{name:"Syntax",keywords:"syntax code programming braces"},regex:{name:"Regular expression",keywords:"regex regular expression search code"},binary:{name:"Binary",keywords:"binary bits data computing"},cpu:{name:"Computing",keywords:"cpu processor computing hardware"},"hard-drive":{name:"Storage",keywords:"storage disk drive data"},cloud:{name:"Cloud",keywords:"cloud infrastructure storage network"},wifi:{name:"Wireless",keywords:"wifi wireless network connection"},radar:{name:"Sensing",keywords:"radar sensing signal research"},"key-round":{name:"Access key",keywords:"key access authentication security"},fingerprint:{name:"Identity",keywords:"identity fingerprint authentication security"},shield:{name:"Protection",keywords:"protection security privacy shield"},bug:{name:"Debugging",keywords:"bug debugging software issue"},wrench:{name:"Maintenance",keywords:"maintenance tools repair engineering"},"chart-column":{name:"Column chart",keywords:"column chart data statistics"},"chart-candlestick":{name:"Candlestick chart",keywords:"candlestick chart finance data"},gauge:{name:"Metric",keywords:"metric gauge measurement performance"},activity:{name:"Activity",keywords:"activity signal monitoring health"},"table-2":{name:"Data table",keywords:"table data rows columns"},waypoints:{name:"Pipeline",keywords:"pipeline workflow waypoints process"},boxes:{name:"Components",keywords:"components boxes modules system"},package:{name:"Package",keywords:"package dependency software module"},"users-round":{name:"Team",keywords:"team users collaboration group"},"calendar-days":{name:"Schedule",keywords:"schedule calendar deadline planning"}}},Yp={manage:"User management",back:"Back to projects",onlyAdmin:"Only administrators can create users",add:"Add user",role:"Role",createProjects:"Create projects",ownedProjects:"Owned projects",status:"Status",actions:"Actions",adminRequired:"Administrator permission is required.",allow:"Allow",deny:"Deny",enable:"Enable",disable:"Disable",promote:"Make administrator",demote:"Make user",allowCreate:"Allow creation",denyCreate:"Deny creation",resetPassword:"Reset password",initialPassword:"Login password",displayName:"Display name",addDescription:"Set a login password or generate a secure random one.",createUser:"Create user",randomPassword:"Random password",generatePassword:"Generate a random password",resetDescription:"Set a temporary password for {{username}}. Existing sessions will be signed out.",reset:"Reset",deleteTitle:"Delete user",deleteDescription:"Delete {{username}}? This cannot be undone.",ownedChoice:"{{count}} owned projects",transferProjects:"Transfer them to the current administrator",deleteProjects:"Permanently delete projects and files"},Xp=JSON.parse(`{"saved":"Saved","savedAt":"Saved to server at {{time}}","loading":"Loading","pending":"Waiting to save","saving":"Saving to server","saveFailed":"Save failed","offlineDraft":"Offline · local draft retained","harperRecoveryTitle":"Harper is unavailable.","harperFallbackHint":" The browser's built-in spellchecker is being used instead.","texFmtRecoveryTitle":"tex-fmt could not load.","texFmtOptionsRecoveryTitle":"tex-fmt rejected the source or options.","texFmtRuntimeRecoveryTitle":"tex-fmt returned an unexpected result.","clientToolRecoveryHint":" Retry now, or reload the page to use the latest browser assets.","resetFormatterOptions":"Clear options and retry","texFmtDiagnosticsTitle":"tex-fmt produced diagnostics.","texFmtDiagnosticsHint":" The formatted text was applied; review the details below.","viewFormatterDiagnostics":"View diagnostics","dismissFormatterDiagnostics":"Dismiss formatter diagnostics","formattingBy":"{{name}} is formatting this file. Please wait…","compile":"Compile · {{engine}}","compiling":"Compiling…","compileQueued":"Compile queued…","compileFailedRetained":"Compilation failed; showing the last successful PDF from {{time}}.","compileFailedNoPdf":"Compilation failed and no successful PDF is available.","upToDate":"Files are up to date; no compilation was needed.","compileSnapshotStale":"PDF compiled from a consistent earlier snapshot; newer source changes are not included.","addComment":"Add comment","sourceComments":"Source comments","projectSettings":"Project settings","uploadAttachment":"Upload attachment","newFile":"New text file","binary":"The binary attachment is stored but cannot be opened in the text editor.","noOutline":"No sections in this file","wordCountTitle":"Word count","wordCountFull":"Full","wordCountSelection":"Selected","wordCountFullHint":"Count the current main document and included TeX files","wordCountSelectionHint":"Count the selected LaTeX source","wordCountLoading":"Running TeXcount…","wordCountTotal":"Total words","wordCountCharacters":"Characters","wordCountCharactersHint":"Excludes spaces and punctuation","wordCountText":"Body text","wordCountHeaders":"Headings","wordCountCaptions":"Captions","wordCountFloats":"Figures / tables","wordCountInlineMath":"Inline math","wordCountDisplayMath":"Displayed math","wordCountFiles":"Included files","wordCountWordsUnit":"words","wordCountItemsUnit":"items","wordCountExpressionsUnit":"expressions","wordCountParserErrors":"TeXcount reported {{count}} parsing issues.","wordCountSelectionEmpty":"Select LaTeX source before counting.","wordCountSaveRequired":"The latest editor changes could not be saved, so the count was cancelled.","wordCountFailed":"TeXcount could not count this source.","wordCountSourceInvalid":"Select LaTeX source text to count.","wordCountSourceTooLarge":"The selected source is too large to count.","wordCountUnavailable":"TeXcount is not available on this server. Install it from TeX Live and try again.","wordCountHelp":"About TeXcount","wordCountTemplateNote":"Custom %TC:newtemplate or %TC:template directives can override TexLite's report format and prevent a result.","preview":"PDF preview","previewHint":"Compile to generate the document","loadingPdf":"Loading PDF…","pdfCompiledAt":"Compiled successfully at {{time}}","pdfCompiledAtFor":"{{file}} compiled successfully at {{time}}","currentMainDocument":"Current document compiled as the root: {{path}}","mainDocumentCandidate":"LaTeX root document candidate: {{path}}","currentMainShort":"root","deletedUser":"Deleted User","orphaned":"Anchor lost","line":"Line {{line}}","reopen":"Reopen","resolve":"Mark resolved","noComments":"No comments in this file","newFileDescription":"Directories are allowed, for example chapters/introduction.tex.","filePath":"File path","commentDescription":"Selected {{count}} characters","pointComment":"No text selected; the comment will be anchored at the cursor.","commentContent":"Comment","backToProjects":"Back to projects","outputTabs":"Compile output","log":"Log","warnings":"Warnings","errors":"Errors","artifacts":"Artifacts","clean":"Recovery","noLog":"Compile to see the log.","noWarnings":"No warnings in the latest compile.","noErrors":"No errors in the latest compile.","projectRoot":"Project root","uploadTo":"Upload to {{folder}}","dropFiles":"Drop files to upload","newFolder":"New folder","folderName":"Folder name","noArtifacts":"Compile to see generated artifacts.","selectArtifact":"Select a text artifact to preview it.","viewArtifact":"View artifact","downloadArtifact":"Download artifact","downloadToView":"Download this artifact to view it","cleanTitle":"Compilation recovery","cleanDescription":"Use these advanced actions only when compilation is stuck, a previous error is left behind, or generated output is inconsistent. They do not change source files, project settings, comments, history, or Git data.","cleanCache":"Force a clean rebuild","cleanCacheDescription":"Use after a compilation failure or stale latexmk state. Removes the incremental cache while keeping the current successful PDF.","cleanArtifacts":"Remove generated output","cleanArtifactsDescription":"Use when generated files are inconsistent. Removes the PDF, SyncTeX, logs, and intermediate files for this root document.","cleanCacheConfirmTitle":"Force a clean rebuild?","cleanCacheConfirmDescription":"This recovery action removes the incremental latexmk cache. The current PDF remains visible, and the next compilation starts from a clean cache.","cleanArtifactsConfirmTitle":"Remove generated output?","cleanArtifactsConfirmDescription":"This recovery action removes the current PDF and all generated files for this root document. Source files are not affected.","cleanConfirm":"Run recovery","cleanCacheComplete":"Recovery cache cleared. The next compilation will be a full rebuild.","cleanArtifactsComplete":"Generated compilation output removed.","cleanBusy":"This root document is compiling. Try recovery again after it finishes.","folderDestination":"The folder will be created in {{folder}}.","uploadOverwriteTitle":"File already exists","uploadOverwriteDescription":"These files already exist: {{files}}. Replace them?","uploadOverwrite":"Replace files","collapseFiles":"Collapse file panel","showFileSizes":"Show file sizes","hideFileSizes":"Hide file sizes","move":"Move","moveTitle":"Move or rename {{name}}","moveDescription":"Choose a destination folder and name. Files, comments and project paths stay linked.","pathName":"Name","moveApply":"Move / rename","deletePath":"Delete file or folder","deletePathTitle":"Delete {{name}}","deletePathDescription":"Delete {{path}}? This cannot be undone.","deletePathActiveDescription":"Delete {{path}}? It is currently open for {{users}} and will close in those sessions.","deletePathWillClose":"Any late edits to this path will be rejected to prevent silent data loss.","fileDeletedByCollaborator":"{{path}} was deleted in another session. A safe fallback file has been opened.","destinationFolder":"Destination folder","compileShortcut":"Save and compile (Ctrl+S / Cmd+S)","compilingBy":"{{name}} is compiling","format":"Format","formatFile":"File","formatFileHint":"Format the current file","formatFileComplete":"Current file formatted.","formatFileFailed":"Unable to format the current file: {{message}}","formatSelected":"Selected","commentsAdd":"Add","commentsAll":"View","formatSelection":"Format selection","formatting":"Formatting…","formatSelectionHint":"Select LaTeX source to format","formatSelectionRequired":"Select LaTeX source before formatting.","formatSelectionComplete":"Selected LaTeX source formatted.","formatFailedContinue":"Formatting failed; compilation will continue: {{message}}","formatFailed":"Unable to format the selection: {{message}}","formatSourceChanged":"The source changed during formatting, so formatting was skipped.","formatSelectionChanged":"The selected source changed during formatting. Select it again and retry.","writingSuggestions":"Writing suggestions","noWritingSuggestions":"No suggestions available","removeText":"Remove text","replaceWith":"Replace with {{word}}","spellCheckReadOnly":"Read-only: choose a suggestion in an editor with write permission.","spellCheckSourceChanged":"The source changed before the writing correction could be applied.","mathPreview":"Math preview","mathPreviewLoading":"Rendering math…","mathPreviewUnavailable":"This formula cannot be previewed.","vimOn":"Vim ON","vimOnHint":"Vim keybindings are enabled for this editor.","reply":"Reply","replyPlaceholder":"Write a reply…","sendReply":"Send reply","editComment":"Edit comment","deleteComment":"Delete comment","saveChanges":"Save changes","deleteCommentTitle":"Delete comment","deleteCommentDescription":"Delete this comment and its {{count}} replies? This cannot be undone.","editReply":"Edit reply","deleteReply":"Delete reply","deleteReplyTitle":"Delete reply","deleteReplyDescription":"Delete this reply? This cannot be undone.","editedAt":"Edited {{time}}","outlineJump":"Go to source line {{line}} and locate it in the PDF","lineNumber":"line {{line}}","showInSource":"Show the visible PDF location in source","showInPdf":"Show the source cursor location in PDF","syncTexOnlyForTex":"PDF sync is only available for TeX (.tex) files","syncTexOnlyForMain":"PDF sync is only available for the current main TeX document","openFiles":"Open files","pdfLoadFailed":"The PDF preview could not be loaded","pdfZoomControls":"PDF zoom controls","downloadPdf":"Download PDF","downloadResource":"Download file","resourceTooLarge":"This file is {{size}} and exceeds the direct preview limit of {{limit}}.","resourceTooLargeTitle":"File is too large to preview","resourceTooLargeDescription":"Download the file to open it locally.","resourceUnsupportedTitle":"Preview unavailable","resourceUnsupportedDescription":"This file type cannot be rendered in the browser. Download it to open it locally.","resourcePreview":{"image":"Image preview","pdf":"PDF preview","text":"Text preview","unsupported":"File preview"},"pdfZoomOut":"Zoom out","pdfZoomIn":"Zoom in","pdfFitWidth":"Fit width","pdfLink":"PDF link","pdfLinks":"PDF links","layout":{"label":"Layout","choose":"Choose layout","current":"Current layout: {{layout}}","editor-pdf":{"name":"Editor & PDF","description":"Show the source editor and PDF preview side by side"},"editor-only":{"name":"Editor only","description":"Use the workspace for source editing"},"pdf-only":{"name":"PDF only","description":"Use the workspace for the PDF and compile output"}},"collaboration":{"connecting":"Connecting collaboration…","connected":"Live collaboration connected","disconnected":"Collaboration disconnected","editing":"Editing","viewing":"Viewing","joining":"Joining project","reconnect":"Reconnect","permissionDowngradeTitle":"Edit permission changed","permissionDowngradeDescription":"Your access changed from {{previous}} to read-only. Any unsaved local draft is still retained in this tab and cannot be saved. Keep it visible, or discard it and reload the latest server version.","permissionDowngradeKeep":"Keep local draft","permissionDowngradeDiscard":"Discard draft and reload","permissionDowngradeReload":"Reload server version","permissionDowngradeNoDraft":"Your access changed to read-only. Reload to use the latest server version, or continue viewing this tab.","permissionDowngradeOtherTab":"Your access changed to read-only. Another browser tab still has an unsaved draft; return to that tab to handle it. This page cannot clear the shared local draft safely.","permissionDowngradeMultipleDrafts":"Your access changed to read-only. This tab and another browser tab both have unsaved drafts. Handle the other tab first; this page will not clear shared local data.","permissionDowngradeOtherTabBlocked":"Another browser tab just created an unsaved draft, so cleanup was cancelled to protect it.","activeSessions":"{{count}} active sessions","showMoreSessions":"Show {{count}} more sessions","showFewerSessions":"Collapse session list","sessionTooltip":"{{name}} (@{{username}}) · {{file}} · {{activity}} · {{permission}}"},"search":{"button":"Find","title":"Find and replace (Ctrl+F / Cmd+F)","find":"Find","replace":"Replace","next":"Next","previous":"Previous","all":"Select all","matchCase":"Match case","regexp":"Regular expression","wholeWord":"Whole word","replaceNext":"Replace","replaceAll":"Replace all","currentMatch":"Current match","onLine":"on line","replacedMatchOnLine":"replaced match on line $","replacedMatches":"replaced $ matches","goToLine":"Go to line","go":"Go","matchCount":"{{count}} matches","noMatches":"No matches","invalidQuery":"Invalid regular expression"}}`),Jp={title:"Citation library",description:"Save references from {{file}} and import them into this BibTeX file. Your library and its tags are private to your account.",myLibrary:"My library",currentFile:"Current file",searchPlaceholder:"Search citations…",searchHint:"Search key, title, author, or year",emptyTitle:"Your library is empty",emptyDescription:"Open the current-file tab to save a BibTeX entry.",noEntries:"No BibTeX entries found",noEntriesDescription:"Add a valid @article, @inproceedings, or similar entry to this file.",currentFileTitle:"Entries from the current file",currentFileDescription:"Select an entry to save it to your citation library.",backToLibrary:"Back to library",save:"Save",update:"Update",saving:"Saving…",saved:"Citation saved to your library.",updated:"Citation updated.",deleted:"Citation deleted.",deleteTitle:"Delete citation",deleteDescription:"Delete the citation {{key}} from your private library? This cannot be undone.",fileTooLarge:"This BibTeX file exceeds the {{size}} limit.",fileTooLargeHint:"The file is too large to parse in the browser. Save individual entries from a smaller file or split it first.",fileInvalid:"The current BibTeX file contains syntax errors.",fileInvalidHint:"Fix the current file before formatting it or importing another citation.",savedLabel:"Saved",import:"Import",importToFile:"Import into the current BibTeX file",importRequiresWrite:"Import requires write permission for this project.",imported:"Imported {{key}} into the current file.",untitled:"Untitled citation",authorUnknown:"Author not specified",allTags:"All tags",noTags:"No tags yet",noTagMatches:"No citations match this tag.",newTagPlaceholder:"New tag name",tagColor:"Tag color",createTag:"Create tag",tagCreated:"Tag created.",tags:"Tags",tagsTitle:"Tags for {{key}}",noTagsToAssign:"Create a tag first.",saveTags:"Save tags",tagsUpdated:"Tags updated.",editTitle:"Edit {{key}}"},Zp={invalid:"Enter one valid BibTeX entry.",tooLarge:"This BibTeX entry is too large.",notFound:"The citation does not exist.",keyExists:"That citation key already exists. Review the existing entry before replacing it.",tagNotFound:"The citation tag does not exist.",conflict:"This citation changed elsewhere. Refresh the library and try again.",alreadyInFile:"{{key}} is already present in this BibTeX file."},Qp="Manage your private BibTeX references and tags from the homepage. Open a .bib file to save or import entries.",e0={addEntry:"Add entry",addEntryTitle:"Add a BibTeX entry",addEntryDescription:"Paste one complete BibTeX entry. It will be validated before it is saved.",addEntryPlaceholder:`@article{key,
|
|
3
|
-
author = {Author},
|
|
4
|
-
title = {Title},
|
|
5
|
-
year = {2026}
|
|
6
|
-
}`,added:"Citation added to your library."},t0={pageOf:"Page {{page}} of {{totalPages}} · {{count}} entries",previous:"Previous",next:"Next"},n0={quickOpen:"Quick open",quickOpenDescription:"Open a project file by name (Ctrl/Cmd+P).",filePlaceholder:"Type a file name…",noFiles:"No matching files.",projectSearch:"Project search",projectSearchDescription:"Search and replace across project source files (Ctrl/Cmd+Shift+F).",searchPlaceholder:"Search all source files…",replacePlaceholder:"Replace with…",matchSummary:"{{count}} matches",truncated:"Showing the first {{count}} matches.",replaceAll:"Replace all {{count}}",replaceConfirmTitle:"Replace across the project",replaceConfirmDescription:"Replace all {{count}} matches? Automatic history records every changed file first.",replaced:"Replaced {{count}} matches in {{files}} files."},s0={title:"History",description:"Browse automatic project versions, compare files and safely restore earlier work.",empty:"No history versions yet.",changedCount:"{{count}} changed files",fileCount:"{{count}} files",changed:"changed",labelPlaceholder:"Name this version",saveLabel:"Save label",compareCurrent:"Compare with current",comparingCurrent:"Earlier version compared with the current file",chooseFile:"Choose a file, then compare it with the current source.",restore:"Restore",restoreFile:"Restore file",restoreProject:"Restore project",restoreFileTitle:"Restore this file",restoreProjectTitle:"Restore this project version",restoreFileDescription:"Restore {{path}} from this version? The current project is checkpointed first.",restoreProjectDescription:"Restore all source files and compiler settings from this version? The current project is checkpointed first.",storage:"History storage",storageUsage:"{{used}} of {{limit}}",versionUsage:"{{count}} of {{limit}} ordinary versions",protectedVersions:"{{count}} labeled",storageExceeded:"Protected or current data exceeds the soft storage limit.",deleteVersion:"Delete version",deleteVersionTitle:"Delete this history version",deleteVersionDescription:"Permanently delete {{name}}? Current project files are not changed.",clearAll:"Clear history",clearAllTitle:"Clear all project history",clearAllDescription:"Permanently delete every history version and its unreferenced stored data? Current project files are not changed.",reasons:{initial:"Project created",autosave:"Automatic save",file:"File operation",settings:"Compiler settings",git:"Git operation",restore:"Restored version",checkpoint:"Safety checkpoint"}},r0={mainFile:"Main document",invalidMainFileOption:"{{path}} (not a root document)",engine:"Compiler",latexmkrc:"Project latexmkrc",save:"Save project settings",members:"Shared members",recentLog:"Latest compile log",share:"Share",shareDescription:"Projects can only be shared with users created by an administrator.",chooseUser:"Choose a user",latexmkrcPlaceholder:`# Empty disables the project rc file
|
|
7
|
-
$pdf_mode = 1;`,addMember:"Add member",noMembers:"This project has not been shared with anyone.",removeTitle:"Remove shared member",removeDescription:"Remove {{username}}? Their account and other projects are unaffected.",editorTab:"Editor appearance",compilerTab:"LaTeX compiler",compilerDescription:"Choose the main document and compiler options shared by everyone in this project.",editorAppearance:"Editor appearance",editorAppearanceDescription:"These preferences are private to this user and project on this browser. The project dictionary is shared.",browserTools:"Formatting tools",toolStatus:{loading:"Loading",working:"Working",error:"Error"},reloadTool:"Reload",saveAppearance:"Save appearance",saveCompiler:"Save compiler settings",writingCheckDescription:"TexLite uses the optional host-installed Harper CLI. If it is unavailable, the browser spellchecker takes over. Spelling issues use a red wavy underline; grammar issues use yellow. Right-click an issue for suggestions.",projectConfiguration:"Project configuration",fontFamily:"English font",fontSize:"Font size",lineHeight:"Line spacing",dictionary:"Project dictionary",dictionaryDescription:"Words added here are ignored after Harper returns this project's spelling diagnostics. Editors can maintain this list.",dictionaryPlaceholder:"Add a custom word",addWord:"Add word",dictionaryEmpty:"No custom words yet.",lineWrapping:"Wrap long lines",mathPreviewOnHover:"Preview math on hover",mathPreviewOnHoverDescription:"Render common LaTeX formulas when you hover over them in the editor.",spellCheck:"Spelling and grammar checking",vimMode:"Vim keybindings",vimModeDescription:"Use Vim normal/insert/visual modes in this editor.",vimHelp:"View help",formatOnCompile:"Format LaTeX before compiling",formatOnCompileDescription:"Off by default. Formatting runs before compilation.",formatRequiresWrite:"Formatting requires permission to edit this project.",formatterDescription:"Tex, cls, and sty files use the bundled browser-side tex-fmt WASM formatter; BibTeX files use browser-side bibtex-tidy.",formatterInstall:"View tex-fmt",bibtexTidyInstall:"View bibtex-tidy",texFmtOptions:"tex-fmt options (TOML)",texFmtOptionsPlaceholder:`wrap = true
|
|
8
|
-
wraplen = 80`,texFmtOptionsDescription:"These options are stored only in this browser and isolated by the current user and project. They are passed directly to tex-fmt.",openFilesInTabs:"Open LaTeX files in editor tabs",openFilesInTabsDescription:"Open .tex, .bib, .sty and other source files in tabs at the top of the editor.",writingIssues:"{{count}} writing issues ({{uniqueCount}} unique)",noWritingIssues:"No spelling or grammar issues found.",spellCheckFirst:"First writing issue",spellCheckPrevious:"Previous writing issue",spellCheckNext:"Next writing issue",spellCheckLast:"Last writing issue",spellCheckPosition:"{{current}}/{{total}}",fontJetBrains:"JetBrains Mono",fontSourceCode:"Source Code Pro",fontIbmPlex:"IBM Plex Mono",fontFiraCode:"Fira Code",fontIosevka:"Iosevka",lineHeightCompact:"Compact",lineHeightNormal:"Normal",lineHeightRelaxed:"Relaxed"},i0={title:"Git backup",description:"Manage the local Git history and its GitHub backup. Only the project owner can use these actions.",ownerOnly:"Only the project owner can use Git backup.",authentication:"GitHub authentication",authenticationHint:"Use a token with repository Administration and Contents write access. It is encrypted at rest and never written to the repository or remote URL.",recommendedAccessTitle:"Recommended repository access: All repositories",recommendedAccess:"texLite is intended for trusted users. Select All repositories so this token can create a repository and access repositories created later. Grant Administration and Contents read and write permissions.",token:"Personal access token",tokenPlaceholder:"Paste your GitHub token",replaceToken:"Replace personal access token",saveToken:"Save and verify token",createToken:"Create a fine-grained token",connectedAs:"Connected as @{{login}}",removeToken:"Remove token",tokenSaved:"GitHub token saved; the local repository is ready.",tokenRemoved:"GitHub token removed.",repository:"Repository",localReady:"The project source is managed by a local Git repository.",localPending:"Saving a valid token initializes the local Git repository.",repositoryName:"GitHub repository name",privateRepository:"Create as a private repository",createRepository:"Create GitHub repository",repositoryCreated:"GitHub repository created.",origin:"origin",openGitHub:"Open GitHub",clean:"Working tree clean",changedFiles:"{{count}} changed files",commitAndPush:"Commit and push",identity:"Commits use {{username}} <{{username}}@texlite.com> for this command only.",detachedHead:"Detached HEAD: return to the default branch before committing or pushing.",detachedAt:"detached at {{revision}}",commitMessage:"Commit message",commitPlaceholder:"Describe this backup…",commit:"Commit",committed:"Changes committed.",noChangesToCommit:"There are no new changes to commit.",push:"Push",pushed:"Push succeeded. The backup is up to date on GitHub.",pushFailed:"Push failed",workingDiff:"Working diff",refresh:"Refresh",diffTitle:"Diff",diffTruncated:"output truncated",diffFontSize:"Diff font size",diffFontDecrease:"Decrease diff font size",diffFontIncrease:"Increase diff font size",fullscreenDiff:"View diff full screen",exitFullscreenDiff:"Exit full screen",noChanges:"No differences to display.",history:"History",historyHint:"Up to 100 recent commits",noCommits:"No commits yet.",viewCommitDiff:"View this commit's diff",checkoutVersion:"Checkout this version",checkoutTitle:"Checkout version",checkout:"Checkout",checkoutDescription:"Checkout {{revision}} — {{message}}. By default Git preserves compatible uncommitted changes and refuses conflicts.",forceCheckout:"Force overwrite",forceCheckoutDescription:"Explicitly discard tracked and untracked working changes before checkout. This cannot be undone.",returnToBranch:"Return to {{branch}}",returnTitle:"Return to default branch",returnDescription:"Checkout {{branch}}. By default Git preserves compatible uncommitted changes and refuses conflicts.",discardChanges:"Discard changes",noChangesToDiscard:"There are no changes to discard.",discardTitle:"Discard uncommitted changes",discardDescription:"Restore all tracked files to the current HEAD commit. Untracked files are unaffected.",discardConfirm:"Discard changes"},a0={title:"System status",description:"Live server health and recent operation latency. Values refresh every five seconds.",refresh:"Refresh",uptime:"Uptime",memory:"Memory",heap:"heap",compileQueue:"Compile jobs",pending:"{{count}} pending",collaboration:"Collaboration",sessions:"{{count}} sessions",roomsAndDirty:"{{rooms}} rooms · {{dirty}} dirty files",eventLoop:"Event-loop latency",latencySummary:"P50 {{p50Ms}} ms · P95 {{p95Ms}} ms · max {{maxMs}} ms",operationDurations:"Recent operation durations",noSamples:"No operation samples have been collected yet.",operation:"Operation",samples:"Samples",last:"Last",max:"Max",operations:{collaboration:{connect:"Open collaboration room",persist:"Save collaboration changes"},workspace:{project:"Load project metadata",files:"Load project files",compileState:"Load retained PDF state"},compile:{snapshot:"Prepare compile snapshot",request:"Compile request total",cacheSync:"Update compiler cache",latexmk:"Run latexmk",artifactCopy:"Publish compile artifacts"},outline:{build:"Build project outline"},search:{project:"Search project"},completions:{build:"Build completion index"}}},o0={title:"Tags",add:"Add tag",create:"Create tag",createDescription:"Create a private reusable colored tag for organizing your projects.",manage:"Manage tags",manageDescription:"Create and organize private labels for your projects. Deleting a tag only removes its project associations.",createInManager:"Create tag",edit:"Edit",rename:"Rename",deleteTitle:"Delete tag",deleteDescription_one:"Delete {{tag}}? It will be removed from {{count}} project.",deleteDescription_other:"Delete {{tag}}? It will be removed from {{count}} projects.",projectCount_one:"{{count}} project",projectCount_other:"{{count}} projects",noTags:"No tags yet. Create one to organize your projects.",none:"No tags yet",assign:"Tags",assignTitle:"Tags for {{project}}",assignDescription:"Select your private tags for this project. Other users have their own tags.",empty:"Create a tag first.",allAssigned:"All available tags are already assigned.",name:"Tag name",color:"Color",filter:"Filter",red:"Red",orange:"Orange",yellow:"Yellow",green:"Green",blue:"Blue",purple:"Purple",gray:"Gray"},c0={generic:"Operation failed",request:"Request failed ({{status}})",upload:"Upload failed",boundaryTitle:"Something went wrong",boundaryDescription:"An unexpected error occurred while rendering the page. You can try recovering, or reload the page.",boundaryRetry:"Retry",boundaryReload:"Reload page",fileExists:"A file or folder with this name already exists.",pathConflict:"The destination path is already used by a folder or file.",duplicateUploadNames:"The selected files contain duplicate names: {{files}}.",fileTooLarge:"The file exceeds the {{size}} MB limit.",zipOnly:"Please choose a ZIP archive.",collaborationUnavailable:"Live collaboration is not connected. Reconnect before saving or compiling.",codes:{AUTH_INVALID:"The username or password is incorrect.",CURRENT_PASSWORD_INVALID:"The current password is incorrect.",USER_NOT_FOUND:"The user no longer exists.",LAST_ADMIN:"At least one administrator must remain active.",SELF_DELETE_FORBIDDEN:"You cannot delete the currently signed-in administrator.",PROJECT_CREATE_FORBIDDEN:"You do not have permission to create projects.",PROJECT_NOT_FOUND:"The project does not exist or is no longer accessible.",PROJECT_OWNER_ONLY:"Only the project owner can change this setting.",PROJECT_EDIT_FORBIDDEN:"You do not have edit permission for this project.",DICTIONARY_EDIT_FORBIDDEN:"You do not have permission to maintain this project's dictionary.",TAG_NOT_FOUND:"The selected tag does not exist.",GIT_TOKEN_INVALID:"Enter a GitHub token.",GIT_REPOSITORY_NAME_INVALID:"Enter a GitHub repository name.",GIT_REVISION_INVALID:"Choose a Git revision to check out.",PROJECT_DELETE_FORBIDDEN:"Only the project owner can delete this project.",MEMBERS_MANAGE_FORBIDDEN:"Only the project owner can manage project members.",OWNER_MEMBER_FORBIDDEN:"The project owner cannot be added as a member.",INVALID_PATH:"The file path is invalid.",RESERVED_PATH:"This path is reserved by TexLite.",PATH_EXISTS:"The destination path is already used by a file or folder.",FILE_EXISTS:"A file with this name already exists.",PATH_NOT_FOUND:"The file or folder does not exist.",FILE_NOT_FOUND:"The file does not exist.",DIRECTORY_NOT_FOUND:"The destination folder does not exist.",MOVE_INTO_SELF:"A folder cannot be moved into itself.",MAIN_FILE_DELETE_FORBIDDEN:"The main document cannot be deleted.",FILE_TOO_LARGE:"This file is too large to open or upload.",UPLOAD_EMPTY:"No file was selected for upload.",COMMENT_FILE_NOT_FOUND:"The file for this comment does not exist.",COMMENT_RANGE_INVALID:"The comment source range is invalid.",COMMENT_NOT_FOUND:"The comment does not exist.",COMMENT_EDIT_FORBIDDEN:"You can only edit your own comments.",COMMENT_DELETE_FORBIDDEN:"You can only delete your own comments.",REPLY_NOT_FOUND:"The reply does not exist.",REPLY_EDIT_FORBIDDEN:"You can only edit your own replies.",REPLY_DELETE_FORBIDDEN:"You can only delete your own replies.",COMMENT_UPDATE_EMPTY:"There is no comment content to update.",MAIN_FILE_NOT_FOUND:"The selected main document does not exist.",LATEXMKRC_DISABLED:"Project latexmkrc files are disabled by the administrator.",LATEXMKRC_NOT_FOUND:"The selected latexmkrc file does not exist.",COMPILE_ARTIFACTS_NOT_FOUND:"No compiled artifacts are available yet.",COMPILE_ARTIFACT_NOT_FOUND:"The compiled artifact does not exist.",ARTIFACT_PREVIEW_UNSUPPORTED:"This artifact cannot be previewed as text; download it instead.",SYNC_SOURCE_INVALID:"The source location is invalid.",SOURCE_FILE_NOT_FOUND:"The source file does not exist.",SYNCTEX_NOT_AVAILABLE:"No SyncTeX data is available. Compile the project again.",SYNC_PDF_INVALID:"The PDF location is invalid.",SYNCTEX_EXTERNAL_PATH:"SyncTeX returned a source path outside the project.",COMPILE_FORBIDDEN:"You do not have permission to compile this project.",PDF_NOT_FOUND:"No PDF has been generated yet.",API_NOT_FOUND:"The API endpoint does not exist.",SERVER_ERROR:"The server could not complete the request.",REQUEST_INVALID:"The request is invalid."}},l0={historyVersionNotFound:"The selected history version no longer exists.",historyFileNotFound:"This file does not exist in the selected history version.",historyTargetConflict:"The current restore target is a directory or another non-file path.",historyPreviewUnsupported:"This historical file cannot be compared as text.",searchInvalid:"Enter valid text to search for.",gitUnavailable:"Git integration is unavailable. Install Git on the host or correct git.binary in the configuration, then try again.",formatFailed:"tex-fmt could not format this source.",mainDocumentInvalid:"The selected file is not a valid LaTeX root document.",compileSnapshotBusy:"The source has not finished saving durably. Wait a moment and try compiling again."},u0={requestFailed:"Network request failed. Check your connection and retry.",invalidResponse:"The server returned an invalid response. Please retry."},d0={protocolUpgrade:"This workspace needs an update. Your local draft is retained; refresh when you are ready to reconnect."},h0={disableTitle:"Disable user",disableDescription:"Disable @{{username}}? Their active sessions will end and they will no longer be able to sign in.",disableConfirm:"Disable user",demoteTitle:"Remove administrator access",demoteDescription:"Make @{{username}} a regular user? They will no longer be able to manage users.",demoteConfirm:"Make user",denyProjectCreationTitle:"Remove project creation",denyProjectCreationDescription:"Remove @{{username}}’s permission to create new projects? Their existing project access is unchanged.",denyProjectCreationConfirm:"Remove permission"},f0={cancel:"Cancel compile",cancelling:"Cancelling…",cancelled:"Compilation cancelled."},m0={copyright:"© {{year}}"},p0={section:"Section",subsection:"Subsection",bold:"Bold",emphasis:"Emphasis",citation:"Citation",reference:"Cross-reference",label:"Label",image:"Image",unordered:"Unordered list",ordered:"Ordered list",equation:"Equation",figure:"Figure",projectCommand:"Project command",projectCommandArgs:"Project command ({{count}} arguments)",projectMacro:"Project macro",expl3Command:"Expl3 project command",mathOperator:"Project math operator",mathDelimiter:"Project math delimiter",projectEnvironment:"Project environment",projectFile:"Project file",package:"Package",documentClass:"Document class",currentFile:"Current file",project:"Project",latex:"LaTeX",standard:"LaTeX command"},g0={common:qp,auth:Wp,projects:Kp,projectIcons:Gp,users:Yp,editor:Xp,citationLibrary:Jp,citationErrors:Zp,citationLibraryHomeDescription:Qp,citationLibraryActions:e0,citationLibraryPagination:t0,navigation:n0,history:s0,projectSettings:r0,git:i0,metrics:a0,tags:o0,errors:c0,apiErrors:l0,network:u0,workspaceUpdates:d0,userConfirmations:h0,compileControls:f0,footer:m0,completions:p0},D0={cancel:"取消",create:"创建",add:"添加",remove:"移除",delete:"删除",close:"关闭",user:"用户",permission:"权限",readOnly:"只读",readWrite:"读写",settings:"设置",comments:"批注",files:"文件",outline:"大纲",version:"版本",loading:"正在载入…",enabled:"允许",disabled:"禁止",normal:"正常",admin:"管理员",language:"语言",save:"保存",edit:"编辑",retry:"重试",reload:"刷新页面",languageEnglish:"English",languageChinese:"中文"},y0={tagline:"轻量 LaTeX 写作环境",username:"用户名",password:"密码",login:"登录",contact:"需要账号?请联系 {{email}}",firstLogin:"首次登录,请修改初始密码",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认新密码",updatePassword:"更新密码",mismatch:"两次输入的新密码不一致",passwordMinimum:"至少 {{count}} 位",sessionExpired:"登录状态已过期,请重新登录。",logout:"退出"},b0={title:"项目",subtitle:"创建、编辑和分享 LaTeX 文档",restricted:"你可以访问别人共享给你的项目;创建权限由管理员授予",new:"新建项目",newDescription:"项目会使用配置文件中的默认 LaTeX 引擎。",name:"项目名称",emptyTitle:"一起创造出色的作品",emptyDescription:"创建新项目,或上传已有的 LaTeX 压缩包开始写作。",emptyRestricted:"共享给你的项目会显示在这里。",noMatches:"没有符合当前搜索或标签筛选条件的项目。",upload:"上传项目",uploadDescription:"上传 ZIP 压缩包;若只有一个顶层目录会自动去除。单文件最大 {{size}} MB。",zipFile:"ZIP 压缩包",import:"导入项目",importing:"正在导入…",search:"搜索项目…",grid:"网格",list:"列表",allTags:"全部标签",sortBy:"排序",sortModified:"最后修改时间",sortCreated:"创建时间",scope:"项目状态",active:"活跃项目",archived:"已归档",archive:"归档",unarchive:"取消归档",noArchived:"还没有归档项目。",pagination:"项目分页",pageOf:"第 {{page}} / {{totalPages}} 页 · 共 {{count}} 个项目",previousPage:"上一页",nextPage:"下一页",owner:"所有者",created:"创建时间",modified:"最后修改",actions:"操作",openProject:"打开“{{project}}”",projectActions:"“{{project}}”的操作",relativeHoursPast:"{{hours}}小时前",relativeHoursMinutesPast:"{{hours}}小时{{minutes}}分钟前",relativeHoursFuture:"{{hours}}小时后",relativeHoursMinutesFuture:"{{hours}}小时{{minutes}}分钟后",relativeDaysPast:"{{days}}天前",relativeDaysHoursPast:"{{days}}天{{hours}}小时前",relativeDaysFuture:"{{days}}天后",relativeDaysHoursFuture:"{{days}}天{{hours}}小时后",modifiedBy:"最后修改人",byUser:"由 {{user}} 修改",modifiedByUser:"{{time}} · 由 {{user}} 修改",deletedUser:"已删除用户",comments:"批注",unresolvedComments:"{{count}} 条未解决批注",unresolvedCommentsTooltip:"{{unresolved}} 条未解决批注 / 共 {{total}} 条",allResolved:"全部已解决 ({{count}})",allCommentsResolvedTooltip:"全部 {{count}} 条批注已解决",noComments:"暂无批注",unresolvedCount:"{{count}} 条待解决",filterTags:"按标签过滤",rename:"重命名",renameTitle:"重命名项目",duplicate:"复制项目",duplicating:"正在复制…",duplicateTitle:"复制项目",duplicateDescription:"创建“{{project}}”的独立副本。会复制文件和项目设置,但不会复制成员、批注、Git 历史和编译产物。",download:"下载",transfer:"转让",transferOwnership:"转让项目",transferDescription:"为“{{project}}”选择新的所有者。",newOwner:"新所有者",chooseNewOwner:"请选择用户",noTransferUsers:"没有其他可用用户",transferWarning:"转让后你仍保留读写权限。源码、历史、批注和成员不会改变;已保存的 GitHub token 会被移除,由新所有者配置自己的凭据。",transferForbidden:"只有当前项目所有者可以转让项目。",transferTargetInvalid:"请选择新的项目所有者。",transferSelf:"你已经是该项目的所有者。",deleteTitle:"删除项目",deleteDescription:"确定永久删除“{{project}}”及其全部文件吗?此操作不可撤销。",chooseZip:"选择 ZIP 项目",dropZip:"将 ZIP 压缩包拖放到这里",browse:"浏览文件",selectedFileSize:"已选择 · {{size}}",clearFile:"清除已选文件"},F0={title:"选择项目图标",description:"为“{{project}}”选择一个视觉标识。该共享设置仅项目所有者可以修改。",change:"修改项目图标",search:"搜索图标…",save:"保存图标",useInitial:"使用项目首字",noMatches:"没有匹配“{{query}}”的图标。",advancedName:"高级:Lucide 图标短名称",advancedNamePlaceholder:"例如:file-text",advancedNameDescription:"请输入官方 Lucide 短名称,例如 file-text;从 Iconify 复制的 lucide:file-text 也可直接使用。它与上方精选图标搜索互不影响。",advancedPreview:"高级图标预览",browse:"浏览 Lucide 图标",icons:{"file-text":{name:"文档",keywords:"文档 论文 稿件 文章 文本"},"book-open":{name:"书籍",keywords:"书籍 阅读 参考 文献"},"notebook-pen":{name:"笔记",keywords:"笔记 写作 草稿"},"book-marked":{name:"书签",keywords:"书签 文献 阅读"},"scroll-text":{name:"卷轴",keywords:"卷轴 文本 稿件 档案"},library:{name:"文献库",keywords:"图书馆 文献库 参考"},"graduation-cap":{name:"学位论文",keywords:"学位论文 毕业论文 学术"},presentation:{name:"演示",keywords:"演示 幻灯片 汇报"},image:{name:"图片",keywords:"图片 图像 视觉 照片"},"folder-kanban":{name:"项目",keywords:"项目 看板 任务 规划"},microscope:{name:"研究",keywords:"研究 显微镜 实验 科学"},"flask-conical":{name:"实验",keywords:"实验 化学 实验室 烧瓶"},"test-tube-diagonal":{name:"化学",keywords:"化学 检验 实验室 实验"},atom:{name:"物理",keywords:"物理 原子 科学"},dna:{name:"生物",keywords:"生物 基因 DNA 生命"},telescope:{name:"天文",keywords:"天文 望远镜 太空"},earth:{name:"地球",keywords:"地球 全球 地理 世界"},map:{name:"地图",keywords:"地图 地理 位置 空间"},languages:{name:"语言",keywords:"语言 翻译 多语言"},university:{name:"大学",keywords:"大学 教育 学术"},landmark:{name:"经济",keywords:"经济 金融 政策 机构"},scale:{name:"法律",keywords:"法律 公平 政策 天平"},"code-2":{name:"代码",keywords:"代码 编程 软件 开发"},"file-code-2":{name:"源码",keywords:"源代码 程序 文件 软件"},database:{name:"数据库",keywords:"数据 数据库 存储"},server:{name:"服务器",keywords:"服务器 系统 基础设施"},network:{name:"网络",keywords:"网络 图 连接"},"circuit-board":{name:"工程",keywords:"工程 电路 硬件 电子"},brain:{name:"思考",keywords:"思考 认知 心智"},"brain-circuit":{name:"人工智能",keywords:"人工智能 AI 机器学习"},bot:{name:"自动化",keywords:"机器人 自动化"},"shield-check":{name:"安全",keywords:"安全 防护 隐私"},"lock-keyhole":{name:"加密",keywords:"锁 加密 隐私 安全"},workflow:{name:"工作流",keywords:"工作流 流程 管线"},blocks:{name:"模块",keywords:"模块 方块 组件 构建"},sigma:{name:"数学",keywords:"数学 公式 统计 西格玛"},calculator:{name:"计算",keywords:"计算 算术 数学"},"function-square":{name:"函数",keywords:"函数 数学 公式"},"chart-no-axes-combined":{name:"分析",keywords:"分析 图表 数据"},"line-chart":{name:"趋势",keywords:"趋势 曲线 图表 数据"},"bar-chart-3":{name:"柱状图",keywords:"柱状图 统计 数据"},"pie-chart":{name:"饼图",keywords:"饼图 分布 数据"},"chart-scatter":{name:"散点图",keywords:"散点图 数据 分析"},"chart-spline":{name:"曲线",keywords:"曲线 样条 数据 分析"},"file-spreadsheet":{name:"表格",keywords:"表格 数据 电子表格 工作簿"},"file-chart-column-increasing":{name:"报告",keywords:"报告 图表 数据 结果"},lightbulb:{name:"想法",keywords:"想法 创意 灵感"},rocket:{name:"创新",keywords:"创新 启动 前进"},target:{name:"目标",keywords:"目标 重点"},sparkles:{name:"通用",keywords:"通用 闪光 高亮"},"wand-sparkles":{name:"工具",keywords:"工具 魔法 优化 实用"},"file-pen-line":{name:"稿件",keywords:"稿件 草稿 写作 论文 文档"},"file-stack":{name:"文件集合",keywords:"文件 堆叠 文档 集合"},folder:{name:"文件夹",keywords:"文件夹 目录 文件"},"folder-open":{name:"打开文件夹",keywords:"文件夹 目录 文件 打开"},"folder-archive":{name:"归档文件",keywords:"文件夹 归档 文件 存储"},archive:{name:"归档",keywords:"归档 存储 历史"},book:{name:"合本书",keywords:"书籍 阅读 文献 参考"},bookmark:{name:"书签",keywords:"书签 参考 阅读"},newspaper:{name:"报刊",keywords:"报刊 论文 出版 文章"},"notepad-text":{name:"记事本",keywords:"笔记 记事本 写作 想法"},"sticky-note":{name:"便签",keywords:"便签 提醒 想法"},"pen-tool":{name:"写作",keywords:"写作 笔 作者 编辑"},quote:{name:"引文",keywords:"引文 引用 参考 文本"},"list-tree":{name:"大纲",keywords:"大纲 结构 章节 列表 树"},"file-search":{name:"搜索文档",keywords:"搜索 文档 研究 文件"},beaker:{name:"烧杯",keywords:"烧杯 化学 实验室 科学"},"test-tubes":{name:"试管",keywords:"试管 实验室 实验 科学"},syringe:{name:"医学",keywords:"医学 健康 临床 注射器"},radiation:{name:"核科学",keywords:"辐射 核 物理 科学"},satellite:{name:"卫星",keywords:"卫星 太空 遥感"},"map-pinned":{name:"地点",keywords:"地点 地图 标记 地理"},route:{name:"路线",keywords:"路线 路径 交通 地理"},"folder-git-2":{name:"Git 仓库",keywords:"Git 仓库 版本控制 源码"},"git-branch":{name:"分支",keywords:"Git 分支 版本控制"},"git-commit-horizontal":{name:"提交",keywords:"Git 提交 版本控制"},terminal:{name:"终端",keywords:"终端 命令 Shell 开发"},braces:{name:"语法",keywords:"语法 代码 编程 花括号"},regex:{name:"正则",keywords:"正则 正则表达式 搜索 代码"},binary:{name:"二进制",keywords:"二进制 位 数据 计算"},cpu:{name:"计算设备",keywords:"CPU 处理器 计算 硬件"},"hard-drive":{name:"存储",keywords:"存储 磁盘 驱动器 数据"},cloud:{name:"云",keywords:"云 基础设施 存储 网络"},wifi:{name:"无线",keywords:"无线 WiFi 网络 连接"},radar:{name:"感知",keywords:"雷达 感知 信号 研究"},"key-round":{name:"访问密钥",keywords:"密钥 访问 认证 安全"},fingerprint:{name:"身份",keywords:"身份 指纹 认证 安全"},shield:{name:"防护",keywords:"防护 安全 隐私 盾牌"},bug:{name:"调试",keywords:"错误 调试 软件 问题"},wrench:{name:"维护",keywords:"维护 工具 修复 工程"},"chart-column":{name:"柱形图",keywords:"柱形图 图表 数据 统计"},"chart-candlestick":{name:"K 线图",keywords:"K线图 图表 金融 数据"},gauge:{name:"指标",keywords:"指标 仪表 测量 性能"},activity:{name:"活动",keywords:"活动 信号 监测 健康"},"table-2":{name:"数据表",keywords:"表格 数据 行 列"},waypoints:{name:"管线",keywords:"管线 工作流 节点 流程"},boxes:{name:"组件",keywords:"组件 方块 模块 系统"},package:{name:"软件包",keywords:"软件包 依赖 软件 模块"},"users-round":{name:"团队",keywords:"团队 用户 协作 小组"},"calendar-days":{name:"日程",keywords:"日程 日历 截止日期 规划"}}},C0={manage:"用户管理",back:"返回项目",onlyAdmin:"仅管理员可以创建用户",add:"添加用户",role:"角色",createProjects:"创建项目",ownedProjects:"拥有项目",status:"状态",actions:"操作",adminRequired:"需要管理员权限。",allow:"允许",deny:"禁止",enable:"启用",disable:"禁用",promote:"设为管理员",demote:"降为用户",allowCreate:"允许创建",denyCreate:"禁止创建",resetPassword:"重置密码",initialPassword:"登录密码",displayName:"显示名称",addDescription:"设置登录密码,或生成一个安全的随机密码。",createUser:"创建用户",randomPassword:"随机密码",generatePassword:"生成随机密码",resetDescription:"为 {{username}} 设置初始密码;其现有会话会被注销。",reset:"重置",deleteTitle:"删除用户",deleteDescription:"确认删除 {{username}}?此操作不可撤销。",ownedChoice:"其拥有的 {{count}} 个项目",transferProjects:"转移给当前管理员",deleteProjects:"永久删除项目及全部文件"},w0={saved:"已保存",savedAt:"已于 {{time}} 保存到服务器",loading:"载入中",pending:"等待保存",saving:"正在保存到服务器",saveFailed:"保存失败",offlineDraft:"离线 · 本地草稿已保留",harperRecoveryTitle:"Harper 暂不可用。",harperFallbackHint:" 已自动改用浏览器内置拼写检查。",texFmtRecoveryTitle:"tex-fmt 无法加载。",texFmtOptionsRecoveryTitle:"tex-fmt 无法处理当前源码或参数。",texFmtRuntimeRecoveryTitle:"tex-fmt 返回了异常结果。",clientToolRecoveryHint:" 可立即重试;如果页面在系统更新前已经打开,请刷新页面加载最新资源。",resetFormatterOptions:"清空参数并重试",texFmtDiagnosticsTitle:"tex-fmt 生成了诊断信息。",texFmtDiagnosticsHint:" 格式化内容已应用,请查看下方详情。",viewFormatterDiagnostics:"查看诊断",dismissFormatterDiagnostics:"关闭格式化诊断",formattingBy:"{{name}} 正在格式化此文件,请稍候…",compile:"编译 · {{engine}}",compiling:"编译中…",compileQueued:"编译已排队…",compileFailedRetained:"编译失败,当前显示上一次成功生成的 PDF({{time}})。",compileFailedNoPdf:"编译失败,且没有可用的成功 PDF。",upToDate:"文件已是最新,无需重新编译。",compileSnapshotStale:"PDF 基于较早的一致快照编译,未包含之后的源码修改。",addComment:"添加批注",sourceComments:"源码批注",projectSettings:"项目设置",uploadAttachment:"上传附件",newFile:"新建文本文件",binary:"二进制附件已保存,但不能在文本编辑器中打开。",noOutline:"当前文件没有章节",wordCountTitle:"字数统计",wordCountFull:"全文",wordCountSelection:"所选",wordCountFullHint:"统计当前主文档及其引入的 TeX 文件",wordCountSelectionHint:"统计选中的 LaTeX 源码",wordCountLoading:"正在运行 TeXcount…",wordCountTotal:"总字数",wordCountCharacters:"字符数",wordCountCharactersHint:"不含空格和标点",wordCountText:"正文",wordCountHeaders:"标题",wordCountCaptions:"图注/表注",wordCountFloats:"图表数量",wordCountInlineMath:"行内公式",wordCountDisplayMath:"独立公式",wordCountFiles:"引入文件",wordCountWordsUnit:"字",wordCountItemsUnit:"个",wordCountExpressionsUnit:"个",wordCountParserErrors:"TeXcount 报告了 {{count}} 个解析问题。",wordCountSelectionEmpty:"请选择 LaTeX 源码后再统计。",wordCountSaveRequired:"最新编辑修改无法保存,已取消统计。",wordCountFailed:"TeXcount 无法统计这段源码。",wordCountSourceInvalid:"请选择 LaTeX 源码后再统计。",wordCountSourceTooLarge:"所选源码过大,无法统计。",wordCountUnavailable:"服务器未安装 TeXcount,请安装 TeX Live 后重试。",wordCountHelp:"TeXcount 说明",wordCountTemplateNote:"自定义 %TC:newtemplate 或 %TC:template 指令可能覆盖 TexLite 的统计格式,并导致统计失败。",preview:"PDF 预览",previewHint:"点击“编译”生成文档",loadingPdf:"正在加载 PDF…",pdfCompiledAt:"成功编译于 {{time}}",pdfCompiledAtFor:"{{file}} 成功编译于 {{time}}",currentMainDocument:"当前作为主文档编译:{{path}}",mainDocumentCandidate:"LaTeX 主文档候选:{{path}}",currentMainShort:"主文档",deletedUser:"已删除用户",orphaned:"锚点已丢失",line:"第 {{line}} 行",reopen:"重新打开",resolve:"标记为已解决",noComments:"当前文件没有批注",newFileDescription:"可以包含目录,例如 chapters/introduction.tex。",filePath:"文件路径",commentDescription:"已选择 {{count}} 个字符",pointComment:"未选择文本,将在当前光标位置添加批注。",commentContent:"批注内容",backToProjects:"返回项目列表",outputTabs:"编译输出",log:"日志",warnings:"警告",errors:"错误",artifacts:"产物",clean:"故障恢复",noLog:"编译后将在此显示日志。",noWarnings:"最近一次编译没有警告。",noErrors:"最近一次编译没有错误。",projectRoot:"项目根目录",uploadTo:"上传到 {{folder}}",dropFiles:"拖放文件以上传",newFolder:"新建文件夹",folderName:"文件夹名称",folderDestination:"文件夹将创建在 {{folder}} 中。",uploadOverwriteTitle:"文件已存在",uploadOverwriteDescription:"以下文件已经存在:{{files}}。要覆盖它们吗?",uploadOverwrite:"覆盖文件",noArtifacts:"编译后将在此显示输出产物。",selectArtifact:"选择一个文本产物进行预览。",viewArtifact:"查看产物",downloadArtifact:"下载产物",downloadToView:"该产物需要下载后查看",cleanTitle:"编译故障恢复",cleanDescription:"这里只提供高级故障恢复操作:仅在编译卡住、历史错误状态残留或生成产物异常时使用。不会修改源码、项目设置、批注、历史或 Git 数据。",cleanCache:"强制完整重编译",cleanCacheDescription:"仅在编译失败或 latexmk 缓存状态异常时使用。删除增量缓存,但保留当前成功的 PDF。",cleanArtifacts:"删除生成输出",cleanArtifactsDescription:"仅在生成产物状态异常时使用。删除该主文档的 PDF、SyncTeX、日志和中间文件。",cleanCacheConfirmTitle:"强制完整重编译?",cleanCacheConfirmDescription:"此故障恢复操作会删除 latexmk 增量缓存。当前 PDF 会保留,下一次编译将从干净缓存开始。",cleanArtifactsConfirmTitle:"删除生成输出?",cleanArtifactsConfirmDescription:"此故障恢复操作会删除当前 PDF 以及该主文档的全部生成文件,但不会影响源码。",cleanConfirm:"执行恢复",cleanCacheComplete:"故障恢复缓存已清理,下一次编译将完整执行。",cleanArtifactsComplete:"编译生成输出已删除。",cleanBusy:"当前主文档正在编译,请完成后再执行故障恢复。",collapseFiles:"折叠文件面板",showFileSizes:"显示文件大小",hideFileSizes:"隐藏文件大小",move:"移动",moveTitle:"移动或重命名 {{name}}",moveDescription:"选择目标文件夹和名称;源码、批注和项目路径会保持关联。",pathName:"名称",moveApply:"移动/重命名",destinationFolder:"目标文件夹",deletePath:"删除文件或文件夹",deletePathTitle:"删除 {{name}}",deletePathDescription:"确定删除 {{path}}?此操作不可撤销。",deletePathActiveDescription:"确定删除 {{path}}?{{users}} 当前正在打开它,删除后这些会话将关闭该文件。",deletePathWillClose:"系统会拒绝该路径上迟到的修改,避免内容被静默丢失。",fileDeletedByCollaborator:"{{path}} 已在其他会话中删除,现已打开安全的备用文件。",compileShortcut:"保存并编译(Ctrl+S / Cmd+S)",compilingBy:"{{name}} 正在编译",format:"格式化",formatFile:"文件",formatFileHint:"格式化当前文件",formatFileComplete:"当前文件已格式化。",formatFileFailed:"无法格式化当前文件:{{message}}",formatSelected:"选区",commentsAdd:"添加",commentsAll:"查看",formatSelection:"格式化选区",formatting:"正在格式化…",formatSelectionHint:"选择一段 LaTeX 源码后格式化",formatSelectionRequired:"请先选择 LaTeX 源码,再进行格式化。",formatSelectionComplete:"所选 LaTeX 源码已格式化。",formatFailedContinue:"格式化失败,仍将继续编译:{{message}}",formatFailed:"无法格式化选区:{{message}}",formatSourceChanged:"格式化期间源码已发生变化,已跳过本次格式化。",formatSelectionChanged:"格式化期间所选源码已发生变化,请重新选择后再试。",writingSuggestions:"写作建议",noWritingSuggestions:"没有可用的修改建议",removeText:"删除文本",replaceWith:"替换为 {{word}}",spellCheckReadOnly:"当前为只读,需要编辑权限才能替换。",spellCheckSourceChanged:"源码在应用写作修正前发生了变化。",mathPreview:"公式预览",mathPreviewLoading:"正在渲染公式…",mathPreviewUnavailable:"该公式暂时无法预览。",vimOn:"Vim 已开启",vimOnHint:"当前编辑器已启用 Vim 键位。",reply:"回复",replyPlaceholder:"输入回复内容…",sendReply:"发送回复",editComment:"编辑批注",deleteComment:"删除批注",saveChanges:"保存修改",deleteCommentTitle:"删除批注",deleteCommentDescription:"确定删除这条批注及其 {{count}} 条回复吗?此操作不可撤销。",editReply:"编辑回复",deleteReply:"删除回复",deleteReplyTitle:"删除回复",deleteReplyDescription:"确定删除这条回复吗?此操作不可撤销。",editedAt:"编辑于 {{time}}",outlineJump:"跳转到源码第 {{line}} 行并定位 PDF",lineNumber:"第 {{line}} 行",showInSource:"在源码中显示当前 PDF 位置",showInPdf:"在 PDF 中显示当前源码光标位置",syncTexOnlyForTex:"PDF 跳转仅支持 TeX 源文件(.tex)",syncTexOnlyForMain:"PDF 跳转仅支持当前主 TeX 文档",openFiles:"打开的文件",pdfLoadFailed:"无法载入 PDF 预览",pdfZoomControls:"PDF 缩放控件",downloadPdf:"下载 PDF",downloadResource:"下载文件",resourceTooLarge:"该文件大小为 {{size}},超过 {{limit}} 的直接预览上限。",resourceTooLargeTitle:"文件过大,无法直接预览",resourceTooLargeDescription:"请下载文件后在本地打开。",resourceUnsupportedTitle:"无法预览",resourceUnsupportedDescription:"浏览器不能直接渲染此文件类型,请下载后在本地打开。",resourcePreview:{image:"图片预览",pdf:"PDF 预览",text:"文本预览",unsupported:"文件预览"},pdfZoomOut:"缩小",pdfZoomIn:"放大",pdfFitWidth:"适合宽度",pdfLink:"PDF 链接",pdfLinks:"PDF 链接",layout:{label:"布局",choose:"选择布局",current:"当前布局:{{layout}}","editor-pdf":{name:"编辑器与 PDF",description:"并排显示源码编辑器和 PDF 预览"},"editor-only":{name:"仅编辑器",description:"将工作区用于源码编辑"},"pdf-only":{name:"仅 PDF",description:"将工作区用于 PDF 和编译输出"}},collaboration:{connecting:"正在连接协作服务…",connected:"实时协作已连接",disconnected:"实时协作连接已断开",editing:"正在编辑",viewing:"正在查看",joining:"正在进入项目",reconnect:"重新连接",permissionDowngradeTitle:"编辑权限已变更",permissionDowngradeDescription:"您的权限已从{{previous}}变为只读。任何尚未保存的本地草稿仍保留在当前标签页中,但无法保存。您可以继续查看草稿,或放弃草稿并重新加载服务器上的最新版本。",permissionDowngradeKeep:"保留本地草稿",permissionDowngradeDiscard:"放弃草稿并重新加载",permissionDowngradeReload:"重新加载服务器版本",permissionDowngradeNoDraft:"您的权限已变为只读。您可以继续查看当前标签页,或重新加载服务器上的最新版本。",permissionDowngradeOtherTab:"您的权限已变为只读。另一个浏览器标签页中仍有尚未保存的草稿,请返回该标签页处理。为避免误删,该页面不能清理共享的本地草稿。",permissionDowngradeMultipleDrafts:"您的权限已变为只读。当前标签页和其他浏览器标签页都存在尚未保存的草稿。请先在其他标签页中处理草稿;当前页面不会清理共享数据。",permissionDowngradeOtherTabBlocked:"另一个浏览器标签页刚刚产生了尚未保存的草稿,已取消清理以保护该草稿。",activeSessions:"{{count}} 个活跃会话",showMoreSessions:"展开另外 {{count}} 个会话",showFewerSessions:"收起会话列表",sessionTooltip:"{{name}}(@{{username}})· {{file}} · {{activity}} · {{permission}}"},search:{button:"查找",title:"查找和替换(Ctrl+F / Cmd+F)",find:"查找",replace:"替换为",next:"下一个",previous:"上一个",all:"选择全部",matchCase:"区分大小写",regexp:"正则表达式",wholeWord:"全字匹配",replaceNext:"替换",replaceAll:"全部替换",currentMatch:"当前匹配",onLine:"位于行",replacedMatchOnLine:"已替换第 $ 行的匹配项",replacedMatches:"已替换 $ 个匹配项",goToLine:"跳转到行",go:"跳转",matchCount:"共 {{count}} 个匹配",noMatches:"没有匹配项",invalidQuery:"正则表达式无效"}},E0={title:"引用库",description:"从 {{file}} 保存文献,并将它们导入当前 BibTeX 文件。引用库及其标签仅属于你自己。",myLibrary:"我的引用库",currentFile:"当前文件",searchPlaceholder:"搜索引用…",searchHint:"可搜索 key、标题、作者或年份",emptyTitle:"引用库还是空的",emptyDescription:"打开“当前文件”标签页,保存一个 BibTeX 文献条目。",noEntries:"没有找到 BibTeX 条目",noEntriesDescription:"请在当前文件中添加有效的 @article、@inproceedings 或其他文献条目。",currentFileTitle:"当前文件中的条目",currentFileDescription:"选择一个条目保存到你的引用库。",backToLibrary:"返回引用库",save:"保存",update:"更新",saving:"正在保存…",saved:"引用已保存到你的引用库。",updated:"引用已更新。",deleted:"引用已删除。",deleteTitle:"删除引用",deleteDescription:"确定从你的私有引用库中删除引用 {{key}}?此操作不可撤销。",fileTooLarge:"该 BibTeX 文件超过 {{size}} 限制。",fileTooLargeHint:"文件过大,浏览器不会解析其中的条目。请拆分文件后再保存单条引用。",fileInvalid:"当前 BibTeX 文件存在语法错误。",fileInvalidHint:"请先修复当前文件,再格式化或导入新的引用。",savedLabel:"已保存",import:"导入",importToFile:"导入到当前 BibTeX 文件",importRequiresWrite:"导入需要当前项目的写权限。",imported:"已将 {{key}} 导入当前文件。",untitled:"未命名引用",authorUnknown:"未填写作者",allTags:"全部标签",noTags:"还没有标签",noTagMatches:"没有匹配此标签的引用。",newTagPlaceholder:"新标签名称",tagColor:"标签颜色",createTag:"创建标签",tagCreated:"标签已创建。",tags:"标签",tagsTitle:"{{key}} 的标签",noTagsToAssign:"请先创建标签。",saveTags:"保存标签",tagsUpdated:"标签已更新。",editTitle:"编辑 {{key}}"},x0={invalid:"请输入一个有效的 BibTeX 条目。",tooLarge:"BibTeX 条目过大。",notFound:"引用条目不存在。",keyExists:"引用 key 已经存在,请检查现有条目后再决定是否替换。",tagNotFound:"引用标签不存在。",conflict:"该引用已在其他位置发生修改,请刷新引用库后重试。",alreadyInFile:"{{key}} 已经存在于当前 BibTeX 文件中。"},v0="在首页管理属于你自己的 BibTeX 文献和标签。打开 .bib 文件后即可保存或导入条目。",k0={addEntry:"添加条目",addEntryTitle:"添加 BibTeX 条目",addEntryDescription:"粘贴一个完整的 BibTeX 文献条目,保存前会进行校验。",addEntryPlaceholder:`@article{key,
|
|
9
|
-
author = {Author},
|
|
10
|
-
title = {Title},
|
|
11
|
-
year = {2026}
|
|
12
|
-
}`,added:"引用已添加到你的引用库。"},A0={pageOf:"第 {{page}} / {{totalPages}} 页 · {{count}} 条引用",previous:"上一页",next:"下一页"},j0={quickOpen:"快速打开",quickOpenDescription:"按名称打开项目文件(Ctrl/Cmd+P)。",filePlaceholder:"输入文件名…",noFiles:"没有匹配的文件。",projectSearch:"项目搜索",projectSearchDescription:"在项目源码文件中搜索和替换(Ctrl/Cmd+Shift+F)。",searchPlaceholder:"搜索全部源码文件…",replacePlaceholder:"替换为…",matchSummary:"共 {{count}} 个匹配",truncated:"仅显示前 {{count}} 个匹配。",replaceAll:"替换全部 {{count}} 项",replaceConfirmTitle:"在项目中批量替换",replaceConfirmDescription:"确定替换全部 {{count}} 个匹配?自动历史会记录所有修改文件。",replaced:"已在 {{files}} 个文件中替换 {{count}} 项。"},S0={title:"历史",description:"浏览自动项目版本、比较文件,并安全恢复较早的工作。",empty:"尚无历史版本。",changedCount:"{{count}} 个文件有变化",fileCount:"{{count}} 个文件",changed:"有修改",labelPlaceholder:"为此版本命名",saveLabel:"保存标签",compareCurrent:"与当前版本比较",comparingCurrent:"历史版本与当前文件的比较",chooseFile:"选择文件后,可与当前源码进行比较。",restore:"恢复",restoreFile:"恢复文件",restoreProject:"恢复项目",restoreFileTitle:"恢复此文件",restoreProjectTitle:"恢复此项目版本",restoreFileDescription:"从此版本恢复 {{path}}?系统会先为当前项目创建安全检查点。",restoreProjectDescription:"恢复此版本的全部源码和编译器设置?系统会先为当前项目创建安全检查点。",storage:"历史存储",storageUsage:"已使用 {{used}},上限 {{limit}}",versionUsage:"普通版本 {{count}} / {{limit}}",protectedVersions:"{{count}} 个已标记版本",storageExceeded:"受保护版本或当前基线已超过存储软上限。",deleteVersion:"删除版本",deleteVersionTitle:"删除此历史版本",deleteVersionDescription:"永久删除“{{name}}”?当前项目文件不会改变。",clearAll:"清空历史",clearAllTitle:"清空全部项目历史",clearAllDescription:"永久删除全部历史版本及不再引用的存储数据?当前项目文件不会改变。",reasons:{initial:"项目创建",autosave:"自动保存",file:"文件操作",settings:"编译器设置",git:"Git 操作",restore:"恢复版本",checkpoint:"安全检查点"}},T0={mainFile:"主文档",invalidMainFileOption:"{{path}}(不是主文档)",engine:"编译引擎",latexmkrc:"项目 latexmkrc",save:"保存项目设置",members:"共享成员",recentLog:"最近编译日志",share:"共享",shareDescription:"仅可共享给管理员已创建的用户。",chooseUser:"请选择用户",latexmkrcPlaceholder:`# 留空表示不使用项目 rc 文件
|
|
13
|
-
$pdf_mode = 1;`,addMember:"添加成员",noMembers:"该项目尚未分享给其他成员。",removeTitle:"移除共享成员",removeDescription:"确认移除 {{username}}?其账号和其他项目不会受到影响。",editorTab:"编辑器外观",compilerTab:"LaTeX 编译器",compilerDescription:"选择本项目所有成员共享的主文档和 LaTeX 编译选项。",editorAppearance:"编辑器外观",editorAppearanceDescription:"这些偏好仅作用于当前浏览器中的当前用户和项目;项目词典是共享的。",browserTools:"格式化工具",toolStatus:{loading:"加载中",working:"运行正常",error:"错误"},reloadTool:"重新加载",saveAppearance:"保存外观设置",saveCompiler:"保存编译器设置",writingCheckDescription:"TexLite 使用宿主机上可选的 Harper CLI。若其不可用,将自动改用浏览器内置拼写检查。拼写问题使用红色波浪线,语法问题使用黄色波浪线;右键问题可以查看修改建议。",projectConfiguration:"项目配置",fontFamily:"英文字体",fontSize:"字体大小",lineHeight:"行间距",dictionary:"项目词典",dictionaryDescription:"添加到这里的词会在 Harper 返回本项目诊断后被忽略;具有编辑权限的用户可以维护此列表。",dictionaryPlaceholder:"添加自定义词",addWord:"添加词",dictionaryEmpty:"暂未添加自定义词。",lineWrapping:"自动换行",mathPreviewOnHover:"悬停预览数学公式",mathPreviewOnHoverDescription:"在编辑器中悬停常见 LaTeX 公式时显示渲染预览。",spellCheck:"拼写和语法检查",vimMode:"Vim 键位",vimModeDescription:"在当前编辑器中使用 Vim 的普通、插入和可视模式。",vimHelp:"查看帮助",formatOnCompile:"编译前自动格式化 LaTeX",formatOnCompileDescription:"默认关闭;格式化会在编译前执行。",formatRequiresWrite:"需要项目编辑权限才能使用格式化。",formatterDescription:"tex、cls、sty 使用内置的浏览器 tex-fmt WASM 格式化器;BibTeX 使用浏览器中的 bibtex-tidy。",formatterInstall:"查看 tex-fmt",bibtexTidyInstall:"查看 bibtex-tidy",texFmtOptions:"tex-fmt 参数(TOML)",texFmtOptionsPlaceholder:`wrap = true
|
|
14
|
-
wraplen = 80`,texFmtOptionsDescription:"这些参数仅保存在当前浏览器中,并按当前用户和项目隔离;它们会直接传递给 tex-fmt。",openFilesInTabs:"使用新 Tab 打开 LaTeX 文件",openFilesInTabsDescription:"在编辑器顶部通过标签页管理打开的 .tex、.bib、.sty 等源码文件。",writingIssues:"发现 {{count}} 个写作问题(去重后 {{uniqueCount}} 个)",noWritingIssues:"未发现拼写或语法问题。",spellCheckFirst:"第一个写作问题",spellCheckPrevious:"上一个写作问题",spellCheckNext:"下一个写作问题",spellCheckLast:"最后一个写作问题",spellCheckPosition:"第 {{current}}/{{total}} 个",fontJetBrains:"JetBrains Mono",fontSourceCode:"Source Code Pro",fontIbmPlex:"IBM Plex Mono",fontFiraCode:"Fira Code",fontIosevka:"Iosevka",lineHeightCompact:"紧凑",lineHeightNormal:"标准",lineHeightRelaxed:"宽松"},B0={title:"Git 备份",description:"管理本地 Git 历史及 GitHub 备份;只有项目创建者可以执行这些操作。",ownerOnly:"只有项目所有者可以使用 Git 备份。",authentication:"GitHub 身份验证",authenticationHint:"token 需要仓库 Administration 与 Contents 写权限;它会加密保存,不会写入项目仓库或远程地址。",recommendedAccessTitle:"建议的仓库访问范围:All repositories(所有仓库)",recommendedAccess:"texLite 面向相互信任的用户。请选择 All repositories,使该 token 能创建仓库,并访问之后新建的仓库;同时授予 Administration 和 Contents 的 Read and write 权限。",token:"个人访问 token",tokenPlaceholder:"在此粘贴 GitHub token",replaceToken:"替换个人访问 token",saveToken:"保存并验证 token",createToken:"创建细粒度 token",connectedAs:"已连接为 @{{login}}",removeToken:"移除 token",tokenSaved:"GitHub token 已保存,本地仓库已就绪。",tokenRemoved:"GitHub token 已移除。",repository:"仓库",localReady:"项目源码已由本地 Git 仓库管理。",localPending:"保存有效 token 后将自动初始化本地 Git 仓库。",repositoryName:"GitHub 仓库名称",privateRepository:"创建为私有仓库",createRepository:"创建 GitHub 仓库",repositoryCreated:"GitHub 仓库创建成功。",origin:"远程仓库",openGitHub:"打开 GitHub",clean:"工作区干净",changedFiles:"{{count}} 个文件有修改",commitAndPush:"提交与推送",identity:"本次提交临时使用 {{username}} <{{username}}@texlite.com>,不会写入 Git 配置。",detachedHead:"当前处于 detached HEAD;请先返回默认分支再提交或推送。",detachedAt:"detached 于 {{revision}}",commitMessage:"提交说明",commitPlaceholder:"说明本次备份的内容…",commit:"提交",committed:"修改已提交。",noChangesToCommit:"当前没有新的修改可以提交。",push:"推送",pushed:"推送成功,GitHub 备份已是最新。",pushFailed:"推送失败",workingDiff:"当前差异",refresh:"刷新",diffTitle:"差异",diffTruncated:"输出已截断",diffFontSize:"差异字体大小",diffFontDecrease:"减小差异字体",diffFontIncrease:"增大差异字体",fullscreenDiff:"全屏查看差异",exitFullscreenDiff:"退出全屏",noChanges:"没有可显示的差异。",history:"提交历史",historyHint:"最多显示最近 100 次提交",noCommits:"尚无提交。",viewCommitDiff:"查看该提交的差异",checkoutVersion:"checkout 到该版本",checkoutTitle:"Checkout 版本",checkout:"Checkout",checkoutDescription:"将 checkout 到 {{revision}} — {{message}}。默认由 Git 保留兼容的未提交修改,发生冲突时拒绝操作。",forceCheckout:"强制覆盖",forceCheckoutDescription:"明确丢弃所有已跟踪及未跟踪的工作区修改后再 checkout;此操作不可撤销。",returnToBranch:"返回 {{branch}}",returnTitle:"返回默认分支",returnDescription:"将 checkout 到 {{branch}}。默认由 Git 保留兼容的未提交修改,发生冲突时拒绝操作。",discardChanges:"撤销修改",noChangesToDiscard:"当前没有可以撤销的修改。",discardTitle:"撤销未提交修改",discardDescription:"把所有已跟踪文件恢复到当前 HEAD(上次 commit)。未跟踪文件不受影响。",discardConfirm:"确认撤销"},N0={title:"系统状态",description:"服务器实时健康状态和近期操作耗时,每五秒自动刷新。",refresh:"刷新",uptime:"运行时间",memory:"内存",heap:"堆内存",compileQueue:"编译任务",pending:"{{count}} 个等待中",collaboration:"协作",sessions:"{{count}} 个会话",roomsAndDirty:"{{rooms}} 个房间 · {{dirty}} 个待保存文件",eventLoop:"事件循环延迟",latencySummary:"P50 {{p50Ms}} ms · P95 {{p95Ms}} ms · 最大 {{maxMs}} ms",operationDurations:"近期操作耗时",noSamples:"尚未采集到操作样本。",operation:"操作",samples:"样本",last:"最近",max:"最大",operations:{collaboration:{connect:"打开协作房间",persist:"保存协作修改"},workspace:{project:"加载项目元数据",files:"加载项目文件",compileState:"加载保留的 PDF 状态"},compile:{snapshot:"准备编译快照",request:"编译请求总耗时",cacheSync:"更新编译缓存",latexmk:"运行 latexmk",artifactCopy:"发布编译产物"},outline:{build:"生成项目大纲"},search:{project:"项目内搜索"},completions:{build:"生成补全索引"}}},L0={title:"标签",add:"添加标签",create:"新建标签",createDescription:"创建仅自己可见的可复用彩色标签,用于整理项目。",manage:"管理标签",manageDescription:"创建和整理仅自己可见的项目标签。删除标签只会解除它与项目的关联。",createInManager:"新建标签",edit:"编辑",rename:"重命名",deleteTitle:"删除标签",deleteDescription_one:"确定删除“{{tag}}”吗?它将从 {{count}} 个项目中移除。",deleteDescription_other:"确定删除“{{tag}}”吗?它将从 {{count}} 个项目中移除。",projectCount_one:"{{count}} 个项目",projectCount_other:"{{count}} 个项目",noTags:"还没有标签。创建一个标签来整理项目。",none:"暂无标签",assign:"标签",assignTitle:"“{{project}}”的标签",assignDescription:"勾选你为此项目设置的私有标签;其他用户拥有各自的标签。",empty:"请先创建标签。",allAssigned:"所有可用标签均已添加。",name:"标签名称",color:"颜色",filter:"筛选",red:"红色",orange:"橙色",yellow:"黄色",green:"绿色",blue:"蓝色",purple:"紫色",gray:"灰色"},R0={generic:"操作失败",request:"请求失败({{status}})",upload:"上传失败",boundaryTitle:"页面遇到问题",boundaryDescription:"渲染组件时发生异常。你可以尝试恢复,或刷新页面重新载入。",boundaryRetry:"重试",boundaryReload:"刷新页面",fileExists:"同名文件或文件夹已经存在。",pathConflict:"目标路径已经被文件或文件夹占用。",duplicateUploadNames:"所选文件中存在重复名称:{{files}}。",fileTooLarge:"文件超过 {{size}} MB 限制。",zipOnly:"请选择 ZIP 压缩包。",collaborationUnavailable:"实时协作尚未连接,请在重新连接后保存或编译。",codes:{AUTH_INVALID:"用户名或密码错误。",CURRENT_PASSWORD_INVALID:"当前密码错误。",USER_NOT_FOUND:"用户不存在或已被删除。",LAST_ADMIN:"系统必须保留至少一名可用管理员。",SELF_DELETE_FORBIDDEN:"不能删除当前登录的管理员。",PROJECT_CREATE_FORBIDDEN:"管理员尚未授予你创建项目的权限。",PROJECT_NOT_FOUND:"项目不存在或你已无法访问。",PROJECT_OWNER_ONLY:"只有项目所有者可以修改此设置。",PROJECT_EDIT_FORBIDDEN:"你没有此项目的编辑权限。",DICTIONARY_EDIT_FORBIDDEN:"你没有维护本项目词典的权限。",TAG_NOT_FOUND:"所选标签不存在。",GIT_TOKEN_INVALID:"请输入 GitHub token。",GIT_REPOSITORY_NAME_INVALID:"请输入 GitHub 仓库名称。",GIT_REVISION_INVALID:"请选择要 checkout 的 Git 版本。",PROJECT_DELETE_FORBIDDEN:"只有项目所有者可以删除项目。",MEMBERS_MANAGE_FORBIDDEN:"只有项目所有者可以管理项目成员。",OWNER_MEMBER_FORBIDDEN:"项目所有者不能作为成员添加。",INVALID_PATH:"文件路径无效。",RESERVED_PATH:"此路径由 TexLite 保留。",PATH_EXISTS:"目标路径已被文件或文件夹占用。",FILE_EXISTS:"同名文件已经存在。",PATH_NOT_FOUND:"文件或文件夹不存在。",FILE_NOT_FOUND:"文件不存在。",DIRECTORY_NOT_FOUND:"目标文件夹不存在。",MOVE_INTO_SELF:"不能把文件夹移动到自身内部。",MAIN_FILE_DELETE_FORBIDDEN:"不能删除主文档。",FILE_TOO_LARGE:"文件过大,无法打开或上传。",UPLOAD_EMPTY:"没有选择要上传的文件。",COMMENT_FILE_NOT_FOUND:"批注对应的文件不存在。",COMMENT_RANGE_INVALID:"批注的源码区间无效。",COMMENT_NOT_FOUND:"批注不存在。",COMMENT_EDIT_FORBIDDEN:"只能编辑自己的批注。",COMMENT_DELETE_FORBIDDEN:"只能删除自己的批注。",REPLY_NOT_FOUND:"回复不存在。",REPLY_EDIT_FORBIDDEN:"只能编辑自己的回复。",REPLY_DELETE_FORBIDDEN:"只能删除自己的回复。",COMMENT_UPDATE_EMPTY:"没有可更新的批注内容。",MAIN_FILE_NOT_FOUND:"所选主文档不存在。",LATEXMKRC_DISABLED:"管理员已禁用项目级 latexmkrc。",LATEXMKRC_NOT_FOUND:"所选 latexmkrc 文件不存在。",COMPILE_ARTIFACTS_NOT_FOUND:"尚无可用的编译产物。",COMPILE_ARTIFACT_NOT_FOUND:"编译产物不存在。",ARTIFACT_PREVIEW_UNSUPPORTED:"该产物不能作为文本预览,请下载后查看。",SYNC_SOURCE_INVALID:"源码位置无效。",SOURCE_FILE_NOT_FOUND:"源码文件不存在。",SYNCTEX_NOT_AVAILABLE:"尚无可用的 SyncTeX 数据,请重新编译。",SYNC_PDF_INVALID:"PDF 位置无效。",SYNCTEX_EXTERNAL_PATH:"SyncTeX 返回了项目外部的源码路径。",COMPILE_FORBIDDEN:"你没有编译此项目的权限。",PDF_NOT_FOUND:"尚未生成 PDF。",API_NOT_FOUND:"接口不存在。",SERVER_ERROR:"服务器无法完成请求。",REQUEST_INVALID:"请求格式无效。"}},O0={historyVersionNotFound:"所选历史版本已不存在。",historyFileNotFound:"所选历史版本中没有这个文件。",historyTargetConflict:"当前恢复目标是目录或其他非普通文件路径。",historyPreviewUnsupported:"这个历史文件不能作为文本比较。",searchInvalid:"请输入有效的搜索内容。",gitUnavailable:"Git 集成功能不可用。请在宿主机安装 Git,或修正配置中的 git.binary 后重试。",formatFailed:"tex-fmt 无法格式化这段源码。",mainDocumentInvalid:"所选文件不是有效的 LaTeX 主文档。",compileSnapshotBusy:"源码尚未完成稳定保存,请稍后再试编译。"},P0={requestFailed:"网络请求失败,请检查连接后重试。",invalidResponse:"服务器返回了无效响应,请重试。"},I0={protocolUpgrade:"工作区需要更新。本地草稿已保留;请在准备好重新连接时刷新页面。"},M0={disableTitle:"禁用用户",disableDescription:"确定禁用 @{{username}} 吗?其活跃会话将结束,且无法再登录。",disableConfirm:"禁用用户",demoteTitle:"移除管理员权限",demoteDescription:"确定将 @{{username}} 降为普通用户吗?其将无法再管理用户。",demoteConfirm:"设为普通用户",denyProjectCreationTitle:"移除项目创建权限",denyProjectCreationDescription:"确定移除 @{{username}} 创建新项目的权限吗?其已有项目访问权限不受影响。",denyProjectCreationConfirm:"移除权限"},_0={cancel:"取消编译",cancelling:"正在取消…",cancelled:"编译已取消。"},$0={copyright:"© {{year}}"},z0={section:"章节",subsection:"小节",bold:"粗体",emphasis:"强调",citation:"引用文献",reference:"交叉引用",label:"标签",image:"插入图片",unordered:"无序列表",ordered:"有序列表",equation:"公式",figure:"图片环境",projectCommand:"项目命令",projectCommandArgs:"项目命令({{count}} 个参数)",projectMacro:"项目宏",expl3Command:"Expl3 项目命令",mathOperator:"项目数学算子",mathDelimiter:"项目数学定界符",projectEnvironment:"项目环境",projectFile:"项目文件",package:"宏包",documentClass:"文档类",currentFile:"当前文件",project:"项目",latex:"LaTeX",standard:"LaTeX 命令"},U0={common:D0,auth:y0,projects:b0,projectIcons:F0,users:C0,editor:w0,citationLibrary:E0,citationErrors:x0,citationLibraryHomeDescription:v0,citationLibraryActions:k0,citationLibraryPagination:A0,navigation:j0,history:S0,projectSettings:T0,git:B0,metrics:N0,tags:L0,errors:R0,apiErrors:O0,network:P0,workspaceUpdates:I0,userConfirmations:M0,compileControls:_0,footer:$0,completions:z0};Ke.use(Yu).use(rp).init({resources:{en:{translation:g0},zh:{translation:U0}},fallbackLng:"en",supportedLngs:["en","zh"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});class Yn extends Error{constructor(e,n,s=null){super(e),this.status=n,this.code=s}status;code}function Xu(t){return t instanceof Error&&t.name==="AbortError"}function Ju(t){return Xu(t)||t instanceof Yn?t:new Yn(Ke.t("network.requestFailed"),0,"NETWORK_ERROR")}function H0(t){return typeof FormData<"u"&&t instanceof FormData}async function te(t,e={}){const{suppressSessionExpired:n=!1,...s}=e,r=new Headers(s.headers);r.has("Accept-Language")||r.set("Accept-Language",Ke.resolvedLanguage?.startsWith("zh")?"zh":"en"),s.body&&!H0(s.body)&&!r.has("Content-Type")&&r.set("Content-Type","application/json");let a;try{a=await fetch(t,{...s,headers:r})}catch(l){throw Ju(l)}const o=a.headers.get("content-type")??"";let c=null;if(o.includes("application/json"))try{c=await a.json()}catch(l){throw Xu(l)?l:new Yn(Ke.t("network.invalidResponse"),a.status,"INVALID_RESPONSE")}else if(a.ok)throw new Yn(Ke.t("network.invalidResponse"),a.status,"INVALID_RESPONSE");if(!a.ok)throw a.status===401&&!n&&typeof window<"u"&&window.dispatchEvent(new Event("texlite:session-expired")),new Yn(Zu(c,a.status),a.status,Uo(c));return c}function Zu(t,e,n="errors.request"){const s=typeof t=="object"&&t!==null&&"error"in t&&typeof t.error=="string"?t.error:"",r=Uo(t);if(r){const a={AUTH_REQUIRED:"auth.sessionExpired",ADMIN_REQUIRED:"users.adminRequired",HISTORY_VERSION_NOT_FOUND:"apiErrors.historyVersionNotFound",HISTORY_FILE_NOT_FOUND:"apiErrors.historyFileNotFound",HISTORY_TARGET_CONFLICT:"apiErrors.historyTargetConflict",HISTORY_FILE_PREVIEW_UNSUPPORTED:"apiErrors.historyPreviewUnsupported",SEARCH_QUERY_INVALID:"apiErrors.searchInvalid",GIT_UNAVAILABLE:"apiErrors.gitUnavailable",FORMAT_FAILED:"apiErrors.formatFailed",PROJECT_TRANSFER_FORBIDDEN:"projects.transferForbidden",PROJECT_TRANSFER_TARGET_INVALID:"projects.transferTargetInvalid",PROJECT_TRANSFER_SELF:"projects.transferSelf",MAIN_DOCUMENT_INVALID:"apiErrors.mainDocumentInvalid",COMPILE_SNAPSHOT_BUSY:"apiErrors.compileSnapshotBusy",COMPILE_CLEAN_BUSY:"editor.cleanBusy",CITATION_INVALID:"citationErrors.invalid",CITATION_TOO_LARGE:"citationErrors.tooLarge",CITATION_NOT_FOUND:"citationErrors.notFound",CITATION_KEY_EXISTS:"citationErrors.keyExists",CITATION_TAG_NOT_FOUND:"citationErrors.tagNotFound",CITATION_CONFLICT:"citationErrors.conflict",WORD_COUNT_FAILED:"editor.wordCountFailed",WORD_COUNT_SOURCE_INVALID:"editor.wordCountSourceInvalid",WORD_COUNT_SOURCE_TOO_LARGE:"editor.wordCountSourceTooLarge",WORD_COUNT_UNAVAILABLE:"editor.wordCountUnavailable"}[r]??`errors.codes.${r}`;if(Ke.exists(a))return Ke.t(a,{status:e,...typeof t=="object"&&t!==null?t:{}})}return s||Ke.t(n,{status:e})}function Uo(t){return typeof t!="object"||t===null||!("code"in t)||typeof t.code!="string"?null:t.code}const V0=/^\/projects?\/([^/]+)\/?$/;function Dr(t){return`/project/${encodeURIComponent(t)}`}function Ts(t){const e=V0.exec(t);if(!e)return null;try{const n=decodeURIComponent(e[1]);return n&&!n.includes("/")?n:null}catch{return null}}function q0(t){return"/?"+new URLSearchParams({return:Dr(t)}).toString()}function W0(t){const e=new URLSearchParams(t).get("return");return e?Ts(e):null}function K0(t){if(!t||typeof t!="object")return!1;const e=t;return e.texliteRoute==="project"&&typeof e.projectId=="string"&&typeof e.fromDashboard=="boolean"}const G0="modulepreload",Y0=function(t){return"/"+t},Rl={},ns=function(e,n,s){let r=Promise.resolve();if(n&&n.length>0){let l=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=o?.nonce||o?.getAttribute("nonce");r=l(n.map(u=>{if(u=Y0(u),u in Rl)return;Rl[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${h}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":G0,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,D)=>{p.addEventListener("load",m),p.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return r.then(o=>{for(const c of o||[])c.status==="rejected"&&a(c.reason);return e().catch(a)})},Ji=()=>ns(()=>import("./PdfPreview-BputjYeR.js"),__vite__mapDeps([0,1,2,3])),oi=new Map,Ol=2e3;function ci(t,e={}){const n=Date.now(),s=oi.get(t);if(!e.force&&s&&n-s.createdAt<Ol)return s.preload;const r=te(`/api/projects/${t}`,{suppressSessionExpired:!0}),a=te(`/api/projects/${t}/compile/latest`,{suppressSessionExpired:!0}),o=Ji(),c={projectId:t,project:r,latestCompile:a};return oi.set(t,{preload:c,createdAt:n}),r.catch(()=>{}),Promise.all([o,a]).then(([l,u])=>{u.pdfUrl&&l.preloadPdf(u.pdfUrl,u.pdfLoadingMode??"full")}).catch(()=>{}),window.setTimeout(()=>{oi.get(t)?.preload===c&&oi.delete(t)},Ol),c}function de(t){return t instanceof Error?t.message:Ke.t("errors.generic")}function Ho({compact:t=!1}){const{i18n:e,t:n}=Qe(),s=e.resolvedLanguage?.startsWith("zh")?"zh":"en";return i.jsxs("label",{className:`language-switcher${t?" compact":""}`,title:n("common.language"),children:[i.jsx("span",{children:"文/A"}),i.jsxs("select",{value:s,"aria-label":n("common.language"),onChange:r=>{e.changeLanguage(r.target.value)},children:[i.jsx("option",{value:"en",children:n("common.languageEnglish")}),i.jsx("option",{value:"zh",children:n("common.languageChinese")})]})]})}const X0="0.8.2";function Zi({siteName:t,compact:e=!1,auth:n=!1}){return i.jsx("span",{className:`site-logo${e?" compact":""}${n?" auth-logo":""}`,children:i.jsx("img",{src:"/logo.svg",alt:t})})}function Vo(){const{t}=Qe();return i.jsx("footer",{className:"site-footer",children:i.jsxs("span",{children:[t("footer.copyright",{year:new Date().getFullYear()})," ",i.jsxs("a",{href:"https://github.com/SWUFE-DB-Group/TexLite",target:"_blank",rel:"noreferrer",children:["TexLite v",X0]})]})})}function J0({site:t,user:e,onChanged:n}){const{t:s}=Qe(),[r,a]=f.useState(""),[o,c]=f.useState(""),[l,u]=f.useState(""),[d,h]=f.useState(""),p=async m=>{if(m.preventDefault(),o!==l)return h(s("auth.mismatch"));if(o.length<t.minPasswordLength)return h(s("auth.passwordMinimum",{count:t.minPasswordLength}));try{await te("/api/me/password",{method:"PUT",body:JSON.stringify({currentPassword:r,newPassword:o})}),n({...e,mustChangePassword:!1})}catch(D){h(de(D))}};return i.jsxs("main",{className:"login-page",children:[i.jsx(Ho,{}),i.jsxs("form",{className:"login-card",onSubmit:p,children:[i.jsx(Zi,{siteName:t.siteName,auth:!0}),i.jsx("h1",{className:"sr-only",children:t.siteName}),i.jsx("p",{className:"muted",children:s("auth.firstLogin")}),i.jsxs("label",{children:[s("auth.currentPassword"),i.jsx("input",{type:"password",value:r,onChange:m=>a(m.target.value)})]}),i.jsxs("label",{children:[s("auth.newPassword"),i.jsx("input",{type:"password",minLength:t.minPasswordLength,autoComplete:"new-password",value:o,onChange:m=>c(m.target.value)}),i.jsx("small",{className:"field-hint",children:s("auth.passwordMinimum",{count:t.minPasswordLength})})]}),i.jsxs("label",{children:[s("auth.confirmPassword"),i.jsx("input",{type:"password",minLength:t.minPasswordLength,autoComplete:"new-password",value:l,onChange:m=>u(m.target.value)})]}),d&&i.jsx("p",{className:"error",children:d}),i.jsx("button",{className:"primary",children:s("auth.updatePassword")})]}),i.jsx(Vo,{})]})}function Z0({site:t,onLogin:e}){const{t:n}=Qe(),[s,r]=f.useState(""),[a,o]=f.useState(""),[c,l]=f.useState(""),u=async d=>{d.preventDefault(),l("");try{const h=await te("/api/auth/login",{method:"POST",body:JSON.stringify({username:s,password:a}),suppressSessionExpired:!0});e(h.user)}catch(h){l(de(h))}};return i.jsxs("main",{className:"login-page",children:[i.jsx(Ho,{}),i.jsxs("form",{className:"login-card",onSubmit:u,children:[i.jsx(Zi,{siteName:t.siteName,auth:!0}),i.jsx("h1",{className:"sr-only",children:t.siteName}),i.jsx("p",{className:"muted",children:n("auth.tagline")}),i.jsxs("label",{children:[n("auth.username"),i.jsx("input",{autoFocus:!0,value:s,onChange:d=>r(d.target.value)})]}),i.jsxs("label",{children:[n("auth.password"),i.jsx("input",{type:"password",value:a,onChange:d=>o(d.target.value)})]}),c&&i.jsx("p",{className:"error",children:c}),i.jsx("button",{className:"primary",type:"submit",children:n("auth.login")}),t.adminEmail&&i.jsx("small",{className:"support",children:n("auth.contact",{email:t.adminEmail})})]}),i.jsx(Vo,{})]})}var Q0=Object.defineProperty,tr=(t,e)=>Q0(t,"name",{value:e,configurable:!0}),Qu=!!(typeof window<"u"&&window.document&&window.document.createElement);function Xn(t,e,{checkForDefaultPrevented:n=!0}={}){return tr(function(r){if(t?.(r),n===!1||!r||!r.defaultPrevented)return e?.(r)},"handleEvent")}tr(Xn,"composeEventHandlers");function eg(t){if(!Qu)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}tr(eg,"getOwnerWindow");function io(t){if(!Qu)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}tr(io,"getOwnerDocument");function ed(t,e=!1){const{activeElement:n}=io(t);if(!n?.nodeName)return null;if(td(n)&&n.contentDocument)return ed(n.contentDocument.body,e);if(e){const s=n.getAttribute("aria-activedescendant");if(s){const r=io(n).getElementById(s);if(r)return r}}return n}tr(ed,"getActiveElement");function td(t){return t.tagName==="IFRAME"}tr(td,"isFrame");var tg=Object.defineProperty,qo=(t,e)=>tg(t,"name",{value:e,configurable:!0});function ao(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}qo(ao,"setRef");function nd(...t){return e=>{let n=!1;const s=t.map(r=>{const a=ao(r,e);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<s.length;r++){const a=s[r];typeof a=="function"?a():ao(t[r],null)}}}}qo(nd,"composeRefs");function nr(...t){return f.useCallback(nd(...t),t)}qo(nr,"useComposedRefs");var ng=Object.defineProperty,on=(t,e)=>ng(t,"name",{value:e,configurable:!0});function sg(t,e){const n=f.createContext(e);n.displayName=t+"Context";const s=on(a=>{const{children:o,...c}=a,l=f.useMemo(()=>c,Object.values(c));return i.jsx(n.Provider,{value:l,children:o})},"Provider");s.displayName=t+"Provider";function r(a,o={}){const{optional:c=!1}=o,l=f.useContext(n);if(l)return l;if(e!==void 0)return e;if(!c)throw new Error(`\`${a}\` must be used within \`${t}\``)}return on(r,"useContext"),[s,r]}on(sg,"createContext");function sd(t,e=[]){let n=[];function s(a,o){const c=f.createContext(o);c.displayName=a+"Context";const l=n.length;n=[...n,o];const u=on(h=>{const{scope:p,children:m,...D}=h,C=p?.[t]?.[l]||c,b=f.useMemo(()=>D,Object.values(D));return i.jsx(C.Provider,{value:b,children:m})},"Provider");u.displayName=a+"Provider";function d(h,p,m={}){const{optional:D=!1}=m,C=p?.[t]?.[l]||c,b=f.useContext(C);if(b)return b;if(o!==void 0)return o;if(!D)throw new Error(`\`${h}\` must be used within \`${a}\``)}return on(d,"useContext"),[u,d]}on(s,"createContext");const r=on(()=>{const a=n.map(o=>f.createContext(o));return on(function(c){const l=c?.[t]||a;return f.useMemo(()=>({[`__scope${t}`]:{...c,[t]:l}}),[c,l])},"useScope")},"createScope");return r.scopeName=t,[s,rd(r,...e)]}on(sd,"createContextScope");function rd(...t){const e=t[0];if(t.length===1)return e;const n=on(()=>{const s=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return on(function(a){const o=s.reduce((c,{useScope:l,scopeName:u})=>{const h=l(a)[`__scope${u}`];return{...c,...h}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}on(rd,"composeContextScopes");var Jn=globalThis?.document?f.useLayoutEffect:()=>{},rg=Object.defineProperty,ig=(t,e)=>rg(t,"name",{value:e,configurable:!0}),ag=Ur[" useId ".trim().toString()]||(()=>{}),og=0;function Di(t){const[e,n]=f.useState(ag());return Jn(()=>{t||n(s=>s??String(og++))},[t]),t||(e?`radix-${e}`:"")}ig(Di,"useId");var cg=Object.defineProperty,lg=(t,e)=>cg(t,"name",{value:e,configurable:!0}),Pl=Ur[" useEffectEvent ".trim().toString()],Il=Ur[" useInsertionEffect ".trim().toString()];function id(t){if(typeof Pl=="function")return Pl(t);const e=f.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Il=="function"?Il(()=>{e.current=t}):Jn(()=>{e.current=t}),f.useMemo(()=>((...n)=>e.current?.(...n)),[])}lg(id,"useEffectEvent");var ug=Object.defineProperty,Hr=(t,e)=>ug(t,"name",{value:e,configurable:!0}),dg=Ur[" useInsertionEffect ".trim().toString()]||Jn;function ad({prop:t,defaultProp:e,onChange:n=Hr(()=>{},"onChange"),caller:s}){const[r,a,o]=od({defaultProp:e,onChange:n}),c=t!==void 0,l=c?t:r,u=f.useCallback(d=>{if(c){const h=cd(d)?d(t):d;h!==t&&o.current?.(h)}else a(d)},[c,t,a,o]);return[l,u]}Hr(ad,"useControllableState");function od({defaultProp:t,onChange:e}){const[n,s]=f.useState(t),r=f.useRef(n),a=f.useRef(e);return dg(()=>{a.current=e},[e]),f.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,s,a]}Hr(od,"useUncontrolledState");function cd(t){return typeof t=="function"}Hr(cd,"isFunction");var Ml=Symbol("RADIX:SYNC_STATE");function hg(t,e,n,s){const{prop:r,defaultProp:a,onChange:o,caller:c}=e,l=r!==void 0,u=id(o),d=[{...n,state:a}];s&&d.push(s);const[h,p]=f.useReducer((b,w)=>{if(w.type===Ml)return{...b,state:w.state};const x=t(b,w);return l&&!Object.is(x.state,b.state)&&u(x.state),x},...d),m=h.state,D=f.useRef(m);f.useEffect(()=>{D.current!==m&&(D.current=m,l||u(m))},[m,D,l]);const C=f.useMemo(()=>r!==void 0?{...h,state:r}:h,[h,r]);return f.useEffect(()=>{l&&!Object.is(r,h.state)&&p({type:Ml,state:r})},[r,h.state,l]),[C,p]}Hr(hg,"useControllableStateReducer");var fg=Object.defineProperty,Dn=(t,e)=>fg(t,"name",{value:e,configurable:!0});function Wo(t){const e=f.forwardRef((n,s)=>{let{children:r,...a}=n,o=null,c=!1;const l=[];oo(r)&&typeof li=="function"&&(r=li(r._payload)),f.Children.forEach(r,p=>{if(hd(p)){c=!0;const m=p;let D="child"in m.props?m.props.child:m.props.children;oo(D)&&typeof li=="function"&&(D=li(D._payload)),o=pg(m,D),l.push(o?.props?.children)}else l.push(p)}),o?o=f.cloneElement(o,void 0,l):!c&&f.Children.count(r)===1&&f.isValidElement(r)&&(o=r);const u=o?dd(o):void 0,d=nr(s,u);if(!o){if(r||r===0)throw new Error(c?yg(t):Dg(t));return r}const h=ud(a,o.props??{});return o.type!==f.Fragment&&(h.ref=s?d:u),f.cloneElement(o,h)});return e.displayName=`${t}.Slot`,e}Dn(Wo,"createSlot");var ld=Symbol.for("radix.slottable");function mg(t){const e=Dn(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=ld,e}Dn(mg,"createSlottable");var pg=Dn((t,e)=>{if("child"in t.props){const n=t.props.child;return f.isValidElement(n)?f.cloneElement(n,void 0,t.props.children(n.props.children)):null}return f.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function ud(t,e){const n={...e};for(const s in e){const r=t[s],a=e[s];/^on[A-Z]/.test(s)?r&&a?n[s]=(...c)=>{const l=a(...c);return r(...c),l}:r&&(n[s]=r):s==="style"?n[s]={...r,...a}:s==="className"&&(n[s]=[r,a].filter(Boolean).join(" "))}return{...t,...n}}Dn(ud,"mergeProps");function dd(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Dn(dd,"getElementRef");function hd(t){return f.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ld}Dn(hd,"isSlottable");var gg=Symbol.for("react.lazy");function oo(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===gg&&"_payload"in t&&fd(t._payload)}Dn(oo,"isLazyComponent");function fd(t){return typeof t=="object"&&t!==null&&"then"in t}Dn(fd,"isPromiseLike");var Dg=Dn(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),yg=Dn(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),li=Ur[" use ".trim().toString()],bg=Object.defineProperty,Fg=(t,e)=>bg(t,"name",{value:e,configurable:!0}),Cg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ds=Cg.reduce((t,e)=>{const n=Wo(`Primitive.${e}`),s=f.forwardRef((r,a)=>{const{asChild:o,...c}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(l,{...c,ref:a})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function md(t,e){t&&Uu.flushSync(()=>t.dispatchEvent(e))}Fg(md,"dispatchDiscreteCustomEvent");var wg=Object.defineProperty,Eg=(t,e)=>wg(t,"name",{value:e,configurable:!0});function qs(t){const e=f.useRef(t);return f.useEffect(()=>{e.current=t}),f.useMemo(()=>((...n)=>e.current?.(...n)),[])}Eg(qs,"useCallbackRef");var xg=Object.defineProperty,Rt=(t,e)=>xg(t,"name",{value:e,configurable:!0}),co="dismissableLayer.update",vg="dismissableLayer.pointerDownOutside",kg="dismissableLayer.focusOutside",_l,pd=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ag=f.forwardRef(Rt(function(e,n){const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:l,onDismiss:u,...d}=e,h=f.useContext(pd),[p,m]=f.useState(null),D=p?.ownerDocument??globalThis?.document,[,C]=f.useState({}),b=nr(n,m),w=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),N=x?w.indexOf(x):-1,L=p?w.indexOf(p):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,_=L>=N,$=f.useRef(!1),O=Dd(M=>{o?.(M),l?.(M),M.defaultPrevented||u?.()},{ownerDocument:D,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:$,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:f.useCallback(M=>{if(!(M instanceof Node))return!1;const K=[...h.branches].some(R=>R.contains(M));return _&&!K},[h.branches,_])}),J=yd(M=>{if(r&&$.current)return;const K=M.target;[...h.branches].some(A=>A.contains(K))||(c?.(M),l?.(M),M.defaultPrevented||u?.())},D),z=p?L===w.length-1:!1,ae=qs(M=>{M.key==="Escape"&&(a?.(M),!M.defaultPrevented&&u&&(M.preventDefault(),u()))});return f.useEffect(()=>{if(z)return D.addEventListener("keydown",ae,{capture:!0}),()=>D.removeEventListener("keydown",ae,{capture:!0})},[D,z,ae]),f.useEffect(()=>{if(p)return s&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(_l=D.body.style.pointerEvents,D.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),lo(),()=>{s&&(h.layersWithOutsidePointerEventsDisabled.delete(p),h.layersWithOutsidePointerEventsDisabled.size===0&&(D.body.style.pointerEvents=_l))}},[p,D,s,h]),f.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),lo())},[p,h]),f.useEffect(()=>{const M=Rt(()=>C({}),"handleUpdate");return document.addEventListener(co,M),()=>document.removeEventListener(co,M)},[]),i.jsx(Ds.div,{...d,ref:b,style:{pointerEvents:T?_?"auto":"none":void 0,...e.style},onFocusCapture:Xn(e.onFocusCapture,J.onFocusCapture),onBlurCapture:Xn(e.onBlurCapture,J.onBlurCapture),onPointerDownCapture:Xn(e.onPointerDownCapture,O.onPointerDownCapture)})},"DismissableLayer"));function gd(){const t=f.useContext(pd),[e,n]=f.useState(null);return f.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}Rt(gd,"useDismissableLayerSurface");var jg=Rt(()=>!0,"IS_TRUE");function Dd(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=jg}=e,c=qs(t),l=f.useRef(!1),u=f.useRef(!1),d=f.useRef(new Map),h=f.useRef(()=>{});return f.useEffect(()=>{function p(){u.current=!1,r.current=!1,d.current.clear()}Rt(p,"resetOutsideInteraction");function m(){return Array.from(d.current.values()).some(Boolean)}Rt(m,"isOutsideInteractionIntercepted");function D(N){if(!u.current)return;const L=N.target;L instanceof Node&&[...a].some(_=>_.contains(L))||d.current.set(N.type,!0),N.type==="click"&&window.setTimeout(()=>{u.current&&h.current()},0)}Rt(D,"handleInteractionCapture");function C(N){u.current&&d.current.set(N.type,!1)}Rt(C,"handleInteractionBubble");const b=Rt(N=>{if(N.target&&!l.current){let L=function(){n.removeEventListener("click",h.current);const _=m();p(),_||Ko(vg,c,T,{discrete:!0})};if(Rt(L,"handleAndDispatchPointerDownOutsideEvent"),!o(N.target)){n.removeEventListener("click",h.current),p(),l.current=!1;return}const T={originalEvent:N};u.current=!0,r.current=s&&N.button===0,d.current.clear(),!s||N.button!==0?L():(n.removeEventListener("click",h.current),h.current=L,n.addEventListener("click",h.current,{once:!0}))}else n.removeEventListener("click",h.current),p();l.current=!1},"handlePointerDown"),w=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const N of w)n.addEventListener(N,D,!0),n.addEventListener(N,C);const x=window.setTimeout(()=>{n.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(x),n.removeEventListener("pointerdown",b),n.removeEventListener("click",h.current);for(const N of w)n.removeEventListener(N,D,!0),n.removeEventListener(N,C)}},[n,c,s,r,a,o]),{onPointerDownCapture:Rt(()=>l.current=!0,"onPointerDownCapture")}}Rt(Dd,"usePointerDownOutside");function yd(t,e=globalThis?.document){const n=qs(t),s=f.useRef(!1);return f.useEffect(()=>{const r=Rt(a=>{a.target&&!s.current&&Ko(kg,n,{originalEvent:a},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:Rt(()=>s.current=!0,"onFocusCapture"),onBlurCapture:Rt(()=>s.current=!1,"onBlurCapture")}}Rt(yd,"useFocusOutside");function lo(){const t=new CustomEvent(co);document.dispatchEvent(t)}Rt(lo,"dispatchUpdate");function Ko(t,e,n,{discrete:s}){const r=n.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),s?md(r,a):r.dispatchEvent(a)}Rt(Ko,"handleAndDispatchCustomEvent");var Sg=Object.defineProperty,Wt=(t,e)=>Sg(t,"name",{value:e,configurable:!0}),Na="focusScope.autoFocusOnMount",La="focusScope.autoFocusOnUnmount",$l={bubbles:!1,cancelable:!0},Tg=f.forwardRef(Wt(function(e,n){const{loop:s=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...c}=e,[l,u]=f.useState(null),d=qs(a),h=qs(o),p=f.useRef(null),m=nr(n,u),D=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let b=function(L){if(D.paused||!l)return;const T=L.target;l.contains(T)?p.current=T:On(p.current,{select:!0})},w=function(L){if(D.paused||!l)return;const T=L.relatedTarget;T!==null&&(l.contains(T)||On(p.current,{select:!0}))},x=function(L){if(document.activeElement===document.body)for(const _ of L)_.removedNodes.length>0&&On(l)};Wt(b,"handleFocusIn"),Wt(w,"handleFocusOut"),Wt(x,"handleMutations"),document.addEventListener("focusin",b),document.addEventListener("focusout",w);const N=new MutationObserver(x);return l&&N.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",w),N.disconnect()}}},[r,l,D.paused]),f.useEffect(()=>{if(l){zl.add(D);const b=document.activeElement;if(!l.contains(b)){const x=new CustomEvent(Na,$l);l.addEventListener(Na,d),l.dispatchEvent(x),x.defaultPrevented||(bd(xd(Go(l)),{select:!0}),document.activeElement===b&&On(l))}return()=>{l.removeEventListener(Na,d),setTimeout(()=>{const x=new CustomEvent(La,$l);l.addEventListener(La,h),l.dispatchEvent(x),x.defaultPrevented||On(b??document.body,{select:!0}),l.removeEventListener(La,h),zl.remove(D)},0)}}},[l,d,h,D]);const C=f.useCallback(b=>{if(!s&&!r||D.paused)return;const w=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,x=document.activeElement;if(w&&x){const N=b.currentTarget,[L,T]=Fd(N);L&&T?!b.shiftKey&&x===T?(b.preventDefault(),s&&On(L,{select:!0})):b.shiftKey&&x===L&&(b.preventDefault(),s&&On(T,{select:!0})):x===N&&b.preventDefault()}},[s,r,D.paused]);return i.jsx(Ds.div,{tabIndex:-1,...c,ref:m,onKeyDown:C})},"FocusScope"));function bd(t,{select:e=!1}={}){const n=document.activeElement;for(const s of t)if(On(s,{select:e}),document.activeElement!==n)return}Wt(bd,"focusFirst");function Fd(t){const e=Go(t),n=uo(e,t),s=uo(e.reverse(),t);return[n,s]}Wt(Fd,"getTabbableEdges");function Go(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Wt(s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}Wt(Go,"getTabbableCandidates");function uo(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const s of t)if(!(n?!s.checkVisibility({checkVisibilityCSS:!0}):Cd(s,{upTo:e})))return s}Wt(uo,"findVisible");function Cd(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Wt(Cd,"isHidden");function wd(t){return t instanceof HTMLInputElement&&"select"in t}Wt(wd,"isSelectableInput");function On(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&wd(t)&&e&&t.select()}}Wt(On,"focus");var zl=Ed();function Ed(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=ho(t,e),t.unshift(e)},remove(e){t=ho(t,e),t[0]?.resume()}}}Wt(Ed,"createFocusScopesStack");function ho(t,e){const n=[...t],s=n.indexOf(e);return s!==-1&&n.splice(s,1),n}Wt(ho,"arrayRemove");function xd(t){return t.filter(e=>e.tagName!=="A")}Wt(xd,"removeLinks");var Bg=Object.defineProperty,Ng=(t,e)=>Bg(t,"name",{value:e,configurable:!0}),Lg=f.forwardRef(Ng(function(e,n){const{container:s,...r}=e,[a,o]=f.useState(!1);Jn(()=>o(!0),[]);const c=s||a&&globalThis?.document?.body;return c?Uu.createPortal(i.jsx(Ds.div,{...r,ref:n}),c):null},"Portal")),Rg=Object.defineProperty,Mn=(t,e)=>Rg(t,"name",{value:e,configurable:!0});function vd(t,e){return f.useReducer((n,s)=>e[n][s]??n,t)}Mn(vd,"useStateMachine");var Yo=Mn(t=>{const{present:e,children:n}=t,s=kd(e),r=typeof n=="function"?n({present:s.isPresent}):f.Children.only(n),a=Ad(s.ref,jd(r));return typeof n=="function"||s.isPresent?f.cloneElement(r,{ref:a}):null},"Presence");function kd(t){const[e,n]=f.useState(),s=f.useRef(null),r=f.useRef(t),a=f.useRef("none"),o=f.useRef(void 0),c=t?"mounted":"unmounted",[l,u]=vd(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{l==="mounted"?(a.current=o.current??Bs(s.current),o.current=void 0):a.current="none"},[l]),Jn(()=>{const d=s.current,h=r.current;if(h!==t){const m=a.current,D=Bs(d);t?(o.current=D,u("MOUNT")):D==="none"||d?.display==="none"?u("UNMOUNT"):u(h&&m!==D?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,u]),Jn(()=>{if(e){let d;const h=e.ownerDocument.defaultView??window,p=Mn(D=>{const b=Bs(s.current).includes(CSS.escape(D.animationName));if(D.target===e&&b&&(u("ANIMATION_END"),!r.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",d=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},"handleAnimationEnd"),m=Mn(D=>{D.target===e&&(a.current=Bs(s.current))},"handleAnimationStart");return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",p),e.addEventListener("animationend",p),()=>{h.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",p),e.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(d=>{if(d){const h=getComputedStyle(d);s.current=h,o.current=Bs(h)}else s.current=null;n(d)},[])}}Mn(kd,"usePresence");function fo(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Mn(fo,"setRef");function Ad(...t){const e=f.useRef(t);return e.current=t,f.useCallback(n=>{const s=e.current;let r=!1;const a=s.map(o=>{const c=fo(o,n);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let o=0;o<a.length;o++){const c=a[o];typeof c=="function"?c():fo(s[o],null)}}},[])}Mn(Ad,"useStableComposedRefs");function Bs(t){return t?.animationName||"none"}Mn(Bs,"getAnimationName");function jd(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Mn(jd,"getElementRef");var Og=Object.defineProperty,Xo=(t,e)=>Og(t,"name",{value:e,configurable:!0}),ui=0,ks=null;function Pg(t){return Jo(),t.children}Xo(Pg,"FocusGuards");function Jo(){f.useEffect(()=>{ks||(ks={start:mo(),end:mo()});const{start:t,end:e}=ks;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),ui++,()=>{ui===1&&(ks?.start.remove(),ks?.end.remove(),ks=null),ui=Math.max(0,ui-1)}},[])}Xo(Jo,"useFocusGuards");function mo(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}Xo(mo,"createFocusGuard");var Ig=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},As=new WeakMap,di=new WeakMap,hi={},Ra=0,Sd=function(t){return t&&(t.host||Sd(t.parentNode))},Mg=function(t,e){return e.map(function(n){if(t.contains(n))return n;var s=Sd(n);return s&&t.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},_g=function(t,e,n,s){var r=Mg(e,Array.isArray(t)?t:[t]);hi[n]||(hi[n]=new WeakMap);var a=hi[n],o=[],c=new Set,l=new Set(r),u=function(h){!h||c.has(h)||(c.add(h),u(h.parentNode))};r.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(c.has(p))d(p);else try{var m=p.getAttribute(s),D=m!==null&&m!=="false",C=(As.get(p)||0)+1,b=(a.get(p)||0)+1;As.set(p,C),a.set(p,b),o.push(p),C===1&&D&&di.set(p,!0),b===1&&p.setAttribute(n,"true"),D||p.setAttribute(s,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return d(e),c.clear(),Ra++,function(){o.forEach(function(h){var p=As.get(h)-1,m=a.get(h)-1;As.set(h,p),a.set(h,m),p||(di.has(h)||h.removeAttribute(s),di.delete(h)),m||h.removeAttribute(n)}),Ra--,Ra||(As=new WeakMap,As=new WeakMap,di=new WeakMap,hi={})}},$g=function(t,e,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),r=Ig(t);return r?(s.push.apply(s,Array.from(r.querySelectorAll("[aria-live], script"))),_g(s,r,n,"aria-hidden")):function(){return null}},zg=Object.defineProperty,un=(t,e)=>zg(t,"name",{value:e,configurable:!0}),Zo="Dialog",[Td,Tw]=sd(Zo),[Ug,vn]=Td(Zo),Hg=un(t=>{const{__scopeDialog:e,children:n,open:s,defaultOpen:r,onOpenChange:a,modal:o=!0}=t,c=f.useRef(null),l=f.useRef(null),[u,d]=ad({prop:s,defaultProp:r??!1,onChange:a,caller:Zo}),[h,p]=f.useState(0),[m,D]=f.useState(0);return i.jsx(Ug,{scope:e,triggerRef:c,contentRef:l,contentId:Di(),titleId:Di(),descriptionId:Di(),titlePresent:h>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:D,open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(C=>!C),[d]),modal:o,children:n})},"Dialog"),Bd="DialogPortal",[Vg,Nd]=Td(Bd,{forceMount:void 0}),qg=un(t=>{const{__scopeDialog:e,forceMount:n,children:s,container:r}=t,a=vn(Bd,e);return i.jsx(Vg,{scope:e,forceMount:n,children:f.Children.map(s,o=>i.jsx(Yo,{present:n||a.open,children:i.jsx(Lg,{asChild:!0,container:r,children:o})}))})},"DialogPortal"),po="DialogOverlay",Wg=f.forwardRef(un(function(e,n){const s=Nd(po,e.__scopeDialog),{forceMount:r=s.forceMount,...a}=e,o=vn(po,e.__scopeDialog);return o.modal?i.jsx(Yo,{present:r||o.open,children:i.jsx(Gg,{...a,ref:n})}):null},"DialogOverlay")),Kg=Wo("DialogOverlay.RemoveScroll"),Gg=f.forwardRef(un(function(e,n){const{__scopeDialog:s,...r}=e,a=vn(po,s),o=gd(),c=nr(n,o);return i.jsx(ip,{as:Kg,allowPinchZoom:!0,shards:[a.contentRef],children:i.jsx(Ds.div,{"data-state":Qo(a.open),...r,ref:c,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),jr="DialogContent",Yg=f.forwardRef(un(function(e,n){const s=Nd(jr,e.__scopeDialog),{forceMount:r=s.forceMount,...a}=e,o=vn(jr,e.__scopeDialog);return i.jsx(Yo,{present:r||o.open,children:o.modal?i.jsx(Xg,{...a,ref:n}):i.jsx(Jg,{...a,ref:n})})},"DialogContent")),Xg=f.forwardRef(un(function(e,n){const s=vn(jr,e.__scopeDialog),r=f.useRef(null),a=nr(n,s.contentRef,r);return f.useEffect(()=>{const o=r.current;if(o)return $g(o)},[]),i.jsx(Ld,{...e,ref:a,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:Xn(e.onCloseAutoFocus,o=>{o.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:Xn(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&o.preventDefault()}),onFocusOutside:Xn(e.onFocusOutside,o=>o.preventDefault())})},"DialogContentModal")),Jg=f.forwardRef(un(function(e,n){const s=vn(jr,e.__scopeDialog),r=f.useRef(!1),a=f.useRef(!1);return i.jsx(Ld,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||s.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=o.target;s.triggerRef.current?.contains(c)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})},"DialogContentNonModal")),Ld=f.forwardRef(un(function(e,n){const{__scopeDialog:s,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...c}=e,l=vn(jr,s);return Jo(),i.jsx(i.Fragment,{children:i.jsx(Tg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:i.jsx(Ag,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Qo(l.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),Zg="DialogTitle",Qg=f.forwardRef(un(function(e,n){const{__scopeDialog:s,...r}=e,a=vn(Zg,s),{setTitleCount:o}=a;return Jn(()=>(o(c=>c+1),()=>o(c=>c-1)),[o]),i.jsx(Ds.h2,{id:a.titleId,...r,ref:n})},"DialogTitle")),eD="DialogDescription",tD=f.forwardRef(un(function(e,n){const{__scopeDialog:s,...r}=e,a=vn(eD,s),{setDescriptionCount:o}=a;return Jn(()=>(o(c=>c+1),()=>o(c=>c-1)),[o]),i.jsx(Ds.p,{id:a.descriptionId,...r,ref:n})},"DialogDescription")),nD="DialogClose",sD=f.forwardRef(un(function(e,n){const{__scopeDialog:s,...r}=e,a=vn(nD,s);return i.jsx(Ds.button,{type:"button",...r,ref:n,onClick:Xn(e.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function Qo(t){return t?"open":"closed"}un(Qo,"getState");const rD=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rd=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();var iD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const aD=f.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:a,iconNode:o,...c},l)=>f.createElement("svg",{ref:l,...iD,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:Rd("lucide",r),...c},[...o.map(([u,d])=>f.createElement(u,d)),...Array.isArray(a)?a:[a]]));const B=(t,e)=>{const n=f.forwardRef(({className:s,...r},a)=>f.createElement(aD,{ref:a,iconNode:e,className:Rd(`lucide-${rD(t)}`,s),...r}));return n.displayName=`${t}`,n};const oD=B("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const Od=B("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const cD=B("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);const ec=B("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);const lD=B("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);const go=B("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Pd=B("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);const uD=B("Atom",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]]);const dD=B("Beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);const cs=B("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);const Qi=B("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const hD=B("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);const fD=B("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const mD=B("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const pD=B("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);const gD=B("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);const DD=B("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);const Id=B("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);const yD=B("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);const bD=B("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);const FD=B("ChartNoAxesCombined",[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]]);const CD=B("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);const wD=B("ChartScatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]);const Zn=B("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Md=B("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Er=B("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Sr=B("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const ED=B("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);const xD=B("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);const vD=B("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const _d=B("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const tc=B("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const kD=B("CircuitBoard",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);const AD=B("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);const jD=B("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);const Ul=B("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);const SD=B("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const TD=B("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);const BD=B("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const ND=B("Dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);const LD=B("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);const Tr=B("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);const RD=B("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const OD=B("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const Do=B("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);const yo=B("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);const PD=B("FileChartColumnIncreasing",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]]);const ID=B("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);const MD=B("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);const _D=B("FilePlus2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]]);const $d=B("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);const $D=B("FileSpreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);const zD=B("FileStack",[["path",{d:"M21 7h-3a2 2 0 0 1-2-2V2",key:"9rb54x"}],["path",{d:"M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17Z",key:"1059l0"}],["path",{d:"M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15",key:"16874u"}],["path",{d:"M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11",key:"k2ox98"}]]);const hs=B("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const UD=B("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);const HD=B("FolderArchive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]);const VD=B("FolderCheck",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);const qD=B("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);const WD=B("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);const ki=B("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const zd=B("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const KD=B("FolderX",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]);const Ud=B("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Hd=B("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);const GD=B("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);const Vd=B("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const YD=B("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);const bo=B("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const XD=B("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const JD=B("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const ZD=B("Import",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]]);const Hl=B("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);const QD=B("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);const e1=B("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);const t1=B("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);const n1=B("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);const qd=B("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);const Ze=B("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const s1=B("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);const nc=B("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const r1=B("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);const Vl=B("Move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);const i1=B("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);const a1=B("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);const o1=B("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);const c1=B("NotepadText",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]);const Wd=B("PackageOpen",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);const Kd=B("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);const l1=B("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);const u1=B("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const d1=B("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);const h1=B("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);const f1=B("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);const m1=B("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);const Ai=B("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const p1=B("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const xr=B("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const g1=B("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]);const D1=B("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);const Fo=B("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const y1=B("Regex",[["path",{d:"M17 3v10",key:"15fgeh"}],["path",{d:"m12.67 5.5 8.66 5",key:"1gpheq"}],["path",{d:"m12.67 10.5 8.66-5",key:"1dkfa6"}],["path",{d:"M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z",key:"swwfx4"}]]);const b1=B("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);const F1=B("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);const C1=B("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const ji=B("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const Si=B("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);const sc=B("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const w1=B("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const E1=B("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);const Co=B("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Gd=B("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const x1=B("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);const Yd=B("Sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);const Xd=B("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const v1=B("SpellCheck2",[["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M4 21c1.1 0 1.1-1 2.3-1s1.1 1 2.3 1c1.1 0 1.1-1 2.3-1 1.1 0 1.1 1 2.3 1 1.1 0 1.1-1 2.3-1 1.1 0 1.1 1 2.3 1 1.1 0 1.1-1 2.3-1",key:"8mdmtu"}]]);const k1=B("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);const Ti=B("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);const A1=B("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);const j1=B("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);const S1=B("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);const T1=B("TestTubeDiagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]]);const B1=B("TestTubes",[["path",{d:"M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2",key:"1hjrqt"}],["path",{d:"M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2",key:"16lc8n"}],["path",{d:"M3 2h7",key:"7s29d5"}],["path",{d:"M14 2h7",key:"7sicin"}],["path",{d:"M9 16H4",key:"1bfye3"}],["path",{d:"M20 16h-5",key:"ddnjpe"}]]);const nn=B("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const en=B("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const wo=B("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);const N1=B("University",[["circle",{cx:"12",cy:"10",r:"1",key:"1gnqs8"}],["path",{d:"M22 20V8h-4l-6-4-6 4H2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2",key:"1qj5sn"}],["path",{d:"M6 17v.01",key:"roodi6"}],["path",{d:"M6 13v.01",key:"67c122"}],["path",{d:"M18 17v.01",key:"12ktxm"}],["path",{d:"M18 13v.01",key:"tn1rt1"}],["path",{d:"M14 22v-5a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5",key:"11g7fi"}]]);const Bi=B("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const L1=B("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);const Eo=B("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);const R1=B("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);const O1=B("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);const Br=B("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const P1=B("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);const I1=B("WrapText",[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["path",{d:"M3 12h15a3 3 0 1 1 0 6h-4",key:"1cl7v7"}],["polyline",{points:"16 16 14 18 16 20",key:"1jznyi"}],["line",{x1:"3",x2:"10",y1:"18",y2:"18",key:"1h33wv"}]]);const Ht=B("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ft({open:t,title:e,description:n,onOpenChange:s,children:r,footer:a,wide:o,extraWide:c,className:l}){const{t:u}=Qe();return i.jsx(Hg,{open:t,onOpenChange:s,children:i.jsxs(qg,{children:[i.jsx(Wg,{className:"dialog-overlay"}),i.jsxs(Yg,{className:`dialog-content${o?" dialog-wide":""}${c?" dialog-extra-wide":""}${l?` ${l}`:""}`,children:[i.jsxs("div",{className:"dialog-header",children:[i.jsxs("div",{children:[i.jsx(Qg,{children:e}),n&&i.jsx(tD,{children:n})]}),i.jsx(sD,{className:"dialog-close","aria-label":u("common.close"),children:"×"})]}),i.jsx("div",{className:"dialog-body",children:r}),a&&i.jsx("div",{className:"dialog-footer",children:a})]})]})})}function _n({open:t,title:e,description:n,confirmLabel:s,danger:r,onCancel:a,onConfirm:o,error:c,busy:l=!1}){const{t:u}=Qe();return i.jsx(ft,{open:t,title:e,description:n,onOpenChange:d=>{!d&&!l&&a()},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{disabled:l,onClick:a,children:u("common.cancel")}),i.jsxs("button",{className:r?"danger":"primary",disabled:l,"aria-busy":l,onClick:o,children:[l&&i.jsx(Ze,{className:"spin",size:14}),s??u("common.remove")]})]}),children:i.jsxs(i.Fragment,{children:[c&&i.jsx("p",{className:"error dialog-error",children:c}),i.jsx("div",{})]})})}var Oa,ql;function M1(){if(ql)return Oa;ql=1;var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r=(g,E)=>t(g,"name",{value:E,configurable:!0}),a=(g,E)=>{for(var y in E)t(g,y,{get:E[y],enumerable:!0})},o=(g,E,y,H)=>{if(E&&typeof E=="object"||typeof E=="function")for(let q of n(E))!s.call(g,q)&&q!==y&&t(g,q,{get:()=>E[q],enumerable:!(H=e(E,q))||H.enumerable});return g},c=g=>o(t({},"__esModule",{value:!0}),g),l={};a(l,{getEntries:()=>ut,tidy:()=>Ae}),Oa=c(l);var u=class{constructor(g=[]){this.children=g,this.type="root"}static{r(this,"RootNode")}},d=class{constructor(g,E){this.parent=g,this.text=E,this.type="text",g.children.push(this)}static{r(this,"TextNode")}},h=class{constructor(g){this.parent=g,this.type="block",this.command="",g.children.push(this)}static{r(this,"BlockNode")}},p=class{constructor(g,E,y,H){this.parent=g,this.raw=E,this.braces=y,this.parens=H,this.type="comment",g.block=this}static{r(this,"CommentNode")}},m=class{constructor(g,E,y,H){this.parent=g,this.raw=E,this.braces=y,this.parens=H,this.type="preamble",g.block=this}static{r(this,"PreambleNode")}},D=class{constructor(g,E,y,H){this.parent=g,this.raw=E,this.braces=y,this.parens=H,this.type="string",g.block=this}static{r(this,"StringNode")}},C=class{constructor(g,E){this.parent=g,this.wrapType=E,this.type="entry",g.block=this,this.fields=[]}static{r(this,"EntryNode")}},b=class{constructor(g,E=""){this.parent=g,this.name=E,this.type="field",this.value=new w(this)}static{r(this,"FieldNode")}},w=class{constructor(g){this.parent=g,this.type="concat",this.canConsumeValue=!0,this.concat=[]}static{r(this,"ConcatNode")}},x=class{constructor(g,E){this.parent=g,this.value=E,this.type="literal",g.concat.push(this)}static{r(this,"LiteralNode")}},N=class{constructor(g){this.parent=g,this.type="braced",this.value="",this.depth=0,g.concat.push(this)}static{r(this,"BracedNode")}},L=class{constructor(g){this.parent=g,this.type="quoted",this.value="",this.depth=0,g.concat.push(this)}static{r(this,"QuotedNode")}};function T(g){const E=new u;let y=E,H=1,q=0;for(let ee=0;ee<g.length;ee++){const V=g[ee]??"",fe=g[ee-1]??"";switch(V===`
|
|
15
|
-
`&&(H++,q=0),q++,y.type){case"root":{y=V==="@"?new h(y):new d(y,V);break}case"text":{V==="@"&&/[\s\r\n}]/.test(fe)?y=new h(y.parent):y.text+=V;break}case"block":{if(V==="@"){const xe=y.parent.children[y.parent.children.length-2];xe?.type==="text"?xe.text+=`@${y.command}`:(y.parent.children.pop(),new d(y.parent,`@${y.command}`),y.parent.children.push(y)),y.command=""}else if(V==="{"||V==="("){const xe=y.command.trim();if(xe===""||/\s/.test(xe))y.parent.children.pop(),y=new d(y.parent,`@${y.command}${V}`);else{y.command=xe;const qe=y.command.toLowerCase(),[Oe,Se]=V==="{"?[1,0]:[0,1],st=`@${qe}${V}`;switch(qe){case"string":y=new D(y,st,Oe,Se);break;case"preamble":y=new m(y,st,Oe,Se);break;case"comment":y=new p(y,st,Oe,Se);break;default:y=new C(y,V);break}}}else V.match(/[=#,})[\]]/)?(y.parent.children.pop(),y=new d(y.parent,`@${y.command}${V}`)):y.command+=V;break}case"comment":case"string":case"preamble":V==="{"?y.braces++:V==="}"?y.braces--:V==="("?y.parens++:V===")"&&y.parens--,y.raw+=V,y.braces===0&&y.parens===0&&(y=y.parent.parent);break;case"entry":{if(_(V))y.key&&(y.keyEnded=!0);else if(V===",")y=new b(y);else if(y.wrapType==="{"&&V==="}"||y.wrapType==="("&&V===")")y=y.parent.parent;else if(V==="="&&y.key&&O(y.key)){const xe=new b(y,y.key);y.fields.push(xe),y.key=void 0,y=xe.value}else{if(y.keyEnded)throw new J(g,y,ee,H,q,"The entry key cannot contain whitespace");if($(V))y.key=(y.key??"")+V;else throw new J(g,y,ee,H,q,`The entry key cannot contain the character (${V})`)}break}case"field":{if(V==="}"||V===")")y.name=y.name.trim(),y=y.parent.parent.parent;else if(V==="=")y.name=y.name.trim(),y=y.value;else if(V===",")y.name=y.name.trim(),y=new b(y.parent);else if(O(V))y.name?y.name+=V:_(V)||(y.parent.fields.push(y),y.name=V);else throw new J(g,y,ee,H,q);break}case"concat":{if(_(V))break;if(y.canConsumeValue){if(/[#=,}()[\]]/.test(V))throw new J(g,y,ee,H,q);y.canConsumeValue=!1,V==="{"?y=new N(y):V==='"'?y=new L(y):y=new x(y,V)}else if(V===",")y=new b(y.parent.parent);else if(V==="}"||V===")")y=y.parent.parent.parent.parent;else if(V==="#")y.canConsumeValue=!0;else throw new J(g,y,ee,H,q);break}case"literal":_(V)?y=y.parent:V===","?y=new b(y.parent.parent.parent):V==="}"?y=y.parent.parent.parent.parent.parent:V==="#"?(y=y.parent,y.canConsumeValue=!0):y.value+=V;break;case"braced":if(V==="}"&&y.depth===0){y=y.parent;break}V==="{"?y.depth++:V==="}"&&y.depth--,y.value+=V;break;case"quoted":if(V==='"'&&y.depth===0){y=y.parent;break}if(V==="{")y.depth++;else if(V==="}"&&(y.depth--,y.depth<0))throw new J(g,y,ee,H,q);y.value+=V;break}}return E}r(T,"generateAST");function _(g){return/^[ \t\n\r]*$/.test(g)}r(_,"isWhitespace");function $(g){return!/[#%{}~$,]/.test(g)}r($,"isValidKeyCharacter");function O(g){return!/[=,{}()[\]]/.test(g)}r(O,"isValidFieldName");var J=class extends Error{constructor(g,E,y,H,q,ee){super(`Line ${H}:${q}: Syntax Error in ${E.type} (${ee})
|
|
16
|
-
${g.slice(Math.max(0,y-20),y)}>>${g[y]}<<${g.slice(y+1,y+20)}`),this.node=E,this.line=H,this.column=q,this.hint=ee,this.name="Syntax Error",this.char=g[y]??""}static{r(this,"BibTeXSyntaxError")}};function z(g,E){return g.replace(/\s+/g," ").split(/ and /i).map(y=>{let H=y.trim();E&&(H=H.replace(/["{}]/g,""));const q=H.indexOf(",");if(q>-1)return{firstNames:H.slice(q+1).trim(),lastName:H.slice(0,q).trim()};const ee=H.lastIndexOf(" ");return{firstNames:H.slice(0,ee).trim(),lastName:H.slice(ee).trim()}})}r(z,"parseAuthors");var ae=class Jd{constructor(E,y,H=[]){this.kind=E,this.parent=y,this.children=H,this.type="block",y instanceof Jd?y.children.push(this):y instanceof K&&y.args.push(this)}static{r(this,"BlockNode")}},M=class{constructor(g,E=""){this.parent=g,this.text=E,this.type="text",g.children.push(this)}static{r(this,"TextNode")}},K=class{constructor(g,E="",y=[]){this.parent=g,this.command=E,this.args=y,this.type="command",g.children.push(this)}static{r(this,"CommandNode")}};function R(g){const E=new ae("root");let y=E;for(let H=0;H<g.length;H++){const q=g[H];if(!q)break;switch(y.type){case"block":{q==="\\"?y=new K(y):q==="{"?y=new ae("curly",y):(q==="}"&&y.kind==="curly"||q==="]"&&y.kind==="square")&&y.parent?y=y.parent:y=new M(y,q);break}case"text":{q==="\\"||q==="{"||q==="}"&&y.parent.kind==="curly"||q==="]"&&y.parent.kind==="square"?(y=y.parent,H--):y.text+=q;break}case"command":q==="{"?y=new ae("curly",y):q==="["?y=new ae("square",y):q==="}"&&y.parent.kind==="curly"||q==="]"&&y.parent.kind==="square"||/\s/.test(q)||y.args.length>0?(y=y.parent,H--):y.command+=q}}return E}r(R,"parseLaTeX");function A(g){return P(g)}r(A,"stringifyLaTeX");function P(g){const E=g.children.map(y=>{switch(y.type){case"block":return P(y);case"command":return pe(y);case"text":return y.text}}).join("");switch(g.kind){case"root":return E;case"curly":return`{${E}}`;case"square":return`[${E}]`}}r(P,"stringifyBlock");function pe(g){return`\\${g.command}${g.args.map(P).join("")}`}r(pe,"stringifyCommand");function we(g){const E={...g,children:[]};for(const y of g.children)if(y.type==="block"&&y.kind==="curly"&&y.children.every(H=>H.type!=="command")){const H=we(y);E.children.push(...H.children)}else E.children.push(y);return E}r(we,"flattenLaTeX");var Fe=new Map([["0023","\\#"],["0024","\\$"],["0025","\\%"],["0026","\\&"],["0027","'"],["0040","\\@"],["002a","\\textasteriskcentered"],["005f","\\_"],["007c","\\vert{}"],["00a0","~"],["00a1","\\textexclamdown{}"],["00a2","\\textcent{}"],["00a3","\\textsterling{}"],["00a4","\\textcurrency{}"],["00a5","\\textyen{}"],["00a6","\\textbrokenbar{}"],["00a7","\\textsection{}"],["00a8","\\textasciidieresis{}"],["00a9","\\textcopyright{}"],["00aa","\\textordfeminine{}"],["00ab","\\guillemotleft{}"],["00ac","\\lnot{}"],["00ad","\\-"],["00ae","\\textregistered{}"],["00af","\\textasciimacron{}"],["00b0","\\textdegree{}"],["00b1","\\pm{}"],["00b2","\\ensuremath{^2}"],["00b3","\\ensuremath{^3}"],["00b4","\\textasciiacute{}"],["00b5","\\mathrm{\\mu}"],["00b6","\\textparagraph{}"],["00b7","\\cdot{}"],["00b8","\\c{}"],["00b9","\\ensuremath{^1}"],["00ba","\\textordmasculine{}"],["00bb","\\guillemotright{}"],["00bc","\\textonequarter{}"],["00bd","\\textonehalf{}"],["00be","\\textthreequarters{}"],["00bf","\\textquestiondown{}"],["00c0","\\`{A}"],["00c1","\\'{A}"],["00c2","\\^{A}"],["00c3","\\~{A}"],["00c4",'\\"{A}'],["00c5","\\AA{}"],["00c6","\\AE{}"],["00c7","\\c{C}"],["00c8","\\`{E}"],["00c9","\\'{E}"],["00ca","\\^{E}"],["00cb",'\\"{E}'],["00cc","\\`{I}"],["00cd","\\'{I}"],["00ce","\\^{I}"],["00cf",'\\"{I}'],["00d0","\\DH{}"],["00d1","\\~{N}"],["00d2","\\`{O}"],["00d3","\\'{O}"],["00d4","\\^{O}"],["00d5","\\~{O}"],["00d6",'\\"{O}'],["00d7","\\texttimes{}"],["00d8","\\O{}"],["00d9","\\`{U}"],["00da","\\'{U}"],["00db","\\^{U}"],["00dc",'\\"{U}'],["00dd","\\'{Y}"],["00de","\\TH{}"],["00df","\\ss{}"],["00e0","\\`{a}"],["00e1","\\'{a}"],["00e2","\\^{a}"],["00e3","\\~{a}"],["00e4",'\\"{a}'],["00e5","\\aa{}"],["00e6","\\ae{}"],["00e7","\\c{c}"],["00e8","\\`{e}"],["00e9","\\'{e}"],["00ea","\\^{e}"],["00eb",'\\"{e}'],["00ec","\\`{\\i}"],["00ed","\\'{\\i}"],["00ee","\\^{\\i}"],["00ef",'\\"{\\i}'],["00f0","\\dh{}"],["00f1","\\~{n}"],["00f2","\\`{o}"],["00f3","\\'{o}"],["00f4","\\^{o}"],["00f5","\\~{o}"],["00f6",'\\"{o}'],["00f7","\\div{}"],["00f8","\\o{}"],["00f9","\\`{u}"],["00fa","\\'{u}"],["00fb","\\^{u}"],["00fc",'\\"{u}'],["00fd","\\'{y}"],["00fe","\\th{}"],["00ff",'\\"{y}'],["0100","\\={A}"],["0101","\\={a}"],["0102","\\u{A}"],["0103","\\u{a}"],["0104","\\k{A}"],["0105","\\k{a}"],["0106","\\'{C}"],["0107","\\'{c}"],["0108","\\^{C}"],["0109","\\^{c}"],["010a","\\.{C}"],["010b","\\.{c}"],["010c","\\v{C}"],["010d","\\v{c}"],["010e","\\v{D}"],["010f","\\v{d}"],["0110","\\DJ{}"],["0111","\\dj{}"],["0112","\\={E}"],["0113","\\={e}"],["0114","\\u{E}"],["0115","\\u{e}"],["0116","\\.{E}"],["0117","\\.{e}"],["0118","\\k{E}"],["0119","\\k{e}"],["011a","\\v{E}"],["011b","\\v{e}"],["011c","\\^{G}"],["011d","\\^{g}"],["011e","\\u{G}"],["011f","\\u{g}"],["0120","\\.{G}"],["0121","\\.{g}"],["0122","\\c{G}"],["0123","\\c{g}"],["0124","\\^{H}"],["0125","\\^{h}"],["0126","{\\fontencoding{LELA}\\selectfont\\char40}"],["0127","\\Elzxh{}"],["0128","\\~{I}"],["0129","\\~{\\i}"],["012a","\\={I}"],["012b","\\={\\i}"],["012c","\\u{I}"],["012d","\\u{\\i}"],["012e","\\k{I}"],["012f","\\k{i}"],["0130","\\.{I}"],["0131","\\i{}"],["0132","IJ"],["0133","ij"],["0134","\\^{J}"],["0135","\\^{\\j}"],["0136","\\c{K}"],["0137","\\c{k}"],["0138","{\\fontencoding{LELA}\\selectfont\\char91}"],["0139","\\'{L}"],["013a","\\'{l}"],["013b","\\c{L}"],["013c","\\c{l}"],["013d","\\v{L}"],["013e","\\v{l}"],["013f","{\\fontencoding{LELA}\\selectfont\\char201}"],["0140","{\\fontencoding{LELA}\\selectfont\\char202}"],["0141","\\L{}"],["0142","\\l{}"],["0143","\\'{N}"],["0144","\\'{n}"],["0145","\\c{N}"],["0146","\\c{n}"],["0147","\\v{N}"],["0148","\\v{n}"],["0149","'n"],["014a","\\NG{}"],["014b","\\ng{}"],["014c","\\={O}"],["014d","\\={o}"],["014e","\\u{O}"],["014f","\\u{o}"],["0150","\\H{O}"],["0151","\\H{o}"],["0152","\\OE{}"],["0153","\\oe{}"],["0154","\\'{R}"],["0155","\\'{r}"],["0156","\\c{R}"],["0157","\\c{r}"],["0158","\\v{R}"],["0159","\\v{r}"],["015a","\\'{S}"],["015b","\\'{s}"],["015c","\\^{S}"],["015d","\\^{s}"],["015e","\\c{S}"],["015f","\\c{s}"],["0160","\\v{S}"],["0161","\\v{s}"],["0162","\\c{T}"],["0163","\\c{t}"],["0164","\\v{T}"],["0165","\\v{t}"],["0166","{\\fontencoding{LELA}\\selectfont\\char47}"],["0167","{\\fontencoding{LELA}\\selectfont\\char63}"],["0168","\\~{U}"],["0169","\\~{u}"],["016a","\\={U}"],["016b","\\={u}"],["016c","\\u{U}"],["016d","\\u{u}"],["016e","\\r{U}"],["016f","\\r{u}"],["0170","\\H{U}"],["0171","\\H{u}"],["0172","\\k{U}"],["0173","\\k{u}"],["0174","\\^{W}"],["0175","\\^{w}"],["0176","\\^{Y}"],["0177","\\^{y}"],["0178",'\\"{Y}'],["0179","\\'{Z}"],["017a","\\'{z}"],["017b","\\.{Z}"],["017c","\\.{z}"],["017d","\\v{Z}"],["017e","\\v{z}"],["0195","\\texthvlig{}"],["019e","\\textnrleg{}"],["01aa","\\eth{}"],["01ba","{\\fontencoding{LELA}\\selectfont\\char195}"],["01c2","\\textdoublepipe{}"],["01f5","\\'{g}"],["0250","\\Elztrna{}"],["0252","\\Elztrnsa{}"],["0254","\\Elzopeno{}"],["0256","\\Elzrtld{}"],["0258","{\\fontencoding{LEIP}\\selectfont\\char61}"],["0259","\\Elzschwa{}"],["025b","\\varepsilon{}"],["0263","\\Elzpgamma{}"],["0264","\\Elzpbgam{}"],["0265","\\Elztrnh{}"],["026c","\\Elzbtdl{}"],["026d","\\Elzrtll{}"],["026f","\\Elztrnm{}"],["0270","\\Elztrnmlr{}"],["0271","\\Elzltlmr{}"],["0272","\\Elzltln{}"],["0273","\\Elzrtln{}"],["0277","\\Elzclomeg{}"],["0278","\\textphi{}"],["0279","\\Elztrnr{}"],["027a","\\Elztrnrl{}"],["027b","\\Elzrttrnr{}"],["027c","\\Elzrl{}"],["027d","\\Elzrtlr{}"],["027e","\\Elzfhr{}"],["027f","{\\fontencoding{LEIP}\\selectfont\\char202}"],["0282","\\Elzrtls{}"],["0283","\\Elzesh{}"],["0287","\\Elztrnt{}"],["0288","\\Elzrtlt{}"],["028a","\\Elzpupsil{}"],["028b","\\Elzpscrv{}"],["028c","\\Elzinvv{}"],["028d","\\Elzinvw{}"],["028e","\\Elztrny{}"],["0290","\\Elzrtlz{}"],["0292","\\Elzyogh{}"],["0294","\\Elzglst{}"],["0295","\\Elzreglst{}"],["0296","\\Elzinglst{}"],["029e","\\textturnk{}"],["02a4","\\Elzdyogh{}"],["02a7","\\Elztesh{}"],["02c7","\\textasciicaron{}"],["02c8","\\Elzverts{}"],["02cc","\\Elzverti{}"],["02d0","\\Elzlmrk{}"],["02d1","\\Elzhlmrk{}"],["02d2","\\Elzsbrhr{}"],["02d3","\\Elzsblhr{}"],["02d4","\\Elzrais{}"],["02d5","\\Elzlow{}"],["02d8","\\textasciibreve{}"],["02d9","\\textperiodcentered{}"],["02da","\\r{}"],["02db","\\k{}"],["02dc","\\texttildelow{}"],["02dd","\\H{}"],["02e5","\\tone{55}"],["02e6","\\tone{44}"],["02e7","\\tone{33}"],["02e8","\\tone{22}"],["02e9","\\tone{11}"],["0300","\\`"],["0301","\\'"],["0302","\\^"],["0303","\\~"],["0304","\\="],["0306","\\u"],["0307","\\."],["0308",'\\"'],["030a","\\r"],["030b","\\H"],["030c","\\v"],["030f","\\cyrchar\\C"],["0311","{\\fontencoding{LECO}\\selectfont\\char177}"],["0318","{\\fontencoding{LECO}\\selectfont\\char184}"],["0319","{\\fontencoding{LECO}\\selectfont\\char185}"],["0321","\\Elzpalh{}"],["0322","\\Elzrh{}"],["0327","\\c"],["0328","\\k"],["032a","\\Elzsbbrg{}"],["032b","{\\fontencoding{LECO}\\selectfont\\char203}"],["032f","{\\fontencoding{LECO}\\selectfont\\char207}"],["0335","\\Elzxl{}"],["0336","\\Elzbar{}"],["0337","{\\fontencoding{LECO}\\selectfont\\char215}"],["0338","{\\fontencoding{LECO}\\selectfont\\char216}"],["033a","{\\fontencoding{LECO}\\selectfont\\char218}"],["033b","{\\fontencoding{LECO}\\selectfont\\char219}"],["033c","{\\fontencoding{LECO}\\selectfont\\char220}"],["033d","{\\fontencoding{LECO}\\selectfont\\char221}"],["0361","{\\fontencoding{LECO}\\selectfont\\char225}"],["0386","\\'{A}"],["0388","\\'{E}"],["0389","\\'{H}"],["038a","\\'{}{I}"],["038c","\\'{}O"],["038e","\\mathrm{'Y}"],["038f","\\mathrm{'\\Omega}"],["0390","\\acute{\\ddot{\\iota}}"],["0391","\\ensuremath{\\Alpha}"],["0392","\\ensuremath{\\Beta}"],["0393","\\ensuremath{\\Gamma}"],["0394","\\ensuremath{\\Delta}"],["0395","\\ensuremath{\\Epsilon}"],["0396","\\ensuremath{\\Zeta}"],["0397","\\ensuremath{\\Eta}"],["0398","\\ensuremath{\\Theta}"],["0399","\\ensuremath{\\Iota}"],["039a","\\ensuremath{\\Kappa}"],["039b","\\ensuremath{\\Lambda}"],["039e","\\ensuremath{\\Xi}"],["03a0","\\ensuremath{\\Pi}"],["03a1","\\ensuremath{\\Rho}"],["03a3","\\ensuremath{\\Sigma}"],["03a4","\\ensuremath{\\Tau}"],["03a5","\\ensuremath{\\Upsilon}"],["03a6","\\ensuremath{\\Phi}"],["03a7","\\ensuremath{\\Chi}"],["03a8","\\ensuremath{\\Psi}"],["03a9","\\ensuremath{\\Omega}"],["03aa","\\mathrm{\\ddot{I}}"],["03ab","\\mathrm{\\ddot{Y}}"],["03ac","\\'{$\\alpha$}"],["03ad","\\acute{\\epsilon}"],["03ae","\\acute{\\eta}"],["03af","\\acute{\\iota}"],["03b0","\\acute{\\ddot{\\upsilon}}"],["03b1","\\ensuremath{\\alpha}"],["03b2","\\ensuremath{\\beta}"],["03b3","\\ensuremath{\\gamma}"],["03b4","\\ensuremath{\\delta}"],["03b5","\\ensuremath{\\epsilon}"],["03b6","\\ensuremath{\\zeta}"],["03b7","\\ensuremath{\\eta}"],["03b8","\\texttheta{}"],["03b9","\\ensuremath{\\iota}"],["03ba","\\ensuremath{\\kappa}"],["03bb","\\ensuremath{\\lambda}"],["03bc","\\ensuremath{\\mu}"],["03bd","\\ensuremath{\\nu}"],["03be","\\ensuremath{\\xi}"],["03c0","\\ensuremath{\\pi}"],["03c1","\\ensuremath{\\rho}"],["03c2","\\ensuremath{\\varsigma}"],["03c3","\\ensuremath{\\sigma}"],["03c4","\\ensuremath{\\tau}"],["03c5","\\ensuremath{\\upsilon}"],["03c6","\\ensuremath{\\varphi}"],["03c7","\\ensuremath{\\chi}"],["03c8","\\ensuremath{\\psi}"],["03c9","\\ensuremath{\\omega}"],["03ca","\\ensuremath{\\ddot{\\iota}}"],["03cb","\\ensuremath{\\ddot{\\upsilon}}"],["03cc","\\'{o}"],["03cd","\\acute{\\upsilon}"],["03ce","\\acute{\\omega}"],["03d0","\\Pisymbol{ppi022}{87}"],["03d1","\\textvartheta{}"],["03d2","\\ensuremath{\\Upsilon}"],["03d5","\\ensuremath{\\phi}"],["03d6","\\ensuremath{\\varpi}"],["03da","\\Stigma{}"],["03dc","\\Digamma{}"],["03dd","\\digamma{}"],["03de","\\Koppa{}"],["03e0","\\Sampi{}"],["03f0","\\varkappa{}"],["03f1","\\varrho{}"],["03f4","\\textTheta{}"],["03f6","\\backepsilon{}"],["0401","\\cyrchar\\CYRYO{}"],["0402","\\cyrchar\\CYRDJE{}"],["0403","\\cyrchar{\\'\\CYRG}"],["0404","\\cyrchar\\CYRIE{}"],["0405","\\cyrchar\\CYRDZE{}"],["0406","\\cyrchar\\CYRII{}"],["0407","\\cyrchar\\CYRYI{}"],["0408","\\cyrchar\\CYRJE{}"],["0409","\\cyrchar\\CYRLJE{}"],["040a","\\cyrchar\\CYRNJE{}"],["040b","\\cyrchar\\CYRTSHE{}"],["040c","\\cyrchar{\\'\\CYRK}"],["040e","\\cyrchar\\CYRUSHRT{}"],["040f","\\cyrchar\\CYRDZHE{}"],["0410","\\cyrchar\\CYRA{}"],["0411","\\cyrchar\\CYRB{}"],["0412","\\cyrchar\\CYRV{}"],["0413","\\cyrchar\\CYRG{}"],["0414","\\cyrchar\\CYRD{}"],["0415","\\cyrchar\\CYRE{}"],["0416","\\cyrchar\\CYRZH{}"],["0417","\\cyrchar\\CYRZ{}"],["0418","\\cyrchar\\CYRI{}"],["0419","\\cyrchar\\CYRISHRT{}"],["041a","\\cyrchar\\CYRK{}"],["041b","\\cyrchar\\CYRL{}"],["041c","\\cyrchar\\CYRM{}"],["041d","\\cyrchar\\CYRN{}"],["041e","\\cyrchar\\CYRO{}"],["041f","\\cyrchar\\CYRP{}"],["0420","\\cyrchar\\CYRR{}"],["0421","\\cyrchar\\CYRS{}"],["0422","\\cyrchar\\CYRT{}"],["0423","\\cyrchar\\CYRU{}"],["0424","\\cyrchar\\CYRF{}"],["0425","\\cyrchar\\CYRH{}"],["0426","\\cyrchar\\CYRC{}"],["0427","\\cyrchar\\CYRCH{}"],["0428","\\cyrchar\\CYRSH{}"],["0429","\\cyrchar\\CYRSHCH{}"],["042a","\\cyrchar\\CYRHRDSN{}"],["042b","\\cyrchar\\CYRERY{}"],["042c","\\cyrchar\\CYRSFTSN{}"],["042d","\\cyrchar\\CYREREV{}"],["042e","\\cyrchar\\CYRYU{}"],["042f","\\cyrchar\\CYRYA{}"],["0430","\\cyrchar\\cyra{}"],["0431","\\cyrchar\\cyrb{}"],["0432","\\cyrchar\\cyrv{}"],["0433","\\cyrchar\\cyrg{}"],["0434","\\cyrchar\\cyrd{}"],["0435","\\cyrchar\\cyre{}"],["0436","\\cyrchar\\cyrzh{}"],["0437","\\cyrchar\\cyrz{}"],["0438","\\cyrchar\\cyri{}"],["0439","\\cyrchar\\cyrishrt{}"],["043a","\\cyrchar\\cyrk{}"],["043b","\\cyrchar\\cyrl{}"],["043c","\\cyrchar\\cyrm{}"],["043d","\\cyrchar\\cyrn{}"],["043e","\\cyrchar\\cyro{}"],["043f","\\cyrchar\\cyrp{}"],["0440","\\cyrchar\\cyrr{}"],["0441","\\cyrchar\\cyrs{}"],["0442","\\cyrchar\\cyrt{}"],["0443","\\cyrchar\\cyru{}"],["0444","\\cyrchar\\cyrf{}"],["0445","\\cyrchar\\cyrh{}"],["0446","\\cyrchar\\cyrc{}"],["0447","\\cyrchar\\cyrch{}"],["0448","\\cyrchar\\cyrsh{}"],["0449","\\cyrchar\\cyrshch{}"],["044a","\\cyrchar\\cyrhrdsn{}"],["044b","\\cyrchar\\cyrery{}"],["044c","\\cyrchar\\cyrsftsn{}"],["044d","\\cyrchar\\cyrerev{}"],["044e","\\cyrchar\\cyryu{}"],["044f","\\cyrchar\\cyrya{}"],["0451","\\cyrchar\\cyryo{}"],["0452","\\cyrchar\\cyrdje{}"],["0453","\\cyrchar{\\'\\cyrg}"],["0454","\\cyrchar\\cyrie{}"],["0455","\\cyrchar\\cyrdze{}"],["0456","\\cyrchar\\cyrii{}"],["0457","\\cyrchar\\cyryi{}"],["0458","\\cyrchar\\cyrje{}"],["0459","\\cyrchar\\cyrlje{}"],["045a","\\cyrchar\\cyrnje{}"],["045b","\\cyrchar\\cyrtshe{}"],["045c","\\cyrchar{\\'\\cyrk}"],["045e","\\cyrchar\\cyrushrt{}"],["045f","\\cyrchar\\cyrdzhe{}"],["0460","\\cyrchar\\CYROMEGA{}"],["0461","\\cyrchar\\cyromega{}"],["0462","\\cyrchar\\CYRYAT{}"],["0464","\\cyrchar\\CYRIOTE{}"],["0465","\\cyrchar\\cyriote{}"],["0466","\\cyrchar\\CYRLYUS{}"],["0467","\\cyrchar\\cyrlyus{}"],["0468","\\cyrchar\\CYRIOTLYUS{}"],["0469","\\cyrchar\\cyriotlyus{}"],["046a","\\cyrchar\\CYRBYUS{}"],["046c","\\cyrchar\\CYRIOTBYUS{}"],["046d","\\cyrchar\\cyriotbyus{}"],["046e","\\cyrchar\\CYRKSI{}"],["046f","\\cyrchar\\cyrksi{}"],["0470","\\cyrchar\\CYRPSI{}"],["0471","\\cyrchar\\cyrpsi{}"],["0472","\\cyrchar\\CYRFITA{}"],["0474","\\cyrchar\\CYRIZH{}"],["0478","\\cyrchar\\CYRUK{}"],["0479","\\cyrchar\\cyruk{}"],["047a","\\cyrchar\\CYROMEGARND{}"],["047b","\\cyrchar\\cyromegarnd{}"],["047c","\\cyrchar\\CYROMEGATITLO{}"],["047d","\\cyrchar\\cyromegatitlo{}"],["047e","\\cyrchar\\CYROT{}"],["047f","\\cyrchar\\cyrot{}"],["0480","\\cyrchar\\CYRKOPPA{}"],["0481","\\cyrchar\\cyrkoppa{}"],["0482","\\cyrchar\\cyrthousands{}"],["0488","\\cyrchar\\cyrhundredthousands{}"],["0489","\\cyrchar\\cyrmillions{}"],["048c","\\cyrchar\\CYRSEMISFTSN{}"],["048d","\\cyrchar\\cyrsemisftsn{}"],["048e","\\cyrchar\\CYRRTICK{}"],["048f","\\cyrchar\\cyrrtick{}"],["0490","\\cyrchar\\CYRGUP{}"],["0491","\\cyrchar\\cyrgup{}"],["0492","\\cyrchar\\CYRGHCRS{}"],["0493","\\cyrchar\\cyrghcrs{}"],["0494","\\cyrchar\\CYRGHK{}"],["0495","\\cyrchar\\cyrghk{}"],["0496","\\cyrchar\\CYRZHDSC{}"],["0497","\\cyrchar\\cyrzhdsc{}"],["0498","\\cyrchar\\CYRZDSC{}"],["0499","\\cyrchar\\cyrzdsc{}"],["049a","\\cyrchar\\CYRKDSC{}"],["049b","\\cyrchar\\cyrkdsc{}"],["049c","\\cyrchar\\CYRKVCRS{}"],["049d","\\cyrchar\\cyrkvcrs{}"],["049e","\\cyrchar\\CYRKHCRS{}"],["049f","\\cyrchar\\cyrkhcrs{}"],["04a0","\\cyrchar\\CYRKBEAK{}"],["04a1","\\cyrchar\\cyrkbeak{}"],["04a2","\\cyrchar\\CYRNDSC{}"],["04a3","\\cyrchar\\cyrndsc{}"],["04a4","\\cyrchar\\CYRNG{}"],["04a5","\\cyrchar\\cyrng{}"],["04a6","\\cyrchar\\CYRPHK{}"],["04a7","\\cyrchar\\cyrphk{}"],["04a8","\\cyrchar\\CYRABHHA{}"],["04a9","\\cyrchar\\cyrabhha{}"],["04aa","\\cyrchar\\CYRSDSC{}"],["04ab","\\cyrchar\\cyrsdsc{}"],["04ac","\\cyrchar\\CYRTDSC{}"],["04ad","\\cyrchar\\cyrtdsc{}"],["04ae","\\cyrchar\\CYRY{}"],["04af","\\cyrchar\\cyry{}"],["04b0","\\cyrchar\\CYRYHCRS{}"],["04b1","\\cyrchar\\cyryhcrs{}"],["04b2","\\cyrchar\\CYRHDSC{}"],["04b3","\\cyrchar\\cyrhdsc{}"],["04b4","\\cyrchar\\CYRTETSE{}"],["04b5","\\cyrchar\\cyrtetse{}"],["04b6","\\cyrchar\\CYRCHRDSC{}"],["04b7","\\cyrchar\\cyrchrdsc{}"],["04b8","\\cyrchar\\CYRCHVCRS{}"],["04b9","\\cyrchar\\cyrchvcrs{}"],["04ba","\\cyrchar\\CYRSHHA{}"],["04bb","\\cyrchar\\cyrshha{}"],["04bc","\\cyrchar\\CYRABHCH{}"],["04bd","\\cyrchar\\cyrabhch{}"],["04be","\\cyrchar\\CYRABHCHDSC{}"],["04bf","\\cyrchar\\cyrabhchdsc{}"],["04c0","\\cyrchar\\CYRpalochka{}"],["04c3","\\cyrchar\\CYRKHK{}"],["04c4","\\cyrchar\\cyrkhk{}"],["04c7","\\cyrchar\\CYRNHK{}"],["04c8","\\cyrchar\\cyrnhk{}"],["04cb","\\cyrchar\\CYRCHLDSC{}"],["04cc","\\cyrchar\\cyrchldsc{}"],["04d4","\\cyrchar\\CYRAE{}"],["04d5","\\cyrchar\\cyrae{}"],["04d8","\\cyrchar\\CYRSCHWA{}"],["04d9","\\cyrchar\\cyrschwa{}"],["04e0","\\cyrchar\\CYRABHDZE{}"],["04e1","\\cyrchar\\cyrabhdze{}"],["04e8","\\cyrchar\\CYROTLD{}"],["04e9","\\cyrchar\\cyrotld{}"],["2002","\\hspace{0.6em}"],["2003","\\hspace{1em}"],["2004","\\hspace{0.33em}"],["2005","\\hspace{0.25em}"],["2006","\\hspace{0.166em}"],["2007","\\hphantom{0}"],["2008","\\hphantom{,}"],["2009","\\hspace{0.167em}"],["200a","\\mkern1mu{}"],["2010","-"],["2014","--"],["2015","\\rule{1em}{1pt}"],["2016","\\Vert{}"],["2018","`"],["2019","'"],["201b","\\Elzreapos{}"],["201c","``"],["201d","''"],["201e",",,"],["2020","\\textdagger{}"],["2021","\\textdaggerdbl{}"],["2022","\\textbullet{}"],["2025",".."],["2026","\\ldots{}"],["2030","\\textperthousand{}"],["2031","\\textpertenthousand{}"],["2032","\\ensuremath{'}"],["2033","\\ensuremath{''}"],["2034","\\ensuremath{'''}"],["2035","\\backprime{}"],["2039","\\guilsinglleft{}"],["203a","\\guilsinglright{}"],["2057","''''"],["205f","\\mkern4mu{}"],["2060","\\nolinebreak{}"],["20a7","\\ensuremath{\\Elzpes}"],["20ac","\\mbox{\\texteuro}{}"],["20db","\\dddot{}"],["20dc","\\ddddot{}"],["2102","\\mathbb{C}"],["210a","\\mathscr{g}"],["210b","\\mathscr{H}"],["210c","\\mathfrak{H}"],["210d","\\mathbb{H}"],["210f","\\hslash{}"],["2110","\\mathscr{I}"],["2111","\\mathfrak{I}"],["2112","\\mathscr{L}"],["2113","\\mathscr{l}"],["2115","\\mathbb{N}"],["2116","\\cyrchar\\textnumero{}"],["2118","\\wp{}"],["2119","\\mathbb{P}"],["211a","\\mathbb{Q}"],["211b","\\mathscr{R}"],["211c","\\mathfrak{R}"],["211d","\\mathbb{R}"],["211e","\\Elzxrat{}"],["2122","\\texttrademark{}"],["2124","\\mathbb{Z}"],["2126","\\Omega{}"],["2127","\\mho{}"],["2128","\\mathfrak{Z}"],["2129","\\ElsevierGlyph{2129}"],["212b","\\AA{}"],["212c","\\mathscr{B}"],["212d","\\mathfrak{C}"],["212f","\\mathscr{e}"],["2130","\\mathscr{E}"],["2131","\\mathscr{F}"],["2133","\\mathscr{M}"],["2134","\\mathscr{o}"],["2135","\\aleph{}"],["2136","\\beth{}"],["2137","\\gimel{}"],["2138","\\daleth{}"],["2153","\\textfrac{1}{3}"],["2154","\\textfrac{2}{3}"],["2155","\\textfrac{1}{5}"],["2156","\\textfrac{2}{5}"],["2157","\\textfrac{3}{5}"],["2158","\\textfrac{4}{5}"],["2159","\\textfrac{1}{6}"],["215a","\\textfrac{5}{6}"],["215b","\\textfrac{1}{8}"],["215c","\\textfrac{3}{8}"],["215d","\\textfrac{5}{8}"],["215e","\\textfrac{7}{8}"],["2190","\\leftarrow{}"],["2191","\\uparrow{}"],["2192","\\rightarrow{}"],["2193","\\downarrow{}"],["2194","\\leftrightarrow{}"],["2195","\\updownarrow{}"],["2196","\\nwarrow{}"],["2197","\\nearrow{}"],["2198","\\searrow{}"],["2199","\\swarrow{}"],["219a","\\nleftarrow{}"],["219b","\\nrightarrow{}"],["219c","\\arrowwaveright{}"],["219d","\\arrowwaveright{}"],["219e","\\twoheadleftarrow{}"],["21a0","\\twoheadrightarrow{}"],["21a2","\\leftarrowtail{}"],["21a3","\\rightarrowtail{}"],["21a6","\\mapsto{}"],["21a9","\\hookleftarrow{}"],["21aa","\\hookrightarrow{}"],["21ab","\\looparrowleft{}"],["21ac","\\looparrowright{}"],["21ad","\\leftrightsquigarrow{}"],["21ae","\\nleftrightarrow{}"],["21b0","\\Lsh{}"],["21b1","\\Rsh{}"],["21b3","\\ElsevierGlyph{21B3}"],["21b6","\\curvearrowleft{}"],["21b7","\\curvearrowright{}"],["21ba","\\circlearrowleft{}"],["21bb","\\circlearrowright{}"],["21bc","\\leftharpoonup{}"],["21bd","\\leftharpoondown{}"],["21be","\\upharpoonright{}"],["21bf","\\upharpoonleft{}"],["21c0","\\rightharpoonup{}"],["21c1","\\rightharpoondown{}"],["21c2","\\downharpoonright{}"],["21c3","\\downharpoonleft{}"],["21c4","\\rightleftarrows{}"],["21c5","\\dblarrowupdown{}"],["21c6","\\leftrightarrows{}"],["21c7","\\leftleftarrows{}"],["21c8","\\upuparrows{}"],["21c9","\\rightrightarrows{}"],["21ca","\\downdownarrows{}"],["21cb","\\leftrightharpoons{}"],["21cc","\\rightleftharpoons{}"],["21cd","\\nLeftarrow{}"],["21ce","\\nLeftrightarrow{}"],["21cf","\\nRightarrow{}"],["21d0","\\Leftarrow{}"],["21d1","\\Uparrow{}"],["21d2","\\Rightarrow{}"],["21d3","\\Downarrow{}"],["21d4","\\Leftrightarrow{}"],["21d5","\\Updownarrow{}"],["21da","\\Lleftarrow{}"],["21db","\\Rrightarrow{}"],["21dd","\\rightsquigarrow{}"],["21f5","\\DownArrowUpArrow{}"],["2200","\\forall{}"],["2201","\\complement{}"],["2202","\\partial{}"],["2203","\\exists{}"],["2204","\\nexists{}"],["2205","\\varnothing{}"],["2207","\\nabla{}"],["2208","\\in{}"],["2209","\\not\\in{}"],["220b","\\ni{}"],["220c","\\not\\ni{}"],["220f","\\prod{}"],["2210","\\coprod{}"],["2211","\\sum{}"],["2212","-"],["2213","\\mp{}"],["2214","\\dotplus{}"],["2216","\\setminus{}"],["2217","{\\_\\ast}"],["2218","\\circ{}"],["2219","\\bullet{}"],["221a","\\surd{}"],["221d","\\propto{}"],["221e","\\infty{}"],["221f","\\rightangle{}"],["2220","\\angle{}"],["2221","\\measuredangle{}"],["2222","\\sphericalangle{}"],["2223","\\mid{}"],["2224","\\nmid{}"],["2225","\\parallel{}"],["2226","\\nparallel{}"],["2227","\\wedge{}"],["2228","\\vee{}"],["2229","\\cap{}"],["222a","\\cup{}"],["222b","\\int{}"],["222c","\\int\\!\\int{}"],["222d","\\int\\!\\int\\!\\int{}"],["222e","\\oint{}"],["222f","\\surfintegral{}"],["2230","\\volintegral{}"],["2231","\\clwintegral{}"],["2232","\\ElsevierGlyph{2232}"],["2233","\\ElsevierGlyph{2233}"],["2234","\\therefore{}"],["2235","\\because{}"],["2237","\\Colon{}"],["2238","\\ElsevierGlyph{2238}"],["223a","\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"],["223b","\\homothetic{}"],["223c","\\sim{}"],["223d","\\backsim{}"],["223e","\\lazysinv{}"],["2240","\\wr{}"],["2241","\\not\\sim{}"],["2242","\\ElsevierGlyph{2242}"],["2243","\\simeq{}"],["2244","\\not\\simeq{}"],["2245","\\cong{}"],["2246","\\approxnotequal{}"],["2247","\\not\\cong{}"],["2248","\\approx{}"],["2249","\\not\\approx{}"],["224a","\\approxeq{}"],["224b","\\tildetrpl{}"],["224c","\\allequal{}"],["224d","\\asymp{}"],["224e","\\Bumpeq{}"],["224f","\\bumpeq{}"],["2250","\\doteq{}"],["2251","\\doteqdot{}"],["2252","\\fallingdotseq{}"],["2253","\\risingdotseq{}"],["2254",":="],["2255","=:"],["2256","\\eqcirc{}"],["2257","\\circeq{}"],["2259","\\estimates{}"],["225a","\\ElsevierGlyph{225A}"],["225b","\\starequal{}"],["225c","\\triangleq{}"],["225f","\\ElsevierGlyph{225F}"],["2260","\\not ="],["2261","\\equiv{}"],["2262","\\not\\equiv{}"],["2264","\\leq{}"],["2265","\\geq{}"],["2266","\\leqq{}"],["2267","\\geqq{}"],["2268","\\lneqq{}"],["2269","\\gneqq{}"],["226a","\\ll{}"],["226b","\\gg{}"],["226c","\\between{}"],["226d","\\not\\kern-0.3em\\times{}"],["226e","\\not<"],["226f","\\not>"],["2270","\\not\\leq{}"],["2271","\\not\\geq{}"],["2272","\\lessequivlnt{}"],["2273","\\greaterequivlnt{}"],["2274","\\ElsevierGlyph{2274}"],["2275","\\ElsevierGlyph{2275}"],["2276","\\lessgtr{}"],["2277","\\gtrless{}"],["2278","\\notlessgreater{}"],["2279","\\notgreaterless{}"],["227a","\\prec{}"],["227b","\\succ{}"],["227c","\\preccurlyeq{}"],["227d","\\succcurlyeq{}"],["227e","\\precapprox{}"],["227f","\\succapprox{}"],["2280","\\not\\prec{}"],["2281","\\not\\succ{}"],["2282","\\subset{}"],["2283","\\supset{}"],["2284","\\not\\subset{}"],["2285","\\not\\supset{}"],["2286","\\subseteq{}"],["2287","\\supseteq{}"],["2288","\\not\\subseteq{}"],["2289","\\not\\supseteq{}"],["228a","\\subsetneq{}"],["228b","\\supsetneq{}"],["228e","\\uplus{}"],["228f","\\sqsubset{}"],["2290","\\sqsupset{}"],["2291","\\sqsubseteq{}"],["2292","\\sqsupseteq{}"],["2293","\\sqcap{}"],["2294","\\sqcup{}"],["2295","\\oplus{}"],["2296","\\ominus{}"],["2297","\\otimes{}"],["2298","\\oslash{}"],["2299","\\odot{}"],["229a","\\circledcirc{}"],["229b","\\circledast{}"],["229d","\\circleddash{}"],["229e","\\boxplus{}"],["229f","\\boxminus{}"],["22a0","\\boxtimes{}"],["22a1","\\boxdot{}"],["22a2","\\vdash{}"],["22a3","\\dashv{}"],["22a4","\\top{}"],["22a5","\\perp{}"],["22a7","\\truestate{}"],["22a8","\\forcesextra{}"],["22a9","\\Vdash{}"],["22aa","\\Vvdash{}"],["22ab","\\VDash{}"],["22ac","\\nvdash{}"],["22ad","\\nvDash{}"],["22ae","\\nVdash{}"],["22af","\\nVDash{}"],["22b2","\\vartriangleleft{}"],["22b3","\\vartriangleright{}"],["22b4","\\trianglelefteq{}"],["22b5","\\trianglerighteq{}"],["22b6","\\original{}"],["22b7","\\image{}"],["22b8","\\multimap{}"],["22b9","\\hermitconjmatrix{}"],["22ba","\\intercal{}"],["22bb","\\veebar{}"],["22be","\\rightanglearc{}"],["22c0","\\ElsevierGlyph{22C0}"],["22c1","\\ElsevierGlyph{22C1}"],["22c2","\\bigcap{}"],["22c3","\\bigcup{}"],["22c4","\\diamond{}"],["22c5","\\cdot{}"],["22c6","\\star{}"],["22c7","\\divideontimes{}"],["22c8","\\bowtie{}"],["22c9","\\ltimes{}"],["22ca","\\rtimes{}"],["22cb","\\leftthreetimes{}"],["22cc","\\rightthreetimes{}"],["22cd","\\backsimeq{}"],["22ce","\\curlyvee{}"],["22cf","\\curlywedge{}"],["22d0","\\Subset{}"],["22d1","\\Supset{}"],["22d2","\\Cap{}"],["22d3","\\Cup{}"],["22d4","\\pitchfork{}"],["22d6","\\lessdot{}"],["22d7","\\gtrdot{}"],["22d8","\\verymuchless{}"],["22d9","\\verymuchgreater{}"],["22da","\\lesseqgtr{}"],["22db","\\gtreqless{}"],["22de","\\curlyeqprec{}"],["22df","\\curlyeqsucc{}"],["22e2","\\not\\sqsubseteq{}"],["22e3","\\not\\sqsupseteq{}"],["22e5","\\Elzsqspne{}"],["22e6","\\lnsim{}"],["22e7","\\gnsim{}"],["22e8","\\precedesnotsimilar{}"],["22e9","\\succnsim{}"],["22ea","\\ntriangleleft{}"],["22eb","\\ntriangleright{}"],["22ec","\\ntrianglelefteq{}"],["22ed","\\ntrianglerighteq{}"],["22ee","\\vdots{}"],["22ef","\\cdots{}"],["22f0","\\upslopeellipsis{}"],["22f1","\\downslopeellipsis{}"],["2305","\\barwedge{}"],["2306","\\perspcorrespond{}"],["2308","\\lceil{}"],["2309","\\rceil{}"],["230a","\\lfloor{}"],["230b","\\rfloor{}"],["2315","\\recorder{}"],["2316",'\\mathchar"2208'],["231c","\\ulcorner{}"],["231d","\\urcorner{}"],["231e","\\llcorner{}"],["231f","\\lrcorner{}"],["2322","\\frown{}"],["2323","\\smile{}"],["2329","\\langle{}"],["232a","\\rangle{}"],["233d","\\ElsevierGlyph{E838}"],["23a3","\\Elzdlcorn{}"],["23b0","\\lmoustache{}"],["23b1","\\rmoustache{}"],["2423","\\textvisiblespace{}"],["2460","\\ding{172}"],["2461","\\ding{173}"],["2462","\\ding{174}"],["2463","\\ding{175}"],["2464","\\ding{176}"],["2465","\\ding{177}"],["2466","\\ding{178}"],["2467","\\ding{179}"],["2468","\\ding{180}"],["2469","\\ding{181}"],["24c8","\\circledS{}"],["2506","\\Elzdshfnc{}"],["2519","\\Elzsqfnw{}"],["2571","\\diagup{}"],["25a0","\\ding{110}"],["25a1","\\square{}"],["25aa","\\blacksquare{}"],["25ad","\\fbox{~~}"],["25af","\\Elzvrecto{}"],["25b1","\\ElsevierGlyph{E381}"],["25b2","\\ding{115}"],["25b3","\\bigtriangleup{}"],["25b4","\\blacktriangle{}"],["25b5","\\vartriangle{}"],["25b8","\\blacktriangleright{}"],["25b9","\\triangleright{}"],["25bc","\\ding{116}"],["25bd","\\bigtriangledown{}"],["25be","\\blacktriangledown{}"],["25bf","\\triangledown{}"],["25c2","\\blacktriangleleft{}"],["25c3","\\triangleleft{}"],["25c6","\\ding{117}"],["25ca","\\lozenge{}"],["25cb","\\bigcirc{}"],["25cf","\\ding{108}"],["25d0","\\Elzcirfl{}"],["25d1","\\Elzcirfr{}"],["25d2","\\Elzcirfb{}"],["25d7","\\ding{119}"],["25d8","\\Elzrvbull{}"],["25e7","\\Elzsqfl{}"],["25e8","\\Elzsqfr{}"],["25ea","\\Elzsqfse{}"],["25ef","\\bigcirc{}"],["2605","\\ding{72}"],["2606","\\ding{73}"],["260e","\\ding{37}"],["261b","\\ding{42}"],["261e","\\ding{43}"],["263e","\\rightmoon{}"],["263f","\\mercury{}"],["2640","\\venus{}"],["2642","\\male{}"],["2643","\\jupiter{}"],["2644","\\saturn{}"],["2645","\\uranus{}"],["2646","\\neptune{}"],["2647","\\pluto{}"],["2648","\\aries{}"],["2649","\\taurus{}"],["264a","\\gemini{}"],["264b","\\cancer{}"],["264c","\\leo{}"],["264d","\\virgo{}"],["264e","\\libra{}"],["264f","\\scorpio{}"],["2650","\\sagittarius{}"],["2651","\\capricornus{}"],["2652","\\aquarius{}"],["2653","\\pisces{}"],["2660","\\ding{171}"],["2662","\\diamond{}"],["2663","\\ding{168}"],["2665","\\ding{170}"],["2666","\\ding{169}"],["2669","\\quarternote{}"],["266a","\\eighthnote{}"],["266d","\\flat{}"],["266e","\\natural{}"],["266f","\\sharp{}"],["2701","\\ding{33}"],["2702","\\ding{34}"],["2703","\\ding{35}"],["2704","\\ding{36}"],["2706","\\ding{38}"],["2707","\\ding{39}"],["2708","\\ding{40}"],["2709","\\ding{41}"],["270c","\\ding{44}"],["270d","\\ding{45}"],["270e","\\ding{46}"],["270f","\\ding{47}"],["2710","\\ding{48}"],["2711","\\ding{49}"],["2712","\\ding{50}"],["2713","\\ding{51}"],["2714","\\ding{52}"],["2715","\\ding{53}"],["2716","\\ding{54}"],["2717","\\ding{55}"],["2718","\\ding{56}"],["2719","\\ding{57}"],["271a","\\ding{58}"],["271b","\\ding{59}"],["271c","\\ding{60}"],["271d","\\ding{61}"],["271e","\\ding{62}"],["271f","\\ding{63}"],["2720","\\ding{64}"],["2721","\\ding{65}"],["2722","\\ding{66}"],["2723","\\ding{67}"],["2724","\\ding{68}"],["2725","\\ding{69}"],["2726","\\ding{70}"],["2727","\\ding{71}"],["2729","\\ding{73}"],["272a","\\ding{74}"],["272b","\\ding{75}"],["272c","\\ding{76}"],["272d","\\ding{77}"],["272e","\\ding{78}"],["272f","\\ding{79}"],["2730","\\ding{80}"],["2731","\\ding{81}"],["2732","\\ding{82}"],["2733","\\ding{83}"],["2734","\\ding{84}"],["2735","\\ding{85}"],["2736","\\ding{86}"],["2737","\\ding{87}"],["2738","\\ding{88}"],["2739","\\ding{89}"],["273a","\\ding{90}"],["273b","\\ding{91}"],["273c","\\ding{92}"],["273d","\\ding{93}"],["273e","\\ding{94}"],["273f","\\ding{95}"],["2740","\\ding{96}"],["2741","\\ding{97}"],["2742","\\ding{98}"],["2743","\\ding{99}"],["2744","\\ding{100}"],["2745","\\ding{101}"],["2746","\\ding{102}"],["2747","\\ding{103}"],["2748","\\ding{104}"],["2749","\\ding{105}"],["274a","\\ding{106}"],["274b","\\ding{107}"],["274d","\\ding{109}"],["274f","\\ding{111}"],["2750","\\ding{112}"],["2751","\\ding{113}"],["2752","\\ding{114}"],["2756","\\ding{118}"],["2758","\\ding{120}"],["2759","\\ding{121}"],["275a","\\ding{122}"],["275b","\\ding{123}"],["275c","\\ding{124}"],["275d","\\ding{125}"],["275e","\\ding{126}"],["2761","\\ding{161}"],["2762","\\ding{162}"],["2763","\\ding{163}"],["2764","\\ding{164}"],["2765","\\ding{165}"],["2766","\\ding{166}"],["2767","\\ding{167}"],["2776","\\ding{182}"],["2777","\\ding{183}"],["2778","\\ding{184}"],["2779","\\ding{185}"],["277a","\\ding{186}"],["277b","\\ding{187}"],["277c","\\ding{188}"],["277d","\\ding{189}"],["277e","\\ding{190}"],["277f","\\ding{191}"],["2780","\\ding{192}"],["2781","\\ding{193}"],["2782","\\ding{194}"],["2783","\\ding{195}"],["2784","\\ding{196}"],["2785","\\ding{197}"],["2786","\\ding{198}"],["2787","\\ding{199}"],["2788","\\ding{200}"],["2789","\\ding{201}"],["278a","\\ding{202}"],["278b","\\ding{203}"],["278c","\\ding{204}"],["278d","\\ding{205}"],["278e","\\ding{206}"],["278f","\\ding{207}"],["2790","\\ding{208}"],["2791","\\ding{209}"],["2792","\\ding{210}"],["2793","\\ding{211}"],["2794","\\ding{212}"],["2798","\\ding{216}"],["2799","\\ding{217}"],["279a","\\ding{218}"],["279b","\\ding{219}"],["279c","\\ding{220}"],["279d","\\ding{221}"],["279e","\\ding{222}"],["279f","\\ding{223}"],["27a0","\\ding{224}"],["27a1","\\ding{225}"],["27a2","\\ding{226}"],["27a3","\\ding{227}"],["27a4","\\ding{228}"],["27a5","\\ding{229}"],["27a6","\\ding{230}"],["27a7","\\ding{231}"],["27a8","\\ding{232}"],["27a9","\\ding{233}"],["27aa","\\ding{234}"],["27ab","\\ding{235}"],["27ac","\\ding{236}"],["27ad","\\ding{237}"],["27ae","\\ding{238}"],["27af","\\ding{239}"],["27b1","\\ding{241}"],["27b2","\\ding{242}"],["27b3","\\ding{243}"],["27b4","\\ding{244}"],["27b5","\\ding{245}"],["27b6","\\ding{246}"],["27b7","\\ding{247}"],["27b8","\\ding{248}"],["27b9","\\ding{249}"],["27ba","\\ding{250}"],["27bb","\\ding{251}"],["27bc","\\ding{252}"],["27bd","\\ding{253}"],["27be","\\ding{254}"],["27f5","\\longleftarrow{}"],["27f6","\\longrightarrow{}"],["27f7","\\longleftrightarrow{}"],["27f8","\\Longleftarrow{}"],["27f9","\\Longrightarrow{}"],["27fa","\\Longleftrightarrow{}"],["27fc","\\longmapsto{}"],["27ff","\\sim\\joinrel\\leadsto"],["2905","\\ElsevierGlyph{E212}"],["2912","\\UpArrowBar{}"],["2913","\\DownArrowBar{}"],["2923","\\ElsevierGlyph{E20C}"],["2924","\\ElsevierGlyph{E20D}"],["2925","\\ElsevierGlyph{E20B}"],["2926","\\ElsevierGlyph{E20A}"],["2927","\\ElsevierGlyph{E211}"],["2928","\\ElsevierGlyph{E20E}"],["2929","\\ElsevierGlyph{E20F}"],["292a","\\ElsevierGlyph{E210}"],["2933","\\ElsevierGlyph{E21C}"],["2936","\\ElsevierGlyph{E21A}"],["2937","\\ElsevierGlyph{E219}"],["2940","\\Elolarr{}"],["2941","\\Elorarr{}"],["2942","\\ElzRlarr{}"],["2944","\\ElzrLarr{}"],["2947","\\Elzrarrx{}"],["294e","\\LeftRightVector{}"],["294f","\\RightUpDownVector{}"],["2950","\\DownLeftRightVector{}"],["2951","\\LeftUpDownVector{}"],["2952","\\LeftVectorBar{}"],["2953","\\RightVectorBar{}"],["2954","\\RightUpVectorBar{}"],["2955","\\RightDownVectorBar{}"],["2956","\\DownLeftVectorBar{}"],["2957","\\DownRightVectorBar{}"],["2958","\\LeftUpVectorBar{}"],["2959","\\LeftDownVectorBar{}"],["295a","\\LeftTeeVector{}"],["295b","\\RightTeeVector{}"],["295c","\\RightUpTeeVector{}"],["295d","\\RightDownTeeVector{}"],["295e","\\DownLeftTeeVector{}"],["295f","\\DownRightTeeVector{}"],["2960","\\LeftUpTeeVector{}"],["2961","\\LeftDownTeeVector{}"],["296e","\\UpEquilibrium{}"],["296f","\\ReverseUpEquilibrium{}"],["2970","\\RoundImplies{}"],["297c","\\ElsevierGlyph{E214}"],["297d","\\ElsevierGlyph{E215}"],["2980","\\Elztfnc{}"],["2985","\\ElsevierGlyph{3018}"],["2986","\\Elroang{}"],["2993","<\\kern-0.58em("],["2994","\\ElsevierGlyph{E291}"],["2999","\\Elzddfnc{}"],["299c","\\Angle{}"],["29a0","\\Elzlpargt{}"],["29b5","\\ElsevierGlyph{E260}"],["29b6","\\ElsevierGlyph{E61B}"],["29ca","\\ElzLap{}"],["29cb","\\Elzdefas{}"],["29cf","\\LeftTriangleBar{}"],["29d0","\\RightTriangleBar{}"],["29dc","\\ElsevierGlyph{E372}"],["29eb","\\blacklozenge{}"],["29f4","\\RuleDelayed{}"],["2a04","\\Elxuplus{}"],["2a05","\\ElzThr{}"],["2a06","\\Elxsqcup{}"],["2a07","\\ElzInf{}"],["2a08","\\ElzSup{}"],["2a0d","\\ElzCint{}"],["2a0f","\\clockoint{}"],["2a10","\\ElsevierGlyph{E395}"],["2a16","\\sqrint{}"],["2a25","\\ElsevierGlyph{E25A}"],["2a2a","\\ElsevierGlyph{E25B}"],["2a2d","\\ElsevierGlyph{E25C}"],["2a2e","\\ElsevierGlyph{E25D}"],["2a2f","\\ElzTimes{}"],["2a34","\\ElsevierGlyph{E25E}"],["2a35","\\ElsevierGlyph{E25E}"],["2a3c","\\ElsevierGlyph{E259}"],["2a3f","\\amalg{}"],["2a53","\\ElzAnd{}"],["2a54","\\ElzOr{}"],["2a55","\\ElsevierGlyph{E36E}"],["2a56","\\ElOr{}"],["2a5e","\\perspcorrespond{}"],["2a5f","\\Elzminhat{}"],["2a63","\\ElsevierGlyph{225A}"],["2a6e","\\stackrel{*}{=}"],["2a75","\\Equal{}"],["2a7d","\\leqslant{}"],["2a7e","\\geqslant{}"],["2a85","\\lessapprox{}"],["2a86","\\gtrapprox{}"],["2a87","\\lneq{}"],["2a88","\\gneq{}"],["2a89","\\lnapprox{}"],["2a8a","\\gnapprox{}"],["2a8b","\\lesseqqgtr{}"],["2a8c","\\gtreqqless{}"],["2a95","\\eqslantless{}"],["2a96","\\eqslantgtr{}"],["2a9d","\\Pisymbol{ppi020}{117}"],["2a9e","\\Pisymbol{ppi020}{105}"],["2aa1","\\NestedLessLess{}"],["2aa2","\\NestedGreaterGreater{}"],["2aaf","\\preceq{}"],["2ab0","\\succeq{}"],["2ab5","\\precneqq{}"],["2ab6","\\succneqq{}"],["2ab7","\\precapprox{}"],["2ab8","\\succapprox{}"],["2ab9","\\precnapprox{}"],["2aba","\\succnapprox{}"],["2ac5","\\subseteqq{}"],["2ac6","\\supseteqq{}"],["2acb","\\subsetneqq{}"],["2acc","\\supsetneqq{}"],["2aeb","\\ElsevierGlyph{E30D}"],["2af6","\\Elztdcol{}"],["2afd","{{/}\\!\\!{/}}"],["300a","\\ElsevierGlyph{300A}"],["300b","\\ElsevierGlyph{300B}"],["3018","\\ElsevierGlyph{3018}"],["3019","\\ElsevierGlyph{3019}"],["301a","\\openbracketleft{}"],["301b","\\openbracketright{}"],["fb00","ff"],["fb01","fi"],["fb02","fl"],["fb03","ffi"],["fb04","ffl"],["d400","\\mathbf{A}"],["d401","\\mathbf{B}"],["d402","\\mathbf{C}"],["d403","\\mathbf{D}"],["d404","\\mathbf{E}"],["d405","\\mathbf{F}"],["d406","\\mathbf{G}"],["d407","\\mathbf{H}"],["d408","\\mathbf{I}"],["d409","\\mathbf{J}"],["d40a","\\mathbf{K}"],["d40b","\\mathbf{L}"],["d40c","\\mathbf{M}"],["d40d","\\mathbf{N}"],["d40e","\\mathbf{O}"],["d40f","\\mathbf{P}"],["d410","\\mathbf{Q}"],["d411","\\mathbf{R}"],["d412","\\mathbf{S}"],["d413","\\mathbf{T}"],["d414","\\mathbf{U}"],["d415","\\mathbf{V}"],["d416","\\mathbf{W}"],["d417","\\mathbf{X}"],["d418","\\mathbf{Y}"],["d419","\\mathbf{Z}"],["d41a","\\mathbf{a}"],["d41b","\\mathbf{b}"],["d41c","\\mathbf{c}"],["d41d","\\mathbf{d}"],["d41e","\\mathbf{e}"],["d41f","\\mathbf{f}"],["d420","\\mathbf{g}"],["d421","\\mathbf{h}"],["d422","\\mathbf{i}"],["d423","\\mathbf{j}"],["d424","\\mathbf{k}"],["d425","\\mathbf{l}"],["d426","\\mathbf{m}"],["d427","\\mathbf{n}"],["d428","\\mathbf{o}"],["d429","\\mathbf{p}"],["d42a","\\mathbf{q}"],["d42b","\\mathbf{r}"],["d42c","\\mathbf{s}"],["d42d","\\mathbf{t}"],["d42e","\\mathbf{u}"],["d42f","\\mathbf{v}"],["d430","\\mathbf{w}"],["d431","\\mathbf{x}"],["d432","\\mathbf{y}"],["d433","\\mathbf{z}"],["d434","\\mathsl{A}"],["d435","\\mathsl{B}"],["d436","\\mathsl{C}"],["d437","\\mathsl{D}"],["d438","\\mathsl{E}"],["d439","\\mathsl{F}"],["d43a","\\mathsl{G}"],["d43b","\\mathsl{H}"],["d43c","\\mathsl{I}"],["d43d","\\mathsl{J}"],["d43e","\\mathsl{K}"],["d43f","\\mathsl{L}"],["d440","\\mathsl{M}"],["d441","\\mathsl{N}"],["d442","\\mathsl{O}"],["d443","\\mathsl{P}"],["d444","\\mathsl{Q}"],["d445","\\mathsl{R}"],["d446","\\mathsl{S}"],["d447","\\mathsl{T}"],["d448","\\mathsl{U}"],["d449","\\mathsl{V}"],["d44a","\\mathsl{W}"],["d44b","\\mathsl{X}"],["d44c","\\mathsl{Y}"],["d44d","\\mathsl{Z}"],["d44e","\\mathsl{a}"],["d44f","\\mathsl{b}"],["d450","\\mathsl{c}"],["d451","\\mathsl{d}"],["d452","\\mathsl{e}"],["d453","\\mathsl{f}"],["d454","\\mathsl{g}"],["d456","\\mathsl{i}"],["d457","\\mathsl{j}"],["d458","\\mathsl{k}"],["d459","\\mathsl{l}"],["d45a","\\mathsl{m}"],["d45b","\\mathsl{n}"],["d45c","\\mathsl{o}"],["d45d","\\mathsl{p}"],["d45e","\\mathsl{q}"],["d45f","\\mathsl{r}"],["d460","\\mathsl{s}"],["d461","\\mathsl{t}"],["d462","\\mathsl{u}"],["d463","\\mathsl{v}"],["d464","\\mathsl{w}"],["d465","\\mathsl{x}"],["d466","\\mathsl{y}"],["d467","\\mathsl{z}"],["d468","\\mathbit{A}"],["d469","\\mathbit{B}"],["d46a","\\mathbit{C}"],["d46b","\\mathbit{D}"],["d46c","\\mathbit{E}"],["d46d","\\mathbit{F}"],["d46e","\\mathbit{G}"],["d46f","\\mathbit{H}"],["d470","\\mathbit{I}"],["d471","\\mathbit{J}"],["d472","\\mathbit{K}"],["d473","\\mathbit{L}"],["d474","\\mathbit{M}"],["d475","\\mathbit{N}"],["d476","\\mathbit{O}"],["d477","\\mathbit{P}"],["d478","\\mathbit{Q}"],["d479","\\mathbit{R}"],["d47a","\\mathbit{S}"],["d47b","\\mathbit{T}"],["d47c","\\mathbit{U}"],["d47d","\\mathbit{V}"],["d47e","\\mathbit{W}"],["d47f","\\mathbit{X}"],["d480","\\mathbit{Y}"],["d481","\\mathbit{Z}"],["d482","\\mathbit{a}"],["d483","\\mathbit{b}"],["d484","\\mathbit{c}"],["d485","\\mathbit{d}"],["d486","\\mathbit{e}"],["d487","\\mathbit{f}"],["d488","\\mathbit{g}"],["d489","\\mathbit{h}"],["d48a","\\mathbit{i}"],["d48b","\\mathbit{j}"],["d48c","\\mathbit{k}"],["d48d","\\mathbit{l}"],["d48e","\\mathbit{m}"],["d48f","\\mathbit{n}"],["d490","\\mathbit{o}"],["d491","\\mathbit{p}"],["d492","\\mathbit{q}"],["d493","\\mathbit{r}"],["d494","\\mathbit{s}"],["d495","\\mathbit{t}"],["d496","\\mathbit{u}"],["d497","\\mathbit{v}"],["d498","\\mathbit{w}"],["d499","\\mathbit{x}"],["d49a","\\mathbit{y}"],["d49b","\\mathbit{z}"],["d49c","\\mathscr{A}"],["d49e","\\mathscr{C}"],["d49f","\\mathscr{D}"],["d4a2","\\mathscr{G}"],["d4a5","\\mathscr{J}"],["d4a6","\\mathscr{K}"],["d4a9","\\mathscr{N}"],["d4aa","\\mathscr{O}"],["d4ab","\\mathscr{P}"],["d4ac","\\mathscr{Q}"],["d4ae","\\mathscr{S}"],["d4af","\\mathscr{T}"],["d4b0","\\mathscr{U}"],["d4b1","\\mathscr{V}"],["d4b2","\\mathscr{W}"],["d4b3","\\mathscr{X}"],["d4b4","\\mathscr{Y}"],["d4b5","\\mathscr{Z}"],["d4b6","\\mathscr{a}"],["d4b7","\\mathscr{b}"],["d4b8","\\mathscr{c}"],["d4b9","\\mathscr{d}"],["d4bb","\\mathscr{f}"],["d4bd","\\mathscr{h}"],["d4be","\\mathscr{i}"],["d4bf","\\mathscr{j}"],["d4c0","\\mathscr{k}"],["d4c1","\\mathscr{l}"],["d4c2","\\mathscr{m}"],["d4c3","\\mathscr{n}"],["d4c5","\\mathscr{p}"],["d4c6","\\mathscr{q}"],["d4c7","\\mathscr{r}"],["d4c8","\\mathscr{s}"],["d4c9","\\mathscr{t}"],["d4ca","\\mathscr{u}"],["d4cb","\\mathscr{v}"],["d4cc","\\mathscr{w}"],["d4cd","\\mathscr{x}"],["d4ce","\\mathscr{y}"],["d4cf","\\mathscr{z}"],["d4d0","\\mathmit{A}"],["d4d1","\\mathmit{B}"],["d4d2","\\mathmit{C}"],["d4d3","\\mathmit{D}"],["d4d4","\\mathmit{E}"],["d4d5","\\mathmit{F}"],["d4d6","\\mathmit{G}"],["d4d7","\\mathmit{H}"],["d4d8","\\mathmit{I}"],["d4d9","\\mathmit{J}"],["d4da","\\mathmit{K}"],["d4db","\\mathmit{L}"],["d4dc","\\mathmit{M}"],["d4dd","\\mathmit{N}"],["d4de","\\mathmit{O}"],["d4df","\\mathmit{P}"],["d4e0","\\mathmit{Q}"],["d4e1","\\mathmit{R}"],["d4e2","\\mathmit{S}"],["d4e3","\\mathmit{T}"],["d4e4","\\mathmit{U}"],["d4e5","\\mathmit{V}"],["d4e6","\\mathmit{W}"],["d4e7","\\mathmit{X}"],["d4e8","\\mathmit{Y}"],["d4e9","\\mathmit{Z}"],["d4ea","\\mathmit{a}"],["d4eb","\\mathmit{b}"],["d4ec","\\mathmit{c}"],["d4ed","\\mathmit{d}"],["d4ee","\\mathmit{e}"],["d4ef","\\mathmit{f}"],["d4f0","\\mathmit{g}"],["d4f1","\\mathmit{h}"],["d4f2","\\mathmit{i}"],["d4f3","\\mathmit{j}"],["d4f4","\\mathmit{k}"],["d4f5","\\mathmit{l}"],["d4f6","\\mathmit{m}"],["d4f7","\\mathmit{n}"],["d4f8","\\mathmit{o}"],["d4f9","\\mathmit{p}"],["d4fa","\\mathmit{q}"],["d4fb","\\mathmit{r}"],["d4fc","\\mathmit{s}"],["d4fd","\\mathmit{t}"],["d4fe","\\mathmit{u}"],["d4ff","\\mathmit{v}"],["d500","\\mathmit{w}"],["d501","\\mathmit{x}"],["d502","\\mathmit{y}"],["d503","\\mathmit{z}"],["d504","\\mathfrak{A}"],["d505","\\mathfrak{B}"],["d507","\\mathfrak{D}"],["d508","\\mathfrak{E}"],["d509","\\mathfrak{F}"],["d50a","\\mathfrak{G}"],["d50d","\\mathfrak{J}"],["d50e","\\mathfrak{K}"],["d50f","\\mathfrak{L}"],["d510","\\mathfrak{M}"],["d511","\\mathfrak{N}"],["d512","\\mathfrak{O}"],["d513","\\mathfrak{P}"],["d514","\\mathfrak{Q}"],["d516","\\mathfrak{S}"],["d517","\\mathfrak{T}"],["d518","\\mathfrak{U}"],["d519","\\mathfrak{V}"],["d51a","\\mathfrak{W}"],["d51b","\\mathfrak{X}"],["d51c","\\mathfrak{Y}"],["d51e","\\mathfrak{a}"],["d51f","\\mathfrak{b}"],["d520","\\mathfrak{c}"],["d521","\\mathfrak{d}"],["d522","\\mathfrak{e}"],["d523","\\mathfrak{f}"],["d524","\\mathfrak{g}"],["d525","\\mathfrak{h}"],["d526","\\mathfrak{i}"],["d527","\\mathfrak{j}"],["d528","\\mathfrak{k}"],["d529","\\mathfrak{l}"],["d52a","\\mathfrak{m}"],["d52b","\\mathfrak{n}"],["d52c","\\mathfrak{o}"],["d52d","\\mathfrak{p}"],["d52e","\\mathfrak{q}"],["d52f","\\mathfrak{r}"],["d530","\\mathfrak{s}"],["d531","\\mathfrak{t}"],["d532","\\mathfrak{u}"],["d533","\\mathfrak{v}"],["d534","\\mathfrak{w}"],["d535","\\mathfrak{x}"],["d536","\\mathfrak{y}"],["d537","\\mathfrak{z}"],["d538","\\mathbb{A}"],["d539","\\mathbb{B}"],["d53b","\\mathbb{D}"],["d53c","\\mathbb{E}"],["d53d","\\mathbb{F}"],["d53e","\\mathbb{G}"],["d540","\\mathbb{I}"],["d541","\\mathbb{J}"],["d542","\\mathbb{K}"],["d543","\\mathbb{L}"],["d544","\\mathbb{M}"],["d546","\\mathbb{O}"],["d54a","\\mathbb{S}"],["d54b","\\mathbb{T}"],["d54c","\\mathbb{U}"],["d54d","\\mathbb{V}"],["d54e","\\mathbb{W}"],["d54f","\\mathbb{X}"],["d550","\\mathbb{Y}"],["d552","\\mathbb{a}"],["d553","\\mathbb{b}"],["d554","\\mathbb{c}"],["d555","\\mathbb{d}"],["d556","\\mathbb{e}"],["d557","\\mathbb{f}"],["d558","\\mathbb{g}"],["d559","\\mathbb{h}"],["d55a","\\mathbb{i}"],["d55b","\\mathbb{j}"],["d55c","\\mathbb{k}"],["d55d","\\mathbb{l}"],["d55e","\\mathbb{m}"],["d55f","\\mathbb{n}"],["d560","\\mathbb{o}"],["d561","\\mathbb{p}"],["d562","\\mathbb{q}"],["d563","\\mathbb{r}"],["d564","\\mathbb{s}"],["d565","\\mathbb{t}"],["d566","\\mathbb{u}"],["d567","\\mathbb{v}"],["d568","\\mathbb{w}"],["d569","\\mathbb{x}"],["d56a","\\mathbb{y}"],["d56b","\\mathbb{z}"],["d56c","\\mathslbb{A}"],["d56d","\\mathslbb{B}"],["d56e","\\mathslbb{C}"],["d56f","\\mathslbb{D}"],["d570","\\mathslbb{E}"],["d571","\\mathslbb{F}"],["d572","\\mathslbb{G}"],["d573","\\mathslbb{H}"],["d574","\\mathslbb{I}"],["d575","\\mathslbb{J}"],["d576","\\mathslbb{K}"],["d577","\\mathslbb{L}"],["d578","\\mathslbb{M}"],["d579","\\mathslbb{N}"],["d57a","\\mathslbb{O}"],["d57b","\\mathslbb{P}"],["d57c","\\mathslbb{Q}"],["d57d","\\mathslbb{R}"],["d57e","\\mathslbb{S}"],["d57f","\\mathslbb{T}"],["d580","\\mathslbb{U}"],["d581","\\mathslbb{V}"],["d582","\\mathslbb{W}"],["d583","\\mathslbb{X}"],["d584","\\mathslbb{Y}"],["d585","\\mathslbb{Z}"],["d586","\\mathslbb{a}"],["d587","\\mathslbb{b}"],["d588","\\mathslbb{c}"],["d589","\\mathslbb{d}"],["d58a","\\mathslbb{e}"],["d58b","\\mathslbb{f}"],["d58c","\\mathslbb{g}"],["d58d","\\mathslbb{h}"],["d58e","\\mathslbb{i}"],["d58f","\\mathslbb{j}"],["d590","\\mathslbb{k}"],["d591","\\mathslbb{l}"],["d592","\\mathslbb{m}"],["d593","\\mathslbb{n}"],["d594","\\mathslbb{o}"],["d595","\\mathslbb{p}"],["d596","\\mathslbb{q}"],["d597","\\mathslbb{r}"],["d598","\\mathslbb{s}"],["d599","\\mathslbb{t}"],["d59a","\\mathslbb{u}"],["d59b","\\mathslbb{v}"],["d59c","\\mathslbb{w}"],["d59d","\\mathslbb{x}"],["d59e","\\mathslbb{y}"],["d59f","\\mathslbb{z}"],["d5a0","\\mathsf{A}"],["d5a1","\\mathsf{B}"],["d5a2","\\mathsf{C}"],["d5a3","\\mathsf{D}"],["d5a4","\\mathsf{E}"],["d5a5","\\mathsf{F}"],["d5a6","\\mathsf{G}"],["d5a7","\\mathsf{H}"],["d5a8","\\mathsf{I}"],["d5a9","\\mathsf{J}"],["d5aa","\\mathsf{K}"],["d5ab","\\mathsf{L}"],["d5ac","\\mathsf{M}"],["d5ad","\\mathsf{N}"],["d5ae","\\mathsf{O}"],["d5af","\\mathsf{P}"],["d5b0","\\mathsf{Q}"],["d5b1","\\mathsf{R}"],["d5b2","\\mathsf{S}"],["d5b3","\\mathsf{T}"],["d5b4","\\mathsf{U}"],["d5b5","\\mathsf{V}"],["d5b6","\\mathsf{W}"],["d5b7","\\mathsf{X}"],["d5b8","\\mathsf{Y}"],["d5b9","\\mathsf{Z}"],["d5ba","\\mathsf{a}"],["d5bb","\\mathsf{b}"],["d5bc","\\mathsf{c}"],["d5bd","\\mathsf{d}"],["d5be","\\mathsf{e}"],["d5bf","\\mathsf{f}"],["d5c0","\\mathsf{g}"],["d5c1","\\mathsf{h}"],["d5c2","\\mathsf{i}"],["d5c3","\\mathsf{j}"],["d5c4","\\mathsf{k}"],["d5c5","\\mathsf{l}"],["d5c6","\\mathsf{m}"],["d5c7","\\mathsf{n}"],["d5c8","\\mathsf{o}"],["d5c9","\\mathsf{p}"],["d5ca","\\mathsf{q}"],["d5cb","\\mathsf{r}"],["d5cc","\\mathsf{s}"],["d5cd","\\mathsf{t}"],["d5ce","\\mathsf{u}"],["d5cf","\\mathsf{v}"],["d5d0","\\mathsf{w}"],["d5d1","\\mathsf{x}"],["d5d2","\\mathsf{y}"],["d5d3","\\mathsf{z}"],["d5d4","\\mathsfbf{A}"],["d5d5","\\mathsfbf{B}"],["d5d6","\\mathsfbf{C}"],["d5d7","\\mathsfbf{D}"],["d5d8","\\mathsfbf{E}"],["d5d9","\\mathsfbf{F}"],["d5da","\\mathsfbf{G}"],["d5db","\\mathsfbf{H}"],["d5dc","\\mathsfbf{I}"],["d5dd","\\mathsfbf{J}"],["d5de","\\mathsfbf{K}"],["d5df","\\mathsfbf{L}"],["d5e0","\\mathsfbf{M}"],["d5e1","\\mathsfbf{N}"],["d5e2","\\mathsfbf{O}"],["d5e3","\\mathsfbf{P}"],["d5e4","\\mathsfbf{Q}"],["d5e5","\\mathsfbf{R}"],["d5e6","\\mathsfbf{S}"],["d5e7","\\mathsfbf{T}"],["d5e8","\\mathsfbf{U}"],["d5e9","\\mathsfbf{V}"],["d5ea","\\mathsfbf{W}"],["d5eb","\\mathsfbf{X}"],["d5ec","\\mathsfbf{Y}"],["d5ed","\\mathsfbf{Z}"],["d5ee","\\mathsfbf{a}"],["d5ef","\\mathsfbf{b}"],["d5f0","\\mathsfbf{c}"],["d5f1","\\mathsfbf{d}"],["d5f2","\\mathsfbf{e}"],["d5f3","\\mathsfbf{f}"],["d5f4","\\mathsfbf{g}"],["d5f5","\\mathsfbf{h}"],["d5f6","\\mathsfbf{i}"],["d5f7","\\mathsfbf{j}"],["d5f8","\\mathsfbf{k}"],["d5f9","\\mathsfbf{l}"],["d5fa","\\mathsfbf{m}"],["d5fb","\\mathsfbf{n}"],["d5fc","\\mathsfbf{o}"],["d5fd","\\mathsfbf{p}"],["d5fe","\\mathsfbf{q}"],["d5ff","\\mathsfbf{r}"],["d600","\\mathsfbf{s}"],["d601","\\mathsfbf{t}"],["d602","\\mathsfbf{u}"],["d603","\\mathsfbf{v}"],["d604","\\mathsfbf{w}"],["d605","\\mathsfbf{x}"],["d606","\\mathsfbf{y}"],["d607","\\mathsfbf{z}"],["d608","\\mathsfsl{A}"],["d609","\\mathsfsl{B}"],["d60a","\\mathsfsl{C}"],["d60b","\\mathsfsl{D}"],["d60c","\\mathsfsl{E}"],["d60d","\\mathsfsl{F}"],["d60e","\\mathsfsl{G}"],["d60f","\\mathsfsl{H}"],["d610","\\mathsfsl{I}"],["d611","\\mathsfsl{J}"],["d612","\\mathsfsl{K}"],["d613","\\mathsfsl{L}"],["d614","\\mathsfsl{M}"],["d615","\\mathsfsl{N}"],["d616","\\mathsfsl{O}"],["d617","\\mathsfsl{P}"],["d618","\\mathsfsl{Q}"],["d619","\\mathsfsl{R}"],["d61a","\\mathsfsl{S}"],["d61b","\\mathsfsl{T}"],["d61c","\\mathsfsl{U}"],["d61d","\\mathsfsl{V}"],["d61e","\\mathsfsl{W}"],["d61f","\\mathsfsl{X}"],["d620","\\mathsfsl{Y}"],["d621","\\mathsfsl{Z}"],["d622","\\mathsfsl{a}"],["d623","\\mathsfsl{b}"],["d624","\\mathsfsl{c}"],["d625","\\mathsfsl{d}"],["d626","\\mathsfsl{e}"],["d627","\\mathsfsl{f}"],["d628","\\mathsfsl{g}"],["d629","\\mathsfsl{h}"],["d62a","\\mathsfsl{i}"],["d62b","\\mathsfsl{j}"],["d62c","\\mathsfsl{k}"],["d62d","\\mathsfsl{l}"],["d62e","\\mathsfsl{m}"],["d62f","\\mathsfsl{n}"],["d630","\\mathsfsl{o}"],["d631","\\mathsfsl{p}"],["d632","\\mathsfsl{q}"],["d633","\\mathsfsl{r}"],["d634","\\mathsfsl{s}"],["d635","\\mathsfsl{t}"],["d636","\\mathsfsl{u}"],["d637","\\mathsfsl{v}"],["d638","\\mathsfsl{w}"],["d639","\\mathsfsl{x}"],["d63a","\\mathsfsl{y}"],["d63b","\\mathsfsl{z}"],["d63c","\\mathsfbfsl{A}"],["d63d","\\mathsfbfsl{B}"],["d63e","\\mathsfbfsl{C}"],["d63f","\\mathsfbfsl{D}"],["d640","\\mathsfbfsl{E}"],["d641","\\mathsfbfsl{F}"],["d642","\\mathsfbfsl{G}"],["d643","\\mathsfbfsl{H}"],["d644","\\mathsfbfsl{I}"],["d645","\\mathsfbfsl{J}"],["d646","\\mathsfbfsl{K}"],["d647","\\mathsfbfsl{L}"],["d648","\\mathsfbfsl{M}"],["d649","\\mathsfbfsl{N}"],["d64a","\\mathsfbfsl{O}"],["d64b","\\mathsfbfsl{P}"],["d64c","\\mathsfbfsl{Q}"],["d64d","\\mathsfbfsl{R}"],["d64e","\\mathsfbfsl{S}"],["d64f","\\mathsfbfsl{T}"],["d650","\\mathsfbfsl{U}"],["d651","\\mathsfbfsl{V}"],["d652","\\mathsfbfsl{W}"],["d653","\\mathsfbfsl{X}"],["d654","\\mathsfbfsl{Y}"],["d655","\\mathsfbfsl{Z}"],["d656","\\mathsfbfsl{a}"],["d657","\\mathsfbfsl{b}"],["d658","\\mathsfbfsl{c}"],["d659","\\mathsfbfsl{d}"],["d65a","\\mathsfbfsl{e}"],["d65b","\\mathsfbfsl{f}"],["d65c","\\mathsfbfsl{g}"],["d65d","\\mathsfbfsl{h}"],["d65e","\\mathsfbfsl{i}"],["d65f","\\mathsfbfsl{j}"],["d660","\\mathsfbfsl{k}"],["d661","\\mathsfbfsl{l}"],["d662","\\mathsfbfsl{m}"],["d663","\\mathsfbfsl{n}"],["d664","\\mathsfbfsl{o}"],["d665","\\mathsfbfsl{p}"],["d666","\\mathsfbfsl{q}"],["d667","\\mathsfbfsl{r}"],["d668","\\mathsfbfsl{s}"],["d669","\\mathsfbfsl{t}"],["d66a","\\mathsfbfsl{u}"],["d66b","\\mathsfbfsl{v}"],["d66c","\\mathsfbfsl{w}"],["d66d","\\mathsfbfsl{x}"],["d66e","\\mathsfbfsl{y}"],["d66f","\\mathsfbfsl{z}"],["d670","\\mathtt{A}"],["d671","\\mathtt{B}"],["d672","\\mathtt{C}"],["d673","\\mathtt{D}"],["d674","\\mathtt{E}"],["d675","\\mathtt{F}"],["d676","\\mathtt{G}"],["d677","\\mathtt{H}"],["d678","\\mathtt{I}"],["d679","\\mathtt{J}"],["d67a","\\mathtt{K}"],["d67b","\\mathtt{L}"],["d67c","\\mathtt{M}"],["d67d","\\mathtt{N}"],["d67e","\\mathtt{O}"],["d67f","\\mathtt{P}"],["d680","\\mathtt{Q}"],["d681","\\mathtt{R}"],["d682","\\mathtt{S}"],["d683","\\mathtt{T}"],["d684","\\mathtt{U}"],["d685","\\mathtt{V}"],["d686","\\mathtt{W}"],["d687","\\mathtt{X}"],["d688","\\mathtt{Y}"],["d689","\\mathtt{Z}"],["d68a","\\mathtt{a}"],["d68b","\\mathtt{b}"],["d68c","\\mathtt{c}"],["d68d","\\mathtt{d}"],["d68e","\\mathtt{e}"],["d68f","\\mathtt{f}"],["d690","\\mathtt{g}"],["d691","\\mathtt{h}"],["d692","\\mathtt{i}"],["d693","\\mathtt{j}"],["d694","\\mathtt{k}"],["d695","\\mathtt{l}"],["d696","\\mathtt{m}"],["d697","\\mathtt{n}"],["d698","\\mathtt{o}"],["d699","\\mathtt{p}"],["d69a","\\mathtt{q}"],["d69b","\\mathtt{r}"],["d69c","\\mathtt{s}"],["d69d","\\mathtt{t}"],["d69e","\\mathtt{u}"],["d69f","\\mathtt{v}"],["d6a0","\\mathtt{w}"],["d6a1","\\mathtt{x}"],["d6a2","\\mathtt{y}"],["d6a3","\\mathtt{z}"],["d6a8","\\mathbf{\\Alpha}"],["d6a9","\\mathbf{\\Beta}"],["d6aa","\\mathbf{\\Gamma}"],["d6ab","\\mathbf{\\Delta}"],["d6ac","\\mathbf{\\Epsilon}"],["d6ad","\\mathbf{\\Zeta}"],["d6ae","\\mathbf{\\Eta}"],["d6af","\\mathbf{\\Theta}"],["d6b0","\\mathbf{\\Iota}"],["d6b1","\\mathbf{\\Kappa}"],["d6b2","\\mathbf{\\Lambda}"],["d6b5","\\mathbf{\\Xi}"],["d6b7","\\mathbf{\\Pi}"],["d6b8","\\mathbf{\\Rho}"],["d6b9","\\mathbf{\\vartheta}"],["d6ba","\\mathbf{\\Sigma}"],["d6bb","\\mathbf{\\Tau}"],["d6bc","\\mathbf{\\Upsilon}"],["d6bd","\\mathbf{\\Phi}"],["d6be","\\mathbf{\\Chi}"],["d6bf","\\mathbf{\\Psi}"],["d6c0","\\mathbf{\\Omega}"],["d6c1","\\mathbf{\\nabla}"],["d6c2","\\mathbf{\\Alpha}"],["d6c3","\\mathbf{\\Beta}"],["d6c4","\\mathbf{\\Gamma}"],["d6c5","\\mathbf{\\Delta}"],["d6c6","\\mathbf{\\Epsilon}"],["d6c7","\\mathbf{\\Zeta}"],["d6c8","\\mathbf{\\Eta}"],["d6c9","\\mathbf{\\theta}"],["d6ca","\\mathbf{\\Iota}"],["d6cb","\\mathbf{\\Kappa}"],["d6cc","\\mathbf{\\Lambda}"],["d6cf","\\mathbf{\\Xi}"],["d6d1","\\mathbf{\\Pi}"],["d6d2","\\mathbf{\\Rho}"],["d6d3","\\mathbf{\\varsigma}"],["d6d4","\\mathbf{\\Sigma}"],["d6d5","\\mathbf{\\Tau}"],["d6d6","\\mathbf{\\Upsilon}"],["d6d7","\\mathbf{\\Phi}"],["d6d8","\\mathbf{\\Chi}"],["d6d9","\\mathbf{\\Psi}"],["d6da","\\mathbf{\\Omega}"],["d6db","\\partial{}"],["d6dc","\\in"],["d6dd","\\mathbf{\\vartheta}"],["d6de","\\mathbf{\\varkappa}"],["d6df","\\mathbf{\\phi}"],["d6e0","\\mathbf{\\varrho}"],["d6e1","\\mathbf{\\varpi}"],["d6e2","\\mathsl{\\Alpha}"],["d6e3","\\mathsl{\\Beta}"],["d6e4","\\mathsl{\\Gamma}"],["d6e5","\\mathsl{\\Delta}"],["d6e6","\\mathsl{\\Epsilon}"],["d6e7","\\mathsl{\\Zeta}"],["d6e8","\\mathsl{\\Eta}"],["d6e9","\\mathsl{\\Theta}"],["d6ea","\\mathsl{\\Iota}"],["d6eb","\\mathsl{\\Kappa}"],["d6ec","\\mathsl{\\Lambda}"],["d6ef","\\mathsl{\\Xi}"],["d6f1","\\mathsl{\\Pi}"],["d6f2","\\mathsl{\\Rho}"],["d6f3","\\mathsl{\\vartheta}"],["d6f4","\\mathsl{\\Sigma}"],["d6f5","\\mathsl{\\Tau}"],["d6f6","\\mathsl{\\Upsilon}"],["d6f7","\\mathsl{\\Phi}"],["d6f8","\\mathsl{\\Chi}"],["d6f9","\\mathsl{\\Psi}"],["d6fa","\\mathsl{\\Omega}"],["d6fb","\\mathsl{\\nabla}"],["d6fc","\\mathsl{\\Alpha}"],["d6fd","\\mathsl{\\Beta}"],["d6fe","\\mathsl{\\Gamma}"],["d6ff","\\mathsl{\\Delta}"],["d700","\\mathsl{\\Epsilon}"],["d701","\\mathsl{\\Zeta}"],["d702","\\mathsl{\\Eta}"],["d703","\\mathsl{\\Theta}"],["d704","\\mathsl{\\Iota}"],["d705","\\mathsl{\\Kappa}"],["d706","\\mathsl{\\Lambda}"],["d709","\\mathsl{\\Xi}"],["d70b","\\mathsl{\\Pi}"],["d70c","\\mathsl{\\Rho}"],["d70d","\\mathsl{\\varsigma}"],["d70e","\\mathsl{\\Sigma}"],["d70f","\\mathsl{\\Tau}"],["d710","\\mathsl{\\Upsilon}"],["d711","\\mathsl{\\Phi}"],["d712","\\mathsl{\\Chi}"],["d713","\\mathsl{\\Psi}"],["d714","\\mathsl{\\Omega}"],["d715","\\partial{}"],["d716","\\in"],["d717","\\mathsl{\\vartheta}"],["d718","\\mathsl{\\varkappa}"],["d719","\\mathsl{\\phi}"],["d71a","\\mathsl{\\varrho}"],["d71b","\\mathsl{\\varpi}"],["d71c","\\mathbit{\\Alpha}"],["d71d","\\mathbit{\\Beta}"],["d71e","\\mathbit{\\Gamma}"],["d71f","\\mathbit{\\Delta}"],["d720","\\mathbit{\\Epsilon}"],["d721","\\mathbit{\\Zeta}"],["d722","\\mathbit{\\Eta}"],["d723","\\mathbit{\\Theta}"],["d724","\\mathbit{\\Iota}"],["d725","\\mathbit{\\Kappa}"],["d726","\\mathbit{\\Lambda}"],["d729","\\mathbit{\\Xi}"],["d72b","\\mathbit{\\Pi}"],["d72c","\\mathbit{\\Rho}"],["d72d","\\mathbit{O}"],["d72e","\\mathbit{\\Sigma}"],["d72f","\\mathbit{\\Tau}"],["d730","\\mathbit{\\Upsilon}"],["d731","\\mathbit{\\Phi}"],["d732","\\mathbit{\\Chi}"],["d733","\\mathbit{\\Psi}"],["d734","\\mathbit{\\Omega}"],["d735","\\mathbit{\\nabla}"],["d736","\\mathbit{\\Alpha}"],["d737","\\mathbit{\\Beta}"],["d738","\\mathbit{\\Gamma}"],["d739","\\mathbit{\\Delta}"],["d73a","\\mathbit{\\Epsilon}"],["d73b","\\mathbit{\\Zeta}"],["d73c","\\mathbit{\\Eta}"],["d73d","\\mathbit{\\Theta}"],["d73e","\\mathbit{\\Iota}"],["d73f","\\mathbit{\\Kappa}"],["d740","\\mathbit{\\Lambda}"],["d743","\\mathbit{\\Xi}"],["d745","\\mathbit{\\Pi}"],["d746","\\mathbit{\\Rho}"],["d747","\\mathbit{\\varsigma}"],["d748","\\mathbit{\\Sigma}"],["d749","\\mathbit{\\Tau}"],["d74a","\\mathbit{\\Upsilon}"],["d74b","\\mathbit{\\Phi}"],["d74c","\\mathbit{\\Chi}"],["d74d","\\mathbit{\\Psi}"],["d74e","\\mathbit{\\Omega}"],["d74f","\\partial{}"],["d750","\\in"],["d751","\\mathbit{\\vartheta}"],["d752","\\mathbit{\\varkappa}"],["d753","\\mathbit{\\phi}"],["d754","\\mathbit{\\varrho}"],["d755","\\mathbit{\\varpi}"],["d756","\\mathsfbf{\\Alpha}"],["d757","\\mathsfbf{\\Beta}"],["d758","\\mathsfbf{\\Gamma}"],["d759","\\mathsfbf{\\Delta}"],["d75a","\\mathsfbf{\\Epsilon}"],["d75b","\\mathsfbf{\\Zeta}"],["d75c","\\mathsfbf{\\Eta}"],["d75d","\\mathsfbf{\\Theta}"],["d75e","\\mathsfbf{\\Iota}"],["d75f","\\mathsfbf{\\Kappa}"],["d760","\\mathsfbf{\\Lambda}"],["d763","\\mathsfbf{\\Xi}"],["d765","\\mathsfbf{\\Pi}"],["d766","\\mathsfbf{\\Rho}"],["d767","\\mathsfbf{\\vartheta}"],["d768","\\mathsfbf{\\Sigma}"],["d769","\\mathsfbf{\\Tau}"],["d76a","\\mathsfbf{\\Upsilon}"],["d76b","\\mathsfbf{\\Phi}"],["d76c","\\mathsfbf{\\Chi}"],["d76d","\\mathsfbf{\\Psi}"],["d76e","\\mathsfbf{\\Omega}"],["d76f","\\mathsfbf{\\nabla}"],["d770","\\mathsfbf{\\Alpha}"],["d771","\\mathsfbf{\\Beta}"],["d772","\\mathsfbf{\\Gamma}"],["d773","\\mathsfbf{\\Delta}"],["d774","\\mathsfbf{\\Epsilon}"],["d775","\\mathsfbf{\\Zeta}"],["d776","\\mathsfbf{\\Eta}"],["d777","\\mathsfbf{\\Theta}"],["d778","\\mathsfbf{\\Iota}"],["d779","\\mathsfbf{\\Kappa}"],["d77a","\\mathsfbf{\\Lambda}"],["d77d","\\mathsfbf{\\Xi}"],["d77f","\\mathsfbf{\\Pi}"],["d780","\\mathsfbf{\\Rho}"],["d781","\\mathsfbf{\\varsigma}"],["d782","\\mathsfbf{\\Sigma}"],["d783","\\mathsfbf{\\Tau}"],["d784","\\mathsfbf{\\Upsilon}"],["d785","\\mathsfbf{\\Phi}"],["d786","\\mathsfbf{\\Chi}"],["d787","\\mathsfbf{\\Psi}"],["d788","\\mathsfbf{\\Omega}"],["d789","\\partial{}"],["d78a","\\in"],["d78b","\\mathsfbf{\\vartheta}"],["d78c","\\mathsfbf{\\varkappa}"],["d78d","\\mathsfbf{\\phi}"],["d78e","\\mathsfbf{\\varrho}"],["d78f","\\mathsfbf{\\varpi}"],["d790","\\mathsfbfsl{\\Alpha}"],["d791","\\mathsfbfsl{\\Beta}"],["d792","\\mathsfbfsl{\\Gamma}"],["d793","\\mathsfbfsl{\\Delta}"],["d794","\\mathsfbfsl{\\Epsilon}"],["d795","\\mathsfbfsl{\\Zeta}"],["d796","\\mathsfbfsl{\\Eta}"],["d797","\\mathsfbfsl{\\vartheta}"],["d798","\\mathsfbfsl{\\Iota}"],["d799","\\mathsfbfsl{\\Kappa}"],["d79a","\\mathsfbfsl{\\Lambda}"],["d79d","\\mathsfbfsl{\\Xi}"],["d79f","\\mathsfbfsl{\\Pi}"],["d7a0","\\mathsfbfsl{\\Rho}"],["d7a1","\\mathsfbfsl{\\vartheta}"],["d7a2","\\mathsfbfsl{\\Sigma}"],["d7a3","\\mathsfbfsl{\\Tau}"],["d7a4","\\mathsfbfsl{\\Upsilon}"],["d7a5","\\mathsfbfsl{\\Phi}"],["d7a6","\\mathsfbfsl{\\Chi}"],["d7a7","\\mathsfbfsl{\\Psi}"],["d7a8","\\mathsfbfsl{\\Omega}"],["d7a9","\\mathsfbfsl{\\nabla}"],["d7aa","\\mathsfbfsl{\\Alpha}"],["d7ab","\\mathsfbfsl{\\Beta}"],["d7ac","\\mathsfbfsl{\\Gamma}"],["d7ad","\\mathsfbfsl{\\Delta}"],["d7ae","\\mathsfbfsl{\\Epsilon}"],["d7af","\\mathsfbfsl{\\Zeta}"],["d7b0","\\mathsfbfsl{\\Eta}"],["d7b1","\\mathsfbfsl{\\vartheta}"],["d7b2","\\mathsfbfsl{\\Iota}"],["d7b3","\\mathsfbfsl{\\Kappa}"],["d7b4","\\mathsfbfsl{\\Lambda}"],["d7b7","\\mathsfbfsl{\\Xi}"],["d7b9","\\mathsfbfsl{\\Pi}"],["d7ba","\\mathsfbfsl{\\Rho}"],["d7bb","\\mathsfbfsl{\\varsigma}"],["d7bc","\\mathsfbfsl{\\Sigma}"],["d7bd","\\mathsfbfsl{\\Tau}"],["d7be","\\mathsfbfsl{\\Upsilon}"],["d7bf","\\mathsfbfsl{\\Phi}"],["d7c0","\\mathsfbfsl{\\Chi}"],["d7c1","\\mathsfbfsl{\\Psi}"],["d7c2","\\mathsfbfsl{\\Omega}"],["d7c3","\\partial{}"],["d7c4","\\in"],["d7c5","\\mathsfbfsl{\\vartheta}"],["d7c6","\\mathsfbfsl{\\varkappa}"],["d7c7","\\mathsfbfsl{\\phi}"],["d7c8","\\mathsfbfsl{\\varrho}"],["d7c9","\\mathsfbfsl{\\varpi}"],["d7ce","\\mathbf{0}"],["d7cf","\\mathbf{1}"],["d7d0","\\mathbf{2}"],["d7d1","\\mathbf{3}"],["d7d2","\\mathbf{4}"],["d7d3","\\mathbf{5}"],["d7d4","\\mathbf{6}"],["d7d5","\\mathbf{7}"],["d7d6","\\mathbf{8}"],["d7d7","\\mathbf{9}"],["d7d8","\\mathbb{0}"],["d7d9","\\mathbb{1}"],["d7da","\\mathbb{2}"],["d7db","\\mathbb{3}"],["d7dc","\\mathbb{4}"],["d7dd","\\mathbb{5}"],["d7de","\\mathbb{6}"],["d7df","\\mathbb{7}"],["d7e0","\\mathbb{8}"],["d7e1","\\mathbb{9}"],["d7e2","\\mathsf{0}"],["d7e3","\\mathsf{1}"],["d7e4","\\mathsf{2}"],["d7e5","\\mathsf{3}"],["d7e6","\\mathsf{4}"],["d7e7","\\mathsf{5}"],["d7e8","\\mathsf{6}"],["d7e9","\\mathsf{7}"],["d7ea","\\mathsf{8}"],["d7eb","\\mathsf{9}"],["d7ec","\\mathsfbf{0}"],["d7ed","\\mathsfbf{1}"],["d7ee","\\mathsfbf{2}"],["d7ef","\\mathsfbf{3}"],["d7f0","\\mathsfbf{4}"],["d7f1","\\mathsfbf{5}"],["d7f2","\\mathsfbf{6}"],["d7f3","\\mathsfbf{7}"],["d7f4","\\mathsfbf{8}"],["d7f5","\\mathsfbf{9}"],["d7f6","\\mathtt{0}"],["d7f7","\\mathtt{1}"],["d7f8","\\mathtt{2}"],["d7f9","\\mathtt{3}"],["d7fa","\\mathtt{4}"],["d7fb","\\mathtt{5}"],["d7fc","\\mathtt{6}"],["d7fd","\\mathtt{7}"],["d7fe","\\mathtt{8}"],["d7ff","\\mathtt{9}"]]);function Ne(g){let E=g;const y=[];E=E.replace(/\$[^$]+\$/g,ee=>(y.push(ee),`MATH.EXP.${y.length-1}`));let H="",q=!1;for(let ee=0;ee<E.length;ee++){if(q){q=!1,H+=E[ee];continue}if(E[ee]==="\\"){q=!0,H+=E[ee];continue}const V=E.charCodeAt(ee).toString(16).padStart(4,"0");H+=Fe.get(V)??E[ee]}return H.replace(/MATH\.EXP\.(\d+)/g,(ee,V)=>y[Number(V)]??"")}r(Ne,"escapeSpecialCharacters");function Ce(g){return g.replace(/(\w)(\S*)/g,(E,y,H)=>{const q=y+H;return v(q)?q:y.toLocaleUpperCase()+H.toLocaleLowerCase()})}r(Ce,"titleCase");function v(g){return/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(g)}r(v,"isRomanNumeral");function ue(g){return g.replace(/[^0-9A-Za-z]/g,"").toLocaleLowerCase()}r(ue,"alphaNum");function Z(g){return g.replace(/\r\n?/g,`
|
|
17
|
-
`)}r(Z,"convertCRLF");function Y(g,E){const y=g.split(" "),H=[];let q="";for(const[ee,V]of y.entries())q.length+V.length+1>E&&ee>0&&(H.push(q.trim()),q=""),q+=`${V} `;return[...H,q.trim()]}r(Y,"wrapText");function ce(g){return g.replace(/\s*\n\s*\n\s*/g,"<<BIBTEX_TIDY_PARA>>").replace(/\s*\n\s*/g," ").replace(/<<BIBTEX_TIDY_PARA>>/g,`
|
|
18
|
-
|
|
19
|
-
`)}r(ce,"unwrapText");function I(g){const E=R(g),y=E.children.length===1&&E.children[0]?.type==="block"&&E.children[0]?.kind==="curly"&&E.children[0].children.length===1&&E.children[0].children[0]?.type==="block"&&E.children[0].children[0]?.kind==="curly",H=A(E);return y?H:`{${H}}`}r(I,"doubleEnclose");function ie(g){return g.replace(/^\{([^{}]*)\}$/g,"$1")}r(ie,"removeEnclosingBraces");function j(g){return g.replace(/\\?_/g,"\\%5F")}r(j,"escapeURL");function me(g,E){const y=g.split(" and ");return y.length>E?[...y.slice(0,E),"others"].join(" and "):g}r(me,"limitAuthors");function Ee(g){let E=g;for(let y=0;y<4;y++)E=E.replace(/(\d)\s*-\s*(\d)/g,"$1--$2");return E}r(Ee,"formatPageRange");function tt(g){return g.type!=="text"&&g.block?.type==="entry"}r(tt,"isEntryNode");function Dt(g,E,y,H){const q=new Map;if(y)for(const Se of y)q.set(Se,!!H);q.has("key")||q.set("key",!1);const ee=new Set,V=[],fe=new Map,xe=new Map,qe=new Map,Oe=new Map;for(const Se of ut(g)){const st=E.get(Se);if(st)for(const[gt,Ue]of q){let rt,at;switch(gt){case"key":{if(!Se.key)continue;const Xe=Se.key.toLocaleLowerCase();rt=fe.get(Xe),rt?at=`The citation key ${Se.key} has already been used.`:fe.set(Xe,Se);break}case"doi":{const Xe=ue(st.get("doi")??"");if(!Xe)continue;rt=xe.get(Xe),rt?at=`Entry ${Se.key} has an identical DOI to entry ${rt.key}.`:xe.set(Xe,Se);break}case"citation":{const Xe=st.get("title"),Ft=st.get("author"),Tt=st.get("number");if(!Xe||!Ft)continue;const ct=[ue(z(Ft)[0]?.lastName??Ft),ue(Xe),ue(Tt??"0")].join(":");rt=qe.get(ct),rt?at=`Entry ${Se.key} has similar content to entry ${rt.key}.`:qe.set(ct,Se);break}case"abstract":{const Ft=ue(st.get("abstract")??"").slice(0,100);if(!Ft)continue;rt=Oe.get(Ft),rt?at=`Entry ${Se.key} has a similar abstract to entry ${rt.key}.`:Oe.set(Ft,Se);break}}rt&&Ue&&(ee.add(Se),Ye(H,rt,Se)),at&&V.push({code:"DUPLICATE_ENTRY",rule:gt,message:`Duplicate ${Ue?"removed":"detected"}. ${at}`})}}return{entries:ee,warnings:V}}r(Dt,"checkForDuplicates");function Ye(g,E,y){if(g)switch(g){case"last":E.key=y.key,E.fields=y.fields;break;case"combine":case"overwrite":for(const H of y.fields){const q=E.fields.find(ee=>ee.name.toLocaleLowerCase()===H.name.toLocaleLowerCase());q?g==="overwrite"&&(q.value=H.value):E.fields.push(H)}break;case"first":return}}r(Ye,"mergeEntries");var Me=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],Le=new Set(Me),Ie={1:"jan",2:"feb",3:"mar",4:"apr",5:"may",6:"jun",7:"jul",8:"aug",9:"sep",10:"oct",11:"nov",12:"dec",jan:"jan",feb:"feb",mar:"mar",apr:"apr",may:"may",jun:"jun",jul:"jul",aug:"aug",sep:"sep",oct:"oct",nov:"nov",dec:"dec",january:"jan",february:"feb",march:"mar",april:"apr",june:"jun",july:"jul",august:"aug",september:"sep",october:"oct",november:"nov",december:"dec"},yt=["url","doi","eprint","file","verba","verbb","verbc","pdf"];function ot(g,E,y){const{omit:H,tab:q,space:ee}=E,V=q?" ":" ".repeat(ee),fe=new Set(H);let xe=g.children.map(qe=>ye(qe,E,V,fe,y)).join("").trimEnd();return xe.endsWith(`
|
|
20
|
-
`)||(xe+=`
|
|
21
|
-
`),xe}r(ot,"formatBibtex");function ye(g,E,y,H,q){if(g.type==="text")return he(g.text,E);if(!g.block)throw new Error("FATAL!");switch(g.block.type){case"preamble":case"string":return`${g.block.raw}
|
|
22
|
-
${E.blankLines?`
|
|
23
|
-
`:""}`;case"comment":return he(g.block.raw,E);case"entry":return It(g.command,g.block,E,y,H,q?.get(g.block))+(E.blankLines?`
|
|
24
|
-
`:"")}}r(ye,"formatNode");function It(g,E,y,H,q,ee){const{align:V,trailingCommas:fe,removeDuplicateFields:xe,removeEmptyFields:qe,lowercase:Oe}=y;let Se="";const st=Oe?g.toLocaleLowerCase():g;Se+=`@${st}{`;const gt=ee??E.key;gt&&(Se+=`${gt},`);const Ue=new Set;for(const[rt,at]of E.fields.entries()){const Xe=at.name.toLocaleLowerCase(),Ft=Oe?Xe:at.name;if(at.name!==""&&!q.has(Xe)&&!(xe&&Ue.has(Xe))){if(Ue.add(Xe),at.value.concat.length===0){if(qe)continue;Se+=`
|
|
25
|
-
${H}${Ft}`}else{const Tt=ve(at,y);if(qe&&(Tt==="{}"||Tt==='""'))continue;Se+=`
|
|
26
|
-
${H}${Ft.trim().padEnd(V-1)} = ${Tt}`}(rt<E.fields.length-1||fe)&&(Se+=",")}}return Se+=`
|
|
27
|
-
}
|
|
28
|
-
`,Se}r(It,"formatEntry");function he(g,{stripComments:E,tidyComments:y}){if(E)return"";if(y){const H=g.trim();return H===""?"":`${H}
|
|
29
|
-
`}return g.replace(/^[ \t]*\n|[ \t]*$/g,"")}r(he,"formatComment");function ve(g,E){const{curly:y,numeric:H,align:q,stripEnclosingBraces:ee,dropAllCaps:V,escape:fe,encodeUrls:xe,wrap:qe,maxAuthors:Oe,tab:Se,space:st,enclosingBraces:gt,removeBraces:Ue,months:rt}=E,at=g.name.toLocaleLowerCase(),Xe=Se?" ":" ".repeat(st),Ft=new Set((gt??[]).map(ct=>ct.toLocaleLowerCase())),Tt=new Set((Ue??[]).map(ct=>ct.toLocaleLowerCase()));return g.value.concat.map(({type:ct,value:$e})=>{const qt=$e.match(/^[1-9][0-9]*$/);if(qt&&y&&(ct="braced"),rt&&at==="month"){const Un=Ie[$e.toLowerCase()];if(Un)return Un}if(ct==="literal"||H&&qt)return $e;const Mt=$e.slice(0,3).toLowerCase(),rs=at==="month"&&Le.has(Mt);if(!y&&H&&rs)return Mt;if($e=ce($e),ee&&($e=ie($e)),V&&!$e.match(/[a-z]/)&&($e=Ce($e)),at==="url"&&xe&&($e=j($e)),!yt.includes(at)&&fe&&($e=Ne($e)),at==="pages"&&($e=Ee($e)),at==="author"&&Oe&&($e=me($e,Oe)),Tt.has(at)&&($e=A(we(R($e)))),Ft.has(at)&&(ct==="braced"||y)&&($e=I($e)),ct==="braced"&&g.value.concat.length===1&&($e=$e.trim()),ct==="braced"||y){const Un=`${Xe}${q}{${$e}}`.length,Sn=$e.includes(`
|
|
30
|
-
|
|
31
|
-
`);if(qe&&Un>qe||Sn){let Tn=$e.split(`
|
|
32
|
-
|
|
33
|
-
`);const Je=Xe.repeat(2);if(qe){const Hn=qe;Tn=Tn.map(kt=>Y(kt,Hn-Je.length).join(`
|
|
34
|
-
${Je}`))}$e=`
|
|
35
|
-
${Je}${Tn.join(`
|
|
36
|
-
|
|
37
|
-
${Je}`)}
|
|
38
|
-
${Xe}`}return I($e)}return`"${$e}"`}).join(" # ")}r(ve,"formatValue");var Re={auth:{description:"Last name of first authors",callback:r(g=>{const y=z(g.get("author")??"",!0)[0]?.lastName.replace(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g,"_");return y?[y]:[]},"callback")},authEtAl:{description:"If 1 or 2 authors, both authors, otherwise first author and EtAl",callback:r(g=>{const E=z(g.get("author")??"",!0);return[...E.slice(0,2).map(y=>y.lastName.replace(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g,"_")),...E.length>2?["Et","Al"]:[]]},"callback")},authors:{description:"Last name all authors",callback:r(g=>z(g.get("author")??"",!0).map(y=>y.lastName.replace(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g,"_")),"callback")},authorsN:{description:"Last name N authors, with EtAl if more",callback:r((g,E=0)=>{const y=z(g.get("author")??"",!0);return[...y.slice(0,E).map(H=>H.lastName.replace(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g,"_")),...y.length>E?["Et","Al"]:[]]},"callback")},veryshorttitle:{description:"First non-function word of the title",callback:r(g=>He(ke(g)).slice(0,1),"callback")},shorttitle:{description:"First three non-function words of the title",callback:r(g=>He(ke(g)).slice(0,3),"callback")},title:{description:"Full title, capitalized",callback:r(g=>mt(Ve(ke(g))),"callback")},fulltitle:{description:"Full title, verbatim",callback:r(g=>Ve(ke(g)),"callback")},year:{description:"Year",callback:r(g=>{const E=g.get("year")?.replace(/[^0-9]/g,"");return E?[E]:[]},"callback")},duplicateLetter:{description:"If the multiple entries end up with the same key, then insert a letter a-z. By default this will be inserted at the end.",callback:r(()=>["[duplicateLetter]"],"callback")},duplicateNumber:{description:"If the multiple entries end up with the same key, then insert a number.",callback:r(()=>["[duplicateNumber]"],"callback")}},bt={required:{description:"If data is missing, revert to existing key",callback:r(g=>{if(g.length===0)throw new Ge;return g},"callback")},lower:{description:"Convert to lowercase",callback:r(g=>g.map(E=>E.toLocaleLowerCase()),"callback")},upper:{description:"Convert to uppercase",callback:r(g=>g.map(E=>E.toLocaleUpperCase()),"callback")},capitalize:{description:"Capitalize first letter of each word",callback:mt}},Ge=class extends Error{static{r(this,"MissingRequiredData")}};function G(g,E,y){let H=y;!y.includes("[duplicateLetter]")&&!y.includes("[duplicateNumber]")&&(H=`${y}[duplicateLetter]`);const q=new Map;for(const V of g.children)if(tt(V)){const fe=E.get(V.block);if(!fe)continue;const xe=De(fe,H);if(!xe)continue;const qe=q.get(xe)??[];q.set(xe,[...qe,V.block])}const ee=new Map;for(const[V,fe]of q)for(const[xe,qe]of fe.entries()){const Oe=fe.length>1?String.fromCharCode(97+xe):"",Se=fe.length>1?String(xe+1):"";qe.key=V.replace(/\[duplicateLetter\]/g,Oe).replace(/\[duplicateNumber\]/g,Se)}return ee}r(G,"generateKeys");function De(g,E){try{const y=E.replace(/\[[^:\]]+(?::[^:\]]+)*\]/g,H=>{const[q,...ee]=H.slice(1,-1).split(":");if(!q)throw new Error("Token parse error");let V;const fe=q.replace(/[0-9]+/g,Oe=>(V=Number(Oe),"N")),xe=Re[fe];let qe;if(xe)qe=xe.callback(g,V);else if(fe===fe.toLocaleUpperCase()){const Oe=g.get(fe.toLocaleLowerCase());qe=Oe?Ve(Oe):[]}else throw new Error(`Invalid citation key token ${fe}`);for(const Oe of ee){const Se=bt[Oe];if(Se)qe=Se.callback(qe);else throw new Error(`Invalid modifier ${Oe}`)}return qe.join("")});return y===""?void 0:y}catch(y){if(y instanceof Ge)return;throw y}}r(De,"generateKey");var X=new Set(["a","about","above","across","against","along","among","an","and","around","at","before","behind","below","beneath","beside","between","beyond","but","by","down","during","except","for","for","from","in","inside","into","like","near","nor","of","off","on","onto","or","since","so","the","through","to","toward","under","until","up","upon","with","within","without","yet"]);function He(g){return Ve(g).filter(E=>!X.has(E.toLocaleLowerCase()))}r(He,"nonFunctionWords");function Ve(g){return g.split(/(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/).filter(E=>E.length>0)}r(Ve,"words");function mt(g){return g.map(E=>E.slice(0,1).toLocaleUpperCase()+E.slice(1).toLocaleLowerCase())}r(mt,"capitalize");function ke(g){return g.get("title")??g.get("booktitle")??""}r(ke,"title");var xt=["doi","citation","abstract"],re=14,W=2,pt=80,zt=["title","shorttitle","author","year","month","day","journal","booktitle","location","on","publisher","address","series","volume","number","pages","doi","isbn","issn","url","urldate","copyright","category","note","metadata"],Gt=["key"],lt="[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]",rn=[{key:"help",cli:{"--help":!0,"-h":!0},title:"Help",description:["Show help"],type:"boolean"},{key:"v2",cli:{"--v2":!0},title:"Enable planned v2 CLI changes",description:["Input files will no longer be modified by default. Instead, you will need to specify `--modify`/`-m` option to overwrite the file, or `--output`/`-o` to output to a different file."],type:"string",defaultValue:void 0},{key:"outputPath",cli:{"--output":r(g=>g[0],"--output"),"-o":r(g=>g[0],"-o")},title:"Output path",description:["Write output to specified path. When omitted (and -m/--modify is not used), the result will be printed to stdout."],type:"string",defaultValue:void 0},{key:"modify",cli:{"--modify":!0,"-m":!0,"--no-modify":!1},title:"Modify input files",description:["Overwrite the original input files with the tidied result. This is enabled by default but will be disabled by default in v2. For v1, use --no-modify to output to stdout instead of overwriting the input files."],type:"boolean",defaultValue:!0},{key:"omit",cli:{"--omit":r(g=>(g.length===0&&(console.error("Expected a omit list"),process.exit(1)),g),"--omit")},toCLI:r(g=>Array.isArray(g)&&g.length>0?`--omit=${g.join(",")}`:void 0,"toCLI"),title:"Remove fields",description:["Remove specified fields from bibliography entries."],examples:["--omit=id,name"],type:"string[]",defaultValue:[]},{key:"curly",cli:{"--curly":!0,"--no-curly":!1},toCLI:r(g=>g?"--curly":void 0,"toCLI"),title:"Enclose values in braces",description:['Enclose all property values in braces. Quoted values will be converted to braces. For example, "Journal of Tea" will become {Journal of Tea}.'],type:"boolean",defaultValue:!1},{key:"numeric",cli:{"--numeric":!0,"--no-numeric":!1},toCLI:r(g=>g?"--numeric":void 0,"toCLI"),title:"Use numeric values where possible",description:["Strip quotes and braces from numeric/month values. For example, {1998} will become 1998."],type:"boolean",defaultValue:!1},{key:"months",cli:{"--months":!0},toCLI:r(g=>g?"--months":void 0,"toCLI"),title:"Abbreviate months",description:["Convert all months to three letter abbreviations (jan, feb, etc)."],type:"boolean",defaultValue:!1},{key:"space",cli:{"--space":r(g=>g.length>0?Number(g[0]):!0,"--space")},toCLI:r((g,E)=>{if(!E.tab){if(typeof g=="number"&&g!==W)return`--space=${g}`;if(g&&g!==W)return"--space"}},"toCLI"),title:"Indent with spaces",description:["Indent all fields with the specified number of spaces. Ignored if tab is set."],examples:["--space=2 (default)","--space=4"],type:"boolean | number",convertBoolean:{true:W,false:void 0},defaultValue:W},{key:"tab",cli:{"--tab":!0,"--no-tab":!1},toCLI:r(g=>g?"--tab":void 0,"toCLI"),title:"Indent with tabs",description:["Indent all fields with a tab."],type:"boolean",defaultValue:!1},{key:"align",cli:{"--align":r(g=>Number(g[0]),"--align"),"--no-align":!1},toCLI:r(g=>{if(g===!1||g===1||g===0)return"--no-align";if(typeof g=="number"&&g!==re)return`--align=${g}`},"toCLI"),title:"Align values",description:["Insert whitespace between fields and values so that values are visually aligned."],examples:["--align=14 (default)"],type:"boolean | number",convertBoolean:{true:re,false:1},defaultValue:re},{key:"blankLines",cli:{"--blank-lines":!0,"--no-blank-lines":!1},toCLI:r(g=>g?"--blank-lines":void 0,"toCLI"),title:"Insert blank lines",description:["Insert an empty line between each entry."],type:"boolean"},{key:"sort",cli:{"--sort":r(g=>g.length>0?g:!0,"--sort"),"--no-sort":!1},toCLI:r(g=>{if(Array.isArray(g)&&g.length>0)return`--sort=${g.join(",")}`;if(g===!0)return"--sort"},"toCLI"),title:"Sort bibliography entries",description:["Sort entries by the specified field names (citation key is used if no fields are specified). For descending order, prefix the field with a dash (-).","Multiple fields may be specified to sort everything by first field, then by the second field whenever the first field for entries are equal, etc.","The following additional fields are also permitted: key (entry citation key), type (sorts by the type of entry, e.g. article), and special (ensures that @string, @preamble, @set, and @xdata entries are first). "],examples:["--sort (sort by citation key)","--sort=-year,name (sort year descending then name ascending)","--sort=name,year"],type:"boolean | string[]",convertBoolean:{true:Gt,false:void 0}},{key:"duplicates",cli:{"--duplicates":r(g=>{if(g.length===0)return!0;for(const E of g)E!=="doi"&&E!=="key"&&E!=="abstract"&&E!=="citation"&&(console.error(`Invalid key for merge option: "${E}"`),process.exit(1));return g},"--duplicates")},toCLI:r(g=>{if(Array.isArray(g)&&g.length>0)return`--duplicates=${g.join(",")}`;if(g===!0)return"--duplicates"},"toCLI"),title:"Check for duplicates",description:["Warn if duplicates are found, which are entries where DOI, abstract, or author and title are the same."],examples:["--duplicates doi (same DOIs)","--duplicates key (same IDs)","--duplicates abstract (similar abstracts)","--duplicates citation (similar author and titles)","--duplicates doi, key (identical DOI or keys)","--duplicates (same DOI, key, abstract, or citation)"],type:"boolean | ('doi' | 'key' | 'abstract' | 'citation')[]",convertBoolean:{true:xt,false:void 0},defaultValue:r(g=>g.merge?xt:void 0,"defaultValue")},{key:"merge",cli:{"--merge":r(g=>g.length===0?!0:(g[0]!=="first"&&g[0]!=="last"&&g[0]!=="combine"&&g[0]!=="overwrite"&&(console.error(`Invalid merge strategy: "${g[0]}"`),process.exit(1)),g[0]),"--merge"),"--no-merge":!1},toCLI:r(g=>{if(typeof g=="string")return`--merge=${g}`;if(g)return"--merge"},"toCLI"),title:"Merge duplicate entries",description:["Merge duplicates entries. Use the duplicates option to determine how duplicates are identified. There are different ways to merge:","- first: only keep the original entry","- last: only keep the last found duplicate","- combine: keep original entry and merge in fields of duplicates if they do not already exist","- overwrite: keep original entry and merge in fields of duplicates, overwriting existing fields if they exist"],type:"boolean | 'first' | 'last' | 'combine' | 'overwrite'",convertBoolean:{true:"combine",false:void 0}},{key:"stripEnclosingBraces",cli:{"--strip-enclosing-braces":!0},toCLI:r(g=>g?"--strip-enclosing-braces":void 0,"toCLI"),title:"Strip double-braced values",description:["Where an entire value is enclosed in double braces, remove the extra braces. For example, {{Journal of Tea}} will become {Journal of Tea}."],type:"boolean",defaultValue:!1},{key:"dropAllCaps",cli:{"--drop-all-caps":!0},toCLI:r(g=>g?"--drop-all-caps":void 0,"toCLI"),title:"Drop all caps",description:["Where values are all caps, make them title case. For example, {JOURNAL OF TEA} will become {Journal of Tea}. Roman numerals will be left unchanged."],type:"boolean",defaultValue:!1},{key:"escape",cli:{"--escape":!0,"--no-escape":!1},toCLI:r(g=>g===!1?"--no-escape":void 0,"toCLI"),title:"Escape special characters",description:["Escape special characters, such as umlaut. This ensures correct typesetting with latex. Enabled by default."],type:"boolean",defaultValue:!0},{key:"sortFields",cli:{"--sort-fields":r(g=>g.length>0?g:!0,"--sort-fields")},toCLI:r(g=>{if(Array.isArray(g)&&g.length>0)return JSON.stringify(g)===JSON.stringify(zt)?"--sort-fields":`--sort-fields=${g.join(",")}`;if(g===!0)return"--sort-fields"},"toCLI"),title:"Sort fields",description:["Sort the fields within entries.","If no fields are specified fields will be sorted by: title, shorttitle, author, year, month, day, journal, booktitle, location, on, publisher, address, series, volume, number, pages, doi, isbn, issn, url, urldate, copyright, category, note, metadata"],examples:["--sort-fields=name,author"],type:"boolean | string[]",convertBoolean:{true:zt,false:void 0},defaultValue:void 0},{key:"sortProperties",cli:{"--sort-properties":r(g=>g.length>0?g:!0,"--sort-properties")},title:"Sort properties",description:["Alias of sort fields (legacy)"],type:"boolean | string[]",deprecated:!0},{key:"stripComments",cli:{"--strip-comments":!0,"--no-strip-comments":!1},toCLI:r(g=>g?"--strip-comments":void 0,"toCLI"),title:"Remove comments",description:["Remove all comments from the bibtex source."],type:"boolean",defaultValue:!1},{key:"trailingCommas",cli:{"--trailing-commas":!0,"--no-trailing-commas":!0},toCLI:r(g=>g?"--trailing-commas":void 0,"toCLI"),title:"Trailing commas",description:["End the last key value pair in each entry with a comma."],type:"boolean",defaultValue:!1},{key:"encodeUrls",cli:{"--encode-urls":!0,"--no-encode-urls":!0},toCLI:r(g=>g?"--encode-urls":void 0,"toCLI"),title:"Encode URLs",description:["Replace invalid URL characters with percent encoded values."],type:"boolean",defaultValue:!1},{key:"tidyComments",cli:{"--tidy-comments":!0,"--no-tidy-comments":!1},toCLI:r(g=>g===!1?"--no-tidy-comments":void 0,"toCLI"),title:"Tidy comments",description:["Remove whitespace surrounding comments."],type:"boolean",defaultValue:!0},{key:"removeEmptyFields",cli:{"--remove-empty-fields":!0,"--no-remove-empty-fields":!1},toCLI:r(g=>g?"--remove-empty-fields":void 0,"toCLI"),title:"Remove empty fields",description:["Remove any fields that have empty values."],type:"boolean",defaultValue:!1},{key:"removeDuplicateFields",cli:{"--remove-dupe-fields":!0,"--no-remove-dupe-fields":!1},toCLI:r(g=>g===!1?"--no-remove-dupe-fields":void 0,"toCLI"),title:"Remove duplicate fields",description:["Only allow one of each field in each entry. Enabled by default."],type:"boolean",defaultValue:!0},{key:"generateKeys",cli:{"--generate-keys":r(g=>g.length>0?g:!0,"--generate-keys")},toCLI:r(g=>{if(g===!0||g===lt)return"--generate-keys";if(typeof g=="string")return`--generate-keys="${g.replace(/"/g,'\\"')}"`},"toCLI"),title:"Generate citation keys [Experimental]",description:["For all entries replace the key with a new key of the form <author><year><title>. A JabRef citation pattern can be provided. This is an experimental option that may change without warning."],type:"boolean | string",convertBoolean:{true:lt,false:void 0},defaultValue:void 0},{key:"maxAuthors",cli:{"--max-authors":r(g=>Number(g[0]),"--max-authors")},toCLI:r(g=>g?`--max-authors=${g}`:void 0,"toCLI"),title:"Maximum authors",description:['Truncate authors if above a given number into "and others".'],type:"number"},{key:"lowercase",cli:{"--no-lowercase":!1},toCLI:r(g=>g===!1?"--no-lowercase":void 0,"toCLI"),title:"Lowercase fields",description:["Lowercase field names and entry type. Enabled by default."],type:"boolean",defaultValue:!0},{key:"enclosingBraces",cli:{"--enclosing-braces":r(g=>g.length>0?g:!0,"--enclosing-braces")},toCLI:r(g=>{if(Array.isArray(g)&&g.length>0)return`--enclosing-braces=${g.join(",")}`;if(g===!0)return"--enclosing-braces"},"toCLI"),title:"Enclose values in double braces",description:["Enclose the given fields in double braces, such that case is preserved during BibTeX compilation."],examples:["--enclosing-braces=title,journal (output title and journal fields will be of the form {{This is a title}})","--enclosing-braces (equivalent to ---enclosing-braces=title)"],type:"boolean | string[]",convertBoolean:{true:["title"],false:void 0}},{key:"removeBraces",cli:{"--remove-braces":r(g=>g.length>0?g:!0,"--remove-braces")},toCLI:r(g=>{if(Array.isArray(g)&&g.length>0)return`--remove-braces=${g.join(",")}`;if(g===!0)return"--remove-braces"},"toCLI"),title:"Remove braces",description:["Remove any curly braces within the value, unless they are part of a command."],examples:["--remove-braces=title,journal","--remove-braces (equivalent to ---remove-braces=title)"],type:"boolean | string[]",convertBoolean:{true:["title"],false:void 0}},{key:"wrap",cli:{"--wrap":r(g=>g.length>0?Number(g[0]):!0,"--wrap"),"--no-wrap":!1},toCLI:r(g=>g?`--wrap=${g}`:void 0,"toCLI"),title:"Wrap values",description:["Wrap long values at the given column"],examples:["--wrap (80 by default)","--wrap=82"],type:"boolean | number",convertBoolean:{true:pt,false:void 0}},{key:"version",cli:{"--version":!0,"-v":!0},title:"Version",description:["Show bibtex-tidy version."],type:"boolean"},{key:"quiet",cli:{"--quiet":!0},title:"Quiet",description:["Suppress logs on stdout."],type:"boolean"},{key:"backup",cli:{"--backup":!0,"--no-backup":!1},title:"Backup",description:["Make a backup <filename>.original. Enabled by default (unless --modify is explicitly provided or outputting to a different file/stdio). Deprecated but provided for backward compatibility."],type:"boolean",defaultValue:!0,deprecated:!0}];function yn(g){return Object.fromEntries(rn.map(E=>{const y=E.key,H=g[y];return E.convertBoolean&&typeof H=="boolean"?[y,H?E.convertBoolean.true:E.convertBoolean.false]:typeof H>"u"&&E.defaultValue!==void 0?typeof E.defaultValue=="function"?[y,E.defaultValue(g)]:[y,E.defaultValue]:[y,H]}))}r(yn,"normalizeOptions");function Yt(g,E,y){const H=new Map,q=[];for(const ee of g.children){if(ee.type==="text"||ee.block?.type!=="entry"&&!y.includes("special")){q.push(ee);continue}const V=new Map;for(let fe of y){fe.startsWith("-")&&(fe=fe.slice(1));let xe;switch(fe){case"key":if(ee.block?.type!=="entry")continue;xe=ee.block.key??"";break;case"type":xe=ee.command;break;case"month":{if(ee.block?.type!=="entry")continue;const qe=E.get(ee.block)?.get(fe),Oe=qe?Me.indexOf(qe):-1;xe=Oe>-1?Oe:"";break}case"special":xe=oe(ee)?0:1;break;default:if(ee.block?.type!=="entry")continue;xe=E.get(ee.block)?.get(fe)??""}V.set(fe,typeof xe=="string"?xe.toLowerCase():xe)}for(H.set(ee,V);q.length>0;){const fe=q.pop();if(!fe)break;H.set(fe,V)}}for(const ee of[...y].reverse()){const V=ee.startsWith("-"),fe=V?ee.slice(1):ee;g.children.sort((xe,qe)=>{let Oe=H.get(xe)?.get(fe)??"",Se=H.get(qe)?.get(fe)??"";return typeof Oe=="number"&&(Oe=String(Oe).padStart(50,"0")),typeof Se=="number"&&(Se=String(Se).padStart(50,"0")),(V?Se:Oe).localeCompare(V?Oe:Se)})}}r(Yt,"sortEntries");var S=new Set(["string","preamble","set","xdata"]);function oe(g){return S.has(g.command.toLowerCase())}r(oe,"isBibLaTeXSpecialEntry");function le(g,E){for(const y of ut(g))y.fields.sort((H,q)=>{const ee=E.indexOf(H.name.toLocaleLowerCase()),V=E.indexOf(q.name.toLocaleLowerCase());return ee===-1&&V===-1?0:ee===-1?1:V===-1?-1:V<ee?1:V>ee?-1:0})}r(le,"sortEntryFields");function Ae(g,E={}){const y=yn(E),H=Z(g),q=T(H),ee=ut(q).filter(Oe=>!Oe.key).map(Oe=>({code:"MISSING_KEY",message:`${Oe.parent.command} entry does not have a citation key.`})),V=vt(q,y),fe=Dt(q,V,y.duplicates,y.merge);ee.push(...fe.warnings),q.children=q.children.filter(Oe=>!tt(Oe)||!fe.entries.has(Oe.block)),y.sort&&Yt(q,V,y.sort),y.sortFields&&le(q,y.sortFields);const xe=y.generateKeys?G(q,V,y.generateKeys):void 0;return{bibtex:ot(q,y,xe),warnings:ee,count:ut(q).length}}r(Ae,"tidy");function vt(g,E){return new Map(ut(g).map(y=>[y,new Map(y.fields.map(H=>[H.name.toLocaleLowerCase(),ve(H,E)??""]))]))}r(vt,"generateValueLookup");function ut(g){return g.children.filter(tt).map(E=>E.block)}return r(ut,"getEntries"),Oa}var _1=M1();class xo extends Error{constructor(e){super(e==="too-large"?"BibTeX input is too large to format":"BibTeX input is invalid"),this.kind=e,this.name="BibtexFormatError"}kind}const $1=new Set(["comment","string","preamble"]),z1={lowercase:!1,removeDuplicateFields:!1};function U1(t){return new TextEncoder().encode(t).byteLength}function Zd(t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Citation BibTeX limit must be a positive integer.");return t}function vo(t){return`${Math.round(Zd(t)/1024)} KB`}function rc(t,e){return U1(t)>Zd(e)}function ic(t,e){if(!t.trim()||rc(t,e))return null;try{const n=_1.tidy(t,z1);return{bibtex:n.bibtex,count:n.count}}catch{return null}}function H1(t,e){if(!t.trim())return t;if(rc(t,e))throw new xo("too-large");const n=ic(t,e);if(!n)throw new xo("invalid");return n.bibtex}function Qd(t,e){if(!t.trim())return{status:"empty",entries:[]};if(rc(t,e))return{status:"too-large",entries:[]};const n=ic(t,e);if(!n)return{status:"invalid",entries:[]};if(n.count===0)return{status:"empty",entries:[]};const s=[];let r=0;for(;r<t.length;){const a=t.indexOf("@",r);if(a<0)break;r=a+1;const o=t.lastIndexOf(`
|
|
39
|
-
`,a-1)+1;if(q1(t,o,a))continue;const c=t.slice(a).match(/^@([A-Za-z][A-Za-z0-9_-]*)\s*([\{\(])/);if(!c||c.index===void 0)continue;const l=a+c[0].length-1,u=ac(t,l,c[2]==="{"?"}":")");if(u<0)continue;const d=eh(t.slice(a,u+1));d&&s.push(d),r=u+1}return{status:"ok",entries:s}}function Wl(t,e){const n=t.trim(),s=ic(n,e);return!s||s.count!==1?null:eh(n)}function V1(t){const e=t.bibtex.match(/^@([A-Za-z][A-Za-z0-9_-]*)\s*([\{\(])\s*[^,\s\}\)]+\s*,/s);if(!e||e.index===void 0)return null;const n=t.bibtex.indexOf(e[2],e.index);if(ac(t.bibtex,n,e[2]==="{"?"}":")")<0)return null;const r=th(t.bibtex.slice(e[0].length,-1));if(!r)return null;const a=e[1].toLowerCase();return(/inproceedings|conference|incollection/.test(a)?r.booktitle??r.journal:r.journal??r.booktitle)?.trim()||null}function eh(t){const e=t.match(/^@([A-Za-z][A-Za-z0-9_-]*)\s*([\{\(])\s*([^,\s\}\)]+)\s*,/s);if(!e)return null;const n=t.indexOf(e[2],e.index??0);if(ac(t,n,e[2]==="{"?"}":")")!==t.length-1)return null;const r=e[1];if($1.has(r.toLowerCase()))return null;const a=th(t.slice(e[0].length,-1));return a?{citationKey:e[3],entryType:r,bibtex:t,title:a.title??null,authors:a.author??null,year:a.year??null}:null}function q1(t,e,n){let s=!1;for(let r=e;r<n;r+=1){const a=t[r];if(a==="%"&&!s)return!0;a==="\\"?s=!s:s=!1}return!1}function ac(t,e,n){let s=0,r=0,a=!1,o=!1;for(let c=e;c<t.length;c+=1){const l=t[c];if(o){o=!1;continue}if(l==="\\"){o=!0;continue}if(n==="}"){if(l==='"'&&s===1&&(a=!a),l==="{")s+=1;else if(l==="}"&&--s===0)return c;continue}if(l==="{"&&!a){r+=1;continue}if(l==="}"&&!a&&r>0){r-=1;continue}if(!(r>0)){if(l==='"'){a=!a;continue}if(!a){if(l==="(")s+=1;else if(l===")"&&--s===0)return c}}}return-1}function th(t){const e={};for(const n of W1(t,",")){if(!n.trim())continue;const s=n.replace(/(^|[\r\n])\s*%[^\r\n]*/g,"$1").trim();if(!s)continue;const r=s.match(/^\s*([A-Za-z][A-Za-z0-9_-]*)\s*=\s*([\s\S]*)$/);if(!r||!r[2].trim())return null;const a=K1(r[2]);a&&(e[r[1].toLowerCase()]=a)}return e}function W1(t,e){const n=[];let s=0,r=0,a=!1,o=!1;for(let c=0;c<t.length;c+=1){const l=t[c];if(o){o=!1;continue}if(l==="\\"){o=!0;continue}if(l==='"'){a=!a;continue}a||(l==="{"?r+=1:l==="}"?r=Math.max(0,r-1):l===e&&r===0&&(n.push(t.slice(s,c)),s=c+1))}return n.push(t.slice(s)),n}function K1(t){let e=t.trim();return(e.startsWith("{")&&e.endsWith("}")||e.startsWith('"')&&e.endsWith('"'))&&(e=e.slice(1,-1)),e.replace(/\s+/g," ").trim()}const G1=[],Y1={status:"empty",entries:G1};function nh({open:t,onOpenChange:e,page:n=!1,onBack:s,currentFile:r="",currentSource:a="",readOnly:o=!1,currentUserId:c,maxBibtexBytes:l,onInsert:u}){const{t:d}=Qe(),[h,p]=f.useState("library"),[m,D]=f.useState(""),[C,b]=f.useState(""),[w,x]=f.useState([]),[N,L]=f.useState(1),[T,_]=f.useState({page:1,pageSize:60,total:0,totalPages:0}),[$,O]=f.useState(0),[J,z]=f.useState([]),[ae,M]=f.useState(""),[K,R]=f.useState("green"),[A,P]=f.useState(null),[pe,we]=f.useState([]),[Fe,Ne]=f.useState(!1),[Ce,v]=f.useState(!1),[ue,Z]=f.useState(null),[Y,ce]=f.useState(null),[I,ie]=f.useState(""),[j,me]=f.useState(!1),[Ee,tt]=f.useState(""),[Dt,Ye]=f.useState(null),[Me,Le]=f.useState(null),[Ie,yt]=f.useState(""),[ot,ye]=f.useState(""),[It,he]=f.useState(""),[ve,Re]=f.useState(new Map),[bt,Ge]=f.useState(!1),[G,De]=f.useState(0),X=!!(/\.bib$/i.test(r)&&u),He=f.useMemo(()=>t&&X?Qd(a,l):Y1,[t,a,X,l]),Ve=He.status==="too-large",mt=He.status==="invalid",ke=He.entries,xt=f.useMemo(()=>new Set(ke.map(S=>S.citationKey.toLowerCase())),[ke]);f.useEffect(()=>{if(!t)return;const S=new AbortController,oe=window.setTimeout(()=>{v(!0),ye("");const le=new URLSearchParams;m.trim()&&le.set("q",m.trim()),C&&le.set("tag",C),le.set("page",String(N)),le.set("pageSize","60"),te(`/api/citations?${le.toString()}`,{signal:S.signal}).then(Ae=>{x(Ae.entries),_(Ae.pagination),Ae.pagination.page!==N&&L(Ae.pagination.page)}).catch(Ae=>{Ae instanceof Error&&Ae.name==="AbortError"||ye(de(Ae))}).finally(()=>{S.signal.aborted||v(!1)})},m.trim()?180:0);return()=>{window.clearTimeout(oe),S.abort()}},[t,m,C,N,$]),f.useEffect(()=>{if(!t)return;const S=new AbortController;return te("/api/citations/tags",{signal:S.signal}).then(oe=>z(oe.tags)).catch(oe=>{oe instanceof Error&&oe.name==="AbortError"||ye(de(oe))}),()=>S.abort()},[t]),f.useEffect(()=>{if(!t||!X){Re(new Map),Ge(!1);return}const S=new AbortController,oe=[...new Set(ke.map(le=>le.citationKey))];return oe.length?(Ge(!0),te("/api/citations/lookup",{method:"POST",body:JSON.stringify({keys:oe}),signal:S.signal}).then(le=>{Re(new Map(le.matches.map(Ae=>[Ae.citationKey.toLowerCase(),Ae])))}).catch(le=>{le instanceof Error&&le.name==="AbortError"||ye(de(le))}).finally(()=>{S.signal.aborted||Ge(!1)}),()=>S.abort()):(Re(new Map),Ge(!1),()=>S.abort())},[t,X,ke,G]),f.useEffect(()=>{t&&(p("library"),D(""),b(""),L(1),_({page:1,pageSize:60,total:0,totalPages:0}),ce(null),me(!1),tt(""),P(null),Ye(null),Le(null),yt(""),ye(""),he(""),Re(new Map))},[t,X]);const re=async S=>{Z(S.citationKey),ye("");try{const oe=ve.get(S.citationKey.toLowerCase()),le=await te("/api/citations",{method:"POST",body:JSON.stringify({bibtex:S.bibtex,citationKey:S.citationKey,entryType:S.entryType,title:S.title,authors:S.authors,year:S.year,overwrite:!!oe,expectedRevision:oe?.revision})});x(Ae=>[le.entry,...Ae.filter(vt=>vt.id!==le.entry.id&&vt.citationKey.toLowerCase()!==le.entry.citationKey.toLowerCase())]),Re(Ae=>new Map(Ae).set(le.entry.citationKey.toLowerCase(),{id:le.entry.id,citationKey:le.entry.citationKey,revision:le.entry.revision})),P(le.entry),we(le.entry.tags.map(Ae=>Ae.id)),he(le.updated?d("citationLibrary.updated"):d("citationLibrary.saved")),L(1),O(Ae=>Ae+1)}catch(oe){ye(de(oe)),De(le=>le+1)}finally{Z(null)}},W=async()=>{if(Y){Z(Y.citationKey),ye("");try{const S=Wl(I,l);if(!S){ye(d("citationErrors.invalid"));return}const oe=await te(`/api/citations/${encodeURIComponent(Y.id)}`,{method:"PATCH",body:JSON.stringify({bibtex:S.bibtex,citationKey:S.citationKey,entryType:S.entryType,title:S.title,authors:S.authors,year:S.year,expectedRevision:Y.revision})});x(le=>[oe.entry,...le.filter(Ae=>Ae.id!==oe.entry.id)]),Re(le=>{const Ae=new Map(le);return Ae.delete(Y.citationKey.toLowerCase()),Ae.set(oe.entry.citationKey.toLowerCase(),{id:oe.entry.id,citationKey:oe.entry.citationKey,revision:oe.entry.revision}),Ae}),ce(null),he(d("citationLibrary.updated")),L(1),O(le=>le+1)}catch(S){ye(de(S))}finally{Z(null)}}},pt=async()=>{if(Ee.trim()){Z("__new__"),ye("");try{const S=Wl(Ee,l);if(!S){ye(d("citationErrors.invalid"));return}const oe=await te("/api/citations",{method:"POST",body:JSON.stringify({bibtex:S.bibtex,citationKey:S.citationKey,entryType:S.entryType,title:S.title,authors:S.authors,year:S.year})});x(le=>[oe.entry,...le.filter(Ae=>Ae.id!==oe.entry.id&&Ae.citationKey.toLowerCase()!==oe.entry.citationKey.toLowerCase())]),Re(le=>new Map(le).set(oe.entry.citationKey.toLowerCase(),{id:oe.entry.id,citationKey:oe.entry.citationKey,revision:oe.entry.revision})),me(!1),tt(""),he(oe.updated?d("citationLibrary.updated"):d("citationLibraryActions.added")),P(oe.entry),we(oe.entry.tags.map(le=>le.id)),L(1),O(le=>le+1)}catch(S){ye(de(S))}finally{Z(null)}}},zt=async()=>{if(ae.trim()){ye("");try{const S=await te("/api/citations/tags",{method:"POST",body:JSON.stringify({name:ae.trim(),color:K})});z(oe=>[...oe.filter(le=>le.id!==S.tag.id),S.tag].sort((le,Ae)=>le.name.localeCompare(Ae.name))),M(""),he(d("citationLibrary.tagCreated"))}catch(S){ye(de(S))}}},Gt=S=>{ce(null),me(!1),P(S),we(S.tags.map(oe=>oe.id))},lt=async()=>{if(A){Ne(!0),ye("");try{const S=await te(`/api/citations/${encodeURIComponent(A.id)}/tags`,{method:"PATCH",body:JSON.stringify({tagIds:pe,expectedRevision:A.revision})});x(oe=>oe.map(le=>le.id===S.entry.id?S.entry:le)),Re(oe=>new Map(oe).set(S.entry.citationKey.toLowerCase(),{id:S.entry.id,citationKey:S.entry.citationKey,revision:S.entry.revision})),P(S.entry),we(S.entry.tags.map(oe=>oe.id)),he(d("citationLibrary.tagsUpdated")),O(oe=>oe+1)}catch(S){ye(de(S))}finally{Ne(!1)}}},rn=async S=>{Ye(S.id),yt("");try{await te(`/api/citations/${encodeURIComponent(S.id)}`,{method:"DELETE"}),x(oe=>oe.filter(le=>le.id!==S.id)),Re(oe=>{const le=new Map(oe);return le.delete(S.citationKey.toLowerCase()),le}),Y?.id===S.id&&ce(null),A?.id===S.id&&P(null),he(d("citationLibrary.deleted")),L(1),O(oe=>oe+1),Le(null)}catch(oe){yt(de(oe))}finally{Ye(null)}},yn=i.jsxs("div",{className:"citation-library-dialog",children:[i.jsxs("div",{className:"citation-library-tabs",role:"tablist","aria-label":d("citationLibrary.title"),children:[i.jsxs("button",{type:"button",role:"tab","aria-selected":h==="library",className:h==="library"?"active":"",onClick:()=>p("library"),children:[i.jsx(cs,{size:15}),d("citationLibrary.myLibrary"),i.jsx("span",{children:T.total})]}),X&&i.jsxs("button",{type:"button",role:"tab","aria-selected":h==="current",className:h==="current"?"active":"",onClick:()=>p("current"),children:[i.jsx(xr,{size:15}),d("citationLibrary.currentFile"),i.jsx("span",{children:ke.length})]})]}),ot&&!(n&&(A||Y))&&i.jsx("p",{className:"error dialog-error",children:ot}),It&&i.jsxs("p",{className:"citation-library-notice",role:"status",children:[i.jsx(Zn,{size:14}),It,i.jsx("button",{type:"button","aria-label":d("common.close"),onClick:()=>he(""),children:i.jsx(Ht,{size:13})})]}),h==="library"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"citation-library-search-row",children:[i.jsxs("label",{className:"citation-library-search",children:[i.jsx(sc,{size:15}),i.jsx("input",{autoFocus:!0,placeholder:d("citationLibrary.searchPlaceholder"),value:m,onChange:S=>{D(S.target.value),L(1)}}),i.jsx("span",{children:d("citationLibrary.searchHint")})]}),i.jsxs("button",{type:"button",className:"citation-add-entry-button",onClick:()=>{me(!0),ce(null),P(null)},children:[i.jsx(xr,{size:14}),d("citationLibraryActions.addEntry")]})]}),i.jsxs("div",{className:"citation-tag-bar",children:[i.jsxs("div",{className:"citation-tag-filters",children:[i.jsx("button",{type:"button",className:C?"":"active",onClick:()=>{b(""),L(1)},children:d("citationLibrary.allTags")}),J.map(S=>i.jsxs("button",{type:"button",className:C===S.id?"active":"",onClick:()=>{b(C===S.id?"":S.id),L(1)},children:[i.jsx("span",{className:`citation-tag-dot tag-${S.color}`}),S.name]},S.id)),J.length===0&&i.jsx("span",{className:"muted",children:d("citationLibrary.noTags")})]}),i.jsxs("div",{className:"citation-tag-create",children:[i.jsx("input",{value:ae,placeholder:d("citationLibrary.newTagPlaceholder"),onChange:S=>M(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),zt())}}),i.jsx("select",{"aria-label":d("citationLibrary.tagColor"),value:K,onChange:S=>R(S.target.value),children:["red","orange","yellow","green","blue","purple","gray"].map(S=>i.jsx("option",{value:S,children:d(`tags.${S}`)},S))}),i.jsxs("button",{type:"button",disabled:!ae.trim(),title:d("citationLibrary.createTag"),onClick:()=>{zt()},children:[i.jsx(xr,{size:13}),d("citationLibrary.createTag")]})]})]}),j&&i.jsxs("div",{className:"citation-edit-panel",children:[i.jsxs("div",{className:"citation-edit-header",children:[i.jsxs("div",{children:[i.jsx("strong",{children:d("citationLibraryActions.addEntryTitle")}),i.jsx("small",{children:d("citationLibraryActions.addEntryDescription")})]}),i.jsx("button",{type:"button","aria-label":d("common.close"),onClick:()=>me(!1),children:i.jsx(Ht,{size:15})})]}),i.jsx("textarea",{autoFocus:!0,value:Ee,onChange:S=>tt(S.target.value),placeholder:d("citationLibraryActions.addEntryPlaceholder"),spellCheck:!1,rows:9}),i.jsxs("div",{className:"citation-edit-actions",children:[i.jsx("button",{type:"button",onClick:()=>me(!1),children:d("common.cancel")}),i.jsxs("button",{type:"button",className:"primary",disabled:!Ee.trim()||ue==="__new__",onClick:()=>{pt()},children:[ue==="__new__"?i.jsx(Ze,{className:"spin",size:14}):i.jsx(Zn,{size:14}),d("citationLibraryActions.addEntry")]})]})]}),Ce?i.jsxs("div",{className:"citation-library-empty",children:[i.jsx(Ze,{className:"spin",size:22}),i.jsx("span",{children:d("common.loading")})]}):w.length===0?i.jsxs("div",{className:"citation-library-empty",children:[i.jsx(cs,{size:28}),i.jsx("strong",{children:d("citationLibrary.emptyTitle")}),i.jsx("span",{children:d(C?"citationLibrary.noTagMatches":"citationLibrary.emptyDescription")})]}):i.jsx("div",{className:"citation-entry-list",children:w.map(S=>i.jsxs("div",{className:"citation-entry-item",children:[i.jsx(Kl,{entry:S,currentUserId:c,selected:A?.id===S.id||Y?.id===S.id,alreadyInFile:!n&&xt.has(S.citationKey.toLowerCase()),importDisabled:o,deleting:Dt===S.id,onImport:u?async()=>{await u(S)&&e(!1)}:void 0,onEdit:S.ownerId===c?()=>{P(null),me(!1),ce(S),ie(S.bibtex)}:void 0,onTags:S.ownerId===c?()=>Gt(S):void 0,onDelete:S.ownerId===c?()=>{Le(S),yt("")}:void 0,t:d}),!n&&A?.id===S.id&&i.jsx(Pa,{entry:A,tags:J,selectedIds:pe,saving:Fe,onClose:()=>P(null),onToggle:oe=>we(le=>le.includes(oe)?le.filter(Ae=>Ae!==oe):[...le,oe]),onSave:()=>{lt()},t:d}),!n&&Y?.id===S.id&&i.jsx(Gl,{title:d("citationLibrary.editTitle",{key:Y.citationKey}),value:I,saving:ue===Y.citationKey,onChange:ie,onClose:()=>ce(null),onSave:()=>{W()},t:d})]},S.id))}),T.totalPages>1&&i.jsxs("nav",{className:"citation-library-pagination","aria-label":d("citationLibraryPagination.pageOf",{page:T.page,totalPages:T.totalPages,count:T.total}),children:[i.jsxs("button",{type:"button",disabled:T.page<=1,onClick:()=>L(S=>Math.max(1,S-1)),children:[i.jsx(Er,{size:14}),d("citationLibraryPagination.previous")]}),i.jsx("span",{children:d("citationLibraryPagination.pageOf",{page:T.page,totalPages:T.totalPages,count:T.total})}),i.jsxs("button",{type:"button",disabled:T.page>=T.totalPages,onClick:()=>L(S=>Math.min(T.totalPages,S+1)),children:[d("citationLibraryPagination.next"),i.jsx(Sr,{size:14})]})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"citation-current-heading",children:[i.jsxs("div",{children:[i.jsx("strong",{children:d("citationLibrary.currentFileTitle")}),i.jsx("span",{children:d("citationLibrary.currentFileDescription")})]}),i.jsxs("button",{type:"button",onClick:()=>p("library"),children:[i.jsx(Er,{size:14}),d("citationLibrary.backToLibrary")]})]}),Ve&&i.jsxs("p",{className:"warning citation-library-warning",children:[i.jsx(en,{size:15}),d("citationLibrary.fileTooLarge",{size:vo(l)})]}),mt&&i.jsxs("p",{className:"warning citation-library-warning",children:[i.jsx(en,{size:15}),d("citationLibrary.fileInvalid")]}),ke.length===0?i.jsxs("div",{className:"citation-library-empty",children:[i.jsx(cs,{size:28}),i.jsx("strong",{children:d("citationLibrary.noEntries")}),i.jsx("span",{children:d(Ve?"citationLibrary.fileTooLargeHint":mt?"citationLibrary.fileInvalidHint":"citationLibrary.noEntriesDescription")})]}):i.jsx("div",{className:"citation-entry-list",children:ke.map((S,oe)=>i.jsxs("div",{className:"citation-entry-item",children:[i.jsx(Kl,{entry:S,saved:ve.has(S.citationKey.toLowerCase()),saving:ue===S.citationKey,saveDisabled:bt,onSave:()=>{re(S)},t:d}),!n&&A?.citationKey.toLowerCase()===S.citationKey.toLowerCase()&&i.jsx(Pa,{entry:A,tags:J,selectedIds:pe,saving:Fe,onClose:()=>P(null),onToggle:le=>we(Ae=>Ae.includes(le)?Ae.filter(vt=>vt!==le):[...Ae,le]),onSave:()=>{lt()},t:d})]},`${S.citationKey}-${oe}`))})]})]}),Yt=i.jsx(_n,{open:!!Me,title:d("citationLibrary.deleteTitle"),description:d("citationLibrary.deleteDescription",{key:Me?.citationKey??""}),confirmLabel:d("common.delete"),danger:!0,error:Ie,busy:!!Dt,onCancel:()=>{Le(null),yt("")},onConfirm:()=>{const S=Me;S&&rn(S)}});return n?i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"citation-library-page",children:[i.jsxs("header",{className:"citation-library-page-header",children:[i.jsxs("div",{children:[i.jsxs("h1",{children:[i.jsx(cs,{"aria-hidden":!0,size:26}),d("citationLibrary.title")]}),i.jsx("p",{children:d("citationLibraryHomeDescription")})]}),s&&i.jsxs("button",{type:"button",onClick:s,children:[i.jsx(Er,{size:15}),d("projects.title")]})]}),yn]}),A&&i.jsx(ft,{open:!0,title:d("citationLibrary.tagsTitle",{key:A.citationKey}),description:d("citationLibrary.tags"),onOpenChange:S=>{S||(P(null),ye(""))},children:i.jsxs(i.Fragment,{children:[ot&&i.jsx("p",{className:"error dialog-error",children:ot}),i.jsx(Pa,{entry:A,tags:J,selectedIds:pe,saving:Fe,modal:!0,onClose:()=>{P(null),ye("")},onToggle:S=>we(oe=>oe.includes(S)?oe.filter(le=>le!==S):[...oe,S]),onSave:()=>{lt()},t:d})]})}),Y&&i.jsx(ft,{open:!0,extraWide:!0,title:d("citationLibrary.editTitle",{key:Y.citationKey}),description:d("citationLibrary.title"),onOpenChange:S=>{S||(ce(null),ye(""))},children:i.jsxs(i.Fragment,{children:[ot&&i.jsx("p",{className:"error dialog-error",children:ot}),i.jsx(Gl,{title:d("citationLibrary.editTitle",{key:Y.citationKey}),value:I,saving:ue===Y.citationKey,modal:!0,onChange:ie,onClose:()=>{ce(null),ye("")},onSave:()=>{W()},t:d})]})}),Yt]}):i.jsxs(i.Fragment,{children:[i.jsx(ft,{open:t,extraWide:!0,className:"citation-library-modal",title:d("citationLibrary.title"),description:d(X?"citationLibrary.description":"citationLibraryHomeDescription",{file:r}),onOpenChange:e,footer:i.jsx("button",{onClick:()=>e(!1),children:d("common.close")}),children:yn}),Yt]})}function Kl({entry:t,currentUserId:e,selected:n,alreadyInFile:s,saved:r,saving:a,saveDisabled:o,importDisabled:c,deleting:l,onSave:u,onImport:d,onEdit:h,onTags:p,onDelete:m,t:D}){const C="id"in t,b=C?t:null,w=V1(t);return i.jsxs("article",{className:`citation-entry-card${n?" selected":""}${s?" already-in-file":""}`,title:s?D("citationErrors.alreadyInFile",{key:t.citationKey}):void 0,children:[i.jsxs("div",{className:"citation-entry-main",children:[i.jsxs("div",{className:"citation-entry-heading",children:[i.jsx("code",{children:t.citationKey}),i.jsxs("span",{children:["@",t.entryType]}),w&&i.jsx("span",{className:"citation-entry-venue",title:w,children:w}),r&&i.jsxs("em",{children:[i.jsx(Zn,{size:11}),D("citationLibrary.savedLabel")]})]}),i.jsx("strong",{children:t.title||D("citationLibrary.untitled")}),i.jsxs("p",{children:[t.authors||D("citationLibrary.authorUnknown"),t.year&&i.jsxs("span",{children:[" · ",t.year]})]}),b&&b.tags.length>0&&i.jsx("div",{className:"citation-entry-tags",children:b.tags.map(x=>i.jsxs("span",{className:`citation-tag-pill tag-${x.color}`,children:[i.jsx("span",{className:"citation-tag-dot"}),x.name]},x.id))})]}),i.jsxs("div",{className:"citation-entry-actions",children:[u&&i.jsxs("button",{type:"button",className:r?"saved":"primary",disabled:a||o,onClick:u,children:[a||o?i.jsx(Ze,{className:"spin",size:13}):r?i.jsx(Zn,{size:13}):i.jsx(xr,{size:13}),D(a?"citationLibrary.saving":r?"citationLibrary.update":"citationLibrary.save")]}),d&&i.jsxs("button",{type:"button",disabled:c||s,title:s?D("citationErrors.alreadyInFile",{key:t.citationKey}):D(c?"citationLibrary.importRequiresWrite":"citationLibrary.importToFile"),onClick:()=>{d()},children:[i.jsx(ZD,{size:13}),D("citationLibrary.import")]}),b&&p&&i.jsxs("button",{type:"button",onClick:p,children:[i.jsx(Ti,{size:13}),D("citationLibrary.tags")]}),C&&h&&i.jsxs("button",{type:"button",onClick:h,children:[i.jsx(f1,{size:13}),D("common.edit")]}),C&&m&&i.jsxs("button",{type:"button",className:"danger-text",disabled:l,onClick:m,children:[l?i.jsx(Ze,{className:"spin",size:13}):i.jsx(nn,{size:13}),D("common.delete")]})]})]})}function Pa({entry:t,tags:e,selectedIds:n,saving:s,modal:r=!1,onClose:a,onToggle:o,onSave:c,t:l}){const u=i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"citation-tag-choice-list",children:e.length===0?i.jsx("span",{className:"muted",children:l("citationLibrary.noTagsToAssign")}):e.map(d=>i.jsxs("label",{children:[i.jsx("input",{type:"checkbox",checked:n.includes(d.id),onChange:()=>o(d.id)}),i.jsx("span",{className:`citation-tag-dot tag-${d.color}`}),d.name]},d.id))}),i.jsxs("div",{className:"citation-edit-actions",children:[i.jsx("button",{type:"button",onClick:a,children:l("common.cancel")}),i.jsxs("button",{type:"button",className:"primary",disabled:s||e.length===0,onClick:c,children:[s?i.jsx(Ze,{className:"spin",size:14}):i.jsx(Zn,{size:14}),l("citationLibrary.saveTags")]})]})]});return r?i.jsx("div",{className:"citation-modal-form",children:u}):i.jsxs("div",{className:"citation-tag-editor",children:[i.jsxs("div",{className:"citation-edit-header",children:[i.jsx("strong",{children:l("citationLibrary.tagsTitle",{key:t.citationKey})}),i.jsx("button",{type:"button","aria-label":l("common.close"),onClick:a,children:i.jsx(Ht,{size:15})})]}),u]})}function Gl({title:t,value:e,saving:n,modal:s=!1,onChange:r,onClose:a,onSave:o,t:c}){const l=i.jsxs(i.Fragment,{children:[i.jsx("textarea",{autoFocus:!s,value:e,onChange:u=>r(u.target.value),spellCheck:!1,rows:12}),i.jsxs("div",{className:"citation-edit-actions",children:[i.jsx("button",{type:"button",onClick:a,children:c("common.cancel")}),i.jsxs("button",{type:"button",className:"primary",disabled:!e.trim()||n,onClick:o,children:[n?i.jsx(Ze,{className:"spin",size:14}):i.jsx(Zn,{size:14}),c("common.save")]})]})]});return s?i.jsx("div",{className:"citation-modal-form citation-edit-panel",children:l}):i.jsxs("div",{className:"citation-edit-panel",children:[i.jsxs("div",{className:"citation-edit-header",children:[i.jsx("strong",{children:t}),i.jsx("button",{type:"button","aria-label":c("common.close"),onClick:a,children:i.jsx(Ht,{size:15})})]}),l]})}function X1(t=10){const e="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789!@#$%",n=crypto.getRandomValues(new Uint8Array(t));return Array.from(n,s=>e[s%e.length]).join("")}function J1({currentUser:t,minPasswordLength:e}){const{t:n}=Qe(),[s,r]=f.useState([]),[a,o]=f.useState(""),[c,l]=f.useState(!1),[u,d]=f.useState({username:"",displayName:"",password:"",role:"user",canCreateProjects:!1}),[h,p]=f.useState(null),[m,D]=f.useState(""),[C,b]=f.useState(null),[w,x]=f.useState(!1),[N,L]=f.useState(!1),[T,_]=f.useState(""),[$,O]=f.useState(null),[J,z]=f.useState(!1),[ae,M]=f.useState(""),K=()=>te("/api/admin/users").then(({users:v})=>r(v)).catch(v=>o(de(v)));f.useEffect(()=>{K()},[]);const R=async()=>{if(u.password.length<e)return o(n("auth.passwordMinimum",{count:e}));try{await te("/api/admin/users",{method:"POST",body:JSON.stringify({username:u.username,displayName:u.displayName||u.username,password:u.password,role:u.role,canCreateProjects:u.canCreateProjects})}),l(!1),d({username:"",displayName:"",password:"",role:"user",canCreateProjects:!1}),await K()}catch(v){o(de(v))}},A=async(v,ue)=>{try{await te(`/api/admin/users/${v.id}`,{method:"PATCH",body:JSON.stringify(ue)}),await K()}catch(Z){o(de(Z))}},P=async v=>{if(!v.disabled){O({target:v,setting:"disable"}),M("");return}await A(v,{disabled:!1})},pe=async v=>{if(v.role==="admin"){O({target:v,setting:"demote"}),M("");return}await A(v,{role:"admin"})},we=async v=>{if(v.canCreateProjects){O({target:v,setting:"denyProjectCreation"}),M("");return}await A(v,{canCreateProjects:!0})},Fe=async()=>{if(!$)return;const{target:v,setting:ue}=$,Z=ue==="disable"?{disabled:!0}:ue==="demote"?{role:"user"}:{canCreateProjects:!1};z(!0),M("");try{await te(`/api/admin/users/${v.id}`,{method:"PATCH",body:JSON.stringify(Z)}),await K(),O(null)}catch(Y){M(de(Y))}finally{z(!1)}},Ne=async()=>{if(!(!h||!m)){if(m.length<e)return o(n("auth.passwordMinimum",{count:e}));try{await te(`/api/admin/users/${h.id}`,{method:"PATCH",body:JSON.stringify({password:m})}),p(null),D("")}catch(v){o(de(v))}}},Ce=async()=>{if(!(!C||N)){L(!0),_("");try{await te(`/api/admin/users/${C.id}`,{method:"DELETE",body:JSON.stringify({deleteProjects:w})}),b(null),x(!1),await K()}catch(v){_(de(v))}finally{L(!1)}}};return i.jsxs("main",{className:"dashboard",children:[i.jsxs("div",{className:"section-title",children:[i.jsxs("div",{children:[i.jsxs("h1",{children:[i.jsx(Br,{"aria-hidden":!0,size:25}),n("users.manage")]}),i.jsx("p",{className:"muted",children:n("users.onlyAdmin")})]}),i.jsxs("button",{className:"primary icon-button",onClick:()=>l(!0),children:[i.jsx(Eo,{"aria-hidden":!0,size:15}),n("users.add")]})]}),a&&i.jsx("p",{className:"error",children:a}),i.jsx("div",{className:"table-card",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:n("common.user")}),i.jsx("th",{children:n("users.role")}),i.jsx("th",{children:n("users.createProjects")}),i.jsx("th",{children:n("users.ownedProjects")}),i.jsx("th",{children:n("users.status")}),i.jsx("th",{children:n("users.actions")})]})}),i.jsx("tbody",{children:s.map(v=>i.jsxs("tr",{children:[i.jsxs("td",{children:[i.jsx("strong",{children:v.displayName}),i.jsxs("small",{children:["@",v.username]})]}),i.jsx("td",{children:v.role==="admin"?n("common.admin"):n("common.user")}),i.jsx("td",{children:v.canCreateProjects?n("users.allow"):n("users.deny")}),i.jsx("td",{children:v.ownedProjects}),i.jsx("td",{children:v.disabled?n("common.disabled"):n("common.normal")}),i.jsxs("td",{children:[i.jsxs("button",{className:"icon-button",disabled:v.id===t.id,onClick:()=>P(v),children:[v.disabled?i.jsx(L1,{"aria-hidden":!0,size:13}):i.jsx(R1,{"aria-hidden":!0,size:13}),v.disabled?n("users.enable"):n("users.disable")]}),i.jsxs("button",{className:"icon-button",disabled:v.id===t.id,onClick:()=>pe(v),children:[v.role==="admin"?i.jsx(x1,{"aria-hidden":!0,size:13}):i.jsx(Gd,{"aria-hidden":!0,size:13}),v.role==="admin"?n("users.demote"):n("users.promote")]}),i.jsxs("button",{className:"icon-button",disabled:v.role==="admin",onClick:()=>we(v),children:[v.canCreateProjects?i.jsx(KD,{"aria-hidden":!0,size:13}):i.jsx(VD,{"aria-hidden":!0,size:13}),v.canCreateProjects?n("users.denyCreate"):n("users.allowCreate")]}),i.jsxs("button",{className:"icon-button",onClick:()=>{p(v),D("")},children:[i.jsx(Hl,{"aria-hidden":!0,size:13}),n("users.resetPassword")]}),i.jsxs("button",{className:"icon-button danger-text",disabled:v.id===t.id,onClick:()=>{b(v),x(!1),_("")},children:[i.jsx(nn,{"aria-hidden":!0,size:13}),n("common.delete")]})]})]},v.id))})]})}),i.jsx(ft,{open:c,title:n("users.add"),description:n("users.addDescription"),onOpenChange:l,footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"icon-button",onClick:()=>l(!1),children:[i.jsx(Ht,{"aria-hidden":!0,size:14}),n("common.cancel")]}),i.jsxs("button",{className:"primary icon-button",disabled:u.password.length<e,onClick:()=>{R()},children:[i.jsx(Eo,{"aria-hidden":!0,size:14}),n("users.createUser")]})]}),children:i.jsxs("div",{className:"form-stack",children:[i.jsxs("label",{className:"form-field",children:[n("auth.username"),i.jsx("input",{value:u.username,onChange:v=>d({...u,username:v.target.value})})]}),i.jsxs("label",{className:"form-field",children:[n("users.displayName"),i.jsx("input",{value:u.displayName,onChange:v=>d({...u,displayName:v.target.value})})]}),i.jsxs("label",{className:"form-field",children:[n("users.initialPassword"),i.jsxs("span",{className:"password-generator",children:[i.jsx("input",{minLength:e,autoComplete:"new-password",value:u.password,onChange:v=>d({...u,password:v.target.value})}),i.jsxs("button",{type:"button",title:n("users.generatePassword"),onClick:()=>d({...u,password:X1()}),children:[i.jsx(ND,{size:15}),n("users.randomPassword")]})]}),i.jsx("small",{className:"field-hint",children:n("auth.passwordMinimum",{count:e})})]}),i.jsxs("label",{className:"form-field",children:[n("users.role"),i.jsxs("select",{value:u.role,onChange:v=>d({...u,role:v.target.value}),children:[i.jsx("option",{value:"user",children:n("common.user")}),i.jsx("option",{value:"admin",children:n("common.admin")})]})]}),i.jsxs("label",{className:"checkbox-field",children:[i.jsx("input",{type:"checkbox",checked:u.canCreateProjects||u.role==="admin",disabled:u.role==="admin",onChange:v=>d({...u,canCreateProjects:v.target.checked})})," ",n("users.allowCreate")]})]})}),i.jsx(ft,{open:!!h,title:n("users.resetPassword"),description:n("users.resetDescription",{username:h?.username??""}),onOpenChange:v=>{v||p(null)},footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"icon-button",onClick:()=>p(null),children:[i.jsx(Ht,{"aria-hidden":!0,size:14}),n("common.cancel")]}),i.jsxs("button",{className:"primary icon-button",disabled:m.length<e,onClick:()=>{Ne()},children:[i.jsx(Hl,{"aria-hidden":!0,size:14}),n("users.reset")]})]}),children:i.jsxs("label",{className:"form-field",children:[n("auth.newPassword"),i.jsx("input",{autoFocus:!0,type:"password",minLength:e,autoComplete:"new-password",value:m,onChange:v=>D(v.target.value)}),i.jsx("small",{className:"field-hint",children:n("auth.passwordMinimum",{count:e})})]})}),i.jsx(ft,{open:!!C,title:n("users.deleteTitle"),description:n("users.deleteDescription",{username:C?.username??""}),onOpenChange:v=>{!v&&!N&&(b(null),_(""))},footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"icon-button",disabled:N,onClick:()=>{b(null),_("")},children:[i.jsx(Ht,{"aria-hidden":!0,size:14}),n("common.cancel")]}),i.jsxs("button",{className:"danger icon-button",disabled:N,"aria-busy":N,onClick:()=>{Ce()},children:[N?i.jsx(Ze,{className:"spin","aria-hidden":!0,size:14}):i.jsx(nn,{"aria-hidden":!0,size:14}),n(N?"common.loading":"users.deleteTitle")]})]}),children:i.jsxs(i.Fragment,{children:[T&&i.jsx("p",{className:"error dialog-error",children:T}),i.jsxs("fieldset",{className:"choice-group",disabled:N,children:[i.jsx("legend",{children:n("users.ownedChoice",{count:C?.ownedProjects??0})}),i.jsxs("label",{children:[i.jsx("input",{type:"radio",checked:!w,onChange:()=>x(!1)})," ",n("users.transferProjects")]}),i.jsxs("label",{children:[i.jsx("input",{type:"radio",checked:w,onChange:()=>x(!0)})," ",n("users.deleteProjects")]})]})]})}),i.jsx(_n,{open:!!$,title:n(`userConfirmations.${$?.setting??"disable"}Title`),description:n(`userConfirmations.${$?.setting??"disable"}Description`,{username:$?.target.username??""}),confirmLabel:n(`userConfirmations.${$?.setting??"disable"}Confirm`),danger:!0,busy:J,error:ae,onCancel:()=>{J||(O(null),M(""))},onConfirm:()=>{Fe()}})]})}const sh=["file-text","book-open","notebook-pen","book-marked","scroll-text","library","graduation-cap","presentation","image","folder-kanban","microscope","flask-conical","test-tube-diagonal","atom","dna","telescope","earth","map","languages","university","code-2","file-code-2","database","server","network","circuit-board","brain","brain-circuit","bot","shield-check","workflow","sigma","calculator","chart-no-axes-combined","line-chart","bar-chart-3","pie-chart","chart-scatter","file-spreadsheet","file-chart-column-increasing","lightbulb","rocket","target","sparkles","file-pen-line","file-stack","folder","folder-open","folder-archive","archive","bookmark","newspaper","notepad-text","sticky-note","pen-tool","quote","list-tree","file-search","beaker","test-tubes","folder-git-2","git-branch","terminal","braces","regex","cpu","hard-drive","cloud","users-round","calendar-days"],Z1=new Set(sh);function rh(t){return typeof t=="string"&&Z1.has(t)}function ih(t){if(typeof t!="string")return null;const e=t.trim().replace(/^lucide:/i,"");return!e||e.length>96?null:/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)?e:null}const Q1={"file-text":hs,"book-open":Qi,"notebook-pen":o1,"book-marked":cs,"scroll-text":Si,library:t1,"graduation-cap":GD,presentation:g1,image:JD,"folder-kanban":WD,microscope:r1,"flask-conical":UD,"test-tube-diagonal":T1,atom:uD,dna:LD,telescope:j1,earth:RD,map:s1,languages:e1,university:N1,"code-2":jD,"file-code-2":ID,database:BD,server:E1,network:i1,"circuit-board":kD,brain:gD,"brain-circuit":pD,bot:fD,"shield-check":Gd,workflow:P1,sigma:Yd,calculator:DD,"chart-no-axes-combined":FD,"line-chart":bD,"bar-chart-3":yD,"pie-chart":CD,"chart-scatter":wD,"file-spreadsheet":$D,"file-chart-column-increasing":PD,lightbulb:n1,rocket:F1,target:A1,sparkles:Xd,"file-pen-line":MD,"file-stack":zD,folder:Ud,"folder-open":ki,"folder-archive":HD,archive:ec,bookmark:hD,newspaper:a1,"notepad-text":c1,"sticky-note":k1,"pen-tool":m1,quote:D1,"list-tree":qd,"file-search":$d,beaker:dD,"test-tubes":B1,"folder-git-2":qD,"git-branch":Hd,terminal:S1,braces:mD,regex:y1,cpu:TD,"hard-drive":YD,cloud:AD,"users-round":O1,"calendar-days":Id},Yl=sh.map(t=>({name:t}));function ah(t){const e=Array.from(t.trim())[0];return e?e.toLocaleUpperCase():"?"}function yi({icon:t,fallback:e,size:n=18}){const s=rh(t)?Q1[t]:null;if(s)return i.jsx(s,{"aria-hidden":"true",size:n,strokeWidth:1.9});const r=ih(t);if(r){const o=`url(${`/api/project-icons/${encodeURIComponent(r)}`})`,c={maskImage:o,WebkitMaskImage:o};return i.jsx("span",{"aria-hidden":"true",className:"project-icon-external-glyph",style:c})}return i.jsx("span",{"aria-hidden":"true",children:e})}function oh({icon:t,projectName:e,editable:n=!1,onEdit:s,editLabel:r,title:a,className:o=""}){const c=i.jsx(yi,{icon:t,fallback:ah(e)}),l=`project-icon-avatar${n?" editable":""}${o?` ${o}`:""}`;return n&&s?i.jsx("button",{type:"button",className:l,title:r,"aria-label":r,onClick:s,children:c}):i.jsx("span",{className:l,title:a,"aria-hidden":"true",children:c})}function ch({project:t,currentUser:e,showArchived:n,archiveBusy:s,menuOpen:r,t:a,variant:o,onToggleMenu:c,onCloseMenu:l,onAssignTags:u,onRename:d,onDuplicate:h,onArchive:p,onTransfer:m,onDelete:D}){const C=f.useRef(null),b=t.permission==="owner",w=e.role==="admin"||e.canCreateProjects,x=t.ownerId===e.id,N=t.permission==="owner";f.useEffect(()=>{if(!r)return;const O=z=>{z.target instanceof Node&&!C.current?.contains(z.target)&&l()},J=z=>{z.key==="Escape"&&l()};return document.addEventListener("pointerdown",O),document.addEventListener("keydown",J),()=>{document.removeEventListener("pointerdown",O),document.removeEventListener("keydown",J)}},[r,l]);const L=[{id:"tags",label:a("tags.assign"),icon:i.jsx(Ti,{"aria-hidden":!0,size:15}),section:"main",onSelect:u},...b?[{id:"rename",label:a("projects.rename"),icon:i.jsx(Ai,{"aria-hidden":!0,size:15}),section:"main",onSelect:d}]:[],...w?[{id:"duplicate",label:a("projects.duplicate"),icon:i.jsx(SD,{"aria-hidden":!0,size:15}),section:"main",onSelect:h}]:[],{id:"download",label:a("projects.download"),icon:i.jsx(Tr,{"aria-hidden":!0,size:15}),section:"main",href:`/api/projects/${t.id}/download`},{id:"archive",label:a(n?"projects.unarchive":"projects.archive"),icon:n?i.jsx(cD,{"aria-hidden":!0,size:15}):i.jsx(ec,{"aria-hidden":!0,size:15}),section:"main",disabled:s,onSelect:p},...x?[{id:"transfer",label:a("projects.transfer"),icon:i.jsx(Pd,{"aria-hidden":!0,size:15}),section:"main",onSelect:m}]:[],...N?[{id:"delete",label:a("common.delete"),icon:i.jsx(nn,{"aria-hidden":!0,size:15}),section:"danger",onSelect:D}]:[]],T=L.filter(O=>O.section==="main"),_=L.filter(O=>O.section==="danger"),$=O=>{O.disabled||(l(),O.onSelect?.())};return i.jsxs("div",{ref:C,className:`project-action-menu-root project-action-menu-${o}`,onClick:O=>O.stopPropagation(),children:[i.jsx("button",{type:"button",className:"project-action-menu-trigger","aria-label":a("projects.projectActions",{project:t.name}),"aria-expanded":r,"aria-controls":`project-actions-${t.id}`,onClick:O=>{O.stopPropagation(),c()},children:i.jsx(OD,{"aria-hidden":!0,size:19})}),r&&i.jsxs("div",{id:`project-actions-${t.id}`,className:"project-action-menu",role:"group","aria-label":a("projects.projectActions",{project:t.name}),children:[T.map(O=>O.href?i.jsxs("a",{href:O.href,download:!0,onClick:J=>{J.stopPropagation(),l()},children:[O.icon,O.label]},O.id):i.jsxs("button",{type:"button",disabled:O.disabled,onClick:J=>{J.stopPropagation(),$(O)},children:[O.icon,O.label]},O.id)),_.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"project-action-menu-separator","aria-hidden":"true"}),_.map(O=>i.jsxs("button",{type:"button",className:"danger",onClick:J=>{J.stopPropagation(),$(O)},children:[O.icon,O.label]},O.id))]})]})]})}function e2({project:t,currentUser:e,showArchived:n,archiveBusy:s,menuOpen:r,t:a,formatCreatedDate:o,formatUpdatedTime:c,formatExactTime:l,onOpenProject:u,onToggleMenu:d,onCloseMenu:h,onAssignTags:p,onRename:m,onDuplicate:D,onArchive:C,onTransfer:b,onDelete:w,onChooseIcon:x}){const N=t.ownerDisplayName??t.ownerUsername??a("projects.deletedUser"),L=t.lastModifiedDisplayName??t.lastModifiedUsername??a("projects.deletedUser");return i.jsxs("article",{className:`project-card project-list-row${t.ownerId===e.id?" owned-project":""}${r?" project-list-menu-open":""}`,children:[i.jsx(oh,{icon:t.icon,projectName:t.name,title:t.name,editable:t.permission==="owner",editLabel:a("projectIcons.change"),onEdit:x,className:"project-list-avatar"}),i.jsxs("button",{type:"button",className:"project-list-open",onClick:u,"aria-label":a("projects.openProject",{project:t.name}),children:[i.jsx("span",{className:"project-list-summary",children:i.jsxs("span",{className:"project-list-title-line",children:[i.jsx("strong",{className:"project-list-title",title:t.name,children:t.name}),!!(t.unresolvedCommentCount&&t.unresolvedCommentCount>0)&&i.jsxs("span",{className:"project-comments-badge unresolved",title:a("projects.unresolvedCommentsTooltip",{unresolved:t.unresolvedCommentCount,total:t.commentCount??t.unresolvedCommentCount}),children:[i.jsx(nc,{"aria-hidden":!0,size:10}),i.jsx("span",{children:a("projects.unresolvedCount",{count:t.unresolvedCommentCount})})]}),t.tags?.length>0&&i.jsx("span",{className:"project-list-tags",children:t.tags.map(T=>i.jsx("span",{className:`tag tag-${T.color} project-list-tag`,title:T.name,children:T.name},T.id))})]})}),i.jsxs("span",{className:"project-list-owner",title:N,children:[i.jsxs("span",{className:"sr-only",children:[a("projects.owner"),": "]}),N]}),i.jsxs("span",{className:"project-list-created",title:l(t.createdAt),children:[i.jsxs("span",{className:"sr-only",children:[a("projects.created"),": "]}),i.jsx("time",{dateTime:t.createdAt,children:o(t.createdAt)})]}),i.jsxs("span",{className:"project-list-modified",title:a("projects.modifiedByUser",{time:l(t.updatedAt),user:L}),children:[i.jsxs("span",{className:"sr-only",children:[a("projects.modified"),": "]}),i.jsx("time",{dateTime:t.updatedAt,children:c(t.updatedAt)}),i.jsx("small",{children:a("projects.byUser",{user:L})})]})]}),i.jsx(ch,{variant:"list",project:t,currentUser:e,showArchived:n,archiveBusy:s,menuOpen:r,t:a,onToggleMenu:d,onCloseMenu:h,onAssignTags:p,onRename:m,onDuplicate:D,onArchive:C,onTransfer:b,onDelete:w})]})}function Xl(t){return t.trim().toLocaleLowerCase()}function t2({project:t,open:e,onOpenChange:n,onSave:s}){const{t:r,i18n:a}=Qe(),[o,c]=f.useState(""),[l,u]=f.useState(null),[d,h]=f.useState(""),[p,m]=f.useState(!1),[D,C]=f.useState("");f.useEffect(()=>{e&&(c(""),u(t?.icon??null),h(t?.icon&&!rh(t.icon)?t.icon:""),m(!1),C(""))},[e,t?.id,t?.icon]);const b=f.useMemo(()=>{const T=Xl(o);return T?Yl.filter(({name:_})=>[_,r(`projectIcons.icons.${_}.name`),r(`projectIcons.icons.${_}.keywords`)].some($=>Xl($).includes(T))):Yl},[a.resolvedLanguage,o,r]),w=async()=>{if(!(!t||p)){m(!0),C("");try{await s(t.id,l),n(!1)}catch(T){C(de(T))}finally{m(!1)}}},x=l!==(t?.icon??null),N=T=>{u(T),h("")},L=T=>{h(T);const _=T.trim();u(_?ih(_)??_:null)};return i.jsx(ft,{open:e,wide:!0,className:"project-icon-picker-modal",title:r("projectIcons.title"),description:t?r("projectIcons.description",{project:t.name}):void 0,onOpenChange:T=>{p||n(T)},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",disabled:p,onClick:()=>n(!1),children:r("common.cancel")}),i.jsx("button",{type:"button",className:"primary",disabled:p||!x,"aria-busy":p,onClick:()=>{w()},children:r("projectIcons.save")})]}),children:i.jsxs("div",{className:"project-icon-picker",children:[D&&i.jsx("p",{className:"error dialog-error",role:"alert",children:D}),i.jsxs("label",{className:"project-icon-search",children:[i.jsx(sc,{"aria-hidden":"true",size:16}),i.jsx("span",{className:"sr-only",children:r("projectIcons.search")}),i.jsx("input",{autoFocus:!0,value:o,placeholder:r("projectIcons.search"),onChange:T=>c(T.target.value)})]}),i.jsxs("div",{className:"project-icon-options","aria-label":r("projectIcons.title"),children:[i.jsxs("button",{type:"button","aria-pressed":l===null,className:`project-icon-option project-icon-reset${l===null?" selected":""}`,title:r("projectIcons.useInitial"),onClick:()=>N(null),children:[i.jsx("span",{className:"project-icon-option-glyph",children:i.jsx(yi,{fallback:ah(t?.name??"")})}),i.jsx("span",{children:r("projectIcons.useInitial")})]}),b.map(({name:T})=>i.jsxs("button",{type:"button","aria-pressed":l===T,className:`project-icon-option${l===T?" selected":""}`,title:r(`projectIcons.icons.${T}.name`),onClick:()=>N(T),children:[i.jsx("span",{className:"project-icon-option-glyph",children:i.jsx(yi,{icon:T,fallback:"?"})}),i.jsx("span",{children:r(`projectIcons.icons.${T}.name`)})]},T))]}),b.length===0&&i.jsx("p",{className:"project-icon-picker-empty",children:r("projectIcons.noMatches",{query:o})}),i.jsxs("div",{className:"project-icon-advanced",children:[i.jsx("label",{htmlFor:"project-icon-advanced-name",children:r("projectIcons.advancedName")}),i.jsxs("div",{className:"project-icon-advanced-input",children:[i.jsx("input",{id:"project-icon-advanced-name",value:d,placeholder:r("projectIcons.advancedNamePlaceholder"),onChange:T=>L(T.target.value),spellCheck:!1,autoCapitalize:"off",autoCorrect:"off"}),d.trim()&&i.jsx("span",{className:"project-icon-advanced-preview","aria-label":r("projectIcons.advancedPreview"),children:i.jsx(yi,{icon:l,fallback:"?"})})]}),i.jsxs("p",{children:[r("projectIcons.advancedNameDescription")," ",i.jsx("a",{href:"https://icon-sets.iconify.design/lucide/",target:"_blank",rel:"noreferrer",children:r("projectIcons.browse")})]})]})]})})}const Jl=["red","orange","yellow","green","blue","purple","gray"];function Ia(t){return[...t].sort((e,n)=>e.name.localeCompare(n.name))}function n2(t){return t instanceof Error&&t.name==="AbortError"}function s2({open:t,onOpenChange:e,onTagCreated:n,onTagUpdated:s,onTagDeleted:r}){const{t:a}=Qe(),[o,c]=f.useState([]),[l,u]=f.useState(!1),[d,h]=f.useState(""),[p,m]=f.useState(""),[D,C]=f.useState("blue"),[b,w]=f.useState(!1),[x,N]=f.useState(null),[L,T]=f.useState(""),[_,$]=f.useState("blue"),[O,J]=f.useState(null),[z,ae]=f.useState(null),[M,K]=f.useState(""),[R,A]=f.useState(!1);f.useEffect(()=>{if(!t)return;const v=new AbortController;return u(!0),h(""),te("/api/tags/management",{signal:v.signal}).then(ue=>c(Ia(ue.tags))).catch(ue=>{n2(ue)||h(de(ue))}).finally(()=>{v.signal.aborted||u(!1)}),()=>v.abort()},[t]);const P=async()=>{if(!(!p.trim()||b)){w(!0),h("");try{const v=await te("/api/tags",{method:"POST",body:JSON.stringify({name:p,color:D})});c(ue=>Ia([...ue,{...v.tag,projectCount:0}])),n(v.tag),m(""),C("blue")}catch(v){h(de(v))}finally{w(!1)}}},pe=v=>{N(v.id),T(v.name),$(v.color),h("")},we=async v=>{if(!(!L.trim()||O)){J(v.id),h("");try{const ue=await te(`/api/tags/${v.id}`,{method:"PATCH",body:JSON.stringify({name:L,color:_})}),Z={...ue.tag,projectCount:v.projectCount};c(Y=>Ia(Y.map(ce=>ce.id===v.id?Z:ce))),s(ue.tag),N(null)}catch(ue){h(de(ue))}finally{J(null)}}},Fe=async()=>{if(!(!z||R)){A(!0),K("");try{await te(`/api/tags/${z.id}`,{method:"DELETE"}),c(v=>v.filter(ue=>ue.id!==z.id)),r(z.id),ae(null),x===z.id&&N(null)}catch(v){K(de(v))}finally{A(!1)}}},Ne=b||O!==null||R,Ce=v=>{!v&&Ne||(v||(h(""),K(""),N(null)),e(v))};return i.jsxs(i.Fragment,{children:[i.jsx(ft,{open:t,title:a("tags.manage"),description:a("tags.manageDescription"),wide:!0,className:"tag-management-modal",onOpenChange:Ce,footer:i.jsx("button",{onClick:()=>Ce(!1),disabled:Ne,children:a("common.close")}),children:i.jsxs("div",{className:"tag-management",children:[d&&i.jsx("p",{className:"error dialog-error",role:"alert",children:d}),i.jsxs("div",{className:"tag-management-create",children:[i.jsxs("label",{className:"tag-management-field",children:[i.jsx("span",{children:a("tags.name")}),i.jsx("input",{autoFocus:!0,value:p,maxLength:32,placeholder:a("tags.name"),onChange:v=>{m(v.target.value),h("")},onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),P())}})]}),i.jsxs("label",{className:"tag-management-field tag-management-color",children:[i.jsx("span",{children:a("tags.color")}),i.jsx("select",{value:D,onChange:v=>C(v.target.value),children:Jl.map(v=>i.jsx("option",{value:v,children:a(`tags.${v}`)},v))})]}),i.jsxs("button",{type:"button",className:"primary",disabled:!p.trim()||b,"aria-busy":b,onClick:()=>{P()},children:[b?i.jsx(Ze,{className:"spin",size:14}):i.jsx(xr,{"aria-hidden":!0,size:14}),a("tags.createInManager")]})]}),l?i.jsxs("div",{className:"tag-management-loading",children:[i.jsx(Ze,{className:"spin",size:16}),a("common.loading")]}):o.length===0?i.jsx("p",{className:"tag-management-empty",children:a("tags.noTags")}):i.jsx("div",{className:"tag-management-list",children:o.map(v=>{const ue=x===v.id,Z=O===v.id;return i.jsxs("article",{className:`tag-management-item${ue?" editing":""}`,children:[i.jsxs("div",{className:"tag-management-item-main",children:[i.jsx("span",{className:`tag-dot tag-${v.color}`,"aria-hidden":"true"}),i.jsxs("div",{children:[i.jsx("strong",{title:v.name,children:v.name}),i.jsx("small",{children:a("tags.projectCount",{count:v.projectCount})})]})]}),i.jsxs("div",{className:"tag-management-item-actions",children:[i.jsx("button",{type:"button",title:a("tags.edit"),"aria-label":a("tags.edit"),disabled:Ne&&!ue,onClick:()=>pe(v),children:i.jsx(Ai,{"aria-hidden":!0,size:14})}),i.jsx("button",{type:"button",className:"danger-text",title:a("common.delete"),"aria-label":a("common.delete"),disabled:Ne,onClick:()=>{ae(v),K("")},children:i.jsx(nn,{"aria-hidden":!0,size:14})})]}),ue&&i.jsxs("div",{className:"tag-management-edit",children:[i.jsxs("label",{className:"tag-management-field",children:[i.jsx("span",{children:a("tags.rename")}),i.jsx("input",{value:L,maxLength:32,onChange:Y=>{T(Y.target.value),h("")},onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),we(v))}})]}),i.jsxs("label",{className:"tag-management-field tag-management-color",children:[i.jsx("span",{children:a("tags.color")}),i.jsx("select",{value:_,onChange:Y=>{$(Y.target.value),h("")},children:Jl.map(Y=>i.jsx("option",{value:Y,children:a(`tags.${Y}`)},Y))})]}),i.jsxs("div",{className:"tag-management-edit-actions",children:[i.jsxs("button",{type:"button",disabled:Z,onClick:()=>{N(null),h("")},children:[i.jsx(Ht,{"aria-hidden":!0,size:14}),a("common.cancel")]}),i.jsxs("button",{type:"button",className:"primary",disabled:!L.trim()||Z,"aria-busy":Z,onClick:()=>{we(v)},children:[Z?i.jsx(Ze,{className:"spin",size:14}):i.jsx(Zn,{"aria-hidden":!0,size:14}),a("common.save")]})]})]})]},v.id)})})]})}),i.jsx(_n,{open:!!z,title:a("tags.deleteTitle"),description:a("tags.deleteDescription",{tag:z?.name??"",count:z?.projectCount??0}),confirmLabel:a(R?"common.loading":"common.delete"),danger:!0,busy:R,error:M,onCancel:()=>{R||(ae(null),K(""))},onConfirm:()=>{Fe()}})]})}const r2=f.lazy(()=>ns(()=>import("./SystemMetricsDialog-DxQsGcIH.js"),__vite__mapDeps([4,1])).then(t=>({default:t.SystemMetricsDialog})));function i2(t){return t instanceof Error&&t.name==="AbortError"}function a2(t,e,n,s){const r=new Date(t).getTime();if(!Number.isFinite(r))return t;const a=r-n,o=Math.abs(a),c=60*1e3,l=60*c,u=24*l,d=3*u;if(o>d){const D=Math.floor(o/u),C=a<0?"Past":"Future";return s(`projects.relativeDays${C}`,{days:D,hours:0,minutes:0})}if(o>=u){const D=Math.floor(o/u),C=Math.floor(o%u/l),b=a<0?"Past":"Future",w=C>0?"DaysHours":"Days";return s(`projects.relative${w}${b}`,{days:D,hours:C,minutes:0})}if(o>=l){const D=Math.floor(o/l),C=Math.floor(o%l/c),b=a<0?"Past":"Future",w=C>0?"HoursMinutes":"Hours";return s(`projects.relative${w}${b}`,{days:0,hours:D,minutes:C})}const h="minute",p=c,m=Math.sign(a)*Math.max(1,Math.floor(o/p));return new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(m,h)}function o2(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}function c2({site:t,user:e,initialData:n,onDataChange:s,onUser:r,onOpenProject:a}){const{t:o}=Qe(),[c,l]=f.useState(()=>n?.projects??[]),[u,d]=f.useState(()=>n?.tags??[]),[h,p]=f.useState(()=>n?.pagination??{page:1,pageSize:20,total:n?.projects.length??0,totalPages:n?.projects.length?1:0}),[m,D]=f.useState(!!n),[C,b]=f.useState(!1),[w,x]=f.useState(!1),[N,L]=f.useState(!1),[T,_]=f.useState(""),[$,O]=f.useState(""),[J,z]=f.useState(""),[ae,M]=f.useState(""),[K,R]=f.useState(""),[A,P]=f.useState(""),[pe,we]=f.useState(!1),[Fe,Ne]=f.useState(""),[Ce,v]=f.useState(!1),[ue,Z]=f.useState(!1),[Y,ce]=f.useState(""),[I,ie]=f.useState(null),[j,me]=f.useState(""),Ee=f.useRef(null),tt=f.useRef(null),[Dt,Ye]=f.useState(!1),[Me,Le]=f.useState(""),[Ie,yt]=f.useState(""),[ot,ye]=f.useState(!1),[It,he]=f.useState(!1),[ve,Re]=f.useState(null),[bt,Ge]=f.useState(null),[G,De]=f.useState(null),[X,He]=f.useState(""),[Ve,mt]=f.useState(!1),[ke,xt]=f.useState(null),[re,W]=f.useState(""),[pt,zt]=f.useState(!1),[Gt,lt]=f.useState(null),[rn,yn]=f.useState(!1),[Yt,S]=f.useState(null),[oe,le]=f.useState([]),[Ae,vt]=f.useState(""),[ut,g]=f.useState(!1),[E,y]=f.useState(""),[H,q]=f.useState(()=>localStorage.getItem("texlite-project-view")==="list"?"list":"grid"),[ee,V]=f.useState(()=>localStorage.getItem("texlite-project-sort")==="created"?"created":"updated"),[fe,xe]=f.useState(!1),[qe,Oe]=f.useState(""),[Se,st]=f.useState(null),[gt,Ue]=f.useState(1),[rt,at]=f.useState(()=>Date.now()),[Xe,Ft]=f.useState(""),Tt=f.useRef(0),ct=f.useRef(null),$e=(F,ne,ge,We,dt)=>`${F?"archived":"active"}|${ne}|${ge}|${We}|${dt}`,qt=$e(fe,gt,Me,Ie,ee),Mt=(F,ne,ge,We,dt)=>{const At=new URLSearchParams({page:String(ne),pageSize:"20",sort:dt});F&&At.set("archived","1"),ge.trim()&&At.set("search",ge.trim()),We&&At.set("tag",We);const Nn=$e(F,ne,ge,We,dt),Nt=++Tt.current;ct.current?.abort();const Vn=new AbortController;return ct.current=Vn,Promise.all([te(`/api/projects?${At.toString()}`,{signal:Vn.signal}),te("/api/tags",{signal:Vn.signal})]).then(([bn,dr])=>{Nt===Tt.current&&(l(bn.projects),d(dr.tags),p(bn.pagination),Ue(bn.pagination.page),D(!0),Ft(Nn))}).catch(bn=>{!i2(bn)&&Nt===Tt.current&&_(de(bn))}).finally(()=>{ct.current===Vn&&(ct.current=null)})};f.useEffect(()=>(Mt(fe,gt,Me,Ie,ee),()=>ct.current?.abort()),[fe,gt,Me,Ie,ee]),f.useEffect(()=>{m&&!fe&&Xe===qt&&s(c,u,h)},[c,u,h,m,Xe,qt,fe]),f.useEffect(()=>{const F=window.setInterval(()=>at(Date.now()),6e4);return()=>window.clearInterval(F)},[]),f.useEffect(()=>{if(!ot)return;const F=ge=>{ge.target instanceof Node&&!tt.current?.contains(ge.target)&&ye(!1)},ne=ge=>{ge.key==="Escape"&&ye(!1)};return document.addEventListener("pointerdown",F),document.addEventListener("keydown",ne),()=>{document.removeEventListener("pointerdown",F),document.removeEventListener("keydown",ne)}},[ot]);const rs=F=>{st(null),q(F),localStorage.setItem("texlite-project-view",F)},Un=F=>{V(F),Ue(1),localStorage.setItem("texlite-project-sort",F)},Sn=F=>{xe(F),Ue(1)},Tn=F=>{yt(F),Ue(1)},Je=async()=>{if(!(!Fe.trim()||Ce)){v(!0),O("");try{const{project:F}=await te("/api/projects",{method:"POST",body:JSON.stringify({name:Fe})});we(!1),Ne("");const ne=fe||gt!==1?c:[F,...c].slice(0,h.pageSize),ge=fe?h:{...h,total:h.total+1,totalPages:Math.ceil((h.total+1)/h.pageSize)};l(ne),p(ge),fe||s(ne,u,ge),a(F.id)}catch(F){O(de(F))}finally{v(!1)}}},Hn=async()=>{if(!I)return;const F=t.maxUploadSizeMB;if(I.size>F*1024*1024)return me(o("errors.fileTooLarge",{size:F}));Ye(!0),me("");const ne=new FormData;ne.append("file",I);try{const{project:ge}=await te(`/api/projects/import?name=${encodeURIComponent(Y.trim())}`,{method:"POST",body:ne}),We=fe||gt!==1?c:[ge,...c].slice(0,h.pageSize),dt=fe?h:{...h,total:h.total+1,totalPages:Math.ceil((h.total+1)/h.pageSize)};l(We),p(dt),fe||s(We,u,dt),Z(!1),ie(null),ce(""),a(ge.id)}catch(ge){me(de(ge))}finally{Ye(!1)}},kt=F=>{if(F&&!F.name.toLocaleLowerCase().endsWith(".zip")){me(o("errors.zipOnly"));return}me(""),ie(F),F&&!Y&&ce(F.name.replace(/\.zip$/i,""))},Jr=async()=>{await te("/api/auth/logout",{method:"POST"}),r(null)},fa=async F=>{if(!ve)return;const ne=ve.tags.some(ge=>ge.id===F.id);z("");try{const We=(await te(ne?`/api/projects/${ve.id}/tags/${F.id}`:`/api/projects/${ve.id}/tags`,ne?{method:"DELETE"}:{method:"POST",body:JSON.stringify({tagId:F.id})})).project;Re(We),l(dt=>dt.map(At=>At.id===We.id?We:At))}catch(ge){z(de(ge))}},Bn=F=>{d(ne=>[...ne,F].sort((ge,We)=>ge.name.localeCompare(We.name)))},Zr=F=>{const ne=ge=>ge.map(We=>We.id===F.id?F:We);d(ge=>ne(ge).sort((We,dt)=>We.name.localeCompare(dt.name))),l(ge=>ge.map(We=>({...We,tags:ne(We.tags)}))),Re(ge=>ge?{...ge,tags:ne(ge.tags)}:null)},Ct=F=>{d(ne=>ne.filter(ge=>ge.id!==F)),l(ne=>ne.map(ge=>({...ge,tags:ge.tags.filter(We=>We.id!==F)}))),Re(ne=>ne?{...ne,tags:ne.tags.filter(ge=>ge.id!==F)}:null),yt(ne=>ne===F?"":ne)},ma=async(F,ne)=>{const ge=await te(`/api/projects/${F}/icon`,{method:"PATCH",body:JSON.stringify({icon:ne})});l(We=>{const dt=We.map(At=>At.id===ge.project.id?ge.project:At);return ee==="updated"?dt.sort((At,Nn)=>Nn.updatedAt.localeCompare(At.updatedAt)||At.name.localeCompare(Nn.name)):dt})},or=async()=>{if(!(!G||!X.trim()||Ve)){mt(!0),M("");try{const F=await te(`/api/projects/${G.id}`,{method:"PATCH",body:JSON.stringify({name:X})});l(ne=>ne.map(ge=>ge.id===F.project.id?F.project:ge)),De(null),He("")}catch(F){M(de(F))}finally{mt(!1)}}},cr=async()=>{if(!(!ke||!re.trim())){zt(!0),R("");try{await te(`/api/projects/${ke.id}/duplicate`,{method:"POST",body:JSON.stringify({name:re})}),xt(null),W(""),Mt(fe,gt,Me,Ie,ee)}catch(F){R(de(F))}finally{zt(!1)}}},lr=async()=>{if(!(!Gt||rn)){yn(!0),P("");try{await te(`/api/projects/${Gt.id}`,{method:"DELETE"}),l(dt=>dt.filter(At=>At.id!==Gt.id));const F=Math.max(0,h.total-1),ne=Math.ceil(F/h.pageSize),ge=ne===0?1:Math.min(gt,ne),We={...h,page:ge,total:F,totalPages:ne};p(We),lt(null),ge!==gt?Ue(ge):Mt(fe,gt,Me,Ie,ee)}catch(F){P(de(F))}finally{yn(!1)}}},Qr=async F=>{S(F),vt(""),le([]),y(""),g(!0);try{const ne=await te("/api/users");le(ne.users.filter(ge=>ge.id!==F.ownerId))}catch(ne){y(de(ne))}finally{g(!1)}},ei=async()=>{if(!(!Yt||!Ae)){g(!0),y("");try{await te(`/api/projects/${Yt.id}/owner`,{method:"PUT",body:JSON.stringify({userId:Ae})}),S(null),vt(""),Mt(fe,gt,Me,Ie,ee)}catch(F){y(de(F))}finally{g(!1)}}},ti=async F=>{const ne=!fe;Oe(F.id),_("");try{await te(`/api/projects/${F.id}/archive`,{method:ne?"PUT":"DELETE"});const ge=c.filter(Nt=>Nt.id!==F.id);l(ge);const We=Math.max(0,h.total-1),dt=Math.ceil(We/h.pageSize),At=dt===0?1:Math.min(gt,dt),Nn={...h,page:At,total:We,totalPages:dt};p(Nn),fe||s(ge,u,Nn),At!==gt?Ue(At):Mt(fe,gt,Me,Ie,ee)}catch(ge){_(de(ge))}finally{Oe("")}},ws=c,ur=F=>new Date(F).toLocaleString(Ke.resolvedLanguage),pa=F=>{const ne=new Date(F);return Number.isFinite(ne.getTime())?new Intl.DateTimeFormat(Ke.resolvedLanguage??"en",{year:"numeric",month:"2-digit",day:"2-digit"}).format(ne):F},ni=F=>a2(F,Ke.resolvedLanguage??"en",rt,(ne,ge)=>o(ne,ge));return i.jsxs("div",{className:"page",children:[i.jsxs("header",{className:"topbar",children:[i.jsxs("a",{className:"brand-link",href:"/","aria-label":t.siteName,children:[i.jsx("span",{className:"site-title",children:t.siteName}),i.jsx(Zi,{siteName:t.siteName})]}),i.jsxs("div",{className:"top-actions",children:[e.role==="admin"&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"ghost",onClick:()=>x(!0),children:[i.jsx(oD,{"aria-hidden":!0,size:14}),o("metrics.title")]}),i.jsxs("button",{className:`ghost${C?" top-return-action":""}`,onClick:()=>{b(F=>!F),L(!1)},children:[C?i.jsx(go,{"aria-hidden":!0,size:14}):i.jsx(Br,{"aria-hidden":!0,size:14}),o(C?"users.back":"users.manage")]})]}),i.jsxs("button",{className:`ghost${N?" top-return-action":""}`,onClick:()=>{b(!1),L(F=>!F)},children:[N?i.jsx(go,{"aria-hidden":!0,size:14}):i.jsx(cs,{"aria-hidden":!0,size:14}),o(N?"users.back":"citationLibrary.title")]}),i.jsx(Ho,{compact:!0}),i.jsxs("span",{className:"top-user-identity",children:[i.jsx("strong",{children:e.displayName}),i.jsxs("small",{children:["@",e.username]})]}),i.jsx("button",{className:"ghost",onClick:Jr,children:o("auth.logout")})]})]}),C?i.jsx(J1,{currentUser:e,minPasswordLength:t.minPasswordLength}):N?i.jsx("main",{className:"dashboard citation-library-page-shell",children:i.jsx(nh,{page:!0,open:!0,onOpenChange:L,onBack:()=>L(!1),currentUserId:e.id,maxBibtexBytes:t.maxCitationBibtexBytes})}):i.jsxs("main",{className:"dashboard",children:[i.jsxs("div",{className:"section-title",children:[i.jsxs("div",{children:[i.jsxs("h1",{children:[i.jsx(ki,{"aria-hidden":!0,size:25}),o("projects.title")]}),i.jsx("p",{className:"muted",children:e.canCreateProjects?o("projects.subtitle"):o("projects.restricted")})]}),i.jsxs("div",{className:"section-actions",children:[i.jsxs("button",{onClick:()=>he(!0),children:[i.jsx(Ti,{"aria-hidden":!0,size:15}),o("tags.manage")]}),e.canCreateProjects&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{onClick:()=>{me(""),Z(!0)},children:[i.jsx(Bi,{"aria-hidden":!0,size:15}),o("projects.upload")]}),i.jsxs("button",{className:"primary",onClick:()=>{O(""),we(!0)},children:[i.jsx(zd,{"aria-hidden":!0,size:15}),o("projects.new")]})]})]})]}),T&&i.jsx("p",{className:"error",children:T}),i.jsxs("div",{className:"project-catalog-layout",children:[i.jsxs("aside",{ref:tt,className:`project-tag-sidebar${Ie?" has-active-filter":""}`,children:[i.jsxs("button",{type:"button",className:"project-tag-toggle",title:o("projects.filterTags"),"aria-label":o("projects.filterTags"),"aria-expanded":ot,"aria-controls":"dashboard-tag-filters",onClick:()=>ye(F=>!F),children:[i.jsxs("span",{className:"project-tag-toggle-copy",children:[i.jsx(Ti,{"aria-hidden":!0,size:15}),i.jsx("span",{children:o("projects.filterTags")})]}),i.jsx(Sr,{className:"project-tag-toggle-chevron","aria-hidden":!0,size:15})]}),ot&&i.jsxs("div",{id:"dashboard-tag-filters",className:"project-tag-filters",role:"group","aria-label":o("projects.filterTags"),children:[i.jsx("button",{type:"button",className:Ie?"":"active","aria-pressed":!Ie,onClick:()=>Tn(""),children:o("projects.allTags")}),u.length>0?u.map(F=>i.jsxs("button",{type:"button",className:Ie===F.id?"active":"",title:F.name,"aria-pressed":Ie===F.id,onClick:()=>Tn(Ie===F.id?"":F.id),children:[i.jsx(Zl,{color:F.color}),i.jsx("span",{children:F.name})]},F.id)):i.jsx("p",{className:"project-tag-empty",children:o("tags.none")})]})]}),i.jsxs("div",{className:"project-catalog-content",children:[i.jsxs("div",{className:"project-toolbar",children:[i.jsx("input",{type:"search",placeholder:o("projects.search"),value:Me,onChange:F=>{Le(F.target.value),Ue(1)}}),i.jsxs("div",{className:"project-scope",role:"tablist","aria-label":o("projects.scope"),children:[i.jsxs("button",{className:fe?"":"active",onClick:()=>Sn(!1),role:"tab","aria-selected":!fe,children:[i.jsx(ki,{size:14}),o("projects.active")]}),i.jsxs("button",{className:fe?"active":"",onClick:()=>Sn(!0),role:"tab","aria-selected":fe,children:[i.jsx(ec,{size:14}),o("projects.archived")]})]}),i.jsxs("label",{className:"project-sort",children:[i.jsx(lD,{size:14}),i.jsx("span",{children:o("projects.sortBy")}),i.jsxs("select",{value:ee,onChange:F=>Un(F.target.value),children:[i.jsx("option",{value:"updated",children:o("projects.sortModified")}),i.jsx("option",{value:"created",children:o("projects.sortCreated")})]})]}),i.jsxs("div",{className:"view-toggle",children:[i.jsx("button",{className:H==="grid"?"active":"",onClick:()=>rs("grid"),title:o("projects.grid"),children:"▦"}),i.jsx("button",{className:H==="list"?"active":"",onClick:()=>rs("list"),title:o("projects.list"),children:"☷"})]})]}),i.jsxs("div",{className:`project-grid ${H==="list"?"list-view":""}${Se?" project-list-menu-active":""}`,children:[H==="list"&&ws.length>0&&i.jsxs("div",{className:"project-list-header","aria-hidden":"true",children:[i.jsx("span",{children:o("projects.title")}),i.jsx("span",{children:o("projects.owner")}),i.jsx("span",{children:o("projects.created")}),i.jsx("span",{children:o("projects.modified")}),i.jsx("span",{children:o("projects.actions")})]}),H==="list"?ws.map(F=>i.jsx(e2,{project:F,currentUser:e,showArchived:fe,archiveBusy:qe===F.id,menuOpen:Se===F.id,t:o,formatCreatedDate:pa,formatUpdatedTime:ni,formatExactTime:ur,onOpenProject:()=>{st(null),a(F.id)},onToggleMenu:()=>st(ne=>ne===F.id?null:F.id),onCloseMenu:()=>st(ne=>ne===F.id?null:ne),onAssignTags:()=>{z(""),Re(F)},onRename:()=>{M(""),De(F),He(F.name)},onDuplicate:()=>{R(""),xt(F),W(`${F.name} (1)`)},onArchive:()=>{ti(F)},onTransfer:()=>{Qr(F)},onDelete:()=>{lt(F),P("")},onChooseIcon:()=>Ge(F)},F.id)):ws.map(F=>i.jsxs("article",{className:`project-card project-grid-card${F.ownerId===e.id?" owned-project":""}${Se===F.id?" project-card-menu-open":""}`,role:"button",tabIndex:0,"aria-label":o("projects.openProject",{project:F.name}),onClick:()=>{st(null),a(F.id)},onKeyDown:ne=>{ne.target!==ne.currentTarget||ne.key!=="Enter"&&ne.key!==" "||(ne.preventDefault(),st(null),a(F.id))},children:[i.jsxs("div",{className:"project-card-meta-row",children:[i.jsxs("div",{className:"project-card-badges",children:[i.jsx("span",{className:"owner-badge",title:F.ownerDisplayName??F.ownerUsername??o("projects.deletedUser"),children:F.ownerDisplayName??F.ownerUsername??o("projects.deletedUser")}),!!(F.unresolvedCommentCount&&F.unresolvedCommentCount>0)&&i.jsxs("span",{className:"project-comments-badge unresolved",title:o("projects.unresolvedCommentsTooltip",{unresolved:F.unresolvedCommentCount,total:F.commentCount??F.unresolvedCommentCount}),children:[i.jsx(nc,{"aria-hidden":!0,size:11}),i.jsx("span",{children:o("projects.unresolvedCount",{count:F.unresolvedCommentCount})})]})]}),i.jsx(ch,{variant:"grid",project:F,currentUser:e,showArchived:fe,archiveBusy:qe===F.id,menuOpen:Se===F.id,t:o,onToggleMenu:()=>st(ne=>ne===F.id?null:F.id),onCloseMenu:()=>st(ne=>ne===F.id?null:ne),onAssignTags:()=>{z(""),Re(F)},onRename:()=>{M(""),De(F),He(F.name)},onDuplicate:()=>{R(""),xt(F),W(`${F.name} (1)`)},onArchive:()=>{ti(F)},onTransfer:()=>{Qr(F)},onDelete:()=>{lt(F),P("")}})]}),i.jsxs("div",{className:"project-card-title-row",children:[i.jsx("span",{className:"project-card-icon-control",onClick:F.permission==="owner"?ne=>ne.stopPropagation():void 0,children:i.jsx(oh,{icon:F.icon,projectName:F.name,title:F.name,editable:F.permission==="owner",editLabel:o("projectIcons.change"),onEdit:()=>Ge(F),className:"project-card-icon"})}),i.jsx("strong",{className:"project-card-title",title:F.name,children:F.name})]}),i.jsx("div",{className:"project-card-tags","aria-label":o("tags.assignTitle",{project:F.name}),title:F.tags?.map(ne=>ne.name).join(", ")||void 0,children:F.tags?.map(ne=>i.jsx("span",{className:`tag tag-${ne.color}`,title:ne.name,children:ne.name},ne.id))}),i.jsxs("dl",{className:"project-meta",children:[i.jsxs("div",{children:[i.jsxs("dt",{children:[i.jsx(Id,{"aria-hidden":!0,size:13}),o("projects.created")]}),i.jsx("dd",{children:i.jsx("time",{dateTime:F.createdAt,children:ur(F.createdAt)})})]}),i.jsxs("div",{children:[i.jsxs("dt",{children:[i.jsx(XD,{"aria-hidden":!0,size:13}),o("projects.modified")]}),i.jsxs("dd",{title:o("projects.modifiedByUser",{time:ur(F.updatedAt),user:F.lastModifiedDisplayName??F.lastModifiedUsername??o("projects.deletedUser")}),children:[i.jsx("time",{dateTime:F.updatedAt,children:ni(F.updatedAt)}),i.jsxs("span",{className:"project-modified-by",children:[" · ",o("projects.byUser",{user:F.lastModifiedDisplayName??F.lastModifiedUsername??o("projects.deletedUser")})]})]})]})]})]},F.id)),ws.length===0&&(c.length===0?fe?i.jsx("div",{className:"empty",children:o("projects.noArchived")}):i.jsxs("div",{className:"project-empty",children:[i.jsx("span",{className:"project-empty-icon",children:i.jsx(Xd,{size:28})}),i.jsx("h2",{children:o("projects.emptyTitle")}),i.jsx("p",{children:e.canCreateProjects?o("projects.emptyDescription"):o("projects.emptyRestricted")})]}):i.jsx("div",{className:"empty",children:o("projects.noMatches")}))]}),h.totalPages>1&&i.jsxs("nav",{className:"project-pagination","aria-label":o("projects.pagination"),children:[i.jsxs("button",{disabled:h.page<=1,onClick:()=>Ue(F=>Math.max(1,F-1)),title:o("projects.previousPage"),children:[i.jsx(Er,{size:15}),o("projects.previousPage")]}),i.jsx("span",{children:o("projects.pageOf",{page:h.page,totalPages:h.totalPages,count:h.total})}),i.jsxs("button",{disabled:h.page>=h.totalPages,onClick:()=>Ue(F=>Math.min(h.totalPages,F+1)),title:o("projects.nextPage"),children:[i.jsx(Sr,{size:15}),o("projects.nextPage")]})]})]})]}),i.jsx(ft,{open:pe,title:o("projects.new"),description:o("projects.newDescription"),onOpenChange:F=>{!F&&Ce||(we(F),F||O(""))},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{disabled:Ce,onClick:()=>we(!1),children:o("common.cancel")}),i.jsxs("button",{className:"primary",disabled:Ce||!Fe.trim(),"aria-busy":Ce,onClick:()=>{Je()},children:[Ce&&i.jsx(Ze,{className:"spin",size:14}),o(Ce?"common.loading":"common.create")]})]}),children:i.jsxs(i.Fragment,{children:[$&&i.jsx("p",{className:"error dialog-error",children:$}),i.jsxs("label",{className:"form-field",children:[o("projects.name"),i.jsx("input",{autoFocus:!0,value:Fe,onChange:F=>{Ne(F.target.value),O("")},onKeyDown:F=>{F.key==="Enter"&&Je()}})]})]})}),i.jsx(ft,{open:ue,title:o("projects.upload"),description:o("projects.uploadDescription",{size:t.maxUploadSizeMB}),onOpenChange:F=>{Z(F),F||me("")},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>{Z(!1),me("")},children:o("common.cancel")}),i.jsx("button",{className:"primary",disabled:!I||Dt,onClick:()=>{Hn()},children:o(Dt?"projects.importing":"projects.import")})]}),children:i.jsxs("div",{className:"form-stack",children:[j&&i.jsx("p",{className:"error import-error",children:j}),i.jsxs("div",{className:`upload-picker${I?" has-file":""}`,onDragOver:F=>{F.preventDefault(),F.dataTransfer.dropEffect="copy"},onDrop:F=>{F.preventDefault(),kt(F.dataTransfer.files[0]??null)},children:[i.jsx("input",{ref:Ee,className:"sr-only",type:"file",accept:".zip,application/zip",onChange:F=>kt(F.target.files?.[0]??null)}),i.jsx(yo,{size:34}),i.jsxs("div",{className:"upload-picker-copy",children:[i.jsx("strong",{children:I?.name??o("projects.chooseZip")}),i.jsx("span",{children:I?o("projects.selectedFileSize",{size:o2(I.size)}):o("projects.dropZip")})]}),i.jsxs("button",{type:"button",onClick:()=>Ee.current?.click(),children:[i.jsx(Bi,{size:15}),o("projects.browse")]}),I&&i.jsx("button",{className:"upload-clear",type:"button",title:o("projects.clearFile"),"aria-label":o("projects.clearFile"),onClick:()=>{kt(null),Ee.current&&(Ee.current.value="")},children:i.jsx(Ht,{size:14})})]}),i.jsxs("label",{className:"form-field",children:[o("projects.name"),i.jsx("input",{value:Y,onChange:F=>ce(F.target.value)})]})]})}),i.jsx(s2,{open:It,onOpenChange:he,onTagCreated:Bn,onTagUpdated:Zr,onTagDeleted:Ct}),i.jsx(t2,{project:bt,open:!!bt,onOpenChange:F=>{F||Ge(null)},onSave:ma}),i.jsx(ft,{open:!!ve,title:o("tags.assignTitle",{project:ve?.name??""}),description:o("tags.assignDescription"),onOpenChange:F=>{F||(Re(null),z(""))},footer:i.jsx("button",{onClick:()=>{Re(null),z("")},children:o("common.close")}),children:i.jsxs("div",{className:"tag-assignment-list",children:[J&&i.jsx("p",{className:"error dialog-error",children:J}),u.map(F=>i.jsxs("label",{children:[i.jsx("input",{type:"checkbox",checked:!!ve?.tags.some(ne=>ne.id===F.id),onChange:()=>{fa(F)}}),i.jsx(Zl,{color:F.color}),i.jsx("span",{children:F.name})]},F.id)),u.length===0&&i.jsx("p",{className:"muted",children:o("tags.empty")})]})}),i.jsx(ft,{open:!!G,title:o("projects.renameTitle"),onOpenChange:F=>{!F&&Ve||F||(De(null),M(""))},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{disabled:Ve,onClick:()=>{De(null),M("")},children:o("common.cancel")}),i.jsxs("button",{className:"primary",disabled:Ve||!X.trim(),"aria-busy":Ve,onClick:()=>{or()},children:[Ve&&i.jsx(Ze,{className:"spin",size:14}),o(Ve?"common.loading":"projects.rename")]})]}),children:i.jsxs(i.Fragment,{children:[ae&&i.jsx("p",{className:"error dialog-error",children:ae}),i.jsxs("label",{className:"form-field",children:[o("projects.name"),i.jsx("input",{autoFocus:!0,value:X,onChange:F=>{He(F.target.value),M("")},onKeyDown:F=>{F.key==="Enter"&&or()}})]})]})}),i.jsx(ft,{open:!!ke,title:o("projects.duplicateTitle"),description:o("projects.duplicateDescription",{project:ke?.name??""}),onOpenChange:F=>{!F&&!pt&&(xt(null),W(""),R(""))},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{disabled:pt,onClick:()=>{xt(null),W(""),R("")},children:o("common.cancel")}),i.jsx("button",{className:"primary",disabled:pt||!re.trim(),onClick:()=>{cr()},children:o(pt?"projects.duplicating":"projects.duplicate")})]}),children:i.jsxs(i.Fragment,{children:[K&&i.jsx("p",{className:"error dialog-error",children:K}),i.jsxs("label",{className:"form-field",children:[o("projects.name"),i.jsx("input",{autoFocus:!0,value:re,onChange:F=>{W(F.target.value),R("")},onKeyDown:F=>{F.key==="Enter"&&cr()}})]})]})}),i.jsx(ft,{open:!!Yt,title:o("projects.transferOwnership"),description:o("projects.transferDescription",{project:Yt?.name??""}),onOpenChange:F=>{!F&&!ut&&(S(null),vt(""),y(""))},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{disabled:ut,onClick:()=>{S(null),vt(""),y("")},children:o("common.cancel")}),i.jsxs("button",{className:"primary",disabled:ut||!Ae,onClick:()=>{ei()},children:[ut?i.jsx(Ze,{className:"spin",size:14}):i.jsx(Pd,{size:14}),o("projects.transfer")]})]}),children:i.jsxs("div",{className:"form-stack",children:[E&&i.jsx("p",{className:"error dialog-error",children:E}),i.jsxs("label",{className:"form-field",children:[o("projects.newOwner"),i.jsxs("select",{disabled:ut||oe.length===0,value:Ae,onChange:F=>vt(F.target.value),children:[i.jsx("option",{value:"",children:ut?o("common.loading"):oe.length>0?o("projects.chooseNewOwner"):o("projects.noTransferUsers")}),oe.map(F=>i.jsxs("option",{value:F.id,children:[F.displayName??F.username," (@",F.username,")"]},F.id))]})]}),i.jsxs("p",{className:"warning",children:[i.jsx(en,{size:15}),o("projects.transferWarning")]})]})}),i.jsx(_n,{open:!!Gt,title:o("projects.deleteTitle"),description:o("projects.deleteDescription",{project:Gt?.name??""}),confirmLabel:o(rn?"common.loading":"common.delete"),danger:!0,busy:rn,error:A,onCancel:()=>{rn||(lt(null),P(""))},onConfirm:()=>{lr()}})]}),w&&i.jsx(f.Suspense,{fallback:null,children:i.jsx(r2,{open:!0,onOpenChange:x})}),i.jsx(Vo,{})]})}function Zl({color:t}){return i.jsx("span",{className:`tag-dot tag-${t}`})}const Ni=[{id:"jetbrains",labelKey:"projectSettings.fontJetBrains",stack:'"JetBrains Mono", ui-monospace, monospace'},{id:"source-code",labelKey:"projectSettings.fontSourceCode",stack:'"Source Code Pro", ui-monospace, monospace'},{id:"ibm-plex",labelKey:"projectSettings.fontIbmPlex",stack:'"IBM Plex Mono", ui-monospace, monospace'},{id:"fira-code",labelKey:"projectSettings.fontFiraCode",stack:'"Fira Code", ui-monospace, monospace'},{id:"iosevka",labelKey:"projectSettings.fontIosevka",stack:'"Iosevka", ui-monospace, monospace'}],hn={font:"jetbrains",fontSize:14,lineHeight:1.65,lineWrapping:!0,spellCheck:!0,mathPreviewOnHover:!1,vimMode:!1,formatOnCompile:!1,texFmtConfig:"",openFilesInTabs:!1},l2="texlite-editor-preferences";function lh(t,e){return`${l2}:${encodeURIComponent(t)}:${encodeURIComponent(e)}`}function Bw(t){return Ni.find(e=>e.id===t)?.stack??Ni[0].stack}function Ql(t,e){try{const n=JSON.parse(localStorage.getItem(lh(t,e))??"{}");return{font:Ni.some(s=>s.id===n.font)?n.font:hn.font,fontSize:[12,13,14,15,16,18,20].includes(Number(n.fontSize))?Number(n.fontSize):hn.fontSize,lineHeight:[1.45,1.65,1.85].includes(Number(n.lineHeight))?Number(n.lineHeight):hn.lineHeight,lineWrapping:typeof n.lineWrapping=="boolean"?n.lineWrapping:hn.lineWrapping,spellCheck:typeof n.spellCheck=="boolean"?n.spellCheck:hn.spellCheck,mathPreviewOnHover:typeof n.mathPreviewOnHover=="boolean"?n.mathPreviewOnHover:hn.mathPreviewOnHover,vimMode:typeof n.vimMode=="boolean"?n.vimMode:hn.vimMode,formatOnCompile:typeof n.formatOnCompile=="boolean"?n.formatOnCompile:hn.formatOnCompile,texFmtConfig:typeof n.texFmtConfig=="string"&&n.texFmtConfig.length<=16*1024?n.texFmtConfig:hn.texFmtConfig,openFilesInTabs:typeof n.openFilesInTabs=="boolean"?n.openFilesInTabs:hn.openFilesInTabs}}catch{return hn}}function u2(t,e,n){localStorage.setItem(lh(t,e),JSON.stringify(n))}function d2(){let t={status:"loading",error:""};const e=new Set,n=(s,r="")=>{if(!(t.status===s&&t.error===r)){t={status:s,error:r};for(const a of e)a()}};return{getSnapshot:()=>t,subscribe:s=>(e.add(s),()=>e.delete(s)),loading:()=>n("loading"),working:()=>n("working"),failed:s=>n("error",s instanceof Error?s.message:String(s))}}const Qt=d2(),h2=/\.(?:tex|bib|cls|sty)$/i,uh=3e4;let fn=null,Li=!1,ls=null,f2=1;const fs=new Map,Ri=[];let Ps=null,yr=null;class Zt extends Error{constructor(e,n){super(n),this.kind=e,this.name="TexFmtError"}kind}function Ma(t){return t instanceof Zt}function Pn(t){fn?.terminate(),fn=null,Li=!1,ls!==null&&window.clearTimeout(ls),ls=null,Ps=null,Ri.length=0,yr=null,Qt.failed(t);for(const e of fs.values())e.timeout!==null&&window.clearTimeout(e.timeout),e.reject(t);fs.clear()}function vr(){if(Ps!==null||Ri.length===0)return;let t;try{t=m2()}catch(s){Pn(s instanceof Zt?s:new Zt("load","The bundled tex-fmt formatter could not be loaded."));return}if(!Li)return;const e=Ri.shift();if(e===void 0)return;const n=fs.get(e);if(!n){vr();return}Ps=e,n.timeout=window.setTimeout(()=>{Ps===e&&Pn(new Zt("result","The formatter did not respond within 30 seconds."))},uh);try{t.postMessage({...n.request,id:e})}catch{Pn(new Zt("load","The formatter worker could not receive the source."))}}function m2(){if(fn)return fn;if(typeof Worker>"u"){const t=new Zt("load","This browser does not support formatter workers.");throw Qt.failed(t),t}Qt.loading();try{fn=new Worker(new URL("/assets/latexFormatterWorker-DYkYtcFy.js",import.meta.url),{type:"module",name:"texlite-latex-formatter"}),ls=window.setTimeout(()=>{Li||Pn(new Zt("load","The formatter did not finish loading within 30 seconds."))},uh)}catch{const t=new Zt("load","The bundled tex-fmt formatter could not be loaded.");throw Qt.failed(t),t}return fn.onmessage=t=>{const e=t.data;if(e&&"type"in e){e.type==="ready"&&(Li=!0,ls!==null&&window.clearTimeout(ls),ls=null,vr());return}if(!e||typeof e.id!="number"){Pn(new Zt("result","The formatter worker returned an invalid response."));return}const n=fs.get(e.id);if(n)if(fs.delete(e.id),n.timeout!==null&&window.clearTimeout(n.timeout),Ps===e.id&&(Ps=null),e.ok)Qt.working(),n.resolve(e.result),vr();else{const s=new Zt(e.kind,e.message);e.kind==="format"?(Qt.working(),n.reject(s),vr()):(n.reject(s),Pn(s))}},fn.onerror=()=>{Pn(new Zt("load","The bundled tex-fmt formatter could not be loaded."))},fn.onmessageerror=()=>{Pn(new Zt("result","The formatter worker returned an unreadable response."))},fn}function oc(t){const e=f2++;return new Promise((n,s)=>{fs.set(e,{request:t,resolve:n,reject:s,timeout:null}),Ri.push(e),vr()})}function p2(t,e=""){return oc({action:"format",source:t,config:e})}async function dh(){fn&&Qt.getSnapshot().status==="working"||(yr||(yr=oc({action:"probe"}).then(()=>{}).finally(()=>{yr=null})),await yr)}async function g2(){(fn||fs.size)&&Pn(new Zt("load","The formatter runtime was reloaded.")),Qt.loading(),await dh()}function fi(t){return h2.test(t)}function D2(t){return t.match(/(?:\r?\n)+$/)?.[0]??""}function y2(t,e){const n=D2(t),o=(n?t.slice(0,-n.length):t).split(/\r?\n/).find(u=>u.trim())?.match(/^[\t ]*/)?.[0]??"",c=e.replace(/(?:\r?\n)+$/,"");return`${o?c.split(`
|
|
40
|
-
`).map(u=>u&&`${o}${u}`).join(`
|
|
41
|
-
`):c}${n}`}async function _a(t,e,n=0){return oc({action:"diff",source:t,formatted:e,baseOffset:n})}function b2(t,e=null){const n=eu(t),r=e==="succeeded"||e===null&&C2(t)?[]:tu(n.filter(nu)),a=eu(F2(t));return{warnings:tu(a.filter(c=>!nu(c)&&w2(c))),errors:r}}function eu(t){return t.split(`
|
|
42
|
-
`).map(e=>e.trim()).filter(Boolean)}function tu(t){return[...new Set(t)]}function F2(t){const e=/^Running ['"][^\n]*(?:pdf|xe|lua)latex(?:\s|['"])[^\n]*$/gim;let n=-1;for(const s of t.matchAll(e))n=s.index;return n>=0?t.slice(n):t}function C2(t){return/Latexmk: All targets .* are up-to-date/i.test(t)&&/Output written on .*\.pdf/i.test(t)}function nu(t){return/^!\s/.test(t)||/(?:^|:\s)(?:LaTeX|Package|Class|pdfTeX|XeTeX|LuaTeX)?\s*Error:/i.test(t)||/^Latexmk:.*(?:\bErrors?,|did not complete making targets|failure)/i.test(t)||/^Collected error summary/i.test(t)||/\b(?:fatal error|emergency stop|undefined control sequence|no output pdf|no pages of output)\b/i.test(t)||/\b(?:bibtex|biber) errors?:/i.test(t)||/^error, and then rerun latexmk/i.test(t)}function w2(t){return/\bwarnings?\b|overfull|underfull|badness/i.test(t)}function E2(t){return t instanceof Error&&t.name==="AbortError"}function x2({projectId:t,activeFile:e,permission:n,revision:s,selection:r,save:a,onError:o,onAdded:c}){const[l,u]=f.useState([]),[d,h]=f.useState(null),[p,m]=f.useState(!1),[D,C]=f.useState(""),b=f.useRef(null),w=f.useRef(e),x=f.useRef(a),N=f.useRef(o),L=f.useRef(c);w.current=e,x.current=a,N.current=o,L.current=c;const T=async K=>{b.current?.abort();const R=new AbortController;b.current=R;try{const A=await te(`/api/projects/${t}/comments?path=${encodeURIComponent(K)}`,{signal:R.signal});w.current===K&&u(A.comments)}catch(A){!E2(A)&&w.current===K&&u([])}finally{b.current===R&&(b.current=null)}};return f.useEffect(()=>{h(null)},[t,e]),f.useEffect(()=>(e?T(e):u([]),()=>{b.current?.abort(),b.current=null}),[t,e,s]),{comments:l,focusComment:d,setFocusComment:h,commentOpen:p,setCommentOpen:m,commentText:D,setCommentText:C,addComment:async()=>{if(!(!D.trim()||!e))try{if(n!=="read"&&!await x.current())return;await te(`/api/projects/${t}/comments`,{method:"POST",body:JSON.stringify({path:e,content:D,...r})}),await T(e),m(!1),C(""),L.current()}catch(K){N.current(de(K))}},toggleComment:async K=>{try{await te(`/api/projects/${t}/comments/${K.id}`,{method:"PATCH",body:JSON.stringify({resolved:!K.resolved})}),await T(e)}catch(R){N.current(de(R))}},replyToComment:async(K,R)=>{try{return await te(`/api/projects/${t}/comments/${K.id}/replies`,{method:"POST",body:JSON.stringify({content:R})}),await T(e),!0}catch(A){return N.current(de(A)),!1}},editComment:async(K,R)=>{try{return await te(`/api/projects/${t}/comments/${K.id}`,{method:"PATCH",body:JSON.stringify({content:R})}),await T(e),!0}catch(A){return N.current(de(A)),!1}},deleteComment:async K=>{try{return await te(`/api/projects/${t}/comments/${K.id}`,{method:"DELETE"}),await T(e),h(R=>R?.id===K.id?null:R),!0}catch(R){return N.current(de(R)),!1}},editCommentReply:async(K,R,A)=>{try{return await te(`/api/projects/${t}/comments/${K.id}/replies/${R}`,{method:"PATCH",body:JSON.stringify({content:A})}),await T(e),!0}catch(P){return N.current(de(P)),!1}},deleteCommentReply:async(K,R)=>{try{return await te(`/api/projects/${t}/comments/${K.id}/replies/${R}`,{method:"DELETE"}),await T(e),!0}catch(A){return N.current(de(A)),!1}}}}const Jt=()=>new Map,ko=t=>{const e=Jt();return t.forEach((n,s)=>{e.set(s,n)}),e},kn=(t,e,n)=>{let s=t.get(e);return s===void 0&&t.set(e,s=n()),s},v2=(t,e)=>{const n=[];for(const[s,r]of t)n.push(e(r,s));return n},k2=(t,e)=>{for(const[n,s]of t)if(e(s,n))return!0;return!1},Qn=()=>new Set,$a=t=>t[t.length-1],A2=(t,e)=>{for(let n=0;n<e.length;n++)t.push(e[n])},$n=Array.from,cc=(t,e)=>{for(let n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0},lc=(t,e)=>{for(let n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1},j2=(t,e)=>{const n=new Array(t);for(let s=0;s<t;s++)n[s]=e(s,n);return n},Ws=Array.isArray;class uc{constructor(){this._observers=Jt()}on(e,n){return kn(this._observers,e,Qn).add(n),n}once(e,n){const s=(...r)=>{this.off(e,s),n(...r)};this.on(e,s)}off(e,n){const s=this._observers.get(e);s!==void 0&&(s.delete(n),s.size===0&&this._observers.delete(e))}emit(e,n){return $n((this._observers.get(e)||Jt()).values()).forEach(s=>s(...n))}destroy(){this._observers=Jt()}}class hh{constructor(){this._observers=Jt()}on(e,n){kn(this._observers,e,Qn).add(n)}once(e,n){const s=(...r)=>{this.off(e,s),n(...r)};this.on(e,s)}off(e,n){const s=this._observers.get(e);s!==void 0&&(s.delete(n),s.size===0&&this._observers.delete(e))}emit(e,n){return $n((this._observers.get(e)||Jt()).values()).forEach(s=>s(...n))}destroy(){this._observers=Jt()}}const pn=Math.floor,bi=Math.abs,dc=(t,e)=>t<e?t:e,ys=(t,e)=>t>e?t:e,S2=Math.pow,fh=t=>t!==0?t<0:1/t<0,su=1,ru=2,za=4,Ua=8,Nr=32,In=64,tn=128,ea=31,Ao=63,ds=127,T2=2147483647,Oi=Number.MAX_SAFE_INTEGER,iu=Number.MIN_SAFE_INTEGER,B2=Number.isInteger||(t=>typeof t=="number"&&isFinite(t)&&pn(t)===t),mh=String.fromCharCode,N2=t=>t.toLowerCase(),L2=/^\s*/g,R2=t=>t.replace(L2,""),O2=/([A-Z])/g,au=(t,e)=>R2(t.replace(O2,n=>`${e}${N2(n)}`)),P2=t=>{const e=unescape(encodeURIComponent(t)),n=e.length,s=new Uint8Array(n);for(let r=0;r<n;r++)s[r]=e.codePointAt(r);return s},Lr=typeof TextEncoder<"u"?new TextEncoder:null,I2=t=>Lr.encode(t),M2=Lr?I2:P2;let kr=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});kr&&kr.decode(new Uint8Array).length===1&&(kr=null);const _2=(t,e)=>j2(e,()=>t).join("");class Vr{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Et=()=>new Vr,hc=t=>{let e=t.cpos;for(let n=0;n<t.bufs.length;n++)e+=t.bufs[n].length;return e},et=t=>{const e=new Uint8Array(hc(t));let n=0;for(let s=0;s<t.bufs.length;s++){const r=t.bufs[s];e.set(r,n),n+=r.length}return e.set(new Uint8Array(t.cbuf.buffer,0,t.cpos),n),e},$2=(t,e)=>{const n=t.cbuf.length;n-t.cpos<e&&(t.bufs.push(new Uint8Array(t.cbuf.buffer,0,t.cpos)),t.cbuf=new Uint8Array(ys(n,e)*2),t.cpos=0)},Lt=(t,e)=>{const n=t.cbuf.length;t.cpos===n&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(n*2),t.cpos=0),t.cbuf[t.cpos++]=e},jo=Lt,be=(t,e)=>{for(;e>ds;)Lt(t,tn|ds&e),e=pn(e/128);Lt(t,ds&e)},fc=(t,e)=>{const n=fh(e);for(n&&(e=-e),Lt(t,(e>Ao?tn:0)|(n?In:0)|Ao&e),e=pn(e/64);e>0;)Lt(t,(e>ds?tn:0)|ds&e),e=pn(e/128)},So=new Uint8Array(3e4),z2=So.length/3,U2=(t,e)=>{if(e.length<z2){const n=Lr.encodeInto(e,So).written||0;be(t,n);for(let s=0;s<n;s++)Lt(t,So[s])}else wt(t,M2(e))},H2=(t,e)=>{const n=unescape(encodeURIComponent(e)),s=n.length;be(t,s);for(let r=0;r<s;r++)Lt(t,n.codePointAt(r))},$t=Lr&&Lr.encodeInto?U2:H2,ta=(t,e)=>{const n=t.cbuf.length,s=t.cpos,r=dc(n-s,e.length),a=e.length-r;t.cbuf.set(e.subarray(0,r),s),t.cpos+=r,a>0&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(ys(n*2,a)),t.cbuf.set(e.subarray(r)),t.cpos=a)},wt=(t,e)=>{be(t,e.byteLength),ta(t,e)},mc=(t,e)=>{$2(t,e);const n=new DataView(t.cbuf.buffer,t.cpos,e);return t.cpos+=e,n},V2=(t,e)=>mc(t,4).setFloat32(0,e,!1),q2=(t,e)=>mc(t,8).setFloat64(0,e,!1),W2=(t,e)=>mc(t,8).setBigInt64(0,e,!1),ou=new DataView(new ArrayBuffer(4)),K2=t=>(ou.setFloat32(0,t),ou.getFloat32(0)===t),Rr=(t,e)=>{switch(typeof e){case"string":Lt(t,119),$t(t,e);break;case"number":B2(e)&&bi(e)<=T2?(Lt(t,125),fc(t,e)):K2(e)?(Lt(t,124),V2(t,e)):(Lt(t,123),q2(t,e));break;case"bigint":Lt(t,122),W2(t,e);break;case"object":if(e===null)Lt(t,126);else if(Ws(e)){Lt(t,117),be(t,e.length);for(let n=0;n<e.length;n++)Rr(t,e[n])}else if(e instanceof Uint8Array)Lt(t,116),wt(t,e);else{Lt(t,118);const n=Object.keys(e);be(t,n.length);for(let s=0;s<n.length;s++){const r=n[s];$t(t,r),Rr(t,e[r])}}break;case"boolean":Lt(t,e?120:121);break;default:Lt(t,127)}};class cu extends Vr{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&be(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const lu=t=>{t.count>0&&(fc(t.encoder,t.count===1?t.s:-t.s),t.count>1&&be(t.encoder,t.count-2))};class Fi{constructor(){this.encoder=new Vr,this.s=0,this.count=0}write(e){this.s===e?this.count++:(lu(this),this.count=1,this.s=e)}toUint8Array(){return lu(this),et(this.encoder)}}const uu=t=>{if(t.count>0){const e=t.diff*2+(t.count===1?0:1);fc(t.encoder,e),t.count>1&&be(t.encoder,t.count-2)}};class Ha{constructor(){this.encoder=new Vr,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(uu(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return uu(this),et(this.encoder)}}class G2{constructor(){this.sarr=[],this.s="",this.lensE=new Fi}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new Vr;return this.sarr.push(this.s),this.s="",$t(e,this.sarr.join("")),ta(e,this.lensE.toUint8Array()),et(e)}}const gn=t=>new Error(t),mn=()=>{throw gn("Method unimplemented")},sn=()=>{throw gn("Unexpected case")},ph=gn("Unexpected end of array"),gh=gn("Integer out of Range");class na{constructor(e){this.arr=e,this.pos=0}}const ss=t=>new na(t),To=t=>t.pos!==t.arr.length,Y2=(t,e)=>{const n=new Uint8Array(t.arr.buffer,t.pos+t.arr.byteOffset,e);return t.pos+=e,n},Ut=t=>Y2(t,Be(t)),Ks=t=>t.arr[t.pos++],Be=t=>{let e=0,n=1;const s=t.arr.length;for(;t.pos<s;){const r=t.arr[t.pos++];if(e=e+(r&ds)*n,n*=128,r<tn)return e;if(e>Oi)throw gh}throw ph},pc=t=>{let e=t.arr[t.pos++],n=e&Ao,s=64;const r=(e&In)>0?-1:1;if((e&tn)===0)return r*n;const a=t.arr.length;for(;t.pos<a;){if(e=t.arr[t.pos++],n=n+(e&ds)*s,s*=128,e<tn)return r*n;if(n>Oi)throw gh}throw ph},X2=t=>{let e=Be(t);if(e===0)return"";{let n=String.fromCodePoint(Ks(t));if(--e<100)for(;e--;)n+=String.fromCodePoint(Ks(t));else for(;e>0;){const s=e<1e4?e:1e4,r=t.arr.subarray(t.pos,t.pos+s);t.pos+=s,n+=String.fromCodePoint.apply(null,r),e-=s}return decodeURIComponent(escape(n))}},J2=t=>kr.decode(Ut(t)),ht=kr?J2:X2,gc=(t,e)=>{const n=new DataView(t.arr.buffer,t.arr.byteOffset+t.pos,e);return t.pos+=e,n},Z2=t=>gc(t,4).getFloat32(0,!1),Q2=t=>gc(t,8).getFloat64(0,!1),ey=t=>gc(t,8).getBigInt64(0,!1),ty=[t=>{},t=>null,pc,Z2,Q2,ey,t=>!1,t=>!0,ht,t=>{const e=Be(t),n={};for(let s=0;s<e;s++){const r=ht(t);n[r]=Or(t)}return n},t=>{const e=Be(t),n=[];for(let s=0;s<e;s++)n.push(Or(t));return n},Ut],Or=t=>ty[127-Ks(t)](t);class du extends na{constructor(e,n){super(e),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),To(this)?this.count=Be(this)+1:this.count=-1),this.count--,this.s}}class Ci extends na{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=pc(this);const e=fh(this.s);this.count=1,e&&(this.s=-this.s,this.count=Be(this)+2)}return this.count--,this.s}}class Va extends na{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const e=pc(this),n=e&1;this.diff=pn(e/2),this.count=1,n&&(this.count=Be(this)+2)}return this.s+=this.diff,this.count--,this.s}}class ny{constructor(e){this.decoder=new Ci(e),this.str=ht(this.decoder),this.spos=0}read(){const e=this.spos+this.decoder.read(),n=this.str.slice(this.spos,e);return this.spos=e,n}}const sy=crypto.getRandomValues.bind(crypto),Dh=()=>sy(new Uint32Array(1))[0],ry="10000000-1000-4000-8000"+-1e11,iy=()=>ry.replace(/[018]/g,t=>(t^Dh()&15>>t/4).toString(16)),es=Date.now,Gs=t=>new Promise(t);Promise.all.bind(Promise);const hu=t=>t===void 0?null:t;class ay{constructor(){this.map=new Map}setItem(e,n){this.map.set(e,n)}getItem(e){return this.map.get(e)}}let yh=new ay,Dc=!0;try{typeof localStorage<"u"&&localStorage&&(yh=localStorage,Dc=!1)}catch{}const bh=yh,oy=t=>Dc||addEventListener("storage",t),cy=t=>Dc||removeEventListener("storage",t),Pr=Symbol("Equality"),Fh=(t,e)=>t===e||!!t?.[Pr]?.(e)||!1,ly=t=>typeof t=="object",uy=Object.assign,dy=Object.keys,hy=(t,e)=>{for(const n in t)e(t[n],n)},fy=(t,e)=>{const n=[];for(const s in t)n.push(e(t[s],s));return n},Pi=t=>dy(t).length,my=t=>{for(const e in t)return!1;return!0},qr=(t,e)=>{for(const n in t)if(!e(t[n],n))return!1;return!0},yc=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),py=(t,e)=>t===e||Pi(t)===Pi(e)&&qr(t,(n,s)=>(n!==void 0||yc(e,s))&&Fh(e[s],n)),gy=Object.freeze,Ch=t=>{for(const e in t){const n=t[e];(typeof n=="object"||typeof n=="function")&&Ch(t[e])}return gy(t)},bc=(t,e,n=0)=>{try{for(;n<t.length;n++)t[n](...e)}finally{n<t.length&&bc(t,e,n+1)}},Dy=t=>t,Is=(t,e)=>{if(t===e)return!0;if(t==null||e==null||t.constructor!==e.constructor&&(t.constructor||Object)!==(e.constructor||Object))return!1;if(t[Pr]!=null)return t[Pr](e);switch(t.constructor){case ArrayBuffer:t=new Uint8Array(t),e=new Uint8Array(e);case Uint8Array:{if(t.byteLength!==e.byteLength)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;break}case Set:{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;break}case Map:{if(t.size!==e.size)return!1;for(const n of t.keys())if(!e.has(n)||!Is(t.get(n),e.get(n)))return!1;break}case void 0:case Object:if(Pi(t)!==Pi(e))return!1;for(const n in t)if(!yc(t,n)||!Is(t[n],e[n]))return!1;break;case Array:if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Is(t[n],e[n]))return!1;break;default:return!1}return!0},yy=(t,e)=>e.includes(t);var wh={};const ts=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",Eh=typeof window<"u"&&typeof document<"u"&&!ts;let Cn;const by=()=>{if(Cn===void 0)if(ts){Cn=Jt();const t=process.argv;let e=null;for(let n=0;n<t.length;n++){const s=t[n];s[0]==="-"?(e!==null&&Cn.set(e,""),e=s):e!==null&&(Cn.set(e,s),e=null)}e!==null&&Cn.set(e,"")}else typeof location=="object"?(Cn=Jt(),(location.search||"?").slice(1).split("&").forEach(t=>{if(t.length!==0){const[e,n]=t.split("=");Cn.set(`--${au(e,"-")}`,n),Cn.set(`-${au(e,"-")}`,n)}})):Cn=Jt();return Cn},Bo=t=>by().has(t),Ii=t=>hu(ts?wh[t.toUpperCase().replaceAll("-","_")]:bh.getItem(t)),xh=t=>Bo("--"+t)||Ii(t)!==null,Fy=xh("production"),Cy=ts&&yy(wh.FORCE_COLOR,["true","1","2"]),wy=Cy||!Bo("--no-colors")&&!xh("no-color")&&(!ts||process.stdout.isTTY)&&(!ts||Bo("--color")||Ii("COLORTERM")!==null||(Ii("TERM")||"").includes("color")),vh=t=>new Uint8Array(t),Ey=(t,e,n)=>new Uint8Array(t,e,n),xy=t=>new Uint8Array(t),vy=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=mh(t[n]);return btoa(e)},ky=t=>Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("base64"),Ay=t=>{const e=atob(t),n=vh(e.length);for(let s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},jy=t=>{const e=Buffer.from(t,"base64");return Ey(e.buffer,e.byteOffset,e.byteLength)},Sy=Eh?vy:ky,Ty=Eh?Ay:jy,By=t=>{const e=vh(t.byteLength);return e.set(t),e};class Ny{constructor(e,n){this.left=e,this.right=n}}const Rn=(t,e)=>new Ny(t,e),Ly=(t,e)=>t.forEach(n=>e(n.left,n.right)),fu=t=>t.next()>=.5,qa=(t,e,n)=>pn(t.next()*(n+1-e)+e),kh=(t,e,n)=>pn(t.next()*(n+1-e)+e),Fc=(t,e,n)=>kh(t,e,n),Ry=t=>mh(Fc(t,97,122)),Oy=(t,e=0,n=20)=>{const s=Fc(t,e,n);let r="";for(let a=0;a<s;a++)r+=Ry(t);return r},Wa=(t,e)=>e[Fc(t,0,e.length-1)],Py=Symbol("0schema");class Iy{constructor(){this._rerrs=[]}extend(e,n,s,r=null){this._rerrs.push({path:e,expected:n,has:s,message:r})}toString(){const e=[];for(let n=this._rerrs.length-1;n>0;n--){const s=this._rerrs[n];e.push(_2(" ",(this._rerrs.length-n)*2)+`${s.path!=null?`[${s.path}] `:""}${s.has} doesn't match ${s.expected}. ${s.message}`)}return e.join(`
|
|
43
|
-
`)}}const No=(t,e)=>t===e?!0:t==null||e==null||t.constructor!==e.constructor?!1:t[Pr]?Fh(t,e):Ws(t)?cc(t,n=>lc(e,s=>No(n,s))):ly(t)?qr(t,(n,s)=>No(n,e[s])):!1;class Kt{static _dilutes=!1;extends(e){let[n,s]=[this.shape,e.shape];return this.constructor._dilutes&&([s,n]=[n,s]),No(n,s)}equals(e){return this.constructor===e.constructor&&Is(this.shape,e.shape)}[Py](){return!0}[Pr](e){return this.equals(e)}validate(e){return this.check(e)}check(e,n){mn()}get nullable(){return sr(this,oa)}get optional(){return new Sh(this)}cast(e){return mu(e,this),e}expect(e){return mu(e,this),e}}class Cc extends Kt{constructor(e,n){super(),this.shape=e,this._c=n}check(e,n=void 0){const s=e?.constructor===this.shape&&(this._c==null||this._c(e));return!s&&n?.extend(null,this.shape.name,e?.constructor.name,e?.constructor!==this.shape?"Constructor match failed":"Check failed"),s}}const St=(t,e=null)=>new Cc(t,e);St(Cc);class wc extends Kt{constructor(e){super(),this.shape=e}check(e,n){const s=this.shape(e);return!s&&n?.extend(null,"custom prop",e?.constructor.name,"failed to check custom prop"),s}}const Pt=t=>new wc(t);St(wc);class sa extends Kt{constructor(e){super(),this.shape=e}check(e,n){const s=this.shape.some(r=>r===e);return!s&&n?.extend(null,this.shape.join(" | "),e.toString()),s}}const ra=(...t)=>new sa(t),Ah=St(sa),My=RegExp.escape||(t=>t.replace(/[().|&,$^[\]]/g,e=>"\\"+e)),jh=t=>{if(Ys.check(t))return[My(t)];if(Ah.check(t))return t.shape.map(e=>e+"");if(Mh.check(t))return["[+-]?\\d+.?\\d*"];if(_h.check(t))return[".*"];if(Mi.check(t))return t.shape.map(jh).flat(1);sn()};class _y extends Kt{constructor(e){super(),this.shape=e,this._r=new RegExp("^"+e.map(jh).map(n=>`(${n.join("|")})`).join("")+"$")}check(e,n){const s=this._r.exec(e)!=null;return!s&&n?.extend(null,this._r.toString(),e.toString(),"String doesn't match string template."),s}}St(_y);const $y=Symbol("optional");class Sh extends Kt{constructor(e){super(),this.shape=e}check(e,n){const s=e===void 0||this.shape.check(e);return!s&&n?.extend(null,"undefined (optional)","()"),s}get[$y](){return!0}}const zy=St(Sh);class Uy extends Kt{check(e,n){return n?.extend(null,"never",typeof e),!1}}St(Uy);class ia extends Kt{constructor(e,n=!1){super(),this.shape=e,this._isPartial=n}static _dilutes=!0;get partial(){return new ia(this.shape,!0)}check(e,n){return e==null?(n?.extend(null,"object","null"),!1):qr(this.shape,(s,r)=>{const a=this._isPartial&&!yc(e,r)||s.check(e[r],n);return!a&&n?.extend(r.toString(),s.toString(),typeof e[r],"Object property does not match"),a})}}const Hy=t=>new ia(t),Vy=St(ia),qy=Pt(t=>t!=null&&(t.constructor===Object||t.constructor==null));class Th extends Kt{constructor(e,n){super(),this.shape={keys:e,values:n}}check(e,n){return e!=null&&qr(e,(s,r)=>{const a=this.shape.keys.check(r,n);return!a&&n?.extend(r+"","Record",typeof e,a?"Key doesn't match schema":"Value doesn't match value"),a&&this.shape.values.check(s,n)})}}const Bh=(t,e)=>new Th(t,e),Wy=St(Th);class Nh extends Kt{constructor(e){super(),this.shape=e}check(e,n){return e!=null&&qr(this.shape,(s,r)=>{const a=s.check(e[r],n);return!a&&n?.extend(r.toString(),"Tuple",typeof s),a})}}const Ky=(...t)=>new Nh(t);St(Nh);class Lh extends Kt{constructor(e){super(),this.shape=e.length===1?e[0]:new Ec(e)}check(e,n){const s=Ws(e)&&cc(e,r=>this.shape.check(r));return!s&&n?.extend(null,"Array",""),s}}const Rh=(...t)=>new Lh(t),Gy=St(Lh),Yy=Pt(t=>Ws(t));class Oh extends Kt{constructor(e,n){super(),this.shape=e,this._c=n}check(e,n){const s=e instanceof this.shape&&(this._c==null||this._c(e));return!s&&n?.extend(null,this.shape.name,e?.constructor.name),s}}const Xy=(t,e=null)=>new Oh(t,e);St(Oh);const Jy=Xy(Kt);class Zy extends Kt{constructor(e){super(),this.len=e.length-1,this.args=Ky(...e.slice(-1)),this.res=e[this.len]}check(e,n){const s=e.constructor===Function&&e.length<=this.len;return!s&&n?.extend(null,"function",typeof e),s}}const Qy=St(Zy),eb=Pt(t=>typeof t=="function");class tb extends Kt{constructor(e){super(),this.shape=e}check(e,n){const s=cc(this.shape,r=>r.check(e,n));return!s&&n?.extend(null,"Intersectinon",typeof e),s}}St(tb,t=>t.shape.length>0);class Ec extends Kt{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,n){const s=lc(this.shape,r=>r.check(e,n));return n?.extend(null,"Union",typeof e),s}}const sr=(...t)=>t.findIndex(e=>Mi.check(e))>=0?sr(...t.map(e=>Ir(e)).map(e=>Mi.check(e)?e.shape:[e]).flat(1)):t.length===1?t[0]:new Ec(t),Mi=St(Ec),Ph=()=>!0,_i=Pt(Ph),nb=St(wc,t=>t.shape===Ph),xc=Pt(t=>typeof t=="bigint"),sb=Pt(t=>t===xc),Ih=Pt(t=>typeof t=="symbol");Pt(t=>t===Ih);const Ms=Pt(t=>typeof t=="number"),Mh=Pt(t=>t===Ms),Ys=Pt(t=>typeof t=="string"),_h=Pt(t=>t===Ys),aa=Pt(t=>typeof t=="boolean"),rb=Pt(t=>t===aa),$h=ra(void 0);St(sa,t=>t.shape.length===1&&t.shape[0]===void 0);ra(void 0);const oa=ra(null),ib=St(sa,t=>t.shape.length===1&&t.shape[0]===null);St(Uint8Array);St(Cc,t=>t.shape===Uint8Array);const ab=sr(Ms,Ys,oa,$h,xc,aa,Ih);(()=>{const t=Rh(_i),e=Bh(Ys,_i),n=sr(Ms,Ys,oa,aa,t,e);return t.shape=n,e.shape.values=n,n})();const Ir=t=>{if(Jy.check(t))return t;if(qy.check(t)){const e={};for(const n in t)e[n]=Ir(t[n]);return Hy(e)}else{if(Yy.check(t))return sr(...t.map(Ir));if(ab.check(t))return ra(t);if(eb.check(t))return St(t)}sn()},mu=Fy?()=>{}:(t,e)=>{const n=new Iy;if(!e.check(t,n))throw gn(`Expected value to be of type ${e.constructor.name}.
|
|
44
|
-
${n.toString()}`)};class ob{constructor(e){this.patterns=[],this.$state=e}if(e,n){return this.patterns.push({if:Ir(e),h:n}),this}else(e){return this.if(_i,e)}done(){return(e,n)=>{for(let s=0;s<this.patterns.length;s++){const r=this.patterns[s];if(r.if.check(e))return r.h(e,n)}throw gn("Unhandled pattern")}}}const cb=t=>new ob(t),zh=cb(_i).if(Mh,(t,e)=>qa(e,iu,Oi)).if(_h,(t,e)=>Oy(e)).if(rb,(t,e)=>fu(e)).if(sb,(t,e)=>BigInt(qa(e,iu,Oi))).if(Mi,(t,e)=>js(e,Wa(e,t.shape))).if(Vy,(t,e)=>{const n={};for(const s in t.shape){let r=t.shape[s];if(zy.check(r)){if(fu(e))continue;r=r.shape}n[s]=zh(r,e)}return n}).if(Gy,(t,e)=>{const n=[],s=kh(e,0,42);for(let r=0;r<s;r++)n.push(js(e,t.shape));return n}).if(Ah,(t,e)=>Wa(e,t.shape)).if(ib,(t,e)=>null).if(Qy,(t,e)=>{const n=js(e,t.res);return()=>n}).if(nb,(t,e)=>js(e,Wa(e,[Ms,Ys,oa,$h,xc,aa,Rh(Ms),Bh(sr("a","b","c"),Ms)]))).if(Wy,(t,e)=>{const n={},s=qa(e,0,3);for(let r=0;r<s;r++){const a=js(e,t.shape.keys),o=js(e,t.shape.values);n[a]=o}return n}).done(),js=(t,e)=>zh(Ir(e),t),An=typeof document<"u"?document:{},lb=t=>An.createElement(t),ub=()=>An.createDocumentFragment();Pt(t=>t.nodeType===bb);const db=t=>An.createTextNode(t);typeof DOMParser<"u"&&new DOMParser;const hb=(t,e)=>(Ly(e,(n,s)=>{s===!1?t.removeAttribute(n):s===!0?t.setAttribute(n,""):t.setAttribute(n,s)}),t),fb=t=>{const e=ub();for(let n=0;n<t.length;n++)Uh(e,t[n]);return e},mb=(t,e)=>(Uh(t,fb(e)),t),Nw=(t,e=[],n=[])=>mb(hb(lb(t),e),n);Pt(t=>t.nodeType===gb);const Lw=db;Pt(t=>t.nodeType===Db);const pb=t=>v2(t,(e,n)=>`${n}:${e};`).join(""),Uh=(t,e)=>t.appendChild(e),gb=An.ELEMENT_NODE,Db=An.TEXT_NODE;An.CDATA_SECTION_NODE;An.COMMENT_NODE;const yb=An.DOCUMENT_NODE;An.DOCUMENT_TYPE_NODE;const bb=An.DOCUMENT_FRAGMENT_NODE;Pt(t=>t.nodeType===yb);const zn=Symbol,Hh=zn(),Vh=zn(),Fb=zn(),Cb=zn(),wb=zn(),qh=zn(),Eb=zn(),vc=zn(),xb=zn(),vb=t=>{t.length===1&&t[0]?.constructor===Function&&(t=t[0]());const e=[],n=[];let s=0;for(;s<t.length;s++){const r=t[s];if(r===void 0)break;if(r.constructor===String||r.constructor===Number)e.push(r);else if(r.constructor===Object)break}for(s>0&&n.push(e.join(""));s<t.length;s++){const r=t[s];r instanceof Symbol||n.push(r)}return n},kb={[Hh]:Rn("font-weight","bold"),[Vh]:Rn("font-weight","normal"),[Fb]:Rn("color","blue"),[wb]:Rn("color","green"),[Cb]:Rn("color","grey"),[qh]:Rn("color","red"),[Eb]:Rn("color","purple"),[vc]:Rn("color","orange"),[xb]:Rn("color","black")},Ab=t=>{t.length===1&&t[0]?.constructor===Function&&(t=t[0]());const e=[],n=[],s=Jt();let r=[],a=0;for(;a<t.length;a++){const o=t[a],c=kb[o];if(c!==void 0)s.set(c.left,c.right);else{if(o===void 0)break;if(o.constructor===String||o.constructor===Number){const l=pb(s);a>0||l.length>0?(e.push("%c"+o),n.push(l)):e.push(o)}else break}}for(a>0&&(r=n,r.unshift(e.join("")));a<t.length;a++){const o=t[a];o instanceof Symbol||r.push(o)}return r},Wh=wy?Ab:vb,jb=(...t)=>{console.log(...Wh(t)),Gh.forEach(e=>e.print(t))},Kh=(...t)=>{console.warn(...Wh(t)),t.unshift(vc),Gh.forEach(e=>e.print(t))},Gh=Qn(),Yh=t=>({[Symbol.iterator](){return this},next:t}),Sb=(t,e)=>Yh(()=>{let n;do n=t.next();while(!n.done&&!e(n.value));return n}),Ka=(t,e)=>Yh(()=>{const{done:n,value:s}=t.next();return{done:n,value:n?void 0:e(s)}});class ca{constructor(e,n){this.clock=e,this.len=n}}class rr{constructor(){this.clients=new Map}}const Xs=(t,e,n)=>e.clients.forEach((s,r)=>{const a=t.doc.store.clients.get(r);if(a!=null){const o=a[a.length-1],c=o.id.clock+o.length;for(let l=0,u=s[l];l<s.length&&u.clock<c;u=s[++l])df(t,a,u.clock,u.len,n)}}),Tb=(t,e)=>{let n=0,s=t.length-1;for(;n<=s;){const r=pn((n+s)/2),a=t[r],o=a.clock;if(o<=e){if(e<o+a.len)return r;n=r+1}else s=r-1}return null},Wr=(t,e)=>{const n=t.clients.get(e.client);return n!==void 0&&Tb(n,e.clock)!==null},kc=t=>{t.clients.forEach(e=>{e.sort((r,a)=>r.clock-a.clock);let n,s;for(n=1,s=1;n<e.length;n++){const r=e[s-1],a=e[n];r.clock+r.len>=a.clock?e[s-1]=new ca(r.clock,ys(r.len,a.clock+a.len-r.clock)):(s<n&&(e[s]=a),s++)}e.length=s})},Lo=t=>{const e=new rr;for(let n=0;n<t.length;n++)t[n].clients.forEach((s,r)=>{if(!e.clients.has(r)){const a=s.slice();for(let o=n+1;o<t.length;o++)A2(a,t[o].clients.get(r)||[]);e.clients.set(r,a)}});return kc(e),e},Mr=(t,e,n,s)=>{kn(t.clients,e,()=>[]).push(new ca(n,s))},Bb=()=>new rr,Nb=t=>{const e=Bb();return t.clients.forEach((n,s)=>{const r=[];for(let a=0;a<n.length;a++){const o=n[a];if(o.deleted){const c=o.id.clock;let l=o.length;if(a+1<n.length)for(let u=n[a+1];a+1<n.length&&u.deleted;u=n[++a+1])l+=u.length;r.push(new ca(c,l))}}r.length>0&&e.clients.set(s,r)}),e},ir=(t,e)=>{be(t.restEncoder,e.clients.size),$n(e.clients.entries()).sort((n,s)=>s[0]-n[0]).forEach(([n,s])=>{t.resetDsCurVal(),be(t.restEncoder,n);const r=s.length;be(t.restEncoder,r);for(let a=0;a<r;a++){const o=s[a];t.writeDsClock(o.clock),t.writeDsLen(o.len)}})},Ac=t=>{const e=new rr,n=Be(t.restDecoder);for(let s=0;s<n;s++){t.resetDsCurVal();const r=Be(t.restDecoder),a=Be(t.restDecoder);if(a>0){const o=kn(e.clients,r,()=>[]);for(let c=0;c<a;c++)o.push(new ca(t.readDsClock(),t.readDsLen()))}}return e},pu=(t,e,n)=>{const s=new rr,r=Be(t.restDecoder);for(let a=0;a<r;a++){t.resetDsCurVal();const o=Be(t.restDecoder),c=Be(t.restDecoder),l=n.clients.get(o)||[],u=jt(n,o);for(let d=0;d<c;d++){const h=t.readDsClock(),p=h+t.readDsLen();if(h<u){u<p&&Mr(s,o,u,p-u);let m=En(l,h),D=l[m];for(!D.deleted&&D.id.clock<h&&(l.splice(m+1,0,Ki(e,D,h-D.id.clock)),m++);m<l.length&&(D=l[m++],D.id.clock<p);)D.deleted||(p<D.id.clock+D.length&&l.splice(m,0,Ki(e,D,p-D.id.clock)),D.delete(e))}else Mr(s,o,h,p-h)}}if(s.clients.size>0){const a=new ms;return be(a.restEncoder,0),ir(a,s),a.toUint8Array()}return null},Xh=Dh;class bs extends uc{constructor({guid:e=iy(),collectionid:n=null,gc:s=!0,gcFilter:r=()=>!0,meta:a=null,autoLoad:o=!1,shouldLoad:c=!0}={}){super(),this.gc=s,this.gcFilter=r,this.clientID=Xh(),this.guid=e,this.collectionid=n,this.share=new Map,this.store=new lf,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=o,this.meta=a,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Gs(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>Gs(u=>{const d=h=>{(h===void 0||h===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const e=this._item;e!==null&&!this.shouldLoad&&nt(e.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set($n(this.subdocs).map(e=>e.guid))}transact(e,n=null){return nt(this,e,n)}get(e,n=Ot){const s=kn(this.share,e,()=>{const a=new n;return a._integrate(this,null),a}),r=s.constructor;if(n!==Ot&&r!==n)if(r===Ot){const a=new n;a._map=s._map,s._map.forEach(o=>{for(;o!==null;o=o.left)o.parent=a}),a._start=s._start;for(let o=a._start;o!==null;o=o.right)o.parent=a;return a._length=s._length,this.share.set(e,a),a._integrate(this,null),a}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return s}getArray(e=""){return this.get(e,zs)}getText(e=""){return this.get(e,Qs)}getMap(e=""){return this.get(e,Zs)}getXmlElement(e=""){return this.get(e,er)}getXmlFragment(e=""){return this.get(e,ps)}toJSON(){const e={};return this.share.forEach((n,s)=>{e[s]=n.toJSON()}),e}destroy(){this.isDestroyed=!0,$n(this.subdocs).forEach(n=>n.destroy());const e=this._item;if(e!==null){this._item=null;const n=e.content;n.doc=new bs({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=e,nt(e.parent.doc,s=>{const r=n.doc;e.deleted||s.subdocsAdded.add(r),s.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class Jh{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return Be(this.restDecoder)}readDsLen(){return Be(this.restDecoder)}}class Zh extends Jh{readLeftID(){return _e(Be(this.restDecoder),Be(this.restDecoder))}readRightID(){return _e(Be(this.restDecoder),Be(this.restDecoder))}readClient(){return Be(this.restDecoder)}readInfo(){return Ks(this.restDecoder)}readString(){return ht(this.restDecoder)}readParentInfo(){return Be(this.restDecoder)===1}readTypeRef(){return Be(this.restDecoder)}readLen(){return Be(this.restDecoder)}readAny(){return Or(this.restDecoder)}readBuf(){return By(Ut(this.restDecoder))}readJSON(){return JSON.parse(ht(this.restDecoder))}readKey(){return ht(this.restDecoder)}}class Lb{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Be(this.restDecoder),this.dsCurrVal}readDsLen(){const e=Be(this.restDecoder)+1;return this.dsCurrVal+=e,e}}class Js extends Lb{constructor(e){super(e),this.keys=[],Be(e),this.keyClockDecoder=new Va(Ut(e)),this.clientDecoder=new Ci(Ut(e)),this.leftClockDecoder=new Va(Ut(e)),this.rightClockDecoder=new Va(Ut(e)),this.infoDecoder=new du(Ut(e),Ks),this.stringDecoder=new ny(Ut(e)),this.parentInfoDecoder=new du(Ut(e),Ks),this.typeRefDecoder=new Ci(Ut(e)),this.lenDecoder=new Ci(Ut(e))}readLeftID(){return new _s(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new _s(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Or(this.restDecoder)}readBuf(){return Ut(this.restDecoder)}readJSON(){return Or(this.restDecoder)}readKey(){const e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{const n=this.stringDecoder.read();return this.keys.push(n),n}}}class Qh{constructor(){this.restEncoder=Et()}toUint8Array(){return et(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){be(this.restEncoder,e)}writeDsLen(e){be(this.restEncoder,e)}}class Kr extends Qh{writeLeftID(e){be(this.restEncoder,e.client),be(this.restEncoder,e.clock)}writeRightID(e){be(this.restEncoder,e.client),be(this.restEncoder,e.clock)}writeClient(e){be(this.restEncoder,e)}writeInfo(e){jo(this.restEncoder,e)}writeString(e){$t(this.restEncoder,e)}writeParentInfo(e){be(this.restEncoder,e?1:0)}writeTypeRef(e){be(this.restEncoder,e)}writeLen(e){be(this.restEncoder,e)}writeAny(e){Rr(this.restEncoder,e)}writeBuf(e){wt(this.restEncoder,e)}writeJSON(e){$t(this.restEncoder,JSON.stringify(e))}writeKey(e){$t(this.restEncoder,e)}}class ef{constructor(){this.restEncoder=Et(),this.dsCurrVal=0}toUint8Array(){return et(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const n=e-this.dsCurrVal;this.dsCurrVal=e,be(this.restEncoder,n)}writeDsLen(e){e===0&&sn(),be(this.restEncoder,e-1),this.dsCurrVal+=e}}class ms extends ef{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Ha,this.clientEncoder=new Fi,this.leftClockEncoder=new Ha,this.rightClockEncoder=new Ha,this.infoEncoder=new cu(jo),this.stringEncoder=new G2,this.parentInfoEncoder=new cu(jo),this.typeRefEncoder=new Fi,this.lenEncoder=new Fi}toUint8Array(){const e=Et();return be(e,0),wt(e,this.keyClockEncoder.toUint8Array()),wt(e,this.clientEncoder.toUint8Array()),wt(e,this.leftClockEncoder.toUint8Array()),wt(e,this.rightClockEncoder.toUint8Array()),wt(e,et(this.infoEncoder)),wt(e,this.stringEncoder.toUint8Array()),wt(e,et(this.parentInfoEncoder)),wt(e,this.typeRefEncoder.toUint8Array()),wt(e,this.lenEncoder.toUint8Array()),ta(e,et(this.restEncoder)),et(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){Rr(this.restEncoder,e)}writeBuf(e){wt(this.restEncoder,e)}writeJSON(e){Rr(this.restEncoder,e)}writeKey(e){const n=this.keyMap.get(e);n===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(n)}}const Rb=(t,e,n,s)=>{s=ys(s,e[0].id.clock);const r=En(e,s);be(t.restEncoder,e.length-r),t.writeClient(n),be(t.restEncoder,s);const a=e[r];a.write(t,s-a.id.clock);for(let o=r+1;o<e.length;o++)e[o].write(t,0)},jc=(t,e,n)=>{const s=new Map;n.forEach((r,a)=>{jt(e,a)>r&&s.set(a,r)}),la(e).forEach((r,a)=>{n.has(a)||s.set(a,0)}),be(t.restEncoder,s.size),$n(s.entries()).sort((r,a)=>a[0]-r[0]).forEach(([r,a])=>{Rb(t,e.clients.get(r),r,a)})},Ob=(t,e)=>{const n=Jt(),s=Be(t.restDecoder);for(let r=0;r<s;r++){const a=Be(t.restDecoder),o=new Array(a),c=t.readClient();let l=Be(t.restDecoder);n.set(c,{i:0,refs:o});for(let u=0;u<a;u++){const d=t.readInfo();switch(ea&d){case 0:{const h=t.readLen();o[u]=new cn(_e(c,l),h),l+=h;break}case 10:{const h=Be(t.restDecoder);o[u]=new ln(_e(c,l),h),l+=h;break}default:{const h=(d&(In|tn))===0,p=new it(_e(c,l),null,(d&tn)===tn?t.readLeftID():null,null,(d&In)===In?t.readRightID():null,h?t.readParentInfo()?e.get(t.readString()):t.readLeftID():null,h&&(d&Nr)===Nr?t.readString():null,Bf(t,d));o[u]=p,l+=p.length}}}}return n},Pb=(t,e,n)=>{const s=[];let r=$n(n.keys()).sort((m,D)=>m-D);if(r.length===0)return null;const a=()=>{if(r.length===0)return null;let m=n.get(r[r.length-1]);for(;m.refs.length===m.i;)if(r.pop(),r.length>0)m=n.get(r[r.length-1]);else return null;return m};let o=a();if(o===null)return null;const c=new lf,l=new Map,u=(m,D)=>{const C=l.get(m);(C==null||C>D)&&l.set(m,D)};let d=o.refs[o.i++];const h=new Map,p=()=>{for(const m of s){const D=m.id.client,C=n.get(D);C?(C.i--,c.clients.set(D,C.refs.slice(C.i)),n.delete(D),C.i=0,C.refs=[]):c.clients.set(D,[m]),r=r.filter(b=>b!==D)}s.length=0};for(;;){if(d.constructor!==ln){const D=kn(h,d.id.client,()=>jt(e,d.id.client))-d.id.clock;if(D<0)s.push(d),u(d.id.client,d.id.clock-1),p();else{const C=d.getMissing(t,e);if(C!==null){s.push(d);const b=n.get(C)||{refs:[],i:0};if(b.refs.length===b.i)u(C,jt(e,C)),p();else{d=b.refs[b.i++];continue}}else(D===0||D<d.length)&&(d.integrate(t,D),h.set(d.id.client,d.id.clock+d.length))}}if(s.length>0)d=s.pop();else if(o!==null&&o.i<o.refs.length)d=o.refs[o.i++];else{if(o=a(),o===null)break;d=o.refs[o.i++]}}if(c.clients.size>0){const m=new ms;return jc(m,c,new Map),be(m.restEncoder,0),{missing:l,update:m.toUint8Array()}}return null},Ib=(t,e)=>jc(t,e.doc.store,e.beforeState),Mb=(t,e,n,s=new Js(t))=>nt(e,r=>{r.local=!1;let a=!1;const o=r.doc,c=o.store,l=Ob(s,o),u=Pb(r,c,l),d=c.pendingStructs;if(d){for(const[p,m]of d.missing)if(m<jt(c,p)){a=!0;break}if(u){for(const[p,m]of u.missing){const D=d.missing.get(p);(D==null||D>m)&&d.missing.set(p,m)}d.update=zi([d.update,u.update])}}else c.pendingStructs=u;const h=pu(s,r,c);if(c.pendingDs){const p=new Js(ss(c.pendingDs));Be(p.restDecoder);const m=pu(p,r,c);h&&m?c.pendingDs=zi([h,m]):c.pendingDs=h||m}else c.pendingDs=h;if(a){const p=c.pendingStructs.update;c.pendingStructs=null,tf(r.doc,p)}},n,!1),tf=(t,e,n,s=Js)=>{const r=ss(e);Mb(r,t,n,new s(r))},nf=(t,e,n)=>tf(t,e,n,Zh),_b=(t,e,n=new Map)=>{jc(t,e.store,n),ir(t,Nb(e.store))},$b=(t,e=new Uint8Array([0]),n=new ms)=>{const s=sf(e);_b(n,t,s);const r=[n.toUint8Array()];if(t.store.pendingDs&&r.push(t.store.pendingDs),t.store.pendingStructs&&r.push(iF(t.store.pendingStructs.update,e)),r.length>1){if(n.constructor===Kr)return sF(r.map((a,o)=>o===0?a:oF(a)));if(n.constructor===ms)return zi(r)}return r[0]},Sc=(t,e)=>$b(t,e,new Kr),zb=t=>{const e=new Map,n=Be(t.restDecoder);for(let s=0;s<n;s++){const r=Be(t.restDecoder),a=Be(t.restDecoder);e.set(r,a)}return e},sf=t=>zb(new Jh(ss(t))),rf=(t,e)=>(be(t.restEncoder,e.size),$n(e.entries()).sort((n,s)=>s[0]-n[0]).forEach(([n,s])=>{be(t.restEncoder,n),be(t.restEncoder,s)}),t),Ub=(t,e)=>rf(t,la(e.store)),Hb=(t,e=new ef)=>(t instanceof Map?rf(e,t):Ub(e,t),e.toUint8Array()),Vb=t=>Hb(t,new Qh);class qb{constructor(){this.l=[]}}const gu=()=>new qb,Du=(t,e)=>t.l.push(e),yu=(t,e)=>{const n=t.l,s=n.length;t.l=n.filter(r=>e!==r),s===t.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},af=(t,e,n)=>bc(t.l,[e,n]);class _s{constructor(e,n){this.client=e,this.clock=n}}const Rs=(t,e)=>t===e||t!==null&&e!==null&&t.client===e.client&&t.clock===e.clock,_e=(t,e)=>new _s(t,e),of=t=>{for(const[e,n]of t.doc.share.entries())if(n===t)return e;throw sn()},$i=(t,e)=>{for(;e!==null;){if(e.parent===t)return!0;e=e.parent._item}return!1};class cf{constructor(e,n,s,r=0){this.type=e,this.tname=n,this.item=s,this.assoc=r}}const Rw=t=>{const e={};return t.type&&(e.type=t.type),t.tname&&(e.tname=t.tname),t.item&&(e.item=t.item),t.assoc!=null&&(e.assoc=t.assoc),e},Ow=t=>new cf(t.type==null?null:_e(t.type.client,t.type.clock),t.tname??null,t.item==null?null:_e(t.item.client,t.item.clock),t.assoc==null?0:t.assoc);class Wb{constructor(e,n,s=0){this.type=e,this.index=n,this.assoc=s}}const Kb=(t,e,n=0)=>new Wb(t,e,n),mi=(t,e,n)=>{let s=null,r=null;return t._item===null?r=of(t):s=_e(t._item.id.client,t._item.id.clock),new cf(s,r,e,n)},Pw=(t,e,n=0)=>{let s=t._start;if(n<0){if(e===0)return mi(t,null,n);e--}for(;s!==null;){if(!s.deleted&&s.countable){if(s.length>e)return mi(t,_e(s.id.client,s.id.clock+e),n);e-=s.length}if(s.right===null&&n<0)return mi(t,s.lastId,n);s=s.right}return mi(t,null,n)},Gb=(t,e)=>{const n=$s(t,e),s=e.clock-n.id.clock;return{item:n,diff:s}},Iw=(t,e,n=!0)=>{const s=e.store,r=t.item,a=t.type,o=t.tname,c=t.assoc;let l=null,u=0;if(r!==null){if(jt(s,r.client)<=r.clock)return null;const d=n?Io(s,r):Gb(s,r),h=d.item;if(!(h instanceof it))return null;if(l=h.parent,l._item===null||!l._item.deleted){u=h.deleted||!h.countable?0:d.diff+(c>=0?0:1);let p=h.left;for(;p!==null;)!p.deleted&&p.countable&&(u+=p.length),p=p.left}}else{if(o!==null)l=e.get(o);else if(a!==null){if(jt(s,a.client)<=a.clock)return null;const{item:d}=n?Io(s,a):{item:$s(s,a)};if(d instanceof it&&d.content instanceof jn)l=d.content.type;else return null}else throw sn();c>=0?u=l._length:u=0}return Kb(l,u,t.assoc)},Mw=(t,e)=>t===e||t!==null&&e!==null&&t.tname===e.tname&&Rs(t.item,e.item)&&Rs(t.type,e.type)&&t.assoc===e.assoc,Ns=(t,e)=>e===void 0?!t.deleted:e.sv.has(t.id.client)&&(e.sv.get(t.id.client)||0)>t.id.clock&&!Wr(e.ds,t.id),Ro=(t,e)=>{const n=kn(t.meta,Ro,Qn),s=t.doc.store;n.has(e)||(e.sv.forEach((r,a)=>{r<jt(s,a)&&Xt(t,_e(a,r))}),Xs(t,e.ds,r=>{}),n.add(e))};class lf{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const la=t=>{const e=new Map;return t.clients.forEach((n,s)=>{const r=n[n.length-1];e.set(s,r.id.clock+r.length)}),e},jt=(t,e)=>{const n=t.clients.get(e);if(n===void 0)return 0;const s=n[n.length-1];return s.id.clock+s.length},uf=(t,e)=>{let n=t.clients.get(e.id.client);if(n===void 0)n=[],t.clients.set(e.id.client,n);else{const s=n[n.length-1];if(s.id.clock+s.length!==e.id.clock)throw sn()}n.push(e)},En=(t,e)=>{let n=0,s=t.length-1,r=t[s],a=r.id.clock;if(a===e)return s;let o=pn(e/(a+r.length-1)*s);for(;n<=s;){if(r=t[o],a=r.id.clock,a<=e){if(e<a+r.length)return o;n=o+1}else s=o-1;o=pn((n+s)/2)}throw sn()},Yb=(t,e)=>{const n=t.clients.get(e.client);return n[En(n,e.clock)]},$s=Yb,Oo=(t,e,n)=>{const s=En(e,n),r=e[s];return r.id.clock<n&&r instanceof it?(e.splice(s+1,0,Ki(t,r,n-r.id.clock)),s+1):s},Xt=(t,e)=>{const n=t.doc.store.clients.get(e.client);return n[Oo(t,n,e.clock)]},bu=(t,e,n)=>{const s=e.clients.get(n.client),r=En(s,n.clock),a=s[r];return n.clock!==a.id.clock+a.length-1&&a.constructor!==cn&&s.splice(r+1,0,Ki(t,a,n.clock-a.id.clock+1)),a},Xb=(t,e,n)=>{const s=t.clients.get(e.id.client);s[En(s,e.id.clock)]=n},df=(t,e,n,s,r)=>{if(s===0)return;const a=n+s;let o=Oo(t,e,n),c;do c=e[o++],a<c.id.clock+c.length&&Oo(t,e,a),r(c);while(o<e.length&&e[o].id.clock<a)};class Jb{constructor(e,n,s){this.doc=e,this.deleteSet=new rr,this.beforeState=la(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=n,this.meta=new Map,this.local=s,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const Fu=(t,e)=>e.deleteSet.clients.size===0&&!k2(e.afterState,(n,s)=>e.beforeState.get(s)!==n)?!1:(kc(e.deleteSet),Ib(t,e),ir(t,e.deleteSet),!0),Cu=(t,e,n)=>{const s=e._item;(s===null||s.id.clock<(t.beforeState.get(s.id.client)||0)&&!s.deleted)&&kn(t.changed,e,Qn).add(n)},wi=(t,e)=>{let n=t[e],s=t[e-1],r=e;for(;r>0;n=s,s=t[--r-1]){if(s.deleted===n.deleted&&s.constructor===n.constructor&&s.mergeWith(n)){n instanceof it&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,s);continue}break}const a=e-r;return a&&t.splice(e+1-a,a),a},Zb=(t,e,n)=>{for(const[s,r]of t.clients.entries()){const a=e.clients.get(s);for(let o=r.length-1;o>=0;o--){const c=r[o],l=c.clock+c.len;for(let u=En(a,c.clock),d=a[u];u<a.length&&d.id.clock<l;d=a[++u]){const h=a[u];if(c.clock+c.len<=h.id.clock)break;h instanceof it&&h.deleted&&!h.keep&&n(h)&&h.gc(e,!1)}}}},Qb=(t,e)=>{t.clients.forEach((n,s)=>{const r=e.clients.get(s);for(let a=n.length-1;a>=0;a--){const o=n[a],c=dc(r.length-1,1+En(r,o.clock+o.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=o.clock;u=r[l])l-=1+wi(r,l)}})},hf=(t,e)=>{if(e<t.length){const n=t[e],s=n.doc,r=s.store,a=n.deleteSet,o=n._mergeStructs;try{kc(a),n.afterState=la(n.doc.store),s.emit("beforeObserverCalls",[n,s]);const c=[];n.changed.forEach((l,u)=>c.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,h)=>d.path.length-h.path.length),c.push(()=>{af(u._dEH,l,n)}))}),c.push(()=>s.emit("afterTransaction",[n,s])),c.push(()=>{n._needFormattingCleanup&&CF(n)})}),bc(c,[])}finally{s.gc&&Zb(a,r,s.gcFilter),Qb(a,r),n.afterState.forEach((d,h)=>{const p=n.beforeState.get(h)||0;if(p!==d){const m=r.clients.get(h),D=ys(En(m,p),1);for(let C=m.length-1;C>=D;)C-=1+wi(m,C)}});for(let d=o.length-1;d>=0;d--){const{client:h,clock:p}=o[d].id,m=r.clients.get(h),D=En(m,p);D+1<m.length&&wi(m,D+1)>1||D>0&&wi(m,D)}if(!n.local&&n.afterState.get(s.clientID)!==n.beforeState.get(s.clientID)&&(jb(vc,Hh,"[yjs] ",Vh,qh,"Changed the client-id because another client seems to be using it."),s.clientID=Xh()),s.emit("afterTransactionCleanup",[n,s]),s._observers.has("update")){const d=new Kr;Fu(d,n)&&s.emit("update",[d.toUint8Array(),n.origin,s,n])}if(s._observers.has("updateV2")){const d=new ms;Fu(d,n)&&s.emit("updateV2",[d.toUint8Array(),n.origin,s,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=s.clientID,d.collectionid==null&&(d.collectionid=s.collectionid),s.subdocs.add(d)}),u.forEach(d=>s.subdocs.delete(d)),s.emit("subdocs",[{loaded:l,added:c,removed:u},s,n]),u.forEach(d=>d.destroy())),t.length<=e+1?(s._transactionCleanups=[],s.emit("afterAllTransactions",[s,t])):hf(t,e+1)}}},nt=(t,e,n=null,s=!0)=>{const r=t._transactionCleanups;let a=!1,o=null;t._transaction===null&&(a=!0,t._transaction=new Jb(t,n,s),r.push(t._transaction),r.length===1&&t.emit("beforeAllTransactions",[t]),t.emit("beforeTransaction",[t._transaction,t]));try{o=e(t._transaction)}finally{if(a){const c=t._transaction===r[0];t._transaction=null,c&&hf(r,0)}}return o};class eF{constructor(e,n){this.insertions=n,this.deletions=e,this.meta=new Map}}const wu=(t,e,n)=>{Xs(t,n.deletions,s=>{s instanceof it&&e.scope.some(r=>r===t.doc||$i(r,s))&&Ic(s,!1)})},Eu=(t,e,n)=>{let s=null;const r=t.doc,a=t.scope;nt(r,c=>{for(;e.length>0&&t.currStackItem===null;){const l=r.store,u=e.pop(),d=new Set,h=[];let p=!1;Xs(c,u.insertions,m=>{if(m instanceof it){if(m.redone!==null){let{item:D,diff:C}=Io(l,m.id);C>0&&(D=Xt(c,_e(D.id.client,D.id.clock+C))),m=D}!m.deleted&&a.some(D=>D===c.doc||$i(D,m))&&h.push(m)}}),Xs(c,u.deletions,m=>{m instanceof it&&a.some(D=>D===c.doc||$i(D,m))&&!Wr(u.insertions,m.id)&&d.add(m)}),d.forEach(m=>{p=Tf(c,m,d,u.insertions,t.ignoreRemoteMapChanges,t)!==null||p});for(let m=h.length-1;m>=0;m--){const D=h[m];t.deleteFilter(D)&&(D.delete(c),p=!0)}t.currStackItem=p?u:null}c.changed.forEach((l,u)=>{l.has(null)&&u._searchMarker&&(u._searchMarker.length=0)}),s=c},t);const o=t.currStackItem;if(o!=null){const c=s.changedParentTypes;t.emit("stack-item-popped",[{stackItem:o,type:n,changedParentTypes:c,origin:t},t]),t.currStackItem=null}return o};class tF extends uc{constructor(e,{captureTimeout:n=500,captureTransaction:s=l=>!0,deleteFilter:r=()=>!0,trackedOrigins:a=new Set([null]),ignoreRemoteMapChanges:o=!1,doc:c=Ws(e)?e[0].doc:e instanceof bs?e:e.doc}={}){super(),this.scope=[],this.doc=c,this.addToScope(e),this.deleteFilter=r,a.add(this),this.trackedOrigins=a,this.captureTransaction=s,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=o,this.captureTimeout=n,this.afterTransactionHandler=l=>{if(!this.captureTransaction(l)||!this.scope.some(b=>l.changedParentTypes.has(b)||b===this.doc)||!this.trackedOrigins.has(l.origin)&&(!l.origin||!this.trackedOrigins.has(l.origin.constructor)))return;const u=this.undoing,d=this.redoing,h=u?this.redoStack:this.undoStack;u?this.stopCapturing():d||this.clear(!1,!0);const p=new rr;l.afterState.forEach((b,w)=>{const x=l.beforeState.get(w)||0,N=b-x;N>0&&Mr(p,w,x,N)});const m=es();let D=!1;if(this.lastChange>0&&m-this.lastChange<this.captureTimeout&&h.length>0&&!u&&!d){const b=h[h.length-1];b.deletions=Lo([b.deletions,l.deleteSet]),b.insertions=Lo([b.insertions,p])}else h.push(new eF(l.deleteSet,p)),D=!0;!u&&!d&&(this.lastChange=m),Xs(l,l.deleteSet,b=>{b instanceof it&&this.scope.some(w=>w===l.doc||$i(w,b))&&Ic(b,!0)});const C=[{stackItem:h[h.length-1],origin:l.origin,type:u?"redo":"undo",changedParentTypes:l.changedParentTypes},this];D?this.emit("stack-item-added",C):this.emit("stack-item-updated",C)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(e){const n=new Set(this.scope);e=Ws(e)?e:[e],e.forEach(s=>{n.has(s)||(n.add(s),(s instanceof Ot?s.doc!==this.doc:s!==this.doc)&&Kh("[yjs#509] Not same Y.Doc"),this.scope.push(s))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,n=!0){(e&&this.canUndo()||n&&this.canRedo())&&this.doc.transact(s=>{e&&(this.undoStack.forEach(r=>wu(s,this,r)),this.undoStack=[]),n&&(this.redoStack.forEach(r=>wu(s,this,r)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:e,redoStackCleared:n}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let e;try{e=Eu(this,this.undoStack,"undo")}finally{this.undoing=!1}return e}redo(){this.redoing=!0;let e;try{e=Eu(this,this.redoStack,"redo")}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}}function*nF(t){const e=Be(t.restDecoder);for(let n=0;n<e;n++){const s=Be(t.restDecoder),r=t.readClient();let a=Be(t.restDecoder);for(let o=0;o<s;o++){const c=t.readInfo();if(c===10){const l=Be(t.restDecoder);yield new ln(_e(r,a),l),a+=l}else if((ea&c)!==0){const l=(c&(In|tn))===0,u=new it(_e(r,a),null,(c&tn)===tn?t.readLeftID():null,null,(c&In)===In?t.readRightID():null,l?t.readParentInfo()?t.readString():t.readLeftID():null,l&&(c&Nr)===Nr?t.readString():null,Bf(t,c));yield u,a+=u.length}else{const l=t.readLen();yield new cn(_e(r,a),l),a+=l}}}}class Tc{constructor(e,n){this.gen=nF(e),this.curr=null,this.done=!1,this.filterSkips=n,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===ln);return this.curr}}class Bc{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}}const sF=t=>zi(t,Zh,Kr),rF=(t,e)=>{if(t.constructor===cn){const{client:n,clock:s}=t.id;return new cn(_e(n,s+e),t.length-e)}else if(t.constructor===ln){const{client:n,clock:s}=t.id;return new ln(_e(n,s+e),t.length-e)}else{const n=t,{client:s,clock:r}=n.id;return new it(_e(s,r+e),null,_e(s,r+e-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(e))}},zi=(t,e=Js,n=ms)=>{if(t.length===1)return t[0];const s=t.map(d=>new e(ss(d)));let r=s.map(d=>new Tc(d,!0)),a=null;const o=new n,c=new Bc(o);for(;r=r.filter(p=>p.curr!==null),r.sort((p,m)=>{if(p.curr.id.client===m.curr.id.client){const D=p.curr.id.clock-m.curr.id.clock;return D===0?p.curr.constructor===m.curr.constructor?0:p.curr.constructor===ln?1:-1:D}else return m.curr.id.client-p.curr.id.client}),r.length!==0;){const d=r[0],h=d.curr.id.client;if(a!==null){let p=d.curr,m=!1;for(;p!==null&&p.id.clock+p.length<=a.struct.id.clock+a.struct.length&&p.id.client>=a.struct.id.client;)p=d.next(),m=!0;if(p===null||p.id.client!==h||m&&p.id.clock>a.struct.id.clock+a.struct.length)continue;if(h!==a.struct.id.client)Kn(c,a.struct,a.offset),a={struct:p,offset:0},d.next();else if(a.struct.id.clock+a.struct.length<p.id.clock)if(a.struct.constructor===ln)a.struct.length=p.id.clock+p.length-a.struct.id.clock;else{Kn(c,a.struct,a.offset);const D=p.id.clock-a.struct.id.clock-a.struct.length;a={struct:new ln(_e(h,a.struct.id.clock+a.struct.length),D),offset:0}}else{const D=a.struct.id.clock+a.struct.length-p.id.clock;D>0&&(a.struct.constructor===ln?a.struct.length-=D:p=rF(p,D)),a.struct.mergeWith(p)||(Kn(c,a.struct,a.offset),a={struct:p,offset:0},d.next())}}else a={struct:d.curr,offset:0},d.next();for(let p=d.curr;p!==null&&p.id.client===h&&p.id.clock===a.struct.id.clock+a.struct.length&&p.constructor!==ln;p=d.next())Kn(c,a.struct,a.offset),a={struct:p,offset:0}}a!==null&&(Kn(c,a.struct,a.offset),a=null),Nc(c);const l=s.map(d=>Ac(d)),u=Lo(l);return ir(o,u),o.toUint8Array()},iF=(t,e,n=Js,s=ms)=>{const r=sf(e),a=new s,o=new Bc(a),c=new n(ss(t)),l=new Tc(c,!1);for(;l.curr;){const d=l.curr,h=d.id.client,p=r.get(h)||0;if(l.curr.constructor===ln){l.next();continue}if(d.id.clock+d.length>p)for(Kn(o,d,ys(p-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===h;)Kn(o,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===h&&l.curr.id.clock+l.curr.length<=p;)l.next()}Nc(o);const u=Ac(c);return ir(a,u),a.toUint8Array()},ff=t=>{t.written>0&&(t.clientStructs.push({written:t.written,restEncoder:et(t.encoder.restEncoder)}),t.encoder.restEncoder=Et(),t.written=0)},Kn=(t,e,n)=>{t.written>0&&t.currClient!==e.id.client&&ff(t),t.written===0&&(t.currClient=e.id.client,t.encoder.writeClient(e.id.client),be(t.encoder.restEncoder,e.id.clock+n)),e.write(t.encoder,n),t.written++},Nc=t=>{ff(t);const e=t.encoder.restEncoder;be(e,t.clientStructs.length);for(let n=0;n<t.clientStructs.length;n++){const s=t.clientStructs[n];be(e,s.written),ta(e,s.restEncoder)}},aF=(t,e,n,s)=>{const r=new n(ss(t)),a=new Tc(r,!1),o=new s,c=new Bc(o);for(let u=a.curr;u!==null;u=a.next())Kn(c,e(u),0);Nc(c);const l=Ac(r);return ir(o,l),o.toUint8Array()},oF=t=>aF(t,Dy,Js,Kr),xu="You must not compute changes after the event-handler fired.";class ua{constructor(e,n){this.target=e,this.currentTarget=e,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=cF(this.currentTarget,this.target))}deletes(e){return Wr(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw gn(xu);const e=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const a=n._map.get(r);let o,c;if(this.adds(a)){let l=a.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(a))if(l!==null&&this.deletes(l))o="delete",c=$a(l.content.getContent());else return;else l!==null&&this.deletes(l)?(o="update",c=$a(l.content.getContent())):(o="add",c=void 0)}else if(this.deletes(a))o="delete",c=$a(a.content.getContent());else return;e.set(r,{action:o,oldValue:c})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw gn(xu);const n=this.target,s=Qn(),r=Qn(),a=[];if(e={added:s,deleted:r,delta:a,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&a.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),s.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=e}return e}}const cF=(t,e)=>{const n=[];for(;e._item!==null&&e!==t;){if(e._item.parentSub!==null)n.unshift(e._item.parentSub);else{let s=0,r=e._item.parent._start;for(;r!==e._item&&r!==null;)!r.deleted&&r.countable&&(s+=r.length),r=r.right;n.unshift(s)}e=e._item.parent}return n},Vt=()=>{Kh("Invalid access: Add Yjs type to a document before reading data.")},mf=80;let Lc=0;class lF{constructor(e,n){e.marker=!0,this.p=e,this.index=n,this.timestamp=Lc++}}const uF=t=>{t.timestamp=Lc++},pf=(t,e,n)=>{t.p.marker=!1,t.p=e,e.marker=!0,t.index=n,t.timestamp=Lc++},dF=(t,e,n)=>{if(t.length>=mf){const s=t.reduce((r,a)=>r.timestamp<a.timestamp?r:a);return pf(s,e,n),s}else{const s=new lF(e,n);return t.push(s),s}},da=(t,e)=>{if(t._start===null||e===0||t._searchMarker===null)return null;const n=t._searchMarker.length===0?null:t._searchMarker.reduce((a,o)=>bi(e-a.index)<bi(e-o.index)?a:o);let s=t._start,r=0;for(n!==null&&(s=n.p,r=n.index,uF(n));s.right!==null&&r<e;){if(!s.deleted&&s.countable){if(e<r+s.length)break;r+=s.length}s=s.right}for(;s.left!==null&&r>e;)s=s.left,!s.deleted&&s.countable&&(r-=s.length);for(;s.left!==null&&s.left.id.client===s.id.client&&s.left.id.clock+s.left.length===s.id.clock;)s=s.left,!s.deleted&&s.countable&&(r-=s.length);return n!==null&&bi(n.index-r)<s.parent.length/mf?(pf(n,s,r),n):dF(t._searchMarker,s,r)},_r=(t,e,n)=>{for(let s=t.length-1;s>=0;s--){const r=t[s];if(n>0){let a=r.p;for(a.marker=!1;a&&(a.deleted||!a.countable);)a=a.left,a&&!a.deleted&&a.countable&&(r.index-=a.length);if(a===null||a.marker===!0){t.splice(s,1);continue}r.p=a,a.marker=!0}(e<r.index||n>0&&e===r.index)&&(r.index=ys(e,r.index+n))}},ha=(t,e,n)=>{const s=t,r=e.changedParentTypes;for(;kn(r,t,()=>[]).push(n),t._item!==null;)t=t._item.parent;af(s._eH,n,e)};class Ot{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=gu(),this._dEH=gu(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,n){this.doc=e,this._item=n}_copy(){throw mn()}clone(){throw mn()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,n){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){Du(this._eH,e)}observeDeep(e){Du(this._dEH,e)}unobserve(e){yu(this._eH,e)}unobserveDeep(e){yu(this._dEH,e)}toJSON(){}}const gf=(t,e,n)=>{t.doc??Vt(),e<0&&(e=t._length+e),n<0&&(n=t._length+n);let s=n-e;const r=[];let a=t._start;for(;a!==null&&s>0;){if(a.countable&&!a.deleted){const o=a.content.getContent();if(o.length<=e)e-=o.length;else{for(let c=e;c<o.length&&s>0;c++)r.push(o[c]),s--;e=0}}a=a.right}return r},Df=t=>{t.doc??Vt();const e=[];let n=t._start;for(;n!==null;){if(n.countable&&!n.deleted){const s=n.content.getContent();for(let r=0;r<s.length;r++)e.push(s[r])}n=n.right}return e},$r=(t,e)=>{let n=0,s=t._start;for(t.doc??Vt();s!==null;){if(s.countable&&!s.deleted){const r=s.content.getContent();for(let a=0;a<r.length;a++)e(r[a],n++,t)}s=s.right}},yf=(t,e)=>{const n=[];return $r(t,(s,r)=>{n.push(e(s,r,t))}),n},hF=t=>{let e=t._start,n=null,s=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};n=e.content.getContent(),s=0,e=e.right}const r=n[s++];return n.length<=s&&(n=null),{done:!1,value:r}}}},bf=(t,e)=>{t.doc??Vt();const n=da(t,e);let s=t._start;for(n!==null&&(s=n.p,e-=n.index);s!==null;s=s.right)if(!s.deleted&&s.countable){if(e<s.length)return s.content.getContent()[e];e-=s.length}},Ui=(t,e,n,s)=>{let r=n;const a=t.doc,o=a.clientID,c=a.store,l=n===null?e._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new it(_e(o,jt(c,o)),r,r&&r.lastId,l,l&&l.id,e,null,new gs(u)),r.integrate(t,0),u=[])};s.forEach(h=>{if(h===null)u.push(h);else switch(h.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(h);break;default:switch(d(),h.constructor){case Uint8Array:case ArrayBuffer:r=new it(_e(o,jt(c,o)),r,r&&r.lastId,l,l&&l.id,e,null,new Gr(new Uint8Array(h))),r.integrate(t,0);break;case bs:r=new it(_e(o,jt(c,o)),r,r&&r.lastId,l,l&&l.id,e,null,new Yr(h)),r.integrate(t,0);break;default:if(h instanceof Ot)r=new it(_e(o,jt(c,o)),r,r&&r.lastId,l,l&&l.id,e,null,new jn(h)),r.integrate(t,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},Ff=()=>gn("Length exceeded!"),Cf=(t,e,n,s)=>{if(n>e._length)throw Ff();if(n===0)return e._searchMarker&&_r(e._searchMarker,n,s.length),Ui(t,e,null,s);const r=n,a=da(e,n);let o=e._start;for(a!==null&&(o=a.p,n-=a.index,n===0&&(o=o.prev,n+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(n<=o.length){n<o.length&&Xt(t,_e(o.id.client,o.id.clock+n));break}n-=o.length}return e._searchMarker&&_r(e._searchMarker,r,s.length),Ui(t,e,o,s)},fF=(t,e,n)=>{let r=(e._searchMarker||[]).reduce((a,o)=>o.index>a.index?o:a,{index:0,p:e._start}).p;if(r)for(;r.right;)r=r.right;return Ui(t,e,r,n)},wf=(t,e,n,s)=>{if(s===0)return;const r=n,a=s,o=da(e,n);let c=e._start;for(o!==null&&(c=o.p,n-=o.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n<c.length&&Xt(t,_e(c.id.client,c.id.clock+n)),n-=c.length);for(;s>0&&c!==null;)c.deleted||(s<c.length&&Xt(t,_e(c.id.client,c.id.clock+s)),c.delete(t),s-=c.length),c=c.right;if(s>0)throw Ff();e._searchMarker&&_r(e._searchMarker,r,-a+s)},Hi=(t,e,n)=>{const s=e._map.get(n);s!==void 0&&s.delete(t)},Rc=(t,e,n,s)=>{const r=e._map.get(n)||null,a=t.doc,o=a.clientID;let c;if(s==null)c=new gs([s]);else switch(s.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:c=new gs([s]);break;case Uint8Array:c=new Gr(s);break;case bs:c=new Yr(s);break;default:if(s instanceof Ot)c=new jn(s);else throw new Error("Unexpected content type")}new it(_e(o,jt(a.store,o)),r,r&&r.lastId,null,null,e,n,c).integrate(t,0)},Oc=(t,e)=>{t.doc??Vt();const n=t._map.get(e);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},Ef=t=>{const e={};return t.doc??Vt(),t._map.forEach((n,s)=>{n.deleted||(e[s]=n.content.getContent()[n.length-1])}),e},xf=(t,e)=>{t.doc??Vt();const n=t._map.get(e);return n!==void 0&&!n.deleted},mF=(t,e)=>{const n={};return t._map.forEach((s,r)=>{let a=s;for(;a!==null&&(!e.sv.has(a.id.client)||a.id.clock>=(e.sv.get(a.id.client)||0));)a=a.left;a!==null&&Ns(a,e)&&(n[r]=a.content.getContent()[a.length-1])}),n},pi=t=>(t.doc??Vt(),Sb(t._map.entries(),e=>!e[1].deleted));class pF extends ua{}class zs extends Ot{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const n=new zs;return n.push(e),n}_integrate(e,n){super._integrate(e,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new zs}clone(){const e=new zs;return e.insert(0,this.toArray().map(n=>n instanceof Ot?n.clone():n)),e}get length(){return this.doc??Vt(),this._length}_callObserver(e,n){super._callObserver(e,n),ha(this,e,new pF(this,e))}insert(e,n){this.doc!==null?nt(this.doc,s=>{Cf(s,this,e,n)}):this._prelimContent.splice(e,0,...n)}push(e){this.doc!==null?nt(this.doc,n=>{fF(n,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,n=1){this.doc!==null?nt(this.doc,s=>{wf(s,this,e,n)}):this._prelimContent.splice(e,n)}get(e){return bf(this,e)}toArray(){return Df(this)}slice(e=0,n=this.length){return gf(this,e,n)}toJSON(){return this.map(e=>e instanceof Ot?e.toJSON():e)}map(e){return yf(this,e)}forEach(e){$r(this,e)}[Symbol.iterator](){return hF(this)}_write(e){e.writeTypeRef($F)}}const gF=t=>new zs;class DF extends ua{constructor(e,n,s){super(e,n),this.keysChanged=s}}class Zs extends Ot{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,n){super._integrate(e,n),this._prelimContent.forEach((s,r)=>{this.set(r,s)}),this._prelimContent=null}_copy(){return new Zs}clone(){const e=new Zs;return this.forEach((n,s)=>{e.set(s,n instanceof Ot?n.clone():n)}),e}_callObserver(e,n){ha(this,e,new DF(this,e,n))}toJSON(){this.doc??Vt();const e={};return this._map.forEach((n,s)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];e[s]=r instanceof Ot?r.toJSON():r}}),e}get size(){return[...pi(this)].length}keys(){return Ka(pi(this),e=>e[0])}values(){return Ka(pi(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Ka(pi(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Vt(),this._map.forEach((n,s)=>{n.deleted||e(n.content.getContent()[n.length-1],s,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?nt(this.doc,n=>{Hi(n,this,e)}):this._prelimContent.delete(e)}set(e,n){return this.doc!==null?nt(this.doc,s=>{Rc(s,this,e,n)}):this._prelimContent.set(e,n),n}get(e){return Oc(this,e)}has(e){return xf(this,e)}clear(){this.doc!==null?nt(this.doc,e=>{this.forEach(function(n,s,r){Hi(e,r,s)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(zF)}}const yF=t=>new Zs,Gn=(t,e)=>t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&py(t,e);class Po{constructor(e,n,s,r){this.left=e,this.right=n,this.index=s,this.currentAttributes=r}forward(){this.right===null&&sn(),this.right.content.constructor===Bt?this.right.deleted||ar(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}}const vu=(t,e,n)=>{for(;e.right!==null&&n>0;)e.right.content.constructor===Bt?e.right.deleted||ar(e.currentAttributes,e.right.content):e.right.deleted||(n<e.right.length&&Xt(t,_e(e.right.id.client,e.right.id.clock+n)),e.index+=e.right.length,n-=e.right.length),e.left=e.right,e.right=e.right.right;return e},gi=(t,e,n,s)=>{const r=new Map,a=s?da(e,n):null;if(a){const o=new Po(a.p.left,a.p,a.index,r);return vu(t,o,n-a.index)}else{const o=new Po(null,e._start,0,r);return vu(t,o,n)}},vf=(t,e,n,s)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===Bt&&Gn(s.get(n.right.content.key),n.right.content.value));)n.right.deleted||s.delete(n.right.content.key),n.forward();const r=t.doc,a=r.clientID;s.forEach((o,c)=>{const l=n.left,u=n.right,d=new it(_e(a,jt(r.store,a)),l,l&&l.lastId,u,u&&u.id,e,null,new Bt(c,o));d.integrate(t,0),n.right=d,n.forward()})},ar=(t,e)=>{const{key:n,value:s}=e;s===null?t.delete(n):t.set(n,s)},kf=(t,e)=>{for(;t.right!==null;){if(!(t.right.deleted||t.right.content.constructor===Bt&&Gn(e[t.right.content.key]??null,t.right.content.value)))break;t.forward()}},Af=(t,e,n,s)=>{const r=t.doc,a=r.clientID,o=new Map;for(const c in s){const l=s[c],u=n.currentAttributes.get(c)??null;if(!Gn(u,l)){o.set(c,u);const{left:d,right:h}=n;n.right=new it(_e(a,jt(r.store,a)),d,d&&d.lastId,h,h&&h.id,e,null,new Bt(c,l)),n.right.integrate(t,0),n.forward()}}return o},Ga=(t,e,n,s,r)=>{n.currentAttributes.forEach((p,m)=>{r[m]===void 0&&(r[m]=null)});const a=t.doc,o=a.clientID;kf(n,r);const c=Af(t,e,n,r),l=s.constructor===String?new xn(s):s instanceof Ot?new jn(s):new Fs(s);let{left:u,right:d,index:h}=n;e._searchMarker&&_r(e._searchMarker,n.index,l.getLength()),d=new it(_e(o,jt(a.store,o)),u,u&&u.lastId,d,d&&d.id,e,null,l),d.integrate(t,0),n.right=d,n.index=h,n.forward(),vf(t,e,n,c)},ku=(t,e,n,s,r)=>{const a=t.doc,o=a.clientID;kf(n,r);const c=Af(t,e,n,r);e:for(;n.right!==null&&(s>0||c.size>0&&(n.right.deleted||n.right.content.constructor===Bt));){if(!n.right.deleted)switch(n.right.content.constructor){case Bt:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(Gn(d,u))c.delete(l);else{if(s===0)break e;c.set(l,u)}n.right.delete(t)}else n.currentAttributes.set(l,u);break}default:s<n.right.length&&Xt(t,_e(n.right.id.client,n.right.id.clock+s)),s-=n.right.length;break}n.forward()}if(s>0){let l="";for(;s>0;s--)l+=`
|
|
45
|
-
`;n.right=new it(_e(o,jt(a.store,o)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,e,null,new xn(l)),n.right.integrate(t,0),n.forward()}vf(t,e,n,c)},jf=(t,e,n,s,r)=>{let a=e;const o=Jt();for(;a&&(!a.countable||a.deleted);){if(!a.deleted&&a.content.constructor===Bt){const u=a.content;o.set(u.key,u)}a=a.right}let c=0,l=!1;for(;e!==a;){if(n===e&&(l=!0),!e.deleted){const u=e.content;if(u.constructor===Bt){const{key:d,value:h}=u,p=s.get(d)??null;(o.get(d)!==u||p===h)&&(e.delete(t),c++,!l&&(r.get(d)??null)===h&&p!==h&&(p===null?r.delete(d):r.set(d,p))),!l&&!e.deleted&&ar(r,u)}}e=e.right}return c},bF=(t,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;const n=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===Bt){const s=e.content.key;n.has(s)?e.delete(t):n.add(s)}e=e.left}},FF=t=>{let e=0;return nt(t.doc,n=>{let s=t._start,r=t._start,a=Jt();const o=ko(a);for(;r;)r.deleted===!1&&(r.content.constructor===Bt?ar(o,r.content):(e+=jf(n,s,r,a,o),a=ko(o),s=r)),r=r.right}),e},CF=t=>{const e=new Set,n=t.doc;for(const[s,r]of t.afterState.entries()){const a=t.beforeState.get(s)||0;r!==a&&df(t,n.store.clients.get(s),a,r,o=>{!o.deleted&&o.content.constructor===Bt&&o.constructor!==cn&&e.add(o.parent)})}nt(n,s=>{Xs(t,t.deleteSet,r=>{if(r instanceof cn||!r.parent._hasFormatting||e.has(r.parent))return;const a=r.parent;r.content.constructor===Bt?e.add(a):bF(s,r)});for(const r of e)FF(r)})},Au=(t,e,n)=>{const s=n,r=ko(e.currentAttributes),a=e.right;for(;n>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case jn:case Fs:case xn:n<e.right.length&&Xt(t,_e(e.right.id.client,e.right.id.clock+n)),n-=e.right.length,e.right.delete(t);break}e.forward()}a&&jf(t,a,e.right,r,e.currentAttributes);const o=(e.left||e.right).parent;return o._searchMarker&&_r(o._searchMarker,e.index,-s+n),e};class wF extends ua{constructor(e,n,s){super(e,n),this.childListChanged=!1,this.keysChanged=new Set,s.forEach(r=>{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){const e=this.target.doc,n=[];nt(e,s=>{const r=new Map,a=new Map;let o=this.target._start,c=null;const l={};let u="",d=0,h=0;const p=()=>{if(c!==null){let m=null;switch(c){case"delete":h>0&&(m={delete:h}),h=0;break;case"insert":(typeof u=="object"||u.length>0)&&(m={insert:u},r.size>0&&(m.attributes={},r.forEach((D,C)=>{D!==null&&(m.attributes[C]=D)}))),u="";break;case"retain":d>0&&(m={retain:d},my(l)||(m.attributes=uy({},l))),d=0;break}m&&n.push(m),c=null}};for(;o!==null;){switch(o.content.constructor){case jn:case Fs:this.adds(o)?this.deletes(o)||(p(),c="insert",u=o.content.getContent()[0],p()):this.deletes(o)?(c!=="delete"&&(p(),c="delete"),h+=1):o.deleted||(c!=="retain"&&(p(),c="retain"),d+=1);break;case xn:this.adds(o)?this.deletes(o)||(c!=="insert"&&(p(),c="insert"),u+=o.content.str):this.deletes(o)?(c!=="delete"&&(p(),c="delete"),h+=o.length):o.deleted||(c!=="retain"&&(p(),c="retain"),d+=o.length);break;case Bt:{const{key:m,value:D}=o.content;if(this.adds(o)){if(!this.deletes(o)){const C=r.get(m)??null;Gn(C,D)?D!==null&&o.delete(s):(c==="retain"&&p(),Gn(D,a.get(m)??null)?delete l[m]:l[m]=D)}}else if(this.deletes(o)){a.set(m,D);const C=r.get(m)??null;Gn(C,D)||(c==="retain"&&p(),l[m]=C)}else if(!o.deleted){a.set(m,D);const C=l[m];C!==void 0&&(Gn(C,D)?C!==null&&o.delete(s):(c==="retain"&&p(),D===null?delete l[m]:l[m]=D))}o.deleted||(c==="insert"&&p(),ar(r,o.content));break}}o=o.right}for(p();n.length>0;){const m=n[n.length-1];if(m.retain!==void 0&&m.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class Qs extends Ot{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Vt(),this._length}_integrate(e,n){super._integrate(e,n);try{this._pending.forEach(s=>s())}catch(s){console.error(s)}this._pending=null}_copy(){return new Qs}clone(){const e=new Qs;return e.applyDelta(this.toDelta()),e}_callObserver(e,n){super._callObserver(e,n);const s=new wF(this,e,n);ha(this,e,s),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??Vt();let e="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===xn&&(e+=n.content.str),n=n.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:n=!0}={}){this.doc!==null?nt(this.doc,s=>{const r=new Po(null,this._start,0,new Map);for(let a=0;a<e.length;a++){const o=e[a];if(o.insert!==void 0){const c=!n&&typeof o.insert=="string"&&a===e.length-1&&r.right===null&&o.insert.slice(-1)===`
|
|
46
|
-
`?o.insert.slice(0,-1):o.insert;(typeof c!="string"||c.length>0)&&Ga(s,this,r,c,o.attributes||{})}else o.retain!==void 0?ku(s,this,r,o.retain,o.attributes||{}):o.delete!==void 0&&Au(s,r,o.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,n,s){this.doc??Vt();const r=[],a=new Map,o=this.doc;let c="",l=this._start;function u(){if(c.length>0){const h={};let p=!1;a.forEach((D,C)=>{p=!0,h[C]=D});const m={insert:c};p&&(m.attributes=h),r.push(m),c=""}}const d=()=>{for(;l!==null;){if(Ns(l,e)||n!==void 0&&Ns(l,n))switch(l.content.constructor){case xn:{const h=a.get("ychange");e!==void 0&&!Ns(l,e)?(h===void 0||h.user!==l.id.client||h.type!=="removed")&&(u(),a.set("ychange",s?s("removed",l.id):{type:"removed"})):n!==void 0&&!Ns(l,n)?(h===void 0||h.user!==l.id.client||h.type!=="added")&&(u(),a.set("ychange",s?s("added",l.id):{type:"added"})):h!==void 0&&(u(),a.delete("ychange")),c+=l.content.str;break}case jn:case Fs:{u();const h={insert:l.content.getContent()[0]};if(a.size>0){const p={};h.attributes=p,a.forEach((m,D)=>{p[D]=m})}r.push(h);break}case Bt:Ns(l,e)&&(u(),ar(a,l.content));break}l=l.right}u()};return e||n?nt(o,h=>{e&&Ro(h,e),n&&Ro(h,n),d()},"cleanup"):d(),r}insert(e,n,s){if(n.length<=0)return;const r=this.doc;r!==null?nt(r,a=>{const o=gi(a,this,e,!s);s||(s={},o.currentAttributes.forEach((c,l)=>{s[l]=c})),Ga(a,this,o,n,s)}):this._pending.push(()=>this.insert(e,n,s))}insertEmbed(e,n,s){const r=this.doc;r!==null?nt(r,a=>{const o=gi(a,this,e,!s);Ga(a,this,o,n,s||{})}):this._pending.push(()=>this.insertEmbed(e,n,s||{}))}delete(e,n){if(n===0)return;const s=this.doc;s!==null?nt(s,r=>{Au(r,gi(r,this,e,!0),n)}):this._pending.push(()=>this.delete(e,n))}format(e,n,s){if(n===0)return;const r=this.doc;r!==null?nt(r,a=>{const o=gi(a,this,e,!1);o.right!==null&&ku(a,this,o,n,s)}):this._pending.push(()=>this.format(e,n,s))}removeAttribute(e){this.doc!==null?nt(this.doc,n=>{Hi(n,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,n){this.doc!==null?nt(this.doc,s=>{Rc(s,this,e,n)}):this._pending.push(()=>this.setAttribute(e,n))}getAttribute(e){return Oc(this,e)}getAttributes(){return Ef(this)}_write(e){e.writeTypeRef(UF)}}const EF=t=>new Qs;class Ya{constructor(e,n=()=>!0){this._filter=n,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Vt()}[Symbol.iterator](){return this}next(){let e=this._currentNode,n=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(n)))do if(n=e.content.type,!e.deleted&&(n.constructor===er||n.constructor===ps)&&n._start!==null)e=n._start;else for(;e!==null;){const s=e.next;if(s!==null){e=s;break}else e.parent===this._root?e=null:e=e.parent._item}while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class ps extends Ot{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,n){super._integrate(e,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new ps}clone(){const e=new ps;return e.insert(0,this.toArray().map(n=>n instanceof Ot?n.clone():n)),e}get length(){return this.doc??Vt(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new Ya(this,e)}querySelector(e){e=e.toUpperCase();const s=new Ya(this,r=>r.nodeName&&r.nodeName.toUpperCase()===e).next();return s.done?null:s.value}querySelectorAll(e){return e=e.toUpperCase(),$n(new Ya(this,n=>n.nodeName&&n.nodeName.toUpperCase()===e))}_callObserver(e,n){ha(this,e,new kF(this,n,e))}toString(){return yf(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,n={},s){const r=e.createDocumentFragment();return s!==void 0&&s._createAssociation(r,this),$r(this,a=>{r.insertBefore(a.toDOM(e,n,s),null)}),r}insert(e,n){this.doc!==null?nt(this.doc,s=>{Cf(s,this,e,n)}):this._prelimContent.splice(e,0,...n)}insertAfter(e,n){if(this.doc!==null)nt(this.doc,s=>{const r=e&&e instanceof Ot?e._item:e;Ui(s,this,r,n)});else{const s=this._prelimContent,r=e===null?0:s.findIndex(a=>a===e)+1;if(r===0&&e!==null)throw gn("Reference item not found");s.splice(r,0,...n)}}delete(e,n=1){this.doc!==null?nt(this.doc,s=>{wf(s,this,e,n)}):this._prelimContent.splice(e,n)}toArray(){return Df(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return bf(this,e)}slice(e=0,n=this.length){return gf(this,e,n)}forEach(e){$r(this,e)}_write(e){e.writeTypeRef(VF)}}const xF=t=>new ps;class er extends ps{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,n){super._integrate(e,n),this._prelimAttrs.forEach((s,r)=>{this.setAttribute(r,s)}),this._prelimAttrs=null}_copy(){return new er(this.nodeName)}clone(){const e=new er(this.nodeName),n=this.getAttributes();return hy(n,(s,r)=>{e.setAttribute(r,s)}),e.insert(0,this.toArray().map(s=>s instanceof Ot?s.clone():s)),e}toString(){const e=this.getAttributes(),n=[],s=[];for(const c in e)s.push(c);s.sort();const r=s.length;for(let c=0;c<r;c++){const l=s[c];n.push(l+'="'+e[l]+'"')}const a=this.nodeName.toLocaleLowerCase(),o=n.length>0?" "+n.join(" "):"";return`<${a}${o}>${super.toString()}</${a}>`}removeAttribute(e){this.doc!==null?nt(this.doc,n=>{Hi(n,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,n){this.doc!==null?nt(this.doc,s=>{Rc(s,this,e,n)}):this._prelimAttrs.set(e,n)}getAttribute(e){return Oc(this,e)}hasAttribute(e){return xf(this,e)}getAttributes(e){return e?mF(this,e):Ef(this)}toDOM(e=document,n={},s){const r=e.createElement(this.nodeName),a=this.getAttributes();for(const o in a){const c=a[o];typeof c=="string"&&r.setAttribute(o,c)}return $r(this,o=>{r.appendChild(o.toDOM(e,n,s))}),s!==void 0&&s._createAssociation(r,this),r}_write(e){e.writeTypeRef(HF),e.writeKey(this.nodeName)}}const vF=t=>new er(t.readKey());class kF extends ua{constructor(e,n,s){super(e,s),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class Vi extends Zs{constructor(e){super(),this.hookName=e}_copy(){return new Vi(this.hookName)}clone(){const e=new Vi(this.hookName);return this.forEach((n,s)=>{e.set(s,n)}),e}toDOM(e=document,n={},s){const r=n[this.hookName];let a;return r!==void 0?a=r.createDom(this):a=document.createElement(this.hookName),a.setAttribute("data-yjs-hook",this.hookName),s!==void 0&&s._createAssociation(a,this),a}_write(e){e.writeTypeRef(qF),e.writeKey(this.hookName)}}const AF=t=>new Vi(t.readKey());class qi extends Qs{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new qi}clone(){const e=new qi;return e.applyDelta(this.toDelta()),e}toDOM(e=document,n,s){const r=e.createTextNode(this.toString());return s!==void 0&&s._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{const n=[];for(const r in e.attributes){const a=[];for(const o in e.attributes[r])a.push({key:o,value:e.attributes[r][o]});a.sort((o,c)=>o.key<c.key?-1:1),n.push({nodeName:r,attrs:a})}n.sort((r,a)=>r.nodeName<a.nodeName?-1:1);let s="";for(let r=0;r<n.length;r++){const a=n[r];s+=`<${a.nodeName}`;for(let o=0;o<a.attrs.length;o++){const c=a.attrs[o];s+=` ${c.key}="${c.value}"`}s+=">"}s+=e.insert;for(let r=n.length-1;r>=0;r--)s+=`</${n[r].nodeName}>`;return s}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(WF)}}const jF=t=>new qi;class Pc{constructor(e,n){this.id=e,this.length=n}get deleted(){throw mn()}mergeWith(e){return!1}write(e,n,s){throw mn()}integrate(e,n){throw mn()}}const SF=0;class cn extends Pc{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,n){n>0&&(this.id.clock+=n,this.length-=n),uf(e.doc.store,this)}write(e,n){e.writeInfo(SF),e.writeLen(this.length-n)}getMissing(e,n){return null}}class Gr{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Gr(this.content)}splice(e){throw mn()}mergeWith(e){return!1}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeBuf(this.content)}getRef(){return 3}}const TF=t=>new Gr(t.readBuf());class zr{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new zr(this.len)}splice(e){const n=new zr(this.len-e);return this.len=e,n}mergeWith(e){return this.len+=e.len,!0}integrate(e,n){Mr(e.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(e){}gc(e){}write(e,n){e.writeLen(this.len-n)}getRef(){return 1}}const BF=t=>new zr(t.readLen()),Sf=(t,e)=>new bs({guid:t,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1});class Yr{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;const n={};this.opts=n,e.gc||(n.gc=!1),e.autoLoad&&(n.autoLoad=!0),e.meta!==null&&(n.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Yr(Sf(this.doc.guid,this.opts))}splice(e){throw mn()}mergeWith(e){return!1}integrate(e,n){this.doc._item=n,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,n){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}const NF=t=>new Yr(Sf(t.readString(),t.readAny()));class Fs{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Fs(this.embed)}splice(e){throw mn()}mergeWith(e){return!1}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeJSON(this.embed)}getRef(){return 5}}const LF=t=>new Fs(t.readJSON());class Bt{constructor(e,n){this.key=e,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new Bt(this.key,this.value)}splice(e){throw mn()}mergeWith(e){return!1}integrate(e,n){const s=n.parent;s._searchMarker=null,s._hasFormatting=!0}delete(e){}gc(e){}write(e,n){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}const RF=t=>new Bt(t.readKey(),t.readJSON());class Wi{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Wi(this.arr)}splice(e){const n=new Wi(this.arr.slice(e));return this.arr=this.arr.slice(0,e),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){const s=this.arr.length;e.writeLen(s-n);for(let r=n;r<s;r++){const a=this.arr[r];e.writeString(a===void 0?"undefined":JSON.stringify(a))}}getRef(){return 2}}const OF=t=>{const e=t.readLen(),n=[];for(let s=0;s<e;s++){const r=t.readString();r==="undefined"?n.push(void 0):n.push(JSON.parse(r))}return new Wi(n)},PF=Ii("node_env")==="development";class gs{constructor(e){this.arr=e,PF&&Ch(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new gs(this.arr)}splice(e){const n=new gs(this.arr.slice(e));return this.arr=this.arr.slice(0,e),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){const s=this.arr.length;e.writeLen(s-n);for(let r=n;r<s;r++){const a=this.arr[r];e.writeAny(a)}}getRef(){return 8}}const IF=t=>{const e=t.readLen(),n=[];for(let s=0;s<e;s++)n.push(t.readAny());return new gs(n)};class xn{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new xn(this.str)}splice(e){const n=new xn(this.str.slice(e));this.str=this.str.slice(0,e);const s=this.str.charCodeAt(e-1);return s>=55296&&s<=56319&&(this.str=this.str.slice(0,e-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(e){return this.str+=e.str,!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const MF=t=>new xn(t.readString()),_F=[gF,yF,EF,vF,xF,AF,jF],$F=0,zF=1,UF=2,HF=3,VF=4,qF=5,WF=6;class jn{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new jn(this.type._copy())}splice(e){throw mn()}mergeWith(e){return!1}integrate(e,n){this.type._integrate(e.doc,n)}delete(e){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(e.beforeState.get(n.id.client)||0)&&e._mergeStructs.push(n):n.delete(e),n=n.right;this.type._map.forEach(s=>{s.deleted?s.id.clock<(e.beforeState.get(s.id.client)||0)&&e._mergeStructs.push(s):s.delete(e)}),e.changed.delete(this.type)}gc(e){let n=this.type._start;for(;n!==null;)n.gc(e,!0),n=n.right;this.type._start=null,this.type._map.forEach(s=>{for(;s!==null;)s.gc(e,!0),s=s.left}),this.type._map=new Map}write(e,n){this.type._write(e)}getRef(){return 7}}const KF=t=>new jn(_F[t.readTypeRef()](t)),Io=(t,e)=>{let n=e,s=0,r;do s>0&&(n=_e(n.client,n.clock+s)),r=$s(t,n),s=n.clock-r.id.clock,n=r.redone;while(n!==null&&r instanceof it);return{item:r,diff:s}},Ic=(t,e)=>{for(;t!==null&&t.keep!==e;)t.keep=e,t=t.parent._item},Ki=(t,e,n)=>{const{client:s,clock:r}=e.id,a=new it(_e(s,r+n),e,_e(s,r+n-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(n));return e.deleted&&a.markDeleted(),e.keep&&(a.keep=!0),e.redone!==null&&(a.redone=_e(e.redone.client,e.redone.clock+n)),e.right=a,a.right!==null&&(a.right.left=a),t._mergeStructs.push(a),a.parentSub!==null&&a.right===null&&a.parent._map.set(a.parentSub,a),e.length=n,a},ju=(t,e)=>lc(t,n=>Wr(n.deletions,e)),Tf=(t,e,n,s,r,a)=>{const o=t.doc,c=o.store,l=o.clientID,u=e.redone;if(u!==null)return Xt(t,u);let d=e.parent._item,h=null,p;if(d!==null&&d.deleted===!0){if(d.redone===null&&(!n.has(d)||Tf(t,d,n,s,r,a)===null))return null;for(;d.redone!==null;)d=Xt(t,d.redone)}const m=d===null?e.parent:d.content.type;if(e.parentSub===null){for(h=e.left,p=e;h!==null;){let w=h;for(;w!==null&&w.parent._item!==d;)w=w.redone===null?null:Xt(t,w.redone);if(w!==null&&w.parent._item===d){h=w;break}h=h.left}for(;p!==null;){let w=p;for(;w!==null&&w.parent._item!==d;)w=w.redone===null?null:Xt(t,w.redone);if(w!==null&&w.parent._item===d){p=w;break}p=p.right}}else{if(p=null,e.right&&!r){for(h=e;h!==null&&h.right!==null&&(h.right.redone||Wr(s,h.right.id)||ju(a.undoStack,h.right.id)||ju(a.redoStack,h.right.id));)for(h=h.right;h.redone;)h=Xt(t,h.redone);if(h&&h.right!==null)return null}else h=m._map.get(e.parentSub)||null;h!==null&&h.parent._item!==d&&(h=m._map.get(e.parentSub)||null)}const D=jt(c,l),C=_e(l,D),b=new it(C,h,h&&h.lastId,p,p&&p.id,m,e.parentSub,e.content.copy());return e.redone=C,Ic(b,!0),b.integrate(t,0),b};class it extends Pc{constructor(e,n,s,r,a,o,c,l){super(e,l.getLength()),this.origin=s,this.left=n,this.right=r,this.rightOrigin=a,this.parent=o,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?ru:0}set marker(e){(this.info&Ua)>0!==e&&(this.info^=Ua)}get marker(){return(this.info&Ua)>0}get keep(){return(this.info&su)>0}set keep(e){this.keep!==e&&(this.info^=su)}get countable(){return(this.info&ru)>0}get deleted(){return(this.info&za)>0}set deleted(e){this.deleted!==e&&(this.info^=za)}markDeleted(){this.info|=za}getMissing(e,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=jt(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=jt(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===_s&&this.id.client!==this.parent.client&&this.parent.clock>=jt(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=bu(e,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Xt(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===cn||this.right&&this.right.constructor===cn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===it?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===it&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===_s){const s=$s(n,this.parent);s.constructor===cn?this.parent=null:this.parent=s.content.type}return null}integrate(e,n){if(n>0&&(this.id.clock+=n,this.left=bu(e,e.doc.store,_e(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let s=this.left,r;if(s!==null)r=s.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const a=new Set,o=new Set;for(;r!==null&&r!==this.right;){if(o.add(r),a.add(r),Rs(this.origin,r.origin)){if(r.id.client<this.id.client)s=r,a.clear();else if(Rs(this.rightOrigin,r.rightOrigin))break}else if(r.origin!==null&&o.has($s(e.doc.store,r.origin)))a.has($s(e.doc.store,r.origin))||(s=r,a.clear());else break;r=r.right}this.left=s}if(this.left!==null){const s=this.left.right;this.right=s,this.left.right=this}else{let s;if(this.parentSub!==null)for(s=this.parent._map.get(this.parentSub)||null;s!==null&&s.left!==null;)s=s.left;else s=this.parent._start,this.parent._start=this;this.right=s}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),uf(e.doc.store,this),this.content.integrate(e,this),Cu(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new cn(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:_e(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Rs(e.origin,this.lastId)&&this.right===e&&Rs(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){const n=this.parent._searchMarker;return n&&n.forEach(s=>{s.p===e&&(s.p=this,!this.deleted&&this.countable&&(s.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),Mr(e.deleteSet,this.id.client,this.id.clock,this.length),Cu(e,n,this.parentSub),this.content.delete(e)}}gc(e,n){if(!this.deleted)throw sn();this.content.gc(e),n?Xb(e,this,new cn(this.id,this.length)):this.content=new zr(this.length)}write(e,n){const s=n>0?_e(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,a=this.parentSub,o=this.content.getRef()&ea|(s===null?0:tn)|(r===null?0:In)|(a===null?0:Nr);if(e.writeInfo(o),s!==null&&e.writeLeftID(s),r!==null&&e.writeRightID(r),s===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=of(c);e.writeParentInfo(!0),e.writeString(u)}else e.writeParentInfo(!1),e.writeLeftID(l.id)}else c.constructor===String?(e.writeParentInfo(!0),e.writeString(c)):c.constructor===_s?(e.writeParentInfo(!1),e.writeLeftID(c)):sn();a!==null&&e.writeString(a)}this.content.write(e,n)}}const Bf=(t,e)=>GF[e&ea](t),GF=[()=>{sn()},BF,OF,TF,MF,LF,RF,KF,IF,NF,()=>{sn()}],YF=10;class ln extends Pc{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,n){sn()}write(e,n){e.writeInfo(YF),be(e.restEncoder,this.length-n)}getMissing(e,n){return null}}const Nf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},Lf="__ $YJS$ __";Nf[Lf]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");Nf[Lf]=!0;const Rf=new Map;class XF{constructor(e){this.room=e,this.onmessage=null,this._onChange=n=>n.key===e&&this.onmessage!==null&&this.onmessage({data:Ty(n.newValue||"")}),oy(this._onChange)}postMessage(e){bh.setItem(this.room,Sy(xy(e)))}close(){cy(this._onChange)}}const JF=typeof BroadcastChannel>"u"?XF:BroadcastChannel,Mc=t=>kn(Rf,t,()=>{const e=Qn(),n=new JF(t);return n.onmessage=s=>e.forEach(r=>r(s.data,"broadcastchannel")),{bc:n,subs:e}}),ZF=(t,e)=>(Mc(t).subs.add(e),e),QF=(t,e)=>{const n=Mc(t),s=n.subs.delete(e);return s&&n.subs.size===0&&(n.bc.close(),Rf.delete(t)),s},Ls=(t,e,n=null)=>{const s=Mc(t);s.bc.postMessage(e),s.subs.forEach(r=>r(e,n))},Of=0,_c=1,Pf=2,Gi=(t,e)=>{be(t,Of);const n=Vb(e);wt(t,n)},If=(t,e,n)=>{be(t,_c),wt(t,Sc(e,n))},eC=(t,e,n)=>If(e,n,Ut(t)),Mf=(t,e,n,s)=>{try{nf(e,Ut(t),n)}catch(r){s?.(r),console.error("Caught error while handling a Yjs update",r)}},tC=(t,e)=>{be(t,Pf),wt(t,e)},nC=Mf,sC=(t,e,n,s,r)=>{const a=Be(t);switch(a){case Of:eC(t,e,n);break;case _c:Mf(t,n,s,r);break;case Pf:nC(t,n,s,r);break;default:throw new Error("Unknown message type")}return a},rC=0,iC=(t,e,n)=>{Be(t)===rC&&n(e,ht(t))},Xa=3e4;class aC extends hh{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=es();this.getLocalState()!==null&&Xa/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((r,a)=>{a!==this.clientID&&Xa<=n-r.lastUpdated&&this.states.has(a)&&s.push(a)}),s.length>0&&$c(this,s,"timeout")},pn(Xa/10)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){const n=this.clientID,s=this.meta.get(n),r=s===void 0?0:s.clock+1,a=this.states.get(n);e===null?this.states.delete(n):this.states.set(n,e),this.meta.set(n,{clock:r,lastUpdated:es()});const o=[],c=[],l=[],u=[];e===null?u.push(n):a==null?e!=null&&o.push(n):(c.push(n),Is(a,e)||l.push(n)),(o.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:o,updated:l,removed:u},"local"]),this.emit("update",[{added:o,updated:c,removed:u},"local"])}setLocalStateField(e,n){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[e]:n})}getStates(){return this.states}}const $c=(t,e,n)=>{const s=[];for(let r=0;r<e.length;r++){const a=e[r];if(t.states.has(a)){if(t.states.delete(a),a===t.clientID){const o=t.meta.get(a);t.meta.set(a,{clock:o.clock+1,lastUpdated:es()})}s.push(a)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},n]),t.emit("update",[{added:[],updated:[],removed:s},n]))},Us=(t,e,n=t.states)=>{const s=e.length,r=Et();be(r,s);for(let a=0;a<s;a++){const o=e[a],c=n.get(o)||null,l=t.meta.get(o).clock;be(r,o),be(r,l),$t(r,JSON.stringify(c))}return et(r)},oC=(t,e,n)=>{const s=ss(e),r=es(),a=[],o=[],c=[],l=[],u=Be(s);for(let d=0;d<u;d++){const h=Be(s);let p=Be(s);const m=JSON.parse(ht(s)),D=t.meta.get(h),C=t.states.get(h),b=D===void 0?0:D.clock;(b<p||b===p&&m===null&&t.states.has(h))&&(m===null?h===t.clientID&&t.getLocalState()!=null?p++:t.states.delete(h):t.states.set(h,m),t.meta.set(h,{clock:p,lastUpdated:r}),D===void 0&&m!==null?a.push(h):D!==void 0&&m===null?l.push(h):m!==null&&(Is(m,C)||c.push(h),o.push(h)))}(a.length>0||c.length>0||l.length>0)&&t.emit("change",[{added:a,updated:c,removed:l},n]),(a.length>0||o.length>0||l.length>0)&&t.emit("update",[{added:a,updated:o,removed:l},n])},cC=t=>fy(t,(e,n)=>`${encodeURIComponent(n)}=${encodeURIComponent(e)}`).join("&"),us=0,_f=3,Hs=1,lC=2,Xr=[];Xr[us]=(t,e,n,s,r)=>{be(t,us);const a=sC(e,t,n.doc,n);s&&a===_c&&!n.synced&&(n.synced=!0)};Xr[_f]=(t,e,n,s,r)=>{be(t,Hs),wt(t,Us(n.awareness,Array.from(n.awareness.getStates().keys())))};Xr[Hs]=(t,e,n,s,r)=>{oC(n.awareness,Ut(e),n)};Xr[lC]=(t,e,n,s,r)=>{iC(e,n.doc,(a,o)=>uC(n,o))};const Su=3e4,uC=(t,e)=>console.warn(`Permission denied to access ${t.url}.
|
|
47
|
-
${e}`),$f=(t,e,n)=>{const s=ss(e),r=Et(),a=Be(s),o=t.messageHandlers[a];return o?o(r,s,t,n,a):console.error("Unable to compute message"),r},Mo=(t,e,n)=>{e===t.ws&&(t.emit("connection-close",[n,t]),t.ws=null,e.close(),t.wsconnecting=!1,t.wsconnected?(t.wsconnected=!1,t.synced=!1,$c(t.awareness,Array.from(t.awareness.getStates().keys()).filter(s=>s!==t.doc.clientID),t),t.emit("status",[{status:"disconnected"}])):t.wsUnsuccessfulReconnects++,setTimeout(zf,dc(S2(2,t.wsUnsuccessfulReconnects)*100,t.maxBackoffTime),t))},zf=t=>{if(t.shouldConnect&&t.ws===null){const e=new t._WS(t.url,t.protocols);e.binaryType="arraybuffer",t.ws=e,t.wsconnecting=!0,t.wsconnected=!1,t.synced=!1,e.onmessage=n=>{t.wsLastMessageReceived=es();const s=$f(t,new Uint8Array(n.data),!0);hc(s)>1&&e.send(et(s))},e.onerror=n=>{t.emit("connection-error",[n,t])},e.onclose=n=>{Mo(t,e,n)},e.onopen=()=>{t.wsLastMessageReceived=es(),t.wsconnecting=!1,t.wsconnected=!0,t.wsUnsuccessfulReconnects=0,t.emit("status",[{status:"connected"}]);const n=Et();if(be(n,us),Gi(n,t.doc),e.send(et(n)),t.awareness.getLocalState()!==null){const s=Et();be(s,Hs),wt(s,Us(t.awareness,[t.doc.clientID])),e.send(et(s))}},t.emit("status",[{status:"connecting"}])}},Ja=(t,e)=>{const n=t.ws;t.wsconnected&&n&&n.readyState===n.OPEN&&n.send(e),t.bcconnected&&Ls(t.bcChannel,e,t)};class dC extends uc{constructor(e,n,s,{connect:r=!0,awareness:a=new aC(s),params:o={},protocols:c=[],WebSocketPolyfill:l=WebSocket,resyncInterval:u=-1,maxBackoffTime:d=2500,disableBc:h=!1}={}){for(super();e[e.length-1]==="/";)e=e.slice(0,e.length-1);this.serverUrl=e,this.bcChannel=e+"/"+n,this.maxBackoffTime=d,this.params=o,this.protocols=c,this.roomname=n,this.doc=s,this._WS=l,this.awareness=a,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=h,this.wsUnsuccessfulReconnects=0,this.messageHandlers=Xr.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=r,this._resyncInterval=0,u>0&&(this._resyncInterval=setInterval(()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const p=Et();be(p,us),Gi(p,s),this.ws.send(et(p))}},u)),this._bcSubscriber=(p,m)=>{if(m!==this){const D=$f(this,new Uint8Array(p),!1);hc(D)>1&&Ls(this.bcChannel,et(D),this)}},this._updateHandler=(p,m)=>{if(m!==this){const D=Et();be(D,us),tC(D,p),Ja(this,et(D))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:p,updated:m,removed:D},C)=>{const b=p.concat(m).concat(D),w=Et();be(w,Hs),wt(w,Us(a,b)),Ja(this,et(w))},this._exitHandler=()=>{$c(this.awareness,[s.clientID],"app closed")},ts&&typeof process<"u"&&process.on("exit",this._exitHandler),a.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval(()=>{this.wsconnected&&Su<es()-this.wsLastMessageReceived&&Mo(this,this.ws,null)},Su/10),r&&this.connect()}get url(){const e=cC(this.params);return this.serverUrl+"/"+this.roomname+(e.length===0?"":"?"+e)}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){this._resyncInterval!==0&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),ts&&typeof process<"u"&&process.off("exit",this._exitHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;this.bcconnected||(ZF(this.bcChannel,this._bcSubscriber),this.bcconnected=!0);const e=Et();be(e,us),Gi(e,this.doc),Ls(this.bcChannel,et(e),this);const n=Et();be(n,us),If(n,this.doc),Ls(this.bcChannel,et(n),this);const s=Et();be(s,_f),Ls(this.bcChannel,et(s),this);const r=Et();be(r,Hs),wt(r,Us(this.awareness,[this.doc.clientID])),Ls(this.bcChannel,et(r),this)}disconnectBc(){const e=Et();be(e,Hs),wt(e,Us(this.awareness,[this.doc.clientID],new Map)),Ja(this,et(e)),this.bcconnected&&(QF(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),this.ws!==null&&Mo(this,this.ws,null)}connect(){this.shouldConnect=!0,!this.wsconnected&&this.ws===null&&(zf(this),this.connectBc())}}const Cs=t=>Gs((e,n)=>{t.onerror=s=>n(new Error(s.target.error)),t.onsuccess=s=>e(s.target.result)}),hC=(t,e)=>Gs((n,s)=>{const r=indexedDB.open(t);r.onupgradeneeded=a=>e(a.target.result),r.onerror=a=>s(gn(a.target.error)),r.onsuccess=a=>{const o=a.target.result;o.onversionchange=()=>{o.close()},n(o)}}),fC=t=>Cs(indexedDB.deleteDatabase(t)),mC=(t,e)=>e.forEach(n=>t.createObjectStore.apply(t,n)),br=(t,e,n="readwrite")=>{const s=t.transaction(e,n);return e.map(r=>wC(s,r))},Uf=(t,e)=>Cs(t.count(e)),pC=(t,e)=>Cs(t.get(e)),Hf=(t,e)=>Cs(t.delete(e)),gC=(t,e,n)=>Cs(t.put(e,n)),_o=(t,e)=>Cs(t.add(e)),DC=(t,e,n)=>Cs(t.getAll(e,n)),yC=(t,e,n)=>{let s=null;return CC(t,e,r=>(s=r,!1),n).then(()=>s)},bC=(t,e=null)=>yC(t,e,"prev"),FC=(t,e)=>Gs((n,s)=>{t.onerror=s,t.onsuccess=async r=>{const a=r.target.result;if(a===null||await e(a)===!1)return n();a.continue()}}),CC=(t,e,n,s="next")=>FC(t.openKeyCursor(e,s),r=>n(r.key)),wC=(t,e)=>t.objectStore(e),EC=(t,e)=>IDBKeyRange.upperBound(t,e),xC=(t,e)=>IDBKeyRange.lowerBound(t,e),Za="custom",Vf="updates",qf=500,Wf=(t,e=()=>{},n=()=>{})=>{const[s]=br(t.db,[Vf]);return DC(s,xC(t._dbref,!1)).then(r=>{t._destroyed||(e(s),nt(t.doc,()=>{r.forEach(a=>nf(t.doc,a))},t,!1),n(s))}).then(()=>bC(s).then(r=>{t._dbref=r+1})).then(()=>Uf(s).then(r=>{t._dbsize=r})).then(()=>s)},vC=(t,e=!0)=>Wf(t).then(n=>{(e||t._dbsize>=qf)&&_o(n,Sc(t.doc)).then(()=>Hf(n,EC(t._dbref,!0))).then(()=>Uf(n).then(s=>{t._dbsize=s}))});class kC extends hh{constructor(e,n){super(),this.doc=n,this.name=e,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=hC(e,s=>mC(s,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=Gs(s=>this.on("synced",()=>s(this))),this._db.then(s=>{this.db=s,Wf(this,o=>_o(o,Sc(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(s,r)=>{if(this.db&&r!==this){const[a]=br(this.db,[Vf]);_o(a,s),++this._dbsize>=qf&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{vC(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(e=>{e.close()})}clearData(){return this.destroy().then(()=>{fC(this.name)})}get(e){return this._db.then(n=>{const[s]=br(n,[Za],"readonly");return pC(s,e)})}set(e,n){return this._db.then(s=>{const[r]=br(s,[Za]);return gC(r,n,e)})}del(e){return this._db.then(n=>{const[s]=br(n,[Za]);return Hf(s,e)})}}const Tu=[["#1677c8","#1677c833"],["#d65745","#d6574533"],["#16866a","#16866a33"],["#9a58b5","#9a58b533"],["#d27b18","#d27b1833"],["#3f7d20","#3f7d2033"],["#be3e7b","#be3e7b33"],["#4964c6","#4964c633"],["#8a6a14","#8a6a1433"],["#087f8c","#087f8c33"]],Bu=4,Nu=5,AC=6,jC=7,SC=8,Qa=9,eo=3,TC=6e4,BC=720*60*60*1e3,NC=15e3,LC=5*6e4;function RC(t){if(!t||typeof t!="object")return null;const e=t,n=e.requestedBy;return typeof e.mainFile!="string"||typeof e.runId!="string"||!["queued","running","succeeded","failed","cleaned"].includes(e.status??"")||e.status==="cleaned"&&e.cleanMode!=="cache"&&e.cleanMode!=="artifacts"||e.stale!==void 0&&typeof e.stale!="boolean"||typeof e.updatedAt!="string"||!n||typeof n.id!="string"||typeof n.username!="string"||typeof n.name!="string"?null:e}function Lu(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e={};for(const[n,s]of Object.entries(t)){const r=RC(s);r&&r.mainFile===n&&(e[n]=r)}return e}function OC(t,e,n){return t<=n&&e<=n}function Ru(t,e,n){const s=r=>r>0&&n-r<=LC;return{recoverable:t.some(r=>r.tabId===e||!s(r.activeAt)),otherActive:t.some(r=>r.tabId!==e&&s(r.activeAt))}}class PC{constructor(e,n){this.projectId=e,this.user=n;const s=window.location.protocol==="https:"?"wss:":"ws:";this.draftTabId=$C(`texlite:collaboration-tab:${n.id}:${e}`);const r=this.readOwnWritableDraftMarker();this.draftGeneration=r?.generation??0,this.draftUpdatedAt=r?.updatedAt??0,this.draftMarkerPresent=r!==null,this.markDraftTabInactive=()=>this.setOwnDraftActivity(!1),this.markDraftTabActive=()=>this.resumeOwnDraftActivity(),window.addEventListener("pagehide",this.markDraftTabInactive),window.addEventListener("pageshow",this.markDraftTabActive),r&&(this.setOwnDraftActivity(!0),this.startDraftHeartbeat()),this.persistence=new kC(`texlite:${n.id}:${e}`,this.doc),this.localDraftTransactionObserver=o=>{if(o.local){for(const[c,l]of this.doc.share)if(c.startsWith("source:")&&(o.changed.has(l)||o.changedParentTypes.has(l))){this.markWritableDraft();return}}},this.doc.on("afterTransaction",this.localDraftTransactionObserver),this.persistence.on("synced",()=>{this.localDraftReady=!0;for(const o of this.draftListeners)o()}),this.provider=new dC(`${s}//${window.location.host}/api/collaboration`,e,this.doc,{connect:!1,disableBc:!0,maxBackoffTime:2500}),this.awareness=this.provider.awareness;const a=this.doc.getMap("texlite:meta");this.metaObserver=(o,c)=>{c.origin===this.provider&&o.keysChanged.has("compileStates")&&(this.authoritativeCompileStates=null,this.notifyCompileStateListeners())},a.observe(this.metaObserver),this.provider.messageHandlers[Bu]=(o,c)=>{const l=ht(c),u=this.flushRequests.get(l);if(!u)return;const d=Be(c)===1,h=Be(c),p=ht(c),m=Be(c),D=[];for(let C=0;C<m;C++)D.push(ht(c));if(window.clearTimeout(u.timer),this.flushRequests.delete(l),d)this.clearOwnWritableDraftMarker(u.draftGeneration),u.resolve({revision:h,persistedAt:p,ok:!0,failedPaths:[]});else{const C=Object.assign(new Error(D.length?`保存失败:${D.join(", ")}`:"源码保存到服务器磁盘失败"),{failedPaths:D});u.reject(C)}},this.provider.messageHandlers[Nu]=(o,c)=>{const l=ht(c),u=this.epochStorageKey(),d=Ou(u),h=/^([0-9]+):/.exec(l)?.[1]??null,p=d?/^([0-9]+):/.exec(d)?.[1]??null:null,m=!this.epoch&&h===String(eo)&&p!==null&&p!==h;if((this.epoch&&this.epoch!==l||d&&d!==l)&&!m){this.provider.disconnect(),this.rejectFlushes(new Error("Collaboration state changed"));const x=l.endsWith(":reload")||h!==null&&h!==String(eo),N=()=>{to(u,l.replace(/:reload$/,"")),window.location.reload()};if(x)for(const L of this.protocolUpgradeListeners)L();else this.persistence.clearData().then(()=>{this.clearWritableDraftMarkers(),N()});return}this.epoch=l,to(u,l);const D=this.provider.ws;if(!D||D.readyState!==WebSocket.OPEN)return;const C=Et();be(C,Nu),$t(C,l),be(C,eo),D.send(et(C));const b=Et();be(b,0),Gi(b,this.doc),D.send(et(b));const w=Et();be(w,1),wt(w,Us(this.awareness,[this.doc.clientID])),D.send(et(w))},this.provider.messageHandlers[jC]=(o,c)=>{const l=ht(c),u=ht(c);if(l!==this.user.id)return;if(u==="revoked"){this.rejectFlushes(new Error("Project access revoked")),this.provider.disconnect();for(const h of this.permissionListeners)h("revoked",this.permission);return}if(u!=="read"&&u!=="edit"&&u!=="owner")return;const d=this.permission;if(this.setPermission(u),d!==u){u==="read"&&this.rejectFlushes(new Error("Project permission changed to read-only"));for(const h of this.permissionListeners)h(u,d)}},this.provider.messageHandlers[AC]=(o,c)=>{ht(c)},this.provider.messageHandlers[SC]=(o,c)=>{let l={};try{l=Lu(JSON.parse(ht(c)))}catch{}this.authoritativeCompileStates=l,this.notifyCompileStateListeners()},this.provider.messageHandlers[Qa]=(o,c)=>{const l=ht(c),u=ht(c),d=ht(c),h=ht(c),p=ht(c),m=ht(c);if(l==="state"){const C=To(c)?ht(c):"",b=To(c)?ht(c):"",w=Number(p);if(!C||!Number.isFinite(w)||w<=Date.now())this.removeFormatLeaseState(d),this.notifyFormatLeaseListeners(null);else{const x={path:d,holderUserId:C,holderName:b,expiresAt:w};this.formatLeaseStatesByPath.set(d,x);const N=this.formatLeaseExpiryTimers.get(d);N!==void 0&&window.clearTimeout(N);const L=window.setTimeout(()=>{const T=this.formatLeaseStatesByPath.get(d);!T||T.expiresAt>Date.now()||(this.removeFormatLeaseState(d),this.notifyFormatLeaseListeners(null))},Math.max(0,w-Date.now())+25);this.formatLeaseExpiryTimers.set(d,L),this.notifyFormatLeaseListeners(x)}return}const D=this.formatLeaseRequests.get(u);D&&(window.clearTimeout(D.timer),this.formatLeaseRequests.delete(u),l==="denied"?D.reject(new Error(m||"Format lease request was denied")):D.resolve({status:l,filePath:d,token:h,expiresAt:Number(p)}))},this.provider.on("status",({status:o})=>{o==="disconnected"&&(this.authoritativeCompileStates=null,this.notifyCompileStateListeners(),this.rejectFlushes(new Error("Collaboration connection closed")),this.rejectFormatLeaseRequests(new Error("Collaboration connection closed")),this.clearFormatLeaseStates())}),this.updateLocalAwareness()}projectId;user;doc=new bs;provider;awareness;persistence;permission="read";activeFile="";epoch=null;destroyed=!1;localDraftReady=!1;draftListeners=new Set;permissionListeners=new Set;protocolUpgradeListeners=new Set;compileStateListeners=new Set;flushRequests=new Map;formatLeaseRequests=new Map;formatLeaseListeners=new Set;formatLeaseStatesByPath=new Map;formatLeaseExpiryTimers=new Map;draftTabId;draftGeneration=0;draftUpdatedAt=0;draftMarkerPresent=!1;draftHeartbeatTimer=null;markDraftTabInactive;markDraftTabActive;undoManagers=new Map;authoritativeCompileStates=null;metaObserver;localDraftTransactionObserver;connect(){this.destroyed||(this.provider.connect(),this.updateLocalAwareness())}getText(e){return this.doc.getText(`source:${e}`)}getUndoManager(e){const n=this.undoManagers.get(e);if(n)return n;const s=new tF(this.getText(e));return this.undoManagers.set(e,s),s}applyTextEdits(e,n){if(this.permission==="read")throw new Error("Read-only collaborators cannot edit source files");const s=this.getText(e);let r=0;for(const a of n){if(!Number.isInteger(a.from)||!Number.isInteger(a.to)||a.from<r||a.to<a.from||a.to>s.length)throw new RangeError("Invalid collaborative text edits");r=a.to}this.doc.transact(()=>{for(let a=n.length-1;a>=0;a-=1){const o=n[a];o.to>o.from&&s.delete(o.from,o.to-o.from),o.replacement&&s.insert(o.from,o.replacement)}})}get meta(){return this.doc.getMap("texlite:meta")}compileStates(){return this.authoritativeCompileStates??Lu(this.meta.get("compileStates"))}onCompileStates(e){return this.compileStateListeners.add(e),()=>this.compileStateListeners.delete(e)}get synced(){return this.provider.synced}get connected(){return this.provider.wsconnected}get draftReady(){return this.localDraftReady}get currentPermission(){return this.permission}onDraftReady(e){return this.draftListeners.add(e),this.localDraftReady&&e(),()=>this.draftListeners.delete(e)}onPermissionChanged(e){return this.permissionListeners.add(e),()=>this.permissionListeners.delete(e)}onProtocolUpgrade(e){return this.protocolUpgradeListeners.add(e),()=>this.protocolUpgradeListeners.delete(e)}async discardLocalDraft(){return this.hasOtherWritableDraft?!1:(await this.persistence.clearData(),this.localDraftReady=!1,this.clearWritableDraftMarkers(),!0)}get hasWritableDraft(){const e=this.readWritableDraftMarkers();return Ru(e.map(({tabId:n,marker:s})=>({tabId:n,activeAt:s.activeAt})),this.draftTabId,Date.now()).recoverable}get hasOtherWritableDraft(){const e=this.readWritableDraftMarkers();return Ru(e.map(({tabId:n,marker:s})=>({tabId:n,activeAt:s.activeAt})),this.draftTabId,Date.now()).otherActive}setPermission(e,n=!1){const s=this.permission;if(this.permission=e,e==="read"&&(s!=="read"&&this.rejectFlushes(new Error("Project permission changed to read-only")),this.destroyUndoManagers(),this.clearFormatLeaseStates()),this.updateLocalAwareness(),n&&s!==e)for(const r of this.permissionListeners)r(e,s)}setActiveFile(e){this.activeFile!==e&&(this.activeFile=e,this.awareness.setLocalStateField("cursor",null),this.updateLocalAwareness())}sessions(){const e=[];return this.awareness.getStates().forEach((n,s)=>{const r=n?.user;!r||typeof r.id!="string"||typeof r.name!="string"||e.push({clientId:s,userId:r.id,username:typeof r.username=="string"?r.username:r.name,name:r.name,color:typeof r.color=="string"?r.color:"#1677c8",colorLight:typeof r.colorLight=="string"?r.colorLight:"#1677c833",permission:r.permission==="owner"||r.permission==="edit"?r.permission:"read",filePath:typeof n.filePath=="string"?n.filePath:"",editing:!!n.cursor,local:s===this.doc.clientID})}),e.sort((n,s)=>Number(s.local)-Number(n.local)||n.name.localeCompare(s.name))}flush(){const e=this.provider.ws;if(!this.provider.synced||!e||e.readyState!==WebSocket.OPEN)return Promise.reject(new Error("Collaboration connection is unavailable"));const n=crypto.randomUUID(),s=this.draftGeneration,r=Et();return be(r,Bu),$t(r,n),new Promise((a,o)=>{const c=window.setTimeout(()=>{this.flushRequests.delete(n),o(new Error("Collaboration save timed out"))},5e3);this.flushRequests.set(n,{resolve:a,reject:o,timer:c,draftGeneration:s}),e.send(et(r))})}onFormatLeaseState(e){this.formatLeaseListeners.add(e);for(const n of this.formatLeaseStatesByPath.values())e(n);return()=>this.formatLeaseListeners.delete(e)}formatLeaseStates(){const e=Date.now();for(const[n,s]of this.formatLeaseStatesByPath)s.expiresAt<=e&&this.removeFormatLeaseState(n);return[...this.formatLeaseStatesByPath.values()]}async acquireFormatLease(e){if(this.permission==="read")throw new Error("Formatting requires write permission");const n=await this.requestFormatLease("acquire",e);if(n.status!=="grant"||!n.token||!Number.isFinite(n.expiresAt))throw new Error("Format lease was not granted");let s=n.token,r=n.expiresAt,a=!1;const o=async()=>{if(a)throw new Error("Format lease has already been released");const l=await this.requestFormatLease("renew",e,s);if(l.status!=="renewed"||!Number.isFinite(l.expiresAt))throw new Error("Format lease renewal failed");s=l.token||s,r=l.expiresAt};return{path:e,get token(){return s},get expiresAt(){return r},confirm:o,renew:o,release:async()=>{if(a)return;a=!0;const l=this.provider.ws;if(!(!l||l.readyState!==WebSocket.OPEN))try{await this.requestFormatLease("release",e,s)}catch{}}}}reconnect(){this.destroyed||(this.rejectFlushes(new Error("Collaboration connection reset")),this.provider.disconnect(),this.provider.connect(),this.updateLocalAwareness())}destroy(){this.destroyed=!0,this.setOwnDraftActivity(!1),this.stopDraftHeartbeat(),window.removeEventListener("pagehide",this.markDraftTabInactive),window.removeEventListener("pageshow",this.markDraftTabActive),this.rejectFlushes(new Error("Collaboration connection closed")),this.provider.destroy(),this.persistence.destroy(),this.draftListeners.clear(),this.protocolUpgradeListeners.clear(),this.compileStateListeners.clear(),this.rejectFormatLeaseRequests(new Error("Collaboration connection closed")),this.clearFormatLeaseStates(),this.formatLeaseListeners.clear(),this.meta.unobserve(this.metaObserver),this.doc.off("afterTransaction",this.localDraftTransactionObserver),this.destroyUndoManagers(),this.doc.destroy()}destroyUndoManagers(){for(const e of this.undoManagers.values())e.destroy();this.undoManagers.clear()}notifyCompileStateListeners(){for(const e of this.compileStateListeners)e()}rejectFlushes(e){for(const n of this.flushRequests.values())window.clearTimeout(n.timer),n.reject(e);this.flushRequests.clear()}requestFormatLease(e,n,s=""){const r=this.provider.ws;if(!this.provider.synced||!r||r.readyState!==WebSocket.OPEN)return Promise.reject(new Error("Collaboration connection is unavailable"));const a=crypto.randomUUID(),o=Et();return be(o,Qa),$t(o,e),$t(o,a),$t(o,n),$t(o,s),new Promise((c,l)=>{const u=window.setTimeout(()=>{if(this.formatLeaseRequests.delete(a),e==="acquire"){const d=this.provider.ws;if(d?.readyState===WebSocket.OPEN){const h=Et();be(h,Qa),$t(h,"cancel"),$t(h,a),$t(h,n),$t(h,""),d.send(et(h))}}l(new Error("Format lease request timed out"))},e==="acquire"?TC:5e3);this.formatLeaseRequests.set(a,{resolve:c,reject:l,timer:u}),r.send(et(o))})}rejectFormatLeaseRequests(e){for(const n of this.formatLeaseRequests.values())window.clearTimeout(n.timer),n.reject(e);this.formatLeaseRequests.clear()}clearFormatLeaseStates(){for(const e of this.formatLeaseExpiryTimers.values())window.clearTimeout(e);this.formatLeaseExpiryTimers.clear(),this.formatLeaseStatesByPath.size&&(this.formatLeaseStatesByPath.clear(),this.notifyFormatLeaseListeners(null))}removeFormatLeaseState(e){const n=this.formatLeaseExpiryTimers.get(e);n!==void 0&&window.clearTimeout(n),this.formatLeaseExpiryTimers.delete(e),this.formatLeaseStatesByPath.delete(e)}notifyFormatLeaseListeners(e){for(const n of this.formatLeaseListeners)n(e)}updateLocalAwareness(){const[e,n]=Tu[Math.abs(this.doc.clientID)%Tu.length];this.awareness.setLocalStateField("user",{id:this.user.id,username:this.user.username,name:this.user.displayName,color:e,colorLight:n,permission:this.permission,sessionId:String(this.doc.clientID)}),this.awareness.setLocalStateField("filePath",this.activeFile)}epochStorageKey(){return`texlite:collaboration-epoch:${this.user.id}:${this.projectId}`}writableDraftStoragePrefix(){return`texlite:collaboration-writable:${this.user.id}:${this.projectId}:`}ownWritableDraftStorageKey(){return`${this.writableDraftStoragePrefix()}${this.draftTabId}`}markWritableDraft(){this.draftGeneration+=1,this.draftUpdatedAt=Date.now(),this.draftMarkerPresent||this.writeOwnWritableDraftMarker(!0),this.startDraftHeartbeat()}clearWritableDraftMarkers(){for(const{key:e}of this.readWritableDraftMarkers())gr(e);this.draftMarkerPresent=!1,this.stopDraftHeartbeat(),gr(this.writableDraftStoragePrefix().slice(0,-1))}clearOwnWritableDraftMarker(e){const n=this.readOwnWritableDraftMarker();!n||!OC(n.generation,this.draftGeneration,e)||(gr(this.ownWritableDraftStorageKey()),this.draftMarkerPresent=!1,this.stopDraftHeartbeat())}readOwnWritableDraftMarker(){return this.readWritableDraftMarker(this.ownWritableDraftStorageKey())}readWritableDraftMarkers(){const e=this.writableDraftStoragePrefix(),n=[];for(const s of IC()){if(!s.startsWith(e))continue;const r=this.readWritableDraftMarker(s);r&&n.push({key:s,tabId:s.slice(e.length),marker:r})}return n}readWritableDraftMarker(e){const n=Ou(e);if(!n)return null;try{const s=JSON.parse(n);if(!s||typeof s!="object"||Array.isArray(s))return null;const r=s,a=Date.now();if(!Number.isInteger(r.generation)||(r.generation??0)<0||typeof r.updatedAt!="number"||!Number.isFinite(r.updatedAt)||r.updatedAt<=0||a-r.updatedAt>BC)return gr(e),null;const o=typeof r.activeAt=="number"&&Number.isFinite(r.activeAt)?Math.max(0,r.activeAt):0;return{generation:r.generation,updatedAt:r.updatedAt,activeAt:o}}catch{return gr(e),null}}writeOwnWritableDraftMarker(e){if(!this.draftMarkerPresent&&this.draftUpdatedAt<=0)return;const n={generation:this.draftGeneration,updatedAt:this.draftUpdatedAt||Date.now(),activeAt:e?Date.now():0};to(this.ownWritableDraftStorageKey(),JSON.stringify(n)),this.draftMarkerPresent=!0}setOwnDraftActivity(e){this.draftMarkerPresent&&(this.writeOwnWritableDraftMarker(e),e?this.startDraftHeartbeat():this.stopDraftHeartbeat())}resumeOwnDraftActivity(){const e=this.readOwnWritableDraftMarker();if(!e){this.draftMarkerPresent=!1,this.stopDraftHeartbeat();return}this.draftGeneration=Math.max(this.draftGeneration,e.generation),this.draftUpdatedAt=e.updatedAt,this.draftMarkerPresent=!0,this.setOwnDraftActivity(!0)}startDraftHeartbeat(){this.draftHeartbeatTimer!==null||!this.draftMarkerPresent||(this.draftHeartbeatTimer=window.setInterval(()=>{this.writeOwnWritableDraftMarker(!0)},NC))}stopDraftHeartbeat(){this.draftHeartbeatTimer!==null&&(window.clearInterval(this.draftHeartbeatTimer),this.draftHeartbeatTimer=null)}}function Ou(t){try{return window.localStorage.getItem(t)}catch{return null}}function to(t,e){try{window.localStorage.setItem(t,e)}catch{}}function gr(t){try{window.localStorage.removeItem(t)}catch{}}function IC(){try{const t=[];for(let e=0;e<window.localStorage.length;e+=1){const n=window.localStorage.key(e);n&&t.push(n)}return t}catch{return[]}}function MC(t){try{return window.sessionStorage.getItem(t)}catch{return null}}function _C(t,e){try{window.sessionStorage.setItem(t,e)}catch{}}function $C(t){const e=MC(t);if(e)return e;const n=typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`;return _C(t,n),n}function zC(t,e){return Array.from(t.trim()||e.trim()||"?")[0]?.toLocaleUpperCase()??"?"}function UC(t){if(!t||typeof t!="object")return!1;const e=t;return(e.kind==="update"||e.kind==="move"||e.kind==="delete")&&typeof e.revision=="string"}function HC(t,e,n,s,r,a){const[o]=f.useState(()=>new PC(t,e)),[c,l]=f.useState("connecting"),[u,d]=f.useState(!1),[h,p]=f.useState([]),[m,D]=f.useState(null),[C,b]=f.useState(null),[w,x]=f.useState(""),[N,L]=f.useState(""),[T,_]=f.useState([]),[$,O]=f.useState(!1),[J,z]=f.useState(s),[ae,M]=f.useState(null),[K,R]=f.useState(!1),A=f.useRef(n),P=f.useRef(a),pe=f.useRef(r);A.current=n,P.current=a,pe.current=r,f.useEffect(()=>{const v=o.compileStates();D(v[n]??null)},[n,o]),f.useEffect(()=>{const v=()=>p(o.sessions()),ue=()=>{d(!1),p([]),D(null),b(null),x(""),L(""),_([]),P.current()},Z=({status:Le})=>{l(Le),Le!=="connected"&&ue()},Y=Le=>{d(Le),Le||ue()},ce=()=>{l("disconnected"),ue()},I=()=>{const Le=o.meta.get("filesEvent");UC(Le)&&b(Le);const Ie=o.meta.get("commentsRevision");typeof Ie=="string"&&x(Ie);const yt=o.meta.get("dictionaryRevision");typeof yt=="string"&&L(yt);const ot=o.compileStates();D(ot[A.current]??null)},ie=()=>{const Le=o.compileStates();D(Le[A.current]??null)};o.awareness.on("change",v),o.provider.on("status",Z),o.provider.on("sync",Y),o.provider.on("connection-close",ce),o.provider.on("connection-error",ce),o.meta.observe(I);const j=o.onCompileStates(ie),me=o.onProtocolUpgrade(()=>{R(!0),l("disconnected"),ue()}),Ee=()=>_(o.formatLeaseStates()),tt=o.onFormatLeaseState(Ee),Dt=()=>{if(!pe.current||o.currentPermission!=="read")return;const Le=o.hasWritableDraft,Ie=o.hasOtherWritableDraft;!Le&&!Ie||M({previous:"edit",localDraftReady:Le,otherTabDraft:Ie})},Ye=o.onDraftReady(()=>{O(!0),Dt()}),Me=o.onPermissionChanged((Le,Ie)=>{if(Le==="revoked"){l("disconnected"),d(!1),P.current();return}z(Le),Le==="read"&&Ie!=="read"?M({previous:Ie,localDraftReady:o.hasWritableDraft,otherTabDraft:o.hasOtherWritableDraft}):Le!=="read"&&M(null)});return v(),I(),l(o.connected?"connected":"connecting"),d(o.synced),()=>{o.awareness.off("change",v),o.provider.off("status",Z),o.provider.off("sync",Y),o.provider.off("connection-close",ce),o.provider.off("connection-error",ce),o.meta.unobserve(I),j(),me(),tt(),Ye(),Me(),o.destroy()}},[o]),f.useEffect(()=>{r&&o.connect()},[o,r]),f.useEffect(()=>{o.setPermission(s),z(s),r&&s==="read"&&(o.hasWritableDraft||o.hasOtherWritableDraft)?M({previous:"edit",localDraftReady:o.hasWritableDraft,otherTabDraft:o.hasOtherWritableDraft}):s!=="read"&&M(null)},[o,s,r]);const we=ae!==null;return f.useEffect(()=>{if(!we)return;const v=()=>{if(o.currentPermission!=="read")return;const Z=o.hasWritableDraft,Y=o.hasOtherWritableDraft;M(ce=>!ce||ce.localDraftReady===Z&&ce.otherTabDraft===Y?ce:{...ce,localDraftReady:Z,otherTabDraft:Y})};v();const ue=window.setInterval(v,2e3);return()=>window.clearInterval(ue)},[o,we]),{collaboration:o,status:c,synced:u,activeSessions:h,compileState:m,setCompileState:D,formatLeaseStates:T,filesEvent:C,commentsRevision:w,dictionaryRevision:N,localDraftReady:$,permission:J,protocolUpgradeRequired:K,reconnect:()=>{K||(l("connecting"),d(!1),p([]),D(null),_([]),o.reconnect())},permissionDowngrade:ae,dismissPermissionDowngrade:()=>M(null),discardLocalDraft:async()=>await o.discardLocalDraft()?(M(null),window.location.reload(),!0):(M(ue=>ue&&{...ue,otherTabDraft:!0}),!1)}}function Pu(t){return t?.status==="succeeded"?"succeeded":t?.log.includes("Compilation was cancelled.")?"cancelled":t?.status==="failed"?"failed":null}function as(t){return t instanceof Error&&t.name==="AbortError"}function VC(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement}function qC({projectId:t,project:e,mainFile:n,initialLatest:s,collaborationSynced:r,sharedState:a,onSharedState:o,save:c,loadOutline:l,onPreviewTab:u,onError:d,onCompileStart:h,onCompileSuccess:p,onPdfChanged:m}){const{t:D}=Qe(),[C,b]=f.useState(""),[w,x]=f.useState(!0),[N,L]=f.useState(null),[T,_]=f.useState("full"),[$,O]=f.useState(""),[J,z]=f.useState(null),[ae,M]=f.useState(null),[K,R]=f.useState([]),[A,P]=f.useState(null),[pe,we]=f.useState(!1),[Fe,Ne]=f.useState(!1),[Ce,v]=f.useState(()=>new Set),[ue,Z]=f.useState(()=>new Set),[Y,ce]=f.useState(""),I=f.useRef(n),ie=f.useRef(""),j=f.useRef(null),me=f.useRef(null),Ee=f.useRef(null),tt=f.useRef(s),Dt=f.useRef(!1),Ye=f.useRef(null),Me=f.useRef(null),Le=f.useRef(new Set),Ie=f.useRef(new Map),yt=f.useRef(null),ot=f.useRef(()=>{}),ye=f.useRef({onSharedState:o,save:c,loadOutline:l,onPreviewTab:u,onError:d,onCompileStart:h,onCompileSuccess:p,onPdfChanged:m});I.current=n,ye.current={onSharedState:o,save:c,loadOutline:l,onPreviewTab:u,onError:d,onCompileStart:h,onCompileSuccess:p,onPdfChanged:m};const It=G=>{yt.current!==G&&(yt.current=G,ye.current.onCompileSuccess())},he=async(G,De)=>{De||(Ye.current?.abort(),Ye.current=new AbortController,De=Ye.current.signal);try{const X=G?`?mainFile=${encodeURIComponent(G)}`:"",He=await te(`/api/projects/${t}/compile/artifacts${X}`,{signal:De});I.current===G&&(R(He.artifacts),P(null))}catch(X){!as(X)&&I.current===G&&(R([]),P(null))}finally{Ye.current?.signal===De&&(Ye.current=null)}};f.useEffect(()=>{if(j.current?.abort(),!n){x(!1),b(""),L(null),_("full"),O(""),z(null),M(null),R([]),P(null),Ee.current=null,ye.current.onPdfChanged();return}Ee.current?.mainFile!==n&&(Ee.current=null);const G=new AbortController;j.current=G,x(!0),O(""),z(null),M(null),C&&n&&ie.current===n||(b(""),L(null),_("full")),R([]),P(null),ye.current.onPdfChanged();let X=null;const He=`?mainFile=${encodeURIComponent(n)}`,Ve=Dt.current?null:tt.current;Ve&&(Dt.current=!0);const mt=()=>te(`/api/projects/${t}/compile/latest${He}`,{signal:G.signal}),ke=Ve?Ve.then(W=>W.mainFile!==n?mt():W,()=>mt()):mt();let xt=!1;const re=()=>{if(xt||G.signal.aborted||!n)return;xt=!0;const W=new AbortController;Le.current.add(W),he(n,W.signal).finally(()=>{Le.current.delete(W)}),ye.current.loadOutline(G.signal,n).catch(()=>{})};return ke.then(W=>{if(G.signal.aborted||n&&W.mainFile!==I.current)return;const pt=Ee.current;pt&&pt.mainFile===n&&W.latestRun?.id!==pt.runId||(O(W.latestRun?.log??""),z(W.latestRun?.diagnostics??null),M(Pu(W.latestRun)),n&&W.latestRun?.requestedBy&&(W.latestRun.status==="queued"||W.latestRun.status==="running")&&ye.current.onSharedState({mainFile:n,runId:W.latestRun.id,status:W.latestRun.status,requestedBy:W.latestRun.requestedBy,updatedAt:new Date().toISOString()}),W.pdfUrl&&(ie.current=W.mainFile,b(W.pdfUrl),L(W.pdfCompiledAt),_(W.pdfLoadingMode??"full"),ye.current.onPreviewTab("pdf")))}).catch(W=>{!as(W)&&I.current===n&&ye.current.onError(de(W))}).finally(()=>{j.current===G&&(j.current=null),G.signal.aborted||(x(!1),X=window.setTimeout(re,0))}),()=>{X!==null&&window.clearTimeout(X),G.abort(),Me.current?.abort();for(const W of Le.current)W.abort();Le.current.clear()}},[t,n]),f.useEffect(()=>{if(!(!a||a.mainFile!==n||a.status!=="cleaned"||!a.cleanMode)){j.current?.abort(),me.current?.abort(),Ye.current?.abort(),Me.current?.abort();for(const G of Le.current)G.abort();Le.current.clear(),a.cleanMode==="artifacts"?(Ee.current=null,O(""),z(null),M(null),b(""),L(null),_("full"),R([]),P(null),ye.current.onPdfChanged(),ye.current.onPreviewTab("pdf"),ce(D("editor.cleanArtifactsComplete"))):ce(D("editor.cleanCacheComplete"))}},[a?.runId,a?.status,a?.cleanMode,a?.mainFile,n,D]),f.useEffect(()=>{!n||a?.mainFile===n&&(a.status==="queued"||a.status==="running")||Z(G=>{if(!G.has(n))return G;const De=new Set(G);return De.delete(n),De})},[n,a?.mainFile,a?.status]),f.useEffect(()=>{if(!a||a.mainFile!==n||a.status!=="succeeded"&&a.status!=="failed")return;let G=!1;me.current?.abort(),Me.current?.abort();const De=new AbortController;return me.current=De,x(!0),te(`/api/projects/${t}/compile/latest?mainFile=${encodeURIComponent(n)}`,{signal:De.signal}).then(X=>{G||X.mainFile!==I.current||X.latestRun?.id!==a.runId||(O(X.latestRun.log),z(X.latestRun.diagnostics),M(Pu(X.latestRun)),a.status==="succeeded"&&a.stale&&ce(D("editor.compileSnapshotStale")),a.status==="succeeded"&&X.pdfUrl?(Ee.current={mainFile:n,runId:a.runId},ye.current.onPdfChanged(),b(X.pdfUrl),L(X.pdfCompiledAt),_(X.pdfLoadingMode??"full"),ye.current.onPreviewTab("pdf"),It(a.runId),he(n)):a.status==="failed"&&ye.current.onPreviewTab(X.latestRun.diagnostics.errors.length?"errors":"log"))}).catch(X=>{!as(X)&&!G&&ye.current.onError(de(X))}).finally(()=>{me.current===De&&(me.current=null),G||x(!1)}),()=>{G=!0,De.abort(),me.current===De&&(me.current=null)}},[a?.runId,a?.status,a?.mainFile,a?.stale,n,t,D]);const ve=async()=>{if(!e||!n||e.permission==="read"||!r||Ie.current.has(n)||a?.mainFile===n&&(a.status==="queued"||a.status==="running"))return;const G=n;v(X=>new Set([...X,G])),ye.current.onCompileStart(),ce(""),Me.current?.abort(),Me.current=null,O(""),z(null),M(null),ye.current.onPreviewTab(C?"pdf":"log");const De=new AbortController;Ie.current.set(G,De);try{if(!await ye.current.save())return;const X=await te(`/api/projects/${t}/compile`,{method:"POST",signal:De.signal,body:JSON.stringify({mainFile:G})});if(X.mainFile!==I.current)return;O(X.log),z(X.diagnostics),M(X.cancelled?"cancelled":X.ok?"succeeded":"failed"),X.cancelled&&ce(D("compileControls.cancelled")),X.skipped&&ce(D("editor.upToDate")),X.ok&&X.stale&&ce(D("editor.compileSnapshotStale")),X.pdfUrl?(X.ok&&(Ee.current={mainFile:G,runId:X.runId}),ye.current.onPdfChanged(),b(X.pdfUrl),L(X.pdfCompiledAt),_(X.pdfLoadingMode??"full"),ye.current.onPreviewTab("pdf"),X.ok&&(X.skipped?ye.current.onCompileSuccess():It(X.runId))):ye.current.onPreviewTab(X.diagnostics.errors.length?"errors":"log")}catch(X){!as(X)&&I.current===G&&ye.current.onError(de(X))}finally{Ie.current.get(G)===De&&(Ie.current.delete(G),v(X=>{const He=new Set(X);return He.delete(G),He}),Z(X=>{if(!X.has(G))return X;const He=new Set(X);return He.delete(G),He}))}},Re=async()=>{if(!e||!n||e.permission==="read"||!r)return;const G=n;Z(De=>new Set([...De,G]));try{(await te(`/api/projects/${t}/compile/cancel`,{method:"POST",body:JSON.stringify({mainFile:G})})).cancelled||Z(X=>{const He=new Set(X);return He.delete(G),He})}catch(De){Z(X=>{const He=new Set(X);return He.delete(G),He}),!as(De)&&I.current===G&&ye.current.onError(de(De))}},bt=async G=>{if(!e||!n||e.permission==="read"||!r||Fe||Ie.current.has(n)||a?.mainFile===n&&(a.status==="queued"||a.status==="running"))return;const De=n;Ne(!0),j.current?.abort(),me.current?.abort(),Ye.current?.abort(),Me.current?.abort();try{if((await te(`/api/projects/${t}/compile/clean`,{method:"POST",body:JSON.stringify({mainFile:De,mode:G})})).mainFile!==I.current)return;ye.current.onSharedState(null),G==="artifacts"&&(Ee.current=null,O(""),z(null),M(null),b(""),L(null),_("full"),R([]),P(null),ye.current.onPdfChanged()),ce(D(G==="cache"?"editor.cleanCacheComplete":"editor.cleanArtifactsComplete"))}catch(X){!as(X)&&I.current===De&&ye.current.onError(de(X))}finally{Ne(!1)}};ot.current=()=>{ve()},f.useEffect(()=>{if(!Y)return;const G=window.setTimeout(()=>ce(""),3e3);return()=>window.clearTimeout(G)},[Y]),f.useEffect(()=>{const G=De=>{if(!(!(De.ctrlKey||De.metaKey)||De.key.toLocaleLowerCase()!=="s")){if(VC(De.target)){De.preventDefault();return}De.preventDefault(),De.stopPropagation(),De.repeat||ot.current()}};return window.addEventListener("keydown",G,!0),()=>window.removeEventListener("keydown",G,!0)},[]),f.useEffect(()=>()=>{j.current?.abort(),me.current?.abort(),Ye.current?.abort(),Me.current?.abort();for(const G of Le.current)G.abort();Le.current.clear();for(const G of Ie.current.values())G.abort();Ie.current.clear()},[]);const Ge=async G=>{if(!G.viewable)return;Me.current?.abort();const De=new AbortController;Me.current=De,we(!0);try{const X=await te(`/api/projects/${t}/compile/artifacts?mainFile=${encodeURIComponent(n)}&path=${encodeURIComponent(G.path)}`,{signal:De.signal});!De.signal.aborted&&Me.current===De&&I.current===n&&P(X)}catch(X){as(X)||ye.current.onError(de(X))}finally{Me.current===De&&(Me.current=null,we(!1))}};return{pdfUrl:C,pdfCompiledAt:N,pdfLoadingMode:T,pdfLoading:w,compileLog:$,compileDiagnostics:J,compileOutcome:ae,artifacts:K,artifactPreview:A,artifactLoading:pe,editorNotice:Y,localCompiling:Ce.has(n),cancelling:ue.has(n),cleaning:Fe,compile:ve,cancelCompile:Re,cleanCompile:bt,viewArtifact:Ge}}const $o=10*1024*1024,WC=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".avif",".pdf",".zip",".gz",".bz2",".xz",".tar",".rar",".7z",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".mp3",".mp4",".wav",".ogg",".webm",".mov",".avi",".wasm",".exe",".bin",".so",".dll",".class",".jar"]);function Iu(t){return t instanceof Error&&t.name==="AbortError"}function Fr(t){const e=t.split("/").filter(Boolean);return e.pop(),e.map((n,s)=>e.slice(0,s+1).join("/"))}function os(t,e){return!!(t&&e)&&(e===t||e.startsWith(`${t}/`))}function KC(t){const e=`.${t.split(".").at(-1)?.toLocaleLowerCase()??""}`;return!WC.has(e)}function Vs(t){return/(?:\.(?:tex|bib|sty|cls|txt|md)|latexmkrc)$/i.test(t)}function Mu(t){const e=t.split(".").at(-1)?.toLocaleLowerCase()??"";return e==="pdf"?"pdf":["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"].includes(e)?"image":KC(t)?"text":"unsupported"}function GC(t,e){return`/api/projects/${t}/file/raw?path=${encodeURIComponent(e)}`}function YC({projectId:t,site:e,activeFile:n,dirty:s,save:r,onError:a,onProject:o,onActiveFile:c,onActiveMainFile:l,onRootDocuments:u}){const{t:d}=Qe(),[h,p]=f.useState([]),[m,D]=f.useState(!1),[C,b]=f.useState(""),[w,x]=f.useState(null),[N,L]=f.useState(!1),[T,_]=f.useState(!1),[$,O]=f.useState(""),[J,z]=f.useState(""),[ae,M]=f.useState(""),[K,R]=f.useState(new Set),[A,P]=f.useState(null),[pe,we]=f.useState(""),[Fe,Ne]=f.useState(""),[Ce,v]=f.useState(null),[ue,Z]=f.useState(!1),[Y,ce]=f.useState(null),[I,ie]=f.useState(!1),j=f.useRef(null),me=f.useRef(null),Ee=async(he={})=>{j.current?.abort(),j.current=null;const ve=he.signal?null:new AbortController;ve&&(j.current=ve);try{const Re=await te(`/api/projects/${t}/files`,{signal:he.signal??ve?.signal});return(!he.isCurrent||he.isCurrent())&&p(Re.files),Re.files}catch(Re){if(!Iu(Re))throw Re;return}finally{ve&&j.current===ve&&(j.current=null)}},tt=async()=>{if(!(!C.trim()||C.trim().endsWith("/"))){z("");try{await te(`/api/projects/${t}/file`,{method:"POST",body:JSON.stringify({path:C,content:""})}),await Ee(),c(C),R(he=>new Set([...he,...Fr(C)])),D(!1),b("")}catch(he){z(de(he))}}},Dt=async()=>{if(!$.trim())return;z("");const he=ae?`${ae}/${$.trim()}`:$.trim();try{const ve=await te(`/api/projects/${t}/folders`,{method:"POST",body:JSON.stringify({path:he})});await Ee(),R(Re=>new Set([...Re,...Fr(ve.path),ve.path])),M(ve.path),_(!1),O("")}catch(ve){z(de(ve))}},Ye=async(he,ve=new Set,Re=ae)=>{if(!he.length)return;const bt=e.maxUploadSizeMB;if(he.find(ke=>ke.size>bt*1024*1024))return a(d("errors.fileTooLarge",{size:bt}));const G=Re,De=he.map(ke=>G?`${G}/${ke.name}`:ke.name),X=new Map;for(const ke of De)X.set(ke,(X.get(ke)??0)+1);const He=[...X.entries()].filter(([,ke])=>ke>1).map(([ke])=>ke);if(He.length)return a(d("errors.duplicateUploadNames",{files:He.join(", ")}));const Ve=new Set(h.map(ke=>ke.path)),mt=[...new Set(De.filter(ke=>Ve.has(ke)&&!ve.has(ke)))];if(mt.length){ce({files:he,directory:G,collisions:mt});return}ce(null),ie(!0);try{const ke=new URLSearchParams;G&&ke.set("directory",G);let xt="";for(const[re,W]of he.entries()){const pt=De[re];ke.delete("overwrite"),ve.has(pt)&&ke.set("overwrite","1");const zt=ke.toString()?`?${ke.toString()}`:"",Gt=new FormData;Gt.append("file",W);try{const lt=await te(`/api/projects/${t}/upload${zt}`,{method:"POST",body:Gt});typeof lt.path=="string"&&Vs(lt.path)&&(xt=lt.path)}catch(lt){if(lt instanceof Yn&<.status===409&&!ve.has(pt)&<.code==="FILE_EXISTS"){re>0&&await Ee(),ce({files:he.slice(re),directory:G,collisions:[pt]});return}throw lt}}await Ee(),xt&&c(xt)}catch(ke){a(de(ke))}finally{ie(!1)}},Me=async he=>{await Ye(Array.from(he.target.files??[])),he.target.value=""},Le=async he=>{me.current?.abort(),me.current=null,L(!1);const ve=GC(t,he.path);if((he.size??0)>$o){x({path:he.path,kind:"large",size:he.size??0,url:ve});return}const Re=Mu(he.path);if(Re!=="text"){x({path:he.path,kind:Re,size:he.size??0,url:ve});return}x({path:he.path,kind:Re,size:he.size??0,url:ve,content:""}),L(!0);const bt=new AbortController;me.current=bt;try{let Ge;try{Ge=await fetch(ve,{signal:bt.signal})}catch(X){throw Ju(X)}const G=Ge.headers.get("content-type")??"";if(!Ge.ok){let X=null;try{X=G.includes("application/json")?await Ge.json():await Ge.text()}catch{}throw new Yn(Zu(X,Ge.status),Ge.status,Uo(X))}const De=await Ge.text();x(X=>X?.path===he.path?{...X,content:De}:X)}catch(Ge){Iu(Ge)||(x(null),a(de(Ge)))}finally{me.current===bt&&(me.current=null,L(!1))}},Ie=he=>{const ve=Mu(he.path),Re=e.maxCollaborativeFileSizeMB*1024*1024;(he.size??0)>$o||Vs(he.path)&&(he.size??0)>Re||ve!=="text"||!Vs(he.path)?Le(he):c(he.path)},yt=async()=>{if(!A)return;const he=pe.trim();if(he){z("");try{if(!await r())return;const ve=await te(`/api/projects/${t}/path`,{method:"PATCH",body:JSON.stringify({source:A.path,destinationDirectory:Fe,destinationName:he})}),Re=G=>G===A.path?ve.path:G.startsWith(`${A.path}/`)?`${ve.path}${G.slice(A.path.length)}`:G;c(G=>Re(G)),l(G=>Re(G)),u(G=>new Set([...G].map(Re))),M(G=>G&&Re(G));const[bt,Ge]=await Promise.all([te(`/api/projects/${t}/files`),te(`/api/projects/${t}`)]);p(bt.files),o(Ge.project),R(G=>new Set([...G,...Fr(ve.path),Fe].filter(Boolean))),P(null),we(""),Ne("")}catch(ve){z(de(ve))}}},ot=async()=>{if(Ce){z("");try{if(s&&!await r())return;await te(`/api/projects/${t}/file?path=${encodeURIComponent(Ce.path)}`,{method:"DELETE"}),v(null)}catch(he){z(de(he))}}};f.useEffect(()=>()=>{j.current?.abort(),me.current?.abort()},[]),f.useEffect(()=>{me.current?.abort(),me.current=null,L(!1)},[n]);const ye=h.filter(he=>he.type==="directory"),It=h.filter(he=>Fr(he.path).every(ve=>K.has(ve)));return{files:h,setFiles:p,loadFiles:Ee,newFileOpen:m,setNewFileOpen:D,newFilePath:C,setNewFilePath:b,resourcePreview:w,setResourcePreview:x,resourcePreviewLoading:N,setResourcePreviewLoading:L,newFolderOpen:T,setNewFolderOpen:_,newFolderName:$,setNewFolderName:O,fileDialogError:J,setFileDialogError:z,selectedFolder:ae,setSelectedFolder:M,expandedFolders:K,setExpandedFolders:R,moveEntry:A,setMoveEntry:P,moveName:pe,setMoveName:we,moveDestination:Fe,setMoveDestination:Ne,deleteEntry:Ce,setDeleteEntry:v,fileDragActive:ue,setFileDragActive:Z,uploadConflict:Y,setUploadConflict:ce,uploadingFiles:I,directoryEntries:ye,visibleEntries:It,createFile:tt,createFolder:Dt,uploadFiles:Ye,upload:Me,openFile:Ie,movePath:yt,removePath:ot}}function XC({active:t,projectId:e,activeFile:n,content:s,dictionaryWords:r}){const[a,o]=f.useState([]),[c,l]=f.useState(""),[u,d]=f.useState(""),[h,p]=f.useState(0),[m,D]=f.useState(null),[C,b]=f.useState(null),[w,x]=f.useState(!1),[N,L]=f.useState(0),T=f.useRef(0),_=f.useRef(!1),$=f.useRef(!1),O=f.useRef(s),J=f.useRef(n),z=f.useRef(0);O.current=s,J.current=n,$.current=w,f.useEffect(()=>{o([]),l(""),d(""),D(null),b(null),x(!1)},[n,r]),f.useEffect(()=>{b(null),x(!1)},[e]),f.useEffect(()=>{p(R=>a.length?Math.min(R,a.length-1):0)},[a]),f.useEffect(()=>{const R=++T.current;if(!t||!n){o([]),l(""),d(""),D(null);return}if(C){o([]),l(""),d("");return}const A=s,P=n;let pe=!1;const we=window.setTimeout(()=>{b(null),(async()=>{try{const{lintLatex:Fe,isHarperLintSupersededError:Ne}=await ns(async()=>{const{lintLatex:v,isHarperLintSupersededError:ue}=await import("./spellCheck-9fdyhJtV.js");return{lintLatex:v,isHarperLintSupersededError:ue}},__vite__mapDeps([5,1]));if(pe||R!==T.current||O.current!==A||J.current!==P)return;let Ce;try{Ce=await Fe(e,P,A,r)}catch(v){if(Ne(v))return;throw v}if(pe||R!==T.current||O.current!==A||J.current!==P)return;_.current=!1,x(!1),o(Ce),l(A),d(P),p(0),D(null)}catch(Fe){if(pe||R!==T.current||O.current!==A||J.current!==P)return;o([]),l(""),d(""),b(Fe instanceof Error?Fe.message:String(Fe));const Ne=_.current;_.current=!1,x(Ne?$.current:!1)}})()},700);return()=>{pe=!0,window.clearTimeout(we)}},[t,e,n,s,r,N,C]),f.useEffect(()=>{if(!C||!t)return;let R=!1;const A=()=>{R||(R=!0,_.current=!0,b(null),L(pe=>pe+1))},P=window.setTimeout(A,15e3);return window.addEventListener("online",A,{once:!0}),()=>{window.clearTimeout(P),window.removeEventListener("online",A)}},[C,t]);const ae=u===n&&c===s,M=f.useMemo(()=>ae?{total:a.length,unique:new Set(a.map(R=>`${R.kind}:${R.word.toLocaleLowerCase("en-US")}`)).size}:null,[ae,a]);return{issues:ae?a:[],jump:ae?m:null,index:h,summary:M,jumpToIssue:R=>{if(!a.length)return;const A=Math.max(0,Math.min(R,a.length-1)),P=a[A];p(A),D({from:P.from,to:P.to,nonce:++z.current})},error:w?null:C,nativeFallback:t&&!!C,retry:()=>{_.current=!1,b(null),x(!1),L(R=>R+1)},dismissError:()=>{_.current=!1,x(!0)}}}function _u(t){return t instanceof Error&&t.name==="AbortError"}function JC({projectId:t,mainFile:e,activeFile:n,onActiveFile:s,onError:r,onShowPdf:a}){const[o,c]=f.useState(null),[l,u]=f.useState(null),[d,h]=f.useState(null),p=f.useRef(null),m=f.useRef(0),D=f.useRef(n),C=f.useRef(s),b=f.useRef(r),w=f.useRef(a),x=$=>$===e&&/\.tex$/i.test($);D.current=n,C.current=s,b.current=r,w.current=a,f.useEffect(()=>(p.current?.abort(),p.current=null,c(null),u(null),h(null),()=>p.current?.abort()),[t,e]);const N=($,O,J)=>{h({path:$,line:O,column:J,nonce:++m.current}),D.current!==$&&C.current($)},L=async($,O,J,z={})=>{if(!x($))return;p.current?.abort();const ae=new AbortController;p.current=ae;try{const M=await te(`/api/projects/${t}/sync/pdf?mainFile=${encodeURIComponent(e)}&path=${encodeURIComponent($)}&line=${O}&column=${J}`,{signal:ae.signal});if(p.current!==ae||!M)return;c({...M,nonce:++m.current}),w.current()}catch(M){!_u(M)&&!z.silent&&b.current(de(M))}finally{p.current===ae&&(p.current=null)}},T=async($,O,J)=>{if(!x(D.current))return;const z=D.current;p.current?.abort();const ae=new AbortController;p.current=ae;try{const M=await te(`/api/projects/${t}/sync/source?mainFile=${encodeURIComponent(e)}&page=${$}&x=${O}&y=${J}`,{signal:ae.signal});if(p.current!==ae||D.current!==z||!x(D.current))return;N(M.path,M.line,M.column)}catch(M){_u(M)||b.current(de(M))}finally{p.current===ae&&(p.current=null)}};return{pdfTarget:o,pdfViewport:l,sourceJump:d,setPdfViewport:u,clearPdfViewport:()=>u(null),jumpToSource:N,syncSourceToPdf:L,syncPdfToSource:T,syncVisiblePdfToSource:()=>{l&&T(l.page,l.x,l.y)}}}function Kf(t,e){return`texlite.workspaceLayout:${encodeURIComponent(t)}:${encodeURIComponent(e)}`}function $u(t,e){try{const n=window.localStorage.getItem(Kf(t,e));if(n==="editor-pdf"||n==="editor-only"||n==="pdf-only")return n}catch{}return"editor-pdf"}function ZC(t,e){const[n,s]=f.useState(()=>$u(t,e));return f.useEffect(()=>{s($u(t,e))},[t,e]),{workspaceLayout:n,setWorkspaceLayout:a=>{s(a);try{window.localStorage.setItem(Kf(t,e),a)}catch{}}}}function QC(t){const n=t.split(/(?<=\n)/).map(s=>{for(let r=0;r<s.length;r+=1){if(s[r]!=="%")continue;let a=0;for(let o=r-1;o>=0&&s[o]==="\\";o-=1)a+=1;if(a%2===0)return s.slice(0,r)+(s.endsWith(`
|
|
48
|
-
`)?`
|
|
49
|
-
`:"")}return s}).join("").replace(/\\verb\*?([^\s]).*?\1/g,"").replace(/\\begin\{(?:verbatim\*?|Verbatim|lstlisting|minted)\}(?:\[[^\]]*\])?[\s\S]*?\\end\{(?:verbatim\*?|Verbatim|lstlisting|minted)\}/g,"");return/\\documentclass\s*(?:\[[^\]]*\]\s*)?\{/.test(n)}function ew({sessions:t,status:e}){const{t:n}=Qe(),[s,r]=f.useState(!1),a=Math.max(0,t.length-5),o=s&&a>0,c=o?t:t.slice(0,5);return f.useEffect(()=>{t.length<=5&&r(!1)},[t.length]),t.length<=1?null:i.jsxs("div",{className:`collaboration-presence collaboration-${e}`,title:n(`editor.collaboration.${e}`),children:[i.jsx("span",{className:"collaboration-status-dot","aria-label":n(`editor.collaboration.${e}`)}),i.jsxs("div",{className:"collaboration-avatars","aria-label":n("editor.collaboration.activeSessions",{count:t.length}),children:[c.map(l=>{const u=l.editing?n("editor.collaboration.editing"):n("editor.collaboration.viewing"),d=l.permission==="read"?n("common.readOnly"):n("common.readWrite"),h=n("editor.collaboration.sessionTooltip",{name:l.name,username:l.username,file:l.filePath||n("editor.collaboration.joining"),activity:u,permission:d});return i.jsxs("span",{className:`collaboration-avatar${l.editing?" editing":""}${l.local?" local":""}`,style:{"--session-color":l.color},title:h,"aria-label":h,tabIndex:0,children:[zC(l.name,l.username),i.jsxs("span",{className:"collaboration-avatar-tooltip",role:"tooltip",children:[i.jsx("strong",{children:l.name}),i.jsxs("span",{children:["@",l.username]}),i.jsxs("small",{children:[l.filePath||n("editor.collaboration.joining")," · ",u," · ",d]})]})]},l.clientId)}),a>0&&i.jsx("button",{type:"button",className:"collaboration-avatar collaboration-avatar-overflow","aria-expanded":o,"aria-label":o?n("editor.collaboration.showFewerSessions"):n("editor.collaboration.showMoreSessions",{count:a}),title:o?n("editor.collaboration.showFewerSessions"):n("editor.collaboration.showMoreSessions",{count:a}),onClick:()=>r(l=>!l),children:o?"−":`+${a}`})]})]})}function tw({value:t,onChange:e}){const{t:n}=Qe(),[s,r]=f.useState(!1),a=f.useRef(null),o=[{value:"editor-pdf",icon:Ul},{value:"editor-only",icon:u1},{value:"pdf-only",icon:d1}];return f.useEffect(()=>{if(!s)return;const c=u=>{a.current?.contains(u.target)||r(!1)},l=u=>{u.key==="Escape"&&r(!1)};return document.addEventListener("pointerdown",c),document.addEventListener("keydown",l),()=>{document.removeEventListener("pointerdown",c),document.removeEventListener("keydown",l)}},[s]),i.jsxs("div",{className:"layout-menu",ref:a,children:[i.jsxs("button",{type:"button",className:`layout-trigger${s?" active":""}`,"aria-haspopup":"menu","aria-expanded":s,title:n("editor.layout.current",{layout:n(`editor.layout.${t}.name`)}),onClick:()=>r(c=>!c),children:[i.jsx(Ul,{size:15}),i.jsxs("span",{children:[i.jsx("small",{children:n("editor.layout.label")}),n(`editor.layout.${t}.name`)]}),i.jsx(Md,{size:13})]}),s&&i.jsxs("div",{className:"layout-popover",role:"menu","aria-label":n("editor.layout.label"),children:[i.jsx("div",{className:"layout-popover-title",children:n("editor.layout.choose")}),o.map(c=>{const l=c.icon,u=c.value===t;return i.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":u,className:`layout-option${u?" selected":""}`,onClick:()=>{e(c.value),r(!1)},children:[i.jsx(l,{size:19}),i.jsxs("span",{children:[i.jsx("strong",{children:n(`editor.layout.${c.value}.name`)}),i.jsx("small",{children:n(`editor.layout.${c.value}.description`)})]}),u&&i.jsx(Zn,{size:16})]},c.value)})]})]})}function nw({site:t,project:e,activeFile:n,saveStateLabel:s,editorPreferences:r,activeSessions:a,collaborationStatus:o,reconnectCollaboration:c,protocolUpgradeRequired:l,showEditor:u,filesCollapsed:d,toggleFilesPanel:h,workspaceLayout:p,changeWorkspaceLayout:m,onBack:D,onShare:C,showCitationLibrary:b,citationLibraryOpen:w,onCitationLibrary:x,onHistory:N,onGit:L,canManageGit:T,formatting:_,readOnly:$,collaborationSynced:O,canFormat:J,activeFormatLease:z,onFormatFile:ae,onFormatSelection:M,hasSelection:K,onAddComment:R,onToggleComments:A,commentsOpen:P,unresolvedCommentCount:pe,hasActiveFile:we,onToggleSettings:Fe,settingsOpen:Ne,compileBusy:Ce,sharedCompiling:v,localCompiling:ue,cancelling:Z,compileState:Y,onCompile:ce,onCancelCompile:I}){const{t:ie}=Qe();return i.jsxs("header",{className:"editor-topbar",children:[i.jsx("button",{className:"back",title:ie("editor.backToProjects"),"aria-label":ie("editor.backToProjects"),onClick:D,children:i.jsx(go,{size:18})}),i.jsx("a",{className:"brand-link compact-brand-link",href:"/","aria-label":t.siteName,onClick:j=>{j.preventDefault(),D()},children:i.jsx(Zi,{siteName:t.siteName,compact:!0})}),i.jsxs("div",{className:"project-heading",children:[i.jsx("strong",{children:e.name}),i.jsxs("small",{children:[n," · ",s]})]}),r.vimMode&&i.jsxs("span",{className:"vim-status-badge",title:ie("editor.vimOnHint"),children:[i.jsx(QD,{size:14}),ie("editor.vimOn")]}),i.jsx(ew,{sessions:a,status:o}),o==="disconnected"&&!l&&i.jsxs("div",{className:"collaboration-recovery",role:"status",children:[i.jsx("span",{children:ie("editor.collaboration.disconnected")}),i.jsx("button",{type:"button",onClick:c,children:ie("editor.collaboration.reconnect")})]}),i.jsxs("div",{className:"editor-actions",children:[u&&i.jsxs("button",{className:d?"":"active",onClick:h,children:[d?i.jsx(l1,{size:15}):i.jsx(Kd,{size:15}),ie("common.files")]}),i.jsx(tw,{value:p,onChange:m}),i.jsxs("button",{onClick:C,children:[i.jsx(Br,{size:15}),ie("projectSettings.share")]}),b&&i.jsxs("button",{className:w?"active":"",onClick:x,children:[i.jsx(cs,{size:15}),ie("citationLibrary.title")]}),i.jsxs("div",{className:"version-action",role:"group","aria-label":ie("common.version"),children:[i.jsxs("div",{className:"version-action-label",children:[i.jsx(Hd,{size:14}),i.jsx("span",{children:ie("common.version")})]}),i.jsxs("div",{className:"version-action-options",children:[i.jsx("button",{type:"button",className:"version-action-history",title:ie("history.title"),onClick:N,children:ie("history.title")}),i.jsx("button",{type:"button",className:"version-action-git",title:ie(T?"git.title":"git.ownerOnly"),disabled:!T,onClick:L,children:"Git"})]})]}),u&&e.permission!=="read"&&J&&i.jsxs("div",{className:"format-action",role:"group","aria-label":ie("editor.format"),"aria-busy":_,children:[i.jsxs("div",{className:"format-action-label",children:[i.jsx(Od,{size:14}),i.jsx("span",{children:ie("editor.format")})]}),i.jsxs("div",{className:"format-action-options",children:[i.jsx("button",{type:"button",className:"format-action-file",title:ie("editor.formatFileHint"),onMouseDown:j=>j.preventDefault(),onClick:ae,disabled:_||z||!O,children:ie("editor.formatFile")}),i.jsx("button",{type:"button",className:"format-action-selected",title:ie(K?"editor.formatSelection":"editor.formatSelectionHint"),onMouseDown:j=>j.preventDefault(),onClick:M,disabled:_||z||!O||!K,children:ie("editor.formatSelected")})]})]}),i.jsxs("div",{className:"comments-action",role:"group","aria-label":ie("common.comments"),children:[i.jsxs("div",{className:"comments-action-label",children:[i.jsx(nc,{size:14}),i.jsx("span",{children:ie("common.comments")})]}),i.jsxs("div",{className:"comments-action-options",children:[i.jsx("button",{type:"button",className:"comments-action-add",title:ie("editor.addComment"),"aria-label":ie("editor.addComment"),onMouseDown:j=>j.preventDefault(),onClick:R,disabled:!we,children:ie("editor.commentsAdd")}),i.jsxs("button",{type:"button",className:`comments-action-all${P?" active":""}`,title:ie("editor.commentsAll"),onClick:A,children:[ie("editor.commentsAll")," ",pe||""]})]})]}),i.jsxs("button",{className:Ne?"active":"",onClick:Fe,children:[i.jsx(Co,{size:15}),ie("common.settings")]}),v||ue?i.jsxs("button",{className:"compile cancel-compile",title:ie("compileControls.cancel"),onClick:I,disabled:Z||_||$||!O,children:[Z?i.jsx(Ze,{className:"spin",size:15}):i.jsx(Ht,{size:15}),ie(Z?"compileControls.cancelling":"compileControls.cancel")]}):i.jsxs("button",{className:"compile",title:ie("editor.compileShortcut"),onClick:ce,disabled:Ce||_||$||!O,children:[Ce?i.jsx(Ze,{className:"spin",size:15}):i.jsx(p1,{size:15}),ie("editor.compile",{engine:e.engine})]})]})]})}function sw({project:t,filesPanel:e,files:n,visibleEntries:s,activeFile:r,activeMainFile:a,rootDocuments:o,selectedFolder:c,expandedFolders:l,fileDragActive:u,uploadingFiles:d,readOnly:h,editorFontSize:p,outline:m,sourceCursor:D,wordCountBusy:C,hasSelection:b,uploadInput:w,setSelectedFolder:x,setExpandedFolders:N,setMoveEntry:L,setMoveName:T,setMoveDestination:_,setDeleteEntry:$,setFileDialogError:O,setNewFolderName:J,setNewFolderOpen:z,setNewFilePath:ae,setNewFileOpen:M,setQuickOpen:K,setProjectSearchOpen:R,setFileDragActive:A,setFilesCollapsed:P,toggleFilesPanel:pe,uploadFiles:we,upload:Fe,openFile:Ne,jumpToSource:Ce,syncSourceToPdf:v,onWordCount:ue}){const{t:Z}=Qe(),[Y,ce]=f.useState(!1);return i.jsx(Yi,{id:"files",order:1,ref:e,defaultSize:16,minSize:12,maxSize:30,collapsible:!0,collapsedSize:0,onCollapse:()=>P(!0),onExpand:()=>P(!1),children:i.jsxs("aside",{className:"left-panel",children:[i.jsxs("section",{className:`files-panel${u?" drop-active":""}`,onDragEnter:I=>{I.dataTransfer.types.includes("Files")&&(I.preventDefault(),!h&&!d&&A(!0))},onDragOver:I=>{I.dataTransfer.types.includes("Files")&&(I.preventDefault(),I.dataTransfer.dropEffect=h||d?"none":"copy")},onDragLeave:I=>{I.currentTarget.contains(I.relatedTarget)||A(!1)},onDrop:I=>{I.preventDefault(),A(!1),!h&&!d&&we(Array.from(I.dataTransfer.files))},children:[i.jsxs("div",{className:"panel-title",children:[i.jsx("button",{className:"file-size-toggle",type:"button","aria-pressed":Y,title:Z(Y?"editor.hideFileSizes":"editor.showFileSizes"),onClick:()=>ce(I=>!I),children:Z("common.files")}),i.jsxs("span",{className:"file-tools",children:[i.jsx("button",{"aria-label":Z("navigation.quickOpen"),title:`${Z("navigation.quickOpen")} (Ctrl/Cmd+P)`,onClick:()=>K(!0),children:i.jsx($d,{size:15})}),i.jsx("button",{"aria-label":Z("navigation.projectSearch"),title:`${Z("navigation.projectSearch")} (Ctrl/Cmd+Shift+F)`,onClick:()=>R(!0),children:i.jsx(sc,{size:15})}),!h&&i.jsxs(i.Fragment,{children:[i.jsx("button",{disabled:d,"aria-label":Z("editor.uploadAttachment"),title:Z("editor.uploadTo",{folder:c||Z("editor.projectRoot")}),onClick:()=>w.current?.click(),children:i.jsx(Bi,{size:15})}),i.jsx("button",{"aria-label":Z("editor.newFolder"),title:Z("editor.newFolder"),onClick:()=>{J(""),z(!0)},children:i.jsx(zd,{size:15})}),i.jsx("button",{"aria-label":Z("editor.newFile"),title:Z("editor.newFile"),onClick:()=>{ae(c?`${c}/`:""),M(!0)},children:i.jsx(_D,{size:15})}),i.jsx("input",{ref:w,type:"file",multiple:!0,hidden:!0,onChange:I=>{Fe(I)}})]}),i.jsx("button",{"aria-label":Z("editor.collapseFiles"),title:Z("editor.collapseFiles"),onClick:pe,children:i.jsx(Kd,{size:15})})]})]}),u&&i.jsxs("div",{className:"file-drop-overlay",children:[i.jsx(Bi,{size:24}),i.jsx("strong",{children:Z("editor.dropFiles")}),i.jsx("span",{children:Z("editor.uploadTo",{folder:c||Z("editor.projectRoot")})})]}),i.jsxs("div",{className:"file-list",style:{fontSize:`${p}px`},children:[i.jsx("div",{className:`file-entry folder-entry root-entry${c===""?" selected":""}`,children:i.jsxs("button",{className:"file-entry-main",onClick:()=>x(""),children:[i.jsx(ki,{size:15}),i.jsx("span",{children:Z("editor.projectRoot")})]})}),s.map(I=>{const ie=I.path.split("/").length-1,j=I.path.split("/").at(-1),me=l.has(I.path),Ee=o.has(I.path),tt=a===I.path,Dt=I.path!==t.mainFile&&!t.mainFile.startsWith(`${I.path}/`);return I.type==="directory"?i.jsxs("div",{className:`file-entry folder-entry${c===I.path?" selected":""}`,style:{paddingLeft:`${ie*13+5}px`},children:[i.jsxs("button",{className:"file-entry-main",title:I.path,onClick:()=>{x(I.path),N(Ye=>{const Me=new Set(Ye);return Me.has(I.path)?Me.delete(I.path):Me.add(I.path),Me})},children:[me?i.jsx(Md,{size:13}):i.jsx(Sr,{size:13}),i.jsx(Ud,{size:14}),i.jsx("span",{children:j})]}),!h&&i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"file-entry-action",title:Z("editor.move"),"aria-label":Z("editor.move"),onClick:()=>{L(I),T(j??""),_("")},children:i.jsx(Vl,{size:13})}),Dt&&i.jsx("button",{className:"file-entry-action danger-text",title:Z("editor.deletePath"),"aria-label":Z("editor.deletePath"),onClick:()=>{$(I),O("")},children:i.jsx(nn,{size:13})})]})]},I.path):i.jsxs("div",{className:`file-entry${r===I.path?" active":""}${Ee?" root-document":""}${tt?" compile-target":""}`,style:{paddingLeft:`${ie*13+18}px`},children:[i.jsxs("button",{className:"file-entry-main",title:tt?Z("editor.currentMainDocument",{path:I.path}):Ee?Z("editor.mainDocumentCandidate",{path:I.path}):I.path,onClick:()=>Ne(I),children:[Ee?i.jsx(Qi,{size:13}):i.jsx(hs,{size:13}),i.jsx("span",{children:j}),tt&&i.jsx("small",{children:Z("editor.currentMainShort")})]}),Y&&typeof I.size=="number"&&i.jsx("span",{className:"file-entry-size",title:`${I.size.toLocaleString()} B`,children:rw(I.size)}),!h&&i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"file-entry-action",title:Z("editor.move"),"aria-label":Z("editor.move"),onClick:()=>{L(I),T(j??""),_("")},children:i.jsx(Vl,{size:13})}),Dt&&i.jsx("button",{className:"file-entry-action danger-text",title:Z("editor.deletePath"),"aria-label":Z("editor.deletePath"),onClick:()=>{$(I),O("")},children:i.jsx(nn,{size:13})})]})]},I.path)})]})]}),i.jsxs("section",{className:"outline-panel",children:[i.jsxs("div",{className:"panel-title",children:[i.jsxs("span",{className:"outline-heading",children:[i.jsx(qd,{size:14}),Z("common.outline")]}),i.jsxs("span",{className:"word-count-actions",role:"group","aria-label":Z("editor.wordCountTitle"),children:[i.jsxs("button",{type:"button",title:Z("editor.wordCountFullHint"),onClick:()=>ue("full"),disabled:C||!a,children:[C?i.jsx(Ze,{className:"spin",size:12}):i.jsx(bo,{size:12}),Z("editor.wordCountFull")]}),i.jsxs("button",{type:"button",title:Z("editor.wordCountSelectionHint"),onClick:()=>ue("selection"),disabled:C||!b,children:[C?i.jsx(Ze,{className:"spin",size:12}):i.jsx(bo,{size:12}),Z("editor.wordCountSelection")]})]})]}),i.jsxs("div",{className:"outline",children:[m.map((I,ie)=>i.jsxs("button",{className:`outline-item${r===I.path&&D.line===I.line?" current":""}`,title:`${I.path}:${I.line}`,onClick:()=>{Ce(I.path,I.line,1),v(I.path,I.line,1)},children:[i.jsx("span",{className:"outline-guides","aria-hidden":!0,style:{width:`${I.level*12}px`}}),i.jsx("small",{children:I.path===r?I.line:I.path.split("/").at(-1)}),i.jsx("span",{className:"outline-title",children:I.title})]},`${I.path}-${I.line}-${ie}`)),m.length===0&&i.jsx("p",{className:"muted padded",children:Z("editor.noOutline")})]})]})]})})}function rw(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)} MB`:`${(t/1024/1024/1024).toFixed(1)} GB`}const iw=f.lazy(()=>ns(()=>import("./LatexEditor-DbU8fMFZ.js"),__vite__mapDeps([6,1,7])).then(t=>({default:t.LatexEditor})));function aw({project:t,activeFile:e,activeMainFile:n,openTabs:s,content:r,loadedFile:a,readOnly:o,comments:c,focusComment:l,editorPreferences:u,completionIndex:d,nativeSpellCheck:h,spellCheckIssues:p,spellCheckJump:m,sourceJump:D,collaborativeText:C,collaborationAwareness:b,undoManager:w,editorNotice:x,activateTab:N,closeTab:L,handleTabKeyDown:T,updateEditorContent:_,setSelection:$,onCommentClick:O,onSpellCheckReplace:J,onCursor:z}){const{t:ae}=Qe();return i.jsx(Yi,{id:"source",order:2,defaultSize:42,minSize:22,children:i.jsxs("main",{className:"source-panel",children:[u.openFilesInTabs&&s.length>0&&i.jsx("div",{className:"editor-tabs-bar",role:"tablist","aria-label":ae("editor.openFiles"),children:i.jsx("div",{className:"editor-tabs-scroll",children:s.map((M,K)=>{const R=M===e,A=M===(n||t.mainFile),P=M.split("/").at(-1)||M;return i.jsxs("div",{className:`editor-tab-item${R?" active":""}`,role:"presentation",children:[i.jsxs("button",{id:`editor-tab-${encodeURIComponent(M)}`,type:"button",role:"tab","aria-selected":R,"aria-controls":"editor-source-content",tabIndex:R?0:-1,className:`editor-tab${R?" active":""}${A?" main-tab":""}`,onClick:()=>N(M),onKeyDown:pe=>T(pe,K),title:M,children:[i.jsx("span",{className:"editor-tab-icon",children:A?i.jsx(Qi,{size:13}):i.jsx(hs,{size:13})}),i.jsx("span",{className:"editor-tab-title",children:P}),A&&i.jsx("small",{className:"editor-tab-badge",children:ae("editor.currentMainShort")})]}),i.jsx("button",{type:"button",className:"editor-tab-close",title:ae("common.close"),"aria-label":`${ae("common.close")} ${P}`,onClick:()=>L(M),children:i.jsx(Ht,{size:12})})]},M)})})}),i.jsxs("div",{id:"editor-source-content",className:"editor-content-container",children:[i.jsx(f.Suspense,{fallback:i.jsxs("div",{className:"preview-empty",children:[i.jsx(Ze,{className:"spin",size:22}),i.jsx("span",{children:ae("common.loading")})]}),children:i.jsx(iw,{value:r,filePath:e,readOnly:o,comments:c,focusComment:l,preferences:u,nativeSpellCheck:h,completionIndex:d,spellCheckIssues:p,spellCheckJump:m,jumpTo:a===e&&D?.path===e?D:null,searchRequest:0,collaboration:C?{text:C,awareness:b,undoManager:o?void 0:w}:void 0,onChange:_,onSelection:$,onCommentClick:O,onSpellCheckReplace:J,onCursor:z},e)}),x&&i.jsx("div",{className:"editor-centered-notice",role:"status","aria-live":"polite",children:x})]})]})})}function zu({diagnostics:t,files:e,empty:n,tone:s,onJump:r}){const{t:a}=Qe(),o=s==="error"?tc:en;return t.length?i.jsx("div",{className:`compile-diagnostic-list compile-${s}`,children:t.map((c,l)=>{const u=lw(c.file,e),d=!!(u&&c.line);return i.jsxs("button",{type:"button",disabled:!d,className:"compile-diagnostic-row",onClick:()=>{u&&c.line&&r(u,c.line,c.column??1)},children:[i.jsx(o,{size:15}),i.jsxs("span",{children:[i.jsx("strong",{children:c.message}),i.jsxs("small",{children:[c.phase,u?` · ${u}${c.line?`:${c.line}`:""}`:c.line?` · ${a("editor.lineNumber",{line:c.line})}`:""]})]})]},`${c.phase}-${c.file??""}-${c.line??0}-${l}`)})}):i.jsxs("div",{className:`compile-empty compile-${s}`,children:[i.jsx(o,{size:26}),i.jsx("span",{children:n})]})}function no({lines:t,empty:e,tone:n="log"}){const s=n==="error"?tc:n==="warning"?en:Si;return t.length?i.jsx("pre",{className:`compile-output compile-${n}`,children:t.join(`
|
|
50
|
-
`)}):i.jsxs("div",{className:`compile-empty compile-${n}`,children:[i.jsx(s,{size:26}),i.jsx("span",{children:e})]})}function ow({projectId:t,mainFile:e,artifacts:n,preview:s,loading:r,onView:a}){const{t:o}=Qe(),c=l=>`/api/projects/${t}/compile/artifacts?mainFile=${encodeURIComponent(e)}&path=${encodeURIComponent(l)}&download=1`;return n.length?i.jsxs("div",{className:"artifact-browser",children:[i.jsx("div",{className:"artifact-list",children:n.map(l=>i.jsxs("div",{className:`artifact-row${s?.path===l.path?" active":""}`,children:[i.jsxs("button",{type:"button",disabled:!l.viewable,title:l.viewable?o("editor.viewArtifact"):o("editor.downloadToView"),onClick:()=>a(l),children:[i.jsx(hs,{size:14}),i.jsxs("span",{children:[i.jsx("strong",{children:l.path}),i.jsx("small",{children:uw(l.size)})]})]}),i.jsx("a",{href:c(l.path),title:o("editor.downloadArtifact"),"aria-label":o("editor.downloadArtifact"),children:i.jsx(Tr,{size:14})})]},l.path))}),i.jsx("div",{className:"artifact-preview",children:r?i.jsxs("div",{className:"compile-empty",children:[i.jsx(Ze,{className:"spin",size:24}),i.jsx("span",{children:o("common.loading")})]}):s?i.jsxs(i.Fragment,{children:[i.jsxs("header",{children:[i.jsx("strong",{children:s.path}),i.jsxs("a",{href:c(s.path),children:[i.jsx(Tr,{size:13}),o("projects.download")]})]}),i.jsx("pre",{children:s.content})]}):i.jsxs("div",{className:"compile-empty",children:[i.jsx(hs,{size:24}),i.jsx("span",{children:o("editor.selectArtifact")})]})})]}):i.jsxs("div",{className:"compile-empty",children:[i.jsx(Wd,{size:26}),i.jsx("span",{children:o("editor.noArtifacts")})]})}function cw({mainFile:t,disabled:e,cleaning:n,onCleanCache:s,onCleanArtifacts:r}){const{t:a}=Qe();return i.jsxs("div",{className:"compile-clean-panel",children:[i.jsxs("div",{className:"compile-clean-intro",children:[i.jsx(en,{size:28}),i.jsxs("div",{children:[i.jsx("strong",{children:a("editor.cleanTitle")}),i.jsx("p",{children:a("editor.cleanDescription",{file:t})})]})]}),i.jsxs("div",{className:"compile-clean-actions",children:[i.jsxs("article",{children:[i.jsx("div",{className:"compile-clean-action-icon",children:i.jsx(Do,{size:19})}),i.jsxs("div",{children:[i.jsx("strong",{children:a("editor.cleanCache")}),i.jsx("p",{children:a("editor.cleanCacheDescription")}),i.jsxs("button",{type:"button",disabled:e||n,onClick:s,children:[n?i.jsx(Ze,{className:"spin",size:14}):i.jsx(Do,{size:14}),a("editor.cleanCache")]})]})]}),i.jsxs("article",{className:"danger",children:[i.jsx("div",{className:"compile-clean-action-icon",children:i.jsx(nn,{size:19})}),i.jsxs("div",{children:[i.jsx("strong",{children:a("editor.cleanArtifacts")}),i.jsx("p",{children:a("editor.cleanArtifactsDescription")}),i.jsxs("button",{type:"button",className:"danger",disabled:e||n,onClick:r,children:[n?i.jsx(Ze,{className:"spin",size:14}):i.jsx(nn,{size:14}),a("editor.cleanArtifacts")]})]})]})]})]})}function lw(t,e){if(!t)return null;const n=e.filter(c=>c.type==="file").map(c=>c.path),s=t.replaceAll("\\","/").replace(/^\.\//,"");if(n.includes(s))return s;const r=n.filter(c=>s.endsWith(`/${c}`));if(r.length===1)return r[0];const a=s.split("/").at(-1),o=n.filter(c=>c.split("/").at(-1)===a);return o.length===1?o[0]:null}function uw(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}const dw=f.lazy(()=>Ji().then(t=>({default:t.PdfPreview})));function hw({projectId:t,activeMainFile:e,previewTab:n,diagnosticTab:s,pdfUrl:r,pdfLoadingMode:a,pdfLoading:o,pdfCompiledAt:c,pdfCompiledLabel:l,pdfTargetLabel:u,pdfDownloadUrl:d,pdfTarget:h,pdfViewport:p,activeFile:m,sourceCursor:D,compileBusy:C,compileLog:b,compileDiagnostics:w,compileMessages:x,artifacts:N,artifactPreview:L,artifactLoading:T,cleaning:_,readOnly:$,collaborationSynced:O,workspaceLayout:J,showSyncResize:z,diagnosticCount:ae,selectPreviewTab:M,changeWorkspaceLayout:K,onSetNotice:R,onSetPdfViewport:A,syncVisiblePdfToSource:P,syncSourceToPdf:pe,syncPdfToSource:we,canSyncWithPdf:Fe,files:Ne,jumpToSource:Ce,onSetCleanMode:v,cleanCompile:ue,viewArtifact:Z}){const{t:Y}=Qe();return i.jsxs(i.Fragment,{children:[z&&i.jsxs(zo,{className:"resize-handle sync-resize-handle",children:[i.jsx(Vd,{className:"resize-grip",size:12}),i.jsxs("span",{className:"sync-direction-buttons",onPointerDown:ce=>ce.stopPropagation(),children:[i.jsx("button",{disabled:!p||!Fe,title:Y(Fe?"editor.showInSource":"editor.syncTexOnlyForMain"),"aria-label":Y("editor.showInSource"),onClick:()=>{if(!Fe){R(Y("editor.syncTexOnlyForMain"));return}P()},children:i.jsx("span",{"aria-hidden":!0,children:"←"})}),i.jsx("button",{disabled:!m||!r||!Fe,title:Y(Fe?"editor.showInPdf":"editor.syncTexOnlyForMain"),"aria-label":Y("editor.showInPdf"),onClick:()=>{if(!Fe){R(Y("editor.syncTexOnlyForMain"));return}pe(m,D.line,D.column)},children:i.jsx("span",{"aria-hidden":!0,children:"→"})})]})]}),i.jsx(Yi,{id:"preview",order:3,defaultSize:42,minSize:22,children:i.jsxs("section",{className:"preview-panel",children:[i.jsxs("div",{className:"preview-tabs",children:[i.jsxs("div",{className:"preview-tab-list",role:"tablist","aria-label":Y("editor.outputTabs"),children:[i.jsxs("button",{role:"tab","aria-selected":n==="pdf",className:`pdf-tab${n==="pdf"?" active":""}`,onClick:()=>M("pdf"),title:c?Y("editor.pdfCompiledAtFor",{file:e,time:new Date(c).toLocaleString(Ke.resolvedLanguage)}):Y("editor.currentMainDocument",{path:e}),children:[i.jsx(hs,{size:16}),i.jsxs("span",{className:"pdf-tab-label",children:["PDF · ",u,l&&i.jsx("small",{children:l})]})]}),i.jsxs("button",{role:"tab","aria-selected":n==="diagnostics",className:`diagnostics-tab${n==="diagnostics"?" active":""}`,onClick:()=>M("diagnostics"),children:[i.jsx(Si,{size:14}),Y("editor.outputTabs"),i.jsx("span",{children:ae})]})]}),d&&i.jsxs("a",{className:"pdf-download-top",href:d,download:!0,title:Y("editor.downloadPdf"),"aria-label":Y("editor.downloadPdf"),children:[i.jsx(Tr,{size:15}),i.jsx("span",{children:Y("editor.downloadPdf")})]})]}),n==="diagnostics"&&i.jsxs("div",{className:"preview-subtabs",role:"tablist","aria-label":Y("editor.outputTabs"),children:[i.jsxs("button",{role:"tab","aria-selected":s==="log",className:s==="log"?"active":"",onClick:()=>M("log"),children:[i.jsx(Si,{size:13}),Y("editor.log")]}),i.jsxs("button",{role:"tab","aria-selected":s==="warnings",className:s==="warnings"?"active":"",onClick:()=>M("warnings"),children:[i.jsx(en,{size:13}),Y("editor.warnings"),i.jsx("span",{children:x.warnings.length})]}),i.jsxs("button",{role:"tab","aria-selected":s==="errors",className:s==="errors"?"active":"",onClick:()=>M("errors"),children:[i.jsx(tc,{size:13}),Y("editor.errors"),i.jsx("span",{children:x.errors.length})]}),i.jsxs("button",{role:"tab","aria-selected":s==="artifacts",className:s==="artifacts"?"active":"",onClick:()=>M("artifacts"),children:[i.jsx(Wd,{size:13}),Y("editor.artifacts"),i.jsx("span",{children:N.length})]}),i.jsxs("button",{role:"tab","aria-selected":s==="clean",className:s==="clean"?"active":"",onClick:()=>M("clean"),children:[i.jsx(Do,{size:13}),Y("editor.clean")]})]}),i.jsxs("div",{className:`preview-content preview-${n} ${n==="diagnostics"?`preview-${s}`:""}`,children:[n==="pdf"&&(r?i.jsx(f.Suspense,{fallback:i.jsxs("div",{className:"pdf-loading-state",role:"status","aria-live":"polite",children:[i.jsx(Ze,{className:"spin",size:24}),i.jsx("span",{children:Y("editor.loadingPdf")})]}),children:i.jsx(dw,{url:r,loadingMode:a,target:h,compiling:C,onViewportLocation:(ce,I,ie)=>A({page:ce,x:I,y:ie}),onDoubleClickLocation:(ce,I,ie)=>{if(A({page:ce,x:I,y:ie}),!Fe){R(Y("editor.syncTexOnlyForMain"));return}we(ce,I,ie)}})}):o?i.jsxs("div",{className:"pdf-loading-state",role:"status","aria-live":"polite",children:[i.jsx(Ze,{className:"spin",size:24}),i.jsx("span",{children:Y("editor.loadingPdf")})]}):i.jsxs("div",{className:"preview-empty",children:[i.jsx(hs,{size:28}),i.jsx("strong",{children:Y("editor.preview")}),i.jsx("span",{children:Y("editor.previewHint")})]})),n==="diagnostics"&&s==="log"&&i.jsx(no,{lines:b?b.split(`
|
|
51
|
-
`):[],empty:Y(C?"editor.compiling":"editor.noLog")}),n==="diagnostics"&&s==="warnings"&&(w?i.jsx(zu,{tone:"warning",diagnostics:w.warnings,files:Ne,empty:Y("editor.noWarnings"),onJump:(ce,I,ie)=>{J==="pdf-only"&&K("editor-pdf"),Ce(ce,I,ie)}}):i.jsx(no,{tone:"warning",lines:x.warnings,empty:Y("editor.noWarnings")})),n==="diagnostics"&&s==="errors"&&(w?i.jsx(zu,{tone:"error",diagnostics:w.errors,files:Ne,empty:Y("editor.noErrors"),onJump:(ce,I,ie)=>{J==="pdf-only"&&K("editor-pdf"),Ce(ce,I,ie)}}):i.jsx(no,{tone:"error",lines:x.errors,empty:Y("editor.noErrors")})),n==="diagnostics"&&s==="artifacts"&&i.jsx(ow,{projectId:t,mainFile:e,artifacts:N,preview:L,loading:T,onView:ce=>{Z(ce)}}),n==="diagnostics"&&s==="clean"&&i.jsx(cw,{mainFile:e,disabled:$||!O||C,cleaning:_,onCleanCache:()=>v("cache"),onCleanArtifacts:()=>v("artifacts")})]})]})})]})}function so(t,e){!(t.ctrlKey||t.metaKey)||t.key!=="Enter"||t.nativeEvent.isComposing||(t.preventDefault(),t.stopPropagation(),e())}function fw({comment:t,currentUserId:e,onFocus:n,onToggle:s,onReply:r,onEdit:a,onDelete:o,onEditReply:c,onDeleteReply:l}){const{t:u}=Qe(),[d,h]=f.useState(!1),[p,m]=f.useState(""),[D,C]=f.useState(!1),[b,w]=f.useState(t.content),[x,N]=f.useState(!1),[L,T]=f.useState(null),[_,$]=f.useState(""),[O,J]=f.useState(null),z=async A=>{A?.preventDefault(),p.trim()&&await r(p)&&(m(""),h(!1))},ae=async A=>{A?.preventDefault(),b.trim()&&await a(b)&&C(!1)},M=async A=>{A?.preventDefault(),!(!L||!_.trim())&&await c(L,_)&&T(null)},K=t.authorUsername,R=A=>new Date(A).toLocaleString(Ke.resolvedLanguage);return i.jsxs(i.Fragment,{children:[i.jsxs("article",{className:`comment-thread${t.resolved?" resolved":""}${t.orphaned?" orphaned":""}`,onClick:()=>{window.getSelection()?.toString()||n()},children:[i.jsxs("header",{className:"comment-header",children:[i.jsxs("span",{className:"comment-author",children:[i.jsx("strong",{children:t.authorDisplayName??K??u("editor.deletedUser")}),K&&i.jsxs("small",{children:["@",K]})]}),i.jsxs("span",{className:"comment-times",children:[i.jsx("time",{dateTime:t.createdAt,title:new Date(t.createdAt).toISOString(),children:R(t.createdAt)}),t.editedAt&&i.jsx("small",{children:u("editor.editedAt",{time:R(t.editedAt)})})]})]}),i.jsx("div",{className:"comment-location",children:t.orphaned?u("editor.orphaned"):u("editor.line",{line:t.startLine})}),t.selectedText&&i.jsx("blockquote",{className:"comment-selected-text",children:t.selectedText}),D?i.jsxs("form",{className:"comment-reply-form comment-edit-form",onSubmit:A=>{ae(A)},onClick:A=>A.stopPropagation(),children:[i.jsx("textarea",{autoFocus:!0,rows:4,value:b,onChange:A=>w(A.target.value),onKeyDown:A=>so(A,ae)}),i.jsxs("div",{children:[i.jsx("button",{type:"button",onClick:()=>C(!1),children:u("common.cancel")}),i.jsxs("button",{className:"primary",type:"submit",disabled:!b.trim(),children:[i.jsx(ji,{size:13}),u("editor.saveChanges")]})]})]}):i.jsx("p",{className:"comment-content",children:t.content}),t.replies.length>0&&i.jsx("div",{className:"comment-replies",children:t.replies.map(A=>i.jsxs("div",{className:"comment-reply",children:[i.jsxs("header",{children:[i.jsxs("span",{className:"comment-author",children:[i.jsx("strong",{children:A.authorDisplayName??A.authorUsername??u("editor.deletedUser")}),A.authorUsername&&i.jsxs("small",{children:["@",A.authorUsername]})]}),i.jsxs("span",{className:"comment-times",children:[i.jsx("time",{dateTime:A.createdAt,title:new Date(A.createdAt).toISOString(),children:R(A.createdAt)}),A.editedAt&&i.jsx("small",{children:u("editor.editedAt",{time:R(A.editedAt)})})]})]}),L===A.id?i.jsxs("form",{className:"comment-reply-form comment-edit-form",onSubmit:P=>{M(P)},onClick:P=>P.stopPropagation(),children:[i.jsx("textarea",{autoFocus:!0,rows:3,value:_,onChange:P=>$(P.target.value),onKeyDown:P=>so(P,M)}),i.jsxs("div",{children:[i.jsx("button",{type:"button",onClick:()=>T(null),children:u("common.cancel")}),i.jsxs("button",{className:"primary",type:"submit",disabled:!_.trim(),children:[i.jsx(ji,{size:13}),u("editor.saveChanges")]})]})]}):i.jsx("p",{className:"comment-content",children:A.content}),A.authorId===e&&L!==A.id&&i.jsxs("div",{className:"comment-owner-actions",children:[i.jsx("button",{title:u("editor.editReply"),"aria-label":u("editor.editReply"),onClick:P=>{P.stopPropagation(),T(A.id),$(A.content)},children:i.jsx(Ai,{size:12})}),i.jsx("button",{className:"danger-text",title:u("editor.deleteReply"),"aria-label":u("editor.deleteReply"),onClick:P=>{P.stopPropagation(),J(A.id)},children:i.jsx(nn,{size:12})})]})]},A.id))}),i.jsxs("div",{className:"comment-actions",children:[i.jsxs("button",{className:"resolve",onClick:A=>{A.stopPropagation(),s()},children:[t.resolved?i.jsx(C1,{size:13}):i.jsx(_d,{size:13}),t.resolved?u("editor.reopen"):u("editor.resolve")]}),i.jsxs("button",{className:"reply-action",onClick:A=>{A.stopPropagation(),h(P=>!P)},children:[i.jsx(b1,{size:13}),u("editor.reply")]}),t.authorId===e&&!D&&i.jsxs("span",{className:"comment-owner-actions",children:[i.jsx("button",{title:u("editor.editComment"),"aria-label":u("editor.editComment"),onClick:A=>{A.stopPropagation(),w(t.content),C(!0)},children:i.jsx(Ai,{size:13})}),i.jsx("button",{className:"danger-text",title:u("editor.deleteComment"),"aria-label":u("editor.deleteComment"),onClick:A=>{A.stopPropagation(),N(!0)},children:i.jsx(nn,{size:13})})]})]}),d&&i.jsxs("form",{className:"comment-reply-form",onSubmit:A=>{z(A)},onClick:A=>A.stopPropagation(),children:[i.jsx("textarea",{autoFocus:!0,rows:3,value:p,placeholder:u("editor.replyPlaceholder"),onChange:A=>m(A.target.value),onKeyDown:A=>so(A,z)}),i.jsxs("div",{children:[i.jsx("button",{type:"button",onClick:()=>{h(!1),m("")},children:u("common.cancel")}),i.jsxs("button",{className:"primary",type:"submit",disabled:!p.trim(),children:[i.jsx(w1,{size:13}),u("editor.sendReply")]})]})]})]}),i.jsx(_n,{open:x,title:u("editor.deleteCommentTitle"),description:u("editor.deleteCommentDescription",{count:t.replies.length}),confirmLabel:u("common.delete"),danger:!0,onCancel:()=>N(!1),onConfirm:()=>{o().then(A=>{A&&N(!1)})}}),i.jsx(_n,{open:!!O,title:u("editor.deleteReplyTitle"),description:u("editor.deleteReplyDescription"),confirmLabel:u("common.delete"),danger:!0,onCancel:()=>J(null),onConfirm:()=>{O&&l(O).then(A=>{A&&J(null)})}})]})}function mw({open:t,onOpenChange:e,project:n,projectId:s}){const{t:r}=Qe(),[a,o]=f.useState([]),[c,l]=f.useState([]),[u,d]=f.useState(""),[h,p]=f.useState("read"),[m,D]=f.useState(null),[C,b]=f.useState(""),w=n.permission==="owner",x=async()=>{try{const[$,O]=await Promise.all([te(`/api/projects/${s}/members`),te("/api/users")]);o($.members),l(O.users.filter(J=>J.id!==n.ownerId))}catch($){b(de($))}};f.useEffect(()=>{t&&x()},[t,s]);const N=async()=>{if(u)try{await te(`/api/projects/${s}/members/${u}`,{method:"PUT",body:JSON.stringify({permission:h})}),d(""),p("read"),await x()}catch($){b(de($))}},L=async($,O)=>{try{await te(`/api/projects/${s}/members/${$.id}`,{method:"PUT",body:JSON.stringify({permission:O})}),await x()}catch(J){b(de(J))}},T=async()=>{if(m)try{await te(`/api/projects/${s}/members/${m.id}`,{method:"DELETE"}),D(null),await x()}catch($){b(de($))}},_=c.filter($=>!a.some(O=>O.id===$.id));return i.jsxs(i.Fragment,{children:[i.jsx(ft,{open:t,wide:!0,title:r("projectSettings.share"),description:r("projectSettings.shareDescription"),onOpenChange:e,footer:i.jsx("button",{onClick:()=>e(!1),children:r("common.close")}),children:i.jsxs("div",{className:"share-dialog",children:[C&&i.jsx("p",{className:"error",children:C}),i.jsxs("div",{className:"share-owner",children:[i.jsx(Br,{size:17}),i.jsxs("span",{children:[i.jsx("small",{children:r("projects.owner")}),i.jsx("strong",{children:n.ownerDisplayName??n.ownerUsername})]})]}),w&&i.jsxs("div",{className:"share-add",children:[i.jsxs("label",{className:"form-field",children:[r("common.user"),i.jsxs("select",{value:u,onChange:$=>d($.target.value),children:[i.jsx("option",{value:"",children:r("projectSettings.chooseUser")}),_.map($=>i.jsx("option",{value:$.id,children:$.displayName??$.username},$.id))]})]}),i.jsxs("label",{className:"form-field",children:[r("common.permission"),i.jsxs("select",{value:h,onChange:$=>p($.target.value),children:[i.jsx("option",{value:"read",children:r("common.readOnly")}),i.jsx("option",{value:"edit",children:r("common.readWrite")})]})]}),i.jsxs("button",{className:"primary icon-button",disabled:!u,onClick:()=>{N()},children:[i.jsx(Eo,{size:15}),r("projectSettings.addMember")]})]}),i.jsxs("div",{className:"shared-members-heading",children:[i.jsx("strong",{children:r("projectSettings.members")}),i.jsx("span",{children:a.length})]}),i.jsxs("div",{className:"shared-members",children:[a.map($=>i.jsxs("div",{className:"shared-member",children:[i.jsxs("span",{className:"member-identity",children:[i.jsx("span",{className:"member-avatar",children:($.displayName??$.username).slice(0,1).toLocaleUpperCase()}),i.jsxs("span",{children:[i.jsx("strong",{children:$.displayName??$.username}),i.jsxs("small",{children:["@",$.username]})]})]}),i.jsxs("span",{className:"member-controls",children:[i.jsxs("select",{"aria-label":r("common.permission"),disabled:!w,value:$.permission,onChange:O=>{L($,O.target.value)},children:[i.jsx("option",{value:"read",children:r("common.readOnly")}),i.jsx("option",{value:"edit",children:r("common.readWrite")})]}),w&&i.jsx("button",{className:"icon-only danger-text",title:r("common.remove"),"aria-label":r("common.remove"),onClick:()=>D($),children:i.jsx(nn,{size:15})})]})]},$.id)),a.length===0&&i.jsxs("div",{className:"share-empty",children:[i.jsx(Br,{size:24}),i.jsx("span",{children:r("projectSettings.noMembers")})]})]})]})}),i.jsx(_n,{open:!!m,title:r("projectSettings.removeTitle"),description:r("projectSettings.removeDescription",{username:m?.username??""}),confirmLabel:r("common.remove"),danger:!0,onCancel:()=>D(null),onConfirm:()=>{T()}})]})}const pw=f.lazy(()=>ns(()=>import("./GitDialog-ULwrGkKd.js"),__vite__mapDeps([8,1,3])).then(t=>({default:t.GitDialog}))),gw=f.lazy(()=>ns(()=>import("./HistoryDialog-BE7jyWWP.js"),__vite__mapDeps([9,1])).then(t=>({default:t.HistoryDialog}))),Dw=f.lazy(()=>ns(()=>import("./ProjectNavigationDialogs-BVE1JsHd.js"),__vite__mapDeps([10,1])).then(t=>({default:t.ProjectSearchDialog}))),yw=f.lazy(()=>ns(()=>import("./ProjectNavigationDialogs-BVE1JsHd.js"),__vite__mapDeps([10,1])).then(t=>({default:t.QuickOpenDialog})));function bw({user:t,project:e,projectId:n,activeFile:s,content:r,maxCitationBibtexBytes:a,files:o,directoryEntries:c,readOnly:l,workspaceLayout:u,changeWorkspaceLayout:d,resourcePreview:h,resourcePreviewLoading:p,setResourcePreview:m,setResourcePreviewLoading:D,uploadConflict:C,setUploadConflict:b,uploadFiles:w,cleanMode:x,setCleanMode:N,cleanCompile:L,newFileOpen:T,setNewFileOpen:_,newFilePath:$,setNewFilePath:O,newFolderOpen:J,setNewFolderOpen:z,newFolderName:ae,setNewFolderName:M,selectedFolder:K,fileDialogError:R,setFileDialogError:A,createFile:P,createFolder:pe,moveEntry:we,setMoveEntry:Fe,moveName:Ne,setMoveName:Ce,moveDestination:v,setMoveDestination:ue,movePath:Z,deleteEntry:Y,setDeleteEntry:ce,deleteActiveSessions:I,removePath:ie,commentOpen:j,setCommentOpen:me,selection:Ee,commentText:tt,setCommentText:Dt,addComment:Ye,shareOpen:Me,setShareOpen:Le,citationLibraryOpen:Ie,setCitationLibraryOpen:yt,insertCitationAtCursor:ot,quickOpen:ye,setQuickOpen:It,projectSearchOpen:he,setProjectSearchOpen:ve,openFile:Re,jumpToSource:bt,historyOpen:Ge,setHistoryOpen:G,gitOpen:De,setGitOpen:X,save:He,permissionDowngrade:Ve,permissionDowngradeBusy:mt,dismissPermissionDowngrade:ke,discardPermissionDraft:xt}){const{t:re}=Qe();return i.jsxs(i.Fragment,{children:[Ve&&i.jsx(ft,{open:!0,title:re("editor.collaboration.permissionDowngradeTitle"),description:Ve.localDraftReady&&Ve.otherTabDraft?re("editor.collaboration.permissionDowngradeMultipleDrafts"):Ve.otherTabDraft?re("editor.collaboration.permissionDowngradeOtherTab"):Ve.localDraftReady?re("editor.collaboration.permissionDowngradeDescription",{previous:re("common.readWrite")}):re("editor.collaboration.permissionDowngradeNoDraft"),onOpenChange:W=>{!W&&!mt&&ke()},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",disabled:mt,onClick:ke,children:Ve.localDraftReady?re("editor.collaboration.permissionDowngradeKeep"):re("common.close")}),!Ve.otherTabDraft&&i.jsxs("button",{type:"button",className:"danger",disabled:mt,onClick:()=>{xt()},children:[mt?i.jsx(Ze,{className:"spin",size:14}):Ve.localDraftReady?i.jsx(nn,{size:14}):i.jsx(Fo,{size:14}),Ve.localDraftReady?re("editor.collaboration.permissionDowngradeDiscard"):re("editor.collaboration.permissionDowngradeReload")]})]}),children:i.jsx("div",{})}),i.jsxs(ft,{open:!!h,extraWide:h?.kind==="image"||h?.kind==="pdf"||h?.kind==="text",title:h?.path??"",description:h?.kind==="large"?re("editor.resourceTooLarge",{size:Fw(h.size),limit:`${$o/1024/1024} MB`}):re(`editor.resourcePreview.${h?.kind??"text"}`),onOpenChange:W=>{W||(m(null),D(!1))},footer:h&&i.jsxs("a",{className:"primary resource-download",href:`${h.url}&download=1`,download:!0,children:[i.jsx(Tr,{size:14}),re("editor.downloadResource")]}),children:[h?.kind==="large"&&i.jsxs("div",{className:"resource-preview-message",children:[i.jsx(yo,{size:34}),i.jsx("strong",{children:re("editor.resourceTooLargeTitle")}),i.jsx("span",{children:re("editor.resourceTooLargeDescription")})]}),h?.kind==="unsupported"&&i.jsxs("div",{className:"resource-preview-message",children:[i.jsx(yo,{size:34}),i.jsx("strong",{children:re("editor.resourceUnsupportedTitle")}),i.jsx("span",{children:re("editor.resourceUnsupportedDescription")})]}),h?.kind==="image"&&i.jsx("div",{className:"resource-image-wrap",children:i.jsx("img",{className:"resource-image",src:h.url,alt:h.path})}),h?.kind==="pdf"&&i.jsx("iframe",{className:"resource-pdf",src:h.url,title:h.path}),h?.kind==="text"&&(p?i.jsxs("div",{className:"resource-preview-message",children:[i.jsx(Ze,{className:"spin",size:24}),i.jsx("span",{children:re("common.loading")})]}):i.jsx("pre",{className:"resource-text",children:h.content}))]}),i.jsx(_n,{open:!!C,title:re("editor.uploadOverwriteTitle"),description:re("editor.uploadOverwriteDescription",{files:C?.collisions.join(", ")??""}),confirmLabel:re("editor.uploadOverwrite"),danger:!0,onCancel:()=>b(null),onConfirm:()=>{const W=C;b(null),W&&w(W.files,new Set(W.collisions),W.directory)}}),i.jsx(_n,{open:!!x,title:re(x==="cache"?"editor.cleanCacheConfirmTitle":"editor.cleanArtifactsConfirmTitle"),description:re(x==="cache"?"editor.cleanCacheConfirmDescription":"editor.cleanArtifactsConfirmDescription"),confirmLabel:re("editor.cleanConfirm"),danger:x==="artifacts",onCancel:()=>N(null),onConfirm:()=>{const W=x;N(null),W&&L(W)}}),i.jsx(ft,{open:T,title:re("editor.newFile"),description:re("editor.newFileDescription"),onOpenChange:W=>{_(W),W||A("")},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>_(!1),children:re("common.cancel")}),i.jsx("button",{className:"primary",onClick:()=>{P()},children:re("common.create")})]}),children:i.jsxs(i.Fragment,{children:[R&&i.jsx("p",{className:"error dialog-error",children:R}),i.jsxs("label",{className:"form-field",children:[re("editor.filePath"),i.jsx("input",{autoFocus:!0,value:$,onChange:W=>O(W.target.value),onKeyDown:W=>{W.key==="Enter"&&!W.nativeEvent.isComposing&&(W.preventDefault(),P())}})]})]})}),i.jsx(ft,{open:J,title:re("editor.newFolder"),description:re("editor.folderDestination",{folder:K||re("editor.projectRoot")}),onOpenChange:W=>{z(W),W||A("")},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>z(!1),children:re("common.cancel")}),i.jsx("button",{className:"primary",onClick:()=>{pe()},children:re("common.create")})]}),children:i.jsxs(i.Fragment,{children:[R&&i.jsx("p",{className:"error dialog-error",children:R}),i.jsxs("label",{className:"form-field",children:[re("editor.folderName"),i.jsx("input",{autoFocus:!0,value:ae,onChange:W=>M(W.target.value),onKeyDown:W=>{W.key==="Enter"&&pe()}})]})]})}),i.jsx(ft,{open:!!we,title:re("editor.moveTitle",{name:we?.path.split("/").at(-1)??""}),description:re("editor.moveDescription"),onOpenChange:W=>{W||(Fe(null),Ce(""),A(""))},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>Fe(null),children:re("common.cancel")}),i.jsx("button",{className:"primary",disabled:!Ne.trim(),onClick:()=>{Z()},children:re("editor.moveApply")})]}),children:i.jsxs(i.Fragment,{children:[R&&i.jsx("p",{className:"error dialog-error",children:R}),i.jsxs("label",{className:"form-field",children:[re("editor.pathName"),i.jsx("input",{autoFocus:!0,value:Ne,onChange:W=>Ce(W.target.value),onKeyDown:W=>{W.key==="Enter"&&Z()}})]}),i.jsxs("label",{className:"form-field",children:[re("editor.destinationFolder"),i.jsxs("select",{value:v,onChange:W=>ue(W.target.value),children:[i.jsx("option",{value:"",children:re("editor.projectRoot")}),c.filter(W=>we?.type!=="directory"||W.path!==we.path&&!W.path.startsWith(`${we.path}/`)).map(W=>i.jsx("option",{value:W.path,children:W.path},W.path))]})]})]})}),i.jsx(ft,{open:!!Y,title:re("editor.deletePathTitle",{name:Y?.path.split("/").at(-1)??""}),description:I.length?re("editor.deletePathActiveDescription",{path:Y?.path??"",users:[...new Set(I.map(W=>W.name))].join(", ")}):re("editor.deletePathDescription",{path:Y?.path??""}),onOpenChange:W=>{W||(ce(null),A(""))},footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>ce(null),children:re("common.cancel")}),i.jsx("button",{className:"danger",onClick:()=>{ie()},children:re("common.delete")})]}),children:i.jsxs(i.Fragment,{children:[R&&i.jsx("p",{className:"error dialog-error",children:R}),I.length>0&&i.jsxs("p",{className:"warning",children:[i.jsx(en,{size:15}),re("editor.deletePathWillClose")]})]})}),i.jsxs(ft,{open:j,title:re("editor.addComment"),description:Ee.selectedText?re("editor.commentDescription",{count:Ee.endOffset-Ee.startOffset}):re("editor.pointComment"),onOpenChange:me,footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>me(!1),children:re("common.cancel")}),i.jsx("button",{className:"primary",onClick:()=>{Ye()},children:re("editor.addComment")})]}),children:[i.jsxs("label",{className:"form-field",children:[re("editor.commentContent"),i.jsx("textarea",{autoFocus:!0,rows:5,value:tt,onChange:W=>Dt(W.target.value),onKeyDown:W=>{(W.ctrlKey||W.metaKey)&&W.key==="Enter"&&!W.nativeEvent.isComposing&&(W.preventDefault(),W.stopPropagation(),Ye())}})]}),Ee.selectedText&&i.jsx("blockquote",{className:"selection-preview",children:Ee.selectedText})]}),i.jsx(mw,{open:Me,onOpenChange:Le,project:e,projectId:n}),i.jsx(nh,{open:Ie,onOpenChange:yt,currentFile:s,currentSource:r,readOnly:l,currentUserId:t.id,maxBibtexBytes:a,onInsert:ot}),ye&&i.jsx(f.Suspense,{fallback:null,children:i.jsx(yw,{open:!0,files:o,onOpenChange:It,onOpenFile:W=>{const pt=o.find(zt=>zt.path===W);pt&&Re(pt)}})}),he&&i.jsx(f.Suspense,{fallback:null,children:i.jsx(Dw,{open:!0,project:e,onOpenChange:ve,onJump:(W,pt,zt)=>{u==="pdf-only"&&d("editor-pdf"),bt(W,pt,zt)}})}),Ge&&i.jsx(f.Suspense,{fallback:null,children:i.jsx(gw,{open:!0,onOpenChange:G,project:e,onBeforeMutation:e.permission==="read"?async()=>!0:He})}),e.ownerId===t.id&&De&&i.jsx(f.Suspense,{fallback:null,children:i.jsx(pw,{open:!0,onOpenChange:X,project:e,onBeforeMutation:He})})]})}function Fw(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}function Cw({name:t,state:e,label:n,reloadLabel:s,onReload:r,compact:a=!1}){const o=e.status==="loading"?i.jsx(Ze,{className:"spin",size:14}):e.status==="working"?i.jsx(_d,{size:14}):i.jsx(vD,{size:14}),c=i.jsxs(i.Fragment,{children:[o,i.jsx("strong",{children:t}),i.jsx("span",{children:n}),e.status==="error"&&i.jsxs("button",{type:"button",className:"browser-tool-reload",title:s,"aria-label":s,onClick:r,children:[i.jsx(Fo,{size:12}),s]})]});return a?i.jsxs("span",{className:`browser-tool-status compact ${e.status}`,role:"status","aria-live":"polite","aria-label":`${t}: ${n}`,title:e.error||void 0,children:[o,i.jsx("span",{children:n}),e.status==="error"&&i.jsx("button",{type:"button",className:"browser-tool-reload",title:s,"aria-label":s,onClick:r,children:i.jsx(Fo,{size:12})})]}):i.jsx("div",{className:`browser-tool-status ${e.status}`,title:e.error||void 0,children:c})}function ww({project:t,projectId:e,site:n,files:s,dictionaryWords:r,onDictionaryChange:a,editorPreferences:o,onEditorPreferences:c,spellCheckCount:l,spellCheckUniqueCount:u,spellCheckIndex:d,onSpellCheckNavigate:h,onProject:p}){const{t:m}=Qe(),[D,C]=f.useState(t.engine),[b,w]=f.useState(""),[x,N]=f.useState(t.name),[L,T]=f.useState(t.mainFile),[_,$]=f.useState(null),[O,J]=f.useState(""),[z,ae]=f.useState(""),[M,K]=f.useState(""),[R,A]=f.useState("appearance"),[P,pe]=f.useState(o),we=f.useSyncExternalStore(Qt.subscribe,Qt.getSnapshot,Qt.getSnapshot),Fe=t.permission==="owner",Ne=t.permission!=="read",Ce=t.permission!=="read";f.useEffect(()=>pe(o),[o]),f.useEffect(()=>{dh().catch(Qt.failed)},[e]);const v=()=>{g2().catch(Qt.failed)};f.useEffect(()=>{if(!t.latexmkrc)return w("");te(`/api/projects/${e}/file?path=${encodeURIComponent(t.latexmkrc)}`).then(({content:j})=>w(j)).catch(j=>J(de(j)))},[t.latexmkrc]),f.useEffect(()=>{if(R!=="compiler")return;const j=new AbortController;return $(null),te(`/api/projects/${e}/main-files`,{signal:j.signal}).then(me=>$(me.mainFiles)).catch(me=>{me instanceof Error&&me.name==="AbortError"||J(de(me))}),()=>j.abort()},[e,s,R]);const ue=_??[t.mainFile],Z=_!==null&&!_.includes(L),Y=async()=>{try{const j=b.trim()&&n.allowProjectLatexmkrc!==!1?".latexmkrc":null;j&&await te(`/api/projects/${e}/file`,{method:"PUT",body:JSON.stringify({path:j,content:b})});const me=await te(`/api/projects/${e}`,{method:"PATCH",body:JSON.stringify({name:x,mainFile:L,engine:D,latexmkrc:j})});p(me.project)}catch(j){J(de(j))}},ce=()=>c(P),I=async()=>{const j=z.trim();if(j)try{const me=await te(`/api/projects/${e}/dictionary`,{method:"POST",body:JSON.stringify({word:j})});a(me.words),ae(""),K("")}catch(me){K(de(me))}},ie=async j=>{try{const me=await te(`/api/projects/${e}/dictionary/${encodeURIComponent(j)}`,{method:"DELETE"});a(me.words),K("")}catch(me){K(de(me))}};return i.jsxs("div",{className:"settings padded",children:[O&&i.jsx("p",{className:"error",children:O}),i.jsxs("div",{className:"settings-tabs",role:"tablist","aria-label":m("common.settings"),children:[i.jsxs("button",{id:"settings-tab-appearance",type:"button",role:"tab","aria-selected":R==="appearance","aria-controls":"settings-panel-appearance",className:`settings-tab${R==="appearance"?" active":""}`,onClick:()=>A("appearance"),children:[i.jsx(wo,{size:15}),m("projectSettings.editorTab")]}),i.jsxs("button",{id:"settings-tab-compiler",type:"button",role:"tab","aria-selected":R==="compiler","aria-controls":"settings-panel-compiler",className:`settings-tab${R==="compiler"?" active":""}`,onClick:()=>A("compiler"),children:[i.jsx(Co,{size:15}),m("projectSettings.compilerTab")]})]}),R==="appearance"?i.jsxs("section",{id:"settings-panel-appearance",role:"tabpanel","aria-labelledby":"settings-tab-appearance",children:[i.jsxs("div",{className:"settings-section-title",children:[i.jsx(wo,{size:15}),i.jsx("strong",{children:m("projectSettings.editorAppearance")})]}),i.jsx("p",{className:"settings-description appearance-description",children:m("projectSettings.editorAppearanceDescription")}),i.jsxs("label",{children:[m("projectSettings.fontFamily"),i.jsx("select",{value:P.font,onChange:j=>pe({...P,font:j.target.value}),children:Ni.map(j=>i.jsx("option",{value:j.id,children:m(j.labelKey)},j.id))})]}),i.jsxs("label",{children:[m("projectSettings.fontSize"),i.jsx("select",{value:P.fontSize,onChange:j=>pe({...P,fontSize:Number(j.target.value)}),children:[12,13,14,15,16,18,20].map(j=>i.jsxs("option",{value:j,children:[j," px"]},j))})]}),i.jsxs("label",{children:[m("projectSettings.lineHeight"),i.jsxs("select",{value:P.lineHeight,onChange:j=>pe({...P,lineHeight:Number(j.target.value)}),children:[i.jsx("option",{value:1.45,children:m("projectSettings.lineHeightCompact")}),i.jsx("option",{value:1.65,children:m("projectSettings.lineHeightNormal")}),i.jsx("option",{value:1.85,children:m("projectSettings.lineHeightRelaxed")})]})]}),i.jsxs("label",{className:"editor-checkbox",children:[i.jsx("input",{type:"checkbox",checked:P.lineWrapping,onChange:j=>pe({...P,lineWrapping:j.target.checked})}),i.jsx(I1,{size:15}),i.jsx("span",{children:m("projectSettings.lineWrapping")})]}),i.jsxs("div",{className:"editor-preference",children:[i.jsxs("label",{className:"editor-checkbox",children:[i.jsx("input",{type:"checkbox",checked:P.mathPreviewOnHover,onChange:j=>pe({...P,mathPreviewOnHover:j.target.checked})}),i.jsx(Yd,{size:15}),i.jsx("span",{children:m("projectSettings.mathPreviewOnHover")})]}),i.jsx("p",{className:"field-hint",children:m("projectSettings.mathPreviewOnHoverDescription")})]}),i.jsxs("div",{className:"editor-preference",children:[i.jsxs("label",{className:"editor-checkbox",children:[i.jsx("input",{type:"checkbox",checked:P.spellCheck,onChange:j=>pe({...P,spellCheck:j.target.checked})}),i.jsx("span",{children:m("projectSettings.spellCheck")})]}),i.jsxs("p",{className:"field-hint",children:[m("projectSettings.writingCheckDescription")," ",i.jsx("a",{href:"https://writewithharper.com/docs/integrations/language-server",target:"_blank",rel:"noreferrer",children:"Harper"})]})]}),i.jsxs("div",{className:"editor-preference",children:[i.jsxs("label",{className:"editor-checkbox",children:[i.jsx("input",{type:"checkbox",checked:P.vimMode,onChange:j=>pe({...P,vimMode:j.target.checked})}),i.jsx("span",{children:m("projectSettings.vimMode")})]}),i.jsxs("p",{className:"field-hint",children:[m("projectSettings.vimModeDescription")," ",i.jsx("a",{href:"https://replit-codemirror-vim.mintlify.app/",target:"_blank",rel:"noreferrer",children:m("projectSettings.vimHelp")})]})]}),i.jsxs("div",{className:"editor-preference",children:[i.jsxs("label",{className:"editor-checkbox",children:[i.jsx("input",{type:"checkbox",checked:P.openFilesInTabs,onChange:j=>pe({...P,openFilesInTabs:j.target.checked})}),i.jsx(h1,{size:15}),i.jsx("span",{children:m("projectSettings.openFilesInTabs")})]}),i.jsx("p",{className:"field-hint",children:m("projectSettings.openFilesInTabsDescription")})]}),i.jsxs("div",{className:"editor-preference",children:[i.jsxs("label",{className:"editor-checkbox",children:[i.jsx("input",{type:"checkbox",disabled:!Ne,checked:P.formatOnCompile,onChange:j=>pe({...P,formatOnCompile:j.target.checked})}),i.jsx(Od,{size:15}),i.jsx("span",{children:m("projectSettings.formatOnCompile")})]}),i.jsxs("p",{className:"field-hint",children:[m(Ne?"projectSettings.formatOnCompileDescription":"projectSettings.formatRequiresWrite")," ",m("projectSettings.formatterDescription")," ",i.jsx("a",{href:"https://www.npmjs.com/package/tex-fmt",target:"_blank",rel:"noreferrer",children:m("projectSettings.formatterInstall")})," · ",i.jsx("a",{href:"https://github.com/FlamingTempura/bibtex-tidy",target:"_blank",rel:"noreferrer",children:m("projectSettings.bibtexTidyInstall")})]})]}),i.jsxs("div",{className:"editor-preference",children:[i.jsxs("label",{className:"tex-fmt-options-field",children:[i.jsxs("span",{className:"tex-fmt-options-heading",children:[i.jsx("span",{children:m("projectSettings.texFmtOptions")}),i.jsx(Cw,{compact:!0,name:"tex-fmt",state:we,label:m(`projectSettings.toolStatus.${we.status}`),reloadLabel:m("projectSettings.reloadTool"),onReload:v})]}),i.jsx("textarea",{className:"tex-fmt-options-editor",rows:6,maxLength:16*1024,spellCheck:!1,value:P.texFmtConfig,placeholder:m("projectSettings.texFmtOptionsPlaceholder"),onChange:j=>pe({...P,texFmtConfig:j.target.value})})]}),i.jsx("p",{className:"field-hint",children:m("projectSettings.texFmtOptionsDescription")})]}),l!==null&&i.jsxs("div",{className:`spell-check-result${l?" has-issues":""}`,role:"status","aria-live":"polite",children:[i.jsx(v1,{size:14}),i.jsx("span",{children:l?m("projectSettings.writingIssues",{count:l,uniqueCount:u??0}):m("projectSettings.noWritingIssues")}),l>0&&i.jsxs("span",{className:"spell-check-controls",children:[i.jsx("button",{type:"button",title:m("projectSettings.spellCheckFirst"),"aria-label":m("projectSettings.spellCheckFirst"),disabled:d<=0,onClick:()=>h(0),children:i.jsx(ED,{size:14})}),i.jsx("button",{type:"button",title:m("projectSettings.spellCheckPrevious"),"aria-label":m("projectSettings.spellCheckPrevious"),disabled:d<=0,onClick:()=>h(d-1),children:i.jsx(Er,{size:14})}),i.jsx("span",{className:"spell-check-position",children:m("projectSettings.spellCheckPosition",{current:Math.min(d+1,l),total:l})}),i.jsx("button",{type:"button",title:m("projectSettings.spellCheckNext"),"aria-label":m("projectSettings.spellCheckNext"),disabled:d>=l-1,onClick:()=>h(d+1),children:i.jsx(Sr,{size:14})}),i.jsx("button",{type:"button",title:m("projectSettings.spellCheckLast"),"aria-label":m("projectSettings.spellCheckLast"),disabled:d>=l-1,onClick:()=>h(l-1),children:i.jsx(xD,{size:14})})]})]}),i.jsxs("div",{className:"settings-section-title",children:[i.jsx(Qi,{size:15}),i.jsx("strong",{children:m("projectSettings.dictionary")})]}),i.jsx("p",{className:"settings-description",children:m("projectSettings.dictionaryDescription")}),M&&i.jsx("p",{className:"error dictionary-error",children:M}),Ce&&i.jsxs("div",{className:"dictionary-add",children:[i.jsx("input",{value:z,placeholder:m("projectSettings.dictionaryPlaceholder"),onChange:j=>ae(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),I())}}),i.jsx("button",{type:"button",disabled:!z.trim(),onClick:()=>{I()},children:m("projectSettings.addWord")})]}),i.jsxs("div",{className:"dictionary-words",children:[r.map(j=>i.jsxs("span",{className:"dictionary-word",children:[i.jsx("code",{children:j}),Ce&&i.jsx("button",{type:"button",title:m("common.delete"),"aria-label":`${m("common.delete")} ${j}`,onClick:()=>{ie(j)},children:i.jsx(Ht,{size:13})})]},j)),r.length===0&&i.jsx("span",{className:"dictionary-empty",children:m("projectSettings.dictionaryEmpty")})]}),i.jsx("div",{className:"settings-actions",children:i.jsxs("button",{className:"settings-save",onClick:ce,children:[i.jsx(ji,{size:15}),m("projectSettings.saveAppearance")]})})]}):i.jsxs("section",{id:"settings-panel-compiler",role:"tabpanel","aria-labelledby":"settings-tab-compiler",children:[i.jsxs("div",{className:"settings-section-title",children:[i.jsx(Co,{size:15}),i.jsx("strong",{children:m("projectSettings.compilerTab")})]}),i.jsx("p",{className:"settings-description compiler-description",children:m("projectSettings.compilerDescription")}),i.jsxs("label",{children:[m("projects.name"),i.jsx("input",{disabled:!Fe,value:x,onChange:j=>N(j.target.value)})]}),i.jsxs("label",{children:[m("projectSettings.mainFile"),i.jsxs("select",{disabled:!Fe||_===null||_.length===0,value:L,onChange:j=>T(j.target.value),children:[Z&&i.jsx("option",{value:L,disabled:!0,children:m("projectSettings.invalidMainFileOption",{path:L})}),ue.map(j=>i.jsx("option",{value:j,children:j},j))]})]}),i.jsxs("label",{children:[m("projectSettings.engine"),i.jsx("select",{disabled:!Fe,value:D,onChange:j=>C(j.target.value),children:(n.allowedEngines??["pdflatex","xelatex","lualatex"]).map(j=>i.jsx("option",{children:j},j))})]}),i.jsxs("label",{children:[m("projectSettings.latexmkrc"),i.jsx("textarea",{className:"latexmkrc-editor",rows:10,spellCheck:!1,disabled:!Fe||n.allowProjectLatexmkrc===!1,value:b,placeholder:m("projectSettings.latexmkrcPlaceholder"),onChange:j=>w(j.target.value)})]}),i.jsx("div",{className:"settings-actions",children:Fe&&i.jsxs("button",{className:"settings-save",onClick:()=>{Y()},children:[i.jsx(ji,{size:15}),m("projectSettings.saveCompiler")]})})]})]})}function Ew({sidePanel:t,onClose:e,project:n,projectId:s,site:r,files:a,currentUserId:o,comments:c,onFocusComment:l,onToggleComment:u,onReplyComment:d,onEditComment:h,onDeleteComment:p,onEditCommentReply:m,onDeleteCommentReply:D,dictionaryWords:C,onDictionaryChange:b,editorPreferences:w,onEditorPreferences:x,spellCheckCount:N,spellCheckUniqueCount:L,spellCheckIndex:T,onSpellCheckNavigate:_,onProject:$}){const{t:O}=Qe();return t?i.jsxs(i.Fragment,{children:[i.jsx(zo,{className:"resize-handle"}),i.jsx(Yi,{id:"context",order:4,defaultSize:20,minSize:15,maxSize:38,children:i.jsxs("aside",{className:"context-panel",children:[i.jsxs("div",{className:"drawer-title",children:[i.jsx("strong",{children:O(t==="comments"?"editor.sourceComments":"editor.projectSettings")}),i.jsx("button",{"aria-label":O("common.close"),onClick:e,children:i.jsx(Ht,{size:17})})]}),t==="comments"&&i.jsxs("div",{className:"comments",children:[c.map(J=>i.jsx(fw,{comment:J,currentUserId:o,onFocus:()=>l(J),onToggle:()=>{u(J)},onReply:z=>d(J,z),onEdit:z=>h(J,z),onDelete:()=>p(J),onEditReply:(z,ae)=>m(J,z,ae),onDeleteReply:z=>D(J,z)},J.id)),c.length===0&&i.jsx("p",{className:"muted padded",children:O("editor.noComments")})]}),t==="settings"&&i.jsx(ww,{project:n,projectId:s,site:r,files:a,dictionaryWords:C,onDictionaryChange:b,editorPreferences:w,onEditorPreferences:x,spellCheckCount:N,spellCheckUniqueCount:L,spellCheckIndex:T,onSpellCheckNavigate:_,onProject:$})]})})]}):null}function xw({open:t,mode:e,path:n,busy:s,error:r,result:a,onOpenChange:o}){const{t:c}=Qe(),l=c(e==="full"?"editor.wordCountFullHint":"editor.wordCountSelectionHint");return i.jsxs(ft,{open:t,title:c("editor.wordCountTitle"),description:l,onOpenChange:o,footer:i.jsx("button",{type:"button",onClick:()=>o(!1),children:c("common.close")}),children:[n&&i.jsxs("p",{className:"word-count-source",children:[c(e==="full"?"editor.wordCountFull":"editor.wordCountSelection")," · ",i.jsx("code",{children:n}),i.jsx("a",{href:"https://app.uio.no/ifi/texcount/",target:"_blank",rel:"noreferrer",children:c("editor.wordCountHelp")})]}),i.jsx("p",{className:"word-count-template-note",children:c("editor.wordCountTemplateNote")}),s&&i.jsxs("div",{className:"word-count-loading",role:"status","aria-live":"polite",children:[i.jsx(Ze,{className:"spin",size:22}),i.jsx("span",{children:c("editor.wordCountLoading")})]}),r&&i.jsx("p",{className:"error dialog-error",children:r}),a&&!s&&i.jsxs("div",{className:"word-count-result","aria-live":"polite",children:[i.jsxs("div",{className:"word-count-totals",children:[i.jsxs("div",{className:"word-count-total",children:[i.jsx(bo,{size:20}),i.jsx("strong",{children:a.totalWords.toLocaleString()}),i.jsx("span",{children:c("editor.wordCountTotal")})]}),i.jsxs("div",{className:"word-count-total word-count-characters",children:[i.jsx(wo,{size:20}),i.jsx("strong",{children:a.totalCharacters.toLocaleString()}),i.jsxs("span",{children:[c("editor.wordCountCharacters"),i.jsx("small",{children:c("editor.wordCountCharactersHint")})]})]})]}),i.jsxs("dl",{className:"word-count-breakdown",children:[i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountText")}),i.jsxs("dd",{children:[a.textWords.toLocaleString(),i.jsx("small",{children:c("editor.wordCountWordsUnit")})]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountHeaders")}),i.jsxs("dd",{children:[a.headerWords.toLocaleString(),i.jsx("small",{children:c("editor.wordCountWordsUnit")})]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountCaptions")}),i.jsxs("dd",{children:[a.captionWords.toLocaleString(),i.jsx("small",{children:c("editor.wordCountWordsUnit")})]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountFloats")}),i.jsxs("dd",{children:[a.floats.toLocaleString(),i.jsx("small",{children:c("editor.wordCountItemsUnit")})]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountInlineMath")}),i.jsxs("dd",{children:[a.inlineMath.toLocaleString(),i.jsx("small",{children:c("editor.wordCountExpressionsUnit")})]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountDisplayMath")}),i.jsxs("dd",{children:[a.displayMath.toLocaleString(),i.jsx("small",{children:c("editor.wordCountExpressionsUnit")})]})]}),a.files!==null&&i.jsxs("div",{children:[i.jsx("dt",{children:c("editor.wordCountFiles")}),i.jsxs("dd",{children:[a.files.toLocaleString(),i.jsx("small",{children:c("editor.wordCountItemsUnit")})]})]})]}),a.parserErrors>0&&i.jsxs("p",{className:"warning word-count-warning",children:[i.jsx(en,{size:14}),c("editor.wordCountParserErrors",{count:a.parserErrors})]})]})]})}function Ss(t){return t instanceof Error&&t.name==="AbortError"}function vw({site:t,user:e,projectId:n,preload:s,onBack:r}){const{t:a}=Qe(),[o,c]=f.useState(null),[l,u]=f.useState(!1),[d,h]=f.useState([]),[p,m]=f.useState(null),[D,C]=f.useState([]),[b,w]=f.useState(""),[x,N]=f.useState(""),[L,T]=f.useState(new Set),[_,$]=f.useState(""),[O,J]=f.useState(""),[z,ae]=f.useState(!1),[M,K]=f.useState("editor.saved"),[R,A]=f.useState(null),P=f.useRef(R);P.current=R;const[pe,we]=f.useState({line:1,column:1}),Fe=f.useRef(pe),Ne=f.useRef(0),[Ce,v]=f.useState("pdf"),[ue,Z]=f.useState("log"),Y=k=>{if(k==="pdf"){v("pdf");return}if(k==="diagnostics"){v("diagnostics");return}Z(k),v("diagnostics")},{workspaceLayout:ce,setWorkspaceLayout:I}=ZC(e.id,n),[ie,j]=f.useState(""),[me,Ee]=f.useState(""),[tt,Dt]=f.useState({selectedText:"",startOffset:0,endOffset:0}),Ye=f.useRef({selectedText:"",startOffset:0,endOffset:0}),Me=k=>{Ye.current=k,Dt(k)},[Le,Ie]=f.useState(null),[yt,ot]=f.useState(!1),[ye,It]=f.useState(!1),[he,ve]=f.useState(!1),[Re,bt]=f.useState(!1),[Ge,G]=f.useState(!1),[De,X]=f.useState(null),[He,Ve]=f.useState(!1),[mt,ke]=f.useState(!1),[xt,re]=f.useState(!1),[W,pt]=f.useState("full"),[zt,Gt]=f.useState(""),[lt,rn]=f.useState(!1),[yn,Yt]=f.useState(""),[S,oe]=f.useState(null),[le,Ae]=f.useState(!1),[vt,ut]=f.useState(null),[g,E]=f.useState(""),[y,H]=f.useState(!1),[q,ee]=f.useState(()=>Ql(e.id,n)),[V,fe]=f.useState([]),xe=f.useRef([]);xe.current=V;const qe=f.useRef(null),Oe=f.useRef(null),Se=f.useRef(0),st=f.useRef(0),gt=f.useRef(""),Ue=f.useRef(""),rt=f.useRef(""),at=f.useRef(0),Xe=f.useRef(null),Ft=f.useRef(null),Tt=f.useRef(null),ct=f.useRef(null),$e=f.useRef(null),qt=f.useRef(!1),Mt=f.useRef(null),rs=f.useRef(r);rs.current=r,rt.current=x,f.useEffect(()=>{if(!me)return;const k=window.setTimeout(()=>Ee(""),3e3);return()=>window.clearTimeout(k)},[me]);const Un=(k,U,se=0)=>{const Q={line:k,column:U};Fe.current=Q,Ne.current=se,we(Q)},Sn=k=>{const U=xe.current,se=k(U);se!==U&&(xe.current=se,fe(se))};f.useEffect(()=>{xe.current=[],fe([]),ut(null),E(""),$e.current?.abort(),$e.current=null,re(!1),rn(!1),Yt(""),oe(null)},[n]);const Tn=k=>{const U=xe.current,se=U.indexOf(k);if(se<0)return;const Q=U.filter(ze=>ze!==k);if(xe.current=Q,fe(Q),Ue.current!==k)return;const Te=Q.length>0?Q[Math.min(se,Q.length-1)]:o?.mainFile??"";w(Te)},{collaboration:Je,status:Hn,synced:kt,activeSessions:Jr,formatLeaseStates:fa,compileState:Bn,setCompileState:Zr,filesEvent:Ct,commentsRevision:ma,dictionaryRevision:or,localDraftReady:cr,permission:lr,reconnect:Qr,protocolUpgradeRequired:ei,permissionDowngrade:ti,dismissPermissionDowngrade:ws,discardLocalDraft:ur}=HC(n,e,x,o?.permission??"read",l,()=>K("editor.offlineDraft")),{pdfTarget:pa,pdfViewport:ni,sourceJump:F,setPdfViewport:ne,clearPdfViewport:ge,jumpToSource:We,syncSourceToPdf:dt,syncPdfToSource:At,syncVisiblePdfToSource:Nn}=JC({projectId:n,mainFile:x,activeFile:b,onActiveFile:w,onError:j,onShowPdf:()=>Y("pdf")}),Nt=XC({active:!!(o&&b&&kt&&q.spellCheck),projectId:n,activeFile:b,content:_,dictionaryWords:d});f.useEffect(()=>{ee(Ql(e.id,n))},[e.id,n]);const Vn=k=>{gt.current=k,$(k)};f.useEffect(()=>{if(Ue.current=b,Fe.current={line:1,column:1},Ne.current=0,we({line:1,column:1}),Me({selectedText:"",startOffset:0,endOffset:0}),!q.openFilesInTabs){xe.current.length>0&&(xe.current=[],fe([]));return}b&&Sn(k=>k.includes(b)?k:[...k,b])},[b,q.openFilesInTabs,n]),f.useEffect(()=>{if(!z)return;const k=U=>{U.preventDefault(),U.returnValue=""};return window.addEventListener("beforeunload",k),()=>window.removeEventListener("beforeunload",k)},[z]),f.useEffect(()=>{if(Hn!=="disconnected")return;const k=new AbortController;return te(`/api/projects/${n}`,{signal:k.signal}).then(({project:U})=>{k.signal.aborted||(c(U),j(""))}).catch(U=>{if(!Ss(U)){if(U instanceof Yn&&[401,403,404].includes(U.status)){j(de(U)),rs.current();return}j(a("errors.collaborationUnavailable"))}}),()=>k.abort()},[Hn,n,a]);const bn=async(k={})=>{Xe.current?.abort(),Xe.current=null;const U=k.signal?null:new AbortController;U&&(Xe.current=U);try{const se=await te(`/api/projects/${n}/completions`,{signal:k.signal??U?.signal});(!k.isCurrent||k.isCurrent())&&m(se.index)}catch(se){if(Ss(se))return;(!k.isCurrent||k.isCurrent())&&m(null)}finally{U&&Xe.current===U&&(Xe.current=null)}},dr=async(k={},U=rt.current)=>{Ft.current?.abort(),Ft.current=null;const se=k.signal?null:new AbortController;se&&(Ft.current=se);try{const Q=U?`?mainFile=${encodeURIComponent(U)}`:"",Te=await te(`/api/projects/${n}/outline${Q}`,{signal:k.signal??se?.signal});(!k.isCurrent||k.isCurrent())&&C(Te.outline)}catch(Q){!Ss(Q)&&(!k.isCurrent||k.isCurrent())&&C([])}finally{se&&Ft.current===se&&(Ft.current=null)}},zc=async(k={})=>{Tt.current?.abort(),Tt.current=null;const U=k.signal?null:new AbortController;U&&(Tt.current=U);try{const se=await te(`/api/projects/${n}/dictionary`,{signal:k.signal??U?.signal});(!k.isCurrent||k.isCurrent())&&h(se.words)}catch(se){if(Ss(se))return;(!k.isCurrent||k.isCurrent())&&h([])}finally{U&&Tt.current===U&&(Tt.current=null)}};f.useEffect(()=>{let k=!1;const U=++at.current,se=new AbortController,Q=()=>!k&&at.current===U;let Te=!1;c(null),Vc([]),C([]),w(""),N(""),T(new Set),$(""),J(""),Zr(null),ge(),m(null),h([]),Ji();const ze=(s?.projectId===n?s.project:te(`/api/projects/${n}`,{signal:se.signal})).then(_t=>{Q()&&(Te=!0,c(_t.project),w(_t.project.mainFile),N(_t.project.mainFile),T(new Set),Zc(new Set(Fr(_t.project.mainFile))))}).catch(_t=>{Q()&&j(de(_t))}),je=te(`/api/projects/${n}/files`,{signal:se.signal}).then(_t=>{Q()&&Vc(_t.files)}).catch(_t=>{Q()&&j(de(_t))});let an=null;return Promise.allSettled([ze,je]).then(()=>{!Q()||!Te||(an=window.setTimeout(()=>{Q()&&Promise.all([bn({signal:se.signal,isCurrent:Q}),zc({signal:se.signal,isCurrent:Q})])},0))}),()=>{k=!0,an!==null&&window.clearTimeout(an),se.abort(),Xe.current?.abort(),Xe.current=null,Ft.current?.abort(),Ft.current=null,Tt.current?.abort(),Tt.current=null,ct.current?.abort(),ct.current=null}},[n,s]),f.useEffect(()=>{or&&zc()},[or,n]),f.useEffect(()=>{!o||Hn!=="connected"||lr===o.permission||c(k=>k&&{...k,permission:lr})},[lr,o?.permission]),f.useEffect(()=>{if(!Ct)return;const k=Ct.kind==="delete"&&!!Ct.path&&os(Ct.path,Ue.current),U=Ct.kind==="delete"&&!!Ct.path&&os(Ct.path,rt.current);if(Ct.kind==="move"&&Ct.source&&Ct.destination){const Q=Ct.source,Te=Ct.destination,ze=je=>je===Q?Te:je.startsWith(`${Q}/`)?`${Te}${je.slice(Q.length)}`:je;w(je=>ze(je)),N(je=>ze(je)),T(je=>new Set([...je].map(ze))),Da(je=>je&&ze(je)),Sn(je=>je.map(ze))}k&&(w(""),J(""),Vn(""),Ee(a("editor.fileDeletedByCollaborator",{path:Ct.path}))),Ct.kind==="delete"&&Ct.path&&(T(Q=>new Set([...Q].filter(Te=>!os(Ct.path,Te)))),Da(Q=>os(Ct.path,Q)?"":Q),Kc(Q=>Q&&os(Ct.path,Q.path)?null:Q),Sn(Q=>Q.filter(Te=>!os(Ct.path,Te)))),ct.current?.abort();const se=new AbortController;ct.current=se,Promise.all([Zf({signal:se.signal}),te(`/api/projects/${n}`,{signal:se.signal})]).then(([Q,Te])=>{if(c(Te.project),U&&N(Te.project.mainFile),k&&Q){const ze=Q.find(je=>je.type==="file"&&je.path===Te.project.mainFile)??Q.find(je=>je.type==="file"&&Vs(je.path));w(ze?.path??"")}bn({signal:se.signal}),dr({signal:se.signal},U?Te.project.mainFile:rt.current)}).catch(Q=>{Ss(Q)}).finally(()=>{ct.current===se&&(ct.current=null)})},[Ct?.revision]),f.useEffect(()=>{if(Je.setActiveFile(b),!b)return;J(""),K("editor.loading");const k=Je.getText(b),U=(se,Q)=>{Vn(k.toString()),J(b),Q?.local&&o?.permission!=="read"?(Se.current+=1,ae(!0),K("editor.pending")):Se.current<=st.current&&K(P.current?"editor.savedAt":"editor.saved")};return k.observe(U),(kt||cr)&&U(),()=>{k.unobserve(U)}},[b,Je,kt,cr,o?.permission]);const si=async()=>{if(!kt)throw new Error("Collaboration is not synchronized");const k=Se.current,U=await Je.flush();return st.current=Math.max(st.current,k),A(U.persistedAt),/\.tex$/i.test(Ue.current)&&dr(),Se.current===k?(ae(!1),K("editor.savedAt")):K("editor.pending"),U};f.useEffect(()=>{if(!z||!b)return;if(!kt){K("editor.offlineDraft");return}K("editor.pending");const k=window.setTimeout(()=>{K("editor.saving"),si().catch(()=>{K(Je.connected?"editor.saveFailed":"editor.offlineDraft")})},750);return()=>window.clearTimeout(k)},[_,z,b,kt]);const hr=async()=>{if(!o||o.permission==="read"||!kt||!b)return!1;K("editor.saving");try{return await si(),bn(),!0}catch(k){return K("editor.saveFailed"),j(de(k)||a("errors.collaborationUnavailable")),!1}},Gf=async k=>{if(!o||lt)return;const U=k==="full"?rt.current||o.mainFile:Ue.current,se=k==="selection"?Ye.current.selectedText:"";if(!U)return;if(k==="selection"&&(!se.trim()||!/\.(?:tex|sty|cls)$/i.test(U))){Ee(a("editor.wordCountSelectionEmpty"));return}$e.current?.abort();const Q=new AbortController;$e.current=Q,pt(k),Gt(U),oe(null),Yt(""),re(!0),rn(!0);try{if(k==="full"&&z&&o.permission!=="read"&&!await hr())throw new Error(a("editor.wordCountSaveRequired"));const Te=k==="selection"?{mode:k,path:U,source:se}:{mode:k,mainFile:U},ze=await te(`/api/projects/${n}/word-count`,{method:"POST",body:JSON.stringify(Te),signal:Q.signal});if(Q.signal.aborted)return;oe(ze)}catch(Te){if(Ss(Te))return;Q.signal.aborted||Yt(de(Te))}finally{$e.current===Q&&($e.current=null,rn(!1))}},ga=async(k,U,se=q.texFmtConfig)=>{if(/\.bib$/i.test(k))try{return{formatted:H1(U,t.maxCitationBibtexBytes),diagnostics:""}}catch(Te){throw Te instanceof xo?Te.kind==="too-large"?new Error(a("citationLibrary.fileTooLarge",{size:vo(t.maxCitationBibtexBytes)})):new Error(a("citationLibrary.fileInvalid")):Te}const Q=await p2(U,se);return{formatted:Q.output,diagnostics:Q.logs.trim()}},Uc=async k=>{if(!o||o.permission==="read"||!kt||qt.current||!fi(Ue.current))return;const U=Ue.current,se=Je.getText(U);qt.current=!0,Ae(!0);let Q=()=>{};const Te=new Promise(je=>{Q=je});Mt.current=Te,E("");let ze=null;try{ze=await Je.acquireFormatLease(U);const je=se.toString(),{formatted:an,diagnostics:_t}=await ga(U,je,k);if(Ue.current!==U||se.toString()!==je){j(a("editor.formatSourceChanged"));return}await ze.confirm();const dn=await _a(je,an);if(Ue.current!==U||se.toString()!==je){j(a("editor.formatSourceChanged"));return}if(await ze.confirm(),Ue.current!==U||se.toString()!==je){j(a("editor.formatSourceChanged"));return}dn.length&&Je.applyTextEdits(U,dn),dn.length&&await si(),ut(null),E(_t),j(""),Ee(a("editor.formatFileComplete"))}catch(je){Ma(je)?(ut({action:"file",kind:je.kind,detail:je.message}),j("")):j(a("editor.formatFileFailed",{message:de(je)}))}finally{ze&&await ze.release(),qt.current=!1,Ae(!1),Q(),Mt.current===Te&&(Mt.current=null)}},Yf=async()=>{if(!q.formatOnCompile||!o||o.permission==="read"||!kt||!fi(Ue.current)||qt.current)return;const k=Ue.current,U=Je.getText(k);qt.current=!0,Ae(!0),E("");let se=null;try{se=await Je.acquireFormatLease(k);const Q=U.toString(),{formatted:Te,diagnostics:ze}=await ga(k,Q);await se.confirm();const je=await _a(Q,Te);if(Ue.current!==k||U.toString()!==Q)throw new Error(a("editor.formatSourceChanged"));if(await se.confirm(),Ue.current!==k||U.toString()!==Q)throw new Error(a("editor.formatSourceChanged"));je.length&&Je.applyTextEdits(k,je),je.length&&await Je.flush(),ut(null),E(ze)}catch(Q){Ma(Q)?(ut({action:"file",kind:Q.kind,detail:Q.message}),j("")):j(a("editor.formatFailedContinue",{message:de(Q)}))}finally{se&&await se.release(),qt.current=!1,Ae(!1)}},Xf=async()=>(Mt.current&&await Mt.current,await Yf(),hr()),Hc=async k=>{if(!o||o.permission==="read"||!kt||qt.current||!fi(Ue.current))return;const U=Ye.current;if(!U.selectedText.trim()){Ee(a("editor.formatSelectionRequired"));return}const se=Ue.current,{startOffset:Q,endOffset:Te,selectedText:ze}=U,je=Je.getText(se);if(je.toString().slice(Q,Te)!==ze){j(a("editor.formatSelectionChanged"));return}qt.current=!0,Ae(!0);let an=()=>{};const _t=new Promise(Ln=>{an=Ln});Mt.current=_t,E("");let dn=null;try{if(dn=await Je.acquireFormatLease(se),je.toString().slice(Q,Te)!==ze){j(a("editor.formatSelectionChanged"));return}const gl=await ga(se,ze,k),sp=y2(ze,gl.formatted);await dn.confirm();const Aa=await _a(ze,sp,Q);if(Ue.current!==se||je.toString().slice(Q,Te)!==ze){j(a("editor.formatSelectionChanged"));return}if(await dn.confirm(),Ue.current!==se||je.toString().slice(Q,Te)!==ze){j(a("editor.formatSelectionChanged"));return}Aa.length&&Je.applyTextEdits(se,Aa),Aa.length&&await si(),ut(null),E(gl.diagnostics),j(""),Ee(a("editor.formatSelectionComplete"))}catch(Ln){Ma(Ln)?(ut({action:"selection",kind:Ln.kind,detail:Ln.message}),j("")):j(a("editor.formatFailed",{message:de(Ln)}))}finally{dn&&await dn.release(),qt.current=!1,Ae(!1),an(),Mt.current===_t&&(Mt.current=null)}},Jf=k=>{const U=Ue.current;if(!/\.bib$/i.test(U)||o?.permission==="read"||!kt)return Ee(a("citationLibrary.importRequiresWrite")),!1;const Q=Je.getText(U).toString(),Te=Qd(Q,t.maxCitationBibtexBytes);if(Te.status==="too-large")return Ee(a("citationLibrary.fileTooLarge",{size:vo(t.maxCitationBibtexBytes)})),!1;if(Te.status==="invalid")return Ee(a("citationLibrary.fileInvalid")),!1;if(Te.entries.some(Ln=>Ln.citationKey.toLowerCase()===k.citationKey.toLowerCase()))return Ee(a("citationErrors.alreadyInFile",{key:k.citationKey})),!1;const ze=Math.max(0,Math.min(Q.length,Ne.current)),je=Q.slice(0,ze),an=Q.slice(ze),_t=je?je.endsWith(`
|
|
52
|
-
|
|
53
|
-
`)?"":je.endsWith(`
|
|
54
|
-
`)?`
|
|
55
|
-
`:`
|
|
56
|
-
|
|
57
|
-
`:"",dn=an?an.startsWith(`
|
|
58
|
-
|
|
59
|
-
`)?"":an.startsWith(`
|
|
60
|
-
`)?`
|
|
61
|
-
`:`
|
|
62
|
-
|
|
63
|
-
`:"";return Je.applyTextEdits(U,[{from:ze,to:ze,replacement:`${_t}${k.bibtex.trim()}${dn}`}]),Ee(a("citationLibrary.imported",{key:k.citationKey})),!0},{files:Fn,setFiles:Vc,loadFiles:Zf,newFileOpen:Qf,setNewFileOpen:qc,newFilePath:em,setNewFilePath:Wc,resourcePreview:tm,setResourcePreview:Kc,resourcePreviewLoading:nm,setResourcePreviewLoading:sm,newFolderOpen:rm,setNewFolderOpen:Gc,newFolderName:im,setNewFolderName:Yc,fileDialogError:am,setFileDialogError:Xc,selectedFolder:Jc,setSelectedFolder:Da,expandedFolders:om,setExpandedFolders:Zc,moveEntry:cm,setMoveEntry:Qc,moveName:lm,setMoveName:el,moveDestination:um,setMoveDestination:tl,deleteEntry:ya,setDeleteEntry:nl,fileDragActive:dm,setFileDragActive:hm,uploadConflict:fm,setUploadConflict:mm,uploadingFiles:pm,directoryEntries:gm,visibleEntries:Dm,createFile:ym,createFolder:bm,uploadFiles:sl,upload:Fm,openFile:ba,movePath:Cm,removePath:wm}=YC({projectId:n,site:t,activeFile:b,dirty:z,save:hr,onError:j,onProject:c,onActiveFile:w,onActiveMainFile:N,onRootDocuments:T});f.useEffect(()=>{if(!b||O!==b||!b.toLocaleLowerCase().endsWith(".tex"))return;const k=Fn.filter(Te=>Te.type==="file"&&/\.tex$/i.test(Te.path)).length;if(k===0)return;const U=b===o?.mainFile,Q=QC(_)||k===1;T(Te=>{if(Te.has(b)===Q)return Te;const ze=new Set(Te);return Q?ze.add(b):ze.delete(b),ze}),Q&&!U&&rt.current!==b?N(b):!Q&&rt.current===b&&o?.mainFile&&N(o.mainFile)},[b,O,_,Fn,o?.mainFile]),f.useEffect(()=>{if(!q.openFilesInTabs||Fn.length===0)return;const k=new Set(Fn.filter(U=>U.type==="file"&&Vs(U.path)).map(U=>U.path));Sn(U=>{const se=U.filter(Q=>k.has(Q));return se.length===U.length?U:se})},[Fn,q.openFilesInTabs]);const{comments:ri,focusComment:Em,setFocusComment:rl,commentOpen:xm,setCommentOpen:il,commentText:vm,setCommentText:km,addComment:Am,toggleComment:jm,replyToComment:Sm,editComment:Tm,deleteComment:Bm,editCommentReply:Nm,deleteCommentReply:Lm}=x2({projectId:n,activeFile:b,permission:o?.permission,revision:ma,selection:tt,save:hr,onError:j,onAdded:()=>Ie("comments")}),{pdfUrl:qn,pdfCompiledAt:fr,pdfLoadingMode:Rm,pdfLoading:Fa,compileLog:Ca,compileDiagnostics:Om,compileOutcome:mr,artifacts:al,artifactPreview:Pm,artifactLoading:Im,editorNotice:Mm,localCompiling:ol,cancelling:_m,cleaning:cl,compile:$m,cancelCompile:zm,cleanCompile:ll,viewArtifact:Um}=qC({projectId:n,project:o,mainFile:x,initialLatest:s?.projectId===n?s.latestCompile:null,collaborationSynced:kt,sharedState:Bn,onSharedState:Zr,save:Xf,loadOutline:(k,U)=>dr({signal:k},U),onPreviewTab:Y,onError:j,onCompileStart:()=>{j(""),Ee("")},onCompileSuccess:()=>{const k=Ue.current;k&&dt(k,Fe.current.line,Fe.current.column,{silent:!0})},onPdfChanged:ge});f.useEffect(()=>{if(!o||!x||!qn&&Fa)return;const k=window.setTimeout(()=>u(!0),qn?150:0);return()=>window.clearTimeout(k)},[o,Fa,qn]),f.useEffect(()=>{const k=U=>{(U.ctrlKey||U.metaKey)&&(!U.shiftKey&&U.key.toLocaleLowerCase()==="p"?(U.preventDefault(),Ve(!0)):U.shiftKey&&U.key.toLocaleLowerCase()==="f"&&(U.preventDefault(),ke(!0)))};return window.addEventListener("keydown",k,!0),()=>window.removeEventListener("keydown",k,!0)},[]);const ul=k=>{ee(k),u2(e.id,n,k)},dl=(k=!1)=>{const U=vt;if(!U)return;ut(null),E(""),j(""),k&&ul({...q,texFmtConfig:""});const se=k?"":void 0;U.action==="selection"?Hc(se):Uc(se)},Hm=async()=>{H(!0);try{await ur()||(j(a("editor.collaboration.permissionDowngradeOtherTabBlocked")),H(!1))}catch(k){j(de(k)),H(!1)}},hl=()=>{Oe.current?.isCollapsed()?Oe.current.expand():Oe.current?.collapse()},Vm=f.useMemo(()=>D.length?D:kw(_).map(k=>({...k,path:b})),[D,_,b]),wa=f.useMemo(()=>b2(Ca,mr),[Ca,mr]),Es=ce!=="pdf-only",fl=ce!=="editor-only",Ea=k=>{I(k),k==="pdf-only"&&Y("pdf")},qm=ya?Jr.filter(k=>k.filePath&&os(ya.path,k.filePath)):[];if(!o)return i.jsxs("div",{className:"center-card",children:[i.jsx("p",{children:ie||a("common.loading")}),ie&&i.jsx("button",{className:"primary",onClick:r,children:a("editor.backToProjects")})]});const Wn=o.permission==="read"||!kt,xa=fa.find(k=>k.path===b),va=xa&&!le?xa:null,Wm=(k,U)=>{if(Wn)return;const se=Ue.current;if(!se)return;if(Je.getText(se).toString().slice(k.from,k.to)!==k.word){j(a("editor.spellCheckSourceChanged"));return}try{Je.applyTextEdits(se,[{from:k.from,to:k.to,replacement:U}])}catch(ze){j(de(ze))}},ka=Bn?.mainFile===x&&(Bn.status==="queued"||Bn.status==="running"),ii=ol||ka||cl,Km=b?Je.getText(b):null,Gm=fr?new Date(fr).toLocaleString(Ke.resolvedLanguage,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"",Ym=x.split("/").at(-1)??x,Xm=wa.warnings.length+wa.errors.length+al.length,Jm=qn?`${qn}${qn.includes("?")?"&":"?"}download=1`:"",Zm=x||o.mainFile,Qm=!!(b&&b===Zm&&/\.tex$/i.test(b)),ml=k=>{const U=Fn.find(se=>se.path===k);U&&Vs(U.path)?ba(U):Tn(k)},ep=k=>{document.getElementById(`editor-tab-${encodeURIComponent(k)}`)?.focus()},tp=(k,U)=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(k.key))return;k.preventDefault();const se=k.key==="Home"?0:k.key==="End"?V.length-1:(U+(k.key==="ArrowLeft"?-1:1)+V.length)%V.length,Q=V[se];Q&&(ml(Q),window.requestAnimationFrame(()=>ep(Q)))},pl=ii?ka?Bn?.status==="queued"?a("editor.compileQueued"):a("editor.compilingBy",{name:Bn?.requestedBy.name??a("common.user")}):a("editor.compiling"):mr==="failed"?qn&&fr?a("editor.compileFailedRetained",{time:new Date(fr).toLocaleString(Ke.resolvedLanguage)}):a("editor.compileFailedNoPdf"):mr==="cancelled"?a("compileControls.cancelled"):"",np=M==="editor.savedAt"&&R?a("editor.savedAt",{time:new Date(R).toLocaleTimeString(Ke.resolvedLanguage,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}):a(M);return i.jsxs("div",{className:"workspace",children:[i.jsx(nw,{site:t,project:o,activeFile:b,saveStateLabel:np,editorPreferences:q,activeSessions:Jr,collaborationStatus:Hn,reconnectCollaboration:Qr,protocolUpgradeRequired:ei,showEditor:Es,filesCollapsed:yt,toggleFilesPanel:hl,workspaceLayout:ce,changeWorkspaceLayout:Ea,onBack:r,onShare:()=>It(!0),showCitationLibrary:Es&&/\.bib$/i.test(b),citationLibraryOpen:Ge,onCitationLibrary:()=>G(!0),onHistory:()=>bt(!0),onGit:()=>ve(!0),canManageGit:o.ownerId===e.id,formatting:le,canFormat:fi(b),readOnly:Wn,collaborationSynced:kt,activeFormatLease:!!xa,onFormatFile:()=>{Uc()},onFormatSelection:()=>{Hc()},hasSelection:!!tt.selectedText.trim(),onAddComment:()=>il(!0),onToggleComments:()=>Ie(Le==="comments"?null:"comments"),commentsOpen:Le==="comments",unresolvedCommentCount:ri.filter(k=>!k.resolved).length,hasActiveFile:!!b,onToggleSettings:()=>Ie(Le==="settings"?null:"settings"),settingsOpen:Le==="settings",compileBusy:ii,sharedCompiling:ka,localCompiling:ol,cancelling:_m,compileState:Bn,onCompile:$m,onCancelCompile:()=>{zm()}}),ei&&i.jsxs("div",{className:"workspace-update-banner",role:"alert",children:[i.jsx(en,{size:15}),i.jsx("span",{children:a("workspaceUpdates.protocolUpgrade")}),i.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:a("common.reload")})]}),pl&&i.jsxs("div",{className:`compile-status-strip${mr==="failed"?" failed":""}`,role:"status","aria-live":"polite",children:[i.jsx(Ze,{className:ii?"spin":"",size:14}),i.jsx("span",{children:pl})]}),(Nt.error||vt||g||va)&&i.jsxs("div",{className:"client-tool-recoveries",children:[Nt.error&&i.jsxs("div",{className:"client-tool-recovery",role:"alert",title:Nt.error,children:[i.jsx(en,{size:15}),i.jsxs("span",{children:[i.jsx("strong",{children:a("editor.harperRecoveryTitle")}),a("editor.harperFallbackHint")]}),i.jsx("div",{className:"client-tool-recovery-actions",children:i.jsx("button",{type:"button",onClick:Nt.retry,children:a("common.retry")})}),i.jsx("button",{type:"button",className:"formatter-diagnostics-dismiss",title:a("common.close"),"aria-label":a("common.close"),onClick:Nt.dismissError,children:i.jsx(Ht,{size:13})})]}),vt&&i.jsxs("div",{className:"client-tool-recovery",role:"alert",title:vt.detail,children:[i.jsx(en,{size:15}),i.jsxs("span",{children:[i.jsx("strong",{children:a(vt.kind==="format"?"editor.texFmtOptionsRecoveryTitle":vt.kind==="load"?"editor.texFmtRecoveryTitle":"editor.texFmtRuntimeRecoveryTitle")}),a("editor.clientToolRecoveryHint")]}),i.jsxs("div",{className:"client-tool-recovery-actions",children:[i.jsx("button",{type:"button",disabled:le||Wn,onClick:()=>dl(),children:a("common.retry")}),vt.kind==="format"&&q.texFmtConfig.trim()&&i.jsx("button",{type:"button",disabled:le||Wn,onClick:()=>dl(!0),children:a("editor.resetFormatterOptions")}),i.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:a("common.reload")})]}),i.jsx("button",{type:"button",className:"formatter-diagnostics-dismiss",title:a("common.close"),"aria-label":a("common.close"),onClick:()=>ut(null),children:i.jsx(Ht,{size:13})})]}),g&&i.jsxs("div",{className:"client-tool-recovery formatter-diagnostics",role:"status",children:[i.jsx(en,{size:15}),i.jsxs("span",{children:[i.jsx("strong",{children:a("editor.texFmtDiagnosticsTitle")}),a("editor.texFmtDiagnosticsHint")]}),i.jsxs("details",{children:[i.jsx("summary",{children:a("editor.viewFormatterDiagnostics")}),i.jsx("pre",{children:g})]}),i.jsx("button",{type:"button",className:"formatter-diagnostics-dismiss",title:a("editor.dismissFormatterDiagnostics"),"aria-label":a("editor.dismissFormatterDiagnostics"),onClick:()=>E(""),children:i.jsx(Ht,{size:13})})]}),va&&i.jsxs("div",{className:"client-tool-recovery format-lease-status",role:"status",children:[i.jsx(Ze,{className:"spin",size:15}),i.jsx("span",{children:a("editor.formattingBy",{name:va.holderName})})]})]}),ie&&i.jsx("div",{className:"toast",onClick:()=>j(""),children:ie}),me&&i.jsx("div",{className:"toast success",onClick:()=>Ee(""),children:me}),i.jsxs(ap,{autoSaveId:"texlite-workspace-layout",direction:"horizontal",className:"work-grid",children:[Es&&i.jsx(sw,{project:o,filesPanel:Oe,files:Fn,visibleEntries:Dm,activeFile:b,activeMainFile:x,rootDocuments:L,selectedFolder:Jc,expandedFolders:om,fileDragActive:dm,uploadingFiles:pm,readOnly:Wn,editorFontSize:q.fontSize,outline:Vm,sourceCursor:pe,wordCountBusy:lt,hasSelection:!!tt.selectedText.trim()&&/\.(?:tex|sty|cls)$/i.test(b),uploadInput:qe,setSelectedFolder:Da,setExpandedFolders:Zc,setMoveEntry:Qc,setMoveName:el,setMoveDestination:tl,setDeleteEntry:nl,setFileDialogError:Xc,setNewFolderName:Yc,setNewFolderOpen:Gc,setNewFilePath:Wc,setNewFileOpen:qc,setQuickOpen:Ve,setProjectSearchOpen:ke,setFileDragActive:hm,setFilesCollapsed:ot,toggleFilesPanel:hl,uploadFiles:sl,upload:Fm,openFile:ba,jumpToSource:We,syncSourceToPdf:dt,onWordCount:k=>{Gf(k)}}),Es&&i.jsx(zo,{className:"resize-handle",children:i.jsx(Vd,{size:12})}),Es&&i.jsx(aw,{project:o,activeFile:b,activeMainFile:x,openTabs:V,content:_,loadedFile:O,readOnly:Wn,comments:ri,focusComment:Em,editorPreferences:q,completionIndex:p,nativeSpellCheck:Nt.nativeFallback,spellCheckIssues:Nt.issues,spellCheckJump:Nt.jump,sourceJump:F,collaborativeText:Km,collaborationAwareness:Je.awareness,undoManager:b?Je.getUndoManager(b):void 0,editorNotice:Mm,activateTab:ml,closeTab:Tn,handleTabKeyDown:tp,updateEditorContent:Vn,setSelection:(k,U,se)=>Me({selectedText:k,startOffset:U,endOffset:se}),onCommentClick:k=>{const U=ri.find(se=>se.id===k);U&&(rl({...U}),Ie("comments"))},onSpellCheckReplace:Wm,onCursor:Un}),fl&&i.jsx(hw,{projectId:n,activeMainFile:x,previewTab:Ce,diagnosticTab:ue,pdfUrl:qn,pdfLoadingMode:Rm,pdfLoading:Fa,pdfCompiledAt:fr,pdfCompiledLabel:Gm,pdfTargetLabel:Ym,pdfDownloadUrl:Jm,pdfTarget:pa,pdfViewport:ni,activeFile:b,sourceCursor:pe,compileBusy:ii,compileLog:Ca,compileDiagnostics:Om,compileMessages:wa,artifacts:al,artifactPreview:Pm,artifactLoading:Im,cleaning:cl,readOnly:Wn,collaborationSynced:kt,workspaceLayout:ce,showSyncResize:Es&&fl,diagnosticCount:Xm,selectPreviewTab:Y,changeWorkspaceLayout:Ea,onSetNotice:Ee,onSetPdfViewport:ne,syncVisiblePdfToSource:Nn,syncSourceToPdf:dt,syncPdfToSource:At,canSyncWithPdf:Qm,files:Fn,jumpToSource:We,onSetCleanMode:X,cleanCompile:ll,viewArtifact:Um}),i.jsx(Ew,{sidePanel:Le,onClose:()=>Ie(null),project:o,projectId:n,site:t,files:Fn,currentUserId:e.id,comments:ri,onFocusComment:k=>rl({...k}),onToggleComment:jm,onReplyComment:Sm,onEditComment:Tm,onDeleteComment:Bm,onEditCommentReply:Nm,onDeleteCommentReply:Lm,dictionaryWords:d,onDictionaryChange:h,editorPreferences:q,onEditorPreferences:ul,spellCheckCount:Nt.summary?.total??null,spellCheckUniqueCount:Nt.summary?.unique??null,spellCheckIndex:Nt.summary?Nt.index:-1,onSpellCheckNavigate:Nt.jumpToIssue,onProject:c})]}),i.jsx(xw,{open:xt,mode:W,path:zt,busy:lt,error:yn,result:S,onOpenChange:re}),i.jsx(bw,{user:e,project:o,projectId:n,activeFile:b,content:_,maxCitationBibtexBytes:t.maxCitationBibtexBytes,files:Fn,directoryEntries:gm,readOnly:Wn,workspaceLayout:ce,changeWorkspaceLayout:Ea,resourcePreview:tm,resourcePreviewLoading:nm,setResourcePreview:Kc,setResourcePreviewLoading:sm,uploadConflict:fm,setUploadConflict:mm,uploadFiles:sl,cleanMode:De,setCleanMode:X,cleanCompile:ll,newFileOpen:Qf,setNewFileOpen:qc,newFilePath:em,setNewFilePath:Wc,newFolderOpen:rm,setNewFolderOpen:Gc,newFolderName:im,setNewFolderName:Yc,selectedFolder:Jc,fileDialogError:am,setFileDialogError:Xc,createFile:ym,createFolder:bm,moveEntry:cm,setMoveEntry:Qc,moveName:lm,setMoveName:el,moveDestination:um,setMoveDestination:tl,movePath:Cm,deleteEntry:ya,setDeleteEntry:nl,deleteActiveSessions:qm,removePath:wm,commentOpen:xm,setCommentOpen:il,selection:tt,commentText:vm,setCommentText:km,addComment:Am,shareOpen:ye,setShareOpen:It,citationLibraryOpen:Ge,setCitationLibraryOpen:G,insertCitationAtCursor:Jf,quickOpen:He,setQuickOpen:Ve,projectSearchOpen:mt,setProjectSearchOpen:ke,openFile:ba,jumpToSource:We,historyOpen:Re,setHistoryOpen:bt,gitOpen:he,setGitOpen:ve,save:hr,permissionDowngrade:ti,permissionDowngradeBusy:y,dismissPermissionDowngrade:ws,discardPermissionDraft:Hm})]})}function kw(t){const e=[],n=/^\s*\\(part|chapter|section|subsection|subsubsection)\*?(?:\[[^\]]*\])?\{([^}]*)\}/,s={part:0,chapter:0,section:1,subsection:2,subsubsection:3};return t.split(`
|
|
64
|
-
`).forEach((r,a)=>{const o=r.match(n);o&&e.push({level:s[o[1]],title:o[2],line:a+1})}),e}function Aw(){const{t}=Qe(),[e,n]=f.useState(null),[s,r]=f.useState(),[a,o]=f.useState(()=>typeof window>"u"?null:Ts(window.location.pathname)),[c,l]=f.useState(()=>{if(typeof window>"u")return null;const b=Ts(window.location.pathname);return b?ci(b):null}),[u,d]=f.useState(null),h=()=>{const b=Ts(window.location.pathname);if(!b)return;const w={texliteRoute:"dashboard"};window.history.replaceState(w,"",q0(b)),o(null),l(null)},p=b=>{const w=W0(window.location.search);if(w){const x={texliteRoute:"project",projectId:w,fromDashboard:!1};window.history.replaceState(x,"",Dr(w)),l(ci(w,{force:!0})),o(w)}else if(new URLSearchParams(window.location.search).has("return")){const x={texliteRoute:"dashboard"};window.history.replaceState(x,"","/")}r(b)};f.useEffect(()=>{const b=Ts(window.location.pathname);if(b&&window.location.pathname!==Dr(b)){const N={texliteRoute:"project",projectId:b,fromDashboard:!1};window.history.replaceState(N,"",Dr(b))}const w=()=>{const N=Ts(window.location.pathname);o(N),l(N?ci(N):null)},x=()=>{d(null),r(null),h()};return window.addEventListener("popstate",w),window.addEventListener("texlite:session-expired",x),()=>{window.removeEventListener("popstate",w),window.removeEventListener("texlite:session-expired",x)}},[]);const m=b=>{const w=Dr(b);if(window.location.pathname!==w){const x={texliteRoute:"project",projectId:b,fromDashboard:!0};window.history.pushState(x,"",w)}l(ci(b)),o(b)},D=()=>{const b=window.history.state;if(K0(b)&&b.fromDashboard){window.history.back();return}const w={texliteRoute:"dashboard"};window.history.replaceState(w,"","/"),o(null),l(null)};if(f.useEffect(()=>{te("/api/config").then(b=>{n(b),document.title=b.siteName}),te("/api/me",{suppressSessionExpired:!0}).then(({user:b})=>p(b)).catch(()=>{h(),r(null)})},[]),f.useEffect(()=>{if(!s||s.mustChangePassword||a)return;let b=!1,w=null,x=null;const N=()=>{b||Ji().then(T=>T.preloadPdfRuntime()).catch(()=>{})},L=window;return L.requestIdleCallback?x=L.requestIdleCallback(N,{timeout:1200}):w=window.setTimeout(N,400),()=>{b=!0,w!==null&&window.clearTimeout(w),x!==null&&L.cancelIdleCallback?.(x)}},[s?.id,s?.mustChangePassword,a]),s===void 0||!e)return i.jsx("div",{className:"center-card",children:t("common.loading")});if(!s)return i.jsx(Z0,{site:e,onLogin:p});if(s.mustChangePassword)return i.jsx(J0,{site:e,user:s,onChanged:b=>r(b)});if(a)return i.jsx(vw,{site:e,user:s,projectId:a,preload:c?.projectId===a?c:null,onBack:D},a);const C=u?.userId===s.id?u:null;return i.jsx(c2,{site:e,user:s,initialData:C?{projects:C.projects,tags:C.tags,pagination:C.pagination}:null,onDataChange:(b,w,x)=>d({userId:s.id,projects:b,tags:w,pagination:x}),onUser:b=>{(!b||b.id!==s.id)&&d(null),r(b),b||D()},onOpenProject:m})}class jw extends f.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,n){console.error("Uncaught error in component tree:",e,n)}handleReset=()=>{this.setState({hasError:!1,error:null}),this.props.onReset?.()};render(){return this.state.hasError?typeof this.props.fallback=="function"?this.props.fallback(this.state.error??new Error("Unknown error"),this.handleReset):this.props.fallback?this.props.fallback:i.jsxs("div",{role:"alert",style:{padding:"2rem",margin:"1rem",borderRadius:"8px",backgroundColor:"var(--bg-secondary, #f8f9fa)",border:"1px solid var(--border-color, #e9ecef)",color:"var(--text-primary, #212529)",fontFamily:"system-ui, -apple-system, sans-serif"},children:[i.jsx("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"0.5rem",color:"#dc3545"},children:this.props.title??Ke.t("errors.boundaryTitle")}),i.jsx("p",{style:{fontSize:"0.9rem",color:"var(--text-secondary, #6c757d)",marginBottom:"1rem"},children:Ke.t("errors.boundaryDescription")}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:this.handleReset,className:"primary",style:{padding:"0.4rem 0.8rem",borderRadius:"4px",cursor:"pointer"},children:Ke.t("errors.boundaryRetry")}),i.jsx("button",{type:"button",onClick:()=>window.location.reload(),style:{padding:"0.4rem 0.8rem",borderRadius:"4px",cursor:"pointer"},children:Ke.t("errors.boundaryReload")})]})]}):this.props.children}}op.createRoot(document.getElementById("root")).render(i.jsx(f.StrictMode,{children:i.jsx(jw,{children:i.jsx(Aw,{})})}));export{oD as A,Md as C,hs as F,Hd as G,YD as H,Hl as K,Ze as L,ft as M,xr as P,Fo as R,ji as S,nn as T,tF as U,ns as _,te as a,Pw as b,Ow as c,Iw as d,Mw as e,ys as f,Nw as g,Rn as h,Bw as i,B as j,Sr as k,C1 as l,dc as m,_n as n,sc as o,$d as p,Zn as q,Rw as r,Lw as t};
|