@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.
- package/dist/client/assets/OAuthDesktopReturnNotice-BeDakGgb.css +2 -0
- package/dist/client/assets/OAuthDesktopReturnNotice-DrCSUffX.js +11 -0
- package/dist/client/assets/{mermaid-GHXKKRXX-DooOqFNN.js → app-bootstrap-C0wjVteM.js} +1909 -649
- package/dist/client/assets/app-bootstrap-CbO9HC35.css +1 -0
- package/dist/client/assets/button-DQ9bR46C.js +3 -0
- package/dist/client/assets/chunk-YOKDWASO-Cpy4vQY8.js +145 -0
- package/dist/client/assets/dead-clicks-autocapture-D3WNuKsf.js +3 -0
- package/dist/client/assets/error-reporting-BHW3WviX.js +102 -0
- package/dist/client/assets/error-reporting-DmfwQkBP.js +1 -0
- package/dist/client/assets/exception-autocapture-D0Qfhhbc.js +5 -0
- package/dist/client/assets/failed-request-tracker-DyZB_Nfp.js +3 -0
- package/dist/client/assets/highlighted-body-KPVGNVTW-QEEOJH_y.js +3 -0
- package/dist/client/assets/index-pxVGER4l.js +4 -0
- package/dist/client/assets/jszip.min-DPr4_u5f.js +4 -0
- package/dist/client/assets/mermaid-HWGCJPDP-DNAzcUbW.js +1 -0
- package/dist/client/assets/posthog-recorder-dQnAa9ak.js +110 -0
- package/dist/client/assets/preload-helper-DsxBH8kv.js +3 -0
- package/dist/client/assets/rolldown-runtime-DeZZUx0l.js +1 -0
- package/dist/client/assets/surveys-CdlQJ0hc.js +3 -0
- package/dist/client/assets/trace-timeline-2WCodaTP.js +137 -0
- package/dist/client/assets/trace-timeline-Ix3CoQw4.js +1 -0
- package/dist/client/assets/web-vitals-DdK10Etm.js +3 -0
- package/dist/client/index.html +7 -2
- package/dist/client/robots.txt +14 -0
- package/dist/server/{chunk-3I6NEQHV.js → chunk-R5EHY55H.js} +2 -2
- package/dist/server/harness-install-cli.js +1 -1
- package/dist/server/index.js +9213 -6634
- package/package.json +51 -50
- package/dist/client/assets/dead-clicks-autocapture-ApmbuFvM.js +0 -2
- package/dist/client/assets/error-reporting-C8so6E8C.js +0 -92
- package/dist/client/assets/exception-autocapture-BqHgtpgn.js +0 -3
- package/dist/client/assets/highlighted-body-OFNGDK62-Lg-8-zC8.js +0 -2
- package/dist/client/assets/index-BYEarR7W.css +0 -1
- package/dist/client/assets/index-BireMI1y.js +0 -11
- package/dist/client/assets/jszip.min-DkflbHVD.js +0 -3
- package/dist/client/assets/mermaid-GHXKKRXX-zqdNpMJm.css +0 -1
- package/dist/client/assets/posthog-recorder-Cqdsd7mu.js +0 -109
- package/dist/client/assets/surveys-Bn96AwyI.js +0 -2
- package/dist/client/assets/web-vitals-D6VtlfDg.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};p.SENTRY_RELEASE={id:"3.12.1"};var P=new p.Error().stack;P&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[P]="e7399b6f-ba9b-4ef9-abb2-61d486c5a2ed",p._sentryDebugIdIdentifier="sentry-dbid-e7399b6f-ba9b-4ef9-abb2-61d486c5a2ed")}catch{}})();(function(){const p="u">typeof window?window:void 0,P="u">typeof globalThis?globalThis:p,g=P?.document;P!=null&&P.XMLHttpRequest&&new P.XMLHttpRequest;const V=typeof globalThis<"u"?globalThis:p;V&&typeof self>"u"&&(V.self=V),V&&typeof File>"u"&&(V.File=function(){});const a=p??{};function I(e,n){return e.indexOf(n)!==-1}const K=function(e){return e.trim()},be=Object.prototype,ze=be.hasOwnProperty,Z=be.toString,ne=Array.isArray||function(e){return Z.call(e)==="[object Array]"},re=e=>typeof e=="function",M=e=>e===void 0,X=e=>Z.call(e)=="[object String]",Y=e=>e===null,ie=e=>M(e)||Y(e),L=e=>Z.call(e)=="[object Number]"&&e==e;function ye(e){return e&&e.split("#")[0]}function we(e){try{return e()}catch{return}}function z(e){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},z(e)}function Ue(e,n,t){return(n=(function(r){var i=(function(s){if(z(s)!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var c=o.call(s,"string");if(z(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return z(i)=="symbol"?i:i+""})(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function T(e){for(var n=1;arguments.length>n;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Ce(Object(t),!0).forEach(function(r){Ue(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}const Ee=(e,{debugEnabled:n}={})=>{const t={N(r,...i){p&&(p.POSTHOG_DEBUG||n)&&!M(p.console)&&p.console&&("__rrweb_original__"in p.console[r]?p.console[r].__rrweb_original__:p.console[r])(e,...i)},debug(...r){t.N("debug",...r)},info(...r){t.N("log",...r)},warn(...r){t.N("warn",...r)},error(...r){t.N("error",...r)},critical(...r){console.error(e,...r)},uninitializedWarning(r){t.error(`You must initialize PostHog before calling ${r}`)},createLogger:(r,i)=>Ee(`${e} ${r}`,i)};return t},se=Ee("[PostHog.js]"),Fe=se.createLogger;function H(e,n){if(!ie(e))if(ne(e))e.forEach(n);else if(e instanceof FormData)e.forEach((t,r)=>n(t,r));else for(const t in e)ze.call(e,t)&&n(e[t],t)}const We=function(e,...n){for(const t of n)for(const r in t)t[r]!==void 0&&(e[r]=t[r]);return e};function oe(e){const n=Object.keys(e);let t=n.length;const r=new Array(t);for(;t--;)r[t]=[n[t],e[n[t]]];return r}function E(e,n,t,r){const{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(n,t,{capture:i,passive:s})}function x(e){return!!e&&e.nodeType===1}function C(e,n){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===n.toLowerCase()}function De(e){return!!e&&e.nodeType===11&&x(e.host)}function le(e){return e?K(e).split(/\s+/):[]}function B(e){let n="";switch(typeof e.className){case"string":n=e.className;break;case"object":n=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:n=""}return le(n)}function J(e){let n="";return Q(e)&&!ue(e)&&e.childNodes&&e.childNodes.length&&H(e.childNodes,function(t){var r,i;(function(s){return!!s&&s.nodeType===3})(t)&&t.textContent&&(n+=(r=ie(i=t.textContent)?null:K(i).split(/(\s+)/).filter(s=>F(s)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))!==null&&r!==void 0?r:"")}),K(n)}function ae(e){var n;return M(e.target)?e.srcElement||null:!((n=e.target)===null||n===void 0)&&n.shadowRoot?e.composedPath()[0]||null:e.target||null}const xe=["a","button","form","input","select","textarea","label"];function qe(e,n){const t=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!t&&t.call(e,n)}catch{return!1}}function Ge(e){const n=e.parentNode;return!(!n||!x(n))&&n}const Ne=[".ph-no-deadclick",".ph-no-capture"],Ke=["","text","search","email","password","url","tel","number"];function U(e){return!(!e||!x(e))&&(!!C(e,"textarea")||(C(e,"input")?I(Ke,(e.getAttribute("type")||"").toLowerCase()):(function(n){var t;if(n.isContentEditable)return!0;const r=(t=n.getAttribute)===null||t===void 0?void 0:t.call(n,"contenteditable");return r==="true"||r===""})(e)))}const ce=e=>!e||C(e,"html")||!x(e),ke=(e,n)=>{if(!p||ce(e))return{parentIsUsefulElement:!1,targetElementList:[]};let t=!1;const r=[e];let i=e;for(;i.parentNode&&!C(i,"body");){if(De(i.parentNode)){r.push(i.parentNode.host),i=i.parentNode.host;continue}const s=Ge(i);if(!s)break;if(n||xe.indexOf(s.tagName.toLowerCase())>-1)t=!0;else try{const o=p.getComputedStyle(s);o&&o.getPropertyValue("cursor")==="pointer"&&(t=!0)}catch{}r.push(s),i=s}return{parentIsUsefulElement:t,targetElementList:r}};function Q(e){const n=new Set;let t=0;for(let s=e;s.parentNode&&!C(s,"body");s=s.parentNode){if(t++>=1e3||n.has(s))return!1;n.add(s);const o=B(s);if(I(o,"ph-sensitive")||I(o,"ph-no-capture"))return!1}if(I(B(e),"ph-include"))return!0;const r=e.type||"";if(X(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}const i=e.name||e.id||"";return!X(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ue(e){return!!(C(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||C(e,"select")||C(e,"textarea")||e.getAttribute("contenteditable")==="true")}const $e=new RegExp("^(?:(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}))$"),Me=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,Ze=[16,15,14,13],Xe=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),Re=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),Oe=/[0-9A-Za-z_]/;function Ye(e){let n=0,t=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;t&&(i*=2,i>9&&(i-=9)),n+=i,t=!t}return n%10==0}function F(e,n=!0){return!(ie(e)||X(e)&&(e=K(e),(n?$e.test((e||"").replace(/[- ]/g,"")):(function(t){let r;for(Me.lastIndex=0;r=Me.exec(t);){const i=r[2];if(!i)continue;const s=i.replace(/[- ]/g,"");for(let o=0;s.length>o;o++)for(const c of Ze){const _=o+c;if(s.length>=_){const l=s.slice(o,_);if($e.test(l)&&Ye(l))return!0}}}return!1})(e))||(n?Xe.test(e):(function(t){let r;for(Re.lastIndex=0;r=Re.exec(t);){const i=r[1],s=r[3];if(!(i&&s&&Oe.test(i)&&Oe.test(s)))return!0}return!1})(e))))}function Se(e){let n=J(e);return n=`${n} ${Le(e)}`.trim(),F(n)?n:""}function Le(e){let n="";return e&&e.childNodes&&e.childNodes.length&&H(e.childNodes,function(t){var r;if(t&&((r=t.tagName)===null||r===void 0?void 0:r.toLowerCase())==="span")try{const i=J(t);n=`${n} ${i}`.trim(),t.childNodes&&t.childNodes.length&&(n=`${n} ${Le(t)}`.trim())}catch(i){se.error("[AutoCapture]",i)}}),n}function Ae(e){return e.replace(/"|\\"/g,'\\"')}function Be(e){const n=e.attr__class;if(n)return ne(n)?n:le(n)}function he(e,n){return n.length>e?n.slice(0,e)+"...":n}function Je(e){if(e.previousElementSibling)return e.previousElementSibling;let n=e;do n=n.previousSibling;while(n&&!x(n));return n}function Qe(e,{e:n,maskAllElementAttributes:t,maskAllText:r,elementAttributeIgnoreList:i,elementsChainAsString:s,disableCaptureUrlHashes:o}){var c,_;if(!x(e))return{props:{}};const l=[e],m=new Set([e]);let f=e;for(;f.parentNode&&!C(f,"body")&&1e3>l.length;){if(De(f.parentNode)){const v=f.parentNode.host;if(m.has(v))break;m.add(v),l.push(v),f=v;continue}if(!x(f.parentNode)||m.has(f.parentNode))break;m.add(f.parentNode),l.push(f.parentNode),f=f.parentNode}const u=n.type==="click"&&e.namespaceURI==="http://www.w3.org/2000/svg"?l.findIndex(v=>C(v,"button")||C(v,"a")):-1;u>0&&(r=r||l.slice(0,u+1).some(v=>!Q(v)||ue(v)));const w=[],b={};let S,N=!1,k=!1;if(H(l,v=>{const h=Q(v);if(C(v,"a")&&!t&&!i?.includes("href")){const d=v.getAttribute("href");N=!!(h&&d&&F(d))&&(o?ye(d):d)}I(B(v),"ph-no-capture")&&(k=!0),w.push((function(d,y,D,$,A=!1){const R=d.tagName.toLowerCase(),O={tag_name:R};xe.indexOf(R)>-1&&!D&&(O.$el_text=R.toLowerCase()==="a"||R.toLowerCase()==="button"?he(1024,Se(d)):he(1024,J(d)));const q=B(d);y||$!=null&&$.includes("class")||0>=q.length||(O.classes=q.filter(function(j){return j!==""})),H(d.attributes,function(j){var ge;if((!ue(d)||["name","id","class","aria-label"].indexOf(j.name)!==-1)&&!$?.includes(j.name)&&!y&&F(j.value)&&(!X(ge=j.name)||ge.substring(0,10)!=="_ngcontent"&&ge.substring(0,7)!=="_nghost")){let te=j.value;j.name==="class"&&(te=le(te).join(" ")),O["attr__"+j.name]=he(1024,j.name==="href"&&A?ye(te):te)}});let G=1,Ve=1,ve=d;for(;ve=Je(ve);)G++,ve.tagName===d.tagName&&Ve++;return O.nth_child=G,O.nth_of_type=Ve,O})(v,t,r,i,o)),H((function(d){if(!Q(d))return{};const y={};return H(d.attributes,function(D){if(D.name&&D.name.indexOf("data-ph-capture-attribute")===0){const $=D.name.replace("data-ph-capture-attribute-",""),A=D.value;$&&A&&F(A)&&(y[$]=A)}}),y})(v),(d,y)=>{({}).hasOwnProperty.call(b,y)||(b[y]=d)})}),k)return{props:{},explicitNoCapture:k};if(u>0&&(e=l[u],w.splice(0,u)),r||(w[0].$el_text=C(e,"a")||C(e,"button")?Se(e):J(e)),N){var W,fe;w[0].attr__href=N;const v=(W=(d=>{const y=g?.createElement("a");return M(y)?null:(y.href=d,y)})(N))===null||W===void 0?void 0:W.host,h=p==null||(fe=p.location)===null||fe===void 0?void 0:fe.host;v&&h&&v!==h&&(S=N)}return{props:We((He=n.type,{$event_type:He,$ce_version:1}),s?{}:{$elements:w},{$elements_chain:(me=w,ne(me)?(function(v){return v.map(h=>{var d,y;let D="";if(h.tag_name&&(D+=h.tag_name),h.attr_class){h.attr_class.sort();for(const R of h.attr_class)D+=`.${R.replace(/"/g,"")}`}const $=T(T(T(T({},h.text?{text:h.text}:{}),{},{"nth-child":(d=h.nth_child)!==null&&d!==void 0?d:0,"nth-of-type":(y=h.nth_of_type)!==null&&y!==void 0?y:0},h.href?{href:h.href}:{}),h.attr_id?{attr_id:h.attr_id}:{}),h.attributes),A={};return oe($).sort(([R],[O])=>(function(q,G){return G>q?-1:q>G?1:0})(R,O)).forEach(([R,O])=>A[Ae(R.toString())]=Ae(O.toString())),D+=":",D+=oe(A).map(([R,O])=>`${R}="${O}"`).join(""),D}).join(";")})((function(v){return v.map(h=>{var d,y;const D={text:(d=h.$el_text)===null||d===void 0?void 0:d.slice(0,400),tag_name:h.tag_name,href:(y=h.attr__href)===null||y===void 0?void 0:y.slice(0,2048),attr_class:Be(h),attr_id:h.attr__id,nth_child:h.nth_child,nth_of_type:h.nth_of_type,attributes:{}};return oe(h).filter(([$])=>$.indexOf("attr__")===0).forEach(([$,A])=>D.attributes[$]=A),D})})(me)):"")},!((c=w[0])===null||c===void 0)&&c.$el_text?{$el_text:(_=w[0])===null||_===void 0?void 0:_.$el_text}:{},S&&n.type==="click"?{$external_click_url:S}:{},b),target:e};var me,He}Fe("[AutoCapture]");const de={};function je(e,n){const t=ae(e);return t?T({node:t,originalEvent:e,timestamp:Date.now()},n):null}function _e(e){return!!we(()=>x(e))}function et(e,n){return Math.abs(e)<Math.abs(n)?0>n?"up":"down":0>e?"left":"right"}function Pe(e){return e.type==="swipe"?"$dead_swipe":"$dead_click"}const Te="canvas,video,audio,embed,object";function ee(e,n){return L(e)&&e>=n}function Ie(e,n=1e3){return e>=0&&n>e?e:void 0}function pe(e,n,t=1e3){return L(n)?Ie(e-n,t):void 0}var tt=class{dr(e){var n,t,r,i,s,o,c,_;const l=this.hr(e?.__onCapture||this.vr.bind(this));return{element_attribute_ignorelist:(n=e?.element_attribute_ignorelist)!==null&&n!==void 0?n:l.element_attribute_ignorelist,scroll_threshold_ms:(t=e?.scroll_threshold_ms)!==null&&t!==void 0?t:l.scroll_threshold_ms,selection_change_threshold_ms:(r=e?.selection_change_threshold_ms)!==null&&r!==void 0?r:l.selection_change_threshold_ms,mutation_threshold_ms:(i=e?.mutation_threshold_ms)!==null&&i!==void 0?i:l.mutation_threshold_ms,capture_clicks_with_modifier_keys:(s=e?.capture_clicks_with_modifier_keys)!==null&&s!==void 0?s:l.capture_clicks_with_modifier_keys,capture_dead_swipes:(o=e?.capture_dead_swipes)!==null&&o!==void 0?o:l.capture_dead_swipes,swipe_threshold_px:(c=e?.swipe_threshold_px)!==null&&c!==void 0?c:l.swipe_threshold_px,max_dead_swipes_per_page_load:(_=e?.max_dead_swipes_per_page_load)!==null&&_!==void 0?_:l.max_dead_swipes_per_page_load,css_selector_ignorelist:e?.css_selector_ignorelist,__onCapture:l.__onCapture}}constructor(e,n){this.instance=e,this.pr=new WeakSet,this.mr=!1,this.gr=[],this.yr=0,this.hr=t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,capture_dead_swipes:!0,swipe_threshold_px:30,max_dead_swipes_per_page_load:10,__onCapture:t}),this.br=()=>{clearTimeout(this.wr),this.wr=void 0,this.kr=void 0},this._r=t=>{if(this.Sr(t),this.br(),t.button===0){const r={path:t.composedPath(),trusted:t.isTrusted,selectionChanged:!1,selectionInitiallyRelated:!1},i=g?.getSelection();r.selectionInitiallyRelated=i?.type==="Range"&&this.Cr(i,r),this.kr=r}},this.Mr=t=>{Y(t.relatedTarget)&&this.br()},this.Ir=t=>{const r=this.kr,i=t;if(!r||i.button!==0||t.isTrusted!==r.trusted)return;const s=t.composedPath();for(const o of r.path)if(_e(o)&&s.indexOf(o)!==-1){r.clickTarget=o;break}r.clickDetail=i.detail,this.wr=a.setTimeout(this.br,0)},this.Tr=t=>{this.Sr(t);const r=t,i=je(r,{type:"click"}),s=this.kr;i&&s&&r.button===0&&r.detail>0&&r.detail===s.clickDetail&&t.isTrusted===s.trusted&&i.node===s.clickTarget&&(i.selectionChangedDuringGesture=s.selectionChanged&&this.Rr.selection_change_threshold_ms>0,this.br()),Y(i)||this.$r(i)||this.Er(i),this.Ar()},this.Or=()=>{const t=Date.now();this.Lr=t,t%50==0&&this.gr.forEach(r=>{M(r.scrollDelayMs)&&(r.scrollDelayMs=t-r.timestamp)})},this.Pr=t=>{var r,i;const s=g?.getSelection(),o=this.mr;this.mr=s?.type==="Range";const c=s?.focusNode,_=c&&(x(c)?c:c.parentElement),l=g?.activeElement;let m=l;for(;!(m==null||(r=m.shadowRoot)===null||r===void 0)&&r.activeElement;)m=m.shadowRoot.activeElement;const f=U(ae(t))||U(_??null)||U((i=m)!==null&&i!==void 0?i:null),u=s?.type==="Caret"&&m&&!m.shadowRoot&&c&&c!==l&&c.contains(l??null);if(!(o||this.mr||f||u))return;const w=Date.now();this.Dr=w;const b=this.kr;if(b&&(o||this.mr||f)){const N=ae(t);let k;if(U(N))k=N;else if(s?.type==="Caret"){var S;U((S=m)!==null&&S!==void 0?S:null)||u?k=m:f&&(k=_)}const W=k?this.Fr(k,b):s&&(c||s.anchorNode)?this.Cr(s,b):o&&!this.mr&&b.selectionInitiallyRelated;b.selectionChanged=b.selectionChanged||W}this.gr.forEach(N=>{const k=w-N.timestamp;0>k||!M(N.selectionChangedDelayMs)&&k>=N.selectionChangedDelayMs||(N.selectionChangedDelayMs=k)})},this.ln=()=>{g?.visibilityState==="hidden"&&this.br();const t=Date.now();this.Nr=t,this.qr("visibilityChangedDelayMs",t)},this.jr=()=>{const t=Date.now();this.Br=t,this.qr("focusChangedDelayMs",t)},this.Hr=t=>{this.Sr(t);const r=t.touches,i=r?.length===1?r[0]:void 0;this.zr=i?{x:i.clientX,y:i.clientY,timestamp:Date.now()}:void 0},this.Ur=()=>{this.zr=void 0},this.Wr=t=>{var r;const i=this.zr;if(this.zr=void 0,M(i)||this.yr>=this.Rr.max_dead_swipes_per_page_load)return;const s=t,o=(r=s.changedTouches)===null||r===void 0?void 0:r[0];if(!o)return;const c=o.clientX-i.x,_=o.clientY-i.y,l=c*c+_*_,m=this.Rr.swipe_threshold_px;if(m*m>l||[this.Lr,this.Vr,this.Dr].some(b=>L(b)&&b>=i.timestamp))return;var f,u;if(this.Zr()&&((f=g==null||(u=g.elementsFromPoint)===null||u===void 0?void 0:u.call(g,i.x,i.y))!==null&&f!==void 0?f:[]).some(b=>{var S;return(S=b.matches)===null||S===void 0?void 0:S.call(b,Te)}))return;const w=je(s,{type:"swipe",swipeDirection:et(c,_),swipeDistancePx:Math.round(Math.sqrt(l))});Y(w)||this.$r(w)||this.Er(w),this.Ar()},this.Rr=this.dr(n),this._onCapture=this.Rr.__onCapture}start(e){this.Gr(),this.Qr(),this.Jr(),this.Kr(),this.Xr(),this.Yr(e),this.Rr.capture_dead_swipes&&this.eo()}Yr(e){if(!this.no){const n=(function(t){return(function(r,i){const s=de[r];if(s)return s;let o=i[r];if(re(c=o)&&c.toString().indexOf("[native code]")!==-1&&!p?.Zone)return de[r]=o.bind(i);var c;const _=i.document;if(_&&re(_.createElement)){let u,w=!1;try{u=_.createElement("iframe"),u.hidden=!0,_.head.appendChild(u);const b=u.contentWindow;var l,m;b&&b[r]&&(o=b[r],r==="MutationObserver"&&I(f=(l=(m=i.navigator)===null||m===void 0?void 0:m.userAgent)!==null&&l!==void 0?l:"","AppleWebKit")&&!I(f,"Chrome")&&(u.classList.add("rr-block","ph-no-capture"),w=!0))}catch(b){se.warn(`Could not create sandbox iframe for ${r} check, bailing to assignableWindow.${r}: `,b)}finally{!w&&u!=null&&u.parentNode&&u.parentNode.removeChild(u)}}var f;return o&&re(o)?de[r]=o.bind(i):o})("MutationObserver",t)})(a);this.no=new n(t=>{this.io(t)}),this.ro(e)}}ro(e){e&&this.no&&(this.pr.has(e)||(this.no.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.pr.add(e),this.oo(e)))}oo(e,n){var t,r;x(e)&&e.shadowRoot&&this.ro(e.shadowRoot);const i=(t=(r=e.querySelectorAll)===null||r===void 0?void 0:r.call(e,"*"))!==null&&t!==void 0?t:[];for(let s=0;i.length>s;s++)n?.add(i[s]),this.ro(i[s].shadowRoot)}Sr(e){var n,t;const r=(n=(t=e.composedPath)===null||t===void 0?void 0:t.call(e))!==null&&n!==void 0?n:[];for(let i=0;r.length>i;i++){const s=r[i];_e(s)&&this.ro(s.shadowRoot)}}stop(){var e;(e=this.no)===null||e===void 0||e.disconnect(),this.no=void 0,this.pr=new WeakSet,a.removeEventListener("click",this.Tr,{capture:!0}),a.removeEventListener("mousedown",this._r,{capture:!0}),a.removeEventListener("mouseup",this.Ir,{capture:!0}),a.removeEventListener("mouseout",this.Mr,{capture:!0}),a.removeEventListener("dragstart",this.br,{capture:!0}),a.removeEventListener("pointercancel",this.br,{capture:!0}),a.removeEventListener("blur",this.br),this.br(),a.removeEventListener("scroll",this.Or,{capture:!0}),g?.removeEventListener("selectionchange",this.Pr),a.removeEventListener("touchstart",this.Hr,{capture:!0}),a.removeEventListener("touchend",this.Wr,{capture:!0}),a.removeEventListener("touchcancel",this.Ur,{capture:!0}),g?.removeEventListener("visibilitychange",this.ln),a.removeEventListener("blur",this.jr),a.removeEventListener("focus",this.jr),this.zr=void 0}io(e){const n=new Set;for(const r of e)try{var t;if(((t=r.target)===null||t===void 0?void 0:t.isConnected)===!1)continue;this.Vr=Date.now();const i=r.addedNodes;for(let s=0;i.length>s;s++){const o=i[s];_e(o)&&!n.has(o)&&this.oo(o,n)}}catch{}}Gr(){E(a,"click",this.Tr,{capture:!0}),E(a,"mousedown",this._r,{capture:!0}),E(a,"mouseup",this.Ir,{capture:!0}),E(a,"mouseout",this.Mr,{capture:!0}),E(a,"dragstart",this.br,{capture:!0}),E(a,"pointercancel",this.br,{capture:!0}),E(a,"blur",this.br)}Er(e){e.selectionChangedDelayMs=pe(e.timestamp,this.Dr,this.Rr.selection_change_threshold_ms),e.visibilityChangedDelayMs=pe(e.timestamp,this.Nr),e.focusChangedDelayMs=pe(e.timestamp,this.Br),this.gr.push(e)}Ar(){this.gr.length&&M(this.so)&&(this.so=a.setTimeout(()=>{this.ao()},1e3))}Qr(){E(a,"scroll",this.Or,{capture:!0})}Jr(){var e;this.mr=(g==null||(e=g.getSelection())===null||e===void 0?void 0:e.type)==="Range",E(g,"selectionchange",this.Pr)}Fr(e,n){const t=n.path[0];try{for(;e;){if(n.path.indexOf(e)!==-1||x(t)&&t.contains(e))return!0;e=e.getRootNode().host}}catch{}return!1}Cr(e,n){const t=n.path[0],r=e.rangeCount>0?e.getRangeAt(0):void 0,i=!!r&&we(()=>r.startContainer.getRootNode()===t.getRootNode());if(r&&i&&x(t)){var s;if(!r.collapsed)return r.intersectsNode(t);const o=x(r.startContainer)&&(s=r.startContainer.childNodes[r.startOffset])!==null&&s!==void 0?s:r.startContainer;return this.Fr(o,n)}return this.Fr(e.focusNode,n)||this.Fr(e.anchorNode,n)}Kr(){E(g,"visibilitychange",this.ln)}Xr(){E(a,"blur",this.jr),E(a,"focus",this.jr)}qr(e,n){this.gr.forEach(t=>{const r=Ie(n-t.timestamp);L(r)&&(M(t[e])||t[e]>r)&&(t[e]=r)})}eo(){E(a,"touchstart",this.Hr,{capture:!0,passive:!0}),E(a,"touchend",this.Wr,{capture:!0,passive:!0}),E(a,"touchcancel",this.Ur,{capture:!0,passive:!0})}Zr(){const e=M(this.lo)||L(this.Vr)&&this.Vr>this.lo;return(M(this.uo)||e)&&(this.lo=Date.now(),this.uo=!!g?.querySelector(Te)),!!this.uo}$r(e){return!e||(e.type==="swipe"?this.co(e):this.do(e))}co(e){return!((!((n=e.node)instanceof Element)||n.id!=="__POSTHOG_TOOLBAR__"&&!(!((t=n.closest)===null||t===void 0)&&t.call(n,".toolbar-global-fade-container")))&&!this.gr.some(r=>r.type===e.type&&r.node===e.node&&1e3>Math.abs(r.timestamp-e.timestamp))&&!C(e.node,"html")&&x(e.node)&&(function(r,i){var s;if(!p||ce(r))return!1;const o=Z.call(i)==="[object Boolean]"?Ne:(s=i?.css_selector_ignorelist)!==null&&s!==void 0?s:Ne,{targetElementList:c}=ke(r,!1);return!(function(_,l){if(M(l))return!0;for(const m of _)if(l.some(f=>qe(m,f)))return!0;return!1})(c,o)})(e.node,{css_selector_ignorelist:this.Rr.css_selector_ignorelist}));var n,t}do(e){return!(this.Rr.capture_clicks_with_modifier_keys||(n=e.originalEvent,!(n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)))||!!this.co(e)||(function(t){if(!p||ce(t))return!1;const{targetElementList:r}=ke(t,!1);return r.some(i=>C(i,"a"))})(e.node);var n}ao(){if(!this.gr.length)return;clearTimeout(this.so),this.so=void 0;const e=this.gr;this.gr=[];for(const t of e){var n;t.mutationDelayMs=(n=t.mutationDelayMs)!==null&&n!==void 0?n:this.Vr&&this.Vr>=t.timestamp?this.Vr-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp;const r=ee(t.scrollDelayMs,this.Rr.scroll_threshold_ms),i=ee(t.selectionChangedDelayMs,this.Rr.selection_change_threshold_ms),s=ee(t.mutationDelayMs,this.Rr.mutation_threshold_ms),o=ee(t.absoluteDelayMs,1.1*this.Rr.mutation_threshold_ms),c=L(t.scrollDelayMs)&&this.Rr.scroll_threshold_ms>t.scrollDelayMs,_=L(t.mutationDelayMs)&&this.Rr.mutation_threshold_ms>t.mutationDelayMs,l=t.selectionChangedDuringGesture||L(t.selectionChangedDelayMs)&&this.Rr.selection_change_threshold_ms>t.selectionChangedDelayMs,m=L(t.visibilityChangedDelayMs),f=L(t.focusChangedDelayMs);if(!(c||_||l||m||f))if(r||s||o||i){const u=Pe(t);if(u==="$dead_swipe"){if(this.yr>=this.Rr.max_dead_swipes_per_page_load)continue;this.yr++}this._onCapture(t,{[`${u}_last_mutation_timestamp`]:this.Vr,[`${u}_event_timestamp`]:t.timestamp,[`${u}_scroll_timeout`]:r,[`${u}_mutation_timeout`]:s,[`${u}_absolute_timeout`]:o,[`${u}_selection_changed_timeout`]:i,[`${u}_visibility_changed_timeout`]:!1})}else this.Rr.mutation_threshold_ms>t.absoluteDelayMs&&this.gr.push(t)}this.Ar()}vr(e,n){const t=Pe(e);this.instance.capture(t,T(T(T({},n),Qe(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Rr.element_attribute_ignorelist,elementsChainAsString:!1,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}).props),{},{[`${t}_scroll_delay_ms`]:e.scrollDelayMs,[`${t}_mutation_delay_ms`]:e.mutationDelayMs,[`${t}_absolute_delay_ms`]:e.absoluteDelayMs,[`${t}_selection_changed_delay_ms`]:e.selectionChangedDelayMs,[`${t}_visibility_changed_delay_ms`]:e.visibilityChangedDelayMs,[`${t}_focus_changed_delay_ms`]:e.focusChangedDelayMs,$dead_swipe_direction:e.swipeDirection,$dead_swipe_distance_px:e.swipeDistancePx}),{timestamp:new Date(e.timestamp)})}};a.__PosthogExtensions__=a.__PosthogExtensions__||{},a.__PosthogExtensions__.initDeadClicksAutocapture=(e,n)=>new tt(e,n)})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=dead-clicks-autocapture-D3WNuKsf.js.map
|