Compare commits
51
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85b1c307a8 | ||
|
|
5fa7e0bc51 | ||
|
|
fe99cac8db | ||
|
|
4ec42c6985 | ||
|
|
c9fde8eea8 | ||
|
|
5574fc89ef | ||
|
|
ac2f3fe969 | ||
|
|
6420370352 | ||
|
|
99f9eccf00 | ||
|
|
12508bda83 | ||
|
|
52205be6af | ||
|
|
aa1f9d1532 | ||
|
|
6aa85f99d0 | ||
|
|
584a3cf13c | ||
|
|
a5dc4697de | ||
|
|
d682a18707 | ||
|
|
eaa591d93a | ||
|
|
96b169c017 | ||
|
|
35d14965b3 | ||
|
|
6726c09b98 | ||
|
|
de517bfaaa | ||
|
|
6f1a8bd92c | ||
|
|
b787f2f9ce | ||
|
|
4bd89a2b3b | ||
|
|
69a87d629f | ||
|
|
c026112be1 | ||
|
|
e5c4b3d5e6 | ||
|
|
dd27581358 | ||
|
|
070f037449 | ||
|
|
adb5e9422d | ||
|
|
d348acd88c | ||
|
|
e8568795b2 | ||
|
|
086a7ae640 | ||
|
|
836d6b0be9 | ||
|
|
8309399827 | ||
|
|
b50b9abc22 | ||
|
|
d0f4ba8f01 | ||
|
|
3fc41f806a | ||
|
|
9830917b1a | ||
|
|
ba7e854a6f | ||
|
|
df070ebd72 | ||
|
|
bfbee7dacb | ||
|
|
e2eb3d3825 | ||
|
|
0a6431eecf | ||
|
|
6e94bb8906 | ||
|
|
88e3539a1b | ||
|
|
72e6e93337 | ||
|
|
d254fa0d32 | ||
|
|
3e4231938e | ||
|
|
99bf70d3f7 | ||
|
|
704b7b83cd |
No files matched your search
@@ -15,6 +15,7 @@ To make this project work, you will need :
|
|||||||
- A Thermal Printer :
|
- A Thermal Printer :
|
||||||
- I used *Adafruit's thermal printer* at first, but it broke down. You can get it [here](https://www.adafruit.com/product/597).
|
- I used *Adafruit's thermal printer* at first, but it broke down. You can get it [here](https://www.adafruit.com/product/597).
|
||||||
- I then used an *EPSON TM-T2OIII*. It's expensive, but it's also high quality, and has better CUPS and specific library support.
|
- I then used an *EPSON TM-T2OIII*. It's expensive, but it's also high quality, and has better CUPS and specific library support.
|
||||||
|
- Sometime after, a friend leant me a *Brother QL-650TD* to add support for this type of printer.
|
||||||
- A Raspberry Pi or any computer with USB or Serial.
|
- A Raspberry Pi or any computer with USB or Serial.
|
||||||
- Some electric wires.
|
- Some electric wires.
|
||||||
- Some knowledge of the command line,
|
- Some knowledge of the command line,
|
||||||
@@ -37,13 +38,15 @@ You can also get some information from [here](https://learn.adafruit.com/mini-th
|
|||||||
|
|
||||||
LittlePrynter itself does not require any other software than the ones installed with it, i.e the ones listed in the `pyproject.toml` file.
|
LittlePrynter itself does not require any other software than the ones installed with it, i.e the ones listed in the `pyproject.toml` file.
|
||||||
|
|
||||||
The version for the EPSON TM-T20III uses a library called `python-escpos`, which doesn't need a CUPS driver or anything else. It's included in the Python dependencies.
|
The project supports EPSON label printers as well as Brother label printers, and you can try to adapt it for other printers. For example, using `adafruit-thermal`.
|
||||||
|
|
||||||
The project only supports the EPSON printer, but you can try to adapt it for other printers. For example, using `adafruit-thermal`, or `brother-ql`.
|
For the EPSON TM-T20III, LittlePrynter uses a library called `python-escpos`, which doesn't need a CUPS driver or anything else. It's included in the Python dependencies. For the Brother-QL, we use the `brother-ql` library, which is also included.
|
||||||
|
|
||||||
### Install & setup the project :
|
### Install & setup the project :
|
||||||
|
|
||||||
Theses commands will copy the software on your computer, go into the directory, then activate a virtual environnement and install all of the project's dependecies.
|
We use [Poetry](https://python-poetry.org/) to manage the Python environnement and packages. You will need to install it on your computer to install LittlePrynter.
|
||||||
|
|
||||||
|
The following commands will copy the software on your computer, go into the directory, then activate a virtual environnement and install all of the project's dependecies.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone https://git.n07070.xyz/n07070/LittlePrynter
|
$ git clone https://git.n07070.xyz/n07070/LittlePrynter
|
||||||
@@ -69,6 +72,8 @@ $ flask run --cert=adhoc
|
|||||||
|
|
||||||
The `--cert=adhoc` argument will make LittlePrinter accessible in HTTPS with a [self-signed SSL certificate](https://en.wikipedia.org/wiki/Self-signed_certificate). This provides a free and easy way to use HTTPS, but does not provide any trust value. It is, on the other hand, a good way to access the webcam in developpement mode or on a local network, because a HTTPS connexion is required by browsers to access the needed APIs.
|
The `--cert=adhoc` argument will make LittlePrinter accessible in HTTPS with a [self-signed SSL certificate](https://en.wikipedia.org/wiki/Self-signed_certificate). This provides a free and easy way to use HTTPS, but does not provide any trust value. It is, on the other hand, a good way to access the webcam in developpement mode or on a local network, because a HTTPS connexion is required by browsers to access the needed APIs.
|
||||||
|
|
||||||
|
You can also use the `run.sh` for this.
|
||||||
|
|
||||||
This command should start a web server with which you can test your configuration. If you plan on exposing your printer to the Internet, and give it an IP / URL, _please, please, please_, don't run it this way. Look at Flask's documentation and read about running a production server. It's a little more work, but it will prevent your computer/server being hacked in too easily.
|
This command should start a web server with which you can test your configuration. If you plan on exposing your printer to the Internet, and give it an IP / URL, _please, please, please_, don't run it this way. Look at Flask's documentation and read about running a production server. It's a little more work, but it will prevent your computer/server being hacked in too easily.
|
||||||
|
|
||||||
Voilà !
|
Voilà !
|
||||||
@@ -81,11 +86,11 @@ Please also say if you had a printer to test your code, and which printer you've
|
|||||||
|
|
||||||
### Code structure
|
### Code structure
|
||||||
|
|
||||||
The app is written about the Flask framework. You can start by looking at the code in the `src/` folder, in the `main.py` file. There, you will see that a few classes are initialized. In general, they are two parts to the program :
|
The app is written around the Flask framework. You can start by looking at the code in the `src/` folder, in the `main.py` file. There, you will see that a few classes are initialized. In general, they are two parts to the program :
|
||||||
|
|
||||||
The Web pages and the API, which are the user-facing parts. This is with what the users will interact, and define how the program is going to be used. The web pages are renderer from the `include/` folder where Jinj2 templates are defined.
|
The Web pages and the API, which are the user-facing parts. This is with what the users will interact, and define how the program is going to be used. The web pages are renderer from the `include/` folder where Jinj2 templates are defined.
|
||||||
|
|
||||||
The Worker and Printer Queue are the internal parts. When a new thing needs to be printed, usually sent from the Web or API interfaces, a new Task in the type of the document is created, and added to a print queue. Then, a Worker thread looks up the state of the queue every so often and picks jobs to execute on the printers connected to the system.
|
The Worker and Printer Queue are the internal parts. When a new thing needs to be printed, usually sent from the Web or API interfaces, a new Task of the type of the document is created, and added to a print queue. Then, a Worker thread looks up the state of the queue every so often and picks jobs to execute on the printers connected to the system.
|
||||||
|
|
||||||
The last part of the program is the Raspberry Pi class, that handles to Photomaton mode, which handles button presses, and LED indicator and a flash.
|
The last part of the program is the Raspberry Pi class, that handles to Photomaton mode, which handles button presses, and LED indicator and a flash.
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,28 @@
|
|||||||
# Configuration file the LittlePrynter
|
# Configuration file the LittlePrynter
|
||||||
|
|
||||||
[defaults]
|
[defaults]
|
||||||
signature = "Anonymous"
|
signature = ""
|
||||||
|
|
||||||
|
|
||||||
# Printer settings
|
# Printer settings
|
||||||
[printer]
|
[printer]
|
||||||
upload_folder = "src/static/uploads"
|
upload_folder = "src/static/uploads"
|
||||||
|
# How long do we wait before giving up on waiting for a printer connexion
|
||||||
|
waiting_time = 5
|
||||||
|
|
||||||
|
[printer.epson]
|
||||||
|
# Configurations for EPSON printers
|
||||||
|
profile = "TM-T20III"
|
||||||
|
label_type = 80 # 80 or 58 ( label width in mm )
|
||||||
|
align_text = "center"
|
||||||
|
text_max_length = 4096
|
||||||
|
signature_max_length = 256
|
||||||
|
|
||||||
|
[printer.brother]
|
||||||
|
# Configurations for Brother printers
|
||||||
|
label_type = "62" # See https://github.com/pklaus/brother_ql#usage for label types
|
||||||
|
text_max_length = 4096
|
||||||
|
signature_max_length = 256
|
||||||
|
|
||||||
# Raspberry Pi Configuration
|
# Raspberry Pi Configuration
|
||||||
[rpi]
|
[rpi]
|
||||||
|
|||||||
@@ -5,8 +5,25 @@ signature = "Anonymous"
|
|||||||
|
|
||||||
# Printer settings
|
# Printer settings
|
||||||
[printer]
|
[printer]
|
||||||
vendor_id = "0x04b8"
|
# Where do we upload the pictures and such
|
||||||
device_id = "0x0e28"
|
upload_folder = "src/static/uploads"
|
||||||
|
|
||||||
|
# How long do we wait before giving up on waiting for a printer connexion
|
||||||
|
waiting_time = 5
|
||||||
|
|
||||||
|
[printer.epson]
|
||||||
|
# Configurations for EPSON printers
|
||||||
|
profile = "TM-T20III"
|
||||||
|
label_type = 80 # 80 or 58 ( label width in mm )
|
||||||
|
align_text = "center"
|
||||||
|
text_max_length = 4096
|
||||||
|
signature_max_length = 256
|
||||||
|
|
||||||
|
[printer.brother]
|
||||||
|
# Configurations for Brother printers
|
||||||
|
label_type = 62 # See https://github.com/pklaus/brother_ql#usage for label types
|
||||||
|
text_max_length = 4096
|
||||||
|
signature_max_length = 256
|
||||||
|
|
||||||
# Raspberry Pi Configuration
|
# Raspberry Pi Configuration
|
||||||
[rpi]
|
[rpi]
|
||||||
|
|||||||
Generated
+1181
-933
File diff suppressed because it is too large.
Load diff
@@ -43,6 +43,7 @@ dependencies = [
|
|||||||
"pep8 (>=1.7.1,<2.0.0)",
|
"pep8 (>=1.7.1,<2.0.0)",
|
||||||
"pylint (>=4.0.5,<5.0.0)",
|
"pylint (>=4.0.5,<5.0.0)",
|
||||||
"brother-ql-inventree (>=1.3,<2.0)",
|
"brother-ql-inventree (>=1.3,<2.0)",
|
||||||
|
"pytest (>=9.2.0,<10.0.0)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
eval $(poetry env activate)
|
||||||
|
export FLASK_DEBUG=True; export FLASK_APP=src/main.py && flask run --cert=adhoc --debug --no-debugger --host 0.0.0.0 --without-threads
|
||||||
+382
@@ -0,0 +1,382 @@
|
|||||||
|
"""
|
||||||
|
Various image processing functions that don't fit in the Printer Class
|
||||||
|
"""
|
||||||
|
import math
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
from uuid import uuid4
|
||||||
|
from PIL import Image, ImageEnhance, ImageDraw, ImageFont
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
def process_image(self, path, max_width=575, max_height=1000):
|
||||||
|
"""
|
||||||
|
Adjust the constrat of images
|
||||||
|
"""
|
||||||
|
brightness_threshold = 100
|
||||||
|
contrast_factor = 2.0
|
||||||
|
|
||||||
|
with Image.open(path) as img:
|
||||||
|
# Preserve aspect ratio while fitting within the maximum dimensions.
|
||||||
|
img.thumbnail(
|
||||||
|
(max_width, max_height),
|
||||||
|
Image.Resampling.LANCZOS,
|
||||||
|
)
|
||||||
|
|
||||||
|
grayscale_image = img.convert("L")
|
||||||
|
|
||||||
|
avg_brightness = np.asarray(grayscale_image, dtype=np.float32).mean()
|
||||||
|
self.app.logger.debug("Average brightness of the image: %.2f", avg_brightness)
|
||||||
|
|
||||||
|
if avg_brightness < brightness_threshold:
|
||||||
|
brightness_factor = min(
|
||||||
|
max(
|
||||||
|
1 + (brightness_threshold - avg_brightness) / brightness_threshold,
|
||||||
|
1.1,
|
||||||
|
),
|
||||||
|
2.5,
|
||||||
|
)
|
||||||
|
self.app.logger.debug(
|
||||||
|
"Image is dark; increasing brightness by %.2f",
|
||||||
|
brightness_factor,
|
||||||
|
)
|
||||||
|
grayscale_image = ImageEnhance.Brightness(grayscale_image).enhance(
|
||||||
|
brightness_factor
|
||||||
|
)
|
||||||
|
|
||||||
|
contrast = float(np.asarray(grayscale_image, dtype=np.float32).std())
|
||||||
|
self.app.logger.debug("Grayscale standard deviation: %.2f", contrast)
|
||||||
|
|
||||||
|
# Save the enhanced result.
|
||||||
|
processed = ImageEnhance.Contrast(grayscale_image).enhance(contrast_factor)
|
||||||
|
|
||||||
|
jpeg_path = os.path.splitext(path)[0] + "_processed.jpg"
|
||||||
|
processed.save(jpeg_path, format="JPEG", quality=95, optimize=True)
|
||||||
|
|
||||||
|
self.app.logger.debug("Processed and saved image: %s", jpeg_path)
|
||||||
|
return jpeg_path
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def text_to_image(
|
||||||
|
text,
|
||||||
|
width=400,
|
||||||
|
font_path="src/static/font/Sono-Regular.ttf",
|
||||||
|
font_size=24,
|
||||||
|
padding=10,
|
||||||
|
line_spacing=4,
|
||||||
|
background="white",
|
||||||
|
fill="black",
|
||||||
|
output_dir="src/static/uploads",
|
||||||
|
align="center", # "left", "center", or "right"
|
||||||
|
bold_font_path="src/static/font/Sono-Bold.ttf",
|
||||||
|
italic_font_path=None,
|
||||||
|
bold_italic_font_path=None,
|
||||||
|
):
|
||||||
|
"""Convert text with basic Markdown bold and italic to an image.
|
||||||
|
|
||||||
|
Supported markers: **bold**, *italic*, and ***bold italic***.
|
||||||
|
Underscore forms (__bold__, _italic_) are supported too.
|
||||||
|
|
||||||
|
DISCLAIMER : THIS CODE WAS GENERATED BY A LLM. I'm too dumb to code this myself. If a human has a better solution, I'm very much willing to hear about it. This code may or may not work. If it causes bugs, tough luck !
|
||||||
|
"""
|
||||||
|
|
||||||
|
if align not in {"left", "center", "right"}:
|
||||||
|
raise ValueError("align must be 'left', 'center', or 'right'")
|
||||||
|
|
||||||
|
# Load supplied font faces. Missing styles are simulated from the regular font.
|
||||||
|
fonts = {
|
||||||
|
"regular": ImageFont.truetype(font_path, font_size),
|
||||||
|
"bold": ImageFont.truetype(bold_font_path, font_size)
|
||||||
|
if bold_font_path else None,
|
||||||
|
"italic": ImageFont.truetype(italic_font_path, font_size)
|
||||||
|
if italic_font_path else None,
|
||||||
|
"bold_italic": ImageFont.truetype(bold_italic_font_path, font_size)
|
||||||
|
if bold_italic_font_path else None,
|
||||||
|
}
|
||||||
|
|
||||||
|
regular_font = fonts["regular"]
|
||||||
|
|
||||||
|
# Match triple markers before double and single markers.
|
||||||
|
marker_re = re.compile(
|
||||||
|
r"\*\*\*(.+?)\*\*\*|___(.+?)___|"
|
||||||
|
r"\*\*(.+?)\*\*|__(.+?)__|"
|
||||||
|
r"(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)|"
|
||||||
|
r"(?<!_)_(?!_)(.+?)(?<!_)_(?!_)"
|
||||||
|
)
|
||||||
|
|
||||||
|
def parse_paragraph(paragraph):
|
||||||
|
"""Return a list of (character, style) pairs."""
|
||||||
|
result = []
|
||||||
|
position = 0
|
||||||
|
|
||||||
|
for match in marker_re.finditer(paragraph):
|
||||||
|
result.extend(
|
||||||
|
(char, "regular") for char in paragraph[position:match.start()]
|
||||||
|
)
|
||||||
|
|
||||||
|
groups = match.groups()
|
||||||
|
if groups[0] is not None or groups[1] is not None:
|
||||||
|
content = groups[0] if groups[0] is not None else groups[1]
|
||||||
|
style = "bold_italic"
|
||||||
|
elif groups[2] is not None or groups[3] is not None:
|
||||||
|
content = groups[2] if groups[2] is not None else groups[3]
|
||||||
|
style = "bold"
|
||||||
|
else:
|
||||||
|
content = groups[4] if groups[4] is not None else groups[5]
|
||||||
|
style = "italic"
|
||||||
|
|
||||||
|
result.extend((char, style) for char in content)
|
||||||
|
position = match.end()
|
||||||
|
|
||||||
|
result.extend((char, "regular") for char in paragraph[position:])
|
||||||
|
return result
|
||||||
|
|
||||||
|
def get_font_and_effects(style):
|
||||||
|
"""Choose a supplied font face, or return fallback drawing effects."""
|
||||||
|
if style == "regular":
|
||||||
|
return regular_font, 0, False
|
||||||
|
|
||||||
|
if style == "bold":
|
||||||
|
if fonts["bold"]:
|
||||||
|
return fonts["bold"], 0, False
|
||||||
|
return regular_font, 1, False
|
||||||
|
|
||||||
|
if style == "italic":
|
||||||
|
if fonts["italic"]:
|
||||||
|
return fonts["italic"], 0, False
|
||||||
|
return regular_font, 0, True
|
||||||
|
|
||||||
|
# Prefer a real combined face. Otherwise combine bold and italic effects.
|
||||||
|
if fonts["bold_italic"]:
|
||||||
|
return fonts["bold_italic"], 0, False
|
||||||
|
|
||||||
|
bold_face = fonts["bold"]
|
||||||
|
return bold_face or regular_font, 0 if bold_face else 1, True
|
||||||
|
|
||||||
|
# Use a small shear for synthetic italics.
|
||||||
|
italic_shear = 0.25
|
||||||
|
|
||||||
|
def grouped_runs(chars):
|
||||||
|
"""Group adjacent characters that share the same style."""
|
||||||
|
runs = []
|
||||||
|
for char, style in chars:
|
||||||
|
if runs and runs[-1][0] == style:
|
||||||
|
runs[-1][1] += char
|
||||||
|
else:
|
||||||
|
runs.append([style, char])
|
||||||
|
return runs
|
||||||
|
|
||||||
|
def run_width(style, text):
|
||||||
|
"""Estimate rendered width, including simulated bold/italic effects."""
|
||||||
|
font, stroke_width, synthetic_italic = get_font_and_effects(style)
|
||||||
|
extra = stroke_width * 2
|
||||||
|
if synthetic_italic:
|
||||||
|
extra += math.ceil(italic_shear * font_size)
|
||||||
|
return font.getlength(text) + extra
|
||||||
|
|
||||||
|
def chars_width(chars):
|
||||||
|
return sum(run_width(style, text) for style, text in grouped_runs(chars))
|
||||||
|
|
||||||
|
max_text_width = width - 2 * padding
|
||||||
|
if max_text_width <= 0:
|
||||||
|
raise ValueError("width must be greater than twice the padding")
|
||||||
|
|
||||||
|
# Wrap words by their rendered pixel width.
|
||||||
|
lines = []
|
||||||
|
for paragraph in text.splitlines() or [""]:
|
||||||
|
chars = parse_paragraph(paragraph)
|
||||||
|
words = []
|
||||||
|
current_word = []
|
||||||
|
|
||||||
|
for item in chars:
|
||||||
|
if item[0].isspace():
|
||||||
|
if current_word:
|
||||||
|
words.append(current_word)
|
||||||
|
current_word = []
|
||||||
|
else:
|
||||||
|
current_word.append(item)
|
||||||
|
|
||||||
|
if current_word:
|
||||||
|
words.append(current_word)
|
||||||
|
|
||||||
|
if not words:
|
||||||
|
lines.append([])
|
||||||
|
continue
|
||||||
|
|
||||||
|
line = []
|
||||||
|
for word in words:
|
||||||
|
candidate = line + ([(" ", "regular")] if line else []) + word
|
||||||
|
|
||||||
|
if chars_width(candidate) <= max_text_width:
|
||||||
|
line = candidate
|
||||||
|
continue
|
||||||
|
|
||||||
|
if line:
|
||||||
|
lines.append(line)
|
||||||
|
line = []
|
||||||
|
|
||||||
|
# Break a word that's wider than the available line width.
|
||||||
|
for item in word:
|
||||||
|
if line and chars_width(line + [item]) > max_text_width:
|
||||||
|
lines.append(line)
|
||||||
|
line = []
|
||||||
|
line.append(item)
|
||||||
|
|
||||||
|
if line:
|
||||||
|
lines.append(line)
|
||||||
|
|
||||||
|
if not lines:
|
||||||
|
lines = [[]]
|
||||||
|
|
||||||
|
ascent, descent = regular_font.getmetrics()
|
||||||
|
line_height = ascent + descent
|
||||||
|
image_height = (
|
||||||
|
2 * padding
|
||||||
|
+ len(lines) * line_height
|
||||||
|
+ (len(lines) - 1) * line_spacing
|
||||||
|
)
|
||||||
|
|
||||||
|
image = Image.new("RGBA", (width, image_height), background)
|
||||||
|
|
||||||
|
def render_run(style, text):
|
||||||
|
"""Render one styled run, applying fallback bold/italic effects."""
|
||||||
|
font, stroke_width, synthetic_italic = get_font_and_effects(style)
|
||||||
|
|
||||||
|
bbox = font.getbbox(text, stroke_width=stroke_width)
|
||||||
|
run_width_px = max(
|
||||||
|
1,
|
||||||
|
math.ceil(font.getlength(text) + 2 * stroke_width + font_size),
|
||||||
|
bbox[2] - bbox[0] + 2 * stroke_width + font_size,
|
||||||
|
)
|
||||||
|
run_height_px = max(line_height + font_size, bbox[3] - bbox[1] + font_size)
|
||||||
|
|
||||||
|
layer = Image.new("RGBA", (run_width_px, run_height_px), (0, 0, 0, 0))
|
||||||
|
layer_draw = ImageDraw.Draw(layer)
|
||||||
|
|
||||||
|
# Offset the glyphs so their bounding box starts inside the transparent layer.
|
||||||
|
text_x = stroke_width - bbox[0]
|
||||||
|
text_y = -bbox[1]
|
||||||
|
layer_draw.text(
|
||||||
|
(text_x, text_y),
|
||||||
|
text,
|
||||||
|
font=font,
|
||||||
|
fill=fill,
|
||||||
|
stroke_width=stroke_width,
|
||||||
|
stroke_fill=fill,
|
||||||
|
)
|
||||||
|
|
||||||
|
alpha_bbox = layer.getbbox()
|
||||||
|
if alpha_bbox:
|
||||||
|
layer = layer.crop(alpha_bbox)
|
||||||
|
|
||||||
|
if synthetic_italic:
|
||||||
|
shear_extra = math.ceil(italic_shear * layer.height)
|
||||||
|
layer = layer.transform(
|
||||||
|
(layer.width + shear_extra, layer.height),
|
||||||
|
Image.Transform.AFFINE,
|
||||||
|
(1, -italic_shear, 0, 0, 1, 0),
|
||||||
|
resample=Image.Resampling.BICUBIC,
|
||||||
|
)
|
||||||
|
|
||||||
|
advance = font.getlength(text) + 2 * stroke_width
|
||||||
|
if synthetic_italic:
|
||||||
|
advance += math.ceil(italic_shear * font_size)
|
||||||
|
|
||||||
|
return layer, advance
|
||||||
|
|
||||||
|
# Draw each line using its measured width to position left, center, or right.
|
||||||
|
y = padding
|
||||||
|
for line in lines:
|
||||||
|
line_width = chars_width(line)
|
||||||
|
|
||||||
|
if align == "center":
|
||||||
|
x = padding + (max_text_width - line_width) / 2
|
||||||
|
elif align == "right":
|
||||||
|
x = padding + max_text_width - line_width
|
||||||
|
else:
|
||||||
|
x = padding
|
||||||
|
|
||||||
|
for style, run_text in grouped_runs(line):
|
||||||
|
run_image, advance = render_run(style, run_text)
|
||||||
|
image.alpha_composite(run_image, (round(x), y))
|
||||||
|
x += advance
|
||||||
|
|
||||||
|
y += line_height + line_spacing
|
||||||
|
|
||||||
|
# Convert to RGB so backgrounds like named colors save consistently as PNG.
|
||||||
|
image = image.convert("RGB")
|
||||||
|
|
||||||
|
upload_dir = Path(output_dir)
|
||||||
|
upload_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
image_path = upload_dir / f"{uuid4().hex}.png"
|
||||||
|
image.save(image_path, format="PNG")
|
||||||
|
|
||||||
|
return str(image_path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def _resize_image(
|
||||||
|
self,
|
||||||
|
label_type: str,
|
||||||
|
image_path: str,
|
||||||
|
device_pixel_width: int,
|
||||||
|
printer_model: object,
|
||||||
|
):
|
||||||
|
# """
|
||||||
|
# Resize an image to the specs needed for a label. Only used in Brother printers
|
||||||
|
# """
|
||||||
|
|
||||||
|
# self.app.logger.debug("Resizing the image from %s", image_path)
|
||||||
|
|
||||||
|
# label_specs = LabelsManager().get_label_by_identifier(label_type)
|
||||||
|
|
||||||
|
# right_margin_dots = label_specs.offset_r
|
||||||
|
# model_obj = ModelsManager().get_model_by_identifier(printer_model)
|
||||||
|
# right_margin_dots += model_obj.additional_offset_r
|
||||||
|
# max_image_dimension = label_specs.dots_printable
|
||||||
|
|
||||||
|
# self.app.logger.debug("Found label %s with maximum dimensions %s", label_type, max_image_dimension)
|
||||||
|
|
||||||
|
# # Open image
|
||||||
|
# with Image.open(image_path ) as img:
|
||||||
|
# self.app.logger.debug("Image current dimensions before resizing are %s", img.size)
|
||||||
|
|
||||||
|
# # Fit inside the label dimensions while preserving aspect ratio.
|
||||||
|
# max_width = max_image_dimension[0]
|
||||||
|
# max_height = max_image_dimension[1]
|
||||||
|
# img = ImageOps.contain(
|
||||||
|
# img,
|
||||||
|
# (max_width, max_height),
|
||||||
|
# method=Image.Resampling.LANCZOS,
|
||||||
|
# )
|
||||||
|
|
||||||
|
# # Create a new image of the correct dimensions
|
||||||
|
# new_im = Image.new(
|
||||||
|
# img.mode,
|
||||||
|
# (device_pixel_width, max_image_dimension[1]),
|
||||||
|
# (255,) * len(img.mode),
|
||||||
|
# )
|
||||||
|
|
||||||
|
# # Set image position
|
||||||
|
# x = max(0, device_pixel_width - img.size[0] - right_margin_dots)
|
||||||
|
|
||||||
|
# # Paste the resized image into the new image
|
||||||
|
# new_im.paste(img, (x, 0))
|
||||||
|
|
||||||
|
# # Replace the original image
|
||||||
|
# img = new_im
|
||||||
|
|
||||||
|
# # Set path for the image
|
||||||
|
# jpeg_path = os.path.splitext(image_path)[0] + "_resized.jpg"
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# img.save(jpeg_path, format="JPEG", quality=95, optimize=True)
|
||||||
|
# except OSError as e:
|
||||||
|
# self.app.logger.debug("Error while saving the rised image ! %s", str(e))
|
||||||
|
# raise e
|
||||||
|
# # end try
|
||||||
|
# return jpeg_path
|
||||||
|
pass
|
||||||
+182
-36
@@ -1,7 +1,8 @@
|
|||||||
"""
|
"""
|
||||||
Welcome to the LittlePrynter's source code.
|
Welcome to the LittlePrynter's source code.
|
||||||
This program expose a web interface, with user authentification,
|
This program expose a web interface,
|
||||||
that makes it possible to print messages from the web.
|
that makes it possible to print messages from the web.
|
||||||
|
|
||||||
It also exposes a API, making it possible to print and interface
|
It also exposes a API, making it possible to print and interface
|
||||||
with much of the printer's abilities.
|
with much of the printer's abilities.
|
||||||
|
|
||||||
@@ -10,18 +11,21 @@ Then we build the API around Flask,
|
|||||||
Then we build the web interface, using the simple Jinja2 templating.
|
Then we build the web interface, using the simple Jinja2 templating.
|
||||||
|
|
||||||
We support two modes :
|
We support two modes :
|
||||||
|
|
||||||
The first is a simple mode, where a computer, connected to a thermal printer,
|
The first is a simple mode, where a computer, connected to a thermal printer,
|
||||||
runs this program and exposes a web interface that makes use of the client's camera
|
runs this program and exposes a web interface that makes use of the client's camera
|
||||||
The seconde is booth mode, where a Raspberry Pi is connected to a thermal printer,
|
|
||||||
a button and a flash.
|
The seconde is booth mode, where a Raspberry Pi is connected to
|
||||||
The web interface exists but may not be used, as the press of the button with take
|
a thermal printer, a button and a flash.
|
||||||
a picture and activate the flash while simply informing the web page.
|
The web interface exists but it's not needed, as the press of the button
|
||||||
|
takes a picture and activates the flash while simply informing the web page.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Following are the librairies we import,
|
# Following are the librairies we import,
|
||||||
import sys
|
import sys
|
||||||
import os # For VARS from the shell.
|
import os # For VARS from the shell.
|
||||||
import pprint # To pretty print JSON
|
import pprint # To pretty print JSON
|
||||||
|
import threading
|
||||||
import toml # Used for the config file parsing
|
import toml # Used for the config file parsing
|
||||||
from flask import (
|
from flask import (
|
||||||
Flask,
|
Flask,
|
||||||
@@ -36,10 +40,35 @@ import werkzeug.exceptions
|
|||||||
from flask_socketio import SocketIO
|
from flask_socketio import SocketIO
|
||||||
from flask_limiter import Limiter
|
from flask_limiter import Limiter
|
||||||
from flask_limiter.util import get_remote_address
|
from flask_limiter.util import get_remote_address
|
||||||
|
from logging.config import dictConfig
|
||||||
from raspberry import Raspberry # The Raspberry pi control Class
|
from raspberry import Raspberry # The Raspberry pi control Class
|
||||||
from web import Web # Wrapper for the web routes and API
|
from web import Web # Wrapper for the web routes and API
|
||||||
from print_queue import PrintQueue
|
from print_queue import PrintQueue
|
||||||
from worker import PrintWorker
|
from worker import PrintWorker
|
||||||
|
from printers import Printers
|
||||||
|
|
||||||
|
# Logging configuration
|
||||||
|
|
||||||
|
|
||||||
|
dictConfig(
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"formatters": {
|
||||||
|
"default": {
|
||||||
|
"format": "[%(levelname)s] \033[1m%(message)s\033[0m \033[2m(%(filename)s:%(lineno)d)\033[0m",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers": {
|
||||||
|
"wsgi": {
|
||||||
|
"class": "logging.StreamHandler",
|
||||||
|
"stream": "ext://flask.logging.wsgi_errors_stream",
|
||||||
|
"formatter": "default",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {"level": "INFO", "handlers": ["wsgi"]},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# We create the main Flask object
|
# We create the main Flask object
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
@@ -90,44 +119,61 @@ if not os.getenv("FLASK_DEBUG") is None and os.getenv("FLASK_DEBUG") is True:
|
|||||||
app.secret_key = configuration_file["secrets"]["flask_secret_key"]
|
app.secret_key = configuration_file["secrets"]["flask_secret_key"]
|
||||||
app.config["UPLOAD_FOLDER"] = UPLOAD_FOLDER
|
app.config["UPLOAD_FOLDER"] = UPLOAD_FOLDER
|
||||||
app.config["ALLOWED_EXTENSIONS"] = ALLOWED_EXTENSIONS
|
app.config["ALLOWED_EXTENSIONS"] = ALLOWED_EXTENSIONS
|
||||||
app.config["MAX_CONTENT_LENGTH"] = 10 * 1000 * 1000 # Maximum 10Mb for a file upload
|
app.config["MAX_CONTENT_LENGTH"] = 30 * 1000 * 1000 # Maximum 10Mb for a file upload
|
||||||
app.config["TEMPLATES_AUTO_RELOAD"] = True
|
app.config["TEMPLATES_AUTO_RELOAD"] = True
|
||||||
|
|
||||||
|
main_lock = threading.Lock()
|
||||||
|
|
||||||
# Queue creation
|
# Queue creation
|
||||||
print_queue = PrintQueue(app)
|
print_queue = PrintQueue(app)
|
||||||
|
|
||||||
# Find out if we are running on a Raspberry Pi
|
# Find out if we are running on a Raspberry Pi
|
||||||
rpi = Raspberry(
|
rpi = Raspberry(print_queue, app, configuration_file)
|
||||||
print_queue,
|
|
||||||
app,
|
|
||||||
configuration_file
|
|
||||||
)
|
|
||||||
RASPBERRY_PI_CONNECTED = rpi.is_raspberry_pi()
|
RASPBERRY_PI_CONNECTED = rpi.is_raspberry_pi()
|
||||||
|
|
||||||
|
|
||||||
# Web & API management
|
# Web & API management
|
||||||
web = Web(app, print_queue)
|
web = Web(app, print_queue)
|
||||||
|
|
||||||
# Start worker thread
|
# Create a pool of printers
|
||||||
# When created, the worker will try to find printers connected to the system
|
|
||||||
try:
|
try:
|
||||||
worker = PrintWorker(app, print_queue)
|
# comment: Find all printers connected to the system
|
||||||
worker.start()
|
printers_pool = Printers(app, configuration_file, main_lock)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
app.logger.error("Could not create a pool of printers because %s", str(e))
|
||||||
|
sys.exit(-1)
|
||||||
|
# end try
|
||||||
|
|
||||||
|
# Start worker thread
|
||||||
|
workers = set()
|
||||||
|
for i in range(len(printers_pool)):
|
||||||
|
try:
|
||||||
|
worker = PrintWorker(
|
||||||
|
app, print_queue, printers_pool=printers_pool, printer_index=i
|
||||||
|
)
|
||||||
|
workers.add(worker)
|
||||||
|
worker.start()
|
||||||
|
except Exception as e:
|
||||||
app.logger.error("Could not start the worker because %s ", str(e))
|
app.logger.error("Could not start the worker because %s ", str(e))
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
# The rate limit
|
for i in threading.enumerate():
|
||||||
limiter = Limiter(
|
app.logger.debug(i)
|
||||||
get_remote_address, app=app, default_limits=["1500 per day", "500 per hour"]
|
|
||||||
|
app.logger.info(
|
||||||
|
"\n\n\t\033[36m🖶\033[0m \033[93m🖶\033[0m \033[95m🖶\033[0m \033[97mWelcome to LittlePrynter !\n\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
app.logger.info("🖶 Welcome to LittlePrynter !")
|
# The rate limit
|
||||||
|
limiter = Limiter(
|
||||||
|
get_remote_address, app=app, default_limits=["104800 per day", "10200 per hour"]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# General routes
|
# General routes
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
@limiter.limit("1/second", override_defaults=False)
|
@limiter.limit("5/second", override_defaults=False)
|
||||||
def index():
|
def index():
|
||||||
"""Return the web interface index"""
|
"""Return the web interface index"""
|
||||||
app.logger.debug("Loading index")
|
app.logger.debug("Loading index")
|
||||||
@@ -135,13 +181,29 @@ def index():
|
|||||||
|
|
||||||
|
|
||||||
@app.route("/webcam")
|
@app.route("/webcam")
|
||||||
@limiter.limit("1/second", override_defaults=False)
|
@limiter.limit("5/second", override_defaults=False)
|
||||||
def webcam():
|
def webcam():
|
||||||
"""Returns the webcam web interface"""
|
"""Returns the webcam web interface"""
|
||||||
app.logger.debug("Loading webcam interface")
|
app.logger.debug("Loading webcam interface")
|
||||||
return render_template("webcam.html")
|
return render_template("webcam.html")
|
||||||
|
|
||||||
|
|
||||||
|
# General routes
|
||||||
|
@app.route("/queue")
|
||||||
|
@limiter.limit("5/second", override_defaults=False)
|
||||||
|
def queue():
|
||||||
|
"""Return the web interface index"""
|
||||||
|
app.logger.debug("Loading queue")
|
||||||
|
current_queue = print_queue.get_queue_state()
|
||||||
|
completed_queue = print_queue.get_queue_completed()
|
||||||
|
return render_template(
|
||||||
|
"queue.html",
|
||||||
|
tasks=current_queue,
|
||||||
|
completed_tasks=completed_queue,
|
||||||
|
worker_state=worker.current_state(),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Form treatement
|
# Form treatement
|
||||||
@app.route("/web/print/sms", methods=["POST"])
|
@app.route("/web/print/sms", methods=["POST"])
|
||||||
@limiter.limit("6/minute", override_defaults=False)
|
@limiter.limit("6/minute", override_defaults=False)
|
||||||
@@ -164,9 +226,29 @@ def web_print_sms():
|
|||||||
"No signature found for this print, using default signature : %s ", str(e)
|
"No signature found for this print, using default signature : %s ", str(e)
|
||||||
)
|
)
|
||||||
sign = configuration_file["defaults"]["signature"]
|
sign = configuration_file["defaults"]["signature"]
|
||||||
|
try:
|
||||||
|
do_cut = bool(request.form["cut"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
do_cut = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
web.print_sms(txt, sign)
|
# Clamp value between 1 and
|
||||||
|
many = max(1, min(int(request.form["many"]), 20))
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
many = 1
|
||||||
|
|
||||||
|
try:
|
||||||
|
align = str(request.form["text_align"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
align = "center"
|
||||||
|
|
||||||
|
try:
|
||||||
|
font_size = int(request.form["font_size"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
font_size = 20
|
||||||
|
|
||||||
|
try:
|
||||||
|
web.print_sms(txt, sign, do_cut, align=align, font_size=font_size)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
app.logger.error("Whoops, we could not print an SMS because : %s ", str(e))
|
app.logger.error("Whoops, we could not print an SMS because : %s ", str(e))
|
||||||
flash("Whoops, we could not print an SMS because :" + str(e), "error")
|
flash("Whoops, we could not print an SMS because :" + str(e), "error")
|
||||||
@@ -210,9 +292,25 @@ def web_print_img():
|
|||||||
flash("Submitted file has no filename !", "error")
|
flash("Submitted file has no filename !", "error")
|
||||||
return redirect(url_for("index"))
|
return redirect(url_for("index"))
|
||||||
|
|
||||||
|
try:
|
||||||
|
do_cut = bool(request.form["cut"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
do_cut = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
process_image = bool(request.form["process"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
process_image = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Clamp value between 1 and
|
||||||
|
many = max(1, min(int(request.form["many"]), 20))
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
many = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
app.logger.debug("Sending the image to the printer.")
|
app.logger.debug("Sending the image to the printer.")
|
||||||
web.print_image(file, sign)
|
web.print_image(file, sign, do_cut, process_image, many)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
app.logger.error("The image could not be printed because : %s ", str(e))
|
app.logger.error("The image could not be printed because : %s ", str(e))
|
||||||
flash("The image could not be printed because : " + str(e), "error")
|
flash("The image could not be printed because : " + str(e), "error")
|
||||||
@@ -225,6 +323,8 @@ def web_print_img():
|
|||||||
# API routes
|
# API routes
|
||||||
# The api has the following methods
|
# The api has the following methods
|
||||||
# api/print/{sms,img,letter,qr,barcode}
|
# api/print/{sms,img,letter,qr,barcode}
|
||||||
|
# api/camera/picture
|
||||||
|
# api/queue
|
||||||
# api/auth/{login,logout}
|
# api/auth/{login,logout}
|
||||||
# api/status/{paper,ping,stats}
|
# api/status/{paper,ping,stats}
|
||||||
|
|
||||||
@@ -232,7 +332,7 @@ def web_print_img():
|
|||||||
# If you just call the api route, you get a help back.
|
# If you just call the api route, you get a help back.
|
||||||
@app.route("/api")
|
@app.route("/api")
|
||||||
@app.route("/api/print")
|
@app.route("/api/print")
|
||||||
@limiter.limit("1/second", override_defaults=False)
|
@limiter.limit("6/minute", override_defaults=False)
|
||||||
def api_index():
|
def api_index():
|
||||||
"""Returns a how-to for the API"""
|
"""Returns a how-to for the API"""
|
||||||
app.logger.debug("Loading API")
|
app.logger.debug("Loading API")
|
||||||
@@ -257,9 +357,21 @@ def api_print_sms():
|
|||||||
"No signature found for this print, using default signature. : %s", str(e)
|
"No signature found for this print, using default signature. : %s", str(e)
|
||||||
)
|
)
|
||||||
sign = configuration_file["defaults"]["signature"]
|
sign = configuration_file["defaults"]["signature"]
|
||||||
|
|
||||||
|
try:
|
||||||
|
do_cut = bool(request.form["cut"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
do_cut = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Clamp value between 1 and
|
||||||
|
many = max(1, min(int(request.form["many"]), 20))
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
many = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# comment: We try to print the SMS
|
# comment: We try to print the SMS
|
||||||
web.print_sms(txt, sign)
|
web.print_sms(txt, sign, do_cut, many)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
return str(e), 500
|
return str(e), 500
|
||||||
# end try
|
# end try
|
||||||
@@ -292,9 +404,25 @@ def api_print_image():
|
|||||||
app.logger.error("Submitted file has no filename !")
|
app.logger.error("Submitted file has no filename !")
|
||||||
return "Submitted file has no filename !", 400
|
return "Submitted file has no filename !", 400
|
||||||
|
|
||||||
|
try:
|
||||||
|
do_cut = bool(request.form["cut"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
do_cut = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
process_image = bool(request.form["process"])
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
process_image = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Clamp value between 1 and
|
||||||
|
many = max(1, min(int(request.form["many"]), 20))
|
||||||
|
except werkzeug.exceptions.BadRequestKeyError:
|
||||||
|
many = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
app.logger.debug("Sending the image to the printer.")
|
app.logger.debug("Sending the image to the printer.")
|
||||||
web.print_image(file, sign)
|
web.print_image(file, sign, do_cut, process_image, many)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
return str(e), 500
|
return str(e), 500
|
||||||
|
|
||||||
@@ -303,6 +431,7 @@ def api_print_image():
|
|||||||
|
|
||||||
# TODO: This might not depend on the Raspberry Pi
|
# TODO: This might not depend on the Raspberry Pi
|
||||||
@app.route("/api/camera/picture", methods=["GET"])
|
@app.route("/api/camera/picture", methods=["GET"])
|
||||||
|
@limiter.limit("6/minute")
|
||||||
def camera_picture():
|
def camera_picture():
|
||||||
"""Returns a picture taken by the camera on a raspberry pi"""
|
"""Returns a picture taken by the camera on a raspberry pi"""
|
||||||
if RASPBERRY_PI_CONNECTED:
|
if RASPBERRY_PI_CONNECTED:
|
||||||
@@ -315,39 +444,56 @@ def camera_picture():
|
|||||||
|
|
||||||
|
|
||||||
@app.route("/api/queue", methods=["GET"])
|
@app.route("/api/queue", methods=["GET"])
|
||||||
|
@limiter.limit("160/minute", override_defaults=True)
|
||||||
def api_queue_status():
|
def api_queue_status():
|
||||||
"""API endpoint for entire queue"""
|
"""API endpoint for entire queue"""
|
||||||
return jsonify(web.get_queue_state())
|
return jsonify(web.get_queue_state())
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/queue/completed", methods=["GET"])
|
@app.route("/api/queue/completed", methods=["GET"])
|
||||||
|
@limiter.limit("160/minute", override_defaults=True)
|
||||||
def api_queue_completed():
|
def api_queue_completed():
|
||||||
"""API endpoint that returns the finished tasks"""
|
"""API endpoint that returns the finished tasks"""
|
||||||
return jsonify(web.get_queue_completed())
|
return jsonify(web.get_queue_completed())
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/worker", methods=["GET"])
|
@app.route("/api/workers", methods=["GET"])
|
||||||
|
@limiter.limit("160/minute", override_defaults=True)
|
||||||
def api_worker_state():
|
def api_worker_state():
|
||||||
"""API endpoint to get the worker state"""
|
"""API endpoint to get the worker state"""
|
||||||
return jsonify(worker.current_state())
|
return jsonify([w.current_state() for w in workers])
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/worker/start")
|
# TODO : Auth
|
||||||
|
@app.route("/api/workers/start")
|
||||||
|
@limiter.limit("6/minute")
|
||||||
def api_worker_start():
|
def api_worker_start():
|
||||||
"""
|
"""
|
||||||
Enable to worker. This starts to process the print queue.
|
Start workers. This starts to process the print queue.
|
||||||
"""
|
"""
|
||||||
worker.start_worker()
|
for w in workers:
|
||||||
return jsonify(worker.current_state())
|
w.start_worker()
|
||||||
|
return jsonify([w.current_state() for w in workers])
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/worker/stop")
|
# TODO : Auth
|
||||||
|
@app.route("/api/workers/stop")
|
||||||
|
@limiter.limit("6/minute")
|
||||||
def api_worker_stop():
|
def api_worker_stop():
|
||||||
"""
|
"""
|
||||||
Stops the print queue. This stops the processing of the print queue.
|
Stops workers. This stops the processing of the print queue.
|
||||||
"""
|
"""
|
||||||
worker.stop_worker()
|
for w in list(workers):
|
||||||
return jsonify(worker.current_state())
|
w.stop_worker()
|
||||||
|
return jsonify([w.current_state() for w in workers])
|
||||||
|
|
||||||
|
|
||||||
|
# TODO : Auth
|
||||||
|
@app.route("/api/printers")
|
||||||
|
@limiter.limit("160/minute", override_defaults=True)
|
||||||
|
def api_printers_info():
|
||||||
|
"""Returns the current state of every printers"""
|
||||||
|
return jsonify(printers_pool.printers_info())
|
||||||
|
|
||||||
|
|
||||||
## Authentification
|
## Authentification
|
||||||
|
|||||||
+17
-25
@@ -28,6 +28,7 @@ class PrintQueue:
|
|||||||
self.app.logger.debug("Created a new PrintQueue")
|
self.app.logger.debug("Created a new PrintQueue")
|
||||||
|
|
||||||
def __len__(self) -> int:
|
def __len__(self) -> int:
|
||||||
|
with self._lock:
|
||||||
return len(self._queue)
|
return len(self._queue)
|
||||||
|
|
||||||
def enqueue(self, task):
|
def enqueue(self, task):
|
||||||
@@ -57,40 +58,37 @@ class PrintQueue:
|
|||||||
"""Get current position of task in queue (1-indexed)"""
|
"""Get current position of task in queue (1-indexed)"""
|
||||||
with self._lock:
|
with self._lock:
|
||||||
if task.task_id in self._completed_tasks:
|
if task.task_id in self._completed_tasks:
|
||||||
return None # Task already completed
|
return None
|
||||||
|
|
||||||
try:
|
|
||||||
# Try to get the position of a Task
|
|
||||||
return self._queue.index(task)
|
return self._queue.index(task)
|
||||||
except ValueError as e:
|
|
||||||
raise e
|
|
||||||
# end try
|
|
||||||
|
|
||||||
def is_empty(self):
|
def is_empty(self):
|
||||||
"""Check if queue is empty"""
|
"""Check if queue is empty"""
|
||||||
with self._lock:
|
with self._lock:
|
||||||
self.app.logger.debug("Checking if queue is empty")
|
self.app.logger.debug("Checking if queue is empty")
|
||||||
return len(self._queue) == 0
|
return not self._queue
|
||||||
|
|
||||||
def get_queue_state(self):
|
def get_queue_state(self):
|
||||||
"""Return current queue state"""
|
"""Return current queue state"""
|
||||||
with self._lock:
|
with self._lock:
|
||||||
self.app.logger.debug("Return current queue state")
|
tasks = list(self._queue)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{"task_id": t.task_id, "status": t.status, "type": str(t.task_type), "content": str(t.get_print_data())}
|
{
|
||||||
for t in self._queue
|
"task_id": task.task_id,
|
||||||
|
"status": task.status,
|
||||||
|
"type": str(task.task_type),
|
||||||
|
"content": task.get_print_data(),
|
||||||
|
}
|
||||||
|
for task in tasks
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_queue_completed(self):
|
def get_queue_completed(self):
|
||||||
"""Return completed queue elements"""
|
"""Return completed queue elements"""
|
||||||
with self._lock:
|
|
||||||
self.app.logger.debug("Return completed queue elements")
|
self.app.logger.debug("Return completed queue elements")
|
||||||
return self._completed_tasks
|
return self._completed_tasks
|
||||||
|
|
||||||
def get_status(self, task_id):
|
def get_status(self, task_id):
|
||||||
"""Get full status info for a task"""
|
"""Get full status info for a task"""
|
||||||
with self._lock:
|
|
||||||
|
|
||||||
if task_id in self._completed_tasks:
|
if task_id in self._completed_tasks:
|
||||||
return self._completed_tasks[task_id]
|
return self._completed_tasks[task_id]
|
||||||
|
|
||||||
@@ -107,6 +105,7 @@ class PrintQueue:
|
|||||||
"in_queue": True,
|
"in_queue": True,
|
||||||
"content": task.content,
|
"content": task.content,
|
||||||
"signature": task.signature,
|
"signature": task.signature,
|
||||||
|
"log": task.log,
|
||||||
}
|
}
|
||||||
|
|
||||||
if task.task_type == TaskType.TEXT:
|
if task.task_type == TaskType.TEXT:
|
||||||
@@ -119,21 +118,13 @@ class PrintQueue:
|
|||||||
"image_path": str(task.image_path),
|
"image_path": str(task.image_path),
|
||||||
"signature": task.signature,
|
"signature": task.signature,
|
||||||
"process": str(task.process),
|
"process": str(task.process),
|
||||||
}
|
"log": task.log,
|
||||||
|
|
||||||
if task.task_type == TaskType.CUT:
|
|
||||||
return {
|
|
||||||
"task_id": task_id,
|
|
||||||
"status": task.status,
|
|
||||||
"type": task.task_type,
|
|
||||||
"position": index,
|
|
||||||
"in_queue": True,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def mark_completed(self, task_id, task_status):
|
def mark_completed(self, task_id, task_status, log=None):
|
||||||
"""Mark task as completed and remove from queue"""
|
"""Record a terminal task status."""
|
||||||
with self._lock:
|
with self._lock:
|
||||||
self._completed_tasks[task_id] = {
|
self._completed_tasks[task_id] = {
|
||||||
"task_id": task_id,
|
"task_id": task_id,
|
||||||
@@ -141,4 +132,5 @@ class PrintQueue:
|
|||||||
"position": None,
|
"position": None,
|
||||||
"in_queue": False,
|
"in_queue": False,
|
||||||
"completed_at": datetime.now().isoformat(),
|
"completed_at": datetime.now().isoformat(),
|
||||||
|
"log": log,
|
||||||
}
|
}
|
||||||
+297
-204
@@ -9,19 +9,25 @@ from dataclasses import dataclass
|
|||||||
import time
|
import time
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
import uuid
|
import uuid
|
||||||
import threading
|
|
||||||
import usb.core
|
import usb.core
|
||||||
from PIL import Image, ImageEnhance
|
|
||||||
import numpy as np
|
from PIL import Image
|
||||||
|
|
||||||
# Importing the modules needed for each supported printer Type
|
# Importing the modules needed for each supported printer Type
|
||||||
import escpos.printer
|
import escpos.printer
|
||||||
from brother_ql.models import ModelsManager
|
from brother_ql.models import ModelsManager
|
||||||
from brother_ql.backends import backend_factory
|
from brother_ql.labels import LabelsManager, FormFactor
|
||||||
|
from brother_ql.backends import backend_factory, guess_backend
|
||||||
from brother_ql.raster import BrotherQLRaster
|
from brother_ql.raster import BrotherQLRaster
|
||||||
from brother_ql.conversion import convert
|
from brother_ql.conversion import convert
|
||||||
from brother_ql.backends.helpers import send
|
from brother_ql.backends.helpers import send
|
||||||
|
from brother_ql import create_label
|
||||||
|
|
||||||
|
# Used for typing
|
||||||
|
from task import PrintTask
|
||||||
|
|
||||||
|
# Image processing functions
|
||||||
|
from images import process_image, text_to_image
|
||||||
|
|
||||||
class PrinterType(Enum):
|
class PrinterType(Enum):
|
||||||
"""
|
"""
|
||||||
@@ -38,6 +44,7 @@ class PrinterInfo:
|
|||||||
"""
|
"""
|
||||||
Brother-QL printer information
|
Brother-QL printer information
|
||||||
"""
|
"""
|
||||||
|
|
||||||
identifier: str
|
identifier: str
|
||||||
backend: str
|
backend: str
|
||||||
protocol: str
|
protocol: str
|
||||||
@@ -74,7 +81,6 @@ class Printer(ABC):
|
|||||||
self.device_id = device_id
|
self.device_id = device_id
|
||||||
self.ready = False
|
self.ready = False
|
||||||
self.printer_type = printer_type
|
self.printer_type = printer_type
|
||||||
self._lock = threading.Lock()
|
|
||||||
self.used = False
|
self.used = False
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@@ -86,23 +92,24 @@ class Printer(ABC):
|
|||||||
"""Reports the state of the Printer"""
|
"""Reports the state of the Printer"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def print_task(self, task_type, data) -> None:
|
def print_task(self, task: PrintTask, data) -> None:
|
||||||
"""Takes a PrintTask and executes it"""
|
"""Takes a PrintTask and executes it"""
|
||||||
|
|
||||||
def use_printer(self) -> None:
|
def use_printer(self) -> None:
|
||||||
"""Marks the printer as being used """
|
"""Marks the printer as being used"""
|
||||||
self.used = True
|
self.used = True
|
||||||
|
|
||||||
def free_printer(self) -> None:
|
def free_printer(self) -> None:
|
||||||
"""Marks the printer as being not used, it's available."""
|
"""Marks the printer as being not used, it's available."""
|
||||||
self.used = False
|
self.used = False
|
||||||
|
|
||||||
|
|
||||||
class EscPosPrinter(Printer):
|
class EscPosPrinter(Printer):
|
||||||
"""
|
"""
|
||||||
Create a new ESC/POS based printer.
|
Create a new ESC/POS based printer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, app, vendor_id, device_id):
|
def __init__(self, app, vendor_id, device_id, configuration_file):
|
||||||
"""
|
"""
|
||||||
Create a connexion to a ESC/POS Printer via USB,
|
Create a connexion to a ESC/POS Printer via USB,
|
||||||
Making sure the printer is alive,
|
Making sure the printer is alive,
|
||||||
@@ -114,18 +121,23 @@ class EscPosPrinter(Printer):
|
|||||||
self.usb_args = {}
|
self.usb_args = {}
|
||||||
self.usb_args["idVendor"] = self.vendor_id
|
self.usb_args["idVendor"] = self.vendor_id
|
||||||
self.usb_args["idProduct"] = self.device_id
|
self.usb_args["idProduct"] = self.device_id
|
||||||
|
self.configuration_file = configuration_file
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# This also calls open(), which we need to close()
|
# This also calls open(), which we need to close()
|
||||||
# or else the device will appear as busy.
|
# or else the device will appear as busy.
|
||||||
p = escpos.printer.Usb(self.vendor_id, self.device_id, 0, profile="TM-P80")
|
p = escpos.printer.Usb(
|
||||||
|
self.vendor_id, self.device_id, 0, profile=configuration_file["profile"]
|
||||||
|
)
|
||||||
except escpos.exceptions.DeviceNotFoundError as e:
|
except escpos.exceptions.DeviceNotFoundError as e:
|
||||||
self.app.logger.error(
|
self.app.logger.error(
|
||||||
"The USB device is not plugged in : %s",
|
"The USB device is not plugged in : %s",
|
||||||
str(e),
|
str(e),
|
||||||
)
|
)
|
||||||
|
raise e
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error("Printer could not be connected : %s ", str(e))
|
self.app.logger.error("Printer could not be connected : %s ", str(e))
|
||||||
|
raise e
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if p.is_online():
|
if p.is_online():
|
||||||
@@ -133,9 +145,21 @@ class EscPosPrinter(Printer):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
self.printer_info = PrinterInfo(
|
||||||
|
identifier=configuration_file["profile"],
|
||||||
|
backend="pyusb",
|
||||||
|
model=configuration_file["profile"],
|
||||||
|
protocol="ESC/POS",
|
||||||
|
vendor_id=self.vendor_id,
|
||||||
|
product_id=self.device_id,
|
||||||
|
serial_number="",
|
||||||
|
label_type=self.configuration_file["label_type"],
|
||||||
|
)
|
||||||
|
|
||||||
# Setting up the printing options.
|
# Setting up the printing options.
|
||||||
|
# TODO : Expose this to the web interface
|
||||||
p.set(
|
p.set(
|
||||||
align="center",
|
align=self.configuration_file["align_text"],
|
||||||
font="a",
|
font="a",
|
||||||
bold=False,
|
bold=False,
|
||||||
underline=0,
|
underline=0,
|
||||||
@@ -182,8 +206,7 @@ class EscPosPrinter(Printer):
|
|||||||
self.printer.close()
|
self.printer.close()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _print_txt(self, msg, signature="", bold=False):
|
def _print_txt(self, msg, signature="", bold=False, do_cut=False):
|
||||||
self.ready = False
|
|
||||||
if not isinstance(msg, str):
|
if not isinstance(msg, str):
|
||||||
self.app.logger.error(
|
self.app.logger.error(
|
||||||
"It is not possible to print a " + str(type(msg)) + ", only strings."
|
"It is not possible to print a " + str(type(msg)) + ", only strings."
|
||||||
@@ -195,24 +218,25 @@ class EscPosPrinter(Printer):
|
|||||||
clean_signature = str(signature)
|
clean_signature = str(signature)
|
||||||
|
|
||||||
# Make checks on the size of the message being printed
|
# Make checks on the size of the message being printed
|
||||||
if len(clean_msg) > 4096:
|
if len(clean_msg) > int(self.configuration_file["text_max_length"]):
|
||||||
self.app.logger.warning(
|
self.app.logger.warning(
|
||||||
"Could not print message of this length: " + str(len(clean_msg))
|
"Could not print message of this length: " + str(len(clean_msg))
|
||||||
)
|
)
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Could not print message of this length :"
|
"Could not print message of this length :"
|
||||||
+ str(len(clean_msg))
|
+ str(len(clean_msg))
|
||||||
+ ", needs to be below 4096 caracters long."
|
+ ", needs to be below %s caracters long.",
|
||||||
|
str(self.configuration_file["text_max_length"]),
|
||||||
)
|
)
|
||||||
|
if len(signature) > int(self.configuration_file["signature_max_length"]):
|
||||||
if len(signature) > 256:
|
|
||||||
self.app.logger.warning(
|
self.app.logger.warning(
|
||||||
"Could not print signature of this length: " + str(len(clean_signature))
|
"Could not print signature of this length: " + str(len(clean_signature))
|
||||||
)
|
)
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Could not print signature of this length :"
|
"Could not print signature of this length :"
|
||||||
+ str(len(clean_signature))
|
+ str(len(clean_signature))
|
||||||
+ ", needs to be below 256 caracters long."
|
+ ", needs to be below %s caracters long.",
|
||||||
|
str(self.configuration_file["signature_max_length"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Do the actual printing
|
# Do the actual printing
|
||||||
@@ -231,21 +255,24 @@ class EscPosPrinter(Printer):
|
|||||||
"Unable to print a SMS, the printer couldn't do it."
|
"Unable to print a SMS, the printer couldn't do it."
|
||||||
) from e
|
) from e
|
||||||
|
|
||||||
|
if do_cut:
|
||||||
|
self._cut()
|
||||||
|
|
||||||
self.app.logger.info("Printed text")
|
self.app.logger.info("Printed text")
|
||||||
self.ready = True
|
self.ready = True
|
||||||
|
|
||||||
def _print_img(self, path, signature="", center=True, process=False):
|
def _print_img(self, path, signature="", center=True, process=False, do_cut=False):
|
||||||
self.ready = False
|
|
||||||
clean_signature = str(signature)
|
clean_signature = str(signature)
|
||||||
|
|
||||||
if len(signature) > 256:
|
if len(signature) > int(self.configuration_file["signature_max_length"]):
|
||||||
self.app.logger.warning(
|
self.app.logger.warning(
|
||||||
"Could not print signature of this length: " + str(len(clean_signature))
|
"Could not print signature of this length: " + str(len(clean_signature))
|
||||||
)
|
)
|
||||||
raise ValueError(
|
raise RuntimeError(
|
||||||
"Could not print signature of this length :"
|
"Could not print signature of this length :"
|
||||||
+ str(len(clean_signature))
|
+ str(len(clean_signature))
|
||||||
+ ", needs to be below 256 caracters long."
|
+ ", needs to be below %s caracters long.",
|
||||||
|
str(self.configuration_file["signature_max_length"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.isfile(str(path)):
|
if not os.path.isfile(str(path)):
|
||||||
@@ -261,7 +288,7 @@ class EscPosPrinter(Printer):
|
|||||||
if process:
|
if process:
|
||||||
try:
|
try:
|
||||||
self.app.logger.debug("Proccessing the image")
|
self.app.logger.debug("Proccessing the image")
|
||||||
processed_path = _process_image(self, path)
|
processed_path = process_image(self, path)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
self.app.logger.error(
|
self.app.logger.error(
|
||||||
"Error while processing the image, aborting print : %s", str(e)
|
"Error while processing the image, aborting print : %s", str(e)
|
||||||
@@ -280,29 +307,28 @@ class EscPosPrinter(Printer):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error(str(e))
|
self.app.logger.error(str(e))
|
||||||
raise RuntimeError("Could not print the picture") from e
|
raise RuntimeError("Could not print the picture") from e
|
||||||
finally:
|
# finally:
|
||||||
try:
|
# try:
|
||||||
os.remove(path)
|
# os.remove(path)
|
||||||
os.remove(processed_path)
|
# os.remove(processed_path)
|
||||||
except OSError as e:
|
# self.app.logger.debug("Removed image : " + str(processed_path))
|
||||||
raise e
|
# self.app.logger.debug("Removed image : " + str(path))
|
||||||
|
# except OSError as e:
|
||||||
self.app.logger.debug("Removed image : " + str(processed_path))
|
# raise e
|
||||||
self.app.logger.debug("Removed image : " + str(path))
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.printer.close()
|
self.printer.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error(
|
self.app.logger.error("Could not close the printer connexion %s", str(e))
|
||||||
"Could not close the printer connexion %s", str(e)
|
|
||||||
)
|
|
||||||
raise RuntimeError("Could not close the printer connexion. ") from e
|
raise RuntimeError("Could not close the printer connexion. ") from e
|
||||||
|
|
||||||
|
if do_cut:
|
||||||
|
self._cut()
|
||||||
|
|
||||||
self.app.logger.info("Printed a picture")
|
self.app.logger.info("Printed a picture")
|
||||||
self.ready = True
|
self.ready = True
|
||||||
|
|
||||||
def _qr(self, content):
|
def _qr(self, content):
|
||||||
self.ready = False
|
|
||||||
try:
|
try:
|
||||||
self.printer.open(self.usb_args)
|
self.printer.open(self.usb_args)
|
||||||
self.printer.qr(content, center=True)
|
self.printer.qr(content, center=True)
|
||||||
@@ -317,7 +343,6 @@ class EscPosPrinter(Printer):
|
|||||||
self.ready = True
|
self.ready = True
|
||||||
|
|
||||||
def _cut(self):
|
def _cut(self):
|
||||||
self.ready = False
|
|
||||||
try:
|
try:
|
||||||
self.printer.open(self.usb_args)
|
self.printer.open(self.usb_args)
|
||||||
self.printer.cut()
|
self.printer.cut()
|
||||||
@@ -334,21 +359,20 @@ class EscPosPrinter(Printer):
|
|||||||
has_paper = self._has_paper()
|
has_paper = self._has_paper()
|
||||||
is_ready = self.ready
|
is_ready = self.ready
|
||||||
|
|
||||||
self.app.logger.debug("Has paper : %s " , has_paper )
|
self.app.logger.debug("Has paper : %s ", has_paper)
|
||||||
self.app.logger.debug("Ready : %s " , is_ready )
|
self.app.logger.debug("Ready : %s ", is_ready)
|
||||||
|
|
||||||
return is_ready and has_paper # and is_online
|
return is_ready and has_paper # and is_online
|
||||||
|
|
||||||
def print_task(self, task_type, data):
|
def print_task(self, task, data):
|
||||||
"""Execute actual print based on task type"""
|
"""Execute actual print based on task type"""
|
||||||
|
|
||||||
|
|
||||||
with self._lock:
|
|
||||||
self.app.logger.debug("Acquired lock to start print")
|
|
||||||
|
|
||||||
i_m_ready = self._state()
|
i_m_ready = self._state()
|
||||||
while not i_m_ready:
|
while not i_m_ready:
|
||||||
self.app.logger.debug("Waiting for the printer to become ready, current state %s ", str(i_m_ready))
|
self.app.logger.debug(
|
||||||
|
"Waiting for the printer to become ready, current state %s ",
|
||||||
|
str(i_m_ready),
|
||||||
|
)
|
||||||
i_m_ready = self._state()
|
i_m_ready = self._state()
|
||||||
time.sleep(0.3)
|
time.sleep(0.3)
|
||||||
|
|
||||||
@@ -356,19 +380,21 @@ class EscPosPrinter(Printer):
|
|||||||
self.ready = False
|
self.ready = False
|
||||||
try:
|
try:
|
||||||
self.app.logger.debug("Checking task type")
|
self.app.logger.debug("Checking task type")
|
||||||
match (task_type.value):
|
match (task.task_type.value):
|
||||||
case "text":
|
case "text":
|
||||||
|
|
||||||
self._print_txt(data["txt"], signature=data["sign"])
|
self._print_txt(
|
||||||
|
data["txt"], signature=data["sign"], do_cut=data["do_cut"]
|
||||||
|
)
|
||||||
self.ready = True
|
self.ready = True
|
||||||
case "image":
|
case "image":
|
||||||
self._print_img(
|
self._print_img(
|
||||||
data["img"], signature=data["sign"], process=data["process"]
|
data["img"],
|
||||||
|
signature=data["sign"],
|
||||||
|
process=data["process"],
|
||||||
|
do_cut=data["do_cut"],
|
||||||
)
|
)
|
||||||
self.ready = True
|
self.ready = True
|
||||||
case "cut":
|
|
||||||
self._cut()
|
|
||||||
self.ready = True
|
|
||||||
case "qr":
|
case "qr":
|
||||||
self._qr(data["txt"])
|
self._qr(data["txt"])
|
||||||
self.ready = True
|
self.ready = True
|
||||||
@@ -385,52 +411,86 @@ class BrotherPrinter(Printer):
|
|||||||
Manages connexion and capabilities of a BrotherQL Printer
|
Manages connexion and capabilities of a BrotherQL Printer
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, app, vendor_id, device_id):
|
def __init__(self, app, vendor_id, device_id, configuration_file):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
app, vendor_id, device_id, printer_type=PrinterType.BROTHER
|
app,
|
||||||
|
vendor_id,
|
||||||
|
device_id,
|
||||||
|
printer_type=PrinterType.BROTHER,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.printer = None
|
self.printer = None
|
||||||
self.usb_args = {}
|
self.usb_args = {
|
||||||
self.usb_args["idVendor"] = self.vendor_id
|
"idVendor": self.vendor_id,
|
||||||
self.usb_args["idProduct"] = self.device_id
|
"idProduct": self.device_id,
|
||||||
|
}
|
||||||
self.model_manager = ModelsManager()
|
self.model_manager = ModelsManager()
|
||||||
|
|
||||||
# Code taken from https://github.com/5shekel/printit/blob/master/printer_utils.py
|
# Discover the backend identifier for this specific USB printer.
|
||||||
|
|
||||||
self.app.logger.debug("Creating backend for Brother")
|
self.app.logger.debug("Creating backend for Brother")
|
||||||
backend = backend_factory("pyusb")
|
backend = backend_factory("pyusb")
|
||||||
|
|
||||||
available_devices = backend["list_available_devices"]()
|
available_devices = backend["list_available_devices"]()
|
||||||
|
|
||||||
for printer in available_devices:
|
# Match vendor and product IDs so this instance doesn't accidentally
|
||||||
self.app.logger.debug(f"Found device: {printer}")
|
# use the identifier belonging to the last device in the backend list.
|
||||||
identifier = printer["identifier"]
|
expected_prefix = (f"usb://0x{vendor_id:04x}:0x{device_id:04x}/").lower()
|
||||||
|
|
||||||
|
matching_identifiers = []
|
||||||
|
|
||||||
|
for device in available_devices:
|
||||||
|
self.app.logger.debug("Found device: %s", device)
|
||||||
|
|
||||||
|
identifier = device.get("identifier", "")
|
||||||
parts = identifier.split("/")
|
parts = identifier.split("/")
|
||||||
|
|
||||||
if len(parts) < 4:
|
if len(parts) < 4:
|
||||||
self.app.logger.warning(
|
self.app.logger.warning(
|
||||||
f"Skipping device with invalid identifier format: {identifier}"
|
"Skipping device with invalid identifier format: %s",
|
||||||
|
identifier,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if identifier.lower().startswith(expected_prefix):
|
||||||
|
matching_identifiers.append(identifier)
|
||||||
|
|
||||||
|
if len(matching_identifiers) != 1:
|
||||||
|
self.app.logger.error(
|
||||||
|
"Expected one Brother backend device matching %s, found %s",
|
||||||
|
expected_prefix,
|
||||||
|
len(matching_identifiers),
|
||||||
|
)
|
||||||
|
raise RuntimeError(
|
||||||
|
"Expected one Brother backend device matching %s, found %s" %
|
||||||
|
expected_prefix,
|
||||||
|
len(matching_identifiers),
|
||||||
|
)
|
||||||
|
|
||||||
|
# Extract connection details from the identifier for this printer only.
|
||||||
|
identifier = matching_identifiers[0]
|
||||||
|
parts = identifier.split("/")
|
||||||
protocol = parts[0]
|
protocol = parts[0]
|
||||||
# device_info = parts[2]
|
|
||||||
serial_number = parts[3]
|
serial_number = parts[3]
|
||||||
|
|
||||||
|
# Find the model that corresponds to this printer's product ID.
|
||||||
try:
|
try:
|
||||||
for m in self.model_manager.iter_elements():
|
model = None
|
||||||
if m.product_id == self.device_id:
|
for item in self.model_manager.iter_elements():
|
||||||
model = m.identifier
|
if item.product_id == self.device_id:
|
||||||
|
model = item.identifier
|
||||||
break
|
break
|
||||||
|
|
||||||
self.app.logger.debug(f"Matched printer model: {model}")
|
if model is None:
|
||||||
except ValueError as ve:
|
raise RuntimeError(
|
||||||
self.app.logger.warning("Invalid product ID format:"+ str(ve))
|
f"No Brother model found for product ID {self.device_id:#06x}"
|
||||||
raise ve
|
)
|
||||||
except Exception as e:
|
|
||||||
self.app.logger.error("Error while finding a model ? : " + str(e))
|
self.app.logger.debug("Matched printer model: %s", model)
|
||||||
raise e
|
except Exception:
|
||||||
|
self.app.logger.exception(
|
||||||
|
"Error while finding a model for product ID %s",
|
||||||
|
self.device_id,
|
||||||
|
)
|
||||||
|
raise
|
||||||
|
|
||||||
self.printer_info = PrinterInfo(
|
self.printer_info = PrinterInfo(
|
||||||
identifier=identifier,
|
identifier=identifier,
|
||||||
@@ -440,8 +500,11 @@ class BrotherPrinter(Printer):
|
|||||||
vendor_id=vendor_id,
|
vendor_id=vendor_id,
|
||||||
product_id=self.device_id,
|
product_id=self.device_id,
|
||||||
serial_number=serial_number,
|
serial_number=serial_number,
|
||||||
|
label_type=configuration_file["label_type"],
|
||||||
|
# TODO: Implement automatic label type detection.
|
||||||
)
|
)
|
||||||
self.app.logger.debug("Created a Brother printer !")
|
|
||||||
|
self.app.logger.debug("Created a Brother printer!")
|
||||||
self.ready = True
|
self.ready = True
|
||||||
|
|
||||||
def _has_paper(self):
|
def _has_paper(self):
|
||||||
@@ -450,165 +513,195 @@ class BrotherPrinter(Printer):
|
|||||||
def _state(self):
|
def _state(self):
|
||||||
return self.ready
|
return self.ready
|
||||||
|
|
||||||
def _print_img(self, data):
|
def _print_txt(self, msg, signature="", do_cut=False, align="right",font_size=20):
|
||||||
|
"""Print text after converting it to an image"""
|
||||||
|
|
||||||
|
if signature == "":
|
||||||
|
self._print_img(text_to_image(msg, align=align,font_size=font_size), do_cut=do_cut)
|
||||||
|
else:
|
||||||
|
self._print_img(text_to_image(msg, align="right",font_size=font_size), signature, do_cut=do_cut)
|
||||||
|
|
||||||
|
def _print_img(self, data, signature="", process=False, do_cut=False):
|
||||||
"""
|
"""
|
||||||
Print a raster image via a Brother QL printer
|
Print a raster image via a Brother QL printer
|
||||||
"""
|
"""
|
||||||
label_type = "102"
|
self.app.logger.debug(
|
||||||
rotate = 0
|
"Printing an image %s via Brother printer ( %s )",
|
||||||
dither = False
|
data,
|
||||||
|
self.printer_info.model,
|
||||||
data = _process_image(self, path=data, max_width=720, max_height=720)
|
)
|
||||||
|
if process:
|
||||||
|
try:
|
||||||
|
self.app.logger.debug("\t[⚙ %s] Proccessing the image", self.id)
|
||||||
|
processed_path = process_image(self, data)
|
||||||
|
except RuntimeError as e:
|
||||||
|
self.app.logger.error(
|
||||||
|
"Error while processing the image, aborting print : %s", str(e)
|
||||||
|
)
|
||||||
|
raise e
|
||||||
|
else:
|
||||||
|
processed_path = data
|
||||||
|
self.app.logger.warning("Not proccessing the image")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Prepare the image for printing
|
selected_backend = guess_backend(self.printer_info.identifier)
|
||||||
qlr = BrotherQLRaster(self.printer_info["model"])
|
BACKEND_CLASS = backend_factory(selected_backend)["backend_class"]
|
||||||
|
BACKEND_STRING_DESCR = self.printer_info.identifier
|
||||||
|
except Exception as e:
|
||||||
|
self.app.logger.error(
|
||||||
|
"Couldn't guess the backend to use from the printer string descriptor"
|
||||||
|
)
|
||||||
|
raise e
|
||||||
|
|
||||||
|
do_cut_before_sign = True if signature != "" and do_cut else False
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
|
qlr = BrotherQLRaster(self.printer_info.model)
|
||||||
|
# Resize the image for the label type
|
||||||
|
# device_pixel_width = qlr.get_pixel_width()
|
||||||
|
# im = _resize_image(
|
||||||
|
# self,
|
||||||
|
# label_type=self.printer_info.label_type, image_path=processed_path,
|
||||||
|
# device_pixel_width=device_pixel_width,
|
||||||
|
# printer_model=qlr.model
|
||||||
|
# )
|
||||||
|
|
||||||
|
im = Image.open(processed_path)
|
||||||
instructions = convert(
|
instructions = convert(
|
||||||
qlr=qlr,
|
qlr=qlr,
|
||||||
images=[data],
|
images=[im],
|
||||||
label=label_type,
|
label=self.printer_info.label_type,
|
||||||
rotate=rotate,
|
dither=True,
|
||||||
threshold=70,
|
compress=False,
|
||||||
dither=dither,
|
|
||||||
compress=True,
|
|
||||||
red=False,
|
|
||||||
dpi_600=False,
|
dpi_600=False,
|
||||||
hq=False,
|
cut=do_cut_before_sign,
|
||||||
cut=True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Debug logging
|
return_from_printer = send(
|
||||||
if os.getenv("FLASK_DEBUG"):
|
|
||||||
self.app.logger.debug(f"""
|
|
||||||
Print parameters:
|
|
||||||
- Label type: {label_type}
|
|
||||||
- Rotate: {rotate}
|
|
||||||
- Dither: {dither}
|
|
||||||
- Model: {self.printer_info['model']}
|
|
||||||
- Backend: {self.printer_info['backend']}
|
|
||||||
- Identifier: {self.printer_info['identifier']}
|
|
||||||
""")
|
|
||||||
|
|
||||||
# Try to print using Python API
|
|
||||||
# send() = status = {
|
|
||||||
# 'instructions_sent': True, # The instructions were sent to the printer.
|
|
||||||
# 'outcome': 'unknown', # String description of the outcome of the sending operation like: 'unknown', 'sent', 'printed', 'error'
|
|
||||||
# 'printer_state': None, # If the selected backend supports reading back the printer state, this key will contain it.
|
|
||||||
# 'did_print': False, # If True, a print was produced. It defaults to False if the outcome is uncertain (due to a backend without read-back capability).
|
|
||||||
# 'ready_for_next_job': False, # If True, the printer is ready to receive the next instructions. It defaults to False if the state is unknown.
|
|
||||||
# }
|
|
||||||
status = send(
|
|
||||||
instructions=instructions,
|
instructions=instructions,
|
||||||
printer_identifier=self.printer_info["identifier"],
|
printer_identifier=BACKEND_STRING_DESCR,
|
||||||
backend_identifier="pyusb",
|
backend_identifier="pyusb",
|
||||||
|
blocking=True,
|
||||||
)
|
)
|
||||||
self.app.logger.debug("Status: " + str(status))
|
|
||||||
|
|
||||||
if (
|
self.app.logger.debug(str(return_from_printer))
|
||||||
not status["did_print"]
|
|
||||||
or status["outcome"] == "error"
|
|
||||||
or status["outcome"] == "unknown"
|
|
||||||
):
|
|
||||||
raise RuntimeError("Failed to print using Python API")
|
|
||||||
|
|
||||||
# if status["printer_state"]:
|
match (return_from_printer.get("outcome")):
|
||||||
# self.ready = bool(status["printer_state"])
|
case ("printed"):
|
||||||
# self.app.logger.debug("Printer is borky : " + str(self.ready))
|
self.app.logger.debug("\t[⚙ %s] Printed image", self.id)
|
||||||
# else:
|
time.sleep(2)
|
||||||
# self.ready = True
|
case ("error"):
|
||||||
|
state = return_from_printer.get("printer_state")
|
||||||
|
errors = [str(error) for error in state.get("errors") if error]
|
||||||
|
raise RuntimeError(errors)
|
||||||
|
case (_):
|
||||||
|
raise RuntimeError("Unknown print error")
|
||||||
|
|
||||||
except usb.core.USBError as e:
|
except usb.core.USBError as e:
|
||||||
# Treat timeout errors as successful since they often occur after print completion
|
if "timeout error" in str(e):
|
||||||
if e.errno == 110: # Operation timed out
|
self.app.logger.error("USB Timeout Error %s", str(e))
|
||||||
self.app.logger.debug(
|
raise e
|
||||||
"USB timeout occurred - this is normal and the print likely completed"
|
|
||||||
)
|
|
||||||
self.app.logger.debug("Print completed (timeout is normal)")
|
|
||||||
self.ready = True
|
|
||||||
|
|
||||||
self.app.logger.debug(f"USBError encountered: {e}")
|
self.app.logger.error("USB Error : %s", str(e))
|
||||||
raise RuntimeError from e
|
raise e
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
self.app.logger.debug(f"Unexpected error during printing: {str(e)}")
|
|
||||||
raise RuntimeError from e
|
|
||||||
|
|
||||||
def print_task(self, task_type, data):
|
|
||||||
"""Execute actual print based on task type"""
|
|
||||||
with self._lock:
|
|
||||||
if self.ready:
|
|
||||||
try:
|
|
||||||
match (task_type.value):
|
|
||||||
case "image":
|
|
||||||
self._print_img(data["img"])
|
|
||||||
case "cut":
|
|
||||||
# The cut happens by default on Brother QL printers.
|
|
||||||
pass
|
|
||||||
case _:
|
|
||||||
raise RuntimeError("This task type is not supported")
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
# end try
|
|
||||||
else:
|
|
||||||
raise RuntimeError("The printer is not ready to print yet !")
|
|
||||||
|
|
||||||
# These values are by default for now
|
if signature != "":
|
||||||
|
self.app.logger.debug("Printing signature for the image %s", data)
|
||||||
|
try:
|
||||||
|
signature_file = text_to_image(signature)
|
||||||
|
im = Image.open(signature_file)
|
||||||
|
qlr = BrotherQLRaster(self.printer_info.model)
|
||||||
|
# create_label(
|
||||||
|
# qlr, im, self.printer_info.label_type, cut=False, dither=True
|
||||||
|
# )
|
||||||
|
|
||||||
# raise NotImplementedError("This printer type is not implemented yet")
|
# noinspection PyCallingNonCallable
|
||||||
|
# be = BACKEND_CLASS(BACKEND_STRING_DESCR)
|
||||||
|
# be.write(qlr.data)
|
||||||
|
# be.dispose()
|
||||||
|
# del be
|
||||||
|
instructions = convert(
|
||||||
|
qlr=qlr,
|
||||||
|
images=[signature_file],
|
||||||
|
label=self.printer_info.label_type,
|
||||||
|
dither=True,
|
||||||
|
compress=False,
|
||||||
|
dpi_600=False,
|
||||||
|
cut=do_cut,
|
||||||
|
)
|
||||||
|
|
||||||
|
success = send(
|
||||||
|
instructions=instructions,
|
||||||
|
printer_identifier=BACKEND_STRING_DESCR,
|
||||||
|
backend_identifier="pyusb",
|
||||||
|
blocking=False,
|
||||||
|
)
|
||||||
|
self.app.logger.debug(str(success))
|
||||||
|
self.app.logger.debug("Printed signature %s", signature)
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
raise e
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
os.remove(signature_file)
|
||||||
|
self.app.logger.debug("Removed image : " + str(signature_file))
|
||||||
|
except OSError as e:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
self.ready = True
|
||||||
|
|
||||||
|
|
||||||
def _process_image(self, path, max_width=575, max_height=1000):
|
def _qr(self):
|
||||||
brightness_factor = 1.5 # Used only if image is too dark
|
# This should not be reached by a print on a BrotherQL
|
||||||
brightness_threshold = 100 # Brightness threshold (0–255)
|
raise NotImplementedError()
|
||||||
contrast_factor = 2 # Less than 1.0 = lower contrast
|
|
||||||
|
|
||||||
with Image.open(path) as original_img:
|
def print_task(self, task, data):
|
||||||
# Convert to RGB if needed (JPEG doesn't support alpha)
|
"""Execute actual print based on task type"""
|
||||||
if original_img.mode in ("RGBA", "P"):
|
i_m_ready = self._state()
|
||||||
self.app.logger.debug("Converting the image from RGBA to RGBA")
|
while not i_m_ready:
|
||||||
original_img = original_img.convert("RGB")
|
|
||||||
|
|
||||||
# Resize while maintaining aspect ratio
|
|
||||||
original_img = original_img.resize((max_width, max_height), Image.Resampling.LANCZOS)
|
|
||||||
self.app.logger.debug("Resized the image")
|
|
||||||
|
|
||||||
# # Convert to grayscale for dithering
|
|
||||||
# dithered_img = original_img.convert("L").convert("1")
|
|
||||||
# Dithering using default method (Floyd–Steinberg)
|
|
||||||
# self.app.logger.debug("Dithered the image")
|
|
||||||
|
|
||||||
# Compute brightness of original image (grayscale average)
|
|
||||||
grayscale = original_img.convert("L")
|
|
||||||
avg_brightness = np.array(grayscale).mean()
|
|
||||||
self.app.logger.debug(
|
self.app.logger.debug(
|
||||||
"Average brightness of the image : " + str(avg_brightness)
|
"\t[⚙ %s] Waiting for the printer to become ready, current state %s ",
|
||||||
|
self.id,
|
||||||
|
str(i_m_ready),
|
||||||
)
|
)
|
||||||
|
i_m_ready = self._state()
|
||||||
|
time.sleep(0.3)
|
||||||
|
|
||||||
# Dynamically compute brightness factor if too dark
|
|
||||||
if avg_brightness < brightness_threshold:
|
|
||||||
brightness_factor = (
|
|
||||||
1 + (brightness_threshold - avg_brightness) / brightness_threshold
|
|
||||||
)
|
|
||||||
brightness_factor = min(
|
|
||||||
max(brightness_factor, 1.1), 2.5
|
|
||||||
) # Clamp between 1.1 and 2.5
|
|
||||||
self.app.logger.debug(
|
self.app.logger.debug(
|
||||||
f"Image too dark, increasing brightness by a factor of {brightness_factor:.2f}"
|
"\t[⚙ %s] Checked state to start printing %s ", self.id, self._state()
|
||||||
)
|
)
|
||||||
enhancer = ImageEnhance.Brightness(grayscale)
|
|
||||||
grayscale = enhancer.enhance(brightness_factor)
|
|
||||||
|
|
||||||
# Computer current contrast of grayscale image
|
self.ready = False
|
||||||
contrast = np.clip(np.std(np.array(grayscale)), 0, 255)
|
|
||||||
self.app.logger.debug("Standard deviation of the contrast : %s", contrast)
|
|
||||||
# # Enhance contrast
|
|
||||||
contrast_enhancer = ImageEnhance.Contrast(grayscale)
|
|
||||||
original_img = contrast_enhancer.enhance(contrast_factor)
|
|
||||||
|
|
||||||
# Convert to JPEG and save
|
try:
|
||||||
jpeg_path = os.path.splitext(path)[0] + "_processed.jpg"
|
match (task.task_type.value):
|
||||||
grayscale.save(jpeg_path, format="JPEG", quality=95, optimize=True)
|
case "image":
|
||||||
self.app.logger.debug("Processed and saved image.")
|
self._print_img(
|
||||||
|
data["img"], signature=data["sign"], do_cut=data["do_cut"]
|
||||||
|
)
|
||||||
|
case "text":
|
||||||
|
self._print_txt(
|
||||||
|
data["txt"], signature=data["sign"], do_cut=data["do_cut"], align=data["align"],font_size=data["font_size"]
|
||||||
|
)
|
||||||
|
case _:
|
||||||
|
raise RuntimeError("This task type is not supported")
|
||||||
|
except ValueError as ve:
|
||||||
|
self.app.logger.error(
|
||||||
|
"\t[⚙ %s] The printer couldn't be found, the printing failed for task %s of type %s , error : %s ",
|
||||||
|
self.id,
|
||||||
|
task.task_id,
|
||||||
|
task.task_type,
|
||||||
|
str(ve),
|
||||||
|
)
|
||||||
|
raise ve
|
||||||
|
except Exception as e:
|
||||||
|
raise e
|
||||||
|
|
||||||
return jpeg_path
|
self.app.logger.debug(
|
||||||
|
"\t[⚙ %s] Finished consuming task %s", self.id, task.task_id
|
||||||
|
)
|
||||||
|
self.ready = True
|
||||||
+101
-46
@@ -17,12 +17,15 @@ class Printers:
|
|||||||
Finds and creates a set of Printer that can be used by the Workers to print.
|
Finds and creates a set of Printer that can be used by the Workers to print.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, app):
|
def __init__(self, app, configuration_file, threadlock):
|
||||||
"""
|
"""
|
||||||
Discover printers connected to the computer and return a Collection of Printer()
|
Discovers printers connected to the computer
|
||||||
"""
|
"""
|
||||||
self.app = app
|
self.app = app
|
||||||
self.printers = self._discover_printers()
|
self.configuration_file = configuration_file
|
||||||
|
self._lock = threadlock
|
||||||
|
with self._lock:
|
||||||
|
self.printers = list(self._discover_printers())
|
||||||
|
|
||||||
def _discover_printers(self) -> Set[Printer]:
|
def _discover_printers(self) -> Set[Printer]:
|
||||||
"""
|
"""
|
||||||
@@ -40,19 +43,19 @@ class Printers:
|
|||||||
|
|
||||||
printers = set()
|
printers = set()
|
||||||
|
|
||||||
|
waiting_time_for_printer = self.configuration_file["printer"]["waiting_time"]
|
||||||
|
|
||||||
|
while True:
|
||||||
# Find all connected USB devices
|
# Find all connected USB devices
|
||||||
devices = usb.core.find(find_all=True, custom_match=_FindClass(7))
|
# the find() fnc returns a generator
|
||||||
waiting_time_for_printer = 10
|
devices = list(
|
||||||
while not list(devices):
|
usb.core.find(find_all=True, custom_match=_FindClass(self.app, 7))
|
||||||
self.app.logger.warning(str(waiting_time_for_printer) + " Found no printers, waiting for a printer to connect to the system...")
|
)
|
||||||
time.sleep(1)
|
|
||||||
waiting_time_for_printer = waiting_time_for_printer - 1
|
if devices:
|
||||||
devices = usb.core.find(find_all=True, custom_match=_FindClass(7))
|
|
||||||
if waiting_time_for_printer == 0:
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if waiting_time_for_printer <= 0:
|
||||||
if not list(devices):
|
|
||||||
self.app.logger.warning(
|
self.app.logger.warning(
|
||||||
"No USB devices of class 7 ( printers ) found or pyusb could not access the bus."
|
"No USB devices of class 7 ( printers ) found or pyusb could not access the bus."
|
||||||
)
|
)
|
||||||
@@ -60,6 +63,13 @@ class Printers:
|
|||||||
"No USB devices of class 7 ( printers ) found or pyusb could not access the bus."
|
"No USB devices of class 7 ( printers ) found or pyusb could not access the bus."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.app.logger.warning(
|
||||||
|
"No printers found; waiting for a printer to connect..."
|
||||||
|
)
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
|
waiting_time_for_printer -= 1
|
||||||
|
|
||||||
for dev in devices:
|
for dev in devices:
|
||||||
# Attempt to get the manufacturer and product strings
|
# Attempt to get the manufacturer and product strings
|
||||||
try:
|
try:
|
||||||
@@ -80,14 +90,20 @@ class Printers:
|
|||||||
hex(dev.idProduct),
|
hex(dev.idProduct),
|
||||||
)
|
)
|
||||||
|
|
||||||
if manufacturer == "EPSON":
|
match (manufacturer):
|
||||||
|
case "EPSON":
|
||||||
try:
|
try:
|
||||||
# We create a new EscPosPrinter()
|
# We create a new EscPosPrinter()
|
||||||
self.app.logger.debug("Trying to create a new EPSON printer")
|
self.app.logger.debug("Trying to create a new EPSON printer")
|
||||||
prid = dev.idProduct
|
prid = dev.idProduct
|
||||||
vendir = dev.idVendor
|
vendir = dev.idVendor
|
||||||
escpos_printer = EscPosPrinter(
|
escpos_printer = EscPosPrinter(
|
||||||
self.app, vendor_id=vendir, device_id=prid
|
app=self.app,
|
||||||
|
vendor_id=vendir,
|
||||||
|
device_id=prid,
|
||||||
|
configuration_file=self.configuration_file["printer"][
|
||||||
|
"epson"
|
||||||
|
],
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
@@ -95,23 +111,23 @@ class Printers:
|
|||||||
# If the object creation is successfull, we add it to the list of Printers
|
# If the object creation is successfull, we add it to the list of Printers
|
||||||
printers.add(escpos_printer)
|
printers.add(escpos_printer)
|
||||||
self.app.logger.debug("Found a %s printer", manufacturer)
|
self.app.logger.debug("Found a %s printer", manufacturer)
|
||||||
|
case "Brother":
|
||||||
# We already found the type of printer,
|
|
||||||
# we don't need an extra comparaison.
|
|
||||||
continue
|
|
||||||
|
|
||||||
# or a Brother Printer
|
|
||||||
if manufacturer == "Brother":
|
|
||||||
try:
|
try:
|
||||||
# We create a new BrotherPrinter()
|
# We create a new BrotherPrinter()
|
||||||
self.app.logger.debug("Trying to create a new BROTHER printer")
|
self.app.logger.debug("Trying to create a new BROTHER printer")
|
||||||
|
|
||||||
brother_printer = BrotherPrinter(
|
brother_printer = BrotherPrinter(
|
||||||
self.app, vendor_id=dev.idVendor, device_id=dev.idProduct
|
self.app,
|
||||||
|
dev.idVendor,
|
||||||
|
dev.idProduct,
|
||||||
|
configuration_file=self.configuration_file["printer"][
|
||||||
|
"brother"
|
||||||
|
],
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error(
|
self.app.logger.error(
|
||||||
"Could not create a %s printer class with %s:%s" , product,
|
"Could not create a %s printer class with %s:%s",
|
||||||
|
product,
|
||||||
dev.idVendor,
|
dev.idVendor,
|
||||||
dev.idProduct,
|
dev.idProduct,
|
||||||
)
|
)
|
||||||
@@ -119,33 +135,67 @@ class Printers:
|
|||||||
|
|
||||||
# If the object creation is successfull, we add it to the list of Printers
|
# If the object creation is successfull, we add it to the list of Printers
|
||||||
printers.add(brother_printer)
|
printers.add(brother_printer)
|
||||||
self.app.logger.debug("Found a %s printer" , manufacturer)
|
self.app.logger.debug(
|
||||||
|
"Found a %s printer with id %s",
|
||||||
|
manufacturer,
|
||||||
|
brother_printer.printer_info.identifier,
|
||||||
|
)
|
||||||
|
case _:
|
||||||
|
self.app.logger.debug(
|
||||||
|
"Found a printer of unknown manufacturer : %s", manufacturer
|
||||||
|
)
|
||||||
|
self.app.logger.debug(
|
||||||
|
"We are not adding this printer to the printers pool. Ignoring."
|
||||||
|
)
|
||||||
|
# end match
|
||||||
|
|
||||||
self.app.logger.debug("Found %s printers" , len(printers))
|
self.app.logger.debug("Found %s printers", len(printers))
|
||||||
|
|
||||||
if len(printers) < 1:
|
if len(printers) < 1:
|
||||||
self.app.logger.warning("Not printers found ! Please plug in a Printer and restart the program.")
|
self.app.logger.warning(
|
||||||
|
"Not printers found ! Please plug in a Printer and restart the program."
|
||||||
|
)
|
||||||
raise RuntimeError("No printers found")
|
raise RuntimeError("No printers found")
|
||||||
|
|
||||||
return printers
|
return printers
|
||||||
|
|
||||||
def any(self) -> Printer:
|
def acquire_available_printer(self, start_index=0):
|
||||||
"""
|
"""Atomically acquire and return an available printer, or None."""
|
||||||
Return a dict key: UUID, value: Printer, with any connected printer.
|
printers = self.printers
|
||||||
"""
|
if not printers:
|
||||||
if len(self.printers) > 0:
|
self.app.logger.error("No printers available for acquisition")
|
||||||
|
return None
|
||||||
|
|
||||||
|
with self._lock:
|
||||||
|
# So don't always look at the first printer available if need be
|
||||||
|
# this allows for a round-robin lookup
|
||||||
|
for offset in range(len(printers)):
|
||||||
|
index = (start_index + offset) % len(printers)
|
||||||
|
printer = printers[index]
|
||||||
|
|
||||||
|
if not printer.used:
|
||||||
|
printer.use_printer()
|
||||||
|
return index, printer
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def printers_info(self):
|
||||||
|
"""Return the current list of printers"""
|
||||||
|
printers_info_list = []
|
||||||
for i in self.printers:
|
for i in self.printers:
|
||||||
return i
|
printers_info_list.append(
|
||||||
else:
|
{
|
||||||
raise RuntimeError("No printers available")
|
"Name": i.printer_type.name,
|
||||||
|
"Used": i.used,
|
||||||
|
"Ready": i.ready,
|
||||||
|
"Info": i.printer_info,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# def get_printer(self, printer_type):
|
return printers_info_list
|
||||||
# """
|
|
||||||
# Return a specific printer
|
|
||||||
|
|
||||||
# printer_type -- a printer type
|
def __len__(self):
|
||||||
# """
|
return len(self.printers)
|
||||||
# return NotImplementedError()
|
|
||||||
|
|
||||||
|
|
||||||
class _FindClass:
|
class _FindClass:
|
||||||
@@ -153,8 +203,10 @@ class _FindClass:
|
|||||||
Use by usb.core to modify the way USB devices are found
|
Use by usb.core to modify the way USB devices are found
|
||||||
Taken from pyUSB documentation on Github
|
Taken from pyUSB documentation on Github
|
||||||
"""
|
"""
|
||||||
def __init__(self, class_):
|
|
||||||
|
def __init__(self, app, class_):
|
||||||
self._class = class_
|
self._class = class_
|
||||||
|
self.app = app
|
||||||
|
|
||||||
def __call__(self, device):
|
def __call__(self, device):
|
||||||
# first, let's check the device
|
# first, let's check the device
|
||||||
@@ -162,10 +214,13 @@ class _FindClass:
|
|||||||
return True
|
return True
|
||||||
# ok, transverse all devices to find an
|
# ok, transverse all devices to find an
|
||||||
# interface that matches our class
|
# interface that matches our class
|
||||||
for cfg in device:
|
for configuration in device:
|
||||||
# find_descriptor: what's it?
|
# Every device can have one or more configuration,
|
||||||
intf = usb.util.find_descriptor(cfg, bInterfaceClass=self._class)
|
interface = usb.util.find_descriptor(
|
||||||
if intf is not None:
|
configuration, bInterfaceClass=self._class
|
||||||
|
)
|
||||||
|
# each config can have several interfaces
|
||||||
|
if interface is not None:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
+13
-13
@@ -12,7 +12,7 @@ import os
|
|||||||
from time import sleep, gmtime, strftime
|
from time import sleep, gmtime, strftime
|
||||||
from gpiozero import Button, LED, DigitalOutputDevice
|
from gpiozero import Button, LED, DigitalOutputDevice
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from task import TextTask, ImageTask, CutTask
|
from task import PrintTask
|
||||||
|
|
||||||
|
|
||||||
class Raspberry:
|
class Raspberry:
|
||||||
@@ -27,12 +27,7 @@ class Raspberry:
|
|||||||
# dede
|
# dede
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, print_queue, app, configuration_file):
|
||||||
self,
|
|
||||||
print_queue,
|
|
||||||
app,
|
|
||||||
configuration_file
|
|
||||||
):
|
|
||||||
self.print_queue = print_queue
|
self.print_queue = print_queue
|
||||||
self.app = app
|
self.app = app
|
||||||
self.configuration_file = configuration_file
|
self.configuration_file = configuration_file
|
||||||
@@ -68,7 +63,9 @@ class Raspberry:
|
|||||||
self.app.logger.warning(
|
self.app.logger.warning(
|
||||||
"Couldn't get sufficient hardware information from /proc/cpuinfo"
|
"Couldn't get sufficient hardware information from /proc/cpuinfo"
|
||||||
)
|
)
|
||||||
self.app.logger.warning("Unable to determine if we are on a Raspberry Pi.")
|
self.app.logger.warning(
|
||||||
|
"Unable to determine if we are on a Raspberry Pi."
|
||||||
|
)
|
||||||
return False
|
return False
|
||||||
except IOError:
|
except IOError:
|
||||||
self.app.logger.error("Unable to open `/proc/cpuinfo`.")
|
self.app.logger.error("Unable to open `/proc/cpuinfo`.")
|
||||||
@@ -95,13 +92,16 @@ class Raspberry:
|
|||||||
self.indicator_countdown(iters=3)
|
self.indicator_countdown(iters=3)
|
||||||
self.button = Button(
|
self.button = Button(
|
||||||
self.configuration_file["rpi"]["button_gpio_port_number"],
|
self.configuration_file["rpi"]["button_gpio_port_number"],
|
||||||
pull_up=True, bounce_time=0.1
|
pull_up=True,
|
||||||
|
bounce_time=0.1,
|
||||||
)
|
)
|
||||||
self.button.when_pressed = self.on_button_pressed
|
self.button.when_pressed = self.on_button_pressed
|
||||||
self.app.logger.debug("Activated button")
|
self.app.logger.debug("Activated button")
|
||||||
|
|
||||||
# The "flash" is a relay-controlled device ( light bulb for example )
|
# The "flash" is a relay-controlled device ( light bulb for example )
|
||||||
self.flash = DigitalOutputDevice(self.configuration_file["rpi"]["flash_gpio_port_number"])
|
self.flash = DigitalOutputDevice(
|
||||||
|
self.configuration_file["rpi"]["flash_gpio_port_number"]
|
||||||
|
)
|
||||||
self.flash_toggle()
|
self.flash_toggle()
|
||||||
self.app.logger.debug("Activated flash")
|
self.app.logger.debug("Activated flash")
|
||||||
|
|
||||||
@@ -215,9 +215,9 @@ class Raspberry:
|
|||||||
y = image.height - logo.height - margin
|
y = image.height - logo.height - margin
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid position." +
|
"Invalid position."
|
||||||
"Choose from 'bottom_right', 'top_left', " +
|
+ "Choose from 'bottom_right', 'top_left', "
|
||||||
" 'top_right', or 'bottom_left'."
|
+ " 'top_right', or 'bottom_left'."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Composite the logo onto the image
|
# Composite the logo onto the image
|
||||||
|
|||||||
Vendored
+7871
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["../../scss/_banner.scss","../../scss/layout/_containers.scss","bootstrap-grid.css","../../scss/layout/_breakpoints.scss","../../scss/_config.scss","../../scss/layout/_grid.scss","../../scss/mixins/_grid.scss","../../scss/utilities/_api.scss","../../scss/mixins/_utilities.scss","../../scss/bootstrap-grid.scss"],"names":[],"mappings":"AAEA;;;;GAAA;ACcA;EAGI;;;;;;;IAVF,qBAAA;IACA,gBAAA;IACA,WAAA;IACA,8CAAA;IACA,mBAAA;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JsfE;II1bQ;MA5DV,sDAAA;IJyfE;II1bU;MA/DZ,0EAAA;IJ4fE;IIhcQ;MA5DV,sDAAA;IJ+fE;IIhcU;MA/DZ,0EAAA;IJkgBE;IIvbI;;MAGE,kBAAA;IJwbN;IIrbI;;MAEE,gBAAA;IJubN;II/bI;;MAGE,sBAAA;IJgcN;II7bI;;MAEE,sBAAA;IJ+bN;IIvcI;;MAGE,uBAAA;IJwcN;IIrcI;;MAEE,uBAAA;IJucN;II/cI;;MAGE,qBAAA;IJgdN;II7cI;;MAEE,qBAAA;IJ+cN;IIvdI;;MAGE,sBAAA;IJwdN;IIrdI;;MAEE,sBAAA;IJudN;II/dI;;MAGE,mBAAA;IJgeN;II7dI;;MAEE,mBAAA;IJ+dN;IIveI;;MAGE,sBAAA;IJweN;IIreILine truncated
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Grid v6.0.0-alpha.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2026 The Bootstrap Authors
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
@layer layout{.container,.container-fluid,.\32 xl\:container,.xl\:container,.lg\:container,.md\:container,.sm\:container{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-inline:calc(var(--bs-gutter-x) * .5);margin-inline:auto}@media (width>=576px){.sm\:container,.container{max-width:540px}}@media (width>=768px){.md\:container,.sm\:container,.container{max-width:720px}}@media (width>=1024px){.lg\:container,.md\:container,.sm\:container,.container{max-width:960px}}@media (width>=1280px){.xl\:container,.lg\:container,.md\:container,.sm\:container,.container{max-width:1200px}}@media (width>=1536px){.\32 xl\:container,.xl\:container,.lg\:container,.md\:container,.sm\:container,.container{max-width:1440px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;gap:var(--bs-gutter-y) var(--bs-gutter-x);flex-wrap:wrap;display:flex}.row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%}.col{flex:1 0 0}.row-cols-auto>*{flex:none;width:auto}.row-cols-1>*{width:calc((100% + var(--bs-gutter-x,0px)) / 1 - var(--bs-gutter-x,0px));flex:none}.row-cols-2>*{width:calc((100% + var(--bs-gutter-x,0px)) / 2 - var(--bs-gutter-x,0px));flex:none}.row-cols-3>*{width:calc((100% + var(--bs-gutter-x,0px)) / 3 - var(--bs-gutter-x,0px));flex:none}.row-cols-4>*{width:calc((100% + var(--bs-gutter-x,0px)) / 4 - var(--bs-gutter-x,0px));flex:none}.row-cols-5>*{width:calc((100% + var(--bs-gutter-x,0px)) / 5 - var(--bs-gutter-x,0px));flex:none}.row-cols-6>*{width:calc((100% + var(--bs-gutter-x,0px)) / 6 - var(--bs-gutter-x,0px));flex:none}.col-auto{flex:none;width:auto}.col-1{flex:none;width:8.33333%}:where(.row)>.col-1{width:calc((100% + var(--bs-gutter-x,0px)) * .0833333 - var(--bs-gutter-x,0px));flex:none}.col-2{flex:none;width:16.6667%}:where(.row)>.col-2{width:calc((100% + var(--bs-gutter-x,0px)) * .166667 - var(--bs-gutter-x,0px));flex:none}.col-3{flex:none;width:25%}:where(.row)>.col-3{width:calc((100% + var(--bs-gutter-x,0px)) * .25 - var(--bs-gutter-x,0px));flex:none}.col-4{flex:none;width:33.3333%}:where(.row)>.col-4{width:calc((100% + var(--bs-gutter-x,0px)) * .333333 - var(--bs-gutter-x,0px));flex:none}.col-5{flex:none;width:41.6667%}:where(.row)>.col-5{width:calc((100% + var(--bs-gutter-x,0px)) * .416667 - var(--bs-gutter-x,0px));flex:none}.col-6{flex:none;width:50%}:where(.row)>.col-6{width:calc((100% + var(--bs-gutter-x,0px)) * .5 - var(--bs-gutter-x,0px));flex:none}.col-7{flex:none;width:58.3333%}:where(.row)>.col-7{width:calc((100% + var(--bs-gutter-x,0px)) * .583333 - var(--bs-gutter-x,0px));flex:none}.col-8{flex:none;width:66.6667%}:where(.row)>.col-8{width:calc((100% + var(--bs-gutter-x,0px)) * .666667 - var(--bs-gutter-x,0px));flex:none}.col-9{flex:none;width:75%}:where(.row)>.col-9{width:calc((100% + var(--bs-gutter-x,0px)) * .75 - var(--bs-gutter-x,0px));flex:none}.col-10{flex:none;width:83.3333%}:where(.row)>.col-10{width:calc((100% + var(--bs-gutter-x,0px)) * .833333 - var(--bs-gutter-x,0px));flex:none}.col-11{flex:none;width:91.6667%}:where(.row)>.col-11{width:calc((100% + var(--bs-gutter-x,0px)) * .916667 - var(--bs-gutter-x,0px));flex:none}.col-12{flex:none;width:100%}:where(.row)>.col-12{width:calc((100% + var(--bs-gutter-x,0px)) * 1 - var(--bs-gutter-x,0px));flex:none}.offset-1{margin-inline-start:8.33333%}:where(.row)>.offset-1{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .0833333)}.offset-2{margin-inline-start:16.6667%}:where(.row)>.offset-2{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .166667)}.offset-3{margin-inline-start:25%}:where(.row)>.offset-3{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .25)}.offset-4{margin-inline-start:33.3333%}:where(.row)>.offset-4{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .333333)}.offset-5{margin-inline-start:41.6667%}:where(.row)>.offset-5{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .416667)}.offset-6{margin-inline-start:50%}:where(.row)>.offset-6{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .5)}.offset-7{margin-inline-start:58.3333%}:where(.row)>.offset-7{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .583333)}.offset-8{margin-inline-start:66.6667%}:where(.row)>.offset-8{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .666667)}.offset-9{margin-inline-start:75%}:where(.row)>.offset-9{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .75)}.offset-10{margin-inline-start:83.3333%}:where(.row)>.offset-10{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .833333)}.offset-11{margin-inline-start:91.6667%}:where(.row)>.offset-11{margin-inline-start:calc((100% + var(--bs-gutter-x,0px)) * .916667)}.g-0,.gx-0{--bs-gutter-x:0px}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:.25rem}.g-1,.gy-1{--bs-gutter-y:.25rem}.g-2,.gx-2{--bs-gutter-x:.375rem}.g-2,.gy-2{--bs-gutter-y:.375rem}.g-3,.gx-3{--bs-gutter-x:.5rem}.g-3,.gy-3{--bs-gutter-y:.5rem}.g-4,.gx-4{--bs-gutter-x:.75rem}.g-4,.gy-4{--bs-gutter-y:.75rem}.g-5,.gx-5{--bs-gutter-x:1rem}.g-5,.gy-5{--bs-gutter-yLine truncated
|
||||||
|
/*# sourceMappingURL=bootstrap-grid.min.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sourceRoot":null,"mappings":";;;;;AEgBA,cAGI,2NC4GA,sBD5FI,2CC4FJ,sBD5FI,0DC4FJ,uBD5FI,yEC4FJ,uBD5FI,yFC4FJ,uBD5FI,4GG7BJ,gHAGE,qECiEA,gBAIA,sCApBJ,iGAAA,iGAAA,iGAAA,iGAAA,iGAAA,iGAgCI,+BAMI,gCAIE,8GAJF,gCAIE,6GAJF,2BAIE,yGAJF,gCAIE,6GAJF,gCAIE,6GAJF,2BAIE,wGAJF,gCAIE,6GAJF,gCAIE,6GAJF,2BAIE,yGAJF,iCAIE,8GAJF,iCAIE,8GAJF,6BAIE,wGASA,uCAGE,4FAHF,uCAGE,2FAHF,kCAGE,uFAHF,uCAGE,2FAHF,uCAGE,2FAHF,kCAGE,sFAHF,uCAGE,2FAHF,uCAGE,2FAHF,kCAGE,uFAHF,wCAGE,4FAHF,wCAGE,4FAYN,6BAMA,2BANA,gCAMA,gCANA,iCAMA,iCANA,+BAMA,+BANA,gCAMA,gCANA,8BAMA,8BANA,iCAMA,iCANA,gCAMA,gCANA,iCAMA,iCANA,8BAMA,8BANA,mCAMA,mCANA,kCAMA,kCAN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,8BAAA,kCAAA,iCAAA,+BAAA,iCAAA,0BAAA,+BAAA,gCAAA,8BAAA,+BAAA,6BAAA,gCAAA,+BAAA,gCAAA,6BAAA,iCAAA,gCAAA,8BAAA,iCAAA,gCAAA,gCAAA,yBAAA,8BAAA,+BAAA,6BAAA,8BAAA,4BAAA,+BAAA,8BAAA,+BAAA,4BAAA,gCAAA,+BAAA,6BAAA,+BAAA,4BAAA,iCAAA,kCLine truncated
|
||||||
Vendored
+863
@@ -0,0 +1,863 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v6.0.0-alpha.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2026 The Bootstrap Authors
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
:root,
|
||||||
|
:host {
|
||||||
|
--bs-blue-025: color-mix(in oklch, var(--bs-white) 94%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-050: color-mix(in oklch, var(--bs-white) 90%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-100: color-mix(in oklch, var(--bs-white) 80%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-200: color-mix(in oklch, var(--bs-white) 60%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-300: color-mix(in oklch, var(--bs-white) 40%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-400: color-mix(in oklch, var(--bs-white) 20%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-500: oklch(60% 0.24 240deg);
|
||||||
|
--bs-blue-600: color-mix(in oklch, var(--bs-black) 16%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-700: color-mix(in oklch, var(--bs-black) 32%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-800: color-mix(in oklch, var(--bs-black) 48%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-900: color-mix(in oklch, var(--bs-black) 64%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-950: color-mix(in oklch, var(--bs-black) 70%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-blue-975: color-mix(in oklch, var(--bs-black) 76%, oklch(60% 0.24 240deg));
|
||||||
|
--bs-indigo-025: color-mix(in oklch, var(--bs-white) 94%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-050: color-mix(in oklch, var(--bs-white) 90%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-100: color-mix(in oklch, var(--bs-white) 80%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-200: color-mix(in oklch, var(--bs-white) 60%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-300: color-mix(in oklch, var(--bs-white) 40%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-400: color-mix(in oklch, var(--bs-white) 20%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-500: oklch(56% 0.26 288deg);
|
||||||
|
--bs-indigo-600: color-mix(in oklch, var(--bs-black) 16%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-700: color-mix(in oklch, var(--bs-black) 32%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-800: color-mix(in oklch, var(--bs-black) 48%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-900: color-mix(in oklch, var(--bs-black) 64%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-950: color-mix(in oklch, var(--bs-black) 70%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-indigo-975: color-mix(in oklch, var(--bs-black) 76%, oklch(56% 0.26 288deg));
|
||||||
|
--bs-violet-025: color-mix(in oklch, var(--bs-white) 94%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-050: color-mix(in oklch, var(--bs-white) 90%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-100: color-mix(in oklch, var(--bs-white) 80%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-200: color-mix(in oklch, var(--bs-white) 60%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-300: color-mix(in oklch, var(--bs-white) 40%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-400: color-mix(in oklch, var(--bs-white) 20%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-500: oklch(56% 0.24 300deg);
|
||||||
|
--bs-violet-600: color-mix(in oklch, var(--bs-black) 16%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-700: color-mix(in oklch, var(--bs-black) 32%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-800: color-mix(in oklch, var(--bs-black) 48%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-900: color-mix(in oklch, var(--bs-black) 64%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-950: color-mix(in oklch, var(--bs-black) 70%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-violet-975: color-mix(in oklch, var(--bs-black) 76%, oklch(56% 0.24 300deg));
|
||||||
|
--bs-purple-025: color-mix(in oklch, var(--bs-white) 94%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-050: color-mix(in oklch, var(--bs-white) 90%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-100: color-mix(in oklch, var(--bs-white) 80%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-200: color-mix(in oklch, var(--bs-white) 60%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-300: color-mix(in oklch, var(--bs-white) 40%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-400: color-mix(in oklch, var(--bs-white) 20%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-500: oklch(56% 0.24 320deg);
|
||||||
|
--bs-purple-600: color-mix(in oklch, var(--bs-black) 16%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-700: color-mix(in oklch, var(--bs-black) 32%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-800: color-mix(in oklch, var(--bs-black) 48%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-900: color-mix(in oklch, var(--bs-black) 64%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-950: color-mix(in oklch, var(--bs-black) 70%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-purple-975: color-mix(in oklch, var(--bs-black) 76%, oklch(56% 0.24 320deg));
|
||||||
|
--bs-pink-025: color-mix(in oklch, var(--bs-white) 94%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-050: color-mix(in oklch, var(--bs-white) 90%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-100: color-mix(in oklch, var(--bs-white) 80%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-200: color-mix(in oklch, var(--bs-white) 60%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-300: color-mix(in oklch, var(--bs-white) 40%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-400: color-mix(in oklch, var(--bs-white) 20%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-500: oklch(60% 0.22 4deg);
|
||||||
|
--bs-pink-600: color-mix(in oklch, var(--bs-black) 16%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-700: color-mix(in oklch, var(--bs-black) 32%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-800: color-mix(in oklch, var(--bs-black) 48%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-900: color-mix(in oklch, var(--bs-black) 64%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-950: color-mix(in oklch, var(--bs-black) 70%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-pink-975: color-mix(in oklch, var(--bs-black) 76%, oklch(60% 0.22 4deg));
|
||||||
|
--bs-red-025: color-mix(in oklch, var(--bs-white) 94%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-050: color-mix(in oklch, var(--bs-white) 90%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-100: color-mix(in oklch, var(--bs-white) 80%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-200: color-mix(in oklch, var(--bs-white) 60%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-300: color-mix(in oklch, var(--bs-white) 40%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-400: color-mix(in oklch, var(--bs-white) 20%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-500: oklch(60% 0.22 20deg);
|
||||||
|
--bs-red-600: color-mix(in oklch, var(--bs-black) 16%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-700: color-mix(in oklch, var(--bs-black) 32%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-800: color-mix(in oklch, var(--bs-black) 48%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-900: color-mix(in oklch, var(--bs-black) 64%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-950: color-mix(in oklch, var(--bs-black) 70%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-red-975: color-mix(in oklch, var(--bs-black) 76%, oklch(60% 0.22 20deg));
|
||||||
|
--bs-orange-025: color-mix(in oklch, var(--bs-white) 94%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-050: color-mix(in oklch, var(--bs-white) 90%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-100: color-mix(in oklch, var(--bs-white) 80%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-200: color-mix(in oklch, var(--bs-white) 60%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-300: color-mix(in oklch, var(--bs-white) 40%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-400: color-mix(in oklch, var(--bs-white) 20%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-500: oklch(70% 0.22 52deg);
|
||||||
|
--bs-orange-600: color-mix(in oklch, var(--bs-black) 16%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-700: color-mix(in oklch, var(--bs-black) 32%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-800: color-mix(in oklch, var(--bs-black) 48%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-900: color-mix(in oklch, var(--bs-black) 64%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-950: color-mix(in oklch, var(--bs-black) 70%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-orange-975: color-mix(in oklch, var(--bs-black) 76%, oklch(70% 0.22 52deg));
|
||||||
|
--bs-amber-025: color-mix(in oklch, var(--bs-white) 94%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-050: color-mix(in oklch, var(--bs-white) 90%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-100: color-mix(in oklch, var(--bs-white) 80%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-200: color-mix(in oklch, var(--bs-white) 60%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-300: color-mix(in oklch, var(--bs-white) 40%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-400: color-mix(in oklch, var(--bs-white) 20%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-500: oklch(79% 0.2 78deg);
|
||||||
|
--bs-amber-600: color-mix(in oklch, var(--bs-black) 16%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-700: color-mix(in oklch, var(--bs-black) 32%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-800: color-mix(in oklch, var(--bs-black) 48%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-900: color-mix(in oklch, var(--bs-black) 64%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-950: color-mix(in oklch, var(--bs-black) 70%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-amber-975: color-mix(in oklch, var(--bs-black) 76%, oklch(79% 0.2 78deg));
|
||||||
|
--bs-yellow-025: color-mix(in oklch, var(--bs-white) 94%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-050: color-mix(in oklch, var(--bs-white) 90%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-100: color-mix(in oklch, var(--bs-white) 80%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-200: color-mix(in oklch, var(--bs-white) 60%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-300: color-mix(in oklch, var(--bs-white) 40%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-400: color-mix(in oklch, var(--bs-white) 20%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-500: oklch(88% 0.24 88deg);
|
||||||
|
--bs-yellow-600: color-mix(in oklch, var(--bs-black) 16%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-700: color-mix(in oklch, var(--bs-black) 32%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-800: color-mix(in oklch, var(--bs-black) 48%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-900: color-mix(in oklch, var(--bs-black) 64%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-950: color-mix(in oklch, var(--bs-black) 70%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-yellow-975: color-mix(in oklch, var(--bs-black) 76%, oklch(88% 0.24 88deg));
|
||||||
|
--bs-lime-025: color-mix(in oklch, var(--bs-white) 94%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-050: color-mix(in oklch, var(--bs-white) 90%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-100: color-mix(in oklch, var(--bs-white) 80%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-200: color-mix(in oklch, var(--bs-white) 60%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-300: color-mix(in oklch, var(--bs-white) 40%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-400: color-mix(in oklch, var(--bs-white) 20%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-500: oklch(65% 0.24 135deg);
|
||||||
|
--bs-lime-600: color-mix(in oklch, var(--bs-black) 16%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-700: color-mix(in oklch, var(--bs-black) 32%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-800: color-mix(in oklch, var(--bs-black) 48%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-900: color-mix(in oklch, var(--bs-black) 64%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-950: color-mix(in oklch, var(--bs-black) 70%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-lime-975: color-mix(in oklch, var(--bs-black) 76%, oklch(65% 0.24 135deg));
|
||||||
|
--bs-green-025: color-mix(in oklch, var(--bs-white) 94%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-050: color-mix(in oklch, var(--bs-white) 90%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-100: color-mix(in oklch, var(--bs-white) 80%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-200: color-mix(in oklch, var(--bs-white) 60%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-300: color-mix(in oklch, var(--bs-white) 40%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-400: color-mix(in oklch, var(--bs-white) 20%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-500: oklch(64% 0.22 160deg);
|
||||||
|
--bs-green-600: color-mix(in oklch, var(--bs-black) 16%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-700: color-mix(in oklch, var(--bs-black) 32%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-800: color-mix(in oklch, var(--bs-black) 48%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-900: color-mix(in oklch, var(--bs-black) 64%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-950: color-mix(in oklch, var(--bs-black) 70%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-green-975: color-mix(in oklch, var(--bs-black) 76%, oklch(64% 0.22 160deg));
|
||||||
|
--bs-teal-025: color-mix(in oklch, var(--bs-white) 94%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-050: color-mix(in oklch, var(--bs-white) 90%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-100: color-mix(in oklch, var(--bs-white) 80%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-200: color-mix(in oklch, var(--bs-white) 60%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-300: color-mix(in oklch, var(--bs-white) 40%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-400: color-mix(in oklch, var(--bs-white) 20%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-500: oklch(68% 0.22 190deg);
|
||||||
|
--bs-teal-600: color-mix(in oklch, var(--bs-black) 16%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-700: color-mix(in oklch, var(--bs-black) 32%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-800: color-mix(in oklch, var(--bs-black) 48%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-900: color-mix(in oklch, var(--bs-black) 64%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-950: color-mix(in oklch, var(--bs-black) 70%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-teal-975: color-mix(in oklch, var(--bs-black) 76%, oklch(68% 0.22 190deg));
|
||||||
|
--bs-cyan-025: color-mix(in oklch, var(--bs-white) 94%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-050: color-mix(in oklch, var(--bs-white) 90%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-100: color-mix(in oklch, var(--bs-white) 80%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-200: color-mix(in oklch, var(--bs-white) 60%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-300: color-mix(in oklch, var(--bs-white) 40%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-400: color-mix(in oklch, var(--bs-white) 20%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-500: oklch(69% 0.22 220deg);
|
||||||
|
--bs-cyan-600: color-mix(in oklch, var(--bs-black) 16%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-700: color-mix(in oklch, var(--bs-black) 32%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-800: color-mix(in oklch, var(--bs-black) 48%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-900: color-mix(in oklch, var(--bs-black) 64%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-950: color-mix(in oklch, var(--bs-black) 70%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-cyan-975: color-mix(in oklch, var(--bs-black) 76%, oklch(69% 0.22 220deg));
|
||||||
|
--bs-brown-025: color-mix(in oklch, var(--bs-white) 94%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-050: color-mix(in oklch, var(--bs-white) 90%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-100: color-mix(in oklch, var(--bs-white) 80%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-200: color-mix(in oklch, var(--bs-white) 60%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-300: color-mix(in oklch, var(--bs-white) 40%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-400: color-mix(in oklch, var(--bs-white) 20%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-500: oklch(60% 0.12 54deg);
|
||||||
|
--bs-brown-600: color-mix(in oklch, var(--bs-black) 16%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-700: color-mix(in oklch, var(--bs-black) 32%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-800: color-mix(in oklch, var(--bs-black) 48%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-900: color-mix(in oklch, var(--bs-black) 64%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-950: color-mix(in oklch, var(--bs-black) 70%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-brown-975: color-mix(in oklch, var(--bs-black) 76%, oklch(60% 0.12 54deg));
|
||||||
|
--bs-gray-025: color-mix(in oklch, var(--bs-white) 94%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-050: color-mix(in oklch, var(--bs-white) 90%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-100: color-mix(in oklch, var(--bs-white) 80%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-200: color-mix(in oklch, var(--bs-white) 60%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-300: color-mix(in oklch, var(--bs-white) 40%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-400: color-mix(in oklch, var(--bs-white) 20%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-500: oklch(60% 0.02 245deg);
|
||||||
|
--bs-gray-600: color-mix(in oklch, var(--bs-black) 16%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-700: color-mix(in oklch, var(--bs-black) 32%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-800: color-mix(in oklch, var(--bs-black) 48%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-900: color-mix(in oklch, var(--bs-black) 64%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-950: color-mix(in oklch, var(--bs-black) 70%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-gray-975: color-mix(in oklch, var(--bs-black) 76%, oklch(60% 0.02 245deg));
|
||||||
|
--bs-pewter-025: color-mix(in oklch, var(--bs-white) 94%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-050: color-mix(in oklch, var(--bs-white) 90%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-100: color-mix(in oklch, var(--bs-white) 80%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-200: color-mix(in oklch, var(--bs-white) 60%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-300: color-mix(in oklch, var(--bs-white) 40%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-400: color-mix(in oklch, var(--bs-white) 20%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-500: oklch(65% 0.01 290deg);
|
||||||
|
--bs-pewter-600: color-mix(in oklch, var(--bs-black) 16%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-700: color-mix(in oklch, var(--bs-black) 32%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-800: color-mix(in oklch, var(--bs-black) 48%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-900: color-mix(in oklch, var(--bs-black) 64%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-950: color-mix(in oklch, var(--bs-black) 70%, oklch(65% 0.01 290deg));
|
||||||
|
--bs-pewter-975: color-mix(in oklch, var(--bs-black) 76%, oklch(65% 0.01 290deg));
|
||||||
|
}
|
||||||
|
|
||||||
|
@layer colors, config, root, reboot, layout, content, forms, components, custom, helpers, utilities;
|
||||||
|
:root,
|
||||||
|
:host {
|
||||||
|
--bs-black: #000;
|
||||||
|
--bs-white: #fff;
|
||||||
|
--bs-gradient: linear-gradient(180deg, color-mix(var(--bs-white) 15%, transparent), color-mix(var(--bs-white) 0%, transparent));
|
||||||
|
--bs-body-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
|
--bs-body-font-size: 1rem;
|
||||||
|
--bs-body-font-weight: var(--bs-font-weight-normal);
|
||||||
|
--bs-body-line-height: 1.5;
|
||||||
|
--bs-heading-color: inherit;
|
||||||
|
--bs-hr-border-color: var(--bs-border-color);
|
||||||
|
--bs-link-color: light-dark(var(--bs-primary-base), var(--bs-primary-fg));
|
||||||
|
--bs-link-decoration: underline;
|
||||||
|
--bs-link-underline-offset: 0.2em;
|
||||||
|
--bs-link-hover-color: color-mix(in oklch, var(--bs-link-color) 90%, #000);
|
||||||
|
--bs-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
|
||||||
|
--bs-code-font-size: 0.875em;
|
||||||
|
--bs-code-color: var(--bs-fg-2);
|
||||||
|
--bs-border-width: 1px;
|
||||||
|
--bs-border-width-keyline: 0.5px;
|
||||||
|
--bs-border-style: solid;
|
||||||
|
--bs-border-color: light-dark(var(--bs-gray-200), var(--bs-gray-700));
|
||||||
|
--bs-border-color-translucent: color-mix(in oklch, var(--bs-fg-body) 15%, transparent);
|
||||||
|
--bs-shadow-color: #000;
|
||||||
|
--bs-shadow-strength: 1;
|
||||||
|
--bs-transition-timing-overlay: cubic-bezier(0.22, 1, 0.36, 1);
|
||||||
|
--bs-spacer: 1rem;
|
||||||
|
--bs-focus-ring-width: 3px;
|
||||||
|
--bs-focus-ring-offset: 1px;
|
||||||
|
--bs-focus-ring-color: var(--bs-primary-focus-ring);
|
||||||
|
--bs-focus-ring: var(--bs-focus-ring-width) solid var(--bs-focus-ring-color);
|
||||||
|
--bs-control-checked-bg: var(--bs-primary-base);
|
||||||
|
--bs-control-checked-border-color: var(--bs-control-checked-bg);
|
||||||
|
--bs-control-active-bg: var(--bs-primary-base);
|
||||||
|
--bs-control-active-border-color: var(--bs-control-active-bg);
|
||||||
|
--bs-control-disabled-bg: var(--bs-bg-3);
|
||||||
|
--bs-control-disabled-opacity: 0.65;
|
||||||
|
--bs-control-transition-duration: 0.15s;
|
||||||
|
--bs-control-transition-timing: cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
|
--bs-btn-input-fg: var(--bs-fg-body);
|
||||||
|
--bs-btn-input-bg: var(--bs-bg-body);
|
||||||
|
--bs-btn-input-gap: 0.375rem;
|
||||||
|
--bs-btn-input-min-height: 2.375rem;
|
||||||
|
--bs-btn-input-padding-y: 0.375rem;
|
||||||
|
--bs-btn-input-padding-x: 0.75rem;
|
||||||
|
--bs-btn-input-font-size: var(--bs-body-font-size);
|
||||||
|
--bs-btn-input-font-weight: var(--bs-font-weight-normal);
|
||||||
|
--bs-btn-input-line-height: var(--bs-body-line-height);
|
||||||
|
--bs-btn-input-border-radius: var(--bs-radius-5);
|
||||||
|
--bs-btn-input-xs-gap: var(--bs-spacer-1);
|
||||||
|
--bs-btn-input-xs-min-height: 1.5rem;
|
||||||
|
--bs-btn-input-xs-padding-y: 0.125rem;
|
||||||
|
--bs-btn-input-xs-padding-x: 0.5rem;
|
||||||
|
--bs-btn-input-xs-font-size: var(--bs-font-size-xs);
|
||||||
|
--bs-btn-input-xs-line-height: 1.125;
|
||||||
|
--bs-btn-input-xs-border-radius: var(--bs-radius-5);
|
||||||
|
--bs-btn-input-sm-gap: 0.375rem;
|
||||||
|
--bs-btn-input-sm-min-height: 2rem;
|
||||||
|
--bs-btn-input-sm-padding-y: 0.25rem;
|
||||||
|
--bs-btn-input-sm-padding-x: 0.625rem;
|
||||||
|
--bs-btn-input-sm-font-size: var(--bs-font-size-sm);
|
||||||
|
--bs-btn-input-sm-line-height: var(--bs-line-height-sm);
|
||||||
|
--bs-btn-input-sm-border-radius: var(--bs-radius-5);
|
||||||
|
--bs-btn-input-lg-gap: 0.375rem;
|
||||||
|
--bs-btn-input-lg-min-height: 2.75rem;
|
||||||
|
--bs-btn-input-lg-padding-y: 0.5rem;
|
||||||
|
--bs-btn-input-lg-padding-x: 1rem;
|
||||||
|
--bs-btn-input-lg-font-size: var(--bs-font-size-md);
|
||||||
|
--bs-btn-input-lg-line-height: var(--bs-line-height-md);
|
||||||
|
--bs-btn-input-lg-border-radius: var(--bs-radius-7);
|
||||||
|
--bs-font-size-xs: 0.75rem;
|
||||||
|
--bs-line-height-xs: 1.25;
|
||||||
|
--bs-font-size-sm: 0.875rem;
|
||||||
|
--bs-line-height-sm: 1.5;
|
||||||
|
--bs-font-size-md: 1rem;
|
||||||
|
--bs-line-height-md: 1.5;
|
||||||
|
--bs-font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
|
||||||
|
--bs-line-height-lg: 1.5;
|
||||||
|
--bs-font-size-xl: clamp(1.5rem, 1.1rem + 0.75vw, 1.75rem);
|
||||||
|
--bs-line-height-xl: 1.4285714286;
|
||||||
|
--bs-font-size-2xl: clamp(1.75rem, 1.3rem + 1vw, 2rem);
|
||||||
|
--bs-line-height-2xl: 1.3333333333;
|
||||||
|
--bs-font-size-3xl: clamp(2rem, 1.5rem + 1.875vw, 2.5rem);
|
||||||
|
--bs-line-height-3xl: 1.2;
|
||||||
|
--bs-font-size-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
|
||||||
|
--bs-line-height-4xl: 1.1;
|
||||||
|
--bs-font-size-5xl: clamp(3rem, 2rem + 5vw, 4rem);
|
||||||
|
--bs-line-height-5xl: 1.1;
|
||||||
|
--bs-font-size-6xl: clamp(3.75rem, 2.5rem + 6.25vw, 5rem);
|
||||||
|
--bs-line-height-6xl: 1;
|
||||||
|
--bs-font-weight-lighter: lighter;
|
||||||
|
--bs-font-weight-light: 300;
|
||||||
|
--bs-font-weight-normal: 400;
|
||||||
|
--bs-font-weight-medium: 500;
|
||||||
|
--bs-font-weight-semibold: 600;
|
||||||
|
--bs-font-weight-bold: 700;
|
||||||
|
--bs-font-weight-bolder: bolder;
|
||||||
|
--bs-primary-base: var(--bs-blue-500);
|
||||||
|
--bs-primary-fg: light-dark(var(--bs-blue-600), var(--bs-blue-400));
|
||||||
|
--bs-primary-fg-emphasis: light-dark(var(--bs-blue-800), var(--bs-blue-200));
|
||||||
|
--bs-primary-bg: var(--bs-blue-500);
|
||||||
|
--bs-primary-bg-subtle: light-dark(var(--bs-blue-100), var(--bs-blue-900));
|
||||||
|
--bs-primary-bg-muted: light-dark(var(--bs-blue-200), var(--bs-blue-800));
|
||||||
|
--bs-primary-border: light-dark(var(--bs-blue-300), var(--bs-blue-600));
|
||||||
|
--bs-primary-focus-ring: light-dark(color-mix(in oklch, var(--bs-blue-500) 50%, var(--bs-bg-body)), color-mix(in oklch, var(--bs-blue-500) 75%, var(--bs-bg-body)));
|
||||||
|
--bs-primary-contrast: var(--bs-white);
|
||||||
|
--bs-accent-base: var(--bs-indigo-500);
|
||||||
|
--bs-accent-fg: light-dark(var(--bs-indigo-600), color-mix(in oklch, var(--bs-indigo-400), var(--bs-indigo-300)));
|
||||||
|
--bs-accent-fg-emphasis: light-dark(var(--bs-indigo-800), var(--bs-indigo-300));
|
||||||
|
--bs-accent-bg: var(--bs-indigo-500);
|
||||||
|
--bs-accent-bg-subtle: light-dark(var(--bs-indigo-100), var(--bs-indigo-900));
|
||||||
|
--bs-accent-bg-muted: light-dark(var(--bs-indigo-200), var(--bs-indigo-800));
|
||||||
|
--bs-accent-border: light-dark(var(--bs-indigo-300), var(--bs-indigo-600));
|
||||||
|
--bs-accent-focus-ring: light-dark(color-mix(in oklch, var(--bs-indigo-500) 50%, var(--bs-bg-body)), color-mix(in oklch, var(--bs-indigo-500) 75%, var(--bs-bg-body)));
|
||||||
|
--bs-accent-contrast: var(--bs-white);
|
||||||
|
--bs-success-base: var(--bs-green-500);
|
||||||
|
--bs-success-fg: light-dark(var(--bs-green-600), var(--bs-green-400));
|
||||||
|
--bs-success-fg-emphasis: light-dark(var(--bs-green-800), var(--bs-green-300));
|
||||||
|
--bs-success-bg: var(--bs-green-500);
|
||||||
|
--bs-success-bg-subtle: light-dark(var(--bs-green-100), var(--bs-green-900));
|
||||||
|
--bs-success-bg-muted: light-dark(var(--bs-green-200), var(--bs-green-800));
|
||||||
|
--bs-success-border: light-dark(var(--bs-green-300), var(--bs-green-600));
|
||||||
|
--bs-success-focus-ring: light-dark(color-mix(in oklch, var(--bs-green-500) 50%, var(--bs-bg-body)), color-mix(in oklch, var(--bs-green-500) 75%, var(--bs-bg-body)));
|
||||||
|
--bs-success-contrast: var(--bs-white);
|
||||||
|
--bs-danger-base: var(--bs-red-500);
|
||||||
|
--bs-danger-fg: light-dark(var(--bs-red-600), var(--bs-red-400));
|
||||||
|
--bs-danger-fg-emphasis: light-dark(var(--bs-red-800), var(--bs-red-300));
|
||||||
|
--bs-danger-bg: var(--bs-red-500);
|
||||||
|
--bs-danger-bg-subtle: light-dark(var(--bs-red-100), var(--bs-red-900));
|
||||||
|
--bs-danger-bg-muted: light-dark(var(--bs-red-200), var(--bs-red-800));
|
||||||
|
--bs-danger-border: light-dark(var(--bs-red-300), var(--bs-red-600));
|
||||||
|
--bs-danger-focus-ring: light-dark(color-mix(in oklch, var(--bs-red-500) 50%, var(--bs-bg-body)), color-mix(in oklch, var(--bs-red-500) 75%, var(--bs-bg-body)));
|
||||||
|
--bs-danger-contrast: var(--bs-white);
|
||||||
|
--bs-warning-base: var(--bs-yellow-500);
|
||||||
|
--bs-warning-fg: light-dark(var(--bs-yellow-700), var(--bs-yellow-400));
|
||||||
|
--bs-warning-fg-emphasis: light-dark(var(--bs-yellow-800), var(--bs-yellow-300));
|
||||||
|
--bs-warning-bg: var(--bs-yellow-500);
|
||||||
|
--bs-warning-bg-subtle: light-dark(var(--bs-yellow-100), var(--bs-yellow-900));
|
||||||
|
--bs-warning-bg-muted: light-dark(var(--bs-yellow-200), var(--bs-yellow-800));
|
||||||
|
--bs-warning-border: light-dark(var(--bs-yellow-300), var(--bs-yellow-600));
|
||||||
|
--bs-warning-focus-ring: light-dark(color-mix(in oklch, var(--bs-yellow-500) 50%, var(--bs-bg-body)), color-mix(in oklch, var(--bs-yellow-400) 85%, var(--bs-bg-body)));
|
||||||
|
--bs-warning-contrast: var(--bs-gray-900);
|
||||||
|
--bs-info-base: var(--bs-cyan-500);
|
||||||
|
--bs-info-fg: light-dark(var(--bs-cyan-600), var(--bs-cyan-400));
|
||||||
|
--bs-info-fg-emphasis: light-dark(var(--bs-cyan-800), var(--bs-cyan-300));
|
||||||
|
--bs-info-bg: var(--bs-cyan-500);
|
||||||
|
--bs-info-bg-subtle: light-dark(var(--bs-cyan-100), var(--bs-cyan-900));
|
||||||
|
--bs-info-bg-muted: light-dark(var(--bs-cyan-200), var(--bs-cyan-800));
|
||||||
|
--bs-info-border: light-dark(var(--bs-cyan-300), var(--bs-cyan-600));
|
||||||
|
--bs-info-focus-ring: light-dark(color-mix(in oklch, var(--bs-cyan-500) 50%, var(--bs-bg-body)), color-mix(in oklch, var(--bs-cyan-500) 75%, var(--bs-bg-body)));
|
||||||
|
--bs-info-contrast: var(--bs-gray-900);
|
||||||
|
--bs-inverse-base: var(--bs-gray-900);
|
||||||
|
--bs-inverse-fg: light-dark(var(--bs-gray-900), var(--bs-gray-200));
|
||||||
|
--bs-inverse-fg-emphasis: light-dark(var(--bs-gray-975), var(--bs-white));
|
||||||
|
--bs-inverse-bg: light-dark(var(--bs-gray-900), var(--bs-gray-025));
|
||||||
|
--bs-inverse-bg-subtle: light-dark(var(--bs-gray-100), var(--bs-gray-900));
|
||||||
|
--bs-inverse-bg-muted: light-dark(var(--bs-gray-200), var(--bs-gray-300));
|
||||||
|
--bs-inverse-border: light-dark(var(--bs-gray-400), var(--bs-gray-100));
|
||||||
|
--bs-inverse-focus-ring: color-mix(in oklch, light-dark(var(--bs-gray-900), var(--bs-gray-100)) 50%, var(--bs-bg-body));
|
||||||
|
--bs-inverse-contrast: light-dark(var(--bs-white), var(--bs-gray-900));
|
||||||
|
--bs-secondary-base: var(--bs-gray-200);
|
||||||
|
--bs-secondary-fg: light-dark(var(--bs-gray-600), var(--bs-gray-400));
|
||||||
|
--bs-secondary-fg-emphasis: light-dark(var(--bs-gray-800), var(--bs-gray-200));
|
||||||
|
--bs-secondary-bg: light-dark(var(--bs-gray-100), var(--bs-gray-600));
|
||||||
|
--bs-secondary-bg-subtle: light-dark(var(--bs-gray-050), var(--bs-gray-800));
|
||||||
|
--bs-secondary-bg-muted: light-dark(var(--bs-gray-100), var(--bs-gray-700));
|
||||||
|
--bs-secondary-border: light-dark(var(--bs-gray-300), var(--bs-gray-600));
|
||||||
|
--bs-secondary-focus-ring: color-mix(in oklch, light-dark(var(--bs-gray-500), var(--bs-gray-300)) 50%, var(--bs-bg-body));
|
||||||
|
--bs-secondary-contrast: light-dark(var(--bs-gray-900), var(--bs-white));
|
||||||
|
--bs-bg-body: light-dark(var(--bs-white), var(--bs-gray-975));
|
||||||
|
--bs-bg-1: light-dark(var(--bs-gray-025), var(--bs-gray-950));
|
||||||
|
--bs-bg-2: light-dark(var(--bs-gray-050), var(--bs-gray-900));
|
||||||
|
--bs-bg-3: light-dark(var(--bs-gray-100), var(--bs-gray-800));
|
||||||
|
--bs-bg-4: light-dark(var(--bs-gray-200), var(--bs-gray-700));
|
||||||
|
--bs-bg-fg: var(--bs-fg-body);
|
||||||
|
--bs-bg-white: var(--bs-white);
|
||||||
|
--bs-bg-black: var(--bs-black);
|
||||||
|
--bs-bg-transparent: transparent;
|
||||||
|
--bs-bg-inherit: inherit;
|
||||||
|
--bs-fg-body: light-dark(var(--bs-gray-900), var(--bs-gray-050));
|
||||||
|
--bs-fg-1: light-dark(var(--bs-gray-800), var(--bs-gray-200));
|
||||||
|
--bs-fg-2: light-dark(var(--bs-gray-700), var(--bs-gray-300));
|
||||||
|
--bs-fg-3: light-dark(var(--bs-gray-600), var(--bs-gray-500));
|
||||||
|
--bs-fg-4: light-dark(var(--bs-gray-500), var(--bs-gray-600));
|
||||||
|
--bs-fg-bg: var(--bs-bg-body);
|
||||||
|
--bs-fg-white: var(--bs-white);
|
||||||
|
--bs-fg-black: var(--bs-black);
|
||||||
|
--bs-fg-inherit: inherit;
|
||||||
|
--bs-border-bg: var(--bs-bg-body);
|
||||||
|
--bs-border-body: light-dark(var(--bs-gray-300), var(--bs-gray-800));
|
||||||
|
--bs-border-muted: light-dark(var(--bs-gray-200), var(--bs-gray-800));
|
||||||
|
--bs-border-subtle: light-dark(color-mix(in oklch, var(--bs-gray-100), var(--bs-gray-200)), color-mix(in oklch, var(--bs-gray-800), var(--bs-gray-900)));
|
||||||
|
--bs-border-emphasized: light-dark(var(--bs-gray-400), var(--bs-gray-600));
|
||||||
|
--bs-border-white: var(--bs-white);
|
||||||
|
--bs-border-black: var(--bs-black);
|
||||||
|
--bs-breakpoint-xs: 0;
|
||||||
|
--bs-breakpoint-sm: 576px;
|
||||||
|
--bs-breakpoint-md: 768px;
|
||||||
|
--bs-breakpoint-lg: 1024px;
|
||||||
|
--bs-breakpoint-xl: 1280px;
|
||||||
|
--bs-breakpoint-2xl: 1536px;
|
||||||
|
--bs-spacer-0: 0;
|
||||||
|
--bs-spacer-1: 0.25rem;
|
||||||
|
--bs-spacer-2: 0.375rem;
|
||||||
|
--bs-spacer-3: 0.5rem;
|
||||||
|
--bs-spacer-4: 0.75rem;
|
||||||
|
--bs-spacer-5: 1rem;
|
||||||
|
--bs-spacer-6: 1.25rem;
|
||||||
|
--bs-spacer-7: 1.5rem;
|
||||||
|
--bs-spacer-8: 1.75rem;
|
||||||
|
--bs-spacer-9: 2rem;
|
||||||
|
--bs-spacer-10: 2.25rem;
|
||||||
|
--bs-spacer-11: 2.5rem;
|
||||||
|
--bs-spacer-12: 3rem;
|
||||||
|
--bs-radius-0: 0;
|
||||||
|
--bs-radius-1: 0.125rem;
|
||||||
|
--bs-radius-2: 0.1875rem;
|
||||||
|
--bs-radius-3: 0.25rem;
|
||||||
|
--bs-radius-4: 0.375rem;
|
||||||
|
--bs-radius-5: 0.5rem;
|
||||||
|
--bs-radius-6: 0.625rem;
|
||||||
|
--bs-radius-7: 0.75rem;
|
||||||
|
--bs-radius-8: 0.875rem;
|
||||||
|
--bs-radius-9: 1rem;
|
||||||
|
--bs-radius-pill: 50rem;
|
||||||
|
--bs-box-shadow: 0 .125rem .25rem -.0625rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.04 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 .375rem .75rem -.125rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.05 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 .75rem 1.5rem -.25rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.06 * var(--bs-shadow-strength) * var(--bs-so, 1)));
|
||||||
|
--bs-box-shadow-xs: 0 0.0625rem 0.125rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h/calc(0.04 * var(--bs-shadow-strength) * var(--bs-so, 1)));
|
||||||
|
--bs-box-shadow-sm: 0 .0625rem .125rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.04 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 .125rem .375rem -.0625rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.05 * var(--bs-shadow-strength) * var(--bs-so, 1)));
|
||||||
|
--bs-box-shadow-lg: 0 .125rem .375rem -.0625rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.05 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 .375rem 1rem -.1875rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.06 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 .75rem 2rem -.375rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.07 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 1.5rem 3.5rem -.75rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.08 * var(--bs-shadow-strength) * var(--bs-so, 1)));
|
||||||
|
--bs-box-shadow-xl: 0 .1875rem .5rem -.0625rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.05 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 .5rem 1.25rem -.1875rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.06 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 1rem 2.5rem -.375rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.07 * var(--bs-shadow-strength) * var(--bs-so, 1))), 0 2rem 5rem -.75rem oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h / calc(.09 * var(--bs-shadow-strength) * var(--bs-so, 1)));
|
||||||
|
--bs-box-shadow-inset: inset 0 1px 2px light-dark(oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h/calc(8% * var(--bs-so, 1))), oklch(from var(--bs-sc, var(--bs-shadow-color)) l c h/calc(26% * var(--bs-so, 1))));
|
||||||
|
--bs-z-n1: -1;
|
||||||
|
--bs-z-0: 0;
|
||||||
|
--bs-z-1: 1;
|
||||||
|
--bs-z-2: 2;
|
||||||
|
--bs-z-3: 3;
|
||||||
|
--bs-z-menu: 1000;
|
||||||
|
--bs-z-sticky: 1010;
|
||||||
|
--bs-z-fixed: 1020;
|
||||||
|
--bs-z-drawer: 1030;
|
||||||
|
--bs-z-dialog: 1040;
|
||||||
|
--bs-z-popover: 1050;
|
||||||
|
--bs-z-tooltip: 1060;
|
||||||
|
--bs-z-toast: 1070;
|
||||||
|
color-scheme: light dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root,
|
||||||
|
:host {
|
||||||
|
--bs-shadow-strength: 2.4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[data-bs-theme=dark] {
|
||||||
|
--bs-shadow-strength: 2.4;
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme=light] {
|
||||||
|
--bs-shadow-strength: 1;
|
||||||
|
color-scheme: light;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root,
|
||||||
|
:host {
|
||||||
|
--bs-heading-margin-bottom: var(--bs-spacer-2);
|
||||||
|
--bs-heading-line-height: 1.2;
|
||||||
|
--bs-paragraph-margin-bottom: var(--bs-spacer);
|
||||||
|
--bs-legend-margin-bottom: var(--bs-spacer-2);
|
||||||
|
--bs-legend-font-size: 1.5rem;
|
||||||
|
--bs-list-padding-x: var(--bs-spacer-7);
|
||||||
|
}
|
||||||
|
|
||||||
|
@layer reboot {
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
:root,
|
||||||
|
:host {
|
||||||
|
accent-color: var(--bs-primary-base);
|
||||||
|
}
|
||||||
|
iframe {
|
||||||
|
color-scheme: light dark;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--bs-body-font-family);
|
||||||
|
font-size: var(--bs-body-font-size);
|
||||||
|
font-weight: var(--bs-body-font-weight);
|
||||||
|
line-height: var(--bs-body-line-height);
|
||||||
|
color: var(--bs-fg-body);
|
||||||
|
text-align: var(--bs-body-text-align);
|
||||||
|
background-color: var(--bs-bg-body);
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
margin: var(--bs-hr-margin-y, var(--bs-spacer)) 0;
|
||||||
|
border: 0;
|
||||||
|
border-block-start: var(--bs-border-width) solid var(--bs-hr-border-color);
|
||||||
|
}
|
||||||
|
h6,
|
||||||
|
.h6, h5,
|
||||||
|
.h5, h4,
|
||||||
|
.h4, h3,
|
||||||
|
.h3, h2,
|
||||||
|
.h2, h1,
|
||||||
|
.h1 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: var(--bs-heading-margin-bottom);
|
||||||
|
font-family: var(--bs-heading-font-family);
|
||||||
|
font-style: var(--bs-heading-font-style);
|
||||||
|
font-weight: var(--bs-heading-font-weight, var(--bs-font-weight-medium));
|
||||||
|
line-height: var(--bs-heading-line-height);
|
||||||
|
color: var(--bs-heading-color);
|
||||||
|
}
|
||||||
|
h1,
|
||||||
|
.h1 {
|
||||||
|
font-size: var(--bs-font-size-3xl);
|
||||||
|
}
|
||||||
|
h2,
|
||||||
|
.h2 {
|
||||||
|
font-size: var(--bs-font-size-2xl);
|
||||||
|
}
|
||||||
|
h3,
|
||||||
|
.h3 {
|
||||||
|
font-size: var(--bs-font-size-xl);
|
||||||
|
}
|
||||||
|
h4,
|
||||||
|
.h4 {
|
||||||
|
font-size: var(--bs-font-size-lg);
|
||||||
|
}
|
||||||
|
h5,
|
||||||
|
.h5 {
|
||||||
|
font-size: var(--bs-font-size-md);
|
||||||
|
}
|
||||||
|
h6,
|
||||||
|
.h6 {
|
||||||
|
font-size: var(--bs-font-size-sm);
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: var(--bs-paragraph-margin-bottom);
|
||||||
|
}
|
||||||
|
abbr[title] {
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
-webkit-text-decoration-skip-ink: none;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
}
|
||||||
|
.initialism {
|
||||||
|
font-size: var(--bs-initialism-font-size, var(--bs-font-size-xs));
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
address {
|
||||||
|
margin-bottom: var(--bs-spacer);
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
padding-inline-start: var(--bs-list-padding-x);
|
||||||
|
}
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: var(--bs-spacer);
|
||||||
|
}
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
dt {
|
||||||
|
font-weight: var(--bs-dt-font-weight, var(--bs-font-weight-bold));
|
||||||
|
}
|
||||||
|
dd {
|
||||||
|
margin-inline-start: 0;
|
||||||
|
margin-bottom: var(--bs-spacer-2);
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 var(--bs-spacer);
|
||||||
|
}
|
||||||
|
blockquote > * {
|
||||||
|
margin-block: 0;
|
||||||
|
}
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: var(--bs-font-weight-bolder);
|
||||||
|
}
|
||||||
|
small,
|
||||||
|
.small {
|
||||||
|
font-size: var(--bs-small-font-size, 87.5%);
|
||||||
|
}
|
||||||
|
mark,
|
||||||
|
.mark {
|
||||||
|
--bs-mark-padding: 0.1875em;
|
||||||
|
--bs-mark-color: var(--bs-fg-body);
|
||||||
|
--bs-mark-bg: light-dark(var(--bs-yellow-100), var(--bs-yellow-900));
|
||||||
|
padding: var(--bs-mark-padding);
|
||||||
|
color: var(--bs-mark-color);
|
||||||
|
background-color: var(--bs-mark-bg);
|
||||||
|
}
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: var(--bs-sub-sup-font-size, 0.75em);
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: var(--bs-theme-fg, var(--bs-link-color));
|
||||||
|
-webkit-text-decoration: var(--bs-link-decoration);
|
||||||
|
text-decoration: var(--bs-link-decoration);
|
||||||
|
text-underline-offset: var(--bs-link-underline-offset);
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: var(--bs-theme-fg-emphasis, var(--bs-link-hover-color));
|
||||||
|
-webkit-text-decoration: var(--bs-link-hover-decoration, var(--bs-link-decoration));
|
||||||
|
text-decoration: var(--bs-link-hover-decoration, var(--bs-link-decoration));
|
||||||
|
}
|
||||||
|
a:not([href], [class]), a:not([href], [class]):hover {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: var(--bs-font-mono);
|
||||||
|
font-size: 0.875em;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: var(--bs-spacer);
|
||||||
|
overflow: auto;
|
||||||
|
font-size: var(--bs-code-font-size);
|
||||||
|
color: var(--bs-code-color, inherit);
|
||||||
|
scrollbar-gutter: stable;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
font-size: inherit;
|
||||||
|
color: inherit;
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
font-size: var(--bs-code-font-size);
|
||||||
|
color: var(--bs-code-color);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
a > code {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
kbd {
|
||||||
|
--bs-kbd-padding-y: 0.125rem;
|
||||||
|
--bs-kbd-padding-x: var(--bs-spacer-1);
|
||||||
|
--bs-kbd-font-size: 0.75em;
|
||||||
|
--bs-kbd-color: var(--bs-bg-body);
|
||||||
|
--bs-kbd-bg: var(--bs-fg-2);
|
||||||
|
--bs-kbd-border-radius: var(--bs-radius-3);
|
||||||
|
padding: var(--bs-kbd-padding-y) var(--bs-kbd-padding-x);
|
||||||
|
font-size: var(--bs-kbd-font-size);
|
||||||
|
color: var(--bs-kbd-color);
|
||||||
|
background-color: var(--bs-kbd-bg);
|
||||||
|
border-radius: var(--bs-kbd-border-radius);
|
||||||
|
}
|
||||||
|
kbd kbd {
|
||||||
|
padding: 0;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 0 0 var(--bs-spacer);
|
||||||
|
}
|
||||||
|
img,
|
||||||
|
svg {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
caption-side: bottom;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
caption {
|
||||||
|
padding-block: var(--bs-spacer-2);
|
||||||
|
color: var(--bs-fg-3);
|
||||||
|
text-align: start;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
text-align: -webkit-match-parent;
|
||||||
|
}
|
||||||
|
thead,
|
||||||
|
tbody,
|
||||||
|
tfoot,
|
||||||
|
tr,
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
border-color: inherit;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
button:focus:not(:focus-visible) {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
input:is([type=date], [type=datetime-local], [type=month], [type=week], [type=time]) {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
input:is([type=date], [type=datetime-local], [type=month], [type=week], [type=time])::-webkit-calendar-picker-indicator {
|
||||||
|
position: absolute;
|
||||||
|
inset-inline-end: var(--bs-control-padding-x, 0.75rem);
|
||||||
|
}
|
||||||
|
[role=button] {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
select:disabled {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
[list]:not([type=date], [type=datetime-local], [type=month], [type=week], [type=time])::-webkit-calendar-picker-indicator {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
button,
|
||||||
|
[type=button],
|
||||||
|
[type=reset],
|
||||||
|
[type=submit] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
button:not(:disabled),
|
||||||
|
[type=button]:not(:disabled),
|
||||||
|
[type=reset]:not(:disabled),
|
||||||
|
[type=submit]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
legend {
|
||||||
|
float: inline-start;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: var(--bs-legend-margin-bottom);
|
||||||
|
font-size: var(--bs-legend-font-size);
|
||||||
|
font-weight: var(--bs-legend-font-weight);
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
legend + * {
|
||||||
|
clear: inline-start;
|
||||||
|
}
|
||||||
|
::-webkit-datetime-edit-fields-wrapper,
|
||||||
|
::-webkit-datetime-edit-text,
|
||||||
|
::-webkit-datetime-edit-millisecond-field,
|
||||||
|
::-webkit-datetime-edit-second-field,
|
||||||
|
::-webkit-datetime-edit-minute-field,
|
||||||
|
::-webkit-datetime-edit-hour-field,
|
||||||
|
::-webkit-datetime-edit-meridiem-field,
|
||||||
|
::-webkit-datetime-edit-ampm-field,
|
||||||
|
::-webkit-datetime-edit-day-field,
|
||||||
|
::-webkit-datetime-edit-week-field,
|
||||||
|
::-webkit-datetime-edit-month-field,
|
||||||
|
::-webkit-datetime-edit-year-field {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
::-webkit-date-and-time-value {
|
||||||
|
text-align: start;
|
||||||
|
}
|
||||||
|
::-webkit-inner-spin-button,
|
||||||
|
::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
[type=search] {
|
||||||
|
-webkit-appearance: textfield;
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
[type=search]::-webkit-search-cancel-button {
|
||||||
|
cursor: pointer;
|
||||||
|
filter: grayscale(1);
|
||||||
|
}
|
||||||
|
[type=tel],
|
||||||
|
[type=url],
|
||||||
|
[type=email],
|
||||||
|
[type=number] {
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
::-webkit-color-swatch-wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
::file-selector-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["../../scss/_banner.scss","../../scss/_colors.scss","../../scss/mixins/_tokens.scss","bootstrap-reboot.css","../../scss/_root.scss","../../scss/content/_reboot.scss","../../scss/mixins/_border-radius.scss"],"names":[],"mappings":"AAEA;;;;GAAA;AC2GA;;ECxGI,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,qCAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,mCAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAA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rap Reboot v6.0.0-alpha.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2026 The Bootstrap Authors
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
:root,:host{--bs-blue-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .24 240));--bs-blue-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .24 240));--bs-blue-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .24 240));--bs-blue-200:color-mix(in oklch, var(--bs-white) 60%, oklch(60% .24 240));--bs-blue-300:color-mix(in oklch, var(--bs-white) 40%, oklch(60% .24 240));--bs-blue-400:color-mix(in oklch, var(--bs-white) 20%, oklch(60% .24 240));--bs-blue-500:oklch(60% .24 240);--bs-blue-600:color-mix(in oklch, var(--bs-black) 16%, oklch(60% .24 240));--bs-blue-700:color-mix(in oklch, var(--bs-black) 32%, oklch(60% .24 240));--bs-blue-800:color-mix(in oklch, var(--bs-black) 48%, oklch(60% .24 240));--bs-blue-900:color-mix(in oklch, var(--bs-black) 64%, oklch(60% .24 240));--bs-blue-950:color-mix(in oklch, var(--bs-black) 70%, oklch(60% .24 240));--bs-blue-975:color-mix(in oklch, var(--bs-black) 76%, oklch(60% .24 240));--bs-indigo-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .26 288));--bs-indigo-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .26 288));--bs-indigo-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .26 288));--bs-indigo-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .26 288));--bs-indigo-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .26 288));--bs-indigo-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .26 288));--bs-indigo-500:oklch(56% .26 288);--bs-indigo-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .26 288));--bs-indigo-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .26 288));--bs-indigo-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .26 288));--bs-indigo-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .26 288));--bs-indigo-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .26 288));--bs-indigo-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .26 288));--bs-violet-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .24 300));--bs-violet-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .24 300));--bs-violet-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .24 300));--bs-violet-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .24 300));--bs-violet-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .24 300));--bs-violet-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .24 300));--bs-violet-500:oklch(56% .24 300);--bs-violet-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .24 300));--bs-violet-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .24 300));--bs-violet-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .24 300));--bs-violet-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .24 300));--bs-violet-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .24 300));--bs-violet-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .24 300));--bs-purple-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .24 320));--bs-purple-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .24 320));--bs-purple-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .24 320));--bs-purple-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .24 320));--bs-purple-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .24 320));--bs-purple-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .24 320));--bs-purple-500:oklch(56% .24 320);--bs-purple-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .24 320));--bs-purple-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .24 320));--bs-purple-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .24 320));--bs-purple-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .24 320));--bs-purple-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .24 320));--bs-purple-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .24 320));--bs-pink-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .22 4));--bs-pink-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .22 4));--bs-pink-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .22 4));--bs-pink-200:color-mix(in oklch, var(--bs-white) 60%, oklch(60% .22 4));--bs-pink-300:color-mix(in oklch, var(--bs-white) 40%, oklch(60% .22 4));--bs-pink-400:color-mix(in oklch, var(--bs-white) 20%, oklch(60% .22 4));--bs-pink-500:oklch(60% .22 4);--bs-pink-600:color-mix(in oklch, var(--bs-black) 16%, oklch(60% .22 4));--bs-pink-700:color-mix(in oklch, var(--bs-black) 32%, oklch(60% .22 4));--bs-pink-800:color-mix(in oklch, var(--bs-black) 48%, oklch(60% .22 4));--bs-pink-900:color-mix(in oklch, var(--bs-black) 64%, oklch(60% .22 4));--bs-pink-950:color-mix(in oklch, var(--bs-black) 70%, oklch(60% .22 4));--bs-pink-975:color-mix(in oklch, var(--bs-black) 76%, oklch(60% .22 4));--bs-red-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .22 20));--bs-red-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .22 20));--bs-red-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .22 20));--bs-red-200:color-mix(in oklch, var(--bs-white) 60Line truncated
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sourceRoot":null,"mappings":";;;;;AE6GA,0qdEtGA,0BAAA,cCkEE,uCAWA,gDAiBA,wCAaA,4UAcA,sIAYA,sUAUA,yCAMA,yCAMA,wCAMA,wCAMA,wCAMA,wCAWA,+DAWA,sKAOA,qGAOA,6EAQA,oDAKA,qDAOA,wCAOA,mEAMA,0DAOA,uCAEE,4BASF,kDASA,uDAOA,uOAaA,4GAQA,kBACA,cAIA,oPAKE,mTAYA,qFASF,mEAaA,0KAUE,2DAOF,wFAME,qBAKF,oYAQE,gCAUF,mCAMA,8BASA,mDAKA,+EASA,sDAKA,kFAeA,2BAOA,uBAUA,2CAMA,yGAWA,mGAGE,0LASF,6BAIA,wBAME,0BAQF,6IASA,0EAOI,2HAQJ,yBAWA,iDAYA,8LASE,4BAQF,iDAAA,uCAAA,oDAAA,+CAAA,+CAAA,6CAAA,iDAAA,6CAAA,4CAAA,6CAAA,8CAAA,6CAgBA,+CAIA,wCAAA,wCAWA,+DAKE,8EASF,+DASA,oDAMA,yCAOA,8DAOA,4BAQA,yCASA,iCAQA,iCDvpBF,gEAoMA,mzaASA,mCACE,sCAMF,gEAKA,gECnMA","sources":["bootstrap-reboot.css","../../scss/_banner.scss","../../scss/_colors.scss","../../scss/mixins/_tokens.scss","../../scss/_root.scss","../../scss/content/_reboot.scss","../../scss/mixins/_border-radius.scss"],"sourcesContent":["/*!\n * Bootstrap Reboot v6.0.0-alpha.2 (https://getbootstrap.com/)\n * Copyright 2011-2026 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n:root,\n:host {\n --blue-025: color-mix(in oklch, var(--white) 94%, oklch(60% 0.24 240deg));\n --blue-050: color-mix(in oklch, var(--white) 90%, oklch(60% 0.24 240deg));\n --blue-100: color-mix(in oklch, var(--white) 80%, oklch(60% 0.24 240deg));\n --blue-200: color-mix(in oklch, var(--white) 60%, oklch(60% 0.24 240deg));\n --blue-300: color-mix(in oklch, var(--white) 40%, oklch(60% 0.24 240deg));\n --blue-400: color-mix(in oklch, var(--white) 20%, oklch(60% 0.24 240deg));\n --blue-500: oklch(60% 0.24 240deg);\n --blue-600: color-mix(in oklch, var(--black) 16%, oklch(60% 0.24 240deg));\n --blue-700: color-mix(in oklch, var(--black) 32%, oklch(60% 0.24 240deg));\n --blue-800: color-mix(in oklch, var(--black) 48%, oklch(60% 0.24 240deg));\n --blue-900: color-mix(in oklch, var(--black) 64%, oklch(60% 0.24 240deg));\n --blue-950: color-mix(in oklch, var(--black) 70%, oklch(60% 0.24 240deg));\n --blue-975: color-mix(in oklch, var(--black) 76%, oklch(60% 0.24 240deg));\n --indigo-025: color-mix(in oklch, var(--white) 94%, oklch(56% 0.26 288deg));\n --indigo-050: color-mix(in oklch, var(--white) 90%, oklch(56% 0.26 288deg));\n --indigo-100: color-mix(in oklch, var(--white) 80%, oklch(56% 0.26 288deg));\n --indigo-200: color-mix(in oklch, var(--white) 60%, oklch(56% 0.26 288deg));\n --indigo-300: color-mix(in oklch, var(--white) 40%, oklch(56% 0.26 288deg));\n --indigo-400: color-mix(in oklch, var(--white) 20%, oklch(56% 0.26 288deg));\n --indigo-500: oklch(56% 0.26 288deg);\n --indigo-600: color-mix(in oklch, var(--black) 16%, oklch(56% 0.26 288deg));\n --indigo-700: color-mix(in oklch, var(--black) 32%, oklch(56% 0.26 288deg));\n --indigo-800: color-mix(in oklch, var(--black) 48%, oklch(56% 0.26 288deg));\n --indigo-900: color-mix(in oklch, var(--black) 64%, oklch(56% 0.26 288deg));\n --indigo-950: color-mix(in oklch, var(--black) 70%, oklch(56% 0.26 288deg));\n --indigo-975: color-mix(in oklch, var(--black) 76%, oklch(56% 0.26 288deg));\n --violet-025: color-mix(in oklch, var(--white) 94%, oklch(56% 0.24 300deg));\n --violet-050: color-mix(in oklch, var(--white) 90%, oklch(56% 0.24 300deg));\n --violet-100: color-mix(in oklch, var(--white) 80%, oklch(56% 0.24 300deg));\n --violet-200: color-mix(in oklch, var(--white) 60%, oklch(56% 0.24 300deg));\n --violet-300: color-mix(in oklch, var(--white) 40%, oklch(56% 0.24 300deg));\n --violet-400: color-mix(in oklch, var(--white) 20%, oklch(56% 0.24 300deg));\n --violet-500: oklch(56% 0.24 300deg);\n --violet-600: color-mix(in oklch, var(--black) 16%, oklch(56% 0.24 300deg));\n --violet-700: color-mix(in oklch, var(--black) 32%, oklch(56% 0.24 300deg));\n --violet-800: color-mix(in oklch, var(--black) 48%, oklch(56% 0.24 300deg));\n --violet-900: color-mix(in oklch, var(--black) 64%, oklch(56% 0.24 300deg));\n --violet-950: color-mix(in oklch, var(--black) 70%, oklch(56% 0.24 300deg));\n --violet-975: color-mix(in oklch, var(--black) 76%, oklch(56% 0.24 300deg));\n --purple-025: color-mix(in oklch, var(--white) 94%, oklch(56% 0.24 320deg));\n --purple-050: color-mix(in oklch, var(--white) 90%, oklch(56% 0.24 320deg));\n --purple-100: color-mix(in oklch, var(--white) 80%, oklch(56% 0.24 320deg));\n --purple-200: color-mix(in oklch, var(--white) 60%, oklch(56% 0.24 320deg));\n --purple-300: color-mix(in oklch, var(--white) 40%, oklch(56% 0.24 320deg));\n --purple-400: color-mix(in oklch, var(--white) 20%, oklch(56% 0.24 320deg));\n --purple-500: oklch(56% 0.24 320deg);\n --purple-600: color-mix(in oklch, var(--black) 16%, oklch(56% 0.24 320deg));\n --purple-700: color-mix(in oklch, var(--black) 32%, oklch(56% 0.24 320deg));\n --purple-800: color-mix(in oklch, var(--black) 48%, oklch(56% 0.24 320deg));\n --purple-900: color-mix(in oklch, var(--black) 64%, oklch(56% 0.24 320deg));\n --purple-950: color-mix(in oklch, var(--black) 70%, oklch(56% 0.24 320deg));\n --purple-97Line truncated
|
||||||
+8853
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["../../scss/_banner.scss","../../scss/_colors.scss","../../scss/mixins/_tokens.scss","bootstrap-utilities.css","../../scss/_root.scss","../../scss/helpers/_focus-ring.scss","../../scss/helpers/_hover-lift.scss","../../scss/mixins/_transition.scss","../../scss/mixins/_box-shadow.scss","../../scss/helpers/_icon-link.scss","../../scss/helpers/_position.scss","../../scss/layout/_breakpoints.scss","../../scss/helpers/_stacks.scss","../../scss/helpers/_theme-colors.scss","../../scss/_theme.scss","../../scss/helpers/_visually-hidden.scss","../../scss/mixins/_visually-hidden.scss","../../scss/helpers/_stretched-link.scss","../../scss/helpers/_text-truncation.scss","../../scss/mixins/_text-truncate.scss","../../scss/helpers/_vr.scss","../../scss/mixins/_forced-colors.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAEA;;;;GAAA;AC2GA;;ECxGI,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,qCAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,mCAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6EAAA;EAAA,6E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uKAAA;EAAA,yCAAA;EAAA,kCAAA;EAAA,gEAAA;EAAA,yEAAA;EAAA,gCAAA;EAAA,uEAAA;EAAA,sEAAA;EAAA,oEAAA;EAAA,gKAAA;EAAA,sCAAA;EAAA,qCAAA;EAAA,mEAAA;EAAA,yEAAA;EAAA,mEAAA;EAAA,0EAAA;EAAA,yEAAA;EAAA,uEAAA;EAAA,uHAAA;EAAA,sEAAA;EAAA,uCAAA;EAAA,qEAAA;EAAA,8EAAA;Line truncated
|
||||||
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Utilities v6.0.0-alpha.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2026 The Bootstrap Authors
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
:root,:host{--bs-blue-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .24 240));--bs-blue-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .24 240));--bs-blue-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .24 240));--bs-blue-200:color-mix(in oklch, var(--bs-white) 60%, oklch(60% .24 240));--bs-blue-300:color-mix(in oklch, var(--bs-white) 40%, oklch(60% .24 240));--bs-blue-400:color-mix(in oklch, var(--bs-white) 20%, oklch(60% .24 240));--bs-blue-500:oklch(60% .24 240);--bs-blue-600:color-mix(in oklch, var(--bs-black) 16%, oklch(60% .24 240));--bs-blue-700:color-mix(in oklch, var(--bs-black) 32%, oklch(60% .24 240));--bs-blue-800:color-mix(in oklch, var(--bs-black) 48%, oklch(60% .24 240));--bs-blue-900:color-mix(in oklch, var(--bs-black) 64%, oklch(60% .24 240));--bs-blue-950:color-mix(in oklch, var(--bs-black) 70%, oklch(60% .24 240));--bs-blue-975:color-mix(in oklch, var(--bs-black) 76%, oklch(60% .24 240));--bs-indigo-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .26 288));--bs-indigo-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .26 288));--bs-indigo-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .26 288));--bs-indigo-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .26 288));--bs-indigo-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .26 288));--bs-indigo-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .26 288));--bs-indigo-500:oklch(56% .26 288);--bs-indigo-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .26 288));--bs-indigo-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .26 288));--bs-indigo-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .26 288));--bs-indigo-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .26 288));--bs-indigo-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .26 288));--bs-indigo-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .26 288));--bs-violet-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .24 300));--bs-violet-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .24 300));--bs-violet-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .24 300));--bs-violet-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .24 300));--bs-violet-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .24 300));--bs-violet-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .24 300));--bs-violet-500:oklch(56% .24 300);--bs-violet-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .24 300));--bs-violet-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .24 300));--bs-violet-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .24 300));--bs-violet-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .24 300));--bs-violet-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .24 300));--bs-violet-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .24 300));--bs-purple-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .24 320));--bs-purple-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .24 320));--bs-purple-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .24 320));--bs-purple-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .24 320));--bs-purple-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .24 320));--bs-purple-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .24 320));--bs-purple-500:oklch(56% .24 320);--bs-purple-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .24 320));--bs-purple-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .24 320));--bs-purple-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .24 320));--bs-purple-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .24 320));--bs-purple-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .24 320));--bs-purple-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .24 320));--bs-pink-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .22 4));--bs-pink-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .22 4));--bs-pink-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .22 4));--bs-pink-200:color-mix(in oklch, var(--bs-white) 60%, oklch(60% .22 4));--bs-pink-300:color-mix(in oklch, var(--bs-white) 40%, oklch(60% .22 4));--bs-pink-400:color-mix(in oklch, var(--bs-white) 20%, oklch(60% .22 4));--bs-pink-500:oklch(60% .22 4);--bs-pink-600:color-mix(in oklch, var(--bs-black) 16%, oklch(60% .22 4));--bs-pink-700:color-mix(in oklch, var(--bs-black) 32%, oklch(60% .22 4));--bs-pink-800:color-mix(in oklch, var(--bs-black) 48%, oklch(60% .22 4));--bs-pink-900:color-mix(in oklch, var(--bs-black) 64%, oklch(60% .22 4));--bs-pink-950:color-mix(in oklch, var(--bs-black) 70%, oklch(60% .22 4));--bs-pink-975:color-mix(in oklch, var(--bs-black) 76%, oklch(60% .22 4));--bs-red-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .22 20));--bs-red-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .22 20));--bs-red-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .22 20));--bs-red-200:color-mix(in oklch, var(--bs-white) 60Line truncated
|
||||||
|
/*# sourceMappingURL=bootstrap-utilities.min.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sourceRoot":null,"mappings":";;;;;AE6GA,0qdEtGA,wEAAA,eCNE,yHCoBA,4LCKM,8CDLN,8MAOE,iJGPF,4hBAUE,wHFLI,8CEKJ,+DAYE,yICtCJ,mEAMA,sEAWI,6DAMA,mECmGF,sBDzGE,iEAMA,wECmGF,sBDzGE,iEAMA,wECmGF,uBDzGE,iEAMA,wECmGF,uBDzGE,iEAMA,wECmGF,uBDzGE,qEAMA,4EExBJ,4CAIA,0NAUE,mEAMA,mED4ME,0BClNF,uEAMA,wED4ME,0BClNF,uEAMA,wED4ME,2BClNF,uEAMA,wED4ME,2BClNF,uEAMA,wED4ME,2BClNF,2EAMA,4EEqEA,8ZAAA,oZAAA,8ZAAA,oZAAA,8ZAAA,gYAAA,8ZAAA,kbAnBF,6PDjEA,uGAKA,uDEXA,kQCeA,4HAKA,oGCHA,8CAGE,oGCpBF,yEEAA,0JCKE,8BDLF,8BhBIF,iBkBqOI,wCAAA,8BAAA,oCAAA,oCAAA,8CAAA,wCAAA,6CAAA,4BAAA,4BAAA,4BAAA,8BAAA,8BAAA,gCAAA,4BAAA,uBAAA,uCAAA,mCAAA,iCAAA,wCAAA,iCAAA,qBAAA,wBAAA,uBAAA,wBAAA,uBAAA,6BAAA,iCAAA,mCAAA,iCAAA,iCAAA,qCAAA,uCAAA,qCAAA,iCAAA,qCAAA,uCAAA,qCAAA,4CAAA,mCAAA,yBAAA,qCAAA,uBAAA,qBAAA,mCAAA,uBAAA,+BAAA,iCAAA,qBAAA,mCAAA,6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EAAA,iFAAA,mFAAA,+EAAA,iFAAA,6EAAA,iFAAA,+EAAA,iFAAA,2EAAA,mJAAA,8EAAA,gHAAA,iEAAA,6EAAA,+Line truncated
|
||||||
Vendored
+19421
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["bootstrap.css","../../scss/_banner.scss","../../scss/_colors.scss","../../scss/mixins/_tokens.scss","../../scss/_root.scss","../../scss/content/_reboot.scss","../../scss/mixins/_border-radius.scss","../../scss/content/_lists.scss","../../scss/mixins/_lists.scss","../../scss/content/_blockquote.scss","../../scss/content/_tables.scss","../../scss/layout/_breakpoints.scss","../../scss/content/_images.scss","../../scss/mixins/_image.scss","../../scss/mixins/_box-shadow.scss","../../scss/content/_prose.scss","../../scss/mixins/_transition.scss","../../scss/layout/_containers.scss","../../scss/_config.scss","../../scss/layout/_grid.scss","../../scss/mixins/_grid.scss","../../scss/forms/_labels.scss","../../scss/forms/_form-text.scss","../../scss/forms/_form-control.scss","../../scss/mixins/_focus-ring.scss","../../scss/forms/_check.scss","../../scss/mixins/_mask-icon.scss","../../scss/mixins/_forced-colors.scss","../../scss/forms/_radio.scss","../../scss/forms/_switch.scss","../../scss/forms/_form-range.scss","../../scss/mixins/_gradients.scss","../../scss/forms/_floating-labels.scss","../../scss/forms/_input-group.scss","../../scss/forms/_strength.scss","../../scss/forms/_otp-input.scss","../../scss/forms/_form-adorn.scss","../../scss/forms/_combobox-control.scss","../../scss/forms/_combobox.scss","../../scss/forms/_datepicker.scss","../../scss/mixins/_text-truncate.scss","../../scss/forms/_form-field.scss","../../scss/forms/_validation.scss","../../scss/mixins/_form-validation.scss","../../scss/buttons/_button.scss","../../scss/buttons/_button-group.scss","../../scss/buttons/_close.scss","../../scss/_accordion.scss","../../scss/_alert.scss","../../scss/_avatar.scss","../../scss/_badge.scss","../../scss/_breadcrumb.scss","../../scss/_chip.scss","../../scss/_card.scss","../../scss/_carousel.scss","../../scss/_dialog.scss","../../scss/mixins/_dialog-shared.scss","../../scss/_menu.scss","../../scss/_list-group.scss","../../scss/_nav.scss","../../scss/_nav-overflow.scss","../../scss/_navbar.scss","../../scss/_drawer.scss","../../scss/_pagination.scss","../../scss/_placeholder.scss","../../scss/_popover.scss","../../scss/mixins/_reset-text.scss","../../scss/_progress.scss","../../scss/_spinner.scss","../../scss/_stepper.scss","../../scss/_toasts.scss","../../scss/_tooltip.scss","../../scss/_transitions.scss","../../scss/helpers/_focus-ring.scss","../../scss/helpers/_hover-lift.scss","../../scss/helpers/_icon-link.scss","../../scss/helpers/_position.scss","../../scss/helpers/_stacks.scss","../../scss/helpers/_theme-colors.scss","../../scss/_theme.scss","../../scss/helpers/_visually-hidden.scss","../../scss/mixins/_visually-hidden.scss","../../scss/helpers/_stretched-link.scss","../../scss/helpers/_text-truncation.scss","../../scss/helpers/_vr.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACEhB;;;;GAAA;AC2GA;;ECxGI,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,qCAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,iFAAA;EAAA,uCAAA;EA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A,gFAAA;EAAA,gFAAA;EAAA,gFAAA;EAAA,gFAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,qCAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,qCAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,qCAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EAAA,+EAAA;EALine truncated
|
||||||
Vendored
+1
-6
@@ -1,7 +1,2 @@
|
|||||||
@charset "UTF-8";/*!
|
:root,:host{--bs-blue-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .24 240));--bs-blue-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .24 240));--bs-blue-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .24 240));--bs-blue-200:color-mix(in oklch, var(--bs-white) 60%, oklch(60% .24 240));--bs-blue-300:color-mix(in oklch, var(--bs-white) 40%, oklch(60% .24 240));--bs-blue-400:color-mix(in oklch, var(--bs-white) 20%, oklch(60% .24 240));--bs-blue-500:oklch(60% .24 240);--bs-blue-600:color-mix(in oklch, var(--bs-black) 16%, oklch(60% .24 240));--bs-blue-700:color-mix(in oklch, var(--bs-black) 32%, oklch(60% .24 240));--bs-blue-800:color-mix(in oklch, var(--bs-black) 48%, oklch(60% .24 240));--bs-blue-900:color-mix(in oklch, var(--bs-black) 64%, oklch(60% .24 240));--bs-blue-950:color-mix(in oklch, var(--bs-black) 70%, oklch(60% .24 240));--bs-blue-975:color-mix(in oklch, var(--bs-black) 76%, oklch(60% .24 240));--bs-indigo-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .26 288));--bs-indigo-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .26 288));--bs-indigo-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .26 288));--bs-indigo-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .26 288));--bs-indigo-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .26 288));--bs-indigo-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .26 288));--bs-indigo-500:oklch(56% .26 288);--bs-indigo-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .26 288));--bs-indigo-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .26 288));--bs-indigo-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .26 288));--bs-indigo-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .26 288));--bs-indigo-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .26 288));--bs-indigo-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .26 288));--bs-violet-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .24 300));--bs-violet-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .24 300));--bs-violet-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .24 300));--bs-violet-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .24 300));--bs-violet-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .24 300));--bs-violet-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .24 300));--bs-violet-500:oklch(56% .24 300);--bs-violet-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .24 300));--bs-violet-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .24 300));--bs-violet-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .24 300));--bs-violet-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .24 300));--bs-violet-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .24 300));--bs-violet-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .24 300));--bs-purple-025:color-mix(in oklch, var(--bs-white) 94%, oklch(56% .24 320));--bs-purple-050:color-mix(in oklch, var(--bs-white) 90%, oklch(56% .24 320));--bs-purple-100:color-mix(in oklch, var(--bs-white) 80%, oklch(56% .24 320));--bs-purple-200:color-mix(in oklch, var(--bs-white) 60%, oklch(56% .24 320));--bs-purple-300:color-mix(in oklch, var(--bs-white) 40%, oklch(56% .24 320));--bs-purple-400:color-mix(in oklch, var(--bs-white) 20%, oklch(56% .24 320));--bs-purple-500:oklch(56% .24 320);--bs-purple-600:color-mix(in oklch, var(--bs-black) 16%, oklch(56% .24 320));--bs-purple-700:color-mix(in oklch, var(--bs-black) 32%, oklch(56% .24 320));--bs-purple-800:color-mix(in oklch, var(--bs-black) 48%, oklch(56% .24 320));--bs-purple-900:color-mix(in oklch, var(--bs-black) 64%, oklch(56% .24 320));--bs-purple-950:color-mix(in oklch, var(--bs-black) 70%, oklch(56% .24 320));--bs-purple-975:color-mix(in oklch, var(--bs-black) 76%, oklch(56% .24 320));--bs-pink-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .22 4));--bs-pink-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .22 4));--bs-pink-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .22 4));--bs-pink-200:color-mix(in oklch, var(--bs-white) 60%, oklch(60% .22 4));--bs-pink-300:color-mix(in oklch, var(--bs-white) 40%, oklch(60% .22 4));--bs-pink-400:color-mix(in oklch, var(--bs-white) 20%, oklch(60% .22 4));--bs-pink-500:oklch(60% .22 4);--bs-pink-600:color-mix(in oklch, var(--bs-black) 16%, oklch(60% .22 4));--bs-pink-700:color-mix(in oklch, var(--bs-black) 32%, oklch(60% .22 4));--bs-pink-800:color-mix(in oklch, var(--bs-black) 48%, oklch(60% .22 4));--bs-pink-900:color-mix(in oklch, var(--bs-black) 64%, oklch(60% .22 4));--bs-pink-950:color-mix(in oklch, var(--bs-black) 70%, oklch(60% .22 4));--bs-pink-975:color-mix(in oklch, var(--bs-black) 76%, oklch(60% .22 4));--bs-red-025:color-mix(in oklch, var(--bs-white) 94%, oklch(60% .22 20));--bs-red-050:color-mix(in oklch, var(--bs-white) 90%, oklch(60% .22 20));--bs-red-100:color-mix(in oklch, var(--bs-white) 80%, oklch(60% .22 20));--bs-red-200:color-mix(in oklch, var(--bs-white) 60Line truncated
|
||||||
* Bootstrap v5.1.3 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2021 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2021 Twitter, Inc.
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:iLine truncated
|
|
||||||
/*# sourceMappingURL=bootstrap.min.css.map */
|
/*# sourceMappingURL=bootstrap.min.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sourceRoot":null,"mappings":"AE6GA,0qdEtGA,0BAAA,cCkEE,uCAWA,gDAiBA,wCAaA,4UAcA,sIAYA,sUAUA,yCAMA,yCAMA,wCAMA,wCAMA,wCAMA,wCAWA,+DAWA,sKAOA,qGAOA,6EAQA,oDAKA,qDAOA,wCAOA,mEAMA,0DAOA,uCAEE,4BASF,kDASA,uDAOA,uOAaA,4GAQA,kBACA,cAIA,oPAKE,mTAYA,qFASF,mEAaA,0KAUE,2DAOF,wFAME,qBAKF,oYAQE,gCAUF,mCAMA,8BASA,mDAKA,+EASA,sDAKA,kFAeA,2BAOA,uBAUA,2CAMA,yGAWA,mGAGE,0LASF,6BAIA,wBAME,0BAQF,6IASA,0EAOI,2HAQJ,yBAWA,iDAYA,8LASE,4BAQF,iDAAA,uCAAA,oDAAA,+CAAA,+CAAA,6CAAA,iDAAA,6CAAA,4CAAA,6CAAA,8CAAA,6CAgBA,+CAIA,wCAAA,wCAWA,+DAKE,8EASF,+DASA,oDAMA,yCAOA,8DAOA,4BAQA,yCASA,iCAQA,iCDvpBF,caYI,2NN4GA,sBM5FI,2CN4FJ,sBM5FI,0DN4FJ,uBM5FI,yEN4FJ,uBM5FI,yFN4FJ,uBM5FI,4GE7BJ,gHAGE,qECiEA,gBAIA,sCApBJ,iGAAA,iGAAA,iGAAA,iGAAA,iGAAA,iGAgCI,+BAMI,gCAIE,8GAJF,gCAIE,6GAJF,2BAIE,yGAJF,gCAIE,6GAJF,gCAIE,6GAJF,2BAIE,wGAJF,gCAIE,6GAJF,gCAIE,6GAJF,2BAIE,yGAJF,iCAIE,8GAJF,iCAIE,8GAJF,6BAIE,wGASA,uCAGE,4F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own.
Binary file not shown.
|
After Width: | Height: | Size: 153 B |
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Vendored
+10384
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"bootstrap.bundle.js","names":["isElement","isRTL","isElement","Data","NAME","EVENT_KEY","CLASS_NAME_SHOW","NAME","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","EVENT_DOM_CONTENT_LOADED","NAME","EVENT_KEY","DATA_API_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_POINTERDOWN","EVENT_LOAD_DATA_API","EVENT_CLICK_DATA_API","CLASS_NAME_ACTIVE","SELECTOR_INNER","Default","DefaultType","isRTL","decodeFragment","NAME","EVENT_KEY","DATA_API_KEY","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","Default","DefaultType","computePosition","arrow","flip","offset","shift","size","getComputedStyle","NAME","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","TAB_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","HOME_KEY","END_KEY","ENTER_KEY","SPACE_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","SELECTOR_MENU","SELECTOR_VISIBLE_ITEMS","isRTL","Default","DefaultType","isElement","NAME","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","HOME_KEY","END_KEY","EVENT_CHANGE","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","SELECTOR_MENU","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","EVENT_CHANGE","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_FOCUSIN","EVENT_POINTERDOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","SELECTOR_DATA_TOGGLE","EVENT_KEYDOWN","Default","DefaultType","Calendar","months","Data","NAME","EVENT_KEY","DATA_API_KEY","EVENT_CLICK_DATA_API","CLASS_NAME_INSTANT","SELECTOR_DATA_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","EVENT_RESIZE","CLASS_NAME_SHOW","SELECTOR_MENU","SELECTOR_MENU_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","EVENT_POINTERDOWN","EVENT_POINTERUP","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","EVENT_LOAD_DATA_API","EVENT_RESIZE","EVENT_CLICK_DATA_API","SELECTOR_DATA_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","EVENT_INPUT","SELECTOR_INPUT","Default","DefaultType","NAME","Default","DefaultType","isElement","NAME","DISALLOWED_ATTRIBUTES","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_MOUSEENTER","EVENT_KEYDOWN","isRTL","Default","DefaultType","NAME","SELECTOR_DATA_TOGGLE","EVENT_CLICK","EVENT_FOCUSIN","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","Default","DefaultType","NAME","EVENT_KEY","EVENT_CLICK","EVENT_LOAD_DATA_API","CLASS_NAME_ACTIVE","SELECTOR_MENU_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","NAME","EVENT_KEY","DefaultType","Default"],"sources":["../../js/src/dom/data.ts","../../js/src/dom/event-handler.ts","../../js/src/dom/manipulator.ts","../../js/src/util/index.ts","../../js/src/util/config.ts","../../js/src/base-component.ts","../../js/src/dom/selector-engine.ts","../../js/src/util/component-functions.ts","../../js/src/alert.ts","../../js/src/button.ts","../../js/src/carousel.ts","../../js/src/util/hash-target.ts","../../js/src/collapse.ts","../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../js/src/util/floating-ui.ts","../../js/src/menu.ts","../../js/src/combobox.ts","../../node_modules/vanilla-calendar-pro/index.mjs","../../js/src/datepicker.ts","../../js/src/util/scroll-lock.ts","../../js/src/dialog-base.ts","../../js/src/dialog.ts","../../js/src/util/sanitizer.ts","../../js/src/nav-overflow.ts","../../js/src/util/swipe.ts","../../js/src/drawer.ts","../../js/src/strength.ts","../../js/src/otp-input.ts","../../js/src/util/template-factory.ts","../../js/src/tooltip.ts","../../js/src/popover.ts","../../js/src/range.ts","../../js/src/scrollspy.ts","../../js/src/tab.ts","../../js/src/toast.ts","../../js/src/toggler.ts"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.ts\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map<Element, Map<string, unknown>>()\n\nexport default {\n set(element: Element, key: string, instance: unknown): void {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)!\n\n instanceMap.set(key, instance)\n },\n\n get(element: Element | null, key: string): any {\n if (elemLine truncated
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap v6.0.0-alpha.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
const elementMap=new Map;var data_default={set(e,t,n){elementMap.has(e)||elementMap.set(e,new Map),elementMap.get(e).set(t,n)},get:(e,t)=>e&&elementMap.has(e)&&elementMap.get(e).get(t)||null,remove(e,t){if(!elementMap.has(e))return;const n=elementMap.get(e);n.delete(t),0===n.size&&elementMap.delete(e)}};const namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","input","compositionstart","compositionupdate","compositionend","paste","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerover","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll","scrollend","hashchange"]);function makeEventUid(e,t){return t&&`${t}::${uidEvent++}`||e.uidEvent||uidEvent++}function getElementEvents(e){const t=makeEventUid(e);return e.uidEvent=t,eventRegistry[t]=eventRegistry[t]||{},eventRegistry[t]}function isMouseEventWithinTarget(e){const{delegateTarget:t,relatedTarget:n}=e;return Boolean(n&&t.contains(n))}function bootstrapHandler(e,t,n){const i=n in customEvents;return function s(o){const a=hydrateObj(o,{delegateTarget:e});if(!i||!isMouseEventWithinTarget(a))return s.oneOff&&EventHandler.off(e,n,t),t.apply(e,[a])}}function bootstrapDelegationHandler(e,t,n,i){const s=i in customEvents;return function o(a){const r=e.querySelectorAll(t);for(let{target:l}=a;l&&l!==this;l=l.parentNode)for(const c of r){if(c!==l)continue;const r=hydrateObj(a,{delegateTarget:l});if(s&&isMouseEventWithinTarget(r))return;return o.oneOff&&EventHandler.off(e,i,t,n),n.apply(l,[r])}}}function findHandler(e,t,n,i=null){return Object.values(e).find(e=>e.callable===t&&e.handlerTypeEvent===n&&e.delegationSelector===i)}function normalizeParameters(e,t,n){const i="string"==typeof t,s=i?n:t||n,o=e.replace(stripNameRegex,"");let a=customEvents[o]||o;return nativeEvents.has(a)||(a=e),{isDelegated:i,callable:s,typeEvent:a,handlerTypeEvent:o in customEvents?o:a}}function addHandler(e,t,n,i,s){if("string"!=typeof t||!e)return;const{isDelegated:o,callable:a,typeEvent:r,handlerTypeEvent:l}=normalizeParameters(t,n,i),c=getElementEvents(e),h=c[r]||(c[r]={}),u=findHandler(h,a,l,o?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=makeEventUid(a,t.replace(namespaceRegex,"")),_=o?bootstrapDelegationHandler(e,n,a,l):bootstrapHandler(e,a,l);_.delegationSelector=o?n:null,_.callable=a,_.handlerTypeEvent=l,_.oneOff=s,_.uidEvent=d,h[d]=_,e.addEventListener(r,_,o)}function removeHandler(e,t,n,i){e.removeEventListener(n,i,Boolean(i.delegationSelector)),delete t[n][i.uidEvent]}function removeNamespacedHandlers(e,t,n,i){const s=t[n]||{};for(const[o,a]of Object.entries(s))o.includes(i)&&removeHandler(e,t,n,a)}function trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=hydrateObj(new Event(t,{bubbles:!0,cancelable:!0}),n);return e.dispatchEvent(i),i}const EventHandler={on(e,t,n,i){addHandler(e,t,n,i,!1)},one(e,t,n,i){addHandler(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const{isDelegated:s,callable:o,typeEvent:a,handlerTypeEvent:r}=normalizeParameters(t,n,i),l=a!==t&&r!==t,c=getElementEvents(e),h=c[a]||{},u=t.startsWith(".");if(void 0!==o){if(!Object.keys(h).length)return;const t=findHandler(h,o,r,s?n:null);return void(t&&removeHandler(e,c,a,t))}if(u)for(const n of Object.keys(c))removeNamespacedHandlers(e,c,n,t.slice(1));for(const[n,i]of Object.entries(h)){const s=n.replace(stripUidRegex,"");i.handlerTypeEvent!==r||l&&!t.includes(s)||removeHandler(e,c,a,i)}},trigger:trigger};function hydrateObj(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function normalizeData(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function normalizeDataKey(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Manipulator={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${normalizeDataKey(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${normalizeDataKey(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=normalizeData(e.dataset[i])}return t},getDataAttribute:(e,t)=>normalizeData(e.getAttribute(`data-bs-${normalizeDataKey(t)}`))},MAX_UID=1e6,MILLISECONDS_MULTIPLIELine truncated
|
||||||
|
/*! name: vanilla-calendar-pro v3.4.0 | url: https://github.com/uvarov-frontend/vanilla-calendar-pro */
|
||||||
|
var e=e=>new Date(`${e}T00:00:00`),t=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,n=(n,i)=>n.reduce((n,s)=>{if(s instanceof Date||"number"==typeof s){let e=s instanceof Date?s:new Date(s);n.push(t(e))}else s.match(/^(\d{4}-\d{2}-\d{2})$/g)?n.push(s):s.replace(/(\d{4}-\d{2}-\d{2}).*?(\d{4}-\d{2}-\d{2})/g,(s,o,a)=>{var r;let l=`${o}:${a}`,c=i?i.start.getTime():-1/0,h=null==i||null==(r=i.cursors)?void 0:r.get(l),u=void 0!==h&&h<=c?new Date(h):e(o),d=e(a).setHours(23,59,59,999);if(i){if(d<c)return s;d=Math.min(d,new Date(i.end).setHours(23,59,59,999))}let _=!1;for(let e=u.getTime();e<=d;e=u.setDate(u.getDate()+1))(!i||e>=c)&&(null!=i&&i.cursors&&!_&&(i.cursors.set(l,e),_=!0),n.push(t(u)));return s});return n},[]),a=(e,t)=>{if(t&&t.values.length===e.length){let n=0;for(;n<e.length&&t.values[n]===e[n];)n++;if(n===e.length)return t}return{values:e.slice(),set:new Set(e)}},l=new WeakMap,o=e=>{var t;let i=null!=(t=e.selectedHolidays)&&t[0]?e.selectedHolidays:[],s=JSON.stringify(i.map(e=>e instanceof Date?e.getTime():e)),o=l.get(e);l.set(e,{holidayKey:s,holidays:(null==o?void 0:o.holidayKey)===s?o.holidays:new Set(n(i)),selected:a(e.context.selectedDates,null==o?void 0:o.selected),disabled:a(e.context.disableDates,null==o?void 0:o.disabled),enabled:a(e.context.enableDates,null==o?void 0:o.enabled),min:Date.parse(`${e.context.displayDateMin}T00:00:00`),max:Date.parse(`${e.context.displayDateMax}T00:00:00`),first:Date.parse(`${e.context.selectedDates[0]}T00:00:00`),last:Date.parse(`${e.context.selectedDates[e.context.selectedDates.length-1]}T00:00:00`)})},r=e=>l.get(e),i=["motion","time","annotations","weeks","months"],s=new WeakMap,c={},d=Object.freeze([]),u=e=>{var t;return null==(t=s.get(e))?c:t},m=(e,t=e)=>{if(t.extensions&&t.extensions!==e.extensions&&(new Set(t.extensions).size!==e.extensions.length||t.extensions.some(t=>!e.extensions.includes(t))))throw Error("Calendar extensions are fixed at construction. Create a new Calendar to change them.");let n=u(e),i=(e,t,i)=>{if(e&&!n[t])throw Error(`The "${i}" option requires ${t}. Import { ${t} } from 'vanilla-calendar-pro' and add it to extensions: [${t}].`)};i(t.animation||t.enableSwipe,"motion",t.animation?"animation":"enableSwipe"),i(t.selectionTimeMode,"time","selectionTimeMode"),i(t.popups&&Object.keys(t.popups).length||t.onCreateDateRangeTooltip,"annotations",t.onCreateDateRangeTooltip?"onCreateDateRangeTooltip":"popups"),i("multiple"===t.type,"months","type"),i("week"===t.type||t.enableCollapse||t.enableWeekNumbers||t.onClickWeekDay,"weeks","week"===t.type?"type":t.enableCollapse?"enableCollapse":t.enableWeekNumbers?"enableWeekNumbers":"onClickWeekDay")},p=(e,t,n)=>{var i;return null==(i=u(e).annotations)?void 0:i.tooltip(e,t,n)},h=new WeakMap,v=e=>{let t=h.get(e);return t||(t={lastDateEl:null,isHovering:!1,rangeMin:void 0,rangeMax:void 0,tooltipEl:null,timeoutId:null,frameId:null},h.set(e,t)),t},y=e=>{e.context.mainElement.querySelectorAll("[data-vc-date-hover]").forEach(e=>e.removeAttribute("data-vc-date-hover"))},g=(e,t,n)=>{e.context[t]=n},f=(e,t)=>void 0===t||("function"==typeof t?t(e):t),x=e=>f(e,e.enableDateToggle),b=e=>{if(e.length<3||e.includes(void 0))return e.sort((e,t)=>+new Date(e)-new Date(t));let t=e.map(e=>({date:e,time:+new Date(e)}));return t.sort((e,t)=>e.time-t.time),t.forEach((t,n)=>e[n]=t.date),e},D=e=>{var t;let n=h.get(e);n&&(null==(t=n.cleanup)||t.call(n),n.cleanup=void 0,null!==n.timeoutId&&clearTimeout(n.timeoutId),null!==n.frameId&&cancelAnimationFrame(n.frameId),n.lastDateEl=null,n.tooltipEl=null,n.timeoutId=null,n.frameId=null,h.delete(e))},M=(i,s,o=!0)=>{let a=v(i);if(a.lastDateEl=s,y(i),!a.cleanup){let n=i.context.mainElement,s=(n=>i=>{if(!n.context.selectedDates[0]||1!==n.context.selectedDates.length&&!n.onCreateDateRangeTooltip)return;let s=v(n);if(s.isHovering)return;let o=i.target;s.isHovering=!0,s.frameId=requestAnimationFrame(()=>{var i;s.frameId=null,s.isHovering=!1,!n.context.isDestroyed&&n.context.mainElement.contains(o)&&(1===n.context.selectedDates.length?((n,i)=>{var s;let o=v(n);if(n.context.mainElement.hasAttribute("data-vc-dragging")||!i||null==n||null==(s=n.context)||!s.selectedDates[0])return;if(!i.closest('[data-vc="dates"]'))return o.lastDateEl=null,p(n,o.tooltipEl,null),void y(n);let a=i.closest("[data-vc-date]");if(!a||o.lastDateEl===a)return;o.lastDateEl=a,p(n,o.tooltipEl,a),y(n);let r=a.dataset.vcDate,l=e(n.context.selectedDates[0]),c=e(r),[h,u]=l<c?[l,c]:[c,l],[d,_]=l<c?[n.context.selectedDates[0],r]:[r,n.context.selectedDates[0]],m=new Set(n.context.disableDates),g=new Date(h);for(;g<=u&&m.has(t(g));)g.setDate(g.getDate()+1);g<=u&&n.context.mainElement.querySelectorAll("[data-vc-date]").forEach(t=>{let n=t.dataset.vcDate;if(n===d||n===_)t.dataset.vcDateHover=d===_?"first-and-last":n===d?"first":"last";else{let i=e(n);i>=h&&i<=u&&!m.has(n)&&(t.dataset.vcDateHover="")}})})(n,o):n.context.selectedDates[0]&&n.onCreateDateRangeTooltip&&(null==(i=u(nLine truncated
|
||||||
|
//# sourceMappingURL=bootstrap.bundle.min.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"names":["elementMap","Map","data_default","set","element","key","instance","has","get","remove","instanceMap","delete","size","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","Set","makeEventUid","uid","getElementEvents","isMouseEventWithinTarget","event","delegateTarget","relatedTarget","Boolean","contains","bootstrapHandler","fn","handlerTypeEvent","isCustomMouseEvent","handler","bootstrapEvent","hydrateObj","oneOff","EventHandler","off","apply","bootstrapDelegationHandler","selector","domElements","querySelectorAll","target","this","parentNode","domElement","findHandler","events","callable","delegationSelector","Object","values","find","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","baseTypeEvent","replace","typeEvent","addHandler","handlers","previousFunction","addEventListener","removeHandler","removeEventListener","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","entries","includes","trigger","args","evt","Event","bubbles","cancelable","dispatchEvent","on","one","inNamespace","isNamespace","startsWith","keys","length","elementEvent","slice","keyHandlers","obj","meta","value","defineProperty","configurable","normalizeData","Number","toString","JSON","parse","decodeURIComponent","normalizeDataKey","chr","toLowerCase","Manipulator","setDataAttribute","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","dataset","filter","pureKey","charAt","getDataAttribute","getAttribute","MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","parseSelector","window","CSS","escape","match","id","toType","object","prototype","call","getUID","prefix","Math","floor","random","document","getElementById","getTransitionDurationFromElement","transitionDuration","transitionDelay","getComputedStyle","parseFloat","split","triggerTransitionEnd","isElement","nodeType","getElement","querySelector","isVisible","getClientRects","elementIsVisible","getPropertyValue","closedDetails","closest","summary","isDisabled","Node","ELEMENT_NODE","classList","disableableElement","disabled","hasAttribute","setAriaAttribute","name","String","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","noop","isRTL","dir","execute","possibleCallback","defaultValue","executeAfterTransition","callback","transitionElement","waitForTransition","emulatedDuration","cancel","timeout","setTimeout","clearTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","index","indexOf","max","min","Config","Default","DefaultType","NAME","Error","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","jsonConfig","constructor","configTypes","property","expectedTypes","valueType","RegExp","test","TypeError","toUpperCase","VERSION","BaseComponent","super","_element","_config","existingInstance","Data","DATA_KEY","dispose","EVENT_KEY","propertyName","getOwnPropertyNames","_queueCallback","isAnimated","Promise","resolve","getInstance","getOrCreateInstance","eventName","getSelector","hrefAttribute","trim","map","sel","join","SelectorEngine","Element","findOne","parents","ancestor","push","prev","previous","previousElementSibling","matches","next","nextElementSibling","getSelectorFromElement","getElementFromSelector","getMultipleElementsFromSelector","enableDismissTrigger","component","method","clickEvent","usesNativeDialog","tagName","preventDefault","HTMLDialogElement","eventActionOnPlugin","Plugin","onEvent","stringSelector","eventAction","data","instances","targets","onDocumentReady","readyState","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_HIDING","CLASS_NAME_SHOW","Alert","close","defaultPrevented","add","_destroyElement","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","EVENT_DOM_CONTENT_LOADED","Button","toggle","button","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_POINTERDOWN","EVENT_LOAD_DATA_API","CLASS_NAME_CAROUSEL","CLASS_NAME_FADE","CLASS_NAME_CENTER","CLASS_NAME_AUTO","CLASS_NAME_CLONE","CLASS_NAME_PAUSED","CLASS_NAME_PLAYING","PROPERTY_INTERVAL","SCROLL_DURATION","ACTIVE_RATIO_TOLERANCE","SELECTOR_ACTIVE","SELECTOR_ITEM","SELECTOR_ACTIVE_ITEM","SELECTOR_INNER","SELECTOR_INDICATORS","SELECTOR_PLAY_PAUSE","SELECTOR_DATA_SLIDE","SELECTOR_DATA_SLIDE_PREV","SELECTOR_DATA_SLIDE_NEXT","SELECTOR_DATA_AUTOPLAY","ENDS_STOP","ENDS_WRAP","ENDS_LOOP","autoplay","ends","interval","keyboard","pause","easeInOutCubic","progress","Carousel","_viewport","_indicatorsElement","_playPauseElement","_prevControls","_nextControls","_interval","_observer","_scrollFrame","_looping","_visibility","_playing","_activeIndex","_initialActiveIndex","_addEventListeners","_observeItems","_refreshActiveState","cycle","_updatePlayPauseControl","to","_navIndex","nextWhenVisiblLine truncated
|
||||||
Vendored
+7767
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"bootstrap.js","names":["Data","NAME","EVENT_KEY","CLASS_NAME_SHOW","NAME","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","EVENT_DOM_CONTENT_LOADED","NAME","EVENT_KEY","DATA_API_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_POINTERDOWN","EVENT_LOAD_DATA_API","EVENT_CLICK_DATA_API","CLASS_NAME_ACTIVE","SELECTOR_INNER","Default","DefaultType","decodeFragment","NAME","EVENT_KEY","DATA_API_KEY","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","TAB_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","HOME_KEY","END_KEY","ENTER_KEY","SPACE_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","SELECTOR_MENU","SELECTOR_VISIBLE_ITEMS","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","HOME_KEY","END_KEY","EVENT_CHANGE","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","SELECTOR_MENU","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","EVENT_CHANGE","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_FOCUSIN","EVENT_POINTERDOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","SELECTOR_DATA_TOGGLE","EVENT_KEYDOWN","Default","DefaultType","Data","NAME","EVENT_KEY","DATA_API_KEY","EVENT_CLICK_DATA_API","CLASS_NAME_INSTANT","SELECTOR_DATA_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","EVENT_RESIZE","CLASS_NAME_SHOW","SELECTOR_MENU","SELECTOR_MENU_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","EVENT_POINTERDOWN","EVENT_POINTERUP","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","EVENT_LOAD_DATA_API","EVENT_RESIZE","EVENT_CLICK_DATA_API","SELECTOR_DATA_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","EVENT_INPUT","SELECTOR_INPUT","Default","DefaultType","NAME","Default","DefaultType","NAME","DISALLOWED_ATTRIBUTES","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_MOUSEENTER","EVENT_KEYDOWN","Default","DefaultType","NAME","SELECTOR_DATA_TOGGLE","EVENT_CLICK","EVENT_FOCUSIN","Default","DefaultType","NAME","EVENT_KEY","DATA_API_KEY","Default","DefaultType","NAME","EVENT_KEY","EVENT_CLICK","EVENT_LOAD_DATA_API","CLASS_NAME_ACTIVE","SELECTOR_MENU_TOGGLE","Default","DefaultType","NAME","EVENT_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_SHOW","SELECTOR_DATA_TOGGLE","NAME","EVENT_KEY","DefaultType","Default"],"sources":["../../js/src/dom/data.ts","../../js/src/dom/event-handler.ts","../../js/src/dom/manipulator.ts","../../js/src/util/index.ts","../../js/src/util/config.ts","../../js/src/base-component.ts","../../js/src/dom/selector-engine.ts","../../js/src/util/component-functions.ts","../../js/src/alert.ts","../../js/src/button.ts","../../js/src/carousel.ts","../../js/src/util/hash-target.ts","../../js/src/collapse.ts","../../js/src/util/floating-ui.ts","../../js/src/menu.ts","../../js/src/combobox.ts","../../js/src/datepicker.ts","../../js/src/util/scroll-lock.ts","../../js/src/dialog-base.ts","../../js/src/dialog.ts","../../js/src/util/sanitizer.ts","../../js/src/nav-overflow.ts","../../js/src/util/swipe.ts","../../js/src/drawer.ts","../../js/src/strength.ts","../../js/src/otp-input.ts","../../js/src/util/template-factory.ts","../../js/src/tooltip.ts","../../js/src/popover.ts","../../js/src/range.ts","../../js/src/scrollspy.ts","../../js/src/tab.ts","../../js/src/toast.ts","../../js/src/toggler.ts"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.ts\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map<Element, Map<string, unknown>>()\n\nexport default {\n set(element: Element, key: string, instance: unknown): void {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)!\n\n instanceMap.set(key, instance)\n },\n\n get(element: Element | null, key: string): any {\n if (element && elementMap.has(element)) {\n return elementMap.get(element)!.get(key) || null\n }\n\n return null\n },\n\n remove(element: Element, key: string): void {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)!\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n","/**\n * --------Line truncated
|
||||||
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap v6.0.0-alpha.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
import{arrow,autoUpdate,computePosition,flip,offset,shift,size}from"@floating-ui/dom";import{Calendar,months}from"vanilla-calendar-pro";const elementMap=new Map;var data_default={set(e,t,n){elementMap.has(e)||elementMap.set(e,new Map),elementMap.get(e).set(t,n)},get:(e,t)=>e&&elementMap.has(e)&&elementMap.get(e).get(t)||null,remove(e,t){if(!elementMap.has(e))return;const n=elementMap.get(e);n.delete(t),0===n.size&&elementMap.delete(e)}};const namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","input","compositionstart","compositionupdate","compositionend","paste","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerover","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll","scrollend","hashchange"]);function makeEventUid(e,t){return t&&`${t}::${uidEvent++}`||e.uidEvent||uidEvent++}function getElementEvents(e){const t=makeEventUid(e);return e.uidEvent=t,eventRegistry[t]=eventRegistry[t]||{},eventRegistry[t]}function isMouseEventWithinTarget(e){const{delegateTarget:t,relatedTarget:n}=e;return Boolean(n&&t.contains(n))}function bootstrapHandler(e,t,n){const i=n in customEvents;return function s(o){const r=hydrateObj(o,{delegateTarget:e});if(!i||!isMouseEventWithinTarget(r))return s.oneOff&&EventHandler.off(e,n,t),t.apply(e,[r])}}function bootstrapDelegationHandler(e,t,n,i){const s=i in customEvents;return function o(r){const a=e.querySelectorAll(t);for(let{target:l}=r;l&&l!==this;l=l.parentNode)for(const h of a){if(h!==l)continue;const a=hydrateObj(r,{delegateTarget:l});if(s&&isMouseEventWithinTarget(a))return;return o.oneOff&&EventHandler.off(e,i,t,n),n.apply(l,[a])}}}function findHandler(e,t,n,i=null){return Object.values(e).find(e=>e.callable===t&&e.handlerTypeEvent===n&&e.delegationSelector===i)}function normalizeParameters(e,t,n){const i="string"==typeof t,s=i?n:t||n,o=e.replace(stripNameRegex,"");let r=customEvents[o]||o;return nativeEvents.has(r)||(r=e),{isDelegated:i,callable:s,typeEvent:r,handlerTypeEvent:o in customEvents?o:r}}function addHandler(e,t,n,i,s){if("string"!=typeof t||!e)return;const{isDelegated:o,callable:r,typeEvent:a,handlerTypeEvent:l}=normalizeParameters(t,n,i),h=getElementEvents(e),_=h[a]||(h[a]={}),c=findHandler(_,r,l,o?n:null);if(c)return void(c.oneOff=c.oneOff&&s);const u=makeEventUid(r,t.replace(namespaceRegex,"")),d=o?bootstrapDelegationHandler(e,n,r,l):bootstrapHandler(e,r,l);d.delegationSelector=o?n:null,d.callable=r,d.handlerTypeEvent=l,d.oneOff=s,d.uidEvent=u,_[u]=d,e.addEventListener(a,d,o)}function removeHandler(e,t,n,i){e.removeEventListener(n,i,Boolean(i.delegationSelector)),delete t[n][i.uidEvent]}function removeNamespacedHandlers(e,t,n,i){const s=t[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&removeHandler(e,t,n,r)}function trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=hydrateObj(new Event(t,{bubbles:!0,cancelable:!0}),n);return e.dispatchEvent(i),i}const EventHandler={on(e,t,n,i){addHandler(e,t,n,i,!1)},one(e,t,n,i){addHandler(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const{isDelegated:s,callable:o,typeEvent:r,handlerTypeEvent:a}=normalizeParameters(t,n,i),l=r!==t&&a!==t,h=getElementEvents(e),_=h[r]||{},c=t.startsWith(".");if(void 0!==o){if(!Object.keys(_).length)return;const t=findHandler(_,o,a,s?n:null);return void(t&&removeHandler(e,h,r,t))}if(c)for(const n of Object.keys(h))removeNamespacedHandlers(e,h,n,t.slice(1));for(const[n,i]of Object.entries(_)){const s=n.replace(stripUidRegex,"");i.handlerTypeEvent!==a||l&&!t.includes(s)||removeHandler(e,h,r,i)}},trigger:trigger};function hydrateObj(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function normalizeData(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function normalizeDataKey(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Manipulator={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${normalizeDataKey(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${normalizeDataKey(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=normalizeData(e.dataset[iLine truncated
|
||||||
|
//# sourceMappingURL=bootstrap.min.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"names":["elementMap","Map","data_default","set","element","key","instance","has","get","remove","instanceMap","delete","size","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","Set","makeEventUid","uid","getElementEvents","isMouseEventWithinTarget","event","delegateTarget","relatedTarget","Boolean","contains","bootstrapHandler","fn","handlerTypeEvent","isCustomMouseEvent","handler","bootstrapEvent","hydrateObj","oneOff","EventHandler","off","apply","bootstrapDelegationHandler","selector","domElements","querySelectorAll","target","this","parentNode","domElement","findHandler","events","callable","delegationSelector","Object","values","find","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","baseTypeEvent","replace","typeEvent","addHandler","handlers","previousFunction","addEventListener","removeHandler","removeEventListener","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","entries","includes","trigger","args","evt","Event","bubbles","cancelable","dispatchEvent","on","one","inNamespace","isNamespace","startsWith","keys","length","elementEvent","slice","keyHandlers","obj","meta","value","defineProperty","configurable","normalizeData","Number","toString","JSON","parse","decodeURIComponent","normalizeDataKey","chr","toLowerCase","Manipulator","setDataAttribute","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","dataset","filter","pureKey","charAt","getDataAttribute","getAttribute","MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","parseSelector","window","CSS","escape","match","id","toType","object","prototype","call","getUID","prefix","Math","floor","random","document","getElementById","getTransitionDurationFromElement","transitionDuration","transitionDelay","getComputedStyle","parseFloat","split","triggerTransitionEnd","isElement","nodeType","getElement","querySelector","isVisible","getClientRects","elementIsVisible","getPropertyValue","closedDetails","closest","summary","isDisabled","Node","ELEMENT_NODE","classList","disableableElement","disabled","hasAttribute","setAriaAttribute","name","String","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","noop","isRTL","dir","execute","possibleCallback","defaultValue","executeAfterTransition","callback","transitionElement","waitForTransition","emulatedDuration","cancel","timeout","setTimeout","clearTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","index","indexOf","max","min","Config","Default","DefaultType","NAME","Error","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","jsonConfig","constructor","configTypes","property","expectedTypes","valueType","RegExp","test","TypeError","toUpperCase","VERSION","BaseComponent","super","_element","_config","existingInstance","Data","DATA_KEY","dispose","EVENT_KEY","propertyName","getOwnPropertyNames","_queueCallback","isAnimated","Promise","resolve","getInstance","getOrCreateInstance","eventName","getSelector","hrefAttribute","trim","map","sel","join","SelectorEngine","Element","findOne","parents","ancestor","push","prev","previous","previousElementSibling","matches","next","nextElementSibling","getSelectorFromElement","getElementFromSelector","getMultipleElementsFromSelector","enableDismissTrigger","component","method","clickEvent","usesNativeDialog","tagName","preventDefault","HTMLDialogElement","eventActionOnPlugin","Plugin","onEvent","stringSelector","eventAction","data","instances","targets","onDocumentReady","readyState","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_HIDING","CLASS_NAME_SHOW","Alert","close","defaultPrevented","add","_destroyElement","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","EVENT_DOM_CONTENT_LOADED","Button","toggle","button","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_POINTERDOWN","EVENT_LOAD_DATA_API","CLASS_NAME_CAROUSEL","CLASS_NAME_FADE","CLASS_NAME_CENTER","CLASS_NAME_AUTO","CLASS_NAME_CLONE","CLASS_NAME_PAUSED","CLASS_NAME_PLAYING","PROPERTY_INTERVAL","SCROLL_DURATION","ACTIVE_RATIO_TOLERANCE","SELECTOR_ACTIVE","SELECTOR_ITEM","SELECTOR_ACTIVE_ITEM","SELECTOR_INNER","SELECTOR_INDICATORS","SELECTOR_PLAY_PAUSE","SELECTOR_DATA_SLIDE","SELECTOR_DATA_SLIDE_PREV","SELECTOR_DATA_SLIDE_NEXT","SELECTOR_DATA_AUTOPLAY","ENDS_STOP","ENDS_WRAP","ENDS_LOOP","autoplay","ends","interval","keyboard","pause","easeInOutCubic","progress","Carousel","_viewport","_indicatorsElement","_playPauseElement","_prevControls","_nextControls","_interval","_observer","_scrollFrame","_looping","_visibility","_playing","_activeIndex","_initialActiveIndex","_addEventListeners","_observeItems","_refreshActiveState","cycle","_updatePlayPauseControl","to","_navIndex","nextWhenVisiblLine truncated
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
const printer_status = document.getElementById("status-printers");
|
||||||
|
const number_task = document.getElementById("number-task");
|
||||||
|
const url = "/api/printers"
|
||||||
|
const queue_url = "/api/queue"
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Call the printer API
|
||||||
|
const res = await fetch(url, { method: "GET" });
|
||||||
|
|
||||||
|
if (!res.ok) {
|
||||||
|
throw new Error(`Request failed: ${res.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const printers = await res.json();
|
||||||
|
console.log(printers);
|
||||||
|
|
||||||
|
if (printers != null) {
|
||||||
|
// We have at least one printer
|
||||||
|
if (printers.length >= 1) {
|
||||||
|
if (printers[0]["Ready"]) {
|
||||||
|
console.log("We have at least one printer Ready");
|
||||||
|
printer_status.classList.remove("bg-danger");
|
||||||
|
printer_status.classList.add("bg-success");
|
||||||
|
printer_status.setAttribute('title',"A printer is ready");
|
||||||
|
} else {
|
||||||
|
console.log("No printer is ready :(");
|
||||||
|
printer_status.setAttribute('title',"No printers ready");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("No printers available...");
|
||||||
|
printer_status.setAttribute('title',"No printers found");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("Could not get printer status");
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error:", error);
|
||||||
|
}
|
||||||
|
|
||||||
|
var interval = 3000;
|
||||||
|
|
||||||
|
setInterval(async () => {
|
||||||
|
try {
|
||||||
|
// Call the printer API
|
||||||
|
const res = await fetch(queue_url, { method: "GET" });
|
||||||
|
|
||||||
|
if (!res.ok) {
|
||||||
|
interval = interval + 100;
|
||||||
|
console.log("Interval ; " + interval)
|
||||||
|
throw new Error(`Request failed: ${res.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const current_queue = await res.json();
|
||||||
|
console.log("Current queue :" + current_queue);
|
||||||
|
|
||||||
|
if (current_queue != null) {
|
||||||
|
// We have at least one printer
|
||||||
|
number_task.textContent = current_queue.length;
|
||||||
|
} else {
|
||||||
|
console.log("Could not get printer status");
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error:", error);
|
||||||
|
}
|
||||||
|
}, interval);
|
||||||
+60
-39
@@ -189,17 +189,27 @@ function setup_events(){
|
|||||||
flip_cameras();
|
flip_cameras();
|
||||||
}, false );
|
}, false );
|
||||||
|
|
||||||
printButton.addEventListener('click', async function(ev) {
|
printButton.addEventListener("click", async function (ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
try {
|
printButton.disabled = true;
|
||||||
await countDownToPicture(); // wait for countdown to finish
|
|
||||||
var data = await take_picture(); // take_picture can be async
|
|
||||||
print_picture(data);
|
|
||||||
} catch (e) {
|
|
||||||
alert("Failed to print a picture because : " + e);
|
|
||||||
}
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
await countDownToPicture();
|
||||||
|
const data = await take_picture();
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
console.error("Print failed: No image was captured");
|
||||||
|
} else {
|
||||||
|
console.log("Printing picture");
|
||||||
|
const print_status = await print_picture(data);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Print failed:", e);
|
||||||
|
alert(`Failed to print: ${e.message || e}`);
|
||||||
|
} finally {
|
||||||
|
printButton.disabled = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear_canvas() {
|
function clear_canvas() {
|
||||||
@@ -224,45 +234,56 @@ function dataURLtoFile(dataurl, filename) {
|
|||||||
return new File([u8arr], filename, {type:mime});
|
return new File([u8arr], filename, {type:mime});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function take_picture() {
|
function take_picture() {
|
||||||
const context = canvas.getContext('2d');
|
if (video.readyState < HTMLMediaElement.HAVE_CURRENT_DATA) {
|
||||||
let data = null;
|
throw new Error("Camera frame isn't ready yet");
|
||||||
if (width && height) {
|
}
|
||||||
canvas.width = width;
|
|
||||||
canvas.height = height;
|
const w = video.videoWidth;
|
||||||
context.drawImage(video, 0, 0, width, height);
|
const h = video.videoHeight;
|
||||||
data = canvas.toDataURL('image/png');
|
if (!w || !h) {
|
||||||
photo.setAttribute('src', data);
|
console.log(`Invalid video dimensions: ${w} × ${h}`);
|
||||||
} else {
|
return null;
|
||||||
clear_canvas();
|
}
|
||||||
|
|
||||||
|
canvas.width = w;
|
||||||
|
canvas.height = h;
|
||||||
|
canvas.getContext("2d").drawImage(video, 0, 0, w, h);
|
||||||
|
|
||||||
|
const data = canvas.toDataURL("image/png");
|
||||||
|
console.log("Captured image:", data.slice(0, 30), "length:", data.length);
|
||||||
|
|
||||||
|
if (data.length < 100) {
|
||||||
|
console.log("Captured image is empty");
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_picture(data){
|
async function print_picture(data) {
|
||||||
var url = "/api/print/img"
|
const picture = dataURLtoFile(data, "picture.png");
|
||||||
var picture = dataURLtoFile(data);
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
let currentDate = new Date();
|
console.log("Image file size:", picture.size, "type:", picture.type);
|
||||||
let time = currentDate.getHours() + ":" + currentDate.getMinutes() + ":" + currentDate.getSeconds();
|
|
||||||
|
if (!picture.size) {
|
||||||
|
throw new Error("Image file is empty");
|
||||||
|
}
|
||||||
|
|
||||||
formData.set("img", picture, "picture.png");
|
formData.set("img", picture, "picture.png");
|
||||||
formData.set("signature", "Webcam")
|
formData.set("signature", "Webcam");
|
||||||
|
formData.set("cut", true);
|
||||||
|
formData.set("process", false);
|
||||||
|
|
||||||
fetch(url, {
|
const res = await fetch("/api/print/img", {
|
||||||
method: 'POST', // or 'PUT'
|
method: "POST",
|
||||||
body: formData,
|
body: formData
|
||||||
// headers:{
|
});
|
||||||
// 'Content-Type': 'multipart/form-data'
|
if(!res.ok){
|
||||||
// }
|
throw new Error("Printing failed" + res.statusText);
|
||||||
}).then(function(response) {
|
} else {
|
||||||
console.log('Reponse:', response);
|
return true;
|
||||||
if(response.status != 200 ){
|
|
||||||
alert("The picture could not be printed be : " + response.statusText)
|
|
||||||
}
|
}
|
||||||
} , true)
|
|
||||||
.catch(error => console.error('Error:', error), false);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function flip_cameras(){
|
function flip_cameras(){
|
||||||
|
|||||||
+29
-16
@@ -31,8 +31,8 @@ class TaskType(Enum):
|
|||||||
|
|
||||||
TEXT = "text"
|
TEXT = "text"
|
||||||
IMAGE = "image"
|
IMAGE = "image"
|
||||||
CUT = "cut"
|
|
||||||
QR = "qr"
|
QR = "qr"
|
||||||
|
REMOVE = "remove"
|
||||||
|
|
||||||
|
|
||||||
class PrintTask(ABC):
|
class PrintTask(ABC):
|
||||||
@@ -40,10 +40,12 @@ class PrintTask(ABC):
|
|||||||
A print task holds information about what we are looking to print.
|
A print task holds information about what we are looking to print.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, task_type: TaskType):
|
def __init__(self, task_type: TaskType, do_cut=False):
|
||||||
self.task_id = self._generate_id()
|
self.task_id = self._generate_id()
|
||||||
self.task_type = task_type
|
self.task_type = task_type
|
||||||
self.status = "pending" # pending, processing, completed, failed
|
self.status = "pending" # pending, processing, completed, failed
|
||||||
|
self.log = ""
|
||||||
|
self.do_cut = do_cut
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_print_data(self):
|
def get_print_data(self):
|
||||||
@@ -59,25 +61,27 @@ class TextTask(PrintTask):
|
|||||||
This tasks represents a texte content, and it's signature.
|
This tasks represents a texte content, and it's signature.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, content, signature):
|
def __init__(self, content, signature="", do_cut=False, align="center",font_size=20):
|
||||||
super().__init__(TaskType.TEXT)
|
super().__init__(TaskType.TEXT, do_cut)
|
||||||
self.content = content
|
self.content = content
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
|
self.align = align
|
||||||
|
self.font_size = font_size
|
||||||
|
|
||||||
def get_print_data(self):
|
def get_print_data(self):
|
||||||
return {"txt": self.content, "sign": self.signature}
|
return {"txt": self.content, "sign": self.signature, "do_cut": self.do_cut, "align": self.align, "font_size": self.font_size}
|
||||||
|
|
||||||
|
|
||||||
class QRTask(TextTask):
|
class QRTask(TextTask):
|
||||||
"""This task prints a QR-Code, the signature is ignore and is always the content itself"""
|
"""This task prints a QR-Code, the signature is ignore and is always the content itself"""
|
||||||
|
|
||||||
def __init__(self, content):
|
def __init__(self, content, do_cut):
|
||||||
super().__init__(content, signature="")
|
super().__init__(content, signature="", do_cut=False)
|
||||||
self.content = content
|
self.content = content
|
||||||
self.signature = content
|
self.signature = content
|
||||||
|
|
||||||
def get_print_data(self):
|
def get_print_data(self):
|
||||||
return {"txt": self.content, "sign": self.signature}
|
return {"txt": self.content, "sign": self.signature, "do_cut": self.do_cut}
|
||||||
|
|
||||||
|
|
||||||
class ImageTask(PrintTask):
|
class ImageTask(PrintTask):
|
||||||
@@ -85,26 +89,35 @@ class ImageTask(PrintTask):
|
|||||||
This tasks represents a image content ( in the form of it's path ), and it's signature.
|
This tasks represents a image content ( in the form of it's path ), and it's signature.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, image_path, signature, process):
|
def __init__(self, image_path, signature, process, task_id, do_cut):
|
||||||
super().__init__(TaskType.IMAGE)
|
super().__init__(TaskType.IMAGE, do_cut)
|
||||||
|
self.task_id = self._generate_id() if not task_id else task_id
|
||||||
self.image_path = image_path
|
self.image_path = image_path
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
self.process = process
|
self.process = process
|
||||||
|
|
||||||
def get_print_data(self):
|
def get_print_data(self):
|
||||||
# Return image data in printer-compatible format
|
# Return image data in printer-compatible format
|
||||||
return {"img": self.image_path, "sign": self.signature, "process": self.process}
|
return {
|
||||||
|
"img": self.image_path,
|
||||||
|
"sign": self.signature,
|
||||||
|
"process": self.process,
|
||||||
|
"do_cut": self.do_cut,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class CutTask(PrintTask):
|
class RemoveTask(PrintTask):
|
||||||
"""
|
"""
|
||||||
This class activates the cutter on the printer if it exists
|
This class is used to clear images and leftovers after a print
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, image_path):
|
||||||
super().__init__(TaskType.CUT)
|
super().__init__(TaskType.REMOVE)
|
||||||
|
self.task_id = self._generate_id()
|
||||||
|
self.image_path = image_path
|
||||||
|
|
||||||
# There is no print data,
|
# There is no print data,
|
||||||
# the task existence in itself is indication of what to do
|
# the task existence in itself is indication of what to do
|
||||||
def get_print_data(self):
|
def get_print_data(self):
|
||||||
return None
|
# Return image data in printer-compatible format
|
||||||
|
return {"img": self.image_path}
|
||||||
@@ -5,6 +5,6 @@
|
|||||||
<title>LittlePrynter API</title>
|
<title>LittlePrynter API</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
"Welcome to the printing software's API. Please see the index page to get started.
|
Welcome to the printing software's API. Please see the index page to get started.
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+16
-3
@@ -19,9 +19,22 @@
|
|||||||
<a class="nav-link active" aria-current="page" href="/">Home</a>
|
<a class="nav-link active" aria-current="page" href="/">Home</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/webcam">Webcam</a>
|
<a class="nav-link" href="/webcam"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-webcam" viewBox="0 0 16 16">
|
||||||
|
<path d="M0 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H9.269c.144.162.33.324.531.475a7 7 0 0 0 .907.57l.014.006.003.002A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.224-.947l.003-.002.014-.007a5 5 0 0 0 .268-.148 7 7 0 0 0 .639-.421c.2-.15.387-.313.531-.475H2a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z"/>
|
||||||
|
<path d="M8 6.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2m-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0m7 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0"/>
|
||||||
|
</svg> Photomaton</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div class="nav-item">
|
||||||
|
<button type="button" class="btn btn-outline theme-primary position-relative">
|
||||||
|
<a href="/queue">🖶</a>
|
||||||
|
<span class="badge position-absolute top-0 start-100 translate-middle bg-danger rounded-circle" id="status-printers" title="Javascript is disabled, could not get printer status."><span id="number-task">0</span>
|
||||||
|
<span class="visually-hidden"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@@ -45,7 +58,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
@@ -53,9 +65,10 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<footer class="row">
|
<footer class="row">
|
||||||
<p class=" text-center">Little Prynter is built by <a href="https://n07070.xyz/about-me/">n07070</a> because it's fun :) | <a href="https://git.n07070.xyz/n07070/littleprynter">Source code - AGPLv3</a></p>
|
<p class=" text-center">Little Prynter is built by <a href="https://n07070.xyz/about-me/">n07070</a> because it's fun :) | <a href="/api">API interface</a> | <a href="https://git.n07070.xyz/n07070/littleprynter">Source code - AGPLv3</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
<script src="https://cdn.socket.io/4.0.0/socket.io.min.js"></script>
|
<script src="https://cdn.socket.io/4.0.0/socket.io.min.js"></script>
|
||||||
|
<script type="module" src="{{ url_for('static', filename='js/status.js') }}"></script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<hr>
|
|
||||||
<footer>Little Prynter is built by <a href="https://n07070.xyz/about-me/">n07070</a> because it's fun :) | <a href="https://git.n07070.xyz/n07070/littleprynter/src/branch/epson-tm-t20iii">Source code - AGPLv3</a></footer>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -6,10 +6,71 @@
|
|||||||
<h3 class="card-header">Print a short message</h3>
|
<h3 class="card-header">Print a short message</h3>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form class="form-group" action="/web/print/sms" method="post">
|
<form class="form-group" action="/web/print/sms" method="post">
|
||||||
<textarea class="form-control" type="text" name="txt" placeholder="4096 chars or less " maxlength="4096"></textarea>
|
<div class="row g-3">
|
||||||
|
<textarea class="form-control col" type="text" name="txt" placeholder="4096 caractères maximum " maxlength="4096"></textarea>
|
||||||
|
<input class="form-control" type="text" name="signature" placeholder="Signature ou pseudo" maxlength="200"><br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid">
|
||||||
|
<div class="md:g-col-4 g-col-12">
|
||||||
|
<div class="input-group">
|
||||||
|
<label class="input-group-text">Taille du texte</label>
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
aria-label="how-many"
|
||||||
|
class="form-control"
|
||||||
|
name="font_size"
|
||||||
|
max="40"
|
||||||
|
min="1"
|
||||||
|
value="20"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group d-grid md:g-col-4 g-col-12 align-items-center">
|
||||||
|
<div class="btn-group btn-group-divider" role="group" aria-label="Text alignment">
|
||||||
|
<label class="btn-check btn-solid theme-secondary">
|
||||||
|
<input type="radio" name="text_align" value="left" checked>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-left" viewBox="0 0 16 16">
|
||||||
|
<path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/>
|
||||||
|
</svg> Left
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="btn-check btn-solid theme-secondary">
|
||||||
|
<input type="radio" name="text_align" value="center">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-center" viewBox="0 0 16 16">
|
||||||
|
<path fill-rule="evenodd" d="M4 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/>
|
||||||
|
</svg> Center
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="btn-check btn-solid theme-secondary">
|
||||||
|
<input type="radio" name="text_align" value="right">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-right" viewBox="0 0 16 16">
|
||||||
|
<path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m4-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/>
|
||||||
|
</svg> Right
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md:g-col-4 g-col-12">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text">Quantité</span>
|
||||||
|
<input type="number" aria-label="how-many" class="form-control" name="many" max="20" min="1" value="1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<input class="form-control" type="text" name="signature" placeholder="Signature or pseudo" maxlength="200"><br>
|
|
||||||
<input class="btn btn-primary float-right" type="submit" value="Imprimer" name="imprimer">
|
<input class="g-4 btn btn-solid theme-primary" type="submit" value="Imprimer" name="imprimer">
|
||||||
|
<br>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" value="True" id="flexCheckDefault" name="cut" checked>
|
||||||
|
<label class="form-check-label" for="flexCheckDefault">
|
||||||
|
Couper après impression
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,9 +82,38 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form enctype="multipart/form-data" class="form-group" action="/web/print/img" method="post">
|
<form enctype="multipart/form-data" class="form-group" action="/web/print/img" method="post">
|
||||||
<input class="form-control" type="file" name="img" required><br>
|
<input class="form-control" type="file" name="img" required><br>
|
||||||
<input class="form-control" type="text" name="signature" placeholder="Signature or pseudo" maxlength="200"><br>
|
<input class="form-control" type="text" name="signature" placeholder="Signature ou pseudo" maxlength="200"><br>
|
||||||
<input class="btn btn-primary float-right" type="submit" value="Imprimer" name="imprimer">
|
<div class="input-group">
|
||||||
|
<span class="input-group-text">Quantité</span>
|
||||||
|
<input type="number" aria-label="how-many" class="form-control" name="many" max="20" min="1" value="1">
|
||||||
|
<input class="btn btn-solid theme-primary float-right" type="submit" value="Imprimer" name="imprimer">
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-check .form-check-inline">
|
||||||
|
<input class="form-check-input" type="checkbox" value="True" id="flexCheckDefault" name="cut" checked>
|
||||||
|
<label class="form-check-label" for="flexCheckDefault">
|
||||||
|
Couper après impression
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check .form-check-inline">
|
||||||
|
<input class="form-check-input" type="checkbox" value="True" id="flexCheckDefault" name="process">
|
||||||
|
<label class="form-check-label" for="flexCheckDefault" title="Essayer d'augmenter le contraste de l'image pour une meilleur définition d'impression en noir et blanc">
|
||||||
|
<details>
|
||||||
|
<summary>Traiter l'image ?</summary>
|
||||||
|
Un algorithme de traitement d'image va essayer d'augmenter le contraste de l'image pour qu'elle rendent mieux en impression noir et blanc. Mais cela risque de provoquer une perte de détails de l'image.
|
||||||
|
</details>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="alert alert-light" role="alert">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-square-fill" viewBox="0 0 16 16"><path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm8.93 4.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM8 5.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>
|
||||||
|
LittlePrynter is a fax-like application. It's used to print on thermal printers ( like the ones in supermarkets ) anything you'd like. If you are seeing this page from the internet, what you print will be received by the person taking care of the printer. <b>Please note that printing is done in black and white !</b>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Whitespace-only changes.
@@ -1,30 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Log in</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/style.css') }}">
|
|
||||||
</head>
|
|
||||||
<body class="container">
|
|
||||||
<div class="col-md-6 offset-md-3">
|
|
||||||
<h1>Login</h1>
|
|
||||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
||||||
{% if messages %}
|
|
||||||
{% for category, message in messages %}
|
|
||||||
<div class="alert alert-{{ category }}" role="alert">{{ message }}</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endwith %}
|
|
||||||
|
|
||||||
<form action="/login" method="post">
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" name="username" class="form-control" placeholder="Pseudo">
|
|
||||||
<input type="password" name="password" class="form-control" placeholder="Password">
|
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Whitespace-only changes.
@@ -0,0 +1,153 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h4 class="float-end">Worker state : {{ worker_state.state }}</h4>
|
||||||
|
|
||||||
|
<h3>Current tasks</h3>
|
||||||
|
<hr>
|
||||||
|
{% if not tasks %}
|
||||||
|
<div class="alert alert-success" role="alert" id="no-tasks">No tasks in queue</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="row row-cols-1 row-cols-md-5 g-4" id="task-list">
|
||||||
|
{% for task in tasks %}
|
||||||
|
<div class="col-sm-6 mb-3 mb-sm-0">
|
||||||
|
<div class="card">
|
||||||
|
{% if task.type == "TaskType.IMAGE" %}
|
||||||
|
{% set img_path = task.content.img.split('/')[-1] %}
|
||||||
|
<img src="{{ url_for('static', filename="uploads/" + img_path) }}" class="card-img-top" alt="Image could not be loaded">
|
||||||
|
{% endif %}
|
||||||
|
{% if task.type == "TaskType.CUT" %}
|
||||||
|
<img src="{{ url_for('static', filename="images/cut.png") }}" class="card-img-top" alt="Image could not be loaded">
|
||||||
|
{% endif %}
|
||||||
|
<div class="card-body">
|
||||||
|
{% if task.type == "TaskType.TEXT" %}
|
||||||
|
<p class="card-text">ID : <code>{{ task.content.txt }}</code> </p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<p class="card-text">ID : <code>{{ task.task_id }}</code> </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<h3>Completed tasks</h3>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
{% if not completed_tasks %}
|
||||||
|
<div class="alert alert-dark" role="alert">No tasks printed for the moment</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for task in completed_tasks %}
|
||||||
|
{%if completed_tasks[task].status == "failed" %}
|
||||||
|
<div class="alert alert-error" role="alert">
|
||||||
|
<ul>
|
||||||
|
<li><code>{{ completed_tasks[task].task_id }}</code></li>
|
||||||
|
<li>Status : {{ completed_tasks[task].status }}</li>
|
||||||
|
<li>Finished at : {{ completed_tasks[task].completed_at }}</li>
|
||||||
|
<li>Info : {{ completed_tasks[task].log }}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-success" role="alert">
|
||||||
|
<ul>
|
||||||
|
<li><code>{{ completed_tasks[task].task_id }}</code></li>
|
||||||
|
<li>Status : {{ completed_tasks[task].status }}</li>
|
||||||
|
<li>Finished at : {{ completed_tasks[task].completed_at }}</li>
|
||||||
|
<li>Info : {{ completed_tasks[task].log }}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const taskList = document.getElementById("task-list");
|
||||||
|
const queueUrl = "/api/queue";
|
||||||
|
|
||||||
|
// Create the alert message if it doesn't exist
|
||||||
|
// If there is a task, the element is not created
|
||||||
|
let noTasksAlert = document.getElementById("no-tasks");
|
||||||
|
|
||||||
|
if (!noTasksAlert) {
|
||||||
|
noTasksAlert = document.createElement("div");
|
||||||
|
noTasksAlert.textContent = "No tasks in queue";
|
||||||
|
noTasksAlert.className = "alert alert-success";
|
||||||
|
noTasksAlert.setAttribute("role", "alert");
|
||||||
|
noTasksAlert.id = "no-tasks";
|
||||||
|
taskList.before(noTasksAlert);
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderTasks(tasks) {
|
||||||
|
taskList.replaceChildren();
|
||||||
|
noTasksAlert.hidden = tasks.length > 0;
|
||||||
|
|
||||||
|
for (const task of tasks) {
|
||||||
|
const col = document.createElement("div");
|
||||||
|
col.className = "col-sm-6 mb-3 mb-sm-0";
|
||||||
|
|
||||||
|
const card = document.createElement("div");
|
||||||
|
card.className = "card";
|
||||||
|
|
||||||
|
if (task.type === "TaskType.IMAGE") {
|
||||||
|
const img = document.createElement("img");
|
||||||
|
good_image_url = task.content.img.split('/').pop();
|
||||||
|
img.src = "/static/uploads/" + good_image_url;
|
||||||
|
img.className = "card-img-top";
|
||||||
|
img.alt = "Task image";
|
||||||
|
card.appendChild(img);
|
||||||
|
} else if (task.type === "TaskType.CUT") {
|
||||||
|
const img = document.createElement("img");
|
||||||
|
img.src = "/static/images/cut.png";
|
||||||
|
img.className = "card-img-top";
|
||||||
|
img.alt = "Cut task";
|
||||||
|
card.appendChild(img);
|
||||||
|
}
|
||||||
|
|
||||||
|
const body = document.createElement("div");
|
||||||
|
body.className = "card-body";
|
||||||
|
|
||||||
|
if (task.type === "TaskType.TEXT" && task.content?.txt) {
|
||||||
|
const text = document.createElement("p");
|
||||||
|
text.className = "card-text";
|
||||||
|
text.textContent = `Text: ${task.content.txt}`;
|
||||||
|
body.appendChild(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
const code_id = document.createElement("code");
|
||||||
|
code_id.textContent = `${task.task_id}`;
|
||||||
|
const id = document.createElement("p");
|
||||||
|
id.className = "card-text";
|
||||||
|
id.textContent = "ID : "
|
||||||
|
id.appendChild(code_id);
|
||||||
|
body.appendChild(id);
|
||||||
|
|
||||||
|
card.appendChild(body);
|
||||||
|
col.appendChild(card);
|
||||||
|
taskList.appendChild(col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function updateTasks() {
|
||||||
|
try {
|
||||||
|
const response = await fetch(queueUrl);
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Request failed: ${response.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const tasks = await response.json();
|
||||||
|
console.log(tasks);
|
||||||
|
renderTasks(Array.isArray(tasks) ? tasks : []);
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Could not update task list:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updateTasks(); // First update on page load
|
||||||
|
setInterval(updateTasks, 3000);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
+57
-33
@@ -4,7 +4,8 @@ Manage all of the inputs from a web source
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from werkzeug.utils import secure_filename
|
from werkzeug.utils import secure_filename
|
||||||
from task import TextTask, ImageTask, CutTask
|
import uuid
|
||||||
|
from task import TextTask, ImageTask, RemoveTask
|
||||||
|
|
||||||
|
|
||||||
class Web:
|
class Web:
|
||||||
@@ -16,56 +17,77 @@ class Web:
|
|||||||
self.print_queue = print_queue
|
self.print_queue = print_queue
|
||||||
self.app = app
|
self.app = app
|
||||||
|
|
||||||
def print_sms(self, texte, sign: str) -> bool:
|
def print_sms(self, texte, sign: str, do_cut: bool, many: int = 1, align: str = "center", font_size: int = 20) -> bool:
|
||||||
"""
|
"""
|
||||||
Get text and a signature, prints the text and cuts after that.
|
Get text and a signature, prints the text and cuts after that.
|
||||||
"""
|
"""
|
||||||
self.app.logger.debug("Printing : " + str(texte) + " from " + str(sign))
|
self.app.logger.debug("Printing : " + str(texte) + " from " + str(sign))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# We create two new tasks and add them directly to the queue
|
for i in range(many):
|
||||||
# TODO: this might need to be improved because
|
sms = self.print_queue.enqueue(
|
||||||
# !! there is no garantee !! that both the SMS task and the Cut task
|
TextTask(content=texte, signature=sign, do_cut=do_cut, align=align,font_size=font_size)
|
||||||
# are added back to back, another task could be
|
)
|
||||||
# inserted between the two.
|
self.app.logger.info(
|
||||||
sms = self.print_queue.enqueue(TextTask(content=texte, signature=sign))
|
"Added a SMS task at position %s, it should %scut",
|
||||||
cut = self.print_queue.enqueue(CutTask())
|
sms,
|
||||||
|
"" if not do_cut else "not ",
|
||||||
|
)
|
||||||
|
self.app.logger.debug("%s", do_cut)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error(e)
|
self.app.logger.error(e)
|
||||||
raise RuntimeError("Could not add SMS to queue, " + str(e)) from e
|
raise RuntimeError("Could not add SMS to queue, " + str(e)) from e
|
||||||
self.app.logger.info("Added two new tasks at position %s and %s", sms, cut)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def print_image(self, image, sign: str) -> bool:
|
def print_image(
|
||||||
|
self, image, sign: str, do_cut: bool, process_image: bool, many: int = 1
|
||||||
|
) -> bool:
|
||||||
"""
|
"""
|
||||||
Get an image and a signature, prints the image and cuts after that.
|
Get an image and a signature, prints the image and cuts if asked after that.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
image_uuid = str(uuid.uuid4())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
file_uploaded = self.upload_file(image)
|
file_uploaded = self.upload_file(image, image_uuid)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error(e)
|
self.app.logger.error(e)
|
||||||
raise RuntimeError("Could not upload file : " + str(e)) from e
|
raise RuntimeError("Could not upload file : " + str(e)) from e
|
||||||
|
|
||||||
if file_uploaded:
|
if file_uploaded:
|
||||||
self.app.logger.debug("File has been uploaded, printing...")
|
self.app.logger.debug("File has been uploaded, printing...")
|
||||||
|
image_path = os.path.join( self.app.config["UPLOAD_FOLDER"],
|
||||||
|
secure_filename(
|
||||||
|
str(
|
||||||
|
file_uploaded.split("/").pop()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
|
for _ in range(many):
|
||||||
img = self.print_queue.enqueue(
|
img = self.print_queue.enqueue(
|
||||||
ImageTask(
|
ImageTask(
|
||||||
os.path.join(
|
image_path,
|
||||||
self.app.config["UPLOAD_FOLDER"],
|
|
||||||
secure_filename(image.filename),
|
|
||||||
),
|
|
||||||
signature=sign,
|
signature=sign,
|
||||||
process=True,
|
process=process_image,
|
||||||
|
task_id=str(uuid.uuid4()),
|
||||||
|
do_cut=do_cut,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self.app.logger.info(
|
||||||
|
"Added a IMG task at position %s, it should %s cut",
|
||||||
|
img,
|
||||||
|
"not " if not do_cut else "",
|
||||||
|
)
|
||||||
|
|
||||||
cut = self.print_queue.enqueue(CutTask())
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise RuntimeError("Could not add IMG to queue" + str(e)) from e
|
raise RuntimeError("Could not add IMG to queue " + str(e)) from e
|
||||||
|
|
||||||
self.app.logger.info("Added two new tasks at position %s and %s", img, cut)
|
|
||||||
|
|
||||||
|
self.app.logger.debug("Adding a remove task for image of UUID %s", image_uuid)
|
||||||
|
self.print_queue.enqueue(
|
||||||
|
RemoveTask(image_path=image_path)
|
||||||
|
)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# def login(self, username: str, password: str) -> bool:
|
# def login(self, username: str, password: str) -> bool:
|
||||||
@@ -87,7 +109,7 @@ class Web:
|
|||||||
in self.app.config["ALLOWED_EXTENSIONS"]
|
in self.app.config["ALLOWED_EXTENSIONS"]
|
||||||
)
|
)
|
||||||
|
|
||||||
def upload_file(self, image) -> bool:
|
def upload_file(self, image, image_uuid) -> bool:
|
||||||
"""
|
"""
|
||||||
Save the file after executing checks on it
|
Save the file after executing checks on it
|
||||||
"""
|
"""
|
||||||
@@ -95,22 +117,24 @@ class Web:
|
|||||||
if not image is None or not image == "":
|
if not image is None or not image == "":
|
||||||
if self.allowed_file(image.filename):
|
if self.allowed_file(image.filename):
|
||||||
filename = secure_filename(image.filename)
|
filename = secure_filename(image.filename)
|
||||||
|
extension = filename.split(".").pop()
|
||||||
self.app.logger.debug("File valid")
|
self.app.logger.debug("File valid")
|
||||||
try:
|
try:
|
||||||
image.save(os.path.join(self.app.config["UPLOAD_FOLDER"], filename))
|
image_uuid_path = os.path.join(
|
||||||
|
self.app.config["UPLOAD_FOLDER"], image_uuid + "." + extension
|
||||||
|
)
|
||||||
|
image.save(image_uuid_path)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
self.app.logger.error("Could not save file %s", e)
|
self.app.logger.error("Could not save file %s", e)
|
||||||
raise RuntimeError("An OS error occured while uploading this file : " + str(e)) from e
|
raise RuntimeError(
|
||||||
|
"An OS error occured while uploading this file : " + str(e)
|
||||||
|
) from e
|
||||||
|
|
||||||
self.app.logger.debug(
|
self.app.logger.debug("File saved to %s", image_uuid_path)
|
||||||
"File saved to "
|
|
||||||
+ str(os.path.join(self.app.config["UPLOAD_FOLDER"], filename))
|
|
||||||
)
|
|
||||||
return True
|
|
||||||
|
|
||||||
self.app.logger.error(
|
return image_uuid_path
|
||||||
"Could not save file because the filename is forbidden"
|
|
||||||
)
|
self.app.logger.error("Could not save file because the filename is forbidden")
|
||||||
raise RuntimeError("This file type is forbidden.")
|
raise RuntimeError("This file type is forbidden.")
|
||||||
|
|
||||||
def get_queue_state(self):
|
def get_queue_state(self):
|
||||||
|
|||||||
+91
-70
@@ -6,7 +6,8 @@ This is the main printing thread. A worker thread consums Tasks from
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from printers import Printers
|
from uuid import uuid4
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class PrintWorker(threading.Thread):
|
class PrintWorker(threading.Thread):
|
||||||
@@ -18,38 +19,55 @@ class PrintWorker(threading.Thread):
|
|||||||
will choose an available Printer from a list of Printers.
|
will choose an available Printer from a list of Printers.
|
||||||
|
|
||||||
If a print fails, it's not retried, but will be added to a list of completed
|
If a print fails, it's not retried, but will be added to a list of completed
|
||||||
tasks.
|
tasks. TODO : Change that
|
||||||
"""
|
"""
|
||||||
def __init__(self, app, print_queue):
|
|
||||||
|
def __init__(self, app, print_queue, printers_pool, printer_index=0):
|
||||||
super().__init__(daemon=True)
|
super().__init__(daemon=True)
|
||||||
self.app = app
|
self.app = app
|
||||||
self.print_queue = print_queue
|
self.print_queue = print_queue
|
||||||
self.printer = None
|
|
||||||
self._lock = threading.Lock()
|
|
||||||
self.running = True
|
self.running = True
|
||||||
self.state = "idle" # idle, printing, dead, drinking-a-beer
|
self.state = "idle" # idle, printing, dead, drinking-a-beer
|
||||||
self.app.logger.debug("Ho great, I'm alive... I'm ready to work another day...")
|
self.id = str(uuid4())
|
||||||
|
|
||||||
try:
|
# All workers share the same pool of printers.
|
||||||
self.printers = Printers(self.app)
|
self.printers = printers_pool
|
||||||
self.printers_obj = self.printers.printers # Get the number of printers connected to the system
|
self.printers_obj = self.printers.printers
|
||||||
self.printers_list = iter(self.printers.printers)
|
# If we create several workers, we can assign an index
|
||||||
|
# so that we lookup the nth printer for the nth worker
|
||||||
|
self._printer_index = printer_index
|
||||||
|
self.printer = self._acquire_available_printer()
|
||||||
|
|
||||||
except RuntimeError as e:
|
self.app.logger.debug(
|
||||||
self.app.logger.warning("Could not get any Printers")
|
"\t[⚙ %s][%s] is ready to work with printer %s",
|
||||||
raise e
|
self.id,
|
||||||
|
threading.get_ident(),
|
||||||
|
self.printer.printer_info.model,
|
||||||
|
)
|
||||||
|
|
||||||
|
def _acquire_available_printer(self):
|
||||||
|
result = self.printers.acquire_available_printer(
|
||||||
|
start_index=self._printer_index
|
||||||
|
)
|
||||||
|
if result is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
index, printer = result
|
||||||
|
# In case we need to lookup another printer, we don't
|
||||||
|
# look at the same printer in the printer list
|
||||||
|
self._printer_index = (index + 1) % len(self.printers_obj)
|
||||||
|
return printer
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""Background thread that processes queue items"""
|
"""Background thread that processes queue items"""
|
||||||
self.app.logger.debug("Worker %s started working.", threading.get_ident())
|
self.app.logger.debug(
|
||||||
self.app.logger.debug("Current threads : %s" , threading.active_count())
|
"\t[⚙ %s][%s] started working", self.id, threading.get_ident()
|
||||||
self.app.logger.debug("Threads actives : %s " , threading.enumerate())
|
)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
# If the printer is dead or asleep, it can't work.
|
# If the printer is dead or asleep, it can't work.
|
||||||
if not self.running:
|
if not self.running:
|
||||||
time.sleep(0.2)
|
time.sleep(0.4)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# If we have no available printer, we look at the list printers
|
# If we have no available printer, we look at the list printers
|
||||||
@@ -58,55 +76,51 @@ class PrintWorker(threading.Thread):
|
|||||||
# When we are finished with a printer, we release it to the world.
|
# When we are finished with a printer, we release it to the world.
|
||||||
|
|
||||||
# If we do not have a printer, we try to find one
|
# If we do not have a printer, we try to find one
|
||||||
while not self.printer:
|
|
||||||
time.sleep(1)
|
|
||||||
try:
|
|
||||||
self.app.logger.debug("Trying to find a available printer for the worker.")
|
|
||||||
|
|
||||||
# From the list of printer, we get one.
|
|
||||||
# If no printer in the list is avaible, we try again from the start of the loop, that we reset.
|
|
||||||
while self.printer.used or not self.printer:
|
|
||||||
self.printer = next(self.printers_list)
|
|
||||||
try:
|
|
||||||
self.printer = next(self.printer)
|
|
||||||
except StopIteration as e:
|
|
||||||
self.app.error("We do not have any available printers. Resetting our list of printers and trying again. " + str(e))
|
|
||||||
self.printers_list = iter(self.printers.printers)
|
|
||||||
time.sleep(1)
|
|
||||||
# TODO : Here, in case there is really no printer available, we will stay in a loop forever. Maybe after a number of tries, we should die.
|
|
||||||
|
|
||||||
|
|
||||||
# Here, we must have found a Printer() that is
|
|
||||||
# Printer.used = False, which means it's available.
|
|
||||||
# Therefore, we mark it used, so no other worker uses it.
|
|
||||||
self.printer.use_printer()
|
|
||||||
|
|
||||||
|
if self.running and self.printer is None:
|
||||||
self.app.logger.debug(
|
self.app.logger.debug(
|
||||||
"The worker got a %s printer and it's %s",
|
"\t[⚙ %s] Trying to find a available printer for the worker.",
|
||||||
self.printer.printer_type,
|
self.id,
|
||||||
|
)
|
||||||
|
self.printer = self._acquire_available_printer()
|
||||||
|
self.app.logger.debug(
|
||||||
|
"\t[⚙ %s] Got a %s ( %s ) printer and it's %s",
|
||||||
|
self.id,
|
||||||
|
self.printer.printer_info.name,
|
||||||
|
self.printer.printer_info.model,
|
||||||
"Ready" if self.printer.ready else "Not ready",
|
"Ready" if self.printer.ready else "Not ready",
|
||||||
)
|
)
|
||||||
except Exception as e:
|
|
||||||
self.app.logger.error("No printer detected" + str(e))
|
if self.printer is None:
|
||||||
self.printer = None
|
self.app.logger.debug("\t[⚙ %s] Could not get a printer ", self.id)
|
||||||
|
time.sleep(1)
|
||||||
|
continue
|
||||||
|
|
||||||
|
self.printer.use_printer()
|
||||||
|
|
||||||
# If the printer is not ready, we wait for it to become ready.
|
# If the printer is not ready, we wait for it to become ready.
|
||||||
while not self.printer.ready:
|
if not self.printer.ready:
|
||||||
self.app.debug("Waiting for our printer to become ready...")
|
self.app.logger.debug(
|
||||||
|
"\t[⚙ %s] Waiting for our printer to become ready...", self.id
|
||||||
|
)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
continue
|
||||||
|
|
||||||
if self.state != "idle":
|
if self.state != "idle":
|
||||||
self.app.logger("We are not idle, waiting...")
|
self.app.logger("\t[⚙ %s] We are not idle, waiting...", self.id)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.state = "printing"
|
self.state = "printing"
|
||||||
|
# self.app.logger.debug("\t[⚙ %s] Set the printer to printing state", self.id)
|
||||||
|
|
||||||
with self._lock:
|
|
||||||
try:
|
try:
|
||||||
|
# self.app.logger.debug("\t[⚙ %s] Trying to get a task from the queue ", self.id)
|
||||||
task = self.print_queue.dequeue()
|
task = self.print_queue.dequeue()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error("Could not get a new task ! %s ", str(e))
|
self.app.logger.error(
|
||||||
|
"\t[⚙ %s] Could not get a new task %s ", self.id, str(e)
|
||||||
|
)
|
||||||
self.state = "idle"
|
self.state = "idle"
|
||||||
self.printer.free_printer()
|
self.printer.free_printer()
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
@@ -114,39 +128,42 @@ class PrintWorker(threading.Thread):
|
|||||||
) from e
|
) from e
|
||||||
|
|
||||||
if task:
|
if task:
|
||||||
try:
|
self.app.logger.debug(
|
||||||
self.app.logger.info("Got a new task")
|
"\t[⚙ %s] Got a new task %s %s",
|
||||||
self.app.logger.debug("Got task %s", task.task_id)
|
self.id,
|
||||||
|
task.task_type,
|
||||||
|
task.task_id,
|
||||||
|
)
|
||||||
|
|
||||||
task.status = "processing"
|
task.status = "processing"
|
||||||
|
|
||||||
print_data = task.get_print_data()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.printer.print_task(task.task_type, print_data)
|
if task.task_type.value == "remove":
|
||||||
|
try:
|
||||||
|
self.app.logger.debug("Removing file %s", task.image_path)
|
||||||
|
os.remove(task.image_path)
|
||||||
|
except Exception as e:
|
||||||
|
self.app.logger.error("Could not remove file %s because %s", task.image_path, str(e))
|
||||||
|
raise RuntimeError from e
|
||||||
|
else:
|
||||||
|
print_data = task.get_print_data()
|
||||||
|
self.printer.print_task(task, print_data)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
self.state = "idle"
|
self.state = "idle"
|
||||||
self.app.logger.error("Could not print : %s", str(e))
|
self.app.logger.error("Could not process task %s because: %s", task.task_id, str(e))
|
||||||
|
self.print_queue.mark_completed(task.task_id, "failed", log=str(e))
|
||||||
self.app.logger.error(traceback.format_exc())
|
self.app.logger.error(traceback.format_exc())
|
||||||
self.printer.free_printer()
|
self.printer.free_printer()
|
||||||
raise e
|
|
||||||
|
|
||||||
task.status = "completed"
|
task.status = "completed"
|
||||||
self.print_queue.mark_completed(task.task_id, "completed")
|
self.print_queue.mark_completed(task.task_id, "completed")
|
||||||
self.app.logger.debug(
|
self.app.logger.debug(
|
||||||
"Finished printing task %s " , task.task_id
|
"\t[⚙ %s] Finished printing task %s ", self.id, task.task_id
|
||||||
)
|
)
|
||||||
self.state = "idle"
|
self.state = "idle"
|
||||||
|
|
||||||
except RuntimeError as e:
|
|
||||||
task.status = "failed"
|
|
||||||
self.state = "idle"
|
|
||||||
self.print_queue.mark_completed(task.task_id, "failed")
|
|
||||||
self.app.logger.error(
|
|
||||||
"Could not print task %s because %s " , task.task_id, str(e)
|
|
||||||
)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# When they are no new tasks to handle, we put the thread to sleep.
|
# When they are no new tasks to handle, we put the thread to sleep.
|
||||||
|
# self.app.logger.debug("\t[⚙ %s] No new tasks in the queue, sleeping", self.id)
|
||||||
self.state = "idle"
|
self.state = "idle"
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
@@ -156,7 +173,6 @@ class PrintWorker(threading.Thread):
|
|||||||
"""
|
"""
|
||||||
self.app.logger.debug("Giving the worker a break")
|
self.app.logger.debug("Giving the worker a break")
|
||||||
self.state = "drinking-a-beer"
|
self.state = "drinking-a-beer"
|
||||||
self.printer.free_printer()
|
|
||||||
self.running = False
|
self.running = False
|
||||||
|
|
||||||
def start_worker(self):
|
def start_worker(self):
|
||||||
@@ -172,8 +188,13 @@ class PrintWorker(threading.Thread):
|
|||||||
Return the worker state
|
Return the worker state
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
|
"id": self.id,
|
||||||
"is_running": self.running,
|
"is_running": self.running,
|
||||||
"queue_size": len(self.print_queue),
|
"queue_size": len(self.print_queue),
|
||||||
"state": self.state,
|
"state": self.state,
|
||||||
"printers": len(self.printers_obj),
|
"printer": (
|
||||||
|
self.printer.printer_info.model
|
||||||
|
if self.printer.printer_info.model
|
||||||
|
else "No printer"
|
||||||
|
),
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user