=0;ye--){var A=e.charCodeAt(ye);if(A===Vh||A===Gh)break;if(A===as||A===rl){y=ye;break}else if(ua(A)){y=ye+(r?1:0);break}}var pe=e.slice(0,y);return IE(e,y)||(pe+=r),m(pe)}}else if(h>l)return m(e.slice(0,y));return e}function yM(e,t,i){for(var a=i.indicator,s=a===void 0?"\u2026":a,n=i.maxLines,r=n===void 0?1/0:n,o=s.length,l=1,u=0,p=e.length;ut));u++){var d=e.charCodeAt(u);if(d===as){if(l++,l>r)break}else if((d&64512)==55296){var h=e.charCodeAt(u+1);(h&64512)==56320&&u++}}if(o>t){var f=RE(e,u);if(s){var b=u+f.length;if(b===e.length)return e;if(e.charCodeAt(b)===as)return e.slice(0,u+f.length)}if(!i.breakWords)for(var m=u-s.length;m>=0;m--){var d=e.charCodeAt(m);if(d===as){u=m,f=`
`;break}else if(ua(d)){u=m+(s?1:0);break}}return e.slice(0,u)+(f===`
-`?"":s)}else if(l>r)return e.slice(0,u);return e}function vM(e,t){for(var i=e.length,a=t;a=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function IE(e,t){var i=e.charCodeAt(t);if(i===as)return!0;if(i===rl){var a="("+jE.join("|")+"|br)",s=new RegExp("^<"+a+`[
+`?"":s)}else if(l>r)return e.slice(0,u);return e}function vM(e,t){for(var i=e.length,a=t;a=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function IE(e,t){var i=e.charCodeAt(t);if(i===as)return!0;if(i===rl){var a="("+jE.join("|")+"|br)",s=new RegExp("^<"+a+`[
\f\r ]*/?>`,"i");return s.test(e.slice(t))}else return!1}function ua(e){return e===9||e===10||e===12||e===13||e===32}function xM(e){for(var t=e.length-1;t>=0;t--){var i=e[t];if(i==="li"||i==="td")return!1;if(i==="ol"||i==="table"||i==="ul")return!0}return!1}function wM(e){return e.trim().replace(mM," ")}function RE(e,t){var i=e.charCodeAt(t);if((i&64512)==55296){var a=e.charCodeAt(t+1);if((a&64512)==56320)return String.fromCharCode(i,a)}return String.fromCharCode(i)}function _M(e,t){var i=RE(e,t);if(i==="&")for(;;){t++;var a=e.charCodeAt(t);if(OE(a))i+=String.fromCharCode(a);else if(a===Gh){i+=String.fromCharCode(a);break}else break}return i}});var ME=R((FU,FE)=>{"use strict";FE.exports=e=>{let t=typeof e=="string"?`
`:`
`.charCodeAt(),i=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===i&&(e=e.slice(0,e.length-1)),e}});var qE=R((MU,On)=>{"use strict";var jn=require("path"),LE=pu(),BE=e=>{e=me({cwd:process.cwd(),path:process.env[LE()],execPath:process.execPath},e);let t,i=jn.resolve(e.cwd),a=[];for(;t!==i;)a.push(jn.join(i,"node_modules/.bin")),t=i,i=jn.resolve(i,"..");let s=jn.resolve(e.cwd,e.execPath,"..");return a.push(s),a.concat(e.path).join(jn.delimiter)};On.exports=BE;On.exports.default=BE;On.exports.env=e=>{e=me({env:process.env},e);let t=me({},e.env),i=LE({env:t});return e.path=t[i],t[i]=On.exports(e),t}});var UE=R((LU,Wh)=>{"use strict";var zE=(e,t)=>{for(let i of Reflect.ownKeys(t))Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i));return e};Wh.exports=zE;Wh.exports.default=zE});var GE=R((BU,ll)=>{"use strict";var SM=UE(),ol=new WeakMap,HE=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,a=0,s=e.displayName||e.name||"",n=function(...r){if(ol.set(n,++a),a===1)i=e.apply(this,r),e=null;else if(t.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return i};return SM(n,e),ol.set(n,a),n};ll.exports=HE;ll.exports.default=HE;ll.exports.callCount=e=>{if(!ol.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ol.get(e)}});var VE=R(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.SIGNALS=void 0;var EM=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];cl.SIGNALS=EM});var Xh=R(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.SIGRTMAX=ss.getRealtimeSignals=void 0;var kM=function(){let e=$E-JE+1;return Array.from({length:e},AM)};ss.getRealtimeSignals=kM;var AM=function(e,t){return{name:`SIGRT${t+1}`,number:JE+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},JE=34,$E=64;ss.SIGRTMAX=$E});var WE=R(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.getSignals=void 0;var CM=require("os"),TM=VE(),jM=Xh(),OM=function(){let e=(0,jM.getRealtimeSignals)();return[...TM.SIGNALS,...e].map(IM)};ul.getSignals=OM;var IM=function({name:e,number:t,description:i,action:a,forced:s=!1,standard:n}){let{signals:{[e]:r}}=CM.constants,o=r!==void 0;return{name:e,number:o?r:t,description:i,supported:o,action:a,forced:s,standard:n}}});var KE=R(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.signalsByNumber=ns.signalsByName=void 0;var RM=require("os"),XE=WE(),PM=Xh(),NM=function(){return(0,XE.getSignals)().reduce(DM,{})},DM=function(e,{name:t,number:i,description:a,supported:s,action:n,forced:r,standard:o}){return ke(me({},e),{[t]:{name:t,number:i,description:a,supported:s,action:n,forced:r,standard:o}})},FM=NM();ns.signalsByName=FM;var MM=function(){let e=(0,XE.getSignals)(),t=PM.SIGRTMAX+1,i=Array.from({length:t},(a,s)=>LM(s,e));return Object.assign({},...i)},LM=function(e,t){let i=BM(e,t);if(i===void 0)return{};let{name:a,description:s,supported:n,action:r,forced:o,standard:l}=i;return{[e]:{name:a,number:e,description:s,supported:n,action:r,forced:o,standard:l}}},BM=function(e,t){let i=t.find(({name:a})=>RM.constants.signals[a]===e);return i!==void 0?i:t.find(a=>a.number===e)},qM=MM();ns.signalsByNumber=qM});var YE=R((GU,ZE)=>{"use strict";var{signalsByName:zM}=KE(),UM=({timedOut:e,timeout:t,errorCode:i,signal:a,signalDescription:s,exitCode:n,isCanceled:r})=>e?`timed out after ${t} milliseconds`:r?"was canceled":i!==void 0?`failed with ${i}`:a!==void 0?`was killed with ${a} (${s})`:n!==void 0?`failed with exit code ${n}`:"failed",HM=({stdout:e,stderr:t,all:i,error:a,signal:s,exitCode:n,command:r,escapedCommand:o,timedOut:l,isCanceled:u,killed:p,parsed:{options:{timeout:d}}})=>{n=n===null?void 0:n,s=s===null?void 0:s;let h=s===void 0?void 0:zM[s].description,f=a&&a.code,m=`Command ${UM({timedOut:l,timeout:d,errorCode:f,signal:s,signalDescription:h,exitCode:n,isCanceled:u})}: ${r}`,y=Object.prototype.toString.call(a)==="[object Error]",g=y?`${m}
diff --git a/docs/.obsidian/plugins/obsidian-pandoc-reference-list/styles.css b/docs/.obsidian/plugins/obsidian-pandoc-reference-list/styles.css
index 4d5f0e8..947994a 100644
--- a/docs/.obsidian/plugins/obsidian-pandoc-reference-list/styles.css
+++ b/docs/.obsidian/plugins/obsidian-pandoc-reference-list/styles.css
@@ -3,7 +3,7 @@
name: Pandoc Reference List
id: pandoc-reference-list
settings:
- -
+ -
id: pwc-font-size
title: Sidebar reference list font size
type: variable-number-slider
@@ -12,7 +12,7 @@ settings:
min: 8
max: 24
step: 1
- -
+ -
id: pwc-tooltip-font-size
title: Tooltip citation font size
type: variable-number-slider
@@ -21,14 +21,14 @@ settings:
min: 8
max: 24
step: 1
- -
+ -
id: pwc-citation-color
title: Citation color
type: variable-themed-color
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
- -
+ -
id: pwc-citation-color-missing
title: Unresolved citation color
description: This color will be applied if a citekey is not found in your bibliography file
@@ -36,14 +36,14 @@ settings:
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
- -
+ -
id: pwc-citation-underline-color
title: Citation underline color
type: variable-themed-color
format: hex
default-light: '#705dcf'
default-dark: '#7f6df2'
- -
+ -
id: pwc-citation-underline-color-missing
title: Unresolved citation underline color
description: This color will be applied if a citekey is not found in your bibliography file
@@ -51,7 +51,7 @@ settings:
format: hex
default-light: '#'
default-dark: '#'
- -
+ -
id: pwc-citation-formatting-color
title: Citation formatting color
description: Changes the color of brackets and semicolons
@@ -59,7 +59,7 @@ settings:
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
- -
+ -
id: pwc-citation-extra-color
title: 'Citation "extra" color'
description: 'Changes the color text within a citation, eg. "pp. 22-24"'
diff --git a/docs/.obsidian/plugins/obsidian-pandoc/data.json b/docs/.obsidian/plugins/obsidian-pandoc/data.json
index ec20802..9095326 100644
--- a/docs/.obsidian/plugins/obsidian-pandoc/data.json
+++ b/docs/.obsidian/plugins/obsidian-pandoc/data.json
@@ -12,4 +12,4 @@
"outputFolder": null,
"extraArguments": "--mathjax --citeproc\n--template=template.tex\n\n--filter=table_filter.py\n",
"exportFrom": "md"
-}
\ No newline at end of file
+}
diff --git a/docs/.obsidian/plugins/obsidian-pandoc/manifest.json b/docs/.obsidian/plugins/obsidian-pandoc/manifest.json
index 8e570d2..9fb116b 100644
--- a/docs/.obsidian/plugins/obsidian-pandoc/manifest.json
+++ b/docs/.obsidian/plugins/obsidian-pandoc/manifest.json
@@ -7,4 +7,4 @@
"author": "Oliver Balfour",
"authorUrl": "https://github.com/OliverBalfour/obsidian-pandoc",
"isDesktopOnly": true
-}
\ No newline at end of file
+}
diff --git a/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/data.json b/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/data.json
index ef7cb8e..3c4cfbf 100644
--- a/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/data.json
+++ b/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/data.json
@@ -25,4 +25,4 @@
"openNoteAfterImport": true,
"whichNotesToOpenAfterImport": "first-imported-note",
"shouldConcat": true
-}
\ No newline at end of file
+}
diff --git a/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/main.js b/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/main.js
index d5d8368..744e148 100644
--- a/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/main.js
+++ b/docs/.obsidian/plugins/obsidian-zotero-desktop-connector/main.js
@@ -18,7 +18,7 @@ if(`+w+") { cb("+w+"); return; }"},x._tmpid=function(){return this.lastId++,"t_"
else {`),this._withScopedSyntax(function(){y.compile(g.else_,w),C&&y._emit("cb()")})):C&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},x.compileIfAsync=function(g,w){this._emit("(function(cb) {"),this.compileIf(g,w,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},x._emitLoopBindings=function(g,w,C,y){var S=this,A=[{name:"index",val:C+" + 1"},{name:"index0",val:C},{name:"revindex",val:y+" - "+C},{name:"revindex0",val:y+" - "+C+" - 1"},{name:"first",val:C+" === 0"},{name:"last",val:C+" === "+y+" - 1"},{name:"length",val:y}];A.forEach(function(_){S._emitLine('frame.set("loop.'+_.name+'", '+_.val+");")})},x.compileFor=function(g,w){var C=this,y=this._tmpid(),S=this._tmpid(),A=this._tmpid();if(w=w.push(),this._emitLine("frame = frame.push();"),this._emit("var "+A+" = "),this._compileExpression(g.arr,w),this._emitLine(";"),this._emit("if("+A+") {"),this._emitLine(A+" = runtime.fromIterator("+A+");"),g.name instanceof s.Array){this._emitLine("var "+y+";"),this._emitLine("if(runtime.isArray("+A+")) {"),this._emitLine("var "+S+" = "+A+".length;"),this._emitLine("for("+y+"=0; "+y+" < "+A+".length; "+y+"++) {"),g.name.children.forEach(function(k,T){var N=C._tmpid();C._emitLine("var "+N+" = "+A+"["+y+"]["+T+"];"),C._emitLine('frame.set("'+k+'", '+A+"["+y+"]["+T+"]);"),w.set(g.name.children[T].value,N)}),this._emitLoopBindings(g,A,y,S),this._withScopedSyntax(function(){C.compile(g.body,w)}),this._emitLine("}"),this._emitLine("} else {");var _=g.name.children,P=_[0],F=_[1],B=this._tmpid(),j=this._tmpid();w.set(P.value,B),w.set(F.value,j),this._emitLine(y+" = -1;"),this._emitLine("var "+S+" = runtime.keys("+A+").length;"),this._emitLine("for(var "+B+" in "+A+") {"),this._emitLine(y+"++;"),this._emitLine("var "+j+" = "+A+"["+B+"];"),this._emitLine('frame.set("'+P.value+'", '+B+");"),this._emitLine('frame.set("'+F.value+'", '+j+");"),this._emitLoopBindings(g,A,y,S),this._withScopedSyntax(function(){C.compile(g.body,w)}),this._emitLine("}"),this._emitLine("}")}else{var L=this._tmpid();w.set(g.name.value,L),this._emitLine("var "+S+" = "+A+".length;"),this._emitLine("for(var "+y+"=0; "+y+" < "+A+".length; "+y+"++) {"),this._emitLine("var "+L+" = "+A+"["+y+"];"),this._emitLine('frame.set("'+g.name.value+'", '+L+");"),this._emitLoopBindings(g,A,y,S),this._withScopedSyntax(function(){C.compile(g.body,w)}),this._emitLine("}")}this._emitLine("}"),g.else_&&(this._emitLine("if (!"+S+") {"),this.compile(g.else_,w),this._emitLine("}")),this._emitLine("frame = frame.pop();")},x._compileAsyncLoop=function(g,w,C){var y=this,S=this._tmpid(),A=this._tmpid(),_=this._tmpid(),P=C?"asyncAll":"asyncEach";if(w=w.push(),this._emitLine("frame = frame.push();"),this._emit("var "+_+" = runtime.fromIterator("),this._compileExpression(g.arr,w),this._emitLine(");"),g.name instanceof s.Array){var F=g.name.children.length;this._emit("runtime."+P+"("+_+", "+F+", function("),g.name.children.forEach(function(L){y._emit(L.value+",")}),this._emit(S+","+A+",next) {"),g.name.children.forEach(function(L){var k=L.value;w.set(k,k),y._emitLine('frame.set("'+k+'", '+k+");")})}else{var B=g.name.value;this._emitLine("runtime."+P+"("+_+", 1, function("+B+", "+S+", "+A+",next) {"),this._emitLine('frame.set("'+B+'", '+B+");"),w.set(B,B)}this._emitLoopBindings(g,_,S,A),this._withScopedSyntax(function(){var L;C&&(L=y._pushBuffer()),y.compile(g.body,w),y._emitLine("next("+S+(L?","+L:"")+");"),C&&y._popBuffer()});var j=this._tmpid();this._emitLine("}, "+this._makeCallback(j)),this._addScopeLevel(),C&&this._emitLine(this.buffer+" += "+j+";"),g.else_&&(this._emitLine("if (!"+_+".length) {"),this.compile(g.else_,w),this._emitLine("}")),this._emitLine("frame = frame.pop();")},x.compileAsyncEach=function(g,w){this._compileAsyncLoop(g,w)},x.compileAsyncAll=function(g,w){this._compileAsyncLoop(g,w,!0)},x._compileMacro=function(g,w){var C=this,y=[],S=null,A="macro_"+this._tmpid(),_=w!==void 0;g.args.children.forEach(function(k,T){T===g.args.children.length-1&&k instanceof s.Dict?S=k:(C.assertType(k,s.Symbol),y.push(k))});var P=[].concat(y.map(function(k){return"l_"+k.value}),["kwargs"]),F=y.map(function(k){return'"'+k.value+'"'}),B=(S&&S.children||[]).map(function(k){return'"'+k.key.value+'"'}),j;_?j=w.push(!0):j=new f,this._emitLines("var "+A+" = runtime.makeMacro(","["+F.join(", ")+"], ","["+B.join(", ")+"], ","function ("+P.join(", ")+") {","var callerFrame = frame;","frame = "+(_?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),y.forEach(function(k){C._emitLine('frame.set("'+k.value+'", l_'+k.value+");"),j.set(k.value,"l_"+k.value)}),S&&S.children.forEach(function(k){var T=k.key.value;C._emit('frame.set("'+T+'", '),C._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),C._emit(' ? kwargs["'+T+'"] : '),C._compileExpression(k.value,j),C._emit(");")});var L=this._pushBuffer();return this._withScopedSyntax(function(){C.compile(g.body,j)}),this._emitLine("frame = "+(_?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+L+");"),this._emitLine("});"),this._popBuffer(),A},x.compileMacro=function(g,w){var C=this._compileMacro(g),y=g.name.value;w.set(y,C),w.parent?this._emitLine('frame.set("'+y+'", '+C+");"):(g.name.value.charAt(0)!=="_"&&this._emitLine('context.addExport("'+y+'");'),this._emitLine('context.setVariable("'+y+'", '+C+");"))},x.compileCaller=function(g,w){this._emit("(function (){");var C=this._compileMacro(g,w);this._emit("return "+C+";})()")},x._compileGetTemplate=function(g,w,C,y){var S=this._tmpid(),A=this._templateName(),_=this._makeCallback(S),P=C?"true":"false",F=y?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(g.template,w),this._emitLine(", "+P+", "+A+", "+F+", "+_),S},x.compileImport=function(g,w){var C=g.target.value,y=this._compileGetTemplate(g,w,!1,!1);this._addScopeLevel(),this._emitLine(y+".getExported("+(g.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(y)),this._addScopeLevel(),w.set(C,y),w.parent?this._emitLine('frame.set("'+C+'", '+y+");"):this._emitLine('context.setVariable("'+C+'", '+y+");")},x.compileFromImport=function(g,w){var C=this,y=this._compileGetTemplate(g,w,!1,!1);this._addScopeLevel(),this._emitLine(y+".getExported("+(g.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(y)),this._addScopeLevel(),g.names.children.forEach(function(S){var A,_,P=C._tmpid();S instanceof s.Pair?(A=S.key.value,_=S.value.value):(A=S.value,_=A),C._emitLine("if(Object.prototype.hasOwnProperty.call("+y+', "'+A+'")) {'),C._emitLine("var "+P+" = "+y+"."+A+";"),C._emitLine("} else {"),C._emitLine(`cb(new Error("cannot import '`+A+`'")); return;`),C._emitLine("}"),w.set(_,P),w.parent?C._emitLine('frame.set("'+_+'", '+P+");"):C._emitLine('context.setVariable("'+_+'", '+P+");")})},x.compileBlock=function(g){var w=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+g.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(w)),this._emitLine(this.buffer+" += "+w+";"),this._addScopeLevel()},x.compileSuper=function(g,w){var C=g.blockName.value,y=g.symbol.value,S=this._makeCallback(y);this._emitLine('context.getSuper(env, "'+C+'", b_'+C+", frame, runtime, "+S),this._emitLine(y+" = runtime.markSafe("+y+");"),this._addScopeLevel(),w.set(y,y)},x.compileExtends=function(g,w){var C=this._tmpid(),y=this._compileGetTemplate(g,w,!0,!1);this._emitLine("parentTemplate = "+y),this._emitLine("for(var "+C+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+C+", parentTemplate.blocks["+C+"]);"),this._emitLine("}"),this._addScopeLevel()},x.compileInclude=function(g,w){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var C=this._compileGetTemplate(g,w,!1,g.ignoreMissing);this._emitLine("callback(null,"+C+");});"),this._emitLine("});");var y=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(y)),this._emitLine("callback(null,"+y+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},x.compileTemplateData=function(g,w){this.compileLiteral(g,w)},x.compileCapture=function(g,w){var C=this,y=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){C.compile(g.body,w)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=y},x.compileOutput=function(g,w){var C=this,y=g.children;y.forEach(function(S){S instanceof s.TemplateData?S.value&&(C._emit(C.buffer+" += "),C.compileLiteral(S,w),C._emitLine(";")):(C._emit(C.buffer+" += runtime.suppressValue("),C.throwOnUndefined&&C._emit("runtime.ensureDefined("),C.compile(S,w),C.throwOnUndefined&&C._emit(","+g.lineno+","+g.colno+")"),C._emit(`, env.opts.autoescape);
`))})},x.compileRoot=function(g,w){var C=this;w&&this.fail("compileRoot: root node can't have frame"),w=new f,this._emitFuncBegin(g,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(g,w),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var y=[],S=g.findAll(s.Block);S.forEach(function(A,_){var P=A.name.value;if(y.indexOf(P)!==-1)throw new Error('Block "'+P+'" defined more than once.');y.push(P),C._emitFuncBegin(A,"b_"+P);var F=new f;C._emitLine("var frame = frame.push(true);"),C.compile(A.body,F),C._emitFuncEnd()}),this._emitLine("return {"),S.forEach(function(A,_){var P="b_"+A.name.value;C._emitLine(P+": "+P+",")}),this._emitLine(`root: root
-};`)},x.compile=function(g,w){var C=this["compile"+g.typename];C?C.call(this,g,w):this.fail("compile: Cannot compile node: "+g.typename,g.lineno,g.colno)},x.getCode=function(){return this.codebuf.join("")},v}(b);e.exports={compile:function(v,x,E,g,w){w===void 0&&(w={});var C=new m(g,w.throwOnUndefined),y=(E||[]).map(function(A){return A.preprocess}).filter(function(A){return!!A}),S=y.reduce(function(A,_){return _(A)},v);return C.compile(o.transform(r.parse(S,E,w),x,g)),C.getCode()},Compiler:m}},function(e,t,a){"use strict";function n(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,i(l,u)}function i(l,u){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,p){return f.__proto__=p,f},i(l,u)}var r=a(4),o=a(1),s=o.EmitterObj;e.exports=function(l){n(u,l);function u(){return l.apply(this,arguments)||this}var c=u.prototype;return c.resolve=function(p,b){return r.resolve(r.dirname(p),b)},c.isRelative=function(p){return p.indexOf("./")===0||p.indexOf("../")===0},u}(s)},function(e,t,a){"use strict";function n(F,B){F.prototype=Object.create(B.prototype),F.prototype.constructor=F,i(F,B)}function i(F,B){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,k){return L.__proto__=k,L},i(F,B)}var r=a(12),o=a(15),s=a(0),l=a(5),u=a(18),c=a(10),f=c.FileSystemLoader,p=c.WebLoader,b=c.PrecompiledLoader,d=a(20),m=a(21),h=a(1),v=h.Obj,x=h.EmitterObj,E=a(2),g=E.handleError,w=E.Frame,C=a(22);function y(F,B,j){r(function(){F(B,j)})}var S={type:"code",obj:{root:function(B,j,L,k,T){try{T(null,"")}catch(N){T(g(N,null,null))}}}},A=function(F){n(B,F);function B(){return F.apply(this,arguments)||this}var j=B.prototype;return j.init=function(k,T){var N=this;T=this.opts=T||{},this.opts.dev=!!T.dev,this.opts.autoescape=T.autoescape!=null?T.autoescape:!0,this.opts.throwOnUndefined=!!T.throwOnUndefined,this.opts.trimBlocks=!!T.trimBlocks,this.opts.lstripBlocks=!!T.lstripBlocks,this.loaders=[],k?this.loaders=s.isArray(k)?k:[k]:f?this.loaders=[new f("views")]:p&&(this.loaders=[new p("/views")]),typeof window!="undefined"&&window.nunjucksPrecompiled&&this.loaders.unshift(new b(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],s._entries(u).forEach(function(M){var D=M[0],V=M[1];return N.addFilter(D,V)}),s._entries(d).forEach(function(M){var D=M[0],V=M[1];return N.addTest(D,V)})},j._initLoaders=function(){var k=this;this.loaders.forEach(function(T){T.cache={},typeof T.on=="function"&&(T.on("update",function(N,M){T.cache[N]=null,k.emit("update",N,M,T)}),T.on("load",function(N,M){k.emit("load",N,M,T)}))})},j.invalidateCache=function(){this.loaders.forEach(function(k){k.cache={}})},j.addExtension=function(k,T){return T.__name=k,this.extensions[k]=T,this.extensionsList.push(T),this},j.removeExtension=function(k){var T=this.getExtension(k);T&&(this.extensionsList=s.without(this.extensionsList,T),delete this.extensions[k])},j.getExtension=function(k){return this.extensions[k]},j.hasExtension=function(k){return!!this.extensions[k]},j.addGlobal=function(k,T){return this.globals[k]=T,this},j.getGlobal=function(k){if(typeof this.globals[k]=="undefined")throw new Error("global not found: "+k);return this.globals[k]},j.addFilter=function(k,T,N){var M=T;return N&&this.asyncFilters.push(k),this.filters[k]=M,this},j.getFilter=function(k){if(!this.filters[k])throw new Error("filter not found: "+k);return this.filters[k]},j.addTest=function(k,T){return this.tests[k]=T,this},j.getTest=function(k){if(!this.tests[k])throw new Error("test not found: "+k);return this.tests[k]},j.resolveTemplate=function(k,T,N){var M=k.isRelative&&T?k.isRelative(N):!1;return M&&k.resolve?k.resolve(T,N):N},j.getTemplate=function(k,T,N,M,D){var V=this,q=this,Z=null;if(k&&k.raw&&(k=k.raw),s.isFunction(N)&&(D=N,N=null,T=T||!1),s.isFunction(T)&&(D=T,T=!1),k instanceof P)Z=k;else{if(typeof k!="string")throw new Error("template names must be a string: "+k);for(var pe=0;pe0&&!this.skip(r.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",d.lineno,d.colno);var E=this.parsePrimary();if(E.value.charAt(0)==="_"&&this.fail("parseFrom: names starting with an underscore cannot be imported",E.lineno,E.colno),this.skipSymbol("as")){var g=this.parsePrimary();h.addChild(new o.Pair(E.lineno,E.colno,E,g))}else h.addChild(E);v=this.parseWithContext()}return new o.FromImport(d.lineno,d.colno,m,h,v)},p.parseBlock=function(){var d=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",d.lineno,d.colno);var m=new o.Block(d.lineno,d.colno);m.name=this.parsePrimary(),m.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",d.lineno,d.colno),this.advanceAfterBlockEnd(d.value),m.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(m.name.value);var h=this.peekToken();return h||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(h.value),m},p.parseExtends=function(){var d="extends",m=this.peekToken();this.skipSymbol(d)||this.fail("parseTemplateRef: expected "+d);var h=new o.Extends(m.lineno,m.colno);return h.template=this.parseExpression(),this.advanceAfterBlockEnd(m.value),h},p.parseInclude=function(){var d="include",m=this.peekToken();this.skipSymbol(d)||this.fail("parseInclude: expected "+d);var h=new o.Include(m.lineno,m.colno);return h.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(h.ignoreMissing=!0),this.advanceAfterBlockEnd(m.value),h},p.parseIf=function(){var d=this.peekToken(),m;this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?m=new o.If(d.lineno,d.colno):this.skipSymbol("ifAsync")?m=new o.IfAsync(d.lineno,d.colno):this.fail("parseIf: expected if, elif, or elseif",d.lineno,d.colno),m.cond=this.parseExpression(),this.advanceAfterBlockEnd(d.value),m.body=this.parseUntilBlocks("elif","elseif","else","endif");var h=this.peekToken();switch(h&&h.value){case"elseif":case"elif":m.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),m.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":m.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return m},p.parseSet=function(){var d=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",d.lineno,d.colno);for(var m=new o.Set(d.lineno,d.colno,[]),h;(h=this.parsePrimary())&&(m.targets.push(h),!!this.skip(r.TOKEN_COMMA)););return this.skipValue(r.TOKEN_OPERATOR,"=")?(m.value=this.parseExpression(),this.advanceAfterBlockEnd(d.value)):this.skip(r.TOKEN_BLOCK_END)?(m.body=new o.Capture(d.lineno,d.colno,this.parseUntilBlocks("endset")),m.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",d.lineno,d.colno),m},p.parseSwitch=function(){var d="switch",m="endswitch",h="case",v="default",x=this.peekToken();!this.skipSymbol(d)&&!this.skipSymbol(h)&&!this.skipSymbol(v)&&this.fail('parseSwitch: expected "switch," "case" or "default"',x.lineno,x.colno);var E=this.parseExpression();this.advanceAfterBlockEnd(d),this.parseUntilBlocks(h,v,m);var g=this.peekToken(),w=[],C;do{this.skipSymbol(h);var y=this.parseExpression();this.advanceAfterBlockEnd(d);var S=this.parseUntilBlocks(h,v,m);w.push(new o.Case(g.line,g.col,y,S)),g=this.peekToken()}while(g&&g.value===h);switch(g.value){case v:this.advanceAfterBlockEnd(),C=this.parseUntilBlocks(m),this.advanceAfterBlockEnd();break;case m:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(x.lineno,x.colno,E,w,C)},p.parseStatement=function(){var d=this.peekToken(),m;if(d.type!==r.TOKEN_SYMBOL&&this.fail("tag name expected",d.lineno,d.colno),this.breakOnBlocks&&l.indexOf(this.breakOnBlocks,d.value)!==-1)return null;switch(d.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var h=0;h0;){var w=E[0],C=E[1],y=E[2];y===d?v+=1:y===m&&(v-=1),v===0?(x+=C,this.tokens.backN(w.length-C.length)):x+=w}return new o.Output(g.lineno,g.colno,[new o.TemplateData(g.lineno,g.colno,x)])},p.parsePostfix=function(d){for(var m,h=this.peekToken();h;){if(h.type===r.TOKEN_LEFT_PAREN)d=new o.FunCall(h.lineno,h.colno,d,this.parseSignature());else if(h.type===r.TOKEN_LEFT_BRACKET)m=this.parseAggregate(),m.children.length>1&&this.fail("invalid index"),d=new o.LookupVal(h.lineno,h.colno,d,m.children[0]);else if(h.type===r.TOKEN_OPERATOR&&h.value==="."){this.nextToken();var v=this.nextToken();v.type!==r.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+v.value,v.lineno,v.colno),m=new o.Literal(v.lineno,v.colno,v.value),d=new o.LookupVal(h.lineno,h.colno,d,m)}else break;h=this.peekToken()}return d},p.parseExpression=function(){var d=this.parseInlineIf();return d},p.parseInlineIf=function(){var d=this.parseOr();if(this.skipSymbol("if")){var m=this.parseOr(),h=d;d=new o.InlineIf(d.lineno,d.colno),d.body=h,d.cond=m,this.skipSymbol("else")?d.else_=this.parseOr():d.else_=null}return d},p.parseOr=function(){for(var d=this.parseAnd();this.skipSymbol("or");){var m=this.parseAnd();d=new o.Or(d.lineno,d.colno,d,m)}return d},p.parseAnd=function(){for(var d=this.parseNot();this.skipSymbol("and");){var m=this.parseNot();d=new o.And(d.lineno,d.colno,d,m)}return d},p.parseNot=function(){var d=this.peekToken();return this.skipSymbol("not")?new o.Not(d.lineno,d.colno,this.parseNot()):this.parseIn()},p.parseIn=function(){for(var d=this.parseIs();;){var m=this.nextToken();if(!m)break;var h=m.type===r.TOKEN_SYMBOL&&m.value==="not";if(h||this.pushToken(m),this.skipSymbol("in")){var v=this.parseIs();d=new o.In(d.lineno,d.colno,d,v),h&&(d=new o.Not(d.lineno,d.colno,d))}else{h&&this.pushToken(m);break}}return d},p.parseIs=function(){var d=this.parseCompare();if(this.skipSymbol("is")){var m=this.skipSymbol("not"),h=this.parseCompare();d=new o.Is(d.lineno,d.colno,d,h),m&&(d=new o.Not(d.lineno,d.colno,d))}return d},p.parseCompare=function(){for(var d=["==","===","!=","!==","<",">","<=",">="],m=this.parseConcat(),h=[];;){var v=this.nextToken();if(v)if(d.indexOf(v.value)!==-1)h.push(new o.CompareOperand(v.lineno,v.colno,this.parseConcat(),v.value));else{this.pushToken(v);break}else break}return h.length?new o.Compare(h[0].lineno,h[0].colno,m,h):m},p.parseConcat=function(){for(var d=this.parseAdd();this.skipValue(r.TOKEN_TILDE,"~");){var m=this.parseAdd();d=new o.Concat(d.lineno,d.colno,d,m)}return d},p.parseAdd=function(){for(var d=this.parseSub();this.skipValue(r.TOKEN_OPERATOR,"+");){var m=this.parseSub();d=new o.Add(d.lineno,d.colno,d,m)}return d},p.parseSub=function(){for(var d=this.parseMul();this.skipValue(r.TOKEN_OPERATOR,"-");){var m=this.parseMul();d=new o.Sub(d.lineno,d.colno,d,m)}return d},p.parseMul=function(){for(var d=this.parseDiv();this.skipValue(r.TOKEN_OPERATOR,"*");){var m=this.parseDiv();d=new o.Mul(d.lineno,d.colno,d,m)}return d},p.parseDiv=function(){for(var d=this.parseFloorDiv();this.skipValue(r.TOKEN_OPERATOR,"/");){var m=this.parseFloorDiv();d=new o.Div(d.lineno,d.colno,d,m)}return d},p.parseFloorDiv=function(){for(var d=this.parseMod();this.skipValue(r.TOKEN_OPERATOR,"//");){var m=this.parseMod();d=new o.FloorDiv(d.lineno,d.colno,d,m)}return d},p.parseMod=function(){for(var d=this.parsePow();this.skipValue(r.TOKEN_OPERATOR,"%");){var m=this.parsePow();d=new o.Mod(d.lineno,d.colno,d,m)}return d},p.parsePow=function(){for(var d=this.parseUnary();this.skipValue(r.TOKEN_OPERATOR,"**");){var m=this.parseUnary();d=new o.Pow(d.lineno,d.colno,d,m)}return d},p.parseUnary=function(d){var m=this.peekToken(),h;return this.skipValue(r.TOKEN_OPERATOR,"-")?h=new o.Neg(m.lineno,m.colno,this.parseUnary(!0)):this.skipValue(r.TOKEN_OPERATOR,"+")?h=new o.Pos(m.lineno,m.colno,this.parseUnary(!0)):h=this.parsePrimary(),d||(h=this.parseFilter(h)),h},p.parsePrimary=function(d){var m=this.nextToken(),h,v=null;if(m?m.type===r.TOKEN_STRING?h=m.value:m.type===r.TOKEN_INT?h=parseInt(m.value,10):m.type===r.TOKEN_FLOAT?h=parseFloat(m.value):m.type===r.TOKEN_BOOLEAN?m.value==="true"?h=!0:m.value==="false"?h=!1:this.fail("invalid boolean: "+m.value,m.lineno,m.colno):m.type===r.TOKEN_NONE?h=null:m.type===r.TOKEN_REGEX&&(h=new RegExp(m.value.body,m.value.flags)):this.fail("expected expression, got end of file"),h!==void 0?v=new o.Literal(m.lineno,m.colno,h):m.type===r.TOKEN_SYMBOL?v=new o.Symbol(m.lineno,m.colno,m.value):(this.pushToken(m),v=this.parseAggregate()),d||(v=this.parsePostfix(v)),v)return v;throw this.error("unexpected token: "+m.value,m.lineno,m.colno)},p.parseFilterName=function(){for(var d=this.expect(r.TOKEN_SYMBOL),m=d.value;this.skipValue(r.TOKEN_OPERATOR,".");)m+="."+this.expect(r.TOKEN_SYMBOL).value;return new o.Symbol(d.lineno,d.colno,m)},p.parseFilterArgs=function(d){if(this.peekToken().type===r.TOKEN_LEFT_PAREN){var m=this.parsePostfix(d);return m.args.children}return[]},p.parseFilter=function(d){for(;this.skip(r.TOKEN_PIPE);){var m=this.parseFilterName();d=new o.Filter(m.lineno,m.colno,m,new o.NodeList(m.lineno,m.colno,[d].concat(this.parseFilterArgs(d))))}return d},p.parseFilterStatement=function(){var d=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var m=this.parseFilterName(),h=this.parseFilterArgs(m);this.advanceAfterBlockEnd(d.value);var v=new o.Capture(m.lineno,m.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var x=new o.Filter(m.lineno,m.colno,m,new o.NodeList(m.lineno,m.colno,[v].concat(h)));return new o.Output(m.lineno,m.colno,[x])},p.parseAggregate=function(){var d=this.nextToken(),m;switch(d.type){case r.TOKEN_LEFT_PAREN:m=new o.Group(d.lineno,d.colno);break;case r.TOKEN_LEFT_BRACKET:m=new o.Array(d.lineno,d.colno);break;case r.TOKEN_LEFT_CURLY:m=new o.Dict(d.lineno,d.colno);break;default:return null}for(;;){var h=this.peekToken().type;if(h===r.TOKEN_RIGHT_PAREN||h===r.TOKEN_RIGHT_BRACKET||h===r.TOKEN_RIGHT_CURLY){this.nextToken();break}if(m.children.length>0&&(this.skip(r.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",d.lineno,d.colno)),m instanceof o.Dict){var v=this.parsePrimary();this.skip(r.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",d.lineno,d.colno);var x=this.parseExpression();m.addChild(new o.Pair(v.lineno,v.colno,v,x))}else{var E=this.parseExpression();m.addChild(E)}}return m},p.parseSignature=function(d,m){var h=this.peekToken();if(!m&&h.type!==r.TOKEN_LEFT_PAREN){if(d)return null;this.fail("expected arguments",h.lineno,h.colno)}h.type===r.TOKEN_LEFT_PAREN&&(h=this.nextToken());for(var v=new o.NodeList(h.lineno,h.colno),x=new o.KeywordArgs(h.lineno,h.colno),E=!1;;){if(h=this.peekToken(),!m&&h.type===r.TOKEN_RIGHT_PAREN){this.nextToken();break}else if(m&&h.type===r.TOKEN_BLOCK_END)break;if(E&&!this.skip(r.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",h.lineno,h.colno);else{var g=this.parseExpression();this.skipValue(r.TOKEN_OPERATOR,"=")?x.addChild(new o.Pair(g.lineno,g.colno,g,this.parseExpression())):v.addChild(g)}E=!0}return x.children.length&&v.addChild(x),v},p.parseUntilBlocks=function(){for(var d=this.breakOnBlocks,m=arguments.length,h=new Array(m),v=0;v0&&!this.skip(r.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",d.lineno,d.colno);var E=this.parsePrimary();if(E.value.charAt(0)==="_"&&this.fail("parseFrom: names starting with an underscore cannot be imported",E.lineno,E.colno),this.skipSymbol("as")){var g=this.parsePrimary();h.addChild(new o.Pair(E.lineno,E.colno,E,g))}else h.addChild(E);v=this.parseWithContext()}return new o.FromImport(d.lineno,d.colno,m,h,v)},p.parseBlock=function(){var d=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",d.lineno,d.colno);var m=new o.Block(d.lineno,d.colno);m.name=this.parsePrimary(),m.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",d.lineno,d.colno),this.advanceAfterBlockEnd(d.value),m.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(m.name.value);var h=this.peekToken();return h||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(h.value),m},p.parseExtends=function(){var d="extends",m=this.peekToken();this.skipSymbol(d)||this.fail("parseTemplateRef: expected "+d);var h=new o.Extends(m.lineno,m.colno);return h.template=this.parseExpression(),this.advanceAfterBlockEnd(m.value),h},p.parseInclude=function(){var d="include",m=this.peekToken();this.skipSymbol(d)||this.fail("parseInclude: expected "+d);var h=new o.Include(m.lineno,m.colno);return h.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(h.ignoreMissing=!0),this.advanceAfterBlockEnd(m.value),h},p.parseIf=function(){var d=this.peekToken(),m;this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?m=new o.If(d.lineno,d.colno):this.skipSymbol("ifAsync")?m=new o.IfAsync(d.lineno,d.colno):this.fail("parseIf: expected if, elif, or elseif",d.lineno,d.colno),m.cond=this.parseExpression(),this.advanceAfterBlockEnd(d.value),m.body=this.parseUntilBlocks("elif","elseif","else","endif");var h=this.peekToken();switch(h&&h.value){case"elseif":case"elif":m.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),m.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":m.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return m},p.parseSet=function(){var d=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",d.lineno,d.colno);for(var m=new o.Set(d.lineno,d.colno,[]),h;(h=this.parsePrimary())&&(m.targets.push(h),!!this.skip(r.TOKEN_COMMA)););return this.skipValue(r.TOKEN_OPERATOR,"=")?(m.value=this.parseExpression(),this.advanceAfterBlockEnd(d.value)):this.skip(r.TOKEN_BLOCK_END)?(m.body=new o.Capture(d.lineno,d.colno,this.parseUntilBlocks("endset")),m.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",d.lineno,d.colno),m},p.parseSwitch=function(){var d="switch",m="endswitch",h="case",v="default",x=this.peekToken();!this.skipSymbol(d)&&!this.skipSymbol(h)&&!this.skipSymbol(v)&&this.fail('parseSwitch: expected "switch," "case" or "default"',x.lineno,x.colno);var E=this.parseExpression();this.advanceAfterBlockEnd(d),this.parseUntilBlocks(h,v,m);var g=this.peekToken(),w=[],C;do{this.skipSymbol(h);var y=this.parseExpression();this.advanceAfterBlockEnd(d);var S=this.parseUntilBlocks(h,v,m);w.push(new o.Case(g.line,g.col,y,S)),g=this.peekToken()}while(g&&g.value===h);switch(g.value){case v:this.advanceAfterBlockEnd(),C=this.parseUntilBlocks(m),this.advanceAfterBlockEnd();break;case m:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(x.lineno,x.colno,E,w,C)},p.parseStatement=function(){var d=this.peekToken(),m;if(d.type!==r.TOKEN_SYMBOL&&this.fail("tag name expected",d.lineno,d.colno),this.breakOnBlocks&&l.indexOf(this.breakOnBlocks,d.value)!==-1)return null;switch(d.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var h=0;h0;){var w=E[0],C=E[1],y=E[2];y===d?v+=1:y===m&&(v-=1),v===0?(x+=C,this.tokens.backN(w.length-C.length)):x+=w}return new o.Output(g.lineno,g.colno,[new o.TemplateData(g.lineno,g.colno,x)])},p.parsePostfix=function(d){for(var m,h=this.peekToken();h;){if(h.type===r.TOKEN_LEFT_PAREN)d=new o.FunCall(h.lineno,h.colno,d,this.parseSignature());else if(h.type===r.TOKEN_LEFT_BRACKET)m=this.parseAggregate(),m.children.length>1&&this.fail("invalid index"),d=new o.LookupVal(h.lineno,h.colno,d,m.children[0]);else if(h.type===r.TOKEN_OPERATOR&&h.value==="."){this.nextToken();var v=this.nextToken();v.type!==r.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+v.value,v.lineno,v.colno),m=new o.Literal(v.lineno,v.colno,v.value),d=new o.LookupVal(h.lineno,h.colno,d,m)}else break;h=this.peekToken()}return d},p.parseExpression=function(){var d=this.parseInlineIf();return d},p.parseInlineIf=function(){var d=this.parseOr();if(this.skipSymbol("if")){var m=this.parseOr(),h=d;d=new o.InlineIf(d.lineno,d.colno),d.body=h,d.cond=m,this.skipSymbol("else")?d.else_=this.parseOr():d.else_=null}return d},p.parseOr=function(){for(var d=this.parseAnd();this.skipSymbol("or");){var m=this.parseAnd();d=new o.Or(d.lineno,d.colno,d,m)}return d},p.parseAnd=function(){for(var d=this.parseNot();this.skipSymbol("and");){var m=this.parseNot();d=new o.And(d.lineno,d.colno,d,m)}return d},p.parseNot=function(){var d=this.peekToken();return this.skipSymbol("not")?new o.Not(d.lineno,d.colno,this.parseNot()):this.parseIn()},p.parseIn=function(){for(var d=this.parseIs();;){var m=this.nextToken();if(!m)break;var h=m.type===r.TOKEN_SYMBOL&&m.value==="not";if(h||this.pushToken(m),this.skipSymbol("in")){var v=this.parseIs();d=new o.In(d.lineno,d.colno,d,v),h&&(d=new o.Not(d.lineno,d.colno,d))}else{h&&this.pushToken(m);break}}return d},p.parseIs=function(){var d=this.parseCompare();if(this.skipSymbol("is")){var m=this.skipSymbol("not"),h=this.parseCompare();d=new o.Is(d.lineno,d.colno,d,h),m&&(d=new o.Not(d.lineno,d.colno,d))}return d},p.parseCompare=function(){for(var d=["==","===","!=","!==","<",">","<=",">="],m=this.parseConcat(),h=[];;){var v=this.nextToken();if(v)if(d.indexOf(v.value)!==-1)h.push(new o.CompareOperand(v.lineno,v.colno,this.parseConcat(),v.value));else{this.pushToken(v);break}else break}return h.length?new o.Compare(h[0].lineno,h[0].colno,m,h):m},p.parseConcat=function(){for(var d=this.parseAdd();this.skipValue(r.TOKEN_TILDE,"~");){var m=this.parseAdd();d=new o.Concat(d.lineno,d.colno,d,m)}return d},p.parseAdd=function(){for(var d=this.parseSub();this.skipValue(r.TOKEN_OPERATOR,"+");){var m=this.parseSub();d=new o.Add(d.lineno,d.colno,d,m)}return d},p.parseSub=function(){for(var d=this.parseMul();this.skipValue(r.TOKEN_OPERATOR,"-");){var m=this.parseMul();d=new o.Sub(d.lineno,d.colno,d,m)}return d},p.parseMul=function(){for(var d=this.parseDiv();this.skipValue(r.TOKEN_OPERATOR,"*");){var m=this.parseDiv();d=new o.Mul(d.lineno,d.colno,d,m)}return d},p.parseDiv=function(){for(var d=this.parseFloorDiv();this.skipValue(r.TOKEN_OPERATOR,"/");){var m=this.parseFloorDiv();d=new o.Div(d.lineno,d.colno,d,m)}return d},p.parseFloorDiv=function(){for(var d=this.parseMod();this.skipValue(r.TOKEN_OPERATOR,"//");){var m=this.parseMod();d=new o.FloorDiv(d.lineno,d.colno,d,m)}return d},p.parseMod=function(){for(var d=this.parsePow();this.skipValue(r.TOKEN_OPERATOR,"%");){var m=this.parsePow();d=new o.Mod(d.lineno,d.colno,d,m)}return d},p.parsePow=function(){for(var d=this.parseUnary();this.skipValue(r.TOKEN_OPERATOR,"**");){var m=this.parseUnary();d=new o.Pow(d.lineno,d.colno,d,m)}return d},p.parseUnary=function(d){var m=this.peekToken(),h;return this.skipValue(r.TOKEN_OPERATOR,"-")?h=new o.Neg(m.lineno,m.colno,this.parseUnary(!0)):this.skipValue(r.TOKEN_OPERATOR,"+")?h=new o.Pos(m.lineno,m.colno,this.parseUnary(!0)):h=this.parsePrimary(),d||(h=this.parseFilter(h)),h},p.parsePrimary=function(d){var m=this.nextToken(),h,v=null;if(m?m.type===r.TOKEN_STRING?h=m.value:m.type===r.TOKEN_INT?h=parseInt(m.value,10):m.type===r.TOKEN_FLOAT?h=parseFloat(m.value):m.type===r.TOKEN_BOOLEAN?m.value==="true"?h=!0:m.value==="false"?h=!1:this.fail("invalid boolean: "+m.value,m.lineno,m.colno):m.type===r.TOKEN_NONE?h=null:m.type===r.TOKEN_REGEX&&(h=new RegExp(m.value.body,m.value.flags)):this.fail("expected expression, got end of file"),h!==void 0?v=new o.Literal(m.lineno,m.colno,h):m.type===r.TOKEN_SYMBOL?v=new o.Symbol(m.lineno,m.colno,m.value):(this.pushToken(m),v=this.parseAggregate()),d||(v=this.parsePostfix(v)),v)return v;throw this.error("unexpected token: "+m.value,m.lineno,m.colno)},p.parseFilterName=function(){for(var d=this.expect(r.TOKEN_SYMBOL),m=d.value;this.skipValue(r.TOKEN_OPERATOR,".");)m+="."+this.expect(r.TOKEN_SYMBOL).value;return new o.Symbol(d.lineno,d.colno,m)},p.parseFilterArgs=function(d){if(this.peekToken().type===r.TOKEN_LEFT_PAREN){var m=this.parsePostfix(d);return m.args.children}return[]},p.parseFilter=function(d){for(;this.skip(r.TOKEN_PIPE);){var m=this.parseFilterName();d=new o.Filter(m.lineno,m.colno,m,new o.NodeList(m.lineno,m.colno,[d].concat(this.parseFilterArgs(d))))}return d},p.parseFilterStatement=function(){var d=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var m=this.parseFilterName(),h=this.parseFilterArgs(m);this.advanceAfterBlockEnd(d.value);var v=new o.Capture(m.lineno,m.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var x=new o.Filter(m.lineno,m.colno,m,new o.NodeList(m.lineno,m.colno,[v].concat(h)));return new o.Output(m.lineno,m.colno,[x])},p.parseAggregate=function(){var d=this.nextToken(),m;switch(d.type){case r.TOKEN_LEFT_PAREN:m=new o.Group(d.lineno,d.colno);break;case r.TOKEN_LEFT_BRACKET:m=new o.Array(d.lineno,d.colno);break;case r.TOKEN_LEFT_CURLY:m=new o.Dict(d.lineno,d.colno);break;default:return null}for(;;){var h=this.peekToken().type;if(h===r.TOKEN_RIGHT_PAREN||h===r.TOKEN_RIGHT_BRACKET||h===r.TOKEN_RIGHT_CURLY){this.nextToken();break}if(m.children.length>0&&(this.skip(r.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",d.lineno,d.colno)),m instanceof o.Dict){var v=this.parsePrimary();this.skip(r.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",d.lineno,d.colno);var x=this.parseExpression();m.addChild(new o.Pair(v.lineno,v.colno,v,x))}else{var E=this.parseExpression();m.addChild(E)}}return m},p.parseSignature=function(d,m){var h=this.peekToken();if(!m&&h.type!==r.TOKEN_LEFT_PAREN){if(d)return null;this.fail("expected arguments",h.lineno,h.colno)}h.type===r.TOKEN_LEFT_PAREN&&(h=this.nextToken());for(var v=new o.NodeList(h.lineno,h.colno),x=new o.KeywordArgs(h.lineno,h.colno),E=!1;;){if(h=this.peekToken(),!m&&h.type===r.TOKEN_RIGHT_PAREN){this.nextToken();break}else if(m&&h.type===r.TOKEN_BLOCK_END)break;if(E&&!this.skip(r.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",h.lineno,h.colno);else{var g=this.parseExpression();this.skipValue(r.TOKEN_OPERATOR,"=")?x.addChild(new o.Pair(g.lineno,g.colno,g,this.parseExpression())):v.addChild(g)}E=!0}return x.children.length&&v.addChild(x),v},p.parseUntilBlocks=function(){for(var d=this.breakOnBlocks,m=arguments.length,h=new Array(m),v=0;v=!",o="0123456789",s="{%",l="%}",u="{{",c="}}",f="{#",p="#}",b="string",d="whitespace",m="data",h="block-start",v="block-end",x="variable-start",E="variable-end",g="comment",w="left-paren",C="right-paren",y="left-bracket",S="right-bracket",A="left-curly",_="right-curly",P="operator",F="comma",B="colon",j="tilde",L="pipe",k="int",T="float",N="boolean",M="none",D="symbol",V="special",q="regex";function Z(fe,ee,oe,U){return{type:fe,value:ee,lineno:oe,colno:U}}var pe=function(){function fe(oe,U){this.str=oe,this.index=0,this.len=oe.length,this.lineno=0,this.colno=0,this.in_code=!1,U=U||{};var X=U.tags||{};this.tags={BLOCK_START:X.blockStart||s,BLOCK_END:X.blockEnd||l,VARIABLE_START:X.variableStart||u,VARIABLE_END:X.variableEnd||c,COMMENT_START:X.commentStart||f,COMMENT_END:X.commentEnd||p},this.trimBlocks=!!U.trimBlocks,this.lstripBlocks=!!U.lstripBlocks}var ee=fe.prototype;return ee.nextToken=function(){var U=this.lineno,X=this.colno,$;if(this.in_code){var he=this.current();if(this.isFinished())return null;if(he==='"'||he==="'")return Z(b,this._parseString(he),U,X);if($=this._extract(i))return Z(d,$,U,X);if(($=this._extractString(this.tags.BLOCK_END))||($=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&(he=this.current(),he===`
`?this.forward():he==="\r"&&(this.forward(),he=this.current(),he===`
`?this.forward():this.back())),Z(v,$,U,X);if(($=this._extractString(this.tags.VARIABLE_END))||($=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,Z(E,$,U,X);if(he==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var qe="";!this.isFinished();)if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}else qe+=this.current(),this.forward();for(var ze=["g","i","m","y"],vt="";!this.isFinished();){var R=ze.indexOf(this.current())!==-1;if(R)vt+=this.current(),this.forward();else break}return Z(q,{body:qe,flags:vt},U,X)}else if(r.indexOf(he)!==-1){this.forward();var z=["==","===","!=","!==","<=",">=","//","**"],J=he+this.current(),H;switch(n.indexOf(z,J)!==-1&&(this.forward(),he=J,n.indexOf(z,J+this.current())!==-1&&(he=J+this.current(),this.forward())),he){case"(":H=w;break;case")":H=C;break;case"[":H=y;break;case"]":H=S;break;case"{":H=A;break;case"}":H=_;break;case",":H=F;break;case":":H=B;break;case"~":H=j;break;case"|":H=L;break;default:H=P}return Z(H,he,U,X)}else if($=this._extractUntil(i+r),$.match(/^[-+]?[0-9]+$/))if(this.current()==="."){this.forward();var ne=this._extract(o);return Z(T,$+"."+ne,U,X)}else return Z(k,$,U,X);else{if($.match(/^(true|false)$/))return Z(N,$,U,X);if($==="none")return Z(M,$,U,X);if($==="null")return Z(M,$,U,X);if($)return Z(D,$,U,X);throw new Error("Unexpected value while parsing: "+$)}}else{var K=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(($=this._extractString(this.tags.BLOCK_START+"-"))||($=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,Z(h,$,U,X);if(($=this._extractString(this.tags.VARIABLE_START+"-"))||($=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,Z(x,$,U,X);$="";var Ae,ue=!1;for(this._matches(this.tags.COMMENT_START)&&(ue=!0,$=this._extractString(this.tags.COMMENT_START));(Ae=this._extractUntil(K))!==null;)if($+=Ae,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!ue){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=$.length){var Ne=$.slice(-this.colno);if(/^\s+$/.test(Ne)&&($=$.slice(0,-this.colno),!$.length))return this.nextToken()}break}else if(this._matches(this.tags.COMMENT_END)){if(!ue)throw new Error("unexpected end of comment");$+=this._extractString(this.tags.COMMENT_END);break}else $+=this.current(),this.forward();if(Ae===null&&ue)throw new Error("expected end of comment, got end of file");return Z(ue?g:m,$,U,X)}},ee._parseString=function(U){this.forward();for(var X="";!this.isFinished()&&this.current()!==U;){var $=this.current();if($==="\\"){switch(this.forward(),this.current()){case"n":X+=`
@@ -40,7 +40,7 @@ else {`),this._emit("cb()")),this._emitLine("}")},x.compileIfAsync=function(g,w)
GFS4: `),console.error(e)});We[ut]||(gy=global[ut]||[],yy(We,gy),We.close=function(e){function t(a,n){return e.call(We,a,function(i){i||xy(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,Ms,{value:e}),t}(We.close),We.closeSync=function(e){function t(a){e.apply(We,arguments),xy()}return Object.defineProperty(t,Ms,{value:e}),t}(We.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){dn(We[ut]),require("assert").equal(We[ut].length,0)}));var gy;global[ut]||yy(global,We[ut]);Tp.exports=Ip(p3(We));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!We.__patched&&(Tp.exports=Ip(We),We.__patched=!0);function Ip(e){c3(e),e.gracefulify=Ip,e.createReadStream=w,e.createWriteStream=C;var t=e.readFile;e.readFile=a;function a(A,_,P){return typeof _=="function"&&(P=_,_=null),F(A,_,P);function F(B,j,L,k){return t(B,j,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Jn([F,[B,j,L],T,k||Date.now(),Date.now()]):typeof L=="function"&&L.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(A,_,P,F){return typeof P=="function"&&(F=P,P=null),B(A,_,P,F);function B(j,L,k,T,N){return n(j,L,k,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Jn([B,[j,L,k,T],M,N||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var r=e.appendFile;r&&(e.appendFile=o);function o(A,_,P,F){return typeof P=="function"&&(F=P,P=null),B(A,_,P,F);function B(j,L,k,T,N){return r(j,L,k,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Jn([B,[j,L,k,T],M,N||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=l);function l(A,_,P,F){return typeof P=="function"&&(F=P,P=0),B(A,_,P,F);function B(j,L,k,T,N){return s(j,L,k,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Jn([B,[j,L,k,T],M,N||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var u=e.readdir;e.readdir=f;var c=/^v[0-5]\./;function f(A,_,P){typeof _=="function"&&(P=_,_=null);var F=c.test(process.version)?function(L,k,T,N){return u(L,B(L,k,T,N))}:function(L,k,T,N){return u(L,k,B(L,k,T,N))};return F(A,_,P);function B(j,L,k,T){return function(N,M){N&&(N.code==="EMFILE"||N.code==="ENFILE")?Jn([F,[j,L,k],N,T||Date.now(),Date.now()]):(M&&M.sort&&M.sort(),typeof k=="function"&&k.call(this,N,M))}}}if(process.version.substr(0,4)==="v0.8"){var p=u3(e);v=p.ReadStream,E=p.WriteStream}var b=e.ReadStream;b&&(v.prototype=Object.create(b.prototype),v.prototype.open=x);var d=e.WriteStream;d&&(E.prototype=Object.create(d.prototype),E.prototype.open=g),Object.defineProperty(e,"ReadStream",{get:function(){return v},set:function(A){v=A},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return E},set:function(A){E=A},enumerable:!0,configurable:!0});var m=v;Object.defineProperty(e,"FileReadStream",{get:function(){return m},set:function(A){m=A},enumerable:!0,configurable:!0});var h=E;Object.defineProperty(e,"FileWriteStream",{get:function(){return h},set:function(A){h=A},enumerable:!0,configurable:!0});function v(A,_){return this instanceof v?(b.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function x(){var A=this;S(A.path,A.flags,A.mode,function(_,P){_?(A.autoClose&&A.destroy(),A.emit("error",_)):(A.fd=P,A.emit("open",P),A.read())})}function E(A,_){return this instanceof E?(d.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function g(){var A=this;S(A.path,A.flags,A.mode,function(_,P){_?(A.destroy(),A.emit("error",_)):(A.fd=P,A.emit("open",P))})}function w(A,_){return new e.ReadStream(A,_)}function C(A,_){return new e.WriteStream(A,_)}var y=e.open;e.open=S;function S(A,_,P,F){return typeof P=="function"&&(F=P,P=null),B(A,_,P,F);function B(j,L,k,T,N){return y(j,L,k,function(M,D){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Jn([B,[j,L,k,T],M,N||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}return e}function Jn(e){dn("ENQUEUE",e[0].name,e[1]),We[ut].push(e),_p()}var Ls;function xy(){for(var e=Date.now(),t=0;t2&&(We[ut][t][3]=e,We[ut][t][4]=e);_p()}function _p(){if(clearTimeout(Ls),Ls=void 0,We[ut].length!==0){var e=We[ut].shift(),t=e[0],a=e[1],n=e[2],i=e[3],r=e[4];if(i===void 0)dn("RETRY",t.name,a),t.apply(null,a);else if(Date.now()-i>=6e4){dn("TIMEOUT",t.name,a);var o=a.pop();typeof o=="function"&&o.call(null,n)}else{var s=Date.now()-r,l=Math.max(r-i,1),u=Math.min(l*1.2,100);s>=u?(dn("RETRY",t.name,a),t.apply(null,a.concat([i]))):We[ut].push(e)}Ls===void 0&&(Ls=setTimeout(_p,0))}}});var Sy=O((tH,Ey)=>{"use strict";Ey.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let a=(n,i)=>{i=Object.assign({offset:0},i);for(let r=0;rs[o]===66&&s[o+1]===130);if(i>=0){let r=i+3,o=s=>Array.from(s).every((l,u)=>n[r+u]===l.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}return a([0,0,0,20,102,116,121,112,113,116,32,32])||a([102,114,101,101],{offset:4})||a([102,116,121,112,113,116,32,32],{offset:4})||a([109,100,97,116],{offset:4})||a([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:a([82,73,70,70])&&a([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:a([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:a([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:a([73,68,51])||a([255,251])?{ext:"mp3",mime:"audio/mpeg"}:a([102,116,121,112,77,52,65],{offset:4})||a([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:a([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:a([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:a([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:a([82,73,70,70])&&a([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:a([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:a([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:a([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&a([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:a([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:a([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:a([119,79,70,70])&&(a([0,1,0,0],{offset:4})||a([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:a([119,79,70,50])&&(a([0,1,0,0],{offset:4})||a([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:a([76,80],{offset:34})&&(a([0,0,1],{offset:8})||a([1,0,2],{offset:8})||a([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:a([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:a([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:a([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:a([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:a([37,33])?{ext:"ps",mime:"application/postscript"}:a([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:a([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:a([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:a([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:a([77,83,67,70])||a([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:a([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:a([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:a([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:a([31,160])||a([31,157])?{ext:"Z",mime:"application/x-compress"}:a([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:a([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:a([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:a([71],{offset:4})&&(a([71],{offset:192})||a([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:a([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:a([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var Ds=O((aH,Cy)=>{"use strict";var va=Cy.exports=function(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"};va.writable=function(e){return va(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"};va.readable=function(e){return va(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"};va.duplex=function(e){return va.writable(e)&&va.readable(e)};va.transform=function(e){return va.duplex(e)&&typeof e._transform=="function"&&typeof e._transformState=="object"}});var ir=O((nH,kp)=>{"use strict";typeof process=="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?kp.exports={nextTick:f3}:kp.exports=process;function f3(e,t,a,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,r,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,a)});case 4:return process.nextTick(function(){e.call(null,t,a,n)});default:for(r=new Array(i-1),o=0;o{function m3(e){return Array.isArray?Array.isArray(e):zs(e)==="[object Array]"}ht.isArray=m3;function h3(e){return typeof e=="boolean"}ht.isBoolean=h3;function v3(e){return e===null}ht.isNull=v3;function b3(e){return e==null}ht.isNullOrUndefined=b3;function g3(e){return typeof e=="number"}ht.isNumber=g3;function x3(e){return typeof e=="string"}ht.isString=x3;function y3(e){return typeof e=="symbol"}ht.isSymbol=y3;function w3(e){return e===void 0}ht.isUndefined=w3;function E3(e){return zs(e)==="[object RegExp]"}ht.isRegExp=E3;function S3(e){return typeof e=="object"&&e!==null}ht.isObject=S3;function C3(e){return zs(e)==="[object Date]"}ht.isDate=C3;function A3(e){return zs(e)==="[object Error]"||e instanceof Error}ht.isError=A3;function I3(e){return typeof e=="function"}ht.isFunction=I3;function _3(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ht.isPrimitive=_3;ht.isBuffer=require("buffer").Buffer.isBuffer;function zs(e){return Object.prototype.toString.call(e)}});var fn=O((rH,Fp)=>{typeof Object.create=="function"?Fp.exports=function(t,a){a&&(t.super_=a,t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Fp.exports=function(t,a){if(a){t.super_=a;var n=function(){};n.prototype=a.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Iy=O((oH,Ay)=>{var T3={}.toString;Ay.exports=Array.isArray||function(e){return T3.call(e)=="[object Array]"}});var Pp=O((sH,_y)=>{_y.exports=require("events").EventEmitter});var Hs=O((Op,ky)=>{var Gs=require("buffer"),ba=Gs.Buffer;function Ty(e,t){for(var a in e)t[a]=e[a]}ba.from&&ba.alloc&&ba.allocUnsafe&&ba.allocUnsafeSlow?ky.exports=Gs:(Ty(Gs,Op),Op.Buffer=qn);function qn(e,t,a){return ba(e,t,a)}Ty(ba,qn);qn.from=function(e,t,a){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ba(e,t,a)};qn.alloc=function(e,t,a){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=ba(e);return t!==void 0?typeof a=="string"?n.fill(t,a):n.fill(t):n.fill(0),n};qn.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ba(e)};qn.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Gs.SlowBuffer(e)}});var Py=O((lH,Rp)=>{"use strict";function k3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Fy=Hs().Buffer,rr=require("util");function F3(e,t,a){e.copy(t,a)}Rp.exports=function(){function e(){k3(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(a){var n={data:a,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(a){var n={data:a,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(a){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=a+n.data;return i},e.prototype.concat=function(a){if(this.length===0)return Fy.alloc(0);for(var n=Fy.allocUnsafe(a>>>0),i=this.head,r=0;i;)F3(i.data,n,r),r+=i.data.length,i=i.next;return n},e}();rr&&rr.inspect&&rr.inspect.custom&&(Rp.exports.prototype[rr.inspect.custom]=function(){var e=rr.inspect({length:this.length});return this.constructor.name+" "+e})});var Bp=O((cH,Oy)=>{"use strict";var Ws=ir();function P3(e,t){var a=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ws.nextTick(Vs,this,e)):Ws.nextTick(Vs,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(r){!t&&r?a._writableState?a._writableState.errorEmitted||(a._writableState.errorEmitted=!0,Ws.nextTick(Vs,a,r)):Ws.nextTick(Vs,a,r):t&&t(r)}),this)}function O3(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Vs(e,t){e.emit("error",t)}Oy.exports={destroy:P3,undestroy:O3}});var Gp=O((pH,Vy)=>{"use strict";var $n=ir();Vy.exports=Me;var R3=Iy(),or;Me.ReadableState=Dy;var uH=require("events").EventEmitter,jy=function(e,t){return e.listeners(t).length},Dp=Pp(),sr=Hs().Buffer,B3=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function N3(e){return sr.from(e)}function j3(e){return sr.isBuffer(e)||e instanceof B3}var Ly=Object.create(Zn());Ly.inherits=fn();var Np=require("util"),Ce=void 0;Np&&Np.debuglog?Ce=Np.debuglog("stream"):Ce=function(){};var L3=Py(),My=Bp(),Xn;Ly.inherits(Me,Dp);var jp=["error","close","destroy","pause","resume"];function M3(e,t,a){if(typeof e.prependListener=="function")return e.prependListener(t,a);!e._events||!e._events[t]?e.on(t,a):R3(e._events[t])?e._events[t].unshift(a):e._events[t]=[a,e._events[t]]}function Dy(e,t){or=or||ja(),e=e||{};var a=t instanceof or;this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,r=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:a&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=r,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new L3,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Xn||(Xn=require("string_decoder/").StringDecoder),this.decoder=new Xn(e.encoding),this.encoding=e.encoding)}function Me(e){if(or=or||ja(),!(this instanceof Me))return new Me(e);this._readableState=new Dy(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Dp.call(this)}Object.defineProperty(Me.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Me.prototype.destroy=My.destroy;Me.prototype._undestroy=My.undestroy;Me.prototype._destroy=function(e,t){this.push(null),t(e)};Me.prototype.push=function(e,t){var a=this._readableState,n;return a.objectMode?n=!0:typeof e=="string"&&(t=t||a.defaultEncoding,t!==a.encoding&&(e=sr.from(e,t),t=""),n=!0),zy(this,e,t,!1,n)};Me.prototype.unshift=function(e){return zy(this,e,null,!0,!1)};function zy(e,t,a,n,i){var r=e._readableState;if(t===null)r.reading=!1,H3(e,r);else{var o;i||(o=D3(r,t)),o?e.emit("error",o):r.objectMode||t&&t.length>0?(typeof t!="string"&&!r.objectMode&&Object.getPrototypeOf(t)!==sr.prototype&&(t=N3(t)),n?r.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Lp(e,r,t,!0):r.ended?e.emit("error",new Error("stream.push() after EOF")):(r.reading=!1,r.decoder&&!a?(t=r.decoder.write(t),r.objectMode||t.length!==0?Lp(e,r,t,!1):Gy(e,r)):Lp(e,r,t,!1))):n||(r.reading=!1)}return z3(r)}function Lp(e,t,a,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",a),e.read(0)):(t.length+=t.objectMode?1:a.length,n?t.buffer.unshift(a):t.buffer.push(a),t.needReadable&&Us(e)),Gy(e,t)}function D3(e,t){var a;return!j3(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a}function z3(e){return!e.ended&&(e.needReadable||e.length=Ry?e=Ry:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function By(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=G3(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Me.prototype.read=function(e){Ce("read",e),e=parseInt(e,10);var t=this._readableState,a=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Ce("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Mp(this):Us(this),null;if(e=By(e,t),e===0&&t.ended)return t.length===0&&Mp(this),null;var n=t.needReadable;Ce("need readable",n),(t.length===0||t.length-e0?i=Hy(e,t):i=null,i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),a!==e&&t.ended&&Mp(this)),i!==null&&this.emit("data",i),i};function H3(e,t){if(!t.ended){if(t.decoder){var a=t.decoder.end();a&&a.length&&(t.buffer.push(a),t.length+=t.objectMode?1:a.length)}t.ended=!0,Us(e)}}function Us(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Ce("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?$n.nextTick(Ny,e):Ny(e))}function Ny(e){Ce("emit readable"),e.emit("readable"),zp(e)}function Gy(e,t){t.readingMore||(t.readingMore=!0,$n.nextTick(W3,e,t))}function W3(e,t){for(var a=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length1&&Wy(n.pipes,e)!==-1)&&!u&&(Ce("false write response, pause",n.awaitDrain),n.awaitDrain++,f=!0),a.pause())}function b(v){Ce("onerror",v),h(),e.removeListener("error",b),jy(e,"error")===0&&e.emit("error",v)}M3(e,"error",b);function d(){e.removeListener("finish",m),h()}e.once("close",d);function m(){Ce("onfinish"),e.removeListener("close",d),h()}e.once("finish",m);function h(){Ce("unpipe"),a.unpipe(e)}return e.emit("pipe",a),n.flowing||(Ce("pipe resume"),a.resume()),e};function V3(e){return function(){var t=e._readableState;Ce("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&jy(e,"data")&&(t.flowing=!0,zp(e))}}Me.prototype.unpipe=function(e){var t=this._readableState,a={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,a),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r=t.length?(t.decoder?a=t.buffer.join(""):t.buffer.length===1?a=t.buffer.head.data:a=t.buffer.concat(t.length),t.buffer.clear()):a=q3(e,t.buffer,t.decoder),a}function q3(e,t,a){var n;return er.length?r.length:e;if(o===r.length?i+=r:i+=r.slice(0,e),e-=o,e===0){o===r.length?(++n,a.next?t.head=a.next:t.head=t.tail=null):(t.head=a,a.data=r.slice(o));break}++n}return t.length-=n,i}function $3(e,t){var a=sr.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(a),e-=n.data.length;n=n.next;){var r=n.data,o=e>r.length?r.length:e;if(r.copy(a,a.length-e,0,o),e-=o,e===0){o===r.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(o));break}++i}return t.length-=i,a}function Mp(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,$n.nextTick(Y3,t,e))}function Y3(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Wy(e,t){for(var a=0,n=e.length;a{Uy.exports=K3;function K3(e,t){if(Hp("noDeprecation"))return e;var a=!1;function n(){if(!a){if(Hp("throwDeprecation"))throw new Error(t);Hp("traceDeprecation")?console.trace(t):console.warn(t),a=!0}return e.apply(this,arguments)}return n}function Hp(e){try{if(!global.localStorage)return!1}catch(a){return!1}var t=global.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var Vp=O((fH,ew)=>{"use strict";var mn=ir();ew.exports=Ye;function qy(e){var t=this;this.next=null,this.entry=null,this.finish=function(){v6(t,e)}}var Q3=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:mn.nextTick,Yn;Ye.WritableState=cr;var Xy=Object.create(Zn());Xy.inherits=fn();var e6={deprecate:Jy()},$y=Pp(),Zs=Hs().Buffer,t6=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function a6(e){return Zs.from(e)}function n6(e){return Zs.isBuffer(e)||e instanceof t6}var Yy=Bp();Xy.inherits(Ye,$y);function i6(){}function cr(e,t){Yn=Yn||ja(),e=e||{};var a=t instanceof Yn;this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,r=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:a&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=r,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){p6(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new qy(this)}cr.prototype.getBuffer=function(){for(var t=this.bufferedRequest,a=[];t;)a.push(t),t=t.next;return a};(function(){try{Object.defineProperty(cr.prototype,"buffer",{get:e6.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var Js;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Js=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(e){return Js.call(this,e)?!0:this!==Ye?!1:e&&e._writableState instanceof cr}})):Js=function(e){return e instanceof this};function Ye(e){if(Yn=Yn||ja(),!Js.call(Ye,this)&&!(this instanceof Yn))return new Ye(e);this._writableState=new cr(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),$y.call(this)}Ye.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function r6(e,t){var a=new Error("write after end");e.emit("error",a),mn.nextTick(t,a)}function o6(e,t,a,n){var i=!0,r=!1;return a===null?r=new TypeError("May not write null values to stream"):typeof a!="string"&&a!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r&&(e.emit("error",r),mn.nextTick(n,r),i=!1),i}Ye.prototype.write=function(e,t,a){var n=this._writableState,i=!1,r=!n.objectMode&&n6(e);return r&&!Zs.isBuffer(e)&&(e=a6(e)),typeof t=="function"&&(a=t,t=null),r?t="buffer":t||(t=n.defaultEncoding),typeof a!="function"&&(a=i6),n.ended?r6(this,a):(r||o6(this,n,e,a))&&(n.pendingcb++,i=l6(this,n,r,e,t,a)),i};Ye.prototype.cork=function(){var e=this._writableState;e.corked++};Ye.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ky(this,e))};Ye.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function s6(e,t,a){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Zs.from(t,a)),t}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l6(e,t,a,n,i,r){if(!a){var o=s6(t,n,i);n!==o&&(a=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var tw=ir(),b6=Object.keys||function(e){var t=[];for(var a in e)t.push(a);return t};iw.exports=ga;var aw=Object.create(Zn());aw.inherits=fn();var nw=Gp(),Jp=Vp();aw.inherits(ga,nw);for(Up=b6(Jp.prototype),qs=0;qs{rw.exports=ja()});var lw=O((vH,sw)=>{var Zp=ow(),y6=require("util"),Kn=Bs().Buffer;function Je(e){if(!(this instanceof Je))return new Je(e);if(this._bufs=[],this.length=0,typeof e=="function"){this._callback=e;var t=function(n){this._callback&&(this._callback(n),this._callback=null)}.bind(this);this.on("pipe",function(n){n.on("error",t)}),this.on("unpipe",function(n){n.removeListener("error",t)})}else this.append(e);Zp.call(this)}y6.inherits(Je,Zp);Je.prototype._offset=function(t){var a=0,n=0,i;if(t===0)return[0,0];for(;nthis.length)&&(i=this.length),n>=this.length||i<=0)return t||Kn.alloc(0);var r=!!t,o=this._offset(n),s=i-n,l=s,u=r&&a||0,c=o[1],f,p;if(n===0&&i==this.length){if(!r)return this._bufs.length===1?this._bufs[0]:Kn.concat(this._bufs,this.length);for(p=0;pf)this._bufs[p].copy(t,u,c),u+=f;else{this._bufs[p].copy(t,u,c,c+l),u+=f;break}l-=f,c&&(c=0)}return t.length>u?t.slice(0,u):t};Je.prototype.shallowSlice=function(t,a){t=t||0,a=a||this.length,t<0&&(t+=this.length),a<0&&(a+=this.length);var n=this._offset(t),i=this._offset(a),r=this._bufs.slice(n[0],i[0]+1);return i[1]==0?r.pop():r[r.length-1]=r[r.length-1].slice(0,i[1]),n[1]!=0&&(r[0]=r[0].slice(n[1])),new Je(r)};Je.prototype.toString=function(t,a,n){return this.slice(a,n).toString(t)};Je.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};Je.prototype.duplicate=function(){for(var t=0,a=new Je;t{cw.exports=E6;var w6=Object.prototype.hasOwnProperty;function E6(){for(var e={},t=0;t{dw.exports=C6;var pw=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from:S6;function S6(e,t){return new Buffer(e,t)}function C6(e,t){if(Buffer.isBuffer(e))return e;if(typeof e=="string")return pw(e,t);if(Array.isArray(e))return pw(e);throw new Error("Input should be a buffer or a string")}});var mw=O((xH,fw)=>{var A6=function(){try{if(!Buffer.isEncoding("latin1"))return!1;var e=Buffer.alloc?Buffer.alloc(4):new Buffer(4);return e.fill("ab","ucs2"),e.toString("hex")==="61006200"}catch(t){return!1}}();function I6(e){return e.length===1&&e.charCodeAt(0)<256}function $s(e,t,a,n){if(a<0||n>e.length)throw new RangeError("Out of range index");return a=a>>>0,n=n===void 0?e.length:n>>>0,n>a&&e.fill(t,a,n),e}function _6(e,t,a,n){if(a<0||n>e.length)throw new RangeError("Out of range index");if(n<=a)return e;a=a>>>0,n=n===void 0?e.length:n>>>0;for(var i=a,r=t.length;i<=n-r;)t.copy(e,i),i+=r;return i!==n&&t.copy(e,i,0,n-i),e}function T6(e,t,a,n,i){if(A6)return e.fill(t,a,n,i);if(typeof t=="number")return $s(e,t,a,n);if(typeof t=="string"){if(typeof a=="string"?(i=a,a=0,n=e.length):typeof n=="string"&&(i=n,n=e.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(i==="latin1"&&(i="binary"),typeof i=="string"&&!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t==="")return $s(e,0,a,n);if(I6(t))return $s(e,t.charCodeAt(0),a,n);t=new Buffer(t,i)}return Buffer.isBuffer(t)?_6(e,t,a,n):$s(e,0,a,n)}fw.exports=T6});var vw=O((yH,hw)=>{function k6(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e)}hw.exports=k6});var Xp=O((wH,gw)=>{var bw=mw(),F6=vw();gw.exports=function(t,a,n){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');if(Buffer.alloc)return Buffer.alloc(t,a,n);var i=F6(t);return t===0?i:a===void 0?bw(i,0):(typeof n!="string"&&(n=void 0),bw(i,a,n))}});var Yp=O(ei=>{var P6=qp(),O6=Xp(),R6="0000000000000000000",B6="7777777777777777777",xw="0".charCodeAt(0),N6="ustar\x0000",j6=parseInt("7777",8),L6=function(e,t,a){return typeof e!="number"?a:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},M6=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},D6=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},yw=function(e,t,a,n){for(;at?B6.slice(0,t)+" ":R6.slice(0,t-e.length)+e+" "};function z6(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var a=!1,n=[],i=e.length-1;i>0;i--){var r=e[i];t?n.push(r):a&&r===0?n.push(0):a?(a=!1,n.push(256-r)):n.push(255-r)}var o=0,s=n.length;for(i=0;i=Math.pow(10,a)&&a++,t+a+e};ei.decodeLongPath=function(e,t){return Qn(e,0,e.length,t)};ei.encodePax=function(e){var t="";e.name&&(t+=$p(" path="+e.name+`
`)),e.linkname&&(t+=$p(" linkpath="+e.linkname+`
`));var a=e.pax;if(a)for(var n in a)t+=$p(" "+n+"="+a[n]+`
-`);return P6(t)};ei.decodePax=function(e){for(var t={};e.length;){for(var a=0;a100;){var i=a.indexOf("/");if(i===-1)return null;n+=n?"/"+a.slice(0,i):a.slice(0,i),a=a.slice(i+1)}return Buffer.byteLength(a)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(a),t.write(La(e.mode&j6,6),100),t.write(La(e.uid,6),108),t.write(La(e.gid,6),116),t.write(La(e.size,11),124),t.write(La(e.mtime.getTime()/1e3|0,11),136),t[156]=xw+D6(e.type),e.linkname&&t.write(e.linkname,157),t.write(N6,257),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(La(e.devmajor||0,6),329),t.write(La(e.devminor||0,6),337),n&&t.write(n,345),t.write(La(ww(t),6),148),t)};ei.decode=function(e,t){var a=e[156]===0?0:e[156]-xw,n=Qn(e,0,100,t),i=Ma(e,100,8),r=Ma(e,108,8),o=Ma(e,116,8),s=Ma(e,124,12),l=Ma(e,136,12),u=M6(a),c=e[157]===0?null:Qn(e,157,100,t),f=Qn(e,265,32),p=Qn(e,297,32),b=Ma(e,329,8),d=Ma(e,337,8);e[345]&&(n=Qn(e,345,155,t)+"/"+n),a===0&&n&&n[n.length-1]==="/"&&(a=5);var m=ww(e);if(m===8*32)return null;if(m!==Ma(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:n,mode:i,uid:r,gid:o,size:s,mtime:new Date(1e3*l),type:u,linkname:c,uname:f,gname:p,devmajor:b,devminor:d}}});var Kp=O((SH,Cw)=>{"use strict";Cw.exports=xa;var Ys=ja(),Sw=Object.create(Zn());Sw.inherits=fn();Sw.inherits(xa,Ys);function G6(e,t){var a=this._transformState;a.transforming=!1;var n=a.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));a.writechunk=null,a.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";_w.exports=ur;var Aw=Kp(),Iw=Object.create(Zn());Iw.inherits=fn();Iw.inherits(ur,Aw);function ur(e){if(!(this instanceof ur))return new ur(e);Aw.call(this,e)}ur.prototype._transform=function(e,t,a){a(null,e)}});var ti=O((ta,kw)=>{ta=kw.exports=Gp();ta.Stream=ta;ta.Readable=ta;ta.Writable=Vp();ta.Duplex=ja();ta.Transform=Kp();ta.PassThrough=Tw()});var jw=O((AH,Nw)=>{var Pw=require("util"),W6=lw(),V6=uw(),pr=Yp(),Ow=ti().Writable,Rw=ti().PassThrough,Bw=function(){},Fw=function(e){return e&=511,e&&512-e},U6=function(e,t){var a=new Ks(e,t);return a.end(),a},J6=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},Ks=function(e,t){this._parent=e,this.offset=t,Rw.call(this)};Pw.inherits(Ks,Rw);Ks.prototype.destroy=function(e){this._parent.destroy(e)};var ya=function(e){if(!(this instanceof ya))return new ya(e);Ow.call(this,e),e=e||{},this._offset=0,this._buffer=W6(),this._missing=0,this._partial=!1,this._onparse=Bw,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,a=t._buffer,n=function(){t._continue()},i=function(p){if(t._locked=!1,p)return t.destroy(p);t._stream||n()},r=function(){t._stream=null;var p=Fw(t._header.size);p?t._parse(p,o):t._parse(512,f),t._locked||n()},o=function(){t._buffer.consume(Fw(t._header.size)),t._parse(512,f),n()},s=function(){var p=t._header.size;t._paxGlobal=pr.decodePax(a.slice(0,p)),a.consume(p),r()},l=function(){var p=t._header.size;t._pax=pr.decodePax(a.slice(0,p)),t._paxGlobal&&(t._pax=V6(t._paxGlobal,t._pax)),a.consume(p),r()},u=function(){var p=t._header.size;this._gnuLongPath=pr.decodeLongPath(a.slice(0,p),e.filenameEncoding),a.consume(p),r()},c=function(){var p=t._header.size;this._gnuLongLinkPath=pr.decodeLongPath(a.slice(0,p),e.filenameEncoding),a.consume(p),r()},f=function(){var p=t._offset,b;try{b=t._header=pr.decode(a.slice(0,512),e.filenameEncoding)}catch(d){t.emit("error",d)}if(a.consume(512),!b){t._parse(512,f),n();return}if(b.type==="gnu-long-path"){t._parse(b.size,u),n();return}if(b.type==="gnu-long-link-path"){t._parse(b.size,c),n();return}if(b.type==="pax-global-header"){t._parse(b.size,s),n();return}if(b.type==="pax-header"){t._parse(b.size,l),n();return}if(t._gnuLongPath&&(b.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(b.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=b=J6(b,t._pax),t._pax=null),t._locked=!0,!b.size||b.type==="directory"){t._parse(512,f),t.emit("entry",b,U6(t,p),i);return}t._stream=new Ks(t,p),t.emit("entry",b,t._stream,i),t._parse(b.size,r),n()};this._onheader=f,this._parse(512,f)};Pw.inherits(ya,Ow);ya.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};ya.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};ya.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=Bw,this._overflow?this._write(this._overflow,void 0,e):e()}};ya.prototype._write=function(e,t,a){if(!this._destroyed){var n=this._stream,i=this._buffer,r=this._missing;if(e.length&&(this._partial=!0),e.lengthr&&(o=e.slice(r),e=e.slice(0,r)),n?n.end(e):i.append(e),this._overflow=o,this._onparse()}};ya.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};Nw.exports=ya});var Mw=O((IH,Lw)=>{Lw.exports=require("constants")});var Gw=O((_H,zw)=>{zw.exports=Dw;function Dw(e,t){if(e&&t)return Dw(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){a[n]=e[n]}),a;function a(){for(var n=new Array(arguments.length),i=0;i{var Hw=Gw();Qp.exports=Hw(Qs);Qp.exports.strict=Hw(Ww);Qs.proto=Qs(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Qs(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ww(this)},configurable:!0})});function Qs(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Ww(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},a=e.name||"Function wrapped with `once`";return t.onceError=a+" shouldn't be called more than once",t.called=!1,t}});var td=O((kH,Uw)=>{var Z6=ed(),q6=function(){},X6=function(e){return e.setHeader&&typeof e.abort=="function"},$6=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Vw=function(e,t,a){if(typeof t=="function")return Vw(e,null,t);t||(t={}),a=Z6(a||q6);var n=e._writableState,i=e._readableState,r=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,s=!1,l=function(){e.writable||u()},u=function(){o=!1,r||a.call(e)},c=function(){r=!1,o||a.call(e)},f=function(h){a.call(e,h?new Error("exited with error code: "+h):null)},p=function(h){a.call(e,h)},b=function(){process.nextTick(d)},d=function(){if(!s){if(r&&!(i&&i.ended&&!i.destroyed))return a.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return a.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",u)};return X6(e)?(e.on("complete",u),e.on("abort",b),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",l),e.on("close",l)),$6(e)&&e.on("exit",f),e.on("end",c),e.on("finish",u),t.error!==!1&&e.on("error",p),e.on("close",b),function(){s=!0,e.removeListener("complete",u),e.removeListener("abort",b),e.removeListener("request",m),e.req&&e.req.removeListener("finish",u),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("exit",f),e.removeListener("end",c),e.removeListener("error",p),e.removeListener("close",b)}};Uw.exports=Vw});var $w=O((FH,Xw)=>{var ai=Mw(),Jw=td(),tl=require("util"),Y6=Xp(),K6=qp(),Zw=ti().Readable,ni=ti().Writable,Q6=require("string_decoder").StringDecoder,el=Yp(),eR=parseInt("755",8),tR=parseInt("644",8),qw=Y6(1024),nd=function(){},ad=function(e,t){t&=511,t&&e.push(qw.slice(0,512-t))};function aR(e){switch(e&ai.S_IFMT){case ai.S_IFBLK:return"block-device";case ai.S_IFCHR:return"character-device";case ai.S_IFDIR:return"directory";case ai.S_IFIFO:return"fifo";case ai.S_IFLNK:return"symlink"}return"file"}var al=function(e){ni.call(this),this.written=0,this._to=e,this._destroyed=!1};tl.inherits(al,ni);al.prototype._write=function(e,t,a){if(this.written+=e.length,this._to.push(e))return a();this._to._drain=a};al.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var nl=function(){ni.call(this),this.linkname="",this._decoder=new Q6("utf-8"),this._destroyed=!1};tl.inherits(nl,ni);nl.prototype._write=function(e,t,a){this.linkname+=this._decoder.write(e),a()};nl.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var dr=function(){ni.call(this),this._destroyed=!1};tl.inherits(dr,ni);dr.prototype._write=function(e,t,a){a(new Error("No body allowed for this entry"))};dr.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var aa=function(e){if(!(this instanceof aa))return new aa(e);Zw.call(this,e),this._drain=nd,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};tl.inherits(aa,Zw);aa.prototype.entry=function(e,t,a){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(a=t,t=null),a||(a=nd);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=aR(e.mode)),e.mode||(e.mode=e.type==="directory"?eR:tR),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=K6(t)),Buffer.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),ad(n,e.size),process.nextTick(a),new dr;if(e.type==="symlink"&&!e.linkname){var i=new nl;return Jw(i,function(o){if(o)return n.destroy(),a(o);e.linkname=i.linkname,n._encode(e),a()}),i}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(a),new dr;var r=new al(this);return this._stream=r,Jw(r,function(o){if(n._stream=null,o)return n.destroy(),a(o);if(r.written!==e.size)return n.destroy(),a(new Error("size mismatch"));ad(n,e.size),n._finalizing&&n.finalize(),a()}),r}};aa.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(qw),this.push(null))};aa.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};aa.prototype._encode=function(e){if(!e.pax){var t=el.encode(e);if(t){this.push(t);return}}this._encodePax(e)};aa.prototype._encodePax=function(e){var t=el.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),a={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(el.encode(a)),this.push(t),ad(this,t.length),a.size=e.size,a.type=e.type,this.push(el.encode(a))};aa.prototype._read=function(e){var t=this._drain;this._drain=nd,t()};Xw.exports=aa});var Yw=O(id=>{id.extract=jw();id.pack=$w()});var il=O((OH,Qw)=>{"use strict";var Kw=Sy(),nR=Ds(),iR=Yw();Qw.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!nR(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!Kw(e)||Kw(e).ext!=="tar"))return Promise.resolve([]);let t=iR.extract(),a=[];t.on("entry",(i,r,o)=>{let s=[];r.on("data",l=>s.push(l)),r.on("end",()=>{let l={data:Buffer.concat(s),mode:i.mode,mtime:i.mtime,path:i.name,type:i.type};(i.type==="symlink"||i.type==="link")&&(l.linkname=i.linkname),a.push(l),o()})});let n=new Promise((i,r)=>{Buffer.isBuffer(e)||e.on("error",r),t.on("finish",()=>i(a)),t.on("error",r)});return t.then=n.then.bind(n),t.catch=n.catch.bind(n),Buffer.isBuffer(e)?t.end(e):e.pipe(t),t}});var t1=O((RH,e1)=>{"use strict";var ii=e=>Array.from(e).map(t=>t.charCodeAt(0)),rR=ii("META-INF/mozilla.rsa"),oR=ii("[Content_Types].xml"),sR=ii("_rels/.rels");e1.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let a=(n,i)=>{i=Object.assign({offset:0},i);for(let r=0;ro.findIndex((s,l,u)=>u[l]===80&&u[l+1]===75&&u[l+2]===3&&u[l+3]===4),r=i(n);if(r!==-1){let o=t.subarray(r+8,r+8+1e3),s=i(o);if(s!==-1){let l=8+r+s+30;if(a(ii("word/"),{offset:l}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(a(ii("ppt/"),{offset:l}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(a(ii("xl/"),{offset:l}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(a([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(a([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(a([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(a([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(a([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(a([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(a([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(a([51,103,112,53])||a([0,0,0])&&a([102,116,121,112],{offset:4})&&(a([109,112,52,49],{offset:8})||a([109,112,52,50],{offset:8})||a([105,115,111,109],{offset:8})||a([105,115,111,50],{offset:8})||a([109,109,112,52],{offset:8})||a([77,52,86],{offset:8})||a([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(a([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(a([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((r,o,s)=>s[o]===66&&s[o+1]===130);if(i!==-1){let r=i+3,o=s=>Array.from(s).every((l,u)=>n[r+u]===l.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}if(a([0,0,0,20,102,116,121,112,113,116,32,32])||a([102,114,101,101],{offset:4})||a([102,116,121,112,113,116,32,32],{offset:4})||a([109,100,97,116],{offset:4})||a([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(a([82,73,70,70])&&a([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(a([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(a([0,0,1,186]))return{ext:"mpg",mime:"video/mpeg"};for(let n=0;n<2&&n{var a1=[0,1,3,7,15,31,63,127,255],fr=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};fr.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)};fr.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var a=8-this.bitOffset;if(e>=a)t<<=a,t|=a1[a]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=a;else{t<<=e;var n=a-e;t|=(this.curByte&a1[e]<>n,this.bitOffset+=e,e=0}}return t};fr.prototype.seek=function(e){var t=e%8,a=(e-t)/8;this.bitOffset=t,this.stream.seek(a),this.hasByte=!1};fr.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t{var hn=function(){};hn.prototype.readByte=function(){throw new Error("abstract method readByte() not implemented")};hn.prototype.read=function(e,t,a){for(var n=0;n{s1.exports=function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),t=function(){var a=4294967295;this.getCRC=function(){return~a>>>0},this.updateCRC=function(n){a=a<<8^e[(a>>>24^n)&255]},this.updateCRCRun=function(n,i){for(;i-- >0;)a=a<<8^e[(a>>>24^n)&255]}};return t}()});var c1=O((LH,lR)=>{lR.exports={name:"seek-bzip",version:"1.0.6",contributors:["C. Scott Ananian (http://cscott.net)","Eli Skeggs","Kevin Kwok","Rob Landley (http://landley.net)"],description:"a pure-JavaScript Node.JS module for random-access decoding bzip2 data",main:"./lib/index.js",repository:{type:"git",url:"https://github.com/cscott/seek-bzip.git"},license:"MIT",bin:{"seek-bunzip":"./bin/seek-bunzip","seek-table":"./bin/seek-bzip-table"},directories:{test:"test"},dependencies:{commander:"^2.8.1"},devDependencies:{fibers:"~1.0.6",mocha:"~2.2.5"},scripts:{test:"mocha"}}});var b1=O((MH,v1)=>{var cR=i1(),mr=o1(),f1=l1(),m1=c1(),rl=20,u1=258,p1=0,uR=1,pR=2,dR=6,fR=50,mR="314159265359",hR="177245385090",d1=function(e,t){var a=e[t],n;for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=a,a},De={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Da={};Da[De.LAST_BLOCK]="Bad file checksum";Da[De.NOT_BZIP_DATA]="Not bzip data";Da[De.UNEXPECTED_INPUT_EOF]="Unexpected input EOF";Da[De.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF";Da[De.DATA_ERROR]="Data error";Da[De.OUT_OF_MEMORY]="Out of memory";Da[De.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var pt=function(e,t){var a=Da[e]||"unknown error";t&&(a+=": "+t);var n=new TypeError(a);throw n.errorCode=e,n},gt=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};gt.prototype._init_block=function(){var e=this._get_next_block();return e?(this.blockCRC=new f1,!0):(this.writeCount=-1,!1)};gt.prototype._start_bunzip=function(e,t){var a=new Buffer(4);(e.read(a,0,4)!==4||String.fromCharCode(a[0],a[1],a[2])!=="BZh")&&pt(De.NOT_BZIP_DATA,"bad magic");var n=a[3]-48;(n<1||n>9)&&pt(De.NOT_BZIP_DATA,"level out of range"),this.reader=new cR(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0};gt.prototype._get_next_block=function(){var e,t,a,n=this.reader,i=n.pi();if(i===hR)return!1;i!==mR&&pt(De.NOT_BZIP_DATA),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&pt(De.OBSOLETE_INPUT);var r=n.read(24);r>this.dbufSize&&pt(De.DATA_ERROR,"initial position out of bounds");var o=n.read(16),s=new Buffer(256),l=0;for(e=0;e<16;e++)if(o&1<<15-e){var u=e*16;for(a=n.read(16),t=0;t<16;t++)a&1<<15-t&&(s[l++]=u+t)}var c=n.read(3);(c