@rubytech/taskmaster 1.0.102 → 1.0.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.102",
3
- "commit": "455385d2ad160c2ff83582d2d0fadf445ee45f21",
4
- "builtAt": "2026-02-22T20:49:17.705Z"
2
+ "version": "1.0.104",
3
+ "commit": "0d357d3da078494f7750263d8a5d28101192c786",
4
+ "builtAt": "2026-02-23T08:06:14.637Z"
5
5
  }
@@ -1307,7 +1307,7 @@ ${o}`:o),e.chatStream="","working"}else if(t.state==="block"){const s=cn(t.messa
1307
1307
  background: ${s<t?"var(--tasker-accent, #00e5ff)":"rgba(255,255,255,0.15)"};
1308
1308
  "></span>`)}
1309
1309
  </span>
1310
- `}function Yr(e){var u;if(e.serverPlatform!=="linux")return k;const t=e.wifiStatus,n=e.wifiBusy;if(!t)return p`
1310
+ `}function Yr(e){if(e.serverPlatform!=="linux")return k;const t=e.wifiStatus,n=e.wifiBusy;if(!t)return p`
1311
1311
  <div class="setup-status-item">
1312
1312
  ${q("unknown")}
1313
1313
  <div class="setup-status-info">
@@ -1323,25 +1323,25 @@ ${o}`:o),e.chatStream="","working"}else if(t.state==="block"){const s=cn(t.messa
1323
1323
  <span>NetworkManager not available</span>
1324
1324
  </div>
1325
1325
  </div>
1326
- `;const i=e.wifiNetworks,s=e.wifiSelectedSsid,o=i.length>0,r=t.connected?"good":"partial",a=t.connected?p`${t.ssid} ${t.signal!=null?p`<span style="margin-left: 4px;">${Qr(t.signal)}</span>`:k}`:"Not connected";return p`
1326
+ `;const i=e.wifiNetworks,s=e.wifiSelectedSsid,o=i.length>0,r=!!t.savedSsid&&!t.connected,a=t.connected?"good":"partial",u=t.connected?p`${t.ssid} ${t.signal!=null?p`<span style="margin-left: 4px;">${Qr(t.signal)}</span>`:k}`:r?p`${t.savedSsid} <span style="opacity: 0.4;">\u2014 disconnected</span>`:"Not connected";return p`
1327
1327
  <div>
1328
1328
  <div class="setup-status-item">
1329
- ${q(r)}
1329
+ ${q(a)}
1330
1330
  <div class="setup-status-info">
1331
1331
  <strong>WiFi</strong>
1332
- <span>${a}</span>
1332
+ <span>${u}</span>
1333
1333
  ${t.connected&&t.ip?p`<span style="font-size: 11px; opacity: 0.5;">${t.ip}</span>`:k}
1334
1334
  </div>
1335
- ${t.connected?p`<button
1335
+ ${r?p`<button
1336
1336
  class="setup-link-btn"
1337
1337
  ?disabled=${n}
1338
- @click=${e.onWifiDisconnect}
1339
- >${n?"...":"Disconnect"}</button>`:k}
1338
+ @click=${e.onWifiReconnect}
1339
+ >${n?"...":"Reconnect"}</button>`:k}
1340
1340
  <button
1341
1341
  class="setup-link-btn"
1342
1342
  ?disabled=${n}
1343
1343
  @click=${o?e.onWifiDismiss:e.onWifiScan}
1344
- >${n?"...":o?"Close":"Scan"}</button>
1344
+ >${n?"...":o?"Close":t.connected?"Change":"Scan"}</button>
1345
1345
  </div>
1346
1346
 
1347
1347
  ${e.wifiError?p`<div style="padding: 4px 0 4px 28px;">
@@ -1357,63 +1357,86 @@ ${o}`:o),e.chatStream="","working"}else if(t.state==="block"){const s=cn(t.messa
1357
1357
  border-radius: 6px;
1358
1358
  margin-bottom: 8px;
1359
1359
  ">
1360
- ${i.map(c=>p`
1361
- <button
1362
- style="
1363
- display: flex;
1364
- align-items: center;
1365
- justify-content: space-between;
1366
- width: 100%;
1367
- padding: 8px 12px;
1368
- background: ${s===c.ssid?"rgba(255,255,255,0.1)":"transparent"};
1369
- border: none;
1370
- border-bottom: 1px solid rgba(255,255,255,0.06);
1371
- color: inherit;
1372
- font-size: 13px;
1373
- cursor: pointer;
1374
- text-align: left;
1375
- "
1376
- @click=${()=>{c.active?e.onWifiDismiss():e.onWifiSelectSsid(s===c.ssid?null:c.ssid)}}
1377
- >
1378
- <span style="display: flex; align-items: center; gap: 8px;">
1379
- ${c.active?p`<span style="color: #22c55e;" title="Connected">\u2713</span>`:k}
1380
- <span>${c.ssid}</span>
1381
- </span>
1382
- <span style="display: flex; align-items: center; gap: 8px;">
1383
- ${c.security!=="Open"?p`<span style="opacity: 0.4; font-size: 11px;" title="${c.security}">\uD83D\uDD12</span>`:k}
1384
- <span title="Signal: ${c.signal}%">${Qr(c.signal)}</span>
1385
- </span>
1386
- </button>
1387
- `)}
1360
+ ${i.map(c=>{const l=t.savedSsid===c.ssid;return p`
1361
+ <button
1362
+ style="
1363
+ display: flex;
1364
+ align-items: center;
1365
+ justify-content: space-between;
1366
+ width: 100%;
1367
+ padding: 8px 12px;
1368
+ background: ${s===c.ssid?"rgba(255,255,255,0.1)":"transparent"};
1369
+ border: none;
1370
+ border-bottom: 1px solid rgba(255,255,255,0.06);
1371
+ color: inherit;
1372
+ font-size: 13px;
1373
+ cursor: pointer;
1374
+ text-align: left;
1375
+ "
1376
+ @click=${()=>{c.active?e.onWifiDismiss():e.onWifiSelectSsid(s===c.ssid?null:c.ssid)}}
1377
+ >
1378
+ <span style="display: flex; align-items: center; gap: 8px;">
1379
+ ${c.active?p`<span style="color: #22c55e;" title="Connected">\u2713</span>`:l?p`<span style="opacity: 0.4; font-size: 11px;" title="Saved">\u2605</span>`:k}
1380
+ <span>${c.ssid}</span>
1381
+ </span>
1382
+ <span style="display: flex; align-items: center; gap: 8px;">
1383
+ ${c.security!=="Open"?p`<span style="opacity: 0.4; font-size: 11px;" title="${c.security}">\uD83D\uDD12</span>`:k}
1384
+ <span title="Signal: ${c.signal}%">${Qr(c.signal)}</span>
1385
+ </span>
1386
+ </button>
1387
+ `})}
1388
1388
  </div>
1389
1389
 
1390
1390
  ${s&&!i.find(c=>c.ssid===s&&c.active)?p`
1391
1391
  <div style="display: flex; gap: 8px; align-items: center;">
1392
- ${((u=i.find(c=>c.ssid===s))==null?void 0:u.security)!=="Open"?p`
1393
- <input
1394
- type="password"
1395
- placeholder="Password"
1396
- .value=${e.wifiPassword}
1397
- @input=${c=>e.onWifiPasswordChange(c.target.value)}
1398
- @keydown=${c=>{c.key==="Enter"&&e.onWifiConnect()}}
1399
- ?disabled=${n}
1400
- style="
1401
- flex: 1;
1402
- padding: 6px 10px;
1403
- background: rgba(255,255,255,0.06);
1404
- border: 1px solid rgba(255,255,255,0.15);
1405
- border-radius: 4px;
1406
- color: inherit;
1407
- font-size: 13px;
1408
- outline: none;
1409
- "
1410
- />`:k}
1392
+ ${(()=>{const c=i.find(h=>h.ssid===s),l=(c==null?void 0:c.security)!=="Open",d=t.savedSsid===s;return l&&!d?p`
1393
+ <input
1394
+ type="password"
1395
+ placeholder="Password"
1396
+ .value=${e.wifiPassword}
1397
+ @input=${h=>e.onWifiPasswordChange(h.target.value)}
1398
+ @keydown=${h=>{h.key==="Enter"&&e.onWifiConnect()}}
1399
+ ?disabled=${n}
1400
+ style="
1401
+ flex: 1;
1402
+ padding: 6px 10px;
1403
+ background: rgba(255,255,255,0.06);
1404
+ border: 1px solid rgba(255,255,255,0.15);
1405
+ border-radius: 4px;
1406
+ color: inherit;
1407
+ font-size: 13px;
1408
+ outline: none;
1409
+ "
1410
+ />`:k})()}
1411
1411
  <button
1412
1412
  class="setup-button primary"
1413
1413
  style="padding: 6px 16px; font-size: 13px;"
1414
1414
  ?disabled=${n}
1415
1415
  @click=${e.onWifiConnect}
1416
1416
  >${n?"Connecting...":"Connect"}</button>
1417
+ ${t.savedSsid===s?p`<button
1418
+ class="setup-link-btn"
1419
+ ?disabled=${n}
1420
+ @click=${e.onWifiForget}
1421
+ style="font-size: 12px; opacity: 0.6;"
1422
+ >Forget</button>`:k}
1423
+ </div>
1424
+ `:k}
1425
+
1426
+ ${t.connected?p`
1427
+ <div style="display: flex; gap: 8px; align-items: center; margin-top: 4px;">
1428
+ <button
1429
+ class="setup-link-btn"
1430
+ ?disabled=${n}
1431
+ @click=${e.onWifiDisconnect}
1432
+ style="font-size: 12px; opacity: 0.6;"
1433
+ >Disconnect</button>
1434
+ ${t.savedSsid?p`<button
1435
+ class="setup-link-btn"
1436
+ ?disabled=${n}
1437
+ @click=${e.onWifiForget}
1438
+ style="font-size: 12px; opacity: 0.6;"
1439
+ >Forget network</button>`:k}
1417
1440
  </div>
