react-grab 0.0.7 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,68 +1,2705 @@
1
- var ReactGrab=(function(exports){'use strict';/**
2
- * @license MIT
3
- *
4
- * Copyright (c) 2025 Aiden Bai
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
- var me="0.3.29",q=`bippy-${me}`,fe=Object.defineProperty,$e=Object.prototype.hasOwnProperty,$=()=>{},pe=t=>{try{Function.prototype.toString.call(t).indexOf("^_^")>-1&&setTimeout(()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},he=(t=P())=>"getFiberRoots"in t,ge=false,de,V=(t=P())=>ge?true:(typeof t.inject=="function"&&(de=t.inject.toString()),!!de?.includes("(injected)")),G=new Set,j=new Set,ve=t=>{let e=new Map,s=0,m={checkDCE:pe,supportsFiber:true,supportsFlight:true,hasUnsupportedRendererAttached:false,renderers:e,onCommitFiberRoot:$,onCommitFiberUnmount:$,onPostCommitFiberRoot:$,on:$,inject(S){let c=++s;return e.set(c,S),j.add(S),m._instrumentationIsActive||(m._instrumentationIsActive=true,G.forEach(i=>i())),c},_instrumentationSource:q,_instrumentationIsActive:false};try{fe(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{get(){return m},set(i){if(i&&typeof i=="object"){let a=m.renderers;m=i,a.size>0&&(a.forEach((l,r)=>{j.add(l),i.renderers.set(r,l);}),z(t));}},configurable:!0,enumerable:!0});let S=window.hasOwnProperty,c=!1;fe(window,"hasOwnProperty",{value:function(){try{if(!c&&arguments[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,c=!0,-0}catch{}return S.apply(this,arguments)},configurable:!0,writable:!0});}catch{z(t);}return m},z=t=>{try{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e)return;if(!e._instrumentationSource){if(e.checkDCE=pe,e.supportsFiber=!0,e.supportsFlight=!0,e.hasUnsupportedRendererAttached=!1,e._instrumentationSource=q,e._instrumentationIsActive=!1,e.on=$,e.renderers.size){e._instrumentationIsActive=!0,G.forEach(m=>m());return}let s=e.inject;V(e)&&!he()&&(ge=!0,e.inject({scheduleRefresh(){}})&&(e._instrumentationIsActive=!0)),e.inject=m=>{let S=s(m);return j.add(m),e._instrumentationIsActive=!0,G.forEach(c=>c()),S};}(e.renderers.size||e._instrumentationIsActive||V())&&t?.();}catch{}},_e=()=>$e.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),P=t=>_e()?(z(t),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):ve(t),ye=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Ce=()=>{try{ye()&&P();}catch{}},Y=0,K=1;var Q=5;var X=11,J=13;var Z=15,ee=16;var te=19;var ne=26,re=27,oe=28,ie=30;var U=t=>{let e=t;return typeof e=="function"?e:typeof e=="object"&&e?U(e.type||e.render):null},B=t=>{let e=t;if(typeof e=="string")return e;if(typeof e!="function"&&!(typeof e=="object"&&e))return null;let s=e.displayName||e.name||null;if(s)return s;let m=U(e);return m&&(m.displayName||m.name)||null};var se=t=>{let e=P();for(let s of e.renderers.values())try{let m=s.findFiberByHostInstance?.(t);if(m)return m}catch{}if(typeof t=="object"&&t!=null){if("_reactRootContainer"in t)return t._reactRootContainer?._internalRoot?.current?.child;for(let s in t)if(s.startsWith("__reactContainer$")||s.startsWith("__reactInternalInstance$")||s.startsWith("__reactFiber"))return t[s]||null}return null};Ce();var Xe=Object.create,Se=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,be=Object.getOwnPropertyNames,Ze=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty,k=(t,e)=>function(){return e||(0, t[be(t)[0]])((e={exports:{}}).exports,e),e.exports},tt=(t,e,s,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(var S=be(e),c=0,i=S.length,a;c<i;c++)a=S[c],!et.call(t,a)&&a!==s&&Se(t,a,{get:(l=>e[l]).bind(null,a),enumerable:!(m=Je(e,a))||m.enumerable});return t},nt=(t,e,s)=>(s=t!=null?Xe(Ze(t)):{},tt(Se(s,"default",{value:t,enumerable:true}),t)),Ee=/^\s*at .*(\S+:\d+|\(native\))/m,rt=/^(eval@)?(\[native code\])?$/;function ot(t,e){return t.match(Ee)?it(t,e):st(t,e)}function we(t){if(!t.includes(":"))return [t,undefined,undefined];let s=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return [s[1],s[2]||undefined,s[3]||undefined]}function Te(t,e){return e&&e.slice!=null?Array.isArray(e.slice)?t.slice(e.slice[0],e.slice[1]):t.slice(0,e.slice):t}function it(t,e){return Te(t.split(`
10
- `).filter(m=>!!m.match(Ee)),e).map(m=>{m.includes("(eval ")&&(m=m.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let S=m.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),c=S.match(/ (\(.+\)$)/);S=c?S.replace(c[0],""):S;let i=we(c?c[1]:S),a=c&&S||undefined,l=["eval","<anonymous>"].includes(i[0])?undefined:i[0];return {function:a,file:l,line:i[1]?+i[1]:undefined,col:i[2]?+i[2]:undefined,raw:m}})}function st(t,e){return Te(t.split(`
11
- `).filter(m=>!m.match(rt)),e).map(m=>{if(m.includes(" > eval")&&(m=m.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!m.includes("@")&&!m.includes(":"))return {function:m};{let S=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,c=m.match(S),i=c&&c[1]?c[1]:undefined,a=we(m.replace(S,""));return {function:i,file:a[0],line:a[1]?+a[1]:undefined,col:a[2]?+a[2]:undefined,raw:m}}})}var at=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js"(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(s){if(0<=s&&s<e.length)return e[s];throw new TypeError("Must be between 0 and 63: "+s)},t.decode=function(s){var m=65,S=90,c=97,i=122,a=48,l=57,r=43,C=47,y=26,h=52;return m<=s&&s<=S?s-m:c<=s&&s<=i?s-c+y:a<=s&&s<=l?s-a+h:s==r?62:s==C?63:-1};}}),Le=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js"(t){var e=at(),s=5,m=1<<s,S=m-1,c=m;function i(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var r=(l&1)===1,C=l>>1;return r?-C:C}t.encode=function(r){var C="",y,h=i(r);do y=h&S,h>>>=s,h>0&&(y|=c),C+=e.encode(y);while(h>0);return C},t.decode=function(r,C,y){var h=r.length,n=0,u=0,d,o;do{if(C>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(o=e.decode(r.charCodeAt(C++)),o===-1)throw new Error("Invalid base64 digit: "+r.charAt(C-1));d=!!(o&c),o&=S,n=n+(o<<u),u+=s;}while(d);y.value=a(n),y.rest=C;};}}),H=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js"(t){function e(p,g,E){if(g in p)return p[g];if(arguments.length===3)return E;throw new Error('"'+g+'" is a required argument.')}t.getArg=e;var s=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,m=/^data:.+\,.+$/;function S(p){var g=p.match(s);return g?{scheme:g[1],auth:g[2],host:g[3],port:g[4],path:g[5]}:null}t.urlParse=S;function c(p){var g="";return p.scheme&&(g+=p.scheme+":"),g+="//",p.auth&&(g+=p.auth+"@"),p.host&&(g+=p.host),p.port&&(g+=":"+p.port),p.path&&(g+=p.path),g}t.urlGenerate=c;var i=32;function a(p){var g=[];return function(E){for(var _=0;_<g.length;_++)if(g[_].input===E){var A=g[0];return g[0]=g[_],g[_]=A,g[0].result}var w=p(E);return g.unshift({input:E,result:w}),g.length>i&&g.pop(),w}}var l=a(function(g){var E=g,_=S(g);if(_){if(!_.path)return g;E=_.path;}for(var A=t.isAbsolute(E),w=[],M=0,F=0;;)if(M=F,F=E.indexOf("/",M),F===-1){w.push(E.slice(M));break}else for(w.push(E.slice(M,F));F<E.length&&E[F]==="/";)F++;for(var N,I=0,F=w.length-1;F>=0;F--)N=w[F],N==="."?w.splice(F,1):N===".."?I++:I>0&&(N===""?(w.splice(F+1,I),I=0):(w.splice(F,2),I--));return E=w.join("/"),E===""&&(E=A?"/":"."),_?(_.path=E,c(_)):E});t.normalize=l;function r(p,g){p===""&&(p="."),g===""&&(g=".");var E=S(g),_=S(p);if(_&&(p=_.path||"/"),E&&!E.scheme)return _&&(E.scheme=_.scheme),c(E);if(E||g.match(m))return g;if(_&&!_.host&&!_.path)return _.host=g,c(_);var A=g.charAt(0)==="/"?g:l(p.replace(/\/+$/,"")+"/"+g);return _?(_.path=A,c(_)):A}t.join=r,t.isAbsolute=function(p){return p.charAt(0)==="/"||s.test(p)};function C(p,g){p===""&&(p="."),p=p.replace(/\/$/,"");for(var E=0;g.indexOf(p+"/")!==0;){var _=p.lastIndexOf("/");if(_<0||(p=p.slice(0,_),p.match(/^([^\/]+:\/)?\/*$/)))return g;++E;}return Array(E+1).join("../")+g.substr(p.length+1)}t.relative=C;var y=function(){var p=Object.create(null);return !("__proto__"in p)}();function h(p){return p}function n(p){return d(p)?"$"+p:p}t.toSetString=y?h:n;function u(p){return d(p)?p.slice(1):p}t.fromSetString=y?h:u;function d(p){if(!p)return false;var g=p.length;if(g<9||p.charCodeAt(g-1)!==95||p.charCodeAt(g-2)!==95||p.charCodeAt(g-3)!==111||p.charCodeAt(g-4)!==116||p.charCodeAt(g-5)!==111||p.charCodeAt(g-6)!==114||p.charCodeAt(g-7)!==112||p.charCodeAt(g-8)!==95||p.charCodeAt(g-9)!==95)return false;for(var E=g-10;E>=0;E--)if(p.charCodeAt(E)!==36)return false;return true}function o(p,g,E){var _=T(p.source,g.source);return _!==0||(_=p.originalLine-g.originalLine,_!==0)||(_=p.originalColumn-g.originalColumn,_!==0||E)||(_=p.generatedColumn-g.generatedColumn,_!==0)||(_=p.generatedLine-g.generatedLine,_!==0)?_:T(p.name,g.name)}t.compareByOriginalPositions=o;function f(p,g,E){var _;return _=p.originalLine-g.originalLine,_!==0||(_=p.originalColumn-g.originalColumn,_!==0||E)||(_=p.generatedColumn-g.generatedColumn,_!==0)||(_=p.generatedLine-g.generatedLine,_!==0)?_:T(p.name,g.name)}t.compareByOriginalPositionsNoSource=f;function v(p,g,E){var _=p.generatedLine-g.generatedLine;return _!==0||(_=p.generatedColumn-g.generatedColumn,_!==0||E)||(_=T(p.source,g.source),_!==0)||(_=p.originalLine-g.originalLine,_!==0)||(_=p.originalColumn-g.originalColumn,_!==0)?_:T(p.name,g.name)}t.compareByGeneratedPositionsDeflated=v;function b(p,g,E){var _=p.generatedColumn-g.generatedColumn;return _!==0||E||(_=T(p.source,g.source),_!==0)||(_=p.originalLine-g.originalLine,_!==0)||(_=p.originalColumn-g.originalColumn,_!==0)?_:T(p.name,g.name)}t.compareByGeneratedPositionsDeflatedNoLine=b;function T(p,g){return p===g?0:p===null?1:g===null?-1:p>g?1:-1}function L(p,g){var E=p.generatedLine-g.generatedLine;return E!==0||(E=p.generatedColumn-g.generatedColumn,E!==0)||(E=T(p.source,g.source),E!==0)||(E=p.originalLine-g.originalLine,E!==0)||(E=p.originalColumn-g.originalColumn,E!==0)?E:T(p.name,g.name)}t.compareByGeneratedPositionsInflated=L;function O(p){return JSON.parse(p.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=O;function R(p,g,E){if(g=g||"",p&&(p[p.length-1]!=="/"&&g[0]!=="/"&&(p+="/"),g=p+g),E){var _=S(E);if(!_)throw new Error("sourceMapURL could not be parsed");if(_.path){var A=_.path.lastIndexOf("/");A>=0&&(_.path=_.path.substring(0,A+1));}g=r(c(_),g);}return l(g)}t.computeSourceURL=R;}}),Oe=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js"(t){var e=H(),s=Object.prototype.hasOwnProperty,m=typeof Map<"u";function S(){this._array=[],this._set=m?new Map:Object.create(null);}S.fromArray=function(i,a){for(var l=new S,r=0,C=i.length;r<C;r++)l.add(i[r],a);return l},S.prototype.size=function(){return m?this._set.size:Object.getOwnPropertyNames(this._set).length},S.prototype.add=function(i,a){var l=m?i:e.toSetString(i),r=m?this.has(i):s.call(this._set,l),C=this._array.length;(!r||a)&&this._array.push(i),r||(m?this._set.set(i,C):this._set[l]=C);},S.prototype.has=function(i){if(m)return this._set.has(i);var a=e.toSetString(i);return s.call(this._set,a)},S.prototype.indexOf=function(i){if(m){var a=this._set.get(i);if(a>=0)return a}else {var l=e.toSetString(i);if(s.call(this._set,l))return this._set[l]}throw new Error('"'+i+'" is not in the set.')},S.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},S.prototype.toArray=function(){return this._array.slice()},t.ArraySet=S;}}),lt=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js"(t){var e=H();function s(S,c){var i=S.generatedLine,a=c.generatedLine,l=S.generatedColumn,r=c.generatedColumn;return a>i||a==i&&r>=l||e.compareByGeneratedPositionsInflated(S,c)<=0}function m(){this._array=[],this._sorted=true,this._last={generatedLine:-1,generatedColumn:0};}m.prototype.unsortedForEach=function(c,i){this._array.forEach(c,i);},m.prototype.add=function(c){s(this._last,c)?(this._last=c,this._array.push(c)):(this._sorted=false,this._array.push(c));},m.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=true),this._array},t.MappingList=m;}}),Re=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js"(t){var e=Le(),s=H(),m=Oe().ArraySet,S=lt().MappingList;function c(i){i||(i={}),this._file=s.getArg(i,"file",null),this._sourceRoot=s.getArg(i,"sourceRoot",null),this._skipValidation=s.getArg(i,"skipValidation",false),this._ignoreInvalidMapping=s.getArg(i,"ignoreInvalidMapping",false),this._sources=new m,this._names=new m,this._mappings=new S,this._sourcesContents=null;}c.prototype._version=3,c.fromSourceMap=function(a,l){var r=a.sourceRoot,C=new c(Object.assign(l||{},{file:a.file,sourceRoot:r}));return a.eachMapping(function(y){var h={generated:{line:y.generatedLine,column:y.generatedColumn}};y.source!=null&&(h.source=y.source,r!=null&&(h.source=s.relative(r,h.source)),h.original={line:y.originalLine,column:y.originalColumn},y.name!=null&&(h.name=y.name)),C.addMapping(h);}),a.sources.forEach(function(y){var h=y;r!==null&&(h=s.relative(r,y)),C._sources.has(h)||C._sources.add(h);var n=a.sourceContentFor(y);n!=null&&C.setSourceContent(y,n);}),C},c.prototype.addMapping=function(a){var l=s.getArg(a,"generated"),r=s.getArg(a,"original",null),C=s.getArg(a,"source",null),y=s.getArg(a,"name",null);!this._skipValidation&&this._validateMapping(l,r,C,y)===false||(C!=null&&(C=String(C),this._sources.has(C)||this._sources.add(C)),y!=null&&(y=String(y),this._names.has(y)||this._names.add(y)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:C,name:y}));},c.prototype.setSourceContent=function(a,l){var r=a;this._sourceRoot!=null&&(r=s.relative(this._sourceRoot,r)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=l):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null));},c.prototype.applySourceMap=function(a,l,r){var C=l;if(l==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);C=a.file;}var y=this._sourceRoot;y!=null&&(C=s.relative(y,C));var h=new m,n=new m;this._mappings.unsortedForEach(function(u){if(u.source===C&&u.originalLine!=null){var d=a.originalPositionFor({line:u.originalLine,column:u.originalColumn});d.source!=null&&(u.source=d.source,r!=null&&(u.source=s.join(r,u.source)),y!=null&&(u.source=s.relative(y,u.source)),u.originalLine=d.line,u.originalColumn=d.column,d.name!=null&&(u.name=d.name));}var o=u.source;o!=null&&!h.has(o)&&h.add(o);var f=u.name;f!=null&&!n.has(f)&&n.add(f);},this),this._sources=h,this._names=n,a.sources.forEach(function(u){var d=a.sourceContentFor(u);d!=null&&(r!=null&&(u=s.join(r,u)),y!=null&&(u=s.relative(y,u)),this.setSourceContent(u,d));},this);},c.prototype._validateMapping=function(a,l,r,C){if(l&&typeof l.line!="number"&&typeof l.column!="number"){var y="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(y),false;throw new Error(y)}if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!l&&!r&&!C)){if(a&&"line"in a&&"column"in a&&l&&"line"in l&&"column"in l&&a.line>0&&a.column>=0&&l.line>0&&l.column>=0&&r)return;var y="Invalid mapping: "+JSON.stringify({generated:a,source:r,original:l,name:C});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(y),false;throw new Error(y)}},c.prototype._serializeMappings=function(){for(var a=0,l=1,r=0,C=0,y=0,h=0,n="",u,d,o,f,v=this._mappings.toArray(),b=0,T=v.length;b<T;b++){if(d=v[b],u="",d.generatedLine!==l)for(a=0;d.generatedLine!==l;)u+=";",l++;else if(b>0){if(!s.compareByGeneratedPositionsInflated(d,v[b-1]))continue;u+=",";}u+=e.encode(d.generatedColumn-a),a=d.generatedColumn,d.source!=null&&(f=this._sources.indexOf(d.source),u+=e.encode(f-h),h=f,u+=e.encode(d.originalLine-1-C),C=d.originalLine-1,u+=e.encode(d.originalColumn-r),r=d.originalColumn,d.name!=null&&(o=this._names.indexOf(d.name),u+=e.encode(o-y),y=o)),n+=u;}return n},c.prototype._generateSourcesContent=function(a,l){return a.map(function(r){if(!this._sourcesContents)return null;l!=null&&(r=s.relative(l,r));var C=s.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,C)?this._sourcesContents[C]:null},this)},c.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},c.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=c;}}),ut=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js"(t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2;function e(s,m,S,c,i,a){var l=Math.floor((m-s)/2)+s,r=i(S,c[l],true);return r===0?l:r>0?m-l>1?e(l,m,S,c,i,a):a==t.LEAST_UPPER_BOUND?m<c.length?m:-1:l:l-s>1?e(s,l,S,c,i,a):a==t.LEAST_UPPER_BOUND?l:s<0?-1:s}t.search=function(m,S,c,i){if(S.length===0)return -1;var a=e(-1,S.length,m,S,c,i||t.GREATEST_LOWER_BOUND);if(a<0)return -1;for(;a-1>=0&&c(S[a],S[a-1],true)===0;)--a;return a};}}),ct=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js"(t){function e(S){function c(l,r,C){var y=l[r];l[r]=l[C],l[C]=y;}function i(l,r){return Math.round(l+Math.random()*(r-l))}function a(l,r,C,y){if(C<y){var h=i(C,y),n=C-1;c(l,h,y);for(var u=l[y],d=C;d<y;d++)r(l[d],u,false)<=0&&(n+=1,c(l,n,d));c(l,n+1,d);var o=n+1;a(l,r,C,o-1),a(l,r,o+1,y);}}return a}function s(S){let c=e.toString();return new Function(`return ${c}`)()(S)}let m=new WeakMap;t.quickSort=function(S,c,i=0){let a=m.get(c);a===undefined&&(a=s(c),m.set(c,a)),a(S,c,i,S.length-1);};}}),ft=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js"(t){var e=H(),s=ut(),m=Oe().ArraySet,S=Le(),c=ct().quickSort;function i(h,n){var u=h;return typeof h=="string"&&(u=e.parseSourceMapInput(h)),u.sections!=null?new y(u,n):new a(u,n)}i.fromSourceMap=function(h,n){return a.fromSourceMap(h,n)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(n,u){var d=n.charAt(u);return d===";"||d===","},i.prototype._parseMappings=function(n,u){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(n,u,d){var o=u||null,f=d||i.GENERATED_ORDER,v;switch(f){case i.GENERATED_ORDER:v=this._generatedMappings;break;case i.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var b=this.sourceRoot,T=n.bind(o),L=this._names,O=this._sources,R=this._sourceMapURL,p=0,g=v.length;p<g;p++){var E=v[p],_=E.source===null?null:O.at(E.source);_!==null&&(_=e.computeSourceURL(b,_,R)),T({source:_,generatedLine:E.generatedLine,generatedColumn:E.generatedColumn,originalLine:E.originalLine,originalColumn:E.originalColumn,name:E.name===null?null:L.at(E.name)});}},i.prototype.allGeneratedPositionsFor=function(n){var u=e.getArg(n,"line"),d={source:e.getArg(n,"source"),originalLine:u,originalColumn:e.getArg(n,"column",0)};if(d.source=this._findSourceIndex(d.source),d.source<0)return [];var o=[],f=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(f>=0){var v=this._originalMappings[f];if(n.column===undefined)for(var b=v.originalLine;v&&v.originalLine===b;)o.push({line:e.getArg(v,"generatedLine",null),column:e.getArg(v,"generatedColumn",null),lastColumn:e.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++f];else for(var T=v.originalColumn;v&&v.originalLine===u&&v.originalColumn==T;)o.push({line:e.getArg(v,"generatedLine",null),column:e.getArg(v,"generatedColumn",null),lastColumn:e.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++f];}return o},t.SourceMapConsumer=i;function a(h,n){var u=h;typeof h=="string"&&(u=e.parseSourceMapInput(h));var d=e.getArg(u,"version"),o=e.getArg(u,"sources"),f=e.getArg(u,"names",[]),v=e.getArg(u,"sourceRoot",null),b=e.getArg(u,"sourcesContent",null),T=e.getArg(u,"mappings"),L=e.getArg(u,"file",null);if(d!=this._version)throw new Error("Unsupported version: "+d);v&&(v=e.normalize(v)),o=o.map(String).map(e.normalize).map(function(O){return v&&e.isAbsolute(v)&&e.isAbsolute(O)?e.relative(v,O):O}),this._names=m.fromArray(f.map(String),true),this._sources=m.fromArray(o,true),this._absoluteSources=this._sources.toArray().map(function(O){return e.computeSourceURL(v,O,n)}),this.sourceRoot=v,this.sourcesContent=b,this._mappings=T,this._sourceMapURL=n,this.file=L;}a.prototype=Object.create(i.prototype),a.prototype.consumer=i,a.prototype._findSourceIndex=function(h){var n=h;if(this.sourceRoot!=null&&(n=e.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var u;for(u=0;u<this._absoluteSources.length;++u)if(this._absoluteSources[u]==h)return u;return -1},a.fromSourceMap=function(n,u){var d=Object.create(a.prototype),o=d._names=m.fromArray(n._names.toArray(),true),f=d._sources=m.fromArray(n._sources.toArray(),true);d.sourceRoot=n._sourceRoot,d.sourcesContent=n._generateSourcesContent(d._sources.toArray(),d.sourceRoot),d.file=n._file,d._sourceMapURL=u,d._absoluteSources=d._sources.toArray().map(function(g){return e.computeSourceURL(d.sourceRoot,g,u)});for(var v=n._mappings.toArray().slice(),b=d.__generatedMappings=[],T=d.__originalMappings=[],L=0,O=v.length;L<O;L++){var R=v[L],p=new l;p.generatedLine=R.generatedLine,p.generatedColumn=R.generatedColumn,R.source&&(p.source=f.indexOf(R.source),p.originalLine=R.originalLine,p.originalColumn=R.originalColumn,R.name&&(p.name=o.indexOf(R.name)),T.push(p)),b.push(p);}return c(d.__originalMappings,e.compareByOriginalPositions),d},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null;}let r=e.compareByGeneratedPositionsDeflatedNoLine;function C(h,n){let u=h.length,d=h.length-n;if(!(d<=1))if(d==2){let o=h[n],f=h[n+1];r(o,f)>0&&(h[n]=f,h[n+1]=o);}else if(d<20)for(let o=n;o<u;o++)for(let f=o;f>n;f--){let v=h[f-1],b=h[f];if(r(v,b)<=0)break;h[f-1]=b,h[f]=v;}else c(h,r,n);}a.prototype._parseMappings=function(n,u){var d=1,o=0,f=0,v=0,b=0,T=0,L=n.length,O=0,p={},g=[],E=[],_,w,M,F;let N=0;for(;O<L;)if(n.charAt(O)===";")d++,O++,o=0,C(E,N),N=E.length;else if(n.charAt(O)===",")O++;else {for(_=new l,_.generatedLine=d,M=O;M<L&&!this._charIsMappingSeparator(n,M);M++);for(n.slice(O,M),w=[];O<M;)S.decode(n,O,p),F=p.value,O=p.rest,w.push(F);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");if(_.generatedColumn=o+w[0],o=_.generatedColumn,w.length>1&&(_.source=b+w[1],b+=w[1],_.originalLine=f+w[2],f=_.originalLine,_.originalLine+=1,_.originalColumn=v+w[3],v=_.originalColumn,w.length>4&&(_.name=T+w[4],T+=w[4])),E.push(_),typeof _.originalLine=="number"){let x=_.source;for(;g.length<=x;)g.push(null);g[x]===null&&(g[x]=[]),g[x].push(_);}}C(E,N),this.__generatedMappings=E;for(var I=0;I<g.length;I++)g[I]!=null&&c(g[I],e.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g);},a.prototype._findMapping=function(n,u,d,o,f,v){if(n[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[d]);if(n[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[o]);return s.search(n,u,f,v)},a.prototype.computeColumnSpans=function(){for(var n=0;n<this._generatedMappings.length;++n){var u=this._generatedMappings[n];if(n+1<this._generatedMappings.length){var d=this._generatedMappings[n+1];if(u.generatedLine===d.generatedLine){u.lastGeneratedColumn=d.generatedColumn-1;continue}}u.lastGeneratedColumn=1/0;}},a.prototype.originalPositionFor=function(n){var u={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},d=this._findMapping(u,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(d>=0){var o=this._generatedMappings[d];if(o.generatedLine===u.generatedLine){var f=e.getArg(o,"source",null);f!==null&&(f=this._sources.at(f),f=e.computeSourceURL(this.sourceRoot,f,this._sourceMapURL));var v=e.getArg(o,"name",null);return v!==null&&(v=this._names.at(v)),{source:f,line:e.getArg(o,"originalLine",null),column:e.getArg(o,"originalColumn",null),name:v}}}return {source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):false},a.prototype.sourceContentFor=function(n,u){if(!this.sourcesContent)return null;var d=this._findSourceIndex(n);if(d>=0)return this.sourcesContent[d];var o=n;this.sourceRoot!=null&&(o=e.relative(this.sourceRoot,o));var f;if(this.sourceRoot!=null&&(f=e.urlParse(this.sourceRoot))){var v=o.replace(/^file:\/\//,"");if(f.scheme=="file"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!f.path||f.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(u)return null;throw new Error('"'+o+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(n){var u=e.getArg(n,"source");if(u=this._findSourceIndex(u),u<0)return {line:null,column:null,lastColumn:null};var d={source:u,originalLine:e.getArg(n,"line"),originalColumn:e.getArg(n,"column")},o=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(o>=0){var f=this._originalMappings[o];if(f.source===d.source)return {line:e.getArg(f,"generatedLine",null),column:e.getArg(f,"generatedColumn",null),lastColumn:e.getArg(f,"lastGeneratedColumn",null)}}return {line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=a;function y(h,n){var u=h;typeof h=="string"&&(u=e.parseSourceMapInput(h));var d=e.getArg(u,"version"),o=e.getArg(u,"sections");if(d!=this._version)throw new Error("Unsupported version: "+d);this._sources=new m,this._names=new m;var f={line:-1,column:0};this._sections=o.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var b=e.getArg(v,"offset"),T=e.getArg(b,"line"),L=e.getArg(b,"column");if(T<f.line||T===f.line&&L<f.column)throw new Error("Section offsets must be ordered and non-overlapping.");return f=b,{generatedOffset:{generatedLine:T+1,generatedColumn:L+1},consumer:new i(e.getArg(v,"map"),n)}});}y.prototype=Object.create(i.prototype),y.prototype.constructor=i,y.prototype._version=3,Object.defineProperty(y.prototype,"sources",{get:function(){for(var h=[],n=0;n<this._sections.length;n++)for(var u=0;u<this._sections[n].consumer.sources.length;u++)h.push(this._sections[n].consumer.sources[u]);return h}}),y.prototype.originalPositionFor=function(n){var u={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},d=s.search(u,this._sections,function(f,v){var b=f.generatedLine-v.generatedOffset.generatedLine;return b||f.generatedColumn-v.generatedOffset.generatedColumn}),o=this._sections[d];return o?o.consumer.originalPositionFor({line:u.generatedLine-(o.generatedOffset.generatedLine-1),column:u.generatedColumn-(o.generatedOffset.generatedLine===u.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}},y.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})},y.prototype.sourceContentFor=function(n,u){for(var d=0;d<this._sections.length;d++){var o=this._sections[d],f=o.consumer.sourceContentFor(n,true);if(f||f==="")return f}if(u)return null;throw new Error('"'+n+'" is not in the SourceMap.')},y.prototype.generatedPositionFor=function(n){for(var u=0;u<this._sections.length;u++){var d=this._sections[u];if(d.consumer._findSourceIndex(e.getArg(n,"source"))!==-1){var o=d.consumer.generatedPositionFor(n);if(o){var f={line:o.line+(d.generatedOffset.generatedLine-1),column:o.column+(d.generatedOffset.generatedLine===o.line?d.generatedOffset.generatedColumn-1:0)};return f}}}return {line:null,column:null}},y.prototype._parseMappings=function(n,u){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var o=this._sections[d],f=o.consumer._generatedMappings,v=0;v<f.length;v++){var b=f[v],T=o.consumer._sources.at(b.source);T!==null&&(T=e.computeSourceURL(o.consumer.sourceRoot,T,this._sourceMapURL)),this._sources.add(T),T=this._sources.indexOf(T);var L=null;b.name&&(L=o.consumer._names.at(b.name),this._names.add(L),L=this._names.indexOf(L));var O={source:T,generatedLine:b.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(o.generatedOffset.generatedLine===b.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:L};this.__generatedMappings.push(O),typeof O.originalLine=="number"&&this.__originalMappings.push(O);}c(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),c(this.__originalMappings,e.compareByOriginalPositions);},t.IndexedSourceMapConsumer=y;}}),dt=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js"(t){var e=Re().SourceMapGenerator,s=H(),m=/(\r?\n)/,S=10,c="$$$isSourceNode$$$";function i(a,l,r,C,y){this.children=[],this.sourceContents={},this.line=a??null,this.column=l??null,this.source=r??null,this.name=y??null,this[c]=true,C!=null&&this.add(C);}i.fromStringWithSourceMap=function(l,r,C){var y=new i,h=l.split(m),n=0,u=function(){var b=L(),T=L()||"";return b+T;function L(){return n<h.length?h[n++]:undefined}},d=1,o=0,f=null;return r.eachMapping(function(b){if(f!==null)if(d<b.generatedLine)v(f,u()),d++,o=0;else {var T=h[n]||"",L=T.substr(0,b.generatedColumn-o);h[n]=T.substr(b.generatedColumn-o),o=b.generatedColumn,v(f,L),f=b;return}for(;d<b.generatedLine;)y.add(u()),d++;if(o<b.generatedColumn){var T=h[n]||"";y.add(T.substr(0,b.generatedColumn)),h[n]=T.substr(b.generatedColumn),o=b.generatedColumn;}f=b;},this),n<h.length&&(f&&v(f,u()),y.add(h.splice(n).join(""))),r.sources.forEach(function(b){var T=r.sourceContentFor(b);T!=null&&(C!=null&&(b=s.join(C,b)),y.setSourceContent(b,T));}),y;function v(b,T){if(b===null||b.source===undefined)y.add(T);else {var L=C?s.join(C,b.source):b.source;y.add(new i(b.originalLine,b.originalColumn,L,T,b.name));}}},i.prototype.add=function(l){if(Array.isArray(l))l.forEach(function(r){this.add(r);},this);else if(l[c]||typeof l=="string")l&&this.children.push(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},i.prototype.prepend=function(l){if(Array.isArray(l))for(var r=l.length-1;r>=0;r--)this.prepend(l[r]);else if(l[c]||typeof l=="string")this.children.unshift(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},i.prototype.walk=function(l){for(var r,C=0,y=this.children.length;C<y;C++)r=this.children[C],r[c]?r.walk(l):r!==""&&l(r,{source:this.source,line:this.line,column:this.column,name:this.name});},i.prototype.join=function(l){var r,C,y=this.children.length;if(y>0){for(r=[],C=0;C<y-1;C++)r.push(this.children[C]),r.push(l);r.push(this.children[C]),this.children=r;}return this},i.prototype.replaceRight=function(l,r){var C=this.children[this.children.length-1];return C[c]?C.replaceRight(l,r):typeof C=="string"?this.children[this.children.length-1]=C.replace(l,r):this.children.push("".replace(l,r)),this},i.prototype.setSourceContent=function(l,r){this.sourceContents[s.toSetString(l)]=r;},i.prototype.walkSourceContents=function(l){for(var r=0,C=this.children.length;r<C;r++)this.children[r][c]&&this.children[r].walkSourceContents(l);for(var y=Object.keys(this.sourceContents),r=0,C=y.length;r<C;r++)l(s.fromSetString(y[r]),this.sourceContents[y[r]]);},i.prototype.toString=function(){var l="";return this.walk(function(r){l+=r;}),l},i.prototype.toStringWithSourceMap=function(l){var r={code:"",line:1,column:0},C=new e(l),y=false,h=null,n=null,u=null,d=null;return this.walk(function(o,f){r.code+=o,f.source!==null&&f.line!==null&&f.column!==null?((h!==f.source||n!==f.line||u!==f.column||d!==f.name)&&C.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),h=f.source,n=f.line,u=f.column,d=f.name,y=true):y&&(C.addMapping({generated:{line:r.line,column:r.column}}),h=null,y=false);for(var v=0,b=o.length;v<b;v++)o.charCodeAt(v)===S?(r.line++,r.column=0,v+1===b?(h=null,y=false):y&&C.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++;}),this.walkSourceContents(function(o,f){C.setSourceContent(o,f);}),{code:r.code,map:C}},t.SourceNode=i;}}),mt=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.js"(t){t.SourceMapGenerator=Re().SourceMapGenerator,t.SourceMapConsumer=ft().SourceMapConsumer,t.SourceNode=dt().SourceNode;}}),pt=nt(mt()),ae=false,D=t=>`
12
- in ${t}`,ht=/^data:application\/json[^,]+base64,/,gt=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Me=async(t,e)=>{let s=e.split(`
13
- `),m;for(let i=s.length-1;i>=0&&!m;i--){let a=s[i].match(gt);a&&(m=a[1]);}if(!m)return null;if(!(ht.test(m)||m.startsWith("/"))){let i=t.split("/");i[i.length-1]=m,m=i.join("/");}let c=await(await fetch(m)).json();return new pt.SourceMapConsumer(c)},Fe=async(t,e)=>{let s=ot(t);if(!s.length)return [];let m=s.slice(0,e);return (await Promise.all(m.map(async({file:c,line:i,col:a=0})=>{if(!c||!i)return null;try{let l=await fetch(c);if(l.ok){let r=await l.text(),C=await Me(c,r);if(C){let y=C.originalPositionFor({line:i,column:a}),h=C.file||y.source;if(h&&!h.startsWith("/")&&!h.startsWith("file://")&&!h.startsWith("http")){let n=c.split("/");n[n.length-1]=h,h=n.join("/");}return {fileName:h.replace(/^file:\/\//,""),lineNumber:y.line,columnNumber:y.column}}}return {fileName:c.replace(/^file:\/\//,""),lineNumber:i,columnNumber:a}}catch{return {fileName:c.replace(/^file:\/\//,""),lineNumber:i,columnNumber:a}}}))).filter(c=>c!==null)},W=(t,e)=>{if(!t||ae)return "";let s=Error.prepareStackTrace;Error.prepareStackTrace=undefined,ae=true;let m=Ae();le(null);let S=console.error,c=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let h;try{if(e){let n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[]);}catch(u){h=u;}Reflect.construct(t,[],n);}else {try{n.call();}catch(u){h=u;}t.call(n.prototype);}}else {try{throw Error()}catch(u){h=u;}let n=t();n&&typeof n.catch=="function"&&n.catch(()=>{});}}catch(n){if(n&&h&&typeof n.stack=="string")return [n.stack,h.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[C,y]=l.DetermineComponentFrameRoot();if(C&&y){let h=C.split(`
14
- `),n=y.split(`
15
- `),u=0,d=0;for(;u<h.length&&!h[u].includes("DetermineComponentFrameRoot");)u++;for(;d<n.length&&!n[d].includes("DetermineComponentFrameRoot");)d++;if(u===h.length||d===n.length)for(u=h.length-1,d=n.length-1;u>=1&&d>=0&&h[u]!==n[d];)d--;for(;u>=1&&d>=0;u--,d--)if(h[u]!==n[d]){if(u!==1||d!==1)do if(u--,d--,d<0||h[u]!==n[d]){let o=`
16
- ${h[u].replace(" at new "," at ")}`,f=B(t);return f&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",f)),o}while(u>=1&&d>=0);break}}}finally{ae=false,Error.prepareStackTrace=s,le(m),console.error=S,console.warn=c;}let i=t?B(t):"";return i?D(i):""},Ae=()=>{let t=P();for(let e of [...Array.from(j),...Array.from(t.renderers.values())]){let s=e.currentDispatcherRef;if(s&&typeof s=="object")return "H"in s?s.H:s.current}return null},le=t=>{for(let e of j){let s=e.currentDispatcherRef;s&&typeof s=="object"&&("H"in s?s.H=t:s.current=t);}};var Ne=(t,e)=>{switch(t.tag){case ne:case re:case Q:return D(t.type);case ee:return D("Lazy");case J:return t.child!==e&&e!==null?D("Suspense Fallback"):D("Suspense");case te:return D("SuspenseList");case Y:case Z:return W(t.type,false);case X:return W(t.type.render,false);case K:return W(t.type,true);case oe:return D("Activity");case ie:return D("ViewTransition");default:return ""}},Ie=(t,e,s)=>{let m=`
17
- in ${t}`;return e&&(m+=` (at ${e})`),m},ue=t=>{try{let e="",s=t,m=null;do{e+=Ne(s,m);let S=s._debugInfo;if(S&&Array.isArray(S))for(let c=S.length-1;c>=0;c--){let i=S[c];typeof i.name=="string"&&(e+=Ie(i.name,i.env,i.debugLocation));}m=s,s=s.return;}while(s);return e}catch(e){return e instanceof Error?`
18
- Error generating stack: ${e.message}
19
- ${e.stack}`:""}},ke=t=>t.length?t[0]===t[0].toUpperCase():false,ce=async t=>{let e=/\n\s+(?:in|at)\s+([^\s(]+)(?:\s+\((?:at\s+)?([^)]+)\))?/g,s=[],m;for(m=e.exec(t);m!==null;){let S=m[1],c=m[2];if(!ke(S)){m=e.exec(t),s.push({name:S,source:undefined});continue}let i;if(c&&c!=="Server")try{let a=` at ${S} (${c})`,l=await Fe(a,1);l.length>0&&(i=l[0]);}catch{}s.push({name:S,source:i||undefined}),m=e.exec(t);}return s};var De=async t=>{let e=se(t);if(!e)return null;let s=ue(e);return (await ce(s)).map(c=>({componentName:c.name,fileName:c.source?.fileName}))},je=t=>t.filter(e=>e.fileName&&!e.fileName.includes("node_modules")&&e.componentName.length>1&&!e.fileName.startsWith("_")),vt=t=>{if(t.length===0)return "";if(t.length===1){let m=t[0].lastIndexOf("/");return m>0?t[0].substring(0,m+1):""}let e=t[0];for(let m=1;m<t.length;m++){let S=t[m],c=0;for(;c<e.length&&c<S.length&&e[c]===S[c];)c++;e=e.substring(0,c);}let s=e.lastIndexOf("/");return s>0?e.substring(0,s+1):""},Pe=t=>{let e=t.map(m=>m.fileName).filter(m=>!!m),s=vt(e);return t.map(m=>{let S=m.fileName;return S&&s&&(S=S.startsWith(s)?S.substring(s.length):S),`${m.componentName}${S?` (${S})`:""}`}).join(`
20
- `)},xe=t=>{let e=new Set(["article","aside","footer","form","header","main","nav","section"]),s=o=>{let f=o.tagName.toLowerCase();if(e.has(f)||o.id)return true;if(o.className&&typeof o.className=="string"){let v=o.className.trim();if(v&&v.length>0)return true}return Array.from(o.attributes).some(v=>v.name.startsWith("data-"))},m=(o,f=10)=>{let v=[],b=o.parentElement,T=0;for(;b&&T<f&&b.tagName!=="BODY"&&!(s(b)&&(v.push(b),v.length>=3));)b=b.parentElement,T++;return v.reverse()},S=o=>{let f=[],v=o,b=0,T=5;for(;v&&b<T&&v.tagName!=="BODY";){let L=v.tagName.toLowerCase();if(v.id){L+=`#${v.id}`,f.unshift(L);break}else if(v.className&&typeof v.className=="string"&&v.className.trim()){let O=v.className.trim().split(/\s+/).slice(0,2);L+=`.${O.join(".")}`;}if(!v.id&&(!v.className||!v.className.trim())&&v.parentElement){let O=Array.from(v.parentElement.children),R=O.indexOf(v);R>=0&&O.length>1&&(L+=`:nth-child(${R+1})`);}f.unshift(L),v=v.parentElement,b++;}return f.join(" > ")},c=(o,f=false)=>{let v=o.tagName.toLowerCase(),b=[];if(o.id&&b.push(`id="${o.id}"`),o.className&&typeof o.className=="string"){let R=o.className.trim().split(/\s+/);if(R.length>0&&R[0]){let g=(f?R.slice(0,3):R).join(" ");g.length>30&&(g=g.substring(0,30)+"..."),b.push(`class="${g}"`);}}let T=Array.from(o.attributes).filter(R=>R.name.startsWith("data-")),L=f?T.slice(0,1):T;for(let R of L){let p=R.value;p.length>20&&(p=p.substring(0,20)+"..."),b.push(`${R.name}="${p}"`);}let O=o.getAttribute("aria-label");if(O&&!f){let R=O;R.length>20&&(R=R.substring(0,20)+"..."),b.push(`aria-label="${R}"`);}return b.length>0?`<${v} ${b.join(" ")}>`:`<${v}>`},i=o=>`</${o.tagName.toLowerCase()}>`,a=o=>{let f=o.textContent||"";f=f.trim().replace(/\s+/g," ");let v=60;return f.length>v&&(f=f.substring(0,v)+"..."),f},l=o=>{if(o.id)return `#${o.id}`;if(o.className&&typeof o.className=="string"){let f=o.className.trim().split(/\s+/);if(f.length>0&&f[0])return `.${f[0]}`}return null},r=[];r.push(`Path: ${S(t)}`),r.push("");let C=m(t);for(let o=0;o<C.length;o++){let f=" ".repeat(o);r.push(f+c(C[o],true));}let y=t.parentElement,h=-1;if(y){let o=Array.from(y.children);if(h=o.indexOf(t),h>0){let f=o[h-1];if(l(f)&&h<=2){let b=" ".repeat(C.length);r.push(`${b} ${c(f,true)}`),r.push(`${b} </${f.tagName.toLowerCase()}>`);}else if(h>0){let b=" ".repeat(C.length);r.push(`${b} ... (${h} element${h===1?"":"s"})`);}}}let n=" ".repeat(C.length);r.push(n+" <!-- SELECTED -->");let u=a(t),d=t.children.length;if(u&&d===0&&u.length<40?r.push(`${n} ${c(t)}${u}${i(t)}`):(r.push(n+" "+c(t)),u&&r.push(`${n} ${u}`),d>0&&r.push(`${n} ... (${d} element${d===1?"":"s"})`),r.push(n+" "+i(t))),y&&h>=0){let o=Array.from(y.children),f=o.length-h-1;if(f>0){let v=o[h+1];l(v)&&f<=2?(r.push(`${n} ${c(v,true)}`),r.push(`${n} </${v.tagName.toLowerCase()}>`)):r.push(`${n} ... (${f} element${f===1?"":"s"})`);}}for(let o=C.length-1;o>=0;o--){let f=" ".repeat(o);r.push(f+i(C[o]));}return r.join(`
21
- `)};var _t=()=>{let t=null,e=null,s=false,m=false,S=null,c=null,i=null,a=async w=>{if(!document.hasFocus()){i=w;return}try{await navigator.clipboard.writeText(w),i=null,E();}catch{let M=document.createElement("textarea");M.value=w,M.style.position="fixed",M.style.left="-999999px",M.style.top="-999999px",document.body.appendChild(M),M.focus(),M.select();try{document.execCommand("copy"),i=null,E();}catch(F){console.error("Failed to copy to clipboard:",F),E();}document.body.removeChild(M);}},l=()=>{i&&a(i);},r=0,C=0,y=0,h=0,n=0,u=0,d=0,o=0,f="",v=()=>{let w=document.activeElement;return w instanceof HTMLInputElement||w instanceof HTMLTextAreaElement||w?.tagName==="INPUT"||w?.tagName==="TEXTAREA"},b=()=>{let w=document.createElement("div");return w.style.position="fixed",w.style.border="2px solid #3b82f6",w.style.backgroundColor="rgba(59, 130, 246, 0.1)",w.style.pointerEvents="none",w.style.zIndex="999999",w.style.transition="none",document.body.appendChild(w),w},T=(w,M,F)=>w+(M-w)*F,L=()=>{if(!e||!s)return;let w=.5;r=T(r,n,w),C=T(C,u,w),y=T(y,d,w),h=T(h,o,w),e.style.left=`${r}px`,e.style.top=`${C}px`,e.style.width=`${y}px`,e.style.height=`${h}px`,e.style.borderRadius=f,c=requestAnimationFrame(L);},O=w=>{if(m)return;let M=document.elementFromPoint(w.clientX,w.clientY);if(!M||M===e)return;S=M;let F=M.getBoundingClientRect(),N=window.getComputedStyle(M);n=F.left,u=F.top,d=F.width,o=F.height,f=N.borderRadius;},R=w=>{if(!s)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation(),m=true;let M=S;M&&De(M).then(F=>{if(!F){E();return}let N=Pe(je(F)),x=`## Referenced element
22
- ${xe(M)}
23
-
24
- Import traces:
25
- ${N}
26
-
27
- Page: ${window.location.href}`;a(x);});},p=w=>{s&&(w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation());},g=()=>{e||(e=b()),s=true,e.style.display="block",r=n,C=u,y=d,h=o,L();},E=()=>{s=false,m=false,e&&(e.style.display="none"),c&&(cancelAnimationFrame(c),c=null),S=null;},_=w=>{w.metaKey&&!t&&!s&&(t=setTimeout(()=>{v()||g(),t=null;},750));},A=w=>{w.metaKey||(t&&(clearTimeout(t),t=null),s&&!m&&E());};return document.addEventListener("keydown",_),document.addEventListener("keyup",A),document.addEventListener("mousemove",O),document.addEventListener("mousedown",p,true),document.addEventListener("click",R,true),window.addEventListener("focus",l),()=>{t&&clearTimeout(t),c&&cancelAnimationFrame(c),e&&e.parentNode&&e.parentNode.removeChild(e),document.removeEventListener("keydown",_),document.removeEventListener("keyup",A),document.removeEventListener("mousemove",O),document.removeEventListener("mousedown",p,true),document.removeEventListener("click",R,true),window.removeEventListener("focus",l);}};_t();/*! Bundled license information:
28
-
29
- bippy/dist/src-Bn4Fcl24.js:
30
- (**
31
- * @license bippy
32
- *
33
- * Copyright (c) Aiden Bai
34
- *
35
- * This source code is licensed under the MIT license found in the
36
- * LICENSE file in the root directory of this source tree.
37
- *)
1
+ var ReactGrab = (function (exports) {
2
+ 'use strict';
38
3
 
39
- bippy/dist/index.js:
40
- (**
41
- * @license bippy
4
+ /**
5
+ * @license MIT
42
6
  *
43
- * Copyright (c) Aiden Bai
7
+ * Copyright (c) 2025 Aiden Bai
44
8
  *
45
9
  * This source code is licensed under the MIT license found in the
46
10
  * LICENSE file in the root directory of this source tree.
47
- *)
11
+ */
48
12
 
49
- bippy/dist/source-7rH6oRiA.js:
50
- (**
51
- * @license bippy
52
- *
53
- * Copyright (c) Aiden Bai
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- *)
13
+ // src/overlay.ts
14
+ var lerp = (start, end, factor) => {
15
+ return start + (end - start) * factor;
16
+ };
17
+ var SELECTION_LERP_FACTOR = 0.99;
18
+ var createSelectionElement = ({
19
+ borderRadius,
20
+ height,
21
+ transform,
22
+ width,
23
+ x,
24
+ y
25
+ }) => {
26
+ const overlay = document.createElement("div");
27
+ overlay.style.position = "fixed";
28
+ overlay.style.top = `${y}px`;
29
+ overlay.style.left = `${x}px`;
30
+ overlay.style.width = `${width}px`;
31
+ overlay.style.height = `${height}px`;
32
+ overlay.style.borderRadius = borderRadius;
33
+ overlay.style.transform = transform;
34
+ overlay.style.pointerEvents = "none";
35
+ overlay.style.border = "2px solid #007AFF";
36
+ overlay.style.backgroundColor = "rgba(0, 122, 255, 0.1)";
37
+ overlay.style.zIndex = "2147483646";
38
+ overlay.style.boxSizing = "border-box";
39
+ overlay.style.display = "none";
40
+ overlay.animate(
41
+ [
42
+ { backgroundColor: "rgba(0, 122, 255, 0.1)" },
43
+ { backgroundColor: "rgba(0, 122, 255, 0.15)" },
44
+ { backgroundColor: "rgba(0, 122, 255, 0.1)" }
45
+ ],
46
+ {
47
+ duration: 2e3,
48
+ easing: "ease-in-out",
49
+ iterations: Infinity
50
+ }
51
+ );
52
+ return overlay;
53
+ };
54
+ var updateSelectionElement = (element, { borderRadius, height, transform, width, x, y }) => {
55
+ const currentTop = parseFloat(element.style.top) || 0;
56
+ const currentLeft = parseFloat(element.style.left) || 0;
57
+ const currentWidth = parseFloat(element.style.width) || 0;
58
+ const currentHeight = parseFloat(element.style.height) || 0;
59
+ const topValue = `${lerp(currentTop, y, SELECTION_LERP_FACTOR)}px`;
60
+ const leftValue = `${lerp(currentLeft, x, SELECTION_LERP_FACTOR)}px`;
61
+ const widthValue = `${lerp(currentWidth, width, SELECTION_LERP_FACTOR)}px`;
62
+ const heightValue = `${lerp(currentHeight, height, SELECTION_LERP_FACTOR)}px`;
63
+ if (element.style.top !== topValue) {
64
+ element.style.top = topValue;
65
+ }
66
+ if (element.style.left !== leftValue) {
67
+ element.style.left = leftValue;
68
+ }
69
+ if (element.style.width !== widthValue) {
70
+ element.style.width = widthValue;
71
+ }
72
+ if (element.style.height !== heightValue) {
73
+ element.style.height = heightValue;
74
+ }
75
+ if (element.style.borderRadius !== borderRadius) {
76
+ element.style.borderRadius = borderRadius;
77
+ }
78
+ if (element.style.transform !== transform) {
79
+ element.style.transform = transform;
80
+ }
81
+ };
82
+ var SelectionOverlay = class {
83
+ element;
84
+ visible = false;
85
+ constructor(root) {
86
+ this.element = createSelectionElement({
87
+ borderRadius: "0px",
88
+ height: 0,
89
+ transform: "none",
90
+ width: 0,
91
+ x: -1e3,
92
+ y: -1e3
93
+ });
94
+ root.appendChild(this.element);
95
+ }
96
+ hide() {
97
+ this.visible = false;
98
+ this.element.style.display = "none";
99
+ this.element.style.pointerEvents = "none";
100
+ }
101
+ isVisible() {
102
+ return this.visible;
103
+ }
104
+ show() {
105
+ this.visible = true;
106
+ this.element.style.display = "block";
107
+ this.element.style.pointerEvents = "auto";
108
+ }
109
+ update(selection) {
110
+ updateSelectionElement(this.element, selection);
111
+ }
112
+ };
113
+ var createSpinner = () => {
114
+ const spinner = document.createElement("span");
115
+ spinner.style.display = "inline-block";
116
+ spinner.style.width = "8px";
117
+ spinner.style.height = "8px";
118
+ spinner.style.border = "1.5px solid #1e4ed8";
119
+ spinner.style.borderTopColor = "transparent";
120
+ spinner.style.borderRadius = "50%";
121
+ spinner.style.marginRight = "4px";
122
+ spinner.style.verticalAlign = "middle";
123
+ spinner.animate(
124
+ [
125
+ { transform: "rotate(0deg)" },
126
+ { transform: "rotate(360deg)" }
127
+ ],
128
+ {
129
+ duration: 600,
130
+ easing: "linear",
131
+ iterations: Infinity
132
+ }
133
+ );
134
+ return spinner;
135
+ };
136
+ var createIndicator = (x, y) => {
137
+ const indicator = document.createElement("div");
138
+ indicator.style.position = "fixed";
139
+ indicator.style.left = `${x}px`;
140
+ indicator.style.top = `${y - 4}px`;
141
+ indicator.style.transform = "translateY(-100%)";
142
+ indicator.style.padding = "0px 4px";
143
+ indicator.style.backgroundColor = "#dbeafe";
144
+ indicator.style.color = "#1e4ed8";
145
+ indicator.style.border = "1px solid #c7dbfb";
146
+ indicator.style.borderRadius = "4px";
147
+ indicator.style.fontSize = "11px";
148
+ indicator.style.fontWeight = "500";
149
+ indicator.style.fontFamily = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif";
150
+ indicator.style.zIndex = "2147483647";
151
+ indicator.style.pointerEvents = "none";
152
+ indicator.style.opacity = "0";
153
+ indicator.style.transition = "opacity 0.2s ease-in-out";
154
+ indicator.style.display = "flex";
155
+ indicator.style.alignItems = "center";
156
+ return indicator;
157
+ };
158
+ var showCopyIndicator = (x, y) => {
159
+ const indicator = createIndicator(x, y);
160
+ const spinner = createSpinner();
161
+ const text = document.createElement("span");
162
+ text.textContent = "Copying\u2026";
163
+ indicator.appendChild(spinner);
164
+ indicator.appendChild(text);
165
+ document.body.appendChild(indicator);
166
+ requestAnimationFrame(() => {
167
+ indicator.style.opacity = "1";
168
+ });
169
+ return () => {
170
+ spinner.remove();
171
+ text.textContent = "Copied!";
172
+ setTimeout(() => {
173
+ indicator.style.opacity = "0";
174
+ setTimeout(() => {
175
+ document.body.removeChild(indicator);
176
+ }, 200);
177
+ }, 1500);
178
+ };
179
+ };
58
180
 
59
- bippy/dist/source.js:
60
- (**
61
- * @license bippy
62
- *
63
- * Copyright (c) Aiden Bai
64
- *
65
- * This source code is licensed under the MIT license found in the
66
- * LICENSE file in the root directory of this source tree.
67
- *)
68
- */exports.init=_t;return exports;})({});
181
+ // src/utils/copy-text.ts
182
+ var copyText = async (text) => {
183
+ if (navigator.clipboard && window.isSecureContext) {
184
+ try {
185
+ await navigator.clipboard.writeText(text);
186
+ return true;
187
+ } catch {
188
+ }
189
+ }
190
+ const textareaEl = document.createElement("textarea");
191
+ textareaEl.value = text;
192
+ textareaEl.setAttribute("readonly", "");
193
+ textareaEl.style.position = "fixed";
194
+ textareaEl.style.top = "-9999px";
195
+ textareaEl.style.opacity = "0";
196
+ textareaEl.style.pointerEvents = "none";
197
+ document.body.appendChild(textareaEl);
198
+ textareaEl.select();
199
+ textareaEl.setSelectionRange(0, textareaEl.value.length);
200
+ let didCopy = false;
201
+ try {
202
+ didCopy = document.execCommand("copy");
203
+ } catch {
204
+ didCopy = false;
205
+ } finally {
206
+ document.body.removeChild(textareaEl);
207
+ }
208
+ return didCopy;
209
+ };
210
+
211
+ // node_modules/.pnpm/bippy@0.3.31_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/src-R2iEnVC1.js
212
+ var version = "0.3.31";
213
+ var BIPPY_INSTRUMENTATION_STRING = `bippy-${version}`;
214
+ var objectDefineProperty = Object.defineProperty;
215
+ var objectHasOwnProperty = Object.prototype.hasOwnProperty;
216
+ var NO_OP = () => {
217
+ };
218
+ var checkDCE = (fn) => {
219
+ try {
220
+ const code = Function.prototype.toString.call(fn);
221
+ if (code.indexOf("^_^") > -1) setTimeout(() => {
222
+ throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build");
223
+ });
224
+ } catch {
225
+ }
226
+ };
227
+ var isRealReactDevtools = (rdtHook = getRDTHook()) => {
228
+ return "getFiberRoots" in rdtHook;
229
+ };
230
+ var isReactRefreshOverride = false;
231
+ var injectFnStr = undefined;
232
+ var isReactRefresh = (rdtHook = getRDTHook()) => {
233
+ if (isReactRefreshOverride) return true;
234
+ if (typeof rdtHook.inject === "function") injectFnStr = rdtHook.inject.toString();
235
+ return Boolean(injectFnStr?.includes("(injected)"));
236
+ };
237
+ var onActiveListeners = /* @__PURE__ */ new Set();
238
+ var _renderers = /* @__PURE__ */ new Set();
239
+ var installRDTHook = (onActive) => {
240
+ const renderers = /* @__PURE__ */ new Map();
241
+ let i = 0;
242
+ let rdtHook = {
243
+ checkDCE,
244
+ supportsFiber: true,
245
+ supportsFlight: true,
246
+ hasUnsupportedRendererAttached: false,
247
+ renderers,
248
+ onCommitFiberRoot: NO_OP,
249
+ onCommitFiberUnmount: NO_OP,
250
+ onPostCommitFiberRoot: NO_OP,
251
+ on: NO_OP,
252
+ inject(renderer) {
253
+ const nextID = ++i;
254
+ renderers.set(nextID, renderer);
255
+ _renderers.add(renderer);
256
+ if (!rdtHook._instrumentationIsActive) {
257
+ rdtHook._instrumentationIsActive = true;
258
+ onActiveListeners.forEach((listener) => listener());
259
+ }
260
+ return nextID;
261
+ },
262
+ _instrumentationSource: BIPPY_INSTRUMENTATION_STRING,
263
+ _instrumentationIsActive: false
264
+ };
265
+ try {
266
+ objectDefineProperty(globalThis, "__REACT_DEVTOOLS_GLOBAL_HOOK__", {
267
+ get() {
268
+ return rdtHook;
269
+ },
270
+ set(newHook) {
271
+ if (newHook && typeof newHook === "object") {
272
+ const ourRenderers = rdtHook.renderers;
273
+ rdtHook = newHook;
274
+ if (ourRenderers.size > 0) {
275
+ ourRenderers.forEach((renderer, id) => {
276
+ _renderers.add(renderer);
277
+ newHook.renderers.set(id, renderer);
278
+ });
279
+ patchRDTHook(onActive);
280
+ }
281
+ }
282
+ },
283
+ configurable: true,
284
+ enumerable: true
285
+ });
286
+ const originalWindowHasOwnProperty = window.hasOwnProperty;
287
+ let hasRanHack = false;
288
+ objectDefineProperty(window, "hasOwnProperty", {
289
+ value: function() {
290
+ try {
291
+ if (!hasRanHack && arguments[0] === "__REACT_DEVTOOLS_GLOBAL_HOOK__") {
292
+ globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__ = void 0;
293
+ hasRanHack = true;
294
+ return -0;
295
+ }
296
+ } catch {
297
+ }
298
+ return originalWindowHasOwnProperty.apply(this, arguments);
299
+ },
300
+ configurable: true,
301
+ writable: true
302
+ });
303
+ } catch {
304
+ patchRDTHook(onActive);
305
+ }
306
+ return rdtHook;
307
+ };
308
+ var patchRDTHook = (onActive) => {
309
+ try {
310
+ const rdtHook = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
311
+ if (!rdtHook) return;
312
+ if (!rdtHook._instrumentationSource) {
313
+ rdtHook.checkDCE = checkDCE;
314
+ rdtHook.supportsFiber = true;
315
+ rdtHook.supportsFlight = true;
316
+ rdtHook.hasUnsupportedRendererAttached = false;
317
+ rdtHook._instrumentationSource = BIPPY_INSTRUMENTATION_STRING;
318
+ rdtHook._instrumentationIsActive = false;
319
+ rdtHook.on = NO_OP;
320
+ if (rdtHook.renderers.size) {
321
+ rdtHook._instrumentationIsActive = true;
322
+ onActiveListeners.forEach((listener) => listener());
323
+ return;
324
+ }
325
+ const prevInject = rdtHook.inject;
326
+ if (isReactRefresh(rdtHook) && !isRealReactDevtools()) {
327
+ isReactRefreshOverride = true;
328
+ const nextID = rdtHook.inject({ scheduleRefresh() {
329
+ } });
330
+ if (nextID) rdtHook._instrumentationIsActive = true;
331
+ }
332
+ rdtHook.inject = (renderer) => {
333
+ const id = prevInject(renderer);
334
+ _renderers.add(renderer);
335
+ rdtHook._instrumentationIsActive = true;
336
+ onActiveListeners.forEach((listener) => listener());
337
+ return id;
338
+ };
339
+ }
340
+ if (rdtHook.renderers.size || rdtHook._instrumentationIsActive || isReactRefresh()) onActive?.();
341
+ } catch {
342
+ }
343
+ };
344
+ var hasRDTHook = () => {
345
+ return objectHasOwnProperty.call(globalThis, "__REACT_DEVTOOLS_GLOBAL_HOOK__");
346
+ };
347
+ var getRDTHook = (onActive) => {
348
+ if (!hasRDTHook()) return installRDTHook(onActive);
349
+ patchRDTHook(onActive);
350
+ return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
351
+ };
352
+ var isClientEnvironment = () => {
353
+ return Boolean(typeof window !== "undefined" && (window.document?.createElement || window.navigator?.product === "ReactNative"));
354
+ };
355
+ var safelyInstallRDTHook = () => {
356
+ try {
357
+ if (isClientEnvironment()) getRDTHook();
358
+ } catch {
359
+ }
360
+ };
361
+ var FunctionComponentTag = 0;
362
+ var ClassComponentTag = 1;
363
+ var HostComponentTag = 5;
364
+ var ForwardRefTag = 11;
365
+ var SuspenseComponentTag = 13;
366
+ var SimpleMemoComponentTag = 15;
367
+ var LazyComponentTag = 16;
368
+ var SuspenseListComponentTag = 19;
369
+ var HostHoistableTag = 26;
370
+ var HostSingletonTag = 27;
371
+ var ActivityComponentTag = 28;
372
+ var ViewTransitionComponentTag = 30;
373
+ var getType = (type) => {
374
+ const currentType = type;
375
+ if (typeof currentType === "function") return currentType;
376
+ if (typeof currentType === "object" && currentType) return getType(currentType.type || currentType.render);
377
+ return null;
378
+ };
379
+ var getDisplayName = (type) => {
380
+ const currentType = type;
381
+ if (typeof currentType === "string") return currentType;
382
+ if (typeof currentType !== "function" && !(typeof currentType === "object" && currentType)) return null;
383
+ const name = currentType.displayName || currentType.name || null;
384
+ if (name) return name;
385
+ const unwrappedType = getType(currentType);
386
+ if (!unwrappedType) return null;
387
+ return unwrappedType.displayName || unwrappedType.name || null;
388
+ };
389
+ var getFiberFromHostInstance = (hostInstance) => {
390
+ const rdtHook = getRDTHook();
391
+ for (const renderer of rdtHook.renderers.values()) try {
392
+ const fiber = renderer.findFiberByHostInstance?.(hostInstance);
393
+ if (fiber) return fiber;
394
+ } catch {
395
+ }
396
+ if (typeof hostInstance === "object" && hostInstance != null) {
397
+ if ("_reactRootContainer" in hostInstance) return hostInstance._reactRootContainer?._internalRoot?.current?.child;
398
+ for (const key in hostInstance) if (key.startsWith("__reactContainer$") || key.startsWith("__reactInternalInstance$") || key.startsWith("__reactFiber")) return hostInstance[key] || null;
399
+ }
400
+ return null;
401
+ };
402
+ safelyInstallRDTHook();
403
+
404
+ // node_modules/.pnpm/bippy@0.3.31_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/source-DWOhEbf2.js
405
+ var __create = Object.create;
406
+ var __defProp = Object.defineProperty;
407
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
408
+ var __getOwnPropNames = Object.getOwnPropertyNames;
409
+ var __getProtoOf = Object.getPrototypeOf;
410
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
411
+ var __commonJS = (cb, mod) => function() {
412
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
413
+ };
414
+ var __copyProps = (to, from, except, desc) => {
415
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
416
+ key = keys[i];
417
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
418
+ get: ((k) => from[k]).bind(null, key),
419
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
420
+ });
421
+ }
422
+ return to;
423
+ };
424
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(__defProp(target, "default", {
425
+ value: mod,
426
+ enumerable: true
427
+ }) , mod));
428
+ var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
429
+ var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code\])?$/;
430
+ function parseStack(stackString, options) {
431
+ if (stackString.match(CHROME_IE_STACK_REGEXP)) return parseV8OrIeString(stackString);
432
+ else return parseFFOrSafariString(stackString);
433
+ }
434
+ function extractLocation(urlLike) {
435
+ if (!urlLike.includes(":")) return [
436
+ urlLike,
437
+ undefined,
438
+ undefined
439
+ ];
440
+ const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
441
+ const parts = regExp.exec(urlLike.replace(/[()]/g, ""));
442
+ return [
443
+ parts[1],
444
+ parts[2] || undefined,
445
+ parts[3] || undefined
446
+ ];
447
+ }
448
+ function applySlice(lines, options) {
449
+ return lines;
450
+ }
451
+ function parseV8OrIeString(stack, options) {
452
+ const filtered = applySlice(stack.split("\n").filter((line) => {
453
+ return !!line.match(CHROME_IE_STACK_REGEXP);
454
+ }));
455
+ return filtered.map((line) => {
456
+ if (line.includes("(eval ")) line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
457
+ let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
458
+ const location = sanitizedLine.match(/ (\(.+\)$)/);
459
+ sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
460
+ const locationParts = extractLocation(location ? location[1] : sanitizedLine);
461
+ const functionName = location && sanitizedLine || undefined;
462
+ const fileName = ["eval", "<anonymous>"].includes(locationParts[0]) ? undefined : locationParts[0];
463
+ return {
464
+ function: functionName,
465
+ file: fileName,
466
+ line: locationParts[1] ? +locationParts[1] : undefined,
467
+ col: locationParts[2] ? +locationParts[2] : undefined,
468
+ raw: line
469
+ };
470
+ });
471
+ }
472
+ function parseFFOrSafariString(stack, options) {
473
+ const filtered = applySlice(stack.split("\n").filter((line) => {
474
+ return !line.match(SAFARI_NATIVE_CODE_REGEXP);
475
+ }));
476
+ return filtered.map((line) => {
477
+ if (line.includes(" > eval")) line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
478
+ if (!line.includes("@") && !line.includes(":")) return { function: line };
479
+ else {
480
+ const functionNameRegex = /(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/;
481
+ const matches = line.match(functionNameRegex);
482
+ const functionName = matches && matches[1] ? matches[1] : undefined;
483
+ const locationParts = extractLocation(line.replace(functionNameRegex, ""));
484
+ return {
485
+ function: functionName,
486
+ file: locationParts[0],
487
+ line: locationParts[1] ? +locationParts[1] : undefined,
488
+ col: locationParts[2] ? +locationParts[2] : undefined,
489
+ raw: line
490
+ };
491
+ }
492
+ });
493
+ }
494
+ var require_base64 = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js"(exports) {
495
+ var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
496
+ exports.encode = function(number) {
497
+ if (0 <= number && number < intToCharMap.length) return intToCharMap[number];
498
+ throw new TypeError("Must be between 0 and 63: " + number);
499
+ };
500
+ exports.decode = function(charCode) {
501
+ var bigA = 65;
502
+ var bigZ = 90;
503
+ var littleA = 97;
504
+ var littleZ = 122;
505
+ var zero = 48;
506
+ var nine = 57;
507
+ var plus = 43;
508
+ var slash = 47;
509
+ var littleOffset = 26;
510
+ var numberOffset = 52;
511
+ if (bigA <= charCode && charCode <= bigZ) return charCode - bigA;
512
+ if (littleA <= charCode && charCode <= littleZ) return charCode - littleA + littleOffset;
513
+ if (zero <= charCode && charCode <= nine) return charCode - zero + numberOffset;
514
+ if (charCode == plus) return 62;
515
+ if (charCode == slash) return 63;
516
+ return -1;
517
+ };
518
+ } });
519
+ var require_base64_vlq = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js"(exports) {
520
+ var base64 = require_base64();
521
+ var VLQ_BASE_SHIFT = 5;
522
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
523
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
524
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
525
+ function toVLQSigned(aValue) {
526
+ return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
527
+ }
528
+ function fromVLQSigned(aValue) {
529
+ var isNegative = (aValue & 1) === 1;
530
+ var shifted = aValue >> 1;
531
+ return isNegative ? -shifted : shifted;
532
+ }
533
+ exports.encode = function base64VLQ_encode(aValue) {
534
+ var encoded = "";
535
+ var digit;
536
+ var vlq = toVLQSigned(aValue);
537
+ do {
538
+ digit = vlq & VLQ_BASE_MASK;
539
+ vlq >>>= VLQ_BASE_SHIFT;
540
+ if (vlq > 0) digit |= VLQ_CONTINUATION_BIT;
541
+ encoded += base64.encode(digit);
542
+ } while (vlq > 0);
543
+ return encoded;
544
+ };
545
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
546
+ var strLen = aStr.length;
547
+ var result = 0;
548
+ var shift = 0;
549
+ var continuation, digit;
550
+ do {
551
+ if (aIndex >= strLen) throw new Error("Expected more digits in base 64 VLQ value.");
552
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
553
+ if (digit === -1) throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
554
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
555
+ digit &= VLQ_BASE_MASK;
556
+ result = result + (digit << shift);
557
+ shift += VLQ_BASE_SHIFT;
558
+ } while (continuation);
559
+ aOutParam.value = fromVLQSigned(result);
560
+ aOutParam.rest = aIndex;
561
+ };
562
+ } });
563
+ var require_util = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js"(exports) {
564
+ function getArg(aArgs, aName, aDefaultValue) {
565
+ if (aName in aArgs) return aArgs[aName];
566
+ else if (arguments.length === 3) return aDefaultValue;
567
+ else throw new Error('"' + aName + '" is a required argument.');
568
+ }
569
+ exports.getArg = getArg;
570
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
571
+ var dataUrlRegexp = /^data:.+\,.+$/;
572
+ function urlParse(aUrl) {
573
+ var match = aUrl.match(urlRegexp);
574
+ if (!match) return null;
575
+ return {
576
+ scheme: match[1],
577
+ auth: match[2],
578
+ host: match[3],
579
+ port: match[4],
580
+ path: match[5]
581
+ };
582
+ }
583
+ exports.urlParse = urlParse;
584
+ function urlGenerate(aParsedUrl) {
585
+ var url = "";
586
+ if (aParsedUrl.scheme) url += aParsedUrl.scheme + ":";
587
+ url += "//";
588
+ if (aParsedUrl.auth) url += aParsedUrl.auth + "@";
589
+ if (aParsedUrl.host) url += aParsedUrl.host;
590
+ if (aParsedUrl.port) url += ":" + aParsedUrl.port;
591
+ if (aParsedUrl.path) url += aParsedUrl.path;
592
+ return url;
593
+ }
594
+ exports.urlGenerate = urlGenerate;
595
+ var MAX_CACHED_INPUTS = 32;
596
+ function lruMemoize(f) {
597
+ var cache = [];
598
+ return function(input) {
599
+ for (var i = 0; i < cache.length; i++) if (cache[i].input === input) {
600
+ var temp = cache[0];
601
+ cache[0] = cache[i];
602
+ cache[i] = temp;
603
+ return cache[0].result;
604
+ }
605
+ var result = f(input);
606
+ cache.unshift({
607
+ input,
608
+ result
609
+ });
610
+ if (cache.length > MAX_CACHED_INPUTS) cache.pop();
611
+ return result;
612
+ };
613
+ }
614
+ var normalize = lruMemoize(function normalize$1(aPath) {
615
+ var path = aPath;
616
+ var url = urlParse(aPath);
617
+ if (url) {
618
+ if (!url.path) return aPath;
619
+ path = url.path;
620
+ }
621
+ var isAbsolute = exports.isAbsolute(path);
622
+ var parts = [];
623
+ var start = 0;
624
+ var i = 0;
625
+ while (true) {
626
+ start = i;
627
+ i = path.indexOf("/", start);
628
+ if (i === -1) {
629
+ parts.push(path.slice(start));
630
+ break;
631
+ } else {
632
+ parts.push(path.slice(start, i));
633
+ while (i < path.length && path[i] === "/") i++;
634
+ }
635
+ }
636
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
637
+ part = parts[i];
638
+ if (part === ".") parts.splice(i, 1);
639
+ else if (part === "..") up++;
640
+ else if (up > 0) if (part === "") {
641
+ parts.splice(i + 1, up);
642
+ up = 0;
643
+ } else {
644
+ parts.splice(i, 2);
645
+ up--;
646
+ }
647
+ }
648
+ path = parts.join("/");
649
+ if (path === "") path = isAbsolute ? "/" : ".";
650
+ if (url) {
651
+ url.path = path;
652
+ return urlGenerate(url);
653
+ }
654
+ return path;
655
+ });
656
+ exports.normalize = normalize;
657
+ function join(aRoot, aPath) {
658
+ if (aRoot === "") aRoot = ".";
659
+ if (aPath === "") aPath = ".";
660
+ var aPathUrl = urlParse(aPath);
661
+ var aRootUrl = urlParse(aRoot);
662
+ if (aRootUrl) aRoot = aRootUrl.path || "/";
663
+ if (aPathUrl && !aPathUrl.scheme) {
664
+ if (aRootUrl) aPathUrl.scheme = aRootUrl.scheme;
665
+ return urlGenerate(aPathUrl);
666
+ }
667
+ if (aPathUrl || aPath.match(dataUrlRegexp)) return aPath;
668
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
669
+ aRootUrl.host = aPath;
670
+ return urlGenerate(aRootUrl);
671
+ }
672
+ var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
673
+ if (aRootUrl) {
674
+ aRootUrl.path = joined;
675
+ return urlGenerate(aRootUrl);
676
+ }
677
+ return joined;
678
+ }
679
+ exports.join = join;
680
+ exports.isAbsolute = function(aPath) {
681
+ return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
682
+ };
683
+ function relative(aRoot, aPath) {
684
+ if (aRoot === "") aRoot = ".";
685
+ aRoot = aRoot.replace(/\/$/, "");
686
+ var level = 0;
687
+ while (aPath.indexOf(aRoot + "/") !== 0) {
688
+ var index = aRoot.lastIndexOf("/");
689
+ if (index < 0) return aPath;
690
+ aRoot = aRoot.slice(0, index);
691
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) return aPath;
692
+ ++level;
693
+ }
694
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
695
+ }
696
+ exports.relative = relative;
697
+ var supportsNullProto = function() {
698
+ var obj = /* @__PURE__ */ Object.create(null);
699
+ return !("__proto__" in obj);
700
+ }();
701
+ function identity(s) {
702
+ return s;
703
+ }
704
+ function toSetString(aStr) {
705
+ if (isProtoString(aStr)) return "$" + aStr;
706
+ return aStr;
707
+ }
708
+ exports.toSetString = supportsNullProto ? identity : toSetString;
709
+ function fromSetString(aStr) {
710
+ if (isProtoString(aStr)) return aStr.slice(1);
711
+ return aStr;
712
+ }
713
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
714
+ function isProtoString(s) {
715
+ if (!s) return false;
716
+ var length = s.length;
717
+ if (length < 9) return false;
718
+ if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) return false;
719
+ for (var i = length - 10; i >= 0; i--) if (s.charCodeAt(i) !== 36) return false;
720
+ return true;
721
+ }
722
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
723
+ var cmp = strcmp(mappingA.source, mappingB.source);
724
+ if (cmp !== 0) return cmp;
725
+ cmp = mappingA.originalLine - mappingB.originalLine;
726
+ if (cmp !== 0) return cmp;
727
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
728
+ if (cmp !== 0 || onlyCompareOriginal) return cmp;
729
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
730
+ if (cmp !== 0) return cmp;
731
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
732
+ if (cmp !== 0) return cmp;
733
+ return strcmp(mappingA.name, mappingB.name);
734
+ }
735
+ exports.compareByOriginalPositions = compareByOriginalPositions;
736
+ function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
737
+ var cmp;
738
+ cmp = mappingA.originalLine - mappingB.originalLine;
739
+ if (cmp !== 0) return cmp;
740
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
741
+ if (cmp !== 0 || onlyCompareOriginal) return cmp;
742
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
743
+ if (cmp !== 0) return cmp;
744
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
745
+ if (cmp !== 0) return cmp;
746
+ return strcmp(mappingA.name, mappingB.name);
747
+ }
748
+ exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
749
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
750
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
751
+ if (cmp !== 0) return cmp;
752
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
753
+ if (cmp !== 0 || onlyCompareGenerated) return cmp;
754
+ cmp = strcmp(mappingA.source, mappingB.source);
755
+ if (cmp !== 0) return cmp;
756
+ cmp = mappingA.originalLine - mappingB.originalLine;
757
+ if (cmp !== 0) return cmp;
758
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
759
+ if (cmp !== 0) return cmp;
760
+ return strcmp(mappingA.name, mappingB.name);
761
+ }
762
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
763
+ function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
764
+ var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
765
+ if (cmp !== 0 || onlyCompareGenerated) return cmp;
766
+ cmp = strcmp(mappingA.source, mappingB.source);
767
+ if (cmp !== 0) return cmp;
768
+ cmp = mappingA.originalLine - mappingB.originalLine;
769
+ if (cmp !== 0) return cmp;
770
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
771
+ if (cmp !== 0) return cmp;
772
+ return strcmp(mappingA.name, mappingB.name);
773
+ }
774
+ exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
775
+ function strcmp(aStr1, aStr2) {
776
+ if (aStr1 === aStr2) return 0;
777
+ if (aStr1 === null) return 1;
778
+ if (aStr2 === null) return -1;
779
+ if (aStr1 > aStr2) return 1;
780
+ return -1;
781
+ }
782
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
783
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
784
+ if (cmp !== 0) return cmp;
785
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
786
+ if (cmp !== 0) return cmp;
787
+ cmp = strcmp(mappingA.source, mappingB.source);
788
+ if (cmp !== 0) return cmp;
789
+ cmp = mappingA.originalLine - mappingB.originalLine;
790
+ if (cmp !== 0) return cmp;
791
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
792
+ if (cmp !== 0) return cmp;
793
+ return strcmp(mappingA.name, mappingB.name);
794
+ }
795
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
796
+ function parseSourceMapInput(str) {
797
+ return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
798
+ }
799
+ exports.parseSourceMapInput = parseSourceMapInput;
800
+ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
801
+ sourceURL = sourceURL || "";
802
+ if (sourceRoot) {
803
+ if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") sourceRoot += "/";
804
+ sourceURL = sourceRoot + sourceURL;
805
+ }
806
+ if (sourceMapURL) {
807
+ var parsed = urlParse(sourceMapURL);
808
+ if (!parsed) throw new Error("sourceMapURL could not be parsed");
809
+ if (parsed.path) {
810
+ var index = parsed.path.lastIndexOf("/");
811
+ if (index >= 0) parsed.path = parsed.path.substring(0, index + 1);
812
+ }
813
+ sourceURL = join(urlGenerate(parsed), sourceURL);
814
+ }
815
+ return normalize(sourceURL);
816
+ }
817
+ exports.computeSourceURL = computeSourceURL;
818
+ } });
819
+ var require_array_set = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js"(exports) {
820
+ var util$4 = require_util();
821
+ var has = Object.prototype.hasOwnProperty;
822
+ var hasNativeMap = typeof Map !== "undefined";
823
+ function ArraySet$2() {
824
+ this._array = [];
825
+ this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
826
+ }
827
+ ArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
828
+ var set = new ArraySet$2();
829
+ for (var i = 0, len = aArray.length; i < len; i++) set.add(aArray[i], aAllowDuplicates);
830
+ return set;
831
+ };
832
+ ArraySet$2.prototype.size = function ArraySet_size() {
833
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
834
+ };
835
+ ArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
836
+ var sStr = hasNativeMap ? aStr : util$4.toSetString(aStr);
837
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
838
+ var idx = this._array.length;
839
+ if (!isDuplicate || aAllowDuplicates) this._array.push(aStr);
840
+ if (!isDuplicate) if (hasNativeMap) this._set.set(aStr, idx);
841
+ else this._set[sStr] = idx;
842
+ };
843
+ ArraySet$2.prototype.has = function ArraySet_has(aStr) {
844
+ if (hasNativeMap) return this._set.has(aStr);
845
+ else {
846
+ var sStr = util$4.toSetString(aStr);
847
+ return has.call(this._set, sStr);
848
+ }
849
+ };
850
+ ArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) {
851
+ if (hasNativeMap) {
852
+ var idx = this._set.get(aStr);
853
+ if (idx >= 0) return idx;
854
+ } else {
855
+ var sStr = util$4.toSetString(aStr);
856
+ if (has.call(this._set, sStr)) return this._set[sStr];
857
+ }
858
+ throw new Error('"' + aStr + '" is not in the set.');
859
+ };
860
+ ArraySet$2.prototype.at = function ArraySet_at(aIdx) {
861
+ if (aIdx >= 0 && aIdx < this._array.length) return this._array[aIdx];
862
+ throw new Error("No element indexed by " + aIdx);
863
+ };
864
+ ArraySet$2.prototype.toArray = function ArraySet_toArray() {
865
+ return this._array.slice();
866
+ };
867
+ exports.ArraySet = ArraySet$2;
868
+ } });
869
+ var require_mapping_list = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js"(exports) {
870
+ var util$3 = require_util();
871
+ function generatedPositionAfter(mappingA, mappingB) {
872
+ var lineA = mappingA.generatedLine;
873
+ var lineB = mappingB.generatedLine;
874
+ var columnA = mappingA.generatedColumn;
875
+ var columnB = mappingB.generatedColumn;
876
+ return lineB > lineA || lineB == lineA && columnB >= columnA || util$3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
877
+ }
878
+ function MappingList$1() {
879
+ this._array = [];
880
+ this._sorted = true;
881
+ this._last = {
882
+ generatedLine: -1,
883
+ generatedColumn: 0
884
+ };
885
+ }
886
+ MappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
887
+ this._array.forEach(aCallback, aThisArg);
888
+ };
889
+ MappingList$1.prototype.add = function MappingList_add(aMapping) {
890
+ if (generatedPositionAfter(this._last, aMapping)) {
891
+ this._last = aMapping;
892
+ this._array.push(aMapping);
893
+ } else {
894
+ this._sorted = false;
895
+ this._array.push(aMapping);
896
+ }
897
+ };
898
+ MappingList$1.prototype.toArray = function MappingList_toArray() {
899
+ if (!this._sorted) {
900
+ this._array.sort(util$3.compareByGeneratedPositionsInflated);
901
+ this._sorted = true;
902
+ }
903
+ return this._array;
904
+ };
905
+ exports.MappingList = MappingList$1;
906
+ } });
907
+ var require_source_map_generator = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js"(exports) {
908
+ var base64VLQ$1 = require_base64_vlq();
909
+ var util$2 = require_util();
910
+ var ArraySet$1 = require_array_set().ArraySet;
911
+ var MappingList = require_mapping_list().MappingList;
912
+ function SourceMapGenerator$1(aArgs) {
913
+ if (!aArgs) aArgs = {};
914
+ this._file = util$2.getArg(aArgs, "file", null);
915
+ this._sourceRoot = util$2.getArg(aArgs, "sourceRoot", null);
916
+ this._skipValidation = util$2.getArg(aArgs, "skipValidation", false);
917
+ this._ignoreInvalidMapping = util$2.getArg(aArgs, "ignoreInvalidMapping", false);
918
+ this._sources = new ArraySet$1();
919
+ this._names = new ArraySet$1();
920
+ this._mappings = new MappingList();
921
+ this._sourcesContents = null;
922
+ }
923
+ SourceMapGenerator$1.prototype._version = 3;
924
+ SourceMapGenerator$1.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {
925
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
926
+ var generator = new SourceMapGenerator$1(Object.assign(generatorOps || {}, {
927
+ file: aSourceMapConsumer.file,
928
+ sourceRoot
929
+ }));
930
+ aSourceMapConsumer.eachMapping(function(mapping) {
931
+ var newMapping = { generated: {
932
+ line: mapping.generatedLine,
933
+ column: mapping.generatedColumn
934
+ } };
935
+ if (mapping.source != null) {
936
+ newMapping.source = mapping.source;
937
+ if (sourceRoot != null) newMapping.source = util$2.relative(sourceRoot, newMapping.source);
938
+ newMapping.original = {
939
+ line: mapping.originalLine,
940
+ column: mapping.originalColumn
941
+ };
942
+ if (mapping.name != null) newMapping.name = mapping.name;
943
+ }
944
+ generator.addMapping(newMapping);
945
+ });
946
+ aSourceMapConsumer.sources.forEach(function(sourceFile) {
947
+ var sourceRelative = sourceFile;
948
+ if (sourceRoot !== null) sourceRelative = util$2.relative(sourceRoot, sourceFile);
949
+ if (!generator._sources.has(sourceRelative)) generator._sources.add(sourceRelative);
950
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
951
+ if (content != null) generator.setSourceContent(sourceFile, content);
952
+ });
953
+ return generator;
954
+ };
955
+ SourceMapGenerator$1.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
956
+ var generated = util$2.getArg(aArgs, "generated");
957
+ var original = util$2.getArg(aArgs, "original", null);
958
+ var source = util$2.getArg(aArgs, "source", null);
959
+ var name = util$2.getArg(aArgs, "name", null);
960
+ if (!this._skipValidation) {
961
+ if (this._validateMapping(generated, original, source, name) === false) return;
962
+ }
963
+ if (source != null) {
964
+ source = String(source);
965
+ if (!this._sources.has(source)) this._sources.add(source);
966
+ }
967
+ if (name != null) {
968
+ name = String(name);
969
+ if (!this._names.has(name)) this._names.add(name);
970
+ }
971
+ this._mappings.add({
972
+ generatedLine: generated.line,
973
+ generatedColumn: generated.column,
974
+ originalLine: original != null && original.line,
975
+ originalColumn: original != null && original.column,
976
+ source,
977
+ name
978
+ });
979
+ };
980
+ SourceMapGenerator$1.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
981
+ var source = aSourceFile;
982
+ if (this._sourceRoot != null) source = util$2.relative(this._sourceRoot, source);
983
+ if (aSourceContent != null) {
984
+ if (!this._sourcesContents) this._sourcesContents = /* @__PURE__ */ Object.create(null);
985
+ this._sourcesContents[util$2.toSetString(source)] = aSourceContent;
986
+ } else if (this._sourcesContents) {
987
+ delete this._sourcesContents[util$2.toSetString(source)];
988
+ if (Object.keys(this._sourcesContents).length === 0) this._sourcesContents = null;
989
+ }
990
+ };
991
+ SourceMapGenerator$1.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
992
+ var sourceFile = aSourceFile;
993
+ if (aSourceFile == null) {
994
+ if (aSourceMapConsumer.file == null) throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);
995
+ sourceFile = aSourceMapConsumer.file;
996
+ }
997
+ var sourceRoot = this._sourceRoot;
998
+ if (sourceRoot != null) sourceFile = util$2.relative(sourceRoot, sourceFile);
999
+ var newSources = new ArraySet$1();
1000
+ var newNames = new ArraySet$1();
1001
+ this._mappings.unsortedForEach(function(mapping) {
1002
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
1003
+ var original = aSourceMapConsumer.originalPositionFor({
1004
+ line: mapping.originalLine,
1005
+ column: mapping.originalColumn
1006
+ });
1007
+ if (original.source != null) {
1008
+ mapping.source = original.source;
1009
+ if (aSourceMapPath != null) mapping.source = util$2.join(aSourceMapPath, mapping.source);
1010
+ if (sourceRoot != null) mapping.source = util$2.relative(sourceRoot, mapping.source);
1011
+ mapping.originalLine = original.line;
1012
+ mapping.originalColumn = original.column;
1013
+ if (original.name != null) mapping.name = original.name;
1014
+ }
1015
+ }
1016
+ var source = mapping.source;
1017
+ if (source != null && !newSources.has(source)) newSources.add(source);
1018
+ var name = mapping.name;
1019
+ if (name != null && !newNames.has(name)) newNames.add(name);
1020
+ }, this);
1021
+ this._sources = newSources;
1022
+ this._names = newNames;
1023
+ aSourceMapConsumer.sources.forEach(function(sourceFile$1) {
1024
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile$1);
1025
+ if (content != null) {
1026
+ if (aSourceMapPath != null) sourceFile$1 = util$2.join(aSourceMapPath, sourceFile$1);
1027
+ if (sourceRoot != null) sourceFile$1 = util$2.relative(sourceRoot, sourceFile$1);
1028
+ this.setSourceContent(sourceFile$1, content);
1029
+ }
1030
+ }, this);
1031
+ };
1032
+ SourceMapGenerator$1.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
1033
+ if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
1034
+ var message = "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";
1035
+ if (this._ignoreInvalidMapping) {
1036
+ if (typeof console !== "undefined" && console.warn) console.warn(message);
1037
+ return false;
1038
+ } else throw new Error(message);
1039
+ }
1040
+ if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) return;
1041
+ else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) return;
1042
+ else {
1043
+ var message = "Invalid mapping: " + JSON.stringify({
1044
+ generated: aGenerated,
1045
+ source: aSource,
1046
+ original: aOriginal,
1047
+ name: aName
1048
+ });
1049
+ if (this._ignoreInvalidMapping) {
1050
+ if (typeof console !== "undefined" && console.warn) console.warn(message);
1051
+ return false;
1052
+ } else throw new Error(message);
1053
+ }
1054
+ };
1055
+ SourceMapGenerator$1.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
1056
+ var previousGeneratedColumn = 0;
1057
+ var previousGeneratedLine = 1;
1058
+ var previousOriginalColumn = 0;
1059
+ var previousOriginalLine = 0;
1060
+ var previousName = 0;
1061
+ var previousSource = 0;
1062
+ var result = "";
1063
+ var next;
1064
+ var mapping;
1065
+ var nameIdx;
1066
+ var sourceIdx;
1067
+ var mappings = this._mappings.toArray();
1068
+ for (var i = 0, len = mappings.length; i < len; i++) {
1069
+ mapping = mappings[i];
1070
+ next = "";
1071
+ if (mapping.generatedLine !== previousGeneratedLine) {
1072
+ previousGeneratedColumn = 0;
1073
+ while (mapping.generatedLine !== previousGeneratedLine) {
1074
+ next += ";";
1075
+ previousGeneratedLine++;
1076
+ }
1077
+ } else if (i > 0) {
1078
+ if (!util$2.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) continue;
1079
+ next += ",";
1080
+ }
1081
+ next += base64VLQ$1.encode(mapping.generatedColumn - previousGeneratedColumn);
1082
+ previousGeneratedColumn = mapping.generatedColumn;
1083
+ if (mapping.source != null) {
1084
+ sourceIdx = this._sources.indexOf(mapping.source);
1085
+ next += base64VLQ$1.encode(sourceIdx - previousSource);
1086
+ previousSource = sourceIdx;
1087
+ next += base64VLQ$1.encode(mapping.originalLine - 1 - previousOriginalLine);
1088
+ previousOriginalLine = mapping.originalLine - 1;
1089
+ next += base64VLQ$1.encode(mapping.originalColumn - previousOriginalColumn);
1090
+ previousOriginalColumn = mapping.originalColumn;
1091
+ if (mapping.name != null) {
1092
+ nameIdx = this._names.indexOf(mapping.name);
1093
+ next += base64VLQ$1.encode(nameIdx - previousName);
1094
+ previousName = nameIdx;
1095
+ }
1096
+ }
1097
+ result += next;
1098
+ }
1099
+ return result;
1100
+ };
1101
+ SourceMapGenerator$1.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
1102
+ return aSources.map(function(source) {
1103
+ if (!this._sourcesContents) return null;
1104
+ if (aSourceRoot != null) source = util$2.relative(aSourceRoot, source);
1105
+ var key = util$2.toSetString(source);
1106
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
1107
+ }, this);
1108
+ };
1109
+ SourceMapGenerator$1.prototype.toJSON = function SourceMapGenerator_toJSON() {
1110
+ var map = {
1111
+ version: this._version,
1112
+ sources: this._sources.toArray(),
1113
+ names: this._names.toArray(),
1114
+ mappings: this._serializeMappings()
1115
+ };
1116
+ if (this._file != null) map.file = this._file;
1117
+ if (this._sourceRoot != null) map.sourceRoot = this._sourceRoot;
1118
+ if (this._sourcesContents) map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
1119
+ return map;
1120
+ };
1121
+ SourceMapGenerator$1.prototype.toString = function SourceMapGenerator_toString() {
1122
+ return JSON.stringify(this.toJSON());
1123
+ };
1124
+ exports.SourceMapGenerator = SourceMapGenerator$1;
1125
+ } });
1126
+ var require_binary_search = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js"(exports) {
1127
+ exports.GREATEST_LOWER_BOUND = 1;
1128
+ exports.LEAST_UPPER_BOUND = 2;
1129
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
1130
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
1131
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
1132
+ if (cmp === 0) return mid;
1133
+ else if (cmp > 0) {
1134
+ if (aHigh - mid > 1) return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
1135
+ if (aBias == exports.LEAST_UPPER_BOUND) return aHigh < aHaystack.length ? aHigh : -1;
1136
+ else return mid;
1137
+ } else {
1138
+ if (mid - aLow > 1) return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
1139
+ if (aBias == exports.LEAST_UPPER_BOUND) return mid;
1140
+ else return aLow < 0 ? -1 : aLow;
1141
+ }
1142
+ }
1143
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
1144
+ if (aHaystack.length === 0) return -1;
1145
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
1146
+ if (index < 0) return -1;
1147
+ while (index - 1 >= 0) {
1148
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) break;
1149
+ --index;
1150
+ }
1151
+ return index;
1152
+ };
1153
+ } });
1154
+ var require_quick_sort = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js"(exports) {
1155
+ function SortTemplate(comparator) {
1156
+ function swap(ary, x, y) {
1157
+ var temp = ary[x];
1158
+ ary[x] = ary[y];
1159
+ ary[y] = temp;
1160
+ }
1161
+ function randomIntInRange(low, high) {
1162
+ return Math.round(low + Math.random() * (high - low));
1163
+ }
1164
+ function doQuickSort(ary, comparator$1, p, r) {
1165
+ if (p < r) {
1166
+ var pivotIndex = randomIntInRange(p, r);
1167
+ var i = p - 1;
1168
+ swap(ary, pivotIndex, r);
1169
+ var pivot = ary[r];
1170
+ for (var j = p; j < r; j++) if (comparator$1(ary[j], pivot, false) <= 0) {
1171
+ i += 1;
1172
+ swap(ary, i, j);
1173
+ }
1174
+ swap(ary, i + 1, j);
1175
+ var q = i + 1;
1176
+ doQuickSort(ary, comparator$1, p, q - 1);
1177
+ doQuickSort(ary, comparator$1, q + 1, r);
1178
+ }
1179
+ }
1180
+ return doQuickSort;
1181
+ }
1182
+ function cloneSort(comparator) {
1183
+ let template = SortTemplate.toString();
1184
+ let templateFn = new Function(`return ${template}`)();
1185
+ return templateFn(comparator);
1186
+ }
1187
+ let sortCache = /* @__PURE__ */ new WeakMap();
1188
+ exports.quickSort = function(ary, comparator, start = 0) {
1189
+ let doQuickSort = sortCache.get(comparator);
1190
+ if (doQuickSort === undefined) {
1191
+ doQuickSort = cloneSort(comparator);
1192
+ sortCache.set(comparator, doQuickSort);
1193
+ }
1194
+ doQuickSort(ary, comparator, start, ary.length - 1);
1195
+ };
1196
+ } });
1197
+ var require_source_map_consumer = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js"(exports) {
1198
+ var util$1 = require_util();
1199
+ var binarySearch = require_binary_search();
1200
+ var ArraySet = require_array_set().ArraySet;
1201
+ var base64VLQ = require_base64_vlq();
1202
+ var quickSort = require_quick_sort().quickSort;
1203
+ function SourceMapConsumer$1(aSourceMap, aSourceMapURL) {
1204
+ var sourceMap = aSourceMap;
1205
+ if (typeof aSourceMap === "string") sourceMap = util$1.parseSourceMapInput(aSourceMap);
1206
+ return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
1207
+ }
1208
+ SourceMapConsumer$1.fromSourceMap = function(aSourceMap, aSourceMapURL) {
1209
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
1210
+ };
1211
+ SourceMapConsumer$1.prototype._version = 3;
1212
+ SourceMapConsumer$1.prototype.__generatedMappings = null;
1213
+ Object.defineProperty(SourceMapConsumer$1.prototype, "_generatedMappings", {
1214
+ configurable: true,
1215
+ enumerable: true,
1216
+ get: function() {
1217
+ if (!this.__generatedMappings) this._parseMappings(this._mappings, this.sourceRoot);
1218
+ return this.__generatedMappings;
1219
+ }
1220
+ });
1221
+ SourceMapConsumer$1.prototype.__originalMappings = null;
1222
+ Object.defineProperty(SourceMapConsumer$1.prototype, "_originalMappings", {
1223
+ configurable: true,
1224
+ enumerable: true,
1225
+ get: function() {
1226
+ if (!this.__originalMappings) this._parseMappings(this._mappings, this.sourceRoot);
1227
+ return this.__originalMappings;
1228
+ }
1229
+ });
1230
+ SourceMapConsumer$1.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
1231
+ var c = aStr.charAt(index);
1232
+ return c === ";" || c === ",";
1233
+ };
1234
+ SourceMapConsumer$1.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1235
+ throw new Error("Subclasses must implement _parseMappings");
1236
+ };
1237
+ SourceMapConsumer$1.GENERATED_ORDER = 1;
1238
+ SourceMapConsumer$1.ORIGINAL_ORDER = 2;
1239
+ SourceMapConsumer$1.GREATEST_LOWER_BOUND = 1;
1240
+ SourceMapConsumer$1.LEAST_UPPER_BOUND = 2;
1241
+ SourceMapConsumer$1.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
1242
+ var context = aContext || null;
1243
+ var order = aOrder || SourceMapConsumer$1.GENERATED_ORDER;
1244
+ var mappings;
1245
+ switch (order) {
1246
+ case SourceMapConsumer$1.GENERATED_ORDER:
1247
+ mappings = this._generatedMappings;
1248
+ break;
1249
+ case SourceMapConsumer$1.ORIGINAL_ORDER:
1250
+ mappings = this._originalMappings;
1251
+ break;
1252
+ default:
1253
+ throw new Error("Unknown order of iteration.");
1254
+ }
1255
+ var sourceRoot = this.sourceRoot;
1256
+ var boundCallback = aCallback.bind(context);
1257
+ var names = this._names;
1258
+ var sources = this._sources;
1259
+ var sourceMapURL = this._sourceMapURL;
1260
+ for (var i = 0, n = mappings.length; i < n; i++) {
1261
+ var mapping = mappings[i];
1262
+ var source = mapping.source === null ? null : sources.at(mapping.source);
1263
+ if (source !== null) source = util$1.computeSourceURL(sourceRoot, source, sourceMapURL);
1264
+ boundCallback({
1265
+ source,
1266
+ generatedLine: mapping.generatedLine,
1267
+ generatedColumn: mapping.generatedColumn,
1268
+ originalLine: mapping.originalLine,
1269
+ originalColumn: mapping.originalColumn,
1270
+ name: mapping.name === null ? null : names.at(mapping.name)
1271
+ });
1272
+ }
1273
+ };
1274
+ SourceMapConsumer$1.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
1275
+ var line = util$1.getArg(aArgs, "line");
1276
+ var needle = {
1277
+ source: util$1.getArg(aArgs, "source"),
1278
+ originalLine: line,
1279
+ originalColumn: util$1.getArg(aArgs, "column", 0)
1280
+ };
1281
+ needle.source = this._findSourceIndex(needle.source);
1282
+ if (needle.source < 0) return [];
1283
+ var mappings = [];
1284
+ var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util$1.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
1285
+ if (index >= 0) {
1286
+ var mapping = this._originalMappings[index];
1287
+ if (aArgs.column === undefined) {
1288
+ var originalLine = mapping.originalLine;
1289
+ while (mapping && mapping.originalLine === originalLine) {
1290
+ mappings.push({
1291
+ line: util$1.getArg(mapping, "generatedLine", null),
1292
+ column: util$1.getArg(mapping, "generatedColumn", null),
1293
+ lastColumn: util$1.getArg(mapping, "lastGeneratedColumn", null)
1294
+ });
1295
+ mapping = this._originalMappings[++index];
1296
+ }
1297
+ } else {
1298
+ var originalColumn = mapping.originalColumn;
1299
+ while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
1300
+ mappings.push({
1301
+ line: util$1.getArg(mapping, "generatedLine", null),
1302
+ column: util$1.getArg(mapping, "generatedColumn", null),
1303
+ lastColumn: util$1.getArg(mapping, "lastGeneratedColumn", null)
1304
+ });
1305
+ mapping = this._originalMappings[++index];
1306
+ }
1307
+ }
1308
+ }
1309
+ return mappings;
1310
+ };
1311
+ exports.SourceMapConsumer = SourceMapConsumer$1;
1312
+ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
1313
+ var sourceMap = aSourceMap;
1314
+ if (typeof aSourceMap === "string") sourceMap = util$1.parseSourceMapInput(aSourceMap);
1315
+ var version2 = util$1.getArg(sourceMap, "version");
1316
+ var sources = util$1.getArg(sourceMap, "sources");
1317
+ var names = util$1.getArg(sourceMap, "names", []);
1318
+ var sourceRoot = util$1.getArg(sourceMap, "sourceRoot", null);
1319
+ var sourcesContent = util$1.getArg(sourceMap, "sourcesContent", null);
1320
+ var mappings = util$1.getArg(sourceMap, "mappings");
1321
+ var file = util$1.getArg(sourceMap, "file", null);
1322
+ if (version2 != this._version) throw new Error("Unsupported version: " + version2);
1323
+ if (sourceRoot) sourceRoot = util$1.normalize(sourceRoot);
1324
+ sources = sources.map(String).map(util$1.normalize).map(function(source) {
1325
+ return sourceRoot && util$1.isAbsolute(sourceRoot) && util$1.isAbsolute(source) ? util$1.relative(sourceRoot, source) : source;
1326
+ });
1327
+ this._names = ArraySet.fromArray(names.map(String), true);
1328
+ this._sources = ArraySet.fromArray(sources, true);
1329
+ this._absoluteSources = this._sources.toArray().map(function(s) {
1330
+ return util$1.computeSourceURL(sourceRoot, s, aSourceMapURL);
1331
+ });
1332
+ this.sourceRoot = sourceRoot;
1333
+ this.sourcesContent = sourcesContent;
1334
+ this._mappings = mappings;
1335
+ this._sourceMapURL = aSourceMapURL;
1336
+ this.file = file;
1337
+ }
1338
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);
1339
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1;
1340
+ BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
1341
+ var relativeSource = aSource;
1342
+ if (this.sourceRoot != null) relativeSource = util$1.relative(this.sourceRoot, relativeSource);
1343
+ if (this._sources.has(relativeSource)) return this._sources.indexOf(relativeSource);
1344
+ var i;
1345
+ for (i = 0; i < this._absoluteSources.length; ++i) if (this._absoluteSources[i] == aSource) return i;
1346
+ return -1;
1347
+ };
1348
+ BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
1349
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
1350
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
1351
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
1352
+ smc.sourceRoot = aSourceMap._sourceRoot;
1353
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
1354
+ smc.file = aSourceMap._file;
1355
+ smc._sourceMapURL = aSourceMapURL;
1356
+ smc._absoluteSources = smc._sources.toArray().map(function(s) {
1357
+ return util$1.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
1358
+ });
1359
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
1360
+ var destGeneratedMappings = smc.__generatedMappings = [];
1361
+ var destOriginalMappings = smc.__originalMappings = [];
1362
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
1363
+ var srcMapping = generatedMappings[i];
1364
+ var destMapping = new Mapping();
1365
+ destMapping.generatedLine = srcMapping.generatedLine;
1366
+ destMapping.generatedColumn = srcMapping.generatedColumn;
1367
+ if (srcMapping.source) {
1368
+ destMapping.source = sources.indexOf(srcMapping.source);
1369
+ destMapping.originalLine = srcMapping.originalLine;
1370
+ destMapping.originalColumn = srcMapping.originalColumn;
1371
+ if (srcMapping.name) destMapping.name = names.indexOf(srcMapping.name);
1372
+ destOriginalMappings.push(destMapping);
1373
+ }
1374
+ destGeneratedMappings.push(destMapping);
1375
+ }
1376
+ quickSort(smc.__originalMappings, util$1.compareByOriginalPositions);
1377
+ return smc;
1378
+ };
1379
+ BasicSourceMapConsumer.prototype._version = 3;
1380
+ Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { get: function() {
1381
+ return this._absoluteSources.slice();
1382
+ } });
1383
+ function Mapping() {
1384
+ this.generatedLine = 0;
1385
+ this.generatedColumn = 0;
1386
+ this.source = null;
1387
+ this.originalLine = null;
1388
+ this.originalColumn = null;
1389
+ this.name = null;
1390
+ }
1391
+ const compareGenerated = util$1.compareByGeneratedPositionsDeflatedNoLine;
1392
+ function sortGenerated(array, start) {
1393
+ let l = array.length;
1394
+ let n = array.length - start;
1395
+ if (n <= 1) return;
1396
+ else if (n == 2) {
1397
+ let a = array[start];
1398
+ let b = array[start + 1];
1399
+ if (compareGenerated(a, b) > 0) {
1400
+ array[start] = b;
1401
+ array[start + 1] = a;
1402
+ }
1403
+ } else if (n < 20) for (let i = start; i < l; i++) for (let j = i; j > start; j--) {
1404
+ let a = array[j - 1];
1405
+ let b = array[j];
1406
+ if (compareGenerated(a, b) <= 0) break;
1407
+ array[j - 1] = b;
1408
+ array[j] = a;
1409
+ }
1410
+ else quickSort(array, compareGenerated, start);
1411
+ }
1412
+ BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1413
+ var generatedLine = 1;
1414
+ var previousGeneratedColumn = 0;
1415
+ var previousOriginalLine = 0;
1416
+ var previousOriginalColumn = 0;
1417
+ var previousSource = 0;
1418
+ var previousName = 0;
1419
+ var length = aStr.length;
1420
+ var index = 0;
1421
+ var temp = {};
1422
+ var originalMappings = [];
1423
+ var generatedMappings = [];
1424
+ var mapping, segment, end, value;
1425
+ let subarrayStart = 0;
1426
+ while (index < length) if (aStr.charAt(index) === ";") {
1427
+ generatedLine++;
1428
+ index++;
1429
+ previousGeneratedColumn = 0;
1430
+ sortGenerated(generatedMappings, subarrayStart);
1431
+ subarrayStart = generatedMappings.length;
1432
+ } else if (aStr.charAt(index) === ",") index++;
1433
+ else {
1434
+ mapping = new Mapping();
1435
+ mapping.generatedLine = generatedLine;
1436
+ for (end = index; end < length; end++) if (this._charIsMappingSeparator(aStr, end)) break;
1437
+ aStr.slice(index, end);
1438
+ segment = [];
1439
+ while (index < end) {
1440
+ base64VLQ.decode(aStr, index, temp);
1441
+ value = temp.value;
1442
+ index = temp.rest;
1443
+ segment.push(value);
1444
+ }
1445
+ if (segment.length === 2) throw new Error("Found a source, but no line and column");
1446
+ if (segment.length === 3) throw new Error("Found a source and line, but no column");
1447
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
1448
+ previousGeneratedColumn = mapping.generatedColumn;
1449
+ if (segment.length > 1) {
1450
+ mapping.source = previousSource + segment[1];
1451
+ previousSource += segment[1];
1452
+ mapping.originalLine = previousOriginalLine + segment[2];
1453
+ previousOriginalLine = mapping.originalLine;
1454
+ mapping.originalLine += 1;
1455
+ mapping.originalColumn = previousOriginalColumn + segment[3];
1456
+ previousOriginalColumn = mapping.originalColumn;
1457
+ if (segment.length > 4) {
1458
+ mapping.name = previousName + segment[4];
1459
+ previousName += segment[4];
1460
+ }
1461
+ }
1462
+ generatedMappings.push(mapping);
1463
+ if (typeof mapping.originalLine === "number") {
1464
+ let currentSource = mapping.source;
1465
+ while (originalMappings.length <= currentSource) originalMappings.push(null);
1466
+ if (originalMappings[currentSource] === null) originalMappings[currentSource] = [];
1467
+ originalMappings[currentSource].push(mapping);
1468
+ }
1469
+ }
1470
+ sortGenerated(generatedMappings, subarrayStart);
1471
+ this.__generatedMappings = generatedMappings;
1472
+ for (var i = 0; i < originalMappings.length; i++) if (originalMappings[i] != null) quickSort(originalMappings[i], util$1.compareByOriginalPositionsNoSource);
1473
+ this.__originalMappings = [].concat(...originalMappings);
1474
+ };
1475
+ BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
1476
+ if (aNeedle[aLineName] <= 0) throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
1477
+ if (aNeedle[aColumnName] < 0) throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
1478
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
1479
+ };
1480
+ BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
1481
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
1482
+ var mapping = this._generatedMappings[index];
1483
+ if (index + 1 < this._generatedMappings.length) {
1484
+ var nextMapping = this._generatedMappings[index + 1];
1485
+ if (mapping.generatedLine === nextMapping.generatedLine) {
1486
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
1487
+ continue;
1488
+ }
1489
+ }
1490
+ mapping.lastGeneratedColumn = Infinity;
1491
+ }
1492
+ };
1493
+ BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
1494
+ var needle = {
1495
+ generatedLine: util$1.getArg(aArgs, "line"),
1496
+ generatedColumn: util$1.getArg(aArgs, "column")
1497
+ };
1498
+ var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util$1.compareByGeneratedPositionsDeflated, util$1.getArg(aArgs, "bias", SourceMapConsumer$1.GREATEST_LOWER_BOUND));
1499
+ if (index >= 0) {
1500
+ var mapping = this._generatedMappings[index];
1501
+ if (mapping.generatedLine === needle.generatedLine) {
1502
+ var source = util$1.getArg(mapping, "source", null);
1503
+ if (source !== null) {
1504
+ source = this._sources.at(source);
1505
+ source = util$1.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
1506
+ }
1507
+ var name = util$1.getArg(mapping, "name", null);
1508
+ if (name !== null) name = this._names.at(name);
1509
+ return {
1510
+ source,
1511
+ line: util$1.getArg(mapping, "originalLine", null),
1512
+ column: util$1.getArg(mapping, "originalColumn", null),
1513
+ name
1514
+ };
1515
+ }
1516
+ }
1517
+ return {
1518
+ source: null,
1519
+ line: null,
1520
+ column: null,
1521
+ name: null
1522
+ };
1523
+ };
1524
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
1525
+ if (!this.sourcesContent) return false;
1526
+ return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
1527
+ return sc == null;
1528
+ });
1529
+ };
1530
+ BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
1531
+ if (!this.sourcesContent) return null;
1532
+ var index = this._findSourceIndex(aSource);
1533
+ if (index >= 0) return this.sourcesContent[index];
1534
+ var relativeSource = aSource;
1535
+ if (this.sourceRoot != null) relativeSource = util$1.relative(this.sourceRoot, relativeSource);
1536
+ var url;
1537
+ if (this.sourceRoot != null && (url = util$1.urlParse(this.sourceRoot))) {
1538
+ var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
1539
+ if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
1540
+ if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
1541
+ }
1542
+ if (nullOnMissing) return null;
1543
+ else throw new Error('"' + relativeSource + '" is not in the SourceMap.');
1544
+ };
1545
+ BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
1546
+ var source = util$1.getArg(aArgs, "source");
1547
+ source = this._findSourceIndex(source);
1548
+ if (source < 0) return {
1549
+ line: null,
1550
+ column: null,
1551
+ lastColumn: null
1552
+ };
1553
+ var needle = {
1554
+ source,
1555
+ originalLine: util$1.getArg(aArgs, "line"),
1556
+ originalColumn: util$1.getArg(aArgs, "column")
1557
+ };
1558
+ var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util$1.compareByOriginalPositions, util$1.getArg(aArgs, "bias", SourceMapConsumer$1.GREATEST_LOWER_BOUND));
1559
+ if (index >= 0) {
1560
+ var mapping = this._originalMappings[index];
1561
+ if (mapping.source === needle.source) return {
1562
+ line: util$1.getArg(mapping, "generatedLine", null),
1563
+ column: util$1.getArg(mapping, "generatedColumn", null),
1564
+ lastColumn: util$1.getArg(mapping, "lastGeneratedColumn", null)
1565
+ };
1566
+ }
1567
+ return {
1568
+ line: null,
1569
+ column: null,
1570
+ lastColumn: null
1571
+ };
1572
+ };
1573
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
1574
+ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
1575
+ var sourceMap = aSourceMap;
1576
+ if (typeof aSourceMap === "string") sourceMap = util$1.parseSourceMapInput(aSourceMap);
1577
+ var version2 = util$1.getArg(sourceMap, "version");
1578
+ var sections = util$1.getArg(sourceMap, "sections");
1579
+ if (version2 != this._version) throw new Error("Unsupported version: " + version2);
1580
+ this._sources = new ArraySet();
1581
+ this._names = new ArraySet();
1582
+ var lastOffset = {
1583
+ line: -1,
1584
+ column: 0
1585
+ };
1586
+ this._sections = sections.map(function(s) {
1587
+ if (s.url) throw new Error("Support for url field in sections not implemented.");
1588
+ var offset = util$1.getArg(s, "offset");
1589
+ var offsetLine = util$1.getArg(offset, "line");
1590
+ var offsetColumn = util$1.getArg(offset, "column");
1591
+ if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) throw new Error("Section offsets must be ordered and non-overlapping.");
1592
+ lastOffset = offset;
1593
+ return {
1594
+ generatedOffset: {
1595
+ generatedLine: offsetLine + 1,
1596
+ generatedColumn: offsetColumn + 1
1597
+ },
1598
+ consumer: new SourceMapConsumer$1(util$1.getArg(s, "map"), aSourceMapURL)
1599
+ };
1600
+ });
1601
+ }
1602
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);
1603
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer$1;
1604
+ IndexedSourceMapConsumer.prototype._version = 3;
1605
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
1606
+ var sources = [];
1607
+ for (var i = 0; i < this._sections.length; i++) for (var j = 0; j < this._sections[i].consumer.sources.length; j++) sources.push(this._sections[i].consumer.sources[j]);
1608
+ return sources;
1609
+ } });
1610
+ IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
1611
+ var needle = {
1612
+ generatedLine: util$1.getArg(aArgs, "line"),
1613
+ generatedColumn: util$1.getArg(aArgs, "column")
1614
+ };
1615
+ var sectionIndex = binarySearch.search(needle, this._sections, function(needle$1, section$1) {
1616
+ var cmp = needle$1.generatedLine - section$1.generatedOffset.generatedLine;
1617
+ if (cmp) return cmp;
1618
+ return needle$1.generatedColumn - section$1.generatedOffset.generatedColumn;
1619
+ });
1620
+ var section = this._sections[sectionIndex];
1621
+ if (!section) return {
1622
+ source: null,
1623
+ line: null,
1624
+ column: null,
1625
+ name: null
1626
+ };
1627
+ return section.consumer.originalPositionFor({
1628
+ line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
1629
+ column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
1630
+ bias: aArgs.bias
1631
+ });
1632
+ };
1633
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
1634
+ return this._sections.every(function(s) {
1635
+ return s.consumer.hasContentsOfAllSources();
1636
+ });
1637
+ };
1638
+ IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
1639
+ for (var i = 0; i < this._sections.length; i++) {
1640
+ var section = this._sections[i];
1641
+ var content = section.consumer.sourceContentFor(aSource, true);
1642
+ if (content || content === "") return content;
1643
+ }
1644
+ if (nullOnMissing) return null;
1645
+ else throw new Error('"' + aSource + '" is not in the SourceMap.');
1646
+ };
1647
+ IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
1648
+ for (var i = 0; i < this._sections.length; i++) {
1649
+ var section = this._sections[i];
1650
+ if (section.consumer._findSourceIndex(util$1.getArg(aArgs, "source")) === -1) continue;
1651
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
1652
+ if (generatedPosition) {
1653
+ var ret = {
1654
+ line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
1655
+ column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
1656
+ };
1657
+ return ret;
1658
+ }
1659
+ }
1660
+ return {
1661
+ line: null,
1662
+ column: null
1663
+ };
1664
+ };
1665
+ IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1666
+ this.__generatedMappings = [];
1667
+ this.__originalMappings = [];
1668
+ for (var i = 0; i < this._sections.length; i++) {
1669
+ var section = this._sections[i];
1670
+ var sectionMappings = section.consumer._generatedMappings;
1671
+ for (var j = 0; j < sectionMappings.length; j++) {
1672
+ var mapping = sectionMappings[j];
1673
+ var source = section.consumer._sources.at(mapping.source);
1674
+ if (source !== null) source = util$1.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
1675
+ this._sources.add(source);
1676
+ source = this._sources.indexOf(source);
1677
+ var name = null;
1678
+ if (mapping.name) {
1679
+ name = section.consumer._names.at(mapping.name);
1680
+ this._names.add(name);
1681
+ name = this._names.indexOf(name);
1682
+ }
1683
+ var adjustedMapping = {
1684
+ source,
1685
+ generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
1686
+ generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
1687
+ originalLine: mapping.originalLine,
1688
+ originalColumn: mapping.originalColumn,
1689
+ name
1690
+ };
1691
+ this.__generatedMappings.push(adjustedMapping);
1692
+ if (typeof adjustedMapping.originalLine === "number") this.__originalMappings.push(adjustedMapping);
1693
+ }
1694
+ }
1695
+ quickSort(this.__generatedMappings, util$1.compareByGeneratedPositionsDeflated);
1696
+ quickSort(this.__originalMappings, util$1.compareByOriginalPositions);
1697
+ };
1698
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
1699
+ } });
1700
+ var require_source_node = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js"(exports) {
1701
+ var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
1702
+ var util = require_util();
1703
+ var REGEX_NEWLINE = /(\r?\n)/;
1704
+ var NEWLINE_CODE = 10;
1705
+ var isSourceNode = "$$$isSourceNode$$$";
1706
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
1707
+ this.children = [];
1708
+ this.sourceContents = {};
1709
+ this.line = aLine == null ? null : aLine;
1710
+ this.column = aColumn == null ? null : aColumn;
1711
+ this.source = aSource == null ? null : aSource;
1712
+ this.name = aName == null ? null : aName;
1713
+ this[isSourceNode] = true;
1714
+ if (aChunks != null) this.add(aChunks);
1715
+ }
1716
+ SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
1717
+ var node = new SourceNode();
1718
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
1719
+ var remainingLinesIndex = 0;
1720
+ var shiftNextLine = function() {
1721
+ var lineContents = getNextLine();
1722
+ var newLine = getNextLine() || "";
1723
+ return lineContents + newLine;
1724
+ function getNextLine() {
1725
+ return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
1726
+ }
1727
+ };
1728
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
1729
+ var lastMapping = null;
1730
+ aSourceMapConsumer.eachMapping(function(mapping) {
1731
+ if (lastMapping !== null) if (lastGeneratedLine < mapping.generatedLine) {
1732
+ addMappingWithCode(lastMapping, shiftNextLine());
1733
+ lastGeneratedLine++;
1734
+ lastGeneratedColumn = 0;
1735
+ } else {
1736
+ var nextLine = remainingLines[remainingLinesIndex] || "";
1737
+ var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
1738
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
1739
+ lastGeneratedColumn = mapping.generatedColumn;
1740
+ addMappingWithCode(lastMapping, code);
1741
+ lastMapping = mapping;
1742
+ return;
1743
+ }
1744
+ while (lastGeneratedLine < mapping.generatedLine) {
1745
+ node.add(shiftNextLine());
1746
+ lastGeneratedLine++;
1747
+ }
1748
+ if (lastGeneratedColumn < mapping.generatedColumn) {
1749
+ var nextLine = remainingLines[remainingLinesIndex] || "";
1750
+ node.add(nextLine.substr(0, mapping.generatedColumn));
1751
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
1752
+ lastGeneratedColumn = mapping.generatedColumn;
1753
+ }
1754
+ lastMapping = mapping;
1755
+ }, this);
1756
+ if (remainingLinesIndex < remainingLines.length) {
1757
+ if (lastMapping) addMappingWithCode(lastMapping, shiftNextLine());
1758
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
1759
+ }
1760
+ aSourceMapConsumer.sources.forEach(function(sourceFile) {
1761
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
1762
+ if (content != null) {
1763
+ if (aRelativePath != null) sourceFile = util.join(aRelativePath, sourceFile);
1764
+ node.setSourceContent(sourceFile, content);
1765
+ }
1766
+ });
1767
+ return node;
1768
+ function addMappingWithCode(mapping, code) {
1769
+ if (mapping === null || mapping.source === undefined) node.add(code);
1770
+ else {
1771
+ var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
1772
+ node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
1773
+ }
1774
+ }
1775
+ };
1776
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
1777
+ if (Array.isArray(aChunk)) aChunk.forEach(function(chunk) {
1778
+ this.add(chunk);
1779
+ }, this);
1780
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
1781
+ if (aChunk) this.children.push(aChunk);
1782
+ } else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
1783
+ return this;
1784
+ };
1785
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
1786
+ if (Array.isArray(aChunk)) for (var i = aChunk.length - 1; i >= 0; i--) this.prepend(aChunk[i]);
1787
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") this.children.unshift(aChunk);
1788
+ else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
1789
+ return this;
1790
+ };
1791
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
1792
+ var chunk;
1793
+ for (var i = 0, len = this.children.length; i < len; i++) {
1794
+ chunk = this.children[i];
1795
+ if (chunk[isSourceNode]) chunk.walk(aFn);
1796
+ else if (chunk !== "") aFn(chunk, {
1797
+ source: this.source,
1798
+ line: this.line,
1799
+ column: this.column,
1800
+ name: this.name
1801
+ });
1802
+ }
1803
+ };
1804
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
1805
+ var newChildren;
1806
+ var i;
1807
+ var len = this.children.length;
1808
+ if (len > 0) {
1809
+ newChildren = [];
1810
+ for (i = 0; i < len - 1; i++) {
1811
+ newChildren.push(this.children[i]);
1812
+ newChildren.push(aSep);
1813
+ }
1814
+ newChildren.push(this.children[i]);
1815
+ this.children = newChildren;
1816
+ }
1817
+ return this;
1818
+ };
1819
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
1820
+ var lastChild = this.children[this.children.length - 1];
1821
+ if (lastChild[isSourceNode]) lastChild.replaceRight(aPattern, aReplacement);
1822
+ else if (typeof lastChild === "string") this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
1823
+ else this.children.push("".replace(aPattern, aReplacement));
1824
+ return this;
1825
+ };
1826
+ SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
1827
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
1828
+ };
1829
+ SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
1830
+ for (var i = 0, len = this.children.length; i < len; i++) if (this.children[i][isSourceNode]) this.children[i].walkSourceContents(aFn);
1831
+ var sources = Object.keys(this.sourceContents);
1832
+ for (var i = 0, len = sources.length; i < len; i++) aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
1833
+ };
1834
+ SourceNode.prototype.toString = function SourceNode_toString() {
1835
+ var str = "";
1836
+ this.walk(function(chunk) {
1837
+ str += chunk;
1838
+ });
1839
+ return str;
1840
+ };
1841
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
1842
+ var generated = {
1843
+ code: "",
1844
+ line: 1,
1845
+ column: 0
1846
+ };
1847
+ var map = new SourceMapGenerator(aArgs);
1848
+ var sourceMappingActive = false;
1849
+ var lastOriginalSource = null;
1850
+ var lastOriginalLine = null;
1851
+ var lastOriginalColumn = null;
1852
+ var lastOriginalName = null;
1853
+ this.walk(function(chunk, original) {
1854
+ generated.code += chunk;
1855
+ if (original.source !== null && original.line !== null && original.column !== null) {
1856
+ if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) map.addMapping({
1857
+ source: original.source,
1858
+ original: {
1859
+ line: original.line,
1860
+ column: original.column
1861
+ },
1862
+ generated: {
1863
+ line: generated.line,
1864
+ column: generated.column
1865
+ },
1866
+ name: original.name
1867
+ });
1868
+ lastOriginalSource = original.source;
1869
+ lastOriginalLine = original.line;
1870
+ lastOriginalColumn = original.column;
1871
+ lastOriginalName = original.name;
1872
+ sourceMappingActive = true;
1873
+ } else if (sourceMappingActive) {
1874
+ map.addMapping({ generated: {
1875
+ line: generated.line,
1876
+ column: generated.column
1877
+ } });
1878
+ lastOriginalSource = null;
1879
+ sourceMappingActive = false;
1880
+ }
1881
+ for (var idx = 0, length = chunk.length; idx < length; idx++) if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
1882
+ generated.line++;
1883
+ generated.column = 0;
1884
+ if (idx + 1 === length) {
1885
+ lastOriginalSource = null;
1886
+ sourceMappingActive = false;
1887
+ } else if (sourceMappingActive) map.addMapping({
1888
+ source: original.source,
1889
+ original: {
1890
+ line: original.line,
1891
+ column: original.column
1892
+ },
1893
+ generated: {
1894
+ line: generated.line,
1895
+ column: generated.column
1896
+ },
1897
+ name: original.name
1898
+ });
1899
+ } else generated.column++;
1900
+ });
1901
+ this.walkSourceContents(function(sourceFile, sourceContent) {
1902
+ map.setSourceContent(sourceFile, sourceContent);
1903
+ });
1904
+ return {
1905
+ code: generated.code,
1906
+ map
1907
+ };
1908
+ };
1909
+ exports.SourceNode = SourceNode;
1910
+ } });
1911
+ var require_source_map = __commonJS({ "../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.js"(exports) {
1912
+ exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
1913
+ exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
1914
+ exports.SourceNode = require_source_node().SourceNode;
1915
+ } });
1916
+ var import_source_map = __toESM(require_source_map());
1917
+ var reentry = false;
1918
+ var describeBuiltInComponentFrame = (name) => {
1919
+ return `
1920
+ in ${name}`;
1921
+ };
1922
+ var INLINE_SOURCEMAP_REGEX = /^data:application\/json[^,]+base64,/;
1923
+ var SOURCEMAP_REGEX = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/;
1924
+ var getSourceMap = async (url, content) => {
1925
+ const lines = content.split("\n");
1926
+ let sourceMapUrl;
1927
+ for (let i = lines.length - 1; i >= 0 && !sourceMapUrl; i--) {
1928
+ const result = lines[i].match(SOURCEMAP_REGEX);
1929
+ if (result) sourceMapUrl = result[1];
1930
+ }
1931
+ if (!sourceMapUrl) return null;
1932
+ if (!(INLINE_SOURCEMAP_REGEX.test(sourceMapUrl) || sourceMapUrl.startsWith("/"))) {
1933
+ const parsedURL = url.split("/");
1934
+ parsedURL[parsedURL.length - 1] = sourceMapUrl;
1935
+ sourceMapUrl = parsedURL.join("/");
1936
+ }
1937
+ const response = await fetch(sourceMapUrl);
1938
+ const rawSourceMap = await response.json();
1939
+ return new import_source_map.SourceMapConsumer(rawSourceMap);
1940
+ };
1941
+ var parseStackFrame = async (frame, maxDepth) => {
1942
+ const sources = parseStack(frame);
1943
+ if (!sources.length) return [];
1944
+ const pendingSources = sources.slice(0, maxDepth) ;
1945
+ const results = await Promise.all(pendingSources.map(async ({ file: fileName, line: lineNumber, col: columnNumber = 0 }) => {
1946
+ if (!fileName || !lineNumber) return null;
1947
+ try {
1948
+ const response = await fetch(fileName);
1949
+ if (response.ok) {
1950
+ const content = await response.text();
1951
+ const sourcemap = await getSourceMap(fileName, content);
1952
+ if (sourcemap) {
1953
+ const result = sourcemap.originalPositionFor({
1954
+ line: lineNumber,
1955
+ column: columnNumber
1956
+ });
1957
+ return {
1958
+ fileName: (sourcemap.file || result.source).replace(/^file:\/\//, ""),
1959
+ lineNumber: result.line,
1960
+ columnNumber: result.column
1961
+ };
1962
+ }
1963
+ }
1964
+ return {
1965
+ fileName: fileName.replace(/^file:\/\//, ""),
1966
+ lineNumber,
1967
+ columnNumber
1968
+ };
1969
+ } catch {
1970
+ return {
1971
+ fileName: fileName.replace(/^file:\/\//, ""),
1972
+ lineNumber,
1973
+ columnNumber
1974
+ };
1975
+ }
1976
+ }));
1977
+ return results.filter((result) => result !== null);
1978
+ };
1979
+ var describeNativeComponentFrame = (fn, construct) => {
1980
+ if (!fn || reentry) return "";
1981
+ const previousPrepareStackTrace = Error.prepareStackTrace;
1982
+ Error.prepareStackTrace = undefined;
1983
+ reentry = true;
1984
+ const previousDispatcher = getCurrentDispatcher();
1985
+ setCurrentDispatcher(null);
1986
+ const prevError = console.error;
1987
+ const prevWarn = console.warn;
1988
+ console.error = () => {
1989
+ };
1990
+ console.warn = () => {
1991
+ };
1992
+ try {
1993
+ const RunInRootFrame = { DetermineComponentFrameRoot() {
1994
+ let control;
1995
+ try {
1996
+ if (construct) {
1997
+ const Fake = function() {
1998
+ throw Error();
1999
+ };
2000
+ Object.defineProperty(Fake.prototype, "props", { set: function() {
2001
+ throw Error();
2002
+ } });
2003
+ if (typeof Reflect === "object" && Reflect.construct) {
2004
+ try {
2005
+ Reflect.construct(Fake, []);
2006
+ } catch (x) {
2007
+ control = x;
2008
+ }
2009
+ Reflect.construct(fn, [], Fake);
2010
+ } else {
2011
+ try {
2012
+ Fake.call();
2013
+ } catch (x) {
2014
+ control = x;
2015
+ }
2016
+ fn.call(Fake.prototype);
2017
+ }
2018
+ } else {
2019
+ try {
2020
+ throw Error();
2021
+ } catch (x) {
2022
+ control = x;
2023
+ }
2024
+ const maybePromise = fn();
2025
+ if (maybePromise && typeof maybePromise.catch === "function") maybePromise.catch(() => {
2026
+ });
2027
+ }
2028
+ } catch (sample) {
2029
+ if (sample && control && typeof sample.stack === "string") return [sample.stack, control.stack];
2030
+ }
2031
+ return [null, null];
2032
+ } };
2033
+ RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
2034
+ const namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, "name");
2035
+ if (namePropDescriptor?.configurable) Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" });
2036
+ const [sampleStack, controlStack] = RunInRootFrame.DetermineComponentFrameRoot();
2037
+ if (sampleStack && controlStack) {
2038
+ const sampleLines = sampleStack.split("\n");
2039
+ const controlLines = controlStack.split("\n");
2040
+ let sampleIndex = 0;
2041
+ let controlIndex = 0;
2042
+ while (sampleIndex < sampleLines.length && !sampleLines[sampleIndex].includes("DetermineComponentFrameRoot")) sampleIndex++;
2043
+ while (controlIndex < controlLines.length && !controlLines[controlIndex].includes("DetermineComponentFrameRoot")) controlIndex++;
2044
+ if (sampleIndex === sampleLines.length || controlIndex === controlLines.length) {
2045
+ sampleIndex = sampleLines.length - 1;
2046
+ controlIndex = controlLines.length - 1;
2047
+ while (sampleIndex >= 1 && controlIndex >= 0 && sampleLines[sampleIndex] !== controlLines[controlIndex]) controlIndex--;
2048
+ }
2049
+ for (; sampleIndex >= 1 && controlIndex >= 0; sampleIndex--, controlIndex--) if (sampleLines[sampleIndex] !== controlLines[controlIndex]) {
2050
+ if (sampleIndex !== 1 || controlIndex !== 1) do {
2051
+ sampleIndex--;
2052
+ controlIndex--;
2053
+ if (controlIndex < 0 || sampleLines[sampleIndex] !== controlLines[controlIndex]) {
2054
+ let frame = `
2055
+ ${sampleLines[sampleIndex].replace(" at new ", " at ")}`;
2056
+ const displayName = getDisplayName(fn);
2057
+ if (displayName && frame.includes("<anonymous>")) frame = frame.replace("<anonymous>", displayName);
2058
+ return frame;
2059
+ }
2060
+ } while (sampleIndex >= 1 && controlIndex >= 0);
2061
+ break;
2062
+ }
2063
+ }
2064
+ } finally {
2065
+ reentry = false;
2066
+ Error.prepareStackTrace = previousPrepareStackTrace;
2067
+ setCurrentDispatcher(previousDispatcher);
2068
+ console.error = prevError;
2069
+ console.warn = prevWarn;
2070
+ }
2071
+ const name = fn ? getDisplayName(fn) : "";
2072
+ const syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2073
+ return syntheticFrame;
2074
+ };
2075
+ var getCurrentDispatcher = () => {
2076
+ const rdtHook = getRDTHook();
2077
+ for (const renderer of [...Array.from(_renderers), ...Array.from(rdtHook.renderers.values())]) {
2078
+ const currentDispatcherRef = renderer.currentDispatcherRef;
2079
+ if (currentDispatcherRef && typeof currentDispatcherRef === "object") return "H" in currentDispatcherRef ? currentDispatcherRef.H : currentDispatcherRef.current;
2080
+ }
2081
+ return null;
2082
+ };
2083
+ var setCurrentDispatcher = (value) => {
2084
+ for (const renderer of _renderers) {
2085
+ const currentDispatcherRef = renderer.currentDispatcherRef;
2086
+ if (currentDispatcherRef && typeof currentDispatcherRef === "object") if ("H" in currentDispatcherRef) currentDispatcherRef.H = value;
2087
+ else currentDispatcherRef.current = value;
2088
+ }
2089
+ };
2090
+ var describeFiber = (fiber, childFiber) => {
2091
+ const tag = fiber.tag;
2092
+ switch (tag) {
2093
+ case HostHoistableTag:
2094
+ case HostSingletonTag:
2095
+ case HostComponentTag:
2096
+ return describeBuiltInComponentFrame(fiber.type);
2097
+ case LazyComponentTag:
2098
+ return describeBuiltInComponentFrame("Lazy");
2099
+ case SuspenseComponentTag:
2100
+ if (fiber.child !== childFiber && childFiber !== null) return describeBuiltInComponentFrame("Suspense Fallback");
2101
+ return describeBuiltInComponentFrame("Suspense");
2102
+ case SuspenseListComponentTag:
2103
+ return describeBuiltInComponentFrame("SuspenseList");
2104
+ case FunctionComponentTag:
2105
+ case SimpleMemoComponentTag:
2106
+ return describeNativeComponentFrame(fiber.type, false);
2107
+ case ForwardRefTag:
2108
+ return describeNativeComponentFrame(fiber.type.render, false);
2109
+ case ClassComponentTag:
2110
+ return describeNativeComponentFrame(fiber.type, true);
2111
+ case ActivityComponentTag:
2112
+ return describeBuiltInComponentFrame("Activity");
2113
+ case ViewTransitionComponentTag:
2114
+ return describeBuiltInComponentFrame("ViewTransition");
2115
+ default:
2116
+ return "";
2117
+ }
2118
+ };
2119
+ var describeDebugInfoFrame = (name, env, _debugLocation) => {
2120
+ let result = `
2121
+ in ${name}`;
2122
+ if (env) result += ` (at ${env})`;
2123
+ return result;
2124
+ };
2125
+ var getFiberStackTrace = (workInProgress) => {
2126
+ try {
2127
+ let info = "";
2128
+ let node = workInProgress;
2129
+ let previous = null;
2130
+ do {
2131
+ info += describeFiber(node, previous);
2132
+ const debugInfo = node._debugInfo;
2133
+ if (debugInfo && Array.isArray(debugInfo)) for (let i = debugInfo.length - 1; i >= 0; i--) {
2134
+ const entry = debugInfo[i];
2135
+ if (typeof entry.name === "string") info += describeDebugInfoFrame(entry.name, entry.env, entry.debugLocation);
2136
+ }
2137
+ previous = node;
2138
+ node = node.return;
2139
+ } while (node);
2140
+ return info;
2141
+ } catch (error) {
2142
+ if (error instanceof Error) return `
2143
+ Error generating stack: ${error.message}
2144
+ ${error.stack}`;
2145
+ return "";
2146
+ }
2147
+ };
2148
+ var isCapitalized = (str) => {
2149
+ if (!str.length) return false;
2150
+ return str[0] === str[0].toUpperCase();
2151
+ };
2152
+ var getOwnerStack = async (stackTrace) => {
2153
+ const componentPattern = /\n\s+(?:in|at)\s+([^\s(]+)(?:\s+\((?:at\s+)?([^)]+)\))?/g;
2154
+ const matches = [];
2155
+ let match;
2156
+ match = componentPattern.exec(stackTrace);
2157
+ while (match !== null) {
2158
+ const name = match[1];
2159
+ const locationStr = match[2];
2160
+ if (!isCapitalized(name)) {
2161
+ match = componentPattern.exec(stackTrace);
2162
+ matches.push({
2163
+ name,
2164
+ source: undefined
2165
+ });
2166
+ continue;
2167
+ }
2168
+ let source;
2169
+ if (locationStr && locationStr !== "Server") try {
2170
+ const mockFrame = ` at ${name} (${locationStr})`;
2171
+ const parsedSources = await parseStackFrame(mockFrame, 1);
2172
+ if (parsedSources.length > 0) source = parsedSources[0];
2173
+ } catch {
2174
+ }
2175
+ matches.push({
2176
+ name,
2177
+ source: source || undefined
2178
+ });
2179
+ match = componentPattern.exec(stackTrace);
2180
+ }
2181
+ return matches;
2182
+ };
2183
+
2184
+ // src/utils/data.ts
2185
+ var getStack = async (element) => {
2186
+ const fiber = getFiberFromHostInstance(element);
2187
+ if (!fiber) return null;
2188
+ const stackTrace = getFiberStackTrace(fiber);
2189
+ console.log(stackTrace);
2190
+ const rawOwnerStack = await getOwnerStack(stackTrace);
2191
+ console.log(rawOwnerStack);
2192
+ const stack = rawOwnerStack.map((item) => ({
2193
+ componentName: item.name,
2194
+ fileName: item.source?.fileName
2195
+ }));
2196
+ return stack;
2197
+ };
2198
+ var filterStack = (stack) => {
2199
+ return stack.filter(
2200
+ (item) => item.fileName && !item.fileName.includes("node_modules") && item.componentName.length > 1 && !item.fileName.startsWith("_")
2201
+ );
2202
+ };
2203
+ var findCommonRoot = (paths) => {
2204
+ if (paths.length === 0) return "";
2205
+ if (paths.length === 1) {
2206
+ const lastSlash2 = paths[0].lastIndexOf("/");
2207
+ return lastSlash2 > 0 ? paths[0].substring(0, lastSlash2 + 1) : "";
2208
+ }
2209
+ let commonPrefix = paths[0];
2210
+ for (let i = 1; i < paths.length; i++) {
2211
+ const path = paths[i];
2212
+ let j = 0;
2213
+ while (j < commonPrefix.length && j < path.length && commonPrefix[j] === path[j]) {
2214
+ j++;
2215
+ }
2216
+ commonPrefix = commonPrefix.substring(0, j);
2217
+ }
2218
+ const lastSlash = commonPrefix.lastIndexOf("/");
2219
+ return lastSlash > 0 ? commonPrefix.substring(0, lastSlash + 1) : "";
2220
+ };
2221
+ var serializeStack = (stack) => {
2222
+ const filePaths = stack.map((item) => item.fileName).filter((path) => !!path);
2223
+ const commonRoot = findCommonRoot(filePaths);
2224
+ return stack.map((item) => {
2225
+ let fileName = item.fileName;
2226
+ if (fileName && commonRoot) {
2227
+ fileName = fileName.startsWith(commonRoot) ? fileName.substring(commonRoot.length) : fileName;
2228
+ }
2229
+ return `${item.componentName}${fileName ? ` (${fileName})` : ""}`;
2230
+ }).join("\n");
2231
+ };
2232
+ var getHTMLSnippet = (element) => {
2233
+ const semanticTags = /* @__PURE__ */ new Set([
2234
+ "article",
2235
+ "aside",
2236
+ "footer",
2237
+ "form",
2238
+ "header",
2239
+ "main",
2240
+ "nav",
2241
+ "section"
2242
+ ]);
2243
+ const hasDistinguishingFeatures = (el) => {
2244
+ const tagName = el.tagName.toLowerCase();
2245
+ if (semanticTags.has(tagName)) return true;
2246
+ if (el.id) return true;
2247
+ if (el.className && typeof el.className === "string") {
2248
+ const classes = el.className.trim();
2249
+ if (classes && classes.length > 0) return true;
2250
+ }
2251
+ return Array.from(el.attributes).some(
2252
+ (attr) => attr.name.startsWith("data-")
2253
+ );
2254
+ };
2255
+ const getAncestorChain = (el, maxDepth = 10) => {
2256
+ const ancestors2 = [];
2257
+ let current = el.parentElement;
2258
+ let depth = 0;
2259
+ while (current && depth < maxDepth && current.tagName !== "BODY") {
2260
+ if (hasDistinguishingFeatures(current)) {
2261
+ ancestors2.push(current);
2262
+ if (ancestors2.length >= 3) break;
2263
+ }
2264
+ current = current.parentElement;
2265
+ depth++;
2266
+ }
2267
+ return ancestors2.reverse();
2268
+ };
2269
+ const getCSSPath = (el) => {
2270
+ const parts = [];
2271
+ let current = el;
2272
+ let depth = 0;
2273
+ const maxDepth = 5;
2274
+ while (current && depth < maxDepth && current.tagName !== "BODY") {
2275
+ let selector = current.tagName.toLowerCase();
2276
+ if (current.id) {
2277
+ selector += `#${current.id}`;
2278
+ parts.unshift(selector);
2279
+ break;
2280
+ } else if (current.className && typeof current.className === "string" && current.className.trim()) {
2281
+ const classes = current.className.trim().split(/\s+/).slice(0, 2);
2282
+ selector += `.${classes.join(".")}`;
2283
+ }
2284
+ if (!current.id && (!current.className || !current.className.trim()) && current.parentElement) {
2285
+ const siblings = Array.from(current.parentElement.children);
2286
+ const index = siblings.indexOf(current);
2287
+ if (index >= 0 && siblings.length > 1) {
2288
+ selector += `:nth-child(${index + 1})`;
2289
+ }
2290
+ }
2291
+ parts.unshift(selector);
2292
+ current = current.parentElement;
2293
+ depth++;
2294
+ }
2295
+ return parts.join(" > ");
2296
+ };
2297
+ const getElementTag = (el, compact = false) => {
2298
+ const tagName = el.tagName.toLowerCase();
2299
+ const attrs = [];
2300
+ if (el.id) {
2301
+ attrs.push(`id="${el.id}"`);
2302
+ }
2303
+ if (el.className && typeof el.className === "string") {
2304
+ const classes = el.className.trim().split(/\s+/);
2305
+ if (classes.length > 0 && classes[0]) {
2306
+ const displayClasses = compact ? classes.slice(0, 3) : classes;
2307
+ let classStr = displayClasses.join(" ");
2308
+ if (classStr.length > 30) {
2309
+ classStr = classStr.substring(0, 30) + "...";
2310
+ }
2311
+ attrs.push(`class="${classStr}"`);
2312
+ }
2313
+ }
2314
+ const dataAttrs = Array.from(el.attributes).filter(
2315
+ (attr) => attr.name.startsWith("data-")
2316
+ );
2317
+ const displayDataAttrs = compact ? dataAttrs.slice(0, 1) : dataAttrs;
2318
+ for (const attr of displayDataAttrs) {
2319
+ let value = attr.value;
2320
+ if (value.length > 20) {
2321
+ value = value.substring(0, 20) + "...";
2322
+ }
2323
+ attrs.push(`${attr.name}="${value}"`);
2324
+ }
2325
+ const ariaLabel = el.getAttribute("aria-label");
2326
+ if (ariaLabel && !compact) {
2327
+ let value = ariaLabel;
2328
+ if (value.length > 20) {
2329
+ value = value.substring(0, 20) + "...";
2330
+ }
2331
+ attrs.push(`aria-label="${value}"`);
2332
+ }
2333
+ return attrs.length > 0 ? `<${tagName} ${attrs.join(" ")}>` : `<${tagName}>`;
2334
+ };
2335
+ const getClosingTag = (el) => {
2336
+ return `</${el.tagName.toLowerCase()}>`;
2337
+ };
2338
+ const getTextContent = (el) => {
2339
+ let text = el.textContent || "";
2340
+ text = text.trim().replace(/\s+/g, " ");
2341
+ const maxLength = 60;
2342
+ if (text.length > maxLength) {
2343
+ text = text.substring(0, maxLength) + "...";
2344
+ }
2345
+ return text;
2346
+ };
2347
+ const getSiblingIdentifier = (el) => {
2348
+ if (el.id) return `#${el.id}`;
2349
+ if (el.className && typeof el.className === "string") {
2350
+ const classes = el.className.trim().split(/\s+/);
2351
+ if (classes.length > 0 && classes[0]) {
2352
+ return `.${classes[0]}`;
2353
+ }
2354
+ }
2355
+ return null;
2356
+ };
2357
+ const lines = [];
2358
+ lines.push(`Path: ${getCSSPath(element)}`);
2359
+ lines.push("");
2360
+ const ancestors = getAncestorChain(element);
2361
+ for (let i = 0; i < ancestors.length; i++) {
2362
+ const indent2 = " ".repeat(i);
2363
+ lines.push(indent2 + getElementTag(ancestors[i], true));
2364
+ }
2365
+ const parent = element.parentElement;
2366
+ let targetIndex = -1;
2367
+ if (parent) {
2368
+ const siblings = Array.from(parent.children);
2369
+ targetIndex = siblings.indexOf(element);
2370
+ if (targetIndex > 0) {
2371
+ const prevSibling = siblings[targetIndex - 1];
2372
+ const prevId = getSiblingIdentifier(prevSibling);
2373
+ if (prevId && targetIndex <= 2) {
2374
+ const indent2 = " ".repeat(ancestors.length);
2375
+ lines.push(`${indent2} ${getElementTag(prevSibling, true)}`);
2376
+ lines.push(`${indent2} </${prevSibling.tagName.toLowerCase()}>`);
2377
+ } else if (targetIndex > 0) {
2378
+ const indent2 = " ".repeat(ancestors.length);
2379
+ lines.push(`${indent2} ... (${targetIndex} element${targetIndex === 1 ? "" : "s"})`);
2380
+ }
2381
+ }
2382
+ }
2383
+ const indent = " ".repeat(ancestors.length);
2384
+ lines.push(indent + " <!-- SELECTED -->");
2385
+ const textContent = getTextContent(element);
2386
+ const childrenCount = element.children.length;
2387
+ if (textContent && childrenCount === 0 && textContent.length < 40) {
2388
+ lines.push(
2389
+ `${indent} ${getElementTag(element)}${textContent}${getClosingTag(element)}`
2390
+ );
2391
+ } else {
2392
+ lines.push(indent + " " + getElementTag(element));
2393
+ if (textContent) {
2394
+ lines.push(`${indent} ${textContent}`);
2395
+ }
2396
+ if (childrenCount > 0) {
2397
+ lines.push(
2398
+ `${indent} ... (${childrenCount} element${childrenCount === 1 ? "" : "s"})`
2399
+ );
2400
+ }
2401
+ lines.push(indent + " " + getClosingTag(element));
2402
+ }
2403
+ if (parent && targetIndex >= 0) {
2404
+ const siblings = Array.from(parent.children);
2405
+ const siblingsAfter = siblings.length - targetIndex - 1;
2406
+ if (siblingsAfter > 0) {
2407
+ const nextSibling = siblings[targetIndex + 1];
2408
+ const nextId = getSiblingIdentifier(nextSibling);
2409
+ if (nextId && siblingsAfter <= 2) {
2410
+ lines.push(`${indent} ${getElementTag(nextSibling, true)}`);
2411
+ lines.push(`${indent} </${nextSibling.tagName.toLowerCase()}>`);
2412
+ } else {
2413
+ lines.push(
2414
+ `${indent} ... (${siblingsAfter} element${siblingsAfter === 1 ? "" : "s"})`
2415
+ );
2416
+ }
2417
+ }
2418
+ }
2419
+ for (let i = ancestors.length - 1; i >= 0; i--) {
2420
+ const indent2 = " ".repeat(i);
2421
+ lines.push(indent2 + getClosingTag(ancestors[i]));
2422
+ }
2423
+ return lines.join("\n");
2424
+ };
2425
+
2426
+ // src/utils/is-element-visible.ts
2427
+ var isElementVisible = (element, computedStyle = null) => {
2428
+ if (!computedStyle) {
2429
+ computedStyle = window.getComputedStyle(element);
2430
+ }
2431
+ return computedStyle.display !== "none" && computedStyle.visibility !== "hidden";
2432
+ };
2433
+
2434
+ // src/utils/mount-root.ts
2435
+ var ATTRIBUTE_NAME = "data-react-grab";
2436
+ var mountRoot = () => {
2437
+ const existingHost = document.querySelector(`[${ATTRIBUTE_NAME}]`);
2438
+ if (existingHost) {
2439
+ const existingRoot = existingHost.shadowRoot?.querySelector(
2440
+ `[${ATTRIBUTE_NAME}]`
2441
+ );
2442
+ if (existingRoot instanceof HTMLDivElement && existingHost.shadowRoot) {
2443
+ return existingRoot;
2444
+ }
2445
+ }
2446
+ const host = document.createElement("div");
2447
+ host.setAttribute(ATTRIBUTE_NAME, "true");
2448
+ host.style.zIndex = "2147483646";
2449
+ host.style.position = "fixed";
2450
+ host.style.top = "0";
2451
+ host.style.left = "0";
2452
+ const shadowRoot = host.attachShadow({ mode: "open" });
2453
+ const root = document.createElement("div");
2454
+ root.style.transition = "opacity 0.1s ease-out";
2455
+ root.setAttribute(ATTRIBUTE_NAME, "true");
2456
+ shadowRoot.appendChild(root);
2457
+ const doc = document.body ?? document.documentElement;
2458
+ doc.appendChild(host);
2459
+ return root;
2460
+ };
2461
+
2462
+ // src/utils/schedule-run-when-idle.ts
2463
+ var scheduleRunWhenIdle = (callback) => {
2464
+ if ("scheduler" in globalThis) {
2465
+ return globalThis.scheduler.postTask(callback, {
2466
+ priority: "background"
2467
+ });
2468
+ }
2469
+ if ("requestIdleCallback" in window) {
2470
+ return requestIdleCallback(callback);
2471
+ }
2472
+ return setTimeout(callback, 0);
2473
+ };
2474
+
2475
+ // src/utils/throttle.ts
2476
+ var throttle = (fn, delay) => {
2477
+ let timeout = null;
2478
+ const throttled = (...args) => {
2479
+ if (timeout) {
2480
+ return;
2481
+ }
2482
+ timeout = window.setTimeout(() => {
2483
+ fn(...args);
2484
+ timeout = null;
2485
+ }, delay);
2486
+ };
2487
+ throttled.cancel = () => {
2488
+ if (timeout) {
2489
+ window.clearTimeout(timeout);
2490
+ timeout = null;
2491
+ }
2492
+ };
2493
+ return throttled;
2494
+ };
2495
+
2496
+ // src/index.ts
2497
+ var TICK_INTERVAL = 50;
2498
+ var THROTTLE_DELAY = 16;
2499
+ var init = () => {
2500
+ const root = mountRoot();
2501
+ let mouseX = 0;
2502
+ let mouseY = 0;
2503
+ let shiftKeyTimeout = null;
2504
+ let currentHoveredElement = null;
2505
+ const isFocusedInInput = () => {
2506
+ const active = document.activeElement;
2507
+ return active?.tagName === "INPUT" || active?.tagName === "TEXTAREA";
2508
+ };
2509
+ const selectionOverlay = new SelectionOverlay(root);
2510
+ const render = () => {
2511
+ if (!selectionOverlay.isVisible()) return;
2512
+ const element = document.elementsFromPoint(mouseX, mouseY).filter((element2) => !element2.hasAttribute(ATTRIBUTE_NAME))[0];
2513
+ if (!element) {
2514
+ currentHoveredElement = null;
2515
+ return;
2516
+ }
2517
+ const computedStyle = window.getComputedStyle(element);
2518
+ if (!isElementVisible(element, computedStyle)) return;
2519
+ const rect = element.getBoundingClientRect();
2520
+ currentHoveredElement = element;
2521
+ selectionOverlay.update({
2522
+ borderRadius: computedStyle.borderRadius,
2523
+ height: rect.height,
2524
+ transform: computedStyle.transform,
2525
+ width: rect.width,
2526
+ x: rect.left,
2527
+ y: rect.top
2528
+ });
2529
+ };
2530
+ const throttledRender = throttle(() => {
2531
+ scheduleRunWhenIdle(() => {
2532
+ render();
2533
+ });
2534
+ }, THROTTLE_DELAY);
2535
+ window.addEventListener("mousemove", (event) => {
2536
+ mouseX = event.clientX;
2537
+ mouseY = event.clientY;
2538
+ throttledRender();
2539
+ });
2540
+ window.addEventListener("resize", () => {
2541
+ throttledRender();
2542
+ });
2543
+ window.addEventListener("scroll", () => {
2544
+ throttledRender();
2545
+ });
2546
+ let timeout = null;
2547
+ const nextTick = () => {
2548
+ timeout = window.setTimeout(() => {
2549
+ throttledRender();
2550
+ nextTick();
2551
+ }, TICK_INTERVAL);
2552
+ };
2553
+ nextTick();
2554
+ window.addEventListener("keydown", (event) => {
2555
+ if (event.key === "Meta") {
2556
+ if (isFocusedInInput()) return;
2557
+ if (shiftKeyTimeout !== null) {
2558
+ window.clearTimeout(shiftKeyTimeout);
2559
+ }
2560
+ shiftKeyTimeout = window.setTimeout(() => {
2561
+ selectionOverlay.show();
2562
+ throttledRender();
2563
+ }, 200);
2564
+ }
2565
+ if (event.key === "Escape") {
2566
+ if (selectionOverlay.isVisible()) {
2567
+ selectionOverlay.hide();
2568
+ if (shiftKeyTimeout !== null) {
2569
+ window.clearTimeout(shiftKeyTimeout);
2570
+ shiftKeyTimeout = null;
2571
+ }
2572
+ }
2573
+ }
2574
+ if ((event.key === "c" || event.key === "C") && event.metaKey) {
2575
+ if (selectionOverlay.isVisible() && currentHoveredElement) {
2576
+ event.preventDefault();
2577
+ event.stopPropagation();
2578
+ event.stopImmediatePropagation();
2579
+ const element = currentHoveredElement;
2580
+ const rect = element.getBoundingClientRect();
2581
+ const showSuccess = showCopyIndicator(rect.left, rect.top);
2582
+ getStack(element).then((stack) => {
2583
+ const htmlSnippet = getHTMLSnippet(element);
2584
+ let output = htmlSnippet;
2585
+ if (stack) {
2586
+ const filteredStack = filterStack(stack);
2587
+ const serializedStack = serializeStack(filteredStack);
2588
+ output = `${serializedStack}
2589
+
2590
+ ${htmlSnippet}`;
2591
+ }
2592
+ return copyText(output);
2593
+ }).then((success) => {
2594
+ if (success) {
2595
+ showSuccess();
2596
+ }
2597
+ }).catch(() => {
2598
+ });
2599
+ }
2600
+ }
2601
+ });
2602
+ window.addEventListener("mousedown", (event) => {
2603
+ if (event.button !== 0) return;
2604
+ if (selectionOverlay.isVisible()) {
2605
+ event.preventDefault();
2606
+ event.stopPropagation();
2607
+ event.stopImmediatePropagation();
2608
+ if (currentHoveredElement) {
2609
+ const element = currentHoveredElement;
2610
+ const rect = element.getBoundingClientRect();
2611
+ const showSuccess = showCopyIndicator(rect.left, rect.top);
2612
+ getStack(element).then((stack) => {
2613
+ const htmlSnippet = getHTMLSnippet(element);
2614
+ let output = htmlSnippet;
2615
+ if (stack) {
2616
+ const filteredStack = filterStack(stack);
2617
+ const serializedStack = serializeStack(filteredStack);
2618
+ output = `## Referenced element:
2619
+ ${htmlSnippet}
2620
+ Stack trace:
2621
+ ${serializedStack}
2622
+
2623
+ Path: ${window.location.pathname}`;
2624
+ }
2625
+ return copyText(output);
2626
+ }).then((success) => {
2627
+ if (success) {
2628
+ showSuccess();
2629
+ }
2630
+ }).catch(() => {
2631
+ });
2632
+ }
2633
+ }
2634
+ });
2635
+ window.addEventListener("keyup", (event) => {
2636
+ if (event.key === "Meta") {
2637
+ if (shiftKeyTimeout !== null) {
2638
+ window.clearTimeout(shiftKeyTimeout);
2639
+ shiftKeyTimeout = null;
2640
+ }
2641
+ selectionOverlay.hide();
2642
+ }
2643
+ });
2644
+ return () => {
2645
+ if (timeout) {
2646
+ window.clearTimeout(timeout);
2647
+ timeout = null;
2648
+ }
2649
+ if (shiftKeyTimeout !== null) {
2650
+ window.clearTimeout(shiftKeyTimeout);
2651
+ shiftKeyTimeout = null;
2652
+ }
2653
+ root.remove();
2654
+ throttledRender.cancel();
2655
+ };
2656
+ };
2657
+ init();
2658
+ /*! Bundled license information:
2659
+
2660
+ bippy/dist/src-R2iEnVC1.js:
2661
+ (**
2662
+ * @license bippy
2663
+ *
2664
+ * Copyright (c) Aiden Bai
2665
+ *
2666
+ * This source code is licensed under the MIT license found in the
2667
+ * LICENSE file in the root directory of this source tree.
2668
+ *)
2669
+
2670
+ bippy/dist/index.js:
2671
+ (**
2672
+ * @license bippy
2673
+ *
2674
+ * Copyright (c) Aiden Bai
2675
+ *
2676
+ * This source code is licensed under the MIT license found in the
2677
+ * LICENSE file in the root directory of this source tree.
2678
+ *)
2679
+
2680
+ bippy/dist/source-DWOhEbf2.js:
2681
+ (**
2682
+ * @license bippy
2683
+ *
2684
+ * Copyright (c) Aiden Bai
2685
+ *
2686
+ * This source code is licensed under the MIT license found in the
2687
+ * LICENSE file in the root directory of this source tree.
2688
+ *)
2689
+
2690
+ bippy/dist/source.js:
2691
+ (**
2692
+ * @license bippy
2693
+ *
2694
+ * Copyright (c) Aiden Bai
2695
+ *
2696
+ * This source code is licensed under the MIT license found in the
2697
+ * LICENSE file in the root directory of this source tree.
2698
+ *)
2699
+ */
2700
+
2701
+ exports.init = init;
2702
+
2703
+ return exports;
2704
+
2705
+ })({});