just-bash-nx 3.0.8 → 3.0.10

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.
@@ -39,7 +39,7 @@ Notes:
39
39
  `}},X=class extends Nt{limitType;name="ExecutionLimitError";static EXIT_CODE=126;constructor(t,n,r="",s=""){super(t,r,s),this.limitType=n,this.stderr=s||`bash: ${t}
40
40
  `}},is=class extends Nt{name="ExecutionAbortedError";constructor(t="",n=""){super("execution aborted",t,n)}},Mn=class extends Nt{name="SubshellExitError";constructor(t="",n=""){super("subshell exit",t,n)}};nn=class extends Nt{exitCode;name="PosixFatalError";constructor(t,n="",r=""){super("posix fatal error",n,r),this.exitCode=t}}});function Xe(e){return e instanceof Error?e.message:String(e)}var rn=k(()=>{"use strict"});function Ui(e,t,n){let r=e;n>=0&&r.length>n&&(r=r.slice(0,n));let s=Math.abs(t);return s>r.length&&(t<0?r=r.padEnd(s," "):r=r.padStart(s," ")),r}function zf(e,t){let n=t,r=0,s=-1,i=!1;for(n<e.length&&e[n]==="-"&&(i=!0,n++);n<e.length&&/\d/.test(e[n]);)r=r*10+parseInt(e[n],10),n++;if(n<e.length&&e[n]===".")for(n++,s=0;n<e.length&&/\d/.test(e[n]);)s=s*10+parseInt(e[n],10),n++;return i&&r>0&&(r=-r),[r,s,n-t]}function Bi(e){let t="",n=0;for(;n<e.length;)if(e[n]==="\\"&&n+1<e.length)switch(e[n+1]){case"n":t+=`
41
41
  `,n+=2;break;case"t":t+=" ",n+=2;break;case"r":t+="\r",n+=2;break;case"\\":t+="\\",n+=2;break;case"a":t+="\x07",n+=2;break;case"b":t+="\b",n+=2;break;case"f":t+="\f",n+=2;break;case"v":t+="\v",n+=2;break;case"e":case"E":t+="\x1B",n+=2;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{let s="",i=n+1;for(;i<e.length&&i<n+4&&/[0-7]/.test(e[i]);)s+=e[i],i++;t+=String.fromCharCode(parseInt(s,8)),n=i;break}case"x":{let s=[],i=n;for(;i+3<e.length&&e[i]==="\\"&&e[i+1]==="x"&&/[0-9a-fA-F]{2}/.test(e.slice(i+2,i+4));)s.push(parseInt(e.slice(i+2,i+4),16)),i+=4;if(s.length>0){try{let o=new TextDecoder("utf-8",{fatal:!0});t+=o.decode(new Uint8Array(s))}catch{for(let o of s)t+=String.fromCharCode(o)}n=i}else t+=e[n],n++;break}case"u":{let s="",i=n+2;for(;i<e.length&&i<n+6&&/[0-9a-fA-F]/.test(e[i]);)s+=e[i],i++;s?(t+=String.fromCodePoint(parseInt(s,16)),n=i):(t+="\\u",n+=2);break}case"U":{let s="",i=n+2;for(;i<e.length&&i<n+10&&/[0-9a-fA-F]/.test(e[i]);)s+=e[i],i++;s?(t+=String.fromCodePoint(parseInt(s,16)),n=i):(t+="\\U",n+=2);break}default:t+=e[n],n++}else t+=e[n],n++;return t}var Ka=k(()=>{"use strict"});function Gf(e,t,n){let r=new Date(t*1e3),s="",i=0;for(;i<e.length;)if(e[i]==="%"&&i+1<e.length){let o=e[i+1],a=g4(r,o,n);a!==null?(s+=a,i+=2):(s+=e[i],i++)}else s+=e[i],i++;return s}function m4(e,t){let n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",hour12:!1,timeZone:t};try{let s=new Intl.DateTimeFormat("en-US",n).formatToParts(e),i=l=>s.find(c=>c.type===l)?.value??"",o=new Map([["Sun",0],["Mon",1],["Tue",2],["Wed",3],["Thu",4],["Fri",5],["Sat",6]]),a=i("weekday");return{year:Number.parseInt(i("year"),10)||e.getFullYear(),month:Number.parseInt(i("month"),10)||e.getMonth()+1,day:Number.parseInt(i("day"),10)||e.getDate(),hour:Number.parseInt(i("hour"),10)||e.getHours(),minute:Number.parseInt(i("minute"),10)||e.getMinutes(),second:Number.parseInt(i("second"),10)||e.getSeconds(),weekday:o.get(a)??e.getDay()}}catch{return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),weekday:e.getDay()}}}function g4(e,t,n){let r=m4(e,n),s=(l,c=2)=>String(l).padStart(c,"0"),i=Vf(r.year,r.month,r.day),o=Hf(r.year,r.month,r.day,r.weekday,0),a=Hf(r.year,r.month,r.day,r.weekday,1);switch(t){case"a":return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][r.weekday];case"A":return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][r.weekday];case"b":case"h":return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r.month-1];case"B":return["January","February","March","April","May","June","July","August","September","October","November","December"][r.month-1];case"c":return`${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][r.weekday]} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r.month-1]} ${String(r.day).padStart(2," ")} ${s(r.hour)}:${s(r.minute)}:${s(r.second)} ${r.year}`;case"C":return s(Math.floor(r.year/100));case"d":return s(r.day);case"D":return`${s(r.month)}/${s(r.day)}/${s(r.year%100)}`;case"e":return String(r.day).padStart(2," ");case"F":return`${r.year}-${s(r.month)}-${s(r.day)}`;case"g":return s(jf(r.year,r.month,r.day)%100);case"G":return String(jf(r.year,r.month,r.day));case"H":return s(r.hour);case"I":return s(r.hour%12||12);case"j":return String(i).padStart(3,"0");case"k":return String(r.hour).padStart(2," ");case"l":return String(r.hour%12||12).padStart(2," ");case"m":return s(r.month);case"M":return s(r.minute);case"n":return`
42
- `;case"N":return"000000000";case"p":return r.hour<12?"AM":"PM";case"P":return r.hour<12?"am":"pm";case"r":return`${s(r.hour%12||12)}:${s(r.minute)}:${s(r.second)} ${r.hour<12?"AM":"PM"}`;case"R":return`${s(r.hour)}:${s(r.minute)}`;case"s":return String(Math.floor(e.getTime()/1e3));case"S":return s(r.second);case"t":return" ";case"T":return`${s(r.hour)}:${s(r.minute)}:${s(r.second)}`;case"u":return String(r.weekday===0?7:r.weekday);case"U":return s(o);case"V":return s(b4(r.year,r.month,r.day));case"w":return String(r.weekday);case"W":return s(a);case"x":return`${s(r.month)}/${s(r.day)}/${s(r.year%100)}`;case"X":return`${s(r.hour)}:${s(r.minute)}:${s(r.second)}`;case"y":return s(r.year%100);case"Y":return String(r.year);case"z":return y4(e,n);case"Z":return w4(e,n);case"%":return"%";default:return null}}function y4(e,t){if(!t){let o=-e.getTimezoneOffset(),a=o>=0?"+":"-",l=Math.floor(Math.abs(o)/60),c=Math.abs(o)%60;return`${a}${String(l).padStart(2,"0")}${String(c).padStart(2,"0")}`}try{let l=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).formatToParts(e).find(c=>c.type==="timeZoneName");if(l){let c=l.value.match(/GMT([+-])(\d{2}):(\d{2})/);if(c)return`${c[1]}${c[2]}${c[3]}`;if(l.value==="GMT"||l.value==="UTC")return"+0000"}}catch{}let n=-e.getTimezoneOffset(),r=n>=0?"+":"-",s=Math.floor(Math.abs(n)/60),i=Math.abs(n)%60;return`${r}${String(s).padStart(2,"0")}${String(i).padStart(2,"0")}`}function w4(e,t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"short"}).formatToParts(e).find(i=>i.type==="timeZoneName")?.value??"UTC"}catch{return"UTC"}}function Vf(e,t,n){let r=[31,28,31,30,31,30,31,31,30,31,30,31];(e%4===0&&e%100!==0||e%400===0)&&(r[1]=29);let i=n;for(let o=0;o<t-1;o++)i+=r[o];return i}function Hf(e,t,n,r,s){let i=Vf(e,t,n),l=(new Date(e,0,1).getDay()-s+7)%7,c=(r-s+7)%7,u=i-1+l;return Math.floor((u-c+7)/7)}function b4(e,t,n){let r=new Date(e,t-1,n,12,0,0);r.setDate(r.getDate()+3-(r.getDay()+6)%7);let s=new Date(r.getFullYear(),0,4);s.setDate(s.getDate()+3-(s.getDay()+6)%7);let i=r.getTime()-s.getTime();return 1+Math.round(i/(10080*60*1e3))}function jf(e,t,n){let r=new Date(e,t-1,n,12,0,0);return r.setDate(r.getDate()+3-(r.getDay()+6)%7),r.getFullYear()}var qf=k(()=>{"use strict"});var Kf={};ee(Kf,{flagsForFuzzing:()=>R4,printfCommand:()=>A4});import{sprintf as os}from"sprintf-js";function x4(e){let t="",n=0;for(;n<e.length;){let r=e[n];if(r<128){t+=String.fromCharCode(r),n++;continue}if((r&224)===192){if(n+1<e.length&&(e[n+1]&192)===128&&r>=194){let s=(r&31)<<6|e[n+1]&63;t+=String.fromCharCode(s),n+=2;continue}t+=String.fromCharCode(r),n++;continue}if((r&240)===224){if(n+2<e.length&&(e[n+1]&192)===128&&(e[n+2]&192)===128){if(r===224&&e[n+1]<160){t+=String.fromCharCode(r),n++;continue}let s=(r&15)<<12|(e[n+1]&63)<<6|e[n+2]&63;if(s>=55296&&s<=57343){t+=String.fromCharCode(r),n++;continue}t+=String.fromCharCode(s),n+=3;continue}t+=String.fromCharCode(r),n++;continue}if((r&248)===240&&r<=244){if(n+3<e.length&&(e[n+1]&192)===128&&(e[n+2]&192)===128&&(e[n+3]&192)===128){if(r===240&&e[n+1]<144){t+=String.fromCharCode(r),n++;continue}let s=(r&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63;if(s>1114111){t+=String.fromCharCode(r),n++;continue}t+=String.fromCodePoint(s),n+=4;continue}t+=String.fromCharCode(r),n++;continue}t+=String.fromCharCode(r),n++}return t}function S4(e,t,n,r){let s="",i=0,o=0,a=!1,l="";for(;i<e.length;)if(e[i]==="%"&&i+1<e.length){let c=i;if(i++,e[i]==="%"){s+="%",i++;continue}let u=e.slice(c).match(/^%(-?\d*)(?:\.(\d+))?\(([^)]*)\)T/);if(u){let S=u[1]?parseInt(u[1],10):0,v=u[2]?parseInt(u[2],10):-1,$=u[3],_=u[0],R=t[n+o]||"";o++;let P;R===""||R==="-1"||R==="-2"?P=Math.floor(Date.now()/1e3):P=parseInt(R,10)||0;let C=Gf($,P,r);if(v>=0&&C.length>v&&(C=C.slice(0,v)),S!==0){let T=Math.abs(S);C.length<T&&(S<0?C=C.padEnd(T," "):C=C.padStart(T," "))}s+=C,i=c+_.length;continue}for(;i<e.length&&"+-0 #'".includes(e[i]);)i++;let f=!1;if(e[i]==="*")f=!0,i++;else for(;i<e.length&&/\d/.test(e[i]);)i++;let p=!1;if(e[i]===".")if(i++,e[i]==="*")p=!0,i++;else for(;i<e.length&&/\d/.test(e[i]);)i++;i<e.length&&"hlL".includes(e[i])&&i++;let h=e[i]||"";i++;let m=e.slice(c,i);if(f){let S=parseInt(t[n+o]||"0",10);o++,m=m.replace("*",String(S))}if(p){let S=parseInt(t[n+o]||"0",10);o++,m=m.replace(".*",`.${S}`)}let g=t[n+o]||"";o++;let{value:y,parseError:w,parseErrMsg:b,stopped:x}=C4(m,h,g);if(s+=y,w&&(a=!0,b&&(l=b)),x)return{result:s,argsConsumed:o,error:a,errMsg:l,stopped:!0}}else s+=e[i],i++;return{result:s,argsConsumed:o,error:a,errMsg:l,stopped:!1}}function C4(e,t,n){let r=!1,s="";switch(t){case"d":case"i":{let i=Wi(n);return r=xn,r&&(s=`printf: ${n}: invalid number
42
+ `;case"N":return"000000000";case"p":return r.hour<12?"AM":"PM";case"P":return r.hour<12?"am":"pm";case"r":return`${s(r.hour%12||12)}:${s(r.minute)}:${s(r.second)} ${r.hour<12?"AM":"PM"}`;case"R":return`${s(r.hour)}:${s(r.minute)}`;case"s":return String(Math.floor(e.getTime()/1e3));case"S":return s(r.second);case"t":return" ";case"T":return`${s(r.hour)}:${s(r.minute)}:${s(r.second)}`;case"u":return String(r.weekday===0?7:r.weekday);case"U":return s(o);case"V":return s(b4(r.year,r.month,r.day));case"w":return String(r.weekday);case"W":return s(a);case"x":return`${s(r.month)}/${s(r.day)}/${s(r.year%100)}`;case"X":return`${s(r.hour)}:${s(r.minute)}:${s(r.second)}`;case"y":return s(r.year%100);case"Y":return String(r.year);case"z":return y4(e,n);case"Z":return w4(e,n);case"%":return"%";default:return null}}function y4(e,t){if(!t){let o=-e.getTimezoneOffset(),a=o>=0?"+":"-",l=Math.floor(Math.abs(o)/60),c=Math.abs(o)%60;return`${a}${String(l).padStart(2,"0")}${String(c).padStart(2,"0")}`}try{let l=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).formatToParts(e).find(c=>c.type==="timeZoneName");if(l){let c=l.value.match(/GMT([+-])(\d{2}):(\d{2})/);if(c)return`${c[1]}${c[2]}${c[3]}`;if(l.value==="GMT"||l.value==="UTC")return"+0000"}}catch{}let n=-e.getTimezoneOffset(),r=n>=0?"+":"-",s=Math.floor(Math.abs(n)/60),i=Math.abs(n)%60;return`${r}${String(s).padStart(2,"0")}${String(i).padStart(2,"0")}`}function w4(e,t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"short"}).formatToParts(e).find(i=>i.type==="timeZoneName")?.value??"UTC"}catch{return"UTC"}}function Vf(e,t,n){let r=[31,28,31,30,31,30,31,31,30,31,30,31];(e%4===0&&e%100!==0||e%400===0)&&(r[1]=29);let i=n;for(let o=0;o<t-1;o++)i+=r[o];return i}function Hf(e,t,n,r,s){let i=Vf(e,t,n),l=(new Date(e,0,1).getDay()-s+7)%7,c=(r-s+7)%7,u=i-1+l;return Math.floor((u-c+7)/7)}function b4(e,t,n){let r=new Date(e,t-1,n,12,0,0);r.setDate(r.getDate()+3-(r.getDay()+6)%7);let s=new Date(r.getFullYear(),0,4);s.setDate(s.getDate()+3-(s.getDay()+6)%7);let i=r.getTime()-s.getTime();return 1+Math.round(i/(10080*60*1e3))}function jf(e,t,n){let r=new Date(e,t-1,n,12,0,0);return r.setDate(r.getDate()+3-(r.getDay()+6)%7),r.getFullYear()}var qf=k(()=>{"use strict"});var Kf={};ee(Kf,{flagsForFuzzing:()=>R4,printfCommand:()=>A4});import{sprintf as os}from"sprintf-js";function x4(e){let t="",n=0;for(;n<e.length;){let r=e[n];if(r<128){t+=String.fromCharCode(r),n++;continue}if((r&224)===192){if(n+1<e.length&&(e[n+1]&192)===128&&r>=194){let s=(r&31)<<6|e[n+1]&63;t+=String.fromCharCode(s),n+=2;continue}t+=String.fromCharCode(r),n++;continue}if((r&240)===224){if(n+2<e.length&&(e[n+1]&192)===128&&(e[n+2]&192)===128){if(r===224&&e[n+1]<160){t+=String.fromCharCode(r),n++;continue}let s=(r&15)<<12|(e[n+1]&63)<<6|e[n+2]&63;if(s>=55296&&s<=57343){t+=String.fromCharCode(r),n++;continue}t+=String.fromCharCode(s),n+=3;continue}t+=String.fromCharCode(r),n++;continue}if((r&248)===240&&r<=244){if(n+3<e.length&&(e[n+1]&192)===128&&(e[n+2]&192)===128&&(e[n+3]&192)===128){if(r===240&&e[n+1]<144){t+=String.fromCharCode(r),n++;continue}let s=(r&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63;if(s>1114111){t+=String.fromCharCode(r),n++;continue}t+=String.fromCodePoint(s),n+=4;continue}t+=String.fromCharCode(r),n++;continue}t+=String.fromCharCode(r),n++}return t}function S4(e,t,n,r){let s="",i=0,o=0,a=!1,l="";for(;i<e.length;)if(e[i]==="%"&&i+1<e.length){let c=i;if(i++,e[i]==="%"){s+="%",i++;continue}let u=e.slice(c).match(/^%(-?\d*)(?:\.(\d+))?\(([^)]*)\)T/);if(u){let S=u[1]?parseInt(u[1],10):0,v=u[2]?parseInt(u[2],10):-1,$=u[3],D=u[0],O=t[n+o]||"";o++;let P;O===""||O==="-1"||O==="-2"?P=Math.floor(Date.now()/1e3):P=parseInt(O,10)||0;let C=Gf($,P,r);if(v>=0&&C.length>v&&(C=C.slice(0,v)),S!==0){let T=Math.abs(S);C.length<T&&(S<0?C=C.padEnd(T," "):C=C.padStart(T," "))}s+=C,i=c+D.length;continue}for(;i<e.length&&"+-0 #'".includes(e[i]);)i++;let f=!1;if(e[i]==="*")f=!0,i++;else for(;i<e.length&&/\d/.test(e[i]);)i++;let p=!1;if(e[i]===".")if(i++,e[i]==="*")p=!0,i++;else for(;i<e.length&&/\d/.test(e[i]);)i++;i<e.length&&"hlL".includes(e[i])&&i++;let h=e[i]||"";i++;let m=e.slice(c,i);if(f){let S=parseInt(t[n+o]||"0",10);o++,m=m.replace("*",String(S))}if(p){let S=parseInt(t[n+o]||"0",10);o++,m=m.replace(".*",`.${S}`)}let g=t[n+o]||"";o++;let{value:y,parseError:w,parseErrMsg:b,stopped:x}=C4(m,h,g);if(s+=y,w&&(a=!0,b&&(l=b)),x)return{result:s,argsConsumed:o,error:a,errMsg:l,stopped:!0}}else s+=e[i],i++;return{result:s,argsConsumed:o,error:a,errMsg:l,stopped:!1}}function C4(e,t,n){let r=!1,s="";switch(t){case"d":case"i":{let i=Wi(n);return r=xn,r&&(s=`printf: ${n}: invalid number
43
43
  `),{value:Zf(e,i),parseError:r,parseErrMsg:s}}case"o":{let i=Wi(n);return r=xn,r&&(s=`printf: ${n}: invalid number
44
44
  `),{value:v4(e,i),parseError:r,parseErrMsg:s}}case"u":{let i=Wi(n);r=xn,r&&(s=`printf: ${n}: invalid number
45
45
  `);let o=i<0?i>>>0:i;return{value:Zf(e.replace("u","d"),o),parseError:r,parseErrMsg:s}}case"x":case"X":{let i=Wi(n);return r=xn,r&&(s=`printf: ${n}: invalid number
@@ -63,18 +63,18 @@ Notes:
63
63
  `,stderr:"",exitCode:0}}let m=await t.fs.readdir(h);if(p||(m=m.filter(y=>!y.startsWith("."))),c){let y=[];for(let w of m){let b=h==="/"?`/${w}`:`${h}/${w}`;try{let x=await t.fs.stat(b);y.push({name:w,size:x.size??0})}catch{y.push({name:w,size:0})}}y.sort((w,b)=>b.size-w.size),m=y.map(w=>w.name)}else m.sort();n&&(m=[".","..",...m]),a&&m.reverse();let g="";if((i||o)&&(g+=`${e}:
64
64
  `),s){g+=`total ${m.length}
65
65
  `;let y=m.filter(S=>S==="."||S===".."),w=m.filter(S=>S!=="."&&S!=="..");for(let S of y)g+=`drwxr-xr-x 1 user user 0 Jan 1 00:00 ${S}
66
- `;let b=[];for(let S=0;S<w.length;S+=100){let v=w.slice(S,S+100),$=await Promise.all(v.map(async _=>{let R=h==="/"?`/${_}`:`${h}/${_}`;try{let P=await t.fs.stat(R),C=P.isDirectory?"drwxr-xr-x":"-rw-r--r--",T=u?Or(await t.fs.lstat(R)):P.isDirectory?"/":"",O=P.size??0,I=l?zi(O).padStart(5):String(O).padStart(5),L=P.mtime??new Date(0),B=Hi(L);return{name:_,line:`${C} 1 user user ${I} ${B} ${_}${T}
67
- `}}catch{return{name:_,line:`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${_}
68
- `}}}));b.push(...$)}let x=new Map(w.map((S,v)=>[S,v]));b.sort((S,v)=>(x.get(S.name)??0)-(x.get(v.name)??0));for(let{line:S}of b)g+=S}else if(u){let y=[],w=m.filter(x=>x!=="."&&x!==".."),b=m.filter(x=>x==="."||x==="..");for(let x of b)y.push(`${x}/`);for(let x=0;x<w.length;x+=100){let S=w.slice(x,x+100),v=await Promise.all(S.map(async $=>{let _=h==="/"?`/${$}`:`${h}/${$}`;try{let R=await t.fs.lstat(_);return`${$}${Or(R)}`}catch{return $}}));y.push(...v)}g+=y.join(`
66
+ `;let b=[];for(let S=0;S<w.length;S+=100){let v=w.slice(S,S+100),$=await Promise.all(v.map(async D=>{let O=h==="/"?`/${D}`:`${h}/${D}`;try{let P=await t.fs.stat(O),C=P.isDirectory?"drwxr-xr-x":"-rw-r--r--",T=u?Or(await t.fs.lstat(O)):P.isDirectory?"/":"",R=P.size??0,I=l?zi(R).padStart(5):String(R).padStart(5),L=P.mtime??new Date(0),B=Hi(L);return{name:D,line:`${C} 1 user user ${I} ${B} ${D}${T}
67
+ `}}catch{return{name:D,line:`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${D}
68
+ `}}}));b.push(...$)}let x=new Map(w.map((S,v)=>[S,v]));b.sort((S,v)=>(x.get(S.name)??0)-(x.get(v.name)??0));for(let{line:S}of b)g+=S}else if(u){let y=[],w=m.filter(x=>x!=="."&&x!==".."),b=m.filter(x=>x==="."||x==="..");for(let x of b)y.push(`${x}/`);for(let x=0;x<w.length;x+=100){let S=w.slice(x,x+100),v=await Promise.all(S.map(async $=>{let D=h==="/"?`/${$}`:`${h}/${$}`;try{let O=await t.fs.lstat(D);return`${$}${Or(O)}`}catch{return $}}));y.push(...v)}g+=y.join(`
69
69
  `)+(y.length?`
70
70
  `:"")}else g+=m.join(`
71
71
  `)+(m.length?`
72
- `:"");if(i){let y=m.filter(x=>x!=="."&&x!==".."),w=[];if(t.fs.readdirWithFileTypes)w=(await t.fs.readdirWithFileTypes(h)).filter(S=>S.isDirectory&&y.includes(S.name)).map(S=>({name:S.name,isDirectory:!0}));else for(let x=0;x<y.length;x+=100){let S=y.slice(x,x+100),v=await Promise.all(S.map(async $=>{let _=h==="/"?`/${$}`:`${h}/${$}`;try{let R=await t.fs.stat(_);return{name:$,isDirectory:R.isDirectory}}catch{return{name:$,isDirectory:!1}}}));w.push(...v.filter($=>$.isDirectory))}w.sort((x,S)=>x.name.localeCompare(S.name)),a&&w.reverse();let b=[];for(let x=0;x<w.length;x+=100){let S=w.slice(x,x+100),v=await Promise.all(S.map(async $=>{let _=e==="."?`./${$.name}`:`${e}/${$.name}`,R=await Yf(_,t,n,r,s,i,!1,a,l,c,u,!0);return{name:$.name,result:R}}));b.push(...v)}b.sort((x,S)=>x.name.localeCompare(S.name)),a&&b.reverse();for(let{result:x}of b)g+=`
72
+ `:"");if(i){let y=m.filter(x=>x!=="."&&x!==".."),w=[];if(t.fs.readdirWithFileTypes)w=(await t.fs.readdirWithFileTypes(h)).filter(S=>S.isDirectory&&y.includes(S.name)).map(S=>({name:S.name,isDirectory:!0}));else for(let x=0;x<y.length;x+=100){let S=y.slice(x,x+100),v=await Promise.all(S.map(async $=>{let D=h==="/"?`/${$}`:`${h}/${$}`;try{let O=await t.fs.stat(D);return{name:$,isDirectory:O.isDirectory}}catch{return{name:$,isDirectory:!1}}}));w.push(...v.filter($=>$.isDirectory))}w.sort((x,S)=>x.name.localeCompare(S.name)),a&&w.reverse();let b=[];for(let x=0;x<w.length;x+=100){let S=w.slice(x,x+100),v=await Promise.all(S.map(async $=>{let D=e==="."?`./${$.name}`:`${e}/${$.name}`,O=await Yf(D,t,n,r,s,i,!1,a,l,c,u,!0);return{name:$.name,result:O}}));b.push(...v)}b.sort((x,S)=>x.name.localeCompare(S.name)),a&&b.reverse();for(let{result:x}of b)g+=`
73
73
  `,g+=x.stdout}return{stdout:g,stderr:"",exitCode:0}}catch{return{stdout:"",stderr:`ls: ${e}: No such file or directory
74
74
  `,exitCode:2}}}var P4,D4,_4,L4,e1=k(()=>{"use strict";at();ns();oe();P4={name:"ls",summary:"list directory contents",usage:"ls [OPTION]... [FILE]...",options:["-a, --all do not ignore entries starting with .","-A, --almost-all do not list . and ..","-d, --directory list directories themselves, not their contents","-F, --classify append indicator (one of */=>@) to entries","-h, --human-readable with -l, print sizes like 1K 234M 2G etc.","-l use a long listing format","-r, --reverse reverse order while sorting","-R, --recursive list subdirectories recursively","-S sort by file size, largest first","-t sort by time, newest first","-1 list one file per line"," --help display this help and exit"]},D4={showAll:{short:"a",long:"all",type:"boolean"},showAlmostAll:{short:"A",long:"almost-all",type:"boolean"},longFormat:{short:"l",type:"boolean"},humanReadable:{short:"h",long:"human-readable",type:"boolean"},recursive:{short:"R",long:"recursive",type:"boolean"},reverse:{short:"r",long:"reverse",type:"boolean"},sortBySize:{short:"S",type:"boolean"},classifyFiles:{short:"F",long:"classify",type:"boolean"},directoryOnly:{short:"d",long:"directory",type:"boolean"},sortByTime:{short:"t",type:"boolean"},onePerLine:{short:"1",type:"boolean"}},_4={name:"ls",async execute(e,t){if(U(e))return M(P4);let n=Se("ls",e,D4);if(!n.ok)return n.error;let r=n.result.flags.showAll,s=n.result.flags.showAlmostAll,i=n.result.flags.longFormat,o=n.result.flags.humanReadable,a=n.result.flags.recursive,l=n.result.flags.reverse,c=n.result.flags.sortBySize,u=n.result.flags.classifyFiles,f=n.result.flags.directoryOnly,p=n.result.flags.sortByTime;n.result.flags.onePerLine;let h=n.result.positional;h.length===0&&h.push(".");let d="",m="",g=0;for(let y=0;y<h.length;y++){let w=h[y];if(y>0&&d&&!d.endsWith(`
75
75
 
76
76
  `)&&(d+=`
77
- `),f){let b=t.fs.resolvePath(t.cwd,w);try{let x=await t.fs.stat(b);if(i){let S=x.isDirectory?"drwxr-xr-x":"-rw-r--r--",v=u?Or(await t.fs.lstat(b)):x.isDirectory?"/":"",$=x.size??0,_=o?zi($).padStart(5):String($).padStart(5),R=x.mtime??new Date(0),P=Hi(R);d+=`${S} 1 user user ${_} ${P} ${w}${v}
77
+ `),f){let b=t.fs.resolvePath(t.cwd,w);try{let x=await t.fs.stat(b);if(i){let S=x.isDirectory?"drwxr-xr-x":"-rw-r--r--",v=u?Or(await t.fs.lstat(b)):x.isDirectory?"/":"",$=x.size??0,D=o?zi($).padStart(5):String($).padStart(5),O=x.mtime??new Date(0),P=Hi(O);d+=`${S} 1 user user ${D} ${P} ${w}${v}
78
78
  `}else{let S=u?Or(await t.fs.lstat(b)):"";d+=`${w}${S}
79
79
  `}}catch{m+=`ls: cannot access '${w}': No such file or directory
80
80
  `,g=2}continue}if(w.includes("*")||w.includes("?")||w.includes("[")){let b=await F4(w,t,r,s,i,l,o,c,u);d+=b.stdout,m+=b.stderr,b.exitCode!==0&&(g=b.exitCode)}else{let b=await Yf(w,t,r,s,i,a,h.length>1,l,o,c,u);d+=b.stdout,m+=b.stderr,b.exitCode!==0&&(g=b.exitCode)}}return{stdout:d,stderr:m,exitCode:g}}};L4={name:"ls",flags:[{flag:"-a",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-1",type:"boolean"}],needsFiles:!0}});function M4(e,t,n){if(!e)return e;let r=e.replace(/\n\s+at\s.*/g,"");return n&&(r=r.replace(/\bfile:\/\/\/?[^\s'",)}\]:]+/g,"<path>")),r=r.replace(t?/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap|workspace|root|srv|mnt|app))\b[^\s'",)}\]:]*/g:/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap))\b[^\s'",)}\]:]*/g,"<path>"),r=r.replace(/node:internal\/[^\s'",)}\]:]+/g,"<internal>"),r=r.replace(/[A-Z]:\\[^\s'",)}\]:]+/g,"<path>"),n&&(r=r.replace(/\\\\[^\s\\]+\\[^\s'",)}\]:]+/g,"<path>")),r}function He(e){return M4(e,!1,!1)}var En=k(()=>{"use strict"});var t1={};ee(t1,{flagsForFuzzing:()=>W4,mkdirCommand:()=>B4});var U4,B4,W4,n1=k(()=>{"use strict";En();rn();at();U4={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},B4={name:"mkdir",async execute(e,t){let n=Se("mkdir",e,U4);if(!n.ok)return n.error;let r=n.result.flags.recursive,s=n.result.flags.verbose,i=n.result.positional;if(i.length===0)return{stdout:"",stderr:`mkdir: missing operand
@@ -159,47 +159,47 @@ Options:
159
159
  `,i+=`Access: (${f}/${p})
160
160
  `,i+=`Modify: ${u.mtime.toISOString()}
161
161
  `}}catch{o+=`stat: cannot stat '${l}': No such file or directory
162
- `,a=!0}}return{stdout:i,stderr:o,exitCode:a?1:0}}},O3={name:"stat",flags:[{flag:"-c",type:"value",valueHint:"format"},{flag:"-L",type:"boolean"}],needsArgs:!0}});var G,D,N,fn,ue,Te,ep,lr,Vi,el,ls,Bn,tl,nl,Ye,cs,je,rl,An,sl,qi,de,il,Zi,Qs,R3,P3,ol,al,F,ll,as,cl,ul,$e,_1,F1,L1,M1,U1,B1,W1,z1,H1,j1,G1,V1,q1,Z1,K1,Q1,X1,Y1,J1,Un,Xs,fl,pl,hl,dl,ml,cr,tp=k(()=>{G=class e{static FOLD_CASE=1;static LITERAL=2;static CLASS_NL=4;static DOT_NL=8;static ONE_LINE=16;static NON_GREEDY=32;static PERL_X=64;static UNICODE_GROUPS=128;static WAS_DOLLAR=256;static MATCH_NL=e.CLASS_NL|e.DOT_NL;static PERL=e.CLASS_NL|e.ONE_LINE|e.PERL_X|e.UNICODE_GROUPS;static POSIX=0;static UNANCHORED=0;static ANCHOR_START=1;static ANCHOR_BOTH=2},D=class{static CODES=new Map([["\x07",7],["\b",8],[" ",9],[`
163
- `,10],["\v",11],["\f",12],["\r",13],[" ",32],['"',34],["$",36],["&",38],["(",40],[")",41],["*",42],["+",43],["-",45],[".",46],["0",48],["1",49],["2",50],["3",51],["4",52],["5",53],["6",54],["7",55],["8",56],["9",57],[":",58],["<",60],[">",62],["?",63],["A",65],["B",66],["C",67],["F",70],["P",80],["Q",81],["U",85],["Z",90],["[",91],["\\",92],["]",93],["^",94],["_",95],["a",97],["b",98],["f",102],["i",105],["m",109],["n",110],["r",114],["s",115],["t",116],["v",118],["x",120],["z",122],["{",123],["|",124],["}",125]]);static toUpperCase(t){let n=String.fromCodePoint(t).toUpperCase();if(n.length>1)return t;let r=String.fromCodePoint(n.codePointAt(0)).toLowerCase();return r.length>1||r.codePointAt(0)!==t?t:n.codePointAt(0)}static toLowerCase(t){let n=String.fromCodePoint(t).toLowerCase();if(n.length>1)return t;let r=String.fromCodePoint(n.codePointAt(0)).toUpperCase();return r.length>1||r.codePointAt(0)!==t?t:n.codePointAt(0)}},N=class{SIZE=3;constructor(t){this.data=t}getLo(t){return this.data[t*this.SIZE]}getHi(t){return this.data[t*this.SIZE+1]}getStride(t){return this.data[t*this.SIZE+2]}get(t){let n=t*this.SIZE;return[this.data[n],this.data[n+1],this.data[n+2]]}get length(){return this.data.length/this.SIZE}},fn=class e{static CASE_ORBIT=new Map([[75,107],[107,8490],[8490,75],[83,115],[115,383],[383,83],[181,924],[924,956],[956,181],[197,229],[229,8491],[8491,197],[452,453],[453,454],[454,452],[455,456],[456,457],[457,455],[458,459],[459,460],[460,458],[497,498],[498,499],[499,497],[837,921],[921,953],[953,8126],[8126,837],[914,946],[946,976],[976,914],[917,949],[949,1013],[1013,917],[920,952],[952,977],[977,1012],[1012,920],[922,954],[954,1008],[1008,922],[928,960],[960,982],[982,928],[929,961],[961,1009],[1009,929],[931,962],[962,963],[963,931],[934,966],[966,981],[981,934],[937,969],[969,8486],[8486,937],[1042,1074],[1074,7296],[7296,1042],[1044,1076],[1076,7297],[7297,1044],[1054,1086],[1086,7298],[7298,1054],[1057,1089],[1089,7299],[7299,1057],[1058,1090],[1090,7300],[7300,7301],[7301,1058],[1066,1098],[1098,7302],[7302,1066],[1122,1123],[1123,7303],[7303,1122],[7304,42570],[42570,42571],[42571,7304],[7776,7777],[7777,7835],[7835,7776],[223,7838],[7838,223],[8064,8072],[8072,8064],[8065,8073],[8073,8065],[8066,8074],[8074,8066],[8067,8075],[8075,8067],[8068,8076],[8076,8068],[8069,8077],[8077,8069],[8070,8078],[8078,8070],[8071,8079],[8079,8071],[8080,8088],[8088,8080],[8081,8089],[8089,8081],[8082,8090],[8090,8082],[8083,8091],[8091,8083],[8084,8092],[8092,8084],[8085,8093],[8093,8085],[8086,8094],[8094,8086],[8087,8095],[8095,8087],[8096,8104],[8104,8096],[8097,8105],[8105,8097],[8098,8106],[8106,8098],[8099,8107],[8107,8099],[8100,8108],[8108,8100],[8101,8109],[8109,8101],[8102,8110],[8110,8102],[8103,8111],[8111,8103],[8115,8124],[8124,8115],[8131,8140],[8140,8131],[912,8147],[8147,912],[944,8163],[8163,944],[8179,8188],[8188,8179],[64261,64262],[64262,64261],[66560,66600],[66600,66560],[66561,66601],[66601,66561],[66562,66602],[66602,66562],[66563,66603],[66603,66563],[66564,66604],[66604,66564],[66565,66605],[66605,66565],[66566,66606],[66606,66566],[66567,66607],[66607,66567],[66568,66608],[66608,66568],[66569,66609],[66609,66569],[66570,66610],[66610,66570],[66571,66611],[66611,66571],[66572,66612],[66612,66572],[66573,66613],[66613,66573],[66574,66614],[66614,66574],[66575,66615],[66615,66575],[66576,66616],[66616,66576],[66577,66617],[66617,66577],[66578,66618],[66618,66578],[66579,66619],[66619,66579],[66580,66620],[66620,66580],[66581,66621],[66621,66581],[66582,66622],[66622,66582],[66583,66623],[66623,66583],[66584,66624],[66624,66584],[66585,66625],[66625,66585],[66586,66626],[66626,66586],[66587,66627],[66627,66587],[66588,66628],[66628,66588],[66589,66629],[66629,66589],[66590,66630],[66630,66590],[66591,66631],[66631,66591],[66592,66632],[66632,66592],[66593,66633],[66633,66593],[66594,66634],[66634,66594],[66595,66635],[66635,66595],[66596,66636],[66636,66596],[66597,66637],[66637,66597],[66598,66638],[66638,66598],[66599,66639],[66639,66599],[66736,66776],[66776,66736],[66737,66777],[66777,66737],[66738,66778],[66778,66738],[66739,66779],[66779,66739],[66740,66780],[66780,66740],[66741,66781],[66781,66741],[66742,66782],[66782,66742],[66743,66783],[66783,66743],[66744,66784],[66784,66744],[66745,66785],[66785,66745],[66746,66786],[66786,66746],[66747,66787],[66787,66747],[66748,66788],[66788,66748],[66749,66789],[66789,66749],[66750,66790],[66790,66750],[66751,66791],[66791,66751],[66752,66792],[66792,66752],[66753,66793],[66793,66753],[66754,66794],[66794,66754],[66755,66795],[66795,66755],[66756,66796],[66796,66756],[66757,66797],[66797,66757],[66758,66798],[66798,66758],[66759,66799],[66799,66759],[66760,66800],[66800,66760],[66761,66801],[66801,66761],[66762,66802],[66802,66762],[66763,66803],[66803,66763],[66764,66804],[66804,66764],[66765,66805],[66805,66765],[66766,66806],[66806,66766],[66767,66807],[66807,66767],[66768,66808],[66808,66768],[66769,66809],[66809,66769],[66770,66810],[66810,66770],[66771,66811],[66811,66771],[66928,66967],[66967,66928],[66929,66968],[66968,66929],[66930,66969],[66969,66930],[66931,66970],[66970,66931],[66932,66971],[66971,66932],[66933,66972],[66972,66933],[66934,66973],[66973,66934],[66935,66974],[66974,66935],[66936,66975],[66975,66936],[66937,66976],[66976,66937],[66938,66977],[66977,66938],[66940,66979],[66979,66940],[66941,66980],[66980,66941],[66942,66981],[66981,66942],[66943,66982],[66982,66943],[66944,66983],[66983,66944],[66945,66984],[66984,66945],[66946,66985],[66985,66946],[66947,66986],[66986,66947],[66948,66987],[66987,66948],[66949,66988],[66988,66949],[66950,66989],[66989,66950],[66951,66990],[66990,66951],[66952,66991],[66991,66952],[66953,66992],[66992,66953],[66954,66993],[66993,66954],[66956,66995],[66995,66956],[66957,66996],[66996,66957],[66958,66997],[66997,66958],[66959,66998],[66998,66959],[66960,66999],[66999,66960],[66961,67e3],[67e3,66961],[66962,67001],[67001,66962],[66964,67003],[67003,66964],[66965,67004],[67004,66965],[68736,68800],[68800,68736],[68737,68801],[68801,68737],[68738,68802],[68802,68738],[68739,68803],[68803,68739],[68740,68804],[68804,68740],[68741,68805],[68805,68741],[68742,68806],[68806,68742],[68743,68807],[68807,68743],[68744,68808],[68808,68744],[68745,68809],[68809,68745],[68746,68810],[68810,68746],[68747,68811],[68811,68747],[68748,68812],[68812,68748],[68749,68813],[68813,68749],[68750,68814],[68814,68750],[68751,68815],[68815,68751],[68752,68816],[68816,68752],[68753,68817],[68817,68753],[68754,68818],[68818,68754],[68755,68819],[68819,68755],[68756,68820],[68820,68756],[68757,68821],[68821,68757],[68758,68822],[68822,68758],[68759,68823],[68823,68759],[68760,68824],[68824,68760],[68761,68825],[68825,68761],[68762,68826],[68826,68762],[68763,68827],[68827,68763],[68764,68828],[68828,68764],[68765,68829],[68829,68765],[68766,68830],[68830,68766],[68767,68831],[68831,68767],[68768,68832],[68832,68768],[68769,68833],[68833,68769],[68770,68834],[68834,68770],[68771,68835],[68835,68771],[68772,68836],[68836,68772],[68773,68837],[68837,68773],[68774,68838],[68838,68774],[68775,68839],[68839,68775],[68776,68840],[68840,68776],[68777,68841],[68841,68777],[68778,68842],[68842,68778],[68779,68843],[68843,68779],[68780,68844],[68844,68780],[68781,68845],[68845,68781],[68782,68846],[68846,68782],[68783,68847],[68847,68783],[68784,68848],[68848,68784],[68785,68849],[68849,68785],[68786,68850],[68850,68786],[68944,68976],[68976,68944],[68945,68977],[68977,68945],[68946,68978],[68978,68946],[68947,68979],[68979,68947],[68948,68980],[68980,68948],[68949,68981],[68981,68949],[68950,68982],[68982,68950],[68951,68983],[68983,68951],[68952,68984],[68984,68952],[68953,68985],[68985,68953],[68954,68986],[68986,68954],[68955,68987],[68987,68955],[68956,68988],[68988,68956],[68957,68989],[68989,68957],[68958,68990],[68990,68958],[68959,68991],[68991,68959],[68960,68992],[68992,68960],[68961,68993],[68993,68961],[68962,68994],[68994,68962],[68963,68995],[68995,68963],[68964,68996],[68996,68964],[68965,68997],[68997,68965],[71840,71872],[71872,71840],[71841,71873],[71873,71841],[71842,71874],[71874,71842],[71843,71875],[71875,71843],[71844,71876],[71876,71844],[71845,71877],[71877,71845],[71846,71878],[71878,71846],[71847,71879],[71879,71847],[71848,71880],[71880,71848],[71849,71881],[71881,71849],[71850,71882],[71882,71850],[71851,71883],[71883,71851],[71852,71884],[71884,71852],[71853,71885],[71885,71853],[71854,71886],[71886,71854],[71855,71887],[71887,71855],[71856,71888],[71888,71856],[71857,71889],[71889,71857],[71858,71890],[71890,71858],[71859,71891],[71891,71859],[71860,71892],[71892,71860],[71861,71893],[71893,71861],[71862,71894],[71894,71862],[71863,71895],[71895,71863],[71864,71896],[71896,71864],[71865,71897],[71897,71865],[71866,71898],[71898,71866],[71867,71899],[71899,71867],[71868,71900],[71900,71868],[71869,71901],[71901,71869],[71870,71902],[71902,71870],[71871,71903],[71903,71871],[93760,93792],[93792,93760],[93761,93793],[93793,93761],[93762,93794],[93794,93762],[93763,93795],[93795,93763],[93764,93796],[93796,93764],[93765,93797],[93797,93765],[93766,93798],[93798,93766],[93767,93799],[93799,93767],[93768,93800],[93800,93768],[93769,93801],[93801,93769],[93770,93802],[93802,93770],[93771,93803],[93803,93771],[93772,93804],[93804,93772],[93773,93805],[93805,93773],[93774,93806],[93806,93774],[93775,93807],[93807,93775],[93776,93808],[93808,93776],[93777,93809],[93809,93777],[93778,93810],[93810,93778],[93779,93811],[93811,93779],[93780,93812],[93812,93780],[93781,93813],[93813,93781],[93782,93814],[93814,93782],[93783,93815],[93815,93783],[93784,93816],[93816,93784],[93785,93817],[93817,93785],[93786,93818],[93818,93786],[93787,93819],[93819,93787],[93788,93820],[93820,93788],[93789,93821],[93821,93789],[93790,93822],[93822,93790],[93791,93823],[93823,93791],[125184,125218],[125218,125184],[125185,125219],[125219,125185],[125186,125220],[125220,125186],[125187,125221],[125221,125187],[125188,125222],[125222,125188],[125189,125223],[125223,125189],[125190,125224],[125224,125190],[125191,125225],[125225,125191],[125192,125226],[125226,125192],[125193,125227],[125227,125193],[125194,125228],[125228,125194],[125195,125229],[125229,125195],[125196,125230],[125230,125196],[125197,125231],[125231,125197],[125198,125232],[125232,125198],[125199,125233],[125233,125199],[125200,125234],[125234,125200],[125201,125235],[125235,125201],[125202,125236],[125236,125202],[125203,125237],[125237,125203],[125204,125238],[125238,125204],[125205,125239],[125239,125205],[125206,125240],[125240,125206],[125207,125241],[125241,125207],[125208,125242],[125242,125208],[125209,125243],[125243,125209],[125210,125244],[125244,125210],[125211,125245],[125245,125211],[125212,125246],[125246,125212],[125213,125247],[125247,125213],[125214,125248],[125248,125214],[125215,125249],[125249,125215],[125216,125250],[125250,125216],[125217,125251],[125251,125217]]);static C=new N(new Uint32Array([0,31,1,127,159,1,173,888,715,889,896,7,897,899,1,907,909,2,930,1328,398,1367,1368,1,1419,1420,1,1424,1480,56,1481,1487,1,1515,1518,1,1525,1541,1,1564,1757,193,1806,1807,1,1867,1868,1,1970,1983,1,2043,2044,1,2094,2095,1,2111,2140,29,2141,2143,2,2155,2159,1,2191,2198,1,2274,2436,162,2445,2446,1,2449,2450,1,2473,2481,8,2483,2485,1,2490,2491,1,2501,2502,1,2505,2506,1,2511,2518,1,2520,2523,1,2526,2532,6,2533,2559,26,2560,2564,4,2571,2574,1,2577,2578,1,2601,2609,8,2612,2618,3,2619,2621,2,2627,2630,1,2633,2634,1,2638,2640,1,2642,2648,1,2653,2655,2,2656,2661,1,2679,2688,1,2692,2702,10,2706,2729,23,2737,2740,3,2746,2747,1,2758,2766,4,2767,2769,2,2770,2783,1,2788,2789,1,2802,2808,1,2816,2820,4,2829,2830,1,2833,2834,1,2857,2865,8,2868,2874,6,2875,2885,10,2886,2889,3,2890,2894,4,2895,2900,1,2904,2907,1,2910,2916,6,2917,2936,19,2937,2945,1,2948,2955,7,2956,2957,1,2961,2966,5,2967,2968,1,2971,2973,2,2976,2978,1,2981,2983,1,2987,2989,1,3002,3005,1,3011,3013,1,3017,3022,5,3023,3025,2,3026,3030,1,3032,3045,1,3067,3071,1,3085,3089,4,3113,3130,17,3131,3141,10,3145,3150,5,3151,3156,1,3159,3163,4,3164,3166,2,3167,3172,5,3173,3184,11,3185,3190,1,3213,3217,4,3241,3252,11,3258,3259,1,3269,3273,4,3278,3284,1,3287,3292,1,3295,3300,5,3301,3312,11,3316,3327,1,3341,3345,4,3397,3401,4,3408,3411,1,3428,3429,1,3456,3460,4,3479,3481,1,3506,3516,10,3518,3519,1,3527,3529,1,3531,3534,1,3541,3543,2,3552,3557,1,3568,3569,1,3573,3584,1,3643,3646,1,3676,3712,1,3715,3717,2,3723,3748,25,3750,3774,24,3775,3781,6,3783,3791,8,3802,3803,1,3808,3839,1,3912,3949,37,3950,3952,1,3992,4029,37,4045,4059,14,4060,4095,1,4294,4296,2,4297,4300,1,4302,4303,1,4681,4686,5,4687,4695,8,4697,4702,5,4703,4745,42,4750,4751,1,4785,4790,5,4791,4799,8,4801,4806,5,4807,4823,16,4881,4886,5,4887,4955,68,4956,4989,33,4990,4991,1,5018,5023,1,5110,5111,1,5118,5119,1,5789,5791,1,5881,5887,1,5910,5918,1,5943,5951,1,5972,5983,1,5997,6001,4,6004,6015,1,6110,6111,1,6122,6127,1,6138,6143,1,6158,6170,12,6171,6175,1,6265,6271,1,6315,6319,1,6390,6399,1,6431,6444,13,6445,6447,1,6460,6463,1,6465,6467,1,6510,6511,1,6517,6527,1,6572,6575,1,6602,6607,1,6619,6621,1,6684,6685,1,6751,6781,30,6782,6794,12,6795,6799,1,6810,6815,1,6830,6831,1,6863,6911,1,6989,7156,167,7157,7163,1,7224,7226,1,7242,7244,1,7307,7311,1,7355,7356,1,7368,7375,1,7419,7423,1,7958,7959,1,7966,7967,1,8006,8007,1,8014,8015,1,8024,8030,2,8062,8063,1,8117,8133,16,8148,8149,1,8156,8176,20,8177,8181,4,8191,8203,12,8204,8207,1,8234,8238,1,8288,8303,1,8306,8307,1,8335,8349,14,8350,8351,1,8385,8399,1,8433,8447,1,8588,8591,1,9258,9279,1,9291,9311,1,11124,11125,1,11158,11508,350,11509,11512,1,11558,11560,2,11561,11564,1,11566,11567,1,11624,11630,1,11633,11646,1,11671,11679,1,11687,11743,8,11870,11903,1,11930,12020,90,12021,12031,1,12246,12271,1,12352,12439,87,12440,12544,104,12545,12548,1,12592,12687,95,12774,12782,1,12831,42125,29294,42126,42127,1,42183,42191,1,42540,42559,1,42744,42751,1,42958,42959,1,42962,42964,2,42973,42993,1,43053,43055,1,43066,43071,1,43128,43135,1,43206,43213,1,43226,43231,1,43348,43358,1,43389,43391,1,43470,43482,12,43483,43485,1,43519,43575,56,43576,43583,1,43598,43599,1,43610,43611,1,43715,43738,1,43767,43776,1,43783,43784,1,43791,43792,1,43799,43807,1,43815,43823,8,43884,43887,1,44014,44015,1,44026,44031,1,55204,55215,1,55239,55242,1,55292,63743,1,64110,64111,1,64218,64255,1,64263,64274,1,64280,64284,1,64311,64317,6,64319,64325,3,64451,64466,1,64912,64913,1,64968,64974,1,64976,65007,1,65050,65055,1,65107,65127,20,65132,65135,1,65141,65277,136,65278,65280,1,65471,65473,1,65480,65481,1,65488,65489,1,65496,65497,1,65501,65503,1,65511,65519,8,65520,65531,1,65534,65535,1,65548,65575,27,65595,65598,3,65614,65615,1,65630,65663,1,65787,65791,1,65795,65798,1,65844,65846,1,65935,65949,14,65950,65951,1,65953,65999,1,66046,66175,1,66205,66207,1,66257,66271,1,66300,66303,1,66340,66348,1,66379,66383,1,66427,66431,1,66462,66500,38,66501,66503,1,66518,66559,1,66718,66719,1,66730,66735,1,66772,66775,1,66812,66815,1,66856,66863,1,66916,66926,1,66939,66955,16,66963,66966,3,66978,66994,16,67002,67005,3,67006,67007,1,67060,67071,1,67383,67391,1,67414,67423,1,67432,67455,1,67462,67505,43,67515,67583,1,67590,67591,1,67593,67638,45,67641,67643,1,67645,67646,1,67670,67743,73,67744,67750,1,67760,67807,1,67827,67830,3,67831,67834,1,67868,67870,1,67898,67902,1,67904,67967,1,68024,68027,1,68048,68049,1,68100,68103,3,68104,68107,1,68116,68120,4,68150,68151,1,68155,68158,1,68169,68175,1,68185,68191,1,68256,68287,1,68327,68330,1,68343,68351,1,68406,68408,1,68438,68439,1,68467,68471,1,68498,68504,1,68509,68520,1,68528,68607,1,68681,68735,1,68787,68799,1,68851,68857,1,68904,68911,1,68922,68927,1,68966,68968,1,68998,69005,1,69008,69215,1,69247,69290,43,69294,69295,1,69298,69313,1,69317,69371,1,69416,69423,1,69466,69487,1,69514,69551,1,69580,69599,1,69623,69631,1,69710,69713,1,69750,69758,1,69821,69827,6,69828,69839,1,69865,69871,1,69882,69887,1,69941,69960,19,69961,69967,1,70007,70015,1,70112,70133,21,70134,70143,1,70162,70210,48,70211,70271,1,70279,70281,2,70286,70302,16,70314,70319,1,70379,70383,1,70394,70399,1,70404,70413,9,70414,70417,3,70418,70441,23,70449,70452,3,70458,70469,11,70470,70473,3,70474,70478,4,70479,70481,2,70482,70486,1,70488,70492,1,70500,70501,1,70509,70511,1,70517,70527,1,70538,70540,2,70541,70543,2,70582,70593,11,70595,70596,1,70598,70603,5,70614,70617,3,70618,70624,1,70627,70655,1,70748,70754,6,70755,70783,1,70856,70863,1,70874,71039,1,71094,71095,1,71134,71167,1,71237,71247,1,71258,71263,1,71277,71295,1,71354,71359,1,71370,71375,1,71396,71423,1,71451,71452,1,71468,71471,1,71495,71679,1,71740,71839,1,71923,71934,1,71943,71944,1,71946,71947,1,71956,71959,3,71990,71993,3,71994,72007,13,72008,72015,1,72026,72095,1,72104,72105,1,72152,72153,1,72165,72191,1,72264,72271,1,72355,72367,1,72441,72447,1,72458,72639,1,72674,72687,1,72698,72703,1,72713,72759,46,72774,72783,1,72813,72815,1,72848,72849,1,72872,72887,15,72888,72959,1,72967,72970,3,73015,73017,1,73019,73022,3,73032,73039,1,73050,73055,1,73062,73065,3,73103,73106,3,73113,73119,1,73130,73439,1,73465,73471,1,73489,73531,42,73532,73533,1,73563,73647,1,73649,73663,1,73714,73726,1,74650,74751,1,74863,74869,6,74870,74879,1,75076,77711,1,77811,77823,1,78896,78911,1,78934,78943,1,82939,82943,1,83527,90367,1,90426,92159,1,92729,92735,1,92767,92778,11,92779,92781,1,92863,92874,11,92875,92879,1,92910,92911,1,92918,92927,1,92998,93007,1,93018,93026,8,93048,93052,1,93072,93503,1,93562,93759,1,93851,93951,1,94027,94030,1,94088,94094,1,94112,94175,1,94181,94191,1,94194,94207,1,100344,100351,1,101590,101630,1,101641,110575,1,110580,110588,8,110591,110883,292,110884,110897,1,110899,110927,1,110931,110932,1,110934,110947,1,110952,110959,1,111356,113663,1,113771,113775,1,113789,113791,1,113801,113807,1,113818,113819,1,113824,117759,1,118010,118015,1,118452,118527,1,118574,118575,1,118599,118607,1,118724,118783,1,119030,119039,1,119079,119080,1,119155,119162,1,119275,119295,1,119366,119487,1,119508,119519,1,119540,119551,1,119639,119647,1,119673,119807,1,119893,119965,72,119968,119969,1,119971,119972,1,119975,119976,1,119981,119994,13,119996,120004,8,120070,120075,5,120076,120085,9,120093,120122,29,120127,120133,6,120135,120137,1,120145,120486,341,120487,120780,293,120781,121484,703,121485,121498,1,121504,121520,16,121521,122623,1,122655,122660,1,122667,122879,1,122887,122905,18,122906,122914,8,122917,122923,6,122924,122927,1,122990,123022,1,123024,123135,1,123181,123183,1,123198,123199,1,123210,123213,1,123216,123535,1,123567,123583,1,123642,123646,1,123648,124111,1,124154,124367,1,124411,124414,1,124416,124895,1,124903,124908,5,124911,124927,16,125125,125126,1,125143,125183,1,125260,125263,1,125274,125277,1,125280,126064,1,126133,126208,1,126270,126463,1,126468,126496,28,126499,126501,2,126502,126504,2,126515,126520,5,126522,126524,2,126525,126529,1,126531,126534,1,126536,126540,2,126544,126547,3,126549,126550,1,126552,126560,2,126563,126565,2,126566,126571,5,126579,126589,5,126591,126602,11,126620,126624,1,126628,126634,6,126652,126703,1,126706,126975,1,127020,127023,1,127124,127135,1,127151,127152,1,127168,127184,16,127222,127231,1,127406,127461,1,127491,127503,1,127548,127551,1,127561,127567,1,127570,127583,1,127590,127743,1,128728,128731,1,128749,128751,1,128765,128767,1,128887,128890,1,128986,128991,1,129004,129007,1,129009,129023,1,129036,129039,1,129096,129103,1,129114,129119,1,129160,129167,1,129198,129199,1,129212,129215,1,129218,129279,1,129620,129631,1,129646,129647,1,129661,129663,1,129674,129678,1,129735,129741,1,129757,129758,1,129770,129775,1,129785,129791,1,129939,130042,103,130043,131071,1,173792,173823,1,177978,177983,1,178206,178207,1,183970,183983,1,191457,191471,1,192094,194559,1,195102,196607,1,201547,201551,1,205744,917759,1,918e3,1114111,1]));static Cc=new N(new Uint32Array([0,31,1,127,159,1]));static Cf=new N(new Uint32Array([173,1536,1363,1537,1541,1,1564,1757,193,1807,2192,385,2193,2274,81,6158,8203,2045,8204,8207,1,8234,8238,1,8288,8292,1,8294,8303,1,65279,65529,250,65530,65531,1,69821,69837,16,78896,78911,1,113824,113827,1,119155,119162,1,917505,917536,31,917537,917631,1]));static Co=new N(new Uint32Array([57344,63743,1,983040,1048573,1,1048576,1114109,1]));static Cs=new N(new Uint32Array([55296,57343,1]));static L=new N(new Uint32Array([65,90,1,97,122,1,170,181,11,186,192,6,193,214,1,216,246,1,248,705,1,710,721,1,736,740,1,748,750,2,880,884,1,886,887,1,890,893,1,895,902,7,904,906,1,908,910,2,911,929,1,931,1013,1,1015,1153,1,1162,1327,1,1329,1366,1,1369,1376,7,1377,1416,1,1488,1514,1,1519,1522,1,1568,1610,1,1646,1647,1,1649,1747,1,1749,1765,16,1766,1774,8,1775,1786,11,1787,1788,1,1791,1808,17,1810,1839,1,1869,1957,1,1969,1994,25,1995,2026,1,2036,2037,1,2042,2048,6,2049,2069,1,2074,2084,10,2088,2112,24,2113,2136,1,2144,2154,1,2160,2183,1,2185,2190,1,2208,2249,1,2308,2361,1,2365,2384,19,2392,2401,1,2417,2432,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2493,2510,17,2524,2525,1,2527,2529,1,2544,2545,1,2556,2565,9,2566,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2649,2652,1,2654,2674,20,2675,2676,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2749,2768,19,2784,2785,1,2809,2821,12,2822,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2877,2908,31,2909,2911,2,2912,2913,1,2929,2947,18,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3024,3077,53,3078,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3133,3160,27,3161,3162,1,3165,3168,3,3169,3200,31,3205,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3261,3293,32,3294,3296,2,3297,3313,16,3314,3332,18,3333,3340,1,3342,3344,1,3346,3386,1,3389,3406,17,3412,3414,1,3423,3425,1,3450,3455,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3585,3632,1,3634,3635,1,3648,3654,1,3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3760,1,3762,3763,1,3773,3776,3,3777,3780,1,3782,3804,22,3805,3807,1,3840,3904,64,3905,3911,1,3913,3948,1,3976,3980,1,4096,4138,1,4159,4176,17,4177,4181,1,4186,4189,1,4193,4197,4,4198,4206,8,4207,4208,1,4213,4225,1,4238,4256,18,4257,4293,1,4295,4301,6,4304,4346,1,4348,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4992,5007,1,5024,5109,1,5112,5117,1,5121,5740,1,5743,5759,1,5761,5786,1,5792,5866,1,5873,5880,1,5888,5905,1,5919,5937,1,5952,5969,1,5984,5996,1,5998,6e3,1,6016,6067,1,6103,6108,5,6176,6264,1,6272,6276,1,6279,6312,1,6314,6320,6,6321,6389,1,6400,6430,1,6480,6509,1,6512,6516,1,6528,6571,1,6576,6601,1,6656,6678,1,6688,6740,1,6823,6917,94,6918,6963,1,6981,6988,1,7043,7072,1,7086,7087,1,7098,7141,1,7168,7203,1,7245,7247,1,7258,7293,1,7296,7306,1,7312,7354,1,7357,7359,1,7401,7404,1,7406,7411,1,7413,7414,1,7418,7424,6,7425,7615,1,7680,7957,1,7960,7965,1,7968,8005,1,8008,8013,1,8016,8023,1,8025,8031,2,8032,8061,1,8064,8116,1,8118,8124,1,8126,8130,4,8131,8132,1,8134,8140,1,8144,8147,1,8150,8155,1,8160,8172,1,8178,8180,1,8182,8188,1,8305,8319,14,8336,8348,1,8450,8455,5,8458,8467,1,8469,8473,4,8474,8477,1,8484,8490,2,8491,8493,1,8495,8505,1,8508,8511,1,8517,8521,1,8526,8579,53,8580,11264,2684,11265,11492,1,11499,11502,1,11506,11507,1,11520,11557,1,11559,11565,6,11568,11623,1,11631,11648,17,11649,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,11823,12293,470,12294,12337,43,12338,12341,1,12347,12348,1,12353,12438,1,12445,12447,1,12449,12538,1,12540,12543,1,12549,12591,1,12593,12686,1,12704,12735,1,12784,12799,1,13312,19903,1,19968,42124,1,42192,42237,1,42240,42508,1,42512,42527,1,42538,42539,1,42560,42606,1,42623,42653,1,42656,42725,1,42775,42783,1,42786,42888,1,42891,42957,1,42960,42961,1,42963,42965,2,42966,42972,1,42994,43009,1,43011,43013,1,43015,43018,1,43020,43042,1,43072,43123,1,43138,43187,1,43250,43255,1,43259,43261,2,43262,43274,12,43275,43301,1,43312,43334,1,43360,43388,1,43396,43442,1,43471,43488,17,43489,43492,1,43494,43503,1,43514,43518,1,43520,43560,1,43584,43586,1,43588,43595,1,43616,43638,1,43642,43646,4,43647,43695,1,43697,43701,4,43702,43705,3,43706,43709,1,43712,43714,2,43739,43741,1,43744,43754,1,43762,43764,1,43777,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,43824,43866,1,43868,43881,1,43888,44002,1,44032,55203,1,55216,55238,1,55243,55291,1,63744,64109,1,64112,64217,1,64256,64262,1,64275,64279,1,64285,64287,2,64288,64296,1,64298,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64433,1,64467,64829,1,64848,64911,1,64914,64967,1,65008,65019,1,65136,65140,1,65142,65276,1,65313,65338,1,65345,65370,1,65382,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1,65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1,66176,66204,1,66208,66256,1,66304,66335,1,66349,66368,1,66370,66377,1,66384,66421,1,66432,66461,1,66464,66499,1,66504,66511,1,66560,66717,1,66736,66771,1,66776,66811,1,66816,66855,1,66864,66915,1,66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,67008,67059,1,67072,67382,1,67392,67413,1,67424,67431,1,67456,67461,1,67463,67504,1,67506,67514,1,67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3,67648,67669,1,67680,67702,1,67712,67742,1,67808,67826,1,67828,67829,1,67840,67861,1,67872,67897,1,67968,68023,1,68030,68031,1,68096,68112,16,68113,68115,1,68117,68119,1,68121,68149,1,68192,68220,1,68224,68252,1,68288,68295,1,68297,68324,1,68352,68405,1,68416,68437,1,68448,68466,1,68480,68497,1,68608,68680,1,68736,68786,1,68800,68850,1,68864,68899,1,68938,68965,1,68975,68997,1,69248,69289,1,69296,69297,1,69314,69316,1,69376,69404,1,69415,69424,9,69425,69445,1,69488,69505,1,69552,69572,1,69600,69622,1,69635,69687,1,69745,69746,1,69749,69763,14,69764,69807,1,69840,69864,1,69891,69926,1,69956,69959,3,69968,70002,1,70006,70019,13,70020,70066,1,70081,70084,1,70106,70108,2,70144,70161,1,70163,70187,1,70207,70208,1,70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70312,1,70320,70366,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70461,70480,19,70493,70497,1,70528,70537,1,70539,70542,3,70544,70581,1,70583,70609,26,70611,70656,45,70657,70708,1,70727,70730,1,70751,70753,1,70784,70831,1,70852,70853,1,70855,71040,185,71041,71086,1,71128,71131,1,71168,71215,1,71236,71296,60,71297,71338,1,71352,71424,72,71425,71450,1,71488,71494,1,71680,71723,1,71840,71903,1,71935,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71983,1,71999,72001,2,72096,72103,1,72106,72144,1,72161,72163,2,72192,72203,11,72204,72242,1,72250,72272,22,72284,72329,1,72349,72368,19,72369,72440,1,72640,72672,1,72704,72712,1,72714,72750,1,72768,72818,50,72819,72847,1,72960,72966,1,72968,72969,1,72971,73008,1,73030,73056,26,73057,73061,1,73063,73064,1,73066,73097,1,73112,73440,328,73441,73458,1,73474,73476,2,73477,73488,1,73490,73523,1,73648,73728,80,73729,74649,1,74880,75075,1,77712,77808,1,77824,78895,1,78913,78918,1,78944,82938,1,82944,83526,1,90368,90397,1,92160,92728,1,92736,92766,1,92784,92862,1,92880,92909,1,92928,92975,1,92992,92995,1,93027,93047,1,93053,93071,1,93504,93548,1,93760,93823,1,93952,94026,1,94032,94099,67,94100,94111,1,94176,94177,1,94179,94208,29,94209,100343,1,100352,101589,1,101631,101640,1,110576,110579,1,110581,110587,1,110589,110590,1,110592,110882,1,110898,110928,30,110929,110930,1,110933,110948,15,110949,110951,1,110960,111355,1,113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,119808,119892,1,119894,119964,1,119966,119967,1,119970,119973,3,119974,119977,3,119978,119980,1,119982,119993,1,119995,119997,2,119998,120003,1,120005,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120094,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120146,120485,1,120488,120512,1,120514,120538,1,120540,120570,1,120572,120596,1,120598,120628,1,120630,120654,1,120656,120686,1,120688,120712,1,120714,120744,1,120746,120770,1,120772,120779,1,122624,122654,1,122661,122666,1,122928,122989,1,123136,123180,1,123191,123197,1,123214,123536,322,123537,123565,1,123584,123627,1,124112,124139,1,124368,124397,1,124400,124896,496,124897,124902,1,124904,124907,1,124909,124910,1,124912,124926,1,124928,125124,1,125184,125251,1,125259,126464,1205,126465,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1]));static foldL=new N(new Uint32Array([837,837,1]));static Ll=new N(new Uint32Array([97,122,1,181,223,42,224,246,1,248,255,1,257,311,2,312,328,2,329,375,2,378,382,2,383,384,1,387,389,2,392,396,4,397,402,5,405,409,4,410,411,1,414,417,3,419,421,2,424,426,2,427,429,2,432,436,4,438,441,3,442,445,3,446,447,1,454,460,3,462,476,2,477,495,2,496,499,3,501,505,4,507,563,2,564,569,1,572,575,3,576,578,2,583,591,2,592,659,1,661,687,1,881,883,2,887,891,4,892,893,1,912,940,28,941,974,1,976,977,1,981,983,1,985,1007,2,1008,1011,1,1013,1019,3,1020,1072,52,1073,1119,1,1121,1153,2,1163,1215,2,1218,1230,2,1231,1327,2,1376,1416,1,4304,4346,1,4349,4351,1,5112,5117,1,7296,7304,1,7306,7424,118,7425,7467,1,7531,7543,1,7545,7578,1,7681,7829,2,7830,7837,1,7839,7935,2,7936,7943,1,7952,7957,1,7968,7975,1,7984,7991,1,8e3,8005,1,8016,8023,1,8032,8039,1,8048,8061,1,8064,8071,1,8080,8087,1,8096,8103,1,8112,8116,1,8118,8119,1,8126,8130,4,8131,8132,1,8134,8135,1,8144,8147,1,8150,8151,1,8160,8167,1,8178,8180,1,8182,8183,1,8458,8462,4,8463,8467,4,8495,8505,5,8508,8509,1,8518,8521,1,8526,8580,54,11312,11359,1,11361,11365,4,11366,11372,2,11377,11379,2,11380,11382,2,11383,11387,1,11393,11491,2,11492,11500,8,11502,11507,5,11520,11557,1,11559,11565,6,42561,42605,2,42625,42651,2,42787,42799,2,42800,42801,1,42803,42865,2,42866,42872,1,42874,42876,2,42879,42887,2,42892,42894,2,42897,42899,2,42900,42901,1,42903,42921,2,42927,42933,6,42935,42947,2,42952,42954,2,42957,42961,4,42963,42971,2,42998,43002,4,43824,43866,1,43872,43880,1,43888,43967,1,64256,64262,1,64275,64279,1,65345,65370,1,66600,66639,1,66776,66811,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,68800,68850,1,68976,68997,1,71872,71903,1,93792,93823,1,119834,119859,1,119886,119892,1,119894,119911,1,119938,119963,1,119990,119993,1,119995,119997,2,119998,120003,1,120005,120015,1,120042,120067,1,120094,120119,1,120146,120171,1,120198,120223,1,120250,120275,1,120302,120327,1,120354,120379,1,120406,120431,1,120458,120485,1,120514,120538,1,120540,120545,1,120572,120596,1,120598,120603,1,120630,120654,1,120656,120661,1,120688,120712,1,120714,120719,1,120746,120770,1,120772,120777,1,120779,122624,1845,122625,122633,1,122635,122654,1,122661,122666,1,125218,125251,1]));static foldLl=new N(new Uint32Array([65,90,1,192,214,1,216,222,1,256,302,2,306,310,2,313,327,2,330,376,2,377,381,2,385,386,1,388,390,2,391,393,2,394,395,1,398,401,1,403,404,1,406,408,1,412,413,1,415,416,1,418,422,2,423,425,2,428,430,2,431,433,2,434,435,1,437,439,2,440,444,4,452,453,1,455,456,1,458,459,1,461,475,2,478,494,2,497,498,1,500,502,2,503,504,1,506,562,2,570,571,1,573,574,1,577,579,2,580,582,1,584,590,2,837,880,43,882,886,4,895,902,7,904,906,1,908,910,2,911,913,2,914,929,1,931,939,1,975,984,9,986,1006,2,1012,1015,3,1017,1018,1,1021,1071,1,1120,1152,2,1162,1216,2,1217,1229,2,1232,1326,2,1329,1366,1,4256,4293,1,4295,4301,6,5024,5109,1,7305,7312,7,7313,7354,1,7357,7359,1,7680,7828,2,7838,7934,2,7944,7951,1,7960,7965,1,7976,7983,1,7992,7999,1,8008,8013,1,8025,8031,2,8040,8047,1,8072,8079,1,8088,8095,1,8104,8111,1,8120,8124,1,8136,8140,1,8152,8155,1,8168,8172,1,8184,8188,1,8486,8490,4,8491,8498,7,8579,11264,2685,11265,11311,1,11360,11362,2,11363,11364,1,11367,11373,2,11374,11376,1,11378,11381,3,11390,11392,1,11394,11490,2,11499,11501,2,11506,42560,31054,42562,42604,2,42624,42650,2,42786,42798,2,42802,42862,2,42873,42877,2,42878,42886,2,42891,42893,2,42896,42898,2,42902,42922,2,42923,42926,1,42928,42932,1,42934,42948,2,42949,42951,1,42953,42955,2,42956,42960,4,42966,42972,2,42997,65313,22316,65314,65338,1,66560,66599,1,66736,66771,1,66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,68736,68786,1,68944,68965,1,71840,71871,1,93760,93791,1,125184,125217,1]));static Lm=new N(new Uint32Array([688,705,1,710,721,1,736,740,1,748,750,2,884,890,6,1369,1600,231,1765,1766,1,2036,2037,1,2042,2074,32,2084,2088,4,2249,2417,168,3654,3782,128,4348,6103,1755,6211,6823,612,7288,7293,1,7468,7530,1,7544,7579,35,7580,7615,1,8305,8319,14,8336,8348,1,11388,11389,1,11631,11823,192,12293,12337,44,12338,12341,1,12347,12445,98,12446,12540,94,12541,12542,1,40981,42232,1251,42233,42237,1,42508,42623,115,42652,42653,1,42775,42783,1,42864,42888,24,42994,42996,1,43e3,43001,1,43471,43494,23,43632,43741,109,43763,43764,1,43868,43871,1,43881,65392,21511,65438,65439,1,67456,67461,1,67463,67504,1,67506,67514,1,68942,68975,33,92992,92995,1,93504,93506,1,93547,93548,1,94099,94111,1,94176,94177,1,94179,110576,16397,110577,110579,1,110581,110587,1,110589,110590,1,122928,122989,1,123191,123197,1,124139,125259,1120]));static Lo=new N(new Uint32Array([170,186,16,443,448,5,449,451,1,660,1488,828,1489,1514,1,1519,1522,1,1568,1599,1,1601,1610,1,1646,1647,1,1649,1747,1,1749,1774,25,1775,1786,11,1787,1788,1,1791,1808,17,1810,1839,1,1869,1957,1,1969,1994,25,1995,2026,1,2048,2069,1,2112,2136,1,2144,2154,1,2160,2183,1,2185,2190,1,2208,2248,1,2308,2361,1,2365,2384,19,2392,2401,1,2418,2432,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2493,2510,17,2524,2525,1,2527,2529,1,2544,2545,1,2556,2565,9,2566,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2649,2652,1,2654,2674,20,2675,2676,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2749,2768,19,2784,2785,1,2809,2821,12,2822,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2877,2908,31,2909,2911,2,2912,2913,1,2929,2947,18,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3024,3077,53,3078,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3133,3160,27,3161,3162,1,3165,3168,3,3169,3200,31,3205,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3261,3293,32,3294,3296,2,3297,3313,16,3314,3332,18,3333,3340,1,3342,3344,1,3346,3386,1,3389,3406,17,3412,3414,1,3423,3425,1,3450,3455,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3585,3632,1,3634,3635,1,3648,3653,1,3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3760,1,3762,3763,1,3773,3776,3,3777,3780,1,3804,3807,1,3840,3904,64,3905,3911,1,3913,3948,1,3976,3980,1,4096,4138,1,4159,4176,17,4177,4181,1,4186,4189,1,4193,4197,4,4198,4206,8,4207,4208,1,4213,4225,1,4238,4352,114,4353,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4992,5007,1,5121,5740,1,5743,5759,1,5761,5786,1,5792,5866,1,5873,5880,1,5888,5905,1,5919,5937,1,5952,5969,1,5984,5996,1,5998,6e3,1,6016,6067,1,6108,6176,68,6177,6210,1,6212,6264,1,6272,6276,1,6279,6312,1,6314,6320,6,6321,6389,1,6400,6430,1,6480,6509,1,6512,6516,1,6528,6571,1,6576,6601,1,6656,6678,1,6688,6740,1,6917,6963,1,6981,6988,1,7043,7072,1,7086,7087,1,7098,7141,1,7168,7203,1,7245,7247,1,7258,7287,1,7401,7404,1,7406,7411,1,7413,7414,1,7418,8501,1083,8502,8504,1,11568,11623,1,11648,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,12294,12348,54,12353,12438,1,12447,12449,2,12450,12538,1,12543,12549,6,12550,12591,1,12593,12686,1,12704,12735,1,12784,12799,1,13312,19903,1,19968,40980,1,40982,42124,1,42192,42231,1,42240,42507,1,42512,42527,1,42538,42539,1,42606,42656,50,42657,42725,1,42895,42999,104,43003,43009,1,43011,43013,1,43015,43018,1,43020,43042,1,43072,43123,1,43138,43187,1,43250,43255,1,43259,43261,2,43262,43274,12,43275,43301,1,43312,43334,1,43360,43388,1,43396,43442,1,43488,43492,1,43495,43503,1,43514,43518,1,43520,43560,1,43584,43586,1,43588,43595,1,43616,43631,1,43633,43638,1,43642,43646,4,43647,43695,1,43697,43701,4,43702,43705,3,43706,43709,1,43712,43714,2,43739,43740,1,43744,43754,1,43762,43777,15,43778,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,43968,44002,1,44032,55203,1,55216,55238,1,55243,55291,1,63744,64109,1,64112,64217,1,64285,64287,2,64288,64296,1,64298,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64433,1,64467,64829,1,64848,64911,1,64914,64967,1,65008,65019,1,65136,65140,1,65142,65276,1,65382,65391,1,65393,65437,1,65440,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1,65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1,66176,66204,1,66208,66256,1,66304,66335,1,66349,66368,1,66370,66377,1,66384,66421,1,66432,66461,1,66464,66499,1,66504,66511,1,66640,66717,1,66816,66855,1,66864,66915,1,67008,67059,1,67072,67382,1,67392,67413,1,67424,67431,1,67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3,67648,67669,1,67680,67702,1,67712,67742,1,67808,67826,1,67828,67829,1,67840,67861,1,67872,67897,1,67968,68023,1,68030,68031,1,68096,68112,16,68113,68115,1,68117,68119,1,68121,68149,1,68192,68220,1,68224,68252,1,68288,68295,1,68297,68324,1,68352,68405,1,68416,68437,1,68448,68466,1,68480,68497,1,68608,68680,1,68864,68899,1,68938,68941,1,68943,69248,305,69249,69289,1,69296,69297,1,69314,69316,1,69376,69404,1,69415,69424,9,69425,69445,1,69488,69505,1,69552,69572,1,69600,69622,1,69635,69687,1,69745,69746,1,69749,69763,14,69764,69807,1,69840,69864,1,69891,69926,1,69956,69959,3,69968,70002,1,70006,70019,13,70020,70066,1,70081,70084,1,70106,70108,2,70144,70161,1,70163,70187,1,70207,70208,1,70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70312,1,70320,70366,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70461,70480,19,70493,70497,1,70528,70537,1,70539,70542,3,70544,70581,1,70583,70609,26,70611,70656,45,70657,70708,1,70727,70730,1,70751,70753,1,70784,70831,1,70852,70853,1,70855,71040,185,71041,71086,1,71128,71131,1,71168,71215,1,71236,71296,60,71297,71338,1,71352,71424,72,71425,71450,1,71488,71494,1,71680,71723,1,71935,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71983,1,71999,72001,2,72096,72103,1,72106,72144,1,72161,72163,2,72192,72203,11,72204,72242,1,72250,72272,22,72284,72329,1,72349,72368,19,72369,72440,1,72640,72672,1,72704,72712,1,72714,72750,1,72768,72818,50,72819,72847,1,72960,72966,1,72968,72969,1,72971,73008,1,73030,73056,26,73057,73061,1,73063,73064,1,73066,73097,1,73112,73440,328,73441,73458,1,73474,73476,2,73477,73488,1,73490,73523,1,73648,73728,80,73729,74649,1,74880,75075,1,77712,77808,1,77824,78895,1,78913,78918,1,78944,82938,1,82944,83526,1,90368,90397,1,92160,92728,1,92736,92766,1,92784,92862,1,92880,92909,1,92928,92975,1,93027,93047,1,93053,93071,1,93507,93546,1,93952,94026,1,94032,94208,176,94209,100343,1,100352,101589,1,101631,101640,1,110592,110882,1,110898,110928,30,110929,110930,1,110933,110948,15,110949,110951,1,110960,111355,1,113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,122634,123136,502,123137,123180,1,123214,123536,322,123537,123565,1,123584,123627,1,124112,124138,1,124368,124397,1,124400,124896,496,124897,124902,1,124904,124907,1,124909,124910,1,124912,124926,1,124928,125124,1,126464,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1]));static Lt=new N(new Uint32Array([453,459,3,498,8072,7574,8073,8079,1,8088,8095,1,8104,8111,1,8124,8140,16,8188,8188,1]));static foldLt=new N(new Uint32Array([452,454,2,455,457,2,458,460,2,497,499,2,8064,8071,1,8080,8087,1,8096,8103,1,8115,8131,16,8179,8179,1]));static Lu=new N(new Uint32Array([65,90,1,192,214,1,216,222,1,256,310,2,313,327,2,330,376,2,377,381,2,385,386,1,388,390,2,391,393,2,394,395,1,398,401,1,403,404,1,406,408,1,412,413,1,415,416,1,418,422,2,423,425,2,428,430,2,431,433,2,434,435,1,437,439,2,440,444,4,452,461,3,463,475,2,478,494,2,497,500,3,502,504,1,506,562,2,570,571,1,573,574,1,577,579,2,580,582,1,584,590,2,880,882,2,886,895,9,902,904,2,905,906,1,908,910,2,911,913,2,914,929,1,931,939,1,975,978,3,979,980,1,984,1006,2,1012,1015,3,1017,1018,1,1021,1071,1,1120,1152,2,1162,1216,2,1217,1229,2,1232,1326,2,1329,1366,1,4256,4293,1,4295,4301,6,5024,5109,1,7305,7312,7,7313,7354,1,7357,7359,1,7680,7828,2,7838,7934,2,7944,7951,1,7960,7965,1,7976,7983,1,7992,7999,1,8008,8013,1,8025,8031,2,8040,8047,1,8120,8123,1,8136,8139,1,8152,8155,1,8168,8172,1,8184,8187,1,8450,8455,5,8459,8461,1,8464,8466,1,8469,8473,4,8474,8477,1,8484,8490,2,8491,8493,1,8496,8499,1,8510,8511,1,8517,8579,62,11264,11311,1,11360,11362,2,11363,11364,1,11367,11373,2,11374,11376,1,11378,11381,3,11390,11392,1,11394,11490,2,11499,11501,2,11506,42560,31054,42562,42604,2,42624,42650,2,42786,42798,2,42802,42862,2,42873,42877,2,42878,42886,2,42891,42893,2,42896,42898,2,42902,42922,2,42923,42926,1,42928,42932,1,42934,42948,2,42949,42951,1,42953,42955,2,42956,42960,4,42966,42972,2,42997,65313,22316,65314,65338,1,66560,66599,1,66736,66771,1,66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,68736,68786,1,68944,68965,1,71840,71871,1,93760,93791,1,119808,119833,1,119860,119885,1,119912,119937,1,119964,119966,2,119967,119973,3,119974,119977,3,119978,119980,1,119982,119989,1,120016,120041,1,120068,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120120,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120172,120197,1,120224,120249,1,120276,120301,1,120328,120353,1,120380,120405,1,120432,120457,1,120488,120512,1,120546,120570,1,120604,120628,1,120662,120686,1,120720,120744,1,120778,125184,4406,125185,125217,1]));static Upper=this.Lu;static foldLu=new N(new Uint32Array([97,122,1,181,223,42,224,246,1,248,255,1,257,303,2,307,311,2,314,328,2,331,375,2,378,382,2,383,384,1,387,389,2,392,396,4,402,405,3,409,411,1,414,417,3,419,421,2,424,429,5,432,436,4,438,441,3,445,447,2,453,454,1,456,457,1,459,460,1,462,476,2,477,495,2,498,499,1,501,505,4,507,543,2,547,563,2,572,575,3,576,578,2,583,591,2,592,596,1,598,599,1,601,603,2,604,608,4,609,611,2,612,614,1,616,620,1,623,625,2,626,629,3,637,640,3,642,643,1,647,652,1,658,669,11,670,837,167,881,883,2,887,891,4,892,893,1,940,943,1,945,974,1,976,977,1,981,983,1,985,1007,2,1008,1011,1,1013,1019,3,1072,1119,1,1121,1153,2,1163,1215,2,1218,1230,2,1231,1327,2,1377,1414,1,4304,4346,1,4349,4351,1,5112,5117,1,7296,7304,1,7306,7545,239,7549,7566,17,7681,7829,2,7835,7841,6,7843,7935,2,7936,7943,1,7952,7957,1,7968,7975,1,7984,7991,1,8e3,8005,1,8017,8023,2,8032,8039,1,8048,8061,1,8112,8113,1,8126,8144,18,8145,8160,15,8161,8165,4,8526,8580,54,11312,11359,1,11361,11365,4,11366,11372,2,11379,11382,3,11393,11491,2,11500,11502,2,11507,11520,13,11521,11557,1,11559,11565,6,42561,42605,2,42625,42651,2,42787,42799,2,42803,42863,2,42874,42876,2,42879,42887,2,42892,42897,5,42899,42900,1,42903,42921,2,42933,42947,2,42952,42954,2,42957,42961,4,42967,42971,2,42998,43859,861,43888,43967,1,65345,65370,1,66600,66639,1,66776,66811,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,68800,68850,1,68976,68997,1,71872,71903,1,93792,93823,1,125218,125251,1]));static M=new N(new Uint32Array([768,879,1,1155,1161,1,1425,1469,1,1471,1473,2,1474,1476,2,1477,1479,2,1552,1562,1,1611,1631,1,1648,1750,102,1751,1756,1,1759,1764,1,1767,1768,1,1770,1773,1,1809,1840,31,1841,1866,1,1958,1968,1,2027,2035,1,2045,2070,25,2071,2073,1,2075,2083,1,2085,2087,1,2089,2093,1,2137,2139,1,2199,2207,1,2250,2273,1,2275,2307,1,2362,2364,1,2366,2383,1,2385,2391,1,2402,2403,1,2433,2435,1,2492,2494,2,2495,2500,1,2503,2504,1,2507,2509,1,2519,2530,11,2531,2558,27,2561,2563,1,2620,2622,2,2623,2626,1,2631,2632,1,2635,2637,1,2641,2672,31,2673,2677,4,2689,2691,1,2748,2750,2,2751,2757,1,2759,2761,1,2763,2765,1,2786,2787,1,2810,2815,1,2817,2819,1,2876,2878,2,2879,2884,1,2887,2888,1,2891,2893,1,2901,2903,1,2914,2915,1,2946,3006,60,3007,3010,1,3014,3016,1,3018,3021,1,3031,3072,41,3073,3076,1,3132,3134,2,3135,3140,1,3142,3144,1,3146,3149,1,3157,3158,1,3170,3171,1,3201,3203,1,3260,3262,2,3263,3268,1,3270,3272,1,3274,3277,1,3285,3286,1,3298,3299,1,3315,3328,13,3329,3331,1,3387,3388,1,3390,3396,1,3398,3400,1,3402,3405,1,3415,3426,11,3427,3457,30,3458,3459,1,3530,3535,5,3536,3540,1,3542,3544,2,3545,3551,1,3570,3571,1,3633,3636,3,3637,3642,1,3655,3662,1,3761,3764,3,3765,3772,1,3784,3790,1,3864,3865,1,3893,3897,2,3902,3903,1,3953,3972,1,3974,3975,1,3981,3991,1,3993,4028,1,4038,4139,101,4140,4158,1,4182,4185,1,4190,4192,1,4194,4196,1,4199,4205,1,4209,4212,1,4226,4237,1,4239,4250,11,4251,4253,1,4957,4959,1,5906,5909,1,5938,5940,1,5970,5971,1,6002,6003,1,6068,6099,1,6109,6155,46,6156,6157,1,6159,6277,118,6278,6313,35,6432,6443,1,6448,6459,1,6679,6683,1,6741,6750,1,6752,6780,1,6783,6832,49,6833,6862,1,6912,6916,1,6964,6980,1,7019,7027,1,7040,7042,1,7073,7085,1,7142,7155,1,7204,7223,1,7376,7378,1,7380,7400,1,7405,7412,7,7415,7417,1,7616,7679,1,8400,8432,1,11503,11505,1,11647,11744,97,11745,11775,1,12330,12335,1,12441,12442,1,42607,42610,1,42612,42621,1,42654,42655,1,42736,42737,1,43010,43014,4,43019,43043,24,43044,43047,1,43052,43136,84,43137,43188,51,43189,43205,1,43232,43249,1,43263,43302,39,43303,43309,1,43335,43347,1,43392,43395,1,43443,43456,1,43493,43561,68,43562,43574,1,43587,43596,9,43597,43643,46,43644,43645,1,43696,43698,2,43699,43700,1,43703,43704,1,43710,43711,1,43713,43755,42,43756,43759,1,43765,43766,1,44003,44010,1,44012,44013,1,64286,65024,738,65025,65039,1,65056,65071,1,66045,66272,227,66422,66426,1,68097,68099,1,68101,68102,1,68108,68111,1,68152,68154,1,68159,68325,166,68326,68900,574,68901,68903,1,68969,68973,1,69291,69292,1,69372,69375,1,69446,69456,1,69506,69509,1,69632,69634,1,69688,69702,1,69744,69747,3,69748,69759,11,69760,69762,1,69808,69818,1,69826,69888,62,69889,69890,1,69927,69940,1,69957,69958,1,70003,70016,13,70017,70018,1,70067,70080,1,70089,70092,1,70094,70095,1,70188,70199,1,70206,70209,3,70367,70378,1,70400,70403,1,70459,70460,1,70462,70468,1,70471,70472,1,70475,70477,1,70487,70498,11,70499,70502,3,70503,70508,1,70512,70516,1,70584,70592,1,70594,70597,3,70599,70602,1,70604,70608,1,70610,70625,15,70626,70709,83,70710,70726,1,70750,70832,82,70833,70851,1,71087,71093,1,71096,71104,1,71132,71133,1,71216,71232,1,71339,71351,1,71453,71467,1,71724,71738,1,71984,71989,1,71991,71992,1,71995,71998,1,72e3,72002,2,72003,72145,142,72146,72151,1,72154,72160,1,72164,72193,29,72194,72202,1,72243,72249,1,72251,72254,1,72263,72273,10,72274,72283,1,72330,72345,1,72751,72758,1,72760,72767,1,72850,72871,1,72873,72886,1,73009,73014,1,73018,73020,2,73021,73023,2,73024,73029,1,73031,73098,67,73099,73102,1,73104,73105,1,73107,73111,1,73459,73462,1,73472,73473,1,73475,73524,49,73525,73530,1,73534,73538,1,73562,78912,5350,78919,78933,1,90398,90415,1,92912,92916,1,92976,92982,1,94031,94033,2,94034,94087,1,94095,94098,1,94180,94192,12,94193,113821,19628,113822,118528,4706,118529,118573,1,118576,118598,1,119141,119145,1,119149,119154,1,119163,119170,1,119173,119179,1,119210,119213,1,119362,119364,1,121344,121398,1,121403,121452,1,121461,121476,15,121499,121503,1,121505,121519,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1,123023,123184,161,123185,123190,1,123566,123628,62,123629,123631,1,124140,124143,1,124398,124399,1,125136,125142,1,125252,125258,1,917760,917999,1]));static foldM=new N(new Uint32Array([921,953,32,8126,8126,1]));static Mc=new N(new Uint32Array([2307,2363,56,2366,2368,1,2377,2380,1,2382,2383,1,2434,2435,1,2494,2496,1,2503,2504,1,2507,2508,1,2519,2563,44,2622,2624,1,2691,2750,59,2751,2752,1,2761,2763,2,2764,2818,54,2819,2878,59,2880,2887,7,2888,2891,3,2892,2903,11,3006,3007,1,3009,3010,1,3014,3016,1,3018,3020,1,3031,3073,42,3074,3075,1,3137,3140,1,3202,3203,1,3262,3264,2,3265,3268,1,3271,3272,1,3274,3275,1,3285,3286,1,3315,3330,15,3331,3390,59,3391,3392,1,3398,3400,1,3402,3404,1,3415,3458,43,3459,3535,76,3536,3537,1,3544,3551,1,3570,3571,1,3902,3903,1,3967,4139,172,4140,4145,5,4152,4155,3,4156,4182,26,4183,4194,11,4195,4196,1,4199,4205,1,4227,4228,1,4231,4236,1,4239,4250,11,4251,4252,1,5909,5940,31,6070,6078,8,6079,6085,1,6087,6088,1,6435,6438,1,6441,6443,1,6448,6449,1,6451,6456,1,6681,6682,1,6741,6743,2,6753,6755,2,6756,6765,9,6766,6770,1,6916,6965,49,6971,6973,2,6974,6977,1,6979,6980,1,7042,7073,31,7078,7079,1,7082,7143,61,7146,7148,1,7150,7154,4,7155,7204,49,7205,7211,1,7220,7221,1,7393,7415,22,12334,12335,1,43043,43044,1,43047,43136,89,43137,43188,51,43189,43203,1,43346,43347,1,43395,43444,49,43445,43450,5,43451,43454,3,43455,43456,1,43567,43568,1,43571,43572,1,43597,43643,46,43645,43755,110,43758,43759,1,43765,44003,238,44004,44006,2,44007,44009,2,44010,44012,2,69632,69634,2,69762,69808,46,69809,69810,1,69815,69816,1,69932,69957,25,69958,70018,60,70067,70069,1,70079,70080,1,70094,70188,94,70189,70190,1,70194,70195,1,70197,70368,171,70369,70370,1,70402,70403,1,70462,70463,1,70465,70468,1,70471,70472,1,70475,70477,1,70487,70498,11,70499,70584,85,70585,70586,1,70594,70597,3,70599,70602,1,70604,70605,1,70607,70709,102,70710,70711,1,70720,70721,1,70725,70832,107,70833,70834,1,70841,70843,2,70844,70846,1,70849,71087,238,71088,71089,1,71096,71099,1,71102,71216,114,71217,71218,1,71227,71228,1,71230,71340,110,71342,71343,1,71350,71454,104,71456,71457,1,71462,71724,262,71725,71726,1,71736,71984,248,71985,71989,1,71991,71992,1,71997,72e3,3,72002,72145,143,72146,72147,1,72156,72159,1,72164,72249,85,72279,72280,1,72343,72751,408,72766,72873,107,72881,72884,3,73098,73102,1,73107,73108,1,73110,73461,351,73462,73475,13,73524,73525,1,73534,73535,1,73537,90410,16873,90411,90412,1,94033,94087,1,94192,94193,1,119141,119142,1,119149,119154,1]));static Me=new N(new Uint32Array([1160,1161,1,6846,8413,1567,8414,8416,1,8418,8420,1,42608,42610,1]));static Mn=new N(new Uint32Array([768,879,1,1155,1159,1,1425,1469,1,1471,1473,2,1474,1476,2,1477,1479,2,1552,1562,1,1611,1631,1,1648,1750,102,1751,1756,1,1759,1764,1,1767,1768,1,1770,1773,1,1809,1840,31,1841,1866,1,1958,1968,1,2027,2035,1,2045,2070,25,2071,2073,1,2075,2083,1,2085,2087,1,2089,2093,1,2137,2139,1,2199,2207,1,2250,2273,1,2275,2306,1,2362,2364,2,2369,2376,1,2381,2385,4,2386,2391,1,2402,2403,1,2433,2492,59,2497,2500,1,2509,2530,21,2531,2558,27,2561,2562,1,2620,2625,5,2626,2631,5,2632,2635,3,2636,2637,1,2641,2672,31,2673,2677,4,2689,2690,1,2748,2753,5,2754,2757,1,2759,2760,1,2765,2786,21,2787,2810,23,2811,2815,1,2817,2876,59,2879,2881,2,2882,2884,1,2893,2901,8,2902,2914,12,2915,2946,31,3008,3021,13,3072,3076,4,3132,3134,2,3135,3136,1,3142,3144,1,3146,3149,1,3157,3158,1,3170,3171,1,3201,3260,59,3263,3270,7,3276,3277,1,3298,3299,1,3328,3329,1,3387,3388,1,3393,3396,1,3405,3426,21,3427,3457,30,3530,3538,8,3539,3540,1,3542,3633,91,3636,3642,1,3655,3662,1,3761,3764,3,3765,3772,1,3784,3790,1,3864,3865,1,3893,3897,2,3953,3966,1,3968,3972,1,3974,3975,1,3981,3991,1,3993,4028,1,4038,4141,103,4142,4144,1,4146,4151,1,4153,4154,1,4157,4158,1,4184,4185,1,4190,4192,1,4209,4212,1,4226,4229,3,4230,4237,7,4253,4957,704,4958,4959,1,5906,5908,1,5938,5939,1,5970,5971,1,6002,6003,1,6068,6069,1,6071,6077,1,6086,6089,3,6090,6099,1,6109,6155,46,6156,6157,1,6159,6277,118,6278,6313,35,6432,6434,1,6439,6440,1,6450,6457,7,6458,6459,1,6679,6680,1,6683,6742,59,6744,6750,1,6752,6754,2,6757,6764,1,6771,6780,1,6783,6832,49,6833,6845,1,6847,6862,1,6912,6915,1,6964,6966,2,6967,6970,1,6972,6978,6,7019,7027,1,7040,7041,1,7074,7077,1,7080,7081,1,7083,7085,1,7142,7144,2,7145,7149,4,7151,7153,1,7212,7219,1,7222,7223,1,7376,7378,1,7380,7392,1,7394,7400,1,7405,7412,7,7416,7417,1,7616,7679,1,8400,8412,1,8417,8421,4,8422,8432,1,11503,11505,1,11647,11744,97,11745,11775,1,12330,12333,1,12441,12442,1,42607,42612,5,42613,42621,1,42654,42655,1,42736,42737,1,43010,43014,4,43019,43045,26,43046,43052,6,43204,43205,1,43232,43249,1,43263,43302,39,43303,43309,1,43335,43345,1,43392,43394,1,43443,43446,3,43447,43449,1,43452,43453,1,43493,43561,68,43562,43566,1,43569,43570,1,43573,43574,1,43587,43596,9,43644,43696,52,43698,43700,1,43703,43704,1,43710,43711,1,43713,43756,43,43757,43766,9,44005,44008,3,44013,64286,20273,65024,65039,1,65056,65071,1,66045,66272,227,66422,66426,1,68097,68099,1,68101,68102,1,68108,68111,1,68152,68154,1,68159,68325,166,68326,68900,574,68901,68903,1,68969,68973,1,69291,69292,1,69372,69375,1,69446,69456,1,69506,69509,1,69633,69688,55,69689,69702,1,69744,69747,3,69748,69759,11,69760,69761,1,69811,69814,1,69817,69818,1,69826,69888,62,69889,69890,1,69927,69931,1,69933,69940,1,70003,70016,13,70017,70070,53,70071,70078,1,70089,70092,1,70095,70191,96,70192,70193,1,70196,70198,2,70199,70206,7,70209,70367,158,70371,70378,1,70400,70401,1,70459,70460,1,70464,70502,38,70503,70508,1,70512,70516,1,70587,70592,1,70606,70610,2,70625,70626,1,70712,70719,1,70722,70724,1,70726,70750,24,70835,70840,1,70842,70847,5,70848,70850,2,70851,71090,239,71091,71093,1,71100,71101,1,71103,71104,1,71132,71133,1,71219,71226,1,71229,71231,2,71232,71339,107,71341,71344,3,71345,71349,1,71351,71453,102,71455,71458,3,71459,71461,1,71463,71467,1,71727,71735,1,71737,71738,1,71995,71996,1,71998,72003,5,72148,72151,1,72154,72155,1,72160,72193,33,72194,72202,1,72243,72248,1,72251,72254,1,72263,72273,10,72274,72278,1,72281,72283,1,72330,72342,1,72344,72345,1,72752,72758,1,72760,72765,1,72767,72850,83,72851,72871,1,72874,72880,1,72882,72883,1,72885,72886,1,73009,73014,1,73018,73020,2,73021,73023,2,73024,73029,1,73031,73104,73,73105,73109,4,73111,73459,348,73460,73472,12,73473,73526,53,73527,73530,1,73536,73538,2,73562,78912,5350,78919,78933,1,90398,90409,1,90413,90415,1,92912,92916,1,92976,92982,1,94031,94095,64,94096,94098,1,94180,113821,19641,113822,118528,4706,118529,118573,1,118576,118598,1,119143,119145,1,119163,119170,1,119173,119179,1,119210,119213,1,119362,119364,1,121344,121398,1,121403,121452,1,121461,121476,15,121499,121503,1,121505,121519,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1,123023,123184,161,123185,123190,1,123566,123628,62,123629,123631,1,124140,124143,1,124398,124399,1,125136,125142,1,125252,125258,1,917760,917999,1]));static foldMn=new N(new Uint32Array([921,953,32,8126,8126,1]));static N=new N(new Uint32Array([48,57,1,178,179,1,185,188,3,189,190,1,1632,1641,1,1776,1785,1,1984,1993,1,2406,2415,1,2534,2543,1,2548,2553,1,2662,2671,1,2790,2799,1,2918,2927,1,2930,2935,1,3046,3058,1,3174,3183,1,3192,3198,1,3302,3311,1,3416,3422,1,3430,3448,1,3558,3567,1,3664,3673,1,3792,3801,1,3872,3891,1,4160,4169,1,4240,4249,1,4969,4988,1,5870,5872,1,6112,6121,1,6128,6137,1,6160,6169,1,6470,6479,1,6608,6618,1,6784,6793,1,6800,6809,1,6992,7001,1,7088,7097,1,7232,7241,1,7248,7257,1,8304,8308,4,8309,8313,1,8320,8329,1,8528,8578,1,8581,8585,1,9312,9371,1,9450,9471,1,10102,10131,1,11517,12295,778,12321,12329,1,12344,12346,1,12690,12693,1,12832,12841,1,12872,12879,1,12881,12895,1,12928,12937,1,12977,12991,1,42528,42537,1,42726,42735,1,43056,43061,1,43216,43225,1,43264,43273,1,43472,43481,1,43504,43513,1,43600,43609,1,44016,44025,1,65296,65305,1,65799,65843,1,65856,65912,1,65930,65931,1,66273,66299,1,66336,66339,1,66369,66378,9,66513,66517,1,66720,66729,1,67672,67679,1,67705,67711,1,67751,67759,1,67835,67839,1,67862,67867,1,68028,68029,1,68032,68047,1,68050,68095,1,68160,68168,1,68221,68222,1,68253,68255,1,68331,68335,1,68440,68447,1,68472,68479,1,68521,68527,1,68858,68863,1,68912,68921,1,68928,68937,1,69216,69246,1,69405,69414,1,69457,69460,1,69573,69579,1,69714,69743,1,69872,69881,1,69942,69951,1,70096,70105,1,70113,70132,1,70384,70393,1,70736,70745,1,70864,70873,1,71248,71257,1,71360,71369,1,71376,71395,1,71472,71483,1,71904,71922,1,72016,72025,1,72688,72697,1,72784,72812,1,73040,73049,1,73120,73129,1,73552,73561,1,73664,73684,1,74752,74862,1,90416,90425,1,92768,92777,1,92864,92873,1,93008,93017,1,93019,93025,1,93552,93561,1,93824,93846,1,118e3,118009,1,119488,119507,1,119520,119539,1,119648,119672,1,120782,120831,1,123200,123209,1,123632,123641,1,124144,124153,1,124401,124410,1,125127,125135,1,125264,125273,1,126065,126123,1,126125,126127,1,126129,126132,1,126209,126253,1,126255,126269,1,127232,127244,1,130032,130041,1]));static Nd=new N(new Uint32Array([48,57,1,1632,1641,1,1776,1785,1,1984,1993,1,2406,2415,1,2534,2543,1,2662,2671,1,2790,2799,1,2918,2927,1,3046,3055,1,3174,3183,1,3302,3311,1,3430,3439,1,3558,3567,1,3664,3673,1,3792,3801,1,3872,3881,1,4160,4169,1,4240,4249,1,6112,6121,1,6160,6169,1,6470,6479,1,6608,6617,1,6784,6793,1,6800,6809,1,6992,7001,1,7088,7097,1,7232,7241,1,7248,7257,1,42528,42537,1,43216,43225,1,43264,43273,1,43472,43481,1,43504,43513,1,43600,43609,1,44016,44025,1,65296,65305,1,66720,66729,1,68912,68921,1,68928,68937,1,69734,69743,1,69872,69881,1,69942,69951,1,70096,70105,1,70384,70393,1,70736,70745,1,70864,70873,1,71248,71257,1,71360,71369,1,71376,71395,1,71472,71481,1,71904,71913,1,72016,72025,1,72688,72697,1,72784,72793,1,73040,73049,1,73120,73129,1,73552,73561,1,90416,90425,1,92768,92777,1,92864,92873,1,93008,93017,1,93552,93561,1,118e3,118009,1,120782,120831,1,123200,123209,1,123632,123641,1,124144,124153,1,124401,124410,1,125264,125273,1,130032,130041,1]));static Nl=new N(new Uint32Array([5870,5872,1,8544,8578,1,8581,8584,1,12295,12321,26,12322,12329,1,12344,12346,1,42726,42735,1,65856,65908,1,66369,66378,9,66513,66517,1,74752,74862,1]));static No=new N(new Uint32Array([178,179,1,185,188,3,189,190,1,2548,2553,1,2930,2935,1,3056,3058,1,3192,3198,1,3416,3422,1,3440,3448,1,3882,3891,1,4969,4988,1,6128,6137,1,6618,8304,1686,8308,8313,1,8320,8329,1,8528,8543,1,8585,9312,727,9313,9371,1,9450,9471,1,10102,10131,1,11517,12690,1173,12691,12693,1,12832,12841,1,12872,12879,1,12881,12895,1,12928,12937,1,12977,12991,1,43056,43061,1,65799,65843,1,65909,65912,1,65930,65931,1,66273,66299,1,66336,66339,1,67672,67679,1,67705,67711,1,67751,67759,1,67835,67839,1,67862,67867,1,68028,68029,1,68032,68047,1,68050,68095,1,68160,68168,1,68221,68222,1,68253,68255,1,68331,68335,1,68440,68447,1,68472,68479,1,68521,68527,1,68858,68863,1,69216,69246,1,69405,69414,1,69457,69460,1,69573,69579,1,69714,69733,1,70113,70132,1,71482,71483,1,71914,71922,1,72794,72812,1,73664,73684,1,93019,93025,1,93824,93846,1,119488,119507,1,119520,119539,1,119648,119672,1,125127,125135,1,126065,126123,1,126125,126127,1,126129,126132,1,126209,126253,1,126255,126269,1,127232,127244,1]));static P=new N(new Uint32Array([33,35,1,37,42,1,44,47,1,58,59,1,63,64,1,91,93,1,95,123,28,125,161,36,167,171,4,182,183,1,187,191,4,894,903,9,1370,1375,1,1417,1418,1,1470,1472,2,1475,1478,3,1523,1524,1,1545,1546,1,1548,1549,1,1563,1565,2,1566,1567,1,1642,1645,1,1748,1792,44,1793,1805,1,2039,2041,1,2096,2110,1,2142,2404,262,2405,2416,11,2557,2678,121,2800,3191,391,3204,3572,368,3663,3674,11,3675,3844,169,3845,3858,1,3860,3898,38,3899,3901,1,3973,4048,75,4049,4052,1,4057,4058,1,4170,4175,1,4347,4960,613,4961,4968,1,5120,5742,622,5787,5788,1,5867,5869,1,5941,5942,1,6100,6102,1,6104,6106,1,6144,6154,1,6468,6469,1,6686,6687,1,6816,6822,1,6824,6829,1,6990,6991,1,7002,7008,1,7037,7039,1,7164,7167,1,7227,7231,1,7294,7295,1,7360,7367,1,7379,8208,829,8209,8231,1,8240,8259,1,8261,8273,1,8275,8286,1,8317,8318,1,8333,8334,1,8968,8971,1,9001,9002,1,10088,10101,1,10181,10182,1,10214,10223,1,10627,10648,1,10712,10715,1,10748,10749,1,11513,11516,1,11518,11519,1,11632,11776,144,11777,11822,1,11824,11855,1,11858,11869,1,12289,12291,1,12296,12305,1,12308,12319,1,12336,12349,13,12448,12539,91,42238,42239,1,42509,42511,1,42611,42622,11,42738,42743,1,43124,43127,1,43214,43215,1,43256,43258,1,43260,43310,50,43311,43359,48,43457,43469,1,43486,43487,1,43612,43615,1,43742,43743,1,43760,43761,1,44011,64830,20819,64831,65040,209,65041,65049,1,65072,65106,1,65108,65121,1,65123,65128,5,65130,65131,1,65281,65283,1,65285,65290,1,65292,65295,1,65306,65307,1,65311,65312,1,65339,65341,1,65343,65371,28,65373,65375,2,65376,65381,1,65792,65794,1,66463,66512,49,66927,67671,744,67871,67903,32,68176,68184,1,68223,68336,113,68337,68342,1,68409,68415,1,68505,68508,1,68974,69293,319,69461,69465,1,69510,69513,1,69703,69709,1,69819,69820,1,69822,69825,1,69952,69955,1,70004,70005,1,70085,70088,1,70093,70107,14,70109,70111,1,70200,70205,1,70313,70612,299,70613,70615,2,70616,70731,115,70732,70735,1,70746,70747,1,70749,70854,105,71105,71127,1,71233,71235,1,71264,71276,1,71353,71484,131,71485,71486,1,71739,72004,265,72005,72006,1,72162,72255,93,72256,72262,1,72346,72348,1,72350,72354,1,72448,72457,1,72673,72769,96,72770,72773,1,72816,72817,1,73463,73464,1,73539,73551,1,73727,74864,1137,74865,74868,1,77809,77810,1,92782,92783,1,92917,92983,66,92984,92987,1,92996,93549,553,93550,93551,1,93847,93850,1,94178,113823,19645,121479,121483,1,124415,125278,863,125279,125279,1]));static Pc=new N(new Uint32Array([95,8255,8160,8256,8276,20,65075,65076,1,65101,65103,1,65343,65343,1]));static Pd=new N(new Uint32Array([45,1418,1373,1470,5120,3650,6150,8208,2058,8209,8213,1,11799,11802,3,11834,11835,1,11840,11869,29,12316,12336,20,12448,65073,52625,65074,65112,38,65123,65293,170,68974,69293,319]));static Pe=new N(new Uint32Array([41,93,52,125,3899,3774,3901,5788,1887,8262,8318,56,8334,8969,635,8971,9002,31,10089,10101,2,10182,10215,33,10217,10223,2,10628,10648,2,10713,10715,2,10749,11811,1062,11813,11817,2,11862,11868,2,12297,12305,2,12309,12315,2,12318,12319,1,64830,65048,218,65078,65092,2,65096,65114,18,65116,65118,2,65289,65341,52,65373,65379,3]));static Pf=new N(new Uint32Array([187,8217,8030,8221,8250,29,11779,11781,2,11786,11789,3,11805,11809,4]));static Pi=new N(new Uint32Array([171,8216,8045,8219,8220,1,8223,8249,26,11778,11780,2,11785,11788,3,11804,11808,4]));static Po=new N(new Uint32Array([33,35,1,37,39,1,42,46,2,47,58,11,59,63,4,64,92,28,161,167,6,182,183,1,191,894,703,903,1370,467,1371,1375,1,1417,1472,55,1475,1478,3,1523,1524,1,1545,1546,1,1548,1549,1,1563,1565,2,1566,1567,1,1642,1645,1,1748,1792,44,1793,1805,1,2039,2041,1,2096,2110,1,2142,2404,262,2405,2416,11,2557,2678,121,2800,3191,391,3204,3572,368,3663,3674,11,3675,3844,169,3845,3858,1,3860,3973,113,4048,4052,1,4057,4058,1,4170,4175,1,4347,4960,613,4961,4968,1,5742,5867,125,5868,5869,1,5941,5942,1,6100,6102,1,6104,6106,1,6144,6149,1,6151,6154,1,6468,6469,1,6686,6687,1,6816,6822,1,6824,6829,1,6990,6991,1,7002,7008,1,7037,7039,1,7164,7167,1,7227,7231,1,7294,7295,1,7360,7367,1,7379,8214,835,8215,8224,9,8225,8231,1,8240,8248,1,8251,8254,1,8257,8259,1,8263,8273,1,8275,8277,2,8278,8286,1,11513,11516,1,11518,11519,1,11632,11776,144,11777,11782,5,11783,11784,1,11787,11790,3,11791,11798,1,11800,11801,1,11803,11806,3,11807,11818,11,11819,11822,1,11824,11833,1,11836,11839,1,11841,11843,2,11844,11855,1,11858,11860,1,12289,12291,1,12349,12539,190,42238,42239,1,42509,42511,1,42611,42622,11,42738,42743,1,43124,43127,1,43214,43215,1,43256,43258,1,43260,43310,50,43311,43359,48,43457,43469,1,43486,43487,1,43612,43615,1,43742,43743,1,43760,43761,1,44011,65040,21029,65041,65046,1,65049,65072,23,65093,65094,1,65097,65100,1,65104,65106,1,65108,65111,1,65119,65121,1,65128,65130,2,65131,65281,150,65282,65283,1,65285,65287,1,65290,65294,2,65295,65306,11,65307,65311,4,65312,65340,28,65377,65380,3,65381,65792,411,65793,65794,1,66463,66512,49,66927,67671,744,67871,67903,32,68176,68184,1,68223,68336,113,68337,68342,1,68409,68415,1,68505,68508,1,69461,69465,1,69510,69513,1,69703,69709,1,69819,69820,1,69822,69825,1,69952,69955,1,70004,70005,1,70085,70088,1,70093,70107,14,70109,70111,1,70200,70205,1,70313,70612,299,70613,70615,2,70616,70731,115,70732,70735,1,70746,70747,1,70749,70854,105,71105,71127,1,71233,71235,1,71264,71276,1,71353,71484,131,71485,71486,1,71739,72004,265,72005,72006,1,72162,72255,93,72256,72262,1,72346,72348,1,72350,72354,1,72448,72457,1,72673,72769,96,72770,72773,1,72816,72817,1,73463,73464,1,73539,73551,1,73727,74864,1137,74865,74868,1,77809,77810,1,92782,92783,1,92917,92983,66,92984,92987,1,92996,93549,553,93550,93551,1,93847,93850,1,94178,113823,19645,121479,121483,1,124415,125278,863,125279,125279,1]));static Ps=new N(new Uint32Array([40,91,51,123,3898,3775,3900,5787,1887,8218,8222,4,8261,8317,56,8333,8968,635,8970,9001,31,10088,10100,2,10181,10214,33,10216,10222,2,10627,10647,2,10712,10714,2,10748,11810,1062,11812,11816,2,11842,11861,19,11863,11867,2,12296,12304,2,12308,12314,2,12317,64831,52514,65047,65077,30,65079,65091,2,65095,65113,18,65115,65117,2,65288,65339,51,65371,65375,4,65378,65378,1]));static S=new N(new Uint32Array([36,43,7,60,62,1,94,96,2,124,126,2,162,166,1,168,169,1,172,174,2,175,177,1,180,184,4,215,247,32,706,709,1,722,735,1,741,747,1,749,751,2,752,767,1,885,900,15,901,1014,113,1154,1421,267,1422,1423,1,1542,1544,1,1547,1550,3,1551,1758,207,1769,1789,20,1790,2038,248,2046,2047,1,2184,2546,362,2547,2554,7,2555,2801,246,2928,3059,131,3060,3066,1,3199,3407,208,3449,3647,198,3841,3843,1,3859,3861,2,3862,3863,1,3866,3871,1,3892,3896,2,4030,4037,1,4039,4044,1,4046,4047,1,4053,4056,1,4254,4255,1,5008,5017,1,5741,6107,366,6464,6622,158,6623,6655,1,7009,7018,1,7028,7036,1,8125,8127,2,8128,8129,1,8141,8143,1,8157,8159,1,8173,8175,1,8189,8190,1,8260,8274,14,8314,8316,1,8330,8332,1,8352,8384,1,8448,8449,1,8451,8454,1,8456,8457,1,8468,8470,2,8471,8472,1,8478,8483,1,8485,8489,2,8494,8506,12,8507,8512,5,8513,8516,1,8522,8525,1,8527,8586,59,8587,8592,5,8593,8967,1,8972,9e3,1,9003,9257,1,9280,9290,1,9372,9449,1,9472,10087,1,10132,10180,1,10183,10213,1,10224,10626,1,10649,10711,1,10716,10747,1,10750,11123,1,11126,11157,1,11159,11263,1,11493,11498,1,11856,11857,1,11904,11929,1,11931,12019,1,12032,12245,1,12272,12287,1,12292,12306,14,12307,12320,13,12342,12343,1,12350,12351,1,12443,12444,1,12688,12689,1,12694,12703,1,12736,12773,1,12783,12800,17,12801,12830,1,12842,12871,1,12880,12896,16,12897,12927,1,12938,12976,1,12992,13311,1,19904,19967,1,42128,42182,1,42752,42774,1,42784,42785,1,42889,42890,1,43048,43051,1,43062,43065,1,43639,43641,1,43867,43882,15,43883,64297,20414,64434,64450,1,64832,64847,1,64975,65020,45,65021,65023,1,65122,65124,2,65125,65126,1,65129,65284,155,65291,65308,17,65309,65310,1,65342,65344,2,65372,65374,2,65504,65510,1,65512,65518,1,65532,65533,1,65847,65855,1,65913,65929,1,65932,65934,1,65936,65948,1,65952,66e3,48,66001,66044,1,67703,67704,1,68296,69006,710,69007,71487,2480,73685,73713,1,92988,92991,1,92997,113820,20823,117760,117999,1,118016,118451,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119140,1,119146,119148,1,119171,119172,1,119180,119209,1,119214,119274,1,119296,119361,1,119365,119552,187,119553,119638,1,120513,120539,26,120571,120597,26,120629,120655,26,120687,120713,26,120745,120771,26,120832,121343,1,121399,121402,1,121453,121460,1,121462,121475,1,121477,121478,1,123215,123647,432,126124,126128,4,126254,126704,450,126705,126976,271,126977,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127245,127405,1,127462,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130031,1]));static Sc=new N(new Uint32Array([36,162,126,163,165,1,1423,1547,124,2046,2047,1,2546,2547,1,2555,2801,246,3065,3647,582,6107,8352,2245,8353,8384,1,43064,65020,21956,65129,65284,155,65504,65505,1,65509,65510,1,73693,73696,1,123647,126128,2481]));static Sk=new N(new Uint32Array([94,96,2,168,175,7,180,184,4,706,709,1,722,735,1,741,747,1,749,751,2,752,767,1,885,900,15,901,2184,1283,8125,8127,2,8128,8129,1,8141,8143,1,8157,8159,1,8173,8175,1,8189,8190,1,12443,12444,1,42752,42774,1,42784,42785,1,42889,42890,1,43867,43882,15,43883,64434,20551,64435,64450,1,65342,65344,2,65507,127995,62488,127996,127999,1]));static Sm=new N(new Uint32Array([43,60,17,61,62,1,124,126,2,172,177,5,215,247,32,1014,1542,528,1543,1544,1,8260,8274,14,8314,8316,1,8330,8332,1,8472,8512,40,8513,8516,1,8523,8592,69,8593,8596,1,8602,8603,1,8608,8614,3,8622,8654,32,8655,8658,3,8660,8692,32,8693,8959,1,8992,8993,1,9084,9115,31,9116,9139,1,9180,9185,1,9655,9665,10,9720,9727,1,9839,10176,337,10177,10180,1,10183,10213,1,10224,10239,1,10496,10626,1,10649,10711,1,10716,10747,1,10750,11007,1,11056,11076,1,11079,11084,1,64297,65122,825,65124,65126,1,65291,65308,17,65309,65310,1,65372,65374,2,65506,65513,7,65514,65516,1,69006,69007,1,120513,120539,26,120571,120597,26,120629,120655,26,120687,120713,26,120745,120771,26,126704,126705,1]));static So=new N(new Uint32Array([166,169,3,174,176,2,1154,1421,267,1422,1550,128,1551,1758,207,1769,1789,20,1790,2038,248,2554,2928,374,3059,3064,1,3066,3199,133,3407,3449,42,3841,3843,1,3859,3861,2,3862,3863,1,3866,3871,1,3892,3896,2,4030,4037,1,4039,4044,1,4046,4047,1,4053,4056,1,4254,4255,1,5008,5017,1,5741,6464,723,6622,6655,1,7009,7018,1,7028,7036,1,8448,8449,1,8451,8454,1,8456,8457,1,8468,8470,2,8471,8478,7,8479,8483,1,8485,8489,2,8494,8506,12,8507,8522,15,8524,8525,1,8527,8586,59,8587,8597,10,8598,8601,1,8604,8607,1,8609,8610,1,8612,8613,1,8615,8621,1,8623,8653,1,8656,8657,1,8659,8661,2,8662,8691,1,8960,8967,1,8972,8991,1,8994,9e3,1,9003,9083,1,9085,9114,1,9140,9179,1,9186,9257,1,9280,9290,1,9372,9449,1,9472,9654,1,9656,9664,1,9666,9719,1,9728,9838,1,9840,10087,1,10132,10175,1,10240,10495,1,11008,11055,1,11077,11078,1,11085,11123,1,11126,11157,1,11159,11263,1,11493,11498,1,11856,11857,1,11904,11929,1,11931,12019,1,12032,12245,1,12272,12287,1,12292,12306,14,12307,12320,13,12342,12343,1,12350,12351,1,12688,12689,1,12694,12703,1,12736,12773,1,12783,12800,17,12801,12830,1,12842,12871,1,12880,12896,16,12897,12927,1,12938,12976,1,12992,13311,1,19904,19967,1,42128,42182,1,43048,43051,1,43062,43063,1,43065,43639,574,43640,43641,1,64832,64847,1,64975,65021,46,65022,65023,1,65508,65512,4,65517,65518,1,65532,65533,1,65847,65855,1,65913,65929,1,65932,65934,1,65936,65948,1,65952,66e3,48,66001,66044,1,67703,67704,1,68296,71487,3191,73685,73692,1,73697,73713,1,92988,92991,1,92997,113820,20823,117760,117999,1,118016,118451,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119140,1,119146,119148,1,119171,119172,1,119180,119209,1,119214,119274,1,119296,119361,1,119365,119552,187,119553,119638,1,120832,121343,1,121399,121402,1,121453,121460,1,121462,121475,1,121477,121478,1,123215,126124,2909,126254,126976,722,126977,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127245,127405,1,127462,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,127994,1,128e3,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130031,1]));static Z=new N(new Uint32Array([32,160,128,5760,8192,2432,8193,8202,1,8232,8233,1,8239,8287,48,12288,12288,1]));static Zl=new N(new Uint32Array([8232,8232,1]));static Zp=new N(new Uint32Array([8233,8233,1]));static Zs=new N(new Uint32Array([32,160,128,5760,8192,2432,8193,8202,1,8239,8287,48,12288,12288,1]));static Adlam=new N(new Uint32Array([125184,125259,1,125264,125273,1,125278,125279,1]));static Ahom=new N(new Uint32Array([71424,71450,1,71453,71467,1,71472,71494,1]));static Anatolian_Hieroglyphs=new N(new Uint32Array([82944,83526,1]));static Arabic=new N(new Uint32Array([1536,1540,1,1542,1547,1,1549,1562,1,1564,1566,1,1568,1599,1,1601,1610,1,1622,1647,1,1649,1756,1,1758,1791,1,1872,1919,1,2160,2190,1,2192,2193,1,2199,2273,1,2275,2303,1,64336,64450,1,64467,64829,1,64832,64911,1,64914,64967,1,64975,65008,33,65009,65023,1,65136,65140,1,65142,65276,1,69216,69246,1,69314,69316,1,69372,69375,1,126464,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,126704,126705,1]));static Armenian=new N(new Uint32Array([1329,1366,1,1369,1418,1,1421,1423,1,64275,64279,1]));static Avestan=new N(new Uint32Array([68352,68405,1,68409,68415,1]));static Balinese=new N(new Uint32Array([6912,6988,1,6990,7039,1]));static Bamum=new N(new Uint32Array([42656,42743,1,92160,92728,1]));static Bassa_Vah=new N(new Uint32Array([92880,92909,1,92912,92917,1]));static Batak=new N(new Uint32Array([7104,7155,1,7164,7167,1]));static Bengali=new N(new Uint32Array([2432,2435,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2492,2500,1,2503,2504,1,2507,2510,1,2519,2524,5,2525,2527,2,2528,2531,1,2534,2558,1]));static Bhaiksuki=new N(new Uint32Array([72704,72712,1,72714,72758,1,72760,72773,1,72784,72812,1]));static Bopomofo=new N(new Uint32Array([746,747,1,12549,12591,1,12704,12735,1]));static Brahmi=new N(new Uint32Array([69632,69709,1,69714,69749,1,69759,69759,1]));static Braille=new N(new Uint32Array([10240,10495,1]));static Buginese=new N(new Uint32Array([6656,6683,1,6686,6687,1]));static Buhid=new N(new Uint32Array([5952,5971,1]));static Canadian_Aboriginal=new N(new Uint32Array([5120,5759,1,6320,6389,1,72368,72383,1]));static Carian=new N(new Uint32Array([66208,66256,1]));static Caucasian_Albanian=new N(new Uint32Array([66864,66915,1,66927,66927,1]));static Chakma=new N(new Uint32Array([69888,69940,1,69942,69959,1]));static Cham=new N(new Uint32Array([43520,43574,1,43584,43597,1,43600,43609,1,43612,43615,1]));static Cherokee=new N(new Uint32Array([5024,5109,1,5112,5117,1,43888,43967,1]));static Chorasmian=new N(new Uint32Array([69552,69579,1]));static Common=new N(new Uint32Array([0,64,1,91,96,1,123,169,1,171,185,1,187,191,1,215,247,32,697,735,1,741,745,1,748,767,1,884,894,10,901,903,2,1541,1548,7,1563,1567,4,1600,1757,157,2274,2404,130,2405,3647,1242,4053,4056,1,4347,5867,1520,5868,5869,1,5941,5942,1,6146,6147,1,6149,7379,1230,7393,7401,8,7402,7404,1,7406,7411,1,7413,7415,1,7418,8192,774,8193,8203,1,8206,8292,1,8294,8304,1,8308,8318,1,8320,8334,1,8352,8384,1,8448,8485,1,8487,8489,1,8492,8497,1,8499,8525,1,8527,8543,1,8585,8587,1,8592,9257,1,9280,9290,1,9312,10239,1,10496,11123,1,11126,11157,1,11159,11263,1,11776,11869,1,12272,12292,1,12294,12296,2,12297,12320,1,12336,12343,1,12348,12351,1,12443,12444,1,12448,12539,91,12540,12688,148,12689,12703,1,12736,12773,1,12783,12832,49,12833,12895,1,12927,13007,1,13055,13144,89,13145,13311,1,19904,19967,1,42752,42785,1,42888,42890,1,43056,43065,1,43310,43471,161,43867,43882,15,43883,64830,20947,64831,65040,209,65041,65049,1,65072,65106,1,65108,65126,1,65128,65131,1,65279,65281,2,65282,65312,1,65339,65344,1,65371,65381,1,65392,65438,46,65439,65504,65,65505,65510,1,65512,65518,1,65529,65533,1,65792,65794,1,65799,65843,1,65847,65855,1,65936,65948,1,66e3,66044,1,66273,66299,1,113824,113827,1,117760,118009,1,118016,118451,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119142,1,119146,119162,1,119171,119172,1,119180,119209,1,119214,119274,1,119488,119507,1,119520,119539,1,119552,119638,1,119648,119672,1,119808,119892,1,119894,119964,1,119966,119967,1,119970,119973,3,119974,119977,3,119978,119980,1,119982,119993,1,119995,119997,2,119998,120003,1,120005,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120094,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120146,120485,1,120488,120779,1,120782,120831,1,126065,126132,1,126209,126269,1,126976,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127232,127405,1,127462,127487,1,127489,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130041,1,917505,917536,31,917537,917631,1]));static foldCommon=new N(new Uint32Array([924,956,32]));static Coptic=new N(new Uint32Array([994,1007,1,11392,11507,1,11513,11519,1]));static Cuneiform=new N(new Uint32Array([73728,74649,1,74752,74862,1,74864,74868,1,74880,75075,1]));static Cypriot=new N(new Uint32Array([67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3]));static Cypro_Minoan=new N(new Uint32Array([77712,77810,1]));static Cyrillic=new N(new Uint32Array([1024,1156,1,1159,1327,1,7296,7306,1,7467,7544,77,11744,11775,1,42560,42655,1,65070,65071,1,122928,122989,1,123023,123023,1]));static Deseret=new N(new Uint32Array([66560,66639,1]));static Devanagari=new N(new Uint32Array([2304,2384,1,2389,2403,1,2406,2431,1,43232,43263,1,72448,72457,1]));static Dives_Akuru=new N(new Uint32Array([71936,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71989,1,71991,71992,1,71995,72006,1,72016,72025,1]));static Dogra=new N(new Uint32Array([71680,71739,1]));static Duployan=new N(new Uint32Array([113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,113820,113823,1]));static Egyptian_Hieroglyphs=new N(new Uint32Array([77824,78933,1,78944,82938,1]));static Elbasan=new N(new Uint32Array([66816,66855,1]));static Elymaic=new N(new Uint32Array([69600,69622,1]));static Ethiopic=new N(new Uint32Array([4608,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4957,4988,1,4992,5017,1,11648,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,43777,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,124896,124902,1,124904,124907,1,124909,124910,1,124912,124926,1]));static Garay=new N(new Uint32Array([68928,68965,1,68969,68997,1,69006,69007,1]));static Georgian=new N(new Uint32Array([4256,4293,1,4295,4301,6,4304,4346,1,4348,4351,1,7312,7354,1,7357,7359,1,11520,11557,1,11559,11565,6]));static Glagolitic=new N(new Uint32Array([11264,11359,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1]));static Gothic=new N(new Uint32Array([66352,66378,1]));static Grantha=new N(new Uint32Array([70400,70403,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70460,70468,1,70471,70472,1,70475,70477,1,70480,70487,7,70493,70499,1,70502,70508,1,70512,70516,1]));static Greek=new N(new Uint32Array([880,883,1,885,887,1,890,893,1,895,900,5,902,904,2,905,906,1,908,910,2,911,929,1,931,993,1,1008,1023,1,7462,7466,1,7517,7521,1,7526,7530,1,7615,7936,321,7937,7957,1,7960,7965,1,7968,8005,1,8008,8013,1,8016,8023,1,8025,8031,2,8032,8061,1,8064,8116,1,8118,8132,1,8134,8147,1,8150,8155,1,8157,8175,1,8178,8180,1,8182,8190,1,8486,43877,35391,65856,65934,1,65952,119296,53344,119297,119365,1]));static foldGreek=new N(new Uint32Array([181,837,656]));static Gujarati=new N(new Uint32Array([2689,2691,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2748,2757,1,2759,2761,1,2763,2765,1,2768,2784,16,2785,2787,1,2790,2801,1,2809,2815,1]));static Gunjala_Gondi=new N(new Uint32Array([73056,73061,1,73063,73064,1,73066,73102,1,73104,73105,1,73107,73112,1,73120,73129,1]));static Gurmukhi=new N(new Uint32Array([2561,2563,1,2565,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2620,2622,2,2623,2626,1,2631,2632,1,2635,2637,1,2641,2649,8,2650,2652,1,2654,2662,8,2663,2678,1]));static Gurung_Khema=new N(new Uint32Array([90368,90425,1]));static Han=new N(new Uint32Array([11904,11929,1,11931,12019,1,12032,12245,1,12293,12295,2,12321,12329,1,12344,12347,1,13312,19903,1,19968,40959,1,63744,64109,1,64112,64217,1,94178,94179,1,94192,94193,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1]));static Hangul=new N(new Uint32Array([4352,4607,1,12334,12335,1,12593,12686,1,12800,12830,1,12896,12926,1,43360,43388,1,44032,55203,1,55216,55238,1,55243,55291,1,65440,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1]));static Hanifi_Rohingya=new N(new Uint32Array([68864,68903,1,68912,68921,1]));static Hanunoo=new N(new Uint32Array([5920,5940,1]));static Hatran=new N(new Uint32Array([67808,67826,1,67828,67829,1,67835,67839,1]));static Hebrew=new N(new Uint32Array([1425,1479,1,1488,1514,1,1519,1524,1,64285,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64335,1]));static Hiragana=new N(new Uint32Array([12353,12438,1,12445,12447,1,110593,110879,1,110898,110928,30,110929,110930,1,127488,127488,1]));static Imperial_Aramaic=new N(new Uint32Array([67648,67669,1,67671,67679,1]));static Inherited=new N(new Uint32Array([768,879,1,1157,1158,1,1611,1621,1,1648,2385,737,2386,2388,1,6832,6862,1,7376,7378,1,7380,7392,1,7394,7400,1,7405,7412,7,7416,7417,1,7616,7679,1,8204,8205,1,8400,8432,1,12330,12333,1,12441,12442,1,65024,65039,1,65056,65069,1,66045,66272,227,70459,118528,48069,118529,118573,1,118576,118598,1,119143,119145,1,119163,119170,1,119173,119179,1,119210,119213,1,917760,917999,1]));static foldInherited=new N(new Uint32Array([921,953,32,8126,8126,1]));static Inscriptional_Pahlavi=new N(new Uint32Array([68448,68466,1,68472,68479,1]));static Inscriptional_Parthian=new N(new Uint32Array([68416,68437,1,68440,68447,1]));static Javanese=new N(new Uint32Array([43392,43469,1,43472,43481,1,43486,43487,1]));static Kaithi=new N(new Uint32Array([69760,69826,1,69837,69837,1]));static Kannada=new N(new Uint32Array([3200,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3260,3268,1,3270,3272,1,3274,3277,1,3285,3286,1,3293,3294,1,3296,3299,1,3302,3311,1,3313,3315,1]));static Katakana=new N(new Uint32Array([12449,12538,1,12541,12543,1,12784,12799,1,13008,13054,1,13056,13143,1,65382,65391,1,65393,65437,1,110576,110579,1,110581,110587,1,110589,110590,1,110592,110880,288,110881,110882,1,110933,110948,15,110949,110951,1]));static Kawi=new N(new Uint32Array([73472,73488,1,73490,73530,1,73534,73562,1]));static Kayah_Li=new N(new Uint32Array([43264,43309,1,43311,43311,1]));static Kharoshthi=new N(new Uint32Array([68096,68099,1,68101,68102,1,68108,68115,1,68117,68119,1,68121,68149,1,68152,68154,1,68159,68168,1,68176,68184,1]));static Khitan_Small_Script=new N(new Uint32Array([94180,101120,6940,101121,101589,1,101631,101631,1]));static Khmer=new N(new Uint32Array([6016,6109,1,6112,6121,1,6128,6137,1,6624,6655,1]));static Khojki=new N(new Uint32Array([70144,70161,1,70163,70209,1]));static Khudawadi=new N(new Uint32Array([70320,70378,1,70384,70393,1]));static Kirat_Rai=new N(new Uint32Array([93504,93561,1]));static Lao=new N(new Uint32Array([3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3773,1,3776,3780,1,3782,3784,2,3785,3790,1,3792,3801,1,3804,3807,1]));static Latin=new N(new Uint32Array([65,90,1,97,122,1,170,186,16,192,214,1,216,246,1,248,696,1,736,740,1,7424,7461,1,7468,7516,1,7522,7525,1,7531,7543,1,7545,7614,1,7680,7935,1,8305,8319,14,8336,8348,1,8490,8491,1,8498,8526,28,8544,8584,1,11360,11391,1,42786,42887,1,42891,42957,1,42960,42961,1,42963,42965,2,42966,42972,1,42994,43007,1,43824,43866,1,43868,43876,1,43878,43881,1,64256,64262,1,65313,65338,1,65345,65370,1,67456,67461,1,67463,67504,1,67506,67514,1,122624,122654,1,122661,122666,1]));static Lepcha=new N(new Uint32Array([7168,7223,1,7227,7241,1,7245,7247,1]));static Limbu=new N(new Uint32Array([6400,6430,1,6432,6443,1,6448,6459,1,6464,6468,4,6469,6479,1]));static Linear_A=new N(new Uint32Array([67072,67382,1,67392,67413,1,67424,67431,1]));static Linear_B=new N(new Uint32Array([65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1]));static Lisu=new N(new Uint32Array([42192,42239,1,73648,73648,1]));static Lycian=new N(new Uint32Array([66176,66204,1]));static Lydian=new N(new Uint32Array([67872,67897,1,67903,67903,1]));static Mahajani=new N(new Uint32Array([69968,70006,1]));static Makasar=new N(new Uint32Array([73440,73464,1]));static Malayalam=new N(new Uint32Array([3328,3340,1,3342,3344,1,3346,3396,1,3398,3400,1,3402,3407,1,3412,3427,1,3430,3455,1]));static Mandaic=new N(new Uint32Array([2112,2139,1,2142,2142,1]));static Manichaean=new N(new Uint32Array([68288,68326,1,68331,68342,1]));static Marchen=new N(new Uint32Array([72816,72847,1,72850,72871,1,72873,72886,1]));static Masaram_Gondi=new N(new Uint32Array([72960,72966,1,72968,72969,1,72971,73014,1,73018,73020,2,73021,73023,2,73024,73031,1,73040,73049,1]));static Medefaidrin=new N(new Uint32Array([93760,93850,1]));static Meetei_Mayek=new N(new Uint32Array([43744,43766,1,43968,44013,1,44016,44025,1]));static Mende_Kikakui=new N(new Uint32Array([124928,125124,1,125127,125142,1]));static Meroitic_Cursive=new N(new Uint32Array([68e3,68023,1,68028,68047,1,68050,68095,1]));static Meroitic_Hieroglyphs=new N(new Uint32Array([67968,67999,1]));static Miao=new N(new Uint32Array([93952,94026,1,94031,94087,1,94095,94111,1]));static Modi=new N(new Uint32Array([71168,71236,1,71248,71257,1]));static Mongolian=new N(new Uint32Array([6144,6145,1,6148,6150,2,6151,6169,1,6176,6264,1,6272,6314,1,71264,71276,1]));static Mro=new N(new Uint32Array([92736,92766,1,92768,92777,1,92782,92783,1]));static Multani=new N(new Uint32Array([70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70313,1]));static Myanmar=new N(new Uint32Array([4096,4255,1,43488,43518,1,43616,43647,1,71376,71395,1]));static Nabataean=new N(new Uint32Array([67712,67742,1,67751,67759,1]));static Nag_Mundari=new N(new Uint32Array([124112,124153,1]));static Nandinagari=new N(new Uint32Array([72096,72103,1,72106,72151,1,72154,72164,1]));static New_Tai_Lue=new N(new Uint32Array([6528,6571,1,6576,6601,1,6608,6618,1,6622,6623,1]));static Newa=new N(new Uint32Array([70656,70747,1,70749,70753,1]));static Nko=new N(new Uint32Array([1984,2042,1,2045,2047,1]));static Nushu=new N(new Uint32Array([94177,110960,16783,110961,111355,1]));static Nyiakeng_Puachue_Hmong=new N(new Uint32Array([123136,123180,1,123184,123197,1,123200,123209,1,123214,123215,1]));static Ogham=new N(new Uint32Array([5760,5788,1]));static Ol_Chiki=new N(new Uint32Array([7248,7295,1]));static Ol_Onal=new N(new Uint32Array([124368,124410,1,124415,124415,1]));static Old_Hungarian=new N(new Uint32Array([68736,68786,1,68800,68850,1,68858,68863,1]));static Old_Italic=new N(new Uint32Array([66304,66339,1,66349,66351,1]));static Old_North_Arabian=new N(new Uint32Array([68224,68255,1]));static Old_Permic=new N(new Uint32Array([66384,66426,1]));static Old_Persian=new N(new Uint32Array([66464,66499,1,66504,66517,1]));static Old_Sogdian=new N(new Uint32Array([69376,69415,1]));static Old_South_Arabian=new N(new Uint32Array([68192,68223,1]));static Old_Turkic=new N(new Uint32Array([68608,68680,1]));static Old_Uyghur=new N(new Uint32Array([69488,69513,1]));static Oriya=new N(new Uint32Array([2817,2819,1,2821,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2876,2884,1,2887,2888,1,2891,2893,1,2901,2903,1,2908,2909,1,2911,2915,1,2918,2935,1]));static Osage=new N(new Uint32Array([66736,66771,1,66776,66811,1]));static Osmanya=new N(new Uint32Array([66688,66717,1,66720,66729,1]));static Pahawh_Hmong=new N(new Uint32Array([92928,92997,1,93008,93017,1,93019,93025,1,93027,93047,1,93053,93071,1]));static Palmyrene=new N(new Uint32Array([67680,67711,1]));static Pau_Cin_Hau=new N(new Uint32Array([72384,72440,1]));static Phags_Pa=new N(new Uint32Array([43072,43127,1]));static Phoenician=new N(new Uint32Array([67840,67867,1,67871,67871,1]));static Psalter_Pahlavi=new N(new Uint32Array([68480,68497,1,68505,68508,1,68521,68527,1]));static Rejang=new N(new Uint32Array([43312,43347,1,43359,43359,1]));static Runic=new N(new Uint32Array([5792,5866,1,5870,5880,1]));static Samaritan=new N(new Uint32Array([2048,2093,1,2096,2110,1]));static Saurashtra=new N(new Uint32Array([43136,43205,1,43214,43225,1]));static Sharada=new N(new Uint32Array([70016,70111,1]));static Shavian=new N(new Uint32Array([66640,66687,1]));static Siddham=new N(new Uint32Array([71040,71093,1,71096,71133,1]));static SignWriting=new N(new Uint32Array([120832,121483,1,121499,121503,1,121505,121519,1]));static Sinhala=new N(new Uint32Array([3457,3459,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3530,3535,5,3536,3540,1,3542,3544,2,3545,3551,1,3558,3567,1,3570,3572,1,70113,70132,1]));static Sogdian=new N(new Uint32Array([69424,69465,1]));static Sora_Sompeng=new N(new Uint32Array([69840,69864,1,69872,69881,1]));static Soyombo=new N(new Uint32Array([72272,72354,1]));static Sundanese=new N(new Uint32Array([7040,7103,1,7360,7367,1]));static Sunuwar=new N(new Uint32Array([72640,72673,1,72688,72697,1]));static Syloti_Nagri=new N(new Uint32Array([43008,43052,1]));static Syriac=new N(new Uint32Array([1792,1805,1,1807,1866,1,1869,1871,1,2144,2154,1]));static Tagalog=new N(new Uint32Array([5888,5909,1,5919,5919,1]));static Tagbanwa=new N(new Uint32Array([5984,5996,1,5998,6e3,1,6002,6003,1]));static Tai_Le=new N(new Uint32Array([6480,6509,1,6512,6516,1]));static Tai_Tham=new N(new Uint32Array([6688,6750,1,6752,6780,1,6783,6793,1,6800,6809,1,6816,6829,1]));static Tai_Viet=new N(new Uint32Array([43648,43714,1,43739,43743,1]));static Takri=new N(new Uint32Array([71296,71353,1,71360,71369,1]));static Tamil=new N(new Uint32Array([2946,2947,1,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3006,3010,1,3014,3016,1,3018,3021,1,3024,3031,7,3046,3066,1,73664,73713,1,73727,73727,1]));static Tangsa=new N(new Uint32Array([92784,92862,1,92864,92873,1]));static Tangut=new N(new Uint32Array([94176,94208,32,94209,100343,1,100352,101119,1,101632,101640,1]));static Telugu=new N(new Uint32Array([3072,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3132,3140,1,3142,3144,1,3146,3149,1,3157,3158,1,3160,3162,1,3165,3168,3,3169,3171,1,3174,3183,1,3191,3199,1]));static Thaana=new N(new Uint32Array([1920,1969,1]));static Thai=new N(new Uint32Array([3585,3642,1,3648,3675,1]));static Tibetan=new N(new Uint32Array([3840,3911,1,3913,3948,1,3953,3991,1,3993,4028,1,4030,4044,1,4046,4052,1,4057,4058,1]));static Tifinagh=new N(new Uint32Array([11568,11623,1,11631,11632,1,11647,11647,1]));static Tirhuta=new N(new Uint32Array([70784,70855,1,70864,70873,1]));static Todhri=new N(new Uint32Array([67008,67059,1]));static Toto=new N(new Uint32Array([123536,123566,1]));static Tulu_Tigalari=new N(new Uint32Array([70528,70537,1,70539,70542,3,70544,70581,1,70583,70592,1,70594,70597,3,70599,70602,1,70604,70613,1,70615,70616,1,70625,70626,1]));static Ugaritic=new N(new Uint32Array([66432,66461,1,66463,66463,1]));static Vai=new N(new Uint32Array([42240,42539,1]));static Vithkuqi=new N(new Uint32Array([66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1]));static Wancho=new N(new Uint32Array([123584,123641,1,123647,123647,1]));static Warang_Citi=new N(new Uint32Array([71840,71922,1,71935,71935,1]));static Yezidi=new N(new Uint32Array([69248,69289,1,69291,69293,1,69296,69297,1]));static Yi=new N(new Uint32Array([40960,42124,1,42128,42182,1]));static Zanabazar_Square=new N(new Uint32Array([72192,72263,1]));static CATEGORIES=new Map([["C",e.C],["Cc",e.Cc],["Cf",e.Cf],["Co",e.Co],["Cs",e.Cs],["L",e.L],["Ll",e.Ll],["Lm",e.Lm],["Lo",e.Lo],["Lt",e.Lt],["Lu",e.Lu],["M",e.M],["Mc",e.Mc],["Me",e.Me],["Mn",e.Mn],["N",e.N],["Nd",e.Nd],["Nl",e.Nl],["No",e.No],["P",e.P],["Pc",e.Pc],["Pd",e.Pd],["Pe",e.Pe],["Pf",e.Pf],["Pi",e.Pi],["Po",e.Po],["Ps",e.Ps],["S",e.S],["Sc",e.Sc],["Sk",e.Sk],["Sm",e.Sm],["So",e.So],["Z",e.Z],["Zl",e.Zl],["Zp",e.Zp],["Zs",e.Zs]]);static SCRIPTS=new Map([["Adlam",e.Adlam],["Ahom",e.Ahom],["Anatolian_Hieroglyphs",e.Anatolian_Hieroglyphs],["Arabic",e.Arabic],["Armenian",e.Armenian],["Avestan",e.Avestan],["Balinese",e.Balinese],["Bamum",e.Bamum],["Bassa_Vah",e.Bassa_Vah],["Batak",e.Batak],["Bengali",e.Bengali],["Bhaiksuki",e.Bhaiksuki],["Bopomofo",e.Bopomofo],["Brahmi",e.Brahmi],["Braille",e.Braille],["Buginese",e.Buginese],["Buhid",e.Buhid],["Canadian_Aboriginal",e.Canadian_Aboriginal],["Carian",e.Carian],["Caucasian_Albanian",e.Caucasian_Albanian],["Chakma",e.Chakma],["Cham",e.Cham],["Cherokee",e.Cherokee],["Chorasmian",e.Chorasmian],["Common",e.Common],["Coptic",e.Coptic],["Cuneiform",e.Cuneiform],["Cypriot",e.Cypriot],["Cypro_Minoan",e.Cypro_Minoan],["Cyrillic",e.Cyrillic],["Deseret",e.Deseret],["Devanagari",e.Devanagari],["Dives_Akuru",e.Dives_Akuru],["Dogra",e.Dogra],["Duployan",e.Duployan],["Egyptian_Hieroglyphs",e.Egyptian_Hieroglyphs],["Elbasan",e.Elbasan],["Elymaic",e.Elymaic],["Ethiopic",e.Ethiopic],["Garay",e.Garay],["Georgian",e.Georgian],["Glagolitic",e.Glagolitic],["Gothic",e.Gothic],["Grantha",e.Grantha],["Greek",e.Greek],["Gujarati",e.Gujarati],["Gunjala_Gondi",e.Gunjala_Gondi],["Gurmukhi",e.Gurmukhi],["Gurung_Khema",e.Gurung_Khema],["Han",e.Han],["Hangul",e.Hangul],["Hanifi_Rohingya",e.Hanifi_Rohingya],["Hanunoo",e.Hanunoo],["Hatran",e.Hatran],["Hebrew",e.Hebrew],["Hiragana",e.Hiragana],["Imperial_Aramaic",e.Imperial_Aramaic],["Inherited",e.Inherited],["Inscriptional_Pahlavi",e.Inscriptional_Pahlavi],["Inscriptional_Parthian",e.Inscriptional_Parthian],["Javanese",e.Javanese],["Kaithi",e.Kaithi],["Kannada",e.Kannada],["Katakana",e.Katakana],["Kawi",e.Kawi],["Kayah_Li",e.Kayah_Li],["Kharoshthi",e.Kharoshthi],["Khitan_Small_Script",e.Khitan_Small_Script],["Khmer",e.Khmer],["Khojki",e.Khojki],["Khudawadi",e.Khudawadi],["Kirat_Rai",e.Kirat_Rai],["Lao",e.Lao],["Latin",e.Latin],["Lepcha",e.Lepcha],["Limbu",e.Limbu],["Linear_A",e.Linear_A],["Linear_B",e.Linear_B],["Lisu",e.Lisu],["Lycian",e.Lycian],["Lydian",e.Lydian],["Mahajani",e.Mahajani],["Makasar",e.Makasar],["Malayalam",e.Malayalam],["Mandaic",e.Mandaic],["Manichaean",e.Manichaean],["Marchen",e.Marchen],["Masaram_Gondi",e.Masaram_Gondi],["Medefaidrin",e.Medefaidrin],["Meetei_Mayek",e.Meetei_Mayek],["Mende_Kikakui",e.Mende_Kikakui],["Meroitic_Cursive",e.Meroitic_Cursive],["Meroitic_Hieroglyphs",e.Meroitic_Hieroglyphs],["Miao",e.Miao],["Modi",e.Modi],["Mongolian",e.Mongolian],["Mro",e.Mro],["Multani",e.Multani],["Myanmar",e.Myanmar],["Nabataean",e.Nabataean],["Nag_Mundari",e.Nag_Mundari],["Nandinagari",e.Nandinagari],["New_Tai_Lue",e.New_Tai_Lue],["Newa",e.Newa],["Nko",e.Nko],["Nushu",e.Nushu],["Nyiakeng_Puachue_Hmong",e.Nyiakeng_Puachue_Hmong],["Ogham",e.Ogham],["Ol_Chiki",e.Ol_Chiki],["Ol_Onal",e.Ol_Onal],["Old_Hungarian",e.Old_Hungarian],["Old_Italic",e.Old_Italic],["Old_North_Arabian",e.Old_North_Arabian],["Old_Permic",e.Old_Permic],["Old_Persian",e.Old_Persian],["Old_Sogdian",e.Old_Sogdian],["Old_South_Arabian",e.Old_South_Arabian],["Old_Turkic",e.Old_Turkic],["Old_Uyghur",e.Old_Uyghur],["Oriya",e.Oriya],["Osage",e.Osage],["Osmanya",e.Osmanya],["Pahawh_Hmong",e.Pahawh_Hmong],["Palmyrene",e.Palmyrene],["Pau_Cin_Hau",e.Pau_Cin_Hau],["Phags_Pa",e.Phags_Pa],["Phoenician",e.Phoenician],["Psalter_Pahlavi",e.Psalter_Pahlavi],["Rejang",e.Rejang],["Runic",e.Runic],["Samaritan",e.Samaritan],["Saurashtra",e.Saurashtra],["Sharada",e.Sharada],["Shavian",e.Shavian],["Siddham",e.Siddham],["SignWriting",e.SignWriting],["Sinhala",e.Sinhala],["Sogdian",e.Sogdian],["Sora_Sompeng",e.Sora_Sompeng],["Soyombo",e.Soyombo],["Sundanese",e.Sundanese],["Sunuwar",e.Sunuwar],["Syloti_Nagri",e.Syloti_Nagri],["Syriac",e.Syriac],["Tagalog",e.Tagalog],["Tagbanwa",e.Tagbanwa],["Tai_Le",e.Tai_Le],["Tai_Tham",e.Tai_Tham],["Tai_Viet",e.Tai_Viet],["Takri",e.Takri],["Tamil",e.Tamil],["Tangsa",e.Tangsa],["Tangut",e.Tangut],["Telugu",e.Telugu],["Thaana",e.Thaana],["Thai",e.Thai],["Tibetan",e.Tibetan],["Tifinagh",e.Tifinagh],["Tirhuta",e.Tirhuta],["Todhri",e.Todhri],["Toto",e.Toto],["Tulu_Tigalari",e.Tulu_Tigalari],["Ugaritic",e.Ugaritic],["Vai",e.Vai],["Vithkuqi",e.Vithkuqi],["Wancho",e.Wancho],["Warang_Citi",e.Warang_Citi],["Yezidi",e.Yezidi],["Yi",e.Yi],["Zanabazar_Square",e.Zanabazar_Square]]);static FOLD_CATEGORIES=new Map([["L",e.foldL],["Ll",e.foldLl],["Lt",e.foldLt],["Lu",e.foldLu],["M",e.foldM],["Mn",e.foldMn]]);static FOLD_SCRIPT=new Map([["Common",e.foldCommon],["Greek",e.foldGreek],["Inherited",e.foldInherited]]);static Print=new N(new Uint32Array([33,126,1,161,172,1,174,887,1,890,895,1,900,906,1,908,910,2,911,929,1,931,1327,1,1329,1366,1,1369,1418,1,1421,1423,1,1425,1479,1,1488,1514,1,1519,1524,1,1542,1563,1,1565,1756,1,1758,1805,1,1808,1866,1,1869,1969,1,1984,2042,1,2045,2093,1,2096,2110,1,2112,2139,1,2142,2144,2,2145,2154,1,2160,2190,1,2199,2273,1,2275,2435,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2492,2500,1,2503,2504,1,2507,2510,1,2519,2524,5,2525,2527,2,2528,2531,1,2534,2558,1,2561,2563,1,2565,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2620,2622,2,2623,2626,1,2631,2632,1,2635,2637,1,2641,2649,8,2650,2652,1,2654,2662,8,2663,2678,1,2689,2691,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2748,2757,1,2759,2761,1,2763,2765,1,2768,2784,16,2785,2787,1,2790,2801,1,2809,2815,1,2817,2819,1,2821,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2876,2884,1,2887,2888,1,2891,2893,1,2901,2903,1,2908,2909,1,2911,2915,1,2918,2935,1,2946,2947,1,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3006,3010,1,3014,3016,1,3018,3021,1,3024,3031,7,3046,3066,1,3072,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3132,3140,1,3142,3144,1,3146,3149,1,3157,3158,1,3160,3162,1,3165,3168,3,3169,3171,1,3174,3183,1,3191,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3260,3268,1,3270,3272,1,3274,3277,1,3285,3286,1,3293,3294,1,3296,3299,1,3302,3311,1,3313,3315,1,3328,3340,1,3342,3344,1,3346,3396,1,3398,3400,1,3402,3407,1,3412,3427,1,3430,3455,1,3457,3459,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3530,3535,5,3536,3540,1,3542,3544,2,3545,3551,1,3558,3567,1,3570,3572,1,3585,3642,1,3647,3675,1,3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3773,1,3776,3780,1,3782,3784,2,3785,3790,1,3792,3801,1,3804,3807,1,3840,3911,1,3913,3948,1,3953,3991,1,3993,4028,1,4030,4044,1,4046,4058,1,4096,4293,1,4295,4301,6,4304,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4957,4988,1,4992,5017,1,5024,5109,1,5112,5117,1,5120,5759,1,5761,5788,1,5792,5880,1,5888,5909,1,5919,5942,1,5952,5971,1,5984,5996,1,5998,6e3,1,6002,6003,1,6016,6109,1,6112,6121,1,6128,6137,1,6144,6157,1,6159,6169,1,6176,6264,1,6272,6314,1,6320,6389,1,6400,6430,1,6432,6443,1,6448,6459,1,6464,6468,4,6469,6509,1,6512,6516,1,6528,6571,1,6576,6601,1,6608,6618,1,6622,6683,1,6686,6750,1,6752,6780,1,6783,6793,1,6800,6809,1,6816,6829,1,6832,6862,1,6912,6988,1,6990,7155,1,7164,7223,1,7227,7241,1,7245,7306,1,7312,7354,1,7357,7367,1,7376,7418,1,7424,7957,1,7960,7965,1,7968,8005,1,8008,8013,1,8016,8023,1,8025,8031,2,8032,8061,1,8064,8116,1,8118,8132,1,8134,8147,1,8150,8155,1,8157,8175,1,8178,8180,1,8182,8190,1,8208,8231,1,8240,8286,1,8304,8305,1,8308,8334,1,8336,8348,1,8352,8384,1,8400,8432,1,8448,8587,1,8592,9257,1,9280,9290,1,9312,11123,1,11126,11157,1,11159,11507,1,11513,11557,1,11559,11565,6,11568,11623,1,11631,11632,1,11647,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,11744,11869,1,11904,11929,1,11931,12019,1,12032,12245,1,12272,12287,1,12289,12351,1,12353,12438,1,12441,12543,1,12549,12591,1,12593,12686,1,12688,12773,1,12783,12830,1,12832,42124,1,42128,42182,1,42192,42539,1,42560,42743,1,42752,42957,1,42960,42961,1,42963,42965,2,42966,42972,1,42994,43052,1,43056,43065,1,43072,43127,1,43136,43205,1,43214,43225,1,43232,43347,1,43359,43388,1,43392,43469,1,43471,43481,1,43486,43518,1,43520,43574,1,43584,43597,1,43600,43609,1,43612,43714,1,43739,43766,1,43777,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,43824,43883,1,43888,44013,1,44016,44025,1,44032,55203,1,55216,55238,1,55243,55291,1,63744,64109,1,64112,64217,1,64256,64262,1,64275,64279,1,64285,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64450,1,64467,64911,1,64914,64967,1,64975,65008,33,65009,65049,1,65056,65106,1,65108,65126,1,65128,65131,1,65136,65140,1,65142,65276,1,65281,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1,65504,65510,1,65512,65518,1,65532,65533,1,65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1,65792,65794,1,65799,65843,1,65847,65934,1,65936,65948,1,65952,66e3,48,66001,66045,1,66176,66204,1,66208,66256,1,66272,66299,1,66304,66339,1,66349,66378,1,66384,66426,1,66432,66461,1,66463,66499,1,66504,66517,1,66560,66717,1,66720,66729,1,66736,66771,1,66776,66811,1,66816,66855,1,66864,66915,1,66927,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,67008,67059,1,67072,67382,1,67392,67413,1,67424,67431,1,67456,67461,1,67463,67504,1,67506,67514,1,67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3,67648,67669,1,67671,67742,1,67751,67759,1,67808,67826,1,67828,67829,1,67835,67867,1,67871,67897,1,67903,67968,65,67969,68023,1,68028,68047,1,68050,68099,1,68101,68102,1,68108,68115,1,68117,68119,1,68121,68149,1,68152,68154,1,68159,68168,1,68176,68184,1,68192,68255,1,68288,68326,1,68331,68342,1,68352,68405,1,68409,68437,1,68440,68466,1,68472,68497,1,68505,68508,1,68521,68527,1,68608,68680,1,68736,68786,1,68800,68850,1,68858,68903,1,68912,68921,1,68928,68965,1,68969,68997,1,69006,69007,1,69216,69246,1,69248,69289,1,69291,69293,1,69296,69297,1,69314,69316,1,69372,69415,1,69424,69465,1,69488,69513,1,69552,69579,1,69600,69622,1,69632,69709,1,69714,69749,1,69759,69820,1,69822,69826,1,69840,69864,1,69872,69881,1,69888,69940,1,69942,69959,1,69968,70006,1,70016,70111,1,70113,70132,1,70144,70161,1,70163,70209,1,70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70313,1,70320,70378,1,70384,70393,1,70400,70403,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70459,70468,1,70471,70472,1,70475,70477,1,70480,70487,7,70493,70499,1,70502,70508,1,70512,70516,1,70528,70537,1,70539,70542,3,70544,70581,1,70583,70592,1,70594,70597,3,70599,70602,1,70604,70613,1,70615,70616,1,70625,70626,1,70656,70747,1,70749,70753,1,70784,70855,1,70864,70873,1,71040,71093,1,71096,71133,1,71168,71236,1,71248,71257,1,71264,71276,1,71296,71353,1,71360,71369,1,71376,71395,1,71424,71450,1,71453,71467,1,71472,71494,1,71680,71739,1,71840,71922,1,71935,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71989,1,71991,71992,1,71995,72006,1,72016,72025,1,72096,72103,1,72106,72151,1,72154,72164,1,72192,72263,1,72272,72354,1,72368,72440,1,72448,72457,1,72640,72673,1,72688,72697,1,72704,72712,1,72714,72758,1,72760,72773,1,72784,72812,1,72816,72847,1,72850,72871,1,72873,72886,1,72960,72966,1,72968,72969,1,72971,73014,1,73018,73020,2,73021,73023,2,73024,73031,1,73040,73049,1,73056,73061,1,73063,73064,1,73066,73102,1,73104,73105,1,73107,73112,1,73120,73129,1,73440,73464,1,73472,73488,1,73490,73530,1,73534,73562,1,73648,73664,16,73665,73713,1,73727,74649,1,74752,74862,1,74864,74868,1,74880,75075,1,77712,77810,1,77824,78895,1,78912,78933,1,78944,82938,1,82944,83526,1,90368,90425,1,92160,92728,1,92736,92766,1,92768,92777,1,92782,92862,1,92864,92873,1,92880,92909,1,92912,92917,1,92928,92997,1,93008,93017,1,93019,93025,1,93027,93047,1,93053,93071,1,93504,93561,1,93760,93850,1,93952,94026,1,94031,94087,1,94095,94111,1,94176,94180,1,94192,94193,1,94208,100343,1,100352,101589,1,101631,101640,1,110576,110579,1,110581,110587,1,110589,110590,1,110592,110882,1,110898,110928,30,110929,110930,1,110933,110948,15,110949,110951,1,110960,111355,1,113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,113820,113823,1,117760,118009,1,118016,118451,1,118528,118573,1,118576,118598,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119154,1,119163,119274,1,119296,119365,1,119488,119507,1,119520,119539,1,119552,119638,1,119648,119672,1,119808,119892,1,119894,119964,1,119966,119967,1,119970,119973,3,119974,119977,3,119978,119980,1,119982,119993,1,119995,119997,2,119998,120003,1,120005,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120094,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120146,120485,1,120488,120779,1,120782,121483,1,121499,121503,1,121505,121519,1,122624,122654,1,122661,122666,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1,122928,122989,1,123023,123136,113,123137,123180,1,123184,123197,1,123200,123209,1,123214,123215,1,123536,123566,1,123584,123641,1,123647,124112,465,124113,124153,1,124368,124410,1,124415,124896,481,124897,124902,1,124904,124907,1,124909,124910,1,124912,124926,1,124928,125124,1,125127,125142,1,125184,125259,1,125264,125273,1,125278,125279,1,126065,126132,1,126209,126269,1,126464,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,126704,126705,1,126976,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127232,127405,1,127462,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130041,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1,917760,917999,1]))},ue=class{static MAX_RUNE=1114111;static MAX_ASCII=127;static MAX_LATIN1=255;static MAX_BMP=65535;static MIN_FOLD=65;static MAX_FOLD=125251;static is32(t,n){let r=0,s=t.length;for(;r<s;){let i=r+Math.floor((s-r)/2),o=t.getLo(i),a=t.getHi(i);if(o<=n&&n<=a){let l=t.getStride(i);return(n-o)%l===0}n<o?s=i:r=i+1}return!1}static is(t,n){if(n<=this.MAX_LATIN1){for(let r=0;r<t.length;r++){let s=t.getHi(r);if(n>s)continue;let i=t.getLo(r);if(n<i)return!1;let o=t.getStride(r);return(n-i)%o===0}return!1}return t.length>0&&n>=t.getLo(0)&&this.is32(t,n)}static isUpper(t){if(t<=this.MAX_LATIN1){let n=String.fromCodePoint(t);return n.toUpperCase()===n&&n.toLowerCase()!==n}return this.is(fn.Upper,t)}static isPrint(t){return t<=this.MAX_LATIN1?t>=32&&t<this.MAX_ASCII||t>=161&&t!==173:this.is(fn.Print,t)}static simpleFold(t){if(fn.CASE_ORBIT.has(t))return fn.CASE_ORBIT.get(t);let n=D.toLowerCase(t);return n!==t?n:D.toUpperCase(t)}static equalsIgnoreCase(t,n){if(t<0||n<0||t===n)return!0;if(t<=this.MAX_ASCII&&n<=this.MAX_ASCII)return D.CODES.get("A")<=t&&t<=D.CODES.get("Z")&&(t|=32),D.CODES.get("A")<=n&&n<=D.CODES.get("Z")&&(n|=32),t===n;for(let r=this.simpleFold(t);r!==t;r=this.simpleFold(r))if(r===n)return!0;return!1}},Te=class{static METACHARACTERS="\\.+*?()|[]{}^$";static EMPTY_BEGIN_LINE=1;static EMPTY_END_LINE=2;static EMPTY_BEGIN_TEXT=4;static EMPTY_END_TEXT=8;static EMPTY_WORD_BOUNDARY=16;static EMPTY_NO_WORD_BOUNDARY=32;static EMPTY_ALL=-1;static emptyInts(){return[]}static isalnum(t){return D.CODES.get("0")<=t&&t<=D.CODES.get("9")||D.CODES.get("a")<=t&&t<=D.CODES.get("z")||D.CODES.get("A")<=t&&t<=D.CODES.get("Z")}static unhex(t){return D.CODES.get("0")<=t&&t<=D.CODES.get("9")?t-D.CODES.get("0"):D.CODES.get("a")<=t&&t<=D.CODES.get("f")?t-D.CODES.get("a")+10:D.CODES.get("A")<=t&&t<=D.CODES.get("F")?t-D.CODES.get("A")+10:-1}static escapeRune(t){let n="";if(ue.isPrint(t))this.METACHARACTERS.indexOf(String.fromCodePoint(t))>=0&&(n+="\\"),n+=String.fromCodePoint(t);else switch(t){case D.CODES.get('"'):n+='\\"';break;case D.CODES.get("\\"):n+="\\\\";break;case D.CODES.get(" "):n+="\\t";break;case D.CODES.get(`
164
- `):n+="\\n";break;case D.CODES.get("\r"):n+="\\r";break;case D.CODES.get("\b"):n+="\\b";break;case D.CODES.get("\f"):n+="\\f";break;default:{let r=t.toString(16);t<256?(n+="\\x",r.length===1&&(n+="0"),n+=r):n+=`\\x{${r}}`;break}}return n}static stringToRunes(t){return String(t).split("").map(n=>n.codePointAt(0))}static runeToString(t){return String.fromCodePoint(t)}static isWordRune(t){return D.CODES.get("a")<=t&&t<=D.CODES.get("z")||D.CODES.get("A")<=t&&t<=D.CODES.get("Z")||D.CODES.get("0")<=t&&t<=D.CODES.get("9")||t===D.CODES.get("_")}static emptyOpContext(t,n){let r=0;return t<0&&(r|=this.EMPTY_BEGIN_TEXT|this.EMPTY_BEGIN_LINE),t===D.CODES.get(`
165
- `)&&(r|=this.EMPTY_BEGIN_LINE),n<0&&(r|=this.EMPTY_END_TEXT|this.EMPTY_END_LINE),n===D.CODES.get(`
166
- `)&&(r|=this.EMPTY_END_LINE),this.isWordRune(t)!==this.isWordRune(n)?r|=this.EMPTY_WORD_BOUNDARY:r|=this.EMPTY_NO_WORD_BOUNDARY,r}static quoteMeta(t){return t.split("").map(n=>this.METACHARACTERS.indexOf(n)>=0?`\\${n}`:n).join("")}static charCount(t){return t>ue.MAX_BMP?2:1}static stringToUtf8ByteArray(t){if(globalThis.TextEncoder)return Array.from(new TextEncoder().encode(t));{let n=[],r=0;for(let s=0;s<t.length;s++){let i=t.charCodeAt(s);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=i&63|128):(i&64512)===55296&&s+1<t.length&&(t.charCodeAt(s+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=i&63|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=i&63|128)}return n}}static utf8ByteArrayToString(t){if(globalThis.TextDecoder)return new TextDecoder("utf-8").decode(new Uint8Array(t));{let n=[],r=0,s=0;for(;r<t.length;){let i=t[r++];if(i<128)n[s++]=String.fromCharCode(i);else if(i>191&&i<224){let o=t[r++];n[s++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){let o=t[r++],a=t[r++],l=t[r++],c=((i&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;n[s++]=String.fromCharCode(55296+(c>>10)),n[s++]=String.fromCharCode(56320+(c&1023))}else{let o=t[r++],a=t[r++];n[s++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return n.join("")}}},ep=(e=[],t=0)=>{let n={};for(let r=0;r<e.length;r++){let s=e[r],i=t+r;n[s]=i,n[i]=s}return Object.freeze(n)},lr=class e{static Encoding=ep(["UTF_16","UTF_8"]);getEncoding(){throw Error("not implemented")}isUTF8Encoding(){return this.getEncoding()===e.Encoding.UTF_8}isUTF16Encoding(){return this.getEncoding()===e.Encoding.UTF_16}},Vi=class extends lr{constructor(t=null){super(),this.bytes=t}getEncoding(){return lr.Encoding.UTF_8}asCharSequence(){return Te.utf8ByteArrayToString(this.bytes)}asBytes(){return this.bytes}length(){return this.bytes.length}},el=class extends lr{constructor(t=null){super(),this.charSequence=t}getEncoding(){return lr.Encoding.UTF_16}asCharSequence(){return this.charSequence}asBytes(){return this.charSequence.toString().split("").map(t=>t.codePointAt(0))}length(){return this.charSequence.length}},ls=class{static utf16(t){return new el(t)}static utf8(t){return Array.isArray(t)?new Vi(t):new Vi(Te.stringToUtf8ByteArray(t))}},Bn=class{static EOF(){return-8}canCheckPrefix(){return!0}endPos(){return this.end}},tl=class extends Bn{constructor(t,n=0,r=t.length){super(),this.bytes=t,this.start=n,this.end=r}step(t){if(t+=this.start,t>=this.end)return Bn.EOF();let n=this.bytes[t++]&255;return(n&128)===0?n<<3|1:(n&224)===192?(n=n&31,t>=this.end?Bn.EOF():(n=n<<6|this.bytes[t++]&63,n<<3|2)):(n&240)===224?(n=n&15,t+1>=this.end?Bn.EOF():(n=n<<6|this.bytes[t++]&63,n=n<<6|this.bytes[t++]&63,n<<3|3)):(n=n&7,t+2>=this.end?Bn.EOF():(n=n<<6|this.bytes[t++]&63,n=n<<6|this.bytes[t++]&63,n=n<<6|this.bytes[t++]&63,n<<3|4))}index(t,n){n+=this.start;let r=this.indexOf(this.bytes,t.prefixUTF8,n);return r<0?r:r-n}context(t){t+=this.start;let n=-1;if(t>this.start&&t<=this.end){let s=t-1;if(n=this.bytes[s--],n>=128){let i=t-4;for(i<this.start&&(i=this.start);s>=i&&(this.bytes[s]&192)===128;)s--;s<this.start&&(s=this.start),n=this.step(s)>>3}}let r=t<this.end?this.step(t)>>3:-1;return Te.emptyOpContext(n,r)}indexOf(t,n,r=0){let s=n.length;if(s===0)return-1;let i=t.length;for(let o=r;o<=i-s;o++)for(let a=0;a<s&&t[o+a]===n[a];a++)if(a===s-1)return o;return-1}},nl=class extends Bn{constructor(t,n=0,r=t.length){super(),this.charSequence=t,this.start=n,this.end=r}step(t){if(t+=this.start,t<this.end){let n=this.charSequence.codePointAt(t);return n<<3|Te.charCount(n)}else return Bn.EOF()}index(t,n){n+=this.start;let r=this.charSequence.indexOf(t.prefix,n);return r<0?r:r-n}context(t){t+=this.start;let n=t>0&&t<=this.charSequence.length?this.charSequence.codePointAt(t-1):-1,r=t<this.charSequence.length?this.charSequence.codePointAt(t):-1;return Te.emptyOpContext(n,r)}},Ye=class{static fromUTF8(t,n=0,r=t.length){return new tl(t,n,r)}static fromUTF16(t,n=0,r=t.length){return new nl(t,n,r)}},cs=class extends Error{constructor(t){super(t),this.name="RE2JSException"}},je=class extends cs{constructor(t,n=null){let r=`error parsing regexp: ${t}`;n&&(r+=`: \`${n}\``),super(r),this.name="RE2JSSyntaxException",this.message=r,this.error=t,this.input=n}getDescription(){return this.error}getPattern(){return this.input}},rl=class extends cs{constructor(t){super(t),this.name="RE2JSCompileException"}},An=class extends cs{constructor(t){super(t),this.name="RE2JSGroupException"}},sl=class extends cs{constructor(t){super(t),this.name="RE2JSFlagsException"}},qi=class{static quoteReplacement(t,n=!1){return n?t.indexOf("\\")<0&&t.indexOf("$")<0?t:t.split("").map(r=>{let s=r.codePointAt(0);return s===D.CODES.get("\\")||s===D.CODES.get("$")?`\\${r}`:r}).join(""):t.indexOf("$")<0?t:t.split("").map(r=>r.codePointAt(0)===D.CODES.get("$")?"$$":r).join("")}constructor(t,n){if(t===null)throw new Error("pattern is null");this.patternInput=t;let r=this.patternInput.re2();this.patternGroupCount=r.numberOfCapturingGroups(),this.groups=[],this.namedGroups=r.namedGroups,this.numberOfInstructions=r.numberOfInstructions(),n instanceof lr?this.resetMatcherInput(n):Array.isArray(n)?this.resetMatcherInput(ls.utf8(n)):this.resetMatcherInput(ls.utf16(n))}pattern(){return this.patternInput}reset(){return this.matcherInputLength=this.matcherInput.length(),this.appendPos=0,this.hasMatch=!1,this.hasGroups=!1,this.anchorFlag=0,this}resetMatcherInput(t){if(t===null)throw new Error("input is null");return this.matcherInput=t,this.reset(),this}start(t=0){if(typeof t=="string"){let n=this.namedGroups[t];if(!Number.isFinite(n))throw new An(`group '${t}' not found`);t=n}return this.loadGroup(t),this.groups[2*t]}end(t=0){if(typeof t=="string"){let n=this.namedGroups[t];if(!Number.isFinite(n))throw new An(`group '${t}' not found`);t=n}return this.loadGroup(t),this.groups[2*t+1]}programSize(){return this.numberOfInstructions}group(t=0){if(typeof t=="string"){let s=this.namedGroups[t];if(!Number.isFinite(s))throw new An(`group '${t}' not found`);t=s}let n=this.start(t),r=this.end(t);return n<0&&r<0?null:this.substring(n,r)}groupCount(){return this.patternGroupCount}loadGroup(t){if(t<0||t>this.patternGroupCount)throw new An(`Group index out of bounds: ${t}`);if(!this.hasMatch)throw new An("perhaps no match attempted");if(t===0||this.hasGroups)return;let n=this.groups[1]+1;n>this.matcherInputLength&&(n=this.matcherInputLength);let r=this.patternInput.re2().matchMachineInput(this.matcherInput,this.groups[0],n,this.anchorFlag,1+this.patternGroupCount);if(!r[0])throw new An("inconsistency in matching group data");this.groups=r[1],this.hasGroups=!0}matches(){return this.genMatch(0,G.ANCHOR_BOTH)}lookingAt(){return this.genMatch(0,G.ANCHOR_START)}find(t=null){if(t!==null){if(t<0||t>this.matcherInputLength)throw new An(`start index out of bounds: ${t}`);return this.reset(),this.genMatch(t,0)}return t=0,this.hasMatch&&(t=this.groups[1],this.groups[0]===this.groups[1]&&t++),this.genMatch(t,G.UNANCHORED)}genMatch(t,n){let r=this.patternInput.re2().matchMachineInput(this.matcherInput,t,this.matcherInputLength,n,1);return r[0]?(this.groups=r[1],this.hasMatch=!0,this.hasGroups=!1,this.anchorFlag=n,!0):!1}substring(t,n){return this.matcherInput.isUTF8Encoding()?Te.utf8ByteArrayToString(this.matcherInput.asBytes().slice(t,n)):this.matcherInput.asCharSequence().substring(t,n).toString()}inputLength(){return this.matcherInputLength}appendReplacement(t,n=!1){let r="",s=this.start(),i=this.end();return this.appendPos<s&&(r+=this.substring(this.appendPos,s)),this.appendPos=i,r+=n?this.appendReplacementInternalJava(t):this.appendReplacementInternalJs(t),r}appendReplacementInternalJava(t){let n="",r=0,s=t.length;for(let i=0;i<s-1;i++){if(t.codePointAt(i)===D.CODES.get("\\")){r<i&&(n+=t.substring(r,i)),i++,r=i;continue}if(t.codePointAt(i)===D.CODES.get("$")){let o=t.codePointAt(i+1);if(D.CODES.get("0")<=o&&o<=D.CODES.get("9")){let a=o-D.CODES.get("0");for(r<i&&(n+=t.substring(r,i)),i+=2;i<s&&(o=t.codePointAt(i),!(o<D.CODES.get("0")||o>D.CODES.get("9")||a*10+o-D.CODES.get("0")>this.patternGroupCount));i++)a=a*10+o-D.CODES.get("0");if(a>this.patternGroupCount)throw new An(`n > number of groups: ${a}`);let l=this.group(a);l!==null&&(n+=l),r=i,i--;continue}else if(o===D.CODES.get("{")){r<i&&(n+=t.substring(r,i)),i++;let a=i+1;for(;a<t.length&&t.codePointAt(a)!==D.CODES.get("}")&&t.codePointAt(a)!==D.CODES.get(" ");)a++;if(a===t.length||t.codePointAt(a)!==D.CODES.get("}"))throw new An("named capture group is missing trailing '}'");let l=t.substring(i+1,a);n+=this.group(l),r=a+1}}}return r<s&&(n+=t.substring(r,s)),n}appendReplacementInternalJs(t){let n="",r=0,s=t.length;for(let i=0;i<s-1;i++)if(t.codePointAt(i)===D.CODES.get("$")){let o=t.codePointAt(i+1);if(D.CODES.get("$")===o){r<i&&(n+=t.substring(r,i)),n+="$",i++,r=i+1;continue}else if(D.CODES.get("&")===o){r<i&&(n+=t.substring(r,i));let a=this.group(0);a!==null?n+=a:n+="$&",i++,r=i+1;continue}else if(D.CODES.get("1")<=o&&o<=D.CODES.get("9")){let a=o-D.CODES.get("0");for(r<i&&(n+=t.substring(r,i)),i+=2;i<s&&(o=t.codePointAt(i),!(o<D.CODES.get("0")||o>D.CODES.get("9")||a*10+o-D.CODES.get("0")>this.patternGroupCount));i++)a=a*10+o-D.CODES.get("0");if(a>this.patternGroupCount){n+=`$${a}`,r=i,i--;continue}let l=this.group(a);l!==null&&(n+=l),r=i,i--;continue}else if(o===D.CODES.get("<")){r<i&&(n+=t.substring(r,i)),i++;let a=i+1;for(;a<t.length&&t.codePointAt(a)!==D.CODES.get(">")&&t.codePointAt(a)!==D.CODES.get(" ");)a++;if(a===t.length||t.codePointAt(a)!==D.CODES.get(">")){n+=t.substring(i-1,a+1),r=a+1;continue}let l=t.substring(i+1,a);Object.prototype.hasOwnProperty.call(this.namedGroups,l)?n+=this.group(l):n+=`$<${l}>`,r=a+1}}return r<s&&(n+=t.substring(r,s)),n}appendTail(){return this.substring(this.appendPos,this.matcherInputLength)}replaceAll(t,n=!1){return this.replace(t,!0,n)}replaceFirst(t,n=!1){return this.replace(t,!1,n)}replace(t,n=!0,r=!1){let s="";for(this.reset();this.find()&&(s+=this.appendReplacement(t,r),!!n););return s+=this.appendTail(),s}},de=class e{static ALT=1;static ALT_MATCH=2;static CAPTURE=3;static EMPTY_WIDTH=4;static FAIL=5;static MATCH=6;static NOP=7;static RUNE=8;static RUNE1=9;static RUNE_ANY=10;static RUNE_ANY_NOT_NL=11;static isRuneOp(t){return e.RUNE<=t&&t<=e.RUNE_ANY_NOT_NL}static escapeRunes(t){let n='"';for(let r of t)n+=Te.escapeRune(r);return n+='"',n}constructor(t){this.op=t,this.out=0,this.arg=0,this.runes=[]}matchRune(t){if(this.runes.length===1){let s=this.runes[0];return(this.arg&G.FOLD_CASE)!==0?ue.equalsIgnoreCase(s,t):t===s}for(let s=0;s<this.runes.length&&s<=8;s+=2){if(t<this.runes[s])return!1;if(t<=this.runes[s+1])return!0}let n=0,r=this.runes.length/2|0;for(;n<r;){let s=n+((r-n)/2|0);if(this.runes[2*s]<=t){if(t<=this.runes[2*s+1])return!0;n=s+1}else r=s}return!1}toString(){switch(this.op){case e.ALT:return`alt -> ${this.out}, ${this.arg}`;case e.ALT_MATCH:return`altmatch -> ${this.out}, ${this.arg}`;case e.CAPTURE:return`cap ${this.arg} -> ${this.out}`;case e.EMPTY_WIDTH:return`empty ${this.arg} -> ${this.out}`;case e.MATCH:return"match";case e.FAIL:return"fail";case e.NOP:return`nop -> ${this.out}`;case e.RUNE:return this.runes===null?"rune <null>":["rune ",e.escapeRunes(this.runes),(this.arg&G.FOLD_CASE)!==0?"/i":""," -> ",this.out].join("");case e.RUNE1:return`rune1 ${e.escapeRunes(this.runes)} -> ${this.out}`;case e.RUNE_ANY:return`any -> ${this.out}`;case e.RUNE_ANY_NOT_NL:return`anynotnl -> ${this.out}`;default:throw new Error("unhandled case in Inst.toString")}}},il=class{constructor(){this.inst=null,this.cap=[]}},Zi=class{constructor(){this.sparse=[],this.densePcs=[],this.denseThreads=[],this.size=0}contains(t){let n=this.sparse[t];return n<this.size&&this.densePcs[n]===t}isEmpty(){return this.size===0}add(t){let n=this.size++;return this.sparse[t]=n,this.denseThreads[n]=null,this.densePcs[n]=t,n}clear(){this.sparse=[],this.densePcs=[],this.denseThreads=[],this.size=0}toString(){let t="{";for(let n=0;n<this.size;n++)n!==0&&(t+=", "),t+=this.densePcs[n];return t+="}",t}},Qs=class e{static fromRE2(t){let n=new e;return n.prog=t.prog,n.re2=t,n.q0=new Zi(n.prog.numInst()),n.q1=new Zi(n.prog.numInst()),n.pool=[],n.poolSize=0,n.matched=!1,n.matchcap=Array(n.prog.numCap<2?2:n.prog.numCap).fill(0),n.ncap=0,n}static fromMachine(t){let n=new e;return n.re2=t.re2,n.prog=t.prog,n.q0=t.q0,n.q1=t.q1,n.pool=t.pool,n.poolSize=t.poolSize,n.matched=t.matched,n.matchcap=t.matchcap,n.ncap=t.ncap,n}init(t){this.ncap=t,t>this.matchcap.length?this.initNewCap(t):this.resetCap(t)}resetCap(t){for(let n=0;n<this.poolSize;n++){let r=this.pool[n];r.cap=Array(t).fill(0)}}initNewCap(t){for(let n=0;n<this.poolSize;n++){let r=this.pool[n];r.cap=Array(t).fill(0)}this.matchcap=Array(t).fill(0)}submatches(){return this.ncap===0?Te.emptyInts():this.matchcap.slice(0,this.ncap)}alloc(t){let n;return this.poolSize>0?(this.poolSize--,n=this.pool[this.poolSize]):n=new il,n.inst=t,n}freeQueue(t,n=0){let r=t.size-n,s=this.poolSize+r;this.pool.length<s&&(this.pool=this.pool.slice(0,Math.max(this.pool.length*2,s)));for(let i=n;i<t.size;i++){let o=t.denseThreads[i];o!==null&&(this.pool[this.poolSize]=o,this.poolSize++)}t.clear()}freeThread(t){this.pool.length<=this.poolSize&&(this.pool=this.pool.slice(0,this.pool.length*2)),this.pool[this.poolSize]=t,this.poolSize++}match(t,n,r){let s=this.re2.cond;if(s===Te.EMPTY_ALL||(r===G.ANCHOR_START||r===G.ANCHOR_BOTH)&&n!==0)return!1;this.matched=!1,this.matchcap=Array(this.prog.numCap).fill(-1);let i=this.q0,o=this.q1,a=t.step(n),l=a>>3,c=a&7,u=-1,f=0;a!==Bn.EOF()&&(a=t.step(n+c),u=a>>3,f=a&7);let p;for(n===0?p=Te.emptyOpContext(-1,l):p=t.context(n);;){if(i.isEmpty()){if((s&Te.EMPTY_BEGIN_TEXT)!==0&&n!==0||this.matched)break;if(this.re2.prefix.length!==0&&u!==this.re2.prefixRune&&t.canCheckPrefix()){let m=t.index(this.re2,n);if(m<0)break;n+=m,a=t.step(n),l=a>>3,c=a&7,a=t.step(n+c),u=a>>3,f=a&7}}!this.matched&&(n===0||r===G.UNANCHORED)&&(this.ncap>0&&(this.matchcap[0]=n),this.add(i,this.prog.start,n,this.matchcap,p,null));let h=n+c;if(p=t.context(h),this.step(i,o,n,h,l,p,r,n===t.endPos()),c===0||this.ncap===0&&this.matched)break;n+=c,l=u,c=f,l!==-1&&(a=t.step(n+c),u=a>>3,f=a&7);let d=i;i=o,o=d}return this.freeQueue(o),this.matched}step(t,n,r,s,i,o,a,l){let c=this.re2.longest;for(let u=0;u<t.size;u++){let f=t.denseThreads[u];if(f===null)continue;if(c&&this.matched&&this.ncap>0&&this.matchcap[0]<f.cap[0]){this.freeThread(f);continue}let p=f.inst,h=!1;switch(p.op){case de.MATCH:if(a===G.ANCHOR_BOTH&&!l)break;this.ncap>0&&(!c||!this.matched||this.matchcap[1]<r)&&(f.cap[1]=r,this.matchcap=f.cap.slice(0,this.ncap)),c||this.freeQueue(t,u+1),this.matched=!0;break;case de.RUNE:h=p.matchRune(i);break;case de.RUNE1:h=i===p.runes[0];break;case de.RUNE_ANY:h=!0;break;case de.RUNE_ANY_NOT_NL:h=i!==D.CODES.get(`
167
- `);break;default:throw new Error("bad inst")}h&&(f=this.add(n,p.out,s,f.cap,o,f)),f!==null&&(this.freeThread(f),t.denseThreads[u]=null)}t.clear()}add(t,n,r,s,i,o){if(n===0||t.contains(n))return o;let a=t.add(n),l=this.prog.inst[n];switch(l.op){case de.FAIL:break;case de.ALT:case de.ALT_MATCH:o=this.add(t,l.out,r,s,i,o),o=this.add(t,l.arg,r,s,i,o);break;case de.EMPTY_WIDTH:(l.arg&~i)===0&&(o=this.add(t,l.out,r,s,i,o));break;case de.NOP:o=this.add(t,l.out,r,s,i,o);break;case de.CAPTURE:if(l.arg<this.ncap){let c=s[l.arg];s[l.arg]=r,this.add(t,l.out,r,s,i,null),s[l.arg]=c}else o=this.add(t,l.out,r,s,i,o);break;case de.MATCH:case de.RUNE:case de.RUNE1:case de.RUNE_ANY:case de.RUNE_ANY_NOT_NL:o===null?o=this.alloc(l):o.inst=l,this.ncap>0&&o.cap!==s&&(o.cap=s.slice(0,this.ncap)),t.denseThreads[a]=o,o=null;break;default:throw new Error("unhandled")}return o}},R3=e=>{let t=-2128831035;for(let n=0;n<e.length;n++)t^=e[n],t=Math.imul(t,16777619);return t},P3=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},ol=class{constructor(t,n){this.nfaStates=t,this.isMatch=n,this.nextAscii=new Array(ue.MAX_ASCII+1).fill(null),this.nextMap=new Map}},al=class{constructor(t){this.prog=t,this.stateCache=new Map,this.stateCount=0,this.startState=null,this.stateLimit=1e4}computeClosure(t){let n=new Set,r=[...t],s=!1;for(;r.length>0;){let o=r.pop();if(n.has(o))continue;n.add(o);let a=this.prog.getInst(o);switch(a.op){case de.MATCH:s=!0;break;case de.ALT:case de.ALT_MATCH:r.push(a.out),r.push(a.arg);break;case de.NOP:case de.CAPTURE:r.push(a.out);break;case de.EMPTY_WIDTH:return null}}return{pcs:Int32Array.from(n).sort(),isMatch:s}}getState(t){let n=this.computeClosure(t);if(!n)return null;let r=n.pcs,s=R3(r),i=this.stateCache.get(s);if(i)for(let a=0;a<i.length;a++){let l=i[a];if(P3(l.nfaStates,r))return l}else i=[],this.stateCache.set(s,i);if(this.stateCount>=this.stateLimit)return this.stateCache.clear(),this.stateCount=0,this.startState=null,null;let o=new ol(r,n.isMatch);return i.push(o),this.stateCount++,o}step(t,n,r){if(r===G.UNANCHORED&&n<=ue.MAX_ASCII){let o=t.nextAscii[n];if(o!==null)return o}else{let o=n+(r===G.UNANCHORED?0:ue.MAX_RUNE+1);if(t.nextMap.has(o))return t.nextMap.get(o)}let s=[];for(let o=0;o<t.nfaStates.length;o++){let a=t.nfaStates[o],l=this.prog.getInst(a);de.isRuneOp(l.op)&&l.matchRune(n)&&s.push(l.out)}r===G.UNANCHORED&&s.push(this.prog.start);let i=this.getState(s);if(r===G.UNANCHORED&&n<=ue.MAX_ASCII)t.nextAscii[n]=i;else{let o=n+(r===G.UNANCHORED?0:ue.MAX_RUNE+1);t.nextMap.set(o,i)}return i}match(t,n,r){if((r===G.ANCHOR_START||r===G.ANCHOR_BOTH)&&n!==0)return!1;if(!this.startState&&(this.startState=this.getState([this.prog.start]),!this.startState))return null;let s=t.endPos(),i=this.startState;if(i.isMatch)if(r===G.ANCHOR_BOTH){if(n===s)return!0}else return!0;let o=n;for(;o<s;){let a=t.step(o),l=a>>3,c=a&7;if(c===0)break;if(i=this.step(i,l,r),i===null)return null;if(i.isMatch)if(r===G.ANCHOR_BOTH){if(o+c===s)return!0}else return!0;if(i.nfaStates.length===0&&r!==G.UNANCHORED)return!1;o+=c}return!1}},F=class e{static Op=ep(["NO_MATCH","EMPTY_MATCH","LITERAL","CHAR_CLASS","ANY_CHAR_NOT_NL","ANY_CHAR","BEGIN_LINE","END_LINE","BEGIN_TEXT","END_TEXT","WORD_BOUNDARY","NO_WORD_BOUNDARY","CAPTURE","STAR","PLUS","QUEST","REPEAT","CONCAT","ALTERNATE","LEFT_PAREN","VERTICAL_BAR"]);static isPseudoOp(t){return t>=e.Op.LEFT_PAREN}static emptySubs(){return[]}static quoteIfHyphen(t){return t===D.CODES.get("-")?"\\":""}static fromRegexp(t){let n=new e(t.op);return n.flags=t.flags,n.subs=t.subs,n.runes=t.runes,n.cap=t.cap,n.min=t.min,n.max=t.max,n.name=t.name,n.namedGroups=t.namedGroups,n}constructor(t){this.op=t,this.flags=0,this.subs=e.emptySubs(),this.runes=[],this.min=0,this.max=0,this.cap=0,this.name=null,this.namedGroups={}}reinit(){this.flags=0,this.subs=e.emptySubs(),this.runes=[],this.cap=0,this.min=0,this.max=0,this.name=null,this.namedGroups={}}toString(){return this.appendTo()}appendTo(){let t="";switch(this.op){case e.Op.NO_MATCH:t+="[^\\x00-\\x{10FFFF}]";break;case e.Op.EMPTY_MATCH:t+="(?:)";break;case e.Op.STAR:case e.Op.PLUS:case e.Op.QUEST:case e.Op.REPEAT:{let n=this.subs[0];switch(n.op>e.Op.CAPTURE||n.op===e.Op.LITERAL&&n.runes.length>1?t+=`(?:${n.appendTo()})`:t+=n.appendTo(),this.op){case e.Op.STAR:t+="*";break;case e.Op.PLUS:t+="+";break;case e.Op.QUEST:t+="?";break;case e.Op.REPEAT:t+=`{${this.min}`,this.min!==this.max&&(t+=",",this.max>=0&&(t+=this.max)),t+="}";break}(this.flags&G.NON_GREEDY)!==0&&(t+="?");break}case e.Op.CONCAT:{for(let n of this.subs)n.op===e.Op.ALTERNATE?t+=`(?:${n.appendTo()})`:t+=n.appendTo();break}case e.Op.ALTERNATE:{let n="";for(let r of this.subs)t+=n,n="|",t+=r.appendTo();break}case e.Op.LITERAL:(this.flags&G.FOLD_CASE)!==0&&(t+="(?i:");for(let n of this.runes)t+=Te.escapeRune(n);(this.flags&G.FOLD_CASE)!==0&&(t+=")");break;case e.Op.ANY_CHAR_NOT_NL:t+="(?-s:.)";break;case e.Op.ANY_CHAR:t+="(?s:.)";break;case e.Op.CAPTURE:this.name===null||this.name.length===0?t+="(":t+=`(?P<${this.name}>`,this.subs[0].op!==e.Op.EMPTY_MATCH&&(t+=this.subs[0].appendTo()),t+=")";break;case e.Op.BEGIN_TEXT:t+="\\A";break;case e.Op.END_TEXT:(this.flags&G.WAS_DOLLAR)!==0?t+="(?-m:$)":t+="\\z";break;case e.Op.BEGIN_LINE:t+="^";break;case e.Op.END_LINE:t+="$";break;case e.Op.WORD_BOUNDARY:t+="\\b";break;case e.Op.NO_WORD_BOUNDARY:t+="\\B";break;case e.Op.CHAR_CLASS:if(this.runes.length%2!==0){t+="[invalid char class]";break}if(t+="[",this.runes.length===0)t+="^\\x00-\\x{10FFFF}";else if(this.runes[0]===0&&this.runes[this.runes.length-1]===ue.MAX_RUNE){t+="^";for(let n=1;n<this.runes.length-1;n+=2){let r=this.runes[n]+1,s=this.runes[n+1]-1;t+=e.quoteIfHyphen(r),t+=Te.escapeRune(r),r!==s&&(t+="-",t+=e.quoteIfHyphen(s),t+=Te.escapeRune(s))}}else for(let n=0;n<this.runes.length;n+=2){let r=this.runes[n],s=this.runes[n+1];t+=e.quoteIfHyphen(r),t+=Te.escapeRune(r),r!==s&&(t+="-",t+=e.quoteIfHyphen(s),t+=Te.escapeRune(s))}t+="]";break;default:t+=this.op;break}return t}maxCap(){let t=0;if(this.op===e.Op.CAPTURE&&(t=this.cap),this.subs!==null)for(let n of this.subs){let r=n.maxCap();t<r&&(t=r)}return t}equals(t){if(!(t!==null&&t instanceof e)||this.op!==t.op)return!1;switch(this.op){case e.Op.END_TEXT:{if((this.flags&G.WAS_DOLLAR)!==(t.flags&G.WAS_DOLLAR))return!1;break}case e.Op.LITERAL:case e.Op.CHAR_CLASS:{if(this.runes===null&&t.runes===null)break;if(this.runes===null||t.runes===null||this.runes.length!==t.runes.length)return!1;for(let n=0;n<this.runes.length;n++)if(this.runes[n]!==t.runes[n])return!1;break}case e.Op.ALTERNATE:case e.Op.CONCAT:{if(this.subs.length!==t.subs.length)return!1;for(let n=0;n<this.subs.length;++n)if(!this.subs[n].equals(t.subs[n]))return!1;break}case e.Op.STAR:case e.Op.PLUS:case e.Op.QUEST:{if((this.flags&G.NON_GREEDY)!==(t.flags&G.NON_GREEDY)||!this.subs[0].equals(t.subs[0]))return!1;break}case e.Op.REPEAT:{if((this.flags&G.NON_GREEDY)!==(t.flags&G.NON_GREEDY)||this.min!==t.min||this.max!==t.max||!this.subs[0].equals(t.subs[0]))return!1;break}case e.Op.CAPTURE:{if(this.cap!==t.cap||(this.name===null?t.name!==null:this.name!==t.name)||!this.subs[0].equals(t.subs[0]))return!1;break}}return!0}},ll=class{constructor(){this.inst=[],this.start=0,this.numCap=2}getInst(t){return this.inst[t]}numInst(){return this.inst.length}addInst(t){this.inst.push(new de(t))}skipNop(t){let n=this.inst[t];for(;n.op===de.NOP||n.op===de.CAPTURE;)n=this.inst[t],t=n.out;return n}prefix(){let t="",n=this.skipNop(this.start);if(!de.isRuneOp(n.op)||n.runes.length!==1)return[n.op===de.MATCH,t];for(;de.isRuneOp(n.op)&&n.runes.length===1&&(n.arg&G.FOLD_CASE)===0;)t+=String.fromCodePoint(n.runes[0]),n=this.skipNop(n.out);return[n.op===de.MATCH,t]}startCond(){let t=0,n=this.start;e:for(;;){let r=this.inst[n];switch(r.op){case de.EMPTY_WIDTH:t|=r.arg;break;case de.FAIL:return-1;case de.CAPTURE:case de.NOP:break;default:break e}n=r.out}return t}next(t){let n=this.inst[t>>1];return(t&1)===0?n.out:n.arg}patch(t,n){for(;t!==0;){let r=this.inst[t>>1];(t&1)===0?(t=r.out,r.out=n):(t=r.arg,r.arg=n)}}append(t,n){if(t===0)return n;if(n===0)return t;let r=t;for(;;){let i=this.next(r);if(i===0)break;r=i}let s=this.inst[r>>1];return(r&1)===0?s.out=n:s.arg=n,t}toString(){let t="";for(let n=0;n<this.inst.length;n++){let r=t.length;t+=n,n===this.start&&(t+="*"),t+=" ".substring(t.length-r),t+=this.inst[n],t+=`
168
- `}return t}},as=class{constructor(t=0,n=0,r=!1){this.i=t,this.out=n,this.nullable=r}},cl=class e{static ANY_RUNE_NOT_NL(){return[0,D.CODES.get(`
169
- `)-1,D.CODES.get(`
170
- `)+1,ue.MAX_RUNE]}static ANY_RUNE(){return[0,ue.MAX_RUNE]}static compileRegexp(t){let n=new e,r=n.compile(t);return n.prog.patch(r.out,n.newInst(de.MATCH).i),n.prog.start=r.i,n.prog}constructor(){this.prog=new ll,this.newInst(de.FAIL)}newInst(t){return this.prog.addInst(t),new as(this.prog.numInst()-1,0,!0)}nop(){let t=this.newInst(de.NOP);return t.out=t.i<<1,t}fail(){return new as}cap(t){let n=this.newInst(de.CAPTURE);return n.out=n.i<<1,this.prog.getInst(n.i).arg=t,this.prog.numCap<t+1&&(this.prog.numCap=t+1),n}cat(t,n){return t.i===0||n.i===0?this.fail():(this.prog.patch(t.out,n.i),new as(t.i,n.out,t.nullable&&n.nullable))}alt(t,n){if(t.i===0)return n;if(n.i===0)return t;let r=this.newInst(de.ALT),s=this.prog.getInst(r.i);return s.out=t.i,s.arg=n.i,r.out=this.prog.append(t.out,n.out),r.nullable=t.nullable||n.nullable,r}loop(t,n){let r=this.newInst(de.ALT),s=this.prog.getInst(r.i);return n?(s.arg=t.i,r.out=r.i<<1):(s.out=t.i,r.out=r.i<<1|1),this.prog.patch(t.out,r.i),r}quest(t,n){let r=this.newInst(de.ALT),s=this.prog.getInst(r.i);return n?(s.arg=t.i,r.out=r.i<<1):(s.out=t.i,r.out=r.i<<1|1),r.out=this.prog.append(r.out,t.out),r}star(t,n){return t.nullable?this.quest(this.plus(t,n),n):this.loop(t,n)}plus(t,n){return new as(t.i,this.loop(t,n).out,t.nullable)}empty(t){let n=this.newInst(de.EMPTY_WIDTH);return this.prog.getInst(n.i).arg=t,n.out=n.i<<1,n}rune(t,n){let r=this.newInst(de.RUNE);r.nullable=!1;let s=this.prog.getInst(r.i);return s.runes=t,n&=G.FOLD_CASE,(t.length!==1||ue.simpleFold(t[0])===t[0])&&(n&=-2),s.arg=n,r.out=r.i<<1,(n&G.FOLD_CASE)===0&&t.length===1||t.length===2&&t[0]===t[1]?s.op=de.RUNE1:t.length===2&&t[0]===0&&t[1]===ue.MAX_RUNE?s.op=de.RUNE_ANY:t.length===4&&t[0]===0&&t[1]===D.CODES.get(`
171
- `)-1&&t[2]===D.CODES.get(`
172
- `)+1&&t[3]===ue.MAX_RUNE&&(s.op=de.RUNE_ANY_NOT_NL),r}compile(t){switch(t.op){case F.Op.NO_MATCH:return this.fail();case F.Op.EMPTY_MATCH:return this.nop();case F.Op.LITERAL:if(t.runes.length===0)return this.nop();{let n=null;for(let r of t.runes){let s=this.rune([r],t.flags);n=n===null?s:this.cat(n,s)}return n}case F.Op.CHAR_CLASS:return this.rune(t.runes,t.flags);case F.Op.ANY_CHAR_NOT_NL:return this.rune(e.ANY_RUNE_NOT_NL(),0);case F.Op.ANY_CHAR:return this.rune(e.ANY_RUNE(),0);case F.Op.BEGIN_LINE:return this.empty(Te.EMPTY_BEGIN_LINE);case F.Op.END_LINE:return this.empty(Te.EMPTY_END_LINE);case F.Op.BEGIN_TEXT:return this.empty(Te.EMPTY_BEGIN_TEXT);case F.Op.END_TEXT:return this.empty(Te.EMPTY_END_TEXT);case F.Op.WORD_BOUNDARY:return this.empty(Te.EMPTY_WORD_BOUNDARY);case F.Op.NO_WORD_BOUNDARY:return this.empty(Te.EMPTY_NO_WORD_BOUNDARY);case F.Op.CAPTURE:{let n=this.cap(t.cap<<1),r=this.compile(t.subs[0]),s=this.cap(t.cap<<1|1);return this.cat(this.cat(n,r),s)}case F.Op.STAR:return this.star(this.compile(t.subs[0]),(t.flags&G.NON_GREEDY)!==0);case F.Op.PLUS:return this.plus(this.compile(t.subs[0]),(t.flags&G.NON_GREEDY)!==0);case F.Op.QUEST:return this.quest(this.compile(t.subs[0]),(t.flags&G.NON_GREEDY)!==0);case F.Op.CONCAT:{if(t.subs.length===0)return this.nop();{let n=null;for(let r of t.subs){let s=this.compile(r);n=n===null?s:this.cat(n,s)}return n}}case F.Op.ALTERNATE:{if(t.subs.length===0)return this.nop();{let n=null;for(let r of t.subs){let s=this.compile(r);n=n===null?s:this.alt(n,s)}return n}}default:throw new rl("regexp: unhandled case in compile")}}},ul=class e{static simplify(t){if(t===null)return null;switch(t.op){case F.Op.CAPTURE:case F.Op.CONCAT:case F.Op.ALTERNATE:{let n=t;for(let r=0;r<t.subs.length;r++){let s=t.subs[r],i=e.simplify(s);n===t&&i!==s&&(n=F.fromRegexp(t),n.runes=[],n.subs=t.subs.slice(0,t.subs.length)),n!==t&&(n.subs[r]=i)}return n}case F.Op.STAR:case F.Op.PLUS:case F.Op.QUEST:{let n=e.simplify(t.subs[0]);return e.simplify1(t.op,t.flags,n,t)}case F.Op.REPEAT:{if(t.min===0&&t.max===0)return new F(F.Op.EMPTY_MATCH);let n=e.simplify(t.subs[0]);if(t.max===-1){if(t.min===0)return e.simplify1(F.Op.STAR,t.flags,n,null);if(t.min===1)return e.simplify1(F.Op.PLUS,t.flags,n,null);let s=new F(F.Op.CONCAT),i=[];for(let o=0;o<t.min-1;o++)i.push(n);return i.push(e.simplify1(F.Op.PLUS,t.flags,n,null)),s.subs=i.slice(0),s}if(t.min===1&&t.max===1)return n;let r=null;if(t.min>0){r=[];for(let s=0;s<t.min;s++)r.push(n)}if(t.max>t.min){let s=e.simplify1(F.Op.QUEST,t.flags,n,null);for(let i=t.min+1;i<t.max;i++){let o=new F(F.Op.CONCAT);o.subs=[n,s],s=e.simplify1(F.Op.QUEST,t.flags,o,null)}if(r===null)return s;r.push(s)}if(r!==null){let s=new F(F.Op.CONCAT);return s.subs=r.slice(0),s}return new F(F.Op.NO_MATCH)}}return t}static simplify1(t,n,r,s){return r.op===F.Op.EMPTY_MATCH||t===r.op&&(n&G.NON_GREEDY)===(r.flags&G.NON_GREEDY)?r:(s!==null&&s.op===t&&(s.flags&G.NON_GREEDY)===(n&G.NON_GREEDY)&&r===s.subs[0]||(s=new F(t),s.flags=n,s.subs=[r]),s)}},$e=class{constructor(t,n){this.sign=t,this.cls=n}},_1=[48,57],F1=[9,10,12,13,32,32],L1=[48,57,65,90,95,95,97,122],M1=new Map([["\\d",new $e(1,_1)],["\\D",new $e(-1,_1)],["\\s",new $e(1,F1)],["\\S",new $e(-1,F1)],["\\w",new $e(1,L1)],["\\W",new $e(-1,L1)]]),U1=[48,57,65,90,97,122],B1=[65,90,97,122],W1=[0,127],z1=[9,9,32,32],H1=[0,31,127,127],j1=[48,57],G1=[33,126],V1=[97,122],q1=[32,126],Z1=[33,47,58,64,91,96,123,126],K1=[9,13,32,32],Q1=[65,90],X1=[48,57,65,90,95,95,97,122],Y1=[48,57,65,70,97,102],J1=new Map([["[:alnum:]",new $e(1,U1)],["[:^alnum:]",new $e(-1,U1)],["[:alpha:]",new $e(1,B1)],["[:^alpha:]",new $e(-1,B1)],["[:ascii:]",new $e(1,W1)],["[:^ascii:]",new $e(-1,W1)],["[:blank:]",new $e(1,z1)],["[:^blank:]",new $e(-1,z1)],["[:cntrl:]",new $e(1,H1)],["[:^cntrl:]",new $e(-1,H1)],["[:digit:]",new $e(1,j1)],["[:^digit:]",new $e(-1,j1)],["[:graph:]",new $e(1,G1)],["[:^graph:]",new $e(-1,G1)],["[:lower:]",new $e(1,V1)],["[:^lower:]",new $e(-1,V1)],["[:print:]",new $e(1,q1)],["[:^print:]",new $e(-1,q1)],["[:punct:]",new $e(1,Z1)],["[:^punct:]",new $e(-1,Z1)],["[:space:]",new $e(1,K1)],["[:^space:]",new $e(-1,K1)],["[:upper:]",new $e(1,Q1)],["[:^upper:]",new $e(-1,Q1)],["[:word:]",new $e(1,X1)],["[:^word:]",new $e(-1,X1)],["[:xdigit:]",new $e(1,Y1)],["[:^xdigit:]",new $e(-1,Y1)]]),Un=class e{static charClassToString(t,n){let r="[";for(let s=0;s<n;s+=2){s>0&&(r+=" ");let i=t[s],o=t[s+1];i===o?r+=`0x${i.toString(16)}`:r+=`0x${i.toString(16)}-0x${o.toString(16)}`}return r+="]",r}static cmp(t,n,r,s){let i=t[n]-r;return i!==0?i:s-t[n+1]}static qsortIntPair(t,n,r){let s=((n+r)/2|0)&-2,i=t[s],o=t[s+1],a=n,l=r;for(;a<=l;){for(;a<r&&e.cmp(t,a,i,o)<0;)a+=2;for(;l>n&&e.cmp(t,l,i,o)>0;)l-=2;if(a<=l){if(a!==l){let c=t[a];t[a]=t[l],t[l]=c,c=t[a+1],t[a+1]=t[l+1],t[l+1]=c}a+=2,l-=2}}n<l&&e.qsortIntPair(t,n,l),a<r&&e.qsortIntPair(t,a,r)}constructor(t=Te.emptyInts()){this.r=t,this.len=t.length}toArray(){return this.len===this.r.length?this.r:this.r.slice(0,this.len)}cleanClass(){if(this.len<4)return this;e.qsortIntPair(this.r,0,this.len-2);let t=2;for(let n=2;n<this.len;n+=2){let r=this.r[n],s=this.r[n+1];if(r<=this.r[t-1]+1){s>this.r[t-1]&&(this.r[t-1]=s);continue}this.r[t]=r,this.r[t+1]=s,t+=2}return this.len=t,this}appendLiteral(t,n){return(n&G.FOLD_CASE)!==0?this.appendFoldedRange(t,t):this.appendRange(t,t)}appendRange(t,n){if(this.len>0){for(let r=2;r<=4;r+=2)if(this.len>=r){let s=this.r[this.len-r],i=this.r[this.len-r+1];if(t<=i+1&&s<=n+1)return t<s&&(this.r[this.len-r]=t),n>i&&(this.r[this.len-r+1]=n),this}}return this.r[this.len++]=t,this.r[this.len++]=n,this}appendFoldedRange(t,n){if(t<=ue.MIN_FOLD&&n>=ue.MAX_FOLD)return this.appendRange(t,n);if(n<ue.MIN_FOLD||t>ue.MAX_FOLD)return this.appendRange(t,n);t<ue.MIN_FOLD&&(this.appendRange(t,ue.MIN_FOLD-1),t=ue.MIN_FOLD),n>ue.MAX_FOLD&&(this.appendRange(ue.MAX_FOLD+1,n),n=ue.MAX_FOLD);for(let r=t;r<=n;r++){this.appendRange(r,r);for(let s=ue.simpleFold(r);s!==r;s=ue.simpleFold(s))this.appendRange(s,s)}return this}appendClass(t){for(let n=0;n<t.length;n+=2)this.appendRange(t[n],t[n+1]);return this}appendFoldedClass(t){for(let n=0;n<t.length;n+=2)this.appendFoldedRange(t[n],t[n+1]);return this}appendNegatedClass(t){let n=0;for(let r=0;r<t.length;r+=2){let s=t[r],i=t[r+1];n<=s-1&&this.appendRange(n,s-1),n=i+1}return n<=ue.MAX_RUNE&&this.appendRange(n,ue.MAX_RUNE),this}appendTable(t){for(let n=0;n<t.length;++n){let r=t.getLo(n),s=t.getHi(n),i=t.getStride(n);if(i===1){this.appendRange(r,s);continue}for(let o=r;o<=s;o+=i)this.appendRange(o,o)}return this}appendNegatedTable(t){let n=0;for(let r=0;r<t.length;++r){let s=t.getLo(r),i=t.getHi(r),o=t.getStride(r);if(o===1){n<=s-1&&this.appendRange(n,s-1),n=i+1;continue}for(let a=s;a<=i;a+=o)n<=a-1&&this.appendRange(n,a-1),n=a+1}return n<=ue.MAX_RUNE&&this.appendRange(n,ue.MAX_RUNE),this}appendTableWithSign(t,n){return n<0?this.appendNegatedTable(t):this.appendTable(t)}negateClass(){let t=0,n=0;for(let r=0;r<this.len;r+=2){let s=this.r[r],i=this.r[r+1];t<=s-1&&(this.r[n]=t,this.r[n+1]=s-1,n+=2),t=i+1}return this.len=n,t<=ue.MAX_RUNE&&(this.r[this.len++]=t,this.r[this.len++]=ue.MAX_RUNE),this}appendClassWithSign(t,n){return n<0?this.appendNegatedClass(t):this.appendClass(t)}appendGroup(t,n){let r=t.cls;return n&&(r=new e().appendFoldedClass(r).cleanClass().toArray()),this.appendClassWithSign(r,t.sign)}toString(){return e.charClassToString(this.r,this.len)}},Xs=class e{static of(t,n){return new e(t,n)}constructor(t,n){this.first=t,this.second=n}},fl=class{constructor(t){this.str=t,this.position=0}pos(){return this.position}rewindTo(t){this.position=t}more(){return this.position<this.str.length}peek(){return this.str.codePointAt(this.position)}skip(t){this.position+=t}skipString(t){this.position+=t.length}pop(){let t=this.str.codePointAt(this.position);return this.position+=Te.charCount(t),t}lookingAt(t){return this.rest().startsWith(t)}rest(){return this.str.substring(this.position)}from(t){return this.str.substring(t,this.position)}toString(){return this.rest()}},pl=class e{static ERR_INTERNAL_ERROR="regexp/syntax: internal error";static ERR_INVALID_CHAR_RANGE="invalid character class range";static ERR_INVALID_ESCAPE="invalid escape sequence";static ERR_INVALID_NAMED_CAPTURE="invalid named capture";static ERR_INVALID_PERL_OP="invalid or unsupported Perl syntax";static ERR_INVALID_REPEAT_OP="invalid nested repetition operator";static ERR_INVALID_REPEAT_SIZE="invalid repeat count";static ERR_MISSING_BRACKET="missing closing ]";static ERR_MISSING_PAREN="missing closing )";static ERR_MISSING_REPEAT_ARGUMENT="missing argument to repetition operator";static ERR_TRAILING_BACKSLASH="trailing backslash at end of expression";static ERR_DUPLICATE_NAMED_CAPTURE="duplicate capture group name";static ERR_UNEXPECTED_PAREN="unexpected )";static ERR_NESTING_DEPTH="expression nests too deeply";static ERR_LARGE="expression too large";static MAX_HEIGHT=1e3;static MAX_SIZE=3355443;static MAX_RUNES=33554432;static ANY_TABLE=new N(new Uint32Array([0,ue.MAX_RUNE,1]));static unicodeTable(t){return t==="Any"?Xs.of(e.ANY_TABLE,e.ANY_TABLE):fn.CATEGORIES.has(t)?Xs.of(fn.CATEGORIES.get(t),fn.FOLD_CATEGORIES.get(t)):fn.SCRIPTS.has(t)?Xs.of(fn.SCRIPTS.get(t),fn.FOLD_SCRIPT.get(t)):null}static minFoldRune(t){if(t<ue.MIN_FOLD||t>ue.MAX_FOLD)return t;let n=t,r=t;for(t=ue.simpleFold(t);t!==r;t=ue.simpleFold(t))n>t&&(n=t);return n}static leadingRegexp(t){if(t.op===F.Op.EMPTY_MATCH)return null;if(t.op===F.Op.CONCAT&&t.subs.length>0){let n=t.subs[0];return n.op===F.Op.EMPTY_MATCH?null:n}return t}static literalRegexp(t,n){let r=new F(F.Op.LITERAL);return r.flags=n,r.runes=Te.stringToRunes(t),r}static parse(t,n){return new e(t,n).parseInternal()}static parseRepeat(t){let n=t.pos();if(!t.more()||!t.lookingAt("{"))return-1;t.skip(1);let r=e.parseInt(t);if(r===-1||!t.more())return-1;let s;if(!t.lookingAt(","))s=r;else{if(t.skip(1),!t.more())return-1;if(t.lookingAt("}"))s=-1;else if((s=e.parseInt(t))===-1)return-1}if(!t.more()||!t.lookingAt("}"))return-1;if(t.skip(1),r<0||r>1e3||s===-2||s>1e3||s>=0&&r>s)throw new je(e.ERR_INVALID_REPEAT_SIZE,t.from(n));return r<<16|s&ue.MAX_BMP}static isValidCaptureName(t){if(t.length===0)return!1;for(let n=0;n<t.length;n++){let r=t.codePointAt(n);if(r!==D.CODES.get("_")&&!Te.isalnum(r))return!1}return!0}static parseInt(t){let n=t.pos();for(;t.more()&&t.peek()>=D.CODES.get("0")&&t.peek()<=D.CODES.get("9");)t.skip(1);let r=t.from(n);return r.length===0||r.length>1&&r.codePointAt(0)===D.CODES.get("0")?-1:r.length>8?-2:parseFloat(r,10)}static isCharClass(t){return t.op===F.Op.LITERAL&&t.runes.length===1||t.op===F.Op.CHAR_CLASS||t.op===F.Op.ANY_CHAR_NOT_NL||t.op===F.Op.ANY_CHAR}static matchRune(t,n){switch(t.op){case F.Op.LITERAL:return t.runes.length===1&&t.runes[0]===n;case F.Op.CHAR_CLASS:for(let r=0;r<t.runes.length;r+=2)if(t.runes[r]<=n&&n<=t.runes[r+1])return!0;return!1;case F.Op.ANY_CHAR_NOT_NL:return n!==D.CODES.get(`
173
- `);case F.Op.ANY_CHAR:return!0}return!1}static mergeCharClass(t,n){switch(t.op){case F.Op.ANY_CHAR:break;case F.Op.ANY_CHAR_NOT_NL:e.matchRune(n,D.CODES.get(`
174
- `))&&(t.op=F.Op.ANY_CHAR);break;case F.Op.CHAR_CLASS:n.op===F.Op.LITERAL?t.runes=new Un(t.runes).appendLiteral(n.runes[0],n.flags).toArray():t.runes=new Un(t.runes).appendClass(n.runes).toArray();break;case F.Op.LITERAL:if(n.runes[0]===t.runes[0]&&n.flags===t.flags)break;t.op=F.Op.CHAR_CLASS,t.runes=new Un().appendLiteral(t.runes[0],t.flags).appendLiteral(n.runes[0],n.flags).toArray();break}}static parseEscape(t){let n=t.pos();if(t.skip(1),!t.more())throw new je(e.ERR_TRAILING_BACKSLASH);let r=t.pop();e:switch(r){case D.CODES.get("1"):case D.CODES.get("2"):case D.CODES.get("3"):case D.CODES.get("4"):case D.CODES.get("5"):case D.CODES.get("6"):case D.CODES.get("7"):if(!t.more()||t.peek()<D.CODES.get("0")||t.peek()>D.CODES.get("7"))break;case D.CODES.get("0"):{let s=r-D.CODES.get("0");for(let i=1;i<3&&!(!t.more()||t.peek()<D.CODES.get("0")||t.peek()>D.CODES.get("7"));i++)s=s*8+t.peek()-D.CODES.get("0"),t.skip(1);return s}case D.CODES.get("x"):{if(!t.more())break;if(r=t.pop(),r===D.CODES.get("{")){let o=0,a=0;for(;;){if(!t.more())break e;if(r=t.pop(),r===D.CODES.get("}"))break;let l=Te.unhex(r);if(l<0||(a=a*16+l,a>ue.MAX_RUNE))break e;o++}if(o===0)break e;return a}let s=Te.unhex(r);if(!t.more())break;r=t.pop();let i=Te.unhex(r);if(s<0||i<0)break;return s*16+i}case D.CODES.get("a"):return D.CODES.get("\x07");case D.CODES.get("f"):return D.CODES.get("\f");case D.CODES.get("n"):return D.CODES.get(`
175
- `);case D.CODES.get("r"):return D.CODES.get("\r");case D.CODES.get("t"):return D.CODES.get(" ");case D.CODES.get("v"):return D.CODES.get("\v");default:if(r<=ue.MAX_ASCII&&!Te.isalnum(r))return r;break}throw new je(e.ERR_INVALID_ESCAPE,t.from(n))}static parseClassChar(t,n){if(!t.more())throw new je(e.ERR_MISSING_BRACKET,t.from(n));return t.lookingAt("\\")?e.parseEscape(t):t.pop()}static concatRunes(t,n){return[...t,...n]}constructor(t,n=0){this.wholeRegexp=t,this.flags=n,this.numCap=0,this.namedGroups={},this.stack=[],this.free=null,this.numRegexp=0,this.numRunes=0,this.repeats=0,this.height=null,this.size=null}newRegexp(t){let n=this.free;return n!==null&&n.subs!==null&&n.subs.length>0?(this.free=n.subs[0],n.reinit(),n.op=t):(n=new F(t),this.numRegexp+=1),n}reuse(t){this.height!==null&&Object.prototype.hasOwnProperty.call(this.height,t)&&delete this.height[t],t.subs!==null&&t.subs.length>0&&(t.subs[0]=this.free),this.free=t}checkLimits(t){if(this.numRunes>e.MAX_RUNES)throw new je(e.ERR_LARGE);this.checkSize(t),this.checkHeight(t)}checkSize(t){if(this.size===null){if(this.repeats===0&&(this.repeats=1),t.op===F.Op.REPEAT){let n=t.max;n===-1&&(n=t.min),n<=0&&(n=1),n>e.MAX_SIZE/this.repeats?this.repeats=e.MAX_SIZE:this.repeats*=n}if(this.numRegexp<e.MAX_SIZE/this.repeats)return;this.size={};for(let n of this.stack)this.checkSize(n)}if(this.calcSize(t,!0)>e.MAX_SIZE)throw new je(e.ERR_LARGE)}calcSize(t,n=!1){if(!n&&Object.prototype.hasOwnProperty.call(this.size,t))return this.size[t];let r=0;switch(t.op){case F.Op.LITERAL:{r=t.runes.length;break}case F.Op.CAPTURE:case F.Op.STAR:{r=2+this.calcSize(t.subs[0]);break}case F.Op.PLUS:case F.Op.QUEST:{r=1+this.calcSize(t.subs[0]);break}case F.Op.CONCAT:{for(let s of t.subs)r=r+this.calcSize(s);break}case F.Op.ALTERNATE:{for(let s of t.subs)r=r+this.calcSize(s);t.subs.length>1&&(r=r+t.subs.length-1);break}case F.Op.REPEAT:{let s=this.calcSize(t.subs[0]);if(t.max===-1){t.min===0?r=2+s:r=1+t.min*s;break}r=t.max*s+(t.max-t.min);break}}return r=Math.max(1,r),this.size[t]=r,r}checkHeight(t){if(!(this.numRegexp<e.MAX_HEIGHT)){if(this.height===null){this.height={};for(let n of this.stack)this.checkHeight(n)}if(this.calcHeight(t,!0)>e.MAX_HEIGHT)throw new je(e.ERR_NESTING_DEPTH)}}calcHeight(t,n=!1){if(!n&&Object.prototype.hasOwnProperty.call(this.height,t))return this.height[t];let r=1;for(let s of t.subs){let i=this.calcHeight(s);r<1+i&&(r=1+i)}return this.height[t]=r,r}pop(){return this.stack.pop()}popToPseudo(){let t=this.stack.length,n=t;for(;n>0&&!F.isPseudoOp(this.stack[n-1].op);)n--;let r=this.stack.slice(n,t);return this.stack=this.stack.slice(0,n),r}push(t){if(this.numRunes+=t.runes.length,t.op===F.Op.CHAR_CLASS&&t.runes.length===2&&t.runes[0]===t.runes[1]){if(this.maybeConcat(t.runes[0],this.flags&-2))return null;t.op=F.Op.LITERAL,t.runes=[t.runes[0]],t.flags=this.flags&-2}else if(t.op===F.Op.CHAR_CLASS&&t.runes.length===4&&t.runes[0]===t.runes[1]&&t.runes[2]===t.runes[3]&&ue.simpleFold(t.runes[0])===t.runes[2]&&ue.simpleFold(t.runes[2])===t.runes[0]||t.op===F.Op.CHAR_CLASS&&t.runes.length===2&&t.runes[0]+1===t.runes[1]&&ue.simpleFold(t.runes[0])===t.runes[1]&&ue.simpleFold(t.runes[1])===t.runes[0]){if(this.maybeConcat(t.runes[0],this.flags|G.FOLD_CASE))return null;t.op=F.Op.LITERAL,t.runes=[t.runes[0]],t.flags=this.flags|G.FOLD_CASE}else this.maybeConcat(-1,0);return this.stack.push(t),this.checkLimits(t),t}maybeConcat(t,n){let r=this.stack.length;if(r<2)return!1;let s=this.stack[r-1],i=this.stack[r-2];return s.op!==F.Op.LITERAL||i.op!==F.Op.LITERAL||(s.flags&G.FOLD_CASE)!==(i.flags&G.FOLD_CASE)?!1:(i.runes=e.concatRunes(i.runes,s.runes),t>=0?(s.runes=[t],s.flags=n,!0):(this.pop(),this.reuse(s),!1))}newLiteral(t,n){let r=this.newRegexp(F.Op.LITERAL);return r.flags=n,(n&G.FOLD_CASE)!==0&&(t=e.minFoldRune(t)),r.runes=[t],r}literal(t){this.push(this.newLiteral(t,this.flags))}op(t){let n=this.newRegexp(t);return n.flags=this.flags,this.push(n)}repeat(t,n,r,s,i,o){let a=this.flags;if((a&G.PERL_X)!==0&&(i.more()&&i.lookingAt("?")&&(i.skip(1),a^=G.NON_GREEDY),o!==-1))throw new je(e.ERR_INVALID_REPEAT_OP,i.from(o));let l=this.stack.length;if(l===0)throw new je(e.ERR_MISSING_REPEAT_ARGUMENT,i.from(s));let c=this.stack[l-1];if(F.isPseudoOp(c.op))throw new je(e.ERR_MISSING_REPEAT_ARGUMENT,i.from(s));let u=this.newRegexp(t);if(u.min=n,u.max=r,u.flags=a,u.subs=[c],this.stack[l-1]=u,this.checkLimits(u),t===F.Op.REPEAT&&(n>=2||r>=2)&&!this.repeatIsValid(u,1e3))throw new je(e.ERR_INVALID_REPEAT_SIZE,i.from(s))}repeatIsValid(t,n){if(t.op===F.Op.REPEAT){let r=t.max;if(r===0)return!0;if(r<0&&(r=t.min),r>n)return!1;r>0&&(n=Math.trunc(n/r))}for(let r of t.subs)if(!this.repeatIsValid(r,n))return!1;return!0}concat(){this.maybeConcat(-1,0);let t=this.popToPseudo();return t.length===0?this.push(this.newRegexp(F.Op.EMPTY_MATCH)):this.push(this.collapse(t,F.Op.CONCAT))}alternate(){let t=this.popToPseudo();return t.length>0&&this.cleanAlt(t[t.length-1]),t.length===0?this.push(this.newRegexp(F.Op.NO_MATCH)):this.push(this.collapse(t,F.Op.ALTERNATE))}cleanAlt(t){t.op===F.Op.CHAR_CLASS&&(t.runes=new Un(t.runes).cleanClass().toArray(),t.runes.length===2&&t.runes[0]===0&&t.runes[1]===ue.MAX_RUNE?(t.runes=[],t.op=F.Op.ANY_CHAR):t.runes.length===4&&t.runes[0]===0&&t.runes[1]===D.CODES.get(`
176
- `)-1&&t.runes[2]===D.CODES.get(`
177
- `)+1&&t.runes[3]===ue.MAX_RUNE&&(t.runes=[],t.op=F.Op.ANY_CHAR_NOT_NL))}collapse(t,n){if(t.length===1)return t[0];let r=0;for(let a of t)r+=a.op===n?a.subs.length:1;let s=new Array(r).fill(null),i=0;for(let a of t)a.op===n?(s.splice(i,a.subs.length,...a.subs),i+=a.subs.length,this.reuse(a)):s[i++]=a;let o=this.newRegexp(n);if(o.subs=s,n===F.Op.ALTERNATE&&(o.subs=this.factor(o.subs),o.subs.length===1)){let a=o;o=o.subs[0],this.reuse(a)}return o}factor(t){if(t.length<2)return t;let n=0,r=t.length,s=0,i=null,o=0,a=0,l=0;for(let u=0;u<=r;u++){let f=null,p=0,h=0;if(u<r){let d=t[n+u];if(d.op===F.Op.CONCAT&&d.subs.length>0&&(d=d.subs[0]),d.op===F.Op.LITERAL&&(f=d.runes,p=d.runes.length,h=d.flags&G.FOLD_CASE),h===a){let m=0;for(;m<o&&m<p&&i[m]===f[m];)m++;if(m>0){o=m;continue}}}if(u!==l)if(u===l+1)t[s++]=t[n+l];else{let d=this.newRegexp(F.Op.LITERAL);d.flags=a,d.runes=i.slice(0,o);for(let y=l;y<u;y++)t[n+y]=this.removeLeadingString(t[n+y],o),this.checkLimits(t[n+y]);let m=this.collapse(t.slice(n+l,n+u),F.Op.ALTERNATE),g=this.newRegexp(F.Op.CONCAT);g.subs=[d,m],t[s++]=g}l=u,i=f,o=p,a=h}r=s,n=0,l=0,s=0;let c=null;for(let u=0;u<=r;u++){let f=null;if(!(u<r&&(f=e.leadingRegexp(t[n+u]),c!==null&&c.equals(f)&&(e.isCharClass(c)||c.op===F.Op.REPEAT&&c.min===c.max&&e.isCharClass(c.subs[0]))))){if(u!==l)if(u===l+1)t[s++]=t[n+l];else{let p=c;for(let m=l;m<u;m++){let g=m!==l;t[n+m]=this.removeLeadingRegexp(t[n+m],g),this.checkLimits(t[n+m])}let h=this.collapse(t.slice(n+l,n+u),F.Op.ALTERNATE),d=this.newRegexp(F.Op.CONCAT);d.subs=[p,h],t[s++]=d}l=u,c=f}}r=s,n=0,l=0,s=0;for(let u=0;u<=r;u++)if(!(u<r&&e.isCharClass(t[n+u]))){if(u!==l)if(u===l+1)t[s++]=t[n+l];else{let f=l;for(let h=l+1;h<u;h++){let d=t[n+f],m=t[n+h];(d.op<m.op||d.op===m.op&&(d.runes!==null?d.runes.length:0)<(m.runes!==null?m.runes.length:0))&&(f=h)}let p=t[n+l];t[n+l]=t[n+f],t[n+f]=p;for(let h=l+1;h<u;h++)e.mergeCharClass(t[n+l],t[n+h]),this.reuse(t[n+h]);this.cleanAlt(t[n+l]),t[s++]=t[n+l]}u<r&&(t[s++]=t[n+u]),l=u+1}r=s,n=0,l=0,s=0;for(let u=0;u<r;++u)u+1<r&&t[n+u].op===F.Op.EMPTY_MATCH&&t[n+u+1].op===F.Op.EMPTY_MATCH||(t[s++]=t[n+u]);return r=s,n=0,t.slice(n,r)}removeLeadingString(t,n){if(t.op===F.Op.CONCAT&&t.subs.length>0){let r=this.removeLeadingString(t.subs[0],n);if(t.subs[0]=r,r.op===F.Op.EMPTY_MATCH)switch(this.reuse(r),t.subs.length){case 0:case 1:t.op=F.Op.EMPTY_MATCH,t.subs=null;break;case 2:{let s=t;t=t.subs[1],this.reuse(s);break}default:t.subs=t.subs.slice(1,t.subs.length);break}return t}return t.op===F.Op.LITERAL&&(t.runes=t.runes.slice(n,t.runes.length),t.runes.length===0&&(t.op=F.Op.EMPTY_MATCH)),t}removeLeadingRegexp(t,n){if(t.op===F.Op.CONCAT&&t.subs.length>0){switch(n&&this.reuse(t.subs[0]),t.subs=t.subs.slice(1,t.subs.length),t.subs.length){case 0:{t.op=F.Op.EMPTY_MATCH,t.subs=F.emptySubs();break}case 1:{let r=t;t=t.subs[0],this.reuse(r);break}}return t}return n&&this.reuse(t),this.newRegexp(F.Op.EMPTY_MATCH)}parseInternal(){if((this.flags&G.LITERAL)!==0)return e.literalRegexp(this.wholeRegexp,this.flags);let t=-1,n=-1,r=-1,s=new fl(this.wholeRegexp);for(;s.more();){let o=-1;e:switch(s.peek()){case D.CODES.get("("):if((this.flags&G.PERL_X)!==0&&s.lookingAt("(?")){this.parsePerlFlags(s);break}this.op(F.Op.LEFT_PAREN).cap=++this.numCap,s.skip(1);break;case D.CODES.get("|"):this.parseVerticalBar(),s.skip(1);break;case D.CODES.get(")"):this.parseRightParen(),s.skip(1);break;case D.CODES.get("^"):(this.flags&G.ONE_LINE)!==0?this.op(F.Op.BEGIN_TEXT):this.op(F.Op.BEGIN_LINE),s.skip(1);break;case D.CODES.get("$"):(this.flags&G.ONE_LINE)!==0?this.op(F.Op.END_TEXT).flags|=G.WAS_DOLLAR:this.op(F.Op.END_LINE),s.skip(1);break;case D.CODES.get("."):(this.flags&G.DOT_NL)!==0?this.op(F.Op.ANY_CHAR):this.op(F.Op.ANY_CHAR_NOT_NL),s.skip(1);break;case D.CODES.get("["):this.parseClass(s);break;case D.CODES.get("*"):case D.CODES.get("+"):case D.CODES.get("?"):{o=s.pos();let a=null;switch(s.pop()){case D.CODES.get("*"):a=F.Op.STAR;break;case D.CODES.get("+"):a=F.Op.PLUS;break;case D.CODES.get("?"):a=F.Op.QUEST;break}this.repeat(a,n,r,o,s,t);break}case D.CODES.get("{"):{o=s.pos();let a=e.parseRepeat(s);if(a<0){s.rewindTo(o),this.literal(s.pop());break}n=a>>16,r=(a&ue.MAX_BMP)<<16>>16,this.repeat(F.Op.REPEAT,n,r,o,s,t);break}case D.CODES.get("\\"):{let a=s.pos();if(s.skip(1),(this.flags&G.PERL_X)!==0&&s.more())switch(s.pop()){case D.CODES.get("A"):this.op(F.Op.BEGIN_TEXT);break e;case D.CODES.get("b"):this.op(F.Op.WORD_BOUNDARY);break e;case D.CODES.get("B"):this.op(F.Op.NO_WORD_BOUNDARY);break e;case D.CODES.get("C"):throw new je(e.ERR_INVALID_ESCAPE,"\\C");case D.CODES.get("Q"):{let f=s.rest(),p=f.indexOf("\\E");p>=0&&(f=f.substring(0,p)),s.skipString(f),s.skipString("\\E");let h=0;for(;h<f.length;){let d=f.codePointAt(h);this.literal(d),h+=Te.charCount(d)}break e}case D.CODES.get("z"):this.op(F.Op.END_TEXT);break e;default:s.rewindTo(a);break}let l=this.newRegexp(F.Op.CHAR_CLASS);if(l.flags=this.flags,s.lookingAt("\\p")||s.lookingAt("\\P")){let u=new Un;if(this.parseUnicodeClass(s,u)){l.runes=u.toArray(),this.push(l);break e}}let c=new Un;if(this.parsePerlClassEscape(s,c)){l.runes=c.toArray(),this.push(l);break e}s.rewindTo(a),this.reuse(l),this.literal(e.parseEscape(s));break}default:this.literal(s.pop());break}t=o}if(this.concat(),this.swapVerticalBar()&&this.pop(),this.alternate(),this.stack.length!==1)throw new je(e.ERR_MISSING_PAREN,this.wholeRegexp);return this.stack[0].namedGroups=this.namedGroups,this.stack[0]}parsePerlFlags(t){let n=t.pos(),r=t.rest();if(r.startsWith("(?P<")||r.startsWith("(?<")){let a=r.charAt(2)==="P"?4:3,l=r.indexOf(">");if(l<0)throw new je(e.ERR_INVALID_NAMED_CAPTURE,r);let c=r.substring(a,l);if(t.skipString(c),t.skip(a+1),!e.isValidCaptureName(c))throw new je(e.ERR_INVALID_NAMED_CAPTURE,r.substring(0,l+1));let u=this.op(F.Op.LEFT_PAREN);if(u.cap=++this.numCap,this.namedGroups[c])throw new je(e.ERR_DUPLICATE_NAMED_CAPTURE,c);this.namedGroups[c]=this.numCap,u.name=c;return}t.skip(2);let s=this.flags,i=1,o=!1;e:for(;t.more();){let a=t.pop();switch(a){case D.CODES.get("i"):s|=G.FOLD_CASE,o=!0;break;case D.CODES.get("m"):s&=-17,o=!0;break;case D.CODES.get("s"):s|=G.DOT_NL,o=!0;break;case D.CODES.get("U"):s|=G.NON_GREEDY,o=!0;break;case D.CODES.get("-"):if(i<0)break e;i=-1,s=~s,o=!1;break;case D.CODES.get(":"):case D.CODES.get(")"):if(i<0){if(!o)break e;s=~s}a===D.CODES.get(":")&&this.op(F.Op.LEFT_PAREN),this.flags=s;return;default:break e}}throw new je(e.ERR_INVALID_PERL_OP,t.from(n))}parseVerticalBar(){this.concat(),this.swapVerticalBar()||this.op(F.Op.VERTICAL_BAR)}swapVerticalBar(){let t=this.stack.length;if(t>=3&&this.stack[t-2].op===F.Op.VERTICAL_BAR&&e.isCharClass(this.stack[t-1])&&e.isCharClass(this.stack[t-3])){let n=this.stack[t-1],r=this.stack[t-3];if(n.op>r.op){let s=r;r=n,n=s,this.stack[t-3]=r}return e.mergeCharClass(r,n),this.reuse(n),this.pop(),!0}if(t>=2){let n=this.stack[t-1],r=this.stack[t-2];if(r.op===F.Op.VERTICAL_BAR)return t>=3&&this.cleanAlt(this.stack[t-3]),this.stack[t-2]=n,this.stack[t-1]=r,!0}return!1}parseRightParen(){if(this.concat(),this.swapVerticalBar()&&this.pop(),this.alternate(),this.stack.length<2)throw new je(e.ERR_UNEXPECTED_PAREN,this.wholeRegexp);let n=this.pop(),r=this.pop();if(r.op!==F.Op.LEFT_PAREN)throw new je(e.ERR_UNEXPECTED_PAREN,this.wholeRegexp);this.flags=r.flags,r.cap===0?this.push(n):(r.op=F.Op.CAPTURE,r.subs=[n],this.push(r))}parsePerlClassEscape(t,n){let r=t.pos();if((this.flags&G.PERL_X)===0||!t.more()||t.pop()!==D.CODES.get("\\")||!t.more())return!1;t.pop();let s=t.from(r),i=M1.has(s)?M1.get(s):null;return i===null?!1:(n.appendGroup(i,(this.flags&G.FOLD_CASE)!==0),!0)}parseNamedClass(t,n){let r=t.rest(),s=r.indexOf(":]");if(s<0)return!1;let i=r.substring(0,s+2);t.skipString(i);let o=J1.has(i)?J1.get(i):null;if(o===null)throw new je(e.ERR_INVALID_CHAR_RANGE,i);return n.appendGroup(o,(this.flags&G.FOLD_CASE)!==0),!0}parseUnicodeClass(t,n){let r=t.pos();if((this.flags&G.UNICODE_GROUPS)===0||!t.lookingAt("\\p")&&!t.lookingAt("\\P"))return!1;t.skip(1);let s=1,i=t.pop();if(i===D.CODES.get("P")&&(s=-1),!t.more())throw t.rewindTo(r),new je(e.ERR_INVALID_CHAR_RANGE,t.rest());i=t.pop();let o;if(i!==D.CODES.get("{"))o=Te.runeToString(i);else{let u=t.rest(),f=u.indexOf("}");if(f<0)throw t.rewindTo(r),new je(e.ERR_INVALID_CHAR_RANGE,t.rest());o=u.substring(0,f),t.skipString(o),t.skip(1)}o.length!==0&&o.codePointAt(0)===D.CODES.get("^")&&(s=0-s,o=o.substring(1));let a=e.unicodeTable(o);if(a===null)throw new je(e.ERR_INVALID_CHAR_RANGE,t.from(r));let l=a.first,c=a.second;if((this.flags&G.FOLD_CASE)===0||c===null)n.appendTableWithSign(l,s);else{let u=new Un().appendTable(l).appendTable(c).cleanClass().toArray();n.appendClassWithSign(u,s)}return!0}parseClass(t){let n=t.pos();t.skip(1);let r=this.newRegexp(F.Op.CHAR_CLASS);r.flags=this.flags;let s=new Un,i=1;t.more()&&t.lookingAt("^")&&(i=-1,t.skip(1),(this.flags&G.CLASS_NL)===0&&s.appendRange(D.CODES.get(`
178
- `),D.CODES.get(`
179
- `)));let o=!0;for(;!t.more()||t.peek()!==D.CODES.get("]")||o;){if(t.more()&&t.lookingAt("-")&&(this.flags&G.PERL_X)===0&&!o){let u=t.rest();if(u==="-"||!u.startsWith("-]"))throw t.rewindTo(n),new je(e.ERR_INVALID_CHAR_RANGE,t.rest())}o=!1;let a=t.pos();if(t.lookingAt("[:")){if(this.parseNamedClass(t,s))continue;t.rewindTo(a)}if(this.parseUnicodeClass(t,s)||this.parsePerlClassEscape(t,s))continue;t.rewindTo(a);let l=e.parseClassChar(t,n),c=l;if(t.more()&&t.lookingAt("-")){if(t.skip(1),t.more()&&t.lookingAt("]"))t.skip(-1);else if(c=e.parseClassChar(t,n),c<l)throw new je(e.ERR_INVALID_CHAR_RANGE,t.from(a))}(this.flags&G.FOLD_CASE)===0?s.appendRange(l,c):s.appendFoldedRange(l,c)}t.skip(1),s.cleanClass(),i<0&&s.negateClass(),r.runes=s.toArray(),this.push(r)}},hl=class{constructor(t){this.value=t}get(){return this.value}set(t){this.value=t}compareAndSet(t,n){return this.value===t?(this.value=n,!0):!1}},dl=class e{static initTest(t){let n=e.compile(t),r=new e(n.expr,n.prog,n.numSubexp,n.longest);return r.cond=n.cond,r.prefix=n.prefix,r.prefixUTF8=n.prefixUTF8,r.prefixComplete=n.prefixComplete,r.prefixRune=n.prefixRune,r}static compile(t){return e.compileImpl(t,G.PERL,!1)}static compilePOSIX(t){return e.compileImpl(t,G.POSIX,!0)}static compileImpl(t,n,r){let s=pl.parse(t,n),i=s.maxCap();s=ul.simplify(s);let o=cl.compileRegexp(s),a=new e(t,o,i,r),[l,c]=o.prefix();return a.prefixComplete=l,a.prefix=c,a.prefixUTF8=Te.stringToUtf8ByteArray(a.prefix),a.prefix.length>0&&(a.prefixRune=a.prefix.codePointAt(0)),a.namedGroups=s.namedGroups,a}static match(t,n){return e.compile(t).match(n)}constructor(t,n,r=0,s=0){this.expr=t,this.prog=n,this.numSubexp=r,this.longest=s,this.cond=n.startCond(),this.prefix=null,this.prefixUTF8=null,this.prefixComplete=!1,this.prefixRune=0,this.pooled=new hl,this.dfa=new al(n)}executeEngine(t,n,r,s){if(s>0)return this.doExecuteNFA(t,n,r,s);let i=this.dfa.match(t,n,r);return i!==null?i?[]:null:this.doExecuteNFA(t,n,r,s)}numberOfCapturingGroups(){return this.numSubexp}numberOfInstructions(){return this.prog.numInst()}get(){let t;do t=this.pooled.get();while(t&&!this.pooled.compareAndSet(t,t.next));return t}reset(){this.pooled.set(null)}put(t,n){let r=this.pooled.get();do r=this.pooled.get(),!n&&r&&(t=Qs.fromMachine(t),n=!0),t.next!==r&&(t.next=r);while(!this.pooled.compareAndSet(r,t))}toString(){return this.expr}doExecuteNFA(t,n,r,s){let i=this.get(),o=!1;i?i.next!==null&&(i=Qs.fromMachine(i),o=!0):(i=Qs.fromRE2(this),o=!0),i.init(s);let a=i.match(t,n,r)?i.submatches():null;return this.put(i,o),a}match(t){return this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,0)!==null}matchWithGroup(t,n,r,s,i){return t instanceof lr||(t=ls.utf16(t)),this.matchMachineInput(t,n,r,s,i)}matchMachineInput(t,n,r,s,i){if(n>r)return[!1,null];let o=t.isUTF16Encoding()?Ye.fromUTF16(t.asCharSequence(),0,r):Ye.fromUTF8(t.asBytes(),0,r),a=this.executeEngine(o,n,s,2*i);return a===null?[!1,null]:[!0,a]}matchUTF8(t){return this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,0)!==null}replaceAll(t,n){return this.replaceAllFunc(t,()=>n,2*t.length+1)}replaceFirst(t,n){return this.replaceAllFunc(t,()=>n,1)}replaceAllFunc(t,n,r){let s=0,i=0,o="",a=Ye.fromUTF16(t),l=0;for(;i<=t.length;){let c=this.executeEngine(a,i,G.UNANCHORED,2);if(c===null||c.length===0)break;o+=t.substring(s,c[0]),(c[1]>s||c[0]===0)&&(o+=n(t.substring(c[0],c[1])),l++),s=c[1];let u=a.step(i)&7;if(i+u>c[1]?i+=u:i+1>c[1]?i++:i=c[1],l>=r)break}return o+=t.substring(s),o}pad(t){if(t===null)return null;let n=(1+this.numSubexp)*2;if(t.length<n){let r=new Array(n).fill(-1);for(let s=0;s<t.length;s++)r[s]=t[s];t=r}return t}allMatches(t,n,r=s=>s){let s=[],i=t.endPos();n<0&&(n=i+1);let o=0,a=0,l=-1;for(;a<n&&o<=i;){let c=this.executeEngine(t,o,G.UNANCHORED,this.prog.numCap);if(c===null||c.length===0)break;let u=!0;if(c[1]===o){c[0]===l&&(u=!1);let f=t.step(o);f<0?o=i+1:o+=f&7}else o=c[1];l=c[1],u&&(s.push(r(this.pad(c))),a++)}return s}findUTF8(t){let n=this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,2);return n===null?null:t.slice(n[0],n[1])}findUTF8Index(t){let n=this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,2);return n===null?null:n.slice(0,2)}find(t){let n=this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,2);return n===null?"":t.substring(n[0],n[1])}findIndex(t){return this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,2)}findUTF8Submatch(t){let n=this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,this.prog.numCap);if(n===null)return null;let r=new Array(1+this.numSubexp).fill(null);for(let s=0;s<r.length;s++)2*s<n.length&&n[2*s]>=0&&(r[s]=t.slice(n[2*s],n[2*s+1]));return r}findUTF8SubmatchIndex(t){return this.pad(this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,this.prog.numCap))}findSubmatch(t){let n=this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,this.prog.numCap);if(n===null)return null;let r=new Array(1+this.numSubexp).fill(null);for(let s=0;s<r.length;s++)2*s<n.length&&n[2*s]>=0&&(r[s]=t.substring(n[2*s],n[2*s+1]));return r}findSubmatchIndex(t){return this.pad(this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,this.prog.numCap))}findAllUTF8(t,n){let r=this.allMatches(Ye.fromUTF8(t),n,s=>t.slice(s[0],s[1]));return r.length===0?null:r}findAllUTF8Index(t,n){let r=this.allMatches(Ye.fromUTF8(t),n,s=>s.slice(0,2));return r.length===0?null:r}findAll(t,n){let r=this.allMatches(Ye.fromUTF16(t),n,s=>t.substring(s[0],s[1]));return r.length===0?null:r}findAllIndex(t,n){let r=this.allMatches(Ye.fromUTF16(t),n,s=>s.slice(0,2));return r.length===0?null:r}findAllUTF8Submatch(t,n){let r=this.allMatches(Ye.fromUTF8(t),n,s=>{let i=new Array(s.length/2|0).fill(null);for(let o=0;o<i.length;o++)s[2*o]>=0&&(i[o]=t.slice(s[2*o],s[2*o+1]));return i});return r.length===0?null:r}findAllUTF8SubmatchIndex(t,n){let r=this.allMatches(Ye.fromUTF8(t),n);return r.length===0?null:r}findAllSubmatch(t,n){let r=this.allMatches(Ye.fromUTF16(t),n,s=>{let i=new Array(s.length/2|0).fill(null);for(let o=0;o<i.length;o++)s[2*o]>=0&&(i[o]=t.substring(s[2*o],s[2*o+1]));return i});return r.length===0?null:r}findAllSubmatchIndex(t,n){let r=this.allMatches(Ye.fromUTF16(t),n);return r.length===0?null:r}},ml=class e{static isUpperCaseAlpha(t){return"A"<=t&&t<="Z"}static isHexadecimal(t){return"0"<=t&&t<="9"||"A"<=t&&t<="F"||"a"<=t&&t<="f"}static getUtf8CharSize(t){let n=t.charCodeAt(0);return n<128?1:n<2048?2:n<65536?3:4}static translate(t){if(typeof t!="string")return t;let n="",r=!1,s=t.length;s===0&&(n="(?:)",r=!0);let i=0;for(;i<s;){let o=t[i];if(o==="\\"){if(i+1<s)switch(o=t[i+1],o){case"\\":{n+="\\\\",i+=2;continue}case"c":{if(i+2<s){let l=t[i+2];if(e.isUpperCaseAlpha(l)){n+="\\x",n+=(l.charCodeAt(0)-64>>4).toString(16).toUpperCase(),n+=(l.charCodeAt(0)-64&15).toString(16).toUpperCase(),i+=3,r=!0;continue}}n+="\\c",i+=2;continue}case"u":{if(i+2<s){let l=t[i+2];if(e.isHexadecimal(l)){n+="\\x{"+l,i+=3;for(let c=0;c<3&&i<s&&(l=t[i],!!e.isHexadecimal(l));++i,++c)n+=l;n+="}",r=!0;continue}else if(l==="{"){n+="\\x",i+=2,r=!0;continue}}n+="\\u",i+=2;continue}default:{n+="\\";let l=e.getUtf8CharSize(o);n+=t.substring(i+1,i+1+l),i+=l+1;continue}}}else if(o==="/"){n+="\\/",i+=1,r=!0;continue}else if(o==="("&&i+2<s&&t[i+1]==="?"&&t[i+2]==="<"&&(i+3>=s||t[i+3]!=="="&&t[i+3]!=="!")){n+="(?P<",i+=3,r=!0;continue}let a=e.getUtf8CharSize(o);n+=t.substring(i,i+a),i+=a}return r?n:t}},cr=class e{static CASE_INSENSITIVE=1;static DOTALL=2;static MULTILINE=4;static DISABLE_UNICODE_GROUPS=8;static LONGEST_MATCH=16;static quote(t){return Te.quoteMeta(t)}static quoteReplacement(t,n=!1){return qi.quoteReplacement(t,n)}static translateRegExp(t){return ml.translate(t)}static compile(t,n=0){let r=t;if((n&e.CASE_INSENSITIVE)!==0&&(r=`(?i)${r}`),(n&e.DOTALL)!==0&&(r=`(?s)${r}`),(n&e.MULTILINE)!==0&&(r=`(?m)${r}`),(n&~(e.MULTILINE|e.DOTALL|e.CASE_INSENSITIVE|e.DISABLE_UNICODE_GROUPS|e.LONGEST_MATCH))!==0)throw new sl("Flags should only be a combination of MULTILINE, DOTALL, CASE_INSENSITIVE, DISABLE_UNICODE_GROUPS, LONGEST_MATCH");let s=G.PERL;(n&e.DISABLE_UNICODE_GROUPS)!==0&&(s&=-129);let i=new e(t,n);return i.re2Input=dl.compileImpl(r,s,(n&e.LONGEST_MATCH)!==0),i}static matches(t,n){return e.compile(t).testExact(n)}static initTest(t,n,r){if(t==null)throw new Error("pattern is null");if(r==null)throw new Error("re2 is null");let s=new e(t,n);return s.re2Input=r,s}constructor(t,n){this.patternInput=t,this.flagsInput=n}reset(){this.re2Input.reset()}flags(){return this.flagsInput}pattern(){return this.patternInput}re2(){return this.re2Input}matches(t){return this.testExact(t)}matcher(t){return Array.isArray(t)&&(t=ls.utf8(t)),new qi(this,t)}test(t){return Array.isArray(t)?this.re2Input.matchUTF8(t):this.re2Input.match(t)}testExact(t){let n=Array.isArray(t)?Ye.fromUTF8(t):Ye.fromUTF16(t);return this.re2Input.executeEngine(n,0,G.ANCHOR_BOTH,0)!==null}split(t,n=0){let r=this.matcher(t),s=[],i=0,o=0;for(;r.find();){if(o===0&&r.end()===0){o=r.end();continue}if(n>0&&s.length===n-1)break;if(o===r.start()){if(n===0){i+=1,o=r.end();continue}}else for(;i>0;)s.push(""),i-=1;s.push(r.substring(o,r.start())),o=r.end()}if(n===0&&o!==r.inputLength()){for(;i>0;)s.push(""),i-=1;s.push(r.substring(o,r.inputLength()))}return(n!==0||s.length===0)&&s.push(r.substring(o,r.inputLength())),s}toString(){return this.patternInput}programSize(){return this.re2Input.numberOfInstructions()}groupCount(){return this.re2Input.numberOfCapturingGroups()}namedGroups(){return this.re2Input.namedGroups}equals(t){return this===t?!0:t===null||this.constructor!==t.constructor?!1:this.flagsInput===t.flagsInput&&this.patternInput===t.patternInput}}});function D3(e){let t=0;return e.includes("i")&&(t|=cr.CASE_INSENSITIVE),e.includes("m")&&(t|=cr.MULTILINE),e.includes("s")&&(t|=cr.DOTALL),t}function _3(e){return cr.translateRegExp(e)}function Q(e,t=""){return new Ki(e,t)}var Ki,Jn,np=k(()=>{"use strict";tp();Ki=class{_re2;_pattern;_flags;_global;_ignoreCase;_multiline;_lastIndex=0;_nativeRegex=null;_matcher=null;_matcherInput=null;acquireMatcher(t){return this._matcher===null?(this._matcher=this._re2.matcher(t),this._matcherInput=t,this._matcher):(this._matcherInput!==t&&(this._matcher.matcherInput.charSequence=t,this._matcherInput=t),this._matcher.reset(),this._matcher)}constructor(t,n=""){this._pattern=t,this._flags=n,this._global=n.includes("g"),this._ignoreCase=n.includes("i"),this._multiline=n.includes("m");try{let r=_3(t),s=D3(n);this._re2=cr.compile(r,s)}catch(r){if(r instanceof je){let s=r.message||"",i="";throw s.includes("(?=")||s.includes("(?!")||s.includes("(?<")||s.includes("(?<!")||t.includes("(?=")||t.includes("(?!")||t.includes("(?<=")||t.includes("(?<!")?i=" Lookahead (?=, ?!) and lookbehind (?<=, ?<!) assertions are not supported in this environment because the regex engine uses RE2 for ReDoS protection. RE2 guarantees linear-time matching but cannot support these features.":(s.includes("backreference")||/\\[1-9]/.test(t))&&(i=" Backreferences (\\1, \\2, etc.) are not supported in this environment because the regex engine uses RE2 for ReDoS protection. RE2 guarantees linear-time matching but cannot support backreferences."),new SyntaxError(`Invalid regular expression: /${t}/: ${s}${i}`)}throw r}}test(t){return this._global&&(this._lastIndex=0),this.acquireMatcher(t).find()}exec(t){let n=this.acquireMatcher(t),r=this._global?this._lastIndex:0;if(!n.find(r))return this._global&&(this._lastIndex=0),null;let s=this._re2.groupCount(),i=[];i.push(n.group(0)??"");for(let l=1;l<=s;l++){let c=n.group(l);i.push(c)}let o=i;o.index=n.start(0),o.input=t;let a=this._re2.namedGroups();if(a&&Object.keys(a).length>0){let l=Object.create(null);for(let[c,u]of Object.entries(a)){let f=n.group(u);f!==null&&(l[c]=f)}o.groups=l}return this._global&&(this._lastIndex=n.end(0),n.start(0)===n.end(0)&&this._lastIndex++),o}match(t){if(this._global&&(this._lastIndex=0),!this._global)return this.exec(t);let n=[],r=this._re2.matcher(t),s=0;for(;r.find(s);){let i=r.group(0)??"";if(n.push(i),s=r.end(0),r.start(0)===r.end(0)&&s++,s>t.length)break}return n.length>0?n:null}replace(t,n){if(this._global&&(this._lastIndex=0),typeof n=="string"){let c=this._re2.matcher(t);return this._global?c.replaceAll(n,!0):c.replaceFirst(n,!0)}let r=[],s=this._re2.matcher(t),i=0,o=0,a=this._re2.groupCount(),l=this._re2.namedGroups();for(;s.find(o);){r.push(t.slice(i,s.start(0)));let c=[],u=s.group(0)??"";for(let f=1;f<=a;f++)c.push(s.group(f));if(c.push(s.start(0)),c.push(t),l&&Object.keys(l).length>0){let f=Object.create(null);for(let[p,h]of Object.entries(l))f[p]=s.group(h)??"";c.push(f)}if(r.push(n(u,...c)),i=s.end(0),o=i,s.start(0)===s.end(0)&&o++,!this._global||o>t.length)break}return r.push(t.slice(i)),r.join("")}split(t,n){return n===void 0||n<0?this._re2.split(t,-1):n===0?[]:this._re2.split(t,-1).slice(0,n)}search(t){let n=this._re2.matcher(t);return n.find()?n.start(0):-1}*matchAll(t){if(!this._global)throw new Error("matchAll requires global flag");this._lastIndex=0;let n=this._re2.matcher(t),r=this._re2.groupCount(),s=this._re2.namedGroups(),i=0;for(;n.find(i);){let o=[];o.push(n.group(0)??"");for(let l=1;l<=r;l++)o.push(n.group(l));let a=o;if(a.index=n.start(0),a.input=t,s&&Object.keys(s).length>0){let l=Object.create(null);for(let[c,u]of Object.entries(s)){let f=n.group(u);f!==null&&(l[c]=f)}a.groups=l}if(yield a,i=n.end(0),n.start(0)===n.end(0)&&i++,i>t.length)break}}get native(){if(!this._nativeRegex)try{this._nativeRegex=new RegExp(this._pattern,this._flags)}catch{this._nativeRegex=new RegExp("",this._flags),Object.defineProperty(this._nativeRegex,"source",{value:this._pattern,writable:!1})}return this._nativeRegex}get source(){return this._pattern}get flags(){return this._flags}get global(){return this._global}get ignoreCase(){return this._ignoreCase}get multiline(){return this._multiline}get lastIndex(){return this._lastIndex}set lastIndex(t){this._lastIndex=t}};Jn=class{_regex;constructor(t){this._regex=t}test(t){return this._regex.global&&(this._regex.lastIndex=0),this._regex.test(t)}exec(t){return this._regex.exec(t)}match(t){return this._regex.global&&(this._regex.lastIndex=0),t.match(this._regex)}replace(t,n){return this._regex.global&&(this._regex.lastIndex=0),t.replace(this._regex,n)}split(t,n){return t.split(this._regex,n)}search(t){return t.search(this._regex)}*matchAll(t){if(!this._regex.global)throw new Error("matchAll requires global flag");this._regex.lastIndex=0;let n=this._regex.exec(t);for(;n!==null;)yield n,n[0].length===0&&this._regex.lastIndex++,n=this._regex.exec(t)}get native(){return this._regex}get source(){return this._regex.source}get flags(){return this._regex.flags}get global(){return this._regex.global}get ignoreCase(){return this._regex.ignoreCase}get multiline(){return this._regex.multiline}get lastIndex(){return this._regex.lastIndex}set lastIndex(t){this._regex.lastIndex=t}}});var Ze=k(()=>{"use strict";np()});function Dt(e,t,n){let r=typeof n=="boolean"?{ignoreCase:n}:n??{},s=t;r.stripQuotes&&(s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"))&&(s=s.slice(1,-1));let i=r.ignoreCase?`i:${s}`:s,o=Ys.get(i);if(!o){if(o=L3(s,r.ignoreCase),Ys.size>=F3){let a=Ys.keys().next().value;a!==void 0&&Ys.delete(a)}Ys.set(i,o)}return o.test(e)}function L3(e,t){let n="^";for(let r=0;r<e.length;r++){let s=e[r];if(s==="*")n+=".*";else if(s==="?")n+=".";else if(s==="["){let i=r+1;for(;i<e.length&&e[i]!=="]";)i++;n+=e.slice(r,i+1),r=i}else s==="."||s==="+"||s==="^"||s==="$"||s==="{"||s==="}"||s==="("||s===")"||s==="|"||s==="\\"?n+=`\\${s}`:n+=s}return n+="$",Q(n,t?"i":"")}var F3,Ys,gl=k(()=>{"use strict";Ze();F3=2048,Ys=new Map});function Qi(e,t){let n=e.ignoreCase?t.toLowerCase():t,r=e.needles;for(let s=0;s<r.length;s++)if(n.indexOf(r[s])!==-1)return!0;return!1}function rp(e,t){return e.replace(/\$(&|\d+|<([^>]+)>)/g,(n,r,s)=>{if(r==="&")return t[0];if(s!==void 0)return t.groups?.[s]??"";let i=parseInt(r,10);return t[i]??""})}function us(e,t,n={}){let{invertMatch:r=!1,showLineNumbers:s=!1,countOnly:i=!1,countMatches:o=!1,filename:a="",onlyMatching:l=!1,beforeContext:c=0,afterContext:u=0,maxCount:f=0,contextSeparator:p="--",showColumn:h=!1,vimgrep:d=!1,showByteOffset:m=!1,replace:g=null,passthru:y=!1,multiline:w=!1,kResetGroup:b,preFilter:x}=n;if(w)return M3(e,t,{invertMatch:r,showLineNumbers:s,countOnly:i,countMatches:o,filename:a,onlyMatching:l,beforeContext:c,afterContext:u,maxCount:f,contextSeparator:p,showColumn:h,showByteOffset:m,replace:g,kResetGroup:b});let S=e.split(`
180
- `),v=S.length,$=v>0&&S[v-1]===""?v-1:v;if(i||o){let O=0,I=(o||l)&&!r;for(let B=0;B<$;B++){let Z=S[B];if(!(x&&!r&&!Qi(x,Z)))if(t.lastIndex=0,I)for(let ae=t.exec(Z);ae!==null;ae=t.exec(Z))O++,ae[0].length===0&&t.lastIndex++;else t.test(Z)!==r&&O++}return{output:`${a?`${a}:${O}`:String(O)}
181
- `,matched:O>0,matchCount:O}}if(c===0&&u===0&&!y){let O=[],I=!1,L=0,B=0;for(let Z=0;Z<$&&!(f>0&&L>=f);Z++){let ae=S[Z],ye=null;if(x&&!Qi(x,ae)||(t.lastIndex=0,ye=t.exec(ae)),ye!==null!==r)if(I=!0,L++,l)for(let H=ye;H!==null;H=t.exec(ae)){let te=b!==void 0?H[b]??"":H[0],ve=g!==null?rp(g,H):te,ie=a?`${a}:`:"";m&&(ie+=`${B+H.index}:`),s&&(ie+=`${Z+1}:`),h&&(ie+=`${H.index+1}:`),O.push(ie+ve),H[0].length===0&&t.lastIndex++}else if(d)for(let H=ye;H!==null;H=t.exec(ae)){let te=a?`${a}:`:"";m&&(te+=`${B+H.index}:`),s&&(te+=`${Z+1}:`),h&&(te+=`${H.index+1}:`),O.push(te+ae),H[0].length===0&&t.lastIndex++}else{let H=ye?ye.index+1:1,te=ae;g!==null&&(t.lastIndex=0,te=t.replace(ae,(...ie)=>{if(ie[0].length===0)return"";let j=ie,Re=ie[ie.length-1];return typeof Re=="object"&&Re!==null?(j.groups=Re,j.input=ie[ie.length-2],j.index=ie[ie.length-3]):(j.input=ie[ie.length-1],j.index=ie[ie.length-2]),rp(g,j)}));let ve=a?`${a}:`:"";m&&(ve+=`${B+(ye?ye.index:0)}:`),s&&(ve+=`${Z+1}:`),h&&(ve+=`${H}:`),O.push(ve+te)}B+=ae.length+1}return{output:O.length>0?`${O.join(`
162
+ `,a=!0}}return{stdout:i,stderr:o,exitCode:a?1:0}}},O3={name:"stat",flags:[{flag:"-c",type:"value",valueHint:"format"},{flag:"-L",type:"boolean"}],needsArgs:!0}});var G,_,N,fn,ue,Te,ep,lr,Vi,el,ls,Bn,tl,nl,Ye,cs,je,rl,An,sl,qi,de,il,Zi,Qs,R3,P3,ol,al,F,ll,as,cl,ul,$e,_1,F1,L1,M1,U1,B1,W1,z1,H1,j1,G1,V1,q1,Z1,K1,Q1,X1,Y1,J1,Un,Xs,fl,pl,hl,dl,ml,cr,tp=k(()=>{G=class e{static FOLD_CASE=1;static LITERAL=2;static CLASS_NL=4;static DOT_NL=8;static ONE_LINE=16;static NON_GREEDY=32;static PERL_X=64;static UNICODE_GROUPS=128;static WAS_DOLLAR=256;static MATCH_NL=e.CLASS_NL|e.DOT_NL;static PERL=e.CLASS_NL|e.ONE_LINE|e.PERL_X|e.UNICODE_GROUPS;static POSIX=0;static UNANCHORED=0;static ANCHOR_START=1;static ANCHOR_BOTH=2},_=class{static CODES=new Map([["\x07",7],["\b",8],[" ",9],[`
163
+ `,10],["\v",11],["\f",12],["\r",13],[" ",32],['"',34],["$",36],["&",38],["(",40],[")",41],["*",42],["+",43],["-",45],[".",46],["0",48],["1",49],["2",50],["3",51],["4",52],["5",53],["6",54],["7",55],["8",56],["9",57],[":",58],["<",60],[">",62],["?",63],["A",65],["B",66],["C",67],["F",70],["P",80],["Q",81],["U",85],["Z",90],["[",91],["\\",92],["]",93],["^",94],["_",95],["a",97],["b",98],["f",102],["i",105],["m",109],["n",110],["r",114],["s",115],["t",116],["v",118],["x",120],["z",122],["{",123],["|",124],["}",125]]);static toUpperCase(t){let n=String.fromCodePoint(t).toUpperCase();if(n.length>1)return t;let r=String.fromCodePoint(n.codePointAt(0)).toLowerCase();return r.length>1||r.codePointAt(0)!==t?t:n.codePointAt(0)}static toLowerCase(t){let n=String.fromCodePoint(t).toLowerCase();if(n.length>1)return t;let r=String.fromCodePoint(n.codePointAt(0)).toUpperCase();return r.length>1||r.codePointAt(0)!==t?t:n.codePointAt(0)}},N=class{SIZE=3;constructor(t){this.data=t}getLo(t){return this.data[t*this.SIZE]}getHi(t){return this.data[t*this.SIZE+1]}getStride(t){return this.data[t*this.SIZE+2]}get(t){let n=t*this.SIZE;return[this.data[n],this.data[n+1],this.data[n+2]]}get length(){return this.data.length/this.SIZE}},fn=class e{static CASE_ORBIT=new Map([[75,107],[107,8490],[8490,75],[83,115],[115,383],[383,83],[181,924],[924,956],[956,181],[197,229],[229,8491],[8491,197],[452,453],[453,454],[454,452],[455,456],[456,457],[457,455],[458,459],[459,460],[460,458],[497,498],[498,499],[499,497],[837,921],[921,953],[953,8126],[8126,837],[914,946],[946,976],[976,914],[917,949],[949,1013],[1013,917],[920,952],[952,977],[977,1012],[1012,920],[922,954],[954,1008],[1008,922],[928,960],[960,982],[982,928],[929,961],[961,1009],[1009,929],[931,962],[962,963],[963,931],[934,966],[966,981],[981,934],[937,969],[969,8486],[8486,937],[1042,1074],[1074,7296],[7296,1042],[1044,1076],[1076,7297],[7297,1044],[1054,1086],[1086,7298],[7298,1054],[1057,1089],[1089,7299],[7299,1057],[1058,1090],[1090,7300],[7300,7301],[7301,1058],[1066,1098],[1098,7302],[7302,1066],[1122,1123],[1123,7303],[7303,1122],[7304,42570],[42570,42571],[42571,7304],[7776,7777],[7777,7835],[7835,7776],[223,7838],[7838,223],[8064,8072],[8072,8064],[8065,8073],[8073,8065],[8066,8074],[8074,8066],[8067,8075],[8075,8067],[8068,8076],[8076,8068],[8069,8077],[8077,8069],[8070,8078],[8078,8070],[8071,8079],[8079,8071],[8080,8088],[8088,8080],[8081,8089],[8089,8081],[8082,8090],[8090,8082],[8083,8091],[8091,8083],[8084,8092],[8092,8084],[8085,8093],[8093,8085],[8086,8094],[8094,8086],[8087,8095],[8095,8087],[8096,8104],[8104,8096],[8097,8105],[8105,8097],[8098,8106],[8106,8098],[8099,8107],[8107,8099],[8100,8108],[8108,8100],[8101,8109],[8109,8101],[8102,8110],[8110,8102],[8103,8111],[8111,8103],[8115,8124],[8124,8115],[8131,8140],[8140,8131],[912,8147],[8147,912],[944,8163],[8163,944],[8179,8188],[8188,8179],[64261,64262],[64262,64261],[66560,66600],[66600,66560],[66561,66601],[66601,66561],[66562,66602],[66602,66562],[66563,66603],[66603,66563],[66564,66604],[66604,66564],[66565,66605],[66605,66565],[66566,66606],[66606,66566],[66567,66607],[66607,66567],[66568,66608],[66608,66568],[66569,66609],[66609,66569],[66570,66610],[66610,66570],[66571,66611],[66611,66571],[66572,66612],[66612,66572],[66573,66613],[66613,66573],[66574,66614],[66614,66574],[66575,66615],[66615,66575],[66576,66616],[66616,66576],[66577,66617],[66617,66577],[66578,66618],[66618,66578],[66579,66619],[66619,66579],[66580,66620],[66620,66580],[66581,66621],[66621,66581],[66582,66622],[66622,66582],[66583,66623],[66623,66583],[66584,66624],[66624,66584],[66585,66625],[66625,66585],[66586,66626],[66626,66586],[66587,66627],[66627,66587],[66588,66628],[66628,66588],[66589,66629],[66629,66589],[66590,66630],[66630,66590],[66591,66631],[66631,66591],[66592,66632],[66632,66592],[66593,66633],[66633,66593],[66594,66634],[66634,66594],[66595,66635],[66635,66595],[66596,66636],[66636,66596],[66597,66637],[66637,66597],[66598,66638],[66638,66598],[66599,66639],[66639,66599],[66736,66776],[66776,66736],[66737,66777],[66777,66737],[66738,66778],[66778,66738],[66739,66779],[66779,66739],[66740,66780],[66780,66740],[66741,66781],[66781,66741],[66742,66782],[66782,66742],[66743,66783],[66783,66743],[66744,66784],[66784,66744],[66745,66785],[66785,66745],[66746,66786],[66786,66746],[66747,66787],[66787,66747],[66748,66788],[66788,66748],[66749,66789],[66789,66749],[66750,66790],[66790,66750],[66751,66791],[66791,66751],[66752,66792],[66792,66752],[66753,66793],[66793,66753],[66754,66794],[66794,66754],[66755,66795],[66795,66755],[66756,66796],[66796,66756],[66757,66797],[66797,66757],[66758,66798],[66798,66758],[66759,66799],[66799,66759],[66760,66800],[66800,66760],[66761,66801],[66801,66761],[66762,66802],[66802,66762],[66763,66803],[66803,66763],[66764,66804],[66804,66764],[66765,66805],[66805,66765],[66766,66806],[66806,66766],[66767,66807],[66807,66767],[66768,66808],[66808,66768],[66769,66809],[66809,66769],[66770,66810],[66810,66770],[66771,66811],[66811,66771],[66928,66967],[66967,66928],[66929,66968],[66968,66929],[66930,66969],[66969,66930],[66931,66970],[66970,66931],[66932,66971],[66971,66932],[66933,66972],[66972,66933],[66934,66973],[66973,66934],[66935,66974],[66974,66935],[66936,66975],[66975,66936],[66937,66976],[66976,66937],[66938,66977],[66977,66938],[66940,66979],[66979,66940],[66941,66980],[66980,66941],[66942,66981],[66981,66942],[66943,66982],[66982,66943],[66944,66983],[66983,66944],[66945,66984],[66984,66945],[66946,66985],[66985,66946],[66947,66986],[66986,66947],[66948,66987],[66987,66948],[66949,66988],[66988,66949],[66950,66989],[66989,66950],[66951,66990],[66990,66951],[66952,66991],[66991,66952],[66953,66992],[66992,66953],[66954,66993],[66993,66954],[66956,66995],[66995,66956],[66957,66996],[66996,66957],[66958,66997],[66997,66958],[66959,66998],[66998,66959],[66960,66999],[66999,66960],[66961,67e3],[67e3,66961],[66962,67001],[67001,66962],[66964,67003],[67003,66964],[66965,67004],[67004,66965],[68736,68800],[68800,68736],[68737,68801],[68801,68737],[68738,68802],[68802,68738],[68739,68803],[68803,68739],[68740,68804],[68804,68740],[68741,68805],[68805,68741],[68742,68806],[68806,68742],[68743,68807],[68807,68743],[68744,68808],[68808,68744],[68745,68809],[68809,68745],[68746,68810],[68810,68746],[68747,68811],[68811,68747],[68748,68812],[68812,68748],[68749,68813],[68813,68749],[68750,68814],[68814,68750],[68751,68815],[68815,68751],[68752,68816],[68816,68752],[68753,68817],[68817,68753],[68754,68818],[68818,68754],[68755,68819],[68819,68755],[68756,68820],[68820,68756],[68757,68821],[68821,68757],[68758,68822],[68822,68758],[68759,68823],[68823,68759],[68760,68824],[68824,68760],[68761,68825],[68825,68761],[68762,68826],[68826,68762],[68763,68827],[68827,68763],[68764,68828],[68828,68764],[68765,68829],[68829,68765],[68766,68830],[68830,68766],[68767,68831],[68831,68767],[68768,68832],[68832,68768],[68769,68833],[68833,68769],[68770,68834],[68834,68770],[68771,68835],[68835,68771],[68772,68836],[68836,68772],[68773,68837],[68837,68773],[68774,68838],[68838,68774],[68775,68839],[68839,68775],[68776,68840],[68840,68776],[68777,68841],[68841,68777],[68778,68842],[68842,68778],[68779,68843],[68843,68779],[68780,68844],[68844,68780],[68781,68845],[68845,68781],[68782,68846],[68846,68782],[68783,68847],[68847,68783],[68784,68848],[68848,68784],[68785,68849],[68849,68785],[68786,68850],[68850,68786],[68944,68976],[68976,68944],[68945,68977],[68977,68945],[68946,68978],[68978,68946],[68947,68979],[68979,68947],[68948,68980],[68980,68948],[68949,68981],[68981,68949],[68950,68982],[68982,68950],[68951,68983],[68983,68951],[68952,68984],[68984,68952],[68953,68985],[68985,68953],[68954,68986],[68986,68954],[68955,68987],[68987,68955],[68956,68988],[68988,68956],[68957,68989],[68989,68957],[68958,68990],[68990,68958],[68959,68991],[68991,68959],[68960,68992],[68992,68960],[68961,68993],[68993,68961],[68962,68994],[68994,68962],[68963,68995],[68995,68963],[68964,68996],[68996,68964],[68965,68997],[68997,68965],[71840,71872],[71872,71840],[71841,71873],[71873,71841],[71842,71874],[71874,71842],[71843,71875],[71875,71843],[71844,71876],[71876,71844],[71845,71877],[71877,71845],[71846,71878],[71878,71846],[71847,71879],[71879,71847],[71848,71880],[71880,71848],[71849,71881],[71881,71849],[71850,71882],[71882,71850],[71851,71883],[71883,71851],[71852,71884],[71884,71852],[71853,71885],[71885,71853],[71854,71886],[71886,71854],[71855,71887],[71887,71855],[71856,71888],[71888,71856],[71857,71889],[71889,71857],[71858,71890],[71890,71858],[71859,71891],[71891,71859],[71860,71892],[71892,71860],[71861,71893],[71893,71861],[71862,71894],[71894,71862],[71863,71895],[71895,71863],[71864,71896],[71896,71864],[71865,71897],[71897,71865],[71866,71898],[71898,71866],[71867,71899],[71899,71867],[71868,71900],[71900,71868],[71869,71901],[71901,71869],[71870,71902],[71902,71870],[71871,71903],[71903,71871],[93760,93792],[93792,93760],[93761,93793],[93793,93761],[93762,93794],[93794,93762],[93763,93795],[93795,93763],[93764,93796],[93796,93764],[93765,93797],[93797,93765],[93766,93798],[93798,93766],[93767,93799],[93799,93767],[93768,93800],[93800,93768],[93769,93801],[93801,93769],[93770,93802],[93802,93770],[93771,93803],[93803,93771],[93772,93804],[93804,93772],[93773,93805],[93805,93773],[93774,93806],[93806,93774],[93775,93807],[93807,93775],[93776,93808],[93808,93776],[93777,93809],[93809,93777],[93778,93810],[93810,93778],[93779,93811],[93811,93779],[93780,93812],[93812,93780],[93781,93813],[93813,93781],[93782,93814],[93814,93782],[93783,93815],[93815,93783],[93784,93816],[93816,93784],[93785,93817],[93817,93785],[93786,93818],[93818,93786],[93787,93819],[93819,93787],[93788,93820],[93820,93788],[93789,93821],[93821,93789],[93790,93822],[93822,93790],[93791,93823],[93823,93791],[125184,125218],[125218,125184],[125185,125219],[125219,125185],[125186,125220],[125220,125186],[125187,125221],[125221,125187],[125188,125222],[125222,125188],[125189,125223],[125223,125189],[125190,125224],[125224,125190],[125191,125225],[125225,125191],[125192,125226],[125226,125192],[125193,125227],[125227,125193],[125194,125228],[125228,125194],[125195,125229],[125229,125195],[125196,125230],[125230,125196],[125197,125231],[125231,125197],[125198,125232],[125232,125198],[125199,125233],[125233,125199],[125200,125234],[125234,125200],[125201,125235],[125235,125201],[125202,125236],[125236,125202],[125203,125237],[125237,125203],[125204,125238],[125238,125204],[125205,125239],[125239,125205],[125206,125240],[125240,125206],[125207,125241],[125241,125207],[125208,125242],[125242,125208],[125209,125243],[125243,125209],[125210,125244],[125244,125210],[125211,125245],[125245,125211],[125212,125246],[125246,125212],[125213,125247],[125247,125213],[125214,125248],[125248,125214],[125215,125249],[125249,125215],[125216,125250],[125250,125216],[125217,125251],[125251,125217]]);static C=new N(new Uint32Array([0,31,1,127,159,1,173,888,715,889,896,7,897,899,1,907,909,2,930,1328,398,1367,1368,1,1419,1420,1,1424,1480,56,1481,1487,1,1515,1518,1,1525,1541,1,1564,1757,193,1806,1807,1,1867,1868,1,1970,1983,1,2043,2044,1,2094,2095,1,2111,2140,29,2141,2143,2,2155,2159,1,2191,2198,1,2274,2436,162,2445,2446,1,2449,2450,1,2473,2481,8,2483,2485,1,2490,2491,1,2501,2502,1,2505,2506,1,2511,2518,1,2520,2523,1,2526,2532,6,2533,2559,26,2560,2564,4,2571,2574,1,2577,2578,1,2601,2609,8,2612,2618,3,2619,2621,2,2627,2630,1,2633,2634,1,2638,2640,1,2642,2648,1,2653,2655,2,2656,2661,1,2679,2688,1,2692,2702,10,2706,2729,23,2737,2740,3,2746,2747,1,2758,2766,4,2767,2769,2,2770,2783,1,2788,2789,1,2802,2808,1,2816,2820,4,2829,2830,1,2833,2834,1,2857,2865,8,2868,2874,6,2875,2885,10,2886,2889,3,2890,2894,4,2895,2900,1,2904,2907,1,2910,2916,6,2917,2936,19,2937,2945,1,2948,2955,7,2956,2957,1,2961,2966,5,2967,2968,1,2971,2973,2,2976,2978,1,2981,2983,1,2987,2989,1,3002,3005,1,3011,3013,1,3017,3022,5,3023,3025,2,3026,3030,1,3032,3045,1,3067,3071,1,3085,3089,4,3113,3130,17,3131,3141,10,3145,3150,5,3151,3156,1,3159,3163,4,3164,3166,2,3167,3172,5,3173,3184,11,3185,3190,1,3213,3217,4,3241,3252,11,3258,3259,1,3269,3273,4,3278,3284,1,3287,3292,1,3295,3300,5,3301,3312,11,3316,3327,1,3341,3345,4,3397,3401,4,3408,3411,1,3428,3429,1,3456,3460,4,3479,3481,1,3506,3516,10,3518,3519,1,3527,3529,1,3531,3534,1,3541,3543,2,3552,3557,1,3568,3569,1,3573,3584,1,3643,3646,1,3676,3712,1,3715,3717,2,3723,3748,25,3750,3774,24,3775,3781,6,3783,3791,8,3802,3803,1,3808,3839,1,3912,3949,37,3950,3952,1,3992,4029,37,4045,4059,14,4060,4095,1,4294,4296,2,4297,4300,1,4302,4303,1,4681,4686,5,4687,4695,8,4697,4702,5,4703,4745,42,4750,4751,1,4785,4790,5,4791,4799,8,4801,4806,5,4807,4823,16,4881,4886,5,4887,4955,68,4956,4989,33,4990,4991,1,5018,5023,1,5110,5111,1,5118,5119,1,5789,5791,1,5881,5887,1,5910,5918,1,5943,5951,1,5972,5983,1,5997,6001,4,6004,6015,1,6110,6111,1,6122,6127,1,6138,6143,1,6158,6170,12,6171,6175,1,6265,6271,1,6315,6319,1,6390,6399,1,6431,6444,13,6445,6447,1,6460,6463,1,6465,6467,1,6510,6511,1,6517,6527,1,6572,6575,1,6602,6607,1,6619,6621,1,6684,6685,1,6751,6781,30,6782,6794,12,6795,6799,1,6810,6815,1,6830,6831,1,6863,6911,1,6989,7156,167,7157,7163,1,7224,7226,1,7242,7244,1,7307,7311,1,7355,7356,1,7368,7375,1,7419,7423,1,7958,7959,1,7966,7967,1,8006,8007,1,8014,8015,1,8024,8030,2,8062,8063,1,8117,8133,16,8148,8149,1,8156,8176,20,8177,8181,4,8191,8203,12,8204,8207,1,8234,8238,1,8288,8303,1,8306,8307,1,8335,8349,14,8350,8351,1,8385,8399,1,8433,8447,1,8588,8591,1,9258,9279,1,9291,9311,1,11124,11125,1,11158,11508,350,11509,11512,1,11558,11560,2,11561,11564,1,11566,11567,1,11624,11630,1,11633,11646,1,11671,11679,1,11687,11743,8,11870,11903,1,11930,12020,90,12021,12031,1,12246,12271,1,12352,12439,87,12440,12544,104,12545,12548,1,12592,12687,95,12774,12782,1,12831,42125,29294,42126,42127,1,42183,42191,1,42540,42559,1,42744,42751,1,42958,42959,1,42962,42964,2,42973,42993,1,43053,43055,1,43066,43071,1,43128,43135,1,43206,43213,1,43226,43231,1,43348,43358,1,43389,43391,1,43470,43482,12,43483,43485,1,43519,43575,56,43576,43583,1,43598,43599,1,43610,43611,1,43715,43738,1,43767,43776,1,43783,43784,1,43791,43792,1,43799,43807,1,43815,43823,8,43884,43887,1,44014,44015,1,44026,44031,1,55204,55215,1,55239,55242,1,55292,63743,1,64110,64111,1,64218,64255,1,64263,64274,1,64280,64284,1,64311,64317,6,64319,64325,3,64451,64466,1,64912,64913,1,64968,64974,1,64976,65007,1,65050,65055,1,65107,65127,20,65132,65135,1,65141,65277,136,65278,65280,1,65471,65473,1,65480,65481,1,65488,65489,1,65496,65497,1,65501,65503,1,65511,65519,8,65520,65531,1,65534,65535,1,65548,65575,27,65595,65598,3,65614,65615,1,65630,65663,1,65787,65791,1,65795,65798,1,65844,65846,1,65935,65949,14,65950,65951,1,65953,65999,1,66046,66175,1,66205,66207,1,66257,66271,1,66300,66303,1,66340,66348,1,66379,66383,1,66427,66431,1,66462,66500,38,66501,66503,1,66518,66559,1,66718,66719,1,66730,66735,1,66772,66775,1,66812,66815,1,66856,66863,1,66916,66926,1,66939,66955,16,66963,66966,3,66978,66994,16,67002,67005,3,67006,67007,1,67060,67071,1,67383,67391,1,67414,67423,1,67432,67455,1,67462,67505,43,67515,67583,1,67590,67591,1,67593,67638,45,67641,67643,1,67645,67646,1,67670,67743,73,67744,67750,1,67760,67807,1,67827,67830,3,67831,67834,1,67868,67870,1,67898,67902,1,67904,67967,1,68024,68027,1,68048,68049,1,68100,68103,3,68104,68107,1,68116,68120,4,68150,68151,1,68155,68158,1,68169,68175,1,68185,68191,1,68256,68287,1,68327,68330,1,68343,68351,1,68406,68408,1,68438,68439,1,68467,68471,1,68498,68504,1,68509,68520,1,68528,68607,1,68681,68735,1,68787,68799,1,68851,68857,1,68904,68911,1,68922,68927,1,68966,68968,1,68998,69005,1,69008,69215,1,69247,69290,43,69294,69295,1,69298,69313,1,69317,69371,1,69416,69423,1,69466,69487,1,69514,69551,1,69580,69599,1,69623,69631,1,69710,69713,1,69750,69758,1,69821,69827,6,69828,69839,1,69865,69871,1,69882,69887,1,69941,69960,19,69961,69967,1,70007,70015,1,70112,70133,21,70134,70143,1,70162,70210,48,70211,70271,1,70279,70281,2,70286,70302,16,70314,70319,1,70379,70383,1,70394,70399,1,70404,70413,9,70414,70417,3,70418,70441,23,70449,70452,3,70458,70469,11,70470,70473,3,70474,70478,4,70479,70481,2,70482,70486,1,70488,70492,1,70500,70501,1,70509,70511,1,70517,70527,1,70538,70540,2,70541,70543,2,70582,70593,11,70595,70596,1,70598,70603,5,70614,70617,3,70618,70624,1,70627,70655,1,70748,70754,6,70755,70783,1,70856,70863,1,70874,71039,1,71094,71095,1,71134,71167,1,71237,71247,1,71258,71263,1,71277,71295,1,71354,71359,1,71370,71375,1,71396,71423,1,71451,71452,1,71468,71471,1,71495,71679,1,71740,71839,1,71923,71934,1,71943,71944,1,71946,71947,1,71956,71959,3,71990,71993,3,71994,72007,13,72008,72015,1,72026,72095,1,72104,72105,1,72152,72153,1,72165,72191,1,72264,72271,1,72355,72367,1,72441,72447,1,72458,72639,1,72674,72687,1,72698,72703,1,72713,72759,46,72774,72783,1,72813,72815,1,72848,72849,1,72872,72887,15,72888,72959,1,72967,72970,3,73015,73017,1,73019,73022,3,73032,73039,1,73050,73055,1,73062,73065,3,73103,73106,3,73113,73119,1,73130,73439,1,73465,73471,1,73489,73531,42,73532,73533,1,73563,73647,1,73649,73663,1,73714,73726,1,74650,74751,1,74863,74869,6,74870,74879,1,75076,77711,1,77811,77823,1,78896,78911,1,78934,78943,1,82939,82943,1,83527,90367,1,90426,92159,1,92729,92735,1,92767,92778,11,92779,92781,1,92863,92874,11,92875,92879,1,92910,92911,1,92918,92927,1,92998,93007,1,93018,93026,8,93048,93052,1,93072,93503,1,93562,93759,1,93851,93951,1,94027,94030,1,94088,94094,1,94112,94175,1,94181,94191,1,94194,94207,1,100344,100351,1,101590,101630,1,101641,110575,1,110580,110588,8,110591,110883,292,110884,110897,1,110899,110927,1,110931,110932,1,110934,110947,1,110952,110959,1,111356,113663,1,113771,113775,1,113789,113791,1,113801,113807,1,113818,113819,1,113824,117759,1,118010,118015,1,118452,118527,1,118574,118575,1,118599,118607,1,118724,118783,1,119030,119039,1,119079,119080,1,119155,119162,1,119275,119295,1,119366,119487,1,119508,119519,1,119540,119551,1,119639,119647,1,119673,119807,1,119893,119965,72,119968,119969,1,119971,119972,1,119975,119976,1,119981,119994,13,119996,120004,8,120070,120075,5,120076,120085,9,120093,120122,29,120127,120133,6,120135,120137,1,120145,120486,341,120487,120780,293,120781,121484,703,121485,121498,1,121504,121520,16,121521,122623,1,122655,122660,1,122667,122879,1,122887,122905,18,122906,122914,8,122917,122923,6,122924,122927,1,122990,123022,1,123024,123135,1,123181,123183,1,123198,123199,1,123210,123213,1,123216,123535,1,123567,123583,1,123642,123646,1,123648,124111,1,124154,124367,1,124411,124414,1,124416,124895,1,124903,124908,5,124911,124927,16,125125,125126,1,125143,125183,1,125260,125263,1,125274,125277,1,125280,126064,1,126133,126208,1,126270,126463,1,126468,126496,28,126499,126501,2,126502,126504,2,126515,126520,5,126522,126524,2,126525,126529,1,126531,126534,1,126536,126540,2,126544,126547,3,126549,126550,1,126552,126560,2,126563,126565,2,126566,126571,5,126579,126589,5,126591,126602,11,126620,126624,1,126628,126634,6,126652,126703,1,126706,126975,1,127020,127023,1,127124,127135,1,127151,127152,1,127168,127184,16,127222,127231,1,127406,127461,1,127491,127503,1,127548,127551,1,127561,127567,1,127570,127583,1,127590,127743,1,128728,128731,1,128749,128751,1,128765,128767,1,128887,128890,1,128986,128991,1,129004,129007,1,129009,129023,1,129036,129039,1,129096,129103,1,129114,129119,1,129160,129167,1,129198,129199,1,129212,129215,1,129218,129279,1,129620,129631,1,129646,129647,1,129661,129663,1,129674,129678,1,129735,129741,1,129757,129758,1,129770,129775,1,129785,129791,1,129939,130042,103,130043,131071,1,173792,173823,1,177978,177983,1,178206,178207,1,183970,183983,1,191457,191471,1,192094,194559,1,195102,196607,1,201547,201551,1,205744,917759,1,918e3,1114111,1]));static Cc=new N(new Uint32Array([0,31,1,127,159,1]));static Cf=new N(new Uint32Array([173,1536,1363,1537,1541,1,1564,1757,193,1807,2192,385,2193,2274,81,6158,8203,2045,8204,8207,1,8234,8238,1,8288,8292,1,8294,8303,1,65279,65529,250,65530,65531,1,69821,69837,16,78896,78911,1,113824,113827,1,119155,119162,1,917505,917536,31,917537,917631,1]));static Co=new N(new Uint32Array([57344,63743,1,983040,1048573,1,1048576,1114109,1]));static Cs=new N(new Uint32Array([55296,57343,1]));static L=new N(new Uint32Array([65,90,1,97,122,1,170,181,11,186,192,6,193,214,1,216,246,1,248,705,1,710,721,1,736,740,1,748,750,2,880,884,1,886,887,1,890,893,1,895,902,7,904,906,1,908,910,2,911,929,1,931,1013,1,1015,1153,1,1162,1327,1,1329,1366,1,1369,1376,7,1377,1416,1,1488,1514,1,1519,1522,1,1568,1610,1,1646,1647,1,1649,1747,1,1749,1765,16,1766,1774,8,1775,1786,11,1787,1788,1,1791,1808,17,1810,1839,1,1869,1957,1,1969,1994,25,1995,2026,1,2036,2037,1,2042,2048,6,2049,2069,1,2074,2084,10,2088,2112,24,2113,2136,1,2144,2154,1,2160,2183,1,2185,2190,1,2208,2249,1,2308,2361,1,2365,2384,19,2392,2401,1,2417,2432,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2493,2510,17,2524,2525,1,2527,2529,1,2544,2545,1,2556,2565,9,2566,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2649,2652,1,2654,2674,20,2675,2676,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2749,2768,19,2784,2785,1,2809,2821,12,2822,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2877,2908,31,2909,2911,2,2912,2913,1,2929,2947,18,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3024,3077,53,3078,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3133,3160,27,3161,3162,1,3165,3168,3,3169,3200,31,3205,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3261,3293,32,3294,3296,2,3297,3313,16,3314,3332,18,3333,3340,1,3342,3344,1,3346,3386,1,3389,3406,17,3412,3414,1,3423,3425,1,3450,3455,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3585,3632,1,3634,3635,1,3648,3654,1,3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3760,1,3762,3763,1,3773,3776,3,3777,3780,1,3782,3804,22,3805,3807,1,3840,3904,64,3905,3911,1,3913,3948,1,3976,3980,1,4096,4138,1,4159,4176,17,4177,4181,1,4186,4189,1,4193,4197,4,4198,4206,8,4207,4208,1,4213,4225,1,4238,4256,18,4257,4293,1,4295,4301,6,4304,4346,1,4348,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4992,5007,1,5024,5109,1,5112,5117,1,5121,5740,1,5743,5759,1,5761,5786,1,5792,5866,1,5873,5880,1,5888,5905,1,5919,5937,1,5952,5969,1,5984,5996,1,5998,6e3,1,6016,6067,1,6103,6108,5,6176,6264,1,6272,6276,1,6279,6312,1,6314,6320,6,6321,6389,1,6400,6430,1,6480,6509,1,6512,6516,1,6528,6571,1,6576,6601,1,6656,6678,1,6688,6740,1,6823,6917,94,6918,6963,1,6981,6988,1,7043,7072,1,7086,7087,1,7098,7141,1,7168,7203,1,7245,7247,1,7258,7293,1,7296,7306,1,7312,7354,1,7357,7359,1,7401,7404,1,7406,7411,1,7413,7414,1,7418,7424,6,7425,7615,1,7680,7957,1,7960,7965,1,7968,8005,1,8008,8013,1,8016,8023,1,8025,8031,2,8032,8061,1,8064,8116,1,8118,8124,1,8126,8130,4,8131,8132,1,8134,8140,1,8144,8147,1,8150,8155,1,8160,8172,1,8178,8180,1,8182,8188,1,8305,8319,14,8336,8348,1,8450,8455,5,8458,8467,1,8469,8473,4,8474,8477,1,8484,8490,2,8491,8493,1,8495,8505,1,8508,8511,1,8517,8521,1,8526,8579,53,8580,11264,2684,11265,11492,1,11499,11502,1,11506,11507,1,11520,11557,1,11559,11565,6,11568,11623,1,11631,11648,17,11649,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,11823,12293,470,12294,12337,43,12338,12341,1,12347,12348,1,12353,12438,1,12445,12447,1,12449,12538,1,12540,12543,1,12549,12591,1,12593,12686,1,12704,12735,1,12784,12799,1,13312,19903,1,19968,42124,1,42192,42237,1,42240,42508,1,42512,42527,1,42538,42539,1,42560,42606,1,42623,42653,1,42656,42725,1,42775,42783,1,42786,42888,1,42891,42957,1,42960,42961,1,42963,42965,2,42966,42972,1,42994,43009,1,43011,43013,1,43015,43018,1,43020,43042,1,43072,43123,1,43138,43187,1,43250,43255,1,43259,43261,2,43262,43274,12,43275,43301,1,43312,43334,1,43360,43388,1,43396,43442,1,43471,43488,17,43489,43492,1,43494,43503,1,43514,43518,1,43520,43560,1,43584,43586,1,43588,43595,1,43616,43638,1,43642,43646,4,43647,43695,1,43697,43701,4,43702,43705,3,43706,43709,1,43712,43714,2,43739,43741,1,43744,43754,1,43762,43764,1,43777,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,43824,43866,1,43868,43881,1,43888,44002,1,44032,55203,1,55216,55238,1,55243,55291,1,63744,64109,1,64112,64217,1,64256,64262,1,64275,64279,1,64285,64287,2,64288,64296,1,64298,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64433,1,64467,64829,1,64848,64911,1,64914,64967,1,65008,65019,1,65136,65140,1,65142,65276,1,65313,65338,1,65345,65370,1,65382,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1,65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1,66176,66204,1,66208,66256,1,66304,66335,1,66349,66368,1,66370,66377,1,66384,66421,1,66432,66461,1,66464,66499,1,66504,66511,1,66560,66717,1,66736,66771,1,66776,66811,1,66816,66855,1,66864,66915,1,66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,67008,67059,1,67072,67382,1,67392,67413,1,67424,67431,1,67456,67461,1,67463,67504,1,67506,67514,1,67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3,67648,67669,1,67680,67702,1,67712,67742,1,67808,67826,1,67828,67829,1,67840,67861,1,67872,67897,1,67968,68023,1,68030,68031,1,68096,68112,16,68113,68115,1,68117,68119,1,68121,68149,1,68192,68220,1,68224,68252,1,68288,68295,1,68297,68324,1,68352,68405,1,68416,68437,1,68448,68466,1,68480,68497,1,68608,68680,1,68736,68786,1,68800,68850,1,68864,68899,1,68938,68965,1,68975,68997,1,69248,69289,1,69296,69297,1,69314,69316,1,69376,69404,1,69415,69424,9,69425,69445,1,69488,69505,1,69552,69572,1,69600,69622,1,69635,69687,1,69745,69746,1,69749,69763,14,69764,69807,1,69840,69864,1,69891,69926,1,69956,69959,3,69968,70002,1,70006,70019,13,70020,70066,1,70081,70084,1,70106,70108,2,70144,70161,1,70163,70187,1,70207,70208,1,70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70312,1,70320,70366,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70461,70480,19,70493,70497,1,70528,70537,1,70539,70542,3,70544,70581,1,70583,70609,26,70611,70656,45,70657,70708,1,70727,70730,1,70751,70753,1,70784,70831,1,70852,70853,1,70855,71040,185,71041,71086,1,71128,71131,1,71168,71215,1,71236,71296,60,71297,71338,1,71352,71424,72,71425,71450,1,71488,71494,1,71680,71723,1,71840,71903,1,71935,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71983,1,71999,72001,2,72096,72103,1,72106,72144,1,72161,72163,2,72192,72203,11,72204,72242,1,72250,72272,22,72284,72329,1,72349,72368,19,72369,72440,1,72640,72672,1,72704,72712,1,72714,72750,1,72768,72818,50,72819,72847,1,72960,72966,1,72968,72969,1,72971,73008,1,73030,73056,26,73057,73061,1,73063,73064,1,73066,73097,1,73112,73440,328,73441,73458,1,73474,73476,2,73477,73488,1,73490,73523,1,73648,73728,80,73729,74649,1,74880,75075,1,77712,77808,1,77824,78895,1,78913,78918,1,78944,82938,1,82944,83526,1,90368,90397,1,92160,92728,1,92736,92766,1,92784,92862,1,92880,92909,1,92928,92975,1,92992,92995,1,93027,93047,1,93053,93071,1,93504,93548,1,93760,93823,1,93952,94026,1,94032,94099,67,94100,94111,1,94176,94177,1,94179,94208,29,94209,100343,1,100352,101589,1,101631,101640,1,110576,110579,1,110581,110587,1,110589,110590,1,110592,110882,1,110898,110928,30,110929,110930,1,110933,110948,15,110949,110951,1,110960,111355,1,113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,119808,119892,1,119894,119964,1,119966,119967,1,119970,119973,3,119974,119977,3,119978,119980,1,119982,119993,1,119995,119997,2,119998,120003,1,120005,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120094,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120146,120485,1,120488,120512,1,120514,120538,1,120540,120570,1,120572,120596,1,120598,120628,1,120630,120654,1,120656,120686,1,120688,120712,1,120714,120744,1,120746,120770,1,120772,120779,1,122624,122654,1,122661,122666,1,122928,122989,1,123136,123180,1,123191,123197,1,123214,123536,322,123537,123565,1,123584,123627,1,124112,124139,1,124368,124397,1,124400,124896,496,124897,124902,1,124904,124907,1,124909,124910,1,124912,124926,1,124928,125124,1,125184,125251,1,125259,126464,1205,126465,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1]));static foldL=new N(new Uint32Array([837,837,1]));static Ll=new N(new Uint32Array([97,122,1,181,223,42,224,246,1,248,255,1,257,311,2,312,328,2,329,375,2,378,382,2,383,384,1,387,389,2,392,396,4,397,402,5,405,409,4,410,411,1,414,417,3,419,421,2,424,426,2,427,429,2,432,436,4,438,441,3,442,445,3,446,447,1,454,460,3,462,476,2,477,495,2,496,499,3,501,505,4,507,563,2,564,569,1,572,575,3,576,578,2,583,591,2,592,659,1,661,687,1,881,883,2,887,891,4,892,893,1,912,940,28,941,974,1,976,977,1,981,983,1,985,1007,2,1008,1011,1,1013,1019,3,1020,1072,52,1073,1119,1,1121,1153,2,1163,1215,2,1218,1230,2,1231,1327,2,1376,1416,1,4304,4346,1,4349,4351,1,5112,5117,1,7296,7304,1,7306,7424,118,7425,7467,1,7531,7543,1,7545,7578,1,7681,7829,2,7830,7837,1,7839,7935,2,7936,7943,1,7952,7957,1,7968,7975,1,7984,7991,1,8e3,8005,1,8016,8023,1,8032,8039,1,8048,8061,1,8064,8071,1,8080,8087,1,8096,8103,1,8112,8116,1,8118,8119,1,8126,8130,4,8131,8132,1,8134,8135,1,8144,8147,1,8150,8151,1,8160,8167,1,8178,8180,1,8182,8183,1,8458,8462,4,8463,8467,4,8495,8505,5,8508,8509,1,8518,8521,1,8526,8580,54,11312,11359,1,11361,11365,4,11366,11372,2,11377,11379,2,11380,11382,2,11383,11387,1,11393,11491,2,11492,11500,8,11502,11507,5,11520,11557,1,11559,11565,6,42561,42605,2,42625,42651,2,42787,42799,2,42800,42801,1,42803,42865,2,42866,42872,1,42874,42876,2,42879,42887,2,42892,42894,2,42897,42899,2,42900,42901,1,42903,42921,2,42927,42933,6,42935,42947,2,42952,42954,2,42957,42961,4,42963,42971,2,42998,43002,4,43824,43866,1,43872,43880,1,43888,43967,1,64256,64262,1,64275,64279,1,65345,65370,1,66600,66639,1,66776,66811,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,68800,68850,1,68976,68997,1,71872,71903,1,93792,93823,1,119834,119859,1,119886,119892,1,119894,119911,1,119938,119963,1,119990,119993,1,119995,119997,2,119998,120003,1,120005,120015,1,120042,120067,1,120094,120119,1,120146,120171,1,120198,120223,1,120250,120275,1,120302,120327,1,120354,120379,1,120406,120431,1,120458,120485,1,120514,120538,1,120540,120545,1,120572,120596,1,120598,120603,1,120630,120654,1,120656,120661,1,120688,120712,1,120714,120719,1,120746,120770,1,120772,120777,1,120779,122624,1845,122625,122633,1,122635,122654,1,122661,122666,1,125218,125251,1]));static foldLl=new N(new Uint32Array([65,90,1,192,214,1,216,222,1,256,302,2,306,310,2,313,327,2,330,376,2,377,381,2,385,386,1,388,390,2,391,393,2,394,395,1,398,401,1,403,404,1,406,408,1,412,413,1,415,416,1,418,422,2,423,425,2,428,430,2,431,433,2,434,435,1,437,439,2,440,444,4,452,453,1,455,456,1,458,459,1,461,475,2,478,494,2,497,498,1,500,502,2,503,504,1,506,562,2,570,571,1,573,574,1,577,579,2,580,582,1,584,590,2,837,880,43,882,886,4,895,902,7,904,906,1,908,910,2,911,913,2,914,929,1,931,939,1,975,984,9,986,1006,2,1012,1015,3,1017,1018,1,1021,1071,1,1120,1152,2,1162,1216,2,1217,1229,2,1232,1326,2,1329,1366,1,4256,4293,1,4295,4301,6,5024,5109,1,7305,7312,7,7313,7354,1,7357,7359,1,7680,7828,2,7838,7934,2,7944,7951,1,7960,7965,1,7976,7983,1,7992,7999,1,8008,8013,1,8025,8031,2,8040,8047,1,8072,8079,1,8088,8095,1,8104,8111,1,8120,8124,1,8136,8140,1,8152,8155,1,8168,8172,1,8184,8188,1,8486,8490,4,8491,8498,7,8579,11264,2685,11265,11311,1,11360,11362,2,11363,11364,1,11367,11373,2,11374,11376,1,11378,11381,3,11390,11392,1,11394,11490,2,11499,11501,2,11506,42560,31054,42562,42604,2,42624,42650,2,42786,42798,2,42802,42862,2,42873,42877,2,42878,42886,2,42891,42893,2,42896,42898,2,42902,42922,2,42923,42926,1,42928,42932,1,42934,42948,2,42949,42951,1,42953,42955,2,42956,42960,4,42966,42972,2,42997,65313,22316,65314,65338,1,66560,66599,1,66736,66771,1,66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,68736,68786,1,68944,68965,1,71840,71871,1,93760,93791,1,125184,125217,1]));static Lm=new N(new Uint32Array([688,705,1,710,721,1,736,740,1,748,750,2,884,890,6,1369,1600,231,1765,1766,1,2036,2037,1,2042,2074,32,2084,2088,4,2249,2417,168,3654,3782,128,4348,6103,1755,6211,6823,612,7288,7293,1,7468,7530,1,7544,7579,35,7580,7615,1,8305,8319,14,8336,8348,1,11388,11389,1,11631,11823,192,12293,12337,44,12338,12341,1,12347,12445,98,12446,12540,94,12541,12542,1,40981,42232,1251,42233,42237,1,42508,42623,115,42652,42653,1,42775,42783,1,42864,42888,24,42994,42996,1,43e3,43001,1,43471,43494,23,43632,43741,109,43763,43764,1,43868,43871,1,43881,65392,21511,65438,65439,1,67456,67461,1,67463,67504,1,67506,67514,1,68942,68975,33,92992,92995,1,93504,93506,1,93547,93548,1,94099,94111,1,94176,94177,1,94179,110576,16397,110577,110579,1,110581,110587,1,110589,110590,1,122928,122989,1,123191,123197,1,124139,125259,1120]));static Lo=new N(new Uint32Array([170,186,16,443,448,5,449,451,1,660,1488,828,1489,1514,1,1519,1522,1,1568,1599,1,1601,1610,1,1646,1647,1,1649,1747,1,1749,1774,25,1775,1786,11,1787,1788,1,1791,1808,17,1810,1839,1,1869,1957,1,1969,1994,25,1995,2026,1,2048,2069,1,2112,2136,1,2144,2154,1,2160,2183,1,2185,2190,1,2208,2248,1,2308,2361,1,2365,2384,19,2392,2401,1,2418,2432,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2493,2510,17,2524,2525,1,2527,2529,1,2544,2545,1,2556,2565,9,2566,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2649,2652,1,2654,2674,20,2675,2676,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2749,2768,19,2784,2785,1,2809,2821,12,2822,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2877,2908,31,2909,2911,2,2912,2913,1,2929,2947,18,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3024,3077,53,3078,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3133,3160,27,3161,3162,1,3165,3168,3,3169,3200,31,3205,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3261,3293,32,3294,3296,2,3297,3313,16,3314,3332,18,3333,3340,1,3342,3344,1,3346,3386,1,3389,3406,17,3412,3414,1,3423,3425,1,3450,3455,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3585,3632,1,3634,3635,1,3648,3653,1,3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3760,1,3762,3763,1,3773,3776,3,3777,3780,1,3804,3807,1,3840,3904,64,3905,3911,1,3913,3948,1,3976,3980,1,4096,4138,1,4159,4176,17,4177,4181,1,4186,4189,1,4193,4197,4,4198,4206,8,4207,4208,1,4213,4225,1,4238,4352,114,4353,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4992,5007,1,5121,5740,1,5743,5759,1,5761,5786,1,5792,5866,1,5873,5880,1,5888,5905,1,5919,5937,1,5952,5969,1,5984,5996,1,5998,6e3,1,6016,6067,1,6108,6176,68,6177,6210,1,6212,6264,1,6272,6276,1,6279,6312,1,6314,6320,6,6321,6389,1,6400,6430,1,6480,6509,1,6512,6516,1,6528,6571,1,6576,6601,1,6656,6678,1,6688,6740,1,6917,6963,1,6981,6988,1,7043,7072,1,7086,7087,1,7098,7141,1,7168,7203,1,7245,7247,1,7258,7287,1,7401,7404,1,7406,7411,1,7413,7414,1,7418,8501,1083,8502,8504,1,11568,11623,1,11648,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,12294,12348,54,12353,12438,1,12447,12449,2,12450,12538,1,12543,12549,6,12550,12591,1,12593,12686,1,12704,12735,1,12784,12799,1,13312,19903,1,19968,40980,1,40982,42124,1,42192,42231,1,42240,42507,1,42512,42527,1,42538,42539,1,42606,42656,50,42657,42725,1,42895,42999,104,43003,43009,1,43011,43013,1,43015,43018,1,43020,43042,1,43072,43123,1,43138,43187,1,43250,43255,1,43259,43261,2,43262,43274,12,43275,43301,1,43312,43334,1,43360,43388,1,43396,43442,1,43488,43492,1,43495,43503,1,43514,43518,1,43520,43560,1,43584,43586,1,43588,43595,1,43616,43631,1,43633,43638,1,43642,43646,4,43647,43695,1,43697,43701,4,43702,43705,3,43706,43709,1,43712,43714,2,43739,43740,1,43744,43754,1,43762,43777,15,43778,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,43968,44002,1,44032,55203,1,55216,55238,1,55243,55291,1,63744,64109,1,64112,64217,1,64285,64287,2,64288,64296,1,64298,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64433,1,64467,64829,1,64848,64911,1,64914,64967,1,65008,65019,1,65136,65140,1,65142,65276,1,65382,65391,1,65393,65437,1,65440,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1,65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1,66176,66204,1,66208,66256,1,66304,66335,1,66349,66368,1,66370,66377,1,66384,66421,1,66432,66461,1,66464,66499,1,66504,66511,1,66640,66717,1,66816,66855,1,66864,66915,1,67008,67059,1,67072,67382,1,67392,67413,1,67424,67431,1,67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3,67648,67669,1,67680,67702,1,67712,67742,1,67808,67826,1,67828,67829,1,67840,67861,1,67872,67897,1,67968,68023,1,68030,68031,1,68096,68112,16,68113,68115,1,68117,68119,1,68121,68149,1,68192,68220,1,68224,68252,1,68288,68295,1,68297,68324,1,68352,68405,1,68416,68437,1,68448,68466,1,68480,68497,1,68608,68680,1,68864,68899,1,68938,68941,1,68943,69248,305,69249,69289,1,69296,69297,1,69314,69316,1,69376,69404,1,69415,69424,9,69425,69445,1,69488,69505,1,69552,69572,1,69600,69622,1,69635,69687,1,69745,69746,1,69749,69763,14,69764,69807,1,69840,69864,1,69891,69926,1,69956,69959,3,69968,70002,1,70006,70019,13,70020,70066,1,70081,70084,1,70106,70108,2,70144,70161,1,70163,70187,1,70207,70208,1,70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70312,1,70320,70366,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70461,70480,19,70493,70497,1,70528,70537,1,70539,70542,3,70544,70581,1,70583,70609,26,70611,70656,45,70657,70708,1,70727,70730,1,70751,70753,1,70784,70831,1,70852,70853,1,70855,71040,185,71041,71086,1,71128,71131,1,71168,71215,1,71236,71296,60,71297,71338,1,71352,71424,72,71425,71450,1,71488,71494,1,71680,71723,1,71935,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71983,1,71999,72001,2,72096,72103,1,72106,72144,1,72161,72163,2,72192,72203,11,72204,72242,1,72250,72272,22,72284,72329,1,72349,72368,19,72369,72440,1,72640,72672,1,72704,72712,1,72714,72750,1,72768,72818,50,72819,72847,1,72960,72966,1,72968,72969,1,72971,73008,1,73030,73056,26,73057,73061,1,73063,73064,1,73066,73097,1,73112,73440,328,73441,73458,1,73474,73476,2,73477,73488,1,73490,73523,1,73648,73728,80,73729,74649,1,74880,75075,1,77712,77808,1,77824,78895,1,78913,78918,1,78944,82938,1,82944,83526,1,90368,90397,1,92160,92728,1,92736,92766,1,92784,92862,1,92880,92909,1,92928,92975,1,93027,93047,1,93053,93071,1,93507,93546,1,93952,94026,1,94032,94208,176,94209,100343,1,100352,101589,1,101631,101640,1,110592,110882,1,110898,110928,30,110929,110930,1,110933,110948,15,110949,110951,1,110960,111355,1,113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,122634,123136,502,123137,123180,1,123214,123536,322,123537,123565,1,123584,123627,1,124112,124138,1,124368,124397,1,124400,124896,496,124897,124902,1,124904,124907,1,124909,124910,1,124912,124926,1,124928,125124,1,126464,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1]));static Lt=new N(new Uint32Array([453,459,3,498,8072,7574,8073,8079,1,8088,8095,1,8104,8111,1,8124,8140,16,8188,8188,1]));static foldLt=new N(new Uint32Array([452,454,2,455,457,2,458,460,2,497,499,2,8064,8071,1,8080,8087,1,8096,8103,1,8115,8131,16,8179,8179,1]));static Lu=new N(new Uint32Array([65,90,1,192,214,1,216,222,1,256,310,2,313,327,2,330,376,2,377,381,2,385,386,1,388,390,2,391,393,2,394,395,1,398,401,1,403,404,1,406,408,1,412,413,1,415,416,1,418,422,2,423,425,2,428,430,2,431,433,2,434,435,1,437,439,2,440,444,4,452,461,3,463,475,2,478,494,2,497,500,3,502,504,1,506,562,2,570,571,1,573,574,1,577,579,2,580,582,1,584,590,2,880,882,2,886,895,9,902,904,2,905,906,1,908,910,2,911,913,2,914,929,1,931,939,1,975,978,3,979,980,1,984,1006,2,1012,1015,3,1017,1018,1,1021,1071,1,1120,1152,2,1162,1216,2,1217,1229,2,1232,1326,2,1329,1366,1,4256,4293,1,4295,4301,6,5024,5109,1,7305,7312,7,7313,7354,1,7357,7359,1,7680,7828,2,7838,7934,2,7944,7951,1,7960,7965,1,7976,7983,1,7992,7999,1,8008,8013,1,8025,8031,2,8040,8047,1,8120,8123,1,8136,8139,1,8152,8155,1,8168,8172,1,8184,8187,1,8450,8455,5,8459,8461,1,8464,8466,1,8469,8473,4,8474,8477,1,8484,8490,2,8491,8493,1,8496,8499,1,8510,8511,1,8517,8579,62,11264,11311,1,11360,11362,2,11363,11364,1,11367,11373,2,11374,11376,1,11378,11381,3,11390,11392,1,11394,11490,2,11499,11501,2,11506,42560,31054,42562,42604,2,42624,42650,2,42786,42798,2,42802,42862,2,42873,42877,2,42878,42886,2,42891,42893,2,42896,42898,2,42902,42922,2,42923,42926,1,42928,42932,1,42934,42948,2,42949,42951,1,42953,42955,2,42956,42960,4,42966,42972,2,42997,65313,22316,65314,65338,1,66560,66599,1,66736,66771,1,66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,68736,68786,1,68944,68965,1,71840,71871,1,93760,93791,1,119808,119833,1,119860,119885,1,119912,119937,1,119964,119966,2,119967,119973,3,119974,119977,3,119978,119980,1,119982,119989,1,120016,120041,1,120068,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120120,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120172,120197,1,120224,120249,1,120276,120301,1,120328,120353,1,120380,120405,1,120432,120457,1,120488,120512,1,120546,120570,1,120604,120628,1,120662,120686,1,120720,120744,1,120778,125184,4406,125185,125217,1]));static Upper=this.Lu;static foldLu=new N(new Uint32Array([97,122,1,181,223,42,224,246,1,248,255,1,257,303,2,307,311,2,314,328,2,331,375,2,378,382,2,383,384,1,387,389,2,392,396,4,402,405,3,409,411,1,414,417,3,419,421,2,424,429,5,432,436,4,438,441,3,445,447,2,453,454,1,456,457,1,459,460,1,462,476,2,477,495,2,498,499,1,501,505,4,507,543,2,547,563,2,572,575,3,576,578,2,583,591,2,592,596,1,598,599,1,601,603,2,604,608,4,609,611,2,612,614,1,616,620,1,623,625,2,626,629,3,637,640,3,642,643,1,647,652,1,658,669,11,670,837,167,881,883,2,887,891,4,892,893,1,940,943,1,945,974,1,976,977,1,981,983,1,985,1007,2,1008,1011,1,1013,1019,3,1072,1119,1,1121,1153,2,1163,1215,2,1218,1230,2,1231,1327,2,1377,1414,1,4304,4346,1,4349,4351,1,5112,5117,1,7296,7304,1,7306,7545,239,7549,7566,17,7681,7829,2,7835,7841,6,7843,7935,2,7936,7943,1,7952,7957,1,7968,7975,1,7984,7991,1,8e3,8005,1,8017,8023,2,8032,8039,1,8048,8061,1,8112,8113,1,8126,8144,18,8145,8160,15,8161,8165,4,8526,8580,54,11312,11359,1,11361,11365,4,11366,11372,2,11379,11382,3,11393,11491,2,11500,11502,2,11507,11520,13,11521,11557,1,11559,11565,6,42561,42605,2,42625,42651,2,42787,42799,2,42803,42863,2,42874,42876,2,42879,42887,2,42892,42897,5,42899,42900,1,42903,42921,2,42933,42947,2,42952,42954,2,42957,42961,4,42967,42971,2,42998,43859,861,43888,43967,1,65345,65370,1,66600,66639,1,66776,66811,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,68800,68850,1,68976,68997,1,71872,71903,1,93792,93823,1,125218,125251,1]));static M=new N(new Uint32Array([768,879,1,1155,1161,1,1425,1469,1,1471,1473,2,1474,1476,2,1477,1479,2,1552,1562,1,1611,1631,1,1648,1750,102,1751,1756,1,1759,1764,1,1767,1768,1,1770,1773,1,1809,1840,31,1841,1866,1,1958,1968,1,2027,2035,1,2045,2070,25,2071,2073,1,2075,2083,1,2085,2087,1,2089,2093,1,2137,2139,1,2199,2207,1,2250,2273,1,2275,2307,1,2362,2364,1,2366,2383,1,2385,2391,1,2402,2403,1,2433,2435,1,2492,2494,2,2495,2500,1,2503,2504,1,2507,2509,1,2519,2530,11,2531,2558,27,2561,2563,1,2620,2622,2,2623,2626,1,2631,2632,1,2635,2637,1,2641,2672,31,2673,2677,4,2689,2691,1,2748,2750,2,2751,2757,1,2759,2761,1,2763,2765,1,2786,2787,1,2810,2815,1,2817,2819,1,2876,2878,2,2879,2884,1,2887,2888,1,2891,2893,1,2901,2903,1,2914,2915,1,2946,3006,60,3007,3010,1,3014,3016,1,3018,3021,1,3031,3072,41,3073,3076,1,3132,3134,2,3135,3140,1,3142,3144,1,3146,3149,1,3157,3158,1,3170,3171,1,3201,3203,1,3260,3262,2,3263,3268,1,3270,3272,1,3274,3277,1,3285,3286,1,3298,3299,1,3315,3328,13,3329,3331,1,3387,3388,1,3390,3396,1,3398,3400,1,3402,3405,1,3415,3426,11,3427,3457,30,3458,3459,1,3530,3535,5,3536,3540,1,3542,3544,2,3545,3551,1,3570,3571,1,3633,3636,3,3637,3642,1,3655,3662,1,3761,3764,3,3765,3772,1,3784,3790,1,3864,3865,1,3893,3897,2,3902,3903,1,3953,3972,1,3974,3975,1,3981,3991,1,3993,4028,1,4038,4139,101,4140,4158,1,4182,4185,1,4190,4192,1,4194,4196,1,4199,4205,1,4209,4212,1,4226,4237,1,4239,4250,11,4251,4253,1,4957,4959,1,5906,5909,1,5938,5940,1,5970,5971,1,6002,6003,1,6068,6099,1,6109,6155,46,6156,6157,1,6159,6277,118,6278,6313,35,6432,6443,1,6448,6459,1,6679,6683,1,6741,6750,1,6752,6780,1,6783,6832,49,6833,6862,1,6912,6916,1,6964,6980,1,7019,7027,1,7040,7042,1,7073,7085,1,7142,7155,1,7204,7223,1,7376,7378,1,7380,7400,1,7405,7412,7,7415,7417,1,7616,7679,1,8400,8432,1,11503,11505,1,11647,11744,97,11745,11775,1,12330,12335,1,12441,12442,1,42607,42610,1,42612,42621,1,42654,42655,1,42736,42737,1,43010,43014,4,43019,43043,24,43044,43047,1,43052,43136,84,43137,43188,51,43189,43205,1,43232,43249,1,43263,43302,39,43303,43309,1,43335,43347,1,43392,43395,1,43443,43456,1,43493,43561,68,43562,43574,1,43587,43596,9,43597,43643,46,43644,43645,1,43696,43698,2,43699,43700,1,43703,43704,1,43710,43711,1,43713,43755,42,43756,43759,1,43765,43766,1,44003,44010,1,44012,44013,1,64286,65024,738,65025,65039,1,65056,65071,1,66045,66272,227,66422,66426,1,68097,68099,1,68101,68102,1,68108,68111,1,68152,68154,1,68159,68325,166,68326,68900,574,68901,68903,1,68969,68973,1,69291,69292,1,69372,69375,1,69446,69456,1,69506,69509,1,69632,69634,1,69688,69702,1,69744,69747,3,69748,69759,11,69760,69762,1,69808,69818,1,69826,69888,62,69889,69890,1,69927,69940,1,69957,69958,1,70003,70016,13,70017,70018,1,70067,70080,1,70089,70092,1,70094,70095,1,70188,70199,1,70206,70209,3,70367,70378,1,70400,70403,1,70459,70460,1,70462,70468,1,70471,70472,1,70475,70477,1,70487,70498,11,70499,70502,3,70503,70508,1,70512,70516,1,70584,70592,1,70594,70597,3,70599,70602,1,70604,70608,1,70610,70625,15,70626,70709,83,70710,70726,1,70750,70832,82,70833,70851,1,71087,71093,1,71096,71104,1,71132,71133,1,71216,71232,1,71339,71351,1,71453,71467,1,71724,71738,1,71984,71989,1,71991,71992,1,71995,71998,1,72e3,72002,2,72003,72145,142,72146,72151,1,72154,72160,1,72164,72193,29,72194,72202,1,72243,72249,1,72251,72254,1,72263,72273,10,72274,72283,1,72330,72345,1,72751,72758,1,72760,72767,1,72850,72871,1,72873,72886,1,73009,73014,1,73018,73020,2,73021,73023,2,73024,73029,1,73031,73098,67,73099,73102,1,73104,73105,1,73107,73111,1,73459,73462,1,73472,73473,1,73475,73524,49,73525,73530,1,73534,73538,1,73562,78912,5350,78919,78933,1,90398,90415,1,92912,92916,1,92976,92982,1,94031,94033,2,94034,94087,1,94095,94098,1,94180,94192,12,94193,113821,19628,113822,118528,4706,118529,118573,1,118576,118598,1,119141,119145,1,119149,119154,1,119163,119170,1,119173,119179,1,119210,119213,1,119362,119364,1,121344,121398,1,121403,121452,1,121461,121476,15,121499,121503,1,121505,121519,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1,123023,123184,161,123185,123190,1,123566,123628,62,123629,123631,1,124140,124143,1,124398,124399,1,125136,125142,1,125252,125258,1,917760,917999,1]));static foldM=new N(new Uint32Array([921,953,32,8126,8126,1]));static Mc=new N(new Uint32Array([2307,2363,56,2366,2368,1,2377,2380,1,2382,2383,1,2434,2435,1,2494,2496,1,2503,2504,1,2507,2508,1,2519,2563,44,2622,2624,1,2691,2750,59,2751,2752,1,2761,2763,2,2764,2818,54,2819,2878,59,2880,2887,7,2888,2891,3,2892,2903,11,3006,3007,1,3009,3010,1,3014,3016,1,3018,3020,1,3031,3073,42,3074,3075,1,3137,3140,1,3202,3203,1,3262,3264,2,3265,3268,1,3271,3272,1,3274,3275,1,3285,3286,1,3315,3330,15,3331,3390,59,3391,3392,1,3398,3400,1,3402,3404,1,3415,3458,43,3459,3535,76,3536,3537,1,3544,3551,1,3570,3571,1,3902,3903,1,3967,4139,172,4140,4145,5,4152,4155,3,4156,4182,26,4183,4194,11,4195,4196,1,4199,4205,1,4227,4228,1,4231,4236,1,4239,4250,11,4251,4252,1,5909,5940,31,6070,6078,8,6079,6085,1,6087,6088,1,6435,6438,1,6441,6443,1,6448,6449,1,6451,6456,1,6681,6682,1,6741,6743,2,6753,6755,2,6756,6765,9,6766,6770,1,6916,6965,49,6971,6973,2,6974,6977,1,6979,6980,1,7042,7073,31,7078,7079,1,7082,7143,61,7146,7148,1,7150,7154,4,7155,7204,49,7205,7211,1,7220,7221,1,7393,7415,22,12334,12335,1,43043,43044,1,43047,43136,89,43137,43188,51,43189,43203,1,43346,43347,1,43395,43444,49,43445,43450,5,43451,43454,3,43455,43456,1,43567,43568,1,43571,43572,1,43597,43643,46,43645,43755,110,43758,43759,1,43765,44003,238,44004,44006,2,44007,44009,2,44010,44012,2,69632,69634,2,69762,69808,46,69809,69810,1,69815,69816,1,69932,69957,25,69958,70018,60,70067,70069,1,70079,70080,1,70094,70188,94,70189,70190,1,70194,70195,1,70197,70368,171,70369,70370,1,70402,70403,1,70462,70463,1,70465,70468,1,70471,70472,1,70475,70477,1,70487,70498,11,70499,70584,85,70585,70586,1,70594,70597,3,70599,70602,1,70604,70605,1,70607,70709,102,70710,70711,1,70720,70721,1,70725,70832,107,70833,70834,1,70841,70843,2,70844,70846,1,70849,71087,238,71088,71089,1,71096,71099,1,71102,71216,114,71217,71218,1,71227,71228,1,71230,71340,110,71342,71343,1,71350,71454,104,71456,71457,1,71462,71724,262,71725,71726,1,71736,71984,248,71985,71989,1,71991,71992,1,71997,72e3,3,72002,72145,143,72146,72147,1,72156,72159,1,72164,72249,85,72279,72280,1,72343,72751,408,72766,72873,107,72881,72884,3,73098,73102,1,73107,73108,1,73110,73461,351,73462,73475,13,73524,73525,1,73534,73535,1,73537,90410,16873,90411,90412,1,94033,94087,1,94192,94193,1,119141,119142,1,119149,119154,1]));static Me=new N(new Uint32Array([1160,1161,1,6846,8413,1567,8414,8416,1,8418,8420,1,42608,42610,1]));static Mn=new N(new Uint32Array([768,879,1,1155,1159,1,1425,1469,1,1471,1473,2,1474,1476,2,1477,1479,2,1552,1562,1,1611,1631,1,1648,1750,102,1751,1756,1,1759,1764,1,1767,1768,1,1770,1773,1,1809,1840,31,1841,1866,1,1958,1968,1,2027,2035,1,2045,2070,25,2071,2073,1,2075,2083,1,2085,2087,1,2089,2093,1,2137,2139,1,2199,2207,1,2250,2273,1,2275,2306,1,2362,2364,2,2369,2376,1,2381,2385,4,2386,2391,1,2402,2403,1,2433,2492,59,2497,2500,1,2509,2530,21,2531,2558,27,2561,2562,1,2620,2625,5,2626,2631,5,2632,2635,3,2636,2637,1,2641,2672,31,2673,2677,4,2689,2690,1,2748,2753,5,2754,2757,1,2759,2760,1,2765,2786,21,2787,2810,23,2811,2815,1,2817,2876,59,2879,2881,2,2882,2884,1,2893,2901,8,2902,2914,12,2915,2946,31,3008,3021,13,3072,3076,4,3132,3134,2,3135,3136,1,3142,3144,1,3146,3149,1,3157,3158,1,3170,3171,1,3201,3260,59,3263,3270,7,3276,3277,1,3298,3299,1,3328,3329,1,3387,3388,1,3393,3396,1,3405,3426,21,3427,3457,30,3530,3538,8,3539,3540,1,3542,3633,91,3636,3642,1,3655,3662,1,3761,3764,3,3765,3772,1,3784,3790,1,3864,3865,1,3893,3897,2,3953,3966,1,3968,3972,1,3974,3975,1,3981,3991,1,3993,4028,1,4038,4141,103,4142,4144,1,4146,4151,1,4153,4154,1,4157,4158,1,4184,4185,1,4190,4192,1,4209,4212,1,4226,4229,3,4230,4237,7,4253,4957,704,4958,4959,1,5906,5908,1,5938,5939,1,5970,5971,1,6002,6003,1,6068,6069,1,6071,6077,1,6086,6089,3,6090,6099,1,6109,6155,46,6156,6157,1,6159,6277,118,6278,6313,35,6432,6434,1,6439,6440,1,6450,6457,7,6458,6459,1,6679,6680,1,6683,6742,59,6744,6750,1,6752,6754,2,6757,6764,1,6771,6780,1,6783,6832,49,6833,6845,1,6847,6862,1,6912,6915,1,6964,6966,2,6967,6970,1,6972,6978,6,7019,7027,1,7040,7041,1,7074,7077,1,7080,7081,1,7083,7085,1,7142,7144,2,7145,7149,4,7151,7153,1,7212,7219,1,7222,7223,1,7376,7378,1,7380,7392,1,7394,7400,1,7405,7412,7,7416,7417,1,7616,7679,1,8400,8412,1,8417,8421,4,8422,8432,1,11503,11505,1,11647,11744,97,11745,11775,1,12330,12333,1,12441,12442,1,42607,42612,5,42613,42621,1,42654,42655,1,42736,42737,1,43010,43014,4,43019,43045,26,43046,43052,6,43204,43205,1,43232,43249,1,43263,43302,39,43303,43309,1,43335,43345,1,43392,43394,1,43443,43446,3,43447,43449,1,43452,43453,1,43493,43561,68,43562,43566,1,43569,43570,1,43573,43574,1,43587,43596,9,43644,43696,52,43698,43700,1,43703,43704,1,43710,43711,1,43713,43756,43,43757,43766,9,44005,44008,3,44013,64286,20273,65024,65039,1,65056,65071,1,66045,66272,227,66422,66426,1,68097,68099,1,68101,68102,1,68108,68111,1,68152,68154,1,68159,68325,166,68326,68900,574,68901,68903,1,68969,68973,1,69291,69292,1,69372,69375,1,69446,69456,1,69506,69509,1,69633,69688,55,69689,69702,1,69744,69747,3,69748,69759,11,69760,69761,1,69811,69814,1,69817,69818,1,69826,69888,62,69889,69890,1,69927,69931,1,69933,69940,1,70003,70016,13,70017,70070,53,70071,70078,1,70089,70092,1,70095,70191,96,70192,70193,1,70196,70198,2,70199,70206,7,70209,70367,158,70371,70378,1,70400,70401,1,70459,70460,1,70464,70502,38,70503,70508,1,70512,70516,1,70587,70592,1,70606,70610,2,70625,70626,1,70712,70719,1,70722,70724,1,70726,70750,24,70835,70840,1,70842,70847,5,70848,70850,2,70851,71090,239,71091,71093,1,71100,71101,1,71103,71104,1,71132,71133,1,71219,71226,1,71229,71231,2,71232,71339,107,71341,71344,3,71345,71349,1,71351,71453,102,71455,71458,3,71459,71461,1,71463,71467,1,71727,71735,1,71737,71738,1,71995,71996,1,71998,72003,5,72148,72151,1,72154,72155,1,72160,72193,33,72194,72202,1,72243,72248,1,72251,72254,1,72263,72273,10,72274,72278,1,72281,72283,1,72330,72342,1,72344,72345,1,72752,72758,1,72760,72765,1,72767,72850,83,72851,72871,1,72874,72880,1,72882,72883,1,72885,72886,1,73009,73014,1,73018,73020,2,73021,73023,2,73024,73029,1,73031,73104,73,73105,73109,4,73111,73459,348,73460,73472,12,73473,73526,53,73527,73530,1,73536,73538,2,73562,78912,5350,78919,78933,1,90398,90409,1,90413,90415,1,92912,92916,1,92976,92982,1,94031,94095,64,94096,94098,1,94180,113821,19641,113822,118528,4706,118529,118573,1,118576,118598,1,119143,119145,1,119163,119170,1,119173,119179,1,119210,119213,1,119362,119364,1,121344,121398,1,121403,121452,1,121461,121476,15,121499,121503,1,121505,121519,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1,123023,123184,161,123185,123190,1,123566,123628,62,123629,123631,1,124140,124143,1,124398,124399,1,125136,125142,1,125252,125258,1,917760,917999,1]));static foldMn=new N(new Uint32Array([921,953,32,8126,8126,1]));static N=new N(new Uint32Array([48,57,1,178,179,1,185,188,3,189,190,1,1632,1641,1,1776,1785,1,1984,1993,1,2406,2415,1,2534,2543,1,2548,2553,1,2662,2671,1,2790,2799,1,2918,2927,1,2930,2935,1,3046,3058,1,3174,3183,1,3192,3198,1,3302,3311,1,3416,3422,1,3430,3448,1,3558,3567,1,3664,3673,1,3792,3801,1,3872,3891,1,4160,4169,1,4240,4249,1,4969,4988,1,5870,5872,1,6112,6121,1,6128,6137,1,6160,6169,1,6470,6479,1,6608,6618,1,6784,6793,1,6800,6809,1,6992,7001,1,7088,7097,1,7232,7241,1,7248,7257,1,8304,8308,4,8309,8313,1,8320,8329,1,8528,8578,1,8581,8585,1,9312,9371,1,9450,9471,1,10102,10131,1,11517,12295,778,12321,12329,1,12344,12346,1,12690,12693,1,12832,12841,1,12872,12879,1,12881,12895,1,12928,12937,1,12977,12991,1,42528,42537,1,42726,42735,1,43056,43061,1,43216,43225,1,43264,43273,1,43472,43481,1,43504,43513,1,43600,43609,1,44016,44025,1,65296,65305,1,65799,65843,1,65856,65912,1,65930,65931,1,66273,66299,1,66336,66339,1,66369,66378,9,66513,66517,1,66720,66729,1,67672,67679,1,67705,67711,1,67751,67759,1,67835,67839,1,67862,67867,1,68028,68029,1,68032,68047,1,68050,68095,1,68160,68168,1,68221,68222,1,68253,68255,1,68331,68335,1,68440,68447,1,68472,68479,1,68521,68527,1,68858,68863,1,68912,68921,1,68928,68937,1,69216,69246,1,69405,69414,1,69457,69460,1,69573,69579,1,69714,69743,1,69872,69881,1,69942,69951,1,70096,70105,1,70113,70132,1,70384,70393,1,70736,70745,1,70864,70873,1,71248,71257,1,71360,71369,1,71376,71395,1,71472,71483,1,71904,71922,1,72016,72025,1,72688,72697,1,72784,72812,1,73040,73049,1,73120,73129,1,73552,73561,1,73664,73684,1,74752,74862,1,90416,90425,1,92768,92777,1,92864,92873,1,93008,93017,1,93019,93025,1,93552,93561,1,93824,93846,1,118e3,118009,1,119488,119507,1,119520,119539,1,119648,119672,1,120782,120831,1,123200,123209,1,123632,123641,1,124144,124153,1,124401,124410,1,125127,125135,1,125264,125273,1,126065,126123,1,126125,126127,1,126129,126132,1,126209,126253,1,126255,126269,1,127232,127244,1,130032,130041,1]));static Nd=new N(new Uint32Array([48,57,1,1632,1641,1,1776,1785,1,1984,1993,1,2406,2415,1,2534,2543,1,2662,2671,1,2790,2799,1,2918,2927,1,3046,3055,1,3174,3183,1,3302,3311,1,3430,3439,1,3558,3567,1,3664,3673,1,3792,3801,1,3872,3881,1,4160,4169,1,4240,4249,1,6112,6121,1,6160,6169,1,6470,6479,1,6608,6617,1,6784,6793,1,6800,6809,1,6992,7001,1,7088,7097,1,7232,7241,1,7248,7257,1,42528,42537,1,43216,43225,1,43264,43273,1,43472,43481,1,43504,43513,1,43600,43609,1,44016,44025,1,65296,65305,1,66720,66729,1,68912,68921,1,68928,68937,1,69734,69743,1,69872,69881,1,69942,69951,1,70096,70105,1,70384,70393,1,70736,70745,1,70864,70873,1,71248,71257,1,71360,71369,1,71376,71395,1,71472,71481,1,71904,71913,1,72016,72025,1,72688,72697,1,72784,72793,1,73040,73049,1,73120,73129,1,73552,73561,1,90416,90425,1,92768,92777,1,92864,92873,1,93008,93017,1,93552,93561,1,118e3,118009,1,120782,120831,1,123200,123209,1,123632,123641,1,124144,124153,1,124401,124410,1,125264,125273,1,130032,130041,1]));static Nl=new N(new Uint32Array([5870,5872,1,8544,8578,1,8581,8584,1,12295,12321,26,12322,12329,1,12344,12346,1,42726,42735,1,65856,65908,1,66369,66378,9,66513,66517,1,74752,74862,1]));static No=new N(new Uint32Array([178,179,1,185,188,3,189,190,1,2548,2553,1,2930,2935,1,3056,3058,1,3192,3198,1,3416,3422,1,3440,3448,1,3882,3891,1,4969,4988,1,6128,6137,1,6618,8304,1686,8308,8313,1,8320,8329,1,8528,8543,1,8585,9312,727,9313,9371,1,9450,9471,1,10102,10131,1,11517,12690,1173,12691,12693,1,12832,12841,1,12872,12879,1,12881,12895,1,12928,12937,1,12977,12991,1,43056,43061,1,65799,65843,1,65909,65912,1,65930,65931,1,66273,66299,1,66336,66339,1,67672,67679,1,67705,67711,1,67751,67759,1,67835,67839,1,67862,67867,1,68028,68029,1,68032,68047,1,68050,68095,1,68160,68168,1,68221,68222,1,68253,68255,1,68331,68335,1,68440,68447,1,68472,68479,1,68521,68527,1,68858,68863,1,69216,69246,1,69405,69414,1,69457,69460,1,69573,69579,1,69714,69733,1,70113,70132,1,71482,71483,1,71914,71922,1,72794,72812,1,73664,73684,1,93019,93025,1,93824,93846,1,119488,119507,1,119520,119539,1,119648,119672,1,125127,125135,1,126065,126123,1,126125,126127,1,126129,126132,1,126209,126253,1,126255,126269,1,127232,127244,1]));static P=new N(new Uint32Array([33,35,1,37,42,1,44,47,1,58,59,1,63,64,1,91,93,1,95,123,28,125,161,36,167,171,4,182,183,1,187,191,4,894,903,9,1370,1375,1,1417,1418,1,1470,1472,2,1475,1478,3,1523,1524,1,1545,1546,1,1548,1549,1,1563,1565,2,1566,1567,1,1642,1645,1,1748,1792,44,1793,1805,1,2039,2041,1,2096,2110,1,2142,2404,262,2405,2416,11,2557,2678,121,2800,3191,391,3204,3572,368,3663,3674,11,3675,3844,169,3845,3858,1,3860,3898,38,3899,3901,1,3973,4048,75,4049,4052,1,4057,4058,1,4170,4175,1,4347,4960,613,4961,4968,1,5120,5742,622,5787,5788,1,5867,5869,1,5941,5942,1,6100,6102,1,6104,6106,1,6144,6154,1,6468,6469,1,6686,6687,1,6816,6822,1,6824,6829,1,6990,6991,1,7002,7008,1,7037,7039,1,7164,7167,1,7227,7231,1,7294,7295,1,7360,7367,1,7379,8208,829,8209,8231,1,8240,8259,1,8261,8273,1,8275,8286,1,8317,8318,1,8333,8334,1,8968,8971,1,9001,9002,1,10088,10101,1,10181,10182,1,10214,10223,1,10627,10648,1,10712,10715,1,10748,10749,1,11513,11516,1,11518,11519,1,11632,11776,144,11777,11822,1,11824,11855,1,11858,11869,1,12289,12291,1,12296,12305,1,12308,12319,1,12336,12349,13,12448,12539,91,42238,42239,1,42509,42511,1,42611,42622,11,42738,42743,1,43124,43127,1,43214,43215,1,43256,43258,1,43260,43310,50,43311,43359,48,43457,43469,1,43486,43487,1,43612,43615,1,43742,43743,1,43760,43761,1,44011,64830,20819,64831,65040,209,65041,65049,1,65072,65106,1,65108,65121,1,65123,65128,5,65130,65131,1,65281,65283,1,65285,65290,1,65292,65295,1,65306,65307,1,65311,65312,1,65339,65341,1,65343,65371,28,65373,65375,2,65376,65381,1,65792,65794,1,66463,66512,49,66927,67671,744,67871,67903,32,68176,68184,1,68223,68336,113,68337,68342,1,68409,68415,1,68505,68508,1,68974,69293,319,69461,69465,1,69510,69513,1,69703,69709,1,69819,69820,1,69822,69825,1,69952,69955,1,70004,70005,1,70085,70088,1,70093,70107,14,70109,70111,1,70200,70205,1,70313,70612,299,70613,70615,2,70616,70731,115,70732,70735,1,70746,70747,1,70749,70854,105,71105,71127,1,71233,71235,1,71264,71276,1,71353,71484,131,71485,71486,1,71739,72004,265,72005,72006,1,72162,72255,93,72256,72262,1,72346,72348,1,72350,72354,1,72448,72457,1,72673,72769,96,72770,72773,1,72816,72817,1,73463,73464,1,73539,73551,1,73727,74864,1137,74865,74868,1,77809,77810,1,92782,92783,1,92917,92983,66,92984,92987,1,92996,93549,553,93550,93551,1,93847,93850,1,94178,113823,19645,121479,121483,1,124415,125278,863,125279,125279,1]));static Pc=new N(new Uint32Array([95,8255,8160,8256,8276,20,65075,65076,1,65101,65103,1,65343,65343,1]));static Pd=new N(new Uint32Array([45,1418,1373,1470,5120,3650,6150,8208,2058,8209,8213,1,11799,11802,3,11834,11835,1,11840,11869,29,12316,12336,20,12448,65073,52625,65074,65112,38,65123,65293,170,68974,69293,319]));static Pe=new N(new Uint32Array([41,93,52,125,3899,3774,3901,5788,1887,8262,8318,56,8334,8969,635,8971,9002,31,10089,10101,2,10182,10215,33,10217,10223,2,10628,10648,2,10713,10715,2,10749,11811,1062,11813,11817,2,11862,11868,2,12297,12305,2,12309,12315,2,12318,12319,1,64830,65048,218,65078,65092,2,65096,65114,18,65116,65118,2,65289,65341,52,65373,65379,3]));static Pf=new N(new Uint32Array([187,8217,8030,8221,8250,29,11779,11781,2,11786,11789,3,11805,11809,4]));static Pi=new N(new Uint32Array([171,8216,8045,8219,8220,1,8223,8249,26,11778,11780,2,11785,11788,3,11804,11808,4]));static Po=new N(new Uint32Array([33,35,1,37,39,1,42,46,2,47,58,11,59,63,4,64,92,28,161,167,6,182,183,1,191,894,703,903,1370,467,1371,1375,1,1417,1472,55,1475,1478,3,1523,1524,1,1545,1546,1,1548,1549,1,1563,1565,2,1566,1567,1,1642,1645,1,1748,1792,44,1793,1805,1,2039,2041,1,2096,2110,1,2142,2404,262,2405,2416,11,2557,2678,121,2800,3191,391,3204,3572,368,3663,3674,11,3675,3844,169,3845,3858,1,3860,3973,113,4048,4052,1,4057,4058,1,4170,4175,1,4347,4960,613,4961,4968,1,5742,5867,125,5868,5869,1,5941,5942,1,6100,6102,1,6104,6106,1,6144,6149,1,6151,6154,1,6468,6469,1,6686,6687,1,6816,6822,1,6824,6829,1,6990,6991,1,7002,7008,1,7037,7039,1,7164,7167,1,7227,7231,1,7294,7295,1,7360,7367,1,7379,8214,835,8215,8224,9,8225,8231,1,8240,8248,1,8251,8254,1,8257,8259,1,8263,8273,1,8275,8277,2,8278,8286,1,11513,11516,1,11518,11519,1,11632,11776,144,11777,11782,5,11783,11784,1,11787,11790,3,11791,11798,1,11800,11801,1,11803,11806,3,11807,11818,11,11819,11822,1,11824,11833,1,11836,11839,1,11841,11843,2,11844,11855,1,11858,11860,1,12289,12291,1,12349,12539,190,42238,42239,1,42509,42511,1,42611,42622,11,42738,42743,1,43124,43127,1,43214,43215,1,43256,43258,1,43260,43310,50,43311,43359,48,43457,43469,1,43486,43487,1,43612,43615,1,43742,43743,1,43760,43761,1,44011,65040,21029,65041,65046,1,65049,65072,23,65093,65094,1,65097,65100,1,65104,65106,1,65108,65111,1,65119,65121,1,65128,65130,2,65131,65281,150,65282,65283,1,65285,65287,1,65290,65294,2,65295,65306,11,65307,65311,4,65312,65340,28,65377,65380,3,65381,65792,411,65793,65794,1,66463,66512,49,66927,67671,744,67871,67903,32,68176,68184,1,68223,68336,113,68337,68342,1,68409,68415,1,68505,68508,1,69461,69465,1,69510,69513,1,69703,69709,1,69819,69820,1,69822,69825,1,69952,69955,1,70004,70005,1,70085,70088,1,70093,70107,14,70109,70111,1,70200,70205,1,70313,70612,299,70613,70615,2,70616,70731,115,70732,70735,1,70746,70747,1,70749,70854,105,71105,71127,1,71233,71235,1,71264,71276,1,71353,71484,131,71485,71486,1,71739,72004,265,72005,72006,1,72162,72255,93,72256,72262,1,72346,72348,1,72350,72354,1,72448,72457,1,72673,72769,96,72770,72773,1,72816,72817,1,73463,73464,1,73539,73551,1,73727,74864,1137,74865,74868,1,77809,77810,1,92782,92783,1,92917,92983,66,92984,92987,1,92996,93549,553,93550,93551,1,93847,93850,1,94178,113823,19645,121479,121483,1,124415,125278,863,125279,125279,1]));static Ps=new N(new Uint32Array([40,91,51,123,3898,3775,3900,5787,1887,8218,8222,4,8261,8317,56,8333,8968,635,8970,9001,31,10088,10100,2,10181,10214,33,10216,10222,2,10627,10647,2,10712,10714,2,10748,11810,1062,11812,11816,2,11842,11861,19,11863,11867,2,12296,12304,2,12308,12314,2,12317,64831,52514,65047,65077,30,65079,65091,2,65095,65113,18,65115,65117,2,65288,65339,51,65371,65375,4,65378,65378,1]));static S=new N(new Uint32Array([36,43,7,60,62,1,94,96,2,124,126,2,162,166,1,168,169,1,172,174,2,175,177,1,180,184,4,215,247,32,706,709,1,722,735,1,741,747,1,749,751,2,752,767,1,885,900,15,901,1014,113,1154,1421,267,1422,1423,1,1542,1544,1,1547,1550,3,1551,1758,207,1769,1789,20,1790,2038,248,2046,2047,1,2184,2546,362,2547,2554,7,2555,2801,246,2928,3059,131,3060,3066,1,3199,3407,208,3449,3647,198,3841,3843,1,3859,3861,2,3862,3863,1,3866,3871,1,3892,3896,2,4030,4037,1,4039,4044,1,4046,4047,1,4053,4056,1,4254,4255,1,5008,5017,1,5741,6107,366,6464,6622,158,6623,6655,1,7009,7018,1,7028,7036,1,8125,8127,2,8128,8129,1,8141,8143,1,8157,8159,1,8173,8175,1,8189,8190,1,8260,8274,14,8314,8316,1,8330,8332,1,8352,8384,1,8448,8449,1,8451,8454,1,8456,8457,1,8468,8470,2,8471,8472,1,8478,8483,1,8485,8489,2,8494,8506,12,8507,8512,5,8513,8516,1,8522,8525,1,8527,8586,59,8587,8592,5,8593,8967,1,8972,9e3,1,9003,9257,1,9280,9290,1,9372,9449,1,9472,10087,1,10132,10180,1,10183,10213,1,10224,10626,1,10649,10711,1,10716,10747,1,10750,11123,1,11126,11157,1,11159,11263,1,11493,11498,1,11856,11857,1,11904,11929,1,11931,12019,1,12032,12245,1,12272,12287,1,12292,12306,14,12307,12320,13,12342,12343,1,12350,12351,1,12443,12444,1,12688,12689,1,12694,12703,1,12736,12773,1,12783,12800,17,12801,12830,1,12842,12871,1,12880,12896,16,12897,12927,1,12938,12976,1,12992,13311,1,19904,19967,1,42128,42182,1,42752,42774,1,42784,42785,1,42889,42890,1,43048,43051,1,43062,43065,1,43639,43641,1,43867,43882,15,43883,64297,20414,64434,64450,1,64832,64847,1,64975,65020,45,65021,65023,1,65122,65124,2,65125,65126,1,65129,65284,155,65291,65308,17,65309,65310,1,65342,65344,2,65372,65374,2,65504,65510,1,65512,65518,1,65532,65533,1,65847,65855,1,65913,65929,1,65932,65934,1,65936,65948,1,65952,66e3,48,66001,66044,1,67703,67704,1,68296,69006,710,69007,71487,2480,73685,73713,1,92988,92991,1,92997,113820,20823,117760,117999,1,118016,118451,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119140,1,119146,119148,1,119171,119172,1,119180,119209,1,119214,119274,1,119296,119361,1,119365,119552,187,119553,119638,1,120513,120539,26,120571,120597,26,120629,120655,26,120687,120713,26,120745,120771,26,120832,121343,1,121399,121402,1,121453,121460,1,121462,121475,1,121477,121478,1,123215,123647,432,126124,126128,4,126254,126704,450,126705,126976,271,126977,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127245,127405,1,127462,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130031,1]));static Sc=new N(new Uint32Array([36,162,126,163,165,1,1423,1547,124,2046,2047,1,2546,2547,1,2555,2801,246,3065,3647,582,6107,8352,2245,8353,8384,1,43064,65020,21956,65129,65284,155,65504,65505,1,65509,65510,1,73693,73696,1,123647,126128,2481]));static Sk=new N(new Uint32Array([94,96,2,168,175,7,180,184,4,706,709,1,722,735,1,741,747,1,749,751,2,752,767,1,885,900,15,901,2184,1283,8125,8127,2,8128,8129,1,8141,8143,1,8157,8159,1,8173,8175,1,8189,8190,1,12443,12444,1,42752,42774,1,42784,42785,1,42889,42890,1,43867,43882,15,43883,64434,20551,64435,64450,1,65342,65344,2,65507,127995,62488,127996,127999,1]));static Sm=new N(new Uint32Array([43,60,17,61,62,1,124,126,2,172,177,5,215,247,32,1014,1542,528,1543,1544,1,8260,8274,14,8314,8316,1,8330,8332,1,8472,8512,40,8513,8516,1,8523,8592,69,8593,8596,1,8602,8603,1,8608,8614,3,8622,8654,32,8655,8658,3,8660,8692,32,8693,8959,1,8992,8993,1,9084,9115,31,9116,9139,1,9180,9185,1,9655,9665,10,9720,9727,1,9839,10176,337,10177,10180,1,10183,10213,1,10224,10239,1,10496,10626,1,10649,10711,1,10716,10747,1,10750,11007,1,11056,11076,1,11079,11084,1,64297,65122,825,65124,65126,1,65291,65308,17,65309,65310,1,65372,65374,2,65506,65513,7,65514,65516,1,69006,69007,1,120513,120539,26,120571,120597,26,120629,120655,26,120687,120713,26,120745,120771,26,126704,126705,1]));static So=new N(new Uint32Array([166,169,3,174,176,2,1154,1421,267,1422,1550,128,1551,1758,207,1769,1789,20,1790,2038,248,2554,2928,374,3059,3064,1,3066,3199,133,3407,3449,42,3841,3843,1,3859,3861,2,3862,3863,1,3866,3871,1,3892,3896,2,4030,4037,1,4039,4044,1,4046,4047,1,4053,4056,1,4254,4255,1,5008,5017,1,5741,6464,723,6622,6655,1,7009,7018,1,7028,7036,1,8448,8449,1,8451,8454,1,8456,8457,1,8468,8470,2,8471,8478,7,8479,8483,1,8485,8489,2,8494,8506,12,8507,8522,15,8524,8525,1,8527,8586,59,8587,8597,10,8598,8601,1,8604,8607,1,8609,8610,1,8612,8613,1,8615,8621,1,8623,8653,1,8656,8657,1,8659,8661,2,8662,8691,1,8960,8967,1,8972,8991,1,8994,9e3,1,9003,9083,1,9085,9114,1,9140,9179,1,9186,9257,1,9280,9290,1,9372,9449,1,9472,9654,1,9656,9664,1,9666,9719,1,9728,9838,1,9840,10087,1,10132,10175,1,10240,10495,1,11008,11055,1,11077,11078,1,11085,11123,1,11126,11157,1,11159,11263,1,11493,11498,1,11856,11857,1,11904,11929,1,11931,12019,1,12032,12245,1,12272,12287,1,12292,12306,14,12307,12320,13,12342,12343,1,12350,12351,1,12688,12689,1,12694,12703,1,12736,12773,1,12783,12800,17,12801,12830,1,12842,12871,1,12880,12896,16,12897,12927,1,12938,12976,1,12992,13311,1,19904,19967,1,42128,42182,1,43048,43051,1,43062,43063,1,43065,43639,574,43640,43641,1,64832,64847,1,64975,65021,46,65022,65023,1,65508,65512,4,65517,65518,1,65532,65533,1,65847,65855,1,65913,65929,1,65932,65934,1,65936,65948,1,65952,66e3,48,66001,66044,1,67703,67704,1,68296,71487,3191,73685,73692,1,73697,73713,1,92988,92991,1,92997,113820,20823,117760,117999,1,118016,118451,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119140,1,119146,119148,1,119171,119172,1,119180,119209,1,119214,119274,1,119296,119361,1,119365,119552,187,119553,119638,1,120832,121343,1,121399,121402,1,121453,121460,1,121462,121475,1,121477,121478,1,123215,126124,2909,126254,126976,722,126977,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127245,127405,1,127462,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,127994,1,128e3,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130031,1]));static Z=new N(new Uint32Array([32,160,128,5760,8192,2432,8193,8202,1,8232,8233,1,8239,8287,48,12288,12288,1]));static Zl=new N(new Uint32Array([8232,8232,1]));static Zp=new N(new Uint32Array([8233,8233,1]));static Zs=new N(new Uint32Array([32,160,128,5760,8192,2432,8193,8202,1,8239,8287,48,12288,12288,1]));static Adlam=new N(new Uint32Array([125184,125259,1,125264,125273,1,125278,125279,1]));static Ahom=new N(new Uint32Array([71424,71450,1,71453,71467,1,71472,71494,1]));static Anatolian_Hieroglyphs=new N(new Uint32Array([82944,83526,1]));static Arabic=new N(new Uint32Array([1536,1540,1,1542,1547,1,1549,1562,1,1564,1566,1,1568,1599,1,1601,1610,1,1622,1647,1,1649,1756,1,1758,1791,1,1872,1919,1,2160,2190,1,2192,2193,1,2199,2273,1,2275,2303,1,64336,64450,1,64467,64829,1,64832,64911,1,64914,64967,1,64975,65008,33,65009,65023,1,65136,65140,1,65142,65276,1,69216,69246,1,69314,69316,1,69372,69375,1,126464,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,126704,126705,1]));static Armenian=new N(new Uint32Array([1329,1366,1,1369,1418,1,1421,1423,1,64275,64279,1]));static Avestan=new N(new Uint32Array([68352,68405,1,68409,68415,1]));static Balinese=new N(new Uint32Array([6912,6988,1,6990,7039,1]));static Bamum=new N(new Uint32Array([42656,42743,1,92160,92728,1]));static Bassa_Vah=new N(new Uint32Array([92880,92909,1,92912,92917,1]));static Batak=new N(new Uint32Array([7104,7155,1,7164,7167,1]));static Bengali=new N(new Uint32Array([2432,2435,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2492,2500,1,2503,2504,1,2507,2510,1,2519,2524,5,2525,2527,2,2528,2531,1,2534,2558,1]));static Bhaiksuki=new N(new Uint32Array([72704,72712,1,72714,72758,1,72760,72773,1,72784,72812,1]));static Bopomofo=new N(new Uint32Array([746,747,1,12549,12591,1,12704,12735,1]));static Brahmi=new N(new Uint32Array([69632,69709,1,69714,69749,1,69759,69759,1]));static Braille=new N(new Uint32Array([10240,10495,1]));static Buginese=new N(new Uint32Array([6656,6683,1,6686,6687,1]));static Buhid=new N(new Uint32Array([5952,5971,1]));static Canadian_Aboriginal=new N(new Uint32Array([5120,5759,1,6320,6389,1,72368,72383,1]));static Carian=new N(new Uint32Array([66208,66256,1]));static Caucasian_Albanian=new N(new Uint32Array([66864,66915,1,66927,66927,1]));static Chakma=new N(new Uint32Array([69888,69940,1,69942,69959,1]));static Cham=new N(new Uint32Array([43520,43574,1,43584,43597,1,43600,43609,1,43612,43615,1]));static Cherokee=new N(new Uint32Array([5024,5109,1,5112,5117,1,43888,43967,1]));static Chorasmian=new N(new Uint32Array([69552,69579,1]));static Common=new N(new Uint32Array([0,64,1,91,96,1,123,169,1,171,185,1,187,191,1,215,247,32,697,735,1,741,745,1,748,767,1,884,894,10,901,903,2,1541,1548,7,1563,1567,4,1600,1757,157,2274,2404,130,2405,3647,1242,4053,4056,1,4347,5867,1520,5868,5869,1,5941,5942,1,6146,6147,1,6149,7379,1230,7393,7401,8,7402,7404,1,7406,7411,1,7413,7415,1,7418,8192,774,8193,8203,1,8206,8292,1,8294,8304,1,8308,8318,1,8320,8334,1,8352,8384,1,8448,8485,1,8487,8489,1,8492,8497,1,8499,8525,1,8527,8543,1,8585,8587,1,8592,9257,1,9280,9290,1,9312,10239,1,10496,11123,1,11126,11157,1,11159,11263,1,11776,11869,1,12272,12292,1,12294,12296,2,12297,12320,1,12336,12343,1,12348,12351,1,12443,12444,1,12448,12539,91,12540,12688,148,12689,12703,1,12736,12773,1,12783,12832,49,12833,12895,1,12927,13007,1,13055,13144,89,13145,13311,1,19904,19967,1,42752,42785,1,42888,42890,1,43056,43065,1,43310,43471,161,43867,43882,15,43883,64830,20947,64831,65040,209,65041,65049,1,65072,65106,1,65108,65126,1,65128,65131,1,65279,65281,2,65282,65312,1,65339,65344,1,65371,65381,1,65392,65438,46,65439,65504,65,65505,65510,1,65512,65518,1,65529,65533,1,65792,65794,1,65799,65843,1,65847,65855,1,65936,65948,1,66e3,66044,1,66273,66299,1,113824,113827,1,117760,118009,1,118016,118451,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119142,1,119146,119162,1,119171,119172,1,119180,119209,1,119214,119274,1,119488,119507,1,119520,119539,1,119552,119638,1,119648,119672,1,119808,119892,1,119894,119964,1,119966,119967,1,119970,119973,3,119974,119977,3,119978,119980,1,119982,119993,1,119995,119997,2,119998,120003,1,120005,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120094,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120146,120485,1,120488,120779,1,120782,120831,1,126065,126132,1,126209,126269,1,126976,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127232,127405,1,127462,127487,1,127489,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130041,1,917505,917536,31,917537,917631,1]));static foldCommon=new N(new Uint32Array([924,956,32]));static Coptic=new N(new Uint32Array([994,1007,1,11392,11507,1,11513,11519,1]));static Cuneiform=new N(new Uint32Array([73728,74649,1,74752,74862,1,74864,74868,1,74880,75075,1]));static Cypriot=new N(new Uint32Array([67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3]));static Cypro_Minoan=new N(new Uint32Array([77712,77810,1]));static Cyrillic=new N(new Uint32Array([1024,1156,1,1159,1327,1,7296,7306,1,7467,7544,77,11744,11775,1,42560,42655,1,65070,65071,1,122928,122989,1,123023,123023,1]));static Deseret=new N(new Uint32Array([66560,66639,1]));static Devanagari=new N(new Uint32Array([2304,2384,1,2389,2403,1,2406,2431,1,43232,43263,1,72448,72457,1]));static Dives_Akuru=new N(new Uint32Array([71936,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71989,1,71991,71992,1,71995,72006,1,72016,72025,1]));static Dogra=new N(new Uint32Array([71680,71739,1]));static Duployan=new N(new Uint32Array([113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,113820,113823,1]));static Egyptian_Hieroglyphs=new N(new Uint32Array([77824,78933,1,78944,82938,1]));static Elbasan=new N(new Uint32Array([66816,66855,1]));static Elymaic=new N(new Uint32Array([69600,69622,1]));static Ethiopic=new N(new Uint32Array([4608,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4957,4988,1,4992,5017,1,11648,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,43777,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,124896,124902,1,124904,124907,1,124909,124910,1,124912,124926,1]));static Garay=new N(new Uint32Array([68928,68965,1,68969,68997,1,69006,69007,1]));static Georgian=new N(new Uint32Array([4256,4293,1,4295,4301,6,4304,4346,1,4348,4351,1,7312,7354,1,7357,7359,1,11520,11557,1,11559,11565,6]));static Glagolitic=new N(new Uint32Array([11264,11359,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1]));static Gothic=new N(new Uint32Array([66352,66378,1]));static Grantha=new N(new Uint32Array([70400,70403,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70460,70468,1,70471,70472,1,70475,70477,1,70480,70487,7,70493,70499,1,70502,70508,1,70512,70516,1]));static Greek=new N(new Uint32Array([880,883,1,885,887,1,890,893,1,895,900,5,902,904,2,905,906,1,908,910,2,911,929,1,931,993,1,1008,1023,1,7462,7466,1,7517,7521,1,7526,7530,1,7615,7936,321,7937,7957,1,7960,7965,1,7968,8005,1,8008,8013,1,8016,8023,1,8025,8031,2,8032,8061,1,8064,8116,1,8118,8132,1,8134,8147,1,8150,8155,1,8157,8175,1,8178,8180,1,8182,8190,1,8486,43877,35391,65856,65934,1,65952,119296,53344,119297,119365,1]));static foldGreek=new N(new Uint32Array([181,837,656]));static Gujarati=new N(new Uint32Array([2689,2691,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2748,2757,1,2759,2761,1,2763,2765,1,2768,2784,16,2785,2787,1,2790,2801,1,2809,2815,1]));static Gunjala_Gondi=new N(new Uint32Array([73056,73061,1,73063,73064,1,73066,73102,1,73104,73105,1,73107,73112,1,73120,73129,1]));static Gurmukhi=new N(new Uint32Array([2561,2563,1,2565,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2620,2622,2,2623,2626,1,2631,2632,1,2635,2637,1,2641,2649,8,2650,2652,1,2654,2662,8,2663,2678,1]));static Gurung_Khema=new N(new Uint32Array([90368,90425,1]));static Han=new N(new Uint32Array([11904,11929,1,11931,12019,1,12032,12245,1,12293,12295,2,12321,12329,1,12344,12347,1,13312,19903,1,19968,40959,1,63744,64109,1,64112,64217,1,94178,94179,1,94192,94193,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1]));static Hangul=new N(new Uint32Array([4352,4607,1,12334,12335,1,12593,12686,1,12800,12830,1,12896,12926,1,43360,43388,1,44032,55203,1,55216,55238,1,55243,55291,1,65440,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1]));static Hanifi_Rohingya=new N(new Uint32Array([68864,68903,1,68912,68921,1]));static Hanunoo=new N(new Uint32Array([5920,5940,1]));static Hatran=new N(new Uint32Array([67808,67826,1,67828,67829,1,67835,67839,1]));static Hebrew=new N(new Uint32Array([1425,1479,1,1488,1514,1,1519,1524,1,64285,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64335,1]));static Hiragana=new N(new Uint32Array([12353,12438,1,12445,12447,1,110593,110879,1,110898,110928,30,110929,110930,1,127488,127488,1]));static Imperial_Aramaic=new N(new Uint32Array([67648,67669,1,67671,67679,1]));static Inherited=new N(new Uint32Array([768,879,1,1157,1158,1,1611,1621,1,1648,2385,737,2386,2388,1,6832,6862,1,7376,7378,1,7380,7392,1,7394,7400,1,7405,7412,7,7416,7417,1,7616,7679,1,8204,8205,1,8400,8432,1,12330,12333,1,12441,12442,1,65024,65039,1,65056,65069,1,66045,66272,227,70459,118528,48069,118529,118573,1,118576,118598,1,119143,119145,1,119163,119170,1,119173,119179,1,119210,119213,1,917760,917999,1]));static foldInherited=new N(new Uint32Array([921,953,32,8126,8126,1]));static Inscriptional_Pahlavi=new N(new Uint32Array([68448,68466,1,68472,68479,1]));static Inscriptional_Parthian=new N(new Uint32Array([68416,68437,1,68440,68447,1]));static Javanese=new N(new Uint32Array([43392,43469,1,43472,43481,1,43486,43487,1]));static Kaithi=new N(new Uint32Array([69760,69826,1,69837,69837,1]));static Kannada=new N(new Uint32Array([3200,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3260,3268,1,3270,3272,1,3274,3277,1,3285,3286,1,3293,3294,1,3296,3299,1,3302,3311,1,3313,3315,1]));static Katakana=new N(new Uint32Array([12449,12538,1,12541,12543,1,12784,12799,1,13008,13054,1,13056,13143,1,65382,65391,1,65393,65437,1,110576,110579,1,110581,110587,1,110589,110590,1,110592,110880,288,110881,110882,1,110933,110948,15,110949,110951,1]));static Kawi=new N(new Uint32Array([73472,73488,1,73490,73530,1,73534,73562,1]));static Kayah_Li=new N(new Uint32Array([43264,43309,1,43311,43311,1]));static Kharoshthi=new N(new Uint32Array([68096,68099,1,68101,68102,1,68108,68115,1,68117,68119,1,68121,68149,1,68152,68154,1,68159,68168,1,68176,68184,1]));static Khitan_Small_Script=new N(new Uint32Array([94180,101120,6940,101121,101589,1,101631,101631,1]));static Khmer=new N(new Uint32Array([6016,6109,1,6112,6121,1,6128,6137,1,6624,6655,1]));static Khojki=new N(new Uint32Array([70144,70161,1,70163,70209,1]));static Khudawadi=new N(new Uint32Array([70320,70378,1,70384,70393,1]));static Kirat_Rai=new N(new Uint32Array([93504,93561,1]));static Lao=new N(new Uint32Array([3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3773,1,3776,3780,1,3782,3784,2,3785,3790,1,3792,3801,1,3804,3807,1]));static Latin=new N(new Uint32Array([65,90,1,97,122,1,170,186,16,192,214,1,216,246,1,248,696,1,736,740,1,7424,7461,1,7468,7516,1,7522,7525,1,7531,7543,1,7545,7614,1,7680,7935,1,8305,8319,14,8336,8348,1,8490,8491,1,8498,8526,28,8544,8584,1,11360,11391,1,42786,42887,1,42891,42957,1,42960,42961,1,42963,42965,2,42966,42972,1,42994,43007,1,43824,43866,1,43868,43876,1,43878,43881,1,64256,64262,1,65313,65338,1,65345,65370,1,67456,67461,1,67463,67504,1,67506,67514,1,122624,122654,1,122661,122666,1]));static Lepcha=new N(new Uint32Array([7168,7223,1,7227,7241,1,7245,7247,1]));static Limbu=new N(new Uint32Array([6400,6430,1,6432,6443,1,6448,6459,1,6464,6468,4,6469,6479,1]));static Linear_A=new N(new Uint32Array([67072,67382,1,67392,67413,1,67424,67431,1]));static Linear_B=new N(new Uint32Array([65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1]));static Lisu=new N(new Uint32Array([42192,42239,1,73648,73648,1]));static Lycian=new N(new Uint32Array([66176,66204,1]));static Lydian=new N(new Uint32Array([67872,67897,1,67903,67903,1]));static Mahajani=new N(new Uint32Array([69968,70006,1]));static Makasar=new N(new Uint32Array([73440,73464,1]));static Malayalam=new N(new Uint32Array([3328,3340,1,3342,3344,1,3346,3396,1,3398,3400,1,3402,3407,1,3412,3427,1,3430,3455,1]));static Mandaic=new N(new Uint32Array([2112,2139,1,2142,2142,1]));static Manichaean=new N(new Uint32Array([68288,68326,1,68331,68342,1]));static Marchen=new N(new Uint32Array([72816,72847,1,72850,72871,1,72873,72886,1]));static Masaram_Gondi=new N(new Uint32Array([72960,72966,1,72968,72969,1,72971,73014,1,73018,73020,2,73021,73023,2,73024,73031,1,73040,73049,1]));static Medefaidrin=new N(new Uint32Array([93760,93850,1]));static Meetei_Mayek=new N(new Uint32Array([43744,43766,1,43968,44013,1,44016,44025,1]));static Mende_Kikakui=new N(new Uint32Array([124928,125124,1,125127,125142,1]));static Meroitic_Cursive=new N(new Uint32Array([68e3,68023,1,68028,68047,1,68050,68095,1]));static Meroitic_Hieroglyphs=new N(new Uint32Array([67968,67999,1]));static Miao=new N(new Uint32Array([93952,94026,1,94031,94087,1,94095,94111,1]));static Modi=new N(new Uint32Array([71168,71236,1,71248,71257,1]));static Mongolian=new N(new Uint32Array([6144,6145,1,6148,6150,2,6151,6169,1,6176,6264,1,6272,6314,1,71264,71276,1]));static Mro=new N(new Uint32Array([92736,92766,1,92768,92777,1,92782,92783,1]));static Multani=new N(new Uint32Array([70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70313,1]));static Myanmar=new N(new Uint32Array([4096,4255,1,43488,43518,1,43616,43647,1,71376,71395,1]));static Nabataean=new N(new Uint32Array([67712,67742,1,67751,67759,1]));static Nag_Mundari=new N(new Uint32Array([124112,124153,1]));static Nandinagari=new N(new Uint32Array([72096,72103,1,72106,72151,1,72154,72164,1]));static New_Tai_Lue=new N(new Uint32Array([6528,6571,1,6576,6601,1,6608,6618,1,6622,6623,1]));static Newa=new N(new Uint32Array([70656,70747,1,70749,70753,1]));static Nko=new N(new Uint32Array([1984,2042,1,2045,2047,1]));static Nushu=new N(new Uint32Array([94177,110960,16783,110961,111355,1]));static Nyiakeng_Puachue_Hmong=new N(new Uint32Array([123136,123180,1,123184,123197,1,123200,123209,1,123214,123215,1]));static Ogham=new N(new Uint32Array([5760,5788,1]));static Ol_Chiki=new N(new Uint32Array([7248,7295,1]));static Ol_Onal=new N(new Uint32Array([124368,124410,1,124415,124415,1]));static Old_Hungarian=new N(new Uint32Array([68736,68786,1,68800,68850,1,68858,68863,1]));static Old_Italic=new N(new Uint32Array([66304,66339,1,66349,66351,1]));static Old_North_Arabian=new N(new Uint32Array([68224,68255,1]));static Old_Permic=new N(new Uint32Array([66384,66426,1]));static Old_Persian=new N(new Uint32Array([66464,66499,1,66504,66517,1]));static Old_Sogdian=new N(new Uint32Array([69376,69415,1]));static Old_South_Arabian=new N(new Uint32Array([68192,68223,1]));static Old_Turkic=new N(new Uint32Array([68608,68680,1]));static Old_Uyghur=new N(new Uint32Array([69488,69513,1]));static Oriya=new N(new Uint32Array([2817,2819,1,2821,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2876,2884,1,2887,2888,1,2891,2893,1,2901,2903,1,2908,2909,1,2911,2915,1,2918,2935,1]));static Osage=new N(new Uint32Array([66736,66771,1,66776,66811,1]));static Osmanya=new N(new Uint32Array([66688,66717,1,66720,66729,1]));static Pahawh_Hmong=new N(new Uint32Array([92928,92997,1,93008,93017,1,93019,93025,1,93027,93047,1,93053,93071,1]));static Palmyrene=new N(new Uint32Array([67680,67711,1]));static Pau_Cin_Hau=new N(new Uint32Array([72384,72440,1]));static Phags_Pa=new N(new Uint32Array([43072,43127,1]));static Phoenician=new N(new Uint32Array([67840,67867,1,67871,67871,1]));static Psalter_Pahlavi=new N(new Uint32Array([68480,68497,1,68505,68508,1,68521,68527,1]));static Rejang=new N(new Uint32Array([43312,43347,1,43359,43359,1]));static Runic=new N(new Uint32Array([5792,5866,1,5870,5880,1]));static Samaritan=new N(new Uint32Array([2048,2093,1,2096,2110,1]));static Saurashtra=new N(new Uint32Array([43136,43205,1,43214,43225,1]));static Sharada=new N(new Uint32Array([70016,70111,1]));static Shavian=new N(new Uint32Array([66640,66687,1]));static Siddham=new N(new Uint32Array([71040,71093,1,71096,71133,1]));static SignWriting=new N(new Uint32Array([120832,121483,1,121499,121503,1,121505,121519,1]));static Sinhala=new N(new Uint32Array([3457,3459,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3530,3535,5,3536,3540,1,3542,3544,2,3545,3551,1,3558,3567,1,3570,3572,1,70113,70132,1]));static Sogdian=new N(new Uint32Array([69424,69465,1]));static Sora_Sompeng=new N(new Uint32Array([69840,69864,1,69872,69881,1]));static Soyombo=new N(new Uint32Array([72272,72354,1]));static Sundanese=new N(new Uint32Array([7040,7103,1,7360,7367,1]));static Sunuwar=new N(new Uint32Array([72640,72673,1,72688,72697,1]));static Syloti_Nagri=new N(new Uint32Array([43008,43052,1]));static Syriac=new N(new Uint32Array([1792,1805,1,1807,1866,1,1869,1871,1,2144,2154,1]));static Tagalog=new N(new Uint32Array([5888,5909,1,5919,5919,1]));static Tagbanwa=new N(new Uint32Array([5984,5996,1,5998,6e3,1,6002,6003,1]));static Tai_Le=new N(new Uint32Array([6480,6509,1,6512,6516,1]));static Tai_Tham=new N(new Uint32Array([6688,6750,1,6752,6780,1,6783,6793,1,6800,6809,1,6816,6829,1]));static Tai_Viet=new N(new Uint32Array([43648,43714,1,43739,43743,1]));static Takri=new N(new Uint32Array([71296,71353,1,71360,71369,1]));static Tamil=new N(new Uint32Array([2946,2947,1,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3006,3010,1,3014,3016,1,3018,3021,1,3024,3031,7,3046,3066,1,73664,73713,1,73727,73727,1]));static Tangsa=new N(new Uint32Array([92784,92862,1,92864,92873,1]));static Tangut=new N(new Uint32Array([94176,94208,32,94209,100343,1,100352,101119,1,101632,101640,1]));static Telugu=new N(new Uint32Array([3072,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3132,3140,1,3142,3144,1,3146,3149,1,3157,3158,1,3160,3162,1,3165,3168,3,3169,3171,1,3174,3183,1,3191,3199,1]));static Thaana=new N(new Uint32Array([1920,1969,1]));static Thai=new N(new Uint32Array([3585,3642,1,3648,3675,1]));static Tibetan=new N(new Uint32Array([3840,3911,1,3913,3948,1,3953,3991,1,3993,4028,1,4030,4044,1,4046,4052,1,4057,4058,1]));static Tifinagh=new N(new Uint32Array([11568,11623,1,11631,11632,1,11647,11647,1]));static Tirhuta=new N(new Uint32Array([70784,70855,1,70864,70873,1]));static Todhri=new N(new Uint32Array([67008,67059,1]));static Toto=new N(new Uint32Array([123536,123566,1]));static Tulu_Tigalari=new N(new Uint32Array([70528,70537,1,70539,70542,3,70544,70581,1,70583,70592,1,70594,70597,3,70599,70602,1,70604,70613,1,70615,70616,1,70625,70626,1]));static Ugaritic=new N(new Uint32Array([66432,66461,1,66463,66463,1]));static Vai=new N(new Uint32Array([42240,42539,1]));static Vithkuqi=new N(new Uint32Array([66928,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1]));static Wancho=new N(new Uint32Array([123584,123641,1,123647,123647,1]));static Warang_Citi=new N(new Uint32Array([71840,71922,1,71935,71935,1]));static Yezidi=new N(new Uint32Array([69248,69289,1,69291,69293,1,69296,69297,1]));static Yi=new N(new Uint32Array([40960,42124,1,42128,42182,1]));static Zanabazar_Square=new N(new Uint32Array([72192,72263,1]));static CATEGORIES=new Map([["C",e.C],["Cc",e.Cc],["Cf",e.Cf],["Co",e.Co],["Cs",e.Cs],["L",e.L],["Ll",e.Ll],["Lm",e.Lm],["Lo",e.Lo],["Lt",e.Lt],["Lu",e.Lu],["M",e.M],["Mc",e.Mc],["Me",e.Me],["Mn",e.Mn],["N",e.N],["Nd",e.Nd],["Nl",e.Nl],["No",e.No],["P",e.P],["Pc",e.Pc],["Pd",e.Pd],["Pe",e.Pe],["Pf",e.Pf],["Pi",e.Pi],["Po",e.Po],["Ps",e.Ps],["S",e.S],["Sc",e.Sc],["Sk",e.Sk],["Sm",e.Sm],["So",e.So],["Z",e.Z],["Zl",e.Zl],["Zp",e.Zp],["Zs",e.Zs]]);static SCRIPTS=new Map([["Adlam",e.Adlam],["Ahom",e.Ahom],["Anatolian_Hieroglyphs",e.Anatolian_Hieroglyphs],["Arabic",e.Arabic],["Armenian",e.Armenian],["Avestan",e.Avestan],["Balinese",e.Balinese],["Bamum",e.Bamum],["Bassa_Vah",e.Bassa_Vah],["Batak",e.Batak],["Bengali",e.Bengali],["Bhaiksuki",e.Bhaiksuki],["Bopomofo",e.Bopomofo],["Brahmi",e.Brahmi],["Braille",e.Braille],["Buginese",e.Buginese],["Buhid",e.Buhid],["Canadian_Aboriginal",e.Canadian_Aboriginal],["Carian",e.Carian],["Caucasian_Albanian",e.Caucasian_Albanian],["Chakma",e.Chakma],["Cham",e.Cham],["Cherokee",e.Cherokee],["Chorasmian",e.Chorasmian],["Common",e.Common],["Coptic",e.Coptic],["Cuneiform",e.Cuneiform],["Cypriot",e.Cypriot],["Cypro_Minoan",e.Cypro_Minoan],["Cyrillic",e.Cyrillic],["Deseret",e.Deseret],["Devanagari",e.Devanagari],["Dives_Akuru",e.Dives_Akuru],["Dogra",e.Dogra],["Duployan",e.Duployan],["Egyptian_Hieroglyphs",e.Egyptian_Hieroglyphs],["Elbasan",e.Elbasan],["Elymaic",e.Elymaic],["Ethiopic",e.Ethiopic],["Garay",e.Garay],["Georgian",e.Georgian],["Glagolitic",e.Glagolitic],["Gothic",e.Gothic],["Grantha",e.Grantha],["Greek",e.Greek],["Gujarati",e.Gujarati],["Gunjala_Gondi",e.Gunjala_Gondi],["Gurmukhi",e.Gurmukhi],["Gurung_Khema",e.Gurung_Khema],["Han",e.Han],["Hangul",e.Hangul],["Hanifi_Rohingya",e.Hanifi_Rohingya],["Hanunoo",e.Hanunoo],["Hatran",e.Hatran],["Hebrew",e.Hebrew],["Hiragana",e.Hiragana],["Imperial_Aramaic",e.Imperial_Aramaic],["Inherited",e.Inherited],["Inscriptional_Pahlavi",e.Inscriptional_Pahlavi],["Inscriptional_Parthian",e.Inscriptional_Parthian],["Javanese",e.Javanese],["Kaithi",e.Kaithi],["Kannada",e.Kannada],["Katakana",e.Katakana],["Kawi",e.Kawi],["Kayah_Li",e.Kayah_Li],["Kharoshthi",e.Kharoshthi],["Khitan_Small_Script",e.Khitan_Small_Script],["Khmer",e.Khmer],["Khojki",e.Khojki],["Khudawadi",e.Khudawadi],["Kirat_Rai",e.Kirat_Rai],["Lao",e.Lao],["Latin",e.Latin],["Lepcha",e.Lepcha],["Limbu",e.Limbu],["Linear_A",e.Linear_A],["Linear_B",e.Linear_B],["Lisu",e.Lisu],["Lycian",e.Lycian],["Lydian",e.Lydian],["Mahajani",e.Mahajani],["Makasar",e.Makasar],["Malayalam",e.Malayalam],["Mandaic",e.Mandaic],["Manichaean",e.Manichaean],["Marchen",e.Marchen],["Masaram_Gondi",e.Masaram_Gondi],["Medefaidrin",e.Medefaidrin],["Meetei_Mayek",e.Meetei_Mayek],["Mende_Kikakui",e.Mende_Kikakui],["Meroitic_Cursive",e.Meroitic_Cursive],["Meroitic_Hieroglyphs",e.Meroitic_Hieroglyphs],["Miao",e.Miao],["Modi",e.Modi],["Mongolian",e.Mongolian],["Mro",e.Mro],["Multani",e.Multani],["Myanmar",e.Myanmar],["Nabataean",e.Nabataean],["Nag_Mundari",e.Nag_Mundari],["Nandinagari",e.Nandinagari],["New_Tai_Lue",e.New_Tai_Lue],["Newa",e.Newa],["Nko",e.Nko],["Nushu",e.Nushu],["Nyiakeng_Puachue_Hmong",e.Nyiakeng_Puachue_Hmong],["Ogham",e.Ogham],["Ol_Chiki",e.Ol_Chiki],["Ol_Onal",e.Ol_Onal],["Old_Hungarian",e.Old_Hungarian],["Old_Italic",e.Old_Italic],["Old_North_Arabian",e.Old_North_Arabian],["Old_Permic",e.Old_Permic],["Old_Persian",e.Old_Persian],["Old_Sogdian",e.Old_Sogdian],["Old_South_Arabian",e.Old_South_Arabian],["Old_Turkic",e.Old_Turkic],["Old_Uyghur",e.Old_Uyghur],["Oriya",e.Oriya],["Osage",e.Osage],["Osmanya",e.Osmanya],["Pahawh_Hmong",e.Pahawh_Hmong],["Palmyrene",e.Palmyrene],["Pau_Cin_Hau",e.Pau_Cin_Hau],["Phags_Pa",e.Phags_Pa],["Phoenician",e.Phoenician],["Psalter_Pahlavi",e.Psalter_Pahlavi],["Rejang",e.Rejang],["Runic",e.Runic],["Samaritan",e.Samaritan],["Saurashtra",e.Saurashtra],["Sharada",e.Sharada],["Shavian",e.Shavian],["Siddham",e.Siddham],["SignWriting",e.SignWriting],["Sinhala",e.Sinhala],["Sogdian",e.Sogdian],["Sora_Sompeng",e.Sora_Sompeng],["Soyombo",e.Soyombo],["Sundanese",e.Sundanese],["Sunuwar",e.Sunuwar],["Syloti_Nagri",e.Syloti_Nagri],["Syriac",e.Syriac],["Tagalog",e.Tagalog],["Tagbanwa",e.Tagbanwa],["Tai_Le",e.Tai_Le],["Tai_Tham",e.Tai_Tham],["Tai_Viet",e.Tai_Viet],["Takri",e.Takri],["Tamil",e.Tamil],["Tangsa",e.Tangsa],["Tangut",e.Tangut],["Telugu",e.Telugu],["Thaana",e.Thaana],["Thai",e.Thai],["Tibetan",e.Tibetan],["Tifinagh",e.Tifinagh],["Tirhuta",e.Tirhuta],["Todhri",e.Todhri],["Toto",e.Toto],["Tulu_Tigalari",e.Tulu_Tigalari],["Ugaritic",e.Ugaritic],["Vai",e.Vai],["Vithkuqi",e.Vithkuqi],["Wancho",e.Wancho],["Warang_Citi",e.Warang_Citi],["Yezidi",e.Yezidi],["Yi",e.Yi],["Zanabazar_Square",e.Zanabazar_Square]]);static FOLD_CATEGORIES=new Map([["L",e.foldL],["Ll",e.foldLl],["Lt",e.foldLt],["Lu",e.foldLu],["M",e.foldM],["Mn",e.foldMn]]);static FOLD_SCRIPT=new Map([["Common",e.foldCommon],["Greek",e.foldGreek],["Inherited",e.foldInherited]]);static Print=new N(new Uint32Array([33,126,1,161,172,1,174,887,1,890,895,1,900,906,1,908,910,2,911,929,1,931,1327,1,1329,1366,1,1369,1418,1,1421,1423,1,1425,1479,1,1488,1514,1,1519,1524,1,1542,1563,1,1565,1756,1,1758,1805,1,1808,1866,1,1869,1969,1,1984,2042,1,2045,2093,1,2096,2110,1,2112,2139,1,2142,2144,2,2145,2154,1,2160,2190,1,2199,2273,1,2275,2435,1,2437,2444,1,2447,2448,1,2451,2472,1,2474,2480,1,2482,2486,4,2487,2489,1,2492,2500,1,2503,2504,1,2507,2510,1,2519,2524,5,2525,2527,2,2528,2531,1,2534,2558,1,2561,2563,1,2565,2570,1,2575,2576,1,2579,2600,1,2602,2608,1,2610,2611,1,2613,2614,1,2616,2617,1,2620,2622,2,2623,2626,1,2631,2632,1,2635,2637,1,2641,2649,8,2650,2652,1,2654,2662,8,2663,2678,1,2689,2691,1,2693,2701,1,2703,2705,1,2707,2728,1,2730,2736,1,2738,2739,1,2741,2745,1,2748,2757,1,2759,2761,1,2763,2765,1,2768,2784,16,2785,2787,1,2790,2801,1,2809,2815,1,2817,2819,1,2821,2828,1,2831,2832,1,2835,2856,1,2858,2864,1,2866,2867,1,2869,2873,1,2876,2884,1,2887,2888,1,2891,2893,1,2901,2903,1,2908,2909,1,2911,2915,1,2918,2935,1,2946,2947,1,2949,2954,1,2958,2960,1,2962,2965,1,2969,2970,1,2972,2974,2,2975,2979,4,2980,2984,4,2985,2986,1,2990,3001,1,3006,3010,1,3014,3016,1,3018,3021,1,3024,3031,7,3046,3066,1,3072,3084,1,3086,3088,1,3090,3112,1,3114,3129,1,3132,3140,1,3142,3144,1,3146,3149,1,3157,3158,1,3160,3162,1,3165,3168,3,3169,3171,1,3174,3183,1,3191,3212,1,3214,3216,1,3218,3240,1,3242,3251,1,3253,3257,1,3260,3268,1,3270,3272,1,3274,3277,1,3285,3286,1,3293,3294,1,3296,3299,1,3302,3311,1,3313,3315,1,3328,3340,1,3342,3344,1,3346,3396,1,3398,3400,1,3402,3407,1,3412,3427,1,3430,3455,1,3457,3459,1,3461,3478,1,3482,3505,1,3507,3515,1,3517,3520,3,3521,3526,1,3530,3535,5,3536,3540,1,3542,3544,2,3545,3551,1,3558,3567,1,3570,3572,1,3585,3642,1,3647,3675,1,3713,3714,1,3716,3718,2,3719,3722,1,3724,3747,1,3749,3751,2,3752,3773,1,3776,3780,1,3782,3784,2,3785,3790,1,3792,3801,1,3804,3807,1,3840,3911,1,3913,3948,1,3953,3991,1,3993,4028,1,4030,4044,1,4046,4058,1,4096,4293,1,4295,4301,6,4304,4680,1,4682,4685,1,4688,4694,1,4696,4698,2,4699,4701,1,4704,4744,1,4746,4749,1,4752,4784,1,4786,4789,1,4792,4798,1,4800,4802,2,4803,4805,1,4808,4822,1,4824,4880,1,4882,4885,1,4888,4954,1,4957,4988,1,4992,5017,1,5024,5109,1,5112,5117,1,5120,5759,1,5761,5788,1,5792,5880,1,5888,5909,1,5919,5942,1,5952,5971,1,5984,5996,1,5998,6e3,1,6002,6003,1,6016,6109,1,6112,6121,1,6128,6137,1,6144,6157,1,6159,6169,1,6176,6264,1,6272,6314,1,6320,6389,1,6400,6430,1,6432,6443,1,6448,6459,1,6464,6468,4,6469,6509,1,6512,6516,1,6528,6571,1,6576,6601,1,6608,6618,1,6622,6683,1,6686,6750,1,6752,6780,1,6783,6793,1,6800,6809,1,6816,6829,1,6832,6862,1,6912,6988,1,6990,7155,1,7164,7223,1,7227,7241,1,7245,7306,1,7312,7354,1,7357,7367,1,7376,7418,1,7424,7957,1,7960,7965,1,7968,8005,1,8008,8013,1,8016,8023,1,8025,8031,2,8032,8061,1,8064,8116,1,8118,8132,1,8134,8147,1,8150,8155,1,8157,8175,1,8178,8180,1,8182,8190,1,8208,8231,1,8240,8286,1,8304,8305,1,8308,8334,1,8336,8348,1,8352,8384,1,8400,8432,1,8448,8587,1,8592,9257,1,9280,9290,1,9312,11123,1,11126,11157,1,11159,11507,1,11513,11557,1,11559,11565,6,11568,11623,1,11631,11632,1,11647,11670,1,11680,11686,1,11688,11694,1,11696,11702,1,11704,11710,1,11712,11718,1,11720,11726,1,11728,11734,1,11736,11742,1,11744,11869,1,11904,11929,1,11931,12019,1,12032,12245,1,12272,12287,1,12289,12351,1,12353,12438,1,12441,12543,1,12549,12591,1,12593,12686,1,12688,12773,1,12783,12830,1,12832,42124,1,42128,42182,1,42192,42539,1,42560,42743,1,42752,42957,1,42960,42961,1,42963,42965,2,42966,42972,1,42994,43052,1,43056,43065,1,43072,43127,1,43136,43205,1,43214,43225,1,43232,43347,1,43359,43388,1,43392,43469,1,43471,43481,1,43486,43518,1,43520,43574,1,43584,43597,1,43600,43609,1,43612,43714,1,43739,43766,1,43777,43782,1,43785,43790,1,43793,43798,1,43808,43814,1,43816,43822,1,43824,43883,1,43888,44013,1,44016,44025,1,44032,55203,1,55216,55238,1,55243,55291,1,63744,64109,1,64112,64217,1,64256,64262,1,64275,64279,1,64285,64310,1,64312,64316,1,64318,64320,2,64321,64323,2,64324,64326,2,64327,64450,1,64467,64911,1,64914,64967,1,64975,65008,33,65009,65049,1,65056,65106,1,65108,65126,1,65128,65131,1,65136,65140,1,65142,65276,1,65281,65470,1,65474,65479,1,65482,65487,1,65490,65495,1,65498,65500,1,65504,65510,1,65512,65518,1,65532,65533,1,65536,65547,1,65549,65574,1,65576,65594,1,65596,65597,1,65599,65613,1,65616,65629,1,65664,65786,1,65792,65794,1,65799,65843,1,65847,65934,1,65936,65948,1,65952,66e3,48,66001,66045,1,66176,66204,1,66208,66256,1,66272,66299,1,66304,66339,1,66349,66378,1,66384,66426,1,66432,66461,1,66463,66499,1,66504,66517,1,66560,66717,1,66720,66729,1,66736,66771,1,66776,66811,1,66816,66855,1,66864,66915,1,66927,66938,1,66940,66954,1,66956,66962,1,66964,66965,1,66967,66977,1,66979,66993,1,66995,67001,1,67003,67004,1,67008,67059,1,67072,67382,1,67392,67413,1,67424,67431,1,67456,67461,1,67463,67504,1,67506,67514,1,67584,67589,1,67592,67594,2,67595,67637,1,67639,67640,1,67644,67647,3,67648,67669,1,67671,67742,1,67751,67759,1,67808,67826,1,67828,67829,1,67835,67867,1,67871,67897,1,67903,67968,65,67969,68023,1,68028,68047,1,68050,68099,1,68101,68102,1,68108,68115,1,68117,68119,1,68121,68149,1,68152,68154,1,68159,68168,1,68176,68184,1,68192,68255,1,68288,68326,1,68331,68342,1,68352,68405,1,68409,68437,1,68440,68466,1,68472,68497,1,68505,68508,1,68521,68527,1,68608,68680,1,68736,68786,1,68800,68850,1,68858,68903,1,68912,68921,1,68928,68965,1,68969,68997,1,69006,69007,1,69216,69246,1,69248,69289,1,69291,69293,1,69296,69297,1,69314,69316,1,69372,69415,1,69424,69465,1,69488,69513,1,69552,69579,1,69600,69622,1,69632,69709,1,69714,69749,1,69759,69820,1,69822,69826,1,69840,69864,1,69872,69881,1,69888,69940,1,69942,69959,1,69968,70006,1,70016,70111,1,70113,70132,1,70144,70161,1,70163,70209,1,70272,70278,1,70280,70282,2,70283,70285,1,70287,70301,1,70303,70313,1,70320,70378,1,70384,70393,1,70400,70403,1,70405,70412,1,70415,70416,1,70419,70440,1,70442,70448,1,70450,70451,1,70453,70457,1,70459,70468,1,70471,70472,1,70475,70477,1,70480,70487,7,70493,70499,1,70502,70508,1,70512,70516,1,70528,70537,1,70539,70542,3,70544,70581,1,70583,70592,1,70594,70597,3,70599,70602,1,70604,70613,1,70615,70616,1,70625,70626,1,70656,70747,1,70749,70753,1,70784,70855,1,70864,70873,1,71040,71093,1,71096,71133,1,71168,71236,1,71248,71257,1,71264,71276,1,71296,71353,1,71360,71369,1,71376,71395,1,71424,71450,1,71453,71467,1,71472,71494,1,71680,71739,1,71840,71922,1,71935,71942,1,71945,71948,3,71949,71955,1,71957,71958,1,71960,71989,1,71991,71992,1,71995,72006,1,72016,72025,1,72096,72103,1,72106,72151,1,72154,72164,1,72192,72263,1,72272,72354,1,72368,72440,1,72448,72457,1,72640,72673,1,72688,72697,1,72704,72712,1,72714,72758,1,72760,72773,1,72784,72812,1,72816,72847,1,72850,72871,1,72873,72886,1,72960,72966,1,72968,72969,1,72971,73014,1,73018,73020,2,73021,73023,2,73024,73031,1,73040,73049,1,73056,73061,1,73063,73064,1,73066,73102,1,73104,73105,1,73107,73112,1,73120,73129,1,73440,73464,1,73472,73488,1,73490,73530,1,73534,73562,1,73648,73664,16,73665,73713,1,73727,74649,1,74752,74862,1,74864,74868,1,74880,75075,1,77712,77810,1,77824,78895,1,78912,78933,1,78944,82938,1,82944,83526,1,90368,90425,1,92160,92728,1,92736,92766,1,92768,92777,1,92782,92862,1,92864,92873,1,92880,92909,1,92912,92917,1,92928,92997,1,93008,93017,1,93019,93025,1,93027,93047,1,93053,93071,1,93504,93561,1,93760,93850,1,93952,94026,1,94031,94087,1,94095,94111,1,94176,94180,1,94192,94193,1,94208,100343,1,100352,101589,1,101631,101640,1,110576,110579,1,110581,110587,1,110589,110590,1,110592,110882,1,110898,110928,30,110929,110930,1,110933,110948,15,110949,110951,1,110960,111355,1,113664,113770,1,113776,113788,1,113792,113800,1,113808,113817,1,113820,113823,1,117760,118009,1,118016,118451,1,118528,118573,1,118576,118598,1,118608,118723,1,118784,119029,1,119040,119078,1,119081,119154,1,119163,119274,1,119296,119365,1,119488,119507,1,119520,119539,1,119552,119638,1,119648,119672,1,119808,119892,1,119894,119964,1,119966,119967,1,119970,119973,3,119974,119977,3,119978,119980,1,119982,119993,1,119995,119997,2,119998,120003,1,120005,120069,1,120071,120074,1,120077,120084,1,120086,120092,1,120094,120121,1,120123,120126,1,120128,120132,1,120134,120138,4,120139,120144,1,120146,120485,1,120488,120779,1,120782,121483,1,121499,121503,1,121505,121519,1,122624,122654,1,122661,122666,1,122880,122886,1,122888,122904,1,122907,122913,1,122915,122916,1,122918,122922,1,122928,122989,1,123023,123136,113,123137,123180,1,123184,123197,1,123200,123209,1,123214,123215,1,123536,123566,1,123584,123641,1,123647,124112,465,124113,124153,1,124368,124410,1,124415,124896,481,124897,124902,1,124904,124907,1,124909,124910,1,124912,124926,1,124928,125124,1,125127,125142,1,125184,125259,1,125264,125273,1,125278,125279,1,126065,126132,1,126209,126269,1,126464,126467,1,126469,126495,1,126497,126498,1,126500,126503,3,126505,126514,1,126516,126519,1,126521,126523,2,126530,126535,5,126537,126541,2,126542,126543,1,126545,126546,1,126548,126551,3,126553,126561,2,126562,126564,2,126567,126570,1,126572,126578,1,126580,126583,1,126585,126588,1,126590,126592,2,126593,126601,1,126603,126619,1,126625,126627,1,126629,126633,1,126635,126651,1,126704,126705,1,126976,127019,1,127024,127123,1,127136,127150,1,127153,127167,1,127169,127183,1,127185,127221,1,127232,127405,1,127462,127490,1,127504,127547,1,127552,127560,1,127568,127569,1,127584,127589,1,127744,128727,1,128732,128748,1,128752,128764,1,128768,128886,1,128891,128985,1,128992,129003,1,129008,129024,16,129025,129035,1,129040,129095,1,129104,129113,1,129120,129159,1,129168,129197,1,129200,129211,1,129216,129217,1,129280,129619,1,129632,129645,1,129648,129660,1,129664,129673,1,129679,129734,1,129742,129756,1,129759,129769,1,129776,129784,1,129792,129938,1,129940,130041,1,131072,173791,1,173824,177977,1,177984,178205,1,178208,183969,1,183984,191456,1,191472,192093,1,194560,195101,1,196608,201546,1,201552,205743,1,917760,917999,1]))},ue=class{static MAX_RUNE=1114111;static MAX_ASCII=127;static MAX_LATIN1=255;static MAX_BMP=65535;static MIN_FOLD=65;static MAX_FOLD=125251;static is32(t,n){let r=0,s=t.length;for(;r<s;){let i=r+Math.floor((s-r)/2),o=t.getLo(i),a=t.getHi(i);if(o<=n&&n<=a){let l=t.getStride(i);return(n-o)%l===0}n<o?s=i:r=i+1}return!1}static is(t,n){if(n<=this.MAX_LATIN1){for(let r=0;r<t.length;r++){let s=t.getHi(r);if(n>s)continue;let i=t.getLo(r);if(n<i)return!1;let o=t.getStride(r);return(n-i)%o===0}return!1}return t.length>0&&n>=t.getLo(0)&&this.is32(t,n)}static isUpper(t){if(t<=this.MAX_LATIN1){let n=String.fromCodePoint(t);return n.toUpperCase()===n&&n.toLowerCase()!==n}return this.is(fn.Upper,t)}static isPrint(t){return t<=this.MAX_LATIN1?t>=32&&t<this.MAX_ASCII||t>=161&&t!==173:this.is(fn.Print,t)}static simpleFold(t){if(fn.CASE_ORBIT.has(t))return fn.CASE_ORBIT.get(t);let n=_.toLowerCase(t);return n!==t?n:_.toUpperCase(t)}static equalsIgnoreCase(t,n){if(t<0||n<0||t===n)return!0;if(t<=this.MAX_ASCII&&n<=this.MAX_ASCII)return _.CODES.get("A")<=t&&t<=_.CODES.get("Z")&&(t|=32),_.CODES.get("A")<=n&&n<=_.CODES.get("Z")&&(n|=32),t===n;for(let r=this.simpleFold(t);r!==t;r=this.simpleFold(r))if(r===n)return!0;return!1}},Te=class{static METACHARACTERS="\\.+*?()|[]{}^$";static EMPTY_BEGIN_LINE=1;static EMPTY_END_LINE=2;static EMPTY_BEGIN_TEXT=4;static EMPTY_END_TEXT=8;static EMPTY_WORD_BOUNDARY=16;static EMPTY_NO_WORD_BOUNDARY=32;static EMPTY_ALL=-1;static emptyInts(){return[]}static isalnum(t){return _.CODES.get("0")<=t&&t<=_.CODES.get("9")||_.CODES.get("a")<=t&&t<=_.CODES.get("z")||_.CODES.get("A")<=t&&t<=_.CODES.get("Z")}static unhex(t){return _.CODES.get("0")<=t&&t<=_.CODES.get("9")?t-_.CODES.get("0"):_.CODES.get("a")<=t&&t<=_.CODES.get("f")?t-_.CODES.get("a")+10:_.CODES.get("A")<=t&&t<=_.CODES.get("F")?t-_.CODES.get("A")+10:-1}static escapeRune(t){let n="";if(ue.isPrint(t))this.METACHARACTERS.indexOf(String.fromCodePoint(t))>=0&&(n+="\\"),n+=String.fromCodePoint(t);else switch(t){case _.CODES.get('"'):n+='\\"';break;case _.CODES.get("\\"):n+="\\\\";break;case _.CODES.get(" "):n+="\\t";break;case _.CODES.get(`
164
+ `):n+="\\n";break;case _.CODES.get("\r"):n+="\\r";break;case _.CODES.get("\b"):n+="\\b";break;case _.CODES.get("\f"):n+="\\f";break;default:{let r=t.toString(16);t<256?(n+="\\x",r.length===1&&(n+="0"),n+=r):n+=`\\x{${r}}`;break}}return n}static stringToRunes(t){return String(t).split("").map(n=>n.codePointAt(0))}static runeToString(t){return String.fromCodePoint(t)}static isWordRune(t){return _.CODES.get("a")<=t&&t<=_.CODES.get("z")||_.CODES.get("A")<=t&&t<=_.CODES.get("Z")||_.CODES.get("0")<=t&&t<=_.CODES.get("9")||t===_.CODES.get("_")}static emptyOpContext(t,n){let r=0;return t<0&&(r|=this.EMPTY_BEGIN_TEXT|this.EMPTY_BEGIN_LINE),t===_.CODES.get(`
165
+ `)&&(r|=this.EMPTY_BEGIN_LINE),n<0&&(r|=this.EMPTY_END_TEXT|this.EMPTY_END_LINE),n===_.CODES.get(`
166
+ `)&&(r|=this.EMPTY_END_LINE),this.isWordRune(t)!==this.isWordRune(n)?r|=this.EMPTY_WORD_BOUNDARY:r|=this.EMPTY_NO_WORD_BOUNDARY,r}static quoteMeta(t){return t.split("").map(n=>this.METACHARACTERS.indexOf(n)>=0?`\\${n}`:n).join("")}static charCount(t){return t>ue.MAX_BMP?2:1}static stringToUtf8ByteArray(t){if(globalThis.TextEncoder)return Array.from(new TextEncoder().encode(t));{let n=[],r=0;for(let s=0;s<t.length;s++){let i=t.charCodeAt(s);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=i&63|128):(i&64512)===55296&&s+1<t.length&&(t.charCodeAt(s+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=i&63|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=i&63|128)}return n}}static utf8ByteArrayToString(t){if(globalThis.TextDecoder)return new TextDecoder("utf-8").decode(new Uint8Array(t));{let n=[],r=0,s=0;for(;r<t.length;){let i=t[r++];if(i<128)n[s++]=String.fromCharCode(i);else if(i>191&&i<224){let o=t[r++];n[s++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){let o=t[r++],a=t[r++],l=t[r++],c=((i&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;n[s++]=String.fromCharCode(55296+(c>>10)),n[s++]=String.fromCharCode(56320+(c&1023))}else{let o=t[r++],a=t[r++];n[s++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return n.join("")}}},ep=(e=[],t=0)=>{let n={};for(let r=0;r<e.length;r++){let s=e[r],i=t+r;n[s]=i,n[i]=s}return Object.freeze(n)},lr=class e{static Encoding=ep(["UTF_16","UTF_8"]);getEncoding(){throw Error("not implemented")}isUTF8Encoding(){return this.getEncoding()===e.Encoding.UTF_8}isUTF16Encoding(){return this.getEncoding()===e.Encoding.UTF_16}},Vi=class extends lr{constructor(t=null){super(),this.bytes=t}getEncoding(){return lr.Encoding.UTF_8}asCharSequence(){return Te.utf8ByteArrayToString(this.bytes)}asBytes(){return this.bytes}length(){return this.bytes.length}},el=class extends lr{constructor(t=null){super(),this.charSequence=t}getEncoding(){return lr.Encoding.UTF_16}asCharSequence(){return this.charSequence}asBytes(){return this.charSequence.toString().split("").map(t=>t.codePointAt(0))}length(){return this.charSequence.length}},ls=class{static utf16(t){return new el(t)}static utf8(t){return Array.isArray(t)?new Vi(t):new Vi(Te.stringToUtf8ByteArray(t))}},Bn=class{static EOF(){return-8}canCheckPrefix(){return!0}endPos(){return this.end}},tl=class extends Bn{constructor(t,n=0,r=t.length){super(),this.bytes=t,this.start=n,this.end=r}step(t){if(t+=this.start,t>=this.end)return Bn.EOF();let n=this.bytes[t++]&255;return(n&128)===0?n<<3|1:(n&224)===192?(n=n&31,t>=this.end?Bn.EOF():(n=n<<6|this.bytes[t++]&63,n<<3|2)):(n&240)===224?(n=n&15,t+1>=this.end?Bn.EOF():(n=n<<6|this.bytes[t++]&63,n=n<<6|this.bytes[t++]&63,n<<3|3)):(n=n&7,t+2>=this.end?Bn.EOF():(n=n<<6|this.bytes[t++]&63,n=n<<6|this.bytes[t++]&63,n=n<<6|this.bytes[t++]&63,n<<3|4))}index(t,n){n+=this.start;let r=this.indexOf(this.bytes,t.prefixUTF8,n);return r<0?r:r-n}context(t){t+=this.start;let n=-1;if(t>this.start&&t<=this.end){let s=t-1;if(n=this.bytes[s--],n>=128){let i=t-4;for(i<this.start&&(i=this.start);s>=i&&(this.bytes[s]&192)===128;)s--;s<this.start&&(s=this.start),n=this.step(s)>>3}}let r=t<this.end?this.step(t)>>3:-1;return Te.emptyOpContext(n,r)}indexOf(t,n,r=0){let s=n.length;if(s===0)return-1;let i=t.length;for(let o=r;o<=i-s;o++)for(let a=0;a<s&&t[o+a]===n[a];a++)if(a===s-1)return o;return-1}},nl=class extends Bn{constructor(t,n=0,r=t.length){super(),this.charSequence=t,this.start=n,this.end=r}step(t){if(t+=this.start,t<this.end){let n=this.charSequence.codePointAt(t);return n<<3|Te.charCount(n)}else return Bn.EOF()}index(t,n){n+=this.start;let r=this.charSequence.indexOf(t.prefix,n);return r<0?r:r-n}context(t){t+=this.start;let n=t>0&&t<=this.charSequence.length?this.charSequence.codePointAt(t-1):-1,r=t<this.charSequence.length?this.charSequence.codePointAt(t):-1;return Te.emptyOpContext(n,r)}},Ye=class{static fromUTF8(t,n=0,r=t.length){return new tl(t,n,r)}static fromUTF16(t,n=0,r=t.length){return new nl(t,n,r)}},cs=class extends Error{constructor(t){super(t),this.name="RE2JSException"}},je=class extends cs{constructor(t,n=null){let r=`error parsing regexp: ${t}`;n&&(r+=`: \`${n}\``),super(r),this.name="RE2JSSyntaxException",this.message=r,this.error=t,this.input=n}getDescription(){return this.error}getPattern(){return this.input}},rl=class extends cs{constructor(t){super(t),this.name="RE2JSCompileException"}},An=class extends cs{constructor(t){super(t),this.name="RE2JSGroupException"}},sl=class extends cs{constructor(t){super(t),this.name="RE2JSFlagsException"}},qi=class{static quoteReplacement(t,n=!1){return n?t.indexOf("\\")<0&&t.indexOf("$")<0?t:t.split("").map(r=>{let s=r.codePointAt(0);return s===_.CODES.get("\\")||s===_.CODES.get("$")?`\\${r}`:r}).join(""):t.indexOf("$")<0?t:t.split("").map(r=>r.codePointAt(0)===_.CODES.get("$")?"$$":r).join("")}constructor(t,n){if(t===null)throw new Error("pattern is null");this.patternInput=t;let r=this.patternInput.re2();this.patternGroupCount=r.numberOfCapturingGroups(),this.groups=[],this.namedGroups=r.namedGroups,this.numberOfInstructions=r.numberOfInstructions(),n instanceof lr?this.resetMatcherInput(n):Array.isArray(n)?this.resetMatcherInput(ls.utf8(n)):this.resetMatcherInput(ls.utf16(n))}pattern(){return this.patternInput}reset(){return this.matcherInputLength=this.matcherInput.length(),this.appendPos=0,this.hasMatch=!1,this.hasGroups=!1,this.anchorFlag=0,this}resetMatcherInput(t){if(t===null)throw new Error("input is null");return this.matcherInput=t,this.reset(),this}start(t=0){if(typeof t=="string"){let n=this.namedGroups[t];if(!Number.isFinite(n))throw new An(`group '${t}' not found`);t=n}return this.loadGroup(t),this.groups[2*t]}end(t=0){if(typeof t=="string"){let n=this.namedGroups[t];if(!Number.isFinite(n))throw new An(`group '${t}' not found`);t=n}return this.loadGroup(t),this.groups[2*t+1]}programSize(){return this.numberOfInstructions}group(t=0){if(typeof t=="string"){let s=this.namedGroups[t];if(!Number.isFinite(s))throw new An(`group '${t}' not found`);t=s}let n=this.start(t),r=this.end(t);return n<0&&r<0?null:this.substring(n,r)}groupCount(){return this.patternGroupCount}loadGroup(t){if(t<0||t>this.patternGroupCount)throw new An(`Group index out of bounds: ${t}`);if(!this.hasMatch)throw new An("perhaps no match attempted");if(t===0||this.hasGroups)return;let n=this.groups[1]+1;n>this.matcherInputLength&&(n=this.matcherInputLength);let r=this.patternInput.re2().matchMachineInput(this.matcherInput,this.groups[0],n,this.anchorFlag,1+this.patternGroupCount);if(!r[0])throw new An("inconsistency in matching group data");this.groups=r[1],this.hasGroups=!0}matches(){return this.genMatch(0,G.ANCHOR_BOTH)}lookingAt(){return this.genMatch(0,G.ANCHOR_START)}find(t=null){if(t!==null){if(t<0||t>this.matcherInputLength)throw new An(`start index out of bounds: ${t}`);return this.reset(),this.genMatch(t,0)}return t=0,this.hasMatch&&(t=this.groups[1],this.groups[0]===this.groups[1]&&t++),this.genMatch(t,G.UNANCHORED)}genMatch(t,n){let r=this.patternInput.re2().matchMachineInput(this.matcherInput,t,this.matcherInputLength,n,1);return r[0]?(this.groups=r[1],this.hasMatch=!0,this.hasGroups=!1,this.anchorFlag=n,!0):!1}substring(t,n){return this.matcherInput.isUTF8Encoding()?Te.utf8ByteArrayToString(this.matcherInput.asBytes().slice(t,n)):this.matcherInput.asCharSequence().substring(t,n).toString()}inputLength(){return this.matcherInputLength}appendReplacement(t,n=!1){let r="",s=this.start(),i=this.end();return this.appendPos<s&&(r+=this.substring(this.appendPos,s)),this.appendPos=i,r+=n?this.appendReplacementInternalJava(t):this.appendReplacementInternalJs(t),r}appendReplacementInternalJava(t){let n="",r=0,s=t.length;for(let i=0;i<s-1;i++){if(t.codePointAt(i)===_.CODES.get("\\")){r<i&&(n+=t.substring(r,i)),i++,r=i;continue}if(t.codePointAt(i)===_.CODES.get("$")){let o=t.codePointAt(i+1);if(_.CODES.get("0")<=o&&o<=_.CODES.get("9")){let a=o-_.CODES.get("0");for(r<i&&(n+=t.substring(r,i)),i+=2;i<s&&(o=t.codePointAt(i),!(o<_.CODES.get("0")||o>_.CODES.get("9")||a*10+o-_.CODES.get("0")>this.patternGroupCount));i++)a=a*10+o-_.CODES.get("0");if(a>this.patternGroupCount)throw new An(`n > number of groups: ${a}`);let l=this.group(a);l!==null&&(n+=l),r=i,i--;continue}else if(o===_.CODES.get("{")){r<i&&(n+=t.substring(r,i)),i++;let a=i+1;for(;a<t.length&&t.codePointAt(a)!==_.CODES.get("}")&&t.codePointAt(a)!==_.CODES.get(" ");)a++;if(a===t.length||t.codePointAt(a)!==_.CODES.get("}"))throw new An("named capture group is missing trailing '}'");let l=t.substring(i+1,a);n+=this.group(l),r=a+1}}}return r<s&&(n+=t.substring(r,s)),n}appendReplacementInternalJs(t){let n="",r=0,s=t.length;for(let i=0;i<s-1;i++)if(t.codePointAt(i)===_.CODES.get("$")){let o=t.codePointAt(i+1);if(_.CODES.get("$")===o){r<i&&(n+=t.substring(r,i)),n+="$",i++,r=i+1;continue}else if(_.CODES.get("&")===o){r<i&&(n+=t.substring(r,i));let a=this.group(0);a!==null?n+=a:n+="$&",i++,r=i+1;continue}else if(_.CODES.get("1")<=o&&o<=_.CODES.get("9")){let a=o-_.CODES.get("0");for(r<i&&(n+=t.substring(r,i)),i+=2;i<s&&(o=t.codePointAt(i),!(o<_.CODES.get("0")||o>_.CODES.get("9")||a*10+o-_.CODES.get("0")>this.patternGroupCount));i++)a=a*10+o-_.CODES.get("0");if(a>this.patternGroupCount){n+=`$${a}`,r=i,i--;continue}let l=this.group(a);l!==null&&(n+=l),r=i,i--;continue}else if(o===_.CODES.get("<")){r<i&&(n+=t.substring(r,i)),i++;let a=i+1;for(;a<t.length&&t.codePointAt(a)!==_.CODES.get(">")&&t.codePointAt(a)!==_.CODES.get(" ");)a++;if(a===t.length||t.codePointAt(a)!==_.CODES.get(">")){n+=t.substring(i-1,a+1),r=a+1;continue}let l=t.substring(i+1,a);Object.prototype.hasOwnProperty.call(this.namedGroups,l)?n+=this.group(l):n+=`$<${l}>`,r=a+1}}return r<s&&(n+=t.substring(r,s)),n}appendTail(){return this.substring(this.appendPos,this.matcherInputLength)}replaceAll(t,n=!1){return this.replace(t,!0,n)}replaceFirst(t,n=!1){return this.replace(t,!1,n)}replace(t,n=!0,r=!1){let s="";for(this.reset();this.find()&&(s+=this.appendReplacement(t,r),!!n););return s+=this.appendTail(),s}},de=class e{static ALT=1;static ALT_MATCH=2;static CAPTURE=3;static EMPTY_WIDTH=4;static FAIL=5;static MATCH=6;static NOP=7;static RUNE=8;static RUNE1=9;static RUNE_ANY=10;static RUNE_ANY_NOT_NL=11;static isRuneOp(t){return e.RUNE<=t&&t<=e.RUNE_ANY_NOT_NL}static escapeRunes(t){let n='"';for(let r of t)n+=Te.escapeRune(r);return n+='"',n}constructor(t){this.op=t,this.out=0,this.arg=0,this.runes=[]}matchRune(t){if(this.runes.length===1){let s=this.runes[0];return(this.arg&G.FOLD_CASE)!==0?ue.equalsIgnoreCase(s,t):t===s}for(let s=0;s<this.runes.length&&s<=8;s+=2){if(t<this.runes[s])return!1;if(t<=this.runes[s+1])return!0}let n=0,r=this.runes.length/2|0;for(;n<r;){let s=n+((r-n)/2|0);if(this.runes[2*s]<=t){if(t<=this.runes[2*s+1])return!0;n=s+1}else r=s}return!1}toString(){switch(this.op){case e.ALT:return`alt -> ${this.out}, ${this.arg}`;case e.ALT_MATCH:return`altmatch -> ${this.out}, ${this.arg}`;case e.CAPTURE:return`cap ${this.arg} -> ${this.out}`;case e.EMPTY_WIDTH:return`empty ${this.arg} -> ${this.out}`;case e.MATCH:return"match";case e.FAIL:return"fail";case e.NOP:return`nop -> ${this.out}`;case e.RUNE:return this.runes===null?"rune <null>":["rune ",e.escapeRunes(this.runes),(this.arg&G.FOLD_CASE)!==0?"/i":""," -> ",this.out].join("");case e.RUNE1:return`rune1 ${e.escapeRunes(this.runes)} -> ${this.out}`;case e.RUNE_ANY:return`any -> ${this.out}`;case e.RUNE_ANY_NOT_NL:return`anynotnl -> ${this.out}`;default:throw new Error("unhandled case in Inst.toString")}}},il=class{constructor(){this.inst=null,this.cap=[]}},Zi=class{constructor(){this.sparse=[],this.densePcs=[],this.denseThreads=[],this.size=0}contains(t){let n=this.sparse[t];return n<this.size&&this.densePcs[n]===t}isEmpty(){return this.size===0}add(t){let n=this.size++;return this.sparse[t]=n,this.denseThreads[n]=null,this.densePcs[n]=t,n}clear(){this.sparse=[],this.densePcs=[],this.denseThreads=[],this.size=0}toString(){let t="{";for(let n=0;n<this.size;n++)n!==0&&(t+=", "),t+=this.densePcs[n];return t+="}",t}},Qs=class e{static fromRE2(t){let n=new e;return n.prog=t.prog,n.re2=t,n.q0=new Zi(n.prog.numInst()),n.q1=new Zi(n.prog.numInst()),n.pool=[],n.poolSize=0,n.matched=!1,n.matchcap=Array(n.prog.numCap<2?2:n.prog.numCap).fill(0),n.ncap=0,n}static fromMachine(t){let n=new e;return n.re2=t.re2,n.prog=t.prog,n.q0=t.q0,n.q1=t.q1,n.pool=t.pool,n.poolSize=t.poolSize,n.matched=t.matched,n.matchcap=t.matchcap,n.ncap=t.ncap,n}init(t){this.ncap=t,t>this.matchcap.length?this.initNewCap(t):this.resetCap(t)}resetCap(t){for(let n=0;n<this.poolSize;n++){let r=this.pool[n];r.cap=Array(t).fill(0)}}initNewCap(t){for(let n=0;n<this.poolSize;n++){let r=this.pool[n];r.cap=Array(t).fill(0)}this.matchcap=Array(t).fill(0)}submatches(){return this.ncap===0?Te.emptyInts():this.matchcap.slice(0,this.ncap)}alloc(t){let n;return this.poolSize>0?(this.poolSize--,n=this.pool[this.poolSize]):n=new il,n.inst=t,n}freeQueue(t,n=0){let r=t.size-n,s=this.poolSize+r;this.pool.length<s&&(this.pool=this.pool.slice(0,Math.max(this.pool.length*2,s)));for(let i=n;i<t.size;i++){let o=t.denseThreads[i];o!==null&&(this.pool[this.poolSize]=o,this.poolSize++)}t.clear()}freeThread(t){this.pool.length<=this.poolSize&&(this.pool=this.pool.slice(0,this.pool.length*2)),this.pool[this.poolSize]=t,this.poolSize++}match(t,n,r){let s=this.re2.cond;if(s===Te.EMPTY_ALL||(r===G.ANCHOR_START||r===G.ANCHOR_BOTH)&&n!==0)return!1;this.matched=!1,this.matchcap=Array(this.prog.numCap).fill(-1);let i=this.q0,o=this.q1,a=t.step(n),l=a>>3,c=a&7,u=-1,f=0;a!==Bn.EOF()&&(a=t.step(n+c),u=a>>3,f=a&7);let p;for(n===0?p=Te.emptyOpContext(-1,l):p=t.context(n);;){if(i.isEmpty()){if((s&Te.EMPTY_BEGIN_TEXT)!==0&&n!==0||this.matched)break;if(this.re2.prefix.length!==0&&u!==this.re2.prefixRune&&t.canCheckPrefix()){let m=t.index(this.re2,n);if(m<0)break;n+=m,a=t.step(n),l=a>>3,c=a&7,a=t.step(n+c),u=a>>3,f=a&7}}!this.matched&&(n===0||r===G.UNANCHORED)&&(this.ncap>0&&(this.matchcap[0]=n),this.add(i,this.prog.start,n,this.matchcap,p,null));let h=n+c;if(p=t.context(h),this.step(i,o,n,h,l,p,r,n===t.endPos()),c===0||this.ncap===0&&this.matched)break;n+=c,l=u,c=f,l!==-1&&(a=t.step(n+c),u=a>>3,f=a&7);let d=i;i=o,o=d}return this.freeQueue(o),this.matched}step(t,n,r,s,i,o,a,l){let c=this.re2.longest;for(let u=0;u<t.size;u++){let f=t.denseThreads[u];if(f===null)continue;if(c&&this.matched&&this.ncap>0&&this.matchcap[0]<f.cap[0]){this.freeThread(f);continue}let p=f.inst,h=!1;switch(p.op){case de.MATCH:if(a===G.ANCHOR_BOTH&&!l)break;this.ncap>0&&(!c||!this.matched||this.matchcap[1]<r)&&(f.cap[1]=r,this.matchcap=f.cap.slice(0,this.ncap)),c||this.freeQueue(t,u+1),this.matched=!0;break;case de.RUNE:h=p.matchRune(i);break;case de.RUNE1:h=i===p.runes[0];break;case de.RUNE_ANY:h=!0;break;case de.RUNE_ANY_NOT_NL:h=i!==_.CODES.get(`
167
+ `);break;default:throw new Error("bad inst")}h&&(f=this.add(n,p.out,s,f.cap,o,f)),f!==null&&(this.freeThread(f),t.denseThreads[u]=null)}t.clear()}add(t,n,r,s,i,o){if(n===0||t.contains(n))return o;let a=t.add(n),l=this.prog.inst[n];switch(l.op){case de.FAIL:break;case de.ALT:case de.ALT_MATCH:o=this.add(t,l.out,r,s,i,o),o=this.add(t,l.arg,r,s,i,o);break;case de.EMPTY_WIDTH:(l.arg&~i)===0&&(o=this.add(t,l.out,r,s,i,o));break;case de.NOP:o=this.add(t,l.out,r,s,i,o);break;case de.CAPTURE:if(l.arg<this.ncap){let c=s[l.arg];s[l.arg]=r,this.add(t,l.out,r,s,i,null),s[l.arg]=c}else o=this.add(t,l.out,r,s,i,o);break;case de.MATCH:case de.RUNE:case de.RUNE1:case de.RUNE_ANY:case de.RUNE_ANY_NOT_NL:o===null?o=this.alloc(l):o.inst=l,this.ncap>0&&o.cap!==s&&(o.cap=s.slice(0,this.ncap)),t.denseThreads[a]=o,o=null;break;default:throw new Error("unhandled")}return o}},R3=e=>{let t=-2128831035;for(let n=0;n<e.length;n++)t^=e[n],t=Math.imul(t,16777619);return t},P3=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},ol=class{constructor(t,n){this.nfaStates=t,this.isMatch=n,this.nextAscii=new Array(ue.MAX_ASCII+1).fill(null),this.nextMap=new Map}},al=class{constructor(t){this.prog=t,this.stateCache=new Map,this.stateCount=0,this.startState=null,this.stateLimit=1e4}computeClosure(t){let n=new Set,r=[...t],s=!1;for(;r.length>0;){let o=r.pop();if(n.has(o))continue;n.add(o);let a=this.prog.getInst(o);switch(a.op){case de.MATCH:s=!0;break;case de.ALT:case de.ALT_MATCH:r.push(a.out),r.push(a.arg);break;case de.NOP:case de.CAPTURE:r.push(a.out);break;case de.EMPTY_WIDTH:return null}}return{pcs:Int32Array.from(n).sort(),isMatch:s}}getState(t){let n=this.computeClosure(t);if(!n)return null;let r=n.pcs,s=R3(r),i=this.stateCache.get(s);if(i)for(let a=0;a<i.length;a++){let l=i[a];if(P3(l.nfaStates,r))return l}else i=[],this.stateCache.set(s,i);if(this.stateCount>=this.stateLimit)return this.stateCache.clear(),this.stateCount=0,this.startState=null,null;let o=new ol(r,n.isMatch);return i.push(o),this.stateCount++,o}step(t,n,r){if(r===G.UNANCHORED&&n<=ue.MAX_ASCII){let o=t.nextAscii[n];if(o!==null)return o}else{let o=n+(r===G.UNANCHORED?0:ue.MAX_RUNE+1);if(t.nextMap.has(o))return t.nextMap.get(o)}let s=[];for(let o=0;o<t.nfaStates.length;o++){let a=t.nfaStates[o],l=this.prog.getInst(a);de.isRuneOp(l.op)&&l.matchRune(n)&&s.push(l.out)}r===G.UNANCHORED&&s.push(this.prog.start);let i=this.getState(s);if(r===G.UNANCHORED&&n<=ue.MAX_ASCII)t.nextAscii[n]=i;else{let o=n+(r===G.UNANCHORED?0:ue.MAX_RUNE+1);t.nextMap.set(o,i)}return i}match(t,n,r){if((r===G.ANCHOR_START||r===G.ANCHOR_BOTH)&&n!==0)return!1;if(!this.startState&&(this.startState=this.getState([this.prog.start]),!this.startState))return null;let s=t.endPos(),i=this.startState;if(i.isMatch)if(r===G.ANCHOR_BOTH){if(n===s)return!0}else return!0;let o=n;for(;o<s;){let a=t.step(o),l=a>>3,c=a&7;if(c===0)break;if(i=this.step(i,l,r),i===null)return null;if(i.isMatch)if(r===G.ANCHOR_BOTH){if(o+c===s)return!0}else return!0;if(i.nfaStates.length===0&&r!==G.UNANCHORED)return!1;o+=c}return!1}},F=class e{static Op=ep(["NO_MATCH","EMPTY_MATCH","LITERAL","CHAR_CLASS","ANY_CHAR_NOT_NL","ANY_CHAR","BEGIN_LINE","END_LINE","BEGIN_TEXT","END_TEXT","WORD_BOUNDARY","NO_WORD_BOUNDARY","CAPTURE","STAR","PLUS","QUEST","REPEAT","CONCAT","ALTERNATE","LEFT_PAREN","VERTICAL_BAR"]);static isPseudoOp(t){return t>=e.Op.LEFT_PAREN}static emptySubs(){return[]}static quoteIfHyphen(t){return t===_.CODES.get("-")?"\\":""}static fromRegexp(t){let n=new e(t.op);return n.flags=t.flags,n.subs=t.subs,n.runes=t.runes,n.cap=t.cap,n.min=t.min,n.max=t.max,n.name=t.name,n.namedGroups=t.namedGroups,n}constructor(t){this.op=t,this.flags=0,this.subs=e.emptySubs(),this.runes=[],this.min=0,this.max=0,this.cap=0,this.name=null,this.namedGroups={}}reinit(){this.flags=0,this.subs=e.emptySubs(),this.runes=[],this.cap=0,this.min=0,this.max=0,this.name=null,this.namedGroups={}}toString(){return this.appendTo()}appendTo(){let t="";switch(this.op){case e.Op.NO_MATCH:t+="[^\\x00-\\x{10FFFF}]";break;case e.Op.EMPTY_MATCH:t+="(?:)";break;case e.Op.STAR:case e.Op.PLUS:case e.Op.QUEST:case e.Op.REPEAT:{let n=this.subs[0];switch(n.op>e.Op.CAPTURE||n.op===e.Op.LITERAL&&n.runes.length>1?t+=`(?:${n.appendTo()})`:t+=n.appendTo(),this.op){case e.Op.STAR:t+="*";break;case e.Op.PLUS:t+="+";break;case e.Op.QUEST:t+="?";break;case e.Op.REPEAT:t+=`{${this.min}`,this.min!==this.max&&(t+=",",this.max>=0&&(t+=this.max)),t+="}";break}(this.flags&G.NON_GREEDY)!==0&&(t+="?");break}case e.Op.CONCAT:{for(let n of this.subs)n.op===e.Op.ALTERNATE?t+=`(?:${n.appendTo()})`:t+=n.appendTo();break}case e.Op.ALTERNATE:{let n="";for(let r of this.subs)t+=n,n="|",t+=r.appendTo();break}case e.Op.LITERAL:(this.flags&G.FOLD_CASE)!==0&&(t+="(?i:");for(let n of this.runes)t+=Te.escapeRune(n);(this.flags&G.FOLD_CASE)!==0&&(t+=")");break;case e.Op.ANY_CHAR_NOT_NL:t+="(?-s:.)";break;case e.Op.ANY_CHAR:t+="(?s:.)";break;case e.Op.CAPTURE:this.name===null||this.name.length===0?t+="(":t+=`(?P<${this.name}>`,this.subs[0].op!==e.Op.EMPTY_MATCH&&(t+=this.subs[0].appendTo()),t+=")";break;case e.Op.BEGIN_TEXT:t+="\\A";break;case e.Op.END_TEXT:(this.flags&G.WAS_DOLLAR)!==0?t+="(?-m:$)":t+="\\z";break;case e.Op.BEGIN_LINE:t+="^";break;case e.Op.END_LINE:t+="$";break;case e.Op.WORD_BOUNDARY:t+="\\b";break;case e.Op.NO_WORD_BOUNDARY:t+="\\B";break;case e.Op.CHAR_CLASS:if(this.runes.length%2!==0){t+="[invalid char class]";break}if(t+="[",this.runes.length===0)t+="^\\x00-\\x{10FFFF}";else if(this.runes[0]===0&&this.runes[this.runes.length-1]===ue.MAX_RUNE){t+="^";for(let n=1;n<this.runes.length-1;n+=2){let r=this.runes[n]+1,s=this.runes[n+1]-1;t+=e.quoteIfHyphen(r),t+=Te.escapeRune(r),r!==s&&(t+="-",t+=e.quoteIfHyphen(s),t+=Te.escapeRune(s))}}else for(let n=0;n<this.runes.length;n+=2){let r=this.runes[n],s=this.runes[n+1];t+=e.quoteIfHyphen(r),t+=Te.escapeRune(r),r!==s&&(t+="-",t+=e.quoteIfHyphen(s),t+=Te.escapeRune(s))}t+="]";break;default:t+=this.op;break}return t}maxCap(){let t=0;if(this.op===e.Op.CAPTURE&&(t=this.cap),this.subs!==null)for(let n of this.subs){let r=n.maxCap();t<r&&(t=r)}return t}equals(t){if(!(t!==null&&t instanceof e)||this.op!==t.op)return!1;switch(this.op){case e.Op.END_TEXT:{if((this.flags&G.WAS_DOLLAR)!==(t.flags&G.WAS_DOLLAR))return!1;break}case e.Op.LITERAL:case e.Op.CHAR_CLASS:{if(this.runes===null&&t.runes===null)break;if(this.runes===null||t.runes===null||this.runes.length!==t.runes.length)return!1;for(let n=0;n<this.runes.length;n++)if(this.runes[n]!==t.runes[n])return!1;break}case e.Op.ALTERNATE:case e.Op.CONCAT:{if(this.subs.length!==t.subs.length)return!1;for(let n=0;n<this.subs.length;++n)if(!this.subs[n].equals(t.subs[n]))return!1;break}case e.Op.STAR:case e.Op.PLUS:case e.Op.QUEST:{if((this.flags&G.NON_GREEDY)!==(t.flags&G.NON_GREEDY)||!this.subs[0].equals(t.subs[0]))return!1;break}case e.Op.REPEAT:{if((this.flags&G.NON_GREEDY)!==(t.flags&G.NON_GREEDY)||this.min!==t.min||this.max!==t.max||!this.subs[0].equals(t.subs[0]))return!1;break}case e.Op.CAPTURE:{if(this.cap!==t.cap||(this.name===null?t.name!==null:this.name!==t.name)||!this.subs[0].equals(t.subs[0]))return!1;break}}return!0}},ll=class{constructor(){this.inst=[],this.start=0,this.numCap=2}getInst(t){return this.inst[t]}numInst(){return this.inst.length}addInst(t){this.inst.push(new de(t))}skipNop(t){let n=this.inst[t];for(;n.op===de.NOP||n.op===de.CAPTURE;)n=this.inst[t],t=n.out;return n}prefix(){let t="",n=this.skipNop(this.start);if(!de.isRuneOp(n.op)||n.runes.length!==1)return[n.op===de.MATCH,t];for(;de.isRuneOp(n.op)&&n.runes.length===1&&(n.arg&G.FOLD_CASE)===0;)t+=String.fromCodePoint(n.runes[0]),n=this.skipNop(n.out);return[n.op===de.MATCH,t]}startCond(){let t=0,n=this.start;e:for(;;){let r=this.inst[n];switch(r.op){case de.EMPTY_WIDTH:t|=r.arg;break;case de.FAIL:return-1;case de.CAPTURE:case de.NOP:break;default:break e}n=r.out}return t}next(t){let n=this.inst[t>>1];return(t&1)===0?n.out:n.arg}patch(t,n){for(;t!==0;){let r=this.inst[t>>1];(t&1)===0?(t=r.out,r.out=n):(t=r.arg,r.arg=n)}}append(t,n){if(t===0)return n;if(n===0)return t;let r=t;for(;;){let i=this.next(r);if(i===0)break;r=i}let s=this.inst[r>>1];return(r&1)===0?s.out=n:s.arg=n,t}toString(){let t="";for(let n=0;n<this.inst.length;n++){let r=t.length;t+=n,n===this.start&&(t+="*"),t+=" ".substring(t.length-r),t+=this.inst[n],t+=`
168
+ `}return t}},as=class{constructor(t=0,n=0,r=!1){this.i=t,this.out=n,this.nullable=r}},cl=class e{static ANY_RUNE_NOT_NL(){return[0,_.CODES.get(`
169
+ `)-1,_.CODES.get(`
170
+ `)+1,ue.MAX_RUNE]}static ANY_RUNE(){return[0,ue.MAX_RUNE]}static compileRegexp(t){let n=new e,r=n.compile(t);return n.prog.patch(r.out,n.newInst(de.MATCH).i),n.prog.start=r.i,n.prog}constructor(){this.prog=new ll,this.newInst(de.FAIL)}newInst(t){return this.prog.addInst(t),new as(this.prog.numInst()-1,0,!0)}nop(){let t=this.newInst(de.NOP);return t.out=t.i<<1,t}fail(){return new as}cap(t){let n=this.newInst(de.CAPTURE);return n.out=n.i<<1,this.prog.getInst(n.i).arg=t,this.prog.numCap<t+1&&(this.prog.numCap=t+1),n}cat(t,n){return t.i===0||n.i===0?this.fail():(this.prog.patch(t.out,n.i),new as(t.i,n.out,t.nullable&&n.nullable))}alt(t,n){if(t.i===0)return n;if(n.i===0)return t;let r=this.newInst(de.ALT),s=this.prog.getInst(r.i);return s.out=t.i,s.arg=n.i,r.out=this.prog.append(t.out,n.out),r.nullable=t.nullable||n.nullable,r}loop(t,n){let r=this.newInst(de.ALT),s=this.prog.getInst(r.i);return n?(s.arg=t.i,r.out=r.i<<1):(s.out=t.i,r.out=r.i<<1|1),this.prog.patch(t.out,r.i),r}quest(t,n){let r=this.newInst(de.ALT),s=this.prog.getInst(r.i);return n?(s.arg=t.i,r.out=r.i<<1):(s.out=t.i,r.out=r.i<<1|1),r.out=this.prog.append(r.out,t.out),r}star(t,n){return t.nullable?this.quest(this.plus(t,n),n):this.loop(t,n)}plus(t,n){return new as(t.i,this.loop(t,n).out,t.nullable)}empty(t){let n=this.newInst(de.EMPTY_WIDTH);return this.prog.getInst(n.i).arg=t,n.out=n.i<<1,n}rune(t,n){let r=this.newInst(de.RUNE);r.nullable=!1;let s=this.prog.getInst(r.i);return s.runes=t,n&=G.FOLD_CASE,(t.length!==1||ue.simpleFold(t[0])===t[0])&&(n&=-2),s.arg=n,r.out=r.i<<1,(n&G.FOLD_CASE)===0&&t.length===1||t.length===2&&t[0]===t[1]?s.op=de.RUNE1:t.length===2&&t[0]===0&&t[1]===ue.MAX_RUNE?s.op=de.RUNE_ANY:t.length===4&&t[0]===0&&t[1]===_.CODES.get(`
171
+ `)-1&&t[2]===_.CODES.get(`
172
+ `)+1&&t[3]===ue.MAX_RUNE&&(s.op=de.RUNE_ANY_NOT_NL),r}compile(t){switch(t.op){case F.Op.NO_MATCH:return this.fail();case F.Op.EMPTY_MATCH:return this.nop();case F.Op.LITERAL:if(t.runes.length===0)return this.nop();{let n=null;for(let r of t.runes){let s=this.rune([r],t.flags);n=n===null?s:this.cat(n,s)}return n}case F.Op.CHAR_CLASS:return this.rune(t.runes,t.flags);case F.Op.ANY_CHAR_NOT_NL:return this.rune(e.ANY_RUNE_NOT_NL(),0);case F.Op.ANY_CHAR:return this.rune(e.ANY_RUNE(),0);case F.Op.BEGIN_LINE:return this.empty(Te.EMPTY_BEGIN_LINE);case F.Op.END_LINE:return this.empty(Te.EMPTY_END_LINE);case F.Op.BEGIN_TEXT:return this.empty(Te.EMPTY_BEGIN_TEXT);case F.Op.END_TEXT:return this.empty(Te.EMPTY_END_TEXT);case F.Op.WORD_BOUNDARY:return this.empty(Te.EMPTY_WORD_BOUNDARY);case F.Op.NO_WORD_BOUNDARY:return this.empty(Te.EMPTY_NO_WORD_BOUNDARY);case F.Op.CAPTURE:{let n=this.cap(t.cap<<1),r=this.compile(t.subs[0]),s=this.cap(t.cap<<1|1);return this.cat(this.cat(n,r),s)}case F.Op.STAR:return this.star(this.compile(t.subs[0]),(t.flags&G.NON_GREEDY)!==0);case F.Op.PLUS:return this.plus(this.compile(t.subs[0]),(t.flags&G.NON_GREEDY)!==0);case F.Op.QUEST:return this.quest(this.compile(t.subs[0]),(t.flags&G.NON_GREEDY)!==0);case F.Op.CONCAT:{if(t.subs.length===0)return this.nop();{let n=null;for(let r of t.subs){let s=this.compile(r);n=n===null?s:this.cat(n,s)}return n}}case F.Op.ALTERNATE:{if(t.subs.length===0)return this.nop();{let n=null;for(let r of t.subs){let s=this.compile(r);n=n===null?s:this.alt(n,s)}return n}}default:throw new rl("regexp: unhandled case in compile")}}},ul=class e{static simplify(t){if(t===null)return null;switch(t.op){case F.Op.CAPTURE:case F.Op.CONCAT:case F.Op.ALTERNATE:{let n=t;for(let r=0;r<t.subs.length;r++){let s=t.subs[r],i=e.simplify(s);n===t&&i!==s&&(n=F.fromRegexp(t),n.runes=[],n.subs=t.subs.slice(0,t.subs.length)),n!==t&&(n.subs[r]=i)}return n}case F.Op.STAR:case F.Op.PLUS:case F.Op.QUEST:{let n=e.simplify(t.subs[0]);return e.simplify1(t.op,t.flags,n,t)}case F.Op.REPEAT:{if(t.min===0&&t.max===0)return new F(F.Op.EMPTY_MATCH);let n=e.simplify(t.subs[0]);if(t.max===-1){if(t.min===0)return e.simplify1(F.Op.STAR,t.flags,n,null);if(t.min===1)return e.simplify1(F.Op.PLUS,t.flags,n,null);let s=new F(F.Op.CONCAT),i=[];for(let o=0;o<t.min-1;o++)i.push(n);return i.push(e.simplify1(F.Op.PLUS,t.flags,n,null)),s.subs=i.slice(0),s}if(t.min===1&&t.max===1)return n;let r=null;if(t.min>0){r=[];for(let s=0;s<t.min;s++)r.push(n)}if(t.max>t.min){let s=e.simplify1(F.Op.QUEST,t.flags,n,null);for(let i=t.min+1;i<t.max;i++){let o=new F(F.Op.CONCAT);o.subs=[n,s],s=e.simplify1(F.Op.QUEST,t.flags,o,null)}if(r===null)return s;r.push(s)}if(r!==null){let s=new F(F.Op.CONCAT);return s.subs=r.slice(0),s}return new F(F.Op.NO_MATCH)}}return t}static simplify1(t,n,r,s){return r.op===F.Op.EMPTY_MATCH||t===r.op&&(n&G.NON_GREEDY)===(r.flags&G.NON_GREEDY)?r:(s!==null&&s.op===t&&(s.flags&G.NON_GREEDY)===(n&G.NON_GREEDY)&&r===s.subs[0]||(s=new F(t),s.flags=n,s.subs=[r]),s)}},$e=class{constructor(t,n){this.sign=t,this.cls=n}},_1=[48,57],F1=[9,10,12,13,32,32],L1=[48,57,65,90,95,95,97,122],M1=new Map([["\\d",new $e(1,_1)],["\\D",new $e(-1,_1)],["\\s",new $e(1,F1)],["\\S",new $e(-1,F1)],["\\w",new $e(1,L1)],["\\W",new $e(-1,L1)]]),U1=[48,57,65,90,97,122],B1=[65,90,97,122],W1=[0,127],z1=[9,9,32,32],H1=[0,31,127,127],j1=[48,57],G1=[33,126],V1=[97,122],q1=[32,126],Z1=[33,47,58,64,91,96,123,126],K1=[9,13,32,32],Q1=[65,90],X1=[48,57,65,90,95,95,97,122],Y1=[48,57,65,70,97,102],J1=new Map([["[:alnum:]",new $e(1,U1)],["[:^alnum:]",new $e(-1,U1)],["[:alpha:]",new $e(1,B1)],["[:^alpha:]",new $e(-1,B1)],["[:ascii:]",new $e(1,W1)],["[:^ascii:]",new $e(-1,W1)],["[:blank:]",new $e(1,z1)],["[:^blank:]",new $e(-1,z1)],["[:cntrl:]",new $e(1,H1)],["[:^cntrl:]",new $e(-1,H1)],["[:digit:]",new $e(1,j1)],["[:^digit:]",new $e(-1,j1)],["[:graph:]",new $e(1,G1)],["[:^graph:]",new $e(-1,G1)],["[:lower:]",new $e(1,V1)],["[:^lower:]",new $e(-1,V1)],["[:print:]",new $e(1,q1)],["[:^print:]",new $e(-1,q1)],["[:punct:]",new $e(1,Z1)],["[:^punct:]",new $e(-1,Z1)],["[:space:]",new $e(1,K1)],["[:^space:]",new $e(-1,K1)],["[:upper:]",new $e(1,Q1)],["[:^upper:]",new $e(-1,Q1)],["[:word:]",new $e(1,X1)],["[:^word:]",new $e(-1,X1)],["[:xdigit:]",new $e(1,Y1)],["[:^xdigit:]",new $e(-1,Y1)]]),Un=class e{static charClassToString(t,n){let r="[";for(let s=0;s<n;s+=2){s>0&&(r+=" ");let i=t[s],o=t[s+1];i===o?r+=`0x${i.toString(16)}`:r+=`0x${i.toString(16)}-0x${o.toString(16)}`}return r+="]",r}static cmp(t,n,r,s){let i=t[n]-r;return i!==0?i:s-t[n+1]}static qsortIntPair(t,n,r){let s=((n+r)/2|0)&-2,i=t[s],o=t[s+1],a=n,l=r;for(;a<=l;){for(;a<r&&e.cmp(t,a,i,o)<0;)a+=2;for(;l>n&&e.cmp(t,l,i,o)>0;)l-=2;if(a<=l){if(a!==l){let c=t[a];t[a]=t[l],t[l]=c,c=t[a+1],t[a+1]=t[l+1],t[l+1]=c}a+=2,l-=2}}n<l&&e.qsortIntPair(t,n,l),a<r&&e.qsortIntPair(t,a,r)}constructor(t=Te.emptyInts()){this.r=t,this.len=t.length}toArray(){return this.len===this.r.length?this.r:this.r.slice(0,this.len)}cleanClass(){if(this.len<4)return this;e.qsortIntPair(this.r,0,this.len-2);let t=2;for(let n=2;n<this.len;n+=2){let r=this.r[n],s=this.r[n+1];if(r<=this.r[t-1]+1){s>this.r[t-1]&&(this.r[t-1]=s);continue}this.r[t]=r,this.r[t+1]=s,t+=2}return this.len=t,this}appendLiteral(t,n){return(n&G.FOLD_CASE)!==0?this.appendFoldedRange(t,t):this.appendRange(t,t)}appendRange(t,n){if(this.len>0){for(let r=2;r<=4;r+=2)if(this.len>=r){let s=this.r[this.len-r],i=this.r[this.len-r+1];if(t<=i+1&&s<=n+1)return t<s&&(this.r[this.len-r]=t),n>i&&(this.r[this.len-r+1]=n),this}}return this.r[this.len++]=t,this.r[this.len++]=n,this}appendFoldedRange(t,n){if(t<=ue.MIN_FOLD&&n>=ue.MAX_FOLD)return this.appendRange(t,n);if(n<ue.MIN_FOLD||t>ue.MAX_FOLD)return this.appendRange(t,n);t<ue.MIN_FOLD&&(this.appendRange(t,ue.MIN_FOLD-1),t=ue.MIN_FOLD),n>ue.MAX_FOLD&&(this.appendRange(ue.MAX_FOLD+1,n),n=ue.MAX_FOLD);for(let r=t;r<=n;r++){this.appendRange(r,r);for(let s=ue.simpleFold(r);s!==r;s=ue.simpleFold(s))this.appendRange(s,s)}return this}appendClass(t){for(let n=0;n<t.length;n+=2)this.appendRange(t[n],t[n+1]);return this}appendFoldedClass(t){for(let n=0;n<t.length;n+=2)this.appendFoldedRange(t[n],t[n+1]);return this}appendNegatedClass(t){let n=0;for(let r=0;r<t.length;r+=2){let s=t[r],i=t[r+1];n<=s-1&&this.appendRange(n,s-1),n=i+1}return n<=ue.MAX_RUNE&&this.appendRange(n,ue.MAX_RUNE),this}appendTable(t){for(let n=0;n<t.length;++n){let r=t.getLo(n),s=t.getHi(n),i=t.getStride(n);if(i===1){this.appendRange(r,s);continue}for(let o=r;o<=s;o+=i)this.appendRange(o,o)}return this}appendNegatedTable(t){let n=0;for(let r=0;r<t.length;++r){let s=t.getLo(r),i=t.getHi(r),o=t.getStride(r);if(o===1){n<=s-1&&this.appendRange(n,s-1),n=i+1;continue}for(let a=s;a<=i;a+=o)n<=a-1&&this.appendRange(n,a-1),n=a+1}return n<=ue.MAX_RUNE&&this.appendRange(n,ue.MAX_RUNE),this}appendTableWithSign(t,n){return n<0?this.appendNegatedTable(t):this.appendTable(t)}negateClass(){let t=0,n=0;for(let r=0;r<this.len;r+=2){let s=this.r[r],i=this.r[r+1];t<=s-1&&(this.r[n]=t,this.r[n+1]=s-1,n+=2),t=i+1}return this.len=n,t<=ue.MAX_RUNE&&(this.r[this.len++]=t,this.r[this.len++]=ue.MAX_RUNE),this}appendClassWithSign(t,n){return n<0?this.appendNegatedClass(t):this.appendClass(t)}appendGroup(t,n){let r=t.cls;return n&&(r=new e().appendFoldedClass(r).cleanClass().toArray()),this.appendClassWithSign(r,t.sign)}toString(){return e.charClassToString(this.r,this.len)}},Xs=class e{static of(t,n){return new e(t,n)}constructor(t,n){this.first=t,this.second=n}},fl=class{constructor(t){this.str=t,this.position=0}pos(){return this.position}rewindTo(t){this.position=t}more(){return this.position<this.str.length}peek(){return this.str.codePointAt(this.position)}skip(t){this.position+=t}skipString(t){this.position+=t.length}pop(){let t=this.str.codePointAt(this.position);return this.position+=Te.charCount(t),t}lookingAt(t){return this.rest().startsWith(t)}rest(){return this.str.substring(this.position)}from(t){return this.str.substring(t,this.position)}toString(){return this.rest()}},pl=class e{static ERR_INTERNAL_ERROR="regexp/syntax: internal error";static ERR_INVALID_CHAR_RANGE="invalid character class range";static ERR_INVALID_ESCAPE="invalid escape sequence";static ERR_INVALID_NAMED_CAPTURE="invalid named capture";static ERR_INVALID_PERL_OP="invalid or unsupported Perl syntax";static ERR_INVALID_REPEAT_OP="invalid nested repetition operator";static ERR_INVALID_REPEAT_SIZE="invalid repeat count";static ERR_MISSING_BRACKET="missing closing ]";static ERR_MISSING_PAREN="missing closing )";static ERR_MISSING_REPEAT_ARGUMENT="missing argument to repetition operator";static ERR_TRAILING_BACKSLASH="trailing backslash at end of expression";static ERR_DUPLICATE_NAMED_CAPTURE="duplicate capture group name";static ERR_UNEXPECTED_PAREN="unexpected )";static ERR_NESTING_DEPTH="expression nests too deeply";static ERR_LARGE="expression too large";static MAX_HEIGHT=1e3;static MAX_SIZE=3355443;static MAX_RUNES=33554432;static ANY_TABLE=new N(new Uint32Array([0,ue.MAX_RUNE,1]));static unicodeTable(t){return t==="Any"?Xs.of(e.ANY_TABLE,e.ANY_TABLE):fn.CATEGORIES.has(t)?Xs.of(fn.CATEGORIES.get(t),fn.FOLD_CATEGORIES.get(t)):fn.SCRIPTS.has(t)?Xs.of(fn.SCRIPTS.get(t),fn.FOLD_SCRIPT.get(t)):null}static minFoldRune(t){if(t<ue.MIN_FOLD||t>ue.MAX_FOLD)return t;let n=t,r=t;for(t=ue.simpleFold(t);t!==r;t=ue.simpleFold(t))n>t&&(n=t);return n}static leadingRegexp(t){if(t.op===F.Op.EMPTY_MATCH)return null;if(t.op===F.Op.CONCAT&&t.subs.length>0){let n=t.subs[0];return n.op===F.Op.EMPTY_MATCH?null:n}return t}static literalRegexp(t,n){let r=new F(F.Op.LITERAL);return r.flags=n,r.runes=Te.stringToRunes(t),r}static parse(t,n){return new e(t,n).parseInternal()}static parseRepeat(t){let n=t.pos();if(!t.more()||!t.lookingAt("{"))return-1;t.skip(1);let r=e.parseInt(t);if(r===-1||!t.more())return-1;let s;if(!t.lookingAt(","))s=r;else{if(t.skip(1),!t.more())return-1;if(t.lookingAt("}"))s=-1;else if((s=e.parseInt(t))===-1)return-1}if(!t.more()||!t.lookingAt("}"))return-1;if(t.skip(1),r<0||r>1e3||s===-2||s>1e3||s>=0&&r>s)throw new je(e.ERR_INVALID_REPEAT_SIZE,t.from(n));return r<<16|s&ue.MAX_BMP}static isValidCaptureName(t){if(t.length===0)return!1;for(let n=0;n<t.length;n++){let r=t.codePointAt(n);if(r!==_.CODES.get("_")&&!Te.isalnum(r))return!1}return!0}static parseInt(t){let n=t.pos();for(;t.more()&&t.peek()>=_.CODES.get("0")&&t.peek()<=_.CODES.get("9");)t.skip(1);let r=t.from(n);return r.length===0||r.length>1&&r.codePointAt(0)===_.CODES.get("0")?-1:r.length>8?-2:parseFloat(r,10)}static isCharClass(t){return t.op===F.Op.LITERAL&&t.runes.length===1||t.op===F.Op.CHAR_CLASS||t.op===F.Op.ANY_CHAR_NOT_NL||t.op===F.Op.ANY_CHAR}static matchRune(t,n){switch(t.op){case F.Op.LITERAL:return t.runes.length===1&&t.runes[0]===n;case F.Op.CHAR_CLASS:for(let r=0;r<t.runes.length;r+=2)if(t.runes[r]<=n&&n<=t.runes[r+1])return!0;return!1;case F.Op.ANY_CHAR_NOT_NL:return n!==_.CODES.get(`
173
+ `);case F.Op.ANY_CHAR:return!0}return!1}static mergeCharClass(t,n){switch(t.op){case F.Op.ANY_CHAR:break;case F.Op.ANY_CHAR_NOT_NL:e.matchRune(n,_.CODES.get(`
174
+ `))&&(t.op=F.Op.ANY_CHAR);break;case F.Op.CHAR_CLASS:n.op===F.Op.LITERAL?t.runes=new Un(t.runes).appendLiteral(n.runes[0],n.flags).toArray():t.runes=new Un(t.runes).appendClass(n.runes).toArray();break;case F.Op.LITERAL:if(n.runes[0]===t.runes[0]&&n.flags===t.flags)break;t.op=F.Op.CHAR_CLASS,t.runes=new Un().appendLiteral(t.runes[0],t.flags).appendLiteral(n.runes[0],n.flags).toArray();break}}static parseEscape(t){let n=t.pos();if(t.skip(1),!t.more())throw new je(e.ERR_TRAILING_BACKSLASH);let r=t.pop();e:switch(r){case _.CODES.get("1"):case _.CODES.get("2"):case _.CODES.get("3"):case _.CODES.get("4"):case _.CODES.get("5"):case _.CODES.get("6"):case _.CODES.get("7"):if(!t.more()||t.peek()<_.CODES.get("0")||t.peek()>_.CODES.get("7"))break;case _.CODES.get("0"):{let s=r-_.CODES.get("0");for(let i=1;i<3&&!(!t.more()||t.peek()<_.CODES.get("0")||t.peek()>_.CODES.get("7"));i++)s=s*8+t.peek()-_.CODES.get("0"),t.skip(1);return s}case _.CODES.get("x"):{if(!t.more())break;if(r=t.pop(),r===_.CODES.get("{")){let o=0,a=0;for(;;){if(!t.more())break e;if(r=t.pop(),r===_.CODES.get("}"))break;let l=Te.unhex(r);if(l<0||(a=a*16+l,a>ue.MAX_RUNE))break e;o++}if(o===0)break e;return a}let s=Te.unhex(r);if(!t.more())break;r=t.pop();let i=Te.unhex(r);if(s<0||i<0)break;return s*16+i}case _.CODES.get("a"):return _.CODES.get("\x07");case _.CODES.get("f"):return _.CODES.get("\f");case _.CODES.get("n"):return _.CODES.get(`
175
+ `);case _.CODES.get("r"):return _.CODES.get("\r");case _.CODES.get("t"):return _.CODES.get(" ");case _.CODES.get("v"):return _.CODES.get("\v");default:if(r<=ue.MAX_ASCII&&!Te.isalnum(r))return r;break}throw new je(e.ERR_INVALID_ESCAPE,t.from(n))}static parseClassChar(t,n){if(!t.more())throw new je(e.ERR_MISSING_BRACKET,t.from(n));return t.lookingAt("\\")?e.parseEscape(t):t.pop()}static concatRunes(t,n){return[...t,...n]}constructor(t,n=0){this.wholeRegexp=t,this.flags=n,this.numCap=0,this.namedGroups={},this.stack=[],this.free=null,this.numRegexp=0,this.numRunes=0,this.repeats=0,this.height=null,this.size=null}newRegexp(t){let n=this.free;return n!==null&&n.subs!==null&&n.subs.length>0?(this.free=n.subs[0],n.reinit(),n.op=t):(n=new F(t),this.numRegexp+=1),n}reuse(t){this.height!==null&&Object.prototype.hasOwnProperty.call(this.height,t)&&delete this.height[t],t.subs!==null&&t.subs.length>0&&(t.subs[0]=this.free),this.free=t}checkLimits(t){if(this.numRunes>e.MAX_RUNES)throw new je(e.ERR_LARGE);this.checkSize(t),this.checkHeight(t)}checkSize(t){if(this.size===null){if(this.repeats===0&&(this.repeats=1),t.op===F.Op.REPEAT){let n=t.max;n===-1&&(n=t.min),n<=0&&(n=1),n>e.MAX_SIZE/this.repeats?this.repeats=e.MAX_SIZE:this.repeats*=n}if(this.numRegexp<e.MAX_SIZE/this.repeats)return;this.size={};for(let n of this.stack)this.checkSize(n)}if(this.calcSize(t,!0)>e.MAX_SIZE)throw new je(e.ERR_LARGE)}calcSize(t,n=!1){if(!n&&Object.prototype.hasOwnProperty.call(this.size,t))return this.size[t];let r=0;switch(t.op){case F.Op.LITERAL:{r=t.runes.length;break}case F.Op.CAPTURE:case F.Op.STAR:{r=2+this.calcSize(t.subs[0]);break}case F.Op.PLUS:case F.Op.QUEST:{r=1+this.calcSize(t.subs[0]);break}case F.Op.CONCAT:{for(let s of t.subs)r=r+this.calcSize(s);break}case F.Op.ALTERNATE:{for(let s of t.subs)r=r+this.calcSize(s);t.subs.length>1&&(r=r+t.subs.length-1);break}case F.Op.REPEAT:{let s=this.calcSize(t.subs[0]);if(t.max===-1){t.min===0?r=2+s:r=1+t.min*s;break}r=t.max*s+(t.max-t.min);break}}return r=Math.max(1,r),this.size[t]=r,r}checkHeight(t){if(!(this.numRegexp<e.MAX_HEIGHT)){if(this.height===null){this.height={};for(let n of this.stack)this.checkHeight(n)}if(this.calcHeight(t,!0)>e.MAX_HEIGHT)throw new je(e.ERR_NESTING_DEPTH)}}calcHeight(t,n=!1){if(!n&&Object.prototype.hasOwnProperty.call(this.height,t))return this.height[t];let r=1;for(let s of t.subs){let i=this.calcHeight(s);r<1+i&&(r=1+i)}return this.height[t]=r,r}pop(){return this.stack.pop()}popToPseudo(){let t=this.stack.length,n=t;for(;n>0&&!F.isPseudoOp(this.stack[n-1].op);)n--;let r=this.stack.slice(n,t);return this.stack=this.stack.slice(0,n),r}push(t){if(this.numRunes+=t.runes.length,t.op===F.Op.CHAR_CLASS&&t.runes.length===2&&t.runes[0]===t.runes[1]){if(this.maybeConcat(t.runes[0],this.flags&-2))return null;t.op=F.Op.LITERAL,t.runes=[t.runes[0]],t.flags=this.flags&-2}else if(t.op===F.Op.CHAR_CLASS&&t.runes.length===4&&t.runes[0]===t.runes[1]&&t.runes[2]===t.runes[3]&&ue.simpleFold(t.runes[0])===t.runes[2]&&ue.simpleFold(t.runes[2])===t.runes[0]||t.op===F.Op.CHAR_CLASS&&t.runes.length===2&&t.runes[0]+1===t.runes[1]&&ue.simpleFold(t.runes[0])===t.runes[1]&&ue.simpleFold(t.runes[1])===t.runes[0]){if(this.maybeConcat(t.runes[0],this.flags|G.FOLD_CASE))return null;t.op=F.Op.LITERAL,t.runes=[t.runes[0]],t.flags=this.flags|G.FOLD_CASE}else this.maybeConcat(-1,0);return this.stack.push(t),this.checkLimits(t),t}maybeConcat(t,n){let r=this.stack.length;if(r<2)return!1;let s=this.stack[r-1],i=this.stack[r-2];return s.op!==F.Op.LITERAL||i.op!==F.Op.LITERAL||(s.flags&G.FOLD_CASE)!==(i.flags&G.FOLD_CASE)?!1:(i.runes=e.concatRunes(i.runes,s.runes),t>=0?(s.runes=[t],s.flags=n,!0):(this.pop(),this.reuse(s),!1))}newLiteral(t,n){let r=this.newRegexp(F.Op.LITERAL);return r.flags=n,(n&G.FOLD_CASE)!==0&&(t=e.minFoldRune(t)),r.runes=[t],r}literal(t){this.push(this.newLiteral(t,this.flags))}op(t){let n=this.newRegexp(t);return n.flags=this.flags,this.push(n)}repeat(t,n,r,s,i,o){let a=this.flags;if((a&G.PERL_X)!==0&&(i.more()&&i.lookingAt("?")&&(i.skip(1),a^=G.NON_GREEDY),o!==-1))throw new je(e.ERR_INVALID_REPEAT_OP,i.from(o));let l=this.stack.length;if(l===0)throw new je(e.ERR_MISSING_REPEAT_ARGUMENT,i.from(s));let c=this.stack[l-1];if(F.isPseudoOp(c.op))throw new je(e.ERR_MISSING_REPEAT_ARGUMENT,i.from(s));let u=this.newRegexp(t);if(u.min=n,u.max=r,u.flags=a,u.subs=[c],this.stack[l-1]=u,this.checkLimits(u),t===F.Op.REPEAT&&(n>=2||r>=2)&&!this.repeatIsValid(u,1e3))throw new je(e.ERR_INVALID_REPEAT_SIZE,i.from(s))}repeatIsValid(t,n){if(t.op===F.Op.REPEAT){let r=t.max;if(r===0)return!0;if(r<0&&(r=t.min),r>n)return!1;r>0&&(n=Math.trunc(n/r))}for(let r of t.subs)if(!this.repeatIsValid(r,n))return!1;return!0}concat(){this.maybeConcat(-1,0);let t=this.popToPseudo();return t.length===0?this.push(this.newRegexp(F.Op.EMPTY_MATCH)):this.push(this.collapse(t,F.Op.CONCAT))}alternate(){let t=this.popToPseudo();return t.length>0&&this.cleanAlt(t[t.length-1]),t.length===0?this.push(this.newRegexp(F.Op.NO_MATCH)):this.push(this.collapse(t,F.Op.ALTERNATE))}cleanAlt(t){t.op===F.Op.CHAR_CLASS&&(t.runes=new Un(t.runes).cleanClass().toArray(),t.runes.length===2&&t.runes[0]===0&&t.runes[1]===ue.MAX_RUNE?(t.runes=[],t.op=F.Op.ANY_CHAR):t.runes.length===4&&t.runes[0]===0&&t.runes[1]===_.CODES.get(`
176
+ `)-1&&t.runes[2]===_.CODES.get(`
177
+ `)+1&&t.runes[3]===ue.MAX_RUNE&&(t.runes=[],t.op=F.Op.ANY_CHAR_NOT_NL))}collapse(t,n){if(t.length===1)return t[0];let r=0;for(let a of t)r+=a.op===n?a.subs.length:1;let s=new Array(r).fill(null),i=0;for(let a of t)a.op===n?(s.splice(i,a.subs.length,...a.subs),i+=a.subs.length,this.reuse(a)):s[i++]=a;let o=this.newRegexp(n);if(o.subs=s,n===F.Op.ALTERNATE&&(o.subs=this.factor(o.subs),o.subs.length===1)){let a=o;o=o.subs[0],this.reuse(a)}return o}factor(t){if(t.length<2)return t;let n=0,r=t.length,s=0,i=null,o=0,a=0,l=0;for(let u=0;u<=r;u++){let f=null,p=0,h=0;if(u<r){let d=t[n+u];if(d.op===F.Op.CONCAT&&d.subs.length>0&&(d=d.subs[0]),d.op===F.Op.LITERAL&&(f=d.runes,p=d.runes.length,h=d.flags&G.FOLD_CASE),h===a){let m=0;for(;m<o&&m<p&&i[m]===f[m];)m++;if(m>0){o=m;continue}}}if(u!==l)if(u===l+1)t[s++]=t[n+l];else{let d=this.newRegexp(F.Op.LITERAL);d.flags=a,d.runes=i.slice(0,o);for(let y=l;y<u;y++)t[n+y]=this.removeLeadingString(t[n+y],o),this.checkLimits(t[n+y]);let m=this.collapse(t.slice(n+l,n+u),F.Op.ALTERNATE),g=this.newRegexp(F.Op.CONCAT);g.subs=[d,m],t[s++]=g}l=u,i=f,o=p,a=h}r=s,n=0,l=0,s=0;let c=null;for(let u=0;u<=r;u++){let f=null;if(!(u<r&&(f=e.leadingRegexp(t[n+u]),c!==null&&c.equals(f)&&(e.isCharClass(c)||c.op===F.Op.REPEAT&&c.min===c.max&&e.isCharClass(c.subs[0]))))){if(u!==l)if(u===l+1)t[s++]=t[n+l];else{let p=c;for(let m=l;m<u;m++){let g=m!==l;t[n+m]=this.removeLeadingRegexp(t[n+m],g),this.checkLimits(t[n+m])}let h=this.collapse(t.slice(n+l,n+u),F.Op.ALTERNATE),d=this.newRegexp(F.Op.CONCAT);d.subs=[p,h],t[s++]=d}l=u,c=f}}r=s,n=0,l=0,s=0;for(let u=0;u<=r;u++)if(!(u<r&&e.isCharClass(t[n+u]))){if(u!==l)if(u===l+1)t[s++]=t[n+l];else{let f=l;for(let h=l+1;h<u;h++){let d=t[n+f],m=t[n+h];(d.op<m.op||d.op===m.op&&(d.runes!==null?d.runes.length:0)<(m.runes!==null?m.runes.length:0))&&(f=h)}let p=t[n+l];t[n+l]=t[n+f],t[n+f]=p;for(let h=l+1;h<u;h++)e.mergeCharClass(t[n+l],t[n+h]),this.reuse(t[n+h]);this.cleanAlt(t[n+l]),t[s++]=t[n+l]}u<r&&(t[s++]=t[n+u]),l=u+1}r=s,n=0,l=0,s=0;for(let u=0;u<r;++u)u+1<r&&t[n+u].op===F.Op.EMPTY_MATCH&&t[n+u+1].op===F.Op.EMPTY_MATCH||(t[s++]=t[n+u]);return r=s,n=0,t.slice(n,r)}removeLeadingString(t,n){if(t.op===F.Op.CONCAT&&t.subs.length>0){let r=this.removeLeadingString(t.subs[0],n);if(t.subs[0]=r,r.op===F.Op.EMPTY_MATCH)switch(this.reuse(r),t.subs.length){case 0:case 1:t.op=F.Op.EMPTY_MATCH,t.subs=null;break;case 2:{let s=t;t=t.subs[1],this.reuse(s);break}default:t.subs=t.subs.slice(1,t.subs.length);break}return t}return t.op===F.Op.LITERAL&&(t.runes=t.runes.slice(n,t.runes.length),t.runes.length===0&&(t.op=F.Op.EMPTY_MATCH)),t}removeLeadingRegexp(t,n){if(t.op===F.Op.CONCAT&&t.subs.length>0){switch(n&&this.reuse(t.subs[0]),t.subs=t.subs.slice(1,t.subs.length),t.subs.length){case 0:{t.op=F.Op.EMPTY_MATCH,t.subs=F.emptySubs();break}case 1:{let r=t;t=t.subs[0],this.reuse(r);break}}return t}return n&&this.reuse(t),this.newRegexp(F.Op.EMPTY_MATCH)}parseInternal(){if((this.flags&G.LITERAL)!==0)return e.literalRegexp(this.wholeRegexp,this.flags);let t=-1,n=-1,r=-1,s=new fl(this.wholeRegexp);for(;s.more();){let o=-1;e:switch(s.peek()){case _.CODES.get("("):if((this.flags&G.PERL_X)!==0&&s.lookingAt("(?")){this.parsePerlFlags(s);break}this.op(F.Op.LEFT_PAREN).cap=++this.numCap,s.skip(1);break;case _.CODES.get("|"):this.parseVerticalBar(),s.skip(1);break;case _.CODES.get(")"):this.parseRightParen(),s.skip(1);break;case _.CODES.get("^"):(this.flags&G.ONE_LINE)!==0?this.op(F.Op.BEGIN_TEXT):this.op(F.Op.BEGIN_LINE),s.skip(1);break;case _.CODES.get("$"):(this.flags&G.ONE_LINE)!==0?this.op(F.Op.END_TEXT).flags|=G.WAS_DOLLAR:this.op(F.Op.END_LINE),s.skip(1);break;case _.CODES.get("."):(this.flags&G.DOT_NL)!==0?this.op(F.Op.ANY_CHAR):this.op(F.Op.ANY_CHAR_NOT_NL),s.skip(1);break;case _.CODES.get("["):this.parseClass(s);break;case _.CODES.get("*"):case _.CODES.get("+"):case _.CODES.get("?"):{o=s.pos();let a=null;switch(s.pop()){case _.CODES.get("*"):a=F.Op.STAR;break;case _.CODES.get("+"):a=F.Op.PLUS;break;case _.CODES.get("?"):a=F.Op.QUEST;break}this.repeat(a,n,r,o,s,t);break}case _.CODES.get("{"):{o=s.pos();let a=e.parseRepeat(s);if(a<0){s.rewindTo(o),this.literal(s.pop());break}n=a>>16,r=(a&ue.MAX_BMP)<<16>>16,this.repeat(F.Op.REPEAT,n,r,o,s,t);break}case _.CODES.get("\\"):{let a=s.pos();if(s.skip(1),(this.flags&G.PERL_X)!==0&&s.more())switch(s.pop()){case _.CODES.get("A"):this.op(F.Op.BEGIN_TEXT);break e;case _.CODES.get("b"):this.op(F.Op.WORD_BOUNDARY);break e;case _.CODES.get("B"):this.op(F.Op.NO_WORD_BOUNDARY);break e;case _.CODES.get("C"):throw new je(e.ERR_INVALID_ESCAPE,"\\C");case _.CODES.get("Q"):{let f=s.rest(),p=f.indexOf("\\E");p>=0&&(f=f.substring(0,p)),s.skipString(f),s.skipString("\\E");let h=0;for(;h<f.length;){let d=f.codePointAt(h);this.literal(d),h+=Te.charCount(d)}break e}case _.CODES.get("z"):this.op(F.Op.END_TEXT);break e;default:s.rewindTo(a);break}let l=this.newRegexp(F.Op.CHAR_CLASS);if(l.flags=this.flags,s.lookingAt("\\p")||s.lookingAt("\\P")){let u=new Un;if(this.parseUnicodeClass(s,u)){l.runes=u.toArray(),this.push(l);break e}}let c=new Un;if(this.parsePerlClassEscape(s,c)){l.runes=c.toArray(),this.push(l);break e}s.rewindTo(a),this.reuse(l),this.literal(e.parseEscape(s));break}default:this.literal(s.pop());break}t=o}if(this.concat(),this.swapVerticalBar()&&this.pop(),this.alternate(),this.stack.length!==1)throw new je(e.ERR_MISSING_PAREN,this.wholeRegexp);return this.stack[0].namedGroups=this.namedGroups,this.stack[0]}parsePerlFlags(t){let n=t.pos(),r=t.rest();if(r.startsWith("(?P<")||r.startsWith("(?<")){let a=r.charAt(2)==="P"?4:3,l=r.indexOf(">");if(l<0)throw new je(e.ERR_INVALID_NAMED_CAPTURE,r);let c=r.substring(a,l);if(t.skipString(c),t.skip(a+1),!e.isValidCaptureName(c))throw new je(e.ERR_INVALID_NAMED_CAPTURE,r.substring(0,l+1));let u=this.op(F.Op.LEFT_PAREN);if(u.cap=++this.numCap,this.namedGroups[c])throw new je(e.ERR_DUPLICATE_NAMED_CAPTURE,c);this.namedGroups[c]=this.numCap,u.name=c;return}t.skip(2);let s=this.flags,i=1,o=!1;e:for(;t.more();){let a=t.pop();switch(a){case _.CODES.get("i"):s|=G.FOLD_CASE,o=!0;break;case _.CODES.get("m"):s&=-17,o=!0;break;case _.CODES.get("s"):s|=G.DOT_NL,o=!0;break;case _.CODES.get("U"):s|=G.NON_GREEDY,o=!0;break;case _.CODES.get("-"):if(i<0)break e;i=-1,s=~s,o=!1;break;case _.CODES.get(":"):case _.CODES.get(")"):if(i<0){if(!o)break e;s=~s}a===_.CODES.get(":")&&this.op(F.Op.LEFT_PAREN),this.flags=s;return;default:break e}}throw new je(e.ERR_INVALID_PERL_OP,t.from(n))}parseVerticalBar(){this.concat(),this.swapVerticalBar()||this.op(F.Op.VERTICAL_BAR)}swapVerticalBar(){let t=this.stack.length;if(t>=3&&this.stack[t-2].op===F.Op.VERTICAL_BAR&&e.isCharClass(this.stack[t-1])&&e.isCharClass(this.stack[t-3])){let n=this.stack[t-1],r=this.stack[t-3];if(n.op>r.op){let s=r;r=n,n=s,this.stack[t-3]=r}return e.mergeCharClass(r,n),this.reuse(n),this.pop(),!0}if(t>=2){let n=this.stack[t-1],r=this.stack[t-2];if(r.op===F.Op.VERTICAL_BAR)return t>=3&&this.cleanAlt(this.stack[t-3]),this.stack[t-2]=n,this.stack[t-1]=r,!0}return!1}parseRightParen(){if(this.concat(),this.swapVerticalBar()&&this.pop(),this.alternate(),this.stack.length<2)throw new je(e.ERR_UNEXPECTED_PAREN,this.wholeRegexp);let n=this.pop(),r=this.pop();if(r.op!==F.Op.LEFT_PAREN)throw new je(e.ERR_UNEXPECTED_PAREN,this.wholeRegexp);this.flags=r.flags,r.cap===0?this.push(n):(r.op=F.Op.CAPTURE,r.subs=[n],this.push(r))}parsePerlClassEscape(t,n){let r=t.pos();if((this.flags&G.PERL_X)===0||!t.more()||t.pop()!==_.CODES.get("\\")||!t.more())return!1;t.pop();let s=t.from(r),i=M1.has(s)?M1.get(s):null;return i===null?!1:(n.appendGroup(i,(this.flags&G.FOLD_CASE)!==0),!0)}parseNamedClass(t,n){let r=t.rest(),s=r.indexOf(":]");if(s<0)return!1;let i=r.substring(0,s+2);t.skipString(i);let o=J1.has(i)?J1.get(i):null;if(o===null)throw new je(e.ERR_INVALID_CHAR_RANGE,i);return n.appendGroup(o,(this.flags&G.FOLD_CASE)!==0),!0}parseUnicodeClass(t,n){let r=t.pos();if((this.flags&G.UNICODE_GROUPS)===0||!t.lookingAt("\\p")&&!t.lookingAt("\\P"))return!1;t.skip(1);let s=1,i=t.pop();if(i===_.CODES.get("P")&&(s=-1),!t.more())throw t.rewindTo(r),new je(e.ERR_INVALID_CHAR_RANGE,t.rest());i=t.pop();let o;if(i!==_.CODES.get("{"))o=Te.runeToString(i);else{let u=t.rest(),f=u.indexOf("}");if(f<0)throw t.rewindTo(r),new je(e.ERR_INVALID_CHAR_RANGE,t.rest());o=u.substring(0,f),t.skipString(o),t.skip(1)}o.length!==0&&o.codePointAt(0)===_.CODES.get("^")&&(s=0-s,o=o.substring(1));let a=e.unicodeTable(o);if(a===null)throw new je(e.ERR_INVALID_CHAR_RANGE,t.from(r));let l=a.first,c=a.second;if((this.flags&G.FOLD_CASE)===0||c===null)n.appendTableWithSign(l,s);else{let u=new Un().appendTable(l).appendTable(c).cleanClass().toArray();n.appendClassWithSign(u,s)}return!0}parseClass(t){let n=t.pos();t.skip(1);let r=this.newRegexp(F.Op.CHAR_CLASS);r.flags=this.flags;let s=new Un,i=1;t.more()&&t.lookingAt("^")&&(i=-1,t.skip(1),(this.flags&G.CLASS_NL)===0&&s.appendRange(_.CODES.get(`
178
+ `),_.CODES.get(`
179
+ `)));let o=!0;for(;!t.more()||t.peek()!==_.CODES.get("]")||o;){if(t.more()&&t.lookingAt("-")&&(this.flags&G.PERL_X)===0&&!o){let u=t.rest();if(u==="-"||!u.startsWith("-]"))throw t.rewindTo(n),new je(e.ERR_INVALID_CHAR_RANGE,t.rest())}o=!1;let a=t.pos();if(t.lookingAt("[:")){if(this.parseNamedClass(t,s))continue;t.rewindTo(a)}if(this.parseUnicodeClass(t,s)||this.parsePerlClassEscape(t,s))continue;t.rewindTo(a);let l=e.parseClassChar(t,n),c=l;if(t.more()&&t.lookingAt("-")){if(t.skip(1),t.more()&&t.lookingAt("]"))t.skip(-1);else if(c=e.parseClassChar(t,n),c<l)throw new je(e.ERR_INVALID_CHAR_RANGE,t.from(a))}(this.flags&G.FOLD_CASE)===0?s.appendRange(l,c):s.appendFoldedRange(l,c)}t.skip(1),s.cleanClass(),i<0&&s.negateClass(),r.runes=s.toArray(),this.push(r)}},hl=class{constructor(t){this.value=t}get(){return this.value}set(t){this.value=t}compareAndSet(t,n){return this.value===t?(this.value=n,!0):!1}},dl=class e{static initTest(t){let n=e.compile(t),r=new e(n.expr,n.prog,n.numSubexp,n.longest);return r.cond=n.cond,r.prefix=n.prefix,r.prefixUTF8=n.prefixUTF8,r.prefixComplete=n.prefixComplete,r.prefixRune=n.prefixRune,r}static compile(t){return e.compileImpl(t,G.PERL,!1)}static compilePOSIX(t){return e.compileImpl(t,G.POSIX,!0)}static compileImpl(t,n,r){let s=pl.parse(t,n),i=s.maxCap();s=ul.simplify(s);let o=cl.compileRegexp(s),a=new e(t,o,i,r),[l,c]=o.prefix();return a.prefixComplete=l,a.prefix=c,a.prefixUTF8=Te.stringToUtf8ByteArray(a.prefix),a.prefix.length>0&&(a.prefixRune=a.prefix.codePointAt(0)),a.namedGroups=s.namedGroups,a}static match(t,n){return e.compile(t).match(n)}constructor(t,n,r=0,s=0){this.expr=t,this.prog=n,this.numSubexp=r,this.longest=s,this.cond=n.startCond(),this.prefix=null,this.prefixUTF8=null,this.prefixComplete=!1,this.prefixRune=0,this.pooled=new hl,this.dfa=new al(n)}executeEngine(t,n,r,s){if(s>0)return this.doExecuteNFA(t,n,r,s);let i=this.dfa.match(t,n,r);return i!==null?i?[]:null:this.doExecuteNFA(t,n,r,s)}numberOfCapturingGroups(){return this.numSubexp}numberOfInstructions(){return this.prog.numInst()}get(){let t;do t=this.pooled.get();while(t&&!this.pooled.compareAndSet(t,t.next));return t}reset(){this.pooled.set(null)}put(t,n){let r=this.pooled.get();do r=this.pooled.get(),!n&&r&&(t=Qs.fromMachine(t),n=!0),t.next!==r&&(t.next=r);while(!this.pooled.compareAndSet(r,t))}toString(){return this.expr}doExecuteNFA(t,n,r,s){let i=this.get(),o=!1;i?i.next!==null&&(i=Qs.fromMachine(i),o=!0):(i=Qs.fromRE2(this),o=!0),i.init(s);let a=i.match(t,n,r)?i.submatches():null;return this.put(i,o),a}match(t){return this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,0)!==null}matchWithGroup(t,n,r,s,i){return t instanceof lr||(t=ls.utf16(t)),this.matchMachineInput(t,n,r,s,i)}matchMachineInput(t,n,r,s,i){if(n>r)return[!1,null];let o=t.isUTF16Encoding()?Ye.fromUTF16(t.asCharSequence(),0,r):Ye.fromUTF8(t.asBytes(),0,r),a=this.executeEngine(o,n,s,2*i);return a===null?[!1,null]:[!0,a]}matchUTF8(t){return this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,0)!==null}replaceAll(t,n){return this.replaceAllFunc(t,()=>n,2*t.length+1)}replaceFirst(t,n){return this.replaceAllFunc(t,()=>n,1)}replaceAllFunc(t,n,r){let s=0,i=0,o="",a=Ye.fromUTF16(t),l=0;for(;i<=t.length;){let c=this.executeEngine(a,i,G.UNANCHORED,2);if(c===null||c.length===0)break;o+=t.substring(s,c[0]),(c[1]>s||c[0]===0)&&(o+=n(t.substring(c[0],c[1])),l++),s=c[1];let u=a.step(i)&7;if(i+u>c[1]?i+=u:i+1>c[1]?i++:i=c[1],l>=r)break}return o+=t.substring(s),o}pad(t){if(t===null)return null;let n=(1+this.numSubexp)*2;if(t.length<n){let r=new Array(n).fill(-1);for(let s=0;s<t.length;s++)r[s]=t[s];t=r}return t}allMatches(t,n,r=s=>s){let s=[],i=t.endPos();n<0&&(n=i+1);let o=0,a=0,l=-1;for(;a<n&&o<=i;){let c=this.executeEngine(t,o,G.UNANCHORED,this.prog.numCap);if(c===null||c.length===0)break;let u=!0;if(c[1]===o){c[0]===l&&(u=!1);let f=t.step(o);f<0?o=i+1:o+=f&7}else o=c[1];l=c[1],u&&(s.push(r(this.pad(c))),a++)}return s}findUTF8(t){let n=this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,2);return n===null?null:t.slice(n[0],n[1])}findUTF8Index(t){let n=this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,2);return n===null?null:n.slice(0,2)}find(t){let n=this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,2);return n===null?"":t.substring(n[0],n[1])}findIndex(t){return this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,2)}findUTF8Submatch(t){let n=this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,this.prog.numCap);if(n===null)return null;let r=new Array(1+this.numSubexp).fill(null);for(let s=0;s<r.length;s++)2*s<n.length&&n[2*s]>=0&&(r[s]=t.slice(n[2*s],n[2*s+1]));return r}findUTF8SubmatchIndex(t){return this.pad(this.executeEngine(Ye.fromUTF8(t),0,G.UNANCHORED,this.prog.numCap))}findSubmatch(t){let n=this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,this.prog.numCap);if(n===null)return null;let r=new Array(1+this.numSubexp).fill(null);for(let s=0;s<r.length;s++)2*s<n.length&&n[2*s]>=0&&(r[s]=t.substring(n[2*s],n[2*s+1]));return r}findSubmatchIndex(t){return this.pad(this.executeEngine(Ye.fromUTF16(t),0,G.UNANCHORED,this.prog.numCap))}findAllUTF8(t,n){let r=this.allMatches(Ye.fromUTF8(t),n,s=>t.slice(s[0],s[1]));return r.length===0?null:r}findAllUTF8Index(t,n){let r=this.allMatches(Ye.fromUTF8(t),n,s=>s.slice(0,2));return r.length===0?null:r}findAll(t,n){let r=this.allMatches(Ye.fromUTF16(t),n,s=>t.substring(s[0],s[1]));return r.length===0?null:r}findAllIndex(t,n){let r=this.allMatches(Ye.fromUTF16(t),n,s=>s.slice(0,2));return r.length===0?null:r}findAllUTF8Submatch(t,n){let r=this.allMatches(Ye.fromUTF8(t),n,s=>{let i=new Array(s.length/2|0).fill(null);for(let o=0;o<i.length;o++)s[2*o]>=0&&(i[o]=t.slice(s[2*o],s[2*o+1]));return i});return r.length===0?null:r}findAllUTF8SubmatchIndex(t,n){let r=this.allMatches(Ye.fromUTF8(t),n);return r.length===0?null:r}findAllSubmatch(t,n){let r=this.allMatches(Ye.fromUTF16(t),n,s=>{let i=new Array(s.length/2|0).fill(null);for(let o=0;o<i.length;o++)s[2*o]>=0&&(i[o]=t.substring(s[2*o],s[2*o+1]));return i});return r.length===0?null:r}findAllSubmatchIndex(t,n){let r=this.allMatches(Ye.fromUTF16(t),n);return r.length===0?null:r}},ml=class e{static isUpperCaseAlpha(t){return"A"<=t&&t<="Z"}static isHexadecimal(t){return"0"<=t&&t<="9"||"A"<=t&&t<="F"||"a"<=t&&t<="f"}static getUtf8CharSize(t){let n=t.charCodeAt(0);return n<128?1:n<2048?2:n<65536?3:4}static translate(t){if(typeof t!="string")return t;let n="",r=!1,s=t.length;s===0&&(n="(?:)",r=!0);let i=0;for(;i<s;){let o=t[i];if(o==="\\"){if(i+1<s)switch(o=t[i+1],o){case"\\":{n+="\\\\",i+=2;continue}case"c":{if(i+2<s){let l=t[i+2];if(e.isUpperCaseAlpha(l)){n+="\\x",n+=(l.charCodeAt(0)-64>>4).toString(16).toUpperCase(),n+=(l.charCodeAt(0)-64&15).toString(16).toUpperCase(),i+=3,r=!0;continue}}n+="\\c",i+=2;continue}case"u":{if(i+2<s){let l=t[i+2];if(e.isHexadecimal(l)){n+="\\x{"+l,i+=3;for(let c=0;c<3&&i<s&&(l=t[i],!!e.isHexadecimal(l));++i,++c)n+=l;n+="}",r=!0;continue}else if(l==="{"){n+="\\x",i+=2,r=!0;continue}}n+="\\u",i+=2;continue}default:{n+="\\";let l=e.getUtf8CharSize(o);n+=t.substring(i+1,i+1+l),i+=l+1;continue}}}else if(o==="/"){n+="\\/",i+=1,r=!0;continue}else if(o==="("&&i+2<s&&t[i+1]==="?"&&t[i+2]==="<"&&(i+3>=s||t[i+3]!=="="&&t[i+3]!=="!")){n+="(?P<",i+=3,r=!0;continue}let a=e.getUtf8CharSize(o);n+=t.substring(i,i+a),i+=a}return r?n:t}},cr=class e{static CASE_INSENSITIVE=1;static DOTALL=2;static MULTILINE=4;static DISABLE_UNICODE_GROUPS=8;static LONGEST_MATCH=16;static quote(t){return Te.quoteMeta(t)}static quoteReplacement(t,n=!1){return qi.quoteReplacement(t,n)}static translateRegExp(t){return ml.translate(t)}static compile(t,n=0){let r=t;if((n&e.CASE_INSENSITIVE)!==0&&(r=`(?i)${r}`),(n&e.DOTALL)!==0&&(r=`(?s)${r}`),(n&e.MULTILINE)!==0&&(r=`(?m)${r}`),(n&~(e.MULTILINE|e.DOTALL|e.CASE_INSENSITIVE|e.DISABLE_UNICODE_GROUPS|e.LONGEST_MATCH))!==0)throw new sl("Flags should only be a combination of MULTILINE, DOTALL, CASE_INSENSITIVE, DISABLE_UNICODE_GROUPS, LONGEST_MATCH");let s=G.PERL;(n&e.DISABLE_UNICODE_GROUPS)!==0&&(s&=-129);let i=new e(t,n);return i.re2Input=dl.compileImpl(r,s,(n&e.LONGEST_MATCH)!==0),i}static matches(t,n){return e.compile(t).testExact(n)}static initTest(t,n,r){if(t==null)throw new Error("pattern is null");if(r==null)throw new Error("re2 is null");let s=new e(t,n);return s.re2Input=r,s}constructor(t,n){this.patternInput=t,this.flagsInput=n}reset(){this.re2Input.reset()}flags(){return this.flagsInput}pattern(){return this.patternInput}re2(){return this.re2Input}matches(t){return this.testExact(t)}matcher(t){return Array.isArray(t)&&(t=ls.utf8(t)),new qi(this,t)}test(t){return Array.isArray(t)?this.re2Input.matchUTF8(t):this.re2Input.match(t)}testExact(t){let n=Array.isArray(t)?Ye.fromUTF8(t):Ye.fromUTF16(t);return this.re2Input.executeEngine(n,0,G.ANCHOR_BOTH,0)!==null}split(t,n=0){let r=this.matcher(t),s=[],i=0,o=0;for(;r.find();){if(o===0&&r.end()===0){o=r.end();continue}if(n>0&&s.length===n-1)break;if(o===r.start()){if(n===0){i+=1,o=r.end();continue}}else for(;i>0;)s.push(""),i-=1;s.push(r.substring(o,r.start())),o=r.end()}if(n===0&&o!==r.inputLength()){for(;i>0;)s.push(""),i-=1;s.push(r.substring(o,r.inputLength()))}return(n!==0||s.length===0)&&s.push(r.substring(o,r.inputLength())),s}toString(){return this.patternInput}programSize(){return this.re2Input.numberOfInstructions()}groupCount(){return this.re2Input.numberOfCapturingGroups()}namedGroups(){return this.re2Input.namedGroups}equals(t){return this===t?!0:t===null||this.constructor!==t.constructor?!1:this.flagsInput===t.flagsInput&&this.patternInput===t.patternInput}}});function D3(e){let t=0;return e.includes("i")&&(t|=cr.CASE_INSENSITIVE),e.includes("m")&&(t|=cr.MULTILINE),e.includes("s")&&(t|=cr.DOTALL),t}function _3(e){return cr.translateRegExp(e)}function Q(e,t=""){return new Ki(e,t)}var Ki,Jn,np=k(()=>{"use strict";tp();Ki=class{_re2;_pattern;_flags;_global;_ignoreCase;_multiline;_lastIndex=0;_nativeRegex=null;_matcher=null;_matcherInput=null;acquireMatcher(t){return this._matcher===null?(this._matcher=this._re2.matcher(t),this._matcherInput=t,this._matcher):(this._matcherInput!==t&&(this._matcher.matcherInput.charSequence=t,this._matcherInput=t),this._matcher.reset(),this._matcher)}constructor(t,n=""){this._pattern=t,this._flags=n,this._global=n.includes("g"),this._ignoreCase=n.includes("i"),this._multiline=n.includes("m");try{let r=_3(t),s=D3(n);this._re2=cr.compile(r,s)}catch(r){if(r instanceof je){let s=r.message||"",i="";throw s.includes("(?=")||s.includes("(?!")||s.includes("(?<")||s.includes("(?<!")||t.includes("(?=")||t.includes("(?!")||t.includes("(?<=")||t.includes("(?<!")?i=" Lookahead (?=, ?!) and lookbehind (?<=, ?<!) assertions are not supported in this environment because the regex engine uses RE2 for ReDoS protection. RE2 guarantees linear-time matching but cannot support these features.":(s.includes("backreference")||/\\[1-9]/.test(t))&&(i=" Backreferences (\\1, \\2, etc.) are not supported in this environment because the regex engine uses RE2 for ReDoS protection. RE2 guarantees linear-time matching but cannot support backreferences."),new SyntaxError(`Invalid regular expression: /${t}/: ${s}${i}`)}throw r}}test(t){return this._global&&(this._lastIndex=0),this.acquireMatcher(t).find()}exec(t){let n=this.acquireMatcher(t),r=this._global?this._lastIndex:0;if(!n.find(r))return this._global&&(this._lastIndex=0),null;let s=this._re2.groupCount(),i=[];i.push(n.group(0)??"");for(let l=1;l<=s;l++){let c=n.group(l);i.push(c)}let o=i;o.index=n.start(0),o.input=t;let a=this._re2.namedGroups();if(a&&Object.keys(a).length>0){let l=Object.create(null);for(let[c,u]of Object.entries(a)){let f=n.group(u);f!==null&&(l[c]=f)}o.groups=l}return this._global&&(this._lastIndex=n.end(0),n.start(0)===n.end(0)&&this._lastIndex++),o}match(t){if(this._global&&(this._lastIndex=0),!this._global)return this.exec(t);let n=[],r=this._re2.matcher(t),s=0;for(;r.find(s);){let i=r.group(0)??"";if(n.push(i),s=r.end(0),r.start(0)===r.end(0)&&s++,s>t.length)break}return n.length>0?n:null}replace(t,n){if(this._global&&(this._lastIndex=0),typeof n=="string"){let c=this._re2.matcher(t);return this._global?c.replaceAll(n,!0):c.replaceFirst(n,!0)}let r=[],s=this._re2.matcher(t),i=0,o=0,a=this._re2.groupCount(),l=this._re2.namedGroups();for(;s.find(o);){r.push(t.slice(i,s.start(0)));let c=[],u=s.group(0)??"";for(let f=1;f<=a;f++)c.push(s.group(f));if(c.push(s.start(0)),c.push(t),l&&Object.keys(l).length>0){let f=Object.create(null);for(let[p,h]of Object.entries(l))f[p]=s.group(h)??"";c.push(f)}if(r.push(n(u,...c)),i=s.end(0),o=i,s.start(0)===s.end(0)&&o++,!this._global||o>t.length)break}return r.push(t.slice(i)),r.join("")}split(t,n){return n===void 0||n<0?this._re2.split(t,-1):n===0?[]:this._re2.split(t,-1).slice(0,n)}search(t){let n=this._re2.matcher(t);return n.find()?n.start(0):-1}*matchAll(t){if(!this._global)throw new Error("matchAll requires global flag");this._lastIndex=0;let n=this._re2.matcher(t),r=this._re2.groupCount(),s=this._re2.namedGroups(),i=0;for(;n.find(i);){let o=[];o.push(n.group(0)??"");for(let l=1;l<=r;l++)o.push(n.group(l));let a=o;if(a.index=n.start(0),a.input=t,s&&Object.keys(s).length>0){let l=Object.create(null);for(let[c,u]of Object.entries(s)){let f=n.group(u);f!==null&&(l[c]=f)}a.groups=l}if(yield a,i=n.end(0),n.start(0)===n.end(0)&&i++,i>t.length)break}}get native(){if(!this._nativeRegex)try{this._nativeRegex=new RegExp(this._pattern,this._flags)}catch{this._nativeRegex=new RegExp("",this._flags),Object.defineProperty(this._nativeRegex,"source",{value:this._pattern,writable:!1})}return this._nativeRegex}get source(){return this._pattern}get flags(){return this._flags}get global(){return this._global}get ignoreCase(){return this._ignoreCase}get multiline(){return this._multiline}get lastIndex(){return this._lastIndex}set lastIndex(t){this._lastIndex=t}};Jn=class{_regex;constructor(t){this._regex=t}test(t){return this._regex.global&&(this._regex.lastIndex=0),this._regex.test(t)}exec(t){return this._regex.exec(t)}match(t){return this._regex.global&&(this._regex.lastIndex=0),t.match(this._regex)}replace(t,n){return this._regex.global&&(this._regex.lastIndex=0),t.replace(this._regex,n)}split(t,n){return t.split(this._regex,n)}search(t){return t.search(this._regex)}*matchAll(t){if(!this._regex.global)throw new Error("matchAll requires global flag");this._regex.lastIndex=0;let n=this._regex.exec(t);for(;n!==null;)yield n,n[0].length===0&&this._regex.lastIndex++,n=this._regex.exec(t)}get native(){return this._regex}get source(){return this._regex.source}get flags(){return this._regex.flags}get global(){return this._regex.global}get ignoreCase(){return this._regex.ignoreCase}get multiline(){return this._regex.multiline}get lastIndex(){return this._regex.lastIndex}set lastIndex(t){this._regex.lastIndex=t}}});var Ze=k(()=>{"use strict";np()});function Dt(e,t,n){let r=typeof n=="boolean"?{ignoreCase:n}:n??{},s=t;r.stripQuotes&&(s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"))&&(s=s.slice(1,-1));let i=r.ignoreCase?`i:${s}`:s,o=Ys.get(i);if(!o){if(o=L3(s,r.ignoreCase),Ys.size>=F3){let a=Ys.keys().next().value;a!==void 0&&Ys.delete(a)}Ys.set(i,o)}return o.test(e)}function L3(e,t){let n="^";for(let r=0;r<e.length;r++){let s=e[r];if(s==="*")n+=".*";else if(s==="?")n+=".";else if(s==="["){let i=r+1;for(;i<e.length&&e[i]!=="]";)i++;n+=e.slice(r,i+1),r=i}else s==="."||s==="+"||s==="^"||s==="$"||s==="{"||s==="}"||s==="("||s===")"||s==="|"||s==="\\"?n+=`\\${s}`:n+=s}return n+="$",Q(n,t?"i":"")}var F3,Ys,gl=k(()=>{"use strict";Ze();F3=2048,Ys=new Map});function Qi(e,t){let n=e.ignoreCase?t.toLowerCase():t,r=e.needles;for(let s=0;s<r.length;s++)if(n.indexOf(r[s])!==-1)return!0;return!1}function rp(e,t){return e.replace(/\$(&|\d+|<([^>]+)>)/g,(n,r,s)=>{if(r==="&")return t[0];if(s!==void 0)return t.groups?.[s]??"";let i=parseInt(r,10);return t[i]??""})}function us(e,t,n={}){let{invertMatch:r=!1,showLineNumbers:s=!1,countOnly:i=!1,countMatches:o=!1,filename:a="",onlyMatching:l=!1,beforeContext:c=0,afterContext:u=0,maxCount:f=0,contextSeparator:p="--",showColumn:h=!1,vimgrep:d=!1,showByteOffset:m=!1,replace:g=null,passthru:y=!1,multiline:w=!1,kResetGroup:b,preFilter:x}=n;if(w)return M3(e,t,{invertMatch:r,showLineNumbers:s,countOnly:i,countMatches:o,filename:a,onlyMatching:l,beforeContext:c,afterContext:u,maxCount:f,contextSeparator:p,showColumn:h,showByteOffset:m,replace:g,kResetGroup:b});let S=e.split(`
180
+ `),v=S.length,$=v>0&&S[v-1]===""?v-1:v;if(i||o){let R=0,I=(o||l)&&!r;for(let B=0;B<$;B++){let Z=S[B];if(!(x&&!r&&!Qi(x,Z)))if(t.lastIndex=0,I)for(let ae=t.exec(Z);ae!==null;ae=t.exec(Z))R++,ae[0].length===0&&t.lastIndex++;else t.test(Z)!==r&&R++}return{output:`${a?`${a}:${R}`:String(R)}
181
+ `,matched:R>0,matchCount:R}}if(c===0&&u===0&&!y){let R=[],I=!1,L=0,B=0;for(let Z=0;Z<$&&!(f>0&&L>=f);Z++){let ae=S[Z],ye=null;if(x&&!Qi(x,ae)||(t.lastIndex=0,ye=t.exec(ae)),ye!==null!==r)if(I=!0,L++,l)for(let H=ye;H!==null;H=t.exec(ae)){let te=b!==void 0?H[b]??"":H[0],ve=g!==null?rp(g,H):te,ie=a?`${a}:`:"";m&&(ie+=`${B+H.index}:`),s&&(ie+=`${Z+1}:`),h&&(ie+=`${H.index+1}:`),R.push(ie+ve),H[0].length===0&&t.lastIndex++}else if(d)for(let H=ye;H!==null;H=t.exec(ae)){let te=a?`${a}:`:"";m&&(te+=`${B+H.index}:`),s&&(te+=`${Z+1}:`),h&&(te+=`${H.index+1}:`),R.push(te+ae),H[0].length===0&&t.lastIndex++}else{let H=ye?ye.index+1:1,te=ae;g!==null&&(t.lastIndex=0,te=t.replace(ae,(...ie)=>{if(ie[0].length===0)return"";let j=ie,Re=ie[ie.length-1];return typeof Re=="object"&&Re!==null?(j.groups=Re,j.input=ie[ie.length-2],j.index=ie[ie.length-3]):(j.input=ie[ie.length-1],j.index=ie[ie.length-2]),rp(g,j)}));let ve=a?`${a}:`:"";m&&(ve+=`${B+(ye?ye.index:0)}:`),s&&(ve+=`${Z+1}:`),h&&(ve+=`${H}:`),R.push(ve+te)}B+=ae.length+1}return{output:R.length>0?`${R.join(`
182
182
  `)}
183
- `:"",matched:I,matchCount:L}}if(y){let O=[],I=!1,L=0;for(let B=0;B<$;B++){let Z=S[B],ae;x&&!Qi(x,Z)?ae=!1:(t.lastIndex=0,ae=t.test(Z));let ye=ae!==r;ye&&(I=!0,L++);let q=ye?":":"-",H=a?`${a}${q}`:"";s&&(H+=`${B+1}${q}`),O.push(H+Z)}return{output:O.length>0?`${O.join(`
183
+ `:"",matched:I,matchCount:L}}if(y){let R=[],I=!1,L=0;for(let B=0;B<$;B++){let Z=S[B],ae;x&&!Qi(x,Z)?ae=!1:(t.lastIndex=0,ae=t.test(Z));let ye=ae!==r;ye&&(I=!0,L++);let q=ye?":":"-",H=a?`${a}${q}`:"";s&&(H+=`${B+1}${q}`),R.push(H+Z)}return{output:R.length>0?`${R.join(`
184
184
  `)}
185
- `:"",matched:I,matchCount:L}}let _=[],R=0,P=new Set,C=-1,T=[];for(let O=0;O<$&&!(f>0&&R>=f);O++){let I=S[O],L;x&&!Qi(x,I)?L=!1:(t.lastIndex=0,L=t.test(I)),L!==r&&(T.push(O),R++)}for(let O of T){let I=Math.max(0,O-c);C>=0&&I>C+1&&_.push(p);for(let B=I;B<O;B++)if(!P.has(B)){P.add(B),C=B;let Z=S[B];s&&(Z=`${B+1}-${Z}`),a&&(Z=`${a}-${Z}`),_.push(Z)}if(!P.has(O)){P.add(O),C=O;let B=S[O];if(l){t.lastIndex=0;for(let Z=t.exec(B);Z!==null;Z=t.exec(B)){let ae=b!==void 0?Z[b]??"":Z[0],ye=g!==null?g:ae,q=a?`${a}:`:"";s&&(q+=`${O+1}:`),h&&(q+=`${Z.index+1}:`),_.push(q+ye),Z[0].length===0&&t.lastIndex++}}else{let Z=B;s&&(Z=`${O+1}:${Z}`),a&&(Z=`${a}:${Z}`),_.push(Z)}}let L=Math.min($-1,O+u);for(let B=O+1;B<=L;B++)if(!P.has(B)){P.add(B),C=B;let Z=S[B];s&&(Z=`${B+1}-${Z}`),a&&(Z=`${a}-${Z}`),_.push(Z)}}return{output:_.length>0?`${_.join(`
185
+ `:"",matched:I,matchCount:L}}let D=[],O=0,P=new Set,C=-1,T=[];for(let R=0;R<$&&!(f>0&&O>=f);R++){let I=S[R],L;x&&!Qi(x,I)?L=!1:(t.lastIndex=0,L=t.test(I)),L!==r&&(T.push(R),O++)}for(let R of T){let I=Math.max(0,R-c);C>=0&&I>C+1&&D.push(p);for(let B=I;B<R;B++)if(!P.has(B)){P.add(B),C=B;let Z=S[B];s&&(Z=`${B+1}-${Z}`),a&&(Z=`${a}-${Z}`),D.push(Z)}if(!P.has(R)){P.add(R),C=R;let B=S[R];if(l){t.lastIndex=0;for(let Z=t.exec(B);Z!==null;Z=t.exec(B)){let ae=b!==void 0?Z[b]??"":Z[0],ye=g!==null?g:ae,q=a?`${a}:`:"";s&&(q+=`${R+1}:`),h&&(q+=`${Z.index+1}:`),D.push(q+ye),Z[0].length===0&&t.lastIndex++}}else{let Z=B;s&&(Z=`${R+1}:${Z}`),a&&(Z=`${a}:${Z}`),D.push(Z)}}let L=Math.min($-1,R+u);for(let B=R+1;B<=L;B++)if(!P.has(B)){P.add(B),C=B;let Z=S[B];s&&(Z=`${B+1}-${Z}`),a&&(Z=`${a}-${Z}`),D.push(Z)}}return{output:D.length>0?`${D.join(`
186
186
  `)}
187
- `:"",matched:R>0,matchCount:R}}function M3(e,t,n){let{invertMatch:r,showLineNumbers:s,countOnly:i,countMatches:o,filename:a,onlyMatching:l,beforeContext:c,afterContext:u,maxCount:f,contextSeparator:p,showColumn:h,showByteOffset:d,replace:m,kResetGroup:g}=n,y=e.split(`
187
+ `:"",matched:O>0,matchCount:O}}function M3(e,t,n){let{invertMatch:r,showLineNumbers:s,countOnly:i,countMatches:o,filename:a,onlyMatching:l,beforeContext:c,afterContext:u,maxCount:f,contextSeparator:p,showColumn:h,showByteOffset:d,replace:m,kResetGroup:g}=n,y=e.split(`
188
188
  `),w=y.length,b=w>0&&y[w-1]===""?w-1:w,x=[0];for(let C=0;C<e.length;C++)e[C]===`
189
- `&&x.push(C+1);let S=C=>{let T=0;for(let O=0;O<x.length&&!(x[O]>C);O++)T=O;return T},v=C=>{let T=S(C);return C-x[T]+1},$=[];t.lastIndex=0;for(let C=t.exec(e);C!==null&&!(f>0&&$.length>=f);C=t.exec(e)){let T=S(C.index),O=S(C.index+Math.max(0,C[0].length-1)),I=g!==void 0?C[g]??"":C[0];$.push({startLine:T,endLine:O,byteOffset:C.index,column:v(C.index),matchText:I}),C[0].length===0&&t.lastIndex++}if(i||o){let C;if(o)C=r?0:$.length;else{let O=new Set;for(let I of $)for(let L=I.startLine;L<=I.endLine;L++)O.add(L);C=r?b-O.size:O.size}return{output:`${a?`${a}:${C}`:String(C)}
190
- `,matched:C>0,matchCount:C}}if(r){let C=new Set;for(let O of $)for(let I=O.startLine;I<=O.endLine;I++)C.add(I);let T=[];for(let O=0;O<b;O++)if(!C.has(O)){let I=y[O];s&&(I=`${O+1}:${I}`),a&&(I=`${a}:${I}`),T.push(I)}return{output:T.length>0?`${T.join(`
189
+ `&&x.push(C+1);let S=C=>{let T=0;for(let R=0;R<x.length&&!(x[R]>C);R++)T=R;return T},v=C=>{let T=S(C);return C-x[T]+1},$=[];t.lastIndex=0;for(let C=t.exec(e);C!==null&&!(f>0&&$.length>=f);C=t.exec(e)){let T=S(C.index),R=S(C.index+Math.max(0,C[0].length-1)),I=g!==void 0?C[g]??"":C[0];$.push({startLine:T,endLine:R,byteOffset:C.index,column:v(C.index),matchText:I}),C[0].length===0&&t.lastIndex++}if(i||o){let C;if(o)C=r?0:$.length;else{let R=new Set;for(let I of $)for(let L=I.startLine;L<=I.endLine;L++)R.add(L);C=r?b-R.size:R.size}return{output:`${a?`${a}:${C}`:String(C)}
190
+ `,matched:C>0,matchCount:C}}if(r){let C=new Set;for(let R of $)for(let I=R.startLine;I<=R.endLine;I++)C.add(I);let T=[];for(let R=0;R<b;R++)if(!C.has(R)){let I=y[R];s&&(I=`${R+1}:${I}`),a&&(I=`${a}:${I}`),T.push(I)}return{output:T.length>0?`${T.join(`
191
191
  `)}
192
- `:"",matched:T.length>0,matchCount:T.length}}if($.length===0)return{output:"",matched:!1,matchCount:0};let _=new Set,R=-1,P=[];for(let C of $){let T=Math.max(0,C.startLine-c),O=Math.min(b-1,C.endLine+u);R>=0&&T>R+1&&P.push(p);for(let I=T;I<C.startLine;I++)if(!_.has(I)){_.add(I),R=I;let L=y[I];s&&(L=`${I+1}-${L}`),a&&(L=`${a}-${L}`),P.push(L)}if(l){let I=m!==null?m:C.matchText,L=a?`${a}:`:"";d&&(L+=`${C.byteOffset}:`),s&&(L+=`${C.startLine+1}:`),h&&(L+=`${C.column}:`),P.push(L+I);for(let B=C.startLine;B<=C.endLine;B++)_.add(B),R=B}else for(let I=C.startLine;I<=C.endLine&&I<b;I++)if(!_.has(I)){_.add(I),R=I;let L=y[I];m!==null&&I===C.startLine&&(t.lastIndex=0,L=t.replace(L,m));let B=a?`${a}:`:"";d&&I===C.startLine&&(B+=`${C.byteOffset}:`),s&&(B+=`${I+1}:`),h&&I===C.startLine&&(B+=`${C.column}:`),P.push(B+L)}for(let I=C.endLine+1;I<=O;I++)if(!_.has(I)){_.add(I),R=I;let L=y[I];s&&(L=`${I+1}-${L}`),a&&(L=`${a}-${L}`),P.push(L)}}return{output:P.length>0?`${P.join(`
192
+ `:"",matched:T.length>0,matchCount:T.length}}if($.length===0)return{output:"",matched:!1,matchCount:0};let D=new Set,O=-1,P=[];for(let C of $){let T=Math.max(0,C.startLine-c),R=Math.min(b-1,C.endLine+u);O>=0&&T>O+1&&P.push(p);for(let I=T;I<C.startLine;I++)if(!D.has(I)){D.add(I),O=I;let L=y[I];s&&(L=`${I+1}-${L}`),a&&(L=`${a}-${L}`),P.push(L)}if(l){let I=m!==null?m:C.matchText,L=a?`${a}:`:"";d&&(L+=`${C.byteOffset}:`),s&&(L+=`${C.startLine+1}:`),h&&(L+=`${C.column}:`),P.push(L+I);for(let B=C.startLine;B<=C.endLine;B++)D.add(B),O=B}else for(let I=C.startLine;I<=C.endLine&&I<b;I++)if(!D.has(I)){D.add(I),O=I;let L=y[I];m!==null&&I===C.startLine&&(t.lastIndex=0,L=t.replace(L,m));let B=a?`${a}:`:"";d&&I===C.startLine&&(B+=`${C.byteOffset}:`),s&&(B+=`${I+1}:`),h&&I===C.startLine&&(B+=`${C.column}:`),P.push(B+L)}for(let I=C.endLine+1;I<=R;I++)if(!D.has(I)){D.add(I),O=I;let L=y[I];s&&(L=`${I+1}-${L}`),a&&(L=`${a}-${L}`),P.push(L)}}return{output:P.length>0?`${P.join(`
193
193
  `)}
194
194
  `:"",matched:!0,matchCount:$.length}}var sp=k(()=>{"use strict"});function ip(e){let t="",n=0;for(;n<e.length;){if(e.slice(n,n+7)==="[[:<:]]"){t+="\\b",n+=7;continue}if(e.slice(n,n+7)==="[[:>:]]"){t+="\\b",n+=7;continue}if(e[n]==="["){let r="[";for(n++,n<e.length&&(e[n]==="^"||e[n]==="!")&&(r+="^",n++),n<e.length&&e[n]==="]"&&(r+="\\]",n++);n<e.length&&e[n]!=="]";){if(e[n]==="["&&n+1<e.length&&e[n+1]===":"){let s=e.indexOf(":]",n+2);if(s!==-1){let i=e.slice(n+2,s),o=U3.get(i);if(o){r+=o,n=s+2;continue}}}if(e[n]==="\\"&&n+1<e.length){r+=e[n]+e[n+1],n+=2;continue}r+=e[n],n++}n<e.length&&e[n]==="]"&&(r+="]",n++),t+=r;continue}if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}t+=e[n],n++}return t}function Js(e,t){let n,r;switch(t.mode){case"fixed":n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");break;case"extended":case"perl":{if(n=ip(e),n=n.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),t.mode==="perl"){n=H3(n),n=j3(n),n=G3(n);let a=K3(n);n=a.pattern,r=a.kResetGroup}break}default:n=ip(e),n=Y3(n);break}t.wholeWord&&(n=`\\b(?:${n})\\b`),t.lineRegexp&&(n=`^${n}$`);let s=/\\u\{[0-9A-Fa-f]+\}/.test(n),i="g"+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.multilineDotall?"s":"")+(s?"u":""),o=B3(n,t.ignoreCase??!1);return{regex:Q(n,i),kResetGroup:r,preFilter:o??void 0}}function B3(e,t){let n=e;if(n.startsWith("\\b(?:")&&n.endsWith(")\\b")?n=n.slice(5,n.length-3):n.startsWith("\\b")&&n.endsWith("\\b")&&n.length>=4&&(n=n.slice(2,n.length-2)),n.length===0)return null;let r=W3(n);if(r===null)return null;let s=[];for(let i of r){let o=z3(i);if(o===null||o.length===0)return null;s.push(o)}return s.length===0?null:{needles:t?s.map(i=>i.toLowerCase()):s,ignoreCase:t}}function W3(e){let t=[],n=0,r=!1,s=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="\\"){i++;continue}if(r){o==="]"&&(r=!1);continue}if(o==="[")r=!0;else if(o==="(")n++;else if(o===")"){if(n--,n<0)return null}else o==="|"&&n===0&&(t.push(e.slice(s,i)),s=i+1)}return n!==0||r?null:(t.push(e.slice(s)),t)}function z3(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(r==="\\"){let s=e[n+1];if(s===void 0||/[dDwWsSbBAZzGQE0-9ckpPNXRxuU]/.test(s))return null;s==="n"?t+=`
195
- `:s==="t"?t+=" ":s==="r"?t+="\r":s==="f"?t+="\f":s==="v"?t+="\v":t+=s,n++;continue}if(/[.*+?^${}()|[\]]/.test(r))return null;t+=r}return t}function H3(e){let t="",n=0;for(;n<e.length;)if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="Q"){n+=2;let r="";for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="E"){n+=2;break}r+=e[n],n++}t+=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}else t+=e[n],n++;return t}function j3(e){return e.replace(/\\x\{([0-9A-Fa-f]+)\}/g,"\\u{$1}")}function G3(e){let t="",n=0;for(;n<e.length;){if(e[n]==="("&&n+1<e.length&&e[n+1]==="?"){let r=e.slice(n).match(/^\(\?([imsx]*)(-[imsx]*)?(:|$|\))/);if(r){let s=r[1]||"",i=r[2]||"",o=r[3];if(o===":"){let a=n+r[0].length-1,l=V3(e,n);if(l!==-1){let c=e.slice(a+1,l),u=q3(c,s,i);t+=`(?:${u})`,n=l+1;continue}}else if(o===")"||o===""){n+=r[0].length;continue}}}t+=e[n],n++}return t}function V3(e,t){let n=0,r=t;for(;r<e.length;){if(e[r]==="\\"){r+=2;continue}if(e[r]==="["){for(r++;r<e.length&&e[r]!=="]";)e[r]==="\\"&&r++,r++;r++;continue}if(e[r]==="(")n++;else if(e[r]===")"&&(n--,n===0))return r;r++}return-1}function q3(e,t,n){let r=e;return t.includes("i")&&(r=Z3(r)),r}function Z3(e){let t="",n=0;for(;n<e.length;){let r=e[n];if(r==="\\"){n+1<e.length?(t+=r+e[n+1],n+=2):(t+=r,n++);continue}if(r==="["){t+=r,n++,n<e.length&&e[n]==="^"&&(t+=e[n],n++);let s=[];for(;n<e.length&&e[n]!=="]";)if(e[n]==="\\")s.push(e[n]),n++,n<e.length&&(s.push(e[n]),n++);else if(e[n]==="-"&&s.length>0&&n+1<e.length&&e[n+1]!=="]"){let i=s[s.length-1],o=e[n+1];s.push("-"),s.push(o),/[a-z]/.test(i)&&/[a-z]/.test(o)?(s.push(i.toUpperCase()),s.push("-"),s.push(o.toUpperCase())):/[A-Z]/.test(i)&&/[A-Z]/.test(o)&&(s.push(i.toLowerCase()),s.push("-"),s.push(o.toLowerCase())),n+=2}else{let i=e[n];if(s.push(i),/[a-zA-Z]/.test(i)){let o=i===i.toLowerCase()?i.toUpperCase():i.toLowerCase();s.includes(o)||s.push(o)}n++}t+=s.join(""),n<e.length&&(t+=e[n],n++);continue}if(/[a-zA-Z]/.test(r)){let s=r.toLowerCase(),i=r.toUpperCase();t+=`[${i}${s}]`}else t+=r;n++}return t}function K3(e){let t=Q3(e);if(t===-1)return{pattern:e};let n=e.slice(0,t),r=e.slice(t+2),s=X3(n);return{pattern:`(?:${n})(${r})`,kResetGroup:s+1}}function Q3(e){let t=0;for(;t<e.length-1;)if(e[t]==="\\"){if(e[t+1]==="K"){let n=0,r=t-1;for(;r>=0&&e[r]==="\\";)n++,r--;if(n%2===0)return t}t+=2}else t++;return-1}function X3(e){let t=0,n=0;for(;n<e.length;){if(e[n]==="\\"){n+=2;continue}if(e[n]==="["){for(n++;n<e.length&&e[n]!=="]";)e[n]==="\\"&&n++,n++;n++;continue}if(e[n]==="(")if(n+1<e.length&&e[n+1]==="?"){if(n+2<e.length){let r=e[n+2];if(r===":"||r==="="||r==="!"){n++;continue}if(r==="<"&&n+3<e.length){let s=e[n+3];if(s==="="||s==="!"){n++;continue}t++,n++;continue}}}else t++;n++}return t}function yl(e){let t=e.replace(/\$\{0\}|\$0(?![0-9])/g,"$$&");return t=t.replace(/\$\{([^0-9}][^}]*)\}/g,"$$<$1>"),t=t.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)(?![>0-9])/g,"$$<$1>"),t}function Y3(e){let t="",n=0,r=!0,s=0;for(;n<e.length;){let i=e[n];if(i==="["){for(t+=i,n++,n<e.length&&(e[n]==="^"||e[n]==="!")&&(t+=e[n],n++),n<e.length&&e[n]==="]"&&(t+=e[n],n++);n<e.length&&e[n]!=="]";)e[n]==="\\"&&n+1<e.length?(t+=e[n]+e[n+1],n+=2):(t+=e[n],n++);n<e.length&&e[n]==="]"&&(t+=e[n],n++),r=!1;continue}if(i==="\\"&&n+1<e.length){let o=e[n+1];if(o==="|"){t+="|",n+=2,r=!0;continue}if(o==="("){t+="(",n+=2,s++,r=!0;continue}if(o===")"){t+=")",n+=2,s=Math.max(0,s-1),r=!1;continue}if(o==="{"){let l=e.slice(n).match(/^\\{(\d+)(,(\d*)?)?\\}/);if(l){let c=l[1],u=l[2]!==void 0,f=l[3]||"";u?t+=`{${c},${f}}`:t+=`{${c}}`,n+=l[0].length,r=!1;continue}t+="\\{",n+=2,r=!1;continue}if(o==="}"){t+="\\}",n+=2,r=!1;continue}t+=i+o,n+=2,r=!1;continue}if(i==="*"&&r){t+="\\*",n++;continue}if(i==="^"){if(r){t+="^",n++;continue}t+="\\^",n++;continue}if(i==="$"){let o=n===e.length-1,a=n+2<e.length&&e[n+1]==="\\"&&e[n+2]===")";o||a?t+="$":t+="\\$",n++,r=!1;continue}i==="+"||i==="?"||i==="|"||i==="("||i===")"||i==="{"||i==="}"?t+=`\\${i}`:t+=i,n++,r=!1}return t}var U3,op=k(()=>{"use strict";Ze();U3=new Map([["alpha","a-zA-Z"],["digit","0-9"],["alnum","a-zA-Z0-9"],["lower","a-z"],["upper","A-Z"],["xdigit","0-9A-Fa-f"],["space"," \\t\\n\\r\\f\\v"],["blank"," \\t"],["punct","!-/:-@\\[-`{-~"],["graph","!-~"],["print"," -~"],["cntrl","\\x00-\\x1F\\x7F"],["ascii","\\x00-\\x7F"],["word","a-zA-Z0-9_"]])});var wl=k(()=>{"use strict";sp();op()});var Yi={};ee(Yi,{egrepCommand:()=>n8,egrepFlagsForFuzzing:()=>i8,fgrepCommand:()=>t8,fgrepFlagsForFuzzing:()=>s8,flagsForFuzzing:()=>r8,grepCommand:()=>bl});async function lp(e,t,n,r,s=0){if(s>=ap)return;let i=n.fs.resolvePath(n.cwd,e);try{if(!(await n.fs.stat(i)).isDirectory){let l=e.split("/").pop()||"";if(t){let c=t.replace(/^\//,"");Dt(l,c,{stripQuotes:!0})&&r.push(e)}return}let a=await n.fs.readdir(i);for(let l of a){let c=e==="."?l:`${e}/${l}`,u=n.fs.resolvePath(n.cwd,c);if((await n.fs.stat(u)).isDirectory)await lp(c,t,n,r,s+1);else if(t){let p=t.replace(/^\//,"");Dt(l,p,{stripQuotes:!0})&&r.push(c)}}}catch{}}async function e8(e,t){let n=[],r=e.lastIndexOf("/"),s,i;if(r===-1?(s=t.cwd,i=e):(s=e.slice(0,r)||"/",i=e.slice(r+1)),e.includes("**")){let a=[],l=e.split("**"),c=l[0].replace(/\/$/,"")||".",u=l[1]||"";return await lp(c,u,t,a),a.map(f=>({path:f}))}let o=t.fs.resolvePath(t.cwd,s);try{if(t.fs.readdirWithFileTypes){let a=await t.fs.readdirWithFileTypes(o);for(let l of a)if(Dt(l.name,i,{stripQuotes:!0})){let c=r===-1?l.name:`${s}/${l.name}`;n.push({path:c,isFile:l.isFile})}}else{let a=await t.fs.readdir(o);for(let l of a)if(Dt(l,i,{stripQuotes:!0})){let c=r===-1?l:`${s}/${l}`;n.push({path:c})}}}catch{}return n.sort((a,l)=>a.path.localeCompare(l.path))}async function Xi(e,t,n=[],r=[],s=[],i,o=0){if(o>=ap)return[];let a=t.fs.resolvePath(t.cwd,e),l=[];try{let c,u;if(i!==void 0)c=i,u=!i;else{let p=await t.fs.stat(a);c=p.isFile,u=p.isDirectory}if(c){let p=e.split("/").pop()||e;return r.length>0&&r.some(h=>Dt(p,h,{stripQuotes:!0}))?[]:n.length>0&&!n.some(h=>Dt(p,h,{stripQuotes:!0}))?[]:[{path:e,isFile:!0}]}if(!u)return[];let f=e.split("/").pop()||e;if(s.length>0&&s.some(p=>Dt(f,p,{stripQuotes:!0})))return[];if(t.fs.readdirWithFileTypes){let p=await t.fs.readdirWithFileTypes(a);for(let h of p){if(h.name.startsWith("."))continue;let d=e==="."?h.name:`${e}/${h.name}`,m=await Xi(d,t,n,r,s,h.isFile,o+1);l.push(...m)}}else{let p=await t.fs.readdir(a);for(let h of p){if(h.startsWith("."))continue;let d=e==="."?h:`${e}/${h}`,m=await Xi(d,t,n,r,s,void 0,o+1);l.push(...m)}}}catch{}return l}var J3,bl,ap,t8,n8,r8,s8,i8,Ji=k(()=>{"use strict";he();gl();oe();wl();J3={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},bl={name:"grep",async execute(e,t){if(U(e))return M(J3);let n=!1,r=!1,s=!1,i=!1,o=!1,a=!1,l=!1,c=!1,u=!1,f=!1,p=!1,h=!1,d=!1,m=!1,g=!1,y=0,w=0,b=0,x=[],S=[],v=[],$=null,_=[];for(let H=0;H<e.length;H++){let te=e[H];if(te.startsWith("-")&&te!=="-"){if(te==="-e"&&H+1<e.length){$=e[++H];continue}if(te.startsWith("--include=")){x.push(te.slice(10));continue}if(te.startsWith("--exclude=")){S.push(te.slice(10));continue}if(te.startsWith("--exclude-dir=")){v.push(te.slice(14));continue}if(te.startsWith("--max-count=")){y=parseInt(te.slice(12),10);continue}let ve=te.match(/^-m(\d+)$/);if(ve){y=parseInt(ve[1],10);continue}if(te==="-m"&&H+1<e.length){y=parseInt(e[++H],10);continue}let ie=te.match(/^-([ABC])(\d+)$/);if(ie){let j=parseInt(ie[2],10);ie[1]==="A"?b=j:ie[1]==="B"?w=j:ie[1]==="C"&&(w=j,b=j);continue}if((te==="-A"||te==="-B"||te==="-C")&&H+1<e.length){let j=parseInt(e[++H],10);te==="-A"?b=j:te==="-B"?w=j:(w=j,b=j);continue}let Pe=te.startsWith("--")?[te]:te.slice(1).split("");for(let j of Pe)if(j==="i"||j==="--ignore-case")n=!0;else if(j==="n"||j==="--line-number")r=!0;else if(j==="v"||j==="--invert-match")s=!0;else if(j==="c"||j==="--count")i=!0;else if(j==="l"||j==="--files-with-matches")o=!0;else if(j==="L"||j==="--files-without-match")a=!0;else if(j==="r"||j==="R"||j==="--recursive")l=!0;else if(j==="w"||j==="--word-regexp")c=!0;else if(j==="x"||j==="--line-regexp")u=!0;else if(j==="E"||j==="--extended-regexp")f=!0;else if(j==="P"||j==="--perl-regexp")p=!0;else if(j==="F"||j==="--fixed-strings")h=!0;else if(j==="o"||j==="--only-matching")d=!0;else if(j==="h"||j==="--no-filename")m=!0;else if(j==="q"||j==="--quiet"||j==="--silent")g=!0;else{if(j.startsWith("--"))return K("grep",j);if(j.length===1)return K("grep",`-${j}`)}}else $===null?$=te:_.push(te)}if($===null)return{stdout:"",stderr:`grep: missing pattern
196
- `,exitCode:2};let R=h?"fixed":f?"extended":p?"perl":"basic",P,C,T;try{let H=Js($,{mode:R,ignoreCase:n,wholeWord:c,lineRegexp:u});P=H.regex,C=H.kResetGroup,T=H.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${$}
197
- `,exitCode:2}}if(_.length===0&&t.stdin!==void 0){let H=us(se(t.stdin),P,{invertMatch:s,showLineNumbers:r,countOnly:i,filename:"",onlyMatching:d,beforeContext:w,afterContext:b,maxCount:y,kResetGroup:C,preFilter:T});return g?{stdout:"",stderr:"",exitCode:H.matched?0:1}:{stdout:H.output,stderr:"",exitCode:H.matched?0:1}}if(_.length===0)return{stdout:"",stderr:`grep: no input files
198
- `,exitCode:2};let O="",I="",L=!1,B=!1,Z=[];for(let H of _)if(H.includes("*")||H.includes("?")||H.includes("[")){let te=await e8(H,t);if(l)for(let ve of te){let ie=await Xi(ve.path,t,x,S,v,ve.isFile);Z.push(...ie)}else Z.push(...te)}else if(l){let te=await Xi(H,t,x,S,v);Z.push(...te)}else Z.push({path:H});let ae=(Z.length>1||l)&&!m,ye=50;for(let H=0;H<Z.length;H+=ye){let te=Z.slice(H,H+ye),ve=await Promise.all(te.map(async ie=>{let Pe=ie.path,j=Pe.split("/").pop()||Pe;if(S.length>0&&!l&&S.some(Re=>Dt(j,Re,{stripQuotes:!0}))||x.length>0&&!l&&!x.some(Re=>Dt(j,Re,{stripQuotes:!0})))return null;try{let Re=t.fs.resolvePath(t.cwd,Pe),Qe=!1;if(ie.isFile===void 0?Qe=(await t.fs.stat(Re)).isDirectory:Qe=!ie.isFile,Qe)return l?null:{error:`grep: ${Pe}: Is a directory
195
+ `:s==="t"?t+=" ":s==="r"?t+="\r":s==="f"?t+="\f":s==="v"?t+="\v":t+=s,n++;continue}if(/[.*+?^${}()|[\]]/.test(r))return null;t+=r}return t}function H3(e){let t="",n=0;for(;n<e.length;)if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="Q"){n+=2;let r="";for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="E"){n+=2;break}r+=e[n],n++}t+=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}else t+=e[n],n++;return t}function j3(e){return e.replace(/\\x\{([0-9A-Fa-f]+)\}/g,"\\u{$1}")}function G3(e){let t="",n=0;for(;n<e.length;){if(e[n]==="("&&n+1<e.length&&e[n+1]==="?"){let r=e.slice(n).match(/^\(\?([imsx]*)(-[imsx]*)?(:|$|\))/);if(r){let s=r[1]||"",i=r[2]||"",o=r[3];if(o===":"){let a=n+r[0].length-1,l=V3(e,n);if(l!==-1){let c=e.slice(a+1,l),u=q3(c,s,i);t+=`(?:${u})`,n=l+1;continue}}else if(o===")"||o===""){n+=r[0].length;continue}}}t+=e[n],n++}return t}function V3(e,t){let n=0,r=t;for(;r<e.length;){if(e[r]==="\\"){r+=2;continue}if(e[r]==="["){for(r++;r<e.length&&e[r]!=="]";)e[r]==="\\"&&r++,r++;r++;continue}if(e[r]==="(")n++;else if(e[r]===")"&&(n--,n===0))return r;r++}return-1}function q3(e,t,n){let r=e;return t.includes("i")&&(r=Z3(r)),r}function Z3(e){let t="",n=0;for(;n<e.length;){let r=e[n];if(r==="\\"){n+1<e.length?(t+=r+e[n+1],n+=2):(t+=r,n++);continue}if(r==="["){t+=r,n++,n<e.length&&e[n]==="^"&&(t+=e[n],n++);let s=[];for(;n<e.length&&e[n]!=="]";)if(e[n]==="\\")s.push(e[n]),n++,n<e.length&&(s.push(e[n]),n++);else if(e[n]==="-"&&s.length>0&&n+1<e.length&&e[n+1]!=="]"){let i=s[s.length-1],o=e[n+1];s.push("-"),s.push(o),/[a-z]/.test(i)&&/[a-z]/.test(o)?(s.push(i.toUpperCase()),s.push("-"),s.push(o.toUpperCase())):/[A-Z]/.test(i)&&/[A-Z]/.test(o)&&(s.push(i.toLowerCase()),s.push("-"),s.push(o.toLowerCase())),n+=2}else{let i=e[n];if(s.push(i),/[a-zA-Z]/.test(i)){let o=i===i.toLowerCase()?i.toUpperCase():i.toLowerCase();s.includes(o)||s.push(o)}n++}t+=s.join(""),n<e.length&&(t+=e[n],n++);continue}if(/[a-zA-Z]/.test(r)){let s=r.toLowerCase(),i=r.toUpperCase();t+=`[${i}${s}]`}else t+=r;n++}return t}function K3(e){let t=Q3(e);if(t===-1)return{pattern:e};let n=e.slice(0,t),r=e.slice(t+2),s=X3(n);return{pattern:`(?:${n})(${r})`,kResetGroup:s+1}}function Q3(e){let t=0;for(;t<e.length-1;)if(e[t]==="\\"){if(e[t+1]==="K"){let n=0,r=t-1;for(;r>=0&&e[r]==="\\";)n++,r--;if(n%2===0)return t}t+=2}else t++;return-1}function X3(e){let t=0,n=0;for(;n<e.length;){if(e[n]==="\\"){n+=2;continue}if(e[n]==="["){for(n++;n<e.length&&e[n]!=="]";)e[n]==="\\"&&n++,n++;n++;continue}if(e[n]==="(")if(n+1<e.length&&e[n+1]==="?"){if(n+2<e.length){let r=e[n+2];if(r===":"||r==="="||r==="!"){n++;continue}if(r==="<"&&n+3<e.length){let s=e[n+3];if(s==="="||s==="!"){n++;continue}t++,n++;continue}}}else t++;n++}return t}function yl(e){let t=e.replace(/\$\{0\}|\$0(?![0-9])/g,"$$&");return t=t.replace(/\$\{([^0-9}][^}]*)\}/g,"$$<$1>"),t=t.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)(?![>0-9])/g,"$$<$1>"),t}function Y3(e){let t="",n=0,r=!0,s=0;for(;n<e.length;){let i=e[n];if(i==="["){for(t+=i,n++,n<e.length&&(e[n]==="^"||e[n]==="!")&&(t+=e[n],n++),n<e.length&&e[n]==="]"&&(t+=e[n],n++);n<e.length&&e[n]!=="]";)e[n]==="\\"&&n+1<e.length?(t+=e[n]+e[n+1],n+=2):(t+=e[n],n++);n<e.length&&e[n]==="]"&&(t+=e[n],n++),r=!1;continue}if(i==="\\"&&n+1<e.length){let o=e[n+1];if(o==="|"){t+="|",n+=2,r=!0;continue}if(o==="("){t+="(",n+=2,s++,r=!0;continue}if(o===")"){t+=")",n+=2,s=Math.max(0,s-1),r=!1;continue}if(o==="{"){let l=e.slice(n).match(/^\\{(\d+)(,(\d*)?)?\\}/);if(l){let c=l[1],u=l[2]!==void 0,f=l[3]||"";u?t+=`{${c},${f}}`:t+=`{${c}}`,n+=l[0].length,r=!1;continue}t+="\\{",n+=2,r=!1;continue}if(o==="}"){t+="\\}",n+=2,r=!1;continue}t+=i+o,n+=2,r=!1;continue}if(i==="*"&&r){t+="\\*",n++;continue}if(i==="^"){if(r){t+="^",n++;continue}t+="\\^",n++;continue}if(i==="$"){let o=n===e.length-1,a=n+2<e.length&&e[n+1]==="\\"&&e[n+2]===")";o||a?t+="$":t+="\\$",n++,r=!1;continue}i==="+"||i==="?"||i==="|"||i==="("||i===")"||i==="{"||i==="}"?t+=`\\${i}`:t+=i,n++,r=!1}return t}var U3,op=k(()=>{"use strict";Ze();U3=new Map([["alpha","a-zA-Z"],["digit","0-9"],["alnum","a-zA-Z0-9"],["lower","a-z"],["upper","A-Z"],["xdigit","0-9A-Fa-f"],["space"," \\t\\n\\r\\f\\v"],["blank"," \\t"],["punct","!-/:-@\\[-`{-~"],["graph","!-~"],["print"," -~"],["cntrl","\\x00-\\x1F\\x7F"],["ascii","\\x00-\\x7F"],["word","a-zA-Z0-9_"]])});var wl=k(()=>{"use strict";sp();op()});var Yi={};ee(Yi,{egrepCommand:()=>n8,egrepFlagsForFuzzing:()=>i8,fgrepCommand:()=>t8,fgrepFlagsForFuzzing:()=>s8,flagsForFuzzing:()=>r8,grepCommand:()=>bl});async function lp(e,t,n,r,s=0){if(s>=ap)return;let i=n.fs.resolvePath(n.cwd,e);try{if(!(await n.fs.stat(i)).isDirectory){let l=e.split("/").pop()||"";if(t){let c=t.replace(/^\//,"");Dt(l,c,{stripQuotes:!0})&&r.push(e)}return}let a=await n.fs.readdir(i);for(let l of a){let c=e==="."?l:`${e}/${l}`,u=n.fs.resolvePath(n.cwd,c);if((await n.fs.stat(u)).isDirectory)await lp(c,t,n,r,s+1);else if(t){let p=t.replace(/^\//,"");Dt(l,p,{stripQuotes:!0})&&r.push(c)}}}catch{}}async function e8(e,t){let n=[],r=e.lastIndexOf("/"),s,i;if(r===-1?(s=t.cwd,i=e):(s=e.slice(0,r)||"/",i=e.slice(r+1)),e.includes("**")){let a=[],l=e.split("**"),c=l[0].replace(/\/$/,"")||".",u=l[1]||"";return await lp(c,u,t,a),a.map(f=>({path:f}))}let o=t.fs.resolvePath(t.cwd,s);try{if(t.fs.readdirWithFileTypes){let a=await t.fs.readdirWithFileTypes(o);for(let l of a)if(Dt(l.name,i,{stripQuotes:!0})){let c=r===-1?l.name:`${s}/${l.name}`;n.push({path:c,isFile:l.isFile})}}else{let a=await t.fs.readdir(o);for(let l of a)if(Dt(l,i,{stripQuotes:!0})){let c=r===-1?l:`${s}/${l}`;n.push({path:c})}}}catch{}return n.sort((a,l)=>a.path.localeCompare(l.path))}async function Xi(e,t,n=[],r=[],s=[],i,o=0){if(o>=ap)return[];let a=t.fs.resolvePath(t.cwd,e),l=[];try{let c,u;if(i!==void 0)c=i,u=!i;else{let p=await t.fs.stat(a);c=p.isFile,u=p.isDirectory}if(c){let p=e.split("/").pop()||e;return r.length>0&&r.some(h=>Dt(p,h,{stripQuotes:!0}))?[]:n.length>0&&!n.some(h=>Dt(p,h,{stripQuotes:!0}))?[]:[{path:e,isFile:!0}]}if(!u)return[];let f=e.split("/").pop()||e;if(s.length>0&&s.some(p=>Dt(f,p,{stripQuotes:!0})))return[];if(t.fs.readdirWithFileTypes){let p=await t.fs.readdirWithFileTypes(a);for(let h of p){if(h.name.startsWith("."))continue;let d=e==="."?h.name:`${e}/${h.name}`,m=await Xi(d,t,n,r,s,h.isFile,o+1);l.push(...m)}}else{let p=await t.fs.readdir(a);for(let h of p){if(h.startsWith("."))continue;let d=e==="."?h:`${e}/${h}`,m=await Xi(d,t,n,r,s,void 0,o+1);l.push(...m)}}}catch{}return l}var J3,bl,ap,t8,n8,r8,s8,i8,Ji=k(()=>{"use strict";he();gl();oe();wl();J3={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},bl={name:"grep",async execute(e,t){if(U(e))return M(J3);let n=!1,r=!1,s=!1,i=!1,o=!1,a=!1,l=!1,c=!1,u=!1,f=!1,p=!1,h=!1,d=!1,m=!1,g=!1,y=0,w=0,b=0,x=[],S=[],v=[],$=null,D=[];for(let H=0;H<e.length;H++){let te=e[H];if(te.startsWith("-")&&te!=="-"){if(te==="-e"&&H+1<e.length){$=e[++H];continue}if(te.startsWith("--include=")){x.push(te.slice(10));continue}if(te.startsWith("--exclude=")){S.push(te.slice(10));continue}if(te.startsWith("--exclude-dir=")){v.push(te.slice(14));continue}if(te.startsWith("--max-count=")){y=parseInt(te.slice(12),10);continue}let ve=te.match(/^-m(\d+)$/);if(ve){y=parseInt(ve[1],10);continue}if(te==="-m"&&H+1<e.length){y=parseInt(e[++H],10);continue}let ie=te.match(/^-([ABC])(\d+)$/);if(ie){let j=parseInt(ie[2],10);ie[1]==="A"?b=j:ie[1]==="B"?w=j:ie[1]==="C"&&(w=j,b=j);continue}if((te==="-A"||te==="-B"||te==="-C")&&H+1<e.length){let j=parseInt(e[++H],10);te==="-A"?b=j:te==="-B"?w=j:(w=j,b=j);continue}let Pe=te.startsWith("--")?[te]:te.slice(1).split("");for(let j of Pe)if(j==="i"||j==="--ignore-case")n=!0;else if(j==="n"||j==="--line-number")r=!0;else if(j==="v"||j==="--invert-match")s=!0;else if(j==="c"||j==="--count")i=!0;else if(j==="l"||j==="--files-with-matches")o=!0;else if(j==="L"||j==="--files-without-match")a=!0;else if(j==="r"||j==="R"||j==="--recursive")l=!0;else if(j==="w"||j==="--word-regexp")c=!0;else if(j==="x"||j==="--line-regexp")u=!0;else if(j==="E"||j==="--extended-regexp")f=!0;else if(j==="P"||j==="--perl-regexp")p=!0;else if(j==="F"||j==="--fixed-strings")h=!0;else if(j==="o"||j==="--only-matching")d=!0;else if(j==="h"||j==="--no-filename")m=!0;else if(j==="q"||j==="--quiet"||j==="--silent")g=!0;else{if(j.startsWith("--"))return K("grep",j);if(j.length===1)return K("grep",`-${j}`)}}else $===null?$=te:D.push(te)}if($===null)return{stdout:"",stderr:`grep: missing pattern
196
+ `,exitCode:2};let O=h?"fixed":f?"extended":p?"perl":"basic",P,C,T;try{let H=Js($,{mode:O,ignoreCase:n,wholeWord:c,lineRegexp:u});P=H.regex,C=H.kResetGroup,T=H.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${$}
197
+ `,exitCode:2}}if(D.length===0&&t.stdin!==void 0){let H=us(se(t.stdin),P,{invertMatch:s,showLineNumbers:r,countOnly:i,filename:"",onlyMatching:d,beforeContext:w,afterContext:b,maxCount:y,kResetGroup:C,preFilter:T});return g?{stdout:"",stderr:"",exitCode:H.matched?0:1}:{stdout:H.output,stderr:"",exitCode:H.matched?0:1}}if(D.length===0)return{stdout:"",stderr:`grep: no input files
198
+ `,exitCode:2};let R="",I="",L=!1,B=!1,Z=[];for(let H of D)if(H.includes("*")||H.includes("?")||H.includes("[")){let te=await e8(H,t);if(l)for(let ve of te){let ie=await Xi(ve.path,t,x,S,v,ve.isFile);Z.push(...ie)}else Z.push(...te)}else if(l){let te=await Xi(H,t,x,S,v);Z.push(...te)}else Z.push({path:H});let ae=(Z.length>1||l)&&!m,ye=50;for(let H=0;H<Z.length;H+=ye){let te=Z.slice(H,H+ye),ve=await Promise.all(te.map(async ie=>{let Pe=ie.path,j=Pe.split("/").pop()||Pe;if(S.length>0&&!l&&S.some(Re=>Dt(j,Re,{stripQuotes:!0}))||x.length>0&&!l&&!x.some(Re=>Dt(j,Re,{stripQuotes:!0})))return null;try{let Re=t.fs.resolvePath(t.cwd,Pe),Qe=!1;if(ie.isFile===void 0?Qe=(await t.fs.stat(Re)).isDirectory:Qe=!ie.isFile,Qe)return l?null:{error:`grep: ${Pe}: Is a directory
199
199
  `};let pt=await t.fs.readFile(Re),ht=us(pt,P,{invertMatch:s,showLineNumbers:r,countOnly:i,filename:ae?Pe:"",onlyMatching:d,beforeContext:w,afterContext:b,maxCount:y,kResetGroup:C,preFilter:T});return{file:Pe,result:ht}}catch{return{error:`grep: ${Pe}: No such file or directory
200
- `}}}));for(let ie of ve){if(ie===null)continue;if("error"in ie&&ie.error){I+=ie.error,ie.error.includes("Is a directory")||(B=!0);continue}if(!("file"in ie)||!ie.result)continue;let{file:Pe,result:j}=ie;if(j.matched){if(L=!0,g)return{stdout:"",stderr:"",exitCode:0};o?O+=`${Pe}
201
- `:a||(O+=j.output)}else a?O+=`${Pe}
202
- `:i&&!o&&(O+=j.output)}}let q;return B?q=2:a?q=O.length>0?0:1:q=L?0:1,g?{stdout:"",stderr:"",exitCode:q}:{stdout:O,stderr:I,exitCode:q}}},ap=256;t8={name:"fgrep",async execute(e,t){return bl.execute(["-F",...e],t)}},n8={name:"egrep",async execute(e,t){return bl.execute(["-E",...e],t)}},r8={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"}],stdinType:"text",needsArgs:!0},s8={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},i8={name:"egrep",flags:[],stdinType:"text",needsArgs:!0}});function up(e,t){if(Array.isArray(e))throw new TypeError(`${t}: expected object, got array`);if(Object.getPrototypeOf(e)!==null)throw new TypeError(`${t}: expected null-prototype object, got prototypal object`)}function _e(e){return!cp.has(e)}function ze(e,t,n){up(e,"safeSet"),_e(t)&&(e[t]=n)}function Wn(e,t){return up(e,"safeHasOwn"),Object.hasOwn(e,t)}function fs(e){let t=new WeakMap,n=r=>{if(r===null||typeof r!="object"||r instanceof Date)return r;let s=t.get(r);if(s!==void 0)return s;if(Array.isArray(r)){let o=[];t.set(r,o);for(let a of r)o.push(n(a));return o}let i=Object.create(null);t.set(r,i);for(let o of Object.keys(r))i[o]=n(r[o]);return i};return n(e)}function Ge(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function fp(e){return Object.assign(Object.create(null),e)}function wt(e){return Object.assign(Object.create(null),e)}function xl(...e){return Object.assign(Object.create(null),...e)}var cp,RN,Sn=k(()=>{"use strict";cp=new Set(["__proto__","constructor","prototype"]),RN=new Set([...cp,"__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])});function hp(){let e=[];for(let[t,n]of Object.entries(pp).sort()){let r=[];for(let s of n.extensions)r.push(`*${s}`);for(let s of n.globs)r.push(s);e.push(`${t}: ${r.join(", ")}`)}return`${e.join(`
200
+ `}}}));for(let ie of ve){if(ie===null)continue;if("error"in ie&&ie.error){I+=ie.error,ie.error.includes("Is a directory")||(B=!0);continue}if(!("file"in ie)||!ie.result)continue;let{file:Pe,result:j}=ie;if(j.matched){if(L=!0,g)return{stdout:"",stderr:"",exitCode:0};o?R+=`${Pe}
201
+ `:a||(R+=j.output)}else a?R+=`${Pe}
202
+ `:i&&!o&&(R+=j.output)}}let q;return B?q=2:a?q=R.length>0?0:1:q=L?0:1,g?{stdout:"",stderr:"",exitCode:q}:{stdout:R,stderr:I,exitCode:q}}},ap=256;t8={name:"fgrep",async execute(e,t){return bl.execute(["-F",...e],t)}},n8={name:"egrep",async execute(e,t){return bl.execute(["-E",...e],t)}},r8={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"}],stdinType:"text",needsArgs:!0},s8={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},i8={name:"egrep",flags:[],stdinType:"text",needsArgs:!0}});function up(e,t){if(Array.isArray(e))throw new TypeError(`${t}: expected object, got array`);if(Object.getPrototypeOf(e)!==null)throw new TypeError(`${t}: expected null-prototype object, got prototypal object`)}function _e(e){return!cp.has(e)}function ze(e,t,n){up(e,"safeSet"),_e(t)&&(e[t]=n)}function Wn(e,t){return up(e,"safeHasOwn"),Object.hasOwn(e,t)}function fs(e){let t=new WeakMap,n=r=>{if(r===null||typeof r!="object"||r instanceof Date)return r;let s=t.get(r);if(s!==void 0)return s;if(Array.isArray(r)){let o=[];t.set(r,o);for(let a of r)o.push(n(a));return o}let i=Object.create(null);t.set(r,i);for(let o of Object.keys(r))i[o]=n(r[o]);return i};return n(e)}function Ge(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function fp(e){return Object.assign(Object.create(null),e)}function wt(e){return Object.assign(Object.create(null),e)}function xl(...e){return Object.assign(Object.create(null),...e)}var cp,RN,Sn=k(()=>{"use strict";cp=new Set(["__proto__","constructor","prototype"]),RN=new Set([...cp,"__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])});function hp(){let e=[];for(let[t,n]of Object.entries(pp).sort()){let r=[];for(let s of n.extensions)r.push(`*${s}`);for(let s of n.globs)r.push(s);e.push(`${t}: ${r.join(", ")}`)}return`${e.join(`
203
203
  `)}
204
204
  `}var pp,ei,El=k(()=>{"use strict";Ze();Sn();pp=fp({js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}}),ei=class{types;constructor(){this.types=new Map(Object.entries(pp).map(([t,n])=>[t,{extensions:[...n.extensions],globs:[...n.globs]}]))}addType(t){let n=t.indexOf(":");if(n===-1)return;let r=t.slice(0,n),s=t.slice(n+1);if(s.startsWith("include:")){let i=s.slice(8),o=this.types.get(i);if(o){let a=this.types.get(r)||{extensions:[],globs:[]};a.extensions.push(...o.extensions),a.globs.push(...o.globs),this.types.set(r,a)}}else{let i=this.types.get(r)||{extensions:[],globs:[]};if(s.startsWith("*.")&&!s.slice(2).includes("*")){let o=s.slice(1);i.extensions.includes(o)||i.extensions.push(o)}else i.globs.includes(s)||i.globs.push(s);this.types.set(r,i)}}clearType(t){let n=this.types.get(t);n&&(n.extensions=[],n.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,n){let r=t.toLowerCase();for(let s of n){if(s==="all"){if(this.matchesAnyType(t))return!0;continue}let i=this.types.get(s);if(i){for(let o of i.extensions)if(r.endsWith(o))return!0;for(let o of i.globs)if(o.includes("*")){let a=o.replace(/\./g,"\\.").replace(/\*/g,".*");if(Q(`^${a}$`,"i").test(t))return!0}else if(r===o.toLowerCase())return!0}}return!1}matchesAnyType(t){let n=t.toLowerCase();for(let r of this.types.values()){for(let s of r.extensions)if(n.endsWith(s))return!0;for(let s of r.globs)if(s.includes("*")){let i=s.replace(/\./g,"\\.").replace(/\*/g,".*");if(Q(`^${i}$`,"i").test(t))return!0}else if(n===s.toLowerCase())return!0}return!1}}});function dp(){return{ignoreCase:!1,caseSensitive:!1,smartCase:!0,fixedStrings:!1,wordRegexp:!1,lineRegexp:!1,invertMatch:!1,multiline:!1,multilineDotall:!1,patterns:[],patternFiles:[],count:!1,countMatches:!1,files:!1,filesWithMatches:!1,filesWithoutMatch:!1,stats:!1,onlyMatching:!1,maxCount:0,lineNumber:!0,noFilename:!1,withFilename:!1,nullSeparator:!1,byteOffset:!1,column:!1,vimgrep:!1,replace:null,afterContext:0,beforeContext:0,contextSeparator:"--",quiet:!1,heading:!1,passthru:!1,includeZero:!1,sort:"path",json:!1,globs:[],iglobs:[],globCaseInsensitive:!1,types:[],typesNot:[],typeAdd:[],typeClear:[],hidden:!1,noIgnore:!1,noIgnoreDot:!1,noIgnoreVcs:!1,ignoreFiles:[],maxDepth:256,maxFilesize:0,followSymlinks:!1,searchZip:!1,searchBinary:!1,preprocessor:null,preprocessorGlobs:[]}}var mp=k(()=>{"use strict"});function o8(e){let t=e.match(/^(\d+)([KMG])?$/i);if(!t)return 0;let n=parseInt(t[1],10);switch((t[2]||"").toUpperCase()){case"K":return n*1024;case"M":return n*1024*1024;case"G":return n*1024*1024*1024;default:return n}}function a8(e){return/^\d+[KMG]?$/i.test(e)?null:{stdout:"",stderr:`rg: invalid --max-filesize value: ${e}
205
205
  `,exitCode:1}}function gp(e){return null}function u8(e){e.hidden?e.searchBinary=!0:e.noIgnore?e.hidden=!0:e.noIgnore=!0}function f8(e,t,n){let r=e[t];for(let s of yp){if(r.startsWith(`--${s.long}=`)){let i=r.slice(`--${s.long}=`.length),o=eo(n,s,i);return o?{newIndex:t,error:o}:{newIndex:t}}if(s.short&&r.startsWith(`-${s.short}`)&&r.length>2){let i=r.slice(2),o=eo(n,s,i);return o?{newIndex:t,error:o}:{newIndex:t}}if(s.short&&r===`-${s.short}`||r===`--${s.long}`){if(t+1>=e.length)return null;let i=e[t+1],o=eo(n,s,i);return o?{newIndex:t+1,error:o}:{newIndex:t+1}}}return null}function p8(e){return yp.find(t=>t.short===e)}function eo(e,t,n){if(t.validate){let s=t.validate(n);if(s)return s}if(t.ignored||!t.target)return;let r=t.parse?t.parse(n):n;t.multi?e[t.target].push(r):e[t.target]=r}function h8(e,t){let n=e[t];if(n==="--sort"&&t+1<e.length){let r=e[t+1];if(r==="path"||r==="none")return{value:r,newIndex:t+1}}if(n.startsWith("--sort=")){let r=n.slice(7);if(r==="path"||r==="none")return{value:r,newIndex:t}}return null}function d8(e,t){let n=e[t],r=n.match(/^-([ABC])(\d+)$/);return r?{flag:r[1],value:parseInt(r[2],10),newIndex:t}:(n==="-A"||n==="-B"||n==="-C")&&t+1<e.length?{flag:n[1],value:parseInt(e[t+1],10),newIndex:t+1}:null}function m8(e){let t=e.match(/^-m(\d+)$/);return t?parseInt(t[1],10):null}function wp(e){let t=dp(),n=null,r=[],s=-1,i=-1,o=-1,a=!1;for(let l=0;l<e.length;l++){let c=e[l];if(c.startsWith("-")&&c!=="-"){let u=d8(e,l);if(u){let{flag:g,value:y,newIndex:w}=u;g==="A"?s=Math.max(s,y):g==="B"?i=Math.max(i,y):o=y,l=w;continue}let f=m8(c);if(f!==null){t.maxCount=f;continue}let p=f8(e,l,t);if(p){if(p.error)return{success:!1,error:p.error};l=p.newIndex;continue}let h=h8(e,l);if(h){t.sort=h.value,l=h.newIndex;continue}let d=c.startsWith("--")?[c]:c.slice(1).split(""),m=!1;for(let g of d){if(c8.has(g)){t.lineNumber=!0,a=!0;continue}if(g==="u"||g==="--unrestricted"){u8(t);continue}if(g==="P"||g==="--pcre2")return{success:!1,error:{stdout:"",stderr:`rg: PCRE2 is not supported. Use standard regex syntax instead.
@@ -210,9 +210,9 @@ Options:
210
210
  `,exitCode:2}}if(i.length===0)return n.patternFiles.length>0?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`rg: no pattern given
211
211
  `,exitCode:2};let o=r.length===0?["."]:r,a=x8(n,i),l,c;try{let g=E8(i,n,a);l=g.regex,c=g.kResetGroup}catch{return{stdout:"",stderr:`rg: invalid regex: ${i.join(", ")}
212
212
  `,exitCode:2}}let u=null;n.noIgnore||(u=await Al(t.fs,t.cwd,n.noIgnoreDot,n.noIgnoreVcs,n.ignoreFiles));let f=new ei;for(let g of n.typeClear)f.clearType(g);for(let g of n.typeAdd)f.addType(g);let{files:p,singleExplicitFile:h}=await Ap(t,o,n,u,f);if(p.length===0)return{stdout:"",stderr:"",exitCode:1};let d=!n.noFilename&&(n.withFilename||!h||p.length>1),m=n.lineNumber;return s||(h&&p.length===1&&(m=!1),n.onlyMatching&&(m=!1)),v8(t,p,l,n,d,m,c)}function x8(e,t){return e.caseSensitive?!1:e.ignoreCase?!0:e.smartCase?!t.some(n=>/[A-Z]/.test(n)):!1}function E8(e,t,n){let r;return e.length===1?r=e[0]:r=e.map(s=>t.fixedStrings?s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):`(?:${s})`).join("|"),Js(r,{mode:t.fixedStrings&&e.length===1?"fixed":"perl",ignoreCase:n,wholeWord:t.wordRegexp,lineRegexp:t.lineRegexp,multiline:t.multiline,multilineDotall:t.multilineDotall})}async function Ap(e,t,n,r,s){let i=[],o=0,a=0;for(let c of t){let u=e.fs.resolvePath(e.cwd,c);try{let f=await e.fs.stat(u);if(f.isFile){if(o++,n.maxFilesize>0&&f.size>n.maxFilesize)continue;Cp(c,n,r,u,s)&&i.push(c)}else f.isDirectory&&(a++,await Sp(e,c,u,0,n,r,s,i))}catch{}}return{files:n.sort==="path"?i.sort():i,singleExplicitFile:o===1&&a===0}}async function Sp(e,t,n,r,s,i,o,a){if(!(r>=s.maxDepth)){i&&await i.loadForDirectory(n);try{let l=e.fs.readdirWithFileTypes?await e.fs.readdirWithFileTypes(n):(await e.fs.readdir(n)).map(c=>({name:c,isFile:void 0}));for(let c of l){let u=c.name;if(!s.noIgnore&&ni.isCommonIgnored(u))continue;let f=u.startsWith("."),p=t==="."?u:t==="./"?`./${u}`:t.endsWith("/")?`${t}${u}`:`${t}/${u}`,h=e.fs.resolvePath(n,u),d,m,g=!1;if(c.isFile!==void 0&&"isDirectory"in c){let b=c;if(g=b.isSymbolicLink===!0,g&&!s.followSymlinks)continue;if(g&&s.followSymlinks)try{let x=await e.fs.stat(h);d=x.isFile,m=x.isDirectory}catch{continue}else d=b.isFile,m=b.isDirectory}else try{let b=e.fs.lstat?await e.fs.lstat(h):await e.fs.stat(h);if(g=b.isSymbolicLink===!0,g&&!s.followSymlinks)continue;let x=g&&s.followSymlinks?await e.fs.stat(h):b;d=x.isFile,m=x.isDirectory}catch{continue}if(!i?.matches(h,m)&&!(f&&!s.hidden&&!i?.isWhitelisted(h,m))){if(m)await Sp(e,p,h,r+1,s,i,o,a);else if(d){if(s.maxFilesize>0)try{if((await e.fs.stat(h)).size>s.maxFilesize)continue}catch{continue}Cp(p,s,i,h,o)&&a.push(p)}}}}catch{}}}function Cp(e,t,n,r,s){let i=e.split("/").pop()||e;if(n?.matches(r,!1)||t.types.length>0&&!s.matchesType(i,t.types)||t.typesNot.length>0&&s.matchesType(i,t.typesNot))return!1;if(t.globs.length>0){let o=t.globCaseInsensitive,a=t.globs.filter(c=>!c.startsWith("!")),l=t.globs.filter(c=>c.startsWith("!")).map(c=>c.slice(1));if(a.length>0){let c=!1;for(let u of a)if(Cn(i,u,o)||Cn(e,u,o)){c=!0;break}if(!c)return!1}for(let c of l)if(c.startsWith("/")){let u=c.slice(1);if(Cn(e,u,o))return!1}else if(Cn(i,c,o)||Cn(e,c,o))return!1}if(t.iglobs.length>0){let o=t.iglobs.filter(l=>!l.startsWith("!")),a=t.iglobs.filter(l=>l.startsWith("!")).map(l=>l.slice(1));if(o.length>0){let l=!1;for(let c of o)if(Cn(i,c,!0)||Cn(e,c,!0)){l=!0;break}if(!l)return!1}for(let l of a)if(l.startsWith("/")){let c=l.slice(1);if(Cn(e,c,!0))return!1}else if(Cn(i,l,!0)||Cn(e,l,!0))return!1}return!0}function Cn(e,t,n=!1){let r="^";for(let s=0;s<t.length;s++){let i=t[s];if(i==="*")t[s+1]==="*"?(r+=".*",s++):r+="[^/]*";else if(i==="?")r+="[^/]";else if(i==="["){let o=s+1;for(o<t.length&&t[o]==="!"&&o++,o<t.length&&t[o]==="]"&&o++;o<t.length&&t[o]!=="]";)o++;if(o<t.length){let a=t.slice(s,o+1);a.startsWith("[!")&&(a=`[^${a.slice(2)}`),r+=a,s=o}else r+="\\["}else r+=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}return r+="$",Q(r,n?"i":"").test(e)}async function A8(e,t,n){let r=null;n.noIgnore||(r=await Al(e.fs,e.cwd,n.noIgnoreDot,n.noIgnoreVcs,n.ignoreFiles));let s=new ei;for(let c of n.typeClear)s.clearType(c);for(let c of n.typeAdd)s.addType(c);let i=t.length===0?["."]:t,{files:o}=await Ap(e,i,n,r,s);if(o.length===0)return{stdout:"",stderr:"",exitCode:1};if(n.quiet)return{stdout:"",stderr:"",exitCode:0};let a=n.nullSeparator?"\0":`
213
- `;return{stdout:o.map(c=>c+a).join(""),stderr:"",exitCode:0}}function S8(e,t){if(t.length===0)return!0;for(let n of t)if(Cn(e,n,!1))return!0;return!1}async function C8(e,t,n,r){try{if(r.preprocessor&&e.exec){let o=n.split("/").pop()||n;if(S8(o,r.preprocessorGlobs)){let a=await e.exec(sn([r.preprocessor]),{cwd:e.cwd,signal:e.signal,args:[t]});if(a.exitCode===0&&a.stdout){let l=se(a.stdout),c=l.slice(0,8192);return{content:l,isBinary:c.includes("\0")}}}}if(r.searchZip&&n.endsWith(".gz")){let o=await e.fs.readFileBuffer(t);if(w8(o))try{let a=y8(o),l=new TextDecoder().decode(a),c=l.slice(0,8192);return{content:l,isBinary:c.includes("\0")}}catch{return null}}let s=await e.fs.readFile(t),i=s.slice(0,8192);return{content:s,isBinary:i.includes("\0")}}catch{return null}}async function v8(e,t,n,r,s,i,o){let a="",l=!1,c=[],u=0,f=0,p=0,h=50;e:for(let g=0;g<t.length;g+=h){let y=t.slice(g,g+h),w=await Promise.all(y.map(async b=>{let x=e.fs.resolvePath(e.cwd,b),S=await C8(e,x,b,r);if(!S)return null;let{content:v,isBinary:$}=S;if(p+=v.length,$&&!r.searchBinary)return null;let _=s&&!r.heading?b:"",R=us(v,n,{invertMatch:r.invertMatch,showLineNumbers:i,countOnly:r.count,countMatches:r.countMatches,filename:_,onlyMatching:r.onlyMatching,beforeContext:r.beforeContext,afterContext:r.afterContext,maxCount:r.maxCount,contextSeparator:r.contextSeparator,showColumn:r.column,vimgrep:r.vimgrep,showByteOffset:r.byteOffset,replace:r.replace!==null?yl(r.replace):null,passthru:r.passthru,multiline:r.multiline,kResetGroup:o});return r.json&&R.matched?{file:b,result:R,content:v,isBinary:!1}:{file:b,result:R}}));for(let b of w){if(!b)continue;let{file:x,result:S}=b;if(S.matched){if(l=!0,f++,u+=S.matchCount,r.quiet&&!r.json)break e;if(r.json&&!r.quiet){let v=b.content||"";c.push(JSON.stringify({type:"begin",data:{path:{text:x}}}));let $=v.split(`
214
- `);n.lastIndex=0;let _=0;for(let R=0;R<$.length;R++){let P=$[R];n.lastIndex=0;let C=[];for(let T=n.exec(P);T!==null;T=n.exec(P)){let O={match:{text:T[0]},start:T.index,end:T.index+T[0].length};r.replace!==null&&(O.replacement={text:r.replace}),C.push(O),T[0].length===0&&n.lastIndex++}if(C.length>0){let T={type:"match",data:{path:{text:x},lines:{text:`${P}
215
- `},line_number:R+1,absolute_offset:_,submatches:C}};c.push(JSON.stringify(T))}_+=P.length+1}c.push(JSON.stringify({type:"end",data:{path:{text:x},binary_offset:null,stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:1,searches_with_match:1,bytes_searched:v.length,bytes_printed:0,matched_lines:S.matchCount,matches:S.matchCount}}}))}else if(r.filesWithMatches){let v=r.nullSeparator?"\0":`
213
+ `;return{stdout:o.map(c=>c+a).join(""),stderr:"",exitCode:0}}function S8(e,t){if(t.length===0)return!0;for(let n of t)if(Cn(e,n,!1))return!0;return!1}async function C8(e,t,n,r){try{if(r.preprocessor&&e.exec){let o=n.split("/").pop()||n;if(S8(o,r.preprocessorGlobs)){let a=await e.exec(sn([r.preprocessor]),{cwd:e.cwd,signal:e.signal,args:[t]});if(a.exitCode===0&&a.stdout){let l=se(a.stdout),c=l.slice(0,8192);return{content:l,isBinary:c.includes("\0")}}}}if(r.searchZip&&n.endsWith(".gz")){let o=await e.fs.readFileBuffer(t);if(w8(o))try{let a=y8(o),l=new TextDecoder().decode(a),c=l.slice(0,8192);return{content:l,isBinary:c.includes("\0")}}catch{return null}}let s=await e.fs.readFile(t),i=s.slice(0,8192);return{content:s,isBinary:i.includes("\0")}}catch{return null}}async function v8(e,t,n,r,s,i,o){let a="",l=!1,c=[],u=0,f=0,p=0,h=50;e:for(let g=0;g<t.length;g+=h){let y=t.slice(g,g+h),w=await Promise.all(y.map(async b=>{let x=e.fs.resolvePath(e.cwd,b),S=await C8(e,x,b,r);if(!S)return null;let{content:v,isBinary:$}=S;if(p+=v.length,$&&!r.searchBinary)return null;let D=s&&!r.heading?b:"",O=us(v,n,{invertMatch:r.invertMatch,showLineNumbers:i,countOnly:r.count,countMatches:r.countMatches,filename:D,onlyMatching:r.onlyMatching,beforeContext:r.beforeContext,afterContext:r.afterContext,maxCount:r.maxCount,contextSeparator:r.contextSeparator,showColumn:r.column,vimgrep:r.vimgrep,showByteOffset:r.byteOffset,replace:r.replace!==null?yl(r.replace):null,passthru:r.passthru,multiline:r.multiline,kResetGroup:o});return r.json&&O.matched?{file:b,result:O,content:v,isBinary:!1}:{file:b,result:O}}));for(let b of w){if(!b)continue;let{file:x,result:S}=b;if(S.matched){if(l=!0,f++,u+=S.matchCount,r.quiet&&!r.json)break e;if(r.json&&!r.quiet){let v=b.content||"";c.push(JSON.stringify({type:"begin",data:{path:{text:x}}}));let $=v.split(`
214
+ `);n.lastIndex=0;let D=0;for(let O=0;O<$.length;O++){let P=$[O];n.lastIndex=0;let C=[];for(let T=n.exec(P);T!==null;T=n.exec(P)){let R={match:{text:T[0]},start:T.index,end:T.index+T[0].length};r.replace!==null&&(R.replacement={text:r.replace}),C.push(R),T[0].length===0&&n.lastIndex++}if(C.length>0){let T={type:"match",data:{path:{text:x},lines:{text:`${P}
215
+ `},line_number:O+1,absolute_offset:D,submatches:C}};c.push(JSON.stringify(T))}D+=P.length+1}c.push(JSON.stringify({type:"end",data:{path:{text:x},binary_offset:null,stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:1,searches_with_match:1,bytes_searched:v.length,bytes_printed:0,matched_lines:S.matchCount,matches:S.matchCount}}}))}else if(r.filesWithMatches){let v=r.nullSeparator?"\0":`
216
216
  `;a+=`${x}${v}`}else r.filesWithoutMatch||(r.heading&&!r.noFilename&&(a+=`${x}
217
217
  `),a+=S.output)}else if(r.filesWithoutMatch){let v=r.nullSeparator?"\0":`
218
218
  `;a+=`${x}${v}`}else r.includeZero&&(r.count||r.countMatches)&&(a+=S.output)}}r.json&&(c.push(JSON.stringify({type:"summary",data:{elapsed_total:{secs:0,nanos:0,human:"0s"},stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:t.length,searches_with_match:f,bytes_searched:p,bytes_printed:0,matched_lines:u,matches:u}}})),a=`${c.join(`
@@ -274,15 +274,15 @@ ${c}`,t.lineNumber=n.currentLineIndex+t.linesConsumedInCycle+1}else{t.quit=!0;br
274
274
  ${c}`}else s.push(c)}let i=s.join(`
275
275
  `),a=new $l([i],t||r).parse();if(!a.error&&a.commands.length>0){let l=F8(a.commands);if(l)return{commands:[],error:l,silentMode:n,extendedRegexMode:r}}return{...a,silentMode:n,extendedRegexMode:r}}function F8(e){let t=new Set;_p(e,t);let n=Fp(e,t);if(n)return`undefined label '${n}'`}function _p(e,t){for(let n of e)n.type==="label"?t.add(n.name):n.type==="group"&&_p(n.commands,t)}function Fp(e,t){for(let n of e){if((n.type==="branch"||n.type==="branchOnSubst"||n.type==="branchOnNoSubst")&&n.label&&!t.has(n.label))return n.label;if(n.type==="group"){let r=Fp(n.commands,t);if(r)return r}}}var $l,Lp=k(()=>{"use strict";Pp();$l=class{scripts;tokens=[];pos=0;extendedRegex=!1;constructor(t,n=!1){this.scripts=t,this.extendedRegex=n}parse(){let t=[];for(let n of this.scripts){let r=new to(n);for(this.tokens=r.tokenize(),this.pos=0;!this.isAtEnd();){if(this.check(ne.NEWLINE)||this.check(ne.SEMICOLON)){this.advance();continue}let s=this.pos,i=this.parseCommand();if(i.error)return{commands:[],error:i.error};if(i.command&&t.push(i.command),this.pos===s&&!this.isAtEnd())return{commands:[],error:`unknown command: '${this.peek()?.value??this.peek()?.type}'`}}}return{commands:t}}parseCommand(){let t=this.parseAddressRange();if(t?.error)return{command:null,error:t.error};let n=t?.address;for(this.check(ne.NEGATION)&&(this.advance(),n&&(n.negated=!0));this.check(ne.NEWLINE)||this.check(ne.SEMICOLON);)this.advance();if(this.isAtEnd())return n&&(n.start!==void 0||n.end!==void 0)?{command:null,error:"command expected"}:{command:null};let r=this.peek();switch(r.type){case ne.COMMAND:return this.parseSimpleCommand(r,n);case ne.SUBSTITUTE:return this.parseSubstituteFromToken(r,n);case ne.TRANSLITERATE:return this.parseTransliterateFromToken(r,n);case ne.LABEL_DEF:return this.advance(),{command:{type:"label",name:r.label||""}};case ne.BRANCH:return this.advance(),{command:{type:"branch",address:n,label:r.label}};case ne.BRANCH_ON_SUBST:return this.advance(),{command:{type:"branchOnSubst",address:n,label:r.label}};case ne.BRANCH_ON_NO_SUBST:return this.advance(),{command:{type:"branchOnNoSubst",address:n,label:r.label}};case ne.TEXT_CMD:return this.advance(),this.parseTextCommand(r,n);case ne.FILE_READ:return this.advance(),{command:{type:"readFile",address:n,filename:r.filename||""}};case ne.FILE_READ_LINE:return this.advance(),{command:{type:"readFileLine",address:n,filename:r.filename||""}};case ne.FILE_WRITE:return this.advance(),{command:{type:"writeFile",address:n,filename:r.filename||""}};case ne.FILE_WRITE_LINE:return this.advance(),{command:{type:"writeFirstLine",address:n,filename:r.filename||""}};case ne.EXECUTE:return this.advance(),{command:{type:"execute",address:n,command:r.command}};case ne.VERSION:return this.advance(),{command:{type:"version",address:n,minVersion:r.label}};case ne.LBRACE:return this.parseGroup(n);case ne.RBRACE:return{command:null};case ne.ERROR:return{command:null,error:`invalid command: ${r.value}`};default:return n&&(n.start!==void 0||n.end!==void 0)?{command:null,error:"command expected"}:{command:null}}}parseSimpleCommand(t,n){this.advance();let r=t.value;switch(r){case"p":return{command:{type:"print",address:n}};case"P":return{command:{type:"printFirstLine",address:n}};case"d":return{command:{type:"delete",address:n}};case"D":return{command:{type:"deleteFirstLine",address:n}};case"h":return{command:{type:"hold",address:n}};case"H":return{command:{type:"holdAppend",address:n}};case"g":return{command:{type:"get",address:n}};case"G":return{command:{type:"getAppend",address:n}};case"x":return{command:{type:"exchange",address:n}};case"n":return{command:{type:"next",address:n}};case"N":return{command:{type:"nextAppend",address:n}};case"q":return{command:{type:"quit",address:n}};case"Q":return{command:{type:"quitSilent",address:n}};case"z":return{command:{type:"zap",address:n}};case"=":return{command:{type:"lineNumber",address:n}};case"l":return{command:{type:"list",address:n}};case"F":return{command:{type:"printFilename",address:n}};default:return{command:null,error:`unknown command: ${r}`}}}parseSubstituteFromToken(t,n){this.advance();let r=t.flags||"",s,i=r.match(/(\d+)/);return i&&(s=parseInt(i[1],10)),{command:{type:"substitute",address:n,pattern:t.pattern||"",replacement:t.replacement||"",global:r.includes("g"),ignoreCase:r.includes("i")||r.includes("I"),printOnMatch:r.includes("p"),nthOccurrence:s,extendedRegex:this.extendedRegex}}}parseTransliterateFromToken(t,n){this.advance();let r=t.source||"",s=t.dest||"";return r.length!==s.length?{command:null,error:"transliteration sets must have same length"}:{command:{type:"transliterate",address:n,source:r,dest:s}}}parseTextCommand(t,n){let r=t.value,s=t.text||"";switch(r){case"a":return{command:{type:"append",address:n,text:s}};case"i":return{command:{type:"insert",address:n,text:s}};case"c":return{command:{type:"change",address:n,text:s}};default:return{command:null,error:`unknown text command: ${r}`}}}parseGroup(t){this.advance();let n=[];for(;!this.isAtEnd()&&!this.check(ne.RBRACE);){if(this.check(ne.NEWLINE)||this.check(ne.SEMICOLON)){this.advance();continue}let r=this.pos,s=this.parseCommand();if(s.error)return{command:null,error:s.error};if(s.command&&n.push(s.command),this.pos===r&&!this.isAtEnd())return{command:null,error:`unknown command: '${this.peek()?.value??this.peek()?.type}'`}}return this.check(ne.RBRACE)?(this.advance(),{command:{type:"group",address:t,commands:n}}):{command:null,error:"unmatched brace in grouped commands"}}parseAddressRange(){if(this.check(ne.COMMA))return{error:"expected context address"};let t=this.parseAddress();if(t===void 0)return;let n;if(this.check(ne.RELATIVE_OFFSET))n={offset:this.advance().offset||0};else if(this.check(ne.COMMA)&&(this.advance(),n=this.parseAddress(),n===void 0))return{error:"expected context address"};return{address:{start:t,end:n}}}parseAddress(){let t=this.peek();switch(t.type){case ne.NUMBER:return this.advance(),t.value;case ne.DOLLAR:return this.advance(),"$";case ne.PATTERN:return this.advance(),{pattern:t.pattern||t.value};case ne.STEP:return this.advance(),{first:t.first||0,step:t.step||0};case ne.RELATIVE_OFFSET:return this.advance(),{offset:t.offset||0};default:return}}peek(){return this.tokens[this.pos]||{type:ne.EOF,value:"",line:0,column:0}}advance(){return this.isAtEnd()||this.pos++,this.tokens[this.pos-1]}check(t){return this.peek().type===t}isAtEnd(){return this.peek().type===ne.EOF}}});var Mp={};ee(Mp,{flagsForFuzzing:()=>U8,sedCommand:()=>M8});async function Tl(e,t,n,r={}){let{limits:s,filename:i,fs:o,cwd:a,coverage:l,requireDefenseContext:c}=r;it(c,"sed","processing entry");let u=(P,C)=>_t(c,"sed",P,C),f=e.endsWith(`
276
276
  `),p=e.split(`
277
- `);p.length>0&&p[p.length-1]===""&&p.pop();let h=p.length,d="",m,g=!1,y=s?.maxStringLength??0,w=P=>{if(d+=P,y>0&&d.length>y)throw new X(`sed: output size limit exceeded (${y} bytes)`,"string_length")},b="",x,S=new Map,v=new Map,$=new Map,_=new Map,R=s?{maxIterations:s.maxSedIterations,maxStringLength:y}:void 0;for(let P=0;P<p.length;P++){let C={...Op(h,i,S),patternSpace:p[P],holdSpace:b,lastPattern:x,lineNumber:P+1,totalLines:h,substitutionMade:!1,coverage:l},T={lines:p,currentLineIndex:P},O=0,I=1e4;C.linesConsumedInCycle=0;do{if(O++,O>I)break;if(C.restartCycle=!1,C.pendingFileReads=[],C.pendingFileWrites=[],Il(t,C,T,R),o&&a){for(let q of C.pendingFileReads){let H=o.resolvePath(a,q.filename);try{if(q.wholeFile){let te=await u("read command file",()=>o.readFile(H));C.appendBuffer.push(te.replace(/\n$/,""))}else{if(!v.has(H)){let ie=await u("read command file line cache",()=>o.readFile(H));v.set(H,ie.split(`
278
- `)),$.set(H,0)}let te=v.get(H),ve=$.get(H);te&&ve!==void 0&&ve<te.length&&(C.appendBuffer.push(te[ve]),$.set(H,ve+1))}}catch(te){if(te instanceof me)throw te}}for(let q of C.pendingFileWrites){let H=o.resolvePath(a,q.filename),te=_.get(H)||"";_.set(H,te+q.content)}}}while(C.restartCycle&&!C.deleted&&!C.quit&&!C.quitSilent);if(P+=C.linesConsumedInCycle,b=C.holdSpace,x=C.lastPattern,!n)for(let q of C.nCommandOutput)w(`${q}
277
+ `);p.length>0&&p[p.length-1]===""&&p.pop();let h=p.length,d="",m,g=!1,y=s?.maxStringLength??0,w=P=>{if(d+=P,y>0&&d.length>y)throw new X(`sed: output size limit exceeded (${y} bytes)`,"string_length")},b="",x,S=new Map,v=new Map,$=new Map,D=new Map,O=s?{maxIterations:s.maxSedIterations,maxStringLength:y}:void 0;for(let P=0;P<p.length;P++){let C={...Op(h,i,S),patternSpace:p[P],holdSpace:b,lastPattern:x,lineNumber:P+1,totalLines:h,substitutionMade:!1,coverage:l},T={lines:p,currentLineIndex:P},R=0,I=1e4;C.linesConsumedInCycle=0;do{if(R++,R>I)break;if(C.restartCycle=!1,C.pendingFileReads=[],C.pendingFileWrites=[],Il(t,C,T,O),o&&a){for(let q of C.pendingFileReads){let H=o.resolvePath(a,q.filename);try{if(q.wholeFile){let te=await u("read command file",()=>o.readFile(H));C.appendBuffer.push(te.replace(/\n$/,""))}else{if(!v.has(H)){let ie=await u("read command file line cache",()=>o.readFile(H));v.set(H,ie.split(`
278
+ `)),$.set(H,0)}let te=v.get(H),ve=$.get(H);te&&ve!==void 0&&ve<te.length&&(C.appendBuffer.push(te[ve]),$.set(H,ve+1))}}catch(te){if(te instanceof me)throw te}}for(let q of C.pendingFileWrites){let H=o.resolvePath(a,q.filename),te=D.get(H)||"";D.set(H,te+q.content)}}}while(C.restartCycle&&!C.deleted&&!C.quit&&!C.quitSilent);if(P+=C.linesConsumedInCycle,b=C.holdSpace,x=C.lastPattern,!n)for(let q of C.nCommandOutput)w(`${q}
279
279
  `);let L=C.lineNumberOutput.length>0;for(let q of C.lineNumberOutput)w(`${q}
280
280
  `);let B=[],Z=[];for(let q of C.appendBuffer)q.startsWith("__INSERT__")?B.push(q.slice(10)):Z.push(q);for(let q of B)w(`${q}
281
281
  `);let ae=!1;!C.deleted&&!C.quitSilent?n?C.printed&&(w(`${C.patternSpace}
282
282
  `),ae=!0):(w(`${C.patternSpace}
283
283
  `),ae=!0):C.changedText!==void 0&&(w(`${C.changedText}
284
284
  `),ae=!0);for(let q of Z)w(`${q}
285
- `);if(g=(L||ae)&&Z.length===0,C.quit||C.quitSilent){if(C.exitCode!==void 0&&(m=C.exitCode),C.errorMessage)return{output:"",exitCode:m||1,errorMessage:C.errorMessage};break}}if(o&&a)for(let[P,C]of _)try{await u("flush pending file writes",()=>o.writeFile(P,C))}catch(T){if(T instanceof me)throw T}return!f&&g&&d.endsWith(`
285
+ `);if(g=(L||ae)&&Z.length===0,C.quit||C.quitSilent){if(C.exitCode!==void 0&&(m=C.exitCode),C.errorMessage)return{output:"",exitCode:m||1,errorMessage:C.errorMessage};break}}if(o&&a)for(let[P,C]of D)try{await u("flush pending file writes",()=>o.writeFile(P,C))}catch(T){if(T instanceof me)throw T}return!f&&g&&d.endsWith(`
286
286
  `)&&(d=d.slice(0,-1)),{output:d,exitCode:m}}var L8,M8,U8,Up=k(()=>{"use strict";he();En();Ae();zn();un();oe();Rp();Lp();L8={name:"sed",summary:"stream editor for filtering and transforming text",usage:"sed [OPTION]... {script} [input-file]...",options:["-n, --quiet, --silent suppress automatic printing of pattern space","-e script add the script to commands to be executed","-f script-file read script from file","-i, --in-place edit files in place","-E, -r, --regexp-extended use extended regular expressions"," --help display this help and exit"],description:`Commands:
287
287
  s/regexp/replacement/[flags] substitute
288
288
  d delete pattern space
@@ -500,12 +500,12 @@ Try 'comm --help' for more information.
500
500
  `:""),stderr:"",stdoutEncoding:"binary"}}},hb={name:"join",flags:[{flag:"-1",type:"value",valueHint:"number"},{flag:"-2",type:"value",valueHint:"number"},{flag:"-t",type:"value",valueHint:"delimiter"},{flag:"-a",type:"value",valueHint:"number"},{flag:"-v",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"string"},{flag:"-o",type:"value",valueHint:"format"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2}});var md={};ee(md,{flagsForFuzzing:()=>yb,teeCommand:()=>gb});var db,mb,gb,yb,gd=k(()=>{"use strict";he();at();oe();db={name:"tee",summary:"read from stdin and write to stdout and files",usage:"tee [OPTION]... [FILE]...",options:["-a, --append append to the given FILEs, do not overwrite"," --help display this help and exit"]},mb={append:{short:"a",long:"append",type:"boolean"}},gb={name:"tee",async execute(e,t){if(U(e))return M(db);let n=Se("tee",e,mb);if(!n.ok)return n.error;let{append:r}=n.result.flags,s=n.result.positional,i=t.stdin,o="",a=0;for(let l of s)try{let c=t.fs.resolvePath(t.cwd,l);r?await t.fs.appendFile(c,i,"binary"):await t.fs.writeFile(c,i,"binary")}catch{o+=`tee: ${l}: No such file or directory
501
501
  `,a=1}return{stdout:i,stderr:o,exitCode:a,stdoutEncoding:"binary"}}},yb={name:"tee",flags:[{flag:"-a",type:"boolean"}],stdinType:"text",needsArgs:!0}});function dn(e,t){switch(e.type){case"name":{let n=e.pattern,r=n.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let s=r[1],i=t.name;if(e.ignoreCase){if(!i.toLowerCase().endsWith(s.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!i.endsWith(s))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Dt(t.name,n,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let n=e.pattern,r=t.relativePath,s=n.split("/");for(let o=0;o<s.length-1;o++){let a=s[o];if(a&&a!=="."&&a!==".."&&!a.includes("*")&&!a.includes("?")&&!a.includes("[")){let l=`/${a}/`;if(e.ignoreCase){if(!r.toLowerCase().includes(l.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(l))return{matches:!1,pruned:!1,printed:!1}}}let i=n.match(/\*(\.[a-zA-Z0-9]+)$/);if(i){let o=i[1];if(e.ignoreCase){if(!r.toLowerCase().endsWith(o.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(o))return{matches:!1,pruned:!1,printed:!1}}return{matches:Dt(r,n,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let n=e.ignoreCase?"i":"";return{matches:Q(e.pattern,n).test(t.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:t.isFile,pruned:!1,printed:!1}:e.fileType==="d"?{matches:t.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"empty":return{matches:t.isEmpty,pruned:!1,printed:!1};case"mtime":{let r=(Date.now()-t.mtime)/(1e3*60*60*24),s;return e.comparison==="more"?s=r>e.days:e.comparison==="less"?s=r<e.days:s=Math.floor(r)===e.days,{matches:s,pruned:!1,printed:!1}}case"newer":{let n=t.newerRefTimes.get(e.refPath);return n===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:t.mtime>n,pruned:!1,printed:!1}}case"size":{let n=e.value;switch(e.unit){case"c":n=e.value;break;case"k":n=e.value*1024;break;case"M":n=e.value*1024*1024;break;case"G":n=e.value*1024*1024*1024;break;case"b":n=e.value*512;break}let r;return e.comparison==="more"?r=t.size>n:e.comparison==="less"?r=t.size<n:e.unit==="b"?r=Math.ceil(t.size/512)===e.value:r=t.size===n,{matches:r,pruned:!1,printed:!1}}case"perm":{let n=t.mode&511,r=e.mode&511,s;return e.matchType==="exact"?s=n===r:e.matchType==="all"?s=(n&r)===r:s=(n&r)!==0,{matches:s,pruned:!1,printed:!1}}case"prune":return{matches:!0,pruned:!0,printed:!1};case"print":return{matches:!0,pruned:!1,printed:!0};case"not":{let n=dn(e.expr,t);return{matches:!n.matches,pruned:n.pruned,printed:!1}}case"and":{let n=dn(e.left,t);if(!n.matches)return{matches:!1,pruned:n.pruned,printed:!1};let r=dn(e.right,t);return{matches:r.matches,pruned:n.pruned||r.pruned,printed:n.printed||r.printed}}case"or":{let n=dn(e.left,t);if(n.matches)return n;let r=dn(e.right,t);return{matches:r.matches,pruned:n.pruned||r.pruned,printed:r.printed}}}}function oi(e){if(!e)return!1;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!0;case"not":return oi(e.expr);case"and":case"or":return oi(e.left)||oi(e.right)}}function ai(e){if(!e)return!1;switch(e.type){case"empty":return!0;case"not":return ai(e.expr);case"and":case"or":return ai(e.left)||ai(e.right);default:return!1}}function yd(e){let t={terminalDirName:null,requiredExtension:null};if(!e)return t;let n=wb(e);if(bb(e)&&n.length===1){let i=n[0].split("/").filter(o=>o.length>0);if(i.length>=2)for(let o=i.length-2;o>=0;o--){let a=i[o];if(!a.includes("*")&&!a.includes("?")&&!a.includes("[")&&a!=="."&&a!==".."){let l=i[o+1];if(l&&(l.includes("*")||l.includes("?"))){t.terminalDirName=a;let c=l.match(/^\*(\.[a-zA-Z0-9]+)$/);c&&(t.requiredExtension=c[1])}break}}}return t}function wb(e){let t=[],n=r=>{r.type==="path"?t.push(r.pattern):r.type==="not"?n(r.expr):(r.type==="and"||r.type==="or")&&(n(r.left),n(r.right))};return n(e),t}function bb(e){let t=n=>n.type==="type"&&n.fileType==="f"?!0:n.type==="not"?t(n.expr):n.type==="and"||n.type==="or"?t(n.left)||t(n.right):!1;return t(e)}function wd(e){let t=[],n=r=>{r&&(r.type==="newer"?t.push(r.refPath):r.type==="not"?n(r.expr):(r.type==="and"||r.type==="or")&&(n(r.left),n(r.right)))};return n(e),t}function li(e){if(!e)return!0;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!0;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return li(e.expr);case"and":case"or":return li(e.left)&&li(e.right)}}function Lr(e,t,n,r,s){switch(e.type){case"name":{let i=e.pattern,o=i.match(/^\*(\.[a-zA-Z0-9]+)$/);if(o){let a=o[1];if(e.ignoreCase){if(!t.toLowerCase().endsWith(a.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!t.endsWith(a))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Dt(t,i,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let i=e.pattern,o=i.split("/");for(let l=0;l<o.length-1;l++){let c=o[l];if(c&&c!=="."&&c!==".."&&!c.includes("*")&&!c.includes("?")&&!c.includes("[")){let u=`/${c}/`;if(e.ignoreCase){if(!n.toLowerCase().includes(u.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.includes(u))return{matches:!1,pruned:!1,printed:!1}}}let a=i.match(/\*(\.[a-zA-Z0-9]+)$/);if(a){let l=a[1];if(e.ignoreCase){if(!n.toLowerCase().endsWith(l.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(l))return{matches:!1,pruned:!1,printed:!1}}return{matches:Dt(n,i,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let i=e.ignoreCase?"i":"";return{matches:Q(e.pattern,i).test(n),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:r,pruned:!1,printed:!1}:e.fileType==="d"?{matches:s,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"prune":return{matches:!0,pruned:!0,printed:!1};case"print":return{matches:!0,pruned:!1,printed:!0};case"not":{let i=Lr(e.expr,t,n,r,s);return{matches:!i.matches,pruned:i.pruned,printed:!1}}case"and":{let i=Lr(e.left,t,n,r,s);if(!i.matches)return{matches:!1,pruned:i.pruned,printed:!1};let o=Lr(e.right,t,n,r,s);return{matches:o.matches,pruned:i.pruned||o.pruned,printed:i.printed||o.printed}}case"or":{let i=Lr(e.left,t,n,r,s);if(i.matches)return i;let o=Lr(e.right,t,n,r,s);return{matches:o.matches,pruned:i.pruned||o.pruned,printed:o.printed}}default:return{matches:!1,pruned:!1,printed:!1}}}function ci(e){if(!e)return!1;switch(e.type){case"prune":return!0;case"not":return ci(e.expr);case"and":case"or":return ci(e.left)||ci(e.right);default:return!1}}function ur(e){switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!0;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return ur(e.expr);case"and":case"or":return ur(e.left)&&ur(e.right)}}function bd(e,t){if(!e||!t.isDirectory)return{shouldPrune:!1};if(!ur(e))return jl(e,t);let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:dn(e,n).pruned}}function jl(e,t){switch(e.type){case"or":{if(ur(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(dn(e.left,n).pruned)return{shouldPrune:!0}}return jl(e.right,t)}case"and":{if(ur(e.left)&&ur(e.right)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:dn(e,n).pruned}}if(ur(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return dn(e.left,n).matches?jl(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1}}case"not":return{shouldPrune:!1};default:return{shouldPrune:!1}}}var xd=k(()=>{"use strict";Ze();gl()});function Ed(e,t){let n=[],r=[],s=t;for(;s<e.length;){let o=e[s];if(o==="("||o==="\\("){n.push({type:"lparen"}),s++;continue}if(o===")"||o==="\\)"){n.push({type:"rparen"}),s++;continue}if(o==="-name"&&s+1<e.length)n.push({type:"expr",expr:{type:"name",pattern:e[++s]}});else if(o==="-iname"&&s+1<e.length)n.push({type:"expr",expr:{type:"name",pattern:e[++s],ignoreCase:!0}});else if(o==="-path"&&s+1<e.length)n.push({type:"expr",expr:{type:"path",pattern:e[++s]}});else if(o==="-ipath"&&s+1<e.length)n.push({type:"expr",expr:{type:"path",pattern:e[++s],ignoreCase:!0}});else if(o==="-regex"&&s+1<e.length)n.push({type:"expr",expr:{type:"regex",pattern:e[++s]}});else if(o==="-iregex"&&s+1<e.length)n.push({type:"expr",expr:{type:"regex",pattern:e[++s],ignoreCase:!0}});else if(o==="-type"&&s+1<e.length){let a=e[++s];if(a==="f"||a==="d")n.push({type:"expr",expr:{type:"type",fileType:a}});else return{expr:null,pathIndex:s,error:`find: Unknown argument to -type: ${a}
502
502
  `,actions:[]}}else if(o==="-empty")n.push({type:"expr",expr:{type:"empty"}});else if(o==="-mtime"&&s+1<e.length){let a=e[++s],l="exact",c=a;a.startsWith("+")?(l="more",c=a.slice(1)):a.startsWith("-")&&(l="less",c=a.slice(1));let u=parseInt(c,10);Number.isNaN(u)||n.push({type:"expr",expr:{type:"mtime",days:u,comparison:l}})}else if(o==="-newer"&&s+1<e.length){let a=e[++s];n.push({type:"expr",expr:{type:"newer",refPath:a}})}else if(o==="-size"&&s+1<e.length){let a=e[++s],l="exact",c=a;a.startsWith("+")?(l="more",c=a.slice(1)):a.startsWith("-")&&(l="less",c=a.slice(1));let u=c.match(/^(\d+)([ckMGb])?$/);if(u){let f=parseInt(u[1],10),p=u[2]||"b";n.push({type:"expr",expr:{type:"size",value:f,unit:p,comparison:l}})}}else if(o==="-perm"&&s+1<e.length){let a=e[++s],l="exact",c=a;a.startsWith("-")?(l="all",c=a.slice(1)):a.startsWith("/")&&(l="any",c=a.slice(1));let u=parseInt(c,8);Number.isNaN(u)||n.push({type:"expr",expr:{type:"perm",mode:u,matchType:l}})}else if(o==="-prune")n.push({type:"expr",expr:{type:"prune"}});else if(o==="-not"||o==="!")n.push({type:"not"});else if(o==="-o"||o==="-or")n.push({type:"op",op:"or"});else if(o==="-a"||o==="-and")n.push({type:"op",op:"and"});else if(o==="-maxdepth"||o==="-mindepth")s++;else if(o!=="-depth")if(o==="-exec"){let a=[];for(s++;s<e.length&&e[s]!==";"&&e[s]!=="+";)a.push(e[s]),s++;if(s>=e.length)return{expr:null,pathIndex:s,error:"find: missing argument to `-exec'\n",actions:[]};let l=e[s]==="+";r.push({type:"exec",command:a,batchMode:l})}else if(o==="-print")n.push({type:"expr",expr:{type:"print"}}),r.push({type:"print"});else if(o==="-print0")r.push({type:"print0"});else if(o==="-printf"&&s+1<e.length){let a=e[++s];r.push({type:"printf",format:a})}else if(o==="-delete")r.push({type:"delete"});else{if(o.startsWith("-"))return{expr:null,pathIndex:s,error:`find: unknown predicate '${o}'
503
- `,actions:[]};if(n.length===0){s++;continue}break}s++}if(n.length===0)return{expr:null,pathIndex:s,actions:r};let i=xb(n);return i.error?{expr:null,pathIndex:s,error:i.error,actions:r}:{expr:i.expr,pathIndex:s,actions:r}}function xb(e){let t=0;function n(){let a=r();if(!a)return null;for(;t<e.length;){let l=e[t];if(l.type==="op"&&l.op==="or"){t++;let c=r();if(!c)return a;a={type:"or",left:a,right:c}}else break}return a}function r(){let a=s();if(!a)return null;for(;t<e.length;){let l=e[t];if(l.type==="op"&&l.op==="and"){t++;let c=s();if(!c)return a;a={type:"and",left:a,right:c}}else if(l.type==="expr"||l.type==="not"||l.type==="lparen"){let c=s();if(!c)return a;a={type:"and",left:a,right:c}}else break}return a}function s(){if(t<e.length&&e[t].type==="not"){t++;let a=s();return a?{type:"not",expr:a}:null}return i()}function i(){if(t>=e.length)return null;let a=e[t];if(a.type==="lparen"){t++;let l=n();return t<e.length&&e[t].type==="rparen"&&t++,l}return a.type==="expr"?(t++,a.expr):(a.type==="rparen",null)}return{expr:n()}}var Ad=k(()=>{"use strict"});var Cd={};ee(Cd,{findCommand:()=>vb,flagsForFuzzing:()=>$b});function Eb(){return{readdirCalls:0,readdirTime:0,statCalls:0,statTime:0,evalCalls:0,evalTime:0,nodeCount:0,batchCount:0,batchTime:0,earlyPrunes:0}}function Ab(e,t,n){e({category:"find",name:"summary",durationMs:n,details:{readdirCalls:t.readdirCalls,readdirTimeMs:t.readdirTime,statCalls:t.statCalls,statTimeMs:t.statTime,evalCalls:t.evalCalls,evalTimeMs:t.evalTime,nodeCount:t.nodeCount,batchCount:t.batchCount,batchTimeMs:t.batchTime,earlyPrunes:t.earlyPrunes,otherTimeMs:n-t.readdirTime-t.statTime-t.evalTime-t.batchTime}})}function kb(e,t){let n=Bi(e),r="",s=0;for(;s<n.length;)if(n[s]==="%"&&s+1<n.length){if(s++,n[s]==="%"){r+="%",s++;continue}let[i,o,a]=zf(n,s);if(s+=a,s>=n.length){r+="%";break}let l=n[s],c;switch(l){case"f":c=t.name,s++;break;case"h":{let u=t.path.lastIndexOf("/");c=u>0?t.path.slice(0,u):".",s++;break}case"p":c=t.path,s++;break;case"P":{let u=t.startingPoint;t.path===u?c="":t.path.startsWith(`${u}/`)?c=t.path.slice(u.length+1):u==="."&&t.path.startsWith("./")?c=t.path.slice(2):c=t.path,s++;break}case"s":c=String(t.size),s++;break;case"d":c=String(t.depth),s++;break;case"m":c=(t.mode&511).toString(8),s++;break;case"M":c=Ks(t.mode,t.isDirectory),s++;break;case"t":{let u=new Date(t.mtime);c=Nb(u),s++;break}case"T":{if(s+1<n.length){let u=n[s+1],f=new Date(t.mtime);c=Ib(f,u),s+=2}else c="%T",s++;break}default:r+=`%${i!==0||o!==-1?`${i}.${o}`:""}${l}`,s++;continue}r+=Ui(c,i,o)}else r+=n[s],s++;return r}function Nb(e){let t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=t[e.getDay()],s=n[e.getMonth()],i=String(e.getDate()).padStart(2," "),o=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),l=String(e.getSeconds()).padStart(2,"0"),c=e.getFullYear();return`${r} ${s} ${i} ${o}:${a}:${l} ${c}`}function Ib(e,t){switch(t){case"@":return String(e.getTime()/1e3);case"Y":return String(e.getFullYear());case"m":return String(e.getMonth()+1).padStart(2,"0");case"d":return String(e.getDate()).padStart(2,"0");case"H":return String(e.getHours()).padStart(2,"0");case"M":return String(e.getMinutes()).padStart(2,"0");case"S":return String(e.getSeconds()).padStart(2,"0");case"T":return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`;case"F":return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;default:return`%T${t}`}}var Sd,Sb,Cb,vb,$b,vd=k(()=>{"use strict";Rr();Ja();oe();Ka();xd();Ad();Sd=500;Sb={name:"find",summary:"search for files in a directory hierarchy",usage:"find [path...] [expression]",options:["-name PATTERN file name matches shell pattern PATTERN","-iname PATTERN like -name but case insensitive","-path PATTERN file path matches shell pattern PATTERN","-ipath PATTERN like -path but case insensitive","-regex PATTERN file path matches regular expression PATTERN","-iregex PATTERN like -regex but case insensitive","-type TYPE file is of type: f (regular file), d (directory)","-empty file is empty or directory is empty","-mtime N file's data was modified N*24 hours ago","-newer FILE file was modified more recently than FILE","-size N[ckMGb] file uses N units of space (c=bytes, k=KB, M=MB, G=GB, b=512B blocks)","-perm MODE file's permission bits are exactly MODE (octal)","-perm -MODE all permission bits MODE are set","-perm /MODE any permission bits MODE are set","-maxdepth LEVELS descend at most LEVELS directories","-mindepth LEVELS do not apply tests at levels less than LEVELS","-depth process directory contents before directory itself","-prune do not descend into this directory","-not, ! negate the following expression","-a, -and logical AND (default)","-o, -or logical OR","-exec CMD {} ; execute CMD on each file ({} is replaced by filename)","-exec CMD {} + execute CMD with multiple files at once","-print print the full file name (default action)","-print0 print the full file name followed by a null character","-printf FORMAT print FORMAT with directives: %f %h %p %P %s %d %m %M %t","-delete delete found files/directories"," --help display this help and exit"]},Cb=new Set(["-name","-iname","-path","-ipath","-regex","-iregex","-type","-maxdepth","-mindepth","-mtime","-newer","-size","-perm"]),vb={name:"find",async execute(e,t){if(U(e))return M(Sb);let n=[],r=null,s=null,i=!1,o=!1;for(let T=0;T<e.length;T++){let O=e[T];if(O==="-maxdepth"&&T+1<e.length)o=!0,r=parseInt(e[++T],10);else if(O==="-mindepth"&&T+1<e.length)o=!0,s=parseInt(e[++T],10);else if(O==="-depth")o=!0,i=!0;else if(O==="-exec")for(o=!0,T++;T<e.length&&e[T]!==";"&&e[T]!=="+";)T++;else!O.startsWith("-")&&O!==";"&&O!=="+"&&O!=="("&&O!==")"&&O!=="\\("&&O!=="\\)"&&O!=="!"?o||n.push(O):Cb.has(O)?(o=!0,T++):(O.startsWith("-")||O==="("||O==="\\("||O==="!")&&(o=!0)}n.length===0&&n.push(".");let{expr:a,error:l,actions:c}=Ed(e,0);if(l)return{stdout:"",stderr:l,exitCode:1};let u=c.some(T=>T.type==="print"),f=c.length===0,p=[],h=c.some(T=>T.type==="printf"),d=[],m="",g=0,y=wd(a),w=new Map;for(let T of y){let O=t.fs.resolvePath(t.cwd,T);try{let I=await t.fs.stat(O);w.set(T,I.mtime?.getTime()??Date.now())}catch{}}let b=c.some(T=>{if(T.type!=="printf")return!1;let O=T.format.replace(/%%/g,"");return/%[-+]?[0-9]*\.?[0-9]*(s|m|M|t|T)/.test(O)}),x=oi(a)||b,S=ai(a),v=yd(a),$=ci(a),_=li(a),R=typeof t.fs.readdirWithFileTypes=="function";for(let T of n){let Z=function(q){let te=s===null||q.depth>=s,ve=!1;if(te&&a!==null){let Pe=Date.now(),j;if(_)j=Lr(a,q.name,q.relativePath,q.isFile,q.isDirectory);else{let Re={name:q.name,relativePath:q.relativePath,isFile:q.isFile,isDirectory:q.isDirectory,isEmpty:q.isEmpty,mtime:q.stat?.mtime?.getTime()??Date.now(),size:q.stat?.size??0,mode:q.stat?.mode??420,newerRefTimes:w};j=dn(a,Re)}te=j.matches,ve=u?j.printed:te,I.evalCalls++,I.evalTime+=Date.now()-Pe}else te&&(ve=!0);return ve?{print:!0,printfData:h?{path:q.relativePath,name:q.name,size:q.stat?.size??0,mtime:q.stat?.mtime?.getTime()??Date.now(),mode:q.stat?.mode??420,isDirectory:q.isDirectory,depth:q.depth,startingPoint:T}:null}:{print:!1,printfData:null}};var C=Z;T.length>1&&T.endsWith("/")&&(T=T.slice(0,-1));let O=t.fs.resolvePath(t.cwd,T);try{await t.fs.stat(O)}catch{m+=`find: ${T}: No such file or directory
504
- `,g=1;continue}let I=Eb(),L=Date.now();async function B(q){let{path:H,depth:te,typeInfo:ve}=q;if(I.nodeCount++,te>(r??256))return null;let ie,Pe,j;if(ve&&!x)ie=ve.isFile,Pe=ve.isDirectory;else{try{let Nr=Date.now();j=await t.fs.stat(H),I.statCalls++,I.statTime+=Date.now()-Nr}catch{return null}if(!j)return null;ie=j.isFile,Pe=j.isDirectory}let Re;H===O?Re=T.split("/").pop()||T:Re=H.split("/").pop()||"";let Qe=H===O?T:T==="."?`./${H.slice(O==="/"?O.length:O.length+1)}`:T+H.slice(O.length),pt=[],ht=null,ot=null,dt=!1;Pe&&$&&!i&&(dt=bd(a,{name:Re,relativePath:Qe,isFile:ie,isDirectory:Pe}).shouldPrune,dt&&I.earlyPrunes++);let en=te>=(r??256),tn=v.terminalDirName!==null&&Re===v.terminalDirName,qs=!en&&!tn&&!dt;if(Pe&&((qs||S||tn)&&!dt)){let Nr=Date.now();if(R&&t.fs.readdirWithFileTypes){if(ht=await t.fs.readdirWithFileTypes(H),ot=ht.map(zt=>zt.name),I.readdirCalls++,I.readdirTime+=Date.now()-Nr,qs)pt=ht.map((zt,cn)=>({path:H==="/"?`/${zt.name}`:`${H}/${zt.name}`,depth:te+1,typeInfo:{isFile:zt.isFile,isDirectory:zt.isDirectory},resultIndex:cn}));else if(tn){let zt=v.requiredExtension;pt=ht.filter(cn=>cn.isFile&&(!zt||cn.name.endsWith(zt))).map((cn,H7)=>({path:H==="/"?`/${cn.name}`:`${H}/${cn.name}`,depth:te+1,typeInfo:{isFile:cn.isFile,isDirectory:cn.isDirectory},resultIndex:H7}))}}else ot=await t.fs.readdir(H),I.readdirCalls++,I.readdirTime+=Date.now()-Nr,qs&&(pt=ot.map((zt,cn)=>({path:H==="/"?`/${zt}`:`${H}/${zt}`,depth:te+1,resultIndex:cn})))}let Fi=ie?(j?.size??0)===0:ot!==null&&ot.length===0,es=dt;if(!i&&a!==null&&!dt&&$){let Nr=Date.now(),zt={name:Re,relativePath:Qe,isFile:ie,isDirectory:Pe,isEmpty:Fi,mtime:j?.mtime?.getTime()??Date.now(),size:j?.size??0,mode:j?.mode??420,newerRefTimes:w};es=dn(a,zt).pruned,I.evalCalls++,I.evalTime+=Date.now()-Nr}return{relativePath:Qe,name:Re,isFile:ie,isDirectory:Pe,isEmpty:Fi,stat:j,depth:te,children:es?[]:pt,pruned:es}}async function ae(){let q={paths:[],printfData:[]};if(i){let j=function(Re){let Qe={paths:[],printfData:[]},pt=ve[Re];if(!pt)return Qe;for(let dt of pt.childIndices){let en=j(dt);Qe.paths.push(...en.paths),Qe.printfData.push(...en.printfData)}let{print:ht,printfData:ot}=Z(pt.node);return ht&&(Qe.paths.push(pt.node.relativePath),ot&&Qe.printfData.push(ot)),Qe};var H=j;let ve=[],ie=[{item:{path:O,depth:0,resultIndex:0},parentIndex:-1,childOrderInParent:0}],Pe=new Map;for(;ie.length>0;){let Re=Date.now(),Qe=ie.splice(0,Sd),pt=await Promise.all(Qe.map(ht=>B(ht.item)));I.batchCount++,I.batchTime+=Date.now()-Re;for(let ht=0;ht<Qe.length;ht++){let ot=pt[ht],dt=Qe[ht];if(!ot)continue;let en=ve.length;if(dt.parentIndex>=0){let tn=Pe.get(dt.parentIndex)||[];tn.push(en),Pe.set(dt.parentIndex,tn)}ve.push({node:ot,parentIndex:dt.parentIndex,childIndices:[]});for(let tn=0;tn<ot.children.length;tn++)ie.push({item:ot.children[tn],parentIndex:en,childOrderInParent:tn})}}for(let[Re,Qe]of Pe)Re>=0&&Re<ve.length&&(ve[Re].childIndices=Qe);if(ve.length>0){let Re=j(0);q.paths.push(...Re.paths),q.printfData.push(...Re.printfData)}}else{let Re=function(Qe){let pt=ve.get(Qe);pt&&(q.paths.push(pt.path),pt.printfData&&q.printfData.push(pt.printfData));let ht=j.get(Qe);if(ht)for(let ot of ht)Re(ot)};var te=Re;let ve=new Map,ie=0,Pe=[{item:{path:O,depth:0,resultIndex:0},orderIndex:ie++}],j=new Map;for(;Pe.length>0;){let Qe=Date.now(),pt=Pe.splice(0,Sd),ht=await Promise.all(pt.map(async({item:ot,orderIndex:dt})=>{let en=await B(ot);return en?{node:en,orderIndex:dt}:null}));I.batchCount++,I.batchTime+=Date.now()-Qe;for(let ot of ht){if(!ot)continue;let{node:dt,orderIndex:en}=ot,{print:tn,printfData:qs}=Z(dt);if(tn&&ve.set(en,{path:dt.relativePath,printfData:qs}),dt.children.length>0){let ja=[];for(let Fi of dt.children){let es=ie++;ja.push(es),Pe.push({item:Fi,orderIndex:es})}j.set(en,ja)}}}Re(0)}return q}let ye=await ae();if(p.push(...ye.paths),d.push(...ye.printfData),t.trace){let q=Date.now()-L;Ab(t.trace,I,q),t.trace({category:"find",name:"searchPath",durationMs:q,details:{path:T,resultsFound:ye.paths.length}})}}let P="";if(c.length>0)for(let T of c)switch(T.type){case"print":P+=p.length>0?`${p.join(`
503
+ `,actions:[]};if(n.length===0){s++;continue}break}s++}if(n.length===0)return{expr:null,pathIndex:s,actions:r};let i=xb(n);return i.error?{expr:null,pathIndex:s,error:i.error,actions:r}:{expr:i.expr,pathIndex:s,actions:r}}function xb(e){let t=0;function n(){let a=r();if(!a)return null;for(;t<e.length;){let l=e[t];if(l.type==="op"&&l.op==="or"){t++;let c=r();if(!c)return a;a={type:"or",left:a,right:c}}else break}return a}function r(){let a=s();if(!a)return null;for(;t<e.length;){let l=e[t];if(l.type==="op"&&l.op==="and"){t++;let c=s();if(!c)return a;a={type:"and",left:a,right:c}}else if(l.type==="expr"||l.type==="not"||l.type==="lparen"){let c=s();if(!c)return a;a={type:"and",left:a,right:c}}else break}return a}function s(){if(t<e.length&&e[t].type==="not"){t++;let a=s();return a?{type:"not",expr:a}:null}return i()}function i(){if(t>=e.length)return null;let a=e[t];if(a.type==="lparen"){t++;let l=n();return t<e.length&&e[t].type==="rparen"&&t++,l}return a.type==="expr"?(t++,a.expr):(a.type==="rparen",null)}return{expr:n()}}var Ad=k(()=>{"use strict"});var Cd={};ee(Cd,{findCommand:()=>vb,flagsForFuzzing:()=>$b});function Eb(){return{readdirCalls:0,readdirTime:0,statCalls:0,statTime:0,evalCalls:0,evalTime:0,nodeCount:0,batchCount:0,batchTime:0,earlyPrunes:0}}function Ab(e,t,n){e({category:"find",name:"summary",durationMs:n,details:{readdirCalls:t.readdirCalls,readdirTimeMs:t.readdirTime,statCalls:t.statCalls,statTimeMs:t.statTime,evalCalls:t.evalCalls,evalTimeMs:t.evalTime,nodeCount:t.nodeCount,batchCount:t.batchCount,batchTimeMs:t.batchTime,earlyPrunes:t.earlyPrunes,otherTimeMs:n-t.readdirTime-t.statTime-t.evalTime-t.batchTime}})}function kb(e,t){let n=Bi(e),r="",s=0;for(;s<n.length;)if(n[s]==="%"&&s+1<n.length){if(s++,n[s]==="%"){r+="%",s++;continue}let[i,o,a]=zf(n,s);if(s+=a,s>=n.length){r+="%";break}let l=n[s],c;switch(l){case"f":c=t.name,s++;break;case"h":{let u=t.path.lastIndexOf("/");c=u>0?t.path.slice(0,u):".",s++;break}case"p":c=t.path,s++;break;case"P":{let u=t.startingPoint;t.path===u?c="":t.path.startsWith(`${u}/`)?c=t.path.slice(u.length+1):u==="."&&t.path.startsWith("./")?c=t.path.slice(2):c=t.path,s++;break}case"s":c=String(t.size),s++;break;case"d":c=String(t.depth),s++;break;case"m":c=(t.mode&511).toString(8),s++;break;case"M":c=Ks(t.mode,t.isDirectory),s++;break;case"t":{let u=new Date(t.mtime);c=Nb(u),s++;break}case"T":{if(s+1<n.length){let u=n[s+1],f=new Date(t.mtime);c=Ib(f,u),s+=2}else c="%T",s++;break}default:r+=`%${i!==0||o!==-1?`${i}.${o}`:""}${l}`,s++;continue}r+=Ui(c,i,o)}else r+=n[s],s++;return r}function Nb(e){let t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=t[e.getDay()],s=n[e.getMonth()],i=String(e.getDate()).padStart(2," "),o=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),l=String(e.getSeconds()).padStart(2,"0"),c=e.getFullYear();return`${r} ${s} ${i} ${o}:${a}:${l} ${c}`}function Ib(e,t){switch(t){case"@":return String(e.getTime()/1e3);case"Y":return String(e.getFullYear());case"m":return String(e.getMonth()+1).padStart(2,"0");case"d":return String(e.getDate()).padStart(2,"0");case"H":return String(e.getHours()).padStart(2,"0");case"M":return String(e.getMinutes()).padStart(2,"0");case"S":return String(e.getSeconds()).padStart(2,"0");case"T":return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`;case"F":return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;default:return`%T${t}`}}var Sd,Sb,Cb,vb,$b,vd=k(()=>{"use strict";Rr();Ja();oe();Ka();xd();Ad();Sd=500;Sb={name:"find",summary:"search for files in a directory hierarchy",usage:"find [path...] [expression]",options:["-name PATTERN file name matches shell pattern PATTERN","-iname PATTERN like -name but case insensitive","-path PATTERN file path matches shell pattern PATTERN","-ipath PATTERN like -path but case insensitive","-regex PATTERN file path matches regular expression PATTERN","-iregex PATTERN like -regex but case insensitive","-type TYPE file is of type: f (regular file), d (directory)","-empty file is empty or directory is empty","-mtime N file's data was modified N*24 hours ago","-newer FILE file was modified more recently than FILE","-size N[ckMGb] file uses N units of space (c=bytes, k=KB, M=MB, G=GB, b=512B blocks)","-perm MODE file's permission bits are exactly MODE (octal)","-perm -MODE all permission bits MODE are set","-perm /MODE any permission bits MODE are set","-maxdepth LEVELS descend at most LEVELS directories","-mindepth LEVELS do not apply tests at levels less than LEVELS","-depth process directory contents before directory itself","-prune do not descend into this directory","-not, ! negate the following expression","-a, -and logical AND (default)","-o, -or logical OR","-exec CMD {} ; execute CMD on each file ({} is replaced by filename)","-exec CMD {} + execute CMD with multiple files at once","-print print the full file name (default action)","-print0 print the full file name followed by a null character","-printf FORMAT print FORMAT with directives: %f %h %p %P %s %d %m %M %t","-delete delete found files/directories"," --help display this help and exit"]},Cb=new Set(["-name","-iname","-path","-ipath","-regex","-iregex","-type","-maxdepth","-mindepth","-mtime","-newer","-size","-perm"]),vb={name:"find",async execute(e,t){if(U(e))return M(Sb);let n=[],r=null,s=null,i=!1,o=!1;for(let T=0;T<e.length;T++){let R=e[T];if(R==="-maxdepth"&&T+1<e.length)o=!0,r=parseInt(e[++T],10);else if(R==="-mindepth"&&T+1<e.length)o=!0,s=parseInt(e[++T],10);else if(R==="-depth")o=!0,i=!0;else if(R==="-exec")for(o=!0,T++;T<e.length&&e[T]!==";"&&e[T]!=="+";)T++;else!R.startsWith("-")&&R!==";"&&R!=="+"&&R!=="("&&R!==")"&&R!=="\\("&&R!=="\\)"&&R!=="!"?o||n.push(R):Cb.has(R)?(o=!0,T++):(R.startsWith("-")||R==="("||R==="\\("||R==="!")&&(o=!0)}n.length===0&&n.push(".");let{expr:a,error:l,actions:c}=Ed(e,0);if(l)return{stdout:"",stderr:l,exitCode:1};let u=c.some(T=>T.type==="print"),f=c.length===0,p=[],h=c.some(T=>T.type==="printf"),d=[],m="",g=0,y=wd(a),w=new Map;for(let T of y){let R=t.fs.resolvePath(t.cwd,T);try{let I=await t.fs.stat(R);w.set(T,I.mtime?.getTime()??Date.now())}catch{}}let b=c.some(T=>{if(T.type!=="printf")return!1;let R=T.format.replace(/%%/g,"");return/%[-+]?[0-9]*\.?[0-9]*(s|m|M|t|T)/.test(R)}),x=oi(a)||b,S=ai(a),v=yd(a),$=ci(a),D=li(a),O=typeof t.fs.readdirWithFileTypes=="function";for(let T of n){let Z=function(q){let te=s===null||q.depth>=s,ve=!1;if(te&&a!==null){let Pe=Date.now(),j;if(D)j=Lr(a,q.name,q.relativePath,q.isFile,q.isDirectory);else{let Re={name:q.name,relativePath:q.relativePath,isFile:q.isFile,isDirectory:q.isDirectory,isEmpty:q.isEmpty,mtime:q.stat?.mtime?.getTime()??Date.now(),size:q.stat?.size??0,mode:q.stat?.mode??420,newerRefTimes:w};j=dn(a,Re)}te=j.matches,ve=u?j.printed:te,I.evalCalls++,I.evalTime+=Date.now()-Pe}else te&&(ve=!0);return ve?{print:!0,printfData:h?{path:q.relativePath,name:q.name,size:q.stat?.size??0,mtime:q.stat?.mtime?.getTime()??Date.now(),mode:q.stat?.mode??420,isDirectory:q.isDirectory,depth:q.depth,startingPoint:T}:null}:{print:!1,printfData:null}};var C=Z;T.length>1&&T.endsWith("/")&&(T=T.slice(0,-1));let R=t.fs.resolvePath(t.cwd,T);try{await t.fs.stat(R)}catch{m+=`find: ${T}: No such file or directory
504
+ `,g=1;continue}let I=Eb(),L=Date.now();async function B(q){let{path:H,depth:te,typeInfo:ve}=q;if(I.nodeCount++,te>(r??256))return null;let ie,Pe,j;if(ve&&!x)ie=ve.isFile,Pe=ve.isDirectory;else{try{let Nr=Date.now();j=await t.fs.stat(H),I.statCalls++,I.statTime+=Date.now()-Nr}catch{return null}if(!j)return null;ie=j.isFile,Pe=j.isDirectory}let Re;H===R?Re=T.split("/").pop()||T:Re=H.split("/").pop()||"";let Qe=H===R?T:T==="."?`./${H.slice(R==="/"?R.length:R.length+1)}`:T+H.slice(R.length),pt=[],ht=null,ot=null,dt=!1;Pe&&$&&!i&&(dt=bd(a,{name:Re,relativePath:Qe,isFile:ie,isDirectory:Pe}).shouldPrune,dt&&I.earlyPrunes++);let en=te>=(r??256),tn=v.terminalDirName!==null&&Re===v.terminalDirName,qs=!en&&!tn&&!dt;if(Pe&&((qs||S||tn)&&!dt)){let Nr=Date.now();if(O&&t.fs.readdirWithFileTypes){if(ht=await t.fs.readdirWithFileTypes(H),ot=ht.map(zt=>zt.name),I.readdirCalls++,I.readdirTime+=Date.now()-Nr,qs)pt=ht.map((zt,cn)=>({path:H==="/"?`/${zt.name}`:`${H}/${zt.name}`,depth:te+1,typeInfo:{isFile:zt.isFile,isDirectory:zt.isDirectory},resultIndex:cn}));else if(tn){let zt=v.requiredExtension;pt=ht.filter(cn=>cn.isFile&&(!zt||cn.name.endsWith(zt))).map((cn,H7)=>({path:H==="/"?`/${cn.name}`:`${H}/${cn.name}`,depth:te+1,typeInfo:{isFile:cn.isFile,isDirectory:cn.isDirectory},resultIndex:H7}))}}else ot=await t.fs.readdir(H),I.readdirCalls++,I.readdirTime+=Date.now()-Nr,qs&&(pt=ot.map((zt,cn)=>({path:H==="/"?`/${zt}`:`${H}/${zt}`,depth:te+1,resultIndex:cn})))}let Fi=ie?(j?.size??0)===0:ot!==null&&ot.length===0,es=dt;if(!i&&a!==null&&!dt&&$){let Nr=Date.now(),zt={name:Re,relativePath:Qe,isFile:ie,isDirectory:Pe,isEmpty:Fi,mtime:j?.mtime?.getTime()??Date.now(),size:j?.size??0,mode:j?.mode??420,newerRefTimes:w};es=dn(a,zt).pruned,I.evalCalls++,I.evalTime+=Date.now()-Nr}return{relativePath:Qe,name:Re,isFile:ie,isDirectory:Pe,isEmpty:Fi,stat:j,depth:te,children:es?[]:pt,pruned:es}}async function ae(){let q={paths:[],printfData:[]};if(i){let j=function(Re){let Qe={paths:[],printfData:[]},pt=ve[Re];if(!pt)return Qe;for(let dt of pt.childIndices){let en=j(dt);Qe.paths.push(...en.paths),Qe.printfData.push(...en.printfData)}let{print:ht,printfData:ot}=Z(pt.node);return ht&&(Qe.paths.push(pt.node.relativePath),ot&&Qe.printfData.push(ot)),Qe};var H=j;let ve=[],ie=[{item:{path:R,depth:0,resultIndex:0},parentIndex:-1,childOrderInParent:0}],Pe=new Map;for(;ie.length>0;){let Re=Date.now(),Qe=ie.splice(0,Sd),pt=await Promise.all(Qe.map(ht=>B(ht.item)));I.batchCount++,I.batchTime+=Date.now()-Re;for(let ht=0;ht<Qe.length;ht++){let ot=pt[ht],dt=Qe[ht];if(!ot)continue;let en=ve.length;if(dt.parentIndex>=0){let tn=Pe.get(dt.parentIndex)||[];tn.push(en),Pe.set(dt.parentIndex,tn)}ve.push({node:ot,parentIndex:dt.parentIndex,childIndices:[]});for(let tn=0;tn<ot.children.length;tn++)ie.push({item:ot.children[tn],parentIndex:en,childOrderInParent:tn})}}for(let[Re,Qe]of Pe)Re>=0&&Re<ve.length&&(ve[Re].childIndices=Qe);if(ve.length>0){let Re=j(0);q.paths.push(...Re.paths),q.printfData.push(...Re.printfData)}}else{let Re=function(Qe){let pt=ve.get(Qe);pt&&(q.paths.push(pt.path),pt.printfData&&q.printfData.push(pt.printfData));let ht=j.get(Qe);if(ht)for(let ot of ht)Re(ot)};var te=Re;let ve=new Map,ie=0,Pe=[{item:{path:R,depth:0,resultIndex:0},orderIndex:ie++}],j=new Map;for(;Pe.length>0;){let Qe=Date.now(),pt=Pe.splice(0,Sd),ht=await Promise.all(pt.map(async({item:ot,orderIndex:dt})=>{let en=await B(ot);return en?{node:en,orderIndex:dt}:null}));I.batchCount++,I.batchTime+=Date.now()-Qe;for(let ot of ht){if(!ot)continue;let{node:dt,orderIndex:en}=ot,{print:tn,printfData:qs}=Z(dt);if(tn&&ve.set(en,{path:dt.relativePath,printfData:qs}),dt.children.length>0){let ja=[];for(let Fi of dt.children){let es=ie++;ja.push(es),Pe.push({item:Fi,orderIndex:es})}j.set(en,ja)}}}Re(0)}return q}let ye=await ae();if(p.push(...ye.paths),d.push(...ye.printfData),t.trace){let q=Date.now()-L;Ab(t.trace,I,q),t.trace({category:"find",name:"searchPath",durationMs:q,details:{path:T,resultsFound:ye.paths.length}})}}let P="";if(c.length>0)for(let T of c)switch(T.type){case"print":P+=p.length>0?`${p.join(`
505
505
  `)}
506
- `:"";break;case"print0":P+=p.length>0?`${p.join("\0")}\0`:"";break;case"delete":{let O=[...p].sort((I,L)=>L.length-I.length);for(let I of O){let L=t.fs.resolvePath(t.cwd,I);try{await t.fs.rm(L,{recursive:!1})}catch(B){let Z=B instanceof Error?B.message:String(B);m+=`find: cannot delete '${I}': ${Z}
507
- `,g=1}}break}case"printf":for(let O of d)P+=kb(T.format,O);break;case"exec":if(!t.exec)return{stdout:"",stderr:`find: -exec not supported in this context
508
- `,exitCode:1};if(T.batchMode){let O=[];for(let L of T.command)L==="{}"?O.push(...p):O.push(L);let I=await t.exec(sn([O[0]]),{cwd:t.cwd,signal:t.signal,args:O.slice(1)});P+=I.stdout,m+=I.stderr,I.exitCode!==0&&(g=I.exitCode)}else for(let O of p){let I=T.command.map(B=>B==="{}"?O:B),L=await t.exec(sn([I[0]]),{cwd:t.cwd,signal:t.signal,args:I.slice(1)});P+=L.stdout,m+=L.stderr,L.exitCode!==0&&(g=L.exitCode)}break}else f&&(P=p.length>0?`${p.join(`
506
+ `:"";break;case"print0":P+=p.length>0?`${p.join("\0")}\0`:"";break;case"delete":{let R=[...p].sort((I,L)=>L.length-I.length);for(let I of R){let L=t.fs.resolvePath(t.cwd,I);try{await t.fs.rm(L,{recursive:!1})}catch(B){let Z=B instanceof Error?B.message:String(B);m+=`find: cannot delete '${I}': ${Z}
507
+ `,g=1}}break}case"printf":for(let R of d)P+=kb(T.format,R);break;case"exec":if(!t.exec)return{stdout:"",stderr:`find: -exec not supported in this context
508
+ `,exitCode:1};if(T.batchMode){let R=[];for(let L of T.command)L==="{}"?R.push(...p):R.push(L);let I=await t.exec(sn([R[0]]),{cwd:t.cwd,signal:t.signal,args:R.slice(1)});P+=I.stdout,m+=I.stderr,I.exitCode!==0&&(g=I.exitCode)}else for(let R of p){let I=T.command.map(B=>B==="{}"?R:B),L=await t.exec(sn([I[0]]),{cwd:t.cwd,signal:t.signal,args:I.slice(1)});P+=L.stdout,m+=L.stderr,L.exitCode!==0&&(g=L.exitCode)}break}else f&&(P=p.length>0?`${p.join(`
509
509
  `)}
510
510
  `:"");return{stdout:P,stderr:m,exitCode:g}}};$b={name:"find",flags:[{flag:"-name",type:"value",valueHint:"pattern"},{flag:"-iname",type:"value",valueHint:"pattern"},{flag:"-type",type:"value",valueHint:"string"},{flag:"-maxdepth",type:"value",valueHint:"number"},{flag:"-mindepth",type:"value",valueHint:"number"},{flag:"-empty",type:"boolean"},{flag:"-print",type:"boolean"},{flag:"-print0",type:"boolean"}],needsFiles:!0}});var kd={};ee(kd,{basenameCommand:()=>Ob,flagsForFuzzing:()=>Rb});var Tb,Ob,Rb,Nd=k(()=>{"use strict";oe();Tb={name:"basename",summary:"strip directory and suffix from filenames",usage:`basename NAME [SUFFIX]
511
511
  basename OPTION... NAME...`,options:["-a, --multiple support multiple arguments","-s, --suffix=SUFFIX remove a trailing SUFFIX"," --help display this help and exit"]},Ob={name:"basename",async execute(e,t){if(U(e))return M(Tb);let n=!1,r="",s=[];for(let o=0;o<e.length;o++){let a=e[o];a==="-a"||a==="--multiple"?n=!0:a==="-s"&&o+1<e.length?(r=e[++o],n=!0):a.startsWith("--suffix=")?(r=a.slice(9),n=!0):a.startsWith("-")||s.push(a)}if(s.length===0)return{stdout:"",stderr:`basename: missing operand
@@ -551,7 +551,7 @@ ${a} director${a===1?"y":"ies"}`,r.directoriesOnly||(i+=`, ${l} file${l===1?"":"
551
551
  `);a!==-1&&(i=i.slice(a+1))}return await r.exec(i,{env:s,cwd:r.cwd,stdin:r.stdin,stdinKind:"bytes",signal:r.signal})}var Hd,g5,y5,w5,b5,Yl=k(()=>{"use strict";he();er();oe();Hd={name:"bash",summary:"execute shell commands or scripts",usage:"bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]",options:["-c COMMAND execute COMMAND string"," --help display this help and exit"],notes:["Without -c, reads and executes commands from SCRIPT_FILE.","Arguments are passed as $1, $2, etc. to the script.",'$0 is set to the script name (or "bash" with -c).']},g5={name:"bash",async execute(e,t){if(U(e))return M(Hd);if(e[0]==="-c"&&e.length>=2){let s=e[1],i=e[2]||"bash",o=e.slice(3);return bs(s,i,o,t)}if(e.length===0){let s=se(t.stdin);return s.trim()?bs(s,"bash",[],t):{stdout:"",stderr:"",exitCode:0}}let n=e[0],r=e.slice(1);try{let s=t.fs.resolvePath(t.cwd,n),i=await t.fs.readFile(s);return bs(i,n,r,t)}catch{return{stdout:"",stderr:`bash: ${n}: No such file or directory
552
552
  `,exitCode:127}}}},y5={name:"sh",async execute(e,t){if(U(e))return M({...Hd,name:"sh",summary:"execute shell commands or scripts (POSIX shell)"});if(e[0]==="-c"&&e.length>=2){let s=e[1],i=e[2]||"sh",o=e.slice(3);return bs(s,i,o,t)}if(e.length===0){let s=se(t.stdin);return s.trim()?bs(s,"sh",[],t):{stdout:"",stderr:"",exitCode:0}}let n=e[0],r=e.slice(1);try{let s=t.fs.resolvePath(t.cwd,n),i=await t.fs.readFile(s);return bs(i,n,r,t)}catch{return{stdout:"",stderr:`sh: ${n}: No such file or directory
553
553
  `,exitCode:127}}}};w5={name:"bash",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"},b5={name:"sh",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"}});function Jl(e,t,n,r,s,i,o,a,l,c){switch(t){case"sort":return Array.isArray(e)?[[...e].sort(o)]:[null];case"sort_by":return!Array.isArray(e)||n.length===0?[null]:[[...e].sort((f,p)=>{let h=s(f,n[0],r)[0],d=s(p,n[0],r)[0];return o(h,d)})];case"bsearch":{if(!Array.isArray(e)){let f=e===null?"null":typeof e=="object"?"object":typeof e;throw new Error(`${f} (${JSON.stringify(e)}) cannot be searched from`)}return n.length===0?[null]:s(e,n[0],r).map(f=>{let p=0,h=e.length;for(;p<h;){let d=p+h>>>1;o(e[d],f)<0?p=d+1:h=d}return p<e.length&&o(e[p],f)===0?p:-p-1})}case"unique_by":{if(!Array.isArray(e)||n.length===0)return[null];let u=new Map;for(let p of e){let h=s(p,n[0],r)[0],d=JSON.stringify(h);u.has(d)||u.set(d,{item:p,key:h})}let f=[...u.values()];return f.sort((p,h)=>o(p.key,h.key)),[f.map(p=>p.item)]}case"group_by":{if(!Array.isArray(e)||n.length===0)return[null];let u=new Map;for(let f of e){let p=JSON.stringify(s(f,n[0],r)[0]);u.has(p)||u.set(p,[]),u.get(p)?.push(f)}return[[...u.values()]]}case"max":return Array.isArray(e)&&e.length>0?[e.reduce((u,f)=>o(u,f)>0?u:f)]:[null];case"max_by":return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((u,f)=>{let p=s(u,n[0],r)[0],h=s(f,n[0],r)[0];return o(p,h)>0?u:f})];case"min":return Array.isArray(e)&&e.length>0?[e.reduce((u,f)=>o(u,f)<0?u:f)]:[null];case"min_by":return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((u,f)=>{let p=s(u,n[0],r)[0],h=s(f,n[0],r)[0];return o(p,h)<0?u:f})];case"add":{let u=f=>{let p=f.filter(h=>h!==null);return p.length===0?null:p.every(h=>typeof h=="number")?p.reduce((h,d)=>h+d,0):p.every(h=>typeof h=="string")?p.join(""):p.every(h=>Array.isArray(h))?p.flat():p.every(h=>h&&typeof h=="object"&&!Array.isArray(h))?Dr(...p):null};if(n.length>=1){let f=s(e,n[0],r);return[u(f)]}return Array.isArray(e)?[u(e)]:[null]}case"any":{if(n.length>=2){try{let u=i(e,n[0],r);for(let f of u)if(s(f,n[1],r).some(a))return[!0]}catch(u){if(u instanceof c)throw u}return[!1]}return n.length===1?Array.isArray(e)?[e.some(u=>a(s(u,n[0],r)[0]))]:[!1]:Array.isArray(e)?[e.some(a)]:[!1]}case"all":{if(n.length>=2){try{let u=i(e,n[0],r);for(let f of u)if(!s(f,n[1],r).some(a))return[!1]}catch(u){if(u instanceof c)throw u}return[!0]}return n.length===1?Array.isArray(e)?[e.every(u=>a(s(u,n[0],r)[0]))]:[!0]:Array.isArray(e)?[e.every(a)]:[!0]}case"select":return n.length===0?[e]:s(e,n[0],r).some(a)?[e]:[];case"map":return n.length===0||!Array.isArray(e)?[null]:[e.flatMap(f=>s(f,n[0],r))];case"map_values":{if(n.length===0)return[null];if(Array.isArray(e))return[e.flatMap(u=>s(u,n[0],r))];if(e&&typeof e=="object"){let u=Object.create(null);for(let[f,p]of Object.entries(e)){if(!_e(f))continue;let h=s(p,n[0],r);h.length>0&&ze(u,f,h[0])}return[u]}return[null]}case"has":{if(n.length===0)return[!1];let f=s(e,n[0],r)[0];return Array.isArray(e)&&typeof f=="number"?[f>=0&&f<e.length]:e&&typeof e=="object"&&typeof f=="string"?[Wn(e,f)]:[!1]}case"in":{if(n.length===0)return[!1];let f=s(e,n[0],r)[0];return Array.isArray(f)&&typeof e=="number"?[e>=0&&e<f.length]:f&&typeof f=="object"&&typeof e=="string"?[Wn(f,e)]:[!1]}case"contains":{if(n.length===0)return[!1];let u=s(e,n[0],r);return[l(e,u[0])]}case"inside":{if(n.length===0)return[!1];let u=s(e,n[0],r);return[l(u[0],e)]}default:return null}}var jd=k(()=>{"use strict";er();Sn()});function ec(e,t,n,r,s,i,o,a){switch(t){case"first":if(n.length>0)try{let l=i(e,n[0],r);return l.length>0?[l[0]]:[]}catch(l){if(l instanceof a)throw l;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case"last":if(n.length>0){let l=s(e,n[0],r);return l.length>0?[l[l.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case"nth":{if(n.length<1)return[null];let l=s(e,n[0],r);if(n.length>1){for(let u of l)if(u<0)throw new Error("nth doesn't support negative indices");let c;try{c=i(e,n[1],r)}catch(u){if(u instanceof a)throw u;c=[]}return l.flatMap(u=>{let f=u;return f<c.length?[c[f]]:[]})}return Array.isArray(e)?l.flatMap(c=>{let u=c;if(u<0)throw new Error("nth doesn't support negative indices");return u<e.length?[e[u]]:[null]}):[null]}case"range":{if(n.length===0)return[];let l=Math.max(r.limits.maxIterations*100,1e6),c=d=>d.length>=l,u=s(e,n[0],r);if(n.length===1){let d=[];for(let m of u){let g=m;for(let y=0;y<g;y++)if(d.push(y),c(d))return d}return d}let f=s(e,n[1],r);if(n.length===2){let d=[];for(let m of u)for(let g of f){let y=m,w=g;for(let b=y;b<w;b++)if(d.push(b),c(d))return d}return d}let p=s(e,n[2],r),h=[];for(let d of u)for(let m of f)for(let g of p){let y=d,w=m,b=g;if(b!==0){if(b>0){for(let x=y;x<w;x+=b)if(h.push(x),c(h))return h}else for(let x=y;x>w;x+=b)if(h.push(x),c(h))return h}}return h}case"limit":return n.length<2?[]:s(e,n[0],r).flatMap(c=>{let u=c;if(u<0)throw new Error("limit doesn't support negative count");if(u===0)return[];let f;try{f=i(e,n[1],r)}catch(p){if(p instanceof a)throw p;f=[]}return f.slice(0,u)});case"isempty":{if(n.length<1)return[!0];try{return[i(e,n[0],r).length===0]}catch(l){if(l instanceof a)throw l;return[!0]}}case"isvalid":{if(n.length<1)return[!0];try{return[s(e,n[0],r).length>0]}catch(l){if(l instanceof a)throw l;return[!1]}}case"skip":return n.length<2?[]:s(e,n[0],r).flatMap(c=>{let u=c;if(u<0)throw new Error("skip doesn't support negative count");return s(e,n[1],r).slice(u)});case"until":{if(n.length<2)return[e];let l=e,c=r.limits.maxIterations;for(let u=0;u<c;u++){if(s(l,n[0],r).some(o))return[l];let p=s(l,n[1],r);if(p.length===0)return[l];l=p[0]}throw new a(`jq until: too many iterations (${c}), increase executionLimits.maxJqIterations`,"iterations")}case"while":{if(n.length<2)return[e];let l=[],c=e,u=r.limits.maxIterations;for(let f=0;f<u&&s(c,n[0],r).some(o);f++){l.push(c);let h=s(c,n[1],r);if(h.length===0)break;c=h[0]}if(l.length>=u)throw new a(`jq while: too many iterations (${u}), increase executionLimits.maxJqIterations`,"iterations");return l}case"repeat":{if(n.length===0)return[e];let l=[],c=e,u=r.limits.maxIterations;for(let f=0;f<u;f++){l.push(c);let p=s(c,n[0],r);if(p.length===0)break;c=p[0]}if(l.length>=u)throw new a(`jq repeat: too many iterations (${u}), increase executionLimits.maxJqIterations`,"iterations");return l}default:return null}}var Gd=k(()=>{"use strict"});function tc(e,t,n,r,s){switch(t){case"now":return[Date.now()/1e3];case"gmtime":{if(typeof e!="number")return[null];let i=new Date(e*1e3),o=i.getUTCFullYear(),a=i.getUTCMonth(),l=i.getUTCDate(),c=i.getUTCHours(),u=i.getUTCMinutes(),f=i.getUTCSeconds(),p=i.getUTCDay(),h=Date.UTC(o,0,1),d=Math.floor((i.getTime()-h)/(1440*60*1e3));return[[o,a,l,c,u,f,p,d]]}case"mktime":{if(!Array.isArray(e))throw new Error("mktime requires parsed datetime inputs");let[i,o,a,l=0,c=0,u=0]=e;if(typeof i!="number"||typeof o!="number")throw new Error("mktime requires parsed datetime inputs");let f=Date.UTC(i,o,a??1,l??0,c??0,u??0);return[Math.floor(f/1e3)]}case"strftime":{if(n.length===0)return[null];let o=s(e,n[0],r)[0];if(typeof o!="string")throw new Error("strftime/1 requires a string format");let a;if(typeof e=="number")a=new Date(e*1e3);else if(Array.isArray(e)){let[p,h,d,m=0,g=0,y=0]=e;if(typeof p!="number"||typeof h!="number")throw new Error("strftime/1 requires parsed datetime inputs");a=new Date(Date.UTC(p,h,d??1,m??0,g??0,y??0))}else throw new Error("strftime/1 requires parsed datetime inputs");let l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],u=(p,h=2)=>String(p).padStart(h,"0");return[o.replace(/%Y/g,String(a.getUTCFullYear())).replace(/%m/g,u(a.getUTCMonth()+1)).replace(/%d/g,u(a.getUTCDate())).replace(/%H/g,u(a.getUTCHours())).replace(/%M/g,u(a.getUTCMinutes())).replace(/%S/g,u(a.getUTCSeconds())).replace(/%A/g,l[a.getUTCDay()]).replace(/%B/g,c[a.getUTCMonth()]).replace(/%Z/g,"UTC").replace(/%%/g,"%")]}case"strptime":{if(n.length===0)return[null];if(typeof e!="string")throw new Error("strptime/1 requires a string input");let o=s(e,n[0],r)[0];if(typeof o!="string")throw new Error("strptime/1 requires a string format");if(o==="%Y-%m-%dT%H:%M:%SZ"){let l=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(l){let[,c,u,f,p,h,d]=l.map(Number),m=new Date(Date.UTC(c,u-1,f,p,h,d)),g=m.getUTCDay(),y=Date.UTC(c,0,1),w=Math.floor((m.getTime()-y)/(1440*60*1e3));return[[c,u-1,f,p,h,d,g,w]]}}let a=new Date(e);if(!Number.isNaN(a.getTime())){let l=a.getUTCFullYear(),c=a.getUTCMonth(),u=a.getUTCDate(),f=a.getUTCHours(),p=a.getUTCMinutes(),h=a.getUTCSeconds(),d=a.getUTCDay(),m=Date.UTC(l,0,1),g=Math.floor((a.getTime()-m)/(1440*60*1e3));return[[l,c,u,f,p,h,d,g]]}throw new Error(`Cannot parse date: ${e}`)}case"fromdate":{if(typeof e!="string")throw new Error("fromdate requires a string input");let i=new Date(e);if(Number.isNaN(i.getTime()))throw new Error(`date "${e}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(i.getTime()/1e3)]}case"todate":{if(typeof e!="number")throw new Error("todate requires a number input");return[new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,"Z")]}default:return null}}var Vd=k(()=>{"use strict"});function mn(e){return e!==!1&&e!==null}function xs(e,t){return JSON.stringify(e)===JSON.stringify(t)}function ui(e,t){return typeof e=="number"&&typeof t=="number"?e-t:typeof e=="string"&&typeof t=="string"?e.localeCompare(t):0}function nc(e,t){let n=wt(e);for(let r of Object.keys(t)){if(!_e(r))continue;let s=Wn(n,r)?Ge(n[r]):null,i=Ge(t[r]);s&&i?ze(n,r,nc(s,i)):ze(n,r,t[r])}return n}function Es(e,t=3e3){let n=0,r=e;for(;n<t;)if(Array.isArray(r)){if(r.length===0)return n+1;r=r[0],n++}else if(r!==null&&typeof r=="object"){let s=Object.keys(r);if(s.length===0)return n+1;r=r[s[0]],n++}else return n;return n}function yo(e,t){let n=a=>a===null?0:typeof a=="boolean"?1:typeof a=="number"?2:typeof a=="string"?3:Array.isArray(a)?4:typeof a=="object"?5:6,r=n(e),s=n(t);if(r!==s)return r-s;if(typeof e=="number"&&typeof t=="number")return e-t;if(typeof e=="string"&&typeof t=="string")return e.localeCompare(t);if(typeof e=="boolean"&&typeof t=="boolean")return(e?1:0)-(t?1:0);if(Array.isArray(e)&&Array.isArray(t)){for(let a=0;a<Math.min(e.length,t.length);a++){let l=yo(e[a],t[a]);if(l!==0)return l}return e.length-t.length}let i=Ge(e),o=Ge(t);if(i&&o){let a=Object.keys(i).sort(),l=Object.keys(o).sort();for(let c=0;c<Math.min(a.length,l.length);c++){let u=a[c].localeCompare(l[c]);if(u!==0)return u}if(a.length!==l.length)return a.length-l.length;for(let c of a){let u=yo(i[c],o[c]);if(u!==0)return u}}return 0}function wo(e,t){if(xs(e,t))return!0;if(typeof e=="string"&&typeof t=="string")return e.includes(t);if(Array.isArray(e)&&Array.isArray(t))return t.every(s=>e.some(i=>wo(i,s)));let n=Ge(e),r=Ge(t);return n&&r?Object.keys(r).every(s=>Wn(n,s)&&wo(n[s],r[s])):!1}var bo=k(()=>{"use strict";Sn()});function rc(e,t,n){switch(t){case"@base64":return typeof e=="string"?typeof Buffer<"u"?[Buffer.from(e,"utf-8").toString("base64")]:[btoa(e)]:[null];case"@base64d":return typeof e=="string"?typeof Buffer<"u"?[Buffer.from(e,"base64").toString("utf-8")]:[atob(e)]:[null];case"@uri":return typeof e=="string"?[encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")]:[null];case"@urid":return typeof e=="string"?[decodeURIComponent(e)]:[null];case"@csv":return Array.isArray(e)?[e.map(s=>{if(s===null)return"";if(typeof s=="boolean")return s?"true":"false";if(typeof s=="number")return String(s);let i=String(s);return i.includes(",")||i.includes('"')||i.includes(`
554
- `)||i.includes("\r")?`"${i.replace(/"/g,'""')}"`:i}).join(",")]:[null];case"@tsv":return Array.isArray(e)?[e.map(r=>String(r??"").replace(/\t/g,"\\t").replace(/\n/g,"\\n")).join(" ")]:[null];case"@json":{let r=n??x5;return Es(e,r+1)>r?[null]:[JSON.stringify(e)]}case"@html":return typeof e=="string"?[e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")]:[null];case"@sh":return typeof e=="string"?[`'${e.replace(/'/g,"'\\''")}'`]:[null];case"@text":return typeof e=="string"?[e]:e==null?[""]:[String(e)];default:return null}}var x5,qd=k(()=>{"use strict";bo();x5=2e3});function sc(e,t,n,r,s,i){switch(t){case"index":return n.length===0?[null]:s(e,n[0],r).map(a=>{if(typeof e=="string"&&typeof a=="string"){if(a===""&&e==="")return null;let l=e.indexOf(a);return l>=0?l:null}if(Array.isArray(e)){if(Array.isArray(a)){for(let c=0;c<=e.length-a.length;c++){let u=!0;for(let f=0;f<a.length;f++)if(!i(e[c+f],a[f])){u=!1;break}if(u)return c}return null}let l=e.findIndex(c=>i(c,a));return l>=0?l:null}return null});case"rindex":return n.length===0?[null]:s(e,n[0],r).map(a=>{if(typeof e=="string"&&typeof a=="string"){let l=e.lastIndexOf(a);return l>=0?l:null}if(Array.isArray(e)){if(Array.isArray(a)){for(let l=e.length-a.length;l>=0;l--){let c=!0;for(let u=0;u<a.length;u++)if(!i(e[l+u],a[u])){c=!1;break}if(c)return l}return null}for(let l=e.length-1;l>=0;l--)if(i(e[l],a))return l;return null}return null});case"indices":return n.length===0?[[]]:s(e,n[0],r).map(a=>{let l=[];if(typeof e=="string"&&typeof a=="string"){let c=e.indexOf(a);for(;c!==-1;)l.push(c),c=e.indexOf(a,c+1)}else if(Array.isArray(e))if(Array.isArray(a)){let c=a.length;if(c===0)for(let u=0;u<=e.length;u++)l.push(u);else for(let u=0;u<=e.length-c;u++){let f=!0;for(let p=0;p<c;p++)if(!i(e[u+p],a[p])){f=!1;break}f&&l.push(u)}}else for(let c=0;c<e.length;c++)i(e[c],a)&&l.push(c);return l});default:return null}}var Zd=k(()=>{"use strict"});function ic(e,t,n,r,s){switch(t){case"fabs":case"abs":return typeof e=="number"?[Math.abs(e)]:typeof e=="string"?[e]:[null];case"exp10":return typeof e=="number"?[10**e]:[null];case"exp2":return typeof e=="number"?[2**e]:[null];case"pow":{if(n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=i[0],l=o[0];return typeof a!="number"||typeof l!="number"?[null]:[a**l]}case"atan2":{if(n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=i[0],l=o[0];return typeof a!="number"||typeof l!="number"?[null]:[Math.atan2(a,l)]}case"hypot":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.hypot(e,i)]}case"fma":{if(typeof e!="number"||n.length<2)return[null];let i=s(e,n[0],r)[0],o=s(e,n[1],r)[0];return[e*i+o]}case"copysign":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.sign(i)*Math.abs(e)]}case"drem":case"remainder":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[e-Math.round(e/i)*i]}case"fdim":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.max(0,e-i)]}case"fmax":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.max(e,i)]}case"fmin":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.min(e,i)]}case"ldexp":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[e*2**i]}case"scalbn":case"scalbln":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[e*2**i]}case"nearbyint":return typeof e=="number"?[Math.round(e)]:[null];case"logb":return typeof e=="number"?[Math.floor(Math.log2(Math.abs(e)))]:[null];case"significand":if(typeof e=="number"){let i=Math.floor(Math.log2(Math.abs(e)));return[e/2**i]}return[null];case"frexp":if(typeof e=="number"){if(e===0)return[[0,0]];let i=Math.floor(Math.log2(Math.abs(e)))+1;return[[e/2**i,i]]}return[null];case"modf":if(typeof e=="number"){let i=Math.trunc(e);return[[e-i,i]]}return[null];default:return null}}var Kd=k(()=>{"use strict"});function oc(e,t,n,r,s,i,o,a){switch(t){case"recurse":{if(n.length===0){let h=[],d=m=>{if(h.push(m),Array.isArray(m))for(let g of m)d(g);else if(m&&typeof m=="object")for(let g of Object.keys(m))d(m[g])};return d(e),h}let l=[],c=n.length>=2?n[1]:null,u=1e4,f=0,p=h=>{if(f++>u||c&&!s(h,c,r).some(i))return;l.push(h);let d=s(h,n[0],r);for(let m of d)m!=null&&p(m)};return p(e),l}case"recurse_down":return a(e,"recurse",n,r);case"walk":{if(n.length===0)return[e];let l=new WeakSet,c=u=>{if(u&&typeof u=="object"){if(l.has(u))return u;l.add(u)}let f;if(Array.isArray(u))f=u.map(c);else if(u&&typeof u=="object"){let h=Object.create(null);for(let[d,m]of Object.entries(u))_e(d)&&ze(h,d,c(m));f=h}else f=u;return s(f,n[0],r)[0]};return[c(e)]}case"transpose":{if(!Array.isArray(e))return[null];if(e.length===0)return[[]];let l=Math.max(...e.map(u=>Array.isArray(u)?u.length:0)),c=[];for(let u=0;u<l;u++)c.push(e.map(f=>Array.isArray(f)?f[u]:null));return[c]}case"combinations":{if(n.length>0){let f=s(e,n[0],r)[0];if(!Array.isArray(e)||f<0)return[];if(f===0)return[[]];let p=[],h=(d,m)=>{if(m===f){p.push([...d]);return}for(let g of e)d.push(g),h(d,m+1),d.pop()};return h([],0),p}if(!Array.isArray(e))return[];if(e.length===0)return[[]];for(let u of e)if(!Array.isArray(u))return[];let l=[],c=(u,f)=>{if(u===e.length){l.push([...f]);return}let p=e[u];for(let h of p)f.push(h),c(u+1,f),f.pop()};return c(0,[]),l}case"parent":{if(r.root===void 0||r.currentPath===void 0)return[];let l=r.currentPath;if(l.length===0)return[];let c=n.length>0?s(e,n[0],r)[0]:1;if(c>=0){if(c>l.length)return[];let u=l.slice(0,l.length-c);return[o(r.root,u)]}else{let u=-c-1;if(u>=l.length)return[e];let f=l.slice(0,u);return[o(r.root,f)]}}case"parents":{if(r.root===void 0||r.currentPath===void 0)return[[]];let l=r.currentPath,c=[];for(let u=l.length-1;u>=0;u--)c.push(o(r.root,l.slice(0,u)));return[c]}case"root":return r.root!==void 0?[r.root]:[];default:return null}}var Qd=k(()=>{"use strict";Sn()});function ac(e,t,n,r,s){switch(t){case"keys":return Array.isArray(e)?[e.map((i,o)=>o)]:e&&typeof e=="object"?[Object.keys(e).sort()]:[null];case"keys_unsorted":return Array.isArray(e)?[e.map((i,o)=>o)]:e&&typeof e=="object"?[Object.keys(e)]:[null];case"length":return typeof e=="string"?[e.length]:Array.isArray(e)?[e.length]:e&&typeof e=="object"?[Object.keys(e).length]:e===null?[0]:typeof e=="number"?[Math.abs(e)]:[null];case"utf8bytelength":{if(typeof e=="string")return[new TextEncoder().encode(e).length];let i=e===null?"null":Array.isArray(e)?"array":typeof e,o=i==="array"||i==="object"?JSON.stringify(e):String(e);throw new Error(`${i} (${o}) only strings have UTF-8 byte length`)}case"to_entries":{let i=Ge(e);return i?[Object.entries(i).map(([o,a])=>({key:o,value:a}))]:[null]}case"from_entries":if(Array.isArray(e)){let i=Object.create(null);for(let o of e){let a=Ge(o);if(a){let l=a.key??a.Key??a.name??a.Name??a.k,c=a.value??a.Value??a.v;if(l!==void 0){let u=String(l);_e(u)&&ze(i,u,c)}}}return[i]}return[null];case"with_entries":{if(n.length===0)return[e];let i=Ge(e);if(i){let a=Object.entries(i).map(([c,u])=>({key:c,value:u})).flatMap(c=>s(c,n[0],r)),l=Object.create(null);for(let c of a){let u=Ge(c);if(u){let f=u.key??u.name??u.k,p=u.value??u.v;if(f!==void 0){let h=String(f);_e(h)&&ze(l,h,p)}}}return[l]}return[null]}case"reverse":return Array.isArray(e)?[[...e].reverse()]:typeof e=="string"?[e.split("").reverse().join("")]:[null];case"flatten":return Array.isArray(e)?(n.length>0?s(e,n[0],r):[Number.POSITIVE_INFINITY]).map(o=>{let a=o;if(a<0)throw new Error("flatten depth must not be negative");return e.flat(a)}):[null];case"unique":if(Array.isArray(e)){let i=new Set,o=[];for(let a of e){let l=JSON.stringify(a);i.has(l)||(i.add(l),o.push(a))}return[o]}return[null];case"tojson":case"tojsonstream":{let i=r.limits.maxDepth??E5;return Es(e,i+1)>i?[null]:[JSON.stringify(e)]}case"fromjson":{if(typeof e=="string"){let i=e.trim().toLowerCase();if(i==="nan")return[Number.NaN];if(i==="inf"||i==="infinity")return[Number.POSITIVE_INFINITY];if(i==="-inf"||i==="-infinity")return[Number.NEGATIVE_INFINITY];try{return[fs(JSON.parse(e))]}catch{throw new Error(`Invalid JSON: ${e}`)}}return[e]}case"tostring":return typeof e=="string"?[e]:[JSON.stringify(e)];case"tonumber":if(typeof e=="number")return[e];if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i))throw new Error(`${JSON.stringify(e)} cannot be parsed as a number`);return[i]}throw new Error(`${typeof e} cannot be parsed as a number`);case"toboolean":{if(typeof e=="boolean")return[e];if(typeof e=="string"){if(e==="true")return[!0];if(e==="false")return[!1];throw new Error(`string (${JSON.stringify(e)}) cannot be parsed as a boolean`)}let i=e===null?"null":Array.isArray(e)?"array":typeof e,o=i==="array"||i==="object"?JSON.stringify(e):String(e);throw new Error(`${i} (${o}) cannot be parsed as a boolean`)}case"tostream":{let i=[],o=(a,l)=>{if(a===null||typeof a!="object")i.push([l,a]);else if(Array.isArray(a))if(a.length===0)i.push([l,[]]);else for(let c=0;c<a.length;c++)o(a[c],[...l,c]);else{let c=Object.keys(a);if(c.length===0)i.push([l,Object.create(null)]);else for(let u of c)o(a[u],[...l,u])}};return o(e,[]),i.push([[]]),i}case"fromstream":{if(n.length===0)return[e];let i=s(e,n[0],r),o=null;for(let a of i){if(!Array.isArray(a)||a.length===1&&Array.isArray(a[0])&&a[0].length===0||a.length!==2)continue;let[l,c]=a;if(!Array.isArray(l))continue;if(l.length===0){o=c;continue}o===null&&(o=typeof l[0]=="number"?[]:Object.create(null));let u=o;for(let p=0;p<l.length-1;p++){let h=l[p],d=l[p+1];if(Array.isArray(u)&&typeof h=="number"){for(;u.length<=h;)u.push(null);u[h]===null&&(u[h]=typeof d=="number"?[]:Object.create(null)),u=u[h]}else{let m=Ge(u);if(m){let g=String(h);if(!_e(g))continue;(m[g]===null||m[g]===void 0)&&ze(m,g,typeof d=="number"?[]:Object.create(null)),u=m[g]}}}let f=l[l.length-1];if(Array.isArray(u)&&typeof f=="number"){for(;u.length<=f;)u.push(null);u[f]=c}else{let p=Ge(u);if(p){let h=String(f);_e(h)&&ze(p,h,c)}}}return[o]}case"truncate_stream":{let i=typeof e=="number"?Math.floor(e):0;if(n.length===0)return[];let o=[],a=s(e,n[0],r);for(let l of a)if(Array.isArray(l)){if(l.length===1&&Array.isArray(l[0])){let c=l[0];c.length>i&&o.push([c.slice(i)]);continue}if(l.length===2&&Array.isArray(l[0])){let c=l[0],u=l[1];c.length>i&&o.push([c.slice(i),u])}}return o}default:return null}}var E5,Xd=k(()=>{"use strict";Sn();bo();E5=2e3});function lc(e,t,n,r,s,i,o,a,l,c){switch(t){case"getpath":{if(n.length===0)return[null];let u=s(e,n[0],r),f=[];for(let p of u){let h=p,d=e;for(let m of h){if(d==null){d=null;break}if(Array.isArray(d)&&typeof m=="number")d=d[m];else if(typeof m=="string"){let g=Ge(d);if(!g||!Object.hasOwn(g,m)){d=null;break}d=g[m]}else{d=null;break}}f.push(d)}return f}case"setpath":{if(n.length<2)return[null];let f=s(e,n[0],r)[0],h=s(e,n[1],r)[0];return[o(e,f,h)]}case"delpaths":{if(n.length===0)return[e];let f=s(e,n[0],r)[0],p=e;for(let h of f.sort((d,m)=>m.length-d.length))p=a(p,h);return[p]}case"path":{if(n.length===0)return[[]];let u=[];return c(e,n[0],r,[],u),u}case"del":return n.length===0?[e]:[l(e,n[0],r)];case"pick":{if(n.length===0)return[null];let u=[];for(let p of n)c(e,p,r,[],u);let f=null;for(let p of u){for(let d of p)if(typeof d=="number"&&d<0)throw new Error("Out of bounds negative array index");let h=e;for(let d of p){if(h==null)break;if(Array.isArray(h)&&typeof d=="number")h=h[d];else if(typeof d=="string"){let m=Ge(h);if(!m||!Object.hasOwn(m,d)){h=null;break}h=m[d]}else{h=null;break}}f=o(f,p,h)}return[f]}case"paths":{let u=[],f=(p,h)=>{if(p&&typeof p=="object")if(Array.isArray(p))for(let d=0;d<p.length;d++)u.push([...h,d]),f(p[d],[...h,d]);else for(let d of Object.keys(p))u.push([...h,d]),f(p[d],[...h,d])};return f(e,[]),n.length>0?u.filter(p=>{let h=e;for(let m of p)if(Array.isArray(h)&&typeof m=="number")h=h[m];else if(typeof m=="string"){let g=Ge(h);if(!g||!Object.hasOwn(g,m))return!1;h=g[m]}else return!1;return s(h,n[0],r).some(i)}):u}case"leaf_paths":{let u=[],f=(p,h)=>{if(p===null||typeof p!="object")u.push(h);else if(Array.isArray(p))for(let d=0;d<p.length;d++)f(p[d],[...h,d]);else for(let d of Object.keys(p))f(p[d],[...h,d])};return f(e,[]),u}default:return null}}var Yd=k(()=>{"use strict";Sn()});function cc(e,t,n,r,s,i){switch(t){case"IN":{if(n.length===0)return[!1];if(n.length===1){let c=s(e,n[0],r);for(let u of c)if(i(e,u))return[!0];return[!1]}let o=s(e,n[0],r),a=s(e,n[1],r),l=new Set(a.map(c=>JSON.stringify(c)));for(let c of o)if(l.has(JSON.stringify(c)))return[!0];return[!1]}case"INDEX":{if(n.length===0)return[Object.create(null)];if(n.length===1){let l=s(e,n[0],r),c=Object.create(null);for(let u of l){let f=String(u);_e(f)&&ze(c,f,u)}return[c]}if(n.length===2){let l=s(e,n[0],r),c=Object.create(null);for(let u of l){let f=s(u,n[1],r);if(f.length>0){let p=String(f[0]);_e(p)&&ze(c,p,u)}}return[c]}let o=s(e,n[0],r),a=Object.create(null);for(let l of o){let c=s(l,n[1],r),u=s(l,n[2],r);if(c.length>0&&u.length>0){let f=String(c[0]);_e(f)&&ze(a,f,u[0])}}return[a]}case"JOIN":{if(n.length<2)return[null];let o=Ge(s(e,n[0],r)[0]);if(!o)return[null];if(!Array.isArray(e))return[null];let a=[];for(let l of e){let c=s(l,n[1],r),u=c.length>0?String(c[0]):"",f=Wn(o,u)?o[u]:null;a.push([l,f])}return[a]}default:return null}}var Jd=k(()=>{"use strict";Sn()});function uc(e,t,n,r,s){switch(t){case"join":{if(!Array.isArray(e))return[null];let i=n.length>0?s(e,n[0],r):[""];for(let o of e)if(Array.isArray(o)||o!==null&&typeof o=="object")throw new Error("cannot join: contains arrays or objects");return i.map(o=>e.map(a=>a===null?"":typeof a=="string"?a:String(a)).join(String(o)))}case"split":{if(typeof e!="string"||n.length===0)return[null];let i=s(e,n[0],r),o=String(i[0]);return[e.split(o)]}case"splits":{if(typeof e!="string"||n.length===0)return[];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"g";return Q(o,a.includes("g")?a:`${a}g`).split(e)}catch{return[]}}case"scan":{if(typeof e!="string"||n.length===0)return[];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"";return[...Q(o,a.includes("g")?a:`${a}g`).matchAll(e)].map(u=>u.length>1?u.slice(1):u[0])}catch{return[]}}case"test":{if(typeof e!="string"||n.length===0)return[!1];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"";return[Q(o,a).test(e)]}catch{return[!1]}}case"match":{if(typeof e!="string"||n.length===0)return[null];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"",c=Q(o,`${a}d`).exec(e);if(!c)return[];let u=c.indices;return[{offset:c.index,length:c[0].length,string:c[0],captures:c.slice(1).map((f,p)=>({offset:u?.[p+1]?.[0]??null,length:f?.length??0,string:f??"",name:null}))}]}catch{return[null]}}case"capture":{if(typeof e!="string"||n.length===0)return[null];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"",c=Q(o,a).match(e);return!c||!c.groups?[Object.create(null)]:[c.groups]}catch{return[null]}}case"sub":{if(typeof e!="string"||n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=String(i[0]),l=String(o[0]);try{let c=n.length>2?String(s(e,n[2],r)[0]):"";return[Q(a,c).replace(e,l)]}catch{return[e]}}case"gsub":{if(typeof e!="string"||n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=String(i[0]),l=String(o[0]);try{let c=n.length>2?String(s(e,n[2],r)[0]):"g",u=c.includes("g")?c:`${c}g`;return[Q(a,u).replace(e,l)]}catch{return[e]}}case"ascii_downcase":return typeof e=="string"?[e.replace(/[A-Z]/g,i=>String.fromCharCode(i.charCodeAt(0)+32))]:[null];case"ascii_upcase":return typeof e=="string"?[e.replace(/[a-z]/g,i=>String.fromCharCode(i.charCodeAt(0)-32))]:[null];case"ltrimstr":{if(typeof e!="string"||n.length===0)return[e];let i=s(e,n[0],r),o=String(i[0]);return[e.startsWith(o)?e.slice(o.length):e]}case"rtrimstr":{if(typeof e!="string"||n.length===0)return[e];let i=s(e,n[0],r),o=String(i[0]);return o===""?[e]:[e.endsWith(o)?e.slice(0,-o.length):e]}case"trimstr":{if(typeof e!="string"||n.length===0)return[e];let i=s(e,n[0],r),o=String(i[0]);if(o==="")return[e];let a=e;return a.startsWith(o)&&(a=a.slice(o.length)),a.endsWith(o)&&(a=a.slice(0,-o.length)),[a]}case"trim":if(typeof e=="string")return[e.trim()];throw new Error("trim input must be a string");case"ltrim":if(typeof e=="string")return[e.trimStart()];throw new Error("trim input must be a string");case"rtrim":if(typeof e=="string")return[e.trimEnd()];throw new Error("trim input must be a string");case"startswith":{if(typeof e!="string"||n.length===0)return[!1];let i=s(e,n[0],r);return[e.startsWith(String(i[0]))]}case"endswith":{if(typeof e!="string"||n.length===0)return[!1];let i=s(e,n[0],r);return[e.endsWith(String(i[0]))]}case"ascii":return typeof e=="string"&&e.length>0?[e.charCodeAt(0)]:[null];case"explode":return typeof e=="string"?[Array.from(e).map(i=>i.codePointAt(0))]:[null];case"implode":if(!Array.isArray(e))throw new Error("implode input must be an array");return[e.map(a=>{if(typeof a=="string")throw new Error(`string (${JSON.stringify(a)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof a!="number"||Number.isNaN(a))throw new Error("number (null) can't be imploded, unicode codepoint needs to be numeric");let l=Math.trunc(a);return l<0||l>1114111||l>=55296&&l<=57343?String.fromCodePoint(65533):String.fromCodePoint(l)}).join("")];default:return null}}var em=k(()=>{"use strict";Ze()});function fc(e,t){switch(t){case"type":return e===null?["null"]:Array.isArray(e)?["array"]:typeof e=="boolean"?["boolean"]:typeof e=="number"?["number"]:typeof e=="string"?["string"]:typeof e=="object"?["object"]:["null"];case"infinite":return[Number.POSITIVE_INFINITY];case"nan":return[Number.NaN];case"isinfinite":return[typeof e=="number"&&!Number.isFinite(e)];case"isnan":return[typeof e=="number"&&Number.isNaN(e)];case"isnormal":return[typeof e=="number"&&Number.isFinite(e)&&e!==0];case"isfinite":return[typeof e=="number"&&Number.isFinite(e)];case"numbers":return typeof e=="number"?[e]:[];case"strings":return typeof e=="string"?[e]:[];case"booleans":return typeof e=="boolean"?[e]:[];case"nulls":return e===null?[e]:[];case"arrays":return Array.isArray(e)?[e]:[];case"objects":return e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"iterables":return Array.isArray(e)||e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"scalars":return!Array.isArray(e)&&!(e&&typeof e=="object")?[e]:[];case"values":return e===null?[]:[e];case"not":return e===!1||e===null?[!0]:[!1];case"null":return[null];case"true":return[!0];case"false":return[!1];case"empty":return[];default:return null}}var tm=k(()=>{"use strict"});var nm=k(()=>{"use strict";jd();Gd();Vd();qd();Zd();Kd();Qd();Xd();Yd();Jd();em();tm()});function xo(e,t,n){if(t.length===0)return n;let[r,...s]=t;if(typeof r=="number"){if(e&&typeof e=="object"&&!Array.isArray(e))throw new Error("Cannot index object with number");if(r>536870911)throw new Error("Array index too large");if(r<0)throw new Error("Out of bounds negative array index");let c=Array.isArray(e)?[...e]:[];for(;c.length<=r;)c.push(null);return c[r]=xo(c[r],s,n),c}if(Array.isArray(e))throw new Error("Cannot index array with string");if(!_e(r))return e??Object.create(null);let i=Ge(e),o=i?wt(i):Object.create(null),a=Object.hasOwn(o,r)?o[r]:void 0;return ze(o,r,xo(a,s,n)),o}function Eo(e,t){if(t.length===0)return null;if(t.length===1){let s=t[0];if(Array.isArray(e)&&typeof s=="number"){let i=[...e];return i.splice(s,1),i}if(e&&typeof e=="object"&&!Array.isArray(e)){let i=String(s);if(!_e(i))return e;let o=wt(e);return delete o[i],o}return e}let[n,...r]=t;if(Array.isArray(e)&&typeof n=="number"){let s=[...e];return s[n]=Eo(s[n],r),s}if(e&&typeof e=="object"&&!Array.isArray(e)){let s=String(n);if(!_e(s))return e;let i=wt(e);return Object.hasOwn(i,s)&&ze(i,s,Eo(i[s],r)),i}return e}var rm=k(()=>{"use strict";Sn()});function C5(e){return{vars:e?.vars?new Map(e.vars):new Map,limits:{maxIterations:e?.limits?.maxIterations??A5,maxDepth:e?.limits?.maxDepth??om},env:e?.env,coverage:e?.coverage,requireDefenseContext:e?.requireDefenseContext,defenseContextChecked:!1}}function Co(e,t,n){let r=new Map(e.vars);return r.set(t,n),{vars:r,limits:e.limits,env:e.env,requireDefenseContext:e.requireDefenseContext,defenseContextChecked:e.defenseContextChecked,root:e.root,currentPath:e.currentPath,funcs:e.funcs,labels:e.labels,coverage:e.coverage}}function fi(e,t,n){switch(t.type){case"var":return Co(e,t.name,n);case"array":{if(!Array.isArray(n))return null;let r=e;for(let s=0;s<t.elements.length;s++){let i=t.elements[s],o=s<n.length?n[s]:null,a=fi(r,i,o);if(a===null)return null;r=a}return r}case"object":{let r=Ge(n);if(!r)return null;let s=e;for(let i of t.fields){let o;if(typeof i.key=="string")o=i.key;else{let c=V(n,i.key,e);if(c.length===0)return null;o=String(c[0])}let a=Wn(r,o)?r[o]:null;i.keyVar&&(s=Co(s,i.keyVar,a));let l=fi(s,i.pattern,a);if(l===null)return null;s=l}return s}}}function v5(e,t){let n=e;for(let r of t)if(n&&typeof n=="object")if(Array.isArray(n))if(typeof r=="number")n=n[r];else return;else{let s=Ge(n);if(s&&typeof r=="string"&&Object.hasOwn(s,r))n=s[r];else return}else return;return n}function fr(e){if(e.type==="Identity")return[];if(e.type==="Field"){let t=e.base?fr(e.base):[];return t===null?null:[...t,e.name]}if(e.type==="Index"&&e.index.type==="Literal"){let t=e.base?fr(e.base):[];if(t===null)return null;let n=e.index.value;return typeof n=="number"||typeof n=="string"?[...t,n]:null}if(e.type==="Pipe"){let t=fr(e.left);return t===null?null:pc(t,e.right)}if(e.type==="Call"){if(e.name==="parent"||e.name==="root")return null;if(e.name==="first"&&e.args.length===0)return[0];if(e.name==="last"&&e.args.length===0)return[-1]}return null}function pc(e,t){if(t.type==="Call"){if(t.name==="parent"){let n=1;if(t.args.length>0&&t.args[0].type==="Literal"){let r=t.args[0].value;typeof r=="number"&&(n=r)}if(n>=0)return e.slice(0,Math.max(0,e.length-n));{let r=-n-1;return e.slice(0,Math.min(r,e.length))}}if(t.name==="root")return[]}if(t.type==="Field"){let n=fr(t);if(n!==null)return[...e,...n]}if(t.type==="Index"&&t.index.type==="Literal"){let n=fr(t);if(n!==null)return[...e,...n]}if(t.type==="Pipe"){let n=pc(e,t.left);return n===null?null:pc(n,t.right)}return t.type==="Identity"?e:null}function k5(e){return e!==void 0&&e.vars instanceof Map&&"defenseContextChecked"in e}function sm(e,t,n){if(t.type==="Comma"){let r=[];try{r.push(...V(e,t.left,n))}catch(s){if(s instanceof X)throw s;if(r.length>0)return r;throw new Error("evaluation failed")}try{r.push(...V(e,t.right,n))}catch(s){if(s instanceof X)throw s;return r}return r}return V(e,t,n)}function V(e,t,n){let r=k5(n)?n:C5(n);switch(r.defenseContextChecked||(it(r.requireDefenseContext,"query-engine","evaluation"),r={...r,defenseContextChecked:!0}),r.root===void 0&&(r={...r,root:e,currentPath:[]}),r.coverage?.hit(`jq:node:${t.type}`),t.type){case"Identity":return[e];case"Field":return(t.base?V(e,t.base,r):[e]).flatMap(i=>{let o=Ge(i);if(o){if(!Object.hasOwn(o,t.name))return[null];let l=o[t.name];return[l===void 0?null:l]}if(i===null)return[null];let a=Array.isArray(i)?"array":typeof i;throw new Error(`Cannot index ${a} with string "${t.name}"`)});case"Index":return(t.base?V(e,t.base,r):[e]).flatMap(i=>V(i,t.index,r).flatMap(a=>{if(typeof a=="number"&&Array.isArray(i)){if(Number.isNaN(a))return[null];let l=Math.trunc(a),c=l<0?i.length+l:l;return c>=0&&c<i.length?[i[c]]:[null]}if(typeof a=="string"){let l=Ge(i);return!l||!Object.hasOwn(l,a)?[null]:[l[a]]}return[null]}));case"Slice":return(t.base?V(e,t.base,r):[e]).flatMap(i=>{if(i===null)return[null];if(!Array.isArray(i)&&typeof i!="string")throw new Error(`Cannot slice ${typeof i} (${JSON.stringify(i)})`);let o=i.length,a=t.start?V(e,t.start,r):[0],l=t.end?V(e,t.end,r):[o];return a.flatMap(c=>l.map(u=>{let f=c,p=u,h=Number.isNaN(f)?0:Number.isInteger(f)?f:Math.floor(f),d=Number.isNaN(p)?o:Number.isInteger(p)?p:Math.ceil(p),m=im(h,o),g=im(d,o);return Array.isArray(i),i.slice(m,g)}))});case"Iterate":return(t.base?V(e,t.base,r):[e]).flatMap(i=>Array.isArray(i)?i:i&&typeof i=="object"?Object.values(i):[]);case"Pipe":{let s=V(e,t.left,r),i=fr(t.left),o=[];for(let a of s)try{if(i!==null){let l={...r,currentPath:[...r.currentPath??[],...i]};o.push(...V(a,t.right,l))}else o.push(...V(a,t.right,r))}catch(l){throw l instanceof As?l.withPrependedResults(o):l}return o}case"Comma":{let s=V(e,t.left,r),i=V(e,t.right,r);return[...s,...i]}case"Literal":return[t.value];case"Array":return t.elements?[V(e,t.elements,r)]:[[]];case"Object":{let s=[Object.create(null)];for(let i of t.entries){let o=typeof i.key=="string"?[i.key]:V(e,i.key,r),a=V(e,i.value,r),l=[];for(let c of s)for(let u of o){if(typeof u!="string"){let f=u===null?"null":Array.isArray(u)?"array":typeof u;throw new Error(`Cannot use ${f} (${JSON.stringify(u)}) as object key`)}if(!_e(u)){for(let f of a)l.push(wt(c));continue}for(let f of a){let p=wt(c);ze(p,u,f),l.push(p)}}s.length=0,s.push(...l)}return s}case"Paren":return V(e,t.expr,r);case"BinaryOp":return $5(e,t.op,t.left,t.right,r);case"UnaryOp":return V(e,t.operand,r).map(i=>{if(t.op==="-"){if(typeof i=="number")return-i;if(typeof i=="string"){let o=a=>a.length>5?`"${a.slice(0,3)}...`:JSON.stringify(a);throw new Error(`string (${o(i)}) cannot be negated`)}return null}return t.op==="not"?!mn(i):null});case"Cond":return V(e,t.cond,r).flatMap(i=>{if(mn(i))return V(e,t.then,r);for(let o of t.elifs)if(V(e,o.cond,r).some(mn))return V(e,o.then,r);return t.else?V(e,t.else,r):[e]});case"Try":try{return V(e,t.body,r)}catch(s){if(t.catch){let i=s instanceof So?s.value:s instanceof Error?s.message:String(s);return V(i,t.catch,r)}return[]}case"Call":return am(e,t.name,t.args,r);case"VarBind":return V(e,t.value,r).flatMap(i=>{let o=null,a=[];t.pattern?a.push(t.pattern):t.name&&a.push({type:"var",name:t.name}),t.alternatives&&a.push(...t.alternatives);for(let l of a)if(o=fi(r,l,i),o!==null)break;return o===null?[]:V(e,t.body,o)});case"VarRef":{if(t.name==="$ENV")return[r.env?Ct(r.env):Object.create(null)];let s=r.vars.get(t.name);return s!==void 0?[s]:[null]}case"Recurse":{let s=[],i=new WeakSet,o=a=>{if(a&&typeof a=="object"){if(i.has(a))return;i.add(a)}if(s.push(a),Array.isArray(a))for(let l of a)o(l);else if(a&&typeof a=="object")for(let l of Object.keys(a))o(a[l])};return o(e),s}case"Optional":try{return V(e,t.expr,r)}catch{return[]}case"StringInterp":return[t.parts.map(i=>typeof i=="string"?i:V(e,i,r).map(a=>typeof a=="string"?a:JSON.stringify(a)).join("")).join("")];case"UpdateOp":return[N5(e,t.path,t.op,t.value,r)];case"Reduce":{let s=V(e,t.expr,r),i=V(e,t.init,r)[0],o=r.limits.maxDepth??om;for(let a of s){let l;if(t.pattern){if(l=fi(r,t.pattern,a),l===null)continue}else l=Co(r,t.varName,a);if(i=V(i,t.update,l)[0],Es(i,o+1)>o)return[null]}return[i]}case"Foreach":{let s=V(e,t.expr,r),i=V(e,t.init,r)[0],o=[];for(let a of s)try{let l;if(t.pattern){if(l=fi(r,t.pattern,a),l===null)continue}else l=Co(r,t.varName,a);if(i=V(i,t.update,l)[0],t.extract){let c=V(i,t.extract,l);o.push(...c)}else o.push(i)}catch(l){throw l instanceof As?l.withPrependedResults(o):l}return o}case"Label":try{return V(e,t.body,{...r,labels:new Set([...r.labels??[],t.name])})}catch(s){if(s instanceof As&&s.label===t.name)return s.partialResults;throw s}case"Break":throw new As(t.name);case"Def":{let s=new Map(r.funcs??[]),i=`${t.name}/${t.params.length}`;s.set(i,{params:t.params,body:t.funcBody,closure:new Map(r.funcs??[])});let o={...r,funcs:s};return V(e,t.body,o)}default:{let s=t;throw new Error(`Unknown AST node type: ${s.type}`)}}}function im(e,t){return e<0?Math.max(0,t+e):Math.min(e,t)}function N5(e,t,n,r,s){function i(l,c){switch(n){case"=":return c;case"|=":return V(l,r,s)[0]??null;case"+=":return typeof l=="number"&&typeof c=="number"||typeof l=="string"&&typeof c=="string"?l+c:Array.isArray(l)&&Array.isArray(c)?[...l,...c]:l&&c&&typeof l=="object"&&typeof c=="object"?xl(l,c):c;case"-=":return typeof l=="number"&&typeof c=="number"?l-c:l;case"*=":return typeof l=="number"&&typeof c=="number"?l*c:l;case"/=":return typeof l=="number"&&typeof c=="number"?l/c:l;case"%=":return typeof l=="number"&&typeof c=="number"?l%c:l;case"//=":return l===null||l===!1?c:l;default:return c}}function o(l,c,u){switch(c.type){case"Identity":return u(l);case"Field":{if(!_e(c.name))return l;if(c.base)return o(l,c.base,f=>{if(f&&typeof f=="object"&&!Array.isArray(f)){let p=wt(f),h=Object.hasOwn(p,c.name)?p[c.name]:void 0;return ze(p,c.name,u(h)),p}return f});if(l&&typeof l=="object"&&!Array.isArray(l)){let f=wt(l),p=Object.hasOwn(f,c.name)?f[c.name]:void 0;return ze(f,c.name,u(p)),f}return l}case"Index":{let p=V(e,c.index,s)[0];if(typeof p=="number"&&Number.isNaN(p))throw new Error("Cannot set array element at NaN index");if(typeof p=="number"&&!Number.isInteger(p)&&(p=Math.trunc(p)),c.base)return o(l,c.base,h=>{if(typeof p=="number"&&Array.isArray(h)){let d=[...h],m=p<0?d.length+p:p;if(m>=0){for(;d.length<=m;)d.push(null);d[m]=u(d[m])}return d}if(typeof p=="string"&&h&&typeof h=="object"&&!Array.isArray(h)){if(!_e(p))return h;let d=wt(h),m=Object.hasOwn(d,p)?d[p]:void 0;return ze(d,p,u(m)),d}return h});if(typeof p=="number"){if(p>536870911)throw new Error("Array index too large");if(p<0&&(!l||!Array.isArray(l)))throw new Error("Out of bounds negative array index");if(Array.isArray(l)){let d=[...l],m=p<0?d.length+p:p;if(m>=0){for(;d.length<=m;)d.push(null);d[m]=u(d[m])}return d}if(l==null){let d=[];for(;d.length<=p;)d.push(null);return d[p]=u(null),d}return l}if(typeof p=="string"&&l&&typeof l=="object"&&!Array.isArray(l)){if(!_e(p))return l;let h=wt(l),d=Object.hasOwn(h,p)?h[p]:void 0;return ze(h,p,u(d)),h}return l}case"Iterate":{let f=p=>{if(Array.isArray(p))return p.map(h=>u(h));if(p&&typeof p=="object"){let h=Object.create(null);for(let[d,m]of Object.entries(p))_e(d)&&ze(h,d,u(m));return h}return p};return c.base?o(l,c.base,f):f(l)}case"Pipe":{let f=o(l,c.left,p=>p);return o(f,c.right,u)}default:return u(l)}}return o(e,t,l=>{if(n==="|=")return i(l,l);let c=V(e,r,s);return i(l,c[0]??null)})}function I5(e,t,n){function r(i,o,a){switch(o.type){case"Identity":return a;case"Field":{if(!_e(o.name))return i;if(o.base){let l=V(i,o.base,n)[0],c=r(l,{type:"Field",name:o.name},a);return r(i,o.base,c)}if(i&&typeof i=="object"&&!Array.isArray(i)){let l=wt(i);return ze(l,o.name,a),l}return i}case"Index":{if(o.base){let u=V(i,o.base,n)[0],f=r(u,{type:"Index",index:o.index},a);return r(i,o.base,f)}let c=V(e,o.index,n)[0];if(typeof c=="number"&&Array.isArray(i)){let u=[...i],f=c<0?u.length+c:c;return f>=0&&f<u.length&&(u[f]=a),u}if(typeof c=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!_e(c))return i;let u=wt(i);return ze(u,c,a),u}return i}default:return i}}function s(i,o){switch(o.type){case"Identity":return null;case"Field":{if(!_e(o.name))return i;if(o.base){let l=V(i,o.base,n)[0];if(l==null)return i;let c=s(l,{type:"Field",name:o.name});return r(i,o.base,c)}if(i&&typeof i=="object"&&!Array.isArray(i)){if(!_e(o.name))return i;let l=wt(i);return delete l[o.name],l}return i}case"Index":{if(o.base){let u=V(i,o.base,n)[0];if(u==null)return i;let f=s(u,{type:"Index",index:o.index});return r(i,o.base,f)}let c=V(e,o.index,n)[0];if(typeof c=="number"&&Array.isArray(i)){let u=[...i],f=c<0?u.length+c:c;return f>=0&&f<u.length&&u.splice(f,1),u}if(typeof c=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!_e(c))return i;let u=wt(i);return delete u[c],u}return i}case"Iterate":return Array.isArray(i)?[]:i&&typeof i=="object"?Object.create(null):i;case"Pipe":{let u=function(h,d,m){switch(d.type){case"Identity":return m;case"Field":{if(!_e(d.name))return h;if(h&&typeof h=="object"&&!Array.isArray(h)){let g=wt(h);return ze(g,d.name,m),g}return h}case"Index":{let y=V(e,d.index,n)[0];if(typeof y=="number"&&Array.isArray(h)){let w=[...h],b=y<0?w.length+y:y;return b>=0&&b<w.length&&(w[b]=m),w}if(typeof y=="string"&&h&&typeof h=="object"&&!Array.isArray(h)){if(!_e(y))return h;let w=wt(h);return ze(w,y,m),w}return h}case"Pipe":{let g=V(h,d.left,n)[0],y=u(g,d.right,m);return u(h,d.left,y)}default:return h}};var a=u;let l=o.left,c=o.right,f=V(i,l,n)[0];if(f==null)return i;let p=s(f,c);return u(i,l,p)}default:return i}}return s(e,t)}function $5(e,t,n,r,s){if(t==="and")return V(e,n,s).flatMap(l=>mn(l)?V(e,r,s).map(u=>mn(u)):[!1]);if(t==="or")return V(e,n,s).flatMap(l=>mn(l)?[!0]:V(e,r,s).map(u=>mn(u)));if(t==="//"){let l=V(e,n,s).filter(c=>c!=null&&c!==!1);return l.length>0?l:V(e,r,s)}let i=V(e,n,s),o=V(e,r,s);return i.flatMap(a=>o.map(l=>{switch(t){case"+":return a===null?l:l===null?a:typeof a=="number"&&typeof l=="number"||typeof a=="string"&&typeof l=="string"?a+l:Array.isArray(a)&&Array.isArray(l)?[...a,...l]:a&&l&&typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)?xl(a,l):null;case"-":if(typeof a=="number"&&typeof l=="number")return a-l;if(Array.isArray(a)&&Array.isArray(l)){let c=new Set(l.map(u=>JSON.stringify(u)));return a.filter(u=>!c.has(JSON.stringify(u)))}if(typeof a=="string"&&typeof l=="string"){let c=u=>u.length>10?`"${u.slice(0,10)}...`:JSON.stringify(u);throw new Error(`string (${c(a)}) and string (${c(l)}) cannot be subtracted`)}return null;case"*":if(typeof a=="number"&&typeof l=="number")return a*l;if(typeof a=="string"&&typeof l=="number")return a.repeat(l);{let c=Ge(a),u=Ge(l);if(c&&u)return nc(c,u)}return null;case"/":if(typeof a=="number"&&typeof l=="number"){if(l===0)throw new Error(`number (${a}) and number (${l}) cannot be divided because the divisor is zero`);return a/l}return typeof a=="string"&&typeof l=="string"?a.split(l):null;case"%":if(typeof a=="number"&&typeof l=="number"){if(l===0)throw new Error(`number (${a}) and number (${l}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(a)&&!Number.isNaN(a)?!Number.isFinite(l)&&!Number.isNaN(l)&&a<0&&l>0?-1:0:a%l}return null;case"==":return xs(a,l);case"!=":return!xs(a,l);case"<":return ui(a,l)<0;case"<=":return ui(a,l)<=0;case">":return ui(a,l)>0;case">=":return ui(a,l)>=0;default:return null}}))}function am(e,t,n,r){let s=S5.get(t);if(s)return typeof e=="number"?[s(e)]:[null];let i=ic(e,t,n,r,V);if(i!==null)return i;let o=uc(e,t,n,r,V);if(o!==null)return o;let a=tc(e,t,n,r,V);if(a!==null)return a;let l=rc(e,t,r.limits.maxDepth);if(l!==null)return l;let c=fc(e,t);if(c!==null)return c;let u=ac(e,t,n,r,V);if(u!==null)return u;let f=Jl(e,t,n,r,V,sm,yo,mn,wo,X);if(f!==null)return f;let p=lc(e,t,n,r,V,mn,xo,Eo,I5,Ao);if(p!==null)return p;let h=sc(e,t,n,r,V,xs);if(h!==null)return h;let d=ec(e,t,n,r,V,sm,mn,X);if(d!==null)return d;let m=oc(e,t,n,r,V,mn,v5,am);if(m!==null)return m;let g=cc(e,t,n,r,V,xs);if(g!==null)return g;switch(t){case"builtins":return[["add/0","all/0","all/1","all/2","any/0","any/1","any/2","arrays/0","ascii/0","ascii_downcase/0","ascii_upcase/0","booleans/0","bsearch/1","builtins/0","combinations/0","combinations/1","contains/1","debug/0","del/1","delpaths/1","empty/0","env/0","error/0","error/1","explode/0","first/0","first/1","flatten/0","flatten/1","floor/0","from_entries/0","fromdate/0","fromjson/0","getpath/1","gmtime/0","group_by/1","gsub/2","gsub/3","has/1","implode/0","IN/1","IN/2","INDEX/1","INDEX/2","index/1","indices/1","infinite/0","inside/1","isempty/1","isnan/0","isnormal/0","isvalid/1","iterables/0","join/1","keys/0","keys_unsorted/0","last/0","last/1","length/0","limit/2","ltrimstr/1","map/1","map_values/1","match/1","match/2","max/0","max_by/1","min/0","min_by/1","mktime/0","modulemeta/1","nan/0","not/0","nth/1","nth/2","null/0","nulls/0","numbers/0","objects/0","path/1","paths/0","paths/1","pick/1","range/1","range/2","range/3","recurse/0","recurse/1","recurse_down/0","repeat/1","reverse/0","rindex/1","rtrimstr/1","scalars/0","scan/1","scan/2","select/1","setpath/2","skip/2","sort/0","sort_by/1","split/1","splits/1","splits/2","sqrt/0","startswith/1","strftime/1","strings/0","strptime/1","sub/2","sub/3","test/1","test/2","to_entries/0","toboolean/0","todate/0","tojson/0","tostream/0","fromstream/1","truncate_stream/1","tonumber/0","tostring/0","transpose/0","trim/0","ltrim/0","rtrim/0","type/0","unique/0","unique_by/1","until/2","utf8bytelength/0","values/0","walk/1","while/2","with_entries/1"]];case"error":{let y=n.length>0?V(e,n[0],r)[0]:e;throw new So(y)}case"env":return[r.env?Ct(r.env):Object.create(null)];case"debug":return[e];case"input_line_number":return[1];default:{let y=`${t}/${n.length}`,w=r.funcs?.get(y);if(w){let b=w.closure??r.funcs??new Map,x=new Map(b);x.set(y,w);for(let v=0;v<w.params.length;v++){let $=w.params[v],_=n[v];if(_){let R=V(e,_,r),P;if(R.length===0)P={type:"Call",name:"empty",args:[]};else if(R.length===1)P={type:"Literal",value:R[0]};else{P={type:"Literal",value:R[R.length-1]};for(let C=R.length-2;C>=0;C--)P={type:"Comma",left:{type:"Literal",value:R[C]},right:P}}x.set(`${$}/0`,{params:[],body:P})}}let S={...r,funcs:x};return V(e,w.body,S)}throw new Error(`Unknown function: ${t}`)}}}function Ao(e,t,n,r,s){if(t.type==="Comma"){let a=t;Ao(e,a.left,n,r,s),Ao(e,a.right,n,r,s);return}let i=fr(t);if(i!==null){s.push([...r,...i]);return}if(t.type==="Iterate"){if(Array.isArray(e))for(let a=0;a<e.length;a++)s.push([...r,a]);else if(e&&typeof e=="object")for(let a of Object.keys(e))s.push([...r,a]);return}if(t.type==="Recurse"){let a=(l,c)=>{if(s.push([...r,...c]),l&&typeof l=="object")if(Array.isArray(l))for(let u=0;u<l.length;u++)a(l[u],[...c,u]);else for(let u of Object.keys(l))a(l[u],[...c,u])};a(e,[]);return}if(t.type==="Pipe"){let a=fr(t.left);if(a!==null){let l=V(e,t.left,n);for(let c of l)Ao(c,t.right,n,[...r,...a],s);return}}V(e,t,n).length>0&&s.push(r)}var As,So,A5,om,S5,lm=k(()=>{"use strict";er();Ae();zn();nm();rm();Sn();bo();As=class e extends Error{label;partialResults;constructor(t,n=[]){super(`break ${t}`),this.label=t,this.partialResults=n,this.name="BreakError"}withPrependedResults(t){return new e(this.label,[...t,...this.partialResults])}},So=class extends Error{value;constructor(t){super(typeof t=="string"?t:JSON.stringify(t)),this.value=t,this.name="JqError"}},A5=1e4,om=2e3,S5=new Map([["floor",Math.floor],["ceil",Math.ceil],["round",Math.round],["sqrt",Math.sqrt],["log",Math.log],["log10",Math.log10],["log2",Math.log2],["exp",Math.exp],["sin",Math.sin],["cos",Math.cos],["tan",Math.tan],["asin",Math.asin],["acos",Math.acos],["atan",Math.atan],["sinh",Math.sinh],["cosh",Math.cosh],["tanh",Math.tanh],["asinh",Math.asinh],["acosh",Math.acosh],["atanh",Math.atanh],["cbrt",Math.cbrt],["expm1",Math.expm1],["log1p",Math.log1p],["trunc",Math.trunc]])});function um(e){let t=[],n=0,r=(c=0)=>e[n+c],s=()=>e[n++],i=()=>n>=e.length,o=c=>c>="0"&&c<="9",a=c=>c>="a"&&c<="z"||c>="A"&&c<="Z"||c==="_",l=c=>a(c)||o(c);for(;!i();){let c=n,u=s();if(!(u===" "||u===" "||u===`
554
+ `)||i.includes("\r")?`"${i.replace(/"/g,'""')}"`:i}).join(",")]:[null];case"@tsv":return Array.isArray(e)?[e.map(r=>String(r??"").replace(/\t/g,"\\t").replace(/\n/g,"\\n")).join(" ")]:[null];case"@json":{let r=n??x5;return Es(e,r+1)>r?[null]:[JSON.stringify(e)]}case"@html":return typeof e=="string"?[e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")]:[null];case"@sh":return typeof e=="string"?[`'${e.replace(/'/g,"'\\''")}'`]:[null];case"@text":return typeof e=="string"?[e]:e==null?[""]:[String(e)];default:return null}}var x5,qd=k(()=>{"use strict";bo();x5=2e3});function sc(e,t,n,r,s,i){switch(t){case"index":return n.length===0?[null]:s(e,n[0],r).map(a=>{if(typeof e=="string"&&typeof a=="string"){if(a===""&&e==="")return null;let l=e.indexOf(a);return l>=0?l:null}if(Array.isArray(e)){if(Array.isArray(a)){for(let c=0;c<=e.length-a.length;c++){let u=!0;for(let f=0;f<a.length;f++)if(!i(e[c+f],a[f])){u=!1;break}if(u)return c}return null}let l=e.findIndex(c=>i(c,a));return l>=0?l:null}return null});case"rindex":return n.length===0?[null]:s(e,n[0],r).map(a=>{if(typeof e=="string"&&typeof a=="string"){let l=e.lastIndexOf(a);return l>=0?l:null}if(Array.isArray(e)){if(Array.isArray(a)){for(let l=e.length-a.length;l>=0;l--){let c=!0;for(let u=0;u<a.length;u++)if(!i(e[l+u],a[u])){c=!1;break}if(c)return l}return null}for(let l=e.length-1;l>=0;l--)if(i(e[l],a))return l;return null}return null});case"indices":return n.length===0?[[]]:s(e,n[0],r).map(a=>{let l=[];if(typeof e=="string"&&typeof a=="string"){let c=e.indexOf(a);for(;c!==-1;)l.push(c),c=e.indexOf(a,c+1)}else if(Array.isArray(e))if(Array.isArray(a)){let c=a.length;if(c===0)for(let u=0;u<=e.length;u++)l.push(u);else for(let u=0;u<=e.length-c;u++){let f=!0;for(let p=0;p<c;p++)if(!i(e[u+p],a[p])){f=!1;break}f&&l.push(u)}}else for(let c=0;c<e.length;c++)i(e[c],a)&&l.push(c);return l});default:return null}}var Zd=k(()=>{"use strict"});function ic(e,t,n,r,s){switch(t){case"fabs":case"abs":return typeof e=="number"?[Math.abs(e)]:typeof e=="string"?[e]:[null];case"exp10":return typeof e=="number"?[10**e]:[null];case"exp2":return typeof e=="number"?[2**e]:[null];case"pow":{if(n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=i[0],l=o[0];return typeof a!="number"||typeof l!="number"?[null]:[a**l]}case"atan2":{if(n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=i[0],l=o[0];return typeof a!="number"||typeof l!="number"?[null]:[Math.atan2(a,l)]}case"hypot":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.hypot(e,i)]}case"fma":{if(typeof e!="number"||n.length<2)return[null];let i=s(e,n[0],r)[0],o=s(e,n[1],r)[0];return[e*i+o]}case"copysign":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.sign(i)*Math.abs(e)]}case"drem":case"remainder":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[e-Math.round(e/i)*i]}case"fdim":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.max(0,e-i)]}case"fmax":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.max(e,i)]}case"fmin":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[Math.min(e,i)]}case"ldexp":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[e*2**i]}case"scalbn":case"scalbln":{if(typeof e!="number"||n.length===0)return[null];let i=s(e,n[0],r)[0];return[e*2**i]}case"nearbyint":return typeof e=="number"?[Math.round(e)]:[null];case"logb":return typeof e=="number"?[Math.floor(Math.log2(Math.abs(e)))]:[null];case"significand":if(typeof e=="number"){let i=Math.floor(Math.log2(Math.abs(e)));return[e/2**i]}return[null];case"frexp":if(typeof e=="number"){if(e===0)return[[0,0]];let i=Math.floor(Math.log2(Math.abs(e)))+1;return[[e/2**i,i]]}return[null];case"modf":if(typeof e=="number"){let i=Math.trunc(e);return[[e-i,i]]}return[null];default:return null}}var Kd=k(()=>{"use strict"});function oc(e,t,n,r,s,i,o,a){switch(t){case"recurse":{if(n.length===0){let h=[],d=m=>{if(h.push(m),Array.isArray(m))for(let g of m)d(g);else if(m&&typeof m=="object")for(let g of Object.keys(m))d(m[g])};return d(e),h}let l=[],c=n.length>=2?n[1]:null,u=1e4,f=0,p=h=>{if(f++>u||c&&!s(h,c,r).some(i))return;l.push(h);let d=s(h,n[0],r);for(let m of d)m!=null&&p(m)};return p(e),l}case"recurse_down":return a(e,"recurse",n,r);case"walk":{if(n.length===0)return[e];let l=new WeakSet,c=u=>{if(u&&typeof u=="object"){if(l.has(u))return u;l.add(u)}let f;if(Array.isArray(u))f=u.map(c);else if(u&&typeof u=="object"){let h=Object.create(null);for(let[d,m]of Object.entries(u))_e(d)&&ze(h,d,c(m));f=h}else f=u;return s(f,n[0],r)[0]};return[c(e)]}case"transpose":{if(!Array.isArray(e))return[null];if(e.length===0)return[[]];let l=Math.max(...e.map(u=>Array.isArray(u)?u.length:0)),c=[];for(let u=0;u<l;u++)c.push(e.map(f=>Array.isArray(f)?f[u]:null));return[c]}case"combinations":{if(n.length>0){let f=s(e,n[0],r)[0];if(!Array.isArray(e)||f<0)return[];if(f===0)return[[]];let p=[],h=(d,m)=>{if(m===f){p.push([...d]);return}for(let g of e)d.push(g),h(d,m+1),d.pop()};return h([],0),p}if(!Array.isArray(e))return[];if(e.length===0)return[[]];for(let u of e)if(!Array.isArray(u))return[];let l=[],c=(u,f)=>{if(u===e.length){l.push([...f]);return}let p=e[u];for(let h of p)f.push(h),c(u+1,f),f.pop()};return c(0,[]),l}case"parent":{if(r.root===void 0||r.currentPath===void 0)return[];let l=r.currentPath;if(l.length===0)return[];let c=n.length>0?s(e,n[0],r)[0]:1;if(c>=0){if(c>l.length)return[];let u=l.slice(0,l.length-c);return[o(r.root,u)]}else{let u=-c-1;if(u>=l.length)return[e];let f=l.slice(0,u);return[o(r.root,f)]}}case"parents":{if(r.root===void 0||r.currentPath===void 0)return[[]];let l=r.currentPath,c=[];for(let u=l.length-1;u>=0;u--)c.push(o(r.root,l.slice(0,u)));return[c]}case"root":return r.root!==void 0?[r.root]:[];default:return null}}var Qd=k(()=>{"use strict";Sn()});function ac(e,t,n,r,s){switch(t){case"keys":return Array.isArray(e)?[e.map((i,o)=>o)]:e&&typeof e=="object"?[Object.keys(e).sort()]:[null];case"keys_unsorted":return Array.isArray(e)?[e.map((i,o)=>o)]:e&&typeof e=="object"?[Object.keys(e)]:[null];case"length":return typeof e=="string"?[e.length]:Array.isArray(e)?[e.length]:e&&typeof e=="object"?[Object.keys(e).length]:e===null?[0]:typeof e=="number"?[Math.abs(e)]:[null];case"utf8bytelength":{if(typeof e=="string")return[new TextEncoder().encode(e).length];let i=e===null?"null":Array.isArray(e)?"array":typeof e,o=i==="array"||i==="object"?JSON.stringify(e):String(e);throw new Error(`${i} (${o}) only strings have UTF-8 byte length`)}case"to_entries":{let i=Ge(e);return i?[Object.entries(i).map(([o,a])=>({key:o,value:a}))]:[null]}case"from_entries":if(Array.isArray(e)){let i=Object.create(null);for(let o of e){let a=Ge(o);if(a){let l=a.key??a.Key??a.name??a.Name??a.k,c=a.value??a.Value??a.v;if(l!==void 0){let u=String(l);_e(u)&&ze(i,u,c)}}}return[i]}return[null];case"with_entries":{if(n.length===0)return[e];let i=Ge(e);if(i){let a=Object.entries(i).map(([c,u])=>({key:c,value:u})).flatMap(c=>s(c,n[0],r)),l=Object.create(null);for(let c of a){let u=Ge(c);if(u){let f=u.key??u.name??u.k,p=u.value??u.v;if(f!==void 0){let h=String(f);_e(h)&&ze(l,h,p)}}}return[l]}return[null]}case"reverse":return Array.isArray(e)?[[...e].reverse()]:typeof e=="string"?[e.split("").reverse().join("")]:[null];case"flatten":return Array.isArray(e)?(n.length>0?s(e,n[0],r):[Number.POSITIVE_INFINITY]).map(o=>{let a=o;if(a<0)throw new Error("flatten depth must not be negative");return e.flat(a)}):[null];case"unique":if(Array.isArray(e)){let i=new Set,o=[];for(let a of e){let l=JSON.stringify(a);i.has(l)||(i.add(l),o.push(a))}return[o]}return[null];case"tojson":case"tojsonstream":{let i=r.limits.maxDepth??E5;return Es(e,i+1)>i?[null]:[JSON.stringify(e)]}case"fromjson":{if(typeof e=="string"){let i=e.trim().toLowerCase();if(i==="nan")return[Number.NaN];if(i==="inf"||i==="infinity")return[Number.POSITIVE_INFINITY];if(i==="-inf"||i==="-infinity")return[Number.NEGATIVE_INFINITY];try{return[fs(JSON.parse(e))]}catch{throw new Error(`Invalid JSON: ${e}`)}}return[e]}case"tostring":return typeof e=="string"?[e]:[JSON.stringify(e)];case"tonumber":if(typeof e=="number")return[e];if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i))throw new Error(`${JSON.stringify(e)} cannot be parsed as a number`);return[i]}throw new Error(`${typeof e} cannot be parsed as a number`);case"toboolean":{if(typeof e=="boolean")return[e];if(typeof e=="string"){if(e==="true")return[!0];if(e==="false")return[!1];throw new Error(`string (${JSON.stringify(e)}) cannot be parsed as a boolean`)}let i=e===null?"null":Array.isArray(e)?"array":typeof e,o=i==="array"||i==="object"?JSON.stringify(e):String(e);throw new Error(`${i} (${o}) cannot be parsed as a boolean`)}case"tostream":{let i=[],o=(a,l)=>{if(a===null||typeof a!="object")i.push([l,a]);else if(Array.isArray(a))if(a.length===0)i.push([l,[]]);else for(let c=0;c<a.length;c++)o(a[c],[...l,c]);else{let c=Object.keys(a);if(c.length===0)i.push([l,Object.create(null)]);else for(let u of c)o(a[u],[...l,u])}};return o(e,[]),i.push([[]]),i}case"fromstream":{if(n.length===0)return[e];let i=s(e,n[0],r),o=null;for(let a of i){if(!Array.isArray(a)||a.length===1&&Array.isArray(a[0])&&a[0].length===0||a.length!==2)continue;let[l,c]=a;if(!Array.isArray(l))continue;if(l.length===0){o=c;continue}o===null&&(o=typeof l[0]=="number"?[]:Object.create(null));let u=o;for(let p=0;p<l.length-1;p++){let h=l[p],d=l[p+1];if(Array.isArray(u)&&typeof h=="number"){for(;u.length<=h;)u.push(null);u[h]===null&&(u[h]=typeof d=="number"?[]:Object.create(null)),u=u[h]}else{let m=Ge(u);if(m){let g=String(h);if(!_e(g))continue;(m[g]===null||m[g]===void 0)&&ze(m,g,typeof d=="number"?[]:Object.create(null)),u=m[g]}}}let f=l[l.length-1];if(Array.isArray(u)&&typeof f=="number"){for(;u.length<=f;)u.push(null);u[f]=c}else{let p=Ge(u);if(p){let h=String(f);_e(h)&&ze(p,h,c)}}}return[o]}case"truncate_stream":{let i=typeof e=="number"?Math.floor(e):0;if(n.length===0)return[];let o=[],a=s(e,n[0],r);for(let l of a)if(Array.isArray(l)){if(l.length===1&&Array.isArray(l[0])){let c=l[0];c.length>i&&o.push([c.slice(i)]);continue}if(l.length===2&&Array.isArray(l[0])){let c=l[0],u=l[1];c.length>i&&o.push([c.slice(i),u])}}return o}default:return null}}var E5,Xd=k(()=>{"use strict";Sn();bo();E5=2e3});function lc(e,t,n,r,s,i,o,a,l,c){switch(t){case"getpath":{if(n.length===0)return[null];let u=s(e,n[0],r),f=[];for(let p of u){let h=p,d=e;for(let m of h){if(d==null){d=null;break}if(Array.isArray(d)&&typeof m=="number")d=d[m];else if(typeof m=="string"){let g=Ge(d);if(!g||!Object.hasOwn(g,m)){d=null;break}d=g[m]}else{d=null;break}}f.push(d)}return f}case"setpath":{if(n.length<2)return[null];let f=s(e,n[0],r)[0],h=s(e,n[1],r)[0];return[o(e,f,h)]}case"delpaths":{if(n.length===0)return[e];let f=s(e,n[0],r)[0],p=e;for(let h of f.sort((d,m)=>m.length-d.length))p=a(p,h);return[p]}case"path":{if(n.length===0)return[[]];let u=[];return c(e,n[0],r,[],u),u}case"del":return n.length===0?[e]:[l(e,n[0],r)];case"pick":{if(n.length===0)return[null];let u=[];for(let p of n)c(e,p,r,[],u);let f=null;for(let p of u){for(let d of p)if(typeof d=="number"&&d<0)throw new Error("Out of bounds negative array index");let h=e;for(let d of p){if(h==null)break;if(Array.isArray(h)&&typeof d=="number")h=h[d];else if(typeof d=="string"){let m=Ge(h);if(!m||!Object.hasOwn(m,d)){h=null;break}h=m[d]}else{h=null;break}}f=o(f,p,h)}return[f]}case"paths":{let u=[],f=(p,h)=>{if(p&&typeof p=="object")if(Array.isArray(p))for(let d=0;d<p.length;d++)u.push([...h,d]),f(p[d],[...h,d]);else for(let d of Object.keys(p))u.push([...h,d]),f(p[d],[...h,d])};return f(e,[]),n.length>0?u.filter(p=>{let h=e;for(let m of p)if(Array.isArray(h)&&typeof m=="number")h=h[m];else if(typeof m=="string"){let g=Ge(h);if(!g||!Object.hasOwn(g,m))return!1;h=g[m]}else return!1;return s(h,n[0],r).some(i)}):u}case"leaf_paths":{let u=[],f=(p,h)=>{if(p===null||typeof p!="object")u.push(h);else if(Array.isArray(p))for(let d=0;d<p.length;d++)f(p[d],[...h,d]);else for(let d of Object.keys(p))f(p[d],[...h,d])};return f(e,[]),u}default:return null}}var Yd=k(()=>{"use strict";Sn()});function cc(e,t,n,r,s,i){switch(t){case"IN":{if(n.length===0)return[!1];if(n.length===1){let c=s(e,n[0],r);for(let u of c)if(i(e,u))return[!0];return[!1]}let o=s(e,n[0],r),a=s(e,n[1],r),l=new Set(a.map(c=>JSON.stringify(c)));for(let c of o)if(l.has(JSON.stringify(c)))return[!0];return[!1]}case"INDEX":{if(n.length===0)return[Object.create(null)];if(n.length===1){let l=s(e,n[0],r),c=Object.create(null);for(let u of l){let f=String(u);_e(f)&&ze(c,f,u)}return[c]}if(n.length===2){let l=s(e,n[0],r),c=Object.create(null);for(let u of l){let f=s(u,n[1],r);if(f.length>0){let p=String(f[0]);_e(p)&&ze(c,p,u)}}return[c]}let o=s(e,n[0],r),a=Object.create(null);for(let l of o){let c=s(l,n[1],r),u=s(l,n[2],r);if(c.length>0&&u.length>0){let f=String(c[0]);_e(f)&&ze(a,f,u[0])}}return[a]}case"JOIN":{if(n.length<2)return[null];let o=Ge(s(e,n[0],r)[0]);if(!o)return[null];if(!Array.isArray(e))return[null];let a=[];for(let l of e){let c=s(l,n[1],r),u=c.length>0?String(c[0]):"",f=Wn(o,u)?o[u]:null;a.push([l,f])}return[a]}default:return null}}var Jd=k(()=>{"use strict";Sn()});function uc(e,t,n,r,s){switch(t){case"join":{if(!Array.isArray(e))return[null];let i=n.length>0?s(e,n[0],r):[""];for(let o of e)if(Array.isArray(o)||o!==null&&typeof o=="object")throw new Error("cannot join: contains arrays or objects");return i.map(o=>e.map(a=>a===null?"":typeof a=="string"?a:String(a)).join(String(o)))}case"split":{if(typeof e!="string"||n.length===0)return[null];let i=s(e,n[0],r),o=String(i[0]);return[e.split(o)]}case"splits":{if(typeof e!="string"||n.length===0)return[];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"g";return Q(o,a.includes("g")?a:`${a}g`).split(e)}catch{return[]}}case"scan":{if(typeof e!="string"||n.length===0)return[];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"";return[...Q(o,a.includes("g")?a:`${a}g`).matchAll(e)].map(u=>u.length>1?u.slice(1):u[0])}catch{return[]}}case"test":{if(typeof e!="string"||n.length===0)return[!1];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"";return[Q(o,a).test(e)]}catch{return[!1]}}case"match":{if(typeof e!="string"||n.length===0)return[null];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"",c=Q(o,`${a}d`).exec(e);if(!c)return[];let u=c.indices;return[{offset:c.index,length:c[0].length,string:c[0],captures:c.slice(1).map((f,p)=>({offset:u?.[p+1]?.[0]??null,length:f?.length??0,string:f??"",name:null}))}]}catch{return[null]}}case"capture":{if(typeof e!="string"||n.length===0)return[null];let i=s(e,n[0],r),o=String(i[0]);try{let a=n.length>1?String(s(e,n[1],r)[0]):"",c=Q(o,a).match(e);return!c||!c.groups?[Object.create(null)]:[c.groups]}catch{return[null]}}case"sub":{if(typeof e!="string"||n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=String(i[0]),l=String(o[0]);try{let c=n.length>2?String(s(e,n[2],r)[0]):"";return[Q(a,c).replace(e,l)]}catch{return[e]}}case"gsub":{if(typeof e!="string"||n.length<2)return[null];let i=s(e,n[0],r),o=s(e,n[1],r),a=String(i[0]),l=String(o[0]);try{let c=n.length>2?String(s(e,n[2],r)[0]):"g",u=c.includes("g")?c:`${c}g`;return[Q(a,u).replace(e,l)]}catch{return[e]}}case"ascii_downcase":return typeof e=="string"?[e.replace(/[A-Z]/g,i=>String.fromCharCode(i.charCodeAt(0)+32))]:[null];case"ascii_upcase":return typeof e=="string"?[e.replace(/[a-z]/g,i=>String.fromCharCode(i.charCodeAt(0)-32))]:[null];case"ltrimstr":{if(typeof e!="string"||n.length===0)return[e];let i=s(e,n[0],r),o=String(i[0]);return[e.startsWith(o)?e.slice(o.length):e]}case"rtrimstr":{if(typeof e!="string"||n.length===0)return[e];let i=s(e,n[0],r),o=String(i[0]);return o===""?[e]:[e.endsWith(o)?e.slice(0,-o.length):e]}case"trimstr":{if(typeof e!="string"||n.length===0)return[e];let i=s(e,n[0],r),o=String(i[0]);if(o==="")return[e];let a=e;return a.startsWith(o)&&(a=a.slice(o.length)),a.endsWith(o)&&(a=a.slice(0,-o.length)),[a]}case"trim":if(typeof e=="string")return[e.trim()];throw new Error("trim input must be a string");case"ltrim":if(typeof e=="string")return[e.trimStart()];throw new Error("trim input must be a string");case"rtrim":if(typeof e=="string")return[e.trimEnd()];throw new Error("trim input must be a string");case"startswith":{if(typeof e!="string"||n.length===0)return[!1];let i=s(e,n[0],r);return[e.startsWith(String(i[0]))]}case"endswith":{if(typeof e!="string"||n.length===0)return[!1];let i=s(e,n[0],r);return[e.endsWith(String(i[0]))]}case"ascii":return typeof e=="string"&&e.length>0?[e.charCodeAt(0)]:[null];case"explode":return typeof e=="string"?[Array.from(e).map(i=>i.codePointAt(0))]:[null];case"implode":if(!Array.isArray(e))throw new Error("implode input must be an array");return[e.map(a=>{if(typeof a=="string")throw new Error(`string (${JSON.stringify(a)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof a!="number"||Number.isNaN(a))throw new Error("number (null) can't be imploded, unicode codepoint needs to be numeric");let l=Math.trunc(a);return l<0||l>1114111||l>=55296&&l<=57343?String.fromCodePoint(65533):String.fromCodePoint(l)}).join("")];default:return null}}var em=k(()=>{"use strict";Ze()});function fc(e,t){switch(t){case"type":return e===null?["null"]:Array.isArray(e)?["array"]:typeof e=="boolean"?["boolean"]:typeof e=="number"?["number"]:typeof e=="string"?["string"]:typeof e=="object"?["object"]:["null"];case"infinite":return[Number.POSITIVE_INFINITY];case"nan":return[Number.NaN];case"isinfinite":return[typeof e=="number"&&!Number.isFinite(e)];case"isnan":return[typeof e=="number"&&Number.isNaN(e)];case"isnormal":return[typeof e=="number"&&Number.isFinite(e)&&e!==0];case"isfinite":return[typeof e=="number"&&Number.isFinite(e)];case"numbers":return typeof e=="number"?[e]:[];case"strings":return typeof e=="string"?[e]:[];case"booleans":return typeof e=="boolean"?[e]:[];case"nulls":return e===null?[e]:[];case"arrays":return Array.isArray(e)?[e]:[];case"objects":return e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"iterables":return Array.isArray(e)||e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"scalars":return!Array.isArray(e)&&!(e&&typeof e=="object")?[e]:[];case"values":return e===null?[]:[e];case"not":return e===!1||e===null?[!0]:[!1];case"null":return[null];case"true":return[!0];case"false":return[!1];case"empty":return[];default:return null}}var tm=k(()=>{"use strict"});var nm=k(()=>{"use strict";jd();Gd();Vd();qd();Zd();Kd();Qd();Xd();Yd();Jd();em();tm()});function xo(e,t,n){if(t.length===0)return n;let[r,...s]=t;if(typeof r=="number"){if(e&&typeof e=="object"&&!Array.isArray(e))throw new Error("Cannot index object with number");if(r>536870911)throw new Error("Array index too large");if(r<0)throw new Error("Out of bounds negative array index");let c=Array.isArray(e)?[...e]:[];for(;c.length<=r;)c.push(null);return c[r]=xo(c[r],s,n),c}if(Array.isArray(e))throw new Error("Cannot index array with string");if(!_e(r))return e??Object.create(null);let i=Ge(e),o=i?wt(i):Object.create(null),a=Object.hasOwn(o,r)?o[r]:void 0;return ze(o,r,xo(a,s,n)),o}function Eo(e,t){if(t.length===0)return null;if(t.length===1){let s=t[0];if(Array.isArray(e)&&typeof s=="number"){let i=[...e];return i.splice(s,1),i}if(e&&typeof e=="object"&&!Array.isArray(e)){let i=String(s);if(!_e(i))return e;let o=wt(e);return delete o[i],o}return e}let[n,...r]=t;if(Array.isArray(e)&&typeof n=="number"){let s=[...e];return s[n]=Eo(s[n],r),s}if(e&&typeof e=="object"&&!Array.isArray(e)){let s=String(n);if(!_e(s))return e;let i=wt(e);return Object.hasOwn(i,s)&&ze(i,s,Eo(i[s],r)),i}return e}var rm=k(()=>{"use strict";Sn()});function C5(e){return{vars:e?.vars?new Map(e.vars):new Map,limits:{maxIterations:e?.limits?.maxIterations??A5,maxDepth:e?.limits?.maxDepth??om},env:e?.env,coverage:e?.coverage,requireDefenseContext:e?.requireDefenseContext,defenseContextChecked:!1}}function Co(e,t,n){let r=new Map(e.vars);return r.set(t,n),{vars:r,limits:e.limits,env:e.env,requireDefenseContext:e.requireDefenseContext,defenseContextChecked:e.defenseContextChecked,root:e.root,currentPath:e.currentPath,funcs:e.funcs,labels:e.labels,coverage:e.coverage}}function fi(e,t,n){switch(t.type){case"var":return Co(e,t.name,n);case"array":{if(!Array.isArray(n))return null;let r=e;for(let s=0;s<t.elements.length;s++){let i=t.elements[s],o=s<n.length?n[s]:null,a=fi(r,i,o);if(a===null)return null;r=a}return r}case"object":{let r=Ge(n);if(!r)return null;let s=e;for(let i of t.fields){let o;if(typeof i.key=="string")o=i.key;else{let c=V(n,i.key,e);if(c.length===0)return null;o=String(c[0])}let a=Wn(r,o)?r[o]:null;i.keyVar&&(s=Co(s,i.keyVar,a));let l=fi(s,i.pattern,a);if(l===null)return null;s=l}return s}}}function v5(e,t){let n=e;for(let r of t)if(n&&typeof n=="object")if(Array.isArray(n))if(typeof r=="number")n=n[r];else return;else{let s=Ge(n);if(s&&typeof r=="string"&&Object.hasOwn(s,r))n=s[r];else return}else return;return n}function fr(e){if(e.type==="Identity")return[];if(e.type==="Field"){let t=e.base?fr(e.base):[];return t===null?null:[...t,e.name]}if(e.type==="Index"&&e.index.type==="Literal"){let t=e.base?fr(e.base):[];if(t===null)return null;let n=e.index.value;return typeof n=="number"||typeof n=="string"?[...t,n]:null}if(e.type==="Pipe"){let t=fr(e.left);return t===null?null:pc(t,e.right)}if(e.type==="Call"){if(e.name==="parent"||e.name==="root")return null;if(e.name==="first"&&e.args.length===0)return[0];if(e.name==="last"&&e.args.length===0)return[-1]}return null}function pc(e,t){if(t.type==="Call"){if(t.name==="parent"){let n=1;if(t.args.length>0&&t.args[0].type==="Literal"){let r=t.args[0].value;typeof r=="number"&&(n=r)}if(n>=0)return e.slice(0,Math.max(0,e.length-n));{let r=-n-1;return e.slice(0,Math.min(r,e.length))}}if(t.name==="root")return[]}if(t.type==="Field"){let n=fr(t);if(n!==null)return[...e,...n]}if(t.type==="Index"&&t.index.type==="Literal"){let n=fr(t);if(n!==null)return[...e,...n]}if(t.type==="Pipe"){let n=pc(e,t.left);return n===null?null:pc(n,t.right)}return t.type==="Identity"?e:null}function k5(e){return e!==void 0&&e.vars instanceof Map&&"defenseContextChecked"in e}function sm(e,t,n){if(t.type==="Comma"){let r=[];try{r.push(...V(e,t.left,n))}catch(s){if(s instanceof X)throw s;if(r.length>0)return r;throw new Error("evaluation failed")}try{r.push(...V(e,t.right,n))}catch(s){if(s instanceof X)throw s;return r}return r}return V(e,t,n)}function V(e,t,n){let r=k5(n)?n:C5(n);switch(r.defenseContextChecked||(it(r.requireDefenseContext,"query-engine","evaluation"),r={...r,defenseContextChecked:!0}),r.root===void 0&&(r={...r,root:e,currentPath:[]}),r.coverage?.hit(`jq:node:${t.type}`),t.type){case"Identity":return[e];case"Field":return(t.base?V(e,t.base,r):[e]).flatMap(i=>{let o=Ge(i);if(o){if(!Object.hasOwn(o,t.name))return[null];let l=o[t.name];return[l===void 0?null:l]}if(i===null)return[null];let a=Array.isArray(i)?"array":typeof i;throw new Error(`Cannot index ${a} with string "${t.name}"`)});case"Index":return(t.base?V(e,t.base,r):[e]).flatMap(i=>V(i,t.index,r).flatMap(a=>{if(typeof a=="number"&&Array.isArray(i)){if(Number.isNaN(a))return[null];let l=Math.trunc(a),c=l<0?i.length+l:l;return c>=0&&c<i.length?[i[c]]:[null]}if(typeof a=="string"){let l=Ge(i);return!l||!Object.hasOwn(l,a)?[null]:[l[a]]}return[null]}));case"Slice":return(t.base?V(e,t.base,r):[e]).flatMap(i=>{if(i===null)return[null];if(!Array.isArray(i)&&typeof i!="string")throw new Error(`Cannot slice ${typeof i} (${JSON.stringify(i)})`);let o=i.length,a=t.start?V(e,t.start,r):[0],l=t.end?V(e,t.end,r):[o];return a.flatMap(c=>l.map(u=>{let f=c,p=u,h=Number.isNaN(f)?0:Number.isInteger(f)?f:Math.floor(f),d=Number.isNaN(p)?o:Number.isInteger(p)?p:Math.ceil(p),m=im(h,o),g=im(d,o);return Array.isArray(i),i.slice(m,g)}))});case"Iterate":return(t.base?V(e,t.base,r):[e]).flatMap(i=>Array.isArray(i)?i:i&&typeof i=="object"?Object.values(i):[]);case"Pipe":{let s=V(e,t.left,r),i=fr(t.left),o=[];for(let a of s)try{if(i!==null){let l={...r,currentPath:[...r.currentPath??[],...i]};o.push(...V(a,t.right,l))}else o.push(...V(a,t.right,r))}catch(l){throw l instanceof As?l.withPrependedResults(o):l}return o}case"Comma":{let s=V(e,t.left,r),i=V(e,t.right,r);return[...s,...i]}case"Literal":return[t.value];case"Array":return t.elements?[V(e,t.elements,r)]:[[]];case"Object":{let s=[Object.create(null)];for(let i of t.entries){let o=typeof i.key=="string"?[i.key]:V(e,i.key,r),a=V(e,i.value,r),l=[];for(let c of s)for(let u of o){if(typeof u!="string"){let f=u===null?"null":Array.isArray(u)?"array":typeof u;throw new Error(`Cannot use ${f} (${JSON.stringify(u)}) as object key`)}if(!_e(u)){for(let f of a)l.push(wt(c));continue}for(let f of a){let p=wt(c);ze(p,u,f),l.push(p)}}s.length=0,s.push(...l)}return s}case"Paren":return V(e,t.expr,r);case"BinaryOp":return $5(e,t.op,t.left,t.right,r);case"UnaryOp":return V(e,t.operand,r).map(i=>{if(t.op==="-"){if(typeof i=="number")return-i;if(typeof i=="string"){let o=a=>a.length>5?`"${a.slice(0,3)}...`:JSON.stringify(a);throw new Error(`string (${o(i)}) cannot be negated`)}return null}return t.op==="not"?!mn(i):null});case"Cond":return V(e,t.cond,r).flatMap(i=>{if(mn(i))return V(e,t.then,r);for(let o of t.elifs)if(V(e,o.cond,r).some(mn))return V(e,o.then,r);return t.else?V(e,t.else,r):[e]});case"Try":try{return V(e,t.body,r)}catch(s){if(t.catch){let i=s instanceof So?s.value:s instanceof Error?s.message:String(s);return V(i,t.catch,r)}return[]}case"Call":return am(e,t.name,t.args,r);case"VarBind":return V(e,t.value,r).flatMap(i=>{let o=null,a=[];t.pattern?a.push(t.pattern):t.name&&a.push({type:"var",name:t.name}),t.alternatives&&a.push(...t.alternatives);for(let l of a)if(o=fi(r,l,i),o!==null)break;return o===null?[]:V(e,t.body,o)});case"VarRef":{if(t.name==="$ENV")return[r.env?Ct(r.env):Object.create(null)];let s=r.vars.get(t.name);return s!==void 0?[s]:[null]}case"Recurse":{let s=[],i=new WeakSet,o=a=>{if(a&&typeof a=="object"){if(i.has(a))return;i.add(a)}if(s.push(a),Array.isArray(a))for(let l of a)o(l);else if(a&&typeof a=="object")for(let l of Object.keys(a))o(a[l])};return o(e),s}case"Optional":try{return V(e,t.expr,r)}catch{return[]}case"StringInterp":return[t.parts.map(i=>typeof i=="string"?i:V(e,i,r).map(a=>typeof a=="string"?a:JSON.stringify(a)).join("")).join("")];case"UpdateOp":return[N5(e,t.path,t.op,t.value,r)];case"Reduce":{let s=V(e,t.expr,r),i=V(e,t.init,r)[0],o=r.limits.maxDepth??om;for(let a of s){let l;if(t.pattern){if(l=fi(r,t.pattern,a),l===null)continue}else l=Co(r,t.varName,a);if(i=V(i,t.update,l)[0],Es(i,o+1)>o)return[null]}return[i]}case"Foreach":{let s=V(e,t.expr,r),i=V(e,t.init,r)[0],o=[];for(let a of s)try{let l;if(t.pattern){if(l=fi(r,t.pattern,a),l===null)continue}else l=Co(r,t.varName,a);if(i=V(i,t.update,l)[0],t.extract){let c=V(i,t.extract,l);o.push(...c)}else o.push(i)}catch(l){throw l instanceof As?l.withPrependedResults(o):l}return o}case"Label":try{return V(e,t.body,{...r,labels:new Set([...r.labels??[],t.name])})}catch(s){if(s instanceof As&&s.label===t.name)return s.partialResults;throw s}case"Break":throw new As(t.name);case"Def":{let s=new Map(r.funcs??[]),i=`${t.name}/${t.params.length}`;s.set(i,{params:t.params,body:t.funcBody,closure:new Map(r.funcs??[])});let o={...r,funcs:s};return V(e,t.body,o)}default:{let s=t;throw new Error(`Unknown AST node type: ${s.type}`)}}}function im(e,t){return e<0?Math.max(0,t+e):Math.min(e,t)}function N5(e,t,n,r,s){function i(l,c){switch(n){case"=":return c;case"|=":return V(l,r,s)[0]??null;case"+=":return typeof l=="number"&&typeof c=="number"||typeof l=="string"&&typeof c=="string"?l+c:Array.isArray(l)&&Array.isArray(c)?[...l,...c]:l&&c&&typeof l=="object"&&typeof c=="object"?xl(l,c):c;case"-=":return typeof l=="number"&&typeof c=="number"?l-c:l;case"*=":return typeof l=="number"&&typeof c=="number"?l*c:l;case"/=":return typeof l=="number"&&typeof c=="number"?l/c:l;case"%=":return typeof l=="number"&&typeof c=="number"?l%c:l;case"//=":return l===null||l===!1?c:l;default:return c}}function o(l,c,u){switch(c.type){case"Identity":return u(l);case"Field":{if(!_e(c.name))return l;if(c.base)return o(l,c.base,f=>{if(f&&typeof f=="object"&&!Array.isArray(f)){let p=wt(f),h=Object.hasOwn(p,c.name)?p[c.name]:void 0;return ze(p,c.name,u(h)),p}return f});if(l&&typeof l=="object"&&!Array.isArray(l)){let f=wt(l),p=Object.hasOwn(f,c.name)?f[c.name]:void 0;return ze(f,c.name,u(p)),f}return l}case"Index":{let p=V(e,c.index,s)[0];if(typeof p=="number"&&Number.isNaN(p))throw new Error("Cannot set array element at NaN index");if(typeof p=="number"&&!Number.isInteger(p)&&(p=Math.trunc(p)),c.base)return o(l,c.base,h=>{if(typeof p=="number"&&Array.isArray(h)){let d=[...h],m=p<0?d.length+p:p;if(m>=0){for(;d.length<=m;)d.push(null);d[m]=u(d[m])}return d}if(typeof p=="string"&&h&&typeof h=="object"&&!Array.isArray(h)){if(!_e(p))return h;let d=wt(h),m=Object.hasOwn(d,p)?d[p]:void 0;return ze(d,p,u(m)),d}return h});if(typeof p=="number"){if(p>536870911)throw new Error("Array index too large");if(p<0&&(!l||!Array.isArray(l)))throw new Error("Out of bounds negative array index");if(Array.isArray(l)){let d=[...l],m=p<0?d.length+p:p;if(m>=0){for(;d.length<=m;)d.push(null);d[m]=u(d[m])}return d}if(l==null){let d=[];for(;d.length<=p;)d.push(null);return d[p]=u(null),d}return l}if(typeof p=="string"&&l&&typeof l=="object"&&!Array.isArray(l)){if(!_e(p))return l;let h=wt(l),d=Object.hasOwn(h,p)?h[p]:void 0;return ze(h,p,u(d)),h}return l}case"Iterate":{let f=p=>{if(Array.isArray(p))return p.map(h=>u(h));if(p&&typeof p=="object"){let h=Object.create(null);for(let[d,m]of Object.entries(p))_e(d)&&ze(h,d,u(m));return h}return p};return c.base?o(l,c.base,f):f(l)}case"Pipe":{let f=o(l,c.left,p=>p);return o(f,c.right,u)}default:return u(l)}}return o(e,t,l=>{if(n==="|=")return i(l,l);let c=V(e,r,s);return i(l,c[0]??null)})}function I5(e,t,n){function r(i,o,a){switch(o.type){case"Identity":return a;case"Field":{if(!_e(o.name))return i;if(o.base){let l=V(i,o.base,n)[0],c=r(l,{type:"Field",name:o.name},a);return r(i,o.base,c)}if(i&&typeof i=="object"&&!Array.isArray(i)){let l=wt(i);return ze(l,o.name,a),l}return i}case"Index":{if(o.base){let u=V(i,o.base,n)[0],f=r(u,{type:"Index",index:o.index},a);return r(i,o.base,f)}let c=V(e,o.index,n)[0];if(typeof c=="number"&&Array.isArray(i)){let u=[...i],f=c<0?u.length+c:c;return f>=0&&f<u.length&&(u[f]=a),u}if(typeof c=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!_e(c))return i;let u=wt(i);return ze(u,c,a),u}return i}default:return i}}function s(i,o){switch(o.type){case"Identity":return null;case"Field":{if(!_e(o.name))return i;if(o.base){let l=V(i,o.base,n)[0];if(l==null)return i;let c=s(l,{type:"Field",name:o.name});return r(i,o.base,c)}if(i&&typeof i=="object"&&!Array.isArray(i)){if(!_e(o.name))return i;let l=wt(i);return delete l[o.name],l}return i}case"Index":{if(o.base){let u=V(i,o.base,n)[0];if(u==null)return i;let f=s(u,{type:"Index",index:o.index});return r(i,o.base,f)}let c=V(e,o.index,n)[0];if(typeof c=="number"&&Array.isArray(i)){let u=[...i],f=c<0?u.length+c:c;return f>=0&&f<u.length&&u.splice(f,1),u}if(typeof c=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!_e(c))return i;let u=wt(i);return delete u[c],u}return i}case"Iterate":return Array.isArray(i)?[]:i&&typeof i=="object"?Object.create(null):i;case"Pipe":{let u=function(h,d,m){switch(d.type){case"Identity":return m;case"Field":{if(!_e(d.name))return h;if(h&&typeof h=="object"&&!Array.isArray(h)){let g=wt(h);return ze(g,d.name,m),g}return h}case"Index":{let y=V(e,d.index,n)[0];if(typeof y=="number"&&Array.isArray(h)){let w=[...h],b=y<0?w.length+y:y;return b>=0&&b<w.length&&(w[b]=m),w}if(typeof y=="string"&&h&&typeof h=="object"&&!Array.isArray(h)){if(!_e(y))return h;let w=wt(h);return ze(w,y,m),w}return h}case"Pipe":{let g=V(h,d.left,n)[0],y=u(g,d.right,m);return u(h,d.left,y)}default:return h}};var a=u;let l=o.left,c=o.right,f=V(i,l,n)[0];if(f==null)return i;let p=s(f,c);return u(i,l,p)}default:return i}}return s(e,t)}function $5(e,t,n,r,s){if(t==="and")return V(e,n,s).flatMap(l=>mn(l)?V(e,r,s).map(u=>mn(u)):[!1]);if(t==="or")return V(e,n,s).flatMap(l=>mn(l)?[!0]:V(e,r,s).map(u=>mn(u)));if(t==="//"){let l=V(e,n,s).filter(c=>c!=null&&c!==!1);return l.length>0?l:V(e,r,s)}let i=V(e,n,s),o=V(e,r,s);return i.flatMap(a=>o.map(l=>{switch(t){case"+":return a===null?l:l===null?a:typeof a=="number"&&typeof l=="number"||typeof a=="string"&&typeof l=="string"?a+l:Array.isArray(a)&&Array.isArray(l)?[...a,...l]:a&&l&&typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)?xl(a,l):null;case"-":if(typeof a=="number"&&typeof l=="number")return a-l;if(Array.isArray(a)&&Array.isArray(l)){let c=new Set(l.map(u=>JSON.stringify(u)));return a.filter(u=>!c.has(JSON.stringify(u)))}if(typeof a=="string"&&typeof l=="string"){let c=u=>u.length>10?`"${u.slice(0,10)}...`:JSON.stringify(u);throw new Error(`string (${c(a)}) and string (${c(l)}) cannot be subtracted`)}return null;case"*":if(typeof a=="number"&&typeof l=="number")return a*l;if(typeof a=="string"&&typeof l=="number")return a.repeat(l);{let c=Ge(a),u=Ge(l);if(c&&u)return nc(c,u)}return null;case"/":if(typeof a=="number"&&typeof l=="number"){if(l===0)throw new Error(`number (${a}) and number (${l}) cannot be divided because the divisor is zero`);return a/l}return typeof a=="string"&&typeof l=="string"?a.split(l):null;case"%":if(typeof a=="number"&&typeof l=="number"){if(l===0)throw new Error(`number (${a}) and number (${l}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(a)&&!Number.isNaN(a)?!Number.isFinite(l)&&!Number.isNaN(l)&&a<0&&l>0?-1:0:a%l}return null;case"==":return xs(a,l);case"!=":return!xs(a,l);case"<":return ui(a,l)<0;case"<=":return ui(a,l)<=0;case">":return ui(a,l)>0;case">=":return ui(a,l)>=0;default:return null}}))}function am(e,t,n,r){let s=S5.get(t);if(s)return typeof e=="number"?[s(e)]:[null];let i=ic(e,t,n,r,V);if(i!==null)return i;let o=uc(e,t,n,r,V);if(o!==null)return o;let a=tc(e,t,n,r,V);if(a!==null)return a;let l=rc(e,t,r.limits.maxDepth);if(l!==null)return l;let c=fc(e,t);if(c!==null)return c;let u=ac(e,t,n,r,V);if(u!==null)return u;let f=Jl(e,t,n,r,V,sm,yo,mn,wo,X);if(f!==null)return f;let p=lc(e,t,n,r,V,mn,xo,Eo,I5,Ao);if(p!==null)return p;let h=sc(e,t,n,r,V,xs);if(h!==null)return h;let d=ec(e,t,n,r,V,sm,mn,X);if(d!==null)return d;let m=oc(e,t,n,r,V,mn,v5,am);if(m!==null)return m;let g=cc(e,t,n,r,V,xs);if(g!==null)return g;switch(t){case"builtins":return[["add/0","all/0","all/1","all/2","any/0","any/1","any/2","arrays/0","ascii/0","ascii_downcase/0","ascii_upcase/0","booleans/0","bsearch/1","builtins/0","combinations/0","combinations/1","contains/1","debug/0","del/1","delpaths/1","empty/0","env/0","error/0","error/1","explode/0","first/0","first/1","flatten/0","flatten/1","floor/0","from_entries/0","fromdate/0","fromjson/0","getpath/1","gmtime/0","group_by/1","gsub/2","gsub/3","has/1","implode/0","IN/1","IN/2","INDEX/1","INDEX/2","index/1","indices/1","infinite/0","inside/1","isempty/1","isnan/0","isnormal/0","isvalid/1","iterables/0","join/1","keys/0","keys_unsorted/0","last/0","last/1","length/0","limit/2","ltrimstr/1","map/1","map_values/1","match/1","match/2","max/0","max_by/1","min/0","min_by/1","mktime/0","modulemeta/1","nan/0","not/0","nth/1","nth/2","null/0","nulls/0","numbers/0","objects/0","path/1","paths/0","paths/1","pick/1","range/1","range/2","range/3","recurse/0","recurse/1","recurse_down/0","repeat/1","reverse/0","rindex/1","rtrimstr/1","scalars/0","scan/1","scan/2","select/1","setpath/2","skip/2","sort/0","sort_by/1","split/1","splits/1","splits/2","sqrt/0","startswith/1","strftime/1","strings/0","strptime/1","sub/2","sub/3","test/1","test/2","to_entries/0","toboolean/0","todate/0","tojson/0","tostream/0","fromstream/1","truncate_stream/1","tonumber/0","tostring/0","transpose/0","trim/0","ltrim/0","rtrim/0","type/0","unique/0","unique_by/1","until/2","utf8bytelength/0","values/0","walk/1","while/2","with_entries/1"]];case"error":{let y=n.length>0?V(e,n[0],r)[0]:e;throw new So(y)}case"env":return[r.env?Ct(r.env):Object.create(null)];case"debug":return[e];case"input_line_number":return[1];default:{let y=`${t}/${n.length}`,w=r.funcs?.get(y);if(w){let b=w.closure??r.funcs??new Map,x=new Map(b);x.set(y,w);for(let v=0;v<w.params.length;v++){let $=w.params[v],D=n[v];if(D){let O=V(e,D,r),P;if(O.length===0)P={type:"Call",name:"empty",args:[]};else if(O.length===1)P={type:"Literal",value:O[0]};else{P={type:"Literal",value:O[O.length-1]};for(let C=O.length-2;C>=0;C--)P={type:"Comma",left:{type:"Literal",value:O[C]},right:P}}x.set(`${$}/0`,{params:[],body:P})}}let S={...r,funcs:x};return V(e,w.body,S)}throw new Error(`Unknown function: ${t}`)}}}function Ao(e,t,n,r,s){if(t.type==="Comma"){let a=t;Ao(e,a.left,n,r,s),Ao(e,a.right,n,r,s);return}let i=fr(t);if(i!==null){s.push([...r,...i]);return}if(t.type==="Iterate"){if(Array.isArray(e))for(let a=0;a<e.length;a++)s.push([...r,a]);else if(e&&typeof e=="object")for(let a of Object.keys(e))s.push([...r,a]);return}if(t.type==="Recurse"){let a=(l,c)=>{if(s.push([...r,...c]),l&&typeof l=="object")if(Array.isArray(l))for(let u=0;u<l.length;u++)a(l[u],[...c,u]);else for(let u of Object.keys(l))a(l[u],[...c,u])};a(e,[]);return}if(t.type==="Pipe"){let a=fr(t.left);if(a!==null){let l=V(e,t.left,n);for(let c of l)Ao(c,t.right,n,[...r,...a],s);return}}V(e,t,n).length>0&&s.push(r)}var As,So,A5,om,S5,lm=k(()=>{"use strict";er();Ae();zn();nm();rm();Sn();bo();As=class e extends Error{label;partialResults;constructor(t,n=[]){super(`break ${t}`),this.label=t,this.partialResults=n,this.name="BreakError"}withPrependedResults(t){return new e(this.label,[...t,...this.partialResults])}},So=class extends Error{value;constructor(t){super(typeof t=="string"?t:JSON.stringify(t)),this.value=t,this.name="JqError"}},A5=1e4,om=2e3,S5=new Map([["floor",Math.floor],["ceil",Math.ceil],["round",Math.round],["sqrt",Math.sqrt],["log",Math.log],["log10",Math.log10],["log2",Math.log2],["exp",Math.exp],["sin",Math.sin],["cos",Math.cos],["tan",Math.tan],["asin",Math.asin],["acos",Math.acos],["atan",Math.atan],["sinh",Math.sinh],["cosh",Math.cosh],["tanh",Math.tanh],["asinh",Math.asinh],["acosh",Math.acosh],["atanh",Math.atanh],["cbrt",Math.cbrt],["expm1",Math.expm1],["log1p",Math.log1p],["trunc",Math.trunc]])});function um(e){let t=[],n=0,r=(c=0)=>e[n+c],s=()=>e[n++],i=()=>n>=e.length,o=c=>c>="0"&&c<="9",a=c=>c>="a"&&c<="z"||c>="A"&&c<="Z"||c==="_",l=c=>a(c)||o(c);for(;!i();){let c=n,u=s();if(!(u===" "||u===" "||u===`
555
555
  `||u==="\r")){if(u==="#"){for(;!i()&&r()!==`
556
556
  `;)s();continue}if(u==="."&&r()==="."){s(),t.push({type:"DOTDOT",pos:c});continue}if(u==="="&&r()==="="){s(),t.push({type:"EQ",pos:c});continue}if(u==="!"&&r()==="="){s(),t.push({type:"NE",pos:c});continue}if(u==="<"&&r()==="="){s(),t.push({type:"LE",pos:c});continue}if(u===">"&&r()==="="){s(),t.push({type:"GE",pos:c});continue}if(u==="/"&&r()==="/"){s(),r()==="="?(s(),t.push({type:"UPDATE_ALT",pos:c})):t.push({type:"ALT",pos:c});continue}if(u==="+"&&r()==="="){s(),t.push({type:"UPDATE_ADD",pos:c});continue}if(u==="-"&&r()==="="){s(),t.push({type:"UPDATE_SUB",pos:c});continue}if(u==="*"&&r()==="="){s(),t.push({type:"UPDATE_MUL",pos:c});continue}if(u==="/"&&r()==="="){s(),t.push({type:"UPDATE_DIV",pos:c});continue}if(u==="%"&&r()==="="){s(),t.push({type:"UPDATE_MOD",pos:c});continue}if(u==="="&&r()!=="="){t.push({type:"ASSIGN",pos:c});continue}if(u==="."){t.push({type:"DOT",pos:c});continue}if(u==="|"){r()==="="?(s(),t.push({type:"UPDATE_PIPE",pos:c})):t.push({type:"PIPE",pos:c});continue}if(u===","){t.push({type:"COMMA",pos:c});continue}if(u===":"){t.push({type:"COLON",pos:c});continue}if(u===";"){t.push({type:"SEMICOLON",pos:c});continue}if(u==="("){t.push({type:"LPAREN",pos:c});continue}if(u===")"){t.push({type:"RPAREN",pos:c});continue}if(u==="["){t.push({type:"LBRACKET",pos:c});continue}if(u==="]"){t.push({type:"RBRACKET",pos:c});continue}if(u==="{"){t.push({type:"LBRACE",pos:c});continue}if(u==="}"){t.push({type:"RBRACE",pos:c});continue}if(u==="?"){t.push({type:"QUESTION",pos:c});continue}if(u==="+"){t.push({type:"PLUS",pos:c});continue}if(u==="-"){t.push({type:"MINUS",pos:c});continue}if(u==="*"){t.push({type:"STAR",pos:c});continue}if(u==="/"){t.push({type:"SLASH",pos:c});continue}if(u==="%"){t.push({type:"PERCENT",pos:c});continue}if(u==="<"){t.push({type:"LT",pos:c});continue}if(u===">"){t.push({type:"GT",pos:c});continue}if(o(u)){let f=u;for(;!i()&&(o(r())||r()==="."||r()==="e"||r()==="E");)(r()==="e"||r()==="E")&&(e[n+1]==="+"||e[n+1]==="-")&&(f+=s()),f+=s();t.push({type:"NUMBER",value:Number(f),pos:c});continue}if(u==='"'){let f="";for(;!i()&&r()!=='"';)if(r()==="\\"){if(s(),i())break;let p=s();switch(p){case"n":f+=`
557
557
  `;break;case"r":f+="\r";break;case"t":f+=" ";break;case"\\":f+="\\";break;case'"':f+='"';break;case"(":f+="\\(";break;default:f+=p}}else f+=s();i()||s(),t.push({type:"STRING",value:f,pos:c});continue}if(a(u)||u==="$"||u==="@"){let f=u;for(;!i()&&l(r());)f+=s();let p=cm.get(f);p?t.push({type:p,value:f,pos:c}):t.push({type:"IDENT",value:f,pos:c});continue}throw new Error(`Unexpected character '${u}' at position ${c}`)}}return t.push({type:"EOF",pos:n}),t}function fm(e){let t=um(e);return new hc(t).parse()}var cm,vo,hc,pm=k(()=>{"use strict";cm=new Map([["and","AND"],["or","OR"],["not","NOT"],["if","IF"],["then","THEN"],["elif","ELIF"],["else","ELSE"],["end","END"],["as","AS"],["try","TRY"],["catch","CATCH"],["true","TRUE"],["false","FALSE"],["null","NULL"],["reduce","REDUCE"],["foreach","FOREACH"],["label","LABEL"],["break","BREAK"],["def","DEF"]]),vo=new Set(cm.values());hc=class e{tokens;pos=0;constructor(t){this.tokens=t}peek(t=0){return this.tokens[this.pos+t]??{type:"EOF",pos:-1}}advance(){return this.tokens[this.pos++]}check(t){return this.peek().type===t}match(...t){for(let n of t)if(this.check(n))return this.advance();return null}expect(t,n){if(!this.check(t))throw new Error(`${n} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}isFieldNameAfterDot(t=0){let n=this.peek(t),r=this.peek(t+1);return r.type==="STRING"?!0:r.type==="IDENT"||vo.has(r.type)?r.pos===n.pos+1:!1}isIdentLike(){let t=this.peek().type;return t==="IDENT"||vo.has(t)}consumeFieldNameAfterDot(t){let n=this.peek();return n.type==="STRING"?this.advance().value:(n.type==="IDENT"||vo.has(n.type))&&n.pos===t.pos+1?this.advance().value:null}parse(){let t=this.parseExpr();if(!this.check("EOF"))throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return t}parseExpr(){return this.parsePipe()}parsePattern(){if(this.match("LBRACKET")){let r=[];if(!this.check("RBRACKET"))for(r.push(this.parsePattern());this.match("COMMA")&&!this.check("RBRACKET");)r.push(this.parsePattern());return this.expect("RBRACKET","Expected ']' after array pattern"),{type:"array",elements:r}}if(this.match("LBRACE")){let r=[];if(!this.check("RBRACE"))for(r.push(this.parsePatternField());this.match("COMMA")&&!this.check("RBRACE");)r.push(this.parsePatternField());return this.expect("RBRACE","Expected '}' after object pattern"),{type:"object",fields:r}}let t=this.expect("IDENT","Expected variable name in pattern"),n=t.value;if(!n.startsWith("$"))throw new Error(`Variable name must start with $ at position ${t.pos}`);return{type:"var",name:n}}parsePatternField(){if(this.match("LPAREN")){let n=this.parseExpr();this.expect("RPAREN","Expected ')' after computed key"),this.expect("COLON","Expected ':' after computed key");let r=this.parsePattern();return{key:n,pattern:r}}let t=this.peek();if(t.type==="IDENT"||vo.has(t.type)){let n=t.value;if(n.startsWith("$")){if(this.advance(),this.match("COLON")){let r=this.parsePattern();return{key:n.slice(1),pattern:r,keyVar:n}}return{key:n.slice(1),pattern:{type:"var",name:n}}}if(this.advance(),this.match("COLON")){let r=this.parsePattern();return{key:n,pattern:r}}return{key:n,pattern:{type:"var",name:`$${n}`}}}throw new Error(`Expected field name in object pattern at position ${t.pos}`)}parsePipe(){let t=this.parseComma();for(;this.match("PIPE");){let n=this.parseComma();t={type:"Pipe",left:t,right:n}}return t}parseComma(){let t=this.parseVarBind();for(;this.match("COMMA");){let n=this.parseVarBind();t={type:"Comma",left:t,right:n}}return t}parseVarBind(){let t=this.parseUpdate();if(this.match("AS")){let n=this.parsePattern(),r=[];for(;this.check("QUESTION")&&this.peekAhead(1)?.type==="ALT";)this.advance(),this.advance(),r.push(this.parsePattern());this.expect("PIPE","Expected '|' after variable binding");let s=this.parseExpr();return n.type==="var"&&r.length===0?{type:"VarBind",name:n.name,value:t,body:s}:{type:"VarBind",name:n.type==="var"?n.name:"",value:t,body:s,pattern:n.type!=="var"?n:void 0,alternatives:r.length>0?r:void 0}}return t}peekAhead(t){let n=this.pos+t;return n<this.tokens.length?this.tokens[n]:void 0}parseUpdate(){let t=this.parseAlt(),n=new Map([["ASSIGN","="],["UPDATE_ADD","+="],["UPDATE_SUB","-="],["UPDATE_MUL","*="],["UPDATE_DIV","/="],["UPDATE_MOD","%="],["UPDATE_ALT","//="],["UPDATE_PIPE","|="]]),r=this.match("ASSIGN","UPDATE_ADD","UPDATE_SUB","UPDATE_MUL","UPDATE_DIV","UPDATE_MOD","UPDATE_ALT","UPDATE_PIPE");if(r){let s=this.parseVarBind(),i=n.get(r.type);if(i)return{type:"UpdateOp",op:i,path:t,value:s}}return t}parseAlt(){let t=this.parseOr();for(;this.match("ALT");){let n=this.parseOr();t={type:"BinaryOp",op:"//",left:t,right:n}}return t}parseOr(){let t=this.parseAnd();for(;this.match("OR");){let n=this.parseAnd();t={type:"BinaryOp",op:"or",left:t,right:n}}return t}parseAnd(){let t=this.parseNot();for(;this.match("AND");){let n=this.parseNot();t={type:"BinaryOp",op:"and",left:t,right:n}}return t}parseNot(){return this.parseComparison()}parseComparison(){let t=this.parseAddSub(),n=new Map([["EQ","=="],["NE","!="],["LT","<"],["LE","<="],["GT",">"],["GE",">="]]),r=this.match("EQ","NE","LT","LE","GT","GE");if(r){let s=n.get(r.type);if(s){let i=this.parseAddSub();t={type:"BinaryOp",op:s,left:t,right:i}}}return t}parseAddSub(){let t=this.parseMulDiv();for(;;)if(this.match("PLUS")){let n=this.parseMulDiv();t={type:"BinaryOp",op:"+",left:t,right:n}}else if(this.match("MINUS")){let n=this.parseMulDiv();t={type:"BinaryOp",op:"-",left:t,right:n}}else break;return t}parseMulDiv(){let t=this.parseUnary();for(;;)if(this.match("STAR")){let n=this.parseUnary();t={type:"BinaryOp",op:"*",left:t,right:n}}else if(this.match("SLASH")){let n=this.parseUnary();t={type:"BinaryOp",op:"/",left:t,right:n}}else if(this.match("PERCENT")){let n=this.parseUnary();t={type:"BinaryOp",op:"%",left:t,right:n}}else break;return t}parseUnary(){return this.match("MINUS")?{type:"UnaryOp",op:"-",operand:this.parseUnary()}:this.parsePostfix()}parsePostfix(){let t=this.parsePrimary();for(;;)if(this.match("QUESTION"))t={type:"Optional",expr:t};else if(this.check("DOT")&&this.isFieldNameAfterDot())this.advance(),t={type:"Field",name:this.advance().value,base:t};else if(this.check("LBRACKET"))if(this.advance(),this.match("RBRACKET"))t={type:"Iterate",base:t};else if(this.check("COLON")){this.advance();let n=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),t={type:"Slice",end:n,base:t}}else{let n=this.parseExpr();if(this.match("COLON")){let r=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),t={type:"Slice",start:n,end:r,base:t}}else this.expect("RBRACKET","Expected ']'"),t={type:"Index",index:n,base:t}}else break;return t}parsePrimary(){if(this.match("DOTDOT"))return{type:"Recurse"};if(this.check("DOT")){let t=this.advance();if(this.check("LBRACKET")){if(this.advance(),this.match("RBRACKET"))return{type:"Iterate"};if(this.check("COLON")){this.advance();let s=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",end:s}}let r=this.parseExpr();if(this.match("COLON")){let s=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",start:r,end:s}}return this.expect("RBRACKET","Expected ']'"),{type:"Index",index:r}}let n=this.consumeFieldNameAfterDot(t);return n!==null?{type:"Field",name:n}:{type:"Identity"}}if(this.match("TRUE"))return{type:"Literal",value:!0};if(this.match("FALSE"))return{type:"Literal",value:!1};if(this.match("NULL"))return{type:"Literal",value:null};if(this.check("NUMBER"))return{type:"Literal",value:this.advance().value};if(this.check("STRING")){let n=this.advance().value;return n.includes("\\(")?this.parseStringInterpolation(n):{type:"Literal",value:n}}if(this.match("LBRACKET")){if(this.match("RBRACKET"))return{type:"Array"};let t=this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Array",elements:t}}if(this.match("LBRACE"))return this.parseObjectConstruction();if(this.match("LPAREN")){let t=this.parseExpr();return this.expect("RPAREN","Expected ')'"),{type:"Paren",expr:t}}if(this.match("IF"))return this.parseIf();if(this.match("TRY")){let t=this.parsePostfix(),n;return this.match("CATCH")&&(n=this.parsePostfix()),{type:"Try",body:t,catch:n}}if(this.match("REDUCE")){let t=this.parseAddSub();this.expect("AS","Expected 'as' after reduce expression");let n=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let r=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let s=this.parseExpr();this.expect("RPAREN","Expected ')' after update expression");let i=n.type==="var"?n.name:"";return{type:"Reduce",expr:t,varName:i,init:r,update:s,pattern:n.type!=="var"?n:void 0}}if(this.match("FOREACH")){let t=this.parseAddSub();this.expect("AS","Expected 'as' after foreach expression");let n=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let r=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let s=this.parseExpr(),i;this.match("SEMICOLON")&&(i=this.parseExpr()),this.expect("RPAREN","Expected ')' after expressions");let o=n.type==="var"?n.name:"";return{type:"Foreach",expr:t,varName:o,init:r,update:s,extract:i,pattern:n.type!=="var"?n:void 0}}if(this.match("LABEL")){let t=this.expect("IDENT","Expected label name (e.g., $out)"),n=t.value;if(!n.startsWith("$"))throw new Error(`Label name must start with $ at position ${t.pos}`);this.expect("PIPE","Expected '|' after label name");let r=this.parseExpr();return{type:"Label",name:n,body:r}}if(this.match("BREAK")){let t=this.expect("IDENT","Expected label name to break to"),n=t.value;if(!n.startsWith("$"))throw new Error(`Break label must start with $ at position ${t.pos}`);return{type:"Break",name:n}}if(this.match("DEF")){let n=this.expect("IDENT","Expected function name after def").value,r=[];if(this.match("LPAREN")){if(!this.check("RPAREN")){let o=this.expect("IDENT","Expected parameter name");for(r.push(o.value);this.match("SEMICOLON");){let a=this.expect("IDENT","Expected parameter name");r.push(a.value)}}this.expect("RPAREN","Expected ')' after parameters")}this.expect("COLON","Expected ':' after function name");let s=this.parseExpr();this.expect("SEMICOLON","Expected ';' after function body");let i=this.parseExpr();return{type:"Def",name:n,params:r,funcBody:s,body:i}}if(this.match("NOT"))return{type:"Call",name:"not",args:[]};if(this.check("IDENT")){let n=this.advance().value;if(n.startsWith("$"))return{type:"VarRef",name:n};if(this.match("LPAREN")){let r=[];if(!this.check("RPAREN"))for(r.push(this.parseExpr());this.match("SEMICOLON");)r.push(this.parseExpr());return this.expect("RPAREN","Expected ')'"),{type:"Call",name:n,args:r}}return{type:"Call",name:n,args:[]}}throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){let t=[];if(!this.check("RBRACE"))do{let n,r;if(this.match("LPAREN"))n=this.parseExpr(),this.expect("RPAREN","Expected ')'"),this.expect("COLON","Expected ':'"),r=this.parseObjectValue();else if(this.isIdentLike()){let s=this.advance().value;this.match("COLON")?(n=s,r=this.parseObjectValue()):(n=s,r={type:"Field",name:s})}else if(this.check("STRING"))n=this.advance().value,this.expect("COLON","Expected ':'"),r=this.parseObjectValue();else throw new Error(`Expected object key at position ${this.peek().pos}`);t.push({key:n,value:r})}while(this.match("COMMA"));return this.expect("RBRACE","Expected '}'"),{type:"Object",entries:t}}parseObjectValue(){let t=this.parseVarBind();for(;this.match("PIPE");){let n=this.parseVarBind();t={type:"Pipe",left:t,right:n}}return t}parseIf(){let t=this.parseExpr();this.expect("THEN","Expected 'then'");let n=this.parseExpr(),r=[];for(;this.match("ELIF");){let i=this.parseExpr();this.expect("THEN","Expected 'then' after elif");let o=this.parseExpr();r.push({cond:i,then:o})}let s;return this.match("ELSE")&&(s=this.parseExpr()),this.expect("END","Expected 'end'"),{type:"Cond",cond:t,then:n,elifs:r,else:s}}parseStringInterpolation(t){let n=[],r="",s=0;for(;s<t.length;)if(t[s]==="\\"&&t[s+1]==="("){r&&(n.push(r),r=""),s+=2;let i=1,o="";for(;s<t.length&&i>0;)t[s]==="("?i++:t[s]===")"&&i--,i>0&&(o+=t[s]),s++;let a=um(o),l=new e(a);n.push(l.parse())}else r+=t[s],s++;return r&&n.push(r),{type:"StringInterp",parts:n}}}});var hm=k(()=>{"use strict";lm();pm()});var mm={};ee(mm,{flagsForFuzzing:()=>D5,jqCommand:()=>P5});function T5(e){switch(e){case"\b":return"\\b";case"\f":return"\\f";case`
@@ -563,9 +563,9 @@ ${a.map(c=>{let u=pi(e[c],!1,!1,r,s,i+1);return`${o.repeat(i+1)}${JSON.stringify
563
563
  `)}
564
564
  ${o.repeat(i)}}`}return String(e)}var R5,P5,D5,gm=k(()=>{"use strict";he();En();Ae();zn();un();Tr();oe();hm();Sn();R5={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-R, --raw-input read input as raw strings, not JSON","-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --arg name value bind $name to string value"," --tab use tabs for indentation"," --help display this help and exit"]};P5={name:"jq",async execute(e,t){it(t.requireDefenseContext,"jq","execution entry");let n=(y,w)=>_t(t.requireDefenseContext,"jq",y,w);if(U(e))return M(R5);let r=!1,s=!1,i=!1,o=!1,a=!1,l=!1,c=!1,u=!1,f=!1,p=new Map,h=".",d=!1,m=[];for(let y=0;y<e.length;y++){let w=e[y];if(w==="-R"||w==="--raw-input")s=!0;else if(w==="-r"||w==="--raw-output")r=!0;else if(w==="-c"||w==="--compact-output")i=!0;else if(w==="-e"||w==="--exit-status")o=!0;else if(w==="-s"||w==="--slurp")a=!0;else if(w==="-n"||w==="--null-input")l=!0;else if(w==="-j"||w==="--join-output")c=!0;else if(!(w==="-a"||w==="--ascii")){if(w==="-S"||w==="--sort-keys")u=!0;else if(!(w==="-C"||w==="--color")){if(!(w==="-M"||w==="--monochrome"))if(w==="--tab")f=!0;else if(w==="--arg"){let b=e[y+1],x=e[y+2];if(b===void 0||x===void 0)return{stdout:"",stderr:`jq: --arg requires two arguments
565
565
  `,exitCode:2};p.set(`$${b}`,x),y+=2}else if(w==="-")m.push("-");else{if(w.startsWith("--"))return K("jq",w);if(w.startsWith("-")){for(let b of w.slice(1))if(b==="R")s=!0;else if(b==="r")r=!0;else if(b==="c")i=!0;else if(b==="e")o=!0;else if(b==="s")a=!0;else if(b==="n")l=!0;else if(b==="j")c=!0;else if(b!=="a"){if(b==="S")u=!0;else if(b!=="C"){if(b!=="M")return K("jq",`-${b}`)}}}else d?m.push(w):(h=w,d=!0)}}}}let g=[];if(!l)if(m.length===0||m.length===1&&m[0]==="-")g.push({source:"stdin",content:se(t.stdin)});else{let y=await n("file read",()=>$r(t,m,{cmdName:"jq",stopOnError:!0}));if(y.exitCode!==0)return{stdout:"",stderr:y.stderr,exitCode:2};g=y.files.map(w=>({source:w.filename||"stdin",content:se(w.content)}))}try{let y=fm(h),w=[],b={limits:t.limits?{maxIterations:t.limits.maxJqIterations}:void 0,env:t.env,vars:p,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext};if(l)w=V(null,y,b);else if(s&&a){let P=g.map(({content:C})=>C).join("");w=V(P,y,b)}else if(s)for(let{content:P}of g){let C=P.split(`
566
- `);C.length>0&&C.at(-1)===""&&C.pop();for(let T of C)w.push(...V(T,y,b))}else if(a){let P=[];for(let{content:C}of g){let T=C.trim();T&&P.push(...dm(T))}w=V(P,y,b)}else for(let{content:P}of g){let C=P.trim();if(!C)continue;let T=dm(C);for(let O of T)w.push(...V(O,y,b))}let x=w.map(P=>pi(P,i,r,u,f)),S=c?"":`
567
- `,v=x.join(S),$=t.limits?.maxStringLength;if($!==void 0&&$>0&&v.length>$)throw new X(`jq: output size limit exceeded (${$} bytes)`,"string_length");let _=o&&(w.length===0||w.every(P=>P==null||P===!1))?1:0;return{stdout:v?c?v:`${v}
568
- `:"",stderr:"",exitCode:_}}catch(y){if(y instanceof me)throw y;if(y instanceof X)return{stdout:"",stderr:`jq: ${He(y.message)}
566
+ `);C.length>0&&C.at(-1)===""&&C.pop();for(let T of C)w.push(...V(T,y,b))}else if(a){let P=[];for(let{content:C}of g){let T=C.trim();T&&P.push(...dm(T))}w=V(P,y,b)}else for(let{content:P}of g){let C=P.trim();if(!C)continue;let T=dm(C);for(let R of T)w.push(...V(R,y,b))}let x=w.map(P=>pi(P,i,r,u,f)),S=c?"":`
567
+ `,v=x.join(S),$=t.limits?.maxStringLength;if($!==void 0&&$>0&&v.length>$)throw new X(`jq: output size limit exceeded (${$} bytes)`,"string_length");let D=o&&(w.length===0||w.every(P=>P==null||P===!1))?1:0;return{stdout:v?c?v:`${v}
568
+ `:"",stderr:"",exitCode:D}}catch(y){if(y instanceof me)throw y;if(y instanceof X)return{stdout:"",stderr:`jq: ${He(y.message)}
569
569
  `,exitCode:X.EXIT_CODE};let w=He(y.message);return w.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${w}
570
570
  `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${w}
571
571
  `,exitCode:5}}}},D5={name:"jq",flags:[{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"text",needsArgs:!0}});var wm={};ee(wm,{base64Command:()=>L5,flagsForFuzzing:()=>M5});async function ym(e,t,n){if(t.length===0||t.length===1&&t[0]==="-")return{ok:!0,data:Uint8Array.from(e.stdin,a=>a.charCodeAt(0))};let r=[];for(let a of t){if(a==="-"){r.push(Uint8Array.from(e.stdin,l=>l.charCodeAt(0)));continue}try{let l=e.fs.resolvePath(e.cwd,a),c=await e.fs.readFileBuffer(l);r.push(c)}catch{return{ok:!1,error:{stdout:"",stderr:`${n}: ${a}: No such file or directory
@@ -625,7 +625,7 @@ sys 0.00
625
625
  `,x||f++}}return f>0&&(p+=`${e}: WARNING: ${f} computed checksum${f>1?"s":""} did NOT match
626
626
  `),{stdout:p,stderr:"",exitCode:f>0?1:0}}let c="",u=0;for(let f of a){let p=await l(f);if(p===null){c+=`${e}: ${f}: No such file or directory
627
627
  `,u=1;continue}c+=`${await Fm(t,p)} ${f}
628
- `}return{stdout:c,stderr:"",exitCode:u}}}}var cx,$o=k(()=>{"use strict";he();oe();cx=new Map([["sha1","SHA-1"],["sha256","SHA-256"]])});var Lm={};ee(Lm,{flagsForFuzzing:()=>px,md5sumCommand:()=>fx});var fx,px,Mm=k(()=>{"use strict";$o();fx=Cs("md5sum","md5","compute MD5 message digest"),px={name:"md5sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0}});var Um={};ee(Um,{flagsForFuzzing:()=>dx,sha1sumCommand:()=>hx});var hx,dx,Bm=k(()=>{"use strict";$o();hx=Cs("sha1sum","sha1","compute SHA1 message digest"),dx={name:"sha1sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0}});var Wm={};ee(Wm,{flagsForFuzzing:()=>gx,sha256sumCommand:()=>mx});var mx,gx,zm=k(()=>{"use strict";$o();mx=Cs("sha256sum","sha256","compute SHA256 message digest"),gx={name:"sha256sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0}});var Hm=Li(gc=>{gc.read=function(e,t,n,r,s){var i,o,a=s*8-r-1,l=(1<<a)-1,c=l>>1,u=-7,f=n?s-1:0,p=n?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=i*256+e[t+f],f+=p,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+e[t+f],f+=p,u-=8);if(i===0)i=1-c;else{if(i===l)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-c}return(h?-1:1)*o*Math.pow(2,i-r)};gc.write=function(e,t,n,r,s,i){var o,a,l,c=i*8-s-1,u=(1<<c)-1,f=u>>1,p=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=p/l:t+=p*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=u?(a=0,o=u):o+f>=1?(a=(t*l-1)*Math.pow(2,s),o=o+f):(a=t*Math.pow(2,f-1)*Math.pow(2,s),o=0));s>=8;e[n+h]=a&255,h+=d,a/=256,s-=8);for(o=o<<s|a,c+=s;c>0;e[n+h]=o&255,h+=d,o/=256,c-=8);e[n+h-d]|=m*128}});function wx(){if(!(typeof globalThis.TextDecoder>"u"))return To??(To=new globalThis.TextDecoder("utf-8"))}function Gm(e,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let n=wx();return n?n.decode(e):xx(e)}case"utf-16le":return Ex(e);case"us-ascii":case"ascii":return Ax(e);case"latin1":case"iso-8859-1":return Sx(e);case"windows-1252":return Cx(e);default:throw new RangeError(`Encoding '${t}' not supported`)}}function yc(e,t){t.length!==0&&(e.push(String.fromCharCode.apply(null,t)),t.length=0)}function gt(e,t,n){t.push(n),t.length>=vs&&yc(e,t)}function bx(e,t,n){if(n<=65535){gt(e,t,n);return}n-=65536,gt(e,t,55296+(n>>10)),gt(e,t,56320+(n&1023))}function xx(e){let t=[],n=[],r=0;for(e.length>=3&&e[0]===239&&e[1]===187&&e[2]===191&&(r=3);r<e.length;){let s=e[r];if(s<=127){gt(t,n,s),r++;continue}if(s<194||s>244){gt(t,n,kn),r++;continue}if(s<=223){if(r+1>=e.length){gt(t,n,kn),r++;continue}let u=e[r+1];if((u&192)!==128){gt(t,n,kn),r++;continue}let f=(s&31)<<6|u&63;gt(t,n,f),r+=2;continue}if(s<=239){if(r+2>=e.length){gt(t,n,kn),r++;continue}let u=e[r+1],f=e[r+2];if(!((u&192)===128&&(f&192)===128&&!(s===224&&u<160)&&!(s===237&&u>=160))){gt(t,n,kn),r++;continue}let h=(s&15)<<12|(u&63)<<6|f&63;gt(t,n,h),r+=3;continue}if(r+3>=e.length){gt(t,n,kn),r++;continue}let i=e[r+1],o=e[r+2],a=e[r+3];if(!((i&192)===128&&(o&192)===128&&(a&192)===128&&!(s===240&&i<144)&&!(s===244&&i>143))){gt(t,n,kn),r++;continue}let c=(s&7)<<18|(i&63)<<12|(o&63)<<6|a&63;bx(t,n,c),r+=4}return yc(t,n),t.join("")}function Ex(e){let t=[],n=[],r=e.length,s=0;for(;s+1<r;){let i=e[s]|e[s+1]<<8;if(s+=2,i>=55296&&i<=56319){if(s+1<r){let o=e[s]|e[s+1]<<8;o>=56320&&o<=57343?(gt(t,n,i),gt(t,n,o),s+=2):gt(t,n,kn)}else gt(t,n,kn);continue}if(i>=56320&&i<=57343){gt(t,n,kn);continue}gt(t,n,i)}return s<r&&gt(t,n,kn),yc(t,n),t.join("")}function Ax(e){let t=[];for(let n=0;n<e.length;n+=vs){let r=Math.min(e.length,n+vs),s=new Array(r-n);for(let i=n,o=0;i<r;i++,o++)s[o]=e[i]&127;t.push(String.fromCharCode.apply(null,s))}return t.join("")}function Sx(e){let t=[];for(let n=0;n<e.length;n+=vs){let r=Math.min(e.length,n+vs),s=new Array(r-n);for(let i=n,o=0;i<r;i++,o++)s[o]=e[i];t.push(String.fromCharCode.apply(null,s))}return t.join("")}function Cx(e){let t=[],n="";for(let r=0;r<e.length;r++){let s=e[r],i=s>=128&&s<=159?jm[s]:void 0;n+=i??String.fromCharCode(s),n.length>=vs&&(t.push(n),n="")}return n&&t.push(n),t.join("")}var jm,yx,To,vs,kn,Vm=k(()=>{jm={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},yx={};for(let[e,t]of Object.entries(jm))yx[t]=Number.parseInt(e,10);vs=32*1024,kn=65533});function Vt(e){return new DataView(e.buffer,e.byteOffset)}var qm,Zm,rt,Mr,nt,wc,Km,Qm,qt,di=k(()=>{qm=Pf(Hm(),1);Vm();Zm={len:1,get(e,t){return Vt(e).getUint8(t)},put(e,t,n){return Vt(e).setUint8(t,n),t+1}},rt={len:2,get(e,t){return Vt(e).getUint16(t,!0)},put(e,t,n){return Vt(e).setUint16(t,n,!0),t+2}},Mr={len:2,get(e,t){return Vt(e).getUint16(t)},put(e,t,n){return Vt(e).setUint16(t,n),t+2}},nt={len:4,get(e,t){return Vt(e).getUint32(t,!0)},put(e,t,n){return Vt(e).setUint32(t,n,!0),t+4}},wc={len:4,get(e,t){return Vt(e).getUint32(t)},put(e,t,n){return Vt(e).setUint32(t,n),t+4}},Km={len:4,get(e,t){return Vt(e).getInt32(t)},put(e,t,n){return Vt(e).setInt32(t,n),t+4}},Qm={len:8,get(e,t){return Vt(e).getBigUint64(t,!0)},put(e,t,n){return Vt(e).setBigUint64(t,n,!0),t+8}},qt=class{constructor(t,n){this.len=t,this.encoding=n}get(t,n=0){let r=t.subarray(n,n+this.len);return Gm(r,this.encoding)}}});var kx,Be,Ur,mi=k(()=>{kx="End-Of-Stream",Be=class extends Error{constructor(){super(kx),this.name="EndOfStreamError"}},Ur=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var Xm=k(()=>{});var Br,Oo=k(()=>{mi();Br=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,n=!1){let r=await this.read(t,n);return this.peekQueue.push(t.subarray(0,r)),r}async read(t,n=!1){if(t.length===0)return 0;let r=this.readFromPeekBuffer(t);if(this.endOfStream||(r+=await this.readRemainderFromStream(t.subarray(r),n)),r===0&&!n)throw new Be;return r}readFromPeekBuffer(t){let n=t.length,r=0;for(;this.peekQueue.length>0&&n>0;){let s=this.peekQueue.pop();if(!s)throw new Error("peekData should be defined");let i=Math.min(s.length,n);t.set(s.subarray(0,i),r),r+=i,n-=i,i<s.length&&this.peekQueue.push(s.subarray(i))}return r}async readRemainderFromStream(t,n){let r=0;for(;r<t.length&&!this.endOfStream;){if(this.interrupted)throw new Ur;let s=await this.readFromStream(t.subarray(r),n);if(s===0)break;r+=s}if(!n&&r<t.length)throw new Be;return r}}});var Ym=k(()=>{mi();Xm();Oo()});var Ro,Jm=k(()=>{Oo();Ro=class extends Br{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var gi,bc=k(()=>{Jm();gi=class extends Ro{async readFromStream(t,n){if(t.length===0)return 0;let r=await this.reader.read(new Uint8Array(t.length),{min:n?void 0:t.length});return r.done&&(this.endOfStream=r.done),r.value?(t.set(r.value),r.value.length):0}}});var ks,xc=k(()=>{mi();Oo();ks=class extends Br{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,n){let r=Math.min(n.length,t.length);return t.set(n.subarray(0,r)),r<n.length?this.buffer=n.subarray(r):this.buffer=null,r}async readFromStream(t,n){if(t.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(t,this.buffer));r<t.length&&!this.endOfStream;){let s=await this.reader.read();if(s.done){this.endOfStream=!0;break}s.value&&(r+=this.writeChunk(t.subarray(r),s.value))}if(!n&&r===0&&this.endOfStream)throw new Be;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}});function Ec(e){try{let t=e.getReader({mode:"byob"});return t instanceof ReadableStreamDefaultReader?new ks(t):new gi(t)}catch(t){if(t instanceof TypeError)return new ks(e.getReader());throw t}}var e0=k(()=>{bc();xc()});var Wr=k(()=>{mi();Ym();bc();xc();e0()});var tr,yi=k(()=>{Wr();tr=class{constructor(t){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=t?.onClose,t?.abortSignal&&t.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(t,n=this.position){let r=new Uint8Array(t.len);if(await this.readBuffer(r,{position:n})<t.len)throw new Be;return t.get(r,0)}async peekToken(t,n=this.position){let r=new Uint8Array(t.len);if(await this.peekBuffer(r,{position:n})<t.len)throw new Be;return t.get(r,0)}async readNumber(t){if(await this.readBuffer(this.numBuffer,{length:t.len})<t.len)throw new Be;return t.get(this.numBuffer,0)}async peekNumber(t){if(await this.peekBuffer(this.numBuffer,{length:t.len})<t.len)throw new Be;return t.get(this.numBuffer,0)}async ignore(t){if(t<0)throw new RangeError("ignore length must be \u2265 0 bytes");if(this.fileInfo.size!==void 0){let n=this.fileInfo.size-this.position;if(t>n)return this.position+=n,n}return this.position+=t,t}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(t,n){if(!this.supportsRandomAccess()&&n&&n.position!==void 0&&n.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:t.length,position:this.position,...n}}abort(){return Promise.resolve()}}});var Ix,Po,t0=k(()=>{yi();Wr();Ix=256e3,Po=class extends tr{constructor(t,n){super(n),this.streamReader=t,this.fileInfo=n?.fileInfo??{}}async readBuffer(t,n){let r=this.normalizeOptions(t,n),s=r.position-this.position;if(s>0)return await this.ignore(s),this.readBuffer(t,n);if(s<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let i=await this.streamReader.read(t.subarray(0,r.length),r.mayBeLess);if(this.position+=i,(!n||!n.mayBeLess)&&i<r.length)throw new Be;return i}async peekBuffer(t,n){let r=this.normalizeOptions(t,n),s=0;if(r.position){let i=r.position-this.position;if(i>0){let o=new Uint8Array(r.length+i);return s=await this.peekBuffer(o,{mayBeLess:r.mayBeLess}),t.set(o.subarray(i)),s-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{s=await this.streamReader.peek(t.subarray(0,r.length),r.mayBeLess)}catch(i){if(n?.mayBeLess&&i instanceof Be)return 0;throw i}if(!r.mayBeLess&&s<r.length)throw new Be}return s}async ignore(t){if(t<0)throw new RangeError("ignore length must be \u2265 0 bytes");let n=Math.min(Ix,t),r=new Uint8Array(n),s=0;for(;s<t;){let i=t-s,o=await this.readBuffer(r,{length:Math.min(n,i)});if(o<0)return o;s+=o}return s}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}});var Do,n0=k(()=>{Wr();yi();Do=class extends tr{constructor(t,n){super(n),this.uint8Array=t,this.fileInfo={...n?.fileInfo??{},size:t.length}}async readBuffer(t,n){n?.position&&(this.position=n.position);let r=await this.peekBuffer(t,n);return this.position+=r,r}async peekBuffer(t,n){let r=this.normalizeOptions(t,n),s=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&s<r.length)throw new Be;return t.set(this.uint8Array.subarray(r.position,r.position+s)),s}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(t){this.position=t}}});var _o,r0=k(()=>{Wr();yi();_o=class extends tr{constructor(t,n){super(n),this.blob=t,this.fileInfo={...n?.fileInfo??{},size:t.size,mimeType:t.type}}async readBuffer(t,n){n?.position&&(this.position=n.position);let r=await this.peekBuffer(t,n);return this.position+=r,r}async peekBuffer(t,n){let r=this.normalizeOptions(t,n),s=Math.min(this.blob.size-r.position,r.length);if(!r.mayBeLess&&s<r.length)throw new Be;let i=await this.blob.slice(r.position,r.position+s).arrayBuffer();return t.set(new Uint8Array(i)),s}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(t){this.position=t}}});function s0(e,t){let n=Ec(e),r=t??{},s=r.onClose;return r.onClose=async()=>{if(await n.close(),s)return s()},new Po(n,r)}function i0(e,t){return new Do(e,t)}function o0(e,t){return new _o(e,t)}var a0=k(()=>{Wr();t0();n0();r0();Wr();yi()});var c0=Li((gP,l0)=>{var Ns=1e3,Is=Ns*60,$s=Is*60,zr=$s*24,Tx=zr*7,Ox=zr*365.25;l0.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Rx(e);if(n==="number"&&isFinite(e))return t.long?Dx(e):Px(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Rx(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Ox;case"weeks":case"week":case"w":return n*Tx;case"days":case"day":case"d":return n*zr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*$s;case"minutes":case"minute":case"mins":case"min":case"m":return n*Is;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ns;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Px(e){var t=Math.abs(e);return t>=zr?Math.round(e/zr)+"d":t>=$s?Math.round(e/$s)+"h":t>=Is?Math.round(e/Is)+"m":t>=Ns?Math.round(e/Ns)+"s":e+"ms"}function Dx(e){var t=Math.abs(e);return t>=zr?Fo(e,t,zr,"day"):t>=$s?Fo(e,t,$s,"hour"):t>=Is?Fo(e,t,Is,"minute"):t>=Ns?Fo(e,t,Ns,"second"):e+" ms"}function Fo(e,t,n,r){var s=t>=n*1.5;return Math.round(e/n)+" "+r+(s?"s":"")}});var f0=Li((yP,u0)=>{function _x(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=s,n.enabled=a,n.humanize=c0(),n.destroy=c,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let f=0;for(let p=0;p<u.length;p++)f=(f<<5)-f+u.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(u){let f,p=null,h,d;function m(...g){if(!m.enabled)return;let y=m,w=Number(new Date),b=w-(f||w);y.diff=b,y.prev=f,y.curr=w,f=w,g[0]=n.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let x=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(v,$)=>{if(v==="%%")return"%";x++;let _=n.formatters[$];if(typeof _=="function"){let R=g[x];v=_.call(y,R),g.splice(x,1),x--}return v}),n.formatArgs.call(y,g),(y.log||n.log).apply(y,g)}return m.namespace=u,m.useColors=n.useColors(),m.color=n.selectColor(u),m.extend=r,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==n.namespaces&&(h=n.namespaces,d=n.enabled(u)),d),set:g=>{p=g}}),typeof n.init=="function"&&n.init(m),m}function r(u,f){let p=n(this.namespace+(typeof f>"u"?":":f)+u);return p.log=this.log,p}function s(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?n.skips.push(p.slice(1)):n.names.push(p)}function i(u,f){let p=0,h=0,d=-1,m=0;for(;p<u.length;)if(h<f.length&&(f[h]===u[p]||f[h]==="*"))f[h]==="*"?(d=h,m=p,h++):(p++,h++);else if(d!==-1)h=d+1,m++,p=m;else return!1;for(;h<f.length&&f[h]==="*";)h++;return h===f.length}function o(){let u=[...n.names,...n.skips.map(f=>"-"+f)].join(",");return n.enable(""),u}function a(u){for(let f of n.skips)if(i(u,f))return!1;for(let f of n.names)if(i(u,f))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}u0.exports=_x});var p0=Li((Zt,Lo)=>{Zt.formatArgs=Lx;Zt.save=Mx;Zt.load=Ux;Zt.useColors=Fx;Zt.storage=Bx();Zt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Zt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Fx(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Lx(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Lo.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(n++,s==="%c"&&(r=n))}),e.splice(r,0,t)}Zt.log=console.debug||console.log||(()=>{});function Mx(e){try{e?Zt.storage.setItem("debug",e):Zt.storage.removeItem("debug")}catch{}}function Ux(){let e;try{e=Zt.storage.getItem("debug")||Zt.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Bx(){try{return localStorage}catch{}}Lo.exports=f0()(Zt);var{formatters:Wx}=Lo.exports;Wx.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Hr,Ac,h0,d0,m0,g0=k(()=>{di();Hr={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},Ac={get(e){return{signature:nt.get(e,0),compressedSize:nt.get(e,8),uncompressedSize:nt.get(e,12)}},len:16},h0={get(e){let t=rt.get(e,6);return{signature:nt.get(e,0),minVersion:rt.get(e,4),dataDescriptor:!!(t&8),compressedMethod:rt.get(e,8),compressedSize:nt.get(e,18),uncompressedSize:nt.get(e,22),filenameLength:rt.get(e,26),extraFieldLength:rt.get(e,28),filename:null}},len:30},d0={get(e){return{signature:nt.get(e,0),nrOfThisDisk:rt.get(e,4),nrOfThisDiskWithTheStart:rt.get(e,6),nrOfEntriesOnThisDisk:rt.get(e,8),nrOfEntriesOfSize:rt.get(e,10),sizeOfCd:nt.get(e,12),offsetOfStartOfCd:nt.get(e,16),zipFileCommentLength:rt.get(e,20)}},len:22},m0={get(e){let t=rt.get(e,8);return{signature:nt.get(e,0),minVersion:rt.get(e,6),dataDescriptor:!!(t&8),compressedMethod:rt.get(e,10),compressedSize:nt.get(e,20),uncompressedSize:nt.get(e,24),filenameLength:rt.get(e,28),extraFieldLength:rt.get(e,30),fileCommentLength:rt.get(e,32),relativeOffsetOfLocalHeader:nt.get(e,42),filename:null}},len:46}});function w0(e){let t=new Uint8Array(nt.len);return nt.put(t,0,e),t}function Hx(e,t){let n=e.length,r=t.length;if(r>n)return-1;for(let s=0;s<=n-r;s++){let i=!0;for(let o=0;o<r;o++)if(e[s+o]!==t[o]){i=!1;break}if(i)return s}return-1}function jx(e){let t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t),r=0;for(let s of e)n.set(s,r),r+=s.length;return n}var y0,Hn,Sc,zx,Mo,jr,b0=k(()=>{di();y0=Pf(p0(),1);g0();Hn=(0,y0.default)("tokenizer:inflate"),Sc=256*1024,zx=w0(Hr.DataDescriptor),Mo=w0(Hr.EndOfCentralDirectory),jr=class e{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(Sc)}async isZip(){return await this.peekSignature()===Hr.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(nt)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,n=Math.min(16*1024,t.fileInfo.size),r=this.syncBuffer.subarray(0,n);await this.tokenizer.readBuffer(r,{position:t.fileInfo.size-n});for(let s=r.length-4;s>=0;s--)if(r[s]===Mo[0]&&r[s+1]===Mo[1]&&r[s+2]===Mo[2]&&r[s+3]===Mo[3])return t.fileInfo.size-n+s;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Hn("Cannot reading central-directory without random-read support");return}Hn("Reading central-directory...");let t=this.tokenizer.position,n=await this.findEndOfCentralDirectoryLocator();if(n>0){Hn("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(d0,n),s=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let i=0;i<r.nrOfEntriesOfSize;++i){let o=await this.tokenizer.readToken(m0);if(o.signature!==Hr.CentralFileHeader)throw new Error("Expected Central-File-Header signature");o.filename=await this.tokenizer.readToken(new qt(o.filenameLength,"utf-8")),await this.tokenizer.ignore(o.extraFieldLength),await this.tokenizer.ignore(o.fileCommentLength),s.push(o),Hn(`Add central-directory file-entry: n=${i+1}/${s.length}: filename=${s[i].filename}`)}return this.tokenizer.setPosition(t),s}this.tokenizer.setPosition(t)}async unzip(t){let n=await this.readCentralDirectory();if(n)return this.iterateOverCentralDirectory(n,t);let r=!1;do{let s=await this.readLocalFileHeader();if(!s)break;let i=t(s);r=!!i.stop;let o;if(await this.tokenizer.ignore(s.extraFieldLength),s.dataDescriptor&&s.compressedSize===0){let a=[],l=Sc;Hn("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let c=-1;for(;c<0&&l===Sc;){l=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),c=Hx(this.syncBuffer.subarray(0,l),zx);let u=c>=0?c:l;if(i.handler){let f=new Uint8Array(u);await this.tokenizer.readBuffer(f),a.push(f)}else await this.tokenizer.ignore(u)}Hn(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(s,jx(a),i.handler)}else i.handler?(Hn(`Reading compressed-file-data: ${s.compressedSize} bytes`),o=new Uint8Array(s.compressedSize),await this.tokenizer.readBuffer(o),await this.inflate(s,o,i.handler)):(Hn(`Ignoring compressed-file-data: ${s.compressedSize} bytes`),await this.tokenizer.ignore(s.compressedSize));if(Hn(`Reading data-descriptor at pos=${this.tokenizer.position}`),s.dataDescriptor&&(await this.tokenizer.readToken(Ac)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-Ac.len}`)}while(!r)}async iterateOverCentralDirectory(t,n){for(let r of t){let s=n(r);if(s.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let o=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(o),await this.inflate(i,o,s.handler)}}if(s.stop)break}}async inflate(t,n,r){if(t.compressedMethod===0)return r(n);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Hn(`Decompress filename=${t.filename}, compressed-size=${n.length}`);let s=await e.decompressDeflateRaw(n);return r(s)}static async decompressDeflateRaw(t){let n=new ReadableStream({start(i){i.enqueue(t),i.close()}}),r=new DecompressionStream("deflate-raw"),s=n.pipeThrough(r);try{let o=await new Response(s).arrayBuffer();return new Uint8Array(o)}catch(i){let o=i instanceof Error?`Failed to deflate ZIP entry: ${i.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(o)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(nt);if(t===Hr.LocalFileHeader){let n=await this.tokenizer.readToken(h0);return n.filename=await this.tokenizer.readToken(new qt(n.filenameLength,"utf-8")),n}if(t===Hr.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var wi,x0=k(()=>{wi=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(n){let r=new Uint8Array(1024),s=await t.readBuffer(r,{mayBeLess:!0});if(s===0){n.close();return}n.enqueue(r.subarray(0,s))}}).pipeThrough(new DecompressionStream("gzip"))}}});var E0=k(()=>{b0();x0()});function Cc(e){let{byteLength:t}=e;if(t===6)return e.getUint16(0)*2**32+e.getUint32(2);if(t===5)return e.getUint8(0)*2**32+e.getUint32(1);if(t===4)return e.getUint32(0);if(t===3)return e.getUint8(0)*2**16+e.getUint16(1);if(t===2)return e.getUint16(0);if(t===1)return e.getUint8(0)}var NP,IP,$P,A0=k(()=>{NP={utf8:new globalThis.TextDecoder("utf8")},IP=new globalThis.TextEncoder,$P=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"))});function S0(e,t){if(t==="utf-16le"){let n=[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);n.push(s&255,s>>8&255)}return n}if(t==="utf-16be"){let n=[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);n.push(s>>8&255,s&255)}return n}return[...e].map(n=>n.charCodeAt(0))}function C0(e,t=0){let n=Number.parseInt(new qt(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(n))return!1;let r=256;for(let s=t;s<t+148;s++)r+=e[s];for(let s=t+156;s<t+512;s++)r+=e[s];return n===r}var v0,k0=k(()=>{di();v0={get:(e,t)=>e[t+3]&127|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}});var N0,I0,$0=k(()=>{N0=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],I0=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function sE(e){let t=e?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return e;let{reader:n}=t,r=async()=>{await n.cancel(),n.releaseLock()};return t.close=r,t.abort=async()=>{t.interrupted=!0,await r()},e}function Ic(e,t,n){if(!Number.isFinite(e)||e<0||e>t)throw new nr(`${n} has invalid size ${e} (maximum ${t} bytes)`);return e}async function pr(e,t,{maximumLength:n=gn,reason:r="skip"}={}){let s=Ic(t,n,r);await e.ignore(s)}async function kc(e,t,n,{maximumLength:r=t.length,reason:s="read"}={}){let i=n?.length??t.length,o=Ic(i,r,s);return e.readBuffer(t,{...n,length:o})}async function iE(e,{maximumLength:t=Gn}={}){let s=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),i=[],o=0;try{for(;;){let{done:c,value:u}=await s.read();if(c)break;if(o+=u.length,o>t)throw await s.cancel(),new Error(`ZIP entry decompressed data exceeds ${t} bytes`);i.push(u)}}finally{s.releaseLock()}let a=new Uint8Array(o),l=0;for(let c of i)a.set(c,l),l+=c.length;return a}function aE(e,t){if(e.length<Uo)return-1;let n=e.length-Uo;for(let r=0;r<=n;r++)if(nt.get(e,r)===z0&&nt.get(e,r+8)===t+r)return r;return-1}function lE(e){return(e.codePointAt(0)&32)!==0}function cE(e,t){let n=new Uint8Array(t),r=0;for(let s of e)n.set(s,r),r+=s.length;return n}async function uE(e,{shouldBuffer:t,maximumLength:n=Gn}={}){let{syncBuffer:r}=e,{length:s}=r,i=[],o=0;for(;;){let a=await e.tokenizer.peekBuffer(r,{mayBeLess:!0}),l=aE(r.subarray(0,a),o),c=l>=0?0:a===s?Math.min(oE,a-1):0,u=l>=0?l:a-c;if(u===0)break;if(o+=u,o>n)throw new Error(`ZIP entry compressed data exceeds ${n} bytes`);if(t){let f=new Uint8Array(u);await e.tokenizer.readBuffer(f),i.push(f)}else await e.tokenizer.ignore(u);if(l>=0)break}if(Lt(e.tokenizer)||(e.knownSizeDescriptorScannedBytes+=o),!!t)return cE(i,o)}function fE(e,t){return Lt(e.tokenizer)?Math.max(0,gn-(e.tokenizer.position-t)):Math.max(0,Gn-e.knownSizeDescriptorScannedBytes)}async function pE(e,t,{shouldBuffer:n,maximumDescriptorLength:r=Gn}={}){if(t.dataDescriptor&&t.compressedSize===0)return uE(e,{shouldBuffer:n,maximumLength:r});if(!n){await pr(e.tokenizer,t.compressedSize,{maximumLength:Lt(e.tokenizer)?Gn:e.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let s=wE(e.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>s)throw new Error(`ZIP entry compressed data exceeds ${s} bytes`);let i=new Uint8Array(t.compressedSize);return await e.tokenizer.readBuffer(i),i}function hE(e,t){let n=e.getReader(),r=0,s=!1,i=!1,o=async a=>{s||i||(i=!0,await n.cancel(a))};return new ReadableStream({async pull(a){if(r>=t){a.close(),await o();return}let{done:l,value:c}=await n.read();if(l||!c){s=!0,a.close();return}let u=t-r;if(c.length>u){a.enqueue(c.subarray(0,u)),r+=u,a.close(),await o();return}a.enqueue(c),r+=c.length},async cancel(a){await o(a)}})}async function H0(e,t){return new Nc(t).fromBuffer(e)}function U0(e){switch(e=e.toLowerCase(),e){case"application/epub+zip":return{ext:"epub",mime:e};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:e};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:e};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:e};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:e};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:e};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:e};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:e};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:e};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:e};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:e};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:e};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:e};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:e};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:e};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:e};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function jn(e,t,n){n={offset:0,...n};for(let[r,s]of t.entries())if(n.mask){if(s!==(n.mask[r]&e[r+n.offset]))return!1}else if(s!==e[r+n.offset])return!1;return!0}function dE(e){return Number.isFinite(e)?Math.max(1,Math.trunc(e)):bi}function mE(e,t,n){return n===void 0?e.read(t):(n.throwIfAborted(),new Promise((r,s)=>{let i=()=>{n.removeEventListener("abort",o)},o=()=>{let a=n.reason;i(),(async()=>{try{await e.cancel(a)}catch{}})(),s(a)};n.addEventListener("abort",o,{once:!0}),(async()=>{try{let a=await e.read(t);i(),r(a)}catch(a){i(),s(a)}})()}))}function gE(e){return Number.isFinite(e)?Math.max(0,Math.min(Gx,Math.trunc(e))):0}function yE(e){return Number.isFinite(e)?Math.max(0,e):Number.MAX_SAFE_INTEGER}function Lt(e){let t=e.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function xi(e,t,n){return Lt(e)&&e.position-t>n}function wE(e){let t=e.fileInfo.size,n=Number.isFinite(t)?Math.max(0,t-e.position):Number.MAX_SAFE_INTEGER;return Math.min(n,Vx)}function bE(e){if(e instanceof Be||e instanceof nr)return!0;if(!(e instanceof Error))return!1;if(tE.has(e.message)||rE.has(e.code))return!0;for(let t of nE)if(e.message.startsWith(t))return!0;return!1}function B0(e,t=Gn){let n=[e.compressedSize,e.uncompressedSize];for(let r of n)if(!Number.isFinite(r)||r<0||r>t)return!1;return!0}function xE(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function EE(e,t){t.startsWith("word/")&&(e.hasWordDirectory=!0),t.startsWith("ppt/")&&(e.hasPresentationDirectory=!0),t.startsWith("xl/")&&(e.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(e.hasThreeDimensionalModelEntry=!0)}function W0(e){if(!(!e.hasContentTypesEntry||e.hasUnparseableContentTypes||e.isParsingContentTypes||e.hasParsedContentTypesEntry)){if(e.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(e.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(e.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(e.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function AE(e){let t=e.indexOf('.main+xml"');if(t===-1){let s="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return e.includes(`ContentType="${s}"`)?s:void 0}let n=e.slice(0,t),r=n.lastIndexOf('"');return n.slice(r+1)}var bi,Gx,Gn,T0,Vx,gn,Bo,O0,qx,Zx,R0,vc,P0,D0,Kx,Qx,Xx,Yx,Jx,_0,F0,L0,eE,M0,tE,nE,rE,nr,z0,Uo,oE,Nc,MP,UP,j0=k(()=>{di();a0();E0();A0();k0();$0();bi=4100,Gx=bi-2,Gn=1024*1024,T0=1024,Vx=2**31-1,gn=16*1024*1024,Bo=Gn,O0=Gn,qx=gn,Zx=1,R0=100,vc=gn,P0=64,D0=Bo,Kx=256,Qx=512,Xx=gn,Yx=512,Jx=512,_0=256,F0=Bo,L0=Bo,eE=Bo,M0=gn,tE=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),nE=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],rE=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),nr=class extends Error{};z0=134695760,Uo=16,oE=Uo-1;jr.prototype.inflate=async function(e,t,n){if(e.compressedMethod===0)return n(t);if(e.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);let r=await iE(t,{maximumLength:Gn});return n(r)};jr.prototype.unzip=async function(e){let t=!1,n=0,r=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(xi(this.tokenizer,r,gn))throw new nr(`ZIP stream probing exceeds ${gn} bytes`);let s=await this.readLocalFileHeader();if(!s)break;if(n++,n>T0)throw new Error(`ZIP entry count exceeds ${T0}`);let i=e(s);t=!!i.stop,await this.tokenizer.ignore(s.extraFieldLength);let o=await pE(this,s,{shouldBuffer:!!i.handler,maximumDescriptorLength:Math.min(Gn,fE(this,r))});if(i.handler&&await this.inflate(s,o,i.handler),s.dataDescriptor){let a=new Uint8Array(Uo);if(await this.tokenizer.readBuffer(a),nt.get(a,0)!==z0)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-a.length}`)}if(xi(this.tokenizer,r,gn))throw new nr(`ZIP stream probing exceeds ${gn} bytes`)}while(!t)};Nc=class e{constructor(t){let n=gE(t?.mpegOffsetTolerance);this.options={...t,mpegOffsetTolerance:n},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(t){return sE(s0(t,this.getTokenizerOptions()))}async parseTokenizer(t,n=0){this.detectionReentryCount=n;let r=t.position;for(let s of this.detectors){let i;try{i=await s.detect(t)}catch(o){if(o instanceof Be||o instanceof nr)return;throw o}if(i)return i;if(r!==t.position)return}}async fromTokenizer(t){try{return await this.parseTokenizer(t)}finally{await t.close()}}async fromBuffer(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``);let n=t instanceof Uint8Array?t:new Uint8Array(t);if(n?.length>1)return this.fromTokenizer(i0(n,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let n=o0(t,this.getTokenizerOptions());return this.fromTokenizer(n)}async fromStream(t){this.options.signal?.throwIfAborted();let n=this.createTokenizerFromWebStream(t);return this.fromTokenizer(n)}async toDetectionStream(t,n){let r=dE(n?.sampleSize??bi),s,i,o=t.getReader({mode:"byob"});try{let{value:c,done:u}=await mE(o,new Uint8Array(r),this.options.signal);if(i=c,!u&&c)try{s=await this.fromBuffer(c.subarray(0,r))}catch(f){if(!(f instanceof Be))throw f;s=void 0}i=c}finally{o.releaseLock()}let a=new TransformStream({async start(c){c.enqueue(i)},transform(c,u){u.enqueue(c)}}),l=t.pipeThrough(a);return l.fileType=s,l}async detectGzip(t){if(this.gzipProbeDepth>=Zx)return{ext:"gz",mime:"application/gzip"};let n=new wi(t),r=hE(n.inflate(),qx),s=Lt(t),i,o,a,l;if(s){let c=new AbortController;i=setTimeout(()=>{c.abort(new DOMException(`Operation timed out after ${R0} ms`,"TimeoutError"))},R0),o=this.options.signal===void 0?c.signal:AbortSignal.any([this.options.signal,c.signal]),a=new e({...this.options,signal:o}),a.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{l=await(a??this).fromStream(r)}catch(c){if(c?.name==="AbortError"&&o?.reason?.name!=="TimeoutError")throw c}finally{clearTimeout(i),s||this.gzipProbeDepth--}return l?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,n){return jn(this.buffer,t,n)}checkString(t,n){return this.check(S0(t,n?.encoding),n)}detectConfident=async t=>{if(this.buffer=new Uint8Array(bi),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,Lt(t)&&(await t.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(t);if(await t.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await t.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=_0?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(t));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(t);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await pr(t,6,{maximumLength:6,reason:"ID3 header prefix"});let n=await t.readToken(v0),r=Lt(t);if(!Number.isFinite(n)||n<0||r&&(n>vc||t.position+n>vc))return;if(t.position+n>t.fileInfo.size)return r?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await pr(t,n,{maximumLength:r?vc:t.fileInfo.size,reason:"ID3 payload"})}catch(s){if(s instanceof Be)return;throw s}return this.detectionReentryCount>=_0?void 0:(this.detectionReentryCount++,this.parseTokenizer(t,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let n,r=xE();try{await new jr(t).unzip(s=>{EE(r,s.filename);let i=s.filename==="[Content_Types].xml",o=W0(r);if(!i&&o)return n=o,{stop:!0};switch(s.filename){case"META-INF/mozilla.rsa":return n={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return n={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return B0(s,O0)?{async handler(a){let l=new TextDecoder("utf-8").decode(a).trim();n=U0(l)},stop:!0}:{};case"[Content_Types].xml":return r.hasContentTypesEntry=!0,B0(s,O0)?(r.isParsingContentTypes=!0,{async handler(a){let l=new TextDecoder("utf-8").decode(a),c=AE(l);c&&(n=U0(c)),r.hasParsedContentTypesEntry=!0,r.isParsingContentTypes=!1},stop:!0}):(r.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(s.filename)?(n={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(s){if(!bE(s))throw s;r.isParsingContentTypes&&(r.isParsingContentTypes=!1,r.hasUnparseableContentTypes=!0)}return n??W0(r)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let n=new Uint8Array(8);return await t.readBuffer(n),jn(n,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:jn(n,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:jn(n,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:jn(n,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:jn(n,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:jn(n,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let n=await this.readTiffHeader(!1);if(n)return n}if(this.check([77,77])){let n=await this.readTiffHeader(!0);if(n)return n}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function n(){let l=await t.peekNumber(Zm),c=128,u=0;for(;(l&c)===0&&c!==0;)++u,c>>=1;let f=new Uint8Array(u+1);return await kc(t,f,void 0,{maximumLength:f.length,reason:"EBML field"}),f}async function r(){let l=await n(),c=await n();c[0]^=128>>c.length-1;let u=Math.min(6,c.length),f=new DataView(l.buffer),p=new DataView(c.buffer,c.length-u,u);return{id:Cc(f),len:Cc(p)}}async function s(l){let c=0;for(;l>0;){if(c++,c>Kx||xi(t,o,gn))return;let u=t.position,f=await r();if(f.id===17026){if(f.len>P0)return;let p=Ic(f.len,P0,"EBML DocType");return(await t.readToken(new qt(p))).replaceAll(/\00.*$/g,"")}if(Lt(t)&&(!Number.isFinite(f.len)||f.len<0||f.len>D0)||(await pr(t,f.len,{maximumLength:Lt(t)?D0:t.fileInfo.size,reason:"EBML payload"}),--l,t.position<=u))return}}let i=await r(),o=t.position;switch(await s(i.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let n=wc.get(this.buffer,4),r=Mr.get(this.buffer,6);if(n>0&&n<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(r>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let n=new qt(4,"latin1").get(this.buffer,2);if(n.match("^d*")&&n>=1e3&&n<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await t.ignore(8),await t.readToken(new qt(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
628
+ `}return{stdout:c,stderr:"",exitCode:u}}}}var cx,$o=k(()=>{"use strict";he();oe();cx=new Map([["sha1","SHA-1"],["sha256","SHA-256"]])});var Lm={};ee(Lm,{flagsForFuzzing:()=>px,md5sumCommand:()=>fx});var fx,px,Mm=k(()=>{"use strict";$o();fx=Cs("md5sum","md5","compute MD5 message digest"),px={name:"md5sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0}});var Um={};ee(Um,{flagsForFuzzing:()=>dx,sha1sumCommand:()=>hx});var hx,dx,Bm=k(()=>{"use strict";$o();hx=Cs("sha1sum","sha1","compute SHA1 message digest"),dx={name:"sha1sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0}});var Wm={};ee(Wm,{flagsForFuzzing:()=>gx,sha256sumCommand:()=>mx});var mx,gx,zm=k(()=>{"use strict";$o();mx=Cs("sha256sum","sha256","compute SHA256 message digest"),gx={name:"sha256sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0}});var Hm=Li(gc=>{gc.read=function(e,t,n,r,s){var i,o,a=s*8-r-1,l=(1<<a)-1,c=l>>1,u=-7,f=n?s-1:0,p=n?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=i*256+e[t+f],f+=p,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+e[t+f],f+=p,u-=8);if(i===0)i=1-c;else{if(i===l)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-c}return(h?-1:1)*o*Math.pow(2,i-r)};gc.write=function(e,t,n,r,s,i){var o,a,l,c=i*8-s-1,u=(1<<c)-1,f=u>>1,p=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=p/l:t+=p*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=u?(a=0,o=u):o+f>=1?(a=(t*l-1)*Math.pow(2,s),o=o+f):(a=t*Math.pow(2,f-1)*Math.pow(2,s),o=0));s>=8;e[n+h]=a&255,h+=d,a/=256,s-=8);for(o=o<<s|a,c+=s;c>0;e[n+h]=o&255,h+=d,o/=256,c-=8);e[n+h-d]|=m*128}});function wx(){if(!(typeof globalThis.TextDecoder>"u"))return To??(To=new globalThis.TextDecoder("utf-8"))}function Gm(e,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let n=wx();return n?n.decode(e):xx(e)}case"utf-16le":return Ex(e);case"us-ascii":case"ascii":return Ax(e);case"latin1":case"iso-8859-1":return Sx(e);case"windows-1252":return Cx(e);default:throw new RangeError(`Encoding '${t}' not supported`)}}function yc(e,t){t.length!==0&&(e.push(String.fromCharCode.apply(null,t)),t.length=0)}function gt(e,t,n){t.push(n),t.length>=vs&&yc(e,t)}function bx(e,t,n){if(n<=65535){gt(e,t,n);return}n-=65536,gt(e,t,55296+(n>>10)),gt(e,t,56320+(n&1023))}function xx(e){let t=[],n=[],r=0;for(e.length>=3&&e[0]===239&&e[1]===187&&e[2]===191&&(r=3);r<e.length;){let s=e[r];if(s<=127){gt(t,n,s),r++;continue}if(s<194||s>244){gt(t,n,kn),r++;continue}if(s<=223){if(r+1>=e.length){gt(t,n,kn),r++;continue}let u=e[r+1];if((u&192)!==128){gt(t,n,kn),r++;continue}let f=(s&31)<<6|u&63;gt(t,n,f),r+=2;continue}if(s<=239){if(r+2>=e.length){gt(t,n,kn),r++;continue}let u=e[r+1],f=e[r+2];if(!((u&192)===128&&(f&192)===128&&!(s===224&&u<160)&&!(s===237&&u>=160))){gt(t,n,kn),r++;continue}let h=(s&15)<<12|(u&63)<<6|f&63;gt(t,n,h),r+=3;continue}if(r+3>=e.length){gt(t,n,kn),r++;continue}let i=e[r+1],o=e[r+2],a=e[r+3];if(!((i&192)===128&&(o&192)===128&&(a&192)===128&&!(s===240&&i<144)&&!(s===244&&i>143))){gt(t,n,kn),r++;continue}let c=(s&7)<<18|(i&63)<<12|(o&63)<<6|a&63;bx(t,n,c),r+=4}return yc(t,n),t.join("")}function Ex(e){let t=[],n=[],r=e.length,s=0;for(;s+1<r;){let i=e[s]|e[s+1]<<8;if(s+=2,i>=55296&&i<=56319){if(s+1<r){let o=e[s]|e[s+1]<<8;o>=56320&&o<=57343?(gt(t,n,i),gt(t,n,o),s+=2):gt(t,n,kn)}else gt(t,n,kn);continue}if(i>=56320&&i<=57343){gt(t,n,kn);continue}gt(t,n,i)}return s<r&&gt(t,n,kn),yc(t,n),t.join("")}function Ax(e){let t=[];for(let n=0;n<e.length;n+=vs){let r=Math.min(e.length,n+vs),s=new Array(r-n);for(let i=n,o=0;i<r;i++,o++)s[o]=e[i]&127;t.push(String.fromCharCode.apply(null,s))}return t.join("")}function Sx(e){let t=[];for(let n=0;n<e.length;n+=vs){let r=Math.min(e.length,n+vs),s=new Array(r-n);for(let i=n,o=0;i<r;i++,o++)s[o]=e[i];t.push(String.fromCharCode.apply(null,s))}return t.join("")}function Cx(e){let t=[],n="";for(let r=0;r<e.length;r++){let s=e[r],i=s>=128&&s<=159?jm[s]:void 0;n+=i??String.fromCharCode(s),n.length>=vs&&(t.push(n),n="")}return n&&t.push(n),t.join("")}var jm,yx,To,vs,kn,Vm=k(()=>{jm={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},yx={};for(let[e,t]of Object.entries(jm))yx[t]=Number.parseInt(e,10);vs=32*1024,kn=65533});function Vt(e){return new DataView(e.buffer,e.byteOffset)}var qm,Zm,rt,Mr,nt,wc,Km,Qm,qt,di=k(()=>{qm=Pf(Hm(),1);Vm();Zm={len:1,get(e,t){return Vt(e).getUint8(t)},put(e,t,n){return Vt(e).setUint8(t,n),t+1}},rt={len:2,get(e,t){return Vt(e).getUint16(t,!0)},put(e,t,n){return Vt(e).setUint16(t,n,!0),t+2}},Mr={len:2,get(e,t){return Vt(e).getUint16(t)},put(e,t,n){return Vt(e).setUint16(t,n),t+2}},nt={len:4,get(e,t){return Vt(e).getUint32(t,!0)},put(e,t,n){return Vt(e).setUint32(t,n,!0),t+4}},wc={len:4,get(e,t){return Vt(e).getUint32(t)},put(e,t,n){return Vt(e).setUint32(t,n),t+4}},Km={len:4,get(e,t){return Vt(e).getInt32(t)},put(e,t,n){return Vt(e).setInt32(t,n),t+4}},Qm={len:8,get(e,t){return Vt(e).getBigUint64(t,!0)},put(e,t,n){return Vt(e).setBigUint64(t,n,!0),t+8}},qt=class{constructor(t,n){this.len=t,this.encoding=n}get(t,n=0){let r=t.subarray(n,n+this.len);return Gm(r,this.encoding)}}});var kx,Be,Ur,mi=k(()=>{kx="End-Of-Stream",Be=class extends Error{constructor(){super(kx),this.name="EndOfStreamError"}},Ur=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var Xm=k(()=>{});var Br,Oo=k(()=>{mi();Br=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,n=!1){let r=await this.read(t,n);return this.peekQueue.push(t.subarray(0,r)),r}async read(t,n=!1){if(t.length===0)return 0;let r=this.readFromPeekBuffer(t);if(this.endOfStream||(r+=await this.readRemainderFromStream(t.subarray(r),n)),r===0&&!n)throw new Be;return r}readFromPeekBuffer(t){let n=t.length,r=0;for(;this.peekQueue.length>0&&n>0;){let s=this.peekQueue.pop();if(!s)throw new Error("peekData should be defined");let i=Math.min(s.length,n);t.set(s.subarray(0,i),r),r+=i,n-=i,i<s.length&&this.peekQueue.push(s.subarray(i))}return r}async readRemainderFromStream(t,n){let r=0;for(;r<t.length&&!this.endOfStream;){if(this.interrupted)throw new Ur;let s=await this.readFromStream(t.subarray(r),n);if(s===0)break;r+=s}if(!n&&r<t.length)throw new Be;return r}}});var Ym=k(()=>{mi();Xm();Oo()});var Ro,Jm=k(()=>{Oo();Ro=class extends Br{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var gi,bc=k(()=>{Jm();gi=class extends Ro{async readFromStream(t,n){if(t.length===0)return 0;let r=await this.reader.read(new Uint8Array(t.length),{min:n?void 0:t.length});return r.done&&(this.endOfStream=r.done),r.value?(t.set(r.value),r.value.length):0}}});var ks,xc=k(()=>{mi();Oo();ks=class extends Br{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,n){let r=Math.min(n.length,t.length);return t.set(n.subarray(0,r)),r<n.length?this.buffer=n.subarray(r):this.buffer=null,r}async readFromStream(t,n){if(t.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(t,this.buffer));r<t.length&&!this.endOfStream;){let s=await this.reader.read();if(s.done){this.endOfStream=!0;break}s.value&&(r+=this.writeChunk(t.subarray(r),s.value))}if(!n&&r===0&&this.endOfStream)throw new Be;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}});function Ec(e){try{let t=e.getReader({mode:"byob"});return t instanceof ReadableStreamDefaultReader?new ks(t):new gi(t)}catch(t){if(t instanceof TypeError)return new ks(e.getReader());throw t}}var e0=k(()=>{bc();xc()});var Wr=k(()=>{mi();Ym();bc();xc();e0()});var tr,yi=k(()=>{Wr();tr=class{constructor(t){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=t?.onClose,t?.abortSignal&&t.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(t,n=this.position){let r=new Uint8Array(t.len);if(await this.readBuffer(r,{position:n})<t.len)throw new Be;return t.get(r,0)}async peekToken(t,n=this.position){let r=new Uint8Array(t.len);if(await this.peekBuffer(r,{position:n})<t.len)throw new Be;return t.get(r,0)}async readNumber(t){if(await this.readBuffer(this.numBuffer,{length:t.len})<t.len)throw new Be;return t.get(this.numBuffer,0)}async peekNumber(t){if(await this.peekBuffer(this.numBuffer,{length:t.len})<t.len)throw new Be;return t.get(this.numBuffer,0)}async ignore(t){if(t<0)throw new RangeError("ignore length must be \u2265 0 bytes");if(this.fileInfo.size!==void 0){let n=this.fileInfo.size-this.position;if(t>n)return this.position+=n,n}return this.position+=t,t}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(t,n){if(!this.supportsRandomAccess()&&n&&n.position!==void 0&&n.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:t.length,position:this.position,...n}}abort(){return Promise.resolve()}}});var Ix,Po,t0=k(()=>{yi();Wr();Ix=256e3,Po=class extends tr{constructor(t,n){super(n),this.streamReader=t,this.fileInfo=n?.fileInfo??{}}async readBuffer(t,n){let r=this.normalizeOptions(t,n),s=r.position-this.position;if(s>0)return await this.ignore(s),this.readBuffer(t,n);if(s<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let i=await this.streamReader.read(t.subarray(0,r.length),r.mayBeLess);if(this.position+=i,(!n||!n.mayBeLess)&&i<r.length)throw new Be;return i}async peekBuffer(t,n){let r=this.normalizeOptions(t,n),s=0;if(r.position){let i=r.position-this.position;if(i>0){let o=new Uint8Array(r.length+i);return s=await this.peekBuffer(o,{mayBeLess:r.mayBeLess}),t.set(o.subarray(i)),s-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{s=await this.streamReader.peek(t.subarray(0,r.length),r.mayBeLess)}catch(i){if(n?.mayBeLess&&i instanceof Be)return 0;throw i}if(!r.mayBeLess&&s<r.length)throw new Be}return s}async ignore(t){if(t<0)throw new RangeError("ignore length must be \u2265 0 bytes");let n=Math.min(Ix,t),r=new Uint8Array(n),s=0;for(;s<t;){let i=t-s,o=await this.readBuffer(r,{length:Math.min(n,i)});if(o<0)return o;s+=o}return s}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}});var Do,n0=k(()=>{Wr();yi();Do=class extends tr{constructor(t,n){super(n),this.uint8Array=t,this.fileInfo={...n?.fileInfo??{},size:t.length}}async readBuffer(t,n){n?.position&&(this.position=n.position);let r=await this.peekBuffer(t,n);return this.position+=r,r}async peekBuffer(t,n){let r=this.normalizeOptions(t,n),s=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&s<r.length)throw new Be;return t.set(this.uint8Array.subarray(r.position,r.position+s)),s}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(t){this.position=t}}});var _o,r0=k(()=>{Wr();yi();_o=class extends tr{constructor(t,n){super(n),this.blob=t,this.fileInfo={...n?.fileInfo??{},size:t.size,mimeType:t.type}}async readBuffer(t,n){n?.position&&(this.position=n.position);let r=await this.peekBuffer(t,n);return this.position+=r,r}async peekBuffer(t,n){let r=this.normalizeOptions(t,n),s=Math.min(this.blob.size-r.position,r.length);if(!r.mayBeLess&&s<r.length)throw new Be;let i=await this.blob.slice(r.position,r.position+s).arrayBuffer();return t.set(new Uint8Array(i)),s}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(t){this.position=t}}});function s0(e,t){let n=Ec(e),r=t??{},s=r.onClose;return r.onClose=async()=>{if(await n.close(),s)return s()},new Po(n,r)}function i0(e,t){return new Do(e,t)}function o0(e,t){return new _o(e,t)}var a0=k(()=>{Wr();t0();n0();r0();Wr();yi()});var c0=Li((gP,l0)=>{var Ns=1e3,Is=Ns*60,$s=Is*60,zr=$s*24,Tx=zr*7,Ox=zr*365.25;l0.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Rx(e);if(n==="number"&&isFinite(e))return t.long?Dx(e):Px(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Rx(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Ox;case"weeks":case"week":case"w":return n*Tx;case"days":case"day":case"d":return n*zr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*$s;case"minutes":case"minute":case"mins":case"min":case"m":return n*Is;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ns;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Px(e){var t=Math.abs(e);return t>=zr?Math.round(e/zr)+"d":t>=$s?Math.round(e/$s)+"h":t>=Is?Math.round(e/Is)+"m":t>=Ns?Math.round(e/Ns)+"s":e+"ms"}function Dx(e){var t=Math.abs(e);return t>=zr?Fo(e,t,zr,"day"):t>=$s?Fo(e,t,$s,"hour"):t>=Is?Fo(e,t,Is,"minute"):t>=Ns?Fo(e,t,Ns,"second"):e+" ms"}function Fo(e,t,n,r){var s=t>=n*1.5;return Math.round(e/n)+" "+r+(s?"s":"")}});var f0=Li((yP,u0)=>{function _x(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=s,n.enabled=a,n.humanize=c0(),n.destroy=c,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let f=0;for(let p=0;p<u.length;p++)f=(f<<5)-f+u.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(u){let f,p=null,h,d;function m(...g){if(!m.enabled)return;let y=m,w=Number(new Date),b=w-(f||w);y.diff=b,y.prev=f,y.curr=w,f=w,g[0]=n.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let x=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(v,$)=>{if(v==="%%")return"%";x++;let D=n.formatters[$];if(typeof D=="function"){let O=g[x];v=D.call(y,O),g.splice(x,1),x--}return v}),n.formatArgs.call(y,g),(y.log||n.log).apply(y,g)}return m.namespace=u,m.useColors=n.useColors(),m.color=n.selectColor(u),m.extend=r,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==n.namespaces&&(h=n.namespaces,d=n.enabled(u)),d),set:g=>{p=g}}),typeof n.init=="function"&&n.init(m),m}function r(u,f){let p=n(this.namespace+(typeof f>"u"?":":f)+u);return p.log=this.log,p}function s(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?n.skips.push(p.slice(1)):n.names.push(p)}function i(u,f){let p=0,h=0,d=-1,m=0;for(;p<u.length;)if(h<f.length&&(f[h]===u[p]||f[h]==="*"))f[h]==="*"?(d=h,m=p,h++):(p++,h++);else if(d!==-1)h=d+1,m++,p=m;else return!1;for(;h<f.length&&f[h]==="*";)h++;return h===f.length}function o(){let u=[...n.names,...n.skips.map(f=>"-"+f)].join(",");return n.enable(""),u}function a(u){for(let f of n.skips)if(i(u,f))return!1;for(let f of n.names)if(i(u,f))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}u0.exports=_x});var p0=Li((Zt,Lo)=>{Zt.formatArgs=Lx;Zt.save=Mx;Zt.load=Ux;Zt.useColors=Fx;Zt.storage=Bx();Zt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Zt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Fx(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Lx(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Lo.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(n++,s==="%c"&&(r=n))}),e.splice(r,0,t)}Zt.log=console.debug||console.log||(()=>{});function Mx(e){try{e?Zt.storage.setItem("debug",e):Zt.storage.removeItem("debug")}catch{}}function Ux(){let e;try{e=Zt.storage.getItem("debug")||Zt.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Bx(){try{return localStorage}catch{}}Lo.exports=f0()(Zt);var{formatters:Wx}=Lo.exports;Wx.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Hr,Ac,h0,d0,m0,g0=k(()=>{di();Hr={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},Ac={get(e){return{signature:nt.get(e,0),compressedSize:nt.get(e,8),uncompressedSize:nt.get(e,12)}},len:16},h0={get(e){let t=rt.get(e,6);return{signature:nt.get(e,0),minVersion:rt.get(e,4),dataDescriptor:!!(t&8),compressedMethod:rt.get(e,8),compressedSize:nt.get(e,18),uncompressedSize:nt.get(e,22),filenameLength:rt.get(e,26),extraFieldLength:rt.get(e,28),filename:null}},len:30},d0={get(e){return{signature:nt.get(e,0),nrOfThisDisk:rt.get(e,4),nrOfThisDiskWithTheStart:rt.get(e,6),nrOfEntriesOnThisDisk:rt.get(e,8),nrOfEntriesOfSize:rt.get(e,10),sizeOfCd:nt.get(e,12),offsetOfStartOfCd:nt.get(e,16),zipFileCommentLength:rt.get(e,20)}},len:22},m0={get(e){let t=rt.get(e,8);return{signature:nt.get(e,0),minVersion:rt.get(e,6),dataDescriptor:!!(t&8),compressedMethod:rt.get(e,10),compressedSize:nt.get(e,20),uncompressedSize:nt.get(e,24),filenameLength:rt.get(e,28),extraFieldLength:rt.get(e,30),fileCommentLength:rt.get(e,32),relativeOffsetOfLocalHeader:nt.get(e,42),filename:null}},len:46}});function w0(e){let t=new Uint8Array(nt.len);return nt.put(t,0,e),t}function Hx(e,t){let n=e.length,r=t.length;if(r>n)return-1;for(let s=0;s<=n-r;s++){let i=!0;for(let o=0;o<r;o++)if(e[s+o]!==t[o]){i=!1;break}if(i)return s}return-1}function jx(e){let t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t),r=0;for(let s of e)n.set(s,r),r+=s.length;return n}var y0,Hn,Sc,zx,Mo,jr,b0=k(()=>{di();y0=Pf(p0(),1);g0();Hn=(0,y0.default)("tokenizer:inflate"),Sc=256*1024,zx=w0(Hr.DataDescriptor),Mo=w0(Hr.EndOfCentralDirectory),jr=class e{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(Sc)}async isZip(){return await this.peekSignature()===Hr.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(nt)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,n=Math.min(16*1024,t.fileInfo.size),r=this.syncBuffer.subarray(0,n);await this.tokenizer.readBuffer(r,{position:t.fileInfo.size-n});for(let s=r.length-4;s>=0;s--)if(r[s]===Mo[0]&&r[s+1]===Mo[1]&&r[s+2]===Mo[2]&&r[s+3]===Mo[3])return t.fileInfo.size-n+s;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Hn("Cannot reading central-directory without random-read support");return}Hn("Reading central-directory...");let t=this.tokenizer.position,n=await this.findEndOfCentralDirectoryLocator();if(n>0){Hn("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(d0,n),s=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let i=0;i<r.nrOfEntriesOfSize;++i){let o=await this.tokenizer.readToken(m0);if(o.signature!==Hr.CentralFileHeader)throw new Error("Expected Central-File-Header signature");o.filename=await this.tokenizer.readToken(new qt(o.filenameLength,"utf-8")),await this.tokenizer.ignore(o.extraFieldLength),await this.tokenizer.ignore(o.fileCommentLength),s.push(o),Hn(`Add central-directory file-entry: n=${i+1}/${s.length}: filename=${s[i].filename}`)}return this.tokenizer.setPosition(t),s}this.tokenizer.setPosition(t)}async unzip(t){let n=await this.readCentralDirectory();if(n)return this.iterateOverCentralDirectory(n,t);let r=!1;do{let s=await this.readLocalFileHeader();if(!s)break;let i=t(s);r=!!i.stop;let o;if(await this.tokenizer.ignore(s.extraFieldLength),s.dataDescriptor&&s.compressedSize===0){let a=[],l=Sc;Hn("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let c=-1;for(;c<0&&l===Sc;){l=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),c=Hx(this.syncBuffer.subarray(0,l),zx);let u=c>=0?c:l;if(i.handler){let f=new Uint8Array(u);await this.tokenizer.readBuffer(f),a.push(f)}else await this.tokenizer.ignore(u)}Hn(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(s,jx(a),i.handler)}else i.handler?(Hn(`Reading compressed-file-data: ${s.compressedSize} bytes`),o=new Uint8Array(s.compressedSize),await this.tokenizer.readBuffer(o),await this.inflate(s,o,i.handler)):(Hn(`Ignoring compressed-file-data: ${s.compressedSize} bytes`),await this.tokenizer.ignore(s.compressedSize));if(Hn(`Reading data-descriptor at pos=${this.tokenizer.position}`),s.dataDescriptor&&(await this.tokenizer.readToken(Ac)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-Ac.len}`)}while(!r)}async iterateOverCentralDirectory(t,n){for(let r of t){let s=n(r);if(s.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let o=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(o),await this.inflate(i,o,s.handler)}}if(s.stop)break}}async inflate(t,n,r){if(t.compressedMethod===0)return r(n);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Hn(`Decompress filename=${t.filename}, compressed-size=${n.length}`);let s=await e.decompressDeflateRaw(n);return r(s)}static async decompressDeflateRaw(t){let n=new ReadableStream({start(i){i.enqueue(t),i.close()}}),r=new DecompressionStream("deflate-raw"),s=n.pipeThrough(r);try{let o=await new Response(s).arrayBuffer();return new Uint8Array(o)}catch(i){let o=i instanceof Error?`Failed to deflate ZIP entry: ${i.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(o)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(nt);if(t===Hr.LocalFileHeader){let n=await this.tokenizer.readToken(h0);return n.filename=await this.tokenizer.readToken(new qt(n.filenameLength,"utf-8")),n}if(t===Hr.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var wi,x0=k(()=>{wi=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(n){let r=new Uint8Array(1024),s=await t.readBuffer(r,{mayBeLess:!0});if(s===0){n.close();return}n.enqueue(r.subarray(0,s))}}).pipeThrough(new DecompressionStream("gzip"))}}});var E0=k(()=>{b0();x0()});function Cc(e){let{byteLength:t}=e;if(t===6)return e.getUint16(0)*2**32+e.getUint32(2);if(t===5)return e.getUint8(0)*2**32+e.getUint32(1);if(t===4)return e.getUint32(0);if(t===3)return e.getUint8(0)*2**16+e.getUint16(1);if(t===2)return e.getUint16(0);if(t===1)return e.getUint8(0)}var NP,IP,$P,A0=k(()=>{NP={utf8:new globalThis.TextDecoder("utf8")},IP=new globalThis.TextEncoder,$P=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"))});function S0(e,t){if(t==="utf-16le"){let n=[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);n.push(s&255,s>>8&255)}return n}if(t==="utf-16be"){let n=[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);n.push(s>>8&255,s&255)}return n}return[...e].map(n=>n.charCodeAt(0))}function C0(e,t=0){let n=Number.parseInt(new qt(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(n))return!1;let r=256;for(let s=t;s<t+148;s++)r+=e[s];for(let s=t+156;s<t+512;s++)r+=e[s];return n===r}var v0,k0=k(()=>{di();v0={get:(e,t)=>e[t+3]&127|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}});var N0,I0,$0=k(()=>{N0=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],I0=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function sE(e){let t=e?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return e;let{reader:n}=t,r=async()=>{await n.cancel(),n.releaseLock()};return t.close=r,t.abort=async()=>{t.interrupted=!0,await r()},e}function Ic(e,t,n){if(!Number.isFinite(e)||e<0||e>t)throw new nr(`${n} has invalid size ${e} (maximum ${t} bytes)`);return e}async function pr(e,t,{maximumLength:n=gn,reason:r="skip"}={}){let s=Ic(t,n,r);await e.ignore(s)}async function kc(e,t,n,{maximumLength:r=t.length,reason:s="read"}={}){let i=n?.length??t.length,o=Ic(i,r,s);return e.readBuffer(t,{...n,length:o})}async function iE(e,{maximumLength:t=Gn}={}){let s=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),i=[],o=0;try{for(;;){let{done:c,value:u}=await s.read();if(c)break;if(o+=u.length,o>t)throw await s.cancel(),new Error(`ZIP entry decompressed data exceeds ${t} bytes`);i.push(u)}}finally{s.releaseLock()}let a=new Uint8Array(o),l=0;for(let c of i)a.set(c,l),l+=c.length;return a}function aE(e,t){if(e.length<Uo)return-1;let n=e.length-Uo;for(let r=0;r<=n;r++)if(nt.get(e,r)===z0&&nt.get(e,r+8)===t+r)return r;return-1}function lE(e){return(e.codePointAt(0)&32)!==0}function cE(e,t){let n=new Uint8Array(t),r=0;for(let s of e)n.set(s,r),r+=s.length;return n}async function uE(e,{shouldBuffer:t,maximumLength:n=Gn}={}){let{syncBuffer:r}=e,{length:s}=r,i=[],o=0;for(;;){let a=await e.tokenizer.peekBuffer(r,{mayBeLess:!0}),l=aE(r.subarray(0,a),o),c=l>=0?0:a===s?Math.min(oE,a-1):0,u=l>=0?l:a-c;if(u===0)break;if(o+=u,o>n)throw new Error(`ZIP entry compressed data exceeds ${n} bytes`);if(t){let f=new Uint8Array(u);await e.tokenizer.readBuffer(f),i.push(f)}else await e.tokenizer.ignore(u);if(l>=0)break}if(Lt(e.tokenizer)||(e.knownSizeDescriptorScannedBytes+=o),!!t)return cE(i,o)}function fE(e,t){return Lt(e.tokenizer)?Math.max(0,gn-(e.tokenizer.position-t)):Math.max(0,Gn-e.knownSizeDescriptorScannedBytes)}async function pE(e,t,{shouldBuffer:n,maximumDescriptorLength:r=Gn}={}){if(t.dataDescriptor&&t.compressedSize===0)return uE(e,{shouldBuffer:n,maximumLength:r});if(!n){await pr(e.tokenizer,t.compressedSize,{maximumLength:Lt(e.tokenizer)?Gn:e.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let s=wE(e.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>s)throw new Error(`ZIP entry compressed data exceeds ${s} bytes`);let i=new Uint8Array(t.compressedSize);return await e.tokenizer.readBuffer(i),i}function hE(e,t){let n=e.getReader(),r=0,s=!1,i=!1,o=async a=>{s||i||(i=!0,await n.cancel(a))};return new ReadableStream({async pull(a){if(r>=t){a.close(),await o();return}let{done:l,value:c}=await n.read();if(l||!c){s=!0,a.close();return}let u=t-r;if(c.length>u){a.enqueue(c.subarray(0,u)),r+=u,a.close(),await o();return}a.enqueue(c),r+=c.length},async cancel(a){await o(a)}})}async function H0(e,t){return new Nc(t).fromBuffer(e)}function U0(e){switch(e=e.toLowerCase(),e){case"application/epub+zip":return{ext:"epub",mime:e};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:e};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:e};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:e};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:e};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:e};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:e};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:e};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:e};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:e};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:e};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:e};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:e};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:e};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:e};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:e};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function jn(e,t,n){n={offset:0,...n};for(let[r,s]of t.entries())if(n.mask){if(s!==(n.mask[r]&e[r+n.offset]))return!1}else if(s!==e[r+n.offset])return!1;return!0}function dE(e){return Number.isFinite(e)?Math.max(1,Math.trunc(e)):bi}function mE(e,t,n){return n===void 0?e.read(t):(n.throwIfAborted(),new Promise((r,s)=>{let i=()=>{n.removeEventListener("abort",o)},o=()=>{let a=n.reason;i(),(async()=>{try{await e.cancel(a)}catch{}})(),s(a)};n.addEventListener("abort",o,{once:!0}),(async()=>{try{let a=await e.read(t);i(),r(a)}catch(a){i(),s(a)}})()}))}function gE(e){return Number.isFinite(e)?Math.max(0,Math.min(Gx,Math.trunc(e))):0}function yE(e){return Number.isFinite(e)?Math.max(0,e):Number.MAX_SAFE_INTEGER}function Lt(e){let t=e.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function xi(e,t,n){return Lt(e)&&e.position-t>n}function wE(e){let t=e.fileInfo.size,n=Number.isFinite(t)?Math.max(0,t-e.position):Number.MAX_SAFE_INTEGER;return Math.min(n,Vx)}function bE(e){if(e instanceof Be||e instanceof nr)return!0;if(!(e instanceof Error))return!1;if(tE.has(e.message)||rE.has(e.code))return!0;for(let t of nE)if(e.message.startsWith(t))return!0;return!1}function B0(e,t=Gn){let n=[e.compressedSize,e.uncompressedSize];for(let r of n)if(!Number.isFinite(r)||r<0||r>t)return!1;return!0}function xE(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function EE(e,t){t.startsWith("word/")&&(e.hasWordDirectory=!0),t.startsWith("ppt/")&&(e.hasPresentationDirectory=!0),t.startsWith("xl/")&&(e.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(e.hasThreeDimensionalModelEntry=!0)}function W0(e){if(!(!e.hasContentTypesEntry||e.hasUnparseableContentTypes||e.isParsingContentTypes||e.hasParsedContentTypesEntry)){if(e.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(e.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(e.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(e.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function AE(e){let t=e.indexOf('.main+xml"');if(t===-1){let s="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return e.includes(`ContentType="${s}"`)?s:void 0}let n=e.slice(0,t),r=n.lastIndexOf('"');return n.slice(r+1)}var bi,Gx,Gn,T0,Vx,gn,Bo,O0,qx,Zx,R0,vc,P0,D0,Kx,Qx,Xx,Yx,Jx,_0,F0,L0,eE,M0,tE,nE,rE,nr,z0,Uo,oE,Nc,MP,UP,j0=k(()=>{di();a0();E0();A0();k0();$0();bi=4100,Gx=bi-2,Gn=1024*1024,T0=1024,Vx=2**31-1,gn=16*1024*1024,Bo=Gn,O0=Gn,qx=gn,Zx=1,R0=100,vc=gn,P0=64,D0=Bo,Kx=256,Qx=512,Xx=gn,Yx=512,Jx=512,_0=256,F0=Bo,L0=Bo,eE=Bo,M0=gn,tE=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),nE=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],rE=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),nr=class extends Error{};z0=134695760,Uo=16,oE=Uo-1;jr.prototype.inflate=async function(e,t,n){if(e.compressedMethod===0)return n(t);if(e.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);let r=await iE(t,{maximumLength:Gn});return n(r)};jr.prototype.unzip=async function(e){let t=!1,n=0,r=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(xi(this.tokenizer,r,gn))throw new nr(`ZIP stream probing exceeds ${gn} bytes`);let s=await this.readLocalFileHeader();if(!s)break;if(n++,n>T0)throw new Error(`ZIP entry count exceeds ${T0}`);let i=e(s);t=!!i.stop,await this.tokenizer.ignore(s.extraFieldLength);let o=await pE(this,s,{shouldBuffer:!!i.handler,maximumDescriptorLength:Math.min(Gn,fE(this,r))});if(i.handler&&await this.inflate(s,o,i.handler),s.dataDescriptor){let a=new Uint8Array(Uo);if(await this.tokenizer.readBuffer(a),nt.get(a,0)!==z0)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-a.length}`)}if(xi(this.tokenizer,r,gn))throw new nr(`ZIP stream probing exceeds ${gn} bytes`)}while(!t)};Nc=class e{constructor(t){let n=gE(t?.mpegOffsetTolerance);this.options={...t,mpegOffsetTolerance:n},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(t){return sE(s0(t,this.getTokenizerOptions()))}async parseTokenizer(t,n=0){this.detectionReentryCount=n;let r=t.position;for(let s of this.detectors){let i;try{i=await s.detect(t)}catch(o){if(o instanceof Be||o instanceof nr)return;throw o}if(i)return i;if(r!==t.position)return}}async fromTokenizer(t){try{return await this.parseTokenizer(t)}finally{await t.close()}}async fromBuffer(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``);let n=t instanceof Uint8Array?t:new Uint8Array(t);if(n?.length>1)return this.fromTokenizer(i0(n,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let n=o0(t,this.getTokenizerOptions());return this.fromTokenizer(n)}async fromStream(t){this.options.signal?.throwIfAborted();let n=this.createTokenizerFromWebStream(t);return this.fromTokenizer(n)}async toDetectionStream(t,n){let r=dE(n?.sampleSize??bi),s,i,o=t.getReader({mode:"byob"});try{let{value:c,done:u}=await mE(o,new Uint8Array(r),this.options.signal);if(i=c,!u&&c)try{s=await this.fromBuffer(c.subarray(0,r))}catch(f){if(!(f instanceof Be))throw f;s=void 0}i=c}finally{o.releaseLock()}let a=new TransformStream({async start(c){c.enqueue(i)},transform(c,u){u.enqueue(c)}}),l=t.pipeThrough(a);return l.fileType=s,l}async detectGzip(t){if(this.gzipProbeDepth>=Zx)return{ext:"gz",mime:"application/gzip"};let n=new wi(t),r=hE(n.inflate(),qx),s=Lt(t),i,o,a,l;if(s){let c=new AbortController;i=setTimeout(()=>{c.abort(new DOMException(`Operation timed out after ${R0} ms`,"TimeoutError"))},R0),o=this.options.signal===void 0?c.signal:AbortSignal.any([this.options.signal,c.signal]),a=new e({...this.options,signal:o}),a.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{l=await(a??this).fromStream(r)}catch(c){if(c?.name==="AbortError"&&o?.reason?.name!=="TimeoutError")throw c}finally{clearTimeout(i),s||this.gzipProbeDepth--}return l?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,n){return jn(this.buffer,t,n)}checkString(t,n){return this.check(S0(t,n?.encoding),n)}detectConfident=async t=>{if(this.buffer=new Uint8Array(bi),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,Lt(t)&&(await t.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(t);if(await t.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await t.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=_0?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(t));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(t);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await pr(t,6,{maximumLength:6,reason:"ID3 header prefix"});let n=await t.readToken(v0),r=Lt(t);if(!Number.isFinite(n)||n<0||r&&(n>vc||t.position+n>vc))return;if(t.position+n>t.fileInfo.size)return r?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await pr(t,n,{maximumLength:r?vc:t.fileInfo.size,reason:"ID3 payload"})}catch(s){if(s instanceof Be)return;throw s}return this.detectionReentryCount>=_0?void 0:(this.detectionReentryCount++,this.parseTokenizer(t,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let n,r=xE();try{await new jr(t).unzip(s=>{EE(r,s.filename);let i=s.filename==="[Content_Types].xml",o=W0(r);if(!i&&o)return n=o,{stop:!0};switch(s.filename){case"META-INF/mozilla.rsa":return n={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return n={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return B0(s,O0)?{async handler(a){let l=new TextDecoder("utf-8").decode(a).trim();n=U0(l)},stop:!0}:{};case"[Content_Types].xml":return r.hasContentTypesEntry=!0,B0(s,O0)?(r.isParsingContentTypes=!0,{async handler(a){let l=new TextDecoder("utf-8").decode(a),c=AE(l);c&&(n=U0(c)),r.hasParsedContentTypesEntry=!0,r.isParsingContentTypes=!1},stop:!0}):(r.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(s.filename)?(n={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(s){if(!bE(s))throw s;r.isParsingContentTypes&&(r.isParsingContentTypes=!1,r.hasUnparseableContentTypes=!0)}return n??W0(r)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let n=new Uint8Array(8);return await t.readBuffer(n),jn(n,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:jn(n,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:jn(n,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:jn(n,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:jn(n,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:jn(n,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let n=await this.readTiffHeader(!1);if(n)return n}if(this.check([77,77])){let n=await this.readTiffHeader(!0);if(n)return n}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function n(){let l=await t.peekNumber(Zm),c=128,u=0;for(;(l&c)===0&&c!==0;)++u,c>>=1;let f=new Uint8Array(u+1);return await kc(t,f,void 0,{maximumLength:f.length,reason:"EBML field"}),f}async function r(){let l=await n(),c=await n();c[0]^=128>>c.length-1;let u=Math.min(6,c.length),f=new DataView(l.buffer),p=new DataView(c.buffer,c.length-u,u);return{id:Cc(f),len:Cc(p)}}async function s(l){let c=0;for(;l>0;){if(c++,c>Kx||xi(t,o,gn))return;let u=t.position,f=await r();if(f.id===17026){if(f.len>P0)return;let p=Ic(f.len,P0,"EBML DocType");return(await t.readToken(new qt(p))).replaceAll(/\00.*$/g,"")}if(Lt(t)&&(!Number.isFinite(f.len)||f.len<0||f.len>D0)||(await pr(t,f.len,{maximumLength:Lt(t)?D0:t.fileInfo.size,reason:"EBML payload"}),--l,t.position<=u))return}}let i=await r(),o=t.position;switch(await s(i.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let n=wc.get(this.buffer,4),r=Mr.get(this.buffer,6);if(n>0&&n<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(r>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let n=new qt(4,"latin1").get(this.buffer,2);if(n.match("^d*")&&n>=1e3&&n<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await t.ignore(8),await t.readToken(new qt(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
629
629
  `,"\r"," "," ","\0"].some(n=>this.checkString(n,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let n={ext:"png",mime:"image/png"},r={ext:"apng",mime:"image/apng"};await t.ignore(8);async function s(){return{length:await t.readToken(Km),type:await t.readToken(new qt(4,"latin1"))}}let i=Lt(t),o=t.position,a=0,l=!1;do{if(a++,a>Qx||xi(t,o,Xx))break;let c=t.position,u=await s();if(u.length<0)return;if(u.type==="IHDR"){if(u.length!==13)return;l=!0}switch(u.type){case"IDAT":return n;case"acTL":return r;default:if(!l&&u.type!=="CgBI")return;if(i&&u.length>F0)return l&&lE(u.type)?n:void 0;try{await pr(t,u.length+4,{maximumLength:i?F0+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(f){if(!i&&(f instanceof nr||f instanceof Be))return n;throw f}}if(t.position<=c)break}while(t.position+8<t.fileInfo.size);return n}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(this.buffer[8]&96)!==0){let n=new qt(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(n){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return n.startsWith("3g")?n.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.checkString(`REGEDIT4\r
630
630
  `))return{ext:"reg",mime:"application/x-ms-regedit"};if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){let n=!1;try{async function r(){let a=new Uint8Array(16);return await kc(t,a,void 0,{maximumLength:a.length,reason:"ASF header GUID"}),{id:a,size:Number(await t.readToken(Qm))}}await pr(t,30,{maximumLength:30,reason:"ASF header prelude"});let s=Lt(t),i=t.position,o=0;for(;t.position+24<t.fileInfo.size&&(o++,!(o>Yx||xi(t,i,gn)));){let a=t.position,l=await r(),c=l.size-24;if(!Number.isFinite(c)||c<0){n=!0;break}if(jn(l.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let u=new Uint8Array(16);if(c-=await kc(t,u,void 0,{maximumLength:u.length,reason:"ASF stream type GUID"}),jn(u,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(jn(u,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(s&&c>L0){n=!0;break}if(await pr(t,c,{maximumLength:s?L0:t.fileInfo.size,reason:"ASF header payload"}),t.position<=a){n=!0;break}}}catch(r){if(r instanceof Be||r instanceof nr)Lt(t)&&(n=!0);else throw r}return n?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await t.ignore(20),await t.readToken(new qt(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("<?xml ",{offset:2,encoding:"utf-16be"})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await t.peekBuffer(this.buffer,{length:Math.min(256,t.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let n=new DataView(this.buffer.buffer).getUint32(12,!0);if(n>12&&this.buffer.length>=n+16)try{let r=new TextDecoder().decode(this.buffer.subarray(16,n+16));if(JSON.parse(r).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await t.peekBuffer(this.buffer,{length:Math.min(512,t.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&C0(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let n="utf-16le";return this.checkString("<?xml ",{offset:2,encoding:n})?{ext:"xml",mime:"application/xml"}:this.check([255,14],{offset:2})&&this.checkString("SketchUp Model",{offset:4,encoding:n})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:this.checkString(`Windows Registry Editor Version 5.00\r
631
631
  `,{offset:2,encoding:n})?{ext:"reg",mime:"application/x-ms-regedit"}:void 0}if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async t=>{this.buffer=new Uint8Array(bi);let n=yE(t.fileInfo.size);if(await t.peekBuffer(this.buffer,{length:Math.min(8,n),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await t.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,n),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let r=0;r<=this.options.mpegOffsetTolerance;++r){let s=this.scanMpeg(r);if(s)return s}};async readTiffTag(t){let n=await this.tokenizer.readToken(t?Mr:rt);switch(await this.tokenizer.ignore(10),n){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(t){let n=await this.tokenizer.readToken(t?Mr:rt);if(!(n>Jx)&&!(Lt(this.tokenizer)&&2+n*12>M0))for(let r=0;r<n;++r){let s=await this.readTiffTag(t);if(s)return s}}async readTiffHeader(t){let n={ext:"tif",mime:"image/tiff"},r=(t?Mr:rt).get(this.buffer,2),s=(t?wc:nt).get(this.buffer,4);if(r===42){if(s>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(s>=8){let a=(t?Mr:rt).get(this.buffer,8),l=(t?Mr:rt).get(this.buffer,10);if(a===28&&l===254||a===31&&l===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(Lt(this.tokenizer)&&s>eE)return n;let i=Lt(this.tokenizer)?M0:this.tokenizer.fileInfo.size;try{await pr(this.tokenizer,s,{maximumLength:i,reason:"TIFF IFD offset"})}catch(a){if(a instanceof Be)return;throw a}let o;try{o=await this.readTiffIFD(t)}catch(a){if(a instanceof Be)return;throw a}return o??n}if(r===43)return n}scanMpeg(t){if(this.check([255,224],{offset:t,mask:[255,224]})){if(this.check([16],{offset:t+1,mask:[22]}))return this.check([8],{offset:t+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:t+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:t+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:t+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},MP=new Set(N0),UP=new Set(I0)});var G0={};ee(G0,{fileCommand:()=>TE,flagsForFuzzing:()=>OE});function kE(e,t){let n=vE.get(e);if(n)return n;let[r,s]=t.split("/"),i=s?.split("+")[0]?.replace(/-/g," ")||e;switch(r){case"image":return`${i.toUpperCase()} image data`;case"audio":return`${i.toUpperCase()} audio`;case"video":return`${i.toUpperCase()} video`;case"font":return`${i} font`;case"model":return`${i} 3D model`;case"application":return s?.includes("zip")||s?.includes("compressed")?`${i} archive data`:s?.includes("executable")?`${i} executable`:`${e.toUpperCase()} data`;default:return`${e.toUpperCase()} data`}}function NE(e){let t=e.split("/").pop()||e;if(t.startsWith(".")&&!t.includes(".",1))return t;let n=t.lastIndexOf(".");return n===-1||n===0?"":t.slice(n).toLowerCase()}function IE(e,t){if(e.startsWith("#!")){let c=e.split(`
@@ -744,13 +744,13 @@ Gid: ${s} ${s} ${s} ${s}
744
744
  `||b===";"||b==="&"||b==="|"||b==="("||b===")"||b==="<"||b===">")break}if(b==="$"&&o+1<i&&s[o+1]==="'"&&!h&&!d){for(u+="$'",o+=2,l+=2;o<i&&s[o]!=="'";)s[o]==="\\"&&o+1<i?(u+=s[o]+s[o+1],o+=2,l+=2):(u+=s[o],o++,l++);o<i&&(u+="'",o++,l++);continue}if(b==="$"&&o+1<i&&s[o+1]==='"'&&!h&&!d){o++,l++,d=!0,f=!0,u===""&&(m=!0),o++,l++;continue}if(b==="'"&&!d){if(h)if(h=!1,!m||g)u+=b;else{let x=o+1<i?s[o+1]:"";x&&!B2(x)&&x!=="'"&&(x==='"'?(g=!0,u+=b,p=!1,f=!1):(g=!0,u+=b))}else h=!0,m&&!g?(p=!0,f=!0):u+=b;o++,l++;continue}if(b==='"'&&!h){if(d)if(d=!1,!m||g)u+=b;else{let x=o+1<i?s[o+1]:"";x&&!B2(x)&&x!=='"'&&(x==="'"?(g=!0,u+=b,p=!1,f=!1):(g=!0,u+=b))}else d=!0,m&&!g?f=!0:u+=b;o++,l++;continue}if(b==="\\"&&!h&&o+1<i){let x=s[o+1];if(x===`
745
745
  `){o+=2,c++,l=1;continue}if(d){if(x==='"'||x==="\\"||x==="$"||x==="`"||x===`
746
746
  `){if(x===`
747
- `){o+=2,l=1,c++;continue}u+=b+x,o+=2,l+=2;continue}}else{x==="\\"||x==='"'||x==="'"||x==="`"||x==="*"||x==="?"||x==="["||x==="]"||x==="("||x===")"||x==="$"||x==="-"||x==="."||x==="^"||x==="+"||x==="{"||x==="}"?u+=b+x:u+=x,o+=2,l+=2;continue}}if(b==="$"&&o+1<i&&s[o+1]==="("&&!h){u+=b,o++,l++,u+=s[o],o++,l++;let x=1,S=!1,v=!1,$=0,_=!1,R="",P=s[o]==="("&&!this.dollarDparenIsSubshell(o);for(;x>0&&o<i;){let C=s[o];if(u+=C,S)C==="'"&&(S=!1);else if(v)C==="\\"&&o+1<i?(u+=s[o+1],o++,l++):C==='"'&&(v=!1);else if(C==="'")S=!0,R="";else if(C==='"')v=!0,R="";else if(C==="\\"&&o+1<i)u+=s[o+1],o++,l++,R="";else if(C==="$"&&o+1<i&&s[o+1]==="{"){o++,l++,u+=s[o],o++,l++;let T=1,O=!1,I=!1;for(;T>0&&o<i;){let L=s[o];if(L==="\\"&&o+1<i&&!O){u+=L,o++,l++,u+=s[o],o++,l++;continue}u+=L,O?L==="'"&&(O=!1):I?L==='"'&&(I=!1):L==="'"?O=!0:L==='"'?I=!0:L==="{"?T++:L==="}"&&T--,L===`
748
- `?(c++,l=0):l++,o++}R="";continue}else if(C==="#"&&!P&&(R===""||/\s/.test(s[o-1]||""))){for(;o+1<i&&s[o+1]!==`
749
- `;)o++,l++,u+=s[o];R=""}else/[a-zA-Z_]/.test(C)?R+=C:(R==="case"?($++,_=!1):R==="in"&&$>0?_=!0:R==="esac"&&$>0&&($--,_=!1),R="",C==="("?o>0&&s[o-1]==="$"?x++:_||x++:C===")"?_?_=!1:x--:C===";"&&$>0&&(o+1<i&&s[o+1]===";"||o+1<i&&s[o+1]==="&")&&(_=!0));C===`
750
- `&&(c++,l=0,R=""),o++,l++}continue}if(b==="$"&&o+1<i&&s[o+1]==="["&&!h){u+=b,o++,l++,u+=s[o],o++,l++;let x=1;for(;x>0&&o<i;){let S=s[o];u+=S,S==="["?x++:S==="]"?x--:S===`
751
- `&&(c++,l=0),o++,l++}continue}if(b==="$"&&o+1<i&&s[o+1]==="{"&&!h){u+=b,o++,l++,u+=s[o],o++,l++;let x=1,S=!1,v=!1,$=c,_=l,R=c,P=l;for(;x>0&&o<i;){let C=s[o];if(C==="\\"&&o+1<i&&s[o+1]===`
752
- `){o+=2,c++,l=1;continue}if(C==="\\"&&o+1<i&&!S){u+=C,o++,l++,u+=s[o],o++,l++;continue}u+=C,S?C==="'"&&(S=!1):v?C==='"'&&(v=!1):C==="'"?(S=!0,$=c,_=l):C==='"'?(v=!0,R=c,P=l):C==="{"?x++:C==="}"&&x--,C===`
753
- `&&(c++,l=0),o++,l++}if(S)throw new mr("unexpected EOF while looking for matching `''",$,_);if(v)throw new mr("unexpected EOF while looking for matching `\"'",R,P);continue}if(b==="$"&&o+1<i&&!h){let x=s[o+1];if(x==="#"||x==="?"||x==="$"||x==="!"||x==="@"||x==="*"||x==="-"||x>="0"&&x<="9"){u+=b+x,o+=2,l+=2;continue}}if(b==="`"&&!h){for(u+=b,o++,l++;o<i&&s[o]!=="`";){let x=s[o];u+=x,x==="\\"&&o+1<i&&(u+=s[o+1],o++,l++),x===`
747
+ `){o+=2,l=1,c++;continue}u+=b+x,o+=2,l+=2;continue}}else{x==="\\"||x==='"'||x==="'"||x==="`"||x==="*"||x==="?"||x==="["||x==="]"||x==="("||x===")"||x==="$"||x==="-"||x==="."||x==="^"||x==="+"||x==="{"||x==="}"?u+=b+x:u+=x,o+=2,l+=2;continue}}if(b==="$"&&o+1<i&&s[o+1]==="("&&!h){u+=b,o++,l++,u+=s[o],o++,l++;let x=1,S=!1,v=!1,$=0,D=!1,O="",P=s[o]==="("&&!this.dollarDparenIsSubshell(o);for(;x>0&&o<i;){let C=s[o];if(u+=C,S)C==="'"&&(S=!1);else if(v)C==="\\"&&o+1<i?(u+=s[o+1],o++,l++):C==='"'&&(v=!1);else if(C==="'")S=!0,O="";else if(C==='"')v=!0,O="";else if(C==="\\"&&o+1<i)u+=s[o+1],o++,l++,O="";else if(C==="$"&&o+1<i&&s[o+1]==="{"){o++,l++,u+=s[o],o++,l++;let T=1,R=!1,I=!1;for(;T>0&&o<i;){let L=s[o];if(L==="\\"&&o+1<i&&!R){u+=L,o++,l++,u+=s[o],o++,l++;continue}u+=L,R?L==="'"&&(R=!1):I?L==='"'&&(I=!1):L==="'"?R=!0:L==='"'?I=!0:L==="{"?T++:L==="}"&&T--,L===`
748
+ `?(c++,l=0):l++,o++}O="";continue}else if(C==="#"&&!P&&(O===""||/\s/.test(s[o-1]||""))){for(;o+1<i&&s[o+1]!==`
749
+ `;)o++,l++,u+=s[o];O=""}else/[a-zA-Z_]/.test(C)?O+=C:(O==="case"?($++,D=!1):O==="in"&&$>0?D=!0:O==="esac"&&$>0&&($--,D=!1),O="",C==="("?o>0&&s[o-1]==="$"?x++:D||x++:C===")"?D?D=!1:x--:C===";"&&$>0&&(o+1<i&&s[o+1]===";"||o+1<i&&s[o+1]==="&")&&(D=!0));C===`
750
+ `&&(c++,l=0,O=""),o++,l++}continue}if(b==="$"&&o+1<i&&s[o+1]==="["&&!h){u+=b,o++,l++,u+=s[o],o++,l++;let x=1;for(;x>0&&o<i;){let S=s[o];u+=S,S==="["?x++:S==="]"?x--:S===`
751
+ `&&(c++,l=0),o++,l++}continue}if(b==="$"&&o+1<i&&s[o+1]==="{"&&!h){u+=b,o++,l++,u+=s[o],o++,l++;let x=1,S=!1,v=!1,$=c,D=l,O=c,P=l;for(;x>0&&o<i;){let C=s[o];if(C==="\\"&&o+1<i&&s[o+1]===`
752
+ `){o+=2,c++,l=1;continue}if(C==="\\"&&o+1<i&&!S){u+=C,o++,l++,u+=s[o],o++,l++;continue}u+=C,S?C==="'"&&(S=!1):v?C==='"'&&(v=!1):C==="'"?(S=!0,$=c,D=l):C==='"'?(v=!0,O=c,P=l):C==="{"?x++:C==="}"&&x--,C===`
753
+ `&&(c++,l=0),o++,l++}if(S)throw new mr("unexpected EOF while looking for matching `''",$,D);if(v)throw new mr("unexpected EOF while looking for matching `\"'",O,P);continue}if(b==="$"&&o+1<i&&!h){let x=s[o+1];if(x==="#"||x==="?"||x==="$"||x==="!"||x==="@"||x==="*"||x==="-"||x>="0"&&x<="9"){u+=b+x,o+=2,l+=2;continue}}if(b==="`"&&!h){for(u+=b,o++,l++;o<i&&s[o]!=="`";){let x=s[o];u+=x,x==="\\"&&o+1<i&&(u+=s[o+1],o++,l++),x===`
754
754
  `&&(c++,l=0),o++,l++}o<i&&(u+=s[o],o++,l++);continue}u+=b,o++,b===`
755
755
  `?(c++,l=1):l++}if(this.pos=o,this.column=l,this.line=c,g&&m&&(u=s[t]+u,f=!1,p=!1),h||d){let b=h?"'":'"';throw new mr(`unexpected EOF while looking for matching \`${b}'`,n,r)}if(!m&&u.length>=2){if(u[0]==="'"&&u[u.length-1]==="'"){let b=u.slice(1,-1);!b.includes("'")&&!b.includes('"')&&(u=b,f=!0,p=!0)}else if(u[0]==='"'&&u[u.length-1]==='"'){let b=u.slice(1,-1),x=!1;for(let S=0;S<b.length;S++){if(b[S]==='"'){x=!0;break}b[S]==="\\"&&S+1<b.length&&S++}x||(u=b,f=!0,p=!1)}}if(u==="")return{type:E.WORD,value:"",start:t,end:o,line:n,column:r,quoted:f,singleQuoted:p};let w=L2.get(u);if(!f&&w!==void 0)return{type:w,value:u,start:t,end:o,line:n,column:r};if(!m){let b=U2(u);if(b>0&&M2(u.slice(0,b)))return{type:E.ASSIGNMENT_WORD,value:u,start:t,end:o,line:n,column:r,quoted:f,singleQuoted:p}}return/^[0-9]+$/.test(u)?{type:E.NUMBER,value:u,start:t,end:o,line:n,column:r}:UA(u)?{type:E.NAME,value:u,start:t,end:o,line:n,column:r,quoted:f,singleQuoted:p}:{type:E.WORD,value:u,start:t,end:o,line:n,column:r,quoted:f,singleQuoted:p}}readHeredocContent(){for(;this.pendingHeredocs.length>0;){let t=this.pendingHeredocs.shift();if(!t)break;let n=this.pos,r=this.line,s=this.column,i="";for(;this.pos<this.input.length;){let o="";for(;this.pos<this.input.length&&this.input[this.pos]!==`
756
756
  `;)o+=this.input[this.pos],this.pos++,this.column++;if((t.stripTabs?o.replace(/^\t+/,""):o)===t.delimiter){this.pos<this.input.length&&this.input[this.pos]===`
@@ -792,7 +792,7 @@ Gid: ${s} ${s} ${s} ${s}
792
792
  `};let s=await Ou(e,t),{hasParamExpansion:i,hasCommandSub:o}=vi(n);if((i||o)&&!r&&!kt(e.state.env)){let f=yt(e.state.env);if(Ve(s,f).length>1)return{error:`bash: $${KS(n)}: ambiguous redirect
793
793
  `}}if(r||e.state.options.noglob)return{target:s};let l=await ay(e,t);if(!qn(l,e.state.shoptOptions.extglob))return{target:s};let c=new wr(e.fs,e.state.cwd,e.state.env,{globstar:e.state.shoptOptions.globstar,nullglob:e.state.shoptOptions.nullglob,failglob:e.state.shoptOptions.failglob,dotglob:e.state.shoptOptions.dotglob,extglob:e.state.shoptOptions.extglob,globskipdots:e.state.shoptOptions.globskipdots,maxGlobOperations:e.limits.maxGlobOperations}),u=await c.expand(l);return u.length===0?c.hasFailglob()?{error:`bash: no match: ${s}
794
794
  `}:{target:s}:u.length===1?{target:u[0]}:{error:`bash: ${s}: ambiguous redirect
795
- `}}async function Ou(e,t){let n=t.parts,r=n.length;if(r===1){let o=await ln(e,n[0]);return Ar(o,e.limits.maxStringLength,"word expansion"),o}let s=[];for(let o=0;o<r;o++)s.push(await ln(e,n[o]));let i=s.join("");return Ar(i,e.limits.maxStringLength,"word expansion"),i}async function ln(e,t,n=!1){if(t.type==="ParameterExpansion")return ha(e,t,n);let r=qS(e,t,n);if(r!==null)return r;switch(t.type){case"DoubleQuoted":{let s=[];for(let i of t.parts)s.push(await ln(e,i,!0));return s.join("")}case"CommandSubstitution":{let s=Vg(t.body);if(s)try{let p=await le(e,s.target),h=p.startsWith("/")?p:`${e.state.cwd}/${p}`,d=await e.fs.readFile(h);e.state.lastExitCode=0,e.state.env.set("?","0");let m=d.replace(/\n+$/,"");return Ar(m,e.limits.maxStringLength,"command substitution"),m}catch(p){if(p instanceof X)throw p;return e.state.lastExitCode=1,e.state.env.set("?","1"),""}let i=e.substitutionDepth??0,o=e.limits.maxSubstitutionDepth;if(i>=o)throw new X(`Command substitution nesting limit exceeded (${o})`,"substitution_depth");let a=e.substitutionDepth;e.substitutionDepth=i+1;let l=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let c=new Map(e.state.env),u=e.state.cwd,f=e.state.suppressVerbose;e.state.suppressVerbose=!0;try{let p=await e.executeScript(t.body),h=p.exitCode;e.state.env=c,e.state.cwd=u,e.state.suppressVerbose=f,e.state.lastExitCode=h,e.state.env.set("?",String(h)),p.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||"")+p.stderr),e.state.bashPid=l,e.substitutionDepth=a;let d=oy(p).replace(/\n+$/,"");return Ar(d,e.limits.maxStringLength,"command substitution"),d}catch(p){if(e.state.env=c,e.state.cwd=u,e.state.bashPid=l,e.substitutionDepth=a,e.state.suppressVerbose=f,p instanceof X)throw p;if(p instanceof we){e.state.lastExitCode=p.exitCode,e.state.env.set("?",String(p.exitCode)),p.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||"")+p.stderr);let h=oy({stdout:p.stdout,stdoutKind:p.stdoutKind,stdoutEncoding:p.stdoutEncoding}).replace(/\n+$/,"");return Ar(h,e.limits.maxStringLength,"command substitution"),h}throw p}}case"ArithmeticExpansion":{let s=t.expression.originalText;if(s&&/\$[a-zA-Z_][a-zA-Z0-9_]*(?![{[(])/.test(s)){let o=await Hg(e,s),a=new pe,l=Ie(a,o);return String(await re(e,l.expression,!0))}return String(await re(e,t.expression.expression,!0))}case"BraceExpansion":{let s=[];for(let i of t.items)if(i.type==="Range"){let o=Au(i.start,i.end,i.step,i.startStr,i.endStr);if(o.expanded)s.push(...o.expanded);else return o.literal}else s.push(await le(e,i.word));return s.join(" ")}default:return""}}async function ha(e,t,n=!1){let{parameter:r}=t,{operation:s}=t,i=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(i){let[,p,h]=i;if(e.state.associativeArrays?.has(p)||h.includes("$(")||h.includes("`")||h.includes("${")){let m=await Eu(e,h);r=`${p}[${m}]`}}else if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)&&We(e,r)){let p=Mt(e,r);if(p&&p!==r){let h=p.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(h){let[,d,m]=h;if(e.state.associativeArrays?.has(d)||m.includes("$(")||m.includes("`")||m.includes("${")){let y=await Eu(e,m);r=`${d}[${y}]`}}}}let o=s&&(s.type==="DefaultValue"||s.type==="AssignDefault"||s.type==="UseAlternative"||s.type==="ErrorIfUnset"),a=!1;o&&(a=!await Tn(e,r));let l=o?a?"":await ke(e,r,!1):await ke(e,r,!0);if(!s)return l;o||(a=!await Tn(e,r));let{isEmpty:c,effectiveValue:u}=a6(e,r,l,n),f={value:l,isUnset:a,isEmpty:c,effectiveValue:u,inDoubleQuotes:n};switch(s.type){case"DefaultValue":return Zg(e,s,f,Rn);case"AssignDefault":return Kg(e,r,s,f,Rn);case"ErrorIfUnset":return Qg(e,r,s,f,Rn);case"UseAlternative":return Xg(e,s,f,Rn);case"PatternRemoval":{let p=await Yg(e,l,s,Rn,ln);return Ar(p,e.limits.maxStringLength,"pattern removal"),p}case"PatternReplacement":{let p=await Jg(e,l,s,Rn,ln);return Ar(p,e.limits.maxStringLength,"pattern replacement"),p}case"Length":return e6(e,r,l);case"LengthSliceError":throw new Pt(r);case"BadSubstitution":throw new Pt(s.text);case"Substring":return t6(e,r,l,s);case"CaseModification":{let p=await n6(e,l,s,Rn,ha);return Ar(p,e.limits.maxStringLength,"case modification"),p}case"Transform":return r6(e,r,l,a,s);case"Indirection":return s6(e,r,l,a,s,ha,n);case"ArrayKeys":return i6(e,s);case"VarNamePrefix":return o6(e,s);default:return l}}var Nu,Bt=k(()=>{"use strict";he();Tt();ct();ta();Ut();Ae();na();jg();Gg();qg();Ds();l6();h6();m6();Xt();Y6();ny();an();$n();iy();Ds();Xt();Nu=1e5});function QS(e,t,n){switch(n){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":if(t===0)throw new Le("division by 0");return Math.trunc(e/t);case"%":if(t===0)throw new Le("division by 0");return e%t;case"**":if(t<0)throw new Le("exponent less than 0");return e**t;case"<<":return e<<t;case">>":return e>>t;case"<":return e<t?1:0;case"<=":return e<=t?1:0;case">":return e>t?1:0;case">=":return e>=t?1:0;case"==":return e===t?1:0;case"!=":return e!==t?1:0;case"&":return e&t;case"|":return e|t;case"^":return e^t;case",":return t;default:return 0}}function uy(e,t,n){switch(n){case"=":return t;case"+=":return e+t;case"-=":return e-t;case"*=":return e*t;case"/=":return t!==0?Math.trunc(e/t):0;case"%=":return t!==0?e%t:0;case"<<=":return e<<t;case">>=":return e>>t;case"&=":return e&t;case"|=":return e|t;case"^=":return e^t;default:return t}}function XS(e,t){switch(t){case"-":return-e;case"+":return+e;case"!":return e===0?1:0;case"~":return~e;default:return e}}async function YS(e,t){let n=e.state.env.get(t);if(n!==void 0)return n;let r=e.state.env.get(`${t}_0`);return r!==void 0?r:await ke(e,t)}function JS(e){if(!e)return 0;let t=Number.parseInt(e,10);if(!Number.isNaN(t)&&/^-?\d+$/.test(e.trim()))return t;let n=e.trim();if(!n)return 0;try{let r=new pe,{expr:s,pos:i}=on(r,n,0);if(i<n.length){let o=n.slice(i).trim().split(/\s+/)[0];throw new Le(`${n}: syntax error in expression (error token is "${o}")`)}return s.type==="ArithNumber"?s.value:t||0}catch(r){if(r instanceof Le)throw r;let s=n.split(/\s+/).slice(1)[0]||n;throw new Le(`${n}: syntax error in expression (error token is "${s}")`)}}async function Pu(e,t){if(!t)return 0;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&/^-?\d+$/.test(t.trim()))return n;let r=t.trim();if(!r)return 0;let s=new pe,{expr:i,pos:o}=on(s,r,0);if(o<r.length){let a=r.slice(o).trim(),l=a.split(/\s+/)[0]||a;throw new Le(`syntax error in expression (error token is "${l}")`,"","")}return await re(e,i)}async function Du(e,t,n=new Set,r=0){if(r>100)throw new Le("maximum variable indirection depth exceeded");if(n.has(t))return 0;n.add(t);let s=await YS(e,t);if(!s)return 0;let i=Number.parseInt(s,10);if(!Number.isNaN(i)&&/^-?\d+$/.test(s.trim()))return i;let o=s.trim();if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(o))return await Du(e,o,n,r+1);let a=new pe,{expr:l,pos:c}=on(a,o,0);if(c<o.length){let u=o.slice(c).trim(),f=u.split(/\s+/)[0]||u;throw new Le(`${o}: syntax error in expression (error token is "${f}")`)}return await re(e,l)}async function ma(e,t){if(t.startsWith("#")){let f=t.slice(1),p=f.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[[@*]\]$/);if(p){let d=p[1],m=ce(e,d);return String(m.length)}let h=e.state.env.get(f)||"";return String(h.length)}if(t.startsWith("!")){let f=t.slice(1),p=e.state.env.get(f)||"";return e.state.env.get(p)||""}let n=[":-",":=",":?",":+","-","=","?","+"],r=-1,s="";for(let f of n){let p=t.indexOf(f);p>0&&(r===-1||p<r)&&(r=p,s=f)}if(r===-1)return await ke(e,t);let i=t.slice(0,r),o=t.slice(r+s.length),a=e.state.env.get(i),l=a===void 0,c=a==="",u=s.startsWith(":");switch(s){case":-":case"-":return l||u&&c?o:a||"";case":=":case"=":return l||u&&c?(e.state.env.set(i,o),o):a||"";case":+":case"+":return!(l||u&&c)?o:"";case":?":case"?":{if(l||u&&c)throw new Error(o||`${i}: parameter null or not set`);return a||""}default:return a||""}}async function re(e,t,n=!1){switch(t.type){case"ArithNumber":if(Number.isNaN(t.value))throw new Le("value too great for base");return t.value;case"ArithVariable":return await Du(e,t.name);case"ArithSpecialVar":{let s=(await ke(e,t.name)).trim();if(!s)return 0;let i=Number.parseInt(s,10);if(!Number.isNaN(i)&&/^-?\d+$/.test(s))return i;let o=new pe,{expr:a}=on(o,s,0);return await re(e,a)}case"ArithNested":return await re(e,t.expression);case"ArithCommandSubst":{if(e.execFn){let r=await e.execFn(t.command,{signal:e.state.signal});r.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||"")+r.stderr);let s=r.stdout.trim();return Number.parseInt(s,10)||0}return 0}case"ArithBracedExpansion":{let r=await ma(e,t.content);return Number.parseInt(r,10)||0}case"ArithDynamicBase":{let r=await ma(e,t.baseExpr),s=Number.parseInt(r,10);if(s<2||s>64)return 0;let i=`${s}#${t.value}`;return Ai(i)}case"ArithDynamicNumber":{let s=await ma(e,t.prefix)+t.suffix;return Ai(s)}case"ArithArrayElement":{let r=e.state.associativeArrays?.has(t.array),s=async i=>{let o=e.state.env.get(i);return o!==void 0?await Pu(e,o):0};if(t.stringKey!==void 0)return await s(`${t.array}_${t.stringKey}`);if(r&&t.index?.type==="ArithVariable"&&!t.index.hasDollarPrefix)return await s(`${t.array}_${t.index.name}`);if(r&&t.index?.type==="ArithVariable"&&t.index.hasDollarPrefix){let i=await ke(e,t.index.name);return await s(`${t.array}_${i}`)}if(t.index){let i=await re(e,t.index,n);if(i<0){let l=ce(e,t.array),c=e.state.currentLine;if(l.length===0)return e.state.expansionStderr=(e.state.expansionStderr||"")+`bash: line ${c}: ${t.array}: bad array subscript
795
+ `}}async function Ou(e,t){let n=t.parts,r=n.length;if(r===1){let o=await ln(e,n[0]);return Ar(o,e.limits.maxStringLength,"word expansion"),o}let s=[];for(let o=0;o<r;o++)s.push(await ln(e,n[o]));let i=s.join("");return Ar(i,e.limits.maxStringLength,"word expansion"),i}async function ln(e,t,n=!1){if(t.type==="ParameterExpansion")return ha(e,t,n);let r=qS(e,t,n);if(r!==null)return r;switch(t.type){case"DoubleQuoted":{let s=[];for(let i of t.parts)s.push(await ln(e,i,!0));return s.join("")}case"CommandSubstitution":{let s=Vg(t.body);if(s){e.state.commandSubstitutionUsed=!0;try{let p=await le(e,s.target),h=p.startsWith("/")?p:`${e.state.cwd}/${p}`,d=await e.fs.readFile(h);e.state.lastExitCode=0,e.state.env.set("?","0");let m=d.replace(/\n+$/,"");return Ar(m,e.limits.maxStringLength,"command substitution"),m}catch(p){if(p instanceof X)throw p;return e.state.lastExitCode=1,e.state.env.set("?","1"),""}}e.state.commandSubstitutionUsed=!0;let i=e.substitutionDepth??0,o=e.limits.maxSubstitutionDepth;if(i>=o)throw new X(`Command substitution nesting limit exceeded (${o})`,"substitution_depth");let a=e.substitutionDepth;e.substitutionDepth=i+1;let l=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let c=new Map(e.state.env),u=e.state.cwd,f=e.state.suppressVerbose;e.state.suppressVerbose=!0;try{let p=await e.executeScript(t.body),h=p.exitCode;e.state.env=c,e.state.cwd=u,e.state.suppressVerbose=f,e.state.lastExitCode=h,e.state.env.set("?",String(h)),p.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||"")+p.stderr),e.state.bashPid=l,e.substitutionDepth=a;let d=oy(p).replace(/\n+$/,"");return Ar(d,e.limits.maxStringLength,"command substitution"),d}catch(p){if(e.state.env=c,e.state.cwd=u,e.state.bashPid=l,e.substitutionDepth=a,e.state.suppressVerbose=f,p instanceof X)throw p;if(p instanceof we){e.state.lastExitCode=p.exitCode,e.state.env.set("?",String(p.exitCode)),p.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||"")+p.stderr);let h=oy({stdout:p.stdout,stdoutKind:p.stdoutKind,stdoutEncoding:p.stdoutEncoding}).replace(/\n+$/,"");return Ar(h,e.limits.maxStringLength,"command substitution"),h}throw p}}case"ArithmeticExpansion":{let s=t.expression.originalText;if(s&&/\$[a-zA-Z_][a-zA-Z0-9_]*(?![{[(])/.test(s)){let o=await Hg(e,s),a=new pe,l=Ie(a,o);return String(await re(e,l.expression,!0))}return String(await re(e,t.expression.expression,!0))}case"BraceExpansion":{let s=[];for(let i of t.items)if(i.type==="Range"){let o=Au(i.start,i.end,i.step,i.startStr,i.endStr);if(o.expanded)s.push(...o.expanded);else return o.literal}else s.push(await le(e,i.word));return s.join(" ")}default:return""}}async function ha(e,t,n=!1){let{parameter:r}=t,{operation:s}=t,i=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(i){let[,p,h]=i;if(e.state.associativeArrays?.has(p)||h.includes("$(")||h.includes("`")||h.includes("${")){let m=await Eu(e,h);r=`${p}[${m}]`}}else if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)&&We(e,r)){let p=Mt(e,r);if(p&&p!==r){let h=p.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(h){let[,d,m]=h;if(e.state.associativeArrays?.has(d)||m.includes("$(")||m.includes("`")||m.includes("${")){let y=await Eu(e,m);r=`${d}[${y}]`}}}}let o=s&&(s.type==="DefaultValue"||s.type==="AssignDefault"||s.type==="UseAlternative"||s.type==="ErrorIfUnset"),a=!1;o&&(a=!await Tn(e,r));let l=o?a?"":await ke(e,r,!1):await ke(e,r,!0);if(!s)return l;o||(a=!await Tn(e,r));let{isEmpty:c,effectiveValue:u}=a6(e,r,l,n),f={value:l,isUnset:a,isEmpty:c,effectiveValue:u,inDoubleQuotes:n};switch(s.type){case"DefaultValue":return Zg(e,s,f,Rn);case"AssignDefault":return Kg(e,r,s,f,Rn);case"ErrorIfUnset":return Qg(e,r,s,f,Rn);case"UseAlternative":return Xg(e,s,f,Rn);case"PatternRemoval":{let p=await Yg(e,l,s,Rn,ln);return Ar(p,e.limits.maxStringLength,"pattern removal"),p}case"PatternReplacement":{let p=await Jg(e,l,s,Rn,ln);return Ar(p,e.limits.maxStringLength,"pattern replacement"),p}case"Length":return e6(e,r,l);case"LengthSliceError":throw new Pt(r);case"BadSubstitution":throw new Pt(s.text);case"Substring":return t6(e,r,l,s);case"CaseModification":{let p=await n6(e,l,s,Rn,ha);return Ar(p,e.limits.maxStringLength,"case modification"),p}case"Transform":return r6(e,r,l,a,s);case"Indirection":return s6(e,r,l,a,s,ha,n);case"ArrayKeys":return i6(e,s);case"VarNamePrefix":return o6(e,s);default:return l}}var Nu,Bt=k(()=>{"use strict";he();Tt();ct();ta();Ut();Ae();na();jg();Gg();qg();Ds();l6();h6();m6();Xt();Y6();ny();an();$n();iy();Ds();Xt();Nu=1e5});function QS(e,t,n){switch(n){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":if(t===0)throw new Le("division by 0");return Math.trunc(e/t);case"%":if(t===0)throw new Le("division by 0");return e%t;case"**":if(t<0)throw new Le("exponent less than 0");return e**t;case"<<":return e<<t;case">>":return e>>t;case"<":return e<t?1:0;case"<=":return e<=t?1:0;case">":return e>t?1:0;case">=":return e>=t?1:0;case"==":return e===t?1:0;case"!=":return e!==t?1:0;case"&":return e&t;case"|":return e|t;case"^":return e^t;case",":return t;default:return 0}}function uy(e,t,n){switch(n){case"=":return t;case"+=":return e+t;case"-=":return e-t;case"*=":return e*t;case"/=":return t!==0?Math.trunc(e/t):0;case"%=":return t!==0?e%t:0;case"<<=":return e<<t;case">>=":return e>>t;case"&=":return e&t;case"|=":return e|t;case"^=":return e^t;default:return t}}function XS(e,t){switch(t){case"-":return-e;case"+":return+e;case"!":return e===0?1:0;case"~":return~e;default:return e}}async function YS(e,t){let n=e.state.env.get(t);if(n!==void 0)return n;let r=e.state.env.get(`${t}_0`);return r!==void 0?r:await ke(e,t)}function JS(e){if(!e)return 0;let t=Number.parseInt(e,10);if(!Number.isNaN(t)&&/^-?\d+$/.test(e.trim()))return t;let n=e.trim();if(!n)return 0;try{let r=new pe,{expr:s,pos:i}=on(r,n,0);if(i<n.length){let o=n.slice(i).trim().split(/\s+/)[0];throw new Le(`${n}: syntax error in expression (error token is "${o}")`)}return s.type==="ArithNumber"?s.value:t||0}catch(r){if(r instanceof Le)throw r;let s=n.split(/\s+/).slice(1)[0]||n;throw new Le(`${n}: syntax error in expression (error token is "${s}")`)}}async function Pu(e,t){if(!t)return 0;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&/^-?\d+$/.test(t.trim()))return n;let r=t.trim();if(!r)return 0;let s=new pe,{expr:i,pos:o}=on(s,r,0);if(o<r.length){let a=r.slice(o).trim(),l=a.split(/\s+/)[0]||a;throw new Le(`syntax error in expression (error token is "${l}")`,"","")}return await re(e,i)}async function Du(e,t,n=new Set,r=0){if(r>100)throw new Le("maximum variable indirection depth exceeded");if(n.has(t))return 0;n.add(t);let s=await YS(e,t);if(!s)return 0;let i=Number.parseInt(s,10);if(!Number.isNaN(i)&&/^-?\d+$/.test(s.trim()))return i;let o=s.trim();if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(o))return await Du(e,o,n,r+1);let a=new pe,{expr:l,pos:c}=on(a,o,0);if(c<o.length){let u=o.slice(c).trim(),f=u.split(/\s+/)[0]||u;throw new Le(`${o}: syntax error in expression (error token is "${f}")`)}return await re(e,l)}async function ma(e,t){if(t.startsWith("#")){let f=t.slice(1),p=f.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[[@*]\]$/);if(p){let d=p[1],m=ce(e,d);return String(m.length)}let h=e.state.env.get(f)||"";return String(h.length)}if(t.startsWith("!")){let f=t.slice(1),p=e.state.env.get(f)||"";return e.state.env.get(p)||""}let n=[":-",":=",":?",":+","-","=","?","+"],r=-1,s="";for(let f of n){let p=t.indexOf(f);p>0&&(r===-1||p<r)&&(r=p,s=f)}if(r===-1)return await ke(e,t);let i=t.slice(0,r),o=t.slice(r+s.length),a=e.state.env.get(i),l=a===void 0,c=a==="",u=s.startsWith(":");switch(s){case":-":case"-":return l||u&&c?o:a||"";case":=":case"=":return l||u&&c?(e.state.env.set(i,o),o):a||"";case":+":case"+":return!(l||u&&c)?o:"";case":?":case"?":{if(l||u&&c)throw new Error(o||`${i}: parameter null or not set`);return a||""}default:return a||""}}async function re(e,t,n=!1){switch(t.type){case"ArithNumber":if(Number.isNaN(t.value))throw new Le("value too great for base");return t.value;case"ArithVariable":return await Du(e,t.name);case"ArithSpecialVar":{let s=(await ke(e,t.name)).trim();if(!s)return 0;let i=Number.parseInt(s,10);if(!Number.isNaN(i)&&/^-?\d+$/.test(s))return i;let o=new pe,{expr:a}=on(o,s,0);return await re(e,a)}case"ArithNested":return await re(e,t.expression);case"ArithCommandSubst":{if(e.execFn){let r=await e.execFn(t.command,{signal:e.state.signal});r.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||"")+r.stderr);let s=r.stdout.trim();return Number.parseInt(s,10)||0}return 0}case"ArithBracedExpansion":{let r=await ma(e,t.content);return Number.parseInt(r,10)||0}case"ArithDynamicBase":{let r=await ma(e,t.baseExpr),s=Number.parseInt(r,10);if(s<2||s>64)return 0;let i=`${s}#${t.value}`;return Ai(i)}case"ArithDynamicNumber":{let s=await ma(e,t.prefix)+t.suffix;return Ai(s)}case"ArithArrayElement":{let r=e.state.associativeArrays?.has(t.array),s=async i=>{let o=e.state.env.get(i);return o!==void 0?await Pu(e,o):0};if(t.stringKey!==void 0)return await s(`${t.array}_${t.stringKey}`);if(r&&t.index?.type==="ArithVariable"&&!t.index.hasDollarPrefix)return await s(`${t.array}_${t.index.name}`);if(r&&t.index?.type==="ArithVariable"&&t.index.hasDollarPrefix){let i=await ke(e,t.index.name);return await s(`${t.array}_${i}`)}if(t.index){let i=await re(e,t.index,n);if(i<0){let l=ce(e,t.array),c=e.state.currentLine;if(l.length===0)return e.state.expansionStderr=(e.state.expansionStderr||"")+`bash: line ${c}: ${t.array}: bad array subscript
796
796
  `,0;let f=Math.max(...l.map(([p])=>typeof p=="number"?p:0))+1+i;if(f<0)return e.state.expansionStderr=(e.state.expansionStderr||"")+`bash: line ${c}: ${t.array}: bad array subscript
797
797
  `,0;i=f}let o=`${t.array}_${i}`,a=e.state.env.get(o);if(a!==void 0)return Pu(e,a);if(i===0){let l=e.state.env.get(t.array);if(l!==void 0)return Pu(e,l)}if(e.state.options.nounset&&!Array.from(e.state.env.keys()).some(c=>c===t.array||c.startsWith(`${t.array}_`)))throw new Rt(`${t.array}[${i}]`);return 0}return 0}case"ArithDoubleSubscript":throw new Le("double subscript","","");case"ArithNumberSubscript":throw new Le(`${t.number}${t.errorToken}: syntax error: invalid arithmetic operator (error token is "${t.errorToken}")`);case"ArithSyntaxError":throw new Le(t.message,"","",!0);case"ArithSingleQuote":{if(n)throw new Le(`syntax error: operand expected (error token is "'${t.content}'")`);return t.value}case"ArithBinary":{if(t.operator==="||")return await re(e,t.left,n)||await re(e,t.right,n)?1:0;if(t.operator==="&&")return await re(e,t.left,n)&&await re(e,t.right,n)?1:0;let r=await re(e,t.left,n),s=await re(e,t.right,n);return QS(r,s,t.operator)}case"ArithUnary":{let r=await re(e,t.operand,n);if(t.operator==="++"||t.operator==="--"){if(t.operand.type==="ArithVariable"){let s=t.operand.name,i=Number.parseInt(await ke(e,s),10)||0,o=t.operator==="++"?i+1:i-1;return e.state.env.set(s,String(o)),t.prefix?o:i}if(t.operand.type==="ArithArrayElement"){let s=t.operand.array,i=e.state.associativeArrays?.has(s),o;if(t.operand.stringKey!==void 0)o=`${s}_${t.operand.stringKey}`;else if(i&&t.operand.index?.type==="ArithVariable"&&!t.operand.index.hasDollarPrefix)o=`${s}_${t.operand.index.name}`;else if(i&&t.operand.index?.type==="ArithVariable"&&t.operand.index.hasDollarPrefix){let c=await ke(e,t.operand.index.name);o=`${s}_${c}`}else if(t.operand.index){let c=await re(e,t.operand.index,n);o=`${s}_${c}`}else return r;let a=Number.parseInt(e.state.env.get(o)||"0",10)||0,l=t.operator==="++"?a+1:a-1;return e.state.env.set(o,String(l)),t.prefix?l:a}if(t.operand.type==="ArithConcat"){let s="";for(let i of t.operand.parts)s+=await Ms(e,i,n);if(s&&/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(s)){let i=Number.parseInt(e.state.env.get(s)||"0",10)||0,o=t.operator==="++"?i+1:i-1;return e.state.env.set(s,String(o)),t.prefix?o:i}}if(t.operand.type==="ArithDynamicElement"){let s="";if(t.operand.nameExpr.type==="ArithConcat")for(let i of t.operand.nameExpr.parts)s+=await Ms(e,i,n);else t.operand.nameExpr.type==="ArithVariable"&&(s=t.operand.nameExpr.hasDollarPrefix?await ke(e,t.operand.nameExpr.name):t.operand.nameExpr.name);if(s&&/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(s)){let i=await re(e,t.operand.subscript,n),o=`${s}_${i}`,a=Number.parseInt(e.state.env.get(o)||"0",10)||0,l=t.operator==="++"?a+1:a-1;return e.state.env.set(o,String(l)),t.prefix?l:a}}return r}return XS(r,t.operator)}case"ArithTernary":return await re(e,t.condition,n)?await re(e,t.consequent,n):await re(e,t.alternate,n);case"ArithAssignment":{let r=t.variable,s=r;if(t.stringKey!==void 0)s=`${r}_${t.stringKey}`;else if(t.subscript){let l=e.state.associativeArrays?.has(r);if(l&&t.subscript.type==="ArithVariable"&&!t.subscript.hasDollarPrefix)s=`${r}_${t.subscript.name}`;else if(l&&t.subscript.type==="ArithVariable"&&t.subscript.hasDollarPrefix){let c=await ke(e,t.subscript.name);s=`${r}_${c||"\\"}`}else if(l){let c=await re(e,t.subscript,n);s=`${r}_${c}`}else{let c=await re(e,t.subscript,n);if(c<0){let u=ce(e,r);u.length>0&&(c=Math.max(...u.map(([p])=>typeof p=="number"?p:0))+1+c)}s=`${r}_${c}`}}let i=Number.parseInt(e.state.env.get(s)||"0",10)||0,o=await re(e,t.value,n),a=uy(i,o,t.operator);return e.state.env.set(s,String(a)),a}case"ArithGroup":return await re(e,t.expression,n);case"ArithConcat":{let r="";for(let s of t.parts)r+=await Ms(e,s,n);return/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)?await Du(e,r):Number.parseInt(r,10)||0}case"ArithDynamicAssignment":{let r="";if(t.target.type==="ArithConcat")for(let l of t.target.parts)r+=await Ms(e,l,n);else t.target.type==="ArithVariable"&&(r=t.target.hasDollarPrefix?await ke(e,t.target.name):t.target.name);if(!r||!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r))return 0;let s=r;if(t.subscript){let l=await re(e,t.subscript,n);s=`${r}_${l}`}let i=Number.parseInt(e.state.env.get(s)||"0",10)||0,o=await re(e,t.value,n),a=uy(i,o,t.operator);return e.state.env.set(s,String(a)),a}case"ArithDynamicElement":{let r="";if(t.nameExpr.type==="ArithConcat")for(let a of t.nameExpr.parts)r+=await Ms(e,a,n);else t.nameExpr.type==="ArithVariable"&&(r=t.nameExpr.hasDollarPrefix?await ke(e,t.nameExpr.name):t.nameExpr.name);if(!r||!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r))return 0;let s=await re(e,t.subscript,n),i=`${r}_${s}`,o=e.state.env.get(i);return o!==void 0?JS(o):0}default:return 0}}async function Ms(e,t,n=!1){switch(t.type){case"ArithNumber":return String(t.value);case"ArithSingleQuote":return String(await re(e,t,n));case"ArithVariable":return t.hasDollarPrefix?await ke(e,t.name):t.name;case"ArithSpecialVar":return await ke(e,t.name);case"ArithBracedExpansion":return await ma(e,t.content);case"ArithCommandSubst":return e.execFn?(await e.execFn(t.command,{signal:e.state.signal})).stdout.trim():"0";case"ArithConcat":{let r="";for(let s of t.parts)r+=await Ms(e,s,n);return r}default:return String(await re(e,t,n))}}var Ut=k(()=>{"use strict";Tt();ct();Ae();Bt()});function v7(){throw new Error("node:dns is not available in browser environments")}var k7=k(()=>{"use strict"});Zs();un();var Uc=[{name:"echo",load:async()=>(await Promise.resolve().then(()=>(Mf(),Lf))).echoCommand},{name:"cat",load:async()=>(await Promise.resolve().then(()=>(Wf(),Bf))).catCommand},{name:"printf",load:async()=>(await Promise.resolve().then(()=>(Qf(),Kf))).printfCommand},{name:"ls",load:async()=>(await Promise.resolve().then(()=>(e1(),Jf))).lsCommand},{name:"mkdir",load:async()=>(await Promise.resolve().then(()=>(n1(),t1))).mkdirCommand},{name:"rmdir",load:async()=>(await Promise.resolve().then(()=>(o1(),i1))).rmdirCommand},{name:"touch",load:async()=>(await Promise.resolve().then(()=>(l1(),a1))).touchCommand},{name:"rm",load:async()=>(await Promise.resolve().then(()=>(u1(),c1))).rmCommand},{name:"cp",load:async()=>(await Promise.resolve().then(()=>(p1(),f1))).cpCommand},{name:"mv",load:async()=>(await Promise.resolve().then(()=>(d1(),h1))).mvCommand},{name:"ln",load:async()=>(await Promise.resolve().then(()=>(g1(),m1))).lnCommand},{name:"chmod",load:async()=>(await Promise.resolve().then(()=>(b1(),w1))).chmodCommand},{name:"pwd",load:async()=>(await Promise.resolve().then(()=>(E1(),x1))).pwdCommand},{name:"readlink",load:async()=>(await Promise.resolve().then(()=>(S1(),A1))).readlinkCommand},{name:"head",load:async()=>(await Promise.resolve().then(()=>(N1(),k1))).headCommand},{name:"tail",load:async()=>(await Promise.resolve().then(()=>($1(),I1))).tailCommand},{name:"wc",load:async()=>(await Promise.resolve().then(()=>(R1(),O1))).wcCommand},{name:"stat",load:async()=>(await Promise.resolve().then(()=>(D1(),P1))).statCommand},{name:"grep",load:async()=>(await Promise.resolve().then(()=>(Ji(),Yi))).grepCommand},{name:"fgrep",load:async()=>(await Promise.resolve().then(()=>(Ji(),Yi))).fgrepCommand},{name:"egrep",load:async()=>(await Promise.resolve().then(()=>(Ji(),Yi))).egrepCommand},{name:"rg",load:async()=>(await Promise.resolve().then(()=>(Np(),kp))).rgCommand},{name:"sed",load:async()=>(await Promise.resolve().then(()=>(Up(),Mp))).sedCommand},{name:"awk",load:async()=>(await Promise.resolve().then(()=>(wh(),yh))).awkCommand2},{name:"sort",load:async()=>(await Promise.resolve().then(()=>(Ih(),Nh))).sortCommand},{name:"uniq",load:async()=>(await Promise.resolve().then(()=>(Th(),$h))).uniqCommand},{name:"comm",load:async()=>(await Promise.resolve().then(()=>(Rh(),Oh))).commCommand},{name:"cut",load:async()=>(await Promise.resolve().then(()=>(Dh(),Ph))).cutCommand},{name:"paste",load:async()=>(await Promise.resolve().then(()=>(Lh(),Fh))).pasteCommand},{name:"tr",load:async()=>(await Promise.resolve().then(()=>(Bh(),Uh))).trCommand},{name:"rev",load:async()=>(await Promise.resolve().then(()=>(zh(),Wh))).rev},{name:"nl",load:async()=>(await Promise.resolve().then(()=>(Gh(),jh))).nl},{name:"fold",load:async()=>(await Promise.resolve().then(()=>(Zh(),qh))).fold},{name:"expand",load:async()=>(await Promise.resolve().then(()=>(Xh(),Qh))).expand},{name:"unexpand",load:async()=>(await Promise.resolve().then(()=>(td(),ed))).unexpand},{name:"strings",load:async()=>(await Promise.resolve().then(()=>(id(),sd))).strings},{name:"split",load:async()=>(await Promise.resolve().then(()=>(cd(),ld))).split},{name:"column",load:async()=>(await Promise.resolve().then(()=>(pd(),fd))).column},{name:"join",load:async()=>(await Promise.resolve().then(()=>(dd(),hd))).join},{name:"tee",load:async()=>(await Promise.resolve().then(()=>(gd(),md))).teeCommand},{name:"find",load:async()=>(await Promise.resolve().then(()=>(vd(),Cd))).findCommand},{name:"basename",load:async()=>(await Promise.resolve().then(()=>(Nd(),kd))).basenameCommand},{name:"dirname",load:async()=>(await Promise.resolve().then(()=>($d(),Id))).dirnameCommand},{name:"tree",load:async()=>(await Promise.resolve().then(()=>(Rd(),Od))).treeCommand},{name:"du",load:async()=>(await Promise.resolve().then(()=>(_d(),Dd))).duCommand},{name:"env",load:async()=>(await Promise.resolve().then(()=>(Vl(),Gl))).envCommand},{name:"printenv",load:async()=>(await Promise.resolve().then(()=>(Vl(),Gl))).printenvCommand},{name:"alias",load:async()=>(await Promise.resolve().then(()=>(Zl(),ql))).aliasCommand},{name:"unalias",load:async()=>(await Promise.resolve().then(()=>(Zl(),ql))).unaliasCommand},{name:"history",load:async()=>(await Promise.resolve().then(()=>(Md(),Ld))).historyCommand},{name:"xargs",load:async()=>(await Promise.resolve().then(()=>(Bd(),Ud))).xargsCommand},{name:"true",load:async()=>(await Promise.resolve().then(()=>(Ql(),Kl))).trueCommand},{name:"false",load:async()=>(await Promise.resolve().then(()=>(Ql(),Kl))).falseCommand},{name:"clear",load:async()=>(await Promise.resolve().then(()=>(zd(),Wd))).clearCommand},{name:"bash",load:async()=>(await Promise.resolve().then(()=>(Yl(),Xl))).bashCommand},{name:"sh",load:async()=>(await Promise.resolve().then(()=>(Yl(),Xl))).shCommand},{name:"jq",load:async()=>(await Promise.resolve().then(()=>(gm(),mm))).jqCommand},{name:"base64",load:async()=>(await Promise.resolve().then(()=>(bm(),wm))).base64Command},{name:"diff",load:async()=>(await Promise.resolve().then(()=>(Am(),Em))).diffCommand},{name:"date",load:async()=>(await Promise.resolve().then(()=>(Cm(),Sm))).dateCommand},{name:"sleep",load:async()=>(await Promise.resolve().then(()=>(Nm(),km))).sleepCommand},{name:"timeout",load:async()=>(await Promise.resolve().then(()=>($m(),Im))).timeoutCommand},{name:"time",load:async()=>(await Promise.resolve().then(()=>(Om(),Tm))).timeCommand},{name:"seq",load:async()=>(await Promise.resolve().then(()=>(Pm(),Rm))).seqCommand},{name:"expr",load:async()=>(await Promise.resolve().then(()=>(_m(),Dm))).exprCommand},{name:"md5sum",load:async()=>(await Promise.resolve().then(()=>(Mm(),Lm))).md5sumCommand},{name:"sha1sum",load:async()=>(await Promise.resolve().then(()=>(Bm(),Um))).sha1sumCommand},{name:"sha256sum",load:async()=>(await Promise.resolve().then(()=>(zm(),Wm))).sha256sumCommand},{name:"file",load:async()=>(await Promise.resolve().then(()=>(V0(),G0))).fileCommand},{name:"html-to-markdown",load:async()=>(await Promise.resolve().then(()=>(Z0(),q0))).htmlToMarkdownCommand},{name:"help",load:async()=>(await Promise.resolve().then(()=>(Q0(),K0))).helpCommand},{name:"which",load:async()=>(await Promise.resolve().then(()=>(Y0(),X0))).whichCommand},{name:"tac",load:async()=>(await Promise.resolve().then(()=>(e2(),J0))).tac},{name:"hostname",load:async()=>(await Promise.resolve().then(()=>(n2(),t2))).hostname},{name:"whoami",load:async()=>(await Promise.resolve().then(()=>(s2(),r2))).whoami},{name:"od",load:async()=>(await Promise.resolve().then(()=>(o2(),i2))).od},{name:"gzip",load:async()=>(await Promise.resolve().then(()=>(jo(),Ho))).gzipCommand},{name:"gunzip",load:async()=>(await Promise.resolve().then(()=>(jo(),Ho))).gunzipCommand},{name:"zcat",load:async()=>(await Promise.resolve().then(()=>(jo(),Ho))).zcatCommand}],AA=[],SA=[],v2=[{name:"curl",load:async()=>(await Promise.resolve().then(()=>(S2(),A2))).curlCommand}],C2=new Map;function Vo(e){return{name:e.name,async execute(t,n){let r=C2.get(e.name);return r||(r=await Et.runTrustedAsync(()=>e.load()),C2.set(e.name,r)),n.coverage,r.execute(t,n)}}}function CA(){return Uc.map(e=>e.name)}function vA(){return v2.map(e=>e.name)}function k2(e){return(e?Uc.filter(n=>e.includes(n.name)):Uc).map(Vo)}function N2(){return v2.map(Vo)}function I2(){return AA.map(Vo)}function $2(){return SA.map(Vo)}function T2(e){return"load"in e&&typeof e.load=="function"}function kA(e,t){return{name:e,trusted:!0,execute:t}}function O2(e){let t=null;return{name:e.name,trusted:!0,async execute(n,r){return t||(t=await e.load()),t.execute(n,r)}}}he();he();Pc();function Ne(e){if(!e||e==="/")return"/";let t=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;t.startsWith("/")||(t=`/${t}`);let n=t.split("/").filter(s=>s&&s!=="."),r=[];for(let s of n)s===".."?r.pop():r.push(s);return`/${r.join("/")}`||"/"}function lt(e,t){if(e.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${e}'`)}function qo(e){let t=Ne(e);if(t==="/")return"/";let n=t.lastIndexOf("/");return n===0?"/":t.slice(0,n)}function Zo(e,t){if(t.startsWith("/"))return Ne(t);let n=e==="/"?`/${t}`:`${e}/${t}`;return Ne(n)}function hr(e,t){return e==="/"?`/${t}`:`${e}/${t}`}function Ko(e,t){if(t.startsWith("/"))return Ne(t);let n=qo(e);return Ne(hr(n,t))}var Ts=new TextEncoder;function IA(e){return typeof e=="object"&&e!==null&&!(e instanceof Uint8Array)&&"content"in e}var rr=class{data=new Map;constructor(t){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),t)for(let[n,r]of Object.entries(t))typeof r=="function"?this.writeFileLazy(n,r):IA(r)?this.writeFileSync(n,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(n,r)}ensureParentDirs(t){let n=qo(t);n!=="/"&&(this.data.has(n)||(this.ensureParentDirs(n),this.data.set(n,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(t,n,r,s){lt(t,"write");let i=Ne(t);this.ensureParentDirs(i);let o=Go(r),a=Rc(n,o);this.data.set(i,{type:"file",content:a,mode:s?.mode??420,mtime:s?.mtime??new Date})}writeFileLazy(t,n,r){lt(t,"write");let s=Ne(t);this.ensureParentDirs(s),this.data.set(s,{type:"file",lazy:n,mode:r?.mode??420,mtime:r?.mtime??new Date})}async materializeLazy(t,n){let r=await n.lazy(),i={type:"file",content:typeof r=="string"?Ts.encode(r):r,mode:n.mode,mtime:n.mtime};return this.data.set(t,i),i}async readFile(t,n){let r=await this.readFileBuffer(t),s=Go(n);return Ei(r,s)}async readFileBytes(t){let n=await this.readFileBuffer(t);return Ei(n,"binary")}async readFileBuffer(t){lt(t,"open");let n=this.resolvePathWithSymlinks(t),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);if("lazy"in r){let s=await this.materializeLazy(n,r);return s.content instanceof Uint8Array?s.content:Ts.encode(s.content)}return r.content instanceof Uint8Array?r.content:Ts.encode(r.content)}async writeFile(t,n,r){this.writeFileSync(t,n,r)}async appendFile(t,n,r){lt(t,"append");let s=Ne(t),i=this.data.get(s);if(i&&i.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${t}'`);let o=Go(r),a=Rc(n,o);if(i?.type==="file"){let l=i;"lazy"in l&&(l=await this.materializeLazy(s,l));let c="content"in l&&l.content instanceof Uint8Array?l.content:Ts.encode("content"in l?l.content:""),u=new Uint8Array(c.length+a.length);u.set(c),u.set(a,c.length),this.data.set(s,{type:"file",content:u,mode:l.mode,mtime:new Date})}else this.writeFileSync(t,n,r)}async exists(t){if(t.includes("\0"))return!1;try{let n=this.resolvePathWithSymlinks(t);return this.data.has(n)}catch{return!1}}async stat(t){lt(t,"stat");let n=this.resolvePathWithSymlinks(t),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${t}'`);r.type==="file"&&"lazy"in r&&(r=await this.materializeLazy(n,r));let s=0;return r.type==="file"&&"content"in r&&r.content&&(r.content instanceof Uint8Array?s=r.content.length:s=Ts.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:s,mtime:r.mtime||new Date}}async lstat(t){lt(t,"lstat");let n=this.resolveIntermediateSymlinks(t),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${t}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};r.type==="file"&&"lazy"in r&&(r=await this.materializeLazy(n,r));let s=0;return r.type==="file"&&"content"in r&&r.content&&(r.content instanceof Uint8Array?s=r.content.length:s=Ts.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:s,mtime:r.mtime||new Date}}resolveIntermediateSymlinks(t){let n=Ne(t);if(n==="/")return"/";let r=n.slice(1).split("/");if(r.length<=1)return n;let s="",i=new Set;for(let o=0;o<r.length-1;o++){let a=r[o];s=`${s}/${a}`;let l=this.data.get(s),c=0,u=40;for(;l&&l.type==="symlink"&&c<u;){if(i.has(s))throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`);i.add(s),s=Ko(s,l.target),l=this.data.get(s),c++}if(c>=u)throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`)}return`${s}/${r[r.length-1]}`}resolvePathWithSymlinks(t){let n=Ne(t);if(n==="/")return"/";let r=n.slice(1).split("/"),s="",i=new Set;for(let o of r){s=`${s}/${o}`;let a=this.data.get(s),l=0,c=40;for(;a&&a.type==="symlink"&&l<c;){if(i.has(s))throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`);i.add(s),s=Ko(s,a.target),a=this.data.get(s),l++}if(l>=c)throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`)}return s}async mkdir(t,n){this.mkdirSync(t,n)}mkdirSync(t,n){lt(t,"mkdir");let r=Ne(t);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${t}'`);if(!n?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${t}'`);return}let s=qo(r);if(s!=="/"&&!this.data.has(s))if(n?.recursive)this.mkdirSync(s,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${t}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(t){return(await this.readdirWithFileTypes(t)).map(r=>r.name)}async readdirWithFileTypes(t){lt(t,"scandir");let n=Ne(t),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);let s=new Set;for(;r&&r.type==="symlink";){if(s.has(n))throw new Error(`ELOOP: too many levels of symbolic links, scandir '${t}'`);s.add(n),n=Ko(n,r.target),r=this.data.get(n)}if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${t}'`);let i=n==="/"?"/":`${n}/`,o=new Map;for(let[a,l]of this.data.entries())if(a!==n&&a.startsWith(i)){let c=a.slice(i.length),u=c.split("/")[0];u&&!c.includes("/",u.length)&&!o.has(u)&&o.set(u,{name:u,isFile:l.type==="file",isDirectory:l.type==="directory",isSymbolicLink:l.type==="symlink"})}return Array.from(o.values()).sort((a,l)=>a.name<l.name?-1:a.name>l.name?1:0)}async rm(t,n){lt(t,"rm");let r=Ne(t),s=this.data.get(r);if(!s){if(n?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${t}'`)}if(s.type==="directory"){let i=await this.readdir(r);if(i.length>0){if(!n?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${t}'`);for(let o of i){let a=hr(r,o);await this.rm(a,n)}}}this.data.delete(r)}async cp(t,n,r){lt(t,"cp"),lt(n,"cp");let s=Ne(t),i=Ne(n),o=this.data.get(s);if(!o)throw new Error(`ENOENT: no such file or directory, cp '${t}'`);if(o.type==="file")if(this.ensureParentDirs(i),"content"in o){let a=o.content instanceof Uint8Array?new Uint8Array(o.content):o.content;this.data.set(i,{...o,content:a})}else this.data.set(i,{...o});else if(o.type==="symlink")this.ensureParentDirs(i),this.data.set(i,{...o});else if(o.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${t}'`);await this.mkdir(i,{recursive:!0});let a=await this.readdir(s);for(let l of a){let c=hr(s,l),u=hr(i,l);await this.cp(c,u,r)}}}async mv(t,n){await this.cp(t,n,{recursive:!0}),await this.rm(t,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(t,n){return Zo(t,n)}async chmod(t,n){lt(t,"chmod");let r=Ne(t),s=this.data.get(r);if(!s)throw new Error(`ENOENT: no such file or directory, chmod '${t}'`);s.mode=n}async symlink(t,n){lt(n,"symlink");let r=Ne(n);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${n}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:t,mode:511,mtime:new Date})}async link(t,n){lt(t,"link"),lt(n,"link");let r=Ne(t),s=Ne(n),i=this.data.get(r);if(!i)throw new Error(`ENOENT: no such file or directory, link '${t}'`);if(i.type!=="file")throw new Error(`EPERM: operation not permitted, link '${t}'`);if(this.data.has(s))throw new Error(`EEXIST: file already exists, link '${n}'`);let o=i;"lazy"in o&&(o=await this.materializeLazy(r,o)),this.ensureParentDirs(s),this.data.set(s,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(t){lt(t,"readlink");let n=Ne(t),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${t}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${t}'`);return r.target}async realpath(t){lt(t,"realpath");let n=this.resolvePathWithSymlinks(t);if(!this.data.has(n))throw new Error(`ENOENT: no such file or directory, realpath '${t}'`);return n}async utimes(t,n,r){lt(t,"utimes");let s=Ne(t),i=this.resolvePathWithSymlinks(s),o=this.data.get(i);if(!o)throw new Error(`ENOENT: no such file or directory, utimes '${t}'`);o.mtime=r}};Wc();function $A(e){let t=e;return typeof t.mkdirSync=="function"&&typeof t.writeFileSync=="function"}function TA(e,t){e.mkdirSync("/bin",{recursive:!0}),e.mkdirSync("/usr/bin",{recursive:!0}),t&&(e.mkdirSync("/home/user",{recursive:!0}),e.mkdirSync("/tmp",{recursive:!0}))}function OA(e){e.mkdirSync("/dev",{recursive:!0}),e.writeFileSync("/dev/null",""),e.writeFileSync("/dev/zero",new Uint8Array(0)),e.writeFileSync("/dev/stdin",""),e.writeFileSync("/dev/stdout",""),e.writeFileSync("/dev/stderr","")}function RA(e,t){e.mkdirSync("/proc/self/fd",{recursive:!0}),e.writeFileSync("/proc/version",`${_2}
798
798
  `),e.writeFileSync("/proc/self/exe","/bin/bash"),e.writeFileSync("/proc/self/cmdline","bash\0"),e.writeFileSync("/proc/self/comm",`bash
@@ -842,7 +842,7 @@ Gid: ${s} ${s} ${s} ${s}
842
842
  `,2);f=t[x]}else if(S==="-C"){if(x++,x>=t.length)return W(`compgen: -C: option requires an argument
843
843
  `,2);p=t[x]}else if(S==="-X"){if(x++,x>=t.length)return W(`compgen: -X: option requires an argument
844
844
  `,2);u=t[x]}else if(S==="-G"){if(x++,x>=t.length)return W(`compgen: -G: option requires an argument
845
- `,2)}else if(S==="--"){h.push(...t.slice(x+1));break}else S.startsWith("-")||h.push(S)}o=h[0]??null;let m=[];if(l){let x=await zu(e,o);m.push(...x)}if(c){let x=await $y(e,o);m.push(...x)}for(let x of n)if(x==="variable"){let S=yC(e,o);m.push(...S)}else if(x==="export"){let S=wC(e,o);m.push(...S)}else if(x==="function"){let S=bC(e,o);m.push(...S)}else if(x==="builtin"){let S=xC(o);m.push(...S)}else if(x==="keyword"){let S=EC(o);m.push(...S)}else if(x==="alias"){let S=AC(e,o);m.push(...S)}else if(x==="shopt"){let S=SC(o);m.push(...S)}else if(x==="helptopic"){let S=CC(o);m.push(...S)}else if(x==="directory"){let S=await zu(e,o);m.push(...S)}else if(x==="file"){let S=await $y(e,o);m.push(...S)}else if(x==="user"){let S=vC(o);m.push(...S)}else if(x==="command"){let S=await kC(e,o);m.push(...S)}if(r!==null)try{let x=await NC(e,r),S=IC(e,x);for(let v of S)(o===null||v.startsWith(o))&&m.push(v)}catch{return z("","",1)}if(a){let x=await zu(e,o);for(let S of x)m.includes(S)||m.push(S)}let g="";if(f!==null){let x=e.state.functions.get(f);if(x){let S=new Map;S.set("COMP_WORDS__length",e.state.env.get("COMP_WORDS__length")),e.state.env.set("COMP_WORDS__length","0"),S.set("COMP_CWORD",e.state.env.get("COMP_CWORD")),e.state.env.set("COMP_CWORD","-1"),S.set("COMP_LINE",e.state.env.get("COMP_LINE")),e.state.env.set("COMP_LINE",""),S.set("COMP_POINT",e.state.env.get("COMP_POINT")),e.state.env.set("COMP_POINT","0");let v=new Map;for(let _ of e.state.env.keys())(_==="COMPREPLY"||_.startsWith("COMPREPLY_")||_==="COMPREPLY__length")&&(v.set(_,e.state.env.get(_)),e.state.env.delete(_));let $=["compgen",h[0]??"",""];try{let _=await Oa(e,x,$,"");if(_.exitCode!==0)return zs(e,S),zs(e,v),z("",_.stderr,1);g=_.stdout;let R=$C(e);m.push(...R)}catch{return zs(e,S),zs(e,v),z("","",1)}zs(e,S),zs(e,v)}}if(p!==null)try{let x=Nn(p),S=await e.executeScript(x);if(S.exitCode!==0)return z("",S.stderr,S.exitCode);if(S.stdout){let v=S.stdout.split(`
845
+ `,2)}else if(S==="--"){h.push(...t.slice(x+1));break}else S.startsWith("-")||h.push(S)}o=h[0]??null;let m=[];if(l){let x=await zu(e,o);m.push(...x)}if(c){let x=await $y(e,o);m.push(...x)}for(let x of n)if(x==="variable"){let S=yC(e,o);m.push(...S)}else if(x==="export"){let S=wC(e,o);m.push(...S)}else if(x==="function"){let S=bC(e,o);m.push(...S)}else if(x==="builtin"){let S=xC(o);m.push(...S)}else if(x==="keyword"){let S=EC(o);m.push(...S)}else if(x==="alias"){let S=AC(e,o);m.push(...S)}else if(x==="shopt"){let S=SC(o);m.push(...S)}else if(x==="helptopic"){let S=CC(o);m.push(...S)}else if(x==="directory"){let S=await zu(e,o);m.push(...S)}else if(x==="file"){let S=await $y(e,o);m.push(...S)}else if(x==="user"){let S=vC(o);m.push(...S)}else if(x==="command"){let S=await kC(e,o);m.push(...S)}if(r!==null)try{let x=await NC(e,r),S=IC(e,x);for(let v of S)(o===null||v.startsWith(o))&&m.push(v)}catch{return z("","",1)}if(a){let x=await zu(e,o);for(let S of x)m.includes(S)||m.push(S)}let g="";if(f!==null){let x=e.state.functions.get(f);if(x){let S=new Map;S.set("COMP_WORDS__length",e.state.env.get("COMP_WORDS__length")),e.state.env.set("COMP_WORDS__length","0"),S.set("COMP_CWORD",e.state.env.get("COMP_CWORD")),e.state.env.set("COMP_CWORD","-1"),S.set("COMP_LINE",e.state.env.get("COMP_LINE")),e.state.env.set("COMP_LINE",""),S.set("COMP_POINT",e.state.env.get("COMP_POINT")),e.state.env.set("COMP_POINT","0");let v=new Map;for(let D of e.state.env.keys())(D==="COMPREPLY"||D.startsWith("COMPREPLY_")||D==="COMPREPLY__length")&&(v.set(D,e.state.env.get(D)),e.state.env.delete(D));let $=["compgen",h[0]??"",""];try{let D=await Oa(e,x,$,"");if(D.exitCode!==0)return zs(e,S),zs(e,v),z("",D.stderr,1);g=D.stdout;let O=$C(e);m.push(...O)}catch{return zs(e,S),zs(e,v),z("","",1)}zs(e,S),zs(e,v)}}if(p!==null)try{let x=Nn(p),S=await e.executeScript(x);if(S.exitCode!==0)return z("",S.stderr,S.exitCode);if(S.stdout){let v=S.stdout.split(`
846
846
  `);for(let $ of v)$.length>0&&m.push($)}}catch(x){if(x.name==="ParseException")return W(`compgen: -C: ${x.message}
847
847
  `,2);throw x}let y=m;if(u!==null){let x=u.startsWith("!"),S=x?u.slice(1):u;y=m.filter(v=>{let $=Us(v,S,!1,!0);return x?$:!$})}if(y.length===0&&o!==null)return z(g,"",1);let w=y.map(x=>`${s}${x}${i}`).join(`
848
848
  `),b=g+(w?`${w}
@@ -888,21 +888,21 @@ Gid: ${s} ${s} ${s} ${s}
888
888
  `}}return Ee(t)}function Fy(e){let t="",n=new Set;for(let s of e.state.env.keys()){if(s.startsWith("BASH_"))continue;if(s.endsWith("__length")){let o=s.slice(0,-8);e.state.associativeArrays?.has(o)||n.add(o);continue}let i=s.lastIndexOf("_");if(i>0){let o=s.slice(0,i),a=s.slice(i+1);/^\d+$/.test(a)&&(e.state.associativeArrays?.has(o)||n.add(o))}}let r=Array.from(n).sort();for(let s of r){let i=ut(e,s);if(i.length===0)t+=`declare -a ${s}=()
889
889
  `;else{let o=i.map(a=>{let l=e.state.env.get(`${s}_${a}`)??"";return`[${a}]=${Xr(l)}`});t+=`declare -a ${s}=(${o.join(" ")})
890
890
  `}}return Ee(t)}function Ly(e){let t="",n=new Set;for(let s of e.state.env.keys()){if(s.startsWith("BASH_"))continue;if(s.endsWith("__length")){let o=s.slice(0,-8);n.add(o);continue}let i=s.lastIndexOf("_");if(i>0){let o=s.slice(0,i),a=s.slice(i+1);if(/^\d+$/.test(a)||e.state.associativeArrays?.has(o)){n.add(o);continue}}n.add(s)}let r=Array.from(n).sort();for(let s of r){if(e.state.associativeArrays?.has(s)||ut(e,s).length>0||e.state.env.has(`${s}__length`))continue;let a=e.state.env.get(s);a!==void 0&&(t+=`${s}=${Ra(a)}
891
- `)}return Ee(t)}function Ju(e,t){e.state.integerVars??=new Set,e.state.integerVars.add(t)}function Oi(e,t){return e.state.integerVars?.has(t)??!1}function ef(e,t){e.state.lowercaseVars??=new Set,e.state.lowercaseVars.add(t),e.state.uppercaseVars?.delete(t)}function OC(e,t){return e.state.lowercaseVars?.has(t)??!1}function tf(e,t){e.state.uppercaseVars??=new Set,e.state.uppercaseVars.add(t),e.state.lowercaseVars?.delete(t)}function RC(e,t){return e.state.uppercaseVars?.has(t)??!1}function Hs(e,t,n){return OC(e,t)?n.toLowerCase():RC(e,t)?n.toUpperCase():n}async function My(e,t){try{let n=new pe,r=Ie(n,t),s=await re(e,r.expression);return String(s)}catch{return"0"}}function PC(e){let t=e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(!t)return null;let n=t[0],r=n.length;if(e[r]!=="[")return null;let s=0,i=r+1;for(;r<e.length;r++)if(e[r]==="[")s++;else if(e[r]==="]"&&(s--,s===0))break;if(s!==0)return null;let o=e.slice(i,r);if(r++,e[r]!=="=")return null;r++;let a=e.slice(r);return{name:n,indexExpr:o,value:a}}async function nf(e,t){let n=!1,r=!1,s=!1,i=!1,o=!1,a=!1,l=!1,c=!1,u=!1,f=!1,p=!1,h=!1,d=!1,m=!1,g=!1,y=[];for(let R=0;R<t.length;R++){let P=t[R];if(P==="-a")n=!0;else if(P==="-A")r=!0;else if(P==="-r")s=!0;else if(P==="-x")i=!0;else if(P==="-p")o=!0;else if(P==="-n")a=!0;else if(P==="+n")l=!0;else if(P==="+a")c=!0;else if(P==="+x")u=!0;else if(P==="--"){y.push(...t.slice(R+1));break}else if(P.startsWith("+")){for(let C of P.slice(1))if(C==="n")l=!0;else if(C==="a")c=!0;else if(C==="x")u=!0;else if(C!=="r"){if(C!=="i"){if(!(C==="f"||C==="F"))return z("",`bash: typeset: +${C}: invalid option
891
+ `)}return Ee(t)}function Ju(e,t){e.state.integerVars??=new Set,e.state.integerVars.add(t)}function Oi(e,t){return e.state.integerVars?.has(t)??!1}function ef(e,t){e.state.lowercaseVars??=new Set,e.state.lowercaseVars.add(t),e.state.uppercaseVars?.delete(t)}function OC(e,t){return e.state.lowercaseVars?.has(t)??!1}function tf(e,t){e.state.uppercaseVars??=new Set,e.state.uppercaseVars.add(t),e.state.lowercaseVars?.delete(t)}function RC(e,t){return e.state.uppercaseVars?.has(t)??!1}function Hs(e,t,n){return OC(e,t)?n.toLowerCase():RC(e,t)?n.toUpperCase():n}async function My(e,t){try{let n=new pe,r=Ie(n,t),s=await re(e,r.expression);return String(s)}catch{return"0"}}function PC(e){let t=e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(!t)return null;let n=t[0],r=n.length;if(e[r]!=="[")return null;let s=0,i=r+1;for(;r<e.length;r++)if(e[r]==="[")s++;else if(e[r]==="]"&&(s--,s===0))break;if(s!==0)return null;let o=e.slice(i,r);if(r++,e[r]!=="=")return null;r++;let a=e.slice(r);return{name:n,indexExpr:o,value:a}}async function nf(e,t){let n=!1,r=!1,s=!1,i=!1,o=!1,a=!1,l=!1,c=!1,u=!1,f=!1,p=!1,h=!1,d=!1,m=!1,g=!1,y=[];for(let O=0;O<t.length;O++){let P=t[O];if(P==="-a")n=!0;else if(P==="-A")r=!0;else if(P==="-r")s=!0;else if(P==="-x")i=!0;else if(P==="-p")o=!0;else if(P==="-n")a=!0;else if(P==="+n")l=!0;else if(P==="+a")c=!0;else if(P==="+x")u=!0;else if(P==="--"){y.push(...t.slice(O+1));break}else if(P.startsWith("+")){for(let C of P.slice(1))if(C==="n")l=!0;else if(C==="a")c=!0;else if(C==="x")u=!0;else if(C!=="r"){if(C!=="i"){if(!(C==="f"||C==="F"))return z("",`bash: typeset: +${C}: invalid option
892
892
  `,2)}}}else if(P==="-i")f=!0;else if(P==="-l")p=!0;else if(P==="-u")h=!0;else if(P==="-f")d=!0;else if(P==="-F")m=!0;else if(P==="-g")g=!0;else if(P.startsWith("-"))for(let C of P.slice(1))if(C==="a")n=!0;else if(C==="A")r=!0;else if(C==="r")s=!0;else if(C==="x")i=!0;else if(C==="p")o=!0;else if(C==="n")a=!0;else if(C==="i")f=!0;else if(C==="l")p=!0;else if(C==="u")h=!0;else if(C==="f")d=!0;else if(C==="F")m=!0;else if(C==="g")g=!0;else return z("",`bash: typeset: -${C}: invalid option
893
- `,2);else y.push(P)}let b=e.state.localScopes.length>0&&!g,x=R=>{if(!b)return;let P=e.state.localScopes[e.state.localScopes.length-1];P.has(R)||P.set(R,e.state.env.get(R))},S=R=>{if(!b)return;let P=e.state.localScopes[e.state.localScopes.length-1];P.has(R)||P.set(R,e.state.env.get(R));let C=`${R}_`;for(let O of e.state.env.keys())O.startsWith(C)&&!O.includes("__")&&(P.has(O)||P.set(O,e.state.env.get(O)));let T=`${R}__length`;e.state.env.has(T)&&!P.has(T)&&P.set(T,e.state.env.get(T))},v=R=>{b&&Cr(e,R)};if(m){if(y.length===0){let C=Array.from(e.state.functions.keys()).sort(),T="";for(let O of C)T+=`declare -f ${O}
894
- `;return Ee(T)}let R=!0,P="";for(let C of y)e.state.functions.has(C)?P+=`${C}
895
- `:R=!1;return z(P,"",R?0:1)}if(d){if(y.length===0){let P="",C=Array.from(e.state.functions.keys()).sort();for(let T of C)P+=`${T} ()
893
+ `,2);else y.push(P)}let b=e.state.localScopes.length>0&&!g,x=O=>{if(!b)return;let P=e.state.localScopes[e.state.localScopes.length-1];P.has(O)||P.set(O,e.state.env.get(O))},S=O=>{if(!b)return;let P=e.state.localScopes[e.state.localScopes.length-1];P.has(O)||P.set(O,e.state.env.get(O));let C=`${O}_`;for(let R of e.state.env.keys())R.startsWith(C)&&!R.includes("__")&&(P.has(R)||P.set(R,e.state.env.get(R)));let T=`${O}__length`;e.state.env.has(T)&&!P.has(T)&&P.set(T,e.state.env.get(T))},v=O=>{b&&Cr(e,O)};if(m){if(y.length===0){let C=Array.from(e.state.functions.keys()).sort(),T="";for(let R of C)T+=`declare -f ${R}
894
+ `;return Ee(T)}let O=!0,P="";for(let C of y)e.state.functions.has(C)?P+=`${C}
895
+ `:O=!1;return z(P,"",O?0:1)}if(d){if(y.length===0){let P="",C=Array.from(e.state.functions.keys()).sort();for(let T of C)P+=`${T} ()
896
896
  {
897
897
  # function body
898
898
  }
899
- `;return Ee(P)}let R=!0;for(let P of y)e.state.functions.has(P)||(R=!1);return z("","",R?0:1)}if(o&&y.length>0)return Py(e,y);if(o&&y.length===0)return Dy(e,{filterExport:i,filterReadonly:s,filterNameref:a,filterIndexedArray:n,filterAssocArray:r});if(y.length===0&&r&&!o)return _y(e);if(y.length===0&&n&&!o)return Fy(e);if(y.length===0&&!o)return Ly(e);let $="",_=0;for(let R of y){let P=R.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\((.*)\)$/s);if(P&&!c){let I=P[1],L=P[2];if(r&&ut(e,I).length>0){$+=`bash: declare: ${I}: cannot convert indexed to associative array
900
- `,_=1;continue}if((n||!r&&!n)&&e.state.associativeArrays?.has(I)){$+=`bash: declare: ${I}: cannot convert associative to indexed array
901
- `,_=1;continue}if(S(I),r&&(e.state.associativeArrays??=new Set,e.state.associativeArrays.add(I)),Vn(e,I),e.state.env.delete(I),e.state.env.delete(`${I}__length`),r&&L.includes("[")){let B=Na(L);for(let[Z,ae]of B){let ye=st(e,ae);e.state.env.set(`${I}_${Z}`,ye)}}else if(r){let B=Qn(L);for(let Z=0;Z<B.length;Z+=2){let ae=B[Z],ye=Z+1<B.length?st(e,B[Z+1]):"";e.state.env.set(`${I}_${ae}`,ye)}}else{let B=Qn(L);if(B.some(ae=>/^\[[^\]]+\]=/.test(ae))){let ae=0;for(let ye of B){let q=ye.match(/^\[([^\]]+)\]=(.*)$/);if(q){let H=q[1],te=q[2],ve=st(e,te),ie;if(/^-?\d+$/.test(H))ie=Number.parseInt(H,10);else try{let Pe=new pe,j=Ie(Pe,H);ie=await re(e,j.expression)}catch{ie=0}e.state.env.set(`${I}_${ie}`,ve),ae=ie+1}else{let H=st(e,ye);e.state.env.set(`${I}_${ae}`,H),ae++}}}else{for(let ae=0;ae<B.length;ae++)e.state.env.set(`${I}_${ae}`,B[ae]);e.state.env.set(`${I}__length`,String(B.length))}}v(I),s&&Jt(e,I),i&&On(e,I);continue}if(l){let I=R.includes("=")?R.slice(0,R.indexOf("=")):R;if(Mg(e,I),!R.includes("="))continue}if(u){let I=R.includes("=")?R.slice(0,R.indexOf("=")):R;if(la(e,I),!R.includes("="))continue}let C=PC(R);if(C){let{name:I,indexExpr:L,value:B}=C,Z=bt(e,I);if(Z)return Z;S(I);let ae;try{let q=new pe,H=Ie(q,L);ae=await re(e,H.expression)}catch{let q=parseInt(L,10);ae=Number.isNaN(q)?0:q}e.state.env.set(`${I}_${ae}`,B);let ye=parseInt(e.state.env.get(`${I}__length`)??"0",10);ae>=ye&&e.state.env.set(`${I}__length`,String(ae+1)),v(I),s&&Jt(e,I),i&&On(e,I);continue}let T=R.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=\((.*)\)$/s);if(T&&!c){let I=T[1],L=T[2],B=bt(e,I);if(B)return B;S(I);let Z=Qn(L);if(e.state.associativeArrays?.has(I)){let ae=Na(L);for(let[ye,q]of ae){let H=st(e,q);e.state.env.set(`${I}_${ye}`,H)}}else{let ae=ut(e,I),ye=0,q=e.state.env.get(I);ae.length===0&&q!==void 0?(e.state.env.set(`${I}_0`,q),e.state.env.delete(I),ye=1):ae.length>0&&(ye=Math.max(...ae)+1);for(let te=0;te<Z.length;te++)e.state.env.set(`${I}_${ye+te}`,st(e,Z[te]));let H=ye+Z.length;e.state.env.set(`${I}__length`,String(H))}v(I),s&&Jt(e,I),i&&On(e,I);continue}let O=R.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=(.*)$/);if(O){let I=O[1],L=st(e,O[2]),B=bt(e,I);if(B)return B;x(I),f&&Ju(e,I),p&&ef(e,I),h&&tf(e,I);let ae=ut(e,I).length>0||e.state.associativeArrays?.has(I);if(Oi(e,I)){let ye=e.state.env.get(I)??"0",q=parseInt(ye,10)||0,H=parseInt(await My(e,L),10)||0;L=String(q+H),e.state.env.set(I,L)}else if(ae){L=Hs(e,I,L);let ye=`${I}_0`,q=e.state.env.get(ye)??"";e.state.env.set(ye,q+L)}else{L=Hs(e,I,L);let ye=e.state.env.get(I)??"";e.state.env.set(I,ye+L)}v(I),s&&Jt(e,I),i&&On(e,I),e.state.options.allexport&&!u&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(I));continue}if(R.includes("=")){let I=R.indexOf("="),L=R.slice(0,I),B=R.slice(I+1);if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(L)){$+=`bash: typeset: \`${L}': not a valid identifier
902
- `,_=1;continue}let Z=bt(e,L);if(Z)return Z;if(x(L),a){if(B!==""&&!/^[a-zA-Z_][a-zA-Z0-9_]*(\[.+\])?$/.test(B)){$+=`bash: declare: \`${B}': invalid variable name for name reference
903
- `,_=1;continue}e.state.env.set(L,B),sr(e,L),B!==""&&oa(e,B)&&xu(e,L),v(L),s&&Jt(e,L),i&&On(e,L);continue}if(f&&Ju(e,L),p&&ef(e,L),h&&tf(e,L),Oi(e,L)&&(B=await My(e,B)),B=Hs(e,L,B),We(e,L)){let ae=Mt(e,L);ae&&ae!==L?e.state.env.set(ae,B):e.state.env.set(L,B)}else e.state.env.set(L,B);v(L),s&&Jt(e,L),i&&On(e,L),e.state.options.allexport&&!u&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(L))}else{let I=R;if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(I)){$+=`bash: typeset: \`${I}': not a valid identifier
904
- `,_=1;continue}if(n||r?S(I):x(I),a){sr(e,I);let B=e.state.env.get(I);B!==void 0&&B!==""&&!/^[a-zA-Z_][a-zA-Z0-9_]*(\[.+\])?$/.test(B)?Ug(e,I):B&&oa(e,B)&&xu(e,I),v(I),s&&Jt(e,I),i&&On(e,I);continue}if(f&&Ju(e,I),p&&ef(e,I),h&&tf(e,I),r){if(ut(e,I).length>0){$+=`bash: declare: ${I}: cannot convert indexed to associative array
905
- `,_=1;continue}e.state.associativeArrays??=new Set,e.state.associativeArrays.add(I)}let L=Array.from(e.state.env.keys()).some(B=>B.startsWith(`${I}_`)&&!B.startsWith(`${I}__length`));!e.state.env.has(I)&&!L&&(n||r?e.state.env.set(`${I}__length`,"0"):(e.state.declaredVars??=new Set,e.state.declaredVars.add(I))),v(I),s&&Jt(e,I),i&&On(e,I)}}return z("",$,_)}async function rf(e,t){let n=!1,r=!1,s=!1,i=[];for(let o=0;o<t.length;o++){let a=t[o];if(a==="-a")n=!0;else if(a==="-A")r=!0;else if(a==="-p")s=!0;else if(a==="--"){i.push(...t.slice(o+1));break}else a.startsWith("-")||i.push(a)}if(i.length===0){let o="",a=Array.from(e.state.readonlyVars||[]).sort();for(let l of a){let c=e.state.env.get(l);if(c!==void 0){let u=c.replace(/\\/g,"\\\\").replace(/"/g,'\\"');o+=`declare -r ${l}="${u}"
899
+ `;return Ee(P)}let O=!0;for(let P of y)e.state.functions.has(P)||(O=!1);return z("","",O?0:1)}if(o&&y.length>0)return Py(e,y);if(o&&y.length===0)return Dy(e,{filterExport:i,filterReadonly:s,filterNameref:a,filterIndexedArray:n,filterAssocArray:r});if(y.length===0&&r&&!o)return _y(e);if(y.length===0&&n&&!o)return Fy(e);if(y.length===0&&!o)return Ly(e);let $="",D=0;for(let O of y){let P=O.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\((.*)\)$/s);if(P&&!c){let I=P[1],L=P[2];if(r&&ut(e,I).length>0){$+=`bash: declare: ${I}: cannot convert indexed to associative array
900
+ `,D=1;continue}if((n||!r&&!n)&&e.state.associativeArrays?.has(I)){$+=`bash: declare: ${I}: cannot convert associative to indexed array
901
+ `,D=1;continue}if(S(I),r&&(e.state.associativeArrays??=new Set,e.state.associativeArrays.add(I)),Vn(e,I),e.state.env.delete(I),e.state.env.delete(`${I}__length`),r&&L.includes("[")){let B=Na(L);for(let[Z,ae]of B){let ye=st(e,ae);e.state.env.set(`${I}_${Z}`,ye)}}else if(r){let B=Qn(L);for(let Z=0;Z<B.length;Z+=2){let ae=B[Z],ye=Z+1<B.length?st(e,B[Z+1]):"";e.state.env.set(`${I}_${ae}`,ye)}}else{let B=Qn(L);if(B.some(ae=>/^\[[^\]]+\]=/.test(ae))){let ae=0;for(let ye of B){let q=ye.match(/^\[([^\]]+)\]=(.*)$/);if(q){let H=q[1],te=q[2],ve=st(e,te),ie;if(/^-?\d+$/.test(H))ie=Number.parseInt(H,10);else try{let Pe=new pe,j=Ie(Pe,H);ie=await re(e,j.expression)}catch{ie=0}e.state.env.set(`${I}_${ie}`,ve),ae=ie+1}else{let H=st(e,ye);e.state.env.set(`${I}_${ae}`,H),ae++}}}else{for(let ae=0;ae<B.length;ae++)e.state.env.set(`${I}_${ae}`,B[ae]);e.state.env.set(`${I}__length`,String(B.length))}}v(I),s&&Jt(e,I),i&&On(e,I);continue}if(l){let I=O.includes("=")?O.slice(0,O.indexOf("=")):O;if(Mg(e,I),!O.includes("="))continue}if(u){let I=O.includes("=")?O.slice(0,O.indexOf("=")):O;if(la(e,I),!O.includes("="))continue}let C=PC(O);if(C){let{name:I,indexExpr:L,value:B}=C,Z=bt(e,I);if(Z)return Z;S(I);let ae;try{let q=new pe,H=Ie(q,L);ae=await re(e,H.expression)}catch{let q=parseInt(L,10);ae=Number.isNaN(q)?0:q}e.state.env.set(`${I}_${ae}`,B);let ye=parseInt(e.state.env.get(`${I}__length`)??"0",10);ae>=ye&&e.state.env.set(`${I}__length`,String(ae+1)),v(I),s&&Jt(e,I),i&&On(e,I);continue}let T=O.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=\((.*)\)$/s);if(T&&!c){let I=T[1],L=T[2],B=bt(e,I);if(B)return B;S(I);let Z=Qn(L);if(e.state.associativeArrays?.has(I)){let ae=Na(L);for(let[ye,q]of ae){let H=st(e,q);e.state.env.set(`${I}_${ye}`,H)}}else{let ae=ut(e,I),ye=0,q=e.state.env.get(I);ae.length===0&&q!==void 0?(e.state.env.set(`${I}_0`,q),e.state.env.delete(I),ye=1):ae.length>0&&(ye=Math.max(...ae)+1);for(let te=0;te<Z.length;te++)e.state.env.set(`${I}_${ye+te}`,st(e,Z[te]));let H=ye+Z.length;e.state.env.set(`${I}__length`,String(H))}v(I),s&&Jt(e,I),i&&On(e,I);continue}let R=O.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=(.*)$/);if(R){let I=R[1],L=st(e,R[2]),B=bt(e,I);if(B)return B;x(I),f&&Ju(e,I),p&&ef(e,I),h&&tf(e,I);let ae=ut(e,I).length>0||e.state.associativeArrays?.has(I);if(Oi(e,I)){let ye=e.state.env.get(I)??"0",q=parseInt(ye,10)||0,H=parseInt(await My(e,L),10)||0;L=String(q+H),e.state.env.set(I,L)}else if(ae){L=Hs(e,I,L);let ye=`${I}_0`,q=e.state.env.get(ye)??"";e.state.env.set(ye,q+L)}else{L=Hs(e,I,L);let ye=e.state.env.get(I)??"";e.state.env.set(I,ye+L)}v(I),s&&Jt(e,I),i&&On(e,I),e.state.options.allexport&&!u&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(I));continue}if(O.includes("=")){let I=O.indexOf("="),L=O.slice(0,I),B=O.slice(I+1);if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(L)){$+=`bash: typeset: \`${L}': not a valid identifier
902
+ `,D=1;continue}let Z=bt(e,L);if(Z)return Z;if(x(L),a){if(B!==""&&!/^[a-zA-Z_][a-zA-Z0-9_]*(\[.+\])?$/.test(B)){$+=`bash: declare: \`${B}': invalid variable name for name reference
903
+ `,D=1;continue}e.state.env.set(L,B),sr(e,L),B!==""&&oa(e,B)&&xu(e,L),v(L),s&&Jt(e,L),i&&On(e,L);continue}if(f&&Ju(e,L),p&&ef(e,L),h&&tf(e,L),Oi(e,L)&&(B=await My(e,B)),B=Hs(e,L,B),We(e,L)){let ae=Mt(e,L);ae&&ae!==L?e.state.env.set(ae,B):e.state.env.set(L,B)}else e.state.env.set(L,B);v(L),s&&Jt(e,L),i&&On(e,L),e.state.options.allexport&&!u&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(L))}else{let I=O;if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(I)){$+=`bash: typeset: \`${I}': not a valid identifier
904
+ `,D=1;continue}if(n||r?S(I):x(I),a){sr(e,I);let B=e.state.env.get(I);B!==void 0&&B!==""&&!/^[a-zA-Z_][a-zA-Z0-9_]*(\[.+\])?$/.test(B)?Ug(e,I):B&&oa(e,B)&&xu(e,I),v(I),s&&Jt(e,I),i&&On(e,I);continue}if(f&&Ju(e,I),p&&ef(e,I),h&&tf(e,I),r){if(ut(e,I).length>0){$+=`bash: declare: ${I}: cannot convert indexed to associative array
905
+ `,D=1;continue}e.state.associativeArrays??=new Set,e.state.associativeArrays.add(I)}let L=Array.from(e.state.env.keys()).some(B=>B.startsWith(`${I}_`)&&!B.startsWith(`${I}__length`));!e.state.env.has(I)&&!L&&(n||r?e.state.env.set(`${I}__length`,"0"):(e.state.declaredVars??=new Set,e.state.declaredVars.add(I))),v(I),s&&Jt(e,I),i&&On(e,I)}}return z("",$,D)}async function rf(e,t){let n=!1,r=!1,s=!1,i=[];for(let o=0;o<t.length;o++){let a=t[o];if(a==="-a")n=!0;else if(a==="-A")r=!0;else if(a==="-p")s=!0;else if(a==="--"){i.push(...t.slice(o+1));break}else a.startsWith("-")||i.push(a)}if(i.length===0){let o="",a=Array.from(e.state.readonlyVars||[]).sort();for(let l of a){let c=e.state.env.get(l);if(c!==void 0){let u=c.replace(/\\/g,"\\\\").replace(/"/g,'\\"');o+=`declare -r ${l}="${u}"
906
906
  `}}return Ee(o)}for(let o of i){let a=o.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=\((.*)\)$/s);if(a){let f=a[1],p=a[2],h=bt(e,f);if(h)return h;let d=Qn(p);if(e.state.associativeArrays?.has(f)){let m=Na(p);for(let[g,y]of m){let w=st(e,y);e.state.env.set(`${f}_${g}`,w)}}else{let m=ut(e,f),g=0,y=e.state.env.get(f);m.length===0&&y!==void 0?(e.state.env.set(`${f}_0`,y),e.state.env.delete(f),g=1):m.length>0&&(g=Math.max(...m)+1);for(let b=0;b<d.length;b++)e.state.env.set(`${f}_${g+b}`,st(e,d[b]));let w=g+d.length;e.state.env.set(`${f}__length`,String(w))}Jt(e,f);continue}let l=o.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=(.*)$/);if(l){let f=l[1],p=st(e,l[2]),h=bt(e,f);if(h)return h;let d=e.state.env.get(f)??"";e.state.env.set(f,d+p),Jt(e,f);continue}let c=Ay(o);if(c.value===void 0&&!c.isArray){Jt(e,c.name);continue}let u=await Sy(e,c,{makeReadonly:!0});if(u)return u}return be}function sf(e){return e.state.directoryStack??=[],e.state.directoryStack}function Ri(e,t){return t&&e===t?"~":t&&e.startsWith(`${t}/`)?`~${e.slice(t.length)}`:e}function DC(e){let t=e.split("/").filter(r=>r&&r!=="."),n=[];for(let r of t)r===".."?n.pop():n.push(r);return`/${n.join("/")}`}async function of(e,t){let n=sf(e),r;for(let a=0;a<t.length;a++){let l=t[a];if(l==="--"){if(a+1<t.length){if(r!==void 0)return W(`bash: pushd: too many arguments
907
907
  `,2);r=t[a+1],a++}}else{if(l.startsWith("-")&&l!=="-")return W(`bash: pushd: ${l}: invalid option
908
908
  `,2);if(r!==void 0)return W(`bash: pushd: too many arguments
@@ -1304,19 +1304,19 @@ ${h}
1304
1304
  `)}return z("","",r===0?1:0)}Tt();ct();Ut();yn();$n();xr();async function df(e,t){if(e.state.localScopes.length===0)return W(`bash: local: can only be used in a function
1305
1305
  `);let n=e.state.localScopes[e.state.localScopes.length-1],r="",s=0,i=!1,o=!1,a=!1,l=[];for(let c of t)if(c==="-n")i=!0;else if(c==="-a")o=!0;else if(c==="-p")a=!0;else if(c.startsWith("-")&&!c.includes("="))for(let u of c.slice(1))u==="n"?i=!0:u==="a"?o=!0:u==="p"&&(a=!0);else l.push(c);if(l.length===0){let c="",u=Array.from(n.keys()).filter(f=>!f.includes("_")||!f.match(/_\d+$/)).filter(f=>!f.includes("__length")).sort();for(let f of u){let p=e.state.env.get(f);p!==void 0&&(c+=`${f}=${p}
1306
1306
  `)}return z(c,"",0)}for(let c of l){let u,f,p=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\((.*)\)$/s);if(p){u=p[1];let y=p[2];if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(u)){r+=`bash: local: \`${c}': not a valid identifier
1307
- `,s=1;continue}if(bt(e,u,"bash"),!n.has(u)){n.set(u,e.state.env.get(u));let x=`${u}_`;for(let S of e.state.env.keys())S.startsWith(x)&&!S.includes("__")&&(n.has(S)||n.set(S,e.state.env.get(S)))}let w=`${u}_`;for(let x of e.state.env.keys())x.startsWith(w)&&!x.includes("__")&&e.state.env.delete(x);let b=Qn(y);for(let x=0;x<b.length;x++)e.state.env.set(`${u}_${x}`,b[x]);e.state.env.set(`${u}__length`,String(b.length)),Cr(e,u),i&&sr(e,u);continue}let h=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=\((.*)\)$/s);if(h){u=h[1];let y=h[2];if(bt(e,u,"bash"),!n.has(u)){n.set(u,e.state.env.get(u));let $=`${u}_`;for(let R of e.state.env.keys())R.startsWith($)&&!R.includes("__")&&(n.has(R)||n.set(R,e.state.env.get(R)));let _=`${u}__length`;e.state.env.has(_)&&!n.has(_)&&n.set(_,e.state.env.get(_))}let w=Qn(y),b=ut(e,u),x=0,S=e.state.env.get(u);b.length===0&&S!==void 0?(e.state.env.set(`${u}_0`,S),e.state.env.delete(u),x=1):b.length>0&&(x=Math.max(...b)+1);for(let $=0;$<w.length;$++)e.state.env.set(`${u}_${x+$}`,st(e,w[$]));let v=x+w.length;e.state.env.set(`${u}__length`,String(v)),Cr(e,u),i&&sr(e,u);continue}let d=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=(.*)$/);if(d){u=d[1];let y=st(e,d[2]);bt(e,u,"bash"),n.has(u)||n.set(u,e.state.env.get(u));let w=e.state.env.get(u)??"";e.state.env.set(u,w+y),Cr(e,u),i&&sr(e,u);continue}let m=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[([^\]]+)\]=(.*)$/s);if(m){u=m[1];let y=m[2],w=st(e,m[3]);if(bt(e,u,"bash"),!n.has(u)){n.set(u,e.state.env.get(u));let S=`${u}_`;for(let $ of e.state.env.keys())$.startsWith(S)&&!$.includes("__")&&(n.has($)||n.set($,e.state.env.get($)));let v=`${u}__length`;e.state.env.has(v)&&!n.has(v)&&n.set(v,e.state.env.get(v))}let b;try{let S=new pe,v=Ie(S,y);b=await re(e,v.expression)}catch{let S=parseInt(y,10);b=Number.isNaN(S)?0:S}e.state.env.set(`${u}_${b}`,w);let x=parseInt(e.state.env.get(`${u}__length`)??"0",10);b>=x&&e.state.env.set(`${u}__length`,String(b+1)),Cr(e,u),i&&sr(e,u);continue}if(c.includes("=")){let y=c.indexOf("=");u=c.slice(0,y),f=st(e,c.slice(y+1))}else u=c;if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(u)){r+=`bash: local: \`${c}': not a valid identifier
1307
+ `,s=1;continue}if(bt(e,u,"bash"),!n.has(u)){n.set(u,e.state.env.get(u));let x=`${u}_`;for(let S of e.state.env.keys())S.startsWith(x)&&!S.includes("__")&&(n.has(S)||n.set(S,e.state.env.get(S)))}let w=`${u}_`;for(let x of e.state.env.keys())x.startsWith(w)&&!x.includes("__")&&e.state.env.delete(x);let b=Qn(y);for(let x=0;x<b.length;x++)e.state.env.set(`${u}_${x}`,b[x]);e.state.env.set(`${u}__length`,String(b.length)),Cr(e,u),i&&sr(e,u);continue}let h=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=\((.*)\)$/s);if(h){u=h[1];let y=h[2];if(bt(e,u,"bash"),!n.has(u)){n.set(u,e.state.env.get(u));let $=`${u}_`;for(let O of e.state.env.keys())O.startsWith($)&&!O.includes("__")&&(n.has(O)||n.set(O,e.state.env.get(O)));let D=`${u}__length`;e.state.env.has(D)&&!n.has(D)&&n.set(D,e.state.env.get(D))}let w=Qn(y),b=ut(e,u),x=0,S=e.state.env.get(u);b.length===0&&S!==void 0?(e.state.env.set(`${u}_0`,S),e.state.env.delete(u),x=1):b.length>0&&(x=Math.max(...b)+1);for(let $=0;$<w.length;$++)e.state.env.set(`${u}_${x+$}`,st(e,w[$]));let v=x+w.length;e.state.env.set(`${u}__length`,String(v)),Cr(e,u),i&&sr(e,u);continue}let d=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\+=(.*)$/);if(d){u=d[1];let y=st(e,d[2]);bt(e,u,"bash"),n.has(u)||n.set(u,e.state.env.get(u));let w=e.state.env.get(u)??"";e.state.env.set(u,w+y),Cr(e,u),i&&sr(e,u);continue}let m=c.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[([^\]]+)\]=(.*)$/s);if(m){u=m[1];let y=m[2],w=st(e,m[3]);if(bt(e,u,"bash"),!n.has(u)){n.set(u,e.state.env.get(u));let S=`${u}_`;for(let $ of e.state.env.keys())$.startsWith(S)&&!$.includes("__")&&(n.has($)||n.set($,e.state.env.get($)));let v=`${u}__length`;e.state.env.has(v)&&!n.has(v)&&n.set(v,e.state.env.get(v))}let b;try{let S=new pe,v=Ie(S,y);b=await re(e,v.expression)}catch{let S=parseInt(y,10);b=Number.isNaN(S)?0:S}e.state.env.set(`${u}_${b}`,w);let x=parseInt(e.state.env.get(`${u}__length`)??"0",10);b>=x&&e.state.env.set(`${u}__length`,String(b+1)),Cr(e,u),i&&sr(e,u);continue}if(c.includes("=")){let y=c.indexOf("=");u=c.slice(0,y),f=st(e,c.slice(y+1))}else u=c;if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(u)){r+=`bash: local: \`${c}': not a valid identifier
1308
1308
  `,s=1;continue}let g=n.has(u);if(f!==void 0){let y=e.state.env.get(u);if(e.state.tempEnvBindings){let w=e.state.accessedTempEnvVars?.has(u),b=e.state.mutatedTempEnvVars?.has(u);if(!w&&!b)for(let x=e.state.tempEnvBindings.length-1;x>=0;x--){let S=e.state.tempEnvBindings[x];if(S.has(u)){y=S.get(u);break}}}Cy(e,u,y)}if(!g){let y=e.state.env.get(u);if(e.state.tempEnvBindings)for(let w=e.state.tempEnvBindings.length-1;w>=0;w--){let b=e.state.tempEnvBindings[w];if(b.has(u)){y=b.get(u);break}}if(n.set(u,y),o){let w=`${u}_`;for(let x of e.state.env.keys())x.startsWith(w)&&!x.includes("__")&&(n.has(x)||n.set(x,e.state.env.get(x)));let b=`${u}__length`;e.state.env.has(b)&&!n.has(b)&&n.set(b,e.state.env.get(b))}}if(o&&f===void 0){let y=`${u}_`;for(let w of e.state.env.keys())w.startsWith(y)&&!w.includes("__")&&e.state.env.delete(w);e.state.env.set(`${u}__length`,"0")}else if(f!==void 0){if(bt(e,u,"bash"),i&&f!==""&&!/^[a-zA-Z_][a-zA-Z0-9_]*(\[.+\])?$/.test(f)){r+=`bash: local: \`${f}': invalid variable name for name reference
1309
1309
  `,s=1;continue}e.state.env.set(u,f),e.state.options.allexport&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(u))}else{let y=e.state.tempEnvBindings?.some(w=>w.has(u));!g&&!y&&e.state.env.delete(u)}Cr(e,u),i&&sr(e,u)}return z("",r,s)}yn();function mf(e,t,n){let r=`
1310
1310
  `,s=0,i=0,o=0,a=!1,l="MAPFILE",c=0;for(;c<t.length;){let w=t[c];w==="-d"&&c+1<t.length?(r=t[c+1]===""?"\0":t[c+1]||`
1311
1311
  `,c+=2):w==="-n"&&c+1<t.length?(s=Number.parseInt(t[c+1],10)||0,c+=2):w==="-O"&&c+1<t.length?(i=Number.parseInt(t[c+1],10)||0,c+=2):w==="-s"&&c+1<t.length?(o=Number.parseInt(t[c+1],10)||0,c+=2):w==="-t"?(a=!0,c++):w==="-u"||w==="-C"||w==="-c"?c+=2:(w.startsWith("-")||(l=w),c++)}let u=n;!u&&e.state.groupStdin!==void 0&&(u=e.state.groupStdin);let f=[],p=u,h=0,d=0,m=e.limits?.maxArrayElements??1e5;for(;p.length>0;){let w=p.indexOf(r);if(w===-1){if(p.length>0){if(d<o)d++;else if(s===0||h<s){if(i+h>=m)return z("",`mapfile: array element limit exceeded (${m})
1312
1312
  `,1);let S=p,v=S.indexOf("\0");v!==-1&&(S=S.substring(0,v)),f.push(S),h++}}break}let b=p.substring(0,w),x=b.indexOf("\0");if(x!==-1&&(b=b.substring(0,x)),!a&&r!=="\0"&&(b+=r),p=p.substring(w+r.length),d<o){d++;continue}if(s>0&&h>=s)break;if(i+h>=m)return z("",`mapfile: array element limit exceeded (${m})
1313
1313
  `,1);f.push(b),h++}i===0&&Vn(e,l);for(let w=0;w<f.length;w++)e.state.env.set(`${l}_${i+w}`,f[w]);let g=parseInt(e.state.env.get(`${l}__length`)||"0",10),y=i+f.length;return e.state.env.set(`${l}__length`,String(Math.max(g,y))),e.state.groupStdin!==void 0&&!n&&(e.state.groupStdin=""),z("","",0)}yn();an();function MC(e){if(!e.startsWith("__rw__:"))return null;let t=e.slice(7),n=t.indexOf(":");if(n===-1)return null;let r=Number.parseInt(t.slice(0,n),10);if(Number.isNaN(r)||r<0)return null;let s=n+1,i=t.slice(s,s+r),o=s+r+1,a=t.slice(o),l=a.indexOf(":");if(l===-1)return null;let c=Number.parseInt(a.slice(0,l),10);if(Number.isNaN(c)||c<0)return null;let u=a.slice(l+1);return{path:i,position:c,content:u}}function UC(e,t,n){return`__rw__:${e.length}:${e}:${t}:${n}`}function gf(e,t,n,r=-1){let s=!1,i=`
1314
- `,o="",a=-1,l=-1,c=null,u=-1,f=-1,p=[],h=0,d=!1,m=(C,T)=>{let O=1;for(;O<C.length;){let I=C[O];if(I==="r")s=!0,O++;else if(I==="s")O++;else{if(I==="d")return O+1<C.length?(i=C.substring(O+1),{nextArgIndex:T+1}):T+1<t.length?(i=t[T+1],{nextArgIndex:T+2}):{nextArgIndex:T+1};if(I==="n"){if(O+1<C.length){let L=C.substring(O+1);return a=Number.parseInt(L,10),(Number.isNaN(a)||a<0)&&(d=!0,a=0),{nextArgIndex:T+1}}else if(T+1<t.length)return a=Number.parseInt(t[T+1],10),(Number.isNaN(a)||a<0)&&(d=!0,a=0),{nextArgIndex:T+2};return{nextArgIndex:T+1}}else if(I==="N"){if(O+1<C.length){let L=C.substring(O+1);return l=Number.parseInt(L,10),(Number.isNaN(l)||l<0)&&(d=!0,l=0),{nextArgIndex:T+1}}else if(T+1<t.length)return l=Number.parseInt(t[T+1],10),(Number.isNaN(l)||l<0)&&(d=!0,l=0),{nextArgIndex:T+2};return{nextArgIndex:T+1}}else{if(I==="a")return O+1<C.length?(c=C.substring(O+1),{nextArgIndex:T+1}):T+1<t.length?(c=t[T+1],{nextArgIndex:T+2}):{nextArgIndex:T+1};if(I==="p")return O+1<C.length?(o=C.substring(O+1),{nextArgIndex:T+1}):T+1<t.length?(o=t[T+1],{nextArgIndex:T+2}):{nextArgIndex:T+1};if(I==="u"){if(O+1<C.length){let L=C.substring(O+1);return u=Number.parseInt(L,10),Number.isNaN(u)||u<0?{nextArgIndex:-2}:{nextArgIndex:T+1}}else if(T+1<t.length)return u=Number.parseInt(t[T+1],10),Number.isNaN(u)||u<0?{nextArgIndex:-2}:{nextArgIndex:T+2};return{nextArgIndex:T+1}}else if(I==="t"){if(O+1<C.length){let L=C.substring(O+1);return f=Number.parseFloat(L),Number.isNaN(f)&&(f=0),{nextArgIndex:T+1}}else if(T+1<t.length)return f=Number.parseFloat(t[T+1]),Number.isNaN(f)&&(f=0),{nextArgIndex:T+2};return{nextArgIndex:T+1}}else if(I==="e"||I==="i"||I==="P"){if(I==="i"&&T+1<t.length)return{nextArgIndex:T+2};O++}else O++}}}return{nextArgIndex:T+1}};for(;h<t.length;){let C=t[h];if(C.startsWith("-")&&C.length>1&&C!=="--"){let T=m(C,h);if(T.nextArgIndex===-1)return{stdout:"",stderr:"",exitCode:2};if(T.nextArgIndex===-2)return{stdout:"",stderr:"",exitCode:1};h=T.nextArgIndex}else if(C==="--")for(h++;h<t.length;)p.push(t[h]),h++;else p.push(C),h++}if(d)return z("","",1);if(p.length===0&&c===null&&p.push("REPLY"),f===0){if(c)Vn(e,c);else{for(let C of p)e.state.env.set(C,"");p.length===0&&e.state.env.set("REPLY","")}return z("","",0)}if(f<0&&f!==-1)return z("","",1);let g=n;u>=0?e.state.fileDescriptors?g=e.state.fileDescriptors.get(u)||"":g="":!g&&e.state.groupStdin!==void 0&&(g=e.state.groupStdin);let y=i===""?"\0":i,w="",b=0,x=!0,S=C=>{if(u>=0&&e.state.fileDescriptors)e.state.fileDescriptors.set(u,g.substring(C));else if(r>=0&&e.state.fileDescriptors){let T=e.state.fileDescriptors.get(r);if(T?.startsWith("__rw__:")){let O=MC(T);if(O){let I=O.position+C;e.state.fileDescriptors.set(r,UC(O.path,I,O.content))}}}else e.state.groupStdin!==void 0&&!n&&(e.state.groupStdin=g.substring(C))};if(l>=0){let C=Math.min(l,g.length);w=g.substring(0,C),b=C,x=C>=l,S(b);let T=p[0]||"REPLY";e.state.env.set(T,w);for(let O=1;O<p.length;O++)e.state.env.set(p[O],"");return z("","",x?0:1)}else if(a>=0){let C=0,T=0,O=!1;for(;T<g.length&&C<a;){let I=g[T];if(I===y){b=T+1,O=!0;break}if(!s&&I==="\\"&&T+1<g.length){let L=g[T+1];if(L===y&&y===`
1315
- `){T+=2,b=T;continue}if(L===y){T+=2,C++,w+=L,b=T;continue}w+=L,T+=2,C++,b=T}else w+=I,T++,C++,b=T}x=C>=a||O,S(b)}else{b=0;let C=0;for(;C<g.length;){let T=g[C];if(T===y){b=C+y.length,x=!0;break}if(!s&&T==="\\"&&C+1<g.length){let O=g[C+1];if(O===`
1316
- `){C+=2;continue}if(O===y){w+=O,C+=2;continue}w+=T,w+=O,C+=2;continue}w+=T,C++}if(C>=g.length&&(x=!1,b=C,w.length===0&&g.length===0)){for(let T of p)e.state.env.set(T,"");return c&&Vn(e,c),z("","",1)}S(b)}y===`
1314
+ `,o="",a=-1,l=-1,c=null,u=-1,f=-1,p=[],h=0,d=!1,m=(C,T)=>{let R=1;for(;R<C.length;){let I=C[R];if(I==="r")s=!0,R++;else if(I==="s")R++;else{if(I==="d")return R+1<C.length?(i=C.substring(R+1),{nextArgIndex:T+1}):T+1<t.length?(i=t[T+1],{nextArgIndex:T+2}):{nextArgIndex:T+1};if(I==="n"){if(R+1<C.length){let L=C.substring(R+1);return a=Number.parseInt(L,10),(Number.isNaN(a)||a<0)&&(d=!0,a=0),{nextArgIndex:T+1}}else if(T+1<t.length)return a=Number.parseInt(t[T+1],10),(Number.isNaN(a)||a<0)&&(d=!0,a=0),{nextArgIndex:T+2};return{nextArgIndex:T+1}}else if(I==="N"){if(R+1<C.length){let L=C.substring(R+1);return l=Number.parseInt(L,10),(Number.isNaN(l)||l<0)&&(d=!0,l=0),{nextArgIndex:T+1}}else if(T+1<t.length)return l=Number.parseInt(t[T+1],10),(Number.isNaN(l)||l<0)&&(d=!0,l=0),{nextArgIndex:T+2};return{nextArgIndex:T+1}}else{if(I==="a")return R+1<C.length?(c=C.substring(R+1),{nextArgIndex:T+1}):T+1<t.length?(c=t[T+1],{nextArgIndex:T+2}):{nextArgIndex:T+1};if(I==="p")return R+1<C.length?(o=C.substring(R+1),{nextArgIndex:T+1}):T+1<t.length?(o=t[T+1],{nextArgIndex:T+2}):{nextArgIndex:T+1};if(I==="u"){if(R+1<C.length){let L=C.substring(R+1);return u=Number.parseInt(L,10),Number.isNaN(u)||u<0?{nextArgIndex:-2}:{nextArgIndex:T+1}}else if(T+1<t.length)return u=Number.parseInt(t[T+1],10),Number.isNaN(u)||u<0?{nextArgIndex:-2}:{nextArgIndex:T+2};return{nextArgIndex:T+1}}else if(I==="t"){if(R+1<C.length){let L=C.substring(R+1);return f=Number.parseFloat(L),Number.isNaN(f)&&(f=0),{nextArgIndex:T+1}}else if(T+1<t.length)return f=Number.parseFloat(t[T+1]),Number.isNaN(f)&&(f=0),{nextArgIndex:T+2};return{nextArgIndex:T+1}}else if(I==="e"||I==="i"||I==="P"){if(I==="i"&&T+1<t.length)return{nextArgIndex:T+2};R++}else R++}}}return{nextArgIndex:T+1}};for(;h<t.length;){let C=t[h];if(C.startsWith("-")&&C.length>1&&C!=="--"){let T=m(C,h);if(T.nextArgIndex===-1)return{stdout:"",stderr:"",exitCode:2};if(T.nextArgIndex===-2)return{stdout:"",stderr:"",exitCode:1};h=T.nextArgIndex}else if(C==="--")for(h++;h<t.length;)p.push(t[h]),h++;else p.push(C),h++}if(d)return z("","",1);if(p.length===0&&c===null&&p.push("REPLY"),f===0){if(c)Vn(e,c);else{for(let C of p)e.state.env.set(C,"");p.length===0&&e.state.env.set("REPLY","")}return z("","",0)}if(f<0&&f!==-1)return z("","",1);let g=n;u>=0?e.state.fileDescriptors?g=e.state.fileDescriptors.get(u)||"":g="":!g&&e.state.groupStdin!==void 0&&(g=e.state.groupStdin);let y=i===""?"\0":i,w="",b=0,x=!0,S=C=>{if(u>=0&&e.state.fileDescriptors)e.state.fileDescriptors.set(u,g.substring(C));else if(r>=0&&e.state.fileDescriptors){let T=e.state.fileDescriptors.get(r);if(T?.startsWith("__rw__:")){let R=MC(T);if(R){let I=R.position+C;e.state.fileDescriptors.set(r,UC(R.path,I,R.content))}}}else e.state.groupStdin!==void 0&&!n&&(e.state.groupStdin=g.substring(C))};if(l>=0){let C=Math.min(l,g.length);w=g.substring(0,C),b=C,x=C>=l,S(b);let T=p[0]||"REPLY";e.state.env.set(T,w);for(let R=1;R<p.length;R++)e.state.env.set(p[R],"");return z("","",x?0:1)}else if(a>=0){let C=0,T=0,R=!1;for(;T<g.length&&C<a;){let I=g[T];if(I===y){b=T+1,R=!0;break}if(!s&&I==="\\"&&T+1<g.length){let L=g[T+1];if(L===y&&y===`
1315
+ `){T+=2,b=T;continue}if(L===y){T+=2,C++,w+=L,b=T;continue}w+=L,T+=2,C++,b=T}else w+=I,T++,C++,b=T}x=C>=a||R,S(b)}else{b=0;let C=0;for(;C<g.length;){let T=g[C];if(T===y){b=C+y.length,x=!0;break}if(!s&&T==="\\"&&C+1<g.length){let R=g[C+1];if(R===`
1316
+ `){C+=2;continue}if(R===y){w+=R,C+=2;continue}w+=T,w+=R,C+=2;continue}w+=T,C++}if(C>=g.length&&(x=!1,b=C,w.length===0&&g.length===0)){for(let T of p)e.state.env.set(T,"");return c&&Vn(e,c),z("","",1)}S(b)}y===`
1317
1317
  `&&w.endsWith(`
1318
1318
  `)&&(w=w.slice(0,-1));let v=C=>s?C:C.replace(/\\(.)/g,"$1");if(p.length===1&&p[0]==="REPLY")return e.state.env.set("REPLY",v(w)),z("","",x?0:1);let $=yt(e.state.env);if(c){let{words:C}=bu(w,$,void 0,s),T=e.limits?.maxArrayElements??1e5;if(C.length>T)return z("",`read: array element limit exceeded (${T})
1319
- `,1);Vn(e,c);for(let O=0;O<C.length;O++)e.state.env.set(`${c}_${O}`,v(C[O]));return z("","",x?0:1)}let _=p.length,{words:R,wordStarts:P}=bu(w,$,_,s);for(let C=0;C<p.length;C++){let T=p[C];if(C<p.length-1)e.state.env.set(T,v(R[C]??""));else if(C<P.length){let O=w.substring(P[C]);O=Lg(O,$,s),O=v(O),e.state.env.set(T,O)}else e.state.env.set(T,"")}return z("","",x?0:1)}Ae();function yf(e,t){if(e.state.callDepth===0&&e.state.sourceDepth===0)return W("bash: return: can only `return' from a function or sourced script\n");let n=e.state.lastExitCode;if(t.length>0){let r=t[0],s=Number.parseInt(r,10);if(r===""||Number.isNaN(s)||!/^-?\d+$/.test(r))return W(`bash: return: ${r}: numeric argument required
1319
+ `,1);Vn(e,c);for(let R=0;R<C.length;R++)e.state.env.set(`${c}_${R}`,v(C[R]));return z("","",x?0:1)}let D=p.length,{words:O,wordStarts:P}=bu(w,$,D,s);for(let C=0;C<p.length;C++){let T=p[C];if(C<p.length-1)e.state.env.set(T,v(O[C]??""));else if(C<P.length){let R=w.substring(P[C]);R=Lg(R,$,s),R=v(R),e.state.env.set(T,R)}else e.state.env.set(T,"")}return z("","",x?0:1)}Ae();function yf(e,t){if(e.state.callDepth===0&&e.state.sourceDepth===0)return W("bash: return: can only `return' from a function or sourced script\n");let n=e.state.lastExitCode;if(t.length>0){let r=t[0],s=Number.parseInt(r,10);if(r===""||Number.isNaN(s)||!/^-?\d+$/.test(r))return W(`bash: return: ${r}: numeric argument required
1320
1320
  `,2);n=(s%256+256)%256}throw new St(n)}Ae();yn();var _a=`set: usage: set [-eux] [+eux] [-o option] [+o option]
1321
1321
  Options:
1322
1322
  -e Exit immediately if a command exits with non-zero status
@@ -1447,8 +1447,8 @@ sys 0m0.000s
1447
1447
  `,1)}}if(s=Math.max(...i.map(([a])=>typeof a=="number"?a:0))+1+s,s<0){let a=e.state.currentLine;return{index:0,error:z("",`bash: line ${a}: ${t}[${n}]: bad array subscript
1448
1448
  `,1)}}}return{index:s}}async function uv(e,t,n,r,s,i){let o="",a=n,l=null;if(We(e,n)){let f=Wg(e,n,r);if(f===void 0)return{continueToNext:!1,xtraceOutput:"",error:z("",`bash: ${n}: circular name reference
1449
1449
  `,1)};if(f===null)return{continueToNext:!0,xtraceOutput:""};a=f;let p=a.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);p&&(l={arrayName:p[1],subscriptExpr:p[2]},a=p[1])}if(Zn(e,a)){if(t.name)return o+=`bash: ${a}: readonly variable
1450
- `,{continueToNext:!0,xtraceOutput:o};let f=bt(e,a);if(f)return{continueToNext:!1,xtraceOutput:"",error:f}}let c;if(Oi(e,a))try{let f=new pe;if(s){let h=`(${e.state.env.get(a)||"0"}) + (${r})`,d=Ie(f,h);c=String(await re(e,d.expression))}else{let p=Ie(f,r);c=String(await re(e,p.expression))}}catch{c="0"}else{let{isArray:f}=await Promise.resolve().then(()=>(Bt(),Ru)),p=f(e,a)?`${a}_0`:a;c=s?(e.state.env.get(p)||"")+r:r}c=Hs(e,a,c),o+=await y7(e,a,c);let u=a;if(l)u=await fv(e,l);else{let{isArray:f}=await Promise.resolve().then(()=>(Bt(),Ru));f(e,a)&&(u=`${a}_0`)}return t.name?(i.set(u,e.state.env.get(u)),e.state.env.set(u,c)):(e.state.env.set(u,c),e.state.options.allexport&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(a)),e.state.tempEnvBindings?.some(f=>f.has(a))&&(e.state.mutatedTempEnvVars=e.state.mutatedTempEnvVars||new Set,e.state.mutatedTempEnvVars.add(a))),{continueToNext:!1,xtraceOutput:o}}async function fv(e,t){let{arrayName:n,subscriptExpr:r}=t;if(e.state.associativeArrays?.has(n))return x7(e,n,r);let i;if(/^-?\d+$/.test(r))i=Number.parseInt(r,10);else{try{let o=new pe,a=Ie(o,r);i=await re(e,a.expression,!1)}catch{let o=e.state.env.get(r);i=o?Number.parseInt(o,10):0}Number.isNaN(i)&&(i=0)}if(i<0){let o=ce(e,n);o.length>0&&(i=Math.max(...o.map(l=>l[0]))+1+i)}return`${n}_${i}`}ct();Ae();Bt();rn();async function E7(e,t,n,r){let s=await Xn(e,t.redirections);if(s)return s;let i=new Map(e.state.env),o=e.state.cwd,a={...e.state.options},l=new Map(e.state.functions),c=e.state.localScopes,u=e.state.localVarStack,f=e.state.localVarDepth,p=e.state.fullyUnsetLocals;if(e.state.localScopes=c.map($=>new Map($)),u){e.state.localVarStack=new Map;for(let[$,_]of u.entries())e.state.localVarStack.set($,_.map(R=>({...R})))}f&&(e.state.localVarDepth=new Map(f)),p&&(e.state.fullyUnsetLocals=new Map(p));let h=e.state.loopDepth,d=e.state.parentHasLoopContext;e.state.parentHasLoopContext=h>0,e.state.loopDepth=0;let m=e.state.lastArg,g=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let y=e.state.groupStdin;n&&(e.state.groupStdin=n);let w="",b="",x=0,S=()=>{e.state.env=i,e.state.cwd=o,e.state.options=a,e.state.functions=l,e.state.localScopes=c,e.state.localVarStack=u,e.state.localVarDepth=f,e.state.fullyUnsetLocals=p,e.state.loopDepth=h,e.state.parentHasLoopContext=d,e.state.groupStdin=y,e.state.bashPid=g,e.state.lastArg=m};try{for(let $ of t.body){let _=await r($);w+=_.stdout,b+=_.stderr,x=_.exitCode}}catch($){if(S(),$ instanceof X)throw $;if($ instanceof Mn){w+=$.stdout,b+=$.stderr;let R=z(w,b,0);return et(e,R,t.redirections)}if($ instanceof It||$ instanceof $t){w+=$.stdout,b+=$.stderr;let R=z(w,b,0);return et(e,R,t.redirections)}if($ instanceof we){w+=$.stdout,b+=$.stderr;let R=z(w,b,$.exitCode);return et(e,R,t.redirections)}if($ instanceof St){w+=$.stdout,b+=$.stderr;let R=z(w,b,$.exitCode);return et(e,R,t.redirections)}if($ instanceof Ht){let R=z(w+$.stdout,b+$.stderr,$.exitCode);return et(e,R,t.redirections)}let _=z(w,`${b}${Xe($)}
1451
- `,1);return et(e,_,t.redirections)}S();let v=z(w,b,x);return et(e,v,t.redirections)}async function A7(e,t,n,r){let s="",i="",o=0,a=await Ta(e,t.redirections);if(a)return a;let l=n;for(let f of t.redirections)if((f.operator==="<<"||f.operator==="<<-")&&f.target.type==="HereDoc"){let p=f.target,h=await le(e,p.content);p.stripTabs&&(h=h.split(`
1450
+ `,{continueToNext:!0,xtraceOutput:o};let f=bt(e,a);if(f)return{continueToNext:!1,xtraceOutput:"",error:f}}let c;if(Oi(e,a))try{let f=new pe;if(s){let h=`(${e.state.env.get(a)||"0"}) + (${r})`,d=Ie(f,h);c=String(await re(e,d.expression))}else{let p=Ie(f,r);c=String(await re(e,p.expression))}}catch{c="0"}else{let{isArray:f}=await Promise.resolve().then(()=>(Bt(),Ru)),p=f(e,a)?`${a}_0`:a;c=s?(e.state.env.get(p)||"")+r:r}c=Hs(e,a,c),o+=await y7(e,a,c);let u=a;if(l)u=await fv(e,l);else{let{isArray:f}=await Promise.resolve().then(()=>(Bt(),Ru));f(e,a)&&(u=`${a}_0`)}return t.name?(i.set(u,e.state.env.get(u)),e.state.env.set(u,c)):(e.state.env.set(u,c),e.state.options.allexport&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(a)),e.state.tempEnvBindings?.some(f=>f.has(a))&&(e.state.mutatedTempEnvVars=e.state.mutatedTempEnvVars||new Set,e.state.mutatedTempEnvVars.add(a))),{continueToNext:!1,xtraceOutput:o}}async function fv(e,t){let{arrayName:n,subscriptExpr:r}=t;if(e.state.associativeArrays?.has(n))return x7(e,n,r);let i;if(/^-?\d+$/.test(r))i=Number.parseInt(r,10);else{try{let o=new pe,a=Ie(o,r);i=await re(e,a.expression,!1)}catch{let o=e.state.env.get(r);i=o?Number.parseInt(o,10):0}Number.isNaN(i)&&(i=0)}if(i<0){let o=ce(e,n);o.length>0&&(i=Math.max(...o.map(l=>l[0]))+1+i)}return`${n}_${i}`}ct();Ae();Bt();rn();async function E7(e,t,n,r){let s=await Xn(e,t.redirections);if(s)return s;let i=new Map(e.state.env),o=e.state.cwd,a={...e.state.options},l=new Map(e.state.functions),c=e.state.localScopes,u=e.state.localVarStack,f=e.state.localVarDepth,p=e.state.fullyUnsetLocals;if(e.state.localScopes=c.map($=>new Map($)),u){e.state.localVarStack=new Map;for(let[$,D]of u.entries())e.state.localVarStack.set($,D.map(O=>({...O})))}f&&(e.state.localVarDepth=new Map(f)),p&&(e.state.fullyUnsetLocals=new Map(p));let h=e.state.loopDepth,d=e.state.parentHasLoopContext;e.state.parentHasLoopContext=h>0,e.state.loopDepth=0;let m=e.state.lastArg,g=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let y=e.state.groupStdin;n&&(e.state.groupStdin=n);let w="",b="",x=0,S=()=>{e.state.env=i,e.state.cwd=o,e.state.options=a,e.state.functions=l,e.state.localScopes=c,e.state.localVarStack=u,e.state.localVarDepth=f,e.state.fullyUnsetLocals=p,e.state.loopDepth=h,e.state.parentHasLoopContext=d,e.state.groupStdin=y,e.state.bashPid=g,e.state.lastArg=m};try{for(let $ of t.body){let D=await r($);w+=D.stdout,b+=D.stderr,x=D.exitCode}}catch($){if(S(),$ instanceof X)throw $;if($ instanceof Mn){w+=$.stdout,b+=$.stderr;let O=z(w,b,0);return et(e,O,t.redirections)}if($ instanceof It||$ instanceof $t){w+=$.stdout,b+=$.stderr;let O=z(w,b,0);return et(e,O,t.redirections)}if($ instanceof we){w+=$.stdout,b+=$.stderr;let O=z(w,b,$.exitCode);return et(e,O,t.redirections)}if($ instanceof St){w+=$.stdout,b+=$.stderr;let O=z(w,b,$.exitCode);return et(e,O,t.redirections)}if($ instanceof Ht){let O=z(w+$.stdout,b+$.stderr,$.exitCode);return et(e,O,t.redirections)}let D=z(w,`${b}${Xe($)}
1451
+ `,1);return et(e,D,t.redirections)}S();let v=z(w,b,x);return et(e,v,t.redirections)}async function A7(e,t,n,r){let s="",i="",o=0,a=await Ta(e,t.redirections);if(a)return a;let l=n;for(let f of t.redirections)if((f.operator==="<<"||f.operator==="<<-")&&f.target.type==="HereDoc"){let p=f.target,h=await le(e,p.content);p.stripTabs&&(h=h.split(`
1452
1452
  `).map(m=>m.replace(/^\t+/,"")).join(`
1453
1453
  `));let d=f.fd??0;d!==0?(e.state.fileDescriptors||(e.state.fileDescriptors=new Map),Ot(e),e.state.fileDescriptors.set(d,h)):l=h}else if(f.operator==="<<<"&&f.target.type==="Word")l=`${await le(e,f.target)}
1454
1454
  `;else if(f.operator==="<"&&f.target.type==="Word")try{let p=await le(e,f.target),h=e.fs.resolvePath(e.state.cwd,p);l=await e.fs.readFile(h)}catch{let p=await le(e,f.target);return z("",`bash: ${p}: No such file or directory
@@ -1457,17 +1457,17 @@ sys 0m0.000s
1457
1457
  `,127)}if(i.startsWith("#!")){let g=i.indexOf(`
1458
1458
  `);g!==-1&&(i=i.slice(g+1))}let o=new Map(e.state.env),a=e.state.cwd,l={...e.state.options},c=e.state.loopDepth,u=e.state.parentHasLoopContext,f=e.state.lastArg,p=e.state.bashPid,h=e.state.groupStdin,d=e.state.currentSource;e.state.parentHasLoopContext=c>0,e.state.loopDepth=0,e.state.bashPid=e.state.nextVirtualPid++,r&&(e.state.groupStdin=r),e.state.currentSource=t,e.state.env.set("0",t),e.state.env.set("#",String(n.length)),e.state.env.set("@",n.join(" ")),e.state.env.set("*",n.join(" "));for(let g=0;g<n.length&&g<9;g++)e.state.env.set(String(g+1),n[g]);for(let g=n.length+1;g<=9;g++)e.state.env.delete(String(g));let m=()=>{e.state.env=o,e.state.cwd=a,e.state.options=l,e.state.loopDepth=c,e.state.parentHasLoopContext=u,e.state.lastArg=f,e.state.bashPid=p,e.state.groupStdin=h,e.state.currentSource=d};try{let y=new pe().parse(i),w=await s(y);return m(),w}catch(g){if(m(),g instanceof we||g instanceof X)throw g;if(g.name==="ParseException")return W(`bash: ${t}: ${g.message}
1459
1459
  `);throw g}}function pv(e){let t=n=>{for(let r of n){if(r.type==="CommandSubstitution"||r.type==="DoubleQuoted"&&t(r.parts))return!0;if(r.type==="BraceExpansion"){for(let s of r.items)if(s.type==="Word"&&t(s.word.parts))return!0}}return!1};return t(e.parts)}var _i=class{ctx;constructor(t,n){this.ctx={state:n,fs:t.fs,commands:t.commands,limits:t.limits,execFn:t.exec,executeScript:this.executeScript.bind(this),executeStatement:this.executeStatement.bind(this),executeCommand:this.executeCommand.bind(this),fetch:t.fetch,sleep:t.sleep,trace:t.trace,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext??!1,jsBootstrapCode:t.jsBootstrapCode,invokeTool:t.invokeTool}}assertDefenseContext(t){if(!this.ctx.requireDefenseContext||Et.isInSandboxedContext())return;let n=`interpreter ${t} attempted outside defense context`;throw new me(n,{timestamp:Date.now(),type:"missing_defense_context",message:n,path:"DefenseInDepthBox.context",stack:new Error().stack,executionId:Et.getCurrentExecutionId()})}buildExportedEnv(){let t=this.ctx.state.exportedVars,n=this.ctx.state.tempExportedVars,r=new Set;if(t)for(let i of t)r.add(i);if(n)for(let i of n)r.add(i);if(r.size===0)return Object.create(null);let s=Object.create(null);for(let i of r){let o=this.ctx.state.env.get(i);o!==void 0&&(s[i]=o)}return s}async executeScript(t){this.assertDefenseContext("execution");let n="",r="",s=0,i=this.ctx.limits.maxOutputSize,o=(a,l)=>{n.length+r.length+a.length+l.length>i&&Kn(`total output size exceeded (>${i} bytes), increase executionLimits.maxOutputSize`,"output_size"),n+=a,r+=l};for(let a of t.statements)try{let l=await this.executeStatement(a);o(l.stdout,l.stderr),s=l.exitCode,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s))}catch(l){if(l instanceof we)throw l.prependOutput(n,r),l;if(l instanceof nn)return o(l.stdout,l.stderr),s=l.exitCode,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s)),{stdout:n,stderr:r,exitCode:s,env:Ct(this.ctx.state.env)};if(l instanceof X)throw l;if(l instanceof Ht)return o(l.stdout,l.stderr),s=l.exitCode,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s)),{stdout:n,stderr:r,exitCode:s,env:Ct(this.ctx.state.env)};if(l instanceof Rt)return o(l.stdout,l.stderr),s=1,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s)),{stdout:n,stderr:r,exitCode:s,env:Ct(this.ctx.state.env)};if(l instanceof Pt)return o(l.stdout,l.stderr),s=1,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s)),{stdout:n,stderr:r,exitCode:s,env:Ct(this.ctx.state.env)};if(l instanceof Le){o(l.stdout,l.stderr),s=1,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s));continue}if(l instanceof ss){o(l.stdout,l.stderr),s=1,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s));continue}if(l instanceof It||l instanceof $t){if(this.ctx.state.loopDepth>0)throw l.prependOutput(n,r),l;o(l.stdout,l.stderr);continue}throw l instanceof St&&l.prependOutput(n,r),l}return{stdout:n,stderr:r,exitCode:s,env:Ct(this.ctx.state.env)}}async executeUserScript(t,n,r=""){return S7(this.ctx,t,n,r,s=>this.executeScript(s))}async executeStatement(t){if(this.assertDefenseContext("statement"),this.ctx.state.signal?.aborted)throw new is;if(this.ctx.state.commandCount++,this.ctx.state.commandCount>this.ctx.limits.maxCommandCount&&Kn(`too many commands executed (>${this.ctx.limits.maxCommandCount}), increase executionLimits.maxCommandCount`,"commands"),t.deferredError)throw new At(t.deferredError.message,t.line??1,1);if(this.ctx.state.options.noexec)return be;this.ctx.state.errexitSafe=!1;let n="",r="";this.ctx.state.options.verbose&&!this.ctx.state.suppressVerbose&&t.sourceText&&(r+=`${t.sourceText}
1460
- `);let s=0,i=-1,o=!1;for(let c=0;c<t.pipelines.length;c++){let u=t.pipelines[c],f=c>0?t.operators[c-1]:null;if(f==="&&"&&s!==0||f==="||"&&s===0)continue;let p=await this.executePipeline(u);n+=p.stdout,r+=p.stderr,s=p.exitCode,i=c,o=u.negated,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s))}let a=i<t.pipelines.length-1,l=this.ctx.state.errexitSafe;if(this.ctx.state.errexitSafe=a||o||l,this.ctx.state.options.errexit&&s!==0&&i===t.pipelines.length-1&&!o&&!this.ctx.state.inCondition&&!l)throw new Ht(s,n,r);return z(n,r,s)}async executePipeline(t){return w7(this.ctx,t,(n,r)=>this.executeCommand(n,r))}async executeCommand(t,n){switch(this.assertDefenseContext("command"),this.ctx.coverage?.hit(`bash:cmd:${t.type}`),t.type){case"SimpleCommand":return this.executeSimpleCommand(t,n);case"If":return a7(this.ctx,t);case"For":return l7(this.ctx,t);case"CStyleFor":return c7(this.ctx,t);case"While":return u7(this.ctx,t,n);case"Until":return f7(this.ctx,t);case"Case":return p7(this.ctx,t);case"Subshell":return this.executeSubshell(t,n);case"Group":return this.executeGroup(t,n);case"FunctionDef":return Iy(this.ctx,t);case"ArithmeticCommand":return this.executeArithmeticCommand(t);case"ConditionalCommand":return this.executeConditionalCommand(t);default:return be}}async executeSimpleCommand(t,n){try{return await this.executeSimpleCommandInner(t,n)}catch(r){if(r instanceof Ln)return W(r.stderr);throw r}}async executeSimpleCommandInner(t,n){if(t.line!==void 0&&(this.ctx.state.currentLine=t.line),this.ctx.state.shoptOptions.expand_aliases&&t.name){let v=t,$=100;for(;$>0;){let _=this.expandAlias(v);if(_===v)break;v=_,$--}this.aliasExpansionStack.clear(),v!==t&&(t=v)}this.ctx.state.expansionStderr="";let r=await b7(this.ctx,t);if(r.error)return r.error;let s=r.tempAssignments,i=r.xtraceOutput;if(!t.name){if(t.redirections.length>0){let $=await Xn(this.ctx,t.redirections);if($)return $;let _=z("",i,0);return et(this.ctx,_,t.redirections)}this.ctx.state.lastArg="";let v=(this.ctx.state.expansionStderr||"")+i;return this.ctx.state.expansionStderr="",z("",v,this.ctx.state.lastExitCode)}let o=t.name&&kf(t.name,["local","declare","typeset","export","readonly"]),a=Array.from(s.keys());if(a.length>0&&!o){this.ctx.state.tempExportedVars=this.ctx.state.tempExportedVars||new Set;for(let v of a)this.ctx.state.tempExportedVars.add(v)}let l=await Ta(this.ctx,t.redirections);if(l){for(let[v,$]of s)$===void 0?this.ctx.state.env.delete(v):this.ctx.state.env.set(v,$);return l}let c=-1;for(let v of t.redirections){if((v.operator==="<<"||v.operator==="<<-")&&v.target.type==="HereDoc"){let $=v.target,_=await le(this.ctx,$.content);$.stripTabs&&(_=_.split(`
1460
+ `);let s=0,i=-1,o=!1;for(let c=0;c<t.pipelines.length;c++){let u=t.pipelines[c],f=c>0?t.operators[c-1]:null;if(f==="&&"&&s!==0||f==="||"&&s===0)continue;let p=await this.executePipeline(u);n+=p.stdout,r+=p.stderr,s=p.exitCode,i=c,o=u.negated,this.ctx.state.lastExitCode=s,this.ctx.state.env.set("?",String(s))}let a=i<t.pipelines.length-1,l=this.ctx.state.errexitSafe;if(this.ctx.state.errexitSafe=a||o||l,this.ctx.state.options.errexit&&s!==0&&i===t.pipelines.length-1&&!o&&!this.ctx.state.inCondition&&!l)throw new Ht(s,n,r);return z(n,r,s)}async executePipeline(t){return w7(this.ctx,t,(n,r)=>this.executeCommand(n,r))}async executeCommand(t,n){switch(this.assertDefenseContext("command"),this.ctx.coverage?.hit(`bash:cmd:${t.type}`),t.type){case"SimpleCommand":return this.executeSimpleCommand(t,n);case"If":return a7(this.ctx,t);case"For":return l7(this.ctx,t);case"CStyleFor":return c7(this.ctx,t);case"While":return u7(this.ctx,t,n);case"Until":return f7(this.ctx,t);case"Case":return p7(this.ctx,t);case"Subshell":return this.executeSubshell(t,n);case"Group":return this.executeGroup(t,n);case"FunctionDef":return Iy(this.ctx,t);case"ArithmeticCommand":return this.executeArithmeticCommand(t);case"ConditionalCommand":return this.executeConditionalCommand(t);default:return be}}async executeSimpleCommand(t,n){try{return await this.executeSimpleCommandInner(t,n)}catch(r){if(r instanceof Ln)return W(r.stderr);throw r}}async executeSimpleCommandInner(t,n){if(t.line!==void 0&&(this.ctx.state.currentLine=t.line),this.ctx.state.shoptOptions.expand_aliases&&t.name){let v=t,$=100;for(;$>0;){let D=this.expandAlias(v);if(D===v)break;v=D,$--}this.aliasExpansionStack.clear(),v!==t&&(t=v)}this.ctx.state.expansionStderr="",this.ctx.state.commandSubstitutionUsed=!1;let r=await b7(this.ctx,t);if(r.error)return r.error;let s=r.tempAssignments,i=r.xtraceOutput;if(!t.name){if(t.redirections.length>0){let D=await Xn(this.ctx,t.redirections);if(D)return D;let O=z("",i,0);return et(this.ctx,O,t.redirections)}this.ctx.state.lastArg="";let v=(this.ctx.state.expansionStderr||"")+i;this.ctx.state.expansionStderr="";let $=this.ctx.state.commandSubstitutionUsed?this.ctx.state.lastExitCode:0;return z("",v,$)}let o=t.name&&kf(t.name,["local","declare","typeset","export","readonly"]),a=Array.from(s.keys());if(a.length>0&&!o){this.ctx.state.tempExportedVars=this.ctx.state.tempExportedVars||new Set;for(let v of a)this.ctx.state.tempExportedVars.add(v)}let l=await Ta(this.ctx,t.redirections);if(l){for(let[v,$]of s)$===void 0?this.ctx.state.env.delete(v):this.ctx.state.env.set(v,$);return l}let c=-1;for(let v of t.redirections){if((v.operator==="<<"||v.operator==="<<-")&&v.target.type==="HereDoc"){let $=v.target,D=await le(this.ctx,$.content);$.stripTabs&&(D=D.split(`
1461
1461
  `).map(P=>P.replace(/^\t+/,"")).join(`
1462
- `)),_=_n(_);let R=v.fd??0;R!==0?(this.ctx.state.fileDescriptors||(this.ctx.state.fileDescriptors=new Map),Ot(this.ctx),this.ctx.state.fileDescriptors.set(R,_)):n=_;continue}if(v.operator==="<<<"&&v.target.type==="Word"){n=_n(`${await le(this.ctx,v.target)}
1463
- `);continue}if(v.operator==="<"&&v.target.type==="Word")try{let $=await le(this.ctx,v.target),_=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);n=await Fn(this.ctx.fs,_)}catch{let $=await le(this.ctx,v.target);for(let[_,R]of s)R===void 0?this.ctx.state.env.delete(_):this.ctx.state.env.set(_,R);return W(`bash: ${$}: No such file or directory
1464
- `)}if(v.operator==="<&"&&v.target.type==="Word"){let $=await le(this.ctx,v.target),_=Number.parseInt($,10);if(!Number.isNaN(_)&&this.ctx.state.fileDescriptors){let R=this.ctx.state.fileDescriptors.get(_);if(R!==void 0)if(R.startsWith("__rw__:")){let P=h7(R);P&&(n=P.content.slice(P.position),c=_)}else R.startsWith("__file__:")||R.startsWith("__file_append__:")||(n=R)}}}let u=await wn(this.ctx,t.name),f=u.values.length===0,p=u.values[0]??"",h=u.values.slice(1),d=h.map(()=>u.quoted);if(kf(t.name,["local","declare","typeset","export","readonly"])&&(p==="local"||p==="declare"||p==="typeset"||p==="export"||p==="readonly"))for(let v of t.args){let $=await fy(this.ctx,v);if($)h.push($),d.push(!0);else{let _=await py(this.ctx,v);if(_!==null)h.push(_),d.push(!0);else{let R=await wn(this.ctx,v);for(let P of R.values)h.push(P),d.push(R.quoted)}}}else for(let v of t.args){let $=await wn(this.ctx,v);for(let _ of $.values)h.push(_),d.push($.quoted)}if(!p){if(f){if(h.length>0){let $=h.shift();return d.shift(),await this.runCommand($,h,d,n,!1,!1,c)}let v=pv(t.name)?this.ctx.state.lastExitCode:0;return z("","",v)}return W(`bash: : command not found
1465
- `,127)}if(p==="exec"&&(h.length===0||h[0]==="--")){for(let v of t.redirections){if(v.target.type==="HereDoc"||v.fdVariable)continue;let $=await le(this.ctx,v.target),_=v.fd??(v.operator==="<"||v.operator==="<>"?0:1);switch(this.ctx.state.fileDescriptors||(this.ctx.state.fileDescriptors=new Map),v.operator){case">":case">|":{let R=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);await this.ctx.fs.writeFile(R,"","utf8"),Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,`__file__:${R}`);break}case">>":{let R=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,`__file_append__:${R}`);break}case"<":{let R=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);try{let P=await this.ctx.fs.readFile(R);Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,P)}catch{return W(`bash: ${$}: No such file or directory
1466
- `)}break}case"<>":{let R=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);try{let P=await this.ctx.fs.readFile(R);Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,`__rw__:${R.length}:${R}:0:${P}`)}catch{await this.ctx.fs.writeFile(R,"","utf8"),Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,`__rw__:${R.length}:${R}:0:`)}break}case">&":{if($==="-")this.ctx.state.fileDescriptors.delete(_);else if($.endsWith("-")){let R=$.slice(0,-1),P=Number.parseInt(R,10);if(!Number.isNaN(P)){let C=this.ctx.state.fileDescriptors.get(P);C!==void 0?this.ctx.state.fileDescriptors.set(_,C):this.ctx.state.fileDescriptors.set(_,`__dupout__:${P}`),this.ctx.state.fileDescriptors.delete(P)}}else{let R=Number.parseInt($,10);Number.isNaN(R)||(Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,`__dupout__:${R}`))}break}case"<&":{if($==="-")this.ctx.state.fileDescriptors.delete(_);else if($.endsWith("-")){let R=$.slice(0,-1),P=Number.parseInt(R,10);if(!Number.isNaN(P)){let C=this.ctx.state.fileDescriptors.get(P);C!==void 0?this.ctx.state.fileDescriptors.set(_,C):this.ctx.state.fileDescriptors.set(_,`__dupin__:${P}`),this.ctx.state.fileDescriptors.delete(P)}}else{let R=Number.parseInt($,10);Number.isNaN(R)||(Ot(this.ctx),this.ctx.state.fileDescriptors.set(_,`__dupin__:${R}`))}break}}}for(let[v,$]of s)$===void 0?this.ctx.state.env.delete(v):this.ctx.state.env.set(v,$);if(this.ctx.state.tempExportedVars)for(let v of s.keys())this.ctx.state.tempExportedVars.delete(v);return be}if(this.ctx.state.extraArgs){h.push(...this.ctx.state.extraArgs);for(let v=0;v<this.ctx.state.extraArgs.length;v++)d.push(!0);this.ctx.state.extraArgs=void 0}let g=await g7(this.ctx,p,h);s.size>0&&(this.ctx.state.tempEnvBindings=this.ctx.state.tempEnvBindings||[],this.ctx.state.tempEnvBindings.push(new Map(s)));let y,w=null;try{y=await this.runCommand(p,h,d,n,!1,!1,c)}catch(v){if(v instanceof It||v instanceof $t)w=v,y=be;else throw v}let b=i+g;if(b&&(y={...y,stderr:b+y.stderr}),y=await et(this.ctx,y,t.redirections),w)throw w;if(h.length>0){let v=h[h.length-1];if((p==="declare"||p==="local"||p==="typeset")&&/^[a-zA-Z_][a-zA-Z0-9_]*=\(/.test(v)){let $=v.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\(/);$&&(v=$[1])}this.ctx.state.lastArg=v}else this.ctx.state.lastArg=p;let x=ky(p)&&p!=="unset"&&p!=="eval";if(!this.ctx.state.options.posix||!x)for(let[v,$]of s)this.ctx.state.fullyUnsetLocals?.has(v)||($===void 0?this.ctx.state.env.delete(v):this.ctx.state.env.set(v,$));if(this.ctx.state.tempExportedVars)for(let v of s.keys())this.ctx.state.tempExportedVars.delete(v);return s.size>0&&this.ctx.state.tempEnvBindings&&this.ctx.state.tempEnvBindings.pop(),this.ctx.state.expansionStderr&&(y={...y,stderr:this.ctx.state.expansionStderr+y.stderr},this.ctx.state.expansionStderr=""),y}async runCommand(t,n,r,s,i=!1,o=!1,a=-1){let l={ctx:this.ctx,runCommand:(u,f,p,h,d,m,g)=>this.runCommand(u,f,p,h,d,m,g),buildExportedEnv:()=>this.buildExportedEnv(),executeUserScript:(u,f,p)=>this.executeUserScript(u,f,p)},c=await i7(l,t,n,r,s,i,o,a);return c!==null?c:o7(l,t,n,s,o)}aliasExpansionStack=new Set;expandAlias(t){return pu(this.ctx.state,t,this.aliasExpansionStack)}async findCommandInPath(t){return La(this.ctx,t)}async executeSubshell(t,n=""){return E7(this.ctx,t,n,r=>this.executeStatement(r))}async executeGroup(t,n=""){return A7(this.ctx,t,n,r=>this.executeStatement(r))}async executeArithmeticCommand(t){t.line!==void 0&&(this.ctx.state.currentLine=t.line);let n=await Xn(this.ctx,t.redirections);if(n)return n;try{let r=await re(this.ctx,t.expression.expression),s=ft(r!==0);return this.ctx.state.expansionStderr&&(s={...s,stderr:this.ctx.state.expansionStderr+s.stderr},this.ctx.state.expansionStderr=""),et(this.ctx,s,t.redirections)}catch(r){let s=W(`bash: arithmetic expression: ${r.message}
1462
+ `)),D=_n(D);let O=v.fd??0;O!==0?(this.ctx.state.fileDescriptors||(this.ctx.state.fileDescriptors=new Map),Ot(this.ctx),this.ctx.state.fileDescriptors.set(O,D)):n=D;continue}if(v.operator==="<<<"&&v.target.type==="Word"){n=_n(`${await le(this.ctx,v.target)}
1463
+ `);continue}if(v.operator==="<"&&v.target.type==="Word")try{let $=await le(this.ctx,v.target),D=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);n=await Fn(this.ctx.fs,D)}catch{let $=await le(this.ctx,v.target);for(let[D,O]of s)O===void 0?this.ctx.state.env.delete(D):this.ctx.state.env.set(D,O);return W(`bash: ${$}: No such file or directory
1464
+ `)}if(v.operator==="<&"&&v.target.type==="Word"){let $=await le(this.ctx,v.target),D=Number.parseInt($,10);if(!Number.isNaN(D)&&this.ctx.state.fileDescriptors){let O=this.ctx.state.fileDescriptors.get(D);if(O!==void 0)if(O.startsWith("__rw__:")){let P=h7(O);P&&(n=P.content.slice(P.position),c=D)}else O.startsWith("__file__:")||O.startsWith("__file_append__:")||(n=O)}}}let u=await wn(this.ctx,t.name),f=u.values.length===0,p=u.values[0]??"",h=u.values.slice(1),d=h.map(()=>u.quoted);if(kf(t.name,["local","declare","typeset","export","readonly"])&&(p==="local"||p==="declare"||p==="typeset"||p==="export"||p==="readonly"))for(let v of t.args){let $=await fy(this.ctx,v);if($)h.push($),d.push(!0);else{let D=await py(this.ctx,v);if(D!==null)h.push(D),d.push(!0);else{let O=await wn(this.ctx,v);for(let P of O.values)h.push(P),d.push(O.quoted)}}}else for(let v of t.args){let $=await wn(this.ctx,v);for(let D of $.values)h.push(D),d.push($.quoted)}if(!p){if(f){if(h.length>0){let $=h.shift();return d.shift(),await this.runCommand($,h,d,n,!1,!1,c)}let v=pv(t.name)?this.ctx.state.lastExitCode:0;return z("","",v)}return W(`bash: : command not found
1465
+ `,127)}if(p==="exec"&&(h.length===0||h[0]==="--")){for(let v of t.redirections){if(v.target.type==="HereDoc"||v.fdVariable)continue;let $=await le(this.ctx,v.target),D=v.fd??(v.operator==="<"||v.operator==="<>"?0:1);switch(this.ctx.state.fileDescriptors||(this.ctx.state.fileDescriptors=new Map),v.operator){case">":case">|":{let O=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);await this.ctx.fs.writeFile(O,"","utf8"),Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,`__file__:${O}`);break}case">>":{let O=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,`__file_append__:${O}`);break}case"<":{let O=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);try{let P=await this.ctx.fs.readFile(O);Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,P)}catch{return W(`bash: ${$}: No such file or directory
1466
+ `)}break}case"<>":{let O=this.ctx.fs.resolvePath(this.ctx.state.cwd,$);try{let P=await this.ctx.fs.readFile(O);Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,`__rw__:${O.length}:${O}:0:${P}`)}catch{await this.ctx.fs.writeFile(O,"","utf8"),Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,`__rw__:${O.length}:${O}:0:`)}break}case">&":{if($==="-")this.ctx.state.fileDescriptors.delete(D);else if($.endsWith("-")){let O=$.slice(0,-1),P=Number.parseInt(O,10);if(!Number.isNaN(P)){let C=this.ctx.state.fileDescriptors.get(P);C!==void 0?this.ctx.state.fileDescriptors.set(D,C):this.ctx.state.fileDescriptors.set(D,`__dupout__:${P}`),this.ctx.state.fileDescriptors.delete(P)}}else{let O=Number.parseInt($,10);Number.isNaN(O)||(Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,`__dupout__:${O}`))}break}case"<&":{if($==="-")this.ctx.state.fileDescriptors.delete(D);else if($.endsWith("-")){let O=$.slice(0,-1),P=Number.parseInt(O,10);if(!Number.isNaN(P)){let C=this.ctx.state.fileDescriptors.get(P);C!==void 0?this.ctx.state.fileDescriptors.set(D,C):this.ctx.state.fileDescriptors.set(D,`__dupin__:${P}`),this.ctx.state.fileDescriptors.delete(P)}}else{let O=Number.parseInt($,10);Number.isNaN(O)||(Ot(this.ctx),this.ctx.state.fileDescriptors.set(D,`__dupin__:${O}`))}break}}}for(let[v,$]of s)$===void 0?this.ctx.state.env.delete(v):this.ctx.state.env.set(v,$);if(this.ctx.state.tempExportedVars)for(let v of s.keys())this.ctx.state.tempExportedVars.delete(v);return be}if(this.ctx.state.extraArgs){h.push(...this.ctx.state.extraArgs);for(let v=0;v<this.ctx.state.extraArgs.length;v++)d.push(!0);this.ctx.state.extraArgs=void 0}let g=await g7(this.ctx,p,h);s.size>0&&(this.ctx.state.tempEnvBindings=this.ctx.state.tempEnvBindings||[],this.ctx.state.tempEnvBindings.push(new Map(s)));let y,w=null;try{y=await this.runCommand(p,h,d,n,!1,!1,c)}catch(v){if(v instanceof It||v instanceof $t)w=v,y=be;else throw v}let b=i+g;if(b&&(y={...y,stderr:b+y.stderr}),y=await et(this.ctx,y,t.redirections),w)throw w;if(h.length>0){let v=h[h.length-1];if((p==="declare"||p==="local"||p==="typeset")&&/^[a-zA-Z_][a-zA-Z0-9_]*=\(/.test(v)){let $=v.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\(/);$&&(v=$[1])}this.ctx.state.lastArg=v}else this.ctx.state.lastArg=p;let x=ky(p)&&p!=="unset"&&p!=="eval";if(!this.ctx.state.options.posix||!x)for(let[v,$]of s)this.ctx.state.fullyUnsetLocals?.has(v)||($===void 0?this.ctx.state.env.delete(v):this.ctx.state.env.set(v,$));if(this.ctx.state.tempExportedVars)for(let v of s.keys())this.ctx.state.tempExportedVars.delete(v);return s.size>0&&this.ctx.state.tempEnvBindings&&this.ctx.state.tempEnvBindings.pop(),this.ctx.state.expansionStderr&&(y={...y,stderr:this.ctx.state.expansionStderr+y.stderr},this.ctx.state.expansionStderr=""),y}async runCommand(t,n,r,s,i=!1,o=!1,a=-1){let l={ctx:this.ctx,runCommand:(u,f,p,h,d,m,g)=>this.runCommand(u,f,p,h,d,m,g),buildExportedEnv:()=>this.buildExportedEnv(),executeUserScript:(u,f,p)=>this.executeUserScript(u,f,p)},c=await i7(l,t,n,r,s,i,o,a);return c!==null?c:o7(l,t,n,s,o)}aliasExpansionStack=new Set;expandAlias(t){return pu(this.ctx.state,t,this.aliasExpansionStack)}async findCommandInPath(t){return La(this.ctx,t)}async executeSubshell(t,n=""){return E7(this.ctx,t,n,r=>this.executeStatement(r))}async executeGroup(t,n=""){return A7(this.ctx,t,n,r=>this.executeStatement(r))}async executeArithmeticCommand(t){t.line!==void 0&&(this.ctx.state.currentLine=t.line);let n=await Xn(this.ctx,t.redirections);if(n)return n;try{let r=await re(this.ctx,t.expression.expression),s=ft(r!==0);return this.ctx.state.expansionStderr&&(s={...s,stderr:this.ctx.state.expansionStderr+s.stderr},this.ctx.state.expansionStderr=""),et(this.ctx,s,t.redirections)}catch(r){let s=W(`bash: arithmetic expression: ${r.message}
1467
1467
  `);return et(this.ctx,s,t.redirections)}}async executeConditionalCommand(t){t.line!==void 0&&(this.ctx.state.currentLine=t.line);let n=await Xn(this.ctx,t.redirections);if(n)return n;try{let r=await Sr(this.ctx,t.expression),s=ft(r);return this.ctx.state.expansionStderr&&(s={...s,stderr:this.ctx.state.expansionStderr+s.stderr},this.ctx.state.expansionStderr=""),et(this.ctx,s,t.redirections)}catch(r){let s=r instanceof Le?1:2,i=W(`bash: conditional expression: ${r.message}
1468
1468
  `,s);return et(this.ctx,i,t.redirections)}}};var xt={maxCallDepth:100,maxCommandCount:1e4,maxLoopIterations:1e4,maxAwkIterations:1e4,maxSedIterations:1e4,maxJqIterations:1e4,maxSqliteTimeoutMs:5e3,maxPythonTimeoutMs:1e4,maxJsTimeoutMs:1e4,maxGlobOperations:1e5,maxStringLength:10485760,maxArrayElements:1e5,maxHeredocSize:10485760,maxSubstitutionDepth:50,maxBraceExpansionResults:1e4,maxOutputSize:10485760,maxFileDescriptors:1024,maxSourceDepth:100};function C7(e){return e?{maxCallDepth:e.maxCallDepth??xt.maxCallDepth,maxCommandCount:e.maxCommandCount??xt.maxCommandCount,maxLoopIterations:e.maxLoopIterations??xt.maxLoopIterations,maxAwkIterations:e.maxAwkIterations??xt.maxAwkIterations,maxSedIterations:e.maxSedIterations??xt.maxSedIterations,maxJqIterations:e.maxJqIterations??xt.maxJqIterations,maxSqliteTimeoutMs:e.maxSqliteTimeoutMs??xt.maxSqliteTimeoutMs,maxPythonTimeoutMs:e.maxPythonTimeoutMs??xt.maxPythonTimeoutMs,maxJsTimeoutMs:e.maxJsTimeoutMs??xt.maxJsTimeoutMs,maxGlobOperations:e.maxGlobOperations??xt.maxGlobOperations,maxStringLength:e.maxStringLength??xt.maxStringLength,maxArrayElements:e.maxArrayElements??xt.maxArrayElements,maxHeredocSize:e.maxHeredocSize??xt.maxHeredocSize,maxSubstitutionDepth:e.maxSubstitutionDepth??xt.maxSubstitutionDepth,maxBraceExpansionResults:e.maxBraceExpansionResults??xt.maxBraceExpansionResults,maxOutputSize:e.maxOutputSize??xt.maxOutputSize,maxFileDescriptors:e.maxFileDescriptors??xt.maxFileDescriptors,maxSourceDepth:e.maxSourceDepth??xt.maxSourceDepth}:{...xt}}k7();un();Zs();function Nf(e){try{let t=new URL(e);return{origin:t.origin,pathname:t.pathname,href:t.href}}catch{return null}}function hv(e){let t=Nf(e);return t?{origin:t.origin,pathPrefix:t.pathname}:null}function N7(e){if(e.includes("\\"))return!0;let t=e.toLowerCase();return t.includes("%2f")||t.includes("%5c")}function dv(e,t){return t==="/"||t===""?!0:t.endsWith("/")?e.startsWith(t):e===t||e.startsWith(`${t}/`)}function If(e,t){let n=Nf(e);if(!n)return!1;let r=hv(t);return!r||n.origin!==r.origin||r.pathPrefix!=="/"&&r.pathPrefix!==""&&N7(n.pathname)?!1:dv(n.pathname,r.pathPrefix)}function I7(e){return typeof e=="string"?e:e.url}function $7(e,t){return!t||t.length===0?!1:t.some(n=>If(e,I7(n)))}function $f(e){let t=mv(e);if(t==="localhost"||t.endsWith(".localhost"))return!0;let n=T7(t);if(n)return Ua(n);let r=yv(t);return r?wv(r):!1}function mv(e){let t=e.trim().toLowerCase();return t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t}function gv(e){if(!e)return null;let t=10,n=e;if(n.startsWith("0x")||n.startsWith("0X")?(t=16,n=n.slice(2)):n.length>1&&n.startsWith("0")&&(t=8),!n||t===16&&!/^[0-9a-fA-F]+$/.test(n)||t===10&&!/^\d+$/.test(n)||t===8&&!/^[0-7]+$/.test(n))return null;let r=Number.parseInt(n,t);return!Number.isFinite(r)||r<0?null:r}function T7(e){let t=e.split(".");if(t.length===0||t.length>4)return null;let n=t.map(l=>gv(l));if(n.some(l=>l===null))return null;let r=n;if(t.length===1){let l=r[0];return l>4294967295?null:[l>>>24&255,l>>>16&255,l>>>8&255,l&255]}if(t.length===2){let[l,c]=r;return l>255||c>16777215?null:[l,c>>>16&255,c>>>8&255,c&255]}if(t.length===3){let[l,c,u]=r;return l>255||c>255||u>65535?null:[l,c,u>>>8&255,u&255]}let[s,i,o,a]=r;return s>255||i>255||o>255||a>255?null:[s,i,o,a]}function yv(e){let t=e,n=null;if(t.includes(".")){let m=t.lastIndexOf(":");if(m<0)return null;let g=t.slice(m+1),y=T7(g);if(!y)return null;n=y,t=t.slice(0,m)}let r=t.includes("::")?t.split("::").length-1:0;if(r>1)return null;let[s,i]=t.split("::"),o=s?s.split(":").filter(Boolean):[],a=i?i.split(":").filter(Boolean):[],l=m=>/^[0-9a-f]{1,4}$/i.test(m)?Number.parseInt(m,16):null,c=o.map(l),u=a.map(l);if(c.some(m=>m===null)||u.some(m=>m===null))return null;let f=n?2:0,p=c.length+u.length+f,h=0;if(r===1){if(h=8-p,h<0)return null}else if(p!==8)return null;let d=[...c,...new Array(h).fill(0),...u];return n&&(d.push(n[0]<<8|n[1]),d.push(n[2]<<8|n[3])),d.length===8?d:null}function Ua(e){let[t,n]=e;return t===127||t===10||t===172&&n>=16&&n<=31||t===192&&n===168||t===169&&n===254||t===0||t===100&&n>=64&&n<=127||t===198&&(n===18||n===19)||t===192&&n===0&&e[2]===0||t===192&&n===0&&e[2]===2||t===198&&n===51&&e[2]===100||t===203&&n===0&&e[2]===113||t>=240}function wv(e){if(e.every(s=>s===0)||e.slice(0,7).every(s=>s===0)&&e[7]===1||(e[0]&65472)===65152||(e[0]&65024)===64512)return!0;if(e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===65535){let s=[e[6]>>>8&255,e[6]&255,e[7]>>>8&255,e[7]&255];return Ua(s)}if(e[0]===8193&&e[1]===3512)return!0;if(e[0]===100&&e[1]===65435&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===0){let s=[e[6]>>>8&255,e[6]&255,e[7]>>>8&255,e[7]&255];return Ua(s)}if(e[0]===100&&e[1]===65435&&e[2]===1)return!0;if(e[0]===8194){let s=[e[1]>>>8&255,e[1]&255,e[2]>>>8&255,e[2]&255];return Ua(s)}return!1}function O7(e){let t=[];for(let n of e){if(typeof n!="string"&&(n===null||typeof n!="object"||!("url"in n)||typeof n.url!="string")){t.push('Invalid allow-list entry: must be a string URL or an object with a "url" string property');continue}let r=I7(n);if(!Nf(r)){t.push(`Invalid URL in allow-list: "${r}" - must be a valid URL with scheme and host (e.g., "https://example.com")`);continue}let i=new URL(r);if(i.protocol!=="http:"&&i.protocol!=="https:"){t.push(`Only http and https URLs are allowed in allow-list: "${r}"`);continue}if(!i.hostname){t.push(`Allow-list entry must include a hostname: "${r}"`);continue}if(i.pathname!=="/"&&i.pathname!==""&&N7(i.pathname)){t.push(`Allow-list entry contains ambiguous path separators: "${r}"`);continue}(i.search||i.hash)&&t.push(`Query strings and fragments are ignored in allow-list entries: "${r}"`)}return t}var Ba=null,Tf=null,R7=!1;function bv(){if(R7||(!Ba||!Tf))return;R7=!0;let e=Ba,t=Tf.lookup;function n(...r){let s=r[0],i=e.getStore();if(typeof s!="string"||!i||i.hostname.toLowerCase()!==s.toLowerCase())return t.apply(this,r);let o={},a;if(r.length===2)a=r[1];else if(r.length>=3){let c=r[1];typeof c=="number"?o={family:c}:c&&typeof c=="object"&&(o=c),a=r[2]}if(typeof a!="function")return t.apply(this,r);let l=a;if(o.family!==void 0&&o.family!==0&&o.family!==i.family){let c=new Error(`ENOTFOUND ${s}`);c.code="ENOTFOUND",c.errno=-3008,c.syscall="getaddrinfo",c.hostname=s,process.nextTick(()=>l(c));return}process.nextTick(()=>{o.all?l(null,[{address:i.address,family:i.family}]):l(null,i.address,i.family)})}Object.defineProperty(Tf,"lookup",{value:n,writable:!0,configurable:!0})}function P7(e,t){return bv(),Ba?Ba.run(e,t):t()}var Pn=class extends Error{constructor(t,n){let r=n??"URL not in allow-list";super(`Network access denied: ${r}: ${t}`),this.name="NetworkAccessDeniedError"}},js=class extends Error{constructor(t){super(`Too many redirects (max: ${t})`),this.name="TooManyRedirectsError"}},Gs=class extends Error{constructor(t){super(`Redirect target not in allow-list: ${t}`),this.name="RedirectNotAllowedError"}},Wa=class extends Error{constructor(t,n){super(`HTTP method '${t}' not allowed. Allowed methods: ${n.join(", ")}`),this.name="MethodNotAllowedError"}},Vs=class extends Error{constructor(t){super(`Response body too large (max: ${t} bytes)`),this.name="ResponseTooLargeError"}};function xv(e){return new Promise((t,n)=>{v7(e,{all:!0},(r,s)=>{r?n(r):t(s)})})}var Ev=20,Av=3e4,Sv=10485760,Cv=["GET","HEAD"],vv=new Set(["GET","HEAD","OPTIONS"]),kv=new Set([301,302,303,307,308]);function Of(e){let t=e.allowedUrlPrefixes??[];if(!e.dangerouslyAllowFullInternetAccess){let h=O7(t);if(h.length>0)throw new Error(`Invalid network allow-list:
1469
1469
  ${h.join(`
1470
- `)}`)}let n=[];for(let h of t)typeof h=="object"&&h.transform&&h.transform.length>0&&n.push(h);function r(h){if(n.length===0)return null;let d=null;for(let m of n)if(If(h,m.url)&&m.transform){d||(d=new Headers);for(let g of m.transform)for(let[y,w]of Object.entries(g.headers))d.set(y,w)}return d}let s=e.maxRedirects??Ev,i=e.timeoutMs??Av,o=e.maxResponseSize??Sv,a=e.dangerouslyAllowFullInternetAccess?["GET","HEAD","POST","PUT","DELETE","PATCH","OPTIONS"]:e.allowedMethods??Cv,l=e.denyPrivateRanges??(typeof process<"u"&&!0),c=e._dnsResolve??xv;async function u(h){if(!e.dangerouslyAllowFullInternetAccess&&!$7(h,t))throw new Pn(h);if(l)try{let d=new URL(h);if($f(d.hostname))throw new Pn(h,"private/loopback IP address blocked");let m=d.hostname;if(/[a-zA-Z]/.test(m))try{let y=await c(m);for(let{address:b}of y)if($f(b))throw new Pn(h,"hostname resolves to private/loopback IP address");let w=y[0];if(w)return{hostname:m,address:w.address,family:w.family===6?6:4}}catch(y){if(y instanceof Pn)throw y;let w=y?.code;if(!(w==="ENOTFOUND"||w==="ENODATA"))throw new Pn(h,"DNS resolution failed for private IP check")}}catch(d){if(d instanceof Pn)throw d}return null}function f(h){if(e.dangerouslyAllowFullInternetAccess)return;let d=h.toUpperCase();if(!a.includes(d))throw new Wa(d,a)}async function p(h,d={}){let m=d.method?.toUpperCase()??"GET",g=await u(h);f(m);let y=h,w=0,b=d.followRedirects??!0,x=d.timeoutMs!==void 0?Math.min(d.timeoutMs,i):i;for(;;){let S=new AbortController,v=Ir(()=>S.abort(),x);try{let $=await Et.runTrustedAsync(()=>{let _=r(y),R=Nv(d.headers,_),P={method:m,headers:R,signal:S.signal,redirect:"manual"};return d.body&&!vv.has(m)&&(P.body=d.body),g?P7(g,()=>fetch(y,P)):fetch(y,P)});if(kv.has($.status)&&b){let _=$.headers.get("location");if(!_)return await D7($,y,o);let R=new URL(_,y).href;try{g=await u(R)}catch{throw new Gs(R)}if(w++,w>s)throw new js(s);y=R;continue}return await D7($,y,o)}finally{ts(v)}}}return p}function Nv(e,t){if(!e&&!t)return;if(!t)return e;let n=e instanceof Headers?new Headers(e):new Headers(e);for(let[r,s]of t)n.set(r,s);return n}async function D7(e,t,n){let r=Object.create(null);if(e.headers.forEach((i,o)=>{r[o.toLowerCase()]=i}),n>0){let i=e.headers.get("content-length");if(i){let o=parseInt(i,10);if(!Number.isNaN(o)&&o>n)throw new Vs(n)}}let s;if(n>0&&e.body){let i=e.body.getReader(),o=[],a=0;for(;;){let{done:c,value:u}=await i.read();if(c)break;if(u){if(a+=u.byteLength,a>n)throw i.cancel(),new Vs(n);o.push(u)}}s=new Uint8Array(a);let l=0;for(let c of o)s.set(c,l),l+=c.byteLength}else{let i=await e.arrayBuffer();if(n>0&&i.byteLength>n)throw new Vs(n);s=new Uint8Array(i)}return{status:e.status,statusText:e.statusText,headers:r,body:s,url:t}}gr();ct();un();function _7(e){return Jr(e)}function Jr(e){return e.statements.map(F7).join(`
1470
+ `)}`)}let n=[];for(let h of t)typeof h=="object"&&h.transform&&h.transform.length>0&&n.push(h);function r(h){if(n.length===0)return null;let d=null;for(let m of n)if(If(h,m.url)&&m.transform){d||(d=new Headers);for(let g of m.transform)for(let[y,w]of Object.entries(g.headers))d.set(y,w)}return d}let s=e.maxRedirects??Ev,i=e.timeoutMs??Av,o=e.maxResponseSize??Sv,a=e.dangerouslyAllowFullInternetAccess?["GET","HEAD","POST","PUT","DELETE","PATCH","OPTIONS"]:e.allowedMethods??Cv,l=e.denyPrivateRanges??(typeof process<"u"&&!0),c=e._dnsResolve??xv;async function u(h){if(!e.dangerouslyAllowFullInternetAccess&&!$7(h,t))throw new Pn(h);if(l)try{let d=new URL(h);if($f(d.hostname))throw new Pn(h,"private/loopback IP address blocked");let m=d.hostname;if(/[a-zA-Z]/.test(m))try{let y=await c(m);for(let{address:b}of y)if($f(b))throw new Pn(h,"hostname resolves to private/loopback IP address");let w=y[0];if(w)return{hostname:m,address:w.address,family:w.family===6?6:4}}catch(y){if(y instanceof Pn)throw y;let w=y?.code;if(!(w==="ENOTFOUND"||w==="ENODATA"))throw new Pn(h,"DNS resolution failed for private IP check")}}catch(d){if(d instanceof Pn)throw d}return null}function f(h){if(e.dangerouslyAllowFullInternetAccess)return;let d=h.toUpperCase();if(!a.includes(d))throw new Wa(d,a)}async function p(h,d={}){let m=d.method?.toUpperCase()??"GET",g=await u(h);f(m);let y=h,w=0,b=d.followRedirects??!0,x=d.timeoutMs!==void 0?Math.min(d.timeoutMs,i):i;for(;;){let S=new AbortController,v=Ir(()=>S.abort(),x);try{let $=await Et.runTrustedAsync(()=>{let D=r(y),O=Nv(d.headers,D),P={method:m,headers:O,signal:S.signal,redirect:"manual"};return d.body&&!vv.has(m)&&(P.body=d.body),g?P7(g,()=>fetch(y,P)):fetch(y,P)});if(kv.has($.status)&&b){let D=$.headers.get("location");if(!D)return await D7($,y,o);let O=new URL(D,y).href;try{g=await u(O)}catch{throw new Gs(O)}if(w++,w>s)throw new js(s);y=O;continue}return await D7($,y,o)}finally{ts(v)}}}return p}function Nv(e,t){if(!e&&!t)return;if(!t)return e;let n=e instanceof Headers?new Headers(e):new Headers(e);for(let[r,s]of t)n.set(r,s);return n}async function D7(e,t,n){let r=Object.create(null);if(e.headers.forEach((i,o)=>{r[o.toLowerCase()]=i}),n>0){let i=e.headers.get("content-length");if(i){let o=parseInt(i,10);if(!Number.isNaN(o)&&o>n)throw new Vs(n)}}let s;if(n>0&&e.body){let i=e.body.getReader(),o=[],a=0;for(;;){let{done:c,value:u}=await i.read();if(c)break;if(u){if(a+=u.byteLength,a>n)throw i.cancel(),new Vs(n);o.push(u)}}s=new Uint8Array(a);let l=0;for(let c of o)s.set(c,l),l+=c.byteLength}else{let i=await e.arrayBuffer();if(n>0&&i.byteLength>n)throw new Vs(n);s=new Uint8Array(i)}return{status:e.status,statusText:e.statusText,headers:r,body:s,url:t}}gr();ct();un();function _7(e){return Jr(e)}function Jr(e){return e.statements.map(F7).join(`
1471
1471
  `)}function F7(e){let t=[];for(let r=0;r<e.pipelines.length;r++)t.push(Iv(e.pipelines[r])),r<e.operators.length&&t.push(e.operators[r]);let n=t.join(" ");return e.background&&(n+=" &"),n}function Iv(e){let t=[];e.timed&&t.push(e.timePosix?"time -p":"time"),e.negated&&t.push("!");let n=[];for(let s=0;s<e.commands.length;s++)if(n.push(L7(e.commands[s])),s<e.commands.length-1){let i=e.pipeStderr?.[s];n.push(i?"|&":"|")}return(t.length>0?`${t.join(" ")} `:"")+n.join(" ")}function L7(e){switch(e.type){case"SimpleCommand":return $v(e);case"If":return Mv(e);case"For":return Uv(e);case"CStyleFor":return Bv(e);case"While":return Wv(e);case"Until":return zv(e);case"Case":return Hv(e);case"Subshell":return Gv(e);case"Group":return Vv(e);case"ArithmeticCommand":return qv(e);case"ConditionalCommand":return Zv(e);case"FunctionDef":return Kv(e);default:{let t=e;throw new Error(`Unsupported command type: ${t.type}`)}}}function $v(e){let t=[];for(let n of e.assignments)t.push(Tv(n));e.name&&t.push(Wt(e.name));for(let n of e.args)t.push(Wt(n));for(let n of e.redirections)t.push(B7(n));return t.join(" ")}function Tv(e){let t=e.append?"+=":"=";if(e.array){let n=e.array.map(Wt).join(" ");return`${e.name}${t}(${n})`}return e.value?`${e.name}${t}${Wt(e.value)}`:`${e.name}${t}`}function Wt(e){return e.parts.map(t=>za(t,!1)).join("")}function kr(e){return e.parts.map(t=>za(t,!0)).join("")}function za(e,t){switch(e.type){case"Literal":return t?Rv(e.value):Ov(e.value);case"SingleQuoted":return`'${e.value}'`;case"DoubleQuoted":return`"${e.parts.map(n=>za(n,!0)).join("")}"`;case"Escaped":return`\\${e.value}`;case"ParameterExpansion":return M7(e);case"CommandSubstitution":return e.legacy?`\`${Jr(e.body)}\``:`$(${Jr(e.body)})`;case"ArithmeticExpansion":return`$((${qe(e.expression.expression)}))`;case"ProcessSubstitution":return e.direction==="input"?`<(${Jr(e.body)})`:`>(${Jr(e.body)})`;case"BraceExpansion":return Fv(e);case"TildeExpansion":return e.user!==null?`~${e.user}`:"~";case"Glob":return e.pattern;default:{let n=e;throw new Error(`Unsupported word part type: ${n.type}`)}}}function Ov(e){return e.replace(/[\s\\'"`!|&;()<>{}[\]*?~#]/g,"\\$&")}function Rv(e){return e.replace(/[$`"\\]/g,"\\$&")}function Pv(e,t){return e.parts.map(n=>Dv(n,t)).join("")}function Dv(e,t){switch(e.type){case"Literal":return t?e.value:e.value.replace(/[$`]/g,"\\$&");case"Escaped":return`\\${e.value}`;case"ParameterExpansion":return M7(e);case"CommandSubstitution":return e.legacy?`\`${Jr(e.body)}\``:`$(${Jr(e.body)})`;case"ArithmeticExpansion":return`$((${qe(e.expression.expression)}))`;default:return za(e,!1)}}function M7(e){return e.operation?`\${${U7(e.parameter,e.operation)}}`:_v(e.parameter)?`\${${e.parameter}}`:`$${e.parameter}`}function _v(e){return!(/^[?#@*$!\-0-9]$/.test(e)||/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e))}function U7(e,t){switch(t.type){case"Length":return`#${e}`;case"LengthSliceError":return`#${e}:`;case"BadSubstitution":return t.text;case"DefaultValue":return`${e}${t.checkEmpty?":":""}-${kr(t.word)}`;case"AssignDefault":return`${e}${t.checkEmpty?":":""}=${kr(t.word)}`;case"ErrorIfUnset":return`${e}${t.checkEmpty?":":""}?${t.word?kr(t.word):""}`;case"UseAlternative":return`${e}${t.checkEmpty?":":""}+${kr(t.word)}`;case"Substring":{let n=qe(t.offset.expression);return t.length?`${e}:${n}:${qe(t.length.expression)}`:`${e}:${n}`}case"PatternRemoval":{let n=t.side==="prefix"?"#":"%",r=t.greedy?`${n}${n}`:n;return`${e}${r}${kr(t.pattern)}`}case"PatternReplacement":{let n="/";t.all?n="//":t.anchor==="start"?n="/#":t.anchor==="end"&&(n="/%");let r=t.replacement?`/${kr(t.replacement)}`:"";return`${e}${n}${kr(t.pattern)}${r}`}case"CaseModification":{let n=t.direction==="upper"?"^":",",r=t.all?`${n}${n}`:n,s=t.pattern?kr(t.pattern):"";return`${e}${r}${s}`}case"Transform":return`${e}@${t.operator}`;case"Indirection":return t.innerOp?`!${U7(e,t.innerOp)}`:`!${e}`;case"ArrayKeys":return`!${t.array}[${t.star?"*":"@"}]`;case"VarNamePrefix":return`!${t.prefix}${t.star?"*":"@"}`;default:{let n=t;throw new Error(`Unsupported parameter operation type: ${n.type}`)}}}function Fv(e){return`{${e.items.map(Lv).join(",")}}`}function Lv(e){if(e.type==="Word")return Wt(e.word);let t=e.startStr??String(e.start),n=e.endStr??String(e.end);return e.step!==void 0?`${t}..${n}..${e.step}`:`${t}..${n}`}function B7(e){let t=e.fdVariable?`{${e.fdVariable}}`:e.fd!==null?String(e.fd):"";if(e.operator==="<<"||e.operator==="<<-"){let n=e.target,r=n.quoted?`'${n.delimiter}'`:n.delimiter,s=Pv(n.content,n.quoted);return`${t}${e.operator}${r}
1472
1472
  ${s}${n.delimiter}`}return e.operator==="<<<"?`${t}<<< ${Wt(e.target)}`:e.operator==="&>"||e.operator==="&>>"?`${e.operator} ${Wt(e.target)}`:`${t}${e.operator} ${Wt(e.target)}`}function Dn(e){return e.length===0?"":` ${e.map(B7).join(" ")}`}function bn(e){return e.map(F7).join(`
1473
1473
  `)}function Mv(e){let t=[];for(let n=0;n<e.clauses.length;n++){let r=e.clauses[n],s=n===0?"if":"elif";t.push(`${s} ${bn(r.condition)}; then