import{a as e,n as t}from"./lit-xS7RrYW6.js";import{r as n}from"./string-coerce-CuNcS1Hz.js";import{B as r,Q as i,V as a,W as o}from"./index-Bt8RaTD0.js";function s(...e){let t=new Set;for(let n of e){if(!n)continue;if(Array.isArray(n)){for(let e of n){let n=e.trim();n&&t.add(n)}continue}let e=n.trim();e&&t.add(e)}return[...t].toSorted()}function c(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function l(e){return{roles:s(e.roles,e.role),scopes:i(e.scopes)}}function u(e){let t=s(e.roles,e.role),n=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:n===void 0?t:s(n.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>t.includes(e)),scopes:i(e.scopes)}}function d(e,t){let n=l(e),r=t?u(t):null;return r?c(r.roles,n.roles)?c(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function f(e){let t=(e==null?void 0:e.agents)??{},r=Array.isArray(t.list)?t.list:[],i=[];return r.forEach((e,t)=>{if(!e||typeof e!=`object`)return;let r=e,a=n(r.id)??``;if(!a)return;let o=n(r.name),s=r.default===!0;i.push({id:a,name:o,isDefault:s,index:t,record:r})}),i}function p(e,t){let r=new Set(t),i=[];for(let t of e){if(!(Array.isArray(t.commands)?t.commands:[]).some(e=>r.has(String(e))))continue;let e=n(t.nodeId)??``;if(!e)continue;let a=n(t.displayName)??e;i.push({id:e,label:a===e?e:`${a} · ${e}`})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i}var m=`__defaults__`,h=[{value:`deny`,label:`Deny`},{value:`allowlist`,label:`Allowlist`},{value:`full`,label:`Full`}],g=[{value:`off`,label:`Off`},{value:`on-miss`,label:`On miss`},{value:`always`,label:`Always`}];function _(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function v(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function y(e){let t=(e==null?void 0:e.defaults)??{};return{security:_(t.security),ask:v(t.ask),askFallback:_(t.askFallback??`deny`),autoAllowSkills:t.autoAllowSkills??!1}}function b(e){return f(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function x(e,t){let n=b(e),r=Object.keys((t==null?void 0:t.agents)??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{var n,r;if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let i=(n=e.name)!=null&&n.trim()?e.name:e.id,a=(r=t.name)!=null&&r.trim()?t.name:t.id;return i.localeCompare(a)}),a}function S(e,t){return e===m?m:e&&t.some(t=>t.id===e)?e:m}function C(e){var t;let n=e.execApprovalsForm??((t=e.execApprovalsSnapshot)==null?void 0:t.file)??null,r=!!n,i=y(n),a=x(e.configForm,n),o=A(e.nodes),s=e.execApprovalsTarget,c=s===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;s===`node`&&c&&!o.some(e=>e.id===c)&&(c=null);let l=S(e.execApprovalsSelectedAgent,a),u=l===m?null:((n==null?void 0:n.agents)??{})[l]??null,d=Array.isArray(u==null?void 0:u.allowlist)?u.allowlist??[]:[];return{ready:r,disabled:e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:n,defaults:i,selectedScope:l,selectedAgent:u,agents:a,allowlist:d,target:s,targetNodeId:c,targetNodes:o,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals}}function w(n){let r=n.ready,i=n.target!==`node`||!!n.targetNodeId;return e`
    <section class="card">
      <div class="row" style="justify-content: space-between; align-items: center;">
        <div>
          <div class="card-title">Exec approvals</div>
          <div class="card-sub">
            Allowlist and approval policy for <span class="mono">exec host=gateway/node</span>.
          </div>
        </div>
        <button
          class="btn"
          ?disabled=${n.disabled||!n.dirty||!i}
          @click=${n.onSave}
        >
          ${n.saving?`Saving…`:`Save`}
        </button>
      </div>

      ${T(n)}
      ${r?e`
            ${E(n)} ${D(n)}
            ${n.selectedScope===m?t:O(n)}
          `:e`<div class="row" style="margin-top: 12px; gap: 12px;">
            <div class="muted">Load exec approvals to edit allowlists.</div>
            <button class="btn" ?disabled=${n.loading||!i} @click=${n.onLoad}>
              ${n.loading?`加载中…`:`加载审批`}
            </button>
          </div>`}
    </section>
  `}function T(n){let r=n.targetNodes.length>0,i=n.targetNodeId??``;return e`
    <div class="list" style="margin-top: 12px;">
      <div class="list-item">
        <div class="list-main">
          <div class="list-title">Target</div>
          <div class="list-sub">Gateway edits local approvals; node edits the selected node.</div>
        </div>
        <div class="list-meta">
          <label class="field">
            <span>Host</span>
            <select
              ?disabled=${n.disabled}
              @change=${e=>{if(e.target.value===`node`){var t;let e=((t=n.targetNodes[0])==null?void 0:t.id)??null;n.onSelectTarget(`node`,i||e)}else n.onSelectTarget(`gateway`,null)}}
            >
              <option value="gateway" ?selected=${n.target===`gateway`}>Gateway</option>
              <option value="node" ?selected=${n.target===`node`}>Node</option>
            </select>
          </label>
          ${n.target===`node`?e`
                <label class="field">
                  <span>Node</span>
                  <select
                    ?disabled=${n.disabled||!r}
                    @change=${e=>{let t=e.target.value.trim();n.onSelectTarget(`node`,t||null)}}
                  >
                    <option value="" ?selected=${i===``}>Select node</option>
                    ${n.targetNodes.map(t=>e`<option value=${t.id} ?selected=${i===t.id}>
                          ${t.label}
                        </option>`)}
                  </select>
                </label>
              `:t}
        </div>
      </div>
      ${n.target===`node`&&!r?e` <div class="muted">No nodes advertise exec approvals yet.</div> `:t}
    </div>
  `}function E(t){return e`
    <div class="row" style="margin-top: 12px; gap: 8px; flex-wrap: wrap;">
      <span class="label">Scope</span>
      <div class="row" style="gap: 8px; flex-wrap: wrap;">
        <button
          class="btn btn--sm ${t.selectedScope===m?`active`:``}"
          @click=${()=>t.onSelectScope(m)}
        >
          Defaults
        </button>
        ${t.agents.map(n=>{var r;let i=(r=n.name)!=null&&r.trim()?`${n.name} (${n.id})`:n.id;return e`
            <button
              class="btn btn--sm ${t.selectedScope===n.id?`active`:``}"
              @click=${()=>t.onSelectScope(n.id)}
            >
              ${i}
            </button>
          `})}
      </div>
    </div>
  `}function D(n){let r=n.selectedScope===m,i=n.defaults,a=n.selectedAgent??{},o=r?[`defaults`]:[`agents`,n.selectedScope],s=typeof a.security==`string`?a.security:void 0,c=typeof a.ask==`string`?a.ask:void 0,l=typeof a.askFallback==`string`?a.askFallback:void 0,u=r?i.security:s??`__default__`,d=r?i.ask:c??`__default__`,f=r?i.askFallback:l??`__default__`,p=typeof a.autoAllowSkills==`boolean`?a.autoAllowSkills:void 0,_=p??i.autoAllowSkills,v=p==null;return e`
    <div class="list" style="margin-top: 16px;">
      <div class="list-item">
        <div class="list-main">
          <div class="list-title">Security</div>
          <div class="list-sub">
            ${r?`Default security mode.`:`Default: ${i.security}.`}
          </div>
        </div>
        <div class="list-meta">
          <label class="field">
            <span>Mode</span>
            <select
              ?disabled=${n.disabled}
              @change=${e=>{let t=e.target.value;!r&&t===`__default__`?n.onRemove([...o,`security`]):n.onPatch([...o,`security`],t)}}
            >
              ${r?t:e`<option value="__default__" ?selected=${u===`__default__`}>
                    Use default (${i.security})
                  </option>`}
              ${h.map(t=>e`<option value=${t.value} ?selected=${u===t.value}>
                    ${t.label}
                  </option>`)}
            </select>
          </label>
        </div>
      </div>

      <div class="list-item">
        <div class="list-main">
          <div class="list-title">Ask</div>
          <div class="list-sub">
            ${r?`Default prompt policy.`:`Default: ${i.ask}.`}
          </div>
        </div>
        <div class="list-meta">
          <label class="field">
            <span>Mode</span>
            <select
              ?disabled=${n.disabled}
              @change=${e=>{let t=e.target.value;!r&&t===`__default__`?n.onRemove([...o,`ask`]):n.onPatch([...o,`ask`],t)}}
            >
              ${r?t:e`<option value="__default__" ?selected=${d===`__default__`}>
                    Use default (${i.ask})
                  </option>`}
              ${g.map(t=>e`<option value=${t.value} ?selected=${d===t.value}>
                    ${t.label}
                  </option>`)}
            </select>
          </label>
        </div>
      </div>

      <div class="list-item">
        <div class="list-main">
          <div class="list-title">Ask fallback</div>
          <div class="list-sub">
            ${r?`Applied when the UI prompt is unavailable.`:`Default: ${i.askFallback}.`}
          </div>
        </div>
        <div class="list-meta">
          <label class="field">
            <span>Fallback</span>
            <select
              ?disabled=${n.disabled}
              @change=${e=>{let t=e.target.value;!r&&t===`__default__`?n.onRemove([...o,`askFallback`]):n.onPatch([...o,`askFallback`],t)}}
            >
              ${r?t:e`<option value="__default__" ?selected=${f===`__default__`}>
                    Use default (${i.askFallback})
                  </option>`}
              ${h.map(t=>e`<option value=${t.value} ?selected=${f===t.value}>
                    ${t.label}
                  </option>`)}
            </select>
          </label>
        </div>
      </div>

      <div class="list-item">
        <div class="list-main">
          <div class="list-title">Auto-allow skill CLIs</div>
          <div class="list-sub">
            ${r?`Allow skill executables listed by the Gateway.`:v?`Using default (${i.autoAllowSkills?`on`:`off`}).`:`Override (${_?`on`:`off`}).`}
          </div>
        </div>
        <div class="list-meta">
          <label class="field">
            <span>Enabled</span>
            <input
              type="checkbox"
              ?disabled=${n.disabled}
              .checked=${_}
              @change=${e=>{let t=e.target;n.onPatch([...o,`autoAllowSkills`],t.checked)}}
            />
          </label>
          ${!r&&!v?e`<button
                class="btn btn--sm"
                ?disabled=${n.disabled}
                @click=${()=>n.onRemove([...o,`autoAllowSkills`])}
              >
                Use default
              </button>`:t}
        </div>
      </div>
    </div>
  `}function O(t){let n=[`agents`,t.selectedScope,`allowlist`],r=t.allowlist;return e`
    <div class="row" style="margin-top: 18px; justify-content: space-between;">
      <div>
        <div class="card-title">Allowlist</div>
        <div class="card-sub">Case-insensitive glob patterns.</div>
      </div>
      <button
        class="btn btn--sm"
        ?disabled=${t.disabled}
        @click=${()=>{let e=[...r,{pattern:``}];t.onPatch(n,e)}}
      >
        Add pattern
      </button>
    </div>
    <div class="list" style="margin-top: 12px;">
      ${r.length===0?e` <div class="muted">No allowlist entries yet.</div> `:r.map((e,n)=>k(t,e,n))}
    </div>
  `}function k(n,i,a){var s;let c=i.lastUsedAt?o(i.lastUsedAt):`never`,l=i.lastUsedCommand?r(i.lastUsedCommand,120):null,u=i.lastResolvedPath?r(i.lastResolvedPath,120):null;return e`
    <div class="list-item">
      <div class="list-main">
        <div class="list-title">${(s=i.pattern)!=null&&s.trim()?i.pattern:`New pattern`}</div>
        <div class="list-sub">Last used: ${c}</div>
        ${l?e`<div class="list-sub mono">${l}</div>`:t}
        ${u?e`<div class="list-sub mono">${u}</div>`:t}
      </div>
      <div class="list-meta">
        <label class="field">
          <span>Pattern</span>
          <input
            type="text"
            .value=${i.pattern??``}
            ?disabled=${n.disabled}
            @input=${e=>{let t=e.target;n.onPatch([`agents`,n.selectedScope,`allowlist`,a,`pattern`],t.value)}}
          />
        </label>
        <button
          class="btn btn--sm danger"
          ?disabled=${n.disabled}
          @click=${()=>{if(n.allowlist.length<=1){n.onRemove([`agents`,n.selectedScope,`allowlist`]);return}n.onRemove([`agents`,n.selectedScope,`allowlist`,a])}}
        >
          Remove
        </button>
      </div>
    </div>
  `}function A(e){return p(e,[`system.execApprovals.get`,`system.execApprovals.set`])}function j(t){let n=z(t);return e`
    ${w(C(t))} ${B(n)} ${M(t)}
    <section class="card">
      <div class="row" style="justify-content: space-between;">
        <div>
          <div class="card-title">Nodes</div>
          <div class="card-sub">Paired devices and live links.</div>
        </div>
        <button class="btn" ?disabled=${t.loading} @click=${t.onRefresh}>
          ${t.loading?`加载中…`:`刷新`}
        </button>
      </div>
      <div class="list" style="margin-top: 16px;">
        ${t.nodes.length===0?e` <div class="muted">No nodes found.</div> `:t.nodes.map(e=>W(e))}
      </div>
    </section>
  `}function M(r){let i=r.devicesList??{pending:[],paired:[]},a=Array.isArray(i.pending)?i.pending:[],o=Array.isArray(i.paired)?i.paired:[],s=new Map(o.map(e=>[n(e.deviceId),e]).filter(e=>!!e[0]));return e`
    <section class="card">
      <div class="row" style="justify-content: space-between;">
        <div>
          <div class="card-title">Devices</div>
          <div class="card-sub">Pairing requests + role tokens.</div>
        </div>
        <button class="btn" ?disabled=${r.devicesLoading} @click=${r.onDevicesRefresh}>
          ${r.devicesLoading?`加载中…`:`刷新`}
        </button>
      </div>
      ${r.devicesError?e`<div class="callout danger" style="margin-top: 12px;">${r.devicesError}</div>`:t}
      <div class="list" style="margin-top: 16px;">
        ${a.length>0?e`
              <div class="muted" style="margin-bottom: 8px;">Pending</div>
              ${a.map(e=>I(e,r,N(s,e)))}
            `:t}
        ${o.length>0?e`
              <div class="muted" style="margin-top: 12px; margin-bottom: 8px;">Paired</div>
              ${o.map(e=>L(e,r))}
            `:t}
        ${a.length===0&&o.length===0?e` <div class="muted">No paired devices.</div> `:t}
      </div>
    </section>
  `}function N(e,t){let r=n(t.deviceId);if(!r)return;let i=e.get(r);if(!i)return;let a=n(t.publicKey),o=n(i.publicKey);if(!(a&&o&&a!==o))return i}function P(e){return e?`roles: ${a(e.roles)} · scopes: ${a(e.scopes)}`:`none`}function F(e){switch(e){case`scope-upgrade`:return`scope upgrade requires approval`;case`role-upgrade`:return`role upgrade requires approval`;case`re-approval`:return`reconnect details changed; approval required`;case`new-pairing`:return`new device pairing request`}throw Error(`unsupported pending approval kind`)}function I(r,i,a){let s=n(r.displayName)||r.deviceId,c=typeof r.ts==`number`?o(r.ts):`不适用`,l=d(r,a),u=r.isRepair?` · repair`:``,f=r.remoteIp?` · ${r.remoteIp}`:``;return e`
    <div class="list-item">
      <div class="list-main">
        <div class="list-title">${s}</div>
        <div class="list-sub">${r.deviceId}${f}</div>
        <div class="muted" style="margin-top: 6px;">
          ${F(l.kind)} · requested ${c}${u}
        </div>
        <div class="muted" style="margin-top: 6px;">
          requested: ${P(l.requested)}
        </div>
        ${l.approved?e`
              <div class="muted" style="margin-top: 6px;">
                approved now: ${P(l.approved)}
              </div>
            `:t}
      </div>
      <div class="list-meta">
        <div class="row" style="justify-content: flex-end; gap: 8px; flex-wrap: wrap;">
          <button class="btn btn--sm primary" @click=${()=>i.onDeviceApprove(r.requestId)}>
            Approve
          </button>
          <button class="btn btn--sm" @click=${()=>i.onDeviceReject(r.requestId)}>
            Reject
          </button>
        </div>
      </div>
    </div>
  `}function L(t,r){let i=n(t.displayName)||t.deviceId,o=t.remoteIp?` · ${t.remoteIp}`:``,s=`roles: ${a(t.roles)}`,c=`scopes: ${a(t.scopes)}`,l=Array.isArray(t.tokens)?t.tokens:[];return e`
    <div class="list-item">
      <div class="list-main">
        <div class="list-title">${i}</div>
        <div class="list-sub">${t.deviceId}${o}</div>
        <div class="muted" style="margin-top: 6px;">${s} · ${c}</div>
        ${l.length===0?e` <div class="muted" style="margin-top: 6px">Tokens: none</div> `:e`
              <div class="muted" style="margin-top: 10px;">Tokens</div>
              <div style="display: flex; flex-direction: column; gap: 8px; margin-top: 6px;">
                ${l.map(e=>R(t.deviceId,e,r))}
              </div>
            `}
      </div>
    </div>
  `}function R(n,r,i){let s=r.revokedAtMs?`revoked`:`active`,c=`scopes: ${a(r.scopes)}`,l=o(r.rotatedAtMs??r.createdAtMs??r.lastUsedAtMs??null);return e`
    <div class="row" style="justify-content: space-between; gap: 8px;">
      <div class="list-sub">${r.role} · ${s} · ${c} · ${l}</div>
      <div class="row" style="justify-content: flex-end; gap: 6px; flex-wrap: wrap;">
        <button
          class="btn btn--sm"
          @click=${()=>i.onDeviceRotate(n,r.role,r.scopes)}
        >
          Rotate
        </button>
        ${r.revokedAtMs?t:e`
              <button
                class="btn btn--sm danger"
                @click=${()=>i.onDeviceRevoke(n,r.role)}
              >
                Revoke
              </button>
            `}
      </div>
    </div>
  `}function z(e){let t=e.configForm,n=H(e.nodes),{defaultBinding:r,agents:i}=U(t);return{ready:!!t,disabled:e.configSaving||e.configFormMode===`raw`,configDirty:e.configDirty,configLoading:e.configLoading,configSaving:e.configSaving,defaultBinding:r,agents:i,nodes:n,onBindDefault:e.onBindDefault,onBindAgent:e.onBindAgent,onSave:e.onSaveBindings,onLoadConfig:e.onLoadConfig,formMode:e.configFormMode}}function B(n){let r=n.nodes.length>0,i=n.defaultBinding??``;return e`
    <section class="card">
      <div class="row" style="justify-content: space-between; align-items: center;">
        <div>
          <div class="card-title">${`Exec 节点绑定`}</div>
          <div class="card-sub">${`使用 exec host=node 时，将代理固定到特定节点。`}</div>
        </div>
        <button
          class="btn"
          ?disabled=${n.disabled||!n.configDirty}
          @click=${n.onSave}
        >
          ${n.configSaving?`保存中…`:`保存`}
        </button>
      </div>

      ${n.formMode===`raw`?e`
            <div class="callout warn" style="margin-top: 12px">
              ${`将“配置”标签切换为表单模式，以在此处编辑绑定。`}
            </div>
          `:t}
      ${n.ready?e`
            <div class="list" style="margin-top: 16px;">
              <div class="list-item">
                <div class="list-main">
                  <div class="list-title">${`默认绑定`}</div>
                  <div class="list-sub">${`当代理未覆盖节点绑定时使用。`}</div>
                </div>
                <div class="list-meta">
                  <label class="field">
                    <span>${`节点`}</span>
                    <select
                      ?disabled=${n.disabled||!r}
                      @change=${e=>{let t=e.target.value.trim();n.onBindDefault(t||null)}}
                    >
                      <option value="" ?selected=${i===``}>Any node</option>
                      ${n.nodes.map(t=>e`<option value=${t.id} ?selected=${i===t.id}>
                            ${t.label}
                          </option>`)}
                    </select>
                  </label>
                  ${r?t:e` <div class="muted">No nodes with system.run available.</div> `}
                </div>
              </div>

              ${n.agents.length===0?e` <div class="muted">No agents found.</div> `:n.agents.map(e=>V(e,n))}
            </div>
          `:e`<div class="row" style="margin-top: 12px; gap: 12px;">
            <div class="muted">${`加载配置以编辑绑定。`}</div>
            <button class="btn" ?disabled=${n.configLoading} @click=${n.onLoadConfig}>
              ${n.configLoading?`加载中…`:`加载配置`}
            </button>
          </div>`}
    </section>
  `}function V(t,n){var r;let i=t.binding??`__default__`,a=(r=t.name)!=null&&r.trim()?`${t.name} (${t.id})`:t.id,o=n.nodes.length>0;return e`
    <div class="list-item">
      <div class="list-main">
        <div class="list-title">${a}</div>
        <div class="list-sub">
          ${t.isDefault?`default agent`:`agent`} ·
          ${i===`__default__`?`uses default (${n.defaultBinding??`any`})`:`override: ${t.binding}`}
        </div>
      </div>
      <div class="list-meta">
        <label class="field">
          <span>Binding</span>
          <select
            ?disabled=${n.disabled||!o}
            @change=${e=>{let r=e.target.value.trim();n.onBindAgent(t.index,r===`__default__`?null:r)}}
          >
            <option value="__default__" ?selected=${i===`__default__`}>
              Use default
            </option>
            ${n.nodes.map(t=>e`<option value=${t.id} ?selected=${i===t.id}>
                  ${t.label}
                </option>`)}
          </select>
        </label>
      </div>
    </div>
  `}function H(e){return p(e,[`system.run`])}function U(e){let t={id:`main`,name:void 0,index:0,isDefault:!0,binding:null};if(!e||typeof e!=`object`)return{defaultBinding:null,agents:[t]};let n=(e.tools??{}).exec??{},r=typeof n.node==`string`&&n.node.trim()?n.node.trim():null,i=e.agents??{};if(!Array.isArray(i.list)||i.list.length===0)return{defaultBinding:r,agents:[t]};let a=f(e).map(e=>{let t=(e.record.tools??{}).exec??{},n=typeof t.node==`string`&&t.node.trim()?t.node.trim():null;return{id:e.id,name:e.name,index:e.index,isDefault:e.isDefault,binding:n}});return a.length===0&&a.push(t),{defaultBinding:r,agents:a}}function W(t){let n=!!t.connected,r=!!t.paired,i=typeof t.displayName==`string`&&t.displayName.trim()||(typeof t.nodeId==`string`?t.nodeId:`unknown`),a=Array.isArray(t.caps)?t.caps:[],o=Array.isArray(t.commands)?t.commands:[];return e`
    <div class="list-item">
      <div class="list-main">
        <div class="list-title">${i}</div>
        <div class="list-sub">
          ${typeof t.nodeId==`string`?t.nodeId:``}
          ${typeof t.remoteIp==`string`?` · ${t.remoteIp}`:``}
          ${typeof t.version==`string`?` · ${t.version}`:``}
        </div>
        <div class="chip-row" style="margin-top: 6px;">
          <span class="chip">${r?`paired`:`unpaired`}</span>
          <span class="chip ${n?`chip-ok`:`chip-warn`}">
            ${n?`connected`:`offline`}
          </span>
          ${a.slice(0,12).map(t=>e`<span class="chip">${String(t)}</span>`)}
          ${o.slice(0,8).map(t=>e`<span class="chip">${String(t)}</span>`)}
        </div>
      </div>
    </div>
  `}export{j as renderNodes};
//# sourceMappingURL=nodes-C1Zff__4.js.map