tvbox/cat/dist/index.js

545 lines
2.3 MiB
JavaScript
Raw Normal View History

2024-04-12 14:29:25 +08:00
var Ese=Object.create;var N8=Object.defineProperty;var xse=Object.getOwnPropertyDescriptor;var bse=Object.getOwnPropertyNames;var wse=Object.getPrototypeOf,Sse=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),IO=(t,e)=>{for(var n in e)N8(t,n,{get:e[n],enumerable:!0})},RO=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bse(e))!Sse.call(t,i)&&i!==n&&N8(t,i,{get:()=>e[i],enumerable:!(r=xse(e,i))||r.enumerable});return t};var Dr=(t,e,n)=>(n=t!=null?Ese(wse(t)):{},RO(e||!t||!t.__esModule?N8(n,"default",{value:t,enumerable:!0}):n,t)),Tse=t=>RO(N8({},"__esModule",{value:!0}),t);var DO=k((WDe,kO)=>{"use strict";function Ase(t){var e=new t,n=e;function r(){var s=e;return s.next?e=s.next:(e=new t,n=e),s.next=null,s}function i(s){n.next=s,n=s}return{get:r,release:i}}kO.exports=Ase});var Om=k((XDe,Cm)=>{"use strict";var Cse=DO();function PO(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=Cse(Ose),i=null,s=null,l=0,a=null,o={push:x,drain:hl,saturated:hl,pause:c,paused:!1,get concurrency(){return n},set concurrency(S){if(!(S>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=S,!o.paused)for(;i&&l<n;)l++,_()},running:u,resume:h,idle:m,length:f,getQueue:d,unshift:b,empty:hl,kill:E,killAndDrain:v,error:g};return o;function u(){return l}function c(){o.paused=!0}function f(){for(var S=i,A=0;S;)S=S.next,A++;return A}function d(){for(var S=i,A=[];S;)A.push(S.value),S=S.next;return A}function h(){if(o.paused)for(o.paused=!1;i&&l<n;)l++,_()}function m(){return l===0&&o.length()===0}function x(S,A){var C=r.get();C.context=t,C.release=_,C.value=S,C.callback=A||hl,C.errorHandler=a,l>=n||o.paused?s?(s.next=C,s=C):(i=C,s=C,o.saturated()):(l++,e.call(t,C.value,C.worked))}function b(S,A){var C=r.get();C.context=t,C.release=_,C.value=S,C.callback=A||hl,C.errorHandler=a,l>=n||o.paused?i?(C.next=i,i=C):(i=C,s=C,o.saturated()):(l++,e.call(t,C.value,C.worked))}function _(S){S&&r.release(S);var A=i;A&&l<=n?o.paused?l--:(s===i&&(s=null),i=A.next,A.next=null,e.call(t,A.value,A.worked),s===null&&o.empty()):--l===0&&o.drain()}function E(){i=null,s=null,o.drain=hl}function v(){i=null,s=null,o.drain(),o.drain=hl}function g(S){a=S}}function hl(){}function Ose(){this.value=null,this.callback=hl,this.next=null,this.release=hl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var i=t.callback,s=t.errorHandler,l=t.value;t.value=null,t.callback=hl,t.errorHandler&&s(n,l),i.call(t.context,n,r),t.release(t)}}function Nse(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,f){e.call(this,c).then(function(d){f(null,d)},f)}var i=PO(t,r,n),s=i.push,l=i.unshift;return i.push=a,i.unshift=o,i.drained=u,i;function a(c){var f=new Promise(function(d,h){s(c,function(m,x){if(m){h(m);return}d(x)})});return f.catch(hl),f}function o(c){var f=new Promise(function(d,h){l(c,function(m,x){if(m){h(m);return}d(x)})});return f.catch(hl),f}function u(){if(i.idle())return new Promise(function(d){d()});var c=i.drain,f=new Promise(function(d){i.drain=function(){c(),d()}});return f}}Cm.exports=PO;Cm.exports.promise=Nse});var Im=k((YDe,LO)=>{"use strict";var{inherits:Ise,format:Nm}=require("util");function B3(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(i,s,l){if(!new.target)return new r(i,s,l);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",i&&s&&l?this.message=Nm(e,i,s,l):i&&s?this.message=Nm(e,i,s):i?this.message=Nm(e,i):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},Ise(r,n),r}LO.exports={createError:B3,AVV_ERR_EXPOSE_ALREADY_DEFINED:B3("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:B3("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s
2024-04-02 15:03:09 +08:00
`),a=`
2024-04-12 14:29:25 +08:00
`+n+(s.length?i("\u2502"):" ")+" ";return n+l.join(a)+`
`+s.map(function(o,u){var c=u===s.length-1,f=o.nodes&&o.nodes.length,d=n+(c?" ":i("\u2502"))+" ";return n+i(c?"\u2514":"\u251C")+i("\u2500")+i(f?"\u252C":"\u2500")+" "+t(o,d,r).slice(n.length+2)}).join("")}});var qO=k((ZDe,HO)=>{"use strict";var Rse=BO(),MO=Symbol("avvio.TimeTree.untrackNode"),Rm=Symbol("avvio.TimeTree.trackNode"),UO=Symbol("avvio.TimeTree.getParent"),jO=Symbol("avvio.TimeTree.getNode"),$O=Symbol("avvio.TimeTree.addNode"),km=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Rm](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])}[MO](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)}[UO](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[jO](e){return this.tableId.get(e)}[$O](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Rm](this.root),this.root.id;let s=this[UO](e),l=`${n}-${Math.random()}`,a={id:l,parent:e,start:r,label:n,nodes:[]};return s.nodes.push(a),this[Rm](a),l}start(e,n,r=Date.now()){return this[$O](e,n,r)}stop(e,n=Date.now()){let r=this[jO](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[MO](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(i=>e(i))),r),n=e(this.toJSON());return Rse(n)}};HO.exports=km});var zO=k((ePe,VO)=>{var c0=1e3,f0=c0*60,p0=f0*60,M3=p0*24,kse=M3*7,Dse=M3*365.25;VO.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Pse(t);if(n==="number"&&isFinite(t))return e.long?Fse(t):Lse(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Pse(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*Dse;case"weeks":case"week":case"w":return n*kse;case"days":case"day":case"d":return n*M3;case"hours":case"hour":case"hrs":case"hr":case"h":return n*p0;case"minutes":case"minute":case"mins":case"min":case"m":return n*f0;case"seconds":case"second":case"secs":case"sec":case"s":return n*c0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Lse(t){var e=Math.abs(t);return e>=M3?Math.round(t/M3)+"d":e>=p0?Math.round(t/p0)+"h":e>=f0?Math.round(t/f0)+"m":e>=c0?Math.round(t/c0)+"s":t+"ms"}function Fse(t){var e=Math.abs(t);return e>=M3?I8(t,e,M3,"day"):e>=p0?I8(t,e,p0,"hour"):e>=f0?I8(t,e,f0,"minute"):e>=c0?I8(t,e,c0,"second"):t+" ms"}function I8(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Dm=k((tPe,GO)=>{function Bse(t){n.debug=n,n.default=n,n.coerce=o,n.disable=s,n.enable=i,n.enabled=l,n.humanize=zO(),n.destroy=u,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let d=0;d<c.length;d++)f=(f<<5)-f+c.charCodeAt(d),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,d=null,h,m;function x(...b){if(!x.enabled)return;let _=x,E=Number(new Date),v=E-(f||E);_.diff=v,_.prev=f,_.curr=E,f=E,b[0]=n.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let g=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(A,C)=>{if(A==="%%")return"%";g++;let N=n.formatters[C];if(typeof N=="function"){let D=b[g];A=N.call(_,D),b.splice(g,1),g--}return A}),n.formatArgs.call(_,b),(_.log||n.log).apply(_,b)}return x.namespace=c,x.useColors=n.useColors(),x.color=n.selectColor(c),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==n.namespaces&&(h=n.namespaces,m=n.enabled(c)),m),set:b=>{d=b}}),typeof n.init=="function"&&n.init(x),x}function r(c,f){let d=n(this.namespace+(typeof f>"u"?":":f)+c);return d.log=this.log,
2024-04-02 15:03:09 +08:00
`).join(`
2024-04-12 14:29:25 +08:00
`+s),t.push(i+"m+"+D8.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Xse()+e+" "+t[0]}function Xse(){return Oi.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Yse(...t){return process.stderr.write(k8.format(...t)+`
`)}function Qse(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Zse(){return process.env.DEBUG}function ele(t){t.inspectOpts={};let e=Object.keys(Oi.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Oi.inspectOpts[e[n]]}D8.exports=Dm()(Oi);var{formatters:QO}=D8.exports;QO.o=function(t){return this.inspectOpts.colors=this.useColors,k8.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};QO.O=function(t){return this.inspectOpts.colors=this.useColors,k8.inspect(t,this.inspectOpts)}});var P8=k((iPe,Lm)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Lm.exports=KO():Lm.exports=ZO()});var eN=k((sPe,Mm)=>{"use strict";var tle=Om(),nle=require("events").EventEmitter,rle=require("util").inherits,_i=P8()("avvio"),{AVV_ERR_READY_TIMEOUT:ile}=Im(),Fm=Symbol.for("plugin-meta");function sle(t,e){return t[Fm]&&t[Fm].name?t[Fm].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 lle(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function d0(t,e,n,r,i){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=i===void 0?t._timeout:i,this.name=sle(e,n),this.isAfter=r,this.q=tle(t,ale,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}rle(d0,nle);d0.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){_i("skipping loading of plugin as parent errored and it is not an after",i),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return _i("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,_i("exec",i);let s,l=o=>{if(r){_i("loading complete",i);return}this._error=o,_i(o?"exec errored":"exec completed",i),r=!0,s&&clearTimeout(s),e(o)};this.timeout>0&&(_i("setting up timeout",i,this.timeout),s=setTimeout(function(){_i("timed out",i),s=null;let o=new ile(i);o.fn=n,l(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,l);a&&typeof a.then=="function"&&(_i("exec: resolving promise",i),a.then(()=>process.nextTick(l),o=>process.nextTick(l,o)))};d0.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(_i("rejecting promise",this.name,n),this._promise.reject(n)):(_i("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=lle(),e=this._promise.promise,this.server?t():this.on("start",t)),e};d0.prototype.enqueue=function(t,e){_i("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};d0.prototype.finish=function(t,e){_i("finish",this.name,t);let n=()=>{this.loaded||(_i("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(_i("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{_i("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else _i("delayed",this.name),this.q.drain=()=>{_i("drain",this.name),this.q.drain=ole,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function ale(t,e){let n=this;process.nextTick(Bm.bind(n),t,e)}function Bm(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Bm.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,i=>{this._current.shift(),e(i)})})}function ole(){}Mm.exports=d0;Mm.exports.loadPlugin=Bm});var sN=k((lPe,qm)=>{"use strict";var tN=Om(),ule=require("events").EventEmitter,cle=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Um,AVV_ERR_CALLBACK_NOT_FN:$4,AVV_ERR_PLUGIN_NOT_VALID:fle,AVV_ERR_ROOT_PLG_BOOTED:ple,AVV_ERR_READY_TIMEOUT:hle}=Im(),dle=qO(),Hm=eN(),m0=P8()("avvio"),L8=Symbol("kAvvio"),jm=Symbol("kThenifyDoNotWrap");function mle(t,e,n){let r=e.expose||{},i=r.use||"use",s=r.after||"after",l=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[i])throw new Um(i);if(t[s])throw new Um(s);if(t[l])throw new Um(l);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:rN.bind(n)}),t[L8]=!0,t[s]=function(u){return typeof u!="function"?n._loadRegistered():(n.after($m(u,this)),this)},t[l]=function(u){if(u&&typeof u!="function")throw new $4(l,typeof u);return n.ready(u?$m(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new $4(a,typeof u);return n.onClose(Ele(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new $4(o,typeof u);return u?(n.close($
causes have become circular...`;let r=iy(t);return r?(e.add(t),n+`
caused by: `+MN(r,e)):n},Lae=t=>MN(t,new Set),UN=(t,e,n)=>{if(!z4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=iy(t);if(i){e.add(t);let s=typeof t.cause=="function";return r+(s?"":": ")+UN(i,e,s)}else return r},Fae=t=>UN(t,new Set);jN.exports={isErrorLike:z4,getErrorCause:iy,stackWithCauses:Lae,messageWithCauses:Fae}});var ly=k((_Pe,HN)=>{"use strict";var Bae=Symbol("circular-ref-tag"),G8=Symbol("pino-raw-err-ref"),$N=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[G8]},set:function(t){this[G8]=t}}});Object.defineProperty($N,G8,{writable:!0,value:{}});HN.exports={pinoErrProto:$N,pinoErrorSymbols:{seen:Bae,rawSymbol:G8}}});var zN=k((EPe,VN)=>{"use strict";VN.exports=oy;var{messageWithCauses:Mae,stackWithCauses:Uae,isErrorLike:qN}=sy(),{pinoErrProto:jae,pinoErrorSymbols:$ae}=ly(),{seen:ay}=$ae,{toString:Hae}=Object.prototype;function oy(t){if(!qN(t))return t;t[ay]=void 0;let e=Object.create(jae);e.type=Hae.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Mae(t),e.stack=Uae(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>oy(n)));for(let n in t)if(e[n]===void 0){let r=t[n];qN(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,ay)&&(e[n]=oy(r)):e[n]=r}return delete t[ay],e.raw=t,e}});var KN=k((xPe,GN)=>{"use strict";GN.exports=J8;var{isErrorLike:uy}=sy(),{pinoErrProto:qae,pinoErrorSymbols:Vae}=ly(),{seen:K8}=Vae,{toString:zae}=Object.prototype;function J8(t){if(!uy(t))return t;t[K8]=void 0;let e=Object.create(qae);e.type=zae.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=>J8(n))),uy(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,K8)&&(e.cause=J8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];uy(r)?Object.prototype.hasOwnProperty.call(r,K8)||(e[n]=J8(r)):e[n]=r}return delete t[K8],e.raw=t,e}});var YN=k((bPe,XN)=>{"use strict";XN.exports={mapHttpRequest:Gae,reqSerializer:WN};var cy=Symbol("pino-raw-req-ref"),JN=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[cy]},set:function(t){this[cy]=t}}});Object.defineProperty(JN,cy,{writable:!0,value:{}});function WN(t){let e=t.info||t.socket,n=Object.create(JN);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 Gae(t){return{req:WN(t)}}});var tI=k((wPe,eI)=>{"use strict";eI.exports={mapHttpResponse:Kae,resSerializer:ZN};var fy=Symbol("pino-raw-res-ref"),QN=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[fy]},set:function(t){this[fy]=t}}});Object.defineProperty(QN,fy,{writable:!0,value:{}});function ZN(t){let e=Object.create(QN);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function Kae(t){return{res:ZN(t)}}});var hy=k((SPe,nI)=>{"use strict";var py=zN(),Jae=KN(),W8=YN(),X8=tI();nI.exports={err:py,errWithCause:Jae,mapHttpRequest:W8.mapHttpRequest,mapHttpResponse:X8.mapHttpResponse,req:W8.reqSerializer,res:X8.resSerializer,wrapErrorSerializer:function(e){return e===py?e:function(r){return e(py(r))}},wrapRequestSerializer:fu
2024-04-02 15:03:09 +08:00
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
2024-04-12 14:29:25 +08:00
o${l}
if ([o${l}].length !== 1) throw Error()`)()}catch{throw Error(n(s))}})}}});var Y8=k((CPe,lI)=>{"use strict";lI.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var oI=k((OPe,aI)=>{"use strict";var Yae=Y8();aI.exports=Qae;function Qae({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,s,l){var a=s.match(Yae).map(c=>c.replace(/'|"|`/g,""));let o=s[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let u=a.indexOf("*");if(u>-1){let c=a.slice(0,u),f=c.join("."),d=a.slice(u+1,a.length),h=d.length>0;n++,e.push({before:c,beforeStr:f,after:d,nested:h})}else i[s]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return i},{});return{wildcards:e,wcLen:n,secret:r}}});var cI=k((NPe,uI)=>{"use strict";var Zae=Y8();uI.exports=e2e;function e2e({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:i,censorFctTakesPath:s},l){let a=Function("o",`
2024-04-02 15:03:09 +08:00
if (typeof o !== 'object' || o == null) {
2024-04-12 14:29:25 +08:00
${i2e(r,e)}
2024-04-02 15:03:09 +08:00
}
const { censor, secret } = this
2024-04-12 14:29:25 +08:00
${t2e(t,i,s)}
2024-04-02 15:03:09 +08:00
this.compileRestore()
2024-04-12 14:29:25 +08:00
${n2e(n>0,i,s)}
${r2e(e)}
`).bind(l);return e===!1&&(a.restore=o=>l.restore(o)),a}function t2e(t,e,n){return Object.keys(t).map(r=>{let{escPath:i,leadingBracket:s,path:l}=t[r],a=s?1:0,o=s?"":".",u=[];for(var c;(c=Zae.exec(r))!==null;){let[,m]=c,{index:x,input:b}=c;x>a&&u.push(b.substring(0,x-(m?0:1)))}var f=u.map(m=>`o${o}${m}`).join(" && ");f.length===0?f+=`o${o}${r} != null`:f+=` && o${o}${r} != null`;let d=`
2024-04-02 15:03:09 +08:00
switch (true) {
${u.reverse().map(m=>`
case o${o}${m} === censor:
secret[${i}].circle = ${JSON.stringify(m)}
break
`).join(`
`)}
}
2024-04-12 14:29:25 +08:00
`,h=n?`val, ${JSON.stringify(l)}`:"val";return`
2024-04-02 15:03:09 +08:00
if (${f}) {
const val = o${o}${r}
if (val === censor) {
secret[${i}].precensored = true
} else {
secret[${i}].val = val
o${o}${r} = ${e?`censor(${h})`:"censor"}
${d}
}
}
`}).join(`
2024-04-12 14:29:25 +08:00
`)}function n2e(t,e,n){return t===!0?`
2024-04-02 15:03:09 +08:00
{
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})
}
}
2024-04-12 14:29:25 +08:00
`:""}function r2e(t){return t===!1?"return o":`
2024-04-02 15:03:09 +08:00
var s = this.serialize(o)
this.restore(o)
return s
2024-04-12 14:29:25 +08:00
`}function i2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var yy=k((IPe,hI)=>{"use strict";hI.exports={groupRedact:l2e,groupRestore:s2e,nestedRedact:o2e,nestedRestore:a2e};function s2e({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var i=0;i<r;i++){let s=t[i];n[s]=e[i]}}function l2e(t,e,n,r,i){let s=fI(t,e);if(s==null)return{keys:null,values:null,target:null,flat:!0};let l=Object.keys(s),a=l.length,o=e.length,u=i?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let d=l[f];c[f]=s[d],i?(u[o]=d,s[d]=n(s[d],u)):r?s[d]=n(s[d]):s[d]=n}return{keys:l,values:c,target:s,flat:!0}}function a2e(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:i}=t[e],s=n;for(let l=r.length-1;l>0;l--)s=s[r[l]];s[r[0]]=i}}function o2e(t,e,n,r,i,s,l){let a=fI(e,n);if(a==null)return;let o=Object.keys(a),u=o.length;for(var c=0;c<u;c++){let f=o[c];u2e(t,a,f,n,r,i,s,l)}return t}function my(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function u2e(t,e,n,r,i,s,l,a){let o=i.length,u=o-1,c=n;var f=-1,d,h,m,x=null,b=null,_,E,v=!1,g=0,S=0,A=c2e();if(m=d=e[n],typeof d=="object"){for(;d!=null&&++f<o&&(S+=1,n=i[f],x=m,!(n!=="*"&&!b&&!(typeof d=="object"&&n in d)));)if(!(n==="*"&&(b==="*"&&(v=!0),b=n,f!==u))){if(b){let N=Object.keys(d);for(var C=0;C<N.length;C++){let D=N[C];if(E=d[D],_=n==="*",v)A=n2(A,D,S),g=f,m=pI(E,g-1,n,r,i,s,l,a,c,d,h,m,_,D,f,u,A,t,e[c],S+1);else if(_||typeof E=="object"&&E!==null&&n in E){if(_?m=E:m=E[n],h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,_){let P=G4(n2(A,D,S),m,e[c]);t.push(P),d[D]=h}else if(E[n]!==h)if(h===void 0&&s!==void 0||my(E,n)&&h===m)A=n2(A,D,S);else{A=n2(A,D,S);let P=G4(n2(A,n,S+1),m,e[c]);t.push(P),E[n]=h}}}b=null}else{if(m=d[n],A=n2(A,n,S),h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,!(my(d,n)&&h===m||h===void 0&&s!==void 0)){let N=G4(A,m,e[c]);t.push(N),d[n]=h}d=d[n]}if(typeof d!="object")break}}}function fI(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function pI(t,e,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v){if(e===0&&(d||typeof t=="object"&&t!==null&&n in t)){if(d?f=t:f=t[n],c=m!==x?f:l?a?s(f,[...r,o,...i]):s(f):s,d){let g=G4(b,f,E);_.push(g),u[h]=c}else if(t[n]!==c){if(!(c===void 0&&s!==void 0||my(t,n)&&c===f)){let g=G4(n2(b,n,v+1),f,E);_.push(g),t[n]=c}}}for(let g in t)typeof t[g]=="object"&&(b=n2(b,g,v),pI(t[g],e-1,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v+1))}function c2e(){return{parent:null,key:null,children:[],depth:0}}function n2(t,e,n){if(t.depth===n)return n2(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function G4(t,e,n){let r=t,i=[];do i.push(r.key),r=r.parent;while(r.parent!=null);return{path:i,value:e,target:n}}});var mI=k((RPe,dI)=>{"use strict";var{groupRestore:f2e,nestedRestore:p2e}=yy();dI.exports=h2e;function h2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=d2e(t,r),s=e>0,l=s?{secret:t,groupRestore:f2e,nestedRestore:p2e}:{secret:t};this.restore=Function("o",m2e(i,r,s)).bind(l)}}function d2e(t,e){return e.map(n=>{let{circle:r,escPath:i,leadingBracket:s}=t[n],a=r?`o.${r} = secret[${i}].val`:`o${s?"":"."}${n} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
2024-04-02 15:03:09 +08:00
if (secret[${i}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
}
2024-04-12 14:29:25 +08:00
`}).join("")}function m2e(t,e,n){return`
2024-04-02 15:03:09 +08:00
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
2024-04-12 14:29:25 +08:00
`}});var gI=k((kPe,yI)=>{"use strict";yI.exports=y2e;function y2e(t){let{secret:e,censor:n,compileRestore:r,serialize:i,groupRedact:s,nestedRedact:l,wildcards:a,wcLen:o}=t,u=[{secret:e,censor:n,compileRestore:r}];return i!==!1&&u.push({serialize:i}),o>0&&u.push({groupRedact:s,nestedRedact:l,wildcards:a,wcLen:o}),Object.assign(...u)}});var EI=k((DPe,_I)=>{"use strict";var vI=sI(),g2e=oI(),v2e=cI(),_2e=mI(),{groupRedact:E2e,nestedRedact:x2e}=yy(),b2e=gI(),w2e=Y8(),S2e=vI(),gy=t=>t;gy.restore=gy;var T2e="[REDACTED]";vy.rx=w2e;vy.validator=vI;_I.exports=vy;function vy(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 i=r===!0?void 0:"censor"in t?t.censor:T2e,s=typeof i=="function",l=s&&i.length>1;if(e.length===0)return n||gy;S2e({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=g2e({paths:e,censor:i}),c=_2e({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return v2e({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:s,censorFctTakesPath:l},b2e({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:E2e,nestedRedact:x2e,wildcards:a,wcLen:o}))}});var _0=k((PPe,xI)=>{"use strict";var A2e=Symbol("pino.setLevel"),C2e=Symbol("pino.getLevel"),O2e=Symbol("pino.levelVal"),N2e=Symbol("pino.levelComp"),I2e=Symbol("pino.useLevelLabels"),R2e=Symbol("pino.useOnlyCustomLevels"),k2e=Symbol("pino.mixin"),D2e=Symbol("pino.lsCache"),P2e=Symbol("pino.chindings"),L2e=Symbol("pino.asJson"),F2e=Symbol("pino.write"),B2e=Symbol("pino.redactFmt"),M2e=Symbol("pino.time"),U2e=Symbol("pino.timeSliceIndex"),j2e=Symbol("pino.stream"),$2e=Symbol("pino.stringify"),H2e=Symbol("pino.stringifySafe"),q2e=Symbol("pino.stringifiers"),V2e=Symbol("pino.end"),z2e=Symbol("pino.formatOpts"),G2e=Symbol("pino.messageKey"),K2e=Symbol("pino.errorKey"),J2e=Symbol("pino.nestedKey"),W2e=Symbol("pino.nestedKeyStr"),X2e=Symbol("pino.mixinMergeStrategy"),Y2e=Symbol("pino.msgPrefix"),Q2e=Symbol("pino.wildcardFirst"),Z2e=Symbol.for("pino.serializers"),eoe=Symbol.for("pino.formatters"),toe=Symbol.for("pino.hooks"),noe=Symbol.for("pino.metadata");xI.exports={setLevelSym:A2e,getLevelSym:C2e,levelValSym:O2e,levelCompSym:N2e,useLevelLabelsSym:I2e,mixinSym:k2e,lsCacheSym:D2e,chindingsSym:P2e,asJsonSym:L2e,writeSym:F2e,serializersSym:Z2e,redactFmtSym:B2e,timeSym:M2e,timeSliceIndexSym:U2e,streamSym:j2e,stringifySym:$2e,stringifySafeSym:H2e,stringifiersSym:q2e,endSym:V2e,formatOptsSym:z2e,messageKeySym:G2e,errorKeySym:K2e,nestedKeySym:J2e,wildcardFirstSym:Q2e,needsMetadataGsym:noe,useOnlyCustomLevelsSym:R2e,formattersSym:eoe,hooksSym:toe,nestedKeyStrSym:W2e,mixinMergeStrategySym:X2e,msgPrefixSym:Y2e}});var xy=k((LPe,TI)=>{"use strict";var Ey=EI(),{redactFmtSym:roe,wildcardFirstSym:Q8}=_0(),{rx:_y,validator:ioe}=Ey,bI=ioe({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})`}),wI="[Redacted]",SI=!1;function soe(t,e){let{paths:n,censor:r}=loe(t),i=n.reduce((a,o)=>{_y.lastIndex=0;let u=_y.exec(o),c=_y.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=Q8),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:d}=c,h=`${o.substr(d,o.length-1)}`;return a[f]=a[f]||[],f!==Q8&&a[f].length===0&&a[f].push(...a[Q8]||[]),f===Q8&&Object.keys(a).forEach(function(m){a[m]&&a[m].push(h)}),a[f].push(h),a},{}),s={[roe]:Ey({paths:n,censor:r,serialize:e,strict:SI})},l=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((a,o)=>{if(i[o]===null)a[o]=u=>l(u,[o]);else{let u=typeof r=="function"?(c,f)=>r(c,[o,...f]):r;a[o]=Ey({paths:i[o],censor:u,serialize:e,strict:SI})}return a},s)}function loe(t){if(Array.isArray(t))return t={paths:t,censor:wI},bI(t),t;let{paths:e,censor:n=wI,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contai
2024-04-02 15:03:09 +08:00
${_}`,g=`,
2024-04-12 14:29:25 +08:00
${_}`);let G=Math.min(E.length,l),j=0;for(;j<G-1;j++){let V=a(String(j),E,m,x,b,_);v+=V!==void 0?V:"null",v+=g}let U=a(String(j),E,m,x,b,_);if(v+=U!==void 0?U:"null",E.length-1>l){let V=E.length-l-1;v+=`${g}"... ${$3(V)} not stringified"`}return b!==""&&(v+=`
${S}`),m.pop(),`[${v}]`}let A=Object.keys(E),C=A.length;if(C===0)return"{}";if(s<m.length+1)return'"[Object]"';let N="",D="";b!==""&&(_+=b,g=`,
${_}`,N=" ");let P=Math.min(C,l);i&&!Gy(E)&&(A=zy(A)),m.push(E);for(let G=0;G<P;G++){let j=A[G],U=a(j,E,m,x,b,_);U!==void 0&&(v+=`${D}${j2(j)}:${N}${U}`,D=g)}if(C>l){let G=C-l;v+=`${D}"...":${N}"${$3(G)} not stringified"`,D=g}return b!==""&&D.length>1&&(v=`
2024-04-02 15:03:09 +08:00
${_}${v}
2024-04-12 14:29:25 +08:00
${S}`),m.pop(),`{${v}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(E);default:return e?e(E):void 0}}function o(d,h,m,x,b,_){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(d)),typeof h){case"string":return j2(h);case"object":{if(h===null)return"null";if(m.indexOf(h)!==-1)return n;let E=_,v="",g=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h),b!==""&&(_+=b,v+=`
2024-04-02 15:03:09 +08:00
${_}`,g=`,
2024-04-12 14:29:25 +08:00
${_}`);let C=Math.min(h.length,l),N=0;for(;N<C-1;N++){let P=o(String(N),h[N],m,x,b,_);v+=P!==void 0?P:"null",v+=g}let D=o(String(N),h[N],m,x,b,_);if(v+=D!==void 0?D:"null",h.length-1>l){let P=h.length-l-1;v+=`${g}"... ${$3(P)} not stringified"`}return b!==""&&(v+=`
2024-04-02 15:03:09 +08:00
${E}`),m.pop(),`[${v}]`}m.push(h);let S="";b!==""&&(_+=b,g=`,
2024-04-12 14:29:25 +08:00
${_}`,S=" ");let A="";for(let C of x){let N=o(C,h[C],m,x,b,_);N!==void 0&&(v+=`${A}${j2(C)}:${S}${N}`,A=g)}return b!==""&&A.length>1&&(v=`
2024-04-02 15:03:09 +08:00
${_}${v}
2024-04-12 14:29:25 +08:00
${E}`),m.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 u(d,h,m,x,b){switch(typeof h){case"string":return j2(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(d),typeof h!="object")return u(d,h,m,x,b);if(h===null)return"null"}if(m.indexOf(h)!==-1)return n;let _=b;if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h),b+=x;let N=`
${b}`,D=`,
${b}`,P=Math.min(h.length,l),G=0;for(;G<P-1;G++){let U=u(String(G),h[G],m,x,b);N+=U!==void 0?U:"null",N+=D}let j=u(String(G),h[G],m,x,b);if(N+=j!==void 0?j:"null",h.length-1>l){let U=h.length-l-1;N+=`${D}"... ${$3(U)} not stringified"`}return N+=`
${_}`,m.pop(),`[${N}]`}let E=Object.keys(h),v=E.length;if(v===0)return"{}";if(s<m.length+1)return'"[Object]"';b+=x;let g=`,
${b}`,S="",A="",C=Math.min(v,l);Gy(h)&&(S+=CR(h,g,l),E=E.slice(h.length),C-=h.length,A=g),i&&(E=zy(E)),m.push(h);for(let N=0;N<C;N++){let D=E[N],P=u(D,h[D],m,x,b);P!==void 0&&(S+=`${A}${j2(D)}: ${P}`,A=g)}if(v>l){let N=v-l;S+=`${A}"...": "${$3(N)} not stringified"`,A=g}return A!==""&&(S=`
2024-04-02 15:03:09 +08:00
${b}${S}
2024-04-12 14:29:25 +08:00
${_}`),m.pop(),`{${S}}`}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(d,h,m){switch(typeof h){case"string":return j2(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(d),typeof h!="object")return c(d,h,m);if(h===null)return"null"}if(m.indexOf(h)!==-1)return n;let x="";if(Array.isArray(h)){if(h.length===0)return"[]";if(s<m.length+1)return'"[Array]"';m.push(h);let g=Math.min(h.length,l),S=0;for(;S<g-1;S++){let C=c(String(S),h[S],m);x+=C!==void 0?C:"null",x+=","}let A=c(String(S),h[S],m);if(x+=A!==void 0?A:"null",h.length-1>l){let C=h.length-l-1;x+=`,"... ${$3(C)} not stringified"`}return m.pop(),`[${x}]`}let b=Object.keys(h),_=b.length;if(_===0)return"{}";if(s<m.length+1)return'"[Object]"';let E="",v=Math.min(_,l);Gy(h)&&(x+=CR(h,",",l),b=b.slice(h.length),v-=h.length,E=","),i&&(b=zy(b)),m.push(h);for(let g=0;g<v;g++){let S=b[g],A=c(S,h[S],m);A!==void 0&&(x+=`${E}${j2(S)}:${A}`,E=",")}if(_>l){let g=_-l;x+=`${E}"...":"${$3(g)} not stringified"`}return m.pop(),`{${x}}`}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(d,h,m){if(arguments.length>1){let x="";if(typeof m=="number"?x=" ".repeat(Math.min(m,10)):typeof m=="string"&&(x=m.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":d},[],h,x,"");if(Array.isArray(h))return o("",d,[],Rue(h),x,"")}if(x.length!==0)return u("",d,[],x,"")}return c("",d,[])}return f}});var PR=k((QPe,DR)=>{"use strict";var Wy=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:kR}=o9(),Due=kR.info;function Pue(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(kR);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let i={write:s,add:a,flushSync:l,end:o,minLevel:0,streams:[],clone:u,[Wy]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,i):a.call(i,t),t=null,i;function s(c){let f,d=this.lastLevel,{streams:h}=this,m=0,x;for(let b=Fue(h.length,e.dedupe);Mue(b,h.length,e.dedupe);b=Bue(b,e.dedupe))if(f=h[b],f.level<=d){if(m!==0&&m!==f.level)break;if(x=f.stream,x[Wy]){let{lastTime:_,lastMsg:E,lastObj:v,lastLogger:g}=this;x.lastLevel=d,x.lastTime=_,x.lastMsg=E,x.lastObj=v,x.lastLogger=g}x.write(c),e.dedupe&&(m=f.level)}else if(!e.dedupe)break}function l(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return i;let f=typeof c.write=="function"||c.stream,d=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:m}=this,x;typeof c.levelVal=="number"?x=c.levelVal:typeof c.level=="string"?x=m[c.level]:typeof c.level=="number"?x=c.level:x=Due;let b={stream:d,level:x,levelVal:void 0,id:n++};return h.unshift(b),h.sort(Lue),this.minLevel=h[0].level,i}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function u(c){let f=new Array(this.streams.length);for(let d=0;d<f.length;d++)f[d]={level:c,stream:this.streams[d].stream};return{write:s,add:a,minLevel:c,streams:f,clone:u,flushSync:l,[Wy]:!0}}}function Lue(t,e){return t.level-e.level}function Fue(t,e){return e?t-1:0}function Bue(t,e){return e?t-1:t+1}function Mue(t,e,n){return n?t>=0:t<e}DR.exports=Pue});var KR=k((ZPe,dl)=>{"use strict";var Uue=require("os"),HR=hy(),jue=dy(),$ue=xy(),qR=CI(),Hue=AR(),VR=_0(),{configure:que}=RR(),{assertDefaultLevelFound:Vue,mappings:zR,genLsCache:zue,genLevelComparison:Gue,assertLevelComparison:Kue}=jy(),{DEFAULT_LEVELS:Jue,SORTING_ORDER:Wue}=o9(),{createArgsNormalizer:Xue,asChindings:Yue,buildSafeSonicBoom:LR,buildFormatters:Que,stringify:Xy,normalizeDestFileDescriptor:FR,noop:Zue}=a9(),{version:e0e}=$y(),{chindingsSym:BR,redactFmtSym:t0e,serializersSym:MR,timeSym:n0e,timeSliceIndexSym:r0e,streamSym:i0e,stringifySym:UR,stringifySafeSym:Yy,strin
2024-04-02 15:03:09 +08:00
`:`
2024-04-12 14:29:25 +08:00
`),ne=Yue.bind(null,{[BR]:"",[MR]:l,[jR]:j,[UR]:Xy,[Yy]:D,[$R]:P}),J="";f!==null&&(d===void 0?J=ne(f):J=ne(Object.assign({},f,{name:d})));let W=a instanceof Function?a:a?GR:v0e,re=W().indexOf(":")+1;if(E&&!m)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(b&&typeof b!="function")throw Error(`Unknown mixin type "${typeof b}" - expected "function"`);if(N&&typeof N!="string")throw Error(`Unknown msgPrefix type "${typeof N}" - expected "string"`);Vue(h,m,E);let I=zR(m,E);Kue(x);let M=Gue(x);return Object.assign(e,{levels:I,[p0e]:M,[h0e]:E,[i0e]:r,[n0e]:W,[r0e]:re,[UR]:Xy,[Yy]:D,[jR]:j,[l0e]:V,[a0e]:U,[o0e]:o,[u0e]:u,[c0e]:c,[m0e]:c?`,${JSON.stringify(c)}:{`:"",[MR]:l,[f0e]:b,[y0e]:_,[BR]:J,[$R]:P,[d0e]:g,silent:Zue,onChild:C,[g0e]:N}),Object.setPrototypeOf(e,Hue()),zue(e),e[s0e](h),e}dl.exports=Qy;dl.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=FR(t.dest||process.stdout.fd),LR(t)):LR({dest:FR(t),minLength:0});dl.exports.transport=Py();dl.exports.multistream=PR();dl.exports.levels=zR();dl.exports.stdSerializers=S0e;dl.exports.stdTimeFunctions=Object.assign({},qR);dl.exports.symbols=VR;dl.exports.version=e0e;dl.exports.default=Qy;dl.exports.pino=Qy});var J4=k((eLe,QR)=>{"use strict";var T0e=BN(),c9=KR(),{serializersSym:JR}=c9.symbols,{FST_ERR_LOG_INVALID_DESTINATION:A0e,FST_ERR_LOG_INVALID_LOGGER:C0e}=qi();function WR(t){if(t.stream&&t.file)throw new A0e;t.file&&(t.stream=c9.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[JR]&&(t.serializers=Object.assign({},t.serializers,e[JR])),r=e.child({},t),t.logger=e,t.genReqId=n):r=c9(t,t.stream),r}var Zy={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:c9.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function O0e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function N0e(t){if(!t.logger){let r=T0e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(XR(t.logger))return{logger:WR({logger:t.logger,serializers:Object.assign({},Zy,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({},Zy,e.serializers),t.logger=e,{logger:WR(t.logger),hasLogger:!0}}function XR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(i=>!t[i]||typeof t[i]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw C0e(r.join(","))}else return!0}function I0e(t,e,n,r,i){let s={[t.requestIdLogLabel]:r},l=t.childLoggerFactory.call(t.server,e,s,i||{},n);return t.childLoggerFactory!==YR&&XR(l,!0),l}function YR(t,e,n){return t.child(e,n)}QR.exports={createLogger:N0e,createChildLogger:I0e,defaultChildLoggerFactory:YR,serializers:Zy,now:O0e}});var W4=k((tLe,ZR)=>{"use strict";ZR.exports=R0e;function b0(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function R0e(t){if(t=t||{},t.circles)return k0e(t);return t.proto?r:n;function e(i,s){for(var l=Object.keys(i),a=new Array(l.length),o=0;o<l.length;o++){var u=l[o],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=b0(c):a[u]=s(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,n);if(i instanceof Map)return new Map(e(Array.from(i),n));if(i instanceof Set)return new Set(e(Array.from(i),n));var s={};for(var l in i)if(Object.hasOwnProperty.call(i,l)!==!1){var a=i[l];typeof a!="object"||a===null?s[l]=a:a instanceof Date?s[l]=new Date(a):a instanceof Map?s[l]=new Map(e(Array.from(a),n)):a instanceof Set?s[l]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?s[l]=b0(a):s[l]=n(a)}return s}function r(i){if(typeof i!="object"||i===null
`:""},this._extScope=e,this._scope=new $l.Scope({parent:e}),this._nodes=[new dg]}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,i){let s=this._scope.toName(n);return r!==void 0&&i&&(this._constants[s.str]=r),this._leafNode(new og(e,s,r)),s}const(e,n,r){return this._def($l.varKinds.const,e,n,r)}let(e,n,r){return this._def($l.varKinds.let,e,n,r)}var(e,n,r){return this._def($l.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new m9(e,n,r))}add(e,n){return this._leafNode(new ug(e,Bt.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Qt.nil&&this._leafNode(new hg(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,Qt.addCodeArg)(n,i));return n.push("}"),new Qt._Code(n)}if(e,n,r){if(this._blockNode(new V3(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 V3(e))}else(){return this._elseNode(new S0)}endIf(){return this._endBlockNode(V3,S0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new mg(e),n)}forRange(e,n,r,i,s=this.opts.es5?$l.varKinds.var:$l.varKinds.let){let l=this._scope.toName(e);return this._for(new yg(s,l,n,r),()=>i(l))}forOf(e,n,r,i=$l.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let l=n instanceof Qt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Qt._)`${l}.length`,a=>{this.var(s,(0,Qt._)`${l}[${a}]`),r(s)})}return this._for(new y9("of",i,s,n),()=>r(s))}forIn(e,n,r,i=this.opts.es5?$l.varKinds.var:$l.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Qt._)`Object.keys(${n})`,r);let s=this._scope.toName(e);return this._for(new y9("in",i,s,n),()=>r(s))}endFor(){return this._endBlockNode(z3)}label(e){return this._leafNode(new cg(e))}break(e){return this._leafNode(new fg(e))}return(e){let n=new tc;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(tc)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gg;if(this._blockNode(i),this.code(e),n){let s=this.name("e");this._currNode=i.catch=new nc(s),n(s)}return r&&(this._currNode=i.finally=new rc,this.code(r)),this._endBlockNode(nc,rc)}throw(e){return this._leafNode(new pg(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=Qt.nil,r,i){return this._blockNode(new ec(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(ec)}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 V3))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}};Bt.CodeGen=vg;function G3(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function g9(t,e){return e in
|| (${l} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Dt._)`+${i}`);return;case"integer":r.elseIf((0,Dt._)`${l} === "boolean" || ${i} === null
|| (${l} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Dt._)`+${i}`);return;case"boolean":r.elseIf((0,Dt._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Dt._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,Dt._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,Dt._)`${l} === "string" || ${l} === "number"
|| ${l} === "boolean" || ${i} === null`).assign(a,(0,Dt._)`[${i}]`)}}}function j1e({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Dt._)`${e} !== undefined`,()=>t.assign((0,Dt._)`${e}[${n}]`,r))}function Tg(t,e,n,r=sc.Correct){let i=r===sc.Correct?Dt.operators.EQ:Dt.operators.NEQ,s;switch(t){case"null":return(0,Dt._)`${e} ${i} null`;case"array":s=(0,Dt._)`Array.isArray(${e})`;break;case"object":s=(0,Dt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=l((0,Dt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=l();break;default:return(0,Dt._)`typeof ${e} ${i} ${t}`}return r===sc.Correct?s:(0,Dt.not)(s);function l(a=Dt.nil){return(0,Dt.and)((0,Dt._)`typeof ${e} == "number"`,a,n?(0,Dt._)`isFinite(${e})`:Dt.nil)}}Ni.checkDataType=Tg;function Ag(t,e,n,r){if(t.length===1)return Tg(t[0],e,n,r);let i,s=(0,Tk.toHash)(t);if(s.array&&s.object){let l=(0,Dt._)`typeof ${e} != "object"`;i=s.null?l:(0,Dt._)`!${e} || ${l}`,delete s.null,delete s.array,delete s.object}else i=Dt.nil;s.number&&delete s.integer;for(let l in s)i=(0,Dt.and)(i,Tg(l,e,n,r));return i}Ni.checkDataTypes=Ag;var $1e={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Dt._)`{type: ${t}}`:(0,Dt._)`{type: ${e}}`};function Cg(t){let e=H1e(t);(0,L1e.reportError)(e,$1e)}Ni.reportTypeError=Cg;function H1e(t){let{gen:e,data:n,schema:r}=t,i=(0,Tk.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Nk=k(E9=>{"use strict";Object.defineProperty(E9,"__esModule",{value:!0});E9.assignDefaults=void 0;var O0=ht(),q1e=Pt();function V1e(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)Ok(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,s)=>Ok(t,s,i.default))}E9.assignDefaults=V1e;function Ok(t,e,n){let{gen:r,compositeRule:i,data:s,opts:l}=t;if(n===void 0)return;let a=(0,O0._)`${s}${(0,O0.getProperty)(e)}`;if(i){(0,q1e.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,O0._)`${a} === undefined`;l.useDefaults==="empty"&&(o=(0,O0._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,O0._)`${a} = ${(0,O0.stringify)(n)}`)}});var Ii=k(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.validateUnion=Zn.validateArray=Zn.usePattern=Zn.callValidateCode=Zn.schemaProperties=Zn.allSchemaProperties=Zn.noPropertyInData=Zn.propertyInData=Zn.isOwnProperty=Zn.hasPropFunc=Zn.reportMissingProp=Zn.checkMissingProp=Zn.checkReportMissingProp=void 0;var gr=ht(),Og=Pt(),q2=yl(),z1e=Pt();function G1e(t,e){let{gen:n,data:r,it:i}=t;n.if(Ig(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,gr._)`${e}`},!0),t.error()})}Zn.checkReportMissingProp=G1e;function K1e({gen:t,data:e,it:{opts:n}},r,i){return(0,gr.or)(...r.map(s=>(0,gr.and)(Ig(t,e,s,n.ownProperties),(0,gr._)`${i} = ${s}`)))}Zn.checkMissingProp=K1e;function J1e(t,e){t.setParams({missingProperty:e},!0),t.error()}Zn.reportMissingProp=J1e;function Ik(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,gr._)`Object.prototype.hasOwnProperty`})}Zn.hasPropFunc=Ik;function Ng(t,e,n){return(0,gr._)`${Ik(t)}.call(${e}, ${n})`}Zn.isOwnProperty=Ng;function W1e(t,e,n,r){let i=(0,gr._)`${e}${(0,gr.getProperty)(n)} !== undefined`;return r?(0,gr._)`${i} && ${Ng(t,e,n)}`:i}Zn.propertyInData=W1e;function Ig(t,e,n,r){let i=(0,gr._)`${e}${(0,gr.getProperty)(n)} === undefined`;return r?(0,gr.or)(i,(0,gr.not)(Ng(t,e,n))):i}Zn.noPropertyInData=Ig;function Rk(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Zn.allSchemaProperties=Rk;function X1e(t,e){return Rk(e).filter(n=>!(0,Og.alwaysValidSchema)(t,e[n]))}Zn.schemaProperties=X1e;function Y1e({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:s},it:l},a,o,u){let c=u?(0,gr._)`${t}, ${e}, ${r}${i}`:e,f=[[q2.default.instancePath,(0,gr.strConcat)(q2.default.instancePath,s)],[q2.default.parentData,l.parentData],[q2.default.parentDataProperty,l.parentDataProperty],[q2.default.rootData,q2.default.rootData]];l.opts.d
2024-04-02 15:03:09 +08:00
missingProperty: ${r},
depsCount: ${e},
2024-04-12 14:29:25 +08:00
deps: ${n}}`};var N5e={keyword:"dependencies",type:"object",schemaType:"object",error:ga.error,code(t){let[e,n]=I5e(t);qD(t,e),VD(t,n)}};function I5e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function qD(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let s=n.let("missing");for(let l in e){let a=e[l];if(a.length===0)continue;let o=(0,wc.propertyInData)(n,r,l,i.opts.ownProperties);t.setParams({property:l,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(o,()=>{for(let u of a)(0,wc.checkReportMissingProp)(t,u)}):(n.if((0,yv._)`${o} && (${(0,wc.checkMissingProp)(t,a,s)})`),(0,wc.reportMissingProp)(t,s),n.else())}}ga.validatePropertyDeps=qD;function VD(t,e=t.schema){let{gen:n,data:r,keyword:i,it:s}=t,l=n.name("valid");for(let a in e)(0,O5e.alwaysValidSchema)(s,e[a])||(n.if((0,wc.propertyInData)(n,r,a,s.opts.ownProperties),()=>{let o=t.subschema({keyword:i,schemaProp:a},l);t.mergeValidEvaluated(o,l)},()=>n.var(l,!0)),t.ok(l))}ga.validateSchemaDeps=VD;ga.default=N5e});var KD=k(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});var GD=ht(),R5e=Pt(),k5e={message:"property name must be valid",params:({params:t})=>(0,GD._)`{propertyName: ${t.propertyName}}`},D5e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:k5e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,R5e.alwaysValidSchema)(i,n))return;let s=e.name("valid");e.forIn("key",r,l=>{t.setParams({propertyName:l}),t.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},s),e.if((0,GD.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};gv.default=D5e});var _v=k(vv=>{"use strict";Object.defineProperty(vv,"__esModule",{value:!0});var P9=Ii(),Vl=ht(),P5e=yl(),L9=Pt(),L5e={message:"must NOT have additional properties",params:({params:t})=>(0,Vl._)`{additionalProperty: ${t.additionalProperty}}`},F5e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:L5e,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:s,it:l}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=l;if(l.props=!0,o.removeAdditional!=="all"&&(0,L9.alwaysValidSchema)(l,n))return;let u=(0,P9.allSchemaProperties)(r.properties),c=(0,P9.allSchemaProperties)(r.patternProperties);f(),t.ok((0,Vl._)`${s} === ${P5e.default.errors}`);function f(){e.forIn("key",i,b=>{!u.length&&!c.length?m(b):e.if(d(b),()=>m(b))})}function d(b){let _;if(u.length>8){let E=(0,L9.schemaRefOrVal)(l,r.properties,"properties");_=(0,P9.isOwnProperty)(e,E,b)}else u.length?_=(0,Vl.or)(...u.map(E=>(0,Vl._)`${b} === ${E}`)):_=Vl.nil;return c.length&&(_=(0,Vl.or)(_,...c.map(E=>(0,Vl._)`${(0,P9.usePattern)(t,E)}.test(${b})`))),(0,Vl.not)(_)}function h(b){e.code((0,Vl._)`delete ${i}[${b}]`)}function m(b){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(b);return}if(n===!1){t.setParams({additionalProperty:b}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,L9.alwaysValidSchema)(l,n)){let _=e.name("valid");o.removeAdditional==="failing"?(x(b,_,!1),e.if((0,Vl.not)(_),()=>{t.reset(),h(b)})):(x(b,_),a||e.if((0,Vl.not)(_),()=>e.break()))}}function x(b,_,E){let v={keyword:"additionalProperties",dataProp:b,dataPropType:L9.Type.Str};E===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,_)}}};vv.default=F5e});var XD=k(xv=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});var B5e=R0(),JD=Ii(),Ev=Pt(),WD=_v(),M5e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&WD.default.code(new B5e.KeywordCxt(s,WD.default,"additionalProperties"));let l=(0,JD.allSchemaProperties)(n);for(let f of l)s.definedProperties.add(f);s.opts.unevaluated&&l.length&&s.props!==!0&&(s.props=Ev.mergeEvaluated.props(e,(0,Ev.toHash)(l),s.props));let a=l.filter(f=>!(0,Ev.alwaysValidSchema)(s,n[f]));if(a.le
2024-04-02 15:03:09 +08:00
`,i+=`const validator = Validator.restoreFromState(validatorState)
`):i+=`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)
${i}
2024-04-12 14:29:25 +08:00
module.exports = ${t.toString()}(validator, serializer)`}Wv.exports=F8e;Wv.exports.dependencies={Serializer:ng(),Validator:Jv()}});var WP=k((wFe,JP)=>{"use strict";var{dependencies:B8e}=Xv(),{Serializer:M8e,Validator:bFe}=B8e,U8e={mode:"standalone"},j8e=M8e.restoreFromState(U8e),$8e=null;JP.exports=function(e,n){function r(s){let l=s&&typeof s.toJSON=="function"?s.toJSON():s;if(l===null)return"{}";let a=!1,o="{";return l.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(l.statusCode)),l.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(l.code)),l.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(l.error)),l.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(l.message)),o+"}"}return r}($8e,j8e)});var Cc=k((SFe,ZP)=>{"use strict";var XP=require("node:http").STATUS_CODES,H8e=Zm(),{kReplyHeaders:eu,kReplyNextErrorHandler:K9,kReplyIsRunningOnErrorHook:q8e,kReplyHasStatusCode:V8e,kRouteContext:QP}=xi(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:z8e,FST_ERR_FAILED_ERROR_SERIALIZATION:G8e}=qi(),{getSchemaSerializer:K8e}=X4(),Yv=WP(),J8e={func:X8e,toJSON(){return this.func.name.toString()+"()"}};function W8e(t,e,n){t[q8e]=!1;let r=t[QP];if(t[K9]===!1){YP(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[eu])}catch(u){a.log.warn({req:a.request,res:a,err:u},u&&u.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let i=t[K9]||r.errorHandler;t[K9]=Object.getPrototypeOf(i),delete t[eu]["content-type"],delete t[eu]["content-length"];let s=i.func;if(!s){t[K9]=!1,YP(e,t,n);return}let l=s(e,t.request,t);l!==void 0&&(l!==null&&typeof l.then=="function"?H8e(l,t):t.send(l))}function X8e(t,e,n){if(Q8e(t,n),!n[V8e]||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 YP(t,e,n){let r=e.raw,i=e.statusCode;e[eu]["content-type"]=e[eu]["content-type"]??"application/json; charset=utf-8";let s;try{let l=K8e(e[QP],i,e[eu]["content-type"]);s=l===!1?Yv({error:XP[i+""],code:t.code,message:t.message,statusCode:i}):l(Object.create(t,{error:{value:XP[i+""]},message:{value:t.message},statusCode:{value:i}}))}catch(l){e.log.error({err:l,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),s=Yv(new G8e(l.message,t.message))}typeof s!="string"&&!Buffer.isBuffer(s)&&(s=Yv(new z8e(typeof s))),e[eu]["content-length"]=""+Buffer.byteLength(s),n(e,s)}function Y8e(t=J8e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function Q8e(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}ZP.exports={buildErrorHandler:Y8e,handleError:W8e}});var Z9=k((TFe,Q9)=>{"use strict";var t_=require("node:stream").finished,Z8e=require("node:stream").Readable,{kFourOhFourContext:eL,kPublicRouteContext:tL,kReplyErrorHandlerCalled:uL,kReplyHijacked:Oc,kReplyStartTime:Nc,kReplyEndTime:r_,kReplySerializer:a2,kReplySerializerDefault:W9,kReplyIsError:X9,kReplyHeaders:fr,kReplyTrailers:bi,kReplyHasStatusCode:i_,kReplyIsRunningOnErrorHook:s_,kReplyNextErrorHandler:e9e,kDisableRequestLogging:cL,kSchemaResponse:Y9,kReplyCacheSerializeFns:X2,kSchemaController:Qv,kOptions:t9e,kRouteContext:$t}=xi(),{onSendHookRunner:fL,onResponseHookRunner:n9e,preHandlerHookRunner:r9e,preSerializationHookRunner:i9e}=F2(),nL=ry()[Symbol.for("internals")],s9e=J4(),n_=s9e.now,{handleError:rL}=Cc(),{getSchemaSerializer:l9e}=X4(),Zv={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:a9e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:o9e,FST_ERR_REP_ALREADY_SENT:pL,FST_ERR_REP_SENT_VALUE:u9e,FST_ERR_SEND_INSIDE_ONERR:c9e,FST_ERR_BAD_STATUS_CODE:f9e,FST_ERR_BAD_TRAILER_NAME:p9e,FST_ERR_BAD_TRAILER_VALUE:h9e,FST_ERR_MISSING_SERIALIZATION_FN:d9e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:m9e}=qi(),{FSTDEP010:y9e,FSTDEP013:g9e,FSTDEP019:v9e,FSTDEP020:_9e}=t2
2024-04-02 15:03:09 +08:00
${n.functions.join(`
`)}
const main = anonymous0
return main
2024-04-12 14:29:25 +08:00
`:l=`
2024-04-02 15:03:09 +08:00
function main (input) {
let json = ''
2024-04-12 14:29:25 +08:00
${s}
2024-04-02 15:03:09 +08:00
return json
}
${n.functions.join(`
`)}
return main
2024-04-12 14:29:25 +08:00
`;let a=new rde(e),o=new ide(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);o.addSchema(f,c);let d=n.refResolver.getSchemaDependencies(c);for(let[h,m]of Object.entries(d))o.addSchema(m,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
2024-04-02 15:03:09 +08:00
serializer
2024-04-12 14:29:25 +08:00
${l}`,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode==="standalone"?Xv()(u,n,a,o):u(o,a)}var ade=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],ode=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],ude=["maxLength","minLength","pattern"],cde=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function vM(t){for(var e of ade)if(e in t)return"object";for(var e of ode)if(e in t)return"array";for(var e of ude)if(e in t)return"string";for(var e of cde)if(e in t)return"number";return t.type}function fde(t,e){let n=e.schema,r=Object.keys(n.properties||{}),i=`
2024-04-02 15:03:09 +08:00
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
2024-04-12 14:29:25 +08:00
`,s=e.getPropertyLocation("patternProperties"),l=s.schema;if(l!==void 0)for(let u in l){let c=s.getPropertyLocation(u);i+=`
2024-04-02 15:03:09 +08:00
if (/${u.replace(/\\*\//g,"\\/")}/.test(key)) {
2024-04-12 14:29:25 +08:00
${K0}
2024-04-02 15:03:09 +08:00
json += serializer.asString(key) + ':'
2024-04-09 09:34:47 +08:00
${xa(t,c,"value")}
2024-04-02 15:03:09 +08:00
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)i+=`
2024-04-12 14:29:25 +08:00
${K0}
2024-04-02 15:03:09 +08:00
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let u=e.getPropertyLocation("additionalProperties");i+=`
2024-04-12 14:29:25 +08:00
${K0}
2024-04-02 15:03:09 +08:00
json += serializer.asString(key) + ':'
2024-04-09 09:34:47 +08:00
${xa(t,u,"value")}
2024-04-02 15:03:09 +08:00
`}return i+=`
}
2024-04-12 14:29:25 +08:00
`,i}function pde(t,e){let n="",r=e.schema,i=r.required||[],s=e.getPropertyLocation("properties"),l=[],a=[];if(r.properties)for(let u of Object.keys(r.properties)){if(i.indexOf(u)===-1)continue;let c=s.getPropertyLocation(u);c.schema.$ref&&(c=J0(t,e,c.schema.$ref));let f=JSON.stringify(u);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
`,a.push(u)),l.push(u)}for(let u of i)l.indexOf(u)===-1&&(n+=`if (obj['${u}'] === undefined) throw new Error('"${u}" is required!')
2024-04-02 15:03:09 +08:00
`);n+=`
let addComma = false
let json = '${t.wrapObjects?"{":""}'
2024-04-12 14:29:25 +08:00
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let u of Object.keys(r.properties)){let c=s.getPropertyLocation(u);c.schema.$ref&&(c=J0(t,e,c.schema.$ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+=`
${K0}
2024-04-02 15:03:09 +08:00
json += ${JSON.stringify(f+":")}
2024-04-09 09:34:47 +08:00
${xa(t,c,`obj[${f}]`)}
2024-04-02 15:03:09 +08:00
`;else{n+=`
if (obj[${f}] !== undefined) {
2024-04-12 14:29:25 +08:00
${K0}
2024-04-02 15:03:09 +08:00
json += ${JSON.stringify(f+":")}
2024-04-09 09:34:47 +08:00
${xa(t,c,`obj[${f}]`)}
2024-04-02 15:03:09 +08:00
}
`;let d=c.schema.default;d!==void 0&&(n+=`
else {
2024-04-12 14:29:25 +08:00
${K0}
2024-04-02 15:03:09 +08:00
json += ${JSON.stringify(f+":"+JSON.stringify(d))}
}
2024-04-12 14:29:25 +08:00
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=fde(t,e)),t.wrapObjects=o,n+=`
2024-04-02 15:03:09 +08:00
return json${t.wrapObjects?" + '}'":""}
2024-04-12 14:29:25 +08:00
`,n}function _M(t,e,n,r){let i=e.getPropertyLocation("allOf");for(let s=0;s<n.allOf.length;s++){let l=n.allOf[s];if(l.$ref){let o=i.getPropertyLocation(s);l=J0(t,o,l.$ref).schema}let a=l.type;if(a===void 0&&(a=vM(l)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(l.format!==void 0){if(r.format!==void 0&&r.format!==l.format)throw new Error("allOf schemas have different format values");r.format=l.format}if(l.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==l.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=l.nullable}l.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,l.properties)),l.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,l.additionalProperties)),l.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,l.patternProperties)),l.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...l.required)),l.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...l.oneOf)),l.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...l.anyOf)),l.allOf!==void 0&&_M(t,e,l,r)}delete r.allOf,r.$id=`__fjs_merged_${gM++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function hde(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=Q_({},e.schema),i=r.then,s=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=Q_(r,i);let u=e.getPropertyLocation("else");return u.schema=Q_(r,s),`
2024-04-02 15:03:09 +08:00
if (validator.validate("${a}", ${n})) {
2024-04-09 09:34:47 +08:00
${xa(t,o,n)}
2024-04-02 15:03:09 +08:00
} else {
2024-04-09 09:34:47 +08:00
${xa(t,u,n)}
2024-04-02 15:03:09 +08:00
}
2024-04-12 14:29:25 +08:00
`}function dde(t){return`(${t} && typeof ${t}.toJSON === 'function')
2024-04-02 15:03:09 +08:00
? ${t}.toJSON()
: ${t}
2024-04-12 14:29:25 +08:00
`}function EM(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=bM(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let s=`
`,l=n.nullable===!0;return s+=`
2024-04-02 15:03:09 +08:00
// ${i}
function ${r} (input) {
2024-04-12 14:29:25 +08:00
const obj = ${dde("input")}
${l?"":"if (obj === null) return '{}'"}
2024-04-02 15:03:09 +08:00
2024-04-12 14:29:25 +08:00
${pde(t,e)}
2024-04-02 15:03:09 +08:00
}
2024-04-12 14:29:25 +08:00
`,t.functions.push(s),r}function mde(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=J0(t,r,r.schema.$ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let s=bM(t);t.functionsNamesBySchema.set(n,s);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let a=`
function ${s} (obj) {
// ${l}
2024-04-02 15:03:09 +08:00
`,o=n.nullable===!0;if(a+=`
${o?"":"if (obj === null) return '[]'"}
if (!Array.isArray(obj)) {
2024-04-12 14:29:25 +08:00
throw new TypeError(\`The value of '${l}' does not match schema definition.\`)
2024-04-02 15:03:09 +08:00
}
const arrayLength = obj.length
`,!n.additionalItems&&Array.isArray(i)&&(a+=`
if (arrayLength > ${i.length}) {
throw new Error(\`Item at ${i.length} does not match schema definition.\`)
}
2024-04-12 14:29:25 +08:00
`),mM==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${C7}) return JSON.stringify(obj)
2024-04-02 15:03:09 +08:00
`),a+=`
let jsonOutput = ''
2024-04-09 09:34:47 +08:00
`,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=xa(t,r.getPropertyLocation(u),`obj[${u}]`);a+=`
2024-04-02 15:03:09 +08:00
if (${u} < arrayLength) {
2024-04-12 14:29:25 +08:00
if (${xM(c.type,`[${u}]`)}) {
2024-04-02 15:03:09 +08:00
let json = ''
${f}
jsonOutput += json
if (${u} < arrayLength - 1) {
jsonOutput += ','
}
} else {
throw new Error(\`Item at ${u} does not match schema definition.\`)
}
}
`}n.additionalItems&&(a+=`
for (let i = ${i.length}; i < arrayLength; i++) {
jsonOutput += JSON.stringify(obj[i])
if (i < arrayLength - 1) {
jsonOutput += ','
}
2024-04-09 09:34:47 +08:00
}`)}else{let u=xa(t,r,"obj[i]");a+=`
2024-04-02 15:03:09 +08:00
for (let i = 0; i < arrayLength; i++) {
let json = ''
${u}
jsonOutput += json
if (i < arrayLength - 1) {
jsonOutput += ','
}
2024-04-12 14:29:25 +08:00
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),s}function xM(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
2024-04-02 15:03:09 +08:00
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
2024-04-12 14:29:25 +08:00
)`;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(i=>xM(i,e)).join(" || ")})`)}return n}function bM(t){return"anonymous"+t.functionsCounter++}function yde(t,e,n){let i=e.schema.type.sort(a=>a==="null"?-1:1),s="";i.forEach((a,o)=>{e.schema={...e.schema,type:a};let u=wM(t,e,n),c=o===0?"if":"else if";switch(a){case"null":s+=`
2024-04-02 15:03:09 +08:00
${c} (${n} === null)
${u}
2024-04-12 14:29:25 +08:00
`;break;case"string":{s+=`
2024-04-02 15:03:09 +08:00
${c}(
typeof ${n} === "string" ||
${n} === null ||
${n} instanceof Date ||
${n} instanceof RegExp ||
(
typeof ${n} === "object" &&
typeof ${n}.toString === "function" &&
${n}.toString !== Object.prototype.toString
)
)
${u}
2024-04-12 14:29:25 +08:00
`;break}case"array":{s+=`
2024-04-02 15:03:09 +08:00
${c}(Array.isArray(${n}))
${u}
2024-04-12 14:29:25 +08:00
`;break}case"integer":{s+=`
2024-04-02 15:03:09 +08:00
${c}(Number.isInteger(${n}) || ${n} === null)
${u}
2024-04-12 14:29:25 +08:00
`;break}default:{s+=`
2024-04-02 15:03:09 +08:00
${c}(typeof ${n} === "${a}" || ${n} === null)
${u}
2024-04-12 14:29:25 +08:00
`;break}}});let l=e.getSchemaRef();return l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,"")),s+=`
else throw new TypeError(\`The value of '${l}' does not match schema definition.\`)
`,s}function wM(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 += ${EM(t,e)}(${n})`;case"array":return`json += ${mde(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function gde(t,e){let n=t.schema,r=n.type,i=Array.isArray(r)&&r.includes("null"),s="";return i&&(s+=`
2024-04-02 15:03:09 +08:00
if (${e} === null) {
json += 'null'
} else {
2024-04-12 14:29:25 +08:00
`),s+=`json += '${JSON.stringify(n.const).replace(sde,"\\'")}'`,i&&(s+=`
2024-04-02 15:03:09 +08:00
}
2024-04-12 14:29:25 +08:00
`),s}function xa(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=J0(t,e,r.$ref),r=e.schema),r.type===void 0){let a=vM(r);a&&(r.type=a)}if(r.if&&r.then)return hde(t,e,n);r.allOf&&(_M(t,e,r,tde(r)),r=e.schema);let i=r.type,s="";if((i===void 0||i==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=EM(t,e);s+=`
2024-04-02 15:03:09 +08:00
json += '{'
json += ${c}(${n})
json += ','
2024-04-12 14:29:25 +08:00
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=o.getPropertyLocation(c),d=f.getSchemaRef(),h=xa(t,f,n);s+=`
2024-04-02 15:03:09 +08:00
${c===0?"if":"else if"}(validator.validate("${d}", ${n}))
${h}
2024-04-12 14:29:25 +08:00
`}let u=e.getSchemaRef();return u.startsWith(t.rootSchemaId)&&(u=u.replace(t.rootSchemaId,"")),s+=`
2024-04-02 15:03:09 +08:00
else throw new TypeError(\`The value of '${u}' does not match schema definition.\`)
2024-04-12 14:29:25 +08:00
`,r.type==="object"&&(s+=`
2024-04-02 15:03:09 +08:00
json += '}'
2024-04-12 14:29:25 +08:00
`,t.wrapObjects=!0),s}let l=r.nullable===!0;return l&&(s+=`
2024-04-02 15:03:09 +08:00
if (${n} === null) {
json += 'null'
} else {
2024-04-12 14:29:25 +08:00
`),r.const!==void 0?s+=gde(e,n):Array.isArray(i)?s+=yde(t,e,n):s+=wM(t,e,n),l&&(s+=`
2024-04-02 15:03:09 +08:00
}
2024-04-12 14:29:25 +08:00
`),s}W0.exports=eE;W0.exports.default=eE;W0.exports.build=eE;W0.exports.validLargeArrayMechanisms=yM;W0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var AM=k((DBe,tE)=>{"use strict";var vde=nE();function TM(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=vde();return function(r,i={}){i.mode="standalone";let s=e(r,i);return function(l){let a=s(l);return t.storeFunction(l,a),new Function(a)}}}tE.exports=TM;tE.exports.default=TM});var nE=k((PBe,zc)=>{"use strict";var _de=SM();function rE(){return function(e,n){let r=Object.assign({},n,{schema:e});return Ede.bind(null,r)}}function Ede(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),_de(e,t)}zc.exports=rE;zc.exports.default=rE;zc.exports.SerializerSelector=rE;zc.exports.StandaloneSerializer=AM()});var p2=k(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.checkMetadata=void 0;var xde=Pt(),bde={keyword:"metadata",schemaType:"object",code(t){CM(t);let{gen:e,schema:n,it:r}=t;if((0,xde.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function CM({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}Gc.checkMetadata=CM;Gc.default=bde});var O7=k(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.hasRef=void 0;var OM=X3(),Kc=ht(),wde=K2(),NM=yl(),IM=Kg(),Sde=p2(),Tde={keyword:"ref",schemaType:"string",code(t){(0,Sde.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:i,it:s}=t,{schemaEnv:{root:l}}=s,a=e.name("valid");i.nullable?(e.var(a,(0,Kc._)`${n} === null`),e.if((0,Kc.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var f;let d=(f=l.schema.definitions)===null||f===void 0?void 0:f[r];if(!d)throw new wde.default(s.opts.uriResolver,"",r,`No definition ${r}`);iE(d)||!s.opts.inlineRefs?u(d):c(d)}function u(f){let d=OM.compileSchema.call(s.self,new OM.SchemaEnv({schema:f,root:l,schemaPath:`/definitions/${r}`})),h=(0,IM.getValidate)(t,d),m=e.const("_errs",NM.default.errors);(0,IM.callRef)(t,h,d,d.$async),e.assign(a,(0,Kc._)`${m} === ${NM.default.errors}`)}function c(f){let d=e.scopeValue("schema",s.opts.code.source===!0?{ref:f,code:(0,Kc.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:Kc.nil,topSchemaRef:d,errSchemaPath:`/definitions/${r}`},a)}}};function iE(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&iE(n))return!0}return!1}Jc.hasRef=iE;Jc.default=Tde});var lE=k(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});var Ade=/t|\s/i,Cde=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ode=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,Nde=[0,31,28,31,30,31,30,31,31,30,31,30,31];function kM(t,e){let n=t.split(Ade);return n.length===2&&RM(n[0])&&Ide(n[1])||e&&n.length===1&&RM(n[0])}sE.default=kM;function RM(t){let e=Cde.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=Nde[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function Ide(t){let e=Ode.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],s=+(e[4]||0),l=+(e[5]||0);return n<=23&&r<=59&&i<=59||n-s===23&&r-l===59&&i===60}kM.code='require("ajv/dist/runtime/timestamp").default'});var X0=k(Q2=>{"use strict";Object.defineProperty(Q2,"__esModule",{value:!0});Q2.typeErrorParams=Q2.typeErrorMessage=Q2.typeError=void 0;var Rde=ht();function kde(t){return{message:e=>DM(e,t),params:e=>PM(e,t)}}Q2.typeError=kde;function DM({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Q2.typeErrorMessage=DM;function PM({parentSchema:t},e){return(0,Rde._)`{type: ${e}, nullab
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Kme=97,Jme=48;function to(t,e){let n="",r;for(to.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in uU)n+=uU[r],e++;else if(r==="u"){e++;let s=4,l=0;for(;s--;){if(l<<=4,r=t[e],r===void 0){i("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")l+=r.charCodeAt(0)-Kme+10;else if(r>="0"&&r<="9")l+=r.charCodeAt(0)-Jme;else{i(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(l)}else{i(`unexpected token ${r}`);return}else if(r===void 0){i("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{i(`unexpected token ${r}`);return}return to.position=e,n;function i(s){to.position=e,to.message=s}}no.parseJsonString=to;to.message=void 0;to.position=0;to.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var xU=k(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});var Wme=vE(),dU=X3(),at=ht(),Xme=K2(),qt=yl(),Yme=Ii(),Qme=O7(),Zme=aE(),TE=cU(),mU=Pt(),eye=lE(),tye={elements:sye,values:lye,discriminator:oye,properties:fU,optionalProperties:fU,enum:cye,type:uye,ref:fye};function yU(t,e){let n=dU.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,l=new at.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s}),a=l.scopeName("parse"),o={self:this,gen:l,schema:t.schema,schemaEnv:t,definitions:e,data:qt.default.data,parseName:a,char:l.name("c")},u;try{this._compilations.add(t),t.parseName=a,nye(o),l.optimize(this.opts.code.optimize);let c=l.toString();u=`${l.scopeRefs(qt.default.scope)}return ${c}`;let d=new Function(`${qt.default.scope}`,u)(this.scope.get());this.scope.value(a,{ref:d}),t.parse=d}catch(c){throw u&&this.logger.error("Error compiling parser, function code:",u),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}IE.default=yU;var SE=(0,at._)`undefined`;function nye(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,at._)`${qt.default.json}, ${qt.default.jsonPos}, ${qt.default.jsonPart}`,!1,()=>{e.let(qt.default.data),e.let(r),e.assign((0,at._)`${n}.message`,SE),e.assign((0,at._)`${n}.position`,SE),e.assign(qt.default.jsonPos,(0,at._)`${qt.default.jsonPos} || 0`),e.const(qt.default.jsonLen,(0,at._)`${qt.default.json}.length`),D7(t),NE(t),e.if(qt.default.jsonPart,()=>{e.assign((0,at._)`${n}.position`,qt.default.jsonPos),e.return(qt.default.data)}),e.if((0,at._)`${qt.default.jsonPos} === ${qt.default.jsonLen}`,()=>e.return(qt.default.data)),t1(t)})}function D7(t){let e;for(let n of Wme.jtdForms)if(n in t.schema){e=n;break}e?iye(t,tye[e]):CE(t)}var rye=hU(!0,hU(!1,t1));function iye(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);Yc(t,"null",e,()=>n.assign(i,null))}function sye(t){let{gen:e,schema:n,data:r}=t;ba(t,"[");let i=e.let("i",0);e.assign(r,(0,at._)`[]`),AE(t,"]",()=>{let s=e.let("el");D7({...t,schema:n.elements,data:s}),e.assign((0,at._)`${r}[${i}++]`,s)})}function lye(t){let{gen:e,schema:n,data:r}=t;ba(t,"{"),e.assign(r,(0,at._)`{}`),AE(t,"}",()=>aye(t,n.values))}function AE(t,e,n){gU(t,e,n),ba(t,e)}function gU(t,e,n){let{gen:r}=t;r.for((0,at._)`;${qt.default.jsonPos}<${qt.default.jsonLen} && ${P7(1)}!==${e};`,()=>{n(),Yc(t,",",()=>r.break(),i)});function i(){Yc(t,e,()=>{},t1)}}function aye(t,e){let{gen:n}=t,r=n.let("key");ou({...t,data:r}),ba(t,":"),_U(t,r,e)}function oye(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:s}=r;ba(t,"{"),e.assign(n,(0,at._)`{}`);let l=e.const("pos",qt.default.jsonPos),a=e.let("value"),o=e.let("tag");gU(t,"}",()=>{let u=e.let("key");ou({...t,data:u}),ba(t,":"),e.if((0,at._)`${u} === ${i}`,()=>{ou({...t,data:o}),e.assign((0,at._)`${n}[${u}]`,o),e.break()},()=>CE({...t,data:a}))}),e.assign(qt.default.jsonPos,l),e.if((0,at._)`${o} === undefined`),g2(t,(0,at.str)`discriminator tag not found`);for(let u in s)e.elseIf((0,at._)`${o} === ${u}`),vU({...t,schema:s[u]},i);e.else(),g2(t,(0,at.str)`discriminator value not in schema`),e.endIf()}function fU(t){let{gen:e,data:n}=t;ba(t,"{"),e.assign(n,(0,at._)`{}`),vU(t)}function vU(t,e){let{gen:n,schema:r,data:i}=t,{properties:s,optionalProperties:l,additio
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function UU(t){return t[Symbol.for("fastify.display-name")]}function jU(t){return!!t[Symbol.for("skip-override")]}function $U(t){let e=e5(t);if(!e)return;let n=e.dependencies;n&&($E(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{$E(this[HE].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function HU(t){let e=e5(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&jE(this,"Fastify",n.fastify,r),n.reply&&jE(this,"Reply",n.reply,r),n.request&&jE(this,"Request",n.request,r))}var Hye={Fastify:Lye,Request:Bye,Reply:Fye};function jE(t,e,n,r){$E(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let s=typeof r=="string"?` required by '${r}'`:"";if(!Hye[e].call(t,i))throw new Uye(i,s,e)})}function qye(t){let e=e5(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&UE.gt(this.version,UE.coerce(n))===!0)&&n&&UE.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Mye(e.name,n,this.version)}function Vye(t){let e=e5(t);if(!e)return;let n=e.name;if(n)return this[HE].push(n),n}function zye(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&jye(e||"anonymous")}function Gye(t){let e=Vye.call(this,t)||MU(t);return zye.call(this,t,e),qye.call(this,t),HU.call(this,t),$U.call(this,t),jU(t)}qE.exports={getPluginName:MU,getFuncPreview:$ye,kRegisteredPlugins:HE,getDisplayName:UU,registerPlugin:Gye};qE.exports[Pye]={shouldSkipOverride:jU,getMeta:e5,checkDecorators:HU,checkDependencies:$U}});var F7=k((oMe,qU)=>{"use strict";function Kye(t,e){let n=e||Wye();return t?Xye(t,n):n}function Jye(t,e){return t.genReqId(e)}function Wye(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function Xye(t,e){return function(n){return n.headers[t]||e(n)}}qU.exports={getGenReqId:Jye,reqIdGenFactory:Kye}});var KU=k((uMe,GU)=>{"use strict";var VU=12,Yye=0,zE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 Qye(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,s=0,l=e,a=VU;e>-1&&e<n;){var o=zU(t[e+1],4),u=zU(t[e+2],0),c=o|u,f=zE[c];if(a=zE[256+a+f],s=s<<6|c&zE[364+f],a===VU)r+=t.slice(i,l),r+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,i=e+3,e=l=t.indexOf("%",i);else{if(a===Yye)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var Zye={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 zU(t,e){var n=Zye[t];return n===void 0?255:n<<e}GU.exports=Qye});var QU=k((cMe,YU)=>{"use strict";var JU=KU(),WU=/\+/g,XU=function(){};XU.prototype=Object.create(null);function ege(t){let e=new XU;if(typeof t!="string")return e;let n=t.length,r="",i="",s=-1,l=-1,a=!1,o=!1,u=!1,c=!1,f=!1,d=0;for(let h=0;h<n+1;h++)if(d=h!==n?t.charCodeAt(h):38,d===38){if(f=l>s,f||(l=h),r=t.slice(s+1,l),f||r.length>0){u&&(r=r.replace(WU," ")),a&&(r=JU(r)||r),f&&(i=t.slice(l+1,h),c&&(i=i.replace(WU," ")),o&&(i=JU(i)||i));let m=e[r];m===void 0?e[r]=i:m.pop?m.push(i):e[r]=[m,i]}i="",s=h,l=h,a=!1,o=!1,u=!1,c=!1}else d===61?l<=s?l=h:o=!0:d===43?l>s?c=!0:u=!0:d===37&&(l>s?o=!0:a=!0);return e}YU.exports=ege});var ej=k((fMe,ZU)=>{var wa=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase(
2024-04-02 15:03:09 +08:00
`).join(`
2024-04-12 14:29:25 +08:00
`+e+u);n+=e+o+s+f+`
`,n+=bj(l,e+u)}return n}function uge(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function wj(t){return Array.isArray(t)?t.map(e=>wj(e)):typeof t=="symbol"?t.toString():typeof t=="function"?uge(t):t}function cge(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(n));for(let s of i){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let l=s.toString(),a=n[s];if(a!=null){let o=JSON.stringify(wj(a));r[l]=o}}return r}function fge(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function pge(t){let e={...t.opts.constraints},n=e[Ej.name];return delete e[Ej.name],{...t,method:n,opts:{constraints:e}}}function hge(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=fge(t.metaData),e}function dge(t){return t.reduce((e,n)=>{for(let r of e)if(_j(n.opts.constraints,r.opts.constraints)&&_j(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function mge(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(pge)),r=r.map(i=>(i.metaData=cge(i,n),i)),n.method===void 0&&(r=dge(r)),r.map(hge).join(`
${e}`)}function j7(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[xj]=mge(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))j7(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let s=Array.from(i.nodePaths).join("|");j7(i,e,n+s,r)}t.wildcardChild&&j7(t.wildcardChild,e,"*",r)}function yge(t,e){let n={};return j7(t,n,t.prefix,e),bj(n)}Sj.exports={prettyPrintTree:yge}});var Cj=k((bMe,Aj)=>{"use strict";var gge=U7(),XE=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,i=n.opts.constraints||{},s={params:r,constraints:i,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},l=Object.keys(i);l.length===0&&(this.unconstrainedHandler=s);for(let o of l)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=l.includes(gge.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(s),this.handlers.sort((o,u)=>Object.keys(o.constraints).length-Object.keys(u.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,i)}_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 s=this.handlers[r].constraints[n];if(s!==void 0){let l=e.get(s)||0;l|=1<<r,e.set(s,l)}}}_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 i=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=i,this._buildConstraintStore(i,r)}let n=[];n.push(`
2024-04-02 15:03:09 +08:00
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}
2024-04-12 14:29:25 +08:00
`);let s=e.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";n.push(`
2024-04-02 15:03:09 +08:00
if (value === undefined) {
candidates &= mask
} else {
matches = this.constrainedHandlerStores.${r}.get(value) || 0
2024-04-12 14:29:25 +08:00
candidates &= ${s}
2024-04-02 15:03:09 +08:00
}
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(`
2024-04-12 14:29:25 +08:00
`))}};Aj.exports=XE});var Nj=k((wMe,Oj)=>{"use strict";var vge=Cj(),G7={STATIC:0,PARAMETRIC:1,WILDCARD:2},$7=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 vge),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},H7=class extends $7{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 i=1;for(;i<n.prefix.length;i++)if(e.charCodeAt(i)!==n.prefix.charCodeAt(i)){n=n.split(this,i);break}return n.createStaticChild(e.slice(i))}let r=e.charAt(0);return this.staticChildren[r]=new q7(e),this.staticChildren[r]}},q7=class t extends H7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=G7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(i=>(i.regex&&i.regex.source)===n);return r||null}createParametricChild(e,n,r){let i=this.getParametricChild(e);return i?(i.nodePaths.add(r),i):(i=new V7(e,n,r),this.parametricChildren.push(i),this.parametricChildren.sort((s,l)=>s.isRegex?l.isRegex?s.staticSuffix===null?1:l.staticSuffix===null?-1:l.staticSuffix.endsWith(s.staticSuffix)?1:s.staticSuffix.endsWith(l.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new z7,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),i=this.prefix.slice(n);this.prefix=i,this._compilePrefixMatch();let s=new t(r);return s.staticChildren[i.charAt(0)]=this,e.staticChildren[r.charAt(0)]=s,s}getNextNode(e,n,r,i){let s=this.findStaticMatchingChild(e,n),l=0;if(s===null){if(this.parametricChildren.length===0)return this.wildcardChild;s=this.parametricChildren[0],l=1}this.wildcardChild!==null&&r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=l;a--)r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return s}_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(" && ")}`)}},V7=class extends H7{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=G7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},z7=class extends $7{constructor(){super(),this.kind=G7.WILDCARD}getNextNode(){return null}};Oj.exports={StaticNode:q7,ParametricNode:V7,WildcardNode:z7,NODE_TYPES:G7}});var Rj=k((SMe,Ij)=>{"use strict";var _ge=require("assert");function s5(){if(!(this instanceof s5))return new s5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}s5.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,i]=t.split(".");return n=Number(n)||0,r=Number(r)||0,i=Number(i)||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),i>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=i,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${i}`]=e,this};s5.prototype.get=function(t){return this.store[t]};Ij.exports={name:"version",mustMatchWhenDerived:!0,storage:s5,validate(t){_ge(typeof t=="string","Version should be a string")}}});var Dj=k((TMe,kj)=>{"use strict";var Ege=require("assert");function xge(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for
`)).bind(this)}};Pj.exports=QE});var Bj=k((CMe,Fj)=>{"use strict";var Sge=["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"];Fj.exports=Sge});var jj=k((OMe,Uj)=>{"use strict";function Mj(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 Tge(t,e){let n=!1,r=!1,i="";for(let l=1;l<t.length;l++){let a=t.charCodeAt(l);if(a===37){let o=t.charCodeAt(l+1),u=t.charCodeAt(l+2);Mj(o,u)===null?n=!0:(r=!0,o===50&&u===53&&(n=!0,t=t.slice(0,l+1)+"25"+t.slice(l+1),l+=2),l+=2)}else if(a===63||a===35||a===59&&e){i=t.slice(l+1),t=t.slice(0,l);break}}return{path:n?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function Age(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let i=e;i<t.length;i++)if(t.charCodeAt(i)===37){let s=t.charCodeAt(i+1),l=t.charCodeAt(i+2),a=Mj(s,l);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}Uj.exports={safeDecodeURI:Tge,safeDecodeURIComponent:Age}});var ix=k((NMe,Kj)=>{"use strict";var Hr=require("assert"),Cge=aj(),K7=gj(),tx=N0(),{prettyPrintTree:Oge}=Tj(),{StaticNode:$j,NODE_TYPES:ZE}=Nj(),Nge=Lj(),a1=Bj(),ex=U7(),{safeDecodeURI:Ige,safeDecodeURIComponent:Hj}=jj(),qj=/^https?:\/\/.*?\//,cu=/(\/:[^/()]*?)\?(\/?)/;if(!K7(qj))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!K7(cu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Ar(t){if(!(this instanceof Ar))return new Ar(t);t=t||{},this._opts=t,t.defaultRoute?(Hr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Hr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Hr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Rge,t.querystringParser?(Hr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Cge.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 Nge(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Ar.prototype.on=function(e,n,r,i,s){typeof r=="function"&&(i!==void 0&&(s=i),i=r,r={}),Hr(typeof n=="string","Path should be a string"),Hr(n.length>0,"The path could not be empty"),Hr(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Hr(typeof i=="function","Handler should be a function");let l=n.match(cu);if(l){Hr(n.length===l.index+l[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(cu,"$1$2"),c=n.replace(cu,"$2");this.on(e,u,r,i,s),this.on(e,c,r,i,s);return}let a=n;this.ignoreDuplicateSlashes&&(n=nx(n)),this.ignoreTrailingSlash&&(n=rx(n));let o=Array.isArray(e)?e:[e];for(let u of o)Hr(typeof u=="string","Method should be a string"),Hr(a1.includes(u),`Method '${u}' is not an http method.`),this._on(u,n,r,i,s,a)};Ar.prototype._on=function(e,n,r,i,s){let l={};r.constraints!==void 0&&(Hr(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(l=r.constraints)),this.constrainer.validateConstraints(l),this.constrainer.noteUsage(l),this.trees[e]===void 0&&(this.trees[e]=new $j("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let d=this.trees[e]
2024-04-02 15:03:09 +08:00
Content-Length: ${we.length}\r
Content-Type: application/json\r
\r
2024-04-12 14:29:25 +08:00
${we}`),ge.destroy(se)}function re(se,ge){se.headers["accept-version"]!==void 0&&(se.headers[g_e]=se.headers["accept-version"],se.headers["accept-version"]=void 0),h.router.lookup(se,ge)}function I(se,ge,we){if(a){let pt=sH(P.server,ge),Me=rH(P,o,ge,pt),St=new sf(pt,null,ge,null,Me,P),en=new y5(we,St,Me);return s===!1&&Me.info({req:St},"incoming request"),a(new B_e(se),St,en)}let qe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${se}' is not a valid url component","statusCode":400}`;we.writeHead(400,{"Content-Type":"application/json","Content-Length":qe.length}),we.end(qe)}function M(se,ge,we){if(se!==!1)return function(pt){if(pt){if(a){let St=sH(P.server,ge),en=rH(P,o,ge,St),mt=new sf(St,null,ge,null,en,P),It=new y5(we,mt,en);return s===!1&&en.info({req:mt},"incoming request"),a(new F_e,mt,It)}let Me='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';we.writeHead(500,{"Content-Type":"application/json","Content-Length":Me.length}),we.end(Me)}}}function F(se,ge){return G('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,se,ge,D,d.routeHandler),this}function L(se){return G('Cannot call "setValidatorCompiler"!'),this[so].setValidatorCompiler(se),this}function Ke(se){return G('Cannot call "setSchemaErrorFormatter"!'),cH(se),this[Ox]=se.bind(this),this}function Be(se){return G('Cannot call "setSerializerCompiler"!'),this[so].setSerializerCompiler(se),this}function Re(se){G('Cannot call "setSchemaController"!');let ge=this[so],we=tH.buildSchemaController(ge,Object.assign({},ge.opts,se));return this[so]=we,this.getSchema=we.getSchema.bind(we),this.getSchemas=we.getSchemas.bind(we),this}function Te(se){return G('Cannot call "setReplySerializer"!'),this[eH]=se,this}function De(se){return G('Cannot call "setErrorHandler"!'),this[rf]=uH(this[rf],se.bind(this)),this}function Ae(se){return G('Cannot call "setChildLoggerFactory"!'),this[Ix]=se,this}function gt(se={}){return se.includeMeta=se.includeHooks?se.includeMeta?kx.concat(se.includeMeta):kx:se.includeMeta,d.printRoutes(se)}function lt(se,{rewriteUrl:ge,logger:we}){let qe;return function(Me,St){if(qe===void 0&&(qe=se.isAsyncConstraint()),ge){Me.originalUrl=Me.url;let en=ge.call(C,Me);if(typeof en=="string")Me.url=en;else{let mt=new K_e(Me.url,typeof en);Me.destroy(mt)}}se.routing(Me,St,M(qe,Me,St))}}function rt(se){return G('Cannot call "setGenReqId"!'),this[Rx]=lH(this[Cx].requestIdHeader,se),this}}lf.errorCodes=pu;function cH(t){if(typeof t!="function")throw new oH(typeof t);if(t.constructor.name==="AsyncFunction")throw new oH("AsyncFunction")}af.exports=lf;af.exports.fastify=lf;af.exports.default=lf});var MG=k((Ije,BG)=>{"use strict";BG.exports=Error});var jG=k((Rje,UG)=>{"use strict";UG.exports=EvalError});var HG=k((kje,$G)=>{"use strict";$G.exports=RangeError});var VG=k((Dje,qG)=>{"use strict";qG.exports=ReferenceError});var xw=k((Pje,zG)=>{"use strict";zG.exports=SyntaxError});var V1=k((Lje,GG)=>{"use strict";GG.exports=TypeError});var JG=k((Fje,KG)=>{"use strict";KG.exports=URIError});var XG=k((Bje,WG)=>{"use strict";WG.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 i=42;e[n]=i;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 s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,n);if(l.value!==i||l.enumerable!==!0)return!1}return!0}});var ZG=k((Mje,QG)=>{"use strict";var YG=typeof Symbol<"u"&&Symbol,JSe=XG();QG.exports=function(){return typeof YG!="function"||typeof Symbol!="function"||typeof YG("foo")!="symbol"||ty
`)>=0)return!1;return!0}function iAe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=La.call(Array(t.indent+1)," ");else return null;return{base:n,prev:La.call(Array(e+1),n)}}function Fw(t,e){if(t.length===0)return"";var n=`
2024-04-09 09:34:47 +08:00
`+e.prev+e.base;return n+La.call(t,","+n)+`
2024-04-12 14:29:25 +08:00
`+e.prev}function Bp(t,e){var n=Lw(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=wo(t,i)?e(t[i],t):""}var s=typeof Iw=="function"?Iw(t):[],l;if(X1){l={};for(var a=0;a<s.length;a++)l["$"+s[a]]=s[a]}for(var o in t)wo(t,o)&&(n&&String(Number(o))===o&&o<t.length||X1&&l["$"+o]instanceof Symbol||(YK.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof Iw=="function")for(var u=0;u<s.length;u++)QK.call(t,s[u])&&r.push("["+e(s[u])+"]: "+e(t[s[u]],t));return r}});var aJ=k((Zje,lJ)=>{"use strict";var sJ=Pu(),Y1=FK(),sAe=iJ(),lAe=V1(),jp=sJ("%WeakMap%",!0),$p=sJ("%Map%",!0),aAe=Y1("WeakMap.prototype.get",!0),oAe=Y1("WeakMap.prototype.set",!0),uAe=Y1("WeakMap.prototype.has",!0),cAe=Y1("Map.prototype.get",!0),fAe=Y1("Map.prototype.set",!0),pAe=Y1("Map.prototype.has",!0),jw=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},hAe=function(t,e){var n=jw(t,e);return n&&n.value},dAe=function(t,e,n){var r=jw(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},mAe=function(t,e){return!!jw(t,e)};lJ.exports=function(){var e,n,r,i={assert:function(s){if(!i.has(s))throw new lAe("Side channel does not contain "+sAe(s))},get:function(s){if(jp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return aAe(e,s)}else if($p){if(n)return cAe(n,s)}else if(r)return hAe(r,s)},has:function(s){if(jp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return uAe(e,s)}else if($p){if(n)return pAe(n,s)}else if(r)return mAe(r,s);return!1},set:function(s,l){jp&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new jp),oAe(e,s,l)):$p?(n||(n=new $p),fAe(n,s,l)):(r||(r={key:{},next:null}),dAe(r,s,l))}};return i}});var Hp=k((e$e,oJ)=>{"use strict";var yAe=String.prototype.replace,gAe=/%20/g,$w={RFC1738:"RFC1738",RFC3986:"RFC3986"};oJ.exports={default:$w.RFC3986,formatters:{RFC1738:function(t){return yAe.call(t,gAe,"+")},RFC3986:function(t){return String(t)}},RFC1738:$w.RFC1738,RFC3986:$w.RFC3986}});var qw=k((t$e,cJ)=>{"use strict";var vAe=Hp(),Hw=Object.prototype.hasOwnProperty,Lu=Array.isArray,Fa=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),_Ae=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Lu(r)){for(var i=[],s=0;s<r.length;++s)typeof r[s]<"u"&&i.push(r[s]);n.obj[n.prop]=i}}},uJ=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},EAe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Lu(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Hw.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var i=e;return Lu(e)&&!Lu(n)&&(i=uJ(e,r)),Lu(e)&&Lu(n)?(n.forEach(function(s,l){if(Hw.call(e,l)){var a=e[l];a&&typeof a=="object"&&s&&typeof s=="object"?e[l]=t(a,s,r):e.push(s)}else e[l]=s}),e):Object.keys(n).reduce(function(s,l){var a=n[l];return Hw.call(s,l)?s[l]=t(s[l],a,r):s[l]=a,s},i)},xAe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},bAe=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}},wAe=function(e,n,r,i,s){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),r==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var a="",o=0;o<l.length;++o){var u=l.charCodeAt(o);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===vAe.RFC1738&&(u===40||u===41)){a+=l.charAt(o);continue}if(u<128){a=a+Fa[u];continue}if(u<2048){a=a+(Fa[192|u>>6]+Fa[128|u&63]);continue}if(u<55296||u>=57344){a=a+(Fa[224|u>>12]+Fa[128|u>>6&63]+Fa[128|u&63]);continue}o+=1,u=65536+((u&1023)<<10|l.charCodeAt(o)&1023),a+=Fa[240|u>>18]+Fa[128|u>>12&63]+Fa[128|u>>6&63]+Fa[128|u&63]}return a},SAe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.l
`;cn.DEFAULT_CONTENT_TYPE="application/octet-stream";cn.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=iS.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),fW.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),s=this._multiPartFooter();r(i),r(e),r(s),this._trackLength(i,e,n)};cn.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)+cn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof lOe))&&(n.knownLength||this._valuesToMeasure.push(e))};cn.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)):sOe.stat(t.path,function(n,r){var i;if(n){e(n);return}i=r.size-(t.start?t.start:0),e(null,i)}):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")};cn.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),i=this._getContentType(e,n),s="",l={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&rS(l,n.header);var a;for(var o in l)l.hasOwnProperty(o)&&(a=l[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=o+": "+a.join("; ")+cn.LINE_BREAK)));return"--"+this.getBoundary()+cn.LINE_BREAK+s+cn.LINE_BREAK};cn.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=tS.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=tS.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=tS.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};cn.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=nS.lookup(t.name)),!n&&t.path&&(n=nS.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=nS.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=cn.DEFAULT_CONTENT_TYPE),n};cn.prototype._multiPartFooter=function(){return function(t){var e=cn.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};cn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+cn.LINE_BREAK};cn.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};cn.prototype.setBoundary=function(t){this._boundary=t};cn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};cn.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(cn.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};cn.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};cn.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};cn.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};cn.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure
`,f.message,f.stack);var d=new Error("tunneling socket could not be established, cause="+f.message);d.code="ECONNRESET",e.request.emit("error",d),r.removeSocket(i)}};A2.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}};function yX(t,e){var n=this;A2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),s=US({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),l=sNe.connect(0,s);n.sockets[n.sockets.indexOf(r)]=l,e(l)})}function gX(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function US(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),s=0,l=i.length;s<l;++s){var a=i[s];r[a]!==void 0&&(t[a]=r[a])}}return t}var Io;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Io=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Io=function(){};a4.debug=Io});var EX=k((JVe,_X)=>{_X.exports=vX()});var RQ=k((xT,bT)=>{(function(t,e){typeof xT=="object"&&typeof bT<"u"?bT.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(xT,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",l="hour",a="day",o="week",u="month",c="quarter",f="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var U=["th","st","nd","rd"],V=j%100;return"["+j+(U[(V-20)%10]||U[V]||U[0])+"]"}},_=function(j,U,V){var ne=String(j);return!ne||ne.length>=U?j:""+Array(U+1-ne.length).join(V)+j},E={s:_,z:function(j){var U=-j.utcOffset(),V=Math.abs(U),ne=Math.floor(V/60),J=V%60;return(U<=0?"+":"-")+_(ne,2,"0")+":"+_(J,2,"0")},m:function j(U,V){if(U.date()<V.date())return-j(V,U);var ne=12*(V.year()-U.year())+(V.month()-U.month()),J=U.clone().add(ne,u),W=V-J<0,re=U.clone().add(ne+(W?-1:1),u);return+(-(ne+(V-J)/(W?J-re:re-J))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:u,y:f,w:o,d:a,D:d,h:l,m:s,s:i,ms:r,Q:c}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},v="en",g={};g[v]=b;var S="$isDayjsObject",A=function(j){return j instanceof P||!(!j||!j[S])},C=function j(U,V,ne){var J;if(!U)return v;if(typeof U=="string"){var W=U.toLowerCase();g[W]&&(J=W),V&&(g[W]=V,J=W);var re=U.split("-");if(!J&&re.length>1)return j(re[0])}else{var I=U.name;g[I]=U,J=I}return!ne&&J&&(v=J),J||!ne&&v},N=function(j,U){if(A(j))return j.clone();var V=typeof U=="object"?U:{};return V.date=j,V.args=arguments,new P(V)},D=E;D.l=C,D.i=A,D.w=function(j,U){return N(j,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var P=function(){function j(V){this.$L=C(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[S]=!0}var U=j.prototype;return U.parse=function(V){this.$d=function(ne){var J=ne.date,W=ne.utc;if(J===null)return new Date(NaN);if(D.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var re=J.match(m);if(re){var I=re[2]-1||0,M=(re[7]||"0").substring(0,3);return W?new Date(Date.UTC(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,M)):new Date(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,M)}}return new Date(J)}(V),this.init()},U.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},U.$utils=function(){return D},U.isValid=function(){return this.$d.toString()!==h},U.isSame=function(V,ne){var J=N(V);return this.s
`,r+=e;return n+t.substring(r,t.length)};f4.exports.detectEnvironment=function(){return typeof window<"u"&&window&&!(process&&process.title==="node")?"browser":"node"};f4.exports.get32IntFromBuffer=function(t,e){e=e||0;var n=0;if((n=t.length-e)>0){if(n>=4)return t.readUIntBE(e,n);for(var r=0,i=e+n,s=0;i>e;i--,s+=2)r+=t[i-1]*Math.pow(16,s);return r}else return NaN};f4.exports._={isObject:function(t){var e=typeof t;return!!t&&(e=="object"||e=="function")},isString:function(t){return typeof t=="string"||t instanceof String},isNumber:function(t){return typeof t=="number"||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var n={};for(var r in t)!t.hasOwnProperty(r)||r===e||(n[r]=t[r]);return n}};f4.exports.trimSurroundingText=function(t,e,n){var r=0,i=t.length,s=t.indexOf(e);s>=0&&(r=s+e.length);var l=t.indexOf(n,s);return l>=0&&(i=l),t.substring(r,i)}});var zu=k((yKe,FQ)=>{var yIe=require("crypto"),gIe=ys()._,p4,vIe=0xdeadbeefcafe,mKe=(vIe&16777215)==15715070;function xe(t,e){t!=null&&(typeof t=="number"?this.fromNumber(t,e):Buffer.isBuffer(t)?this.fromBuffer(t):e==null&&typeof t!="string"?this.fromByteArray(t):this.fromString(t,e))}function Zt(){return new xe(null)}function _Ie(t,e,n,r,i,s){for(var l=e&16383,a=e>>14;--s>=0;){var o=this[t]&16383,u=this[t++]>>14,c=a*o+u*l;o=l*o+((c&16383)<<14)+n[r]+i,i=(o>>28)+(c>>14)+a*u,n[r++]=o&268435455}return i}xe.prototype.am=_Ie;p4=28;xe.prototype.DB=p4;xe.prototype.DM=(1<<p4)-1;xe.prototype.DV=1<<p4;var ST=52;xe.prototype.FV=Math.pow(2,ST);xe.prototype.F1=ST-p4;xe.prototype.F2=2*p4-ST;var EIe="0123456789abcdefghijklmnopqrstuvwxyz",lh=new Array,h4,Cl;h4=48;for(Cl=0;Cl<=9;++Cl)lh[h4++]=Cl;h4=97;for(Cl=10;Cl<36;++Cl)lh[h4++]=Cl;h4=65;for(Cl=10;Cl<36;++Cl)lh[h4++]=Cl;function wT(t){return EIe.charAt(t)}function kQ(t,e){var n=lh[t.charCodeAt(e)];return n??-1}function xIe(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function bIe(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0}function Yo(t){var e=Zt();return e.fromInt(t),e}function wIe(t,e,n){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:this.fromRadix(t,e);return}this.t=0,this.s=0;for(var i=t.length,s=!1,l=0;--i>=0;){var a=r==8?t[i]&255:kQ(t,i);if(a<0){t.charAt(i)=="-"&&(s=!0);continue}s=!1,l===0?this[this.t++]=a:l+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-l)-1)<<l,this[this.t++]=a>>this.DB-l):this[this.t-1]|=a<<l,l+=r,l>=this.DB&&(l-=this.DB)}!n&&r==8&&t[0]&128&&(this.s=-1,l>0&&(this[this.t-1]|=(1<<this.DB-l)-1<<l)),this.clamp(),s&&xe.ZERO.subTo(this,this)}function SIe(t,e){this.fromString(t,256,e)}function TIe(t){this.fromString(t,256,!0)}function AIe(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function CIe(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var n=(1<<e)-1,r,i=!1,s="",l=this.t,a=this.DB-l*this.DB%e;if(l-- >0)for(a<this.DB&&(r=this[l]>>a)>0&&(i=!0,s=wT(r));l>=0;)a<e?(r=(this[l]&(1<<a)-1)<<e-a,r|=this[--l]>>(a+=this.DB-e)):(r=this[l]>>(a-=e)&n,a<=0&&(a+=this.DB,--l)),r>0&&(i=!0),i&&(s+=wT(r));return i?s:"0"}function OIe(){var t=Zt();return xe.ZERO.subTo(this,t),t}function NIe(){return this.s<0?this.negate():this}function IIe(t){var e=this.s-t.s;if(e!=0)return e;var n=this.t;if(e=n-t.t,e!=0)return this.s<0?-e:e;for(;--n>=0;)if((e=this[n]-t[n])!=0)return e;return 0}function ah(t){var e=1,n;return(n=t>>>16)!=0&&(t=n,e+=16),(n=t>>8)!=0&&(t=n,e+=8),(n=t>>4)!=0&&(t=n,e+=4),(n=t>>2)!=0&&(t=n,e+=2),(n=t>>1)!=0&&(t=n,e+=1),e}function RIe(){return this.t<=0?0:this.DB*(this.t-1)+ah(this[this.t-1]^this.s&this.DM)}function kIe(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function DIe(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function PIe(t,e){var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,s=Math.floor(t/this.DB),l=this.s<<n&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>r|l,l=(this[
`+Th.linebrk(c.buffer.toString("base64"),64)+`
`+yZ},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),dZ.isString(e)){var i=Th.trimSurroundingText(e,mZ,yZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Sh.Reader(r);s.readSequence(),s.readString(2,!0),t.setPrivate(s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0),s.readString(2,!0))},publicExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=n.length+512,i=new Sh.Writer({size:r});return i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence(),e.type==="der"?i.buffer:gZ+`
`+Th.linebrk(i.buffer.toString("base64"),64)+`
`+vZ},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der"){if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),dZ.isString(e)){var i=Th.trimSurroundingText(e,gZ,vZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}}else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Sh.Reader(r);s.readSequence(),t.setPublic(s.readString(2,!0),s.readString(2,!0))},autoImport:function(t,e){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(e)?(Ah.exports.privateImport(t,e),!0):/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(e)?(Ah.exports.publicImport(t,e),!0):!1}}});var TZ=k((LKe,Nh)=>{var Ua=wh().Ber,EZ=ys()._,Ch="1.2.840.113549.1.1.1",Oh=ys(),xZ="-----BEGIN PRIVATE KEY-----",bZ="-----END PRIVATE KEY-----",wZ="-----BEGIN PUBLIC KEY-----",SZ="-----END PUBLIC KEY-----";Nh.exports={privateExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=t.d.toBuffer(),i=t.p.toBuffer(),s=t.q.toBuffer(),l=t.dmp1.toBuffer(),a=t.dmq1.toBuffer(),o=t.coeff.toBuffer(),u=n.length+r.length+i.length+s.length+l.length+a.length+o.length+512,c=new Ua.Writer({size:u});c.startSequence(),c.writeInt(0),c.writeBuffer(n,2),c.writeInt(t.e),c.writeBuffer(r,2),c.writeBuffer(i,2),c.writeBuffer(s,2),c.writeBuffer(l,2),c.writeBuffer(a,2),c.writeBuffer(o,2),c.endSequence();var f=new Ua.Writer({size:u});return f.startSequence(),f.writeInt(0),f.startSequence(),f.writeOID(Ch),f.writeNull(),f.endSequence(),f.writeBuffer(c.buffer,4),f.endSequence(),e.type==="der"?f.buffer:xZ+`
`+Oh.linebrk(f.buffer.toString("base64"),64)+`
`+bZ},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),EZ.isString(e)){var i=Oh.trimSurroundingText(e,xZ,bZ).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ua.Reader(r);s.readSequence(),s.readInt(0);var l=new Ua.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Ch)throw Error("Invalid Public key format");var a=new Ua.Reader(s.readString(4,!0));a.readSequence(),a.readString(2,!0),t.setPrivate(a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0),a.readString(2,!0))},publicExport:function(t,e){e=e||{};var n=t.n.toBuffer(),r=n.length+512,i=new Ua.Writer({size:r});i.writeByte(0),i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence();var s=new Ua.Writer({size:r});return s.startSequence(),s.startSequence(),s.writeOID(Ch),s.writeNull(),s.endSequence(),s.writeBuffer(i.buffer,3),s.endSequence(),e.type==="der"?s.buffer:wZ+`
`+Oh.linebrk(s.buffer.toString("base64"),64)+`
`+SZ},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der"){if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),EZ.isString(e)){var i=Oh.trimSurroundingText(e,wZ,SZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}}else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");var s=new Ua.Reader(r);s.readSequence();var l=new Ua.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Ch)throw Error("Invalid Public key format");var a=new Ua.Reader(s.readString(3,!0));a.readByte(),a.readSequence(),t.setPublic(a.readString(2,!0),a.readString(2,!0))},autoImport:function(t,e){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(e)?(Nh.exports.privateImport(t,e),!0):/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(e)?(Nh.exports.publicImport(t,e),!0):!1}}});var AZ=k((MKe,Ih)=>{var FKe=ys()._,BKe=ys();Ih.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,n){if(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff)t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff);else throw Error("Invalid key data")},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,n){if(e.n&&e.e)t.setPublic(e.n,e.e);else throw Error("Invalid key data")},autoImport:function(t,e){return e.n&&e.e?e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff?(Ih.exports.privateImport(t,e),!0):(Ih.exports.publicImport(t,e),!0):!1}}});var RZ=k((UKe,Rh)=>{var CZ=ys()._,OZ=ys(),F6=zu(),NZ="-----BEGIN OPENSSH PRIVATE KEY-----",IZ="-----END OPENSSH PRIVATE KEY-----";Rh.exports={privateExport:function(t,e){let n=t.n.toBuffer(),r=Buffer.alloc(4);for(r.writeUInt32BE(t.e,0);r[0]===0;)r=r.slice(1);let i=t.d.toBuffer(),s=t.coeff.toBuffer(),l=t.p.toBuffer(),a=t.q.toBuffer(),o;typeof t.sshcomment<"u"?o=Buffer.from(t.sshcomment):o=Buffer.from([]);let u=15+r.byteLength+4+n.byteLength,c=23+n.byteLength+4+r.byteLength+4+i.byteLength+4+s.byteLength+4+l.byteLength+4+a.byteLength+4+o.byteLength,f=43+u+4+c,d=Math.ceil(c/8)*8-c;f+=d;let h=Buffer.alloc(f),m={buf:h,off:0};h.write("openssh-key-v1","utf8"),h.writeUInt8(0,14),m.off+=15,Li(m,Buffer.from("none")),Li(m,Buffer.from("none")),Li(m,Buffer.from("")),m.off=m.buf.writeUInt32BE(1,m.off),m.off=m.buf.writeUInt32BE(u,m.off),Li(m,Buffer.from("ssh-rsa")),Li(m,r),Li(m,n),m.off=m.buf.writeUInt32BE(f-47-u,m.off),m.off+=8,Li(m,Buffer.from("ssh-rsa")),Li(m,n),Li(m,r),Li(m,i),Li(m,s),Li(m,l),Li(m,a),Li(m,o);let x=1;for(;m.off<f;)m.off=m.buf.writeUInt8(x++,m.off);return e.type==="der"?m.buf:NZ+`
`+OZ.linebrk(h.toString("base64"),70)+`
`+IZ+`
`},privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),CZ.isString(e)){var i=OZ.trimSurroundingText(e,NZ,IZ).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(i,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");let s={buf:r,off:0};if(r.slice(0,14).toString("ascii")!=="openssh-key-v1")throw"Invalid file format.";if(s.off+=15,Pi(s).toString("ascii")!=="none"||Pi(s).toString("ascii")!=="none"||Pi(s).toString("ascii")!==""||(s.off+=4,s.off+=4,Pi(s).toString("ascii")!=="ssh-rsa")||(Pi(s),Pi(s),s.off+=12,Pi(s).toString("ascii")!=="ssh-rsa"))throw Error("Unsupported key type");let l=Pi(s),a=Pi(s),o=Pi(s),u=Pi(s),c=Pi(s),f=Pi(s),d=new F6(o),h=new F6(f),m=new F6(c),x=d.mod(m.subtract(F6.ONE)),b=d.mod(h.subtract(F6.ONE));t.setPrivate(l,a,o,c,f,x.toBuffer(),b.toBuffer(),u),t.sshcomment=Pi(s).toString("ascii")},publicExport:function(t,e){let n=Buffer.alloc(4);for(n.writeUInt32BE(t.e,0);n[0]===0;)n=n.slice(1);let r=t.n.toBuffer(),i=Buffer.alloc(n.byteLength+4+r.byteLength+4+7+4),s={buf:i,off:0};Li(s,Buffer.from("ssh-rsa")),Li(s,n),Li(s,r);let l=t.sshcomment||"";return e.type==="der"?s.buf:"ssh-rsa "+i.toString("base64")+" "+l+`
`},publicImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),CZ.isString(e)){if(e.substring(0,8)!=="ssh-rsa ")throw Error("Unsupported key format");let o=e.indexOf(" ",8);o===-1?o=e.length:t.sshcomment=e.substring(o+1).replace(/\s+|\n\r|\n|\r$/gm,"");let u=e.substring(8,o).replace(/\s+|\n\r|\n|\r$/gm,"");r=Buffer.from(u,"base64")}else throw Error("Unsupported key format");else if(Buffer.isBuffer(e))r=e;else throw Error("Unsupported key format");let i={buf:r,off:0},s=Pi(i).toString("ascii");if(s!=="ssh-rsa")throw Error("Invalid key type: "+s);let l=Pi(i),a=Pi(i);t.setPublic(a,l)},autoImport:function(t,e){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(e)?(Rh.exports.privateImport(t,e),!0):/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(e)?(Rh.exports.publicImport(t,e),!0):!1}};function Pi(t){let e=t.buf.readInt32BE(t.off);t.off+=4;let n=t.buf.slice(t.off,t.off+e);return t.off+=e,n}function Li(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}});var DZ=k(($Ke,hi)=>{var jKe=ys()._;function kZ(t){t=t.split("-");for(var e="private",n={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":e=t[r];break;case"private":e=t[r];break;case"pem":n.type=t[r];break;case"der":n.type=t[r];break}return{scheme:t[0],keyType:e,keyOpt:n}}hi.exports={pkcs1:_Z(),pkcs8:TZ(),components:AZ(),openssh:RZ(),isPrivateExport:function(t){return hi.exports[t]&&typeof hi.exports[t].privateExport=="function"},isPrivateImport:function(t){return hi.exports[t]&&typeof hi.exports[t].privateImport=="function"},isPublicExport:function(t){return hi.exports[t]&&typeof hi.exports[t].publicExport=="function"},isPublicImport:function(t){return hi.exports[t]&&typeof hi.exports[t].publicImport=="function"},detectAndImport:function(t,e,n){if(n===void 0){for(var r in hi.exports)if(typeof hi.exports[r].autoImport=="function"&&hi.exports[r].autoImport(t,e))return!0}else if(n){var i=kZ(n);if(hi.exports[i.scheme])i.keyType==="private"?hi.exports[i.scheme].privateImport(t,e,i.keyOpt):hi.exports[i.scheme].publicImport(t,e,i.keyOpt);else throw Error("Unsupported key format")}return!1},detectAndExport:function(t,e){if(e){var n=kZ(e);if(hi.exports[n.scheme])if(n.keyType==="private"){if(!t.isPrivate())throw Error("This is not private key");return hi.exports[n.scheme].privateExport(t,n.keyOpt)}else{if(!t.isPublic())throw Error("This is not public key");return hi.exports[n.scheme].publicExport(t,n.keyOpt)}else throw Error("Unsupported key format")}}}});var MZ=k((VKe,BZ)=>{var PZ=require("constants"),vke=rZ(),HKe=require("crypto"),qKe=wh().Ber,tl=ys()._,_ke=ys(),LZ=Gu(),FZ=DZ();typeof PZ.RSA_NO_PADDING>"u"&&(PZ.RSA_NO_PADDING=3);BZ.exports=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",n="pkcs1",r="private",i={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function s(l,a,o){if(!(this instanceof s))return new s(l,a,o);tl.isObject(a)&&(o=a,a=void 0),this.$options={signingScheme:n,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:_ke.detectEnvironment(),rsaUtils:this},this.keyPair=new vke.Key,this.$cache={},Buffer.isBuffer(l)||tl.isString(l)?this.importKey(l,a):tl.isObject(l)&&this.generateKeyPair(l.b,l.e),this.setOptions(o)}return s.prototype.setOptions=function(l){if(l=l||{},l.environment&&(this.$options.environment=l.environment),l.signingScheme){if(tl.isString(l.signingScheme)){var a=l.signingScheme.toLowerCase().split("-");a.length==1?t.node.indexOf(a[0])>-1?(this.$options.signingSchemeOptions={hash:a[0]},this.$options.signingScheme=n):(this.$options.signingScheme=a[0],this.$opt
`+this.inner:e}};x3.NestedError=M6;var bA=class extends M6{};x3.DatabaseError=bA;var wA=class extends M6{};x3.DataError=wA});var OA=k(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.getArrayIndicies=_s.validateArrayIndex=_s.validateArrayIndicies=_s.isInt=_s.ArrayInfo=_s.arrayRegex=void 0;var bd=x4(),RDe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;_s.arrayRegex=RDe;var SA={},TA=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,AA(r))this.index=parseInt(r);else if(!this.append)throw new bd.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(SA[e])return SA[e];let r=(0,_s.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],s="["+r[2].toString()+"]",l=CA(s);return Cre(l),SA[e]=new t(i,l)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let i=n?e:e[this.property];return i.length===0?0:i.length-1}return r}getData(e){if(this.append)throw new bd.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(i=>{i!==""&&(i=+i,i===-1&&(i=r.length-1),r=r[+i])}),r.push(n)}else{let{index:r,dataForProperty:i}=this.getArrayDataAndIndexFromProperty(e);r===-1?i.push(n):i[r]=n}}delete(e){if(this.append)throw new bd.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 i=0;i<this.indicies.length-1;i++){let s=+this.indicies[i];s===-1&&(s=r.length-1),r=r[s]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};_s.ArrayInfo=TA;function AA(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}_s.isInt=AA;function Cre(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")}_s.validateArrayIndicies=Cre;function Ore(t){if(t.length!==0&&!AA(t))throw new bd.DataError("Only numerical values accepted for array index",200)}_s.validateArrayIndex=Ore;function CA(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));Ore(e);let n=e.length+2;return[e,...CA(t.substring(n))]}_s.getArrayIndicies=CA});var Rre=k(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.DBParentData=void 0;var Nre=OA(),Ire=x4(),NA=class{parent;data;db;dataPath;constructor(e,n,r,i){this.parent=i,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=Nre.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new Ire.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=Nre.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 Ire.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]}};wd.DBParentData=NA});var Dre=k((yYe,kre)=>{kre.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(s,l,a){var o;typeof s!="function"?(i.h
`:t(e.children):Af(e)?t(e.children):ka(e)?e.data:""},textContent:N1,innerText:Nf,getChildren:jf,getParent:Fq,getSiblings:Bq,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:Rb,prevElementSibling:kb,removeElement:mu,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 i=r.children;i[i.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){mu(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){mu(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 i=n.children;i.splice(i.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){mu(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){mu(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:yf,find:Db,findOneChild:function(t,e){return e.find(t)},findOne:rb,existsOne:function t(e,n){return n.some(r=>wt(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],i=[0];;)if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift()}else{let s=r[0][i[0]++];wt(s)&&(t(s)&&n.push(s),0<s.children.length)&&(i.unshift(0),r.unshift(s.children))}},testElement:function(t,e){return!(t=_H(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=_H(t))?yf(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),rb(Mq("id",t),e,n)},getElementsByTagName:w1,getElementsByTagType:function(t,e,n=!0,r=1/0){return yf(If.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 wl},compareDocumentPosition:Uq,uniqueSort:I1,getFeed:function(t){return(t=of(EEe,t))?(t.name==="feed"?function(e){var n={type:"atom",items:w1("entry",e=e.children).map(i=>{var s={media:EH(i=i.children)},l=(Is(s,"id","id",i),Is(s,"title","title",i),(l=of("link",i))==null?void 0:l.attribs.href);return l&&(s.link=l),(l=lo("summary",i)||lo("content",i))&&(s.description=l),(l=lo("updated",i))&&(s.pubDate=new Date(l)),s})},r=(Is(n,"id","id",e),Is(n,"title","title",e),(r=of("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),Is(n,"description","subtitle",e),(r=lo("updated",e))&&(n.updated=new Date(r)),Is(n,"author","email",e,!0),n}:function(r){var n=(n=(n=of("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:w1("item",r.children).map(s=>{var l={media:EH(s=s.children)};return Is(l,"id","guid",s),Is(l,"title","title",s),Is(l,"link","link",s),Is(l,"description","description",s),(s=lo("pubDate",s)||lo("dc:date",s))&&(l.pubDate=new Date(s)),l})},i=(Is(r,"title","title",n),Is(r,"link","link",n),Is(r,"description","description",n),lo("lastBuildDate",n));return i&&(r.updated=new Date(i)),Is(r,"author","managingEditor",n,!0),r})(t):null}}),S1=function(){return(S1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function jq(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function xEe(t,e){return jq(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,S1(S1(S1({},Ib),this==null?void 0:this._options),eb(e??{})))}function bEe(t){return jq(this,t,S1(S1({},this._options),{xmlMode:!0}))}function q5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=N1(e[r]);return n}function wEe(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,Ib,!1),n||e("script
2024-04-02 15:03:09 +08:00
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
2024-04-12 14:29:25 +08:00
)`,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])"},Gq={};function Kq(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 ob(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 Ux=(t,e,n,r,i)=>{let s=i(e,ob(n),r);return s===jt.trueFunc?t:s===jt.falseFunc?jt.falseFunc:l=>s(l)&&t(l)},jx={is:Ux,matches:Ux,where:Ux,not(t,e,n,r,i){let s=i(e,ob(n),r);return s===jt.falseFunc?t:s===jt.trueFunc?jt.falseFunc:l=>!s(l)&&t(l)},has(t,e,n,r,i){let s=n.adapter,l=ob(n),a=(l.relativeSelector=!0,e.some(c=>c.some(lb))?[Gq]:void 0),o=i(e,l,a);if(o===jt.falseFunc)return jt.falseFunc;let u=function(c,f){return c===jt.falseFunc?jt.falseFunc:d=>f.isTag(d)&&c(d)}(o,s);if(a&&o!==jt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var d=s.getChildren(h),h=c?[...d,...Kq(h,s)]:d;return s.existsOne(u,h)}}return c=>t(c)&&s.existsOne(u,s.getChildren(c))}};function $x(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function HEe(t,e,n,r,i){let{adapter:s,equals:l}=n;switch(e.type){case dt.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case dt.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case dt.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()),MEe[e.action](t,e,n);case dt.Pseudo:return function(a,o,u,c,f){let{name:d,data:h}=o;if(Array.isArray(h)){if(d in jx)return jx[d](a,h,u,c,f);throw new Error(`Unknown pseudo-class :${d}(${h})`)}let m=(o=u.pseudos)==null?void 0:o[d],x=typeof m=="string"?m:$Ee[d];if(typeof x=="string"){if(h!=null)throw new Error(`Pseudo ${d} doesn't have any arguments`);let b=Hf(x);return jx.is(a,b,u,c,f)}if(typeof m=="function")return kH(m,d,h,1),b=>m(b,h)&&a(b);if(d in ab)return ab[d](a,h,u,c);if(d in RH){let b=RH[d];return kH(b,d,h,2),_=>b(_,u,h)&&a(_)}throw new Error("Unknown pseudo-class :"+d)}(t,e,n,r,i);case dt.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 s.getName(o)===a&&t(o)}}case dt.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let u=o;for(;u=$x(u,s);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=$x(u,s);)if(!a.has(u)){if(s.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=$x(o,s));return!1};case dt.Parent:return function(a){return s.getChildren(a).some(o=>s.isTag(o)&&t(o))};case dt.Child:return function(a){return(a=s.getParent(a))!=null&&s.isTag(a)&&t(a)};case dt.Sibling:return function(a){var o=s.getSiblings(a);for(let c=0;c<o.length;c++){var u=o[c];if(l(a,u))break;if(s.isTag(u)&&t(u))return!0}return!1};case dt.Adjacent:return s.prevElementSibling?function(a){return(a=s.prevElementSibling(a))!=null&&t(a)}:function(a){var o=s.getSiblings(a);let u;for(let f=0;f<o.length;f++){var c=o[f];if(l(a,c))break;s.isTag(c)&&(u=c)}return!!u&&t(u)};case dt.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not ye
`)}}):{name:r,value:i.replace(PH,`\r
`)}}).toArray()}}),C5=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}},jb=(C5.prototype.cheerio="[cheerio object]",C5.prototype.splice=Array.prototype.splice,C5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(C5.prototype,OEe,uxe,mxe,yxe,vxe),function(t,e){return(jb=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}))(t,e)}),_xe=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}jb(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},O5=function(){return(O5=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Exe=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]),Er="\uFFFD",LH=(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"}(H=H||{}),"--"),FH="[CDATA[",BH="doctype",f1="script",xxe="public",bxe="system";function oV(t){return 55296<=t&&t<=57343}function uV(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function cV(t){return 64976<=t&&t<=65007||Exe.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&&(D+=" "),this.message=D+(this.message||""),this.firstUpdate=!1,this},g}function u(_){return n.toString.call(_)==="[object Function]"}function c(_){return n.toString.call(_)==="[object Array]"}function f(_){return n.toString.call(_)==="[object String]"}function d(_){return n.toString.call(_)==="[object Object]"}function h(_){var E=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(_);return function(v){for(var g=v,S=0;S<E.length;S++){var A=E[S];if(!l(g,A))return;g=g[A]}return g}}function m(_){return Array.prototype.slice.call(_)}function x(_,E,v){return Array.prototype.indexOf.call(_||[],E,v)}function b(_){var E,v=[];for(E in _)l(_,E)&&v.push(E);return v}s.hasOwnProp=l,s._prettifyError=function(_,E,v){return(v=v.Update?v:new s.TemplateError(v)).Update(_),E||(_=v,(v=new Error(_.message)).name=_.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),s.TemplateError=o,s.escape=function(_){return _.replace(i,a)},s.isFunction=u,s.isArray=c,s.isString=f,s.isObject=d,s.getAttrGetter=h,s.groupBy=function(_,E,v){for(var g={},S=u(E)?E:h(E),A=0;A<_.length;A++){var C=_[A],N=S(C,A);if(N===void 0&&v===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(g[N]||(g[N]=[])).push(C)}return g},s.toArray=m,s.without=function(_){var E=[];if(_)for(var v=_.length,g=m(arguments).slice(1),S=-1;++S<v;)x(g,_[S])===-1&&E.push(_[S]);return E},s.repeat=function(_,E){for(var v="",g=0;g<E;g++)v+=_;return v},s.each=function(_,E,v){if(_!=null){if(e.forEach&&_.forEach===e.forEach)_.forEach(E,v);else if(_.length===+_.length)for(var g=0,S=_.length;g<S;g++)E.call(v,_[g],g,_)}},s.map=function(_,E){var v=[];if(_!=null){if(e.map&&_.map===e.map)return _.map(E);for(var g=0;g<_.length;g++)v[v.length]=E(_[g],g);_.length===+_.length&&(v.length=_.length)}return v},s.asyncIter=function(_,E,v){var g=-1;(function S(){++g<_.length?E(_[g],g,S,v):v()})()},s.asyncFor=function(_,E,v){var g=b(_||{}),S=g.length,A=-1;(function C(){var N=g[++A];A<S?E(N,_[N],A,S,C):v()})()},s.indexOf=x,s.keys=b,s._entries=function(_){return b(_).map(function(E){return[E,_[E]]})},s._values=function(_){return b(_).map(function(E){return _[E]})},s._assign=s.extend=function(_,E){return _=_||{},b(E).forEach(function(v){_[v]=E[v]}),_},s.inOperator=function(_,E){if(c(E)||f(E))return E.indexOf(_)!==-1;if(d(E))return _ in E;throw new Error('Cannot use "in" operator to search for "'+_+'" in unexpected types.')}});function FV(){throw new Error("setTimeout has not been defined")}function BV(){throw new Error("clearTimeout has not been defined")}var uo=FV,co=BV;function MV(t){if(uo===setTimeout)return setTimeout(t,0);if((uo===FV||!uo)&&setTimeout)return(uo=setTimeout)(t,0);try{return uo(t,0)}catch{try{return uo.call(null,t,0)}catch{return uo.call(this,t,0)}}}typeof E2.setTimeout=="function"&&(uo=setTimeout),typeof E2.clearTimeout=="function"&&(co=clearTimeout);var _u,b2=[],C1=!1,bf=-1;function _be(){C1&&_u&&(C1=!1,_u.length?b2=_u.concat(b2):bf=-1,b2.length)&&UV()}function UV(){if(!C1){var t=MV(_be);C1=!0;for(var e=b2.length;e;){for(_u=b2,b2=[];++bf<e;)_u&&_u[bf].run();bf=-1,e=b2.length}_u=null,C1=!1,function(n){if(co===clearTimeout)return clearTimeout(n);if((co===BV||!co)&&clearTimeout)return(co=clearTimeout)(n);try{co(n)}catch{try{return co.call(null,n)}catch{return co.call(this,n)}}}(t)}}function jV(t,e){this.fun=t,this.array=e}function Tu(){}jV.prototype.run=function(){this.fun.apply(null,this.array)};var Ebe=Tu,xbe=Tu,bbe=Tu,wbe=Tu,Sbe=Tu,Tbe=Tu,Abe=Tu,g1=E2.performance||{},Cbe=g1.now||g1.mozNow||g1.msNow||g1.oNow||g1.webkitNow||function(){return new Date().getTime()},Obe=new Date,go={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];b2.push(new jV(t,e)),b2.length!==1||C1||MV(UV)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ebe,addListener:xbe,once:bbe,off:wbe,removeListener:Sbe,removeAllListeners:Tbe,emit:Abe,binding:function(t){throw new Error("process.
\r\xA0`,_q="()[]{}%*-+~/#,:|.<>=!",GV="string",KV="whitespace",JV="data",WV="block-start",XV="block-end",YV="variable-start",QV="variable-end",ZV="comment",ez="left-paren",tz="right-paren",nz="left-bracket",rz="right-bracket",iz="left-curly",sz="right-curly",lz="operator",az="comma",oz="colon",uz="tilde",cz="pipe",fz="float",pz="boolean",Ab="none",hz="symbol",dz="regex";function ds(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Pbe=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 i=this.current();if(this.isFinished())return null;if(i==='"'||i==="'")return ds(GV,this._parseString(i),n,r);if(h=this._extract(vq))return ds(KV,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&&((i=this.current())===`
2024-04-02 15:03:09 +08:00
`?this.forward():i==="\r"&&(this.forward(),(i=this.current())===`
2024-04-12 14:29:25 +08:00
`?this.forward():this.back())),ds(XV,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,ds(QV,h,n,r);if(i==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var s="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}s+=this.current(),this.forward()}for(var l=["g","i","m","y"],a="";!this.isFinished()&&l.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return ds(dz,{body:s,flags:a},n,r)}if(_q.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch(je.indexOf(u,c)!==-1&&(this.forward(),je.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=ez;break;case")":o=tz;break;case"[":o=nz;break;case"]":o=rz;break;case"{":o=iz;break;case"}":o=sz;break;case",":o=az;break;case":":o=oz;break;case"~":o=uz;break;case"|":o=cz;break;default:o=lz}return ds(o,i,n,r)}if((h=this._extractUntil(vq+_q)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),ds(fz,h+"."+u,n,r)):ds("int",h,n,r);if(h.match(/^(true|false)$/))return ds(pz,h,n,r);if(h==="none"||h==="null")return ds(Ab,h,n,r);if(h)return ds(hz,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var f,d=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,ds(WV,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,ds(YV,h,n,r);var h="",m=!1;for(this._matches(this.tags.COMMENT_START)&&(m=!0,h=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(d))!==null;){if(h+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!m){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var x=h.slice(-this.colno);if(/^\s+$/.test(x)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!m)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(f===null&&m)throw new Error("expected end of comment, got end of file");return ds(m?ZV:JV,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var i=this.current();if(i==="\\")switch(this.forward(),this.current()){case"n":r+=`
`;break;case"t":r+=" ";break;case"r":r+="\r";break;default:r+=this.current()}else r+=i;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 i=r.indexOf(this.current());if(n&&i===-1||!n&&i!==-1){var s=this.current();this.forward();for(var l=r.indexOf(this.current());(n&&l===-1||!n&&l!==-1)&&!this.isFinished();)s+=this.current(),this.forward(),l=r.indexOf(this.current());return s}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()===`
2024-04-02 15:03:09 +08:00
`?(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(`
2024-04-12 14:29:25 +08:00
`,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}(),Xe={lex:function(t,e){return new Pbe(t,e)},TOKEN_STRING:GV,TOKEN_WHITESPACE:KV,TOKEN_DATA:JV,TOKEN_BLOCK_START:WV,TOKEN_BLOCK_END:XV,TOKEN_VARIABLE_START:YV,TOKEN_VARIABLE_END:QV,TOKEN_COMMENT:ZV,TOKEN_LEFT_PAREN:ez,TOKEN_RIGHT_PAREN:tz,TOKEN_LEFT_BRACKET:nz,TOKEN_RIGHT_BRACKET:rz,TOKEN_LEFT_CURLY:iz,TOKEN_RIGHT_CURLY:sz,TOKEN_OPERATOR:lz,TOKEN_COMMA:az,TOKEN_COLON:oz,TOKEN_TILDE:uz,TOKEN_PIPE:cz,TOKEN_INT:"int",TOKEN_FLOAT:fz,TOKEN_BOOLEAN:pz,TOKEN_NONE:Ab,TOKEN_SYMBOL:hz,TOKEN_SPECIAL:"special",TOKEN_REGEX:dz};function Eq(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(s){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l===void 0)return String(s);if(typeof(l=l.call(s,"string"))!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function qb(t,e,n){return e&&Eq(t.prototype,e),n&&Eq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function mz(t,e){t.prototype=Object.create(e.prototype),yz(t.prototype.constructor=t,e)}function yz(t,e){return(yz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function gz(t,e,n){n=n||{},je.keys(n).forEach(function(i){n[i]=function(s,l){return typeof s!="function"||typeof l!="function"?l:function(){var a=this.parent,o=(this.parent=s,l.apply(this,arguments));return this.parent=a,o}}(t.prototype[i],n[i])});var r=function(i){function s(){return i.apply(this,arguments)||this}return mz(s,i),qb(s,[{key:"typename",get:function(){return e}}]),s}(t);return je._assign(r.prototype,n),r}var Lbe=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"),gz(this,e,n)},qb(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Fbe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return mz(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),gz(this,n,r)},qb(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(tr),D1={Obj:Lbe,EmitterObj:Fbe};function xq(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(s){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l===void 0)return String(s);if(typeof(l=l.call(s,"string"))!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function Vb(t,e,n){return e&&xq(t.prototype,e),n&&xq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vf(t,e){t.prototype=Object.create(e.prototype),vz(t.prototype.constructor=t,e)}function vz(t,e){return(vz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function bq(t,e,n){t instanceof e&&n.push(t),t instanceof or&&t.findAll(e,n)}var or=function(t){function e(){return t.apply(this,arguments)||this}Vf(e,t);var n=e.prototype;return n.init=function(r,i){for(var s=arguments,l=this,a=arguments.length,o=new Array(2<a?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];this.lineno=r,this.colno=i,this.fields.forEach(function(c,f){l[c]=f=(f=s[f+2])===void 0?null:f})},n.findAll=function(r,i){var s=this;return i=i||[],this instanceof Da?this.children.forEach(function(l){return bq(l,r,i)}):this.fields.forEach(function(l){return bq(s[l],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(s){r(i[s],s)})},e}(D1.Obj),zb=function(t){function e(){return t.apply(this,arguments)||this}return Vf(e,t),Vb(e,[{key:"ty
`);r.forEach(function(i,s){i&&(n&&0<s||!n)&&process.stdout.write(" ".repeat(e)),s=s===r.length-1?"":`
`,process.stdout.write(i+s)})}var te={Node:or,Root:Bbe,NodeList:Da,Value:zb,Literal:_z,Symbol:Mbe,Group:Ube,Array:jbe,Pair:$be,Dict:Ez,Output:swe,Capture:lwe,TemplateData:awe,If:xz,IfAsync:qbe,InlineIf:Vbe,For:Gb,AsyncEach:zbe,AsyncAll:Gbe,Macro:bz,Caller:Kbe,Import:Jbe,FromImport:Wbe,FunCall:wz,Filter:Sz,FilterAsync:Xbe,KeywordArgs:Ybe,Block:Qbe,Super:Zbe,Extends:ewe,Include:twe,Set:nwe,Switch:rwe,Case:iwe,LookupVal:Hbe,BinOp:Zs,In:owe,Is:uwe,Or:cwe,And:fwe,Not:pwe,Add:hwe,Concat:dwe,Sub:mwe,Mul:ywe,Div:gwe,FloorDiv:vwe,Mod:_we,Pow:Ewe,Neg:xwe,Pos:bwe,Compare:wwe,CompareOperand:Swe,CallExtension:Cb,CallExtensionAsync:Twe,printNodes:function t(e,n){var r,i;n=n||0,h1(e.typename+": ",n),e instanceof Da?(h1(`
`),e.children.forEach(function(s){t(s,n+2)})):e instanceof Cb?(h1(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(s){t(s,n+2)})):(r=[],i=null,e.iterFields(function(s,l){s instanceof or?r.push([l,s]):(i=i||{})[l]=s}),i?h1(JSON.stringify(i,null,2)+`
`,null,!0):h1(`
`),r.forEach(function(a){var l=a[0],a=a[1];h1("["+l+"] =>",n+2),t(a,n+4)}))}};function Tz(t,e){return(Tz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}te.Node,te.Root,te.NodeList,te.Value,te.Literal,te.Group,te.Pair,te.Dict,te.Output,te.Capture,te.TemplateData,te.If,te.IfAsync,te.InlineIf,te.For,te.AsyncEach,te.AsyncAll,te.Macro,te.Caller,te.Import,te.FromImport,te.FunCall,te.Filter,te.FilterAsync,te.KeywordArgs,te.Block,te.Super,te.Extends,te.Include,te.Switch,te.Case,te.LookupVal,te.BinOp,te.In,te.Is,te.Or,te.And,te.Not,te.Add,te.Concat,te.Sub,te.Mul,te.Div,te.FloorDiv,te.Mod,te.Pow,te.Neg,te.Pos,te.Compare,te.CompareOperand,te.CallExtension,te.CallExtensionAsync,te.printNodes;var wq=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),Tz(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(i){this.tokens=i,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(i){var s;if(this.peeked){if(i||this.peeked.type!==Xe.TOKEN_WHITESPACE)return s=this.peeked,this.peeked=null,s;this.peeked=null}if(s=this.tokens.nextToken(),!i)for(;s&&s.type===Xe.TOKEN_WHITESPACE;)s=this.tokens.nextToken();return s},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(i){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=i},r.error=function(i,s,l){var a;return s!==void 0&&l!==void 0||(s=(a=this.peekToken()||{}).lineno,l=a.colno),s!==void 0&&(s+=1),l!==void 0&&(l+=1),new je.TemplateError(i,s,l)},r.fail=function(i,s,l){throw this.error(i,s,l)},r.skip=function(i){var s=this.nextToken();return!(!s||s.type!==i)||(this.pushToken(s),!1)},r.expect=function(i){var s=this.nextToken();return s.type!==i&&this.fail("expected "+i+", got "+s.type,s.lineno,s.colno),s},r.skipValue=function(i,s){var l=this.nextToken();return!(!l||l.type!==i||l.value!==s)||(this.pushToken(l),!1)},r.skipSymbol=function(i){return this.skipValue(Xe.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var s;return i||((s=this.peekToken())||this.fail("unexpected end of file"),s.type!==Xe.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(s=this.nextToken())&&s.type===Xe.TOKEN_BLOCK_END?s.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+i+" statement"),s},r.advanceAfterVariableEnd=function(){var i=this.nextToken();i&&i.type===Xe.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=i.value.charAt(i.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(i),this.fail("expected variable end"))},r.parseFor=function(){var i,s,l=this.peekToken();if(this.skipSymbol("for")?(i=new te.For(l.lineno,l.colno),s="endfor"):this.skipSymbol("asyncEach")?(i=new te.AsyncEach(l.lineno,l.colno),s="endeach"):this.skipSymbol("asyncAll")?(i=new te.AsyncAll(l.lineno,l.colno),s="endall"):this.fail("parseFor: expected for{Async}",l.lineno,l.colno),i.name=this.parsePrimary(),i.name instanceof te.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Xe.TOKEN_COMMA){var a=i.name;for(i.name=new te.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(Xe.TOKEN_COMMA);){var o=this.parsePrimary();i.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',l.lineno,l.colno),i.arr=this.parseExpression(),this.advanceAfterBlockEnd(l.value),i.body=this.parseUntilBlocks(s,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),i.else_=this.parseUntilBlocks(s)),this.advanceAfterBlockEnd(),i},r.parseMacro=function(){var i=this.peekToken(),l=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),s=this.parseSignature(),l=new te.Macro(i.lineno,i.colno,l,s);return this.advanceAfterBlockEnd(i.value),l.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),l},r.parseCall=function(){var i=this.peekToken(),o
`)},r._emitLines=function(){for(var i=this,s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];l.forEach(function(o){return i._emitLine(o)})},r._emitFuncBegin=function(i,s){this.buffer="output",this._scopeClosers="",this._emitLine("function "+s+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+i.lineno+";"),this._emitLine("var colno = "+i.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(i){i||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(i){var s=this._scopeClosers;this._scopeClosers="",i.call(this),this._closeScopeLevels(),this._scopeClosers=s},r._makeCallback=function(i){var s=this._tmpid();return"function("+s+(i?","+i:"")+`) {
if(`+s+") { cb("+s+"); 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(i,s){var l=this;i.children.forEach(function(a){l.compile(a,s)})},r._compileAggregate=function(i,s,l,a){var o=this;l&&this._emit(l),i.children.forEach(function(u,c){0<c&&o._emit(","),o.compile(u,s)}),a&&this._emit(a)},r._compileExpression=function(i,s){this.assertType(i,te.Literal,te.Symbol,te.Group,te.Array,te.Dict,te.FunCall,te.Caller,te.Filter,te.LookupVal,te.Compare,te.InlineIf,te.In,te.Is,te.And,te.Or,te.Not,te.Add,te.Concat,te.Sub,te.Mul,te.Div,te.FloorDiv,te.Mod,te.Pow,te.Neg,te.Pos,te.Compare,te.NodeList),this.compile(i,s)},r.assertType=function(i){for(var s=arguments.length,l=new Array(1<s?s-1:0),a=1;a<s;a++)l[a-1]=arguments[a];l.some(function(o){return i instanceof o})||this.fail("assertType: invalid type: "+i.typename,i.lineno,i.colno)},r.compileCallExtension=function(i,s,l){var a=this,o=i.args,u=i.contentArgs,c=typeof i.autoescape!="boolean"||i.autoescape;l||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+i.extName+'")["'+i.prop+'"]('),this._emit("context"),(o||u)&&this._emit(","),o&&(o instanceof te.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(f,d){a._compileExpression(f,s),d===o.children.length-1&&!u.length||a._emit(",")})),u.length&&u.forEach(function(f,d){var h;0<d&&a._emit(","),f?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(f,s),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),l?(i=this._tmpid(),this._emitLine(", "+this._makeCallback(i)),this._emitLine(this.buffer+" += runtime.suppressValue("+i+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(i,s){this.compileCallExtension(i,s,!0)},r.compileNodeList=function(i,s){this._compileChildren(i,s)},r.compileLiteral=function(i){var s;typeof i.value=="string"?(s=(s=(s=(s=(s=(s=i.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+s+'"')):i.value===null?this._emit("null"):this._emit(i.value.toString())},r.compileSymbol=function(i,s){i=i.value,(s=s.lookup(i))?this._emit(s):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},r.compileGroup=function(i,s){this._compileAggregate(i,s,"(",")")},r.compileArray=function(i,s){this._compileAggregate(i,s,"[","]")},r.compileDict=function(i,s){this._compileAggregate(i,s,"{","}")},r.compilePair=function(a,s){var l=a.key,a=a.value;l instanceof te.Symbol?l=new te.Literal(l.lineno,l.colno,l.value):l instanceof te.Literal&&typeof l.value=="string"||this.fail("compilePair: Dict keys must be strings or names",l.lineno,l.colno),this.compile(l,s),this._emit(": "),this._compileExpression(a,s)},r.compileInlineIf=function(i,s){this._emit("("),this.compile(i.cond,s),this._emit("?"),this.compile(i.body,s),this._emit(":"),i.else_!==null?this.compile(i.else_,s):this._emit('""'),this._emit(")")},r.compileIn=function(i,s){this._emit("runtime.inOperator("),this.compile(i.left,s),this._emit(","),this.compile(i.right,s),this._emit(")")},r.compileIs=function(i,s){var l=(i.right.name||i.right).value;this._emit('env.getTest("'+l+'").call(context, '),this.compile(i.left,s),i.right.args&&(this._emit(","),this.compile(i.right.args,s)),this._emit(") === true")},r._binOpEmitter=function(i,s,l){this.compile(i.left,s),this._emit(l),this.compile(i.right,s)},r.compileOr=function(i,s){return this._binOpEmitter(i,s," || ")},r.compileAnd=function(i,s){return this._binOpEmitter(i,s," && ")},r.compileAdd=function(i,s){return this._binOpEmitter(i,s," + ")},r.compileConcat=function(i,s){return this._binOpEmitter(i,s,' + "" + ')},r.compileSub=function(i,s){return this._binOpEmitter(i,s," - ")},r.compileMul=function(i,s){return this._binOpEmitter(i,s," * ")},r.compileDiv=function(i,s){return this._binOpEmitter(i,s," / ")},r.compileMod=function(i,s){return this._binOpEmitter(i,s," % ")},r.compileNot=function(i,s){this._emit("!"),this.compile(i.target,s)},r.compileFloorDiv=function(i,s){this._emit("Math.floor("),this.compile(i.left,s),this._emit(" / "),this.compile(i.right,s),this._emit(")")},r.compilePow=function(i,s){this._emit("Math.pow("),this.compile(i.left,s),this._emit(", "),this.compile(i.right,s),this._emit(")")},r.compileNeg=function(i,s){this._emit("-"),this.compile(i.target,s)},r.compilePos=function(i,s){this._emit("+"),this.compile(i.target,s)},r.compileCompare=function(i,s){var l=this;this.compile(i.expr,s),i.ops.forEach(function(a){l._emit(" "+Dwe[a.type]+" "),l.compile(a.expr,s)})},r.compileLookupVal=function(i,s){this._emit("runtime.memberLookup(("),this._compileExpression(i.target,s),this._emit("),"),this._compileExpression(i.val,s),this._emit(")")},r._getNodeName=function(i){switch(i.typename){case"Symbol":return i.value;case"FunCall":return"the return value of ("+this._getNodeName(i.name)+")";case"LookupVal":return this._getNodeName(i.target)+'["'+this._getNodeName(i.val)+'"]';case"Literal":return i.value.toString();default:return"--expression--"}},r.compileFunCall=function(i,s){this._emit("(lineno = "+i.lineno+", colno = "+i.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(i.name,s),this._emit(', "'+this._getNodeName(i.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(i.args,s,"[","])"),this._emit(")")},r.compileFilter=function(i,s){var l=i.name;this.assertType(l,te.Symbol),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(i.args,s),this._emit(")")},r.compileFilterAsync=function(i,s){var l=i.name,a=i.symbol.value;this.assertType(l,te.Symbol),s.set(a,a),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(i.args,s),this._emitLine(", "+this._makeCallba
else {`),this._withScopedSyntax(function(){a.compile(i.else_,s),l&&a._emit("cb()")})):l&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(i,s){this._emit("(function(cb) {"),this.compileIf(i,s,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(i,s,l,a){var o=this;[{name:"index",val:l+" + 1"},{name:"index0",val:l},{name:"revindex",val:a+" - "+l},{name:"revindex0",val:a+" - "+l+" - 1"},{name:"first",val:l+" === 0"},{name:"last",val:l+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(u){o._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},r.compileFor=function(i,s){var l,a,o,u,c=this,f=this._tmpid(),d=this._tmpid(),h=this._tmpid();s=s.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(i.arr,s),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),i.name instanceof te.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+d+" = "+h+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+h+".length; "+f+"++) {"),i.name.children.forEach(function(m,x){var b=c._tmpid();c._emitLine("var "+b+" = "+h+"["+f+"]["+x+"];"),c._emitLine('frame.set("'+m+'", '+h+"["+f+"]["+x+"]);"),s.set(i.name.children[x].value,b)}),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)}),this._emitLine("}"),this._emitLine("} else {"),u=(l=i.name.children)[0],l=l[1],a=this._tmpid(),o=this._tmpid(),s.set(u.value,a),s.set(l.value,o),this._emitLine(f+" = -1;"),this._emitLine("var "+d+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(f+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+u.value+'", '+a+");"),this._emitLine('frame.set("'+l.value+'", '+o+");"),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)}),this._emitLine("}")):(u=this._tmpid(),s.set(i.name.value,u),this._emitLine("var "+d+" = "+h+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+h+".length; "+f+"++) {"),this._emitLine("var "+u+" = "+h+"["+f+"];"),this._emitLine('frame.set("'+i.name.value+'", '+u+");"),this._emitLoopBindings(i,h,f,d),this._withScopedSyntax(function(){c.compile(i.body,s)})),this._emitLine("}"),this._emitLine("}"),i.else_&&(this._emitLine("if (!"+d+") {"),this.compile(i.else_,s),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(i,s,l){var a,o=this,u=this._tmpid(),c=this._tmpid(),f=this._tmpid(),d=l?"asyncAll":"asyncEach",d=(s=s.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(i.arr,s),this._emitLine(");"),i.name instanceof te.Array?(a=i.name.children.length,this._emit("runtime."+d+"("+f+", "+a+", function("),i.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(u+","+c+",next) {"),i.name.children.forEach(function(h){h=h.value,s.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=i.name.value,this._emitLine("runtime."+d+"("+f+", 1, function("+a+", "+u+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),s.set(a,a)),this._emitLoopBindings(i,f,u,c),this._withScopedSyntax(function(){var h;l&&(h=o._pushBuffer()),o.compile(i.body,s),o._emitLine("next("+u+(h?","+h:"")+");"),l&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),l&&this._emitLine(this.buffer+" += "+d+";"),i.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(i.else_,s),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(i,s){this._compileAsyncLoop(i,s)},r.compileAsyncAll=function(i,s){this._compileAsyncLoop(i,s,!0)},r._compileMacro=function(i,x){var l=this,a=[],o=null,u="macro_"+this._tmpid(),c=x!==void 0,f=(i.args.children.forEach(function(b,_){_===i.args.children.length-1&&b instanceof te.Dict?o=b:(l.assertType(b,te.Symbol),a.push(b))}),[].concat(a.map(function(b){return"l_"+b.value}),["kwargs"])),d=a.map(function(b){return'"'+b.value+'"'}),h=(o&&o.children||[]).map(function(b){return'"'+b.key.value+'"'}),m=c?x.push(
`))})},r.compileRoot=function(i,s){var l=this,a=(s&&this.fail("compileRoot: root node can't have frame"),s=new Jx,this._emitFuncBegin(i,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(i,s),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,[]);(s=i.findAll(te.Block)).forEach(function(o,u){var c=o.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),l._emitFuncBegin(o,"b_"+c),c=new Jx,l._emitLine("var frame = frame.push(true);"),l.compile(o.body,c),l._emitFuncEnd()}),this._emitLine("return {"),s.forEach(function(o,u){o="b_"+o.name.value,l._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(i,s){var l=this["compile"+i.typename];l?l.call(this,i,s):this.fail("compile: Cannot compile node: "+i.typename,i.lineno,i.colno)},r.getCode=function(){return this.codebuf.join("")},n}(D1.Obj),Pwe={compile:function(l,e,n,r,i){var s=new Tq(r,(i=i===void 0?{}:i).throwOnUndefined),l=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},l);return s.compile(Nwe.transform(Awe.parse(l,n,i),e,r)),s.getCode()},Compiler:Tq},Lwe=xt(function(t){function e(h,m){return h==null||h===!1?m:h}function n(h){return h!=h}function r(h){var m=(h=e(h,"")).toLowerCase();return bt.copySafeness(h,m.charAt(0).toUpperCase()+m.slice(1))}function i(h){if(je.isString(h))return h.split("");if(je.isObject(h))return je._entries(h||{}).map(function(m){return{key:m[0],value:m[1]}});if(je.isArray(h))return h;throw new je.TemplateError("list filter: type not iterable")}function s(h){return function(m,x,b){var _=this,E=_.env.getTest(x=x===void 0?"truthy":x);return je.toArray(m).filter(function(v){return E.call(_,v,b)===h})}}function l(h){return bt.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,m,x){for(var b=[],_=[],E=0;E<h.length;E++)E%m==0&&_.length&&(b.push(_),_=[]),_.push(h[E]);if(_.length){if(x)for(E=_.length;E<m;E++)_.push(x);b.push(_)}return b},t.capitalize=r,t.center=function(h,m){var x;return(h=e(h,"")).length>=(m=m||80)?h:(m-=h.length,x=je.repeat(" ",m/2-m%2),m=je.repeat(" ",m/2),bt.copySafeness(h,x+h+m))},t.default=function(h,m,x){return x?h||m:h!==void 0?h:m},t.dictsort=function(h,m,x){if(!je.isObject(h))throw new je.TemplateError("dictsort filter: val must be an object");var b,_,E=[];for(_ in h)E.push([_,h[_]]);if(x===void 0||x==="key")b=0;else{if(x!=="value")throw new je.TemplateError("dictsort filter: You can only sort by either key or value");b=1}return E.sort(function(v,g){return v=v[b],g=g[b],m||(je.isString(v)&&(v=v.toUpperCase()),je.isString(g)&&(g=g.toUpperCase())),g<v?1:v===g?0:-1}),E},t.dump=function(h,m){return JSON.stringify(h,null,m)},t.escape=function(h){return h instanceof bt.SafeString?h:bt.markSafe(je.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof bt.SafeString?h:bt.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return bt.markSafe(je.escape((h=h??"").toString()))},t.groupby=function(h,m){return je.groupBy(h,m,this.env.opts.throwOnUndefined)},t.indent=function(h,E,x){if((h=e(h,""))==="")return"";E=E||4;var b=h.split(`
2024-04-02 15:03:09 +08:00
`),_=je.repeat(" ",E),E=b.map(function(v,g){return g!==0||x?""+_+v:v}).join(`
`);return bt.copySafeness(h,E)},t.join=function(h,m,x){return m=m||"",(h=x?je.map(h,function(b){return b[x]}):h).join(m)},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:(!je.isObject(h)||h instanceof bt.SafeString?h:je.keys(h)).length:0},t.list=i,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":bt.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
2024-04-12 14:29:25 +08:00
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=s(!1),t.rejectattr=function(h,m){return h.filter(function(x){return!x[m]})},t.select=s(!0),t.selectattr=function(h,m){return h.filter(function(x){return!!x[m]})},t.replace=function(h,m,x,b){var _=h;if(m instanceof RegExp)return h.replace(m,x);b===void 0&&(b=-1);var E="";if(typeof m=="number")m=""+m;else if(typeof m!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof bt.SafeString))return h;if(m==="")return E=x+h.split("").join(x)+x,bt.copySafeness(h,E);var v=h.indexOf(m);if(b===0||v===-1)return h;for(var g=0,S=0;-1<v&&(b===-1||S<b);)E+=h.substring(g,v)+x,g=v+m.length,S++,v=h.indexOf(m,g);return g<h.length&&(E+=h.substring(g)),bt.copySafeness(_,E)},t.reverse=function(h){var m;return(m=je.isString(h)?i(h):je.map(h,function(x){return x})).reverse(),je.isString(h)?bt.copySafeness(h,m.join("")):m},t.round=function(h,m,x){return m=m||0,m=Math.pow(10,m),(x==="ceil"?Math.ceil:x==="floor"?Math.floor:Math.round)(h*m)/m},t.slice=function(h,m,x){for(var b=Math.floor(h.length/m),_=h.length%m,E=[],v=0,g=0;g<m;g++){var S=v+g*b;g<_&&v++,S=h.slice(S,v+(g+1)*b),x&&_<=g&&S.push(x),E.push(S)}return E},t.sum=function(h,m,x){return(x=x===void 0?0:x)+(h=m?je.map(h,function(b){return b[m]}):h).reduce(function(b,_){return b+_},0)},t.sort=bt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,m,x,b){var _=this,E=je.map(E,function(g){return g}),v=je.getAttrGetter(b);return E.sort(function(g,S){if(g=b?v(g):g,S=b?v(S):S,_.env.opts.throwOnUndefined&&b&&(g===void 0||S===void 0))throw new TypeError('sort: attribute "'+b+'" resolved to undefined');return!x&&je.isString(g)&&je.isString(S)&&(g=g.toLowerCase(),S=S.toLowerCase()),g<S?m?1:-1:S<g?m?-1:1:0}),E}),t.string=function(h){return bt.copySafeness(h,h)},t.striptags=function(h,b){var x=l((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),b=b?x.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
2024-04-02 15:03:09 +08:00
`).replace(/\n\n\n+/g,`
2024-04-12 14:29:25 +08:00
`):x.replace(/\s+/gi," ");return bt.copySafeness(h,b)},t.title=function(h){var m=(h=e(h,"")).split(" ").map(r);return bt.copySafeness(h,m.join(" "))},t.trim=l,t.truncate=function(h,m,x,b){var _=h;return(h=e(h,"")).length<=(m=m||255)?h:(h=x?h.substring(0,m):((x=h.lastIndexOf(" ",m))===-1&&(x=m),h.substring(0,x)),bt.copySafeness(_,h+=b??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var m=encodeURIComponent;return je.isString(h)?m(h):(je.isArray(h)?h:je._entries(h)).map(function(_){var b=_[0],_=_[1];return m(b)+"="+m(_)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,u=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,d=(t.urlize=function(h,m,x){n(m)&&(m=1/0);var b=x===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(_){return _&&_.length}).map(function(_){var E=_.match(a),v=(E=E?E[1]:_).substr(0,m);return u.test(E)?'<a href="'+E+'"'+b+">"+v+"</a>":c.test(E)?'<a href="http://'+E+'"'+b+">"+v+"</a>":o.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+b+">"+v+"</a>":_}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,m){return n(h=parseFloat(h))?m:h},bt.makeMacro(["value","default","base"],[],function(h,m,x){return x===void 0&&(x=10),n(h=parseInt(h,x))?m:h}));t.int=d,t.d=t.default,t.e=t.escape}),Mf={};function Iz(t,e){for(var n=0,r=t.length-1;0<=r;r--){var i=t[r];i==="."?t.splice(r,1):i===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Fwe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Wx=function(t){return Fwe.exec(t).slice(1)};function Xx(){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?"/":"")+Iz(Jb(t.split("/"),function(i){return!!i}),!e).join("/")||"."}function Aq(t){var e=Rz(t),n=Bwe(t,-1)==="/";return(t=(t=Iz(Jb(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function Rz(t){return t.charAt(0)==="/"}var O1={extname:function(t){return Wx(t)[3]},basename:function(t,e){return t=Wx(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Wx(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(u){for(var c=0;c<u.length&&u[c]==="";c++);for(var f=u.length-1;0<=f&&u[f]==="";f--);return f<c?[]:u.slice(c,f-c+1)}t=Xx(t).substr(1),e=Xx(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),s=Math.min(r.length,i.length),l=s,a=0;a<s;a++)if(r[a]!==i[a]){l=a;break}for(var o=[],a=l;a<r.length;a++)o.push("..");return(o=o.concat(i.slice(l))).join("/")},join:function(){return Aq(Jb(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:Rz,normalize:Aq,resolve:Xx};function Jb(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 Bwe="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 kz(t,e){return(kz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Wb=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),kz(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(i,s){return O1.resolve(O1.dirname(i),s)},r.isRelative=function(i){return i.indexOf("./")===0||i.indexOf("../")===0},n}(D1.EmitterObj);function Dz(t,e){return(Dz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Mwe=function(t){var e,n;function r(i){var s;return(s=t.call(this)||this).precompiled=i||{},s}return n=t,(e=r).prototype=Object.create(n.prototype),Dz(e.prototype.co
2024-04-02 15:03:09 +08:00
/* [wrapped with `+q+`] */
2024-04-12 14:29:25 +08:00
`)):R}(O,function(R,q){return ti(d,function(Y){var ee="_."+Y[0];q&Y[1]&&!kl(R,ee)&&R.push(ee)}),R.sort()}(function(){var R=O.match(Xr);return R?R[1].split(rr):[]}(),w)))}function XC(p){var y=0,w=0;return function(){var O=Qre(),R=16-(O-w);if(w=O,0<R){if(800<=++y)return arguments[0]}else y=0;return p.apply(n,arguments)}}function g8(p,y){var w=-1,O=p.length,R=O-1;for(y=y===n?O:y;++w<y;){var q=Hd(w,R),Y=p[q];p[q]=p[w],p[w]=Y}return p.length=y,p}var YC=function(){var p=x8(function(w){var O=[];return w.charCodeAt(0)===46&&O.push(""),w.replace(pt,function(R,q,Y,ee){O.push(Y?ee.replace(Yr,"$1"):q||R)}),O},function(w){return y.size===500&&y.clear(),w}),y=p.cache;return p}();function fa(p){var y;return typeof p=="string"||Ws(p)?p:(y=p+"")=="0"&&1/p==-1/0?"-0":y}function L3(p){if(p!=null){try{return J6.call(p)}catch{}try{return p+""}catch{}}return""}function QC(p){var y;return p instanceof Yt?p.clone():((y=new Pl(p.__wrapped__,p.__chain__)).__actions__=Es(p.__actions__),y.__index__=p.__index__,y.__values__=p.__values__,y)}function ZC(p,y,w){var O=p==null?0:p.length;return O?((w=w==null?0:kt(w))<0&&(w=ri(O+w,0)),sa(p,yt(y,3),w)):-1}function eO(p,y,w){var O,R=p==null?0:p.length;return R?(O=R-1,w!==n&&(O=kt(w),O=w<0?ri(R+O,0):Mi(O,R-1)),sa(p,yt(y,3),O,!0)):-1}function tO(p){return p!=null&&p.length?Ci(p,1):[]}function nO(p){return p&&p.length?p[0]:n}function cl(p){var y=p==null?0:p.length;return y?p[y-1]:n}function rO(p,y){return p&&p.length&&y&&y.length?$d(p,y):p}Id=Ft(function(p,y){return Br(p)?D4(p,Ci(y,1,Br,!0)):[]}),oa=Ft(function(p,y){var w=cl(y);return Br(w)&&(w=n),Br(p)?D4(p,Ci(y,1,Br,!0),yt(w,2)):[]}),N4=Ft(function(p,y){var w=cl(y);return Br(w)&&(w=n),Br(p)?D4(p,Ci(y,1,Br,!0),n,w):[]}),nn=Ft(function(p){var y=pn(p,Kd);return y.length&&y[0]===p[0]?Bd(y):[]}),e0=Ft(function(p){var y=cl(p),w=pn(p,Kd);return y===cl(w)?y=n:w.pop(),w.length&&w[0]===p[0]?Bd(w,yt(y,2)):[]}),Rd=Ft(function(p){var y=cl(p),w=pn(p,Kd);return(y=typeof y=="function"?y:n)&&w.pop(),w.length&&w[0]===p[0]?Bd(w,n,y):[]}),Ui=Ft(rO);var hie=Wa(function(p,y){var w=p==null?0:p.length,O=Dd(p,y);return yC(p,pn(y,function(R){return Xa(R,w)?+R:R}).sort(AC)),O});function am(p){return p==null?p:eie.call(p)}var die=Ft(function(p){return k2(Ci(p,1,Br,!0))}),mie=Ft(function(p){var y=cl(p);return Br(y)&&(y=n),k2(Ci(p,1,Br,!0),yt(y,2))}),yie=Ft(function(p){var y=typeof(y=cl(p))=="function"?y:n;return k2(Ci(p,1,Br,!0),n,y)});function om(p){var y;return p&&p.length?(y=0,p=gi(p,function(w){if(Br(w))return y=ri(w.length,y),!0}),H6(y,function(w){return pn(p,la(w))})):[]}function iO(p,y){return p&&p.length?(p=om(p),y==null?p:pn(p,function(w){return yi(y,n,w)})):[]}var gie=Ft(function(p,y){return Br(p)?D4(p,y):[]}),vie=Ft(function(p){return Gd(gi(p,Br))}),_ie=Ft(function(p){var y=cl(p);return Br(y)&&(y=n),Gd(gi(p,Br),yt(y,2))}),Eie=Ft(function(p){var y=typeof(y=cl(p))=="function"?y:n;return Gd(gi(p,Br),n,y)}),xie=Ft(om),bie=Ft(function(p){var y=typeof(y=1<(y=p.length)?p[y-1]:n)=="function"?(p.pop(),y):n;return iO(p,y)});function sO(p){return(p=B(p)).__chain__=!0,p}function v8(p,y){return y(p)}var wie=Wa(function(p){function y(q){return Dd(q,p)}var w=p.length,O=w?p[0]:0,R=this.__wrapped__;return!(1<w||this.__actions__.length)&&R instanceof Yt&&Xa(O)?((R=R.slice(O,+O+(w?1:0))).__actions__.push({func:v8,args:[y],thisArg:n}),new Pl(R,this.__chain__).thru(function(q){return w&&!q.length&&q.push(n),q})):this.thru(y)}),Sie=c8(function(p,y,w){En.call(p,w)?++p[w]:Ka(p,w,1)}),Tie=kC(ZC),Aie=kC(eO);function lO(p,y){return(Nt(p)?ti:R2)(p,yt(y,3))}function aO(p,y){return(Nt(p)?function(w,O){for(var R=w==null?0:w.length;R--&&O(w[R],R,w)!==!1;);return w}:rC)(p,yt(y,3))}var Cie=c8(function(p,y,w){En.call(p,w)?p[w].push(y):Ka(p,w,[y])}),Oie=Ft(function(p,y,w){var O=-1,R=typeof y=="function",q=xs(p)?ye(p.length):[];return R2(p,function(Y){q[++O]=R?yi(y,Y,w):P4(Y,y,w)}),q}),Nie=c8(function(p,y,w){Ka(p,w,y)});function _8(p,y){return(Nt(p)?pn:cC)(p,yt(y,3))}var Iie=c8(function(p,y,w){p[w?0:1].push(y)},function(){return[[],[]]}),Rie=Ft(function(p,y){var w;return p==null?[]:(1<(w=y.length)&&as(p,y[0],y[
`;if(p.replace(de,function(be,Ee,Ce,ot,Fe,Ue){return Ce=Ce||ot,he+=p.slice(ee,Ue).replace(xr,$A),Ee&&(O=!0,he+=`' +
2024-04-02 15:03:09 +08:00
__e(`+Ee+`) +
2024-04-09 09:34:47 +08:00
'`),Fe&&(R=!0,he+=`';
`+Fe+`;
2024-04-02 15:03:09 +08:00
__p += '`),Ce&&(he+=`' +
((__t = (`+Ce+`)) == null ? '' : __t) +
'`),ee=Ue+be.length,be}),he+=`';
2024-04-12 14:29:25 +08:00
`,oe=En.call(y,"variable")&&y.variable){if(Yn.test(oe))throw new ut("Invalid `variable` option passed into `_.template`")}else he=`with (obj) {
2024-04-02 15:03:09 +08:00
`+he+`
}
2024-04-09 09:34:47 +08:00
`;if(he=(R?he.replace(Be,""):he).replace(Re,"$1").replace(Te,"$1;"),he="function("+(oe||"obj")+`) {
2024-04-02 15:03:09 +08:00
`+(oe?"":`obj || (obj = {});
2024-04-09 09:34:47 +08:00
`)+"var __t, __p = ''"+(O?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
2024-04-02 15:03:09 +08:00
function print() { __p += __j.call(arguments, '') }
`:`;
`)+he+`return __p
2024-04-12 14:29:25 +08:00
}`,(de=OO(function(){return Ot(q,Oe+"return "+he).apply(n,Y)})).source=he,hm(de))throw de;return de},B.times=function(p,y){if((p=kt(p))<1||u<p)return[];var w=f,O=Mi(p,f);for(y=yt(y),p-=f,O=H6(O,y);++w<p;)y(w);return O},B.toFinite=Qa,B.toInteger=kt,B.toLength=vO,B.toLower=function(p){return vn(p).toLowerCase()},B.toNumber=pl,B.toSafeInteger=function(p){return p?k3(kt(p),-9007199254740991,u):p===0?p:0},B.toString=vn,B.toUpper=function(p){return vn(p).toUpperCase()},B.trim=function(p,y,w){return(p=vn(p))&&(w||y===n)?qa(p):p&&(y=Js(y))?P2(w=Dl(p),q6(w,y=Dl(y)),V6(w,y)+1).join(""):p},B.trimEnd=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.slice(0,HA(p)+1):p&&(y=Js(y))?P2(w=Dl(p),0,V6(w,Dl(y))+1).join(""):p},B.trimStart=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.replace(en,""):p&&(y=Js(y))?P2(w=Dl(p),q6(w,Dl(y))).join(""):p},B.truncate=function(p,R){var w,Y=30,O="...",R=(wr(R)&&(w="separator"in R?R.separator:w,Y="length"in R?kt(R.length):Y,O="omission"in R?Js(R.omission):O),(p=vn(p)).length);if((R=C3(p)?(q=Dl(p)).length:R)<=Y)return p;if((R=Y-Yu(O))<1)return O;var q,Y=q?P2(q,0,R).join(""):p.slice(0,R);if(w!==n)if(q&&(R+=Y.length-R),dm(w)){if(p.slice(R).search(w)){var ee,oe=Y;for((w=w.global?w:O3(w.source,vn(rs.exec(w))+"g")).lastIndex=0;ee=w.exec(oe);)var he=ee.index;Y=Y.slice(0,he===n?R:he)}}else p.indexOf(Js(w),R)!=R&&-1<(q=Y.lastIndexOf(w))&&(Y=Y.slice(0,q));return Y+O},B.unescape=function(p){return(p=vn(p))&&gt.test(p)?p.replace(De,Vre):p},B.uniqueId=function(p){var y=++Gre;return vn(p)+y},B.upperCase=nse,B.upperFirst=gm,B.each=lO,B.eachRight=aO,B.first=nO,Em(B,(Sm={},ua(B,function(p,y){En.call(B.prototype,y)||(Sm[y]=p)}),Sm),{chain:!1}),B.VERSION="4.17.21",ti(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){B[p].placeholder=B}),ti(["drop","take"],function(p,y){Yt.prototype[p]=function(w){w=w===n?1:ri(kt(w),0);var O=this.__filtered__&&!y?new Yt(this):this.clone();return O.__filtered__?O.__takeCount__=Mi(w,O.__takeCount__):O.__views__.push({size:Mi(w,f),type:p+(O.__dir__<0?"Right":"")}),O},Yt.prototype[p+"Right"]=function(w){return this.reverse()[p](w).reverse()}}),ti(["filter","map","takeWhile"],function(p,y){var w=y+1,O=w==1||w==3;Yt.prototype[p]=function(R){var q=this.clone();return q.__iteratees__.push({iteratee:yt(R,3),type:w}),q.__filtered__=q.__filtered__||O,q}}),ti(["head","last"],function(p,y){var w="take"+(y?"Right":"");Yt.prototype[p]=function(){return this[w](1).value()[0]}}),ti(["initial","tail"],function(p,y){var w="drop"+(y?"":"Right");Yt.prototype[p]=function(){return this.__filtered__?new Yt(this):this[w](1)}}),Yt.prototype.compact=function(){return this.filter(ws)},Yt.prototype.find=function(p){return this.filter(p).head()},Yt.prototype.findLast=function(p){return this.reverse().find(p)},Yt.prototype.invokeMap=Ft(function(p,y){return typeof p=="function"?new Yt(this):this.map(function(w){return P4(w,p,y)})}),Yt.prototype.reject=function(p){return this.filter(b8(yt(p)))},Yt.prototype.slice=function(p,y){p=kt(p);var w=this;return w.__filtered__&&(0<p||y<0)?new Yt(w):(p<0?w=w.takeRight(-p):p&&(w=w.drop(p)),y!==n?(y=kt(y))<0?w.dropRight(-y):w.take(y-p):w)},Yt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Yt.prototype.toArray=function(){return this.take(f)},ua(Yt.prototype,function(p,y){var w=/^(?:filter|find|map|reject)|While$/.test(y),O=/^(?:head|last)$/.test(y),R=B[O?"take"+(y=="last"?"Right":""):y],q=O||/^find/.test(y);R&&(B.prototype[y]=function(){function Y(ot){return ot=R.apply(B,ia([ot],he)),O&&Oe?ot[0]:ot}var ee,oe=this.__wrapped__,he=O?[1]:arguments,Ce=oe instanceof Yt,be=he[0],de=Ce||Nt(oe),Oe=(de&&w&&typeof be=="function"&&be.length!=1&&(Ce=de=!1),this.__chain__),be=!!this.__actions__.length,Ee=q&&!Oe,Ce=Ce&&!be;return!q&&de?(oe=Ce?oe:new Yt(this),(ee=p.apply(oe,he)).__actions__.push({func:v8,args:[Y],thisArg:n}),new Pl(ee,Oe)):Ee&&Ce?p.apply(this,he):(ee=this.thru(Y),Ee?O?ee.value()[0]:ee.value():ee)})}),ti(["pop","push","shift","sort","splice","unshift"],function(p){var y=K6[p],w=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",O=/
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let u=ySe(o,s);u&&l.push(u)}}else l.push(o)}return l.length!==0&&l[0].name==="EXTM3U"||ze("The EXTM3U tag MUST be the first line."),l}(t,e),r=gSe(n,e);return r.source=t,r}var vSe=["#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"],_Se=["#EXT-X-MEDIA"],cw=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(vSe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(_Se.some(r=>n.startsWith(r)))continue;ze(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function dw(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 ESe(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 cG(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&&ze("IV must be a 128-bit unsigned integer"),r.push(`IV=${aG(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function xSe(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=${dw(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let i of e.audio)t.push(up(i))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let i of e.video)t.push(up(i))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let i of e.subtitles)t.push(up(i))}if(aSe().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 i of e.closedCaptions)t.push(up(i))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let i=[];for(let{format:s,cpcList:l}of e.allowedCpc)i.push(`${s}:${l.join("/")}`);r.push(`ALLOWED-CPC="${i.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 up(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 bSe(t,e,n,r,i=1,s=null){let l=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=cG(e.key);u!==n&&(t.push(u),n=u)}if(e.map){let u=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${lw(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);u!==r&&(t.push(u),r=u)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${sw(e.programDateTime)}`),e.dateRange&&t.push(function(u){let c=[`ID="${u.id}"`];u.start&&c.push(`START-DATE="${sw(u.start)}"`),u.end&&c.push(`END-DATE="${sw(u.end)}"`),u.duration&&c.push(`DURATION=${u.duration}`),u.plannedDuration&&c.push(`PLANNED-DURATION=${u.plannedDuration}`),u.classId&&c.push(`CLASS="${u.classId}"`),u.endOnNext&&
`)}var pG="hls_cache",wp=[],Nu={},i6={},Ou={},bp="";function wSe(t,e){if(wp.push(t),Nu[t]=e,wp.length>5){let n=wp.shift();SSe(n)}}function SSe(t){delete Nu[t],delete wp[t],new JSFile(pG+"/"+t).delete()}function TSe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=mw(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=mw(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=mw(t,n.key.uri));return e}async function hG(t,e){let n=md5X(t);if(Nu[n])return Nu[n];let r={},i=t;for(;r=await req(i,{headers:e,redirect:0}),r.headers.location;)i=r.headers.location;if(r.code==200){var s=r.content;let l=TSe(i,uG(s));return wSe(n,{code:r.code,plist:l,key:n,headers:r.headers}),Nu[n]}return{}}async function dG(t,e,n){if(!Nu[t])return{};let i=Nu[t].plist.segments,s=!Ou[t];if(s){Ou[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());Ou[t][f]={file:pG+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Ou[t]){let f=Ou[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}s&&ASe(t,5,n);let l=i[e],a=md5X(l.uri+l.mediaSequenceNumber.toString()),o=Ou[t][a];if(o.state==1||o.state==-1){let c=new JSFile(o.file);if(await c.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};o.state=-1}if(o.state==-1&&mG(t,o,n),o.state==0){var u=new JSProxyStream;u.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return o.read=!0,new Promise(async function(f,d){let h=new JSFile(o.file+".dl");await h.open("r"),async function m(){let x=await h.size();if(x>c){var b=await h.read(x-c,c);await u.write(b),c=x}if(o.state==1||o.state<0){u.done(),await h.close(),await h.delete(),o.read=!1,f();return}setTimeout(m,5)}()}),{buffer:3,content:u}}}async function mG(t,e,n){if(e.state>=0||!i6[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 i=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(i.error||i.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 ASe(t,e,n){bp&&bp!=t&&delete i6[bp],bp=t,i6[t]=!0;for(let r=0;r<e&&i6[t];r++)new Promise(function(i,s){(async function l(){if(!i6[t]){i();return}let a=Q.pickBy(Ou[t],function(u){return u.state==-1}),o=Q.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await mG(t,o,n),setTimeout(l,5)})()})}function mw(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var i=0;i<r.length;i++)r[i]!="."&&(r[i]==".."?n.pop():n.push(r[i]));return n.join("/")}function yG(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),i=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${i}]]></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 Sp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Aa(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Wi,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,i,s,l){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),xo(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,i,s,l)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,i,s,l,a){return a.headers.location!==void 0?i?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,i,s,l):a.content.length>0?(this.reconnectTimes=0,s?{cookie:a.headers["set-cookie"],content:a.conten
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||e[n]&&vOe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var AW=Symbol("internals");function v6(t){return t&&String(t).trim().toLowerCase()}function Qp(t){return t===!1||t==null?t:le.isArray(t)?t.map(Qp):String(t)}function _Oe(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 EOe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function fS(t,e,n,r,i){if(le.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!le.isString(e)){if(le.isString(r))return e.indexOf(r)!==-1;if(le.isRegExp(r))return r.test(e)}}function xOe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function bOe(t,e){let n=le.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,l){return this[r].call(this,e,i,s,l)},configurable:!0})})}var r4=class{constructor(e){e&&this.set(e)}set(e,n,r){let i=this;function s(a,o,u){let c=v6(o);if(!c)throw new Error("header name must be a non-empty string");let f=le.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||o]=Qp(a))}let l=(a,o)=>le.forEach(a,(u,c)=>s(u,c,o));return le.isPlainObject(e)||e instanceof this.constructor?l(e,n):le.isString(e)&&(e=e.trim())&&!EOe(e)?l(TW(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=v6(e),e){let r=le.findKey(this,e);if(r){let i=this[r];if(!n)return i;if(n===!0)return _Oe(i);if(le.isFunction(n))return n.call(this,i,r);if(le.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=v6(e),e){let r=le.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||fS(this,this[r],r,n)))}return!1}delete(e,n){let r=this,i=!1;function s(l){if(l=v6(l),l){let a=le.findKey(r,l);a&&(!n||fS(r,r[a],a,n))&&(delete r[a],i=!0)}}return le.isArray(e)?e.forEach(s):s(e),i}clear(e){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let s=n[r];(!e||fS(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){let n=this,r={};return le.forEach(this,(i,s)=>{let l=le.findKey(r,s);if(l){n[l]=Qp(i),delete n[s];return}let a=e?xOe(s):String(s).trim();a!==s&&delete n[s],n[a]=Qp(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return le.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&le.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(i=>r.set(i)),r}static accessor(e){let r=(this[AW]=this[AW]={accessors:{}}).accessors,i=this.prototype;function s(l){let a=v6(l);r[a]||(bOe(i,l),r[a]=!0)}return le.isArray(e)?e.forEach(s):s(e),this}};r4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(r4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});le.freezeMethods(r4);var fi=r4;function _6(t,e){let n=this||n4,r=e||n,i=fi.from(r.headers),s=r.data;return le.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function E6(t){return!!(t&&t.__CANCEL__)}function CW(t,e,n){We.call(this,t??"canceled",We.ERR_CANCELED,e,n),this.name="CanceledError"}le.inherits(CW,We,{__CANCEL__:!0});var ea=CW;function Co(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new We("Request failed with status code "+n.status,[We.ERR_BAD_REQUEST,We.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function pS(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hS(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Bu(t,e){return t&&!pS(e)?hS(t,e):e}var XW=Dr(NW(),1),YW=Dr(require("http"),1),QW=Dr(require("https"),1),ZW=Dr(require("util"),1),eX=Dr(FW(),1),S2=Dr(require("zlib"),1);var Uu="1.6.7";function A6(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var UOe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function AS(t,e,n){let r=n&&n.Blob||ci.classes.Blob,i=A6(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let s=UOe.exec(t);if(!s)throw new We("Invalid URL",We.ERR_INVALID_URL);let l=s[1],a=s[2],o=s[3],u=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new We("Blob is not supported",We.ERR_NOT_SUPPORT);return new r([u],{type:l})}return u}throw new We("Unsupported protocol "+i,We.ERR_NOT_SUPPORT)}var ju=Dr(require("stream"),1);var MW=Dr(require("stream"),1);function jOe(t,e){let n=0,r=1e3/e,i=null;return function(l,a){let o=Date.now();if(l||o-n>r)return i&&(clearTimeout(i),i=null),n=o,t.apply(null,a);i||(i=setTimeout(()=>(i=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var BW=jOe;function $Oe(t,e){t=t||10;let n=new Array(t),r=new Array(t),i=0,s=0,l;return e=e!==void 0?e:1e3,function(o){let u=Date.now(),c=r[s];l||(l=u),n[i]=o,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-l<e)return;let h=c&&u-c;return h?Math.round(d*1e3/h):void 0}}var Zp=$Oe;var eh=Symbol("internals"),CS=class extends MW.default.Transform{constructor(e){e=le.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!le.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[eh]={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},i=Zp(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let s=0;r.updateProgress=BW(function(){let o=r.length,u=r.bytesSeen,c=u-s;if(!c||n.destroyed)return;let f=i(c);s=u,process.nextTick(()=>{n.emit("progress",{loaded:u,total:o,progress:o?u/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o&&u<=o?(o-u)/f:void 0})})},r.ticksRate);let l=()=>{r.updateProgress(!0)};this.once("end",l),this.once("error",l)}_read(e){let n=this[eh];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,s=this[eh],l=s.maxRate,a=this.readableHighWaterMark,o=s.timeWindow,u=1e3/o,c=l/u,f=s.minChunkSize!==!1?Math.max(s.minChunkSize,c*.01):0;function d(m,x){let b=Buffer.byteLength(m);s.bytesSeen+=b,s.bytes+=b,s.isCaptured&&s.updateProgress(),i.push(m)?process.nextTick(x):s.onReadCallback=()=>{s.onReadCallback=null,process.
`,VOe=C6.encode(Oo),zOe=2,NS=class{constructor(e,n){let{escapeName:r}=this.constructor,i=le.isString(n),s=`Content-Disposition: form-data; name="${r(e)}"${!i&&n.name?`; filename="${r(n.name)}"`:""}${Oo}`;i?n=C6.encode(String(n).replace(/\r?\n|\r\n?/g,Oo)):s+=`Content-Type: ${n.type||"application/octet-stream"}${Oo}`,this.headers=C6.encode(s+Oo),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+zOe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;le.isTypedArray(e)?yield e:yield*th(e),yield VOe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},GOe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:s=r+"-"+le.generateString(i,qOe)}=n||{};if(!le.isFormData(t))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let l=C6.encode("--"+s+Oo),a=C6.encode("--"+s+"--"+Oo+Oo),o=a.byteLength,u=Array.from(t.entries()).map(([f,d])=>{let h=new NS(f,d);return o+=h.size,h});o+=l.byteLength*u.length,o=le.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),$W.Readable.from(async function*(){for(let f of u)yield l,yield*f.encode();yield a}())},HW=GOe;var qW=Dr(require("stream"),1),IS=class extends qW.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 i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,n)}this.__transform(e,n,r)}},VW=IS;var KOe=(t,e)=>le.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(i=>{try{e?r(null,...e(i)):r(null,i)}catch(s){r(s)}},r)}:t,zW=KOe;var GW={flush:S2.default.constants.Z_SYNC_FLUSH,finishFlush:S2.default.constants.Z_SYNC_FLUSH},JOe={flush:S2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:S2.default.constants.BROTLI_OPERATION_FLUSH},KW=le.isFunction(S2.default.createBrotliDecompress),{http:WOe,https:XOe}=eX.default,YOe=/https:?/,JW=ci.protocols.map(t=>t+":");function QOe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function nX(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,XW.getProxyForUrl)(n);i&&(r=new URL(i))}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 s=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+s}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=r.hostname||r.host;t.hostname=i,t.host=i,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(s){nX(s,e,s.href)}}var ZOe=typeof process<"u"&&le.kindOf(process)==="process",eNe=t=>new Promise((e,n)=>{let r,i,s=(o,u)=>{i||(i=!0,r&&r(o,u))},l=o=>{s(o),e(o)},a=o=>{s(o,!0),n(o)};t(l,a,o=>r=o).catch(a)}),tNe=({address:t,family:e})=>{if(!le.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},WW=(t,e)=>tNe(le.isObject(t)?t:{address:t,family:e}),rX=ZOe&&function(e){return eNe(async function(r,i,s){let{data:l,lookup:a,family:o}=e,{responseType:u,responseEncoding:c}=e,f=e.method.toUpperCase(),d,h=!1,m;if(a){let W=zW(a,re=>le.isArray(re)?re:[re]);a=(re,I,M)=>{W(re,I,(F,L,Ke)=>{if(F)return M(F);let Be=le.isArray(L)?L.map(Re=>WW(Re)):[WW(L,Ke)];I.all?M(F,Be):M(F,Be[0].address,Be[0].family)})}}let x=new tX.default,b=()=>{e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_),x.removeAllListeners()};s((W,re)=>{d=!0,re&&(h=!0,b())});function _(W){x.emit("abort",!W||W.type?new ea(null,e,m):W)}x.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_)));let E=Bu(e.baseURL,e.url),v=new URL(E,"http://localhost"),g=v.protocol||JW[0];if(g==="data:"){let W;if(f!=="GET")return Co(r,i,{status:405,
`+s.map(oX).join(`
`):" "+oX(s[0]):"as no adapter specified";throw new We("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:RS};function kS(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ea(null,t)}function rh(t){return kS(t),t.headers=fi.from(t.headers),t.data=_6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nh.getAdapter(t.adapter||n4.adapter)(t).then(function(r){return kS(t),r.data=_6.call(t,t.transformResponse,r),r.headers=fi.from(r.headers),r},function(r){return E6(r)||(kS(t),r&&r.response&&(r.response.data=_6.call(t,t.transformResponse,r.response),r.response.headers=fi.from(r.response.headers))),Promise.reject(r)})}var uX=t=>t instanceof fi?t.toJSON():t;function T2(t,e){e=e||{};let n={};function r(u,c,f){return le.isPlainObject(u)&&le.isPlainObject(c)?le.merge.call({caseless:f},u,c):le.isPlainObject(c)?le.merge({},c):le.isArray(c)?c.slice():c}function i(u,c,f){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function s(u,c){if(!le.isUndefined(c))return r(void 0,c)}function l(u,c){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in e)return r(u,c);if(f in t)return r(void 0,u)}let o={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>i(uX(u),uX(c),!0)};return le.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=o[c]||i,d=f(t[c],e[c],c);le.isUndefined(d)&&f!==a||(n[c]=d)}),n}var DS={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{DS[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var cX={};DS.transitional=function(e,n,r){function i(s,l){return"[Axios v"+Uu+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,a)=>{if(e===!1)throw new We(i(l," has been removed"+(n?" in "+n:"")),We.ERR_DEPRECATED);return n&&!cX[l]&&(cX[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,l,a):!0}};function iNe(t,e,n){if(typeof t!="object")throw new We("options must be an object",We.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),i=r.length;for(;i-- >0;){let s=r[i],l=e[s];if(l){let a=t[s],o=a===void 0||l(a,s,t);if(o!==!0)throw new We("option "+s+" must be "+o,We.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new We("Unknown option "+s,We.ERR_BAD_OPTION)}}var ih={assertOptions:iNe,validators:DS};var No=ih.validators,s4=class{constructor(e){this.defaults=e,this.interceptors={request:new aS,response:new aS}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let s=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=T2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ih.assertOptions(r,{silentJSONParsing:No.transitional(No.boolean),forcedJSONParsing:No.transitional(No.boolean),clarifyTimeoutError:No.transitional(No.boolean)},!1),i!=null&&(le.isFunction(i)?n.paramsSerializer={serialize:i}:ih.assertOptions(i,{encode:No.function,serialize:No.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&le.merge(s.common,s[n.method]);s&&le.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=fi.concat(l,s);let a=[],o=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(o=o&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,f=0,d;if(!o){let m=[rh.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=a.length;let h=n;for(f=0;f<d;){let m=a[f++],x=a[f++];try{h=m(h)}catch(b){x.call(this,b);break}}try{c=rh.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(e){e=T2(this.defaults,e);let n=Bu(e.baseURL,e.url);return Fu(n,e.params,e.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(e){s4.prototype[e]=function(n,r){return this.request(T2(r||{},{method:e,url:n,data:(r||{}).data}))}});le.forEach(["post","put","patch"],function(e){function n(r){return function(s,l,a){return this.request(T2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}s4.prototype[e]=n(),s4.prototype[e+"Form"]=n(!0)});var O6=s4;var PS=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});let r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s,l=new Promise(a=>{r.subscribe(a),s=a}).then(i);return l.cancel=function(){r.unsubscribe(s)},l},e(function(s,l,a){r.reason||(r.reason=new ea(s,l,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(i){e=i}),cancel:e}}},fX=PS;function LS(t){return function(n){return t.apply(null,n)}}function FS(t){return le.isObject(t)&&t.isAxiosError===!0}var BS={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(BS).forEach(([t,e])=>{BS[e]=t});var pX=BS;function hX(t){let e=new O6(t),n=m6(O6.prototype.request,e);return le.extend(n,O
`+t)}globalThis.req=yNe;async function yNe(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,i=e&&e.buffer||0,s=e&&e.timeout||5e3,l=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=xX.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=dX(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=SX.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:"7890"}}):c=bX.default.Agent({rejectUnauthorized:!1});let f=await l4(t,{responseType:u,method:e&&e.method||"get",headers:o,data:n,timeout:s,maxRedirects:l?null:0,httpsAgent:c});n=f.data;let d={};for(let h of f.headers){let m=h[1];d[h[0]]=Array.isArray(m)&&m.length===1?m[0]:m}if(!i)typeof n=="object"&&(n=JSON.stringify(n));else{if(i===1)return{code:f.status,headers:d,content:n};if(i===2)return{code:f.status,headers:d,content:n.toString("base64")};if(i===3){let h=e.stream;return h.onResp&&await h.onResp({code:f.status,headers:d}),h.onData?(n.on("data",async m=>{await h.onData(m)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:f.status,headers:d,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=gNe;function gNe(t){return wX.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 vNe=["DEBUG","INFO","WARNING","ERROR"];var o4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=vNe.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 $e=class extends Ge{constructor(){super(),this.jadeLog=new o4(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\u66F
`).trim(),n=s("a.Readpage_down")[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i+`
2024-04-02 15:03:09 +08:00
2024-04-12 14:29:25 +08:00
`}}catch{this.playUrl={content:""}}}async search(e,n){let r=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":_o,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),s=(Q.isArray(r.headers["set-cookie"])?r.headers["set-cookie"].join(";;;"):r.headers["set-cookie"]).split(";;;"),l={};for(let c of s){let f=c.trim(),d=f.indexOf("="),h=f.substr(0,d);l[h]=f.substr(d+1,f.indexOf(";")-d-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":_o,cookie:"hm="+l.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),o=JSON.parse(a.content),u=[];for(let c of o)u.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:u}}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],i=Xi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let s=await this.getHtml(this.siteUrl+i),l=await this.parseVodDetailFromDoc(s),a;return Q.isEmpty(n)?a=await req(l.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":Wi}}):a=await req(l.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},bn=new zS;var GS=class extends $e{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await bn.initCookie(e.server.config.bilicookie),await bn.spiderInit(e),bn.cfgObj.code=0,bn.catOpenStatus=!0,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,i){await bn.setCategory(e,n,r,i),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)}},Do=new GS;async function HX(t,e){return await Do.init(t,e)}async function qX(t,e){return await Do.home(t,e)}async function kNe(t,e){return await Do.homeVod(t,e)}async function VX(t,e){return await Do.category(t,e)}async function zX(t,e){return await Do.detail(t,e)}async function GX(t,e){return await Do.play(t,e)}async function KX(t,e){return await Do.search(t,e)}async function DNe(t,e){return await Do.proxy(t,e)}var JX={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",HX),t.post("/home",qX),t.post("/category",VX),t.post("/detail",zX),t.post("/play",GX),t.post("/search",KX),t.get("/proxy/:what/:ids/:end",DNe)},spider:{init:HX,home:qX,homeVod:kNe,category:VX,detail:zX,play:GX,search:KX}};var KS=class extends Ge{constructor(){super(),this.siteUrl="http://m.dj0898.com"}getName(){return"\u{1F3B5}\u2503\u4E16\u7EAADJ\u97F3\u4E50\u7F51\u2503\u{1F3B5}"}getAppName(){return"\u4E16\u7EAADJ\u97F3\u4E50\u7F51"}getJSName(){return"dj0898_book_open"}getType(){return 10}async parseVodShortListFromDoc(e){let n=[],r=e("ul.djddv_djList > li");for(let i of r){let s=new Us,l=e(i).find("a")[1];s.book_id=l.attribs.href,s.book_pic=e(i).find("img:first")[0].attribs.src;let a=e(i).find("strong:first")[0];s.book_name=a.children[0].data,s.book_remarks="\u{1F3B5}"+e(i).find("font")[5].children[0].data||"",n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.djddv_djList > li"),r=Q.map(n,s=>{let l=e(s).find("a")[1],a=e(s).find("img:first")[0],o=e(s).find(
`),i=[];for(let d of r)Q.isEmpty(d.replaceAll(" ","").replaceAll("/",""))||i.push(d.replaceAll(" ","").replaceAll("/",""));n.type_name=i.slice(0,2).join("*");let s=e('[class="video-info-items"]');n.vod_director=e(s[0]).find("a")[0].children[0].data;let l=e(s[1]).find("a"),a=[];for(let d of l)a.push(d.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=i[2],n.vod_remarks=e(e(s[3]).find(".video-info-item")).text(),n.vod_content=e(e(s[5]).find(".video-info-item")).text(),n.vod_area=i[3],n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","").replaceAll(" ","").replaceAll(`
`,"");let o=e(e('[class="module-tab-content"]')[0]).find("span"),u=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let d of o)c.push(e(d).text());let f=[];for(let d of u){let h=e(e(d).find('[class="sort-item"]')).find("a"),m=[];for(let x of h){let b=e(x).text(),_=x.attribs.href,E=b+"$"+_;m.push(E)}f.push(m.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=Q.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),r=[];for(let i of n){let s=new Pe;s.vod_id=e(i).find(".video-serial")[0].attribs.href,s.vod_name=e(i).find(".video-serial")[0].attribs.title,s.vod_pic=e(i).find(".module-item-pic > img")[0].attribs["data-src"],s.vod_remarks="",r.push(s)}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e),r=n(n('[class="nav-menu-items"]')[0]).find("li");for(let i of r.slice(0,6)){let s=n(n(i).find("span")).text();if(s!=="\u9996\u9875"){let a={type_id:n(i).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:s};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),r=[];for(let i=0;i<n.length;i++){let s={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){s.name=e(e(n[i]).find("a")[0]).text(),s.value.push({n:"\u5168\u90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?s.value.push({n:e(l).text(),v:l.attribs.href.split("/").slice(-1)[0].split(".")[0]}):s.value.push({n:e(l).text(),v:e(l).text()});r.push(s)}else s.name=e(e(n[i]).find("a")[0]).text(),s.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(s)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/id/${n}.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=tt(i);this.filterObj[n]=await this.getFilter(s)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,r=""){return e!==void 0&&e!=="0"?r+e:n}async getCateUrl(e,n,r){e=this.getExtend(r[1],e);let i=this.getExtend(r[2],"","/area/"),s=this.getExtend(r[3],"","/lang/"),l=this.getExtend(r[4],"","/year/"),a=this.getExtend(r[5],"","/letter/"),o=this.getExtend(r[6],"","/by/");return this.siteUrl+`/vodshow${o}${i}/id/${e}${s}${a}${l}/page/${n}.html`}async setCategory(e,n,r,i){let s=await this.getCateUrl(e,n,i),l=await this.fetch(s,null,this.getHeader());if(!Q.isEmpty(l)){let a=tt(l);this.vodList=await this.parseVodShortListFromDoc(a);let o=Ie(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,l);this.limit=72,o.length>0&&(this.total=parseInt(o)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!Q.isEmpty(i)){let s=Ie(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,i),l=JSON.parse(s);this.playUrl=l.url}}async setSearch(e,n){let r=this.siteUrl+`/vodsearch/wd/${e}.html`,i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s=tt(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},Tn=new QS;var ZS=class extends $e{constructor(){super()}getName(){return Tn.getName()}getAppName(){return Tn.getAppName()}getJSName(){return Tn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Tn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Tn.initCookie(e.server.config.bilicookie),await Tn.spiderInit(e),Tn.cfgObj.code=0,Tn.catOpenStatus=!0,Tn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async
`;n.type_name=e(e(e(i).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(i).find("img")[0].attribs.src,n.vod_name=Ie(/名称:(.*?)\n/,l),n.vod_actor=Ie(/主演:(.*?)\n/,l),n.vod_director=Ie(/导演:(.*?)\n/,l),n.vod_area=Ie(/地区:(.*?)\n/,l),n.vod_year=Ie(/年份:(.*?)\n/,l),n.vod_remarks=Ie(/更新:(.*?)\n/,l);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let o=e('[class="article-related download_url"]'),u=[],c=[];for(let f=0;f<o.length;f++){let d=o[f],h=e(e(d).find("h2")).text().replaceAll(n.vod_name,"");u.push(h.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let m=[];for(let x of e(o[f]).find("a")){let b=e(x).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),_=x.attribs.href;m.push(b+"$"+_)}c.push(m.join("#"))}return n.vod_play_from=u.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],r=tt(e.ajaxtxt),i=r(r("ul")).find("li");for(let s of i){let l=new Pe;l.vod_pic=r(s).find("img")[0].attribs["data-original"],l.vod_name=Ie(/《(.*?)》/,r(s).find("img")[0].attribs.alt),l.vod_id=r(s).find("a")[0].attribs.href,l.vod_remarks="\u8BC4\u5206:"+r(r(s).find('[class="rate badge"]')).text(),n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[id="list_all"]').find("ul")).find("li");for(let i of r){let s=new Pe;s.vod_id=e(i).find("a")[0].attribs.href,s.vod_name=Ie(/《(.*?)》/,e(e(e(i).find('[class="text_info"]')).find("a")[0]).text()),s.vod_pic=e(i).find("img")[0].attribs["data-original"],s.vod_remarks=e(e(i).find('[class="update_time"]')).text(),n.push(s)}return n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);return this.vodDetail=await this.parseVodDetailFromDoc(n),this.vodDetail}async setCategory(e,n,r,i){let s=this.siteUrl+`/list/${e}-${n}.html`,l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setSearch(e,n){let r=this.siteUrl+"/search/",i={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},s=await this.post(r,i,this.getSearchHeader()),l=tt(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},Rn=new fT;var pT=class extends $e{constructor(){super()}getName(){return Rn.getName()}getAppName(){return Rn.getAppName()}getJSName(){return Rn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Rn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Rn.initCookie(e.server.config.bilicookie),await Rn.spiderInit(e),Rn.cfgObj.code=0,Rn.catOpenStatus=!0,Rn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Rn.setClasses(),this.classes=Rn.classes}async setFilterObj(){await Rn.setFilterObj(),this.filterObj=Rn.filterObj}async setHomeVod(){await Rn.setHomeVod(),this.homeVodList=Rn.homeVodList}async setCategory(e,n,r,i){await Rn.setCategory(e,n,r,i),this.vodList=Rn.vodList}async setDetail(e){await Rn.setDetail(e),this.vodDetail=Rn.vodDetail}async setPlay(e,n,r){await Rn.setPlay(e,n,r),this.playUrl=Rn.playUrl,this.result=Rn.result}async setSearch(e,n){await Rn.setSearch(e,n),this.vodList=Rn.vodList}async setProxy(e,n){return await Rn.proxy(e,n)}},Go=new pT;async function ZY(t,e){return await Go.init(t,e)}async function eQ(t,e){return await Go.home(t,e)}async function aIe(t,e){return await Go.homeVod(t,e)}async function tQ(t,e){return await Go.category(t,e)}async function nQ(t,e){return await Go.detail(t,e)}async function rQ(t,e){return await Go.play(t,e)}async function iQ(t,e){return await Go.search(t,e)}async function oIe(t,e){return await Go.proxy(t,e)}var sQ={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",ZY),t.post("/home",eQ),t.post("/category",tQ),t.post("/detail",nQ),t.post("/play",rQ),t.post("/search",iQ),t.get("/proxy/:what/:ids/:end",oIe)},spider:{init:ZY,home:eQ,homeVod:aIe,category:tQ,det
`);r.vod_name=i[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let s=new Date(n.time);r.vod_remarks=s.toLocaleDateString().replace(/\//g,"-")+" "+s.toTimeString().substr(0,8),r.vod_pic=n.image;let l="";for(let a of i)a.indexOf("\u63CF\u8FF0")>-1&&(r.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(r.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(l=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await Ls([l]);r.vod_play_url=a.vod_play_url,r.vod_play_from=a.vod_play_from}catch(a){await this.jadeLog.error(`\u83B7\u53D6\u963F\u91CC\u89C6\u9891\u64AD\u653E\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}return r}async parseVodShortListFromDocBySearch(e,n){let r=[],i=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,s=this.siteUrl+"_next/data/"+i+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",l=await this.fetch(s,null,this.getSearchHeader());if(Q.isEmpty(l))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(l).pageProps.data.data;for(let o of a){let u=new Pe;u.vod_id=JSON.stringify(o);let c=o.content.split(`
`);u.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(o.time);u.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),u.vod_pic=o.image,r.push(u)}return r}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let r=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await Fs(e,n,r)}},Dn=new mT;var yT=class extends $e{constructor(){super()}getName(){return Dn.getName()}getAppName(){return Dn.getAppName()}getJSName(){return Dn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Dn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Dn.initCookie(e.server.config.bilicookie),await Dn.spiderInit(e),Dn.cfgObj.code=0,Dn.catOpenStatus=!0,Dn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Dn.setClasses(),this.classes=Dn.classes}async setFilterObj(){await Dn.setFilterObj(),this.filterObj=Dn.filterObj}async setHomeVod(){await Dn.setHomeVod(),this.homeVodList=Dn.homeVodList}async setCategory(e,n,r,i){await Dn.setCategory(e,n,r,i),this.vodList=Dn.vodList}async setDetail(e){await Dn.setDetail(e),this.vodDetail=Dn.vodDetail}async setPlay(e,n,r){await Dn.setPlay(e,n,r),this.playUrl=Dn.playUrl,this.result=Dn.result}async setSearch(e,n){await Dn.setSearch(e,n),this.vodList=Dn.vodList}async setProxy(e,n){return await Dn.proxy(e,n)}},Jo=new yT;async function hQ(t,e){return await Jo.init(t,e)}async function dQ(t,e){return await Jo.home(t,e)}async function fIe(t,e){return await Jo.homeVod(t,e)}async function mQ(t,e){return await Jo.category(t,e)}async function yQ(t,e){return await Jo.detail(t,e)}async function gQ(t,e){return await Jo.play(t,e)}async function vQ(t,e){return await Jo.search(t,e)}async function pIe(t,e){return await Jo.proxy(t,e)}var _Q={meta:{key:Dn.getJSName(),name:Dn.getName(),type:Dn.getType()},api:async t=>{t.post("/init",hQ),t.post("/home",dQ),t.post("/category",mQ),t.post("/detail",yQ),t.post("/play",gQ),t.post("/search",vQ),t.get("/proxy/:what/:ids/:end",pIe)},spider:{init:hQ,home:dQ,homeVod:fIe,category:mQ,detail:yQ,play:gQ,search:vQ}};var gT=class extends Ge{constructor(){super(),this.siteUrl="https://www.dygangs.xyz"}getAppName(){return"\u7535\u5F71\u6E2F"}getName(){return"\u{1F3D6}\uFE0F\u2503\u7535\u5F71\u6E2F\u2503\u{1F3D6}\uFE0F"}getJSName(){return"dygangs"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e(e('[class="top-nav"]')[0]).find("a");for(let r of n){let i=r.attribs.href.replaceAll(this.siteUrl,""),s=e(r).text();i!=="/"&&this.classes.push(this.getTypeDic(s,i))}}async getFilter(e,n){let r=e('[class="nav-down-2 clearfix"]')[n],i=[];if(r!==void 0){let s="\u6309\u7C7B\u578B",l={key:s,name:s,value:[]};l.name=s,l.value.push({n:"\u5168\u90E8",v:"0"});for(let a of e(r).find("a")){let o=e(a).html(),u=a.attribs.href.split("/").slice(-2)[0];l.value.push({n:o,v:u})}i.push(l)}return i}async setFilterObj(){let e=0;for(let n of this.classes.slice(1,5)){let r=n.type_id;if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i=this.siteUrl+`${r}`,s=await this.getHtml(i);this.filterObj[r]=await this.getFilter(s,e)}e=e+1}}parseVodShortFromElement(e,n){let r=new Pe;return r.vod_id=n.attribs.href,r.vod_name=n.attribs.title,r.vod_pic=e(n).find("img")[0].attribs["data-original"],r.vod_remarks=e(e(n).find("i")[0]).text().replaceAll(" ","").replaceAll(`
`,""),Q.isEmpty(r.vod_pic)&&(r.vod_pic=Eo+"/resources/dygang.jpg"),r}async parseVodShortListFromDoc(e){let n=[],r=e('[class="index-tj-l"]').find("li");for(let i of r){let s=e(i).find("a")[0],l=this.parseVodShortFromElement(e,s);n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="index-area clearfix"]').find("li");for(let i of r){let s=e(i).find("a")[0],l=this.parseVodShortFromElement(e,s);n.push(l)}return n}async parseVodDetailFromDoc(e){let n=new Ye,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Ie(/◎片  名 (.*?)<br>/,e(r).html()),n.vod_area=Ie(/◎产  地 (.*?)<br>/,e(r).html()),n.vod_year=Ie(/◎年  代 (.*?)<br>/,e(r).html()),n.type_name=Ie(/◎类  别 (.*?)<br>/,e(r).html()),n.vod_remarks=Ie(/◎集  数 (.*?)<br>/,e(r).html());let i=Ie(/◎主  演 (.*?)<\/p>/s,e(r).html());Q.isEmpty(i)&&(i=Ie(/◎演  员 (.*?)<\/p>/s,e(r).html()));let s=[];for(let f of i.split(`
`))s.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=s.join("/"),n.vod_director=Ie(/◎导  演 (.*?)<br>/,e(r).html()),n.vod_content=Ie(/◎简  介<\/p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
2024-04-09 09:34:47 +08:00
`,""),Q.isEmpty(n.vod_content)&&(n.vod_content=Ie(/◎简  介<br>(.*?)<\/p>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
2024-04-12 14:29:25 +08:00
`,""));let l=[],a=[],o=e('[class="playfrom tab8 clearfix"]'),u=e('[class="videourl clearfix"]');for(let f=0;f<o.length;f++){let d=o[f],h=e(e(d).find("li")).html();l.push(h.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let m=[];for(let x of e(u[f]).find("a")){let b=x.attribs.title,_=x.attribs.href;m.push(b+"$"+_)}a.push(m.join("#"))}let c=e(e(r).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();l.push(Ie(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let d=[];for(let h of e(e(e(r).find("tbody")).find("tr")).find("a")){let m=e(h).html().replaceAll(".mp4",""),x=h.attribs.href;d.push(m+"$"+x)}a.push(d.join("#"))}return n.vod_play_from=l.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=this.siteUrl+e;i.\u6309\u7C7B\u578B!==void 0&&i.\u6309\u7C7B\u578B!=="0"&&(s=s+`${i.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(s=s+`index_${n}.html`);let l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},s=await this.post(r,i,this.getHeader()),l=tt(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),s=Ie(/url: '(.*?)',/,i.html());if(Q.isEmpty(s)){let l=i(i('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(l,null,{"User-Agent":Wi});if(this.playUrl=Ie(/url: '(.*?)',/,a),Q.isEmpty(this.playUrl)){let o=Yz(l);this.playUrl=o+Ie(/var main = "(.*?)";/,a)}}else this.playUrl=s}else this.playUrl=n}},Pn=new gT;var vT=class extends $e{constructor(){super()}getName(){return Pn.getName()}getAppName(){return Pn.getAppName()}getJSName(){return Pn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Pn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Pn.initCookie(e.server.config.bilicookie),await Pn.spiderInit(e),Pn.cfgObj.code=0,Pn.catOpenStatus=!0,Pn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Pn.setClasses(),this.classes=Pn.classes}async setFilterObj(){await Pn.setFilterObj(),this.filterObj=Pn.filterObj}async setHomeVod(){await Pn.setHomeVod(),this.homeVodList=Pn.homeVodList}async setCategory(e,n,r,i){await Pn.setCategory(e,n,r,i),this.vodList=Pn.vodList}async setDetail(e){await Pn.setDetail(e),this.vodDetail=Pn.vodDetail}async setPlay(e,n,r){await Pn.setPlay(e,n,r),this.playUrl=Pn.playUrl,this.result=Pn.result}async setSearch(e,n){await Pn.setSearch(e,n),this.vodList=Pn.vodList}async setProxy(e,n){return await Pn.proxy(e,n)}},Wo=new vT;async function EQ(t,e){return await Wo.init(t,e)}async function xQ(t,e){return await Wo.home(t,e)}async function hIe(t,e){return await Wo.homeVod(t,e)}async function bQ(t,e){return await Wo.category(t,e)}async function wQ(t,e){return await Wo.detail(t,e)}async function SQ(t,e){return await Wo.play(t,e)}async function TQ(t,e){return await Wo.search(t,e)}async function dIe(t,e){return await Wo.proxy(t,e)}var AQ={meta:{key:Pn.getJSName(),name:Pn.getName(),type:Pn.getType()},api:async t=>{t.post("/init",EQ),t.post("/home",xQ),t.post("/category",bQ),t.post("/detail",wQ),t.post("/play",SQ),t.post("/search",TQ),t.get("/proxy/:what/:ids/:end",dIe)},spider:{init:EQ,home:xQ,homeVod:hIe,category:bQ,detail:wQ,play:SQ,search:TQ}};var k6="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function c4(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Xo(t,e,n){var r="";let i=e===void 0?!0:e;for(var s=0;s<t;s++){let l=n?c4(k6.length-10,k6.length-1):c4(0,i?k6.length-1:k6.length-11);r+=k6[l]}return r}function _T(){return Xo(8).toLowerCase()+"-"+Xo(4).toLowerCase()+"-"+X
2024-04-02 15:03:09 +08:00
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7QHUVAUM7yghB0/3qz5C
bWX5YYD0ss+uDtbDz5VkTclop6YnCY+1U4aw4z134ljkp/jL0mWnYioZHTTqxXMf
R5q15FcMZnnn/gMZNj1ZR67/c9ti6WTG0VEr9IdcJgwHwwGak/xQK1Z9htl7TR3Q
WA45MmpCSSgjVvX4bbV43IjdjSZNm8s5efdlLl1Z+7uJTR024xizhK5NH0/uPmR4
O8QEtxO9ha3LMmTYTfERzfNmpfDVdV3Rok4eoTzhHmxgqQ0/S0S+FgjHiwrCTFlv
NCiDhSemnJT+NIzAnMQX4acL5AYNb5PiDD06ZMrtklTua+USY0gSIrG9LctaYvHR
swIDAQAB
2024-04-12 14:29:25 +08:00
-----END PUBLIC KEY-----`,"pkcs8-public-pem",{encryptionScheme:"pkcs1"}),FT=class extends $e{constructor(){super(),this.siteUrl="https://api.tyun77.cn"}getName(){return"\u{1F452}|\u9177\u4E9177|\u{1F452}"}getAppName(){return"\u9177\u4E9177"}getJSName(){return"kunyu77"}async request(e,n){let r=(0,gd.default)().unix()-Kee,i=new URL(e);i.searchParams.append("pcode","010110010"),i.searchParams.append("version",Jee),i.searchParams.append("devid",es.id),i.searchParams.append("package","com.sevenVideo.app.android"),i.searchParams.append("sys","android"),i.searchParams.append("sysver",es.release),i.searchParams.append("brand",es.brand),i.searchParams.append("state","on"),i.searchParams.append("model",es.model.replaceAll(" ","_")),i.searchParams.append("sj",r);let s=[];for(let d of i.searchParams.keys())s.push(d);s.sort();let l=i.pathname;for(let d of s){let h=i.searchParams.get(d);h=encodeURIComponent(h),l+=h}l+=r,l+="XSpeUFjJ";let a=Ku.default.enc.Hex.stringify(Ku.default.MD5(l)).toString().toLowerCase(),o={"User-Agent":n||"okhttp/3.12.0",T:r,TK:a};e.indexOf("getVideoPlayAuth")>0?o["TK-VToken"]=Wee.encrypt(`{"videoId":"${i.searchParams.get("videoId")}","timestamp":"${r}"}`,"base64"):e.indexOf("parserUrl")>0&&(o["TK-VToken"]=Wee.encrypt(`{"url":"${i.searchParams.get("url")}","timestamp":"${r}"}`,"base64"));let u=await req(i.toString(),{headers:o}),c=u.headers.date,f=(0,gd.default)(c).unix();return Kee=(0,gd.default)().unix()-f,JSON.parse(u.content)}async init(e,n){let r=e.server.prefix+"/device";es=await e.server.db.getObjectDefault(r,{}),es.id||(es=NQ(32),es.id=es.id.toLowerCase(),es.ua="Dalvik/2.1.0 (Linux; U; Android "+es.release+"; "+es.model+" Build/"+es.buildId+")",await e.server.db.push(r,es)),await this.request(this.siteUrl+"/api.php/provide/getDomain"),await this.request(this.siteUrl+"/api.php/provide/config"),await this.request(this.siteUrl+"/api.php/provide/checkUpgrade"),await this.request(this.siteUrl+"/api.php/provide/channel"),await super.init(e,n)}async setClasses(){let e=(await this.request(this.siteUrl+"/api.php/provide/filter")).data;for(let n in e)this.classes.push(this.getTypeDic(e[n][0].cat,n))}async getFilter(){let e=[],n=(await this.request(this.siteUrl+"/api.php/provide/searchFilter?type_id=0&pagenum=1&pagesize=24")).data.conditions,r={key:"year",name:"\u5E74\u4EFD",init:""},i=[];i.push({n:"\u5168\u90E8",v:""}),n.y.forEach(u=>{i.push({n:u.name,v:u.value})}),r.value=i;let s={key:"area",name:"\u5730\u533A",init:""},l=[];l.push({n:"\u5168\u90E8",v:""}),n.a.forEach(u=>{l.push({n:u.name,v:u.value})}),s.value=l;let a={key:"category",name:"\u7C7B\u578B",init:""},o=[];return o.push({n:"\u5168\u90E8",v:""}),n.scat.forEach(u=>{o.push({n:u.name,v:u.value})}),a.value=o,e.push(r,s,a),e}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter())}}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Pe;i.vod_id=r.id,i.vod_name=r.title??r.videoName,i.vod_pic=r.videoCover,i.vod_remarks=r.msg,n.push(i)}return n}async parseVodDetailfromJson(e){let n=new Ye;n.vod_id=e.id,n.vod_name=e.videoName,n.vod_pic=e.videoCover,n.type_name=e.subCategory,n.vod_year=e.year,n.vod_area=e.area,n.vod_remarks=e.msg,n.vod_actor=e.actor,n.vod_director=e.director,n.vod_content=e.brief.trim();let r=(await this.request(this.siteUrl+"/api.php/provide/videoPlaylist?ids="+e.id)).data.episodes,i={};for(let a of r){let o=a.playurls;for(let u of o){let c=u.playfrom,f=IQ(n.vod_name,u.title);f.length===0&&(f=u.title.trim()),i.hasOwnProperty(c)||(i[c]=[]),i[c].push(f+"$"+u.playurl)}}n.vod_play_from=Object.keys(i).join("$$$");let s=Object.values(i),l=[];for(let a of s)l.push(a.join("#"));return n.vod_play_url=l.join("$$$"),n}async setHomeVod(){let e=(await this.request(this.siteUrl+"/api.php/provide/homeBlock?type_id=0pagenum=20")).data;this.homeVodList=await this.parseVodShortListFromJson(e.blocks)}async setCategory(e,n,r,i){let s=this.siteUrl+"/api.php/provide/searchFilter?type_id="+e+"&pagenum="+n+"&pagesize=24&";s+=`year=${i.year||""}&category=${i.category||
`,"").replaceAll(" ",""),r.push(l)}return r}async parseVodDetailFromDoc(e){let n=e("#post_content"),r=[],i=[];if(!this.catOpenStatus){let o=0,u="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),d=[];for(let h of f){let m=h.attribs.href,x=h.children[0].data;m.toLowerCase().startsWith("magnet")&&d.push(x+"$"+m)}d.length>0&&(o++,r.push(u+o),i.push(d.join("#")))}}let s=e(e(".mainleft")).find('[class="widget box row"]');for(let o of s){let u=e(o).find("h3").text(),c=[];if(!Q.isEmpty(u)){let f=e(o).find("a");for(let d of f)c.push(d.attribs.title+"$"+d.attribs.href);r.push(u),i.push(c.join("#"))}}let l=e(".context").html(),a=new Ye;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Ie(/◎类  别 (.*?)<br>/,l),Q.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Ie(/◎年  代 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_year=Ie(/首播:(.*?)<br>"/,l)),a.vod_area=Ie(/◎产  地 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_area=Ie(/地区:(.*?)<br>"/,l)),a.vod_remarks=Ie(/◎上映日期 (.*?)<br>/,l),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,l),Q.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,l)),Q.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,l)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,l),Q.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,l)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,l),Q.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,l)),Q.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,l)),a.vod_play_from=r.join("$$$"),a.vod_play_url=i.join("$$$"),a}async parseVodPlayFromDoc(e,n){let r="",i=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":r=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let s=/url: '(.*?)',/gs.exec(i);s.length>1&&(r=s[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let l=/source: "(.*?)",/gs.exec(i);l.length>1&&(r=l[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e),r=n("#menus > li > a");for(let i=0;i<r.length;i++){let s=r[i];if(i<2||i===r.length-1)continue;let l=s.children[0].data,a=s.attribs.href;if(this.classes.push({type_name:l,type_id:a}),l==="\u7535\u89C6\u5267"){let o=[{n:"\u4E0D\u9650",v:""}];for(let u of n(s.next).find("a"))o.push({n:u.children[0].data,v:u.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:o}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(Q.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=i.cateId??"",l=this.siteUrl+e+s;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(l+="index_"+n+".html");let a=await this.fetch(l,null,this.getHeader());if(!Q.isEmpty(a)){let o=tt(a),u=o(".pagination > a");if(u.length>0){let c=u.slice(-1)[0].attribs.href,d=/index_(.*?).html/.exec(c);this.count=parseInt(d[1]);let h=o("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+h.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(o)}}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},s=await this.post(r,i,this.getHeader());if(!Q.isEmpty(s)){let l=tt(s);this.vodList=await this.parseVodShortListFromDoc(l)}}async setDetail(e){let n=this.site
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let o=a.split("\u65F6\u95F4"),u=new Pe;u.vod_name=o[0],u.vod_remarks=o[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),u.vod_id=JSON.stringify({name:u.vod_name,remarks:u.vod_remarks,id:s}),r.push(u)}}}return r}async setClasses(){await this.parseClassFromDoc(this.content_html)}async setHomeVod(){let e=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.homeVodList=await this.parseVodShortListFromDoc(e[0])}async setDetail(e){if(e.indexOf("search")>-1){let n=this.siteUrl+"/search",r={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},i=await this.fetch(n,r,this.getHeader());if(!Q.isEmpty(i)){let s=tt(i),l=await this.parseVodShortListFromDocBySearch(s);l.length>0?e=l[0].vod_id:e=""}}if(!Q.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,r,i){let s=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(s[parseInt(e)])}async setSearch(e,n){let r=this.siteUrl+"/search",i={k:e},s=await this.fetch(r,i,this.getHeader());if(!Q.isEmpty(s)){let l=tt(s);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}async setPlay(e,n,r){let i=await Fs(e,n,r);this.playUrl=JSON.parse(i).url}},Mn=new VT;var zT=class extends $e{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,r,i){await Mn.setCategory(e,n,r,i),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,r){await Mn.setPlay(e,n,r),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n){await Mn.setSearch(e,n),this.vodList=Mn.vodList}async setProxy(e,n){return await Mn.proxy(e,n)}},l3=new zT;async function Ate(t,e){return await l3.init(t,e)}async function Cte(t,e){return await l3.home(t,e)}async function Rke(t,e){return await l3.homeVod(t,e)}async function Ote(t,e){return await l3.category(t,e)}async function Nte(t,e){return await l3.detail(t,e)}async function Ite(t,e){return await l3.play(t,e)}async function Rte(t,e){return await l3.search(t,e)}async function kke(t,e){return await l3.proxy(t,e)}var kte={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",Ate),t.post("/home",Cte),t.post("/category",Ote),t.post("/detail",Nte),t.post("/play",Ite),t.post("/search",Rte),t.get("/proxy/:what/:ids/:end",kke)},spider:{init:Ate,home:Cte,homeVod:Rke,category:Ote,detail:Nte,play:Ite,search:Rte}};function Dke(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8":t==="jy"?"\u7CBE\u82F1":t}var GT=class extends Ge{constructor(){super(),this.siteUrl="http://cqdb6.com"}getName(){return"\u{1F4FA}\u250370\u770B\u770B\u2503\u{1F4FA}"}getAppName(){return"70\u770B\u770B"}getJSName(){return"kankan70"}getType(){return 3}paraseUrlObject(e){let n=e.split(";"),r={},i="",s=0,l=0,a="";for(
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Pe;i.vod_id=r.url,i.vod_pic=r.thumb,i.vod_remarks=r.time,i.vod_name=r.title,n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e),r=n("[class=index-list-l]");for(let i of r){let s=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),l=s[0].attribs.href,a=n(s[1]).text();Q.isEmpty(a)||this.classes.push({type_id:l,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!Q.isEmpty(r)){let s=tt(r),l=s('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of l){let u=s(s(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=s(o).find("a"),d=0;u==="\u5267\u60C5"?d=3:u==="\u5E74\u4EE3"?d=2:u==="\u5730\u533A"&&(d=4);for(let h of f){let m=h.attribs.href.split("/");c.value.push({n:s(h).text(),v:m[d]})}i.push(c),a=a+1}}return i}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=this.siteUrl+e,l=await this.fetch(s,null,this.getHeader());if(!Q.isEmpty(l)){let a=e.split("/")[1],o=e.split("/")[2],u=Ie(/var _yu_gda_s="(.*?)";/,l),c={action:a,page:parseInt(n),year:i[2]??"0",area:i[3]??"all",class:i[1]??"0",dect:"",id:o},f=await this.fetch(u,c,this.getHeader());if(f!==null){let d=tt(f);this.vodList=await this.parseVodShortListFromDoc(d)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let l="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(r)[1],a=await this.fetch(l,null,this.getHeader());if(!Q.isEmpty(a)){let o=this.paraseUrlObject(a);this.vodDetail.vod_play_url=o.play_url,this.vodDetail.vod_play_from=o.play_format}}}async setSearch(e,n){let r=this.siteUrl+"/search.php",i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s={top:10,q:e},l=Ie(/var my_search='(.*?)';/,i),a=await this.fetch(l,s,this.getHeader());if(!Q.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},Un=new GT;var KT=class extends $e{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,r,i){await Un.setCategory(e,n,r,i),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,r){await Un.setPlay(e,n,r),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n){await Un.setSearch(e,n),this.vodList=Un.vodList}async setProxy(e,n){return await Un.proxy(e,n)}},a3=new KT;async function Dte(t,e){return await a3.init(t,e)}async function Pte(t,e){return await a3.home(t,e)}async function Pke(t,e){return await a3.homeVod(t,e)}async function Lte(t,e){return await a3.category(t,e)}async function Fte(t,e){return await a3.detail(t,e)}async function Bte(t,e){return await a3.play(t,e)}async function Mte(t,e){return await a3.sea
2024-04-09 09:34:47 +08:00
"type": "{{tid}}",
"p": "{{pg}}",
"area": "{{ext.area|default(0)}}",
"year": "{{ext.year|default(0)}}",
"sort": "{{ext.sort|default(0)}}",
2024-04-12 14:29:25 +08:00
"class": "{{ext.class|default(0)}}"}`,{ext:i,tid:e,pg:n}));console.log(l);let a=await this.request(s,l);this.vodList=await this.parseVodShortListFromJson(a.data.data)}async setDetail(e){let n=await this.request(this.siteUrl+"/api.php/Video/getVideoInfo",{video_id:e});this.vodDetail=await this.parseVodDetailfromJson(n.data.video)}async setPlay(e,n,r){this.result.jx=0;try{if(n.indexOf("youku")>=0||n.indexOf("iqiyi")>=0||n.indexOf("v.qq.com")>=0||n.indexOf("pptv")>=0||n.indexOf("le.com")>=0||n.indexOf("1905.com")>=0||n.indexOf("mgtv")>=0){if(this.parse.length>0)for(let i=0;i<this.parse.length;i++)try{let s=this.parse[i],l=await req(s+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(l)}`);let a=jte(n,JSON.parse(l.content).data);a.url&&(this.playUrl=a.url,this.danmuUrl=await this.danmuSpider.getVideoUrl(n,0),this.result.jx=1)}catch{}}else if(n.indexOf("jqq-")>=0){let i=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),s=n.split("-"),l=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+s[1]+"&episodeSid="+s[2]+"&quality=LD",{headers:i}),a=JSON.parse(l.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let i=await this.request(this.siteUrl+"/video.php",{url:n}),s=jte(n,i.data);s.url&&(s.url.indexOf("filename=1.mp4")>-1?this.playUrl=s.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+ai(s.url),{}))}}catch(i){await this.jadeLog.error(i)}}async setSearch(e,n){let r=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(r.data.data)}async proxy(e,n){let r=e[0],i=Xi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let s=await req(i,{}),l=s.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(l.length),l=l.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(l.length),l=l.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,d){let h=(f.startsWith("http")?"":o)+f;return c+h+d}),l=l.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let d=(f.startsWith("http")?"":o)+f;return c+a+Xi(d)}),l=l.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let d=(f.startsWith("http")?"":o)+f;return c+d}),JSON.stringify({code:s.code,content:l,headers:s.headers})}return JSON.stringify({code:500,content:""})}},jn=new WT;var XT=class extends $e{constructor(){super()}getName(){return jn.getName()}getAppName(){return jn.getAppName()}getJSName(){return jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await jn.initCookie(e.server.config.bilicookie),await jn.spiderInit(e),jn.cfgObj.code=0,jn.catOpenStatus=!0,jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await jn.setClasses(),this.classes=jn.classes}async setFilterObj(){await jn.setFilterObj(),this.filterObj=jn.filterObj}async setHomeVod(){await jn.setHomeVod(),this.homeVodList=jn.homeVodList}async setCategory(e,n,r,i){await jn.setCategory(e,n,r,i),this.vodList=jn.vodList}async setDetail(e){await jn.setDetail(e),this.vodDetail=jn.vodDetail}async setPlay(e,n,r){await jn.setPlay(e,n,r),this.playUrl=jn.playUrl,this.result=jn.result}async setSearch(e,n){await jn.setSearch(e,n),this.vodList=jn.vodList}async setProxy(e,n){return await jn.proxy(e,n)}},o3=new XT;async function $te(t,e){return await o3.init(t,e)}async function Hte(t,e){return await o3.home(t,e)}async function Mke(t,e){return await o3.homeVod(t,e)}async function qte(t,e){return await o3.category(t,e)}async function Vte(t,e){return await o3.detail(t,e)}async function zte(t,e){return await o3.play(t,e)}async
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=Ie(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf("\u5907\u6CE8")>-1){let c=Ie(/备注:(.*?)end/,u);e.vod_remarks=Ie(/备注:\/(.*?)end/,u)}u.indexOf("\u6807\u7B7E")>-1&&(e.type_name=Ie(/标签:(.*?)end/,u)),u.indexOf("\u5267\u60C5")>-1&&(e.vod_content=Ie(/剧情:(.*?)end/,u))}let i=t('[class="module-tab-item tab-item"]'),s=t('[class="scroll-content"]'),l=[],a=[];for(let o=0;o<i.length;o++){let u=i[o];l.push(u.attribs["data-dropdown-value"]);let c=[];for(let f of t(s[o]).find("a")){let d=t(f).text(),h=f.attribs.href;c.push(d+"$"+h)}a.push(c.join("#"))}return e.vod_play_from=l.join("$$$"),e.vod_play_url=a.join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}getExtendValue(t,e){return t[e]===void 0||t[e]==="0"?"":t[e]}async setCategory(t,e,n,r){await this.jadeLog.debug(`extend:${JSON.stringify(r)}`);let i=this.getExtendValue(r,"1"),s=this.getExtendValue(r,"2"),l=this.getExtendValue(r,"3"),a=this.getExtendValue(r,"4"),o=[t.toString(),"",a,i,"",l,"","",e.toString(),"","",s],u=this.siteUrl+"/show/"+o.join("-")+".html",c=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDocByCategory(c)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}async setSearch(t,e){let n=this.siteUrl+`/search/${t}-------------.html`,r=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(r)}async setPlay(t,e,n){let r=await this.getHtml(this.siteUrl+e),s="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(Ie(/var player_aaaa=(.*?)<\/script>/,r.html())).url,l=await await this.fetch(s,null,this.getHeader()),a=l.match(/"url": getVideoInfo\("(.*?)"\),/)[1],o=l.match(/<script>var bt_token = "(.*?)"/)[1],u=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());u=u.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],u=this.decrypt_token_key(u),this.playUrl=await this.getVideoInfo(a,u,o)}decrypt_token_key(toekn_key){var _0xod4="jsjiami.com.v6",_0x175e=[_0xod4,"JMOsw6omwoDCmw==","wp3DkSx5Eg==","HB7CscOJfS3DuUjDv2bDjsOmwr3Cm8KcwoI=","fR/Dqg==","ShRGTcKa","w5Y8VBs=","esKYKQ==","FgIdwrPDnMKOw7k=","HhXCmA==","woNrRsKSwpnDvcKfw4g=","ezBn","w43DkcK5w4MaJiE=","w44Ob8KjwrjCrMKtUA==","HwtswqI=","YsKnwrRawro=","Sm/CpQXCjz4RH8ORSXw=","IsO6w64=","T8OeAQ==","VcK4Hg==","csOmfBJ4","d8OAcA5L","Tn4RL2s=","w7goGizCmw==","w6XDlcOGwpoY","TsK7wpNPwrg=","w7J1CzLCnsO+HA==","w4XDkcK0w5YXPg==","S8KoCcKS","PcKWHcK/Eg==","Z2oMJ3rCiw==","YsKMG8KMwo0=","QsOecgRIwp4=","dFzDkUUxw48Qw7nCmX3CicODCMKnw74IOg==","acO2KU1B","wrAnw6DDrg==","w5MsScKwwoA=","wohZG8KhBg==","b8OieSpZ","w4ZmEsORw6I=","w7jDhxvCh8KY","w7wQa8KFwr0=","IMObw4E3wqU=","JsOjw5Erwrg=","w6MwcsKOwqU=","b8KIwqF0wrs=","XhXDvT52","wrDCmirChSE=","w5t1wpvDuwE=","XA7CtsKeEA==","wonCvVthw78=","U8KPP8KMwq4=","wp7DhCxjGTU=","woPDoBdiEQ==","HjzCrE/Dvg==","SsOQOWHCgg==","w6NdwoXCkMOx","w6shYWQ/","eE/Cgg==","XW/Csj7CmDoA","w680OynCgcK5BA8=","w4PDoMOTwrog","w5R7wqbCpMOPwrMxUcOiM8OuMVLCisKKFsOXAcOWY8O6w5hM","WwjDoht0","PzXCiHHDiA==","QMOFaMKcfQ==","bz9bVsK+","w7Npwp/DsB9ONw==","EcOPBQ3Cig==","woHDnzk=","DsKQLxtd","R8OCJmk=","wp55O8On","bkXCmhTCqg==","w7vDgx3Cg8KU","w6nDo8KdAn8=","O8KwP8KEDw==","wqzCtCHCtCg=","w5nDgmYhw5c=","wp0OZsK+w4A=","wrFxe8KFwp/DvcKew4EbN8K7BMORMx3DuxtOVELChsOEIQ==","BMKWRDc=","IS5dw6nDhQ==","w6geeG8t","SsK/wohywpc=","LBlnw7jDkA==","wodiLsOg","Ig5Ow7/Dlw==","TMOOewRZwoQ=","LjnClV7DvA==","woZsO8KcPQ==","eWvClMKeKQ==","wq1KWsKswr8=","w4p+AGFa","C8O7F8K2CQcKFxxgwo5sfh3DpAFV","w6XDqMKoCw==","w6Z8wqnCpMOe","w6x/CHRhXhV/w7I=","wrvClndGw5Y=","VsKcwo5RwoA=","ZcK2BMKmLQ==","BCcPwofDvQ==","eGEsF20=","eMOcUglq","w4U9XEAMw4/Dm3rCuzpxTg/DvyDDvMONH8OTwpTCtsKbw6k=","VwXDkTxG","CzHCrl3DkQ==","w7PDkVovw4o=","dsONYDdj","w79pwr3Duh4=","w55kwoLCpMOR","w6gbc8KGwpw=","bCnCtMKCCg==","Php5w64=","w7x8wpfDtiQ=","w4TDk2AB","w7lowoHDtgQ=","DB/CsnjDuQ==","woTDl8K3wp4S","wr0Ewq7Dq8Oh","GmHCpGxN","w5/Dm2XDpw==","w5bDps
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:s,type_name:l};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[];for(let i=0;i<n.length;i++){let s={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){s.name=e(e(n[i]).find("a")[0]).text(),s.value.push({n:"\u5168\u90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))s.value.push({n:e(l).text(),v:e(l).text()});r.push(s)}else s.name=e(e(n[i]).find("a")[0]).text(),s.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(s)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=tt(i);this.filterObj[n]=await this.getFilter(s)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!Q.isEmpty(e)){let n=tt(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let s=[e.toString(),"","","","","","","",n.toString(),"","",""],l=this.get_extend_sort_dic(parseInt(e));for(let u of Object.keys(l))i[u]==="0"?s[l[u]]="":s[l[u]]=i[u];let a=this.siteUrl+"/index.php/vodshow/"+s.join("-")+".html",o=await this.fetch(a,null,this.getHeader());if(!Q.isEmpty(o)){let u=tt(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Ie(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,o);this.limit=72,c.length>0&&(this.total=parseInt(c)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!Q.isEmpty(r)){let i=tt(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await Fs(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,i=await this.fetch(r,null,this.getHeader());if(!Q.isEmpty(i)){let s=tt(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},qn=new rA;var iA=class extends $e{constructor(){super()}getName(){return qn.getName()}getAppName(){return qn.getAppName()}getJSName(){return qn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await qn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await qn.initCookie(e.server.config.bilicookie),await qn.spiderInit(e),qn.cfgObj.code=0,qn.catOpenStatus=!0,qn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await qn.setClasses(),this.classes=qn.classes}async setFilterObj(){await qn.setFilterObj(),this.filterObj=qn.filterObj}async setHomeVod(){await qn.setHomeVod(),this.homeVodList=qn.homeVodList}async setCategory(e,n,r,i){await qn.setCategory(e,n,r,i),this.vodList=qn.vodList}async setDetail(e){await qn.setDetail(e),this.vodDetail=qn.vodDetail}async setPlay(e,n,r){await qn.setPlay(e,n,r),this.playUrl=qn.playUrl,this.result=qn.result}async setSearch(e,n){await qn.setSearch(e,n),this.vodList=qn.vodList}async setProxy(e,n){return await qn.proxy(e,n)}},p3=new iA;async function mne(t,e){return await p3.init(t,e)}async function yne(t,e){return await p3.home(t,e)}async function eDe(t,e){return await p3.homeVod(t,e)}async function gne(t,e){return await p3.category(t,e)}async function vne(t,e){return await p3.detail(t,e)}async function _ne(t,e){return await p3.play(t,e)}async function Ene(t,e){return await p3.search(t,e)}async function tDe(t,e){return await p3.proxy(t,e)}var xne={meta:{key:qn.getJSName(),name:qn.getName(),type:qn.getType()},api:async t=>{t.post("/init",mne),t.post("/home",yne),t.post("/category",gne),t.post("/detail",vne),t.post("/play",_ne),t.post("/search",Ene),t.get("/proxy/:what/:ids/:end",tDe)},spider:{init:mne,home:yne,homeVod:eDe,category:gne,detail:vne,play:_ne,search:Ene}};function Ed(t,e){let n=xd();return Ed=function(r,i){return r=r-424,n[r]},Ed(t,e)}function xd(
`;let o=[],u=Ie(Cu,a).split(`
`);for(let f of u){let d=f.match(Cu);Q.isEmpty(d)||o.push(d[1])}let c=await Ls(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Ie(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),i.vod_content=Ie(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),i}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),r=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let i of n){let s=e(i).text(),l=i.attribs.href,a=!1;for(let o of r)s.indexOf(o)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(s,l))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=e.split(".html")[0]+"_"+n+".html",l=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,r){let i=await Fs(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+`/search.php?q=${e}`,i=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(i)}},zn=new aA;var oA=class extends $e{constructor(){super()}getName(){return zn.getName()}getAppName(){return zn.getAppName()}getJSName(){return zn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await zn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await zn.initCookie(e.server.config.bilicookie),await zn.spiderInit(e),zn.cfgObj.code=0,zn.catOpenStatus=!0,zn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await zn.setClasses(),this.classes=zn.classes}async setFilterObj(){await zn.setFilterObj(),this.filterObj=zn.filterObj}async setHomeVod(){await zn.setHomeVod(),this.homeVodList=zn.homeVodList}async setCategory(e,n,r,i){await zn.setCategory(e,n,r,i),this.vodList=zn.vodList}async setDetail(e){await zn.setDetail(e),this.vodDetail=zn.vodDetail}async setPlay(e,n,r){await zn.setPlay(e,n,r),this.playUrl=zn.playUrl,this.result=zn.result}async setSearch(e,n){await zn.setSearch(e,n),this.vodList=zn.vodList}async setProxy(e,n){return await zn.proxy(e,n)}},d3=new oA;async function Nne(t,e){return await d3.init(t,e)}async function Ine(t,e){return await d3.home(t,e)}async function lDe(t,e){return await d3.homeVod(t,e)}async function Rne(t,e){return await d3.category(t,e)}async function kne(t,e){return await d3.detail(t,e)}async function Dne(t,e){return await d3.play(t,e)}async function Pne(t,e){return await d3.search(t,e)}async function aDe(t,e){return await d3.proxy(t,e)}var Lne={meta:{key:zn.getJSName(),name:zn.getName(),type:zn.getType()},api:async t=>{t.post("/init",Nne),t.post("/home",Ine),t.post("/category",Rne),t.post("/detail",kne),t.post("/play",Dne),t.post("/search",Pne),t.get("/proxy/:what/:ids/:end",aDe)},spider:{init:Nne,home:Ine,homeVod:lDe,category:Rne,detail:kne,play:Dne,search:Pne}};var uA=class extends Ge{constructor(){super(),this.siteUrl="https://www.6080yy3.com"}getAppName(){return"\u65B0\u89C6\u89C9\u5F71\u9662"}getName(){return"\u{1F43C}\u2503\u65B0\u89C6\u89C9\u5F71\u9662\u2503\u{1F43C}"}getJSName(){return"newvision"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e(e('[class="nav-menu-items"]')[0]).find("a");for(let r of n){let i=Ie(/\/vodtype\/(.*?).html/,r.attribs.href),s=r.attribs.title;ap(i)&&this.classes.push(this.getTypeDic(s,i))}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[],i=[3,1,11,2];for(let s=0;s<n.length;s++){let l=e(e(n[s]).find("a")[0]).text(),a={key:l,name:l,value:[]};a.name=l,a.value.push({n:"\u5168\u90E8",v:"0"});for(let o of e(n[s]).find("a").slice(1)){let u=Ie(/\/vodshow\/(.*?).html/,o.attribs.href).split("-");a.value.push({n:e(o).text(),v:decodeURIComponent(u[i[s]])})}r.push(a)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/${n}-----------.html`,i=
`," ").replaceAll(" \u6536\u8D77","");let u=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],d=[];for(let h=0;h<u.length;h++){let x=u[h].attribs["data-dropdown-value"];if(x.indexOf("\u5938\u514B")===-1){f.push(x);let b=[];for(let _ of e(c[h]).find("a")){let E=e(_).text(),v=_.attribs.href;b.push(E+"$"+v)}d.push(b.join("#"))}}return r.vod_play_from=f.join("$$$"),r.vod_play_url=d.join("$$$"),r}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let s=[e.toString(),"","","","","","","",n.toString(),"","",""],l=[3,11,1,2];i.\u5168\u90E8\u5267\u60C5!==void 0&&i.\u5168\u90E8\u5267\u60C5!=="0"&&(s[l[0]]=i.\u5168\u90E8\u5267\u60C5),i.\u5168\u90E8\u65F6\u95F4!==void 0&&i.\u5168\u90E8\u65F6\u95F4!=="0"&&(s[l[1]]=i.\u5168\u90E8\u65F6\u95F4),i.\u5168\u90E8\u5730\u533A!==void 0&&i.\u5168\u90E8\u5730\u533A!=="0"&&(s[l[2]]=i.\u5168\u90E8\u5730\u533A),i.\u65F6\u95F4\u6392\u5E8F!==void 0&&i.\u65F6\u95F4\u6392\u5E8F!=="0"&&(s[l[3]]=i.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+s.join("-")+".html",o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let r=Je.enc.Utf8.parse("2890"+n+"tB959C"),i=Je.enc.Utf8.parse("2F131BE91247866E"),s=Je.AES.decrypt(e,r,{iv:i,mode:Je.mode.CBC,padding:Je.pad.Pkcs7});return Je.enc.Utf8.stringify(s)}async setPlay(e,n,r){let s=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(s.indexOf("http")>-1)this.playUrl=s;else{let l="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+s,o=(await this.getHtml(l)).html(),u=JSON.parse(Ie(/let ConFig = (.*?),box = /,o));this.playUrl=this.uic(u.url,u.config.uid)}}async setSearch(e,n){let r=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,i=await this.fetch(r,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(i))}},Gn=new uA;var cA=class extends $e{constructor(){super()}getName(){return Gn.getName()}getAppName(){return Gn.getAppName()}getJSName(){return Gn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Gn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Gn.initCookie(e.server.config.bilicookie),await Gn.spiderInit(e),Gn.cfgObj.code=0,Gn.catOpenStatus=!0,Gn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Gn.setClasses(),this.classes=Gn.classes}async setFilterObj(){await Gn.setFilterObj(),this.filterObj=Gn.filterObj}async setHomeVod(){await Gn.setHomeVod(),this.homeVodList=Gn.homeVodList}async setCategory(e,n,r,i){await Gn.setCategory(e,n,r,i),this.vodList=Gn.vodList}async setDetail(e){await Gn.setDetail(e),this.vodDetail=Gn.vodDetail}async setPlay(e,n,r){await Gn.setPlay(e,n,r),this.playUrl=Gn.playUrl,this.result=Gn.result}async setSearch(e,n){await Gn.setSearch(e,n),this.vodList=Gn.vodList}async setProxy(e,n){return await Gn.proxy(e,n)}},m3=new cA;async function Fne(t,e){return await m3.init(t,e)}async function Bne(t,e){return await m3.home(t,e)}async function oDe(t,e){return await m3.homeVod(t,e)}async function Mne(t,e){return await m3.category(t,e)}async function Une(t,e){return await m3.detail(t,e)}async function jne(t,e){return await m3.play(t,e)}async function $ne(t,e){return await m3.search(t,e)}async function uDe(t,e){return await m3.proxy(t,e)}var Hne={meta:{key:Gn.getJSName(),name:Gn.getName(),type:Gn.getType()},api:async t=>{t.post("/init",Fne),t.post("/home",Bne),t.post("/category",Mne),t.post("/detail",Une),t.post("/play",jne),t.post("/search",$ne),t.get("/proxy/:what/:ids/:end",uDe)},spider:{init:Fne,home:Bne,homeVod:oDe,category:Mne,detail:Une,play:jne,search:$ne}};var fA=class extends qo{constructor(){super(),this.siteUrl="https://haiwaikan.com",this.remove18=!0,this.type_id_
2024-04-09 09:34:47 +08:00
<ContentComponent contentType="${f}"/>
2024-04-12 14:29:25 +08:00
<Representation id="${n}" bandwidth="${s}" codecs="${i}" mimeType="${a}" ${d} startWithSAP="${l}">
2024-04-09 09:34:47 +08:00
<BaseURL>${o}</BaseURL>
<SegmentBase indexRange="${u}">
<Initialization range="${c}"/>
</SegmentBase>
</Representation>
2024-04-12 14:29:25 +08:00
</AdaptationSet>`}catch{}}getDash(e,n,r){let i=e.data.dash.duration,s=e.data.dash.minBufferTime;return`<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="static" mediaPresentationDuration="PT${i}S" minBufferTime="PT${s}S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
2024-04-09 09:34:47 +08:00
<Period duration="PT${i}S" start="PT0S">
${n}
${r}
</Period>
2024-04-12 14:29:25 +08:00
</MPD>`}async proxy(e,n){let r=e[0],i=Xi(e[1]);if(r==="dash"){let s=i.split("+"),l=s[0],a=s[1],o=s[2],u=this.apiUrl+`/x/player/playurl?avid=${l}&cid=${a}&qn=${o}&fnval=4048&fourk=1`,c="",f="",d=await this.fetch(u,null,n),h=JSON.parse(d),m=h.data.dash,x=m.video,b=m.audio;for(let E=0;E<x.length;E++){let v=x[E];v.id.toString()===o&&(c+=this.getDashMedia(v))}for(let E=0;E<b.length;E++){let v=b[E];for(let g in this.vod_audio_id)v.id.toString()===g&&(f+=this.getDashMedia(v))}let _=this.getDash(h,c,f);return JSON.stringify({code:200,content:_,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},Jn=new hA;var dA=class extends $e{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,r,i){await Jn.setCategory(e,n,r,i),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDetail=Jn.vodDetail}async setPlay(e,n,r){await Jn.setPlay(e,n,r),this.playUrl=Jn.playUrl,this.result=Jn.result}async setSearch(e,n){await Jn.setSearch(e,n),this.vodList=Jn.vodList}async setProxy(e,n){return await Jn.proxy(e,n)}},g3=new dA;async function Xne(t,e){return await g3.init(t,e)}async function Yne(t,e){return await g3.home(t,e)}async function pDe(t,e){return await g3.homeVod(t,e)}async function Qne(t,e){return await g3.category(t,e)}async function Zne(t,e){return await g3.detail(t,e)}async function ere(t,e){return await g3.play(t,e)}async function tre(t,e){return await g3.search(t,e)}async function hDe(t,e){return await g3.proxy(t,e)}var nre={meta:{key:Jn.getJSName(),name:Jn.getName(),type:Jn.getType()},api:async t=>{t.post("/init",Xne),t.post("/home",Yne),t.post("/category",Qne),t.post("/detail",Zne),t.post("/play",ere),t.post("/search",tre),t.get("/proxy/:what/:ids/:end",hDe)},spider:{init:Xne,home:Yne,homeVod:pDe,category:Qne,detail:Zne,play:ere,search:tre}};function dDe(t,e,n,r){let i=Je.enc.Utf8.parse(e||"PBfAUnTdMjNDe6pL"),s=Je.enc.Utf8.parse(n||"sENS6bVbwSfvnXrj"),l;return r?l=Je.AES.encrypt(t,i,{iv:s,mode:Je.mode.CBC,padding:Je.pad.Pkcs7}):l=Je.AES.decrypt(t,i,{iv:s,padding:Je.pad.Pkcs7}).toString(Je.enc.Utf8),l}var mA=class extends Ge{constructor(){super(),this.siteUrl="https://www.czzy88.com"}async init(t){await super.init(t),await Yi(this.cfgObj.token)}getName(){return"\u{1F3ED}\uFE0F\u2503\u5382\u957F\u76F4\u8FDE\u2503\u{1F3ED}\uFE0F"}getAppName(){return"\u5382\u957F\u76F4\u8FDE"}getJSName(){return"changzhang"}getType(){return 3}async getHtml(t=this.siteUrl,e=this.getHeader()){let r=(await this.fetch(t,null,e,!1,!0)).content;if(!Q.isEmpty(r)&&r.indexOf("\u4EBA\u673A\u9A8C\u8BC1")===-1)return tt(r);await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0)}getSearchHeader(){return{Cookie:"cf_clearance=otYZbHg1safCIxkCtZfy9DPKbf1Gs_zUskkVDc0MVKM-1707026063-1-ATOpKnTLv9+pv171YE/rzxN/nmvGN9Mucx7vpwp0kW2vZb/cbtz5e2md2/ym7EE+9dT7pPBV+kQOg9vJx2v8cks=;myannoun=1;PHPSESSID=73386nobqugs7r3pb2ljcsp5q4","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.77 Mobile/15E148 Safari/604.1",Connection:"keep-alive",Host:"www.czzy55.com"}}parseVodShortFromElement(t,e){let n=new Pe,r=t(t(e).find("a")).find("img")[0];return n.vod_name=r.attribs.alt,n.vod_pic=r.attribs["data-original"],n.vod_remarks=t(t(t(e).find("[class='hdinfo']")).find("span")).text(),n.vod_id=t(e).find("a")[0].attribs.href,n}async parseVod
2024-04-02 15:03:09 +08:00
/*! 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
*)
node-rsa/src/NodeRSA.js:
(*!
* RSA library for Node.js
*
* Author: rzcoder
* License MIT
*)
crypto-js/ripemd160.js:
(** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
crypto-js/mode-ctr-gladman.js:
(** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*)
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 *)
*/