@mcpjam/inspector 3.11.0 → 3.12.1

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.
Files changed (39) hide show
  1. package/dist/client/assets/OAuthDesktopReturnNotice-BeDakGgb.css +2 -0
  2. package/dist/client/assets/OAuthDesktopReturnNotice-DrCSUffX.js +11 -0
  3. package/dist/client/assets/{mermaid-GHXKKRXX-DooOqFNN.js → app-bootstrap-C0wjVteM.js} +1909 -649
  4. package/dist/client/assets/app-bootstrap-CbO9HC35.css +1 -0
  5. package/dist/client/assets/button-DQ9bR46C.js +3 -0
  6. package/dist/client/assets/chunk-YOKDWASO-Cpy4vQY8.js +145 -0
  7. package/dist/client/assets/dead-clicks-autocapture-D3WNuKsf.js +3 -0
  8. package/dist/client/assets/error-reporting-BHW3WviX.js +102 -0
  9. package/dist/client/assets/error-reporting-DmfwQkBP.js +1 -0
  10. package/dist/client/assets/exception-autocapture-D0Qfhhbc.js +5 -0
  11. package/dist/client/assets/failed-request-tracker-DyZB_Nfp.js +3 -0
  12. package/dist/client/assets/highlighted-body-KPVGNVTW-QEEOJH_y.js +3 -0
  13. package/dist/client/assets/index-pxVGER4l.js +4 -0
  14. package/dist/client/assets/jszip.min-DPr4_u5f.js +4 -0
  15. package/dist/client/assets/mermaid-HWGCJPDP-DNAzcUbW.js +1 -0
  16. package/dist/client/assets/posthog-recorder-dQnAa9ak.js +110 -0
  17. package/dist/client/assets/preload-helper-DsxBH8kv.js +3 -0
  18. package/dist/client/assets/rolldown-runtime-DeZZUx0l.js +1 -0
  19. package/dist/client/assets/surveys-CdlQJ0hc.js +3 -0
  20. package/dist/client/assets/trace-timeline-2WCodaTP.js +137 -0
  21. package/dist/client/assets/trace-timeline-Ix3CoQw4.js +1 -0
  22. package/dist/client/assets/web-vitals-DdK10Etm.js +3 -0
  23. package/dist/client/index.html +7 -2
  24. package/dist/client/robots.txt +14 -0
  25. package/dist/server/{chunk-3I6NEQHV.js → chunk-R5EHY55H.js} +2 -2
  26. package/dist/server/harness-install-cli.js +1 -1
  27. package/dist/server/index.js +9213 -6634
  28. package/package.json +51 -50
  29. package/dist/client/assets/dead-clicks-autocapture-ApmbuFvM.js +0 -2
  30. package/dist/client/assets/error-reporting-C8so6E8C.js +0 -92
  31. package/dist/client/assets/exception-autocapture-BqHgtpgn.js +0 -3
  32. package/dist/client/assets/highlighted-body-OFNGDK62-Lg-8-zC8.js +0 -2
  33. package/dist/client/assets/index-BYEarR7W.css +0 -1
  34. package/dist/client/assets/index-BireMI1y.js +0 -11
  35. package/dist/client/assets/jszip.min-DkflbHVD.js +0 -3
  36. package/dist/client/assets/mermaid-GHXKKRXX-zqdNpMJm.css +0 -1
  37. package/dist/client/assets/posthog-recorder-Cqdsd7mu.js +0 -109
  38. package/dist/client/assets/surveys-Bn96AwyI.js +0 -2
  39. package/dist/client/assets/web-vitals-D6VtlfDg.js +0 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcpjam/inspector",
3
3
  "productName": "MCPJam Inspector",
4
- "version": "3.11.0",
4
+ "version": "3.12.1",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=22.0.0"
@@ -130,24 +130,24 @@
130
130
  "@ai-sdk/xai": "^3.0.46",
131
131
  "@axiomhq/js": "^1.4.0",
132
132
  "@cfworker/json-schema": "^4.1.1",
133
- "@codemirror/commands": "^6.10.3",
133
+ "@codemirror/commands": "^6.11.1",
134
134
  "@codemirror/lang-json": "^6.0.2",
135
- "@codemirror/language": "^6.12.3",
135
+ "@codemirror/language": "^6.12.4",
136
136
  "@codemirror/state": "^6.6.0",
