9remote 2.0.16 → 2.0.17
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/cli.cjs +1 -1
- package/dist/install.cjs +1 -1
- package/dist/ptyDaemon.cjs +1 -1
- package/dist/server.cjs +49 -1
- package/dist/ui/assets/{index-BMHG73CL.css → index-D646KQwB.css} +1 -1
- package/dist/ui/assets/index-K-xvZBoY.js +8 -0
- package/dist/ui/index.html +2 -2
- package/package.json +2 -1
- package/dist/ui/assets/index-ByOFWOXH.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";@import"https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap";@import"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%;overflow:hidden}body{font-family:Inter,sans-serif;background-color:var(--bg-main);color:var(--text-main);-webkit-font-smoothing:antialiased;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color .3s ease,color .3s ease}input,textarea{accent-color:var(--brand-500)}button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.dot-grid-bg{background:var(--bg-main);transition:background-color .3s ease}.dark-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-brand);transition:background-color .3s ease,border-color .3s ease}.glass-card{background:var(--glass-bg);border:1px solid var(--glass-border);border-radius:var(--radius-brand);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:all .3s ease}.glass-btn{background:var(--glass-bg);border:1px solid var(--glass-border);border-radius:8px;transition:all .2s ease}.glass-btn:hover{background:var(--glass-hover);border-color:var(--border)}.btn-primary{background:var(--brand-500);border-radius:var(--radius-brand);color:#fff;font-weight:600;transition:all .2s ease;box-shadow:0 4px 16px #ff570a33}.btn-primary:hover{background:var(--brand-600);transform:scale(1.02)}.btn-primary:disabled{background:#ff570a4d;cursor:not-allowed;transform:none;box-shadow:none}.btn-danger{background:#dc35451f;border:1px solid rgba(220,53,69,.25);border-radius:var(--radius-brand);color:#ff6b7a;font-weight:600;transition:all .2s ease}.btn-danger:hover{background:#dc354538;border-color:#dc354566}.brand-text{font-family:"Press Start 2P",monospace;color:var(--brand-500);letter-spacing:.05em}.material-symbols-outlined{font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 24}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.top-0\.5{top:.125rem}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mt-0\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-11{width:2.75rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-\[220px\]{max-width:220px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-6xl{font-size:3.75rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-tight{line-height:1.25}.tracking-\[0\.18em\]{letter-spacing:.18em}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.blur{--tw-blur: blur(8px);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)}.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)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{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-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--brand-500: #FF570A;--brand-600: #e04400;--brand-400: #ff6e33;--radius-brand: 12px;--radius-brand-lg: 16px}:root[data-theme=light]{--bg-body: #EBE9E6;--bg-main: #FBF9F6;--bg-alt: #F5F1ED;--surface: #FFFFFF;--sidebar: rgba(246, 246, 246, .8);--border: rgba(0, 0, 0, .1);--text-main: #383733;--text-muted: #75736E;--glass-bg: rgba(255, 255, 255, .6);--glass-border: rgba(0, 0, 0, .08);--glass-hover: rgba(255, 255, 255, .8);--header-shadow: 0 1px 3px rgba(0, 0, 0, .06)}:root[data-theme=dark]{--bg-body: #292928;--bg-main: #191918;--bg-alt: #1F1F1E;--surface: #242423;--sidebar: rgba(30, 30, 30, .8);--border: rgba(255, 255, 255, .1);--text-main: #ECEBE8;--text-muted: #9E9D99;--glass-bg: rgba(36, 36, 35, .6);--glass-border: rgba(255, 255, 255, .1);--glass-hover: rgba(36, 36, 35, .8);--header-shadow: 0 1px 3px rgba(0, 0, 0, .3)}@keyframes pulse-ring{0%{transform:scale(.8);opacity:1}to{transform:scale(1.6);opacity:0}}.pulse-ring{animation:pulse-ring 1.4s ease-out infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation:spin 1s linear infinite}@keyframes dot-bounce{0%,80%,to{transform:scale(.6);opacity:.4}40%{transform:scale(1);opacity:1}}.dot-bounce{animation:dot-bounce 1s ease-in-out infinite}.last\:border-0:last-child{border-width:0px}.hover\:underline:hover{text-decoration-line:underline}@media(min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:max-w-5xl{max-width:64rem}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";@import"https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap";@import"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%;overflow:hidden}body{font-family:Inter,sans-serif;background-color:var(--bg-main);color:var(--text-main);-webkit-font-smoothing:antialiased;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color .3s ease,color .3s ease}input,textarea{accent-color:var(--brand-500)}button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.dot-grid-bg{background:var(--bg-main);transition:background-color .3s ease}.dark-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-brand);transition:background-color .3s ease,border-color .3s ease}.glass-card{background:var(--glass-bg);border:1px solid var(--glass-border);border-radius:var(--radius-brand);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:all .3s ease}.glass-btn{background:var(--glass-bg);border:1px solid var(--glass-border);border-radius:8px;transition:all .2s ease}.glass-btn:hover{background:var(--glass-hover);border-color:var(--border)}.btn-primary{background:var(--brand-500);border-radius:var(--radius-brand);color:#fff;font-weight:600;transition:all .2s ease;box-shadow:0 4px 16px #ff570a33}.btn-primary:hover{background:var(--brand-600);transform:scale(1.02)}.btn-primary:disabled{background:#ff570a4d;cursor:not-allowed;transform:none;box-shadow:none}.btn-danger{background:#dc35451f;border:1px solid rgba(220,53,69,.25);border-radius:var(--radius-brand);color:#ff6b7a;font-weight:600;transition:all .2s ease}.btn-danger:hover{background:#dc354538;border-color:#dc354566}.brand-text{font-family:"Press Start 2P",monospace;color:var(--brand-500);letter-spacing:.05em}.material-symbols-outlined{font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 24}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.top-0\.5{top:.125rem}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mt-0\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-11{width:2.75rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-\[220px\]{max-width:220px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pl-12{padding-left:3rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-6xl{font-size:3.75rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-tight{line-height:1.25}.tracking-\[0\.18em\]{letter-spacing:.18em}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.blur{--tw-blur: blur(8px);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)}.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)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{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-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--brand-500: #FF570A;--brand-600: #e04400;--brand-400: #ff6e33;--radius-brand: 12px;--radius-brand-lg: 16px}:root[data-theme=light]{--bg-body: #EBE9E6;--bg-main: #FBF9F6;--bg-alt: #F5F1ED;--surface: #FFFFFF;--sidebar: rgba(246, 246, 246, .8);--border: rgba(0, 0, 0, .1);--text-main: #383733;--text-muted: #75736E;--glass-bg: rgba(255, 255, 255, .6);--glass-border: rgba(0, 0, 0, .08);--glass-hover: rgba(255, 255, 255, .8);--header-shadow: 0 1px 3px rgba(0, 0, 0, .06)}:root[data-theme=dark]{--bg-body: #292928;--bg-main: #191918;--bg-alt: #1F1F1E;--surface: #242423;--sidebar: rgba(30, 30, 30, .8);--border: rgba(255, 255, 255, .1);--text-main: #ECEBE8;--text-muted: #9E9D99;--glass-bg: rgba(36, 36, 35, .6);--glass-border: rgba(255, 255, 255, .1);--glass-hover: rgba(36, 36, 35, .8);--header-shadow: 0 1px 3px rgba(0, 0, 0, .3)}@keyframes pulse-ring{0%{transform:scale(.8);opacity:1}to{transform:scale(1.6);opacity:0}}.pulse-ring{animation:pulse-ring 1.4s ease-out infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation:spin 1s linear infinite}@keyframes dot-bounce{0%,80%,to{transform:scale(.6);opacity:.4}40%{transform:scale(1);opacity:1}}.dot-bounce{animation:dot-bounce 1s ease-in-out infinite}.last\:border-0:last-child{border-width:0px}.hover\:underline:hover{text-decoration-line:underline}@media(min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:max-w-5xl{max-width:64rem}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function r(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(n){if(n.ep)return;n.ep=!0;const o=r(n);fetch(n.href,o)}})();var Pe,D,fn,ne,bt,hn,mn,Me,Ne,_e,pn,ft,lt,st,Ee={},Te=[],In=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Re=Array.isArray;function Z(e,t){for(var r in t)e[r]=t[r];return e}function ht(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Pn(e,t,r){var i,n,o,l={};for(o in t)o=="key"?i=t[o]:o=="ref"?n=t[o]:l[o]=t[o];if(arguments.length>2&&(l.children=arguments.length>3?Pe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)l[o]===void 0&&(l[o]=e.defaultProps[o]);return Ce(e,l,i,n,null)}function Ce(e,t,r,i,n){var o={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++fn,__i:-1,__u:0};return n==null&&D.vnode!=null&&D.vnode(o),o}function re(e){return e.children}function ke(e,t){this.props=e,this.context=t}function de(e,t){if(t==null)return e.__?de(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?de(e):null}function Rn(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,i=[],n=[],o=Z({},t);o.__v=t.__v+1,D.vnode&&D.vnode(o),mt(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,i,r??de(t),!!(32&t.__u),n),o.__v=t.__v,o.__.__k[o.__i]=o,vn(i,o,n),t.__e=t.__=null,o.__e!=r&&_n(o)}}function _n(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),_n(e)}function xt(e){(!e.__d&&(e.__d=!0)&&ne.push(e)&&!Ae.__r++||bt!=D.debounceRendering)&&((bt=D.debounceRendering)||hn)(Ae)}function Ae(){try{for(var e,t=1;ne.length;)ne.length>t&&ne.sort(mn),e=ne.shift(),t=ne.length,Rn(e)}finally{ne.length=Ae.__r=0}}function gn(e,t,r,i,n,o,l,s,c,d,m){var u,f,h,v,k,R,_,y=i&&i.__k||Te,w=t.length;for(c=Bn(r,t,y,c,w),u=0;u<w;u++)(h=r.__k[u])!=null&&(f=h.__i!=-1&&y[h.__i]||Ee,h.__i=u,R=mt(e,h,f,n,o,l,s,c,d,m),v=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&pt(f.ref,null,h),m.push(h.ref,h.__c||v,h)),k==null&&v!=null&&(k=v),(_=!!(4&h.__u))||f.__k===h.__k?(c=yn(h,c,e,_),_&&f.__e&&(f.__e=null)):typeof h.type=="function"&&R!==void 0?c=R:v&&(c=v.nextSibling),h.__u&=-7);return r.__e=k,c}function Bn(e,t,r,i,n){var o,l,s,c,d,m=r.length,u=m,f=0;for(e.__k=new Array(n),o=0;o<n;o++)(l=t[o])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[o]=Ce(null,l,null,null,null):Re(l)?l=e.__k[o]=Ce(re,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[o]=Ce(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[o]=l,c=o+f,l.__=e,l.__b=e.__b+1,s=null,(d=l.__i=Mn(l,r,c,u))!=-1&&(u--,(s=r[d])&&(s.__u|=2)),s==null||s.__v==null?(d==-1&&(n>m?f--:n<m&&f++),typeof l.type!="function"&&(l.__u|=4)):d!=c&&(d==c-1?f--:d==c+1?f++:(d>c?f--:f++,l.__u|=4))):e.__k[o]=null;if(u)for(o=0;o<m;o++)(s=r[o])!=null&&(2&s.__u)==0&&(s.__e==i&&(i=de(s)),xn(s,s));return i}function yn(e,t,r,i){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=yn(n[o],t,r,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=de(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Mn(e,t,r,i){var n,o,l,s=e.key,c=e.type,d=t[r],m=d!=null&&(2&d.__u)==0;if(d===null&&s==null||m&&s==d.key&&c==d.type)return r;if(i>(m?1:0)){for(n=r-1,o=r+1;n>=0||o<t.length;)if((d=t[l=n>=0?n--:o++])!=null&&(2&d.__u)==0&&s==d.key&&c==d.type)return l}return-1}function wt(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||In.test(t)?r:r+"px"}function ve(e,t,r,i,n){var o,l;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||wt(e.style,t,"");if(r)for(t in r)i&&r[t]==i[t]||wt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(pn,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?i?r[_e]=i[_e]:(r[_e]=ft,e.addEventListener(t,o?st:lt,o)):e.removeEventListener(t,o?st:lt,o);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Nt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Ne]==null)t[Ne]=ft++;else if(t[Ne]<r[_e])return;return r(D.event?D.event(t):t)}}}function mt(e,t,r,i,n,o,l,s,c,d){var m,u,f,h,v,k,R,_,y,w,N,M,b,x,C,g=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),o=[s=t.__e=r.__e]),(m=D.__b)&&m(t);e:if(typeof g=="function")try{if(_=t.props,y=g.prototype&&g.prototype.render,w=(m=g.contextType)&&i[m.__c],N=m?w?w.props.value:m.__:i,r.__c?R=(u=t.__c=r.__c).__=u.__E:(y?t.__c=u=new g(_,N):(t.__c=u=new ke(_,N),u.constructor=g,u.render=Ln),w&&w.sub(u),u.state||(u.state={}),u.__n=i,f=u.__d=!0,u.__h=[],u._sb=[]),y&&u.__s==null&&(u.__s=u.state),y&&g.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Z({},u.__s)),Z(u.__s,g.getDerivedStateFromProps(_,u.__s))),h=u.props,v=u.state,u.__v=t,f)y&&g.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),y&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(y&&g.getDerivedStateFromProps==null&&_!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(_,N),t.__v==r.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(_,u.__s,N)===!1){t.__v!=r.__v&&(u.props=_,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(E){E&&(E.__=t)}),Te.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&l.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(_,u.__s,N),y&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,v,k)})}if(u.context=N,u.props=_,u.__P=e,u.__e=!1,M=D.__r,b=0,y)u.state=u.__s,u.__d=!1,M&&M(t),m=u.render(u.props,u.state,u.context),Te.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,M&&M(t),m=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++b<25);u.state=u.__s,u.getChildContext!=null&&(i=Z(Z({},i),u.getChildContext())),y&&!f&&u.getSnapshotBeforeUpdate!=null&&(k=u.getSnapshotBeforeUpdate(h,v)),x=m!=null&&m.type===re&&m.key==null?bn(m.props.children):m,s=gn(e,Re(x)?x:[x],t,r,i,n,o,l,s,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&l.push(u),R&&(u.__E=u.__=null)}catch(E){if(t.__v=null,c||o!=null)if(E.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(C=o.length;C--;)ht(o[C]);at(t)}else t.__e=r.__e,t.__k=r.__k,E.then||at(t);D.__e(E,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=Dn(r.__e,t,r,i,n,o,l,c,d);return(m=D.diffed)&&m(t),128&t.__u?void 0:s}function at(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(at))}function vn(e,t,r){for(var i=0;i<r.length;i++)pt(r[i],r[++i],r[++i]);D.__c&&D.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(o){o.call(n)})}catch(o){D.__e(o,n.__v)}})}function bn(e){return typeof e!="object"||e==null||e.__b>0?e:Re(e)?e.map(bn):Z({},e)}function Dn(e,t,r,i,n,o,l,s,c){var d,m,u,f,h,v,k,R=r.props||Ee,_=t.props,y=t.type;if(y=="svg"?n="http://www.w3.org/2000/svg":y=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((h=o[d])&&"setAttribute"in h==!!y&&(y?h.localName==y:h.nodeType==3)){e=h,o[d]=null;break}}if(e==null){if(y==null)return document.createTextNode(_);e=document.createElementNS(n,y,_.is&&_),s&&(D.__m&&D.__m(t,o),s=!1),o=null}if(y==null)R===_||s&&e.data==_||(e.data=_);else{if(o=o&&Pe.call(e.childNodes),!s&&o!=null)for(R={},d=0;d<e.attributes.length;d++)R[(h=e.attributes[d]).name]=h.value;for(d in R)h=R[d],d=="dangerouslySetInnerHTML"?u=h:d=="children"||d in _||d=="value"&&"defaultValue"in _||d=="checked"&&"defaultChecked"in _||ve(e,d,null,h,n);for(d in _)h=_[d],d=="children"?f=h:d=="dangerouslySetInnerHTML"?m=h:d=="value"?v=h:d=="checked"?k=h:s&&typeof h!="function"||R[d]===h||ve(e,d,h,R[d],n);if(m)s||u&&(m.__html==u.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(u&&(e.innerHTML=""),gn(t.type=="template"?e.content:e,Re(f)?f:[f],t,r,i,y=="foreignObject"?"http://www.w3.org/1999/xhtml":n,o,l,o?o[0]:r.__k&&de(r,0),s,c),o!=null)for(d=o.length;d--;)ht(o[d]);s||(d="value",y=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[d]||y=="progress"&&!v||y=="option"&&v!=R[d])&&ve(e,d,v,R[d],n),d="checked",k!=null&&k!=e[d]&&ve(e,d,k,R[d],n))}return e}function pt(e,t,r){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(n){D.__e(n,r)}}function xn(e,t,r){var i,n;if(D.unmount&&D.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||pt(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){D.__e(o,t)}i.base=i.__P=null}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&xn(i[n],t,r||typeof e.type!="function");r||ht(e.__e),e.__c=e.__=e.__e=void 0}function Ln(e,t,r){return this.constructor(e,r)}function Un(e,t,r){var i,n,o,l;t==document&&(t=document.documentElement),D.__&&D.__(e,t),n=(i=!1)?null:t.__k,o=[],l=[],mt(t,e=t.__k=Pn(re,null,[e]),n||Ee,Ee,t.namespaceURI,n?null:t.firstChild?Pe.call(t.childNodes):null,o,n?n.__e:t.firstChild,i,l),vn(o,e,l)}Pe=Te.slice,D={__e:function(e,t,r,i){for(var n,o,l;t=t.__;)if((n=t.__c)&&!n.__)try{if((o=n.constructor)&&o.getDerivedStateFromError!=null&&(n.setState(o.getDerivedStateFromError(e)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,i||{}),l=n.__d),l)return n.__E=n}catch(s){e=s}throw e}},fn=0,ke.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Z({},this.state),typeof e=="function"&&(e=e(Z({},r),this.props)),e&&Z(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),xt(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xt(this))},ke.prototype.render=re,ne=[],hn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mn=function(e,t){return e.__v.__b-t.__v.__b},Ae.__r=0,Me=Math.random().toString(8),Ne="__d"+Me,_e="__a"+Me,pn=/(PointerCapture)$|Capture$/i,ft=0,lt=Nt(!1),st=Nt(!0);var qn=0;function a(e,t,r,i,n,o){t||(t={});var l,s,c=t;if("ref"in c)for(s in c={},t)s=="ref"?l=t[s]:c[s]=t[s];var d={type:e,props:c,key:r,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--qn,__i:-1,__u:0,__source:n,__self:o};if(typeof e=="function"&&(l=e.defaultProps))for(s in l)c[s]===void 0&&(c[s]=l[s]);return D.vnode&&D.vnode(d),d}var ye,q,De,Ct,Ie=0,wn=[],j=D,kt=j.__b,St=j.__r,Et=j.diffed,Tt=j.__c,At=j.unmount,It=j.__;function _t(e,t){j.__h&&j.__h(q,e,Ie||t),Ie=0;var r=q.__H||(q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function U(e){return Ie=1,jn(Cn,e)}function jn(e,t,r){var i=_t(ye++,2);if(i.t=e,!i.__c&&(i.__=[Cn(void 0,t),function(s){var c=i.__N?i.__N[0]:i.__[0],d=i.t(c,s);c!==d&&(i.__N=[d,i.__[1]],i.__c.setState({}))}],i.__c=q,!q.__f)){var n=function(s,c,d){if(!i.__c.__H)return!0;var m=i.__c.__H.__.filter(function(f){return f.__c});if(m.every(function(f){return!f.__N}))return!o||o.call(this,s,c,d);var u=i.__c.props!==s;return m.some(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(u=!0)}}),o&&o.call(this,s,c,d)||u};q.__f=!0;var o=q.shouldComponentUpdate,l=q.componentWillUpdate;q.componentWillUpdate=function(s,c,d){if(this.__e){var m=o;o=void 0,n(s,c,d),o=m}l&&l.call(this,s,c,d)},q.shouldComponentUpdate=n}return i.__N||i.__}function ue(e,t){var r=_t(ye++,3);!j.__s&&Nn(r.__H,t)&&(r.__=e,r.u=t,q.__H.__h.push(r))}function gt(e){return Ie=5,Fn(function(){return{current:e}},[])}function Fn(e,t){var r=_t(ye++,7);return Nn(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function On(){for(var e;e=wn.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Se),t.__h.some(ct),t.__h=[]}catch(r){t.__h=[],j.__e(r,e.__v)}}}j.__b=function(e){q=null,kt&&kt(e)},j.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),It&&It(e,t)},j.__r=function(e){St&&St(e),ye=0;var t=(q=e.__c).__H;t&&(De===q?(t.__h=[],q.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Se),t.__h.some(ct),t.__h=[],ye=0)),De=q},j.diffed=function(e){Et&&Et(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wn.push(t)!==1&&Ct===j.requestAnimationFrame||((Ct=j.requestAnimationFrame)||Hn)(On)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),De=q=null},j.__c=function(e,t){t.some(function(r){try{r.__h.some(Se),r.__h=r.__h.filter(function(i){return!i.__||ct(i)})}catch(i){t.some(function(n){n.__h&&(n.__h=[])}),t=[],j.__e(i,r.__v)}}),Tt&&Tt(e,t)},j.unmount=function(e){At&&At(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(i){try{Se(i)}catch(n){t=n}}),r.__H=void 0,t&&j.__e(t,r.__v))};var Pt=typeof requestAnimationFrame=="function";function Hn(e){var t,r=function(){clearTimeout(i),Pt&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,35);Pt&&(t=requestAnimationFrame(r))}function Se(e){var t=q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),q=t}function ct(e){var t=q;e.__c=e.__(),q=t}function Nn(e,t){return!e||e.length!==t.length||t.some(function(r,i){return r!==e[i]})}function Cn(e,t){return typeof t=="function"?t(e):t}const zn=[{icon:"download",label:"Preparing",desc:"Checking tunnel binary"},{icon:"cloud_sync",label:"Connecting",desc:"Creating session"},{icon:"lan",label:"Tunneling",desc:"Starting secure tunnel"},{icon:"verified",label:"Verifying",desc:"Health check"},{icon:"check_circle",label:"Ready",desc:"Connected"}],Kn=3;function Vn({currentStep:e,activeDesc:t="",healthCheck:r}){var o;const i=e-1,n=(o=r==null?void 0:r.logs)!=null&&o.length?r.logs[r.logs.length-1]:null;return a("div",{className:"glass-card p-5 flex flex-col gap-4",children:[a("span",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"Setting up connection"}),a("div",{className:"flex flex-col gap-3",children:zn.map((l,s)=>{const c=s<i,d=s===i,m=d&&s===Kn;let u=d&&t?t:l.desc,f="var(--text-muted)";if(m&&n){const h=/^\d{3}$/.test(String(n.status));u=`#${n.attempt} → ${n.status}`,f=n.ok||n.waiting?"#22c55e":h?"#eab308":"#ef4444"}return a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0",style:{background:c?"var(--brand-500)":d?"rgba(255,87,10,0.15)":"var(--glass-bg)",border:d?"1.5px solid var(--brand-500)":"1.5px solid transparent"},children:c?a("span",{className:"material-symbols-outlined text-white",style:{fontSize:16},children:"check"}):d?a("span",{className:"flex gap-0.5 items-center",children:[0,1,2].map(h=>a("span",{className:"w-1 h-1 rounded-full bg-orange-400 dot-bounce",style:{animationDelay:`${h*.18}s`}},h))}):a("span",{className:"material-symbols-outlined",style:{fontSize:16,color:"var(--text-muted)",opacity:.3},children:l.icon})}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-medium",style:{color:c?"var(--text-muted)":d?"var(--text-main)":"var(--text-muted)",opacity:c||d?1:.4},children:l.label}),a("p",{className:"text-xs mt-0.5 truncate",style:{color:f,opacity:d?m&&n?.95:.7:.4,fontFamily:m&&n?"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace":void 0},children:u})]}),c&&a("span",{className:"text-xs flex-shrink-0",style:{color:"var(--text-muted)"},children:"Done"}),d&&a("span",{className:"text-xs flex-shrink-0 px-2 py-0.5 rounded-full",style:{background:"rgba(255,87,10,0.15)",color:"var(--brand-400)"},children:"Running"})]},s)})})]})}function Jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce={},Le,Rt;function Yn(){return Rt||(Rt=1,Le=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Le}var Ue={},te={},Bt;function le(){if(Bt)return te;Bt=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return te.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},te.getSymbolTotalCodewords=function(i){return t[i]},te.getBCHDigit=function(r){let i=0;for(;r!==0;)i++,r>>>=1;return i},te.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');e=i},te.isKanjiModeEnabled=function(){return typeof e<"u"},te.toSJIS=function(i){return e(i)},te}var qe={},Mt;function yt(){return Mt||(Mt=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,n){if(e.isValid(i))return i;try{return t(i)}catch{return n}}})(qe)),qe}var je,Dt;function Gn(){if(Dt)return je;Dt=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let i=0;i<r;i++)this.putBit((t>>>r-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},je=e,je}var Fe,Lt;function Qn(){if(Lt)return Fe;Lt=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,i,n){const o=t*this.size+r;this.data[o]=i,n&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,i){this.data[t*this.size+r]^=i},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},Fe=e,Fe}var Oe={},Ut;function Wn(){return Ut||(Ut=1,(function(e){const t=le().getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,o=t(i),l=o===145?26:Math.ceil((o-13)/(2*n-2))*2,s=[o-7];for(let c=1;c<n-1;c++)s[c]=s[c-1]-l;return s.push(6),s.reverse()},e.getPositions=function(i){const n=[],o=e.getRowColCoords(i),l=o.length;for(let s=0;s<l;s++)for(let c=0;c<l;c++)s===0&&c===0||s===0&&c===l-1||s===l-1&&c===0||n.push([o[s],o[c]]);return n}})(Oe)),Oe}var He={},qt;function Xn(){if(qt)return He;qt=1;const e=le().getSymbolSize,t=7;return He.getPositions=function(i){const n=e(i);return[[0,0],[n-t,0],[0,n-t]]},He}var ze={},jt;function Zn(){return jt||(jt=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const o=n.size;let l=0,s=0,c=0,d=null,m=null;for(let u=0;u<o;u++){s=c=0,d=m=null;for(let f=0;f<o;f++){let h=n.get(u,f);h===d?s++:(s>=5&&(l+=t.N1+(s-5)),d=h,s=1),h=n.get(f,u),h===m?c++:(c>=5&&(l+=t.N1+(c-5)),m=h,c=1)}s>=5&&(l+=t.N1+(s-5)),c>=5&&(l+=t.N1+(c-5))}return l},e.getPenaltyN2=function(n){const o=n.size;let l=0;for(let s=0;s<o-1;s++)for(let c=0;c<o-1;c++){const d=n.get(s,c)+n.get(s,c+1)+n.get(s+1,c)+n.get(s+1,c+1);(d===4||d===0)&&l++}return l*t.N2},e.getPenaltyN3=function(n){const o=n.size;let l=0,s=0,c=0;for(let d=0;d<o;d++){s=c=0;for(let m=0;m<o;m++)s=s<<1&2047|n.get(d,m),m>=10&&(s===1488||s===93)&&l++,c=c<<1&2047|n.get(m,d),m>=10&&(c===1488||c===93)&&l++}return l*t.N3},e.getPenaltyN4=function(n){let o=0;const l=n.data.length;for(let c=0;c<l;c++)o+=n.data[c];return Math.abs(Math.ceil(o*100/l/5)-10)*t.N4};function r(i,n,o){switch(i){case e.Patterns.PATTERN000:return(n+o)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(n+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return n*o%2+n*o%3===0;case e.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case e.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(n,o){const l=o.size;for(let s=0;s<l;s++)for(let c=0;c<l;c++)o.isReserved(c,s)||o.xor(c,s,r(n,c,s))},e.getBestMask=function(n,o){const l=Object.keys(e.Patterns).length;let s=0,c=1/0;for(let d=0;d<l;d++){o(d),e.applyMask(d,n);const m=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(d,n),m<c&&(c=m,s=d)}return s}})(ze)),ze}var be={},Ft;function kn(){if(Ft)return be;Ft=1;const e=yt(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return be.getBlocksCount=function(n,o){switch(o){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},be.getTotalCodewordsCount=function(n,o){switch(o){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},be}var Ke={},pe={},Ot;function $n(){if(Ot)return pe;Ot=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let i=1;for(let n=0;n<255;n++)e[n]=i,t[i]=n,i<<=1,i&256&&(i^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),pe.log=function(i){if(i<1)throw new Error("log("+i+")");return t[i]},pe.exp=function(i){return e[i]},pe.mul=function(i,n){return i===0||n===0?0:e[t[i]+t[n]]},pe}var Ht;function er(){return Ht||(Ht=1,(function(e){const t=$n();e.mul=function(i,n){const o=new Uint8Array(i.length+n.length-1);for(let l=0;l<i.length;l++)for(let s=0;s<n.length;s++)o[l+s]^=t.mul(i[l],n[s]);return o},e.mod=function(i,n){let o=new Uint8Array(i);for(;o.length-n.length>=0;){const l=o[0];for(let c=0;c<n.length;c++)o[c]^=t.mul(n[c],l);let s=0;for(;s<o.length&&o[s]===0;)s++;o=o.slice(s)}return o},e.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let o=0;o<i;o++)n=e.mul(n,new Uint8Array([1,t.exp(o)]));return n}})(Ke)),Ke}var Ve,zt;function tr(){if(zt)return Ve;zt=1;const e=er();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(i){this.degree=i,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(i.length+this.degree);n.set(i);const o=e.mod(n,this.genPoly),l=this.degree-o.length;if(l>0){const s=new Uint8Array(this.degree);return s.set(o,l),s}return o},Ve=t,Ve}var Je={},Ye={},Ge={},Kt;function Sn(){return Kt||(Kt=1,Ge.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Ge}var W={},Vt;function En(){if(Vt)return W;Vt=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
|
|
2
|
+
]))+`;W.KANJI=new RegExp(r,"g"),W.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),W.BYTE=new RegExp(i,"g"),W.NUMERIC=new RegExp(e,"g"),W.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),o=new RegExp("^"+e+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return W.testKanji=function(c){return n.test(c)},W.testNumeric=function(c){return o.test(c)},W.testAlphanumeric=function(c){return l.test(c)},W}var Jt;function se(){return Jt||(Jt=1,(function(e){const t=Sn(),r=En();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,l){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?o.ccBits[0]:l<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return r.testNumeric(o)?e.NUMERIC:r.testAlphanumeric(o)?e.ALPHANUMERIC:r.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(o,l){if(e.isValid(o))return o;try{return i(o)}catch{return l}}})(Ye)),Ye}var Yt;function nr(){return Yt||(Yt=1,(function(e){const t=le(),r=kn(),i=yt(),n=se(),o=Sn(),l=7973,s=t.getBCHDigit(l);function c(f,h,v){for(let k=1;k<=40;k++)if(h<=e.getCapacity(k,v,f))return k}function d(f,h){return n.getCharCountIndicator(f,h)+4}function m(f,h){let v=0;return f.forEach(function(k){const R=d(k.mode,h);v+=R+k.getBitsLength()}),v}function u(f,h){for(let v=1;v<=40;v++)if(m(f,v)<=e.getCapacity(v,h,n.MIXED))return v}e.from=function(h,v){return o.isValid(h)?parseInt(h,10):v},e.getCapacity=function(h,v,k){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof k>"u"&&(k=n.BYTE);const R=t.getSymbolTotalCodewords(h),_=r.getTotalCodewordsCount(h,v),y=(R-_)*8;if(k===n.MIXED)return y;const w=y-d(k,h);switch(k){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},e.getBestVersionForData=function(h,v){let k;const R=i.from(v,i.M);if(Array.isArray(h)){if(h.length>1)return u(h,R);if(h.length===0)return 1;k=h[0]}else k=h;return c(k.mode,k.getLength(),R)},e.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let v=h<<12;for(;t.getBCHDigit(v)-s>=0;)v^=l<<t.getBCHDigit(v)-s;return h<<12|v}})(Je)),Je}var Qe={},Gt;function rr(){if(Gt)return Qe;Gt=1;const e=le(),t=1335,r=21522,i=e.getBCHDigit(t);return Qe.getEncodedBits=function(o,l){const s=o.bit<<3|l;let c=s<<10;for(;e.getBCHDigit(c)-i>=0;)c^=t<<e.getBCHDigit(c)-i;return(s<<10|c)^r},Qe}var We={},Xe,Qt;function or(){if(Qt)return Xe;Qt=1;const e=se();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(i){let n,o,l;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),l=parseInt(o,10),i.put(l,10);const s=this.data.length-n;s>0&&(o=this.data.substr(n),l=parseInt(o,10),i.put(l,s*3+1))},Xe=t,Xe}var Ze,Wt;function ir(){if(Wt)return Ze;Wt=1;const e=se(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(i){this.mode=e.ALPHANUMERIC,this.data=i}return r.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let o;for(o=0;o+2<=this.data.length;o+=2){let l=t.indexOf(this.data[o])*45;l+=t.indexOf(this.data[o+1]),n.put(l,11)}this.data.length%2&&n.put(t.indexOf(this.data[o]),6)},Ze=r,Ze}var $e,Xt;function lr(){if(Xt)return $e;Xt=1;const e=se();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(i){return i*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let i=0,n=this.data.length;i<n;i++)r.put(this.data[i],8)},$e=t,$e}var et,Zt;function sr(){if(Zt)return et;Zt=1;const e=se(),t=le();function r(i){this.mode=e.KANJI,this.data=i}return r.getBitsLength=function(n){return n*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(i){let n;for(n=0;n<this.data.length;n++){let o=t.toSJIS(this.data[n]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
|
|
3
|
+
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),i.put(o,13)}},et=r,et}var tt={exports:{}},$t;function ar(){return $t||($t=1,(function(e){var t={single_source_shortest_paths:function(r,i,n){var o={},l={};l[i]=0;var s=t.PriorityQueue.make();s.push(i,0);for(var c,d,m,u,f,h,v,k,R;!s.empty();){c=s.pop(),d=c.value,u=c.cost,f=r[d]||{};for(m in f)f.hasOwnProperty(m)&&(h=f[m],v=u+h,k=l[m],R=typeof l[m]>"u",(R||k>v)&&(l[m]=v,s.push(m,v),o[m]=d))}if(typeof n<"u"&&typeof l[n]>"u"){var _=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(_)}return o},extract_shortest_path_from_predecessor_list:function(r,i){for(var n=[],o=i;o;)n.push(o),r[o],o=r[o];return n.reverse(),n},find_path:function(r,i,n){var o=t.single_source_shortest_paths(r,i,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(r){var i=t.PriorityQueue,n={},o;r=r||{};for(o in i)i.hasOwnProperty(o)&&(n[o]=i[o]);return n.queue=[],n.sorter=r.sorter||i.default_sorter,n},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var n={value:r,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(tt)),tt.exports}var en;function cr(){return en||(en=1,(function(e){const t=se(),r=or(),i=ir(),n=lr(),o=sr(),l=En(),s=le(),c=ar();function d(_){return unescape(encodeURIComponent(_)).length}function m(_,y,w){const N=[];let M;for(;(M=_.exec(w))!==null;)N.push({data:M[0],index:M.index,mode:y,length:M[0].length});return N}function u(_){const y=m(l.NUMERIC,t.NUMERIC,_),w=m(l.ALPHANUMERIC,t.ALPHANUMERIC,_);let N,M;return s.isKanjiModeEnabled()?(N=m(l.BYTE,t.BYTE,_),M=m(l.KANJI,t.KANJI,_)):(N=m(l.BYTE_KANJI,t.BYTE,_),M=[]),y.concat(w,N,M).sort(function(x,C){return x.index-C.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function f(_,y){switch(y){case t.NUMERIC:return r.getBitsLength(_);case t.ALPHANUMERIC:return i.getBitsLength(_);case t.KANJI:return o.getBitsLength(_);case t.BYTE:return n.getBitsLength(_)}}function h(_){return _.reduce(function(y,w){const N=y.length-1>=0?y[y.length-1]:null;return N&&N.mode===w.mode?(y[y.length-1].data+=w.data,y):(y.push(w),y)},[])}function v(_){const y=[];for(let w=0;w<_.length;w++){const N=_[w];switch(N.mode){case t.NUMERIC:y.push([N,{data:N.data,mode:t.ALPHANUMERIC,length:N.length},{data:N.data,mode:t.BYTE,length:N.length}]);break;case t.ALPHANUMERIC:y.push([N,{data:N.data,mode:t.BYTE,length:N.length}]);break;case t.KANJI:y.push([N,{data:N.data,mode:t.BYTE,length:d(N.data)}]);break;case t.BYTE:y.push([{data:N.data,mode:t.BYTE,length:d(N.data)}])}}return y}function k(_,y){const w={},N={start:{}};let M=["start"];for(let b=0;b<_.length;b++){const x=_[b],C=[];for(let g=0;g<x.length;g++){const E=x[g],A=""+b+g;C.push(A),w[A]={node:E,lastCount:0},N[A]={};for(let T=0;T<M.length;T++){const S=M[T];w[S]&&w[S].node.mode===E.mode?(N[S][A]=f(w[S].lastCount+E.length,E.mode)-f(w[S].lastCount,E.mode),w[S].lastCount+=E.length):(w[S]&&(w[S].lastCount=E.length),N[S][A]=f(E.length,E.mode)+4+t.getCharCountIndicator(E.mode,y))}}M=C}for(let b=0;b<M.length;b++)N[M[b]].end=0;return{map:N,table:w}}function R(_,y){let w;const N=t.getBestModeForData(_);if(w=t.from(y,N),w!==t.BYTE&&w.bit<N.bit)throw new Error('"'+_+'" cannot be encoded with mode '+t.toString(w)+`.
|
|
4
|
+
Suggested mode is: `+t.toString(N));switch(w===t.KANJI&&!s.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new r(_);case t.ALPHANUMERIC:return new i(_);case t.KANJI:return new o(_);case t.BYTE:return new n(_)}}e.fromArray=function(y){return y.reduce(function(w,N){return typeof N=="string"?w.push(R(N,null)):N.data&&w.push(R(N.data,N.mode)),w},[])},e.fromString=function(y,w){const N=u(y,s.isKanjiModeEnabled()),M=v(N),b=k(M,w),x=c.find_path(b.map,"start","end"),C=[];for(let g=1;g<x.length-1;g++)C.push(b.table[x[g]].node);return e.fromArray(h(C))},e.rawSplit=function(y){return e.fromArray(u(y,s.isKanjiModeEnabled()))}})(We)),We}var tn;function ur(){if(tn)return Ue;tn=1;const e=le(),t=yt(),r=Gn(),i=Qn(),n=Wn(),o=Xn(),l=Zn(),s=kn(),c=tr(),d=nr(),m=rr(),u=se(),f=cr();function h(b,x){const C=b.size,g=o.getPositions(x);for(let E=0;E<g.length;E++){const A=g[E][0],T=g[E][1];for(let S=-1;S<=7;S++)if(!(A+S<=-1||C<=A+S))for(let P=-1;P<=7;P++)T+P<=-1||C<=T+P||(S>=0&&S<=6&&(P===0||P===6)||P>=0&&P<=6&&(S===0||S===6)||S>=2&&S<=4&&P>=2&&P<=4?b.set(A+S,T+P,!0,!0):b.set(A+S,T+P,!1,!0))}}function v(b){const x=b.size;for(let C=8;C<x-8;C++){const g=C%2===0;b.set(C,6,g,!0),b.set(6,C,g,!0)}}function k(b,x){const C=n.getPositions(x);for(let g=0;g<C.length;g++){const E=C[g][0],A=C[g][1];for(let T=-2;T<=2;T++)for(let S=-2;S<=2;S++)T===-2||T===2||S===-2||S===2||T===0&&S===0?b.set(E+T,A+S,!0,!0):b.set(E+T,A+S,!1,!0)}}function R(b,x){const C=b.size,g=d.getEncodedBits(x);let E,A,T;for(let S=0;S<18;S++)E=Math.floor(S/3),A=S%3+C-8-3,T=(g>>S&1)===1,b.set(E,A,T,!0),b.set(A,E,T,!0)}function _(b,x,C){const g=b.size,E=m.getEncodedBits(x,C);let A,T;for(A=0;A<15;A++)T=(E>>A&1)===1,A<6?b.set(A,8,T,!0):A<8?b.set(A+1,8,T,!0):b.set(g-15+A,8,T,!0),A<8?b.set(8,g-A-1,T,!0):A<9?b.set(8,15-A-1+1,T,!0):b.set(8,15-A-1,T,!0);b.set(g-8,8,1,!0)}function y(b,x){const C=b.size;let g=-1,E=C-1,A=7,T=0;for(let S=C-1;S>0;S-=2)for(S===6&&S--;;){for(let P=0;P<2;P++)if(!b.isReserved(E,S-P)){let O=!1;T<x.length&&(O=(x[T]>>>A&1)===1),b.set(E,S-P,O),A--,A===-1&&(T++,A=7)}if(E+=g,E<0||C<=E){E-=g,g=-g;break}}}function w(b,x,C){const g=new r;C.forEach(function(P){g.put(P.mode.bit,4),g.put(P.getLength(),u.getCharCountIndicator(P.mode,b)),P.write(g)});const E=e.getSymbolTotalCodewords(b),A=s.getTotalCodewordsCount(b,x),T=(E-A)*8;for(g.getLengthInBits()+4<=T&&g.put(0,4);g.getLengthInBits()%8!==0;)g.putBit(0);const S=(T-g.getLengthInBits())/8;for(let P=0;P<S;P++)g.put(P%2?17:236,8);return N(g,b,x)}function N(b,x,C){const g=e.getSymbolTotalCodewords(x),E=s.getTotalCodewordsCount(x,C),A=g-E,T=s.getBlocksCount(x,C),S=g%T,P=T-S,O=Math.floor(g/T),z=Math.floor(A/T),fe=z+1,ae=O-z,he=new c(ae);let oe=0;const $=new Array(T),Y=new Array(T);let J=0;const me=new Uint8Array(b.buffer);for(let F=0;F<T;F++){const X=F<P?z:fe;$[F]=me.slice(oe,oe+X),Y[F]=he.encode($[F]),oe+=X,J=Math.max(J,X)}const ie=new Uint8Array(g);let ee=0,V,H;for(V=0;V<J;V++)for(H=0;H<T;H++)V<$[H].length&&(ie[ee++]=$[H][V]);for(V=0;V<ae;V++)for(H=0;H<T;H++)ie[ee++]=Y[H][V];return ie}function M(b,x,C,g){let E;if(Array.isArray(b))E=f.fromArray(b);else if(typeof b=="string"){let O=x;if(!O){const z=f.rawSplit(b);O=d.getBestVersionForData(z,C)}E=f.fromString(b,O||40)}else throw new Error("Invalid data");const A=d.getBestVersionForData(E,C);if(!A)throw new Error("The amount of data is too big to be stored in a QR Code");if(!x)x=A;else if(x<A)throw new Error(`
|
|
5
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
6
|
+
Minimum version required to store current data is: `+A+`.
|
|
7
|
+
`);const T=w(x,C,E),S=e.getSymbolSize(x),P=new i(S);return h(P,x),v(P),k(P,x),_(P,C,0),x>=7&&R(P,x),y(P,T),isNaN(g)&&(g=l.getBestMask(P,_.bind(null,P,C))),l.applyMask(g,P),_(P,C,g),{modules:P,version:x,errorCorrectionLevel:C,maskPattern:g,segments:E}}return Ue.create=function(x,C){if(typeof x>"u"||x==="")throw new Error("No input text");let g=t.M,E,A;return typeof C<"u"&&(g=t.from(C.errorCorrectionLevel,t.M),E=d.from(C.version),A=l.from(C.maskPattern),C.toSJISFunc&&e.setToSJISFunction(C.toSJISFunc)),M(x,E,g,A)},Ue}var nt={},rt={},nn;function Tn(){return nn||(nn=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,l=i.scale||4;return{width:o,scale:o?4:l,margin:n,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},e.getImageWidth=function(i,n){const o=e.getScale(i,n);return Math.floor((i+n.margin*2)*o)},e.qrToImageData=function(i,n,o){const l=n.modules.size,s=n.modules.data,c=e.getScale(l,o),d=Math.floor((l+o.margin*2)*c),m=o.margin*c,u=[o.color.light,o.color.dark];for(let f=0;f<d;f++)for(let h=0;h<d;h++){let v=(f*d+h)*4,k=o.color.light;if(f>=m&&h>=m&&f<d-m&&h<d-m){const R=Math.floor((f-m)/c),_=Math.floor((h-m)/c);k=u[s[R*l+_]?1:0]}i[v++]=k.r,i[v++]=k.g,i[v++]=k.b,i[v]=k.a}}})(rt)),rt}var rn;function dr(){return rn||(rn=1,(function(e){const t=Tn();function r(n,o,l){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=l,o.width=l,o.style.height=l+"px",o.style.width=l+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,l,s){let c=s,d=l;typeof c>"u"&&(!l||!l.getContext)&&(c=l,l=void 0),l||(d=i()),c=t.getOptions(c);const m=t.getImageWidth(o.modules.size,c),u=d.getContext("2d"),f=u.createImageData(m,m);return t.qrToImageData(f.data,o,c),r(u,d,m),u.putImageData(f,0,0),d},e.renderToDataURL=function(o,l,s){let c=s;typeof c>"u"&&(!l||!l.getContext)&&(c=l,l=void 0),c||(c={});const d=e.render(o,l,c),m=c.type||"image/png",u=c.rendererOpts||{};return d.toDataURL(m,u.quality)}})(nt)),nt}var ot={},on;function fr(){if(on)return ot;on=1;const e=Tn();function t(n,o){const l=n.a/255,s=o+'="'+n.hex+'"';return l<1?s+" "+o+'-opacity="'+l.toFixed(2).slice(1)+'"':s}function r(n,o,l){let s=n+o;return typeof l<"u"&&(s+=" "+l),s}function i(n,o,l){let s="",c=0,d=!1,m=0;for(let u=0;u<n.length;u++){const f=Math.floor(u%o),h=Math.floor(u/o);!f&&!d&&(d=!0),n[u]?(m++,u>0&&f>0&&n[u-1]||(s+=d?r("M",f+l,.5+h+l):r("m",c,0),c=0,d=!1),f+1<o&&n[u+1]||(s+=r("h",m),m=0)):c++}return s}return ot.render=function(o,l,s){const c=e.getOptions(l),d=o.modules.size,m=o.modules.data,u=d+c.margin*2,f=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",h="<path "+t(c.color.dark,"stroke")+' d="'+i(m,d,c.margin)+'"/>',v='viewBox="0 0 '+u+" "+u+'"',R='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+v+' shape-rendering="crispEdges">'+f+h+`</svg>
|
|
8
|
+
`;return typeof s=="function"&&s(null,R),R},ot}var ln;function hr(){if(ln)return ce;ln=1;const e=Yn(),t=ur(),r=dr(),i=fr();function n(o,l,s,c,d){const m=[].slice.call(arguments,1),u=m.length,f=typeof m[u-1]=="function";if(!f&&!e())throw new Error("Callback required as last argument");if(f){if(u<2)throw new Error("Too few arguments provided");u===2?(d=s,s=l,l=c=void 0):u===3&&(l.getContext&&typeof d>"u"?(d=c,c=void 0):(d=c,c=s,s=l,l=void 0))}else{if(u<1)throw new Error("Too few arguments provided");return u===1?(s=l,l=c=void 0):u===2&&!l.getContext&&(c=s,s=l,l=void 0),new Promise(function(h,v){try{const k=t.create(s,c);h(o(k,l,c))}catch(k){v(k)}})}try{const h=t.create(s,c);d(null,o(h,l,c))}catch(h){d(h)}}return ce.create=t.create,ce.toCanvas=n.bind(null,r.render),ce.toDataURL=n.bind(null,r.renderToDataURL),ce.toString=n.bind(null,function(o,l,s){return i.render(o,s)}),ce}var mr=hr();const pr=Jn(mr);function ge({message:e,confirmLabel:t="Confirm",confirmDanger:r=!1,onConfirm:i,onCancel:n}){return a("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.6)"},children:a("div",{className:"glass-card p-5 flex flex-col gap-4 w-72",children:[a("p",{className:"text-sm text-center",style:{color:"var(--text-main)"},children:e}),a("div",{className:"flex gap-2",children:[a("button",{onClick:n,className:"glass-btn flex-1 py-2 text-sm",style:{color:"var(--text-muted)"},children:"Cancel"}),a("button",{onClick:i,className:"flex-1 py-2 text-sm font-semibold rounded-xl",style:{background:r?"rgba(220,53,69,0.8)":"var(--brand-500)",color:"#fff"},children:t})]})]})})}const sn="9remote.cc";function _r(e){if(e<=0)return"Expired";const t=Math.floor(e/1e3),r=Math.floor(t/60),i=t%60;return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}`}function xe({icon:e,onClick:t,title:r,danger:i}){return a("button",{onClick:t,title:r,className:"glass-btn w-7 h-7 flex items-center justify-center flex-shrink-0",style:i?{color:"rgba(255,100,100,0.7)"}:{color:"var(--text-muted)"},children:a("span",{className:"material-symbols-outlined",style:{fontSize:15},children:e})})}function an({qrUrl:e,oneTimeKey:t,oneTimeKeyExpiresAt:r,permanentKey:i,onGenerateOneTimeKey:n,onRegenerateKey:o}){const l=gt(null),[s,c]=U(null),[d,m]=U(null),[u,f]=U(null);ue(()=>{!e||!l.current||pr.toCanvas(l.current,e,{width:160,margin:1,color:{dark:"#0f1923",light:"#ffffff"}}).catch(()=>{})},[e]),ue(()=>{if(!r){c(null);return}const v=()=>c(r-Date.now());v();const k=setInterval(v,1e3);return()=>clearInterval(k)},[r]);const h=(v,k)=>{navigator.clipboard.writeText(v).catch(()=>{}),m(k),setTimeout(()=>m(null),2e3)};return a(re,{children:[u==="oneTime"&&a(ge,{message:"Generate a new one-time key? The current one will expire immediately.",confirmLabel:"Generate",onConfirm:()=>{f(null),n==null||n()},onCancel:()=>f(null)}),u==="regen"&&a(ge,{message:"Regenerate permanent key? All existing sessions will be disconnected.",confirmLabel:"Regenerate",confirmDanger:!0,onConfirm:()=>{f(null),o==null||o()},onCancel:()=>f(null)}),a("div",{className:"glass-card p-5 flex flex-col items-center gap-4",children:[a("div",{className:"w-44 h-44 rounded-xl overflow-hidden bg-white p-2 flex items-center justify-center flex-shrink-0",children:e?a("canvas",{ref:l}):a("span",{className:"material-symbols-outlined text-gray-300 text-6xl",children:"qr_code_2"})}),a("div",{className:"flex flex-col items-center gap-1",children:[a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Scan QR or open link to sign in"}),a("a",{href:`https://${sn}/login`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:underline transition-opacity",children:[a("span",{className:"w-2 h-2 rounded-full bg-green-400 flex-shrink-0"}),a("span",{className:"text-sm font-bold",style:{color:"var(--brand-500)"},children:[sn,"/login"]}),a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:14,color:"var(--brand-500)"},children:"open_in_new"})]})]}),a("div",{className:"w-full h-px",style:{background:"var(--border)"}}),a("div",{className:"w-full flex flex-col gap-1.5",children:[a("div",{className:"flex items-center justify-between px-0.5",children:[a("span",{className:"text-xs font-medium",style:{color:"var(--text-muted)"},children:"One-Time Key"}),a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Single use · expires"})]}),a("div",{className:"w-full flex items-center gap-2 dark-card px-3 py-2.5",children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:16,color:"var(--text-muted)"},children:"timer"}),a("span",{className:"flex-1 font-mono font-bold tracking-[0.18em] text-base truncate",style:{color:t?"var(--brand-500)":"var(--border)"},children:t||"• • • • • •"}),s!==null&&a("span",{className:`text-xs font-mono flex-shrink-0 ${s<=0?"text-red-400":""}`,style:s>0?{color:"var(--text-muted)"}:{},children:_r(s)}),t&&a(xe,{icon:d==="oneTime"?"check":"content_copy",onClick:()=>h(t,"oneTime"),title:"Copy one-time key"}),a(xe,{icon:"refresh",onClick:()=>f("oneTime"),title:"New one-time key"})]})]}),a("div",{className:"w-full flex flex-col gap-1.5",children:[a("div",{className:"flex items-center justify-between px-0.5",children:[a("span",{className:"text-xs font-medium",style:{color:"var(--text-muted)"},children:"Permanent Key"}),a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Reusable · no expiry"})]}),a("div",{className:"w-full flex items-center gap-2 dark-card px-3 py-2.5",children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:16,color:"var(--text-muted)"},children:"key"}),a("span",{className:"flex-1 font-mono text-xs truncate",style:{color:"var(--text-muted)"},children:i||"— not set —"}),i&&a(xe,{icon:d==="permanent"?"check":"content_copy",onClick:()=>h(i,"permanent"),title:"Copy permanent key"}),a(xe,{icon:"autorenew",onClick:()=>f("regen"),title:"Regenerate permanent key",danger:!0})]})]})]})]})}const gr="https://docs.9remote.cc/",An={screenRecording:{label:"Screen Recording",icon:"screenshot_monitor",desc:"Capture screen content"},accessibility:{label:"Accessibility",icon:"accessibility_new",desc:"Control mouse & keyboard"}};function yr({type:e,granted:t,onRequest:r}){const i=An[e]||{label:e,desc:""};return a("div",{className:"flex items-center gap-2 py-2",children:[a("span",{className:`material-symbols-outlined flex-shrink-0 ${t?"text-green-400":""}`,style:{fontSize:18,color:t?void 0:"var(--text-muted)"},children:t?"check_circle":"cancel"}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:t?"var(--text-main)":"var(--text-muted)"},children:i.label}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:i.desc})]}),!t&&a("button",{onClick:()=>r(e),title:"Click to grant permission",className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:"var(--border)",cursor:"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]})}const vr={"30m":"Off after 30 min idle","1h":"Off after 1 hour idle","2h":"Off after 2 hours idle","4h":"Off after 4 hours idle","24h":"Off after 24 hours idle",never:"Never off"};function br({icon:e,label:t,desc:r,value:i,options:n,onChange:o}){return a("div",{className:"flex items-center gap-3 py-2 border-b last:border-0",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:"var(--brand-400)"},children:e}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:"var(--text-main)"},children:t}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:r})]}),a("select",{value:i,onChange:l=>o==null?void 0:o(l.target.value),className:"flex-shrink-0 text-xs px-2 py-1 rounded-lg",style:{background:"var(--glass-bg)",color:"var(--text-main)",border:"1px solid var(--border)",cursor:"pointer"},children:n.map(l=>a("option",{value:l.value,children:l.label},l.value))})]})}function xr({icon:e,label:t,desc:r,value:i,onToggle:n,activeColor:o="var(--brand-500)"}){return a("div",{className:"flex items-center gap-3 py-2 border-b last:border-0",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:i?"var(--brand-400)":"var(--text-muted)"},children:e}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:"var(--text-main)"},children:t}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:r})]}),a("button",{onClick:n,className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:i?o:"var(--border)",cursor:"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:i?"calc(100% - 22px)":"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]})}function wr({desktopEnabled:e,onDesktopToggle:t,permissions:r,onRequestPermission:i,autoStart:n,onAutoStartToggle:o,sleepInhibitMode:l,sleepInhibitPresets:s,onSleepInhibitChange:c}){const d=Object.entries(An),u=!d.every(([f])=>!!(r!=null&&r[f]))&&!e;return a("div",{className:"glass-card p-4 flex flex-col gap-3",children:[a("div",{className:"flex flex-col gap-2",children:[a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:e?"rgba(255,87,10,0.15)":"var(--glass-bg)"},children:a("span",{className:"material-symbols-outlined",style:{fontSize:20,color:e?"var(--brand-400)":"var(--text-muted)"},children:"desktop_windows"})}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-semibold",style:{color:"var(--text-main)"},children:"Remote Desktop"}),a("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Control screen, mouse & keyboard"})]}),a("button",{onClick:u?void 0:t,disabled:u,title:u?"Grant all permissions below to enable":"",className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:e?"var(--brand-500)":"var(--border)",opacity:u?.5:1,cursor:u?"not-allowed":"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:e?"calc(100% - 22px)":"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]}),a("div",{className:"grid grid-cols-2 gap-2 pl-12",children:d.map(([f])=>a(yr,{type:f,granted:(r==null?void 0:r[f])??!1,onRequest:i},f))})]}),a("div",{className:"flex flex-col border-t pt-2",style:{borderColor:"var(--border)"},children:[a("p",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-muted)"},children:"Startup"}),a(xr,{icon:"power_settings_new",label:"Launch on system startup",desc:n?"Runs in background when you log in":"Disabled — start manually",value:!!n,onToggle:o}),a(br,{icon:"bedtime_off",label:"Prevent sleep",desc:"Block system sleep so the network stays alive",value:l||"never",options:(s||[]).map(f=>({value:f,label:vr[f]||f})),onChange:c})]})]})}function Nr({version:e}){return e?a("div",{className:"px-5 py-2 flex items-center gap-2 border-b",style:{background:"rgba(255,87,10,0.08)",borderColor:"rgba(255,87,10,0.2)"},children:[a("span",{className:"material-symbols-outlined text-sm flex-shrink-0",style:{color:"var(--brand-400)"},children:"system_update"}),a("span",{className:"text-xs flex-1",style:{color:"var(--brand-400)"},children:["Version ",e," available"]}),a("button",{onClick:()=>fetch("/api/update",{method:"POST"}).catch(()=>{}),className:"flex-shrink-0 text-xs px-2 py-0.5 rounded font-medium",style:{background:"rgba(255,87,10,0.15)",color:"var(--brand-400)"},children:"Update"})]}):null}const Cr=[{icon:"terminal",label:"Terminal",desc:"Full shell access"},{icon:"desktop_windows",label:"Desktop",desc:"Remote screen control"},{icon:"folder_open",label:"Files",desc:"Browse & edit files"}],kr=[{icon:"qr_code_scanner",text:"Scan QR to connect instantly"},{icon:"wifi_off",text:"No port forwarding needed"},{icon:"devices",text:"Works on any device"}];function Sr({onStart:e}){const[t,r]=U(!1),i=()=>{r(!0),e()};return a("div",{className:"flex-1 flex flex-col items-center justify-between px-6 py-6 overflow-y-auto",children:[a("div",{className:"flex flex-col items-center gap-2 text-center mt-2",children:[a("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mb-1",style:{background:"var(--brand-500)",boxShadow:"0 8px 32px rgba(255,87,10,0.35)"},children:a("span",{className:"material-symbols-outlined text-white",style:{fontSize:30},children:"terminal"})}),a("h1",{className:"text-lg font-bold tracking-tight",style:{color:"var(--text-main)"},children:"9Remote"}),a("p",{className:"text-xs leading-5 max-w-[220px]",style:{color:"var(--text-muted)"},children:"Access your terminal, desktop & files from anywhere"})]}),a("div",{className:"flex gap-2 w-full mt-5",children:Cr.map(n=>a("div",{className:"flex-1 dark-card flex flex-col items-center gap-1.5 py-3 px-1",children:[a("span",{className:"material-symbols-outlined",style:{fontSize:22,color:"var(--brand-400)"},children:n.icon}),a("p",{className:"text-xs font-semibold",style:{color:"var(--text-main)"},children:n.label}),a("p",{className:"text-[10px] text-center leading-4",style:{color:"var(--text-muted)"},children:n.desc})]},n.label))}),a("div",{className:"flex flex-col gap-2 w-full mt-4",children:kr.map(n=>a("div",{className:"flex items-center gap-2.5",children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:16,color:"var(--brand-400)"},children:n.icon}),a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:n.text})]},n.text))}),a("button",{onClick:t?void 0:i,disabled:t,className:"btn-primary w-full py-3.5 flex items-center justify-center gap-2 text-sm font-semibold mt-6",style:{borderRadius:"var(--radius-brand)",opacity:t?.7:1},children:t?a(re,{children:[a("span",{className:"flex gap-0.5 items-center",children:[0,1,2].map(n=>a("span",{className:"w-1.5 h-1.5 rounded-full bg-white dot-bounce",style:{animationDelay:`${n*.18}s`}},n))}),"Connecting..."]}):a(re,{children:[a("span",{className:"material-symbols-outlined text-base",children:"play_arrow"}),"Connect"]})})]})}function Er(e,t,r=[]){const i=new Map;for(const s of t){if(!s.deviceId)continue;const c=i.get(s.deviceId);(!c||s.connectedAt&&s.connectedAt<c.connectedAt)&&i.set(s.deviceId,s)}const n=e.map(s=>{const c=i.get(s.deviceId);return{deviceId:s.deviceId,status:c?"online":"offline",ip:(c==null?void 0:c.ip)||null,connectedAt:(c==null?void 0:c.connectedAt)||null,approvedAt:s.approvedAt||null}}),o=r.map(s=>({deviceId:s.deviceId,status:"pending",ip:s.ip||null,connectedAt:null,approvedAt:null,rejectedAt:s.rejectedAt||null})),l={online:0,pending:1,offline:2};return[...n,...o].sort((s,c)=>l[s.status]-l[c.status])}const cn={online:{color:"#4ade80",icon:"wifi",title:"Online"},offline:{color:"var(--text-muted)",icon:"wifi_off",title:"Offline"},pending:{color:"#f59e0b",icon:"hourglass_top",title:"Pending approval"}};function Tr({client:e,onRemove:t,onApprove:r}){const i=`${e.deviceId.slice(0,8)}...`,n=cn[e.status]||cn.offline,o=e.status==="online"?`Connected · ${e.connectedAt?new Date(e.connectedAt).toLocaleTimeString():""}`:e.status==="pending"?"Pending · waiting for approval":e.approvedAt?`Offline · approved ${new Date(e.approvedAt).toLocaleDateString()}`:"Offline",l=e.status==="online"?"Disconnect":"Remove";return a("div",{className:"flex items-center gap-3 py-2 border-b last:border-0",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:n.color},title:n.title,children:n.icon}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium font-mono truncate",style:{color:"var(--text-main)"},children:[i,e.ip?` · ${e.ip}`:""]}),a("p",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:o})]}),e.status==="pending"&&a("button",{onClick:()=>r==null?void 0:r(e),className:"flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium",style:{background:"rgba(74,222,128,0.15)",color:"#4ade80"},title:"Approve this device",children:"Approve"}),a("button",{onClick:()=>t(e),className:"flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium",style:{background:"rgba(220,53,69,0.15)",color:"#dc3545"},title:"Disconnect and remove this device",children:l})]})}const un={healthy:{color:"#4ade80",label:"Healthy",dot:"bg-green-400"},unreachable:{color:"#dc3545",label:"Offline",dot:"bg-red-500"},unknown:{color:"var(--text-muted)",label:"Checking...",dot:"bg-gray-400"}};function we({icon:e,title:t,danger:r,onClick:i}){return a("button",{onClick:i,title:t,className:r?"btn-danger w-7 h-7 flex items-center justify-center":"glass-btn w-7 h-7 flex items-center justify-center",style:r?void 0:{color:"var(--text-muted)"},children:a("span",{className:"material-symbols-outlined text-sm",children:e})})}function Ar({tunnelHealth:e}){const t=un[e==null?void 0:e.status]||un.unknown,r=e!=null&&e.checkedAt?new Date(e.checkedAt).toLocaleTimeString():"--:--:--";return a("div",{className:"flex items-center gap-1.5 px-2 h-7 rounded-full glass-btn",title:`Tunnel ${t.label} · last check ${r}`,children:[a("span",{className:`w-1.5 h-1.5 rounded-full ${t.dot}`}),a("span",{className:"text-[11px] font-medium",style:{color:t.color},children:t.label})]})}function Ir({step:e,stepDesc:t="",healthCheck:r,tunnelHealth:i,tunnelUrl:n,oneTimeKey:o,oneTimeKeyExpiresAt:l,permanentKey:s,qrUrl:c,permissions:d,desktopEnabled:m,updateVersion:u,connections:f=[],version:h="",onRequestPermission:v,onDesktopToggle:k,onStop:R,onStart:_,onShutdown:y,onGenerateOneTimeKey:w,onRegenerateKey:N,logs:M=[],theme:b,onToggleTheme:x,pendingDevice:C,onDeviceApprove:g,onDeviceReject:E,approvedDevices:A=[],rejectedDevices:T=[],onDeviceRemove:S,onFetchDevices:P,onDeviceApproveRejected:O,autoApprove:z=!1,onAutoApproveToggle:fe,autoStart:ae=!1,onAutoStartToggle:he,sleepInhibitMode:oe="never",sleepInhibitPresets:$=[],onSleepInhibitChange:Y}){var vt;const[J,me]=U("connect"),[ie,ee]=U(!1),[V,H]=U(!1),[F,X]=U(null),B=gt(null),L=e===5,p=e===0,I=e>0&&e<5;ue(()=>{var K;J==="log"&&((K=B.current)==null||K.scrollIntoView({behavior:"smooth"})),J==="connect"&&(P==null||P())},[M,J,f.length]);const G=Er(A,f,T),Q=G.filter(K=>K.status==="online").length;return a("div",{className:"h-full flex flex-col relative overflow-hidden",style:{background:"var(--bg-body)"},children:[a("div",{className:"flex-1 flex flex-col w-full min-h-0 dot-grid-bg overflow-hidden md:max-w-5xl p-3",style:{margin:"0 auto"},children:[a("div",{className:"flex items-center justify-between px-5 py-4",style:{boxShadow:"var(--header-shadow)",backdropFilter:"blur(10px)"},children:[a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"var(--brand-500)"},children:a("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),a("div",{className:"flex flex-col leading-tight",children:[a("span",{className:"brand-text text-xs",children:"9Remote"}),h&&a("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:["v",h]})]})]}),a("div",{className:"flex items-center gap-2",children:[L&&a(Ar,{tunnelHealth:i}),a(we,{icon:b==="dark"?"light_mode":"dark_mode",title:b==="dark"?"Switch to light mode":"Switch to dark mode",onClick:x}),a(we,{icon:"help_outline",title:"Help & documentation",onClick:()=>window.open(gr,"_blank")}),!p&&a(we,{icon:"stop_circle",title:"Stop the tunnel and disconnect clients",danger:!0,onClick:()=>ee(!0)}),a(we,{icon:"power_settings_new",title:"Shutdown 9Remote (stop server, tunnel and quit)",onClick:()=>H(!0)})]})]}),a(Nr,{version:u}),p?a(Sr,{onStart:_,connecting:!1}):I?a("div",{className:"flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-4 max-w-2xl mx-auto w-full",children:a(Vn,{currentStep:e,activeDesc:t,healthCheck:r})}):a("div",{className:"flex-1 flex flex-col md:flex-row min-h-0",children:[a("div",{className:"hidden md:flex md:flex-col sidebar w-96 flex-shrink-0 overflow-y-auto p-5 gap-4",children:a(an,{qrUrl:c,oneTimeKey:o,oneTimeKeyExpiresAt:l,permanentKey:s,tunnelUrl:n,onGenerateOneTimeKey:w,onRegenerateKey:N})}),a("div",{className:"flex-1 flex flex-col min-h-0",children:[a("div",{className:"flex px-5 pt-3 gap-3",style:{borderColor:"var(--border)"},children:[{id:"connect",label:"Connection"},{id:"log",label:"Logs"}].map(K=>a("button",{onClick:()=>me(K.id),className:"py-2 text-xs font-medium border-b-2 transition-colors",style:J===K.id?{borderColor:"var(--brand-500)",color:"var(--brand-500)"}:{borderColor:"transparent",color:"var(--text-muted)"},children:K.label},K.id))}),a("div",{className:"flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-4",children:[J==="connect"&&a(re,{children:[a("div",{className:"md:hidden",children:a(an,{qrUrl:c,oneTimeKey:o,oneTimeKeyExpiresAt:l,permanentKey:s,tunnelUrl:n,onGenerateOneTimeKey:w,onRegenerateKey:N})}),a(wr,{desktopEnabled:m,onDesktopToggle:k,permissions:d,onRequestPermission:v,autoStart:ae,onAutoStartToggle:he,sleepInhibitMode:oe,sleepInhibitPresets:$,onSleepInhibitChange:Y}),a("div",{className:"glass-card p-4 flex flex-col gap-1",children:[a("p",{className:"text-xs font-medium uppercase tracking-wider mb-2",style:{color:"var(--text-muted)"},children:["Clients",G.length>0?` (${Q}/${G.length} online)`:""]}),a("div",{className:"flex items-center gap-3 py-2 border-b",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:z?"var(--brand-400)":"var(--text-muted)"},children:z?"lock_open":"lock"}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:"var(--text-main)"},children:"Auto-approve new devices"}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:z?"Any new device connects without approval":"Require manual approval for new devices"})]}),a("button",{onClick:fe,title:z?"Disable auto-approve":"Enable auto-approve",className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:z?"var(--brand-500)":"var(--border)",cursor:"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:z?"calc(100% - 22px)":"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]}),G.length===0?a("p",{className:"text-xs text-center py-3",style:{color:"var(--text-muted)"},children:"No clients yet"}):G.map(K=>a(Tr,{client:K,onRemove:X,onApprove:Be=>O==null?void 0:O(Be.deviceId)},K.deviceId))]})]}),J==="log"&&a("div",{className:"flex-1 flex flex-col",children:M.length===0?a("p",{className:"text-xs text-center mt-8",style:{color:"var(--text-muted)"},children:"No logs yet"}):a("div",{className:"flex flex-col gap-0.5",children:[M.map((K,Be)=>a("p",{className:"text-xs font-mono leading-5 break-all",style:{color:"var(--text-muted)"},children:K},Be)),a("div",{ref:B})]})})]})]})]})]}),ie&&a(ge,{message:"Disconnect and stop the tunnel? Remote clients will be disconnected.",confirmLabel:"Disconnect",confirmDanger:!0,onConfirm:()=>{ee(!1),R==null||R()},onCancel:()=>ee(!1)}),V&&a(ge,{message:"Shutdown 9Remote completely? This will stop the server, close the tunnel and quit the app.",confirmLabel:"Shutdown",confirmDanger:!0,onConfirm:()=>{H(!1),y==null||y()},onCancel:()=>H(!1)}),F&&a(ge,{message:F.status==="online"?`Disconnect and remove device ${F.deviceId.slice(0,8)}...? The client will be disconnected and need approval again next time.`:F.status==="pending"?`Remove pending device ${F.deviceId.slice(0,8)}...? It will need a fresh approval request to connect again.`:`Remove device ${F.deviceId.slice(0,8)}...? It will need approval again next time.`,confirmLabel:F.status==="online"?"Disconnect & Remove":"Remove",confirmDanger:!0,onConfirm:()=>{S==null||S(F),X(null)},onCancel:()=>X(null)}),C&&a("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.6)"},children:a("div",{className:"glass-card p-5 flex flex-col gap-4 w-80",children:[a("div",{className:"flex items-center gap-2",children:[a("span",{className:"material-symbols-outlined",style:{color:"var(--brand-500)",fontSize:24},children:"devices"}),a("span",{className:"text-sm font-semibold",style:{color:"var(--text-main)"},children:"New Device Connection"})]}),a("div",{className:"flex flex-col gap-1 text-xs",style:{color:"var(--text-muted)"},children:[a("span",{children:["Device: ",a("span",{style:{color:"var(--text-main)"},children:[(vt=C.deviceId)==null?void 0:vt.slice(0,8),"..."]})]}),a("span",{children:["IP: ",a("span",{style:{color:"var(--text-main)"},children:C.ip})]})]}),a("div",{className:"flex gap-2",children:[a("button",{onClick:E,className:"glass-btn flex-1 py-2 text-sm",style:{color:"var(--text-muted)"},children:"Reject"}),a("button",{onClick:g,className:"flex-1 py-2 text-sm font-semibold rounded-xl",style:{background:"var(--brand-500)",color:"#fff"},children:"Approve"})]})]})})]})}const Pr=3e3,ut={running:!1,timeoutMs:0,startedAt:null,logs:[]},dt={status:"unknown",checkedAt:null},it={step:0,stepDesc:"",tunnelUrl:"",oneTimeKey:"",oneTimeKeyExpiresAt:null,permanentKey:"",qrUrl:"",latency:null,uptime:null,healthCheck:ut,tunnelHealth:dt},Rr={screenRecording:!1,accessibility:!1},dn=200;function Br(){const[e,t]=U(it),[r,i]=U(Rr),[n,o]=U(!1),[l,s]=U([]),[c,d]=U(null),[m,u]=U([]),[f,h]=U(null),[v,k]=U([]),[R,_]=U([]),[y,w]=U(!1),[N,M]=U(!1),[b,x]=U("never"),[C,g]=U([]),[E,A]=U(""),[T,S]=U(()=>localStorage.getItem("9remote-theme")||"dark");ue(()=>{document.documentElement.setAttribute("data-theme",T),localStorage.setItem("9remote-theme",T)},[T]);const P=()=>{S(B=>B==="dark"?"light":"dark")};ue(()=>{fetch("/api/version").then(p=>p.json()).then(p=>A(p.version??"")).catch(()=>{}),fetch("/api/ui/state").then(p=>p.json()).then(p=>{t({step:p.step??0,stepDesc:p.stepDesc??"",tunnelUrl:p.tunnelUrl??"",oneTimeKey:p.oneTimeKey??"",oneTimeKeyExpiresAt:p.oneTimeKeyExpiresAt??null,permanentKey:p.permanentKey??"",qrUrl:p.qrUrl??"",latency:p.latency??null,uptime:p.uptime??null,healthCheck:p.healthCheck??ut,tunnelHealth:p.tunnelHealth??dt}),i({screenRecording:p.screenRecording??!1,accessibility:p.accessibility??!1}),p.desktopEnabled!==void 0&&o(p.desktopEnabled),p.theme&&(p.theme==="light"||p.theme==="dark")&&S(p.theme)}).catch(()=>{}),fetch("/api/logs").then(p=>p.json()).then(p=>{Array.isArray(p==null?void 0:p.logs)&&s(p.logs)}).catch(()=>{});const B=new EventSource("/api/ui/events");B.onmessage=p=>{try{const I=JSON.parse(p.data);I.type==="state"?t({step:I.step??0,stepDesc:I.stepDesc??"",tunnelUrl:I.tunnelUrl??"",oneTimeKey:I.oneTimeKey??"",oneTimeKeyExpiresAt:I.oneTimeKeyExpiresAt??null,permanentKey:I.permanentKey??"",qrUrl:I.qrUrl??"",latency:I.latency??null,uptime:I.uptime??null,healthCheck:I.healthCheck??ut,tunnelHealth:I.tunnelHealth??dt}):I.type==="log"?s(G=>{const Q=[...G,I.message];return Q.length>dn?Q.slice(-dn):Q}):I.type==="updateAvailable"?d(I.version):I.type==="permissions"?(i({screenRecording:I.screenRecording,accessibility:I.accessibility}),I.desktopEnabled!==void 0&&o(I.desktopEnabled)):I.type==="connections"?u(I.connections??[]):I.type==="deviceApproval"&&I.action==="pending"?h({socketId:I.socketId,deviceId:I.deviceId,ip:I.ip}):I.type==="deviceApproval"&&I.action==="refresh"?Y():I.type==="autostart"?M(!!I.enabled):I.type==="sleepInhibit"&&(I.mode&&x(I.mode),Array.isArray(I.presets)&&g(I.presets))}catch{}},B.onerror=()=>{},fetch("/api/device/auto-approve").then(p=>p.json()).then(p=>{w(!!(p!=null&&p.enabled))}).catch(()=>{}),fetch("/api/autostart").then(p=>p.json()).then(p=>{M(!!(p!=null&&p.enabled))}).catch(()=>{}),fetch("/api/sleep-inhibit").then(p=>p.json()).then(p=>{p!=null&&p.mode&&x(p.mode),Array.isArray(p==null?void 0:p.presets)&&g(p.presets)}).catch(()=>{});const L=setInterval(async()=>{var p;if(!O.current)try{const I=await fetch("/api/device/pending");if(!I.ok)return;const G=await I.json(),Q=(p=G==null?void 0:G.pending)==null?void 0:p[0];Q&&!O.current&&h({socketId:Q.socketId,deviceId:Q.deviceId,ip:Q.ip})}catch{}},Pr);return()=>{B.close(),clearInterval(L)}},[]);const O=gt(null);ue(()=>{O.current=f},[f]);const z=async B=>{await fetch("/api/permissions/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:B})}).catch(()=>{})},fe=()=>{fetch("/api/ui/stop",{method:"POST"}).catch(()=>{}),t(it)},ae=()=>{fetch("/api/ui/start",{method:"POST"}).catch(()=>{})},he=()=>{fetch("/api/ui/shutdown",{method:"POST"}).catch(()=>{}),t(it)},oe=async()=>{const B=await fetch("/api/key/one-time",{method:"POST"}).catch(()=>null);if(!(B!=null&&B.ok))return;const L=await B.json().catch(()=>null);L!=null&&L.oneTimeKey&&t(p=>({...p,oneTimeKey:L.oneTimeKey,oneTimeKeyExpiresAt:L.expiresAt,qrUrl:L.qrUrl??p.qrUrl}))},$=async()=>{const B=!n;o(B),await fetch("/api/desktop/toggle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:B})}).catch(()=>{})},Y=async()=>{try{const[B,L]=await Promise.all([fetch("/api/device/approved"),fetch("/api/device/rejected")]);if(B.ok){const p=await B.json();k(p.devices||[])}if(L.ok){const p=await L.json();_(p.rejected||[])}}catch{}},J=async B=>{const L=B.status==="pending"?"/api/device/clear-rejected":"/api/device/remove";await fetch(L,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceId:B.deviceId})}).catch(()=>{}),Y()},me=async()=>{f&&(await fetch("/api/device/approve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({socketId:f.socketId})}).catch(()=>{}),h(null),Y())},ie=async()=>{f&&(await fetch("/api/device/reject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({socketId:f.socketId})}).catch(()=>{}),h(null),Y())},ee=async()=>{const B=!N;M(B);try{const p=await(await fetch("/api/autostart",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:B})})).json().catch(()=>null);p&&typeof p.enabled=="boolean"&&M(p.enabled)}catch{M(!B)}},V=async B=>{const L=b;x(B);try{const I=await(await fetch("/api/sleep-inhibit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:B})})).json().catch(()=>null);I!=null&&I.mode&&x(I.mode)}catch{x(L)}},H=async()=>{const B=!y;w(B);try{const p=await(await fetch("/api/device/auto-approve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:B})})).json().catch(()=>null);p&&typeof p.enabled=="boolean"&&w(p.enabled)}catch{w(!B)}},F=async B=>{await fetch("/api/device/approve-rejected",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceId:B})}).catch(()=>{}),Y()},X=async()=>{const B=await fetch("/api/key/regenerate",{method:"POST"}).catch(()=>null);if(!(B!=null&&B.ok))return;const L=await B.json().catch(()=>null);L!=null&&L.permanentKey&&t(p=>({...p,permanentKey:L.permanentKey}))};return a(Ir,{step:e.step,stepDesc:e.stepDesc,healthCheck:e.healthCheck,tunnelHealth:e.tunnelHealth,tunnelUrl:e.tunnelUrl,oneTimeKey:e.oneTimeKey,oneTimeKeyExpiresAt:e.oneTimeKeyExpiresAt,permanentKey:e.permanentKey,qrUrl:e.qrUrl,permissions:r,desktopEnabled:n,updateVersion:c,connections:m,onRequestPermission:z,onDesktopToggle:$,onStop:fe,onStart:ae,onShutdown:he,onGenerateOneTimeKey:oe,onRegenerateKey:X,logs:l,version:E,theme:T,onToggleTheme:P,pendingDevice:f,onDeviceApprove:me,onDeviceReject:ie,approvedDevices:v,rejectedDevices:R,onDeviceRemove:J,onFetchDevices:Y,onDeviceApproveRejected:F,autoApprove:y,onAutoApproveToggle:H,autoStart:N,onAutoStartToggle:ee,sleepInhibitMode:b,sleepInhibitPresets:C,onSleepInhibitChange:V})}Un(a(Br,{}),document.getElementById("root"));
|
package/dist/ui/index.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
const savedTheme = localStorage.getItem("9remote-theme") || "dark";
|
|
15
15
|
document.documentElement.setAttribute("data-theme", savedTheme);
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-K-xvZBoY.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D646KQwB.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "9remote",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Remote terminal access from anywhere",
|
|
6
6
|
"main": "dist/server.cjs",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@julusian/jpeg-turbo": "^2.3.0",
|
|
33
33
|
"bufferutil": "^4.1.0",
|
|
34
34
|
"chalk": "^5.4.1",
|
|
35
|
+
"chokidar": "^3.6.0",
|
|
35
36
|
"edge-tts-node": "^1.5.7",
|
|
36
37
|
"http-proxy": "^1.18.1",
|
|
37
38
|
"inquirer": "^9.3.8",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function r(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(n){if(n.ep)return;n.ep=!0;const o=r(n);fetch(n.href,o)}})();var Ee,L,an,$,_t,cn,un,Re,ve,fe,dn,at,nt,rt,Ne={},Ce=[],En=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function W(e,t){for(var r in t)e[r]=t[r];return e}function ct(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Tn(e,t,r){var i,n,o,l={};for(o in t)o=="key"?i=t[o]:o=="ref"?n=t[o]:l[o]=t[o];if(arguments.length>2&&(l.children=arguments.length>3?Ee.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)l[o]===void 0&&(l[o]=e.defaultProps[o]);return be(e,l,i,n,null)}function be(e,t,r,i,n){var o={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++an,__i:-1,__u:0};return n==null&&L.vnode!=null&&L.vnode(o),o}function ee(e){return e.children}function xe(e,t){this.props=e,this.context=t}function le(e,t){if(t==null)return e.__?le(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?le(e):null}function An(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,i=[],n=[],o=W({},t);o.__v=t.__v+1,L.vnode&&L.vnode(o),ut(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,i,r??le(t),!!(32&t.__u),n),o.__v=t.__v,o.__.__k[o.__i]=o,pn(i,o,n),t.__e=t.__=null,o.__e!=r&&fn(o)}}function fn(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),fn(e)}function gt(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!ke.__r++||_t!=L.debounceRendering)&&((_t=L.debounceRendering)||cn)(ke)}function ke(){try{for(var e,t=1;$.length;)$.length>t&&$.sort(un),e=$.shift(),t=$.length,An(e)}finally{$.length=ke.__r=0}}function hn(e,t,r,i,n,o,l,s,c,u,m){var d,h,f,v,C,B,_,y=i&&i.__k||Ce,w=t.length;for(c=Rn(r,t,y,c,w),d=0;d<w;d++)(f=r.__k[d])!=null&&(h=f.__i!=-1&&y[f.__i]||Ne,f.__i=d,B=ut(e,f,h,n,o,l,s,c,u,m),v=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&dt(h.ref,null,f),m.push(f.ref,f.__c||v,f)),C==null&&v!=null&&(C=v),(_=!!(4&f.__u))||h.__k===f.__k?(c=mn(f,c,e,_),_&&h.__e&&(h.__e=null)):typeof f.type=="function"&&B!==void 0?c=B:v&&(c=v.nextSibling),f.__u&=-7);return r.__e=C,c}function Rn(e,t,r,i,n){var o,l,s,c,u,m=r.length,d=m,h=0;for(e.__k=new Array(n),o=0;o<n;o++)(l=t[o])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[o]=be(null,l,null,null,null):Te(l)?l=e.__k[o]=be(ee,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[o]=be(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[o]=l,c=o+h,l.__=e,l.__b=e.__b+1,s=null,(u=l.__i=In(l,r,c,d))!=-1&&(d--,(s=r[u])&&(s.__u|=2)),s==null||s.__v==null?(u==-1&&(n>m?h--:n<m&&h++),typeof l.type!="function"&&(l.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,l.__u|=4))):e.__k[o]=null;if(d)for(o=0;o<m;o++)(s=r[o])!=null&&(2&s.__u)==0&&(s.__e==i&&(i=le(s)),gn(s,s));return i}function mn(e,t,r,i){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=mn(n[o],t,r,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=le(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function In(e,t,r,i){var n,o,l,s=e.key,c=e.type,u=t[r],m=u!=null&&(2&u.__u)==0;if(u===null&&s==null||m&&s==u.key&&c==u.type)return r;if(i>(m?1:0)){for(n=r-1,o=r+1;n>=0||o<t.length;)if((u=t[l=n>=0?n--:o++])!=null&&(2&u.__u)==0&&s==u.key&&c==u.type)return l}return-1}function yt(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||En.test(t)?r:r+"px"}function pe(e,t,r,i,n){var o,l;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||yt(e.style,t,"");if(r)for(t in r)i&&r[t]==i[t]||yt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(dn,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?i?r[fe]=i[fe]:(r[fe]=at,e.addEventListener(t,o?rt:nt,o)):e.removeEventListener(t,o?rt:nt,o);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function vt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[ve]==null)t[ve]=at++;else if(t[ve]<r[fe])return;return r(L.event?L.event(t):t)}}}function ut(e,t,r,i,n,o,l,s,c,u){var m,d,h,f,v,C,B,_,y,w,N,M,b,k,x,g=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),o=[s=t.__e=r.__e]),(m=L.__b)&&m(t);e:if(typeof g=="function")try{if(_=t.props,y=g.prototype&&g.prototype.render,w=(m=g.contextType)&&i[m.__c],N=m?w?w.props.value:m.__:i,r.__c?B=(d=t.__c=r.__c).__=d.__E:(y?t.__c=d=new g(_,N):(t.__c=d=new xe(_,N),d.constructor=g,d.render=Bn),w&&w.sub(d),d.state||(d.state={}),d.__n=i,h=d.__d=!0,d.__h=[],d._sb=[]),y&&d.__s==null&&(d.__s=d.state),y&&g.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=W({},d.__s)),W(d.__s,g.getDerivedStateFromProps(_,d.__s))),f=d.props,v=d.state,d.__v=t,h)y&&g.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),y&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(y&&g.getDerivedStateFromProps==null&&_!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,N),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(_,d.__s,N)===!1){t.__v!=r.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(S){S&&(S.__=t)}),Ce.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&l.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,N),y&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,v,C)})}if(d.context=N,d.props=_,d.__P=e,d.__e=!1,M=L.__r,b=0,y)d.state=d.__s,d.__d=!1,M&&M(t),m=d.render(d.props,d.state,d.context),Ce.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,M&&M(t),m=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++b<25);d.state=d.__s,d.getChildContext!=null&&(i=W(W({},i),d.getChildContext())),y&&!h&&d.getSnapshotBeforeUpdate!=null&&(C=d.getSnapshotBeforeUpdate(f,v)),k=m!=null&&m.type===ee&&m.key==null?_n(m.props.children):m,s=hn(e,Te(k)?k:[k],t,r,i,n,o,l,s,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),B&&(d.__E=d.__=null)}catch(S){if(t.__v=null,c||o!=null)if(S.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(x=o.length;x--;)ct(o[x]);ot(t)}else t.__e=r.__e,t.__k=r.__k,S.then||ot(t);L.__e(S,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=Pn(r.__e,t,r,i,n,o,l,c,u);return(m=L.diffed)&&m(t),128&t.__u?void 0:s}function ot(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ot))}function pn(e,t,r){for(var i=0;i<r.length;i++)dt(r[i],r[++i],r[++i]);L.__c&&L.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(o){o.call(n)})}catch(o){L.__e(o,n.__v)}})}function _n(e){return typeof e!="object"||e==null||e.__b>0?e:Te(e)?e.map(_n):W({},e)}function Pn(e,t,r,i,n,o,l,s,c){var u,m,d,h,f,v,C,B=r.props||Ne,_=t.props,y=t.type;if(y=="svg"?n="http://www.w3.org/2000/svg":y=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((f=o[u])&&"setAttribute"in f==!!y&&(y?f.localName==y:f.nodeType==3)){e=f,o[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(_);e=document.createElementNS(n,y,_.is&&_),s&&(L.__m&&L.__m(t,o),s=!1),o=null}if(y==null)B===_||s&&e.data==_||(e.data=_);else{if(o=o&&Ee.call(e.childNodes),!s&&o!=null)for(B={},u=0;u<e.attributes.length;u++)B[(f=e.attributes[u]).name]=f.value;for(u in B)f=B[u],u=="dangerouslySetInnerHTML"?d=f:u=="children"||u in _||u=="value"&&"defaultValue"in _||u=="checked"&&"defaultChecked"in _||pe(e,u,null,f,n);for(u in _)f=_[u],u=="children"?h=f:u=="dangerouslySetInnerHTML"?m=f:u=="value"?v=f:u=="checked"?C=f:s&&typeof f!="function"||B[u]===f||pe(e,u,f,B[u],n);if(m)s||d&&(m.__html==d.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(d&&(e.innerHTML=""),hn(t.type=="template"?e.content:e,Te(h)?h:[h],t,r,i,y=="foreignObject"?"http://www.w3.org/1999/xhtml":n,o,l,o?o[0]:r.__k&&le(r,0),s,c),o!=null)for(u=o.length;u--;)ct(o[u]);s||(u="value",y=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[u]||y=="progress"&&!v||y=="option"&&v!=B[u])&&pe(e,u,v,B[u],n),u="checked",C!=null&&C!=e[u]&&pe(e,u,C,B[u],n))}return e}function dt(e,t,r){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(n){L.__e(n,r)}}function gn(e,t,r){var i,n;if(L.unmount&&L.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||dt(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){L.__e(o,t)}i.base=i.__P=null}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&gn(i[n],t,r||typeof e.type!="function");r||ct(e.__e),e.__c=e.__=e.__e=void 0}function Bn(e,t,r){return this.constructor(e,r)}function Mn(e,t,r){var i,n,o,l;t==document&&(t=document.documentElement),L.__&&L.__(e,t),n=(i=!1)?null:t.__k,o=[],l=[],ut(t,e=t.__k=Tn(ee,null,[e]),n||Ne,Ne,t.namespaceURI,n?null:t.firstChild?Ee.call(t.childNodes):null,o,n?n.__e:t.firstChild,i,l),pn(o,e,l)}Ee=Ce.slice,L={__e:function(e,t,r,i){for(var n,o,l;t=t.__;)if((n=t.__c)&&!n.__)try{if((o=n.constructor)&&o.getDerivedStateFromError!=null&&(n.setState(o.getDerivedStateFromError(e)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,i||{}),l=n.__d),l)return n.__E=n}catch(s){e=s}throw e}},an=0,xe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=W({},this.state),typeof e=="function"&&(e=e(W({},r),this.props)),e&&W(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),gt(this))},xe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gt(this))},xe.prototype.render=ee,$=[],cn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,un=function(e,t){return e.__v.__b-t.__v.__b},ke.__r=0,Re=Math.random().toString(8),ve="__d"+Re,fe="__a"+Re,dn=/(PointerCapture)$|Capture$/i,at=0,nt=vt(!1),rt=vt(!0);var Dn=0;function a(e,t,r,i,n,o){t||(t={});var l,s,c=t;if("ref"in c)for(s in c={},t)s=="ref"?l=t[s]:c[s]=t[s];var u={type:e,props:c,key:r,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Dn,__i:-1,__u:0,__source:n,__self:o};if(typeof e=="function"&&(l=e.defaultProps))for(s in l)c[s]===void 0&&(c[s]=l[s]);return L.vnode&&L.vnode(u),u}var me,q,Ie,bt,Se=0,yn=[],j=L,xt=j.__b,wt=j.__r,Nt=j.diffed,Ct=j.__c,kt=j.unmount,St=j.__;function ft(e,t){j.__h&&j.__h(q,e,Se||t),Se=0;var r=q.__H||(q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function U(e){return Se=1,Ln(bn,e)}function Ln(e,t,r){var i=ft(me++,2);if(i.t=e,!i.__c&&(i.__=[bn(void 0,t),function(s){var c=i.__N?i.__N[0]:i.__[0],u=i.t(c,s);c!==u&&(i.__N=[u,i.__[1]],i.__c.setState({}))}],i.__c=q,!q.__f)){var n=function(s,c,u){if(!i.__c.__H)return!0;var m=i.__c.__H.__.filter(function(h){return h.__c});if(m.every(function(h){return!h.__N}))return!o||o.call(this,s,c,u);var d=i.__c.props!==s;return m.some(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(d=!0)}}),o&&o.call(this,s,c,u)||d};q.__f=!0;var o=q.shouldComponentUpdate,l=q.componentWillUpdate;q.componentWillUpdate=function(s,c,u){if(this.__e){var m=o;o=void 0,n(s,c,u),o=m}l&&l.call(this,s,c,u)},q.shouldComponentUpdate=n}return i.__N||i.__}function ie(e,t){var r=ft(me++,3);!j.__s&&vn(r.__H,t)&&(r.__=e,r.u=t,q.__H.__h.push(r))}function ht(e){return Se=5,Un(function(){return{current:e}},[])}function Un(e,t){var r=ft(me++,7);return vn(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function qn(){for(var e;e=yn.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(we),t.__h.some(it),t.__h=[]}catch(r){t.__h=[],j.__e(r,e.__v)}}}j.__b=function(e){q=null,xt&&xt(e)},j.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),St&&St(e,t)},j.__r=function(e){wt&&wt(e),me=0;var t=(q=e.__c).__H;t&&(Ie===q?(t.__h=[],q.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(we),t.__h.some(it),t.__h=[],me=0)),Ie=q},j.diffed=function(e){Nt&&Nt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(yn.push(t)!==1&&bt===j.requestAnimationFrame||((bt=j.requestAnimationFrame)||jn)(qn)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ie=q=null},j.__c=function(e,t){t.some(function(r){try{r.__h.some(we),r.__h=r.__h.filter(function(i){return!i.__||it(i)})}catch(i){t.some(function(n){n.__h&&(n.__h=[])}),t=[],j.__e(i,r.__v)}}),Ct&&Ct(e,t)},j.unmount=function(e){kt&&kt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(i){try{we(i)}catch(n){t=n}}),r.__H=void 0,t&&j.__e(t,r.__v))};var Et=typeof requestAnimationFrame=="function";function jn(e){var t,r=function(){clearTimeout(i),Et&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,35);Et&&(t=requestAnimationFrame(r))}function we(e){var t=q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),q=t}function it(e){var t=q;e.__c=e.__(),q=t}function vn(e,t){return!e||e.length!==t.length||t.some(function(r,i){return r!==e[i]})}function bn(e,t){return typeof t=="function"?t(e):t}const Fn=[{icon:"download",label:"Preparing",desc:"Checking tunnel binary"},{icon:"cloud_sync",label:"Connecting",desc:"Creating session"},{icon:"lan",label:"Tunneling",desc:"Starting secure tunnel"},{icon:"verified",label:"Verifying",desc:"Health check"},{icon:"check_circle",label:"Ready",desc:"Connected"}],On=3;function Hn({currentStep:e,activeDesc:t="",healthCheck:r}){var o;const i=e-1,n=(o=r==null?void 0:r.logs)!=null&&o.length?r.logs[r.logs.length-1]:null;return a("div",{className:"glass-card p-5 flex flex-col gap-4",children:[a("span",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"Setting up connection"}),a("div",{className:"flex flex-col gap-3",children:Fn.map((l,s)=>{const c=s<i,u=s===i,m=u&&s===On;let d=u&&t?t:l.desc,h="var(--text-muted)";if(m&&n){const f=/^\d{3}$/.test(String(n.status));d=`#${n.attempt} → ${n.status}`,h=n.ok||n.waiting?"#22c55e":f?"#eab308":"#ef4444"}return a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0",style:{background:c?"var(--brand-500)":u?"rgba(255,87,10,0.15)":"var(--glass-bg)",border:u?"1.5px solid var(--brand-500)":"1.5px solid transparent"},children:c?a("span",{className:"material-symbols-outlined text-white",style:{fontSize:16},children:"check"}):u?a("span",{className:"flex gap-0.5 items-center",children:[0,1,2].map(f=>a("span",{className:"w-1 h-1 rounded-full bg-orange-400 dot-bounce",style:{animationDelay:`${f*.18}s`}},f))}):a("span",{className:"material-symbols-outlined",style:{fontSize:16,color:"var(--text-muted)",opacity:.3},children:l.icon})}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-medium",style:{color:c?"var(--text-muted)":u?"var(--text-main)":"var(--text-muted)",opacity:c||u?1:.4},children:l.label}),a("p",{className:"text-xs mt-0.5 truncate",style:{color:h,opacity:u?m&&n?.95:.7:.4,fontFamily:m&&n?"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace":void 0},children:d})]}),c&&a("span",{className:"text-xs flex-shrink-0",style:{color:"var(--text-muted)"},children:"Done"}),u&&a("span",{className:"text-xs flex-shrink-0 px-2 py-0.5 rounded-full",style:{background:"rgba(255,87,10,0.15)",color:"var(--brand-400)"},children:"Running"})]},s)})})]})}function zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe={},Pe,Tt;function Kn(){return Tt||(Tt=1,Pe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Pe}var Be={},Z={},At;function te(){if(At)return Z;At=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Z.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},Z.getSymbolTotalCodewords=function(i){return t[i]},Z.getBCHDigit=function(r){let i=0;for(;r!==0;)i++,r>>>=1;return i},Z.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');e=i},Z.isKanjiModeEnabled=function(){return typeof e<"u"},Z.toSJIS=function(i){return e(i)},Z}var Me={},Rt;function mt(){return Rt||(Rt=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,n){if(e.isValid(i))return i;try{return t(i)}catch{return n}}})(Me)),Me}var De,It;function Vn(){if(It)return De;It=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let i=0;i<r;i++)this.putBit((t>>>r-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},De=e,De}var Le,Pt;function Jn(){if(Pt)return Le;Pt=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,i,n){const o=t*this.size+r;this.data[o]=i,n&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,i){this.data[t*this.size+r]^=i},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},Le=e,Le}var Ue={},Bt;function Yn(){return Bt||(Bt=1,(function(e){const t=te().getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,o=t(i),l=o===145?26:Math.ceil((o-13)/(2*n-2))*2,s=[o-7];for(let c=1;c<n-1;c++)s[c]=s[c-1]-l;return s.push(6),s.reverse()},e.getPositions=function(i){const n=[],o=e.getRowColCoords(i),l=o.length;for(let s=0;s<l;s++)for(let c=0;c<l;c++)s===0&&c===0||s===0&&c===l-1||s===l-1&&c===0||n.push([o[s],o[c]]);return n}})(Ue)),Ue}var qe={},Mt;function Gn(){if(Mt)return qe;Mt=1;const e=te().getSymbolSize,t=7;return qe.getPositions=function(i){const n=e(i);return[[0,0],[n-t,0],[0,n-t]]},qe}var je={},Dt;function Qn(){return Dt||(Dt=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const o=n.size;let l=0,s=0,c=0,u=null,m=null;for(let d=0;d<o;d++){s=c=0,u=m=null;for(let h=0;h<o;h++){let f=n.get(d,h);f===u?s++:(s>=5&&(l+=t.N1+(s-5)),u=f,s=1),f=n.get(h,d),f===m?c++:(c>=5&&(l+=t.N1+(c-5)),m=f,c=1)}s>=5&&(l+=t.N1+(s-5)),c>=5&&(l+=t.N1+(c-5))}return l},e.getPenaltyN2=function(n){const o=n.size;let l=0;for(let s=0;s<o-1;s++)for(let c=0;c<o-1;c++){const u=n.get(s,c)+n.get(s,c+1)+n.get(s+1,c)+n.get(s+1,c+1);(u===4||u===0)&&l++}return l*t.N2},e.getPenaltyN3=function(n){const o=n.size;let l=0,s=0,c=0;for(let u=0;u<o;u++){s=c=0;for(let m=0;m<o;m++)s=s<<1&2047|n.get(u,m),m>=10&&(s===1488||s===93)&&l++,c=c<<1&2047|n.get(m,u),m>=10&&(c===1488||c===93)&&l++}return l*t.N3},e.getPenaltyN4=function(n){let o=0;const l=n.data.length;for(let c=0;c<l;c++)o+=n.data[c];return Math.abs(Math.ceil(o*100/l/5)-10)*t.N4};function r(i,n,o){switch(i){case e.Patterns.PATTERN000:return(n+o)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(n+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return n*o%2+n*o%3===0;case e.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case e.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(n,o){const l=o.size;for(let s=0;s<l;s++)for(let c=0;c<l;c++)o.isReserved(c,s)||o.xor(c,s,r(n,c,s))},e.getBestMask=function(n,o){const l=Object.keys(e.Patterns).length;let s=0,c=1/0;for(let u=0;u<l;u++){o(u),e.applyMask(u,n);const m=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),m<c&&(c=m,s=u)}return s}})(je)),je}var _e={},Lt;function xn(){if(Lt)return _e;Lt=1;const e=mt(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return _e.getBlocksCount=function(n,o){switch(o){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},_e.getTotalCodewordsCount=function(n,o){switch(o){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},_e}var Fe={},de={},Ut;function Wn(){if(Ut)return de;Ut=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let i=1;for(let n=0;n<255;n++)e[n]=i,t[i]=n,i<<=1,i&256&&(i^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),de.log=function(i){if(i<1)throw new Error("log("+i+")");return t[i]},de.exp=function(i){return e[i]},de.mul=function(i,n){return i===0||n===0?0:e[t[i]+t[n]]},de}var qt;function Xn(){return qt||(qt=1,(function(e){const t=Wn();e.mul=function(i,n){const o=new Uint8Array(i.length+n.length-1);for(let l=0;l<i.length;l++)for(let s=0;s<n.length;s++)o[l+s]^=t.mul(i[l],n[s]);return o},e.mod=function(i,n){let o=new Uint8Array(i);for(;o.length-n.length>=0;){const l=o[0];for(let c=0;c<n.length;c++)o[c]^=t.mul(n[c],l);let s=0;for(;s<o.length&&o[s]===0;)s++;o=o.slice(s)}return o},e.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let o=0;o<i;o++)n=e.mul(n,new Uint8Array([1,t.exp(o)]));return n}})(Fe)),Fe}var Oe,jt;function Zn(){if(jt)return Oe;jt=1;const e=Xn();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(i){this.degree=i,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(i.length+this.degree);n.set(i);const o=e.mod(n,this.genPoly),l=this.degree-o.length;if(l>0){const s=new Uint8Array(this.degree);return s.set(o,l),s}return o},Oe=t,Oe}var He={},ze={},Ke={},Ft;function wn(){return Ft||(Ft=1,Ke.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Ke}var Y={},Ot;function Nn(){if(Ot)return Y;Ot=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
|
|
2
|
-
]))+`;Y.KANJI=new RegExp(r,"g"),Y.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Y.BYTE=new RegExp(i,"g"),Y.NUMERIC=new RegExp(e,"g"),Y.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),o=new RegExp("^"+e+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Y.testKanji=function(c){return n.test(c)},Y.testNumeric=function(c){return o.test(c)},Y.testAlphanumeric=function(c){return l.test(c)},Y}var Ht;function ne(){return Ht||(Ht=1,(function(e){const t=wn(),r=Nn();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,l){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?o.ccBits[0]:l<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return r.testNumeric(o)?e.NUMERIC:r.testAlphanumeric(o)?e.ALPHANUMERIC:r.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(o,l){if(e.isValid(o))return o;try{return i(o)}catch{return l}}})(ze)),ze}var zt;function $n(){return zt||(zt=1,(function(e){const t=te(),r=xn(),i=mt(),n=ne(),o=wn(),l=7973,s=t.getBCHDigit(l);function c(h,f,v){for(let C=1;C<=40;C++)if(f<=e.getCapacity(C,v,h))return C}function u(h,f){return n.getCharCountIndicator(h,f)+4}function m(h,f){let v=0;return h.forEach(function(C){const B=u(C.mode,f);v+=B+C.getBitsLength()}),v}function d(h,f){for(let v=1;v<=40;v++)if(m(h,v)<=e.getCapacity(v,f,n.MIXED))return v}e.from=function(f,v){return o.isValid(f)?parseInt(f,10):v},e.getCapacity=function(f,v,C){if(!o.isValid(f))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=n.BYTE);const B=t.getSymbolTotalCodewords(f),_=r.getTotalCodewordsCount(f,v),y=(B-_)*8;if(C===n.MIXED)return y;const w=y-u(C,f);switch(C){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},e.getBestVersionForData=function(f,v){let C;const B=i.from(v,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,B);if(f.length===0)return 1;C=f[0]}else C=f;return c(C.mode,C.getLength(),B)},e.getEncodedBits=function(f){if(!o.isValid(f)||f<7)throw new Error("Invalid QR Code version");let v=f<<12;for(;t.getBCHDigit(v)-s>=0;)v^=l<<t.getBCHDigit(v)-s;return f<<12|v}})(He)),He}var Ve={},Kt;function er(){if(Kt)return Ve;Kt=1;const e=te(),t=1335,r=21522,i=e.getBCHDigit(t);return Ve.getEncodedBits=function(o,l){const s=o.bit<<3|l;let c=s<<10;for(;e.getBCHDigit(c)-i>=0;)c^=t<<e.getBCHDigit(c)-i;return(s<<10|c)^r},Ve}var Je={},Ye,Vt;function tr(){if(Vt)return Ye;Vt=1;const e=ne();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(i){let n,o,l;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),l=parseInt(o,10),i.put(l,10);const s=this.data.length-n;s>0&&(o=this.data.substr(n),l=parseInt(o,10),i.put(l,s*3+1))},Ye=t,Ye}var Ge,Jt;function nr(){if(Jt)return Ge;Jt=1;const e=ne(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(i){this.mode=e.ALPHANUMERIC,this.data=i}return r.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let o;for(o=0;o+2<=this.data.length;o+=2){let l=t.indexOf(this.data[o])*45;l+=t.indexOf(this.data[o+1]),n.put(l,11)}this.data.length%2&&n.put(t.indexOf(this.data[o]),6)},Ge=r,Ge}var Qe,Yt;function rr(){if(Yt)return Qe;Yt=1;const e=ne();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(i){return i*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let i=0,n=this.data.length;i<n;i++)r.put(this.data[i],8)},Qe=t,Qe}var We,Gt;function or(){if(Gt)return We;Gt=1;const e=ne(),t=te();function r(i){this.mode=e.KANJI,this.data=i}return r.getBitsLength=function(n){return n*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(i){let n;for(n=0;n<this.data.length;n++){let o=t.toSJIS(this.data[n]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
|
|
3
|
-
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),i.put(o,13)}},We=r,We}var Xe={exports:{}},Qt;function ir(){return Qt||(Qt=1,(function(e){var t={single_source_shortest_paths:function(r,i,n){var o={},l={};l[i]=0;var s=t.PriorityQueue.make();s.push(i,0);for(var c,u,m,d,h,f,v,C,B;!s.empty();){c=s.pop(),u=c.value,d=c.cost,h=r[u]||{};for(m in h)h.hasOwnProperty(m)&&(f=h[m],v=d+f,C=l[m],B=typeof l[m]>"u",(B||C>v)&&(l[m]=v,s.push(m,v),o[m]=u))}if(typeof n<"u"&&typeof l[n]>"u"){var _=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(_)}return o},extract_shortest_path_from_predecessor_list:function(r,i){for(var n=[],o=i;o;)n.push(o),r[o],o=r[o];return n.reverse(),n},find_path:function(r,i,n){var o=t.single_source_shortest_paths(r,i,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(r){var i=t.PriorityQueue,n={},o;r=r||{};for(o in i)i.hasOwnProperty(o)&&(n[o]=i[o]);return n.queue=[],n.sorter=r.sorter||i.default_sorter,n},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var n={value:r,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Xe)),Xe.exports}var Wt;function lr(){return Wt||(Wt=1,(function(e){const t=ne(),r=tr(),i=nr(),n=rr(),o=or(),l=Nn(),s=te(),c=ir();function u(_){return unescape(encodeURIComponent(_)).length}function m(_,y,w){const N=[];let M;for(;(M=_.exec(w))!==null;)N.push({data:M[0],index:M.index,mode:y,length:M[0].length});return N}function d(_){const y=m(l.NUMERIC,t.NUMERIC,_),w=m(l.ALPHANUMERIC,t.ALPHANUMERIC,_);let N,M;return s.isKanjiModeEnabled()?(N=m(l.BYTE,t.BYTE,_),M=m(l.KANJI,t.KANJI,_)):(N=m(l.BYTE_KANJI,t.BYTE,_),M=[]),y.concat(w,N,M).sort(function(k,x){return k.index-x.index}).map(function(k){return{data:k.data,mode:k.mode,length:k.length}})}function h(_,y){switch(y){case t.NUMERIC:return r.getBitsLength(_);case t.ALPHANUMERIC:return i.getBitsLength(_);case t.KANJI:return o.getBitsLength(_);case t.BYTE:return n.getBitsLength(_)}}function f(_){return _.reduce(function(y,w){const N=y.length-1>=0?y[y.length-1]:null;return N&&N.mode===w.mode?(y[y.length-1].data+=w.data,y):(y.push(w),y)},[])}function v(_){const y=[];for(let w=0;w<_.length;w++){const N=_[w];switch(N.mode){case t.NUMERIC:y.push([N,{data:N.data,mode:t.ALPHANUMERIC,length:N.length},{data:N.data,mode:t.BYTE,length:N.length}]);break;case t.ALPHANUMERIC:y.push([N,{data:N.data,mode:t.BYTE,length:N.length}]);break;case t.KANJI:y.push([N,{data:N.data,mode:t.BYTE,length:u(N.data)}]);break;case t.BYTE:y.push([{data:N.data,mode:t.BYTE,length:u(N.data)}])}}return y}function C(_,y){const w={},N={start:{}};let M=["start"];for(let b=0;b<_.length;b++){const k=_[b],x=[];for(let g=0;g<k.length;g++){const S=k[g],E=""+b+g;x.push(E),w[E]={node:S,lastCount:0},N[E]={};for(let A=0;A<M.length;A++){const T=M[A];w[T]&&w[T].node.mode===S.mode?(N[T][E]=h(w[T].lastCount+S.length,S.mode)-h(w[T].lastCount,S.mode),w[T].lastCount+=S.length):(w[T]&&(w[T].lastCount=S.length),N[T][E]=h(S.length,S.mode)+4+t.getCharCountIndicator(S.mode,y))}}M=x}for(let b=0;b<M.length;b++)N[M[b]].end=0;return{map:N,table:w}}function B(_,y){let w;const N=t.getBestModeForData(_);if(w=t.from(y,N),w!==t.BYTE&&w.bit<N.bit)throw new Error('"'+_+'" cannot be encoded with mode '+t.toString(w)+`.
|
|
4
|
-
Suggested mode is: `+t.toString(N));switch(w===t.KANJI&&!s.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new r(_);case t.ALPHANUMERIC:return new i(_);case t.KANJI:return new o(_);case t.BYTE:return new n(_)}}e.fromArray=function(y){return y.reduce(function(w,N){return typeof N=="string"?w.push(B(N,null)):N.data&&w.push(B(N.data,N.mode)),w},[])},e.fromString=function(y,w){const N=d(y,s.isKanjiModeEnabled()),M=v(N),b=C(M,w),k=c.find_path(b.map,"start","end"),x=[];for(let g=1;g<k.length-1;g++)x.push(b.table[k[g]].node);return e.fromArray(f(x))},e.rawSplit=function(y){return e.fromArray(d(y,s.isKanjiModeEnabled()))}})(Je)),Je}var Xt;function sr(){if(Xt)return Be;Xt=1;const e=te(),t=mt(),r=Vn(),i=Jn(),n=Yn(),o=Gn(),l=Qn(),s=xn(),c=Zn(),u=$n(),m=er(),d=ne(),h=lr();function f(b,k){const x=b.size,g=o.getPositions(k);for(let S=0;S<g.length;S++){const E=g[S][0],A=g[S][1];for(let T=-1;T<=7;T++)if(!(E+T<=-1||x<=E+T))for(let I=-1;I<=7;I++)A+I<=-1||x<=A+I||(T>=0&&T<=6&&(I===0||I===6)||I>=0&&I<=6&&(T===0||T===6)||T>=2&&T<=4&&I>=2&&I<=4?b.set(E+T,A+I,!0,!0):b.set(E+T,A+I,!1,!0))}}function v(b){const k=b.size;for(let x=8;x<k-8;x++){const g=x%2===0;b.set(x,6,g,!0),b.set(6,x,g,!0)}}function C(b,k){const x=n.getPositions(k);for(let g=0;g<x.length;g++){const S=x[g][0],E=x[g][1];for(let A=-2;A<=2;A++)for(let T=-2;T<=2;T++)A===-2||A===2||T===-2||T===2||A===0&&T===0?b.set(S+A,E+T,!0,!0):b.set(S+A,E+T,!1,!0)}}function B(b,k){const x=b.size,g=u.getEncodedBits(k);let S,E,A;for(let T=0;T<18;T++)S=Math.floor(T/3),E=T%3+x-8-3,A=(g>>T&1)===1,b.set(S,E,A,!0),b.set(E,S,A,!0)}function _(b,k,x){const g=b.size,S=m.getEncodedBits(k,x);let E,A;for(E=0;E<15;E++)A=(S>>E&1)===1,E<6?b.set(E,8,A,!0):E<8?b.set(E+1,8,A,!0):b.set(g-15+E,8,A,!0),E<8?b.set(8,g-E-1,A,!0):E<9?b.set(8,15-E-1+1,A,!0):b.set(8,15-E-1,A,!0);b.set(g-8,8,1,!0)}function y(b,k){const x=b.size;let g=-1,S=x-1,E=7,A=0;for(let T=x-1;T>0;T-=2)for(T===6&&T--;;){for(let I=0;I<2;I++)if(!b.isReserved(S,T-I)){let F=!1;A<k.length&&(F=(k[A]>>>E&1)===1),b.set(S,T-I,F),E--,E===-1&&(A++,E=7)}if(S+=g,S<0||x<=S){S-=g,g=-g;break}}}function w(b,k,x){const g=new r;x.forEach(function(I){g.put(I.mode.bit,4),g.put(I.getLength(),d.getCharCountIndicator(I.mode,b)),I.write(g)});const S=e.getSymbolTotalCodewords(b),E=s.getTotalCodewordsCount(b,k),A=(S-E)*8;for(g.getLengthInBits()+4<=A&&g.put(0,4);g.getLengthInBits()%8!==0;)g.putBit(0);const T=(A-g.getLengthInBits())/8;for(let I=0;I<T;I++)g.put(I%2?17:236,8);return N(g,b,k)}function N(b,k,x){const g=e.getSymbolTotalCodewords(k),S=s.getTotalCodewordsCount(k,x),E=g-S,A=s.getBlocksCount(k,x),T=g%A,I=A-T,F=Math.floor(g/A),O=Math.floor(E/A),se=O+1,V=F-O,ae=new c(V);let z=0;const X=new Array(A),re=new Array(A);let G=0;const ce=new Uint8Array(b.buffer);for(let P=0;P<A;P++){const K=P<I?O:se;X[P]=ce.slice(z,z+K),re[P]=ae.encode(X[P]),z+=K,G=Math.max(G,K)}const Q=new Uint8Array(g);let R=0,D,p;for(D=0;D<G;D++)for(p=0;p<A;p++)D<X[p].length&&(Q[R++]=X[p][D]);for(D=0;D<V;D++)for(p=0;p<A;p++)Q[R++]=re[p][D];return Q}function M(b,k,x,g){let S;if(Array.isArray(b))S=h.fromArray(b);else if(typeof b=="string"){let F=k;if(!F){const O=h.rawSplit(b);F=u.getBestVersionForData(O,x)}S=h.fromString(b,F||40)}else throw new Error("Invalid data");const E=u.getBestVersionForData(S,x);if(!E)throw new Error("The amount of data is too big to be stored in a QR Code");if(!k)k=E;else if(k<E)throw new Error(`
|
|
5
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
6
|
-
Minimum version required to store current data is: `+E+`.
|
|
7
|
-
`);const A=w(k,x,S),T=e.getSymbolSize(k),I=new i(T);return f(I,k),v(I),C(I,k),_(I,x,0),k>=7&&B(I,k),y(I,A),isNaN(g)&&(g=l.getBestMask(I,_.bind(null,I,x))),l.applyMask(g,I),_(I,x,g),{modules:I,version:k,errorCorrectionLevel:x,maskPattern:g,segments:S}}return Be.create=function(k,x){if(typeof k>"u"||k==="")throw new Error("No input text");let g=t.M,S,E;return typeof x<"u"&&(g=t.from(x.errorCorrectionLevel,t.M),S=u.from(x.version),E=l.from(x.maskPattern),x.toSJISFunc&&e.setToSJISFunction(x.toSJISFunc)),M(k,S,g,E)},Be}var Ze={},$e={},Zt;function Cn(){return Zt||(Zt=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,l=i.scale||4;return{width:o,scale:o?4:l,margin:n,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},e.getImageWidth=function(i,n){const o=e.getScale(i,n);return Math.floor((i+n.margin*2)*o)},e.qrToImageData=function(i,n,o){const l=n.modules.size,s=n.modules.data,c=e.getScale(l,o),u=Math.floor((l+o.margin*2)*c),m=o.margin*c,d=[o.color.light,o.color.dark];for(let h=0;h<u;h++)for(let f=0;f<u;f++){let v=(h*u+f)*4,C=o.color.light;if(h>=m&&f>=m&&h<u-m&&f<u-m){const B=Math.floor((h-m)/c),_=Math.floor((f-m)/c);C=d[s[B*l+_]?1:0]}i[v++]=C.r,i[v++]=C.g,i[v++]=C.b,i[v]=C.a}}})($e)),$e}var $t;function ar(){return $t||($t=1,(function(e){const t=Cn();function r(n,o,l){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=l,o.width=l,o.style.height=l+"px",o.style.width=l+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,l,s){let c=s,u=l;typeof c>"u"&&(!l||!l.getContext)&&(c=l,l=void 0),l||(u=i()),c=t.getOptions(c);const m=t.getImageWidth(o.modules.size,c),d=u.getContext("2d"),h=d.createImageData(m,m);return t.qrToImageData(h.data,o,c),r(d,u,m),d.putImageData(h,0,0),u},e.renderToDataURL=function(o,l,s){let c=s;typeof c>"u"&&(!l||!l.getContext)&&(c=l,l=void 0),c||(c={});const u=e.render(o,l,c),m=c.type||"image/png",d=c.rendererOpts||{};return u.toDataURL(m,d.quality)}})(Ze)),Ze}var et={},en;function cr(){if(en)return et;en=1;const e=Cn();function t(n,o){const l=n.a/255,s=o+'="'+n.hex+'"';return l<1?s+" "+o+'-opacity="'+l.toFixed(2).slice(1)+'"':s}function r(n,o,l){let s=n+o;return typeof l<"u"&&(s+=" "+l),s}function i(n,o,l){let s="",c=0,u=!1,m=0;for(let d=0;d<n.length;d++){const h=Math.floor(d%o),f=Math.floor(d/o);!h&&!u&&(u=!0),n[d]?(m++,d>0&&h>0&&n[d-1]||(s+=u?r("M",h+l,.5+f+l):r("m",c,0),c=0,u=!1),h+1<o&&n[d+1]||(s+=r("h",m),m=0)):c++}return s}return et.render=function(o,l,s){const c=e.getOptions(l),u=o.modules.size,m=o.modules.data,d=u+c.margin*2,h=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",f="<path "+t(c.color.dark,"stroke")+' d="'+i(m,u,c.margin)+'"/>',v='viewBox="0 0 '+d+" "+d+'"',B='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+v+' shape-rendering="crispEdges">'+h+f+`</svg>
|
|
8
|
-
`;return typeof s=="function"&&s(null,B),B},et}var tn;function ur(){if(tn)return oe;tn=1;const e=Kn(),t=sr(),r=ar(),i=cr();function n(o,l,s,c,u){const m=[].slice.call(arguments,1),d=m.length,h=typeof m[d-1]=="function";if(!h&&!e())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(u=s,s=l,l=c=void 0):d===3&&(l.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=s,s=l,l=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(s=l,l=c=void 0):d===2&&!l.getContext&&(c=s,s=l,l=void 0),new Promise(function(f,v){try{const C=t.create(s,c);f(o(C,l,c))}catch(C){v(C)}})}try{const f=t.create(s,c);u(null,o(f,l,c))}catch(f){u(f)}}return oe.create=t.create,oe.toCanvas=n.bind(null,r.render),oe.toDataURL=n.bind(null,r.renderToDataURL),oe.toString=n.bind(null,function(o,l,s){return i.render(o,s)}),oe}var dr=ur();const fr=zn(dr);function he({message:e,confirmLabel:t="Confirm",confirmDanger:r=!1,onConfirm:i,onCancel:n}){return a("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.6)"},children:a("div",{className:"glass-card p-5 flex flex-col gap-4 w-72",children:[a("p",{className:"text-sm text-center",style:{color:"var(--text-main)"},children:e}),a("div",{className:"flex gap-2",children:[a("button",{onClick:n,className:"glass-btn flex-1 py-2 text-sm",style:{color:"var(--text-muted)"},children:"Cancel"}),a("button",{onClick:i,className:"flex-1 py-2 text-sm font-semibold rounded-xl",style:{background:r?"rgba(220,53,69,0.8)":"var(--brand-500)",color:"#fff"},children:t})]})]})})}const nn="9remote.cc";function hr(e){if(e<=0)return"Expired";const t=Math.floor(e/1e3),r=Math.floor(t/60),i=t%60;return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}`}function ge({icon:e,onClick:t,title:r,danger:i}){return a("button",{onClick:t,title:r,className:"glass-btn w-7 h-7 flex items-center justify-center flex-shrink-0",style:i?{color:"rgba(255,100,100,0.7)"}:{color:"var(--text-muted)"},children:a("span",{className:"material-symbols-outlined",style:{fontSize:15},children:e})})}function rn({qrUrl:e,oneTimeKey:t,oneTimeKeyExpiresAt:r,permanentKey:i,onGenerateOneTimeKey:n,onRegenerateKey:o}){const l=ht(null),[s,c]=U(null),[u,m]=U(null),[d,h]=U(null);ie(()=>{!e||!l.current||fr.toCanvas(l.current,e,{width:160,margin:1,color:{dark:"#0f1923",light:"#ffffff"}}).catch(()=>{})},[e]),ie(()=>{if(!r){c(null);return}const v=()=>c(r-Date.now());v();const C=setInterval(v,1e3);return()=>clearInterval(C)},[r]);const f=(v,C)=>{navigator.clipboard.writeText(v).catch(()=>{}),m(C),setTimeout(()=>m(null),2e3)};return a(ee,{children:[d==="oneTime"&&a(he,{message:"Generate a new one-time key? The current one will expire immediately.",confirmLabel:"Generate",onConfirm:()=>{h(null),n==null||n()},onCancel:()=>h(null)}),d==="regen"&&a(he,{message:"Regenerate permanent key? All existing sessions will be disconnected.",confirmLabel:"Regenerate",confirmDanger:!0,onConfirm:()=>{h(null),o==null||o()},onCancel:()=>h(null)}),a("div",{className:"glass-card p-5 flex flex-col items-center gap-4",children:[a("div",{className:"w-44 h-44 rounded-xl overflow-hidden bg-white p-2 flex items-center justify-center flex-shrink-0",children:e?a("canvas",{ref:l}):a("span",{className:"material-symbols-outlined text-gray-300 text-6xl",children:"qr_code_2"})}),a("div",{className:"flex flex-col items-center gap-1",children:[a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Scan QR or open link to sign in"}),a("a",{href:`https://${nn}/login`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:underline transition-opacity",children:[a("span",{className:"w-2 h-2 rounded-full bg-green-400 flex-shrink-0"}),a("span",{className:"text-sm font-bold",style:{color:"var(--brand-500)"},children:[nn,"/login"]}),a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:14,color:"var(--brand-500)"},children:"open_in_new"})]})]}),a("div",{className:"w-full h-px",style:{background:"var(--border)"}}),a("div",{className:"w-full flex flex-col gap-1.5",children:[a("div",{className:"flex items-center justify-between px-0.5",children:[a("span",{className:"text-xs font-medium",style:{color:"var(--text-muted)"},children:"One-Time Key"}),a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Single use · expires"})]}),a("div",{className:"w-full flex items-center gap-2 dark-card px-3 py-2.5",children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:16,color:"var(--text-muted)"},children:"timer"}),a("span",{className:"flex-1 font-mono font-bold tracking-[0.18em] text-base truncate",style:{color:t?"var(--brand-500)":"var(--border)"},children:t||"• • • • • •"}),s!==null&&a("span",{className:`text-xs font-mono flex-shrink-0 ${s<=0?"text-red-400":""}`,style:s>0?{color:"var(--text-muted)"}:{},children:hr(s)}),t&&a(ge,{icon:u==="oneTime"?"check":"content_copy",onClick:()=>f(t,"oneTime"),title:"Copy one-time key"}),a(ge,{icon:"refresh",onClick:()=>h("oneTime"),title:"New one-time key"})]})]}),a("div",{className:"w-full flex flex-col gap-1.5",children:[a("div",{className:"flex items-center justify-between px-0.5",children:[a("span",{className:"text-xs font-medium",style:{color:"var(--text-muted)"},children:"Permanent Key"}),a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Reusable · no expiry"})]}),a("div",{className:"w-full flex items-center gap-2 dark-card px-3 py-2.5",children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:16,color:"var(--text-muted)"},children:"key"}),a("span",{className:"flex-1 font-mono text-xs truncate",style:{color:"var(--text-muted)"},children:i||"— not set —"}),i&&a(ge,{icon:u==="permanent"?"check":"content_copy",onClick:()=>f(i,"permanent"),title:"Copy permanent key"}),a(ge,{icon:"autorenew",onClick:()=>h("regen"),title:"Regenerate permanent key",danger:!0})]})]})]})]})}const mr="https://docs.9remote.cc/",kn={screenRecording:{label:"Screen Recording",icon:"screenshot_monitor",desc:"Capture screen content"},accessibility:{label:"Accessibility",icon:"accessibility_new",desc:"Control mouse & keyboard"}};function pr({type:e,granted:t,onRequest:r}){const i=kn[e]||{label:e,desc:""};return a("div",{className:"flex items-center gap-3 py-2 border-b last:border-0",style:{borderColor:"var(--border)"},children:[a("span",{className:`material-symbols-outlined flex-shrink-0 ${t?"text-green-400":""}`,style:{fontSize:18,color:t?void 0:"var(--text-muted)"},children:t?"check_circle":"cancel"}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:t?"var(--text-main)":"var(--text-muted)"},children:i.label}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:i.desc})]}),!t&&a("button",{onClick:()=>r(e),title:"Click to grant permission",className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:"var(--border)",cursor:"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]})}function _r({icon:e,label:t,desc:r,value:i,onToggle:n,activeColor:o="var(--brand-500)"}){return a("div",{className:"flex items-center gap-3 py-2 border-b last:border-0",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:i?"var(--brand-400)":"var(--text-muted)"},children:e}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:"var(--text-main)"},children:t}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:r})]}),a("button",{onClick:n,className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:i?o:"var(--border)",cursor:"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:i?"calc(100% - 22px)":"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]})}function gr({desktopEnabled:e,onDesktopToggle:t,permissions:r,onRequestPermission:i,autoStart:n,onAutoStartToggle:o}){const l=Object.entries(kn),c=!l.every(([u])=>!!(r!=null&&r[u]))&&!e;return a("div",{className:"glass-card p-4 flex flex-col gap-3",children:[a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"rgba(255,87,10,0.15)"},children:a("span",{className:"material-symbols-outlined",style:{fontSize:20,color:"var(--brand-400)"},children:"terminal"})}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-semibold",style:{color:"var(--text-main)"},children:"Remote Terminal"}),a("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Full shell access · always on"})]}),a("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-full",style:{background:"rgba(74,222,128,0.1)"},children:[a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-400"}),a("span",{className:"text-xs text-green-400 font-medium",children:"On"})]})]}),a("div",{className:"w-full h-px",style:{background:"var(--border)"}}),a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:e?"rgba(255,87,10,0.15)":"var(--glass-bg)"},children:a("span",{className:"material-symbols-outlined",style:{fontSize:20,color:e?"var(--brand-400)":"var(--text-muted)"},children:"desktop_windows"})}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-semibold",style:{color:"var(--text-main)"},children:"Remote Desktop"}),a("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:"Control screen, mouse & keyboard"})]}),a("button",{onClick:c?void 0:t,disabled:c,title:c?"Grant all permissions below to enable":"",className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:e?"var(--brand-500)":"var(--border)",opacity:c?.5:1,cursor:c?"not-allowed":"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:e?"calc(100% - 22px)":"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]}),a("div",{className:"flex flex-col border-t pt-2",style:{borderColor:"var(--border)"},children:[a("p",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-muted)"},children:"System Permissions"}),l.map(([u])=>a(pr,{type:u,granted:(r==null?void 0:r[u])??!1,onRequest:i},u))]}),a("div",{className:"flex flex-col border-t pt-2",style:{borderColor:"var(--border)"},children:[a("p",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-muted)"},children:"Startup"}),a(_r,{icon:"power_settings_new",label:"Launch on system startup",desc:n?"Runs in background when you log in":"Disabled — start manually",value:!!n,onToggle:o})]})]})}function yr({version:e}){return e?a("div",{className:"px-5 py-2 flex items-center gap-2 border-b",style:{background:"rgba(255,87,10,0.08)",borderColor:"rgba(255,87,10,0.2)"},children:[a("span",{className:"material-symbols-outlined text-sm flex-shrink-0",style:{color:"var(--brand-400)"},children:"system_update"}),a("span",{className:"text-xs flex-1",style:{color:"var(--brand-400)"},children:["Version ",e," available"]}),a("button",{onClick:()=>fetch("/api/update",{method:"POST"}).catch(()=>{}),className:"flex-shrink-0 text-xs px-2 py-0.5 rounded font-medium",style:{background:"rgba(255,87,10,0.15)",color:"var(--brand-400)"},children:"Update"})]}):null}const vr=[{icon:"terminal",label:"Terminal",desc:"Full shell access"},{icon:"desktop_windows",label:"Desktop",desc:"Remote screen control"},{icon:"folder_open",label:"Files",desc:"Browse & edit files"}],br=[{icon:"qr_code_scanner",text:"Scan QR to connect instantly"},{icon:"wifi_off",text:"No port forwarding needed"},{icon:"devices",text:"Works on any device"}];function xr({onStart:e}){const[t,r]=U(!1),i=()=>{r(!0),e()};return a("div",{className:"flex-1 flex flex-col items-center justify-between px-6 py-6 overflow-y-auto",children:[a("div",{className:"flex flex-col items-center gap-2 text-center mt-2",children:[a("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mb-1",style:{background:"var(--brand-500)",boxShadow:"0 8px 32px rgba(255,87,10,0.35)"},children:a("span",{className:"material-symbols-outlined text-white",style:{fontSize:30},children:"terminal"})}),a("h1",{className:"text-lg font-bold tracking-tight",style:{color:"var(--text-main)"},children:"9Remote"}),a("p",{className:"text-xs leading-5 max-w-[220px]",style:{color:"var(--text-muted)"},children:"Access your terminal, desktop & files from anywhere"})]}),a("div",{className:"flex gap-2 w-full mt-5",children:vr.map(n=>a("div",{className:"flex-1 dark-card flex flex-col items-center gap-1.5 py-3 px-1",children:[a("span",{className:"material-symbols-outlined",style:{fontSize:22,color:"var(--brand-400)"},children:n.icon}),a("p",{className:"text-xs font-semibold",style:{color:"var(--text-main)"},children:n.label}),a("p",{className:"text-[10px] text-center leading-4",style:{color:"var(--text-muted)"},children:n.desc})]},n.label))}),a("div",{className:"flex flex-col gap-2 w-full mt-4",children:br.map(n=>a("div",{className:"flex items-center gap-2.5",children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:16,color:"var(--brand-400)"},children:n.icon}),a("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:n.text})]},n.text))}),a("button",{onClick:t?void 0:i,disabled:t,className:"btn-primary w-full py-3.5 flex items-center justify-center gap-2 text-sm font-semibold mt-6",style:{borderRadius:"var(--radius-brand)",opacity:t?.7:1},children:t?a(ee,{children:[a("span",{className:"flex gap-0.5 items-center",children:[0,1,2].map(n=>a("span",{className:"w-1.5 h-1.5 rounded-full bg-white dot-bounce",style:{animationDelay:`${n*.18}s`}},n))}),"Connecting..."]}):a(ee,{children:[a("span",{className:"material-symbols-outlined text-base",children:"play_arrow"}),"Connect"]})})]})}function wr(e,t,r=[]){const i=new Map;for(const s of t){if(!s.deviceId)continue;const c=i.get(s.deviceId);(!c||s.connectedAt&&s.connectedAt<c.connectedAt)&&i.set(s.deviceId,s)}const n=e.map(s=>{const c=i.get(s.deviceId);return{deviceId:s.deviceId,status:c?"online":"offline",ip:(c==null?void 0:c.ip)||null,connectedAt:(c==null?void 0:c.connectedAt)||null,approvedAt:s.approvedAt||null}}),o=r.map(s=>({deviceId:s.deviceId,status:"pending",ip:s.ip||null,connectedAt:null,approvedAt:null,rejectedAt:s.rejectedAt||null})),l={online:0,pending:1,offline:2};return[...n,...o].sort((s,c)=>l[s.status]-l[c.status])}const on={online:{color:"#4ade80",icon:"wifi",title:"Online"},offline:{color:"var(--text-muted)",icon:"wifi_off",title:"Offline"},pending:{color:"#f59e0b",icon:"hourglass_top",title:"Pending approval"}};function Nr({client:e,onRemove:t,onApprove:r}){const i=`${e.deviceId.slice(0,8)}...`,n=on[e.status]||on.offline,o=e.status==="online"?`Connected · ${e.connectedAt?new Date(e.connectedAt).toLocaleTimeString():""}`:e.status==="pending"?"Pending · waiting for approval":e.approvedAt?`Offline · approved ${new Date(e.approvedAt).toLocaleDateString()}`:"Offline",l=e.status==="online"?"Disconnect":"Remove";return a("div",{className:"flex items-center gap-3 py-2 border-b last:border-0",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:n.color},title:n.title,children:n.icon}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium font-mono truncate",style:{color:"var(--text-main)"},children:[i,e.ip?` · ${e.ip}`:""]}),a("p",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:o})]}),e.status==="pending"&&a("button",{onClick:()=>r==null?void 0:r(e),className:"flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium",style:{background:"rgba(74,222,128,0.15)",color:"#4ade80"},title:"Approve this device",children:"Approve"}),a("button",{onClick:()=>t(e),className:"flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium",style:{background:"rgba(220,53,69,0.15)",color:"#dc3545"},title:"Disconnect and remove this device",children:l})]})}const ln={healthy:{color:"#4ade80",label:"Healthy",dot:"bg-green-400"},unreachable:{color:"#dc3545",label:"Offline",dot:"bg-red-500"},unknown:{color:"var(--text-muted)",label:"Checking...",dot:"bg-gray-400"}};function ye({icon:e,title:t,danger:r,onClick:i}){return a("button",{onClick:i,title:t,className:r?"btn-danger w-7 h-7 flex items-center justify-center":"glass-btn w-7 h-7 flex items-center justify-center",style:r?void 0:{color:"var(--text-muted)"},children:a("span",{className:"material-symbols-outlined text-sm",children:e})})}function Cr({tunnelHealth:e}){const t=ln[e==null?void 0:e.status]||ln.unknown,r=e!=null&&e.checkedAt?new Date(e.checkedAt).toLocaleTimeString():"--:--:--";return a("div",{className:"flex items-center gap-1.5 px-2 h-7 rounded-full glass-btn",title:`Tunnel ${t.label} · last check ${r}`,children:[a("span",{className:`w-1.5 h-1.5 rounded-full ${t.dot}`}),a("span",{className:"text-[11px] font-medium",style:{color:t.color},children:t.label})]})}function kr({step:e,stepDesc:t="",healthCheck:r,tunnelHealth:i,tunnelUrl:n,oneTimeKey:o,oneTimeKeyExpiresAt:l,permanentKey:s,qrUrl:c,permissions:u,desktopEnabled:m,updateVersion:d,connections:h=[],version:f="",onRequestPermission:v,onDesktopToggle:C,onStop:B,onStart:_,onShutdown:y,onGenerateOneTimeKey:w,onRegenerateKey:N,logs:M=[],theme:b,onToggleTheme:k,pendingDevice:x,onDeviceApprove:g,onDeviceReject:S,approvedDevices:E=[],rejectedDevices:A=[],onDeviceRemove:T,onFetchDevices:I,onDeviceApproveRejected:F,autoApprove:O=!1,onAutoApproveToggle:se,autoStart:V=!1,onAutoStartToggle:ae}){var pt;const[z,X]=U("connect"),[re,G]=U(!1),[ce,Q]=U(!1),[R,D]=U(null),p=ht(null),P=e===5,K=e===0,J=e>0&&e<5;ie(()=>{var H;z==="log"&&((H=p.current)==null||H.scrollIntoView({behavior:"smooth"})),z==="connect"&&(I==null||I())},[M,z,h.length]);const ue=wr(E,h,A),Sn=ue.filter(H=>H.status==="online").length;return a("div",{className:"h-full flex flex-col relative overflow-hidden",style:{background:"var(--bg-body)"},children:[a("div",{className:"flex-1 flex flex-col w-full min-h-0 dot-grid-bg overflow-hidden md:max-w-5xl p-3",style:{margin:"0 auto"},children:[a("div",{className:"flex items-center justify-between px-5 py-4",style:{boxShadow:"var(--header-shadow)",backdropFilter:"blur(10px)"},children:[a("div",{className:"flex items-center gap-3",children:[a("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"var(--brand-500)"},children:a("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),a("div",{className:"flex flex-col leading-tight",children:[a("span",{className:"brand-text text-xs",children:"9Remote"}),f&&a("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:["v",f]})]})]}),a("div",{className:"flex items-center gap-2",children:[P&&a(Cr,{tunnelHealth:i}),a(ye,{icon:b==="dark"?"light_mode":"dark_mode",title:b==="dark"?"Switch to light mode":"Switch to dark mode",onClick:k}),a(ye,{icon:"help_outline",title:"Help & documentation",onClick:()=>window.open(mr,"_blank")}),!K&&a(ye,{icon:"stop_circle",title:"Stop the tunnel and disconnect clients",danger:!0,onClick:()=>G(!0)}),a(ye,{icon:"power_settings_new",title:"Shutdown 9Remote (stop server, tunnel and quit)",onClick:()=>Q(!0)})]})]}),a(yr,{version:d}),K?a(xr,{onStart:_,connecting:!1}):J?a("div",{className:"flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-4 max-w-2xl mx-auto w-full",children:a(Hn,{currentStep:e,activeDesc:t,healthCheck:r})}):a("div",{className:"flex-1 flex flex-col md:flex-row min-h-0",children:[a("div",{className:"hidden md:flex md:flex-col sidebar w-96 flex-shrink-0 overflow-y-auto p-5 gap-4",children:a(rn,{qrUrl:c,oneTimeKey:o,oneTimeKeyExpiresAt:l,permanentKey:s,tunnelUrl:n,onGenerateOneTimeKey:w,onRegenerateKey:N})}),a("div",{className:"flex-1 flex flex-col min-h-0",children:[a("div",{className:"flex px-5 pt-3 gap-3",style:{borderColor:"var(--border)"},children:[{id:"connect",label:"Connection"},{id:"log",label:"Logs"}].map(H=>a("button",{onClick:()=>X(H.id),className:"py-2 text-xs font-medium border-b-2 transition-colors",style:z===H.id?{borderColor:"var(--brand-500)",color:"var(--brand-500)"}:{borderColor:"transparent",color:"var(--text-muted)"},children:H.label},H.id))}),a("div",{className:"flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-4",children:[z==="connect"&&a(ee,{children:[a("div",{className:"md:hidden",children:a(rn,{qrUrl:c,oneTimeKey:o,oneTimeKeyExpiresAt:l,permanentKey:s,tunnelUrl:n,onGenerateOneTimeKey:w,onRegenerateKey:N})}),a(gr,{desktopEnabled:m,onDesktopToggle:C,permissions:u,onRequestPermission:v,autoStart:V,onAutoStartToggle:ae}),a("div",{className:"glass-card p-4 flex flex-col gap-1",children:[a("p",{className:"text-xs font-medium uppercase tracking-wider mb-2",style:{color:"var(--text-muted)"},children:["Clients",ue.length>0?` (${Sn}/${ue.length} online)`:""]}),a("div",{className:"flex items-center gap-3 py-2 border-b",style:{borderColor:"var(--border)"},children:[a("span",{className:"material-symbols-outlined flex-shrink-0",style:{fontSize:18,color:O?"var(--brand-400)":"var(--text-muted)"},children:O?"lock_open":"lock"}),a("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-xs font-medium",style:{color:"var(--text-main)"},children:"Auto-approve new devices"}),a("p",{className:"text-[10px] leading-4",style:{color:"var(--text-muted)"},children:O?"Any new device connects without approval":"Require manual approval for new devices"})]}),a("button",{onClick:se,title:O?"Disable auto-approve":"Enable auto-approve",className:"flex-shrink-0 w-11 h-6 rounded-full transition-all relative",style:{background:O?"var(--brand-500)":"var(--border)",cursor:"pointer"},children:a("span",{className:"absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all",style:{left:O?"calc(100% - 22px)":"2px",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"}})})]}),ue.length===0?a("p",{className:"text-xs text-center py-3",style:{color:"var(--text-muted)"},children:"No clients yet"}):ue.map(H=>a(Nr,{client:H,onRemove:D,onApprove:Ae=>F==null?void 0:F(Ae.deviceId)},H.deviceId))]})]}),z==="log"&&a("div",{className:"flex-1 flex flex-col",children:M.length===0?a("p",{className:"text-xs text-center mt-8",style:{color:"var(--text-muted)"},children:"No logs yet"}):a("div",{className:"flex flex-col gap-0.5",children:[M.map((H,Ae)=>a("p",{className:"text-xs font-mono leading-5 break-all",style:{color:"var(--text-muted)"},children:H},Ae)),a("div",{ref:p})]})})]})]})]})]}),re&&a(he,{message:"Disconnect and stop the tunnel? Remote clients will be disconnected.",confirmLabel:"Disconnect",confirmDanger:!0,onConfirm:()=>{G(!1),B==null||B()},onCancel:()=>G(!1)}),ce&&a(he,{message:"Shutdown 9Remote completely? This will stop the server, close the tunnel and quit the app.",confirmLabel:"Shutdown",confirmDanger:!0,onConfirm:()=>{Q(!1),y==null||y()},onCancel:()=>Q(!1)}),R&&a(he,{message:R.status==="online"?`Disconnect and remove device ${R.deviceId.slice(0,8)}...? The client will be disconnected and need approval again next time.`:R.status==="pending"?`Remove pending device ${R.deviceId.slice(0,8)}...? It will need a fresh approval request to connect again.`:`Remove device ${R.deviceId.slice(0,8)}...? It will need approval again next time.`,confirmLabel:R.status==="online"?"Disconnect & Remove":"Remove",confirmDanger:!0,onConfirm:()=>{T==null||T(R),D(null)},onCancel:()=>D(null)}),x&&a("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.6)"},children:a("div",{className:"glass-card p-5 flex flex-col gap-4 w-80",children:[a("div",{className:"flex items-center gap-2",children:[a("span",{className:"material-symbols-outlined",style:{color:"var(--brand-500)",fontSize:24},children:"devices"}),a("span",{className:"text-sm font-semibold",style:{color:"var(--text-main)"},children:"New Device Connection"})]}),a("div",{className:"flex flex-col gap-1 text-xs",style:{color:"var(--text-muted)"},children:[a("span",{children:["Device: ",a("span",{style:{color:"var(--text-main)"},children:[(pt=x.deviceId)==null?void 0:pt.slice(0,8),"..."]})]}),a("span",{children:["IP: ",a("span",{style:{color:"var(--text-main)"},children:x.ip})]})]}),a("div",{className:"flex gap-2",children:[a("button",{onClick:S,className:"glass-btn flex-1 py-2 text-sm",style:{color:"var(--text-muted)"},children:"Reject"}),a("button",{onClick:g,className:"flex-1 py-2 text-sm font-semibold rounded-xl",style:{background:"var(--brand-500)",color:"#fff"},children:"Approve"})]})]})})]})}const Sr=3e3,lt={running:!1,timeoutMs:0,startedAt:null,logs:[]},st={status:"unknown",checkedAt:null},tt={step:0,stepDesc:"",tunnelUrl:"",oneTimeKey:"",oneTimeKeyExpiresAt:null,permanentKey:"",qrUrl:"",latency:null,uptime:null,healthCheck:lt,tunnelHealth:st},Er={screenRecording:!1,accessibility:!1},sn=200;function Tr(){const[e,t]=U(tt),[r,i]=U(Er),[n,o]=U(!1),[l,s]=U([]),[c,u]=U(null),[m,d]=U([]),[h,f]=U(null),[v,C]=U([]),[B,_]=U([]),[y,w]=U(!1),[N,M]=U(!1),[b,k]=U(""),[x,g]=U(()=>localStorage.getItem("9remote-theme")||"dark");ie(()=>{document.documentElement.setAttribute("data-theme",x),localStorage.setItem("9remote-theme",x)},[x]);const S=()=>{g(R=>R==="dark"?"light":"dark")};ie(()=>{fetch("/api/version").then(p=>p.json()).then(p=>k(p.version??"")).catch(()=>{}),fetch("/api/ui/state").then(p=>p.json()).then(p=>{t({step:p.step??0,stepDesc:p.stepDesc??"",tunnelUrl:p.tunnelUrl??"",oneTimeKey:p.oneTimeKey??"",oneTimeKeyExpiresAt:p.oneTimeKeyExpiresAt??null,permanentKey:p.permanentKey??"",qrUrl:p.qrUrl??"",latency:p.latency??null,uptime:p.uptime??null,healthCheck:p.healthCheck??lt,tunnelHealth:p.tunnelHealth??st}),i({screenRecording:p.screenRecording??!1,accessibility:p.accessibility??!1}),p.desktopEnabled!==void 0&&o(p.desktopEnabled),p.theme&&(p.theme==="light"||p.theme==="dark")&&g(p.theme)}).catch(()=>{}),fetch("/api/logs").then(p=>p.json()).then(p=>{Array.isArray(p==null?void 0:p.logs)&&s(p.logs)}).catch(()=>{});const R=new EventSource("/api/ui/events");R.onmessage=p=>{try{const P=JSON.parse(p.data);P.type==="state"?t({step:P.step??0,stepDesc:P.stepDesc??"",tunnelUrl:P.tunnelUrl??"",oneTimeKey:P.oneTimeKey??"",oneTimeKeyExpiresAt:P.oneTimeKeyExpiresAt??null,permanentKey:P.permanentKey??"",qrUrl:P.qrUrl??"",latency:P.latency??null,uptime:P.uptime??null,healthCheck:P.healthCheck??lt,tunnelHealth:P.tunnelHealth??st}):P.type==="log"?s(K=>{const J=[...K,P.message];return J.length>sn?J.slice(-sn):J}):P.type==="updateAvailable"?u(P.version):P.type==="permissions"?(i({screenRecording:P.screenRecording,accessibility:P.accessibility}),P.desktopEnabled!==void 0&&o(P.desktopEnabled)):P.type==="connections"?d(P.connections??[]):P.type==="deviceApproval"&&P.action==="pending"?f({socketId:P.socketId,deviceId:P.deviceId,ip:P.ip}):P.type==="deviceApproval"&&P.action==="refresh"?V():P.type==="autostart"&&M(!!P.enabled)}catch{}},R.onerror=()=>{},fetch("/api/device/auto-approve").then(p=>p.json()).then(p=>{w(!!(p!=null&&p.enabled))}).catch(()=>{}),fetch("/api/autostart").then(p=>p.json()).then(p=>{M(!!(p!=null&&p.enabled))}).catch(()=>{});const D=setInterval(async()=>{var p;if(!E.current)try{const P=await fetch("/api/device/pending");if(!P.ok)return;const K=await P.json(),J=(p=K==null?void 0:K.pending)==null?void 0:p[0];J&&!E.current&&f({socketId:J.socketId,deviceId:J.deviceId,ip:J.ip})}catch{}},Sr);return()=>{R.close(),clearInterval(D)}},[]);const E=ht(null);ie(()=>{E.current=h},[h]);const A=async R=>{await fetch("/api/permissions/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:R})}).catch(()=>{})},T=()=>{fetch("/api/ui/stop",{method:"POST"}).catch(()=>{}),t(tt)},I=()=>{fetch("/api/ui/start",{method:"POST"}).catch(()=>{})},F=()=>{fetch("/api/ui/shutdown",{method:"POST"}).catch(()=>{}),t(tt)},O=async()=>{const R=await fetch("/api/key/one-time",{method:"POST"}).catch(()=>null);if(!(R!=null&&R.ok))return;const D=await R.json().catch(()=>null);D!=null&&D.oneTimeKey&&t(p=>({...p,oneTimeKey:D.oneTimeKey,oneTimeKeyExpiresAt:D.expiresAt,qrUrl:D.qrUrl??p.qrUrl}))},se=async()=>{const R=!n;o(R),await fetch("/api/desktop/toggle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:R})}).catch(()=>{})},V=async()=>{try{const[R,D]=await Promise.all([fetch("/api/device/approved"),fetch("/api/device/rejected")]);if(R.ok){const p=await R.json();C(p.devices||[])}if(D.ok){const p=await D.json();_(p.rejected||[])}}catch{}},ae=async R=>{const D=R.status==="pending"?"/api/device/clear-rejected":"/api/device/remove";await fetch(D,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceId:R.deviceId})}).catch(()=>{}),V()},z=async()=>{h&&(await fetch("/api/device/approve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({socketId:h.socketId})}).catch(()=>{}),f(null),V())},X=async()=>{h&&(await fetch("/api/device/reject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({socketId:h.socketId})}).catch(()=>{}),f(null),V())},re=async()=>{const R=!N;M(R);try{const p=await(await fetch("/api/autostart",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:R})})).json().catch(()=>null);p&&typeof p.enabled=="boolean"&&M(p.enabled)}catch{M(!R)}},G=async()=>{const R=!y;w(R);try{const p=await(await fetch("/api/device/auto-approve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:R})})).json().catch(()=>null);p&&typeof p.enabled=="boolean"&&w(p.enabled)}catch{w(!R)}},ce=async R=>{await fetch("/api/device/approve-rejected",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceId:R})}).catch(()=>{}),V()},Q=async()=>{const R=await fetch("/api/key/regenerate",{method:"POST"}).catch(()=>null);if(!(R!=null&&R.ok))return;const D=await R.json().catch(()=>null);D!=null&&D.permanentKey&&t(p=>({...p,permanentKey:D.permanentKey}))};return a(kr,{step:e.step,stepDesc:e.stepDesc,healthCheck:e.healthCheck,tunnelHealth:e.tunnelHealth,tunnelUrl:e.tunnelUrl,oneTimeKey:e.oneTimeKey,oneTimeKeyExpiresAt:e.oneTimeKeyExpiresAt,permanentKey:e.permanentKey,qrUrl:e.qrUrl,permissions:r,desktopEnabled:n,updateVersion:c,connections:m,onRequestPermission:A,onDesktopToggle:se,onStop:T,onStart:I,onShutdown:F,onGenerateOneTimeKey:O,onRegenerateKey:Q,logs:l,version:b,theme:x,onToggleTheme:S,pendingDevice:h,onDeviceApprove:z,onDeviceReject:X,approvedDevices:v,rejectedDevices:B,onDeviceRemove:ae,onFetchDevices:V,onDeviceApproveRejected:ce,autoApprove:y,onAutoApproveToggle:G,autoStart:N,onAutoStartToggle:re})}Mn(a(Tr,{}),document.getElementById("root"));
|