update CAT

This commit is contained in:
qist committed 2024-04-23 12:29:20 +08:00
1 parent 483ba25279
commit fb57f8669f
16 files changed
+854 -1072

No files matched your search

+166 -166
View File
@@ -1,30 +1,30 @@
var FW=Object.create;var gc=Object.defineProperty;var MW=Object.getOwnPropertyDescriptor;var $W=Object.getOwnPropertyNames;var jW=Object.getPrototypeOf,UW=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),MS=(t,e)=>{for(var n in e)gc(t,n,{get:e[n],enumerable:!0})},$S=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of $W(e))!UW.call(t,l)&&l!==n&&gc(t,l,{get:()=>e[l],enumerable:!(r=MW(e,l))||r.enumerable});return t};var _r=(t,e,n)=>(n=t!=null?FW(jW(t)):{},$S(e||!t||!t.__esModule?gc(n,"default",{value:t,enumerable:!0}):n,t)),BW=t=>$S(gc({},"__esModule",{value:!0}),t);var US=C((m_e,jS)=>{"use strict";function HW(t){var e=new t,n=e;function r(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function l(i){n.next=i,n=i}return{get:r,release:l}}jS.exports=HW});var Jf=C((g_e,Yf)=>{"use strict";var qW=US();function BS(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=qW(VW),l=null,i=null,s=0,a=null,o={push:_,drain:p2,saturated:p2,pause:c,paused:!1,get concurrency(){return n},set concurrency(w){if(!(w>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=w,!o.paused)for(;l&&s<n;)s++,T()},running:f,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:p2,kill:x,killAndDrain:v,error:b};return o;function f(){return s}function c(){o.paused=!0}function p(){for(var w=l,N=0;w;)w=w.next,N++;return N}function m(){for(var w=l,N=[];w;)N.push(w.value),w=w.next;return N}function h(){if(o.paused)for(o.paused=!1;l&&s<n;)s++,T()}function g(){return s===0&&o.length()===0}function _(w,N){var O=r.get();O.context=t,O.release=T,O.value=w,O.callback=N||p2,O.errorHandler=a,s>=n||o.paused?i?(i.next=O,i=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function S(w,N){var O=r.get();O.context=t,O.release=T,O.value=w,O.callback=N||p2,O.errorHandler=a,s>=n||o.paused?l?(O.next=l,l=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function T(w){w&&r.release(w);var N=l;N&&s<=n?o.paused?s--:(i===l&&(i=null),l=N.next,N.next=null,e.call(t,N.value,N.worked),i===null&&o.empty()):--s===0&&o.drain()}function x(){l=null,i=null,o.drain=p2}function v(){l=null,i=null,o.drain(),o.drain=p2}function b(w){a=w}}function p2(){}function VW(){this.value=null,this.callback=p2,this.next=null,this.release=p2,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var l=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=p2,t.errorHandler&&i(n,s),l.call(t.context,n,r),t.release(t)}}function zW(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,p){e.call(this,c).then(function(m){p(null,m)},p)}var l=BS(t,r,n),i=l.push,s=l.unshift;return l.push=a,l.unshift=o,l.drained=f,l;function a(c){var p=new Promise(function(m,h){i(c,function(g,_){if(g){h(g);return}m(_)})});return p.catch(p2),p}function o(c){var p=new Promise(function(m,h){s(c,function(g,_){if(g){h(g);return}m(_)})});return p.catch(p2),p}function f(){if(l.idle())return new Promise(function(m){m()});var c=l.drain,p=new Promise(function(m){l.drain=function(){c(),m()}});return p}}Yf.exports=BS;Yf.exports.promise=zW});var Zf=C((y_e,HS)=>{"use strict";var{inherits:GW,format:Qf}=require("util");function ra(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(l,i,s){if(!new.target)return new r(l,i,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",l&&i&&s?this.message=Qf(e,l,i,s):l&&i?this.message=Qf(e,l,i):l?this.message=Qf(e,l):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},GW(r,n),r}HS.exports={createError:ra,AVV_ERR_EXPOSE_ALREADY_DEFINED:ra("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:ra("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:ra("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:ra("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:ra("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:ra("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var VS=C((v_e,qS)=>{qS.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var l=function(o){var f={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?f[o]:o};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
var CK=Object.create;var kc=Object.defineProperty;var kK=Object.getOwnPropertyDescriptor;var PK=Object.getOwnPropertyNames;var DK=Object.getPrototypeOf,LK=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),dx=(t,e)=>{for(var n in e)kc(t,n,{get:e[n],enumerable:!0})},hx=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of PK(e))!LK.call(t,l)&&l!==n&&kc(t,l,{get:()=>e[l],enumerable:!(r=kK(e,l))||r.enumerable});return t};var br=(t,e,n)=>(n=t!=null?CK(DK(t)):{},hx(e||!t||!t.__esModule?kc(n,"default",{value:t,enumerable:!0}):n,t)),FK=t=>hx(kc({},"__esModule",{value:!0}),t);var gx=C(($Ee,mx)=>{"use strict";function MK(t){var e=new t,n=e;function r(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function l(i){n.next=i,n=i}return{get:r,release:l}}mx.exports=MK});var _p=C((jEe,vp)=>{"use strict";var $K=gx();function yx(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=$K(jK),l=null,i=null,s=0,a=null,o={push:_,drain:m2,saturated:m2,pause:f,paused:!1,get concurrency(){return n},set concurrency(w){if(!(w>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=w,!o.paused)for(;l&&s<n;)s++,T()},running:c,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:m2,kill:x,killAndDrain:v,error:b};return o;function c(){return s}function f(){o.paused=!0}function p(){for(var w=l,N=0;w;)w=w.next,N++;return N}function m(){for(var w=l,N=[];w;)N.push(w.value),w=w.next;return N}function h(){if(o.paused)for(o.paused=!1;l&&s<n;)s++,T()}function g(){return s===0&&o.length()===0}function _(w,N){var O=r.get();O.context=t,O.release=T,O.value=w,O.callback=N||m2,O.errorHandler=a,s>=n||o.paused?i?(i.next=O,i=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function S(w,N){var O=r.get();O.context=t,O.release=T,O.value=w,O.callback=N||m2,O.errorHandler=a,s>=n||o.paused?l?(O.next=l,l=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function T(w){w&&r.release(w);var N=l;N&&s<=n?o.paused?s--:(i===l&&(i=null),l=N.next,N.next=null,e.call(t,N.value,N.worked),i===null&&o.empty()):--s===0&&o.drain()}function x(){l=null,i=null,o.drain=m2}function v(){l=null,i=null,o.drain(),o.drain=m2}function b(w){a=w}}function m2(){}function jK(){this.value=null,this.callback=m2,this.next=null,this.release=m2,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var l=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=m2,t.errorHandler&&i(n,s),l.call(t.context,n,r),t.release(t)}}function UK(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(f,p){e.call(this,f).then(function(m){p(null,m)},p)}var l=yx(t,r,n),i=l.push,s=l.unshift;return l.push=a,l.unshift=o,l.drained=c,l;function a(f){var p=new Promise(function(m,h){i(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(m2),p}function o(f){var p=new Promise(function(m,h){s(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(m2),p}function c(){if(l.idle())return new Promise(function(m){m()});var f=l.drain,p=new Promise(function(m){l.drain=function(){f(),m()}});return p}}vp.exports=yx;vp.exports.promise=UK});var bp=C((UEe,vx)=>{"use strict";var{inherits:BK,format:Ep}=require("util");function oa(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(l,i,s){if(!new.target)return new r(l,i,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",l&&i&&s?this.message=Ep(e,l,i,s):l&&i?this.message=Ep(e,l,i):l?this.message=Ep(e,l):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},BK(r,n),r}vx.exports={createError:oa,AVV_ERR_EXPOSE_ALREADY_DEFINED:oa("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:oa("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:oa("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:oa("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:oa("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:oa("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var Ex=C((BEe,_x)=>{_x.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var l=function(o){var c={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?c[o]:o};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
`),a=`
`+n+(i.length?l("\u2502"):" ")+" ";return n+s.join(a)+`
`+i.map(function(o,f){var c=f===i.length-1,p=o.nodes&&o.nodes.length,m=n+(c?" ":l("\u2502"))+" ";return n+l(c?"\u2514":"\u251C")+l("\u2500")+l(p?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var YS=C((__e,KS)=>{"use strict";var XW=VS(),zS=Symbol("avvio.TimeTree.untrackNode"),ep=Symbol("avvio.TimeTree.trackNode"),GS=Symbol("avvio.TimeTree.getParent"),XS=Symbol("avvio.TimeTree.getNode"),WS=Symbol("avvio.TimeTree.addNode"),tp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[ep](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[zS](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[GS](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[XS](e){return this.tableId.get(e)}[WS](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[ep](this.root),this.root.id;let i=this[GS](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return i.nodes.push(a),this[ep](a),s}start(e,n,r=Date.now()){return this[WS](e,n,r)}stop(e,n=Date.now()){let r=this[XS](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[zS](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(l=>e(l))),r),n=e(this.toJSON());return XW(n)}};KS.exports=tp});var QS=C((E_e,JS)=>{var xo=1e3,Ao=xo*60,wo=Ao*60,la=wo*24,WW=la*7,KW=la*365.25;JS.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return YW(t);if(n==="number"&&isFinite(t))return e.long?QW(t):JW(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function YW(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*KW;case"weeks":case"week":case"w":return n*WW;case"days":case"day":case"d":return n*la;case"hours":case"hour":case"hrs":case"hr":case"h":return n*wo;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ao;case"seconds":case"second":case"secs":case"sec":case"s":return n*xo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function JW(t){var e=Math.abs(t);return e>=la?Math.round(t/la)+"d":e>=wo?Math.round(t/wo)+"h":e>=Ao?Math.round(t/Ao)+"m":e>=xo?Math.round(t/xo)+"s":t+"ms"}function QW(t){var e=Math.abs(t);return e>=la?yc(t,e,la,"day"):e>=wo?yc(t,e,wo,"hour"):e>=Ao?yc(t,e,Ao,"minute"):e>=xo?yc(t,e,xo,"second"):t+" ms"}function yc(t,e,n,r){var l=e>=n*1.5;return Math.round(t/n)+" "+r+(l?"s":"")}});var np=C((b_e,ZS)=>{function ZW(t){n.debug=n,n.default=n,n.coerce=o,n.disable=i,n.enable=l,n.enabled=s,n.humanize=QS(),n.destroy=f,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let p=0;for(let m=0;m<c.length;m++)p=(p<<5)-p+c.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(c){let p,m=null,h,g;function _(...S){if(!_.enabled)return;let T=_,x=Number(new Date),v=x-(p||x);T.diff=v,T.prev=p,T.curr=x,p=x,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let b=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(N,O)=>{if(N==="%%")return"%";b++;let k=n.formatters[O];if(typeof k=="function"){let $=S[b];N=k.call(T,$),S.splice(b,1),b--}return N}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}return _.namespace=c,_.useColors=n.useColors(),_.color=n.selectColor(c),_.extend=r,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(c)),g),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(c,p){let m=n(this.namespace+(typeof p>"u"?":":p)+c);return m.log=this.log,m}function l(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let p,m=(typeof c=="string"?c:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(c=m[p].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function i(){let c=[...n.names.map(a),...n.skips.map(a).map(p=>"-"+p)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(c))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function o(c){return c instanceof Error?c.stack||c.message:c}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}ZS.exports= Line truncated
`+i.map(function(o,c){var f=c===i.length-1,p=o.nodes&&o.nodes.length,m=n+(f?" ":l("\u2502"))+" ";return n+l(f?"\u2514":"\u251C")+l("\u2500")+l(p?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var wx=C((HEe,Ax)=>{"use strict";var HK=Ex(),bx=Symbol("avvio.TimeTree.untrackNode"),Tp=Symbol("avvio.TimeTree.trackNode"),Tx=Symbol("avvio.TimeTree.getParent"),Sx=Symbol("avvio.TimeTree.getNode"),xx=Symbol("avvio.TimeTree.addNode"),Sp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Tp](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[bx](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[Tx](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[Sx](e){return this.tableId.get(e)}[xx](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Tp](this.root),this.root.id;let i=this[Tx](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return i.nodes.push(a),this[Tp](a),s}start(e,n,r=Date.now()){return this[xx](e,n,r)}stop(e,n=Date.now()){let r=this[Sx](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[bx](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(l=>e(l))),r),n=e(this.toJSON());return HK(n)}};Ax.exports=Sp});var Ox=C((qEe,Rx)=>{var Co=1e3,ko=Co*60,Po=ko*60,ua=Po*24,qK=ua*7,VK=ua*365.25;Rx.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return zK(t);if(n==="number"&&isFinite(t))return e.long?XK(t):GK(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function zK(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*VK;case"weeks":case"week":case"w":return n*qK;case"days":case"day":case"d":return n*ua;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Po;case"minutes":case"minute":case"mins":case"min":case"m":return n*ko;case"seconds":case"second":case"secs":case"sec":case"s":return n*Co;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function GK(t){var e=Math.abs(t);return e>=ua?Math.round(t/ua)+"d":e>=Po?Math.round(t/Po)+"h":e>=ko?Math.round(t/ko)+"m":e>=Co?Math.round(t/Co)+"s":t+"ms"}function XK(t){var e=Math.abs(t);return e>=ua?Pc(t,e,ua,"day"):e>=Po?Pc(t,e,Po,"hour"):e>=ko?Pc(t,e,ko,"minute"):e>=Co?Pc(t,e,Co,"second"):t+" ms"}function Pc(t,e,n,r){var l=e>=n*1.5;return Math.round(t/n)+" "+r+(l?"s":"")}});var xp=C((VEe,Nx)=>{function WK(t){n.debug=n,n.default=n,n.coerce=o,n.disable=i,n.enable=l,n.enabled=s,n.humanize=Ox(),n.destroy=c,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let p=0;for(let m=0;m<f.length;m++)p=(p<<5)-p+f.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(f){let p,m=null,h,g;function _(...S){if(!_.enabled)return;let T=_,x=Number(new Date),v=x-(p||x);T.diff=v,T.prev=p,T.curr=x,p=x,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let b=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(N,O)=>{if(N==="%%")return"%";b++;let k=n.formatters[O];if(typeof k=="function"){let j=S[b];N=k.call(T,j),S.splice(b,1),b--}return N}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}return _.namespace=f,_.useColors=n.useColors(),_.color=n.selectColor(f),_.extend=r,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(f)),g),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(f,p){let m=n(this.namespace+(typeof p>"u"?":":p)+f);return m.log=this.log,m}function l(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let p,m=(typeof f=="string"?f:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(f=m[p].replace(/\*/g,".*?"),f[0]==="-"?n.skips.push(new RegExp("^"+f.slice(1)+"$")):n.names.push(new RegExp("^"+f+"$")))}function i(){let f=[...n.names.map(a),...n.skips.map(a).map(p=>"-"+p)].join(",");return n.enable(""),f}function s(f){if(f[f.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(f))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function o(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Nx.exports= Line truncated
`).join(`
`+i),t.push(l+"m+"+Ec.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=pK()+e+" "+t[0]}function pK(){return qr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function dK(...t){return process.stderr.write(_c.format(...t)+`
`)}function hK(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function mK(){return process.env.DEBUG}function gK(t){t.inspectOpts={};let e=Object.keys(qr.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=qr.inspectOpts[e[n]]}Ec.exports=np()(qr);var{formatters:ix}=Ec.exports;ix.o=function(t){return this.inspectOpts.colors=this.useColors,_c.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};ix.O=function(t){return this.inspectOpts.colors=this.useColors,_c.inspect(t,this.inspectOpts)}});var bc=C((x_e,lp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?lp.exports=ex():lp.exports=sx()});var ax=C((A_e,ap)=>{"use strict";var yK=Jf(),vK=require("events").EventEmitter,_K=require("util").inherits,kr=bc()("avvio"),{AVV_ERR_READY_TIMEOUT:EK}=Zf(),ip=Symbol.for("plugin-meta");function bK(t,e){return t[ip]&&t[ip].name?t[ip].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function TK(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Oo(t,e,n,r,l){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=l===void 0?t._timeout:l,this.name=bK(e,n),this.isAfter=r,this.q=yK(t,SK,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}_K(Oo,vK);Oo.prototype.exec=function(t,e){let n=this.func,r=!1,l=this.name;if(this.parent._error&&!this.isAfter){kr("skipping loading of plugin as parent errored and it is not an after",l),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return kr("override errored",l),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,kr("exec",l);let i,s=o=>{if(r){kr("loading complete",l);return}this._error=o,kr(o?"exec errored":"exec completed",l),r=!0,i&&clearTimeout(i),e(o)};this.timeout>0&&(kr("setting up timeout",l,this.timeout),i=setTimeout(function(){kr("timed out",l),i=null;let o=new EK(l);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(kr("exec: resolving promise",l),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Oo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(kr("rejecting promise",this.name,n),this._promise.reject(n)):(kr("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=TK(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Oo.prototype.enqueue=function(t,e){kr("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Oo.prototype.finish=function(t,e){kr("finish",this.name,t);let n=()=>{this.loaded||(kr("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(kr("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let l=()=>{kr("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(l,l),this._promise=null}else n();else kr("delayed",this.name),this.q.drain=()=>{kr("drain",this.name),this.q.drain=xK,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function SK(t,e){let n=this;process.nextTick(sp.bind(n),t,e)}function sp(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,sp.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,l=>{this._current.shift(),e(l)})})}function xK(){}ap.exports=Oo;ap.exports.loadPlugin=sp});var px=C((w_e,pp)=>{"use strict";var ox=Jf(),AK=require("events").EventEmitter,wK=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:op,AVV_ERR_CALLBACK_NOT_FN:U4,AVV_ERR_PLUGIN_NOT_VALID:RK,AVV_ERR_ROOT_PLG_BOOTED:OK,AVV_ERR_READY_TIMEOUT:NK}=Zf(),IK=YS(),fp=ax(),No=bc()("avvio"),Tc=Symbol("kAvvio"),up=Symbol("kThenifyDoNotWrap");function CK(t,e,n){let r=e.expose||{},l=r.use||"use",i=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[l])throw new op(l);if(t[i])throw new op(i);if(t[s])throw new op(s);t[l]=function(f,c){return n.use(f,c),this},Object.defineProperty(t,"then",{get:cx.bind(n)}),t[Tc]=!0,t[i]=function(f){return typeof f!="function"?n._loadRegistered():(n.after(cp(f,this)),this)},t[s]=function(f){if(f&&typeof f!="function")throw new U4(s,typeof f);return n.ready(f?cp(f,this):void 0)},t[a]=function(f){if(typeof f!="function")throw new U4(a,typeof f);return n.onClose(FK(f,this)),this},t[o]=function(f){if(f&&typeof f!="function")throw new U4(o,typeof f);return f?(n.close(cp(f,this)),this):n.close()}}function Pr(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof Pr)){let r=new Pr(t,e,n);return t&&CK(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new IK,this._readyQ=ox(this,fx,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=ux},this._closeQ=ox(this,LK,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=ux},this._doStart=null,this._root=new fp(this,kK.bind(this),e,!1,0),this._root.once("start",(r,l,i)=>{let s=this.pluginTree.start(null,l,i);this._root.once("loaded",(a,o,f)=>{th Line truncated
causes have become circular...`;let r=Rp(t);return r?(e.add(t),n+`
caused by: `+zx(r,e)):n},JY=t=>zx(t,new Set),Gx=(t,e,n)=>{if(!V4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let l=Rp(t);if(l){e.add(t);let i=typeof t.cause=="function";return r+(i?"":": ")+Gx(l,e,i)}else return r},QY=t=>Gx(t,new Set);Xx.exports={isErrorLike:V4,getErrorCause:Rp,stackWithCauses:JY,messageWithCauses:QY}});var Np=C((j_e,Kx)=>{"use strict";var ZY=Symbol("circular-ref-tag"),Pc=Symbol("pino-raw-err-ref"),Wx=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Pc]},set:function(t){this[Pc]=t}}});Object.defineProperty(Wx,Pc,{writable:!0,value:{}});Kx.exports={pinoErrProto:Wx,pinoErrorSymbols:{seen:ZY,rawSymbol:Pc}}});var Qx=C((U_e,Jx)=>{"use strict";Jx.exports=Cp;var{messageWithCauses:eJ,stackWithCauses:tJ,isErrorLike:Yx}=Op(),{pinoErrProto:nJ,pinoErrorSymbols:rJ}=Np(),{seen:Ip}=rJ,{toString:lJ}=Object.prototype;function Cp(t){if(!Yx(t))return t;t[Ip]=void 0;let e=Object.create(nJ);e.type=lJ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=eJ(t),e.stack=tJ(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Cp(n)));for(let n in t)if(e[n]===void 0){let r=t[n];Yx(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,Ip)&&(e[n]=Cp(r)):e[n]=r}return delete t[Ip],e.raw=t,e}});var eA=C((B_e,Zx)=>{"use strict";Zx.exports=Lc;var{isErrorLike:kp}=Op(),{pinoErrProto:iJ,pinoErrorSymbols:sJ}=Np(),{seen:Dc}=sJ,{toString:aJ}=Object.prototype;function Lc(t){if(!kp(t))return t;t[Dc]=void 0;let e=Object.create(iJ);e.type=aJ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Lc(n))),kp(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Dc)&&(e.cause=Lc(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];kp(r)?Object.prototype.hasOwnProperty.call(r,Dc)||(e[n]=Lc(r)):e[n]=r}return delete t[Dc],e.raw=t,e}});var lA=C((H_e,rA)=>{"use strict";rA.exports={mapHttpRequest:oJ,reqSerializer:nA};var Pp=Symbol("pino-raw-req-ref"),tA=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Pp]},set:function(t){this[Pp]=t}}});Object.defineProperty(tA,Pp,{writable:!0,value:{}});function nA(t){let e=t.info||t.socket,n=Object.create(tA);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function oJ(t){return{req:nA(t)}}});var oA=C((q_e,aA)=>{"use strict";aA.exports={mapHttpResponse:uJ,resSerializer:sA};var Dp=Symbol("pino-raw-res-ref"),iA=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Dp]},set:function(t){this[Dp]=t}}});Object.defineProperty(iA,Dp,{writable:!0,value:{}});function sA(t){let e=Object.create(iA);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function uJ(t){return{res:sA(t)}}});var Fp=C((V_e,uA)=>{"use strict";var Lp=Qx(),cJ=eA(),Fc=lA(),Mc=oA();uA.exports={err:Lp,errWithCause:cJ,mapHttpRequest:Fc.mapHttpRequest,mapHttpResponse:Mc.mapHttpResponse,req:Fc.reqSerializer,res:Mc.resSerializer,wrapErrorSerializer:function(e){return e===Lp?e:function(r){return e(Lp(r))}},wrapRequestSerializer:function(e){return e===Fc.reqSerializer?e:function(r){return e(Fc.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===Mc.resSerializer?e:function(r){return e(Mc.resSerializer(r))}}}});var Mp=C((z_e,cA)=>{"use strict";function fJ(t,e){return e}cA.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=fJ;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),l=[];for(let i of r)i&&l.push(i.getFileName());return l}});var pA=C((G_e,fA)=>{"use strict";fA.exports=pJ;function pJ(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:l}){l.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if( Line truncated
`+i),t.push(l+"m+"+Fc.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=aY()+e+" "+t[0]}function aY(){return zr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function oY(...t){return process.stderr.write(Lc.format(...t)+`
`)}function uY(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function cY(){return process.env.DEBUG}function fY(t){t.inspectOpts={};let e=Object.keys(zr.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=zr.inspectOpts[e[n]]}Fc.exports=xp()(zr);var{formatters:Lx}=Fc.exports;Lx.o=function(t){return this.inspectOpts.colors=this.useColors,Lc.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Lx.O=function(t){return this.inspectOpts.colors=this.useColors,Lc.inspect(t,this.inspectOpts)}});var Mc=C((XEe,wp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?wp.exports=Ix():wp.exports=Fx()});var Mx=C((WEe,Np)=>{"use strict";var pY=_p(),dY=require("events").EventEmitter,hY=require("util").inherits,Lr=Mc()("avvio"),{AVV_ERR_READY_TIMEOUT:mY}=bp(),Rp=Symbol.for("plugin-meta");function gY(t,e){return t[Rp]&&t[Rp].name?t[Rp].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function yY(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Lo(t,e,n,r,l){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=l===void 0?t._timeout:l,this.name=gY(e,n),this.isAfter=r,this.q=pY(t,vY,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}hY(Lo,dY);Lo.prototype.exec=function(t,e){let n=this.func,r=!1,l=this.name;if(this.parent._error&&!this.isAfter){Lr("skipping loading of plugin as parent errored and it is not an after",l),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return Lr("override errored",l),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Lr("exec",l);let i,s=o=>{if(r){Lr("loading complete",l);return}this._error=o,Lr(o?"exec errored":"exec completed",l),r=!0,i&&clearTimeout(i),e(o)};this.timeout>0&&(Lr("setting up timeout",l,this.timeout),i=setTimeout(function(){Lr("timed out",l),i=null;let o=new mY(l);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(Lr("exec: resolving promise",l),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Lo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(Lr("rejecting promise",this.name,n),this._promise.reject(n)):(Lr("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=yY(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Lo.prototype.enqueue=function(t,e){Lr("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Lo.prototype.finish=function(t,e){Lr("finish",this.name,t);let n=()=>{this.loaded||(Lr("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(Lr("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let l=()=>{Lr("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(l,l),this._promise=null}else n();else Lr("delayed",this.name),this.q.drain=()=>{Lr("drain",this.name),this.q.drain=_Y,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function vY(t,e){let n=this;process.nextTick(Op.bind(n),t,e)}function Op(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Op.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,l=>{this._current.shift(),e(l)})})}function _Y(){}Np.exports=Lo;Np.exports.loadPlugin=Op});var Hx=C((KEe,Dp)=>{"use strict";var $x=_p(),EY=require("events").EventEmitter,bY=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ip,AVV_ERR_CALLBACK_NOT_FN:Y4,AVV_ERR_PLUGIN_NOT_VALID:TY,AVV_ERR_ROOT_PLG_BOOTED:SY,AVV_ERR_READY_TIMEOUT:xY}=bp(),AY=wx(),Pp=Mx(),Fo=Mc()("avvio"),$c=Symbol("kAvvio"),Cp=Symbol("kThenifyDoNotWrap");function wY(t,e,n){let r=e.expose||{},l=r.use||"use",i=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[l])throw new Ip(l);if(t[i])throw new Ip(i);if(t[s])throw new Ip(s);t[l]=function(c,f){return n.use(c,f),this},Object.defineProperty(t,"then",{get:Ux.bind(n)}),t[$c]=!0,t[i]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(kp(c,this)),this)},t[s]=function(c){if(c&&typeof c!="function")throw new Y4(s,typeof c);return n.ready(c?kp(c,this):void 0)},t[a]=function(c){if(typeof c!="function")throw new Y4(a,typeof c);return n.onClose(CY(c,this)),this},t[o]=function(c){if(c&&typeof c!="function")throw new Y4(o,typeof c);return c?(n.close(kp(c,this)),this):n.close()}}function Fr(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof Fr)){let r=new Fr(t,e,n);return t&&wY(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new AY,this._readyQ=$x(this,Bx,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=jx},this._closeQ=$x(this,IY,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=jx},this._doStart=null,this._root=new Pp(this,RY.bind(this),e,!1,0),this._root.once("start",(r,l,i)=>{let s=this.pluginTree.start(null,l,i);this._root.once("loaded",(a,o,c)=>{th Line truncated
causes have become circular...`;let r=Kp(t);return r?(e.add(t),n+`
caused by: `+bA(r,e)):n},GJ=t=>bA(t,new Set),TA=(t,e,n)=>{if(!e1(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let l=Kp(t);if(l){e.add(t);let i=typeof t.cause=="function";return r+(i?"":": ")+TA(l,e,i)}else return r},XJ=t=>TA(t,new Set);SA.exports={isErrorLike:e1,getErrorCause:Kp,stackWithCauses:GJ,messageWithCauses:XJ}});var Jp=C((obe,AA)=>{"use strict";var WJ=Symbol("circular-ref-tag"),Kc=Symbol("pino-raw-err-ref"),xA=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Kc]},set:function(t){this[Kc]=t}}});Object.defineProperty(xA,Kc,{writable:!0,value:{}});AA.exports={pinoErrProto:xA,pinoErrorSymbols:{seen:WJ,rawSymbol:Kc}}});var OA=C((ube,RA)=>{"use strict";RA.exports=Zp;var{messageWithCauses:KJ,stackWithCauses:YJ,isErrorLike:wA}=Yp(),{pinoErrProto:JJ,pinoErrorSymbols:QJ}=Jp(),{seen:Qp}=QJ,{toString:ZJ}=Object.prototype;function Zp(t){if(!wA(t))return t;t[Qp]=void 0;let e=Object.create(JJ);e.type=ZJ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=KJ(t),e.stack=YJ(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Zp(n)));for(let n in t)if(e[n]===void 0){let r=t[n];wA(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,Qp)&&(e[n]=Zp(r)):e[n]=r}return delete t[Qp],e.raw=t,e}});var IA=C((cbe,NA)=>{"use strict";NA.exports=Jc;var{isErrorLike:ed}=Yp(),{pinoErrProto:eQ,pinoErrorSymbols:tQ}=Jp(),{seen:Yc}=tQ,{toString:nQ}=Object.prototype;function Jc(t){if(!ed(t))return t;t[Yc]=void 0;let e=Object.create(eQ);e.type=nQ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Jc(n))),ed(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Yc)&&(e.cause=Jc(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];ed(r)?Object.prototype.hasOwnProperty.call(r,Yc)||(e[n]=Jc(r)):e[n]=r}return delete t[Yc],e.raw=t,e}});var DA=C((fbe,PA)=>{"use strict";PA.exports={mapHttpRequest:rQ,reqSerializer:kA};var td=Symbol("pino-raw-req-ref"),CA=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[td]},set:function(t){this[td]=t}}});Object.defineProperty(CA,td,{writable:!0,value:{}});function kA(t){let e=t.info||t.socket,n=Object.create(CA);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function rQ(t){return{req:kA(t)}}});var $A=C((pbe,MA)=>{"use strict";MA.exports={mapHttpResponse:lQ,resSerializer:FA};var nd=Symbol("pino-raw-res-ref"),LA=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[nd]},set:function(t){this[nd]=t}}});Object.defineProperty(LA,nd,{writable:!0,value:{}});function FA(t){let e=Object.create(LA);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function lQ(t){return{res:FA(t)}}});var ld=C((dbe,jA)=>{"use strict";var rd=OA(),iQ=IA(),Qc=DA(),Zc=$A();jA.exports={err:rd,errWithCause:iQ,mapHttpRequest:Qc.mapHttpRequest,mapHttpResponse:Zc.mapHttpResponse,req:Qc.reqSerializer,res:Zc.resSerializer,wrapErrorSerializer:function(e){return e===rd?e:function(r){return e(rd(r))}},wrapRequestSerializer:function(e){return e===Qc.reqSerializer?e:function(r){return e(Qc.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===Zc.resSerializer?e:function(r){return e(Zc.resSerializer(r))}}}});var id=C((hbe,UA)=>{"use strict";function sQ(t,e){return e}UA.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=sQ;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),l=[];for(let i of r)i&&l.push(i.getFileName());return l}});var HA=C((mbe,BA)=>{"use strict";BA.exports=aQ;function aQ(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:l}){l.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if( Line truncated
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
o${s}
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var $c=C((X_e,dA)=>{"use strict";dA.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var mA=C((W_e,hA)=>{"use strict";var dJ=$c();hA.exports=hJ;function hJ({paths:t}){let e=[];var n=0;let r=t.reduce(function(l,i,s){var a=i.match(dJ).map(c=>c.replace(/'|"|`/g,""));let o=i[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let f=a.indexOf("*");if(f>-1){let c=a.slice(0,f),p=c.join("."),m=a.slice(f+1,a.length),h=m.length>0;n++,e.push({before:c,beforeStr:p,after:m,nested:h})}else l[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:o};return l},{});return{wildcards:e,wcLen:n,secret:r}}});var yA=C((K_e,gA)=>{"use strict";var mJ=$c();gA.exports=gJ;function gJ({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:l,censorFctTakesPath:i},s){let a=Function("o",`
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var e6=C((gbe,qA)=>{"use strict";qA.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var zA=C((ybe,VA)=>{"use strict";var oQ=e6();VA.exports=uQ;function uQ({paths:t}){let e=[];var n=0;let r=t.reduce(function(l,i,s){var a=i.match(oQ).map(f=>f.replace(/'|"|`/g,""));let o=i[0]==="[";a=a.map(f=>f[0]==="["?f.substr(1,f.length-2):f);let c=a.indexOf("*");if(c>-1){let f=a.slice(0,c),p=f.join("."),m=a.slice(c+1,a.length),h=m.length>0;n++,e.push({before:f,beforeStr:p,after:m,nested:h})}else l[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:o};return l},{});return{wildcards:e,wcLen:n,secret:r}}});var XA=C((vbe,GA)=>{"use strict";var cQ=e6();GA.exports=fQ;function fQ({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:l,censorFctTakesPath:i},s){let a=Function("o",`
if (typeof o !== 'object' || o == null) {
${EJ(r,e)}
${mQ(r,e)}
}
const { censor, secret } = this
${yJ(t,l,i)}
${pQ(t,l,i)}
this.compileRestore()
${vJ(n>0,l,i)}
${_J(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function yJ(t,e,n){return Object.keys(t).map(r=>{let{escPath:l,leadingBracket:i,path:s}=t[r],a=i?1:0,o=i?"":".",f=[];for(var c;(c=mJ.exec(r))!==null;){let[,g]=c,{index:_,input:S}=c;_>a&&f.push(S.substring(0,_-(g?0:1)))}var p=f.map(g=>`o${o}${g}`).join(" && ");p.length===0?p+=`o${o}${r} != null`:p+=` && o${o}${r} != null`;let m=`
${dQ(n>0,l,i)}
${hQ(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function pQ(t,e,n){return Object.keys(t).map(r=>{let{escPath:l,leadingBracket:i,path:s}=t[r],a=i?1:0,o=i?"":".",c=[];for(var f;(f=cQ.exec(r))!==null;){let[,g]=f,{index:_,input:S}=f;_>a&&c.push(S.substring(0,_-(g?0:1)))}var p=c.map(g=>`o${o}${g}`).join(" && ");p.length===0?p+=`o${o}${r} != null`:p+=` && o${o}${r} != null`;let m=`
switch (true) {
${f.reverse().map(g=>`
${c.reverse().map(g=>`
case o${o}${g} === censor:
secret[${l}].circle = ${JSON.stringify(g)}
break
@@ -43,7 +43,7 @@ caused by: `+zx(r,e)):n},JY=t=>zx(t,new Set),Gx=(t,e,n)=>{if(!V4(t))return"";let
}
}
`}).join(`
`)}function vJ(t,e,n){return t===!0?`
`)}function dQ(t,e,n){return t===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
@@ -54,16 +54,16 @@ caused by: `+zx(r,e)):n},JY=t=>zx(t,new Set),Gx=(t,e,n)=>{if(!V4(t))return"";let
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function _J(t){return t===!1?"return o":`
`:""}function hQ(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function EJ(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var jp=C((Y_e,EA)=>{"use strict";EA.exports={groupRedact:TJ,groupRestore:bJ,nestedRedact:xJ,nestedRestore:SJ};function bJ({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var l=0;l<r;l++){let i=t[l];n[i]=e[l]}}function TJ(t,e,n,r,l){let i=vA(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,o=e.length,f=l?[...e]:void 0,c=new Array(a);for(var p=0;p<a;p++){let m=s[p];c[p]=i[m],l?(f[o]=m,i[m]=n(i[m],f)):r?i[m]=n(i[m]):i[m]=n}return{keys:s,values:c,target:i,flat:!0}}function SJ(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:l}=t[e],i=n;for(let s=r.length-1;s>0;s--)i=i[r[s]];i[r[0]]=l}}function xJ(t,e,n,r,l,i,s){let a=vA(e,n);if(a==null)return;let o=Object.keys(a),f=o.length;for(var c=0;c<f;c++){let p=o[c];AJ(t,a,p,n,r,l,i,s)}return t}function $p(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function AJ(t,e,n,r,l,i,s,a){let o=l.length,f=o-1,c=n;var p=-1,m,h,g,_=null,S=null,T,x,v=!1,b=0,w=0,N=wJ();if(g=m=e[n],typeof m=="object"){for(;m!=null&&++p<o&&(w+=1,n=l[p],_=g,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(v=!0),S=n,p!==f))){if(S){let k=Object.keys(m);for(var O=0;O<k.length;O++){let $=k[O];if(x=m[$],T=n==="*",v)N=t3(N,$,w),b=p,g=_A(x,b-1,n,r,l,i,s,a,c,m,h,g,T,$,p,f,N,t,e[c],w+1);else if(T||typeof x=="object"&&x!==null&&n in x){if(T?g=x:g=x[n],h=p!==f?g:s?a?i(g,[...r,c,...l]):i(g):i,T){let L=z4(t3(N,$,w),g,e[c]);t.push(L),m[$]=h}else if(x[n]!==h)if(h===void 0&&i!==void 0||$p(x,n)&&h===g)N=t3(N,$,w);else{N=t3(N,$,w);let L=z4(t3(N,n,w+1),g,e[c]);t.push(L),x[n]=h}}}S=null}else{if(g=m[n],N=t3(N,n,w),h=p!==f?g:s?a?i(g,[...r,c,...l]):i(g):i,!($p(m,n)&&h===g||h===void 0&&i!==void 0)){let k=z4(N,g,e[c]);t.push(k),m[n]=h}m=m[n]}if(typeof m!="object")break}}}function vA(t,e){for(var n=-1,r=e.length,l=t;l!=null&&++n<r;)l=l[e[n]];return l}function _A(t,e,n,r,l,i,s,a,o,f,c,p,m,h,g,_,S,T,x,v){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?p=t:p=t[n],c=g!==_?p:s?a?i(p,[...r,o,...l]):i(p):i,m){let b=z4(S,p,x);T.push(b),f[h]=c}else if(t[n]!==c){if(!(c===void 0&&i!==void 0||$p(t,n)&&c===p)){let b=z4(t3(S,n,v+1),p,x);T.push(b),t[n]=c}}}for(let b in t)typeof t[b]=="object"&&(S=t3(S,b,v),_A(t[b],e-1,n,r,l,i,s,a,o,f,c,p,m,h,g,_,S,T,x,v+1))}function wJ(){return{parent:null,key:null,children:[],depth:0}}function t3(t,e,n){if(t.depth===n)return t3(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function z4(t,e,n){let r=t,l=[];do l.push(r.key),r=r.parent;while(r.parent!=null);return{path:l,value:e,target:n}}});var TA=C((J_e,bA)=>{"use strict";var{groupRestore:RJ,nestedRestore:OJ}=jp();bA.exports=NJ;function NJ({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),l=IJ(t,r),i=e>0,s=i?{secret:t,groupRestore:RJ,nestedRestore:OJ}:{secret:t};this.restore=Function("o",CJ(l,r,i)).bind(s)}}function IJ(t,e){return e.map(n=>{let{circle:r,escPath:l,leadingBracket:i}=t[n],a=r?`o.${r} = secret[${l}].val`:`o${i?"":"."}${n} = secret[${l}].val`,o=`secret[${l}].val = undefined`;return`
`}function mQ(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var ad=C((_be,YA)=>{"use strict";YA.exports={groupRedact:yQ,groupRestore:gQ,nestedRedact:_Q,nestedRestore:vQ};function gQ({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var l=0;l<r;l++){let i=t[l];n[i]=e[l]}}function yQ(t,e,n,r,l){let i=WA(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,o=e.length,c=l?[...e]:void 0,f=new Array(a);for(var p=0;p<a;p++){let m=s[p];f[p]=i[m],l?(c[o]=m,i[m]=n(i[m],c)):r?i[m]=n(i[m]):i[m]=n}return{keys:s,values:f,target:i,flat:!0}}function vQ(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:l}=t[e],i=n;for(let s=r.length-1;s>0;s--)i=i[r[s]];i[r[0]]=l}}function _Q(t,e,n,r,l,i,s){let a=WA(e,n);if(a==null)return;let o=Object.keys(a),c=o.length;for(var f=0;f<c;f++){let p=o[f];EQ(t,a,p,n,r,l,i,s)}return t}function sd(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function EQ(t,e,n,r,l,i,s,a){let o=l.length,c=o-1,f=n;var p=-1,m,h,g,_=null,S=null,T,x,v=!1,b=0,w=0,N=bQ();if(g=m=e[n],typeof m=="object"){for(;m!=null&&++p<o&&(w+=1,n=l[p],_=g,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(v=!0),S=n,p!==c))){if(S){let k=Object.keys(m);for(var O=0;O<k.length;O++){let j=k[O];if(x=m[j],T=n==="*",v)N=i3(N,j,w),b=p,g=KA(x,b-1,n,r,l,i,s,a,f,m,h,g,T,j,p,c,N,t,e[f],w+1);else if(T||typeof x=="object"&&x!==null&&n in x){if(T?g=x:g=x[n],h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,T){let L=t1(i3(N,j,w),g,e[f]);t.push(L),m[j]=h}else if(x[n]!==h)if(h===void 0&&i!==void 0||sd(x,n)&&h===g)N=i3(N,j,w);else{N=i3(N,j,w);let L=t1(i3(N,n,w+1),g,e[f]);t.push(L),x[n]=h}}}S=null}else{if(g=m[n],N=i3(N,n,w),h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,!(sd(m,n)&&h===g||h===void 0&&i!==void 0)){let k=t1(N,g,e[f]);t.push(k),m[n]=h}m=m[n]}if(typeof m!="object")break}}}function WA(t,e){for(var n=-1,r=e.length,l=t;l!=null&&++n<r;)l=l[e[n]];return l}function KA(t,e,n,r,l,i,s,a,o,c,f,p,m,h,g,_,S,T,x,v){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?p=t:p=t[n],f=g!==_?p:s?a?i(p,[...r,o,...l]):i(p):i,m){let b=t1(S,p,x);T.push(b),c[h]=f}else if(t[n]!==f){if(!(f===void 0&&i!==void 0||sd(t,n)&&f===p)){let b=t1(i3(S,n,v+1),p,x);T.push(b),t[n]=f}}}for(let b in t)typeof t[b]=="object"&&(S=i3(S,b,v),KA(t[b],e-1,n,r,l,i,s,a,o,c,f,p,m,h,g,_,S,T,x,v+1))}function bQ(){return{parent:null,key:null,children:[],depth:0}}function i3(t,e,n){if(t.depth===n)return i3(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function t1(t,e,n){let r=t,l=[];do l.push(r.key),r=r.parent;while(r.parent!=null);return{path:l,value:e,target:n}}});var QA=C((Ebe,JA)=>{"use strict";var{groupRestore:TQ,nestedRestore:SQ}=ad();JA.exports=xQ;function xQ({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),l=AQ(t,r),i=e>0,s=i?{secret:t,groupRestore:TQ,nestedRestore:SQ}:{secret:t};this.restore=Function("o",wQ(l,r,i)).bind(s)}}function AQ(t,e){return e.map(n=>{let{circle:r,escPath:l,leadingBracket:i}=t[n],a=r?`o.${r} = secret[${l}].val`:`o${i?"":"."}${n} = secret[${l}].val`,o=`secret[${l}].val = undefined`;return`
if (secret[${l}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
}
`}).join("")}function CJ(t,e,n){return`
`}).join("")}function wQ(t,e,n){return`
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
@@ -78,34 +78,34 @@ caused by: `+zx(r,e)):n},JY=t=>zx(t,new Set),Gx=(t,e,n)=>{if(!V4(t))return"";let
`:""}
${t}
return o
`}});var xA=C((Q_e,SA)=>{"use strict";SA.exports=kJ;function kJ(t){let{secret:e,censor:n,compileRestore:r,serialize:l,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}=t,f=[{secret:e,censor:n,compileRestore:r}];return l!==!1&&f.push({serialize:l}),o>0&&f.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...f)}});var RA=C((Z_e,wA)=>{"use strict";var AA=pA(),PJ=mA(),DJ=yA(),LJ=TA(),{groupRedact:FJ,nestedRedact:MJ}=jp(),$J=xA(),jJ=$c(),UJ=AA(),Up=t=>t;Up.restore=Up;var BJ="[REDACTED]";Bp.rx=jJ;Bp.validator=AA;wA.exports=Bp;function Bp(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let l=r===!0?void 0:"censor"in t?t.censor:BJ,i=typeof l=="function",s=i&&l.length>1;if(e.length===0)return n||Up;UJ({paths:e,serialize:n,censor:l});let{wildcards:a,wcLen:o,secret:f}=PJ({paths:e,censor:l}),c=LJ({secret:f,wcLen:o}),p="strict"in t?t.strict:!0;return DJ({secret:f,wcLen:o,serialize:n,strict:p,isCensorFct:i,censorFctTakesPath:s},$J({secret:f,censor:l,compileRestore:c,serialize:n,groupRedact:FJ,nestedRedact:MJ,wildcards:a,wcLen:o}))}});var Po=C((eEe,OA)=>{"use strict";var HJ=Symbol("pino.setLevel"),qJ=Symbol("pino.getLevel"),VJ=Symbol("pino.levelVal"),zJ=Symbol("pino.levelComp"),GJ=Symbol("pino.useLevelLabels"),XJ=Symbol("pino.useOnlyCustomLevels"),WJ=Symbol("pino.mixin"),KJ=Symbol("pino.lsCache"),YJ=Symbol("pino.chindings"),JJ=Symbol("pino.asJson"),QJ=Symbol("pino.write"),ZJ=Symbol("pino.redactFmt"),eQ=Symbol("pino.time"),tQ=Symbol("pino.timeSliceIndex"),nQ=Symbol("pino.stream"),rQ=Symbol("pino.stringify"),lQ=Symbol("pino.stringifySafe"),iQ=Symbol("pino.stringifiers"),sQ=Symbol("pino.end"),aQ=Symbol("pino.formatOpts"),oQ=Symbol("pino.messageKey"),uQ=Symbol("pino.errorKey"),cQ=Symbol("pino.nestedKey"),fQ=Symbol("pino.nestedKeyStr"),pQ=Symbol("pino.mixinMergeStrategy"),dQ=Symbol("pino.msgPrefix"),hQ=Symbol("pino.wildcardFirst"),mQ=Symbol.for("pino.serializers"),gQ=Symbol.for("pino.formatters"),yQ=Symbol.for("pino.hooks"),vQ=Symbol.for("pino.metadata");OA.exports={setLevelSym:HJ,getLevelSym:qJ,levelValSym:VJ,levelCompSym:zJ,useLevelLabelsSym:GJ,mixinSym:WJ,lsCacheSym:KJ,chindingsSym:YJ,asJsonSym:JJ,writeSym:QJ,serializersSym:mQ,redactFmtSym:ZJ,timeSym:eQ,timeSliceIndexSym:tQ,streamSym:nQ,stringifySym:rQ,stringifySafeSym:lQ,stringifiersSym:iQ,endSym:sQ,formatOptsSym:aQ,messageKeySym:oQ,errorKeySym:uQ,nestedKeySym:cQ,wildcardFirstSym:hQ,needsMetadataGsym:vQ,useOnlyCustomLevelsSym:XJ,formattersSym:gQ,hooksSym:yQ,nestedKeyStrSym:fQ,mixinMergeStrategySym:pQ,msgPrefixSym:dQ}});var Vp=C((tEe,kA)=>{"use strict";var qp=RA(),{redactFmtSym:_Q,wildcardFirstSym:jc}=Po(),{rx:Hp,validator:EQ}=qp,NA=EQ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),IA="[Redacted]",CA=!1;function bQ(t,e){let{paths:n,censor:r}=TQ(t),l=n.reduce((a,o)=>{Hp.lastIndex=0;let f=Hp.exec(o),c=Hp.exec(o),p=f[1]!==void 0?f[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):f[0];if(p==="*"&&(p=jc),c===null)return a[p]=null,a;if(a[p]===null)return a;let{index:m}=c,h=`${o.substr(m,o.length-1)}`;return a[p]=a[p]||[],p!==jc&&a[p].length===0&&a[p].push(...a[jc]||[]),p===jc&&Object.keys(a).forEach(function(g){a[g]&&a[g].push(h)}),a[p].push(h),a},{}),i={[_Q]:qp({paths:n,censor:r,serialize:e,strict:CA})},s=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,o)=>{if(l[o]===null)a[o]=f=>s(f,[o]);else{let f=typeof r=="function"?(c,p)=>r(c,[o,...p]):r;a[o]=qp({paths:l[o],censor:f,serialize:e,strict:CA})}return a},i)}function TQ(t){if(Array.isArray(t))return t={paths:t,censor:IA},NA(t),t;let{paths:e,censor:n=IA,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),NA({paths:e,censor:n}),{paths:e,censor:n}}kA.exports=bQ});var DA=C((nEe,PA)=>{"use strict";var SQ=()=>"",xQ=()=>`,"time":${Date.now()}`,AQ=()=>`,"time":${Math.round(Date.now()/1e3)}`,wQ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;PA.exports={nullTime:SQ,epochTime:xQ,unixTime:AQ,isoTime:wQ}});var FA=C((rEe,LA)=>{"use strict";function RQ(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}LA.exports=OQ;function OQ(t,e,n){var r=n&&n.stringify||RQ,l=1;if(typeof t=="object"&&t!==null){var i=e.length+l;if(i===1)return t;var s=new Array(i);s[0]=r(t);for(var a=1;a<i;a++)s[a]=r(e[a]);return s.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var f="",c=1-l,p=-1,m=t&&t.length||0,h=0;h<m;){if(t.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,t.charCodeAt(h+1)){case 100:case 102:if(c>=o||e[c]==null)break;p<h&&(f+=t.slice(p,h)),f+=Number(e[c]),p=h+2,h++;break;case 105:if(c>=o||e[c]==null)break;p<h&&(Line truncated
`}});var ew=C((bbe,ZA)=>{"use strict";ZA.exports=RQ;function RQ(t){let{secret:e,censor:n,compileRestore:r,serialize:l,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}=t,c=[{secret:e,censor:n,compileRestore:r}];return l!==!1&&c.push({serialize:l}),o>0&&c.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...c)}});var rw=C((Tbe,nw)=>{"use strict";var tw=HA(),OQ=zA(),NQ=XA(),IQ=QA(),{groupRedact:CQ,nestedRedact:kQ}=ad(),PQ=ew(),DQ=e6(),LQ=tw(),od=t=>t;od.restore=od;var FQ="[REDACTED]";ud.rx=DQ;ud.validator=tw;nw.exports=ud;function ud(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let l=r===!0?void 0:"censor"in t?t.censor:FQ,i=typeof l=="function",s=i&&l.length>1;if(e.length===0)return n||od;LQ({paths:e,serialize:n,censor:l});let{wildcards:a,wcLen:o,secret:c}=OQ({paths:e,censor:l}),f=IQ({secret:c,wcLen:o}),p="strict"in t?t.strict:!0;return NQ({secret:c,wcLen:o,serialize:n,strict:p,isCensorFct:i,censorFctTakesPath:s},PQ({secret:c,censor:l,compileRestore:f,serialize:n,groupRedact:CQ,nestedRedact:kQ,wildcards:a,wcLen:o}))}});var Uo=C((Sbe,lw)=>{"use strict";var MQ=Symbol("pino.setLevel"),$Q=Symbol("pino.getLevel"),jQ=Symbol("pino.levelVal"),UQ=Symbol("pino.levelComp"),BQ=Symbol("pino.useLevelLabels"),HQ=Symbol("pino.useOnlyCustomLevels"),qQ=Symbol("pino.mixin"),VQ=Symbol("pino.lsCache"),zQ=Symbol("pino.chindings"),GQ=Symbol("pino.asJson"),XQ=Symbol("pino.write"),WQ=Symbol("pino.redactFmt"),KQ=Symbol("pino.time"),YQ=Symbol("pino.timeSliceIndex"),JQ=Symbol("pino.stream"),QQ=Symbol("pino.stringify"),ZQ=Symbol("pino.stringifySafe"),eZ=Symbol("pino.stringifiers"),tZ=Symbol("pino.end"),nZ=Symbol("pino.formatOpts"),rZ=Symbol("pino.messageKey"),lZ=Symbol("pino.errorKey"),iZ=Symbol("pino.nestedKey"),sZ=Symbol("pino.nestedKeyStr"),aZ=Symbol("pino.mixinMergeStrategy"),oZ=Symbol("pino.msgPrefix"),uZ=Symbol("pino.wildcardFirst"),cZ=Symbol.for("pino.serializers"),fZ=Symbol.for("pino.formatters"),pZ=Symbol.for("pino.hooks"),dZ=Symbol.for("pino.metadata");lw.exports={setLevelSym:MQ,getLevelSym:$Q,levelValSym:jQ,levelCompSym:UQ,useLevelLabelsSym:BQ,mixinSym:qQ,lsCacheSym:VQ,chindingsSym:zQ,asJsonSym:GQ,writeSym:XQ,serializersSym:cZ,redactFmtSym:WQ,timeSym:KQ,timeSliceIndexSym:YQ,streamSym:JQ,stringifySym:QQ,stringifySafeSym:ZQ,stringifiersSym:eZ,endSym:tZ,formatOptsSym:nZ,messageKeySym:rZ,errorKeySym:lZ,nestedKeySym:iZ,wildcardFirstSym:uZ,needsMetadataGsym:dZ,useOnlyCustomLevelsSym:HQ,formattersSym:fZ,hooksSym:pZ,nestedKeyStrSym:sZ,mixinMergeStrategySym:aZ,msgPrefixSym:oZ}});var pd=C((xbe,ow)=>{"use strict";var fd=rw(),{redactFmtSym:hZ,wildcardFirstSym:t6}=Uo(),{rx:cd,validator:mZ}=fd,iw=mZ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),sw="[Redacted]",aw=!1;function gZ(t,e){let{paths:n,censor:r}=yZ(t),l=n.reduce((a,o)=>{cd.lastIndex=0;let c=cd.exec(o),f=cd.exec(o),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=t6),f===null)return a[p]=null,a;if(a[p]===null)return a;let{index:m}=f,h=`${o.substr(m,o.length-1)}`;return a[p]=a[p]||[],p!==t6&&a[p].length===0&&a[p].push(...a[t6]||[]),p===t6&&Object.keys(a).forEach(function(g){a[g]&&a[g].push(h)}),a[p].push(h),a},{}),i={[hZ]:fd({paths:n,censor:r,serialize:e,strict:aw})},s=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,o)=>{if(l[o]===null)a[o]=c=>s(c,[o]);else{let c=typeof r=="function"?(f,p)=>r(f,[o,...p]):r;a[o]=fd({paths:l[o],censor:c,serialize:e,strict:aw})}return a},i)}function yZ(t){if(Array.isArray(t))return t={paths:t,censor:sw},iw(t),t;let{paths:e,censor:n=sw,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),iw({paths:e,censor:n}),{paths:e,censor:n}}ow.exports=gZ});var cw=C((Abe,uw)=>{"use strict";var vZ=()=>"",_Z=()=>`,"time":${Date.now()}`,EZ=()=>`,"time":${Math.round(Date.now()/1e3)}`,bZ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;uw.exports={nullTime:vZ,epochTime:_Z,unixTime:EZ,isoTime:bZ}});var pw=C((wbe,fw)=>{"use strict";function TZ(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}fw.exports=SZ;function SZ(t,e,n){var r=n&&n.stringify||TZ,l=1;if(typeof t=="object"&&t!==null){var i=e.length+l;if(i===1)return t;var s=new Array(i);s[0]=r(t);for(var a=1;a<i;a++)s[a]=r(e[a]);return s.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var c="",f=1-l,p=-1,m=t&&t.length||0,h=0;h<m;){if(t.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,t.charCodeAt(h+1)){case 100:case 102:if(f>=o||e[f]==null)break;p<h&&(c+=t.slice(p,h)),c+=Number(e[f]),p=h+2,h++;break;case 105:if(f>=o||e[f]==null)break;p<h&&(Line truncated
${T}`,b=`,
${T}`);let J=Math.min(x.length,s),K=0;for(;K<J-1;K++){let ye=a(String(K),x,g,_,S,T);v+=ye!==void 0?ye:"null",v+=b}let Q=a(String(K),x,g,_,S,T);if(v+=Q!==void 0?Q:"null",x.length-1>s){let ye=x.length-s-1;v+=`${b}"... ${aa(ye)} not stringified"`}return S!==""&&(v+=`
${w}`),g.pop(),`[${v}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",$="";S!==""&&(T+=S,b=`,
${T}`,k=" ");let L=Math.min(O,s);l&&!md(x)&&(N=hd(N)),g.push(x);for(let J=0;J<L;J++){let K=N[J],Q=a(K,x,g,_,S,T);Q!==void 0&&(v+=`${$}${$3(K)}:${k}${Q}`,$=b)}if(O>s){let J=O-s;v+=`${$}"...":${k}"${aa(J)} not stringified"`,$=b}return S!==""&&$.length>1&&(v=`
${T}`);let Q=Math.min(x.length,s),Y=0;for(;Y<Q-1;Y++){let ve=a(String(Y),x,g,_,S,T);v+=ve!==void 0?ve:"null",v+=b}let Z=a(String(Y),x,g,_,S,T);if(v+=Z!==void 0?Z:"null",x.length-1>s){let ve=x.length-s-1;v+=`${b}"... ${pa(ve)} not stringified"`}return S!==""&&(v+=`
${w}`),g.pop(),`[${v}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",j="";S!==""&&(T+=S,b=`,
${T}`,k=" ");let L=Math.min(O,s);l&&!Md(x)&&(N=Fd(N)),g.push(x);for(let Q=0;Q<L;Q++){let Y=N[Q],Z=a(Y,x,g,_,S,T);Z!==void 0&&(v+=`${j}${H3(Y)}:${k}${Z}`,j=b)}if(O>s){let Q=O-s;v+=`${j}"...":${k}"${pa(Q)} not stringified"`,j=b}return S!==""&&j.length>1&&(v=`
${T}${v}
${w}`),g.pop(),`{${v}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(x);default:return e?e(x):void 0}}function o(m,h,g,_,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return $3(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return n;let x=T,v="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,v+=`
${w}`),g.pop(),`{${v}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(x);default:return e?e(x):void 0}}function o(m,h,g,_,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return H3(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return n;let x=T,v="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,v+=`
${T}`,b=`,
${T}`);let O=Math.min(h.length,s),k=0;for(;k<O-1;k++){let L=o(String(k),h[k],g,_,S,T);v+=L!==void 0?L:"null",v+=b}let $=o(String(k),h[k],g,_,S,T);if(v+=$!==void 0?$:"null",h.length-1>s){let L=h.length-s-1;v+=`${b}"... ${aa(L)} not stringified"`}return S!==""&&(v+=`
${T}`);let O=Math.min(h.length,s),k=0;for(;k<O-1;k++){let L=o(String(k),h[k],g,_,S,T);v+=L!==void 0?L:"null",v+=b}let j=o(String(k),h[k],g,_,S,T);if(v+=j!==void 0?j:"null",h.length-1>s){let L=h.length-s-1;v+=`${b}"... ${pa(L)} not stringified"`}return S!==""&&(v+=`
${x}`),g.pop(),`[${v}]`}g.push(h);let w="";S!==""&&(T+=S,b=`,
${T}`,w=" ");let N="";for(let O of _){let k=o(O,h[O],g,_,S,T);k!==void 0&&(v+=`${N}${$3(O)}:${w}${k}`,N=b)}return S!==""&&N.length>1&&(v=`
${T}`,w=" ");let N="";for(let O of _){let k=o(O,h[O],g,_,S,T);k!==void 0&&(v+=`${N}${H3(O)}:${w}${k}`,N=b)}return S!==""&&N.length>1&&(v=`
${T}${v}
${x}`),g.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(m,h,g,_,S){switch(typeof h){case"string":return $3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,g,_,S);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let T=S;if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S+=_;let k=`
${S}`,$=`,
${S}`,L=Math.min(h.length,s),J=0;for(;J<L-1;J++){let Q=f(String(J),h[J],g,_,S);k+=Q!==void 0?Q:"null",k+=$}let K=f(String(J),h[J],g,_,S);if(k+=K!==void 0?K:"null",h.length-1>s){let Q=h.length-s-1;k+=`${$}"... ${aa(Q)} not stringified"`}return k+=`
${x}`),g.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(m,h,g,_,S){switch(typeof h){case"string":return H3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return c(m,h,g,_,S);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let T=S;if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S+=_;let k=`
${S}`,j=`,
${S}`,L=Math.min(h.length,s),Q=0;for(;Q<L-1;Q++){let Z=c(String(Q),h[Q],g,_,S);k+=Z!==void 0?Z:"null",k+=j}let Y=c(String(Q),h[Q],g,_,S);if(k+=Y!==void 0?Y:"null",h.length-1>s){let Z=h.length-s-1;k+=`${j}"... ${pa(Z)} not stringified"`}return k+=`
${T}`,g.pop(),`[${k}]`}let x=Object.keys(h),v=x.length;if(v===0)return"{}";if(i<g.length+1)return'"[Object]"';S+=_;let b=`,
${S}`,w="",N="",O=Math.min(v,s);md(h)&&(w+=Dw(h,b,s),x=x.slice(h.length),O-=h.length,N=b),l&&(x=hd(x)),g.push(h);for(let k=0;k<O;k++){let $=x[k],L=f($,h[$],g,_,S);L!==void 0&&(w+=`${N}${$3($)}: ${L}`,N=b)}if(v>s){let k=v-s;w+=`${N}"...": "${aa(k)} not stringified"`,N=b}return N!==""&&(w=`
${S}`,w="",N="",O=Math.min(v,s);Md(h)&&(w+=cR(h,b,s),x=x.slice(h.length),O-=h.length,N=b),l&&(x=Fd(x)),g.push(h);for(let k=0;k<O;k++){let j=x[k],L=c(j,h[j],g,_,S);L!==void 0&&(w+=`${N}${H3(j)}: ${L}`,N=b)}if(v>s){let k=v-s;w+=`${N}"...": "${pa(k)} not stringified"`,N=b}return N!==""&&(w=`
${S}${w}
${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(m,h,g){switch(typeof h){case"string":return $3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return c(m,h,g);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let _="";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h);let b=Math.min(h.length,s),w=0;for(;w<b-1;w++){let O=c(String(w),h[w],g);_+=O!==void 0?O:"null",_+=","}let N=c(String(w),h[w],g);if(_+=N!==void 0?N:"null",h.length-1>s){let O=h.length-s-1;_+=`,"... ${aa(O)} not stringified"`}return g.pop(),`[${_}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",v=Math.min(T,s);md(h)&&(_+=Dw(h,",",s),S=S.slice(h.length),v-=h.length,x=","),l&&(S=hd(S)),g.push(h);for(let b=0;b<v;b++){let w=S[b],N=c(w,h[w],g);N!==void 0&&(_+=`${x}${$3(w)}:${N}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${aa(b)} not stringified"`}return g.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function p(m,h,g){if(arguments.length>1){let _="";if(typeof g=="number"?_=" ".repeat(Math.min(g,10)):typeof g=="string"&&(_=g.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,_,"");if(Array.isArray(h))return o("",m,[],Xee(h),_,"")}if(_.length!==0)return f("",m,[],_,"")}return c("",m,[])}return p}});var Bw=C((vEe,Uw)=>{"use strict";var vd=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:jw}=Kc(),Kee=jw.info;function Yee(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(jw);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let l={write:i,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:f,[vd]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,l):a.call(l,t),t=null,l;function i(c){let p,m=this.lastLevel,{streams:h}=this,g=0,_;for(let S=Qee(h.length,e.dedupe);ete(S,h.length,e.dedupe);S=Zee(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[vd]){let{lastTime:T,lastMsg:x,lastObj:v,lastLogger:b}=this;_.lastLevel=m,_.lastTime=T,_.lastMsg=x,_.lastObj=v,_.lastLogger=b}_.write(c),e.dedupe&&(g=p.level)}else if(!e.dedupe)break}function s(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return l;let p=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:g}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=g[c.level]:typeof c.level=="number"?_=c.level:_=Kee;let S={stream:m,level:_,levelVal:void 0,id:n++};return h.unshift(S),h.sort(Jee),this.minLevel=h[0].level,l}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function f(c){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:c,stream:this.streams[m].stream};return{write:i,add:a,minLevel:c,streams:p,clone:f,flushSync:s,[vd]:!0}}}function Jee(t,e){return t.level-e.level}function Qee(t,e){return e?t-1:0}function Zee(t,e){return e?t-1:t+1}function ete(t,e,n){return n?t>=0:t<e}Uw.exports=Yee});var eR=C((_Ee,d2)=>{"use strict";var tte=require("os"),Kw=Fp(),nte=Mp(),rte=Vp(),Yw=DA(),lte=Pw(),Jw=Po(),{configure:ite}=$w(),{assertDefaultLevelFound:ste,mappings:Qw,genLsCache:ate,genLevelComparison:ote,assertLevelComparison:ute}=ud(),{DEFAULT_LEVELS:cte,SORTING_ORDER:fte}=Kc(),{createArgsNormalizer:pte,asChindings:dte,buildSafeSonicBoom:Hw,buildFormatters:hte,stringify:_d,normalizeDestFileDescriptor:qw,noop:mte}=Wc(),{version:gte}=cd(),{chindingsSym:Vw,redactFmtSym:yte,serializersSym:zw,timeSym:vte,timeSliceIndexSym:_te,streamSym:Ete,stringifySym:Gw,stringifySafeSym:Ed,stringifiersSym:Xw,setLevelSym:bte,endSym:Tte,formatOptsSym:Ste,messageKeySym:xte,errorKeySym:Ate,nestedKeySym:wte,mixinSym:Rte,levelCompSym:Ote,useOnlyCustomLevelsSym:Nte,formattersSym:Ww,hooksSym:Ite,nestedKeyStrSym:Cte,mixinMergeStrategySym:kte,msgPrefixSym:Pte}=Jw,{epochTime:Zw,nullTime:Dte}=Yw,{pid:Lte}=process,Fte=tte.hostname(),Mte=Kw.err,$te={level:"info",levelComparison:fte.ASC,levels:cte,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Lte,hostname:Fte},serializers:Object.assign(Object.create(null),{err:Mte}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:Zw,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},jte=pte($te),Ute=Object.assign(Object.create(null),Kw);function bd(...t){let e={},{opts:n,stream:r}=jte(e,nte(),...t),{redact:l,crlf:i,s Line truncated
${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(m,h,g){switch(typeof h){case"string":return H3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,g);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let _="";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h);let b=Math.min(h.length,s),w=0;for(;w<b-1;w++){let O=f(String(w),h[w],g);_+=O!==void 0?O:"null",_+=","}let N=f(String(w),h[w],g);if(_+=N!==void 0?N:"null",h.length-1>s){let O=h.length-s-1;_+=`,"... ${pa(O)} not stringified"`}return g.pop(),`[${_}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",v=Math.min(T,s);Md(h)&&(_+=cR(h,",",s),S=S.slice(h.length),v-=h.length,x=","),l&&(S=Fd(S)),g.push(h);for(let b=0;b<v;b++){let w=S[b],N=f(w,h[w],g);N!==void 0&&(_+=`${x}${H3(w)}:${N}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${pa(b)} not stringified"`}return g.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function p(m,h,g){if(arguments.length>1){let _="";if(typeof g=="number"?_=" ".repeat(Math.min(g,10)):typeof g=="string"&&(_=g.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,_,"");if(Array.isArray(h))return o("",m,[],Hte(h),_,"")}if(_.length!==0)return c("",m,[],_,"")}return f("",m,[])}return p}});var yR=C((Bbe,gR)=>{"use strict";var Ud=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:mR}=f6(),Vte=mR.info;function zte(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(mR);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(f=>{r[f]=e.levels[f]});let l={write:i,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:c,[Ud]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,l):a.call(l,t),t=null,l;function i(f){let p,m=this.lastLevel,{streams:h}=this,g=0,_;for(let S=Xte(h.length,e.dedupe);Kte(S,h.length,e.dedupe);S=Wte(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[Ud]){let{lastTime:T,lastMsg:x,lastObj:v,lastLogger:b}=this;_.lastLevel=m,_.lastTime=T,_.lastMsg=x,_.lastObj=v,_.lastLogger=b}_.write(f),e.dedupe&&(g=p.level)}else if(!e.dedupe)break}function s(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}function a(f){if(!f)return l;let p=typeof f.write=="function"||f.stream,m=f.write?f:f.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:g}=this,_;typeof f.levelVal=="number"?_=f.levelVal:typeof f.level=="string"?_=g[f.level]:typeof f.level=="number"?_=f.level:_=Vte;let S={stream:m,level:_,levelVal:void 0,id:n++};return h.unshift(S),h.sort(Gte),this.minLevel=h[0].level,l}function o(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}function c(f){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:f,stream:this.streams[m].stream};return{write:i,add:a,minLevel:f,streams:p,clone:c,flushSync:s,[Ud]:!0}}}function Gte(t,e){return t.level-e.level}function Xte(t,e){return e?t-1:0}function Wte(t,e){return e?t-1:t+1}function Kte(t,e,n){return n?t>=0:t<e}gR.exports=zte});var IR=C((Hbe,g2)=>{"use strict";var Yte=require("os"),AR=ld(),Jte=id(),Qte=pd(),wR=cw(),Zte=uR(),RR=Uo(),{configure:ene}=hR(),{assertDefaultLevelFound:tne,mappings:OR,genLsCache:nne,genLevelComparison:rne,assertLevelComparison:lne}=Cd(),{DEFAULT_LEVELS:ine,SORTING_ORDER:sne}=f6(),{createArgsNormalizer:ane,asChindings:one,buildSafeSonicBoom:vR,buildFormatters:une,stringify:Bd,normalizeDestFileDescriptor:_R,noop:cne}=c6(),{version:fne}=kd(),{chindingsSym:ER,redactFmtSym:pne,serializersSym:bR,timeSym:dne,timeSliceIndexSym:hne,streamSym:mne,stringifySym:TR,stringifySafeSym:Hd,stringifiersSym:SR,setLevelSym:gne,endSym:yne,formatOptsSym:vne,messageKeySym:_ne,errorKeySym:Ene,nestedKeySym:bne,mixinSym:Tne,levelCompSym:Sne,useOnlyCustomLevelsSym:xne,formattersSym:xR,hooksSym:Ane,nestedKeyStrSym:wne,mixinMergeStrategySym:Rne,msgPrefixSym:One}=RR,{epochTime:NR,nullTime:Nne}=wR,{pid:Ine}=process,Cne=Yte.hostname(),kne=AR.err,Pne={level:"info",levelComparison:sne.ASC,levels:ine,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Ine,hostname:Cne},serializers:Object.assign(Object.create(null),{err:kne}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:NR,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Dne=ane(Pne),Lne=Object.assign(Object.create(null),AR);function qd(...t){let e={},{opts:n,stream:r}=Dne(e,Jte(),...t),{redact:l,crlf:i,s Line truncated
`:`
`),Oe=dte.bind(null,{[Vw]:"",[zw]:s,[Xw]:K,[Gw]:_d,[Ed]:$,[Ww]:L}),fe="";p!==null&&(m===void 0?fe=Oe(p):fe=Oe(Object.assign({},p,{name:m})));let se=a instanceof Function?a:a?Zw:Dte,ge=se().indexOf(":")+1;if(x&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(k&&typeof k!="string")throw Error(`Unknown msgPrefix type "${typeof k}" - expected "string"`);ste(h,g,x);let H=Qw(g,x);ute(_);let re=ote(_);return Object.assign(e,{levels:H,[Ote]:re,[Nte]:x,[Ete]:r,[vte]:se,[_te]:ge,[Gw]:_d,[Ed]:$,[Xw]:K,[Tte]:ye,[Ste]:Q,[xte]:o,[Ate]:f,[wte]:c,[Cte]:c?`,${JSON.stringify(c)}:{`:"",[zw]:s,[Rte]:S,[kte]:T,[Vw]:fe,[Ww]:L,[Ite]:b,silent:mte,onChild:O,[Pte]:k}),Object.setPrototypeOf(e,lte()),ate(e),e[bte](h),e}d2.exports=bd;d2.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=qw(t.dest||process.stdout.fd),Hw(t)):Hw({dest:qw(t),minLength:0});d2.exports.transport=rd();d2.exports.multistream=Bw();d2.exports.levels=Qw();d2.exports.stdSerializers=Ute;d2.exports.stdTimeFunctions=Object.assign({},Yw);d2.exports.symbols=Jw;d2.exports.version=gte;d2.exports.default=bd;d2.exports.pino=bd});var X4=C((EEe,iR)=>{"use strict";var Bte=Vx(),Jc=eR(),{serializersSym:tR}=Jc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:Hte,FST_ERR_LOG_INVALID_LOGGER:qte}=il();function nR(t){if(t.stream&&t.file)throw new Hte;t.file&&(t.stream=Jc.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[tR]&&(t.serializers=Object.assign({},t.serializers,e[tR])),r=e.child({},t),t.logger=e,t.genReqId=n):r=Jc(t,t.stream),r}var Td={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:Jc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Vte(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function zte(t){if(!t.logger){let r=Bte;return r.child=()=>r,{logger:r,hasLogger:!1}}if(rR(t.logger))return{logger:nR({logger:t.logger,serializers:Object.assign({},Td,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Td,e.serializers),t.logger=e,{logger:nR(t.logger),hasLogger:!0}}function rR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(l=>!t[l]||typeof t[l]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw qte(r.join(","))}else return!0}function Gte(t,e,n,r,l){let i={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,i,l||{},n);return t.childLoggerFactory!==lR&&rR(s,!0),s}function lR(t,e,n){return t.child(e,n)}iR.exports={createLogger:zte,createChildLogger:Gte,defaultChildLoggerFactory:lR,serializers:Td,now:Vte}});var W4=C((bEe,sR)=>{"use strict";sR.exports=Xte;function Fo(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Xte(t){if(t=t||{},t.circles)return Wte(t);return t.proto?r:n;function e(l,i){for(var s=Object.keys(l),a=new Array(s.length),o=0;o<s.length;o++){var f=s[o],c=l[f];typeof c!="object"||c===null?a[f]=c:c instanceof Date?a[f]=new Date(c):ArrayBuffer.isView(c)?a[f]=Fo(c):a[f]=i(c)}return a}function n(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,n);if(l instanceof Map)return new Map(e(Array.from(l),n));if(l instanceof Set)return new Set(e(Array.from(l),n));var i={};for(var s in l)if(Object.hasOwnProperty.call(l,s)!==!1){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=Fo(a):i[s]=n(a)}return i}function r(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,r);if(l instanceof Map)return new Map(e(Array.from(l),r));if(l instanceof Set)return new Set(e(Array.from(l),r));var i={};for(var s in l){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),r)):a instanceof Set?i[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?i[s]=Fo(a):i[s]=r(a)}return i}}function Wte(t){var e=[],n=[];return t.proto?i:l;function r(s,a){for(var o=Object.keys(s),f=new Array(o.length),c=0;c<o.length;c++){var p=o[c],m=s[p];if(typeof m!="object"||m===null)f[p]=m;else if(m instanceof Date)f[p]=new Date(m);else if(ArrayBuffer.isView(m))f[p]=Fo(m);else{var h=e.indexOf(m);h!==-1?f[p]=n[h]:f[p]=a(m)}}return f}function l(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.is Line truncated
`:""},this._extScope=e,this._scope=new $2.Scope({parent:e}),this._nodes=[new Md]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,l){let i=this._scope.toName(n);return r!==void 0&&l&&(this._constants[i.str]=r),this._leafNode(new Cd(e,i,r)),i}const(e,n,r){return this._def($2.varKinds.const,e,n,r)}let(e,n,r){return this._def($2.varKinds.let,e,n,r)}var(e,n,r){return this._def($2.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new n6(e,n,r))}add(e,n){return this._leafNode(new kd(e,Et.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Dt.nil&&this._leafNode(new Fd(e)),this}object(...e){let n=["{"];for(let[r,l]of e)n.length>1&&n.push(","),n.push(r),(r!==l||this.opts.es5)&&(n.push(":"),(0,Dt.addCodeArg)(n,l));return n.push("}"),new Dt._Code(n)}if(e,n,r){if(this._blockNode(new ca(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ca(e))}else(){return this._elseNode(new $o)}endIf(){return this._endBlockNode(ca,$o)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new $d(e),n)}forRange(e,n,r,l,i=this.opts.es5?$2.varKinds.var:$2.varKinds.let){let s=this._scope.toName(e);return this._for(new jd(i,s,n,r),()=>l(s))}forOf(e,n,r,l=$2.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Dt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Dt._)`${s}.length`,a=>{this.var(i,(0,Dt._)`${s}[${a}]`),r(i)})}return this._for(new r6("of",l,i,n),()=>r(i))}forIn(e,n,r,l=this.opts.es5?$2.varKinds.var:$2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Dt._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new r6("in",l,i,n),()=>r(i))}endFor(){return this._endBlockNode(fa)}label(e){return this._leafNode(new Pd(e))}break(e){return this._leafNode(new Dd(e))}return(e){let n=new e1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(e1)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let l=new Ud;if(this._blockNode(l),this.code(e),n){let i=this.name("e");this._currNode=l.catch=new t1(i),n(i)}return r&&(this._currNode=l.finally=new n1,this.code(r)),this._endBlockNode(t1,n1)}throw(e){return this._leafNode(new Ld(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Dt.nil,r,l){return this._blockNode(new Z4(e,n,r)),l&&this.code(l).endFunc(),this}endFunc(){return this._endBlockNode(Z4)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof ca))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Et.CodeGen=Bd;function pa(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function l6(t,e){return e instanceof Dt._CodeOrName?pa(t,e.names):t}function jo(t,e,n){if(t instanceof Dt.Name)return r(t);if(!l(t))return t;return new Dt._Code(t._items.reduce((i,s)=>(s instanceof Dt.Name&&(s=r(s)),s instanceof Dt._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function l(i){return i instanceof Dt._Code&&i._items.some(s=>s instanceof Dt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function hne(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function mR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Dt._)`!${Hd(t)}`}Et.not=mR;var mne=gR(Et.operators.AND);function gne(...t){return t.reduce(mne)}Et.and=gne;var yne=gR(Et.operators.OR);function vne(...t){return t.reduce(yne)}Et.or=vne;function gR(t){return(e,n)=>e===Dt.nil?n:n===Dt.nil?e:(0,Dt._)`${Hd(e)} ${t} ${Hd(n)}`}function Hd(t){return t instanceof Dt.Name?t:(0, Line truncated
|| (${s} == "string" && ${l} && ${l} == +${l})`).assign(a,(0,gt._)`+${l}`);return;case"integer":r.elseIf((0,gt._)`${s} === "boolean" || ${l} === null
|| (${s} === "string" && ${l} && ${l} == +${l} && !(${l} % 1))`).assign(a,(0,gt._)`+${l}`);return;case"boolean":r.elseIf((0,gt._)`${l} === "false" || ${l} === 0 || ${l} === null`).assign(a,!1).elseIf((0,gt._)`${l} === "true" || ${l} === 1`).assign(a,!0);return;case"null":r.elseIf((0,gt._)`${l} === "" || ${l} === 0 || ${l} === false`),r.assign(a,null);return;case"array":r.elseIf((0,gt._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${l} === null`).assign(a,(0,gt._)`[${l}]`)}}}function nre({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,gt._)`${e} !== undefined`,()=>t.assign((0,gt._)`${e}[${n}]`,r))}function Wd(t,e,n,r=l1.Correct){let l=r===l1.Correct?gt.operators.EQ:gt.operators.NEQ,i;switch(t){case"null":return(0,gt._)`${e} ${l} null`;case"array":i=(0,gt._)`Array.isArray(${e})`;break;case"object":i=(0,gt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,gt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,gt._)`typeof ${e} ${l} ${t}`}return r===l1.Correct?i:(0,gt.not)(i);function s(a=gt.nil){return(0,gt.and)((0,gt._)`typeof ${e} == "number"`,a,n?(0,gt._)`isFinite(${e})`:gt.nil)}}Vr.checkDataType=Wd;function Kd(t,e,n,r){if(t.length===1)return Wd(t[0],e,n,r);let l,i=(0,kR.toHash)(t);if(i.array&&i.object){let s=(0,gt._)`typeof ${e} != "object"`;l=i.null?s:(0,gt._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else l=gt.nil;i.number&&delete i.integer;for(let s in i)l=(0,gt.and)(l,Wd(s,e,n,r));return l}Vr.checkDataTypes=Kd;var rre={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,gt._)`{type: ${t}}`:(0,gt._)`{type: ${e}}`};function Yd(t){let e=lre(t);(0,Jne.reportError)(e,rre)}Vr.reportTypeError=Yd;function lre(t){let{gen:e,data:n,schema:r}=t,l=(0,kR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}});var FR=C(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0});a6.assignDefaults=void 0;var Ho=Je(),ire=yt();function sre(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let l in n)LR(t,l,n[l].default);else e==="array"&&Array.isArray(r)&&r.forEach((l,i)=>LR(t,i,l.default))}a6.assignDefaults=sre;function LR(t,e,n){let{gen:r,compositeRule:l,data:i,opts:s}=t;if(n===void 0)return;let a=(0,Ho._)`${i}${(0,Ho.getProperty)(e)}`;if(l){(0,ire.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,Ho._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,Ho._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,Ho._)`${a} = ${(0,Ho.stringify)(n)}`)}});var zr=C(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.validateUnion=mn.validateArray=mn.usePattern=mn.callValidateCode=mn.schemaProperties=mn.allSchemaProperties=mn.noPropertyInData=mn.propertyInData=mn.isOwnProperty=mn.hasPropFunc=mn.reportMissingProp=mn.checkMissingProp=mn.checkReportMissingProp=void 0;var Cn=Je(),Jd=yt(),B3=m2(),are=yt();function ore(t,e){let{gen:n,data:r,it:l}=t;n.if(Zd(n,r,e,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Cn._)`${e}`},!0),t.error()})}mn.checkReportMissingProp=ore;function ure({gen:t,data:e,it:{opts:n}},r,l){return(0,Cn.or)(...r.map(i=>(0,Cn.and)(Zd(t,e,i,n.ownProperties),(0,Cn._)`${l} = ${i}`)))}mn.checkMissingProp=ure;function cre(t,e){t.setParams({missingProperty:e},!0),t.error()}mn.reportMissingProp=cre;function MR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Cn._)`Object.prototype.hasOwnProperty`})}mn.hasPropFunc=MR;function Qd(t,e,n){return(0,Cn._)`${MR(t)}.call(${e}, ${n})`}mn.isOwnProperty=Qd;function fre(t,e,n,r){let l=(0,Cn._)`${e}${(0,Cn.getProperty)(n)} !== undefined`;return r?(0,Cn._)`${l} && ${Qd(t,e,n)}`:l}mn.propertyInData=fre;function Zd(t,e,n,r){let l=(0,Cn._)`${e}${(0,Cn.getProperty)(n)} === undefined`;return r?(0,Cn.or)(l,(0,Cn.not)(Qd(t,e,n))):l}mn.noPropertyInData=Zd;function $R(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}mn.allSchemaProperties=$R;function pre(t,e){return $R(e).filter(n=>!(0,Jd.alwaysValidSchema)(t,e[n]))}mn.schemaProperties=pre;function dre({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:l,errorPath:i},it:s},a,o,f){let c=f?(0,Cn._)`${t}, ${e}, ${r}${l}`:e,p=[[B3.default.instancePath,(0,Cn.strConcat)(B3.default.instancePath,i)],[B3.default.parentData,s.parentData],[B3.default.parentDataProperty,s.parentDataProperty],[B3.default.rootData,B3.default.rootData]];s.opts.dynamicRef&&p.push([B3.default.dynamicAnchors,B3.default.dynamicAnchors]);let m=(0,Cn._)`${c}, ${n.object(...p)}`;return o!==Cn.nil?(0,Cn._)`${a}.call(${o}, ${m})`:(0,Cn._)`${a}(${m})`}mn.callValidateCode=dre;var hre=(0,Cn._)`new RegExp`;function mre({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:l}=e.code,i=l(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Cn._)`${l.code==="new RegExp"?hre:(0,are.useFunc)(t,l)}(${n}, ${r})`})}mn.usePattern=mre;function gre(t){let{gen:e,data:n,keyword:r,it:l}=t,i=e.name("valid");if(l.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let o=e.const("len",(0,Cn._)`${n}.length`);e.forRange("i",0,o,f=>{t.subschema({keyword:r,dataProp:f,dataPropType:Jd.Type.Num},i),e.if((0,Cn.not)(i),a)})}}mn.validateArray=gre;function yre(t){let{gen:e,schema:n,keyword:r,it:l}=t;if(! Line truncated
`),Ne=one.bind(null,{[ER]:"",[bR]:s,[SR]:Y,[TR]:Bd,[Hd]:j,[xR]:L}),pe="";p!==null&&(m===void 0?pe=Ne(p):pe=Ne(Object.assign({},p,{name:m})));let ae=a instanceof Function?a:a?NR:Nne,ye=ae().indexOf(":")+1;if(x&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(k&&typeof k!="string")throw Error(`Unknown msgPrefix type "${typeof k}" - expected "string"`);tne(h,g,x);let q=OR(g,x);lne(_);let le=rne(_);return Object.assign(e,{levels:q,[Sne]:le,[xne]:x,[mne]:r,[dne]:ae,[hne]:ye,[TR]:Bd,[Hd]:j,[SR]:Y,[yne]:ve,[vne]:Z,[_ne]:o,[Ene]:c,[bne]:f,[wne]:f?`,${JSON.stringify(f)}:{`:"",[bR]:s,[Tne]:S,[Rne]:T,[ER]:pe,[xR]:L,[Ane]:b,silent:cne,onChild:O,[One]:k}),Object.setPrototypeOf(e,Zte()),nne(e),e[gne](h),e}g2.exports=qd;g2.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=_R(t.dest||process.stdout.fd),vR(t)):vR({dest:_R(t),minLength:0});g2.exports.transport=Ad();g2.exports.multistream=yR();g2.exports.levels=OR();g2.exports.stdSerializers=Lne;g2.exports.stdTimeFunctions=Object.assign({},wR);g2.exports.symbols=RR;g2.exports.version=fne;g2.exports.default=qd;g2.exports.pino=qd});var r1=C((qbe,LR)=>{"use strict";var Fne=EA(),d6=IR(),{serializersSym:CR}=d6.symbols,{FST_ERR_LOG_INVALID_DESTINATION:Mne,FST_ERR_LOG_INVALID_LOGGER:$ne}=al();function kR(t){if(t.stream&&t.file)throw new Mne;t.file&&(t.stream=d6.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[CR]&&(t.serializers=Object.assign({},t.serializers,e[CR])),r=e.child({},t),t.logger=e,t.genReqId=n):r=d6(t,t.stream),r}var Vd={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:d6.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function jne(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function Une(t){if(!t.logger){let r=Fne;return r.child=()=>r,{logger:r,hasLogger:!1}}if(PR(t.logger))return{logger:kR({logger:t.logger,serializers:Object.assign({},Vd,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Vd,e.serializers),t.logger=e,{logger:kR(t.logger),hasLogger:!0}}function PR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(l=>!t[l]||typeof t[l]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw $ne(r.join(","))}else return!0}function Bne(t,e,n,r,l){let i={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,i,l||{},n);return t.childLoggerFactory!==DR&&PR(s,!0),s}function DR(t,e,n){return t.child(e,n)}LR.exports={createLogger:Une,createChildLogger:Bne,defaultChildLoggerFactory:DR,serializers:Vd,now:jne}});var l1=C((Vbe,FR)=>{"use strict";FR.exports=Hne;function qo(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Hne(t){if(t=t||{},t.circles)return qne(t);return t.proto?r:n;function e(l,i){for(var s=Object.keys(l),a=new Array(s.length),o=0;o<s.length;o++){var c=s[o],f=l[c];typeof f!="object"||f===null?a[c]=f:f instanceof Date?a[c]=new Date(f):ArrayBuffer.isView(f)?a[c]=qo(f):a[c]=i(f)}return a}function n(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,n);if(l instanceof Map)return new Map(e(Array.from(l),n));if(l instanceof Set)return new Set(e(Array.from(l),n));var i={};for(var s in l)if(Object.hasOwnProperty.call(l,s)!==!1){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=qo(a):i[s]=n(a)}return i}function r(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,r);if(l instanceof Map)return new Map(e(Array.from(l),r));if(l instanceof Set)return new Set(e(Array.from(l),r));var i={};for(var s in l){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),r)):a instanceof Set?i[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?i[s]=qo(a):i[s]=r(a)}return i}}function qne(t){var e=[],n=[];return t.proto?i:l;function r(s,a){for(var o=Object.keys(s),c=new Array(o.length),f=0;f<o.length;f++){var p=o[f],m=s[p];if(typeof m!="object"||m===null)c[p]=m;else if(m instanceof Date)c[p]=new Date(m);else if(ArrayBuffer.isView(m))c[p]=qo(m);else{var h=e.indexOf(m);h!==-1?c[p]=n[h]:c[p]=a(m)}}return c}function l(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.is Line truncated
`:""},this._extScope=e,this._scope=new B2.Scope({parent:e}),this._nodes=[new ih]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,l){let i=this._scope.toName(n);return r!==void 0&&l&&(this._constants[i.str]=r),this._leafNode(new Zd(e,i,r)),i}const(e,n,r){return this._def(B2.varKinds.const,e,n,r)}let(e,n,r){return this._def(B2.varKinds.let,e,n,r)}var(e,n,r){return this._def(B2.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new v6(e,n,r))}add(e,n){return this._leafNode(new eh(e,Tt.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Mt.nil&&this._leafNode(new lh(e)),this}object(...e){let n=["{"];for(let[r,l]of e)n.length>1&&n.push(","),n.push(r),(r!==l||this.opts.es5)&&(n.push(":"),(0,Mt.addCodeArg)(n,l));return n.push("}"),new Mt._Code(n)}if(e,n,r){if(this._blockNode(new ma(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ma(e))}else(){return this._elseNode(new zo)}endIf(){return this._endBlockNode(ma,zo)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new sh(e),n)}forRange(e,n,r,l,i=this.opts.es5?B2.varKinds.var:B2.varKinds.let){let s=this._scope.toName(e);return this._for(new ah(i,s,n,r),()=>l(s))}forOf(e,n,r,l=B2.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Mt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Mt._)`${s}.length`,a=>{this.var(i,(0,Mt._)`${s}[${a}]`),r(i)})}return this._for(new _6("of",l,i,n),()=>r(i))}forIn(e,n,r,l=this.opts.es5?B2.varKinds.var:B2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Mt._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new _6("in",l,i,n),()=>r(i))}endFor(){return this._endBlockNode(ga)}label(e){return this._leafNode(new th(e))}break(e){return this._leafNode(new nh(e))}return(e){let n=new c1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(c1)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let l=new oh;if(this._blockNode(l),this.code(e),n){let i=this.name("e");this._currNode=l.catch=new f1(i),n(i)}return r&&(this._currNode=l.finally=new p1,this.code(r)),this._endBlockNode(f1,p1)}throw(e){return this._leafNode(new rh(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Mt.nil,r,l){return this._blockNode(new u1(e,n,r)),l&&this.code(l).endFunc(),this}endFunc(){return this._endBlockNode(u1)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof ma))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Tt.CodeGen=uh;function ya(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function E6(t,e){return e instanceof Mt._CodeOrName?ya(t,e.names):t}function Go(t,e,n){if(t instanceof Mt.Name)return r(t);if(!l(t))return t;return new Mt._Code(t._items.reduce((i,s)=>(s instanceof Mt.Name&&(s=r(s)),s instanceof Mt._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function l(i){return i instanceof Mt._Code&&i._items.some(s=>s instanceof Mt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function ure(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function zR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Mt._)`!${ch(t)}`}Tt.not=zR;var cre=GR(Tt.operators.AND);function fre(...t){return t.reduce(cre)}Tt.and=fre;var pre=GR(Tt.operators.OR);function dre(...t){return t.reduce(pre)}Tt.or=dre;function GR(t){return(e,n)=>e===Mt.nil?n:n===Mt.nil?e:(0,Mt._)`${ch(e)} ${t} ${ch(n)}`}function ch(t){return t instanceof Mt.Name?t:(0, Line truncated
|| (${s} == "string" && ${l} && ${l} == +${l})`).assign(a,(0,vt._)`+${l}`);return;case"integer":r.elseIf((0,vt._)`${s} === "boolean" || ${l} === null
|| (${s} === "string" && ${l} && ${l} == +${l} && !(${l} % 1))`).assign(a,(0,vt._)`+${l}`);return;case"boolean":r.elseIf((0,vt._)`${l} === "false" || ${l} === 0 || ${l} === null`).assign(a,!1).elseIf((0,vt._)`${l} === "true" || ${l} === 1`).assign(a,!0);return;case"null":r.elseIf((0,vt._)`${l} === "" || ${l} === 0 || ${l} === false`),r.assign(a,null);return;case"array":r.elseIf((0,vt._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${l} === null`).assign(a,(0,vt._)`[${l}]`)}}}function Jre({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,vt._)`${e} !== undefined`,()=>t.assign((0,vt._)`${e}[${n}]`,r))}function gh(t,e,n,r=h1.Correct){let l=r===h1.Correct?vt.operators.EQ:vt.operators.NEQ,i;switch(t){case"null":return(0,vt._)`${e} ${l} null`;case"array":i=(0,vt._)`Array.isArray(${e})`;break;case"object":i=(0,vt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,vt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,vt._)`typeof ${e} ${l} ${t}`}return r===h1.Correct?i:(0,vt.not)(i);function s(a=vt.nil){return(0,vt.and)((0,vt._)`typeof ${e} == "number"`,a,n?(0,vt._)`isFinite(${e})`:vt.nil)}}Gr.checkDataType=gh;function yh(t,e,n,r){if(t.length===1)return gh(t[0],e,n,r);let l,i=(0,oO.toHash)(t);if(i.array&&i.object){let s=(0,vt._)`typeof ${e} != "object"`;l=i.null?s:(0,vt._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else l=vt.nil;i.number&&delete i.integer;for(let s in i)l=(0,vt.and)(l,gh(s,e,n,r));return l}Gr.checkDataTypes=yh;var Qre={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,vt._)`{type: ${t}}`:(0,vt._)`{type: ${e}}`};function vh(t){let e=Zre(t);(0,Gre.reportError)(e,Qre)}Gr.reportTypeError=vh;function Zre(t){let{gen:e,data:n,schema:r}=t,l=(0,oO.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}});var pO=C(S6=>{"use strict";Object.defineProperty(S6,"__esModule",{value:!0});S6.assignDefaults=void 0;var Ko=Ze(),ele=_t();function tle(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let l in n)fO(t,l,n[l].default);else e==="array"&&Array.isArray(r)&&r.forEach((l,i)=>fO(t,i,l.default))}S6.assignDefaults=tle;function fO(t,e,n){let{gen:r,compositeRule:l,data:i,opts:s}=t;if(n===void 0)return;let a=(0,Ko._)`${i}${(0,Ko.getProperty)(e)}`;if(l){(0,ele.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,Ko._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,Ko._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,Ko._)`${a} = ${(0,Ko.stringify)(n)}`)}});var Xr=C(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.validateUnion=vn.validateArray=vn.usePattern=vn.callValidateCode=vn.schemaProperties=vn.allSchemaProperties=vn.noPropertyInData=vn.propertyInData=vn.isOwnProperty=vn.hasPropFunc=vn.reportMissingProp=vn.checkMissingProp=vn.checkReportMissingProp=void 0;var Dn=Ze(),_h=_t(),z3=v2(),nle=_t();function rle(t,e){let{gen:n,data:r,it:l}=t;n.if(bh(n,r,e,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Dn._)`${e}`},!0),t.error()})}vn.checkReportMissingProp=rle;function lle({gen:t,data:e,it:{opts:n}},r,l){return(0,Dn.or)(...r.map(i=>(0,Dn.and)(bh(t,e,i,n.ownProperties),(0,Dn._)`${l} = ${i}`)))}vn.checkMissingProp=lle;function ile(t,e){t.setParams({missingProperty:e},!0),t.error()}vn.reportMissingProp=ile;function dO(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Dn._)`Object.prototype.hasOwnProperty`})}vn.hasPropFunc=dO;function Eh(t,e,n){return(0,Dn._)`${dO(t)}.call(${e}, ${n})`}vn.isOwnProperty=Eh;function sle(t,e,n,r){let l=(0,Dn._)`${e}${(0,Dn.getProperty)(n)} !== undefined`;return r?(0,Dn._)`${l} && ${Eh(t,e,n)}`:l}vn.propertyInData=sle;function bh(t,e,n,r){let l=(0,Dn._)`${e}${(0,Dn.getProperty)(n)} === undefined`;return r?(0,Dn.or)(l,(0,Dn.not)(Eh(t,e,n))):l}vn.noPropertyInData=bh;function hO(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}vn.allSchemaProperties=hO;function ale(t,e){return hO(e).filter(n=>!(0,_h.alwaysValidSchema)(t,e[n]))}vn.schemaProperties=ale;function ole({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:l,errorPath:i},it:s},a,o,c){let f=c?(0,Dn._)`${t}, ${e}, ${r}${l}`:e,p=[[z3.default.instancePath,(0,Dn.strConcat)(z3.default.instancePath,i)],[z3.default.parentData,s.parentData],[z3.default.parentDataProperty,s.parentDataProperty],[z3.default.rootData,z3.default.rootData]];s.opts.dynamicRef&&p.push([z3.default.dynamicAnchors,z3.default.dynamicAnchors]);let m=(0,Dn._)`${f}, ${n.object(...p)}`;return o!==Dn.nil?(0,Dn._)`${a}.call(${o}, ${m})`:(0,Dn._)`${a}(${m})`}vn.callValidateCode=ole;var ule=(0,Dn._)`new RegExp`;function cle({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:l}=e.code,i=l(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Dn._)`${l.code==="new RegExp"?ule:(0,nle.useFunc)(t,l)}(${n}, ${r})`})}vn.usePattern=cle;function fle(t){let{gen:e,data:n,keyword:r,it:l}=t,i=e.name("valid");if(l.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let o=e.const("len",(0,Dn._)`${n}.length`);e.forRange("i",0,o,c=>{t.subschema({keyword:r,dataProp:c,dataPropType:_h.Type.Num},i),e.if((0,Dn.not)(i),a)})}}vn.validateArray=fle;function ple(t){let{gen:e,schema:n,keyword:r,it:l}=t;if(! Line truncated
missingProperty: ${r},
depsCount: ${e},
deps: ${n}}`};var z2e={keyword:"dependencies",type:"object",schemaType:"object",error:mi.error,code(t){let[e,n]=G2e(t);YO(t,e),JO(t,n)}};function G2e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let l=Array.isArray(t[r])?e:n;l[r]=t[r]}return[e,n]}function YO(t,e=t.schema){let{gen:n,data:r,it:l}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,T1.propertyInData)(n,r,s,l.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),l.allErrors?n.if(o,()=>{for(let f of a)(0,T1.checkReportMissingProp)(t,f)}):(n.if((0,jh._)`${o} && (${(0,T1.checkMissingProp)(t,a,i)})`),(0,T1.reportMissingProp)(t,i),n.else())}}mi.validatePropertyDeps=YO;function JO(t,e=t.schema){let{gen:n,data:r,keyword:l,it:i}=t,s=n.name("valid");for(let a in e)(0,V2e.alwaysValidSchema)(i,e[a])||(n.if((0,T1.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let o=t.subschema({keyword:l,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}mi.validateSchemaDeps=JO;mi.default=z2e});var eN=C(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var ZO=Je(),X2e=yt(),W2e={message:"property name must be valid",params:({params:t})=>(0,ZO._)`{propertyName: ${t.propertyName}}`},K2e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:W2e,code(t){let{gen:e,schema:n,data:r,it:l}=t;if((0,X2e.alwaysValidSchema)(l,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,ZO.not)(i),()=>{t.error(!0),l.allErrors||e.break()})}),t.ok(i)}};Uh.default=K2e});var Hh=C(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var b6=zr(),B2=Je(),Y2e=m2(),T6=yt(),J2e={message:"must NOT have additional properties",params:({params:t})=>(0,B2._)`{additionalProperty: ${t.additionalProperty}}`},Q2e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:J2e,code(t){let{gen:e,schema:n,parentSchema:r,data:l,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,T6.alwaysValidSchema)(s,n))return;let f=(0,b6.allSchemaProperties)(r.properties),c=(0,b6.allSchemaProperties)(r.patternProperties);p(),t.ok((0,B2._)`${i} === ${Y2e.default.errors}`);function p(){e.forIn("key",l,S=>{!f.length&&!c.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(f.length>8){let x=(0,T6.schemaRefOrVal)(s,r.properties,"properties");T=(0,b6.isOwnProperty)(e,x,S)}else f.length?T=(0,B2.or)(...f.map(x=>(0,B2._)`${S} === ${x}`)):T=B2.nil;return c.length&&(T=(0,B2.or)(T,...c.map(x=>(0,B2._)`${(0,b6.usePattern)(t,x)}.test(${S})`))),(0,B2.not)(T)}function h(S){e.code((0,B2._)`delete ${l}[${S}]`)}function g(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,T6.alwaysValidSchema)(s,n)){let T=e.name("valid");o.removeAdditional==="failing"?(_(S,T,!1),e.if((0,B2.not)(T),()=>{t.reset(),h(S)})):(_(S,T),a||e.if((0,B2.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:T6.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,T)}}};Bh.default=Q2e});var rN=C(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var Z2e=zo(),tN=zr(),qh=yt(),nN=Hh(),eie={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:l,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&nN.default.code(new Z2e.KeywordCxt(i,nN.default,"additionalProperties"));let s=(0,tN.allSchemaProperties)(n);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=qh.mergeEvaluated.props(e,(0,qh.toHash)(s),i.props));let a=s.filter(p=>!(0,qh.alwaysValidSchema)(i,n[p]));if(a.length===0)return;let o=e.name("valid");for(let p of a)f(p)?c(p):(e.if((0,tN.propertyInData)(e,l,p,i.opts.ownProperties)),c(p),i.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(o);function f(p){return i.opts.useDefaults&&!i.compositeRule&&n[p].default!==void 0}function c(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},o)}}};Vh.default=eie});var aN=C(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var lN=zr(),S6=Je(),iN=yt(),sN=yt(),tie={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:l,it:i}=t,{opts:s}=i,a=(0,lN.allSchemaProperties)(n),o=a.filter(_=>(0,iN.alwaysValidSchema)(i,n[_]));if(a.length===0||o.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let f=s.strictSchema&&!s.allowMatchingProperties&&l.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
deps: ${n}}`};var Uie={keyword:"dependencies",type:"object",schemaType:"object",error:vi.error,code(t){let[e,n]=Bie(t);wN(t,e),RN(t,n)}};function Bie({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let l=Array.isArray(t[r])?e:n;l[r]=t[r]}return[e,n]}function wN(t,e=t.schema){let{gen:n,data:r,it:l}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,k1.propertyInData)(n,r,s,l.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),l.allErrors?n.if(o,()=>{for(let c of a)(0,k1.checkReportMissingProp)(t,c)}):(n.if((0,am._)`${o} && (${(0,k1.checkMissingProp)(t,a,i)})`),(0,k1.reportMissingProp)(t,i),n.else())}}vi.validatePropertyDeps=wN;function RN(t,e=t.schema){let{gen:n,data:r,keyword:l,it:i}=t,s=n.name("valid");for(let a in e)(0,jie.alwaysValidSchema)(i,e[a])||(n.if((0,k1.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let o=t.subschema({keyword:l,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}vi.validateSchemaDeps=RN;vi.default=Uie});var IN=C(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var NN=Ze(),Hie=_t(),qie={message:"property name must be valid",params:({params:t})=>(0,NN._)`{propertyName: ${t.propertyName}}`},Vie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:qie,code(t){let{gen:e,schema:n,data:r,it:l}=t;if((0,Hie.alwaysValidSchema)(l,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,NN.not)(i),()=>{t.error(!0),l.allErrors||e.break()})}),t.ok(i)}};om.default=Vie});var cm=C(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var M6=Xr(),V2=Ze(),zie=v2(),$6=_t(),Gie={message:"must NOT have additional properties",params:({params:t})=>(0,V2._)`{additionalProperty: ${t.additionalProperty}}`},Xie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Gie,code(t){let{gen:e,schema:n,parentSchema:r,data:l,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,$6.alwaysValidSchema)(s,n))return;let c=(0,M6.allSchemaProperties)(r.properties),f=(0,M6.allSchemaProperties)(r.patternProperties);p(),t.ok((0,V2._)`${i} === ${zie.default.errors}`);function p(){e.forIn("key",l,S=>{!c.length&&!f.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(c.length>8){let x=(0,$6.schemaRefOrVal)(s,r.properties,"properties");T=(0,M6.isOwnProperty)(e,x,S)}else c.length?T=(0,V2.or)(...c.map(x=>(0,V2._)`${S} === ${x}`)):T=V2.nil;return f.length&&(T=(0,V2.or)(T,...f.map(x=>(0,V2._)`${(0,M6.usePattern)(t,x)}.test(${S})`))),(0,V2.not)(T)}function h(S){e.code((0,V2._)`delete ${l}[${S}]`)}function g(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,$6.alwaysValidSchema)(s,n)){let T=e.name("valid");o.removeAdditional==="failing"?(_(S,T,!1),e.if((0,V2.not)(T),()=>{t.reset(),h(S)})):(_(S,T),a||e.if((0,V2.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:$6.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,T)}}};um.default=Xie});var PN=C(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var Wie=Qo(),CN=Xr(),fm=_t(),kN=cm(),Kie={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:l,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&kN.default.code(new Wie.KeywordCxt(i,kN.default,"additionalProperties"));let s=(0,CN.allSchemaProperties)(n);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=fm.mergeEvaluated.props(e,(0,fm.toHash)(s),i.props));let a=s.filter(p=>!(0,fm.alwaysValidSchema)(i,n[p]));if(a.length===0)return;let o=e.name("valid");for(let p of a)c(p)?f(p):(e.if((0,CN.propertyInData)(e,l,p,i.opts.ownProperties)),f(p),i.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(o);function c(p){return i.opts.useDefaults&&!i.compositeRule&&n[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},o)}}};pm.default=Kie});var MN=C(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var DN=Xr(),j6=Ze(),LN=_t(),FN=_t(),Yie={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:l,it:i}=t,{opts:s}=i,a=(0,DN.allSchemaProperties)(n),o=a.filter(_=>(0,LN.alwaysValidSchema)(i,n[_]));if(a.length===0||o.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&l.properties,f=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
`,l+=`const validator = Validator.restoreFromState(validatorState)
`):l+=`const validator = null
`,`
@@ -119,7 +119,7 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${l}
module.exports = ${t.toString()}(validator, serializer)`}vm.exports=Q3e;vm.exports.dependencies={Serializer:Ad(),Validator:ym()}});var nI=C((qbe,tI)=>{"use strict";var{dependencies:Z3e}=_m(),{Serializer:ese,Validator:Hbe}=Z3e,tse={mode:"standalone"},nse=ese.restoreFromState(tse),rse=null;tI.exports=function(e,n){function r(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,o="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(s.message)),o+"}"}return r}(rse,nse)});var w1=C((Vbe,sI)=>{"use strict";var rI=require("node:http").STATUS_CODES,lse=Tp(),{kReplyHeaders:Ea,kReplyNextErrorHandler:D6,kReplyIsRunningOnErrorHook:ise,kReplyHasStatusCode:sse,kRouteContext:iI}=Dr(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:ase,FST_ERR_FAILED_ERROR_SERIALIZATION:ose}=il(),{getSchemaSerializer:use}=K4(),Em=nI(),cse={func:pse,toJSON(){return this.func.name.toString()+"()"}};function fse(t,e,n){t[ise]=!1;let r=t[iI];if(t[D6]===!1){lI(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[Ea])}catch(f){a.log.warn({req:a.request,res:a,err:f},f&&f.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let l=t[D6]||r.errorHandler;t[D6]=Object.getPrototypeOf(l),delete t[Ea]["content-type"],delete t[Ea]["content-length"];let i=l.func;if(!i){t[D6]=!1,lI(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?lse(s,t):t.send(s))}function pse(t,e,n){if(hse(t,n),!n[sse]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function lI(t,e,n){let r=e.raw,l=e.statusCode;e[Ea]["content-type"]=e[Ea]["content-type"]??"application/json; charset=utf-8";let i;try{let s=use(e[iI],l,e[Ea]["content-type"]);i=s===!1?Em({error:rI[l+""],code:t.code,message:t.message,statusCode:l}):s(Object.create(t,{error:{value:rI[l+""]},message:{value:t.message},statusCode:{value:l}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),i=Em(new ose(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=Em(new ase(typeof i))),e[Ea]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function dse(t=cse,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function hse(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}sI.exports={buildErrorHandler:dse,handleError:fse}});var U6=C((zbe,j6)=>{"use strict";var xm=require("node:stream").finished,mse=require("node:stream").Readable,{kFourOhFourContext:aI,kPublicRouteContext:oI,kReplyErrorHandlerCalled:gI,kReplyHijacked:R1,kReplyStartTime:O1,kReplyEndTime:wm,kReplySerializer:s3,kReplySerializerDefault:F6,kReplyIsError:M6,kReplyHeaders:Rn,kReplyTrailers:Lr,kReplyHasStatusCode:Rm,kReplyIsRunningOnErrorHook:Om,kReplyNextErrorHandler:gse,kDisableRequestLogging:yI,kSchemaResponse:$6,kReplyCacheSerializeFns:W3,kSchemaController:bm,kOptions:yse,kRouteContext:Rt}=Dr(),{onSendHookRunner:vI,onResponseHookRunner:vse,preHandlerHookRunner:_se,preSerializationHookRunner:Ese}=D3(),uI=wp()[Symbol.for("internals")],bse=X4(),Am=bse.now,{handleError:cI}=w1(),{getSchemaSerializer:Tse}=K4(),Tm={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Sse,FST_ERR_REP_RESPONSE_BODY_CONSUMED:xse,FST_ERR_REP_ALREADY_SENT:_I,FST_ERR_REP_SENT_VALUE:Ase,FST_ERR_SEND_INSIDE_ONERR:wse,FST_ERR_BAD_STATUS_CODE:Rse,FST_ERR_BAD_TRAILER_NAME:Ose,FST_ERR_BAD_TRAILER_VALUE:Nse,FST_ERR_MISSING_SERIALIZATION_FN:Ise,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:Cse}=il(),{FSTDEP010:kse,FSTDEP013:Pse,FSTDEP019:Dse,FSTDEP020:Lse}=e3(),EI=Object.prototype.toString;function bn(t,e,n){this.raw=t,this[s3]=null,this[gI]=!1,this[M6]=!1,this[Om]=!1,this.request=e,this[Rn]={},this[Lr]=null,this[Rm]=!1,this[O1]=void 0,this.log=n}bn.props=[];Object.defineProperties(bn.prototype,{[Rt]:{get(){return this.request[Rt]}},context:{get(){return Dse(),this.request[Rt]}},elapsedTime:{get(){return this[O1]===void 0?0:(this[wm]||Am())-this[O1]}},server:{get(){return this.request[Rt].server}},sent:{enumerable:!0,get(){return(this[R1]||this.raw.writableEnded)===!0},set(t){if(kse(),t!==!0)throw new Ase;if(this.sent&&this[R1])throw new _I(this.request.url,this.request.method);this[R1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[oI]:{get(){return this.request[oI]}}});bn.prototype.hijack=function(){return this[R1]=!0,this};bn.prototype.send=function(t){if(this[Om]===!0)throw new wse;if(this.sent)return this.log.warn Line truncated
module.exports = ${t.toString()}(validator, serializer)`}Um.exports=Xse;Um.exports.dependencies={Serializer:Xd(),Validator:jm()}});var kI=C((pSe,CI)=>{"use strict";var{dependencies:Wse}=Bm(),{Serializer:Kse,Validator:fSe}=Wse,Yse={mode:"standalone"},Jse=Kse.restoreFromState(Yse),Qse=null;CI.exports=function(e,n){function r(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,o="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(s.message)),o+"}"}return r}(Qse,Jse)});var F1=C((dSe,FI)=>{"use strict";var PI=require("node:http").STATUS_CODES,Zse=Vp(),{kReplyHeaders:Aa,kReplyNextErrorHandler:Y6,kReplyIsRunningOnErrorHook:eae,kReplyHasStatusCode:tae,kRouteContext:LI}=Mr(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:nae,FST_ERR_FAILED_ERROR_SERIALIZATION:rae}=al(),{getSchemaSerializer:lae}=i1(),Hm=kI(),iae={func:aae,toJSON(){return this.func.name.toString()+"()"}};function sae(t,e,n){t[eae]=!1;let r=t[LI];if(t[Y6]===!1){DI(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[Aa])}catch(c){a.log.warn({req:a.request,res:a,err:c},c&&c.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let l=t[Y6]||r.errorHandler;t[Y6]=Object.getPrototypeOf(l),delete t[Aa]["content-type"],delete t[Aa]["content-length"];let i=l.func;if(!i){t[Y6]=!1,DI(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?Zse(s,t):t.send(s))}function aae(t,e,n){if(uae(t,n),!n[tae]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function DI(t,e,n){let r=e.raw,l=e.statusCode;e[Aa]["content-type"]=e[Aa]["content-type"]??"application/json; charset=utf-8";let i;try{let s=lae(e[LI],l,e[Aa]["content-type"]);i=s===!1?Hm({error:PI[l+""],code:t.code,message:t.message,statusCode:l}):s(Object.create(t,{error:{value:PI[l+""]},message:{value:t.message},statusCode:{value:l}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),i=Hm(new rae(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=Hm(new nae(typeof i))),e[Aa]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function oae(t=iae,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function uae(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}FI.exports={buildErrorHandler:oae,handleError:sae}});var n8=C((hSe,t8)=>{"use strict";var Gm=require("node:stream").finished,cae=require("node:stream").Readable,{kFourOhFourContext:MI,kPublicRouteContext:$I,kReplyErrorHandlerCalled:GI,kReplyHijacked:M1,kReplyStartTime:$1,kReplyEndTime:Wm,kReplySerializer:c3,kReplySerializerDefault:Q6,kReplyIsError:Z6,kReplyHeaders:Nn,kReplyTrailers:$r,kReplyHasStatusCode:Km,kReplyIsRunningOnErrorHook:Ym,kReplyNextErrorHandler:fae,kDisableRequestLogging:XI,kSchemaResponse:e8,kReplyCacheSerializeFns:Q3,kSchemaController:qm,kOptions:pae,kRouteContext:Nt}=Mr(),{onSendHookRunner:WI,onResponseHookRunner:dae,preHandlerHookRunner:hae,preSerializationHookRunner:mae}=$3(),jI=Wp()[Symbol.for("internals")],gae=r1(),Xm=gae.now,{handleError:UI}=F1(),{getSchemaSerializer:yae}=i1(),Vm={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:vae,FST_ERR_REP_RESPONSE_BODY_CONSUMED:_ae,FST_ERR_REP_ALREADY_SENT:KI,FST_ERR_REP_SENT_VALUE:Eae,FST_ERR_SEND_INSIDE_ONERR:bae,FST_ERR_BAD_STATUS_CODE:Tae,FST_ERR_BAD_TRAILER_NAME:Sae,FST_ERR_BAD_TRAILER_VALUE:xae,FST_ERR_MISSING_SERIALIZATION_FN:Aae,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:wae}=al(),{FSTDEP010:Rae,FSTDEP013:Oae,FSTDEP019:Nae,FSTDEP020:Iae}=l3(),YI=Object.prototype.toString;function xn(t,e,n){this.raw=t,this[c3]=null,this[GI]=!1,this[Z6]=!1,this[Ym]=!1,this.request=e,this[Nn]={},this[$r]=null,this[Km]=!1,this[$1]=void 0,this.log=n}xn.props=[];Object.defineProperties(xn.prototype,{[Nt]:{get(){return this.request[Nt]}},context:{get(){return Nae(),this.request[Nt]}},elapsedTime:{get(){return this[$1]===void 0?0:(this[Wm]||Xm())-this[$1]}},server:{get(){return this.request[Nt].server}},sent:{enumerable:!0,get(){return(this[M1]||this.raw.writableEnded)===!0},set(t){if(Rae(),t!==!0)throw new Eae;if(this.sent&&this[M1])throw new KI(this.request.url,this.request.method);this[M1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[$I]:{get(){return this.request[$I]}}});xn.prototype.hijack=function(){return this[M1]=!0,this};xn.prototype.send=function(t){if(this[Ym]===!0)throw new bae;if(this.sent)return this.log.warn Line truncated
${n.functions.join(`
`)}
const main = anonymous0
@@ -133,9 +133,9 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${n.functions.join(`
`)}
return main
`;let a=new _1e(e),o=new E1e(e.ajv);for(let c of n.validatorSchemasIds){let p=n.refResolver.getSchema(c);o.addSchema(p,c);let m=n.refResolver.getSchemaDependencies(c);for(let[h,g]of Object.entries(m))o.addSchema(g,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
`;let a=new h0e(e),o=new m0e(e.ajv);for(let f of n.validatorSchemasIds){let p=n.refResolver.getSchema(f);o.addSchema(p,f);let m=n.refResolver.getSchemaDependencies(f);for(let[h,g]of Object.entries(m))o.addSchema(g,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
serializer
${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode==="standalone"?_m()(f,n,a,o):f(o,a)}var S1e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],x1e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],A1e=["maxLength","minLength","pattern"],w1e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function AP(t){for(var e of S1e)if(e in t)return"object";for(var e of x1e)if(e in t)return"array";for(var e of A1e)if(e in t)return"string";for(var e of w1e)if(e in t)return"number";return t.type}function R1e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),l=`
${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode==="standalone"?Bm()(c,n,a,o):c(o,a)}var v0e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],_0e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],E0e=["maxLength","minLength","pattern"],b0e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function tD(t){for(var e of v0e)if(e in t)return"object";for(var e of _0e)if(e in t)return"array";for(var e of E0e)if(e in t)return"string";for(var e of b0e)if(e in t)return"number";return t.type}function T0e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),l=`
const propertiesKeys = ${JSON.stringify(r)}
for (const [key, value] of Object.entries(obj)) {
if (
@@ -144,63 +144,63 @@ ${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode===
typeof value === 'function' ||
typeof value === 'symbol'
) continue
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let f in s){let c=i.getPropertyLocation(f);l+=`
if (/${f.replace(/\\*\//g,"\\/")}/.test(key)) {
${au}
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let c in s){let f=i.getPropertyLocation(c);l+=`
if (/${c.replace(/\\*\//g,"\\/")}/.test(key)) {
${hu}
json += serializer.asString(key) + ':'
${_i(t,c,"value")}
${Ti(t,f,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)l+=`
${au}
${hu}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let f=e.getPropertyLocation("additionalProperties");l+=`
${au}
`;else{let c=e.getPropertyLocation("additionalProperties");l+=`
${hu}
json += serializer.asString(key) + ':'
${_i(t,f,"value")}
${Ti(t,c,"value")}
`}return l+=`
}
`,l}function O1e(t,e){let n="",r=e.schema,l=r.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let f of Object.keys(r.properties)){if(l.indexOf(f)===-1)continue;let c=i.getPropertyLocation(f);c.schema.$ref&&(c=ou(t,e,c.schema.$ref));let p=JSON.stringify(f);c.schema.default===void 0&&(n+=`if (obj[${p}] === undefined) throw new Error('${p} is required!')
`,a.push(f)),s.push(f)}for(let f of l)s.indexOf(f)===-1&&(n+=`if (obj['${f}'] === undefined) throw new Error('"${f}" is required!')
`,l}function S0e(t,e){let n="",r=e.schema,l=r.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let c of Object.keys(r.properties)){if(l.indexOf(c)===-1)continue;let f=i.getPropertyLocation(c);f.schema.$ref&&(f=mu(t,e,f.schema.$ref));let p=JSON.stringify(c);f.schema.default===void 0&&(n+=`if (obj[${p}] === undefined) throw new Error('${p} is required!')
`,a.push(c)),s.push(c)}for(let c of l)s.indexOf(c)===-1&&(n+=`if (obj['${c}'] === undefined) throw new Error('"${c}" is required!')
`);n+=`
let addComma = false
let json = '${t.wrapObjects?"{":""}'
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let f of Object.keys(r.properties)){let c=i.getPropertyLocation(f);c.schema.$ref&&(c=ou(t,e,c.schema.$ref));let p=JSON.stringify(f);if(a.indexOf(f)!==-1)n+=`
${au}
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let c of Object.keys(r.properties)){let f=i.getPropertyLocation(c);f.schema.$ref&&(f=mu(t,e,f.schema.$ref));let p=JSON.stringify(c);if(a.indexOf(c)!==-1)n+=`
${hu}
json += ${JSON.stringify(p+":")}
${_i(t,c,`obj[${p}]`)}
${Ti(t,f,`obj[${p}]`)}
`;else{n+=`
if (obj[${p}] !== undefined) {
${au}
${hu}
json += ${JSON.stringify(p+":")}
${_i(t,c,`obj[${p}]`)}
${Ti(t,f,`obj[${p}]`)}
}
`;let m=c.schema.default;m!==void 0&&(n+=`
`;let m=f.schema.default;m!==void 0&&(n+=`
else {
${au}
${hu}
json += ${JSON.stringify(p+":"+JSON.stringify(m))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=R1e(t,e)),t.wrapObjects=o,n+=`
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=T0e(t,e)),t.wrapObjects=o,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function wP(t,e,n,r){let l=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let o=l.getPropertyLocation(i);s=ou(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=AP(s)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(s.format!==void 0){if(r.format!==void 0&&r.format!==s.format)throw new Error("allOf schemas have different format values");r.format=s.format}if(s.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=s.nullable}s.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,s.properties)),s.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,s.patternProperties)),s.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...s.required)),s.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...s.anyOf)),s.allOf!==void 0&&wP(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${xP++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function N1e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=bg({},e.schema),l=r.then,i=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=bg(r,l);let f=e.getPropertyLocation("else");return f.schema=bg(r,i),`
`,n}function nD(t,e,n,r){let l=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let o=l.getPropertyLocation(i);s=mu(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=tD(s)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(s.format!==void 0){if(r.format!==void 0&&r.format!==s.format)throw new Error("allOf schemas have different format values");r.format=s.format}if(s.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=s.nullable}s.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,s.properties)),s.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,s.patternProperties)),s.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...s.required)),s.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...s.anyOf)),s.allOf!==void 0&&nD(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${eD++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function x0e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=qg({},e.schema),l=r.then,i=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=qg(r,l);let c=e.getPropertyLocation("else");return c.schema=qg(r,i),`
if (validator.validate("${a}", ${n})) {
${_i(t,o,n)}
${Ti(t,o,n)}
} else {
${_i(t,f,n)}
${Ti(t,c,n)}
}
`}function I1e(t){return`(${t} && typeof ${t}.toJSON === 'function')
`}function A0e(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function RP(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=NP(t);t.functionsNamesBySchema.set(n,r);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let i=`
`}function rD(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=iD(t);t.functionsNamesBySchema.set(n,r);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let i=`
`,s=n.nullable===!0;return i+=`
// ${l}
function ${r} (input) {
const obj = ${I1e("input")}
const obj = ${A0e("input")}
${s?"":"if (obj === null) return '{}'"}
${O1e(t,e)}
${S0e(t,e)}
}
`,t.functions.push(i),r}function C1e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=ou(t,r,r.schema.$ref));let l=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=NP(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
`,t.functions.push(i),r}function w0e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=mu(t,r,r.schema.$ref));let l=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=iD(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
function ${i} (obj) {
// ${s}
`,o=n.nullable===!0;if(a+=`
@@ -213,20 +213,20 @@ ${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode===
if (arrayLength > ${l.length}) {
throw new Error(\`Item at ${l.length} does not match schema definition.\`)
}
`),TP==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${h8}) return JSON.stringify(obj)
`),QP==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${I8}) return JSON.stringify(obj)
`),a+=`
let jsonOutput = ''
`,Array.isArray(l)){for(let f=0;f<l.length;f++){let c=l[f],p=_i(t,r.getPropertyLocation(f),`obj[${f}]`);a+=`
if (${f} < arrayLength) {
if (${OP(c.type,`[${f}]`)}) {
`,Array.isArray(l)){for(let c=0;c<l.length;c++){let f=l[c],p=Ti(t,r.getPropertyLocation(c),`obj[${c}]`);a+=`
if (${c} < arrayLength) {
if (${lD(f.type,`[${c}]`)}) {
let json = ''
${p}
jsonOutput += json
if (${f} < arrayLength - 1) {
if (${c} < arrayLength - 1) {
jsonOutput += ','
}
} else {
throw new Error(\`Item at ${f} does not match schema definition.\`)
throw new Error(\`Item at ${c} does not match schema definition.\`)
}
}
`}n.additionalItems&&(a+=`
@@ -235,15 +235,15 @@ ${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let f=_i(t,r,"obj[i]");a+=`
}`)}else{let c=Ti(t,r,"obj[i]");a+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${f}
${c}
jsonOutput += json
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function OP(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function lD(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
obj${e} === null ||
obj${e} instanceof Date ||
obj${e} instanceof RegExp ||
@@ -251,11 +251,11 @@ ${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode===
typeof obj${e} === "object" &&
typeof obj${e}.toString === "function" &&
obj${e}.toString !== Object.prototype.toString
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(l=>OP(l,e)).join(" || ")})`)}return n}function NP(t){return"anonymous"+t.functionsCounter++}function k1e(t,e,n){let l=e.schema.type.sort(a=>a==="null"?-1:1),i="";l.forEach((a,o)=>{e.schema={...e.schema,type:a};let f=IP(t,e,n),c=o===0?"if":"else if";switch(a){case"null":i+=`
${c} (${n} === null)
${f}
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(l=>lD(l,e)).join(" || ")})`)}return n}function iD(t){return"anonymous"+t.functionsCounter++}function R0e(t,e,n){let l=e.schema.type.sort(a=>a==="null"?-1:1),i="";l.forEach((a,o)=>{e.schema={...e.schema,type:a};let c=sD(t,e,n),f=o===0?"if":"else if";switch(a){case"null":i+=`
${f} (${n} === null)
${c}
`;break;case"string":{i+=`
${c}(
${f}(
typeof ${n} === "string" ||
${n} === null ||
${n} instanceof Date ||
@@ -266,49 +266,49 @@ ${s}`,ajv:o.ajv};let f=new Function("validator","serializer",s);return e.mode===
${n}.toString !== Object.prototype.toString
)
)
${f}
${c}
`;break}case"array":{i+=`
${c}(Array.isArray(${n}))
${f}
${f}(Array.isArray(${n}))
${c}
`;break}case"integer":{i+=`
${c}(Number.isInteger(${n}) || ${n} === null)
${f}
${f}(Number.isInteger(${n}) || ${n} === null)
${c}
`;break}default:{i+=`
${c}(typeof ${n} === "${a}" || ${n} === null)
${f}
${f}(typeof ${n} === "${a}" || ${n} === null)
${c}
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
`,i}function IP(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${RP(t,e)}(${n})`;case"array":return`json += ${C1e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function P1e(t,e){let n=t.schema,r=n.type,l=Array.isArray(r)&&r.includes("null"),i="";return l&&(i+=`
`,i}function sD(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${rD(t,e)}(${n})`;case"array":return`json += ${w0e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function O0e(t,e){let n=t.schema,r=n.type,l=Array.isArray(r)&&r.includes("null"),i="";return l&&(i+=`
if (${e} === null) {
json += 'null'
} else {
`),i+=`json += '${JSON.stringify(n.const).replace(b1e,"\\'")}'`,l&&(i+=`
`),i+=`json += '${JSON.stringify(n.const).replace(g0e,"\\'")}'`,l&&(i+=`
}
`),i}function _i(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=ou(t,e,r.$ref),r=e.schema),r.type===void 0){let a=AP(r);a&&(r.type=a)}if(r.if&&r.then)return N1e(t,e,n);r.allOf&&(wP(t,e,r,y1e(r)),r=e.schema);let l=r.type,i="";if((l===void 0||l==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=RP(t,e);i+=`
`),i}function Ti(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=mu(t,e,r.$ref),r=e.schema),r.type===void 0){let a=tD(r);a&&(r.type=a)}if(r.if&&r.then)return x0e(t,e,n);r.allOf&&(nD(t,e,r,p0e(r)),r=e.schema);let l=r.type,i="";if((l===void 0||l==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let f=rD(t,e);i+=`
json += '{'
json += ${c}(${n})
json += ${f}(${n})
json += ','
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let p=o.getPropertyLocation(c),m=p.getSchemaRef(),h=_i(t,p,n);i+=`
${c===0?"if":"else if"}(validator.validate("${m}", ${n}))
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let f=0;f<e.schema[a].length;f++){let p=o.getPropertyLocation(f),m=p.getSchemaRef(),h=Ti(t,p,n);i+=`
${f===0?"if":"else if"}(validator.validate("${m}", ${n}))
${h}
`}let f=e.getSchemaRef();return f.startsWith(t.rootSchemaId)&&(f=f.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${f}' does not match schema definition.\`)
`}let c=e.getSchemaRef();return c.startsWith(t.rootSchemaId)&&(c=c.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${c}' does not match schema definition.\`)
`,r.type==="object"&&(i+=`
json += '}'
`,t.wrapObjects=!0),i}let s=r.nullable===!0;return s&&(i+=`
if (${n} === null) {
json += 'null'
} else {
`),r.const!==void 0?i+=P1e(e,n):Array.isArray(l)?i+=k1e(t,e,n):i+=IP(t,e,n),s&&(i+=`
`),r.const!==void 0?i+=O0e(e,n):Array.isArray(l)?i+=R0e(t,e,n):i+=sD(t,e,n),s&&(i+=`
}
`),i}uu.exports=Sg;uu.exports.default=Sg;uu.exports.build=Sg;uu.exports.validLargeArrayMechanisms=SP;uu.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var PP=C((ZTe,xg)=>{"use strict";var D1e=Ag();function kP(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=D1e();return function(r,l={}){l.mode="standalone";let i=e(r,l);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}xg.exports=kP;xg.exports.default=kP});var Ag=C((eSe,V1)=>{"use strict";var L1e=CP();function wg(){return function(e,n){let r=Object.assign({},n,{schema:e});return F1e.bind(null,r)}}function F1e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),L1e(e,t)}V1.exports=wg;V1.exports.default=wg;V1.exports.SerializerSelector=wg;V1.exports.StandaloneSerializer=PP()});var f3=C(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});z1.checkMetadata=void 0;var M1e=yt(),$1e={keyword:"metadata",schemaType:"object",code(t){DP(t);let{gen:e,schema:n,it:r}=t;if((0,M1e.alwaysValidSchema)(r,n))return;let l=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},l),t.ok(l)}};function DP({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}z1.checkMetadata=DP;z1.default=$1e});var m8=C(X1=>{"use strict";Object.defineProperty(X1,"__esModule",{value:!0});X1.hasRef=void 0;var LP=ga(),G1=Je(),j1e=z3(),FP=m2(),MP=gh(),U1e=f3(),B1e={keyword:"ref",schemaType:"string",code(t){(0,U1e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:l,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");l.nullable?(e.var(a,(0,G1._)`${n} === null`),e.if((0,G1.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var p;let m=(p=s.schema.definitions)===null||p===void 0?void 0:p[r];if(!m)throw new j1e.default(i.opts.uriResolver,"",r,`No definition ${r}`);Rg(m)||!i.opts.inlineRefs?f(m):c(m)}function f(p){let m=LP.compileSchema.call(i.self,new LP.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${r}`})),h=(0,MP.getValidate)(t,m),g=e.const("_errs",FP.default.errors);(0,MP.callRef)(t,h,m,m.$async),e.assign(a,(0,G1._)`${g} === ${FP.default.errors}`)}function c(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,G1.stringify)(p)}:{ref:p});t.subschema({schema:p,dataTypes:[],schemaPath:G1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function Rg(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&Rg(n))return!0}return!1}X1.hasRef=Rg;X1.default=B1e});var Ng=C(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var H1e=/t|\s/i,q1e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,V1e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,z1e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jP(t,e){let n=t.split(H1e);return n.length===2&&$P(n[0])&&G1e(n[1])||e&&n.length===1&&$P(n[0])}Og.default=jP;function $P(t){let e=q1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3];return r>=1&&r<=12&&l>=1&&(l<=z1e[r]||r===2&&l===29&&(n%100===0?n%400===0:n%4===0))}function G1e(t){let e=V1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&l<=59||n-i===23&&r-s===59&&l===60}jP.code='require("ajv/dist/runtime/timestamp").default'});var cu=C(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});Y3.typeErrorParams=Y3.typeErrorMessage=Y3.typeError=void 0;var X1e=Je();function W1e(t){return{message:e=>UP(e,t),params:e=>BP(e,t)}}Y3.typeError=W1e;function UP({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Y3.typeErrorMessage=UP;function BP({parentSchema:t},e){return(0,X1e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}Y3.typeErrorParams=BP});var Ig=C(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.intRange=void 0;var Jl=Je(),K1e=Ng(),Y1e=yt(),J1e=f3(),HP=cu();fu.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var Q1e={message:t=>(0,HP.typeErrorMessage)(t,t.schema),params:t=>(0,HP.typeErrorParams)(t,t.schema)};function Z1e(t){let{gen:e,data:n,it:r}=t,{timestamp:l,allowDate:i}=r.opts;if(l==="date")return(0,Jl._)`${n} instanceof Date `;let s=(0,Y1e.useFunc)(e,K1e.default),a=i?(0,Jl._)`, true`:Jl.nil,o=(0,Jl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return l==="string"?o:(0,Jl.or)((0,Jl._)`${n} instanceof Date`,o)}var e0e={keyword:"type",schemaType:"string",error:Q1e,code(t){(0,J1e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:l}=t,i;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},u5e=97,c5e=48;function Z3(t,e){let n="",r;for(Z3.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in gD)n+=gD[r],e++;else if(r==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,r=t[e],r===void 0){l("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-u5e+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-c5e;else{l(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}else{l(`unexpected token ${r}`);return}else if(r===void 0){l("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{l(`unexpected token ${r}`);return}return Z3.position=e,n;function l(i){Z3.position=e,Z3.message=i}}es.parseJsonString=Z3;Z3.message=void 0;Z3.position=0;Z3.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var OD=C(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var f5e=Bg(),bD=ga(),qe=Je(),p5e=z3(),Nt=m2(),d5e=zr(),h5e=m8(),m5e=Ig(),Wg=yD(),TD=yt(),g5e=Ng(),y5e={elements:b5e,values:T5e,discriminator:x5e,properties:vD,optionalProperties:vD,enum:w5e,type:A5e,ref:R5e};function SD(t,e){let n=bD.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:l}=this.opts.code,{ownProperties:i}=this.opts,s=new qe.CodeGen(this.scope,{es5:r,lines:l,ownProperties:i}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Nt.default.data,parseName:a,char:s.name("c")},f;try{this._compilations.add(t),t.parseName=a,v5e(o),s.optimize(this.opts.code.optimize);let c=s.toString();f=`${s.scopeRefs(Nt.default.scope)}return ${c}`;let m=new Function(`${Nt.default.scope}`,f)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(c){throw f&&this.logger.error("Error compiling parser, function code:",f),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}Zg.default=SD;var Xg=(0,qe._)`undefined`;function v5e(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,qe._)`${Nt.default.json}, ${Nt.default.jsonPos}, ${Nt.default.jsonPart}`,!1,()=>{e.let(Nt.default.data),e.let(r),e.assign((0,qe._)`${n}.message`,Xg),e.assign((0,qe._)`${n}.position`,Xg),e.assign(Nt.default.jsonPos,(0,qe._)`${Nt.default.jsonPos} || 0`),e.const(Nt.default.jsonLen,(0,qe._)`${Nt.default.json}.length`),E8(t),Qg(t),e.if(Nt.default.jsonPart,()=>{e.assign((0,qe._)`${n}.position`,Nt.default.jsonPos),e.return(Nt.default.data)}),e.if((0,qe._)`${Nt.default.jsonPos} === ${Nt.default.jsonLen}`,()=>e.return(Nt.default.data)),mu(t)})}function E8(t){let e;for(let n of f5e.jtdForms)if(n in t.schema){e=n;break}e?E5e(t,y5e[e]):Yg(t)}var _5e=ED(!0,ED(!1,mu));function E5e(t,e){let{gen:n,schema:r,data:l}=t;if(!r.nullable)return e(t);Y1(t,"null",e,()=>n.assign(l,null))}function b5e(t){let{gen:e,schema:n,data:r}=t;Ei(t,"[");let l=e.let("i",0);e.assign(r,(0,qe._)`[]`),Kg(t,"]",()=>{let i=e.let("el");E8({...t,schema:n.elements,data:i}),e.assign((0,qe._)`${r}[${l}++]`,i)})}function T5e(t){let{gen:e,schema:n,data:r}=t;Ei(t,"{"),e.assign(r,(0,qe._)`{}`),Kg(t,"}",()=>S5e(t,n.values))}function Kg(t,e,n){xD(t,e,n),Ei(t,e)}function xD(t,e,n){let{gen:r}=t;r.for((0,qe._)`;${Nt.default.jsonPos}<${Nt.default.jsonLen} && ${b8(1)}!==${e};`,()=>{n(),Y1(t,",",()=>r.break(),l)});function l(){Y1(t,e,()=>{},mu)}}function S5e(t,e){let{gen:n}=t,r=n.let("key");Oa({...t,data:r}),Ei(t,":"),wD(t,r,e)}function x5e(t){let{gen:e,data:n,schema:r}=t,{discriminator:l,mapping:i}=r;Ei(t,"{"),e.assign(n,(0,qe._)`{}`);let s=e.const("pos",Nt.default.jsonPos),a=e.let("value"),o=e.let("tag");xD(t,"}",()=>{let f=e.let("key");Oa({...t,data:f}),Ei(t,":"),e.if((0,qe._)`${f} === ${l}`,()=>{Oa({...t,data:o}),e.assign((0,qe._)`${n}[${f}]`,o),e.break()},()=>Yg({...t,data:a}))}),e.assign(Nt.default.jsonPos,s),e.if((0,qe._)`${o} === undefined`),g3(t,(0,qe.str)`discriminator tag not found`);for(let f in i)e.elseIf((0,qe._)`${o} === ${f}`),AD({...t,schema:i[f]},l);e.else(),g3(t,(0,qe.str)`discriminator value not in schema`),e.endIf()}function vD(t){let{gen:e,data:n}=t;Ei(t,"{"),e.assign(n,(0,qe._)`{}`),AD(t)}function AD(t,e){let{gen:n,schema:r,data:l}=t,{properties:i,optionalProperties:s,additionalProperties:a}=r;if(Kg(t,"}",()=>{let o=n.let("key");if(Oa({...t,data:o}),Ei(t,":"),n.if(!1),_D(t,o,i),_D(t,o,s),e){n.elseIf((0,qe._)`${o} === ${e}`);let f=n.let("tag");Oa({...t,data:f})}n.else(),a?Yg({...t,data:(0,qe._)`${l}[${o}]`}):g3(t,(0,qe.str)`property ${o} not allowed`),n.endIf()}),i){let o=(0,d5e.hasPropFunc)(n),f=(0,qe.and)(...Object.keys(i).map(c=>(0,qe._)`${o}.call(${l}, ${c})`));n.if((0,qe.not)(f),()=>g3(t,(0,qe.str)`missing required properties`))}}function _D(t,e,n={}){let{gen:r}=t;for(let l in n)r.elseIf((0,qe._)`${e} === ${l}`),wD(t,e,n[l])}function wD(t,e,n){E8({...t,schema:n,data:(0,qe._)`${t.data}[${e}]`})}function A5e(t){let{gen:e,schema:n,data:r,self:l}=t;switch(n.type){case"boolean":_5e(t);break;case"string":Oa(t);break;case"timestamp":{Oa(t);let i=(0,TD.useFunc)(e,g5e.default),{allowDate:s,parseDate:a}=l.opts,o=s?(0,qe._)`!${i}(${r}, true)`:(0,qe._)`!${i}(${r})`,f=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function GD(t){return t[Symbol.for("fastify.display-name")]}function XD(t){return!!t[Symbol.for("skip-override")]}function WD(t){let e=Z1(t);if(!e)return;let n=e.dependencies;n&&(cy(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{cy(this[fy].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function KD(t){let e=Z1(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&uy(this,"Fastify",n.fastify,r),n.reply&&uy(this,"Reply",n.reply,r),n.request&&uy(this,"Request",n.request,r))}var lce={Fastify:J5e,Request:Z5e,Reply:Q5e};function uy(t,e,n,r){cy(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(l=>{let i=typeof r=="string"?` required by '${r}'`:"";if(!lce[e].call(t,l))throw new tce(l,i,e)})}function ice(t){let e=Z1(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&oy.gt(this.version,oy.coerce(n))===!0)&&n&&oy.satisfies(this.version,n,{includePrerelease:r})===!1)throw new ece(e.name,n,this.version)}function sce(t){let e=Z1(t);if(!e)return;let n=e.name;if(n)return this[fy].push(n),n}function ace(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&nce(e||"anonymous")}function oce(t){let e=sce.call(this,t)||zD(t);return ace.call(this,t,e),ice.call(this,t),KD.call(this,t),WD.call(this,t),XD(t)}py.exports={getPluginName:zD,getFuncPreview:rce,kRegisteredPlugins:fy,getDisplayName:GD,registerPlugin:oce};py.exports[Y5e]={shouldSkipOverride:XD,getMeta:Z1,checkDecorators:KD,checkDependencies:WD}});var S8=C((OSe,YD)=>{"use strict";function uce(t,e){let n=e||fce();return t?pce(t,n):n}function cce(t,e){return t.genReqId(e)}function fce(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function pce(t,e){return function(n){return n.headers[t]||e(n)}}YD.exports={getGenReqId:cce,reqIdGenFactory:uce}});var eL=C((NSe,ZD)=>{"use strict";var JD=12,dce=0,hy=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function hce(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",l=0,i=0,s=e,a=JD;e>-1&&e<n;){var o=QD(t[e+1],4),f=QD(t[e+2],0),c=o|f,p=hy[c];if(a=hy[256+a+p],i=i<<6|c&hy[364+p],a===JD)r+=t.slice(l,s),r+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,l=e+3,e=s=t.indexOf("%",l);else{if(a===dce)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(l)}var mce={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function QD(t,e){var n=mce[t];return n===void 0?255:n<<e}ZD.exports=hce});var iL=C((ISe,lL)=>{"use strict";var tL=eL(),nL=/\+/g,rL=function(){};rL.prototype=Object.create(null);function gce(t){let e=new rL;if(typeof t!="string")return e;let n=t.length,r="",l="",i=-1,s=-1,a=!1,o=!1,f=!1,c=!1,p=!1,m=0;for(let h=0;h<n+1;h++)if(m=h!==n?t.charCodeAt(h):38,m===38){if(p=s>i,p||(s=h),r=t.slice(i+1,s),p||r.length>0){f&&(r=r.replace(nL," ")),a&&(r=tL(r)||r),p&&(l=t.slice(s+1,h),c&&(l=l.replace(nL," ")),o&&(l=tL(l)||l));let g=e[r];g===void 0?e[r]=l:g.pop?g.push(l):e[r]=[g,l]}l="",i=h,s=h,a=!1,o=!1,f=!1,c=!1}else m===61?s<=i?s=h:o=!0:m===43?s>i?c=!0:f=!0:m===37&&(s>i?o=!0:a=!0);return e}lL.exports=gce});var aL=C((CSe,sL)=>{var bi=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),yce=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function vce(t){let e=t.length;if(e===0)return"";let n="",r=0,l=0;e:for(;l<e;l++){let i=t.charCodeAt(l);for(;i<128;){if(yce[i]!==1&&(r<l&&(n+=t.slice(r,l)),r=l+1,n+=bi[i]),++l===e)break e;i=t.charCodeAt(l)}if(r<l&&(n+=t.slice(r,l)),i<2048){r=l+1,n+=bi[192|i>>6]+bi[128|i&63];continue}if(i<55296||i>=57344){r=l+1,n+=bi[224|i>>12]+bi[128|i>>6&63]+bi[128|i&63];continue}if(++l,l>=e)throw new Error("URI malformed");let s=t.charCodeAt(l)&1023;r=l+1,i=65536+((i&1023)<<10|s),n+=bi[240|i>>18]+bi[128|i>>12&63]+bi[128|i>>6&63]+bi[128|i&63]}return r===0?t:r<e?n+t.slice(r):n}sL.exports={encodeString:vce}});var cL=C((kSe,uL)=>{"use Line truncated
`),i}gu.exports=zg;gu.exports.default=zg;gu.exports.build=zg;gu.exports.validLargeArrayMechanisms=ZP;gu.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var uD=C((Txe,Gg)=>{"use strict";var N0e=Xg();function oD(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=N0e();return function(r,l={}){l.mode="standalone";let i=e(r,l);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}Gg.exports=oD;Gg.exports.default=oD});var Xg=C((Sxe,e0)=>{"use strict";var I0e=aD();function Wg(){return function(e,n){let r=Object.assign({},n,{schema:e});return C0e.bind(null,r)}}function C0e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),I0e(e,t)}e0.exports=Wg;e0.exports.default=Wg;e0.exports.SerializerSelector=Wg;e0.exports.StandaloneSerializer=uD()});var m3=C(t0=>{"use strict";Object.defineProperty(t0,"__esModule",{value:!0});t0.checkMetadata=void 0;var k0e=_t(),P0e={keyword:"metadata",schemaType:"object",code(t){cD(t);let{gen:e,schema:n,it:r}=t;if((0,k0e.alwaysValidSchema)(r,n))return;let l=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},l),t.ok(l)}};function cD({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}t0.checkMetadata=cD;t0.default=P0e});var C8=C(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.hasRef=void 0;var fD=ba(),n0=Ze(),D0e=K3(),pD=v2(),dD=$h(),L0e=m3(),F0e={keyword:"ref",schemaType:"string",code(t){(0,L0e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:l,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");l.nullable?(e.var(a,(0,n0._)`${n} === null`),e.if((0,n0.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var p;let m=(p=s.schema.definitions)===null||p===void 0?void 0:p[r];if(!m)throw new D0e.default(i.opts.uriResolver,"",r,`No definition ${r}`);Kg(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=fD.compileSchema.call(i.self,new fD.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${r}`})),h=(0,dD.getValidate)(t,m),g=e.const("_errs",pD.default.errors);(0,dD.callRef)(t,h,m,m.$async),e.assign(a,(0,n0._)`${g} === ${pD.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,n0.stringify)(p)}:{ref:p});t.subschema({schema:p,dataTypes:[],schemaPath:n0.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function Kg(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&Kg(n))return!0}return!1}r0.hasRef=Kg;r0.default=F0e});var Jg=C(Yg=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});var M0e=/t|\s/i,$0e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,j0e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,U0e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mD(t,e){let n=t.split(M0e);return n.length===2&&hD(n[0])&&B0e(n[1])||e&&n.length===1&&hD(n[0])}Yg.default=mD;function hD(t){let e=$0e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3];return r>=1&&r<=12&&l>=1&&(l<=U0e[r]||r===2&&l===29&&(n%100===0?n%400===0:n%4===0))}function B0e(t){let e=j0e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&l<=59||n-i===23&&r-s===59&&l===60}mD.code='require("ajv/dist/runtime/timestamp").default'});var yu=C(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.typeErrorParams=es.typeErrorMessage=es.typeError=void 0;var H0e=Ze();function q0e(t){return{message:e=>gD(e,t),params:e=>yD(e,t)}}es.typeError=q0e;function gD({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}es.typeErrorMessage=gD;function yD({parentSchema:t},e){return(0,H0e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}es.typeErrorParams=yD});var Qg=C(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.intRange=void 0;var Zl=Ze(),V0e=Jg(),z0e=_t(),G0e=m3(),vD=yu();vu.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var X0e={message:t=>(0,vD.typeErrorMessage)(t,t.schema),params:t=>(0,vD.typeErrorParams)(t,t.schema)};function W0e(t){let{gen:e,data:n,it:r}=t,{timestamp:l,allowDate:i}=r.opts;if(l==="date")return(0,Zl._)`${n} instanceof Date `;let s=(0,z0e.useFunc)(e,V0e.default),a=i?(0,Zl._)`, true`:Zl.nil,o=(0,Zl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return l==="string"?o:(0,Zl.or)((0,Zl._)`${n} instanceof Date`,o)}var K0e={keyword:"type",schemaType:"string",error:X0e,code(t){(0,G0e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:l}=t,i;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},lce=97,ice=48;function rs(t,e){let n="",r;for(rs.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in GD)n+=GD[r],e++;else if(r==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,r=t[e],r===void 0){l("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-lce+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-ice;else{l(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}else{l(`unexpected token ${r}`);return}else if(r===void 0){l("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{l(`unexpected token ${r}`);return}return rs.position=e,n;function l(i){rs.position=e,rs.message=i}}ls.parseJsonString=rs;rs.message=void 0;rs.position=0;rs.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var lL=C(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var sce=uy(),JD=ba(),ze=Ze(),ace=K3(),Ct=v2(),oce=Xr(),uce=C8(),cce=Qg(),gy=XD(),QD=_t(),fce=Jg(),pce={elements:gce,values:yce,discriminator:_ce,properties:WD,optionalProperties:WD,enum:bce,type:Ece,ref:Tce};function ZD(t,e){let n=JD.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:l}=this.opts.code,{ownProperties:i}=this.opts,s=new ze.CodeGen(this.scope,{es5:r,lines:l,ownProperties:i}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ct.default.data,parseName:a,char:s.name("c")},c;try{this._compilations.add(t),t.parseName=a,dce(o),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(Ct.default.scope)}return ${f}`;let m=new Function(`${Ct.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(f){throw c&&this.logger.error("Error compiling parser, function code:",c),delete t.parse,delete t.parseName,f}finally{this._compilations.delete(t)}return t}by.default=ZD;var my=(0,ze._)`undefined`;function dce(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,ze._)`${Ct.default.json}, ${Ct.default.jsonPos}, ${Ct.default.jsonPart}`,!1,()=>{e.let(Ct.default.data),e.let(r),e.assign((0,ze._)`${n}.message`,my),e.assign((0,ze._)`${n}.position`,my),e.assign(Ct.default.jsonPos,(0,ze._)`${Ct.default.jsonPos} || 0`),e.const(Ct.default.jsonLen,(0,ze._)`${Ct.default.json}.length`),F8(t),Ey(t),e.if(Ct.default.jsonPart,()=>{e.assign((0,ze._)`${n}.position`,Ct.default.jsonPos),e.return(Ct.default.data)}),e.if((0,ze._)`${Ct.default.jsonPos} === ${Ct.default.jsonLen}`,()=>e.return(Ct.default.data)),Tu(t)})}function F8(t){let e;for(let n of sce.jtdForms)if(n in t.schema){e=n;break}e?mce(t,pce[e]):vy(t)}var hce=YD(!0,YD(!1,Tu));function mce(t,e){let{gen:n,schema:r,data:l}=t;if(!r.nullable)return e(t);s0(t,"null",e,()=>n.assign(l,null))}function gce(t){let{gen:e,schema:n,data:r}=t;Si(t,"[");let l=e.let("i",0);e.assign(r,(0,ze._)`[]`),yy(t,"]",()=>{let i=e.let("el");F8({...t,schema:n.elements,data:i}),e.assign((0,ze._)`${r}[${l}++]`,i)})}function yce(t){let{gen:e,schema:n,data:r}=t;Si(t,"{"),e.assign(r,(0,ze._)`{}`),yy(t,"}",()=>vce(t,n.values))}function yy(t,e,n){eL(t,e,n),Si(t,e)}function eL(t,e,n){let{gen:r}=t;r.for((0,ze._)`;${Ct.default.jsonPos}<${Ct.default.jsonLen} && ${M8(1)}!==${e};`,()=>{n(),s0(t,",",()=>r.break(),l)});function l(){s0(t,e,()=>{},Tu)}}function vce(t,e){let{gen:n}=t,r=n.let("key");Pa({...t,data:r}),Si(t,":"),nL(t,r,e)}function _ce(t){let{gen:e,data:n,schema:r}=t,{discriminator:l,mapping:i}=r;Si(t,"{"),e.assign(n,(0,ze._)`{}`);let s=e.const("pos",Ct.default.jsonPos),a=e.let("value"),o=e.let("tag");eL(t,"}",()=>{let c=e.let("key");Pa({...t,data:c}),Si(t,":"),e.if((0,ze._)`${c} === ${l}`,()=>{Pa({...t,data:o}),e.assign((0,ze._)`${n}[${c}]`,o),e.break()},()=>vy({...t,data:a}))}),e.assign(Ct.default.jsonPos,s),e.if((0,ze._)`${o} === undefined`),E3(t,(0,ze.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,ze._)`${o} === ${c}`),tL({...t,schema:i[c]},l);e.else(),E3(t,(0,ze.str)`discriminator value not in schema`),e.endIf()}function WD(t){let{gen:e,data:n}=t;Si(t,"{"),e.assign(n,(0,ze._)`{}`),tL(t)}function tL(t,e){let{gen:n,schema:r,data:l}=t,{properties:i,optionalProperties:s,additionalProperties:a}=r;if(yy(t,"}",()=>{let o=n.let("key");if(Pa({...t,data:o}),Si(t,":"),n.if(!1),KD(t,o,i),KD(t,o,s),e){n.elseIf((0,ze._)`${o} === ${e}`);let c=n.let("tag");Pa({...t,data:c})}n.else(),a?vy({...t,data:(0,ze._)`${l}[${o}]`}):E3(t,(0,ze.str)`property ${o} not allowed`),n.endIf()}),i){let o=(0,oce.hasPropFunc)(n),c=(0,ze.and)(...Object.keys(i).map(f=>(0,ze._)`${o}.call(${l}, ${f})`));n.if((0,ze.not)(c),()=>E3(t,(0,ze.str)`missing required properties`))}}function KD(t,e,n={}){let{gen:r}=t;for(let l in n)r.elseIf((0,ze._)`${e} === ${l}`),nL(t,e,n[l])}function nL(t,e,n){F8({...t,schema:n,data:(0,ze._)`${t.data}[${e}]`})}function Ece(t){let{gen:e,schema:n,data:r,self:l}=t;switch(n.type){case"boolean":hce(t);break;case"string":Pa(t);break;case"timestamp":{Pa(t);let i=(0,QD.useFunc)(e,fce.default),{allowDate:s,parseDate:a}=l.opts,o=s?(0,ze._)`!${i}(${r}, true)`:(0,ze._)`!${i}(${r})`,c=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function TL(t){return t[Symbol.for("fastify.display-name")]}function SL(t){return!!t[Symbol.for("skip-override")]}function xL(t){let e=u0(t);if(!e)return;let n=e.dependencies;n&&(ky(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{ky(this[Py].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function AL(t){let e=u0(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&Cy(this,"Fastify",n.fastify,r),n.reply&&Cy(this,"Reply",n.reply,r),n.request&&Cy(this,"Request",n.request,r))}var Zce={Fastify:Gce,Request:Wce,Reply:Xce};function Cy(t,e,n,r){ky(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(l=>{let i=typeof r=="string"?` required by '${r}'`:"";if(!Zce[e].call(t,l))throw new Yce(l,i,e)})}function e6e(t){let e=u0(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&Iy.gt(this.version,Iy.coerce(n))===!0)&&n&&Iy.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Kce(e.name,n,this.version)}function t6e(t){let e=u0(t);if(!e)return;let n=e.name;if(n)return this[Py].push(n),n}function n6e(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Jce(e||"anonymous")}function r6e(t){let e=t6e.call(this,t)||bL(t);return n6e.call(this,t,e),e6e.call(this,t),AL.call(this,t),xL.call(this,t),SL(t)}Dy.exports={getPluginName:bL,getFuncPreview:Qce,kRegisteredPlugins:Py,getDisplayName:TL,registerPlugin:r6e};Dy.exports[zce]={shouldSkipOverride:SL,getMeta:u0,checkDecorators:AL,checkDependencies:xL}});var j8=C((Jxe,wL)=>{"use strict";function l6e(t,e){let n=e||s6e();return t?a6e(t,n):n}function i6e(t,e){return t.genReqId(e)}function s6e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function a6e(t,e){return function(n){return n.headers[t]||e(n)}}wL.exports={getGenReqId:i6e,reqIdGenFactory:l6e}});var IL=C((Qxe,NL)=>{"use strict";var RL=12,o6e=0,Fy=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function u6e(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",l=0,i=0,s=e,a=RL;e>-1&&e<n;){var o=OL(t[e+1],4),c=OL(t[e+2],0),f=o|c,p=Fy[f];if(a=Fy[256+a+p],i=i<<6|f&Fy[364+p],a===RL)r+=t.slice(l,s),r+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,l=e+3,e=s=t.indexOf("%",l);else{if(a===o6e)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(l)}var c6e={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function OL(t,e){var n=c6e[t];return n===void 0?255:n<<e}NL.exports=u6e});var LL=C((Zxe,DL)=>{"use strict";var CL=IL(),kL=/\+/g,PL=function(){};PL.prototype=Object.create(null);function f6e(t){let e=new PL;if(typeof t!="string")return e;let n=t.length,r="",l="",i=-1,s=-1,a=!1,o=!1,c=!1,f=!1,p=!1,m=0;for(let h=0;h<n+1;h++)if(m=h!==n?t.charCodeAt(h):38,m===38){if(p=s>i,p||(s=h),r=t.slice(i+1,s),p||r.length>0){c&&(r=r.replace(kL," ")),a&&(r=CL(r)||r),p&&(l=t.slice(s+1,h),f&&(l=l.replace(kL," ")),o&&(l=CL(l)||l));let g=e[r];g===void 0?e[r]=l:g.pop?g.push(l):e[r]=[g,l]}l="",i=h,s=h,a=!1,o=!1,c=!1,f=!1}else m===61?s<=i?s=h:o=!0:m===43?s>i?f=!0:c=!0:m===37&&(s>i?o=!0:a=!0);return e}DL.exports=f6e});var ML=C((eAe,FL)=>{var xi=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),p6e=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function d6e(t){let e=t.length;if(e===0)return"";let n="",r=0,l=0;e:for(;l<e;l++){let i=t.charCodeAt(l);for(;i<128;){if(p6e[i]!==1&&(r<l&&(n+=t.slice(r,l)),r=l+1,n+=xi[i]),++l===e)break e;i=t.charCodeAt(l)}if(r<l&&(n+=t.slice(r,l)),i<2048){r=l+1,n+=xi[192|i>>6]+xi[128|i&63];continue}if(i<55296||i>=57344){r=l+1,n+=xi[224|i>>12]+xi[128|i>>6&63]+xi[128|i&63];continue}if(++l,l>=e)throw new Error("URI malformed");let s=t.charCodeAt(l)&1023;r=l+1,i=65536+((i&1023)<<10|s),n+=xi[240|i>>18]+xi[128|i>>12&63]+xi[128|i>>6&63]+xi[128|i&63]}return r===0?t:r<e?n+t.slice(r):n}FL.exports={encodeString:d6e}});var UL=C((tAe,jL)=>{"use Line truncated
`).join(`
`+e+f);n+=e+o+i+p+`
`,n+=NL(s,e+f)}return n}function Ace(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function IL(t){return Array.isArray(t)?t.map(e=>IL(e)):typeof t=="symbol"?t.toString():typeof t=="function"?Ace(t):t}function wce(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},l=e.includeMeta;Array.isArray(l)||(l=Reflect.ownKeys(n));for(let i of l){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let o=JSON.stringify(IL(a));r[s]=o}}return r}function Rce(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function Oce(t){let e={...t.opts.constraints},n=e[RL.name];return delete e[RL.name],{...t,method:n,opts:{constraints:e}}}function Nce(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=Rce(t.metaData),e}function Ice(t){return t.reduce((e,n)=>{for(let r of e)if(wL(n.opts.constraints,r.opts.constraints)&&wL(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function Cce(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(Oce)),r=r.map(l=>(l.metaData=wce(l,n),l)),n.method===void 0&&(r=Ice(r)),r.map(Nce).join(`
${e}`)}function R8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[OL]=Cce(t,n,r)),n=""),t.staticChildren)for(let l of Object.values(t.staticChildren))R8(l,e,n+l.prefix,r);if(t.parametricChildren)for(let l of Object.values(t.parametricChildren)){let i=Array.from(l.nodePaths).join("|");R8(l,e,n+i,r)}t.wildcardChild&&R8(t.wildcardChild,e,"*",r)}function kce(t,e){let n={};return R8(t,n,t.prefix,e),NL(n)}CL.exports={prettyPrintTree:kce}});var DL=C((HSe,PL)=>{"use strict";var Pce=w8(),_y=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,l=n.opts.constraints||{},i={params:r,constraints:l,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(l);s.length===0&&(this.unconstrainedHandler=i);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(Pce.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((o,f)=>Object.keys(o.constraints).length-Object.keys(f.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,l)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let i=this.handlers[r].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<r,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let l=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=l,this._buildConstraintStore(l,r)}let n=[];n.push(`
`+e+c);n+=e+o+i+p+`
`,n+=iF(s,e+c)}return n}function E6e(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function sF(t){return Array.isArray(t)?t.map(e=>sF(e)):typeof t=="symbol"?t.toString():typeof t=="function"?E6e(t):t}function b6e(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},l=e.includeMeta;Array.isArray(l)||(l=Reflect.ownKeys(n));for(let i of l){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let o=JSON.stringify(sF(a));r[s]=o}}return r}function T6e(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function S6e(t){let e={...t.opts.constraints},n=e[rF.name];return delete e[rF.name],{...t,method:n,opts:{constraints:e}}}function x6e(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=T6e(t.metaData),e}function A6e(t){return t.reduce((e,n)=>{for(let r of e)if(nF(n.opts.constraints,r.opts.constraints)&&nF(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function w6e(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(S6e)),r=r.map(l=>(l.metaData=b6e(l,n),l)),n.method===void 0&&(r=A6e(r)),r.map(x6e).join(`
${e}`)}function q8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[lF]=w6e(t,n,r)),n=""),t.staticChildren)for(let l of Object.values(t.staticChildren))q8(l,e,n+l.prefix,r);if(t.parametricChildren)for(let l of Object.values(t.parametricChildren)){let i=Array.from(l.nodePaths).join("|");q8(l,e,n+i,r)}t.wildcardChild&&q8(t.wildcardChild,e,"*",r)}function R6e(t,e){let n={};return q8(t,n,t.prefix,e),iF(n)}aF.exports={prettyPrintTree:R6e}});var cF=C((fAe,uF)=>{"use strict";var O6e=H8(),By=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,l=n.opts.constraints||{},i={params:r,constraints:l,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(l);s.length===0&&(this.unconstrainedHandler=i);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(O6e.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((o,c)=>Object.keys(o.constraints).length-Object.keys(c.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,l)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let i=this.handlers[r].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<r,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let l=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=l,this._buildConstraintStore(l,r)}let n=[];n.push(`
let candidates = ${(1<<this.handlers.length)-1}
let mask, matches
`);for(let r of this.constraints){n.push(`
@@ -323,90 +323,90 @@ ${e}`)}function R8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empt
}
if (candidates === 0) return null;
`)}for(let r in e.strategies)e.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&n.push(`if (derivedConstraints.${r} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
`))}};PL.exports=_y});var FL=C((qSe,LL)=>{"use strict";var Dce=DL(),P8={STATIC:0,PARAMETRIC:1,WILDCARD:2},O8=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new Dce),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},N8=class extends O8{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let l=1;for(;l<n.prefix.length;l++)if(e.charCodeAt(l)!==n.prefix.charCodeAt(l)){n=n.split(this,l);break}return n.createStaticChild(e.slice(l))}let r=e.charAt(0);return this.staticChildren[r]=new I8(e),this.staticChildren[r]}},I8=class t extends N8{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=P8.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(l=>(l.regex&&l.regex.source)===n);return r||null}createParametricChild(e,n,r){let l=this.getParametricChild(e);return l?(l.nodePaths.add(r),l):(l=new C8(e,n,r),this.parametricChildren.push(l),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),l)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new k8,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),l=this.prefix.slice(n);this.prefix=l,this._compilePrefixMatch();let i=new t(r);return i.staticChildren[l.charAt(0)]=this,e.staticChildren[r.charAt(0)]=i,i}getNextNode(e,n,r,l){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},C8=class extends N8{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=P8.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},k8=class extends O8{constructor(){super(),this.kind=P8.WILDCARD}getNextNode(){return null}};LL.exports={StaticNode:I8,ParametricNode:C8,WildcardNode:k8,NODE_TYPES:P8}});var $L=C((VSe,ML)=>{"use strict";var Lce=require("assert");function l0(){if(!(this instanceof l0))return new l0;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}l0.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,l]=t.split(".");return n=Number(n)||0,r=Number(r)||0,l=Number(l)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),l>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=l,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${l}`]=e,this};l0.prototype.get=function(t){return this.store[t]};ML.exports={name:"version",mustMatchWhenDerived:!0,storage:l0,validate(t){Lce(typeof t=="string","Version should be a string")}}});var UL=C((zSe,jL)=>{"use strict";var Fce=require("assert");function Mce(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let l of e)if(l.host.test(n))return l.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}jL.exports={name:"host",mustMatchWhenDerived:!1,storage:Mce,validate(t){Fce(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var HL=C((GSe,BL)=>{"use strict";var $ce=$L(),jce=UL(),Ey=require("assert"),by=class{constructor(e){if(this.strategies={version:$ce,host:jce},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(Ey(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Ey(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};BL.exports=by});var VL=C((XSe,qL)=>{"use strict";var Uce=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];qL.exports=Uce});var XL=C((WSe,GL)=>{"use strict";function zL(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function Bce(t,e){let n=!1,r=!1,l="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),f=t.charCodeAt(s+2);zL(o,f)===null?n=!0:(r=!0,o===50&&f===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){l=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:l,shouldDecodeParam:r}}function Hce(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let l=e;l<t.length;l++)if(t.charCodeAt(l)===37){let i=t.charCodeAt(l+1),s=t.charCodeAt(l+2),a=zL(i,s);n+=t.slice(r,l)+a,r=l+3}return t.slice(0,e)+n+t.slice(r)}GL.exports={safeDecodeURI:Bce,safeDecodeURIComponent:Hce}});var Ry=C((KSe,eF)=>{"use strict";var ar=require("assert"),qce=hL(),D8=xL(),xy=qo(),{prettyPrintTree:Vce}=kL(),{StaticNode:WL,NODE_TYPES:Ty}=FL(),zce=HL(),bu=VL(),Sy=w8(),{safeDecodeURI:Gce,safeDecodeURIComponent:KL}=XL(),YL=/^https?:\/\/.*?\//,Ia=/(\/:[^/()]*?)\?(\/?)/;if(!D8(YL))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!D8(Ia))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Bn(t){if(!(this instanceof Bn))return new Bn(t);t=t||{},this._opts=t,t.defaultRoute?(ar(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(ar(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(ar(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Xce,t.querystringParser?(ar(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:qce.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new zce(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Bn.prototype.on=function(e,n,r,l,i){typeof r=="function"&&(l!==void 0&&(i=l),l=r,r={}),ar(typeof n=="string","Path should be a string"),ar(n.length>0,"The path could not be empty"),ar(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),ar(typeof l=="function","Handler should be a function");let s=n.match(Ia);if(s){ar(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let f=n.replace(Ia,"$1$2"),c=n.replace(Ia,"$2");this.on(e,f,r,l,i),this.on(e,c,r,l,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=Ay(n)),this.ignoreTrailingSlash&&(n=wy(n));let o=Array.isArray(e)?e:[e];for(let f of o)ar(typeof f=="string","Method should be a string"),ar(bu.includes(f),`Method '${f}' is not an http method.`),this._on(f,n,r,l,i,a)};Bn.prototype._on=function(e,n,r,l,i){let s={};r.constraints!==void 0&&(ar(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(s=r.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new WL("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new WL(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],f=o.prefix.length,c=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,g=a.charCodeAt(m)===42;if(h||g||m===a.length&&m!==f){let _=a.slice(f,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=a.charCodeAt(x),b=v===40,w=v===45||v===46,N=v===47||x===a.length;if(b||w||N){let O=a.slice(T,x);if(c.push(O),_=_||b||w,b){let L=ZL(a,x),J=a.slice(x,L+1);this.allowUnsafeRegex||ar(D8(new RegExp(J)),`The regex '${J}' is not safe!`),S.push(QL(J)),x=L+1}else S.push("(.*?)");let k=x;for(;x<a.length;x++){let L=a.charCodeAt(x);if(L===47)break;if(L===58)if(a.charCodeAt(x+1)===58)x++;else break}let $=a.slice(k,x);if($&&($= Line truncated
Content-Length: ${Ee.length}\r
`))}};uF.exports=By});var pF=C((pAe,fF)=>{"use strict";var N6e=cF(),K8={STATIC:0,PARAMETRIC:1,WILDCARD:2},V8=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new N6e),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},z8=class extends V8{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let l=1;for(;l<n.prefix.length;l++)if(e.charCodeAt(l)!==n.prefix.charCodeAt(l)){n=n.split(this,l);break}return n.createStaticChild(e.slice(l))}let r=e.charAt(0);return this.staticChildren[r]=new G8(e),this.staticChildren[r]}},G8=class t extends z8{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=K8.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(l=>(l.regex&&l.regex.source)===n);return r||null}createParametricChild(e,n,r){let l=this.getParametricChild(e);return l?(l.nodePaths.add(r),l):(l=new X8(e,n,r),this.parametricChildren.push(l),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),l)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new W8,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),l=this.prefix.slice(n);this.prefix=l,this._compilePrefixMatch();let i=new t(r);return i.staticChildren[l.charAt(0)]=this,e.staticChildren[r.charAt(0)]=i,i}getNextNode(e,n,r,l){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},X8=class extends z8{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=K8.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},W8=class extends V8{constructor(){super(),this.kind=K8.WILDCARD}getNextNode(){return null}};fF.exports={StaticNode:G8,ParametricNode:X8,WildcardNode:W8,NODE_TYPES:K8}});var hF=C((dAe,dF)=>{"use strict";var I6e=require("assert");function h0(){if(!(this instanceof h0))return new h0;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}h0.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,l]=t.split(".");return n=Number(n)||0,r=Number(r)||0,l=Number(l)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),l>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=l,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${l}`]=e,this};h0.prototype.get=function(t){return this.store[t]};dF.exports={name:"version",mustMatchWhenDerived:!0,storage:h0,validate(t){I6e(typeof t=="string","Version should be a string")}}});var gF=C((hAe,mF)=>{"use strict";var C6e=require("assert");function k6e(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let l of e)if(l.host.test(n))return l.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}mF.exports={name:"host",mustMatchWhenDerived:!1,storage:k6e,validate(t){C6e(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var vF=C((mAe,yF)=>{"use strict";var P6e=hF(),D6e=gF(),Hy=require("assert"),qy=class{constructor(e){if(this.strategies={version:P6e,host:D6e},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(Hy(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Hy(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};yF.exports=qy});var EF=C((gAe,_F)=>{"use strict";var L6e=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];_F.exports=L6e});var SF=C((yAe,TF)=>{"use strict";function bF(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function F6e(t,e){let n=!1,r=!1,l="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),c=t.charCodeAt(s+2);bF(o,c)===null?n=!0:(r=!0,o===50&&c===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){l=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:l,shouldDecodeParam:r}}function M6e(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let l=e;l<t.length;l++)if(t.charCodeAt(l)===37){let i=t.charCodeAt(l+1),s=t.charCodeAt(l+2),a=bF(i,s);n+=t.slice(r,l)+a,r=l+3}return t.slice(0,e)+n+t.slice(r)}TF.exports={safeDecodeURI:F6e,safeDecodeURIComponent:M6e}});var Ky=C((vAe,IF)=>{"use strict";var ur=require("assert"),$6e=VL(),Y8=eF(),Gy=Yo(),{prettyPrintTree:j6e}=oF(),{StaticNode:xF,NODE_TYPES:Vy}=pF(),U6e=vF(),Ou=EF(),zy=H8(),{safeDecodeURI:B6e,safeDecodeURIComponent:AF}=SF(),wF=/^https?:\/\/.*?\//,La=/(\/:[^/()]*?)\?(\/?)/;if(!Y8(wF))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!Y8(La))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function zn(t){if(!(this instanceof zn))return new zn(t);t=t||{},this._opts=t,t.defaultRoute?(ur(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(ur(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(ur(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=H6e,t.querystringParser?(ur(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:$6e.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new U6e(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}zn.prototype.on=function(e,n,r,l,i){typeof r=="function"&&(l!==void 0&&(i=l),l=r,r={}),ur(typeof n=="string","Path should be a string"),ur(n.length>0,"The path could not be empty"),ur(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),ur(typeof l=="function","Handler should be a function");let s=n.match(La);if(s){ur(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=n.replace(La,"$1$2"),f=n.replace(La,"$2");this.on(e,c,r,l,i),this.on(e,f,r,l,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=Xy(n)),this.ignoreTrailingSlash&&(n=Wy(n));let o=Array.isArray(e)?e:[e];for(let c of o)ur(typeof c=="string","Method should be a string"),ur(Ou.includes(c),`Method '${c}' is not an http method.`),this._on(c,n,r,l,i,a)};zn.prototype._on=function(e,n,r,l,i){let s={};r.constraints!==void 0&&(ur(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(s=r.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new xF("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new xF(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],c=o.prefix.length,f=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,g=a.charCodeAt(m)===42;if(h||g||m===a.length&&m!==c){let _=a.slice(c,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=a.charCodeAt(x),b=v===40,w=v===45||v===46,N=v===47||x===a.length;if(b||w||N){let O=a.slice(T,x);if(f.push(O),_=_||b||w,b){let L=NF(a,x),Q=a.slice(x,L+1);this.allowUnsafeRegex||ur(Y8(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(OF(Q)),x=L+1}else S.push("(.*?)");let k=x;for(;x<a.length;x++){let L=a.charCodeAt(x);if(L===47)break;if(L===58)if(a.charCodeAt(x+1)===58)x++;else break}let j=a.slice(k,x);if(j&&(j= Line truncated
Content-Length: ${Te.length}\r
Content-Type: application/json\r
\r
${Ee}`),he.destroy(Y)}function ge(Y,he){Y.headers["accept-version"]!==void 0&&(Y.headers[P8e]=Y.headers["accept-version"],Y.headers["accept-version"]=void 0),h.router.lookup(Y,he)}function H(Y,he,Ee){if(a){let nt=pM(L.server,he),Ie=cM(L,o,he,nt),At=new z8(nt,null,he,null,Ie,L),qn=new m0(Ee,At,Ie);return i===!1&&Ie.info({req:At},"incoming request"),a(new Z8e(Y),At,qn)}let je=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${Y}' is not a valid url component","statusCode":400}`;Ee.writeHead(400,{"Content-Type":"application/json","Content-Length":je.length}),Ee.end(je)}function re(Y,he,Ee){if(Y!==!1)return function(nt){if(nt){if(a){let At=pM(L.server,he),qn=cM(L,o,he,At),wt=new z8(At,null,he,null,qn,L),Ut=new m0(Ee,wt,qn);return i===!1&&qn.info({req:wt},"incoming request"),a(new Q8e,wt,Ut)}let Ie='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Ee.writeHead(500,{"Content-Type":"application/json","Content-Length":Ie.length}),Ee.end(Ie)}}}function ne(Y,he){return J('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,Y,he,$,m.routeHandler),this}function ee(Y){return J('Cannot call "setValidatorCompiler"!'),this[rs].setValidatorCompiler(Y),this}function Fn(Y){return J('Cannot call "setSchemaErrorFormatter"!'),yM(Y),this[Jy]=Y.bind(this),this}function xt(Y){return J('Cannot call "setSerializerCompiler"!'),this[rs].setSerializerCompiler(Y),this}function Ve(Y){J('Cannot call "setSchemaController"!');let he=this[rs],Ee=oM.buildSchemaController(he,Object.assign({},he.opts,Y));return this[rs]=Ee,this.getSchema=Ee.getSchema.bind(Ee),this.getSchemas=Ee.getSchemas.bind(Ee),this}function Lt(Y){return J('Cannot call "setReplySerializer"!'),this[aM]=Y,this}function Xe(Y){return J('Cannot call "setErrorHandler"!'),this[V8]=gM(this[V8],Y.bind(this)),this}function ze(Y){return J('Cannot call "setChildLoggerFactory"!'),this[Zy]=Y,this}function vn(Y={}){return Y.includeMeta=Y.includeHooks?Y.includeMeta?tv.concat(Y.includeMeta):tv:Y.includeMeta,m.printRoutes(Y)}function at(Y,{rewriteUrl:he,logger:Ee}){let je;return function(Ie,At){if(je===void 0&&(je=Y.isAsyncConstraint()),he){Ie.originalUrl=Ie.url;let qn=he.call(O,Ie);if(typeof qn=="string")Ie.url=qn;else{let wt=new u9e(Ie.url,typeof qn);Ie.destroy(wt)}}Y.routing(Ie,At,re(je,Ie,At))}}function ct(Y){return J('Cannot call "setGenReqId"!'),this[ev]=dM(this[Yy].requestIdHeader,Y),this}}G8.errorCodes=ka;function yM(t){if(typeof t!="function")throw new mM(typeof t);if(t.constructor.name==="AsyncFunction")throw new mM("AsyncFunction")}X8.exports=G8;X8.exports.fastify=G8;X8.exports.default=G8});var LB=C((owe,DB)=>{"use strict";DB.exports=Error});var MB=C((uwe,FB)=>{"use strict";FB.exports=EvalError});var jB=C((cwe,$B)=>{"use strict";$B.exports=RangeError});var BB=C((fwe,UB)=>{"use strict";UB.exports=ReferenceError});var j_=C((pwe,HB)=>{"use strict";HB.exports=SyntaxError});var t4=C((dwe,qB)=>{"use strict";qB.exports=TypeError});var zB=C((hwe,VB)=>{"use strict";VB.exports=URIError});var XB=C((mwe,GB)=>{"use strict";GB.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var l=42;e[n]=l;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==l||s.enumerable!==!0)return!1}return!0}});var YB=C((gwe,KB)=>{"use strict";var WB=typeof Symbol<"u"&&Symbol,ehe=XB();KB.exports=function(){return typeof WB!="function"||typeof Symbol!="function"||typeof WB("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ehe()}});var QB=C((ywe,JB)=>{"use strict";var U_={__proto__:null,foo:{}},the=Object;JB.exports=function(){return{__proto__:U_}.foo===U_.foo&&!(U_ instanceof the)}});var tH=C((vwe,eH)=>{"use strict";var nhe="Function.prototype.bind called on incompatible ",rhe=Object.prototype.toString,lhe=Math.max,ihe="[object Function]",ZB=function(e,n){for(var r=[],l=0;l<e.length;l+=1)r[l]=e[l];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},she=function(e,n){for(var r=[],l=n||0,i=0;l<e.length;l+=1,i+=1)r[i]=e[l];return r},ahe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};eH.exports=function(e){var n=this;if(typeof n!="function"||rhe.apply(n)!==ihe)throw new TypeError(nhe+n);for(var r=she(arguments,1),l,i=function(){if(this instanceof l){var c=n.apply(this,ZB(r,arguments));return Object(c)===c?c:this}return n.apply(e,ZB(r,arguments))},s=lhe(0,n.length-r.length),a Line truncated
`)>=0)return!1;return!0}function cme(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Di.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Di.call(Array(e+1),n)}}function eE(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+Di.call(t,","+n)+`
`+e.prev}function E7(t,e){var n=Z_(t),r=[];if(n){r.length=t.length;for(var l=0;l<t.length;l++)r[l]=vs(t,l)?e(t[l],t):""}var i=typeof W_=="function"?W_(t):[],s;if(a4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var o in t)vs(t,o)&&(n&&String(Number(o))===o&&o<t.length||a4&&s["$"+o]instanceof Symbol||(WH.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof W_=="function")for(var f=0;f<i.length;f++)KH.call(t,i[f])&&r.push("["+e(i[f])+"]: "+e(t[i[f]],t));return r}});var lq=C((Cwe,rq)=>{"use strict";var nq=Ja(),o4=PH(),fme=tq(),pme=t4(),S7=nq("%WeakMap%",!0),x7=nq("%Map%",!0),dme=o4("WeakMap.prototype.get",!0),hme=o4("WeakMap.prototype.set",!0),mme=o4("WeakMap.prototype.has",!0),gme=o4("Map.prototype.get",!0),yme=o4("Map.prototype.set",!0),vme=o4("Map.prototype.has",!0),lE=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},_me=function(t,e){var n=lE(t,e);return n&&n.value},Eme=function(t,e,n){var r=lE(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},bme=function(t,e){return!!lE(t,e)};rq.exports=function(){var e,n,r,l={assert:function(i){if(!l.has(i))throw new pme("Side channel does not contain "+fme(i))},get:function(i){if(S7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return dme(e,i)}else if(x7){if(n)return gme(n,i)}else if(r)return _me(r,i)},has:function(i){if(S7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return mme(e,i)}else if(x7){if(n)return vme(n,i)}else if(r)return bme(r,i);return!1},set:function(i,s){S7&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new S7),hme(e,i,s)):x7?(n||(n=new x7),yme(n,i,s)):(r||(r={key:{},next:null}),Eme(r,i,s))}};return l}});var A7=C((kwe,iq)=>{"use strict";var Tme=String.prototype.replace,Sme=/%20/g,iE={RFC1738:"RFC1738",RFC3986:"RFC3986"};iq.exports={default:iE.RFC3986,formatters:{RFC1738:function(t){return Tme.call(t,Sme,"+")},RFC3986:function(t){return String(t)}},RFC1738:iE.RFC1738,RFC3986:iE.RFC3986}});var oE=C((Pwe,aq)=>{"use strict";var xme=A7(),sE=Object.prototype.hasOwnProperty,Qa=Array.isArray,Li=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Ame=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Qa(r)){for(var l=[],i=0;i<r.length;++i)typeof r[i]<"u"&&l.push(r[i]);n.obj[n.prop]=l}}},sq=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},l=0;l<e.length;++l)typeof e[l]<"u"&&(r[l]=e[l]);return r},wme=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Qa(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!sE.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var l=e;return Qa(e)&&!Qa(n)&&(l=sq(e,r)),Qa(e)&&Qa(n)?(n.forEach(function(i,s){if(sE.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return sE.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},l)},Rme=function(e,n){return Object.keys(n).reduce(function(r,l){return r[l]=n[l],r},e)},Ome=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},aE=1024,Nme=function(e,n,r,l,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=aE){for(var f=s.length>=aE?s.slice(o,o+aE):s,c=[],p=0;p<f.length;++p){var m=f.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===xme.RFC1738&&(m===40||m===41)){c[c.length]=f.charAt(p);continue}if(m<128){c[c.length]=Li[m];continue}if(m<2048){c[c.length]=Li[192|m>>6]+Li[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=Li[224|m>>12]+Li[128|m>>6&63]+Li[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|f.charCodeAt(p)&1023),c[c.length]=Li[240|m>>18]+Li[128|m>>12&63]+Li[128|m>>6&63]+Li[128|m&63]}a+=c.join("")}return a},Ime=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],l=0;l<n.length;++l)for(var i=n[l],s=i.obj[i.prop],a=Object.keys(s),o=0;o<a.length;++o){var f=a[o],c=s[f];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:s,prop:f}),r.push(c))}return Ame(n),e},Cme=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},kme=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pme=function(e,n){return[].concat(e,n)},Dme=function(e,n){if(Qa(e)){for(var r=[],l=0;l<e.length;l+=1)r.push(n(e[l]));return r}return n(e)};aq.exports={arrayToObject:sq,assign:Rme,combine:Pme,compact:Ime,decode:Ome,encode:Nme,isBuffer:kme,isRegExp:Cme,maybeMap:Dme,merge:wme}});var dq=C((Dwe,pq)=>{"use strict";var uq=lq(),w7=oE(),u5=A7(),Lme=Object.prototype.hasOwnProperty,cq={brack Line truncated
`;Gt.DEFAULT_CONTENT_TYPE="application/octet-stream";Gt.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=SE.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),oV.isArray(e)){this._error(new Error("Arrays are not supported."));return}var l=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(l),r(e),r(i),this._trackLength(l,e,n)};Gt.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Gt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof pye))&&(n.knownLength||this._valuesToMeasure.push(e))};Gt.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):fye.stat(t.path,function(n,r){var l;if(n){e(n);return}l=r.size-(t.start?t.start:0),e(null,l)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};Gt.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),l=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(l||[])};typeof n.header=="object"&&TE(s,n.header);var a;for(var o in s)s.hasOwnProperty(o)&&(a=s[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=o+": "+a.join("; ")+Gt.LINE_BREAK)));return"--"+this.getBoundary()+Gt.LINE_BREAK+i+Gt.LINE_BREAK};Gt.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=EE.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=EE.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=EE.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Gt.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=bE.lookup(t.name)),!n&&t.path&&(n=bE.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=bE.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=Gt.DEFAULT_CONTENT_TYPE),n};Gt.prototype._multiPartFooter=function(){return function(t){var e=Gt.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Gt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Gt.LINE_BREAK};Gt.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};Gt.prototype.setBoundary=function(t){this._boundary=t};Gt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Gt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Gt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Gt.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Gt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Gt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Gt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}dye.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(l){e+=l}),t(null,e)})};Gt.prototype.submit=function(t,e){var n,r,l={method:"post"};return typeof t=="string"?(t=cye(t),r=TE({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},l)):(r=TE(t,l),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=uye.request(r):n=oye.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,o=function(f,c){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,f,c)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};Gt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(l)}};w3.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(l){r.request.onSocket(l)})}};function dz(t,e){var n=this;w3.prototype.createSocket.call(n,t,function(r){var l=t.request.getHeader("host"),i=lb({},n.options,{socket:r,servername:l?l.replace(/:.*$/,""):t.host}),s=fve.connect(0,i);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function hz(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function lb(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var l=Object.keys(r),i=0,s=l.length;i<s;++i){var a=l[i];r[a]!==void 0&&(t[a]=r[a])}}return t}var As;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?As=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:As=function(){};v4.debug=As});var yz=C((wIe,gz)=>{gz.exports=mz()});var HG=C(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.removeTrailingChar=io.merge=void 0;var Yve=(...t)=>{let e={};return t.forEach(function(n){var r;for(r in n)r in e&&e[r]===null?e[r]=n[r]:r in e&&Array.isArray(e[r])?e[r]=e[r].concat(n[r]):r in e&&typeof e[r]=="object"?e[r]=(0,io.merge)(e[r],n[r]):e[r]=n[r]}),e};io.merge=Yve;var Jve=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;io.removeTrailingChar=Jve});var b4=C(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.DataError=js.DatabaseError=js.NestedError=void 0;var x5=class extends Error{inner;id;constructor(e,n,r){super(e),this.inner=r,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};js.NestedError=x5;var Ob=class extends x5{};js.DatabaseError=Ob;var Nb=class extends x5{};js.DataError=Nb});var Db=C(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.getArrayIndicies=Rl.validateArrayIndex=Rl.validateArrayIndicies=Rl.isInt=Rl.ArrayInfo=Rl.arrayRegex=void 0;var q7=b4(),Qve=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Rl.arrayRegex=Qve;var Ib={},Cb=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,kb(r))this.index=parseInt(r);else if(!this.append)throw new q7.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(Ib[e])return Ib[e];let r=(0,Rl.arrayRegex)().exec(e.trim());if(r!=null){let l=r[1],i="["+r[2].toString()+"]",s=Pb(i);return qG(s),Ib[e]=new t(l,s)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let l=n?e:e[this.property];return l.length===0?0:l.length-1}return r}getData(e){if(this.append)throw new q7.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(l=>{l!==""&&(l=+l,l===-1&&(l=r.length-1),r=r[+l])}),r.push(n)}else{let{index:r,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);r===-1?l.push(n):l[r]=n}}delete(e){if(this.append)throw new q7.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let l=0;l<this.indicies.length-1;l++){let i=+this.indicies[l];i===-1&&(i=r.length-1),r=r[i]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};Rl.ArrayInfo=Cb;function kb(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Rl.isInt=kb;function qG(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}Rl.validateArrayIndicies=qG;function VG(t){if(t.length!==0&&!kb(t))throw new q7.DataError("Only numerical values accepted for array index",200)}Rl.validateArrayIndex=VG;function Pb(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));VG(e);let n=e.length+2;return[e,...Pb(t.substring(n))]}Rl.getArrayIndicies=Pb});var XG=C(V7=>{"use strict";Object.defineProperty(V7,"__esModule",{value:!0});V7.DBParentData=void 0;var zG=Db(),GG=b4(),Lb=class{parent;data;db;dataPath;constructor(e,n,r,l){this.parent=l,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=zG.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new GG.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=zG.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new GG.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};V7.DBParentData=Lb});var KG=C((_ke,WG)=>{WG.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var f=null;a.hasOwnProperty("scope")&&(f=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var p=!1;if(o.queue.push(function(){!p&&o.readers>=0&&(p=!0,o.queue.shift(),o.readers++,s.call(f,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){p||(p=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,c)}function n(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var f=null;a.hasOwnProperty("scope")&&(f=a.scope);var c=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var p=!1;if(o.queue.push(function(){p|| Line truncated
`:t(e.children):p9(e)?t(e.children):Ii(e)?e.data:""},textContent:qu,innerText:m9,getChildren:w9,getParent:q$,getSiblings:V$,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:e_,prevElementSibling:t_,removeElement:La,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let l=r.children;l[l.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){La(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){La(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let l=n.children;l.splice(l.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){La(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){La(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:n9,find:n_,findOneChild:function(t,e){return e.find(t)},findOne:wv,existsOne:function t(e,n){return n.some(r=>st(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],l=[0];;)if(l[0]>=r[0].length){if(r.length===1)return n;r.shift(),l.shift()}else{let i=r[0][l[0]++];st(i)&&(t(i)&&n.push(i),0<i.children.length)&&(l.unshift(0),r.unshift(i.children))}},testElement:function(t,e){return!(t=wM(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=wM(t))?n9(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),wv(z$("id",t),e,n)},getElementsByTagName:Mu,getElementsByTagType:function(t,e,n=!0,r=1/0){return n9(g9.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return T2},compareDocumentPosition:G$,uniqueSort:Vu,getFeed:function(t){return(t=W8(F9e,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Mu("entry",e=e.children).map(l=>{var i={media:RM(l=l.children)},s=(jl(i,"id","id",l),jl(i,"title","title",l),(s=W8("link",l))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=ls("summary",l)||ls("content",l))&&(i.description=s),(s=ls("updated",l))&&(i.pubDate=new Date(s)),i})},r=(jl(n,"id","id",e),jl(n,"title","title",e),(r=W8("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),jl(n,"description","subtitle",e),(r=ls("updated",e))&&(n.updated=new Date(r)),jl(n,"author","email",e,!0),n}:function(r){var n=(n=(n=W8("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Mu("item",r.children).map(i=>{var s={media:RM(i=i.children)};return jl(s,"id","guid",i),jl(s,"title","title",i),jl(s,"link","link",i),jl(s,"description","description",i),(i=ls("pubDate",i)||ls("dc:date",i))&&(s.pubDate=new Date(i)),s})},l=(jl(r,"title","title",n),jl(r,"link","link",n),jl(r,"description","description",n),ls("lastBuildDate",n));return l&&(r.updated=new Date(l)),jl(r,"author","managingEditor",n,!0),r})(t):null}}),$u=function(){return($u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};function X$(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function M9e(t,e){return X$(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,$u($u($u({},Zv),this==null?void 0:this._options),Sv(e??{})))}function $9e(t){return X$(this,t,$u($u({},this._options),{xmlMode:!0}))}function B0(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=qu(e[r]);return n}function j9e(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,Zv,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function U9e(){return this(this._root)}function W$(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function B9e(t,e){if(OM(t)&&OM(e)){for(var n=t.length,r=+e.length,l=0;l<r;l++)t[n++]=e[l];return t.length=n,t}}function OM(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Fa,H9e=Object.freeze({__proto__:null,html:M9e,xml:$9e,text:B0,parseHTML:j9e,root:U9e,contains:W$,merge:B9e});function Ni(t){return t.cheerio!=null}function Kn(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function rv(e){var e="length"in e?Array.prototype.map.call(e,function(r){return d9(r,!0)}):[d9(e,!0)],n=new T3(e);return e.forEach(function(r){r.parent=n}),e}function Rv(t){var e, Line truncated
${Te}`),me.destroy(J)}function ye(J,me){J.headers["accept-version"]!==void 0&&(J.headers[O9e]=J.headers["accept-version"],J.headers["accept-version"]=void 0),h.router.lookup(J,me)}function q(J,me,Te){if(a){let lt=HM(L.server,me),Ce=UM(L,o,me,lt),Rt=new a9(lt,null,me,null,Ce,L),Xn=new A0(Te,Rt,Ce);return i===!1&&Ce.info({req:Rt},"incoming request"),a(new W9e(J),Rt,Xn)}let Ue=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${J}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Ue.length}),Te.end(Ue)}function le(J,me,Te){if(J!==!1)return function(lt){if(lt){if(a){let Rt=HM(L.server,me),Xn=UM(L,o,me,Rt),Ot=new a9(Rt,null,me,null,Xn,L),qt=new A0(Te,Ot,Xn);return i===!1&&Xn.info({req:Ot},"incoming request"),a(new X9e,Ot,qt)}let Ce='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Ce.length}),Te.end(Ce)}}}function re(J,me){return Q('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,J,me,j,m.routeHandler),this}function te(J){return Q('Cannot call "setValidatorCompiler"!'),this[as].setValidatorCompiler(J),this}function Un(J){return Q('Cannot call "setSchemaErrorFormatter"!'),XM(J),this[_v]=J.bind(this),this}function wt(J){return Q('Cannot call "setSerializerCompiler"!'),this[as].setSerializerCompiler(J),this}function Ge(J){Q('Cannot call "setSchemaController"!');let me=this[as],Te=$M.buildSchemaController(me,Object.assign({},me.opts,J));return this[as]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function $t(J){return Q('Cannot call "setReplySerializer"!'),this[MM]=J,this}function Ke(J){return Q('Cannot call "setErrorHandler"!'),this[s9]=GM(this[s9],J.bind(this)),this}function Xe(J){return Q('Cannot call "setChildLoggerFactory"!'),this[bv]=J,this}function bn(J={}){return J.includeMeta=J.includeHooks?J.includeMeta?Sv.concat(J.includeMeta):Sv:J.includeMeta,m.printRoutes(J)}function ut(J,{rewriteUrl:me,logger:Te}){let Ue;return function(Ce,Rt){if(Ue===void 0&&(Ue=J.isAsyncConstraint()),me){Ce.originalUrl=Ce.url;let Xn=me.call(O,Ce);if(typeof Xn=="string")Ce.url=Xn;else{let Ot=new l7e(Ce.url,typeof Xn);Ce.destroy(Ot)}}J.routing(Ce,Rt,le(Ue,Ce,Rt))}}function pt(J){return Q('Cannot call "setGenReqId"!'),this[Tv]=qM(this[vv].requestIdHeader,J),this}}o9.errorCodes=Ma;function XM(t){if(typeof t!="function")throw new zM(typeof t);if(t.constructor.name==="AsyncFunction")throw new zM("AsyncFunction")}u9.exports=o9;u9.exports.fastify=o9;u9.exports.default=o9});var bH=C((_Re,EH)=>{"use strict";EH.exports=Error});var SH=C((ERe,TH)=>{"use strict";TH.exports=EvalError});var AH=C((bRe,xH)=>{"use strict";xH.exports=RangeError});var RH=C((TRe,wH)=>{"use strict";wH.exports=ReferenceError});var fE=C((SRe,OH)=>{"use strict";OH.exports=SyntaxError});var c4=C((xRe,NH)=>{"use strict";NH.exports=TypeError});var CH=C((ARe,IH)=>{"use strict";IH.exports=URIError});var PH=C((wRe,kH)=>{"use strict";kH.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var l=42;e[n]=l;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==l||s.enumerable!==!0)return!1}return!0}});var FH=C((RRe,LH)=>{"use strict";var DH=typeof Symbol<"u"&&Symbol,ime=PH();LH.exports=function(){return typeof DH!="function"||typeof Symbol!="function"||typeof DH("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ime()}});var $H=C((ORe,MH)=>{"use strict";var pE={__proto__:null,foo:{}},sme=Object;MH.exports=function(){return{__proto__:pE}.foo===pE.foo&&!(pE instanceof sme)}});var BH=C((NRe,UH)=>{"use strict";var ame="Function.prototype.bind called on incompatible ",ome=Object.prototype.toString,ume=Math.max,cme="[object Function]",jH=function(e,n){for(var r=[],l=0;l<e.length;l+=1)r[l]=e[l];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},fme=function(e,n){for(var r=[],l=n||0,i=0;l<e.length;l+=1,i+=1)r[i]=e[l];return r},pme=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};UH.exports=function(e){var n=this;if(typeof n!="function"||ome.apply(n)!==cme)throw new TypeError(ame+n);for(var r=fme(arguments,1),l,i=function(){if(this instanceof l){var f=n.apply(this,jH(r,arguments));return Object(f)===f?f:this}return n.apply(e,jH(r,arguments))},s=ume(0,n.length-r.length),a Line truncated
`)>=0)return!1;return!0}function mge(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=$i.call(Array(t.indent+1)," ");else return null;return{base:n,prev:$i.call(Array(e+1),n)}}function wE(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+$i.call(t,","+n)+`
`+e.prev}function U7(t,e){var n=AE(t),r=[];if(n){r.length=t.length;for(var l=0;l<t.length;l++)r[l]=Ts(t,l)?e(t[l],t):""}var i=typeof EE=="function"?EE(t):[],s;if(g4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var o in t)Ts(t,o)&&(n&&String(Number(o))===o&&o<t.length||g4&&s["$"+o]instanceof Symbol||(Dq.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof EE=="function")for(var c=0;c<i.length;c++)Lq.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}});var Vq=C((HRe,qq)=>{"use strict";var Hq=ro(),y4=_q(),gge=Bq(),yge=c4(),q7=Hq("%WeakMap%",!0),V7=Hq("%Map%",!0),vge=y4("WeakMap.prototype.get",!0),_ge=y4("WeakMap.prototype.set",!0),Ege=y4("WeakMap.prototype.has",!0),bge=y4("Map.prototype.get",!0),Tge=y4("Map.prototype.set",!0),Sge=y4("Map.prototype.has",!0),IE=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},xge=function(t,e){var n=IE(t,e);return n&&n.value},Age=function(t,e,n){var r=IE(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},wge=function(t,e){return!!IE(t,e)};qq.exports=function(){var e,n,r,l={assert:function(i){if(!l.has(i))throw new yge("Side channel does not contain "+gge(i))},get:function(i){if(q7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return vge(e,i)}else if(V7){if(n)return bge(n,i)}else if(r)return xge(r,i)},has:function(i){if(q7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Ege(e,i)}else if(V7){if(n)return Sge(n,i)}else if(r)return wge(r,i);return!1},set:function(i,s){q7&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new q7),_ge(e,i,s)):V7?(n||(n=new V7),Tge(n,i,s)):(r||(r={key:{},next:null}),Age(r,i,s))}};return l}});var z7=C((qRe,zq)=>{"use strict";var Rge=String.prototype.replace,Oge=/%20/g,CE={RFC1738:"RFC1738",RFC3986:"RFC3986"};zq.exports={default:CE.RFC3986,formatters:{RFC1738:function(t){return Rge.call(t,Oge,"+")},RFC3986:function(t){return String(t)}},RFC1738:CE.RFC1738,RFC3986:CE.RFC3986}});var DE=C((VRe,Xq)=>{"use strict";var Nge=z7(),kE=Object.prototype.hasOwnProperty,lo=Array.isArray,ji=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Ige=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(lo(r)){for(var l=[],i=0;i<r.length;++i)typeof r[i]<"u"&&l.push(r[i]);n.obj[n.prop]=l}}},Gq=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},l=0;l<e.length;++l)typeof e[l]<"u"&&(r[l]=e[l]);return r},Cge=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(lo(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!kE.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var l=e;return lo(e)&&!lo(n)&&(l=Gq(e,r)),lo(e)&&lo(n)?(n.forEach(function(i,s){if(kE.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return kE.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},l)},kge=function(e,n){return Object.keys(n).reduce(function(r,l){return r[l]=n[l],r},e)},Pge=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},PE=1024,Dge=function(e,n,r,l,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=PE){for(var c=s.length>=PE?s.slice(o,o+PE):s,f=[],p=0;p<c.length;++p){var m=c.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===Nge.RFC1738&&(m===40||m===41)){f[f.length]=c.charAt(p);continue}if(m<128){f[f.length]=ji[m];continue}if(m<2048){f[f.length]=ji[192|m>>6]+ji[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=ji[224|m>>12]+ji[128|m>>6&63]+ji[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|c.charCodeAt(p)&1023),f[f.length]=ji[240|m>>18]+ji[128|m>>12&63]+ji[128|m>>6&63]+ji[128|m&63]}a+=f.join("")}return a},Lge=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],l=0;l<n.length;++l)for(var i=n[l],s=i.obj[i.prop],a=Object.keys(s),o=0;o<a.length;++o){var c=a[o],f=s[c];typeof f=="object"&&f!==null&&r.indexOf(f)===-1&&(n.push({obj:s,prop:c}),r.push(f))}return Ige(n),e},Fge=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Mge=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},$ge=function(e,n){return[].concat(e,n)},jge=function(e,n){if(lo(e)){for(var r=[],l=0;l<e.length;l+=1)r.push(n(e[l]));return r}return n(e)};Xq.exports={arrayToObject:Gq,assign:kge,combine:$ge,compact:Lge,decode:Pge,encode:Dge,isBuffer:Mge,isRegExp:Fge,maybeMap:jge,merge:Cge}});var Zq=C((zRe,Qq)=>{"use strict";var Kq=Vq(),G7=DE(),S5=z7(),Uge=Object.prototype.hasOwnProperty,Yq={brack Line truncated
`;Wt.DEFAULT_CONTENT_TYPE="application/octet-stream";Wt.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=KE.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),WV.isArray(e)){this._error(new Error("Arrays are not supported."));return}var l=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(l),r(e),r(i),this._trackLength(l,e,n)};Wt.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Wt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof yve))&&(n.knownLength||this._valuesToMeasure.push(e))};Wt.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):gve.stat(t.path,function(n,r){var l;if(n){e(n);return}l=r.size-(t.start?t.start:0),e(null,l)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};Wt.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),l=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(l||[])};typeof n.header=="object"&&WE(s,n.header);var a;for(var o in s)s.hasOwnProperty(o)&&(a=s[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=o+": "+a.join("; ")+Wt.LINE_BREAK)));return"--"+this.getBoundary()+Wt.LINE_BREAK+i+Wt.LINE_BREAK};Wt.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=GE.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=GE.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=GE.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Wt.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=XE.lookup(t.name)),!n&&t.path&&(n=XE.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=XE.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=Wt.DEFAULT_CONTENT_TYPE),n};Wt.prototype._multiPartFooter=function(){return function(t){var e=Wt.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Wt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Wt.LINE_BREAK};Wt.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};Wt.prototype.setBoundary=function(t){this._boundary=t};Wt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Wt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Wt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Wt.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Wt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Wt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Wt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}vve.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(l){e+=l}),t(null,e)})};Wt.prototype.submit=function(t,e){var n,r,l={method:"post"};return typeof t=="string"?(t=mve(t),r=WE({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},l)):(r=WE(t,l),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=hve.request(r):n=dve.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,o=function(c,f){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,c,f)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};Wt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(l)}};I3.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(l){r.request.onSocket(l)})}};function Zz(t,e){var n=this;I3.prototype.createSocket.call(n,t,function(r){var l=t.request.getHeader("host"),i=Ib({},n.options,{socket:r,servername:l?l.replace(/:.*$/,""):t.host}),s=g_e.connect(0,i);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function eG(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Ib(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var l=Object.keys(r),i=0,s=l.length;i<s;++i){var a=l[i];r[a]!==void 0&&(t[a]=r[a])}}return t}var Ns;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Ns=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Ns=function(){};R4.debug=Ns});var rG=C((MCe,nG)=>{nG.exports=tG()});var MX=C(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.removeTrailingChar=po.merge=void 0;var _Ee=(...t)=>{let e={};return t.forEach(function(n){var r;for(r in n)r in e&&e[r]===null?e[r]=n[r]:r in e&&Array.isArray(e[r])?e[r]=e[r].concat(n[r]):r in e&&typeof e[r]=="object"?e[r]=(0,po.merge)(e[r],n[r]):e[r]=n[r]}),e};po.merge=_Ee;var EEe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;po.removeTrailingChar=EEe});var C4=C(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.DataError=zs.DatabaseError=zs.NestedError=void 0;var U5=class extends Error{inner;id;constructor(e,n,r){super(e),this.inner=r,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};zs.NestedError=U5;var lT=class extends U5{};zs.DatabaseError=lT;var iT=class extends U5{};zs.DataError=iT});var cT=C(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.getArrayIndicies=Nl.validateArrayIndex=Nl.validateArrayIndicies=Nl.isInt=Nl.ArrayInfo=Nl.arrayRegex=void 0;var pf=C4(),bEe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Nl.arrayRegex=bEe;var sT={},aT=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,oT(r))this.index=parseInt(r);else if(!this.append)throw new pf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(sT[e])return sT[e];let r=(0,Nl.arrayRegex)().exec(e.trim());if(r!=null){let l=r[1],i="["+r[2].toString()+"]",s=uT(i);return $X(s),sT[e]=new t(l,s)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let l=n?e:e[this.property];return l.length===0?0:l.length-1}return r}getData(e){if(this.append)throw new pf.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(l=>{l!==""&&(l=+l,l===-1&&(l=r.length-1),r=r[+l])}),r.push(n)}else{let{index:r,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);r===-1?l.push(n):l[r]=n}}delete(e){if(this.append)throw new pf.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let l=0;l<this.indicies.length-1;l++){let i=+this.indicies[l];i===-1&&(i=r.length-1),r=r[i]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};Nl.ArrayInfo=aT;function oT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Nl.isInt=oT;function $X(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}Nl.validateArrayIndicies=$X;function jX(t){if(t.length!==0&&!oT(t))throw new pf.DataError("Only numerical values accepted for array index",200)}Nl.validateArrayIndex=jX;function uT(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));jX(e);let n=e.length+2;return[e,...uT(t.substring(n))]}Nl.getArrayIndicies=uT});var HX=C(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.DBParentData=void 0;var UX=cT(),BX=C4(),fT=class{parent;data;db;dataPath;constructor(e,n,r,l){this.parent=l,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=UX.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new BX.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=UX.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new BX.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};df.DBParentData=fT});var VX=C((GPe,qX)=>{qX.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var c=null;a.hasOwnProperty("scope")&&(c=a.scope);var f=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var p=!1;if(o.queue.push(function(){!p&&o.readers>=0&&(p=!0,o.queue.shift(),o.readers++,s.call(c,f),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){p||(p=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,f)}function n(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var c=null;a.hasOwnProperty("scope")&&(c=a.scope);var f=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var p=!1;if(o.queue.push(function(){p|| Line truncated
`:t(e.children):O9(e)?t(e.children):Pi(e)?e.data:""},textContent:Yu,innerText:C9,getChildren:H9,getParent:_j,getSiblings:Ej,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:T_,prevElementSibling:S_,removeElement:Ua,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let l=r.children;l[l.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){Ua(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){Ua(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let l=n.children;l.splice(l.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){Ua(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){Ua(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:v9,find:x_,findOneChild:function(t,e){return e.find(t)},findOne:Wv,existsOne:function t(e,n){return n.some(r=>ot(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],l=[0];;)if(l[0]>=r[0].length){if(r.length===1)return n;r.shift(),l.shift()}else{let i=r[0][l[0]++];ot(i)&&(t(i)&&n.push(i),0<i.children.length)&&(l.unshift(0),r.unshift(i.children))}},testElement:function(t,e){return!(t=n$(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=n$(t))?v9(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),Wv(bj("id",t),e,n)},getElementsByTagName:Vu,getElementsByTagType:function(t,e,n=!0,r=1/0){return v9(k9.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return A2},compareDocumentPosition:Tj,uniqueSort:Ju,getFeed:function(t){return(t=c9(C7e,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Vu("entry",e=e.children).map(l=>{var i={media:r$(l=l.children)},s=(Bl(i,"id","id",l),Bl(i,"title","title",l),(s=c9("link",l))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=os("summary",l)||os("content",l))&&(i.description=s),(s=os("updated",l))&&(i.pubDate=new Date(s)),i})},r=(Bl(n,"id","id",e),Bl(n,"title","title",e),(r=c9("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),Bl(n,"description","subtitle",e),(r=os("updated",e))&&(n.updated=new Date(r)),Bl(n,"author","email",e,!0),n}:function(r){var n=(n=(n=c9("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Vu("item",r.children).map(i=>{var s={media:r$(i=i.children)};return Bl(s,"id","guid",i),Bl(s,"title","title",i),Bl(s,"link","link",i),Bl(s,"description","description",i),(i=os("pubDate",i)||os("dc:date",i))&&(s.pubDate=new Date(i)),s})},l=(Bl(r,"title","title",n),Bl(r,"link","link",n),Bl(r,"description","description",n),os("lastBuildDate",n));return l&&(r.updated=new Date(l)),Bl(r,"author","managingEditor",n,!0),r})(t):null}}),zu=function(){return(zu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};function Sj(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function k7e(t,e){return Sj(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,zu(zu(zu({},b_),this==null?void 0:this._options),zv(e??{})))}function P7e(t){return Sj(this,t,zu(zu({},this._options),{xmlMode:!0}))}function Q0(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=Yu(e[r]);return n}function D7e(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,b_,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function L7e(){return this(this._root)}function xj(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function F7e(t,e){if(l$(t)&&l$(e)){for(var n=t.length,r=+e.length,l=0;l<r;l++)t[n++]=e[l];return t.length=n,t}}function l$(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Ba,M7e=Object.freeze({__proto__:null,html:k7e,xml:P7e,text:Q0,parseHTML:D7e,root:L7e,contains:xj,merge:F7e});function ki(t){return t.cheerio!=null}function Zn(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function Av(e){var e="length"in e?Array.prototype.map.call(e,function(r){return N9(r,!0)}):[N9(e,!0)],n=new w3(e);return e.forEach(function(r){r.parent=n}),e}function Kv(t){var e, Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Z$={};function ej(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function Cv(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var ov=(t,e,n,r,l)=>{let i=l(e,Cv(n),r);return i===St.trueFunc?t:i===St.falseFunc?St.falseFunc:s=>i(s)&&t(s)},uv={is:ov,matches:ov,where:ov,not(t,e,n,r,l){let i=l(e,Cv(n),r);return i===St.falseFunc?t:i===St.trueFunc?St.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,r,l){let i=n.adapter,s=Cv(n),a=(s.relativeSelector=!0,e.some(c=>c.some(Nv))?[Z$]:void 0),o=l(e,s,a);if(o===St.falseFunc)return St.falseFunc;let f=function(c,p){return c===St.falseFunc?St.falseFunc:m=>p.isTag(m)&&c(m)}(o,i);if(a&&o!==St.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var m=i.getChildren(h),h=c?[...m,...ej(h,i)]:m;return i.existsOne(f,h)}}return c=>t(c)&&i.existsOne(f,i.getChildren(c))}};function cv(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function l7e(t,e,n,r,l){let{adapter:i,equals:s}=n;switch(e.type){case Qe.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Qe.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Qe.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),e7e[e.action](t,e,n);case Qe.Pseudo:return function(a,o,f,c,p){let{name:m,data:h}=o;if(Array.isArray(h)){if(m in uv)return uv[m](a,h,f,c,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(o=f.pseudos)==null?void 0:o[m],_=typeof g=="string"?g:r7e[m];if(typeof _=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=O9(_);return uv.is(a,S,f,c,p)}if(typeof g=="function")return jM(g,m,h,1),S=>g(S,h)&&a(S);if(m in Iv)return Iv[m](a,h,f,c);if(m in $M){let S=$M[m];return jM(S,m,h,2),T=>S(T,f,h)&&a(T)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,l);case Qe.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return i.getName(o)===a&&t(o)}}case Qe.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let f=o;for(;f=cv(f,i);)if(t(f))return!0;return!1};let a=new WeakSet;return function(o){let f=o;for(;f=cv(f,i);)if(!a.has(f)){if(i.isTag(f)&&t(f))return!0;a.add(f)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=cv(o,i));return!1};case Qe.Parent:return function(a){return i.getChildren(a).some(o=>i.isTag(o)&&t(o))};case Qe.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case Qe.Sibling:return function(a){var o=i.getSiblings(a);for(let c=0;c<o.length;c++){var f=o[c];if(s(a,f))break;if(i.isTag(f)&&t(f))return!0}return!1};case Qe.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var o=i.getSiblings(a);let f;for(let p=0;p<o.length;p++){var c=o[p];if(s(a,c))break;i.isTag(c)&&(f=c)}return!!f&&t(f)};case Qe.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function tj(t){return t.type===Qe.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(tj)))}var i7e={type:Qe.Descendant},s7e={type:"_flexibleDescendant"},a7e={type:Qe.Pseudo,name:"scope",data:null};function nj(t,e,n){t.forEach(J9e),n=(s=e.context)!=null?s:n;let r=Array.isArray(n),l=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},f){var c=!(f==null||!f.every(p=>{var m=o.isTag(p)&&o.getParent(p);return p===Z$||m&&o.isTag(m)}));for(let p of a){if(!(0<p.length&&Nv(p[0])&&p[0].type!==Qe.Descendant)){if(!c||p.some(tj))continue;p.unshift(i7e)}p.unshift(a7e)}})(t,e,l);else if(t.some(a=>0<a.length&&Nv(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[o,f]=a;o.type===Qe.Pseudo&&o.name==="scope"&&(r&&f.type===Qe.D Line truncated
`)}}):{name:r,value:l.replace(BM,`\r
`)}}).toArray()}}),w0=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},u_=(w0.prototype.cheerio="[cheerio object]",w0.prototype.splice=Array.prototype.splice,w0.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(w0.prototype,V9e,A7e,C7e,k7e,D7e),function(t,e){return(u_=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}))(t,e)}),L7e=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}u_(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},R0=function(){return(R0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)},F7e=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ln="\uFFFD",HM=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(P=P||{}),"--"),qM="[CDATA[",VM="doctype",Au="script",M7e="public",$7e="system";function mj(t){return 55296<=t&&t<=57343}function gj(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function yj(t){return 64976<=t&&t<=65007||F7e.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&($+=" "),this.message=$+(this.message||""),this.firstUpdate=!1,this},b}function f(T){return n.toString.call(T)==="[object Function]"}function c(T){return n.toString.call(T)==="[object Array]"}function p(T){return n.toString.call(T)==="[object String]"}function m(T){return n.toString.call(T)==="[object Object]"}function h(T){var x=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(T);return function(v){for(var b=v,w=0;w<x.length;w++){var N=x[w];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function _(T,x,v){return Array.prototype.indexOf.call(T||[],x,v)}function S(T){var x,v=[];for(x in T)s(T,x)&&v.push(x);return v}i.hasOwnProp=s,i._prettifyError=function(T,x,v){return(v=v.Update?v:new i.TemplateError(v)).Update(T),x||(T=v,(v=new Error(T.message)).name=T.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),i.TemplateError=o,i.escape=function(T){return T.replace(l,a)},i.isFunction=f,i.isArray=c,i.isString=p,i.isObject=m,i.getAttrGetter=h,i.groupBy=function(T,x,v){for(var b={},w=f(x)?x:h(x),N=0;N<T.length;N++){var O=T[N],k=w(O,N);if(k===void 0&&v===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(O)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var v=T.length,b=g(arguments).slice(1),w=-1;++w<v;)_(b,T[w])===-1&&x.push(T[w]);return x},i.repeat=function(T,x){for(var v="",b=0;b<x;b++)v+=T;return v},i.each=function(T,x,v){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,v);else if(T.length===+T.length)for(var b=0,w=T.length;b<w;b++)x.call(v,T[b],b,T)}},i.map=function(T,x){var v=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)v[v.length]=x(T[b],b);T.length===+T.length&&(v.length=T.length)}return v},i.asyncIter=function(T,x,v){var b=-1;(function w(){++b<T.length?x(T[b],b,w,v):v()})()},i.asyncFor=function(T,x,v){var b=S(T||{}),w=b.length,N=-1;(function O(){var k=b[++N];N<w?x(k,T[k],N,w,O):v()})()},i.indexOf=_,i.keys=S,i._entries=function(T){return S(T).map(function(x){return[x,T[x]]})},i._values=function(T){return S(T).map(function(x){return T[x]})},i._assign=i.extend=function(T,x){return T=T||{},S(x).forEach(function(v){T[v]=x[v]}),T},i.inOperator=function(T,x){if(c(x)||p(x))return x.indexOf(T)!==-1;if(m(x))return T in x;throw new Error('Cannot use "in" operator to search for "'+T+'" in unexpected types.')}});function Hj(){throw new Error("setTimeout has not been defined")}function qj(){throw new Error("clearTimeout has not been defined")}var as=Hj,os=qj;function Vj(t){if(as===setTimeout)return setTimeout(t,0);if((as===Hj||!as)&&setTimeout)return(as=setTimeout)(t,0);try{return as(t,0)}catch{try{return as.call(null,t,0)}catch{return as.call(this,t,0)}}}typeof _3.setTimeout=="function"&&(as=setTimeout),typeof _3.clearTimeout=="function"&&(os=clearTimeout);var ja,b3=[],Bu=!1,o9=-1;function Lfe(){Bu&&ja&&(Bu=!1,ja.length?b3=ja.concat(b3):o9=-1,b3.length)&&zj()}function zj(){if(!Bu){var t=Vj(Lfe);Bu=!0;for(var e=b3.length;e;){for(ja=b3,b3=[];++o9<e;)ja&&ja[o9].run();o9=-1,e=b3.length}ja=null,Bu=!1,function(n){if(os===clearTimeout)return clearTimeout(n);if((os===qj||!os)&&clearTimeout)return(os=clearTimeout)(n);try{os(n)}catch{try{return os.call(null,n)}catch{return os.call(this,n)}}}(t)}}function Gj(t,e){this.fun=t,this.array=e}function Ga(){}Gj.prototype.run=function(){this.fun.apply(null,this.array)};var Ffe=Ga,Mfe=Ga,$fe=Ga,jfe=Ga,Ufe=Ga,Bfe=Ga,Hfe=Ga,Cu=_3.performance||{},qfe=Cu.now||Cu.mozNow||Cu.msNow||Cu.oNow||Cu.webkitNow||function(){return new Date().getTime()},Vfe=new Date,hs={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];b3.push(new Gj(t,e)),b3.length!==1||Bu||Vj(zj)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ffe,addListener:Mfe,once:$fe,off:jfe,removeListener:Ufe,removeAllListeners:Bfe,emit:Hfe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*qfe.call(Cu),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Vfe)/1e3}};function us(){}function yn(){yn.init.call(this)}function Xj(t){return t._maxListeners===void 0?yn.defaultMaxListeners:t._maxListeners}function E$(t,e,n,r){var l,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(l=t._events)?(l.newListener&&(t.emit("newListener",e,n.listener||n),l=t._events),i=l[e]):(l=t._events=new us,t._eventsCount=0),i?(typeof i=="function"?i=l[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),!i.warned&&(r=Xj(t))&&0<r&&i.length>r&&(i.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,w$="()[]{}%*-+~/#,:|.<>=!",Qj="string",Zj="whitespace",eU="data",tU="block-start",nU="block-end",rU="variable-start",lU="variable-end",iU="comment",sU="left-paren",aU="right-paren",oU="left-bracket",uU="right-bracket",cU="left-curly",fU="right-curly",pU="operator",dU="comma",hU="colon",mU="tilde",gU="pipe",yU="float",vU="boolean",Kv="none",_U="symbol",EU="regex";function Al(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Yfe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var l=this.current();if(this.isFinished())return null;if(l==='"'||l==="'")return Al(Qj,this._parseString(l),n,r);if(h=this._extract(A$))return Al(Zj,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((l=this.current())===`
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Nj={};function Ij(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function Zv(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var Iv=(t,e,n,r,l)=>{let i=l(e,Zv(n),r);return i===At.trueFunc?t:i===At.falseFunc?At.falseFunc:s=>i(s)&&t(s)},Cv={is:Iv,matches:Iv,where:Iv,not(t,e,n,r,l){let i=l(e,Zv(n),r);return i===At.falseFunc?t:i===At.trueFunc?At.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,r,l){let i=n.adapter,s=Zv(n),a=(s.relativeSelector=!0,e.some(f=>f.some(Jv))?[Nj]:void 0),o=l(e,s,a);if(o===At.falseFunc)return At.falseFunc;let c=function(f,p){return f===At.falseFunc?At.falseFunc:m=>p.isTag(m)&&f(m)}(o,i);if(a&&o!==At.trueFunc){let{shouldTestNextSiblings:f=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var m=i.getChildren(h),h=f?[...m,...Ij(h,i)]:m;return i.existsOne(c,h)}}return f=>t(f)&&i.existsOne(c,i.getChildren(f))}};function kv(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function Z7e(t,e,n,r,l){let{adapter:i,equals:s}=n;switch(e.type){case et.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case et.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case et.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),K7e[e.action](t,e,n);case et.Pseudo:return function(a,o,c,f,p){let{name:m,data:h}=o;if(Array.isArray(h)){if(m in Cv)return Cv[m](a,h,c,f,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(o=c.pseudos)==null?void 0:o[m],_=typeof g=="string"?g:Q7e[m];if(typeof _=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=V9(_);return Cv.is(a,S,c,f,p)}if(typeof g=="function")return m$(g,m,h,1),S=>g(S,h)&&a(S);if(m in Qv)return Qv[m](a,h,c,f);if(m in h$){let S=h$[m];return m$(S,m,h,2),T=>S(T,c,h)&&a(T)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,l);case et.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return i.getName(o)===a&&t(o)}}case et.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let c=o;for(;c=kv(c,i);)if(t(c))return!0;return!1};let a=new WeakSet;return function(o){let c=o;for(;c=kv(c,i);)if(!a.has(c)){if(i.isTag(c)&&t(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=kv(o,i));return!1};case et.Parent:return function(a){return i.getChildren(a).some(o=>i.isTag(o)&&t(o))};case et.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case et.Sibling:return function(a){var o=i.getSiblings(a);for(let f=0;f<o.length;f++){var c=o[f];if(s(a,c))break;if(i.isTag(c)&&t(c))return!0}return!1};case et.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var o=i.getSiblings(a);let c;for(let p=0;p<o.length;p++){var f=o[p];if(s(a,f))break;i.isTag(f)&&(c=f)}return!!c&&t(c)};case et.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function Cj(t){return t.type===et.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(Cj)))}var efe={type:et.Descendant},tfe={type:"_flexibleDescendant"},nfe={type:et.Pseudo,name:"scope",data:null};function kj(t,e,n){t.forEach(G7e),n=(s=e.context)!=null?s:n;let r=Array.isArray(n),l=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},c){var f=!(c==null||!c.every(p=>{var m=o.isTag(p)&&o.getParent(p);return p===Nj||m&&o.isTag(m)}));for(let p of a){if(!(0<p.length&&Jv(p[0])&&p[0].type!==et.Descendant)){if(!f||p.some(Cj))continue;p.unshift(efe)}p.unshift(nfe)}})(t,e,l);else if(t.some(a=>0<a.length&&Jv(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[o,c]=a;o.type===et.Pseudo&&o.name==="scope"&&(r&&c.type===et.D Line truncated
`)}}):{name:r,value:l.replace(y$,`\r
`)}}).toArray()}}),F0=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},C_=(F0.prototype.cheerio="[cheerio object]",F0.prototype.splice=Array.prototype.splice,F0.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(F0.prototype,j7e,Efe,wfe,Rfe,Nfe),function(t,e){return(C_=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}))(t,e)}),Ife=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}C_(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},M0=function(){return(M0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)},Cfe=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),$n="\uFFFD",v$=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(P=P||{}),"--"),_$="[CDATA[",E$="doctype",ku="script",kfe="public",Pfe="system";function zj(t){return 55296<=t&&t<=57343}function Gj(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function Xj(t){return 64976<=t&&t<=65007||Cfe.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(j+=" "),this.message=j+(this.message||""),this.firstUpdate=!1,this},b}function c(T){return n.toString.call(T)==="[object Function]"}function f(T){return n.toString.call(T)==="[object Array]"}function p(T){return n.toString.call(T)==="[object String]"}function m(T){return n.toString.call(T)==="[object Object]"}function h(T){var x=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(T);return function(v){for(var b=v,w=0;w<x.length;w++){var N=x[w];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function _(T,x,v){return Array.prototype.indexOf.call(T||[],x,v)}function S(T){var x,v=[];for(x in T)s(T,x)&&v.push(x);return v}i.hasOwnProp=s,i._prettifyError=function(T,x,v){return(v=v.Update?v:new i.TemplateError(v)).Update(T),x||(T=v,(v=new Error(T.message)).name=T.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),i.TemplateError=o,i.escape=function(T){return T.replace(l,a)},i.isFunction=c,i.isArray=f,i.isString=p,i.isObject=m,i.getAttrGetter=h,i.groupBy=function(T,x,v){for(var b={},w=c(x)?x:h(x),N=0;N<T.length;N++){var O=T[N],k=w(O,N);if(k===void 0&&v===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(O)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var v=T.length,b=g(arguments).slice(1),w=-1;++w<v;)_(b,T[w])===-1&&x.push(T[w]);return x},i.repeat=function(T,x){for(var v="",b=0;b<x;b++)v+=T;return v},i.each=function(T,x,v){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,v);else if(T.length===+T.length)for(var b=0,w=T.length;b<w;b++)x.call(v,T[b],b,T)}},i.map=function(T,x){var v=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)v[v.length]=x(T[b],b);T.length===+T.length&&(v.length=T.length)}return v},i.asyncIter=function(T,x,v){var b=-1;(function w(){++b<T.length?x(T[b],b,w,v):v()})()},i.asyncFor=function(T,x,v){var b=S(T||{}),w=b.length,N=-1;(function O(){var k=b[++N];N<w?x(k,T[k],N,w,O):v()})()},i.indexOf=_,i.keys=S,i._entries=function(T){return S(T).map(function(x){return[x,T[x]]})},i._values=function(T){return S(T).map(function(x){return T[x]})},i._assign=i.extend=function(T,x){return T=T||{},S(x).forEach(function(v){T[v]=x[v]}),T},i.inOperator=function(T,x){if(f(x)||p(x))return x.indexOf(T)!==-1;if(m(x))return T in x;throw new Error('Cannot use "in" operator to search for "'+T+'" in unexpected types.')}});function vU(){throw new Error("setTimeout has not been defined")}function _U(){throw new Error("clearTimeout has not been defined")}var fs=vU,ps=_U;function EU(t){if(fs===setTimeout)return setTimeout(t,0);if((fs===vU||!fs)&&setTimeout)return(fs=setTimeout)(t,0);try{return fs(t,0)}catch{try{return fs.call(null,t,0)}catch{return fs.call(this,t,0)}}}typeof S3.setTimeout=="function"&&(fs=setTimeout),typeof S3.clearTimeout=="function"&&(ps=clearTimeout);var Va,A3=[],Wu=!1,x9=-1;function Ipe(){Wu&&Va&&(Wu=!1,Va.length?A3=Va.concat(A3):x9=-1,A3.length)&&bU()}function bU(){if(!Wu){var t=EU(Ipe);Wu=!0;for(var e=A3.length;e;){for(Va=A3,A3=[];++x9<e;)Va&&Va[x9].run();x9=-1,e=A3.length}Va=null,Wu=!1,function(n){if(ps===clearTimeout)return clearTimeout(n);if((ps===_U||!ps)&&clearTimeout)return(ps=clearTimeout)(n);try{ps(n)}catch{try{return ps.call(null,n)}catch{return ps.call(this,n)}}}(t)}}function TU(t,e){this.fun=t,this.array=e}function Ya(){}TU.prototype.run=function(){this.fun.apply(null,this.array)};var Cpe=Ya,kpe=Ya,Ppe=Ya,Dpe=Ya,Lpe=Ya,Fpe=Ya,Mpe=Ya,$u=S3.performance||{},$pe=$u.now||$u.mozNow||$u.msNow||$u.oNow||$u.webkitNow||function(){return new Date().getTime()},jpe=new Date,vs={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];A3.push(new TU(t,e)),A3.length!==1||Wu||EU(bU)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Cpe,addListener:kpe,once:Ppe,off:Dpe,removeListener:Lpe,removeAllListeners:Fpe,emit:Mpe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*$pe.call($u),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-jpe)/1e3}};function ds(){}function En(){En.init.call(this)}function SU(t){return t._maxListeners===void 0?En.defaultMaxListeners:t._maxListeners}function Y$(t,e,n,r){var l,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(l=t._events)?(l.newListener&&(t.emit("newListener",e,n.listener||n),l=t._events),i=l[e]):(l=t._events=new ds,t._eventsCount=0),i?(typeof i=="function"?i=l[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),!i.warned&&(r=SU(t))&&0<r&&i.length>r&&(i.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,nj="()[]{}%*-+~/#,:|.<>=!",OU="string",NU="whitespace",IU="data",CU="block-start",kU="block-end",PU="variable-start",DU="variable-end",LU="comment",FU="left-paren",MU="right-paren",$U="left-bracket",jU="right-bracket",UU="left-curly",BU="right-curly",HU="operator",qU="comma",VU="colon",zU="tilde",GU="pipe",XU="float",WU="boolean",y_="none",KU="symbol",YU="regex";function Rl(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var zpe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var l=this.current();if(this.isFinished())return null;if(l==='"'||l==="'")return Rl(OU,this._parseString(l),n,r);if(h=this._extract(tj))return Rl(NU,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((l=this.current())===`
`?this.forward():l==="\r"&&(this.forward(),(l=this.current())===`
`?this.forward():this.back())),Al(nU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,Al(lU,h,n,r);if(l==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return Al(EU,{body:i,flags:a},n,r)}if(w$.indexOf(l)!==-1){this.forward();var o,f=["==","===","!=","!==","<=",">=","//","**"],c=l+this.current();switch(ke.indexOf(f,c)!==-1&&(this.forward(),ke.indexOf(f,(l=c)+this.current())!==-1)&&(l=c+this.current(),this.forward()),l){case"(":o=sU;break;case")":o=aU;break;case"[":o=oU;break;case"]":o=uU;break;case"{":o=cU;break;case"}":o=fU;break;case",":o=dU;break;case":":o=hU;break;case"~":o=mU;break;case"|":o=gU;break;default:o=pU}return Al(o,l,n,r)}if((h=this._extractUntil(A$+w$)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),f=this._extract("0123456789"),Al(yU,h+"."+f,n,r)):Al("int",h,n,r);if(h.match(/^(true|false)$/))return Al(vU,h,n,r);if(h==="none"||h==="null")return Al(Kv,h,n,r);if(h)return Al(_U,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var p,m=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(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,Al(tU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,Al(rU,h,n,r);var h="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,h=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(h+=p,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!g){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var _=h.slice(-this.colno);if(/^\s+$/.test(_)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!g)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return Al(g?iU:eU,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var l=this.current();if(l==="\\")switch(this.forward(),this.current()){case"n":r+=`
`?this.forward():this.back())),Rl(kU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,Rl(DU,h,n,r);if(l==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return Rl(YU,{body:i,flags:a},n,r)}if(nj.indexOf(l)!==-1){this.forward();var o,c=["==","===","!=","!==","<=",">=","//","**"],f=l+this.current();switch(ke.indexOf(c,f)!==-1&&(this.forward(),ke.indexOf(c,(l=f)+this.current())!==-1)&&(l=f+this.current(),this.forward()),l){case"(":o=FU;break;case")":o=MU;break;case"[":o=$U;break;case"]":o=jU;break;case"{":o=UU;break;case"}":o=BU;break;case",":o=qU;break;case":":o=VU;break;case"~":o=zU;break;case"|":o=GU;break;default:o=HU}return Rl(o,l,n,r)}if((h=this._extractUntil(tj+nj)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),Rl(XU,h+"."+c,n,r)):Rl("int",h,n,r);if(h.match(/^(true|false)$/))return Rl(WU,h,n,r);if(h==="none"||h==="null")return Rl(y_,h,n,r);if(h)return Rl(KU,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var p,m=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(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,Rl(CU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,Rl(PU,h,n,r);var h="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,h=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(h+=p,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!g){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var _=h.slice(-this.colno);if(/^\s+$/.test(_)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!g)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return Rl(g?LU:IU,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var l=this.current();if(l==="\\")switch(this.forward(),this.current()){case"n":r+=`
`;break;case"t":r+=" ";break;case"r":r+="\r";break;default:r+=this.current()}else r+=l;this.forward()}return this.forward(),r},e._matches=function(n){return this.index+n.length>this.len?null:this.str.slice(this.index,this.index+n.length)===n},e._extractString=function(n){return this._matches(n)?(this.forwardN(n.length),n):null},e._extractUntil=function(n){return this._extractMatching(!0,n||"")},e._extract=function(n){return this._extractMatching(!1,n)},e._extractMatching=function(n,r){if(this.isFinished())return null;var l=r.indexOf(this.current());if(n&&l===-1||!n&&l!==-1){var i=this.current();this.forward();for(var s=r.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)i+=this.current(),this.forward(),s=r.indexOf(this.current());return i}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var r=0;r<n;r++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var r=0;r<n;r++)this.back()},e.back=function(){var n;this.index--,this.current()===`
`?(this.lineno--,n=this.src.lastIndexOf(`
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Fe={lex:function(t,e){return new Yfe(t,e)},TOKEN_STRING:Qj,TOKEN_WHITESPACE:Zj,TOKEN_DATA:eU,TOKEN_BLOCK_START:tU,TOKEN_BLOCK_END:nU,TOKEN_VARIABLE_START:rU,TOKEN_VARIABLE_END:lU,TOKEN_COMMENT:iU,TOKEN_LEFT_PAREN:sU,TOKEN_RIGHT_PAREN:aU,TOKEN_LEFT_BRACKET:oU,TOKEN_RIGHT_BRACKET:uU,TOKEN_LEFT_CURLY:cU,TOKEN_RIGHT_CURLY:fU,TOKEN_OPERATOR:pU,TOKEN_COMMA:dU,TOKEN_COLON:hU,TOKEN_TILDE:mU,TOKEN_PIPE:gU,TOKEN_INT:"int",TOKEN_FLOAT:yU,TOKEN_BOOLEAN:vU,TOKEN_NONE:Kv,TOKEN_SYMBOL:_U,TOKEN_SPECIAL:"special",TOKEN_REGEX:EU};function R$(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function p_(t,e,n){return e&&R$(t.prototype,e),n&&R$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function bU(t,e){t.prototype=Object.create(e.prototype),TU(t.prototype.constructor=t,e)}function TU(t,e){return(TU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function SU(t,e,n){n=n||{},ke.keys(n).forEach(function(l){n[l]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=i,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[l],n[l])});var r=function(l){function i(){return l.apply(this,arguments)||this}return bU(i,l),p_(i,[{key:"typename",get:function(){return e}}]),i}(t);return ke._assign(r.prototype,n),r}var Jfe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),SU(this,e,n)},p_(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Qfe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return bU(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),SU(this,n,r)},p_(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(yn),Xu={Obj:Jfe,EmitterObj:Qfe};function O$(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function d_(t,e,n){return e&&O$(t.prototype,e),n&&O$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function I9(t,e){t.prototype=Object.create(e.prototype),xU(t.prototype.constructor=t,e)}function xU(t,e){return(xU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function N$(t,e,n){t instanceof e&&n.push(t),t instanceof xn&&t.findAll(e,n)}var xn=function(t){function e(){return t.apply(this,arguments)||this}I9(e,t);var n=e.prototype;return n.init=function(r,l){for(var i=arguments,s=this,a=arguments.length,o=new Array(2<a?a-2:0),f=2;f<a;f++)o[f-2]=arguments[f];this.lineno=r,this.colno=l,this.fields.forEach(function(c,p){s[c]=p=(p=i[p+2])===void 0?null:p})},n.findAll=function(r,l){var i=this;return l=l||[],this instanceof Ci?this.children.forEach(function(s){return N$(s,r,l)}):this.fields.forEach(function(s){return N$(i[s],r,l)}),l},n.iterFields=function(r){var l=this;this.fields.forEach(function(i){r(l[i],i)})},e}(Xu.Obj),h_=function(t){function e(){return t.apply(this,arguments)||this}return I9(e,t),d_(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(xn),Ci=function(t){function e(){return t.apply(this,arguments)||this}I9(e,t);var n=e.prototype;return n.init=function(r,l,i){t.prototype.init.call(this,r,l,i||[])},n.addChild=function(r){this.children.push(r)},d_(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(xn),Zfe=Ci.extend("Root"),AU=h_.extend("Literal"),epe=h_.extend("Symbol"),tpe=Ci.extend("Group"),npe=Ci.extend("Array"),rpe=xn.extend("Pair",{fields:["key","value"]}),wU=Ci.extend("Dict"),lpe=xn.extend("LookupVal",{fields:["target","val"]}),RU=xn.extend("If",{fields:["cond","body","else_"]}),ipe=RU.extend("IfAsync"),spe=xn.extend("InlineIf",{fields:["cond","body","else_"]}),m_=xn.extend("For",{fields:["arr","name","body","else_"]}),ape=m_.extend("AsyncEach"),ope=m_.extend("AsyncAll"),OU= Line truncated
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Me={lex:function(t,e){return new zpe(t,e)},TOKEN_STRING:OU,TOKEN_WHITESPACE:NU,TOKEN_DATA:IU,TOKEN_BLOCK_START:CU,TOKEN_BLOCK_END:kU,TOKEN_VARIABLE_START:PU,TOKEN_VARIABLE_END:DU,TOKEN_COMMENT:LU,TOKEN_LEFT_PAREN:FU,TOKEN_RIGHT_PAREN:MU,TOKEN_LEFT_BRACKET:$U,TOKEN_RIGHT_BRACKET:jU,TOKEN_LEFT_CURLY:UU,TOKEN_RIGHT_CURLY:BU,TOKEN_OPERATOR:HU,TOKEN_COMMA:qU,TOKEN_COLON:VU,TOKEN_TILDE:zU,TOKEN_PIPE:GU,TOKEN_INT:"int",TOKEN_FLOAT:XU,TOKEN_BOOLEAN:WU,TOKEN_NONE:y_,TOKEN_SYMBOL:KU,TOKEN_SPECIAL:"special",TOKEN_REGEX:YU};function rj(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function D_(t,e,n){return e&&rj(t.prototype,e),n&&rj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function JU(t,e){t.prototype=Object.create(e.prototype),QU(t.prototype.constructor=t,e)}function QU(t,e){return(QU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function ZU(t,e,n){n=n||{},ke.keys(n).forEach(function(l){n[l]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=i,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[l],n[l])});var r=function(l){function i(){return l.apply(this,arguments)||this}return JU(i,l),D_(i,[{key:"typename",get:function(){return e}}]),i}(t);return ke._assign(r.prototype,n),r}var Gpe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),ZU(this,e,n)},D_(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Xpe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return JU(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),ZU(this,n,r)},D_(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(En),e4={Obj:Gpe,EmitterObj:Xpe};function lj(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function L_(t,e,n){return e&&lj(t.prototype,e),n&&lj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function G9(t,e){t.prototype=Object.create(e.prototype),eB(t.prototype.constructor=t,e)}function eB(t,e){return(eB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function ij(t,e,n){t instanceof e&&n.push(t),t instanceof Rn&&t.findAll(e,n)}var Rn=function(t){function e(){return t.apply(this,arguments)||this}G9(e,t);var n=e.prototype;return n.init=function(r,l){for(var i=arguments,s=this,a=arguments.length,o=new Array(2<a?a-2:0),c=2;c<a;c++)o[c-2]=arguments[c];this.lineno=r,this.colno=l,this.fields.forEach(function(f,p){s[f]=p=(p=i[p+2])===void 0?null:p})},n.findAll=function(r,l){var i=this;return l=l||[],this instanceof Di?this.children.forEach(function(s){return ij(s,r,l)}):this.fields.forEach(function(s){return ij(i[s],r,l)}),l},n.iterFields=function(r){var l=this;this.fields.forEach(function(i){r(l[i],i)})},e}(e4.Obj),F_=function(t){function e(){return t.apply(this,arguments)||this}return G9(e,t),L_(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(Rn),Di=function(t){function e(){return t.apply(this,arguments)||this}G9(e,t);var n=e.prototype;return n.init=function(r,l,i){t.prototype.init.call(this,r,l,i||[])},n.addChild=function(r){this.children.push(r)},L_(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(Rn),Wpe=Di.extend("Root"),tB=F_.extend("Literal"),Kpe=F_.extend("Symbol"),Ype=Di.extend("Group"),Jpe=Di.extend("Array"),Qpe=Rn.extend("Pair",{fields:["key","value"]}),nB=Di.extend("Dict"),Zpe=Rn.extend("LookupVal",{fields:["target","val"]}),rB=Rn.extend("If",{fields:["cond","body","else_"]}),ede=rB.extend("IfAsync"),tde=Rn.extend("InlineIf",{fields:["cond","body","else_"]}),M_=Rn.extend("For",{fields:["arr","name","body","else_"]}),nde=M_.extend("AsyncEach"),rde=M_.extend("AsyncAll"),lB= Line truncated
`);r.forEach(function(l,i){l&&(n&&0<i||!n)&&process.stdout.write(" ".repeat(e)),i=i===r.length-1?"":`
`,process.stdout.write(l+i)})}var V={Node:xn,Root:Zfe,NodeList:Ci,Value:h_,Literal:AU,Symbol:epe,Group:tpe,Array:npe,Pair:rpe,Dict:wU,Output:bpe,Capture:Tpe,TemplateData:Spe,If:RU,IfAsync:ipe,InlineIf:spe,For:m_,AsyncEach:ape,AsyncAll:ope,Macro:OU,Caller:upe,Import:cpe,FromImport:fpe,FunCall:NU,Filter:IU,FilterAsync:ppe,KeywordArgs:dpe,Block:hpe,Super:mpe,Extends:gpe,Include:ype,Set:vpe,Switch:_pe,Case:Epe,LookupVal:lpe,BinOp:Zl,In:xpe,Is:Ape,Or:wpe,And:Rpe,Not:Ope,Add:Npe,Concat:Ipe,Sub:Cpe,Mul:kpe,Div:Ppe,FloorDiv:Dpe,Mod:Lpe,Pow:Fpe,Neg:Mpe,Pos:$pe,Compare:jpe,CompareOperand:Upe,CallExtension:Yv,CallExtensionAsync:Bpe,printNodes:function t(e,n){var r,l;n=n||0,Ru(e.typename+": ",n),e instanceof Ci?(Ru(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof Yv?(Ru(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(r=[],l=null,e.iterFields(function(i,s){i instanceof xn?r.push([s,i]):(l=l||{})[s]=i}),l?Ru(JSON.stringify(l,null,2)+`
`,null,!0):Ru(`
`),r.forEach(function(a){var s=a[0],a=a[1];Ru("["+s+"] =>",n+2),t(a,n+4)}))}};function CU(t,e){return(CU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}V.Node,V.Root,V.NodeList,V.Value,V.Literal,V.Group,V.Pair,V.Dict,V.Output,V.Capture,V.TemplateData,V.If,V.IfAsync,V.InlineIf,V.For,V.AsyncEach,V.AsyncAll,V.Macro,V.Caller,V.Import,V.FromImport,V.FunCall,V.Filter,V.FilterAsync,V.KeywordArgs,V.Block,V.Super,V.Extends,V.Include,V.Switch,V.Case,V.LookupVal,V.BinOp,V.In,V.Is,V.Or,V.And,V.Not,V.Add,V.Concat,V.Sub,V.Mul,V.Div,V.FloorDiv,V.Mod,V.Pow,V.Neg,V.Pos,V.Compare,V.CompareOperand,V.CallExtension,V.CallExtensionAsync,V.printNodes;var I$=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),CU(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(l){this.tokens=l,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(l){var i;if(this.peeked){if(l||this.peeked.type!==Fe.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!l)for(;i&&i.type===Fe.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(l){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=l},r.error=function(l,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new ke.TemplateError(l,i,s)},r.fail=function(l,i,s){throw this.error(l,i,s)},r.skip=function(l){var i=this.nextToken();return!(!i||i.type!==l)||(this.pushToken(i),!1)},r.expect=function(l){var i=this.nextToken();return i.type!==l&&this.fail("expected "+l+", got "+i.type,i.lineno,i.colno),i},r.skipValue=function(l,i){var s=this.nextToken();return!(!s||s.type!==l||s.value!==i)||(this.pushToken(s),!1)},r.skipSymbol=function(l){return this.skipValue(Fe.TOKEN_SYMBOL,l)},r.advanceAfterBlockEnd=function(l){var i;return l||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Fe.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),l=this.nextToken().value),(i=this.nextToken())&&i.type===Fe.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+l+" statement"),i},r.advanceAfterVariableEnd=function(){var l=this.nextToken();l&&l.type===Fe.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=l.value.charAt(l.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(l),this.fail("expected variable end"))},r.parseFor=function(){var l,i,s=this.peekToken();if(this.skipSymbol("for")?(l=new V.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(l=new V.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(l=new V.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),l.name=this.parsePrimary(),l.name instanceof V.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Fe.TOKEN_COMMA){var a=l.name;for(l.name=new V.Array(a.lineno,a.colno),l.name.addChild(a);this.skip(Fe.TOKEN_COMMA);){var o=this.parsePrimary();l.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),l.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),l.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),l.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),l},r.parseMacro=function(){var l=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new V.Macro(l.lineno,l.colno,s,i);return this.advanceAfterBlockEnd(l.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var l=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new V.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(l.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new V.Symbol(l.lineno,l.colno,"caller")),o=new V.Caller(l.lineno,l.colno,a,o,s);return(s=i.args.children)[s.length-1]instanceof V.KeywordArgs||s.push(new V.KeywordArgs),s[s.length-1].addChild(new V.Pair(l.lineno,l.colno,a,o)),new V.Output(l.lineno,l.colno,[i])},r.parseWithContext=function(){var l=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",l.lineno,l.colno),i},r.parseImport=function(){var l=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",l.lineno,l.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`,process.stdout.write(l+i)})}var z={Node:Rn,Root:Wpe,NodeList:Di,Value:F_,Literal:tB,Symbol:Kpe,Group:Ype,Array:Jpe,Pair:Qpe,Dict:nB,Output:gde,Capture:yde,TemplateData:vde,If:rB,IfAsync:ede,InlineIf:tde,For:M_,AsyncEach:nde,AsyncAll:rde,Macro:lB,Caller:lde,Import:ide,FromImport:sde,FunCall:iB,Filter:sB,FilterAsync:ade,KeywordArgs:ode,Block:ude,Super:cde,Extends:fde,Include:pde,Set:dde,Switch:hde,Case:mde,LookupVal:Zpe,BinOp:t2,In:_de,Is:Ede,Or:bde,And:Tde,Not:Sde,Add:xde,Concat:Ade,Sub:wde,Mul:Rde,Div:Ode,FloorDiv:Nde,Mod:Ide,Pow:Cde,Neg:kde,Pos:Pde,Compare:Dde,CompareOperand:Lde,CallExtension:v_,CallExtensionAsync:Fde,printNodes:function t(e,n){var r,l;n=n||0,Du(e.typename+": ",n),e instanceof Di?(Du(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof v_?(Du(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(r=[],l=null,e.iterFields(function(i,s){i instanceof Rn?r.push([s,i]):(l=l||{})[s]=i}),l?Du(JSON.stringify(l,null,2)+`
`,null,!0):Du(`
`),r.forEach(function(a){var s=a[0],a=a[1];Du("["+s+"] =>",n+2),t(a,n+4)}))}};function aB(t,e){return(aB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}z.Node,z.Root,z.NodeList,z.Value,z.Literal,z.Group,z.Pair,z.Dict,z.Output,z.Capture,z.TemplateData,z.If,z.IfAsync,z.InlineIf,z.For,z.AsyncEach,z.AsyncAll,z.Macro,z.Caller,z.Import,z.FromImport,z.FunCall,z.Filter,z.FilterAsync,z.KeywordArgs,z.Block,z.Super,z.Extends,z.Include,z.Switch,z.Case,z.LookupVal,z.BinOp,z.In,z.Is,z.Or,z.And,z.Not,z.Add,z.Concat,z.Sub,z.Mul,z.Div,z.FloorDiv,z.Mod,z.Pow,z.Neg,z.Pos,z.Compare,z.CompareOperand,z.CallExtension,z.CallExtensionAsync,z.printNodes;var sj=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),aB(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(l){this.tokens=l,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(l){var i;if(this.peeked){if(l||this.peeked.type!==Me.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!l)for(;i&&i.type===Me.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(l){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=l},r.error=function(l,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new ke.TemplateError(l,i,s)},r.fail=function(l,i,s){throw this.error(l,i,s)},r.skip=function(l){var i=this.nextToken();return!(!i||i.type!==l)||(this.pushToken(i),!1)},r.expect=function(l){var i=this.nextToken();return i.type!==l&&this.fail("expected "+l+", got "+i.type,i.lineno,i.colno),i},r.skipValue=function(l,i){var s=this.nextToken();return!(!s||s.type!==l||s.value!==i)||(this.pushToken(s),!1)},r.skipSymbol=function(l){return this.skipValue(Me.TOKEN_SYMBOL,l)},r.advanceAfterBlockEnd=function(l){var i;return l||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Me.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),l=this.nextToken().value),(i=this.nextToken())&&i.type===Me.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+l+" statement"),i},r.advanceAfterVariableEnd=function(){var l=this.nextToken();l&&l.type===Me.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=l.value.charAt(l.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(l),this.fail("expected variable end"))},r.parseFor=function(){var l,i,s=this.peekToken();if(this.skipSymbol("for")?(l=new z.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(l=new z.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(l=new z.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),l.name=this.parsePrimary(),l.name instanceof z.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Me.TOKEN_COMMA){var a=l.name;for(l.name=new z.Array(a.lineno,a.colno),l.name.addChild(a);this.skip(Me.TOKEN_COMMA);){var o=this.parsePrimary();l.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),l.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),l.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),l.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),l},r.parseMacro=function(){var l=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new z.Macro(l.lineno,l.colno,s,i);return this.advanceAfterBlockEnd(l.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var l=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new z.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(l.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new z.Symbol(l.lineno,l.colno,"caller")),o=new z.Caller(l.lineno,l.colno,a,o,s);return(s=i.args.children)[s.length-1]instanceof z.KeywordArgs||s.push(new z.KeywordArgs),s[s.length-1].addChild(new z.Pair(l.lineno,l.colno,a,o)),new z.Output(l.lineno,l.colno,[i])},r.parseWithContext=function(){var l=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",l.lineno,l.colno),i},r.parseImport=function(){var l=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",l.lineno,l.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},r._emitLines=function(){for(var l=this,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];s.forEach(function(o){return l._emitLine(o)})},r._emitFuncBegin=function(l,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+l.lineno+";"),this._emitLine("var colno = "+l.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(l){l||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},r._addScopeLevel=function(){this._scopeClosers+="})"},r._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},r._withScopedSyntax=function(l){var i=this._scopeClosers;this._scopeClosers="",l.call(this),this._closeScopeLevels(),this._scopeClosers=i},r._makeCallback=function(l){var i=this._tmpid();return"function("+i+(l?","+l:"")+`) {
if(`+i+") { cb("+i+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(l,i){var s=this;l.children.forEach(function(a){s.compile(a,i)})},r._compileAggregate=function(l,i,s,a){var o=this;s&&this._emit(s),l.children.forEach(function(f,c){0<c&&o._emit(","),o.compile(f,i)}),a&&this._emit(a)},r._compileExpression=function(l,i){this.assertType(l,V.Literal,V.Symbol,V.Group,V.Array,V.Dict,V.FunCall,V.Caller,V.Filter,V.LookupVal,V.Compare,V.InlineIf,V.In,V.Is,V.And,V.Or,V.Not,V.Add,V.Concat,V.Sub,V.Mul,V.Div,V.FloorDiv,V.Mod,V.Pow,V.Neg,V.Pos,V.Compare,V.NodeList),this.compile(l,i)},r.assertType=function(l){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(o){return l instanceof o})||this.fail("assertType: invalid type: "+l.typename,l.lineno,l.colno)},r.compileCallExtension=function(l,i,s){var a=this,o=l.args,f=l.contentArgs,c=typeof l.autoescape!="boolean"||l.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+l.extName+'")["'+l.prop+'"]('),this._emit("context"),(o||f)&&this._emit(","),o&&(o instanceof V.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(p,m){a._compileExpression(p,i),m===o.children.length-1&&!f.length||a._emit(",")})),f.length&&f.forEach(function(p,m){var h;0<m&&a._emit(","),p?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(p,i),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),s?(l=this._tmpid(),this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(l,i){this.compileCallExtension(l,i,!0)},r.compileNodeList=function(l,i){this._compileChildren(l,i)},r.compileLiteral=function(l){var i;typeof l.value=="string"?(i=(i=(i=(i=(i=(i=l.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):l.value===null?this._emit("null"):this._emit(l.value.toString())},r.compileSymbol=function(l,i){l=l.value,(i=i.lookup(l))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+l+'")')},r.compileGroup=function(l,i){this._compileAggregate(l,i,"(",")")},r.compileArray=function(l,i){this._compileAggregate(l,i,"[","]")},r.compileDict=function(l,i){this._compileAggregate(l,i,"{","}")},r.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof V.Symbol?s=new V.Literal(s.lineno,s.colno,s.value):s instanceof V.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},r.compileInlineIf=function(l,i){this._emit("("),this.compile(l.cond,i),this._emit("?"),this.compile(l.body,i),this._emit(":"),l.else_!==null?this.compile(l.else_,i):this._emit('""'),this._emit(")")},r.compileIn=function(l,i){this._emit("runtime.inOperator("),this.compile(l.left,i),this._emit(","),this.compile(l.right,i),this._emit(")")},r.compileIs=function(l,i){var s=(l.right.name||l.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(l.left,i),l.right.args&&(this._emit(","),this.compile(l.right.args,i)),this._emit(") === true")},r._binOpEmitter=function(l,i,s){this.compile(l.left,i),this._emit(s),this.compile(l.right,i)},r.compileOr=function(l,i){return this._binOpEmitter(l,i," || ")},r.compileAnd=function(l,i){return this._binOpEmitter(l,i," && ")},r.compileAdd=function(l,i){return this._binOpEmitter(l,i," + ")},r.compileConcat=function(l,i){return this._binOpEmitter(l,i,' + "" + ')},r.compileSub=function(l,i){return this._binOpEmitter(l,i," - ")},r.compileMul=function(l,i){return this._binOpEmitter(l,i," * ")},r.compileDiv=function(l,i){return this._binOpEmitter(l,i," / ")},r.compileMod=function(l,i){return this._binOpEmitter(l,i," % ")},r.compileNot=function(l,i){this._emit("!"),this.compile(l.target,i)},r.compileFloorDiv=function(l,i){this._emit("Math.floor("),this.compile(l.left,i),this._emit(" / "),this.compile(l.right,i),this._emit(")")},r.compilePow=function(l,i){this._emit("Math.pow("),this.compile(l.left,i),this._emit(", "),this.compile(l.right,i),this._emit(")")},r.compileNeg=function(l,i){this._emit("-"),this.compile(l.target,i)},r.compilePos=function(l,i){this._emit("+"),this.compile(l.target,i)},r.compileCompare=function(l,i){var s=this;this.compile(l.expr,i),l.ops.forEach(function(a){s._emit(" "+Kpe[a.type]+" "),s.compile(a.expr,i)})},r.compileLookupVal=function(l,i){this._emit("runtime.memberLookup(("),this._compileExpression(l.target,i),this._emit("),"),this._compileExpression(l.val,i),this._emit(")")},r._getNodeName=function(l){switch(l.typename){case"Symbol":return l.value;case"FunCall":return"the return value of ("+this._getNodeName(l.name)+")";case"LookupVal":return this._getNodeName(l.target)+'["'+this._getNodeName(l.val)+'"]';case"Literal":return l.value.toString();default:return"--expression--"}},r.compileFunCall=function(l,i){this._emit("(lineno = "+l.lineno+", colno = "+l.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(l.name,i),this._emit(', "'+this._getNodeName(l.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(l.args,i,"[","])"),this._emit(")")},r.compileFilter=function(l,i){var s=l.name;this.assertType(s,V.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emit(")")},r.compileFilterAsync=function(l,i){var s=l.name,a=l.symbol.value;this.assertType(s,V.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(l,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(l,i),this._emit(")")},r.compileSet=function(l,i){var s=this,a=[];l.targets.forEach(function(o){o=o.value,(o=i.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),l.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(l.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(l.body,i)),this._emitLine(";"),l.targets.forEach(function(o,f){o=o.value,s._emitLine('frame.set("'+o+'", '+(f=a[f])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+f+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+f+");"),s._emitLine("}"))})},r.compileSwitch=function(l,i){var s=this;this._emit("switch ("),this.compile(l.expr,i),this._emit(") {"),l.cases.forEach(fun Line truncated
if(`+i+") { cb("+i+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(l,i){var s=this;l.children.forEach(function(a){s.compile(a,i)})},r._compileAggregate=function(l,i,s,a){var o=this;s&&this._emit(s),l.children.forEach(function(c,f){0<f&&o._emit(","),o.compile(c,i)}),a&&this._emit(a)},r._compileExpression=function(l,i){this.assertType(l,z.Literal,z.Symbol,z.Group,z.Array,z.Dict,z.FunCall,z.Caller,z.Filter,z.LookupVal,z.Compare,z.InlineIf,z.In,z.Is,z.And,z.Or,z.Not,z.Add,z.Concat,z.Sub,z.Mul,z.Div,z.FloorDiv,z.Mod,z.Pow,z.Neg,z.Pos,z.Compare,z.NodeList),this.compile(l,i)},r.assertType=function(l){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(o){return l instanceof o})||this.fail("assertType: invalid type: "+l.typename,l.lineno,l.colno)},r.compileCallExtension=function(l,i,s){var a=this,o=l.args,c=l.contentArgs,f=typeof l.autoescape!="boolean"||l.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+l.extName+'")["'+l.prop+'"]('),this._emit("context"),(o||c)&&this._emit(","),o&&(o instanceof z.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(p,m){a._compileExpression(p,i),m===o.children.length-1&&!c.length||a._emit(",")})),c.length&&c.forEach(function(p,m){var h;0<m&&a._emit(","),p?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(p,i),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),s?(l=this._tmpid(),this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+f+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+f+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(l,i){this.compileCallExtension(l,i,!0)},r.compileNodeList=function(l,i){this._compileChildren(l,i)},r.compileLiteral=function(l){var i;typeof l.value=="string"?(i=(i=(i=(i=(i=(i=l.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):l.value===null?this._emit("null"):this._emit(l.value.toString())},r.compileSymbol=function(l,i){l=l.value,(i=i.lookup(l))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+l+'")')},r.compileGroup=function(l,i){this._compileAggregate(l,i,"(",")")},r.compileArray=function(l,i){this._compileAggregate(l,i,"[","]")},r.compileDict=function(l,i){this._compileAggregate(l,i,"{","}")},r.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof z.Symbol?s=new z.Literal(s.lineno,s.colno,s.value):s instanceof z.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},r.compileInlineIf=function(l,i){this._emit("("),this.compile(l.cond,i),this._emit("?"),this.compile(l.body,i),this._emit(":"),l.else_!==null?this.compile(l.else_,i):this._emit('""'),this._emit(")")},r.compileIn=function(l,i){this._emit("runtime.inOperator("),this.compile(l.left,i),this._emit(","),this.compile(l.right,i),this._emit(")")},r.compileIs=function(l,i){var s=(l.right.name||l.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(l.left,i),l.right.args&&(this._emit(","),this.compile(l.right.args,i)),this._emit(") === true")},r._binOpEmitter=function(l,i,s){this.compile(l.left,i),this._emit(s),this.compile(l.right,i)},r.compileOr=function(l,i){return this._binOpEmitter(l,i," || ")},r.compileAnd=function(l,i){return this._binOpEmitter(l,i," && ")},r.compileAdd=function(l,i){return this._binOpEmitter(l,i," + ")},r.compileConcat=function(l,i){return this._binOpEmitter(l,i,' + "" + ')},r.compileSub=function(l,i){return this._binOpEmitter(l,i," - ")},r.compileMul=function(l,i){return this._binOpEmitter(l,i," * ")},r.compileDiv=function(l,i){return this._binOpEmitter(l,i," / ")},r.compileMod=function(l,i){return this._binOpEmitter(l,i," % ")},r.compileNot=function(l,i){this._emit("!"),this.compile(l.target,i)},r.compileFloorDiv=function(l,i){this._emit("Math.floor("),this.compile(l.left,i),this._emit(" / "),this.compile(l.right,i),this._emit(")")},r.compilePow=function(l,i){this._emit("Math.pow("),this.compile(l.left,i),this._emit(", "),this.compile(l.right,i),this._emit(")")},r.compileNeg=function(l,i){this._emit("-"),this.compile(l.target,i)},r.compilePos=function(l,i){this._emit("+"),this.compile(l.target,i)},r.compileCompare=function(l,i){var s=this;this.compile(l.expr,i),l.ops.forEach(function(a){s._emit(" "+Vde[a.type]+" "),s.compile(a.expr,i)})},r.compileLookupVal=function(l,i){this._emit("runtime.memberLookup(("),this._compileExpression(l.target,i),this._emit("),"),this._compileExpression(l.val,i),this._emit(")")},r._getNodeName=function(l){switch(l.typename){case"Symbol":return l.value;case"FunCall":return"the return value of ("+this._getNodeName(l.name)+")";case"LookupVal":return this._getNodeName(l.target)+'["'+this._getNodeName(l.val)+'"]';case"Literal":return l.value.toString();default:return"--expression--"}},r.compileFunCall=function(l,i){this._emit("(lineno = "+l.lineno+", colno = "+l.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(l.name,i),this._emit(', "'+this._getNodeName(l.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(l.args,i,"[","])"),this._emit(")")},r.compileFilter=function(l,i){var s=l.name;this.assertType(s,z.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emit(")")},r.compileFilterAsync=function(l,i){var s=l.name,a=l.symbol.value;this.assertType(s,z.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(l,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(l,i),this._emit(")")},r.compileSet=function(l,i){var s=this,a=[];l.targets.forEach(function(o){o=o.value,(o=i.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),l.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(l.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(l.body,i)),this._emitLine(";"),l.targets.forEach(function(o,c){o=o.value,s._emitLine('frame.set("'+o+'", '+(c=a[c])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+c+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+c+");"),s._emitLine("}"))})},r.compileSwitch=function(l,i){var s=this;this._emit("switch ("),this.compile(l.expr,i),this._emit(") {"),l.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){a.compile(l.else_,i),s&&a._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(l,i){this._emit("(function(cb) {"),this.compileIf(l,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(l,i,s,a){var o=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(f){o._emitLine('frame.set("loop.'+f.name+'", '+f.val+");")})},r.compileFor=function(l,i){var s,a,o,f,c=this,p=this._tmpid(),m=this._tmpid(),h=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(l.arr,i),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),l.name instanceof V.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),l.name.children.forEach(function(g,_){var S=c._tmpid();c._emitLine("var "+S+" = "+h+"["+p+"]["+_+"];"),c._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+_+"]);"),i.set(l.name.children[_].value,S)}),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){c.compile(l.body,i)}),this._emitLine("}"),this._emitLine("} else {"),f=(s=l.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),i.set(f.value,a),i.set(s.value,o),this._emitLine(p+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(p+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+f.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){c.compile(l.body,i)}),this._emitLine("}")):(f=this._tmpid(),i.set(l.name.value,f),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),this._emitLine("var "+f+" = "+h+"["+p+"];"),this._emitLine('frame.set("'+l.name.value+'", '+f+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){c.compile(l.body,i)})),this._emitLine("}"),this._emitLine("}"),l.else_&&(this._emitLine("if (!"+m+") {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(l,i,s){var a,o=this,f=this._tmpid(),c=this._tmpid(),p=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(l.arr,i),this._emitLine(");"),l.name instanceof V.Array?(a=l.name.children.length,this._emit("runtime."+m+"("+p+", "+a+", function("),l.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(f+","+c+",next) {"),l.name.children.forEach(function(h){h=h.value,i.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=l.name.value,this._emitLine("runtime."+m+"("+p+", 1, function("+a+", "+f+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(l,p,f,c),this._withScopedSyntax(function(){var h;s&&(h=o._pushBuffer()),o.compile(l.body,i),o._emitLine("next("+f+(h?","+h:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),l.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(l,i){this._compileAsyncLoop(l,i)},r.compileAsyncAll=function(l,i){this._compileAsyncLoop(l,i,!0)},r._compileMacro=function(l,_){var s=this,a=[],o=null,f="macro_"+this._tmpid(),c=_!==void 0,p=(l.args.children.forEach(function(S,T){T===l.args.children.length-1&&S instanceof V.Dict?o=S:(s.assertType(S,V.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),h=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=c?_.push(!0):new yv,_=(this._emitLines("var "+f+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+h.join(", ")+"], ","function ("+p.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),g.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var T=S.key.value;s._emit('frame.set("'+T+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),s._emit(' ? kwargs["'+T+'"] : '),s._compileExpression(S.value,g),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(l.body,g)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(l,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new yv,this._emitFuncBegin(l,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(l,i),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,[]);(i=l.findAll(V.Block)).forEach(function(o,f){var c=o.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),s._emitFuncBegin(o,"b_"+c),c=new yv,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,c),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(o,f){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(l,i){var s=this["compile"+l.typename];s?s.call(this,l,i):this.fail("compile: Cannot compile node: "+l.typename,l.lineno,l.colno)},r.getCode=function(){return this.codebuf.join("")},n}(Xu.Obj),Ype={compile:function(s,e,n,r,l){var i=new k$(r,(l=l===void 0?{}:l).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return i.compile(zpe.transform(Hpe.parse(s,n,l),e,r)),i.getCode()},Compiler:k$},Jpe=lt(function(t){function e(h,g){return h==null||h===!1?g:h}function n(h){return h!=h}function r(h){var g=(h=e(h,"")).toLowerCase();return it.copySafeness(h,g.charAt(0).toUpperCase()+g.slice(1))}function l(h){if(ke.isString(h))return h.split("");if(ke.isObject(h))return ke._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(ke.isArray(h))return h;throw new ke.TemplateError("list filter: type not iterable")}function i(h){return function(g,_,S){var T=this,x=T.env.getTest(_=_===void 0?"truthy":_);return ke.toArray(g).filter(function(v){return x.call(T,v,S)===h})}}function s(h){return it.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,g,_){for(var S=[],T=[],x=0;x<h.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(h[x]);if(T.length){if(_)for(x=T.length;x<g;x++)T.push(_);S.push(T)}return S},t.capitalize=r,t.center=function(h,g){var _;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,_=ke.repeat(" ",g/2-g%2),g=ke.repeat(" ",g/2),it.copySafeness(h,_+h+g))},t.default=function(h,g,_){return _?h||g:h!==void 0?h:g},t.dictsort=function(h,g,_){if(!ke.isObject(h))throw new ke.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new ke.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(v,b){return v=v[S],b=b[S],g||(ke.isString(v)&&(v=v.toUpperCase()),ke.isString(b)&&(b=b.toUpperCase())),b<v?1:v===b?0:-1}),x},t.dump=function(h,g){return JSON.stringify(h,null,g)},t.escape=function(h){return h instanceof it.SafeString?h:it.markSafe(ke.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof it.SafeString?h:it.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return it.markSafe(ke.escape((h=h??"").toString()))},t.groupby=function(h,g){return ke.groupBy(h,g,this.env.opts.throwOnUndefined)},t.indent=function(h,x,_){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(l,i){this._emit("(function(cb) {"),this.compileIf(l,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(l,i,s,a){var o=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(c){o._emitLine('frame.set("loop.'+c.name+'", '+c.val+");")})},r.compileFor=function(l,i){var s,a,o,c,f=this,p=this._tmpid(),m=this._tmpid(),h=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(l.arr,i),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),l.name instanceof z.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),l.name.children.forEach(function(g,_){var S=f._tmpid();f._emitLine("var "+S+" = "+h+"["+p+"]["+_+"];"),f._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+_+"]);"),i.set(l.name.children[_].value,S)}),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)}),this._emitLine("}"),this._emitLine("} else {"),c=(s=l.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),i.set(c.value,a),i.set(s.value,o),this._emitLine(p+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(p+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+c.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)}),this._emitLine("}")):(c=this._tmpid(),i.set(l.name.value,c),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),this._emitLine("var "+c+" = "+h+"["+p+"];"),this._emitLine('frame.set("'+l.name.value+'", '+c+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)})),this._emitLine("}"),this._emitLine("}"),l.else_&&(this._emitLine("if (!"+m+") {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(l,i,s){var a,o=this,c=this._tmpid(),f=this._tmpid(),p=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(l.arr,i),this._emitLine(");"),l.name instanceof z.Array?(a=l.name.children.length,this._emit("runtime."+m+"("+p+", "+a+", function("),l.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(c+","+f+",next) {"),l.name.children.forEach(function(h){h=h.value,i.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=l.name.value,this._emitLine("runtime."+m+"("+p+", 1, function("+a+", "+c+", "+f+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(l,p,c,f),this._withScopedSyntax(function(){var h;s&&(h=o._pushBuffer()),o.compile(l.body,i),o._emitLine("next("+c+(h?","+h:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),l.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(l,i){this._compileAsyncLoop(l,i)},r.compileAsyncAll=function(l,i){this._compileAsyncLoop(l,i,!0)},r._compileMacro=function(l,_){var s=this,a=[],o=null,c="macro_"+this._tmpid(),f=_!==void 0,p=(l.args.children.forEach(function(S,T){T===l.args.children.length-1&&S instanceof z.Dict?o=S:(s.assertType(S,z.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),h=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=f?_.push(!0):new jv,_=(this._emitLines("var "+c+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+h.join(", ")+"], ","function ("+p.join(", ")+") {","var callerFrame = frame;","frame = "+(f?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),g.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var T=S.key.value;s._emit('frame.set("'+T+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),s._emit(' ? kwargs["'+T+'"] : '),s._compileExpression(S.value,g),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(l.body,g)}),this._emitLine("frame = "+(f?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(l,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new jv,this._emitFuncBegin(l,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(l,i),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,[]);(i=l.findAll(z.Block)).forEach(function(o,c){var f=o.name.value;if(a.indexOf(f)!==-1)throw new Error('Block "'+f+'" defined more than once.');a.push(f),s._emitFuncBegin(o,"b_"+f),f=new jv,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,f),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(o,c){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(l,i){var s=this["compile"+l.typename];s?s.call(this,l,i):this.fail("compile: Cannot compile node: "+l.typename,l.lineno,l.colno)},r.getCode=function(){return this.codebuf.join("")},n}(e4.Obj),zde={compile:function(s,e,n,r,l){var i=new oj(r,(l=l===void 0?{}:l).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return i.compile(Ude.transform(Mde.parse(s,n,l),e,r)),i.getCode()},Compiler:oj},Gde=st(function(t){function e(h,g){return h==null||h===!1?g:h}function n(h){return h!=h}function r(h){var g=(h=e(h,"")).toLowerCase();return at.copySafeness(h,g.charAt(0).toUpperCase()+g.slice(1))}function l(h){if(ke.isString(h))return h.split("");if(ke.isObject(h))return ke._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(ke.isArray(h))return h;throw new ke.TemplateError("list filter: type not iterable")}function i(h){return function(g,_,S){var T=this,x=T.env.getTest(_=_===void 0?"truthy":_);return ke.toArray(g).filter(function(v){return x.call(T,v,S)===h})}}function s(h){return at.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,g,_){for(var S=[],T=[],x=0;x<h.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(h[x]);if(T.length){if(_)for(x=T.length;x<g;x++)T.push(_);S.push(T)}return S},t.capitalize=r,t.center=function(h,g){var _;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,_=ke.repeat(" ",g/2-g%2),g=ke.repeat(" ",g/2),at.copySafeness(h,_+h+g))},t.default=function(h,g,_){return _?h||g:h!==void 0?h:g},t.dictsort=function(h,g,_){if(!ke.isObject(h))throw new ke.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new ke.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(v,b){return v=v[S],b=b[S],g||(ke.isString(v)&&(v=v.toUpperCase()),ke.isString(b)&&(b=b.toUpperCase())),b<v?1:v===b?0:-1}),x},t.dump=function(h,g){return JSON.stringify(h,null,g)},t.escape=function(h){return h instanceof at.SafeString?h:at.markSafe(ke.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof at.SafeString?h:at.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return at.markSafe(ke.escape((h=h??"").toString()))},t.groupby=function(h,g){return ke.groupBy(h,g,this.env.opts.throwOnUndefined)},t.indent=function(h,x,_){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
`),T=ke.repeat(" ",x),x=S.map(function(v,b){return b!==0||_?""+T+v:v}).join(`
`);return it.copySafeness(h,x)},t.join=function(h,g,_){return g=g||"",(h=_?ke.map(h,function(S){return S[_]}):h).join(g)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!ke.isObject(h)||h instanceof it.SafeString?h:ke.keys(h)).length:0},t.list=l,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":it.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=i(!1),t.rejectattr=function(h,g){return h.filter(function(_){return!_[g]})},t.select=i(!0),t.selectattr=function(h,g){return h.filter(function(_){return!!_[g]})},t.replace=function(h,g,_,S){var T=h;if(g instanceof RegExp)return h.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof it.SafeString))return h;if(g==="")return x=_+h.split("").join(_)+_,it.copySafeness(h,x);var v=h.indexOf(g);if(S===0||v===-1)return h;for(var b=0,w=0;-1<v&&(S===-1||w<S);)x+=h.substring(b,v)+_,b=v+g.length,w++,v=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),it.copySafeness(T,x)},t.reverse=function(h){var g;return(g=ke.isString(h)?l(h):ke.map(h,function(_){return _})).reverse(),ke.isString(h)?it.copySafeness(h,g.join("")):g},t.round=function(h,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(h*g)/g},t.slice=function(h,g,_){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],v=0,b=0;b<g;b++){var w=v+b*S;b<T&&v++,w=h.slice(w,v+(b+1)*S),_&&T<=b&&w.push(_),x.push(w)}return x},t.sum=function(h,g,_){return(_=_===void 0?0:_)+(h=g?ke.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},t.sort=it.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,_,S){var T=this,x=ke.map(x,function(b){return b}),v=ke.getAttrGetter(S);return x.sort(function(b,w){if(b=S?v(b):b,w=S?v(w):w,T.env.opts.throwOnUndefined&&S&&(b===void 0||w===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(w)&&(b=b.toLowerCase(),w=w.toLowerCase()),b<w?g?1:-1:w<b?g?-1:1:0}),x}),t.string=function(h){return it.copySafeness(h,h)},t.striptags=function(h,S){var _=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`);return at.copySafeness(h,x)},t.join=function(h,g,_){return g=g||"",(h=_?ke.map(h,function(S){return S[_]}):h).join(g)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!ke.isObject(h)||h instanceof at.SafeString?h:ke.keys(h)).length:0},t.list=l,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":at.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=i(!1),t.rejectattr=function(h,g){return h.filter(function(_){return!_[g]})},t.select=i(!0),t.selectattr=function(h,g){return h.filter(function(_){return!!_[g]})},t.replace=function(h,g,_,S){var T=h;if(g instanceof RegExp)return h.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof at.SafeString))return h;if(g==="")return x=_+h.split("").join(_)+_,at.copySafeness(h,x);var v=h.indexOf(g);if(S===0||v===-1)return h;for(var b=0,w=0;-1<v&&(S===-1||w<S);)x+=h.substring(b,v)+_,b=v+g.length,w++,v=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),at.copySafeness(T,x)},t.reverse=function(h){var g;return(g=ke.isString(h)?l(h):ke.map(h,function(_){return _})).reverse(),ke.isString(h)?at.copySafeness(h,g.join("")):g},t.round=function(h,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(h*g)/g},t.slice=function(h,g,_){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],v=0,b=0;b<g;b++){var w=v+b*S;b<T&&v++,w=h.slice(w,v+(b+1)*S),_&&T<=b&&w.push(_),x.push(w)}return x},t.sum=function(h,g,_){return(_=_===void 0?0:_)+(h=g?ke.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},t.sort=at.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,_,S){var T=this,x=ke.map(x,function(b){return b}),v=ke.getAttrGetter(S);return x.sort(function(b,w){if(b=S?v(b):b,w=S?v(w):w,T.env.opts.throwOnUndefined&&S&&(b===void 0||w===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(w)&&(b=b.toLowerCase(),w=w.toLowerCase()),b<w?g?1:-1:w<b?g?-1:1:0}),x}),t.string=function(h){return at.copySafeness(h,h)},t.striptags=function(h,S){var _=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`).replace(/\n\n\n+/g,`
`):_.replace(/\s+/gi," ");return it.copySafeness(h,S)},t.title=function(h){var g=(h=e(h,"")).split(" ").map(r);return it.copySafeness(h,g.join(" "))},t.trim=s,t.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),it.copySafeness(T,h+=S??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,c=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(h,g,_){n(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(a),v=(x=x?x[1]:T).substr(0,g);return f.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":c.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":o.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,g){return n(h=parseFloat(h))?g:h},it.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),n(h=parseInt(h,_))?g:h}));t.int=m,t.d=t.default,t.e=t.escape}),x9={};function FU(t,e){for(var n=0,r=t.length-1;0<=r;r--){var l=t[r];l==="."?t.splice(r,1):l===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Qpe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,vv=function(t){return Qpe.exec(t).slice(1)};function _v(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+FU(y_(t.split("/"),function(l){return!!l}),!e).join("/")||"."}function P$(t){var e=MU(t),n=Zpe(t,-1)==="/";return(t=(t=FU(y_(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function MU(t){return t.charAt(0)==="/"}var Hu={extname:function(t){return vv(t)[3]},basename:function(t,e){return t=vv(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=vv(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(f){for(var c=0;c<f.length&&f[c]==="";c++);for(var p=f.length-1;0<=p&&f[p]==="";p--);return p<c?[]:f.slice(c,p-c+1)}t=_v(t).substr(1),e=_v(e).substr(1);for(var r=n(t.split("/")),l=n(e.split("/")),i=Math.min(r.length,l.length),s=i,a=0;a<i;a++)if(r[a]!==l[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(l.slice(s))).join("/")},join:function(){return P$(y_(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:MU,normalize:P$,resolve:_v};function y_(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Zpe="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function $U(t,e){return($U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var v_=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),$U(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(l,i){return Hu.resolve(Hu.dirname(l),i)},r.isRelative=function(l){return l.indexOf("./")===0||l.indexOf("../")===0},n}(Xu.EmitterObj);function jU(t,e){return(jU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var ede=function(t){var e,n;function r(l){var i;return(i=t.call(this)||this).precompiled=l||{},i}return n=t,(e=r).prototype=Object.create(n.prototype),jU(e.prototype.constructor=e,n),r.prototype.getSource=function(l){return this.precompiled[l]?{src:{type:"code",obj:this.precompiled[l]},path:l}:null},r}(v_);function UU(t,e){t.prototype=Object.create(e.prototype),BU(t.prototype.constructor=t,e)}function BU(t,e){return(BU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var tde=ede,nde=function(t){function e(n,r){var l=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},l.pathsToNames={},l.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],l.searchPaths=n.map(Hu.normalize)):l.searchPaths=["."],r.watch,l}return UU(e,t),e.prototype.getSource=function(n){for(var r=null,l=this.searchPaths,i=0;i<l.length;i++){var s=Hu.resoLine truncated
`):_.replace(/\s+/gi," ");return at.copySafeness(h,S)},t.title=function(h){var g=(h=e(h,"")).split(" ").map(r);return at.copySafeness(h,g.join(" "))},t.trim=s,t.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),at.copySafeness(T,h+=S??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,c=/^https?:\/\/.*$/,f=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(h,g,_){n(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(a),v=(x=x?x[1]:T).substr(0,g);return c.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":f.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":o.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,g){return n(h=parseFloat(h))?g:h},at.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),n(h=parseInt(h,_))?g:h}));t.int=m,t.d=t.default,t.e=t.escape}),U9={};function pB(t,e){for(var n=0,r=t.length-1;0<=r;r--){var l=t[r];l==="."?t.splice(r,1):l===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Xde=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Uv=function(t){return Xde.exec(t).slice(1)};function Bv(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+pB(j_(t.split("/"),function(l){return!!l}),!e).join("/")||"."}function uj(t){var e=dB(t),n=Wde(t,-1)==="/";return(t=(t=pB(j_(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function dB(t){return t.charAt(0)==="/"}var Ku={extname:function(t){return Uv(t)[3]},basename:function(t,e){return t=Uv(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Uv(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(c){for(var f=0;f<c.length&&c[f]==="";f++);for(var p=c.length-1;0<=p&&c[p]==="";p--);return p<f?[]:c.slice(f,p-f+1)}t=Bv(t).substr(1),e=Bv(e).substr(1);for(var r=n(t.split("/")),l=n(e.split("/")),i=Math.min(r.length,l.length),s=i,a=0;a<i;a++)if(r[a]!==l[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(l.slice(s))).join("/")},join:function(){return uj(j_(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:dB,normalize:uj,resolve:Bv};function j_(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Wde="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function hB(t,e){return(hB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var U_=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),hB(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(l,i){return Ku.resolve(Ku.dirname(l),i)},r.isRelative=function(l){return l.indexOf("./")===0||l.indexOf("../")===0},n}(e4.EmitterObj);function mB(t,e){return(mB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Kde=function(t){var e,n;function r(l){var i;return(i=t.call(this)||this).precompiled=l||{},i}return n=t,(e=r).prototype=Object.create(n.prototype),mB(e.prototype.constructor=e,n),r.prototype.getSource=function(l){return this.precompiled[l]?{src:{type:"code",obj:this.precompiled[l]},path:l}:null},r}(U_);function gB(t,e){t.prototype=Object.create(e.prototype),yB(t.prototype.constructor=t,e)}function yB(t,e){return(yB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Yde=Kde,Jde=function(t){function e(n,r){var l=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},l.pathsToNames={},l.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],l.searchPaths=n.map(Ku.normalize)):l.searchPaths=["."],r.watch,l}return gB(e,t),e.prototype.getSource=function(n){for(var r=null,l=this.searchPaths,i=0;i<l.length;i++){var s=Ku.resoLine truncated
/* [wrapped with `+D+`] */
`)):R}(A,function(R,D){return gr(m,function(U){var q="_."+U[0];D&U[1]&&!N2(R,q)&&R.push(q)}),R.sort()}(function(){var R=A.match(Ol);return R?R[1].split(Pn):[]}(),y)))}function rS(u){var d=0,y=0;return function(){var A=hX(),R=16-(A-y);if(y=A,0<R){if(800<=++d)return arguments[0]}else d=0;return u.apply(n,arguments)}}function lc(u,d){var y=-1,A=u.length,R=A-1;for(d=d===n?A:d;++y<d;){var D=ff(y,R),U=u[D];u[D]=u[y],u[y]=U}return u.length=d,u}var lS=function(){var u=oc(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(nt,function(R,D,U,q){A.push(U?q.replace(Ur,"$1"):D||R)}),A},function(y){return d.size===500&&d.clear(),y}),d=u.cache;return u}();function ui(u){var d;return typeof u=="string"||Kl(u)?u:(d=u+"")=="0"&&1/u==-1/0?"-0":d}function ta(u){if(u!=null){try{return L5.call(u)}catch{}try{return u+""}catch{}}return""}function iS(u){var d;return u instanceof Pt?u.clone():((d=new C2(u.__wrapped__,u.__chain__)).__actions__=Nl(u.__actions__),d.__index__=u.__index__,d.__values__=u.__values__,d)}function sS(u,d,y){var A=u==null?0:u.length;return A?((y=y==null?0:mt(y))<0&&(y=vr(A+y,0)),ri(u,Ze(d,3),y)):-1}function aS(u,d,y){var A,R=u==null?0:u.length;return R?(A=R-1,y!==n&&(A=mt(y),A=y<0?vr(R+A,0):el(A,R-1)),ri(u,Ze(d,3),A,!0)):-1}function oS(u){return u!=null&&u.length?Hr(u,1):[]}function uS(u){return u&&u.length?u[0]:n}function u2(u){var d=u==null?0:u.length;return d?u[d-1]:n}function cS(u,d){return u&&u.length&&d&&d.length?cf(u,d):u}Q7=_t(function(u,d){return nr(u)?k4(u,Hr(d,1,nr,!0)):[]}),si=_t(function(u,d){var y=u2(d);return nr(y)&&(y=n),nr(u)?k4(u,Hr(d,1,nr,!0),Ze(y,2)):[]}),O4=_t(function(u,d){var y=u2(d);return nr(y)&&(y=n),nr(u)?k4(u,Hr(d,1,nr,!0),n,y):[]}),Mt=_t(function(u){var d=Wt(u,gf);return d.length&&d[0]===u[0]?sf(d):[]}),ho=_t(function(u){var d=u2(u),y=Wt(u,gf);return d===u2(y)?d=n:y.pop(),y.length&&y[0]===u[0]?sf(y,Ze(d,2)):[]}),Z7=_t(function(u){var d=u2(u),y=Wt(u,gf);return(d=typeof d=="function"?d:n)&&y.pop(),y.length&&y[0]===u[0]?sf(y,n,d):[]}),tl=_t(cS);var NX=Wi(function(u,d){var y=u==null?0:u.length,A=tf(u,d);return ST(u,Wt(d,function(R){return Ki(R,y)?+R:R}).sort(PT)),A});function If(u){return u==null?u:gX.call(u)}var IX=_t(function(u){return I3(Hr(u,1,nr,!0))}),CX=_t(function(u){var d=u2(u);return nr(d)&&(d=n),I3(Hr(u,1,nr,!0),Ze(d,2))}),kX=_t(function(u){var d=typeof(d=u2(u))=="function"?d:n;return I3(Hr(u,1,nr,!0),n,d)});function Cf(u){var d;return u&&u.length?(d=0,u=Ir(u,function(y){if(nr(y))return d=vr(y.length,d),!0}),N5(d,function(y){return Wt(u,li(y))})):[]}function fS(u,d){return u&&u.length?(u=Cf(u),d==null?u:Wt(u,function(y){return Nr(d,n,y)})):[]}var PX=_t(function(u,d){return nr(u)?k4(u,d):[]}),DX=_t(function(u){return mf(Ir(u,nr))}),LX=_t(function(u){var d=u2(u);return nr(d)&&(d=n),mf(Ir(u,nr),Ze(d,2))}),FX=_t(function(u){var d=typeof(d=u2(u))=="function"?d:n;return mf(Ir(u,nr),n,d)}),MX=_t(Cf),$X=_t(function(u){var d=typeof(d=1<(d=u.length)?u[d-1]:n)=="function"?(u.pop(),d):n;return fS(u,d)});function pS(u){return(u=I(u)).__chain__=!0,u}function ic(u,d){return d(u)}var jX=Wi(function(u){function d(D){return tf(D,u)}var y=u.length,A=y?u[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof Pt&&Ki(A)?((R=R.slice(A,+A+(y?1:0))).__actions__.push({func:ic,args:[d],thisArg:n}),new C2(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(n),D})):this.thru(d)}),UX=J5(function(u,d,y){hn.call(u,y)?++u[y]:Gi(u,y,1)}),BX=jT(sS),HX=jT(aS);function dS(u,d){return(dt(u)?gr:N3)(u,Ze(d,3))}function hS(u,d){return(dt(u)?function(y,A){for(var R=y==null?0:y.length;R--&&A(y[R],R,y)!==!1;);return y}:cT)(u,Ze(d,3))}var qX=J5(function(u,d,y){hn.call(u,y)?u[y].push(d):Gi(u,y,[d])}),VX=_t(function(u,d,y){var A=-1,R=typeof d=="function",D=Il(u)?ce(u.length):[];return N3(u,function(U){D[++A]=R?Nr(d,U,y):P4(U,d,y)}),D}),zX=J5(function(u,d,y){Gi(u,y,d)});function sc(u,d){return(dt(u)?Wt:yT)(u,Ze(d,3))}var GX=J5(function(u,d,y){u[y?0:1].push(d)},function(){return[[],[]]}),XX=_t(function(u,d){var y;return u==null?[]:(1<(y=d.length)&&vl(u,d[0],d[1])?d=[]:2<y&&vl(d[0],d[1],d[2])&&(d=[d[0]]),bT(u,Hr(d,1),[]))}),ac=Pf||function(){return In.Date.now()};function mS(u,d,y){return d=y?n:d,d=u&&d==null?u.length:d,Xi(u,a,n,n,n,n,d)}function gS(u,d){var y;if(typeof d!="function")throw new s2(r);return u=mt(u),function(){return 0<--u&&(y=d.apply(this,arguments)),u<=1&&(d=n),y}}var kf=_t(function(u,d,y){var A,R=1;return y.length&&(A=qi(y,Eo(kf)),R|=s),Xi(u,R,d,y,A)}),yS=_t(function(u,d,y){var A,R=3;return y.length&&(A=qi(y,Eo(yS)),R|=s),Xi(d,R,u,y,A)});function vS(u,d,y){var A,R,D,U,q,W,ae=0,oe=!1,Te=!1,ve=!0;if(typeof u!="function")throw new s2(r);function me(Ue){var Ke=A,tt=R;return A=R=n,ae=Ue,U=u.apply(tt,Ke)}function be(Ue){var Ke=Ue-W;return W===n||d<=Ke||Ke<0||Te&&D<=Ue-ae}function Ge(){var Ue=ac();if(be(Ue))return Re(Ue);q=$4(Ge,function(Ke){var tt=d-(Ke-W);return Te?el(tt,D-(Ke-ae)):tt}(Ue))}function Re(Ue){return q=n,ve&&A?me(Ue):(A=R=n,U)}function Ne(){var Ue Line truncated
`;if(u.replace(oe,function(ve,me,be,Ge,Re,Ne){return be=be||Ge,ae+=u.slice(q,Ne).replace(fr,Wb),me&&(A=!0,ae+=`' +
__e(`+me+`) +
'`),Re&&(R=!0,ae+=`';
`+Re+`;
__p += '`),be&&(ae+=`' +
((__t = (`+be+`)) == null ? '' : __t) +
'`),q=Ne+ve.length,ve}),ae+=`';
`,W=hn.call(d,"variable")&&d.variable){if(Vn.test(W))throw new We("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
`+ae+`
`)):R}(A,function(R,D){return vr(m,function(B){var V="_."+B[0];D&B[1]&&!k2(R,V)&&R.push(V)}),R.sort()}(function(){var R=A.match(Il);return R?R[1].split(Fn):[]}(),y)))}function PS(u){var d=0,y=0;return function(){var A=uW(),R=16-(A-y);if(y=A,0<R){if(800<=++d)return arguments[0]}else d=0;return u.apply(n,arguments)}}function Ec(u,d){var y=-1,A=u.length,R=A-1;for(d=d===n?A:d;++y<d;){var D=Pf(y,R),B=u[D];u[D]=u[y],u[y]=B}return u.length=d,u}var DS=function(){var u=xc(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(lt,function(R,D,B,V){A.push(B?V.replace(Hr,"$1"):D||R)}),A},function(y){return d.size===500&&d.clear(),y}),d=u.cache;return u}();function pi(u){var d;return typeof u=="string"||Jl(u)?u:(d=u+"")=="0"&&1/u==-1/0?"-0":d}function sa(u){if(u!=null){try{return J5.call(u)}catch{}try{return u+""}catch{}}return""}function LS(u){var d;return u instanceof Ft?u.clone():((d=new D2(u.__wrapped__,u.__chain__)).__actions__=Cl(u.__actions__),d.__index__=u.__index__,d.__values__=u.__values__,d)}function FS(u,d,y){var A=u==null?0:u.length;return A?((y=y==null?0:yt(y))<0&&(y=Er(A+y,0)),si(u,tt(d,3),y)):-1}function MS(u,d,y){var A,R=u==null?0:u.length;return R?(A=R-1,y!==n&&(A=yt(y),A=y<0?Er(R+A,0):nl(A,R-1)),si(u,tt(d,3),A,!0)):-1}function $S(u){return u!=null&&u.length?Vr(u,1):[]}function jS(u){return u&&u.length?u[0]:n}function p2(u){var d=u==null?0:u.length;return d?u[d-1]:n}function US(u,d){return u&&u.length&&d&&d.length?kf(u,d):u}bf=bt(function(u,d){return lr(u)?H4(u,Vr(d,1,lr,!0)):[]}),ui=bt(function(u,d){var y=p2(d);return lr(y)&&(y=n),lr(u)?H4(u,Vr(d,1,lr,!0),tt(y,2)):[]}),$4=bt(function(u,d){var y=p2(d);return lr(y)&&(y=n),lr(u)?H4(u,Vr(d,1,lr,!0),n,y):[]}),Ut=bt(function(u){var d=Yt(u,$f);return d.length&&d[0]===u[0]?Of(d):[]}),bo=bt(function(u){var d=p2(u),y=Yt(u,$f);return d===p2(y)?d=n:y.pop(),y.length&&y[0]===u[0]?Of(y,tt(d,2)):[]}),Tf=bt(function(u){var d=p2(u),y=Yt(u,$f);return(d=typeof d=="function"?d:n)&&y.pop(),y.length&&y[0]===u[0]?Of(y,n,d):[]}),rl=bt(US);var xW=Qi(function(u,d){var y=u==null?0:u.length,A=xf(u,d);return ZT(u,Yt(d,function(R){return Zi(R,y)?+R:R}).sort(uS)),A});function Qf(u){return u==null?u:fW.call(u)}var AW=bt(function(u){return D3(Vr(u,1,lr,!0))}),wW=bt(function(u){var d=p2(u);return lr(d)&&(d=n),D3(Vr(u,1,lr,!0),tt(d,2))}),RW=bt(function(u){var d=typeof(d=p2(u))=="function"?d:n;return D3(Vr(u,1,lr,!0),n,d)});function Zf(u){var d;return u&&u.length?(d=0,u=Pr(u,function(y){if(lr(y))return d=Er(y.length,d),!0}),z5(d,function(y){return Yt(u,ai(y))})):[]}function BS(u,d){return u&&u.length?(u=Zf(u),d==null?u:Yt(u,function(y){return kr(d,n,y)})):[]}var OW=bt(function(u,d){return lr(u)?H4(u,d):[]}),NW=bt(function(u){return Mf(Pr(u,lr))}),IW=bt(function(u){var d=p2(u);return lr(d)&&(d=n),Mf(Pr(u,lr),tt(d,2))}),CW=bt(function(u){var d=typeof(d=p2(u))=="function"?d:n;return Mf(Pr(u,lr),n,d)}),kW=bt(Zf),PW=bt(function(u){var d=typeof(d=1<(d=u.length)?u[d-1]:n)=="function"?(u.pop(),d):n;return BS(u,d)});function HS(u){return(u=I(u)).__chain__=!0,u}function bc(u,d){return d(u)}var DW=Qi(function(u){function d(D){return xf(D,u)}var y=u.length,A=y?u[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof Ft&&Zi(A)?((R=R.slice(A,+A+(y?1:0))).__actions__.push({func:bc,args:[d],thisArg:n}),new D2(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(n),D})):this.thru(d)}),LW=dc(function(u,d,y){gn.call(u,y)?++u[y]:Yi(u,y,1)}),FW=mS(FS),MW=mS(MS);function qS(u,d){return(mt(u)?vr:P3)(u,tt(d,3))}function VS(u,d){return(mt(u)?function(y,A){for(var R=y==null?0:y.length;R--&&A(y[R],R,y)!==!1;);return y}:UT)(u,tt(d,3))}var $W=dc(function(u,d,y){gn.call(u,y)?u[y].push(d):Yi(u,y,[d])}),jW=bt(function(u,d,y){var A=-1,R=typeof d=="function",D=kl(u)?fe(u.length):[];return P3(u,function(B){D[++A]=R?kr(d,B,y):q4(B,d,y)}),D}),UW=dc(function(u,d,y){Yi(u,y,d)});function Tc(u,d){return(mt(u)?Yt:XT)(u,tt(d,3))}var BW=dc(function(u,d,y){u[y?0:1].push(d)},function(){return[[],[]]}),HW=bt(function(u,d){var y;return u==null?[]:(1<(y=d.length)&&El(u,d[0],d[1])?d=[]:2<y&&El(d[0],d[1],d[2])&&(d=[d[0]]),JT(u,Vr(d,1),[]))}),Sc=tp||function(){return Pn.Date.now()};function zS(u,d,y){return d=y?n:d,d=u&&d==null?u.length:d,Ji(u,a,n,n,n,n,d)}function GS(u,d){var y;if(typeof d!="function")throw new u2(r);return u=yt(u),function(){return 0<--u&&(y=d.apply(this,arguments)),u<=1&&(d=n),y}}var ep=bt(function(u,d,y){var A,R=1;return y.length&&(A=Xi(y,Ro(ep)),R|=s),Ji(u,R,d,y,A)}),XS=bt(function(u,d,y){var A,R=3;return y.length&&(A=Xi(y,Ro(XS)),R|=s),Ji(d,R,u,y,A)});function WS(u,d,y){var A,R,D,B,V,K,oe=0,ue=!1,xe=!1,_e=!0;if(typeof u!="function")throw new u2(r);function ge(Be){var Je=A,rt=R;return A=R=n,oe=Be,B=u.apply(rt,Je)}function Se(Be){var Je=Be-K;return K===n||d<=Je||Je<0||xe&&D<=Be-oe}function We(){var Be=Sc();if(Se(Be))return Oe(Be);V=W4(We,function(Je){var rt=d-(Je-K);return xe?nl(rt,D-(Je-oe)):rt}(Be))}function Oe(Be){return V=n,_e&&A?ge(Be):(A=R=n,B)}function Ie(){var Be Line truncated
`;if(u.replace(ue,function(_e,ge,Se,We,Oe,Ie){return Se=Se||We,oe+=u.slice(V,Ie).replace(dr,xT),ge&&(A=!0,oe+=`' +
__e(`+ge+`) +
'`),Oe&&(R=!0,oe+=`';
`+Oe+`;
__p += '`),Se&&(oe+=`' +
((__t = (`+Se+`)) == null ? '' : __t) +
'`),V=Ie+_e.length,_e}),oe+=`';
`,K=gn.call(d,"variable")&&d.variable){if(Wn.test(K))throw new Ye("Invalid `variable` option passed into `_.template`")}else oe=`with (obj) {
`+oe+`
}
`;if(ae=(R?ae.replace(xt,""):ae).replace(Ve,"$1").replace(Lt,"$1;"),ae="function("+(W||"obj")+`) {
`+(W?"":`obj || (obj = {});
`;if(oe=(R?oe.replace(wt,""):oe).replace(Ge,"$1").replace($t,"$1;"),oe="function("+(K||"obj")+`) {
`+(K?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ae+`return __p
}`,(oe=LS(function(){return pt(D,Te+"return "+ae).apply(n,U)})).source=ae,Ff(oe))throw oe;return oe},I.times=function(u,d){if((u=mt(u))<1||f<u)return[];var y=p,A=el(u,p);for(d=Ze(d),u-=p,A=N5(A,d);++y<u;)d(y);return A},I.toFinite=Ji,I.toInteger=mt,I.toLength=AS,I.toLower=function(u){return en(u).toLowerCase()},I.toNumber=f2,I.toSafeInteger=function(u){return u?Qs(mt(u),-9007199254740991,f):u===0?u:0},I.toString=en,I.toUpper=function(u){return en(u).toUpperCase()},I.trim=function(u,d,y){return(u=en(u))&&(y||d===n)?Hi(u):u&&(d=Wl(d))?k3(y=I2(u),I5(y,d=I2(d)),C5(y,d)+1).join(""):u},I.trimEnd=function(u,d,y){return(u=en(u))&&(y||d===n)?u.slice(0,Kb(u)+1):u&&(d=Wl(d))?k3(y=I2(u),0,C5(y,I2(d))+1).join(""):u},I.trimStart=function(u,d,y){return(u=en(u))&&(y||d===n)?u.replace(qn,""):u&&(d=Wl(d))?k3(y=I2(u),I5(y,I2(d))).join(""):u},I.truncate=function(u,R){var y,U=30,A="...",R=($n(R)&&(y="separator"in R?R.separator:y,U="length"in R?mt(R.length):U,A="omission"in R?Wl(R.omission):A),(u=en(u)).length);if((R=Xs(u)?(D=I2(u)).length:R)<=U)return u;if((R=U-co(A))<1)return A;var D,U=D?k3(D,0,R).join(""):u.slice(0,R);if(y!==n)if(D&&(R+=U.length-R),Mf(y)){if(u.slice(R).search(y)){var q,W=U;for((y=y.global?y:Ws(y.source,en(n2.exec(y))+"g")).lastIndex=0;q=y.exec(W);)var ae=q.index;U=U.slice(0,ae===n?R:ae)}}else u.indexOf(Wl(y),R)!=R&&-1<(D=U.lastIndexOf(y))&&(U=U.slice(0,D));return U+A},I.unescape=function(u){return(u=en(u))&&vn.test(u)?u.replace(Xe,sX):u},I.uniqueId=function(u){var d=++oX;return en(u)+d},I.upperCase=vW,I.upperFirst=Uf,I.each=dS,I.eachRight=hS,I.first=uS,qf(I,(Xf={},ai(I,function(u,d){hn.call(I.prototype,d)||(Xf[d]=u)}),Xf),{chain:!1}),I.VERSION="4.17.21",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),gr(["drop","take"],function(u,d){Pt.prototype[u]=function(y){y=y===n?1:vr(mt(y),0);var A=this.__filtered__&&!d?new Pt(this):this.clone();return A.__filtered__?A.__takeCount__=el(y,A.__takeCount__):A.__views__.push({size:el(y,p),type:u+(A.__dir__<0?"Right":"")}),A},Pt.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),gr(["filter","map","takeWhile"],function(u,d){var y=d+1,A=y==1||y==3;Pt.prototype[u]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:Ze(R,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),gr(["head","last"],function(u,d){var y="take"+(d?"Right":"");Pt.prototype[u]=function(){return this[y](1).value()[0]}}),gr(["initial","tail"],function(u,d){var y="drop"+(d?"":"Right");Pt.prototype[u]=function(){return this.__filtered__?new Pt(this):this[y](1)}}),Pt.prototype.compact=function(){return this.filter(kl)},Pt.prototype.find=function(u){return this.filter(u).head()},Pt.prototype.findLast=function(u){return this.reverse().find(u)},Pt.prototype.invokeMap=_t(function(u,d){return typeof u=="function"?new Pt(this):this.map(function(y){return P4(y,u,d)})}),Pt.prototype.reject=function(u){return this.filter(uc(Ze(u)))},Pt.prototype.slice=function(u,d){u=mt(u);var y=this;return y.__filtered__&&(0<u||d<0)?new Pt(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),d!==n?(d=mt(d))<0?y.dropRight(-d):y.take(d-u):y)},Pt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Pt.prototype.toArray=function(){return this.take(p)},ai(Pt.prototype,function(u,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),A=/^(?:head|last)$/.test(d),R=I[A?"take"+(d=="last"?"Right":""):d],D=A||/^find/.test(d);R&&(I.prototype[d]=function(){function U(Ge){return Ge=R.apply(I,ni([Ge],ae)),A&&Te?Ge[0]:Ge}var q,W=this.__wrapped__,ae=A?[1]:arguments,be=W instanceof Pt,ve=ae[0],oe=be||dt(W),Te=(oe&&y&&typeof ve=="function"&&ve.length!=1&&(be=oe=!1),this.__chain__),ve=!!this.__actions__.length,me=D&&!Te,be=be&&!ve;return!D&&oe?(W=be?W:new Pt(this),(q=u.apply(W,ae)).__actions__.push({func:ic,args:[U],thisArg:n}),new C2(q,Te)):me&&be?u.apply(this,ae):(q=this.thru(U),me?A?q.value()[0]:q.value():q)})}),gr(["pop","push","shift","sort","splice","unshift"],function(u){var d=D5[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",A=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var R,D=arguments;return A&&!this.__chain__?(R=this.value(),d.apply(dt(R)?R:[],D)):this[y](function(U){return d.apply(dt(U)?U:[],D)})}}),ai(Pt.prototype,function(u,d){var y,A=I[d];A&&(y=A.name+"",hn.call(go,y)||(go[y]=[]),go[y].push({name:d,func:A}))}),go[Q5(n,2).name]=[{name:"wrapper",func:n}],Pt.prototype.clone=function(){var u=new Pt(this.__wrapped__);return u.__actions__=Nl(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Nl(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Nl(this.__views__),u},Pt.prototype.reverse=function(){var u;return this.__filtered__?((u=new Pt(this)).__dir__=-1,u.__filtered__=!0):(u=this.clone()).__dir__*=-1,u},Pt.prototype.value=function(){var u=this.__wrapped__.value(),d=this.__dir__,y=dt(u),A=d<0,R=y?u.length:0,D=function(Ue,Ke,tt){for(var Dn=-1,Wn=tt.length;++Dn<Wn;){var p Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let f=Nde(o,i);f&&s.push(f)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||De("The EXTM3U tag MUST be the first line."),s}(t,e),r=Ide(n,e);return r.source=t,r}var Cde=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],kde=["#EXT-X-MEDIA"],C_=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(Cde.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(kde.some(r=>n.startsWith(r)))continue;De(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function L_(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function Pde(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function fB(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&De("IV must be a 128-bit unsigned integer"),r.push(`IV=${oB(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function Dde(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${L_(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let l of e.audio)t.push(W9(l))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let l of e.video)t.push(W9(l))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let l of e.subtitles)t.push(W9(l))}if(Ede().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let l of e.closedCaptions)t.push(W9(l))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let l=[];for(let{format:i,cpcList:s}of e.allowedCpc)l.push(`${i}:${s.join("/")}`);r.push(`ALLOWED-CPC="${l.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function W9(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function Lde(t,e,n,r,l=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let f=fB(e.key);f!==n&&(t.push(f),n=f)}if(e.map){let f=function(c){let p=[`URI="${c.uri}"`];return c.byterange&&p.push(`BYTERANGE="${R_(c.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);f!==r&&(t.push(f),r=f)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${w_(e.programDateTime)}`),e.dateRange&&t.push(function(f){let c=[`ID="${f.id}"`];f.start&&c.push(`START-DATE="${w_(f.start)}"`),f.end&&c.push(`END-DATE="${w_(f.end)}"`),f.duration&&c.push(`DURATION=${f.duration}`),f.plannedDuration&&c.push(`PLANNED-DURATION=${f.plannedDuration}`),f.classId&&c.push(`CLASS="${f.classId}"`),f.endOnNext&&c.push("END-ON-NEXT=YES");for(let p of Object.keys(f.attributes))p.startsWith("X-")?typeof f.attributes[p]=="number"?c.push(`${p}=${f.attributes[p]}`):c.push(`${p}="${f.attributes[p]}"`):p.startsWith("SCTE35-")&&c.push(`${p}=${oB(f.attributes[p])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(f,c){let p="";for(let m of c)if(m.type==="OUT")p="OUT",f.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",f.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";f.push(`#${m.tagName}${h}`)}return p}(t,e.markers)),e.parts.length>0&&(s=function(f,c){let p=!1;for(let m of c)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;h.push(`BYTERANGE-START=${g}`),_&&h.push(`BYTERANGE-LENGTH=${_}`)}f.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push( Line truncated
`)}var dB="hls_cache",o7=[],Wa={},n5={},Xa={},a7="";function Fde(t,e){if(o7.push(t),Wa[t]=e,o7.length>5){let n=o7.shift();Mde(n)}}function Mde(t){delete Wa[t],delete o7[t],new JSFile(dB+"/"+t).delete()}function $de(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=F_(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=F_(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=F_(t,n.key.uri));return e}async function hB(t,e){let n=md5X(t);if(Wa[n])return Wa[n];let r={},l=t;for(;r=await req(l,{headers:e,redirect:0}),r.headers.location;)l=r.headers.location;if(r.code==200){var i=r.content;let s=$de(l,cB(i));return Fde(n,{code:r.code,plist:s,key:n,headers:r.headers}),Wa[n]}return{}}async function mB(t,e,n){if(!Wa[t])return{};let l=Wa[t].plist.segments,i=!Xa[t];if(i){Xa[t]={};for(let c of l){let p=md5X(c.uri+c.mediaSequenceNumber.toString());Xa[t][p]={file:dB+"/"+t+"/"+p,uri:c.uri,key:p,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Xa[t]){let p=Xa[t][c];p.index>=e?p.order=p.index-e:p.order=l.length-e+p.index}i&&jde(t,5,n);let s=l[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=Xa[t][a];if(o.state==1||o.state==-1){let c=new JSFile(o.file);if(await c.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};o.state=-1}if(o.state==-1&&gB(t,o,n),o.state==0){var f=new JSProxyStream;f.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return o.read=!0,new Promise(async function(p,m){let h=new JSFile(o.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>c){var S=await h.read(_-c,c);await f.write(S),c=_}if(o.state==1||o.state<0){f.done(),await h.close(),await h.delete(),o.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:f}}}async function gB(t,e,n){if(e.state>=0||!n5[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let l=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(l.error||l.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function jde(t,e,n){a7&&a7!=t&&delete n5[a7],a7=t,n5[t]=!0;for(let r=0;r<e&&n5[t];r++)new Promise(function(l,i){(async function s(){if(!n5[t]){l();return}let a=Ae.pickBy(Xa[t],function(f){return f.state==-1}),o=Ae.minBy(Object.values(a),function(f){return f.order});if(!o){l();return}await gB(t,o,n),setTimeout(s,5)})()})}function F_(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var l=0;l<r.length;l++)r[l]!="."&&(r[l]==".."?n.pop():n.push(r[l]));return n.join("/")}function yB(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),l=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${l}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var u7=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new xi(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":ki,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,l,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),ys(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,l,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,l,i,s,a){return a.headers.location!==void 0?l?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,l,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,l,i,s))}async fetch(e,n,r,l=!1,i=!1,s=0){let a=X9(n),o=e;Ae.isEmpty(a)||(o=e+"?"+a);let f=new X0(o),c;return c=await req(f.toString(),{method:"get",headers:r,buffer:s,data:null}),c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,n,r,l,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${f},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,r,l,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(Ae.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return br(r)}async parseVodShorLine truncated
`).forEach(function(s){l=s.indexOf(":"),n=s.substring(0,l).trim().toLowerCase(),r=s.substring(l+1).trim(),!(!n||e[n]&&xye[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var SV=Symbol("internals");function d5(t){return t&&String(t).trim().toLowerCase()}function L7(t){return t===!1||t==null?t:G.isArray(t)?t.map(L7):String(t)}function Aye(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var wye=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function IE(t,e,n,r,l){if(G.isFunction(r))return r.call(this,e,n);if(l&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function Rye(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Oye(t,e){let n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(l,i,s){return this[r].call(this,e,l,i,s)},configurable:!0})})}var h4=class{constructor(e){e&&this.set(e)}set(e,n,r){let l=this;function i(a,o,f){let c=d5(o);if(!c)throw new Error("header name must be a non-empty string");let p=G.findKey(l,c);(!p||l[p]===void 0||f===!0||f===void 0&&l[p]!==!1)&&(l[p||o]=L7(a))}let s=(a,o)=>G.forEach(a,(f,c)=>i(f,c,o));return G.isPlainObject(e)||e instanceof this.constructor?s(e,n):G.isString(e)&&(e=e.trim())&&!wye(e)?s(TV(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=d5(e),e){let r=G.findKey(this,e);if(r){let l=this[r];if(!n)return l;if(n===!0)return Aye(l);if(G.isFunction(n))return n.call(this,l,r);if(G.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=d5(e),e){let r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||IE(this,this[r],r,n)))}return!1}delete(e,n){let r=this,l=!1;function i(s){if(s=d5(s),s){let a=G.findKey(r,s);a&&(!n||IE(r,r[a],a,n))&&(delete r[a],l=!0)}}return G.isArray(e)?e.forEach(i):i(e),l}clear(e){let n=Object.keys(this),r=n.length,l=!1;for(;r--;){let i=n[r];(!e||IE(this,this[i],i,e,!0))&&(delete this[i],l=!0)}return l}normalize(e){let n=this,r={};return G.forEach(this,(l,i)=>{let s=G.findKey(r,i);if(s){n[s]=L7(l),delete n[i];return}let a=e?Rye(i):String(i).trim();a!==i&&delete n[i],n[a]=L7(l),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return G.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(l=>r.set(l)),r}static accessor(e){let r=(this[SV]=this[SV]={accessors:{}}).accessors,l=this.prototype;function i(s){let a=d5(s);r[a]||(Oye(l,s),r[a]=!0)}return G.isArray(e)?e.forEach(i):i(e),this}};h4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(h4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});G.freezeMethods(h4);var wr=h4;function h5(t,e){let n=this||d4,r=e||n,l=wr.from(r.headers),i=r.data;return G.forEach(t,function(a){i=a.call(n,i,l.normalize(),e?e.status:void 0)}),l.normalize(),i}function m5(t){return!!(t&&t.__CANCEL__)}function xV(t,e,n){Le.call(this,t??"canceled",Le.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(xV,Le,{__CANCEL__:!0});var J2=xV;function Ts(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Le("Request failed with status code "+n.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function CE(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function kE(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function eo(t,e){return t&&!CE(e)?kE(t,e):e}var XV=_r(wV(),1),WV=_r(require("http"),1),KV=_r(require("https"),1),YV=_r(require("util"),1),JV=_r(PV(),1),x3=_r(require("zlib"),1);var no="1.6.7";function b5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var zye=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function zE(t,e,n){let r=n&&n.Blob||Ar.classes.Blob,l=b5(t);if(e===void 0&&r&&(e=!0),l==="data"){t=l.length?t.slice(l.length+1):t;let i=zye.exec(t);if(!i)throw new Le("Invalid URL",Le.ERR_INVALID_URL);let s=i[1],a=i[2],o=i[3],f=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Le("Blob is not supported",Le.ERR_NOT_SUPPORT);return new r([f],{type:s})}return f}throw new Le("Unsupported protocol "+l,Le.ERR_NOT_SUPPORT)}var ro=_r(require("stream"),1);var LV=_r(require("stream"),1);function Gye(t,e){let n=0,r=1e3/e,l=null;return function(s,a){let o=Date.now();if(s||o-n>r)return l&&(clearTimeout(l),l=null),n=o,t.apply(null,a);l||(l=setTimeout(()=>(l=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var DV=Gye;function Xye(t,e){t=t||10;let n=new Array(t),r=new Array(t),l=0,i=0,s;return e=e!==void 0?e:1e3,function(o){let f=Date.now(),c=r[i];s||(s=f),n[l]=o,r[l]=f;let p=i,m=0;for(;p!==l;)m+=n[p++],p=p%t;if(l=(l+1)%t,l===i&&(i=(i+1)%t),f-s<e)return;let h=c&&f-c;return h?Math.round(m*1e3/h):void 0}}var F7=Xye;var M7=Symbol("internals"),GE=class extends LV.default.Transform{constructor(e){e=G.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!G.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[M7]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},l=F7(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let i=0;r.updateProgress=DV(function(){let o=r.length,f=r.bytesSeen,c=f-i;if(!c||n.destroyed)return;let p=l(c);i=f,process.nextTick(()=>{n.emit("progress",{loaded:f,total:o,progress:o?f/o:void 0,bytes:c,rate:p||void 0,estimated:p&&o&&f<=o?(o-f)/p:void 0})})},r.ticksRate);let s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[M7];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let l=this,i=this[M7],s=i.maxRate,a=this.readableHighWaterMark,o=i.timeWindow,f=1e3/o,c=s/f,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0;function m(g,_){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),l.push(g)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let h=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=a,v,b=0;if(s){let w=Date.now();(!i.ts||(b=w-i.ts)>=o)&&(i.ts=w,v=c-i.bytes,i.bytes=v<0?-v:0,b=0),v=c-i.bytes}if(s){if(v<=0)return setTimeout(()=>{_(null,g)},o-b);v<x&&(x=v)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(_,null,T)}:_)};h(e,function g(_,S){if(_)return r(_);S?h(S,g):r(null)})}setLength(e){return this[M7].length=+e,this}},XE=GE;var QV=_r(require("events"),1);var MV=require("util"),$V=require("stream");var{asyncIterator:FV}=Symbol,Wye=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[FV]?yield*t[FV]():yield t},$7=Wye;var Kye=G.ALPHABET.ALPHA_DIGIT+"-_",T5=new MV.TextEncoder,Ss=`\r
`,Yye=T5.encode(Ss),Jye=2,WE=class{constructor(e,n){let{escapeName:r}=this.constructor,l=G.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!l&&n.name?`; filename="${r(n.name)}"`:""}${Ss}`;l?n=T5.encode(String(n).replace(/\r?\n|\r\n?/g,Ss)):i+=`Content-Type: ${n.type||"application/octet-stream"}${Ss}`,this.headers=T5.encode(i+Ss),this.contentLength=l?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+Jye,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;G.isTypedArray(e)?yield e:yield*$7(e),yield Yye}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},Qye=(t,e,n)=>{let{tag:r="form-data-boundary",size:l=25,boundary:i=r+"-"+G.generateString(l,Kye)}=n||{};if(!G.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=T5.encode("--"+i+Ss),a=T5.encode("--"+i+"--"+Ss+Ss),o=a.byteLength,f=Array.from(t.entries()).map(([p,m])=>{let h=new WE(p,m);return o+=h.size,h});o+=s.byteLength*f.length,o=G.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),$V.Readable.from(async function*(){for(let p of f)yield s,yield*p.encode();yield a}())},jV=Qye;var UV=_r(require("stream"),1),KE=class extends UV.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let l=Buffer.alloc(2);l[0]=120,l[1]=156,this.push(l,n)}this.__transform(e,n,r)}},BV=KE;var Zye=(t,e)=>G.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(l=>{try{e?r(null,...e(l)):r(null,l)}catch(i){r(i)}},r)}:t,HV=Zye;var qV={flush:x3.default.constants.Z_SYNC_FLUSH,finishFlush:x3.default.constants.Z_SYNC_FLUSH},eve={flush:x3.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:x3.default.constants.BROTLI_OPERATION_FLUSH},VV=G.isFunction(x3.default.createBrotliDecompress),{http:tve,https:nve}=JV.default,rve=/https:?/,zV=Ar.protocols.map(t=>t+":");function lve(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function ZV(t,e,n){let r=e;if(!r&&r!==!1){let l=(0,XV.getProxyForUrl)(n);l&&(r=new URL(l))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let i=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let l=r.hostname||r.host;t.hostname=l,t.host=l,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(i){ZV(i,e,i.href)}}var ive=typeof process<"u"&&G.kindOf(process)==="process",sve=t=>new Promise((e,n)=>{let r,l,i=(o,f)=>{l||(l=!0,r&&r(o,f))},s=o=>{i(o),e(o)},a=o=>{i(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),ave=({address:t,family:e})=>{if(!G.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},GV=(t,e)=>ave(G.isObject(t)?t:{address:t,family:e}),ez=ive&&function(e){return sve(async function(r,l,i){let{data:s,lookup:a,family:o}=e,{responseType:f,responseEncoding:c}=e,p=e.method.toUpperCase(),m,h=!1,g;if(a){let se=HV(a,ge=>G.isArray(ge)?ge:[ge]);a=(ge,H,re)=>{se(ge,H,(ne,ee,Fn)=>{if(ne)return re(ne);let xt=G.isArray(ee)?ee.map(Ve=>GV(Ve)):[GV(ee,Fn)];H.all?re(ne,xt):re(ne,xt[0].address,xt[0].family)})}}let _=new QV.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((se,ge)=>{m=!0,ge&&(h=!0,S())});function T(se){_.emit("abort",!se||se.type?new J2(null,e,g):se)}_.once("abort",l),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=eo(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||zV[0];if(b==="data:"){let se;if(p!=="GET")return Ts(r,l,{status:405,statusText:"method not allowed",headers:{},config:e});try{se=zE(e.url,f==="blob",{Blob:e.env&&e.env.Blob})}catch(ge){throw Le.from(ge,Le.ERR_BAD_REQUEST,e)}return f==="text"?(se=se.toString(c),(!c||c==="utf8")&&(se=G.stripBOM(se))):f==="stream"&&(se=ro.default.Readable.from(se)),Ts(r,l,{data:se,status:200,statusText:"OK",headers:new wr,config:e})}if(zV.indexOf(b)===-1)return l(new Le("Unsupported protocol "+b,Le.ERR_BAD_REQUEST,e));let w=wr.from(e.headers).normalize();w.set("User-Agent","axios/"+no,!1);let N=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,$,L;if(G.isSpecCompliantForm(s)){let se=w.getContentType(/boundary=([-_\w\d]{10,70})/i);s=jV(s,ge=>{w.set(ge)},{tag:`axios-${no}-boundary`,boundary:se&&se[1]||void 0})}else if(G.isFormData(s)&&G.isFunction(s.getHeaders)){if(w.set(s.getHeaders()),!w.hasContentLength())try{let se=await YV.default.promisify(s.getLength).call(s); Line truncated
`+i.map(iz).join(`
`):" "+iz(i[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:YE};function JE(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new J2(null,t)}function U7(t){return JE(t),t.headers=wr.from(t.headers),t.data=h5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),j7.getAdapter(t.adapter||d4.adapter)(t).then(function(r){return JE(t),r.data=h5.call(t,t.transformResponse,r),r.headers=wr.from(r.headers),r},function(r){return m5(r)||(JE(t),r&&r.response&&(r.response.data=h5.call(t,t.transformResponse,r.response),r.response.headers=wr.from(r.response.headers))),Promise.reject(r)})}var sz=t=>t instanceof wr?t.toJSON():t;function A3(t,e){e=e||{};let n={};function r(f,c,p){return G.isPlainObject(f)&&G.isPlainObject(c)?G.merge.call({caseless:p},f,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function l(f,c,p){if(G.isUndefined(c)){if(!G.isUndefined(f))return r(void 0,f,p)}else return r(f,c,p)}function i(f,c){if(!G.isUndefined(c))return r(void 0,c)}function s(f,c){if(G.isUndefined(c)){if(!G.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function a(f,c,p){if(p in e)return r(f,c);if(p in t)return r(void 0,f)}let o={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(f,c)=>l(sz(f),sz(c),!0)};return G.forEach(Object.keys(Object.assign({},t,e)),function(c){let p=o[c]||l,m=p(t[c],e[c],c);G.isUndefined(m)&&p!==a||(n[c]=m)}),n}var QE={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{QE[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var az={};QE.transitional=function(e,n,r){function l(i,s){return"[Axios v"+no+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new Le(l(s," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!az[s]&&(az[s]=!0,console.warn(l(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function cve(t,e,n){if(typeof t!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),l=r.length;for(;l-- >0;){let i=r[l],s=e[i];if(s){let a=t[i],o=a===void 0||s(a,i,t);if(o!==!0)throw new Le("option "+i+" must be "+o,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+i,Le.ERR_BAD_OPTION)}}var B7={assertOptions:cve,validators:QE};var xs=B7.validators,g4=class{constructor(e){this.defaults=e,this.interceptors={request:new wE,response:new wE}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;let i=l.stack?l.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=A3(this.defaults,n);let{transitional:r,paramsSerializer:l,headers:i}=n;r!==void 0&&B7.assertOptions(r,{silentJSONParsing:xs.transitional(xs.boolean),forcedJSONParsing:xs.transitional(xs.boolean),clarifyTimeoutError:xs.transitional(xs.boolean)},!1),l!=null&&(G.isFunction(l)?n.paramsSerializer={serialize:l}:B7.assertOptions(l,{encode:xs.function,serialize:xs.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[n.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=wr.concat(s,i);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let c,p=0,m;if(!o){let g=[U7.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,f),m=g.length,c=Promise.resolve(n);p<m;)c=c.then(g[p++],g[p++]);return c}m=a.length;let h=n;for(p=0;p<m;){let g=a[p++],_=a[p++];try{h=g(h)}catch(S){_.call(this,S);break}}try{c=U7.call(this,h)}catch(g){return Promise.reject(g)}for(p=0,m=f.length;p<m;)c=c.then(f[p++],f[p++]);return c}getUri(e){e=A3(this.defaults,e);let n=eo(e.baseURL,e.url);return Za(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){g4.prototype[e]=function(n,r){return this.request(A3(r||{},{method:e,url:n,data:(r||{}).data}))}});G.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(A3(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}g4.prototype[e]=n(),g4.prototype[e+"Form"]=n(!0)});var S5=g4;var ZE=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(l=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](l);r._listeners=null}),this.promise.then=l=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(l);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new J2(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(l){e=l}),cancel:e}}},oz=ZE;function eb(t){return function(n){return t.apply(null,n)}}function tb(t){return G.isObject(t)&&t.isAxiosError===!0}var nb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nb).forEach(([t,e])=>{nb[e]=t});var uz=nb;function cz(t){let e=new S5(t),n=c5(S5.prototype.request,e);return G.extend(n,S5.prototype,e,{allOwnKeys:!0}),G.extend(n,e,null,{allOwnKeys:!0}),n.create=function(l){return cz(A3(t,l))},n}var hr=cz(d4);hr.Axios=S5;hr.CanceledError=J2;hr.CancelToken=oz;hr.isCancel=m5;hr.VERSION=no;hr.toFormData=bs;hr.AxiosError=Le;hr.Cancel=hr.CanceledError;hr.all=function(e){return Promise.all(e)};hr.spread=eb;hr.isAxiosError=tb;hr.mergeConfig=A3;hr.AxiosHeaders=wr;hr.formToJSON=t=>D7(G.isHTMLForm(t)?new FormData(t):t);hr.getAdapter=j7.getAdapter;hr.HttpStatusCode=uz;hr.default=hr;var y4=hr;var{Axios:aIe,AxiosError:oIe,CanceledError:uIe,isCancel:cIe,CancelToken:fIe,VERSION:pIe,all:dIe,Cancel:hIe,isAxiosError:mIe,spread:gIe,toFormData:fz,AxiosHeaders:yIe,HttpStatusCode:vIe,formToJSON:_Ie,getAdapter:EIe,mergeConfig:bIe}=y4;var _z=_r(require("https"),1),Ez=_r(require("crypto"),1),bz=_r(yz(),1),ib={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await vve(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,ib)}globalThis.localLog={set:async function(t,e,n){bve(t,e,n)}};function Eve(){lo.default.existsSync("log")||lo.default.mkdirSync("log");let t="log/info.log";return lo.default.existsSync(t)?lo.default.readFileSync(t).toString():(lo.default.writeFileSync(t,""),"")}function bve(t){lo.default.writeFileSync("log/info.log",Eve()+`
`+t)}globalThis.req=Tve;async function Tve(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,l=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=vz.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=fz(n));let f=l===1||l===2?"arraybuffer":void 0,c;a?c=bz.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=_z.default.Agent({rejectUnauthorized:!1});let p=await y4(t,{responseType:f,method:e&&e.method||"get",headers:o,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:c});n=p.data;let m={};for(let h of p.headers){let g=h[1];m[h[0]]=Array.isArray(g)&&g.length===1?g[0]:g}if(!l)typeof n=="object"&&(n=JSON.stringify(n));else{if(l===1)return{code:p.status,headers:m,content:n};if(l===2)return{code:p.status,headers:m,content:n.toString("base64")};if(l===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(n.on("data",async g=>{await h.onData(g)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=Sve;function Sve(t){return Ez.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var xve=["DEBUG","INFO","WARNING","ERROR"];var _4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=xve.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://192.168.0.116:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Qn=class extends Yn{constructor(){super(),this.jadeLog=new _4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://192.168.0.116:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return Ae.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Ae.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let r=e.body.id,l=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(l),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${r},pg = ${l},extend = ${JSON.stringify(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,l,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let l=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new An,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${l}`);try{return await this.setDetail(l),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=l,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let r=e.body.flag,l=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${l},flags:${i}`,!0);try{let s;if(await this.setPlay(r,l,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.mess Line truncated
`),o=e(s).find("a"),f=[{n:"\u5168\u90E8",v:l}],c=r.toString();for(let p of o){let m=e(p).text().replaceAll(`
`,""),h=p.attribs.href;h!==void 0&&f.push({n:m,v:h})}a=a.filter(p=>p!==""),this.filterObj[l].push({key:c,name:a[0],value:f})}let i=e('[id="side-menu"]').find("li");for(let s of i){let a=e(s).find("a")[0].attribs.href;if(a!==void 0&&a.indexOf(this.siteUrl)>-1){let o={type_name:e(s).text(),type_id:a};this.classes.push(o)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]!=="1"&&(e=l[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+n.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let n=await this.getHtml(e),r=Yr(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(n,r)}async setPlay(e,n,r){this.playUrl=n,this.playHeader={}}async setSearch(e,n){let r=this.siteUrl+"search/"+encodeURIComponent(e),l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDoc(l)}async proxy(e,n){return super.proxy(e,n)}},sn=new cb;var fb=class extends Qn{constructor(){super()}getName(){return sn.getName()}getAppName(){return sn.getAppName()}getJSName(){return sn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await sn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await sn.initCookie(e.server.config.bilicookie),await sn.spiderInit(e),sn.cfgObj.code=0,sn.catOpenStatus=!0,sn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await sn.setClasses(),this.classes=sn.classes}async setFilterObj(){await sn.setFilterObj(),this.filterObj=sn.filterObj}async setHomeVod(){await sn.setHomeVod(),this.homeVodList=sn.homeVodList}async setCategory(e,n,r,l){await sn.setCategory(e,n,r,l),this.vodList=sn.vodList}async setDetail(e){await sn.setDetail(e),this.vodDetail=sn.vodDetail}async setPlay(e,n,r){await sn.setPlay(e,n,r),this.playUrl=sn.playUrl,this.result=sn.result}async setSearch(e,n,r){await sn.setSearch(e,n,r),this.vodList=sn.vodList,this.result=sn.result}async setProxy(e,n){return await sn.proxy(e,n)}},Os=new fb;async function Mz(t,e){return await Os.init(t,e)}async function $z(t,e){return await Os.home(t,e)}async function Cve(t,e){return await Os.homeVod(t,e)}async function jz(t,e){return await Os.category(t,e)}async function Uz(t,e){return await Os.detail(t,e)}async function Bz(t,e){return await Os.play(t,e)}async function Hz(t,e){return await Os.search(t,e)}async function kve(t,e){return await Os.proxy(t,e)}var qz={meta:{key:sn.getJSName(),name:sn.getName(),type:sn.getType()},api:async t=>{t.post("/init",Mz),t.post("/home",$z),t.post("/category",jz),t.post("/detail",Uz),t.post("/play",Bz),t.post("/search",Hz),t.get("/proxy/:what/:ids/:end",kve)},spider:{init:Mz,home:$z,homeVod:Cve,category:jz,detail:Uz,play:Bz,search:Hz}};var pb=class extends Yn{constructor(){super(),this.siteUrl="https://jable.tv",this.cookie=""}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getImgHeaders()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getImgHeaders())}getImgHeaders(){return{"User-Agent":"PostmanRuntime/7.37.3","Postman-Token":"c2602692-1a05-4bb0-93cd-270afad97e87",Host:"assets-cdn.jable.tv",Proxy:!0}}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"Jable"}getName(){return"\u{1F51E}\u2503Jable\u2503\u{1F51E}"}getJSName(){return"jable"}getType(){return 3}getHeader(){let e={};return e["User-Agent"]="PostmanRuntime/7.36.3",e.Host="jable.tv",e["Postman-Token"]="33290483-3c8d-413f-a160-0d3aea9e6f95",e}async getHtml(e=this.siteUrl,n=!1,r=this.getHeader()){return super.getHtml(e,!0,r)}async setClasses(){let e=await this.getHtml(this.siteUrl),n=e('[class="title-box"]'),r=e("div.row");for(let l of e(r[0]).find("a")){let i=e(l).text(),s=l.attribs.href;s.indexOf(this.siteUrl)>-1&&this.classes.push(this.getTypeDic(i,s))}n=n.slice(1,9),r=r.slice(1,9);for(let l=0;l<n.length;l++){let i=e(r[l]).find("a")[0].attribs.href;this.classes.push(this.getTypeDic("\u6807\u7B7E",i));break}}async getSortFilter(e){let n=e('[class="sorting-nav"]').find("a"),r={name:"\u6392\u5E8F",key:"sort",value:[]};for(let l of n){let i=l.attribs["data-parameters"].split("sort_by:")[1],s=e(l).text();r.value.push({n:s,v:i})}return r}async getFilter(e,n,r,l){let i=[];if(n<4){let s={name:l,key:"type",value:[]},a=["div.img-box > a",'[class="horizontal-img-box ml-3 mb-3"] > a',"","sort"],o=["div.absolute-center > h4","div.detail"],f=await this.getHtml(r);for(let c of f(a[n])){let p=c.attribs.href,m=e(e(c).find(o[n])).text().replaceAll(" ","").replaceAll(`
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let c=await this.getHtml(s.value[0].v),p=await this.getSortFilter(c);p.value.length>0&&i.push(p)}else{let c=await this.getSortFilter(f);c.value.length>0&&i.push(c)}}else{let s=e("div.row").slice(1,9),a=e('[class="title-box"]').slice(1,9);for(let c=0;c<a.length;c++){let p={name:e(e(a[c]).find("h2")).text(),key:"type",value:[]};for(let m of e(s[c]).find("a")){let h=m.attribs.href;h.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:h})}i.push(p)}let o=await this.getHtml(r),f=await this.getSortFilter(o);f.value.length>0&&i.push(f)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),n=this.classes.slice(1);for(let r=0;r<n.length;r++){let l=n[r].type_name,i=n[r].type_id,s=await this.getFilter(e,r,i,l);s.length>1&&r<4&&(i=s[0].value[0].v,this.classes[r+1]=this.getTypeDic(l,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let n=[],r=e("div.video-img-box");for(let l of r){let i=new nn,s=e(l).find("img").attr("data-src");if(s!==void 0){i.vod_pic=s;let a=e(l).find("a").attr("href");i.vod_id=a.split("/")[4],i.vod_name=a.split("/")[4];let o=e(e(l).find('[class="sub-title"]')).text().split(`
`);o.length>1?i.vod_remarks=o[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!Ae.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&n.push(i)}}return n}async parseVodDetailFromDoc(e){let n=new An,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text();let l=Yr(/<video poster="(.*?)" id=/,e.html());n.vod_pic=l,n.vod_year=e(e('[class="inactive-color"]')).text();let i=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),s=[],a=Yr(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+a);let o=[];o.push(s.join("#"));let f=["Jable"];return n.vod_play_from=f.join("$$$"),n.vod_play_url=o.join("$$$"),n}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(n)}async setCategory(e,n,r,l){let i=l.type??e,s=l.sort??"video_viewed";this.limit=24;let a;this.total=0,this.count=0,e.indexOf("latest-updates")>1?a=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${n}&_=1709730132217`:a=i+`/${n}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o);let f=o(o('[class="page-item"]').slice(-1)[0]).text();f.indexOf("\u6700\u5F8C")>-1||(parseInt(f)===this.page||Ae.isEmpty(f))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,n){let r=this.siteUrl+`/search/${e}/`,l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},an=new pb;var db=class extends Qn{constructor(){super()}getName(){return an.getName()}getAppName(){return an.getAppName()}getJSName(){return an.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await an.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await an.initCookie(e.server.config.bilicookie),await an.spiderInit(e),an.cfgObj.code=0,an.catOpenStatus=!0,an.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await an.setClasses(),this.classes=an.classes}async setFilterObj(){await an.setFilterObj(),this.filterObj=an.filterObj}async setHomeVod(){await an.setHomeVod(),this.homeVodList=an.homeVodList}async setCategory(e,n,r,l){await an.setCategory(e,n,r,l),this.vodList=an.vodList}async setDetail(e){await an.setDetail(e),this.vodDetail=an.vodDetail}async setPlay(e,n,r){await an.setPlay(e,n,r),this.playUrl=an.playUrl,this.result=an.result}async setSearch(e,n,r){await an.setSearch(e,n,r),this.vodList=an.vodList,this.result=an.result}async setProxy(e,n){return await an.proxy(e,n)}},Ns=new db;async function Vz(t,e){return await Ns.init(t,e)}async function zz(t,e){return await Ns.home(t,e)}async function Pve(t,e){return await Ns.homeVod(t,e)}async function Gz(t,e){return await Ns.category(t,e)}async function Xz(t,e){return await Ns.detail(t,e)}async function Wz(t,e){return await Ns.play(t,e)}async function Kz(t,e){return await Ns.search(t,e)}async function Dve(t,e){return await Ns.proxy(t,e)}var Yz={meta:{key:an.getJSName(),name:an.getName(),type:an.getType()},api:async t=>{t.post("/init",Vz),t.post("/home",zz),t.post("/category",Gz),t.post("/detail",Xz),t.post("/play",Wz),t.post("/search",Kz),t.get("/proxy/:what/:ids/:end",Dve)},spider:{init:Vz,home:zz,homeVod:Pve,category:Gz,detail:Xz,play:Wz,search:Kz}};var hb=class extends Yn{constructor(){super(),this.siteUrl="https://www.sehuatang.net"}getAppName(){return"\u8272\u82B1\u5802BT"}getName(){return"\u{1F51E}\u2503\u8272\u82B1\u5802BT\u2503\u{1F51E}"}getJSName(){return"sehuatang"}getType(){return 3}async init(e){await super.init(e),this.jsBaseDetail=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",{})}getHeader(){return{"User-Agent":"PostmanRuntime/7.36.1",Host:"www.sehuatang.net",Cookie:"cPNj_2132_saltkey=Q4BKEOEC; cf_clearance=6Gz2tvOXPkkJP2UhLnSsN4s0RrnDUy0jBN0kUvC5FNQ-1706109144-1-AebvwBnAURwWWQhj0QRBrRPku2n8xI73PIeuZVj2ckqY9zjQ7zFzDviX7Gkex1P1bUw9SXHGEYnkBB9nmWe6Nhk=; _safe=vqd37pjm4p5uodq339yzk6b7jdt6oich"}}async parseVodShortListFromDoc(e){let n=[],r=e('[id="portal_block_43_content"]').find("li");for(let l of r){let i=new nn;i.vod_remarks=e(e(l).find("a")[1]).text(),i.vod_id=e(l).find("a")[2].attribs.href,i.vod_name=e(l).find("a")[2].attribs.title,i.vod_pic=this.jsBaseDetail+S3(i.vod_id),n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[class="bm_c"]')[0]).find("tbody");for(let l of r){let i=e(e(e(l).find("cite")).find("a")[0]).text();if(i!=="admin"&&i!==void 0&&!Ae.isEmpty(i)){let s=new nn;s.vod_id=e(l).find("a")[0].attribs.href,s.vod_remarks=e(e(l).find("a")[2]).text(),s.vod_name=e(e(l).find("a")[3]).text(),s.vod_pic=this.jsBaseDetail+S3(s.vod_id),n.push(s)}}return n}async parseVodDetailFromDoc(e){let n=new An,r=e('[class="t_f"]')[0],l=e(r).text().replaceAll("\uFF1A",":").replaceAll("\u3010","").replaceAll("\u3011","");return n.vod_pic=e(r).find("img")[0].attribs.file,n.vod_name=Yr(/影片名称(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_actor=Yr(/出演女优(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_remarks=Yr(/是否有码(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_play_from="BT",n.vod_play_url=n.vod_name+"$"+Yr(/磁力链接: (.*)复制代码/,l),n}async setClasses(){let e=await this.getHtml(),n=e('[id="category_1"]').find("tr").slice(0,-1);for(let r of n){let l=e(e(r).find('[class="fl_icn_g"]')).find("a");for(let i of l){let s=i.attribs.href,a=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(a,s))}}}async getFilter(e){let n=[],r={key:1,name:"\u7C7B\u578B",value:[]},l=e('[id="thread_types"]').find("a");for(let a of l){let o="";a.children.length>1?o=a.children[0].data+":"+e(a.children[1]).text():o=a.children[0].data,r.value.push({n:o,v:a.attribs.href})}n.push(r);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let a of s){let o=e(a).text();o!=="\u66F4\u591A"&&o!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(a).text(),v:a.attribs.href})}return n.push(i),n}async setFilterObj(){for(let e of this.classes){let n=e.type_name,r=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.getHtml(this.siteUrl+"/"+r);this.filterObj[r]=await this.getFilter(l)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]==="javascript:;"||(e=l[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=n,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+n;let a=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(a)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],l=x2(e[1]);if(r==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${l}`);let i=await this.getHtml(this.siteUrl+"/"+l),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let a;return Ae.isEmpty(n)?a=await req(s.vod_pic,{buffer:2,headers:{Referer:l,"User-Agent":ki}}):a=await req(s.vod_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},on=new hb;var mb=class extends Qn{constructor(){super()}getName(){return on.getName()}getAppName(){return on.getAppName()}getJSName(){return on.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await on.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await on.initCookie(e.server.config.bilicookie),await on.spiderInit(e),on.cfgObj.code=0,on.catOpenStatus=!0,on.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await on.setClasses(),this.classes=on.classes}async setFilterObj(){await on.setFilterObj(),this.filterObj=on.filterObj}async setHomeVod(){await on.setHomeVod(),this.homeVodList=on.homeVodList}async setCategory(e,n,r,l){await on.setCategory(e,n,r,l),this.vodList=on.vodList}async setDetail(e){await on.setDetail(e),this.vodDetail=on.vodDetail}async setPlay(e,n,r){await on.setPlay(e,n,r),this.playUrl=on.playUrl,this.result=on.result}async setSearch(e,n,r){await on.setSearch(e,n,r),this.vodList=on.vodList,this.result=on.result}async setProxy(e,n){return await on.proxy(e,n)}},Is=new mb;async function Jz(t,e){return await Is.init(t,e)}async function Qz(t,e){return await Is.home(t,e)}async function Lve(t,e){return await Is.homeVod(t,e)}async function Zz(t,e){return await Is.category(t,e)}async function eG(t,e){return await Is.detail(t,e)}async function tG(t,e){return await Is.play(t,e)}async function nG(t,e){return await Is.search(t,e)}async function Fve(t,e){return await Is.proxy(t,e)}var rG={meta:{key:on.getJSName(),name:on.getName(),type:on.getType()},api:async t=>{t.post("/init",Jz),t.post("/home",Qz),t.post("/category",Zz),t.post("/detail",eG),t.post("/play",tG),t.post("/search",nG),t.get("/proxy/:what/:ids/:end",Fve)},spider:{init:Jz,home:Qz,homeVod:Lve,category:Zz,detail:eG,play:tG,search:nG}};var gb=class extends Yn{constructor(){super(),this.siteUrl="https://hsck12.shop/"}getName(){return"\u{1F51E}\u2503\u9EC4\u8272\u4ED3\u5E93\u2503\u{1F51E}"}getAppName(){return"\u9EC4\u8272\u4ED3\u5E93"}getJSName(){return"hscangku"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let l of r){let i=new nn,s=e(l).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e){let n=new An,r=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return n.vod_name=r.text(),n.vod_pic=i.attribs.poster,n.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",n.vod_play_url=e(i).find("source")[0].attribs.src,n}async setClasses(){this.classes= Line truncated
`)+oe+`return __p
}`,(ue=fx(function(){return ht(D,xe+"return "+oe).apply(n,B)})).source=oe,lp(ue))throw ue;return ue},I.times=function(u,d){if((u=yt(u))<1||c<u)return[];var y=p,A=nl(u,p);for(d=tt(d),u-=p,A=z5(A,d);++y<u;)d(y);return A},I.toFinite=t3,I.toInteger=yt,I.toLength=tx,I.toLower=function(u){return nn(u).toLowerCase()},I.toNumber=h2,I.toSafeInteger=function(u){return u?ra(yt(u),-9007199254740991,c):u===0?u:0},I.toString=nn,I.toUpper=function(u){return nn(u).toUpperCase()},I.trim=function(u,d,y){return(u=nn(u))&&(y||d===n)?Gi(u):u&&(d=Yl(d))?F3(y=P2(u),G5(y,d=P2(d)),X5(y,d)+1).join(""):u},I.trimEnd=function(u,d,y){return(u=nn(u))&&(y||d===n)?u.slice(0,AT(u)+1):u&&(d=Yl(d))?F3(y=P2(u),0,X5(y,P2(d))+1).join(""):u},I.trimStart=function(u,d,y){return(u=nn(u))&&(y||d===n)?u.replace(Xn,""):u&&(d=Yl(d))?F3(y=P2(u),G5(y,P2(d))).join(""):u},I.truncate=function(u,R){var y,B=30,A="...",R=(Hn(R)&&(y="separator"in R?R.separator:y,B="length"in R?yt(R.length):B,A="omission"in R?Yl(R.omission):A),(u=nn(u)).length);if((R=Qs(u)?(D=P2(u)).length:R)<=B)return u;if((R=B-vo(A))<1)return A;var D,B=D?F3(D,0,R).join(""):u.slice(0,R);if(y!==n)if(D&&(R+=B.length-R),ip(y)){if(u.slice(R).search(y)){var V,K=B;for((y=y.global?y:Zs(y.source,nn(i2.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var oe=V.index;B=B.slice(0,oe===n?R:oe)}}else u.indexOf(Yl(y),R)!=R&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+A},I.unescape=function(u){return(u=nn(u))&&bn.test(u)?u.replace(Ke,tW):u},I.uniqueId=function(u){var d=++rW;return nn(u)+d},I.upperCase=dK,I.upperFirst=op,I.each=qS,I.eachRight=VS,I.first=jS,fp(I,(mp={},ci(I,function(u,d){gn.call(I.prototype,d)||(mp[d]=u)}),mp),{chain:!1}),I.VERSION="4.17.21",vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),vr(["drop","take"],function(u,d){Ft.prototype[u]=function(y){y=y===n?1:Er(yt(y),0);var A=this.__filtered__&&!d?new Ft(this):this.clone();return A.__filtered__?A.__takeCount__=nl(y,A.__takeCount__):A.__views__.push({size:nl(y,p),type:u+(A.__dir__<0?"Right":"")}),A},Ft.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),vr(["filter","map","takeWhile"],function(u,d){var y=d+1,A=y==1||y==3;Ft.prototype[u]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:tt(R,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),vr(["head","last"],function(u,d){var y="take"+(d?"Right":"");Ft.prototype[u]=function(){return this[y](1).value()[0]}}),vr(["initial","tail"],function(u,d){var y="drop"+(d?"":"Right");Ft.prototype[u]=function(){return this.__filtered__?new Ft(this):this[y](1)}}),Ft.prototype.compact=function(){return this.filter(Dl)},Ft.prototype.find=function(u){return this.filter(u).head()},Ft.prototype.findLast=function(u){return this.reverse().find(u)},Ft.prototype.invokeMap=bt(function(u,d){return typeof u=="function"?new Ft(this):this.map(function(y){return q4(y,u,d)})}),Ft.prototype.reject=function(u){return this.filter(Ac(tt(u)))},Ft.prototype.slice=function(u,d){u=yt(u);var y=this;return y.__filtered__&&(0<u||d<0)?new Ft(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),d!==n?(d=yt(d))<0?y.dropRight(-d):y.take(d-u):y)},Ft.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Ft.prototype.toArray=function(){return this.take(p)},ci(Ft.prototype,function(u,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),A=/^(?:head|last)$/.test(d),R=I[A?"take"+(d=="last"?"Right":""):d],D=A||/^find/.test(d);R&&(I.prototype[d]=function(){function B(We){return We=R.apply(I,ii([We],oe)),A&&xe?We[0]:We}var V,K=this.__wrapped__,oe=A?[1]:arguments,Se=K instanceof Ft,_e=oe[0],ue=Se||mt(K),xe=(ue&&y&&typeof _e=="function"&&_e.length!=1&&(Se=ue=!1),this.__chain__),_e=!!this.__actions__.length,ge=D&&!xe,Se=Se&&!_e;return!D&&ue?(K=Se?K:new Ft(this),(V=u.apply(K,oe)).__actions__.push({func:bc,args:[B],thisArg:n}),new D2(V,xe)):ge&&Se?u.apply(this,oe):(V=this.thru(B),ge?A?V.value()[0]:V.value():V)})}),vr(["pop","push","shift","sort","splice","unshift"],function(u){var d=Y5[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",A=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var R,D=arguments;return A&&!this.__chain__?(R=this.value(),d.apply(mt(R)?R:[],D)):this[y](function(B){return d.apply(mt(B)?B:[],D)})}}),ci(Ft.prototype,function(u,d){var y,A=I[d];A&&(y=A.name+"",gn.call(So,y)||(So[y]=[]),So[y].push({name:d,func:A}))}),So[hc(n,2).name]=[{name:"wrapper",func:n}],Ft.prototype.clone=function(){var u=new Ft(this.__wrapped__);return u.__actions__=Cl(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Cl(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Cl(this.__views__),u},Ft.prototype.reverse=function(){var u;return this.__filtered__?((u=new Ft(this)).__dir__=-1,u.__filtered__=!0):(u=this.clone()).__dir__*=-1,u},Ft.prototype.value=function(){var u=this.__wrapped__.value(),d=this.__dir__,y=mt(u),A=d<0,R=y?u.length:0,D=function(Be,Je,rt){for(var Mn=-1,Qn=rt.length;++Mn<Qn;){var h Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let c=Rhe(o,i);c&&s.push(c)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||Le("The EXTM3U tag MUST be the first line."),s}(t,e),r=Ohe(n,e);return r.source=t,r}var Nhe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],Ihe=["#EXT-X-MEDIA"],eE=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(Nhe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(Ihe.some(r=>n.startsWith(r)))continue;Le(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function lE(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function Che(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function zB(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&Le("IV must be a 128-bit unsigned integer"),r.push(`IV=${HB(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function khe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${lE(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let l of e.audio)t.push(f7(l))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let l of e.video)t.push(f7(l))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let l of e.subtitles)t.push(f7(l))}if(vhe().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let l of e.closedCaptions)t.push(f7(l))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let l=[];for(let{format:i,cpcList:s}of e.allowedCpc)l.push(`${i}:${s.join("/")}`);r.push(`ALLOWED-CPC="${l.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function f7(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function Phe(t,e,n,r,l=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let c=zB(e.key);c!==n&&(t.push(c),n=c)}if(e.map){let c=function(f){let p=[`URI="${f.uri}"`];return f.byterange&&p.push(`BYTERANGE="${Y_(f.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);c!==r&&(t.push(c),r=c)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${K_(e.programDateTime)}`),e.dateRange&&t.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${K_(c.start)}"`),c.end&&f.push(`END-DATE="${K_(c.end)}"`),c.duration&&f.push(`DURATION=${c.duration}`),c.plannedDuration&&f.push(`PLANNED-DURATION=${c.plannedDuration}`),c.classId&&f.push(`CLASS="${c.classId}"`),c.endOnNext&&f.push("END-ON-NEXT=YES");for(let p of Object.keys(c.attributes))p.startsWith("X-")?typeof c.attributes[p]=="number"?f.push(`${p}=${c.attributes[p]}`):f.push(`${p}="${c.attributes[p]}"`):p.startsWith("SCTE35-")&&f.push(`${p}=${HB(c.attributes[p])}`);return`#EXT-X-DATERANGE:${f.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(c,f){let p="";for(let m of f)if(m.type==="OUT")p="OUT",c.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",c.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";c.push(`#${m.tagName}${h}`)}return p}(t,e.markers)),e.parts.length>0&&(s=function(c,f){let p=!1;for(let m of f)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;h.push(`BYTERANGE-START=${g}`),_&&h.push(`BYTERANGE-LENGTH=${_}`)}c.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push( Line truncated
`)}var XB="hls_cache",A7=[],Qa={},d5={},Ja={},x7="";function Dhe(t,e){if(A7.push(t),Qa[t]=e,A7.length>5){let n=A7.shift();Lhe(n)}}function Lhe(t){delete Qa[t],delete A7[t],new JSFile(XB+"/"+t).delete()}function Fhe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=iE(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=iE(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=iE(t,n.key.uri));return e}async function WB(t,e){let n=md5X(t);if(Qa[n])return Qa[n];let r={},l=t;for(;r=await req(l,{headers:e,redirect:0}),r.headers.location;)l=r.headers.location;if(r.code==200){var i=r.content;let s=Fhe(l,VB(i));return Dhe(n,{code:r.code,plist:s,key:n,headers:r.headers}),Qa[n]}return{}}async function KB(t,e,n){if(!Qa[t])return{};let l=Qa[t].plist.segments,i=!Ja[t];if(i){Ja[t]={};for(let f of l){let p=md5X(f.uri+f.mediaSequenceNumber.toString());Ja[t][p]={file:XB+"/"+t+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in Ja[t]){let p=Ja[t][f];p.index>=e?p.order=p.index-e:p.order=l.length-e+p.index}i&&Mhe(t,5,n);let s=l[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=Ja[t][a];if(o.state==1||o.state==-1){let f=new JSFile(o.file);if(await f.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:f};o.state=-1}if(o.state==-1&&YB(t,o,n),o.state==0){var c=new JSProxyStream;c.head(200,{connection:"close","content-type":"video/mp2t"});let f=0;return o.read=!0,new Promise(async function(p,m){let h=new JSFile(o.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>f){var S=await h.read(_-f,f);await c.write(S),f=_}if(o.state==1||o.state<0){c.done(),await h.close(),await h.delete(),o.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:c}}}async function YB(t,e,n){if(e.state>=0||!d5[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let l=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(l.error||l.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function Mhe(t,e,n){x7&&x7!=t&&delete d5[x7],x7=t,d5[t]=!0;for(let r=0;r<e&&d5[t];r++)new Promise(function(l,i){(async function s(){if(!d5[t]){l();return}let a=be.pickBy(Ja[t],function(c){return c.state==-1}),o=be.minBy(Object.values(a),function(c){return c.order});if(!o){l();return}await YB(t,o,n),setTimeout(s,5)})()})}function iE(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var l=0;l<r.length;l++)r[l]!="."&&(r[l]==".."?n.pop():n.push(r[l]));return n.join("/")}function JB(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),l=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${l}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var w7=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Ri(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Li,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,l,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Es(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,l,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,l,i,s,a){return a.headers.location!==void 0?l?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,l,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,l,i,s))}async fetch(e,n,r,l=!1,i=!1,s=0){let a=c7(n),o=e;be.isEmpty(a)||(o=e+"?"+a);let c=new l5(o),f;return f=await req(c.toString(),{method:"get",headers:r,buffer:s,data:null}),f.code===200||f.code===302||f.code===301||i?await this.getResponse(e,n,r,l,i,s,f):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${c},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(f)}`),await this.reconnnect(e,n,r,l,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(be.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Sr(r)}async parseVodShorLine truncated
`).forEach(function(s){l=s.indexOf(":"),n=s.substring(0,l).trim().toLowerCase(),r=s.substring(l+1).trim(),!(!n||e[n]&&Nve[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var uz=Symbol("internals");function R5(t){return t&&String(t).trim().toLowerCase()}function tf(t){return t===!1||t==null?t:X.isArray(t)?t.map(tf):String(t)}function Ive(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var Cve=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function nb(t,e,n,r,l){if(X.isFunction(r))return r.call(this,e,n);if(l&&(e=n),!!X.isString(e)){if(X.isString(r))return e.indexOf(r)!==-1;if(X.isRegExp(r))return r.test(e)}}function kve(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Pve(t,e){let n=X.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(l,i,s){return this[r].call(this,e,l,i,s)},configurable:!0})})}var S4=class{constructor(e){e&&this.set(e)}set(e,n,r){let l=this;function i(a,o,c){let f=R5(o);if(!f)throw new Error("header name must be a non-empty string");let p=X.findKey(l,f);(!p||l[p]===void 0||c===!0||c===void 0&&l[p]!==!1)&&(l[p||o]=tf(a))}let s=(a,o)=>X.forEach(a,(c,f)=>i(c,f,o));return X.isPlainObject(e)||e instanceof this.constructor?s(e,n):X.isString(e)&&(e=e.trim())&&!Cve(e)?s(oz(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=R5(e),e){let r=X.findKey(this,e);if(r){let l=this[r];if(!n)return l;if(n===!0)return Ive(l);if(X.isFunction(n))return n.call(this,l,r);if(X.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=R5(e),e){let r=X.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||nb(this,this[r],r,n)))}return!1}delete(e,n){let r=this,l=!1;function i(s){if(s=R5(s),s){let a=X.findKey(r,s);a&&(!n||nb(r,r[a],a,n))&&(delete r[a],l=!0)}}return X.isArray(e)?e.forEach(i):i(e),l}clear(e){let n=Object.keys(this),r=n.length,l=!1;for(;r--;){let i=n[r];(!e||nb(this,this[i],i,e,!0))&&(delete this[i],l=!0)}return l}normalize(e){let n=this,r={};return X.forEach(this,(l,i)=>{let s=X.findKey(r,i);if(s){n[s]=tf(l),delete n[i];return}let a=e?kve(i):String(i).trim();a!==i&&delete n[i],n[a]=tf(l),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return X.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=e&&X.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(l=>r.set(l)),r}static accessor(e){let r=(this[uz]=this[uz]={accessors:{}}).accessors,l=this.prototype;function i(s){let a=R5(s);r[a]||(Pve(l,s),r[a]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}};S4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(S4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});X.freezeMethods(S4);var Nr=S4;function O5(t,e){let n=this||T4,r=e||n,l=Nr.from(r.headers),i=r.data;return X.forEach(t,function(a){i=a.call(n,i,l.normalize(),e?e.status:void 0)}),l.normalize(),i}function N5(t){return!!(t&&t.__CANCEL__)}function cz(t,e,n){Fe.call(this,t??"canceled",Fe.ERR_CANCELED,e,n),this.name="CanceledError"}X.inherits(cz,Fe,{__CANCEL__:!0});var ei=cz;function ws(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Fe("Request failed with status code "+n.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function rb(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function lb(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function so(t,e){return t&&!rb(e)?lb(t,e):e}var Pz=br(pz(),1),Dz=br(require("http"),1),Lz=br(require("https"),1),Fz=br(require("util"),1),Mz=br(_z(),1),O3=br(require("zlib"),1);var oo="1.6.7";function L5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var Yve=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function yb(t,e,n){let r=n&&n.Blob||Or.classes.Blob,l=L5(t);if(e===void 0&&r&&(e=!0),l==="data"){t=l.length?t.slice(l.length+1):t;let i=Yve.exec(t);if(!i)throw new Fe("Invalid URL",Fe.ERR_INVALID_URL);let s=i[1],a=i[2],o=i[3],c=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Fe("Blob is not supported",Fe.ERR_NOT_SUPPORT);return new r([c],{type:s})}return c}throw new Fe("Unsupported protocol "+l,Fe.ERR_NOT_SUPPORT)}var uo=br(require("stream"),1);var bz=br(require("stream"),1);function Jve(t,e){let n=0,r=1e3/e,l=null;return function(s,a){let o=Date.now();if(s||o-n>r)return l&&(clearTimeout(l),l=null),n=o,t.apply(null,a);l||(l=setTimeout(()=>(l=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var Ez=Jve;function Qve(t,e){t=t||10;let n=new Array(t),r=new Array(t),l=0,i=0,s;return e=e!==void 0?e:1e3,function(o){let c=Date.now(),f=r[i];s||(s=c),n[l]=o,r[l]=c;let p=i,m=0;for(;p!==l;)m+=n[p++],p=p%t;if(l=(l+1)%t,l===i&&(i=(i+1)%t),c-s<e)return;let h=f&&c-f;return h?Math.round(m*1e3/h):void 0}}var nf=Qve;var rf=Symbol("internals"),vb=class extends bz.default.Transform{constructor(e){e=X.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!X.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[rf]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},l=nf(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let i=0;r.updateProgress=Ez(function(){let o=r.length,c=r.bytesSeen,f=c-i;if(!f||n.destroyed)return;let p=l(f);i=c,process.nextTick(()=>{n.emit("progress",{loaded:c,total:o,progress:o?c/o:void 0,bytes:f,rate:p||void 0,estimated:p&&o&&c<=o?(o-c)/p:void 0})})},r.ticksRate);let s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[rf];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let l=this,i=this[rf],s=i.maxRate,a=this.readableHighWaterMark,o=i.timeWindow,c=1e3/o,f=s/c,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,f*.01):0;function m(g,_){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),l.push(g)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let h=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=a,v,b=0;if(s){let w=Date.now();(!i.ts||(b=w-i.ts)>=o)&&(i.ts=w,v=f-i.bytes,i.bytes=v<0?-v:0,b=0),v=f-i.bytes}if(s){if(v<=0)return setTimeout(()=>{_(null,g)},o-b);v<x&&(x=v)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(_,null,T)}:_)};h(e,function g(_,S){if(_)return r(_);S?h(S,g):r(null)})}setLength(e){return this[rf].length=+e,this}},_b=vb;var $z=br(require("events"),1);var Sz=require("util"),xz=require("stream");var{asyncIterator:Tz}=Symbol,Zve=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[Tz]?yield*t[Tz]():yield t},lf=Zve;var e_e=X.ALPHABET.ALPHA_DIGIT+"-_",F5=new Sz.TextEncoder,Rs=`\r
`,t_e=F5.encode(Rs),n_e=2,Eb=class{constructor(e,n){let{escapeName:r}=this.constructor,l=X.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!l&&n.name?`; filename="${r(n.name)}"`:""}${Rs}`;l?n=F5.encode(String(n).replace(/\r?\n|\r\n?/g,Rs)):i+=`Content-Type: ${n.type||"application/octet-stream"}${Rs}`,this.headers=F5.encode(i+Rs),this.contentLength=l?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+n_e,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;X.isTypedArray(e)?yield e:yield*lf(e),yield t_e}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},r_e=(t,e,n)=>{let{tag:r="form-data-boundary",size:l=25,boundary:i=r+"-"+X.generateString(l,e_e)}=n||{};if(!X.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=F5.encode("--"+i+Rs),a=F5.encode("--"+i+"--"+Rs+Rs),o=a.byteLength,c=Array.from(t.entries()).map(([p,m])=>{let h=new Eb(p,m);return o+=h.size,h});o+=s.byteLength*c.length,o=X.toFiniteNumber(o);let f={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(o)&&(f["Content-Length"]=o),e&&e(f),xz.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield a}())},Az=r_e;var wz=br(require("stream"),1),bb=class extends wz.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let l=Buffer.alloc(2);l[0]=120,l[1]=156,this.push(l,n)}this.__transform(e,n,r)}},Rz=bb;var l_e=(t,e)=>X.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(l=>{try{e?r(null,...e(l)):r(null,l)}catch(i){r(i)}},r)}:t,Oz=l_e;var Nz={flush:O3.default.constants.Z_SYNC_FLUSH,finishFlush:O3.default.constants.Z_SYNC_FLUSH},i_e={flush:O3.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:O3.default.constants.BROTLI_OPERATION_FLUSH},Iz=X.isFunction(O3.default.createBrotliDecompress),{http:s_e,https:a_e}=Mz.default,o_e=/https:?/,Cz=Or.protocols.map(t=>t+":");function u_e(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function jz(t,e,n){let r=e;if(!r&&r!==!1){let l=(0,Pz.getProxyForUrl)(n);l&&(r=new URL(l))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let i=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let l=r.hostname||r.host;t.hostname=l,t.host=l,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(i){jz(i,e,i.href)}}var c_e=typeof process<"u"&&X.kindOf(process)==="process",f_e=t=>new Promise((e,n)=>{let r,l,i=(o,c)=>{l||(l=!0,r&&r(o,c))},s=o=>{i(o),e(o)},a=o=>{i(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),p_e=({address:t,family:e})=>{if(!X.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},kz=(t,e)=>p_e(X.isObject(t)?t:{address:t,family:e}),Uz=c_e&&function(e){return f_e(async function(r,l,i){let{data:s,lookup:a,family:o}=e,{responseType:c,responseEncoding:f}=e,p=e.method.toUpperCase(),m,h=!1,g;if(a){let ae=Oz(a,ye=>X.isArray(ye)?ye:[ye]);a=(ye,q,le)=>{ae(ye,q,(re,te,Un)=>{if(re)return le(re);let wt=X.isArray(te)?te.map(Ge=>kz(Ge)):[kz(te,Un)];q.all?le(re,wt):le(re,wt[0].address,wt[0].family)})}}let _=new $z.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((ae,ye)=>{m=!0,ye&&(h=!0,S())});function T(ae){_.emit("abort",!ae||ae.type?new ei(null,e,g):ae)}_.once("abort",l),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=so(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||Cz[0];if(b==="data:"){let ae;if(p!=="GET")return ws(r,l,{status:405,statusText:"method not allowed",headers:{},config:e});try{ae=yb(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(ye){throw Fe.from(ye,Fe.ERR_BAD_REQUEST,e)}return c==="text"?(ae=ae.toString(f),(!f||f==="utf8")&&(ae=X.stripBOM(ae))):c==="stream"&&(ae=uo.default.Readable.from(ae)),ws(r,l,{data:ae,status:200,statusText:"OK",headers:new Nr,config:e})}if(Cz.indexOf(b)===-1)return l(new Fe("Unsupported protocol "+b,Fe.ERR_BAD_REQUEST,e));let w=Nr.from(e.headers).normalize();w.set("User-Agent","axios/"+oo,!1);let N=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,j,L;if(X.isSpecCompliantForm(s)){let ae=w.getContentType(/boundary=([-_\w\d]{10,70})/i);s=Az(s,ye=>{w.set(ye)},{tag:`axios-${oo}-boundary`,boundary:ae&&ae[1]||void 0})}else if(X.isFormData(s)&&X.isFunction(s.getHeaders)){if(w.set(s.getHeaders()),!w.hasContentLength())try{let ae=await Fz.default.promisify(s.getLength).call(s); Line truncated
`+i.map(zz).join(`
`):" "+zz(i[0]):"as no adapter specified";throw new Fe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Tb};function Sb(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ei(null,t)}function af(t){return Sb(t),t.headers=Nr.from(t.headers),t.data=O5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),sf.getAdapter(t.adapter||T4.adapter)(t).then(function(r){return Sb(t),r.data=O5.call(t,t.transformResponse,r),r.headers=Nr.from(r.headers),r},function(r){return N5(r)||(Sb(t),r&&r.response&&(r.response.data=O5.call(t,t.transformResponse,r.response),r.response.headers=Nr.from(r.response.headers))),Promise.reject(r)})}var Gz=t=>t instanceof Nr?t.toJSON():t;function N3(t,e){e=e||{};let n={};function r(c,f,p){return X.isPlainObject(c)&&X.isPlainObject(f)?X.merge.call({caseless:p},c,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function l(c,f,p){if(X.isUndefined(f)){if(!X.isUndefined(c))return r(void 0,c,p)}else return r(c,f,p)}function i(c,f){if(!X.isUndefined(f))return r(void 0,f)}function s(c,f){if(X.isUndefined(f)){if(!X.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}let o={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>l(Gz(c),Gz(f),!0)};return X.forEach(Object.keys(Object.assign({},t,e)),function(f){let p=o[f]||l,m=p(t[f],e[f],f);X.isUndefined(m)&&p!==a||(n[f]=m)}),n}var xb={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{xb[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var Xz={};xb.transitional=function(e,n,r){function l(i,s){return"[Axios v"+oo+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new Fe(l(s," has been removed"+(n?" in "+n:"")),Fe.ERR_DEPRECATED);return n&&!Xz[s]&&(Xz[s]=!0,console.warn(l(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function m_e(t,e,n){if(typeof t!="object")throw new Fe("options must be an object",Fe.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),l=r.length;for(;l-- >0;){let i=r[l],s=e[i];if(s){let a=t[i],o=a===void 0||s(a,i,t);if(o!==!0)throw new Fe("option "+i+" must be "+o,Fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Fe("Unknown option "+i,Fe.ERR_BAD_OPTION)}}var of={assertOptions:m_e,validators:xb};var Os=of.validators,A4=class{constructor(e){this.defaults=e,this.interceptors={request:new QE,response:new QE}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;let i=l.stack?l.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=N3(this.defaults,n);let{transitional:r,paramsSerializer:l,headers:i}=n;r!==void 0&&of.assertOptions(r,{silentJSONParsing:Os.transitional(Os.boolean),forcedJSONParsing:Os.transitional(Os.boolean),clarifyTimeoutError:Os.transitional(Os.boolean)},!1),l!=null&&(X.isFunction(l)?n.paramsSerializer={serialize:l}:of.assertOptions(l,{encode:Os.function,serialize:Os.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&X.merge(i.common,i[n.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Nr.concat(s,i);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let f,p=0,m;if(!o){let g=[af.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),m=g.length,f=Promise.resolve(n);p<m;)f=f.then(g[p++],g[p++]);return f}m=a.length;let h=n;for(p=0;p<m;){let g=a[p++],_=a[p++];try{h=g(h)}catch(S){_.call(this,S);break}}try{f=af.call(this,h)}catch(g){return Promise.reject(g)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=N3(this.defaults,e);let n=so(e.baseURL,e.url);return io(n,e.params,e.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(e){A4.prototype[e]=function(n,r){return this.request(N3(r||{},{method:e,url:n,data:(r||{}).data}))}});X.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(N3(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}A4.prototype[e]=n(),A4.prototype[e+"Form"]=n(!0)});var M5=A4;var Ab=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(l=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](l);r._listeners=null}),this.promise.then=l=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(l);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new ei(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(l){e=l}),cancel:e}}},Wz=Ab;function wb(t){return function(n){return t.apply(null,n)}}function Rb(t){return X.isObject(t)&&t.isAxiosError===!0}var Ob={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ob).forEach(([t,e])=>{Ob[e]=t});var Kz=Ob;function Yz(t){let e=new M5(t),n=x5(M5.prototype.request,e);return X.extend(n,M5.prototype,e,{allOwnKeys:!0}),X.extend(n,e,null,{allOwnKeys:!0}),n.create=function(l){return Yz(N3(t,l))},n}var gr=Yz(T4);gr.Axios=M5;gr.CanceledError=ei;gr.CancelToken=Wz;gr.isCancel=N5;gr.VERSION=oo;gr.toFormData=As;gr.AxiosError=Fe;gr.Cancel=gr.CanceledError;gr.all=function(e){return Promise.all(e)};gr.spread=wb;gr.isAxiosError=Rb;gr.mergeConfig=N3;gr.AxiosHeaders=Nr;gr.formToJSON=t=>ef(X.isHTMLForm(t)?new FormData(t):t);gr.getAdapter=sf.getAdapter;gr.HttpStatusCode=Kz;gr.default=gr;var w4=gr;var{Axios:vCe,AxiosError:_Ce,CanceledError:ECe,isCancel:bCe,CancelToken:TCe,VERSION:SCe,all:xCe,Cancel:ACe,isAxiosError:wCe,spread:RCe,toFormData:Jz,AxiosHeaders:OCe,HttpStatusCode:NCe,formToJSON:ICe,getAdapter:CCe,mergeConfig:kCe}=w4;var iG=br(require("https"),1),sG=br(require("crypto"),1),aG=br(rG(),1),Cb={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await S_e(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,Cb)}globalThis.localLog={set:async function(t,e,n){w_e(t,e,n)}};function A_e(){co.default.existsSync("log")||co.default.mkdirSync("log");let t="log/info.log";return co.default.existsSync(t)?co.default.readFileSync(t).toString():(co.default.writeFileSync(t,""),"")}function w_e(t){co.default.writeFileSync("log/info.log",A_e()+`
`+t)}globalThis.req=R_e;async function R_e(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,l=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=lG.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=Jz(n));let c=l===1||l===2?"arraybuffer":void 0,f;a?f=aG.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):f=iG.default.Agent({rejectUnauthorized:!1});let p=await w4(t,{responseType:c,method:e&&e.method||"get",headers:o,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:f});n=p.data;let m={};for(let h of p.headers){let g=h[1];m[h[0]]=Array.isArray(g)&&g.length===1?g[0]:g}if(!l)typeof n=="object"&&(n=JSON.stringify(n));else{if(l===1)return{code:p.status,headers:m,content:n};if(l===2)return{code:p.status,headers:m,content:n.toString("base64")};if(l===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(n.on("data",async g=>{await h.onData(g)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=O_e;function O_e(t){return sG.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var N_e=["DEBUG","INFO","WARNING","ERROR"];var O4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=N_e.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://192.168.0.116:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var kn=class extends jn{constructor(){super(),this.jadeLog=new O4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://192.168.0.116:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return be.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return be.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let r=e.body.id,l=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(l),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${r},pg = ${l},extend = ${JSON.stringify(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,l,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let l=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new yn,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${l}`);try{return await this.setDetail(l),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=l,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let r=e.body.flag,l=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${l},flags:${i}`,!0);try{let s;if(await this.setPlay(r,l,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.mess Line truncated
`),o=e(s).find("a"),c=[{n:"\u5168\u90E8",v:l}],f=r.toString();for(let p of o){let m=e(p).text().replaceAll(`
`,""),h=p.attribs.href;h!==void 0&&c.push({n:m,v:h})}a=a.filter(p=>p!==""),this.filterObj[l].push({key:f,name:a[0],value:c})}let i=e('[id="side-menu"]').find("li");for(let s of i){let a=e(s).find("a")[0].attribs.href;if(a!==void 0&&a.indexOf(this.siteUrl)>-1){let o={type_name:e(s).text(),type_id:a};this.classes.push(o)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]!=="1"&&(e=l[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+n.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let n=await this.getHtml(e),r=Qr(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(n,r)}async setPlay(e,n,r){this.playUrl=n,this.playHeader={}}async setSearch(e,n){let r=this.siteUrl+"search/"+encodeURIComponent(e),l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDoc(l)}async proxy(e,n){return super.proxy(e,n)}},on=new Fb;var Mb=class extends kn{constructor(){super()}getName(){return on.getName()}getAppName(){return on.getAppName()}getJSName(){return on.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await on.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await on.initCookie(e.server.config.bilicookie),await on.spiderInit(e),on.cfgObj.code=0,on.catOpenStatus=!0,on.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await on.setClasses(),this.classes=on.classes}async setFilterObj(){await on.setFilterObj(),this.filterObj=on.filterObj}async setHomeVod(){await on.setHomeVod(),this.homeVodList=on.homeVodList}async setCategory(e,n,r,l){await on.setCategory(e,n,r,l),this.vodList=on.vodList}async setDetail(e){await on.setDetail(e),this.vodDetail=on.vodDetail}async setPlay(e,n,r){await on.setPlay(e,n,r),this.playUrl=on.playUrl,this.result=on.result}async setSearch(e,n,r){await on.setSearch(e,n,r),this.vodList=on.vodList,this.result=on.result}async setProxy(e,n){return await on.proxy(e,n)}},ks=new Mb;async function SG(t,e){return await ks.init(t,e)}async function xG(t,e){return await ks.home(t,e)}async function F_e(t,e){return await ks.homeVod(t,e)}async function AG(t,e){return await ks.category(t,e)}async function wG(t,e){return await ks.detail(t,e)}async function RG(t,e){return await ks.play(t,e)}async function OG(t,e){return await ks.search(t,e)}async function M_e(t,e){return await ks.proxy(t,e)}var NG={meta:{key:on.getJSName(),name:on.getName(),type:on.getType()},api:async t=>{t.post("/init",SG),t.post("/home",xG),t.post("/category",AG),t.post("/detail",wG),t.post("/play",RG),t.post("/search",OG),t.get("/proxy/:what/:ids/:end",M_e)},spider:{init:SG,home:xG,homeVod:F_e,category:AG,detail:wG,play:RG,search:OG}};var $b=class extends jn{constructor(){super(),this.siteUrl="https://jable.tv",this.cookie=""}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getImgHeaders()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getImgHeaders())}getImgHeaders(){return{"User-Agent":"PostmanRuntime/7.37.3","Postman-Token":"c2602692-1a05-4bb0-93cd-270afad97e87",Host:"assets-cdn.jable.tv",Proxy:!0}}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"Jable"}getName(){return"\u{1F51E}\u2503Jable\u2503\u{1F51E}"}getJSName(){return"jable"}getType(){return 3}getHeader(){let e={};return e["User-Agent"]="PostmanRuntime/7.36.3",e.Host="jable.tv",e["Postman-Token"]="33290483-3c8d-413f-a160-0d3aea9e6f95",e}async getHtml(e=this.siteUrl,n=!1,r=this.getHeader()){return super.getHtml(e,!0,r)}async setClasses(){let e=await this.getHtml(this.siteUrl),n=e('[class="title-box"]'),r=e("div.row");for(let l of e(r[0]).find("a")){let i=e(l).text(),s=l.attribs.href;s.indexOf(this.siteUrl)>-1&&this.classes.push(this.getTypeDic(i,s))}n=n.slice(1,9),r=r.slice(1,9);for(let l=0;l<n.length;l++){let i=e(r[l]).find("a")[0].attribs.href;this.classes.push(this.getTypeDic("\u6807\u7B7E",i));break}}async getSortFilter(e){let n=e('[class="sorting-nav"]').find("a"),r={name:"\u6392\u5E8F",key:"sort",value:[]};for(let l of n){let i=l.attribs["data-parameters"].split("sort_by:")[1],s=e(l).text();r.value.push({n:s,v:i})}return r}async getFilter(e,n,r,l){let i=[];if(n<4){let s={name:l,key:"type",value:[]},a=["div.img-box > a",'[class="horizontal-img-box ml-3 mb-3"] > a',"","sort"],o=["div.absolute-center > h4","div.detail"],c=await this.getHtml(r);for(let f of c(a[n])){let p=f.attribs.href,m=e(e(f).find(o[n])).text().replaceAll(" ","").replaceAll(`
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let f=await this.getHtml(s.value[0].v),p=await this.getSortFilter(f);p.value.length>0&&i.push(p)}else{let f=await this.getSortFilter(c);f.value.length>0&&i.push(f)}}else{let s=e("div.row").slice(1,9),a=e('[class="title-box"]').slice(1,9);for(let f=0;f<a.length;f++){let p={name:e(e(a[f]).find("h2")).text(),key:"type",value:[]};for(let m of e(s[f]).find("a")){let h=m.attribs.href;h.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:h})}i.push(p)}let o=await this.getHtml(r),c=await this.getSortFilter(o);c.value.length>0&&i.push(c)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),n=this.classes.slice(1);for(let r=0;r<n.length;r++){let l=n[r].type_name,i=n[r].type_id,s=await this.getFilter(e,r,i,l);s.length>1&&r<4&&(i=s[0].value[0].v,this.classes[r+1]=this.getTypeDic(l,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let n=[],r=e("div.video-img-box");for(let l of r){let i=new ln,s=e(l).find("img").attr("data-src");if(s!==void 0){i.vod_pic=s;let a=e(l).find("a").attr("href");i.vod_id=a.split("/")[4],i.vod_name=a.split("/")[4];let o=e(e(l).find('[class="sub-title"]')).text().split(`
`);o.length>1?i.vod_remarks=o[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!be.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&n.push(i)}}return n}async parseVodDetailFromDoc(e){let n=new yn,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text();let l=Qr(/<video poster="(.*?)" id=/,e.html());n.vod_pic=l,n.vod_year=e(e('[class="inactive-color"]')).text();let i=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),s=[],a=Qr(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+a);let o=[];o.push(s.join("#"));let c=["Jable"];return n.vod_play_from=c.join("$$$"),n.vod_play_url=o.join("$$$"),n}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(n)}async setCategory(e,n,r,l){let i=l.type??e,s=l.sort??"video_viewed";this.limit=24;let a;this.total=0,this.count=0,e.indexOf("latest-updates")>1?a=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${n}&_=1709730132217`:a=i+`/${n}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o);let c=o(o('[class="page-item"]').slice(-1)[0]).text();c.indexOf("\u6700\u5F8C")>-1||(parseInt(c)===this.page||be.isEmpty(c))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,n){let r=this.siteUrl+`/search/${e}/`,l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},un=new $b;var jb=class extends kn{constructor(){super()}getName(){return un.getName()}getAppName(){return un.getAppName()}getJSName(){return un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await un.initCookie(e.server.config.bilicookie),await un.spiderInit(e),un.cfgObj.code=0,un.catOpenStatus=!0,un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await un.setClasses(),this.classes=un.classes}async setFilterObj(){await un.setFilterObj(),this.filterObj=un.filterObj}async setHomeVod(){await un.setHomeVod(),this.homeVodList=un.homeVodList}async setCategory(e,n,r,l){await un.setCategory(e,n,r,l),this.vodList=un.vodList}async setDetail(e){await un.setDetail(e),this.vodDetail=un.vodDetail}async setPlay(e,n,r){await un.setPlay(e,n,r),this.playUrl=un.playUrl,this.result=un.result}async setSearch(e,n,r){await un.setSearch(e,n,r),this.vodList=un.vodList,this.result=un.result}async setProxy(e,n){return await un.proxy(e,n)}},Ps=new jb;async function IG(t,e){return await Ps.init(t,e)}async function CG(t,e){return await Ps.home(t,e)}async function $_e(t,e){return await Ps.homeVod(t,e)}async function kG(t,e){return await Ps.category(t,e)}async function PG(t,e){return await Ps.detail(t,e)}async function DG(t,e){return await Ps.play(t,e)}async function LG(t,e){return await Ps.search(t,e)}async function j_e(t,e){return await Ps.proxy(t,e)}var FG={meta:{key:un.getJSName(),name:un.getName(),type:un.getType()},api:async t=>{t.post("/init",IG),t.post("/home",CG),t.post("/category",kG),t.post("/detail",PG),t.post("/play",DG),t.post("/search",LG),t.get("/proxy/:what/:ids/:end",j_e)},spider:{init:IG,home:CG,homeVod:$_e,category:kG,detail:PG,play:DG,search:LG}};var Ub=class extends jn{constructor(){super(),this.siteUrl="https://www.sehuatang.net"}getAppName(){return"\u8272\u82B1\u5802BT"}getName(){return"\u{1F51E}\u2503\u8272\u82B1\u5802BT\u2503\u{1F51E}"}getJSName(){return"sehuatang"}getType(){return 3}async init(e){await super.init(e),this.jsBaseDetail=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",{})}getHeader(){return{"User-Agent":"PostmanRuntime/7.36.1",Host:"www.sehuatang.net",Cookie:"cPNj_2132_saltkey=Q4BKEOEC; cf_clearance=6Gz2tvOXPkkJP2UhLnSsN4s0RrnDUy0jBN0kUvC5FNQ-1706109144-1-AebvwBnAURwWWQhj0QRBrRPku2n8xI73PIeuZVj2ckqY9zjQ7zFzDviX7Gkex1P1bUw9SXHGEYnkBB9nmWe6Nhk=; _safe=vqd37pjm4p5uodq339yzk6b7jdt6oich"}}async parseVodShortListFromDoc(e){let n=[],r=e('[id="portal_block_43_content"]').find("li");for(let l of r){let i=new ln;i.vod_remarks=e(e(l).find("a")[1]).text(),i.vod_id=e(l).find("a")[2].attribs.href,i.vod_name=e(l).find("a")[2].attribs.title,i.vod_pic=this.jsBaseDetail+R3(i.vod_id),n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[class="bm_c"]')[0]).find("tbody");for(let l of r){let i=e(e(e(l).find("cite")).find("a")[0]).text();if(i!=="admin"&&i!==void 0&&!be.isEmpty(i)){let s=new ln;s.vod_id=e(l).find("a")[0].attribs.href,s.vod_remarks=e(e(l).find("a")[2]).text(),s.vod_name=e(e(l).find("a")[3]).text(),s.vod_pic=this.jsBaseDetail+R3(s.vod_id),n.push(s)}}return n}async parseVodDetailFromDoc(e){let n=new yn,r=e('[class="t_f"]')[0],l=e(r).text().replaceAll("\uFF1A",":").replaceAll("\u3010","").replaceAll("\u3011","");return n.vod_pic=e(r).find("img")[0].attribs.file,n.vod_name=Qr(/影片名称(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_actor=Qr(/出演女优(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_remarks=Qr(/是否有码(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_play_from="BT",n.vod_play_url=n.vod_name+"$"+Qr(/磁力链接: (.*)复制代码/,l),n}async setClasses(){let e=await this.getHtml(),n=e('[id="category_1"]').find("tr").slice(0,-1);for(let r of n){let l=e(e(r).find('[class="fl_icn_g"]')).find("a");for(let i of l){let s=i.attribs.href,a=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(a,s))}}}async getFilter(e){let n=[],r={key:1,name:"\u7C7B\u578B",value:[]},l=e('[id="thread_types"]').find("a");for(let a of l){let o="";a.children.length>1?o=a.children[0].data+":"+e(a.children[1]).text():o=a.children[0].data,r.value.push({n:o,v:a.attribs.href})}n.push(r);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let a of s){let o=e(a).text();o!=="\u66F4\u591A"&&o!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(a).text(),v:a.attribs.href})}return n.push(i),n}async setFilterObj(){for(let e of this.classes){let n=e.type_name,r=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.getHtml(this.siteUrl+"/"+r);this.filterObj[r]=await this.getFilter(l)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]==="javascript:;"||(e=l[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=n,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+n;let a=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(a)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],l=R2(e[1]);if(r==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${l}`);let i=await this.getHtml(this.siteUrl+"/"+l),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let a;return be.isEmpty(n)?a=await req(s.vod_pic,{buffer:2,headers:{Referer:l,"User-Agent":Li}}):a=await req(s.vod_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},cn=new Ub;var Bb=class extends kn{constructor(){super()}getName(){return cn.getName()}getAppName(){return cn.getAppName()}getJSName(){return cn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await cn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await cn.initCookie(e.server.config.bilicookie),await cn.spiderInit(e),cn.cfgObj.code=0,cn.catOpenStatus=!0,cn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await cn.setClasses(),this.classes=cn.classes}async setFilterObj(){await cn.setFilterObj(),this.filterObj=cn.filterObj}async setHomeVod(){await cn.setHomeVod(),this.homeVodList=cn.homeVodList}async setCategory(e,n,r,l){await cn.setCategory(e,n,r,l),this.vodList=cn.vodList}async setDetail(e){await cn.setDetail(e),this.vodDetail=cn.vodDetail}async setPlay(e,n,r){await cn.setPlay(e,n,r),this.playUrl=cn.playUrl,this.result=cn.result}async setSearch(e,n,r){await cn.setSearch(e,n,r),this.vodList=cn.vodList,this.result=cn.result}async setProxy(e,n){return await cn.proxy(e,n)}},Ds=new Bb;async function MG(t,e){return await Ds.init(t,e)}async function $G(t,e){return await Ds.home(t,e)}async function U_e(t,e){return await Ds.homeVod(t,e)}async function jG(t,e){return await Ds.category(t,e)}async function UG(t,e){return await Ds.detail(t,e)}async function BG(t,e){return await Ds.play(t,e)}async function HG(t,e){return await Ds.search(t,e)}async function B_e(t,e){return await Ds.proxy(t,e)}var qG={meta:{key:cn.getJSName(),name:cn.getName(),type:cn.getType()},api:async t=>{t.post("/init",MG),t.post("/home",$G),t.post("/category",jG),t.post("/detail",UG),t.post("/play",BG),t.post("/search",HG),t.get("/proxy/:what/:ids/:end",B_e)},spider:{init:MG,home:$G,homeVod:U_e,category:jG,detail:UG,play:BG,search:HG}};var Hb=class extends jn{constructor(){super(),this.siteUrl="https://hsck12.shop/"}getName(){return"\u{1F51E}\u2503\u9EC4\u8272\u4ED3\u5E93\u2503\u{1F51E}"}getAppName(){return"\u9EC4\u8272\u4ED3\u5E93"}getJSName(){return"hscangku"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let l of r){let i=new ln,s=e(l).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e){let n=new yn,r=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return n.vod_name=r.text(),n.vod_pic=i.attribs.poster,n.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",n.vod_play_url=e(i).find("source")[0].attribs.src,n}async setClasses(){this.classes= Line truncated
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
94123f38ce5fc594eb342b13d983bb6f
9acc3aa6d144d74f7e7149763dd9a22f