tvbox/cat/18_dist/index.js

465 lines
1.9 MiB
JavaScript
Raw Normal View History

2024-04-02 15:03:09 +08:00
var cK=Object.create;var fc=Object.defineProperty;var fK=Object.getOwnPropertyDescriptor;var pK=Object.getOwnPropertyNames;var dK=Object.getPrototypeOf,hK=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),AS=(t,e)=>{for(var n in e)fc(t,n,{get:e[n],enumerable:!0})},RS=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of pK(e))!hK.call(t,l)&&l!==n&&fc(t,l,{get:()=>e[l],enumerable:!(r=fK(e,l))||r.enumerable});return t};var Nr=(t,e,n)=>(n=t!=null?cK(dK(t)):{},RS(e||!t||!t.__esModule?fc(n,"default",{value:t,enumerable:!0}):n,t)),mK=t=>RS(fc({},"__esModule",{value:!0}),t);var NS=k((P_e,OS)=>{"use strict";function gK(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}}OS.exports=gK});var Gf=k((D_e,zf)=>{"use strict";var yK=NS();function IS(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=yK(_K),l=null,i=null,s=0,a=null,o={push:v,drain:f2,saturated:f2,pause:f,paused:!1,get concurrency(){return n},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=A,!o.paused)for(;l&&s<n;)s++,T()},running:c,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:f2,kill:x,killAndDrain:_,error:b};return o;function c(){return s}function f(){o.paused=!0}function p(){for(var A=l,N=0;A;)A=A.next,N++;return N}function m(){for(var A=l,N=[];A;)N.push(A.value),A=A.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 v(A,N){var O=r.get();O.context=t,O.release=T,O.value=A,O.callback=N||f2,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(A,N){var O=r.get();O.context=t,O.release=T,O.value=A,O.callback=N||f2,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(A){A&&r.release(A);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=f2}function _(){l=null,i=null,o.drain(),o.drain=f2}function b(A){a=A}}function f2(){}function _K(){this.value=null,this.callback=f2,this.next=null,this.release=f2,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=f2,t.errorHandler&&i(n,s),l.call(t.context,n,r),t.release(t)}}function vK(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=IS(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,v){if(g){h(g);return}m(v)})});return p.catch(f2),p}function o(f){var p=new Promise(function(m,h){s(f,function(g,v){if(g){h(g);return}m(v)})});return p.catch(f2),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}}zf.exports=IS;zf.exports.promise=vK});var Kf=k((L_e,CS)=>{"use strict";var{inherits:EK,format:Xf}=require("util");function Qs(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=Xf(e,l,i,s):l&&i?this.message=Xf(e,l,i):l?this.message=Xf(e,l):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},EK(r,n),r}CS.exports={createError:Qs,AVV_ERR_EXPOSE_ALREADY_DEFINED:Qs("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:Qs("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NO
`),a=`
`+n+(i.length?l("\u2502"):" ")+" ";return n+s.join(a)+`
`+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 jS=k((M_e,$S)=>{"use strict";var bK=PS(),DS=Symbol("avvio.TimeTree.untrackNode"),Yf=Symbol("avvio.TimeTree.trackNode"),LS=Symbol("avvio.TimeTree.getParent"),FS=Symbol("avvio.TimeTree.getNode"),MS=Symbol("avvio.TimeTree.addNode"),Wf=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Yf](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])}[DS](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)}[LS](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[FS](e){return this.tableId.get(e)}[MS](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Yf](this.root),this.root.id;let i=this[LS](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return i.nodes.push(a),this[Yf](a),s}start(e,n,r=Date.now()){return this[MS](e,n,r)}stop(e,n=Date.now()){let r=this[FS](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[DS](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 bK(n)}};$S.exports=Wf});var BS=k(($_e,US)=>{var vo=1e3,Eo=vo*60,bo=Eo*60,Zs=bo*24,TK=Zs*7,SK=Zs*365.25;US.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return xK(t);if(n==="number"&&isFinite(t))return e.long?AK(t):wK(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function xK(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*SK;case"weeks":case"week":case"w":return n*TK;case"days":case"day":case"d":return n*Zs;case"hours":case"hour":case"hrs":case"hr":case"h":return n*bo;case"minutes":case"minute":case"mins":case"min":case"m":return n*Eo;case"seconds":case"second":case"secs":case"sec":case"s":return n*vo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function wK(t){var e=Math.abs(t);return e>=Zs?Math.round(t/Zs)+"d":e>=bo?Math.round(t/bo)+"h":e>=Eo?Math.round(t/Eo)+"m":e>=vo?Math.round(t/vo)+"s":t+"ms"}function AK(t){var e=Math.abs(t);return e>=Zs?pc(t,e,Zs,"day"):e>=bo?pc(t,e,bo,"hour"):e>=Eo?pc(t,e,Eo,"minute"):e>=vo?pc(t,e,vo,"second"):t+" ms"}function pc(t,e,n,r){var l=e>=n*1.5;return Math.round(t/n)+" "+r+(l?"s":"")}});var Jf=k((j_e,qS)=>{function RK(t){n.debug=n,n.default=n,n.coerce=o,n.disable=i,n.enable=l,n.enabled=s,n.humanize=BS(),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 v(...S){if(!v.enabled)return;let T=v,x=Number(new Date),_=x-(p||x);T.diff=_,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 C=n.formatters[O];if(typeof C=="function"){let $=S[b];N=C.call(T,$),S.splice(b,1),b--}return N}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}return v.namespace=f,v.useColors=n.useColors(),v.color=n.selectColor(f),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"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(v),v}function r(f,p){let m=n(this.namespace+(typeof p>"u"?":":p)+f);return m.log=this.log,m}function l(
`).join(`
`+i),t.push(l+"m+"+mc.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=UK()+e+" "+t[0]}function UK(){return Hr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function BK(...t){return process.stderr.write(hc.format(...t)+`
`)}function qK(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function HK(){return process.env.DEBUG}function VK(t){t.inspectOpts={};let e=Object.keys(Hr.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Hr.inspectOpts[e[n]]}mc.exports=Jf()(Hr);var{formatters:KS}=mc.exports;KS.o=function(t){return this.inspectOpts.colors=this.useColors,hc.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};KS.O=function(t){return this.inspectOpts.colors=this.useColors,hc.inspect(t,this.inspectOpts)}});var gc=k((q_e,Zf)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Zf.exports=HS():Zf.exports=YS()});var WS=k((H_e,np)=>{"use strict";var zK=Gf(),GK=require("events").EventEmitter,XK=require("util").inherits,Ir=gc()("avvio"),{AVV_ERR_READY_TIMEOUT:KK}=Kf(),ep=Symbol.for("plugin-meta");function YK(t,e){return t[ep]&&t[ep].name?t[ep].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 WK(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function So(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=YK(e,n),this.isAfter=r,this.q=zK(t,JK,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}XK(So,GK);So.prototype.exec=function(t,e){let n=this.func,r=!1,l=this.name;if(this.parent._error&&!this.isAfter){Ir("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 Ir("override errored",l),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Ir("exec",l);let i,s=o=>{if(r){Ir("loading complete",l);return}this._error=o,Ir(o?"exec errored":"exec completed",l),r=!0,i&&clearTimeout(i),e(o)};this.timeout>0&&(Ir("setting up timeout",l,this.timeout),i=setTimeout(function(){Ir("timed out",l),i=null;let o=new KK(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"&&(Ir("exec: resolving promise",l),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};So.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(Ir("rejecting promise",this.name,n),this._promise.reject(n)):(Ir("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=WK(),e=this._promise.promise,this.server?t():this.on("start",t)),e};So.prototype.enqueue=function(t,e){Ir("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};So.prototype.finish=function(t,e){Ir("finish",this.name,t);let n=()=>{this.loaded||(Ir("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(Ir("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let l=()=>{Ir("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(l,l),this._promise=null}else n();else Ir("delayed",this.name),this.q.drain=()=>{Ir("drain",this.name),this.q.drain=QK,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function JK(t,e){let n=this;process.nextTick(tp.bind(n),t,e)}function tp(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,tp.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 QK(){}np.exports=So;np.exports.loadPlugin=tp});var tx=k((V_e,ap)=>{"use strict";var JS=Gf(),ZK=require("events").EventEmitter,eY=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:rp,AVV_ERR_CALLBACK_NOT_FN:D4,AVV_ERR_PLUGIN_NOT_VALID:tY,AVV_ERR_ROOT_PLG_BOOTED:nY,AVV_ERR_READY_TIMEOUT:rY}=Kf(),lY=jS(),sp=WS(),xo=gc()("avvio"),yc=Symbol("kAvvio"),lp=Symbol("kThenifyDoNotWrap");function iY(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 rp(l);if(t[i])throw new rp(i);if(t[s])throw new rp(s);t[l]=function(c,f){return n.use(c,f),this},Object.defineProperty(t,"then",{get:ZS.bind(n)}),t[yc]=!0,t[i]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(ip(c,this)),this)},t[s]=function(c){if(c&&typeof c!="function")throw new D4(s,typeof c);return n.ready(c?ip(c,this):void 0)},t[a]=function(c){if(typeof c!="function")throw new D4(a,typeof c);return n.onClose(cY(c,this)),this},t[o]=function(c){if(c&&typeof c!="function")throw new D4(o,typeof c);return c?(n.close(ip(c,this)),this):n.
causes have become circular...`;let r=Tp(t);return r?(e.add(t),n+`
caused by: `+Dx(r,e)):n},wW=t=>Dx(t,new Set),Lx=(t,e,n)=>{if(!$4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let l=Tp(t);if(l){e.add(t);let i=typeof t.cause=="function";return r+(i?"":": ")+Lx(l,e,i)}else return r},AW=t=>Lx(t,new Set);Fx.exports={isErrorLike:$4,getErrorCause:Tp,stackWithCauses:wW,messageWithCauses:AW}});var xp=k((rve,$x)=>{"use strict";var RW=Symbol("circular-ref-tag"),Oc=Symbol("pino-raw-err-ref"),Mx=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[Oc]},set:function(t){this[Oc]=t}}});Object.defineProperty(Mx,Oc,{writable:!0,value:{}});$x.exports={pinoErrProto:Mx,pinoErrorSymbols:{seen:RW,rawSymbol:Oc}}});var Bx=k((lve,Ux)=>{"use strict";Ux.exports=Ap;var{messageWithCauses:OW,stackWithCauses:NW,isErrorLike:jx}=Sp(),{pinoErrProto:IW,pinoErrorSymbols:CW}=xp(),{seen:wp}=CW,{toString:kW}=Object.prototype;function Ap(t){if(!jx(t))return t;t[wp]=void 0;let e=Object.create(IW);e.type=kW.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=OW(t),e.stack=NW(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Ap(n)));for(let n in t)if(e[n]===void 0){let r=t[n];jx(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,wp)&&(e[n]=Ap(r)):e[n]=r}return delete t[wp],e.raw=t,e}});var Hx=k((ive,qx)=>{"use strict";qx.exports=Ic;var{isErrorLike:Rp}=Sp(),{pinoErrProto:PW,pinoErrorSymbols:DW}=xp(),{seen:Nc}=DW,{toString:LW}=Object.prototype;function Ic(t){if(!Rp(t))return t;t[Nc]=void 0;let e=Object.create(PW);e.type=LW.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=>Ic(n))),Rp(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Nc)&&(e.cause=Ic(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];Rp(r)?Object.prototype.hasOwnProperty.call(r,Nc)||(e[n]=Ic(r)):e[n]=r}return delete t[Nc],e.raw=t,e}});var Xx=k((sve,Gx)=>{"use strict";Gx.exports={mapHttpRequest:FW,reqSerializer:zx};var Op=Symbol("pino-raw-req-ref"),Vx=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[Op]},set:function(t){this[Op]=t}}});Object.defineProperty(Vx,Op,{writable:!0,value:{}});function zx(t){let e=t.info||t.socket,n=Object.create(Vx);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 FW(t){return{req:zx(t)}}});var Jx=k((ave,Wx)=>{"use strict";Wx.exports={mapHttpResponse:MW,resSerializer:Yx};var Np=Symbol("pino-raw-res-ref"),Kx=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Np]},set:function(t){this[Np]=t}}});Object.defineProperty(Kx,Np,{writable:!0,value:{}});function Yx(t){let e=Object.create(Kx);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function MW(t){return{res:Yx(t)}}});var Cp=k((ove,Qx)=>{"use strict";var Ip=Bx(),$W=Hx(),Cc=Xx(),kc=Jx();Qx.exports={err:Ip,errWithCause:$W,mapHttpRequest:Cc.mapHttpRequest,mapHttpResponse:kc.mapHttpResponse,req:Cc.reqSerializer,res:kc.resSerializer,wrapErrorSerializer:function(e){return e===Ip?e:function(r){return e(Ip(r))}},wrapRequestSerializer:function(e){return e===Cc.reqS
'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 Pc=k((fve,nw)=>{"use strict";nw.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var lw=k((pve,rw)=>{"use strict";var BW=Pc();rw.exports=qW;function qW({paths:t}){let e=[];var n=0;let r=t.reduce(function(l,i,s){var a=i.match(BW).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 sw=k((dve,iw)=>{"use strict";var HW=Pc();iw.exports=VW;function VW({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:l,censorFctTakesPath:i},s){let a=Function("o",`
if (typeof o !== 'object' || o == null) {
${KW(r,e)}
}
const { censor, secret } = this
${zW(t,l,i)}
this.compileRestore()
${GW(n>0,l,i)}
${XW(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function zW(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=HW.exec(r))!==null;){let[,g]=f,{index:v,input:S}=f;v>a&&c.push(S.substring(0,v-(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) {
${c.reverse().map(g=>`
case o${o}${g} === censor:
secret[${l}].circle = ${JSON.stringify(g)}
break
`).join(`
`)}
}
`,h=n?`val, ${JSON.stringify(s)}`:"val";return`
if (${p}) {
const val = o${o}${r}
if (val === censor) {
secret[${l}].precensored = true
} else {
secret[${l}].val = val
o${o}${r} = ${e?`censor(${h})`:"censor"}
${m}
}
}
`}).join(`
`)}function GW(t,e,n){return t===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
const { before, beforeStr, after, nested } = wildcards[i]
if (nested === true) {
secret[beforeStr] = secret[beforeStr] || []
nestedRedact(secret[beforeStr], o, before, after, censor, ${e}, ${n})
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function XW(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function KW(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var Dp=k((hve,uw)=>{"use strict";uw.exports={groupRedact:WW,groupRestore:YW,nestedRedact:QW,nestedRestore:JW};function YW({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 WW(t,e,n,r,l){let i=aw(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 JW(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 QW(t,e,n,r,l,i,s){let a=aw(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];ZW(t,a,p,n,r,l,i,s)}return t}function Pp(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function ZW(t,e,n,r,l,i,s,a){let o=l.length,c=o-1,f=n;var p=-1,m,h,g,v=null,S=null,T,x,_=!1,b=0,A=0,N=eJ();if(g=m=e[n],typeof m=="object"){for(;m!=null&&++p<o&&(A+=1,n=l[p],v=g,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(_=!0),S=n,p!==c))){if(S){let C=Object.keys(m);for(var O=0;O<C.length;O++){let $=C[O];if(x=m[$],T=n==="*",_)N=e3(N,$,A),b=p,g=ow(x,b-1,n,r,l,i,s,a,f,m,h,g,T,$,p,c,N,t,e[f],A+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=j4(e3(N,$,A),g,e[f]);t.push(L),m[$]=h}else if(x[n]!==h)if(h===void 0&&i!==void 0||Pp(x,n)&&h===g)N=e3(N,$,A);else{N=e3(N,$,A);let L=j4(e3(N,n,A+1),g,e[f]);t.push(L),x[n]=h}}}S=null}else{if(g=m[n],N=e3(N,n,A),h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,!(Pp(m,n)&&h===g||h===void 0&&i!==void 0)){let C=j4(N,g,e[f]);t.push(C),m[n]=h}m=m[n]}if(typeof m!="object")break}}}function aw(t,e){for(var n=-1,r=e.length,l=t;l!=null&&++n<r;)l=l[e[n]];return l}function ow(t,e,n,r,l,i,s,a,o,c,f,p,m,h,g,v,S,T,x,_){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?p=t:p=t[n],f=g!==v?p:s?a?i(p,[...r,o,...l]):i(p):i,m){let b=j4(S,p,x);T.push(b),c[h]=f}else if(t[n]!==f){if(!(f===void 0&&i!==void 0||Pp(t,n)&&f===p)){let b=j4(e3(S,n,_+1),p,x);T.push(b),t[n]=f}}}for(let b in t)typeof t[b]=="object"&&(S=e3(S,b,_),ow(t[b],e-1,n,r,l,i,s,a,o,c,f,p,m,h,g,v,S,T,x,_+1))}function eJ(){return{parent:null,key:null,children:[],depth:0}}function e3(t,e,n){if(t.depth===n)return e3(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function j4(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 fw=k((mve,cw)=>{"use strict";var{groupRestore:tJ,nestedRestore:nJ}=Dp();cw.exports=rJ;function rJ({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),l=lJ(t,r),i=e>0,s=i?{secret:t,groupRestore:tJ,nestedRestore:nJ}:{secret:t};this.restore=Function("o",iJ(l,r,i)).bind(s)}}function lJ(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 iJ(t,e,n){return`
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
const len = keys.length
for (var i = len - 1; i >= ${e.length}; i--) {
const k = keys[i]
const o = secret[k]
if (o.flat === true) this.groupRestore(o)
else this.nestedRestore(o)
secret[k] = null
}
`:""}
${t}
return o
`}});var dw=k((gve,pw)=>{"use strict";pw.exports=sJ;function sJ(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 gw=k((yve,mw)=>{"use strict";var hw=tw(),aJ=lw(),oJ=sw(),uJ=fw(),{groupRedact:cJ,nestedRedact:fJ}=Dp(),pJ=dw(),dJ=Pc(),hJ=hw(),Lp=t=>t;Lp.restore=Lp;var mJ="[REDACTED]";Fp.rx=dJ;Fp.validator=hw;mw.exports=Fp;function Fp(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:mJ,i=typeof l=="function",s=i&&l.length>1;if(e.length===0)return n||Lp;hJ({paths:e,serialize:n,censor:l});let{wildcards:a,wcLen:o,secret:c}=aJ({paths:e,censor:l}),f=uJ({secret:c,wcLen:o}),p="strict"in t?t.strict:!0;return oJ({secret:c,wcLen:o,serialize:n,strict:p,isCensorFct:i,censorFctTakesPath:s},pJ({secret:c,censor:l,compileRestore:f,serialize:n,groupRedact:cJ,nestedRedact:fJ,wildcards:a,wcLen:o}))}});var Oo=k((_ve,yw)=>{"use strict";var gJ=Symbol("pino.setLevel"),yJ=Symbol("pino.getLevel"),_J=Symbol("pino.levelVal"),vJ=Symbol("pino.levelComp"),EJ=Symbol("pino.useLevelLabels"),bJ=Symbol("pino.useOnlyCustomLevels"),TJ=Symbol("pino.mixin"),SJ=Symbol("pino.lsCache"),xJ=Symbol("pino.chindings"),wJ=Symbol("pino.asJson"),AJ=Symbol("pino.write"),RJ=Symbol("pino.redactFmt"),OJ=Symbol("pino.time"),NJ=Symbol("pino.timeSliceIndex"),IJ=Symbol("pino.stream"),CJ=Symbol("pino.stringify"),kJ=Symbol("pino.stringifySafe"),PJ=Symbol("pino.stringifiers"),DJ=Symbol("pino.end"),LJ=Symbol("pino.formatOpts"),FJ=Symbol("pino.messageKey"),MJ=Symbol("pino.errorKey"),$J=Symbol("pino.nestedKey"),jJ=Symbol("pino.nestedKeyStr"),UJ=Symbol("pino.mixinMergeStrategy"),BJ=Symbol("pino.msgPrefix"),qJ=Symbol("pino.wildcardFirst"),HJ=Symbol.for("pino.serializers"),VJ=Symbol.for("pino.formatters"),zJ=Symbol.for("pino.hooks"),GJ=Symbol.for("pino.metadata");yw.exports={setLevelSym:gJ,getLevelSym:yJ,levelValSym:_J,levelCompSym:vJ,useLevelLabelsSym:EJ,mixinSym:TJ,lsCacheSym:SJ,chindingsSym:xJ,asJsonSym:wJ,writeSym:AJ,serializersSym:HJ,redactFmtSym:RJ,timeSym:OJ,timeSliceIndexSym:NJ,streamSym:IJ,stringifySym:CJ,stringifySafeSym:kJ,stringifiersSym:PJ,endSym:DJ,formatOptsSym:LJ,messageKeySym:FJ,errorKeySym:MJ,nestedKeySym:$J,wildcardFirstSym:qJ,needsMetadataGsym:GJ,useOnlyCustomLevelsSym:bJ,formattersSym:VJ,hooksSym:zJ,nestedKeyStrSym:jJ,mixinMergeStrategySym:UJ,msgPrefixSym:BJ}});var jp=k((vve,bw)=>{"use strict";var $p=gw(),{redactFmtSym:XJ,wildcardFirstSym:Dc}=Oo(),{rx:Mp,validator:KJ}=$p,_w=KJ({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})`}),vw="[Redacted]",Ew=!1;function YJ(t,e){let{paths:n,censor:r}=WJ(t),l=n.reduce((a,o)=>{Mp.lastIndex=0;let c=Mp.exec(o),f=Mp.exec(o),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=Dc),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!==Dc&&a[p].length===0&&a[p].push(...a[Dc]||[]),p===Dc&&Object.keys(a).forEach(function(g){a[g]&&a[g].push(h)}),a[p].push(h),a},{}),i={[XJ]:$p({paths:n,censor:r,serialize:e,strict:Ew})},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]=$p({paths:l[o],censor:c,serialize:e,strict:Ew})}return a},i)}function WJ(t){if(Array.isArray(t))return t={paths:t,censor:vw},_w(t),t;let{paths:e,censor:n=vw,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),_w({paths:e,censor:n}),{paths:e,censor:
${T}`,b=`,
${T}`);let J=Math.min(x.length,s),Y=0;for(;Y<J-1;Y++){let ye=a(String(Y),x,g,v,S,T);_+=ye!==void 0?ye:"null",_+=b}let Q=a(String(Y),x,g,v,S,T);if(_+=Q!==void 0?Q:"null",x.length-1>s){let ye=x.length-s-1;_+=`${b}"... ${na(ye)} not stringified"`}return S!==""&&(_+=`
${A}`),g.pop(),`[${_}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let C="",$="";S!==""&&(T+=S,b=`,
${T}`,C=" ");let L=Math.min(O,s);l&&!cd(x)&&(N=ud(N)),g.push(x);for(let J=0;J<L;J++){let Y=N[J],Q=a(Y,x,g,v,S,T);Q!==void 0&&(_+=`${$}${L3(Y)}:${C}${Q}`,$=b)}if(O>s){let J=O-s;_+=`${$}"...":${C}"${na(J)} not stringified"`,$=b}return S!==""&&$.length>1&&(_=`
${T}${_}
${A}`),g.pop(),`{${_}}`}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,v,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return L3(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return n;let x=T,_="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,_+=`
${T}`,b=`,
${T}`);let O=Math.min(h.length,s),C=0;for(;C<O-1;C++){let L=o(String(C),h[C],g,v,S,T);_+=L!==void 0?L:"null",_+=b}let $=o(String(C),h[C],g,v,S,T);if(_+=$!==void 0?$:"null",h.length-1>s){let L=h.length-s-1;_+=`${b}"... ${na(L)} not stringified"`}return S!==""&&(_+=`
${x}`),g.pop(),`[${_}]`}g.push(h);let A="";S!==""&&(T+=S,b=`,
${T}`,A=" ");let N="";for(let O of v){let C=o(O,h[O],g,v,S,T);C!==void 0&&(_+=`${N}${L3(O)}:${A}${C}`,N=b)}return S!==""&&N.length>1&&(_=`
${T}${_}
${x}`),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 c(m,h,g,v,S){switch(typeof h){case"string":return L3(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,v,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+=v;let C=`
${S}`,$=`,
${S}`,L=Math.min(h.length,s),J=0;for(;J<L-1;J++){let Q=c(String(J),h[J],g,v,S);C+=Q!==void 0?Q:"null",C+=$}let Y=c(String(J),h[J],g,v,S);if(C+=Y!==void 0?Y:"null",h.length-1>s){let Q=h.length-s-1;C+=`${$}"... ${na(Q)} not stringified"`}return C+=`
${T}`,g.pop(),`[${C}]`}let x=Object.keys(h),_=x.length;if(_===0)return"{}";if(i<g.length+1)return'"[Object]"';S+=v;let b=`,
${S}`,A="",N="",O=Math.min(_,s);cd(h)&&(A+=SA(h,b,s),x=x.slice(h.length),O-=h.length,N=b),l&&(x=ud(x)),g.push(h);for(let C=0;C<O;C++){let $=x[C],L=c($,h[$],g,v,S);L!==void 0&&(A+=`${N}${L3($)}: ${L}`,N=b)}if(_>s){let C=_-s;A+=`${N}"...": "${na(C)} not stringified"`,N=b}return N!==""&&(A=`
${S}${A}
${T}`),g.pop(),`{${A}}`}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 L3(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 v="";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),A=0;for(;A<b-1;A++){let O=f(String(A),h[A],g);v+=O!==void 0?O:"null",v+=","}let N=f(String(A),h[A],g);if(v+=N!==void 0?N:"null",h.length-1>s){let O=h.length-s-1;v+=`,"... ${na(O)} not stringified"`}return g.pop(),`[${v}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",_=Math.min(T,s);cd(h)&&(v+=SA(h,",",s),S=S.slice(h.length),_-=h.length,x=","),l&&(S=ud(S)),g.push(h);for(let b=0;b<_;b++){let A=S[b],N=f(A,h[A],g);N!==void 0&&(v+=`${x}${L3(A)}:${N}`,x=",")}if(T>s){let b=T-s;v+=`${x}"...":"${na(b)} not stringified"`}return 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 p(m,h,g){if(arguments.length>1){let v="";if(typeof g=="number"?v=" ".repeat(Math.min(g,10)):typeof g=="string"&&(v=g.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,v,"");if(Array.isArray(h))return o("",m,[],bee(h),v,"")}if(v.length!==0)return c("",m,[],v,"")}return f("",m,[])}return p}});var IA=k((Fve,NA)=>{"use strict";var dd=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:OA}=Vc(),See=OA.info;function xee(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(OA);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,[dd]:!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,v;for(let S=Aee(h.length,e.dedupe);Oee(S,h.length,e.dedupe);S=Ree(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(v=p.stream,v[dd]){let{lastTime:T,lastMsg:x,lastObj:_,lastLogger:b}=this;v.lastLevel=m,v.lastTime=T,v.lastMsg=x,v.lastObj=_,v.lastLogger=b}v.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,v;typeof f.levelVal=="number"?v=f.levelVal:typeof f.level=="string"?v=g[f.level]:typeof f.level=="number"?v=f.level:v=See;let S={stream:m,level:v,levelVal:void 0,id:n++};return h.unshift(S),h.sort(wee),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,[dd]:!0}}}function wee(t,e){return t.level-e.level}function Aee(t,e){return e?t-1:0}function Ree(t,e){return e?t-1:t+1}function Oee(t,e,n){return n?t>=0:t<e}NA.exports=xee});var HA=k((Mve,p2)=>{"use strict";var Nee=require("os"),$A=Cp(),Iee=kp(),Cee=jp(),jA=Sw(),kee=TA(),UA=Oo(),{configure:Pee}=RA(),{assertDefaultLevelFound:Dee,mappings:BA,genLsCache:Lee,genLevelComparison:Fee,assertLevelComparison:Mee}=ld(),{DEFAULT_LEVELS:$ee,SORTING_ORDER:jee}=Vc(),{createArgsNormalizer:Uee,asChindings:Bee,buildSafeSonicBoom:CA,buildFormatters:qee,stringify:hd,normalizeDestFileDescriptor:kA,noop:Hee}=Hc(),{version:Vee}=id(),{chindingsSym:PA,redactFmtSym:zee,serializersSym:DA,timeSym:Gee,timeSliceIndexSym:Xee,streamSym:Kee,stringifySym:LA,stringifySafeSym:md,strin
`:`
`),Re=Bee.bind(null,{[PA]:"",[DA]:s,[FA]:Y,[LA]:hd,[md]:$,[MA]:L}),fe="";p!==null&&(m===void 0?fe=Re(p):fe=Re(Object.assign({},p,{name:m})));let se=a instanceof Function?a:a?qA:ote,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(C&&typeof C!="string")throw Error(`Unknown msgPrefix type "${typeof C}" - expected "string"`);Dee(h,g,x);let q=BA(g,x);Mee(v);let re=Fee(v);return Object.assign(e,{levels:q,[nte]:re,[rte]:x,[Kee]:r,[Gee]:se,[Xee]:ge,[LA]:hd,[md]:$,[FA]:Y,[Wee]:ye,[Jee]:Q,[Qee]:o,[Zee]:c,[ete]:f,[ite]:f?`,${JSON.stringify(f)}:{`:"",[DA]:s,[tte]:S,[ste]:T,[PA]:fe,[MA]:L,[lte]:b,silent:Hee,onChild:O,[ate]:C}),Object.setPrototypeOf(e,kee()),Lee(e),e[Yee](h),e}p2.exports=gd;p2.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=kA(t.dest||process.stdout.fd),CA(t)):CA({dest:kA(t),minLength:0});p2.exports.transport=Qp();p2.exports.multistream=IA();p2.exports.levels=BA();p2.exports.stdSerializers=hte;p2.exports.stdTimeFunctions=Object.assign({},jA);p2.exports.symbols=UA;p2.exports.version=Vee;p2.exports.default=gd;p2.exports.pino=gd});var B4=k(($ve,KA)=>{"use strict";var mte=Px(),Gc=HA(),{serializersSym:VA}=Gc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:gte,FST_ERR_LOG_INVALID_LOGGER:yte}=ll();function zA(t){if(t.stream&&t.file)throw new gte;t.file&&(t.stream=Gc.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[VA]&&(t.serializers=Object.assign({},t.serializers,e[VA])),r=e.child({},t),t.logger=e,t.genReqId=n):r=Gc(t,t.stream),r}var yd={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:Gc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function _te(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function vte(t){if(!t.logger){let r=mte;return r.child=()=>r,{logger:r,hasLogger:!1}}if(GA(t.logger))return{logger:zA({logger:t.logger,serializers:Object.assign({},yd,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({},yd,e.serializers),t.logger=e,{logger:zA(t.logger),hasLogger:!0}}function GA(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 yte(r.join(","))}else return!0}function Ete(t,e,n,r,l){let i={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,i,l||{},n);return t.childLoggerFactory!==XA&&GA(s,!0),s}function XA(t,e,n){return t.child(e,n)}KA.exports={createLogger:vte,createChildLogger:Ete,defaultChildLoggerFactory:XA,serializers:yd,now:_te}});var q4=k((jve,YA)=>{"use strict";YA.exports=bte;function Co(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function bte(t){if(t=t||{},t.circles)return Tte(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]=Co(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]=Co(a):i[s]=n(a)}return i}function r(l){if(typeof l!="object"
`:""},this._extScope=e,this._scope=new L2.Scope({parent:e}),this._nodes=[new kd]}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 Ad(e,i,r)),i}const(e,n,r){return this._def(L2.varKinds.const,e,n,r)}let(e,n,r){return this._def(L2.varKinds.let,e,n,r)}var(e,n,r){return this._def(L2.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new Jc(e,n,r))}add(e,n){return this._leafNode(new Rd(e,Et.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Dt.nil&&this._leafNode(new Cd(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 ia(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 ia(e))}else(){return this._elseNode(new Po)}endIf(){return this._endBlockNode(ia,Po)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Pd(e),n)}forRange(e,n,r,l,i=this.opts.es5?L2.varKinds.var:L2.varKinds.let){let s=this._scope.toName(e);return this._for(new Dd(i,s,n,r),()=>l(s))}forOf(e,n,r,l=L2.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 Qc("of",l,i,n),()=>r(i))}forIn(e,n,r,l=this.opts.es5?L2.varKinds.var:L2.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 Qc("in",l,i,n),()=>r(i))}endFor(){return this._endBlockNode(sa)}label(e){return this._leafNode(new Od(e))}break(e){return this._leafNode(new Nd(e))}return(e){let n=new K4;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(K4)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let l=new Ld;if(this._blockNode(l),this.code(e),n){let i=this.name("e");this._currNode=l.catch=new Y4(i),n(i)}return r&&(this._currNode=l.finally=new W4,this.code(r)),this._endBlockNode(Y4,W4)}throw(e){return this._leafNode(new Id(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 X4(e,n,r)),l&&this.code(l).endFunc(),this}endFunc(){return this._endBlockNode(X4)}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 ia))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=Fd;function aa(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Zc(t,e){return e in
|| (${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 Ine({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,gt._)`${e} !== undefined`,()=>t.assign((0,gt._)`${e}[${n}]`,r))}function Hd(t,e,n,r=Q4.Correct){let l=r===Q4.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===Q4.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=Hd;function Vd(t,e,n,r){if(t.length===1)return Hd(t[0],e,n,r);let l,i=(0,bR.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,Hd(s,e,n,r));return l}Vr.checkDataTypes=Vd;var Cne={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,gt._)`{type: ${t}}`:(0,gt._)`{type: ${e}}`};function zd(t){let e=kne(t);(0,wne.reportError)(e,Cne)}Vr.reportTypeError=zd;function kne(t){let{gen:e,data:n,schema:r}=t,l=(0,bR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}});var wR=k(n6=>{"use strict";Object.defineProperty(n6,"__esModule",{value:!0});n6.assignDefaults=void 0;var Mo=Je(),Pne=yt();function Dne(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let l in n)xR(t,l,n[l].default);else e==="array"&&Array.isArray(r)&&r.forEach((l,i)=>xR(t,i,l.default))}n6.assignDefaults=Dne;function xR(t,e,n){let{gen:r,compositeRule:l,data:i,opts:s}=t;if(n===void 0)return;let a=(0,Mo._)`${i}${(0,Mo.getProperty)(e)}`;if(l){(0,Pne.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,Mo._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,Mo._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,Mo._)`${a} = ${(0,Mo.stringify)(n)}`)}});var zr=k(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.validateUnion=nn.validateArray=nn.usePattern=nn.callValidateCode=nn.schemaProperties=nn.allSchemaProperties=nn.noPropertyInData=nn.propertyInData=nn.isOwnProperty=nn.hasPropFunc=nn.reportMissingProp=nn.checkMissingProp=nn.checkReportMissingProp=void 0;var On=Je(),Gd=yt(),$3=h2(),Lne=yt();function Fne(t,e){let{gen:n,data:r,it:l}=t;n.if(Kd(n,r,e,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,On._)`${e}`},!0),t.error()})}nn.checkReportMissingProp=Fne;function Mne({gen:t,data:e,it:{opts:n}},r,l){return(0,On.or)(...r.map(i=>(0,On.and)(Kd(t,e,i,n.ownProperties),(0,On._)`${l} = ${i}`)))}nn.checkMissingProp=Mne;function $ne(t,e){t.setParams({missingProperty:e},!0),t.error()}nn.reportMissingProp=$ne;function AR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,On._)`Object.prototype.hasOwnProperty`})}nn.hasPropFunc=AR;function Xd(t,e,n){return(0,On._)`${AR(t)}.call(${e}, ${n})`}nn.isOwnProperty=Xd;function jne(t,e,n,r){let l=(0,On._)`${e}${(0,On.getProperty)(n)} !== undefined`;return r?(0,On._)`${l} && ${Xd(t,e,n)}`:l}nn.propertyInData=jne;function Kd(t,e,n,r){let l=(0,On._)`${e}${(0,On.getProperty)(n)} === undefined`;return r?(0,On.or)(l,(0,On.not)(Xd(t,e,n))):l}nn.noPropertyInData=Kd;function RR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}nn.allSchemaProperties=RR;function Une(t,e){return RR(e).filter(n=>!(0,Gd.alwaysValidSchema)(t,e[n]))}nn.schemaProperties=Une;function Bne({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:l,errorPath:i},it:s},a,o,c){let f=c?(0,On._)`${t}, ${e}, ${r}${l}`:e,p=[[$3.default.instancePath,(0,On.strConcat)($3.default.instancePath,i)],[$3.default.parentData,s.parentData],[$3.default.parentDataProperty,s.parentDataProperty],[$3.default.rootData,$3.default.rootData]];s.opts.d
missingProperty: ${r},
depsCount: ${e},
deps: ${n}}`};var v2e={keyword:"dependencies",type:"object",schemaType:"object",error:di.error,code(t){let[e,n]=E2e(t);jO(t,e),UO(t,n)}};function E2e({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 jO(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,g1.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,g1.checkReportMissingProp)(t,c)}):(n.if((0,Dh._)`${o} && (${(0,g1.checkMissingProp)(t,a,i)})`),(0,g1.reportMissingProp)(t,i),n.else())}}di.validatePropertyDeps=jO;function UO(t,e=t.schema){let{gen:n,data:r,keyword:l,it:i}=t,s=n.name("valid");for(let a in e)(0,_2e.alwaysValidSchema)(i,e[a])||(n.if((0,g1.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))}di.validateSchemaDeps=UO;di.default=v2e});var HO=k(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var qO=Je(),b2e=yt(),T2e={message:"property name must be valid",params:({params:t})=>(0,qO._)`{propertyName: ${t.propertyName}}`},S2e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:T2e,code(t){let{gen:e,schema:n,data:r,it:l}=t;if((0,b2e.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,qO.not)(i),()=>{t.error(!0),l.allErrors||e.break()})}),t.ok(i)}};Lh.default=S2e});var Mh=k(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var g6=zr(),$2=Je(),x2e=h2(),y6=yt(),w2e={message:"must NOT have additional properties",params:({params:t})=>(0,$2._)`{additionalProperty: ${t.additionalProperty}}`},A2e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:w2e,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,y6.alwaysValidSchema)(s,n))return;let c=(0,g6.allSchemaProperties)(r.properties),f=(0,g6.allSchemaProperties)(r.patternProperties);p(),t.ok((0,$2._)`${i} === ${x2e.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,y6.schemaRefOrVal)(s,r.properties,"properties");T=(0,g6.isOwnProperty)(e,x,S)}else c.length?T=(0,$2.or)(...c.map(x=>(0,$2._)`${S} === ${x}`)):T=$2.nil;return f.length&&(T=(0,$2.or)(T,...f.map(x=>(0,$2._)`${(0,g6.usePattern)(t,x)}.test(${S})`))),(0,$2.not)(T)}function h(S){e.code((0,$2._)`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,y6.alwaysValidSchema)(s,n)){let T=e.name("valid");o.removeAdditional==="failing"?(v(S,T,!1),e.if((0,$2.not)(T),()=>{t.reset(),h(S)})):(v(S,T),a||e.if((0,$2.not)(T),()=>e.break()))}}function v(S,T,x){let _={keyword:"additionalProperties",dataProp:S,dataPropType:y6.Type.Str};x===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(_,T)}}};Fh.default=A2e});var GO=k(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var R2e=Uo(),VO=zr(),$h=yt(),zO=Mh(),O2e={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&&zO.default.code(new R2e.KeywordCxt(i,zO.default,"additionalProperties"));let s=(0,VO.allSchemaProperties)(n);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=$h.mergeEvaluated.props(e,(0,$h.toHash)(s),i.props));let a=s.filter(p=>!(0,$h.alwaysValidSchema)(i,n[p]));if(a.le
`,l+=`const validator = Validator.restoreFromState(validatorState)
`):l+=`const validator = null
`,`
'use strict'
const { dependencies } = require('fast-json-stringify/lib/standalone')
const { Serializer, Validator } = dependencies
const serializerState = ${JSON.stringify(n.getState())}
const serializer = Serializer.restoreFromState(serializerState)
${l}
module.exports = ${t.toString()}(validator, serializer)`}dm.exports=A3e;dm.exports.dependencies={Serializer:Ed(),Validator:pm()}});var zN=k((abe,VN)=>{"use strict";var{dependencies:R3e}=hm(),{Serializer:O3e,Validator:sbe}=R3e,N3e={mode:"standalone"},I3e=O3e.restoreFromState(N3e),C3e=null;VN.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}(C3e,I3e)});var E1=k((obe,YN)=>{"use strict";var GN=require("node:http").STATUS_CODES,k3e=yp(),{kReplyHeaders:ma,kReplyNextErrorHandler:N6,kReplyIsRunningOnErrorHook:P3e,kReplyHasStatusCode:D3e,kRouteContext:KN}=kr(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:L3e,FST_ERR_FAILED_ERROR_SERIALIZATION:F3e}=ll(),{getSchemaSerializer:M3e}=H4(),mm=zN(),$3e={func:U3e,toJSON(){return this.func.name.toString()+"()"}};function j3e(t,e,n){t[P3e]=!1;let r=t[KN];if(t[N6]===!1){XN(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[ma])}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[N6]||r.errorHandler;t[N6]=Object.getPrototypeOf(l),delete t[ma]["content-type"],delete t[ma]["content-length"];let i=l.func;if(!i){t[N6]=!1,XN(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?k3e(s,t):t.send(s))}function U3e(t,e,n){if(q3e(t,n),!n[D3e]||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 XN(t,e,n){let r=e.raw,l=e.statusCode;e[ma]["content-type"]=e[ma]["content-type"]??"application/json; charset=utf-8";let i;try{let s=M3e(e[KN],l,e[ma]["content-type"]);i=s===!1?mm({error:GN[l+""],code:t.code,message:t.message,statusCode:l}):s(Object.create(t,{error:{value:GN[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=mm(new F3e(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=mm(new L3e(typeof i))),e[ma]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function B3e(t=$3e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function q3e(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}YN.exports={buildErrorHandler:B3e,handleError:j3e}});var L6=k((ube,D6)=>{"use strict";var vm=require("node:stream").finished,H3e=require("node:stream").Readable,{kFourOhFourContext:WN,kPublicRouteContext:JN,kReplyErrorHandlerCalled:iI,kReplyHijacked:b1,kReplyStartTime:T1,kReplyEndTime:bm,kReplySerializer:i3,kReplySerializerDefault:C6,kReplyIsError:k6,kReplyHeaders:mn,kReplyTrailers:Pr,kReplyHasStatusCode:Tm,kReplyIsRunningOnErrorHook:Sm,kReplyNextErrorHandler:V3e,kDisableRequestLogging:sI,kSchemaResponse:P6,kReplyCacheSerializeFns:z3,kSchemaController:gm,kOptions:z3e,kRouteContext:Rt}=kr(),{onSendHookRunner:aI,onResponseHookRunner:G3e,preHandlerHookRunner:X3e,preSerializationHookRunner:K3e}=C3(),QN=bp()[Symbol.for("internals")],Y3e=B4(),Em=Y3e.now,{handleError:ZN}=E1(),{getSchemaSerializer:W3e}=H4(),ym={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:J3e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:Q3e,FST_ERR_REP_ALREADY_SENT:oI,FST_ERR_REP_SENT_VALUE:Z3e,FST_ERR_SEND_INSIDE_ONERR:ese,FST_ERR_BAD_STATUS_CODE:tse,FST_ERR_BAD_TRAILER_NAME:nse,FST_ERR_BAD_TRAILER_VALUE:rse,FST_ERR_MISSING_SERIALIZATION_FN:lse,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:ise}=ll(),{FSTDEP010:sse,FSTDEP013:ase,FSTDEP019:ose,FSTDEP020:use}=Zi
${n.functions.join(`
`)}
const main = anonymous0
return main
`:s=`
function main (input) {
let json = ''
${i}
return json
}
${n.functions.join(`
`)}
return main
`;let a=new X4e(e),o=new K4e(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 c=new Function("validator","serializer",s);return e.mode==="standalone"?hm()(c,n,a,o):c(o,a)}var J4e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],Q4e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],Z4e=["maxLength","minLength","pattern"],e1e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function hP(t){for(var e of J4e)if(e in t)return"object";for(var e of Q4e)if(e in t)return"array";for(var e of Z4e)if(e in t)return"string";for(var e of e1e)if(e in t)return"number";return t.type}function t1e(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 (
propertiesKeys.includes(key) ||
value === undefined ||
typeof value === 'function' ||
typeof value === 'symbol'
) continue
`,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)) {
${nu}
json += serializer.asString(key) + ':'
${yi(t,f,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)l+=`
${nu}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let c=e.getPropertyLocation("additionalProperties");l+=`
${nu}
json += serializer.asString(key) + ':'
${yi(t,c,"value")}
`}return l+=`
}
`,l}function n1e(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=ru(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 c of Object.keys(r.properties)){let f=i.getPropertyLocation(c);f.schema.$ref&&(f=ru(t,e,f.schema.$ref));let p=JSON.stringify(c);if(a.indexOf(c)!==-1)n+=`
${nu}
json += ${JSON.stringify(p+":")}
${yi(t,f,`obj[${p}]`)}
`;else{n+=`
if (obj[${p}] !== undefined) {
${nu}
json += ${JSON.stringify(p+":")}
${yi(t,f,`obj[${p}]`)}
}
`;let m=f.schema.default;m!==void 0&&(n+=`
else {
${nu}
json += ${JSON.stringify(p+":"+JSON.stringify(m))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=t1e(t,e)),t.wrapObjects=o,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function mP(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=ru(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=hP(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&&mP(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${dP++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function r1e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=gg({},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=gg(r,l);let c=e.getPropertyLocation("else");return c.schema=gg(r,i),`
if (validator.validate("${a}", ${n})) {
${yi(t,o,n)}
} else {
${yi(t,c,n)}
}
`}function l1e(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function gP(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=_P(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 = ${l1e("input")}
${s?"":"if (obj === null) return '{}'"}
${n1e(t,e)}
}
`,t.functions.push(i),r}function i1e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=ru(t,r,r.schema.$ref));let l=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=_P(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+=`
${o?"":"if (obj === null) return '[]'"}
if (!Array.isArray(obj)) {
throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
}
const arrayLength = obj.length
`,!n.additionalItems&&Array.isArray(l)&&(a+=`
if (arrayLength > ${l.length}) {
throw new Error(\`Item at ${l.length} does not match schema definition.\`)
}
`),fP==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${u8}) return JSON.stringify(obj)
`),a+=`
let jsonOutput = ''
`,Array.isArray(l)){for(let c=0;c<l.length;c++){let f=l[c],p=yi(t,r.getPropertyLocation(c),`obj[${c}]`);a+=`
if (${c} < arrayLength) {
if (${yP(f.type,`[${c}]`)}) {
let json = ''
${p}
jsonOutput += json
if (${c} < arrayLength - 1) {
jsonOutput += ','
}
} else {
throw new Error(\`Item at ${c} does not match schema definition.\`)
}
}
`}n.additionalItems&&(a+=`
for (let i = ${l.length}; i < arrayLength; i++) {
jsonOutput += JSON.stringify(obj[i])
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let c=yi(t,r,"obj[i]");a+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${c}
jsonOutput += json
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function yP(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 ||
(
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=>yP(l,e)).join(" || ")})`)}return n}function _P(t){return"anonymous"+t.functionsCounter++}function s1e(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=vP(t,e,n),f=o===0?"if":"else if";switch(a){case"null":i+=`
${f} (${n} === null)
${c}
`;break;case"string":{i+=`
${f}(
typeof ${n} === "string" ||
${n} === null ||
${n} instanceof Date ||
${n} instanceof RegExp ||
(
typeof ${n} === "object" &&
typeof ${n}.toString === "function" &&
${n}.toString !== Object.prototype.toString
)
)
${c}
`;break}case"array":{i+=`
${f}(Array.isArray(${n}))
${c}
`;break}case"integer":{i+=`
${f}(Number.isInteger(${n}) || ${n} === null)
${c}
`;break}default:{i+=`
${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 vP(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 += ${gP(t,e)}(${n})`;case"array":return`json += ${i1e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function a1e(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(Y4e,"\\'")}'`,l&&(i+=`
}
`),i}function yi(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=ru(t,e,r.$ref),r=e.schema),r.type===void 0){let a=hP(r);a&&(r.type=a)}if(r.if&&r.then)return r1e(t,e,n);r.allOf&&(mP(t,e,r,z4e(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=gP(t,e);i+=`
json += '{'
json += ${f}(${n})
json += ','
`}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=yi(t,p,n);i+=`
${f===0?"if":"else if"}(validator.validate("${m}", ${n}))
${h}
`}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+=a1e(e,n):Array.isArray(l)?i+=s1e(t,e,n):i+=vP(t,e,n),s&&(i+=`
}
`),i}lu.exports=_g;lu.exports.default=_g;lu.exports.build=_g;lu.exports.validLargeArrayMechanisms=pP;lu.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var TP=k((yTe,vg)=>{"use strict";var o1e=Eg();function bP(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=o1e();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)}}}vg.exports=bP;vg.exports.default=bP});var Eg=k((_Te,$1)=>{"use strict";var u1e=EP();function bg(){return function(e,n){let r=Object.assign({},n,{schema:e});return c1e.bind(null,r)}}function c1e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),u1e(e,t)}$1.exports=bg;$1.exports.default=bg;$1.exports.SerializerSelector=bg;$1.exports.StandaloneSerializer=TP()});var c3=k(j1=>{"use strict";Object.defineProperty(j1,"__esModule",{value:!0});j1.checkMetadata=void 0;var f1e=yt(),p1e={keyword:"metadata",schemaType:"object",code(t){SP(t);let{gen:e,schema:n,it:r}=t;if((0,f1e.alwaysValidSchema)(r,n))return;let l=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},l),t.ok(l)}};function SP({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}j1.checkMetadata=SP;j1.default=p1e});var c8=k(B1=>{"use strict";Object.defineProperty(B1,"__esModule",{value:!0});B1.hasRef=void 0;var xP=fa(),U1=Je(),d1e=q3(),wP=h2(),AP=fh(),h1e=c3(),m1e={keyword:"ref",schemaType:"string",code(t){(0,h1e.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,U1._)`${n} === null`),e.if((0,U1.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 d1e.default(i.opts.uriResolver,"",r,`No definition ${r}`);Tg(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=xP.compileSchema.call(i.self,new xP.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${r}`})),h=(0,AP.getValidate)(t,m),g=e.const("_errs",wP.default.errors);(0,AP.callRef)(t,h,m,m.$async),e.assign(a,(0,U1._)`${g} === ${wP.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,U1.stringify)(p)}:{ref:p});t.subschema({schema:p,dataTypes:[],schemaPath:U1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function Tg(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&Tg(n))return!0}return!1}B1.hasRef=Tg;B1.default=m1e});var xg=k(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});var g1e=/t|\s/i,y1e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,_1e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,v1e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function OP(t,e){let n=t.split(g1e);return n.length===2&&RP(n[0])&&E1e(n[1])||e&&n.length===1&&RP(n[0])}Sg.default=OP;function RP(t){let e=y1e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3];return r>=1&&r<=12&&l>=1&&(l<=v1e[r]||r===2&&l===29&&(n%100===0?n%400===0:n%4===0))}function E1e(t){let e=_1e.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}OP.code='require("ajv/dist/runtime/timestamp").default'});var iu=k(X3=>{"use strict";Object.defineProperty(X3,"__esModule",{value:!0});X3.typeErrorParams=X3.typeErrorMessage=X3.typeError=void 0;var b1e=Je();function T1e(t){return{message:e=>NP(e,t),params:e=>IP(e,t)}}X3.typeError=T1e;function NP({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}X3.typeErrorMessage=NP;function IP({parentSchema:t},e){return(0,b1e._)`{type: ${e}, nullab
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},M0e=97,$0e=48;function W3(t,e){let n="",r;for(W3.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in iD)n+=iD[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)-M0e+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-$0e;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 W3.position=e,n;function l(i){W3.position=e,W3.message=i}}J3.parseJsonString=W3;W3.message=void 0;W3.position=0;W3.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var yD=k(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});var j0e=Fg(),cD=fa(),He=Je(),U0e=q3(),Nt=h2(),B0e=zr(),q0e=c8(),H0e=wg(),Hg=sD(),fD=yt(),V0e=xg(),z0e={elements:Y0e,values:W0e,discriminator:Q0e,properties:aD,optionalProperties:aD,enum:e5e,type:Z0e,ref:t5e};function pD(t,e){let n=cD.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:l}=this.opts.code,{ownProperties:i}=this.opts,s=new He.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")},c;try{this._compilations.add(t),t.parseName=a,G0e(o),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(Nt.default.scope)}return ${f}`;let m=new Function(`${Nt.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}Kg.default=pD;var qg=(0,He._)`undefined`;function G0e(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,He._)`${Nt.default.json}, ${Nt.default.jsonPos}, ${Nt.default.jsonPart}`,!1,()=>{e.let(Nt.default.data),e.let(r),e.assign((0,He._)`${n}.message`,qg),e.assign((0,He._)`${n}.position`,qg),e.assign(Nt.default.jsonPos,(0,He._)`${Nt.default.jsonPos} || 0`),e.const(Nt.default.jsonLen,(0,He._)`${Nt.default.json}.length`),m8(t),Xg(t),e.if(Nt.default.jsonPart,()=>{e.assign((0,He._)`${n}.position`,Nt.default.jsonPos),e.return(Nt.default.data)}),e.if((0,He._)`${Nt.default.jsonPos} === ${Nt.default.jsonLen}`,()=>e.return(Nt.default.data)),cu(t)})}function m8(t){let e;for(let n of j0e.jtdForms)if(n in t.schema){e=n;break}e?K0e(t,z0e[e]):zg(t)}var X0e=uD(!0,uD(!1,cu));function K0e(t,e){let{gen:n,schema:r,data:l}=t;if(!r.nullable)return e(t);V1(t,"null",e,()=>n.assign(l,null))}function Y0e(t){let{gen:e,schema:n,data:r}=t;_i(t,"[");let l=e.let("i",0);e.assign(r,(0,He._)`[]`),Vg(t,"]",()=>{let i=e.let("el");m8({...t,schema:n.elements,data:i}),e.assign((0,He._)`${r}[${l}++]`,i)})}function W0e(t){let{gen:e,schema:n,data:r}=t;_i(t,"{"),e.assign(r,(0,He._)`{}`),Vg(t,"}",()=>J0e(t,n.values))}function Vg(t,e,n){dD(t,e,n),_i(t,e)}function dD(t,e,n){let{gen:r}=t;r.for((0,He._)`;${Nt.default.jsonPos}<${Nt.default.jsonLen} && ${g8(1)}!==${e};`,()=>{n(),V1(t,",",()=>r.break(),l)});function l(){V1(t,e,()=>{},cu)}}function J0e(t,e){let{gen:n}=t,r=n.let("key");Sa({...t,data:r}),_i(t,":"),mD(t,r,e)}function Q0e(t){let{gen:e,data:n,schema:r}=t,{discriminator:l,mapping:i}=r;_i(t,"{"),e.assign(n,(0,He._)`{}`);let s=e.const("pos",Nt.default.jsonPos),a=e.let("value"),o=e.let("tag");dD(t,"}",()=>{let c=e.let("key");Sa({...t,data:c}),_i(t,":"),e.if((0,He._)`${c} === ${l}`,()=>{Sa({...t,data:o}),e.assign((0,He._)`${n}[${c}]`,o),e.break()},()=>zg({...t,data:a}))}),e.assign(Nt.default.jsonPos,s),e.if((0,He._)`${o} === undefined`),m3(t,(0,He.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,He._)`${o} === ${c}`),hD({...t,schema:i[c]},l);e.else(),m3(t,(0,He.str)`discriminator value not in schema`),e.endIf()}function aD(t){let{gen:e,data:n}=t;_i(t,"{"),e.assign(n,(0,He._)`{}`),hD(t)}function hD(t,e){let{gen:n,schema:r,data:l}=t,{properties:i,optionalProperties:s,additio
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function LD(t){return t[Symbol.for("fastify.display-name")]}function FD(t){return!!t[Symbol.for("skip-override")]}function MD(t){let e=X1(t);if(!e)return;let n=e.dependencies;n&&(iy(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{iy(this[sy].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function $D(t){let e=X1(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&ly(this,"Fastify",n.fastify,r),n.reply&&ly(this,"Reply",n.reply,r),n.request&&ly(this,"Request",n.request,r))}var k5e={Fastify:w5e,Request:R5e,Reply:A5e};function ly(t,e,n,r){iy(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(l=>{let i=typeof r=="string"?` required by '${r}'`:"";if(!k5e[e].call(t,l))throw new N5e(l,i,e)})}function P5e(t){let e=X1(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&ry.gt(this.version,ry.coerce(n))===!0)&&n&&ry.satisfies(this.version,n,{includePrerelease:r})===!1)throw new O5e(e.name,n,this.version)}function D5e(t){let e=X1(t);if(!e)return;let n=e.name;if(n)return this[sy].push(n),n}function L5e(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&I5e(e||"anonymous")}function F5e(t){let e=D5e.call(this,t)||DD(t);return L5e.call(this,t,e),P5e.call(this,t),$D.call(this,t),MD.call(this,t),FD(t)}ay.exports={getPluginName:DD,getFuncPreview:C5e,kRegisteredPlugins:sy,getDisplayName:LD,registerPlugin:F5e};ay.exports[x5e]={shouldSkipOverride:FD,getMeta:X1,checkDecorators:$D,checkDependencies:MD}});var _8=k((GTe,jD)=>{"use strict";function M5e(t,e){let n=e||j5e();return t?U5e(t,n):n}function $5e(t,e){return t.genReqId(e)}function j5e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function U5e(t,e){return function(n){return n.headers[t]||e(n)}}jD.exports={getGenReqId:$5e,reqIdGenFactory:M5e}});var HD=k((XTe,qD)=>{"use strict";var UD=12,B5e=0,uy=[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 q5e(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",l=0,i=0,s=e,a=UD;e>-1&&e<n;){var o=BD(t[e+1],4),c=BD(t[e+2],0),f=o|c,p=uy[f];if(a=uy[256+a+p],i=i<<6|f&uy[364+p],a===UD)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===B5e)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(l)}var H5e={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 BD(t,e){var n=H5e[t];return n===void 0?255:n<<e}qD.exports=q5e});var KD=k((KTe,XD)=>{"use strict";var VD=HD(),zD=/\+/g,GD=function(){};GD.prototype=Object.create(null);function V5e(t){let e=new GD;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(zD," ")),a&&(r=VD(r)||r),p&&(l=t.slice(s+1,h),f&&(l=l.replace(zD," ")),o&&(l=VD(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}XD.exports=V5e});var WD=k((YTe,YD)=>{var vi=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase(
`).join(`
`+e+c);n+=e+o+i+p+`
`,n+=_L(s,e+c)}return n}function Z5e(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function vL(t){return Array.isArray(t)?t.map(e=>vL(e)):typeof t=="symbol"?t.toString():typeof t=="function"?Z5e(t):t}function ece(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(vL(a));r[s]=o}}return r}function tce(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function nce(t){let e={...t.opts.constraints},n=e[gL.name];return delete e[gL.name],{...t,method:n,opts:{constraints:e}}}function rce(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=tce(t.metaData),e}function lce(t){return t.reduce((e,n)=>{for(let r of e)if(mL(n.opts.constraints,r.opts.constraints)&&mL(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function ice(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(nce)),r=r.map(l=>(l.metaData=ece(l,n),l)),n.method===void 0&&(r=lce(r)),r.map(rce).join(`
${e}`)}function T8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[yL]=ice(t,n,r)),n=""),t.staticChildren)for(let l of Object.values(t.staticChildren))T8(l,e,n+l.prefix,r);if(t.parametricChildren)for(let l of Object.values(t.parametricChildren)){let i=Array.from(l.nodePaths).join("|");T8(l,e,n+i,r)}t.wildcardChild&&T8(t.wildcardChild,e,"*",r)}function sce(t,e){let n={};return T8(t,n,t.prefix,e),_L(n)}EL.exports={prettyPrintTree:sce}});var SL=k((sSe,TL)=>{"use strict";var ace=b8(),hy=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(ace.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(`
mask = ${this._constrainedIndexBitmask(r)}
value = derivedConstraints.${r}
`);let i=e.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";n.push(`
if (value === undefined) {
candidates &= mask
} else {
matches = this.constrainedHandlerStores.${r}.get(value) || 0
candidates &= ${i}
}
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(`
`))}};TL.exports=hy});var wL=k((aSe,xL)=>{"use strict";var oce=SL(),O8={STATIC:0,PARAMETRIC:1,WILDCARD:2},S8=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 oce),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},x8=class extends S8{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 w8(e),this.staticChildren[r]}},w8=class t extends x8{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=O8.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 A8(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 R8,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(" && ")}`)}},A8=class extends x8{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=O8.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},R8=class extends S8{constructor(){super(),this.kind=O8.WILDCARD}getNextNode(){return null}};xL.exports={StaticNode:w8,ParametricNode:A8,WildcardNode:R8,NODE_TYPES:O8}});var RL=k((oSe,AL)=>{"use strict";var uce=require("assert");function Q1(){if(!(this instanceof Q1))return new Q1;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}Q1.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};Q1.prototype.get=function(t){return this.store[t]};AL.exports={name:"version",mustMatchWhenDerived:!0,storage:Q1,validate(t){uce(typeof t=="string","Version should be a string")}}});var NL=k((uSe,OL)=>{"use strict";var cce=require("assert");function fce(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for
`)).bind(this)}};IL.exports=gy});var PL=k((fSe,kL)=>{"use strict";var hce=["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"];kL.exports=hce});var FL=k((pSe,LL)=>{"use strict";function DL(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 mce(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);DL(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 gce(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=DL(i,s);n+=t.slice(r,l)+a,r=l+3}return t.slice(0,e)+n+t.slice(r)}LL.exports={safeDecodeURI:mce,safeDecodeURIComponent:gce}});var Ty=k((dSe,HL)=>{"use strict";var lr=require("assert"),yce=rL(),N8=dL(),vy=$o(),{prettyPrintTree:_ce}=bL(),{StaticNode:ML,NODE_TYPES:yy}=wL(),vce=CL(),gu=PL(),_y=b8(),{safeDecodeURI:Ece,safeDecodeURIComponent:$L}=FL(),jL=/^https?:\/\/.*?\//,wa=/(\/:[^/()]*?)\?(\/?)/;if(!N8(jL))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!N8(wa))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Un(t){if(!(this instanceof Un))return new Un(t);t=t||{},this._opts=t,t.defaultRoute?(lr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(lr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(lr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=bce,t.querystringParser?(lr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:yce.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 vce(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Un.prototype.on=function(e,n,r,l,i){typeof r=="function"&&(l!==void 0&&(i=l),l=r,r={}),lr(typeof n=="string","Path should be a string"),lr(n.length>0,"The path could not be empty"),lr(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),lr(typeof l=="function","Handler should be a function");let s=n.match(wa);if(s){lr(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=n.replace(wa,"$1$2"),f=n.replace(wa,"$2");this.on(e,c,r,l,i),this.on(e,f,r,l,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=Ey(n)),this.ignoreTrailingSlash&&(n=by(n));let o=Array.isArray(e)?e:[e];for(let c of o)lr(typeof c=="string","Method should be a string"),lr(gu.includes(c),`Method '${c}' is not an http method.`),this._on(c,n,r,l,i,a)};Un.prototype._on=function(e,n,r,l,i){let s={};r.constraints!==void 0&&(lr(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 ML("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e]
Content-Length: ${Ee.length}\r
Content-Type: application/json\r
\r
${Ee}`),he.destroy(W)}function ge(W,he){W.headers["accept-version"]!==void 0&&(W.headers[a8e]=W.headers["accept-version"],W.headers["accept-version"]=void 0),h.router.lookup(W,he)}function q(W,he,Ee){if(a){let nt=tM(L.server,he),Ne=ZF(L,o,he,nt),wt=new U8(nt,null,he,null,Ne,L),qn=new u0(Ee,wt,Ne);return i===!1&&Ne.info({req:wt},"incoming request"),a(new R8e(W),wt,qn)}let je=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${W}' is not a valid url component","statusCode":400}`;Ee.writeHead(400,{"Content-Type":"application/json","Content-Length":je.length}),Ee.end(je)}function re(W,he,Ee){if(W!==!1)return function(nt){if(nt){if(a){let wt=tM(L.server,he),qn=ZF(L,o,he,wt),At=new U8(wt,null,he,null,qn,L),Ut=new u0(Ee,At,qn);return i===!1&&qn.info({req:At},"incoming request"),a(new A8e,At,Ut)}let Ne='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Ee.writeHead(500,{"Content-Type":"application/json","Content-Length":Ne.length}),Ee.end(Ne)}}}function ne(W,he){return J('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,W,he,$,m.routeHandler),this}function ee(W){return J('Cannot call "setValidatorCompiler"!'),this[es].setValidatorCompiler(W),this}function Ln(W){return J('Cannot call "setSchemaErrorFormatter"!'),sM(W),this[Gy]=W.bind(this),this}function xt(W){return J('Cannot call "setSerializerCompiler"!'),this[es].setSerializerCompiler(W),this}function Ve(W){J('Cannot call "setSchemaController"!');let he=this[es],Ee=JF.buildSchemaController(he,Object.assign({},he.opts,W));return this[es]=Ee,this.getSchema=Ee.getSchema.bind(Ee),this.getSchemas=Ee.getSchemas.bind(Ee),this}function Lt(W){return J('Cannot call "setReplySerializer"!'),this[WF]=W,this}function Xe(W){return J('Cannot call "setErrorHandler"!'),this[j8]=iM(this[j8],W.bind(this)),this}function ze(W){return J('Cannot call "setChildLoggerFactory"!'),this[Ky]=W,this}function sn(W={}){return W.includeMeta=W.includeHooks?W.includeMeta?Wy.concat(W.includeMeta):Wy:W.includeMeta,m.printRoutes(W)}function at(W,{rewriteUrl:he,logger:Ee}){let je;return function(Ne,wt){if(je===void 0&&(je=W.isAsyncConstraint()),he){Ne.originalUrl=Ne.url;let qn=he.call(O,Ne);if(typeof qn=="string")Ne.url=qn;else{let At=new M8e(Ne.url,typeof qn);Ne.destroy(At)}}W.routing(Ne,wt,re(je,Ne,wt))}}function ct(W){return J('Cannot call "setGenReqId"!'),this[Yy]=nM(this[zy].requestIdHeader,W),this}}B8.errorCodes=Ra;function sM(t){if(typeof t!="function")throw new lM(typeof t);if(t.constructor.name==="AsyncFunction")throw new lM("AsyncFunction")}q8.exports=B8;q8.exports.fastify=B8;q8.exports.default=B8});var xB=k((Awe,SB)=>{"use strict";SB.exports=Error});var AB=k((Rwe,wB)=>{"use strict";wB.exports=EvalError});var OB=k((Owe,RB)=>{"use strict";RB.exports=RangeError});var IB=k((Nwe,NB)=>{"use strict";NB.exports=ReferenceError});var Dv=k((Iwe,CB)=>{"use strict";CB.exports=SyntaxError});var Wu=k((Cwe,kB)=>{"use strict";kB.exports=TypeError});var DB=k((kwe,PB)=>{"use strict";PB.exports=URIError});var FB=k((Pwe,LB)=>{"use strict";LB.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 jB=k((Dwe,$B)=>{"use strict";var MB=typeof Symbol<"u"&&Symbol,Ode=FB();$B.exports=function(){return typeof MB!="function"||typeof Symbol!="function"||typeof MB("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ode()
`)>=0)return!1;return!0}function $he(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Pi.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Pi.call(Array(e+1),n)}}function Yv(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+Pi.call(t,","+n)+`
`+e.prev}function m7(t,e){var n=Kv(t),r=[];if(n){r.length=t.length;for(var l=0;l<t.length;l++)r[l]=ms(t,l)?e(t[l],t):""}var i=typeof Hv=="function"?Hv(t):[],s;if(n4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var o in t)ms(t,o)&&(n&&String(Number(o))===o&&o<t.length||n4&&s["$"+o]instanceof Symbol||(Mq.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof Hv=="function")for(var c=0;c<i.length;c++)$q.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}});var Xq=k((Ywe,Gq)=>{"use strict";var zq=Ga(),r4=Tq(),jhe=Vq(),Uhe=Wu(),_7=zq("%WeakMap%",!0),v7=zq("%Map%",!0),Bhe=r4("WeakMap.prototype.get",!0),qhe=r4("WeakMap.prototype.set",!0),Hhe=r4("WeakMap.prototype.has",!0),Vhe=r4("Map.prototype.get",!0),zhe=r4("Map.prototype.set",!0),Ghe=r4("Map.prototype.has",!0),Zv=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},Xhe=function(t,e){var n=Zv(t,e);return n&&n.value},Khe=function(t,e,n){var r=Zv(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},Yhe=function(t,e){return!!Zv(t,e)};Gq.exports=function(){var e,n,r,l={assert:function(i){if(!l.has(i))throw new Uhe("Side channel does not contain "+jhe(i))},get:function(i){if(_7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Bhe(e,i)}else if(v7){if(n)return Vhe(n,i)}else if(r)return Xhe(r,i)},has:function(i){if(_7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Hhe(e,i)}else if(v7){if(n)return Ghe(n,i)}else if(r)return Yhe(r,i);return!1},set:function(i,s){_7&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new _7),qhe(e,i,s)):v7?(n||(n=new v7),zhe(n,i,s)):(r||(r={key:{},next:null}),Khe(r,i,s))}};return l}});var E7=k((Wwe,Kq)=>{"use strict";var Whe=String.prototype.replace,Jhe=/%20/g,eE={RFC1738:"RFC1738",RFC3986:"RFC3986"};Kq.exports={default:eE.RFC3986,formatters:{RFC1738:function(t){return Whe.call(t,Jhe,"+")},RFC3986:function(t){return String(t)}},RFC1738:eE.RFC1738,RFC3986:eE.RFC3986}});var nE=k((Jwe,Wq)=>{"use strict";var Qhe=E7(),tE=Object.prototype.hasOwnProperty,Xa=Array.isArray,Di=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Zhe=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Xa(r)){for(var l=[],i=0;i<r.length;++i)typeof r[i]<"u"&&l.push(r[i]);n.obj[n.prop]=l}}},Yq=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},eme=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Xa(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!tE.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 Xa(e)&&!Xa(n)&&(l=Yq(e,r)),Xa(e)&&Xa(n)?(n.forEach(function(i,s){if(tE.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 tE.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},l)},tme=function(e,n){return Object.keys(n).reduce(function(r,l){return r[l]=n[l],r},e)},nme=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}},rme=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(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;++o){var c=s.charCodeAt(o);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===Qhe.RFC1738&&(c===40||c===41)){a+=s.charAt(o);continue}if(c<128){a=a+Di[c];continue}if(c<2048){a=a+(Di[192|c>>6]+Di[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Di[224|c>>12]+Di[128|c>>6&63]+Di[128|c&63]);continue}o+=1,c=65536+((c&1023)<<10|s.charCodeAt(o)&1023),a+=Di[240|c>>18]+Di[128|c>>12&63]+Di[128|c>>6&63]+Di[128|c&63]}return a},lme=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],l=0;l<n.l
`;Gt.DEFAULT_CONTENT_TYPE="application/octet-stream";Gt.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=yE.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),JH.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 Uge))&&(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)):jge.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"&&gE(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=hE.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=hE.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=hE.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=mE.lookup(t.name)),!n&&t.path&&(n=mE.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=mE.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
`+this.inner:e}};Ds.NestedError=v5;var _b=class extends v5{};Ds.DatabaseError=_b;var vb=class extends v5{};Ds.DataError=vb});var xb=k(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.getArrayIndicies=Al.validateArrayIndex=Al.validateArrayIndicies=Al.isInt=Al.ArrayInfo=Al.arrayRegex=void 0;var $7=m4(),m_e=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Al.arrayRegex=m_e;var Eb={},bb=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,Tb(r))this.index=parseInt(r);else if(!this.append)throw new $7.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(Eb[e])return Eb[e];let r=(0,Al.arrayRegex)().exec(e.trim());if(r!=null){let l=r[1],i="["+r[2].toString()+"]",s=Sb(i);return yG(s),Eb[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 $7.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 $7.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}};Al.ArrayInfo=bb;function Tb(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Al.isInt=Tb;function yG(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")}Al.validateArrayIndicies=yG;function _G(t){if(t.length!==0&&!Tb(t))throw new $7.DataError("Only numerical values accepted for array index",200)}Al.validateArrayIndex=_G;function Sb(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));_G(e);let n=e.length+2;return[e,...Sb(t.substring(n))]}Al.getArrayIndicies=Sb});var bG=k(j7=>{"use strict";Object.defineProperty(j7,"__esModule",{value:!0});j7.DBParentData=void 0;var vG=xb(),EG=m4(),wb=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=vG.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new EG.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=vG.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 EG.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]}};j7.DBParentData=wb});var SG=k((ACe,TG)=>{TG.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)
`:t(e.children):a9(e)?t(e.children):Oi(e)?e.data:""},textContent:$u,innerText:c9,getChildren:b9,getParent:k$,getSiblings:P$,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:Y_,prevElementSibling:W_,removeElement:Ia,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){Ia(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){Ia(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){Ia(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){Ia(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:J8,find:J_,findOneChild:function(t,e){return e.find(t)},findOne:b_,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=mM(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=mM(t))?J8(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),b_(D$("id",t),e,n)},getElementsByTagName:ku,getElementsByTagType:function(t,e,n=!0,r=1/0){return J8(f9.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 b2},compareDocumentPosition:L$,uniqueSort:ju,getFeed:function(t){return(t=H8(c9e,t))?(t.name==="feed"?function(e){var n={type:"atom",items:ku("entry",e=e.children).map(l=>{var i={media:gM(l=l.children)},s=($l(i,"id","id",l),$l(i,"title","title",l),(s=H8("link",l))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=ts("summary",l)||ts("content",l))&&(i.description=s),(s=ts("updated",l))&&(i.pubDate=new Date(s)),i})},r=($l(n,"id","id",e),$l(n,"title","title",e),(r=H8("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),$l(n,"description","subtitle",e),(r=ts("updated",e))&&(n.updated=new Date(r)),$l(n,"author","email",e,!0),n}:function(r){var n=(n=(n=H8("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:ku("item",r.children).map(i=>{var s={media:gM(i=i.children)};return $l(s,"id","guid",i),$l(s,"title","title",i),$l(s,"link","link",i),$l(s,"description","description",i),(i=ts("pubDate",i)||ts("dc:date",i))&&(s.pubDate=new Date(i)),s})},l=($l(r,"title","title",n),$l(r,"link","link",n),$l(r,"description","description",n),ts("lastBuildDate",n));return l&&(r.updated=new Date(l)),$l(r,"author","managingEditor",n,!0),r})(t):null}}),Pu=function(){return(Pu=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 F$(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function f9e(t,e){return F$(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,Pu(Pu(Pu({},K_),this==null?void 0:this._options),__(e??{})))}function p9e(t){return F$(this,t,Pu(Pu({},this._options),{xmlMode:!0}))}function L0(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=$u(e[r]);return n}function d9e(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,K_,!1),n||e("script
: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])"},q$={};function H$(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 A_(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 r_=(t,e,n,r,l)=>{let i=l(e,A_(n),r);return i===St.trueFunc?t:i===St.falseFunc?St.falseFunc:s=>i(s)&&t(s)},l_={is:r_,matches:r_,where:r_,not(t,e,n,r,l){let i=l(e,A_(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=A_(n),a=(s.relativeSelector=!0,e.some(f=>f.some(x_))?[q$]:void 0),o=l(e,s,a);if(o===St.falseFunc)return St.falseFunc;let c=function(f,p){return f===St.falseFunc?St.falseFunc:m=>p.isTag(m)&&f(m)}(o,i);if(a&&o!==St.trueFunc){let{shouldTestNextSiblings:f=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var m=i.getChildren(h),h=f?[...m,...H$(h,i)]:m;return i.existsOne(c,h)}}return f=>t(f)&&i.existsOne(c,i.getChildren(f))}};function i_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function k9e(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()),O9e[e.action](t,e,n);case Qe.Pseudo:return function(a,o,c,f,p){let{name:m,data:h}=o;if(Array.isArray(h)){if(m in l_)return l_[m](a,h,c,f,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(o=c.pseudos)==null?void 0:o[m],v=typeof g=="string"?g:C9e[m];if(typeof v=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=S9(v);return l_.is(a,S,c,f,p)}if(typeof g=="function")return OM(g,m,h,1),S=>g(S,h)&&a(S);if(m in w_)return w_[m](a,h,c,f);if(m in RM){let S=RM[m];return OM(S,m,h,2),T=>S(T,c,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 c=o;for(;c=i_(c,i);)if(t(c))return!0;return!1};let a=new WeakSet;return function(o){let c=o;for(;c=i_(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=i_(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 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 Qe.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 Qe.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not ye
`)}}):{name:r,value:l.replace(IM,`\r
`)}}).toArray()}}),E0=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}},lv=(E0.prototype.cheerio="[cheerio object]",E0.prototype.splice=Array.prototype.splice,E0.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(E0.prototype,_9e,Z9e,i7e,s7e,o7e),function(t,e){return(lv=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)}),u7e=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}lv(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},b0=function(){return(b0=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)},c7e=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]),Dn="\uFFFD",CM=(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||{}),"--"),kM="[CDATA[",PM="doctype",Eu="script",f7e="public",p7e="system";function lj(t){return 55296<=t&&t<=57343}function ij(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function sj(t){return 64976<=t&&t<=65007||c7e.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="missin
`,this.firstUpdate&&($+=" "),this.message=$+(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(_){return _?typeof _=="string"?_.split("."):[_]:[]}(T);return function(_){for(var b=_,A=0;A<x.length;A++){var N=x[A];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function v(T,x,_){return Array.prototype.indexOf.call(T||[],x,_)}function S(T){var x,_=[];for(x in T)s(T,x)&&_.push(x);return _}i.hasOwnProp=s,i._prettifyError=function(T,x,_){return(_=_.Update?_:new i.TemplateError(_)).Update(T),x||(T=_,(_=new Error(T.message)).name=T.name),_},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,_){for(var b={},A=c(x)?x:h(x),N=0;N<T.length;N++){var O=T[N],C=A(O,N);if(C===void 0&&_===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[C]||(b[C]=[])).push(O)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var _=T.length,b=g(arguments).slice(1),A=-1;++A<_;)v(b,T[A])===-1&&x.push(T[A]);return x},i.repeat=function(T,x){for(var _="",b=0;b<x;b++)_+=T;return _},i.each=function(T,x,_){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,_);else if(T.length===+T.length)for(var b=0,A=T.length;b<A;b++)x.call(_,T[b],b,T)}},i.map=function(T,x){var _=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)_[_.length]=x(T[b],b);T.length===+T.length&&(_.length=T.length)}return _},i.asyncIter=function(T,x,_){var b=-1;(function A(){++b<T.length?x(T[b],b,A,_):_()})()},i.asyncFor=function(T,x,_){var b=S(T||{}),A=b.length,N=-1;(function O(){var C=b[++N];N<A?x(C,T[C],N,A,O):_()})()},i.indexOf=v,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(_){T[_]=x[_]}),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 Cj(){throw new Error("setTimeout has not been defined")}function kj(){throw new Error("clearTimeout has not been defined")}var ls=Cj,is=kj;function Pj(t){if(ls===setTimeout)return setTimeout(t,0);if((ls===Cj||!ls)&&setTimeout)return(ls=setTimeout)(t,0);try{return ls(t,0)}catch{try{return ls.call(null,t,0)}catch{return ls.call(this,t,0)}}}typeof _3.setTimeout=="function"&&(ls=setTimeout),typeof _3.clearTimeout=="function"&&(is=clearTimeout);var Da,E3=[],Fu=!1,r9=-1;function ufe(){Fu&&Da&&(Fu=!1,Da.length?E3=Da.concat(E3):r9=-1,E3.length)&&Dj()}function Dj(){if(!Fu){var t=Pj(ufe);Fu=!0;for(var e=E3.length;e;){for(Da=E3,E3=[];++r9<e;)Da&&Da[r9].run();r9=-1,e=E3.length}Da=null,Fu=!1,function(n){if(is===clearTimeout)return clearTimeout(n);if((is===kj||!is)&&clearTimeout)return(is=clearTimeout)(n);try{is(n)}catch{try{return is.call(null,n)}catch{return is.call(this,n)}}}(t)}}function Lj(t,e){this.fun=t,this.array=e}function Ba(){}Lj.prototype.run=function(){this.fun.apply(null,this.array)};var cfe=Ba,ffe=Ba,pfe=Ba,dfe=Ba,hfe=Ba,mfe=Ba,gfe=Ba,Au=_3.performance||{},yfe=Au.now||Au.mozNow||Au.msNow||Au.oNow||Au.webkitNow||function(){return new Date().getTime()},_fe=new Date,fs={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];E3.push(new Lj(t,e)),E3.length!==1||Fu||Pj(Dj)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:cfe,addListener:ffe,once:pfe,off:dfe,removeListener:hfe,removeAllListeners:mfe,emit:gfe,binding:function(t){throw new Error("process.
\r\xA0`,m$="()[]{}%*-+~/#,:|.<>=!",Bj="string",qj="whitespace",Hj="data",Vj="block-start",zj="block-end",Gj="variable-start",Xj="variable-end",Kj="comment",Yj="left-paren",Wj="right-paren",Jj="left-bracket",Qj="right-bracket",Zj="left-curly",eU="right-curly",tU="operator",nU="comma",rU="colon",lU="tilde",iU="pipe",sU="float",aU="boolean",V_="none",oU="symbol",uU="regex";function xl(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var xfe=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 xl(Bj,this._parseString(l),n,r);if(h=this._extract(h$))return xl(qj,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())),xl(zj,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,xl(Xj,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 xl(uU,{body:i,flags:a},n,r)}if(m$.indexOf(l)!==-1){this.forward();var o,c=["==","===","!=","!==","<=",">=","//","**"],f=l+this.current();switch(Ce.indexOf(c,f)!==-1&&(this.forward(),Ce.indexOf(c,(l=f)+this.current())!==-1)&&(l=f+this.current(),this.forward()),l){case"(":o=Yj;break;case")":o=Wj;break;case"[":o=Jj;break;case"]":o=Qj;break;case"{":o=Zj;break;case"}":o=eU;break;case",":o=nU;break;case":":o=rU;break;case"~":o=lU;break;case"|":o=iU;break;default:o=tU}return xl(o,l,n,r)}if((h=this._extractUntil(h$+m$)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),xl(sU,h+"."+c,n,r)):xl("int",h,n,r);if(h.match(/^(true|false)$/))return xl(aU,h,n,r);if(h==="none"||h==="null")return xl(V_,h,n,r);if(h)return xl(oU,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,xl(Vj,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,xl(Gj,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 v=h.slice(-this.colno);if(/^\s+$/.test(v)&&!(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 xl(g?Kj:Hj,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 xfe(t,e)},TOKEN_STRING:Bj,TOKEN_WHITESPACE:qj,TOKEN_DATA:Hj,TOKEN_BLOCK_START:Vj,TOKEN_BLOCK_END:zj,TOKEN_VARIABLE_START:Gj,TOKEN_VARIABLE_END:Xj,TOKEN_COMMENT:Kj,TOKEN_LEFT_PAREN:Yj,TOKEN_RIGHT_PAREN:Wj,TOKEN_LEFT_BRACKET:Jj,TOKEN_RIGHT_BRACKET:Qj,TOKEN_LEFT_CURLY:Zj,TOKEN_RIGHT_CURLY:eU,TOKEN_OPERATOR:tU,TOKEN_COMMA:nU,TOKEN_COLON:rU,TOKEN_TILDE:lU,TOKEN_PIPE:iU,TOKEN_INT:"int",TOKEN_FLOAT:sU,TOKEN_BOOLEAN:aU,TOKEN_NONE:V_,TOKEN_SYMBOL:oU,TOKEN_SPECIAL:"special",TOKEN_REGEX:uU};function g$(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 av(t,e,n){return e&&g$(t.prototype,e),n&&g$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function cU(t,e){t.prototype=Object.create(e.prototype),fU(t.prototype.constructor=t,e)}function fU(t,e){return(fU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function pU(t,e,n){n=n||{},Ce.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 cU(i,l),av(i,[{key:"typename",get:function(){return e}}]),i}(t);return Ce._assign(r.prototype,n),r}var wfe=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"),pU(this,e,n)},av(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Afe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return cU(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),pU(this,n,r)},av(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(ln),qu={Obj:wfe,EmitterObj:Afe};function y$(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 ov(t,e,n){return e&&y$(t.prototype,e),n&&y$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function w9(t,e){t.prototype=Object.create(e.prototype),dU(t.prototype.constructor=t,e)}function dU(t,e){return(dU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function _$(t,e,n){t instanceof e&&n.push(t),t instanceof pn&&t.findAll(e,n)}var pn=function(t){function e(){return t.apply(this,arguments)||this}w9(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 Ni?this.children.forEach(function(s){return _$(s,r,l)}):this.fields.forEach(function(s){return _$(i[s],r,l)}),l},n.iterFields=function(r){var l=this;this.fields.forEach(function(i){r(l[i],i)})},e}(qu.Obj),uv=function(t){function e(){return t.apply(this,arguments)||this}return w9(e,t),ov(e,[{key:"ty
`);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:pn,Root:Rfe,NodeList:Ni,Value:uv,Literal:hU,Symbol:Ofe,Group:Nfe,Array:Ife,Pair:Cfe,Dict:mU,Output:Yfe,Capture:Wfe,TemplateData:Jfe,If:gU,IfAsync:Pfe,InlineIf:Dfe,For:cv,AsyncEach:Lfe,AsyncAll:Ffe,Macro:yU,Caller:Mfe,Import:$fe,FromImport:jfe,FunCall:_U,Filter:vU,FilterAsync:Ufe,KeywordArgs:Bfe,Block:qfe,Super:Hfe,Extends:Vfe,Include:zfe,Set:Gfe,Switch:Xfe,Case:Kfe,LookupVal:kfe,BinOp:Ql,In:Qfe,Is:Zfe,Or:epe,And:tpe,Not:npe,Add:rpe,Concat:lpe,Sub:ipe,Mul:spe,Div:ape,FloorDiv:ope,Mod:upe,Pow:cpe,Neg:fpe,Pos:ppe,Compare:dpe,CompareOperand:hpe,CallExtension:z_,CallExtensionAsync:mpe,printNodes:function t(e,n){var r,l;n=n||0,Tu(e.typename+": ",n),e instanceof Ni?(Tu(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof z_?(Tu(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 pn?r.push([s,i]):(l=l||{})[s]=i}),l?Tu(JSON.stringify(l,null,2)+`
`,null,!0):Tu(`
`),r.forEach(function(a){var s=a[0],a=a[1];Tu("["+s+"] =>",n+2),t(a,n+4)}))}};function EU(t,e){return(EU=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 v$=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),EU(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 Ce.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.
`)},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(c,f){0<f&&o._emit(","),o.compile(c,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,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 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&&!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 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(" "+Spe[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)
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(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 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,v){var S=f._tmpid();f._emitLine("var "+S+" = "+h+"["+p+"]["+v+"];"),f._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+v+"]);"),i.set(l.name.children[v].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 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(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,v){var s=this,a=[],o=null,c="macro_"+this._tmpid(),f=v!==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=f?v.push(!0):
`))})},r.compileRoot=function(l,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new p_,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,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 p_,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}(qu.Obj),xpe={compile:function(s,e,n,r,l){var i=new b$(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(vpe.transform(gpe.parse(s,n,l),e,r)),i.getCode()},Compiler:b$},wpe=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(Ce.isString(h))return h.split("");if(Ce.isObject(h))return Ce._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(Ce.isArray(h))return h;throw new Ce.TemplateError("list filter: type not iterable")}function i(h){return function(g,v,S){var T=this,x=T.env.getTest(v=v===void 0?"truthy":v);return Ce.toArray(g).filter(function(_){return x.call(T,_,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,v){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(v)for(x=T.length;x<g;x++)T.push(v);S.push(T)}return S},t.capitalize=r,t.center=function(h,g){var v;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,v=Ce.repeat(" ",g/2-g%2),g=Ce.repeat(" ",g/2),it.copySafeness(h,v+h+g))},t.default=function(h,g,v){return v?h||g:h!==void 0?h:g},t.dictsort=function(h,g,v){if(!Ce.isObject(h))throw new Ce.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(v===void 0||v==="key")S=0;else{if(v!=="value")throw new Ce.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(_,b){return _=_[S],b=b[S],g||(Ce.isString(_)&&(_=_.toUpperCase()),Ce.isString(b)&&(b=b.toUpperCase())),b<_?1:_===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(Ce.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(Ce.escape((h=h??"").toString()))},t.groupby=function(h,g){return Ce.groupBy(h,g,this.env.opts.throwOnUndefined)},t.indent=function(h,x,v){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
`),T=Ce.repeat(" ",x),x=S.map(function(_,b){return b!==0||v?""+T+_:_}).join(`
`);return it.copySafeness(h,x)},t.join=function(h,g,v){return g=g||"",(h=v?Ce.map(h,function(S){return S[v]}):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:(!Ce.isObject(h)||h instanceof it.SafeString?h:Ce.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(v){return!v[g]})},t.select=i(!0),t.selectattr=function(h,g){return h.filter(function(v){return!!v[g]})},t.replace=function(h,g,v,S){var T=h;if(g instanceof RegExp)return h.replace(g,v);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=v+h.split("").join(v)+v,it.copySafeness(h,x);var _=h.indexOf(g);if(S===0||_===-1)return h;for(var b=0,A=0;-1<_&&(S===-1||A<S);)x+=h.substring(b,_)+v,b=_+g.length,A++,_=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),it.copySafeness(T,x)},t.reverse=function(h){var g;return(g=Ce.isString(h)?l(h):Ce.map(h,function(v){return v})).reverse(),Ce.isString(h)?it.copySafeness(h,g.join("")):g},t.round=function(h,g,v){return g=g||0,g=Math.pow(10,g),(v==="ceil"?Math.ceil:v==="floor"?Math.floor:Math.round)(h*g)/g},t.slice=function(h,g,v){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],_=0,b=0;b<g;b++){var A=_+b*S;b<T&&_++,A=h.slice(A,_+(b+1)*S),v&&T<=b&&A.push(v),x.push(A)}return x},t.sum=function(h,g,v){return(v=v===void 0?0:v)+(h=g?Ce.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,v,S){var T=this,x=Ce.map(x,function(b){return b}),_=Ce.getAttrGetter(S);return x.sort(function(b,A){if(b=S?_(b):b,A=S?_(A):A,T.env.opts.throwOnUndefined&&S&&(b===void 0||A===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!v&&Ce.isString(b)&&Ce.isString(A)&&(b=b.toLowerCase(),A=A.toLowerCase()),b<A?g?1:-1:A<b?g?-1:1:0}),x}),t.string=function(h){return it.copySafeness(h,h)},t.striptags=function(h,S){var v=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?v.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`).replace(/\n\n\n+/g,`
`):v.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,v,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=v?h.substring(0,g):((v=h.lastIndexOf(" ",g))===-1&&(v=g),h.substring(0,v)),it.copySafeness(T,h+=S??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var g=encodeURIComponent;return Ce.isString(h)?g(h):(Ce.isArray(h)?h:Ce._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,v){n(g)&&(g=1/0);var S=v===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(a),_=(x=x?x[1]:T).substr(0,g);return c.test(x)?'<a href="'+x+'"'+S+">"+_+"</a>":f.test(x)?'<a href="http://'+x+'"'+S+">"+_+"</a>":o.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+_+"</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,v){return v===void 0&&(v=10),n(h=parseInt(h,v))?g:h}));t.int=m,t.d=t.default,t.e=t.escape}),v9={};function wU(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 Ape=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,d_=function(t){return Ape.exec(t).slice(1)};function h_(){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?"/":"")+wU(pv(t.split("/"),function(l){return!!l}),!e).join("/")||"."}function T$(t){var e=AU(t),n=Rpe(t,-1)==="/";return(t=(t=wU(pv(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function AU(t){return t.charAt(0)==="/"}var Mu={extname:function(t){return d_(t)[3]},basename:function(t,e){return t=d_(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=d_(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=h_(t).substr(1),e=h_(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 T$(pv(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:AU,normalize:T$,resolve:h_};function pv(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 Rpe="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 RU(t,e){return(RU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var dv=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),RU(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(l,i){return Mu.resolve(Mu.dirname(l),i)},r.isRelative=function(l){return l.indexOf("./")===0||l.indexOf("../")===0},n}(qu.EmitterObj);function OU(t,e){return(OU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Ope=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),OU(e.prototype.co
/* [wrapped with `+D+`] */
`)):R}(w,function(R,D){return mr(m,function(U){var H="_."+U[0];D&U[1]&&!A2(R,H)&&R.push(H)}),R.sort()}(function(){var R=w.match(Rl);return R?R[1].split(kn):[]}(),y)))}function GT(u){var d=0,y=0;return function(){var w=qG(),R=16-(w-y);if(y=w,0<R){if(800<=++d)return arguments[0]}else d=0;return u.apply(n,arguments)}}function Z5(u,d){var y=-1,w=u.length,R=w-1;for(d=d===n?w:d;++y<d;){var D=sf(y,R),U=u[D];u[D]=u[y],u[y]=U}return u.length=d,u}var XT=function(){var u=rc(function(y){var w=[];return y.charCodeAt(0)===46&&w.push(""),y.replace(nt,function(R,D,U,H){w.push(U?H.replace(Ur,"$1"):D||R)}),w},function(y){return d.size===500&&d.clear(),y}),d=u.cache;return u}();function ai(u){var d;return typeof u=="string"||Kl(u)?u:(d=u+"")=="0"&&1/u==-1/0?"-0":d}function Ws(u){if(u!=null){try{return I5.call(u)}catch{}try{return u+""}catch{}}return""}function KT(u){var d;return u instanceof Pt?u.clone():((d=new O2(u.__wrapped__,u.__chain__)).__actions__=Ol(u.__actions__),d.__index__=u.__index__,d.__values__=u.__values__,d)}function YT(u,d,y){var w=u==null?0:u.length;return w?((y=y==null?0:mt(y))<0&&(y=yr(w+y,0)),ti(u,Ze(d,3),y)):-1}function WT(u,d,y){var w,R=u==null?0:u.length;return R?(w=R-1,y!==n&&(w=mt(y),w=y<0?yr(R+w,0):Zr(w,R-1)),ti(u,Ze(d,3),w,!0)):-1}function JT(u){return u!=null&&u.length?qr(u,1):[]}function QT(u){return u&&u.length?u[0]:n}function o2(u){var d=u==null?0:u.length;return d?u[d-1]:n}function ZT(u,d){return u&&u.length&&d&&d.length?lf(u,d):u}X7=vt(function(u,d){return Zn(u)?A4(u,qr(d,1,Zn,!0)):[]}),li=vt(function(u,d){var y=o2(d);return Zn(y)&&(y=n),Zn(u)?A4(u,qr(d,1,Zn,!0),Ze(y,2)):[]}),T4=vt(function(u,d){var y=o2(d);return Zn(y)&&(y=n),Zn(u)?A4(u,qr(d,1,Zn,!0),n,y):[]}),Mt=vt(function(u){var d=Kt(u,ff);return d.length&&d[0]===u[0]?ef(d):[]}),oo=vt(function(u){var d=o2(u),y=Kt(u,ff);return d===o2(y)?d=n:y.pop(),y.length&&y[0]===u[0]?ef(y,Ze(d,2)):[]}),K7=vt(function(u){var d=o2(u),y=Kt(u,ff);return(d=typeof d=="function"?d:n)&&y.pop(),y.length&&y[0]===u[0]?ef(y,n,d):[]}),el=vt(ZT);var rX=Xi(function(u,d){var y=u==null?0:u.length,w=W7(u,d);return pT(u,Kt(d,function(R){return Ki(R,y)?+R:R}).sort(TT)),w});function wf(u){return u==null?u:VG.call(u)}var lX=vt(function(u){return R3(qr(u,1,Zn,!0))}),iX=vt(function(u){var d=o2(u);return Zn(d)&&(d=n),R3(qr(u,1,Zn,!0),Ze(d,2))}),sX=vt(function(u){var d=typeof(d=o2(u))=="function"?d:n;return R3(qr(u,1,Zn,!0),n,d)});function Af(u){var d;return u&&u.length?(d=0,u=Rr(u,function(y){if(Zn(y))return d=yr(y.length,d),!0}),x5(d,function(y){return Kt(u,ni(y))})):[]}function eS(u,d){return u&&u.length?(u=Af(u),d==null?u:Kt(u,function(y){return Ar(d,n,y)})):[]}var aX=vt(function(u,d){return Zn(u)?A4(u,d):[]}),oX=vt(function(u){return cf(Rr(u,Zn))}),uX=vt(function(u){var d=o2(u);return Zn(d)&&(d=n),cf(Rr(u,Zn),Ze(d,2))}),cX=vt(function(u){var d=typeof(d=o2(u))=="function"?d:n;return cf(Rr(u,Zn),n,d)}),fX=vt(Af),pX=vt(function(u){var d=typeof(d=1<(d=u.length)?u[d-1]:n)=="function"?(u.pop(),d):n;return eS(u,d)});function tS(u){return(u=I(u)).__chain__=!0,u}function ec(u,d){return d(u)}var dX=Xi(function(u){function d(D){return W7(D,u)}var y=u.length,w=y?u[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof Pt&&Ki(w)?((R=R.slice(w,+w+(y?1:0))).__actions__.push({func:ec,args:[d],thisArg:n}),new O2(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(n),D})):this.thru(d)}),hX=G5(function(u,d,y){tn.call(u,y)?++u[y]:zi(u,y,1)}),mX=OT(YT),gX=OT(WT);function nS(u,d){return(dt(u)?mr:A3)(u,Ze(d,3))}function rS(u,d){return(dt(u)?function(y,w){for(var R=y==null?0:y.length;R--&&w(y[R],R,y)!==!1;);return y}:Zb)(u,Ze(d,3))}var yX=G5(function(u,d,y){tn.call(u,y)?u[y].push(d):zi(u,y,[d])}),_X=vt(function(u,d,y){var w=-1,R=typeof d=="function",D=Nl(u)?ce(u.length):[];return A3(u,function(U){D[++w]=R?Ar(d,U,y):R4(U,d,y)}),D}),vX=G5(function(u,d,y){zi(u,y,d)});function tc(u,d){return(dt(u)?Kt:sT)(u,Ze(d,3))}var EX=G5(function(u,d,y){u[y?0:1].push(d)},function(){return[[],[]]}),bX=vt(function(u,d){var y;return u==null?[]:(1<(y=d.length)&&yl(u,d[0],d[1])?d=[]:2<y&&yl(d[0],d[1]
`;if(u.replace(oe,function(_e,me,be,Ge,Ae,Oe){return be=be||Ge,ae+=u.slice(H,Oe).replace(or,Mb),me&&(w=!0,ae+=`' +
__e(`+me+`) +
'`),Ae&&(R=!0,ae+=`';
`+Ae+`;
__p += '`),be&&(ae+=`' +
((__t = (`+be+`)) == null ? '' : __t) +
'`),H=Oe+_e.length,_e}),ae+=`';
`,K=tn.call(d,"variable")&&d.variable){if(Hn.test(K))throw new Ke("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
`+ae+`
}
`;if(ae=(R?ae.replace(xt,""):ae).replace(Ve,"$1").replace(Lt,"$1;"),ae="function("+(K||"obj")+`) {
`+(K?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(w?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ae+`return __p
}`,(oe=xS(function(){return pt(D,Te+"return "+ae).apply(n,U)})).source=ae,Cf(oe))throw oe;return oe},I.times=function(u,d){if((u=mt(u))<1||c<u)return[];var y=p,w=Zr(u,p);for(d=Ze(d),u-=p,w=x5(w,d);++y<u;)d(y);return w},I.toFinite=Wi,I.toInteger=mt,I.toLength=hS,I.toLower=function(u){return Zt(u).toLowerCase()},I.toNumber=c2,I.toSafeInteger=function(u){return u?Xs(mt(u),-9007199254740991,c):u===0?u:0},I.toString=Zt,I.toUpper=function(u){return Zt(u).toUpperCase()},I.trim=function(u,d,y){return(u=Zt(u))&&(y||d===n)?Bi(u):u&&(d=Xl(d))?N3(y=R2(u),w5(y,d=R2(d)),A5(y,d)+1).join(""):u},I.trimEnd=function(u,d,y){return(u=Zt(u))&&(y||d===n)?u.slice(0,$b(u)+1):u&&(d=Xl(d))?N3(y=R2(u),0,A5(y,R2(d))+1).join(""):u},I.trimStart=function(u,d,y){return(u=Zt(u))&&(y||d===n)?u.replace(qn,""):u&&(d=Xl(d))?N3(y=R2(u),w5(y,R2(d))).join(""):u},I.truncate=function(u,R){var y,U=30,w="...",R=(Mn(R)&&(y="separator"in R?R.separator:y,U="length"in R?mt(R.length):U,w="omission"in R?Xl(R.omission):w),(u=Zt(u)).length);if((R=Bs(u)?(D=R2(u)).length:R)<=U)return u;if((R=U-io(w))<1)return w;var D,U=D?N3(D,0,R).join(""):u.slice(0,R);if(y!==n)if(D&&(R+=U.length-R),kf(y)){if(u.slice(R).search(y)){var H,K=U;for((y=y.global?y:Hs(y.source,Zt(t2.exec(y))+"g")).lastIndex=0;H=y.exec(K);)var ae=H.index;U=U.slice(0,ae===n?R:ae)}}else u.indexOf(Xl(y),R)!=R&&-1<(D=U.lastIndexOf(y))&&(U=U.slice(0,D));return U+w},I.unescape=function(u){return(u=Zt(u))&&sn.test(u)?u.replace(Xe,DG):u},I.uniqueId=function(u){var d=++FG;return Zt(u)+d},I.upperCase=GX,I.upperFirst=Lf,I.each=nS,I.eachRight=rS,I.first=QT,$f(I,(qf={},ii(I,function(u,d){tn.call(I.prototype,d)||(qf[d]=u)}),qf),{chain:!1}),I.VERSION="4.17.21",mr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),mr(["drop","take"],function(u,d){Pt.prototype[u]=function(y){y=y===n?1:yr(mt(y),0);var w=this.__filtered__&&!d?new Pt(this):this.clone();return w.__filtered__?w.__takeCount__=Zr(y,w.__takeCount__):w.__views__.push({size:Zr(y,p),type:u+(w.__dir__<0?"Right":"")}),w},Pt.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),mr(["filter","map","takeWhile"],function(u,d){var y=d+1,w=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__||w,D}}),mr(["head","last"],function(u,d){var y="take"+(d?"Right":"");Pt.prototype[u]=function(){return this[y](1).value()[0]}}),mr(["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(Cl)},Pt.prototype.find=function(u){return this.filter(u).head()},Pt.prototype.findLast=function(u){return this.reverse().find(u)},Pt.prototype.invokeMap=vt(function(u,d){return typeof u=="function"?new Pt(this):this.map(function(y){return R4(y,u,d)})}),Pt.prototype.reject=function(u){return this.filter(lc(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)},ii(Pt.prototype,function(u,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),w=/^(?:head|last)$/.test(d),R=I[w?"take"+(d=="last"?"Right":""):d],D=w||/^find/.test(d);R&&(I.prototype[d]=function(){function U(Ge){return Ge=R.apply(I,ei([Ge],ae)),w&&Te?Ge[0]:Ge}var H,K=this.__wrapped__,ae=w?[1]:arguments,be=K instanceof Pt,_e=ae[0],oe=be||dt(K),Te=(oe&&y&&typeof _e=="function"&&_e.length!=1&&(be=oe=!1),this.__chain__),_e=!!this.__actions__.length,me=D&&!Te,be=be&&!_e;return!D&&oe?(K=be?K:new Pt(this),(H=u.apply(K,ae)).__actions__.push({func:ec,args:[U],thisArg:n}),new O2(H,Te)):me&&be?u.apply(this,ae):(H=this.thru(U),me?w?H.value()[0]:H.value():H)})}),mr(["pop","push","shift","sort","splice","unshift"],function(u){var d=N5[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",w=/^(?:pop|shift)$/.test
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let c=rde(o,i);c&&s.push(c)}}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=lde(n,e);return r.source=t,r}var ide=["#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"],sde=["#EXT-X-MEDIA"],Av=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(ide.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(sde.some(r=>n.startsWith(r)))continue;De(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function Iv(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 ade(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 eB(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=${JU(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function ode(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=${Iv(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(H9(l))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let l of e.video)t.push(H9(l))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let l of e.subtitles)t.push(H9(l))}if(Kpe().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(H9(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 H9(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 ude(t,e,n,r,l=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let c=eB(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="${Tv(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:${bv(e.programDateTime)}`),e.dateRange&&t.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${bv(c.start)}"`),c.end&&f.push(`END-DATE="${bv(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&&
`)}var nB="hls_cache",r7=[],Ha={},J0={},qa={},n7="";function cde(t,e){if(r7.push(t),Ha[t]=e,r7.length>5){let n=r7.shift();fde(n)}}function fde(t){delete Ha[t],delete r7[t],new JSFile(nB+"/"+t).delete()}function pde(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=Cv(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=Cv(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=Cv(t,n.key.uri));return e}async function rB(t,e){let n=md5X(t);if(Ha[n])return Ha[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=pde(l,ZU(i));return cde(n,{code:r.code,plist:s,key:n,headers:r.headers}),Ha[n]}return{}}async function lB(t,e,n){if(!Ha[t])return{};let l=Ha[t].plist.segments,i=!qa[t];if(i){qa[t]={};for(let f of l){let p=md5X(f.uri+f.mediaSequenceNumber.toString());qa[t][p]={file:nB+"/"+t+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in qa[t]){let p=qa[t][f];p.index>=e?p.order=p.index-e:p.order=l.length-e+p.index}i&&dde(t,5,n);let s=l[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=qa[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&&iB(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 v=await h.size();if(v>f){var S=await h.read(v-f,f);await c.write(S),f=v}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 iB(t,e,n){if(e.state>=0||!J0[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 dde(t,e,n){n7&&n7!=t&&delete J0[n7],n7=t,J0[t]=!0;for(let r=0;r<e&&J0[t];r++)new Promise(function(l,i){(async function s(){if(!J0[t]){l();return}let a=ke.pickBy(qa[t],function(c){return c.state==-1}),o=ke.minBy(Object.values(a),function(c){return c.order});if(!o){l();return}await iB(t,o,n),setTimeout(s,5)})()})}function Cv(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 sB(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 l7=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Ti(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Ii,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"),hs(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.cont
`).forEach(function(s){l=s.indexOf(":"),n=s.substring(0,l).trim().toLowerCase(),r=s.substring(l+1).trim(),!(!n||e[n]&&Qge[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var pV=Symbol("internals");function o5(t){return t&&String(t).trim().toLowerCase()}function I7(t){return t===!1||t==null?t:G.isArray(t)?t.map(I7):String(t)}function Zge(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 eye=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xE(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 tye(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function nye(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 u4=class{constructor(e){e&&this.set(e)}set(e,n,r){let l=this;function i(a,o,c){let f=o5(o);if(!f)throw new Error("header name must be a non-empty string");let p=G.findKey(l,f);(!p||l[p]===void 0||c===!0||c===void 0&&l[p]!==!1)&&(l[p||o]=I7(a))}let s=(a,o)=>G.forEach(a,(c,f)=>i(c,f,o));return G.isPlainObject(e)||e instanceof this.constructor?s(e,n):G.isString(e)&&(e=e.trim())&&!eye(e)?s(fV(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=o5(e),e){let r=G.findKey(this,e);if(r){let l=this[r];if(!n)return l;if(n===!0)return Zge(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=o5(e),e){let r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||xE(this,this[r],r,n)))}return!1}delete(e,n){let r=this,l=!1;function i(s){if(s=o5(s),s){let a=G.findKey(r,s);a&&(!n||xE(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||xE(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]=I7(l),delete n[i];return}let a=e?tye(i):String(i).trim();a!==i&&delete n[i],n[a]=I7(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[pV]=this[pV]={accessors:{}}).accessors,l=this.prototype;function i(s){let a=o5(s);r[a]||(nye(l,s),r[a]=!0)}return G.isArray(e)?e.forEach(i):i(e),this}};u4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(u4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});G.freezeMethods(u4);var Sr=u4;function u5(t,e){let n=this||o4,r=e||n,l=Sr.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 c5(t){return!!(t&&t.__CANCEL__)}function dV(t,e,n){Le.call(this,t??"canceled",Le.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(dV,Le,{__CANCEL__:!0});var Y2=dV;function vs(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 wE(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function AE(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ya(t,e){return t&&!wE(e)?AE(t,e):e}var FV=Nr(mV(),1),MV=Nr(require("http"),1),$V=Nr(require("https"),1),jV=Nr(require("util"),1),UV=Nr(TV(),1),T3=Nr(require("zlib"),1);var Ja="1.6.7";function g5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var vye=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function jE(t,e,n){let r=n&&n.Blob||Tr.classes.Blob,l=g5(t);if(e===void 0&&r&&(e=!0),l==="data"){t=l.length?t.slice(l.length+1):t;let i=vye.exec(t);if(!i)throw new Le("Invalid URL",Le.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 Le("Blob is not supported",Le.ERR_NOT_SUPPORT);return new r([c],{type:s})}return c}throw new Le("Unsupported protocol "+l,Le.ERR_NOT_SUPPORT)}var Qa=Nr(require("stream"),1);var xV=Nr(require("stream"),1);function Eye(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 SV=Eye;function bye(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 C7=bye;var k7=Symbol("internals"),UE=class extends xV.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[k7]={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=C7(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let i=0;r.updateProgress=SV(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[k7];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let l=this,i=this[k7],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,v){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),l.push(g)?process.nextTick(v):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTic
`,xye=y5.encode(Es),wye=2,qE=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)}"`:""}${Es}`;l?n=y5.encode(String(n).replace(/\r?\n|\r\n?/g,Es)):i+=`Content-Type: ${n.type||"application/octet-stream"}${Es}`,this.headers=y5.encode(i+Es),this.contentLength=l?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+wye,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;G.isTypedArray(e)?yield e:yield*P7(e),yield xye}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},Aye=(t,e,n)=>{let{tag:r="form-data-boundary",size:l=25,boundary:i=r+"-"+G.generateString(l,Sye)}=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=y5.encode("--"+i+Es),a=y5.encode("--"+i+"--"+Es+Es),o=a.byteLength,c=Array.from(t.entries()).map(([p,m])=>{let h=new qE(p,m);return o+=h.size,h});o+=s.byteLength*c.length,o=G.toFiniteNumber(o);let f={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(o)&&(f["Content-Length"]=o),e&&e(f),RV.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield a}())},OV=Aye;var NV=Nr(require("stream"),1),HE=class extends NV.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)}},IV=HE;var Rye=(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,CV=Rye;var kV={flush:T3.default.constants.Z_SYNC_FLUSH,finishFlush:T3.default.constants.Z_SYNC_FLUSH},Oye={flush:T3.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:T3.default.constants.BROTLI_OPERATION_FLUSH},PV=G.isFunction(T3.default.createBrotliDecompress),{http:Nye,https:Iye}=UV.default,Cye=/https:?/,DV=Tr.protocols.map(t=>t+":");function kye(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function qV(t,e,n){let r=e;if(!r&&r!==!1){let l=(0,FV.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){qV(i,e,i.href)}}var Pye=typeof process<"u"&&G.kindOf(process)==="process",Dye=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)}),Lye=({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)}},LV=(t,e)=>Lye(G.isObject(t)?t:{address:t,family:e}),HV=Pye&&function(e){return Dye(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 se=CV(a,ge=>G.isArray(ge)?ge:[ge]);a=(ge,q,re)=>{se(ge,q,(ne,ee,Ln)=>{if(ne)return re(ne);let xt=G.isArray(ee)?ee.map(Ve=>LV(Ve)):[LV(ee,Ln)];q.all?re(ne,xt):re(ne,xt[0].address,xt[0].family)})}}let v=new BV.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),v.removeAllListeners()};i((se,ge)=>{m=!0,ge&&(h=!0,S())});function T(se){v.emit("abort",!se||se.type?new Y2(null,e,g):se)}v.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=Ya(e.baseURL,e.url),_=new URL(x,"http://localhost"),b=_.protocol||DV[0];if(b==="data:"){let se;if(p!=="GET")return vs(r,l,{st
`+i.map(KV).join(`
`):" "+KV(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:VE};function zE(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Y2(null,t)}function L7(t){return zE(t),t.headers=Sr.from(t.headers),t.data=u5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),D7.getAdapter(t.adapter||o4.adapter)(t).then(function(r){return zE(t),r.data=u5.call(t,t.transformResponse,r),r.headers=Sr.from(r.headers),r},function(r){return c5(r)||(zE(t),r&&r.response&&(r.response.data=u5.call(t,t.transformResponse,r.response),r.response.headers=Sr.from(r.response.headers))),Promise.reject(r)})}var YV=t=>t instanceof Sr?t.toJSON():t;function S3(t,e){e=e||{};let n={};function r(c,f,p){return G.isPlainObject(c)&&G.isPlainObject(f)?G.merge.call({caseless:p},c,f):G.isPlainObject(f)?G.merge({},f):G.isArray(f)?f.slice():f}function l(c,f,p){if(G.isUndefined(f)){if(!G.isUndefined(c))return r(void 0,c,p)}else return r(c,f,p)}function i(c,f){if(!G.isUndefined(f))return r(void 0,f)}function s(c,f){if(G.isUndefined(f)){if(!G.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(YV(c),YV(f),!0)};return G.forEach(Object.keys(Object.assign({},t,e)),function(f){let p=o[f]||l,m=p(t[f],e[f],f);G.isUndefined(m)&&p!==a||(n[f]=m)}),n}var GE={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{GE[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var WV={};GE.transitional=function(e,n,r){function l(i,s){return"[Axios v"+Ja+"] 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&&!WV[s]&&(WV[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 $ye(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 F7={assertOptions:$ye,validators:GE};var bs=F7.validators,f4=class{constructor(e){this.defaults=e,this.interceptors={request:new EE,response:new EE}}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=S3(this.defaults,n);let{transitional:r,paramsSerializer:l,headers:i}=n;r!==void 0&&F7.assertOptions(r,{silentJSONParsing:bs.transitional(bs.boolean),forcedJSONParsing:bs.transitional(bs.boolean),clarifyTimeoutError:bs.transitional(bs.boolean)},!1),l!=null&&(G.isFunction(l)?n.paramsSerializer={serialize:l}:F7.assertOptions(l,{encode:bs.function,serialize:bs.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=Sr.concat(s,i);let a=[],o=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(o=o&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});let c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!o){let g=[L7.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++],v=a[p++];try{h=g(h)}catch(S){v.call(this,S);break}}try{f=L7.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=S3(this.defaults,e);let n=Ya(e.baseURL,e.url);return Ka(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){f4.prototype[e]=function(n,r){return this.request(S3(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(S3(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}f4.prototype[e]=n(),f4.prototype[e+"Form"]=n(!0)});var _5=f4;var XE=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 Y2(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}}},JV=XE;function KE(t){return function(n){return t.apply(null,n)}}function YE(t){return G.isObject(t)&&t.isAxiosError===!0}var WE={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(WE).forEach(([t,e])=>{WE[e]=t});var QV=WE;function ZV(t){let e=new _5(t),n=i5(_5.prototype.request,e);return G.extend(n,_5.proto
`+t)}globalThis.req=Hye;async function Hye(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?e.headers||{}:{};r==="form"?(a["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=tz.default.stringify(n,{encode:!1}))):r==="form-data"&&(a["Content-Type"]="multipart/form-data",n=ez(n));let c=await p4(t,{responseType:l===1||l===2?"arraybuffer":void 0,method:e&&e.method||"get",headers:a,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:nz.default.Agent({rejectUnauthorized:!1})});n=c.data;let f={};for(let p of c.headers){let m=p[1];f[p[0]]=Array.isArray(m)&&m.length===1?m[0]:m}if(!l)typeof n=="object"&&(n=JSON.stringify(n));else{if(l===1)return{code:c.status,headers:f,content:n};if(l===2)return{code:c.status,headers:f,content:n.toString("base64")};if(l===3){let p=e.stream;return p.onResp&&await p.onResp({code:c.status,headers:f}),p.onData?(n.on("data",async m=>{await p.onData(m)}),n.on("end",async()=>{p.onDone&&await p.onDone()})):p.onDone&&await p.onDone(),"stream..."}}return{code:c.status,headers:f,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=Vye;function Vye(t){return rz.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 zye=["DEBUG","INFO","WARNING","ERROR"];var d4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=zye.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)}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 dr=class extends fr{constructor(){super(),this.jadeLog=new d4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{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(),a
`,""),n.vod_actor=Mr(/出演女优(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_remarks=Mr(/是否有码(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_play_from="BT",n.vod_play_url=n.vod_name+"$"+Mr(/磁力链接: (.*)复制代码/,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=Ci(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 ke.isEmpty(n)?a=await req(s.vod_pic,{buffer:2,headers:{Referer:l,"User-Agent":Ii}}):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:""})}},vn=new eb;var tb=class extends dr{constructor(){super()}getName(){return vn.getName()}getAppName(){return vn.getAppName()}getJSName(){return vn.getJSName()}async init(e,n){dataBase=e.server.db,await vn.spiderInit(e),(this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent")&&await vn.initAli(e.server.config.alitoken),vn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await vn.setClasses(),this.classes=vn.classes}async setFilterObj(){await vn.setFilterObj(),this.filterObj=vn.filterObj}async setHomeVod(){await vn.setHomeVod(),this.homeVodList=vn.homeVodList}async setCategory(e,n,r,l){await vn.setCategory(e,n,r,l),this.vodList=vn.vodList}async setDetail(e){await vn.setDetail(e),this.vodDetail=vn.vodDetail}async setPlay(e,n,r){await vn.setPlay(e,n,r),this.playUrl=vn.playUrl,this.result=vn.result}async setSearch(e,n){await vn.setSearch(e,n),this.vodList=vn.vodList}async setProxy(e,n){return await vn.proxy(e,n)}},Ss=new tb;async function fz(t,e){return await Ss.init(t,e)}async function pz(t,e){return await Ss.home(t,e)}async function Kye(t,e){return await Ss.homeVod(t,e)}async function dz(t,e){return await Ss.category(t,e)}async function hz(t,e){return await Ss.detail(t,e)}async function mz(t,e){return await Ss.play(t,e)}async function gz(t,e){return await Ss.search(t,e)}async function Yye(t,e){return await Ss.proxy(t,e)}var yz={meta:{key:vn.getJSName(),name:vn.getName(),type:vn.getType()},api:async t=>{t.post("/init",fz),t.post("/home",pz),t.post("/category",dz),t.post("/detail",hz),t.post("/play",mz),t.post("/search",gz),t.get("/proxy/:what/:ids/:end",Yye)},spider:{init:fz,home:pz,homeVod:Kye,category:dz,detail:hz,play:mz,search:gz}};var nb=class extends fr{constructor(){super(),this.siteUrl="https://jable.tv",this.co
`,"").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 dn;i.vod_pic=e(l).find("img").attr("data-src");let s=e(l).find("a").attr("href");i.vod_id=s.split("/")[4],i.vod_name=s.split("/")[4];let a=e(e(l).find('[class="sub-title"]')).text().split(`
`);a.length>1?i.vod_remarks=a[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!ke.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 Cn,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text(),n.vod_pic=Mr(/<video poster="(.*?)" id=/,e.html()),n.vod_year=e(e('[class="inactive-color"]')).text();let l=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),i=[],s=Mr(/var hlsUrl = '(.*?)';/,e.html());i.push(l+"$"+s);let a=[];a.push(i.join("#"));let o=["Jable"];return n.vod_play_from=o.join("$$$"),n.vod_play_url=a.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||ke.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)}},En=new nb;var rb=class extends dr{constructor(){super()}getName(){return En.getName()}getAppName(){return En.getAppName()}getJSName(){return En.getJSName()}async init(e,n){dataBase=e.server.db,await En.spiderInit(e),(this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent")&&await En.initAli(e.server.config.alitoken),En.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await En.setClasses(),this.classes=En.classes}async setFilterObj(){await En.setFilterObj(),this.filterObj=En.filterObj}async setHomeVod(){await En.setHomeVod(),this.homeVodList=En.homeVodList}async setCategory(e,n,r,l){await En.setCategory(e,n,r,l),this.vodList=En.vodList}async setDetail(e){await En.setDetail(e),this.vodDetail=En.vodDetail}async setPlay(e,n,r){await En.setPlay(e,n,r),this.playUrl=En.playUrl,this.result=En.result}async setSearch(e,n){await En.setSearch(e,n),this.vodList=En.vodList}async setProxy(e,n){return await En.proxy(e,n)}},xs=new rb;async function _z(t,e){return await xs.init(t,e)}async function vz(t,e){return await xs.home(t,e)}async function Wye(t,e){return await xs.homeVod(t,e)}async function Ez(t,e){return await xs.category(t,e)}async function bz(t,e){return await xs.detail(t,e)}async function Tz(t,e){return await xs.play(t,e)}async function Sz(t,e){return await xs.search(t,e)}async function Jye(t,e){return await xs.proxy(t,e)}var xz={meta:{key:En.getJSName(),name:En.getName(),type:En.getType()},api:async t=>{t.post("/init",_z),t.post("/home",vz),t.post("/category",Ez),t.post("/detail",bz),t.post("/play",Tz),t.post("/search",Sz),t.get("/proxy/:what/:ids/:end",Jye)},spider:{init:_z,home:vz,homeVod:Wye,category:Ez,detail:bz,play:Tz,search:Sz}};var lb=class extends fr{constructor(){super(),this.siteUrl="https://hongkongdollvideo.com"}getName(){return"\u{1F51E}\u2503\u73A9\u5076\u59D0\u59D0\u2503\u{1F51E}"}getAppName(){return"\u73A9\u5076\u59D0\u59D0"}getJSName(){return"doll"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="row"]').find('[class="video-detail"]');for(let l of r){let i=new dn;i.vod_id=e(l).find("a")[0].attribs.href;let s=e(e(l).find('[class="video-info"]')).find("a");i.vod_name=s[0].attribs.title,i.vod_remarks=e(s[1]).text(),i.vod_pic=e(l).find("img")[0].attribs["data-src"],n.push(i)}return n}async parseVodDetailFromDoc(e,n){let r=new Cn,l=e('[class="container-fluid"]');r.vod_name=e(e(l).find('[class="page-title"]')[0]).text(),r.vod_remarks=e(l).find('[class="tag my-1 text-center"]')[0].attribs.href.replaceAll("/",""),r.vod_pic=e(l).find("video")[0].attribs.poster;let i=e.html(),s=Mr(/var voteTag="(.*?)";/g,i),a=JSON.parse(Mr(/<script type="application\/ld\+json">(.*?)<\/script>/g,i));s=Fr.enc.U
`),c=n(a).find("a"),f=[{n:"\u5168\u90E8",v:i}],p=l.toString();for(let m of c){let h=n(m).text().replaceAll(`
`,""),g=m.attribs.href;g!==void 0&&f.push({n:h,v:g})}o=o.filter(m=>m!==""),this.filterObj[i].push({key:p,name:o[0],value:f})}let s=n('[id="side-menu"]').find("li");for(let a of s){let o=n(a).find("a")[0].attribs.href;if(o!==void 0&&o.indexOf(this.siteUrl)>-1){let c={type_name:n(a).text(),type_id:o};this.classes.push(c)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(e!=null){let n=In(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}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.fetch(i,null,this.getHeader());if(s!=null){let a=In(s);this.vodList=await this.parseVodShortListFromDoc(a)}}async setDetail(e){let n=await this.fetch(e,null,this.getHeader());if(n!=null){let r=In(n),l=Mr(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(r,l)}}async setPlay(e,n,r){this.playUrl=n,this.playHeader={}}async setSearch(e,n){let r=this.siteUrl+"search/"+encodeURIComponent(e),l=await this.fetch(r,null,this.getHeader());if(l!==null){let i=In(l);this.vodList=await this.parseVodShortListFromDoc(i)}}},bn=new lb;var ib=class extends dr{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,await bn.spiderInit(e),(this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent")&&await bn.initAli(e.server.config.alitoken),bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await bn.setClasses(),this.classes=bn.classes}async setFilterObj(){await bn.setFilterObj(),this.filterObj=bn.filterObj}async setHomeVod(){await bn.setHomeVod(),this.homeVodList=bn.homeVodList}async setCategory(e,n,r,l){await bn.setCategory(e,n,r,l),this.vodList=bn.vodList}async setDetail(e){await bn.setDetail(e),this.vodDetail=bn.vodDetail}async setPlay(e,n,r){await bn.setPlay(e,n,r),this.playUrl=bn.playUrl,this.result=bn.result}async setSearch(e,n){await bn.setSearch(e,n),this.vodList=bn.vodList}async setProxy(e,n){return await bn.proxy(e,n)}},ws=new ib;async function wz(t,e){return await ws.init(t,e)}async function Az(t,e){return await ws.home(t,e)}async function Qye(t,e){return await ws.homeVod(t,e)}async function Rz(t,e){return await ws.category(t,e)}async function Oz(t,e){return await ws.detail(t,e)}async function Nz(t,e){return await ws.play(t,e)}async function Iz(t,e){return await ws.search(t,e)}async function Zye(t,e){return await ws.proxy(t,e)}var Cz={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",wz),t.post("/home",Az),t.post("/category",Rz),t.post("/detail",Oz),t.post("/play",Nz),t.post("/search",Iz),t.get("/proxy/:what/:ids/:end",Zye)},spider:{init:wz,home:Az,homeVod:Qye,category:Rz,detail:Oz,play:Nz,search:Iz}};var sb=class extends fr{constructor(){super(),this.siteUrl="https://cn.asianx.tube/"}getName(){return"\u{1F51E}\u2503\u6D77\u5916\u5B85\u2503\u{1F51E}"}getAppName(){return"\u6D77\u5916\u5B85"}getJSName(){return"asianx"}getType(){return 3}async getFilter(e){let n=e(e('[class="menu m-0 mb-2 mb-lg-0"]')).find("a").slice(6),r={key:"1",name:"\u5206\u7C7B",value:[{n:"\u5168\u90E8",v:"\u5168\u90E8"}]};for(let l of n){let i=e(e(l).find("span")).text(),s=l.attribs.href;r.value.push({n:i,v:s})}return[r]}async parseVodShortListFromDoc(e,n=!1){let r=[],l;n?l=e(e('[class="gal-box"]')).slice(12):l=e(e('[class="gal-box"]'));for(let i of l){let s=new dn,a=e(i).find("a");s.vod_id=a[0].attribs.href,s.vod_pic=e(a[0]).find("img")[0].attribs["data-src"],s.vod_name=a[1].attribs.title,s.vod_remarks=e(e(i).find('[class="meta text-muted text-truncate"]')).text(),r.push(s)}return r}async parseVodDetailFromDoc(e){let n=new Cn,r=Mr(/<script type="application\/ld\+json">(.*?)<\/script>/,e),l=JSON.parse(r),i=l.name.split(" ");n.vod_name=i[0],n.vod_play_from=["\u672A\u52A0\u5BC6\u7EBF\u8DEF","\u52A0\u5BC6\u7EBF\u8DEF"].join(
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
(** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *)
forwarded/index.js:
(*!
* forwarded
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*)
proxy-addr/index.js:
(*!
* proxy-addr
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*)
toad-cache/dist/toad-cache.cjs:
(**
* toad-cache
*
* @copyright 2024 Igor Savin <kibertoad@gmail.com>
* @license MIT
* @version 3.7.0
*)
cookie/index.js:
(*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*)
mime-db/index.js:
(*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*)
mime-types/index.js:
(*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*)
rwlock/lib/lock.js:
(*! ReadWriteLock - v5.0.0 - 2015-01-16
* Author: Alberto La Rocca <a71104@gmail.com> (https://github.com/71104)
* Released under the MIT license
* Copyright (c) 2015 Alberto La Rocca *)
*/