@popmelt.com/core 0.31.1 → 0.31.3
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/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/{ParticipantRuntime-HU2P2PJ6.mjs → ParticipantRuntime-X2ZI2GJF.mjs} +1 -1
- package/dist/{PopmeltTasteConnectedPane-ALR3RTSC.mjs → PopmeltTasteConnectedPane-7YIHIFPE.mjs} +1 -1
- package/dist/{PreviewRuntime-YAUBP6HA.mjs → PreviewRuntime-QDA4OF67.mjs} +1 -1
- package/dist/ThreadErrorCard-6QN2ECBT.mjs +2 -0
- package/dist/bridge-entry.mjs +1 -1
- package/dist/{browser-runtime-LTQBOXZW.mjs → browser-runtime-6N65USFN.mjs} +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/canvas-chat-note-NHYL3T6J.mjs +2 -0
- package/dist/{chunk-EG6SRS7N.mjs → chunk-6C4FAOTC.mjs} +1 -1
- package/dist/chunk-EXDOFFFJ.mjs +2 -0
- package/dist/{chunk-OLLUQ45J.mjs → chunk-F6AMPRUB.mjs} +1 -1
- package/dist/{chunk-253MCKJJ.mjs → chunk-GNZ73T3H.mjs} +1 -1
- package/dist/chunk-IKCHOC3U.mjs +3 -0
- package/dist/{chunk-GQ6CPJG6.mjs → chunk-IPR652AZ.mjs} +1 -1
- package/dist/chunk-JGNVTID4.mjs +2 -0
- package/dist/{chunk-RXRZTZPN.mjs → chunk-JU7D4I76.mjs} +1 -1
- package/dist/{chunk-CXQWNKZ4.mjs → chunk-M6LCEEFH.mjs} +4 -19
- package/dist/{chunk-JQHZFDY5.mjs → chunk-MTQ5IWIK.mjs} +1 -1
- package/dist/{chunk-4ZZTJRHL.mjs → chunk-QTGE5KAA.mjs} +1 -1
- package/dist/chunk-RCVAPQ7X.mjs +2 -0
- package/dist/{chunk-LSPIP2IX.mjs → chunk-SKOSDB5K.mjs} +87 -87
- package/dist/{chunk-E3ZTB2VR.mjs → chunk-UJ5PA3SZ.mjs} +84 -84
- package/dist/chunk-X3UK5M3S.mjs +2 -0
- package/dist/{chunk-IRFL32GJ.mjs → chunk-ZGERZLB4.mjs} +3 -3
- package/dist/cli.mjs +8 -8
- package/dist/codex-note-context-KSRJRH3F.mjs +2 -0
- package/dist/codex-project-JYNETLSG.mjs +2 -0
- package/dist/codex-session-registry-SPRWY2WW.mjs +2 -0
- package/dist/{focus-inspection-GJKMI6OE.mjs → focus-inspection-WPHGCN6Y.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/peer-client-STR2FWR4.mjs +2 -0
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-nuxt.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server.mjs +1 -1
- package/dist/{workspace-snapshot-LKQWBDNS.mjs → workspace-snapshot-O34KMJ2V.mjs} +1 -1
- package/package.json +32 -22
- package/dist/ThreadErrorCard-5ADUBZKJ.mjs +0 -2
- package/dist/canvas-chat-note-7HSL7MH6.mjs +0 -2
- package/dist/chunk-4V7SK3M6.mjs +0 -3
- package/dist/chunk-CECQ4VMR.mjs +0 -2
- package/dist/chunk-HGW2U6PD.mjs +0 -2
- package/dist/chunk-WIQ3RY6R.mjs +0 -2
- package/dist/chunk-XOGBFVWI.mjs +0 -2
- package/dist/codex-note-context-NVDO3PVT.mjs +0 -2
- package/dist/codex-project-IE6ZJFGB.mjs +0 -2
- package/dist/codex-session-registry-25DAA2KO.mjs +0 -2
- package/dist/peer-client-2THOHRGA.mjs +0 -2
- /package/dist/{chunk-V6VQACC2.mjs → chunk-WMHM647D.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popmelt.com/core",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.3",
|
|
4
4
|
"description": "A tiny, powerful design layer for humans and AI",
|
|
5
5
|
"license": "PolyForm-Shield-1.0.0",
|
|
6
6
|
"author": "Popmelt <reb@popmelt.com> (https://popmelt.com)",
|
|
@@ -24,9 +24,30 @@
|
|
|
24
24
|
"popmelt": "dist/cli.mjs"
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
27
|
+
"packageManager": "pnpm@9.12.0",
|
|
27
28
|
"engines": {
|
|
28
29
|
"node": ">=18.0.0"
|
|
29
30
|
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsup",
|
|
33
|
+
"clean": "git clean -xdf .turbo node_modules dist",
|
|
34
|
+
"format": "prettier --check \"**/*.{ts,tsx}\"",
|
|
35
|
+
"lint": "eslint . && node scripts/check-eslint-suppressions.mjs",
|
|
36
|
+
"pack:smoke": "node scripts/pack-smoke.mjs",
|
|
37
|
+
"peer:smoke": "node scripts/peer-compat-smoke.mjs",
|
|
38
|
+
"vue:smoke": "pnpm run build && node scripts/vue-install-smoke.mjs",
|
|
39
|
+
"nuxt:smoke": "pnpm run build && node scripts/nuxt-install-smoke.mjs",
|
|
40
|
+
"astro:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs astro",
|
|
41
|
+
"svelte:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs svelte && node scripts/framework-install-smoke.mjs sveltekit",
|
|
42
|
+
"prepublishOnly": "pnpm run verify",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:coverage": "vitest run --coverage.enabled",
|
|
45
|
+
"test:browser": "pnpm run build && tsc --noEmit -p tsconfig.browser.json && vitest run --config vitest.browser.config.ts",
|
|
46
|
+
"test:browser:mutation": "node e2e/check-lifecycle-mutation.mjs",
|
|
47
|
+
"test:watch": "vitest",
|
|
48
|
+
"typecheck": "tsc --noEmit --incremental false",
|
|
49
|
+
"verify": "pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"
|
|
50
|
+
},
|
|
30
51
|
"exports": {
|
|
31
52
|
".": {
|
|
32
53
|
"types": "./dist/index.d.mts",
|
|
@@ -132,6 +153,7 @@
|
|
|
132
153
|
},
|
|
133
154
|
"devDependencies": {
|
|
134
155
|
"nuxt": "4.6.3",
|
|
156
|
+
"@kit/eslint-config": "workspace:^",
|
|
135
157
|
"@react-three/fiber": "9.7.0",
|
|
136
158
|
"@tanstack/react-router": "1.120.5",
|
|
137
159
|
"@types/react": "19.1.0",
|
|
@@ -155,26 +177,14 @@
|
|
|
155
177
|
"vite": "7.3.7",
|
|
156
178
|
"vitest": "4.1.12",
|
|
157
179
|
"vue": "3.5.44",
|
|
158
|
-
"vue-router": "5.3.1"
|
|
159
|
-
"@kit/eslint-config": "^0.2.0"
|
|
180
|
+
"vue-router": "5.3.1"
|
|
160
181
|
},
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"vue:smoke": "pnpm run build && node scripts/vue-install-smoke.mjs",
|
|
169
|
-
"nuxt:smoke": "pnpm run build && node scripts/nuxt-install-smoke.mjs",
|
|
170
|
-
"astro:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs astro",
|
|
171
|
-
"svelte:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs svelte && node scripts/framework-install-smoke.mjs sveltekit",
|
|
172
|
-
"test": "vitest run",
|
|
173
|
-
"test:coverage": "vitest run --coverage.enabled",
|
|
174
|
-
"test:browser": "pnpm run build && tsc --noEmit -p tsconfig.browser.json && vitest run --config vitest.browser.config.ts",
|
|
175
|
-
"test:browser:mutation": "node e2e/check-lifecycle-mutation.mjs",
|
|
176
|
-
"test:watch": "vitest",
|
|
177
|
-
"typecheck": "tsc --noEmit --incremental false",
|
|
178
|
-
"verify": "pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"
|
|
182
|
+
"pnpm": {
|
|
183
|
+
"overrides": {
|
|
184
|
+
"postcss@<8.5.23": "8.5.23",
|
|
185
|
+
"source-map-js@<1.2.2": "1.2.2",
|
|
186
|
+
"esbuild@<0.28.1": "0.28.1",
|
|
187
|
+
"sharp@<0.35.5": "0.35.5"
|
|
188
|
+
}
|
|
179
189
|
}
|
|
180
|
-
}
|
|
190
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as k}from"./chunk-2P2NUZW7.mjs";import{i as $}from"./chunk-D32YV5O6.mjs";import"./chunk-V44RIEET.mjs";import{b as j}from"./chunk-CPOYMGYY.mjs";import"./chunk-6VXFTT5U.mjs";import{useState as S,useRef as w,useEffect as x,useCallback as z}from"react";import{ArrowUpRight as O,Copy as U}from"lucide-react";import{jsx as o,jsxs as l,Fragment as C}from"react/jsx-runtime";function E({provider:r,bridgeUrl:c}){let[e,i]=S("idle"),[s,t]=S(!1),d=w(!0),g=w(!1),u=r==="codex"?"Codex":"Claude",h=r==="codex"?"codex login":"claude auth login",y=`${c}/provider-login/${r}`;x(()=>(d.current=!0,()=>{d.current=!1}),[]);let m=z(async n=>{let a=await j(y,{method:n,cache:"no-store",signal:AbortSignal.timeout(1e4),...n==="POST"?{headers:{"Content-Type":"application/json"},body:"{}"}:{}});if(!a.ok)throw new Error("Sign-in unavailable");let p=await a.json();return["pending","complete","failed","manual"].includes(p.state)?p.state:"failed"},[y]);x(()=>{if(e!=="pending")return;let n=!1,a,p=Date.now()+10*6e4;async function v(){try{let f=await m("GET");if(n)return;f!=="pending"||Date.now()>=p?i(f==="pending"?"failed":f):a=setTimeout(()=>{v()},1500)}catch{n||i("failed")}}return a=setTimeout(()=>{v()},1500),()=>{n=!0,clearTimeout(a)}},[e,m]);async function T(){if(!g.current){g.current=!0,i("opening");try{let n=await m("POST");d.current&&i(n)}catch{d.current&&i("failed")}finally{g.current=!1}}}let b={...$("dark"),display:"inline-flex",alignItems:"center",gap:8,font:"inherit",fontWeight:400,color:"var(--popmelt-thread-primary)",background:"var(--popmelt-thread-control)",cursor:"pointer"};return o("span",{"data-provider-sign-in":r,children:e==="complete"?l("span",{role:"status",children:["Signed in to ",u,". Send your reply to continue."]}):l(C,{children:[l("button",{type:"button",style:b,disabled:e==="opening"||e==="pending",onClick:()=>{T()},children:[e==="opening"?"Opening\u2026":e==="pending"?`Signing in to ${u}\u2026`:`Sign in to ${u}`,o(O,{size:14,"aria-hidden":"true"})]}),o("span",{role:"status",children:e==="pending"?" Complete sign-in in the terminal window, then return here.":e==="manual"?" Open your terminal and paste the login command.":e==="failed"?" Sign-in did not finish. Try again, or use your terminal.":" to continue."}),(e==="manual"||e==="failed")&&l("button",{type:"button",style:{...b,marginLeft:6},onClick:()=>{navigator.clipboard.writeText(h).then(()=>t(!0)).catch(()=>t(!1))},"aria-label":`Copy ${u} login command`,children:[s?"Copied":h,o(U,{size:14,"aria-hidden":"true"})]})]})})}function P({message:{error:r,errorKind:c,provider:e},bridgeUrl:i,canSignIn:s}){let t=r?k(r,c):null;return o("div",{style:{backgroundColor:"var(--popmelt-thread-soft)",border:"1px solid var(--popmelt-thread-border)",borderRadius:24,color:"var(--popmelt-thread-muted-strong)",fontSize:14,letterSpacing:"0.14px",lineHeight:1.35,padding:16},children:s&&t?.kind==="authentication"&&(e==="codex"||e==="claude")?o(E,{provider:e,bridgeUrl:i}):l(C,{children:[o("span",{style:{color:t?"#f59e0b":"var(--popmelt-thread-muted-strong)"},children:t?.label??"Cancelled"}),t?` \u2014 ${t.message}`:""]})})}export{P as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{b as y}from"./chunk-CPOYMGYY.mjs";import"./chunk-6VXFTT5U.mjs";async function f(s,d,l,r,c,m){let n=r[1].toLowerCase()==="claude"?"Claude":"Codex";if(!c)throw new Error("Only the host can send a chat note.");if(m)throw new Error("Send a text-only note.");let a=l.find(o=>o.provider===n&&o.linked);if(!a)throw new Error("Send a note to this thread from "+n+" first so your reply reaches the right chat.");let p=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(r[2])),w=Array.from(new Uint8Array(p),o=>o.toString(16).padStart(2,"0")).join(""),e=JSON.stringify(["popmelt-note",s,d,a.id,w]),i=sessionStorage.getItem(e)??crypto.randomUUID();sessionStorage.setItem(e,i);let h=await y(`${s}/participants/send-to-${n.toLowerCase()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:d,text:r[2],requestId:i,linkId:a.id})}),t=await h.json();if(!h.ok||!(t.queuedInChat||t.availableInChat))throw new Error(t.error??"The bridge did not confirm delivery.");return sessionStorage.getItem(e)===i&&sessionStorage.removeItem(e),{jobId:t.jobId}}export{f as sendCanvasChatNote};
|
package/dist/chunk-4V7SK3M6.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createHash as f}from"crypto";import{mkdir as y,readFile as x,writeFile as S}from"fs/promises";import{tmpdir as m}from"os";import{join as a}from"path";function O(t,o,e){let n=new Map(t.candidates.map(r=>[r.storeId,r])),s=n.get(o);if(!s)return null;let d=[...new Set(e)].filter(r=>r!==o);return d.some(r=>!n.has(r))?null:{primary:s,mountedStores:d.map(r=>{let i=n.get(r);return{storeId:i.storeId,projectRoot:i.root,projectId:i.projectId}})}}function c(){return process.env.POPMELT_CODEX_SESSION_DIR||a(m(),"popmelt-core","codex-sessions")}function p(t){let o=f("sha256").update(t).digest("hex");return a(c(),`${o}.json`)}function I(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let o=t;return typeof o.storeId=="string"&&!!o.storeId&&typeof o.projectRoot=="string"&&!!o.projectRoot&&typeof o.projectId=="string"&&!!o.projectId}function C(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let o=t;return typeof o.root=="string"&&!!o.root&&typeof o.storeId=="string"&&!!o.storeId&&typeof o.projectId=="string"&&!!o.projectId&&typeof o.reason=="string"&&Array.isArray(o.reasons)&&o.reasons.every(e=>typeof e=="string")&&typeof o.initialized=="boolean"}function j(t){if(typeof t.sessionId!="string"||!t.sessionId||typeof t.projectRoot!="string"||!t.projectRoot||typeof t.projectId!="string"||!t.projectId||!Number.isInteger(t.bridgePort)||typeof t.updatedAt!="string"||Number.isNaN(Date.parse(t.updatedAt)))return null;let o=Array.isArray(t.mountedStores)?t.mountedStores.filter(I):[],e=t.orientation==="automatic"||t.orientation==="explicit"||t.orientation==="workspace_default"?t.orientation:"legacy";return{version:2,status:"active",sessionId:t.sessionId,storeId:typeof t.storeId=="string"&&t.storeId?t.storeId:`store-${t.projectId}`,projectRoot:t.projectRoot,projectId:t.projectId,bridgePort:t.bridgePort,mountedStores:o,orientation:e,updatedAt:t.updatedAt}}function l(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let o=t;return o.status==="orientation_required"?o.version!==2||typeof o.sessionId!="string"||!o.sessionId||typeof o.cwd!="string"||!o.cwd||!Array.isArray(o.candidates)||!o.candidates.every(C)||typeof o.updatedAt!="string"||Number.isNaN(Date.parse(o.updatedAt))?null:o:j(o)}async function u(t){let o=c();await y(o,{recursive:!0,mode:448}),await S(p(t.sessionId),`${JSON.stringify(t,null,2)}
|
|
3
|
-
`,{encoding:"utf8",mode:384})}async function b(t){await u(t)}async function B(t){await u(t)}async function g(t){try{let o=JSON.parse(await x(p(t),"utf8")),e=l(o);return e?.sessionId===t?e:null}catch{return null}}async function N(t){let o=await g(t);return o?.status==="active"?o:null}async function k(t){let o=await g(t);return o?.status==="orientation_required"?o:null}export{O as a,b,B as c,g as d,N as e,k as f};
|
package/dist/chunk-CECQ4VMR.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{A as l,d as b,l as I,m as w,y as k}from"./chunk-LSPIP2IX.mjs";import{readFile as h,realpath as P,mkdir as x,writeFile as E}from"fs/promises";import{createHash as S}from"crypto";import{join as m,resolve as O}from"path";function N(t,e){let r=S("sha256").update(e).digest("hex");return m(t,".popmelt","participant-agents",r+".json")}async function M(t,e){if(e.storeId!==t.storeId)return{ok:!1,body:{status:"writable_store_required"}};if(typeof e.threadId!="string"||!e.threadId||typeof e.text!="string"||!e.text.trim()||e.text.length>8e3)return{ok:!1,body:{status:"invalid_note"}};let r;try{r=await v(t,t.sessionId,!0)}catch(a){if(a.code!=="ENOENT")throw a;return{ok:!1,body:{status:"participant_invitation_required"}}}if(!r)return{ok:!1,body:{status:"enrolled_bridge_required"}};let o=await l(r.endpoint,"/participants/thread-note",{...r.request,method:"POST",signal:AbortSignal.timeout(3e4),body:JSON.stringify({storeId:t.storeId,threadId:e.threadId,reply:e.text,sessionId:t.sessionId,requestId:e.requestId})});return{ok:o.response.ok,body:o.body}}async function v(t,e,r=!1){let o=await h(m(t.projectRoot,".popmelt","participant-bridge.json"),"utf8").then(JSON.parse).catch(c=>{if(c.code!=="ENOENT"||!t.bridgePort)throw c;return{projectId:t.projectId,port:t.bridgePort}});if(o.projectId!==t.projectId||!Number.isInteger(o.port)||o.port<1||o.port>65535)return null;let a={redirect:"error",signal:AbortSignal.timeout(3e3)},p=await l(o,"/status",a);if(!p.response.ok||p.body?.projectId!==t.projectId)return null;let i=N(t.projectRoot,e),n;try{n=JSON.parse(await h(i,"utf8"))}catch(c){if(c.code!=="ENOENT"||!r)throw c;let d=await P(t.projectRoot),u=b(e);if(w(d)!==t.projectId||!u)return null;let s=JSON.parse(await h(m(d,".popmelt","participant-host.json"),"utf8"));if(!(await l(o,"/participants/agent-join",{...a,method:"POST",headers:{"X-Popmelt-Participant-Id":s.participantId,"X-Popmelt-Participant-Token":s.token},body:JSON.stringify({sessionId:e,name:u,headless:!0})})).response.ok)return null;n=JSON.parse(await h(i,"utf8"))}return{endpoint:o,request:{...a,headers:{"X-Popmelt-Participant-Id":n.participantId,"X-Popmelt-Participant-Token":n.token}}}}async function F(t,e,r){let o=[t,...t.mountedStores].find(c=>c.storeId===e.storeId);if(!o||r&&o!==t)return{ok:!1,body:{status:"store_unavailable"}};if(r&&(typeof e.threadId!="string"||!e.threadId))return{ok:!1,body:{status:"thread_required"}};let a=await v(o,t.sessionId,r).catch(c=>{if(c.code==="ENOENT")return null;throw c});if(!a)return{ok:!1,body:{status:"enrolled_bridge_required",message:"Join this project as a Popmelt peer and check that its bridge is running."}};let{endpoint:p,request:i}=a,n=await l(p,r?t.sessionId.startsWith("claude:")?"/participants/link-claude-chat":"/participants/link-codex-chat":"/participants/check-claude-notes",{...i,method:"POST",body:JSON.stringify({sessionId:t.sessionId,...r?{threadId:e.threadId}:{}})});return{ok:n.response.ok,body:n.body}}async function _(t,e,r){if(!r.projectRoot)throw new Error("Participant connections require the active project root");let o=await P(r.projectRoot);if(w(o)!==t.projectId)throw new Error("Participant project does not match");let a=m(o,".popmelt"),p=S("sha256").update(e).digest("hex"),i=async(s,f,g)=>{let j=await l(t,"/participants/"+s,{method:"POST",redirect:"error",headers:{"X-Popmelt-Participant-Id":f.participantId,"X-Popmelt-Participant-Token":f.token},body:JSON.stringify(g),signal:AbortSignal.timeout(9e4)}),y=j.body;if(!j.response.ok||y.error)throw new Error(y.error??"Participant connection unavailable");return y},n,c;try{n=JSON.parse(await h(N(o,e),"utf8"))}catch(s){if(s.code!=="ENOENT")throw s;if(!r.name)return{status:"participant_invitation_required"};let f=JSON.parse(await h(m(a,"participant-host.json"),"utf8")),g=await i("agent-join",f,{sessionId:e,name:r.name});n=g.credential,c=g.participant}if(!r.action){let s=await i("agent-connect",n,{});return{status:"participant_connected",participantId:n.participantId,participant:s.participant??c}}let d=await i("agent-act",n,{action:I(r.action)}),u=d.evidence;if(u?.frame?.image){let s=u.frame.image;if(!/^data:image\/jpeg;base64,[A-Za-z0-9+/=]+$/.test(s)||s.length>7e5)throw new Error("Invalid participant preview");let f=m(a,"artifacts","participant-previews");await x(f,{recursive:!0,mode:448});let g=m(f,p+".jpg");return await E(g,Buffer.from(s.slice(s.indexOf(",")+1),"base64"),{mode:384}),{status:"participant_connected",participant:d.participant,evidence:{...u,frame:{imagePath:g,targets:u.frame.targets}}}}return{status:"participant_connected",participant:d.participant,evidence:d.evidence}}async function C(t,e,r={}){if(k())return{status:"already_managed_by_bridge"};if((await l(t,"/status",{redirect:"error",signal:AbortSignal.timeout(3e3)})).body?.participantSessions)return _(t,e,r);let a=async(c,d)=>{let u=await l(t,`/peers/${c}`,{method:"POST",body:JSON.stringify(d),signal:AbortSignal.timeout(5e4)}),s=u.body;if(!u.response.ok||s?.error)throw new Error(s?.error??"Peer connection unavailable");return s},p=await a("join",{sessionId:e,name:r.name}),i=r.action?await a("act",{token:p.token,clientId:r.clientId,action:I(r.action)}):p,n=i.peer;return{...i.status?{status:i.status}:{},...n?{peer:{...n,state:n.state?{annotations:n.state.annotations,styleModifications:n.state.styleModifications,textModifications:n.state.textModifications,undoDepth:n.state.undoStack.length,redoDepth:n.state.redoStack.length}:null}}:{},...i.evidence?{evidence:i.evidence}:{},clients:p.clients}}async function D(t){let e=c=>{let d=t.indexOf(c);return d>=0?t[d+1]:void 0},r=e("--session");if(!r)throw new Error("Usage: popmelt peer --session <stable-agent-session> [--project-root <active-project>] [--name <your-name>] [--client <canvas-id>] [--action <JSON>]");let o=await P(O(e("--project-root")??process.cwd())),a=JSON.parse(await h(m(o,".popmelt","bridge.lock"),"utf8")),p=w(o),i=await l({port:a.port,projectId:p},"/status",{signal:AbortSignal.timeout(3e3)});if(!i.response.ok||i.body.projectRoot!==o&&!(i.body.participantSessions&&i.body.projectId===p))throw new Error("No matching running project bridge");let n=e("--action");console.log(JSON.stringify(await C({port:a.port,projectId:p},r,{name:e("--name"),projectRoot:o,clientId:e("--client"),action:n?JSON.parse(n):void 0}),null,2))}export{N as a,M as b,v as c,F as d,C as e,D as f};
|
package/dist/chunk-HGW2U6PD.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function m(e){try{let t=e.defaultView?.frameElement;return t?.localName==="iframe"?t:null}catch{return null}}function w(e){if(e.localName!=="iframe"||e.closest("[data-devtools],[data-popmelt-peer-surface]"))return null;try{let t=e.contentDocument;return t?.documentElement?t:null}catch{return null}}function C(e){let t=e.getBoundingClientRect(),r=e.offsetWidth?t.width/e.offsetWidth:1,u=e.offsetHeight?t.height/e.offsetHeight:1;return{x:t.left+e.clientLeft*r,y:t.top+e.clientTop*u,sx:r,sy:u}}function v(e,t){let{left:r,top:u,width:l,height:n}=e,o=m(t);for(;o;){let i=C(o);r=i.x+r*i.sx,u=i.y+u*i.sy,l*=i.sx,n*=i.sy,o=m(o.ownerDocument)}return new DOMRect(r,u,l,n)}function T(e){return v(e.getBoundingClientRect(),e.ownerDocument)}function O(e,t,r){let u=[],l=m(r);for(;l;)u.unshift(l),l=m(l.ownerDocument);for(let n of u){let o=C(n);e=(e-o.x)/o.sx,t=(t-o.y)/o.sy}return{x:e,y:t}}function U(e){return e.ownerDocument.defaultView??window}function V(e){return!!(e&&e.namespaceURI==="http://www.w3.org/1999/xhtml")}function A(e,t=document){if(e===t)return!0;let r=m(e);return!!(r?.isConnected&&r.contentDocument===e&&A(r.ownerDocument,t))}function $(e,t){if(!A(t))return new DOMRect(0,0,0,0);let r=e.left,u=e.top,l=e.right,n=e.bottom;for(let o=m(t);o;o=m(o.ownerDocument)){let i=v({left:0,top:0,width:o.clientWidth,height:o.clientHeight},o.contentDocument);r=Math.max(r,i.left),u=Math.max(u,i.top),l=Math.min(l,i.right),n=Math.min(n,i.bottom)}return new DOMRect(r,u,Math.max(0,l-r),Math.max(0,n-u))}var g="@frame(";function z(e,t){return`${g}${encodeURIComponent(JSON.stringify({selector:e,url:t.URL}))}) `}function S(e){if(!e.startsWith(g))return null;let t=e.indexOf(") ");if(t<0)return null;try{let r=JSON.parse(decodeURIComponent(e.slice(g.length,t)));return typeof r.selector!="string"||typeof r.url!="string"?null:{...r,rest:e.slice(t+2)}}catch{return null}}var b=" >>> ";function N(e){return Array.from(e.querySelectorAll("*")).flatMap(t=>t.shadowRoot?[t.shadowRoot]:[])}function x(e=document){let t=[e];for(let r of t)t.push(...N(r));return t}function p(e,t=document){if(e.startsWith(g)){let l=S(e);if(!l)return null;let n=l.selector.startsWith(g)||l.selector.includes(b)?[p(l.selector,t)].filter(s=>!!s):x(t).flatMap(s=>Array.from(s.querySelectorAll(l.selector))),o=n.length===1?n[0]:null,i=o&&w(o);return!i||i.URL!==l.url?null:p(l.rest,i)}let r=e.split(b);if(r.length>1){let l=t,n=null;for(let o=0;o<r.length;o+=1){if(n=l.querySelector(r[o]),!n)return null;if(o<r.length-1){if(!n.shadowRoot)return null;l=n.shadowRoot}}return n}let u=[t];for(let l of u){let n=l.querySelector(e);if(n)return n;u.push(...N(l))}return null}function D(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode();return"host"in t?t.host:null}function B(e,t){return t.startsWith(g)||t.includes(b)?p(t)===e:e.matches(t)}function H(e,t){let r=e;for(;r;){if(r.matches(t))return r;r=D(r)}return null}function _(e,t){let r=t;for(;r;){if(r===e)return!0;r=D(r)}return!1}function k(e,t,r,u=l=>[l]){let l=[];for(let n of e.querySelectorAll("iframe")){if(!w(n))continue;let o=n.getBoundingClientRect();if(t<o.left||t>o.right||r<o.top||r>o.bottom||n.ownerDocument.defaultView?.getComputedStyle(n).pointerEvents!=="none")continue;let i=n.style.getPropertyValue("pointer-events"),s=n.style.getPropertyPriority("pointer-events");n.style.setProperty("pointer-events","auto","important"),l.push(()=>i?n.style.setProperty("pointer-events",i,s):n.style.removeProperty("pointer-events"))}try{let n=typeof e.elementsFromPoint=="function"?e.elementsFromPoint(t,r):[],o=e.elementFromPoint?.(t,r)??null;return(o&&!n.includes(o)?[o,...n]:n).filter(i=>e.nodeType===9||i.getRootNode()===e).flatMap(u)}finally{l.forEach(n=>n())}}function W(e,t,r=document){let u=[],l=new Set,n=r.nodeType===9?r:r.ownerDocument,o=O(e,t,n);for(let i of x(r).reverse())for(let s of k(i,o.x,o.y,h=>{let a=w(h);return a?[...W(e,t,a),h]:[h]}))l.has(s)||(l.add(s),u.push(s));return u}function I(){return b}var J=["id","data-testid","data-test","data-cy","data-popmelt-media-id","aria-label","name","href"],P=e=>e.replace(/\s+/g," ").trim();function y(e){return e==="id"||e==="data-popmelt-media-id"||/^data-(?:testid|test|cy)(?:-[a-z0-9_-]+)?$/.test(e)}function j(e,t){return!!(t&&t.length<=200&&!(e==="id"&&/^(radix-|:|_r_)/.test(t)))}function q(e){let t={},r=new Set([...J,...e.getAttributeNames().filter(y)]);for(let n of r){let o=e.getAttribute(n);o&&j(n,o)&&(t[n]=o)}let u=P(e.querySelector("h1,h2,h3,h4,h5,h6")?.textContent??""),l=P(Array.from(e.childNodes).filter(n=>n.nodeType===3).map(n=>n.textContent).join(" "));return{tag:e.tagName.toLowerCase(),...Object.keys(t).length?{attributes:t}:{},...u&&u.length<=200?{heading:u}:{},...l&&l.length<=200?{text:l}:{}}}function F(e,t,r=document){let u=x(r),l=a=>{try{return u.flatMap(f=>Array.from(f.querySelectorAll(a)))}catch{return[]}},n=!!(t&&(t.heading||t.text||Object.keys(t.attributes??{}).length)),o=a=>{if(!t||!n)return!0;let f=q(a);return f.tag===t.tag&&(!t.heading||f.heading===t.heading)&&(!t.text||f.text===t.text)&&Object.entries(t.attributes??{}).every(([c,d])=>a.getAttribute(c)===d)};for(let a of e){if(a.includes(" >>> ")||a.startsWith("@frame(")){try{let c=p(a,r),d=S(a),M=Object.entries(t?.attributes??{}).filter(([R])=>y(R)),E=d&&c&&(d.rest.startsWith("[data-pm=")||M.length>0&&c.tagName.toLowerCase()===t?.tag&&M.every(([R,L])=>c.getAttribute(R)===L));if(c&&(E||o(c)))return{status:"matched",element:c}}catch{}continue}let f=l(a);if(f.length===1&&(/^\[data-pm=/.test(a)||!n))return{status:"matched",element:f[0]}}if(!n||e.some(a=>a.includes(" >>> ")||a.startsWith("@frame("))||!/^[a-z][a-z0-9-]*$/.test(t.tag))return{status:"missing"};let i=l(t.tag);if(i.length>500)return{status:"ambiguous"};let s=Object.entries(t.attributes??{}).filter(([a])=>y(a));if(s.length){let a=i.filter(f=>s.every(([c,d])=>f.getAttribute(c)===d));return a.length===1?{status:"matched",element:a[0]}:{status:a.length?"ambiguous":"missing"}}let h=i.filter(o);return h.length===1?{status:"matched",element:h[0]}:{status:h.length?"ambiguous":"missing"}}function Q(e,t,r=document){let u={};if(t)for(let[i,s]of Object.entries({...t.dataAttributes,...t.id?{id:t.id}:{}}))y(i)&&j(i,s)&&(u[i]=s);let l=t?.targetFingerprint?.tag??t?.tagName?.toLowerCase(),n=t&&l?{...t.targetFingerprint,tag:l,attributes:{...u,...t.targetFingerprint?.attributes}}:t?.targetFingerprint,o=F([e,t?.selector].filter(i=>!!i),n,r);return o.status==="matched"?o.element:null}export{m as a,w as b,v as c,T as d,O as e,U as f,V as g,A as h,$ as i,z as j,x as k,p as l,D as m,B as n,H as o,_ as p,W as q,I as r,y as s,q as t,F as u,Q as v};
|
package/dist/chunk-WIQ3RY6R.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{c as d}from"./chunk-CECQ4VMR.mjs";import{A as p,b as c}from"./chunk-LSPIP2IX.mjs";import{e as f}from"./chunk-4V7SK3M6.mjs";async function S(t,e){let r=await f(t);if(!r||!e)return[];let n=await c(t,e);return n.length?(await Promise.all([r,...r.mountedStores].map(async i=>{try{let o=await d(i,t);if(!o)return[];let{endpoint:u,request:m}=o,s=[];for(let l of n){let a=await p(u,"/participants/read-canvas-receipt",{...m,method:"POST",body:JSON.stringify({receiptId:l})});a.response.ok&&s.push({storeId:i.storeId,receipt:a.body})}return s}catch{return[]}}))).flat():[]}export{S as a};
|
package/dist/chunk-XOGBFVWI.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as c,j as F,r as y,l as D,t as T,q as W,o as S,m as g,d as k,s as I,e as q}from"./chunk-HGW2U6PD.mjs";var B=["data-popmelt-frame","data-popmelt-media-id","data-testid","data-test","data-cy"];function w(e){let t=e.getRootNode();if(!("querySelectorAll"in t))return null;let r=new Set([...B,...e.getAttributeNames().filter(n=>n!=="id"&&I(n))]);for(let n of r){let o=e.getAttribute(n);if(!o||o.length>200)continue;let i=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(o):Array.from(o,a=>{if(a==='"'||a==="\\")return`\\${a}`;let u=a.charCodeAt(0);return u<32||u===127?`\\${u.toString(16)} `:a}).join(""),l=`[${n}="${i}"]`;if(t.querySelectorAll(l).length===1)return l}return null}function C(e){if(c(e.ownerDocument))return f(e);let t=w(e);if(t)return t;if(e.id)return`#${e.id}`;let r=e.tagName.toLowerCase(),n=Array.from(e.classList).slice(0,3).join(".");return n?`${r}.${n}`:r}function f(e){return $(x(e),e.ownerDocument)}function $(e,t){let r=c(t);if(r){!(r.id&&r.ownerDocument.querySelectorAll(`#${CSS.escape(r.id)}`).length===1)&&!w(r)&&r.setAttribute("data-popmelt-frame",globalThis.crypto?.randomUUID?.()??`frame-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`);let n=r.hasAttribute("data-popmelt-frame")?`[data-popmelt-frame="${r.getAttribute("data-popmelt-frame")}"]`:x(r),o=c(r.ownerDocument)?f(r):n;return F(o,t)+e}return e}function x(e){if(e.getRootNode().nodeType===9&&e.id&&!e.id.startsWith("radix-")&&!e.id.startsWith(":")&&e.ownerDocument.querySelectorAll(`#${CSS.escape(e.id)}`).length===1)return`#${CSS.escape(e.id)}`;let t=[],r=e;for(;r&&r!==e.ownerDocument.documentElement;){let n=r.tagName.toLowerCase(),o=w(r);if(o?n=o:r.id&&!r.id.startsWith("radix-")&&!r.id.startsWith(":")&&r.getRootNode().querySelectorAll(`#${CSS.escape(r.id)}`).length===1&&(n=`#${CSS.escape(r.id)}`),!o&&!n.startsWith("#")){let a=Array.from(r.classList).filter(u=>!u.startsWith("_")&&u.length<30).slice(0,2);a.length>0&&(n+="."+a.map(u=>CSS.escape(u)).join("."))}let i=r.parentElement;if(i&&!o&&!n.startsWith("#")){let a=Array.from(i.children).filter(u=>u.tagName===r.tagName);if(a.length>1){let u=a.indexOf(r)+1;n+=`:nth-of-type(${u})`}}if(t.unshift(n),o||n.startsWith("#")){let a=r.getRootNode();if(a.nodeType===9)break;if("host"in a){t.unshift(y().trim()),r=a.host;continue}}if(i){r=i;continue}let l=r.getRootNode();if(!("host"in l))break;t.unshift(y().trim()),r=l.host}return t.join(" > ").replace(/ > >>> > /g,y())}function O(e){try{return D(e)}catch{return null}}var M=900,h=80;function d(e){if(!e)return null;try{return D(e)}catch{return null}}function p(e){return(e??"").replace(/\s+/g," ").trim()}function L(e){let t=p(e.getAttribute("aria-label"));if(t)return t.slice(0,h);let r=p(e.getAttribute("aria-labelledby"));if(r){let o=r.split(/\s+/).map(i=>p(document.getElementById(i)?.textContent)).filter(Boolean).join(" ");if(o)return o.slice(0,h)}let n=p(e.getAttribute("title"));return n?n.slice(0,h):p(e.textContent).slice(0,h)}function P(e){return e.id?Array.from(document.querySelectorAll("[aria-controls]")).find(t=>t.getAttribute("aria-controls")===e.id)??null:null}function U(e){if(e instanceof HTMLDetailsElement){let n=Array.from(e.children).find(i=>i.tagName.toLowerCase()==="summary");if(!n)return null;let o=L(n);return o?{triggerSelector:f(n),targetSelector:f(e),label:o}:null}let t=P(e);if(!t)return null;let r=L(t);return r?{triggerSelector:f(t),targetSelector:f(e),label:r}:null}function N(e){let t=[],r=new Set,n=g(e);for(;n&&n!==document.body&&n!==document.documentElement;){let i=U(n);i&&!r.has(i.triggerSelector)&&(r.add(i.triggerSelector),t.push(i)),n=g(n)}if(t.length===0)return;let o=t.reverse();return{steps:o,location:o.map(i=>i.label)}}function j(e){let t=e?.[0]?.revealRecipe;if(t?.steps.length)return t;let r=d(e?.[0]?.selector);return r?N(r):void 0}function H(e){let t=j(e)?.location.filter(Boolean);return t?.length?`Inside: ${t.join(" \u203A ")}`:null}function v(e){if(!e?.isConnected)return!1;let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||e.getClientRects().length===0)return!1;let r=e;for(;r;){let n=window.getComputedStyle(r);if(n.display==="none"||n.visibility==="hidden"||n.visibility==="collapse"||Number.parseFloat(n.opacity||"1")<=0)return!1;r=r.parentElement}return!0}function V(e,t,r){return t.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open"?!0:r instanceof HTMLDetailsElement?r.open:v(r)}function R(e,t=M){return e?new Promise(r=>{let n=performance.now(),o=()=>{let i=d(e);if(v(i)){r(i);return}if(performance.now()-n>=t){r(null);return}requestAnimationFrame(o)};o()}):Promise.resolve(null)}function X(e,t){return d(e)??d(t?.[0]?.selector)}async function Z(e,t){let r=X(e,t);if(v(r))return r;let n=j(t)??(r?N(r):void 0);if(!n)return null;for(let i of n.steps){let l=d(i.triggerSelector);if(!(l instanceof HTMLElement))return null;let a=d(i.targetSelector);if(!V(i,l,a)&&(l.click(),!await R(i.targetSelector)))return null}let o=e&&d(e)?e:t?.[0]?.selector;return R(o)}function E(e){let t=Object.keys(e).find(i=>i.startsWith("__reactFiber$")||i.startsWith("__reactInternalInstance$"));if(!t)return null;let r=e[t],n=[],o=r?._debugSource;for(;r;){let i=r.type,l=i?.displayName||i?.name;l&&typeof l=="string"&&/^[A-Z]/.test(l)&&!l.startsWith("_")&&l!=="Fragment"&&n.unshift(l),r=r.return}return n.length>0?{name:n[n.length-1],path:n,...o?.fileName&&Number.isFinite(o.lineNumber)?{source:o}:{}}:null}function z(e){let t=Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"));if(!t)return[];let r=e[t],n=[];for(;r;){let o=r.type,i=typeof o=="function"||typeof o=="object"?o?.displayName||o?.name:null;i&&typeof i=="string"&&/^[A-Z]/.test(i)&&!i.startsWith("_")&&i!=="Fragment"&&n.push({name:i,fiber:r}),r=r.return}return n.reverse(),n}function K(e){let t=e,r=new Set;for(;t&&!r.has(t);){if(r.add(t),t.stateNode instanceof Element)return t.stateNode;t.child?t=t.child:t=null}return null}function Q(e){let t={targetFingerprint:T(e),selector:C(e),tagName:e.tagName.toLowerCase()},r=[],n=e.ownerDocument,o=c(n);for(;o;)r.unshift({url:n.URL,title:n.title,label:o.title||o.getAttribute("aria-label")||o.id||void 0}),n=o.ownerDocument,o=c(n);r.length&&(t.frameContext=r),e.id&&(t.id=e.id),e.classList.length>0&&(t.className=Array.from(e.classList).join(" "));let i=Y(e)||e.matches('button, a, [role="button"], [role="tab"]')&&(e.getAttribute("aria-label")||e.getAttribute("title")||e.textContent?.trim())||"";i&&i.length>0&&i.length<200&&(t.textContent=i);let l={};for(let m of e.attributes)m.name.startsWith("data-")&&(l[m.name]=m.value);Object.keys(l).length>0&&(t.dataAttributes=l);let a=E(e);a&&(t.reactComponent=a.name,t.reactComponentPath=a.path,a.source&&(t.reactSource=a.source));let u=oe(e);u&&(t.context=u);let s=N(e);return s&&(t.revealRecipe=s),t}function Y(e){let t="";for(let r of e.childNodes)r.nodeType===Node.TEXT_NODE&&(t+=r.textContent||"");return t.trim()}function G(e,t,r){let n=A(e,t,r),o=n.findIndex(i=>i.tagName.toLowerCase()==="canvas");return(o<0?n[0]:n.slice(0,o+1).find(i=>b(i,e,t)))??null}function J(e,t,r){if(typeof document.elementsFromPoint!="function")return!0;for(let n of A(t,r)){if(n===e||e.contains(n))return b(n,t,r);if(b(n,t,r))return!1}return!1}var ee="[data-popmelt-canvas-block]";function _(e,t){let r=W(e,t).find(n=>n.id!=="devtools-canvas"&&n.id!=="devtools-scrim");return!!(r&&S(r,ee))}function te(e){return e.namespaceURI==="http://www.w3.org/2000/svg"?e.closest("svg")??e:e}function A(e,t,r){if(_(e,t))return[];let n=new Set,o=W(e,t),i=o.map(te).filter(l=>n.has(l)||(n.add(l),l.id==="devtools-canvas"||l.id==="devtools-toolbar"||l.id==="devtools-scrim")||S(l,"#devtools-toolbar")||l.hasAttribute("data-devtools")||S(l,"[data-devtools]")?!1:l!==l.ownerDocument.body&&l!==l.ownerDocument.documentElement);return i.length>0?i:r?.allowBodyFallback&&o.includes(document.body)?[document.body]:[]}function re(e,t,r){for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE||!n.textContent?.trim())continue;let o=e.ownerDocument.createRange();o.selectNodeContents(n);let i=o.getClientRects?.();if(i&&Array.from(i).some(l=>{let a=q(t,r,e.ownerDocument);return a.x>=l.left&&a.x<=l.right&&a.y>=l.top&&a.y<=l.bottom}))return!0}return!1}function b(e,t,r){let n=e.ownerDocument.defaultView;if(!n)return!1;let o=n.getComputedStyle(e);if(o.visibility==="hidden"||o.visibility==="collapse")return!1;for(let s=e;s;s=g(s))if(s.ownerDocument.defaultView?.getComputedStyle(s).opacity==="0")return!1;if(re(e,t,r)||["button","canvas","embed","iframe","img","input","object","select","svg","textarea","video"].includes(e.tagName.toLowerCase())||o.backgroundImage&&o.backgroundImage!=="none")return!0;let i=o.backgroundColor.trim();if(i&&i!=="transparent"&&!/rgba?\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(i))return!0;let l=k(e),a={top:Number.parseFloat(o.borderTopWidth)||0,right:Number.parseFloat(o.borderRightWidth)||0,bottom:Number.parseFloat(o.borderBottomWidth)||0,left:Number.parseFloat(o.borderLeftWidth)||0},u=s=>{let m=o[`border${s}Color`];return o[`border${s}Style`]!=="none"&&m!=="transparent"&&!/rgba?\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(m)};return a.top>0&&u("Top")&&r<=l.top+a.top||a.right>0&&u("Right")&&t>=l.right-a.right||a.bottom>0&&u("Bottom")&&r>=l.bottom-a.bottom||a.left>0&&u("Left")&&t<=l.left+a.left}function ne(e,t,r){let n=A(e,t,r);return n.find(o=>b(o,e,t))??n.at(-1)??null}function oe(e){let t=g(e),r=["section","article","nav","aside","header","footer","main"];for(;t&&t!==e.ownerDocument.body;){let n=t.tagName.toLowerCase();if(r.includes(n)&&t.id)return c(t.ownerDocument)?C(t):`${n}#${t.id}`;if(t.id&&!t.id.startsWith("radix-")&&!t.id.startsWith(":"))return c(t.ownerDocument)?C(t):`${n}#${t.id}`;t=g(t)}return null}export{f as a,$ as b,O as c,H as d,Z as e,E as f,z as g,K as h,Q as i,G as j,J as k,_ as l,ne as m};
|
|
File without changes
|