@microblink/camera-manager 7.2.6 → 7.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,31 @@
1
1
  (function(){"use strict";(r=>{window.__mbCameraManagerCssCode=r})("._dialogPositioner_15i6c_1{position:fixed;top:calc(var(--mb-size)*0rem);left:calc(var(--mb-size)*0rem);display:grid;height:100vh;width:100%;padding:calc(var(--mb-size)*2rem)}@supports (height:100dvh){._dialogPositioner_15i6c_1{height:100dvh}}@media (max-width: 379.9px){._dialogPositioner_15i6c_1{padding:calc(var(--mb-size)*1rem)}}._dialogBackdrop_15i6c_10{position:absolute;top:calc(var(--mb-size)*0rem);left:calc(var(--mb-size)*0rem);width:100%;height:100%;--un-bg-opacity:1;background-color:rgb(var(--color-black-rgb-value) / var(--un-bg-opacity));--un-bg-opacity:.5;--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}._dialogContent_15i6c_14{position:relative;max-height:calc(100dvh - 4rem);max-width:28rem;display:flex;flex-direction:column;place-self:center;border-radius:.5rem;--un-bg-opacity:1;background-color:rgb(var(--color-white-rgb-value) / var(--un-bg-opacity));padding-left:min(8%,3rem);padding-right:min(8%,3rem);padding-top:min(8%,1.5rem);padding-bottom:min(8%,1.5rem);--un-text-opacity:1;color:rgb(15 15 15 / var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}._dialogContent_15i6c_14._large_15i6c_18{padding-left:min(8%,4rem);padding-right:min(8%,4rem);padding-top:min(8%,3rem);padding-bottom:min(8%,3rem)}._dialogContent_15i6c_14._compact_15i6c_21{padding:min(8%,1.5rem)}@media screen and (max-height: 500px){._dialogContent_15i6c_14._compact_15i6c_21{height:auto}}@media screen and (max-height: 500px){._dialogContent_15i6c_14{height:100%;max-height:calc(100dvh - 2rem);overflow:hidden;padding-left:min(8%,1.5rem);padding-right:min(8%,1.5rem);padding-top:min(8%,.5rem);padding-bottom:min(8%,.5rem)}}@media (min-width: 640px){._dialogContent_15i6c_14{max-width:36rem}}@media (min-width: 1024px){._dialogContent_15i6c_14{max-width:28rem}}._dialogTitle_15i6c_45{text-align:center;font-size:calc(var(--mb-size)*1.5rem);line-height:calc(var(--mb-size)*2rem);font-weight:700}._contentOut_15i6c_49{height:100%}._closeButton_15i6c_53{position:absolute;top:.625rem;right:.625rem;width:calc(var(--mb-size)*2rem);height:calc(var(--mb-size)*2rem);display:flex;align-items:center;justify-content:center;border-style:none;background-color:transparent;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.1s}._closeButton_15i6c_53:hover{--un-bg-opacity:1;background-color:rgb(var(--color-gray-100-rgb-value) / var(--un-bg-opacity))}._closeButton_15i6c_53:active{--un-bg-opacity:1;background-color:rgb(var(--color-gray-200-rgb-value) / var(--un-bg-opacity))}._closeButtonInner_15i6c_59{width:.875rem;height:.875rem}._primaryActionButton_15i6c_63{height:2.5rem;-webkit-appearance:none;appearance:none;border-radius:calc(var(--mb-size)*2.5rem);border-style:none;--un-bg-opacity:1;background-color:rgb(var(--color-primary) / var(--un-bg-opacity));padding-left:calc(var(--mb-size)*1.25rem);padding-right:calc(var(--mb-size)*1.25rem);padding-top:calc(var(--mb-size)*.25rem);padding-bottom:calc(var(--mb-size)*.25rem);text-wrap:nowrap;font-size:calc(var(--mb-size)*.875rem);line-height:calc(var(--mb-size)*1.25rem);--un-text-opacity:1;color:rgb(var(--color-white-rgb-value) / var(--un-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.1s}._primaryActionButton_15i6c_63[disabled]{cursor:not-allowed;--un-bg-opacity:1;background-color:rgb(var(--color-gray-200-rgb-value) / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(var(--color-gray-500-rgb-value) / var(--un-text-opacity));--un-ring-width:0px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}._primaryActionButton_15i6c_63[disabled]:hover{--un-bg-opacity:1;background-color:rgb(var(--color-gray-200-rgb-value) / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(var(--color-gray-500-rgb-value) / var(--un-text-opacity))}._primaryActionButton_15i6c_63:hover{--un-bg-opacity:1;background-color:rgb(var(--color-accent-700-rgb-value) / var(--un-bg-opacity))}._primaryActionButton_15i6c_63:active{--un-bg-opacity:1;background-color:rgb(var(--color-accent-800-rgb-value) / var(--un-bg-opacity))}._primaryActionButton_15i6c_63:focus-visible{outline-width:2px;--un-outline-color-opacity:1;outline-color:rgb(var(--color-primary) / var(--un-outline-color-opacity));outline-offset:4px;outline-style:solid}._secondaryActionButton_15i6c_67{height:2.5rem;-webkit-appearance:none;appearance:none;border-radius:calc(var(--mb-size)*2.5rem);border-style:none;background-color:transparent;padding-left:calc(var(--mb-size)*1.25rem);padding-right:calc(var(--mb-size)*1.25rem);padding-top:calc(var(--mb-size)*.25rem);padding-bottom:calc(var(--mb-size)*.25rem);text-wrap:nowrap;font-size:calc(var(--mb-size)*.875rem);line-height:calc(var(--mb-size)*1.25rem);--un-text-opacity:1;color:rgb(var(--color-primary) / var(--un-text-opacity));--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-opacity:1;--un-ring-color:rgb(var(--color-primary) / var(--un-ring-opacity)) ;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.1s}._secondaryActionButton_15i6c_67[disabled]{cursor:not-allowed;--un-bg-opacity:1;background-color:rgb(var(--color-gray-200-rgb-value) / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(var(--color-gray-500-rgb-value) / var(--un-text-opacity));--un-ring-width:0px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}._secondaryActionButton_15i6c_67[disabled]:hover{--un-bg-opacity:1;background-color:rgb(var(--color-gray-200-rgb-value) / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(var(--color-gray-500-rgb-value) / var(--un-text-opacity))}._secondaryActionButton_15i6c_67:hover{--un-bg-opacity:1;background-color:rgb(var(--color-accent-25-rgb-value) / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(var(--color-accent-700-rgb-value) / var(--un-text-opacity));--un-ring-opacity:1;--un-ring-color:rgb(var(--color-accent-700-rgb-value) / var(--un-ring-opacity)) }._secondaryActionButton_15i6c_67:active{--un-bg-opacity:1;background-color:rgb(var(--color-accent-50-rgb-value) / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(var(--color-accent-800-rgb-value) / var(--un-text-opacity));--un-ring-opacity:1;--un-ring-color:rgb(var(--color-accent-800-rgb-value) / var(--un-ring-opacity)) }._secondaryActionButton_15i6c_67:focus-visible{outline-width:2px;--un-outline-color-opacity:1;outline-color:rgb(var(--color-primary) / var(--un-outline-color-opacity));outline-offset:4px;outline-style:solid}._actions_15i6c_71{display:flex;gap:calc(var(--mb-size)*1rem)}._actions_15i6c_71 ._primaryActionButton_15i6c_63,._actions_15i6c_71 ._secondaryActionButton_15i6c_67{width:50%}._alertTitle_15i6c_79{font-size:calc(var(--mb-size)*1.125rem);line-height:calc(var(--mb-size)*1.75rem);--un-text-opacity:1;color:rgb(var(--color-gray-700-rgb-value) / var(--un-text-opacity));font-weight:400}._alertText_15i6c_83{margin-top:calc(var(--mb-size)*1rem);margin-bottom:calc(var(--mb-size)*2rem);padding-left:calc(var(--mb-size)*.5rem);padding-right:calc(var(--mb-size)*.5rem);text-align:center;text-wrap:pretty;--un-text-opacity:1;color:rgb(var(--color-gray-500-rgb-value) / var(--un-text-opacity));font-weight:300;line-height:1.5}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.btn-focus:focus-visible{outline-width:2px;--un-outline-color-opacity:1;outline-color:rgb(var(--color-primary) / var(--un-outline-color-opacity));outline-offset:4px;outline-style:solid}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.left-0{left:calc(var(--mb-size)*0rem)}.right-4{right:calc(var(--mb-size)*1rem)}.top-0{top:calc(var(--mb-size)*0rem)}.has-\\[\\[data-scope\\]\\]\\:z-2:has([data-scope]),.z-2{z-index:2}.z-1{z-index:1}.grid{display:grid}.auto-cols-auto{grid-auto-columns:auto}.grid-cols-\\[1fr_auto_1fr\\]{grid-template-columns:1fr auto 1fr}.block{display:block}.size-12{width:calc(var(--mb-size)*3rem);height:calc(var(--mb-size)*3rem)}.size-6{width:calc(var(--mb-size)*1.5rem);height:calc(var(--mb-size)*1.5rem)}.size-full{width:100%;height:100%}.h-full{height:100%}.h-vh{height:100vh}.max-w-\\[100\\%\\]{max-width:100%}.min-h-\\[300px\\]{min-height:300px}.min-w-0{min-width:calc(var(--mb-size)*0rem)}.w-full{width:100%}.flex{display:flex}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.data-\\[state\\=open\\]\\:scale-y-\\[-1\\][data-state=open]{--un-scale-y:-1;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.select-none{-webkit-user-select:none;user-select:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;appearance:none}.place-items-center{place-items:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.gap-\\[1px\\]{gap:1px}.gap-2{gap:calc(var(--mb-size)*.5rem)}.gap-4{gap:calc(var(--mb-size)*1rem)}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.border-2{border-width:2px}.border-transparent{border-color:transparent}.data-\\[highlighted\\]\\:border-primary[data-highlighted]{--un-border-opacity:1;border-color:rgb(var(--color-primary) / var(--un-border-opacity))}.rounded-4{border-radius:calc(var(--mb-size)*1rem)}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-b-6{border-bottom-left-radius:calc(var(--mb-size)*1.5rem);border-bottom-right-radius:calc(var(--mb-size)*1.5rem)}.rounded-t-6{border-top-left-radius:calc(var(--mb-size)*1.5rem);border-top-right-radius:calc(var(--mb-size)*1.5rem)}.border-none{border-style:none}.border-solid{border-style:solid}.bg-dark-500{--un-bg-opacity:1;background-color:rgb(31 31 31 / var(--un-bg-opacity))}.bg-gray-550\\/50{background-color:rgb(var(--color-gray-550-rgb-value) / .5)}.bg-gray-550\\/70{background-color:rgb(var(--color-gray-550-rgb-value) / .7)}.bg-gray-550\\/90{background-color:rgb(var(--color-gray-550-rgb-value) / .9)}.p-2{padding:calc(var(--mb-size)*.5rem)}.px-4{padding-left:calc(var(--mb-size)*1rem);padding-right:calc(var(--mb-size)*1rem)}.py-2{padding-top:calc(var(--mb-size)*.5rem);padding-bottom:calc(var(--mb-size)*.5rem)}.py-3{padding-top:calc(var(--mb-size)*.75rem);padding-bottom:calc(var(--mb-size)*.75rem)}.py-4{padding-top:calc(var(--mb-size)*1rem);padding-bottom:calc(var(--mb-size)*1rem)}.pl-4{padding-left:calc(var(--mb-size)*1rem)}.pr-12{padding-right:calc(var(--mb-size)*3rem)}.text-align-center{text-align:center}.text-base{font-size:calc(var(--mb-size)*1rem);line-height:calc(var(--mb-size)*1.5rem)}.text-sm{font-size:calc(var(--mb-size)*.875rem);line-height:calc(var(--mb-size)*1.25rem)}.color-white{--un-text-opacity:1;color:rgb(var(--color-white-rgb-value) / var(--un-text-opacity))}.font-500{font-weight:500}.disabled\\:opacity-50:disabled{opacity:.5}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.backdrop-blur{--un-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-xl{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.drop-shadow-md{--un-drop-shadow:drop-shadow(0 4px 3px var(--un-drop-shadow-color, rgb(0 0 0 / .07))) drop-shadow(0 2px 2px var(--un-drop-shadow-color, rgb(0 0 0 / .06)));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.lerp\\:px-3\\@xs\\,8\\@lg{padding-inline:clamp(calc(var(--mb-size)*.75rem),calc(var(--mb-size)*.75rem) + (100vw - 380px) * .031055900621118012,calc(var(--mb-size)*2rem))}@supports (height:100dvh){.supports-\\[\\(height\\:100dvh\\)\\]\\:h-dvh{height:100dvh}}")})();
2
2
  import { subscribeWithSelector as ue } from "zustand/middleware";
3
- import { createStore as de } from "zustand/vanilla";
4
3
  import { shallow as ge } from "zustand/shallow";
5
- import { createComponent as l, use as V, template as y, spread as D, mergeProps as J, insert as w, memo as Se, isServer as He, delegateEvents as We, effect as K, className as H, Portal as ye, Dynamic as Ge, render as Xe } from "solid-js/web";
4
+ import { createStore as de } from "zustand/vanilla";
5
+ import { createComponent as c, use as V, template as y, spread as $, mergeProps as J, insert as w, memo as Se, isServer as He, delegateEvents as We, effect as K, className as H, Portal as ye, Dynamic as Ge, render as Xe } from "solid-js/web";
6
6
  import { createContext as Ce, onCleanup as he, useContext as Ee, onMount as Z, createSignal as N, Show as k, Index as Qe, createRoot as Ke, getOwner as ke, splitProps as Ye, createEffect as Je } from "solid-js";
7
7
  import { createWithSignal as Te } from "solid-zustand";
8
8
  import { createStore as Ze } from "solid-js/store";
9
9
  import { EnvironmentProvider as et } from "@ark-ui/solid/environment";
10
- import { Dialog as $ } from "@ark-ui/solid/dialog";
10
+ import { Dialog as I } from "@ark-ui/solid/dialog";
11
11
  import { Select as A, createListCollection as tt } from "@ark-ui/solid/select";
12
12
  import { Tooltip as Q } from "@ark-ui/solid/tooltip";