137
- "@codemirror/view": "^6.43.0",
138
- "@convex-dev/auth": "^0.0.88",
139
- "@convex-dev/workos": "^0.0.1",
140
- "@dagrejs/dagre": "^3.0.0",
137
+ "@codemirror/view": "^6.43.12",
138
+ "@convex-dev/auth": "^0.0.95",
139
+ "@convex-dev/workos": "^0.0.3",
140
+ "@dagrejs/dagre": "^3.1.1",
141
141
  "@dnd-kit/core": "^6.3.1",
142
142
  "@dnd-kit/sortable": "^10.0.0",
143
143
  "@dnd-kit/utilities": "^3.2.2",
144
- "@e2b/desktop": "^2.3.3",
144
+ "@e2b/desktop": "^2.4.0",
145
145
  "@hono/node-server": "^1.13.7",
146
146
  "@hono/node-ws": "^1.3.1",
147
147
  "@hookform/resolvers": "^3.10.0",
148
148
  "@lezer/highlight": "^1.2.3",
149
149
  "@mcp-ui/client": "^5.9.0",
150
- "@mcpjam/sdk": "^8.15.0",
150
+ "@mcpjam/sdk": "^8.16.1",
151
151
  "@modelcontextprotocol/client": "2.0.0",
152
152
  "@modelcontextprotocol/ext-apps": "^1.7.4",
153
153
  "@novnc/novnc": "^1.7.0",
@@ -156,73 +156,73 @@
156
156
  "@sentry/node": "^8.47.0",
157
157
  "@sentry/react": "^8.47.0",
158
158
  "@sentry/vite-plugin": "^4.3.0",
159
- "@tanstack/react-virtual": "^3.13.12",
159
+ "@tanstack/react-virtual": "^3.14.13",
160
160
  "@workos-inc/authkit-react": "^0.16.2",
161
- "@workos-inc/node": "^10.2.0",
161
+ "@workos-inc/node": "^10.13.0",
162
162
  "@xmldom/xmldom": "^0.8.13",
163
163
  "@xterm/addon-clipboard": "^0.2.0",
164
164
  "@xterm/addon-fit": "^0.11.0",
165
165
  "@xterm/addon-web-links": "^0.12.0",
166
166
  "@xterm/addon-webgl": "^0.19.0",
167
167
  "@xterm/xterm": "^6.0.0",
168
- "@xyflow/react": "^12.9.0",
168
+ "@xyflow/react": "^12.11.6",
169
169
  "ai": "^6.0.154",
170
- "ajv": "^8.18.0",
170
+ "ajv": "^8.20.0",
171
171
  "class-variance-authority": "^0.7.1",
172
172
  "classnames": "^2.5.1",
173
173
  "clsx": "^2.1.1",
174
174
  "cmdk": "^1.1.1",
175
175
  "convex": "^1.26.2",
176
- "date-fns": "^3.6.0",
176
+ "date-fns": "^4.4.0",
177
177
  "denque": "^2.1.0",
178
178
  "dotenv": "^16.4.5",
179
179
  "e2b": "^2.29.0",
180
- "electron-log": "^5.4.2",
180
+ "electron-log": "^5.4.4",
181
181
  "embla-carousel-react": "^8.6.0",
182
182
  "fast-deep-equal": "^3.1.3",
183
183
  "fix-path": "^4.0.0",
184
184
  "framer-motion": "^12.23.6",
185
- "fuse.js": "^7.1.0",
185
+ "fuse.js": "^7.5.0",
186
186
  "gray-matter": "^4.0.3",
187
- "hono": "^4.11.7",
187
+ "hono": "^4.13.8",
188
188
  "jose": "^5.10.0",
189
- "jszip": "^3.10.1",
189
+ "jszip": "^3.10.2",
190
190
  "lucide-react": "^0.525.0",
191
- "marked": "^16.4.1",
191
+ "marked": "^18.0.14",
192
192
  "next-themes": "^0.4.6",
193
193
  "ollama-ai-provider-v2": "^1.5.2",
194
- "open": "^10.2.0",
194
+ "open": "^11.0.4",
195
195
  "playwright": "1.62.1",
196
- "postcss": "^8.5.6",
197
- "posthog-js": "^1.310.0",
198
- "posthog-node": "^5.9.2",
196
+ "postcss": "^8.5.28",
197
+ "posthog-js": "^1.434.2",
198
+ "posthog-node": "^5.52.4",
199
199
  "proper-lockfile": "4.1.2",
