options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!Ie.test(e)&&!Ie.test(n)};He.tokenize=function(e){for(var n=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t"u"?t:l}:o;return typeof e=="string"?e:JSON.stringify(le(e,null,null,r),r," ")};W.equals=function(e,n){return N.prototype.equals.call(W,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function le(e,n,t,o,r){n=n||[],t=t||[],o&&(e=o(r,e));var i;for(i=0;i=t.__.length&&t.__.push({__V:Y}),t.__[e]}function Q(e){return X=1,gn(qe,e)}function gn(e,n,t){var o=fe(U++,2);if(o.t=e,!o.__c&&(o.__=[t?t(n):qe(void 0,n),function(u){var c=o.__N?o.__N[0]:o.__[0],d=o.t(c,u);c!==d&&(o.__N=[d,o.__[1]],o.__c.setState({}))}],o.__c=h,!h.u)){var r=function(u,c,d){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(m){return m.__c});if(p.every(function(m){return!m.__N}))return!i||i.call(this,u,c,d);var a=!1;return p.forEach(function(m){if(m.__N){var f=m.__[0];m.__=m.__N,m.__N=void 0,f!==m.__[0]&&(a=!0)}}),!(!a&&o.__c.props===u)&&(!i||i.call(this,u,c,d))};h.u=!0;var i=h.shouldComponentUpdate,l=h.componentWillUpdate;h.componentWillUpdate=function(u,c,d){if(this.__e){var p=i;i=void 0,r(u,c,d),i=p}l&&l.call(this,u,c,d)},h.shouldComponentUpdate=r}return o.__N||o.__}function V(e,n){var t=fe(U++,7);return hn(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function A(e,n){return X=8,V(function(){return e},n)}function ze(e){var n=h.context[e.__c],t=fe(U++,9);return t.c=e,n?(t.__==null&&(t.__=!0,n.sub(h)),n.props.value):e.__}function vn(){for(var e;e=Ue.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Z),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],_.__e(n,e.__v)}}_.__b=function(e){h=null,Ae&&Ae(e)},_.__r=function(e){Me&&Me(e),U=0;var n=(h=e.__c).__H;n&&(ce===h?(n.__h=[],h.__h=[],n.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=Y,t.__N=t.i=void 0})):(n.__h.forEach(Z),n.__h.forEach(de),n.__h=[],U=0)),ce=h},_.diffed=function(e){Oe&&Oe(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(Ue.push(n)!==1&&Pe===_.requestAnimationFrame||((Pe=_.requestAnimationFrame)||yn)(vn)),n.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==Y&&(t.__=t.__V),t.i=void 0,t.__V=Y})),ce=h=null},_.__c=function(e,n){n.some(function(t){try{t.__h.forEach(Z),t.__h=t.__h.filter(function(o){return!o.__||de(o)})}catch(o){n.some(function(r){r.__h&&(r.__h=[])}),n=[],_.__e(o,t.__v)}}),Ve&&Ve(e,n)},_.unmount=function(e){Be&&Be(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(o){try{Z(o)}catch(r){n=r}}),t.__H=void 0,n&&_.__e(n,t.__v))};var We=typeof requestAnimationFrame=="function";function yn(e){var n,t=function(){clearTimeout(o),We&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);We&&(n=requestAnimationFrame(t))}function Z(e){var n=h,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),h=n}function de(e){var n=h;e.__c=e.__(),h=n}function hn(e,n){return!e||e.length!==n.length||n.some(function(t,o){return t!==e[o]})}function qe(e,n){return typeof n=="function"?n(e):n}var $e=e=>!!e;var jn=Symbol("unset");function je(e){let n=[];for(let t of e)n=n.concat(t);return n}var Jn=2**31-1;var Je=e=>function({value:t,onChange:o}){return s("div",{className:"decision-buttons"},e.map(r=>s("button",{key:r,onClick:()=>o(r),className:t===r?"active":""},r)))};var Ze="",Xe="node:",Qe=e=>e.config.type==="pwa-node"||e.config.type==="pwa-extensionHost"||e.config.type==="node-terminal",ee=e=>e.config.type==="pwa-chrome"||e.config.type==="pwa-msedge",pe=e=>e.absolutePath.startsWith(Ze)||e.url.startsWith(Xe)?2:e.absolutePath.includes("node_modules")?1:0,ne=(e,n)=>e.url.startsWith(Xe)?e.url:e.absolutePath.startsWith(Ze)?e.absolutePath:bn(e.absolutePath)&&n.config.__workspaceFolder?xn(n.config.__workspaceFolder,e.absolutePath):e.absolutePath||e.url,M=e=>{let n=(e.prettyName||e.url).split(/\\|\//g);return n[n.length-1]},bn=e=>en(e)||wn(e),en=e=>e.startsWith("/"),wn=e=>/^[a-z]:/i.test(e),Ke=(e,n)=>{let t=e.split("/"),o=n.split("/");for(;t.length&&o[0]===t[0];)t.shift(),o.shift();return(t.length?new Array(t.length).fill(".."):["."]).concat(o).join("/")},xn=(e,n)=>en(e)?Ke(e,n):Ke(Ge(Ye(e)),Ge(Ye(n))),Ge=e=>e.replace(/\\\//g,"/").replace(/\\/g,"/"),Ye=e=>e.slice(0,1).toUpperCase()+e.slice(1);var _e=Ne(void 0),C=()=>ze(_e);var me=acquireVsCodeApi(),kn=(e,n)=>{let t=me.getState()?.componentState||{};return t.hasOwnProperty(e)?t[e]:n},Tn=(e,n)=>{let t=me.getState();me.setState({...t,componentState:{...t?.componentState,[e]:n}})},H=(e,n)=>{let[t,o]=Q(()=>kn(e,n)),r=A(i=>{Tn(e,i),o(i)},[e,o]);return[t,r]};var nn=()=>{let e=C();return s(k,null,e.breakpoints.map((n,t)=>s(Fn,{bp:n,key:t})))},Ln=(e,n)=>e.cdp.some(t=>{if("location"in t.args)return!0;if(t.args.url){let o=t.args.url;return n.sources.some(r=>r.url===o)}if(t.args.urlRegex){let o=new RegExp(t.args.urlRegex);return n.sources.some(r=>o.test(r.url))}return!1}),Cn=(e,n)=>{let t=0,o=[s("li",{key:t++},s("p",null,"\u2705 This breakpoint was initially set in:"),s("p",null,s("code",null,e.source.path)," line ",e.params.line," column ",e.params.column||1))];if(!Ln(e,n))return o.push(s(Nn,{bp:e,key:t++})),o;o.push(s("li",{key:t++},s("p",null,"\u2705 In the runtime, the breakpoint was set in:"),s("p",null,s("ul",null,e.cdp.map((l,u)=>s(Hn,{cdp:l,index:u,key:u}))))));let r=e.cdp.filter(l=>l.state===1),i=je(r.map(l=>l.state===1?l.uiLocations:[]));return i.length?(o.push(s("li",{key:t++},s("p",null,"\u2705 The runtime acknowledged and adjusted the breakpoint, and it mapped back to the following locations:"),s("ul",null,i.map((l,u)=>s(In,{loc:l,key:u})))),s("li",{key:t++},s("p",null,"If this is not right, your compiled code might be out of date with your sources. If you don't think this is the case and something else is wrong, please"," ",s("a",{href:"https://github.com/microsoft/vscode-js-debug/issues/new/choose"},"open an issue"),"!"))),o):(o.push(s("li",{key:t++},s(Sn,null))),o)},Sn=()=>{let e=C();return s("p",null,"\u2753 We sent the breakpoint, but it didn't bind to any locations. If this is unexpected:",s("ul",null,s("li",null,"Make sure that your program is loading or running this script. You can add a"," ",s("code",null,"debugger;")," statement to check this: your program will pause when it hits it."),s("li",null,"If your breakpoint is set in certain places, such as on the last empty line of a file, the runtime might not be able to find anywhere to place it."),Qe(e)&&s("li",null,"Unless you"," ",s("a",{href:"https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_breakpoint-validation"},"run with --nolazy"),", Node.js might not resolve breakpoints for code it hasn't parsed yet."),s("li",null,"If necessary, make sure your compiled files are up-to-date with your source files.")))},Fn=({bp:e})=>{if(!e.source.path)return null;let n=C();return s("div",{className:"content source-container"},s("h2",null,ne({absolutePath:e.source.path,url:e.source.path},n),":",e.params.line,":",e.params.column||1),s("ul",{className:"bp-tracing"},Cn(e,n)))},Nn=({bp:e})=>{let n=C(),t=M({url:e.source.path}),o=n.sources.filter(r=>M(r).toLowerCase()===t.toLowerCase());return o.length?s("li",null,s("p",null,"\u2753 We couldn't find a corresponding source location, but found some other files with the same name:"),s("ul",null,o.map(r=>s("li",{key:r},s(Dn,{original:e.source.path,updated:r.absolutePath||r.url})))),ee(n)?s("p",null,"You may need to adjust the ",s("code",null,"webRoot")," in your ",s("code",null,"launch.json")," ","if you're building from a subfolder, or tweak your ",s("code",null,"sourceMapPathOverrides"),"."):s("p",null,"If this is the same file, you may need to adjust your build tool"," ",ee(n)&&s(k,null,"or ",s("code",null,"webRoot")," in the launch.json")," to correct the paths.")):s("li",null,s("p",null,s(Pn,{basename:t})))},Dn=({original:e,updated:n})=>s("span",{className:"text-diff"},Ee(e.split(/[/\\]/g),n.split(/[/\\]/g),{ignoreCase:!0}).map((t,o)=>s("span",{className:t.added?"add":t.removed?"rm":"",key:o},o>0?"/":"",t.value.join("/")))),In=({loc:e})=>{let t=C().sources.find(o=>o.sourceReference===e.sourceReference);return s(k,null,s("code",null,t?.absolutePath??t?.url??"unknown")," line ",e.lineNumber," column"," ",e.columnNumber)},Hn=({cdp:e,index:n})=>{let t=C(),[o,r]=H(`showCdpBp${n}`,!1),{url:i,line:l,col:u,regex:c}="location"in e.args?{url:t.sources.find(d=>!d.compiledSourceRefToUrl&&d.scriptIds.includes(e.args.location.scriptId))?.url,regex:void 0,line:e.args.location.lineNumber+1,col:(e.args.location.columnNumber||0)+1}:{url:e.args.urlRegex?Rn(e.args.urlRegex):e.args.url,regex:e.args.urlRegex,line:e.args.lineNumber+1,col:(e.args.columnNumber||0)+1};return s("li",null,s("p",null,s("code",null,i)," line ",l," column ",u," ",c&&s("a",{onClick:()=>r(!o)},"via this regex")),o&&s("p",null,s("code",null,c)))},Rn=e=>e.replace(/\[([[a-z])[A-Z]\]/g,(n,t)=>t).replace(/\\\\/,"\\").replace(/\\\//g,"/").replace(/\|.+$/g,"").replace(/\\\./g,".");var En=Je(["Loaded in directly","Be parsed from a sourcemap"]),Pn=({basename:e})=>{let n=C(),[t,o]=Q(e.endsWith(".js")?void 0:"Be parsed from a sourcemap");return s(k,null,s("p",null,"\u2753 We couldn't find a corresponding source location, and didn't find any source with the name ",s("code",null,e),"."),s("p",null,"How did you expect this file to be loaded? (If you have a compilation step, you should pick 'sourcemap')",s(En,{onChange:o,value:t}),t==="Loaded in directly"&&(ee(n)?s("p",null,"It looks like your webpage didn't load this script; breakpoints won't be bound until the file they're set in is loaded. Make sure your script is imported from the right location using a ",s("code",null,"