13
13
  typeof HTMLVideoElement < "u" && !("requestVideoFrameCallback" in HTMLVideoElement.prototype) && "getVideoPlaybackQuality" in HTMLVideoElement.prototype && (HTMLVideoElement.prototype._rvfcpolyfillmap = {}, HTMLVideoElement.prototype.requestVideoFrameCallback = function(r) {
14
14
  const e = performance.now(), t = this.getVideoPlaybackQuality(), a = this.mozPresentedFrames || this.mozPaintedFrames || t.totalVideoFrames - t.droppedVideoFrames, n = (o, i) => {
15
- const c = this.getVideoPlaybackQuality(), s = this.mozPresentedFrames || this.mozPaintedFrames || c.totalVideoFrames - c.droppedVideoFrames;
16
- if (s > a) {
17
- const h = this.mozFrameDelay || c.totalFrameDelay - t.totalFrameDelay || 0, f = i - o;
15
+ const s = this.getVideoPlaybackQuality(), l = this.mozPresentedFrames || this.mozPaintedFrames || s.totalVideoFrames - s.droppedVideoFrames;
16
+ if (l > a) {
17
+ const f = this.mozFrameDelay || s.totalFrameDelay - t.totalFrameDelay || 0, g = i - o;
18
18
  r(i, {
19
- presentationTime: i + h * 1e3,
20
- expectedDisplayTime: i + f,
19
+ presentationTime: i + f * 1e3,
20
+ expectedDisplayTime: i + g,
21
21
  width: this.videoWidth,
22
22
  height: this.videoHeight,
23
- mediaTime: Math.max(0, this.currentTime || 0) + f / 1e3,
24
- presentedFrames: s,
25
- processingDuration: h
23
+ mediaTime: Math.max(0, this.currentTime || 0) + g / 1e3,
24
+ presentedFrames: l,
25
+ processingDuration: f
26
26
  }), delete this._rvfcpolyfillmap[e];
27
27
  } else
28
- this._rvfcpolyfillmap[e] = requestAnimationFrame((h) => n(i, h));
28
+ this._rvfcpolyfillmap[e] = requestAnimationFrame((f) => n(i, f));
29
29
  };
30
30
  return this._rvfcpolyfillmap[e] = requestAnimationFrame((o) => n(e, o)), e;
31
31
  }, HTMLVideoElement.prototype.cancelVideoFrameCallback = function(r) {
@@ -206,9 +206,9 @@ var _ = function() {
206
206
  for (var e = this, t = arguments.length, a = Array(t), n = 0; n < t; n++)
207
207
  a[n] = arguments[n];
208
208
  return st(this, r), this.tag = function(o) {
209
- for (var i = arguments.length, c = Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
210
- c[s - 1] = arguments[s];
211
- return typeof o == "function" ? e.interimTag.bind(e, o) : typeof o == "string" ? e.transformEndResult(o) : (o = o.map(e.transformString.bind(e)), e.transformEndResult(o.reduce(e.processSubstitutions.bind(e, c))));
209
+ for (var i = arguments.length, s = Array(i > 1 ? i - 1 : 0), l = 1; l < i; l++)
210
+ s[l - 1] = arguments[l];
211
+ return typeof o == "function" ? e.interimTag.bind(e, o) : typeof o == "string" ? e.transformEndResult(o) : (o = o.map(e.transformString.bind(e)), e.transformEndResult(o.reduce(e.processSubstitutions.bind(e, s))));
212
212
  }, a.length > 0 && Array.isArray(a[0]) && (a = a[0]), this.transformers = a.map(function(o) {
213
213
  return typeof o == "function" ? o() : o;
214
214
  }), this.tag;
@@ -266,8 +266,8 @@ var _ = function() {
266
266
  }, {
267
267
  key: "transformSubstitution",
268
268
  value: function(t, a) {
269
- var n = function(i, c) {
270
- return c.onSubstitution ? c.onSubstitution(i, a) : i;
269
+ var n = function(i, s) {
270
+ return s.onSubstitution ? s.onSubstitution(i, a) : i;
271
271
  };
272
272
  return this.transformers.reduce(n, t);
273
273
  }
@@ -313,8 +313,8 @@ var L = function() {
313
313
  return {
314
314
  onEndResult: function(a) {
315
315
  if (e === "initial") {
316
- var n = a.match(/^[^\S\n]*(?=\S)/gm), o = n && Math.min.apply(Math, lt(n.map(function(c) {
317
- return c.length;
316
+ var n = a.match(/^[^\S\n]*(?=\S)/gm), o = n && Math.min.apply(Math, lt(n.map(function(s) {
317
+ return s.length;
318
318
  })));
319
319
  if (o) {
320
320
  var i = new RegExp("^.{" + o + "}", "gm");
@@ -347,15 +347,15 @@ var L = function() {
347
347
  separator: "",
348
348
  conjunction: "",
349
349
  serial: !1
350
- }, I = function() {
350
+ }, D = function() {
351
351
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ct;
352
352
  return {
353
353
  onSubstitution: function(a, n) {
354
354
  if (Array.isArray(a)) {
355
- var o = a.length, i = e.separator, c = e.conjunction, s = e.serial, h = n.match(/(\n?[^\S\n]+)$/);
356
- if (h ? a = a.join(i + h[1]) : a = a.join(i + " "), c && o > 1) {
357
- var f = a.lastIndexOf(i);
358
- a = a.slice(0, f) + (s ? i : "") + " " + c + a.slice(f + 1);
355
+ var o = a.length, i = e.separator, s = e.conjunction, l = e.serial, f = n.match(/(\n?[^\S\n]+)$/);
356
+ if (f ? a = a.join(i + f[1]) : a = a.join(i + " "), s && o > 1) {
357
+ var g = a.lastIndexOf(i);
358
+ a = a.slice(0, g) + (l ? i : "") + " " + s + a.slice(g + 1);
359
359
  }
360
360
  }
361
361
  return a;
@@ -376,20 +376,20 @@ var L = function() {
376
376
  }
377
377
  };
378
378
  };
379
- new _(I({ separator: "," }), L, M);
380
- new _(I({ separator: ",", conjunction: "and" }), L, M);
381
- new _(I({ separator: ",", conjunction: "or" }), L, M);
379
+ new _(D({ separator: "," }), L, M);
380
+ new _(D({ separator: ",", conjunction: "and" }), L, M);
381
+ new _(D({ separator: ",", conjunction: "or" }), L, M);
382
382
  new _(Re(`
383
- `), ut, I, L, M);
383
+ `), ut, D, L, M);
384
384
  new _(Re(`
385
- `), I, L, M, O(/&/g, "&amp;"), O(/</g, "&lt;"), O(/>/g, "&gt;"), O(/"/g, "&quot;"), O(/'/g, "&#x27;"), O(/`/g, "&#x60;"));
385
+ `), D, L, M, O(/&/g, "&amp;"), O(/</g, "&lt;"), O(/>/g, "&gt;"), O(/"/g, "&quot;"), O(/'/g, "&#x27;"), O(/`/g, "&#x60;"));
386
386
  new _(q(/(?:\n(?:\s*))+/g, " "), M);
387
387
  new _(q(/(?:\n\s*)/g, ""), M);
388
- new _(I({ separator: "," }), q(/(?:\s+)/g, " "), M);
389
- new _(I({ separator: ",", conjunction: "or" }), q(/(?:\s+)/g, " "), M);
390
- new _(I({ separator: ",", conjunction: "and" }), q(/(?:\s+)/g, " "), M);
391
- new _(I, L, M);
392
- new _(I, q(/(?:\s+)/g, " "), M);
388
+ new _(D({ separator: "," }), q(/(?:\s+)/g, " "), M);
389
+ new _(D({ separator: ",", conjunction: "or" }), q(/(?:\s+)/g, " "), M);
390
+ new _(D({ separator: ",", conjunction: "and" }), q(/(?:\s+)/g, " "), M);
391
+ new _(D, L, M);
392
+ new _(D, q(/(?:\s+)/g, " "), M);
393
393
  new _(L, M);
394
394
  var Ae = new _(L("all"), M);
395
395
  const dt = [
@@ -437,12 +437,17 @@ const dt = [
437
437
  } catch {
438
438
  return new Error(String(r));
439
439
  }
440
- }, $e = async () => {
440
+ };
441
+ function ht() {
442
+ const r = self.navigator.userAgent.toLowerCase();
443
+ return /iphone|ipad|ipod/.test(r);
444
+ }
445
+ const Ie = async () => {
441
446
  try {
442
447
  const r = await navigator.mediaDevices.getUserMedia({
443
448
  video: !0
444
449
  });
445
- De(r);
450
+ $e(r);
446
451
  } catch (r) {
447
452
  throw new U(
448
453
  "Camera permission not given",
@@ -450,18 +455,18 @@ const dt = [
450
455
  Y(r)
451
456
  );
452
457
  }
453
- }, ht = async () => {
458
+ }, mt = async () => {
454
459
  if (!isSecureContext)
455
460
  throw new Error(Ae`
456
461
  Cameras can only be used in a secure context:
457
462
  https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
458
463
  `);
459
- return await $e(), (await navigator.mediaDevices.enumerateDevices()).filter((t) => t.kind === "videoinput");
460
- }, De = (r) => {
464
+ return await Ie(), (await navigator.mediaDevices.enumerateDevices()).filter((t) => t.kind === "videoinput");
465
+ }, $e = (r) => {
461
466
  const e = r.getTracks();
462
467
  for (const t of e)
463
468
  t.stop();
464
- }, mt = (r, e, t) => ({
469
+ }, gt = (r, e, t) => ({
465
470
  video: {
466
471
  deviceId: t ? { exact: t } : void 0,
467
472
  frameRate: 30,
@@ -478,24 +483,24 @@ const dt = [
478
483
  },
479
484
  audio: !1
480
485
  });
481
- function gt(r) {
486
+ function ft(r) {
482
487
  let e = 0;
483
488
  return r.torchSupported && (e += 1), r.singleShotSupported && (e += 1), e;
484
489
  }
485
- function ft(r, e) {
486
- return r.filter((t) => e === "back" || e === void 0 ? Me(t.name) : xe(t.name));
490
+ function bt(r, e) {
491
+ return r.filter((t) => e === "back" ? Me(t.name) : e === "front" ? xe(t.name) : !0);
487
492
  }
488
- const bt = async (r, e = "4k", t = "back") => {
493
+ const pt = async (r, e, t) => {
489
494
  if (r.length === 0)
490
- throw new Error("No cameras found");
495
+ throw new Error("No cameras found on device");
491
496
  if (r.length === 1)
492
497
  return await r[0].startStream(e), r[0];
493
- let a = ft(r, t);
498
+ let a = bt(r, t);
494
499
  if (a.length === 1)
495
500
  return await a[0].startStream(e), a[0];
496
501
  if (a.length === 0 && (console.debug("No camera found with requested facing, using all cameras"), a = r), t === "back") {
497
502
  const s = a.find(
498
- (h) => dt.includes(h.name)
503
+ (l) => dt.includes(l.name)
499
504
  );
500
505
  if (s)
501
506
  return await s.startStream(e), s;
@@ -506,31 +511,36 @@ const bt = async (r, e = "4k", t = "back") => {
506
511
  }
507
512
  const n = /* @__PURE__ */ new Map();
508
513
  let o, i = -1 / 0;
509
- for (let s = a.length - 1; s >= 0; s--) {
510
- const h = a[s];
514
+ ht() || a.reverse();
515
+ for (const s of a)
511
516
  try {
512
- await h.startStream(e);
513
- const f = gt(h);
514
- if (n.set(h, f), f > i ? (o && o !== h && o.stopStream(), i = f, o = h) : h.stopStream(), f === 2)
515
- return console.debug("Found camera with all capabilities, returning early"), h;
516
- } catch (f) {
517
- console.warn(`Failed to test camera ${h.name}:`, f), h.stopStream();
517
+ await s.startStream(e);
518
+ const l = ft(s);
519
+ if (n.set(s, l), l > i)
520
+ i = l, o = s;
521
+ else {
522
+ s.stopStream();
523
+ continue;
524
+ }
525
+ if (l === 2)
526
+ return s;
527
+ s.stopStream();
528
+ } catch (l) {
529
+ console.warn(`Failed to test camera ${s.name}:`, l), s.stopStream();
518
530
  }
519
- }
520
- if (o)
521
- return o;
522
- const c = a[0];
523
- return await c.startStream(e), c;
531
+ if (!o)
532
+ throw new Error("No suitable camera found, should not happen!");
533
+ return o;
524
534
  };
525
- function pt(r) {
535
+ function vt(r) {
526
536
  const e = [];
527
537
  for (const t of r) {
528
- const a = new Ie(t);
538
+ const a = new De(t);
529
539
  a !== null && e.push(a);
530
540
  }
531
541
  return e;
532
542
  }
533
- const vt = {
543
+ const wt = {
534
544
  deviceInfo: {},
535
545
  name: "",
536
546
  facingMode: void 0,
@@ -540,14 +550,15 @@ const vt = {
540
550
  singleShotSupported: !1,
541
551
  maxSupportedResolution: void 0,
542
552
  streamCapabilities: void 0,
553
+ deviceCapabilities: void 0,
543
554
  error: void 0
544
555
  };
545
- class Ie {
556
+ class De {
546
557
  /**
547
558
  * The internal state of the camera, implemented as a Zustand store.
548
559
  */
549
560
  store = de()(
550
- ue(() => vt)
561
+ ue(() => wt)
551
562
  );
552
563
  #e = /* @__PURE__ */ new Set();
553
564
  /**
@@ -568,7 +579,11 @@ class Ie {
568
579
  return this.store.getState().streamCapabilities;
569
580
  }
570
581
  get activeStream() {
571
- return this.store.getState().activeStream;
582
+ return this.store.getState().activeStream?.active === !1 && (console.warn(
583
+ "Detected inactive stream on camera:",
584
+ this.name,
585
+ this.store.getState().activeStream
586
+ ), this.store.setState({ activeStream: void 0 })), this.store.getState().activeStream;
572
587
  }
573
588
  get name() {
574
589
  return this.store.getState().name;
@@ -604,7 +619,6 @@ class Ie {
604
619
  });
605
620
  }
606
621
  subscribe(e, t, a) {
607
- console.debug(`Creating subscription for camera: ${this.name}`);
608
622
  let n;
609
623
  return t ? n = this.store.subscribe(
610
624
  e,
@@ -631,12 +645,13 @@ class Ie {
631
645
  this.populateCapabilities(t), this.store.setState({ activeStream: t });
632
646
  const a = t.getVideoTracks()[0];
633
647
  return a.onended = () => {
634
- this.store.setState({
635
- error: new U(
636
- "Camera stream ended unexpectedly",
637
- "STREAM_ENDED_UNEXPECTEDLY"
638
- )
639
- }), this.stopStream();
648
+ const n = new U(
649
+ "Camera stream ended unexpectedly",
650
+ "STREAM_ENDED_UNEXPECTEDLY"
651
+ );
652
+ throw this.store.setState({
653
+ error: n
654
+ }), this.stopStream(), n;
640
655
  }, t;
641
656
  }
642
657
  /**
@@ -648,7 +663,7 @@ class Ie {
648
663
  */
649
664
  async acquireStreamWithFallback(e) {
650
665
  try {
651
- const t = mt(
666
+ const t = gt(
652
667
  e,
653
668
  this.facingMode,
654
669
  this.deviceInfo.deviceId
@@ -673,6 +688,10 @@ class Ie {
673
688
  */
674
689
  populateCapabilities(e) {
675
690
  const t = e.getVideoTracks()[0].getCapabilities();
691
+ if ("getCapabilities" in this.deviceInfo) {
692
+ const g = this.deviceInfo.getCapabilities();
693
+ this.store.setState({ deviceCapabilities: g });
694
+ }
676
695
  ge(t, this.streamCapabilities) || this.store.setState({ streamCapabilities: t });
677
696
  const o = e.getVideoTracks()[0].getSettings();
678
697
  if (!o.width || !o.height)
@@ -682,8 +701,8 @@ class Ie {
682
701
  const i = {
683
702
  width: o.width,
684
703
  height: o.height
685
- }, c = Ct(i), s = {};
686
- !this.maxSupportedResolution && c && (s.maxSupportedResolution = c), "torch" in t && (s.torchSupported = !0), "focusMode" in t && t.focusMode?.includes("single-shot") && (s.singleShotSupported = !0), this.facingMode === "front" && t.facingMode?.includes("environment") && (s.facingMode = "back", console.warn("Front camera selected, but facingMode is environment")), this.facingMode === "back" && t.facingMode?.includes("user") && (s.facingMode = "front", console.warn("Back camera selected, but facingMode is user")), this.facingMode || (t.facingMode?.includes("environment") && (s.facingMode = "back"), t.facingMode?.includes("user") && (s.facingMode = "front")), ge(s, this.store.getState()) || this.store.setState(s);
704
+ }, s = Et(i), l = {};
705
+ !this.maxSupportedResolution && s && (l.maxSupportedResolution = s), "torch" in t && (l.torchSupported = !0), "focusMode" in t && t.focusMode?.includes("single-shot") && (l.singleShotSupported = !0), this.facingMode === "front" && t.facingMode?.includes("environment") && (l.facingMode = "back", console.warn("Front camera selected, but facingMode is environment")), this.facingMode === "back" && t.facingMode?.includes("user") && (l.facingMode = "front", console.warn("Back camera selected, but facingMode is user")), this.facingMode || (t.facingMode?.includes("environment") && (l.facingMode = "back"), t.facingMode?.includes("user") && (l.facingMode = "front")), ge(l, this.store.getState()) || this.store.setState(l);
687
706
  }
688
707
  /**
689
708
  * Toggles the torch on the camera.
@@ -713,7 +732,7 @@ class Ie {
713
732
  * Stops the stream on the camera.
714
733
  */
715
734
  stopStream() {
716
- this.activeStream && (console.debug(`Stopping active stream on ${this.name}`), De(this.activeStream), this.store.setState({
735
+ this.activeStream && (console.debug(`Stopping active stream on ${this.name}`), $e(this.activeStream), this.store.setState({
717
736
  activeStream: void 0,
718
737
  streamCapabilities: void 0,
719
738
  torchEnabled: !1
@@ -737,10 +756,10 @@ const P = {
737
756
  "1080p": { width: 1920, height: 1080 },
738
757
  "4k": { width: 3840, height: 2160 }
739
758
  };
740
- function wt(r) {
759
+ function St(r) {
741
760
  return Math.max(r.width, r.height);
742
761
  }
743
- function St(r) {
762
+ function yt(r) {
744
763
  const e = {
745
764
  width: Math.max(r.width, r.height),
746
765
  height: Math.min(r.width, r.height)
@@ -751,16 +770,16 @@ function St(r) {
751
770
  )} is not 16:9, may cause issues with some video players.`
752
771
  ), e;
753
772
  }
754
- function yt(r) {
755
- const e = wt(r);
773
+ function Ct(r) {
774
+ const e = St(r);
756
775
  return e > 1920 ? "4k" : e > 1280 ? "1080p" : "720p";
757
776
  }
758
- function Ct(r) {
759
- const e = St(r), t = Object.entries(P).find(
777
+ function Et(r) {
778
+ const e = yt(r), t = Object.entries(P).find(
760
779
  ([n, o]) => o.width === e.width && o.height === e.height
761
780
  );
762
781
  if (!t) {
763
- const n = yt(r);
782
+ const n = Ct(r);
764
783
  return console.warn(
765
784
  `No exact resolution match found for ${JSON.stringify(r)}, categorizing as ${n}`
766
785
  ), n;
@@ -783,7 +802,7 @@ const Fe = {
783
802
  }, u = de()(
784
803
  // this is important! Otherwise solid-zustand will start mutating the initial state
785
804
  ue(() => structuredClone(Fe))
786
- ), Et = () => {
805
+ ), kt = () => {
787
806
  console.debug("Stopping all cameras and resetting the `cameraManagerStore`."), u.getState().cameras.forEach((r) => {
788
807
  r.stopStream();
789
808
  }), u.setState(structuredClone(Fe));
@@ -791,16 +810,16 @@ const Fe = {
791
810
  function me() {
792
811
  return typeof window.ShadyDOM < "u" && typeof ShadowRoot < "u";
793
812
  }
794
- function kt() {
813
+ function Tt() {
795
814
  return typeof ShadowRoot < "u";
796
815
  }
797
- function Tt(r) {
816
+ function _t(r) {
798
817
  be == null || me() || (Element.prototype.attachShadow = function(e) {
799
818
  const t = be.call(this, e);
800
819
  return r(t), t;
801
820
  });
802
821
  }
803
- function _t(r, ...e) {
822
+ function Mt(r, ...e) {
804
823
  const t = new Set(e);
805
824
  let a = !1;
806
825
  const n = () => {
@@ -823,10 +842,10 @@ function _t(r, ...e) {
823
842
  }
824
843
  };
825
844
  }
826
- const Mt = {
845
+ const xt = {
827
846
  childList: !0,
828
847
  subtree: !0
829
- }, xt = (r) => {
848
+ }, Rt = (r) => {
830
849
  typeof queueMicrotask < "u" ? queueMicrotask(r) : typeof Promise < "u" ? Promise.resolve().then(() => r()) : setTimeout(() => r(), 0);
831
850
  };
832
851
  function pe(r) {
@@ -839,17 +858,17 @@ function pe(r) {
839
858
  return e;
840
859
  }
841
860
  }
842
- function Rt(r, e) {
861
+ function At(r, e) {
843
862
  return me() ? new Set(pe(window.ShadyDOM.nativeMethods.querySelectorAll.call(document.documentElement, e))) : new Set("querySelectorAll" in r ? pe(r.querySelectorAll(e)) : []);
844
863
  }
845
- function At(r, e) {
864
+ function It(r, e) {
846
865
  return /* @__PURE__ */ new Set([...r ?? [], ...e ?? []]);
847
866
  }
848
867
  function $t(r) {
849
868
  return "activeElement" in r;
850
869
  }
851
870
  function Le(r = document.documentElement) {
852
- if ($t(r) && ze(r), me() && r instanceof ShadowRoot || !kt())
871
+ if ($t(r) && ze(r), me() && r instanceof ShadowRoot || !Tt())
853
872
  return;
854
873
  const e = r.childNodes, t = "shadowRoot" in r && r.shadowRoot != null ? [r.shadowRoot] : [];
855
874
  for (const a of [...e, ...t])
@@ -859,27 +878,27 @@ function Dt(r) {
859
878
  return "isConnected" in Node.prototype ? r.isConnected : r.ownerDocument == null || !(r.ownerDocument.compareDocumentPosition(r) & r.DOCUMENT_POSITION_DISCONNECTED);
860
879
  }
861
880
  const W = /* @__PURE__ */ new Map();
862
- function It(r, e) {
881
+ function Ft(r, e) {
863
882
  const t = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakMap();
864
- let i = !1, c = !1, s = !1;
865
- const h = () => {
866
- c = !0;
883
+ let i = !1, s = !1, l = !1;
884
+ const f = () => {
885
+ s = !0;
867
886
  const b = [...t];
868
- b.length > 0 && e(b, r), t.clear(), i = !1, c = !1;
869
- }, f = () => {
870
- i || (i = !0, xt(h));
887
+ b.length > 0 && e(b, r), t.clear(), i = !1, s = !1;
888
+ }, g = () => {
889
+ i || (i = !0, Rt(f));
871
890
  }, p = (b) => {
872
- t.add(b), c || f();
891
+ t.add(b), s || g();
873
892
  }, S = () => {
874
893
  const b = [...t];
875
894
  return t.clear(), b;
876
- }, g = () => {
895
+ }, m = () => {
877
896
  a.clear();
878
897
  }, d = (b, E) => {
879
898
  let x = n.get(b);
880
- const F = Rt(b, E), G = x?.get(E), X = At(F, G);
881
- m(X), x == null && (x = /* @__PURE__ */ new Map(), n.set(b, x)), x.set(E, F);
882
- }, m = (b) => {
899
+ const F = At(b, E), G = x?.get(E), X = It(F, G);
900
+ h(X), x == null && (x = /* @__PURE__ */ new Map(), n.set(b, x)), x.set(E, F);
901
+ }, h = (b) => {
883
902
  for (const E of b) {
884
903
  const x = o.get(E), F = Dt(E);
885
904
  x !== F && (o.set(E, F), p({
@@ -890,20 +909,20 @@ function It(r, e) {
890
909
  }, v = {
891
910
  observedTargets: a,
892
911
  queryRootAndHandleMutationChanges: d,
893
- handleMutationChange: m,
912
+ handleMutationChange: h,
894
913
  addObservedTarget: (b) => {
895
- if (se.run(), s || (s = !0, Le()), a.add(b), typeof b != "string")
896
- m([b]);
914
+ if (se.run(), l || (l = !0, Le()), a.add(b), typeof b != "string")
915
+ h([b]);
897
916
  else
898
917
  for (const E of ie)
899
918
  d(E, b);
900
919
  },
901
- clearObservedTargets: g,
920
+ clearObservedTargets: m,
902
921
  clearQueue: S
903
922
  };
904
923
  W.set(r, v);
905
924
  }
906
- const Ft = (r) => {
925
+ const Lt = (r) => {
907
926
  for (const e of r)
908
927
  if (e.type === "childList")
909
928
  for (const t of W.values())
@@ -912,9 +931,9 @@ const Ft = (r) => {
912
931
  }, ie = /* @__PURE__ */ new Set(), ze = /* @__PURE__ */ (() => {
913
932
  let r;
914
933
  return function(e) {
915
- ie.has(e) || (ie.add(e), r == null && (r = new MutationObserver(Ft)), r.observe(e, Mt));
934
+ ie.has(e) || (ie.add(e), r == null && (r = new MutationObserver(Lt)), r.observe(e, xt));
916
935
  };
917
- })(), se = _t(ze, document.documentElement);
936
+ })(), se = Mt(ze, document.documentElement);
918
937
  class z {
919
938
  constructor(e) {
920
939
  if (new.target === void 0)
@@ -923,7 +942,7 @@ class z {
923
942
  throw new ReferenceError(`Failed to construct '${z.name}': 1 argument required, but only 0 present.`);
924
943
  if (typeof e != "function")
925
944
  throw new TypeError(`Failed to construct '${z.name}': The callback provided as parameter 1 is not a function.`);
926
- It(this, e);
945
+ Ft(this, e);
927
946
  }
928
947
  /**
929
948
  * The Symbol.@@toStringTag value
@@ -960,7 +979,7 @@ class z {
960
979
  e?.clearObservedTargets();
961
980
  }
962
981
  }
963
- Tt(se.schedule.bind(se));
982
+ _t(se.schedule.bind(se));
964
983
  function ve(r, ...e) {
965
984
  return r.addEventListener(...e), () => {
966
985
  r.removeEventListener(...e);
@@ -976,7 +995,7 @@ function le(r) {
976
995
  return !0;
977
996
  }
978
997
  }
979
- class Lt {
998
+ class zt {
980
999
  #e;
981
1000
  #n = null;
982
1001
  #r = null;
@@ -1114,8 +1133,8 @@ class Lt {
1114
1133
  #g(e, t) {
1115
1134
  if (!this.#n)
1116
1135
  throw new Error("CanvasRenderingContext2D is missing!");
1117
- const a = "videoWidth" in e ? e.videoWidth : e.width, n = "videoHeight" in e ? e.videoHeight : e.height, o = t?.x ?? 0, i = t?.y ?? 0, c = t?.width ?? a, s = t?.height ?? n;
1118
- return this.#h(c, s), this.#n.drawImage(e, o, i, c, s), this.#n.getImageData(0, 0, c, s);
1136
+ const a = "videoWidth" in e ? e.videoWidth : e.width, n = "videoHeight" in e ? e.videoHeight : e.height, o = t?.x ?? 0, i = t?.y ?? 0, s = t?.width ?? a, l = t?.height ?? n;
1137
+ return this.#h(s, l), this.#n.drawImage(e, o, i, s, l), this.#n.getImageData(0, 0, s, l);
1119
1138
  }
1120
1139
  /**
1121
1140
  * Extract image data using WebGL2.
@@ -1127,23 +1146,23 @@ class Lt {
1127
1146
  #u(e, t) {
1128
1147
  if (!this.#r || !this.#a || !this.#i)
1129
1148
  throw new Error("WebGL2 context or resources are missing!");
1130
- const a = "videoWidth" in e ? e.videoWidth : e.width, n = "videoHeight" in e ? e.videoHeight : e.height, o = t?.x ?? 0, i = t?.y ?? 0, c = t?.width ?? a, s = t?.height ?? n, h = c * s * 4;
1131
- if (this.#h(c, s), this.isBufferDetached())
1149
+ const a = "videoWidth" in e ? e.videoWidth : e.width, n = "videoHeight" in e ? e.videoHeight : e.height, o = t?.x ?? 0, i = t?.y ?? 0, s = t?.width ?? a, l = t?.height ?? n, f = s * l * 4;
1150
+ if (this.#h(s, l), this.isBufferDetached())
1132
1151
  throw new Error("Buffer is detached!");
1133
- (!this.#t || this.#t.length !== h) && (this.#t = new Uint8ClampedArray(h));
1134
- const f = this.#r;
1135
- f.bindTexture(f.TEXTURE_2D, this.#a), f.texImage2D(f.TEXTURE_2D, 0, f.RGBA, f.RGBA, f.UNSIGNED_BYTE, e), f.bindFramebuffer(f.FRAMEBUFFER, this.#i);
1152
+ (!this.#t || this.#t.length !== f) && (this.#t = new Uint8ClampedArray(f));
1153
+ const g = this.#r;
1154
+ g.bindTexture(g.TEXTURE_2D, this.#a), g.texImage2D(g.TEXTURE_2D, 0, g.RGBA, g.RGBA, g.UNSIGNED_BYTE, e), g.bindFramebuffer(g.FRAMEBUFFER, this.#i);
1136
1155
  try {
1137
- f.pixelStorei(f.PACK_ALIGNMENT, this.#c), f.readPixels(o, i, c, s, f.RGBA, f.UNSIGNED_BYTE, this.#t);
1156
+ g.pixelStorei(g.PACK_ALIGNMENT, this.#c), g.readPixels(o, i, s, l, g.RGBA, g.UNSIGNED_BYTE, this.#t);
1138
1157
  } catch (p) {
1139
1158
  if (this.#c !== 1) {
1140
- this.#c = 1, f.pixelStorei(f.PACK_ALIGNMENT, 1);
1141
- const S = new Uint8ClampedArray(h);
1142
- return f.readPixels(0, 0, c, s, f.RGBA, f.UNSIGNED_BYTE, S), this.#t = S, new ImageData(S, c, s);
1159
+ this.#c = 1, g.pixelStorei(g.PACK_ALIGNMENT, 1);
1160
+ const S = new Uint8ClampedArray(f);
1161
+ return g.readPixels(0, 0, s, l, g.RGBA, g.UNSIGNED_BYTE, S), this.#t = S, new ImageData(S, s, l);
1143
1162
  }
1144
1163
  throw p;
1145
1164
  }
1146
- return new ImageData(this.#t, c, s);
1165
+ return new ImageData(this.#t, s, l);
1147
1166
  }
1148
1167
  /**
1149
1168
  * Update canvas dimensions if needed.
@@ -1168,7 +1187,7 @@ class Lt {
1168
1187
  }
1169
1188
  }
1170
1189
  const Ne = (r) => ArrayBuffer.isView(r) ? r.buffer : r;
1171
- class aa {
1190
+ class na {
1172
1191
  #e;
1173
1192
  /**
1174
1193
  * The desired video resolution for camera streams. This is used as the ideal resolution
@@ -1229,10 +1248,10 @@ class aa {
1229
1248
  */
1230
1249
  constructor(e = {}, t) {
1231
1250
  const { mirrorFrontCameras: a, preferredResolution: n } = {
1232
- ...zt,
1251
+ ...Nt,
1233
1252
  ...e
1234
1253
  };
1235
- this.#n = n, this.#a = new Lt(
1254
+ this.#n = n, this.#a = new zt(
1236
1255
  t
1237
1256
  ), this.#i = a;
1238
1257
  }
@@ -1430,7 +1449,7 @@ class aa {
1430
1449
  cameraPermission: "blocked"
1431
1450
  });
1432
1451
  }, 100);
1433
- const e = await ht().catch((a) => {
1452
+ const e = await mt().catch((a) => {
1434
1453
  throw a instanceof U && a.code === "PERMISSION_DENIED" && u.setState({
1435
1454
  errorState: Y(a),
1436
1455
  cameraPermission: "denied",
@@ -1440,7 +1459,7 @@ class aa {
1440
1459
  u.setState({
1441
1460
  cameraPermission: "granted"
1442
1461
  });
1443
- const t = pt(e);
1462
+ const t = vt(e);
1444
1463
  t.forEach((a) => {
1445
1464
  a.unsubscribeAll(), a.subscribe((n) => {
1446
1465
  window.queueMicrotask(() => {
@@ -1448,14 +1467,14 @@ class aa {
1448
1467
  a === i && u.setState({
1449
1468
  selectedCamera: a
1450
1469
  });
1451
- let c = !1, s;
1452
- n.error?.code === "STREAM_ENDED_UNEXPECTEDLY" && $e().catch((h) => {
1453
- h instanceof U && h.code === "PERMISSION_DENIED" && (c = !0, s = h);
1470
+ let s = !1, l;
1471
+ n.error?.code === "STREAM_ENDED_UNEXPECTEDLY" && Ie().catch((f) => {
1472
+ f instanceof U && f.code === "PERMISSION_DENIED" && (s = !0, l = f);
1454
1473
  }).finally(() => {
1455
1474
  u.setState({
1456
- errorState: s,
1475
+ errorState: l,
1457
1476
  playbackState: "idle",
1458
- cameraPermission: c ? "denied" : "granted"
1477
+ cameraPermission: s ? "denied" : "granted"
1459
1478
  });
1460
1479
  });
1461
1480
  });
@@ -1478,7 +1497,7 @@ class aa {
1478
1497
  "facingMode",
1479
1498
  "maxSupportedResolution",
1480
1499
  "name"
1481
- ].every((c) => n[c] === o[c])
1500
+ ].every((s) => n[s] === o[s])
1482
1501
  }
1483
1502
  );
1484
1503
  }), u.setState({
@@ -1566,7 +1585,7 @@ class aa {
1566
1585
  async #d({
1567
1586
  autoplay: e = !0,
1568
1587
  preferredCamera: t,
1569
- preferredFacing: a
1588
+ preferredFacing: a = "back"
1570
1589
  } = {}) {
1571
1590
  const n = u.getState().videoElement;
1572
1591
  if (!n) {
@@ -1577,31 +1596,31 @@ class aa {
1577
1596
  console.warn("Already streaming");
1578
1597
  return;
1579
1598
  }
1580
- if (t instanceof Ie && await this.selectCamera(t), !u.getState().selectedCamera)
1599
+ if (t instanceof De && await this.selectCamera(t), !u.getState().selectedCamera)
1581
1600
  try {
1582
- const c = await this.getCameraDevices();
1583
- let s;
1584
- if (!c.length)
1601
+ const s = await this.getCameraDevices();
1602
+ let l;
1603
+ if (!s.length)
1585
1604
  throw console.warn("Camera list is empty"), new Error(
1586
1605
  `No cameras found matching the filter ${a}`
1587
1606
  );
1588
- if (typeof t == "function" && (s = t(c), s || console.warn(
1607
+ if (typeof t == "function" && (l = t(s), l || console.warn(
1589
1608
  "No camera found matching the preferred camera function, falling back to facing mode"
1590
- )), s || (s = await bt(
1591
- c,
1609
+ )), l || (l = await pt(
1610
+ s,
1592
1611
  this.resolution,
1593
1612
  a
1594
- )), !s)
1613
+ )), !l)
1595
1614
  throw new Error(
1596
1615
  `No cameras found matching the filter ${a}`
1597
1616
  );
1598
- await this.selectCamera(s), this.#m() && u.setState({
1617
+ await this.selectCamera(l), this.#m() && u.setState({
1599
1618
  errorState: void 0
1600
1619
  });
1601
- } catch (c) {
1620
+ } catch (s) {
1602
1621
  throw u.setState({
1603
- errorState: Y(c)
1604
- }), c;
1622
+ errorState: Y(s)
1623
+ }), s;
1605
1624
  }
1606
1625
  const o = u.getState().selectedCamera;
1607
1626
  if (!o)
@@ -1766,19 +1785,19 @@ class aa {
1766
1785
  * Resets the CameraManager and stops all streams.
1767
1786
  */
1768
1787
  reset() {
1769
- console.debug("Resetting camera manager"), this.#o.clear(), this.userInitiatedAbort = !1, this.stopStream(), Et();
1788
+ console.debug("Resetting camera manager"), this.#o.clear(), this.userInitiatedAbort = !1, this.stopStream(), kt();
1770
1789
  }
1771
1790
  }
1772
- const zt = {
1791
+ const Nt = {
1773
1792
  mirrorFrontCameras: !0,
1774
1793
  preferredResolution: "1080p"
1775
1794
  }, Pe = Ce();
1776
- function Nt() {
1795
+ function Pt() {
1777
1796
  return Te(u);
1778
1797
  }
1779
- const Pt = (r) => {
1798
+ const Ot = (r) => {
1780
1799
  const e = {
1781
- cameraManagerSolidStore: Nt(),
1800
+ cameraManagerSolidStore: Pt(),
1782
1801
  // eslint-disable-next-line solid/reactivity
1783
1802
  cameraManager: r.cameraManager,
1784
1803
  // eslint-disable-next-line solid/reactivity
@@ -1800,7 +1819,7 @@ const Pt = (r) => {
1800
1819
  };
1801
1820
  return he(() => {
1802
1821
  console.debug("CameraUiStoreProvider cleanup");
1803
- }), l(Pe.Provider, {
1822
+ }), c(Pe.Provider, {
1804
1823
  value: e,
1805
1824
  get children() {
1806
1825
  return r.children;
@@ -1813,7 +1832,7 @@ function j() {
1813
1832
  throw new Error("StoreContext.Provider not in scope");
1814
1833
  return r;
1815
1834
  }
1816
- const Ot = {
1835
+ const Bt = {
1817
1836
  camera_error_cancel_btn: "Cancel",
1818
1837
  camera_error_details: "Please allow camera access in your browser and try again.",
1819
1838
  camera_error_primary_btn: "Retry",
@@ -1826,11 +1845,11 @@ const Ot = {
1826
1845
  select_camera: "Select camera",
1827
1846
  selected_camera: "Selected camera",
1828
1847
  torch: "Torch"
1829
- }, Oe = Ce(), Bt = (r) => {
1848
+ }, Oe = Ce(), Vt = (r) => {
1830
1849
  const [e, t] = Ze(
1831
1850
  // we structure clone to avoid proxying to the original object
1832
1851
  structuredClone({
1833
- ...Ot,
1852
+ ...Bt,
1834
1853
  // we don't care on init
1835
1854
  // eslint-disable-next-line solid/reactivity
1836
1855
  ...r.userStrings
@@ -1843,7 +1862,7 @@ const Ot = {
1843
1862
  t: e,
1844
1863
  updateLocalization: t
1845
1864
  };
1846
- return l(Oe.Provider, {
1865
+ return c(Oe.Provider, {
1847
1866
  value: a,
1848
1867
  get children() {
1849
1868
  return r.children;
@@ -1856,23 +1875,23 @@ function ee() {
1856
1875
  throw new Error("LocalizationContext.Provider not in scope.");
1857
1876
  return r;
1858
1877
  }
1859
- var Vt = /* @__PURE__ */ y("<span>");
1878
+ var Ut = /* @__PURE__ */ y("<span>");
1860
1879
  const te = (r) => {
1861
1880
  const [e, t] = N(), [a, n] = N();
1862
1881
  return Z(() => {
1863
1882
  const o = a();
1864
1883
  o && t(o.getRootNode());
1865
- }), l(k, {
1884
+ }), c(k, {
1866
1885
  get when() {
1867
1886
  return e();
1868
1887
  },
1869
1888
  get fallback() {
1870
1889
  return (() => {
1871
- var o = Vt();
1890
+ var o = Ut();
1872
1891
  return V(n, o), o;
1873
1892
  })();
1874
1893
  },
1875
- children: (o) => l(et, {
1894
+ children: (o) => c(et, {
1876
1895
  value: () => o(),
1877
1896
  get children() {
1878
1897
  return r.children(o());
@@ -1880,25 +1899,25 @@ const te = (r) => {
1880
1899
  })
1881
1900
  });
1882
1901
  };
1883
- var Ut = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6z">');
1884
- const qt = (r = {}) => (() => {
1885
- var e = Ut();
1886
- return D(e, r, !0, !0), e;
1902
+ var qt = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6z">');
1903
+ const jt = (r = {}) => (() => {
1904
+ var e = qt();
1905
+ return $(e, r, !0, !0), e;
1887
1906
  })();
1888
- var jt = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M7 2h10l-2 7h4l-2.925 4.225L7 4.15zm3 20v-8H7V9.85L1.375 4.225L2.8 2.8l18.4 18.4l-1.425 1.425L13.75 16.6z">');
1889
- const Ht = (r = {}) => (() => {
1890
- var e = jt();
1891
- return D(e, r, !0, !0), e;
1907
+ var Ht = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M7 2h10l-2 7h4l-2.925 4.225L7 4.15zm3 20v-8H7V9.85L1.375 4.225L2.8 2.8l18.4 18.4l-1.425 1.425L13.75 16.6z">');
1908
+ const Wt = (r = {}) => (() => {
1909
+ var e = Ht();
1910
+ return $(e, r, !0, !0), e;
1892
1911
  })();
1893
- var Wt = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M10 22v-8H7V2h10l-2 7h4z">');
1894
- const Gt = (r = {}) => (() => {
1895
- var e = Wt();
1896
- return D(e, r, !0, !0), e;
1912
+ var Gt = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M10 22v-8H7V2h10l-2 7h4z">');
1913
+ const Xt = (r = {}) => (() => {
1914
+ var e = Gt();
1915
+ return $(e, r, !0, !0), e;
1897
1916
  })();
1898
- var Xt = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M9 21H5q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h4v2H5v14h4zm2 2V1h2v22zm4-2v-2h2v2zm0-16V3h2v2zm4 16v-2h2q0 .825-.587 1.413T19 21m0-4v-2h2v2zm0-4v-2h2v2zm0-4V7h2v2zm0-4V3q.825 0 1.413.588T21 5z">');
1899
- const Qt = (r = {}) => (() => {
1900
- var e = Xt();
1901
- return D(e, r, !0, !0), e;
1917
+ var Qt = /* @__PURE__ */ y('<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=currentColor d="M9 21H5q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h4v2H5v14h4zm2 2V1h2v22zm4-2v-2h2v2zm0-16V3h2v2zm4 16v-2h2q0 .825-.587 1.413T19 21m0-4v-2h2v2zm0-4v-2h2v2zm0-4V7h2v2zm0-4V3q.825 0 1.413.588T21 5z">');
1918
+ const Kt = (r = {}) => (() => {
1919
+ var e = Qt();
1920
+ return $(e, r, !0, !0), e;
1902
1921
  })();
1903
1922
  function Be(r) {
1904
1923
  const e = {};
@@ -1913,53 +1932,53 @@ function Be(r) {
1913
1932
  e[o] = a;
1914
1933
  }), e;
1915
1934
  }
1916
- var Kt = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><g fill=#fff fill-rule=evenodd clip-rule=evenodd><path d="M6.322 2.988A1.67 1.67 0 0 1 7.5 2.5h5a1.667 1.667 0 0 1 1.667 1.667A.833.833 0 0 0 15 5h.833a2.5 2.5 0 0 1 2.5 2.5V15a2.5 2.5 0 0 1-2.5 2.5H4.167a2.5 2.5 0 0 1-2.5-2.5V7.5a2.5 2.5 0 0 1 2.5-2.5H5a.833.833 0 0 0 .833-.833c0-.442.176-.866.489-1.179M4.167 6.667a.833.833 0 0 0-.834.833V15a.833.833 0 0 0 .834.833h11.666a.834.834 0 0 0 .834-.833V7.5a.833.833 0 0 0-.834-.833H15a2.5 2.5 0 0 1-2.5-2.5h-5a2.5 2.5 0 0 1-2.5 2.5z"></path><path d="M10 9.167a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333m-3.333 1.666a3.333 3.333 0 1 1 6.666 0 3.333 3.333 0 0 1-6.666 0">');
1917
- const Yt = (r = {}) => (() => {
1918
- var e = Kt();
1919
- return D(e, r, !0, !0), e;
1935
+ var Yt = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><g fill=#fff fill-rule=evenodd clip-rule=evenodd><path d="M6.322 2.988A1.67 1.67 0 0 1 7.5 2.5h5a1.667 1.667 0 0 1 1.667 1.667A.833.833 0 0 0 15 5h.833a2.5 2.5 0 0 1 2.5 2.5V15a2.5 2.5 0 0 1-2.5 2.5H4.167a2.5 2.5 0 0 1-2.5-2.5V7.5a2.5 2.5 0 0 1 2.5-2.5H5a.833.833 0 0 0 .833-.833c0-.442.176-.866.489-1.179M4.167 6.667a.833.833 0 0 0-.834.833V15a.833.833 0 0 0 .834.833h11.666a.834.834 0 0 0 .834-.833V7.5a.833.833 0 0 0-.834-.833H15a2.5 2.5 0 0 1-2.5-2.5h-5a2.5 2.5 0 0 1-2.5 2.5z"></path><path d="M10 9.167a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333m-3.333 1.666a3.333 3.333 0 1 1 6.666 0 3.333 3.333 0 0 1-6.666 0">');
1936
+ const Jt = (r = {}) => (() => {
1937
+ var e = Yt();
1938
+ return $(e, r, !0, !0), e;
1920
1939
  })();
1921
- var Jt = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path stroke=#fff stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M4.167 10.833 7.5 14.167l8.333-8.334">');
1922
- const Zt = (r = {}) => (() => {
1923
- var e = Jt();
1924
- return D(e, r, !0, !0), e;
1940
+ var Zt = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path stroke=#fff stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M4.167 10.833 7.5 14.167l8.333-8.334">');
1941
+ const er = (r = {}) => (() => {
1942
+ var e = Zt();
1943
+ return $(e, r, !0, !0), e;
1925
1944
  })();
1926
- var er = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path fill=#fff fill-rule=evenodd d="M4.41 6.91a.833.833 0 0 1 1.18 0L10 11.323l4.41-4.411a.833.833 0 1 1 1.18 1.178l-5 5a.833.833 0 0 1-1.18 0l-5-5a.833.833 0 0 1 0-1.178"clip-rule=evenodd>');
1927
- const tr = (r = {}) => (() => {
1928
- var e = er();
1929
- return D(e, r, !0, !0), e;
1945
+ var tr = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path fill=#fff fill-rule=evenodd d="M4.41 6.91a.833.833 0 0 1 1.18 0L10 11.323l4.41-4.411a.833.833 0 1 1 1.18 1.178l-5 5a.833.833 0 0 1-1.18 0l-5-5a.833.833 0 0 1 0-1.178"clip-rule=evenodd>');
1946
+ const rr = (r = {}) => (() => {
1947
+ var e = tr();
1948
+ return $(e, r, !0, !0), e;
1930
1949
  })();
1931
- var rr = /* @__PURE__ */ y("<button>");
1932
- const ar = () => {
1950
+ var ar = /* @__PURE__ */ y("<button>");
1951
+ const nr = () => {
1933
1952
  const {
1934
1953
  cameraManagerSolidStore: r,
1935
1954
  cameraManager: e
1936
1955
  } = j(), {
1937
1956
  t
1938
- } = ee(), a = r((d) => d.cameras), n = r((d) => d.selectedCamera), o = r((d) => d.facingFilter), i = r((d) => d.isQueryingCameras), c = r((d) => d.isSwappingCamera), s = () => i() || c(), h = () => {
1957
+ } = ee(), a = r((d) => d.cameras), n = r((d) => d.selectedCamera), o = r((d) => d.facingFilter), i = r((d) => d.isQueryingCameras), s = r((d) => d.isSwappingCamera), l = () => i() || s(), f = () => {
1939
1958
  const d = o();
1940
- return d ? a().filter((m) => d.includes(m.facingMode)) : a();
1941
- }, f = () => [...h().map((d) => ({
1959
+ return d ? a().filter((h) => d.includes(h.facingMode)) : a();
1960
+ }, g = () => [...f().map((d) => ({
1942
1961
  value: d.deviceInfo.deviceId,
1943
1962
  label: d.name
1944
1963
  }))], p = () => tt({
1945
- items: [...f()]
1964
+ items: [...g()]
1946
1965
  }), S = () => {
1947
1966
  const d = n();
1948
1967
  if (!d)
1949
1968
  return;
1950
- const m = p().find(d.deviceInfo.deviceId);
1951
- if (m)
1952
- return [m.value];
1953
- }, g = async (d) => {
1954
- const m = a().find((C) => C.deviceInfo.deviceId === d);
1955
- if (!m) {
1969
+ const h = p().find(d.deviceInfo.deviceId);
1970
+ if (h)
1971
+ return [h.value];
1972
+ }, m = async (d) => {
1973
+ const h = a().find((C) => C.deviceInfo.deviceId === d);
1974
+ if (!h) {
1956
1975
  console.warn("No camera");
1957
1976
  return;
1958
1977
  }
1959
- await e.selectCamera(m);
1978
+ await e.selectCamera(h);
1960
1979
  };
1961
- return l(te, {
1962
- children: () => l(A.Root, {
1980
+ return c(te, {
1981
+ children: () => c(A.Root, {
1963
1982
  part: "camera-select-part",
1964
1983
  get collection() {
1965
1984
  return p();
@@ -1972,60 +1991,60 @@ const ar = () => {
1972
1991
  },
1973
1992
  lazyMount: !0,
1974
1993
  get disabled() {
1975
- return s();
1994
+ return l();
1976
1995
  },
1977
1996
  onValueChange: (d) => {
1978
- g(d.value[0]);
1997
+ m(d.value[0]);
1979
1998
  },
1980
1999
  get children() {
1981
- return [l(A.Label, {
2000
+ return [c(A.Label, {
1982
2001
  class: "sr-only",
1983
2002
  get children() {
1984
2003
  return t.selected_camera;
1985
2004
  }
1986
- }), l(A.Trigger, {
2005
+ }), c(A.Trigger, {
1987
2006
  asChild: (d) => (() => {
1988
- var m = rr();
1989
- return D(m, J(() => Be(d()), {
2007
+ var h = ar();
2008
+ return $(h, J(() => Be(d()), {
1990
2009
  class: `flex px-4 py-2 items-center gap-2 rounded-full
1991
2010
  bg-gray-550/90 backdrop-blur-xl whitespace-nowrap text-base
1992
2011
  color-white font-500 cursor-pointer appearance-none
1993
2012
  border-none disabled:opacity-50 disabled:cursor-not-allowed
1994
2013
  max-w-[100%] btn-focus`
1995
- }), !1, !0), w(m, l(Yt, {
2014
+ }), !1, !0), w(h, c(Jt, {
1996
2015
  class: "size-6 shrink-0",
1997
2016
  "aria-hidden": !0
1998
- }), null), w(m, l(A.ValueText, {
2017
+ }), null), w(h, c(A.ValueText, {
1999
2018
  class: "truncate",
2000
2019
  get placeholder() {
2001
2020
  return i() ? t.loading_cameras : t.select_a_camera;
2002
2021
  }
2003
- }), null), w(m, l(A.Indicator, {
2022
+ }), null), w(h, c(A.Indicator, {
2004
2023
  class: "shrink-0 data-[state=open]:scale-y-[-1]",
2005
2024
  get children() {
2006
- return l(tr, {
2025
+ return c(rr, {
2007
2026
  class: "size-6 shrink-0"
2008
2027
  });
2009
2028
  }
2010
- }), null), m;
2029
+ }), null), h;
2011
2030
  })()
2012
- }), l(A.Positioner, {
2031
+ }), c(A.Positioner, {
2013
2032
  class: "focus-visible:outline-none",
2014
2033
  get children() {
2015
- return l(A.Content, {
2034
+ return c(A.Content, {
2016
2035
  class: "focus-visible:outline-none outline-none",
2017
2036
  get children() {
2018
- return l(A.ItemGroup, {
2037
+ return c(A.ItemGroup, {
2019
2038
  class: `rounded-4 overflow-hidden text-base color-white
2020
2039
  focus-visible:outline-none flex flex-col gap-[1px]`,
2021
2040
  get children() {
2022
- return l(Qe, {
2041
+ return c(Qe, {
2023
2042
  get each() {
2024
2043
  return p().items;
2025
2044
  },
2026
- children: (d, m) => {
2027
- const C = m === 0, v = m === p().items.length - 1;
2028
- return l(A.Item, {
2045
+ children: (d, h) => {
2046
+ const C = h === 0, v = h === p().items.length - 1;
2047
+ return c(A.Item, {
2029
2048
  get item() {
2030
2049
  return d();
2031
2050
  },
@@ -2037,15 +2056,15 @@ const ar = () => {
2037
2056
  ${C ? "rounded-t-6" : ""}
2038
2057
  ${v ? "rounded-b-6" : ""}`,
2039
2058
  get children() {
2040
- return [l(A.ItemText, {
2059
+ return [c(A.ItemText, {
2041
2060
  class: "truncate",
2042
2061
  get children() {
2043
2062
  return d().label;
2044
2063
  }
2045
- }), l(A.ItemIndicator, {
2064
+ }), c(A.ItemIndicator, {
2046
2065
  class: "absolute right-4",
2047
2066
  get children() {
2048
- return l(Zt, {
2067
+ return c(er, {
2049
2068
  class: "size-6 shrink-0"
2050
2069
  });
2051
2070
  }
@@ -2064,8 +2083,8 @@ const ar = () => {
2064
2083
  })
2065
2084
  });
2066
2085
  };
2067
- var ae = /* @__PURE__ */ y("<span class=sr-only>"), nr = /* @__PURE__ */ y("<div class=justify-self-end>"), or = /* @__PURE__ */ y('<div class="z-2 relative gap-2 grid justify-between items-center grid-cols-[1fr_auto_1fr] py-4 color-white lerp:px-3@xs,8@lg"><div class="justify-self-start flex flex-nowrap gap-4 auto-cols-auto"></div><div class="justify-self-center min-w-0 w-full">'), ir = /* @__PURE__ */ y("<button>");
2068
- const sr = () => {
2086
+ var ae = /* @__PURE__ */ y("<span class=sr-only>"), or = /* @__PURE__ */ y("<div class=justify-self-end>"), ir = /* @__PURE__ */ y('<div class="z-2 relative gap-2 grid justify-between items-center grid-cols-[1fr_auto_1fr] py-4 color-white lerp:px-3@xs,8@lg"><div class="justify-self-start flex flex-nowrap gap-4 auto-cols-auto"></div><div class="justify-self-center min-w-0 w-full">'), sr = /* @__PURE__ */ y("<button>");
2087
+ const lr = () => {
2069
2088
  const {
2070
2089
  dismountCameraUi: r,
2071
2090
  cameraManagerSolidStore: e,
@@ -2075,21 +2094,21 @@ const sr = () => {
2075
2094
  showCloseButton: o
2076
2095
  } = j(), {
2077
2096
  t: i
2078
- } = ee(), c = e((m) => m.mirrorX), s = e((m) => m.selectedCamera), h = e((m) => m.cameras), f = e((m) => m.playbackState !== "idle"), p = e((m) => m.selectedCamera?.torchEnabled), S = () => s()?.torchSupported, g = () => {
2079
- const m = s();
2080
- m && m.toggleTorch();
2097
+ } = ee(), s = e((h) => h.mirrorX), l = e((h) => h.selectedCamera), f = e((h) => h.cameras), g = e((h) => h.playbackState !== "idle"), p = e((h) => h.selectedCamera?.torchEnabled), S = () => l()?.torchSupported, m = () => {
2098
+ const h = l();
2099
+ h && h.toggleTorch();
2081
2100
  }, d = () => {
2082
2101
  t.setCameraMirrorX(!e.getState().mirrorX);
2083
2102
  };
2084
- return l(te, {
2103
+ return c(te, {
2085
2104
  children: () => (() => {
2086
- var m = or(), C = m.firstChild, v = C.nextSibling;
2087
- return w(C, l(k, {
2105
+ var h = ir(), C = h.firstChild, v = C.nextSibling;
2106
+ return w(C, c(k, {
2088
2107
  get when() {
2089
- return a && f();
2108
+ return a && g();
2090
2109
  },
2091
2110
  get children() {
2092
- return l(ne, {
2111
+ return c(ne, {
2093
2112
  part: "mirror-camera-button-part",
2094
2113
  get tooltipLabel() {
2095
2114
  return i.mirror_camera;
@@ -2099,31 +2118,31 @@ const sr = () => {
2099
2118
  return [(() => {
2100
2119
  var b = ae();
2101
2120
  return w(b, () => i.mirror_camera), b;
2102
- })(), l(Qt, {
2121
+ })(), c(Kt, {
2103
2122
  class: `size-6 shrink-0 transition-transform duration-300
2104
2123
  ease-in-out`,
2105
2124
  get style() {
2106
2125
  return {
2107
- transform: c() ? "scaleX(-1)" : "scaleX(1)"
2126
+ transform: s() ? "scaleX(-1)" : "scaleX(1)"
2108
2127
  };
2109
2128
  }
2110
2129
  })];
2111
2130
  }
2112
2131
  });
2113
2132
  }
2114
- }), null), w(C, l(k, {
2133
+ }), null), w(C, c(k, {
2115
2134
  get when() {
2116
- return Se(() => !!(n && S()))() && f();
2135
+ return Se(() => !!(n && S()))() && g();
2117
2136
  },
2118
2137
  get children() {
2119
- return l(ne, {
2138
+ return c(ne, {
2120
2139
  part: "torch-button-part",
2121
- onClick: () => g(),
2140
+ onClick: () => m(),
2122
2141
  get tooltipLabel() {
2123
2142
  return i.torch;
2124
2143
  },
2125
2144
  get children() {
2126
- return [l(k, {
2145
+ return [c(k, {
2127
2146
  get when() {
2128
2147
  return !p();
2129
2148
  },
@@ -2131,16 +2150,16 @@ const sr = () => {
2131
2150
  return [(() => {
2132
2151
  var b = ae();
2133
2152
  return w(b, () => i.torch), b;
2134
- })(), l(Gt, {
2153
+ })(), c(Xt, {
2135
2154
  class: "size-6 shrink-0"
2136
2155
  })];
2137
2156
  }
2138
- }), l(k, {
2157
+ }), c(k, {
2139
2158
  get when() {
2140
2159
  return p();
2141
2160
  },
2142
2161
  get children() {
2143
- return l(Ht, {
2162
+ return c(Wt, {
2144
2163
  class: "size-6 shrink-0"
2145
2164
  });
2146
2165
  }
@@ -2148,18 +2167,18 @@ const sr = () => {
2148
2167
  }
2149
2168
  });
2150
2169
  }
2151
- }), null), w(v, l(k, {
2170
+ }), null), w(v, c(k, {
2152
2171
  get when() {
2153
- return h().length > 1;
2172
+ return f().length > 1;
2154
2173
  },
2155
2174
  get children() {
2156
- return l(ar, {});
2175
+ return c(nr, {});
2157
2176
  }
2158
- })), w(m, l(k, {
2177
+ })), w(h, c(k, {
2159
2178
  when: o,
2160
2179
  get children() {
2161
- var b = nr();
2162
- return w(b, l(ne, {
2180
+ var b = or();
2181
+ return w(b, c(ne, {
2163
2182
  part: "close-button-part",
2164
2183
  onClick: () => r(),
2165
2184
  get tooltipLabel() {
@@ -2169,29 +2188,29 @@ const sr = () => {
2169
2188
  return [(() => {
2170
2189
  var E = ae();
2171
2190
  return w(E, () => i.close), E;
2172
- })(), l(qt, {
2191
+ })(), c(jt, {
2173
2192
  class: "size-6 shrink-0"
2174
2193
  })];
2175
2194
  }
2176
2195
  })), b;
2177
2196
  }
2178
- }), null), m;
2197
+ }), null), h;
2179
2198
  })()
2180
2199
  });
2181
- }, ne = (r) => l(Q.Root, {
2200
+ }, ne = (r) => c(Q.Root, {
2182
2201
  get children() {
2183
- return [l(Q.Trigger, J(r, {
2202
+ return [c(Q.Trigger, J(r, {
2184
2203
  asChild: (e) => (() => {
2185
- var t = ir();
2186
- return D(t, J(() => Be(e()), {
2204
+ var t = sr();
2205
+ return $(t, J(() => Be(e()), {
2187
2206
  class: `btn-focus rounded-full bg-gray-550/70 backdrop-blur grid
2188
2207
  place-items-center size-12 appearance-none border-none
2189
2208
  cursor-pointer`
2190
2209
  }), !1, !0), w(t, () => r.children), t;
2191
2210
  })()
2192
- })), l(Q.Positioner, {
2211
+ })), c(Q.Positioner, {
2193
2212
  get children() {
2194
- return l(Q.Content, {
2213
+ return c(Q.Content, {
2195
2214
  class: `bg-gray-550/70 backdrop-blur color-white text-align-center p-2
2196
2215
  rounded-md text-sm drop-shadow-md`,
2197
2216
  get children() {
@@ -2201,22 +2220,22 @@ const sr = () => {
2201
2220
  }
2202
2221
  })];
2203
2222
  }
2204
- }), lr = (r, e, t) => Ke((a) => (w(e, r(), e.firstChild ? null : void 0), () => {
2223
+ }), cr = (r, e, t) => Ke((a) => (w(e, r(), e.firstChild ? null : void 0), () => {
2205
2224
  a(), e.textContent = "";
2206
2225
  }), t);
2207
- var cr = /* @__PURE__ */ y("<div>");
2208
- const ur = (r) => {
2226
+ var ur = /* @__PURE__ */ y("<div>");
2227
+ const dr = (r) => {
2209
2228
  const e = ke(), [t, a] = Ye(r, ["children", "disableShadowRoot", "getRef"]);
2210
2229
  return (() => {
2211
- var n = cr();
2230
+ var n = ur();
2212
2231
  return V((o) => {
2213
2232
  if (t.disableShadowRoot)
2214
2233
  return;
2215
2234
  const i = o.attachShadow({
2216
2235
  mode: "open"
2217
2236
  });
2218
- lr(() => Se(() => t.children), i, e);
2219
- }, n), D(n, a, !1, !0), w(n, l(k, {
2237
+ cr(() => Se(() => t.children), i, e);
2238
+ }, n), $(n, a, !1, !0), w(n, c(k, {
2220
2239
  get when() {
2221
2240
  return t.disableShadowRoot;
2222
2241
  },
@@ -2225,16 +2244,16 @@ const ur = (r) => {
2225
2244
  }
2226
2245
  })), n;
2227
2246
  })();
2228
- }, dr = ":where(html){line-height:1.15;-webkit-text-size-adjust:100%;text-size-adjust:100%}:where(h1){font-size:2em;margin-block-end:.67em;margin-block-start:.67em}:where(dl,ol,ul) :where(dl,ol,ul){margin-block-end:0;margin-block-start:0}:where(hr){box-sizing:content-box;color:inherit;height:0}:where(abbr[title]){text-decoration:underline;text-decoration:underline dotted}:where(b,strong){font-weight:bolder}:where(code,kbd,pre,samp){font-family:monospace,monospace;font-size:1em}:where(small){font-size:80%}:where(table){border-color:currentColor;text-indent:0}:where(button,input,select){margin:0}:where(button){text-transform:none}:where(button,input:is([type=button i],[type=reset i],[type=submit i])){-webkit-appearance:button}:where(progress){vertical-align:baseline}:where(select){text-transform:none}:where(textarea){margin:0}:where(input[type=search i]){-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focus-inner{border-style:none;padding:0}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focusring{outline:1px dotted ButtonText}:where(:-moz-ui-invalid){box-shadow:none}:where(dialog){background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:fit-content}:where(dialog:not([open])){display:none}:where(summary){display:list-item}", hr = ":host{font-family:var(--mb-ui-font);line-height:1.15;isolation:isolate;box-sizing:border-box}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}code,pre{font-family:var(--mb-monospace-font-stack)}svg path{pointer-events:none}img,picture,video,canvas,svg{display:block;max-width:100%}img{pointer-events:none;user-select:none}:where(input,button,textarea,select){font:inherit}:where(button,select){cursor:pointer;color:inherit;font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}", mr = ':host{--mb-system-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--mb-monospace-font-stack: Menlo, Consolas, "Ubuntu Mono", "Roboto Mono", "DejaVu Sans Mono", monospace;--mb-ui-font: var(--mb-system-font-stack);--mb-size: 1;--color-accent-25-rgb-value: 242 247 255;--color-accent-50-rgb-value: 231 240 255;--color-accent-100-rgb-value: 220 234 255;--color-accent-200-rgb-value: 198 221 255;--color-accent-300-rgb-value: 158 197 255;--color-accent-400-rgb-value: 111 169 255;--color-accent-500-rgb-value: 58 137 253;--color-accent-600-rgb-value: 0 98 242;--color-accent-700-rgb-value: 0 80 197;--color-accent-800-rgb-value: 0 64 157;--color-accent-900-rgb-value: 0 54 133;--color-error-25-rgb-value: 255 248 249;--color-error-50-rgb-value: 255 241 242;--color-error-100-rgb-value: 255 228 230;--color-error-200-rgb-value: 254 205 211;--color-error-300-rgb-value: 253 164 175;--color-error-400-rgb-value: 251 113 133;--color-error-500-rgb-value: 244 63 94;--color-error-600-rgb-value: 225 29 72;--color-error-700-rgb-value: 190 18 60;--color-error-800-rgb-value: 136 19 39;--color-error-900-rgb-value: 89 13 40;--color-success-25-rgb-value: 245 254 250;--color-success-50-rgb-value: 236 253 245;--color-success-100-rgb-value: 209 250 229;--color-success-200-rgb-value: 167 243 208;--color-success-300-rgb-value: 110 231 183;--color-success-400-rgb-value: 52 211 153;--color-success-500-rgb-value: 16 185 144;--color-success-600-rgb-value: 22 163 138;--color-success-700-rgb-value: 39 121 106;--color-success-800-rgb-value: 23 92 79;--color-success-900-rgb-value: 12 59 50;--color-warning-25-rgb-value: 255 253 243;--color-warning-50-rgb-value: 254 252 232;--color-warning-100-rgb-value: 254 249 195;--color-warning-200-rgb-value: 254 240 138;--color-warning-300-rgb-value: 253 229 99;--color-warning-400-rgb-value: 252 218 59;--color-warning-500-rgb-value: 250 204 21;--color-warning-600-rgb-value: 234 179 8;--color-warning-700-rgb-value: 190 142 48;--color-warning-800-rgb-value: 132 83 28;--color-warning-900-rgb-value: 80 29 10;--color-deep-blue-25-rgb-value: 249 252 255;--color-deep-blue-50-rgb-value: 243 249 254;--color-deep-blue-100-rgb-value: 231 242 251;--color-deep-blue-200-rgb-value: 201 218 241;--color-deep-blue-300-rgb-value: 162 185 216;--color-deep-blue-400-rgb-value: 93 128 182;--color-deep-blue-500-rgb-value: 60 100 161;--color-deep-blue-600-rgb-value: 28 68 129;--color-deep-blue-700-rgb-value: 24 53 97;--color-deep-blue-800-rgb-value: 20 38 65;--color-deep-blue-900-rgb-value: 6 23 49;--color-light-blue-25-rgb-value: 248 251 253;--color-light-blue-50-rgb-value: 240 247 251;--color-light-blue-100-rgb-value: 228 238 244;--color-light-blue-200-rgb-value: 215 229 238;--color-light-blue-300-rgb-value: 190 218 237;--color-light-blue-400-rgb-value: 159 202 232;--color-light-blue-500-rgb-value: 135 180 211;--color-light-blue-600-rgb-value: 104 157 193;--color-light-blue-700-rgb-value: 78 129 164;--color-light-blue-800-rgb-value: 67 109 138;--color-light-blue-900-rgb-value: 55 84 104;--color-gray-50-rgb-value: 249 250 251;--color-gray-100-rgb-value: 243 244 246;--color-gray-200-rgb-value: 229 231 235;--color-gray-300-rgb-value: 209 213 219;--color-gray-400-rgb-value: 156 163 175;--color-gray-500-rgb-value: 107 114 128;--color-gray-550-rgb-value: 102 102 102;--color-gray-600-rgb-value: 75 85 99;--color-gray-700-rgb-value: 55 65 81;--color-gray-800-rgb-value: 31 41 55;--color-blue-gray-50-rgb-value: 74 74 74;--color-blue-gray-100-rgb-value: 60 60 60;--color-blue-gray-200-rgb-value: 50 50 50;--color-blue-gray-300-rgb-value: 45 45 45;--color-blue-gray-400-rgb-value: 34 34 34;--color-blue-gray-500-rgb-value: 31 31 31;--color-blue-gray-600-rgb-value: 28 28 30;--color-blue-gray-700-rgb-value: 27 27 27;--color-blue-gray-800-rgb-value: 24 24 24;--color-blue-gray-900-rgb-value: 15 15 15;--color-black-rgb-value: 0 0 0;--color-white-rgb-value: 255 255 255;--color-primary: var(--color-accent-600-rgb-value);--color-error: var(--color-error-500-rgb-value);--color-success: var(--color-success-500-rgb-value);--color-warning: var(--color-warning-500-rgb-value);--color-deep-blue: var(--color-deep-blue-800-rgb-value);--color-light-blue: var(--color-light-blue-200-rgb-value);accent-color:var(--color-primary);caret-color:red}', gr = {
2247
+ }, hr = ":where(html){line-height:1.15;-webkit-text-size-adjust:100%;text-size-adjust:100%}:where(h1){font-size:2em;margin-block-end:.67em;margin-block-start:.67em}:where(dl,ol,ul) :where(dl,ol,ul){margin-block-end:0;margin-block-start:0}:where(hr){box-sizing:content-box;color:inherit;height:0}:where(abbr[title]){text-decoration:underline;text-decoration:underline dotted}:where(b,strong){font-weight:bolder}:where(code,kbd,pre,samp){font-family:monospace,monospace;font-size:1em}:where(small){font-size:80%}:where(table){border-color:currentColor;text-indent:0}:where(button,input,select){margin:0}:where(button){text-transform:none}:where(button,input:is([type=button i],[type=reset i],[type=submit i])){-webkit-appearance:button}:where(progress){vertical-align:baseline}:where(select){text-transform:none}:where(textarea){margin:0}:where(input[type=search i]){-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focus-inner{border-style:none;padding:0}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focusring{outline:1px dotted ButtonText}:where(:-moz-ui-invalid){box-shadow:none}:where(dialog){background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:fit-content}:where(dialog:not([open])){display:none}:where(summary){display:list-item}", mr = ":host{font-family:var(--mb-ui-font);line-height:1.15;isolation:isolate;box-sizing:border-box}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}code,pre{font-family:var(--mb-monospace-font-stack)}svg path{pointer-events:none}img,picture,video,canvas,svg{display:block;max-width:100%}img{pointer-events:none;user-select:none}:where(input,button,textarea,select){font:inherit}:where(button,select){cursor:pointer;color:inherit;font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}", gr = ':host{--mb-system-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--mb-monospace-font-stack: Menlo, Consolas, "Ubuntu Mono", "Roboto Mono", "DejaVu Sans Mono", monospace;--mb-ui-font: var(--mb-system-font-stack);--mb-size: 1;--color-accent-25-rgb-value: 242 247 255;--color-accent-50-rgb-value: 231 240 255;--color-accent-100-rgb-value: 220 234 255;--color-accent-200-rgb-value: 198 221 255;--color-accent-300-rgb-value: 158 197 255;--color-accent-400-rgb-value: 111 169 255;--color-accent-500-rgb-value: 58 137 253;--color-accent-600-rgb-value: 0 98 242;--color-accent-700-rgb-value: 0 80 197;--color-accent-800-rgb-value: 0 64 157;--color-accent-900-rgb-value: 0 54 133;--color-error-25-rgb-value: 255 248 249;--color-error-50-rgb-value: 255 241 242;--color-error-100-rgb-value: 255 228 230;--color-error-200-rgb-value: 254 205 211;--color-error-300-rgb-value: 253 164 175;--color-error-400-rgb-value: 251 113 133;--color-error-500-rgb-value: 244 63 94;--color-error-600-rgb-value: 225 29 72;--color-error-700-rgb-value: 190 18 60;--color-error-800-rgb-value: 136 19 39;--color-error-900-rgb-value: 89 13 40;--color-success-25-rgb-value: 245 254 250;--color-success-50-rgb-value: 236 253 245;--color-success-100-rgb-value: 209 250 229;--color-success-200-rgb-value: 167 243 208;--color-success-300-rgb-value: 110 231 183;--color-success-400-rgb-value: 52 211 153;--color-success-500-rgb-value: 16 185 144;--color-success-600-rgb-value: 22 163 138;--color-success-700-rgb-value: 39 121 106;--color-success-800-rgb-value: 23 92 79;--color-success-900-rgb-value: 12 59 50;--color-warning-25-rgb-value: 255 253 243;--color-warning-50-rgb-value: 254 252 232;--color-warning-100-rgb-value: 254 249 195;--color-warning-200-rgb-value: 254 240 138;--color-warning-300-rgb-value: 253 229 99;--color-warning-400-rgb-value: 252 218 59;--color-warning-500-rgb-value: 250 204 21;--color-warning-600-rgb-value: 234 179 8;--color-warning-700-rgb-value: 190 142 48;--color-warning-800-rgb-value: 132 83 28;--color-warning-900-rgb-value: 80 29 10;--color-deep-blue-25-rgb-value: 249 252 255;--color-deep-blue-50-rgb-value: 243 249 254;--color-deep-blue-100-rgb-value: 231 242 251;--color-deep-blue-200-rgb-value: 201 218 241;--color-deep-blue-300-rgb-value: 162 185 216;--color-deep-blue-400-rgb-value: 93 128 182;--color-deep-blue-500-rgb-value: 60 100 161;--color-deep-blue-600-rgb-value: 28 68 129;--color-deep-blue-700-rgb-value: 24 53 97;--color-deep-blue-800-rgb-value: 20 38 65;--color-deep-blue-900-rgb-value: 6 23 49;--color-light-blue-25-rgb-value: 248 251 253;--color-light-blue-50-rgb-value: 240 247 251;--color-light-blue-100-rgb-value: 228 238 244;--color-light-blue-200-rgb-value: 215 229 238;--color-light-blue-300-rgb-value: 190 218 237;--color-light-blue-400-rgb-value: 159 202 232;--color-light-blue-500-rgb-value: 135 180 211;--color-light-blue-600-rgb-value: 104 157 193;--color-light-blue-700-rgb-value: 78 129 164;--color-light-blue-800-rgb-value: 67 109 138;--color-light-blue-900-rgb-value: 55 84 104;--color-gray-50-rgb-value: 249 250 251;--color-gray-100-rgb-value: 243 244 246;--color-gray-200-rgb-value: 229 231 235;--color-gray-300-rgb-value: 209 213 219;--color-gray-400-rgb-value: 156 163 175;--color-gray-500-rgb-value: 107 114 128;--color-gray-550-rgb-value: 102 102 102;--color-gray-600-rgb-value: 75 85 99;--color-gray-700-rgb-value: 55 65 81;--color-gray-800-rgb-value: 31 41 55;--color-blue-gray-50-rgb-value: 74 74 74;--color-blue-gray-100-rgb-value: 60 60 60;--color-blue-gray-200-rgb-value: 50 50 50;--color-blue-gray-300-rgb-value: 45 45 45;--color-blue-gray-400-rgb-value: 34 34 34;--color-blue-gray-500-rgb-value: 31 31 31;--color-blue-gray-600-rgb-value: 28 28 30;--color-blue-gray-700-rgb-value: 27 27 27;--color-blue-gray-800-rgb-value: 24 24 24;--color-blue-gray-900-rgb-value: 15 15 15;--color-black-rgb-value: 0 0 0;--color-white-rgb-value: 255 255 255;--color-primary: var(--color-accent-600-rgb-value);--color-error: var(--color-error-500-rgb-value);--color-success: var(--color-success-500-rgb-value);--color-warning: var(--color-warning-500-rgb-value);--color-deep-blue: var(--color-deep-blue-800-rgb-value);--color-light-blue: var(--color-light-blue-200-rgb-value);accent-color:var(--color-primary);caret-color:red}', fr = {
2229
2248
  feedbackLayer: null,
2230
2249
  overlayLayer: null,
2231
2250
  owner: null
2232
2251
  }, B = de()(
2233
2252
  // this is important! Otherwise, solid-zustand will start mutating the initial state
2234
- ue(() => structuredClone(gr))
2253
+ ue(() => structuredClone(fr))
2235
2254
  ), ce = Te(B), we = () => {
2236
2255
  };
2237
- function fr(r, e) {
2256
+ function br(r, e) {
2238
2257
  if (He)
2239
2258
  return { observe: we, unobserve: we };
2240
2259
  const t = new ResizeObserver(r);
@@ -2243,28 +2262,28 @@ function fr(r, e) {
2243
2262
  unobserve: t.unobserve.bind(t)
2244
2263
  };
2245
2264
  }
2246
- var br = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 14 14"><path fill=#000 fill-rule=evenodd d="M13.707 1.707A1 1 0 0 0 12.293.293L7 5.586 1.707.293A1 1 0 0 0 .293 1.707L5.586 7 .293 12.293a1 1 0 1 0 1.414 1.414L7 8.414l5.293 5.293a1 1 0 0 0 1.414-1.414L8.414 7z"clip-rule=evenodd>');
2247
- const pr = (r = {}) => (() => {
2248
- var e = br();
2249
- return D(e, r, !0, !0), e;
2250
- })(), vr = "_dialogPositioner_15i6c_1", wr = "_dialogBackdrop_15i6c_10", Sr = "_dialogContent_15i6c_14", yr = "_large_15i6c_18", Cr = "_compact_15i6c_21", Er = "_dialogTitle_15i6c_45", kr = "_contentOut_15i6c_49", Tr = "_closeButton_15i6c_53", _r = "_closeButtonInner_15i6c_59", Mr = "_primaryActionButton_15i6c_63", xr = "_secondaryActionButton_15i6c_67", Rr = "_actions_15i6c_71", Ar = "_alertTitle_15i6c_79", $r = "_alertText_15i6c_83", T = {
2251
- dialogPositioner: vr,
2252
- dialogBackdrop: wr,
2253
- dialogContent: Sr,
2254
- large: yr,
2255
- compact: Cr,
2256
- dialogTitle: Er,
2257
- contentOut: kr,
2258
- closeButton: Tr,
2259
- closeButtonInner: _r,
2260
- primaryActionButton: Mr,
2261
- secondaryActionButton: xr,
2262
- actions: Rr,
2263
- alertTitle: Ar,
2265
+ var pr = /* @__PURE__ */ y('<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 14 14"><path fill=#000 fill-rule=evenodd d="M13.707 1.707A1 1 0 0 0 12.293.293L7 5.586 1.707.293A1 1 0 0 0 .293 1.707L5.586 7 .293 12.293a1 1 0 1 0 1.414 1.414L7 8.414l5.293 5.293a1 1 0 0 0 1.414-1.414L8.414 7z"clip-rule=evenodd>');
2266
+ const vr = (r = {}) => (() => {
2267
+ var e = pr();
2268
+ return $(e, r, !0, !0), e;
2269
+ })(), wr = "_dialogPositioner_15i6c_1", Sr = "_dialogBackdrop_15i6c_10", yr = "_dialogContent_15i6c_14", Cr = "_large_15i6c_18", Er = "_compact_15i6c_21", kr = "_dialogTitle_15i6c_45", Tr = "_contentOut_15i6c_49", _r = "_closeButton_15i6c_53", Mr = "_closeButtonInner_15i6c_59", xr = "_primaryActionButton_15i6c_63", Rr = "_secondaryActionButton_15i6c_67", Ar = "_actions_15i6c_71", Ir = "_alertTitle_15i6c_79", $r = "_alertText_15i6c_83", T = {
2270
+ dialogPositioner: wr,
2271
+ dialogBackdrop: Sr,
2272
+ dialogContent: yr,
2273
+ large: Cr,
2274
+ compact: Er,
2275
+ dialogTitle: kr,
2276
+ contentOut: Tr,
2277
+ closeButton: _r,
2278
+ closeButtonInner: Mr,
2279
+ primaryActionButton: xr,
2280
+ secondaryActionButton: Rr,
2281
+ actions: Ar,
2282
+ alertTitle: Ir,
2264
2283
  alertText: $r
2265
2284
  };
2266
- var Dr = /* @__PURE__ */ y("<div>"), Ir = /* @__PURE__ */ y("<p>"), Fr = /* @__PURE__ */ y("<span>"), Lr = /* @__PURE__ */ y("<div><button></button><button>");
2267
- const zr = (r) => {
2285
+ var Dr = /* @__PURE__ */ y("<div>"), Fr = /* @__PURE__ */ y("<p>"), Lr = /* @__PURE__ */ y("<span>"), zr = /* @__PURE__ */ y("<div><button></button><button>");
2286
+ const Nr = (r) => {
2268
2287
  const e = () => {
2269
2288
  switch (r.modalStyle) {
2270
2289
  case "compact":
@@ -2276,8 +2295,8 @@ const zr = (r) => {
2276
2295
  return;
2277
2296
  }
2278
2297
  };
2279
- return l(te, {
2280
- children: (t) => l($.Root, J({
2298
+ return c(te, {
2299
+ children: (t) => c(I.Root, J({
2281
2300
  onFocusOutside: (a) => a.preventDefault(),
2282
2301
  onInteractOutside: (a) => a.preventDefault(),
2283
2302
  initialFocusEl: () => t.querySelector('[role="dialog"]'),
@@ -2286,36 +2305,36 @@ const zr = (r) => {
2286
2305
  lazyMount: !0
2287
2306
  }, r, {
2288
2307
  get children() {
2289
- return l(k, {
2308
+ return c(k, {
2290
2309
  get when() {
2291
2310
  return r.open;
2292
2311
  },
2293
2312
  get children() {
2294
- return l(ye, {
2313
+ return c(ye, {
2295
2314
  get mount() {
2296
2315
  return r.mountTarget;
2297
2316
  },
2298
2317
  get children() {
2299
- return l($.Positioner, {
2318
+ return c(I.Positioner, {
2300
2319
  get class() {
2301
2320
  return T.dialogPositioner;
2302
2321
  },
2303
2322
  get children() {
2304
- return [l($.Backdrop, {
2323
+ return [c(I.Backdrop, {
2305
2324
  get class() {
2306
2325
  return T.dialogBackdrop;
2307
2326
  }
2308
- }), l($.Content, {
2327
+ }), c(I.Content, {
2309
2328
  get class() {
2310
2329
  return `${T.dialogContent} ${e()}`;
2311
2330
  },
2312
2331
  get children() {
2313
- return [l(k, {
2332
+ return [c(k, {
2314
2333
  get when() {
2315
2334
  return r.showCloseButton;
2316
2335
  },
2317
2336
  get children() {
2318
- return l($.CloseTrigger, {
2337
+ return c(I.CloseTrigger, {
2319
2338
  "aria-label": "Close",
2320
2339
  get class() {
2321
2340
  return T.closeButton;
@@ -2324,7 +2343,7 @@ const zr = (r) => {
2324
2343
  return r.onCloseClicked;
2325
2344
  },
2326
2345
  get children() {
2327
- return l(pr, {
2346
+ return c(vr, {
2328
2347
  get class() {
2329
2348
  return T.closeButtonInner;
2330
2349
  }
@@ -2332,18 +2351,18 @@ const zr = (r) => {
2332
2351
  }
2333
2352
  });
2334
2353
  }
2335
- }), l(k, {
2354
+ }), c(k, {
2336
2355
  get when() {
2337
2356
  return r.headerImage;
2338
2357
  },
2339
2358
  get children() {
2340
2359
  return r.headerImage;
2341
2360
  }
2342
- }), l(k, {
2361
+ }), c(k, {
2343
2362
  get when() {
2344
2363
  return r.header;
2345
2364
  },
2346
- children: (a) => l($.Title, {
2365
+ children: (a) => c(I.Title, {
2347
2366
  get class() {
2348
2367
  return T.dialogTitle;
2349
2368
  },
@@ -2351,14 +2370,14 @@ const zr = (r) => {
2351
2370
  return a();
2352
2371
  }
2353
2372
  })
2354
- }), l($.Description, {
2373
+ }), c(I.Description, {
2355
2374
  get class() {
2356
2375
  return T.contentOut;
2357
2376
  },
2358
2377
  get children() {
2359
2378
  return r.children;
2360
2379
  }
2361
- }), l(k, {
2380
+ }), c(k, {
2362
2381
  get when() {
2363
2382
  return r.actions;
2364
2383
  },
@@ -2378,7 +2397,7 @@ const zr = (r) => {
2378
2397
  }
2379
2398
  }))
2380
2399
  });
2381
- }, Nr = ({
2400
+ }, Pr = ({
2382
2401
  mountTarget: r,
2383
2402
  header: e,
2384
2403
  text: t,
@@ -2386,61 +2405,61 @@ const zr = (r) => {
2386
2405
  onPrimaryClick: n,
2387
2406
  onSecondaryClick: o,
2388
2407
  primaryButtonText: i = "Retry",
2389
- secondaryButtonText: c = "Cancel"
2390
- }) => l(zr, {
2408
+ secondaryButtonText: s = "Cancel"
2409
+ }) => c(Nr, {
2391
2410
  mountTarget: r,
2392
2411
  get header() {
2393
2412
  return (() => {
2394
- var s = Fr();
2395
- return w(s, e), K(() => H(s, T.alertTitle)), s;
2413
+ var l = Lr();
2414
+ return w(l, e), K(() => H(l, T.alertTitle)), l;
2396
2415
  })();
2397
2416
  },
2398
2417
  open: a,
2399
2418
  get actions() {
2400
2419
  return (() => {
2401
- var s = Lr(), h = s.firstChild, f = h.nextSibling;
2402
- return h.$$click = () => o(), w(h, c), f.$$click = () => n(), w(f, i), K((p) => {
2403
- var S = T.actions, g = T.secondaryActionButton, d = T.primaryActionButton;
2404
- return S !== p.e && H(s, p.e = S), g !== p.t && H(h, p.t = g), d !== p.a && H(f, p.a = d), p;
2420
+ var l = zr(), f = l.firstChild, g = f.nextSibling;
2421
+ return f.$$click = () => o(), w(f, s), g.$$click = () => n(), w(g, i), K((p) => {
2422
+ var S = T.actions, m = T.secondaryActionButton, d = T.primaryActionButton;
2423
+ return S !== p.e && H(l, p.e = S), m !== p.t && H(f, p.t = m), d !== p.a && H(g, p.a = d), p;
2405
2424
  }, {
2406
2425
  e: void 0,
2407
2426
  t: void 0,
2408
2427
  a: void 0
2409
- }), s;
2428
+ }), l;
2410
2429
  })();
2411
2430
  },
2412
2431
  modalStyle: "compact",
2413
2432
  get children() {
2414
- var s = Ir();
2415
- return w(s, t), K(() => H(s, T.alertText)), s;
2433
+ var l = Fr();
2434
+ return w(l, t), K(() => H(l, T.alertText)), l;
2416
2435
  }
2417
2436
  });
2418
2437
  We(["click"]);
2419
- const Pr = () => {
2438
+ const Or = () => {
2420
2439
  const {
2421
2440
  t: r
2422
2441
  } = ee(), {
2423
2442
  cameraManagerSolidStore: e,
2424
2443
  cameraManager: t,
2425
2444
  dismountCameraUi: a
2426
- } = j(), n = e((h) => h.errorState), o = ce((h) => h.overlayLayer), i = () => {
2427
- const h = n();
2428
- return h instanceof U && h.code === "PERMISSION_DENIED";
2429
- }, c = () => i() ? r.camera_error_title : n() ? n().name : "", s = () => i() ? r.camera_error_details : n() ? n().name : "";
2430
- return l(k, {
2445
+ } = j(), n = e((f) => f.errorState), o = ce((f) => f.overlayLayer), i = () => {
2446
+ const f = n();
2447
+ return f instanceof U && f.code === "PERMISSION_DENIED";
2448
+ }, s = () => i() ? r.camera_error_title : n() ? n().name : "", l = () => i() ? r.camera_error_details : n() ? n().name : "";
2449
+ return c(k, {
2431
2450
  get when() {
2432
2451
  return i();
2433
2452
  },
2434
2453
  get children() {
2435
- return l(Nr, {
2454
+ return c(Pr, {
2436
2455
  get mountTarget() {
2437
2456
  return o();
2438
2457
  },
2439
2458
  get header() {
2440
- return c();
2459
+ return s();
2441
2460
  },
2442
2461
  get text() {
2443
- return s();
2462
+ return l();
2444
2463
  },
2445
2464
  open: !0,
2446
2465
  onPrimaryClick: () => void t.startCameraStream(),
@@ -2455,7 +2474,7 @@ const Pr = () => {
2455
2474
  }
2456
2475
  });
2457
2476
  };
2458
- function Or(r, e) {
2477
+ function Br(r, e) {
2459
2478
  let t;
2460
2479
  return function(...a) {
2461
2480
  const n = this;
@@ -2464,7 +2483,7 @@ function Or(r, e) {
2464
2483
  }, e);
2465
2484
  };
2466
2485
  }
2467
- const Br = (r, e, t, a) => {
2486
+ const Vr = (r, e, t, a) => {
2468
2487
  const n = Math.max(r / t, e / a);
2469
2488
  let o = 0;
2470
2489
  if (r / t > e / a) {
@@ -2476,33 +2495,33 @@ const Br = (r, e, t, a) => {
2476
2495
  }
2477
2496
  return o < 0.1 ? "cover" : "contain";
2478
2497
  };
2479
- function Vr(r, e, t, a) {
2498
+ function Ur(r, e, t, a) {
2480
2499
  const n = r / t, o = e / a, i = Math.max(n, o);
2481
2500
  if (n >= o) {
2482
- const c = Math.round(e / i);
2483
- return { x: 0, y: Math.round((a - c) / 2), width: t, height: c };
2501
+ const s = Math.round(e / i);
2502
+ return { x: 0, y: Math.round((a - s) / 2), width: t, height: s };
2484
2503
  } else {
2485
- const c = Math.round(r / i);
2486
- return { x: Math.round((t - c) / 2), y: 0, width: c, height: a };
2504
+ const s = Math.round(r / i);
2505
+ return { x: Math.round((t - s) / 2), y: 0, width: s, height: a };
2487
2506
  }
2488
2507
  }
2489
- var oe = /* @__PURE__ */ y("<style>"), Ur = /* @__PURE__ */ y("<style id=camera-manager-style>"), qr = /* @__PURE__ */ y('<div class="bg-dark-500 color-white size-full relative min-h-[300px]"part=capture-screen-part><video part=video-element-part class="block absolute top-0 left-0 size-full"></video><div class="absolute top-0 left-0 w-full h-full z-1"id=feedback-layer></div><div class="absolute top-0 left-0 w-full h-full has-[[data-scope]]:z-2"id=overlay-layer>');
2508
+ var oe = /* @__PURE__ */ y("<style>"), qr = /* @__PURE__ */ y("<style id=camera-manager-style>"), jr = /* @__PURE__ */ y('<div class="bg-dark-500 color-white size-full relative min-h-[300px]"part=capture-screen-part><video part=video-element-part class="block absolute top-0 left-0 size-full"></video><div class="absolute top-0 left-0 w-full h-full z-1"id=feedback-layer></div><div class="absolute top-0 left-0 w-full h-full has-[[data-scope]]:z-2"id=overlay-layer>');
2490
2509
  const Ve = "capture-screen-host", Ue = () => {
2491
2510
  const {
2492
2511
  cameraManager: r,
2493
2512
  mountTarget: e,
2494
2513
  showCameraErrorModal: t
2495
- } = j(), [a, n] = N(), [o, i] = N(), [c, s] = N(), h = () => e.parentNode === document.body, [f, p] = N("contain");
2514
+ } = j(), [a, n] = N(), [o, i] = N(), [s, l] = N(), f = () => e.parentNode === document.body, [g, p] = N("contain");
2496
2515
  function S() {
2497
- const g = a();
2498
- if (!g)
2516
+ const m = a();
2517
+ if (!m)
2499
2518
  return;
2500
- const d = g.clientWidth, m = g.clientHeight, C = g.videoWidth, v = g.videoHeight;
2519
+ const d = m.clientWidth, h = m.clientHeight, C = m.videoWidth, v = m.videoHeight;
2501
2520
  if (C === 0 || v === 0)
2502
2521
  return;
2503
- const b = Br(d, m, C, v);
2522
+ const b = Vr(d, h, C, v);
2504
2523
  if (p(b), b === "cover") {
2505
- const E = Vr(d, m, C, v);
2524
+ const E = Ur(d, h, C, v);
2506
2525
  r.setExtractionArea(E);
2507
2526
  } else
2508
2527
  r.setExtractionArea({
@@ -2513,66 +2532,66 @@ const Ve = "capture-screen-host", Ue = () => {
2513
2532
  });
2514
2533
  }
2515
2534
  return Z(() => {
2516
- const g = a();
2517
- if (!g)
2535
+ const m = a();
2536
+ if (!m)
2518
2537
  return;
2519
- const d = Or(S, 100), {
2520
- observe: m,
2538
+ const d = Br(S, 100), {
2539
+ observe: h,
2521
2540
  unobserve: C
2522
- } = fr(d);
2523
- m(g), g.addEventListener("resize", S), g.addEventListener("loadedmetadata", S), he(() => {
2524
- C(g), g.removeEventListener("resize", S), g.removeEventListener("loadedmetadata", S);
2541
+ } = br(d);
2542
+ h(m), m.addEventListener("resize", S), m.addEventListener("loadedmetadata", S), he(() => {
2543
+ C(m), m.removeEventListener("resize", S), m.removeEventListener("loadedmetadata", S);
2525
2544
  });
2526
2545
  }), Z(() => {
2527
- const g = ke();
2528
- g && ce.setState({
2529
- owner: g
2546
+ const m = ke();
2547
+ m && ce.setState({
2548
+ owner: m
2530
2549
  });
2531
2550
  }), Je(() => {
2532
- const g = a(), d = o(), m = c();
2533
- !g || !d || !m || (ce.setState({
2551
+ const m = a(), d = o(), h = s();
2552
+ !m || !d || !h || (ce.setState({
2534
2553
  feedbackLayer: d,
2535
- overlayLayer: m
2536
- }), r.initVideoElement(g));
2537
- }), l(ur, {
2554
+ overlayLayer: h
2555
+ }), r.initVideoElement(m));
2556
+ }), c(dr, {
2538
2557
  get id() {
2539
- return h() ? void 0 : Ve;
2558
+ return f() ? void 0 : Ve;
2540
2559
  },
2541
2560
  get disableShadowRoot() {
2542
- return h();
2561
+ return f();
2543
2562
  },
2544
2563
  get style() {
2545
- return h() ? {
2564
+ return f() ? {
2546
2565
  height: "100%"
2547
2566
  } : void 0;
2548
2567
  },
2549
2568
  get children() {
2550
2569
  return [(() => {
2551
- var g = oe();
2552
- return w(g, mr), g;
2570
+ var m = oe();
2571
+ return w(m, gr), m;
2553
2572
  })(), (() => {
2554
- var g = oe();
2555
- return w(g, dr), g;
2573
+ var m = oe();
2574
+ return w(m, hr), m;
2556
2575
  })(), (() => {
2557
- var g = oe();
2558
- return w(g, hr), g;
2576
+ var m = oe();
2577
+ return w(m, mr), m;
2559
2578
  })(), (() => {
2560
- var g = Ur();
2579
+ var m = qr();
2561
2580
  return V((d) => {
2562
2581
  window.__mbCameraManagerCssCode && (d.innerHTML = window.__mbCameraManagerCssCode);
2563
- }, g), g;
2582
+ }, m), m;
2564
2583
  })(), (() => {
2565
- var g = qr(), d = g.firstChild, m = d.nextSibling, C = m.nextSibling;
2566
- return w(g, l(sr, {}), d), V(n, d), V(i, m), V(s, C), w(g, l(k, {
2584
+ var m = jr(), d = m.firstChild, h = d.nextSibling, C = h.nextSibling;
2585
+ return w(m, c(lr, {}), d), V(n, d), V(i, h), V(l, C), w(m, c(k, {
2567
2586
  when: t,
2568
2587
  get children() {
2569
- return l(Pr, {});
2588
+ return c(Or, {});
2570
2589
  }
2571
- }), null), K((v) => (v = f()) != null ? d.style.setProperty("object-fit", v) : d.style.removeProperty("object-fit")), g;
2590
+ }), null), K((v) => (v = g()) != null ? d.style.setProperty("object-fit", v) : d.style.removeProperty("object-fit")), m;
2572
2591
  })()];
2573
2592
  }
2574
2593
  });
2575
- }, jr = () => {
2594
+ }, Hr = () => {
2576
2595
  const {
2577
2596
  t: r
2578
2597
  } = ee(), [e, t] = N(!0), {
@@ -2580,15 +2599,15 @@ const Ve = "capture-screen-host", Ue = () => {
2580
2599
  } = j();
2581
2600
  return a(() => {
2582
2601
  t(!1);
2583
- }), l(ye, {
2602
+ }), c(ye, {
2584
2603
  useShadow: !0,
2585
2604
  get mount() {
2586
2605
  return document.getElementById(qe);
2587
2606
  },
2588
2607
  ref: (n) => (n.id = Ve, n.style.zIndex = "1000", n.style.position = "fixed", n.id = "mb-camera-host", n),
2589
2608
  get children() {
2590
- return l(te, {
2591
- children: (n) => l($.Root, {
2609
+ return c(te, {
2610
+ children: (n) => c(I.Root, {
2592
2611
  get open() {
2593
2612
  return e();
2594
2613
  },
@@ -2596,20 +2615,20 @@ const Ve = "capture-screen-host", Ue = () => {
2596
2615
  unmountOnExit: !0,
2597
2616
  initialFocusEl: () => n.querySelector('[role="dialog"]'),
2598
2617
  get children() {
2599
- return l($.Positioner, {
2618
+ return c(I.Positioner, {
2600
2619
  get children() {
2601
- return l($.Content, {
2620
+ return c(I.Content, {
2602
2621
  "aria-labelledby": "dialog-title",
2603
2622
  class: `h-vh supports-[(height:100dvh)]:h-dvh top-0 left-0 w-full
2604
2623
  fixed`,
2605
2624
  get children() {
2606
- return [l($.Title, {
2625
+ return [c(I.Title, {
2607
2626
  class: "sr-only",
2608
2627
  id: "dialog-title",
2609
2628
  get children() {
2610
2629
  return r.scan_document;
2611
2630
  }
2612
- }), l(Ue, {})];
2631
+ }), c(Ue, {})];
2613
2632
  }
2614
2633
  });
2615
2634
  }
@@ -2619,71 +2638,71 @@ const Ve = "capture-screen-host", Ue = () => {
2619
2638
  });
2620
2639
  }
2621
2640
  });
2622
- }, Hr = () => {
2641
+ }, Wr = () => {
2623
2642
  const {
2624
2643
  mountTarget: r
2625
2644
  } = j();
2626
- return l(Ge, {
2645
+ return c(Ge, {
2627
2646
  get component() {
2628
- return r.parentNode === document.body ? jr : Ue;
2647
+ return r.parentNode === document.body ? Hr : Ue;
2629
2648
  }
2630
2649
  });
2631
2650
  }, qe = "camera-manager-mount-point";
2632
- function na(r, e, {
2651
+ function oa(r, e, {
2633
2652
  localizationStrings: t,
2634
2653
  showMirrorCameraButton: a = !1,
2635
2654
  showTorchButton: n = !0,
2636
2655
  showCloseButton: o = !0,
2637
2656
  showCameraErrorModal: i = !0
2638
2657
  } = {}) {
2639
- let c;
2640
- const s = /* @__PURE__ */ new Set();
2641
- let h;
2642
- const f = (v) => {
2643
- h = v;
2658
+ let s;
2659
+ const l = /* @__PURE__ */ new Set();
2660
+ let f;
2661
+ const g = (v) => {
2662
+ f = v;
2644
2663
  }, p = () => {
2645
2664
  r.reset();
2646
2665
  };
2647
2666
  let S;
2648
- const g = () => {
2667
+ const m = () => {
2649
2668
  try {
2650
2669
  console.debug("🧱 Dismounting camera manager UI");
2651
- for (const v of s)
2670
+ for (const v of l)
2652
2671
  v();
2653
- s.clear(), p(), requestAnimationFrame(() => {
2672
+ l.clear(), p(), requestAnimationFrame(() => {
2654
2673
  requestAnimationFrame(() => {
2655
- S && S(), c.remove(), p();
2674
+ S && S(), s.remove(), p();
2656
2675
  });
2657
2676
  });
2658
2677
  } catch (v) {
2659
2678
  console.warn("Error while dismounting camera manager UI", v);
2660
2679
  }
2661
2680
  }, d = document.createElement("div");
2662
- d.id = qe, c = d, e ? e.appendChild(d) : document.body.appendChild(d);
2663
- const m = (v) => (s.add(v), () => {
2664
- s.delete(v);
2681
+ d.id = qe, s = d, e ? e.appendChild(d) : document.body.appendChild(d);
2682
+ const h = (v) => (l.add(v), () => {
2683
+ l.delete(v);
2665
2684
  });
2666
- S = Xe(() => l(Bt, {
2685
+ S = Xe(() => c(Vt, {
2667
2686
  userStrings: t,
2668
- setLocalizationRef: f,
2687
+ setLocalizationRef: g,
2669
2688
  get children() {
2670
- return l(Pt, {
2671
- addOnDismountCallback: m,
2672
- dismountCameraUi: g,
2689
+ return c(Ot, {
2690
+ addOnDismountCallback: h,
2691
+ dismountCameraUi: m,
2673
2692
  cameraManager: r,
2674
2693
  showMirrorCameraButton: a,
2675
2694
  showTorchButton: n,
2676
2695
  showCloseButton: o,
2677
2696
  showCameraErrorModal: i,
2678
- mountTarget: c,
2697
+ mountTarget: s,
2679
2698
  get children() {
2680
- return l(Hr, {});
2699
+ return c(Wr, {});
2681
2700
  }
2682
2701
  });
2683
2702
  }
2684
- }), c);
2703
+ }), s);
2685
2704
  const C = {
2686
- updateLocalization: h,
2705
+ updateLocalization: f,
2687
2706
  /**
2688
2707
  * Adds a callback to be called when the component is unmounted.
2689
2708
  * Returns a cleanup function that removes the callback when called.
@@ -2691,7 +2710,7 @@ function na(r, e, {
2691
2710
  * @param fn - The callback function to be called when the component is unmounted
2692
2711
  * @returns A cleanup function that removes the callback when called
2693
2712
  */
2694
- addOnDismountCallback: m,
2713
+ addOnDismountCallback: h,
2695
2714
  cameraManager: r,
2696
2715
  // we know these are defined because `createCameraManagerUi` resolves when they are defined
2697
2716
  // TODO: maybe don't use getters but make sure they are defined
@@ -2704,7 +2723,7 @@ function na(r, e, {
2704
2723
  get owner() {
2705
2724
  return B.getState().owner;
2706
2725
  },
2707
- dismount: g
2726
+ dismount: m
2708
2727
  };
2709
2728
  return new Promise((v) => {
2710
2729
  let b = !1, E = !1, x = !1, F = () => {
@@ -2735,21 +2754,21 @@ globalThis.__CAMERA_MANAGER__ !== je && console.warn(
2735
2754
  "Detected multiple instances of @microblink/camera-manager. This can lead to unexpected behavior."
2736
2755
  );
2737
2756
  export {
2738
- Ie as Camera,
2757
+ De as Camera,
2739
2758
  U as CameraError,
2740
- aa as CameraManager,
2759
+ na as CameraManager,
2741
2760
  qe as MOUNT_POINT_ID,
2742
- Lt as VideoFrameProcessor,
2761
+ zt as VideoFrameProcessor,
2743
2762
  u as cameraManagerStore,
2744
2763
  B as cameraUiRefStore,
2745
- na as createCameraManagerUi,
2746
- zt as defaultCameraManagerOptions,
2747
- Ct as findResolutionKey,
2764
+ oa as createCameraManagerUi,
2765
+ Nt as defaultCameraManagerOptions,
2766
+ Et as findResolutionKey,
2748
2767
  Ne as getBuffer,
2749
- St as getNormalizedResolution,
2768
+ yt as getNormalizedResolution,
2750
2769
  le as isBufferDetached,
2751
- yt as matchClosestResolution,
2752
- Et as resetCameraManagerStore,
2753
- wt as returnLongerSide,
2770
+ Ct as matchClosestResolution,
2771
+ kt as resetCameraManagerStore,
2772
+ St as returnLongerSide,
2754
2773
  P as videoResolutions
2755
2774
  };