200
- "radix-ui": "^1.4.2",
200
+ "radix-ui": "^1.6.7",
201
201
  "re2js": "^2.8.6",
202
- "react": "19.1.0",
203
- "react-dom": "19.1.0",
202
+ "react": "19.3.0",
203
+ "react-dom": "19.3.0",
204
204
  "react-force-graph-2d": "^1.29.1",
205
- "react-hook-form": "^7.60.0",
205
+ "react-hook-form": "^7.88.0",
206
206
  "react-markdown": "^10.1.0",
207
207
  "react-resizable-panels": "^3.0.3",
208
208
  "react-router": "^7.0.0",
209
209
  "react-textarea-autosize": "^8.5.9",
210
210
  "recharts": "^2.15.4",
211
211
  "remark-gfm": "^4.0.1",
212
- "sonner": "^2.0.6",
213
- "streamdown": "^2.1.0",
212
+ "sonner": "^2.0.8",
213
+ "streamdown": "^2.6.0",
214
214
  "tailwind-merge": "^3.3.1",
215
215
  "tar": "^7.5.22",
216
216
  "tokenlens": "^1.3.1",
217
- "update-electron-app": "^3.1.1",
217
+ "update-electron-app": "^3.3.0",
218
218
  "url-template": "^3.1.1",
219
- "use-stick-to-bottom": "^1.1.1",
219
+ "use-stick-to-bottom": "^1.1.6",
220
220
  "ws": "^8.18.0",
221
- "xml-crypto": "^6.1.2",
221
+ "xml-crypto": "^6.3.0",
222
222
  "xpath": "^0.0.34",
223
- "yaml": "^2.9.0",
223
+ "yaml": "^2.9.1",
224
224
  "zod": "^4.2.0",
225
- "zustand": "^5.0.6"
225
+ "zustand": "^5.0.15"
226
226
  },
227
227
  "optionalDependencies": {
228
228
  "node-pty": "1.1.0"
@@ -238,46 +238,47 @@
238
238
  "@electron-forge/plugin-vite": "^7.11.1",
239
239
  "@electron-forge/publisher-github": "^7.11.1",
240
240
  "@electron/fuses": "^2.0.0",
241
- "@eslint/eslintrc": "^3.3.6",
241
+ "@eslint/eslintrc": "^3.3.7",
242
242
  "@mcpjam/chat-ui": "*",
243
243
  "@mcpjam/design-system": "*",
244
244
  "@mcpjam/widget-react": "*",
245
245
  "@playwright/test": "1.62.1",
246
+ "@posthog/rollup-plugin": "^1.6.0",
246
247
  "@tailwindcss/postcss": "^4.3.3",
247
248
  "@tailwindcss/vite": "^4.3.3",
248
- "@testing-library/dom": "^10.4.1",
249
+ "@testing-library/dom": "^10.4.2",
249
250
  "@testing-library/jest-dom": "^6.9.1",
250
251
  "@testing-library/react": "^16.3.3",
251
- "@testing-library/user-event": "^14.6.6",
252
+ "@testing-library/user-event": "^14.6.7",
252
253
  "@types/node": "^24",
253
254
  "@types/proper-lockfile": "4.1.4",
254
255
  "@types/react": "^19",
255
256
  "@types/react-dom": "^19",
256
257
  "@types/ws": "^8.5.13",
257
- "@typescript-eslint/parser": "^8.68.0",
258
- "@vitejs/plugin-react": "^4.3.4",
258
+ "@typescript-eslint/parser": "^8.70.1",
259
+ "@vitejs/plugin-react": "^5.2.0",
259
260
  "@vitest/coverage-v8": "^3.2.7",
260
- "@workos/emulate": "0.12.0",
261
- "autoprefixer": "^10.5.4",
262
- "concurrently": "^9.1.0",
261
+ "@workos/emulate": "0.13.1",
262
+ "autoprefixer": "^10.6.1",
263
+ "concurrently": "^10.0.5",
263
264
  "cross-env": "^10.1.0",
264
265
  "electron": "43.6.0",
265
- "esbuild": "^0.27.0",
266
+ "esbuild": "^0.28.2",
266
267
  "es-module-lexer": "1.7.0",
267
- "eslint": "^9",
268
+ "eslint": "^10.11.0",
268
269
  "jsdom": "^27.4.0",
269
270
  "node-abi": "^3.96.0",
270
271
  "png-to-ico": "^2.1.8",
271
- "prettier": "^3.9.6",
272
+ "prettier": "^3.9.8",
272
273
  "run-script-os": "^1.1.6",
273
- "sharp": "^0.33.4",
274
+ "sharp": "^0.35.4",
274
275
  "tailwindcss": "^4.1.11",
275
- "terser": "^5.46.1",
276
+ "terser": "^5.51.2",
276
277
  "tsup": "^8.3.5",
277
- "tsx": "^4.23.12",
278
+ "tsx": "^4.23.15",
278
279
  "tw-animate-css": "^1.3.5",
279
280
  "typescript": "^5",
280
- "vite": "^7.1.4",
281
+ "vite": "^8.3.0",
281
282
  "vite-tsconfig-paths": "^6.0.4",
282
283
  "vitest": "^3.2.7"
283
284
  },
