@benev/tact 0.4.0-0 → 0.4.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -66
- package/package.json +5 -4
- package/s/demo/main.bundle.ts +18 -3
- package/s/demo/main.css +4 -3
- package/s/demo/presets.ts +54 -0
- package/s/gamepad/gamepad-app/element.ts +11 -4
- package/s/gamepad/gamepad-app/style.css.ts +5 -1
- package/s/gamepad/index.html.ts +1 -1
- package/s/gamepad/main.css +10 -1
- package/s/index.html.ts +13 -6
- package/s/lib/index.ts +15 -4
- package/s/lib/input/{encoder.ts → controller.ts} +23 -15
- package/s/lib/input/data/endian.ts +3 -0
- package/s/{_archive/lib3/input/data → lib/input/data/intent}/decode.ts +4 -3
- package/s/lib/input/data/intent/encode.ts +25 -0
- package/s/{_archive/lib3/input/data/params.ts → lib/input/data/intent/sizes.ts} +1 -2
- package/s/lib/input/data/intent/types.ts +6 -0
- package/s/lib/input/data/parcel/decode.ts +32 -0
- package/s/lib/input/data/parcel/encode.ts +30 -0
- package/s/lib/input/data/parcel/sizes.ts +5 -0
- package/s/lib/input/data/parcel/types.ts +8 -0
- package/s/lib/input/data/test.ts +23 -0
- package/s/lib/input/decoder.ts +16 -10
- package/s/lib/input/evaluate/context.ts +2 -3
- package/s/lib/input/evaluate/evaluate.ts +45 -15
- package/s/lib/input/expression.ts +5 -5
- package/s/lib/input/investigate/is-expression.ts +1 -0
- package/s/lib/input/investigate/make-input.ts +1 -5
- package/s/lib/input/sources/gamepad.ts +3 -9
- package/s/lib/input/sources/pointer.ts +0 -18
- package/s/lib/input/test.ts +194 -0
- package/s/lib/input/testing/quickbind.ts +6 -5
- package/s/lib/input/types.ts +3 -7
- package/s/lib/input/utils/mouse-button.ts +1 -6
- package/s/lib/test.ts +3 -177
- package/s/lib/ui/deck/auto-gamepads.ts +29 -0
- package/s/lib/ui/deck/collector.ts +52 -0
- package/s/lib/ui/deck/controls/controls.ts +76 -0
- package/s/lib/ui/deck/controls/internal/assignments.ts +24 -0
- package/s/lib/ui/deck/controls/internal/data.ts +51 -0
- package/s/lib/ui/deck/controls/internal/fns.ts +38 -0
- package/s/lib/ui/deck/controls/internal/profiles.ts +83 -0
- package/s/lib/ui/deck/controls/types.ts +23 -0
- package/s/lib/ui/deck/hub.ts +108 -0
- package/s/lib/ui/deck/setup/deck.ts +31 -0
- package/s/lib/ui/deck/setup/tact.ts +86 -0
- package/s/lib/ui/deck/setup/types.ts +12 -0
- package/s/lib/ui/deck/types.ts +26 -0
- package/s/lib/ui/deck/utils/first-preset.ts +9 -0
- package/s/lib/ui/icons/akar/LICENSE +23 -0
- package/s/lib/ui/icons/akar/backspace.svg.ts +4 -0
- package/s/lib/ui/icons/akar/circle-plus.svg.ts +4 -0
- package/s/lib/ui/icons/akar/copy.svg.ts +4 -0
- package/s/lib/ui/icons/akar/cross.svg.ts +4 -0
- package/s/lib/ui/icons/akar/devices.svg.ts +4 -0
- package/s/lib/ui/icons/akar/drag-vertical-fill.svg.ts +4 -0
- package/s/lib/ui/icons/akar/game-controller.svg.ts +4 -0
- package/s/lib/ui/icons/akar/key-cap.svg.ts +4 -0
- package/s/lib/ui/icons/akar/people-group.svg.ts +4 -0
- package/s/lib/ui/icons/akar/person-add.svg.ts +4 -0
- package/s/lib/ui/icons/akar/settings-horizontal.svg.ts +4 -0
- package/s/lib/ui/icons/akar/trash-can.svg.ts +4 -0
- package/s/lib/ui/icons/akar/x-small.svg.ts +4 -0
- package/s/lib/ui/views/controllers/style.css.ts +158 -0
- package/s/lib/ui/views/controllers/subviews/controller.ts +53 -0
- package/s/lib/ui/views/controllers/subviews/dropcard.ts +31 -0
- package/s/lib/ui/views/controllers/subviews/player.ts +38 -0
- package/s/lib/ui/views/controllers/view.ts +72 -0
- package/s/lib/ui/views/customize/parts/capture-gamepad-chord.ts +59 -0
- package/s/lib/ui/views/customize/parts/capture-key-chord.ts +70 -0
- package/s/lib/ui/views/customize/parts/capture-pointer-chord.ts +55 -0
- package/s/lib/ui/views/customize/parts/render-bindings.ts +67 -0
- package/s/lib/ui/views/customize/style.css.ts +144 -0
- package/s/lib/ui/views/customize/subviews/expression.ts +88 -0
- package/s/lib/ui/views/customize/subviews/recorder.ts +76 -0
- package/s/lib/ui/views/customize/view.ts +104 -0
- package/s/lib/ui/views/deck/style.css.ts +69 -0
- package/s/lib/ui/views/deck/types.ts +15 -0
- package/s/lib/ui/views/deck/view.ts +49 -0
- package/s/lib/ui/views/profile-select/view.ts +44 -0
- package/s/lib/ui/views/theme.css.ts +115 -0
- package/s/lib/ui/views/visualizer/style.css.ts +23 -0
- package/s/lib/ui/views/visualizer/view.ts +16 -0
- package/s/lib/ui/views/visualizer/visualizer.ts +17 -0
- package/s/lib/utils/ellipsis.ts +7 -0
- package/s/lib/utils/hueify.ts +5 -0
- package/x/demo/main.bundle.js +16 -3
- package/x/demo/main.bundle.js.map +1 -1
- package/x/demo/main.bundle.min.js +809 -11
- package/x/demo/main.bundle.min.js.map +4 -4
- package/x/demo/main.css +4 -3
- package/x/demo/presets.d.ts +30 -0
- package/x/demo/presets.js +51 -0
- package/x/demo/presets.js.map +1 -0
- package/x/gamepad/gamepad-app/element.js +9 -4
- package/x/gamepad/gamepad-app/element.js.map +1 -1
- package/x/gamepad/gamepad-app/style.css.js +5 -1
- package/x/gamepad/gamepad-app/style.css.js.map +1 -1
- package/x/gamepad/index.html +4 -4
- package/x/gamepad/index.html.js +1 -1
- package/x/gamepad/main.bundle.min.js +24 -20
- package/x/gamepad/main.bundle.min.js.map +4 -4
- package/x/gamepad/main.css +10 -1
- package/x/index.html +16 -9
- package/x/index.html.js +13 -6
- package/x/index.html.js.map +1 -1
- package/x/lib/index.d.ts +14 -1
- package/x/lib/index.js +14 -1
- package/x/lib/index.js.map +1 -1
- package/x/lib/input/controller.d.ts +15 -0
- package/x/lib/input/{encoder.js → controller.js} +19 -13
- package/x/lib/input/controller.js.map +1 -0
- package/x/lib/input/data/endian.d.ts +1 -0
- package/x/lib/input/data/endian.js +2 -0
- package/x/lib/input/data/endian.js.map +1 -0
- package/x/lib/input/data/intent/decode.d.ts +5 -0
- package/x/lib/input/data/{decode.js → intent/decode.js} +3 -2
- package/x/lib/input/data/intent/decode.js.map +1 -0
- package/x/lib/input/data/intent/encode.d.ts +2 -0
- package/x/lib/input/data/intent/encode.js +18 -0
- package/x/lib/input/data/intent/encode.js.map +1 -0
- package/x/lib/input/data/{params.d.ts → intent/sizes.d.ts} +1 -2
- package/x/lib/input/data/intent/sizes.js +5 -0
- package/x/lib/input/data/intent/sizes.js.map +1 -0
- package/x/lib/input/data/intent/types.d.ts +4 -0
- package/x/lib/input/data/intent/types.js +2 -0
- package/x/lib/input/data/intent/types.js.map +1 -0
- package/x/lib/input/data/parcel/decode.d.ts +2 -0
- package/x/lib/input/data/parcel/decode.js +22 -0
- package/x/lib/input/data/parcel/decode.js.map +1 -0
- package/x/lib/input/data/parcel/encode.d.ts +2 -0
- package/x/lib/input/data/parcel/encode.js +19 -0
- package/x/lib/input/data/parcel/encode.js.map +1 -0
- package/x/lib/input/data/parcel/sizes.d.ts +3 -0
- package/x/lib/input/data/parcel/sizes.js +4 -0
- package/x/lib/input/data/parcel/sizes.js.map +1 -0
- package/x/lib/input/data/parcel/types.d.ts +5 -0
- package/x/lib/input/data/parcel/types.js +2 -0
- package/x/lib/input/data/parcel/types.js.map +1 -0
- package/x/lib/input/data/test.d.ts +6 -0
- package/x/lib/input/data/test.js +19 -0
- package/x/lib/input/data/test.js.map +1 -0
- package/x/lib/input/decoder.d.ts +2 -2
- package/x/lib/input/decoder.js +12 -10
- package/x/lib/input/decoder.js.map +1 -1
- package/x/lib/input/evaluate/context.d.ts +2 -3
- package/x/lib/input/evaluate/context.js +2 -3
- package/x/lib/input/evaluate/context.js.map +1 -1
- package/x/lib/input/evaluate/evaluate.d.ts +1 -1
- package/x/lib/input/evaluate/evaluate.js +42 -14
- package/x/lib/input/evaluate/evaluate.js.map +1 -1
- package/x/lib/input/expression.d.ts +1 -1
- package/x/lib/input/investigate/is-expression.js +2 -0
- package/x/lib/input/investigate/is-expression.js.map +1 -1
- package/x/lib/input/investigate/make-input.js +1 -5
- package/x/lib/input/investigate/make-input.js.map +1 -1
- package/x/lib/input/sources/gamepad.js +3 -9
- package/x/lib/input/sources/gamepad.js.map +1 -1
- package/x/lib/input/sources/pointer.js +0 -21
- package/x/lib/input/sources/pointer.js.map +1 -1
- package/x/lib/input/test.d.ts +18 -0
- package/x/lib/input/test.js +143 -0
- package/x/lib/input/test.js.map +1 -0
- package/x/lib/input/testing/quickbind.d.ts +3 -2
- package/x/lib/input/testing/quickbind.js +6 -5
- package/x/lib/input/testing/quickbind.js.map +1 -1
- package/x/lib/input/types.d.ts +3 -8
- package/x/lib/input/types.js.map +1 -1
- package/x/lib/input/utils/mouse-button.js +1 -6
- package/x/lib/input/utils/mouse-button.js.map +1 -1
- package/x/lib/test.js +3 -133
- package/x/lib/test.js.map +1 -1
- package/x/lib/ui/deck/auto-gamepads.d.ts +4 -0
- package/x/lib/ui/deck/auto-gamepads.js +19 -0
- package/x/lib/ui/deck/auto-gamepads.js.map +1 -0
- package/x/lib/ui/deck/collector.d.ts +13 -0
- package/x/lib/ui/deck/collector.js +35 -0
- package/x/lib/ui/deck/collector.js.map +1 -0
- package/x/lib/ui/deck/controls/controls.d.ts +19 -0
- package/x/lib/ui/deck/controls/controls.js +56 -0
- package/x/lib/ui/deck/controls/controls.js.map +1 -0
- package/x/lib/ui/deck/controls/internal/assignments.d.ts +9 -0
- package/x/lib/ui/deck/controls/internal/assignments.js +16 -0
- package/x/lib/ui/deck/controls/internal/assignments.js.map +1 -0
- package/x/lib/ui/deck/controls/internal/data.d.ts +29 -0
- package/x/lib/ui/deck/controls/internal/data.js +29 -0
- package/x/lib/ui/deck/controls/internal/data.js.map +1 -0
- package/x/lib/ui/deck/controls/internal/fns.d.ts +6 -0
- package/x/lib/ui/deck/controls/internal/fns.js +19 -0
- package/x/lib/ui/deck/controls/internal/fns.js.map +1 -0
- package/x/lib/ui/deck/controls/internal/profiles.d.ts +18 -0
- package/x/lib/ui/deck/controls/internal/profiles.js +59 -0
- package/x/lib/ui/deck/controls/internal/profiles.js.map +1 -0
- package/x/lib/ui/deck/controls/types.d.ts +17 -0
- package/x/lib/ui/deck/controls/types.js +2 -0
- package/x/lib/ui/deck/controls/types.js.map +1 -0
- package/x/lib/ui/deck/hub.d.ts +21 -0
- package/x/lib/ui/deck/hub.js +85 -0
- package/x/lib/ui/deck/hub.js.map +1 -0
- package/x/lib/ui/deck/setup/deck.d.ts +3 -0
- package/x/lib/ui/deck/setup/deck.js +20 -0
- package/x/lib/ui/deck/setup/deck.js.map +1 -0
- package/x/lib/ui/deck/setup/tact.d.ts +17 -0
- package/x/lib/ui/deck/setup/tact.js +67 -0
- package/x/lib/ui/deck/setup/tact.js.map +1 -0
- package/x/lib/ui/deck/setup/types.d.ts +9 -0
- package/x/lib/ui/deck/setup/types.js +2 -0
- package/x/lib/ui/deck/setup/types.js.map +1 -0
- package/x/lib/ui/deck/types.d.ts +18 -0
- package/x/lib/ui/deck/types.js +3 -0
- package/x/lib/ui/deck/types.js.map +1 -0
- package/x/lib/ui/deck/utils/first-preset.d.ts +6 -0
- package/x/lib/ui/deck/utils/first-preset.js +5 -0
- package/x/lib/ui/deck/utils/first-preset.js.map +1 -0
- package/x/lib/ui/icons/akar/backspace.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/backspace.svg.js +3 -0
- package/x/lib/ui/icons/akar/backspace.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/circle-plus.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/circle-plus.svg.js +3 -0
- package/x/lib/ui/icons/akar/circle-plus.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/copy.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/copy.svg.js +3 -0
- package/x/lib/ui/icons/akar/copy.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/cross.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/cross.svg.js +3 -0
- package/x/lib/ui/icons/akar/cross.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/devices.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/devices.svg.js +3 -0
- package/x/lib/ui/icons/akar/devices.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/drag-vertical-fill.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/drag-vertical-fill.svg.js +3 -0
- package/x/lib/ui/icons/akar/drag-vertical-fill.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/game-controller.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/game-controller.svg.js +3 -0
- package/x/lib/ui/icons/akar/game-controller.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/key-cap.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/key-cap.svg.js +3 -0
- package/x/lib/ui/icons/akar/key-cap.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/people-group.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/people-group.svg.js +3 -0
- package/x/lib/ui/icons/akar/people-group.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/person-add.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/person-add.svg.js +3 -0
- package/x/lib/ui/icons/akar/person-add.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/settings-horizontal.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/settings-horizontal.svg.js +3 -0
- package/x/lib/ui/icons/akar/settings-horizontal.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/trash-can.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/trash-can.svg.js +3 -0
- package/x/lib/ui/icons/akar/trash-can.svg.js.map +1 -0
- package/x/lib/ui/icons/akar/x-small.svg.d.ts +2 -0
- package/x/lib/ui/icons/akar/x-small.svg.js +3 -0
- package/x/lib/ui/icons/akar/x-small.svg.js.map +1 -0
- package/x/lib/ui/views/controllers/style.css.js +157 -0
- package/x/lib/ui/views/controllers/style.css.js.map +1 -0
- package/x/lib/ui/views/controllers/subviews/controller.d.ts +3 -0
- package/x/lib/ui/views/controllers/subviews/controller.js +45 -0
- package/x/lib/ui/views/controllers/subviews/controller.js.map +1 -0
- package/x/lib/ui/views/controllers/subviews/dropcard.d.ts +9 -0
- package/x/lib/ui/views/controllers/subviews/dropcard.js +20 -0
- package/x/lib/ui/views/controllers/subviews/dropcard.js.map +1 -0
- package/x/lib/ui/views/controllers/subviews/player.d.ts +2 -0
- package/x/lib/ui/views/controllers/subviews/player.js +32 -0
- package/x/lib/ui/views/controllers/subviews/player.js.map +1 -0
- package/x/lib/ui/views/controllers/view.d.ts +2 -0
- package/x/lib/ui/views/controllers/view.js +64 -0
- package/x/lib/ui/views/controllers/view.js.map +1 -0
- package/x/lib/ui/views/customize/parts/capture-gamepad-chord.d.ts +2 -0
- package/x/lib/ui/views/customize/parts/capture-gamepad-chord.js +46 -0
- package/x/lib/ui/views/customize/parts/capture-gamepad-chord.js.map +1 -0
- package/x/lib/ui/views/customize/parts/capture-key-chord.d.ts +2 -0
- package/x/lib/ui/views/customize/parts/capture-key-chord.js +58 -0
- package/x/lib/ui/views/customize/parts/capture-key-chord.js.map +1 -0
- package/x/lib/ui/views/customize/parts/capture-pointer-chord.d.ts +2 -0
- package/x/lib/ui/views/customize/parts/capture-pointer-chord.js +42 -0
- package/x/lib/ui/views/customize/parts/capture-pointer-chord.js.map +1 -0
- package/x/lib/ui/views/customize/parts/render-bindings.d.ts +3 -0
- package/x/lib/ui/views/customize/parts/render-bindings.js +32 -0
- package/x/lib/ui/views/customize/parts/render-bindings.js.map +1 -0
- package/x/lib/ui/views/customize/style.css.d.ts +2 -0
- package/x/lib/ui/views/customize/style.css.js +143 -0
- package/x/lib/ui/views/customize/style.css.js.map +1 -0
- package/x/lib/ui/views/customize/subviews/expression.d.ts +2 -0
- package/x/lib/ui/views/customize/subviews/expression.js +75 -0
- package/x/lib/ui/views/customize/subviews/expression.js.map +1 -0
- package/x/lib/ui/views/customize/subviews/recorder.d.ts +3 -0
- package/x/lib/ui/views/customize/subviews/recorder.js +60 -0
- package/x/lib/ui/views/customize/subviews/recorder.js.map +1 -0
- package/x/lib/ui/views/customize/view.d.ts +6 -0
- package/x/lib/ui/views/customize/view.js +82 -0
- package/x/lib/ui/views/customize/view.js.map +1 -0
- package/x/lib/ui/views/deck/style.css.d.ts +2 -0
- package/x/lib/ui/views/deck/style.css.js +68 -0
- package/x/lib/ui/views/deck/style.css.js.map +1 -0
- package/x/lib/ui/views/deck/types.d.ts +14 -0
- package/x/lib/ui/views/deck/types.js +2 -0
- package/x/lib/ui/views/deck/types.js.map +1 -0
- package/x/lib/ui/views/deck/view.d.ts +2 -0
- package/x/lib/ui/views/deck/view.js +41 -0
- package/x/lib/ui/views/deck/view.js.map +1 -0
- package/x/lib/ui/views/profile-select/view.d.ts +4 -0
- package/x/lib/ui/views/profile-select/view.js +34 -0
- package/x/lib/ui/views/profile-select/view.js.map +1 -0
- package/x/lib/ui/views/theme.css.d.ts +2 -0
- package/x/lib/ui/views/theme.css.js +113 -0
- package/x/lib/ui/views/theme.css.js.map +1 -0
- package/x/lib/ui/views/visualizer/style.css.d.ts +2 -0
- package/x/lib/ui/views/visualizer/style.css.js +22 -0
- package/x/lib/ui/views/visualizer/style.css.js.map +1 -0
- package/x/lib/ui/views/visualizer/view.d.ts +2 -0
- package/x/lib/ui/views/visualizer/view.js +11 -0
- package/x/lib/ui/views/visualizer/view.js.map +1 -0
- package/x/lib/ui/views/visualizer/visualizer.d.ts +5 -0
- package/x/lib/ui/views/visualizer/visualizer.js +13 -0
- package/x/lib/ui/views/visualizer/visualizer.js.map +1 -0
- package/x/lib/utils/ellipsis.d.ts +1 -0
- package/x/lib/utils/ellipsis.js +6 -0
- package/x/lib/utils/ellipsis.js.map +1 -0
- package/x/lib/utils/hueify.d.ts +1 -0
- package/x/lib/utils/hueify.js +4 -0
- package/x/lib/utils/hueify.js.map +1 -0
- package/x/lib/utils/make-id.d.ts +1 -0
- package/x/lib/utils/make-id.js +5 -0
- package/x/lib/utils/make-id.js.map +1 -0
- package/s/_archive/core/atom/defaults.ts +0 -32
- package/s/_archive/core/atom/lens-algo.ts +0 -84
- package/s/_archive/core/atom/types.ts +0 -44
- package/s/_archive/core/bindings/normalize.ts +0 -27
- package/s/_archive/core/bindings/shape.ts +0 -15
- package/s/_archive/core/bindings/table.ts +0 -22
- package/s/_archive/core/intent/bucket.ts +0 -28
- package/s/_archive/core/intent/consts.ts +0 -4
- package/s/_archive/core/intent/decode.ts +0 -23
- package/s/_archive/core/intent/encode.ts +0 -20
- package/s/_archive/core/intent/merge.ts +0 -15
- package/s/_archive/core/parts/action.ts +0 -36
- package/s/_archive/core/parts/sample-map.ts +0 -24
- package/s/_archive/core/resolvers/actions.ts +0 -30
- package/s/_archive/core/resolvers/intents.ts +0 -106
- package/s/_archive/core/types.ts +0 -40
- package/s/_archive/deck/controller.ts +0 -35
- package/s/_archive/deck/deck.ts +0 -92
- package/s/_archive/deck/parts/profiles.ts +0 -39
- package/s/_archive/deck/parts/runtime.ts +0 -11
- package/s/_archive/deck/parts/settings.ts +0 -30
- package/s/_archive/deck/port.ts +0 -35
- package/s/_archive/deck/types.ts +0 -16
- package/s/_archive/demo/demo-app/element.ts +0 -17
- package/s/_archive/demo/demo-app/style.css.ts +0 -10
- package/s/_archive/demo/main.bundle.ts +0 -71
- package/s/_archive/demo/main.css +0 -83
- package/s/_archive/device/devices.ts +0 -24
- package/s/_archive/device/gamepad.ts +0 -42
- package/s/_archive/device/keyboard.ts +0 -33
- package/s/_archive/device/pad/on-pad.ts +0 -50
- package/s/_archive/device/pad/pad.ts +0 -10
- package/s/_archive/device/pointer.ts +0 -89
- package/s/_archive/device/sampler.ts +0 -25
- package/s/_archive/device/stick.ts +0 -24
- package/s/_archive/index-ui.ts +0 -3
- package/s/_archive/lib/bindings/resolver.ts +0 -61
- package/s/_archive/lib/bindings/types.ts +0 -67
- package/s/_archive/lib/bindings/utils/action-resolver.ts +0 -51
- package/s/_archive/lib/bindings/utils/evaluator.ts +0 -162
- package/s/_archive/lib/bindings/utils/hash-bindings.ts +0 -22
- package/s/_archive/lib/bindings/utils/intent-coding.ts +0 -50
- package/s/_archive/lib/bindings/utils/intent-resolver.ts +0 -52
- package/s/_archive/lib/bindings/utils/investigate.ts +0 -47
- package/s/_archive/lib/bindings/utils/is-down.ts +0 -5
- package/s/_archive/lib/bindings/utils/is-expression.ts +0 -11
- package/s/_archive/lib/index.ts +0 -12
- package/s/_archive/lib/sampling/sources/example.ts +0 -7
- package/s/_archive/lib/sampling/sources/gamepad.ts +0 -63
- package/s/_archive/lib/sampling/sources/keyboard.ts +0 -52
- package/s/_archive/lib/sampling/sources/pointer.ts +0 -56
- package/s/_archive/lib/sampling/sources/sources.ts +0 -13
- package/s/_archive/lib/sampling/sources/stick.ts +0 -27
- package/s/_archive/lib/sampling/types.ts +0 -11
- package/s/_archive/lib/sampling/utils/add-sample.ts +0 -12
- package/s/_archive/lib/test.ts +0 -57
- package/s/_archive/lib/utils/backwards.ts +0 -6
- package/s/_archive/lib/utils/evergreen.ts +0 -10
- package/s/_archive/lib/utils/mouse-button.ts +0 -10
- package/s/_archive/lib/utils/pad/on-pad.ts +0 -50
- package/s/_archive/lib/utils/pad/pad.ts +0 -10
- package/s/_archive/lib/utils/split-axis.ts +0 -15
- package/s/_archive/lib2/core/decoder/decoder.ts +0 -34
- package/s/_archive/lib2/core/decoder/utils/update-input.ts +0 -21
- package/s/_archive/lib2/core/encoder/encoder.ts +0 -60
- package/s/_archive/lib2/core/encoder/evaluate/context.ts +0 -22
- package/s/_archive/lib2/core/encoder/evaluate/evaluate.ts +0 -144
- package/s/_archive/lib2/core/encoder/parts/expression-index.ts +0 -27
- package/s/_archive/lib2/core/encoder/parts/hash-bindings.ts +0 -22
- package/s/_archive/lib2/core/encoder/parts/investigate.ts +0 -50
- package/s/_archive/lib2/core/encoder/parts/sampler.ts +0 -22
- package/s/_archive/lib2/core/sources/example.ts +0 -9
- package/s/_archive/lib2/core/sources/sources.ts +0 -16
- package/s/_archive/lib2/core/types.ts +0 -78
- package/s/_archive/lib2/core/utils/data.ts +0 -50
- package/s/_archive/lib2/core/utils/is-down.ts +0 -5
- package/s/_archive/lib2/core/utils/is-expression.ts +0 -11
- package/s/_archive/lib3/input/data/encode.ts +0 -24
- package/s/_archive/lib3/input/decoder.ts +0 -56
- package/s/_archive/lib3/input/encoder.ts +0 -99
- package/s/_archive/lib3/input/evaluate/context.ts +0 -15
- package/s/_archive/lib3/input/evaluate/evaluate.ts +0 -142
- package/s/_archive/lib3/input/evaluate/utils/clock.ts +0 -14
- package/s/_archive/lib3/input/investigate/hash-bindings.ts +0 -22
- package/s/_archive/lib3/input/investigate/investigate.ts +0 -42
- package/s/_archive/lib3/input/investigate/is-expression.ts +0 -11
- package/s/_archive/lib3/input/investigate/make-input.ts +0 -18
- package/s/_archive/lib3/input/investigate/root-index.ts +0 -26
- package/s/_archive/lib3/input/mixer.ts +0 -20
- package/s/_archive/lib3/input/sources/gamepad.ts +0 -58
- package/s/_archive/lib3/input/sources/keyboard.ts +0 -49
- package/s/_archive/lib3/input/sources/plain.ts +0 -9
- package/s/_archive/lib3/input/sources/pointer.ts +0 -58
- package/s/_archive/lib3/input/sources/sources.ts +0 -24
- package/s/_archive/lib3/input/sources/stick.ts +0 -29
- package/s/_archive/lib3/input/testing/quickbind.ts +0 -20
- package/s/_archive/lib3/input/types.ts +0 -96
- package/s/_archive/lib3/input/utils/evergreen.ts +0 -10
- package/s/_archive/lib3/input/utils/is-down.ts +0 -5
- package/s/_archive/lib3/input/utils/mouse-button.ts +0 -10
- package/s/_archive/lib3/input/utils/pad/on-pad.ts +0 -50
- package/s/_archive/lib3/input/utils/pad/pad.ts +0 -10
- package/s/_archive/lib3/input/utils/sampler.ts +0 -28
- package/s/_archive/lib3/input/utils/split-axis.ts +0 -15
- package/s/_archive/lib3/test.ts +0 -100
- package/s/_archive/lib4/input/data/decode.ts +0 -25
- package/s/_archive/lib4/input/data/encode.ts +0 -24
- package/s/_archive/lib4/input/data/params.ts +0 -7
- package/s/_archive/lib4/input/encoder.ts +0 -100
- package/s/_archive/lib4/input/evaluate/context.ts +0 -16
- package/s/_archive/lib4/input/evaluate/evaluate.ts +0 -157
- package/s/_archive/lib4/input/evaluate/utils/clock.ts +0 -14
- package/s/_archive/lib4/input/investigate/hash-bindings.ts +0 -22
- package/s/_archive/lib4/input/investigate/investigate.ts +0 -37
- package/s/_archive/lib4/input/investigate/is.ts +0 -19
- package/s/_archive/lib4/input/investigate/make-input.ts +0 -18
- package/s/_archive/lib4/input/investigate/root-index.ts +0 -26
- package/s/_archive/lib4/input/sources/gamepad.ts +0 -58
- package/s/_archive/lib4/input/sources/keyboard.ts +0 -46
- package/s/_archive/lib4/input/sources/plain.ts +0 -9
- package/s/_archive/lib4/input/sources/pointer.ts +0 -50
- package/s/_archive/lib4/input/sources/sources.ts +0 -24
- package/s/_archive/lib4/input/sources/stick.ts +0 -25
- package/s/_archive/lib4/input/types.ts +0 -102
- package/s/_archive/lib4/input/utils/evergreen.ts +0 -10
- package/s/_archive/lib4/input/utils/is-down.ts +0 -5
- package/s/_archive/lib4/input/utils/mouse-button.ts +0 -10
- package/s/_archive/lib4/input/utils/pad/on-pad.ts +0 -50
- package/s/_archive/lib4/input/utils/pad/pad.ts +0 -10
- package/s/_archive/lib4/input/utils/sampler.ts +0 -28
- package/s/_archive/lib4/input/utils/split-axis.ts +0 -15
- package/s/_archive/lib4/test.ts +0 -12
- package/s/_archive/test.ts +0 -339
- package/s/_archive/ui/views/desk/style.css.ts +0 -70
- package/s/_archive/ui/views/desk/view.ts +0 -122
- package/s/_archive/utils/circular-clamp.ts +0 -14
- package/s/_archive/utils/do-async.ts +0 -5
- package/s/_archive/utils/evergreen.ts +0 -10
- package/s/_archive/utils/freeze-clone.ts +0 -7
- package/s/_archive/utils/identifier.ts +0 -30
- package/s/_archive/utils/insert.ts +0 -6
- package/s/_archive/utils/is-down.ts +0 -5
- package/s/_archive/utils/remap.ts +0 -7
- package/s/_archive/utils/shift-limit.ts +0 -9
- package/s/_archive/utils/sort-by-key.ts +0 -7
- package/s/_archive/utils/split-axis.ts +0 -15
- package/s/_archive/utils/tmax.ts +0 -7
- package/s/_archive/utils/tmin.ts +0 -7
- package/s/demo/demo-app/element.ts +0 -15
- package/s/demo/demo-app/style.css.ts +0 -10
- package/s/lib/input/data/decode.ts +0 -25
- package/s/lib/input/data/encode.ts +0 -24
- package/s/lib/input/data/params.ts +0 -7
- package/x/_archive/demo/main.css +0 -83
- package/x/demo/demo-app/element.d.ts +0 -1
- package/x/demo/demo-app/element.js +0 -12
- package/x/demo/demo-app/element.js.map +0 -1
- package/x/demo/demo-app/style.css.js +0 -9
- package/x/demo/demo-app/style.css.js.map +0 -1
- package/x/lib/input/data/decode.d.ts +0 -5
- package/x/lib/input/data/decode.js.map +0 -1
- package/x/lib/input/data/encode.d.ts +0 -2
- package/x/lib/input/data/encode.js +0 -17
- package/x/lib/input/data/encode.js.map +0 -1
- package/x/lib/input/data/params.js +0 -6
- package/x/lib/input/data/params.js.map +0 -1
- package/x/lib/input/encoder.d.ts +0 -10
- package/x/lib/input/encoder.js.map +0 -1
- /package/s/{_archive → lib}/utils/make-id.ts +0 -0
- /package/x/{demo/demo-app → lib/ui/views/controllers}/style.css.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pe=/'/g,he=/"/g,le=/^(?:script|style|textarea|title)$/i,Vt=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),gt=Vt(1),Pr=Vt(2),Mr=Vt(3),D=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),fe=new WeakMap,R=N.createTreeWalker(N,129);function de(e,t){if(!It(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ae!==void 0?ae.createHTML(t):t}var ge=(e,t)=>{let r=e.length-1,o=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=Z;for(let c=0;c<r;c++){let a=e[c],p,d,u=-1,S=0;for(;S<a.length&&(i.lastIndex=S,d=i.exec(a),d!==null);)S=i.lastIndex,i===Z?d[1]==="!--"?i=ce:d[1]!==void 0?i=ue:d[2]!==void 0?(le.test(d[2])&&(s=RegExp("</"+d[2],"g")),i=M):d[3]!==void 0&&(i=M):i===M?d[0]===">"?(i=s??Z,u=-1):d[1]===void 0?u=-2:(u=i.lastIndex-d[2].length,p=d[1],i=d[3]===void 0?M:d[3]==='"'?he:pe):i===he||i===pe?i=M:i===ce||i===ue?i=Z:(i=M,s=void 0);let T=i===M&&e[c+1].startsWith("/>")?" ":"";n+=i===Z?a+er:u>=0?(o.push(p),a.slice(0,u)+Bt+a.slice(u)+k+T):a+k+(u===-2?c:T)}return[de(e,n+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},X=class e{constructor({strings:t,_$litType$:r},o){let s;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[p,d]=ge(t,r);if(this.el=e.createElement(p,o),R.currentNode=this.el.content,r===2||r===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(s=R.nextNode())!==null&&a.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(let u of s.getAttributeNames())if(u.endsWith(Bt)){let S=d[i++],T=s.getAttribute(u).split(k),nt=/([.?@])?(.*)/.exec(S);a.push({type:1,index:n,name:nt[2],strings:T,ctor:nt[1]==="."?ft:nt[1]==="?"?mt:nt[1]==="@"?lt:L}),s.removeAttribute(u)}else u.startsWith(k)&&(a.push({type:6,index:n}),s.removeAttribute(u));if(le.test(s.tagName)){let u=s.textContent.split(k),S=u.length-1;if(S>0){s.textContent=pt?pt.emptyScript:"";for(let T=0;T<S;T++)s.append(u[T],Q()),R.nextNode(),a.push({type:2,index:++n});s.append(u[S],Q())}}}else if(s.nodeType===8)if(s.data===Wt)a.push({type:2,index:n});else{let u=-1;for(;(u=s.data.indexOf(k,u+1))!==-1;)a.push({type:7,index:n}),u+=k.length-1}n++}}static createElement(t,r){let o=N.createElement("template");return o.innerHTML=t,o}};function H(e,t,r=e,o){if(t===D)return t;let s=o!==void 0?r._$Co?.[o]:r._$Cl,n=Y(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,r,o)),o!==void 0?(r._$Co??=[])[o]=s:r._$Cl=s),s!==void 0&&(t=H(e,s._$AS(e,t.values),s,o)),t}var ht=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:o}=this._$AD,s=(t?.creationScope??N).importNode(r,!0);R.currentNode=s;let n=R.nextNode(),i=0,c=0,a=o[0];for(;a!==void 0;){if(i===a.index){let p;a.type===2?p=new B(n,n.nextSibling,this,t):a.type===1?p=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(p=new dt(n,this,t)),this._$AV.push(p),a=o[++c]}i!==a?.index&&(n=R.nextNode(),i++)}return R.currentNode=N,s}p(t){let r=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,r),r+=o.strings.length-2):o._$AI(t[r])),r++}},B=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,o,s){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=H(this,t,r),Y(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==D&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):me(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&Y(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:o}=t,s=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=X.createElement(de(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(r);else{let n=new ht(s,this),i=n.u(this.options);n.p(r),this.T(i),this._$AH=n}}_$AC(t){let r=fe.get(t.strings);return r===void 0&&fe.set(t.strings,r=new X(t)),r}k(t){It(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,o,s=0;for(let n of t)s===r.length?r.push(o=new e(this.O(Q()),this.O(Q()),this,this.options)):o=r[s],o._$AI(n),s++;s<r.length&&(this._$AR(o&&o._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let o=ie(t).nextSibling;ie(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,o,s,n){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=f}_$AI(t,r=this,o,s){let n=this.strings,i=!1;if(n===void 0)t=H(this,t,r,0),i=!Y(t)||t!==this._$AH&&t!==D,i&&(this._$AH=t);else{let c=t,a,p;for(t=n[0],a=0;a<n.length-1;a++)p=H(this,c[o+a],r,a),p===D&&(p=this._$AH[a]),i||=!Y(p)||p!==this._$AH[a],p===f?t=f:t!==f&&(t+=(p??"")+n[a+1]),this._$AH[a]=p}i&&!s&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ft=class extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},mt=class extends L{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},lt=class extends L{constructor(t,r,o,s,n){super(t,r,o,s,n),this.type=5}_$AI(t,r=this){if((t=H(this,t,r,0)??f)===D)return;let o=this._$AH,s=t===f&&o!==f||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==f&&(o===f||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},dt=class{constructor(t,r,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}},xe={M:Bt,P:k,A:Wt,C:1,L:ge,R:ht,D:me,V:H,I:B,H:L,N:mt,U:lt,B:ft,F:dt},rr=qt.litHtmlPolyfillSupport;rr?.(X,B),(qt.litHtmlVersions??=[]).push("3.3.3");var h=(e,t,r)=>{let o=r?.renderBefore??t,s=o._$litPart$;if(s===void 0){let n=r?.renderBefore??null;o._$litPart$=s=new B(t.insertBefore(Q(),n),n,void 0,r??{})}return s._$AI(e),s};var Ft=globalThis,W=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=h(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};W._$litElement$=!0,W.finalized=!0,Ft.litElementHydrateSupport?.({LitElement:W});var or=Ft.litElementPolyfillSupport;or?.({LitElement:W});(Ft.litElementVersions??=[]).push("4.2.2");var $={string:(e,t)=>e.getAttribute(t)??void 0,number:(e,t)=>{let r=e.getAttribute(t);return r===null||!r?void 0:Number(r)},boolean:(e,t)=>e.getAttribute(t)!==null},g={string:(e,t,r)=>(r===void 0?e.removeAttribute(t):e.setAttribute(t,r),!0),number:(e,t,r)=>(r===void 0?e.removeAttribute(t):e.setAttribute(t,r.toString()),!0),boolean:(e,t,r)=>(r?e.setAttribute(t,""):e.removeAttribute(t),!0),any:(e,t,r)=>{r==null?e.removeAttribute(t):typeof r=="string"?e.setAttribute(t,r):typeof r=="number"?e.setAttribute(t,r.toString()):typeof r=="boolean"?r===!0?e.setAttribute(t,""):e.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof r}"`)},entries:(e,t)=>{for(let[r,o]of t)g.any(e,r,o)},record:(e,t)=>g.entries(e,Object.entries(t))};function ye(e,t={}){let r=document.createElement(e);return g.record(r,t),r}function $e(e){let t=document.createDocumentFragment();return h(e,t),t.firstElementChild}function xt(e,t){let r=[];for(let[o,s]of Object.entries(t))if(typeof s=="function")e.addEventListener(o,s),r.push(()=>e.removeEventListener(o,s));else{let[n,i]=s;e.addEventListener(o,i,n),r.push(()=>e.removeEventListener(o,i))}return()=>r.forEach(o=>o())}function be(e,t){let r=new MutationObserver(t);return r.observe(e,{attributes:!0}),()=>r.disconnect()}var yt=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,r)=>$.string(this.element,r),set:(t,r,o)=>g.string(this.element,r,o)});numbers=new Proxy({},{get:(t,r)=>$.number(this.element,r),set:(t,r,o)=>g.number(this.element,r,o)});booleans=new Proxy({},{get:(t,r)=>$.boolean(this.element,r),set:(t,r,o)=>g.boolean(this.element,r,o)})};var Ae=(e,t,r={})=>new Proxy(t,{get:(o,s)=>{switch(t[s]){case String:return $.string(e,s);case Number:return $.number(e,s);case Boolean:return $.boolean(e,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(o,s,n)=>{try{switch(r.beforeSet?.(s),t[s]){case String:return g.string(e,s,n);case Number:return g.number(e,s,n);case Boolean:return g.boolean(e,s,n);default:throw new Error(`invalid attribute type for "${s}"`)}}finally{r.afterSet?.(s)}}});function I(e){let t=new yt(e);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:r=>be(e,r),spec:(r,o={})=>Ae(e,r,o)}}I.get=$;I.set=g;function we(e){return new Gt(e)}var Gt=class{tagName;#t=new Map;#e=[];constructor(t){this.tagName=t}attr(t,r=!0){return this.#t.set(t,r),this}attrs(t){for(let[r,o]of Object.entries(t))this.attr(r,o);return this}children(...t){return this.#e.push(...t),this}done(){let t=document.createElement(this.tagName);return g.entries(t,this.#t),t.append(...this.#e),t}};function V(e,t=document){let r=t.querySelector(e);if(!r)throw new Error(`element not found (${e})`);return r}function $t(e,t=document){return t.querySelector(e)}function bt(e,t=document){return Array.from(t.querySelectorAll(e))}var At=class e{element;#t;constructor(t){this.element=t}in(t){return new e(typeof t=="string"?V(t,this.element):t)}require(t){return V(t,this.element)}maybe(t){return $t(t,this.element)}all(t){return bt(t,this.element)}render(...t){return h(t,this.element)}get attrs(){return this.#t??=I(this.element)}events(t){return xt(this.element,t)}};function m(e,t=document){return V(e,t)}m.in=(e,t=document)=>new At(t).in(e);m.need=V;m.maybe=$t;m.all=bt;m.el=ye;m.elmer=we;m.mk=$e;m.events=xt;m.attrs=I;m.register=te;m.render=(e,...t)=>h(t,e);function U(){let e,t,r=new Promise((o,s)=>{e=o,t=s});return r.resolve=e,r.reject=t,r.promise=r,r.entangle=o=>(o.then(e,t),r),r}function wt(e){let t=null;return((...r)=>(t?t.params=r:(t={params:r,deferred:U()},queueMicrotask(()=>{let{params:o,deferred:s}=t;t=null,Promise.resolve(e(...o)).then(s.resolve).catch(s.reject)})),t.deferred.promise))}function b(e,t=new Set){if(t.has(e))throw new Error("cannot clone circular reference");let r;return typeof e=="function"||e!==null&&typeof e=="object"?(t.add(e),Array.isArray(e)?r=e.map(o=>b(o,new Set(t))):e.constructor===Object?r=Object.fromEntries(Object.entries(e).map(([o,s])=>[o,b(s,new Set(t))])):e instanceof Map?r=new Map(Array.from(e,([o,s])=>[o,b(s,new Set(t))])):e instanceof Set?r=new Set(Array.from(e,o=>b(o,new Set(t)))):e instanceof Date?r=new Date(e.getTime()):r=e,t.delete(e)):r=e,r}var tt=e=>typeof e=="object"&&e!==null;function sr(e){return e!=null}function nr(e){return e==null}var jo=Object.freeze({happy:sr,sad:nr,boolean:e=>typeof e=="boolean",number:e=>typeof e=="number",string:e=>typeof e=="string",bigint:e=>typeof e=="bigint",object:e=>typeof e=="object"&&e!==null,array:e=>Array.isArray(e),fn:e=>typeof e=="function",symbol:e=>typeof e=="symbol"});var _e=(e,t)=>{function r(o,s,n){if(!tt(o)||!tt(s))return o===s;if(n.includes(o))throw new Error("forbidden circularity detected in deep equal comparison");let i=[...n,o];if(o instanceof Map&&s instanceof Map){if(o.size!==s.size)return!1;for(let[c,a]of o)if(!s.has(c)||!r(a,s.get(c),i))return!1}else if(o instanceof Set&&s instanceof Set){if(o.size!==s.size)return!1;for(let c of o)if(!Array.from(s).some(a=>r(c,a,i)))return!1}else{let c=Object.keys(o),a=Object.keys(s);if(c.length!==a.length)return!1;for(let p of c)if(!a.includes(p)||!r(o[p],s[p],i))return!1}return!0}return r(e,t,[])};function ve(e){function t(r,o){if(!tt(r)||o.includes(r))return r;let s=[...o,r];if(r instanceof Map)for(let n of r.entries())for(let i of n)t(i,s);else if(r instanceof Set)for(let n of r)t(n,s);else if(Array.isArray(r))for(let n of r)t(n,s);else for(let n of Object.values(r))t(n,s);return Object.freeze(r)}return t(e,[])}function Se(e){if(e.ok)return e.value;let{error:t}=e;throw t instanceof Error?t:typeof t=="string"?new Error(t):new Error("unknown")}function Ee(e){if(e.ok)throw new Error("didn't get needed error");return e.error}function _t(e,t,r){if(e.has(t))return e.get(t);{let o=r();return e.set(t,o),o}}function Ce(e){let t,r=!1,o=()=>{r=!0,clearTimeout(t)},s=async()=>{r||(await e(o),!r&&(t=setTimeout(s,0)))};return s(),o}var ke=(e=0)=>new Promise(t=>setTimeout(t,e));function vt(e){let t=ir(),r=o=>t.on(o);return Object.assign(r,t),e&&t.on(e),r}function ir(){let e=new Set,t,r=()=>t??=U(),o=c=>{let a=t;t=void 0,a?.resolve(c)};return{set:e,on:c=>(e.add(c),()=>{e.delete(c)}),publish:(...c)=>{o(c);for(let a of[...e])a(...c)},publishAsync:async(...c)=>{o(c),await Promise.all([...e].map(async a=>a(...c)))},next:r}}var St=class{#t=new Set;#e=[];#r=new WeakMap;#o=0;#s=new Set;read(t){this.#e.at(-1)?.add(t)}write(t){let r=this.#r.get(t);if(r){for(let o of r)this.#s.add(o);this.#o===0&&this.#n()}}observe(t){let r=new Set;this.#e.push(r);try{let o=t();return{seen:r,value:o}}finally{this.#e.pop()}}subscribe(t,r){let o=_t(this.#r,t,()=>new Set);return o.add(r),()=>{o.delete(r),o.size===0&&this.#r.delete(t)}}batch=t=>{this.#o++;try{return t()}finally{this.#o--,this.#o===0&&this.#n()}};#i(t){if(this.#t.has(t))throw new Error("circularity forbidden");this.#t.add(t);try{t()}finally{this.#t.delete(t)}}#n(){for(;this.#s.size>0;){let t=[...this.#s];this.#s.clear();for(let r of t)this.#i(r)}}};var l=globalThis[Symbol.for("e280.tracker.2")]??=new St;function O(e){let t;function r(){return arguments.length===0?(l.read(r),e):(e=arguments[0],l.write(r),t?.publish(e),e)}return r.get=()=>r(),r.set=o=>r(o),r.on=o=>(t??=vt())(o),r}var vs=l.batch;function Oe(e){return ve(b(e))}var A=Symbol("optic");var et=class{calculate;#t=!1;#e;constructor(t){this.calculate=t,this.#e=t()}get(){return this.#t&&(this.#t=!1,this.#e=this.calculate()),this.#e}invalidate(){this.#t=!0}};var Et=class e{[A];#t;#e;#r;#o=vt();constructor(t){this[A]=t,this.#t=b(t.getState()),this.#e=new et(()=>b(t.getState())),this.#r=new et(()=>Oe(t.getState()))}get on(){return this.#o.on}update(){let t=this[A].getState();!_e(t,this.#t)&&(this.#e.invalidate(),this.#r.invalidate(),this.#t=b(t),l.write(this),this.#o.set.size&&this.#o.publish(this.#e.get()))}get state(){return l.read(this),this.#e.get()}get frozen(){return l.read(this),this.#r.get()}mutate(t){return this[A].mutate(t)}lens(t){let r=new e({getState:()=>t(this[A].getState()),mutate:o=>this[A].mutate(s=>o(t(s))),registerLens:this[A].registerLens});return this[A].registerLens(r),r}};function Pe(e){if(!e.done)throw new Error("wait not done");return Se(e)}function Me(e){if(!e.done)throw new Error("wait not done");return Ee(e)}var Re=e=>!e.done;var Kt=e=>e.done&&e.ok;function Ne(e,t){let{pending:r=()=>{},ok:o=()=>{},err:s=()=>{}}=t;return Re(e)?r():Kt(e)?o(Pe(e)):s(Me(e))}var Ct=E`
|
|
1
|
+
var _s=Object.defineProperty;var Cs=(r,t)=>{for(var e in t)_s(r,e,{get:t[e],enumerable:!0})};function Pr(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function te(r,t={}){let{soft:e=!1,upgrade:o=!0}=t;for(let[s,n]of Object.entries(r)){let i=Pr(s),a=customElements.get(i);e&&a||(customElements.define(i,n),o&&document.querySelectorAll(i).forEach(c=>{c.constructor===HTMLElement&&customElements.upgrade(c)}))}}var ee=globalThis,re=ee.ShadowRoot&&(ee.ShadyCSS===void 0||ee.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,or=Symbol(),zr=new WeakMap,Bt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==or)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(re&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=zr.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&zr.set(e,t))}return t}toString(){return this.cssText}},Or=r=>new Bt(typeof r=="string"?r:r+"",void 0,or),b=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((o,s,n)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[n+1],r[0]);return new Bt(e,r,or)},oe=(r,t)=>{if(re)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),s=ee.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=e.cssText,r.appendChild(o)}},pt=re?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return Or(e)})(r):r;var{is:Es,defineProperty:Ms,getOwnPropertyDescriptor:Ps,getOwnPropertyNames:zs,getOwnPropertySymbols:Os,getPrototypeOf:Ts}=Object,se=globalThis,Tr=se.trustedTypes,Bs=Tr?Tr.emptyScript:"",js=se.reactiveElementPolyfillSupport,jt=(r,t)=>r,sr={toAttribute(r,t){switch(t){case Boolean:r=r?Bs:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},jr=(r,t)=>!Es(r,t),Br={attribute:!0,type:String,converter:sr,reflect:!1,useDefault:!1,hasChanged:jr};Symbol.metadata??=Symbol("metadata"),se.litPropertyMetadata??=new WeakMap;var N=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Br){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),s=this.getPropertyDescriptor(t,o,e);s!==void 0&&Ms(this.prototype,t,s)}}static getPropertyDescriptor(t,e,o){let{get:s,set:n}=Ps(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:s,set(i){let a=s?.call(this);n?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Br}static _$Ei(){if(this.hasOwnProperty(jt("elementProperties")))return;let t=Ts(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(jt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(jt("properties"))){let e=this.properties,o=[...zs(e),...Os(e)];for(let s of o)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,s]of e)this.elementProperties.set(o,s)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let s=this._$Eu(e,o);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let s of o)e.unshift(pt(s))}else t!==void 0&&e.push(pt(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return oe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){let n=(o.converter?.toAttribute!==void 0?o.converter:sr).toAttribute(e,o.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){let o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let n=o.getPropertyOptions(s),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:sr;this._$Em=s;let a=i.fromAttribute(e,n.type);this[s]=a??this._$Ej?.get(s)??a,this._$Em=null}}requestUpdate(t,e,o,s=!1,n){if(t!==void 0){let i=this.constructor;if(s===!1&&(n=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??jr)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:s,wrapped:n},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[s,n]of o){let{wrapped:i}=n,a=this[s];i!==!0||this._$AL.has(s)||a===void 0||this.C(s,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[jt("elementProperties")]=new Map,N[jt("finalized")]=new Map,js?.({ReactiveElement:N}),(se.reactiveElementVersions??=[]).push("2.1.2");var ir=globalThis,Dr=r=>r,ne=ir.trustedTypes,Rr=ne?ne.createPolicy("lit-html",{createHTML:r=>r}):void 0,ar="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,cr="?"+I,Ds=`<${cr}>`,tt=document,Rt=()=>tt.createComment(""),Lt=r=>r===null||typeof r!="object"&&typeof r!="function",lr=Array.isArray,Ur=r=>lr(r)||typeof r?.[Symbol.iterator]=="function",nr=`[
|
|
2
|
+
\f\r]`,Dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lr=/-->/g,Nr=/>/g,X=RegExp(`>|${nr}(?:([^\\s"'>=/]+)(${nr}*=${nr}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ir=/'/g,Hr=/"/g,qr=/^(?:script|style|textarea|title)$/i,ur=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),h=ur(1),f=ur(2),On=ur(3),et=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Vr=new WeakMap,Y=tt.createTreeWalker(tt,129);function Wr(r,t){if(!lr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Rr!==void 0?Rr.createHTML(t):t}var Fr=(r,t)=>{let e=r.length-1,o=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=Dt;for(let a=0;a<e;a++){let c=r[a],l,p,u=-1,m=0;for(;m<c.length&&(i.lastIndex=m,p=i.exec(c),p!==null);)m=i.lastIndex,i===Dt?p[1]==="!--"?i=Lr:p[1]!==void 0?i=Nr:p[2]!==void 0?(qr.test(p[2])&&(s=RegExp("</"+p[2],"g")),i=X):p[3]!==void 0&&(i=X):i===X?p[0]===">"?(i=s??Dt,u=-1):p[1]===void 0?u=-2:(u=i.lastIndex-p[2].length,l=p[1],i=p[3]===void 0?X:p[3]==='"'?Hr:Ir):i===Hr||i===Ir?i=X:i===Lr||i===Nr?i=Dt:(i=X,s=void 0);let _=i===X&&r[a+1].startsWith("/>")?" ":"";n+=i===Dt?c+Ds:u>=0?(o.push(l),c.slice(0,u)+ar+c.slice(u)+I+_):c+I+(u===-2?a:_)}return[Wr(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},Nt=class r{constructor({strings:t,_$litType$:e},o){let s;this.parts=[];let n=0,i=0,a=t.length-1,c=this.parts,[l,p]=Fr(t,e);if(this.el=r.createElement(l,o),Y.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(s=Y.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let u of s.getAttributeNames())if(u.endsWith(ar)){let m=p[i++],_=s.getAttribute(u).split(I),Q=/([.?@])?(.*)/.exec(m);c.push({type:1,index:n,name:Q[2],strings:_,ctor:Q[1]==="."?ae:Q[1]==="?"?ce:Q[1]==="@"?le:ot}),s.removeAttribute(u)}else u.startsWith(I)&&(c.push({type:6,index:n}),s.removeAttribute(u));if(qr.test(s.tagName)){let u=s.textContent.split(I),m=u.length-1;if(m>0){s.textContent=ne?ne.emptyScript:"";for(let _=0;_<m;_++)s.append(u[_],Rt()),Y.nextNode(),c.push({type:2,index:++n});s.append(u[m],Rt())}}}else if(s.nodeType===8)if(s.data===cr)c.push({type:2,index:n});else{let u=-1;for(;(u=s.data.indexOf(I,u+1))!==-1;)c.push({type:7,index:n}),u+=I.length-1}n++}}static createElement(t,e){let o=tt.createElement("template");return o.innerHTML=t,o}};function rt(r,t,e=r,o){if(t===et)return t;let s=o!==void 0?e._$Co?.[o]:e._$Cl,n=Lt(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,e,o)),o!==void 0?(e._$Co??=[])[o]=s:e._$Cl=s),s!==void 0&&(t=rt(r,s._$AS(r,t.values),s,o)),t}var ie=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,s=(t?.creationScope??tt).importNode(e,!0);Y.currentNode=s;let n=Y.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new ht(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new ue(n,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(n=Y.nextNode(),i++)}return Y.currentNode=tt,s}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},ht=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,s){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=rt(this,t,e),Lt(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==et&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ur(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==w&&Lt(this._$AH)?this._$AA.nextSibling.data=t:this.T(tt.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,s=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=Nt.createElement(Wr(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(e);else{let n=new ie(s,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=Vr.get(t.strings);return e===void 0&&Vr.set(t.strings,e=new Nt(t)),e}k(t){lr(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,s=0;for(let n of t)s===e.length?e.push(o=new r(this.O(Rt()),this.O(Rt()),this,this.options)):o=e[s],o._$AI(n),s++;s<e.length&&(this._$AR(o&&o._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Dr(t).nextSibling;Dr(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},ot=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,s,n){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=w}_$AI(t,e=this,o,s){let n=this.strings,i=!1;if(n===void 0)t=rt(this,t,e,0),i=!Lt(t)||t!==this._$AH&&t!==et,i&&(this._$AH=t);else{let a=t,c,l;for(t=n[0],c=0;c<n.length-1;c++)l=rt(this,a[o+c],e,c),l===et&&(l=this._$AH[c]),i||=!Lt(l)||l!==this._$AH[c],l===w?t=w:t!==w&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}i&&!s&&this.j(t)}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ae=class extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===w?void 0:t}},ce=class extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w)}},le=class extends ot{constructor(t,e,o,s,n){super(t,e,o,s,n),this.type=5}_$AI(t,e=this){if((t=rt(this,t,e,0)??w)===et)return;let o=this._$AH,s=t===w&&o!==w||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==w&&(o===w||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ue=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){rt(this,t)}},Gr={M:ar,P:I,A:cr,C:1,L:Fr,R:ie,D:Ur,V:rt,I:ht,H:ot,N:ce,U:le,B:ae,F:ue},Rs=ir.litHtmlPolyfillSupport;Rs?.(Nt,ht),(ir.litHtmlVersions??=[]).push("3.3.3");var x=(r,t,e)=>{let o=e?.renderBefore??t,s=o._$litPart$;if(s===void 0){let n=e?.renderBefore??null;o._$litPart$=s=new ht(t.insertBefore(Rt(),n),n,void 0,e??{})}return s._$AI(r),s};var pr=globalThis,dt=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=x(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}};dt._$litElement$=!0,dt.finalized=!0,pr.litElementHydrateSupport?.({LitElement:dt});var Ls=pr.litElementPolyfillSupport;Ls?.({LitElement:dt});(pr.litElementVersions??=[]).push("4.2.2");var P={string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},$={string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0),any:(r,t,e)=>{e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)},entries:(r,t)=>{for(let[e,o]of t)$.any(r,e,o)},record:(r,t)=>$.entries(r,Object.entries(t))};function Kr(r,t={}){let e=document.createElement(r);return $.record(e,t),e}function Jr(r){let t=document.createDocumentFragment();return x(r,t),t.firstElementChild}function pe(r,t){let e=[];for(let[o,s]of Object.entries(t))if(typeof s=="function")r.addEventListener(o,s),e.push(()=>r.removeEventListener(o,s));else{let[n,i]=s;r.addEventListener(o,i,n),e.push(()=>r.removeEventListener(o,i))}return()=>e.forEach(o=>o())}function Zr(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var he=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>P.string(this.element,e),set:(t,e,o)=>$.string(this.element,e,o)});numbers=new Proxy({},{get:(t,e)=>P.number(this.element,e),set:(t,e,o)=>$.number(this.element,e,o)});booleans=new Proxy({},{get:(t,e)=>P.boolean(this.element,e),set:(t,e,o)=>$.boolean(this.element,e,o)})};var Qr=(r,t,e={})=>new Proxy(t,{get:(o,s)=>{switch(t[s]){case String:return P.string(r,s);case Number:return P.number(r,s);case Boolean:return P.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(o,s,n)=>{try{switch(e.beforeSet?.(s),t[s]){case String:return $.string(r,s,n);case Number:return $.number(r,s,n);case Boolean:return $.boolean(r,s,n);default:throw new Error(`invalid attribute type for "${s}"`)}}finally{e.afterSet?.(s)}}});function mt(r){let t=new he(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>Zr(r,e),spec:(e,o={})=>Qr(r,e,o)}}mt.get=P;mt.set=$;function Xr(r){return new hr(r)}var hr=class{tagName;#t=new Map;#e=[];constructor(t){this.tagName=t}attr(t,e=!0){return this.#t.set(t,e),this}attrs(t){for(let[e,o]of Object.entries(t))this.attr(e,o);return this}children(...t){return this.#e.push(...t),this}done(){let t=document.createElement(this.tagName);return $.entries(t,this.#t),t.append(...this.#e),t}};function ft(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`element not found (${r})`);return e}function de(r,t=document){return t.querySelector(r)}function me(r,t=document){return Array.from(t.querySelectorAll(r))}var fe=class r{element;#t;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?ft(t,this.element):t)}require(t){return ft(t,this.element)}maybe(t){return de(t,this.element)}all(t){return me(t,this.element)}render(...t){return x(t,this.element)}get attrs(){return this.#t??=mt(this.element)}events(t){return pe(this.element,t)}};function g(r,t=document){return ft(r,t)}g.in=(r,t=document)=>new fe(t).in(r);g.need=ft;g.maybe=de;g.all=me;g.el=Kr;g.elmer=Xr;g.mk=Jr;g.events=pe;g.attrs=mt;g.register=te;g.render=(r,...t)=>x(t,r);var $e={};Cs($e,{DragAndDrops:()=>xr,Drops:()=>yr,files:()=>Gs,hasFiles:()=>Fs,outsideCurrentTarget:()=>qt});var Yr=Object.freeze({eq(r,t){if(r.length!==t.length)return!1;let e=0;for(let o=0;o<r.length;o++)e|=r[o]^t[o];return e===0},random(r){return crypto.getRandomValues(new Uint8Array(r))},concat(r){let t=0;for(let s of r)t+=s.byteLength;let e=new Uint8Array(t),o=0;for(let s of r)e.set(s,o),o+=s.byteLength;return e}});var v=class{lexicon;static lexicons=Object.freeze({base2:{characters:"01"},hex:{characters:"0123456789abcdef",caseInsensitive:!0},base36:{characters:"0123456789abcdefghijklmnopqrstuvwxyz"},base58:{characters:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"},base62:{characters:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},base64url:{negativePrefix:"~",characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},base64:{characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",padding:{character:"=",size:4}}});lookup;negativePrefix;constructor(t){this.lexicon=t,this.lookup=Object.fromEntries([...t.characters].map((o,s)=>[o,s])),this.negativePrefix=t.negativePrefix??"-";let e=this.fromBytes.bind(this);return Object.setPrototypeOf(e,new.target.prototype),Object.assign(e,this),e}toBytes(t){this.lexicon.caseInsensitive&&(t=t.toLowerCase());let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let l=0,p=0,u=[];for(let m of t){if(m===this.lexicon.padding?.character)continue;let _=this.lookup[m];if(_===void 0)throw new Error(`Invalid character: ${m}`);for(l=l<<e|_,p+=e;p>=8;)p-=8,u.push(l>>p&255)}return new Uint8Array(u)}let o=0n,s=BigInt(this.lexicon.characters.length);t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length));let n=this.lexicon.characters[0],i=0;for(;t[i]===n;)i++;t=t.slice(i);for(let l of t){let p=this.lookup[l];if(p===void 0)throw new Error(`Invalid character: ${l}`);o=o*s+BigInt(p)}let a=new Uint8Array(i+(o===0n?0:this.countBytes(o))),c=a.length;for(;o>0n;)a[--c]=Number(o%256n),o=o/256n;return a}fromBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let c=0,l=0,p="";for(let u of t)for(c=c<<8|u,l+=8;l>=e;){l-=e;let m=c>>l&(1<<e)-1;p+=this.lexicon.characters[m]}if(l>0){let u=c<<e-l&(1<<e)-1;p+=this.lexicon.characters[u]}if(this.lexicon.padding)for(;p.length%this.lexicon.padding.size!==0;)p+=this.lexicon.padding.character;return p}if(t.length===0)return"";let o=this.lexicon.characters[0],s=0;for(;t[s]===0;)s++;let n=0n;for(let c of t.slice(s))n=(n<<8n)+BigInt(c);if(n===0n)return o.repeat(s);let i=BigInt(this.lexicon.characters.length),a="";for(;n>0n;)a=this.lexicon.characters[Number(n%i)]+a,n=n/i;return o.repeat(s)+a}toInteger(t){if(!t)return 0;let e=0n,o=!1,s=BigInt(this.lexicon.characters.length);t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),o=!0);for(let n of t){let i=this.lookup[n];if(i===void 0)throw new Error(`Invalid character: ${n}`);e=e*s+BigInt(i)}return Number(o?-e:e)}fromInteger(t){t=Math.floor(t);let e=t<0,o=BigInt(e?-t:t);if(o===0n)return this.lexicon.characters[0];let s=BigInt(this.lexicon.characters.length),n="";for(;o>0n;)n=this.lexicon.characters[Number(o%s)]+n,o=o/s;return e?`${this.negativePrefix}${n}`:n}random(t=32){return this.fromBytes(Yr.random(t))}countBytes(t){let e=0;for(;t>0n;)e++,t=t/256n;return e}};var ge=new v(v.lexicons.hex),Li=new v(v.lexicons.base2),Ni=new v(v.lexicons.base36),Ii=new v(v.lexicons.base58),Hi=new v(v.lexicons.base62),Vi=new v(v.lexicons.base64),Ui=new v(v.lexicons.base64url);function to(r,t){let e,o,s=[];function n(){e=[],o&&clearTimeout(o),o=void 0,s=[]}return n(),((...i)=>{e=i,o&&clearTimeout(o);let a=new Promise((c,l)=>{s.push({resolve:c,reject:l})});return o=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(c=>{for(let{resolve:l}of s)l(c);n()}).catch(c=>{for(let{reject:l}of s)l(c);n()})},r),a})}function st(){let r,t,e=new Promise((o,s)=>{r=o,t=s});return e.resolve=r,e.reject=t,e.promise=e,e.entangle=o=>(o.then(r,t),e),e}function gt(r){let t=null;return((...e)=>(t?t.params=e:(t={params:e,deferred:st()},queueMicrotask(()=>{let{params:o,deferred:s}=t;t=null,Promise.resolve(r(...o)).then(s.resolve).catch(s.reject)})),t.deferred.promise))}function z(r,t=new Set){if(t.has(r))throw new Error("cannot clone circular reference");let e;return typeof r=="function"||r!==null&&typeof r=="object"?(t.add(r),Array.isArray(r)?e=r.map(o=>z(o,new Set(t))):r.constructor===Object?e=Object.fromEntries(Object.entries(r).map(([o,s])=>[o,z(s,new Set(t))])):r instanceof Map?e=new Map(Array.from(r,([o,s])=>[o,z(s,new Set(t))])):r instanceof Set?e=new Set(Array.from(r,o=>z(o,new Set(t)))):r instanceof Date?e=new Date(r.getTime()):e=r,t.delete(r)):e=r,e}function C(r){return r!=null}var bt=r=>typeof r=="number",xt=r=>typeof r=="string";var It=r=>typeof r=="object"&&r!==null,be=r=>Array.isArray(r);function Ns(r){return r!=null}function Is(r){return r==null}var Zi=Object.freeze({happy:Ns,sad:Is,boolean:r=>typeof r=="boolean",number:r=>typeof r=="number",string:r=>typeof r=="string",bigint:r=>typeof r=="bigint",object:r=>typeof r=="object"&&r!==null,array:r=>Array.isArray(r),fn:r=>typeof r=="function",symbol:r=>typeof r=="symbol"});var eo=(r,t)=>{function e(o,s,n){if(!It(o)||!It(s))return o===s;if(n.includes(o))throw new Error("forbidden circularity detected in deep equal comparison");let i=[...n,o];if(o instanceof Map&&s instanceof Map){if(o.size!==s.size)return!1;for(let[a,c]of o)if(!s.has(a)||!e(c,s.get(a),i))return!1}else if(o instanceof Set&&s instanceof Set){if(o.size!==s.size)return!1;for(let a of o)if(!Array.from(s).some(c=>e(a,c,i)))return!1}else{let a=Object.keys(o),c=Object.keys(s);if(a.length!==c.length)return!1;for(let l of a)if(!c.includes(l)||!e(o[l],s[l],i))return!1}return!0}return e(r,t,[])};function nt(r){function t(e,o){if(!It(e)||o.includes(e))return e;let s=[...o,e];if(e instanceof Map)for(let n of e.entries())for(let i of n)t(i,s);else if(e instanceof Set)for(let n of e)t(n,s);else if(Array.isArray(e))for(let n of e)t(n,s);else for(let n of Object.values(e))t(n,s);return Object.freeze(e)}return t(r,[])}function ro(r){if(r.ok)return r.value;let{error:t}=r;throw t instanceof Error?t:typeof t=="string"?new Error(t):new Error("unknown")}function oo(r){if(r.ok)throw new Error("didn't get needed error");return r.error}var Hs=new TextEncoder;function dr(r){return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),r^=r>>>14,r>>>0}function Vs(r){let t=2166136261;for(let e of Hs.encode(r))t^=e,t=Math.imul(t,16777619);return dr(t)}function so(...r){let t=2654435769;for(let e of r){let o=typeof e=="string"?Vs(e):e>>>0;t=t+1831565813>>>0,t^=dr(o),t=dr(t)}return t}function k(r,t="got failed"){if(r==null)throw new Error(t);return r}function yt(r,t,e){if(r.has(t))return r.get(t);{let o=e();return r.set(t,o),o}}function Ht(r,t){for(let[e,o]of t)r.set(e,o);return r}function xe(r,t){return t<=0?[]:r.length>t?r.slice(-t):r}async function mr(r){let t=[];for await(let e of r)t.push(e);return t}function wt(r){let t,e=!1,o=()=>{e=!0,clearTimeout(t)},s=async()=>{e||(await r(o),!e&&(t=setTimeout(s,0)))};return s(),o}function V(){let r=[],t=()=>{let o=r;r=[];for(let s=o.length-1;s>=0;s--)o[s]()};function e(){t()}return e.dispose=t,e.schedule=(...o)=>(r.push(...o),e),e.own=(o,s)=>(r.push(()=>s(o)),o),e.disposable=o=>(r.push(()=>o.dispose()),o),e.disposables=e.disposable,e}function E(r,t){let e=Object.entries(t);for(let[o,s]of e)r.addEventListener(o,s);return()=>{for(let[o,s]of e)r.removeEventListener(o,s)}}var vt=class{count;constructor(t=0){this.count=t}next(){return this.count++}};var $t=(r=0)=>new Promise(t=>setTimeout(t,r));var fr=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,o])=>[e,t(o,e)])),Us=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,o])=>t(o,e)));function qs(r){return{map:t=>no(r,t),filter:t=>io(r,t)}}qs.pipe=Object.freeze({map:r=>(t=>no(t,r)),filter:r=>(t=>io(t,r))});var no=fr,io=Us;function U(r){let t=Ws(),e=o=>t.on(o);return Object.assign(e,t),r&&t.on(r),e}function Ws(){let r=new Set,t,e=()=>t??=st(),o=a=>{let c=t;t=void 0,c?.resolve(a)};return{set:r,on:a=>(r.add(a),()=>{r.delete(a)}),publish:(...a)=>{o(a);for(let c of[...r])c(...a)},publishAsync:async(...a)=>{o(a),await Promise.all([...r].map(async c=>c(...a)))},next:e}}function q(r,...t){let e=r.length-1;return r.slice(0,e).reduce((o,s,n)=>o+s+t[n],"")+r[e]}function kt(r,t,e){return r?t():e?.()}function ye(r,t,e){return C(r)?t(r):e?.()}var we=class{#t=new Set;#e=[];#o=new WeakMap;#r=0;#s=new Set;read(t){this.#e.at(-1)?.add(t)}write(t){let e=this.#o.get(t);if(e){for(let o of e)this.#s.add(o);this.#r===0&&this.#n()}}observe(t){let e=new Set;this.#e.push(e);try{let o=t();return{seen:e,value:o}}finally{this.#e.pop()}}subscribe(t,e){let o=yt(this.#o,t,()=>new Set);return o.add(e),()=>{o.delete(e),o.size===0&&this.#o.delete(t)}}batch=t=>{this.#r++;try{return t()}finally{this.#r--,this.#r===0&&this.#n()}};#i(t){if(this.#t.has(t))throw new Error("circularity forbidden");this.#t.add(t);try{t()}finally{this.#t.delete(t)}}#n(){for(;this.#s.size>0;){let t=[...this.#s];this.#s.clear();for(let e of t)this.#i(e)}}};var d=globalThis[Symbol.for("e280.tracker.2")]??=new we;function S(r){let t;function e(){return arguments.length===0?(d.read(e),r):(r=arguments[0],d.write(e),t?.publish(r),r)}return e.get=()=>e(),e.set=o=>e(o),e.on=o=>(t??=U())(o),e}var O=class extends Map{get size(){return d.read(this),super.size}[Symbol.iterator](){return d.read(this),super[Symbol.iterator]()}forEach(t){d.read(this);for(let[e,o]of this)t(o,e,this);return this}keys(){return d.read(this),super.keys()}values(){return d.read(this),super.values()}entries(){return d.read(this),super.entries()}has(t){return d.read(this),super.has(t)}get(t){return d.read(this),super.get(t)}set(t,e){return super.set(t,e),d.write(this),this}delete(t){let e=super.delete(t);return d.write(this),e}clear(){return super.clear(),d.write(this),this}};var Vt=class extends Set{get size(){return d.read(this),super.size}[Symbol.iterator](){return d.read(this),super[Symbol.iterator]()}forEach(t){d.read(this);for(let e of this)t(e,e,this);return this}values(){return d.read(this),super.values()}has(t){return d.read(this),super.has(t)}add(t){return super.add(t),d.write(this),this}delete(t){let e=super.delete(t);return d.write(this),e}clear(){return super.clear(),d.write(this),this}};var Fa=d.batch;function co(r){return nt(z(r))}var T=Symbol("optic");var Ut=class{calculate;#t=!1;#e;constructor(t){this.calculate=t,this.#e=t()}get(){return this.#t&&(this.#t=!1,this.#e=this.calculate()),this.#e}invalidate(){this.#t=!0}};var ve=class r{[T];#t;#e;#o;#r=U();constructor(t){this[T]=t,this.#t=z(t.getState()),this.#e=new Ut(()=>z(t.getState())),this.#o=new Ut(()=>co(t.getState()))}get on(){return this.#r.on}update(){let t=this[T].getState();!eo(t,this.#t)&&(this.#e.invalidate(),this.#o.invalidate(),this.#t=z(t),d.write(this),this.#r.set.size&&this.#r.publish(this.#e.get()))}get state(){return d.read(this),this.#e.get()}get frozen(){return d.read(this),this.#o.get()}mutate(t){return this[T].mutate(t)}lens(t){let e=new r({getState:()=>t(this[T].getState()),mutate:o=>this[T].mutate(s=>o(t(s))),registerLens:this[T].registerLens});return this[T].registerLens(e),e}};function lo(r){if(!r.done)throw new Error("wait not done");return ro(r)}function uo(r){if(!r.done)throw new Error("wait not done");return oo(r)}var po=r=>!r.done;var br=r=>r.done&&r.ok;function ho(r,t){let{pending:e=()=>{},ok:o=()=>{},err:s=()=>{}}=t;return po(r)?e():br(r)?o(lo(r)):s(uo(r))}function Fs(r){return!!(r.dataTransfer&&r.dataTransfer.types.includes("Files"))}function Gs(r){return r.dataTransfer?Array.from(r.dataTransfer.files):[]}function qt(r){let t=r.currentTarget,e=r.relatedTarget;return!t||!e||!t.contains(e)}var xr=class{params;$draggy=S(void 0);$droppy=S(void 0);constructor(t){this.params=t}get dragging(){return this.$draggy()}get hovering(){return this.$droppy()}dragzone=t=>({draggable:"true",dragstart:e=>{this.$draggy(t())},dragend:e=>{this.$draggy(void 0),this.$droppy(void 0)}});dropzone=t=>({dragenter:e=>{},dragover:e=>{e.preventDefault(),this.$draggy()?this.$droppy(t()):this.params.backchannelDrops?.dragover(e)},dragleave:e=>{qt(e)&&this.$droppy(void 0),this.params.backchannelDrops?.dragleave(e)},drop:e=>{e.preventDefault();let{acceptDrop:o}=this.params,s=this.$draggy(),n=this.$droppy();try{s&&n?o(e,s,n):this.params.backchannelDrops?.drop(e)}finally{this.$draggy(void 0),this.$droppy(void 0)}}})};var yr=class{params;$indicator=S(!1);constructor(t){this.params=t}dragover=t=>{t.preventDefault(),this.$indicator(this.params.predicate(t))};dragleave=t=>{qt(t)&&this.$indicator(!1)};drop=t=>{t.preventDefault(),this.$indicator(!1),this.params.predicate(t)&&this.params.acceptDrop(t)}};var St=b`
|
|
4
4
|
* {
|
|
5
5
|
margin: 0;
|
|
6
6
|
padding: 0;
|
|
@@ -14,27 +14,825 @@ function Xt(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}func
|
|
|
14
14
|
::-webkit-scrollbar-track { background: transparent; }
|
|
15
15
|
::-webkit-scrollbar-thumb { background: #888; border-radius: 1em; }
|
|
16
16
|
::-webkit-scrollbar-thumb:hover { background: #999; }
|
|
17
|
-
`;var
|
|
17
|
+
`;var ke=class r extends HTMLElement{static register(){g.register({SlyShadow:r},{soft:!0})}connectedCallback(){this.hasAttribute("view")||this.setAttribute("view","")}};var Wt=class{render;count=0;rendered=st();constructor(t){this.render=t}doneRender(){this.count++,this.rendered.resolve(),this.rendered=st()}},W=class extends Wt{host;shadow;constructor(t,e,o){super(t),this.host=e,this.shadow=o}};var wr=class{#t=[];get scope(){let t=this.#t.at(-1);if(!t)throw new Error("hooks must be called within a render fn");return t}increment(){let t=this.scope,e=t.position++;return{scope:t,position:e}}wrap(t,e){t.position=0,this.#t.push(t);try{return e()}finally{this.#t.pop()}}},M=globalThis[Symbol.for("e280.hooks")]??=new wr;var F=class{#t=[];clear(){this.#t.forEach(t=>t()),this.#t=[]}observe(t,e){let{seen:o,value:s}=d.observe(t);this.clear();for(let n of o){let i=d.subscribe(n,e);this.#t.push(i)}return s}};var Se=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var G=class{cx;position=0;values=new Map;mounts=new Se;constructor(t){this.cx=t}};var{I:eu}=Gr;var mo=r=>r.strings===void 0;var fo={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ft=r=>(...t)=>({_$litDirective$:r,values:t}),Ae=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Gt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),Gt(o,t);return!0},_e=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},go=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),Xs(t)}};function Zs(r){this._$AN!==void 0?(_e(this),this._$AM=r,go(this)):this._$AM=r}function Qs(r,t=!1,e=0){let o=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(o))for(let n=e;n<o.length;n++)Gt(o[n],!1),_e(o[n]);else o!=null&&(Gt(o,!1),_e(o));else Gt(this,r)}var Xs=r=>{r.type==fo.CHILD&&(r._$AP??=Qs,r._$AQ??=Zs)},At=class extends Ae{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),go(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Gt(this,t),_e(this))}setValue(t){if(mo(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};function A(r){return Ft(class extends At{#t;#e=new Wt(gt(()=>{if(!this.#t)throw new Error("cannot render before props");if(this.isConnected){let e=this.render(...this.#t);this.setValue(e),this.#e.doneRender()}}));#o=new G(this.#e);#r=new F;update(e,o){let s=super.update(e,o);return this.isConnected&&this.#e.doneRender(),s}render(...e){return this.#t=e,this.#r.observe(()=>M.wrap(this.#o,()=>r(...this.#t)),this.#e.render)}disconnected(){this.#o.mounts.unmountAll(),this.#r.clear()}reconnected(){this.#o.mounts.remountAll(),this.#e.render()}})}function bo(r,t){for(let[e,o]of Object.entries(t))Ys(r,e,o)}function Ys(r,t,e){let o=r.getAttribute(t),s=tn(e);s!==o&&(s===null?r.removeAttribute(t):r.setAttribute(t,s))}function tn(r){return typeof r=="string"?r:typeof r=="number"?r.toString():r?"":null}function en(){ke.register();let r=document.createElement("sly-shadow"),t=r.attachShadow({mode:"open"});return{host:r,shadow:t}}function K(r){return yo(en,r)}K.setup=r=>(t=>yo(r,t));var xo=K;function yo(r,t){let e=Ft(class extends At{#t;#e;#o;#r=new F;constructor(s){super(s);let{host:n,shadow:i}=r(),a=gt(()=>{if(!this.#o)throw new Error("cannot render before props");if(!this.isConnected)return;let c=this.#s(this.#o);x(c,this.#t.shadow),this.#t.doneRender()});this.#t=new W(a,n,i),this.#e=new G(this.#t)}#s(s){return this.#o=s,this.#r.observe(()=>M.wrap(this.#e,()=>t(...this.#o)),this.#t.render)}render({props:s,children:n,attrs:i}){let{host:a}=this.#t;return this.isConnected&&(i&&bo(a,i),x(n,this.#t.host),x(this.#s(s),this.#t.shadow),this.#t.doneRender()),a}disconnected(){x(null,this.#t.shadow),x(null,this.#t.host),this.#e.mounts.unmountAll(),this.#r.clear()}reconnected(){this.#e.mounts.remountAll(),this.#t.render()}});function o(...s){return e({props:s})}return o.with=e,o}function wo(r){return class extends HTMLElement{#t;#e;#o=new F;#r=this.attachShadow({mode:"open"});constructor(){super();let t=gt(()=>{if(!this.isConnected)return;let e=this.#s();x(e,this.#t.shadow),this.#t.doneRender()});this.#t=new W(t,this,this.#r),this.#e=new G(this.#t)}#s(){return this.#o.observe(()=>M.wrap(this.#e,()=>r()),this.#t.render)}render(){x(this.#s(),this.#t.shadow),this.#t.doneRender()}connectedCallback(){this.#e.mounts.remountAll(),this.#t.render()}disconnectedCallback(){this.#e.mounts.unmountAll(),this.#o.clear()}}}function J(r){return[K(r),(...o)=>wo(()=>r(...o))]}function y(r){let{scope:t,position:e}=M.increment();return yt(t.values,e,r)}function Kt(){return M.increment().scope.cx}function Ce(){let r=Kt();if(!(r instanceof W))throw new Error("this hook only works on shadow views (but was called in a light view)");return r}function Jt(){return Ce().host}function it(r){let{scope:t}=M.increment();return y(()=>t.mounts.mount(r))}function $o(){return Ce().shadow}function ko(r,t){oe(r,on(t))}function on(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let o of e)t.unshift(pt(o))}else r!==void 0&&t.push(pt(r));return t}function B(...r){let t=$o();y(()=>ko(t,r))}function _t(r=""){let t=Jt();y(()=>t.setAttribute("view",r))}function H(r){return y(()=>S(r))}var Ct=B;function So(r){return it(()=>r)}function j(r,t){return()=>nn({hz:r,frames:t})}var nn=K(({hz:r,frames:t})=>{_t("loading"),Ct(St,an);let e=H(0);return it(()=>wt(async()=>{await $t(1e3/r);let o=e()+1;e(o>=t.length?0:o)})),t.at(e())}),an=b`
|
|
18
18
|
:host {
|
|
19
19
|
font-family: monospace;
|
|
20
20
|
white-space: pre;
|
|
21
21
|
user-select: none;
|
|
22
22
|
}
|
|
23
|
-
`;var
|
|
23
|
+
`;var D=K(r=>(_t("error"),Ct(St,cn),typeof r=="string"?r:r instanceof Error?h`<strong>${r.name}:</strong> <span>${r.message}</span>`:"error")),cn=b`
|
|
24
24
|
:host {
|
|
25
25
|
font-family: monospace;
|
|
26
26
|
color: red;
|
|
27
27
|
}
|
|
28
|
-
`;function v(e,t){return(r,o)=>Ne(r,{pending:e,err:t,ok:o})}var Du=v(w(10,[" "," ",". ",".. ","..."," .."," ."]),_);var zu=v(w(3,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),_);var Vu=v(w(10,["\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F311}","\u{1F311}"]),_);var Zu=v(w(16,["|","/","-","\\"]),_);var ep=v(w(20,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),_);var Ve=E`
|
|
28
|
+
`;function R(r,t){return(e,o)=>ho(e,{pending:r,err:t,ok:o})}var sd=R(j(10,[" "," ",". ",".. ","..."," .."," ."]),D);var ld=R(j(3,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),D);var md=R(j(10,["\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F311}","\u{1F311}"]),D);var yd=R(j(16,["|","/","-","\\"]),D);var Sd=R(j(20,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),D);var _o=r=>r;var Co=r=>r,Eo=r=>r;var ln=_o({looking:{horizontal:["accumulate","pointer.x"],vertical:["accumulate","pointer.y"]},moving:{forward:"KeyW",backward:"KeyS",leftward:"KeyA",rightward:"KeyD"},interactions:{use:"KeyE"}}),Mo=Eo({standard:{label:"\u2328\uFE0Fstandard",bindings:ln},gamer:{label:"\u{1F3AE}gamer",bindings:{looking:{horizontal:["*",["dt"],"gamepad.axis.3",100],vertical:["*",["dt"],"gamepad.axis.4",100]},moving:{forward:["remap",0,-1,0,1,"gamepad.axis.2"],backward:["remap",0,1,0,1,"gamepad.axis.2"],leftward:["remap",0,-1,0,1,"gamepad.axis.1"],rightward:["remap",0,1,0,1,"gamepad.axis.1"]},interactions:{use:"gamepad.1"}}},micro:{label:"\u{1F9A0}micro",bindings:{looking:{horizontal:["*",["dt"],["+","gamepad.1",["-","gamepad.4"]],100],vertical:["*",["dt"],["+","gamepad.2",["-","gamepad.3"]],100]},moving:{forward:["remap",0,-1,0,1,"gamepad.axis.2"],backward:["remap",0,1,0,1,"gamepad.axis.2"],leftward:["remap",0,-1,0,1,"gamepad.axis.1"],rightward:["remap",0,1,0,1,"gamepad.axis.1"]},interactions:{use:["*","gamepad.5","gamepad.6"]}}}});function Po({start:r,end:t}){if(C(r)&&C(t))return IDBKeyRange.bound(r,t,!1,!0);if(C(r))return IDBKeyRange.lowerBound(r,!1);if(C(t))return IDBKeyRange.upperBound(t,!0)}async function zo(r){return new Promise((t,e)=>{r.onsuccess=()=>t(r.result),r.onerror=()=>e(r.error)})}function Oo({db:r,storeName:t}){let e=o=>(async s=>{let n=r.transaction(t,o),i=n.objectStore(t),a=new Promise((c,l)=>{n.onabort=()=>l(n.error??new Error("transaction aborted")),n.oncomplete=()=>c(void 0)});try{let c=await s(i,zo);return n.commit(),await a,c}catch(c){try{n.abort()}catch{}throw c}});return{readonly:e("readonly"),readwrite:e("readwrite")}}var Ee=class{#t;constructor(t){this.#t=Oo(t)}async commit(t){return this.#t.readwrite(async e=>{for(let[o,s]of t)s===void 0?e.delete(o):e.put(s,o)})}async getMany(t){return this.#t.readonly((e,o)=>Promise.all(t.map(s=>o(e.get(s)))))}async*entries(t={}){t.limit!==0&&(yield*await this.#t.readonly(async(e,o)=>{let s=[],n=t.reverse?"prev":"next",i=e.openCursor(Po(t),n),a=await o(i);for(;a&&(s.push([a.key,a.value]),!(t.limit!==void 0&&s.length>=t.limit));)a.continue(),a=await o(i);return s}))}};var To=(r,t)=>r<t?-1:r>t?1:0;function Bo(r,{start:t,end:e}){return!(t!==void 0&&r<t||e!==void 0&&r>=e)}function*vr(r,t){if(r.limit===0)return;let e=t.filter(([o,s])=>s!==void 0&&Bo(o,r)).sort(([o],[s])=>To(o,s));r.reverse&&e.reverse(),yield*e.slice(0,r.limit??1/0)}var Me=class{#t=new Map;async commit(t){for(let[e,o]of t)o===void 0?this.#t.delete(e):this.#t.set(e,structuredClone(o))}async getMany(t){return t.map(e=>structuredClone(this.#t.get(e)))}async*entries(t={}){yield*vr(t,[...this.#t.entries()].map(([e,o])=>[e,structuredClone(o)]))}};async function jo(r,t=r){return{db:await new Promise((o,s)=>{let n=indexedDB.open(r,1);n.onblocked=()=>s(new Error("idb blocked")),n.onerror=()=>s(n.error),n.onupgradeneeded=()=>n.result.createObjectStore(t),n.onsuccess=()=>o(n.result)}),storeName:t}}var Pe=class{#t;#e;constructor(t,e){this.#t=t,this.#e=e}set(t){return this.#e.set(this.#t,t)}delete(){return this.#e.delete(this.#t)}};var ze=class{kv;key;op;constructor(t,e){this.kv=t,this.key=e,this.op=new Pe(e,t.op)}async set(t){return this.kv.set(this.key,t)}async get(){return this.kv.get(this.key)}async has(){return await this.get()!==void 0}async need(){return k(await this.get(),`key not found "${this.key}"`)}async delete(){return this.kv.set(this.key,void 0)}};var Et=nt({divisor:".",delimiter:":",chunkSize:1024});function Zt(r){for(let t=r.length-1;t>=0;t--){let e=r.charCodeAt(t);if(e<65535)return r.slice(0,t)+String.fromCharCode(e+1)}}var Oe=class{#t;#e=[{}];constructor(t,e){if(this.#t=t,e.length){let o=e.join(Et.divisor),s=o+".",n=o+":";this.#e=[{start:n,end:Zt(n)},{start:s,end:Zt(s)}]}}async count(){let t=0;for(let e of this.#e)for await(let o of this.#t.entries(e))t++;return t}async clear(){let t=[];for(let e of this.#e)for await(let[o]of this.#t.entries(e))t.push([o,void 0]),t.length>=1024&&(await this.#t.commit(t),t=[]);t.length&&await this.#t.commit(t)}};var Te=class{#t;constructor(t){this.#t=t}set(t,e){return[this.#t.prefix(t),e]}delete(t){return[this.#t.prefix(t),void 0]}};var{divisor:pn,delimiter:hn}=Et,Be=class{#t;#e;constructor(t){let{scopes:e}=t;this.#t=e.join(pn)+hn,this.#e=Zt(this.#t)}prefix=t=>this.#t+t;unprefix=t=>t.slice(this.#t.length);scan=t=>{let{start:e,end:o,limit:s,reverse:n}=t;return{start:this.#t+(e??""),end:o===void 0?this.#e:this.#t+o,limit:s,reverse:n}}};function Do(r){let t=r.limit;if(t!==void 0){if(!Number.isInteger(t))throw new Error("scan limit must be integer");if(t<0)throw new Error("scan limit must be positive")}return r}function Lo(r){for(let t of r){if(t==="")throw new Error("invalid scope empty string");Ro(t,"."),Ro(t,":")}return r}function Ro(r,t){if(r.includes(t))throw new Error(`invalid scope "${r}" contains illegal "${t}"`)}var je=class r{op;subtree;#t;#e;#o;#r;constructor(t=new Me,e={}){this.#t=t,this.#r={strict:!1,scopes:[],...e},Lo(this.#r.scopes),this.#e=new Be(this.#r),this.op=new Te(this.#e),this.subtree=new Oe(this.#t,this.#r.scopes),this.#o=this.#r.strict?o=>JSON.parse(JSON.stringify(o)):o=>o}cell(t){return new ze(this,t)}scope(...t){return new r(this.#t,{...this.#r,scopes:[...this.#r.scopes,...t]})}async commit(t){await this.#t.commit(t.map(([e,o])=>[e,o===void 0?void 0:this.#o(o)]))}async set(t,e){return this.commit([this.op.set(t,e)])}async setMany(t){return this.commit(t.map(([e,o])=>this.op.set(e,o)))}async delete(...t){return this.commit(t.map(e=>this.op.delete(e)))}async getMany(t){return t=t.map(e=>this.#e.prefix(e)),(await this.#t.getMany(t)).map(e=>e===void 0?void 0:e)}async get(t){let[e]=await this.getMany([t]);return e}async has(t){return await this.get(t)!==void 0}async need(t){return k(await this.get(t),`key not found "${t}"`)}async needMany(t){let e=await this.getMany(t);for(let[o,s]of t.entries())k(e[o],`key not found "${s}"`);return e}async*entries(t={}){t=Do(this.#e.scan(t));for await(let[e,o]of this.#t.entries(t)){let s=this.#e.unprefix(e);o!==void 0&&(yield[s,o])}}[Symbol.asyncIterator](){return this.entries()}async*keys(t={}){for await(let[e]of this.entries(t))yield e}async*values(t={}){for await(let[,e]of this.entries(t))yield e}async count(t={}){let e=0;for await(let o of this.keys(t))e++;return e}async clear(t={}){let e=[];for await(let[o]of this.entries(t))e.push(this.op.delete(o)),e.length>=Et.chunkSize&&(await this.commit(e),e=[]);e.length&&await this.commit(e)}};function No(r){let e=r.reduce((a,{intents:c})=>a+8+c.byteLength,0),o=new ArrayBuffer(e),s=new DataView(o),n=new Uint8Array(o),i=0;for(let{playerId:a,intents:c}of r)s.setUint32(i,a,!1),i+=4,s.setUint32(i,c.byteLength,!1),i+=4,n.set(new Uint8Array(c),i),i+=c.byteLength;return o}function Re(r,t){let e=4+t.length*6,o=new ArrayBuffer(e),s=new DataView(o),n=0;s.setUint32(n,r,!1),n+=4;for(let i of t)s.setUint16(n,i.id,!1),n+=2,s.setFloat32(n,i.value,!1),n+=4;return o}function at(r){return!!(r===null||xt(r)||bt(r)||be(r))}function ct(r){let t=[];function e(o,s){if(at(o))t.push(s.join("."));else for(let[n,i]of Object.entries(o))e(i,[...s,n])}return e(r,["b"]),so(...t)}var Le=class{bindings;#t;#e=new vt;#o=new Vt;#r=new O;constructor(t){this.bindings=t,this.#t=ct(t)}get playerIds(){return[...this.#r.keys()]}get controllers(){return{unassigned:[...this.#o],assigned:new Map([...this.#r].map(([t,e])=>[t,[...e.controllers]]))}}createPlayer(){let t=this.#e.next();return this.#r.set(t,{controllers:new Vt}),t}deletePlayer(t){return this.#r.get(t)?.controllers.forEach(e=>this.#o.add(e)),this.#r.delete(t),this}add(t){return this.unplug(t),this}remove(t){return this.unplug(t),this.#o.delete(t),this}unplug(t){this.#o.add(t);for(let e of this.#r.values())e.controllers.delete(t);return this}plug(t,e){return e??=this.playerIds.at(-1)??this.createPlayer(),this.unplug(t),k(this.#r.get(e)).controllers.add(t),this.#o.delete(t),this}encode(t,e=performance.now()){let o=new Map,{controllers:s}=k(this.#r.get(t));for(let i of s)for(let a of i.evaluate(e)){let c=o.get(a.id)??0;o.set(a.id,c+a.value)}let n=[...o].filter(([,i])=>i!==0).map(([i,a])=>({id:i,value:a}));return Re(this.#t,n)}encodeAll(t=performance.now()){for(let o of this.#o)o.clear();let e=Array.from(this.#r.keys()).map(o=>({playerId:o,intents:this.encode(o,t)}));return No(e)}};function $r(r,t){let{presets:e,customs:o,fallback:s}=r.profiles;return t===void 0?s.profile:o.get(t)??e.get(t)??k(e.get(s.key))}async function Ne(r,t,e){let{kvs:o,controllers:s,assignments:n}=r;t.bindings=$r(r,e).bindings,n.set(t,e),await ye(s.get(t)?.handle,async i=>{r.preferences.set(i,e),await o.preferences.set(i,e)})}function Io(r,t){return ct(r)===ct(t)}var Ie=class{#t;constructor(t){this.#t=t}#e(t){if(!Io(t,this.#t.bindings))throw new Error("incompatible bindings")}get presets(){return[...this.#t.profiles.presets]}get customs(){return[...this.#t.profiles.customs]}isPreset(t){return this.#t.profiles.presets.has(t)}get(t){return $r(this.#t,t)}async create(t,e){let{kvs:o,profiles:s}=this.#t;this.#e(e.bindings),s.customs.set(t,e),await o.profiles.set(t,e),this.#t.subby.publish()}async clone(t,e){let{label:o,bindings:s}=this.get(e);await this.create(t,{basedOn:e,bindings:s,label:`${o} copy`})}async delete(t){let{kvs:e,assignments:o,profiles:{customs:s,fallback:n}}=this.#t;s.delete(t),await e.profiles.delete(t);for(let[i,a]of o)a===t&&await Ne(this.#t,i,n.key);this.#t.subby.publish()}async update(t,e){let{kvs:o,assignments:s,profiles:{customs:n}}=this.#t;e.bindings&&this.#e(e.bindings);let i=this.get(t),a={...structuredClone(i),...e};n.set(t,a);for(let[c,l]of s)l===t&&(c.bindings=a.bindings);await o.profiles.set(t,a),this.#t.subby.publish()}};function Ho({kv:r,presets:t}){let e=k(Object.keys(t)[0],"missing presets"),o=k(t[e]),s=o.bindings,n={presets:new O,customs:new O,fallback:{key:e,profile:o}};return Ht(n.presets,Object.entries(t)),{subby:U(),kv:r,presets:t,bindings:s,idCounter:new vt,profiles:n,controllers:new O,assignments:new O,preferences:new O,kvs:{profiles:r.scope("profiles"),preferences:r.scope("preferences")}}}var He=class{#t;constructor(t){this.#t=t}async assign(t,e){await Ne(this.#t,t,e),this.#t.subby.publish()}assignedProfileKeyOf(t){let{assignments:e}=this.#t;return e.get(t)??this.#t.profiles.fallback.key}};var Ve=class{#t;profiles;assignments;presets;constructor(t){this.#t=Ho(t),this.profiles=new Ie(this.#t),this.assignments=new He(this.#t),this.presets=t.presets}get on(){return this.#t.subby.on}#e(t){let{preferences:e,assignments:o,controllers:s}=this.#t,n=k(s.get(t)),i=o.get(t)??e.get(n.handle)??n.defaultProfileKey;t.bindings=this.profiles.get(i).bindings,o.set(t,i)}async load(){let{kvs:t,controllers:e,preferences:o,profiles:{customs:s}}=this.#t;s.clear(),Ht(s,await mr(t.profiles)),o.clear(),Ht(o,await mr(t.preferences));for(let n of e.keys())this.#e(n)}get controllers(){return[...this.#t.controllers.keys()]}get fallbackProfileKey(){return this.#t.profiles.fallback.key}meta(t){return this.#t.controllers.get(t)}attach(t,e){let o=this.#t.idCounter.next();this.#t.controllers.set(t,{...e,id:o}),this.#e(t)}detach(t){this.#t.controllers.delete(t),this.#t.assignments.delete(t)}};function Qt(r){let[t,e]=Object.entries(r)[0];return{key:t,profile:e}}async function Vo(r){let t=r.kv??new je(new Ee(await jo("tact","kv"))),e=r.broadcastChannel??new BroadcastChannel("tact"),{maxPlayers:o}=r,{bindings:s}=Qt(r.presets).profile,n=new Le(s),i=new Ve({...r,kv:t});return await i.load(),e.onmessage=()=>i.load(),i.on(()=>e.postMessage({})),Co({hub:n,controls:i,maxPlayers:o})}var kr=1024,Ue=class{dispose;#t;#e=[];constructor(t){this.#t=t,this.dispose=t.onSample(e=>{this.#e.push(e),this.#e.length>kr&&console.warn(`tact sampler exceeded limit ${kr}`),this.#e=xe(this.#e,kr)})}take(){this.#t.poll?.();let t=this.#e;return this.#e=[],t}};var{min:mn,max:fn,abs:gn,sign:bn,floor:Vf,ceil:Uf,pow:qf}=Math;function lt(r,t=0,e=1){return r=mn(r,e),r=fn(r,t),r}function xn(r,t,e,o){let n=(e-t)*r;return o!==void 0&&gn(n)>o&&(n=bn(n)*o),t+n}function yn(r,t,e){return(r-t)/(e-t)}function Uo(r,t,e,o=0,s=1,n=!1){let i=yn(r,t,e);return n&&(i=lt(i)),xn(i,o,s)}var qe=class r{x;y;constructor(t=0,e=0){this.x=t,this.y=e}static new(t=0,e=0){return new this(t,e)}static zero(){return new this}static fill(t){return new this(t,t)}static from(t){return Array.isArray(t)?new this(...t):new this(t.x,t.y)}static magnitudeSquared(t,e){return t*t+e*e}static magnitude(t,e){return Math.sqrt(this.magnitudeSquared(t,e))}static average(...t){return new this().add(...t).divBy(t.length)}static min(...t){return new this(Math.min(...t.map(e=>e.x)),Math.min(...t.map(e=>e.y)))}static max(...t){return new this(Math.max(...t.map(e=>e.x)),Math.max(...t.map(e=>e.y)))}static rotation(t){return new this(Math.cos(t),Math.sin(t))}dup(){return new this.constructor(this.x,this.y)}*[Symbol.iterator](){yield this.x,yield this.y}array(){return[this.x,this.y]}toJSON(){return this.array()}toString(){return`(${this.constructor.name} x${this.x.toFixed(2)}, y${this.y.toFixed(2)})`}fill(t){return this.x=t,this.y=t,this}zero(){return this.fill(0)}set_(t,e){return this.x=t,this.y=e,this}set({x:t,y:e}){return this.x=t,this.y=e,this}from(t){if(Array.isArray(t)){let[e,o]=t;this.x=e,this.y=o}else{let{x:e,y:o}=t;this.x=e,this.y=o}return this}magnitudeSquared(){return r.magnitudeSquared(this.x,this.y)}magnitude(){return r.magnitude(this.x,this.y)}rotation(){return Math.atan2(this.y,this.x)}equals_(t,e){return this.x===t&&this.y===e}equals(...t){return t.every(({x:e,y:o})=>this.equals_(e,o))}near_(t,e,o=1e-6){return Math.abs(this.x-t)<=o&&Math.abs(this.y-e)<=o}near({x:t,y:e},o=1e-6){return this.near_(t,e,o)}dot_(t,e){return this.x*t+this.y*e}dot({x:t,y:e}){return this.dot_(t,e)}distanceSquared_(t,e){return t=this.x-t,e=this.y-e,t*t+e*e}distanceSquared({x:t,y:e}){return this.distanceSquared_(t,e)}distance_(t,e){return Math.sqrt(this.distanceSquared_(t,e))}distance({x:t,y:e}){return this.distance_(t,e)}angleBetween_(t,e){let o=this.dot_(t,e),s=this.magnitude()*r.magnitude(t,e);if(s===0)return 0;let n=lt(o/s,-1,1);return Math.acos(n)}angleBetween({x:t,y:e}){return this.angleBetween_(t,e)}normalize(){return this.divBy(this.magnitude())}half(){return this.divBy(2)}double(){return this.mulBy(2)}abs(){return this.map(t=>Math.abs(t))}rotate(t){let{x:e,y:o}=this;return this.x=e*Math.cos(t)-o*Math.sin(t),this.y=e*Math.sin(t)+o*Math.cos(t),this}perpendicular(){let{x:t,y:e}=this;return this.x=-e,this.y=t,this}clampMagnitude(t){return this.magnitude()>t&&this.normalize().mulBy(t),this}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}map(t){return this.x=t(this.x,0),this.y=t(this.y,1),this}morph(t){let e=t(this);return e&&e!==this&&this.set(e),this}clamp(t={x:0,y:0},e={x:1,y:1}){return this.x=lt(this.x,t.x,e.x),this.y=lt(this.y,t.y,e.y),this}clampBy(t=0,e=1){return this.x=lt(this.x,t,e),this.y=lt(this.y,t,e),this}negate(){return this.map(t=>t*-1)}addBy(t){return this.x+=t,this.y+=t,this}subBy(t){return this.x-=t,this.y-=t,this}mulBy(t){return this.x*=t,this.y*=t,this}scale(t){return this.x*=t,this.y*=t,this}divBy(t){return t===0?this:(this.x/=t,this.y/=t,this)}add_(t,e){return this.x+=t,this.y+=e,this}add(...t){for(let{x:e,y:o}of t)this.add_(e,o);return this}sub_(t,e){return this.x-=t,this.y-=e,this}sub(...t){for(let{x:e,y:o}of t)this.sub_(e,o);return this}mul_(t,e){return this.x*=t,this.y*=e,this}mul(...t){for(let{x:e,y:o}of t)this.mul_(e,o);return this}div_(t,e){return t!==0&&(this.x/=t),e!==0&&(this.y/=e),this}div(...t){for(let{x:e,y:o}of t)this.div_(e,o);return this}lerp_(t,e,o){return this.x+=(t-this.x)*o,this.y+=(e-this.y)*o,this}lerp(t,{x:e,y:o}){return this.lerp_(t,e,o)}reflect_(t,e){let o=2*this.dot_(t,e);return this.x-=o*t,this.y-=o*e,this}reflect({x:t,y:e}){return this.reflect_(t,e)}rotateAroundPoint_(t,e,o){let s=this.x-e,n=this.y-o,i=Math.cos(t),a=Math.sin(t);return this.x=i*s-a*n+e,this.y=a*s+i*n+o,this}rotateAroundPoint(t,{x:e,y:o}){return this.rotateAroundPoint_(t,e,o)}};function ut(r){return r!==0}function Sr(r,t){let e=o=>Sr(r,o);if(t===null)return 0;if(bt(t))return t;if(xt(t)){let o=r.latestValues.get(t)??0;return r.recentSamples.filter(s=>s.code===t).reduce((s,n)=>Math.abs(n.value)>Math.abs(s)?n.value:s,o)}else switch(t[0]){case"accumulate":{let o=t[1],s=0;for(let n of r.recentSamples)n.code===o&&(s+=n.value);return s}case"up":{let o=t[1],s=0,n=r.previousValues.get(o)??0;for(let i of r.recentSamples)i.code===o&&(ut(n)&&!ut(i.value)&&s++,n=i.value);return s}case"down":{let o=t[1],s=0,n=r.previousValues.get(o)??0;for(let i of r.recentSamples)i.code===o&&(!ut(n)&&ut(i.value)&&s++,n=i.value);return s}case"was":{let o=t[1];return r.previousValues.get(o)??0}case"since":{let o=t[1],s=r.previousValues.get(o)??0;return(r.latestValues.get(o)??0)-s}case"if":{let[,o,s,n]=t;return e(o)?e(s):C(n)?e(n):0}case"min":return Math.min(...t.slice(1).map(e));case"max":return Math.max(...t.slice(1).map(e));case"+":return t.slice(1).map(e).reduce((o,s)=>o+s,0);case"*":return t.slice(1).map(e).reduce((o,s)=>o*s,1);case"==":return+(e(t[1])===e(t[2]));case"!=":return+(e(t[1])!==e(t[2]));case">":return+(e(t[1])>e(t[2]));case"<":return+(e(t[1])<e(t[2]));case">=":return+(e(t[1])>=e(t[2]));case"<=":return+(e(t[1])<=e(t[2]));case"!":return+(e(t[1])===0);case"!!":return+(e(t[1])!==0);case"-":{let[,o,...s]=t;if(s.length===0)return-e(o);let n=e(o);for(let i of s)n-=e(i);return n}case"clamp":{let[,o,s,n]=t,i=e(n);return Math.min(s===null?1/0:e(s),Math.max(o===null?-1/0:e(o),i))}case"remap":{let[o,s,n,i,a]=t.slice(1).map(e);return Uo(a,o,s,n,i)}case"dt":return r.dt;case"held":{let[,o,s]=t,n=ut(e(s)),i=r.holding.get(t);return n&&!i&&(i={start:r.clock.time},r.holding.set(t,i)),!n&&i&&(i=void 0,r.holding.delete(t)),i&&r.clock.time-i.start>=o?1:0}case"taps":{let[,o,s,n]=t,i=e(n),a=r.clock.time,c=yt(r.tapping,t,()=>({events:[]}));for(let l=0;l<i;l++)c.events.push(a);return c.events=xe(c.events.filter(l=>l>=a-s),128),c.events.length>=o?(c.events=[],1):0}case"mod":{let[,...o]=t,s=l=>ut(r.latestValues.get(l)??0),n=s("ShiftLeft")||s("ShiftRight"),i=s("ControlLeft")||s("ControlRight"),a=s("AltLeft")||s("AltRight"),c=s("MetaLeft")||s("MetaRight");return o.includes("shift")!==n||o.includes("ctrl")!==i||o.includes("alt")!==a||o.includes("meta")!==c?0:1}default:throw new Error("unknown expression")}}var We=class{time;since=0;last;constructor(t=performance.now()){this.time=t}update(t=performance.now()){this.since=t-(this.time??t),this.last=this.time,this.time=t}};var Fe=class{dt=0;clock=new We;recentSamples=[];latestValues=new Map;previousValues=new Map;holding=new Map;tapping=new Map};function qo(){return{value:0,was:0,sum:0}}function Ar(r){let t=ct(r),e=[],o=[];function s(i){if(at(i)){let a=qo();return e.push(a),o.push(i),a}else return fr(i,s)}let n=s(r);return{hash:t,inputs:n,inputList:e,rootList:o}}var Mt=class{#t;#e;#o;#r;constructor(t){this.#e=nt(structuredClone(t.bindings)),this.#o=Ar(this.#e),this.#t=new Ue(t.source),this.#r=new Fe}get bindings(){return this.#e}set bindings(t){let e=nt(structuredClone(t)),o=Ar(e),s=this.#o.hash;if(o.hash!==s)throw new Error("incompatible bindings");this.#e=e,this.#o.rootList=o.rootList}*evaluate(t=performance.now()){let e=this.#t.take();this.#r.clock.update(t),this.#r.recentSamples=e,this.#r.dt=this.#r.clock.since/1e3;for(let{code:o,value:s}of e)this.#r.latestValues.set(o,s);for(let[o,s]of this.#o.rootList.entries()){let n=Sr(this.#r,s);n!==0&&(yield{id:o,value:n})}for(let{code:o,value:s}of e)this.#r.previousValues.set(o,s)}encode(t=performance.now()){return Re(this.#o.hash,[...this.evaluate(t)])}clear(){this.#t.take()}dispose(){return this.#t.dispose()}};var Ge=class{get;constructor(t){this.get=t}get gamepad(){return this.get()}};function Wo(r,t){let e=r;return()=>{let o=t();return o!=null&&(e=o),e}}function Ke(r){let t=new Map;function e(){o(),s()}function o(){for(let i of navigator.getGamepads())if(i?.connected&&!t.has(i.index)){let a=()=>navigator.getGamepads()[i.index],c=new Ge(Wo(i,a)),l=r(c);t.set(i.index,{pad:c,dispose:l})}}function s(){for(let[i,{pad:a,dispose:c}]of t)navigator.getGamepads()[a.gamepad.index]?.connected||(c(),t.delete(i))}e();let n=E(window,{gamepadconnected:e,gamepaddisconnected:e});return()=>{n();for(let{dispose:i}of t.values())i();t.clear()}}var L=class{onSample=U();dispose=V()};var Pt=class extends L{pad;#t=new Map;constructor(t){super(),this.pad=t}get gamepad(){return this.pad.gamepad}poll(){let t=this.gamepad;this.#o(t),this.#r(t)}#e(t,e){let o=this.#t.get(t)??0;e!==o&&(this.#t.set(t,e),this.onSample.publish({code:t,value:e}))}#o(t){let e=0;for(let[o,s]of t.buttons.entries()){let n=s.value;this.#e(`gamepad.${o+1}`,n),e=Math.max(e,n)}this.#e("gamepad.any",e>=.9?1:0)}#r(t){for(let[e,o]of t.axes.entries())this.#e(`gamepad.axis.${e+1}`,o)}};function Fo(r,t){return Ke(e=>{let o=new Pt(e),s=new Mt({source:o,bindings:r.bindings});r.plug(s);let n=t?.(s,o);return()=>{r.remove(s),n?.()}})}var Je=class extends L{#t;constructor(...t){super(),this.#t=t;for(let e of t)this.dispose.schedule(e.onSample(o=>this.onSample.publish(o)))}poll(){for(let t of this.#t)t.poll?.()}};var Ze=class{$hex=S("");clear=to(250,()=>{this.$hex.set("")});update(t){this.$hex(ge(new Uint8Array(t))),this.clear()}};function zt(r){return`pointer.${r+1}`}var Qe=class extends L{client=new qe;constructor(t=window){super(),this.dispose.schedule(E(t,this.#t))}#t={pointerdown:t=>{this.onSample.publish({code:zt(t.button),value:1})},pointerup:t=>{this.onSample.publish({code:zt(t.button),value:0})},pointermove:({clientX:t,clientY:e,movementX:o,movementY:s})=>{this.client.set_(t,e),o&&this.onSample.publish({code:"pointer.x",value:o}),s&&this.onSample.publish({code:"pointer.y",value:s})},wheel:({deltaX:t,deltaY:e})=>{t&&this.onSample.publish({code:"pointer.wheel.x",value:t}),e&&this.onSample.publish({code:"pointer.wheel.y",value:e})}}};var Xe=class extends L{#t=new Set;constructor(t=window){super(),this.dispose.schedule(E(t,this.#e)),this.dispose.schedule(E(window,this.#o))}#e={keydown:t=>{t.repeat||(this.#t.size===0&&this.onSample.publish({code:"keyboard.any",value:1}),this.onSample.publish({code:t.code,value:1}),this.#t.add(t.code))},keyup:t=>{this.onSample.publish({code:t.code,value:0}),this.#t.delete(t.code),this.#t.size===0&&this.onSample.publish({code:"keyboard.any",value:0})}};#o={blur:()=>{for(let t of this.#t)this.onSample.publish({code:t,value:0});this.#t.size&&this.onSample.publish({code:"keyboard.any",value:0}),this.#t.clear()}}};var Go=q`@layer core {
|
|
29
|
+
|
|
30
|
+
::selection {
|
|
31
|
+
color: var(--selection);
|
|
32
|
+
background-color: var(--selection-bg);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::-webkit-scrollbar { width: 8px; }
|
|
36
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
37
|
+
::-webkit-scrollbar-thumb { background: #444; border-radius: 1em; }
|
|
38
|
+
::-webkit-scrollbar-thumb:hover { background: #666; }
|
|
39
|
+
|
|
40
|
+
a {
|
|
41
|
+
color: var(--link);
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
|
|
44
|
+
&:visited {
|
|
45
|
+
color: color-mix(in srgb, purple, var(--link) 70%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
color: color-mix(in srgb, white, var(--link) 90%);
|
|
50
|
+
text-decoration: underline;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:active {
|
|
54
|
+
color: color-mix(in srgb, white, var(--link) 50%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}`;var Ko=q`@layer vars {
|
|
59
|
+
|
|
60
|
+
:is(:root, :host) {
|
|
61
|
+
${vn({bg:"#111",alpha:"#def",rounded:"0.5em",padding:"0.5em",prime:"#d068ff",code:"#3f1",link:"cyan",selection:"white","selection-bg":"#f70",lame:"#8888",angry:"#f50",zesty:"#cf0",happy:"#0fa",calm:"#0af",sad:"#74f",quirky:"#f49","inactive-opacity":"0.5","anim-duration":"150ms"})}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
}`;function wn([r,t]){return`--${r}: var(--shiny-${r}, ${t});`}function vn(r){return Object.entries(r).map(wn).join(`
|
|
65
|
+
`)}var Jo=q`@layer reset {
|
|
66
|
+
|
|
67
|
+
* {
|
|
68
|
+
margin: 0;
|
|
69
|
+
padding: 0;
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
|
|
72
|
+
scrollbar-width: thin;
|
|
73
|
+
scrollbar-color: #888 transparent;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
::-webkit-scrollbar { width: 8px; }
|
|
77
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
78
|
+
::-webkit-scrollbar-thumb { background: #888; border-radius: 1em; }
|
|
79
|
+
::-webkit-scrollbar-thumb:hover { background: #999; }
|
|
80
|
+
|
|
81
|
+
}`;var Zo=q`
|
|
82
|
+
|
|
83
|
+
@layer vars, reset, core, underlay, view, overlay;
|
|
84
|
+
|
|
85
|
+
${Ko}
|
|
86
|
+
${Jo}
|
|
87
|
+
${Go}
|
|
88
|
+
|
|
89
|
+
`;var _r=new CSSStyleSheet;_r.replaceSync(Zo);var Ot=class{length=1;$index=S(0);constructor(t=0){this.$index(t)}clamp(t){return t=Math.min(t,this.length-1),t=Math.max(t,0),t}get index(){return this.clamp(this.$index())}async setIndex(t){return this.$index(t)}async shimmy(t){let e=this.clamp(this.index+t);return this.setIndex(e)}};var Qo=b`@layer view {
|
|
90
|
+
|
|
91
|
+
:host {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
slot[part="tabs"] {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-wrap: wrap;
|
|
99
|
+
|
|
100
|
+
&::slotted([data-tabbed]) {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
color: currentColor;
|
|
103
|
+
text-decoration: underline;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
slot[part="tabs"][data-snug] {
|
|
108
|
+
&::slotted(*) {
|
|
109
|
+
border-radius: var(--rounded);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::slotted(:not([data-last], [data-next-is-tabbed])) {
|
|
113
|
+
border-right: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&::slotted([data-tabbed]:not([data-first])) {
|
|
117
|
+
border-left: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&::slotted(:not([data-last])) {
|
|
121
|
+
border-top-right-radius: 0;
|
|
122
|
+
border-bottom-right-radius: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&::slotted(:not([data-first])) {
|
|
126
|
+
border-top-left-radius: 0;
|
|
127
|
+
border-bottom-left-radius: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
} `;var Xo=xo((r={})=>{_t("shiny-tabs"),Ct(_r,Qo);let t=Jt(),e=y(()=>g.attrs(t).spec({index:Number})),o=y(()=>r.control??new Ot(e.index??0)),s=H([]),n=H([]);function i(l){let p=l.currentTarget;s(p.assignedElements())}function a(l){let p=l.currentTarget;n(p.assignedElements())}e.index=o.$index(),o.length=s().length;function c(l,p){let u=o.clamp(l+p);return u===l?!1:u===o.index}for(let[l,p]of s().entries()){let u=l===o.index,m=g.attrs(p);m.booleans.disabled=u,m.booleans["data-snug"]=r.snug,m.booleans["data-tabbed"]=u,m.booleans["data-first"]=l===0,m.booleans["data-last"]=l===o.length-1,m.booleans["data-next-is-tabbed"]=c(l,1),m.booleans["data-previous-is-tabbed"]=c(l,-1),p.onclick=()=>o.setIndex(l)}for(let[l,p]of n().entries()){let u=l===o.index;g.attrs(p).booleans["data-tabbed"]=u,g.attrs(p).booleans.hidden=!u}return h`
|
|
132
|
+
<slot part=tabs ?data-snug="${r.snug}" @slotchange="${i}"></slot>
|
|
133
|
+
<slot part=panels name=panel @slotchange="${a}"></slot>
|
|
134
|
+
`});var Yo=b`@layer view {
|
|
135
|
+
|
|
136
|
+
:host {
|
|
137
|
+
display: block;
|
|
138
|
+
width: min(50em, 100%);
|
|
139
|
+
|
|
140
|
+
color: var(--text);
|
|
141
|
+
text-shadow: var(--text-shadow);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.deck {
|
|
145
|
+
padding: var(--pad);
|
|
146
|
+
--tint: oklch(from var(--prime) l c h / 50%);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
[view="shiny-tabs"] {
|
|
150
|
+
--prime: inherit;
|
|
151
|
+
|
|
152
|
+
--tint: var(--prime);
|
|
153
|
+
--slate: color-mix(in oklch,
|
|
154
|
+
transparent,
|
|
155
|
+
color-mix(in oklch, var(--bg), var(--tint) 25%) 25%
|
|
156
|
+
);
|
|
157
|
+
--shimmer: color-mix(in oklch, transparent, var(--tint));
|
|
158
|
+
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
align-items: center;
|
|
162
|
+
|
|
163
|
+
&::part(tabs) {
|
|
164
|
+
display: flex;
|
|
165
|
+
width: max-content;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
padding: var(--nib);
|
|
168
|
+
|
|
169
|
+
background: var(--slate);
|
|
170
|
+
border: 1px solid var(--shimmer);
|
|
171
|
+
border-radius: var(--round);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&::part(panels) {
|
|
175
|
+
display: block;
|
|
176
|
+
width: 100%;
|
|
177
|
+
margin-top: var(--pad);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
button {
|
|
181
|
+
border: none;
|
|
182
|
+
background: transparent;
|
|
183
|
+
border-radius: var(--round);
|
|
184
|
+
border: 2px solid transparent;
|
|
185
|
+
text-shadow: var(--text-shadow);
|
|
186
|
+
|
|
187
|
+
&[data-tabbed] {
|
|
188
|
+
text-decoration: none;
|
|
189
|
+
color: var(--prime);
|
|
190
|
+
border-color: var(--prime);
|
|
191
|
+
background: color-mix(in oklch, var(--bg), var(--prime) 30%);
|
|
192
|
+
box-shadow:
|
|
193
|
+
inset 0 0 1.5em oklch(from var(--shimmer) l c h / 50%),
|
|
194
|
+
0 0 2em oklch(from var(--shimmer) l c h / 50%);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
}`;var Z=b`
|
|
200
|
+
@layer theme, view;
|
|
201
|
+
@layer theme {
|
|
202
|
+
|
|
203
|
+
${St}
|
|
204
|
+
|
|
205
|
+
:host {
|
|
206
|
+
--prime: var(--tact-prime, #fb0);
|
|
207
|
+
|
|
208
|
+
--text: var(--tact-text, #fffc);
|
|
209
|
+
--bg: var(--tact-bg, oklch(from var(--prime) calc(l * 0.3) calc(c * 0.1) h));
|
|
210
|
+
--droppy: var(--tact-droppy, oklch(from var(--prime) l c calc(h + 100)));
|
|
211
|
+
--recording: var(--tact-recording, oklch(from var(--prime) l c calc(h + 100)));
|
|
212
|
+
|
|
213
|
+
--round: var(--tact-round, 0.5em);
|
|
214
|
+
--pad: var(--tact-pad, 0.5em);
|
|
215
|
+
--nib: var(--tact-nib, 0.2em);
|
|
216
|
+
--space: var(--tact-space, 1em);
|
|
217
|
+
--box-shadow: var(--tact-box-shadow, 0.1em 0.2em 1em #0006);
|
|
218
|
+
--text-shadow: var(--tact-text-shadow, 0.02em 0.04em 0.1em #000a);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[theme-card] {
|
|
222
|
+
--tint: var(--prime);
|
|
223
|
+
--slate: color-mix(in oklch,
|
|
224
|
+
transparent,
|
|
225
|
+
color-mix(in oklch, var(--bg), var(--tint) 25%) 25%
|
|
226
|
+
);
|
|
227
|
+
--shimmer: color-mix(in oklch, transparent, var(--tint));
|
|
228
|
+
|
|
229
|
+
border-radius: var(--round);
|
|
230
|
+
background: var(--slate);
|
|
231
|
+
border: 1px solid var(--shimmer);
|
|
232
|
+
box-shadow:
|
|
233
|
+
inset 0 0 3em color-mix(in oklch, transparent, var(--shimmer) 30%),
|
|
234
|
+
var(--box-shadow);
|
|
235
|
+
|
|
236
|
+
&[theme-card="dull"] {
|
|
237
|
+
--tint: #8888;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[theme-button] {
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
font: inherit;
|
|
246
|
+
color: inherit;
|
|
247
|
+
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
user-select: none;
|
|
250
|
+
|
|
251
|
+
opacity: 0.8;
|
|
252
|
+
gap: 0.5em;
|
|
253
|
+
padding: 0.5em;
|
|
254
|
+
|
|
255
|
+
&:is(:hover, :focus-visible) { opacity: 1; }
|
|
256
|
+
&:active { opacity: 0.8; }
|
|
257
|
+
|
|
258
|
+
svg {
|
|
259
|
+
width: 1.2em;
|
|
260
|
+
height: 1.2em;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
&[theme-button~="naked"] {
|
|
264
|
+
padding: 0;
|
|
265
|
+
border: none;
|
|
266
|
+
background: transparent;
|
|
267
|
+
color: currentColor;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&[theme-button~="angry"] {
|
|
271
|
+
&:is(:hover, :focus-visible) { color: red; }
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[theme-select] {
|
|
276
|
+
--base: var(--tint, var(--prime));
|
|
277
|
+
font: inherit;
|
|
278
|
+
color: inherit;
|
|
279
|
+
background: transparent;
|
|
280
|
+
border: 1px solid var(--base);
|
|
281
|
+
border-radius: var(--round);
|
|
282
|
+
padding: var(--nib) var(--pad);
|
|
283
|
+
box-shadow: inset 0 0 1em oklch(from var(--base) l c h / 40%);
|
|
284
|
+
|
|
285
|
+
&:is(:hover, :focus-visible) {
|
|
286
|
+
filter: brightness(110%);
|
|
287
|
+
box-shadow: inset 0 0 1em oklch(from var(--base) l c h / 60%);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&:active {
|
|
291
|
+
filter: brightness(90%);
|
|
292
|
+
box-shadow: inset 0 0 1em oklch(from var(--base) l c h / 40%);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
[theme-input] {
|
|
297
|
+
--base: var(--tint, var(--prime));
|
|
298
|
+
--chill: oklch(from var(--base) l c h / 50%);
|
|
299
|
+
font: inherit;
|
|
300
|
+
color: inherit;
|
|
301
|
+
background: transparent;
|
|
302
|
+
border: 1px solid var(--chill);
|
|
303
|
+
border-radius: var(--round);
|
|
304
|
+
padding: 0 var(--nib);
|
|
305
|
+
box-shadow: inset 0 0 1em oklch(from var(--chill) l c h / 20%);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
}`;var Tt=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-GameController"><path d="M9 15l-2.968 2.968A2.362 2.362 0 0 1 2 16.298V15l1.357-6.784A4 4 0 0 1 7.279 5h9.442a4 4 0 0 1 3.922 3.216L22 15v1.297a2.362 2.362 0 0 1-4.032 1.67L15 15H9z"/><path d="M9 5l1 2h4l1-2"/></svg>`;var ts=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-SettingsHorizontal"><path d="M3 5h4m14 0H11m-8 7h12m6 0h-2M3 19h2m16 0H9"/><circle cx="9" cy="5" r="2"/><circle cx="17" cy="12" r="2"/><circle cx="7" cy="19" r="2"/></svg>`;var es=b`@layer view {
|
|
309
|
+
|
|
310
|
+
.plate {
|
|
311
|
+
user-select: none;
|
|
312
|
+
display: flex;
|
|
313
|
+
flex-direction: column;
|
|
314
|
+
align-items: center;
|
|
315
|
+
gap: var(--pad);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
[data-drag-and-drop] {
|
|
319
|
+
.player[data-drop-candidate] {
|
|
320
|
+
outline: 2px dashed color-mix(in oklch, transparent, var(--droppy) 80%);
|
|
321
|
+
background: color-mix(in oklch, var(--slate), var(--droppy) 20%);
|
|
322
|
+
|
|
323
|
+
&[data-dropping] {
|
|
324
|
+
outline: 2px solid var(--droppy);
|
|
325
|
+
background: color-mix(in oklch, var(--slate), var(--droppy) 50%);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.playerlist {
|
|
331
|
+
display: grid;
|
|
332
|
+
grid-template-columns: repeat(
|
|
333
|
+
auto-fit,
|
|
334
|
+
minmax(min(100%, 20em), 1fr)
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
width: min(100%, calc(48em + var(--pad)));
|
|
338
|
+
gap: var(--pad);
|
|
339
|
+
|
|
340
|
+
> * {
|
|
341
|
+
min-width: 0;
|
|
342
|
+
min-height: 7em;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.player {
|
|
347
|
+
display: flex;
|
|
348
|
+
flex-direction: column;
|
|
349
|
+
|
|
350
|
+
&.new {
|
|
351
|
+
justify-content: center;
|
|
352
|
+
align-items: center;
|
|
353
|
+
padding: var(--pad);
|
|
354
|
+
|
|
355
|
+
border-style: dashed;
|
|
356
|
+
border-width: 2px;
|
|
357
|
+
border-color: oklch(from var(--text) l c h / 30%);
|
|
358
|
+
background: transparent;
|
|
359
|
+
box-shadow: none;
|
|
360
|
+
|
|
361
|
+
button {
|
|
362
|
+
display: flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
svg {
|
|
365
|
+
width: 2.5em;
|
|
366
|
+
height: 2.5em;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
h3 {
|
|
372
|
+
display: flex;
|
|
373
|
+
flex-wrap: wrap;
|
|
374
|
+
justify-content: space-between;
|
|
375
|
+
padding: var(--nib) var(--pad);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.controllerlist {
|
|
379
|
+
display: flex;
|
|
380
|
+
flex: 1 1 auto;
|
|
381
|
+
flex-direction: column;
|
|
382
|
+
gap: var(--pad);
|
|
383
|
+
padding: var(--pad);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.controller {
|
|
387
|
+
--tint: oklch(0.7 0.3 var(--hue, 0));
|
|
388
|
+
background: color-mix(in oklch, transparent, var(--bg) 50%);
|
|
389
|
+
border: 2px solid var(--shimmer);
|
|
390
|
+
box-shadow:
|
|
391
|
+
inset 0 0 2em color-mix(in oklch, transparent, var(--shimmer)),
|
|
392
|
+
var(--box-shadow);
|
|
393
|
+
|
|
394
|
+
&:hover {
|
|
395
|
+
background: color-mix(in oklch, transparent, var(--bg) 70%);
|
|
396
|
+
filter: brightness(120%);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
[view="profile-select"]::part(select) {
|
|
400
|
+
--base: oklch(from var(--tint) l c h / 50%);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.controller {
|
|
405
|
+
cursor: grab;
|
|
406
|
+
display: flex;
|
|
407
|
+
align-items: center;
|
|
408
|
+
|
|
409
|
+
gap: var(--pad);
|
|
410
|
+
padding: var(--nib);
|
|
411
|
+
|
|
412
|
+
border-radius: 0.5em;
|
|
413
|
+
overflow: clip;
|
|
414
|
+
|
|
415
|
+
.griptape {
|
|
416
|
+
display: flex;
|
|
417
|
+
justify-content: center;
|
|
418
|
+
align-items: center;
|
|
419
|
+
|
|
420
|
+
width: 1.5em;
|
|
421
|
+
flex: 0 0 auto;
|
|
422
|
+
|
|
423
|
+
svg {
|
|
424
|
+
opacity: 0.5;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.label {
|
|
429
|
+
display: flex;
|
|
430
|
+
align-items: center;
|
|
431
|
+
gap: var(--pad);
|
|
432
|
+
min-width: 0;
|
|
433
|
+
|
|
434
|
+
flex: 1 1 auto;
|
|
435
|
+
font-size: 1em;
|
|
436
|
+
font-weight: normal;
|
|
437
|
+
|
|
438
|
+
.icon {
|
|
439
|
+
display: flex;
|
|
440
|
+
flex: 0 0 auto;
|
|
441
|
+
svg {
|
|
442
|
+
width: 2em;
|
|
443
|
+
height: 2em;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.name {
|
|
448
|
+
min-width: 0;
|
|
449
|
+
line-height: 1.1;
|
|
450
|
+
font-size: 0.7em;
|
|
451
|
+
overflow: hidden;
|
|
452
|
+
text-overflow: ellipsis;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
select {
|
|
457
|
+
padding: var(--nib) var(--pad);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
}`;var rs=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-PersonAdd"><circle cx="12" cy="7" r="5"/><path d="M17 22H5.266a2 2 0 0 1-1.985-2.248l.39-3.124A3 3 0 0 1 6.649 14H7"/><path d="M19 14v4"/><path d="M17 16h4"/></svg>`;var Ye=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-XSmall"><path d="M17 17L7 7m10 0L7 17"/></svg>`;var Xt=A(r=>{let{dnd:t}=r.context,e=t.dropzone(()=>({playerId:r.playerId}));return h`
|
|
463
|
+
<div class="${r.class}"
|
|
464
|
+
theme-card="${r.themeCard??""}"
|
|
465
|
+
data-drop-candidate
|
|
466
|
+
?data-dropping="${t.hovering?.playerId===r.playerId}"
|
|
467
|
+
@dragenter="${e.dragenter}"
|
|
468
|
+
@dragleave="${e.dragleave}"
|
|
469
|
+
@dragover="${e.dragover}"
|
|
470
|
+
@drop="${e.drop}">
|
|
471
|
+
|
|
472
|
+
${r.content}
|
|
473
|
+
</div>
|
|
474
|
+
`});var os=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="currentColor" stroke-width="2" class="ai ai-DragVerticalFill"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/></svg>`;function ss(r){return r*137.508}var tr=A((r,t,e)=>{let{profiles:o}=r.controls;function s(n){let i=n.currentTarget;e(i.value)}return h`
|
|
475
|
+
<select
|
|
476
|
+
part=select
|
|
477
|
+
theme-select
|
|
478
|
+
.value="${t}"
|
|
479
|
+
@change="${s}">
|
|
480
|
+
|
|
481
|
+
${o.presets.map(([n,i])=>h`
|
|
482
|
+
<option
|
|
483
|
+
value="${n}"
|
|
484
|
+
?selected="${n===t}">
|
|
485
|
+
${i.label}
|
|
486
|
+
</option>
|
|
487
|
+
`)}
|
|
488
|
+
|
|
489
|
+
${o.customs.map(([n,i])=>h`
|
|
490
|
+
<option
|
|
491
|
+
value="${n}"
|
|
492
|
+
?selected="${n===t}">
|
|
493
|
+
${i.label}
|
|
494
|
+
</option>
|
|
495
|
+
`)}
|
|
496
|
+
</select>
|
|
497
|
+
`});var er=A((r,t)=>{let{deck:e,dnd:o}=r,{controls:s}=e,n=o.dragzone(()=>({controller:t})),i=s.assignments.assignedProfileKeyOf(t),a=s.meta(t)??{id:0,icon:Tt,handle:"controller",name:"controller",tooltip:"",defaultProfileKey:s.fallbackProfileKey},c=`--hue: ${ss(a?.id??0)};`;return h`
|
|
498
|
+
<div class=controller
|
|
499
|
+
style="${c}"
|
|
500
|
+
theme-card
|
|
501
|
+
?data-dragging="${o.dragging?.controller===t}"
|
|
502
|
+
draggable="${n.draggable}"
|
|
503
|
+
@dragstart="${n.dragstart}"
|
|
504
|
+
@dragend="${n.dragend}">
|
|
505
|
+
|
|
506
|
+
<div class=griptape>
|
|
507
|
+
${os}
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
<h4 class=label title="${a.tooltip}">
|
|
511
|
+
<span class=icon>${a.icon}</span>
|
|
512
|
+
<span class=name>${a.name}</span>
|
|
513
|
+
</h4>
|
|
514
|
+
|
|
515
|
+
${tr(e,i,l=>{s.assignments.assign(t,l)})}
|
|
516
|
+
</div>
|
|
517
|
+
`});var ns=A((r,t,e)=>{let{hub:o}=r.deck,s=()=>o.deletePlayer(t),n=o.controllers.assigned.get(t)??[];return Xt({class:"player",playerId:t,context:r,content:h`
|
|
518
|
+
<h3>
|
|
519
|
+
<span>player ${e+1}</span>
|
|
520
|
+
|
|
521
|
+
${kt(o.playerIds.length>1,()=>h`
|
|
522
|
+
<button theme-button="naked angry" @click=${s}>
|
|
523
|
+
${Ye}
|
|
524
|
+
</button>
|
|
525
|
+
`)}
|
|
526
|
+
</h3>
|
|
527
|
+
|
|
528
|
+
<div class=controllerlist>
|
|
529
|
+
${n.map(i=>er(r,i))}
|
|
530
|
+
</div>
|
|
531
|
+
`})});var Cr=Symbol("droppyNewPlayer");var[is,as]=J(r=>{B(Z,es);let{hub:t}=r,e=t.controllers,o=()=>r.hub.createPlayer(),s=(i,a)=>ns(n,i,a),n=y(()=>({deck:r,dnd:new $e.DragAndDrops({acceptDrop(i,a,c){c.playerId===Cr?t.plug(a.controller,t.createPlayer()):C(c.playerId)?t.plug(a.controller,c.playerId):t.unplug(a.controller)}})}));return h`
|
|
532
|
+
<div class=plate ?data-drag-and-drop="${!!n.dnd.dragging}">
|
|
533
|
+
<div class=playerlist>
|
|
534
|
+
${t.playerIds.map(s)}
|
|
535
|
+
|
|
536
|
+
${kt(t.playerIds.length<r.maxPlayers,()=>Xt({class:"player new",themeCard:"dull",playerId:Cr,context:n,content:h`
|
|
537
|
+
<button theme-button=naked @click="${o}">
|
|
538
|
+
${rs}
|
|
539
|
+
<span>add player</span>
|
|
540
|
+
</button>
|
|
541
|
+
`}))}
|
|
542
|
+
|
|
543
|
+
${Xt({class:"player unassigned",themeCard:"dull",playerId:null,context:n,content:h`
|
|
544
|
+
<h3>unassigned</h3>
|
|
545
|
+
<div class=controllerlist>
|
|
546
|
+
${e.unassigned.map(i=>er(n,i))}
|
|
547
|
+
</div>
|
|
548
|
+
`})}
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
`});var cs=b`@layer view {
|
|
29
552
|
|
|
30
553
|
.plate {
|
|
31
|
-
|
|
554
|
+
display: flex;
|
|
555
|
+
flex-direction: column;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.topbar {
|
|
559
|
+
display: flex;
|
|
560
|
+
flex-wrap: wrap;
|
|
561
|
+
align-items: center;
|
|
562
|
+
padding: var(--pad) var(--space);
|
|
563
|
+
|
|
564
|
+
[view="profile-select"] {
|
|
565
|
+
font-size: 1.2em;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.corner {
|
|
569
|
+
display: flex;
|
|
570
|
+
flex-wrap: wrap;
|
|
571
|
+
align-items: center;
|
|
572
|
+
gap: var(--pad);
|
|
573
|
+
|
|
574
|
+
small {
|
|
575
|
+
user-select: none;
|
|
576
|
+
opacity: 0.5;
|
|
577
|
+
font-style: italic;
|
|
578
|
+
border: 1px solid;
|
|
579
|
+
border-radius: var(--round);
|
|
580
|
+
padding: var(--nib) var(--pad);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.tools {
|
|
585
|
+
display: flex;
|
|
586
|
+
flex-wrap: wrap;
|
|
587
|
+
gap: var(--pad);
|
|
588
|
+
flex: 1 1 auto;
|
|
589
|
+
justify-content: end;
|
|
590
|
+
|
|
591
|
+
input[type="text"] {
|
|
592
|
+
width: 12em;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.bindings, .group {
|
|
598
|
+
display: flex;
|
|
599
|
+
flex-direction: column;
|
|
600
|
+
gap: var(--nib);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.bindings {
|
|
604
|
+
user-select: none;
|
|
605
|
+
cursor: default;
|
|
606
|
+
padding: var(--space);
|
|
607
|
+
|
|
608
|
+
summary {
|
|
609
|
+
color: var(--prime);
|
|
610
|
+
width: max-content;
|
|
611
|
+
font-weight: bold;
|
|
612
|
+
font-size: 1.2em;
|
|
613
|
+
&:is(:hover, :focus-visible) { filter: brightness(120%); }
|
|
614
|
+
&:active { filter: brightness(90%); }
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.expression {
|
|
618
|
+
display: flex;
|
|
619
|
+
align-items: end;
|
|
620
|
+
margin-left: 0.5em;
|
|
621
|
+
border-bottom: 1px dashed oklch(from var(--prime) l c h / 30%);
|
|
622
|
+
flex-wrap: wrap;
|
|
623
|
+
gap: 0 var(--pad);
|
|
624
|
+
padding: var(--nib);
|
|
625
|
+
|
|
626
|
+
min-height: 3em;
|
|
627
|
+
|
|
628
|
+
&:last-of-type {
|
|
629
|
+
margin-bottom: calc(var(--space) * 2);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
> strong {
|
|
633
|
+
font-weight: normal;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
> div {
|
|
637
|
+
margin-left: auto;
|
|
638
|
+
|
|
639
|
+
input {
|
|
640
|
+
font: inherit;
|
|
641
|
+
color: inherit;
|
|
642
|
+
width: 8em;
|
|
643
|
+
|
|
644
|
+
&[type="number"] {
|
|
645
|
+
width: 5em;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
div {
|
|
651
|
+
display: flex;
|
|
652
|
+
flex-wrap: wrap;
|
|
653
|
+
align-items: stretch;
|
|
654
|
+
gap: var(--nib);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.bracket {
|
|
658
|
+
align-items: center;
|
|
659
|
+
gap: var(--nib);
|
|
660
|
+
padding: 2px var(--nib);
|
|
661
|
+
background: color-mix(in oklch, #aaa2, var(--slate) 80%);
|
|
662
|
+
box-shadow: 0.1em 0.2em 0.5em #0002;
|
|
663
|
+
border: 1px solid #fff4;
|
|
664
|
+
border-radius: 0.2em;
|
|
665
|
+
|
|
666
|
+
&.mod {
|
|
667
|
+
gap: var(--nib);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.children {
|
|
673
|
+
display: flex;
|
|
674
|
+
flex-direction: column;
|
|
675
|
+
|
|
676
|
+
margin-left: 0.3em;
|
|
677
|
+
padding-left: 0.5em;
|
|
678
|
+
border-left: 1px solid oklch(from var(--prime) l c h / 20%);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.expression .recorder {
|
|
682
|
+
display: flex;
|
|
683
|
+
gap: var(--pad);
|
|
684
|
+
|
|
685
|
+
&[data-recording] {
|
|
686
|
+
color: var(--recording);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
32
689
|
}
|
|
33
690
|
|
|
34
|
-
`;var
|
|
35
|
-
<div class=
|
|
36
|
-
|
|
691
|
+
}`;var ls=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-Copy"><path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/><path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/></svg>`;var us=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-TrashCan"><path d="M4 6h16l-1.58 14.22A2 2 0 0 1 16.432 22H7.568a2 2 0 0 1-1.988-1.78L4 6z"/><path d="M7.345 3.147A2 2 0 0 1 9.154 2h5.692a2 2 0 0 1 1.81 1.147L18 6H6l1.345-2.853z"/><path d="M2 6h20"/><path d="M10 11v5"/><path d="M14 11v5"/></svg>`;function Er(){return ge.random(16)}var ps=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-KeyCap"><path d="M7 3s3 .5 5 .5 5-.5 5-.5l1 9s-3 1-6 1-6-1-6-1l1-9z"/><path d="M3.869 8.147l-.862 10.294c-.03.366.04.733.205 1.06l.197.393A2.01 2.01 0 0 0 5.206 21h13.588a2.01 2.01 0 0 0 1.797-1.106l.197-.392c.165-.328.236-.695.205-1.06l-.862-10.295a3.99 3.99 0 0 0-.79-2.068L17 3s-3 .5-5 .5S6.978 3 6.978 3l-2.32 3.08a3.99 3.99 0 0 0-.79 2.067z"/><path d="M6 12l-2.5 8M18 12l2.5 8"/></svg>`;var hs=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-Backspace"><path d="M17 15l-6-6m6 0l-6 6"/><path d="M7.4 4.8A2 2 0 0 1 9 4h11a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H9a2 2 0 0 1-1.6-.8l-4.5-6a2 2 0 0 1 0-2.4l4.5-6z"/></svg>`;var ds=f`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="ai ai-Cross"><path d="M20 20L4 4m16 0L4 20"/></svg>`;function ms(r,t){let e=new Set,o=new Set;function s(a){if(a==="ShiftLeft"||a==="ShiftRight")return"shift";if(a==="ControlLeft"||a==="ControlRight")return"ctrl";if(a==="MetaLeft"||a==="MetaRight")return"meta";if(a==="AltLeft"||a==="AltRight")return"alt"}let n=E(window,{blur:()=>i(),keydown:a=>{if(a.preventDefault(),a.code==="Escape")return i();e.add(a.code),o.add(a.code)},keyup:a=>{if(a.preventDefault(),e.delete(a.code),e.size===0){let c=new Set,l=new Set;for(let p of o){let u=s(p);u?l.add(u):c.add(p)}o.size===0||(c.size===0?r(["*",...o]):l.size>0?r(["*",["mod",...l],...c]):o.size>1?r(["*",...o]):r([...o][0])),i()}}}),i=()=>{n(),t()};return i}function fs(r,t){let{dispose:e,schedule:o}=V();o(t);let s=new Set,n=new Set,i=new Set;return o(E(window,{blur:()=>e()})),o(Ke(a=>{let c=new Pt(a);return s.add(c),c.onSample(l=>{if(l.code!=="gamepad.any")if(l.value>.9)n.add(l.code),i.add(l.code);else{if(!n.delete(l.code))return;n.size===0&&(i.size===1?r([...i][0]):i.size>1&&r(["*",...i]),e())}}),()=>{c.dispose(),s.delete(c)}})),o(wt(async()=>{for(let a of s)a.poll();await $t(16.67)})),e}function gs(r,t){let{dispose:e,schedule:o}=V();o(t);let s=new Set,n=new Set,i=a=>a.composedPath().some(c=>c instanceof Element&&c.matches("button.record"));return o(E(window,{blur:()=>e(),auxclick:a=>a.preventDefault(),mousedown:a=>{if(i(a))return;a.preventDefault();let c=zt(a.button);s.add(c),n.add(c)},mouseup:a=>{let c=zt(a.button);s.delete(c)&&(a.preventDefault(),s.size===0&&(n.size===1?r([...n][0]):n.size>1&&r(["*",...n]),e()))},contextmenu:a=>{a.preventDefault()}})),e}var bs=A((r,t,e,o)=>{let s=H(null),n=()=>s(null),i=()=>{let{dispose:p,schedule:u}=V();u(n),u(ms(t,p)),u(fs(t,p)),u(gs(t,p)),s(p)},a=()=>{s()?.(),n()};function c(){s()?a():i()}function l(){a(),e()}return So(a),h`
|
|
692
|
+
<div class=recorder ?data-recording="${!!s()}">
|
|
693
|
+
${o}
|
|
694
|
+
${r?null:h`
|
|
695
|
+
<button
|
|
696
|
+
class=record
|
|
697
|
+
theme-button=naked
|
|
698
|
+
title="record a keypress"
|
|
699
|
+
@click=${c}>
|
|
700
|
+
${s()?ds:ps}
|
|
701
|
+
</button>
|
|
702
|
+
|
|
703
|
+
<button
|
|
704
|
+
theme-button=naked
|
|
705
|
+
title="reset to default"
|
|
706
|
+
@click=${l}>
|
|
707
|
+
${hs}
|
|
708
|
+
</button>
|
|
709
|
+
`}
|
|
37
710
|
</div>
|
|
38
|
-
`)
|
|
711
|
+
`});var Mr=A((r,t,e)=>{if(!C(t))return h`
|
|
712
|
+
<div class=null>unset</div>
|
|
713
|
+
`;if(bt(t))return h`
|
|
714
|
+
<div class=number>
|
|
715
|
+
<input
|
|
716
|
+
type=number
|
|
717
|
+
step=any
|
|
718
|
+
theme-input
|
|
719
|
+
.value="${t}"
|
|
720
|
+
?readonly="${r}"
|
|
721
|
+
@change="${o=>{let n=o.currentTarget.valueAsNumber;Number.isFinite(n)&&e(n)}}"
|
|
722
|
+
/>
|
|
723
|
+
</div>
|
|
724
|
+
`;if(xt(t))return h`
|
|
725
|
+
<input
|
|
726
|
+
type=text
|
|
727
|
+
theme-input
|
|
728
|
+
.value="${t}"
|
|
729
|
+
?readonly="${r}"
|
|
730
|
+
@change="${o=>{let n=o.currentTarget.value;e(n)}}"/>
|
|
731
|
+
`;if(be(t))return t[0]==="mod"?h`
|
|
732
|
+
<div class="bracket mod">
|
|
733
|
+
${t.slice(1).length===0?"unmodified":t.slice(1).join("+")}
|
|
734
|
+
|
|
735
|
+
${!r&&t.slice(1).length>0?h`
|
|
736
|
+
<button
|
|
737
|
+
theme-button=naked
|
|
738
|
+
@click="${()=>e([t[0]])}">
|
|
739
|
+
${Ye}
|
|
740
|
+
</button>
|
|
741
|
+
`:null}
|
|
742
|
+
</div>
|
|
743
|
+
`:h`
|
|
744
|
+
<div class=bracket>
|
|
745
|
+
${t[0]==="*"?null:h`
|
|
746
|
+
<strong>${t[0]}</strong>
|
|
747
|
+
`}
|
|
748
|
+
${t.slice(1).map((o,s)=>Mr(r,o??null,n=>{let i=structuredClone(t);i[s+1]=n,e(i)}))}
|
|
749
|
+
</div>
|
|
750
|
+
`;throw new Error("unknown expression")});function rr(r,t,e,o){return at(t)?Mr(r,t,o):Object.entries(t).map(([s,n])=>at(n)?kn(r,t,e,o,s):$n(r,t,e,o,s))}function $n(r,t,e,o,s){return h`
|
|
751
|
+
<details class=group open>
|
|
752
|
+
<summary>${s}</summary>
|
|
753
|
+
<div class=children>
|
|
754
|
+
${rr(r,t[s],e[s],n=>o({...t,[s]:n}))}
|
|
755
|
+
</div>
|
|
756
|
+
</details>
|
|
757
|
+
`}function kn(r,t,e,o,s){let n=a=>o({...t,[s]:a});return h`
|
|
758
|
+
<div class=expression>
|
|
759
|
+
<strong>${s}</strong>
|
|
760
|
+
${bs(r,n,()=>n(e[s]),rr(r,t[s],e[s],n))}
|
|
761
|
+
</div>
|
|
762
|
+
`}var[xs,ys]=J(r=>{B(Z,cs);let{controls:t,controls:{profiles:e}}=r,o=H(t.fallbackProfileKey),s=e.get(o()),n=e.isPreset(o()),i=s.basedOn?e.get(s.basedOn):s,a=u=>{let m=o();if(e.isPreset(m)){let _=m,Q=Er();m=Q,e.clone(Q,_)}e.update(m,{bindings:u}),o(m)},c=(u,m)=>e.update(u,{label:m}),l=()=>{let u=Er();e.clone(u,o()),o.set(u)},p=()=>{e.delete(o()),o(t.fallbackProfileKey)};return h`
|
|
763
|
+
<div class=plate theme-card>
|
|
764
|
+
<header class=topbar>
|
|
765
|
+
<div class=corner>
|
|
766
|
+
${tr(r,o(),o)}
|
|
767
|
+
|
|
768
|
+
<button title="copy this profile" theme-button=naked @click="${l}">
|
|
769
|
+
${ls}
|
|
770
|
+
</button>
|
|
771
|
+
|
|
772
|
+
${n?null:h`
|
|
773
|
+
<button title="delete this profile" theme-button=naked @click="${p}">
|
|
774
|
+
${us}
|
|
775
|
+
</button>
|
|
776
|
+
`}
|
|
777
|
+
|
|
778
|
+
${kt(n,()=>h`<small>readonly</small>`)}
|
|
779
|
+
${ye(s.basedOn,u=>h`<small>based on ${e.get(u).label}</small>`)}
|
|
780
|
+
</div>
|
|
781
|
+
|
|
782
|
+
<div class=tools>
|
|
783
|
+
${n?null:h`
|
|
784
|
+
<input
|
|
785
|
+
type=text
|
|
786
|
+
theme-input
|
|
787
|
+
.value="${s.label}"
|
|
788
|
+
@change="${u=>{let m=u.currentTarget;c(o(),m.value)}}"
|
|
789
|
+
/>
|
|
790
|
+
`}
|
|
791
|
+
</div>
|
|
792
|
+
</header>
|
|
793
|
+
|
|
794
|
+
<div class=bindings>
|
|
795
|
+
${rr(!1,s.bindings,i.bindings,a)}
|
|
796
|
+
</div>
|
|
797
|
+
</div>
|
|
798
|
+
`});var[by,ws]=J(r=>{B(Z,Yo);let t={slot:"panel"},e=y(()=>new Ot);return y(()=>{window.location.hash.includes("bindings")&&e.setIndex(1)}),h`
|
|
799
|
+
<div class=deck theme-card>
|
|
800
|
+
${Xo.with({props:[{control:e}],children:h`
|
|
801
|
+
<button theme-button>
|
|
802
|
+
${Tt}
|
|
803
|
+
<span>controllers</span>
|
|
804
|
+
</button>
|
|
805
|
+
|
|
806
|
+
<button theme-button>
|
|
807
|
+
${ts}
|
|
808
|
+
<span>customize</span>
|
|
809
|
+
</button>
|
|
810
|
+
|
|
811
|
+
${is.with({attrs:t,props:[r]})}
|
|
812
|
+
${xs.with({attrs:t,props:[r]})}
|
|
813
|
+
`})}
|
|
814
|
+
</div>
|
|
815
|
+
`});var vs=b`@layer view {
|
|
816
|
+
|
|
817
|
+
:host {
|
|
818
|
+
display: block;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
output {
|
|
822
|
+
opacity: 0.5;
|
|
823
|
+
color: var(--prime);
|
|
824
|
+
font-size: 1em;
|
|
825
|
+
font-family: monospace;
|
|
826
|
+
display: block;
|
|
827
|
+
overflow-wrap: anywhere;
|
|
828
|
+
text-overflow: ellipsis;
|
|
829
|
+
height: 8em;
|
|
830
|
+
padding: 0 4em;
|
|
831
|
+
overflow: hidden;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
}`;var[Ay,$s]=J(r=>(B(Z,vs),h`
|
|
835
|
+
<output class=viz>${r.$hex()}</output>
|
|
836
|
+
`));var ks=f`<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ai ai-Devices"><path d="M10 15H4V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v2"/><path d="M2 18h12"/><path d="M14 9.2c0-.663.597-1.2 1.333-1.2h5.334C21.403 8 22 8.537 22 9.2v9.6c0 .663-.597 1.2-1.333 1.2h-5.334C14.597 20 14 19.463 14 18.8V9.2z"/><path d="M18 17h.01"/></svg>`;function Ss(r,t){return r.length>t?r.slice(0,t)+"...":r}async function As(r){let t=await Vo(r),e=new Ze,o={TactDeck:ws(t),TactCustomize:ys(t),TactControllers:as(t),TactVisualizer:$s(e)};function s(a){return Fo(t.hub,(c,l)=>{let p=`${l.pad.gamepad.id} ${l.pad.gamepad.index+1}`;return t.controls.attach(c,{icon:Tt,handle:p,tooltip:p,name:Ss(p,32),defaultProfileKey:a??Qt(t.controls.presets).key}),()=>t.controls.detach(c)})}function n(){let{key:a,profile:c}=Qt(t.controls.presets),l=new Mt({bindings:c.bindings,source:new Je(new Xe,new Qe)});return t.hub.plug(l),t.controls.attach(l,{icon:ks,handle:"standard",name:"mouse/keyboard",tooltip:"",defaultProfileKey:a}),l}function i(){te(o)}return{deck:t,gamepads:s,mouseKeyboard:n,visualizer:e,elements:o,registerElements:i}}var Yt=await As({presets:Mo,maxPlayers:4});Yt.mouseKeyboard();Yt.gamepads("gamer");Yt.registerElements();wt(async()=>{let r=Yt.deck.hub.encodeAll();Yt.visualizer.update(r),await $t(1e3/60)});{let r=g('input[type="color"]');r.value="#ffbb00",r.oninput=()=>document.body.style.setProperty("--tact-prime",r.value)}
|
|
39
837
|
/*! For license information please see main.bundle.min.js.LEGAL.txt */
|
|
40
838
|
//# sourceMappingURL=main.bundle.min.js.map
|