1418
1441
  `:k}
1419
1442
  </div>
@@ -3493,7 +3516,7 @@ ${r.text}`:a.join(", "):r.text;t.push({kind:"message",key:`queue:${r.id}`,messag
3493
3516
  <p>Connecting...</p>
3494
3517
  </div>
3495
3518
  </div>
3496
- `;if(e.connected&&e.accessState.checked){const{accessState:l}=e;if(l.hasPins&&!l.authenticated)return za({show:!0,isFirstTime:!1,accounts:l.accounts,error:l.error,busy:l.busy,onSubmit:(d,h)=>{h!=null&&e.handlePinSubmit(d,h)},changePinMode:e.loginChangePinMode,onToggleChangePinMode:()=>e.toggleChangePinMode(),changePinBusy:e.changePinBusy,changePinError:e.changePinError,changePinSuccess:e.changePinSuccess,onChangePin:(d,h,v)=>e.handleChangePin(d,h,v)});if(!l.hasMasterPin&&!l.authenticated&&e.setup)return za({show:!0,isFirstTime:!0,accounts:[],error:l.error,busy:l.busy,onSubmit:d=>e.handleSetMasterPin(d)});if(!l.hasMasterPin&&!l.authenticated&&!e.setup)return window.location.href="/setup",k}if(e.setup){const l=_b(e.channelsSnapshot),d=((n=(t=e.channelsSnapshot)==null?void 0:t.channelAccounts)==null?void 0:n.whatsapp)??[],h=Mb(e.channelsSnapshot),v=Pb(e);return gf({connected:e.connected,serverPlatform:((s=(i=e.hello)==null?void 0:i.server)==null?void 0:s.platform)??null,assistantName:e.assistantName,currentStep:e.setupStep,licenseKey:e.licenseKey,licenseBusy:e.licenseBusy,licenseValid:e.licenseValid,licenseMessage:e.licenseMessage,licenseTier:e.licenseTier,licenseDeviceId:e.licenseDeviceId,licenseStoredKey:e.licenseStoredKey,onLicenseKeyChange:f=>e.handleLicenseKeyChange(f),onLicenseActivate:()=>e.handleLicenseActivate(),onLicenseRemove:async()=>{await e.handleLicenseRemove(),e.licenseRemoveConfirm=!1},licenseRemoveConfirm:e.licenseRemoveConfirm,onLicenseRemoveConfirm:()=>{e.licenseRemoveConfirm=!0},onLicenseRemoveCancel:()=>{e.licenseRemoveConfirm=!1},authConnected:e.authConnected,authBusy:e.authBusy,authMessage:e.authMessage,authUrl:e.authUrl,authCodeInput:e.authCodeInput,authExpiresIn:e.authExpiresIn,whatsappBusy:e.whatsappBusy,whatsappLoginMessage:e.whatsappLoginMessage,whatsappLoginQrDataUrl:e.whatsappLoginQrDataUrl,whatsappLoginConnected:e.whatsappLoginConnected,whatsappChannelStatus:l,whatsappAccounts:d,whatsappActiveQrAccountId:e.whatsappActiveQrAccountId,whatsappAccountSaving:e.whatsappAccountSaving,gatewayHealthy:e.gatewayHealthy,gatewayHealthLoading:e.gatewayHealthLoading,gatewayHealthMessage:e.gatewayHealthMessage,gatewayRestartBusy:e.gatewayRestartBusy,updateAvailable:e.updateAvailable,currentVersion:e.currentVersion,latestVersion:e.latestVersion,updateChecking:e.updateChecking,updateRunning:e.updateRunning,updateMessage:e.updateMessage,updateProgressSteps:e.updateProgressSteps,updateLastResult:e.updateLastResult,onUpdateCheck:()=>e.handleUpdateCheck(),onUpdateRun:()=>e.handleUpdateRun(),onUpdateDismissResult:()=>e.handleUpdateDismissResult(),uninstallConfirm:e.uninstallConfirm,uninstallBusy:e.uninstallBusy,uninstallDone:e.uninstallDone,uninstallError:e.uninstallError,uninstallConfirmText:e.uninstallConfirmText,onUninstallConfirm:()=>e.handleUninstallConfirm(),onUninstallCancel:()=>e.handleUninstallCancel(),onUninstallConfirmTextChange:f=>e.handleUninstallConfirmTextChange(f),onUninstallRun:()=>e.handleUninstallRun(),onUninstallDismiss:()=>e.handleUninstallDismiss(),onStartAuth:()=>e.handleAuthStart(),onSubmitAuthCode:f=>e.handleAuthSubmitCode(f),onAuthCodeChange:f=>e.handleAuthCodeChange(f),onSkipToWhatsApp:()=>e.handleSkipToWhatsApp(),onWhatsAppRelink:async f=>{await e.handleWhatsAppStart(!0,f),e.whatsappLoginQrDataUrl&&(await e.handleWhatsAppWait(f),await G(e,!0),e.requestUpdate())},onWhatsAppUnlink:async f=>{await e.handleWhatsAppLogout(f)},onWhatsAppReset:async f=>{await e.handleWhatsAppLogout(f),await e.handleWhatsAppStart(!0,f),e.whatsappLoginQrDataUrl&&(await e.handleWhatsAppWait(f),await G(e,!0),e.requestUpdate())},onRefreshStatus:async()=>{await G(e,!0),await e.handleGatewayHealthCheck()},onWhatsAppBack:()=>{e.whatsappLoginQrDataUrl=null,e.whatsappLoginMessage=null,e.whatsappLoginConnected=null,e.whatsappActiveQrAccountId=null,e.requestUpdate(),G(e,!0)},onRestartGateway:()=>e.handleGatewayRestart(),onRemoveWhatsAppAccount:f=>e.handleRemoveWhatsAppAccount(f),workspaces:e.workspaces,workspacesLoading:e.workspacesLoading,workspacesError:e.workspacesError,addingWorkspace:e.addingWorkspace,newWorkspaceName:e.newWorkspaceName,newWorkspacePath:e.newWorkspacePath,workspaceSaving:e.workspaceSaving,workspaceRemoveConfirm:e.workspaceRemoveConfirm,newWorkspacePin:e.newWorkspacePin,onSetNewWorkspacePin:f=>{e.newWorkspacePin=f},onWorkspaceCreate:async(f,b)=>{const S=e.newWorkspacePin;await e.handleWorkspaceCreate(f,b),S.match(/^\d{4,6}$/)&&(await yb(e,f,S),e.newWorkspacePin="")},onWorkspaceRemove:f=>e.handleWorkspaceRemove(f),onSetAddingWorkspace:f=>{e.addingWorkspace=f},onSetNewWorkspaceName:f=>{e.newWorkspaceName=f},onSetNewWorkspacePath:f=>{e.newWorkspacePath=f},onSetWorkspaceRemoveConfirm:f=>{e.workspaceRemoveConfirm=f},renamingWorkspace:e.renamingWorkspace,renameWorkspaceName:e.renameWorkspaceName,onWorkspaceRenameStart:()=>e.handleWorkspaceRenameStart(),onWorkspaceRenameCancel:()=>e.handleWorkspaceRenameCancel(),onWorkspaceRename:(f,b)=>e.handleWorkspaceRename(f,b),whatsappDmPolicy:(()=>{const f=oe(e),b=f==null?void 0:f.whatsappAccountId,S=b?d.find($=>$.accountId===b):d[0];return(S==null?void 0:S.dmPolicy)??null})(),onWhatsAppDmToggle:async()=>{var T;const f=oe(e),b=f==null?void 0:f.whatsappAccountId,S=b?d.find(M=>M.accountId===b):d[0];if(!S)return;const A=S.dmPolicy!=null&&S.dmPolicy!=="disabled"?"disabled":"open",C=A==="open"?{dmPolicy:A,allowFrom:["*"]}:{dmPolicy:A};try{const M=await e.client.request("config.get"),R=M.config,B=(T=R==null?void 0:R.channels)==null?void 0:T.whatsapp,me=((B==null?void 0:B.accounts)??{})[S.accountId]?{channels:{whatsapp:{accounts:{[S.accountId]:C}}}}:{channels:{whatsapp:C}};await e.client.request("config.patch",{raw:JSON.stringify(me),baseHash:M.hash,note:`WhatsApp DM policy → ${A}`,skipRestart:!0}),await G(e,!1)}catch(M){console.error("DM toggle failed:",M)}},whatsappModel:(()=>{var T,M;const f=oe(e);if(!f)return null;const b=f.agents.find(R=>R.id.endsWith("-public")||R.id==="public");if(!b)return null;const S=(T=e.configSnapshot)==null?void 0:T.config,$=(M=S==null?void 0:S.agents)==null?void 0:M.list;if(!Array.isArray($))return null;const A=$.find(R=>R.id===b.id);if(!(A!=null&&A.model))return null;const C=typeof A.model=="string"?A.model:A.model.primary;return(C==null?void 0:C.trim())||null})(),whatsappModelCatalog:e.chatModelCatalog??[],onWhatsAppModelChange:async f=>{const b=oe(e);if(!b)return;const S=b.agents.find($=>$.id.endsWith("-public")||$.id==="public");if(S)try{const $=await e.client.request("config.get"),A=$.config,C=(A==null?void 0:A.agents)??{},T=Array.isArray(C.list)?[...C.list]:[],M=T.findIndex(B=>B.id===S.id);if(f)M>=0?T[M]={...T[M],model:f}:T.push({id:S.id,model:f});else if(M>=0){const{model:B,...ee}=T[M];Object.keys(ee).length<=1?T.splice(M,1):T[M]=ee}const R=T.length>0?{agents:{list:T}}:{agents:{list:null}};await e.client.request("config.patch",{raw:JSON.stringify(R),baseHash:$.hash,note:`Public agent model → ${f||"default"}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch($){console.error("Model change failed:",$)}},whatsappThinkingLevel:(()=>{var C,T,M;const f=oe(e);if(!f)return null;const b=f.agents.find(R=>R.id.endsWith("-public")||R.id==="public");if(!b)return null;const S=(C=e.configSnapshot)==null?void 0:C.config,$=(T=S==null?void 0:S.agents)==null?void 0:T.list;if(!Array.isArray($))return null;const A=$.find(R=>R.id===b.id);return((M=A==null?void 0:A.thinkingLevel)==null?void 0:M.trim())||null})(),onWhatsAppThinkingChange:async f=>{const b=oe(e);if(!b)return;const S=b.agents.find($=>$.id.endsWith("-public")||$.id==="public");if(S)try{const $=await e.client.request("config.get"),A=$.config,C=(A==null?void 0:A.agents)??{},T=Array.isArray(C.list)?[...C.list]:[],M=T.findIndex(ee=>ee.id===S.id),R=f==="off"?void 0:f;if(R)M>=0?T[M]={...T[M],thinkingLevel:R}:T.push({id:S.id,thinkingLevel:R});else if(M>=0){const{thinkingLevel:ee,...me}=T[M];Object.keys(me).length<=1?T.splice(M,1):T[M]=me}const B=T.length>0?{agents:{list:T}}:{agents:{list:null}};await e.client.request("config.patch",{raw:JSON.stringify(B),baseHash:$.hash,note:`Public agent thinking → ${R||"default"}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch($){console.error("Thinking change failed:",$)}},whatsappGroupPolicy:(()=>{var M,R;const f=(M=e.configSnapshot)==null?void 0:M.config,b=(R=f==null?void 0:f.channels)==null?void 0:R.whatsapp,S=oe(e),$=S==null?void 0:S.whatsappAccountId,A=(b==null?void 0:b.accounts)??{},C=$?A[$]:void 0;return(C==null?void 0:C.groupPolicy)??(b==null?void 0:b.groupPolicy)??"allowlist"})(),whatsappGroupRequireMention:(()=>{var R,B;const f=(R=e.configSnapshot)==null?void 0:R.config,b=(B=f==null?void 0:f.channels)==null?void 0:B.whatsapp,S=oe(e),$=S==null?void 0:S.whatsappAccountId,A=(b==null?void 0:b.accounts)??{},C=$?A[$]:void 0,M=((C==null?void 0:C.groups)??(b==null?void 0:b.groups)??{})["*"];return(M==null?void 0:M.requireMention)!==!1})(),onWhatsAppGroupToggle:async()=>{var S;const f=oe(e),b=f==null?void 0:f.whatsappAccountId;try{const $=await e.client.request("config.get"),A=$.config,C=((S=A==null?void 0:A.channels)==null?void 0:S.whatsapp)??{},T=C.accounts??{},M=b?T[b]:void 0,R=(M==null?void 0:M.groupPolicy)??C.groupPolicy??"allowlist",B=R==="disabled"||R==="allowlist",ee=B?"open":"disabled",me=B?{"*":{}}:void 0,Ke={groupPolicy:ee};me&&(Ke.groups=me);const Z=M?{channels:{whatsapp:{accounts:{[b]:Ke}}}}:{channels:{whatsapp:Ke}};await e.client.request("config.patch",{raw:JSON.stringify(Z),baseHash:$.hash,note:`WhatsApp groups → ${ee}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch($){console.error("Group toggle failed:",$)}},onWhatsAppGroupMentionChange:async f=>{var $;const b=oe(e),S=b==null?void 0:b.whatsappAccountId;try{const A=await e.client.request("config.get"),C=A.config,M=((($=C==null?void 0:C.channels)==null?void 0:$.whatsapp)??{}).accounts??{},R=S?M[S]:void 0,B={"*":{requireMention:f}},ee=R?{channels:{whatsapp:{accounts:{[S]:{groups:B}}}}}:{channels:{whatsapp:{groups:B}}};await e.client.request("config.patch",{raw:JSON.stringify(ee),baseHash:A.hash,note:`WhatsApp group mention → ${f?"when mentioned":"always"}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch(A){console.error("Group mention change failed:",A)}},whatsappSettingsOpen:e.whatsappSettingsOpen??!1,onWhatsAppSettingsOpen:()=>{e.whatsappSettingsOpen=!0},onWhatsAppSettingsClose:()=>{e.whatsappSettingsOpen=!1},imessageConfigured:h.configured,imessageRunning:h.running,imessageConnected:h.connected,imessageLastError:h.lastError,imessageSelfChatMode:h.selfChatMode,imessageCliPath:h.cliPath,imessageEnabling:e.imessageEnabling,imessageEnableConfirm:e.imessageEnableConfirm,imessageOwnerWorkspace:v,onIMessageEnable:()=>{e.imessageEnableConfirm=!0},onIMessageEnableConfirm:async()=>{e.imessageEnabling=!0;try{const f=await e.client.request("config.get"),b=f.config,S=(b==null?void 0:b.bindings)??[],$=oe(e),A=$==null?void 0:$.agents.find(B=>B.id.endsWith("-admin")||B.id==="admin"),C=(A==null?void 0:A.id)??"admin",T=S.filter(B=>{var ee;return((ee=B.match)==null?void 0:ee.channel)!=="imessage"}),M=[{agentId:C,match:{channel:"imessage",peer:{kind:"dm",id:"__self__"}},meta:{imessageOwner:!0}}],R=[...T,...M];await e.client.request("config.patch",{raw:JSON.stringify({channels:{imessage:{selfChatMode:!0,dmPolicy:"disabled",allowFrom:["*"]}},bindings:R}),baseHash:f.hash,note:"Enable iMessage (self-chat) for "+(($==null?void 0:$.name)??"default")}),e.imessageEnableConfirm=!1,setTimeout(()=>{Promise.all([G(e,!0),Le(e)]).then(()=>{e.imessageEnabling=!1})},3e3)}catch{e.imessageEnabling=!1}},onIMessageEnableCancel:()=>{e.imessageEnableConfirm=!1},onIMessageProbe:async()=>{e.imessageEnabling=!0,e.requestUpdate();try{await G(e,!0)}finally{e.imessageEnabling=!1}},onIMessageDisconnect:async()=>{e.imessageEnabling=!0;try{const f=await e.client.request("config.get"),b=f.config,$=((b==null?void 0:b.bindings)??[]).filter(A=>{var C;return((C=A.match)==null?void 0:C.channel)!=="imessage"});await e.client.request("config.patch",{raw:JSON.stringify({channels:{imessage:{selfChatMode:!1,dmPolicy:"disabled"}},bindings:$}),baseHash:f.hash,note:"Disconnect iMessage"}),e.imessageEnableConfirm=!1,setTimeout(()=>{Promise.all([G(e,!0),Le(e)]).then(()=>{e.imessageEnabling=!1})},3e3)}catch{e.imessageEnabling=!1}},onIMessageReassign:async()=>{e.imessageEnabling=!0;try{const f=await e.client.request("config.get"),b=f.config,S=(b==null?void 0:b.bindings)??[],$=oe(e),A=$==null?void 0:$.agents.find(R=>R.id.endsWith("-admin")||R.id==="admin"),C=(A==null?void 0:A.id)??"admin",T=S.filter(R=>{var B;return((B=R.match)==null?void 0:B.channel)!=="imessage"}),M=[{agentId:C,match:{channel:"imessage",peer:{kind:"dm",id:"__self__"}},meta:{imessageOwner:!0}}];await e.client.request("config.patch",{raw:JSON.stringify({channels:{imessage:{selfChatMode:!0,dmPolicy:"disabled",allowFrom:["*"]}},bindings:[...T,...M]}),baseHash:f.hash,note:"Reassign iMessage to "+(($==null?void 0:$.name)??"default")}),e.imessageEnableConfirm=!1,setTimeout(()=>{Promise.all([G(e,!0),Le(e)]).then(()=>{e.imessageEnabling=!1})},3e3)}catch{e.imessageEnabling=!1}},infoModalOpen:e.infoModalOpen,onInfoModalOpen:f=>{e.infoModalOpen=f},onInfoModalClose:()=>{e.infoModalOpen=null},isMaster:e.accessState.master,apiKeyProviders:e.apiKeyProviders,apiKeyModalOpen:e.apiKeyModalOpen,apiKeyBusy:e.apiKeyBusy,apiKeyError:e.apiKeyError,apiKeySuccess:e.apiKeySuccess,apiKeySavingProvider:e.apiKeySavingProvider,onApiKeyModalOpen:()=>{e.apiKeyModalOpen=!0,e.apiKeyError=null,e.apiKeySuccess=null,e.apiKeySavingProvider=null},onApiKeyModalClose:()=>{e.apiKeyModalOpen=!1,e.apiKeyError=null,e.apiKeySuccess=null,e.apiKeySavingProvider=null},onApiKeySave:async(f,b)=>{e.apiKeySavingProvider=f,e.apiKeyBusy=!0,e.apiKeyError=null,e.apiKeySuccess=null;try{await qa(e.client,f,b);const S=`${f} key saved`;e.apiKeySuccess=S,e.apiKeySavingProvider=null;try{e.apiKeyProviders=await eo(e.client)}catch{}f==="anthropic"&&await e.handleAuthStatusCheck(),setTimeout(()=>{e.apiKeySuccess===S&&(e.apiKeySuccess=null)},2500)}catch(S){e.apiKeyError=S instanceof Error?S.message:"Failed to save key",e.apiKeySavingProvider=null}finally{e.apiKeyBusy=!1}},onApiKeyRemove:async f=>{e.apiKeySavingProvider=f,e.apiKeyBusy=!0,e.apiKeyError=null,e.apiKeySuccess=null;try{await Xv(e.client,f);const b=`${f} key removed`;e.apiKeySuccess=b,e.apiKeySavingProvider=null;try{e.apiKeyProviders=await eo(e.client)}catch{}setTimeout(()=>{e.apiKeySuccess===b&&(e.apiKeySuccess=null)},2500)}catch(b){e.apiKeyError=b instanceof Error?b.message:"Failed to remove key",e.apiKeySavingProvider=null}finally{e.apiKeyBusy=!1}},authApiKeyMode:e.authApiKeyMode,authApiKeyInput:e.authApiKeyInput,authApiKeyBusy:e.authApiKeyBusy,authApiKeyError:e.authApiKeyError,onAuthApiKeyToggle:()=>{e.authApiKeyMode=!e.authApiKeyMode,e.authApiKeyError=null},onAuthApiKeyChange:f=>{e.authApiKeyInput=f},onAuthApiKeySubmit:async()=>{const f=e.authApiKeyInput.trim();if(f){e.authApiKeyBusy=!0,e.authApiKeyError=null;try{await qa(e.client,"anthropic",f),await e.handleAuthStatusCheck(),e.authApiKeyMode=!1,e.authApiKeyInput=""}catch(b){e.authApiKeyError=b instanceof Error?b.message:"Failed to save API key"}finally{e.authApiKeyBusy=!1}}},accountHasPin:(()=>{var b;const f=e.selectedWorkspace??((b=e.workspaces[0])==null?void 0:b.name);return f?e.accessState.accounts.some(S=>S.id===f):!1})(),accountPinModalOpen:e.accountPinModalOpen,accountPinBusy:e.accountPinBusy,accountPinError:e.accountPinError,accountPinSuccess:e.accountPinSuccess,onAccountPinModalOpen:()=>{e.accountPinModalOpen=!0,e.accountPinError=null,e.accountPinSuccess=null},onAccountPinModalClose:()=>{e.accountPinModalOpen=!1,e.accountPinError=null,e.accountPinSuccess=null},onAccountPinSave:(f,b)=>{var $;const S=e.selectedWorkspace??(($=e.workspaces[0])==null?void 0:$.name);S&&e.handleAccountPinSave(S,f,b)},publicChatEnabled:(()=>{var S;const f=(S=e.configSnapshot)==null?void 0:S.config,b=f==null?void 0:f.publicChat;return(b==null?void 0:b.enabled)===!0})(),publicChatAuthMode:(()=>{var $;const f=($=e.configSnapshot)==null?void 0:$.config,b=f==null?void 0:f.publicChat,S=b==null?void 0:b.auth;return S==="verified"||S==="choice"?S:"anonymous"})(),publicChatBusy:e.publicChatToggleBusy,onPublicChatToggle:async()=>{var f;if(!e.publicChatToggleBusy){e.publicChatToggleBusy=!0;try{const b=await e.client.request("config.get"),S=b.config,$=((f=S==null?void 0:S.publicChat)==null?void 0:f.enabled)===!0;await e.client.request("config.patch",{raw:JSON.stringify({publicChat:{enabled:!$}}),baseHash:b.hash,note:`Public chat → ${$?"disabled":"enabled"}`}),e.configSnapshot=await e.client.request("config.get")}catch(b){console.error("Public chat toggle failed:",b)}finally{e.publicChatToggleBusy=!1}}},onPublicChatAuthModeChange:async f=>{if(!e.publicChatToggleBusy){e.publicChatToggleBusy=!0;try{const b=await e.client.request("config.get");await e.client.request("config.patch",{raw:JSON.stringify({publicChat:{auth:f}}),baseHash:b.hash,note:`Public chat auth → ${f}`}),e.configSnapshot=await e.client.request("config.get")}catch(b){console.error("Public chat auth mode change failed:",b)}finally{e.publicChatToggleBusy=!1}}},tailscaleStatus:e.tailscaleStatus,tailscaleBusy:e.tailscaleBusy,tailscaleAuthUrl:e.tailscaleAuthUrl,tailscaleError:e.tailscaleError,tailscaleFunnelEnableUrl:e.tailscaleFunnelEnableUrl,onTailscaleEnable:async()=>{if(!e.tailscaleBusy){e.tailscaleBusy=!0,e.tailscaleAuthUrl=null;try{const f=await e.client.request("tailscale.enable");if(f.authUrl){e.tailscaleAuthUrl=f.authUrl;const b=setInterval(async()=>{try{const S=await e.client.request("tailscale.status");e.tailscaleStatus=S,S.loggedIn&&(clearInterval(b),e.tailscaleAuthUrl=null,e.tailscaleBusy=!1)}catch{}},3e3);setTimeout(()=>{clearInterval(b),e.tailscaleBusy&&(e.tailscaleBusy=!1)},3e5)}else f.alreadyLoggedIn&&(e.tailscaleStatus=await e.client.request("tailscale.status")),e.tailscaleBusy=!1}catch(f){console.error("Tailscale enable failed:",f),e.tailscaleBusy=!1}}},onTailscaleFunnelEnable:async()=>{var f;if(!e.tailscaleBusy){e.tailscaleBusy=!0,e.tailscaleError=null,e.tailscaleFunnelEnableUrl=null;try{await e.client.request("tailscale.funnel.enable")}catch(b){console.error("Tailscale funnel enable failed:",b);const S=b;(f=S.payload)!=null&&f.enableUrl&&(e.tailscaleFunnelEnableUrl=S.payload.enableUrl),e.tailscaleError=S.message||"Failed to enable Funnel",e.tailscaleBusy=!1}}},onTailscaleFunnelDisable:async()=>{if(!e.tailscaleBusy){e.tailscaleBusy=!0;try{await e.client.request("tailscale.funnel.disable")}catch(f){console.error("Tailscale funnel disable failed:",f),e.tailscaleBusy=!1}}},wifiStatus:e.wifiStatus,wifiNetworks:e.wifiNetworks,wifiBusy:e.wifiBusy,wifiError:e.wifiError,wifiPassword:e.wifiPassword,wifiSelectedSsid:e.wifiSelectedSsid,onWifiScan:async()=>{if(!e.wifiBusy){e.wifiBusy=!0,e.wifiError=null;try{const[f,b]=await Promise.all([e.client.request("wifi.scan"),e.client.request("wifi.status")]);e.wifiNetworks=f.networks,e.wifiStatus=b}catch(f){console.error("WiFi scan failed:",f),e.wifiError=f.message||"Failed to scan networks"}finally{e.wifiBusy=!1}}},onWifiConnect:async()=>{if(!(e.wifiBusy||!e.wifiSelectedSsid)){e.wifiBusy=!0,e.wifiError=null;try{await e.client.request("wifi.connect",{ssid:e.wifiSelectedSsid,password:e.wifiPassword}),e.wifiPassword="",e.wifiSelectedSsid=null,e.wifiNetworks=[];const f=await e.client.request("wifi.status");e.wifiStatus=f}catch(f){console.error("WiFi connect failed:",f),e.wifiError=f.message||"Failed to connect"}finally{e.wifiBusy=!1}}},onWifiDisconnect:async()=>{if(!e.wifiBusy){e.wifiBusy=!0,e.wifiError=null;try{await e.client.request("wifi.disconnect"),e.wifiNetworks=[],e.wifiSelectedSsid=null,e.wifiPassword="";const f=await e.client.request("wifi.status");e.wifiStatus=f}catch(f){console.error("WiFi disconnect failed:",f),e.wifiError=f.message||"Failed to disconnect"}finally{e.wifiBusy=!1}}},onWifiDismiss:()=>{e.wifiNetworks=[],e.wifiSelectedSsid=null,e.wifiPassword="",e.wifiError=null},onWifiSelectSsid:f=>{e.wifiSelectedSsid=f,e.wifiPassword="",e.wifiError=null},onWifiPasswordChange:f=>{e.wifiPassword=f},wsProps:Sb(e)})}if(e.filesPage){const l=Ab(e);return Jh({connected:e.connected,wsProps:sn(e),loading:e.filesLoading,tree:e.filesTree,root:e.filesRoot,error:e.filesError,selectedPath:e.filesSelectedPath,selectedPaths:e.filesSelectedPaths,previewContent:e.filesPreviewContent,previewLoading:e.filesPreviewLoading,previewBinary:e.filesPreviewBinary,previewSize:e.filesPreviewSize,expandedDirs:e.filesExpandedDirs,currentDir:e.filesCurrentDir,message:e.filesMessage,uploadBusy:e.filesUploadBusy,reindexBusy:e.filesReindexBusy,memoryStatus:e.filesMemoryStatus,onRefresh:()=>Ut(e,l),onReindex:()=>dh(e,l),onSelectFile:d=>{e.filesPendingDeletePath=null,ih(e,d,l)},onToggleSelectFile:d=>sh(e,d,l),onToggleDir:d=>ph(e,d),onUpload:(d,h)=>ah(e,d,h,l),onNewFolder:(d,h)=>lh(e,d,h,l),onDownload:d=>oc(e,d,l),onBulkDownload:()=>oh(e,l),onDelete:d=>{e.filesPendingDeletePath=null,ch(e,d,l)},pendingDeletePath:e.filesPendingDeletePath,onArmDelete:d=>{e.filesPendingDeletePath=d||null},onMoveToDir:(d,h)=>rh(e,d,h,l),searchQuery:e.filesSearchQuery,searchResults:e.filesSearchResults,searchLoading:e.filesSearchLoading,searchAgentId:e.filesSearchAgentId,agentIds:e.workspaceAgentIds??[],onSearch:d=>{const h=e.filesSearchAgentId??l;hh(e,d,h)},onSearchAgentChange:d=>{e.filesSearchAgentId=d},onSearchClear:()=>{fh(e)},onSearchQueryChange:d=>{e.filesSearchQuery=d}})}if(e.browserPage)return Vh({connected:e.connected,active:e.browserScreencastActive,loading:e.browserLoading,error:e.browserError,inputMode:e.browserInputMode,fullscreen:e.browserFullscreen,handoffPending:e.browserHandoffPending,handoffReason:e.browserHandoffReason,onStart:()=>zv(e),onStop:()=>jv(e),onToggleInput:()=>qv(e),onToggleFullscreen:()=>Vv(e),onCompleteHandoff:()=>Hv(e),onCanvasMouseDown:l=>{const h=l.target.getBoundingClientRect(),f=hn().translateCoordinates(l.clientX-h.left,l.clientY-h.top);xs(e,"mousePressed",f.x,f.y,l.button===2?"right":l.button===1?"middle":"left")},onCanvasMouseUp:l=>{const h=l.target.getBoundingClientRect(),f=hn().translateCoordinates(l.clientX-h.left,l.clientY-h.top);xs(e,"mouseReleased",f.x,f.y)},onCanvasMouseMove:l=>{const d=hn();if(d.shouldThrottleMouseMove())return;const v=l.target.getBoundingClientRect(),f=d.translateCoordinates(l.clientX-v.left,l.clientY-v.top);xs(e,"mouseMoved",f.x,f.y)},onCanvasKeyDown:l=>{let d=0;l.altKey&&(d|=1),l.ctrlKey&&(d|=2),l.metaKey&&(d|=4),l.shiftKey&&(d|=8),$s(e,"keyDown",l.key,{code:l.code,modifiers:d||void 0}),l.key.length===1&&$s(e,"char",l.key,{text:l.key})},onCanvasKeyUp:l=>{$s(e,"keyUp",l.key,{code:l.code})}});if(e.adminsPage){const l=xb(e),d=$b(e);return yf({connected:e.connected,wsProps:sn(e),loading:e.adminsLoading,saving:e.adminsSaving,phones:e.adminPhones,error:e.adminsError,newPhone:e.adminsNewPhone,onRefresh:()=>Ii(e,l),onAdd:h=>{xu(e,h,l,d).then(()=>{e.adminsError||(e.adminsNewPhone="")})},onRemove:h=>$u(e,h,l,d),onNewPhoneChange:h=>e.handleAdminsNewPhoneChange(h)})}if(e.contactsPage){const l=Eb(e);return kf({connected:e.connected,wsProps:sn(e),loading:e.contactsLoading,saving:e.contactsSaving,records:e.contactsRecords,error:e.contactsError,searchQuery:e.contactsSearchQuery,editingId:e.contactsEditingId,showAddForm:e.contactsShowAddForm,newRecordPhone:e.contactsNewPhone,newRecordName:e.contactsNewName,onSearch:d=>e.contactsSearchQuery=d,onSearchSubmit:()=>yt(e,l),onAdd:(d,h)=>Au(e,d,h,l),onDelete:d=>Eu(e,d,l),onSetField:(d,h,v)=>Cu(e,d,h,v,l),onDeleteField:(d,h)=>Tu(e,d,h,l),onToggleExpand:d=>{e.contactsEditingId=e.contactsEditingId===d?null:d},onShowAddForm:()=>e.contactsShowAddForm=!0,onCancelAddForm:()=>{e.contactsShowAddForm=!1,e.contactsNewPhone="",e.contactsNewName=""},onNewRecordPhoneChange:d=>e.handleContactsNewPhoneChange(d),onNewRecordNameChange:d=>e.handleContactsNewNameChange(d),onRefresh:()=>yt(e,l)})}if(e.chatPage){const l=e.connected?null:"Disconnected from gateway.",d=el(e),h=e.chatAvatarUrl??d??null,v=(()=>{var S;const f=(S=e.configSnapshot)==null?void 0:S.config,b=f==null?void 0:f.publicChat;return(b==null?void 0:b.enabled)===!0})();return ev({connected:e.connected,wsProps:sn(e),publicChatEnabled:v,publicChatAccountId:e.selectedWorkspace??void 0,sessionKey:e.sessionKey,onSessionKeyChange:f=>{e.sessionKey=f,e.chatMessage="",e.chatAttachments=[],e.chatStream=null,e.chatInterimText=null,e.chatSuggestion=null,e.chatStreamStartedAt=null,e.chatRunId=null,e.chatQueue=[],e.resetToolStream(),e.resetChatScroll(),e.applySettings({...e.settings,sessionKey:f,lastActiveSessionKey:f}),e.loadAssistantIdentity(),Me(e),Ds(e)},thinkingLevel:e.chatThinkingLevel,showThinking:e.settings.chatShowThinking??!1,modelProvider:e.chatModelProvider,model:e.chatModel,modelCatalog:e.chatModelCatalog,onModelChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{model:f}).then(()=>{Me(e,{limit:b})})},onThinkingLevelChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{thinkingLevel:f==="off"?null:f}).then(()=>{Me(e,{limit:b})})},verboseLevel:e.chatVerboseLevel,fillerEnabled:e.chatFillerEnabled,suggestion:e.chatSuggestion,onSuggestionClick:f=>{e.chatMessage=f,e.chatSuggestion=null,e.handleSendChat()},onVerboseChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{verboseLevel:f==="off"?null:f}).then(()=>{Me(e,{limit:b})})},onFillerChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{fillerEnabled:f}).then(()=>{Me(e,{limit:b})})},loading:e.chatLoading,sending:e.chatSending,compactionStatus:e.compactionStatus,assistantAvatarUrl:h,messages:e.chatMessages,toolMessages:e.chatToolMessages,stream:e.chatStream,streamStartedAt:e.chatStreamStartedAt,interimText:e.chatInterimText,draft:e.chatMessage,queue:e.chatQueue,canSend:e.connected,disabledReason:l,error:e.lastError,sessions:e.sessionsResult,focusMode:!1,onRefresh:()=>{e.resetToolStream();const f=Math.max(e.chatMessages.length+10,Pe);return Promise.all([Me(e,{limit:f}),Ds(e)])},onToggleFocusMode:()=>{},onChatScroll:f=>e.handleChatScroll(f),nearBottom:e.chatUserNearBottom,hasMore:e.chatHistoryHasMore,loadingOlder:e.chatLoadingOlder,onLoadOlder:()=>{e.handleLoadOlderChat()},onDraftChange:f=>e.chatMessage=f,attachments:e.chatAttachments,onAttachmentsChange:f=>e.chatAttachments=f,onSend:()=>e.handleSendChat(),canAbort:!!e.chatRunId,onAbort:()=>{e.handleAbortChat()},onQueueRemove:f=>e.removeQueuedMessage(f),onNewSession:()=>e.handleSendChat("/new",{restoreDraft:!0}),sidebarOpen:e.sidebarOpen,sidebarContent:e.sidebarContent,sidebarError:e.sidebarError,splitRatio:e.splitRatio,onOpenSidebar:f=>e.handleOpenSidebar(f),onCloseSidebar:()=>e.handleCloseSidebar(),onSplitRatioChange:f=>e.handleSplitRatioChange(f),assistantName:e.assistantName,assistantAvatar:e.assistantAvatar})}return e.advancedPage?Mv({connected:e.connected,wsProps:sn(e),activeTab:e.advancedTab,onTabChange:l=>{e.advancedTab=l,l==="cron"&&e.loadCron(),l==="skills"&&ft(e,{clearMessages:!0}),l==="logs"&&(e.logsSubTab==="session"?un(e,{reset:!0}):Pt(e,{reset:!0}))},cronProps:{loading:e.cronLoading,status:e.cronStatus,jobs:e.cronJobs,error:e.cronError,busy:e.cronBusy,form:e.cronForm,channels:(r=(o=e.channelsSnapshot)==null?void 0:o.channelMeta)!=null&&r.length?e.channelsSnapshot.channelMeta.map(l=>l.id):((a=e.channelsSnapshot)==null?void 0:a.channelOrder)??[],channelLabels:((u=e.channelsSnapshot)==null?void 0:u.channelLabels)??{},channelMeta:((c=e.channelsSnapshot)==null?void 0:c.channelMeta)??[],agentIds:(()=>{var d;const l=oe(e);return((d=l==null?void 0:l.agents)==null?void 0:d.map(h=>h.id))??[]})(),runsJobId:e.cronRunsJobId,runs:e.cronRuns,newEventModalOpen:e.cronNewEventModal,onNewEventModalOpen:()=>{e.cronNewEventModal=!0},onNewEventModalClose:()=>{e.cronNewEventModal=!1},detailJobId:e.cronDetailJobId,onDetailOpen:l=>{e.cronDetailJobId=l.id,Ps(e,l.id)},onDetailClose:()=>{e.cronDetailJobId=null},onFormChange:l=>e.cronForm={...e.cronForm,...l},onRefresh:()=>e.loadCron(),onAdd:()=>{rp(e).then(()=>{e.cronNewEventModal=!1})},onToggle:(l,d)=>ap(e,l,d),onRun:l=>lp(e,l),onRemove:l=>cp(e,l),onLoadRuns:l=>Ps(e,l)},skillsProps:{loading:e.skillsLoading,report:e.skillsReport,error:e.skillsError,filter:e.skillsFilter,edits:e.skillEdits,messages:e.skillMessages,busyKey:e.skillsBusyKey,onFilterChange:l=>e.skillsFilter=l,onRefresh:()=>ft(e,{clearMessages:!0}),onToggle:(l,d)=>Yl(e,l,d),onEdit:(l,d)=>Ql(e,l,d),onSaveKey:l=>Xl(e,l),onInstall:(l,d,h)=>Zl(e,l,d,h)},logsProps:{logsSubTab:e.logsSubTab,onSubTabChange:l=>{e.logsSubTab=l,l==="session"?un(e,{reset:!0}):Pt(e,{reset:!0})},sessionLogsProps:{loading:e.sessionLogsLoading,error:e.sessionLogsError,entries:e.sessionLogsEntries,agents:e.sessionLogsAgents,filterText:e.sessionLogsFilterText,typeFilters:e.sessionLogsTypeFilters,agentFilters:e.sessionLogsAgentFilters,autoFollow:e.sessionLogsAutoFollow,onFilterTextChange:l=>e.sessionLogsFilterText=l,onTypeToggle:(l,d)=>{const h=e;h.sessionLogsTypeFilters={...h.sessionLogsTypeFilters,[l]:d}},onAgentToggle:(l,d)=>{const h=e;h.sessionLogsAgentFilters={...h.sessionLogsAgentFilters,[l]:d}},onToggleAutoFollow:l=>e.sessionLogsAutoFollow=l,onRefresh:()=>{un(e,{reset:!0})},onExport:(l,d)=>e.exportSessionLogs(l,d),onScroll:l=>e.handleSessionLogsScroll(l)},loading:e.logsLoading,error:e.logsError,file:e.logsFile,entries:e.logsEntries,filterText:e.logsFilterText,levelFilters:e.logsLevelFilters,autoFollow:e.logsAutoFollow,truncated:e.logsTruncated,onFilterTextChange:l=>e.logsFilterText=l,onLevelToggle:(l,d)=>{e.logsLevelFilters={...e.logsLevelFilters,[l]:d}},onToggleAutoFollow:l=>e.logsAutoFollow=l,onRefresh:()=>Pt(e,{reset:!0}),onExport:(l,d)=>e.exportSessionLogs(l,d),onScroll:l=>e.handleLogsScroll(l)}}):(window.location.replace("/chat"),p``)}function Ib(e){const t=new Date(e),n=t.toLocaleDateString("en-GB",{day:"2-digit",month:"short"}),i=t.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"});return`${n} ${i}`}function tl(e){return e.startsWith("memory/public/")?"public":e.startsWith("memory/shared/")?"shared":"other"}function Rb(e,t,n){return p`
3519
+ `;if(e.connected&&e.accessState.checked){const{accessState:l}=e;if(l.hasPins&&!l.authenticated)return za({show:!0,isFirstTime:!1,accounts:l.accounts,error:l.error,busy:l.busy,onSubmit:(d,h)=>{h!=null&&e.handlePinSubmit(d,h)},changePinMode:e.loginChangePinMode,onToggleChangePinMode:()=>e.toggleChangePinMode(),changePinBusy:e.changePinBusy,changePinError:e.changePinError,changePinSuccess:e.changePinSuccess,onChangePin:(d,h,v)=>e.handleChangePin(d,h,v)});if(!l.hasMasterPin&&!l.authenticated&&e.setup)return za({show:!0,isFirstTime:!0,accounts:[],error:l.error,busy:l.busy,onSubmit:d=>e.handleSetMasterPin(d)});if(!l.hasMasterPin&&!l.authenticated&&!e.setup)return window.location.href="/setup",k}if(e.setup){const l=_b(e.channelsSnapshot),d=((n=(t=e.channelsSnapshot)==null?void 0:t.channelAccounts)==null?void 0:n.whatsapp)??[],h=Mb(e.channelsSnapshot),v=Pb(e);return gf({connected:e.connected,serverPlatform:((s=(i=e.hello)==null?void 0:i.server)==null?void 0:s.platform)??null,assistantName:e.assistantName,currentStep:e.setupStep,licenseKey:e.licenseKey,licenseBusy:e.licenseBusy,licenseValid:e.licenseValid,licenseMessage:e.licenseMessage,licenseTier:e.licenseTier,licenseDeviceId:e.licenseDeviceId,licenseStoredKey:e.licenseStoredKey,onLicenseKeyChange:f=>e.handleLicenseKeyChange(f),onLicenseActivate:()=>e.handleLicenseActivate(),onLicenseRemove:async()=>{await e.handleLicenseRemove(),e.licenseRemoveConfirm=!1},licenseRemoveConfirm:e.licenseRemoveConfirm,onLicenseRemoveConfirm:()=>{e.licenseRemoveConfirm=!0},onLicenseRemoveCancel:()=>{e.licenseRemoveConfirm=!1},authConnected:e.authConnected,authBusy:e.authBusy,authMessage:e.authMessage,authUrl:e.authUrl,authCodeInput:e.authCodeInput,authExpiresIn:e.authExpiresIn,whatsappBusy:e.whatsappBusy,whatsappLoginMessage:e.whatsappLoginMessage,whatsappLoginQrDataUrl:e.whatsappLoginQrDataUrl,whatsappLoginConnected:e.whatsappLoginConnected,whatsappChannelStatus:l,whatsappAccounts:d,whatsappActiveQrAccountId:e.whatsappActiveQrAccountId,whatsappAccountSaving:e.whatsappAccountSaving,gatewayHealthy:e.gatewayHealthy,gatewayHealthLoading:e.gatewayHealthLoading,gatewayHealthMessage:e.gatewayHealthMessage,gatewayRestartBusy:e.gatewayRestartBusy,updateAvailable:e.updateAvailable,currentVersion:e.currentVersion,latestVersion:e.latestVersion,updateChecking:e.updateChecking,updateRunning:e.updateRunning,updateMessage:e.updateMessage,updateProgressSteps:e.updateProgressSteps,updateLastResult:e.updateLastResult,onUpdateCheck:()=>e.handleUpdateCheck(),onUpdateRun:()=>e.handleUpdateRun(),onUpdateDismissResult:()=>e.handleUpdateDismissResult(),uninstallConfirm:e.uninstallConfirm,uninstallBusy:e.uninstallBusy,uninstallDone:e.uninstallDone,uninstallError:e.uninstallError,uninstallConfirmText:e.uninstallConfirmText,onUninstallConfirm:()=>e.handleUninstallConfirm(),onUninstallCancel:()=>e.handleUninstallCancel(),onUninstallConfirmTextChange:f=>e.handleUninstallConfirmTextChange(f),onUninstallRun:()=>e.handleUninstallRun(),onUninstallDismiss:()=>e.handleUninstallDismiss(),onStartAuth:()=>e.handleAuthStart(),onSubmitAuthCode:f=>e.handleAuthSubmitCode(f),onAuthCodeChange:f=>e.handleAuthCodeChange(f),onSkipToWhatsApp:()=>e.handleSkipToWhatsApp(),onWhatsAppRelink:async f=>{await e.handleWhatsAppStart(!0,f),e.whatsappLoginQrDataUrl&&(await e.handleWhatsAppWait(f),await G(e,!0),e.requestUpdate())},onWhatsAppUnlink:async f=>{await e.handleWhatsAppLogout(f)},onWhatsAppReset:async f=>{await e.handleWhatsAppLogout(f),await e.handleWhatsAppStart(!0,f),e.whatsappLoginQrDataUrl&&(await e.handleWhatsAppWait(f),await G(e,!0),e.requestUpdate())},onRefreshStatus:async()=>{await G(e,!0),await e.handleGatewayHealthCheck()},onWhatsAppBack:()=>{e.whatsappLoginQrDataUrl=null,e.whatsappLoginMessage=null,e.whatsappLoginConnected=null,e.whatsappActiveQrAccountId=null,e.requestUpdate(),G(e,!0)},onRestartGateway:()=>e.handleGatewayRestart(),onRemoveWhatsAppAccount:f=>e.handleRemoveWhatsAppAccount(f),workspaces:e.workspaces,workspacesLoading:e.workspacesLoading,workspacesError:e.workspacesError,addingWorkspace:e.addingWorkspace,newWorkspaceName:e.newWorkspaceName,newWorkspacePath:e.newWorkspacePath,workspaceSaving:e.workspaceSaving,workspaceRemoveConfirm:e.workspaceRemoveConfirm,newWorkspacePin:e.newWorkspacePin,onSetNewWorkspacePin:f=>{e.newWorkspacePin=f},onWorkspaceCreate:async(f,b)=>{const S=e.newWorkspacePin;await e.handleWorkspaceCreate(f,b),S.match(/^\d{4,6}$/)&&(await yb(e,f,S),e.newWorkspacePin="")},onWorkspaceRemove:f=>e.handleWorkspaceRemove(f),onSetAddingWorkspace:f=>{e.addingWorkspace=f},onSetNewWorkspaceName:f=>{e.newWorkspaceName=f},onSetNewWorkspacePath:f=>{e.newWorkspacePath=f},onSetWorkspaceRemoveConfirm:f=>{e.workspaceRemoveConfirm=f},renamingWorkspace:e.renamingWorkspace,renameWorkspaceName:e.renameWorkspaceName,onWorkspaceRenameStart:()=>e.handleWorkspaceRenameStart(),onWorkspaceRenameCancel:()=>e.handleWorkspaceRenameCancel(),onWorkspaceRename:(f,b)=>e.handleWorkspaceRename(f,b),whatsappDmPolicy:(()=>{const f=oe(e),b=f==null?void 0:f.whatsappAccountId,S=b?d.find($=>$.accountId===b):d[0];return(S==null?void 0:S.dmPolicy)??null})(),onWhatsAppDmToggle:async()=>{var T;const f=oe(e),b=f==null?void 0:f.whatsappAccountId,S=b?d.find(M=>M.accountId===b):d[0];if(!S)return;const A=S.dmPolicy!=null&&S.dmPolicy!=="disabled"?"disabled":"open",C=A==="open"?{dmPolicy:A,allowFrom:["*"]}:{dmPolicy:A};try{const M=await e.client.request("config.get"),R=M.config,B=(T=R==null?void 0:R.channels)==null?void 0:T.whatsapp,me=((B==null?void 0:B.accounts)??{})[S.accountId]?{channels:{whatsapp:{accounts:{[S.accountId]:C}}}}:{channels:{whatsapp:C}};await e.client.request("config.patch",{raw:JSON.stringify(me),baseHash:M.hash,note:`WhatsApp DM policy → ${A}`,skipRestart:!0}),await G(e,!1)}catch(M){console.error("DM toggle failed:",M)}},whatsappModel:(()=>{var T,M;const f=oe(e);if(!f)return null;const b=f.agents.find(R=>R.id.endsWith("-public")||R.id==="public");if(!b)return null;const S=(T=e.configSnapshot)==null?void 0:T.config,$=(M=S==null?void 0:S.agents)==null?void 0:M.list;if(!Array.isArray($))return null;const A=$.find(R=>R.id===b.id);if(!(A!=null&&A.model))return null;const C=typeof A.model=="string"?A.model:A.model.primary;return(C==null?void 0:C.trim())||null})(),whatsappModelCatalog:e.chatModelCatalog??[],onWhatsAppModelChange:async f=>{const b=oe(e);if(!b)return;const S=b.agents.find($=>$.id.endsWith("-public")||$.id==="public");if(S)try{const $=await e.client.request("config.get"),A=$.config,C=(A==null?void 0:A.agents)??{},T=Array.isArray(C.list)?[...C.list]:[],M=T.findIndex(B=>B.id===S.id);if(f)M>=0?T[M]={...T[M],model:f}:T.push({id:S.id,model:f});else if(M>=0){const{model:B,...ee}=T[M];Object.keys(ee).length<=1?T.splice(M,1):T[M]=ee}const R=T.length>0?{agents:{list:T}}:{agents:{list:null}};await e.client.request("config.patch",{raw:JSON.stringify(R),baseHash:$.hash,note:`Public agent model → ${f||"default"}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch($){console.error("Model change failed:",$)}},whatsappThinkingLevel:(()=>{var C,T,M;const f=oe(e);if(!f)return null;const b=f.agents.find(R=>R.id.endsWith("-public")||R.id==="public");if(!b)return null;const S=(C=e.configSnapshot)==null?void 0:C.config,$=(T=S==null?void 0:S.agents)==null?void 0:T.list;if(!Array.isArray($))return null;const A=$.find(R=>R.id===b.id);return((M=A==null?void 0:A.thinkingLevel)==null?void 0:M.trim())||null})(),onWhatsAppThinkingChange:async f=>{const b=oe(e);if(!b)return;const S=b.agents.find($=>$.id.endsWith("-public")||$.id==="public");if(S)try{const $=await e.client.request("config.get"),A=$.config,C=(A==null?void 0:A.agents)??{},T=Array.isArray(C.list)?[...C.list]:[],M=T.findIndex(ee=>ee.id===S.id),R=f==="off"?void 0:f;if(R)M>=0?T[M]={...T[M],thinkingLevel:R}:T.push({id:S.id,thinkingLevel:R});else if(M>=0){const{thinkingLevel:ee,...me}=T[M];Object.keys(me).length<=1?T.splice(M,1):T[M]=me}const B=T.length>0?{agents:{list:T}}:{agents:{list:null}};await e.client.request("config.patch",{raw:JSON.stringify(B),baseHash:$.hash,note:`Public agent thinking → ${R||"default"}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch($){console.error("Thinking change failed:",$)}},whatsappGroupPolicy:(()=>{var M,R;const f=(M=e.configSnapshot)==null?void 0:M.config,b=(R=f==null?void 0:f.channels)==null?void 0:R.whatsapp,S=oe(e),$=S==null?void 0:S.whatsappAccountId,A=(b==null?void 0:b.accounts)??{},C=$?A[$]:void 0;return(C==null?void 0:C.groupPolicy)??(b==null?void 0:b.groupPolicy)??"allowlist"})(),whatsappGroupRequireMention:(()=>{var R,B;const f=(R=e.configSnapshot)==null?void 0:R.config,b=(B=f==null?void 0:f.channels)==null?void 0:B.whatsapp,S=oe(e),$=S==null?void 0:S.whatsappAccountId,A=(b==null?void 0:b.accounts)??{},C=$?A[$]:void 0,M=((C==null?void 0:C.groups)??(b==null?void 0:b.groups)??{})["*"];return(M==null?void 0:M.requireMention)!==!1})(),onWhatsAppGroupToggle:async()=>{var S;const f=oe(e),b=f==null?void 0:f.whatsappAccountId;try{const $=await e.client.request("config.get"),A=$.config,C=((S=A==null?void 0:A.channels)==null?void 0:S.whatsapp)??{},T=C.accounts??{},M=b?T[b]:void 0,R=(M==null?void 0:M.groupPolicy)??C.groupPolicy??"allowlist",B=R==="disabled"||R==="allowlist",ee=B?"open":"disabled",me=B?{"*":{}}:void 0,Ke={groupPolicy:ee};me&&(Ke.groups=me);const Z=M?{channels:{whatsapp:{accounts:{[b]:Ke}}}}:{channels:{whatsapp:Ke}};await e.client.request("config.patch",{raw:JSON.stringify(Z),baseHash:$.hash,note:`WhatsApp groups → ${ee}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch($){console.error("Group toggle failed:",$)}},onWhatsAppGroupMentionChange:async f=>{var $;const b=oe(e),S=b==null?void 0:b.whatsappAccountId;try{const A=await e.client.request("config.get"),C=A.config,M=((($=C==null?void 0:C.channels)==null?void 0:$.whatsapp)??{}).accounts??{},R=S?M[S]:void 0,B={"*":{requireMention:f}},ee=R?{channels:{whatsapp:{accounts:{[S]:{groups:B}}}}}:{channels:{whatsapp:{groups:B}}};await e.client.request("config.patch",{raw:JSON.stringify(ee),baseHash:A.hash,note:`WhatsApp group mention → ${f?"when mentioned":"always"}`,skipRestart:!0}),e.configSnapshot=await e.client.request("config.get")}catch(A){console.error("Group mention change failed:",A)}},whatsappSettingsOpen:e.whatsappSettingsOpen??!1,onWhatsAppSettingsOpen:()=>{e.whatsappSettingsOpen=!0},onWhatsAppSettingsClose:()=>{e.whatsappSettingsOpen=!1},imessageConfigured:h.configured,imessageRunning:h.running,imessageConnected:h.connected,imessageLastError:h.lastError,imessageSelfChatMode:h.selfChatMode,imessageCliPath:h.cliPath,imessageEnabling:e.imessageEnabling,imessageEnableConfirm:e.imessageEnableConfirm,imessageOwnerWorkspace:v,onIMessageEnable:()=>{e.imessageEnableConfirm=!0},onIMessageEnableConfirm:async()=>{e.imessageEnabling=!0;try{const f=await e.client.request("config.get"),b=f.config,S=(b==null?void 0:b.bindings)??[],$=oe(e),A=$==null?void 0:$.agents.find(B=>B.id.endsWith("-admin")||B.id==="admin"),C=(A==null?void 0:A.id)??"admin",T=S.filter(B=>{var ee;return((ee=B.match)==null?void 0:ee.channel)!=="imessage"}),M=[{agentId:C,match:{channel:"imessage",peer:{kind:"dm",id:"__self__"}},meta:{imessageOwner:!0}}],R=[...T,...M];await e.client.request("config.patch",{raw:JSON.stringify({channels:{imessage:{selfChatMode:!0,dmPolicy:"disabled",allowFrom:["*"]}},bindings:R}),baseHash:f.hash,note:"Enable iMessage (self-chat) for "+(($==null?void 0:$.name)??"default")}),e.imessageEnableConfirm=!1,setTimeout(()=>{Promise.all([G(e,!0),Le(e)]).then(()=>{e.imessageEnabling=!1})},3e3)}catch{e.imessageEnabling=!1}},onIMessageEnableCancel:()=>{e.imessageEnableConfirm=!1},onIMessageProbe:async()=>{e.imessageEnabling=!0,e.requestUpdate();try{await G(e,!0)}finally{e.imessageEnabling=!1}},onIMessageDisconnect:async()=>{e.imessageEnabling=!0;try{const f=await e.client.request("config.get"),b=f.config,$=((b==null?void 0:b.bindings)??[]).filter(A=>{var C;return((C=A.match)==null?void 0:C.channel)!=="imessage"});await e.client.request("config.patch",{raw:JSON.stringify({channels:{imessage:{selfChatMode:!1,dmPolicy:"disabled"}},bindings:$}),baseHash:f.hash,note:"Disconnect iMessage"}),e.imessageEnableConfirm=!1,setTimeout(()=>{Promise.all([G(e,!0),Le(e)]).then(()=>{e.imessageEnabling=!1})},3e3)}catch{e.imessageEnabling=!1}},onIMessageReassign:async()=>{e.imessageEnabling=!0;try{const f=await e.client.request("config.get"),b=f.config,S=(b==null?void 0:b.bindings)??[],$=oe(e),A=$==null?void 0:$.agents.find(R=>R.id.endsWith("-admin")||R.id==="admin"),C=(A==null?void 0:A.id)??"admin",T=S.filter(R=>{var B;return((B=R.match)==null?void 0:B.channel)!=="imessage"}),M=[{agentId:C,match:{channel:"imessage",peer:{kind:"dm",id:"__self__"}},meta:{imessageOwner:!0}}];await e.client.request("config.patch",{raw:JSON.stringify({channels:{imessage:{selfChatMode:!0,dmPolicy:"disabled",allowFrom:["*"]}},bindings:[...T,...M]}),baseHash:f.hash,note:"Reassign iMessage to "+(($==null?void 0:$.name)??"default")}),e.imessageEnableConfirm=!1,setTimeout(()=>{Promise.all([G(e,!0),Le(e)]).then(()=>{e.imessageEnabling=!1})},3e3)}catch{e.imessageEnabling=!1}},infoModalOpen:e.infoModalOpen,onInfoModalOpen:f=>{e.infoModalOpen=f},onInfoModalClose:()=>{e.infoModalOpen=null},isMaster:e.accessState.master,apiKeyProviders:e.apiKeyProviders,apiKeyModalOpen:e.apiKeyModalOpen,apiKeyBusy:e.apiKeyBusy,apiKeyError:e.apiKeyError,apiKeySuccess:e.apiKeySuccess,apiKeySavingProvider:e.apiKeySavingProvider,onApiKeyModalOpen:()=>{e.apiKeyModalOpen=!0,e.apiKeyError=null,e.apiKeySuccess=null,e.apiKeySavingProvider=null},onApiKeyModalClose:()=>{e.apiKeyModalOpen=!1,e.apiKeyError=null,e.apiKeySuccess=null,e.apiKeySavingProvider=null},onApiKeySave:async(f,b)=>{e.apiKeySavingProvider=f,e.apiKeyBusy=!0,e.apiKeyError=null,e.apiKeySuccess=null;try{await qa(e.client,f,b);const S=`${f} key saved`;e.apiKeySuccess=S,e.apiKeySavingProvider=null;try{e.apiKeyProviders=await eo(e.client)}catch{}f==="anthropic"&&await e.handleAuthStatusCheck(),setTimeout(()=>{e.apiKeySuccess===S&&(e.apiKeySuccess=null)},2500)}catch(S){e.apiKeyError=S instanceof Error?S.message:"Failed to save key",e.apiKeySavingProvider=null}finally{e.apiKeyBusy=!1}},onApiKeyRemove:async f=>{e.apiKeySavingProvider=f,e.apiKeyBusy=!0,e.apiKeyError=null,e.apiKeySuccess=null;try{await Xv(e.client,f);const b=`${f} key removed`;e.apiKeySuccess=b,e.apiKeySavingProvider=null;try{e.apiKeyProviders=await eo(e.client)}catch{}setTimeout(()=>{e.apiKeySuccess===b&&(e.apiKeySuccess=null)},2500)}catch(b){e.apiKeyError=b instanceof Error?b.message:"Failed to remove key",e.apiKeySavingProvider=null}finally{e.apiKeyBusy=!1}},authApiKeyMode:e.authApiKeyMode,authApiKeyInput:e.authApiKeyInput,authApiKeyBusy:e.authApiKeyBusy,authApiKeyError:e.authApiKeyError,onAuthApiKeyToggle:()=>{e.authApiKeyMode=!e.authApiKeyMode,e.authApiKeyError=null},onAuthApiKeyChange:f=>{e.authApiKeyInput=f},onAuthApiKeySubmit:async()=>{const f=e.authApiKeyInput.trim();if(f){e.authApiKeyBusy=!0,e.authApiKeyError=null;try{await qa(e.client,"anthropic",f),await e.handleAuthStatusCheck(),e.authApiKeyMode=!1,e.authApiKeyInput=""}catch(b){e.authApiKeyError=b instanceof Error?b.message:"Failed to save API key"}finally{e.authApiKeyBusy=!1}}},accountHasPin:(()=>{var b;const f=e.selectedWorkspace??((b=e.workspaces[0])==null?void 0:b.name);return f?e.accessState.accounts.some(S=>S.id===f):!1})(),accountPinModalOpen:e.accountPinModalOpen,accountPinBusy:e.accountPinBusy,accountPinError:e.accountPinError,accountPinSuccess:e.accountPinSuccess,onAccountPinModalOpen:()=>{e.accountPinModalOpen=!0,e.accountPinError=null,e.accountPinSuccess=null},onAccountPinModalClose:()=>{e.accountPinModalOpen=!1,e.accountPinError=null,e.accountPinSuccess=null},onAccountPinSave:(f,b)=>{var $;const S=e.selectedWorkspace??(($=e.workspaces[0])==null?void 0:$.name);S&&e.handleAccountPinSave(S,f,b)},publicChatEnabled:(()=>{var S;const f=(S=e.configSnapshot)==null?void 0:S.config,b=f==null?void 0:f.publicChat;return(b==null?void 0:b.enabled)===!0})(),publicChatAuthMode:(()=>{var $;const f=($=e.configSnapshot)==null?void 0:$.config,b=f==null?void 0:f.publicChat,S=b==null?void 0:b.auth;return S==="verified"||S==="choice"?S:"anonymous"})(),publicChatBusy:e.publicChatToggleBusy,onPublicChatToggle:async()=>{var f;if(!e.publicChatToggleBusy){e.publicChatToggleBusy=!0;try{const b=await e.client.request("config.get"),S=b.config,$=((f=S==null?void 0:S.publicChat)==null?void 0:f.enabled)===!0;await e.client.request("config.patch",{raw:JSON.stringify({publicChat:{enabled:!$}}),baseHash:b.hash,note:`Public chat → ${$?"disabled":"enabled"}`}),e.configSnapshot=await e.client.request("config.get")}catch(b){console.error("Public chat toggle failed:",b)}finally{e.publicChatToggleBusy=!1}}},onPublicChatAuthModeChange:async f=>{if(!e.publicChatToggleBusy){e.publicChatToggleBusy=!0;try{const b=await e.client.request("config.get");await e.client.request("config.patch",{raw:JSON.stringify({publicChat:{auth:f}}),baseHash:b.hash,note:`Public chat auth → ${f}`}),e.configSnapshot=await e.client.request("config.get")}catch(b){console.error("Public chat auth mode change failed:",b)}finally{e.publicChatToggleBusy=!1}}},tailscaleStatus:e.tailscaleStatus,tailscaleBusy:e.tailscaleBusy,tailscaleAuthUrl:e.tailscaleAuthUrl,tailscaleError:e.tailscaleError,tailscaleFunnelEnableUrl:e.tailscaleFunnelEnableUrl,onTailscaleEnable:async()=>{if(!e.tailscaleBusy){e.tailscaleBusy=!0,e.tailscaleAuthUrl=null;try{const f=await e.client.request("tailscale.enable");if(f.authUrl){e.tailscaleAuthUrl=f.authUrl;const b=setInterval(async()=>{try{const S=await e.client.request("tailscale.status");e.tailscaleStatus=S,S.loggedIn&&(clearInterval(b),e.tailscaleAuthUrl=null,e.tailscaleBusy=!1)}catch{}},3e3);setTimeout(()=>{clearInterval(b),e.tailscaleBusy&&(e.tailscaleBusy=!1)},3e5)}else f.alreadyLoggedIn&&(e.tailscaleStatus=await e.client.request("tailscale.status")),e.tailscaleBusy=!1}catch(f){console.error("Tailscale enable failed:",f),e.tailscaleBusy=!1}}},onTailscaleFunnelEnable:async()=>{var f;if(!e.tailscaleBusy){e.tailscaleBusy=!0,e.tailscaleError=null,e.tailscaleFunnelEnableUrl=null;try{await e.client.request("tailscale.funnel.enable")}catch(b){console.error("Tailscale funnel enable failed:",b);const S=b;(f=S.payload)!=null&&f.enableUrl&&(e.tailscaleFunnelEnableUrl=S.payload.enableUrl),e.tailscaleError=S.message||"Failed to enable Funnel",e.tailscaleBusy=!1}}},onTailscaleFunnelDisable:async()=>{if(!e.tailscaleBusy){e.tailscaleBusy=!0;try{await e.client.request("tailscale.funnel.disable")}catch(f){console.error("Tailscale funnel disable failed:",f),e.tailscaleBusy=!1}}},wifiStatus:e.wifiStatus,wifiNetworks:e.wifiNetworks,wifiBusy:e.wifiBusy,wifiError:e.wifiError,wifiPassword:e.wifiPassword,wifiSelectedSsid:e.wifiSelectedSsid,onWifiScan:async()=>{if(!e.wifiBusy){e.wifiBusy=!0,e.wifiError=null;try{const[f,b]=await Promise.all([e.client.request("wifi.scan"),e.client.request("wifi.status")]);e.wifiNetworks=f.networks,e.wifiStatus=b}catch(f){console.error("WiFi scan failed:",f),e.wifiError=f.message||"Failed to scan networks"}finally{e.wifiBusy=!1}}},onWifiConnect:async()=>{if(e.wifiBusy||!e.wifiSelectedSsid)return;const f=e.wifiSelectedSsid;e.wifiBusy=!0,e.wifiError=null;try{const b=await e.client.request("wifi.connect",{ssid:f,password:e.wifiPassword});e.wifiPassword="",e.wifiSelectedSsid=null,e.wifiNetworks=[],e.wifiStatus={available:!0,connected:b.connected,ssid:b.ssid,signal:null,ip:b.ip,savedSsid:b.ssid,autoconnect:!0},e.wifiBusy=!1;try{const S=await e.client.request("wifi.status");e.wifiStatus=S}catch{}}catch(b){console.error("WiFi connect failed:",b),e.wifiError=b.message||"Failed to connect",e.wifiBusy=!1}},onWifiDisconnect:async()=>{if(!e.wifiBusy){e.wifiBusy=!0,e.wifiError=null;try{await e.client.request("wifi.disconnect"),e.wifiNetworks=[],e.wifiSelectedSsid=null,e.wifiPassword="";const f=await e.client.request("wifi.status");e.wifiStatus=f}catch(f){console.error("WiFi disconnect failed:",f),e.wifiError=f.message||"Failed to disconnect"}finally{e.wifiBusy=!1}}},onWifiReconnect:async()=>{var f;if(!e.wifiBusy){(f=e.wifiStatus)==null||f.savedSsid,e.wifiBusy=!0,e.wifiError=null;try{const b=await e.client.request("wifi.reconnect");e.wifiNetworks=[],e.wifiSelectedSsid=null,e.wifiStatus={available:!0,connected:b.connected,ssid:b.ssid,signal:null,ip:b.ip,savedSsid:b.ssid,autoconnect:!0},e.wifiBusy=!1;try{const S=await e.client.request("wifi.status");e.wifiStatus=S}catch{}}catch(b){console.error("WiFi reconnect failed:",b),e.wifiError=b.message||"Failed to reconnect",e.wifiBusy=!1}}},onWifiForget:async()=>{if(!e.wifiBusy){e.wifiBusy=!0,e.wifiError=null;try{await e.client.request("wifi.forget"),e.wifiNetworks=[],e.wifiSelectedSsid=null,e.wifiPassword="";const f=await e.client.request("wifi.status");e.wifiStatus=f}catch(f){console.error("WiFi forget failed:",f),e.wifiError=f.message||"Failed to forget network"}finally{e.wifiBusy=!1}}},onWifiDismiss:()=>{e.wifiNetworks=[],e.wifiSelectedSsid=null,e.wifiPassword="",e.wifiError=null},onWifiSelectSsid:f=>{e.wifiSelectedSsid=f,e.wifiPassword="",e.wifiError=null},onWifiPasswordChange:f=>{e.wifiPassword=f},wsProps:Sb(e)})}if(e.filesPage){const l=Ab(e);return Jh({connected:e.connected,wsProps:sn(e),loading:e.filesLoading,tree:e.filesTree,root:e.filesRoot,error:e.filesError,selectedPath:e.filesSelectedPath,selectedPaths:e.filesSelectedPaths,previewContent:e.filesPreviewContent,previewLoading:e.filesPreviewLoading,previewBinary:e.filesPreviewBinary,previewSize:e.filesPreviewSize,expandedDirs:e.filesExpandedDirs,currentDir:e.filesCurrentDir,message:e.filesMessage,uploadBusy:e.filesUploadBusy,reindexBusy:e.filesReindexBusy,memoryStatus:e.filesMemoryStatus,onRefresh:()=>Ut(e,l),onReindex:()=>dh(e,l),onSelectFile:d=>{e.filesPendingDeletePath=null,ih(e,d,l)},onToggleSelectFile:d=>sh(e,d,l),onToggleDir:d=>ph(e,d),onUpload:(d,h)=>ah(e,d,h,l),onNewFolder:(d,h)=>lh(e,d,h,l),onDownload:d=>oc(e,d,l),onBulkDownload:()=>oh(e,l),onDelete:d=>{e.filesPendingDeletePath=null,ch(e,d,l)},pendingDeletePath:e.filesPendingDeletePath,onArmDelete:d=>{e.filesPendingDeletePath=d||null},onMoveToDir:(d,h)=>rh(e,d,h,l),searchQuery:e.filesSearchQuery,searchResults:e.filesSearchResults,searchLoading:e.filesSearchLoading,searchAgentId:e.filesSearchAgentId,agentIds:e.workspaceAgentIds??[],onSearch:d=>{const h=e.filesSearchAgentId??l;hh(e,d,h)},onSearchAgentChange:d=>{e.filesSearchAgentId=d},onSearchClear:()=>{fh(e)},onSearchQueryChange:d=>{e.filesSearchQuery=d}})}if(e.browserPage)return Vh({connected:e.connected,active:e.browserScreencastActive,loading:e.browserLoading,error:e.browserError,inputMode:e.browserInputMode,fullscreen:e.browserFullscreen,handoffPending:e.browserHandoffPending,handoffReason:e.browserHandoffReason,onStart:()=>zv(e),onStop:()=>jv(e),onToggleInput:()=>qv(e),onToggleFullscreen:()=>Vv(e),onCompleteHandoff:()=>Hv(e),onCanvasMouseDown:l=>{const h=l.target.getBoundingClientRect(),f=hn().translateCoordinates(l.clientX-h.left,l.clientY-h.top);xs(e,"mousePressed",f.x,f.y,l.button===2?"right":l.button===1?"middle":"left")},onCanvasMouseUp:l=>{const h=l.target.getBoundingClientRect(),f=hn().translateCoordinates(l.clientX-h.left,l.clientY-h.top);xs(e,"mouseReleased",f.x,f.y)},onCanvasMouseMove:l=>{const d=hn();if(d.shouldThrottleMouseMove())return;const v=l.target.getBoundingClientRect(),f=d.translateCoordinates(l.clientX-v.left,l.clientY-v.top);xs(e,"mouseMoved",f.x,f.y)},onCanvasKeyDown:l=>{let d=0;l.altKey&&(d|=1),l.ctrlKey&&(d|=2),l.metaKey&&(d|=4),l.shiftKey&&(d|=8),$s(e,"keyDown",l.key,{code:l.code,modifiers:d||void 0}),l.key.length===1&&$s(e,"char",l.key,{text:l.key})},onCanvasKeyUp:l=>{$s(e,"keyUp",l.key,{code:l.code})}});if(e.adminsPage){const l=xb(e),d=$b(e);return yf({connected:e.connected,wsProps:sn(e),loading:e.adminsLoading,saving:e.adminsSaving,phones:e.adminPhones,error:e.adminsError,newPhone:e.adminsNewPhone,onRefresh:()=>Ii(e,l),onAdd:h=>{xu(e,h,l,d).then(()=>{e.adminsError||(e.adminsNewPhone="")})},onRemove:h=>$u(e,h,l,d),onNewPhoneChange:h=>e.handleAdminsNewPhoneChange(h)})}if(e.contactsPage){const l=Eb(e);return kf({connected:e.connected,wsProps:sn(e),loading:e.contactsLoading,saving:e.contactsSaving,records:e.contactsRecords,error:e.contactsError,searchQuery:e.contactsSearchQuery,editingId:e.contactsEditingId,showAddForm:e.contactsShowAddForm,newRecordPhone:e.contactsNewPhone,newRecordName:e.contactsNewName,onSearch:d=>e.contactsSearchQuery=d,onSearchSubmit:()=>yt(e,l),onAdd:(d,h)=>Au(e,d,h,l),onDelete:d=>Eu(e,d,l),onSetField:(d,h,v)=>Cu(e,d,h,v,l),onDeleteField:(d,h)=>Tu(e,d,h,l),onToggleExpand:d=>{e.contactsEditingId=e.contactsEditingId===d?null:d},onShowAddForm:()=>e.contactsShowAddForm=!0,onCancelAddForm:()=>{e.contactsShowAddForm=!1,e.contactsNewPhone="",e.contactsNewName=""},onNewRecordPhoneChange:d=>e.handleContactsNewPhoneChange(d),onNewRecordNameChange:d=>e.handleContactsNewNameChange(d),onRefresh:()=>yt(e,l)})}if(e.chatPage){const l=e.connected?null:"Disconnected from gateway.",d=el(e),h=e.chatAvatarUrl??d??null,v=(()=>{var S;const f=(S=e.configSnapshot)==null?void 0:S.config,b=f==null?void 0:f.publicChat;return(b==null?void 0:b.enabled)===!0})();return ev({connected:e.connected,wsProps:sn(e),publicChatEnabled:v,publicChatAccountId:e.selectedWorkspace??void 0,sessionKey:e.sessionKey,onSessionKeyChange:f=>{e.sessionKey=f,e.chatMessage="",e.chatAttachments=[],e.chatStream=null,e.chatInterimText=null,e.chatSuggestion=null,e.chatStreamStartedAt=null,e.chatRunId=null,e.chatQueue=[],e.resetToolStream(),e.resetChatScroll(),e.applySettings({...e.settings,sessionKey:f,lastActiveSessionKey:f}),e.loadAssistantIdentity(),Me(e),Ds(e)},thinkingLevel:e.chatThinkingLevel,showThinking:e.settings.chatShowThinking??!1,modelProvider:e.chatModelProvider,model:e.chatModel,modelCatalog:e.chatModelCatalog,onModelChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{model:f}).then(()=>{Me(e,{limit:b})})},onThinkingLevelChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{thinkingLevel:f==="off"?null:f}).then(()=>{Me(e,{limit:b})})},verboseLevel:e.chatVerboseLevel,fillerEnabled:e.chatFillerEnabled,suggestion:e.chatSuggestion,onSuggestionClick:f=>{e.chatMessage=f,e.chatSuggestion=null,e.handleSendChat()},onVerboseChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{verboseLevel:f==="off"?null:f}).then(()=>{Me(e,{limit:b})})},onFillerChange:f=>{const b=Math.max(e.chatMessages.length+10,Pe);Rn(e,e.sessionKey,{fillerEnabled:f}).then(()=>{Me(e,{limit:b})})},loading:e.chatLoading,sending:e.chatSending,compactionStatus:e.compactionStatus,assistantAvatarUrl:h,messages:e.chatMessages,toolMessages:e.chatToolMessages,stream:e.chatStream,streamStartedAt:e.chatStreamStartedAt,interimText:e.chatInterimText,draft:e.chatMessage,queue:e.chatQueue,canSend:e.connected,disabledReason:l,error:e.lastError,sessions:e.sessionsResult,focusMode:!1,onRefresh:()=>{e.resetToolStream();const f=Math.max(e.chatMessages.length+10,Pe);return Promise.all([Me(e,{limit:f}),Ds(e)])},onToggleFocusMode:()=>{},onChatScroll:f=>e.handleChatScroll(f),nearBottom:e.chatUserNearBottom,hasMore:e.chatHistoryHasMore,loadingOlder:e.chatLoadingOlder,onLoadOlder:()=>{e.handleLoadOlderChat()},onDraftChange:f=>e.chatMessage=f,attachments:e.chatAttachments,onAttachmentsChange:f=>e.chatAttachments=f,onSend:()=>e.handleSendChat(),canAbort:!!e.chatRunId,onAbort:()=>{e.handleAbortChat()},onQueueRemove:f=>e.removeQueuedMessage(f),onNewSession:()=>e.handleSendChat("/new",{restoreDraft:!0}),sidebarOpen:e.sidebarOpen,sidebarContent:e.sidebarContent,sidebarError:e.sidebarError,splitRatio:e.splitRatio,onOpenSidebar:f=>e.handleOpenSidebar(f),onCloseSidebar:()=>e.handleCloseSidebar(),onSplitRatioChange:f=>e.handleSplitRatioChange(f),assistantName:e.assistantName,assistantAvatar:e.assistantAvatar})}return e.advancedPage?Mv({connected:e.connected,wsProps:sn(e),activeTab:e.advancedTab,onTabChange:l=>{e.advancedTab=l,l==="cron"&&e.loadCron(),l==="skills"&&ft(e,{clearMessages:!0}),l==="logs"&&(e.logsSubTab==="session"?un(e,{reset:!0}):Pt(e,{reset:!0}))},cronProps:{loading:e.cronLoading,status:e.cronStatus,jobs:e.cronJobs,error:e.cronError,busy:e.cronBusy,form:e.cronForm,channels:(r=(o=e.channelsSnapshot)==null?void 0:o.channelMeta)!=null&&r.length?e.channelsSnapshot.channelMeta.map(l=>l.id):((a=e.channelsSnapshot)==null?void 0:a.channelOrder)??[],channelLabels:((u=e.channelsSnapshot)==null?void 0:u.channelLabels)??{},channelMeta:((c=e.channelsSnapshot)==null?void 0:c.channelMeta)??[],agentIds:(()=>{var d;const l=oe(e);return((d=l==null?void 0:l.agents)==null?void 0:d.map(h=>h.id))??[]})(),runsJobId:e.cronRunsJobId,runs:e.cronRuns,newEventModalOpen:e.cronNewEventModal,onNewEventModalOpen:()=>{e.cronNewEventModal=!0},onNewEventModalClose:()=>{e.cronNewEventModal=!1},detailJobId:e.cronDetailJobId,onDetailOpen:l=>{e.cronDetailJobId=l.id,Ps(e,l.id)},onDetailClose:()=>{e.cronDetailJobId=null},onFormChange:l=>e.cronForm={...e.cronForm,...l},onRefresh:()=>e.loadCron(),onAdd:()=>{rp(e).then(()=>{e.cronNewEventModal=!1})},onToggle:(l,d)=>ap(e,l,d),onRun:l=>lp(e,l),onRemove:l=>cp(e,l),onLoadRuns:l=>Ps(e,l)},skillsProps:{loading:e.skillsLoading,report:e.skillsReport,error:e.skillsError,filter:e.skillsFilter,edits:e.skillEdits,messages:e.skillMessages,busyKey:e.skillsBusyKey,onFilterChange:l=>e.skillsFilter=l,onRefresh:()=>ft(e,{clearMessages:!0}),onToggle:(l,d)=>Yl(e,l,d),onEdit:(l,d)=>Ql(e,l,d),onSaveKey:l=>Xl(e,l),onInstall:(l,d,h)=>Zl(e,l,d,h)},logsProps:{logsSubTab:e.logsSubTab,onSubTabChange:l=>{e.logsSubTab=l,l==="session"?un(e,{reset:!0}):Pt(e,{reset:!0})},sessionLogsProps:{loading:e.sessionLogsLoading,error:e.sessionLogsError,entries:e.sessionLogsEntries,agents:e.sessionLogsAgents,filterText:e.sessionLogsFilterText,typeFilters:e.sessionLogsTypeFilters,agentFilters:e.sessionLogsAgentFilters,autoFollow:e.sessionLogsAutoFollow,onFilterTextChange:l=>e.sessionLogsFilterText=l,onTypeToggle:(l,d)=>{const h=e;h.sessionLogsTypeFilters={...h.sessionLogsTypeFilters,[l]:d}},onAgentToggle:(l,d)=>{const h=e;h.sessionLogsAgentFilters={...h.sessionLogsAgentFilters,[l]:d}},onToggleAutoFollow:l=>e.sessionLogsAutoFollow=l,onRefresh:()=>{un(e,{reset:!0})},onExport:(l,d)=>e.exportSessionLogs(l,d),onScroll:l=>e.handleSessionLogsScroll(l)},loading:e.logsLoading,error:e.logsError,file:e.logsFile,entries:e.logsEntries,filterText:e.logsFilterText,levelFilters:e.logsLevelFilters,autoFollow:e.logsAutoFollow,truncated:e.logsTruncated,onFilterTextChange:l=>e.logsFilterText=l,onLevelToggle:(l,d)=>{e.logsLevelFilters={...e.logsLevelFilters,[l]:d}},onToggleAutoFollow:l=>e.logsAutoFollow=l,onRefresh:()=>Pt(e,{reset:!0}),onExport:(l,d)=>e.exportSessionLogs(l,d),onScroll:l=>e.handleLogsScroll(l)}}):(window.location.replace("/chat"),p``)}function Ib(e){const t=new Date(e),n=t.toLocaleDateString("en-GB",{day:"2-digit",month:"short"}),i=t.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"});return`${n} ${i}`}function tl(e){return e.startsWith("memory/public/")?"public":e.startsWith("memory/shared/")?"shared":"other"}function Rb(e,t,n){return p`
3497
3520
  <div class="audit-modal-overlay" @click=${s=>{s.target.classList.contains("audit-modal-overlay")&&n()}}>
3498
3521
  <div class="audit-modal-card">
3499
3522
  <div class="audit-modal-header">
@@ -3528,4 +3551,4 @@ ${r.text}`:a.join(", "):r.text;t.push({kind:"message",key:`queue:${r.id}`,messag
3528
3551
  `}const Nb={trace:!0,debug:!0,info:!0,warn:!0,error:!0,fatal:!0},Db={name:"",description:"",agentId:"",enabled:!0,scheduleKind:"every",scheduleAt:"",everyAmount:"30",everyUnit:"minutes",cronExpr:"0 7 * * *",cronTz:"",sessionTarget:"main",wakeMode:"next-heartbeat",payloadKind:"systemEvent",payloadText:"",deliver:!1,channel:"last",to:"",timeoutSeconds:"",postToMainPrefix:""};function Ob(e){e.basePath=$h();const t=Xe();if(Kh(t.accentColor),window.scrollTo(0,0),yh(e),e.publicChat){const n=window.__TASKMASTER_PUBLIC_CHAT_CONFIG__,i=(n==null?void 0:n.accountId)??"",s=i?i.charAt(0).toUpperCase()+i.slice(1):"Assistant";document.title=`Chat with ${s}`,Te(e);return}if(e.setup){document.title=`${t.name} Setup`,Te(e);return}if(e.filesPage){document.title=`${t.name} Files`,bh(e),Te(e);return}if(e.browserPage){document.title=`${t.name} Browser`,Te(e);return}if(e.adminsPage){document.title=`${t.name} Admins`,Te(e);return}if(e.contactsPage){document.title=`${t.name} Contacts`,Te(e);return}if(e.chatPage){document.title=`${t.name} Chat`,Te(e);return}if(e.advancedPage){document.title=`${t.name} Advanced`,Te(e);return}Th(e,!0),Ah(e),Eh(e),window.addEventListener("popstate",e.popStateHandler),kh(e),Te(e),gh(e),e.tab==="logs"&&(e.logsSubTab==="session"?So(e):wo(e)),e.tab==="debug"&&$o(e)}function Bb(e){ep(e)}function Fb(e){var t;window.removeEventListener("popstate",e.popStateHandler),mh(e),ko(e),xo(e),Ao(e),vh(e),wh(e),Ch(e),(t=e.topbarObserver)==null||t.disconnect(),e.topbarObserver=null}function Ub(e,t){if(!e.publicChat){if(e.filesPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleFilesLoad&&e.handleFilesLoad(),e.adminsPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleAdminsLoad&&e.handleAdminsLoad(),e.contactsPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleContactsLoad&&e.handleContactsLoad(),e.chatPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleChatLoad&&e.handleChatLoad(),e.advancedPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleAdvancedLoad&&e.handleAdvancedLoad(),e.setup&&e.connected){const n=t.has("connected")&&t.get("connected")===!1;n&&e.handleLicenseStatusCheck&&e.licenseValid===null&&!e.licenseBusy&&e.handleLicenseStatusCheck(),n&&e.handleUpdateCheck&&e.handleUpdateCheck();const i=t.has("setupStep")&&e.setupStep==="auth";(n||i)&&e.setupStep==="auth"&&e.handleAuthStatusCheck&&e.authConnected===null&&!e.authBusy&&e.handleAuthStatusCheck(),e.setupStep==="whatsapp"&&t.has("setupStep")&&e.client&&!e.channelsLoading&&(e.channelsLoading=!0,e.client.request("channels.status",{probe:!0,timeoutMs:8e3}).then(o=>{e.channelsSnapshot=o,e.channelsLoading=!1}).catch(()=>{e.channelsLoading=!1})),t.has("whatsappLoginConnected")&&e.whatsappLoginConnected===!0&&e.client&&!e.channelsLoading&&(e.channelsLoading=!0,e.client.request("channels.status",{probe:!0,timeoutMs:8e3}).then(s=>{e.channelsSnapshot=s,e.channelsLoading=!1}).catch(()=>{e.channelsLoading=!1}))}if(e.tab==="chat"&&!e.advancedPage&&(t.has("chatMessages")||t.has("chatToolMessages")||t.has("chatStream")||t.has("chatLoading")||t.has("tab"))){const n=t.has("tab"),i=t.has("chatLoading")&&t.get("chatLoading")===!0&&e.chatLoading===!1;Bt(e,n||i||!e.chatHasAutoScrolled)}e.tab==="logs"&&!e.advancedPage&&(t.has("logsEntries")||t.has("logsAutoFollow")||t.has("tab"))&&e.logsAutoFollow&&e.logsAtBottom&&$l(e,t.has("tab")||t.has("logsAutoFollow"))}}function Wb(e){const t={name:(e==null?void 0:e.name)??"",displayName:(e==null?void 0:e.displayName)??"",about:(e==null?void 0:e.about)??"",picture:(e==null?void 0:e.picture)??"",banner:(e==null?void 0:e.banner)??"",website:(e==null?void 0:e.website)??"",nip05:(e==null?void 0:e.nip05)??"",lud16:(e==null?void 0:e.lud16)??""};return{values:t,original:{...t},saving:!1,importing:!1,error:null,success:null,fieldErrors:{},showAdvanced:!!(e!=null&&e.banner||e!=null&&e.website||e!=null&&e.nip05||e!=null&&e.lud16)}}async function Kb(e,t,n){await lo(e,t,n),await G(e,!0)}async function zb(e,t){await Cl(e,t),await G(e,!0)}async function jb(e,t){await Tl(e,t),await G(e,!0)}async function Hb(e,t){await _l(e,t)}async function qb(e,t){await Ml(e,t)}async function Vb(e){await ip(e),await Le(e),await G(e,!0)}async function Gb(e){await Le(e),await G(e,!0)}function Qb(e){if(!Array.isArray(e))return{};const t={};for(const n of e){if(typeof n!="string")continue;const[i,...s]=n.split(":");if(!i||s.length===0)continue;const o=i.trim(),r=s.join(":").trim();o&&r&&(t[o]=r)}return t}function _u(e){var n,i,s;return((s=(((i=(n=e.channelsSnapshot)==null?void 0:n.channelAccounts)==null?void 0:i.nostr)??[])[0])==null?void 0:s.accountId)??e.nostrProfileAccountId??"default"}function Mu(e,t=""){return`/api/channels/nostr/${encodeURIComponent(e)}/profile${t}`}function Yb(e,t,n){e.nostrProfileAccountId=t,e.nostrProfileFormState=Wb(n??void 0)}function Xb(e){e.nostrProfileFormState=null,e.nostrProfileAccountId=null}function Zb(e,t,n){const i=e.nostrProfileFormState;i&&(e.nostrProfileFormState={...i,values:{...i.values,[t]:n},fieldErrors:{...i.fieldErrors,[t]:""}})}function Jb(e){const t=e.nostrProfileFormState;t&&(e.nostrProfileFormState={...t,showAdvanced:!t.showAdvanced})}async function ew(e){const t=e.nostrProfileFormState;if(!t||t.saving)return;const n=_u(e);e.nostrProfileFormState={...t,saving:!0,error:null,success:null,fieldErrors:{}};try{const i=await fetch(Mu(n),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.values)}),s=await i.json().catch(()=>null);if(!i.ok||(s==null?void 0:s.ok)===!1||!s){const o=(s==null?void 0:s.error)??`Profile update failed (${i.status})`;e.nostrProfileFormState={...t,saving:!1,error:o,success:null,fieldErrors:Qb(s==null?void 0:s.details)};return}if(!s.persisted){e.nostrProfileFormState={...t,saving:!1,error:"Profile publish failed on all relays.",success:null};return}e.nostrProfileFormState={...t,saving:!1,error:null,success:"Profile published to relays.",fieldErrors:{},original:{...t.values}},await G(e,!0)}catch(i){e.nostrProfileFormState={...t,saving:!1,error:`Profile update failed: ${String(i)}`,success:null}}}async function tw(e){const t=e.nostrProfileFormState;if(!t||t.importing)return;const n=_u(e);e.nostrProfileFormState={...t,importing:!0,error:null,success:null};try{const i=await fetch(Mu(n,"/import"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoMerge:!0})}),s=await i.json().catch(()=>null);if(!i.ok||(s==null?void 0:s.ok)===!1||!s){const u=(s==null?void 0:s.error)??`Profile import failed (${i.status})`;e.nostrProfileFormState={...t,importing:!1,error:u,success:null};return}const o=s.merged??s.imported??null,r=o?{...t.values,...o}:t.values,a=!!(r.banner||r.website||r.nip05||r.lud16);e.nostrProfileFormState={...t,importing:!1,values:r,error:null,success:s.saved?"Profile imported from relays. Review and publish.":"Profile imported. Review and publish.",showAdvanced:a},s.saved&&await G(e,!0)}catch(i){e.nostrProfileFormState={...t,importing:!1,error:`Profile import failed: ${String(i)}`,success:null}}}async function nw(e){if(e.client){e.authBusy=!0,e.authMessage=null;try{const t=await e.client.request("auth.status",{});e.authConnected=t.connected,e.authExpiresIn=t.expiresIn??null,e.authMessage=t.message??null,t.connected&&(e.setupStep="whatsapp")}catch(t){e.authConnected=!1,e.authMessage=t instanceof Error?t.message:"Failed to check auth status"}finally{e.authBusy=!1}}}async function iw(e){if(e.client){e.authBusy=!0,e.authMessage=null,e.authUrl=null,e.authConnected=null;try{const t=await e.client.request("auth.oauth.start",{provider:"anthropic"});e.authUrl=t.authUrl,e.authMessage=t.message??"Sign in with your Claude Pro account"}catch(t){e.authConnected=!1,e.authMessage=t instanceof Error?t.message:"Failed to start auth flow"}finally{e.authBusy=!1}}}async function sw(e,t){if(e.client){e.authBusy=!0,e.authMessage="Verifying code...";try{await e.client.request("auth.oauth.code",{code:t});const n=await e.client.request("auth.oauth.wait",{timeoutMs:3e4});n.connected?(e.authConnected=!0,e.authMessage=n.message??"Connected to Claude!",e.authUrl=null,e.authCodeInput=""):e.authMessage=n.message??"Still waiting for authorization..."}catch(n){e.authConnected=!1,e.authMessage=n instanceof Error?n.message:"Verification failed"}finally{e.authBusy=!1}}}function ow(e,t){e.authCodeInput=t}function rw(e){e.setupStep="whatsapp"}async function aw(e){if(e.client){e.licenseBusy=!0,e.licenseMessage=null;try{const t=await e.client.request("license.status",{});e.licenseDeviceId=t.deviceId??null,e.licenseStoredKey=t.key??null,t.licensed?(e.licenseValid=!0,e.licenseTier=t.tier??null,e.setupStep="auth"):(e.licenseValid=null,e.setupStep="license")}catch(t){const n=t instanceof Error?t.message:String(t);n.includes("unknown method")?(e.licenseValid=!0,e.setupStep="auth"):(e.licenseValid=null,e.licenseMessage=n,e.setupStep="license")}finally{e.licenseBusy=!1}}}async function lw(e){if(e.client&&e.licenseKey.trim()){e.licenseBusy=!0,e.licenseMessage=null,e.licenseValid=null;try{const t=await e.client.request("license.activate",{key:e.licenseKey.trim()});t.valid?(e.licenseValid=!0,e.licenseMessage=t.message??"License activated",e.licenseTier=t.tier??null,setTimeout(()=>{e.setupStep="auth"},1500)):(e.licenseValid=!1,e.licenseMessage=t.message??"Invalid license key")}catch(t){e.licenseValid=!1,e.licenseMessage=t instanceof Error?t.message:"Activation failed"}finally{e.licenseBusy=!1}}}async function cw(e){if(e.client){e.licenseBusy=!0;try{await e.client.request("license.remove",{}),e.licenseValid=null,e.licenseKey="",e.licenseTier=null,e.licenseMessage=null,e.setupStep="license"}catch(t){e.licenseMessage=t instanceof Error?t.message:"Failed to remove license"}finally{e.licenseBusy=!1}}}function uw(e,t){e.licenseKey=t}async function dw(e){var t,n;if(!(!e.client||!e.connected)&&!e.gatewayHealthLoading){e.gatewayHealthLoading=!0,(t=e.requestUpdate)==null||t.call(e);try{const i=await e.client.request("health",{probe:!0});e.gatewayHealthy=i.ok===!0,e.gatewayHealthMessage=i.ok?`Healthy${i.durationMs?` (${i.durationMs}ms)`:""}`:"Unhealthy"}catch(i){e.gatewayHealthy=!1,e.gatewayHealthMessage=`Error: ${String(i)}`}finally{e.gatewayHealthLoading=!1,(n=e.requestUpdate)==null||n.call(e)}}}async function pw(e){var t,n,i;if(!(!e.client||e.gatewayRestartBusy)){e.gatewayRestartBusy=!0,e.gatewayHealthMessage="Restarting...",(t=e.requestUpdate)==null||t.call(e);try{const s=await e.client.request("gateway.restart",{reason:"Manual restart from setup page",delayMs:1e3});if(s.ok&&((n=s.restart)!=null&&n.ok))e.gatewayHealthMessage="Restarting...",setTimeout(()=>{window.location.reload()},3e3);else throw new Error("Restart not scheduled")}catch(s){e.gatewayHealthMessage=`Restart failed: ${String(s)}`,e.gatewayRestartBusy=!1,(i=e.requestUpdate)==null||i.call(e)}}}var hw=Object.defineProperty,fw=Object.getOwnPropertyDescriptor,m=(e,t,n,i)=>{for(var s=i>1?void 0:i?fw(t,n):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(s=(i?r(t,n,s):r(s))||s);return i&&s&&hw(t,n,s),s};const Cs=gd();function gw(){if(!window.location.search)return!1;const t=new URLSearchParams(window.location.search).get("onboarding");if(!t)return!1;const n=t.trim().toLowerCase();return n==="1"||n==="true"||n==="yes"||n==="on"}function mw(){const e=window.location.pathname;if(e==="/setup"||e.endsWith("/setup"))return!0;if(!window.location.search)return!1;const n=new URLSearchParams(window.location.search).get("setup");if(!n)return!1;const i=n.trim().toLowerCase();return i==="1"||i==="true"||i==="yes"||i==="on"}function yw(){const e=window.location.pathname;return e==="/files"||e.endsWith("/files")}function vw(){const e=window.location.pathname;return e==="/browser"||e.endsWith("/browser")}function bw(){const e=window.location.pathname;return e==="/admins"||e.endsWith("/admins")}function ww(){const e=window.location.pathname;return e==="/contacts"||e.endsWith("/contacts")}function kw(){const e=window.location.pathname;return e==="/chat"||e.endsWith("/chat")}function Sw(){const e=window.location.pathname;return e==="/advanced"||e.endsWith("/advanced")}let g=class extends Mt{constructor(){super(...arguments),this.settings=Yi(),this.password="",this.tab="chat",this.onboarding=gw(),this.setup=mw(),this.filesPage=yw(),this.browserPage=vw(),this.adminsPage=bw(),this.contactsPage=ww(),this.chatPage=kw(),this.advancedPage=Sw(),this.advancedTab="cron",this.publicChat=!!window.__TASKMASTER_PUBLIC_CHAT__,this.publicChatConfig=window.__TASKMASTER_PUBLIC_CHAT_CONFIG__??{},this.publicChatSessionKey=null,this.publicChatAuthenticated=!1,this.publicChatAuthStep="idle",this.connected=!1,this.accessState=bu,this.theme=this.settings.theme??"system",this.themeResolved="dark",this.hello=null,this.lastError=null,this.eventLog=[],this.eventLogBuffer=[],this.toolStreamSyncTimer=null,this.sidebarCloseTimer=null,this.assistantName=Cs.name,this.assistantAvatar=Cs.avatar,this.assistantAgentId=Cs.agentId??null,this.sessionKey=this.settings.sessionKey,this.chatLoading=!1,this.chatSending=!1,this.chatMessage="",this.chatMessages=[],this.chatHistoryTotal=0,this.chatHistoryHasMore=!1,this.chatLoadingOlder=!1,this.chatToolMessages=[],this.chatStream=null,this.chatInterimText=null,this.chatSuggestion=null,this.chatStreamStartedAt=null,this.chatRunId=null,this.compactionStatus=null,this.chatAvatarUrl=null,this.chatThinkingLevel=null,this.chatModelProvider=null,this.chatModel=null,this.chatModelCatalog=[],this.chatVerboseLevel=null,this.chatFillerEnabled=null,this.chatQueue=[],this.chatAttachments=[],this.sidebarOpen=!1,this.sidebarContent=null,this.sidebarError=null,this.splitRatio=this.settings.splitRatio,this.nodesLoading=!1,this.nodes=[],this.devicesLoading=!1,this.devicesError=null,this.devicesList=null,this.execApprovalsLoading=!1,this.execApprovalsSaving=!1,this.execApprovalsDirty=!1,this.execApprovalsSnapshot=null,this.execApprovalsForm=null,this.execApprovalsSelectedAgent=null,this.execApprovalsTarget="gateway",this.execApprovalsTargetNodeId=null,this.execApprovalQueue=[],this.execApprovalBusy=!1,this.execApprovalError=null,this.configLoading=!1,this.configRaw=`{
3529
3552
  }
3530
3553
  `,this.configRawOriginal="",this.configValid=null,this.configIssues=[],this.configSaving=!1,this.configApplying=!1,this.updateRunning=!1,this.applySessionKey=this.settings.lastActiveSessionKey,this.configSnapshot=null,this.configSchema=null,this.configSchemaVersion=null,this.configSchemaLoading=!1,this.configUiHints={},this.configForm=null,this.configFormOriginal=null,this.configFormDirty=!1,this.configFormMode="form",this.configSearchQuery="",this.configActiveSection=null,this.configActiveSubsection=null,this.channelsLoading=!1,this.channelsSnapshot=null,this.channelsError=null,this.channelsLastSuccess=null,this.whatsappLoginMessage=null,this.whatsappLoginQrDataUrl=null,this.whatsappLoginConnected=null,this.whatsappBusy=!1,this.whatsappActiveQrAccountId=null,this.whatsappPairedPhone=null,this.addingWhatsAppAccount=!1,this.newWhatsAppAccountName="",this.whatsappAccountError=null,this.whatsappAccountSaving=!1,this.whatsappSettingsOpen=!1,this.publicChatToggleBusy=!1,this.tailscaleStatus=null,this.tailscaleBusy=!1,this.tailscaleAuthUrl=null,this.tailscaleError=null,this.tailscaleFunnelEnableUrl=null,this.wifiStatus=null,this.wifiNetworks=[],this.wifiBusy=!1,this.wifiError=null,this.wifiPassword="",this.wifiSelectedSsid=null,this.licenseKey="",this.licenseBusy=!1,this.licenseValid=null,this.licenseMessage=null,this.licenseTier=null,this.licenseDeviceId=null,this.licenseStoredKey=null,this.licenseRemoveConfirm=!1,this.authConnected=null,this.authBusy=!1,this.authMessage=null,this.authUrl=null,this.authCodeInput="",this.authExpiresIn=null,this.setupStep="license",this.gatewayHealthy=null,this.gatewayHealthLoading=!1,this.gatewayHealthMessage=null,this.gatewayRestartBusy=!1,this.updateAvailable=null,this.currentVersion=null,this.latestVersion=null,this.updateChecking=!1,this.updateMessage=null,this.updateProgressSteps=[],this.updateLastResult=null,this.uninstallConfirm=!1,this.uninstallBusy=!1,this.uninstallDone=!1,this.uninstallError=null,this.uninstallConfirmText="",this.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.cronLoading=!1,this.cronJobs=[],this.cronStatus=null,this.cronError=null,this.cronForm={...Db},this.cronRunsJobId=null,this.cronRuns=[],this.cronBusy=!1,this.cronNewEventModal=!1,this.cronDetailJobId=null,this.browserScreencastActive=!1,this.browserScreencastFrame=null,this.browserScreencastMetadata=null,this.browserHandoffPending=!1,this.browserHandoffReason=null,this.browserHandoffId=null,this.browserInputMode=!1,this.browserFullscreen=!1,this.browserLoading=!1,this.browserError=null,this.filesLoading=!1,this.filesTree=[],this.filesRoot="",this.filesError=null,this.filesSelectedPath=null,this.filesSelectedPaths=new Set,this.filesPreviewContent=null,this.filesPreviewLoading=!1,this.filesPreviewBinary=!1,this.filesPreviewSize=null,this.filesExpandedDirs=new Set,this.filesCurrentDir=".",this.filesPendingDeletePath=null,this.filesMessage=null,this.filesUploadBusy=!1,this.filesReindexBusy=!1,this.filesMemoryStatus=null,this.embeddingDownloading=!1,this.embeddingPollTimer=null,this.filesSearchQuery="",this.filesSearchResults=null,this.filesSearchLoading=!1,this.filesSearchAgentId=null,this.filesResolvedAgentId=void 0,this.auditEntries=[],this.auditLoading=!1,this.auditModalOpen=!1,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter="",this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.adminsLoading=!1,this.adminPhones=[],this.adminsError=null,this.adminsSaving=!1,this.adminsNewPhone="",this.contactsLoading=!1,this.contactsSaving=!1,this.contactsRecords=[],this.contactsError=null,this.contactsSearchQuery="",this.contactsEditingId=null,this.contactsShowAddForm=!1,this.contactsNewPhone="",this.contactsNewName="",this.imessageEnableConfirm=!1,this.imessageEnabling=!1,this.infoModalOpen=null,this.workspaces=[],this.workspacesLoading=!1,this.workspacesError=null,this.selectedWorkspace=null,this.addingWorkspace=!1,this.newWorkspaceName="",this.newWorkspacePath="",this.newWorkspacePin="",this.accountPinModalOpen=!1,this.accountPinBusy=!1,this.accountPinError=null,this.accountPinSuccess=null,this.apiKeyProviders=[],this.apiKeyModalOpen=!1,this.apiKeyBusy=!1,this.apiKeyError=null,this.apiKeySuccess=null,this.apiKeySavingProvider=null,this.authApiKeyMode=!1,this.authApiKeyInput="",this.authApiKeyBusy=!1,this.authApiKeyError=null,this.pinChanging=null,this.pinChangeBusy=!1,this.pinChangeError=null,this.loginChangePinMode=!1,this.changePinBusy=!1,this.changePinError=null,this.changePinSuccess=null,this.workspaceSaving=!1,this.workspaceRemoveConfirm=null,this.renamingWorkspace=!1,this.renameWorkspaceName="",this.debugLoading=!1,this.debugStatus=null,this.debugHealth=null,this.debugModels=[],this.debugHeartbeat=null,this.debugCallMethod="",this.debugCallParams="{}",this.debugCallResult=null,this.debugCallError=null,this.logsLoading=!1,this.logsError=null,this.logsFile=null,this.logsEntries=[],this.logsFilterText="",this.logsLevelFilters={...Nb},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.logsSubTab="session",this.sessionLogsLoading=!1,this.sessionLogsError=null,this.sessionLogsEntries=[],this.sessionLogsFilterText="",this.sessionLogsTypeFilters={user:!0,assistant:!0,tool:!0,thinking:!0,error:!0,system:!0},this.sessionLogsAgentFilters={},this.sessionLogsAgents=[],this.sessionLogsAutoFollow=!0,this.sessionLogsCursors={},this.sessionLogsLastFetchAt=null,this.sessionLogsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.onLoadOlder=()=>this.handleLoadOlderChat(),this.nodesPollInterval=null,this.logsPollInterval=null,this.sessionLogsPollInterval=null,this.debugPollInterval=null,this.auditPollInterval=null,this.logsScrollFrame=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.basePath="",this.popStateHandler=()=>_h(this),this.themeMedia=null,this.themeMediaHandler=null,this.topbarObserver=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),Ob(this)}firstUpdated(){Bb(this)}disconnectedCallback(){this.stopEmbeddingPoll(),Fb(this),super.disconnectedCallback()}startEmbeddingPoll(){if(this.embeddingPollTimer!=null)return;const e=async()=>{if(!(!this.client||!this.connected)){try{const t=await this.client.request("memory.status",{});if((t==null?void 0:t.embeddingState)==="downloading")this.embeddingDownloading=!0;else{this.embeddingDownloading&&(this.embeddingDownloading=!1),this.stopEmbeddingPoll();return}}catch{this.embeddingDownloading=!1,this.stopEmbeddingPoll();return}this.embeddingPollTimer=window.setTimeout(e,3e3)}};e()}stopEmbeddingPoll(){this.embeddingPollTimer!=null&&(window.clearTimeout(this.embeddingPollTimer),this.embeddingPollTimer=null)}updated(e){Ub(this,e)}connect(){Te(this)}handleChatScroll(e){Vd(this,e)}handleLogsScroll(e){Qd(this,e)}handleSessionLogsScroll(e){Yd(this,e)}exportLogs(e,t){Zd(e,t)}exportSessionLogs(e,t){Jd(e,t)}resetToolStream(){ao(this)}resetChatScroll(){Xd(this)}async loadAssistantIdentity(){await Js(this)}applySettings(e){Ge(this,e)}setTab(e){Sh(this,e)}setTheme(e,t){xh(this,e,t)}async loadOverview(){await cc(this)}async loadCron(){var t;const e=this.getSelectedWorkspaceInfo();this.workspaceAgentIds=((t=e==null?void 0:e.agents)==null?void 0:t.map(n=>n.id))??void 0,this.cronForm={...this.cronForm,accountId:(e==null?void 0:e.whatsappAccountId)??void 0},await Eo(this)}async handleAbortChat(){await dc(this)}removeQueuedMessage(e){Ih(this,e)}async handleSendChat(e,t){await Rh(this,e,t)}async handleWhatsAppStart(e,t){await Kb(this,e,t)}async handleWhatsAppWait(e){await zb(this,e)}async handleWhatsAppLogout(e){await jb(this,e)}async handleAddWhatsAppAccount(e){await Hb(this,e)}async handleRemoveWhatsAppAccount(e){await qb(this,e)}async handleAccessCheck(){await Ja(this)}async handlePinSubmit(e,t){await gb(this,e,t),this.accessState.authenticated&&this.accessState.workspace&&this.handleWorkspaceSelect(this.accessState.workspace)}async handleSetMasterPin(e){await mb(this,e)}async handleLogout(){await vb(this)}toggleChangePinMode(){this.loginChangePinMode=!this.loginChangePinMode,this.changePinError=null,this.changePinSuccess=null}async handleChangePin(e,t,n){if(this.client){this.changePinBusy=!0,this.changePinError=null,this.changePinSuccess=null;try{const i=await this.client.request("access.verify",{account:e,pin:t});if(!i.ok){this.changePinError=i.message??"Incorrect current PIN",this.changePinBusy=!1;return}e==="__master__"?await this.client.request("access.setMasterPin",{pin:n}):await this.client.request("access.setAccountPin",{workspace:e,pin:n}),this.changePinSuccess="PIN changed successfully",this.changePinBusy=!1,setTimeout(()=>{this.loginChangePinMode=!1,this.changePinSuccess=null},2e3)}catch{this.changePinError="Failed to change PIN",this.changePinBusy=!1}}}async handleAccountPinSave(e,t,n){if(this.client){this.accountPinBusy=!0,this.accountPinError=null,this.accountPinSuccess=null;try{if(t!==null){const i=await this.client.request("access.verify",{account:e,pin:t});if(!i.ok){this.accountPinError=i.message??"Incorrect current PIN",this.accountPinBusy=!1;return}}await this.client.request("access.setAccountPin",{workspace:e,pin:n}),this.accountPinSuccess="PIN saved",this.accountPinBusy=!1,await Ja(this),setTimeout(()=>{this.accountPinModalOpen=!1,this.accountPinSuccess=null,this.accountPinError=null},1500)}catch{this.accountPinError="Failed to save PIN",this.accountPinBusy=!1}}}async handleLicenseStatusCheck(){await aw(this)}async handleLicenseActivate(){await lw(this)}async handleLicenseRemove(){await cw(this)}handleLicenseKeyChange(e){uw(this,e)}async handleAuthStatusCheck(){await nw(this)}async handleAuthStart(){await iw(this)}async handleAuthSubmitCode(e){await sw(this,e)}handleAuthCodeChange(e){ow(this,e)}handleSkipToWhatsApp(){rw(this)}async handleGatewayHealthCheck(){await dw(this)}async handleGatewayRestart(){await pw(this)}async handleUpdateCheck(){await gu(this)}async handleUpdateRun(){await Zv(this)}handleUpdateDismissResult(){tb(this)}handleUninstallConfirm(){this.uninstallConfirm=!0,this.uninstallConfirmText=""}handleUninstallCancel(){this.uninstallConfirm=!1,this.uninstallConfirmText="",this.uninstallError=null}handleUninstallConfirmTextChange(e){this.uninstallConfirmText=e}async handleUninstallRun(){const{runUninstall:e}=await ie(async()=>{const{runUninstall:t}=await Promise.resolve().then(()=>Br);return{runUninstall:t}},void 0,import.meta.url);await e(this)}handleUninstallDismiss(){ie(async()=>{const{clearUninstallDone:e}=await Promise.resolve().then(()=>Br);return{clearUninstallDone:e}},void 0,import.meta.url).then(({clearUninstallDone:e})=>{e()}),this.uninstallDone=!1,this.uninstallConfirm=!1,this.uninstallConfirmText=""}async loadAuditEntries(){await ic(this)}async clearAudit(){await nh(this),this.auditModalOpen=!1}handleFilesLoad(){var n;const e=this.getSelectedWorkspaceInfo();this.workspaceAgentIds=((n=e==null?void 0:e.agents)==null?void 0:n.map(i=>i.id))??void 0;const t=this.resolveFilesAgentId();this.filesResolvedAgentId=t,Ut(this,t),bo(this,t)}handleAdminsLoad(){const e=this.resolveAdminAgentId();ie(async()=>{const{loadAdmins:t}=await Promise.resolve().then(()=>wb);return{loadAdmins:t}},void 0,import.meta.url).then(({loadAdmins:t})=>{t(this,e)})}resolveAdminAgentId(){const e=this.getSelectedWorkspaceInfo();if(!e)return;const t=e.agents.find(n=>n.id.endsWith("-admin")||n.id==="admin");return t==null?void 0:t.id}resolveFilesAgentId(){var n;const e=this.getSelectedWorkspaceInfo();if(!e)return;const t=e.agents.find(i=>i.id.endsWith("-admin")||i.id==="admin");return(t==null?void 0:t.id)??((n=e.agents[0])==null?void 0:n.id)}handleChatLoad(){const e=this.resolveAdminAgentId();if(e){const t=`agent:${e}:main`;t!==this.sessionKey&&(this.sessionKey=t,this.chatMessages=[],this.chatStream=null,this.chatInterimText=null,this.chatRunId=null,this.chatSuggestion=null,this.resetChatScroll(),this.applySettings({...this.settings,sessionKey:t,lastActiveSessionKey:t}),this.loadAssistantIdentity())}ie(async()=>{const{loadChatHistory:t}=await Promise.resolve().then(()=>oi);return{loadChatHistory:t}},void 0,import.meta.url).then(({loadChatHistory:t})=>{t(this).then(()=>{Bt(this,!0)})})}async handleLoadOlderChat(){if(this.chatLoadingOlder||!this.chatHistoryHasMore)return;const e=Gd(this),{loadOlderChatHistory:t}=await ie(async()=>{const{loadOlderChatHistory:i}=await Promise.resolve().then(()=>oi);return{loadOlderChatHistory:i}},void 0,import.meta.url);await t(this)&&e&&(await this.updateComplete,e())}handleAdvancedLoad(){var t;const e=this.getSelectedWorkspaceInfo();this.workspaceAgentIds=((t=e==null?void 0:e.agents)==null?void 0:t.map(n=>n.id))??void 0,this.sessionLogsEntries=[],this.sessionLogsCursors={},this.sessionLogsAgents=[],this.advancedTab==="cron"&&this.loadCron(),this.advancedTab==="logs"&&(this.logsSubTab==="session"?ie(async()=>{const{loadSessionLogs:n}=await Promise.resolve().then(()=>nc);return{loadSessionLogs:n}},void 0,import.meta.url).then(({loadSessionLogs:n})=>{n(this,{reset:!0})}):ie(async()=>{const{loadLogs:n}=await Promise.resolve().then(()=>gp);return{loadLogs:n}},void 0,import.meta.url).then(({loadLogs:n})=>{n(this,{reset:!0})})),this.advancedTab==="skills"&&ie(async()=>{const{loadSkills:n}=await Promise.resolve().then(()=>Qp);return{loadSkills:n}},void 0,import.meta.url).then(({loadSkills:n})=>{n(this,{clearMessages:!0})})}async handleChannelConfigSave(){await Vb(this)}async handleChannelConfigReload(){await Gb(this)}handleNostrProfileEdit(e,t){Yb(this,e,t)}handleNostrProfileCancel(){Xb(this)}handleNostrProfileFieldChange(e,t){Zb(this,e,t)}async handleNostrProfileSave(){await ew(this)}async handleNostrProfileImport(){await tw(this)}handleNostrProfileToggleAdvanced(){Jb(this)}async handleExecApprovalDecision(e){const t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{await this.client.request("exec.approval.resolve",{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(n=>n.id!==t.id)}catch(n){this.execApprovalError=`Exec approval failed: ${String(n)}`}finally{this.execApprovalBusy=!1}}}handleOpenSidebar(e){this.sidebarCloseTimer!=null&&(window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=null),this.sidebarContent=e,this.sidebarError=null,this.sidebarOpen=!0}handleCloseSidebar(){this.sidebarOpen=!1,this.sidebarCloseTimer!=null&&window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=window.setTimeout(()=>{this.sidebarOpen||(this.sidebarContent=null,this.sidebarError=null,this.sidebarCloseTimer=null)},200)}handleSplitRatioChange(e){const t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}handleAdminsNewPhoneChange(e){this.adminsNewPhone=e,this.adminsError&&(this.adminsError=null)}handleContactsLoad(){const e=this.selectedWorkspace??void 0;ie(async()=>{const{loadContacts:t}=await Promise.resolve().then(()=>kb);return{loadContacts:t}},void 0,import.meta.url).then(({loadContacts:t})=>{t(this,e)})}handleContactsNewPhoneChange(e){this.contactsNewPhone=e,this.contactsError&&(this.contactsError=null)}handleContactsNewNameChange(e){this.contactsNewName=e,this.contactsError&&(this.contactsError=null)}async handleWorkspacesLoad(){const{loadWorkspaces:e}=await ie(async()=>{const{loadWorkspaces:t}=await Promise.resolve().then(()=>Vn);return{loadWorkspaces:t}},void 0,import.meta.url);await e(this)}async handleWorkspaceCreate(e,t){const{createWorkspace:n}=await ie(async()=>{const{createWorkspace:s}=await Promise.resolve().then(()=>Vn);return{createWorkspace:s}},void 0,import.meta.url),{loadChannels:i}=await ie(async()=>{const{loadChannels:s}=await Promise.resolve().then(()=>up);return{loadChannels:s}},void 0,import.meta.url);await n(this,{name:e,workspacePath:t,onCreated:s=>{if(!s.whatsappAccountId)return;const o=s.whatsappAccountId;this.handleWorkspaceSelect(e),setTimeout(async()=>{try{await i(this,!0),await this.handleWhatsAppStart(!0,o),this.whatsappLoginQrDataUrl&&(await this.handleWhatsAppWait(o),await i(this,!0),await this.handleWorkspacesLoad())}catch{}this.requestUpdate()},3e3)}})}async handleWorkspaceRemove(e){const{removeWorkspace:t}=await ie(async()=>{const{removeWorkspace:n}=await Promise.resolve().then(()=>Vn);return{removeWorkspace:n}},void 0,import.meta.url);await t(this,e)}handleWorkspaceRenameStart(){const e=this.getSelectedWorkspaceInfo();this.renameWorkspaceName=(e==null?void 0:e.displayName)??(e==null?void 0:e.name)??"",this.renamingWorkspace=!0}handleWorkspaceRenameCancel(){this.renamingWorkspace=!1,this.renameWorkspaceName=""}async handleWorkspaceRename(e,t){const{renameWorkspace:n}=await ie(async()=>{const{renameWorkspace:i}=await Promise.resolve().then(()=>Vn);return{renameWorkspace:i}},void 0,import.meta.url);await n(this,e,t),this.renamingWorkspace=!1,this.renameWorkspaceName=""}handleWorkspaceSelect(e){this.selectedWorkspace=e,localStorage.setItem("taskmaster-selected-workspace",e),Ar(e),this.settings=Yi(),this.chatMessage="",this.chatAttachments=[],this.chatStream=null,this.chatInterimText=null,this.chatSuggestion=null,this.chatStreamStartedAt=null,this.chatRunId=null,this.chatQueue=[],this.lastError=null,this.reloadCurrentPageData()}getSelectedWorkspaceInfo(){return this.selectedWorkspace?this.workspaces.find(e=>e.name===this.selectedWorkspace)??null:null}reloadCurrentPageData(){this.loadAuditEntries(),this.adminsPage?this.handleAdminsLoad():this.contactsPage?this.handleContactsLoad():this.filesPage?this.handleFilesLoad():this.chatPage?this.handleChatLoad():this.advancedPage&&this.handleAdvancedLoad()}initWorkspaceSelection(){if(this.workspaces.length===0){this.reloadCurrentPageData();return}const e=localStorage.getItem("taskmaster-selected-workspace"),t=e?this.workspaces.find(n=>n.name===e):null;if(t)this.selectedWorkspace=t.name;else{const n=this.workspaces.find(i=>i.isDefault)??this.workspaces[0];this.selectedWorkspace=n.name,localStorage.setItem("taskmaster-selected-workspace",n.name)}Ar(this.selectedWorkspace),this.settings=Yi(),this.reloadCurrentPageData()}render(){return p`${Lb(this)}${this.auditModalOpen?Rb(this.auditEntries,()=>this.clearAudit(),()=>{this.auditModalOpen=!1}):k}`}};m([y()],g.prototype,"settings",2);m([y()],g.prototype,"password",2);m([y()],g.prototype,"tab",2);m([y()],g.prototype,"onboarding",2);m([y()],g.prototype,"setup",2);m([y()],g.prototype,"filesPage",2);m([y()],g.prototype,"browserPage",2);m([y()],g.prototype,"adminsPage",2);m([y()],g.prototype,"contactsPage",2);m([y()],g.prototype,"chatPage",2);m([y()],g.prototype,"advancedPage",2);m([y()],g.prototype,"advancedTab",2);m([y()],g.prototype,"publicChat",2);m([y()],g.prototype,"publicChatConfig",2);m([y()],g.prototype,"publicChatSessionKey",2);m([y()],g.prototype,"publicChatAuthenticated",2);m([y()],g.prototype,"publicChatAuthStep",2);m([y()],g.prototype,"connected",2);m([y()],g.prototype,"accessState",2);m([y()],g.prototype,"theme",2);m([y()],g.prototype,"themeResolved",2);m([y()],g.prototype,"hello",2);m([y()],g.prototype,"lastError",2);m([y()],g.prototype,"eventLog",2);m([y()],g.prototype,"assistantName",2);m([y()],g.prototype,"assistantAvatar",2);m([y()],g.prototype,"assistantAgentId",2);m([y()],g.prototype,"sessionKey",2);m([y()],g.prototype,"chatLoading",2);m([y()],g.prototype,"chatSending",2);m([y()],g.prototype,"chatMessage",2);m([y()],g.prototype,"chatMessages",2);m([y()],g.prototype,"chatHistoryTotal",2);m([y()],g.prototype,"chatHistoryHasMore",2);m([y()],g.prototype,"chatLoadingOlder",2);m([y()],g.prototype,"chatToolMessages",2);m([y()],g.prototype,"chatStream",2);m([y()],g.prototype,"chatInterimText",2);m([y()],g.prototype,"chatSuggestion",2);m([y()],g.prototype,"chatStreamStartedAt",2);m([y()],g.prototype,"chatRunId",2);m([y()],g.prototype,"compactionStatus",2);m([y()],g.prototype,"chatAvatarUrl",2);m([y()],g.prototype,"chatThinkingLevel",2);m([y()],g.prototype,"chatModelProvider",2);m([y()],g.prototype,"chatModel",2);m([y()],g.prototype,"chatModelCatalog",2);m([y()],g.prototype,"chatVerboseLevel",2);m([y()],g.prototype,"chatFillerEnabled",2);m([y()],g.prototype,"chatQueue",2);m([y()],g.prototype,"chatAttachments",2);m([y()],g.prototype,"sidebarOpen",2);m([y()],g.prototype,"sidebarContent",2);m([y()],g.prototype,"sidebarError",2);m([y()],g.prototype,"splitRatio",2);m([y()],g.prototype,"nodesLoading",2);m([y()],g.prototype,"nodes",2);m([y()],g.prototype,"devicesLoading",2);m([y()],g.prototype,"devicesError",2);m([y()],g.prototype,"devicesList",2);m([y()],g.prototype,"execApprovalsLoading",2);m([y()],g.prototype,"execApprovalsSaving",2);m([y()],g.prototype,"execApprovalsDirty",2);m([y()],g.prototype,"execApprovalsSnapshot",2);m([y()],g.prototype,"execApprovalsForm",2);m([y()],g.prototype,"execApprovalsSelectedAgent",2);m([y()],g.prototype,"execApprovalsTarget",2);m([y()],g.prototype,"execApprovalsTargetNodeId",2);m([y()],g.prototype,"execApprovalQueue",2);m([y()],g.prototype,"execApprovalBusy",2);m([y()],g.prototype,"execApprovalError",2);m([y()],g.prototype,"configLoading",2);m([y()],g.prototype,"configRaw",2);m([y()],g.prototype,"configRawOriginal",2);m([y()],g.prototype,"configValid",2);m([y()],g.prototype,"configIssues",2);m([y()],g.prototype,"configSaving",2);m([y()],g.prototype,"configApplying",2);m([y()],g.prototype,"updateRunning",2);m([y()],g.prototype,"applySessionKey",2);m([y()],g.prototype,"configSnapshot",2);m([y()],g.prototype,"configSchema",2);m([y()],g.prototype,"configSchemaVersion",2);m([y()],g.prototype,"configSchemaLoading",2);m([y()],g.prototype,"configUiHints",2);m([y()],g.prototype,"configForm",2);m([y()],g.prototype,"configFormOriginal",2);m([y()],g.prototype,"configFormDirty",2);m([y()],g.prototype,"configFormMode",2);m([y()],g.prototype,"configSearchQuery",2);m([y()],g.prototype,"configActiveSection",2);m([y()],g.prototype,"configActiveSubsection",2);m([y()],g.prototype,"channelsLoading",2);m([y()],g.prototype,"channelsSnapshot",2);m([y()],g.prototype,"channelsError",2);m([y()],g.prototype,"channelsLastSuccess",2);m([y()],g.prototype,"whatsappLoginMessage",2);m([y()],g.prototype,"whatsappLoginQrDataUrl",2);m([y()],g.prototype,"whatsappLoginConnected",2);m([y()],g.prototype,"whatsappBusy",2);m([y()],g.prototype,"whatsappActiveQrAccountId",2);m([y()],g.prototype,"whatsappPairedPhone",2);m([y()],g.prototype,"addingWhatsAppAccount",2);m([y()],g.prototype,"newWhatsAppAccountName",2);m([y()],g.prototype,"whatsappAccountError",2);m([y()],g.prototype,"whatsappAccountSaving",2);m([y()],g.prototype,"whatsappSettingsOpen",2);m([y()],g.prototype,"publicChatToggleBusy",2);m([y()],g.prototype,"tailscaleStatus",2);m([y()],g.prototype,"tailscaleBusy",2);m([y()],g.prototype,"tailscaleAuthUrl",2);m([y()],g.prototype,"tailscaleError",2);m([y()],g.prototype,"tailscaleFunnelEnableUrl",2);m([y()],g.prototype,"wifiStatus",2);m([y()],g.prototype,"wifiNetworks",2);m([y()],g.prototype,"wifiBusy",2);m([y()],g.prototype,"wifiError",2);m([y()],g.prototype,"wifiPassword",2);m([y()],g.prototype,"wifiSelectedSsid",2);m([y()],g.prototype,"licenseKey",2);m([y()],g.prototype,"licenseBusy",2);m([y()],g.prototype,"licenseValid",2);m([y()],g.prototype,"licenseMessage",2);m([y()],g.prototype,"licenseTier",2);m([y()],g.prototype,"licenseDeviceId",2);m([y()],g.prototype,"licenseStoredKey",2);m([y()],g.prototype,"licenseRemoveConfirm",2);m([y()],g.prototype,"authConnected",2);m([y()],g.prototype,"authBusy",2);m([y()],g.prototype,"authMessage",2);m([y()],g.prototype,"authUrl",2);m([y()],g.prototype,"authCodeInput",2);m([y()],g.prototype,"authExpiresIn",2);m([y()],g.prototype,"setupStep",2);m([y()],g.prototype,"gatewayHealthy",2);m([y()],g.prototype,"gatewayHealthLoading",2);m([y()],g.prototype,"gatewayHealthMessage",2);m([y()],g.prototype,"gatewayRestartBusy",2);m([y()],g.prototype,"updateAvailable",2);m([y()],g.prototype,"currentVersion",2);m([y()],g.prototype,"latestVersion",2);m([y()],g.prototype,"updateChecking",2);m([y()],g.prototype,"updateMessage",2);m([y()],g.prototype,"updateProgressSteps",2);m([y()],g.prototype,"updateLastResult",2);m([y()],g.prototype,"uninstallConfirm",2);m([y()],g.prototype,"uninstallBusy",2);m([y()],g.prototype,"uninstallDone",2);m([y()],g.prototype,"uninstallError",2);m([y()],g.prototype,"uninstallConfirmText",2);m([y()],g.prototype,"nostrProfileFormState",2);m([y()],g.prototype,"nostrProfileAccountId",2);m([y()],g.prototype,"presenceLoading",2);m([y()],g.prototype,"presenceEntries",2);m([y()],g.prototype,"presenceError",2);m([y()],g.prototype,"presenceStatus",2);m([y()],g.prototype,"agentsLoading",2);m([y()],g.prototype,"agentsList",2);m([y()],g.prototype,"agentsError",2);m([y()],g.prototype,"sessionsLoading",2);m([y()],g.prototype,"sessionsResult",2);m([y()],g.prototype,"sessionsError",2);m([y()],g.prototype,"cronLoading",2);m([y()],g.prototype,"cronJobs",2);m([y()],g.prototype,"cronStatus",2);m([y()],g.prototype,"cronError",2);m([y()],g.prototype,"cronForm",2);m([y()],g.prototype,"cronRunsJobId",2);m([y()],g.prototype,"cronRuns",2);m([y()],g.prototype,"cronBusy",2);m([y()],g.prototype,"cronNewEventModal",2);m([y()],g.prototype,"cronDetailJobId",2);m([y()],g.prototype,"browserScreencastActive",2);m([y()],g.prototype,"browserScreencastFrame",2);m([y()],g.prototype,"browserScreencastMetadata",2);m([y()],g.prototype,"browserHandoffPending",2);m([y()],g.prototype,"browserHandoffReason",2);m([y()],g.prototype,"browserHandoffId",2);m([y()],g.prototype,"browserInputMode",2);m([y()],g.prototype,"browserFullscreen",2);m([y()],g.prototype,"browserLoading",2);m([y()],g.prototype,"browserError",2);m([y()],g.prototype,"filesLoading",2);m([y()],g.prototype,"filesTree",2);m([y()],g.prototype,"filesRoot",2);m([y()],g.prototype,"filesError",2);m([y()],g.prototype,"filesSelectedPath",2);m([y()],g.prototype,"filesSelectedPaths",2);m([y()],g.prototype,"filesPreviewContent",2);m([y()],g.prototype,"filesPreviewLoading",2);m([y()],g.prototype,"filesPreviewBinary",2);m([y()],g.prototype,"filesPreviewSize",2);m([y()],g.prototype,"filesExpandedDirs",2);m([y()],g.prototype,"filesCurrentDir",2);m([y()],g.prototype,"filesPendingDeletePath",2);m([y()],g.prototype,"filesMessage",2);m([y()],g.prototype,"filesUploadBusy",2);m([y()],g.prototype,"filesReindexBusy",2);m([y()],g.prototype,"filesMemoryStatus",2);m([y()],g.prototype,"embeddingDownloading",2);m([y()],g.prototype,"filesSearchQuery",2);m([y()],g.prototype,"filesSearchResults",2);m([y()],g.prototype,"filesSearchLoading",2);m([y()],g.prototype,"filesSearchAgentId",2);m([y()],g.prototype,"auditEntries",2);m([y()],g.prototype,"auditLoading",2);m([y()],g.prototype,"auditModalOpen",2);m([y()],g.prototype,"skillsLoading",2);m([y()],g.prototype,"skillsReport",2);m([y()],g.prototype,"skillsError",2);m([y()],g.prototype,"skillsFilter",2);m([y()],g.prototype,"skillEdits",2);m([y()],g.prototype,"skillsBusyKey",2);m([y()],g.prototype,"skillMessages",2);m([y()],g.prototype,"adminsLoading",2);m([y()],g.prototype,"adminPhones",2);m([y()],g.prototype,"adminsError",2);m([y()],g.prototype,"adminsSaving",2);m([y()],g.prototype,"adminsNewPhone",2);m([y()],g.prototype,"contactsLoading",2);m([y()],g.prototype,"contactsSaving",2);m([y()],g.prototype,"contactsRecords",2);m([y()],g.prototype,"contactsError",2);m([y()],g.prototype,"contactsSearchQuery",2);m([y()],g.prototype,"contactsEditingId",2);m([y()],g.prototype,"contactsShowAddForm",2);m([y()],g.prototype,"contactsNewPhone",2);m([y()],g.prototype,"contactsNewName",2);m([y()],g.prototype,"imessageEnableConfirm",2);m([y()],g.prototype,"imessageEnabling",2);m([y()],g.prototype,"infoModalOpen",2);m([y()],g.prototype,"workspaces",2);m([y()],g.prototype,"workspacesLoading",2);m([y()],g.prototype,"workspacesError",2);m([y()],g.prototype,"selectedWorkspace",2);m([y()],g.prototype,"addingWorkspace",2);m([y()],g.prototype,"newWorkspaceName",2);m([y()],g.prototype,"newWorkspacePath",2);m([y()],g.prototype,"newWorkspacePin",2);m([y()],g.prototype,"accountPinModalOpen",2);m([y()],g.prototype,"accountPinBusy",2);m([y()],g.prototype,"accountPinError",2);m([y()],g.prototype,"accountPinSuccess",2);m([y()],g.prototype,"apiKeyProviders",2);m([y()],g.prototype,"apiKeyModalOpen",2);m([y()],g.prototype,"apiKeyBusy",2);m([y()],g.prototype,"apiKeyError",2);m([y()],g.prototype,"apiKeySuccess",2);m([y()],g.prototype,"apiKeySavingProvider",2);m([y()],g.prototype,"authApiKeyMode",2);m([y()],g.prototype,"authApiKeyInput",2);m([y()],g.prototype,"authApiKeyBusy",2);m([y()],g.prototype,"authApiKeyError",2);m([y()],g.prototype,"pinChanging",2);m([y()],g.prototype,"pinChangeBusy",2);m([y()],g.prototype,"pinChangeError",2);m([y()],g.prototype,"loginChangePinMode",2);m([y()],g.prototype,"changePinBusy",2);m([y()],g.prototype,"changePinError",2);m([y()],g.prototype,"changePinSuccess",2);m([y()],g.prototype,"workspaceSaving",2);m([y()],g.prototype,"workspaceRemoveConfirm",2);m([y()],g.prototype,"renamingWorkspace",2);m([y()],g.prototype,"renameWorkspaceName",2);m([y()],g.prototype,"debugLoading",2);m([y()],g.prototype,"debugStatus",2);m([y()],g.prototype,"debugHealth",2);m([y()],g.prototype,"debugModels",2);m([y()],g.prototype,"debugHeartbeat",2);m([y()],g.prototype,"debugCallMethod",2);m([y()],g.prototype,"debugCallParams",2);m([y()],g.prototype,"debugCallResult",2);m([y()],g.prototype,"debugCallError",2);m([y()],g.prototype,"logsLoading",2);m([y()],g.prototype,"logsError",2);m([y()],g.prototype,"logsFile",2);m([y()],g.prototype,"logsEntries",2);m([y()],g.prototype,"logsFilterText",2);m([y()],g.prototype,"logsLevelFilters",2);m([y()],g.prototype,"logsAutoFollow",2);m([y()],g.prototype,"logsTruncated",2);m([y()],g.prototype,"logsCursor",2);m([y()],g.prototype,"logsLastFetchAt",2);m([y()],g.prototype,"logsLimit",2);m([y()],g.prototype,"logsMaxBytes",2);m([y()],g.prototype,"logsAtBottom",2);m([y()],g.prototype,"logsSubTab",2);m([y()],g.prototype,"sessionLogsLoading",2);m([y()],g.prototype,"sessionLogsError",2);m([y()],g.prototype,"sessionLogsEntries",2);m([y()],g.prototype,"sessionLogsFilterText",2);m([y()],g.prototype,"sessionLogsTypeFilters",2);m([y()],g.prototype,"sessionLogsAgentFilters",2);m([y()],g.prototype,"sessionLogsAgents",2);m([y()],g.prototype,"sessionLogsAutoFollow",2);m([y()],g.prototype,"sessionLogsCursors",2);m([y()],g.prototype,"sessionLogsLastFetchAt",2);m([y()],g.prototype,"sessionLogsAtBottom",2);m([y()],g.prototype,"chatUserNearBottom",2);g=m([ul("taskmaster-app")],g);
3531
- //# sourceMappingURL=index-xpeRZhsZ.js.map
3554
+ //# sourceMappingURL=index-BVS_Pain.js.map