UNPKG

@lpc-lang/core

Version:
7 lines (6 loc) 1.07 MB
// Copyright 2024 John L Chmura var hH=Object.create;var RF=Object.defineProperty;var SH=Object.getOwnPropertyDescriptor;var _H=Object.getOwnPropertyNames;var xH=Object.getPrototypeOf,bH=Object.prototype.hasOwnProperty;var Iu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fd=(e,t)=>{for(var i in t)RF(e,i,{get:t[i],enumerable:!0})},CH=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of _H(t))!bH.call(e,c)&&c!==i&&RF(e,c,{get:()=>t[c],enumerable:!(o=SH(t,c))||o.enumerable});return e};var EH=(e,t,i)=>(i=e!=null?hH(xH(e)):{},CH(t||!e||!e.__esModule?RF(i,"default",{value:e,enumerable:!0}):i,e));var Jj=Iu(pA=>{var jj="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");pA.encode=function(e){if(0<=e&&e<jj.length)return jj[e];throw new TypeError("Must be between 0 and 63: "+e)};pA.decode=function(e){var t=65,i=90,o=97,c=122,u=48,p=57,m=43,y=47,_=26,h=52;return t<=e&&e<=i?e-t:o<=e&&e<=c?e-o+_:u<=e&&e<=p?e-u+h:e==m?62:e==y?63:-1}});var gA=Iu(mA=>{var Uj=Jj(),fA=5,Wj=1<<fA,Kj=Wj-1,Vj=Wj;function HQ(e){return e<0?(-e<<1)+1:(e<<1)+0}function qQ(e){var t=(e&1)===1,i=e>>1;return t?-i:i}mA.encode=function(t){var i="",o,c=HQ(t);do o=c&Kj,c>>>=fA,c>0&&(o|=Vj),i+=Uj.encode(o);while(c>0);return i};mA.decode=function(t,i,o){var c=t.length,u=0,p=0,m,y;do{if(i>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(y=Uj.decode(t.charCodeAt(i++)),y===-1)throw new Error("Invalid base64 digit: "+t.charAt(i-1));m=!!(y&Vj),y&=Kj,u=u+(y<<p),p+=fA}while(m);o.value=qQ(u),o.rest=i}});var i_=Iu(al=>{function GQ(e,t,i){if(t in e)return e[t];if(arguments.length===3)return i;throw new Error('"'+t+'" is a required argument.')}al.getArg=GQ;var zj=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,$Q=/^data:.+\,.+$/;function iC(e){var t=e.match(zj);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}al.urlParse=iC;function t_(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}al.urlGenerate=t_;function yA(e){var t=e,i=iC(e);if(i){if(!i.path)return e;t=i.path}for(var o=al.isAbsolute(t),c=t.split(/\/+/),u,p=0,m=c.length-1;m>=0;m--)u=c[m],u==="."?c.splice(m,1):u===".."?p++:p>0&&(u===""?(c.splice(m+1,p),p=0):(c.splice(m,2),p--));return t=c.join("/"),t===""&&(t=o?"/":"."),i?(i.path=t,t_(i)):t}al.normalize=yA;function Hj(e,t){e===""&&(e="."),t===""&&(t=".");var i=iC(t),o=iC(e);if(o&&(e=o.path||"/"),i&&!i.scheme)return o&&(i.scheme=o.scheme),t_(i);if(i||t.match($Q))return t;if(o&&!o.host&&!o.path)return o.host=t,t_(o);var c=t.charAt(0)==="/"?t:yA(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=c,t_(o)):c}al.join=Hj;al.isAbsolute=function(e){return e.charAt(0)==="/"||zj.test(e)};function QQ(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var i=0;t.indexOf(e+"/")!==0;){var o=e.lastIndexOf("/");if(o<0||(e=e.slice(0,o),e.match(/^([^\/]+:\/)?\/*$/)))return t;++i}return Array(i+1).join("../")+t.substr(e.length+1)}al.relative=QQ;var qj=function(){var e=Object.create(null);return!("__proto__"in e)}();function Gj(e){return e}function YQ(e){return $j(e)?"$"+e:e}al.toSetString=qj?Gj:YQ;function XQ(e){return $j(e)?e.slice(1):e}al.fromSetString=qj?Gj:XQ;function $j(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var i=t-10;i>=0;i--)if(e.charCodeAt(i)!==36)return!1;return!0}function ZQ(e,t,i){var o=r_(e.source,t.source);return o!==0||(o=e.originalLine-t.originalLine,o!==0)||(o=e.originalColumn-t.originalColumn,o!==0||i)||(o=e.generatedColumn-t.generatedColumn,o!==0)||(o=e.generatedLine-t.generatedLine,o!==0)?o:r_(e.name,t.name)}al.compareByOriginalPositions=ZQ;function eY(e,t,i){var o=e.generatedLine-t.generatedLine;return o!==0||(o=e.generatedColumn-t.generatedColumn,o!==0||i)||(o=r_(e.source,t.source),o!==0)||(o=e.originalLine-t.originalLine,o!==0)||(o=e.originalColumn-t.originalColumn,o!==0)?o:r_(e.name,t.name)}al.compareByGeneratedPositionsDeflated=eY;function r_(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function nY(e,t){var i=e.generatedLine-t.generatedLine;return i!==0||(i=e.generatedColumn-t.generatedColumn,i!==0)||(i=r_(e.source,t.source),i!==0)||(i=e.originalLine-t.originalLine,i!==0)||(i=e.originalColumn-t.originalColumn,i!==0)?i:r_(e.name,t.name)}al.compareByGeneratedPositionsInflated=nY;function tY(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}al.parseSourceMapInput=tY;function rY(e,t,i){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),i){var o=iC(i);if(!o)throw new Error("sourceMapURL could not be parsed");if(o.path){var c=o.path.lastIndexOf("/");c>=0&&(o.path=o.path.substring(0,c+1))}t=Hj(t_(o),t)}return yA(t)}al.computeSourceURL=rY});var SA=Iu(Qj=>{var TA=i_(),hA=Object.prototype.hasOwnProperty,wT=typeof Map<"u";function Mm(){this._array=[],this._set=wT?new Map:Object.create(null)}Mm.fromArray=function(t,i){for(var o=new Mm,c=0,u=t.length;c<u;c++)o.add(t[c],i);return o};Mm.prototype.size=function(){return wT?this._set.size:Object.getOwnPropertyNames(this._set).length};Mm.prototype.add=function(t,i){var o=wT?t:TA.toSetString(t),c=wT?this.has(t):hA.call(this._set,o),u=this._array.length;(!c||i)&&this._array.push(t),c||(wT?this._set.set(t,u):this._set[o]=u)};Mm.prototype.has=function(t){if(wT)return this._set.has(t);var i=TA.toSetString(t);return hA.call(this._set,i)};Mm.prototype.indexOf=function(t){if(wT){var i=this._set.get(t);if(i>=0)return i}else{var o=TA.toSetString(t);if(hA.call(this._set,o))return this._set[o]}throw new Error('"'+t+'" is not in the set.')};Mm.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Mm.prototype.toArray=function(){return this._array.slice()};Qj.ArraySet=Mm});var Zj=Iu(Xj=>{var Yj=i_();function iY(e,t){var i=e.generatedLine,o=t.generatedLine,c=e.generatedColumn,u=t.generatedColumn;return o>i||o==i&&u>=c||Yj.compareByGeneratedPositionsInflated(e,t)<=0}function TP(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}TP.prototype.unsortedForEach=function(t,i){this._array.forEach(t,i)};TP.prototype.add=function(t){iY(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};TP.prototype.toArray=function(){return this._sorted||(this._array.sort(Yj.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Xj.MappingList=TP});var _A=Iu(eJ=>{var oC=gA(),js=i_(),hP=SA().ArraySet,oY=Zj().MappingList;function Fd(e){e||(e={}),this._file=js.getArg(e,"file",null),this._sourceRoot=js.getArg(e,"sourceRoot",null),this._skipValidation=js.getArg(e,"skipValidation",!1),this._sources=new hP,this._names=new hP,this._mappings=new oY,this._sourcesContents=null}Fd.prototype._version=3;Fd.fromSourceMap=function(t){var i=t.sourceRoot,o=new Fd({file:t.file,sourceRoot:i});return t.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,i!=null&&(u.source=js.relative(i,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),o.addMapping(u)}),t.sources.forEach(function(c){var u=c;i!==null&&(u=js.relative(i,c)),o._sources.has(u)||o._sources.add(u);var p=t.sourceContentFor(c);p!=null&&o.setSourceContent(c,p)}),o};Fd.prototype.addMapping=function(t){var i=js.getArg(t,"generated"),o=js.getArg(t,"original",null),c=js.getArg(t,"source",null),u=js.getArg(t,"name",null);this._skipValidation||this._validateMapping(i,o,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:i.line,generatedColumn:i.column,originalLine:o!=null&&o.line,originalColumn:o!=null&&o.column,source:c,name:u})};Fd.prototype.setSourceContent=function(t,i){var o=t;this._sourceRoot!=null&&(o=js.relative(this._sourceRoot,o)),i!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[js.toSetString(o)]=i):this._sourcesContents&&(delete this._sourcesContents[js.toSetString(o)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Fd.prototype.applySourceMap=function(t,i,o){var c=i;if(i==null){if(t.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=t.file}var u=this._sourceRoot;u!=null&&(c=js.relative(u,c));var p=new hP,m=new hP;this._mappings.unsortedForEach(function(y){if(y.source===c&&y.originalLine!=null){var _=t.originalPositionFor({line:y.originalLine,column:y.originalColumn});_.source!=null&&(y.source=_.source,o!=null&&(y.source=js.join(o,y.source)),u!=null&&(y.source=js.relative(u,y.source)),y.originalLine=_.line,y.originalColumn=_.column,_.name!=null&&(y.name=_.name))}var h=y.source;h!=null&&!p.has(h)&&p.add(h);var x=y.name;x!=null&&!m.has(x)&&m.add(x)},this),this._sources=p,this._names=m,t.sources.forEach(function(y){var _=t.sourceContentFor(y);_!=null&&(o!=null&&(y=js.join(o,y)),u!=null&&(y=js.relative(u,y)),this.setSourceContent(y,_))},this)};Fd.prototype._validateMapping=function(t,i,o,c){if(i&&typeof i.line!="number"&&typeof i.column!="number")throw new Error("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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!i&&!o&&!c)){if(t&&"line"in t&&"column"in t&&i&&"line"in i&&"column"in i&&t.line>0&&t.column>=0&&i.line>0&&i.column>=0&&o)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:o,original:i,name:c}))}};Fd.prototype._serializeMappings=function(){for(var t=0,i=1,o=0,c=0,u=0,p=0,m="",y,_,h,x,k=this._mappings.toArray(),v=0,R=k.length;v<R;v++){if(_=k[v],y="",_.generatedLine!==i)for(t=0;_.generatedLine!==i;)y+=";",i++;else if(v>0){if(!js.compareByGeneratedPositionsInflated(_,k[v-1]))continue;y+=","}y+=oC.encode(_.generatedColumn-t),t=_.generatedColumn,_.source!=null&&(x=this._sources.indexOf(_.source),y+=oC.encode(x-p),p=x,y+=oC.encode(_.originalLine-1-c),c=_.originalLine-1,y+=oC.encode(_.originalColumn-o),o=_.originalColumn,_.name!=null&&(h=this._names.indexOf(_.name),y+=oC.encode(h-u),u=h)),m+=y}return m};Fd.prototype._generateSourcesContent=function(t,i){return t.map(function(o){if(!this._sourcesContents)return null;i!=null&&(o=js.relative(i,o));var c=js.toSetString(o);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)};Fd.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Fd.prototype.toString=function(){return JSON.stringify(this.toJSON())};eJ.SourceMapGenerator=Fd});var nJ=Iu(MT=>{MT.GREATEST_LOWER_BOUND=1;MT.LEAST_UPPER_BOUND=2;function xA(e,t,i,o,c,u){var p=Math.floor((t-e)/2)+e,m=c(i,o[p],!0);return m===0?p:m>0?t-p>1?xA(p,t,i,o,c,u):u==MT.LEAST_UPPER_BOUND?t<o.length?t:-1:p:p-e>1?xA(e,p,i,o,c,u):u==MT.LEAST_UPPER_BOUND?p:e<0?-1:e}MT.search=function(t,i,o,c){if(i.length===0)return-1;var u=xA(-1,i.length,t,i,o,c||MT.GREATEST_LOWER_BOUND);if(u<0)return-1;for(;u-1>=0&&o(i[u],i[u-1],!0)===0;)--u;return u}});var rJ=Iu(tJ=>{function bA(e,t,i){var o=e[t];e[t]=e[i],e[i]=o}function aY(e,t){return Math.round(e+Math.random()*(t-e))}function CA(e,t,i,o){if(i<o){var c=aY(i,o),u=i-1;bA(e,c,o);for(var p=e[o],m=i;m<o;m++)t(e[m],p)<=0&&(u+=1,bA(e,u,m));bA(e,u+1,m);var y=u+1;CA(e,t,i,y-1),CA(e,t,y+1,o)}}tJ.quickSort=function(e,t){CA(e,t,0,e.length-1)}});var oJ=Iu(SP=>{var gr=i_(),EA=nJ(),o_=SA().ArraySet,sY=gA(),aC=rJ().quickSort;function ka(e,t){var i=e;return typeof e=="string"&&(i=gr.parseSourceMapInput(e)),i.sections!=null?new Sp(i,t):new Jc(i,t)}ka.fromSourceMap=function(e,t){return Jc.fromSourceMap(e,t)};ka.prototype._version=3;ka.prototype.__generatedMappings=null;Object.defineProperty(ka.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ka.prototype.__originalMappings=null;Object.defineProperty(ka.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ka.prototype._charIsMappingSeparator=function(t,i){var o=t.charAt(i);return o===";"||o===","};ka.prototype._parseMappings=function(t,i){throw new Error("Subclasses must implement _parseMappings")};ka.GENERATED_ORDER=1;ka.ORIGINAL_ORDER=2;ka.GREATEST_LOWER_BOUND=1;ka.LEAST_UPPER_BOUND=2;ka.prototype.eachMapping=function(t,i,o){var c=i||null,u=o||ka.GENERATED_ORDER,p;switch(u){case ka.GENERATED_ORDER:p=this._generatedMappings;break;case ka.ORIGINAL_ORDER:p=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var m=this.sourceRoot;p.map(function(y){var _=y.source===null?null:this._sources.at(y.source);return _=gr.computeSourceURL(m,_,this._sourceMapURL),{source:_,generatedLine:y.generatedLine,generatedColumn:y.generatedColumn,originalLine:y.originalLine,originalColumn:y.originalColumn,name:y.name===null?null:this._names.at(y.name)}},this).forEach(t,c)};ka.prototype.allGeneratedPositionsFor=function(t){var i=gr.getArg(t,"line"),o={source:gr.getArg(t,"source"),originalLine:i,originalColumn:gr.getArg(t,"column",0)};if(o.source=this._findSourceIndex(o.source),o.source<0)return[];var c=[],u=this._findMapping(o,this._originalMappings,"originalLine","originalColumn",gr.compareByOriginalPositions,EA.LEAST_UPPER_BOUND);if(u>=0){var p=this._originalMappings[u];if(t.column===void 0)for(var m=p.originalLine;p&&p.originalLine===m;)c.push({line:gr.getArg(p,"generatedLine",null),column:gr.getArg(p,"generatedColumn",null),lastColumn:gr.getArg(p,"lastGeneratedColumn",null)}),p=this._originalMappings[++u];else for(var y=p.originalColumn;p&&p.originalLine===i&&p.originalColumn==y;)c.push({line:gr.getArg(p,"generatedLine",null),column:gr.getArg(p,"generatedColumn",null),lastColumn:gr.getArg(p,"lastGeneratedColumn",null)}),p=this._originalMappings[++u]}return c};SP.SourceMapConsumer=ka;function Jc(e,t){var i=e;typeof e=="string"&&(i=gr.parseSourceMapInput(e));var o=gr.getArg(i,"version"),c=gr.getArg(i,"sources"),u=gr.getArg(i,"names",[]),p=gr.getArg(i,"sourceRoot",null),m=gr.getArg(i,"sourcesContent",null),y=gr.getArg(i,"mappings"),_=gr.getArg(i,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);p&&(p=gr.normalize(p)),c=c.map(String).map(gr.normalize).map(function(h){return p&&gr.isAbsolute(p)&&gr.isAbsolute(h)?gr.relative(p,h):h}),this._names=o_.fromArray(u.map(String),!0),this._sources=o_.fromArray(c,!0),this._absoluteSources=this._sources.toArray().map(function(h){return gr.computeSourceURL(p,h,t)}),this.sourceRoot=p,this.sourcesContent=m,this._mappings=y,this._sourceMapURL=t,this.file=_}Jc.prototype=Object.create(ka.prototype);Jc.prototype.consumer=ka;Jc.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=gr.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var i;for(i=0;i<this._absoluteSources.length;++i)if(this._absoluteSources[i]==e)return i;return-1};Jc.fromSourceMap=function(t,i){var o=Object.create(Jc.prototype),c=o._names=o_.fromArray(t._names.toArray(),!0),u=o._sources=o_.fromArray(t._sources.toArray(),!0);o.sourceRoot=t._sourceRoot,o.sourcesContent=t._generateSourcesContent(o._sources.toArray(),o.sourceRoot),o.file=t._file,o._sourceMapURL=i,o._absoluteSources=o._sources.toArray().map(function(v){return gr.computeSourceURL(o.sourceRoot,v,i)});for(var p=t._mappings.toArray().slice(),m=o.__generatedMappings=[],y=o.__originalMappings=[],_=0,h=p.length;_<h;_++){var x=p[_],k=new iJ;k.generatedLine=x.generatedLine,k.generatedColumn=x.generatedColumn,x.source&&(k.source=u.indexOf(x.source),k.originalLine=x.originalLine,k.originalColumn=x.originalColumn,x.name&&(k.name=c.indexOf(x.name)),y.push(k)),m.push(k)}return aC(o.__originalMappings,gr.compareByOriginalPositions),o};Jc.prototype._version=3;Object.defineProperty(Jc.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function iJ(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Jc.prototype._parseMappings=function(t,i){for(var o=1,c=0,u=0,p=0,m=0,y=0,_=t.length,h=0,x={},k={},v=[],R=[],T,Y,B,ce,he;h<_;)if(t.charAt(h)===";")o++,h++,c=0;else if(t.charAt(h)===",")h++;else{for(T=new iJ,T.generatedLine=o,ce=h;ce<_&&!this._charIsMappingSeparator(t,ce);ce++);if(Y=t.slice(h,ce),B=x[Y],B)h+=Y.length;else{for(B=[];h<ce;)sY.decode(t,h,k),he=k.value,h=k.rest,B.push(he);if(B.length===2)throw new Error("Found a source, but no line and column");if(B.length===3)throw new Error("Found a source and line, but no column");x[Y]=B}T.generatedColumn=c+B[0],c=T.generatedColumn,B.length>1&&(T.source=m+B[1],m+=B[1],T.originalLine=u+B[2],u=T.originalLine,T.originalLine+=1,T.originalColumn=p+B[3],p=T.originalColumn,B.length>4&&(T.name=y+B[4],y+=B[4])),R.push(T),typeof T.originalLine=="number"&&v.push(T)}aC(R,gr.compareByGeneratedPositionsDeflated),this.__generatedMappings=R,aC(v,gr.compareByOriginalPositions),this.__originalMappings=v};Jc.prototype._findMapping=function(t,i,o,c,u,p){if(t[o]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[o]);if(t[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[c]);return EA.search(t,i,u,p)};Jc.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var i=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var o=this._generatedMappings[t+1];if(i.generatedLine===o.generatedLine){i.lastGeneratedColumn=o.generatedColumn-1;continue}}i.lastGeneratedColumn=1/0}};Jc.prototype.originalPositionFor=function(t){var i={generatedLine:gr.getArg(t,"line"),generatedColumn:gr.getArg(t,"column")},o=this._findMapping(i,this._generatedMappings,"generatedLine","generatedColumn",gr.compareByGeneratedPositionsDeflated,gr.getArg(t,"bias",ka.GREATEST_LOWER_BOUND));if(o>=0){var c=this._generatedMappings[o];if(c.generatedLine===i.generatedLine){var u=gr.getArg(c,"source",null);u!==null&&(u=this._sources.at(u),u=gr.computeSourceURL(this.sourceRoot,u,this._sourceMapURL));var p=gr.getArg(c,"name",null);return p!==null&&(p=this._names.at(p)),{source:u,line:gr.getArg(c,"originalLine",null),column:gr.getArg(c,"originalColumn",null),name:p}}}return{source:null,line:null,column:null,name:null}};Jc.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Jc.prototype.sourceContentFor=function(t,i){if(!this.sourcesContent)return null;var o=this._findSourceIndex(t);if(o>=0)return this.sourcesContent[o];var c=t;this.sourceRoot!=null&&(c=gr.relative(this.sourceRoot,c));var u;if(this.sourceRoot!=null&&(u=gr.urlParse(this.sourceRoot))){var p=c.replace(/^file:\/\//,"");if(u.scheme=="file"&&this._sources.has(p))return this.sourcesContent[this._sources.indexOf(p)];if((!u.path||u.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(i)return null;throw new Error('"'+c+'" is not in the SourceMap.')};Jc.prototype.generatedPositionFor=function(t){var i=gr.getArg(t,"source");if(i=this._findSourceIndex(i),i<0)return{line:null,column:null,lastColumn:null};var o={source:i,originalLine:gr.getArg(t,"line"),originalColumn:gr.getArg(t,"column")},c=this._findMapping(o,this._originalMappings,"originalLine","originalColumn",gr.compareByOriginalPositions,gr.getArg(t,"bias",ka.GREATEST_LOWER_BOUND));if(c>=0){var u=this._originalMappings[c];if(u.source===o.source)return{line:gr.getArg(u,"generatedLine",null),column:gr.getArg(u,"generatedColumn",null),lastColumn:gr.getArg(u,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};SP.BasicSourceMapConsumer=Jc;function Sp(e,t){var i=e;typeof e=="string"&&(i=gr.parseSourceMapInput(e));var o=gr.getArg(i,"version"),c=gr.getArg(i,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new o_,this._names=new o_;var u={line:-1,column:0};this._sections=c.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=gr.getArg(p,"offset"),y=gr.getArg(m,"line"),_=gr.getArg(m,"column");if(y<u.line||y===u.line&&_<u.column)throw new Error("Section offsets must be ordered and non-overlapping.");return u=m,{generatedOffset:{generatedLine:y+1,generatedColumn:_+1},consumer:new ka(gr.getArg(p,"map"),t)}})}Sp.prototype=Object.create(ka.prototype);Sp.prototype.constructor=ka;Sp.prototype._version=3;Object.defineProperty(Sp.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var i=0;i<this._sections[t].consumer.sources.length;i++)e.push(this._sections[t].consumer.sources[i]);return e}});Sp.prototype.originalPositionFor=function(t){var i={generatedLine:gr.getArg(t,"line"),generatedColumn:gr.getArg(t,"column")},o=EA.search(i,this._sections,function(u,p){var m=u.generatedLine-p.generatedOffset.generatedLine;return m||u.generatedColumn-p.generatedOffset.generatedColumn}),c=this._sections[o];return c?c.consumer.originalPositionFor({line:i.generatedLine-(c.generatedOffset.generatedLine-1),column:i.generatedColumn-(c.generatedOffset.generatedLine===i.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};Sp.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};Sp.prototype.sourceContentFor=function(t,i){for(var o=0;o<this._sections.length;o++){var c=this._sections[o],u=c.consumer.sourceContentFor(t,!0);if(u)return u}if(i)return null;throw new Error('"'+t+'" is not in the SourceMap.')};Sp.prototype.generatedPositionFor=function(t){for(var i=0;i<this._sections.length;i++){var o=this._sections[i];if(o.consumer._findSourceIndex(gr.getArg(t,"source"))!==-1){var c=o.consumer.generatedPositionFor(t);if(c){var u={line:c.line+(o.generatedOffset.generatedLine-1),column:c.column+(o.generatedOffset.generatedLine===c.line?o.generatedOffset.generatedColumn-1:0)};return u}}}return{line:null,column:null}};Sp.prototype._parseMappings=function(t,i){this.__generatedMappings=[],this.__originalMappings=[];for(var o=0;o<this._sections.length;o++)for(var c=this._sections[o],u=c.consumer._generatedMappings,p=0;p<u.length;p++){var m=u[p],y=c.consumer._sources.at(m.source);y=gr.computeSourceURL(c.consumer.sourceRoot,y,this._sourceMapURL),this._sources.add(y),y=this._sources.indexOf(y);var _=null;m.name&&(_=c.consumer._names.at(m.name),this._names.add(_),_=this._names.indexOf(_));var h={source:y,generatedLine:m.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(c.generatedOffset.generatedLine===m.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:_};this.__generatedMappings.push(h),typeof h.originalLine=="number"&&this.__originalMappings.push(h)}aC(this.__generatedMappings,gr.compareByGeneratedPositionsDeflated),aC(this.__originalMappings,gr.compareByOriginalPositions)};SP.IndexedSourceMapConsumer=Sp});var sJ=Iu(aJ=>{var cY=_A().SourceMapGenerator,_P=i_(),lY=/(\r?\n)/,uY=10,a_="$$$isSourceNode$$$";function qu(e,t,i,o,c){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=i??null,this.name=c??null,this[a_]=!0,o!=null&&this.add(o)}qu.fromStringWithSourceMap=function(t,i,o){var c=new qu,u=t.split(lY),p=0,m=function(){var k=R(),v=R()||"";return k+v;function R(){return p<u.length?u[p++]:void 0}},y=1,_=0,h=null;return i.eachMapping(function(k){if(h!==null)if(y<k.generatedLine)x(h,m()),y++,_=0;else{var v=u[p]||"",R=v.substr(0,k.generatedColumn-_);u[p]=v.substr(k.generatedColumn-_),_=k.generatedColumn,x(h,R),h=k;return}for(;y<k.generatedLine;)c.add(m()),y++;if(_<k.generatedColumn){var v=u[p]||"";c.add(v.substr(0,k.generatedColumn)),u[p]=v.substr(k.generatedColumn),_=k.generatedColumn}h=k},this),p<u.length&&(h&&x(h,m()),c.add(u.splice(p).join(""))),i.sources.forEach(function(k){var v=i.sourceContentFor(k);v!=null&&(o!=null&&(k=_P.join(o,k)),c.setSourceContent(k,v))}),c;function x(k,v){if(k===null||k.source===void 0)c.add(v);else{var R=o?_P.join(o,k.source):k.source;c.add(new qu(k.originalLine,k.originalColumn,R,v,k.name))}}};qu.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(i){this.add(i)},this);else if(t[a_]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};qu.prototype.prepend=function(t){if(Array.isArray(t))for(var i=t.length-1;i>=0;i--)this.prepend(t[i]);else if(t[a_]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};qu.prototype.walk=function(t){for(var i,o=0,c=this.children.length;o<c;o++)i=this.children[o],i[a_]?i.walk(t):i!==""&&t(i,{source:this.source,line:this.line,column:this.column,name:this.name})};qu.prototype.join=function(t){var i,o,c=this.children.length;if(c>0){for(i=[],o=0;o<c-1;o++)i.push(this.children[o]),i.push(t);i.push(this.children[o]),this.children=i}return this};qu.prototype.replaceRight=function(t,i){var o=this.children[this.children.length-1];return o[a_]?o.replaceRight(t,i):typeof o=="string"?this.children[this.children.length-1]=o.replace(t,i):this.children.push("".replace(t,i)),this};qu.prototype.setSourceContent=function(t,i){this.sourceContents[_P.toSetString(t)]=i};qu.prototype.walkSourceContents=function(t){for(var i=0,o=this.children.length;i<o;i++)this.children[i][a_]&&this.children[i].walkSourceContents(t);for(var c=Object.keys(this.sourceContents),i=0,o=c.length;i<o;i++)t(_P.fromSetString(c[i]),this.sourceContents[c[i]])};qu.prototype.toString=function(){var t="";return this.walk(function(i){t+=i}),t};qu.prototype.toStringWithSourceMap=function(t){var i={code:"",line:1,column:0},o=new cY(t),c=!1,u=null,p=null,m=null,y=null;return this.walk(function(_,h){i.code+=_,h.source!==null&&h.line!==null&&h.column!==null?((u!==h.source||p!==h.line||m!==h.column||y!==h.name)&&o.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:i.line,column:i.column},name:h.name}),u=h.source,p=h.line,m=h.column,y=h.name,c=!0):c&&(o.addMapping({generated:{line:i.line,column:i.column}}),u=null,c=!1);for(var x=0,k=_.length;x<k;x++)_.charCodeAt(x)===uY?(i.line++,i.column=0,x+1===k?(u=null,c=!1):c&&o.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:i.line,column:i.column},name:h.name})):i.column++}),this.walkSourceContents(function(_,h){o.setSourceContent(_,h)}),{code:i.code,map:o}};aJ.SourceNode=qu});var cJ=Iu(xP=>{xP.SourceMapGenerator=_A().SourceMapGenerator;xP.SourceMapConsumer=oJ().SourceMapConsumer;xP.SourceNode=sJ().SourceNode});var uJ=Iu((UFe,lJ)=>{var dY=Object.prototype.toString,NA=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function pY(e){return dY.call(e).slice(8,-1)==="ArrayBuffer"}function fY(e,t,i){t>>>=0;var o=e.byteLength-t;if(o<0)throw new RangeError("'offset' is out of bounds");if(i===void 0)i=o;else if(i>>>=0,i>o)throw new RangeError("'length' is out of bounds");return NA?Buffer.from(e.slice(t,t+i)):new Buffer(new Uint8Array(e.slice(t,t+i)))}function mY(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return NA?Buffer.from(e,t):new Buffer(e,t)}function gY(e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return pY(e)?fY(e,t,i):typeof e=="string"?mY(e,t):NA?Buffer.from(e):new Buffer(e)}lJ.exports=gY});var TJ=Iu(BT=>{var yY=cJ().SourceMapConsumer,DA=require("path"),Pf;try{Pf=require("fs"),(!Pf.existsSync||!Pf.readFileSync)&&(Pf=null)}catch{}var TY=uJ(),dJ=!1,pJ=!1,PA=!1,sC="auto",RT={},cC={},hY=/^data:application\/json[^,]+base64,/,Zg=[],ey=[];function vA(){return sC==="browser"?!0:sC==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function SY(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function bP(e){return function(t){for(var i=0;i<e.length;i++){var o=e[i](t);if(o)return o}return null}}var FA=bP(Zg);Zg.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(o,c){return c?"":"/"})),e in RT)return RT[e];var t="";try{if(Pf)Pf.existsSync(e)&&(t=Pf.readFileSync(e,"utf8"));else{var i=new XMLHttpRequest;i.open("GET",e,!1),i.send(null),i.readyState===4&&i.status===200&&(t=i.responseText)}}catch{}return RT[e]=t});function kA(e,t){if(!e)return t;var i=DA.dirname(e),o=/^\w+:\/\/[^\/]*/.exec(i),c=o?o[0]:"",u=i.slice(c.length);return c&&/^\/\w\:/.test(u)?(c+="/",c+DA.resolve(i.slice(c.length),t).replace(/\\/g,"/")):c+DA.resolve(i.slice(c.length),t)}function _Y(e){var t;if(vA())try{var i=new XMLHttpRequest;i.open("GET",e,!1),i.send(null),t=i.readyState===4?i.responseText:null;var o=i.getResponseHeader("SourceMap")||i.getResponseHeader("X-SourceMap");if(o)return o}catch{}t=FA(e);for(var c=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,u,p;p=c.exec(t);)u=p;return u?u[1]:null}var IA=bP(ey);ey.push(function(e){var t=_Y(e);if(!t)return null;var i;if(hY.test(t)){var o=t.slice(t.indexOf(",")+1);i=TY(o,"base64").toString(),t=e}else t=kA(e,t),i=FA(t);return i?{url:t,map:i}:null});function LA(e){var t=cC[e.source];if(!t){var i=IA(e.source);i?(t=cC[e.source]={url:i.url,map:new yY(i.map)},t.map.sourcesContent&&t.map.sources.forEach(function(c,u){var p=t.map.sourcesContent[u];if(p){var m=kA(t.url,c);RT[m]=p}})):t=cC[e.source]={url:null,map:null}}if(t&&t.map&&typeof t.map.originalPositionFor=="function"){var o=t.map.originalPositionFor(e);if(o.source!==null)return o.source=kA(t.url,o.source),o}return e}function mJ(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var i=LA({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+i.source+":"+i.line+":"+(i.column+1)+")"}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?"eval at "+t[1]+" ("+mJ(t[2])+")":e}function xY(){var e,t="";if(this.isNative())t="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),e?t+=e:t+="<anonymous>";var i=this.getLineNumber();if(i!=null){t+=":"+i;var o=this.getColumnNumber();o&&(t+=":"+o)}}var c="",u=this.getFunctionName(),p=!0,m=this.isConstructor(),y=!(this.isToplevel()||m);if(y){var _=this.getTypeName();_==="[object Object]"&&(_="null");var h=this.getMethodName();u?(_&&u.indexOf(_)!=0&&(c+=_+"."),c+=u,h&&u.indexOf("."+h)!=u.length-h.length-1&&(c+=" [as "+h+"]")):c+=_+"."+(h||"<anonymous>")}else m?c+="new "+(u||"<anonymous>"):u?c+=u:(c+=t,p=!1);return p&&(c+=" ("+t+")"),c}function fJ(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(i){t[i]=/^(?:is|get)/.test(i)?function(){return e[i].call(e)}:e[i]}),t.toString=xY,t}function gJ(e){if(e.isNative())return e;var t=e.getFileName()||e.getScriptNameOrSourceURL();if(t){var i=e.getLineNumber(),o=e.getColumnNumber()-1,c=62;i===1&&o>c&&!vA()&&!e.isEval()&&(o-=c);var u=LA({source:t,line:i,column:o});e=fJ(e);var p=e.getFunctionName;return e.getFunctionName=function(){return u.name||p()},e.getFileName=function(){return u.source},e.getLineNumber=function(){return u.line},e.getColumnNumber=function(){return u.column+1},e.getScriptNameOrSourceURL=function(){return u.source},e}var m=e.isEval()&&e.getEvalOrigin();return m&&(m=mJ(m),e=fJ(e),e.getEvalOrigin=function(){return m}),e}function bY(e,t){PA&&(RT={},cC={});var i=e.name||"Error",o=e.message||"",c=i+": "+o;return c+t.map(function(u){return` at `+gJ(u)}).join("")}function yJ(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var i=t[1],o=+t[2],c=+t[3],u=RT[i];if(!u&&Pf&&Pf.existsSync(i))try{u=Pf.readFileSync(i,"utf8")}catch{u=""}if(u){var p=u.split(/(?:\r\n|\r|\n)/)[o-1];if(p)return i+":"+o+` `+p+` `+new Array(c).join(" ")+"^"}}return null}function CY(e){var t=yJ(e);process.stderr._handle&&process.stderr._handle.setBlocking&&process.stderr._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),process.exit(1)}function EY(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var i=arguments[1]&&arguments[1].stack,o=this.listeners(t).length>0;if(i&&!o)return CY(arguments[1])}return e.apply(this,arguments)}}var NY=Zg.slice(0),DY=ey.slice(0);BT.wrapCallSite=gJ;BT.getErrorSource=yJ;BT.mapSourcePosition=LA;BT.retrieveSourceMap=IA;BT.install=function(e){if(e=e||{},e.environment&&(sC=e.environment,["node","browser","auto"].indexOf(sC)===-1))throw new Error("environment "+sC+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(Zg.length=0),Zg.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(ey.length=0),ey.unshift(e.retrieveSourceMap)),e.hookRequire&&!vA()){var t;try{t=require("module")}catch{}var i=t.prototype._compile;i.__sourceMapSupport||(t.prototype._compile=function(c,u){return RT[u]=c,cC[u]=void 0,i.call(this,c,u)},t.prototype._compile.__sourceMapSupport=!0)}if(PA||(PA="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),dJ||(dJ=!0,Error.prepareStackTrace=bY),!pJ){var o="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;o&&SY()&&(pJ=!0,EY())}};BT.resetRetrieveHandlers=function(){Zg.length=0,ey.length=0,Zg=NY.slice(0),ey=DY.slice(0),IA=bP(ey),FA=bP(Zg)}});var _R="1.1.18",xR="LPC";function kc(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function ug(e){let t=new Map;return i=>{let o=`${typeof i}:${i}`,c=t.get(o);return c===void 0&&!t.has(o)&&(c=e(i),t.set(o,c)),c}}function gi(e){return e}function go(e,t,i,o){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(i,o);i=i===void 0?0:bR(t,i),o=o===void 0?t.length:bR(t,o);for(let c=i;c<o&&c<t.length;c++)t[c]!==void 0&&e.push(t[c]);return e}function bR(e,t){return t<0?e.length+t:t}var Ne=[],jh=new Map;function zt(e){return e!==void 0?e.length:0}var lg=Object.prototype.hasOwnProperty;function Ca(e,t){return lg.call(e,t)}function DR(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function Zi(e,t){return DR(e,t)}function NH(e,t,i){t.sort((o,c)=>i(e[o],e[c])||Zi(o,c))}function md(e,t){let i=PH(e);return NH(e,i,t),i.map(o=>e[o])}function DH(e,t){return t}function PH(e){return e.map(DH)}function qi(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Tn(e,t){if(e!==void 0)if(t!==void 0){for(let i=0;i<e.length;i++)if(t(e[i]))return!0}else return e.length>0;return!1}function PR(e,t,i){for(let o=0;o<e.length;o++)t=Math.max(t,i(e[o]));return t}function BF(e,t,i){let o=[];A.assertEqual(e.length,t.length);for(let c=0;c<e.length;c++)o.push(i(e[c],t[c],c));return o}function Yn(e,t){let i;if(e!==void 0){i=[];for(let o=0;o<e.length;o++)i.push(t(e[o],o))}return i}function pN(){return typeof process<"u"&&!!process.nextTick&&!process.browser&&typeof require<"u"}function Gi(e){}function vc(e,t,i){let o=e.length-t.length;return o>=0&&(i?$d(e.slice(o),t):e.indexOf(t,o)===o)}function $d(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Jh(e){return e?jF:Lu}function Lu(e,t){return DR(e,t)}function jF(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toUpperCase(),t=t.toUpperCase(),e<t?-1:e>t?1:0)}function dg(e,t){return sm(e,t)}function sm(e,t){return e===t}function Qa(e){return e?gi:pg}function kH(e){return e.toLowerCase()}var CR=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g,ER=new Map;function pg(e){let t=ER.get(e);return t===void 0&&(t=CR.test(e)?e.replace(CR,kH):e,ER.set(e,t)),t}function eo(e,t,i){return i?$d(e.slice(0,t.length),t):e.lastIndexOf(t,0)===0}function Mn(e,t){if(e!==void 0)for(let i=0;i<e.length;i++){let o=t(e[i],i);if(o)return o}}function Jr(e,t,i=sm){if(e!==void 0){for(let o=0;o<e.length;o++)if(i(e[o],t))return!0}return!1}function cm(e,t,i){return e!==void 0?(Nl(e,t,i),e):[t]}function Nl(e,t,i){return Jr(e,t,i)?!1:(e.push(t),!0)}function Qc(e,t,i,o,c){if(e&&e.length>0){let u=e.length;if(u>0){let p=o===void 0||o<0?0:o,m=c===void 0||p+c>u-1?u-1:p+c,y;for(arguments.length<=2?(y=e[p],p++):y=i;p<=m;)y=t(y,e[p],p),p++;return y}}return i}function Qd(e,t,i,o,c){return Mx(e,i(t),i,o,c)}function Mx(e,t,i,o,c){if(!Tn(e))return-1;let u=c??0,p=e.length-1;for(;u<=p;){let m=u+(p-u>>1),y=i(e[m],m);switch(o(y,t)){case-1:u=m+1;break;case 0:return m;case 1:p=m-1;break}}return~u}function af(e,t,i,o,c){if(e.length===0)return e.push(t),!0;let u=Qd(e,t,gi,i);if(u<0){if(o&&!c){let p=~u;if(p>0&&o(t,e[p-1]))return!1;if(p<e.length&&o(t,e[p]))return e.splice(p,1,t),!0}return e.splice(~u,0,t),!0}return c?(e.splice(u,0,t),!0):!1}function ri(e){return Array.isArray(e)}function qy(e,t){let i=[];if(e!==void 0)for(let o=0;o<e.length;o++){let c=t(e[o],o);c&&(ri(c)?go(i,c):i.push(c))}return i}function Or(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function Uh(e){e.length=0}function cr(e,t,i){if(e!==void 0)for(let o=i??0;o<e.length;o++){let c=e[o];if(t(c,o))return c}}function fg(){}function mg(){return!1}function yo(e){return typeof e=="string"}function kR(e,t,i){if(e!==void 0)for(let o=i??e.length-1;o>=0;o--){let c=e[o];if(t(c,o))return c}}function li(e,t){let i=[];if(e!==void 0)for(let o=0;o<e.length;o++){let c=t(e[o],o);c!==void 0&&i.push(c)}return i}function Ho(e,t){let i=[];for(let o of e)i.push(t?t(o):o);return i}function lm(e,t,i){let o=Math.max(2,Math.floor(e.length*.34)),c=Math.floor(e.length*.4)+1,u;for(let p of t){let m=i(p);if(m!==void 0&&Math.abs(m.length-e.length)<=o){if(m===e||m.length<3&&m.toLowerCase()!==e.toLowerCase())continue;let y=vH(e,m,c-.1);if(y===void 0)continue;A.assert(y<c),c=y,u=p}}return u}function vH(e,t,i){let o=new Array(t.length+1),c=new Array(t.length+1),u=i+.01;for(let m=0;m<=t.length;m++)o[m]=m;for(let m=1;m<=e.length;m++){let y=e.charCodeAt(m-1),_=Math.ceil(m>i?m-i:1),h=Math.floor(t.length>i+m?i+m:t.length);c[0]=m;let x=m;for(let v=1;v<_;v++)c[v]=u;for(let v=_;v<=h;v++){let R=e[m-1].toLowerCase()===t[v-1].toLowerCase()?o[v-1]+.1:o[v-1]+2,T=y===t.charCodeAt(v-1)?o[v-1]:Math.min(o[v]+1,c[v-1]+1,R);c[v]=T,x=Math.min(x,T)}for(let v=h+1;v<=t.length;v++)c[v]=u;if(x>i)return;let k=o;o=c,c=k}let p=o[t.length];return p>i?void 0:p}function Gr(e,t){if(e!==void 0){for(let i=0;i<e.length;i++)if(!t(e[i],i))return!1}return!0}function bo(e,t){let i;if(e!==void 0)for(let o=0;o<e.length;o++){let c=t(e[o],o);c&&(ri(c)?i=go(i,c):i=Er(i,c))}return i??Ne}function Er(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function To(e,t){return e!==void 0&&t(e)?e:void 0}function ho(e){return A.assert(e.length!==0),e[0]}function Ma(e,t){return e!==void 0&&t(e)?e:A.fail(`Invalid cast. The supplied value ${e} did not pass the test '${A.getFunctionName(t)}'.`)}function Ea(e,t){if(e!==void 0)for(let i=0;i<e.length;i++){let o=e[i],c=t(o,i);if(o!==c){let u=e.slice(0,i);for(u.push(c),i++;i<e.length;i++)u.push(t(e[i],i));return u}}return e}function ta(e){return e===void 0||e.length===0?void 0:e[0]}function gd(e,t,i=sm){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!i(e[o],t[o],o))return!1;return!0}function zs(){let e=new Map;return e.add=FH,e.remove=IH,e}function FH(e,t){let i=this.get(e);return i!==void 0?i.push(t):this.set(e,i=[t]),i}function IH(e,t){let i=this.get(e);i!==void 0&&(Rx(i,t),i.length||this.delete(e))}function Rx(e,t){return LH(e,i=>i===t)}function LH(e,t){for(let i=0;i<e.length;i++)if(t(e[i]))return AH(e,i),!0;return!1}function AH(e,t){e[t]=e[e.length-1],e.pop()}function Gy(e){return e===void 0?void 0:[e]}function yd(e,t){return t?.bind(e)}function fN(e,t){for(let i=0;i<e.length;i++)if(e[i]===t)return um(e,i),!0;return!1}function um(e,t){for(let i=t;i<e.length-1;i++)e[i]=e[i+1];e.pop()}function vR(e,t,i,o,c,u){u??(u=Gi);let p=0,m=0,y=e.length,_=t.length,h=!1;for(;p<y&&m<_;){let x=e[p],k=t[m],v=i(x,k);v===-1?(o(x),p++,h=!0):v===1?(c(k),m++,h=!0):(u(k,x),p++,m++)}for(;p<y;)o(e[p++]),h=!0;for(;m<_;)c(t[m++]),h=!0;return h}function mN(e){let t=[];for(let i in e)lg.call(e,i)&&t.push(i);return t}function gg(e,t){return vc(e,t)?e.slice(0,e.length-t.length):e}function JF(e,t){return eo(e,t)?e.substr(t.length):e}function Bx(e,t,i){if(e.has(t))return e.get(t);let o=i();return e.set(t,o),o}function Fr(e,t){if(e!==void 0){let i=e.length,o=0;for(;o<i&&t(e[o]);)o++;if(o<i){let c=e.slice(0,o);for(o++;o<i;){let u=e[o];t(u)&&c.push(u),o++}return c}}return e}function Wh(...e){return(...t)=>{let i;for(let o of e)if(i=o(...t),i)return i;return i}}function Io(e){return A.assert(e.length!==0),e[e.length-1]}function Ya(e,t){if(e!==void 0)for(let i=0;i<e.length;i++){let o=t(e[i],i);if(o!==void 0)return o}}function $y(e){return e!==void 0&&e.length===1?e[0]:void 0}function Td(e,t){let i=0;if(e!==void 0)for(let o=0;o<e.length;o++){let c=e[o];t(c,o)&&i++}return i}function Yd(){throw new Error("Not implemented")}function dc(e,t,i){if(e===void 0)return-1;for(let o=i??0;o<e.length;o++)if(t(e[o],o))return o;return-1}function UF(e,t,i,o){for(;i<o;){if(e[i]!==t[i])return!1;i++}return!0}function Au(e){let t=[];for(let i=0;i<e.length;i++){let o=e[i];o&&(ri(o)?go(t,o):t.push(o))}return t}function FR(e,t,i){for(let o=i??0;o<e.length;o++)if(Jr(t,e.charCodeAt(o)))return o;return-1}function gN(e,t){return e.length===0?e:e.slice().sort(t)}function jx(e,t){return e.has(t)?!1:(e.add(t),!0)}function OH(e,t){if(e.length===0)return Ne;let i=e[0],o=[i];for(let c=1;c<e.length;c++){let u=e[c];switch(t(u,i)){case!0:case 0:continue;case-1:return A.fail("Array is unsorted.")}o.push(i=u)}return o}function yN(e,t,i){return OH(gN(e,t),i||t||Lu)}function IR(e,t,i=sm){if(e===t)return!0;if(!e||!t)return!1;for(let o in e)if(lg.call(e,o)&&(!lg.call(t,o)||!i(e[o],t[o])))return!1;for(let o in t)if(lg.call(t,o)&&!lg.call(e,o))return!1;return!0}var wH=(()=>{return t;function e(i,o,c){if(i===o)return 0;if(i===void 0)return-1;if(o===void 0)return 1;let u=c(i,o);return u<0?-1:u>0?1:0}function t(i){let o=new Intl.Collator(i,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(c,u)=>e(c,u,o)}})(),NR,LR;function AR(){return LR}function TN(e,t){return(NR||(NR=wH(LR)))(e,t)}function hN(e,t,i=sm){return e.length===t.length&&e.every((o,c)=>i(o,t[c]))}function SN(e,t){if(e.length<=1)return e;let i=[];for(let o=0,c=e.length;o<c;o++)o&&i.push(t),i.push(e[o]);return i}function Jx(e,t,i){if(e===void 0)return-1;for(let o=i??e.length-1;o>=0;o--)if(t(e[o],o))return o;return-1}function MH(e,t,i=gi){let o=zs();for(let c of e)o.add(t(c),i(c));return o}function OR(e,t,i=gi){return Ho(MH(e,t).values(),i)}function WF(e,t){return Zi(e?.start,t?.start)||Zi(e?.length,t?.length)}function Kh(){return[]}function wR(e,t,i=gi){let o=new Map;for(let c of e){let u=t(c);u!==void 0&&o.set(u,i(c))}return o}function Ux(e,...t){for(let i of t)if(i!==void 0)for(let o in i)Ca(i,o)&&(e[o]=i[o]);return e}function KF(e){return ri(e)?e:[e]}function MR(e,t){let i={};for(let o in t)lg.call(t,o)&&(i[o]=t[o]);for(let o in e)lg.call(e,o)&&(i[o]=e[o]);return i}function RR(e){if(e)for(let t of e)return t}function BR(e,t){let i=new Array(e);for(let o=0;o<e;o++)i[o]=t(o);return i}function jR(e){let t=[];return JR(e,t,void 0,0),t}function JR(e,t,i,o){for(let c of e[o]){let u;i?(u=i.slice(),u.push(c)):u=[c],o===e.length-1?t.push(u):JR(e,t,u,o+1)}}function UR(e,t,i){let o=e.slice(0);return o[t]=i,o}function WR(e,t,i){let o;for(let c=0;c<e.length;c++)t(e[c])?o=o===void 0?c:o:o!==void 0&&(i(o,c),o=void 0);o!==void 0&&i(o,e.length)}function KR(e,t,i){let o=i;if(e){let c=0;for(let u of e)o=t(o,u,c),c++}return o}function RH(){if(pN())try{let{performance:e}=require("perf_hooks");return{shouldWriteNativeEvents:!1,performance:e}}catch{}if(typeof performance=="object")return{shouldWriteNativeEvents:!0,performance}}function BH(){let e=RH();if(!e)return;let{shouldWriteNativeEvents:t,performance:i}=e,o={shouldWriteNativeEvents:t,performance:void 0,performanceTime:void 0};return typeof i.timeOrigin=="number"&&typeof i.now=="function"&&(o.performanceTime=i),o.performanceTime&&typeof i.mark=="function"&&typeof i.measure=="function"&&typeof i.clearMarks=="function"&&typeof i.clearMeasures=="function"&&(o.performance=i),o}var zR=BH(),VR=zR?.performanceTime;function HR(){return zR}var ao=VR?()=>VR.now()??Date.now():Date.now;var _N;try{let e=process.env.TS_ETW_MODULE_PATH??"./node_modules/@microsoft/typescript-etw";_N=require(e)}catch{_N=void 0}var Wx=_N?.logEvent?_N:void 0;var A;(Di=>{let e=!1,t=0;Di.currentLogLevel=2,Di.isDebugging=!1;let u;function p(qe){e&&(typeof Object.setPrototypeOf=="function"?(u||(u=Object.create(Array.prototype),y(u)),Object.setPrototypeOf(qe,u)):y(qe))}Di.attachNodeArrayDebugInfo=p;function m(qe){let Zn=qe&7,Gn=Zn===0?"in out":Zn===3?"[bivariant]":Zn===2?"in":Zn===1?"out":Zn===4?"[independent]":"";return qe&8?Gn+=" (unmeasurable)":qe&16&&(Gn+=" (unreliable)"),Gn}Di.formatVariance=m;function y(qe){"__lpcDebuggerDisplay"in qe||Object.defineProperties(qe,{__lpcDebuggerDisplay:{value(Zn){return Zn=String(Zn).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${Zn}`}}})}function _(qe){return R(qe,bN,!0)}Di.formatNodeCheckFlags=_;function h(qe,Zn){debugger;let Gn=new Error(qe?`Debug Failure. ${qe}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(Gn,Zn||h),Gn}Di.fail=h;function x(qe,Zn,Gn,Gt){qe>=Zn&&h(`Expected ${qe} < ${Zn}. ${Gn||""}`,Gt||x)}Di.assertLessThan=x;function k(qe,Zn,Gn){qe==null&&h(Zn,Gn||k)}Di.assertIsDefined=k;function v(qe,Zn,Gn){return h(`${Zn||"Unexpected node."}\r Node ${_e(qe.kind)} was unexpected.`,Gn||v)}Di.failBadSyntaxKind=v;function R(qe=0,Zn,Gn){let Gt=Y(Zn);if(qe===0)return Gt.length>0&&Gt[0][0]===0?Gt[0][1]:"0";if(Gn){let zr=[],Wr=qe;for(let[dr,Te]of Gt){if(dr>qe)break;dr!==0&&dr&qe&&(zr.push(Te),Wr&=~dr)}if(Wr===0)return zr.join("|")}else for(let[zr,Wr]of Gt)if(zr===qe)return Wr;return qe.toString()}Di.formatEnum=R;let T=new Map;function Y(qe){let Zn=T.get(qe);if(Zn)return Zn;let Gn=[];for(let zr in qe){let Wr=qe[zr];typeof Wr=="number"&&Gn.push([Wr,zr])}let Gt=md(Gn,(zr,Wr)=>Zi(zr[0],Wr[0]));return T.set(qe,Gt),Gt}function B(qe){return R(qe,Fc,!0)}Di.formatSymbolFlags=B;function ce(qe){return R(qe,Qy,!0)}Di.formatObjectFlags=ce;function he(qe){return R(qe,xN,!0)}Di.formatSignatureFlags=he;function V(qe){return R(qe,sf,!0)}Di.formatTypeFlags=V;function ne(qe,Zn,Gn){for(let Gt of qe)k(Gt,Zn,Gn||ne)}Di.assertEachIsDefined=ne;function Ie(qe,Zn,Gn){return ne(qe,Zn,Gn||Ie),qe}Di.checkEachDefined=Ie;function Ye(){if(e)return;let qe=new WeakMap,Zn=new WeakMap;Object.defineProperties(Uo.getSymbolConstructor().prototype,{__lpcDebuggerDisplay:{value(){let Gt=this.flags&33554432?"TransientSymbol":"Symbol",zr=this.flags&-33554433;return`${Gt} '${Xa(this)}'${zr?` (${B(zr)})`:""}`}},__debugFlags:{get(){return B(this.flags)}}}),Object.defineProperties(Uo.getTypeConstructor().prototype,{__lpcDebuggerDisplay:{value(){let Gt=this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&1048576?"UnionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",zr=this.flags&524288?this.objectFlags&-1344:0;return`${Gt}${this.symbol?` '${Xa(this.symbol)}'`:""}${zr?` (${ce(zr)})`:""}`}},__debugFlags:{get(){return V(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?ce(this.objectFlags):""}},__debugTypeToString:{value(){let Gt=qe.get(this);return Gt===void 0&&(Gt=this.checker.typeToString(this),qe.set(this,Gt)),Gt}}}),Object.defineProperties(Uo.getSignatureConstructor().prototype,{__debugFlags:{get(){return he(this.flags)}},__debugSignatureToString:{value(){return this.checker?.signatureToString(this)}}});let Gn=[Uo.getNodeConstructor(),Uo.getIdentifierConstructor(),Uo.getTokenConstructor(),Uo.getSourceFileConstructor()];for(let Gt of Gn)Ca(Gt.prototype,"__debugKind")||Object.defineProperties(Gt.prototype,{__lpcDebuggerDisplay:{value(){return`${sn(this)?`Identifier '${wo(this)}'`:ii(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:nu(this)?`NumericLiteral ${this.text}`:yg(this)?`FloatLiteral ${this.text}`:Ri(this)?"ParameterDeclaration":tu(this)?"ArrayTypeNode":Hh(this)?"UnionTypeNode":Gh(this)?"ParenthesizedTypeNode":dm(this)?"IndexedAccessTypeNode":Ic(this)?"LiteralTypeNode":_e(this.kind)}${this.flags?` (${ie(this.flags)})`:""}`}},__debugKind:{get(){return _e(this.kind)}},__debugNodeFlags:{get(){return ie(this.flags)}},__debugModifierFlags:{get(){return De(qR(this))}},__debugIsParseTreeNode:{get(){return zh(this)}},__debugGetText:{value(zr){if(Si(this))return"";let Wr=Zn.get(this);if(Wr