@@ -286,6 +287,6 @@
286
287
  "jsondiffpatch": "0.7.2",
287
288
  "zod": "^4.2.0",
288
289
  "qs": "6.14.2",
289
- "ajv": "^8.18.0"
290
+ "ajv": "^8.20.0"
290
291
  }
291
292
  }
@@ -1,2 +0,0 @@
1
- import{g as Ze}from"./index-BireMI1y.js";(function(){try{var h=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};h.SENTRY_RELEASE={id:"3.11.0"};var u=new h.Error().stack;u&&(h._sentryDebugIds=h._sentryDebugIds||{},h._sentryDebugIds[u]="ffc5cdcc-9df0-4712-a880-e8d416d8b190",h._sentryDebugIdIdentifier="sentry-dbid-ffc5cdcc-9df0-4712-a880-e8d416d8b190")}catch{}})();function Fe(h,u){for(var m=0;m<u.length;m++){const f=u[m];if(typeof f!="string"&&!Array.isArray(f)){for(const c in f)if(c!=="default"&&!(c in h)){const x=Object.getOwnPropertyDescriptor(f,c);x&&Object.defineProperty(h,c,x.get?x:{enumerable:!0,get:()=>f[c]})}}}return Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var De={},xe;function He(){return xe||(xe=1,(function(){function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},h.apply(null,arguments)}var u=typeof window<"u"?window:void 0,m=typeof globalThis<"u"?globalThis:u;typeof self>"u"&&(m.self=m),typeof File>"u"&&(m.File=function(){});var f=m?.document;m!=null&&m.XMLHttpRequest&&new m.XMLHttpRequest;var c=u??{};function x(t,e){return t.indexOf(e)!==-1}var Z=function(t){return t.trim()},se=Object.prototype,Ae=se.hasOwnProperty,G=se.toString,ie=Array.isArray||function(t){return G.call(t)==="[object Array]"},W=t=>typeof t=="function",M=t=>t===void 0,F=t=>G.call(t)=="[object String]",oe=t=>t===null,V=t=>M(t)||oe(t),R=t=>G.call(t)=="[object Number]"&&t==t,Ne=t=>t instanceof FormData,le=function(t,e){var{debugEnabled:n}=e===void 0?{}:e,r={C(a){if(u&&(c.POSTHOG_DEBUG||n)&&!M(u.console)&&u.console){for(var s=("__rrweb_original__"in u.console[a])?u.console[a].__rrweb_original__:u.console[a],i=arguments.length,l=new Array(i>1?i-1:0),_=1;i>_;_++)l[_-1]=arguments[_];s(t,...l)}},info(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.C("log",...s)},warn(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.C("warn",...s)},error(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.C("error",...s)},critical(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];console.error(t,...s)},uninitializedWarning(a){r.error("You must initialize PostHog before calling "+a)},createLogger:(a,s)=>le(t+" "+a,s)};return r},Y=le("[PostHog.js]"),Me=Y.createLogger;function T(t,e){if(!V(t))if(ie(t))t.forEach(e);else if(Ne(t))t.forEach(((r,a)=>e(r,a)));else for(var n in t)Ae.call(t,n)&&e(t[n],n)}var ce=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];for(var a of n)for(var s in a)a[s]!==void 0&&(t[s]=a[s]);return t};function X(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}function H(t,e,n,r){var{capture:a=!1,passive:s=!0}=r??{};t?.addEventListener(e,n,{capture:a,passive:s})}function ue(t){return!!t&&t.nodeType===1}function $(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function J(t){return t?Z(t).split(/\s+/):[]}function q(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return J(e)}function B(t){var e="";return Q(t)&&!he(t)&&t.childNodes&&t.childNodes.length&&T(t.childNodes,(function(n){var r,a;(function(s){return!!s&&s.nodeType===3})(n)&&n.textContent&&(e+=(r=V(a=n.textContent)?null:Z(a).split(/(\s+)/).filter((s=>S(s))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))!==null&&r!==void 0?r:"")})),Z(e)}var de=["a","button","form","input","select","textarea","label"];function Q(t){for(var e=t;e.parentNode&&!$(e,"body");e=e.parentNode){var n=q(e);if(x(n,"ph-sensitive")||x(n,"ph-no-capture"))return!1}if(x(q(t),"ph-include"))return!0;var r=t.type||"";if(F(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!F(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function he(t){return!!($(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||$(t,"select")||$(t,"textarea")||t.getAttribute("contenteditable")==="true")}var _e="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Le=new RegExp("^(?:"+_e+")$"),Oe=new RegExp(_e),me="\\d{3}-?\\d{2}-?\\d{4}",$e=new RegExp("^("+me+")$"),Re=new RegExp("("+me+")");function S(t,e){return e===void 0&&(e=!0),!(V(t)||F(t)&&(t=Z(t),(e?Le:Oe).test((t||"").replace(/[- ]/g,""))||(e?$e:Re).test(t)))}function fe(t){var e=B(t);return S(e=(e+" "+ve(t)).trim())?e:""}function ve(t){var e="";return t&&t.childNodes&&t.childNodes.length&&T(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var a=B(n);e=(e+" "+a).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+ve(n)).trim())}catch(s){Y.error("[AutoCapture]",s)}})),e}function ge(t){return t.replace(/"|\\"/g,'\\"')}function Te(t){var e=t.attr__class;return e?ie(e)?e:J(e):void 0}function U(t,e){return e.length>t?e.slice(0,t)+"...":e}function Se(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!ue(e));return e}function je(t,e){for(var n,r,a,{e:s,maskAllElementAttributes:i,maskAllText:l,elementAttributeIgnoreList:_}=e,L=[t],y=t;y.parentNode&&!$(y,"body");)(a=y.parentNode)&&a.nodeType===11?(L.push(y.parentNode.host),y=y.parentNode.host):(L.push(y.parentNode),y=y.parentNode);var I,P,K,pe,O=[],ye={},k=!1,te=!1;if(T(L,(C=>{var o=Q(C);C.tagName.toLowerCase()==="a"&&(k=C.getAttribute("href"),k=o&&k&&S(k)&&k),x(q(C),"ph-no-capture")&&(te=!0),O.push((function(d,b,g,w){var v=d.tagName.toLowerCase(),p={tag_name:v};de.indexOf(v)>-1&&!g&&(p.$el_text=v.toLowerCase()==="a"||v.toLowerCase()==="button"?U(1024,fe(d)):U(1024,B(d)));var A=q(d);A.length>0&&(p.classes=A.filter((function(D){return D!==""}))),T(d.attributes,(function(D){var re;if((!he(d)||["name","id","class","aria-label"].indexOf(D.name)!==-1)&&(w==null||!w.includes(D.name))&&!b&&S(D.value)&&(!F(re=D.name)||re.substring(0,10)!=="_ngcontent"&&re.substring(0,7)!=="_nghost")){var ae=D.value;D.name==="class"&&(ae=J(ae).join(" ")),p["attr__"+D.name]=U(1024,ae)}}));for(var N=1,z=1,ne=d;ne=Se(ne);)N++,ne.tagName===d.tagName&&z++;return p.nth_child=N,p.nth_of_type=z,p})(C,i,l,_));var E=(function(d){if(!Q(d))return{};var b={};return T(d.attributes,(function(g){if(g.name&&g.name.indexOf("data-ph-capture-attribute")===0){var w=g.name.replace("data-ph-capture-attribute-",""),v=g.value;w&&v&&S(v)&&(b[w]=v)}})),b})(C);ce(ye,E)})),te)return{props:{},explicitNoCapture:te};if(l||(O[0].$el_text=t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"?fe(t):B(t)),k){var be,we;O[0].attr__href=k;var Ce=(P=k,K=f?.createElement("a"),(be=M(K)?null:(K.href=P,K))==null?void 0:be.host),ke=u==null||(we=u.location)==null?void 0:we.host;Ce&&ke&&Ce!==ke&&(I=k)}return{props:ce({$event_type:s.type,$ce_version:1},{$elements:O},{$elements_chain:(pe=O,(function(C){return C.map((o=>{var E,d,b="";if(o.tag_name&&(b+=o.tag_name),o.attr_class)for(var g of(o.attr_class.sort(),o.attr_class))b+="."+g.replace(/"/g,"");var w=h({},o.text?{text:o.text}:{},{"nth-child":(E=o.nth_child)!==null&&E!==void 0?E:0,"nth-of-type":(d=o.nth_of_type)!==null&&d!==void 0?d:0},o.href?{href:o.href}:{},o.attr_id?{attr_id:o.attr_id}:{},o.attributes),v={};return X(w).sort(((p,A)=>{var[N]=p,[z]=A;return N.localeCompare(z)})).forEach((p=>{var[A,N]=p;return v[ge(A.toString())]=ge(N.toString())})),(b+=":")+X(v).map((p=>{var[A,N]=p;return A+'="'+N+'"'})).join("")})).join(";")})((function(C){return C.map((o=>{var E,d,b={text:(E=o.$el_text)==null?void 0:E.slice(0,400),tag_name:o.tag_name,href:(d=o.attr__href)==null?void 0:d.slice(0,2048),attr_class:Te(o),attr_id:o.attr__id,nth_child:o.nth_child,nth_of_type:o.nth_of_type,attributes:{}};return X(o).filter((g=>{var[w]=g;return w.indexOf("attr__")===0})).forEach((g=>{var[w,v]=g;return b.attributes[w]=v})),b}))})(pe)))},(n=O[0])!=null&&n.$el_text?{$el_text:(r=O[0])==null?void 0:r.$el_text}:{},I&&s.type==="click"?{$external_click_url:I}:{},ye)}}Me("[AutoCapture]");var ee={};function Ie(t){return(function(e,n){var r=ee[e];if(r)return r;var a,s=n[e];if(W(a=s)&&a.toString().indexOf("[native code]")!==-1&&!u.Zone)return ee[e]=s.bind(n);var i=n.document;if(i&&W(i.createElement))try{var l=i.createElement("iframe");l.hidden=!0,i.head.appendChild(l);var _=l.contentWindow;_&&_[e]&&(s=_[e]),i.head.removeChild(l)}catch(L){Y.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",L)}return s&&W(s)?ee[e]=s.bind(n):s})("MutationObserver",t)}function j(t,e){return R(t)&&t>=e}class Pe{vt(e){var n,r,a,s,i,l=this.ft(e?.__onCapture||this.yt.bind(this));return{element_attribute_ignorelist:(n=e?.element_attribute_ignorelist)!==null&&n!==void 0?n:l.element_attribute_ignorelist,scroll_threshold_ms:(r=e?.scroll_threshold_ms)!==null&&r!==void 0?r:l.scroll_threshold_ms,selection_change_threshold_ms:(a=e?.selection_change_threshold_ms)!==null&&a!==void 0?a:l.selection_change_threshold_ms,mutation_threshold_ms:(s=e?.mutation_threshold_ms)!==null&&s!==void 0?s:l.mutation_threshold_ms,capture_clicks_with_modifier_keys:(i=e?.capture_clicks_with_modifier_keys)!==null&&i!==void 0?i:l.capture_clicks_with_modifier_keys,__onCapture:l.__onCapture}}constructor(e,n){this.bt=[],this.ft=r=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,__onCapture:r}),this.wt=r=>{var a=(function(s){var i,l,_=M((i=s).target)?i.srcElement||null:(l=i.target)!=null&&l.shadowRoot?i.composedPath()[0]||null:i.target||null;return _?{node:_,originalEvent:s,timestamp:Date.now()}:null})(r);oe(a)||this.Ct(a)||this.bt.push(a),this.bt.length&&M(this.It)&&(this.It=c.setTimeout((()=>{this.St()}),1e3))},this.kt=()=>{var r=Date.now();r%50==0&&this.bt.forEach((a=>{M(a.scrollDelayMs)&&(a.scrollDelayMs=r-a.timestamp)}))},this.xt=()=>{this.At=Date.now()},this.Tt=()=>{f?.visibilityState==="visible"&&(this.Nt=Date.now())},this.instance=e,this.Rt=this.vt(n),this._onCapture=this.Rt.__onCapture}start(e){this.Mt(),this._t(),this.Et(),this.Ot(),this.Ft(e)}Ft(e){if(!this.Lt){var n=Ie(c);this.Lt=new n((r=>{this.Bt(r)})),this.Lt.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;(e=this.Lt)==null||e.disconnect(),this.Lt=void 0,c.removeEventListener("click",this.wt),c.removeEventListener("scroll",this.kt,{capture:!0}),c.removeEventListener("selectionchange",this.xt),f?.removeEventListener("visibilitychange",this.Tt)}Bt(e){this.Zt=Date.now()}Mt(){H(c,"click",this.wt)}_t(){H(c,"scroll",this.kt,{capture:!0})}Et(){H(c,"selectionchange",this.xt)}Ot(){H(f,"visibilitychange",this.Tt)}Ct(e){return!(e&&(this.Rt.capture_clicks_with_modifier_keys||!((n=e.originalEvent).ctrlKey||n.metaKey||n.altKey||n.shiftKey))&&!((r=e.node)instanceof Element&&(r.id==="__POSTHOG_TOOLBAR__"||r.closest!=null&&r.closest(".toolbar-global-fade-container")))&&!this.bt.some((a=>a.node===e.node&&1e3>Math.abs(a.timestamp-e.timestamp)))&&!$(e.node,"html")&&ue(e.node)&&!de.includes(e.node.tagName.toLowerCase()));var n,r}St(){if(this.bt.length){clearTimeout(this.It),this.It=void 0;var e=this.bt;for(var n of(this.bt=[],e)){var r;n.mutationDelayMs=(r=n.mutationDelayMs)!==null&&r!==void 0?r:this.Zt&&this.Zt>=n.timestamp?this.Zt-n.timestamp:void 0,n.absoluteDelayMs=Date.now()-n.timestamp,n.selectionChangedDelayMs=this.At&&this.At>=n.timestamp?this.At-n.timestamp:void 0,n.visibilityChangedDelayMs=this.Nt?Math.abs(n.timestamp-this.Nt):void 0;var a=j(n.scrollDelayMs,this.Rt.scroll_threshold_ms),s=j(n.selectionChangedDelayMs,this.Rt.selection_change_threshold_ms),i=j(n.mutationDelayMs,this.Rt.mutation_threshold_ms),l=j(n.absoluteDelayMs,1.1*this.Rt.mutation_threshold_ms),_=R(n.scrollDelayMs)&&this.Rt.scroll_threshold_ms>n.scrollDelayMs,L=R(n.mutationDelayMs)&&this.Rt.mutation_threshold_ms>n.mutationDelayMs,y=R(n.selectionChangedDelayMs)&&this.Rt.selection_change_threshold_ms>n.selectionChangedDelayMs,I=R(n.visibilityChangedDelayMs)&&this.Rt.selection_change_threshold_ms>n.visibilityChangedDelayMs;if(!(_||L||y||I)){var P=j(n.visibilityChangedDelayMs,this.Rt.selection_change_threshold_ms);a||i||l||s||P?this._onCapture(n,{$dead_click_last_mutation_timestamp:this.Zt,$dead_click_event_timestamp:n.timestamp,$dead_click_scroll_timeout:a,$dead_click_mutation_timeout:i,$dead_click_absolute_timeout:l,$dead_click_selection_changed_timeout:s,$dead_click_visibility_changed_timeout:P}):this.Rt.mutation_threshold_ms>n.absoluteDelayMs&&this.bt.push(n)}}this.bt.length&&M(this.It)&&(this.It=c.setTimeout((()=>{this.St()}),1e3))}}yt(e,n){this.instance.capture("$dead_click",h({},n,je(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Rt.element_attribute_ignorelist}).props,{$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs,$dead_click_visibility_changed_delay_ms:e.visibilityChangedDelayMs}),{timestamp:new Date(e.timestamp)})}}c.__PosthogExtensions__=c.__PosthogExtensions__||{},c.__PosthogExtensions__.initDeadClicksAutocapture=(t,e)=>new Pe(t,e)})()),De}var Ee=He();const qe=Ze(Ee),Ke=Fe({__proto__:null,default:qe},[Ee]);export{Ke as d};
2
- //# sourceMappingURL=dead-clicks-autocapture-ApmbuFvM.js.map