@pixelzx/genesis 2026.6.22 → 2026.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-registry-DPhQ-gYY.js → command-registry-9isdLVPT.js} +2 -2
- package/dist/{command-registry-DtvwURJ_.js → command-registry-Cz7IG6fj.js} +2 -2
- package/dist/{command-registry-core-DllgASdD.js → command-registry-core-YTbOUvAw.js} +2 -2
- package/dist/{completion-cli-CMRi4kQZ.js → completion-cli-56xGCg11.js} +2 -2
- package/dist/{config-cli-ByTCIigq.js → config-cli-D4puIeCQ.js} +1 -1
- package/dist/control-ui/assets/{agents-QDr5B3Ho.js → agents-JV9Lrpaq.js} +144 -144
- package/dist/control-ui/assets/{canvas-DcQV5mjQ.js → canvas-BGheLorj.js} +44 -44
- package/dist/control-ui/assets/channel-config-extras-BlcntHgk.js +2 -0
- package/dist/control-ui/assets/channels-D_T7jf1i.js +196 -0
- package/dist/control-ui/assets/cron-C-vhYdn2.js +250 -0
- package/dist/control-ui/assets/{debug-BjvJPprv.js → debug-C_P-kmLV.js} +2 -2
- package/dist/control-ui/assets/{index-BTDvMe6P.css → index-CtXQ8kx6.css} +1 -1
- package/dist/control-ui/assets/{index-Chv-rDKB.js → index-or46Cf5v.js} +5 -5
- package/dist/control-ui/assets/{instances-M2ru9deN.js → instances-B2yScyQI.js} +2 -2
- package/dist/control-ui/assets/{logs-l_Xtj11_.js → logs-BiUk-w3p.js} +1 -1
- package/dist/control-ui/assets/{mcp-CCow5u67.js → mcp-Cvo6FOST.js} +2 -2
- package/dist/control-ui/assets/{memory-DEvlXa9C.js → memory-EzZxvhx5.js} +2 -2
- package/dist/control-ui/assets/{models-Tc34Yl09.js → models-CHjUP5zU.js} +2 -2
- package/dist/control-ui/assets/{nodes-CHIr0hLe.js → nodes-CINI4_nb.js} +13 -13
- package/dist/control-ui/assets/{plugins-CRSFM6pi.js → plugins-x9HNTykY.js} +23 -23
- package/dist/control-ui/assets/presenter-DwZ-RSJ8.js +2 -0
- package/dist/control-ui/assets/{preview-DP8t6eAW.js → preview-yS9kUAt_.js} +1 -1
- package/dist/control-ui/assets/{sessions-Xg8c67jk.js → sessions-DnMfNBmX.js} +2 -2
- package/dist/control-ui/assets/{skills-CB5pgqaj.js → skills-B7wdMvcb.js} +8 -8
- package/dist/control-ui/assets/{skills-shared-DoedL_zw.js → skills-shared-C4nHDuFm.js} +1 -1
- package/dist/control-ui/assets/{wallet-C_ySxHYg.js → wallet-Ds1hW8CM.js} +2 -2
- package/dist/control-ui/index.html +2 -2
- package/dist/entry.js +1 -1
- package/dist/extensions/skill-workshop/genesis.plugin.json +2 -1
- package/dist/extensions/skill-workshop/index.js +1 -1
- package/dist/{gateway-cli-BNFp7cLD.js → gateway-cli-CeEdXZHU.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/postinstall-inventory.json +37 -36
- package/dist/{program-C3s7d86C.js → program-0N-JnVM6.js} +1 -1
- package/dist/{register.subclis-ClL1mC0C.js → register.subclis-D0ogazCL.js} +2 -2
- package/dist/{register.subclis-C2UfM0nV.js → register.subclis-DPK0ga6y.js} +1 -1
- package/dist/{register.subclis-core-x3Cm5RAM.js → register.subclis-core-DIGnTWFD.js} +1 -1
- package/dist/{run-main-Cg3U0WGv.js → run-main-kPIaMJwz.js} +4 -4
- package/dist/{runtime-schema-m8uk8t3n.js → runtime-schema-CFPgELGN.js} +1 -1
- package/dist/{server-Cdq-naBB.js → server-HNGA0Ig0.js} +1 -1
- package/dist/{server-plugin-bootstrap-DQo6bnks.js → server-plugin-bootstrap-BXJURCLA.js} +1 -1
- package/dist/{server-plugin-bootstrap-CM8EErso.js → server-plugin-bootstrap-CNJ_xwIU.js} +1 -1
- package/dist/{server.impl-CZEASk_e.js → server.impl-DuIzmQsq.js} +2 -2
- package/package.json +1 -1
- package/dist/control-ui/assets/channels-DTjwzddp.js +0 -140
- package/dist/control-ui/assets/cron-BL9vNTgH.js +0 -78
- package/dist/control-ui/assets/presenter-DQKXVTz4.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./agents-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./agents-JV9Lrpaq.js","./i18n-DLwqUqi0.js","./string-coerce-LCfkQHEZ.js","./presenter-DwZ-RSJ8.js","./channel-config-extras-BlcntHgk.js","./skills-shared-C4nHDuFm.js","./canvas-BGheLorj.js","./channels-D_T7jf1i.js","./cron-C-vhYdn2.js","./debug-C_P-kmLV.js","./instances-B2yScyQI.js","./logs-BiUk-w3p.js","./mcp-Cvo6FOST.js","./models-CHjUP5zU.js","./memory-EzZxvhx5.js","./nodes-CINI4_nb.js","./plugins-x9HNTykY.js","./sessions-DnMfNBmX.js","./skills-B7wdMvcb.js","./wallet-Ds1hW8CM.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./i18n-DLwqUqi0.js";import{n as g,r as _,t as v}from"./string-coerce-LCfkQHEZ.js";var y=Object.create,b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,C=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,T=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),ee=(e,t)=>{let n={};for(var r in e)b(n,r,{get:e[r],enumerable:!0});return t||b(n,Symbol.toStringTag,{value:`Module`}),n},E=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=S(t),a=0,o=i.length,s;a<o;a++)s=i[a],!w.call(e,s)&&s!==n&&b(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=x(t,s))||r.enumerable});return e},te=(e,t,n)=>(n=e==null?{}:y(C(e)),E(t||!e||!e.__esModule?b(n,`default`,{value:e,enumerable:!0}):n,e));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var D=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},O={attribute:!0,type:String,converter:a,reflect:!1,hasChanged:c},ne=(e=O,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function k(e){return(t,n)=>typeof n==`object`?ne(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function A(e){return k({...e,state:!0,attribute:!1})}function j(e){return e?/[\r\n]/.test(e)?null:e:null}function re(e){return j(_(e.hello?.auth?.deviceToken)??null)??j(_(e.settings?.token)??null)??j(_(e.password)??null)??null}function M(e){let t=re(e);return t?`Bearer ${t}`:null}function N(e){let t=new Set,n=[];for(let r of[_(e.hello?.auth?.deviceToken),_(e.settings?.token),_(e.password)]){let e=j(r??null);e&&!t.has(e)&&(t.add(e),n.push(e))}return n}var P={AUTH_REQUIRED:`AUTH_REQUIRED`,AUTH_UNAUTHORIZED:`AUTH_UNAUTHORIZED`,AUTH_TOKEN_MISSING:`AUTH_TOKEN_MISSING`,AUTH_TOKEN_MISMATCH:`AUTH_TOKEN_MISMATCH`,AUTH_TOKEN_NOT_CONFIGURED:`AUTH_TOKEN_NOT_CONFIGURED`,AUTH_PASSWORD_MISSING:`AUTH_PASSWORD_MISSING`,AUTH_PASSWORD_MISMATCH:`AUTH_PASSWORD_MISMATCH`,AUTH_PASSWORD_NOT_CONFIGURED:`AUTH_PASSWORD_NOT_CONFIGURED`,AUTH_BOOTSTRAP_TOKEN_INVALID:`AUTH_BOOTSTRAP_TOKEN_INVALID`,AUTH_DEVICE_TOKEN_MISMATCH:`AUTH_DEVICE_TOKEN_MISMATCH`,AUTH_RATE_LIMITED:`AUTH_RATE_LIMITED`,AUTH_TAILSCALE_IDENTITY_MISSING:`AUTH_TAILSCALE_IDENTITY_MISSING`,AUTH_TAILSCALE_PROXY_MISSING:`AUTH_TAILSCALE_PROXY_MISSING`,AUTH_TAILSCALE_WHOIS_FAILED:`AUTH_TAILSCALE_WHOIS_FAILED`,AUTH_TAILSCALE_IDENTITY_MISMATCH:`AUTH_TAILSCALE_IDENTITY_MISMATCH`,CONTROL_UI_ORIGIN_NOT_ALLOWED:`CONTROL_UI_ORIGIN_NOT_ALLOWED`,CONTROL_UI_DEVICE_IDENTITY_REQUIRED:`CONTROL_UI_DEVICE_IDENTITY_REQUIRED`,DEVICE_IDENTITY_REQUIRED:`DEVICE_IDENTITY_REQUIRED`,DEVICE_AUTH_INVALID:`DEVICE_AUTH_INVALID`,DEVICE_AUTH_DEVICE_ID_MISMATCH:`DEVICE_AUTH_DEVICE_ID_MISMATCH`,DEVICE_AUTH_SIGNATURE_EXPIRED:`DEVICE_AUTH_SIGNATURE_EXPIRED`,DEVICE_AUTH_NONCE_REQUIRED:`DEVICE_AUTH_NONCE_REQUIRED`,DEVICE_AUTH_NONCE_MISMATCH:`DEVICE_AUTH_NONCE_MISMATCH`,DEVICE_AUTH_SIGNATURE_INVALID:`DEVICE_AUTH_SIGNATURE_INVALID`,DEVICE_AUTH_PUBLIC_KEY_INVALID:`DEVICE_AUTH_PUBLIC_KEY_INVALID`,PAIRING_REQUIRED:`PAIRING_REQUIRED`},F={NOT_PAIRED:`not-paired`,ROLE_UPGRADE:`role-upgrade`,SCOPE_UPGRADE:`scope-upgrade`,METADATA_UPGRADE:`metadata-upgrade`},I=new Set([`retry_with_device_token`,`update_auth_configuration`,`update_auth_credentials`,`wait_then_retry`,`review_auth_configuration`]),ie=new Set([`not-paired`,`role-upgrade`,`scope-upgrade`,`metadata-upgrade`]),ae=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,oe={"not-paired":{requirement:`device is not approved yet`,remediationHint:`Approve this device from the pending pairing requests.`,recoveryTitle:`Gateway pairing approval required.`},"role-upgrade":{requirement:`device is asking for a higher role than currently approved`,remediationHint:`Review the requested role upgrade, then approve the pending request.`,recoveryTitle:`Gateway role upgrade approval required.`},"scope-upgrade":{requirement:`device is asking for more scopes than currently approved`,remediationHint:`Review the requested scopes, then approve the pending upgrade.`,recoveryTitle:`Gateway scope upgrade approval required.`},"metadata-upgrade":{requirement:`device identity changed and must be re-approved`,remediationHint:`Review the refreshed device details, then approve the pending request.`,recoveryTitle:`Gateway device refresh approval required.`}},se={"not-paired":`device pairing required`,"role-upgrade":`role upgrade pending approval`,"scope-upgrade":`scope upgrade pending approval`,"metadata-upgrade":`device metadata change pending approval`};function ce(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.code;return typeof t==`string`&&t.trim().length>0?t:null}function le(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t=e,n=typeof t.canRetryWithDeviceToken==`boolean`?t.canRetryWithDeviceToken:void 0,r=_(t.recommendedNextStep)??``;return{canRetryWithDeviceToken:n,recommendedNextStep:I.has(r)?r:void 0}}function ue(e){let t=_(e)??``;return ie.has(t)?t:void 0}function de(e){let t=_(e);return t&&ae.test(t)?t:void 0}function fe(e){if(!Array.isArray(e))return;let t=e.map(e=>_(e)).filter(e=>!!e);return t.length>0?t:[]}function pe(e){return{code:P.PAIRING_REQUIRED,...e.reason?{reason:e.reason}:{},...e.requestId?{requestId:e.requestId}:{},...e.remediationHint?{remediationHint:e.remediationHint}:{},...e.deviceId?{deviceId:e.deviceId}:{},...e.requestedRole?{requestedRole:e.requestedRole}:{},...e.requestedScopes?{requestedScopes:e.requestedScopes}:{},...e.approvedRoles?{approvedRoles:e.approvedRoles}:{},...e.approvedScopes?{approvedScopes:e.approvedScopes}:{}}}function me(e){return e?oe[e].requirement:`device approval is required`}function L(e){return e?oe[e].remediationHint:`Approve the pending device request before retrying.`}function R(e){if(ce(e)!==P.PAIRING_REQUIRED||!e||typeof e!=`object`||Array.isArray(e))return null;let t=e,n=ue(t.reason);return pe({reason:n,requestId:de(t.requestId),remediationHint:_(t.remediationHint)??L(n),deviceId:_(t.deviceId),requestedRole:_(t.requestedRole),requestedScopes:fe(t.requestedScopes),approvedRoles:fe(t.approvedRoles),approvedScopes:fe(t.approvedScopes)})}function he(e){let t=_(e);if(!t)return null;let n=t.trim().toLowerCase(),r;for(let[e,t]of Object.entries(se))if(n.includes(t)){r=e;break}if(!r&&n.includes(`pairing required`)&&(r=F.NOT_PAIRED),!r)return null;let i=de(t.match(/\(requestId:\s*([^\s)]+)\)/i)?.[1]);return{...i?{requestId:i}:{},reason:r}}function ge(e){let t=R(e),n=se[t?.reason??F.NOT_PAIRED];return t?.requestId?`${n} (requestId: ${t.requestId})`:n}function z(e){return ce(e.details)===P.PAIRING_REQUIRED?ge(e.details):_(e.message)??`gateway request failed`}function _e(e){let t=e.scopes.join(`,`),n=e.token??``;return[`v2`,e.deviceId,e.clientId,e.clientMode,e.role,t,String(e.signedAtMs),n,e.nonce].join(`|`)}var ve={WEBCHAT_UI:`webchat-ui`,CONTROL_UI:`genesis-control-ui`,TUI:`genesis-tui`,WEBCHAT:`webchat`,CLI:`cli`,GATEWAY_CLIENT:`gateway-client`,MACOS_APP:`genesis-macos`,IOS_APP:`genesis-ios`,ANDROID_APP:`genesis-android`,NODE_HOST:`node-host`,TEST:`test`,FINGERPRINT:`fingerprint`,PROBE:`genesis-probe`},B=ve,ye={WEBCHAT:`webchat`,CLI:`cli`,UI:`ui`,BACKEND:`backend`,NODE:`node`,PROBE:`probe`,TEST:`test`};new Set(Object.values(ve)),new Set(Object.values(ye));function V(e){return e.trim()}function be(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let e=n.trim();e&&t.add(e)}t.has(`operator.admin`)?(t.add(`operator.read`),t.add(`operator.write`)):t.has(`operator.write`)&&t.add(`operator.read`);let n=Array.from(t);return n.sort(),n}function xe(e){let t=e.adapter.readStore();if(!t||t.deviceId!==e.deviceId)return null;let n=V(e.role),r=t.tokens[n];return!r||typeof r.token!=`string`?null:r}function Se(e){let t=V(e.role),n=e.adapter.readStore(),r={version:1,deviceId:e.deviceId,tokens:n&&n.deviceId===e.deviceId&&n.tokens?{...n.tokens}:{}},i={token:e.token,role:t,scopes:be(e.scopes),updatedAtMs:Date.now()};return r.tokens[t]=i,e.adapter.writeStore(r),i}function Ce(e){let t=e.adapter.readStore();if(!t||t.deviceId!==e.deviceId)return;let n=V(e.role);if(!t.tokens[n])return;let r={version:1,deviceId:t.deviceId,tokens:{...t.tokens}};delete r.tokens[n],e.adapter.writeStore(r)}var we=`genesis.device.auth.v1`;function Te(){try{let e=u()?.getItem(we);if(!e)return null;let t=JSON.parse(e);return!t||t.version!==1||!t.deviceId||typeof t.deviceId!=`string`||!t.tokens||typeof t.tokens!=`object`?null:t}catch{return null}}function Ee(e){try{u()?.setItem(we,JSON.stringify(e))}catch{}}function H(e){return xe({adapter:{readStore:Te,writeStore:Ee},deviceId:e.deviceId,role:e.role})}function De(e){return Se({adapter:{readStore:Te,writeStore:Ee},deviceId:e.deviceId,role:e.role,token:e.token,scopes:e.scopes})}function Oe(e){Ce({adapter:{readStore:Te,writeStore:Ee},deviceId:e.deviceId,role:e.role})}var ke=Object.freeze({p:57896044618658097711785492504343953926634992332820282019728792003956564819949n,n:7237005577332262213973186563042994240857116359379907606001950938285454250989n,h:8n,a:57896044618658097711785492504343953926634992332820282019728792003956564819948n,d:37095705934669439343138083508754565189542113879843219016388785533085940283555n,Gx:15112221349535400772501151409588531511454012693041857206046113283949847762202n,Gy:46316835694926478169428394003475163141307993866256225615783033603165251855960n}),{p:Ae,n:je,Gx:Me,Gy:Ne,a:Pe,d:Fe,h:Ie}=ke,Le=32,Re=(...e)=>{`captureStackTrace`in Error&&typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(...e)},ze=(e=``)=>{let t=Error(e);throw Re(t,ze),t},Be=e=>typeof e==`bigint`,Ve=e=>typeof e==`string`,He=e=>e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1,Ue=(e,t,n=``)=>{let r=He(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`,l=o+`expected Uint8Array`+s+`, got `+c;throw r?RangeError(l):TypeError(l)}return e},We=e=>new Uint8Array(e),Ge=e=>Uint8Array.from(e),Ke=(e,t)=>e.toString(16).padStart(t,`0`),qe=e=>Array.from(Ue(e)).map(e=>Ke(e,2)).join(``),Je={_0:48,_9:57,A:65,F:70,a:97,f:102},Ye=e=>{if(e>=Je._0&&e<=Je._9)return e-Je._0;if(e>=Je.A&&e<=Je.F)return e-(Je.A-10);if(e>=Je.a&&e<=Je.f)return e-(Je.a-10)},Xe=e=>{let t=`hex invalid`;if(!Ve(e))return ze(t);let n=e.length,r=n/2;if(n%2)return ze(t);let i=We(r);for(let n=0,a=0;n<r;n++,a+=2){let r=Ye(e.charCodeAt(a)),o=Ye(e.charCodeAt(a+1));if(r===void 0||o===void 0)return ze(t);i[n]=r*16+o}return i},Ze=()=>globalThis?.crypto,Qe=()=>Ze()?.subtle??ze(`crypto.subtle must be defined, consider polyfill`),$e=(...e)=>{let t=0;for(let n of e)t+=Ue(n).length;let n=We(t),r=0;return e.forEach(e=>{n.set(e,r),r+=e.length}),n},et=(e=Le)=>Ze().getRandomValues(We(e)),tt=BigInt,nt=(e,t,n,r=`bad number: out of range`)=>{if(!Be(e))throw TypeError(r);if(t<=e&&e<n)return e;throw RangeError(r)},rt=(e,t=Ae)=>{let n=e%t;return n>=0n?n:t+n},it=(1n<<255n)-1n,U=e=>{e<0n&&ze(`negative coordinate`);let t=(e>>255n)*19n+(e&it);return t=(t>>255n)*19n+(t&it),t%Ae},at=e=>rt(e,je),ot=(e,t)=>{(e===0n||t<=0n)&&ze(`no inverse n=`+e+` mod=`+t);let n=rt(e,t),r=t,i=0n,a=1n,o=1n,s=0n;for(;n!==0n;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}return r===1n?rt(i,t):ze(`no inverse`)},st=e=>{let t=At[e];return typeof t!=`function`&&ze(`hashes.`+e+` not set`),t},ct=e=>Ue(e,64,`digest`),lt=e=>e instanceof dt?e:ze(`Point expected`),ut=2n**256n,dt=class e{static BASE;static ZERO;X;Y;Z;T;constructor(e,t,n,r){let i=ut;this.X=nt(e,0n,i),this.Y=nt(t,0n,i),this.Z=nt(n,1n,i),this.T=nt(r,0n,i),Object.freeze(this)}static CURVE(){return ke}static fromAffine(t){return new e(t.x,t.y,1n,U(t.x*t.y))}static fromBytes(t,n=!1){let r=Fe,i=Ge(Ue(t,Le)),a=t[31];i[31]=a&-129;let o=ht(i);nt(o,0n,n?ut:Ae);let s=U(o*o),{isValid:c,value:l}=yt(rt(s-1n),U(r*s+1n));c||ze(`bad point: y not sqrt`);let u=(l&1n)==1n,d=(a&128)!=0;return!n&&l===0n&&d&&ze(`bad point: x==0, isLastByteOdd`),d!==u&&(l=rt(-l)),new e(l,o,1n,U(l*o))}static fromHex(t,n){return e.fromBytes(Xe(t),n)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}assertValidity(){let e=Pe,t=Fe,n=this;if(n.is0())return ze(`bad point: ZERO`);let{X:r,Y:i,Z:a,T:o}=n,s=U(r*r),c=U(i*i),l=U(a*a),u=U(l*l);return U(l*(U(s*e)+c))===rt(u+U(t*U(s*c)))?U(r*i)===U(a*o)?this:ze(`bad point: equation left != right (2)`):ze(`bad point: equation left != right (1)`)}equals(e){let{X:t,Y:n,Z:r}=this,{X:i,Y:a,Z:o}=lt(e),s=U(t*o),c=U(i*r),l=U(n*o),u=U(a*r);return s===c&&l===u}is0(){return this.equals(pt)}negate(){return new e(rt(-this.X),this.Y,this.Z,rt(-this.T))}double(){let{X:t,Y:n,Z:r}=this,i=Pe,a=U(t*t),o=U(n*n),s=U(2n*r*r),c=U(i*a),l=rt(t+n),u=rt(U(l*l)-a-o),d=rt(c+o),f=rt(d-s),p=rt(c-o),m=U(u*f),h=U(d*p),g=U(u*p);return new e(m,h,U(f*d),g)}add(t){let{X:n,Y:r,Z:i,T:a}=this,{X:o,Y:s,Z:c,T:l}=lt(t),u=Pe,d=Fe,f=U(n*o),p=U(r*s),m=U(U(a*d)*l),h=U(i*c),g=rt(U(rt(n+r)*rt(o+s))-f-p),_=rt(h-m),v=rt(h+m),y=rt(p-U(u*f)),b=U(g*_),x=U(v*y),S=U(g*y);return new e(b,x,U(_*v),S)}subtract(e){return this.add(lt(e).negate())}multiply(e,t=!0){if(!t&&e===0n||(nt(e,1n,je),!t&&this.is0()))return pt;if(e===1n)return this;if(this.equals(ft))return Rt(e).p;let n=pt,r=ft;for(let i=this;e>0n;i=i.double(),e>>=1n)e&1n?n=n.add(i):t&&(r=r.add(i));return n}multiplyUnsafe(e){return this.multiply(e,!1)}toAffine(){let{X:e,Y:t,Z:n}=this;if(this.equals(pt))return{x:0n,y:1n};let r=ot(n,Ae);return U(n*r)!==1n&&ze(`invalid inverse`),{x:U(e*r),y:U(t*r)}}toBytes(){let{x:e,y:t}=this.toAffine(),n=mt(t);return n[31]|=e&1n?128:0,n}toHex(){return qe(this.toBytes())}clearCofactor(){return this.multiply(tt(Ie),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let e=this.multiply(je/2n,!1).double();return je%2n&&(e=e.add(this)),e.is0()}},ft=new dt(Me,Ne,1n,rt(Me*Ne)),pt=new dt(0n,1n,1n,0n);dt.BASE=ft,dt.ZERO=pt;var mt=e=>Xe(Ke(nt(e,0n,ut),64)).reverse(),ht=e=>tt(`0x`+qe(Ge(Ue(e)).reverse())),gt=(e,t)=>{let n=e;for(;t-- >0n;)n=U(n*n);return n},_t=e=>{let t=U(U(e*e)*e),n=U(gt(U(gt(t,2n)*t),1n)*e),r=U(gt(n,5n)*n),i=U(gt(r,10n)*r),a=U(gt(i,20n)*i),o=U(gt(a,40n)*a);return{pow_p_5_8:U(gt(U(gt(U(gt(U(gt(o,80n)*o),80n)*o),10n)*r),2n)*e),b2:t}},vt=19681161376707505956807079304988542015446066515923890162744021073123829784752n,yt=(e,t)=>{let n=U(t*U(t*t)),r=_t(U(e*U(U(n*n)*t))).pow_p_5_8,i=U(e*U(n*r)),a=U(t*U(i*i)),o=i,s=U(i*vt),c=a===e,l=a===rt(-e),u=a===rt(-e*vt);return c&&(i=o),(l||u)&&(i=s),(rt(i)&1n)==1n&&(i=rt(-i)),{isValid:c||l,value:i}},bt=e=>at(ht(e)),xt=(...e)=>Promise.resolve(st(`sha512Async`)($e(...e))).then(ct),St=(...e)=>ct(st(`sha512`)($e(...e))),Ct=e=>{let t=Ge(e),n=t.slice(0,32);n[0]&=248,n[31]&=127,n[31]|=64;let r=t.slice(32,64),i=bt(n),a=ft.multiply(i);return{head:n,prefix:r,scalar:i,point:a,pointBytes:a.toBytes()}},wt=e=>xt(Ue(e,Le)).then(Ct),Tt=e=>Ct(St(Ue(e,Le))),Et=e=>wt(e).then(e=>e.pointBytes),Dt=e=>xt(e.hashable).then(e.finish),Ot=(e,t,n)=>{let{pointBytes:r,scalar:i}=e,a=bt(t),o=ft.multiply(a).toBytes();return{hashable:$e(o,r,n),finish:e=>Ue($e(o,mt(at(a+bt(e)*i))),64)}},kt=async(e,t)=>{let n=Ue(e),r=await wt(t);return Dt(Ot(r,await xt(r.prefix,n),n))},At={sha512Async:async e=>{let t=Qe(),n=$e(e);return We(await t.digest(`SHA-512`,n.buffer))},sha512:void 0},jt=Object.freeze({getExtendedPublicKeyAsync:wt,getExtendedPublicKey:Tt,randomSecretKey:e=>(e=e===void 0?et(Le):e,Ue(e,Le))}),Mt=8,Nt=Math.ceil(256/Mt)+1,Pt=2**(Mt-1),Ft=()=>{let e=[],t=ft,n=t;for(let r=0;r<Nt;r++){n=t,e.push(n);for(let r=1;r<Pt;r++)n=n.add(t),e.push(n);t=n.double()}return e},It=void 0,Lt=(e,t)=>{let n=t.negate();return e?n:t},Rt=e=>{let t=It||=Ft(),n=pt,r=ft,i=2**Mt,a=i,o=tt(i-1),s=tt(Mt);for(let i=0;i<Nt;i++){let c=Number(e&o);e>>=s,c>Pt&&(c-=a,e+=1n);let l=i*Pt,u=l,d=l+Math.abs(c)-1,f=i%2!=0,p=c<0;c===0?r=r.add(Lt(f,t[u])):n=n.add(Lt(p,t[d]))}return e!==0n&&ze(`invalid wnaf`),{p:n,f:r}},zt=`genesis-device-identity-v1`;function Bt(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``)}function Vt(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t+`=`.repeat((4-t.length%4)%4),r=atob(n),i=new Uint8Array(r.length);for(let e=0;e<r.length;e+=1)i[e]=r.charCodeAt(e);return i}function Ht(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function Ut(e){let t=await crypto.subtle.digest(`SHA-256`,e.slice().buffer);return Ht(new Uint8Array(t))}async function Wt(){let e=jt.randomSecretKey(),t=await Et(e);return{deviceId:await Ut(t),publicKey:Bt(t),privateKey:Bt(e)}}async function Gt(){let e=u();try{let t=e?.getItem(zt);if(t){let n=JSON.parse(t);if(n?.version===1&&typeof n.deviceId==`string`&&typeof n.publicKey==`string`&&typeof n.privateKey==`string`){let t=await Ut(Vt(n.publicKey));if(t!==n.deviceId){let r={...n,deviceId:t};return e?.setItem(zt,JSON.stringify(r)),{deviceId:t,publicKey:n.publicKey,privateKey:n.privateKey}}return{deviceId:n.deviceId,publicKey:n.publicKey,privateKey:n.privateKey}}}}catch{}let t=await Wt(),n={version:1,deviceId:t.deviceId,publicKey:t.publicKey,privateKey:t.privateKey,createdAtMs:Date.now()};return e?.setItem(zt,JSON.stringify(n)),t}async function Kt(e,t){let n=Vt(e);return Bt(await kt(new TextEncoder().encode(t),n))}var qt=!1;function Jt(e){e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=``;for(let n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,`0`);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function Yt(){qt||(qt=!0,console.warn(`[uuid] crypto API missing; refusing insecure UUID generation`))}function Xt(e=globalThis.crypto){if(e&&typeof e.randomUUID==`function`)return e.randomUUID();if(e&&typeof e.getRandomValues==`function`){let t=new Uint8Array(16);return e.getRandomValues(t),Jt(t)}throw Yt(),Error(`Web Crypto is required for UUID generation`)}var Zt=class extends Error{constructor(e){super(z({message:e.message,details:e.details})),this.name=`GatewayRequestError`,this.gatewayCode=e.code,this.details=e.details,this.retryable=e.retryable===!0,this.retryAfterMs=e.retryAfterMs}};function Qt(e){return ce(e?.details)}function $t(e){if(!e)return!1;let t=Qt(e);return t===P.AUTH_TOKEN_MISSING||t===P.AUTH_BOOTSTRAP_TOKEN_INVALID||t===P.AUTH_PASSWORD_MISSING||t===P.AUTH_PASSWORD_MISMATCH||t===P.AUTH_RATE_LIMITED||t===P.PAIRING_REQUIRED||t===P.CONTROL_UI_DEVICE_IDENTITY_REQUIRED||t===P.DEVICE_IDENTITY_REQUIRED}function en(e){try{let t=new URL(e,window.location.href),n=t.hostname.trim().toLowerCase(),r=n===`localhost`||n===`::1`||n===`[::1]`||n===`127.0.0.1`,i=n.startsWith(`127.`);if(r||i)return!0;let a=new URL(window.location.href);return t.host===a.host}catch{return!1}}var tn=`operator`,nn=[`operator.admin`,`operator.read`,`operator.write`,`operator.approvals`,`operator.pairing`],rn=4008,an=1e4;function on(e){let t=e.authToken;if(t||e.authPassword)return{token:t,deviceToken:e.authDeviceToken??e.resolvedDeviceToken,password:e.authPassword}}async function sn(e){let{deviceIdentity:t}=e;if(!t)return;let n=Date.now(),r=e.connectNonce??``,i=_e({deviceId:t.deviceId,clientId:e.client.id,clientMode:e.client.mode,role:e.role,scopes:e.scopes,signedAtMs:n,token:e.authToken??null,nonce:r}),a=await Kt(t.privateKey,i);return{id:t.deviceId,publicKey:t.publicKey,signature:a,signedAt:n,nonce:r}}function cn(e){return!e.deviceTokenRetryBudgetUsed&&!e.authDeviceToken&&!!e.explicitGatewayToken&&!!e.deviceIdentity&&!!e.storedToken&&e.canRetryWithDeviceTokenHint&&en(e.url)}var ln=class{constructor(e){this.opts=e,this.ws=null,this.pending=new Map,this.closed=!1,this.lastSeq=null,this.connectNonce=null,this.connectSent=!1,this.connectTimer=null,this.backoffMs=800,this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.eventListeners=new Set}start(){this.closed=!1,this.connect()}stop(){this.closed=!0,this.clearConnectTimer(),this.ws?.close(),this.ws=null,this.pendingConnectError=void 0,this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.flushPending(Error(`gateway client stopped`))}get connected(){return this.ws?.readyState===WebSocket.OPEN}connect(){this.closed||(this.ws=new WebSocket(this.opts.url),this.ws.addEventListener(`open`,()=>this.queueConnect()),this.ws.addEventListener(`message`,e=>this.handleMessage(String(e.data??``))),this.ws.addEventListener(`close`,e=>{let t=e.reason??``,n=this.pendingConnectError;this.pendingConnectError=void 0,this.ws=null,this.flushPending(Error(`gateway closed (${e.code}): ${t}`)),this.opts.onClose?.({code:e.code,reason:t,error:n}),!(Qt(n)===P.AUTH_TOKEN_MISMATCH&&this.deviceTokenRetryBudgetUsed&&!this.pendingDeviceTokenRetry)&&($t(n)||this.scheduleReconnect())}),this.ws.addEventListener(`error`,()=>{}))}scheduleReconnect(){if(this.closed)return;let e=this.backoffMs;this.backoffMs=Math.min(this.backoffMs*1.7,15e3),this.clearConnectTimer(),this.connectTimer=window.setTimeout(()=>{this.connectTimer=null,this.connect()},e)}flushPending(e){for(let[,t]of this.pending)t.timeout!==null&&window.clearTimeout(t.timeout),t.reject(e);this.pending.clear()}buildConnectClient(){return{id:this.opts.clientName??B.CONTROL_UI,version:this.opts.clientVersion??`control-ui`,platform:this.opts.platform??navigator.platform??`web`,mode:this.opts.mode??ye.WEBCHAT,instanceId:this.opts.instanceId}}buildConnectParams(e){return{minProtocol:4,maxProtocol:4,client:e.client,role:e.role,scopes:e.scopes,device:e.device,caps:[`tool-events`,`chat-incremental`],auth:e.auth,userAgent:navigator.userAgent,locale:navigator.language}}async buildConnectPlan(){let e=tn,t=[...nn],n=this.buildConnectClient(),r=this.opts.token?.trim()||void 0,i=this.opts.password?.trim()||void 0,a=typeof crypto<`u`&&!!crypto.subtle,o=null,s={authToken:r,authPassword:i,canFallbackToShared:!1};return a&&(o=await Gt(),s=this.selectConnectAuth({role:e,deviceId:o.deviceId}),this.pendingDeviceTokenRetry&&s.authDeviceToken&&(this.pendingDeviceTokenRetry=!1)),{role:e,scopes:t,client:n,explicitGatewayToken:r,selectedAuth:s,auth:on(s),deviceIdentity:o,device:await sn({deviceIdentity:o,client:n,role:e,scopes:t,authToken:s.authToken,connectNonce:this.connectNonce})}}handleConnectHello(e,t){this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,e?.auth?.deviceToken&&t.deviceIdentity&&De({deviceId:t.deviceIdentity.deviceId,role:e.auth.role??t.role,token:e.auth.deviceToken,scopes:e.auth.scopes??[]}),this.backoffMs=800,this.opts.onHello?.(e)}handleConnectFailure(e,t){let n=e instanceof Zt?Qt(e):null,r=e instanceof Zt?le(e.details):{},i=r.recommendedNextStep===`retry_with_device_token`,a=r.canRetryWithDeviceToken===!0||i||n===P.AUTH_TOKEN_MISMATCH;cn({deviceTokenRetryBudgetUsed:this.deviceTokenRetryBudgetUsed,authDeviceToken:t.selectedAuth.authDeviceToken,explicitGatewayToken:t.explicitGatewayToken,deviceIdentity:t.deviceIdentity,storedToken:t.selectedAuth.storedToken,canRetryWithDeviceTokenHint:a,url:this.opts.url})&&(this.pendingDeviceTokenRetry=!0,this.deviceTokenRetryBudgetUsed=!0),e instanceof Zt?this.pendingConnectError={code:e.gatewayCode,message:e.message,details:e.details,retryable:e.retryable,retryAfterMs:e.retryAfterMs}:this.pendingConnectError=void 0,t.selectedAuth.canFallbackToShared&&t.deviceIdentity&&n===P.AUTH_DEVICE_TOKEN_MISMATCH&&Oe({deviceId:t.deviceIdentity.deviceId,role:t.role}),this.ws?.close(rn,`connect failed`)}async sendConnect(){if(this.connectSent)return;this.connectSent=!0,this.clearConnectTimer();let e=await this.buildConnectPlan();this.request(`connect`,this.buildConnectParams(e),{timeoutMs:an}).then(t=>this.handleConnectHello(t,e)).catch(t=>this.handleConnectFailure(t,e))}handleMessage(e){let t;try{t=JSON.parse(e)}catch{return}let n=t;if(n.type===`event`){let e=t;if(e.event===`connect.challenge`){let t=e.payload,n=t&&typeof t.nonce==`string`?t.nonce:null;n&&(this.connectNonce=n,this.sendConnect());return}let n=typeof e.seq==`number`?e.seq:null;n!==null&&(this.lastSeq!==null&&n>this.lastSeq+1&&this.opts.onGap?.({expected:this.lastSeq+1,received:n}),this.lastSeq=n);try{this.opts.onEvent?.(e);for(let t of this.eventListeners)t(e)}catch(e){console.error(`[gateway] event handler error:`,e)}return}if(n.type===`res`){let e=t,n=this.pending.get(e.id);if(!n)return;this.pending.delete(e.id),n.timeout!==null&&window.clearTimeout(n.timeout),e.ok?n.resolve(e.payload):n.reject(new Zt({code:e.error?.code??`UNAVAILABLE`,message:e.error?.message??`request failed`,details:e.error?.details,retryable:e.error?.retryable,retryAfterMs:e.error?.retryAfterMs}));return}}selectConnectAuth(e){let t=this.opts.token?.trim()||void 0,n=this.opts.password?.trim()||void 0,r=H({deviceId:e.deviceId,role:e.role}),i=r?.scopes??[],a=e.role!==`operator`||i.includes(`operator.read`)||i.includes(`operator.write`)||i.includes(`operator.admin`)?r?.token:void 0,o=this.pendingDeviceTokenRetry&&!!t&&!!a&&en(this.opts.url),s=t||n?void 0:a??void 0;return{authToken:t??s,authDeviceToken:o?a??void 0:void 0,authPassword:n,resolvedDeviceToken:s,storedToken:a??void 0,canFallbackToShared:!!(a&&t)}}request(e,t,n){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return Promise.reject(Error(`gateway not connected`));let r=Xt(),i={type:`req`,id:r,method:e,params:t},a=new Promise((t,i)=>{let a=n?.timeoutMs===null?null:typeof n?.timeoutMs==`number`&&Number.isFinite(n.timeoutMs)?window.setTimeout(()=>{this.pending.delete(r),i(Error(`gateway request timeout for ${e}`))},Math.max(1,n.timeoutMs)):null;this.pending.set(r,{resolve:e=>t(e),reject:i,timeout:a})});return this.ws.send(JSON.stringify(i)),a}addEventListener(e){return this.eventListeners.add(e),()=>{this.eventListeners.delete(e)}}queueConnect(){this.connectNonce=null,this.connectSent=!1,this.clearConnectTimer(),this.connectTimer=window.setTimeout(()=>{this.connectTimer=null,this.sendConnect()},750)}clearConnectTimer(){this.connectTimer!==null&&(window.clearTimeout(this.connectTimer),this.connectTimer=null)}};function un(e){return e instanceof Zt?Qt(e)===P.AUTH_UNAUTHORIZED?!0:e.message.includes(`missing scope: operator.read`):!1}function dn(e){return`This connection is missing operator.read, so ${e} cannot be loaded yet.`}async function fn(e,t){if(!(!e.client||!e.connected)&&!e.channelsLoading){e.channelsLoading=!0,e.channelsError=null;try{e.channelsSnapshot=await e.client.request(`channels.status`,{probe:t,timeoutMs:8e3}),e.channelsLastSuccess=Date.now()}catch(t){un(t)?(e.channelsSnapshot=null,e.channelsError=dn(`channel status`)):e.channelsError=String(t)}finally{e.channelsLoading=!1}}}async function pn(e,t){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{let n=await e.client.request(`web.login.start`,{force:t,timeoutMs:3e4});e.whatsappLoginMessage=n.message??null,e.whatsappLoginQrDataUrl=n.qrDataUrl??null,e.whatsappLoginConnected=typeof n.connected==`boolean`?n.connected:null}catch(t){e.whatsappLoginMessage=String(t),e.whatsappLoginQrDataUrl=null,e.whatsappLoginConnected=null}finally{e.whatsappBusy=!1}}}async function mn(e){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{let t=await e.client.request(`web.login.wait`,{timeoutMs:12e4,currentQrDataUrl:e.whatsappLoginQrDataUrl??void 0});e.whatsappLoginMessage=t.message??null,e.whatsappLoginConnected=t.connected??null,t.qrDataUrl?e.whatsappLoginQrDataUrl=t.qrDataUrl:t.connected&&(e.whatsappLoginQrDataUrl=null)}catch(t){e.whatsappLoginMessage=String(t),e.whatsappLoginConnected=null}finally{e.whatsappBusy=!1}}}async function hn(e){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{await e.client.request(`channels.logout`,{channel:`whatsapp`}),e.whatsappLoginMessage=`Logged out.`,e.whatsappLoginQrDataUrl=null,e.whatsappLoginConnected=null}catch(t){e.whatsappLoginMessage=String(t)}finally{e.whatsappBusy=!1}}}var gn=te(T(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},`a`,{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),`a`,{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=!1,S=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:x?`pure`:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),C=e(function(e){var r=b(`src`),i=`toString`,a=(``+S).split(i);n.inspectSource=function(e){return S.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||S.call(this)})}),w=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},T=function(e,t,n){if(w(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},ee=`prototype`,E=function(e,r,i){var a=e&E.F,o=e&E.G,s=e&E.S,c=e&E.P,l=e&E.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[ee],d=o?n:n[r]||(n[r]={}),f=d[ee]||(d[ee]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?T(g,t):c&&typeof g==`function`?T(Function.call,g):g,u&&C(u,p,g,e&E.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var te=E,D=Math.ceil,O=Math.floor,ne=function(e){return isNaN(e=+e)?0:(e>0?O:D)(e)},k=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},A=function(e){return function(t,n){var r=String(k(t)),i=ne(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);te(te.P,`String`,{codePointAt:function(e){return A(this,e)}}),n.String.codePointAt;var j=Math.max,re=Math.min,M=function(e,t){return e=ne(e),e<0?j(e+t,0):re(e,t)},N=String.fromCharCode,P=String.fromCodePoint;te(te.S+te.F*(!!P&&P.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],M(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?N(a):N(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var F={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},I={isSpaceSeparator:function(e){return typeof e==`string`&&F.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||F.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||F.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},ie,ae,oe,se,ce,le,ue,de,fe,pe=function(e,t){ie=String(e),ae=`start`,oe=[],se=0,ce=1,le=0,ue=void 0,de=void 0,fe=void 0;do ue=_e(),we[ae]();while(ue.type!==`eof`);return typeof t==`function`?me({"":fe},``,t):fe};function me(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=me(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=me(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var L,R,he,ge,z;function _e(){for(L=`default`,R=``,he=!1,ge=1;;){z=ve();var e=ye[L]();if(e)return e}}function ve(){if(ie[se])return String.fromCodePoint(ie.codePointAt(se))}function B(){var e=ve();return e===`
|
|
3
3
|
`?(ce++,le=0):e?le+=e.length:le++,e&&(se+=e.length),e}var ye={default:function(){switch(z){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
|
|
4
4
|
`:case`\r`:case`\u2028`:case`\u2029`:B();return;case`/`:B(),L=`comment`;return;case void 0:return B(),V(`eof`)}if(I.isSpaceSeparator(z)){B();return}return ye[ae]()},comment:function(){switch(z){case`*`:B(),L=`multiLineComment`;return;case`/`:B(),L=`singleLineComment`;return}throw H(B())},multiLineComment:function(){switch(z){case`*`:B(),L=`multiLineCommentAsterisk`;return;case void 0:throw H(B())}B()},multiLineCommentAsterisk:function(){switch(z){case`*`:B();return;case`/`:B(),L=`default`;return;case void 0:throw H(B())}B(),L=`multiLineComment`},singleLineComment:function(){switch(z){case`
|
|
@@ -5671,7 +5671,7 @@ ${e.pluginDescription}</pre
|
|
|
5671
5671
|
</div>
|
|
5672
5672
|
</div>
|
|
5673
5673
|
</section>
|
|
5674
|
-
`}var LF=new Set([`config`,`sessions`,`overview`,`channels`,`cron`,`agents`,`skills`,`plugins`,`mcp`,`canvas`,`wallet`]);function RF(e){return cu(e,{search:e.sessionsSearchQuery})}function zF(e){!e.client||!e.connected||e.modelsLoading||e.chatModelCatalog.length>0||(e.modelsLoading=!0,ql(e.client).then(t=>{e.chatModelCatalog=t}).finally(()=>{e.modelsLoading=!1}))}function BF(e){let t=e.agentsSelectedId??e.assistantAgentId;!e.client||!e.connected||e.memoryLoading||!t||e.memoryEntries.length>0||(e.memoryLoading=!0,e.memoryError=null,pM(e.client,t).then(t=>{e.memoryEntries=t}).catch(t=>{e.memoryError=String(t)}).finally(()=>{e.memoryLoading=!1}))}var VF;function HF(e){return e instanceof Error&&e.message?e.message:String(e)}function UF(e){let t={mod:null,promise:null,error:null},n=()=>t.promise?t.promise:t.mod?Promise.resolve():(t.error=null,t.promise=e().then(e=>{t.mod=e}).catch(e=>{t.error=HF(e),console.error(`[genesis] failed to load Control UI view:`,e)}).finally(()=>{t.promise=null,VF?.()}),t.promise);return()=>t.mod?{status:`ready`,mod:t.mod}:(!t.promise&&!t.error&&n(),t.error?{status:`error`,message:t.error,retry:()=>{t.error=null,n(),VF?.()}}:{status:`loading`,promise:t.promise??n()})}var WF=UF(()=>e(()=>import(`./agents-
|
|
5674
|
+
`}var LF=new Set([`config`,`sessions`,`overview`,`channels`,`cron`,`agents`,`skills`,`plugins`,`mcp`,`canvas`,`wallet`]);function RF(e){return cu(e,{search:e.sessionsSearchQuery})}function zF(e){!e.client||!e.connected||e.modelsLoading||e.chatModelCatalog.length>0||(e.modelsLoading=!0,ql(e.client).then(t=>{e.chatModelCatalog=t}).finally(()=>{e.modelsLoading=!1}))}function BF(e){let t=e.agentsSelectedId??e.assistantAgentId;!e.client||!e.connected||e.memoryLoading||!t||e.memoryEntries.length>0||(e.memoryLoading=!0,e.memoryError=null,pM(e.client,t).then(t=>{e.memoryEntries=t}).catch(t=>{e.memoryError=String(t)}).finally(()=>{e.memoryLoading=!1}))}var VF;function HF(e){return e instanceof Error&&e.message?e.message:String(e)}function UF(e){let t={mod:null,promise:null,error:null},n=()=>t.promise?t.promise:t.mod?Promise.resolve():(t.error=null,t.promise=e().then(e=>{t.mod=e}).catch(e=>{t.error=HF(e),console.error(`[genesis] failed to load Control UI view:`,e)}).finally(()=>{t.promise=null,VF?.()}),t.promise);return()=>t.mod?{status:`ready`,mod:t.mod}:(!t.promise&&!t.error&&n(),t.error?{status:`error`,message:t.error,retry:()=>{t.error=null,n(),VF?.()}}:{status:`loading`,promise:t.promise??n()})}var WF=UF(()=>e(()=>import(`./agents-JV9Lrpaq.js`),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),GF=UF(()=>e(()=>import(`./canvas-BGheLorj.js`),__vite__mapDeps([6,1]),import.meta.url)),KF=UF(()=>e(()=>import(`./channels-D_T7jf1i.js`),__vite__mapDeps([7,1,4]),import.meta.url)),qF=UF(()=>e(()=>import(`./cron-C-vhYdn2.js`),__vite__mapDeps([8,1,3]),import.meta.url)),JF=UF(()=>e(()=>import(`./debug-C_P-kmLV.js`),__vite__mapDeps([9,1,3]),import.meta.url)),YF=UF(()=>e(()=>import(`./instances-B2yScyQI.js`),__vite__mapDeps([10,1,3]),import.meta.url)),XF=UF(()=>e(()=>import(`./logs-BiUk-w3p.js`),__vite__mapDeps([11,1,2]),import.meta.url)),ZF=UF(()=>e(()=>import(`./mcp-Cvo6FOST.js`),__vite__mapDeps([12,1]),import.meta.url)),QF=UF(()=>e(()=>import(`./models-CHjUP5zU.js`),__vite__mapDeps([13,1]),import.meta.url)),$F=UF(()=>e(()=>import(`./memory-EzZxvhx5.js`),__vite__mapDeps([14,1]),import.meta.url)),eI=UF(()=>e(()=>import(`./nodes-CINI4_nb.js`),__vite__mapDeps([15,1,2]),import.meta.url)),tI=UF(()=>e(()=>import(`./plugins-x9HNTykY.js`),__vite__mapDeps([16,1,2]),import.meta.url)),nI=UF(()=>e(()=>import(`./sessions-DnMfNBmX.js`),__vite__mapDeps([17,1,2,3]),import.meta.url)),rI=UF(()=>e(()=>import(`./skills-B7wdMvcb.js`),__vite__mapDeps([18,1,2,5]),import.meta.url)),iI=UF(()=>e(()=>import(`./wallet-Ds1hW8CM.js`),__vite__mapDeps([19,1]),import.meta.url));async function aI(e,t){let n=await $m(e,t);n&&(e.mcpOAuthFlow=n,e.mcpOAuthPopup=hE(n.authorizeUrl,`mcp-oauth-${encodeURIComponent(t)}`,`width=520,height=720,noopener=no`))}function oI(e){return typeof e!=`number`||!Number.isFinite(e)?null:new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function sI(e){if(!e?.phases)return null;let t;for(let n of Object.values(e.phases))!n.enabled||typeof n.nextRunAtMs!=`number`||(t===void 0||n.nextRunAtMs<t)&&(t=n.nextRunAtMs);return oI(t)}var cI=null,lI=null;function uI(){return n`
|
|
5675
5675
|
<section class="card">
|
|
5676
5676
|
<div class="muted">${f(`common.loading`)}</div>
|
|
5677
5677
|
</section>
|
|
@@ -5867,7 +5867,7 @@ ${e.pluginDescription}</pre
|
|
|
5867
5867
|
</section>`}
|
|
5868
5868
|
${e.tab===`overview`?IF({connected:e.connected,hello:e.hello,settings:e.settings,password:e.password,lastError:e.lastError,lastErrorCode:e.lastErrorCode,presenceCount:i,sessionsCount:a,cronEnabled:e.cronStatus?.enabled??null,cronNext:o,lastChannelsRefresh:e.channelsLastSuccess,warnQueryToken:IO,modelAuthStatus:e.modelAuthStatusResult,usageResult:e.usageResult,sessionsResult:e.sessionsResult,skillsReport:e.skillsReport,cronJobs:e.cronJobs,cronStatus:e.cronStatus,walletSummary:e.walletSummary,walletSummaryError:e.walletSummaryError,attentionItems:e.attentionItems,eventLog:e.eventLog,overviewLogLines:e.overviewLogLines,showGatewayToken:e.overviewShowGatewayToken,showGatewayPassword:e.overviewShowGatewayPassword,onSettingsChange:t=>e.applySettings(t),onPasswordChange:t=>e.password=t,onSessionKeyChange:t=>{e.sessionKey=t,e.chatMessage=``,e.chatMessages=[],e.chatToolMessages=[],e.chatStream=null,e.chatRunId=null,e.chatQueue=[],e.resetToolStream(),e.applySettings({...e.settings,sessionKey:t,lastActiveSessionKey:t})},onToggleGatewayTokenVisibility:()=>{e.overviewShowGatewayToken=!e.overviewShowGatewayToken},onToggleGatewayPasswordVisibility:()=>{e.overviewShowGatewayPassword=!e.overviewShowGatewayPassword},onConnect:()=>e.connect(),onRefresh:()=>e.loadOverview({refresh:!0}),onNavigate:t=>e.setTab(t),onRefreshLogs:()=>e.loadOverview({refresh:!0})}):s}
|
|
5869
5869
|
${e.tab===`canvas`?fI(GF,t=>t.renderCanvas({connected:e.connected,client:e.client,gatewayUrl:e.settings.gatewayUrl,authToken:e.settings.token,password:e.password,basePath:e.basePath,canvasHostUrl:e.hello?.canvasHostUrl??null,embedSandboxMode:e.embedSandboxMode,allowExternalEmbedUrls:e.allowExternalEmbedUrls,onNavigateToChat:()=>e.setTab(`chat`),onRequestUpdate:r})):s}
|
|
5870
|
-
${e.tab===`channels`?fI(KF,t=>t.renderChannels({connected:e.connected,loading:e.channelsLoading,snapshot:e.channelsSnapshot,lastError:e.channelsError,lastSuccessAt:e.channelsLastSuccess,whatsappMessage:e.whatsappLoginMessage,whatsappQrDataUrl:e.whatsappLoginQrDataUrl,whatsappConnected:e.whatsappLoginConnected,whatsappBusy:e.whatsappBusy,configSchema:e.configSchema,configSchemaLoading:e.configSchemaLoading,configForm:e.configForm,configUiHints:e.configUiHints,configSaving:e.configSaving,configFormDirty:e.configFormDirty,nostrProfileFormState:e.nostrProfileFormState,nostrProfileAccountId:e.nostrProfileAccountId,channelWizardStep:e.channelWizardStep,channelWizardInput:e.channelWizardInput,channelWizardBusy:e.channelWizardBusy,channelWizardError:e.channelWizardError,channelWizardMessage:e.channelWizardMessage,onRefresh:t=>fn(e,t),onChannelWizardStart:()=>e.handleChannelWizardStart(),onChannelWizardSubmit:()=>e.handleChannelWizardSubmit(),onChannelWizardCancel:()=>e.handleChannelWizardCancel(),onChannelWizardInput:t=>e.handleChannelWizardInput(t),onChannelWizardClose:()=>e.handleChannelWizardClose(),onWhatsAppStart:t=>e.handleWhatsAppStart(t),onWhatsAppWait:()=>e.handleWhatsAppWait(),onWhatsAppLogout:()=>e.handleWhatsAppLogout(),onConfigPatch:(t,n)=>dr(e,t,n),onConfigSave:()=>e.handleChannelConfigSave(),onConfigReload:()=>e.handleChannelConfigReload(),onNostrProfileEdit:(t,n)=>e.handleNostrProfileEdit(t,n),onNostrProfileCancel:()=>e.handleNostrProfileCancel(),onNostrProfileFieldChange:(t,n)=>e.handleNostrProfileFieldChange(t,n),onNostrProfileSave:()=>e.handleNostrProfileSave(),onNostrProfileImport:()=>e.handleNostrProfileImport(),onNostrProfileToggleAdvanced:()=>e.handleNostrProfileToggleAdvanced()})):s}
|
|
5870
|
+
${e.tab===`channels`?fI(KF,t=>t.renderChannels({connected:e.connected,loading:e.channelsLoading,snapshot:e.channelsSnapshot,lastError:e.channelsError,lastSuccessAt:e.channelsLastSuccess,whatsappMessage:e.whatsappLoginMessage,whatsappQrDataUrl:e.whatsappLoginQrDataUrl,whatsappConnected:e.whatsappLoginConnected,whatsappBusy:e.whatsappBusy,configSchema:e.configSchema,configSchemaLoading:e.configSchemaLoading,configForm:e.configForm,configUiHints:e.configUiHints,configSaving:e.configSaving,configFormDirty:e.configFormDirty,nostrProfileFormState:e.nostrProfileFormState,nostrProfileAccountId:e.nostrProfileAccountId,channelWizardStep:e.channelWizardStep,channelWizardInput:e.channelWizardInput,channelWizardBusy:e.channelWizardBusy,channelWizardError:e.channelWizardError,channelWizardMessage:e.channelWizardMessage,selectedChannelId:e.channelSettingsId??null,onChannelSelect:t=>{e.channelSettingsId=t,e.configSchema||Hn(e),r?.()},onChannelSettingsClose:()=>{e.channelSettingsId=null,r?.()},onRefresh:t=>fn(e,t),onChannelWizardStart:()=>e.handleChannelWizardStart(),onChannelWizardSubmit:()=>e.handleChannelWizardSubmit(),onChannelWizardCancel:()=>e.handleChannelWizardCancel(),onChannelWizardInput:t=>e.handleChannelWizardInput(t),onChannelWizardClose:()=>e.handleChannelWizardClose(),onWhatsAppStart:t=>e.handleWhatsAppStart(t),onWhatsAppWait:()=>e.handleWhatsAppWait(),onWhatsAppLogout:()=>e.handleWhatsAppLogout(),onConfigPatch:(t,n)=>dr(e,t,n),onConfigSave:()=>e.handleChannelConfigSave(),onConfigReload:()=>e.handleChannelConfigReload(),onNostrProfileEdit:(t,n)=>e.handleNostrProfileEdit(t,n),onNostrProfileCancel:()=>e.handleNostrProfileCancel(),onNostrProfileFieldChange:(t,n)=>e.handleNostrProfileFieldChange(t,n),onNostrProfileSave:()=>e.handleNostrProfileSave(),onNostrProfileImport:()=>e.handleNostrProfileImport(),onNostrProfileToggleAdvanced:()=>e.handleNostrProfileToggleAdvanced()})):s}
|
|
5871
5871
|
${e.tab===`instances`?fI(YF,t=>t.renderInstances({loading:e.presenceLoading,entries:e.presenceEntries,lastError:e.presenceError,statusMessage:e.presenceStatus,onRefresh:()=>vh(e)})):s}
|
|
5872
5872
|
${e.tab===`sessions`?fI(nI,t=>t.renderSessions({loading:e.sessionsLoading,result:e.sessionsResult,error:e.sessionsError,activeMinutes:e.sessionsFilterActive,limit:e.sessionsFilterLimit,includeGlobal:e.sessionsIncludeGlobal,includeUnknown:e.sessionsIncludeUnknown,basePath:e.basePath,searchQuery:e.sessionsSearchQuery,sortColumn:e.sessionsSortColumn,sortDir:e.sessionsSortDir,page:e.sessionsPage,pageSize:e.sessionsPageSize,selectedKeys:e.sessionsSelectedKeys,expandedCheckpointKey:e.sessionsExpandedCheckpointKey,checkpointItemsByKey:e.sessionsCheckpointItemsByKey,checkpointLoadingKey:e.sessionsCheckpointLoadingKey,checkpointBusyKey:e.sessionsCheckpointBusyKey,checkpointErrorByKey:e.sessionsCheckpointErrorByKey,onFiltersChange:t=>{e.sessionsFilterActive=t.activeMinutes,e.sessionsFilterLimit=t.limit,e.sessionsIncludeGlobal=t.includeGlobal,e.sessionsIncludeUnknown=t.includeUnknown,e.sessionsPage=0,RF(e)},onSearchChange:t=>{e.sessionsSearchQuery=t,e.sessionsPage=0,RF(e)},onSortChange:(t,n)=>{e.sessionsSortColumn=t,e.sessionsSortDir=n,e.sessionsPage=0},onPageChange:t=>{e.sessionsPage=t},onPageSizeChange:t=>{e.sessionsPageSize=t,e.sessionsPage=0},onRefresh:()=>RF(e),onPatch:(t,n)=>uu(e,t,n),onToggleSelect:t=>{let n=new Set(e.sessionsSelectedKeys);n.has(t)?n.delete(t):n.add(t),e.sessionsSelectedKeys=n},onSelectPage:t=>{let n=new Set(e.sessionsSelectedKeys);for(let e of t)n.add(e);e.sessionsSelectedKeys=n},onDeselectPage:t=>{let n=new Set(e.sessionsSelectedKeys);for(let e of t)n.delete(e);e.sessionsSelectedKeys=n},onDeselectAll:()=>{e.sessionsSelectedKeys=new Set},onDeleteSelected:async()=>{let t=await du(e,[...e.sessionsSelectedKeys]);if(t.length>0){let n=new Set(e.sessionsSelectedKeys);for(let e of t)n.delete(e);e.sessionsSelectedKeys=n}},onNavigateToChat:t=>{aM(e,t),e.setTab(`chat`)},onToggleCheckpointDetails:t=>fu(e,t),onBranchFromCheckpoint:async(t,n)=>{let r=await pu(e,t,n);r&&(aM(e,r),e.setTab(`chat`))},onRestoreCheckpoint:(t,n)=>mu(e,t,n)})):s}
|
|
5873
5873
|
${wj(e)}
|
|
@@ -5896,5 +5896,5 @@ ${e.pluginDescription}</pre
|
|
|
5896
5896
|
`).trim()}function tL(e){return new Promise((t,n)=>{let r=window.setTimeout(()=>{i(),n(Error(`Genesis tool call timed out`))},e.timeoutMs),i=e.client.addEventListener(a=>{if(a.event!==`chat`)return;let o=a.payload;!o||o.runId!==e.runId||(o.state===`final`?(window.clearTimeout(r),i(),t(eL(o.message)||`Genesis finished with no text.`)):o.state===`error`&&(window.clearTimeout(r),i(),n(Error(o.errorMessage??`Genesis tool call failed`))))})})}var nL=class{constructor(e,t,n={}){this.client=e,this.sessionKey=t,this.callbacks=n,this.peer=null,this.channel=null,this.media=null,this.audio=null,this.closed=!1,this.toolBuffers=new Map}async start(){if(!navigator.mediaDevices?.getUserMedia||typeof RTCPeerConnection>`u`)throw Error(`Realtime Talk requires browser WebRTC and microphone access`);this.closed=!1,this.callbacks.onStatus?.(`connecting`);let e=await this.client.request(`talk.realtime.session`,{sessionKey:this.sessionKey});this.peer=new RTCPeerConnection,this.audio=document.createElement(`audio`),this.audio.autoplay=!0,this.audio.style.display=`none`,document.body.append(this.audio),this.peer.addEventListener(`track`,e=>{this.audio&&(this.audio.srcObject=e.streams[0])}),this.media=await navigator.mediaDevices.getUserMedia({audio:!0});for(let e of this.media.getAudioTracks())this.peer.addTrack(e,this.media);this.channel=this.peer.createDataChannel(`oai-events`),this.channel.addEventListener(`open`,()=>this.callbacks.onStatus?.(`listening`)),this.channel.addEventListener(`message`,e=>this.handleRealtimeEvent(e.data)),this.peer.addEventListener(`connectionstatechange`,()=>{this.closed||(this.peer?.connectionState===`failed`||this.peer?.connectionState===`closed`)&&this.callbacks.onStatus?.(`error`,`Realtime connection closed`)});let t=await this.peer.createOffer();await this.peer.setLocalDescription(t);let n=await fetch(`https://api.openai.com/v1/realtime/calls`,{method:`POST`,body:t.sdp,headers:{Authorization:`Bearer ${e.clientSecret}`,"Content-Type":`application/sdp`}});if(!n.ok)throw Error(`Realtime WebRTC setup failed (${n.status})`);await this.peer.setRemoteDescription({type:`answer`,sdp:await n.text()})}stop(){this.closed=!0,this.callbacks.onStatus?.(`idle`),this.channel?.close(),this.channel=null,this.peer?.close(),this.peer=null,this.media?.getTracks().forEach(e=>e.stop()),this.media=null,this.audio?.remove(),this.audio=null,this.toolBuffers.clear()}send(e){this.channel?.readyState===`open`&&this.channel.send(JSON.stringify(e))}handleRealtimeEvent(e){let t;try{t=JSON.parse(String(e))}catch{return}switch(t.type){case`conversation.item.input_audio_transcription.completed`:t.transcript&&this.callbacks.onTranscript?.({role:`user`,text:t.transcript,final:!0});return;case`response.audio_transcript.done`:t.transcript&&this.callbacks.onTranscript?.({role:`assistant`,text:t.transcript,final:!0});return;case`response.function_call_arguments.delta`:this.bufferToolDelta(t);return;case`response.function_call_arguments.done`:this.handleToolCall(t);return;default:return}}bufferToolDelta(e){let t=e.item_id??`unknown`,n=this.toolBuffers.get(t);if(n){n.args+=e.delta??``;return}this.toolBuffers.set(t,{name:e.name??``,callId:e.call_id??``,args:e.delta??``})}async handleToolCall(e){let t=e.item_id??`unknown`,n=this.toolBuffers.get(t);this.toolBuffers.delete(t);let r=n?.name||e.name||``,i=n?.callId||e.call_id||``;if(r!==`genesis_agent_consult`||!i)return;this.callbacks.onStatus?.(`thinking`);let a=``;try{a=QI(JSON.parse(n?.args||e.arguments||`{}`))}catch{}if(!a){this.submitToolResult(i,{error:`${XI} requires a question`}),this.callbacks.onStatus?.(`listening`);return}try{let e=Xt(),t=await this.client.request(`chat.send`,{sessionKey:this.sessionKey,message:a,idempotencyKey:e}),n=await tL({client:this.client,runId:t.runId??e,timeoutMs:12e4});this.submitToolResult(i,{result:n})}catch(e){this.submitToolResult(i,{error:e instanceof Error?e.message:String(e)})}finally{this.callbacks.onStatus?.(`listening`)}}submitToolResult(e,t){this.send({type:`conversation.item.create`,item:{type:`function_call_output`,call_id:e,output:JSON.stringify(t)}}),this.send({type:`response.create`})}};function rL(e){if(e.dataSource!==`genesis-mcp-oauth`)return!1;if(e.expectedOrigin!==``&&e.origin===e.expectedOrigin)return!0;let t=e.origin===``||e.origin===`null`,n=e.popup!=null&&e.source===e.popup;return t&&n}var iL=Tb({}),aL=Bg();function oL(){if(!window.location.search)return!1;let e=new URLSearchParams(window.location.search).get(`onboarding`);if(!e)return!1;let t=e.trim().toLowerCase();return t===`1`||t===`true`||t===`yes`||t===`on`}var $=class extends t{constructor(){super(),this.i18nController=new m(this),this.clientInstanceId=Xt(),this.connectGeneration=0,this.settings=Rg(),this.password=``,this.loginShowGatewayToken=!1,this.loginShowGatewayPassword=!1,this.tab=`chat`,this.onboarding=oL(),this.connected=!1,this.theme=this.settings.theme??`mono`,this.themeMode=this.settings.themeMode??`system`,this.themeResolved=`dark`,this.themeOrder=this.buildThemeOrder(this.theme),this.hello=null,this.lastError=null,this.lastErrorCode=null,this.eventLog=[],this.eventLogBuffer=[],this.toolStreamSyncTimer=null,this.sidebarCloseTimer=null,this.assistantName=iL.name,this.assistantAvatar=iL.avatar,this.assistantAgentId=iL.agentId??null,this.userName=aL.name,this.userAvatar=aL.avatar,this.localMediaPreviewRoots=[],this.embedSandboxMode=`scripts`,this.allowExternalEmbedUrls=!1,this.serverVersion=null,this.sessionKey=this.settings.sessionKey,this.chatLoading=!1,this.chatSending=!1,this.chatMessage=``,this.chatMessages=[],this.chatToolMessages=[],this.chatStreamSegments=[],this.chatStream=null,this.chatStreamStartedAt=null,this.chatRunId=null,this.chatSideResult=null,this.compactionStatus=null,this.fallbackStatus=null,this.chatAvatarUrl=null,this.chatThinkingLevel=null,this.chatModelOverrides={},this.chatModelsLoading=!1,this.chatModelCatalog=[],this.modelsPanel=`catalog`,this.modelsLoading=!1,this.memoryEntries=[],this.memoryLoading=!1,this.memoryError=null,this.chatQueue=[],this.chatAttachments=[],this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.realtimeTalkSession=null,this.chatManualRefreshInFlight=!1,this.navDrawerOpen=!1,this.sidebarOpen=!1,this.sidebarContent=null,this.sidebarError=null,this.splitRatio=this.settings.splitRatio,this.nodesLoading=!1,this.nodes=[],this.nodeManagementSelectedId=null,this.nodeManagementRename=``,this.nodeManagementCommand=``,this.nodeManagementParams=`{
|
|
5897
5897
|
}`,this.nodeManagementShell=`genesis --version`,this.nodeManagementCwd=``,this.nodeManagementTimeoutMs=`120000`,this.nodeManagementBusy=!1,this.nodeManagementError=null,this.nodeManagementResult=null,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.pendingGatewayUrl=null,this.pendingGatewayToken=null,this.configLoading=!1,this.configRaw=`{
|
|
5898
5898
|
}
|
|
5899
|
-
`,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.configRestartPrompt=null,this.dreamingStatusLoading=!1,this.dreamingStatusError=null,this.dreamingStatus=null,this.dreamingModeSaving=!1,this.dreamDiaryLoading=!1,this.dreamDiaryActionLoading=!1,this.dreamDiaryActionMessage=null,this.dreamDiaryActionArchivePath=null,this.dreamDiaryError=null,this.dreamDiaryPath=null,this.dreamDiaryContent=null,this.wikiImportInsightsLoading=!1,this.wikiImportInsightsError=null,this.wikiImportInsights=null,this.wikiMemoryPalaceLoading=!1,this.wikiMemoryPalaceError=null,this.wikiMemoryPalace=null,this.configFormDirty=!1,this.configSettingsMode=`quick`,this.configFormMode=`form`,this.configSearchQuery=``,this.configActiveSection=null,this.configActiveSubsection=null,this.communicationsFormMode=`form`,this.communicationsSearchQuery=``,this.communicationsActiveSection=null,this.communicationsActiveSubsection=null,this.appearanceFormMode=`form`,this.appearanceSearchQuery=``,this.appearanceActiveSection=null,this.appearanceActiveSubsection=null,this.automationFormMode=`form`,this.automationSearchQuery=``,this.automationActiveSection=null,this.automationActiveSubsection=null,this.infrastructureFormMode=`form`,this.infrastructureSearchQuery=``,this.infrastructureActiveSection=null,this.infrastructureActiveSubsection=null,this.aiAgentsFormMode=`form`,this.aiAgentsSearchQuery=``,this.aiAgentsActiveSection=null,this.aiAgentsActiveSubsection=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.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.channelWizardSessionId=null,this.channelWizardStep=null,this.channelWizardInput=null,this.channelWizardBusy=!1,this.channelWizardError=null,this.channelWizardMessage=null,this.modelProviderWizardSessionId=null,this.modelProviderWizardStep=null,this.modelProviderWizardInput=null,this.modelProviderWizardBusy=!1,this.modelProviderWizardError=null,this.modelProviderWizardMessage=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.agentsSelectedId=null,this.toolsCatalogLoading=!1,this.toolsCatalogError=null,this.toolsCatalogResult=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveResult=null,this.agentsPanel=`files`,this.agentFilesLoading=!1,this.agentFilesError=null,this.agentFilesList=null,this.agentFileContents={},this.agentFileDrafts={},this.agentFileActive=null,this.agentFileSaving=!1,this.agentIdentityLoading=!1,this.agentIdentityError=null,this.agentIdentityById={},this.agentSkillsLoading=!1,this.agentSkillsError=null,this.agentSkillsReport=null,this.agentSkillsAgentId=null,this.mcpServersLoading=!1,this.mcpServers=null,this.mcpServersPath=null,this.mcpServersError=null,this.mcpBusy=!1,this.mcpMessage=null,this.mcpDraftName=``,this.mcpDraftConfig=``,this.mcpAddMode=`preset`,this.mcpAuthToken=``,this.mcpPresetId=null,this.mcpLinkUrl=``,this.mcpLinkMetadataLoading=!1,this.mcpLinkMetadataError=null,this.mcpLinkMetadata=null,this.mcpOAuthStatus={},this.mcpOAuthFlow=null,this.mcpOAuthPopup=null,this.mcpTestStatus={},this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.sessionsFilterActive=``,this.sessionsFilterLimit=`120`,this.sessionsIncludeGlobal=!0,this.sessionsIncludeUnknown=!1,this.sessionsHideCron=!0,this.sessionsSearchQuery=``,this.sessionsSortColumn=`updated`,this.sessionsSortDir=`desc`,this.sessionsPage=0,this.sessionsPageSize=25,this.sessionsSelectedKeys=new Set,this.sessionsExpandedCheckpointKey=null,this.sessionsCheckpointItemsByKey={},this.sessionsCheckpointLoadingKey=null,this.sessionsCheckpointBusyKey=null,this.sessionsCheckpointErrorByKey={},this.usageLoading=!1,this.usageResult=null,this.usageCostSummary=null,this.usageError=null,this.usageStartDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageEndDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageSelectedSessions=[],this.usageSelectedDays=[],this.usageSelectedHours=[],this.usageChartMode=`tokens`,this.usageDailyChartMode=`by-type`,this.usageTimeSeriesMode=`per-turn`,this.usageTimeSeriesBreakdownMode=`by-type`,this.usageTimeSeries=null,this.usageTimeSeriesLoading=!1,this.usageTimeSeriesCursorStart=null,this.usageTimeSeriesCursorEnd=null,this.usageSessionLogs=null,this.usageSessionLogsLoading=!1,this.usageSessionLogsExpanded=!1,this.usageQuery=``,this.usageQueryDraft=``,this.usageSessionSort=`recent`,this.usageSessionSortDir=`desc`,this.usageRecentSessions=[],this.usageTimeZone=`local`,this.usageContextExpanded=!1,this.usageHeaderPinned=!1,this.usageSessionsTab=`all`,this.usageVisibleColumns=[`channel`,`agent`,`provider`,`model`,`messages`,`tools`,`errors`,`duration`],this.usageLogFilterRoles=[],this.usageLogFilterTools=[],this.usageLogFilterHasTools=!1,this.usageLogFilterQuery=``,this.usageQueryDebounceTimer=null,this.cronLoading=!1,this.cronQuickCreateOpen=!1,this.cronQuickCreateStep=`what`,this.cronQuickCreateDraft=null,this.cronJobsLoadingMore=!1,this.cronJobs=[],this.cronJobsTotal=0,this.cronJobsHasMore=!1,this.cronJobsNextOffset=null,this.cronJobsLimit=50,this.cronJobsQuery=``,this.cronJobsEnabledFilter=`all`,this.cronJobsScheduleKindFilter=`all`,this.cronJobsLastStatusFilter=`all`,this.cronJobsSortBy=`nextRunAtMs`,this.cronJobsSortDir=`asc`,this.cronStatus=null,this.cronError=null,this.cronForm={...Yd},this.cronFieldErrors={},this.cronEditingJobId=null,this.cronRunsJobId=null,this.cronRunsLoadingMore=!1,this.cronRuns=[],this.cronRunsTotal=0,this.cronRunsHasMore=!1,this.cronRunsNextOffset=null,this.cronRunsLimit=50,this.cronRunsScope=`all`,this.cronRunsStatuses=[],this.cronRunsDeliveryStatuses=[],this.cronRunsStatusFilter=`all`,this.cronRunsQuery=``,this.cronRunsSortDir=`desc`,this.cronModelSuggestions=[],this.cronBusy=!1,this.updateAvailable=null,this.attentionItems=[],this.paletteOpen=!1,this.paletteQuery=``,this.paletteActiveIndex=0,this.overviewShowGatewayToken=!1,this.overviewShowGatewayPassword=!1,this.overviewLogLines=[],this.overviewLogCursor=0,this.walletSummary=null,this.walletSummaryError=null,this.walletSummaryLoading=!1,this.walletBalancesLoading=!1,this.walletLastUpdatedAt=null,this.walletRecoveryPhraseMode=`generate`,this.walletRecoveryPhraseBusy=!1,this.walletRecoveryPhraseError=null,this.walletRecoveryPhraseGeneratedMnemonic=null,this.walletRecoveryPhraseStatus=null,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter=``,this.skillsStatusFilter=`all`,this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillsDetailKey=null,this.clawhubSearchQuery=``,this.clawhubSearchResults=null,this.clawhubSearchLoading=!1,this.clawhubSearchError=null,this.clawhubDetail=null,this.clawhubDetailSlug=null,this.clawhubDetailLoading=!1,this.clawhubDetailError=null,this.clawhubInstallSlug=null,this.clawhubInstallMessage=null,this.pluginsLoading=!1,this.pluginsReport=null,this.pluginsError=null,this.pluginsFilter=``,this.pluginsStatusFilter=`all`,this.pluginsBusyKey=null,this.pluginMessages={},this.pluginDetailKey=null,this.pluginClawhubSearchQuery=``,this.pluginClawhubSearchResults=null,this.pluginClawhubSearchLoading=!1,this.pluginClawhubSearchError=null,this.pluginClawhubDetail=null,this.pluginClawhubDetailName=null,this.pluginClawhubDetailLoading=!1,this.pluginClawhubDetailError=null,this.pluginClawhubInstallName=null,this.pluginClawhubInstallMessage=null,this.healthLoading=!1,this.healthResult=null,this.healthError=null,this.modelAuthStatusLoading=!1,this.modelAuthStatusResult=null,this.modelAuthStatusError=null,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={...Jd},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.chatNewMessagesBelow=!1,this.nodesPollInterval=null,this.logsPollInterval=null,this.debugPollInterval=null,this.logsScrollFrame=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.refreshSessionsAfterChat=new Set,this.chatSideResultTerminalRuns=new Set,this.basePath=``,this.popStateHandler=()=>QO(this),this.topbarObserver=null,this.globalKeydownHandler=e=>{(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.key===`k`&&(e.preventDefault(),this.paletteOpen=!this.paletteOpen,this.paletteOpen&&(this.paletteQuery=``,this.paletteActiveIndex=0))},this.canvasAgentRunMessageHandler=e=>{YI(this,e)},this.mcpOAuthMessageHandler=e=>{let t=e.data;if(!t)return;let n=typeof window<`u`&&window.location?window.location.origin:``;if(rL({origin:e.origin,source:e.source,expectedOrigin:n,popup:this.mcpOAuthPopup,dataSource:t.source}))if(t.type===`mcp-oauth-callback`){if(this.mcpOAuthPopup&&!this.mcpOAuthPopup.closed)try{this.mcpOAuthPopup.close()}catch{}if(this.mcpOAuthPopup=null,!this.mcpOAuthFlow)return;if(t.error){this.mcpMessage={kind:`error`,text:`OAuth failed: ${t.error}`},this.mcpOAuthFlow=null;return}if(!t.code||!t.state){this.mcpMessage={kind:`error`,text:`OAuth callback missing code or state.`},this.mcpOAuthFlow=null;return}eh(this,t.code,t.state)}else t.type===`mcp-oauth-cancelled`&&(nh(this),this.mcpMessage={kind:`error`,text:`Authorization was cancelled.`})},o(this.settings.locale)&&l.setLocale(this.settings.locale)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.onSlashAction=e=>{switch(e){case`toggle-focus`:this.applySettings({...this.settings,chatFocusMode:!this.settings.chatFocusMode});break;case`export`:mb(this.chatMessages,this.assistantName);break;case`refresh-tools-effective`:$f(this);break}},document.addEventListener(`keydown`,this.globalKeydownHandler),window.addEventListener(`message`,this.canvasAgentRunMessageHandler),window.addEventListener(`message`,this.mcpOAuthMessageHandler),Gk(this)}firstUpdated(){Kk(this)}disconnectedCallback(){document.removeEventListener(`keydown`,this.globalKeydownHandler),window.removeEventListener(`message`,this.canvasAgentRunMessageHandler),window.removeEventListener(`message`,this.mcpOAuthMessageHandler),qk(this),super.disconnectedCallback()}updated(e){if(Jk(this,e),!e.has(`sessionKey`)||this.agentsPanel!==`tools`)return;let t=Ha(this.sessionKey);if(this.agentsSelectedId&&this.agentsSelectedId===t){Xf(this,{agentId:this.agentsSelectedId,sessionKey:this.sessionKey});return}this.toolsEffectiveResult=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null}connect(){Rk(this)}handleChatScroll(e){Gr(this,e)}handleLogsScroll(e){Kr(this,e)}exportLogs(e,t){Jr(e,t)}resetToolStream(){aa(this)}resetChatScroll(){qr(this)}scrollToBottom(e){qr(this),Ur(this,!0,!!e?.smooth)}async loadAssistantIdentity(){await pk(this)}applySettings(e){NO(this,e)}applyLocalUserIdentity(e){PO(this,e)}setTab(e){RO(this,e),this.navDrawerOpen=!1}setTheme(e,t){BO(this,e,t),this.themeOrder=this.buildThemeOrder(e)}setThemeMode(e,t){VO(this,e,t)}setBorderRadius(e){NO(this,{...this.settings,borderRadius:e}),this.requestUpdate()}buildThemeOrder(e){return[e,...[...rg].filter(t=>t!==e)]}async loadOverview(e){await ik(this,e)}async loadCron(){await uk(this)}async handleAbortChat(){await yd(this)}removeQueuedMessage(e){Ed(this,e)}async handleSendChat(e,t){await Od(this,e,t)}async toggleRealtimeTalk(){if(this.realtimeTalkSession){this.realtimeTalkSession.stop(),this.realtimeTalkSession=null,this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;return}if(!this.client||!this.connected){this.lastError=`Gateway not connected`;return}this.realtimeTalkActive=!0,this.realtimeTalkStatus=`connecting`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;let e=new nL(this.client,this.sessionKey,{onStatus:(e,t)=>{this.realtimeTalkStatus=e,this.realtimeTalkDetail=t??null,(e===`idle`||e===`error`)&&(this.realtimeTalkActive=e!==`idle`)},onTranscript:e=>{this.realtimeTalkTranscript=`${e.role===`user`?`You`:`Genesis`}: ${e.text}`}});this.realtimeTalkSession=e;try{await e.start()}catch(t){e.stop(),this.realtimeTalkSession===e&&(this.realtimeTalkSession=null),this.realtimeTalkActive=!1,this.realtimeTalkStatus=`error`,this.realtimeTalkDetail=t instanceof Error?t.message:String(t),this.lastError=this.realtimeTalkDetail}}async steerQueuedChatMessage(e){await wd(this,e)}async handleWhatsAppStart(e){await vr(this,e)}async handleWhatsAppWait(){await yr(this)}async handleWhatsAppLogout(){await br(this)}async handleChannelConfigSave(){await xr(this)}async handleChannelConfigReload(){await Sr(this)}async handleChannelWizardStart(){await Tr(this)}async handleChannelWizardSubmit(){await Dr(this)}async handleChannelWizardCancel(){await Or(this)}handleChannelWizardInput(e){Er(this,e)}handleChannelWizardClose(){kr(this)}async handleModelProviderWizardStart(){await Qk(this)}async handleModelProviderWizardSubmit(){await eA(this)}async handleModelProviderWizardCancel(){await tA(this)}handleModelProviderWizardInput(e){$k(this,e)}handleModelProviderWizardClose(){nA(this)}handleNostrProfileEdit(e,t){Pr(this,e,t)}handleNostrProfileCancel(){Fr(this)}handleNostrProfileFieldChange(e,t){Ir(this,e,t)}async handleNostrProfileSave(){await Rr(this)}async handleNostrProfileImport(){await zr(this)}handleNostrProfileToggleAdvanced(){Lr(this)}async handleExecApprovalDecision(e){let t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{let n=t.kind===`plugin`?`plugin.approval.resolve`:`exec.approval.resolve`;await this.client.request(n,{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(e=>e.id!==t.id)}catch(e){this.execApprovalError=`Approval failed: ${String(e)}`}finally{this.execApprovalBusy=!1}}}handleGatewayUrlConfirm(){let e=this.pendingGatewayUrl;if(!e)return;let t=this.pendingGatewayToken?.trim()||``;this.pendingGatewayUrl=null,this.pendingGatewayToken=null,NO(this,{...this.settings,gatewayUrl:e,token:t}),this.connect()}handleGatewayUrlCancel(){this.pendingGatewayUrl=null,this.pendingGatewayToken=null}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){let t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}render(){return VI(this)}};Y([A()],$.prototype,`settings`,void 0),Y([A()],$.prototype,`password`,void 0),Y([A()],$.prototype,`loginShowGatewayToken`,void 0),Y([A()],$.prototype,`loginShowGatewayPassword`,void 0),Y([A()],$.prototype,`tab`,void 0),Y([A()],$.prototype,`onboarding`,void 0),Y([A()],$.prototype,`connected`,void 0),Y([A()],$.prototype,`theme`,void 0),Y([A()],$.prototype,`themeMode`,void 0),Y([A()],$.prototype,`themeResolved`,void 0),Y([A()],$.prototype,`themeOrder`,void 0),Y([A()],$.prototype,`hello`,void 0),Y([A()],$.prototype,`lastError`,void 0),Y([A()],$.prototype,`lastErrorCode`,void 0),Y([A()],$.prototype,`eventLog`,void 0),Y([A()],$.prototype,`assistantName`,void 0),Y([A()],$.prototype,`assistantAvatar`,void 0),Y([A()],$.prototype,`assistantAgentId`,void 0),Y([A()],$.prototype,`userName`,void 0),Y([A()],$.prototype,`userAvatar`,void 0),Y([A()],$.prototype,`localMediaPreviewRoots`,void 0),Y([A()],$.prototype,`embedSandboxMode`,void 0),Y([A()],$.prototype,`allowExternalEmbedUrls`,void 0),Y([A()],$.prototype,`serverVersion`,void 0),Y([A()],$.prototype,`sessionKey`,void 0),Y([A()],$.prototype,`chatLoading`,void 0),Y([A()],$.prototype,`chatSending`,void 0),Y([A()],$.prototype,`chatMessage`,void 0),Y([A()],$.prototype,`chatMessages`,void 0),Y([A()],$.prototype,`chatToolMessages`,void 0),Y([A()],$.prototype,`chatStreamSegments`,void 0),Y([A()],$.prototype,`chatStream`,void 0),Y([A()],$.prototype,`chatStreamStartedAt`,void 0),Y([A()],$.prototype,`chatRunId`,void 0),Y([A()],$.prototype,`chatSideResult`,void 0),Y([A()],$.prototype,`compactionStatus`,void 0),Y([A()],$.prototype,`fallbackStatus`,void 0),Y([A()],$.prototype,`chatAvatarUrl`,void 0),Y([A()],$.prototype,`chatThinkingLevel`,void 0),Y([A()],$.prototype,`chatModelOverrides`,void 0),Y([A()],$.prototype,`chatModelsLoading`,void 0),Y([A()],$.prototype,`chatModelCatalog`,void 0),Y([A()],$.prototype,`modelsPanel`,void 0),Y([A()],$.prototype,`modelsLoading`,void 0),Y([A()],$.prototype,`memoryEntries`,void 0),Y([A()],$.prototype,`memoryLoading`,void 0),Y([A()],$.prototype,`memoryError`,void 0),Y([A()],$.prototype,`chatQueue`,void 0),Y([A()],$.prototype,`chatAttachments`,void 0),Y([A()],$.prototype,`realtimeTalkActive`,void 0),Y([A()],$.prototype,`realtimeTalkStatus`,void 0),Y([A()],$.prototype,`realtimeTalkDetail`,void 0),Y([A()],$.prototype,`realtimeTalkTranscript`,void 0),Y([A()],$.prototype,`chatManualRefreshInFlight`,void 0),Y([A()],$.prototype,`navDrawerOpen`,void 0),Y([A()],$.prototype,`sidebarOpen`,void 0),Y([A()],$.prototype,`sidebarContent`,void 0),Y([A()],$.prototype,`sidebarError`,void 0),Y([A()],$.prototype,`splitRatio`,void 0),Y([A()],$.prototype,`nodesLoading`,void 0),Y([A()],$.prototype,`nodes`,void 0),Y([A()],$.prototype,`nodeManagementSelectedId`,void 0),Y([A()],$.prototype,`nodeManagementRename`,void 0),Y([A()],$.prototype,`nodeManagementCommand`,void 0),Y([A()],$.prototype,`nodeManagementParams`,void 0),Y([A()],$.prototype,`nodeManagementShell`,void 0),Y([A()],$.prototype,`nodeManagementCwd`,void 0),Y([A()],$.prototype,`nodeManagementTimeoutMs`,void 0),Y([A()],$.prototype,`nodeManagementBusy`,void 0),Y([A()],$.prototype,`nodeManagementError`,void 0),Y([A()],$.prototype,`nodeManagementResult`,void 0),Y([A()],$.prototype,`devicesLoading`,void 0),Y([A()],$.prototype,`devicesError`,void 0),Y([A()],$.prototype,`devicesList`,void 0),Y([A()],$.prototype,`execApprovalsLoading`,void 0),Y([A()],$.prototype,`execApprovalsSaving`,void 0),Y([A()],$.prototype,`execApprovalsDirty`,void 0),Y([A()],$.prototype,`execApprovalsSnapshot`,void 0),Y([A()],$.prototype,`execApprovalsForm`,void 0),Y([A()],$.prototype,`execApprovalsSelectedAgent`,void 0),Y([A()],$.prototype,`execApprovalsTarget`,void 0),Y([A()],$.prototype,`execApprovalsTargetNodeId`,void 0),Y([A()],$.prototype,`execApprovalQueue`,void 0),Y([A()],$.prototype,`execApprovalBusy`,void 0),Y([A()],$.prototype,`execApprovalError`,void 0),Y([A()],$.prototype,`pendingGatewayUrl`,void 0),Y([A()],$.prototype,`configLoading`,void 0),Y([A()],$.prototype,`configRaw`,void 0),Y([A()],$.prototype,`configRawOriginal`,void 0),Y([A()],$.prototype,`configValid`,void 0),Y([A()],$.prototype,`configIssues`,void 0),Y([A()],$.prototype,`configSaving`,void 0),Y([A()],$.prototype,`configApplying`,void 0),Y([A()],$.prototype,`updateRunning`,void 0),Y([A()],$.prototype,`applySessionKey`,void 0),Y([A()],$.prototype,`configSnapshot`,void 0),Y([A()],$.prototype,`configSchema`,void 0),Y([A()],$.prototype,`configSchemaVersion`,void 0),Y([A()],$.prototype,`configSchemaLoading`,void 0),Y([A()],$.prototype,`configUiHints`,void 0),Y([A()],$.prototype,`configForm`,void 0),Y([A()],$.prototype,`configFormOriginal`,void 0),Y([A()],$.prototype,`configRestartPrompt`,void 0),Y([A()],$.prototype,`dreamingStatusLoading`,void 0),Y([A()],$.prototype,`dreamingStatusError`,void 0),Y([A()],$.prototype,`dreamingStatus`,void 0),Y([A()],$.prototype,`dreamingModeSaving`,void 0),Y([A()],$.prototype,`dreamDiaryLoading`,void 0),Y([A()],$.prototype,`dreamDiaryActionLoading`,void 0),Y([A()],$.prototype,`dreamDiaryActionMessage`,void 0),Y([A()],$.prototype,`dreamDiaryActionArchivePath`,void 0),Y([A()],$.prototype,`dreamDiaryError`,void 0),Y([A()],$.prototype,`dreamDiaryPath`,void 0),Y([A()],$.prototype,`dreamDiaryContent`,void 0),Y([A()],$.prototype,`wikiImportInsightsLoading`,void 0),Y([A()],$.prototype,`wikiImportInsightsError`,void 0),Y([A()],$.prototype,`wikiImportInsights`,void 0),Y([A()],$.prototype,`wikiMemoryPalaceLoading`,void 0),Y([A()],$.prototype,`wikiMemoryPalaceError`,void 0),Y([A()],$.prototype,`wikiMemoryPalace`,void 0),Y([A()],$.prototype,`configFormDirty`,void 0),Y([A()],$.prototype,`configSettingsMode`,void 0),Y([A()],$.prototype,`configFormMode`,void 0),Y([A()],$.prototype,`configSearchQuery`,void 0),Y([A()],$.prototype,`configActiveSection`,void 0),Y([A()],$.prototype,`configActiveSubsection`,void 0),Y([A()],$.prototype,`communicationsFormMode`,void 0),Y([A()],$.prototype,`communicationsSearchQuery`,void 0),Y([A()],$.prototype,`communicationsActiveSection`,void 0),Y([A()],$.prototype,`communicationsActiveSubsection`,void 0),Y([A()],$.prototype,`appearanceFormMode`,void 0),Y([A()],$.prototype,`appearanceSearchQuery`,void 0),Y([A()],$.prototype,`appearanceActiveSection`,void 0),Y([A()],$.prototype,`appearanceActiveSubsection`,void 0),Y([A()],$.prototype,`automationFormMode`,void 0),Y([A()],$.prototype,`automationSearchQuery`,void 0),Y([A()],$.prototype,`automationActiveSection`,void 0),Y([A()],$.prototype,`automationActiveSubsection`,void 0),Y([A()],$.prototype,`infrastructureFormMode`,void 0),Y([A()],$.prototype,`infrastructureSearchQuery`,void 0),Y([A()],$.prototype,`infrastructureActiveSection`,void 0),Y([A()],$.prototype,`infrastructureActiveSubsection`,void 0),Y([A()],$.prototype,`aiAgentsFormMode`,void 0),Y([A()],$.prototype,`aiAgentsSearchQuery`,void 0),Y([A()],$.prototype,`aiAgentsActiveSection`,void 0),Y([A()],$.prototype,`aiAgentsActiveSubsection`,void 0),Y([A()],$.prototype,`channelsLoading`,void 0),Y([A()],$.prototype,`channelsSnapshot`,void 0),Y([A()],$.prototype,`channelsError`,void 0),Y([A()],$.prototype,`channelsLastSuccess`,void 0),Y([A()],$.prototype,`whatsappLoginMessage`,void 0),Y([A()],$.prototype,`whatsappLoginQrDataUrl`,void 0),Y([A()],$.prototype,`whatsappLoginConnected`,void 0),Y([A()],$.prototype,`whatsappBusy`,void 0),Y([A()],$.prototype,`nostrProfileFormState`,void 0),Y([A()],$.prototype,`nostrProfileAccountId`,void 0),Y([A()],$.prototype,`channelWizardSessionId`,void 0),Y([A()],$.prototype,`channelWizardStep`,void 0),Y([A()],$.prototype,`channelWizardInput`,void 0),Y([A()],$.prototype,`channelWizardBusy`,void 0),Y([A()],$.prototype,`channelWizardError`,void 0),Y([A()],$.prototype,`channelWizardMessage`,void 0),Y([A()],$.prototype,`modelProviderWizardSessionId`,void 0),Y([A()],$.prototype,`modelProviderWizardStep`,void 0),Y([A()],$.prototype,`modelProviderWizardInput`,void 0),Y([A()],$.prototype,`modelProviderWizardBusy`,void 0),Y([A()],$.prototype,`modelProviderWizardError`,void 0),Y([A()],$.prototype,`modelProviderWizardMessage`,void 0),Y([A()],$.prototype,`presenceLoading`,void 0),Y([A()],$.prototype,`presenceEntries`,void 0),Y([A()],$.prototype,`presenceError`,void 0),Y([A()],$.prototype,`presenceStatus`,void 0),Y([A()],$.prototype,`agentsLoading`,void 0),Y([A()],$.prototype,`agentsList`,void 0),Y([A()],$.prototype,`agentsError`,void 0),Y([A()],$.prototype,`agentsSelectedId`,void 0),Y([A()],$.prototype,`toolsCatalogLoading`,void 0),Y([A()],$.prototype,`toolsCatalogError`,void 0),Y([A()],$.prototype,`toolsCatalogResult`,void 0),Y([A()],$.prototype,`toolsEffectiveLoading`,void 0),Y([A()],$.prototype,`toolsEffectiveLoadingKey`,void 0),Y([A()],$.prototype,`toolsEffectiveResultKey`,void 0),Y([A()],$.prototype,`toolsEffectiveError`,void 0),Y([A()],$.prototype,`toolsEffectiveResult`,void 0),Y([A()],$.prototype,`agentsPanel`,void 0),Y([A()],$.prototype,`agentFilesLoading`,void 0),Y([A()],$.prototype,`agentFilesError`,void 0),Y([A()],$.prototype,`agentFilesList`,void 0),Y([A()],$.prototype,`agentFileContents`,void 0),Y([A()],$.prototype,`agentFileDrafts`,void 0),Y([A()],$.prototype,`agentFileActive`,void 0),Y([A()],$.prototype,`agentFileSaving`,void 0),Y([A()],$.prototype,`agentIdentityLoading`,void 0),Y([A()],$.prototype,`agentIdentityError`,void 0),Y([A()],$.prototype,`agentIdentityById`,void 0),Y([A()],$.prototype,`agentSkillsLoading`,void 0),Y([A()],$.prototype,`agentSkillsError`,void 0),Y([A()],$.prototype,`agentSkillsReport`,void 0),Y([A()],$.prototype,`agentSkillsAgentId`,void 0),Y([A()],$.prototype,`mcpServersLoading`,void 0),Y([A()],$.prototype,`mcpServers`,void 0),Y([A()],$.prototype,`mcpServersPath`,void 0),Y([A()],$.prototype,`mcpServersError`,void 0),Y([A()],$.prototype,`mcpBusy`,void 0),Y([A()],$.prototype,`mcpMessage`,void 0),Y([A()],$.prototype,`mcpDraftName`,void 0),Y([A()],$.prototype,`mcpDraftConfig`,void 0),Y([A()],$.prototype,`mcpAddMode`,void 0),Y([A()],$.prototype,`mcpAuthToken`,void 0),Y([A()],$.prototype,`mcpPresetId`,void 0),Y([A()],$.prototype,`mcpLinkUrl`,void 0),Y([A()],$.prototype,`mcpLinkMetadataLoading`,void 0),Y([A()],$.prototype,`mcpLinkMetadataError`,void 0),Y([A()],$.prototype,`mcpLinkMetadata`,void 0),Y([A()],$.prototype,`mcpOAuthStatus`,void 0),Y([A()],$.prototype,`mcpOAuthFlow`,void 0),Y([A()],$.prototype,`mcpOAuthPopup`,void 0),Y([A()],$.prototype,`mcpTestStatus`,void 0),Y([A()],$.prototype,`sessionsLoading`,void 0),Y([A()],$.prototype,`sessionsResult`,void 0),Y([A()],$.prototype,`sessionsError`,void 0),Y([A()],$.prototype,`sessionsFilterActive`,void 0),Y([A()],$.prototype,`sessionsFilterLimit`,void 0),Y([A()],$.prototype,`sessionsIncludeGlobal`,void 0),Y([A()],$.prototype,`sessionsIncludeUnknown`,void 0),Y([A()],$.prototype,`sessionsHideCron`,void 0),Y([A()],$.prototype,`sessionsSearchQuery`,void 0),Y([A()],$.prototype,`sessionsSortColumn`,void 0),Y([A()],$.prototype,`sessionsSortDir`,void 0),Y([A()],$.prototype,`sessionsPage`,void 0),Y([A()],$.prototype,`sessionsPageSize`,void 0),Y([A()],$.prototype,`sessionsSelectedKeys`,void 0),Y([A()],$.prototype,`sessionsExpandedCheckpointKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointItemsByKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointLoadingKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointBusyKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointErrorByKey`,void 0),Y([A()],$.prototype,`usageLoading`,void 0),Y([A()],$.prototype,`usageResult`,void 0),Y([A()],$.prototype,`usageCostSummary`,void 0),Y([A()],$.prototype,`usageError`,void 0),Y([A()],$.prototype,`usageStartDate`,void 0),Y([A()],$.prototype,`usageEndDate`,void 0),Y([A()],$.prototype,`usageSelectedSessions`,void 0),Y([A()],$.prototype,`usageSelectedDays`,void 0),Y([A()],$.prototype,`usageSelectedHours`,void 0),Y([A()],$.prototype,`usageChartMode`,void 0),Y([A()],$.prototype,`usageDailyChartMode`,void 0),Y([A()],$.prototype,`usageTimeSeriesMode`,void 0),Y([A()],$.prototype,`usageTimeSeriesBreakdownMode`,void 0),Y([A()],$.prototype,`usageTimeSeries`,void 0),Y([A()],$.prototype,`usageTimeSeriesLoading`,void 0),Y([A()],$.prototype,`usageTimeSeriesCursorStart`,void 0),Y([A()],$.prototype,`usageTimeSeriesCursorEnd`,void 0),Y([A()],$.prototype,`usageSessionLogs`,void 0),Y([A()],$.prototype,`usageSessionLogsLoading`,void 0),Y([A()],$.prototype,`usageSessionLogsExpanded`,void 0),Y([A()],$.prototype,`usageQuery`,void 0),Y([A()],$.prototype,`usageQueryDraft`,void 0),Y([A()],$.prototype,`usageSessionSort`,void 0),Y([A()],$.prototype,`usageSessionSortDir`,void 0),Y([A()],$.prototype,`usageRecentSessions`,void 0),Y([A()],$.prototype,`usageTimeZone`,void 0),Y([A()],$.prototype,`usageContextExpanded`,void 0),Y([A()],$.prototype,`usageHeaderPinned`,void 0),Y([A()],$.prototype,`usageSessionsTab`,void 0),Y([A()],$.prototype,`usageVisibleColumns`,void 0),Y([A()],$.prototype,`usageLogFilterRoles`,void 0),Y([A()],$.prototype,`usageLogFilterTools`,void 0),Y([A()],$.prototype,`usageLogFilterHasTools`,void 0),Y([A()],$.prototype,`usageLogFilterQuery`,void 0),Y([A()],$.prototype,`cronLoading`,void 0),Y([A()],$.prototype,`cronQuickCreateOpen`,void 0),Y([A()],$.prototype,`cronQuickCreateStep`,void 0),Y([A()],$.prototype,`cronQuickCreateDraft`,void 0),Y([A()],$.prototype,`cronJobsLoadingMore`,void 0),Y([A()],$.prototype,`cronJobs`,void 0),Y([A()],$.prototype,`cronJobsTotal`,void 0),Y([A()],$.prototype,`cronJobsHasMore`,void 0),Y([A()],$.prototype,`cronJobsNextOffset`,void 0),Y([A()],$.prototype,`cronJobsLimit`,void 0),Y([A()],$.prototype,`cronJobsQuery`,void 0),Y([A()],$.prototype,`cronJobsEnabledFilter`,void 0),Y([A()],$.prototype,`cronJobsScheduleKindFilter`,void 0),Y([A()],$.prototype,`cronJobsLastStatusFilter`,void 0),Y([A()],$.prototype,`cronJobsSortBy`,void 0),Y([A()],$.prototype,`cronJobsSortDir`,void 0),Y([A()],$.prototype,`cronStatus`,void 0),Y([A()],$.prototype,`cronError`,void 0),Y([A()],$.prototype,`cronForm`,void 0),Y([A()],$.prototype,`cronFieldErrors`,void 0),Y([A()],$.prototype,`cronEditingJobId`,void 0),Y([A()],$.prototype,`cronRunsJobId`,void 0),Y([A()],$.prototype,`cronRunsLoadingMore`,void 0),Y([A()],$.prototype,`cronRuns`,void 0),Y([A()],$.prototype,`cronRunsTotal`,void 0),Y([A()],$.prototype,`cronRunsHasMore`,void 0),Y([A()],$.prototype,`cronRunsNextOffset`,void 0),Y([A()],$.prototype,`cronRunsLimit`,void 0),Y([A()],$.prototype,`cronRunsScope`,void 0),Y([A()],$.prototype,`cronRunsStatuses`,void 0),Y([A()],$.prototype,`cronRunsDeliveryStatuses`,void 0),Y([A()],$.prototype,`cronRunsStatusFilter`,void 0),Y([A()],$.prototype,`cronRunsQuery`,void 0),Y([A()],$.prototype,`cronRunsSortDir`,void 0),Y([A()],$.prototype,`cronModelSuggestions`,void 0),Y([A()],$.prototype,`cronBusy`,void 0),Y([A()],$.prototype,`updateAvailable`,void 0),Y([A()],$.prototype,`attentionItems`,void 0),Y([A()],$.prototype,`paletteOpen`,void 0),Y([A()],$.prototype,`paletteQuery`,void 0),Y([A()],$.prototype,`paletteActiveIndex`,void 0),Y([A()],$.prototype,`overviewShowGatewayToken`,void 0),Y([A()],$.prototype,`overviewShowGatewayPassword`,void 0),Y([A()],$.prototype,`overviewLogLines`,void 0),Y([A()],$.prototype,`overviewLogCursor`,void 0),Y([A()],$.prototype,`walletSummary`,void 0),Y([A()],$.prototype,`walletSummaryError`,void 0),Y([A()],$.prototype,`walletSummaryLoading`,void 0),Y([A()],$.prototype,`walletBalancesLoading`,void 0),Y([A()],$.prototype,`walletLastUpdatedAt`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseMode`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseBusy`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseError`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseGeneratedMnemonic`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseStatus`,void 0),Y([A()],$.prototype,`skillsLoading`,void 0),Y([A()],$.prototype,`skillsReport`,void 0),Y([A()],$.prototype,`skillsError`,void 0),Y([A()],$.prototype,`skillsFilter`,void 0),Y([A()],$.prototype,`skillsStatusFilter`,void 0),Y([A()],$.prototype,`skillEdits`,void 0),Y([A()],$.prototype,`skillsBusyKey`,void 0),Y([A()],$.prototype,`skillMessages`,void 0),Y([A()],$.prototype,`skillsDetailKey`,void 0),Y([A()],$.prototype,`clawhubSearchQuery`,void 0),Y([A()],$.prototype,`clawhubSearchResults`,void 0),Y([A()],$.prototype,`clawhubSearchLoading`,void 0),Y([A()],$.prototype,`clawhubSearchError`,void 0),Y([A()],$.prototype,`clawhubDetail`,void 0),Y([A()],$.prototype,`clawhubDetailSlug`,void 0),Y([A()],$.prototype,`clawhubDetailLoading`,void 0),Y([A()],$.prototype,`clawhubDetailError`,void 0),Y([A()],$.prototype,`clawhubInstallSlug`,void 0),Y([A()],$.prototype,`clawhubInstallMessage`,void 0),Y([A()],$.prototype,`pluginsLoading`,void 0),Y([A()],$.prototype,`pluginsReport`,void 0),Y([A()],$.prototype,`pluginsError`,void 0),Y([A()],$.prototype,`pluginsFilter`,void 0),Y([A()],$.prototype,`pluginsStatusFilter`,void 0),Y([A()],$.prototype,`pluginsBusyKey`,void 0),Y([A()],$.prototype,`pluginMessages`,void 0),Y([A()],$.prototype,`pluginDetailKey`,void 0),Y([A()],$.prototype,`pluginClawhubSearchQuery`,void 0),Y([A()],$.prototype,`pluginClawhubSearchResults`,void 0),Y([A()],$.prototype,`pluginClawhubSearchLoading`,void 0),Y([A()],$.prototype,`pluginClawhubSearchError`,void 0),Y([A()],$.prototype,`pluginClawhubDetail`,void 0),Y([A()],$.prototype,`pluginClawhubDetailName`,void 0),Y([A()],$.prototype,`pluginClawhubDetailLoading`,void 0),Y([A()],$.prototype,`pluginClawhubDetailError`,void 0),Y([A()],$.prototype,`pluginClawhubInstallName`,void 0),Y([A()],$.prototype,`pluginClawhubInstallMessage`,void 0),Y([A()],$.prototype,`healthLoading`,void 0),Y([A()],$.prototype,`healthResult`,void 0),Y([A()],$.prototype,`healthError`,void 0),Y([A()],$.prototype,`modelAuthStatusLoading`,void 0),Y([A()],$.prototype,`modelAuthStatusResult`,void 0),Y([A()],$.prototype,`modelAuthStatusError`,void 0),Y([A()],$.prototype,`debugLoading`,void 0),Y([A()],$.prototype,`debugStatus`,void 0),Y([A()],$.prototype,`debugHealth`,void 0),Y([A()],$.prototype,`debugModels`,void 0),Y([A()],$.prototype,`debugHeartbeat`,void 0),Y([A()],$.prototype,`debugCallMethod`,void 0),Y([A()],$.prototype,`debugCallParams`,void 0),Y([A()],$.prototype,`debugCallResult`,void 0),Y([A()],$.prototype,`debugCallError`,void 0),Y([A()],$.prototype,`logsLoading`,void 0),Y([A()],$.prototype,`logsError`,void 0),Y([A()],$.prototype,`logsFile`,void 0),Y([A()],$.prototype,`logsEntries`,void 0),Y([A()],$.prototype,`logsFilterText`,void 0),Y([A()],$.prototype,`logsLevelFilters`,void 0),Y([A()],$.prototype,`logsAutoFollow`,void 0),Y([A()],$.prototype,`logsTruncated`,void 0),Y([A()],$.prototype,`logsCursor`,void 0),Y([A()],$.prototype,`logsLastFetchAt`,void 0),Y([A()],$.prototype,`logsLimit`,void 0),Y([A()],$.prototype,`logsMaxBytes`,void 0),Y([A()],$.prototype,`logsAtBottom`,void 0),Y([A()],$.prototype,`chatNewMessagesBelow`,void 0),$=Y([D(`genesis-app`)],$);export{Ri as A,Hu as C,Eo as D,xu as E,Gt as F,H as I,be as L,ai as M,ii as N,Bi as O,tn as P,md as S,Fu as T,od as _,Ix as a,Zu as b,Ov as c,Xu as d,cd as f,Qu as g,Uu as h,pE as i,Li as j,zi as k,Dv as l,pd as m,hM as n,_b as o,fd as p,gM as r,q as s,kF as t,p_ as u,Yu as v,Vu as w,$u as x,ed as y};
|
|
5900
|
-
//# sourceMappingURL=index-
|
|
5899
|
+
`,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.configRestartPrompt=null,this.dreamingStatusLoading=!1,this.dreamingStatusError=null,this.dreamingStatus=null,this.dreamingModeSaving=!1,this.dreamDiaryLoading=!1,this.dreamDiaryActionLoading=!1,this.dreamDiaryActionMessage=null,this.dreamDiaryActionArchivePath=null,this.dreamDiaryError=null,this.dreamDiaryPath=null,this.dreamDiaryContent=null,this.wikiImportInsightsLoading=!1,this.wikiImportInsightsError=null,this.wikiImportInsights=null,this.wikiMemoryPalaceLoading=!1,this.wikiMemoryPalaceError=null,this.wikiMemoryPalace=null,this.configFormDirty=!1,this.configSettingsMode=`quick`,this.configFormMode=`form`,this.configSearchQuery=``,this.configActiveSection=null,this.configActiveSubsection=null,this.communicationsFormMode=`form`,this.communicationsSearchQuery=``,this.communicationsActiveSection=null,this.communicationsActiveSubsection=null,this.appearanceFormMode=`form`,this.appearanceSearchQuery=``,this.appearanceActiveSection=null,this.appearanceActiveSubsection=null,this.automationFormMode=`form`,this.automationSearchQuery=``,this.automationActiveSection=null,this.automationActiveSubsection=null,this.infrastructureFormMode=`form`,this.infrastructureSearchQuery=``,this.infrastructureActiveSection=null,this.infrastructureActiveSubsection=null,this.aiAgentsFormMode=`form`,this.aiAgentsSearchQuery=``,this.aiAgentsActiveSection=null,this.aiAgentsActiveSubsection=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.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.channelWizardSessionId=null,this.channelWizardStep=null,this.channelWizardInput=null,this.channelWizardBusy=!1,this.channelWizardError=null,this.channelWizardMessage=null,this.channelSettingsId=null,this.modelProviderWizardSessionId=null,this.modelProviderWizardStep=null,this.modelProviderWizardInput=null,this.modelProviderWizardBusy=!1,this.modelProviderWizardError=null,this.modelProviderWizardMessage=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.agentsSelectedId=null,this.toolsCatalogLoading=!1,this.toolsCatalogError=null,this.toolsCatalogResult=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveResult=null,this.agentsPanel=`files`,this.agentFilesLoading=!1,this.agentFilesError=null,this.agentFilesList=null,this.agentFileContents={},this.agentFileDrafts={},this.agentFileActive=null,this.agentFileSaving=!1,this.agentIdentityLoading=!1,this.agentIdentityError=null,this.agentIdentityById={},this.agentSkillsLoading=!1,this.agentSkillsError=null,this.agentSkillsReport=null,this.agentSkillsAgentId=null,this.mcpServersLoading=!1,this.mcpServers=null,this.mcpServersPath=null,this.mcpServersError=null,this.mcpBusy=!1,this.mcpMessage=null,this.mcpDraftName=``,this.mcpDraftConfig=``,this.mcpAddMode=`preset`,this.mcpAuthToken=``,this.mcpPresetId=null,this.mcpLinkUrl=``,this.mcpLinkMetadataLoading=!1,this.mcpLinkMetadataError=null,this.mcpLinkMetadata=null,this.mcpOAuthStatus={},this.mcpOAuthFlow=null,this.mcpOAuthPopup=null,this.mcpTestStatus={},this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.sessionsFilterActive=``,this.sessionsFilterLimit=`120`,this.sessionsIncludeGlobal=!0,this.sessionsIncludeUnknown=!1,this.sessionsHideCron=!0,this.sessionsSearchQuery=``,this.sessionsSortColumn=`updated`,this.sessionsSortDir=`desc`,this.sessionsPage=0,this.sessionsPageSize=25,this.sessionsSelectedKeys=new Set,this.sessionsExpandedCheckpointKey=null,this.sessionsCheckpointItemsByKey={},this.sessionsCheckpointLoadingKey=null,this.sessionsCheckpointBusyKey=null,this.sessionsCheckpointErrorByKey={},this.usageLoading=!1,this.usageResult=null,this.usageCostSummary=null,this.usageError=null,this.usageStartDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageEndDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageSelectedSessions=[],this.usageSelectedDays=[],this.usageSelectedHours=[],this.usageChartMode=`tokens`,this.usageDailyChartMode=`by-type`,this.usageTimeSeriesMode=`per-turn`,this.usageTimeSeriesBreakdownMode=`by-type`,this.usageTimeSeries=null,this.usageTimeSeriesLoading=!1,this.usageTimeSeriesCursorStart=null,this.usageTimeSeriesCursorEnd=null,this.usageSessionLogs=null,this.usageSessionLogsLoading=!1,this.usageSessionLogsExpanded=!1,this.usageQuery=``,this.usageQueryDraft=``,this.usageSessionSort=`recent`,this.usageSessionSortDir=`desc`,this.usageRecentSessions=[],this.usageTimeZone=`local`,this.usageContextExpanded=!1,this.usageHeaderPinned=!1,this.usageSessionsTab=`all`,this.usageVisibleColumns=[`channel`,`agent`,`provider`,`model`,`messages`,`tools`,`errors`,`duration`],this.usageLogFilterRoles=[],this.usageLogFilterTools=[],this.usageLogFilterHasTools=!1,this.usageLogFilterQuery=``,this.usageQueryDebounceTimer=null,this.cronLoading=!1,this.cronQuickCreateOpen=!1,this.cronQuickCreateStep=`what`,this.cronQuickCreateDraft=null,this.cronJobsLoadingMore=!1,this.cronJobs=[],this.cronJobsTotal=0,this.cronJobsHasMore=!1,this.cronJobsNextOffset=null,this.cronJobsLimit=50,this.cronJobsQuery=``,this.cronJobsEnabledFilter=`all`,this.cronJobsScheduleKindFilter=`all`,this.cronJobsLastStatusFilter=`all`,this.cronJobsSortBy=`nextRunAtMs`,this.cronJobsSortDir=`asc`,this.cronStatus=null,this.cronError=null,this.cronForm={...Yd},this.cronFieldErrors={},this.cronEditingJobId=null,this.cronRunsJobId=null,this.cronRunsLoadingMore=!1,this.cronRuns=[],this.cronRunsTotal=0,this.cronRunsHasMore=!1,this.cronRunsNextOffset=null,this.cronRunsLimit=50,this.cronRunsScope=`all`,this.cronRunsStatuses=[],this.cronRunsDeliveryStatuses=[],this.cronRunsStatusFilter=`all`,this.cronRunsQuery=``,this.cronRunsSortDir=`desc`,this.cronModelSuggestions=[],this.cronBusy=!1,this.updateAvailable=null,this.attentionItems=[],this.paletteOpen=!1,this.paletteQuery=``,this.paletteActiveIndex=0,this.overviewShowGatewayToken=!1,this.overviewShowGatewayPassword=!1,this.overviewLogLines=[],this.overviewLogCursor=0,this.walletSummary=null,this.walletSummaryError=null,this.walletSummaryLoading=!1,this.walletBalancesLoading=!1,this.walletLastUpdatedAt=null,this.walletRecoveryPhraseMode=`generate`,this.walletRecoveryPhraseBusy=!1,this.walletRecoveryPhraseError=null,this.walletRecoveryPhraseGeneratedMnemonic=null,this.walletRecoveryPhraseStatus=null,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter=``,this.skillsStatusFilter=`all`,this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillsDetailKey=null,this.clawhubSearchQuery=``,this.clawhubSearchResults=null,this.clawhubSearchLoading=!1,this.clawhubSearchError=null,this.clawhubDetail=null,this.clawhubDetailSlug=null,this.clawhubDetailLoading=!1,this.clawhubDetailError=null,this.clawhubInstallSlug=null,this.clawhubInstallMessage=null,this.pluginsLoading=!1,this.pluginsReport=null,this.pluginsError=null,this.pluginsFilter=``,this.pluginsStatusFilter=`all`,this.pluginsBusyKey=null,this.pluginMessages={},this.pluginDetailKey=null,this.pluginClawhubSearchQuery=``,this.pluginClawhubSearchResults=null,this.pluginClawhubSearchLoading=!1,this.pluginClawhubSearchError=null,this.pluginClawhubDetail=null,this.pluginClawhubDetailName=null,this.pluginClawhubDetailLoading=!1,this.pluginClawhubDetailError=null,this.pluginClawhubInstallName=null,this.pluginClawhubInstallMessage=null,this.healthLoading=!1,this.healthResult=null,this.healthError=null,this.modelAuthStatusLoading=!1,this.modelAuthStatusResult=null,this.modelAuthStatusError=null,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={...Jd},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.chatNewMessagesBelow=!1,this.nodesPollInterval=null,this.logsPollInterval=null,this.debugPollInterval=null,this.logsScrollFrame=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.refreshSessionsAfterChat=new Set,this.chatSideResultTerminalRuns=new Set,this.basePath=``,this.popStateHandler=()=>QO(this),this.topbarObserver=null,this.globalKeydownHandler=e=>{(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.key===`k`&&(e.preventDefault(),this.paletteOpen=!this.paletteOpen,this.paletteOpen&&(this.paletteQuery=``,this.paletteActiveIndex=0))},this.canvasAgentRunMessageHandler=e=>{YI(this,e)},this.mcpOAuthMessageHandler=e=>{let t=e.data;if(!t)return;let n=typeof window<`u`&&window.location?window.location.origin:``;if(rL({origin:e.origin,source:e.source,expectedOrigin:n,popup:this.mcpOAuthPopup,dataSource:t.source}))if(t.type===`mcp-oauth-callback`){if(this.mcpOAuthPopup&&!this.mcpOAuthPopup.closed)try{this.mcpOAuthPopup.close()}catch{}if(this.mcpOAuthPopup=null,!this.mcpOAuthFlow)return;if(t.error){this.mcpMessage={kind:`error`,text:`OAuth failed: ${t.error}`},this.mcpOAuthFlow=null;return}if(!t.code||!t.state){this.mcpMessage={kind:`error`,text:`OAuth callback missing code or state.`},this.mcpOAuthFlow=null;return}eh(this,t.code,t.state)}else t.type===`mcp-oauth-cancelled`&&(nh(this),this.mcpMessage={kind:`error`,text:`Authorization was cancelled.`})},o(this.settings.locale)&&l.setLocale(this.settings.locale)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.onSlashAction=e=>{switch(e){case`toggle-focus`:this.applySettings({...this.settings,chatFocusMode:!this.settings.chatFocusMode});break;case`export`:mb(this.chatMessages,this.assistantName);break;case`refresh-tools-effective`:$f(this);break}},document.addEventListener(`keydown`,this.globalKeydownHandler),window.addEventListener(`message`,this.canvasAgentRunMessageHandler),window.addEventListener(`message`,this.mcpOAuthMessageHandler),Gk(this)}firstUpdated(){Kk(this)}disconnectedCallback(){document.removeEventListener(`keydown`,this.globalKeydownHandler),window.removeEventListener(`message`,this.canvasAgentRunMessageHandler),window.removeEventListener(`message`,this.mcpOAuthMessageHandler),qk(this),super.disconnectedCallback()}updated(e){if(Jk(this,e),!e.has(`sessionKey`)||this.agentsPanel!==`tools`)return;let t=Ha(this.sessionKey);if(this.agentsSelectedId&&this.agentsSelectedId===t){Xf(this,{agentId:this.agentsSelectedId,sessionKey:this.sessionKey});return}this.toolsEffectiveResult=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null}connect(){Rk(this)}handleChatScroll(e){Gr(this,e)}handleLogsScroll(e){Kr(this,e)}exportLogs(e,t){Jr(e,t)}resetToolStream(){aa(this)}resetChatScroll(){qr(this)}scrollToBottom(e){qr(this),Ur(this,!0,!!e?.smooth)}async loadAssistantIdentity(){await pk(this)}applySettings(e){NO(this,e)}applyLocalUserIdentity(e){PO(this,e)}setTab(e){RO(this,e),this.navDrawerOpen=!1}setTheme(e,t){BO(this,e,t),this.themeOrder=this.buildThemeOrder(e)}setThemeMode(e,t){VO(this,e,t)}setBorderRadius(e){NO(this,{...this.settings,borderRadius:e}),this.requestUpdate()}buildThemeOrder(e){return[e,...[...rg].filter(t=>t!==e)]}async loadOverview(e){await ik(this,e)}async loadCron(){await uk(this)}async handleAbortChat(){await yd(this)}removeQueuedMessage(e){Ed(this,e)}async handleSendChat(e,t){await Od(this,e,t)}async toggleRealtimeTalk(){if(this.realtimeTalkSession){this.realtimeTalkSession.stop(),this.realtimeTalkSession=null,this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;return}if(!this.client||!this.connected){this.lastError=`Gateway not connected`;return}this.realtimeTalkActive=!0,this.realtimeTalkStatus=`connecting`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;let e=new nL(this.client,this.sessionKey,{onStatus:(e,t)=>{this.realtimeTalkStatus=e,this.realtimeTalkDetail=t??null,(e===`idle`||e===`error`)&&(this.realtimeTalkActive=e!==`idle`)},onTranscript:e=>{this.realtimeTalkTranscript=`${e.role===`user`?`You`:`Genesis`}: ${e.text}`}});this.realtimeTalkSession=e;try{await e.start()}catch(t){e.stop(),this.realtimeTalkSession===e&&(this.realtimeTalkSession=null),this.realtimeTalkActive=!1,this.realtimeTalkStatus=`error`,this.realtimeTalkDetail=t instanceof Error?t.message:String(t),this.lastError=this.realtimeTalkDetail}}async steerQueuedChatMessage(e){await wd(this,e)}async handleWhatsAppStart(e){await vr(this,e)}async handleWhatsAppWait(){await yr(this)}async handleWhatsAppLogout(){await br(this)}async handleChannelConfigSave(){await xr(this)}async handleChannelConfigReload(){await Sr(this)}async handleChannelWizardStart(){await Tr(this)}async handleChannelWizardSubmit(){await Dr(this)}async handleChannelWizardCancel(){await Or(this)}handleChannelWizardInput(e){Er(this,e)}handleChannelWizardClose(){kr(this)}async handleModelProviderWizardStart(){await Qk(this)}async handleModelProviderWizardSubmit(){await eA(this)}async handleModelProviderWizardCancel(){await tA(this)}handleModelProviderWizardInput(e){$k(this,e)}handleModelProviderWizardClose(){nA(this)}handleNostrProfileEdit(e,t){Pr(this,e,t)}handleNostrProfileCancel(){Fr(this)}handleNostrProfileFieldChange(e,t){Ir(this,e,t)}async handleNostrProfileSave(){await Rr(this)}async handleNostrProfileImport(){await zr(this)}handleNostrProfileToggleAdvanced(){Lr(this)}async handleExecApprovalDecision(e){let t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{let n=t.kind===`plugin`?`plugin.approval.resolve`:`exec.approval.resolve`;await this.client.request(n,{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(e=>e.id!==t.id)}catch(e){this.execApprovalError=`Approval failed: ${String(e)}`}finally{this.execApprovalBusy=!1}}}handleGatewayUrlConfirm(){let e=this.pendingGatewayUrl;if(!e)return;let t=this.pendingGatewayToken?.trim()||``;this.pendingGatewayUrl=null,this.pendingGatewayToken=null,NO(this,{...this.settings,gatewayUrl:e,token:t}),this.connect()}handleGatewayUrlCancel(){this.pendingGatewayUrl=null,this.pendingGatewayToken=null}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){let t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}render(){return VI(this)}};Y([A()],$.prototype,`settings`,void 0),Y([A()],$.prototype,`password`,void 0),Y([A()],$.prototype,`loginShowGatewayToken`,void 0),Y([A()],$.prototype,`loginShowGatewayPassword`,void 0),Y([A()],$.prototype,`tab`,void 0),Y([A()],$.prototype,`onboarding`,void 0),Y([A()],$.prototype,`connected`,void 0),Y([A()],$.prototype,`theme`,void 0),Y([A()],$.prototype,`themeMode`,void 0),Y([A()],$.prototype,`themeResolved`,void 0),Y([A()],$.prototype,`themeOrder`,void 0),Y([A()],$.prototype,`hello`,void 0),Y([A()],$.prototype,`lastError`,void 0),Y([A()],$.prototype,`lastErrorCode`,void 0),Y([A()],$.prototype,`eventLog`,void 0),Y([A()],$.prototype,`assistantName`,void 0),Y([A()],$.prototype,`assistantAvatar`,void 0),Y([A()],$.prototype,`assistantAgentId`,void 0),Y([A()],$.prototype,`userName`,void 0),Y([A()],$.prototype,`userAvatar`,void 0),Y([A()],$.prototype,`localMediaPreviewRoots`,void 0),Y([A()],$.prototype,`embedSandboxMode`,void 0),Y([A()],$.prototype,`allowExternalEmbedUrls`,void 0),Y([A()],$.prototype,`serverVersion`,void 0),Y([A()],$.prototype,`sessionKey`,void 0),Y([A()],$.prototype,`chatLoading`,void 0),Y([A()],$.prototype,`chatSending`,void 0),Y([A()],$.prototype,`chatMessage`,void 0),Y([A()],$.prototype,`chatMessages`,void 0),Y([A()],$.prototype,`chatToolMessages`,void 0),Y([A()],$.prototype,`chatStreamSegments`,void 0),Y([A()],$.prototype,`chatStream`,void 0),Y([A()],$.prototype,`chatStreamStartedAt`,void 0),Y([A()],$.prototype,`chatRunId`,void 0),Y([A()],$.prototype,`chatSideResult`,void 0),Y([A()],$.prototype,`compactionStatus`,void 0),Y([A()],$.prototype,`fallbackStatus`,void 0),Y([A()],$.prototype,`chatAvatarUrl`,void 0),Y([A()],$.prototype,`chatThinkingLevel`,void 0),Y([A()],$.prototype,`chatModelOverrides`,void 0),Y([A()],$.prototype,`chatModelsLoading`,void 0),Y([A()],$.prototype,`chatModelCatalog`,void 0),Y([A()],$.prototype,`modelsPanel`,void 0),Y([A()],$.prototype,`modelsLoading`,void 0),Y([A()],$.prototype,`memoryEntries`,void 0),Y([A()],$.prototype,`memoryLoading`,void 0),Y([A()],$.prototype,`memoryError`,void 0),Y([A()],$.prototype,`chatQueue`,void 0),Y([A()],$.prototype,`chatAttachments`,void 0),Y([A()],$.prototype,`realtimeTalkActive`,void 0),Y([A()],$.prototype,`realtimeTalkStatus`,void 0),Y([A()],$.prototype,`realtimeTalkDetail`,void 0),Y([A()],$.prototype,`realtimeTalkTranscript`,void 0),Y([A()],$.prototype,`chatManualRefreshInFlight`,void 0),Y([A()],$.prototype,`navDrawerOpen`,void 0),Y([A()],$.prototype,`sidebarOpen`,void 0),Y([A()],$.prototype,`sidebarContent`,void 0),Y([A()],$.prototype,`sidebarError`,void 0),Y([A()],$.prototype,`splitRatio`,void 0),Y([A()],$.prototype,`nodesLoading`,void 0),Y([A()],$.prototype,`nodes`,void 0),Y([A()],$.prototype,`nodeManagementSelectedId`,void 0),Y([A()],$.prototype,`nodeManagementRename`,void 0),Y([A()],$.prototype,`nodeManagementCommand`,void 0),Y([A()],$.prototype,`nodeManagementParams`,void 0),Y([A()],$.prototype,`nodeManagementShell`,void 0),Y([A()],$.prototype,`nodeManagementCwd`,void 0),Y([A()],$.prototype,`nodeManagementTimeoutMs`,void 0),Y([A()],$.prototype,`nodeManagementBusy`,void 0),Y([A()],$.prototype,`nodeManagementError`,void 0),Y([A()],$.prototype,`nodeManagementResult`,void 0),Y([A()],$.prototype,`devicesLoading`,void 0),Y([A()],$.prototype,`devicesError`,void 0),Y([A()],$.prototype,`devicesList`,void 0),Y([A()],$.prototype,`execApprovalsLoading`,void 0),Y([A()],$.prototype,`execApprovalsSaving`,void 0),Y([A()],$.prototype,`execApprovalsDirty`,void 0),Y([A()],$.prototype,`execApprovalsSnapshot`,void 0),Y([A()],$.prototype,`execApprovalsForm`,void 0),Y([A()],$.prototype,`execApprovalsSelectedAgent`,void 0),Y([A()],$.prototype,`execApprovalsTarget`,void 0),Y([A()],$.prototype,`execApprovalsTargetNodeId`,void 0),Y([A()],$.prototype,`execApprovalQueue`,void 0),Y([A()],$.prototype,`execApprovalBusy`,void 0),Y([A()],$.prototype,`execApprovalError`,void 0),Y([A()],$.prototype,`pendingGatewayUrl`,void 0),Y([A()],$.prototype,`configLoading`,void 0),Y([A()],$.prototype,`configRaw`,void 0),Y([A()],$.prototype,`configRawOriginal`,void 0),Y([A()],$.prototype,`configValid`,void 0),Y([A()],$.prototype,`configIssues`,void 0),Y([A()],$.prototype,`configSaving`,void 0),Y([A()],$.prototype,`configApplying`,void 0),Y([A()],$.prototype,`updateRunning`,void 0),Y([A()],$.prototype,`applySessionKey`,void 0),Y([A()],$.prototype,`configSnapshot`,void 0),Y([A()],$.prototype,`configSchema`,void 0),Y([A()],$.prototype,`configSchemaVersion`,void 0),Y([A()],$.prototype,`configSchemaLoading`,void 0),Y([A()],$.prototype,`configUiHints`,void 0),Y([A()],$.prototype,`configForm`,void 0),Y([A()],$.prototype,`configFormOriginal`,void 0),Y([A()],$.prototype,`configRestartPrompt`,void 0),Y([A()],$.prototype,`dreamingStatusLoading`,void 0),Y([A()],$.prototype,`dreamingStatusError`,void 0),Y([A()],$.prototype,`dreamingStatus`,void 0),Y([A()],$.prototype,`dreamingModeSaving`,void 0),Y([A()],$.prototype,`dreamDiaryLoading`,void 0),Y([A()],$.prototype,`dreamDiaryActionLoading`,void 0),Y([A()],$.prototype,`dreamDiaryActionMessage`,void 0),Y([A()],$.prototype,`dreamDiaryActionArchivePath`,void 0),Y([A()],$.prototype,`dreamDiaryError`,void 0),Y([A()],$.prototype,`dreamDiaryPath`,void 0),Y([A()],$.prototype,`dreamDiaryContent`,void 0),Y([A()],$.prototype,`wikiImportInsightsLoading`,void 0),Y([A()],$.prototype,`wikiImportInsightsError`,void 0),Y([A()],$.prototype,`wikiImportInsights`,void 0),Y([A()],$.prototype,`wikiMemoryPalaceLoading`,void 0),Y([A()],$.prototype,`wikiMemoryPalaceError`,void 0),Y([A()],$.prototype,`wikiMemoryPalace`,void 0),Y([A()],$.prototype,`configFormDirty`,void 0),Y([A()],$.prototype,`configSettingsMode`,void 0),Y([A()],$.prototype,`configFormMode`,void 0),Y([A()],$.prototype,`configSearchQuery`,void 0),Y([A()],$.prototype,`configActiveSection`,void 0),Y([A()],$.prototype,`configActiveSubsection`,void 0),Y([A()],$.prototype,`communicationsFormMode`,void 0),Y([A()],$.prototype,`communicationsSearchQuery`,void 0),Y([A()],$.prototype,`communicationsActiveSection`,void 0),Y([A()],$.prototype,`communicationsActiveSubsection`,void 0),Y([A()],$.prototype,`appearanceFormMode`,void 0),Y([A()],$.prototype,`appearanceSearchQuery`,void 0),Y([A()],$.prototype,`appearanceActiveSection`,void 0),Y([A()],$.prototype,`appearanceActiveSubsection`,void 0),Y([A()],$.prototype,`automationFormMode`,void 0),Y([A()],$.prototype,`automationSearchQuery`,void 0),Y([A()],$.prototype,`automationActiveSection`,void 0),Y([A()],$.prototype,`automationActiveSubsection`,void 0),Y([A()],$.prototype,`infrastructureFormMode`,void 0),Y([A()],$.prototype,`infrastructureSearchQuery`,void 0),Y([A()],$.prototype,`infrastructureActiveSection`,void 0),Y([A()],$.prototype,`infrastructureActiveSubsection`,void 0),Y([A()],$.prototype,`aiAgentsFormMode`,void 0),Y([A()],$.prototype,`aiAgentsSearchQuery`,void 0),Y([A()],$.prototype,`aiAgentsActiveSection`,void 0),Y([A()],$.prototype,`aiAgentsActiveSubsection`,void 0),Y([A()],$.prototype,`channelsLoading`,void 0),Y([A()],$.prototype,`channelsSnapshot`,void 0),Y([A()],$.prototype,`channelsError`,void 0),Y([A()],$.prototype,`channelsLastSuccess`,void 0),Y([A()],$.prototype,`whatsappLoginMessage`,void 0),Y([A()],$.prototype,`whatsappLoginQrDataUrl`,void 0),Y([A()],$.prototype,`whatsappLoginConnected`,void 0),Y([A()],$.prototype,`whatsappBusy`,void 0),Y([A()],$.prototype,`nostrProfileFormState`,void 0),Y([A()],$.prototype,`nostrProfileAccountId`,void 0),Y([A()],$.prototype,`channelWizardSessionId`,void 0),Y([A()],$.prototype,`channelWizardStep`,void 0),Y([A()],$.prototype,`channelWizardInput`,void 0),Y([A()],$.prototype,`channelWizardBusy`,void 0),Y([A()],$.prototype,`channelWizardError`,void 0),Y([A()],$.prototype,`channelWizardMessage`,void 0),Y([A()],$.prototype,`channelSettingsId`,void 0),Y([A()],$.prototype,`modelProviderWizardSessionId`,void 0),Y([A()],$.prototype,`modelProviderWizardStep`,void 0),Y([A()],$.prototype,`modelProviderWizardInput`,void 0),Y([A()],$.prototype,`modelProviderWizardBusy`,void 0),Y([A()],$.prototype,`modelProviderWizardError`,void 0),Y([A()],$.prototype,`modelProviderWizardMessage`,void 0),Y([A()],$.prototype,`presenceLoading`,void 0),Y([A()],$.prototype,`presenceEntries`,void 0),Y([A()],$.prototype,`presenceError`,void 0),Y([A()],$.prototype,`presenceStatus`,void 0),Y([A()],$.prototype,`agentsLoading`,void 0),Y([A()],$.prototype,`agentsList`,void 0),Y([A()],$.prototype,`agentsError`,void 0),Y([A()],$.prototype,`agentsSelectedId`,void 0),Y([A()],$.prototype,`toolsCatalogLoading`,void 0),Y([A()],$.prototype,`toolsCatalogError`,void 0),Y([A()],$.prototype,`toolsCatalogResult`,void 0),Y([A()],$.prototype,`toolsEffectiveLoading`,void 0),Y([A()],$.prototype,`toolsEffectiveLoadingKey`,void 0),Y([A()],$.prototype,`toolsEffectiveResultKey`,void 0),Y([A()],$.prototype,`toolsEffectiveError`,void 0),Y([A()],$.prototype,`toolsEffectiveResult`,void 0),Y([A()],$.prototype,`agentsPanel`,void 0),Y([A()],$.prototype,`agentFilesLoading`,void 0),Y([A()],$.prototype,`agentFilesError`,void 0),Y([A()],$.prototype,`agentFilesList`,void 0),Y([A()],$.prototype,`agentFileContents`,void 0),Y([A()],$.prototype,`agentFileDrafts`,void 0),Y([A()],$.prototype,`agentFileActive`,void 0),Y([A()],$.prototype,`agentFileSaving`,void 0),Y([A()],$.prototype,`agentIdentityLoading`,void 0),Y([A()],$.prototype,`agentIdentityError`,void 0),Y([A()],$.prototype,`agentIdentityById`,void 0),Y([A()],$.prototype,`agentSkillsLoading`,void 0),Y([A()],$.prototype,`agentSkillsError`,void 0),Y([A()],$.prototype,`agentSkillsReport`,void 0),Y([A()],$.prototype,`agentSkillsAgentId`,void 0),Y([A()],$.prototype,`mcpServersLoading`,void 0),Y([A()],$.prototype,`mcpServers`,void 0),Y([A()],$.prototype,`mcpServersPath`,void 0),Y([A()],$.prototype,`mcpServersError`,void 0),Y([A()],$.prototype,`mcpBusy`,void 0),Y([A()],$.prototype,`mcpMessage`,void 0),Y([A()],$.prototype,`mcpDraftName`,void 0),Y([A()],$.prototype,`mcpDraftConfig`,void 0),Y([A()],$.prototype,`mcpAddMode`,void 0),Y([A()],$.prototype,`mcpAuthToken`,void 0),Y([A()],$.prototype,`mcpPresetId`,void 0),Y([A()],$.prototype,`mcpLinkUrl`,void 0),Y([A()],$.prototype,`mcpLinkMetadataLoading`,void 0),Y([A()],$.prototype,`mcpLinkMetadataError`,void 0),Y([A()],$.prototype,`mcpLinkMetadata`,void 0),Y([A()],$.prototype,`mcpOAuthStatus`,void 0),Y([A()],$.prototype,`mcpOAuthFlow`,void 0),Y([A()],$.prototype,`mcpOAuthPopup`,void 0),Y([A()],$.prototype,`mcpTestStatus`,void 0),Y([A()],$.prototype,`sessionsLoading`,void 0),Y([A()],$.prototype,`sessionsResult`,void 0),Y([A()],$.prototype,`sessionsError`,void 0),Y([A()],$.prototype,`sessionsFilterActive`,void 0),Y([A()],$.prototype,`sessionsFilterLimit`,void 0),Y([A()],$.prototype,`sessionsIncludeGlobal`,void 0),Y([A()],$.prototype,`sessionsIncludeUnknown`,void 0),Y([A()],$.prototype,`sessionsHideCron`,void 0),Y([A()],$.prototype,`sessionsSearchQuery`,void 0),Y([A()],$.prototype,`sessionsSortColumn`,void 0),Y([A()],$.prototype,`sessionsSortDir`,void 0),Y([A()],$.prototype,`sessionsPage`,void 0),Y([A()],$.prototype,`sessionsPageSize`,void 0),Y([A()],$.prototype,`sessionsSelectedKeys`,void 0),Y([A()],$.prototype,`sessionsExpandedCheckpointKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointItemsByKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointLoadingKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointBusyKey`,void 0),Y([A()],$.prototype,`sessionsCheckpointErrorByKey`,void 0),Y([A()],$.prototype,`usageLoading`,void 0),Y([A()],$.prototype,`usageResult`,void 0),Y([A()],$.prototype,`usageCostSummary`,void 0),Y([A()],$.prototype,`usageError`,void 0),Y([A()],$.prototype,`usageStartDate`,void 0),Y([A()],$.prototype,`usageEndDate`,void 0),Y([A()],$.prototype,`usageSelectedSessions`,void 0),Y([A()],$.prototype,`usageSelectedDays`,void 0),Y([A()],$.prototype,`usageSelectedHours`,void 0),Y([A()],$.prototype,`usageChartMode`,void 0),Y([A()],$.prototype,`usageDailyChartMode`,void 0),Y([A()],$.prototype,`usageTimeSeriesMode`,void 0),Y([A()],$.prototype,`usageTimeSeriesBreakdownMode`,void 0),Y([A()],$.prototype,`usageTimeSeries`,void 0),Y([A()],$.prototype,`usageTimeSeriesLoading`,void 0),Y([A()],$.prototype,`usageTimeSeriesCursorStart`,void 0),Y([A()],$.prototype,`usageTimeSeriesCursorEnd`,void 0),Y([A()],$.prototype,`usageSessionLogs`,void 0),Y([A()],$.prototype,`usageSessionLogsLoading`,void 0),Y([A()],$.prototype,`usageSessionLogsExpanded`,void 0),Y([A()],$.prototype,`usageQuery`,void 0),Y([A()],$.prototype,`usageQueryDraft`,void 0),Y([A()],$.prototype,`usageSessionSort`,void 0),Y([A()],$.prototype,`usageSessionSortDir`,void 0),Y([A()],$.prototype,`usageRecentSessions`,void 0),Y([A()],$.prototype,`usageTimeZone`,void 0),Y([A()],$.prototype,`usageContextExpanded`,void 0),Y([A()],$.prototype,`usageHeaderPinned`,void 0),Y([A()],$.prototype,`usageSessionsTab`,void 0),Y([A()],$.prototype,`usageVisibleColumns`,void 0),Y([A()],$.prototype,`usageLogFilterRoles`,void 0),Y([A()],$.prototype,`usageLogFilterTools`,void 0),Y([A()],$.prototype,`usageLogFilterHasTools`,void 0),Y([A()],$.prototype,`usageLogFilterQuery`,void 0),Y([A()],$.prototype,`cronLoading`,void 0),Y([A()],$.prototype,`cronQuickCreateOpen`,void 0),Y([A()],$.prototype,`cronQuickCreateStep`,void 0),Y([A()],$.prototype,`cronQuickCreateDraft`,void 0),Y([A()],$.prototype,`cronJobsLoadingMore`,void 0),Y([A()],$.prototype,`cronJobs`,void 0),Y([A()],$.prototype,`cronJobsTotal`,void 0),Y([A()],$.prototype,`cronJobsHasMore`,void 0),Y([A()],$.prototype,`cronJobsNextOffset`,void 0),Y([A()],$.prototype,`cronJobsLimit`,void 0),Y([A()],$.prototype,`cronJobsQuery`,void 0),Y([A()],$.prototype,`cronJobsEnabledFilter`,void 0),Y([A()],$.prototype,`cronJobsScheduleKindFilter`,void 0),Y([A()],$.prototype,`cronJobsLastStatusFilter`,void 0),Y([A()],$.prototype,`cronJobsSortBy`,void 0),Y([A()],$.prototype,`cronJobsSortDir`,void 0),Y([A()],$.prototype,`cronStatus`,void 0),Y([A()],$.prototype,`cronError`,void 0),Y([A()],$.prototype,`cronForm`,void 0),Y([A()],$.prototype,`cronFieldErrors`,void 0),Y([A()],$.prototype,`cronEditingJobId`,void 0),Y([A()],$.prototype,`cronRunsJobId`,void 0),Y([A()],$.prototype,`cronRunsLoadingMore`,void 0),Y([A()],$.prototype,`cronRuns`,void 0),Y([A()],$.prototype,`cronRunsTotal`,void 0),Y([A()],$.prototype,`cronRunsHasMore`,void 0),Y([A()],$.prototype,`cronRunsNextOffset`,void 0),Y([A()],$.prototype,`cronRunsLimit`,void 0),Y([A()],$.prototype,`cronRunsScope`,void 0),Y([A()],$.prototype,`cronRunsStatuses`,void 0),Y([A()],$.prototype,`cronRunsDeliveryStatuses`,void 0),Y([A()],$.prototype,`cronRunsStatusFilter`,void 0),Y([A()],$.prototype,`cronRunsQuery`,void 0),Y([A()],$.prototype,`cronRunsSortDir`,void 0),Y([A()],$.prototype,`cronModelSuggestions`,void 0),Y([A()],$.prototype,`cronBusy`,void 0),Y([A()],$.prototype,`updateAvailable`,void 0),Y([A()],$.prototype,`attentionItems`,void 0),Y([A()],$.prototype,`paletteOpen`,void 0),Y([A()],$.prototype,`paletteQuery`,void 0),Y([A()],$.prototype,`paletteActiveIndex`,void 0),Y([A()],$.prototype,`overviewShowGatewayToken`,void 0),Y([A()],$.prototype,`overviewShowGatewayPassword`,void 0),Y([A()],$.prototype,`overviewLogLines`,void 0),Y([A()],$.prototype,`overviewLogCursor`,void 0),Y([A()],$.prototype,`walletSummary`,void 0),Y([A()],$.prototype,`walletSummaryError`,void 0),Y([A()],$.prototype,`walletSummaryLoading`,void 0),Y([A()],$.prototype,`walletBalancesLoading`,void 0),Y([A()],$.prototype,`walletLastUpdatedAt`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseMode`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseBusy`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseError`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseGeneratedMnemonic`,void 0),Y([A()],$.prototype,`walletRecoveryPhraseStatus`,void 0),Y([A()],$.prototype,`skillsLoading`,void 0),Y([A()],$.prototype,`skillsReport`,void 0),Y([A()],$.prototype,`skillsError`,void 0),Y([A()],$.prototype,`skillsFilter`,void 0),Y([A()],$.prototype,`skillsStatusFilter`,void 0),Y([A()],$.prototype,`skillEdits`,void 0),Y([A()],$.prototype,`skillsBusyKey`,void 0),Y([A()],$.prototype,`skillMessages`,void 0),Y([A()],$.prototype,`skillsDetailKey`,void 0),Y([A()],$.prototype,`clawhubSearchQuery`,void 0),Y([A()],$.prototype,`clawhubSearchResults`,void 0),Y([A()],$.prototype,`clawhubSearchLoading`,void 0),Y([A()],$.prototype,`clawhubSearchError`,void 0),Y([A()],$.prototype,`clawhubDetail`,void 0),Y([A()],$.prototype,`clawhubDetailSlug`,void 0),Y([A()],$.prototype,`clawhubDetailLoading`,void 0),Y([A()],$.prototype,`clawhubDetailError`,void 0),Y([A()],$.prototype,`clawhubInstallSlug`,void 0),Y([A()],$.prototype,`clawhubInstallMessage`,void 0),Y([A()],$.prototype,`pluginsLoading`,void 0),Y([A()],$.prototype,`pluginsReport`,void 0),Y([A()],$.prototype,`pluginsError`,void 0),Y([A()],$.prototype,`pluginsFilter`,void 0),Y([A()],$.prototype,`pluginsStatusFilter`,void 0),Y([A()],$.prototype,`pluginsBusyKey`,void 0),Y([A()],$.prototype,`pluginMessages`,void 0),Y([A()],$.prototype,`pluginDetailKey`,void 0),Y([A()],$.prototype,`pluginClawhubSearchQuery`,void 0),Y([A()],$.prototype,`pluginClawhubSearchResults`,void 0),Y([A()],$.prototype,`pluginClawhubSearchLoading`,void 0),Y([A()],$.prototype,`pluginClawhubSearchError`,void 0),Y([A()],$.prototype,`pluginClawhubDetail`,void 0),Y([A()],$.prototype,`pluginClawhubDetailName`,void 0),Y([A()],$.prototype,`pluginClawhubDetailLoading`,void 0),Y([A()],$.prototype,`pluginClawhubDetailError`,void 0),Y([A()],$.prototype,`pluginClawhubInstallName`,void 0),Y([A()],$.prototype,`pluginClawhubInstallMessage`,void 0),Y([A()],$.prototype,`healthLoading`,void 0),Y([A()],$.prototype,`healthResult`,void 0),Y([A()],$.prototype,`healthError`,void 0),Y([A()],$.prototype,`modelAuthStatusLoading`,void 0),Y([A()],$.prototype,`modelAuthStatusResult`,void 0),Y([A()],$.prototype,`modelAuthStatusError`,void 0),Y([A()],$.prototype,`debugLoading`,void 0),Y([A()],$.prototype,`debugStatus`,void 0),Y([A()],$.prototype,`debugHealth`,void 0),Y([A()],$.prototype,`debugModels`,void 0),Y([A()],$.prototype,`debugHeartbeat`,void 0),Y([A()],$.prototype,`debugCallMethod`,void 0),Y([A()],$.prototype,`debugCallParams`,void 0),Y([A()],$.prototype,`debugCallResult`,void 0),Y([A()],$.prototype,`debugCallError`,void 0),Y([A()],$.prototype,`logsLoading`,void 0),Y([A()],$.prototype,`logsError`,void 0),Y([A()],$.prototype,`logsFile`,void 0),Y([A()],$.prototype,`logsEntries`,void 0),Y([A()],$.prototype,`logsFilterText`,void 0),Y([A()],$.prototype,`logsLevelFilters`,void 0),Y([A()],$.prototype,`logsAutoFollow`,void 0),Y([A()],$.prototype,`logsTruncated`,void 0),Y([A()],$.prototype,`logsCursor`,void 0),Y([A()],$.prototype,`logsLastFetchAt`,void 0),Y([A()],$.prototype,`logsLimit`,void 0),Y([A()],$.prototype,`logsMaxBytes`,void 0),Y([A()],$.prototype,`logsAtBottom`,void 0),Y([A()],$.prototype,`chatNewMessagesBelow`,void 0),$=Y([D(`genesis-app`)],$);export{Bi as A,be as B,$u as C,Fu as D,Vu as E,ii as F,_n as I,tn as L,Ri as M,Li as N,xu as O,ai as P,Gt as R,Zu as S,Hu as T,Uu as _,gM as a,Yu as b,_b as c,Dv as d,p_ as f,pd as g,fd as h,hM as i,zi as j,Eo as k,q as l,cd as m,NN as n,pE as o,Xu as p,_N as r,Ix as s,kF as t,Ov as u,Qu as v,md as w,ed as x,od as y,H as z};
|
|
5900
|
+
//# sourceMappingURL=index-or46Cf5v.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{
|
|
1
|
+
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{l as r}from"./index-or46Cf5v.js";import{o as i}from"./presenter-DwZ-RSJ8.js";var a=!1;function o(i){let o=!a;return e`
|
|
2
2
|
<section class="card">
|
|
3
3
|
<div class="row" style="justify-content: space-between;">
|
|
4
4
|
<div>
|
|
@@ -54,4 +54,4 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{s as r}from"./index-
|
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
`}export{o as renderInstances};
|
|
57
|
-
//# sourceMappingURL=instances-
|
|
57
|
+
//# sourceMappingURL=instances-B2yScyQI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{
|
|
1
|
+
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{k as r,l as i,t as a}from"./index-or46Cf5v.js";var o=`grid-template-columns: 1fr 150px 90px 130px auto;`;function s(e){return typeof e.url==`string`&&e.url?typeof e.transport==`string`?e.transport:`http`:typeof e.command==`string`&&e.command?`stdio`:`—`}function c(e,t,r){return t?t.ok?{dot:`status-dot--ok`,label:`Online`}:{dot:`status-dot--error`,label:`Error`}:r?e?.connected?{dot:`status-dot--ok`,label:n(`mcpView.list.connected`)}:{dot:`status-dot--idle`,label:n(`mcpView.list.oauthRequired`)}:{dot:`status-dot--idle`,label:`—`}}function l(e){let t=typeof e.url==`string`?e.url:``;if(t)return`${typeof e.transport==`string`?e.transport:`http`} · ${t}`;let n=typeof e.command==`string`?e.command:``;if(n){let t=Array.isArray(e.args)?e.args.map(e=>String(e)).join(` `):``;return`stdio · ${n}${t?` ${t}`:``}`}return`—`}function u(e){let t=e.auth;return!t||typeof t!=`object`?!1:t.type===`oauth`}var d=`{
|
|
2
2
|
"url": "https://mcp.context7.com/mcp",
|
|
3
3
|
"transport": "streamable-http"
|
|
4
4
|
}`;function f(a){let s=a.servers?r(Object.entries(a.servers),([e],[t])=>e.localeCompare(t)):[],c=a.draftName.trim().length>0&&!a.busy;return e`
|
|
@@ -377,4 +377,4 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{D as r,s as i,t as a
|
|
|
377
377
|
</span>
|
|
378
378
|
</div>
|
|
379
379
|
`}export{f as renderMcp};
|
|
380
|
-
//# sourceMappingURL=mcp-
|
|
380
|
+
//# sourceMappingURL=mcp-Cvo6FOST.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{
|
|
1
|
+
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{l as r}from"./index-or46Cf5v.js";var i=`grid-template-columns: 1.2fr 2fr;`;function a(t){return t.entries.length===0?e`<div class="muted" style="padding: 16px;">
|
|
2
2
|
${t.loading?n(`common.loading`):n(`memoryView.empty`)}
|
|
3
3
|
</div>`:e`
|
|
4
4
|
<div class="table">
|
|
@@ -34,4 +34,4 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{s as r}from"./index-
|
|
|
34
34
|
</div>
|
|
35
35
|
</section>
|
|
36
36
|
`}export{o as renderMemory};
|
|
37
|
-
//# sourceMappingURL=memory-
|
|
37
|
+
//# sourceMappingURL=memory-EzZxvhx5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{
|
|
1
|
+
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{l as r}from"./index-or46Cf5v.js";var i=`grid-template-columns: 2fr 1fr 0.8fr 0.8fr;`,a=`grid-template-columns: 2fr 0.8fr 1fr;`;function o(e){return e.provider??`—`}function s(e){let t=e.contextWindow;return typeof t!=`number`||t<=0?`—`:t>=1e6?`${(t/1e6).toFixed(t%1e6?1:0)}M`:t>=1e3?`${Math.round(t/1e3)}K`:String(t)}function c(e){return!!e.reasoning}function l(t){return t.models.length===0?e`<div class="muted" style="padding: 16px;">
|
|
2
2
|
${t.loading?n(`common.loading`):n(`modelsView.empty`)}
|
|
3
3
|
</div>`:e`
|
|
4
4
|
<div class="table">
|
|
@@ -73,4 +73,4 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{s as r}from"./index-
|
|
|
73
73
|
</div>
|
|
74
74
|
</section>
|
|
75
75
|
`}export{d as renderModels};
|
|
76
|
-
//# sourceMappingURL=models-
|
|
76
|
+
//# sourceMappingURL=models-CHjUP5zU.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{r}from"./string-coerce-LCfkQHEZ.js";import{
|
|
1
|
+
import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{r}from"./string-coerce-LCfkQHEZ.js";import{A as i,B as a,N as o,P as s,j as c,l}from"./index-or46Cf5v.js";function u(...e){let t=new Set;for(let n of e){if(!n)continue;if(Array.isArray(n)){for(let e of n){let n=e.trim();n&&t.add(n)}continue}let e=n.trim();e&&t.add(e)}let n=Array.from(t);return n.sort(),n}function d(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function f(e){return{roles:u(e.roles,e.role),scopes:a(e.scopes)}}function p(e){let t=u(e.roles,e.role),n=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:n===void 0?t:u(n.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>t.includes(e)),scopes:a(e.scopes)}}function m(e,t){let n=f(e),r=t?p(t):null;return r?d(r.roles,n.roles)?d(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function h(e){let t=e?.agents??{},n=Array.isArray(t.list)?t.list:[],i=[];return n.forEach((e,t)=>{if(!e||typeof e!=`object`)return;let n=e,a=r(n.id)??``;if(!a)return;let o=r(n.name),s=n.default===!0;i.push({id:a,name:o,isDefault:s,index:t,record:n})}),i}function g(e,t){let n=new Set(t),i=[];for(let t of e){if(!(Array.isArray(t.commands)?t.commands:[]).some(e=>n.has(String(e))))continue;let e=r(t.nodeId)??``;if(!e)continue;let a=r(t.displayName)??e;i.push({id:e,label:a===e?e:`${a} · ${e}`})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i}var _=`__defaults__`,v=[{value:`deny`,label:`Deny`},{value:`allowlist`,label:`Allowlist`},{value:`full`,label:`Full`}],y=[{value:`off`,label:`Off`},{value:`on-miss`,label:`On miss`},{value:`always`,label:`Always`}];function b(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function x(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function S(e){let t=e?.defaults??{};return{security:b(t.security),ask:x(t.ask),askFallback:b(t.askFallback??`deny`),autoAllowSkills:t.autoAllowSkills??!1}}function C(e){return h(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function w(e,t){let n=C(e),r=Object.keys(t?.agents??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let n=e.name?.trim()?e.name:e.id,r=t.name?.trim()?t.name:t.id;return n.localeCompare(r)}),a}function T(e,t){return e===_?_:e&&t.some(t=>t.id===e)?e:_}function E(e){let t=e.execApprovalsForm??e.execApprovalsSnapshot?.file??null,n=!!t,r=S(t),i=w(e.configForm,t),a=N(e.nodes),o=e.execApprovalsTarget,s=o===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;o===`node`&&s&&!a.some(e=>e.id===s)&&(s=null);let c=T(e.execApprovalsSelectedAgent,i),l=c===_?null:(t?.agents??{})[c]??null,u=Array.isArray(l?.allowlist)?l.allowlist??[]:[];return{ready:n,disabled:e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:t,defaults:r,selectedScope:c,selectedAgent:l,agents:i,allowlist:u,target:o,targetNodeId:s,targetNodes:a,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals}}function D(r){let i=r.ready,a=r.target!==`node`||!!r.targetNodeId;return e`
|
|
2
2
|
<section class="card">
|
|
3
3
|
<div class="row" style="justify-content: space-between; align-items: center;">
|
|
4
4
|
<div>
|
|
@@ -204,11 +204,11 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{r}from"./string-coer
|
|
|
204
204
|
<div class="list" style="margin-top: 12px;">
|
|
205
205
|
${r.length===0?e` <div class="muted">No allowlist entries yet.</div> `:r.map((e,n)=>M(t,e,n))}
|
|
206
206
|
</div>
|
|
207
|
-
`}function M(n,r,
|
|
207
|
+
`}function M(n,r,a){let o=r.lastUsedAt?s(r.lastUsedAt):`never`,c=r.lastUsedCommand?i(r.lastUsedCommand,120):null,l=r.lastResolvedPath?i(r.lastResolvedPath,120):null;return e`
|
|
208
208
|
<div class="list-item">
|
|
209
209
|
<div class="list-main">
|
|
210
210
|
<div class="list-title">${r.pattern?.trim()?r.pattern:`New pattern`}</div>
|
|
211
|
-
<div class="list-sub">Last used: ${
|
|
211
|
+
<div class="list-sub">Last used: ${o}</div>
|
|
212
212
|
${c?e`<div class="list-sub mono">${c}</div>`:t}
|
|
213
213
|
${l?e`<div class="list-sub mono">${l}</div>`:t}
|
|
214
214
|
</div>
|
|
@@ -219,13 +219,13 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{r}from"./string-coer
|
|
|
219
219
|
type="text"
|
|
220
220
|
.value=${r.pattern??``}
|
|
221
221
|
?disabled=${n.disabled}
|
|
222
|
-
@input=${e=>{let t=e.target;n.onPatch([`agents`,n.selectedScope,`allowlist`,
|
|
222
|
+
@input=${e=>{let t=e.target;n.onPatch([`agents`,n.selectedScope,`allowlist`,a,`pattern`],t.value)}}
|
|
223
223
|
/>
|
|
224
224
|
</label>
|
|
225
225
|
<button
|
|
226
226
|
class="btn btn--sm danger"
|
|
227
227
|
?disabled=${n.disabled}
|
|
228
|
-
@click=${()=>{if(n.allowlist.length<=1){n.onRemove([`agents`,n.selectedScope,`allowlist`]);return}n.onRemove([`agents`,n.selectedScope,`allowlist`,
|
|
228
|
+
@click=${()=>{if(n.allowlist.length<=1){n.onRemove([`agents`,n.selectedScope,`allowlist`]);return}n.onRemove([`agents`,n.selectedScope,`allowlist`,a])}}
|
|
229
229
|
>
|
|
230
230
|
Remove
|
|
231
231
|
</button>
|
|
@@ -411,7 +411,7 @@ import{d as e,l as t,r as n}from"./i18n-DLwqUqi0.js";import{r}from"./string-coer
|
|
|
411
411
|
<div class="list-title">${r.label}</div>
|
|
412
412
|
<div class="list-sub">
|
|
413
413
|
${r.nodeId} · ${r.command} · ${r.ok?`ok`:`failed`} ·
|
|
414
|
-
${
|
|
414
|
+
${s(r.completedAtMs)}
|
|
415
415
|
</div>
|
|
416
416
|
<pre class="code-block" style="margin-top: 10px; max-height: 360px; overflow: auto;">
|
|
417
417
|
${i}</pre
|
|
@@ -420,7 +420,7 @@ ${i}</pre
|
|
|
420
420
|
</div>
|
|
421
421
|
`}function H(e){let t=r(e.nodeManagementSelectedId);return t?e.nodes.find(e=>U(e)===t)??null:null}function U(e){return r(e.nodeId)??null}function W(e){let t=Array.isArray(e.commands)?e.commands:[];return Array.from(new Set(t.map(e=>r(e)).filter(e=>!!e))).toSorted((e,t)=>e.localeCompare(t))}function G(e){return r(e.displayName)??r(e.nodeId)??`unknown`}function K(e){if(e&&typeof e==`object`){let t=e,n=r(t.stdout),i=r(t.stderr),a=r(t.error),o=typeof t.exitCode==`number`||typeof t.exitCode==`string`?String(t.exitCode):null;if(n||i||a||o){let e=[];return o&&e.push(`exitCode: ${o}`),n&&e.push(`stdout:\n${n}`),i&&e.push(`stderr:\n${i}`),a&&e.push(`error:\n${a}`),e.join(`
|
|
422
422
|
|
|
423
|
-
`)}}return
|
|
423
|
+
`)}}return o(e,{pretty:!0,fallback:``})}function q(i){let a=i.devicesList??{pending:[],paired:[]},o=Array.isArray(a.pending)?a.pending:[],s=Array.isArray(a.paired)?a.paired:[],c=new Map(s.map(e=>[r(e.deviceId),e]).filter(e=>!!e[0]));return e`
|
|
424
424
|
<section class="card">
|
|
425
425
|
<div class="row" style="justify-content: space-between;">
|
|
426
426
|
<div>
|
|
@@ -444,7 +444,7 @@ ${i}</pre
|
|
|
444
444
|
${o.length===0&&s.length===0?e` <div class="muted">No paired devices.</div> `:t}
|
|
445
445
|
</div>
|
|
446
446
|
</section>
|
|
447
|
-
`}function J(e,t){let n=r(t.deviceId);if(!n)return;let i=e.get(n);if(!i)return;let a=r(t.publicKey),o=r(i.publicKey);if(!(a&&o&&a!==o))return i}function Y(e){return e?`roles: ${c(e.roles)} · scopes: ${c(e.scopes)}`:`none`}function X(e){switch(e){case`scope-upgrade`:return`scope upgrade requires approval`;case`role-upgrade`:return`role upgrade requires approval`;case`re-approval`:return`reconnect details changed; approval required`;case`new-pairing`:return`new device pairing request`}throw Error(`unsupported pending approval kind`)}function Z(i,o
|
|
447
|
+
`}function J(e,t){let n=r(t.deviceId);if(!n)return;let i=e.get(n);if(!i)return;let a=r(t.publicKey),o=r(i.publicKey);if(!(a&&o&&a!==o))return i}function Y(e){return e?`roles: ${c(e.roles)} · scopes: ${c(e.scopes)}`:`none`}function X(e){switch(e){case`scope-upgrade`:return`scope upgrade requires approval`;case`role-upgrade`:return`role upgrade requires approval`;case`re-approval`:return`reconnect details changed; approval required`;case`new-pairing`:return`new device pairing request`}throw Error(`unsupported pending approval kind`)}function Z(i,a,o){let c=r(i.displayName)||i.deviceId,l=typeof i.ts==`number`?s(i.ts):n(`common.na`),u=m(i,o),d=i.isRepair?` · repair`:``,f=i.remoteIp?` · ${i.remoteIp}`:``;return e`
|
|
448
448
|
<div class="list-item">
|
|
449
449
|
<div class="list-main">
|
|
450
450
|
<div class="list-title">${c}</div>
|
|
@@ -463,10 +463,10 @@ ${i}</pre
|
|
|
463
463
|
</div>
|
|
464
464
|
<div class="list-meta">
|
|
465
465
|
<div class="row" style="justify-content: flex-end; gap: 8px; flex-wrap: wrap;">
|
|
466
|
-
<button class="btn btn--sm primary" @click=${()=>
|
|
466
|
+
<button class="btn btn--sm primary" @click=${()=>a.onDeviceApprove(i.requestId)}>
|
|
467
467
|
Approve
|
|
468
468
|
</button>
|
|
469
|
-
<button class="btn btn--sm" @click=${()=>
|
|
469
|
+
<button class="btn btn--sm" @click=${()=>a.onDeviceReject(i.requestId)}>
|
|
470
470
|
Reject
|
|
471
471
|
</button>
|
|
472
472
|
</div>
|
|
@@ -486,9 +486,9 @@ ${i}</pre
|
|
|
486
486
|
`}
|
|
487
487
|
</div>
|
|
488
488
|
</div>
|
|
489
|
-
`}function $(n,r,i){let
|
|
489
|
+
`}function $(n,r,i){let a=r.revokedAtMs?`revoked`:`active`,o=`scopes: ${c(r.scopes)}`,l=s(r.rotatedAtMs??r.createdAtMs??r.lastUsedAtMs??null);return e`
|
|
490
490
|
<div class="row" style="justify-content: space-between; gap: 8px;">
|
|
491
|
-
<div class="list-sub">${r.role} · ${
|
|
491
|
+
<div class="list-sub">${r.role} · ${a} · ${o} · ${l}</div>
|
|
492
492
|
<div class="row" style="justify-content: flex-end; gap: 6px; flex-wrap: wrap;">
|
|
493
493
|
<button
|
|
494
494
|
class="btn btn--sm"
|
|
@@ -615,4 +615,4 @@ ${i}</pre
|
|
|
615
615
|
</div>
|
|
616
616
|
</div>
|
|
617
617
|
`}export{P as renderNodes};
|
|
618
|
-
//# sourceMappingURL=nodes-
|
|
618
|
+
//# sourceMappingURL=nodes-CINI4_nb.js.map
|