@suveren/gateway 0.10.0 → 0.11.0

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.
@@ -0,0 +1 @@
1
+ @font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/Inter-Regular.woff2) format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/Inter-Medium.woff2) format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/Inter-SemiBold.woff2) format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/Inter-Bold.woff2) format("woff2")}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}:root{--text-primary: #111111;--text-secondary: #111111;--text-tertiary: #111111;--text-muted: #888888;--bg-main: #fafafa;--bg-elevated: #ffffff;--bg-input: #ffffff;--accent: #888888;--accent-subtle: #f0f0f0;--accent-hover: #555555;--border: #e5e5e5;--edit-border: #c7c7c7;--danger: #dc2626;--danger-subtle: #fef2f2;--success: #16a34a;--success-subtle: #f0fdf4;--warning: #d97706;--btn-primary-bg: #111111;--btn-primary-fg: #ffffff;--btn-primary-bg-hover: #000000;--btn-primary-bg-active: #2a2a2a;--icon-filter: brightness(0) invert(1);--primary-glow: rgba(0, 0, 0, .2);--primary-focus-ring: rgba(0, 0, 0, .15);--bg-field: #111111;--text-field: #ffffff;--border-field: #111111;--placeholder-field: rgba(255, 255, 255, .55);--field-focus-ring: rgba(0, 0, 0, .18);--nav-height: 3.5rem;--sidebar-width: 15rem;--content-width: 75rem;--content-padding: 2rem}:root[data-theme=dark]{--text-primary: #ffffff;--text-secondary: #ffffff;--text-tertiary: #ffffff;--text-muted: #888888;--bg-main: #0a0a0a;--bg-elevated: #1a1a1a;--bg-input: #141414;--accent: #888888;--accent-subtle: #1f1f1f;--accent-hover: #bbbbbb;--border: #2a2a2a;--edit-border: #4a4a4a;--danger-subtle: #2a0a0a;--success-subtle: #0a2a0a;--btn-primary-bg: #ffffff;--btn-primary-fg: #000000;--btn-primary-bg-hover: #e5e5e5;--btn-primary-bg-active: #c4c4c4;--icon-filter: brightness(0);--primary-glow: rgba(255, 255, 255, .25);--primary-focus-ring: rgba(255, 255, 255, .2);--bg-field: #ffffff;--text-field: #111111;--border-field: #ffffff;--placeholder-field: rgba(0, 0, 0, .5);--field-focus-ring: rgba(255, 255, 255, .25)}html{scroll-behavior:smooth}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-feature-settings:"cv11","ss01","ss03";font-size:16px;line-height:1.6;color:var(--text-primary);background:var(--bg-main);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width: 1900px){body{font-size:17.5px}}@media (min-width: 2800px){body{font-size:19px}}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4{font-weight:700;letter-spacing:-.02em;line-height:1.2;color:var(--text-primary)}code{background:var(--bg-elevated);border:1px solid var(--border);padding:.15rem .4rem;border-radius:.25rem;font-size:.875em;font-family:SF Mono,Monaco,Cascadia Code,Courier New,monospace}.top-nav{position:fixed;top:0;width:100%;height:var(--nav-height);background:#fafafaeb;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-bottom:1px solid var(--border);z-index:1000}[data-theme=dark] .top-nav{background:#0a0a0aeb}.top-nav-inner{max-width:100%;margin:0 auto;padding:0 1.5rem;height:100%;display:flex;align-items:center;gap:1rem}.logo-group{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.logo-group svg{flex-shrink:0}.logo{font-weight:700;font-size:.95rem;color:var(--text-primary);text-decoration:none}.logo:hover{text-decoration:none}.version-badge{font-size:.65rem;font-weight:600;padding:.15rem .4rem;background:var(--btn-primary-bg);color:var(--btn-primary-fg);border-radius:.25rem}.gw-version{font-size:.7rem;padding:.15rem .4rem;border-radius:.25rem;color:var(--text-muted);background:var(--accent-subtle);font-variant-numeric:tabular-nums;white-space:nowrap}.gw-version[data-stale=true]{color:var(--warning);background:transparent;border:1px solid var(--warning)}.nav-spacer{flex:1}.nav-actions{display:flex;align-items:center;gap:.75rem}.user-chip{display:flex;align-items:center;gap:.5rem;font-size:.8rem;color:var(--text-secondary)}.user-chip strong{color:var(--text-primary)}.user-chip .dot{width:3px;height:3px;border-radius:50%;background:var(--text-tertiary)}.theme-toggle{width:2rem;height:2rem;background:none;border:1px solid var(--border);border-radius:.375rem;cursor:pointer;color:var(--text-secondary);font-size:1rem;display:flex;align-items:center;justify-content:center}.theme-toggle:hover{color:var(--accent);border-color:var(--accent)}.nav-logout{font-size:.8rem;color:var(--text-tertiary);cursor:pointer;background:none;border:none;font-family:inherit}.nav-logout:hover{color:var(--text-primary)}.domain-switcher{position:relative}.domain-switcher-btn{background:none;border:none;font-family:inherit;font-size:.8rem;color:var(--text-secondary);cursor:pointer;display:flex;align-items:center;gap:.25rem;padding:.125rem .25rem;border-radius:.25rem}.domain-switcher-btn:hover{color:var(--accent)}.domain-switcher-arrow{font-size:.6rem;color:var(--text-tertiary)}.domain-switcher-menu{position:absolute;top:calc(100% + .375rem);right:0;min-width:10rem;background:var(--bg-elevated);border:1px solid var(--border);border-radius:.5rem;box-shadow:0 4px 12px #0000001a;z-index:200;padding:.25rem}.domain-switcher-item{display:block;width:100%;text-align:left;background:none;border:none;font-family:inherit;font-size:.8rem;color:var(--text-secondary);padding:.5rem .75rem;border-radius:.375rem;cursor:pointer;white-space:nowrap}.domain-switcher-item:hover{background:var(--accent-subtle);color:var(--text-primary)}.domain-switcher-item.active{color:var(--accent);font-weight:600}.sidebar{position:fixed;top:calc(var(--nav-height) + var(--update-banner-h, 0px) + var(--sim-banner-h, 0px));left:0;width:var(--sidebar-width);height:calc(100vh - var(--nav-height) - var(--update-banner-h, 0px) - var(--sim-banner-h, 0px));background:var(--bg-elevated);border-right:1px solid var(--border);padding:1rem 0;z-index:900;display:flex;flex-direction:column}.sidebar-nav{list-style:none;padding:0 .5rem;flex:1}.sidebar-item{display:flex;align-items:center;gap:.625rem;padding:.5rem .75rem;margin-bottom:.125rem;border-radius:.5rem;font-size:.85rem;font-weight:500;color:var(--text-secondary);cursor:pointer;transition:background .15s,color .15s;text-decoration:none}.sidebar-item:hover{background:var(--accent-subtle);color:var(--text-primary);text-decoration:none}.sidebar-item.active{background:var(--accent-subtle);color:var(--accent);font-weight:600}.sidebar-item .icon{width:1.125rem;text-align:center;font-size:.9rem;flex-shrink:0}.sidebar-section-label{font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-tertiary);padding:1rem .75rem .375rem}.sidebar-context{padding:.75rem 1rem;border-top:1px solid var(--border);font-size:.75rem;color:var(--text-tertiary)}.sidebar-context .ctx-label{font-weight:600;color:var(--text-secondary);margin-bottom:.125rem}.sidebar-context .ctx-value{color:var(--text-primary);font-weight:500}.main-content{margin-left:var(--sidebar-width);margin-top:calc(var(--nav-height) + var(--update-banner-h, 0px) + var(--sim-banner-h, 0px));padding:2rem;min-height:calc(100vh - var(--nav-height))}.main-content.no-sidebar{margin-left:0}.page-inner{max-width:56rem;margin:0 auto}.page-inner:has(.intent-layout){max-width:none}.page-header{margin-bottom:1.5rem}.page-title{font-size:1.5rem;margin-bottom:.25rem}.page-subtitle{font-size:.9rem;color:var(--text-secondary)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem 1.25rem;font-size:.9rem;font-weight:500;font-family:inherit;border-radius:.5rem;border:none;cursor:pointer;transition:all .2s;text-decoration:none;line-height:1.4}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--btn-primary-bg);color:var(--btn-primary-fg);border:2px solid var(--btn-primary-bg)}.btn-primary:hover:not(:disabled){background:var(--btn-primary-bg-hover);border-color:var(--btn-primary-bg-hover);color:var(--btn-primary-fg);transform:translateY(-1px);box-shadow:0 4px 12px var(--primary-glow)}.btn-primary:active:not(:disabled){background:var(--btn-primary-bg-active);border-color:var(--btn-primary-bg-active)}.btn-secondary{background:transparent;color:var(--text-primary);border:1px solid var(--border)}.btn-secondary:hover:not(:disabled){border-color:var(--btn-primary-bg);color:var(--text-primary);background:var(--accent-subtle)}.btn-ghost{background:transparent;color:var(--text-secondary);border:none;padding:.5rem .75rem}.btn-ghost:hover:not(:disabled){color:var(--text-primary);background:var(--accent-subtle)}.btn-full{width:100%}.btn-sm{padding:.375rem .75rem;font-size:.8rem}.btn-lg{padding:.875rem 2rem;font-size:1rem;font-weight:600}.form-group{margin-bottom:1.25rem}.form-label{display:block;font-size:.875rem;font-weight:600;color:var(--text-primary);margin-bottom:.375rem}.form-input,.form-select,.form-textarea{width:100%;padding:.625rem .75rem;font-size:.9rem;font-family:inherit;color:var(--text-field);background:var(--bg-field);border:1px solid var(--border-field);border-radius:.5rem;outline:none;transition:box-shadow .2s,border-color .2s}.form-input::placeholder,.form-textarea::placeholder{color:var(--placeholder-field);opacity:1}.form-input:focus,.form-textarea:focus,.form-select:focus{box-shadow:0 0 0 3px var(--field-focus-ring)}.form-input:disabled,.form-textarea:disabled,.form-select:disabled{opacity:.55;cursor:not-allowed}.form-input-invalid,.form-input-invalid:focus{border-color:var(--danger);box-shadow:0 0 0 3px #dc26262e}.form-textarea{resize:vertical;min-height:120px;line-height:1.5}.form-hint{font-size:.8rem;color:var(--text-tertiary);margin-top:.375rem}.form-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .75rem center;padding-right:2.25rem}[data-theme=dark] .form-select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23111111' d='M6 8L1 3h10z'/%3E%3C/svg%3E")}.card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.75rem;padding:1.5rem}.card+.card{margin-top:1rem}.card-highlight{animation:hap-card-highlight 2.4s ease-out 1}@keyframes hap-card-highlight{0%{box-shadow:0 0 0 2px var(--accent),0 0 24px var(--accent-subtle);border-color:var(--accent)}60%{box-shadow:0 0 0 2px var(--accent),0 0 24px var(--accent-subtle);border-color:var(--accent)}to{box-shadow:0 0 0 0 transparent,0 0 0 transparent;border-color:var(--border)}}@media (prefers-reduced-motion: reduce){.card-highlight{animation:none;border-color:var(--accent)}}.card-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem}.card-title{font-size:1rem;font-weight:600;margin:0}.auth-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.75rem;padding:1.25rem;transition:opacity .2s,border-color .2s;cursor:pointer}.auth-card:hover{border-color:var(--accent)}.auth-card+.auth-card{margin-top:.75rem}.auth-card.expired{opacity:.5}.auth-card-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem;flex-wrap:wrap}.auth-card-path{font-weight:600;font-size:.95rem}.auth-card-time{font-size:.8rem;color:var(--text-tertiary);margin-left:auto}.success-card{background:var(--accent-subtle);border:1px solid var(--accent);border-radius:.75rem;padding:1.5rem;text-align:center}.success-card-title{font-size:1.1rem;font-weight:700;color:var(--accent);margin-bottom:.5rem}.success-card-hash{font-family:SF Mono,Monaco,monospace;font-size:.8rem;color:var(--text-secondary);word-break:break-all;margin-bottom:.5rem}.status-badge{display:inline-block;padding:.2rem .6rem;border-radius:9999px;font-size:.7rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase}.status-active{background:var(--accent-subtle);color:var(--accent)}.status-pending{background:var(--danger-subtle);color:var(--danger)}.status-expired{background:var(--bg-elevated);color:var(--text-tertiary)}.status-revoked{background:var(--danger-subtle);color:var(--danger)}.int-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.2rem .6rem;border-radius:9999px;font-size:.7rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase}.int-chip .int-dot{width:6px;height:6px;border-radius:50%;flex:none}.int-chip-ok{background:var(--success-subtle);color:var(--success)}.int-chip-ok .int-dot{background:var(--success)}.int-chip-bad{background:var(--danger-subtle);color:var(--danger)}.int-chip-bad .int-dot{background:var(--danger)}.int-chip-idle{background:var(--accent-subtle);color:var(--accent)}.int-chip-idle .int-dot{background:#bbb}.int-chip-sim{background:color-mix(in srgb,var(--warning) 14%,transparent);color:var(--warning)}.int-chip-sim .int-dot{background:var(--warning)}.int-details{border-top:1px solid var(--border);padding-top:.7rem;margin-top:.25rem}.int-details>summary{cursor:pointer;font-size:.78rem;color:var(--text-muted);list-style:none;display:flex;align-items:center;gap:.35rem;-webkit-user-select:none;user-select:none}.int-details>summary::-webkit-details-marker{display:none}.int-details>summary:before{content:"▸";font-size:.7rem;transition:transform .15s}.int-details[open]>summary:before{transform:rotate(90deg)}.int-meta{display:grid;grid-template-columns:auto 1fr;gap:.4rem 1rem;font-size:.8rem;margin-top:.7rem}.int-meta .int-k{color:var(--text-muted)}.int-account{font-size:.85rem;display:flex;align-items:center;gap:.5rem}.int-account .int-none{color:var(--text-muted);font-style:italic}.domain-badge{display:inline-block;padding:.2rem .5rem;font-size:.8rem;font-family:SF Mono,Monaco,monospace;background:var(--bg-main);border:1px solid var(--border);border-radius:.25rem;color:var(--text-secondary)}.domain-attested{color:var(--accent);border-color:var(--accent)}.domain-missing{color:var(--text-tertiary)}.profile-badge{display:inline-block;padding:.15rem .5rem;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;background:var(--accent-subtle);color:var(--accent);border-radius:.25rem}.wizard-progress{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:2.5rem}.wizard-steps{list-style:none;margin:0;padding:0;display:flex;flex:1;max-width:28rem}.wizard-step{flex:1;display:flex;flex-direction:column;align-items:center;position:relative;min-width:0}.wizard-step:not(:first-child):before{content:"";position:absolute;top:calc(1rem - 1px);height:2px;left:calc(-50% + 1.4rem);right:calc(50% + 1.4rem);background:var(--border)}.wizard-step.reached:before{background:var(--accent)}.step-circle{width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:0;font-family:inherit;font-size:.75rem;font-weight:600;border:2px solid var(--border);color:var(--text-tertiary);background:var(--bg-main);flex-shrink:0;transition:all .2s;cursor:default}.step-circle.completed{background:var(--accent);border-color:var(--accent);color:#fff;cursor:pointer}.step-circle:disabled{cursor:default}.step-circle.current{border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 3px var(--primary-focus-ring)}.step-label-text{margin-top:.4rem;font-size:.65rem;line-height:1.2;text-align:center;color:var(--text-tertiary)}.step-label-text.completed{color:var(--text-secondary)}.step-label-text.current{color:var(--accent);font-weight:600}.wizard-cancel{flex-shrink:0;font-size:.8rem;margin-top:.15rem;margin-left:auto}.alert{padding:.75rem 1rem;border-radius:.5rem;font-size:.875rem;margin-bottom:1rem;color:#fff}.alert-error{background:var(--danger)}.alert-info{background:var(--accent)}.alert-success{background:#1a7f37}.nav-tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:1.5rem}.nav-tab{padding:.75rem 1.25rem;font-size:.9rem;font-weight:500;color:var(--text-tertiary);background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;transition:color .2s;margin-bottom:-1px;font-family:inherit}.nav-tab:hover{color:var(--text-primary)}.nav-tab.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}.review-grid{display:grid;grid-template-columns:auto 1fr;gap:.5rem 1rem;font-size:.9rem;margin-bottom:1.5rem}.review-grid dt{font-weight:600;color:var(--text-secondary);padding:.25rem 0}.review-grid dd{color:var(--text-primary);padding:.25rem 0}.gate-content-block{background:var(--bg-main);border:1px solid var(--border);border-radius:.5rem;padding:1rem;font-size:.875rem;margin-bottom:1.5rem}.gate-content-item{margin-bottom:.5rem}.gate-content-item:last-child{margin-bottom:0}.gate-content-label{font-weight:600;color:var(--text-secondary);font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.125rem}.gate-content-text{color:var(--text-primary);line-height:1.5}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--text-tertiary)}.empty-state-icon{font-size:2.5rem;margin-bottom:.75rem;opacity:.5}.empty-state-title{font-size:1rem;font-weight:600;color:var(--text-secondary);margin-bottom:.25rem}.empty-state-text{font-size:.875rem;color:var(--text-tertiary);margin-bottom:1rem;max-width:28rem;margin-left:auto;margin-right:auto}.login-split{margin-top:var(--nav-height);display:flex;min-height:calc(100vh - var(--nav-height))}.login-split-left{flex:1;background:var(--bg-main);display:flex;align-items:center;justify-content:center;padding:4rem 3rem}.login-split-right{flex:1;background:var(--bg-elevated);border-left:1px solid var(--border);display:flex;align-items:center;justify-content:center;padding:4rem 3rem}.login-page{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - var(--nav-height));padding:2rem}.login-card{width:100%;max-width:420px}.login-header{text-align:center;margin-bottom:2rem}.login-title{font-size:1.5rem;font-weight:700;margin-bottom:.5rem}.login-subtitle{font-size:.9rem;color:var(--text-secondary);line-height:1.5}.login-divider{display:flex;align-items:center;gap:.75rem;margin:1.5rem 0;font-size:.8rem;color:var(--text-tertiary)}.login-divider:before,.login-divider:after{content:"";flex:1;height:1px;background:var(--border)}.onboarding-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.75rem;padding:2rem;max-width:32rem;margin:0 auto}.onboarding-step{display:flex;gap:1rem;margin-bottom:1.25rem}.onboarding-step:last-child{margin-bottom:0}.onboarding-num{width:1.75rem;height:1.75rem;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;flex-shrink:0;margin-top:.1rem}.onboarding-num.done{background:var(--accent)}.onboarding-text h4{font-size:.9rem;margin-bottom:.125rem}.onboarding-text p{font-size:.825rem;color:var(--text-secondary);line-height:1.5}.selection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:.75rem;margin-bottom:1.5rem}.selection-card{background:var(--bg-elevated);border:2px solid var(--border);border-radius:.75rem;padding:1.25rem;cursor:pointer;transition:all .15s}.selection-card:hover{border-color:var(--accent);transform:translateY(-1px);box-shadow:0 4px 12px #0000000f}.selection-card.selected{border-color:var(--accent);background:var(--accent-subtle)}.selection-card-title{font-size:1rem;font-weight:600;margin-bottom:.25rem}.selection-card-subtitle{font-size:.8rem;color:var(--text-secondary);margin-bottom:.5rem}.selection-card-id{font-size:.7rem;color:var(--text-tertiary);margin-bottom:.375rem;word-break:break-all}.selection-card-meta{display:flex;gap:.375rem;flex-wrap:wrap}.dashboard-section{margin-bottom:2rem}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.section-title{font-size:1rem;font-weight:600}.section-count{font-size:.8rem;color:var(--text-tertiary)}.ttl-badge{display:inline-flex;align-items:center;gap:.25rem;font-size:.75rem;font-weight:600;padding:.2rem .5rem;border-radius:.25rem;font-family:SF Mono,Monaco,monospace}.ttl-ok{background:var(--accent-subtle);color:var(--accent)}.ttl-warn{background:var(--danger-subtle);color:var(--danger)}.quick-actions{display:grid;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));gap:.75rem;margin-bottom:2rem}.quick-action-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.75rem;padding:1.25rem;cursor:pointer;transition:all .15s;display:flex;align-items:flex-start;gap:.875rem;text-decoration:none;color:inherit}.quick-action-card:hover{border-color:var(--accent);transform:translateY(-1px);box-shadow:0 4px 12px #0000000f;text-decoration:none}.quick-action-icon{width:2.5rem;height:2.5rem;border-radius:.5rem;background:var(--accent-subtle);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:1.25rem;flex-shrink:0}.quick-action-title{font-size:.9rem;font-weight:600;margin-bottom:.125rem}.quick-action-desc{font-size:.8rem;color:var(--text-secondary)}.pr-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.75rem;padding:1.25rem;cursor:pointer;transition:border-color .15s}.pr-card:hover{border-color:var(--accent)}.pr-card+.pr-card{margin-top:.75rem}.pr-card-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.375rem}.pr-card-repo{font-size:.75rem;color:var(--text-tertiary);font-family:SF Mono,Monaco,monospace}.pr-card-title{font-weight:600;font-size:.95rem}.pr-card-footer{display:flex;align-items:center;gap:.75rem;margin-top:.5rem;flex-wrap:wrap}.member-row{display:flex;align-items:center;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--border)}.member-row:last-child{border-bottom:none}.member-avatar{width:2rem;height:2rem;border-radius:50%;background:var(--accent-subtle);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;flex-shrink:0}.member-info{flex:1}.member-name{font-size:.9rem;font-weight:600}.member-email{font-size:.75rem;color:var(--text-tertiary)}.member-domains{display:flex;gap:.25rem;flex-wrap:wrap}.char-counter{text-align:right;font-size:.75rem;color:var(--text-tertiary);margin-top:.25rem}.invite-input-row{display:flex;gap:.5rem}.invite-input-row .form-input{flex:1}.service-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.75rem;padding:1.25rem;display:flex;align-items:center;gap:1rem;transition:border-color .15s}.service-card:hover{border-color:var(--accent)}.service-card+.service-card{margin-top:.75rem}.service-icon{width:2.75rem;height:2.75rem;border-radius:.625rem;display:flex;align-items:center;justify-content:center;font-size:1.25rem;flex-shrink:0}.service-icon-configured{background:var(--success-subtle);color:var(--success)}.service-icon-missing{background:var(--bg-main);color:var(--text-tertiary);border:1px dashed var(--border)}.service-icon-error{background:var(--danger-subtle);color:var(--danger)}.service-info{flex:1}.service-name{font-size:.95rem;font-weight:600;margin-bottom:.125rem}.service-desc{font-size:.8rem;color:var(--text-secondary);margin-bottom:.375rem}.service-status{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:600}.service-status-dot{width:6px;height:6px;border-radius:50%}.service-status-connected .service-status-dot{background:var(--success)}.service-status-connected{color:var(--success)}.service-status-missing .service-status-dot{background:var(--text-tertiary)}.service-status-missing{color:var(--text-tertiary)}.service-status-error .service-status-dot{background:var(--danger)}.service-status-error{color:var(--danger)}.service-tools{display:flex;gap:.25rem;flex-wrap:wrap;margin-top:.25rem}.service-tool-badge{display:inline-block;padding:.1rem .4rem;font-size:.65rem;font-family:SF Mono,Monaco,monospace;background:var(--bg-main);border:1px solid var(--border);border-radius:.25rem;color:var(--text-tertiary)}.modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;z-index:1500;display:flex;align-items:center;justify-content:center}.modal{background:var(--bg-elevated);border-radius:.75rem;width:100%;max-width:32rem;max-height:calc(100vh - 4rem);overflow-y:auto;box-shadow:0 16px 48px #00000026}.modal-header{padding:1.5rem 1.5rem 0;display:flex;justify-content:space-between;align-items:flex-start}.modal-title{font-size:1.125rem;font-weight:700}.modal-close{width:2rem;height:2rem;background:none;border:none;cursor:pointer;color:var(--text-tertiary);font-size:1.25rem;display:flex;align-items:center;justify-content:center;border-radius:.375rem}.modal-close:hover{background:var(--bg-main);color:var(--text-primary)}.modal-body{padding:1.25rem 1.5rem}.modal-footer{padding:0 1.5rem 1.5rem;display:flex;gap:.5rem;justify-content:flex-end}.status-banner{padding:.625rem 1rem;font-size:.8rem;display:flex;align-items:center;gap:.5rem;border-radius:.5rem;margin-bottom:1rem}.status-banner-warn{background:var(--accent-subtle);color:var(--accent-hover);border:1px solid var(--accent)}.status-banner-error{background:var(--danger-subtle);color:var(--danger);border:1px solid var(--danger)}.status-banner-success{background:var(--success-subtle);color:var(--success);border:1px solid var(--success)}.status-banner-icon{font-size:1rem;flex-shrink:0}.status-banner-text{flex:1}.status-banner a{font-weight:600}.vault-progress{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:1.5rem 0}.vault-spinner{width:2rem;height:2rem;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.vault-progress-text{font-size:.875rem;color:var(--text-secondary)}.service-health-row{display:flex;align-items:center;gap:.75rem;padding:.625rem 0;border-bottom:1px solid var(--border);font-size:.85rem}.service-health-row:last-child{border-bottom:none}.service-health-indicator{width:8px;height:8px;border-radius:50%;flex-shrink:0}.service-health-indicator.connected{background:var(--success)}.service-health-indicator.missing{background:var(--text-tertiary)}.service-health-indicator.error{background:var(--danger)}.service-health-name{font-weight:600;flex:1}.service-health-detail{font-size:.75rem;color:var(--text-tertiary)}.cred-field{position:relative}.cred-field .form-input{padding-right:3rem}.cred-toggle{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);background:none;border:none;font-size:.75rem;color:var(--text-tertiary);cursor:pointer;padding:.25rem}.cred-toggle:hover{color:var(--accent)}.context-strip{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.5rem;padding:.625rem 1rem;margin-bottom:1.5rem;display:flex;align-items:center;gap:.75rem;font-size:.8rem}.context-strip-label{font-weight:600;color:var(--text-secondary)}.timeline{position:relative;padding-left:2rem}.timeline:before{content:"";position:absolute;left:.5rem;top:0;bottom:0;width:2px;background:var(--border)}.timeline-event{position:relative;margin-bottom:1.5rem}.timeline-event:before{content:"";position:absolute;left:-1.625rem;top:.5rem;width:10px;height:10px;border-radius:50%;background:var(--accent);border:2px solid var(--bg-main)}.timeline-event.expired:before{background:var(--text-tertiary)}.error-message{padding:.75rem 1rem;background:#dc262614;border:1px solid var(--danger);border-radius:.5rem;color:var(--danger);font-size:.875rem;margin-bottom:1rem}.mobile-menu-btn{display:none;width:2.25rem;height:2.25rem;background:none;border:1px solid var(--border);border-radius:.375rem;cursor:pointer;color:var(--text-secondary);font-size:1.1rem;align-items:center;justify-content:center;font-family:inherit}.mobile-menu-btn:hover{color:var(--accent);border-color:var(--accent)}.mobile-menu-backdrop{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;z-index:2000}.mobile-menu-panel{display:none;position:fixed;top:0;right:0;bottom:0;width:16rem;background:var(--bg-elevated);border-left:1px solid var(--border);z-index:2001;flex-direction:column;overflow-y:auto}.mobile-menu-header{padding:1.25rem 1rem;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:.25rem}.mobile-menu-nav{flex:1;padding:.5rem;display:flex;flex-direction:column}.mobile-menu-item{display:flex;align-items:center;gap:.625rem;padding:.5rem .75rem;margin-bottom:.125rem;border-radius:.375rem;font-size:.85rem;color:var(--text-secondary);text-decoration:none;transition:background .15s,color .15s}.mobile-menu-item:hover{background:var(--accent-subtle);color:var(--text-primary)}.mobile-menu-item.active{background:var(--accent-subtle);color:var(--accent);font-weight:600}.mobile-menu-item .icon{width:1.125rem;text-align:center;font-size:.9rem;flex-shrink:0}.mobile-menu-footer{padding:.75rem 1rem;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:.25rem}.mobile-menu-action{display:flex;align-items:center;gap:.625rem;padding:.5rem .75rem;border-radius:.375rem;font-size:.85rem;color:var(--text-secondary);background:none;border:none;cursor:pointer;font-family:inherit;text-align:left}.mobile-menu-action:hover{background:var(--accent-subtle);color:var(--text-primary)}.mobile-menu-action .icon{width:1.125rem;text-align:center;font-size:.9rem;flex-shrink:0}@media (max-width: 768px){.sidebar{display:none}.main-content{margin-left:0}.quick-actions,.selection-grid{grid-template-columns:1fr}.nav-actions-desktop,.step-label-text{display:none}.mobile-menu-btn{display:flex}.mobile-menu-backdrop{display:block}.mobile-menu-panel{display:flex}.login-split{flex-direction:column;min-height:auto}.login-split-left{padding:3rem 1.5rem;align-items:flex-start}.login-split-right{max-width:none;border-left:none;border-top:1px solid var(--border);padding:2.5rem 1.5rem}}.update-banner{position:fixed;top:var(--nav-height);left:0;right:0;z-index:900;background:#c0392b;color:#fff;border-top:1px solid rgba(0,0,0,.2);border-bottom:1px solid rgba(0,0,0,.2);padding:.6rem 1.25rem;display:flex;flex-direction:column;gap:.6rem}.update-banner-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-width:0}.update-banner-cmd-row{flex-wrap:wrap}.update-banner-text{font-size:.9rem;font-weight:600;color:#fff}.update-banner-cmd{display:block;flex:1;min-width:0;font-size:.78rem;padding:.5rem .75rem;word-break:break-all;white-space:pre-wrap;background:#0003;border:1px solid rgba(255,255,255,.65);border-radius:.375rem;font-family:SF Mono,Fira Code,Fira Mono,Menlo,Consolas,monospace;color:#fff;-webkit-user-select:all;user-select:all}.update-banner-hint{margin:0;font-size:.8rem;color:#ffffffe6}.update-banner .btn-secondary{color:#fff;border-color:#ffffffa6;background:transparent}.update-banner .btn-secondary:hover:not(:disabled){background:#ffffff26;color:#fff;border-color:#fff}.update-banner-x{background:transparent;border:none;color:#ffffffd9;cursor:pointer;font-size:1.15rem;line-height:1;padding:0 .25rem}.update-banner-x:hover{color:#fff}.update-banner.is-live{background:var(--success)}.simulation-banner{position:fixed;top:calc(var(--nav-height) + var(--update-banner-h, 0px));left:0;right:0;z-index:899;background:var(--warning);color:#fff;border-top:1px solid rgba(0,0,0,.2);border-bottom:1px solid rgba(0,0,0,.2);padding:.6rem 1.25rem;text-align:center}.simulation-banner-text{font-size:.9rem;font-weight:600}body.is-updating .top-nav,body.is-updating .sidebar,body.is-updating .main-content,body.is-updating .update-banner,body.is-updating .simulation-banner{filter:blur(5px);pointer-events:none;-webkit-user-select:none;user-select:none}.update-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;display:flex;align-items:center;justify-content:center;background:#11111159;padding:1rem}.update-overlay-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:1rem;padding:2rem 2.25rem;max-width:460px;width:100%;text-align:center;box-shadow:0 20px 60px #00000040}.update-overlay-card h2{margin:0 0 .6rem;font-size:1.15rem}.update-overlay-card p{margin:0 0 .5rem;font-size:.88rem;color:var(--text-muted);line-height:1.55}.update-spinner{width:2.25rem;height:2.25rem;border:3px solid var(--border);border-top-color:var(--text-primary);border-radius:50%;margin:0 auto 1.1rem;animation:update-spin 1s linear infinite}@keyframes update-spin{to{transform:rotate(360deg)}}.update-cmd-row{display:flex;gap:.5rem;align-items:flex-start;margin:.9rem 0;text-align:left}.update-cmd{flex:1;min-width:0;font-size:.78rem;padding:.6rem .75rem;background:#111;color:#fff;border-radius:.45rem;font-family:SF Mono,Fira Code,Fira Mono,Menlo,Consolas,monospace;word-break:break-all;white-space:pre-wrap}.update-status{font-size:.8rem;color:var(--text-muted);margin:.4rem 0 1.1rem;display:flex;align-items:center;justify-content:center;gap:.4rem}.update-pulse{width:.55rem;height:.55rem;border-radius:50%;background:var(--success);animation:update-pulse 1.2s ease infinite}@keyframes update-pulse{0%,to{opacity:.3}50%{opacity:1}}.update-overlay-actions{display:flex;gap:.6rem;justify-content:center}.search-filter-bar{display:flex;gap:.5rem;margin-bottom:.75rem}.search-input-wrap{flex:1;position:relative}.search-icon{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--text-tertiary);font-size:1rem;pointer-events:none}.search-input{padding-left:2.25rem!important;padding-right:2rem!important}.search-clear{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--text-tertiary);font-size:1.1rem;cursor:pointer;padding:.25rem;line-height:1}.search-clear:hover{color:var(--text-primary)}.filter-panel{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.5rem;padding:1rem;margin-bottom:.75rem;display:flex;flex-direction:column;gap:.75rem}.filter-section{display:flex;align-items:baseline;gap:.75rem}.filter-label{font-size:.75rem;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.04em;min-width:5rem;flex-shrink:0}.filter-chips{display:flex;flex-wrap:wrap;gap:.375rem}.filter-chip{font-family:inherit;font-size:.8rem;padding:.3rem .625rem;border-radius:1rem;border:1px solid var(--border);background:var(--bg-main);color:var(--text-secondary);cursor:pointer;transition:all .15s}.filter-chip:hover{border-color:var(--accent);color:var(--text-primary)}.filter-chip.selected{background:var(--accent-subtle);border-color:var(--accent);color:var(--accent);font-weight:600}.active-filters{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;margin-bottom:.75rem}.active-chip{display:inline-flex;align-items:center;gap:.25rem;font-size:.75rem;padding:.2rem .5rem;border-radius:1rem;background:var(--accent-subtle);color:var(--accent);cursor:pointer;transition:background .15s}.active-chip:hover{background:var(--accent);color:var(--bg-elevated)}.chip-remove{font-size:.85rem;line-height:1}.clear-filters{font-family:inherit;font-size:.75rem;color:var(--text-tertiary);background:none;border:none;cursor:pointer;padding:.2rem 0}.clear-filters:hover{color:var(--text-primary)}.receipt-action{display:inline-block;font-size:.75rem;font-weight:600;padding:.15rem .5rem;border-radius:1rem;background:var(--bg-main);border:1px solid var(--border);color:var(--text-secondary);font-family:SF Mono,Monaco,monospace}.bounds-section,.context-section{background:var(--bg-elevated);border:2px solid var(--edit-border);border-radius:.75rem;padding:1.25rem;margin-bottom:1.25rem;transition:border-color .15s}.bounds-section:hover,.bounds-section:focus-within,.context-section:hover,.context-section:focus-within{border-color:var(--accent-hover)}.bounds-section-header{display:flex;align-items:flex-start;gap:.625rem;margin-bottom:1rem}.bounds-section-icon{font-size:1.1rem;flex-shrink:0;margin-top:.1rem}.bounds-section-title{font-size:.9rem;font-weight:700;color:var(--text-primary)}.bounds-section-subtitle{font-size:.75rem;color:var(--text-tertiary)}.bounds-fields-grid{display:flex;flex-direction:column;gap:.75rem}.bounds-field-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:1rem;width:100%}.bounds-field-label{flex:1;min-width:0}.bounds-field-label .form-label{display:inline;margin-bottom:0}.bounds-field-input{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end}.bounds-field-input .bounded-input{align-items:flex-end}.bounds-field-input .bounded-input-presets{justify-content:flex-end}.bounds-field-label-inline{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.bounds-field-label-inline .form-label{margin-bottom:0}.field-info-toggle{display:inline-flex;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;border-radius:50%;border:1px solid var(--border);background:var(--bg-main);color:var(--text-tertiary);font-size:.65rem;font-weight:700;cursor:pointer;flex-shrink:0;transition:color .15s,border-color .15s;font-family:inherit;line-height:1;padding:0}.field-info-toggle:hover{color:var(--accent);border-color:var(--accent)}.field-description{margin-top:.25rem;margin-bottom:.25rem}@media (max-width: 768px){.bounds-field-row{flex-direction:column;gap:.375rem}}.bounded-input{display:flex;flex-direction:column;align-items:flex-start;gap:.375rem}.bounded-input-field{display:inline-flex;align-items:stretch;border:1px solid var(--border-field);border-radius:.5rem;overflow:hidden;background:var(--bg-field);color:var(--text-field)}.stepper-btn{display:flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;background:transparent;border:none;cursor:pointer;font-size:1.1rem;font-weight:600;color:var(--text-field);font-family:inherit;flex-shrink:0;transition:background .15s}.stepper-btn:hover:not(:disabled){background:var(--placeholder-field)}.stepper-btn:disabled{opacity:.35;cursor:not-allowed}.stepper-input{width:4.5rem;text-align:center;border:none;border-left:1px solid var(--placeholder-field);border-right:1px solid var(--placeholder-field);padding:.5rem .25rem;font-size:.9rem;font-family:inherit;color:var(--text-field);background:var(--bg-field);outline:none;-moz-appearance:textfield}.stepper-input::-webkit-outer-spin-button,.stepper-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.stepper-input:focus{box-shadow:inset 0 0 0 2px var(--field-focus-ring)}.bounded-input-unit{display:inline-flex;align-items:center;padding:0 .75rem;font-size:.8rem;color:var(--text-field);opacity:.7;white-space:nowrap;-webkit-user-select:none;user-select:none;background:transparent}.bounded-input-presets{display:flex;flex-wrap:wrap;gap:.25rem}.preset-chip{font-family:inherit;font-size:.75rem;padding:.2rem .625rem;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--text-secondary);cursor:pointer;transition:background .15s,color .15s,border-color .15s}.preset-chip:hover{background:var(--accent-subtle);color:var(--accent);border-color:var(--accent)}.preset-chip-selected{background:var(--accent);color:var(--bg-main);border-color:var(--accent)}.bounded-input-echo{font-size:.75rem;color:var(--text-secondary);font-style:italic}.field-label-with-tip{display:inline-flex;align-items:center;gap:.375rem;position:relative}.field-tip-trigger{display:inline-flex;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:.7rem;font-style:italic;font-family:serif;font-weight:600;line-height:1;cursor:help;padding:0}.field-tip-trigger:hover,.field-tip-trigger[aria-expanded=true]{border-color:var(--accent);color:var(--accent)}.field-tip-bubble{position:absolute;top:calc(100% + .375rem);left:0;z-index:10;width:max-content;max-width:22rem;padding:.5rem .75rem;background:var(--bg-elevated);border:1px solid var(--border);border-radius:.375rem;font-size:.8rem;color:var(--text-primary);line-height:1.45;box-shadow:0 4px 12px #00000040;pointer-events:none}.tag-input{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;padding:.375rem .5rem;background:var(--bg-field);border:1px solid var(--border-field);border-radius:.5rem;cursor:text;min-height:2.5rem;transition:box-shadow .2s,border-color .2s;color:var(--text-field)}.tag-input:focus-within{box-shadow:0 0 0 3px var(--field-focus-ring)}.tag-input-invalid{border-color:var(--danger)}.tag-input-invalid:focus-within{box-shadow:0 0 0 3px #dc26262e}.tag-pill{display:inline-flex;align-items:center;gap:.25rem;font-size:.8rem;padding:.2rem .5rem;border-radius:1rem;background:var(--placeholder-field);color:var(--text-field);font-weight:500;white-space:nowrap}.tag-remove{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;font-size:.9rem;line-height:1;color:var(--text-field);cursor:pointer;padding:0;margin-left:.125rem;opacity:.7;transition:opacity .15s}.tag-remove:hover{opacity:1}.tag-input-field{flex:1;min-width:8rem;border:none;outline:none;background:transparent;font-size:.875rem;font-family:inherit;color:var(--text-field);padding:.2rem 0}.tag-input-field::placeholder{color:var(--placeholder-field);opacity:1}.checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem}.checkbox-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.85rem;padding:.35rem .75rem;border-radius:1rem;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;transition:all .15s;-webkit-user-select:none;user-select:none}.checkbox-pill input[type=checkbox]{display:none}.checkbox-pill:hover{border-color:var(--accent);color:var(--text-primary)}.checkbox-pill-selected{background:var(--btn-primary-bg);border-color:var(--btn-primary-bg);color:var(--btn-primary-fg);font-weight:500}.checkbox-pill-selected:hover{background:var(--btn-primary-bg-hover);border-color:var(--btn-primary-bg-hover);color:var(--btn-primary-fg)}@keyframes hap-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.skeleton{display:block;position:relative;border-radius:.375rem;background-color:var(--bg-main);background-image:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 20%,rgba(255,255,255,.16) 50%,rgba(255,255,255,.06) 80%,transparent 100%);background-size:200% 100%;background-repeat:no-repeat;animation:hap-skeleton-shimmer 1.6s ease-in-out infinite;will-change:background-position}[data-theme=light] .skeleton,:root:not([data-theme=dark]) .skeleton{background-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.03) 20%,rgba(0,0,0,.08) 50%,rgba(0,0,0,.03) 80%,transparent 100%)}.skeleton-title{height:1.5rem;width:3rem;margin:0 auto}.skeleton-line{height:.75rem;width:100%}.skeleton-line-sm{height:.65rem;width:60%}.skeleton-card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:.5rem;padding:.75rem 1rem;box-shadow:0 1px 2px #0000000a;display:flex;align-items:center;gap:.75rem}.skeleton-dot{width:.5rem;height:.5rem;border-radius:50%;flex-shrink:0}@media (prefers-reduced-motion: reduce){.skeleton{animation:none;background-image:none}}.intent-layout{display:grid;grid-template-columns:minmax(320px,1fr) minmax(420px,1.4fr);gap:1.25rem;align-items:start}.intent-pane.chat{display:flex;flex-direction:column;gap:.75rem;position:sticky;top:1rem;align-self:start;max-height:calc(100vh - 4rem)}.intent-pane.document{display:flex;flex-direction:column;gap:.875rem}.intent-pane .card-title{font-size:1.25rem;margin:0 0 1rem}.intent-textarea{width:100%;background:var(--bg-field);border:1px solid var(--border-field);border-radius:.5rem;padding:.625rem .75rem;color:var(--text-field);font-size:.9rem;line-height:1.5;resize:vertical;min-height:22rem;outline:none;font-family:inherit;transition:box-shadow .15s}.intent-textarea:focus{box-shadow:0 0 0 3px var(--field-focus-ring)}.intent-textarea::placeholder{color:var(--placeholder-field);opacity:1}.intent-footer{display:flex;align-items:center;gap:.625rem;margin-top:.5rem}.intent-continue-btn{flex:1}.intent-chat{display:flex;flex-direction:column;gap:.75rem;flex:1;min-height:0}.intent-chat .chat-header{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted)}.intent-chat .chat-messages{flex:1;overflow-y:auto;position:relative;display:flex;flex-direction:column;gap:1rem;padding:.25rem 0;min-height:14rem;max-height:32rem}.intent-chat .chat-msg{display:flex;max-width:100%}.intent-chat .chat-msg.assistant{justify-content:flex-start}.intent-chat .chat-msg.assistant .chat-msg-body{max-width:100%;color:var(--text-primary);font-size:.9rem;line-height:1.65;white-space:pre-wrap;word-break:break-word}.intent-chat .chat-msg.user{justify-content:flex-end}.intent-chat .chat-msg.user .chat-msg-body{max-width:85%;background:var(--bg-main);border:1px solid var(--border);border-radius:1.125rem;padding:.55rem .875rem;color:var(--text-primary);font-size:.9rem;line-height:1.55;white-space:pre-wrap;word-break:break-word}.intent-chat .chat-msg-prose{white-space:pre-wrap;word-break:break-word}.intent-chat .chat-msg-thinking{color:var(--text-muted);font-style:italic}.intent-chat .chat-fenced-block{display:block;background:var(--bg-elevated);border:1px solid var(--border);border-radius:.5rem;padding:.625rem .75rem;margin:.5rem 0;font-family:SF Mono,Monaco,Cascadia Code,monospace;font-size:.8rem;white-space:pre-wrap;color:var(--text-primary);line-height:1.55}.intent-chat .chat-apply-btn{margin-top:.5rem}.intent-chat .chat-composer{display:flex;flex-direction:column;gap:.375rem}.intent-chat .chat-composer-pill{display:flex;align-items:center;gap:.5rem;background:var(--bg-field);border:1px solid var(--border-field);border-radius:1.5rem;padding:.25rem .25rem .25rem 1rem;transition:box-shadow .15s;color:var(--text-field)}.intent-chat .chat-composer-pill:focus-within{box-shadow:0 0 0 3px var(--field-focus-ring)}.intent-chat .chat-input{flex:1;resize:none;background:transparent;border:none;padding:.5rem 0;color:var(--text-field);font-size:.9rem;line-height:1.4;outline:none;font-family:inherit;max-height:8rem;align-self:stretch}.intent-chat .chat-input::placeholder{color:var(--placeholder-field);opacity:1}.intent-chat .chat-send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:999px;background:var(--text-field);color:var(--bg-field);border:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:1rem;font-weight:700;line-height:1;align-self:center;transition:opacity .15s,transform .1s}.intent-chat .chat-send-btn:hover:not(:disabled){opacity:.85}.intent-chat .chat-send-btn:active:not(:disabled){transform:scale(.95)}.intent-chat .chat-send-btn:disabled{opacity:.35;cursor:not-allowed}.intent-chat .chat-composer-hint{font-size:.72rem;color:var(--text-muted);padding-left:.5rem}.hint-box{display:flex;gap:.625rem;padding:.75rem .875rem;background:var(--bg-main);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:.5rem;font-size:.85rem;color:var(--text-primary);line-height:1.55;margin-top:.25rem}.hint-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.125rem;height:1.125rem;border-radius:999px;border:1px solid var(--accent);color:var(--accent);font-size:.7rem;font-style:italic;font-family:serif;font-weight:700;line-height:1;margin-top:.125rem}.hint-body{flex:1;min-width:0}.hint-head{font-weight:600;margin-bottom:.25rem}@media (max-width: 1024px){.intent-layout{grid-template-columns:1fr}.intent-pane.chat{position:static;max-height:none}}@media (max-width: 768px){.intent-layout>.intent-pane.chat{display:none}.floating-help{display:inline-flex}}.floating-help{display:none;align-items:center;gap:.5rem;position:fixed;bottom:1rem;right:1rem;z-index:5;background:var(--btn-primary-bg);color:var(--btn-primary-fg);border:2px solid var(--btn-primary-bg);border-radius:999px;padding:.625rem 1.125rem;font-weight:700;font-size:.85rem;cursor:pointer;font-family:inherit;box-shadow:0 6px 18px var(--primary-glow)}.floating-help:hover{background:var(--btn-primary-bg-hover);border-color:var(--btn-primary-bg-hover)}.bottom-sheet{position:fixed;left:0;right:0;bottom:0;height:88vh;background:var(--bg-elevated);border-top:1px solid var(--border);border-radius:.75rem .75rem 0 0;z-index:11;padding:1rem 1rem 1.25rem;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;transform:translateY(100%);transition:transform .25s ease-out;box-shadow:0 -8px 32px #0009;outline:none}.bottom-sheet.is-open{transform:translateY(0)}.bottom-sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;z-index:10;opacity:0;pointer-events:none;transition:opacity .2s}.bottom-sheet-backdrop.is-open{opacity:1;pointer-events:auto}.bottom-sheet-handle{width:2.5rem;height:.25rem;background:var(--text-muted);border-radius:999px;margin:0 auto .5rem;flex-shrink:0}.bottom-sheet-close{position:absolute;top:.5rem;right:.875rem;background:transparent;border:none;color:var(--text-primary);cursor:pointer;font-size:1.5rem;line-height:1;font-family:inherit}@media (prefers-reduced-motion: reduce){.bottom-sheet,.bottom-sheet-backdrop{transition:none}}.field-editable{background:var(--bg-elevated);border:2px solid var(--edit-border);border-radius:.5rem;padding:.875rem 1rem;margin-bottom:1rem;transition:border-color .15s}.field-editable:hover,.field-editable:focus-within{border-color:var(--accent-hover)}.field-label{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-tertiary);margin-bottom:.5rem;display:flex;align-items:center;gap:.35rem}.field-label .pen{opacity:.7;font-size:.75rem}.info-block{background:var(--bg-main);border-left:3px solid var(--border);border-radius:0 .375rem .375rem 0;padding:.75rem 1rem;margin-bottom:.75rem;font-size:.85rem;color:var(--text-secondary)}.info-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:.4rem}.info-title{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-tertiary)}.info-edit{font-size:.72rem;color:var(--text-tertiary);text-decoration:underline;cursor:pointer;background:none;border:none;font-family:inherit;padding:0}.info-edit:hover{color:var(--accent-hover)}.info-kv{display:grid;grid-template-columns:max-content 1fr;gap:.15rem 1rem;margin:0}.info-kv dt{color:var(--text-tertiary)}.info-kv dd{margin:0;color:var(--text-secondary);word-break:break-word}.info-section-label{margin:1.25rem 0 .5rem;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-tertiary)}.intent-pane.chat.tool{background:var(--bg-main);border:1px dashed var(--border)}.recent-blocks .card-header{margin-bottom:.35rem}.recent-blocks .rb-sub{color:var(--text-muted);font-size:.8rem;margin:0 0 1.1rem;line-height:1.45;max-width:36ch}.recent-blocks .rb-count,.attention .rb-count{flex:none;min-width:1.6rem;height:1.6rem;padding:0 .45rem;display:inline-flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:600;font-variant-numeric:tabular-nums;background:color-mix(in srgb,var(--warning) 14%,transparent);color:var(--warning);border:1px solid color-mix(in srgb,var(--warning) 35%,transparent);border-radius:999px}.recent-blocks .rb-rows{display:flex;flex-direction:column}.recent-blocks .rb-row{display:grid;grid-template-columns:auto 1fr auto;gap:.75rem .85rem;align-items:start;padding:.85rem 0;border-top:1px solid var(--border)}.recent-blocks .rb-row:first-child{border-top:none}.recent-blocks .rb-dot{width:.5rem;height:.5rem;border-radius:999px;margin-top:.35rem;background:var(--warning)}.recent-blocks .rb-dot.act{background:var(--danger)}.recent-blocks .rb-dot.info{background:var(--text-muted)}.recent-blocks .rb-body{min-width:0}.recent-blocks .rb-line{font-size:.86rem;line-height:1.4;color:var(--text-primary)}.recent-blocks .rb-line b{font-weight:600}.recent-blocks .rb-meta{display:flex;align-items:center;gap:.5rem;margin-top:.3rem;flex-wrap:wrap}.recent-blocks .rb-chip{font-size:.64rem;letter-spacing:.06em;text-transform:uppercase;font-weight:600;padding:.12rem .44rem;border-radius:.35rem;background:var(--accent-subtle);color:var(--text-muted)}.recent-blocks .rb-chip.warn{background:color-mix(in srgb,var(--warning) 14%,transparent);color:var(--warning)}.recent-blocks .rb-chip.act{background:var(--danger-subtle);color:var(--danger)}.recent-blocks .rb-via{font-size:.72rem;color:var(--text-muted)}.recent-blocks .rb-when{font-size:.74rem;color:var(--text-muted);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}.recent-blocks .rb-fix{display:inline-block;margin-top:.4rem;font-size:.76rem;color:var(--text-primary);text-underline-offset:2px}.recent-blocks .rb-foot{margin-top:1rem;padding-top:.9rem;border-top:1px solid var(--border)}.recent-blocks .rb-viewall{font:inherit;font-size:.8rem;color:var(--text-primary);background:none;border:none;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.recent-blocks .rb-empty,.all-clear{text-align:center;padding:1.25rem 1rem .25rem}.attention .card-header{margin-bottom:.5rem}.attention-rows{display:flex;flex-direction:column}.attention-row{display:flex;align-items:center;gap:.75rem;padding:.7rem 0;border-top:1px solid var(--border);text-decoration:none;color:inherit}.attention-row:first-child{border-top:none}.attention-row:hover{background:var(--accent-subtle)}.attention-row:focus-visible{outline:2px solid var(--primary-focus-ring);outline-offset:2px}.attention-dot{width:.5rem;height:.5rem;border-radius:50%;flex-shrink:0}.recent-blocks .rb-mark,.all-clear .rb-mark{width:2.25rem;height:2.25rem;border-radius:999px;background:var(--success-subtle);color:var(--success);display:inline-flex;align-items:center;justify-content:center;margin-bottom:.75rem}.recent-blocks .rb-empty h3,.all-clear h3{font-size:.9rem;margin:0 0 .3rem}.recent-blocks .rb-empty p,.all-clear p{font-size:.8rem;color:var(--text-muted);margin:0 auto;max-width:30ch;line-height:1.45}.receipt-head{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.receipt-what{font-size:.95rem;font-weight:600;letter-spacing:-.01em;color:var(--text-primary)}.receipt-tag{font-size:.68rem;padding:.12rem .4rem;border-radius:4px;border:1px solid var(--border);color:var(--text-muted);white-space:nowrap}.receipt-tag-bound{color:var(--success);border-color:var(--success)}.receipt-scope{font-size:.82rem;color:var(--text-muted);margin-top:.2rem}.receipt-foot{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-top:.55rem;padding-top:.55rem;border-top:1px solid var(--border)}.receipt-link{font-size:.78rem;color:var(--text-secondary);text-decoration:none;border-bottom:1px solid var(--border)}.receipt-link:hover{color:var(--accent-hover);border-color:var(--accent-hover)}.receipt-id{font-family:SF Mono,Monaco,monospace;font-size:.7rem;color:var(--text-muted)}.receipt-more{margin-top:.5rem}.receipt-more summary{cursor:pointer;font-size:.75rem;color:var(--text-muted);list-style:none}.receipt-more summary::-webkit-details-marker{display:none}.receipt-more summary:before{content:"▸"}.receipt-more[open] summary:before{content:"▾"}.receipt-kv{font-size:.72rem;color:var(--text-muted);margin-top:.4rem;line-height:1.7;font-family:SF Mono,Monaco,monospace;word-break:break-all}.receipt-rows{display:grid;grid-template-columns:7.5rem 1fr;row-gap:.35rem;column-gap:1rem;font-size:.8rem;margin:.8rem 0 0;padding-top:.7rem;border-top:1px solid var(--border)}.receipt-row-label{color:var(--text-muted);margin:0}.receipt-row-value{margin:0;overflow-wrap:anywhere}.receipt-num{font-variant-numeric:tabular-nums}.receipt-intent{font-style:italic;line-height:1.55}.receipt-absent{color:var(--text-muted)}@media (max-width: 480px){.receipt-rows{grid-template-columns:1fr;row-gap:.15rem}.receipt-row-label{margin-top:.35rem}}.receipt-evidence-link{font-size:.78rem;font-weight:500;color:var(--text-primary);background:none;border:none;border-bottom:1px solid var(--border);padding:0;cursor:pointer;font-family:inherit}.receipt-evidence-link:hover{border-color:var(--text-primary)}.receipt-public{margin-left:auto;font-size:.76rem;color:var(--text-muted)}.receipt-verified{font-size:.76rem;font-weight:500;color:var(--success)}.receipt-tamper{font-size:.76rem;font-weight:600;color:var(--danger)}
@@ -14,8 +14,8 @@
14
14
  <meta name="apple-mobile-web-app-title" content="Suveren" />
15
15
  <meta name="theme-color" content="#111111" />
16
16
  <title>Suveren</title>
17
- <script type="module" crossorigin src="/assets/index-B1qNl7zo.js"></script>
18
- <link rel="stylesheet" crossorigin href="/assets/index-BJqF5rmx.css">
17
+ <script type="module" crossorigin src="/assets/index-Bqb9azUL.js"></script>
18
+ <link rel="stylesheet" crossorigin href="/assets/index-DBdWDq4V.css">
19
19
  </head>
20
20
  <body>
21
21
  <div id="root"></div>
package/lib/config.d.mts CHANGED
@@ -12,6 +12,9 @@ export declare const DEFAULT_AS_URL: string;
12
12
  export interface SavedConfig {
13
13
  asUrl?: string;
14
14
  caFile?: string;
15
+ pinTls?: boolean;
16
+ pinTlsExpectedFingerprint?: string;
17
+ simulation?: boolean;
15
18
  }
16
19
 
17
20
  export declare function readConfig(dataDir: string): SavedConfig;
@@ -35,3 +38,4 @@ export declare function validateCaFile(candidate: string): CaFileValidation;
35
38
 
36
39
  export declare function resolveAsUrl(dataDir: string): string;
37
40
  export declare function resolveCaFile(dataDir: string): string | undefined;
41
+ export declare function resolveSimulation(dataDir: string): boolean;
package/lib/config.mjs CHANGED
@@ -33,6 +33,7 @@ export function readConfig(dataDir) {
33
33
  if (typeof data.caFile === 'string') out.caFile = data.caFile;
34
34
  if (typeof data.pinTls === 'boolean') out.pinTls = data.pinTls;
35
35
  if (typeof data.pinTlsExpectedFingerprint === 'string') out.pinTlsExpectedFingerprint = data.pinTlsExpectedFingerprint;
36
+ if (typeof data.simulation === 'boolean') out.simulation = data.simulation;
36
37
  return out;
37
38
  } catch {
38
39
  return {};
@@ -59,6 +60,7 @@ function readConfigStrict(dataDir) {
59
60
  if (typeof data.caFile === 'string') out.caFile = data.caFile;
60
61
  if (typeof data.pinTls === 'boolean') out.pinTls = data.pinTls;
61
62
  if (typeof data.pinTlsExpectedFingerprint === 'string') out.pinTlsExpectedFingerprint = data.pinTlsExpectedFingerprint;
63
+ if (typeof data.simulation === 'boolean') out.simulation = data.simulation;
62
64
  return out;
63
65
  }
64
66
 
@@ -196,3 +198,17 @@ export function resolvePinTls(dataDir) {
196
198
  export function resolvePinTlsExpectedFingerprint(dataDir) {
197
199
  return readConfig(dataDir).pinTlsExpectedFingerprint;
198
200
  }
201
+
202
+ /**
203
+ * The saved simulation-mode setting (default false — off, nothing changes for
204
+ * a normal install). No env/flag tier of its own here: `start --simulation`
205
+ * and `simulation on|off` both go through `writeConfig`, and bundle/server.js
206
+ * is the one place that turns this saved value into `SUVEREN_SIMULATION` for
207
+ * the children it spawns (see that file's doc comment) — mirroring how
208
+ * `resolveCaFile` works, not how `resolveAsUrl` works (no env override here;
209
+ * an operator who wants to force it for one run can still set
210
+ * SUVEREN_SIMULATION directly, which server.js honours ahead of this).
211
+ */
212
+ export function resolveSimulation(dataDir) {
213
+ return readConfig(dataDir).simulation === true;
214
+ }
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 25 Sep 2026 22:04:07 GMT
11
+ * Last updated: Thu, 01 Oct 2026 22:35:12 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "26.6.3",
3
+ "version": "26.6.4",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -135,6 +135,6 @@
135
135
  "undici-types": "~8.9.0"
136
136
  },
137
137
  "peerDependencies": {},
138
- "typesPublisherContentHash": "d205e8413ec98b6ead53b0e2aa6084db2f7fcdd0280e0098ec6349f7f7962bb4",
138
+ "typesPublisherContentHash": "6c3e6bb0de9116746132571c03cd320ed541b2c7576c42dd3c7fa509e3440b61",
139
139
  "typeScriptVersion": "5.6"
140
140
  }
@@ -94,6 +94,12 @@ declare module "node:zlib" {
94
94
  * [Zstd parameters](https://nodejs.org/docs/latest-v26.x/api/zlib.html#zstd-constants).
95
95
  */
96
96
  params?: { [key: number]: number | boolean } | undefined;
97
+ /**
98
+ * Expected total size of the uncompressed input. Must match the input size
99
+ * when compression finishes. Only applicable to Zstd compressors.
100
+ * @since v22.15.0
101
+ */
102
+ pledgedSrcSize?: number | undefined;
97
103
  /**
98
104
  * Limits output size when using
99
105
  * [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
@@ -302,6 +302,15 @@ RedirectableRequest.prototype._sanitizeOptions = function (options) {
302
302
  if (!options.headers) {
303
303
  options.headers = {};
304
304
  }
305
+ // Convert [header1, value1, header2, value2, …] to object
306
+ else if (Array.isArray(options.headers)) {
307
+ var headerList = options.headers;
308
+ options.headers = {};
309
+ for (var i = 0; i < headerList.length; i += 2) {
310
+ options.headers[headerList[i]] = headerList[i + 1];
311
+ }
312
+ }
313
+ // Ensure sensitive headers are always present
305
314
  if (!isArray(options.sensitiveHeaders)) {
306
315
  options.sensitiveHeaders = [];
307
316
  }
@@ -701,7 +710,7 @@ function isURL(value) {
701
710
  }
702
711
 
703
712
  function escapeRegex(regex) {
704
- return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
713
+ return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&");
705
714
  }
706
715
 
707
716
  // Exports
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "follow-redirects",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "HTTP and HTTPS modules that follow redirects.",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -115,43 +115,43 @@ A few terms used throughout the API can be confusing if you haven't worked deepl
115
115
  - `static fromHex(hex: string): Address4` — Converts a hex string to an IPv4 address object. Accepts 8 hex digits with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`). Throws `AddressError` for any other length or for non-hex characters. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L189)
116
116
  - `static fromInteger(integer: number): Address4` — Converts an integer into a IPv4 address object. The integer must be a non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L212)
117
117
  - `static fromArpa(arpaFormAddress: string): Address4` — Return an address from in-addr.arpa form: the four octets reversed, with or without the `.in-addr.arpa` suffix and root dot, in any case. Throws `AddressError` unless the reversed labels form a valid IPv4 address, so `fromArpa(x.reverseForm())` round-trips reverseForm. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L231)
118
- - `static fromBigInt(bigInt: bigint): Address4` — Converts a BigInt to a v4 address object. The value must be in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L413)
119
- - `static fromByteArray(bytes: number[]): Address4` — Convert a byte array to an Address4 object. Throws `AddressError` unless given exactly 4 integers from 0 to 255. Signed bytes are rejected, so this differs from `Address6.fromByteArray`, which folds them; the two contracts converge on this stricter form in the next major version. To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L431)
120
- - `static fromUnsignedByteArray(bytes: number[]): Address4` — Convert an unsigned byte array to an Address4 object. Throws `AddressError` unless given exactly 4 bytes, and rejects values outside 0 to 255 when parsing the resulting address. To convert from a Node.js `Buffer`, spread it: `Address4.fromUnsignedByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L447)
118
+ - `static fromBigInt(bigInt: bigint): Address4` — Converts a BigInt to a v4 address object. The value must be in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L422)
119
+ - `static fromByteArray(bytes: number[]): Address4` — Convert a byte array to an Address4 object. Throws `AddressError` unless given exactly 4 integers from 0 to 255. Signed bytes are rejected, so this differs from `Address6.fromByteArray`, which folds them; the two contracts converge on this stricter form in the next major version. To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L440)
120
+ - `static fromUnsignedByteArray(bytes: number[]): Address4` — Convert an unsigned byte array to an Address4 object. Throws `AddressError` unless given exactly 4 bytes, and rejects values outside 0 to 255 when parsing the resulting address. To convert from a Node.js `Buffer`, spread it: `Address4.fromUnsignedByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L456)
121
121
 
122
122
  **Instance methods**
123
123
 
124
124
  - `parse(address: string): string[]` — Parses an IPv4 address string into its four octet groups and stores the result on `this.parsedAddress`. Called automatically by the constructor; you typically don't need to call it directly. Throws `AddressError` if the input is not a valid IPv4 address. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L79)
125
125
  - `correctForm(): string` — Returns the address in correct form: octets joined with `.` and any leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the canonical dotted-decimal representation. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L100)
126
- - `toHex(): string` — Converts an IPv4 address object to a hex string [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L245)
127
- - `toArray(): number[]` — Converts an IPv4 address object to an array of bytes. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L255)
128
- - `toGroup6(): string` — Converts an IPv4 address object to an IPv6 address group [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L263)
129
- - `bigInt(): bigint` — Returns the address as a `bigint` [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L282)
130
- - `startAddress(): Address4` — The first address in the range given by this address' subnet. Often referred to as the Network Address. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L299)
131
- - `startAddressExclusive(): Address4` — The first host address in the range given by this address's subnet ie the first address after the Network Address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L308)
132
- - `offset(n: number | bigint): Address4` — Returns the address `n` addresses after this one (or before, when `n` is negative), keeping this address's subnet mask. Throws `AddressError` when the result would fall outside the IPv4 address space or `n` is not an integer. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L323)
133
- - `nextNetwork(): Address4` — Returns the network that follows this address's network: the address after endAddress, with the same subnet mask. Throws `AddressError` when this network is the last one in the address space. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L337)
134
- - `endAddress(): Address4` — The last address in the range given by this address' subnet Often referred to as the Broadcast [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L360)
135
- - `endAddressExclusive(): Address4` — The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L369)
136
- - `subnetMaskAddress(): Address4` — The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for a `/20`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L379)
137
- - `wildcardMask(): Address4` — The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L391)
138
- - `networkForm(): string` — The network address in CIDR string form, e.g. `192.168.1.0/24` for `192.168.1.5/24`. For an address with no explicit subnet the prefix is `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L403)
139
- - `mask(mask?: number): string` — Returns the first n bits of the address, defaulting to the subnet mask [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L461)
140
- - `getBitsBase2(start: number, end: number): string` — Returns the bits in the given range as a base-2 string [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L473)
141
- - `reverseForm(options?: ReverseFormOptions): string` — Return the reversed in-addr.arpa form of the address, e.g. `42.2.0.192.in-addr.arpa.` for `192.0.2.42`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L484)
142
- - `isMulticast(): boolean` — Returns true if the given address is a multicast address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L522)
143
- - `isPrivate(): boolean` — Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L530)
144
- - `isLoopback(): boolean` — Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L538)
145
- - `isLinkLocal(): boolean` — Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L546)
146
- - `isUnspecified(): boolean` — Returns true if the address is the unspecified address `0.0.0.0`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L554)
147
- - `isBroadcast(): boolean` — Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L562)
148
- - `isCGNAT(): boolean` — Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L570)
149
- - `isDocumentation(): boolean` — Returns true if the address is in one of the documentation ranges `192.0.2.0/24`, `198.51.100.0/24`, or `203.0.113.0/24` ([RFC 5737](https://datatracker.ietf.org/doc/html/rfc5737)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L579)
150
- - `isBenchmarking(): boolean` — Returns true if the address is in the benchmarking range `198.18.0.0/15` ([RFC 2544](https://datatracker.ietf.org/doc/html/rfc2544)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L587)
151
- - `isReserved(): boolean` — Returns true if the address is in the reserved range `240.0.0.0/4` ([RFC 1112](https://datatracker.ietf.org/doc/html/rfc1112)), which includes the limited broadcast address. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L596)
152
- - `isGlobal(): boolean` — Returns true if the address is globally reachable: not multicast, and not in any block the [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/) marks as not globally reachable. That covers everything the individual classifiers name (private, loopback, link-local, CGNAT, unspecified, broadcast, documentation, benchmarking, reserved) and the blocks they do not, such as `0.0.0.0/8` and the IETF protocol assignments in `192.0.0.0/24`. This is the single predicate to use where a request must not reach an internal or special-purpose destination; see SECURITY.md. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L611)
153
- - `binaryZeroPad(): string` — Returns a zero-padded base-2 string representation of the address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L619)
154
- - `groupForV6(): string` — Groups an IPv4 address for inclusion at the end of an IPv6 address. Returns an HTML fragment: each half of the address is wrapped in a `<span>` carrying the group classes an address-inspector UI hovers on. The address content is HTML-escaped; anything you concatenate around it is your responsibility. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L635)
126
+ - `toHex(): string` — Converts an IPv4 address object to a hex string [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L254)
127
+ - `toArray(): number[]` — Converts an IPv4 address object to an array of bytes. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L264)
128
+ - `toGroup6(): string` — Converts an IPv4 address object to an IPv6 address group [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L272)
129
+ - `bigInt(): bigint` — Returns the address as a `bigint` [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L291)
130
+ - `startAddress(): Address4` — The first address in the range given by this address' subnet. Often referred to as the Network Address. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L308)
131
+ - `startAddressExclusive(): Address4` — The first host address in the range given by this address's subnet ie the first address after the Network Address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L317)
132
+ - `offset(n: number | bigint): Address4` — Returns the address `n` addresses after this one (or before, when `n` is negative), keeping this address's subnet mask. Throws `AddressError` when the result would fall outside the IPv4 address space or `n` is not an integer. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L332)
133
+ - `nextNetwork(): Address4` — Returns the network that follows this address's network: the address after endAddress, with the same subnet mask. Throws `AddressError` when this network is the last one in the address space. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L346)
134
+ - `endAddress(): Address4` — The last address in the range given by this address' subnet Often referred to as the Broadcast [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L369)
135
+ - `endAddressExclusive(): Address4` — The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L378)
136
+ - `subnetMaskAddress(): Address4` — The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for a `/20`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L388)
137
+ - `wildcardMask(): Address4` — The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L400)
138
+ - `networkForm(): string` — The network address in CIDR string form, e.g. `192.168.1.0/24` for `192.168.1.5/24`. For an address with no explicit subnet the prefix is `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L412)
139
+ - `mask(mask?: number): string` — Returns the first n bits of the address, defaulting to the subnet mask [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L470)
140
+ - `getBitsBase2(start: number, end: number): string` — Returns the bits in the given range as a base-2 string [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L482)
141
+ - `reverseForm(options?: ReverseFormOptions): string` — Return the reversed in-addr.arpa form of the address, e.g. `42.2.0.192.in-addr.arpa.` for `192.0.2.42`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L493)
142
+ - `isMulticast(): boolean` — Returns true if the given address is a multicast address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L531)
143
+ - `isPrivate(): boolean` — Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L539)
144
+ - `isLoopback(): boolean` — Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L547)
145
+ - `isLinkLocal(): boolean` — Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L555)
146
+ - `isUnspecified(): boolean` — Returns true if the address is the unspecified address `0.0.0.0`. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L563)
147
+ - `isBroadcast(): boolean` — Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L571)
148
+ - `isCGNAT(): boolean` — Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L579)
149
+ - `isDocumentation(): boolean` — Returns true if the address is in one of the documentation ranges `192.0.2.0/24`, `198.51.100.0/24`, or `203.0.113.0/24` ([RFC 5737](https://datatracker.ietf.org/doc/html/rfc5737)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L588)
150
+ - `isBenchmarking(): boolean` — Returns true if the address is in the benchmarking range `198.18.0.0/15` ([RFC 2544](https://datatracker.ietf.org/doc/html/rfc2544)). [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L596)
151
+ - `isReserved(): boolean` — Returns true if the address is in the reserved range `240.0.0.0/4` ([RFC 1112](https://datatracker.ietf.org/doc/html/rfc1112)), which includes the limited broadcast address. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L605)
152
+ - `isGlobal(): boolean` — Returns true if the address is globally reachable: not multicast, and not in any block the [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/) marks as not globally reachable. That covers everything the individual classifiers name (private, loopback, link-local, CGNAT, unspecified, broadcast, documentation, benchmarking, reserved) and the blocks they do not, such as `0.0.0.0/8` and the IETF protocol assignments in `192.0.0.0/24`. This is the single predicate to use where a request must not reach an internal or special-purpose destination; see SECURITY.md. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L620)
153
+ - `binaryZeroPad(): string` — Returns a zero-padded base-2 string representation of the address [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L628)
154
+ - `groupForV6(): string` — Groups an IPv4 address for inclusion at the end of an IPv6 address. Returns an HTML fragment: each half of the address is wrapped in a `<span>` carrying the group classes an address-inspector UI hovers on. The address content is HTML-escaped; anything you concatenate around it is your responsibility. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L644)
155
155
 
156
156
  **Properties**
157
157
 
@@ -164,8 +164,8 @@ A few terms used throughout the API can be confusing if you haven't worked deepl
164
164
  - `subnetMask: number` — [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L20)
165
165
  - `v4: boolean` — [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L21)
166
166
  - `isCorrect: () => boolean` — Returns true if the address is correct, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L108)
167
- - `isInSubnet: (address: Address4 | Address6) => boolean` — Returns true if the given address is in the subnet of the current address. An `Address6` is never in the subnet of an `Address4`; convert with `to4()` or `Address6.fromAddress4()` to compare across families. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L504)
168
- - `isHostInSubnet: (address: Address4 | Address6) => boolean` — Returns true if this address's host bits fall inside the given subnet, ignoring this address's own subnet mask. Prefer this over `isInSubnet` when classifying a single address, so the answer doesn't change with the CIDR suffix the caller happened to write — notably when the address came from untrusted input and the result backs a trust-boundary decision. An `Address6` is never in the subnet of an `Address4`; convert with `to4()` or `Address6.fromAddress4()` to compare across families. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L516)
167
+ - `isInSubnet: (address: Address4 | Address6) => boolean` — Returns true if the given address is in the subnet of the current address. An `Address6` is never in the subnet of an `Address4`; convert with `to4()` or `Address6.fromAddress4()` to compare across families. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L513)
168
+ - `isHostInSubnet: (address: Address4 | Address6) => boolean` — Returns true if this address's host bits fall inside the given subnet, ignoring this address's own subnet mask. Prefer this over `isInSubnet` when classifying a single address, so the answer doesn't change with the CIDR suffix the caller happened to write — notably when the address came from untrusted input and the result backs a trust-boundary decision. An `Address6` is never in the subnet of an `Address4`; convert with `to4()` or `Address6.fromAddress4()` to compare across families. [src](https://github.com/beaugunderson/ip-address/blob/main/src/ipv4.ts#L525)
169
169
 
170
170
  </details>
171
171
 
@@ -235,6 +235,13 @@ class Address4 {
235
235
  * address.correctForm(); // '192.0.2.42'
236
236
  */
237
237
  static fromArpa(arpaFormAddress) {
238
+ // A 15-character address, a "/32" prefix length and ".in-addr.arpa.": the
239
+ // longest name is 32 characters. Longer input is rejected before its
240
+ // labels are split, as the constructor does at its own limit.
241
+ const longest = constants.GROUPS * 4 - 1 + '/32'.length + '.in-addr.arpa.'.length;
242
+ if (arpaFormAddress.length > longest) {
243
+ throw new address_error_1.AddressError(`in-addr.arpa names are at most ${longest} characters.`);
244
+ }
238
245
  // remove an ending ".in-addr.arpa", in any case and with or without the
239
246
  // root dot, as Address6.fromArpa does for ".ip6.arpa"
240
247
  const leader = arpaFormAddress.replace(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AI,QAAQ,CAAC,aAAa,CAAC,CAAC;AAChD,MAAM,kBAAkB,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,AAAD,EAAG,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IACjF,MAAM,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC;IAC1B,SAAS;CACV,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n\nimport * as common from './common';\nimport * as constants from './v4/constants';\nimport { AddressError } from './address-error';\n\nconst isCorrect4 = common.isCorrect(constants.BITS);\n\n/**\n * Represents an IPv4 address\n * @param {string} address - An IPv4 address string\n */\nexport class Address4 {\n address: string;\n addressMinusSuffix: string = '';\n groups: number = constants.GROUPS;\n parsedAddress: string[] = [];\n parsedSubnet: string = '';\n subnet: string = '/32';\n subnetMask: number = 32;\n v4: boolean = true;\n private _binaryZeroPad?: string;\n\n constructor(address: string) {\n this.address = address;\n\n const subnet = constants.RE_SUBNET_STRING.exec(address);\n\n if (subnet) {\n this.parsedSubnet = subnet[0].replace('/', '');\n this.subnetMask = parseInt(this.parsedSubnet, 10);\n this.subnet = `/${this.subnetMask}`;\n\n if (this.subnetMask < 0 || this.subnetMask > constants.BITS) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n address = address.replace(constants.RE_SUBNET_STRING, '');\n }\n\n // Four three-digit octets and three dots: the longest well-formed address\n // is 15 characters. Longer input is rejected before parsing, as Address6\n // does at its own limit.\n const longest = constants.GROUPS * 4 - 1;\n\n if (address.length > longest) {\n throw new AddressError(`IPv4 addresses are at most ${longest} characters.`);\n }\n\n this.addressMinusSuffix = address;\n\n this.parsedAddress = this.parse(address);\n }\n\n /**\n * Returns true if the given string is a valid IPv4 address (with optional\n * CIDR subnet), false otherwise. Host bits in the subnet portion are\n * allowed (e.g. `192.168.1.5/24` is valid); for strict network-address\n * validation compare `correctForm()` to `startAddress().correctForm()`,\n * or use `networkForm()`.\n */\n static isValid(address: string): boolean {\n try {\n // eslint-disable-next-line no-new\n new Address4(address);\n\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Parses an IPv4 address string into its four octet groups and stores the\n * result on `this.parsedAddress`. Called automatically by the constructor;\n * you typically don't need to call it directly. Throws `AddressError` if\n * the input is not a valid IPv4 address.\n */\n parse(address: string) {\n const groups = address.split('.');\n\n // Checked before the general match so the error names the actual problem.\n // Address6 rejects the same notation on its v4-in-v6 path.\n if (groups.some((group) => /^0\\d/.test(group))) {\n throw new AddressError(\"IPv4 addresses can't have leading zeroes.\");\n }\n\n if (!address.match(constants.RE_ADDRESS)) {\n throw new AddressError('Invalid IPv4 address.');\n }\n\n return groups;\n }\n\n /**\n * Returns the address in correct form: octets joined with `.` and any\n * leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the\n * canonical dotted-decimal representation.\n */\n correctForm(): string {\n return this.parsedAddress.map((part) => parseInt(part, 10)).join('.');\n }\n\n /**\n * Returns true if the address is correct, false otherwise\n * @returns {Boolean}\n */\n isCorrect = isCorrect4;\n\n /**\n * Construct an `Address4` from an address and a dotted-decimal subnet\n * mask given as separate strings (e.g. as returned by Node's\n * `os.networkInterfaces()`). Throws `AddressError` if the mask is\n * non-contiguous (e.g. `255.0.255.0`).\n * @example\n * var address = Address4.fromAddressAndMask('192.168.1.1', '255.255.255.0');\n * address.subnetMask; // 24\n */\n static fromAddressAndMask(address: string, mask: string): Address4 {\n const bits = common.prefixLengthFromMask(new Address4(mask).bigInt(), constants.BITS);\n return new Address4(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address4` from an address and a Cisco-style wildcard mask\n * given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard\n * mask is the bitwise inverse of the subnet mask. Throws `AddressError`\n * if the mask is non-contiguous (e.g. `0.255.0.255`).\n * @example\n * var address = Address4.fromAddressAndWildcardMask('10.0.0.1', '0.0.0.255');\n * address.subnetMask; // 24\n */\n static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address4 {\n const wildcard = new Address4(wildcardMask).bigInt();\n const allOnes = (BigInt(1) << BigInt(constants.BITS)) - BigInt(1);\n const mask = wildcard ^ allOnes;\n const bits = common.prefixLengthFromMask(mask, constants.BITS);\n return new Address4(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address4` from a wildcard pattern with trailing `*`\n * octets. The number of trailing wildcards determines the prefix\n * length: each `*` represents 8 bits.\n *\n * Only trailing whole-octet wildcards are supported. Partial-octet\n * wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g.\n * `192.*.0.1`) throw `AddressError`.\n * @example\n * Address4.fromWildcard('192.168.0.*').subnet; // '/24'\n * Address4.fromWildcard('192.168.*.*').subnet; // '/16'\n * Address4.fromWildcard('*.*.*.*').subnet; // '/0'\n */\n static fromWildcard(input: string): Address4 {\n const groups = input.split('.');\n\n if (groups.length !== constants.GROUPS) {\n throw new AddressError('Wildcard pattern must have 4 octets');\n }\n\n let firstWildcard = -1;\n\n for (let i = 0; i < groups.length; i++) {\n if (groups[i] === '*') {\n if (firstWildcard === -1) {\n firstWildcard = i;\n }\n } else if (firstWildcard !== -1) {\n throw new AddressError(\n 'Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)',\n );\n }\n }\n\n const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard;\n const replaced = groups.map((g) => (g === '*' ? '0' : g));\n const subnetBits = constants.BITS - trailing * 8;\n\n return new Address4(`${replaced.join('.')}/${subnetBits}`);\n }\n\n /**\n * Converts a hex string to an IPv4 address object. Accepts 8 hex digits\n * with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`).\n * Throws `AddressError` for any other length or for non-hex characters.\n * @param {string} hex - a hex string to convert\n * @returns {Address4}\n */\n static fromHex(hex: string): Address4 {\n const stripped = hex.replace(/:/g, '');\n\n if (!/^[0-9a-fA-F]{8}$/.test(stripped)) {\n throw new AddressError('IPv4 hex must be exactly 8 hex digits');\n }\n\n const groups = [];\n\n for (let i = 0; i < 8; i += 2) {\n groups.push(parseInt(stripped.slice(i, i + 2), 16));\n }\n\n return new Address4(groups.join('.'));\n }\n\n /**\n * Converts an integer into a IPv4 address object. The integer must be a\n * non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise\n * `AddressError` is thrown.\n * @param {integer} integer - a number to convert\n * @returns {Address4}\n */\n static fromInteger(integer: number): Address4 {\n if (!Number.isInteger(integer) || integer < 0 || integer > 0xffffffff) {\n throw new AddressError('IPv4 integer must be in the range 0 to 2**32 - 1');\n }\n\n return Address4.fromHex(integer.toString(16).padStart(8, '0'));\n }\n\n /**\n * Return an address from in-addr.arpa form: the four octets reversed, with\n * or without the `.in-addr.arpa` suffix and root dot, in any case. Throws\n * `AddressError` unless the reversed labels form a valid IPv4 address, so\n * `fromArpa(x.reverseForm())` round-trips {@link reverseForm}.\n * @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address\n * @returns {Adress4}\n * @example\n * var address = Address4.fromArpa('42.2.0.192.in-addr.arpa.')\n * address.correctForm(); // '192.0.2.42'\n */\n static fromArpa(arpaFormAddress: string): Address4 {\n // remove an ending \".in-addr.arpa\", in any case and with or without the\n // root dot, as Address6.fromArpa does for \".ip6.arpa\"\n const leader = arpaFormAddress.replace(/(\\.in-addr\\.arpa)?\\.?$/i, '');\n\n const address = leader.split('.').reverse().join('.');\n\n return new Address4(address);\n }\n\n /**\n * Converts an IPv4 address object to a hex string\n * @returns {String}\n */\n toHex(): string {\n return this.parsedAddress.map((part) => common.stringToPaddedHex(part)).join(':');\n }\n\n /**\n * Converts an IPv4 address object to an array of bytes.\n *\n * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`.\n * @returns {Array}\n */\n toArray(): number[] {\n return this.parsedAddress.map((part) => parseInt(part, 10));\n }\n\n /**\n * Converts an IPv4 address object to an IPv6 address group\n * @returns {String}\n */\n toGroup6(): string {\n const output = [];\n let i;\n\n for (i = 0; i < constants.GROUPS; i += 2) {\n output.push(\n `${common.stringToPaddedHex(this.parsedAddress[i])}${common.stringToPaddedHex(\n this.parsedAddress[i + 1],\n )}`,\n );\n }\n\n return output.join(':');\n }\n\n /**\n * Returns the address as a `bigint`\n * @returns {bigint}\n */\n bigInt(): bigint {\n return BigInt(`0x${this.parsedAddress.map((n) => common.stringToPaddedHex(n)).join('')}`);\n }\n\n /**\n * Helper function getting start address.\n * @returns {bigint}\n */\n _startAddress(): bigint {\n return BigInt(`0b${this.mask() + '0'.repeat(constants.BITS - this.subnetMask)}`);\n }\n\n /**\n * The first address in the range given by this address' subnet.\n * Often referred to as the Network Address.\n * @returns {Address4}\n */\n startAddress(): Address4 {\n return Address4.fromBigInt(this._startAddress());\n }\n\n /**\n * The first host address in the range given by this address's subnet ie\n * the first address after the Network Address\n * @returns {Address4}\n */\n startAddressExclusive(): Address4 {\n const adjust = BigInt('1');\n return Address4.fromBigInt(this._startAddress() + adjust);\n }\n\n /**\n * Returns the address `n` addresses after this one (or before, when `n` is\n * negative), keeping this address's subnet mask. Throws `AddressError` when\n * the result would fall outside the IPv4 address space or `n` is not an\n * integer.\n * @param {number | bigint} n\n * @returns {Address4}\n * @example\n * new Address4('10.0.0.0/24').offset(1).correctForm(); // '10.0.0.1'\n */\n offset(n: number | bigint): Address4 {\n return Address4.fromBigInt(\n common.offsetBigInt(this.bigInt(), n, constants.BITS, 'IPv4'),\n ).withSubnetMask(this.subnetMask);\n }\n\n /**\n * Returns the network that follows this address's network: the address after\n * {@link endAddress}, with the same subnet mask. Throws `AddressError` when\n * this network is the last one in the address space.\n * @returns {Address4}\n * @example\n * new Address4('10.0.0.0/24').nextNetwork().networkForm(); // '10.0.1.0/24'\n */\n nextNetwork(): Address4 {\n return Address4.fromBigInt(\n common.offsetBigInt(this._endAddress(), 1, constants.BITS, 'IPv4'),\n ).withSubnetMask(this.subnetMask);\n }\n\n private withSubnetMask(subnetMask: number): Address4 {\n return new Address4(`${this.correctForm()}/${subnetMask}`);\n }\n\n /**\n * Helper function getting end address.\n * @returns {bigint}\n */\n _endAddress(): bigint {\n return BigInt(`0b${this.mask() + '1'.repeat(constants.BITS - this.subnetMask)}`);\n }\n\n /**\n * The last address in the range given by this address' subnet\n * Often referred to as the Broadcast\n * @returns {Address4}\n */\n endAddress(): Address4 {\n return Address4.fromBigInt(this._endAddress());\n }\n\n /**\n * The last host address in the range given by this address's subnet ie\n * the last address prior to the Broadcast Address\n * @returns {Address4}\n */\n endAddressExclusive(): Address4 {\n const adjust = BigInt('1');\n return Address4.fromBigInt(this._endAddress() - adjust);\n }\n\n /**\n * The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for\n * a `/20`. Returns an `Address4`; call `.correctForm()` for the string.\n * @returns {Address4}\n */\n subnetMaskAddress(): Address4 {\n return Address4.fromBigInt(\n BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is\n * the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`;\n * call `.correctForm()` for the string.\n * @returns {Address4}\n */\n wildcardMask(): Address4 {\n return Address4.fromBigInt(\n BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The network address in CIDR string form, e.g. `192.168.1.0/24` for\n * `192.168.1.5/24`. For an address with no explicit subnet the prefix is\n * `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`.\n * @returns {string}\n */\n networkForm(): string {\n return `${this.startAddress().correctForm()}/${this.subnetMask}`;\n }\n\n /**\n * Converts a BigInt to a v4 address object. The value must be in the\n * range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown.\n * @param {bigint} bigInt - a BigInt to convert\n * @returns {Address4}\n */\n static fromBigInt(bigInt: bigint): Address4 {\n if (bigInt < BigInt(0) || bigInt > BigInt(0xffffffff)) {\n throw new AddressError('IPv4 BigInt must be in the range 0 to 2**32 - 1');\n }\n\n return Address4.fromHex(bigInt.toString(16).padStart(8, '0'));\n }\n\n /**\n * Convert a byte array to an Address4 object. Throws `AddressError` unless\n * given exactly 4 integers from 0 to 255. Signed bytes are rejected, so\n * this differs from `Address6.fromByteArray`, which folds them; the two\n * contracts converge on this stricter form in the next major version.\n *\n * To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`.\n * @param {Array<number>} bytes - an array of 4 bytes (0-255)\n * @returns {Address4}\n */\n static fromByteArray(bytes: Array<number>): Address4 {\n common.assertByteArray(bytes, 4, 'IPv4', 0);\n\n return this.fromUnsignedByteArray(bytes);\n }\n\n /**\n * Convert an unsigned byte array to an Address4 object. Throws\n * `AddressError` unless given exactly 4 bytes, and rejects values outside\n * 0 to 255 when parsing the resulting address.\n *\n * To convert from a Node.js `Buffer`, spread it:\n * `Address4.fromUnsignedByteArray([...buf])`.\n * @param {Array<number>} bytes - an array of 4 unsigned bytes (0-255)\n * @returns {Address4}\n */\n static fromUnsignedByteArray(bytes: Array<number>): Address4 {\n if (bytes.length !== 4) {\n throw new AddressError('IPv4 addresses require exactly 4 bytes');\n }\n\n const address = bytes.join('.');\n return new Address4(address);\n }\n\n /**\n * Returns the first n bits of the address, defaulting to the\n * subnet mask\n * @returns {String}\n */\n mask(mask?: number): string {\n if (mask === undefined) {\n mask = this.subnetMask;\n }\n\n return this.getBitsBase2(0, mask);\n }\n\n /**\n * Returns the bits in the given range as a base-2 string\n * @returns {string}\n */\n getBitsBase2(start: number, end: number): string {\n return this.binaryZeroPad().slice(start, end);\n }\n\n /**\n * Return the reversed in-addr.arpa form of the address, e.g.\n * `42.2.0.192.in-addr.arpa.` for `192.0.2.42`.\n * @param {Object} options\n * @param {boolean} options.omitSuffix - omit the \"in-addr.arpa\" suffix\n * @returns {String}\n */\n reverseForm(options?: common.ReverseFormOptions): string {\n if (!options) {\n options = {};\n }\n\n const reversed = this.correctForm().split('.').reverse().join('.');\n\n if (options.omitSuffix) {\n return reversed;\n }\n\n return `${reversed}.in-addr.arpa.`;\n }\n\n /**\n * Returns true if the given address is in the subnet of the current address.\n * An `Address6` is never in the subnet of an `Address4`; convert with\n * `to4()` or `Address6.fromAddress4()` to compare across families.\n * @returns {boolean}\n */\n isInSubnet = common.isInSubnet;\n\n /**\n * Returns true if this address's host bits fall inside the given subnet,\n * ignoring this address's own subnet mask. Prefer this over `isInSubnet`\n * when classifying a single address, so the answer doesn't change with the\n * CIDR suffix the caller happened to write — notably when the address came\n * from untrusted input and the result backs a trust-boundary decision.\n * An `Address6` is never in the subnet of an `Address4`; convert with\n * `to4()` or `Address6.fromAddress4()` to compare across families.\n * @returns {boolean}\n */\n isHostInSubnet = common.isHostInSubnet;\n\n /**\n * Returns true if the given address is a multicast address\n * @returns {boolean}\n */\n isMulticast(): boolean {\n return this.isHostInSubnet(MULTICAST_V4);\n }\n\n /**\n * Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`).\n * @returns {boolean}\n */\n isPrivate(): boolean {\n return PRIVATE_V4.some((subnet) => this.isHostInSubnet(subnet));\n }\n\n /**\n * Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)).\n * @returns {boolean}\n */\n isLoopback(): boolean {\n return this.isHostInSubnet(LOOPBACK_V4);\n }\n\n /**\n * Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)).\n * @returns {boolean}\n */\n isLinkLocal(): boolean {\n return this.isHostInSubnet(LINK_LOCAL_V4);\n }\n\n /**\n * Returns true if the address is the unspecified address `0.0.0.0`.\n * @returns {boolean}\n */\n isUnspecified(): boolean {\n return this.isHostInSubnet(UNSPECIFIED_V4);\n }\n\n /**\n * Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)).\n * @returns {boolean}\n */\n isBroadcast(): boolean {\n return this.isHostInSubnet(BROADCAST_V4);\n }\n\n /**\n * Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)).\n * @returns {boolean}\n */\n isCGNAT(): boolean {\n return this.isHostInSubnet(CGNAT_V4);\n }\n\n /**\n * Returns true if the address is in one of the documentation ranges\n * `192.0.2.0/24`, `198.51.100.0/24`, or `203.0.113.0/24` ([RFC 5737](https://datatracker.ietf.org/doc/html/rfc5737)).\n * @returns {boolean}\n */\n isDocumentation(): boolean {\n return DOCUMENTATION_V4.some((subnet) => this.isHostInSubnet(subnet));\n }\n\n /**\n * Returns true if the address is in the benchmarking range `198.18.0.0/15` ([RFC 2544](https://datatracker.ietf.org/doc/html/rfc2544)).\n * @returns {boolean}\n */\n isBenchmarking(): boolean {\n return this.isHostInSubnet(BENCHMARKING_V4);\n }\n\n /**\n * Returns true if the address is in the reserved range `240.0.0.0/4` ([RFC 1112](https://datatracker.ietf.org/doc/html/rfc1112)),\n * which includes the limited broadcast address.\n * @returns {boolean}\n */\n isReserved(): boolean {\n return this.isHostInSubnet(RESERVED_V4);\n }\n\n /**\n * Returns true if the address is globally reachable: not multicast, and not\n * in any block the [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/)\n * marks as not globally reachable. That covers everything the individual\n * classifiers name (private, loopback, link-local, CGNAT, unspecified,\n * broadcast, documentation, benchmarking, reserved) and the blocks they do\n * not, such as `0.0.0.0/8` and the IETF protocol assignments in\n * `192.0.0.0/24`. This is the single predicate to use where a request must\n * not reach an internal or special-purpose destination; see SECURITY.md.\n * @returns {boolean}\n */\n isGlobal(): boolean {\n return !this.isMulticast() && common.isGloballyReachable.call(this, SPECIAL_PURPOSE_V4);\n }\n\n /**\n * Returns a zero-padded base-2 string representation of the address\n * @returns {string}\n */\n binaryZeroPad(): string {\n if (this._binaryZeroPad === undefined) {\n this._binaryZeroPad = this.bigInt().toString(2).padStart(constants.BITS, '0');\n }\n return this._binaryZeroPad;\n }\n\n /**\n * Groups an IPv4 address for inclusion at the end of an IPv6 address.\n *\n * Returns an HTML fragment: each half of the address is wrapped in a\n * `<span>` carrying the group classes an address-inspector UI hovers on.\n * The address content is HTML-escaped; anything you concatenate around it\n * is your responsibility.\n * @returns {String}\n */\n groupForV6(): string {\n const segments = this.parsedAddress;\n\n return this.correctForm().replace(\n constants.RE_ADDRESS,\n `<span class=\"hover-group group-v4 group-6\">${segments\n .slice(0, 2)\n .join('.')}</span>.<span class=\"hover-group group-v4 group-7\">${segments\n .slice(2, 4)\n .join('.')}</span>`,\n );\n }\n}\n\nconst MULTICAST_V4 = new Address4('224.0.0.0/4');\nconst PRIVATE_V4 = [\n new Address4('10.0.0.0/8'),\n new Address4('172.16.0.0/12'),\n new Address4('192.168.0.0/16'),\n];\nconst LOOPBACK_V4 = new Address4('127.0.0.0/8');\nconst LINK_LOCAL_V4 = new Address4('169.254.0.0/16');\nconst UNSPECIFIED_V4 = new Address4('0.0.0.0/32');\nconst BROADCAST_V4 = new Address4('255.255.255.255/32');\nconst CGNAT_V4 = new Address4('100.64.0.0/10');\nconst DOCUMENTATION_V4 = [\n new Address4('192.0.2.0/24'),\n new Address4('198.51.100.0/24'),\n new Address4('203.0.113.0/24'),\n];\nconst BENCHMARKING_V4 = new Address4('198.18.0.0/15');\nconst RESERVED_V4 = new Address4('240.0.0.0/4');\nconst SPECIAL_PURPOSE_V4 = constants.SPECIAL_PURPOSE.map(([cidr, , reachable]) => ({\n subnet: new Address4(cidr),\n reachable,\n}));\n"]}
1
+ {"version":3,"file":"ipv4.js","sourceRoot":"","sources":["../src/ipv4.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,iDAAmC;AACnC,0DAA4C;AAC5C,mDAA+C;AAE/C,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAa,QAAQ;IAWnB,YA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,CAAC;AAChD,MAAM,kBAAkB,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,AAAD,EAAG,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IACjF,MAAM,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC;IAC1B,SAAS;CACV,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n\nimport * as common from './common';\nimport * as constants from './v4/constants';\nimport { AddressError } from './address-error';\n\nconst isCorrect4 = common.isCorrect(constants.BITS);\n\n/**\n * Represents an IPv4 address\n * @param {string} address - An IPv4 address string\n */\nexport class Address4 {\n address: string;\n addressMinusSuffix: string = '';\n groups: number = constants.GROUPS;\n parsedAddress: string[] = [];\n parsedSubnet: string = '';\n subnet: string = '/32';\n subnetMask: number = 32;\n v4: boolean = true;\n private _binaryZeroPad?: string;\n\n constructor(address: string) {\n this.address = address;\n\n const subnet = constants.RE_SUBNET_STRING.exec(address);\n\n if (subnet) {\n this.parsedSubnet = subnet[0].replace('/', '');\n this.subnetMask = parseInt(this.parsedSubnet, 10);\n this.subnet = `/${this.subnetMask}`;\n\n if (this.subnetMask < 0 || this.subnetMask > constants.BITS) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n address = address.replace(constants.RE_SUBNET_STRING, '');\n }\n\n // Four three-digit octets and three dots: the longest well-formed address\n // is 15 characters. Longer input is rejected before parsing, as Address6\n // does at its own limit.\n const longest = constants.GROUPS * 4 - 1;\n\n if (address.length > longest) {\n throw new AddressError(`IPv4 addresses are at most ${longest} characters.`);\n }\n\n this.addressMinusSuffix = address;\n\n this.parsedAddress = this.parse(address);\n }\n\n /**\n * Returns true if the given string is a valid IPv4 address (with optional\n * CIDR subnet), false otherwise. Host bits in the subnet portion are\n * allowed (e.g. `192.168.1.5/24` is valid); for strict network-address\n * validation compare `correctForm()` to `startAddress().correctForm()`,\n * or use `networkForm()`.\n */\n static isValid(address: string): boolean {\n try {\n // eslint-disable-next-line no-new\n new Address4(address);\n\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Parses an IPv4 address string into its four octet groups and stores the\n * result on `this.parsedAddress`. Called automatically by the constructor;\n * you typically don't need to call it directly. Throws `AddressError` if\n * the input is not a valid IPv4 address.\n */\n parse(address: string) {\n const groups = address.split('.');\n\n // Checked before the general match so the error names the actual problem.\n // Address6 rejects the same notation on its v4-in-v6 path.\n if (groups.some((group) => /^0\\d/.test(group))) {\n throw new AddressError(\"IPv4 addresses can't have leading zeroes.\");\n }\n\n if (!address.match(constants.RE_ADDRESS)) {\n throw new AddressError('Invalid IPv4 address.');\n }\n\n return groups;\n }\n\n /**\n * Returns the address in correct form: octets joined with `.` and any\n * leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the\n * canonical dotted-decimal representation.\n */\n correctForm(): string {\n return this.parsedAddress.map((part) => parseInt(part, 10)).join('.');\n }\n\n /**\n * Returns true if the address is correct, false otherwise\n * @returns {Boolean}\n */\n isCorrect = isCorrect4;\n\n /**\n * Construct an `Address4` from an address and a dotted-decimal subnet\n * mask given as separate strings (e.g. as returned by Node's\n * `os.networkInterfaces()`). Throws `AddressError` if the mask is\n * non-contiguous (e.g. `255.0.255.0`).\n * @example\n * var address = Address4.fromAddressAndMask('192.168.1.1', '255.255.255.0');\n * address.subnetMask; // 24\n */\n static fromAddressAndMask(address: string, mask: string): Address4 {\n const bits = common.prefixLengthFromMask(new Address4(mask).bigInt(), constants.BITS);\n return new Address4(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address4` from an address and a Cisco-style wildcard mask\n * given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard\n * mask is the bitwise inverse of the subnet mask. Throws `AddressError`\n * if the mask is non-contiguous (e.g. `0.255.0.255`).\n * @example\n * var address = Address4.fromAddressAndWildcardMask('10.0.0.1', '0.0.0.255');\n * address.subnetMask; // 24\n */\n static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address4 {\n const wildcard = new Address4(wildcardMask).bigInt();\n const allOnes = (BigInt(1) << BigInt(constants.BITS)) - BigInt(1);\n const mask = wildcard ^ allOnes;\n const bits = common.prefixLengthFromMask(mask, constants.BITS);\n return new Address4(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address4` from a wildcard pattern with trailing `*`\n * octets. The number of trailing wildcards determines the prefix\n * length: each `*` represents 8 bits.\n *\n * Only trailing whole-octet wildcards are supported. Partial-octet\n * wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g.\n * `192.*.0.1`) throw `AddressError`.\n * @example\n * Address4.fromWildcard('192.168.0.*').subnet; // '/24'\n * Address4.fromWildcard('192.168.*.*').subnet; // '/16'\n * Address4.fromWildcard('*.*.*.*').subnet; // '/0'\n */\n static fromWildcard(input: string): Address4 {\n const groups = input.split('.');\n\n if (groups.length !== constants.GROUPS) {\n throw new AddressError('Wildcard pattern must have 4 octets');\n }\n\n let firstWildcard = -1;\n\n for (let i = 0; i < groups.length; i++) {\n if (groups[i] === '*') {\n if (firstWildcard === -1) {\n firstWildcard = i;\n }\n } else if (firstWildcard !== -1) {\n throw new AddressError(\n 'Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)',\n );\n }\n }\n\n const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard;\n const replaced = groups.map((g) => (g === '*' ? '0' : g));\n const subnetBits = constants.BITS - trailing * 8;\n\n return new Address4(`${replaced.join('.')}/${subnetBits}`);\n }\n\n /**\n * Converts a hex string to an IPv4 address object. Accepts 8 hex digits\n * with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`).\n * Throws `AddressError` for any other length or for non-hex characters.\n * @param {string} hex - a hex string to convert\n * @returns {Address4}\n */\n static fromHex(hex: string): Address4 {\n const stripped = hex.replace(/:/g, '');\n\n if (!/^[0-9a-fA-F]{8}$/.test(stripped)) {\n throw new AddressError('IPv4 hex must be exactly 8 hex digits');\n }\n\n const groups = [];\n\n for (let i = 0; i < 8; i += 2) {\n groups.push(parseInt(stripped.slice(i, i + 2), 16));\n }\n\n return new Address4(groups.join('.'));\n }\n\n /**\n * Converts an integer into a IPv4 address object. The integer must be a\n * non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise\n * `AddressError` is thrown.\n * @param {integer} integer - a number to convert\n * @returns {Address4}\n */\n static fromInteger(integer: number): Address4 {\n if (!Number.isInteger(integer) || integer < 0 || integer > 0xffffffff) {\n throw new AddressError('IPv4 integer must be in the range 0 to 2**32 - 1');\n }\n\n return Address4.fromHex(integer.toString(16).padStart(8, '0'));\n }\n\n /**\n * Return an address from in-addr.arpa form: the four octets reversed, with\n * or without the `.in-addr.arpa` suffix and root dot, in any case. Throws\n * `AddressError` unless the reversed labels form a valid IPv4 address, so\n * `fromArpa(x.reverseForm())` round-trips {@link reverseForm}.\n * @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address\n * @returns {Adress4}\n * @example\n * var address = Address4.fromArpa('42.2.0.192.in-addr.arpa.')\n * address.correctForm(); // '192.0.2.42'\n */\n static fromArpa(arpaFormAddress: string): Address4 {\n // A 15-character address, a \"/32\" prefix length and \".in-addr.arpa.\": the\n // longest name is 32 characters. Longer input is rejected before its\n // labels are split, as the constructor does at its own limit.\n const longest = constants.GROUPS * 4 - 1 + '/32'.length + '.in-addr.arpa.'.length;\n\n if (arpaFormAddress.length > longest) {\n throw new AddressError(`in-addr.arpa names are at most ${longest} characters.`);\n }\n\n // remove an ending \".in-addr.arpa\", in any case and with or without the\n // root dot, as Address6.fromArpa does for \".ip6.arpa\"\n const leader = arpaFormAddress.replace(/(\\.in-addr\\.arpa)?\\.?$/i, '');\n\n const address = leader.split('.').reverse().join('.');\n\n return new Address4(address);\n }\n\n /**\n * Converts an IPv4 address object to a hex string\n * @returns {String}\n */\n toHex(): string {\n return this.parsedAddress.map((part) => common.stringToPaddedHex(part)).join(':');\n }\n\n /**\n * Converts an IPv4 address object to an array of bytes.\n *\n * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`.\n * @returns {Array}\n */\n toArray(): number[] {\n return this.parsedAddress.map((part) => parseInt(part, 10));\n }\n\n /**\n * Converts an IPv4 address object to an IPv6 address group\n * @returns {String}\n */\n toGroup6(): string {\n const output = [];\n let i;\n\n for (i = 0; i < constants.GROUPS; i += 2) {\n output.push(\n `${common.stringToPaddedHex(this.parsedAddress[i])}${common.stringToPaddedHex(\n this.parsedAddress[i + 1],\n )}`,\n );\n }\n\n return output.join(':');\n }\n\n /**\n * Returns the address as a `bigint`\n * @returns {bigint}\n */\n bigInt(): bigint {\n return BigInt(`0x${this.parsedAddress.map((n) => common.stringToPaddedHex(n)).join('')}`);\n }\n\n /**\n * Helper function getting start address.\n * @returns {bigint}\n */\n _startAddress(): bigint {\n return BigInt(`0b${this.mask() + '0'.repeat(constants.BITS - this.subnetMask)}`);\n }\n\n /**\n * The first address in the range given by this address' subnet.\n * Often referred to as the Network Address.\n * @returns {Address4}\n */\n startAddress(): Address4 {\n return Address4.fromBigInt(this._startAddress());\n }\n\n /**\n * The first host address in the range given by this address's subnet ie\n * the first address after the Network Address\n * @returns {Address4}\n */\n startAddressExclusive(): Address4 {\n const adjust = BigInt('1');\n return Address4.fromBigInt(this._startAddress() + adjust);\n }\n\n /**\n * Returns the address `n` addresses after this one (or before, when `n` is\n * negative), keeping this address's subnet mask. Throws `AddressError` when\n * the result would fall outside the IPv4 address space or `n` is not an\n * integer.\n * @param {number | bigint} n\n * @returns {Address4}\n * @example\n * new Address4('10.0.0.0/24').offset(1).correctForm(); // '10.0.0.1'\n */\n offset(n: number | bigint): Address4 {\n return Address4.fromBigInt(\n common.offsetBigInt(this.bigInt(), n, constants.BITS, 'IPv4'),\n ).withSubnetMask(this.subnetMask);\n }\n\n /**\n * Returns the network that follows this address's network: the address after\n * {@link endAddress}, with the same subnet mask. Throws `AddressError` when\n * this network is the last one in the address space.\n * @returns {Address4}\n * @example\n * new Address4('10.0.0.0/24').nextNetwork().networkForm(); // '10.0.1.0/24'\n */\n nextNetwork(): Address4 {\n return Address4.fromBigInt(\n common.offsetBigInt(this._endAddress(), 1, constants.BITS, 'IPv4'),\n ).withSubnetMask(this.subnetMask);\n }\n\n private withSubnetMask(subnetMask: number): Address4 {\n return new Address4(`${this.correctForm()}/${subnetMask}`);\n }\n\n /**\n * Helper function getting end address.\n * @returns {bigint}\n */\n _endAddress(): bigint {\n return BigInt(`0b${this.mask() + '1'.repeat(constants.BITS - this.subnetMask)}`);\n }\n\n /**\n * The last address in the range given by this address' subnet\n * Often referred to as the Broadcast\n * @returns {Address4}\n */\n endAddress(): Address4 {\n return Address4.fromBigInt(this._endAddress());\n }\n\n /**\n * The last host address in the range given by this address's subnet ie\n * the last address prior to the Broadcast Address\n * @returns {Address4}\n */\n endAddressExclusive(): Address4 {\n const adjust = BigInt('1');\n return Address4.fromBigInt(this._endAddress() - adjust);\n }\n\n /**\n * The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for\n * a `/20`. Returns an `Address4`; call `.correctForm()` for the string.\n * @returns {Address4}\n */\n subnetMaskAddress(): Address4 {\n return Address4.fromBigInt(\n BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is\n * the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`;\n * call `.correctForm()` for the string.\n * @returns {Address4}\n */\n wildcardMask(): Address4 {\n return Address4.fromBigInt(\n BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The network address in CIDR string form, e.g. `192.168.1.0/24` for\n * `192.168.1.5/24`. For an address with no explicit subnet the prefix is\n * `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`.\n * @returns {string}\n */\n networkForm(): string {\n return `${this.startAddress().correctForm()}/${this.subnetMask}`;\n }\n\n /**\n * Converts a BigInt to a v4 address object. The value must be in the\n * range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown.\n * @param {bigint} bigInt - a BigInt to convert\n * @returns {Address4}\n */\n static fromBigInt(bigInt: bigint): Address4 {\n if (bigInt < BigInt(0) || bigInt > BigInt(0xffffffff)) {\n throw new AddressError('IPv4 BigInt must be in the range 0 to 2**32 - 1');\n }\n\n return Address4.fromHex(bigInt.toString(16).padStart(8, '0'));\n }\n\n /**\n * Convert a byte array to an Address4 object. Throws `AddressError` unless\n * given exactly 4 integers from 0 to 255. Signed bytes are rejected, so\n * this differs from `Address6.fromByteArray`, which folds them; the two\n * contracts converge on this stricter form in the next major version.\n *\n * To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`.\n * @param {Array<number>} bytes - an array of 4 bytes (0-255)\n * @returns {Address4}\n */\n static fromByteArray(bytes: Array<number>): Address4 {\n common.assertByteArray(bytes, 4, 'IPv4', 0);\n\n return this.fromUnsignedByteArray(bytes);\n }\n\n /**\n * Convert an unsigned byte array to an Address4 object. Throws\n * `AddressError` unless given exactly 4 bytes, and rejects values outside\n * 0 to 255 when parsing the resulting address.\n *\n * To convert from a Node.js `Buffer`, spread it:\n * `Address4.fromUnsignedByteArray([...buf])`.\n * @param {Array<number>} bytes - an array of 4 unsigned bytes (0-255)\n * @returns {Address4}\n */\n static fromUnsignedByteArray(bytes: Array<number>): Address4 {\n if (bytes.length !== 4) {\n throw new AddressError('IPv4 addresses require exactly 4 bytes');\n }\n\n const address = bytes.join('.');\n return new Address4(address);\n }\n\n /**\n * Returns the first n bits of the address, defaulting to the\n * subnet mask\n * @returns {String}\n */\n mask(mask?: number): string {\n if (mask === undefined) {\n mask = this.subnetMask;\n }\n\n return this.getBitsBase2(0, mask);\n }\n\n /**\n * Returns the bits in the given range as a base-2 string\n * @returns {string}\n */\n getBitsBase2(start: number, end: number): string {\n return this.binaryZeroPad().slice(start, end);\n }\n\n /**\n * Return the reversed in-addr.arpa form of the address, e.g.\n * `42.2.0.192.in-addr.arpa.` for `192.0.2.42`.\n * @param {Object} options\n * @param {boolean} options.omitSuffix - omit the \"in-addr.arpa\" suffix\n * @returns {String}\n */\n reverseForm(options?: common.ReverseFormOptions): string {\n if (!options) {\n options = {};\n }\n\n const reversed = this.correctForm().split('.').reverse().join('.');\n\n if (options.omitSuffix) {\n return reversed;\n }\n\n return `${reversed}.in-addr.arpa.`;\n }\n\n /**\n * Returns true if the given address is in the subnet of the current address.\n * An `Address6` is never in the subnet of an `Address4`; convert with\n * `to4()` or `Address6.fromAddress4()` to compare across families.\n * @returns {boolean}\n */\n isInSubnet = common.isInSubnet;\n\n /**\n * Returns true if this address's host bits fall inside the given subnet,\n * ignoring this address's own subnet mask. Prefer this over `isInSubnet`\n * when classifying a single address, so the answer doesn't change with the\n * CIDR suffix the caller happened to write — notably when the address came\n * from untrusted input and the result backs a trust-boundary decision.\n * An `Address6` is never in the subnet of an `Address4`; convert with\n * `to4()` or `Address6.fromAddress4()` to compare across families.\n * @returns {boolean}\n */\n isHostInSubnet = common.isHostInSubnet;\n\n /**\n * Returns true if the given address is a multicast address\n * @returns {boolean}\n */\n isMulticast(): boolean {\n return this.isHostInSubnet(MULTICAST_V4);\n }\n\n /**\n * Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`).\n * @returns {boolean}\n */\n isPrivate(): boolean {\n return PRIVATE_V4.some((subnet) => this.isHostInSubnet(subnet));\n }\n\n /**\n * Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)).\n * @returns {boolean}\n */\n isLoopback(): boolean {\n return this.isHostInSubnet(LOOPBACK_V4);\n }\n\n /**\n * Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)).\n * @returns {boolean}\n */\n isLinkLocal(): boolean {\n return this.isHostInSubnet(LINK_LOCAL_V4);\n }\n\n /**\n * Returns true if the address is the unspecified address `0.0.0.0`.\n * @returns {boolean}\n */\n isUnspecified(): boolean {\n return this.isHostInSubnet(UNSPECIFIED_V4);\n }\n\n /**\n * Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)).\n * @returns {boolean}\n */\n isBroadcast(): boolean {\n return this.isHostInSubnet(BROADCAST_V4);\n }\n\n /**\n * Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)).\n * @returns {boolean}\n */\n isCGNAT(): boolean {\n return this.isHostInSubnet(CGNAT_V4);\n }\n\n /**\n * Returns true if the address is in one of the documentation ranges\n * `192.0.2.0/24`, `198.51.100.0/24`, or `203.0.113.0/24` ([RFC 5737](https://datatracker.ietf.org/doc/html/rfc5737)).\n * @returns {boolean}\n */\n isDocumentation(): boolean {\n return DOCUMENTATION_V4.some((subnet) => this.isHostInSubnet(subnet));\n }\n\n /**\n * Returns true if the address is in the benchmarking range `198.18.0.0/15` ([RFC 2544](https://datatracker.ietf.org/doc/html/rfc2544)).\n * @returns {boolean}\n */\n isBenchmarking(): boolean {\n return this.isHostInSubnet(BENCHMARKING_V4);\n }\n\n /**\n * Returns true if the address is in the reserved range `240.0.0.0/4` ([RFC 1112](https://datatracker.ietf.org/doc/html/rfc1112)),\n * which includes the limited broadcast address.\n * @returns {boolean}\n */\n isReserved(): boolean {\n return this.isHostInSubnet(RESERVED_V4);\n }\n\n /**\n * Returns true if the address is globally reachable: not multicast, and not\n * in any block the [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/)\n * marks as not globally reachable. That covers everything the individual\n * classifiers name (private, loopback, link-local, CGNAT, unspecified,\n * broadcast, documentation, benchmarking, reserved) and the blocks they do\n * not, such as `0.0.0.0/8` and the IETF protocol assignments in\n * `192.0.0.0/24`. This is the single predicate to use where a request must\n * not reach an internal or special-purpose destination; see SECURITY.md.\n * @returns {boolean}\n */\n isGlobal(): boolean {\n return !this.isMulticast() && common.isGloballyReachable.call(this, SPECIAL_PURPOSE_V4);\n }\n\n /**\n * Returns a zero-padded base-2 string representation of the address\n * @returns {string}\n */\n binaryZeroPad(): string {\n if (this._binaryZeroPad === undefined) {\n this._binaryZeroPad = this.bigInt().toString(2).padStart(constants.BITS, '0');\n }\n return this._binaryZeroPad;\n }\n\n /**\n * Groups an IPv4 address for inclusion at the end of an IPv6 address.\n *\n * Returns an HTML fragment: each half of the address is wrapped in a\n * `<span>` carrying the group classes an address-inspector UI hovers on.\n * The address content is HTML-escaped; anything you concatenate around it\n * is your responsibility.\n * @returns {String}\n */\n groupForV6(): string {\n const segments = this.parsedAddress;\n\n return this.correctForm().replace(\n constants.RE_ADDRESS,\n `<span class=\"hover-group group-v4 group-6\">${segments\n .slice(0, 2)\n .join('.')}</span>.<span class=\"hover-group group-v4 group-7\">${segments\n .slice(2, 4)\n .join('.')}</span>`,\n );\n }\n}\n\nconst MULTICAST_V4 = new Address4('224.0.0.0/4');\nconst PRIVATE_V4 = [\n new Address4('10.0.0.0/8'),\n new Address4('172.16.0.0/12'),\n new Address4('192.168.0.0/16'),\n];\nconst LOOPBACK_V4 = new Address4('127.0.0.0/8');\nconst LINK_LOCAL_V4 = new Address4('169.254.0.0/16');\nconst UNSPECIFIED_V4 = new Address4('0.0.0.0/32');\nconst BROADCAST_V4 = new Address4('255.255.255.255/32');\nconst CGNAT_V4 = new Address4('100.64.0.0/10');\nconst DOCUMENTATION_V4 = [\n new Address4('192.0.2.0/24'),\n new Address4('198.51.100.0/24'),\n new Address4('203.0.113.0/24'),\n];\nconst BENCHMARKING_V4 = new Address4('198.18.0.0/15');\nconst RESERVED_V4 = new Address4('240.0.0.0/4');\nconst SPECIAL_PURPOSE_V4 = constants.SPECIAL_PURPOSE.map(([cidr, , reachable]) => ({\n subnet: new Address4(cidr),\n reachable,\n}));\n"]}
@@ -16,7 +16,7 @@
16
16
  "bigint",
17
17
  "browser"
18
18
  ],
19
- "version": "10.7.2",
19
+ "version": "10.7.3",
20
20
  "author": "Beau Gunderson <beau@beaugunderson.com> (https://beaugunderson.com/)",
21
21
  "license": "MIT",
22
22
  "main": "dist/ip-address.js",