@openlv/modal 0.0.1-beta.6 → 0.0.1-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/logo.d.ts +5 -0
- package/dist/components/Header.d.ts +9 -0
- package/dist/components/ModalRoot.d.ts +9 -0
- package/dist/components/UnknownState.d.ts +4 -0
- package/dist/components/footer/Footer.d.ts +1 -0
- package/dist/components/footer/StatusIndicator.d.ts +1 -0
- package/dist/components/settings/ConnectionPreferences.d.ts +1 -0
- package/dist/components/settings/Signaling.d.ts +1 -0
- package/dist/components/settings/Transport.d.ts +1 -0
- package/dist/components/settings/index.d.ts +1 -0
- package/dist/context.d.ts +9 -0
- package/dist/element.d.ts +21 -0
- package/dist/flow/ConnectionFlow.d.ts +6 -0
- package/dist/flow/HandshakeOpen.d.ts +4 -0
- package/dist/flow/InfoScreen.d.ts +1 -0
- package/dist/flow/disconnected/ConnectionGraphic.d.ts +1 -0
- package/dist/flow/disconnected/Disconnected.d.ts +4 -0
- package/dist/hooks/useClipboard.d.ts +1 -0
- package/dist/hooks/useConnectionState.d.ts +7 -0
- package/dist/hooks/useEventEmitter.d.ts +2 -0
- package/dist/hooks/useProvider.d.ts +5 -0
- package/dist/hooks/usePunchTransition.d.ts +8 -0
- package/dist/hooks/useSession.d.ts +8 -0
- package/dist/hooks/useSettings.d.ts +15 -0
- package/dist/index.cjs.js +5 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +12 -25
- package/dist/index.es.js +1478 -1397
- package/dist/index.es.js.map +1 -1
- package/dist/modal.css +1 -1
- package/dist/openlv-CH8lb3Oi.js +98 -0
- package/dist/openlv-CH8lb3Oi.js.map +1 -0
- package/dist/openlv-SMG3Trx9.cjs +2 -0
- package/dist/openlv-SMG3Trx9.cjs.map +1 -0
- package/dist/simple-9RmOY_8k.js +73 -0
- package/dist/simple-9RmOY_8k.js.map +1 -0
- package/dist/simple-DJcIRSvc.cjs +2 -0
- package/dist/simple-DJcIRSvc.cjs.map +1 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/openlv.d.ts +141 -0
- package/dist/theme/simple.d.ts +73 -0
- package/dist/theme/types.d.ts +94 -0
- package/dist/types/connection.d.ts +13 -0
- package/dist/ui/Button.d.ts +62 -0
- package/dist/ui/InfoTooltip.d.ts +78 -0
- package/dist/ui/Input.d.ts +22 -0
- package/dist/ui/Select.d.ts +7 -0
- package/dist/ui/Toggle.d.ts +7 -0
- package/dist/ui/menu/MenuGroup.d.ts +6 -0
- package/dist/ui/menu/MenuItem.d.ts +5 -0
- package/dist/utils/log.d.ts +1 -0
- package/package.json +7 -8
- package/dist/index.iife.js +0 -8
- package/dist/index.iife.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ConnectionState = "idle" | "initializing" | "connecting" | "qr-ready" | "connected" | "error" | "disconnected";
|
|
2
|
+
export interface ConnectionInfo {
|
|
3
|
+
state: ConnectionState;
|
|
4
|
+
uri?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
connectedAccount?: string;
|
|
7
|
+
chainId?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ModalConnectionInterface {
|
|
10
|
+
showModal: () => void;
|
|
11
|
+
hideModal: () => void;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'preact';
|
|
2
|
+
import { PropsWithChildren } from 'preact/compat';
|
|
3
|
+
import { VariantProps } from 'tailwind-variants/lite';
|
|
4
|
+
declare const styles: import('tailwind-variants/lite').TVReturnType<{
|
|
5
|
+
$variant: {
|
|
6
|
+
primary: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
tertiary: string;
|
|
9
|
+
};
|
|
10
|
+
$size: {
|
|
11
|
+
sm: string;
|
|
12
|
+
md: string;
|
|
13
|
+
lg: string;
|
|
14
|
+
};
|
|
15
|
+
$aspect: {
|
|
16
|
+
square: string;
|
|
17
|
+
auto: string;
|
|
18
|
+
};
|
|
19
|
+
}, undefined, string, {
|
|
20
|
+
$variant: {
|
|
21
|
+
primary: string;
|
|
22
|
+
secondary: string;
|
|
23
|
+
tertiary: string;
|
|
24
|
+
};
|
|
25
|
+
$size: {
|
|
26
|
+
sm: string;
|
|
27
|
+
md: string;
|
|
28
|
+
lg: string;
|
|
29
|
+
};
|
|
30
|
+
$aspect: {
|
|
31
|
+
square: string;
|
|
32
|
+
auto: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, import('tailwind-variants/lite').TVReturnType<{
|
|
35
|
+
$variant: {
|
|
36
|
+
primary: string;
|
|
37
|
+
secondary: string;
|
|
38
|
+
tertiary: string;
|
|
39
|
+
};
|
|
40
|
+
$size: {
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
};
|
|
45
|
+
$aspect: {
|
|
46
|
+
square: string;
|
|
47
|
+
auto: string;
|
|
48
|
+
};
|
|
49
|
+
}, undefined, string, unknown, unknown, undefined>>;
|
|
50
|
+
export type ButtonButtonProps = {
|
|
51
|
+
onClick: () => void;
|
|
52
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
53
|
+
export type ButtonLinkProps = {
|
|
54
|
+
href: string;
|
|
55
|
+
} & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
56
|
+
export type ButtonProps = PropsWithChildren<VariantProps<typeof styles> & (({
|
|
57
|
+
href: string;
|
|
58
|
+
} & ButtonLinkProps) | ({
|
|
59
|
+
onClick: () => void;
|
|
60
|
+
} & ButtonButtonProps))>;
|
|
61
|
+
export declare function Button(rawProps: ButtonProps): import('preact').VNode<import('preact').ClassAttributes<HTMLElement> & Record<string, unknown>>;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'preact/compat';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants/lite';
|
|
3
|
+
declare const styles: import('tailwind-variants/lite').TVReturnType<{
|
|
4
|
+
size: {
|
|
5
|
+
sm: {
|
|
6
|
+
box: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
box: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
box: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
variant: {
|
|
19
|
+
icon: string;
|
|
20
|
+
text: string;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
root: string;
|
|
24
|
+
box: string;
|
|
25
|
+
popover: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
}, undefined, {
|
|
28
|
+
size: {
|
|
29
|
+
sm: {
|
|
30
|
+
box: string;
|
|
31
|
+
icon: string;
|
|
32
|
+
};
|
|
33
|
+
md: {
|
|
34
|
+
box: string;
|
|
35
|
+
icon: string;
|
|
36
|
+
};
|
|
37
|
+
lg: {
|
|
38
|
+
box: string;
|
|
39
|
+
icon: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
variant: {
|
|
43
|
+
icon: string;
|
|
44
|
+
text: string;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
root: string;
|
|
48
|
+
box: string;
|
|
49
|
+
popover: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
}, import('tailwind-variants/lite').TVReturnType<{
|
|
52
|
+
size: {
|
|
53
|
+
sm: {
|
|
54
|
+
box: string;
|
|
55
|
+
icon: string;
|
|
56
|
+
};
|
|
57
|
+
md: {
|
|
58
|
+
box: string;
|
|
59
|
+
icon: string;
|
|
60
|
+
};
|
|
61
|
+
lg: {
|
|
62
|
+
box: string;
|
|
63
|
+
icon: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
variant: {
|
|
67
|
+
icon: string;
|
|
68
|
+
text: string;
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
root: string;
|
|
72
|
+
box: string;
|
|
73
|
+
popover: string;
|
|
74
|
+
icon: string;
|
|
75
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
76
|
+
export type InfoTooltipProps = VariantProps<typeof styles>;
|
|
77
|
+
export declare const InfoTooltip: FC<PropsWithChildren<InfoTooltipProps>>;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type LabelProps = {
|
|
2
|
+
htmlFor?: string;
|
|
3
|
+
children: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const Label: ({ htmlFor, children }: LabelProps) => import("preact").JSX.Element;
|
|
6
|
+
type InputProps = {
|
|
7
|
+
id?: string;
|
|
8
|
+
value: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const Input: ({ id, value, placeholder, ariaLabel, readOnly, onChange, }: InputProps) => import("preact").JSX.Element;
|
|
15
|
+
type InputGroupProps = {
|
|
16
|
+
label: string;
|
|
17
|
+
values: readonly string[];
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
inputIdPrefix?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const InputGroup: ({ label, values, placeholder, inputIdPrefix, }: InputGroupProps) => import("preact").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const log: (...x: Parameters<typeof console.log>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openlv/modal",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.8",
|
|
4
4
|
"description": "Preact-based modal custom element for Open Lavatory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"open-lavatory",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
},
|
|
35
35
|
"main": "./dist/index.cjs.js",
|
|
36
36
|
"module": "./dist/index.es.js",
|
|
37
|
-
"unpkg": "./dist/index.iife.js",
|
|
38
37
|
"types": "./dist/index.d.ts",
|
|
39
38
|
"files": [
|
|
40
39
|
"dist",
|
|
@@ -46,15 +45,15 @@
|
|
|
46
45
|
"ox": "^0.9.14",
|
|
47
46
|
"qrcode-generator": "^1.5.0",
|
|
48
47
|
"tailwind-variants": "^3.1.1",
|
|
49
|
-
"@openlv/core": "0.0.1-beta.
|
|
50
|
-
"@openlv/provider": "0.0.1-beta.
|
|
51
|
-
"@openlv/session": "0.0.1-beta.
|
|
52
|
-
"@openlv/signaling": "0.0.1-beta.
|
|
48
|
+
"@openlv/core": "0.0.1-beta.8",
|
|
49
|
+
"@openlv/provider": "0.0.1-beta.8",
|
|
50
|
+
"@openlv/session": "0.0.1-beta.9",
|
|
51
|
+
"@openlv/signaling": "0.0.1-beta.7"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
54
|
"@preact/preset-vite": "^2.10.2",
|
|
56
|
-
"@tailwindcss/vite": "^4.1.
|
|
57
|
-
"preact": "^10.
|
|
55
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
56
|
+
"preact": "^10.27.3",
|
|
58
57
|
"preact-custom-element": "^4.4.3",
|
|
59
58
|
"react-icons": "^5.5.0",
|
|
60
59
|
"tailwindcss": "^4",
|
package/dist/index.iife.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var OpenLVModal=(function(z,o,u,p,Wt){"use strict";var Hn=Object.defineProperty;var Gn=(z,o,u)=>o in z?Hn(z,o,{enumerable:!0,configurable:!0,writable:!0,value:u}):z[o]=u;var ce=(z,o,u)=>Gn(z,typeof o!="symbol"?o+"":o,u);const Ut=e=>{const t=new URLSearchParams;return t.set("h",e.h),t.set("k",e.k),e.p&&t.set("p",e.p),e.s&&t.set("s",e.s),`openlv://${e.sessionId}@1?${t.toString()}`};function Kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},Ze;function Jt(){return Ze||(Ze=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function i(c,d,f,g,x){if(typeof f!="function")throw new TypeError("The listener must be a function");var E=new a(f,g||c,x),C=r?r+d:d;return c._events[C]?c._events[C].fn?c._events[C]=[c._events[C],E]:c._events[C].push(E):(c._events[C]=E,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new n:delete c._events[d]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,g;if(this._eventsCount===0)return d;for(g in f=this._events)t.call(f,g)&&d.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=r?r+d:d,g=this._events[f];if(!g)return[];if(g.fn)return[g.fn];for(var x=0,E=g.length,C=new Array(E);x<E;x++)C[x]=g[x].fn;return C},l.prototype.listenerCount=function(d){var f=r?r+d:d,g=this._events[f];return g?g.fn?1:g.length:0},l.prototype.emit=function(d,f,g,x,E,C){var M=r?r+d:d;if(!this._events[M])return!1;var h=this._events[M],P=arguments.length,j,A;if(h.fn){switch(h.once&&this.removeListener(d,h.fn,void 0,!0),P){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,f),!0;case 3:return h.fn.call(h.context,f,g),!0;case 4:return h.fn.call(h.context,f,g,x),!0;case 5:return h.fn.call(h.context,f,g,x,E),!0;case 6:return h.fn.call(h.context,f,g,x,E,C),!0}for(A=1,j=new Array(P-1);A<P;A++)j[A-1]=arguments[A];h.fn.apply(h.context,j)}else{var W=h.length,Y;for(A=0;A<W;A++)switch(h[A].once&&this.removeListener(d,h[A].fn,void 0,!0),P){case 1:h[A].fn.call(h[A].context);break;case 2:h[A].fn.call(h[A].context,f);break;case 3:h[A].fn.call(h[A].context,f,g);break;case 4:h[A].fn.call(h[A].context,f,g,x);break;default:if(!j)for(Y=1,j=new Array(P-1);Y<P;Y++)j[Y-1]=arguments[Y];h[A].fn.apply(h[A].context,j)}}return!0},l.prototype.on=function(d,f,g){return i(this,d,f,g,!1)},l.prototype.once=function(d,f,g){return i(this,d,f,g,!0)},l.prototype.removeListener=function(d,f,g,x){var E=r?r+d:d;if(!this._events[E])return this;if(!f)return s(this,E),this;var C=this._events[E];if(C.fn)C.fn===f&&(!x||C.once)&&(!g||C.context===g)&&s(this,E);else{for(var M=0,h=[],P=C.length;M<P;M++)(C[M].fn!==f||x&&!C[M].once||g&&C[M].context!==g)&&h.push(C[M]);h.length?this._events[E]=h.length===1?h[0]:h:s(this,E)}return this},l.prototype.removeAllListeners=function(d){var f;return d?(f=r?r+d:d,this._events[f]&&s(this,f)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Ee)),Ee.exports}Jt();const F=Symbol.for("@ts-pattern/matcher"),qe=Symbol.for("@ts-pattern/isVariadic"),ye="@ts-pattern/anonymous-select-key",Oe=e=>!!(e&&typeof e=="object"),we=e=>e&&!!e[F],O=(e,t,r)=>{if(we(e)){const n=e[F](),{matched:a,selections:i}=n.match(t);return a&&i&&Object.keys(i).forEach(s=>r(s,i[s])),a}if(Oe(e)){if(!Oe(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],a=[],i=[];for(const s of e.keys()){const l=e[s];we(l)&&l[qe]?i.push(l):i.length?a.push(l):n.push(l)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+a.length)return!1;const s=t.slice(0,n.length),l=a.length===0?[]:t.slice(-a.length),c=t.slice(n.length,a.length===0?1/0:-a.length);return n.every((d,f)=>O(d,s[f],r))&&a.every((d,f)=>O(d,l[f],r))&&(i.length===0||O(i[0],c,r))}return e.length===t.length&&e.every((s,l)=>O(s,t[l],r))}return Reflect.ownKeys(e).every(n=>{const a=e[n];return(n in t||we(i=a)&&i[F]().matcherType==="optional")&&O(a,t[n],r);var i})}return Object.is(t,e)},B=e=>{var t,r,n;return Oe(e)?we(e)?(t=(r=(n=e[F]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?ue(e,B):ue(Object.values(e),B):[]},ue=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Xt(...e){if(e.length===1){const[t]=e;return r=>O(t,r,()=>{})}if(e.length===2){const[t,r]=e;return O(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function T(e){return Object.assign(e,{optional:()=>je(e),and:t=>S(e,t),or:t=>$e(e,t),select:t=>t===void 0?de(e):de(t,e)})}function Te(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[qe]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=n[r++])!=null?a:n.at(-1)}}}}))(e),{optional:()=>Te(je(e)),select:t=>Te(t===void 0?de(e):de(t,e))})}function je(e){return T({[F]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return t===void 0?(B(e).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:O(e,t,n),selections:r}},getSelectionKeys:()=>B(e),matcherType:"optional"})})}const Rt=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Yt=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},Qt=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function S(...e){return T({[F]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:e.every(a=>O(a,t,n)),selections:r}},getSelectionKeys:()=>ue(e,B),matcherType:"and"})})}function $e(...e){return T({[F]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return ue(e,B).forEach(a=>n(a,void 0)),{matched:e.some(a=>O(a,t,n)),selections:r}},getSelectionKeys:()=>ue(e,B),matcherType:"or"})})}function w(e){return{[F]:()=>({match:t=>({matched:!!e(t)})})}}function de(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return T({[F]:()=>({match:n=>{let a={[t??ye]:n};return{matched:r===void 0||O(r,n,(i,s)=>{a[i]=s}),selections:a}},getSelectionKeys:()=>[t??ye].concat(r===void 0?[]:B(r))})})}function et(e){return!0}function X(e){return typeof e=="number"}function Z(e){return typeof e=="string"}function q(e){return typeof e=="bigint"}const tt=T(w(et)),Zt=T(w(et)),qt=tt,$=e=>Object.assign(T(e),{startsWith:t=>{return $(S(e,(r=t,w(n=>Z(n)&&n.startsWith(r)))));var r},endsWith:t=>{return $(S(e,(r=t,w(n=>Z(n)&&n.endsWith(r)))));var r},minLength:t=>$(S(e,(r=>w(n=>Z(n)&&n.length>=r))(t))),length:t=>$(S(e,(r=>w(n=>Z(n)&&n.length===r))(t))),maxLength:t=>$(S(e,(r=>w(n=>Z(n)&&n.length<=r))(t))),includes:t=>{return $(S(e,(r=t,w(n=>Z(n)&&n.includes(r)))));var r},regex:t=>{return $(S(e,(r=t,w(n=>Z(n)&&!!n.match(r)))));var r}}),rt=$(w(Z)),R=e=>Object.assign(T(e),{between:(t,r)=>R(S(e,((n,a)=>w(i=>X(i)&&n<=i&&a>=i))(t,r))),lt:t=>R(S(e,(r=>w(n=>X(n)&&n<r))(t))),gt:t=>R(S(e,(r=>w(n=>X(n)&&n>r))(t))),lte:t=>R(S(e,(r=>w(n=>X(n)&&n<=r))(t))),gte:t=>R(S(e,(r=>w(n=>X(n)&&n>=r))(t))),int:()=>R(S(e,w(t=>X(t)&&Number.isInteger(t)))),finite:()=>R(S(e,w(t=>X(t)&&Number.isFinite(t)))),positive:()=>R(S(e,w(t=>X(t)&&t>0))),negative:()=>R(S(e,w(t=>X(t)&&t<0)))}),$t=R(w(X)),ee=e=>Object.assign(T(e),{between:(t,r)=>ee(S(e,((n,a)=>w(i=>q(i)&&n<=i&&a>=i))(t,r))),lt:t=>ee(S(e,(r=>w(n=>q(n)&&n<r))(t))),gt:t=>ee(S(e,(r=>w(n=>q(n)&&n>r))(t))),lte:t=>ee(S(e,(r=>w(n=>q(n)&&n<=r))(t))),gte:t=>ee(S(e,(r=>w(n=>q(n)&&n>=r))(t))),positive:()=>ee(S(e,w(t=>q(t)&&t>0))),negative:()=>ee(S(e,w(t=>q(t)&&t<0)))}),er=ee(w(q)),tr=T(w(function(e){return typeof e=="boolean"})),rr=T(w(function(e){return typeof e=="symbol"})),nr=T(w(function(e){return e==null})),ar=T(w(function(e){return e!=null}));var nt={__proto__:null,matcher:F,optional:je,array:function(...e){return Te({[F]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return B(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,s)=>{n[i]=(n[i]||[]).concat([s])};return{matched:t.every(i=>O(r,i,a)),selections:n}},getSelectionKeys:()=>e.length===0?[]:B(e[0])})})},set:function(...e){return T({[F]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,s)=>{r[i]=(r[i]||[]).concat([s])},a=e[0];return{matched:Rt(t,i=>O(a,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:B(e[0])})})},map:function(...e){return T({[F]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(l,c)=>{r[l]=(r[l]||[]).concat([c])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);const[i,s]=e;return{matched:Yt(t,(l,c)=>{const d=O(i,c,n),f=O(s,l,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...B(e[0]),...B(e[1])]})})},record:function(...e){return T({[F]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const a=(l,c)=>{n[l]=(n[l]||[]).concat([c])},[i,s]=e.length===1?[rt,e[0]]:e;return{matched:Qt(t,(l,c)=>{const d=typeof l!="string"||Number.isNaN(Number(l))?null:Number(l),f=d!==null&&O(i,d,a),g=O(i,l,a),x=O(s,c,a);return(g||f)&&x}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...B(e[0]),...B(e[1])]})})},intersection:S,union:$e,not:function(e){return T({[F]:()=>({match:t=>({matched:!O(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:w,select:de,any:tt,unknown:Zt,_:qt,string:rt,number:$t,bigint:er,boolean:tr,symbol:rr,nullish:nr,nonNullable:ar,instanceOf:function(e){return T(w((function(t){return r=>r instanceof t})(e)))},shape:function(e){return T(w(Xt(e)))}};let ir=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const De={matched:!1,value:void 0};function K(e){return new or(e,De)}let or=class Qe{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let a;t.length===3&&typeof t[1]=="function"?a=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,s={};const l=(d,f)=>{i=!0,s[d]=f},c=!n.some(d=>O(d,this.input,l))||a&&!a(this.input)?De:{matched:!0,value:r(i?ye in s?s[ye]:s:this.input,this.input)};return new Qe(this.input,c)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Qe(this.input,n?{matched:!0,value:r(this.input,this.input)}:De)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=sr){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function sr(e){throw new ir(e)}const H={STANDBY:"standby",CONNECTING:"connecting",READY:"ready",HANDSHAKE:"handshake",HANDSHAKE_PARTIAL:"handshake-partial",ENCRYPTED:"encrypted",ERROR:"error"},te={CREATED:"created",SIGNALING:"signaling",READY:"ready",CONNECTED:"connected",DISCONNECTED:"disconnected"},J={STANDBY:"standby",CREATING:"creating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error"};var Ie={exports:{}};/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var at;function lr(){return at||(at=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(i=a(i,n(l)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var l in i)t.call(i,l)&&i[l]&&(s=a(s,l));return s}function a(i,s){return s?i?i+" "+s:i+s:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ie)),Ie.exports}var cr=lr();const se=Kt(cr);function it(e,t){for(var r in t)e[r]=t[r];return e}function Pe(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ot(e,t){var r=t(),n=u.useState({t:{__:r,u:t}}),a=n[0].t,i=n[1];return u.useLayoutEffect(function(){a.__=r,a.u=t,Le(a)&&i({t:a})},[e,r,t]),u.useEffect(function(){return Le(a)&&i({t:a}),e(function(){Le(a)&&i({t:a})})},[e]),r}function Le(e){var t,r,n=e.u,a=e.__;try{var i=n();return!((t=a)===(r=i)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}function st(e){e()}function lt(e){return e}function ct(){return[!1,st]}var ut=u.useLayoutEffect;function Me(e,t){this.props=e,this.context=t}function ur(e,t){function r(a){var i=this.props.ref,s=i==a.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,a)||!s:Pe(this.props,a)}function n(a){return this.shouldComponentUpdate=r,p.createElement(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n.type=e,n}(Me.prototype=new p.Component).isPureReactComponent=!0,Me.prototype.shouldComponentUpdate=function(e,t){return Pe(this.props,e)||Pe(this.state,t)};var dt=p.options.__b;p.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),dt&&dt(e)};var dr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function fr(e){function t(r){var n=it({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=dr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ft=function(e,t){return e==null?null:p.toChildArray(p.toChildArray(e).map(t))},pr={map:ft,forEach:ft,count:function(e){return e?p.toChildArray(e).length:0},only:function(e){var t=p.toChildArray(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:p.toChildArray},hr=p.options.__e;p.options.__e=function(e,t,r,n){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),a.__c(e,t)}hr(e,t,r,n)};var pt=p.options.unmount;function ht(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=it({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return ht(n,t,r)})),e}function gt(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return gt(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function be(){this.__u=0,this.o=null,this.__b=null}function vt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function gr(e){var t,r,n;function a(i){if(t||(t=e()).then(function(s){r=s.default||s},function(s){n=s}),n)throw n;if(!r)throw t;return p.createElement(r,i)}return a.displayName="Lazy",a.__f=!0,a}function fe(){this.i=null,this.l=null}p.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),pt&&pt(e)},(be.prototype=new p.Component).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var a=vt(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,a?a(l):l())};r.__R=s;var l=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=gt(c,c.__c.__P,c.__c.__O)}var d;for(n.setState({__a:n.__b=null});d=n.o.pop();)d.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},be.prototype.componentWillUnmount=function(){this.o=[]},be.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ht(this.__b,r,n.__O=n.__P)}this.__b=null}var a=t.__a&&p.createElement(p.Fragment,null,e.fallback);return a&&(a.__u&=-33),[p.createElement(p.Fragment,null,t.__a?null:e.children),a]};var yt=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function vr(e){return this.getChildContext=function(){return e.context},e.children}function yr(e){var t=this,r=e.h;if(t.componentWillUnmount=function(){p.render(null,t.v),t.v=null,t.h=null},t.h&&t.h!==r&&t.componentWillUnmount(),!t.v){for(var n=t.__v;n!==null&&!n.__m&&n.__!==null;)n=n.__;t.h=r,t.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:n.__m},contains:function(){return!0},insertBefore:function(a,i){this.childNodes.push(a),t.h.insertBefore(a,i)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),t.h.removeChild(a)}}}p.render(p.createElement(vr,{context:t.context},e.__v),t.v)}function wr(e,t){var r=p.createElement(yr,{__v:e,h:t});return r.containerInfo=t,r}(fe.prototype=new p.Component).__a=function(e){var t=this,r=vt(t.__v),n=t.l.get(e);return n[0]++,function(a){var i=function(){t.props.revealOrder?(n.push(a),yt(t,e,n)):a()};r?r(i):i()}},fe.prototype.render=function(e){this.i=null,this.l=new Map;var t=p.toChildArray(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},fe.prototype.componentDidUpdate=fe.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){yt(e,r,t)})};var wt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,br=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,mr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,xr=/[A-Z0-9]/g,_r=typeof document<"u",Nr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Cr(e,t,r){return t.__k==null&&(t.textContent=""),p.render(e,t),typeof r=="function"&&r(),e?e.__c:null}function Sr(e,t,r){return p.hydrate(e,t),typeof r=="function"&&r(),e?e.__c:null}p.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(p.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var bt=p.options.event;function Ar(){}function kr(){return this.cancelBubble}function Er(){return this.defaultPrevented}p.options.event=function(e){return bt&&(e=bt(e)),e.persist=Ar,e.isPropagationStopped=kr,e.isDefaultPrevented=Er,e.nativeEvent=e};var Ve,Or={enumerable:!1,configurable:!0,get:function(){return this.class}},mt=p.options.vnode;p.options.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,a={},i=n.indexOf("-")===-1;for(var s in r){var l=r[s];if(!(s==="value"&&"defaultValue"in r&&l==null||_r&&s==="children"&&n==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in r&&r.value==null?s="value":s==="download"&&l===!0?l="":c==="translate"&&l==="no"?l=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||n!=="input"&&n!=="textarea"||Nr(r.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":mr.test(s)&&(s=c):c=s="oninput":i&&br.test(s)?s=s.replace(xr,"-$&").toLowerCase():l===null&&(l=void 0),c==="oninput"&&a[s=c]&&(s="oninputCapture"),a[s]=l}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=p.toChildArray(r.children).forEach(function(d){d.props.selected=a.value.indexOf(d.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=p.toChildArray(r.children).forEach(function(d){d.props.selected=a.multiple?a.defaultValue.indexOf(d.props.value)!=-1:a.defaultValue==d.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",Or)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),t.props=a})(e),e.$$typeof=wt,mt&&mt(e)};var xt=p.options.__r;p.options.__r=function(e){xt&&xt(e),Ve=e.__c};var _t=p.options.diffed;p.options.diffed=function(e){_t&&_t(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Ve=null};var Tr={ReactCurrentDispatcher:{current:{readContext:function(e){return Ve.__n[e.__c].props.value},useCallback:u.useCallback,useContext:u.useContext,useDebugValue:u.useDebugValue,useDeferredValue:lt,useEffect:u.useEffect,useId:u.useId,useImperativeHandle:u.useImperativeHandle,useInsertionEffect:ut,useLayoutEffect:u.useLayoutEffect,useMemo:u.useMemo,useReducer:u.useReducer,useRef:u.useRef,useState:u.useState,useSyncExternalStore:ot,useTransition:ct}}};function jr(e){return p.createElement.bind(null,e)}function me(e){return!!e&&e.$$typeof===wt}function Dr(e){return me(e)&&e.type===p.Fragment}function Ir(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Pr(e){return me(e)?p.cloneElement.apply(null,arguments):e}function Lr(e){return!!e.__k&&(p.render(null,e),!0)}function Mr(e){return e&&(e.base||e.nodeType===1&&e)||null}var Vr=function(e,t){return e(t)},zr=function(e,t){return e(t)},Fr=p.Fragment,Br=me,ie={useState:u.useState,useId:u.useId,useReducer:u.useReducer,useEffect:u.useEffect,useLayoutEffect:u.useLayoutEffect,useInsertionEffect:ut,useTransition:ct,useDeferredValue:lt,useSyncExternalStore:ot,startTransition:st,useRef:u.useRef,useImperativeHandle:u.useImperativeHandle,useMemo:u.useMemo,useCallback:u.useCallback,useContext:u.useContext,useDebugValue:u.useDebugValue,version:"18.3.1",Children:pr,render:Cr,hydrate:Sr,unmountComponentAtNode:Lr,createPortal:wr,createElement:p.createElement,createContext:p.createContext,createFactory:jr,cloneElement:Pr,createRef:p.createRef,Fragment:p.Fragment,isValidElement:me,isElement:Br,isFragment:Dr,isMemo:Ir,findDOMNode:Mr,Component:p.Component,PureComponent:Me,memo:ur,forwardRef:fr,flushSync:zr,unstable_batchedUpdates:Vr,StrictMode:Fr,Suspense:be,SuspenseList:fe,lazy:gr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Tr};const ze={font:{family:"Inter, sans-serif"},body:{color:"#373737",background:"#ffffff"},border:{radius:"16px"},overlay:{background:"#00000008",backdrop:{filter:"blur(2px)"}},modal:{shadow:"0px 2px 4px 0px #00000005"}},Nt=(e,t,r)=>{for(const[n,a]of Object.entries(r))typeof a=="object"&&a!==null?Nt(e,`${t}-${n}`,a):typeof a=="string"&&e.set(`--lv${t}-${n}`,a)},Ct=(e,t=!0)=>{const r=new Map;return Nt(r,"",e),Object.fromEntries(r.entries())},Hr=({theme:e=ze,children:t})=>o.jsx("div",{style:Ct(e),id:"root",children:t}),St=p.createContext({provider:void 0}),Gr=({provider:e,onClose:t})=>o.jsx(St.Provider,{value:{provider:e},children:o.jsx(Hr,{theme:ze,children:o.jsx(Ft,{onClose:t})})}),Wr=()=>{const e=u.useContext(St);if(!e.provider)throw new Error("Provider not found");return e},le=()=>{const{provider:e}=Wr(),[t,r]=u.useState(e?.getState().status||J.ERROR);if(u.useEffect(()=>{const n=a=>{r(a)};return e?.on("status_change",n),()=>{e?.off("status_change",n)}},[e]),!e)throw new Error("Provider not found");return{provider:e,status:t}},Fe=(...e)=>console.log("%c[modal]%c","color: yellow; font-weight: bold","color: inherit; font-weight: normal",...e),At=(e,t,r)=>{u.useEffect(()=>(e?.on(t,r),()=>{e?.off(t,r)}),[e,t])},Be=()=>{const{provider:e}=le(),[t,r]=u.useState(e?.storage.getSettings());At(e?.storage.emitter,"settings_change",l=>{r(l)});const n=l=>{if(!t||t.signaling?.p===l)return;const c={...t,signaling:{...t.signaling,p:l}};r(c),e?.storage.setSettings(c)},a=l=>{if(!t||t.signaling?.s[t.signaling?.p]===l)return;const c={...t,signaling:{...t.signaling,s:{...t.signaling.s,[t.signaling.p]:l}}};r(c),e?.storage.setSettings(c)},i=l=>{t&&(r({...t,retainHistory:l}),e?.storage.setSettings({...t,retainHistory:l}))},s=l=>{t&&(r({...t,autoReconnect:l}),e?.storage.setSettings({...t,autoReconnect:l}))};if(!t)throw new Error("Settings not found");return{settings:t,updateSignalingProtocol:n,updateSignalingServer:a,updateRetainHistory:i,updateAutoReconnect:s}},pe=()=>{const{provider:e}=le(),[t,r]=u.useState(e?.getSession()),n=t?.getHandshakeParameters(),a=n?Ut(n):void 0,[i,s]=u.useState(t?.getState());return At(t?.emitter,"state_change",l=>{Fe("session state change: ",l),s(l)}),u.useEffect(()=>{const l=()=>{const c=e?.getSession();c&&r(c)};return e?.on("status_change",l),()=>{e?.off("status_change",l)}},[e]),u.useEffect(()=>{const l=c=>{r(c),s(c.getState())};return e?.on("session_started",l),()=>{e?.off("session_started",l)}},[e]),u.useEffect(()=>{t&&s(t.getState())},[t]),{uri:a,status:i}},Ur=()=>{const{provider:e}=le(),{settings:t}=Be();return{start:()=>{const r=t?.signaling?.p,n=t?.signaling?.s[r];if(!r||!n)throw new Error("Invalid protocol or server");return e?.createSession({p:r,s:n})}}},He=({state:e})=>{const{status:t,uri:r}=pe(),{status:n}=le();return console.error("Unknown state: ",{state:e,sessionStatus:t,providerStatus:n}),o.jsxs("div",{className:"rounded-md bg-gray-100 p-2 text-gray-500",children:[o.jsxs("div",{children:["Unknown state: ",JSON.stringify(e)]}),o.jsxs("div",{children:["URI: ",r]}),o.jsxs("div",{children:["Session Status: ",JSON.stringify(t)]}),o.jsxs("div",{children:["Provider Status: ",JSON.stringify(n)]})]})},Kr=({onCopy:e})=>{const{uri:t}=pe(),r=u.useCallback(()=>{t&&e(t)},[t,e]),n=u.useCallback(a=>{const i=Wt(0,"M");return i.addData(a),i.make(),i.createSvgTag({cellSize:5,margin:0,scalable:!0})},[]);return o.jsxs("div",{className:"flex flex-col items-center gap-4 px-2",children:[o.jsxs("div",{className:"w-full space-y-4 rounded-md border border-neutral-200 bg-neutral-100 p-4",children:[t&&o.jsx("div",{className:"relative mx-auto flex w-fit items-center justify-center rounded-lg border-2 border-gray-200 bg-gray-50 p-4",children:o.jsx("button",{className:"flex h-[200px] w-[200px] cursor-pointer items-center justify-center",onClick:r,title:"Click to copy connection URL",dangerouslySetInnerHTML:{__html:n(t)}})}),o.jsx("div",{className:"w-full",children:o.jsx("button",{type:"button",onClick:r,className:"w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-200 px-4 py-2 text-gray-700 text-sm transition hover:bg-gray-300",children:"Copy Connection URL"})})]}),o.jsxs("div",{className:"w-full",children:[o.jsx("span",{children:"Scan the link above using your mobile wallet."}),o.jsx("br",{}),o.jsx("span",{children:"Or copy the link and paste it into your wallet."})]})]})},Jr=()=>typeof document<"u"&&"startViewTransition"in document,Xr=e=>{Jr()?document.startViewTransition(e):e()},Rr=()=>o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent"})}),I={CONNECTING:"connecting",READY:"ready",CONFIRMING:"confirming",CONNECTED:"connected",DISCONNECTED:"disconnected",ERROR:"error"},Yr=e=>{const[t,r]=u.useState(e),n=u.useRef(e);return u.useEffect(()=>{e!==n.current&&Xr(()=>{r(e),n.current=e})},[e]),{displayState:t}},Qr=e=>K(e).with({status:te.CREATED},()=>I.CONNECTING).with({status:te.SIGNALING},()=>K(e?.signaling).with({state:H.STANDBY},()=>I.CONNECTING).with({state:H.CONNECTING},()=>I.CONNECTING).with({state:H.READY},()=>I.READY).with({state:H.HANDSHAKE},()=>I.CONFIRMING).with({state:H.HANDSHAKE_PARTIAL},()=>I.CONFIRMING).with({state:H.ENCRYPTED},()=>I.CONNECTED).otherwise(()=>I.CONNECTING)).with({status:te.READY},()=>I.READY).with({status:te.CONNECTED},()=>I.CONNECTED).with({status:te.DISCONNECTED},()=>I.DISCONNECTED).otherwise(()=>I.ERROR),Zr=({onClose:e,onCopy:t})=>{const{status:r}=pe(),{displayState:n}=Yr(Qr(r));return o.jsx("div",{style:{viewTransitionName:"connection-flow"},className:"w-full",children:K(n).with(I.CONNECTING,()=>o.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[o.jsx(Rr,{}),o.jsxs("div",{className:"text-center",children:[o.jsx("h3",{className:"mb-2 font-semibold text-gray-900 text-lg",children:"Connecting"}),o.jsx("p",{className:"text-gray-500 text-sm",children:"Waiting for wallet to connect..."})]})]})).with(I.READY,()=>o.jsx(Kr,{onCopy:t})).with(I.CONFIRMING,()=>o.jsx("div",{className:"flex flex-col items-center gap-4 p-6",children:o.jsx("div",{className:"text-center",children:o.jsx("h3",{className:"mb-2 font-semibold text-gray-900 text-lg",children:"Establishing e2e encryption..."})})})).with(I.CONNECTED,()=>o.jsx("div",{className:"flex flex-col items-center gap-4 p-6",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"mb-4 text-4xl",children:"✅"}),o.jsx("h3",{className:"mb-2 font-semibold text-gray-900 text-lg",children:"Connected Successfully!"}),o.jsx("p",{className:"text-gray-500 text-sm",children:"Your wallet is now connected and ready to use."})]})})).with(I.DISCONNECTED,()=>o.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"mb-4 text-4xl",children:"🔌"}),o.jsx("h3",{className:"mb-2 font-semibold text-gray-900 text-lg",children:"Disconnected"}),o.jsx("p",{className:"mb-4 text-gray-500 text-sm",children:"The connection has been closed."})]}),o.jsx("button",{type:"button",onClick:e,className:"w-full rounded-lg bg-gray-100 px-4 py-2 font-semibold text-gray-700 text-sm transition hover:bg-gray-200",children:"Close"})]})).otherwise(()=>o.jsx(He,{state:r}))})};var kt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Et=ie.createContext&&ie.createContext(kt),qr=["attr","size","title"];function $r(e,t){if(e==null)return{};var r=en(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function en(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xe.apply(this,arguments)}function Ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ot(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tn(e,t,r){return t=rn(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rn(e){var t=nn(e,"string");return typeof t=="symbol"?t:t+""}function nn(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tt(e){return e&&e.map((t,r)=>ie.createElement(t.tag,_e({key:r},t.attr),Tt(t.child)))}function Ne(e){return t=>ie.createElement(an,xe({attr:_e({},e.attr)},t),Tt(e.child))}function an(e){var t=r=>{var{attr:n,size:a,title:i}=e,s=$r(e,qr),l=a||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),ie.createElement("svg",xe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:c,style:_e(_e({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&ie.createElement("title",null,i),e.children)};return Et!==void 0?ie.createElement(Et.Consumer,null,r=>t(r)):t(kt)}function on(e){return Ne({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416.3 256c0-21 13.1-38.9 31.7-46.1-4.9-20.5-13-39.7-23.7-57.1-6.4 2.8-13.2 4.3-20.1 4.3-12.6 0-25.2-4.8-34.9-14.4-14.9-14.9-18.2-36.8-10.2-55-17.3-10.7-36.6-18.8-57-23.7C295 82.5 277 95.7 256 95.7S217 82.5 209.9 64c-20.5 4.9-39.7 13-57.1 23.7 8.1 18.1 4.7 40.1-10.2 55-9.6 9.6-22.3 14.4-34.9 14.4-6.9 0-13.7-1.4-20.1-4.3C77 170.3 68.9 189.5 64 210c18.5 7.1 31.7 25 31.7 46.1 0 21-13.1 38.9-31.6 46.1 4.9 20.5 13 39.7 23.7 57.1 6.4-2.8 13.2-4.2 20-4.2 12.6 0 25.2 4.8 34.9 14.4 14.8 14.8 18.2 36.8 10.2 54.9 17.4 10.7 36.7 18.8 57.1 23.7 7.1-18.5 25-31.6 46-31.6s38.9 13.1 46 31.6c20.5-4.9 39.7-13 57.1-23.7-8-18.1-4.6-40 10.2-54.9 9.6-9.6 22.2-14.4 34.9-14.4 6.8 0 13.7 1.4 20 4.2 10.7-17.4 18.8-36.7 23.7-57.1-18.4-7.2-31.6-25.1-31.6-46.2zm-159.4 79.9c-44.3 0-80-35.9-80-80s35.7-80 80-80 80 35.9 80 80-35.7 80-80 80z"},child:[]}]})(e)}var sn=/\s+/g,Ge=e=>typeof e!="string"||!e?e:e.replace(sn," ").trim(),Ce=(...e)=>{let t=[],r=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let i=0,s=n.length;i<s;i++)r(n[i]);return}let a=typeof n;if(a==="string"||a==="number"||a==="bigint"){if(a==="number"&&n!==n)return;t.push(String(n))}else if(a==="object"){let i=Object.keys(n);for(let s=0,l=i.length;s<l;s++){let c=i[s];n[c]&&t.push(c)}}};for(let n=0,a=e.length;n<a;n++){let i=e[n];i!=null&&r(i)}return t.length>0?Ge(t.join(" ")):void 0},jt=e=>e===!1?"false":e===!0?"true":e===0?"0":e,G=e=>{if(!e||typeof e!="object")return!0;for(let t in e)return!1;return!0},ln=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a++){let i=r[a];if(!n.includes(i)||e[i]!==t[i])return!1}return!0},Dt=(e,t)=>{for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];r in e?e[r]=Ce(e[r],n):e[r]=n}return e},It=(e,t)=>{for(let r=0;r<e.length;r++){let n=e[r];Array.isArray(n)?It(n,t):n&&t.push(n)}},Pt=(...e)=>{let t=[];It(e,t);let r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},We=(e,t)=>{let r={};for(let n in e){let a=e[n];if(n in t){let i=t[n];Array.isArray(a)||Array.isArray(i)?r[n]=Pt(i,a):typeof a=="object"&&typeof i=="object"&&a&&i?r[n]=We(a,i):r[n]=i+" "+a}else r[n]=a}for(let n in t)n in e||(r[n]=t[n]);return r},cn={twMerge:!0,twMergeConfig:{},responsiveVariants:!1};function un(){let e=null,t={},r=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(n){e=n},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(n){t=n},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(n){r=n},reset(){e=null,t={},r=!1}}}var Ue=un(),dn=e=>{let t=(r,n)=>{let{extend:a=null,slots:i={},variants:s={},compoundVariants:l=[],compoundSlots:c=[],defaultVariants:d={}}=r,f={...cn,...n},g=a?.base?Ce(a.base,r?.base):r?.base,x=a?.variants&&!G(a.variants)?We(s,a.variants):s,E=a?.defaultVariants&&!G(a.defaultVariants)?{...a.defaultVariants,...d}:d;!G(f.twMergeConfig)&&!ln(f.twMergeConfig,Ue.cachedTwMergeConfig)&&(Ue.didTwMergeConfigChange=!0,Ue.cachedTwMergeConfig=f.twMergeConfig);let C=G(a?.slots),M=G(i)?{}:{base:Ce(r?.base,C&&a?.base),...i},h=C?M:Dt({...a?.slots},G(M)?{base:r?.base}:M),P=G(a?.compoundVariants)?l:Pt(a?.compoundVariants,l),j=W=>{if(G(x)&&G(i)&&C)return e(g,W?.class,W?.className)(f);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);let Y=(b,y,v=[],_)=>{let N=v;if(typeof y=="string"){let m=Ge(y).split(" ");for(let k=0;k<m.length;k++)N.push(`${b}:${m[k]}`)}else if(Array.isArray(y))for(let m=0;m<y.length;m++)N.push(`${b}:${y[m]}`);else if(typeof y=="object"&&typeof _=="string"&&_ in y){let m=y[_];if(m&&typeof m=="string"){let k=Ge(m).split(" "),V=[];for(let L=0;L<k.length;L++)V.push(`${b}:${k[L]}`);N[_]=N[_]?N[_].concat(V):V}else if(Array.isArray(m)&&m.length>0){let k=[];for(let V=0;V<m.length;V++)k.push(`${b}:${m[V]}`);N[_]=k}}return N},re=(b,y=x,v=null,_=null)=>{let N=y[b];if(!N||G(N))return null;let m=_?.[b]??W?.[b];if(m===null)return null;let k=jt(m),V=Array.isArray(f.responsiveVariants)&&f.responsiveVariants.length>0||f.responsiveVariants===!0,L=E?.[b],D=[];if(typeof k=="object"&&V)for(let[ae,Gt]of Object.entries(k)){let Bn=N[Gt];if(ae==="initial"){L=Gt;continue}Array.isArray(f.responsiveVariants)&&!f.responsiveVariants.includes(ae)||(D=Y(ae,Bn,D,v))}let ne=k!=null&&typeof k!="object"?k:jt(L),U=N[ne||"false"];return typeof D=="object"&&typeof v=="string"&&D[v]?Dt(D,U):D.length>0?(D.push(U),v==="base"?D.join(" "):D):U},oe=()=>{if(!x)return null;let b=Object.keys(x),y=[];for(let v=0;v<b.length;v++){let _=re(b[v],x);_&&y.push(_)}return y},Re=(b,y)=>{if(!x||typeof x!="object")return null;let v=[];for(let _ in x){let N=re(_,x,b,y),m=b==="base"&&typeof N=="string"?N:N&&N[b];m&&v.push(m)}return v},ge={};for(let b in W){let y=W[b];y!==void 0&&(ge[b]=y)}let Q=(b,y)=>{let v=typeof W?.[b]=="object"?{[b]:W[b]?.initial}:{};return{...E,...ge,...v,...y}},ve=(b=[],y)=>{let v=[],_=b.length;for(let N=0;N<_;N++){let{class:m,className:k,...V}=b[N],L=!0,D=Q(null,y);for(let ne in V){let U=V[ne],ae=D[ne];if(Array.isArray(U)){if(!U.includes(ae)){L=!1;break}}else{if((U==null||U===!1)&&(ae==null||ae===!1))continue;if(ae!==U){L=!1;break}}}L&&(m&&v.push(m),k&&v.push(k))}return v},Ye=b=>{let y=ve(P,b);if(!Array.isArray(y))return y;let v={},_=e;for(let N=0;N<y.length;N++){let m=y[N];if(typeof m=="string")v.base=_(v.base,m)(f);else if(typeof m=="object")for(let k in m)v[k]=_(v[k],m[k])(f)}return v},ke=b=>{if(c.length<1)return null;let y={},v=Q(null,b);for(let _=0;_<c.length;_++){let{slots:N=[],class:m,className:k,...V}=c[_];if(!G(V)){let L=!0;for(let D in V){let ne=v[D],U=V[D];if(ne===void 0||(Array.isArray(U)?!U.includes(ne):U!==ne)){L=!1;break}}if(!L)continue}for(let L=0;L<N.length;L++){let D=N[L];y[D]||(y[D]=[]),y[D].push([m,k])}}return y};if(!G(i)||!C){let b={};if(typeof h=="object"&&!G(h)){let y=e;for(let v in h)b[v]=_=>{let N=Ye(_),m=ke(_);return y(h[v],Re(v,_),N?N[v]:void 0,m?m[v]:void 0,_?.class,_?.className)(f)}}return b}return e(g,oe(),ve(P),W?.class,W?.className)(f)},A=()=>{if(!(!x||typeof x!="object"))return Object.keys(x)};return j.variantKeys=A(),j.extend=a,j.base=g,j.slots=h,j.variants=x,j.defaultVariants=E,j.compoundSlots=c,j.compoundVariants=P,j};return{tv:t,createTV:r=>(n,a)=>t(n,a?We(r,a):r)}},fn=(...e)=>t=>Ce(e)||void 0,{tv:Lt}=dn(fn);const pn=Lt({base:"flex items-center justify-center rounded-lg transition-colors cursor-pointer active:scale-95 transition-transform",variants:{$variant:{primary:"bg-blue-500 font-semibold text-sm text-white hover:bg-blue-600",secondary:"border border-gray-300 text-gray-500 hover:bg-gray-200",tertiary:"text-gray-500 hover:text-gray-700 hover:bg-gray-200"},$size:{sm:"h-6",md:"h-8",lg:"h-11"},$aspect:{square:"aspect-square",auto:""}},defaultVariants:{$size:"md",$variant:"primary",$aspect:"auto"}}),he=({href:e,onClick:t,children:r,className:n,$variant:a,$size:i,$aspect:s,...l})=>p.createElement(e?"a":"button",{href:e??void 0,onClick:t,className:se(pn({$variant:a,$size:i,$aspect:s}),n),...l},r),hn=({isApple:e})=>o.jsxs("div",{className:"flex h-full w-full justify-between",children:[o.jsx("div",{className:"grow py-1 pl-1",children:o.jsx("div",{className:"h-full rounded-sm border border-gray-300 bg-gray-400"})}),o.jsx("div",{className:"flex h-full w-3 flex-col items-center justify-center gap-0.5 pr-0.5",children:Array.from({length:e?1:3}).map((t,r)=>o.jsx("div",{className:"h-1.5 w-1.5 rounded-full border border-gray-500"},"dot-t-"+r))})]}),gn=({isApple:e})=>o.jsxs("div",{className:"flex h-full w-full flex-col justify-between",children:[o.jsx("div",{className:"grow px-1 pt-1",children:o.jsx("div",{className:"h-full rounded-sm border border-gray-200 bg-gray-300"})}),o.jsx("div",{className:"flex h-3 w-full items-center justify-center gap-0.5 pb-0.5",children:Array.from({length:e?1:3}).map((t,r)=>o.jsx("div",{className:"h-1.5 w-1.5 rounded-full border border-gray-400"},"dot-p-"+r))})]}),vn=()=>o.jsxs("div",{className:"-space-x-4 flex items-end",children:[o.jsx("div",{className:"h-38 w-48 overflow-hidden rounded-lg bg-gray-300",children:o.jsx(hn,{isApple:!0})}),o.jsx("div",{className:"h-18 w-12 overflow-hidden rounded-lg bg-gray-200",children:o.jsx(gn,{isApple:!0})})]}),yn=({onSettings:e})=>{const{start:t}=Ur();return o.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[o.jsx(vn,{}),o.jsx("div",{className:"text-center",children:o.jsx("p",{className:"text-gray-500 text-sm",children:"Click the button below to start a connection"})}),o.jsxs("div",{className:"flex items-center",children:[o.jsx(he,{type:"button",onClick:t,className:"z-10 px-6 py-3",$variant:"primary",$size:"lg",children:"Generate QR"}),o.jsx(he,{type:"button","aria-label":"Connection settings","aria-pressed":!1,onClick:e,className:"-ml-1 rounded-l-none px-3",$aspect:"square",$size:"lg",$variant:"secondary",children:o.jsx(on,{className:"h-5 w-5 text-gray-500"})})]})]})},wn=async e=>{if(!e)return!1;try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return document.body.removeChild(t),r}catch{return!1}},Mt=(e,{duration:t=200}={})=>{const[r,n]=u.useState(e),[a,i]=u.useState(null),s=u.useRef(),l=u.useRef(e);return u.useEffect(()=>{if(!Object.is(e,l.current))return s.current&&window.clearTimeout(s.current),i(l.current),n(e),l.current=e,s.current=window.setTimeout(()=>{i(null),s.current=void 0},t),()=>{s.current&&window.clearTimeout(s.current)}},[e,t]),{current:r,previous:a,isTransitioning:a!==null}},Vt="data:image/webp;base64,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",bn=()=>{const{status:e}=pe(),{status:t}=le(),r=K(t).with(J.STANDBY,()=>{}).with(nt.union(J.CREATING,J.CONNECTING,J.CONNECTED,J.ERROR),()=>K({status:e?.status}).with({status:te.CREATED},()=>{}).with({status:te.CONNECTED},()=>({icon:"✅",text:"Connected Successfully!"})).with({status:te.SIGNALING},()=>K({status:e?.signaling?.state}).with({status:H.STANDBY},()=>({icon:"🫥",text:"Connecting"})).with({status:H.CONNECTING},()=>({icon:"↗️",text:"Connecting"})).with({status:H.READY},()=>({icon:"👋",text:"Ready"})).with({status:H.HANDSHAKE},()=>({icon:"🤝",text:"Handshake Closed"})).with({status:H.HANDSHAKE_PARTIAL},()=>({icon:"🤝",text:"Handshake Partial"})).with({status:H.ENCRYPTED},()=>({icon:"🔒",text:"Encrypted"})).with({status:H.ERROR},()=>({icon:"❌",text:"Signal Error"})).otherwise(()=>({icon:"❓",text:"Unknown "+e?.signaling?.state}))).otherwise(n=>({icon:"❓",text:"Unknown "+JSON.stringify(n)}))).otherwise(()=>({icon:"❓",text:"Unknown provider status "+JSON.stringify(t)}));return r?o.jsxs("div",{className:"group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-neutral-200",children:[o.jsx("div",{className:"text-gray-900 text-xs opacity-0 transition-opacity duration-300 group-hover:opacity-100",children:r.text}),o.jsx("div",{children:r.icon})]}):o.jsx(o.Fragment,{})},mn=()=>o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-11 w-full"}),o.jsxs("div",{className:"absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 px-3 py-2 text-gray-500",children:[o.jsxs("a",{href:"https://github.com/v3xlabs/open-lavatory",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 p-1 font-semibold text-gray-500 text-sm",children:[o.jsx("img",{src:Vt,alt:"Open Lavatory Logo",width:20,height:20,className:"rounded"}),o.jsx("span",{children:"openlv"})]}),o.jsx("div",{className:"text-gray-500 text-sm",children:o.jsx(bn,{})})]})]});function xn(e){return Ne({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m15 18-6-6 6-6"},child:[]}]})(e)}function zt(e){return Ne({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"path",attr:{d:"M12 17h.01"},child:[]}]})(e)}function _n(e){return Ne({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6 6 18"},child:[]},{tag:"path",attr:{d:"m6 6 12 12"},child:[]}]})(e)}const Nn=({title:e,view:t,onClose:r,onBack:n})=>o.jsxs("div",{className:"flex items-center justify-between px-2 py-2",children:[n?o.jsx(he,{onClick:n,"aria-label":t==="settings"?"Back to QR":"Close modal",$variant:"tertiary",$aspect:"square",$size:"md",children:o.jsx(xn,{className:"h-6 w-6 text-gray-500"})}):o.jsx(he,{type:"button",href:"https://openlv.sh",target:"_blank",$variant:"tertiary",$aspect:"square",$size:"md",children:o.jsx(zt,{className:"h-5 w-5"})}),o.jsx("h2",{className:"flex items-center justify-center gap-2 font-semibold text-gray-900 text-lg",children:e}),o.jsx(he,{type:"button","aria-label":"close","aria-pressed":!1,onClick:r,$variant:"tertiary",$aspect:"square",$size:"md",children:o.jsx(_n,{className:"h-6 w-6 text-gray-500"})})]}),Cn=Lt({slots:{root:"group relative",box:"cursor-pointer rounded-md transition-colors hover:bg-neutral-200 flex items-center justify-center",popover:"-translate-x-1/2 absolute top-full left-1/2 z-10 hidden rounded-md bg-neutral-100 p-2 shadow-sm group-hover:block",icon:""},variants:{size:{sm:{box:"h-5 w-5 p-1",icon:"h-3 w-3"},md:{box:"h-6 w-6 p-1",icon:"h-4 w-4"},lg:{box:"h-8 w-8 p-1.5",icon:"h-4 w-4"}},variant:{icon:"",text:""}},defaultVariants:{size:"lg"}}),Ke=({variant:e="icon",children:t,size:r="lg"})=>{const{root:n,box:a,popover:i,icon:s}=Cn({size:r,variant:e});return o.jsxs("div",{className:n(),children:[o.jsx("div",{className:a(),children:K(e).with("icon",()=>o.jsx(zt,{className:s()})).with("text",()=>o.jsx("div",{children:"Text"})).exhaustive()}),o.jsx("div",{className:i(),children:t})]})},Je=({title:e,right:t,children:r})=>o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-end justify-between px-2 py-1",children:[o.jsx("div",{className:"font-medium text-gray-900 text-sm",children:e}),o.jsx("div",{children:t})]}),o.jsx("div",{className:"flex flex-col gap-1 rounded-md bg-[#F4F5F6] p-2",children:r})]}),Se=({label:e,children:t})=>o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[o.jsx("div",{className:"pl-1 text-sm",children:e}),o.jsx("div",{children:t})]}),Xe=({options:e,value:t,onChange:r})=>o.jsx("div",{className:"flex divide-x rounded-md border border-gray-300",children:e.map(([n,a])=>o.jsx("button",{type:"button",onClick:()=>r(n),"aria-pressed":n===t,className:se("px-4 py-2 font-semibold text-xs transition first:rounded-l-md last:rounded-r-md",n===t?"border-blue-500 bg-blue-50 text-blue-600":"cursor-pointer border-gray-300 text-gray-600 hover:border-gray-400"),children:a},n))}),Sn=({label:e,value:t,onChange:r})=>o.jsx(Xe,{options:[["true","Yes"],["false","No"]],value:t?"true":"false",onChange:n=>r(n==="true")}),An=()=>{const{settings:e,updateRetainHistory:t,updateAutoReconnect:r}=Be();return o.jsx(Je,{title:"Connection preferences",right:o.jsx(Ke,{variant:"icon",children:"Something something very cool"}),children:[["Retain session history","retainHistory",e?.retainHistory??!1,t],["Auto reconnect","autoReconnect",e?.autoReconnect??!1,r]].map(([n,a,i,s])=>o.jsx(Se,{label:n,children:o.jsx(Sn,{label:n,value:i,onChange:s})},a))})},kn="h-9 w-full rounded-lg border border-gray-300 bg-white px-3 text-sm text-gray-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",En=({id:e,value:t,placeholder:r,ariaLabel:n,readOnly:a=!0,onChange:i})=>o.jsx("input",{id:e,className:kn,value:t,placeholder:r,"aria-label":n,readOnly:a,onChange:s=>{s.target instanceof HTMLInputElement&&i?.(s.target.value)}}),On=["MQTT","NTFY","GUN"],Tn=()=>{const{settings:e,updateSignalingProtocol:t,updateSignalingServer:r}=Be();return o.jsx("div",{children:o.jsxs(Je,{title:"Signaling",right:o.jsx(Ke,{variant:"icon",children:"Something something very cool"}),children:[o.jsx(Se,{label:"Protocol",children:o.jsx(Xe,{options:On.map(n=>[n.toLowerCase(),n]),value:e?.signaling.p||"",onChange:t})}),o.jsx(Se,{label:"Server",children:o.jsx(En,{id:"server",value:e?.signaling.s[e?.signaling.p||""]||"",onChange:n=>r(n),placeholder:"Server URL",ariaLabel:"Server URL",readOnly:!1})})]})})},jn=["WebRTC"],Dn=()=>{const[e,t]=u.useState("WebRTC");return o.jsx(Je,{title:"Transport",right:o.jsx(Ke,{variant:"icon",children:"Something something very cool"}),children:o.jsx(Se,{label:"Protocol",children:o.jsx(Xe,{options:jn.map(r=>[r,r]),value:e,onChange:r=>t(r)})})})},In=()=>o.jsxs("div",{className:"px-4 pb-2",children:[o.jsx(Tn,{}),o.jsx(Dn,{}),o.jsx(An,{})]}),Pn=()=>{const[e,t]=u.useState("start"),[r,n]=u.useState(!1);return u.useEffect(()=>{if(!r)return;const a=window.setTimeout(()=>n(!1),2e3);return()=>window.clearTimeout(a)},[r]),{view:e,setView:t,copied:r,setCopied:n}},Ln=e=>{u.useEffect(()=>{const t=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e])},Mn=()=>{const e=u.useRef(null),[t,r]=u.useState(0),n=u.useRef(!1),a=u.useCallback((i,s=!1)=>{const l=i||e.current;if(!l)return;const c=s?l.scrollHeight:l.getBoundingClientRect().height;c>0&&(r(d=>typeof d=="number"&&Math.abs(d-c)<.5?d:c),n.current=!0)},[]);return u.useLayoutEffect(()=>{const i=e.current;if(!i||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>{a()});return s.observe(i),()=>s.disconnect()},[a]),u.useEffect(()=>{if(typeof window>"u")return;const i=()=>{a()};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[a]),{contentRef:e,height:t,measureHeight:a,setHeight:r}},Ft=({onClose:e=()=>{},onCopy:t})=>{const{view:r,setView:n,copied:a,setCopied:i}=Pn(),{uri:s}=pe(),{status:l,provider:c}=le(),{contentRef:d,height:f,measureHeight:g}=Mn(),{current:x,previous:E,isTransitioning:C}=Mt(r),{current:M,previous:h,isTransitioning:P}=Mt(l),j=u.useCallback(()=>n("settings"),[n]),A=K(r).with("start",()=>"Connect Wallet").with("settings",()=>"Settings").exhaustive();Ln(e);const W=u.useCallback(async()=>{s&&await wn(s)&&i(!0)},[s,i]),Y=u.useRef(!0),re=u.useRef(),oe=u.useRef(void 0),[Re,ge]=u.useState(!1),Q=u.useRef();u.useLayoutEffect(()=>{if(d.current)return Y.current?(re.current&&window.clearTimeout(re.current),re.current=window.setTimeout(()=>{d.current&&(g(void 0,!0),Y.current=!1)},0)):g(),()=>{re.current&&window.clearTimeout(re.current)}},[g,M,x]),u.useEffect(()=>(oe.current!==void 0&&f!==oe.current&&f>0&&oe.current>0&&Math.abs(f-oe.current)>.5&&(ge(!0),Q.current&&window.clearTimeout(Q.current),Q.current=window.setTimeout(()=>{ge(!1),Q.current=void 0},200)),oe.current=f,()=>{Q.current&&window.clearTimeout(Q.current)}),[f]);const ve=()=>{c?.closeSession()},Ye=K({view:r,status:l}).with({view:"start",status:J.STANDBY},()=>{}).with({view:"start"},()=>ve).with({view:"settings"},()=>()=>n("start")).otherwise(()=>()=>{ve(),e()}),ke=v=>K(v).with("start",()=>o.jsx(yn,{onSettings:j})).with("settings",()=>o.jsx(In,{})).otherwise(()=>o.jsx(He,{state:v})),b=()=>o.jsxs("div",{className:"modal-transition__container",children:[E&&o.jsx("div",{className:"modal-transition__layer modal-transition__layer--outgoing",children:ke(E)}),o.jsx("div",{className:se("modal-transition__layer",C&&"modal-transition__layer--incoming"),children:ke(x)})]}),y=v=>K(v).with(J.STANDBY,()=>b()).with(nt.union(J.CREATING,J.CONNECTING,J.CONNECTED),()=>o.jsx(Zr,{onClose:e,onCopy:t||W})).otherwise(_=>o.jsx(He,{state:_||"unknown status"}));return Fe("view",r),o.jsx("div",{className:"fixed inset-0 z-[10000] flex animate-[bg-in_0.15s_ease-in-out] items-end justify-center bg-black/30 font-sans text-slate-800 backdrop-blur-sm md:items-center lg:p-4",onClick:e,role:"presentation","data-openlv-modal-root":!0,children:o.jsxs("div",{className:se("relative w-full max-w-[400px] animate-[fade-in_0.15s_ease-in-out] rounded-t-radius bg-body-background transition-[height] duration-[200ms] ease-out md:rounded-b-radius",Re||h?"overflow-hidden":void 0),role:"dialog","aria-modal":"true","aria-label":A,onClick:v=>v.stopPropagation(),style:typeof f=="number"&&f>0?{height:`${f}px`}:void 0,children:[o.jsxs("div",{ref:d,children:[o.jsx(Nn,{title:A,view:r,onClose:e,onBack:Ye}),o.jsxs("div",{className:"modal-transition__container",children:[h&&o.jsx("div",{className:"modal-transition__layer modal-transition__layer--outgoing absolute",children:o.jsx("div",{className:"flex flex-col text-center",children:y(h)})}),o.jsx("div",{className:se("modal-transition__layer",P&&"modal-transition__layer--incoming"),children:o.jsx("div",{className:"flex flex-col text-center",children:y(M)})})]}),o.jsx(mn,{})]}),o.jsx("div",{className:se("absolute top-5 right-5 rounded-lg bg-blue-500 px-4 py-3 font-medium text-sm text-white transition-all",a?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:"📋 Connection URL copied to clipboard!"})]})})},Bt='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-slate-800:oklch(27.9% .041 260.031);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-body-background:var(--lv-body-background);--radius-radius:var(--lv-border-radius)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-5{top:calc(var(--spacing)*5)}.top-full{top:100%}.right-5{right:calc(var(--spacing)*5)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[10000\\]{z-index:10000}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-11{height:calc(var(--spacing)*11)}.h-18{height:calc(var(--spacing)*18)}.h-38{height:calc(var(--spacing)*38)}.h-\\[200px\\]{height:200px}.h-full{height:100%}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-12{width:calc(var(--spacing)*12)}.w-48{width:calc(var(--spacing)*48)}.w-\\[200px\\]{width:200px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[400px\\]{max-width:400px}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-\\[bg-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out bg-in}.animate-\\[fade-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out fade-in}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.-space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*-4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*-4)*calc(1 - var(--tw-space-x-reverse)))}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-radius{border-top-left-radius:var(--radius-radius);border-top-right-radius:var(--radius-radius)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-neutral-200{border-color:var(--color-neutral-200)}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#F4F5F6\\]{background-color:#f4f5f6}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-body-background{background-color:var(--color-body-background)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-neutral-100{background-color:var(--color-neutral-100)}.bg-white{background-color:var(--color-white)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pr-0\\.5{padding-right:calc(var(--spacing)*.5)}.pr-3{padding-right:calc(var(--spacing)*3)}.pb-0\\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-blue-600{color:var(--color-blue-600)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-slate-800{color:var(--color-slate-800)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow,.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-\\[200ms\\]{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media (hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\\:rounded-l-md:first-child{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.last\\:rounded-r-md:last-child{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}@media (hover:hover){.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}}.focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}@media (min-width:48rem){.md\\:items-center{align-items:center}.md\\:rounded-b-radius{border-bottom-right-radius:var(--radius-radius);border-bottom-left-radius:var(--radius-radius)}}@media (min-width:64rem){.lg\\:p-4{padding:calc(var(--spacing)*4)}}}@keyframes fade-in{0%{transform:translateY(-2px)scale(.95)}to{transform:translateY(0)scale(1)}}@keyframes bg-in{0%{opacity:0;-webkit-backdrop-filter:blur();backdrop-filter:blur()}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.modal-transition__container{display:grid;position:relative}.modal-transition__layer{will-change:transform,opacity;grid-area:1/1;width:100%}.modal-transition__layer--outgoing{z-index:2;animation:.2s ease-out forwards modal-transition-out;position:absolute}.modal-transition__layer--incoming{animation:.2s ease-out forwards modal-transition-in}@keyframes modal-transition-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes modal-transition-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.05)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}',Vn=async(e,t)=>{if(e){if(e.querySelector("style[data-openlv-modal]"))return;const n=document.createElement("style");if(n.setAttribute("data-openlv-modal","true"),t){const a=Ct(t),i=`:root, :host {${Object.entries(a).map(([s,l])=>`${s}: ${l};`).join(`
|
|
6
|
-
`)}}`;n.textContent=`${i}
|
|
7
|
-
${Bt}`}else n.textContent=Bt;e.appendChild(n)}};class Ae extends HTMLElement{constructor(r,n=ze){super();ce(this,"onClose");ce(this,"provider");ce(this,"theme");ce(this,"shadow");ce(this,"renderRequested",!1);this.provider=r,this.theme=n,this.shadow=this.attachShadow({mode:"open"}),Vn(this.shadow,this.theme)}connectedCallback(){this.requestRender()}disconnectedCallback(){p.render(null,this.shadow)}showModal(){this.style.display="block"}hideModal(){this.style.display="none"}requestRender(){this.renderRequested||(this.renderRequested=!0,queueMicrotask(()=>{this.renderRequested=!1,this.performRender()}))}performRender(){p.render(p.h(Gr,{onClose:this.onClose??(()=>this.remove()),provider:this.provider}),this.shadow)}}const zn=(e="idle")=>{const[t,r]=u.useState({state:e}),n=u.useCallback((s,l)=>{r(c=>({...c,state:s,...l}))},[]),a=u.useCallback(s=>{r(s)},[]),i=u.useCallback(()=>{r({state:"idle"})},[]);return{connectionInfo:t,updateState:n,updateConnectionInfo:a,reset:i}},Ht=(e="openlv-modal")=>{if(typeof window>"u")return e;const t=window.customElements;return t?(t.get(e)||t.define(e,Ae),e):(console.warn("OpenLV modal: custom elements are not supported in this environment."),e)},Fn=e=>{const t=document.querySelector("openlv-modal");if(t&&t.remove(),!t){Ht();const r=new Ae(e);document.body.appendChild(r),r.showModal(),r.onClose=()=>{Fe("modal closed"),r.remove()}}};return z.ModalRoot=Ft,z.OPENLV_ICON_128=Vt,z.OpenLVModalElement=Ae,z.default=Ae,z.registerOpenLVModal=Ht,z.triggerOpenModal=Fn,z.useConnectionState=zn,Object.defineProperties(z,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),z})({},jsxRuntime,hooks,preact,QRCode);
|
|
8
|
-
//# sourceMappingURL=index.iife.js.map
|