2024-04-15 09:41:50 +08:00
var Dse = Object . create ; var R8 = Object . defineProperty ; var Pse = Object . getOwnPropertyDescriptor ; var Lse = Object . getOwnPropertyNames ; var Fse = Object . getPrototypeOf , Bse = Object . prototype . hasOwnProperty ; var k = ( t , e ) => ( ) => ( e || t ( ( e = { exports : { } } ) . exports , e ) , e . exports ) , FO = ( t , e ) => { for ( var n in e ) R8 ( t , n , { get : e [ n ] , enumerable : ! 0 } ) } , BO = ( t , e , n , r ) => { if ( e && typeof e == "object" || typeof e == "function" ) for ( let i of Lse ( e ) ) ! Bse . call ( t , i ) && i !== n && R8 ( t , i , { get : ( ) => e [ i ] , enumerable : ! ( r = Pse ( e , i ) ) || r . enumerable } ) ; return t } ; var Pr = ( t , e , n ) => ( n = t != null ? Dse ( Fse ( t ) ) : { } , BO ( e || ! t || ! t . _ _esModule ? R8 ( n , "default" , { value : t , enumerable : ! 0 } ) : n , t ) ) , jse = t => BO ( R8 ( { } , "__esModule" , { value : ! 0 } ) , t ) ; var UO = k ( ( uPe , jO ) => { "use strict" ; function Use ( 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 } } jO . exports = Use } ) ; var Im = k ( ( cPe , Nm ) => { "use strict" ; var Mse = UO ( ) ; function MO ( 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 = Mse ( $se ) , i = null , s = null , l = 0 , a = null , o = { push : x , drain : dl , saturated : dl , 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 : dl , 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 || dl , 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 || dl , 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 = dl } function v ( ) { i = null , s = null , o . drain ( ) , o . drain = dl } function g ( S ) { a = S } } function dl ( ) { } function $se ( ) { this . value = null , this . callback = dl , this . next = null , this . release = dl , 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 = dl , t . errorHandler && s ( n , l ) , i . call ( t . context , n , r ) , t . release ( t ) } } function Hse ( 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 = MO ( 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 ( dl ) , 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 ( dl ) , 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 } } Nm . exports = MO ; Nm . exports . promise = Hse } ) ; var km = k ( ( fPe , $O ) => { "use strict" ; var { inherits : qse , format : Rm } = require ( "util" ) ; function U3 ( 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 = Rm ( e , i , s , l ) : i && s ? this . message = Rm ( e , i , s ) : i ? this . message = Rm ( e , i ) : this . message = e } return r . prototype [ Symbol . toStringTag ] = "Error" , r . prototype . toString = function ( ) { return ` ${ this . name } [ ${ this . code } ]: ${ this . message } ` } , qse ( r , n ) , r } $O . exports = { createError : U3 , AVV _ERR _EXPOSE _ALREADY _DEFINED : U3 ( "AVV_ERR_EXPOSE_ALREADY_DEFINED" , "'%s' () is already defined, specify an expose option" ) , AVV _ERR _CALLBACK _NOT _FN : U3 ( "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(" \u 2502"):" ")+" ";return n+l.join(a)+ `
2024-04-15 09:41:50 +08:00
` +s.map(function(o,u){var c=u===s.length-1,f=o.nodes&&o.nodes.length,d=n+(c?" ":i(" \u 2502"))+" ";return n+i(c?" \u 2514":" \u 251C")+i(" \u 2500")+i(f?" \u 252C":" \u 2500")+" "+t(o,d,r).slice(n.length+2)}).join("")}});var WO=k((hPe,JO)=>{"use strict";var Vse=qO(),VO=Symbol("avvio.TimeTree.untrackNode"),Dm=Symbol("avvio.TimeTree.trackNode"),zO=Symbol("avvio.TimeTree.getParent"),GO=Symbol("avvio.TimeTree.getNode"),KO=Symbol("avvio.TimeTree.addNode"),Pm=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Dm](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])}[VO](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)}[zO](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[GO](e){return this.tableId.get(e)}[KO](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Dm](this.root),this.root.id;let s=this[zO](e),l= ` $ { n } - $ { Math . random ( ) } ` ,a={id:l,parent:e,start:r,label:n,nodes:[]};return s.nodes.push(a),this[Dm](a),l}start(e,n,r=Date.now()){return this[KO](e,n,r)}stop(e,n=Date.now()){let r=this[GO](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[VO](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 Vse(n)}};JO.exports=Pm});var YO=k((dPe,XO)=>{var p0=1e3,h0=p0*60,d0=h0*60,M3=d0*24,zse=M3*7,Gse=M3*365.25;XO.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Kse(t);if(n==="number"&&isFinite(t))return e.long?Wse(t):Jse(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Kse(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*Gse;case"weeks":case"week":case"w":return n*zse;case"days":case"day":case"d":return n*M3;case"hours":case"hour":case"hrs":case"hr":case"h":return n*d0;case"minutes":case"minute":case"mins":case"min":case"m":return n*h0;case"seconds":case"second":case"secs":case"sec":case"s":return n*p0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Jse(t){var e=Math.abs(t);return e>=M3?Math.round(t/M3)+"d":e>=d0?Math.round(t/d0)+"h":e>=h0?Math.round(t/h0)+"m":e>=p0?Math.round(t/p0)+"s":t+"ms"}function Wse(t){var e=Math.abs(t);return e>=M3?k8(t,e,M3,"day"):e>=d0?k8(t,e,d0,"hour"):e>=h0?k8(t,e,h0,"minute"):e>=p0?k8(t,e,p0,"second"):t+" ms"}function k8(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Lm=k((mPe,QO)=>{function Xse(t){n.debug=n,n.default=n,n.coerce=o,n.disable=s,n.enable=i,n.enabled=l,n.humanize=YO(),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-15 09:41:50 +08:00
` +s),t.push(i+"m+"+L8.exports.humanize(this.diff)+" \x 1B[0m")}else t[0]=ule()+e+" "+t[0]}function ule(){return Ni.inspectOpts.hideDate?"":new Date().toISOString()+" "}function cle(...t){return process.stderr.write(P8.format(...t)+ `
` )}function fle(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function ple(){return process.env.DEBUG}function hle(t){t.inspectOpts={};let e=Object.keys(Ni.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ni.inspectOpts[e[n]]}L8.exports=Lm()(Ni);var{formatters:iN}=L8.exports;iN.o=function(t){return this.inspectOpts.colors=this.useColors,P8.inspect(t,this.inspectOpts).split( `
` ).map(e=>e.trim()).join(" ")};iN.O=function(t){return this.inspectOpts.colors=this.useColors,P8.inspect(t,this.inspectOpts)}});var F8=k((vPe,Bm)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Bm.exports=ZO():Bm.exports=sN()});var lN=k((_Pe,Mm)=>{"use strict";var dle=Im(),mle=require("events").EventEmitter,yle=require("util").inherits,Ei=F8()("avvio"),{AVV_ERR_READY_TIMEOUT:gle}=km(),jm=Symbol.for("plugin-meta");function vle(t,e){return t[jm]&&t[jm].name?t[jm].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 _le(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function y0(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=vle(e,n),this.isAfter=r,this.q=dle(t,Ele,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}yle(y0,mle);y0.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){Ei("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 Ei("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Ei("exec",i);let s,l=o=>{if(r){Ei("loading complete",i);return}this._error=o,Ei(o?"exec errored":"exec completed",i),r=!0,s&&clearTimeout(s),e(o)};this.timeout>0&&(Ei("setting up timeout",i,this.timeout),s=setTimeout(function(){Ei("timed out",i),s=null;let o=new gle(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"&&(Ei("exec: resolving promise",i),a.then(()=>process.nextTick(l),o=>process.nextTick(l,o)))};y0.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(Ei("rejecting promise",this.name,n),this._promise.reject(n)):(Ei("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=_le(),e=this._promise.promise,this.server?t():this.on("start",t)),e};y0.prototype.enqueue=function(t,e){Ei("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};y0.prototype.finish=function(t,e){Ei("finish",this.name,t);let n=()=>{this.loaded||(Ei("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(Ei("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{Ei("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else Ei("delayed",this.name),this.q.drain=()=>{Ei("drain",this.name),this.q.drain=xle,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function Ele(t,e){let n=this;process.nextTick(Um.bind(n),t,e)}function Um(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Um.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 xle(){}Mm.exports=y0;Mm.exports.loadPlugin=Um});var fN=k((EPe,zm)=>{"use strict";var aN=Im(),ble=require("events").EventEmitter,wle=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED: $ m,AVV_ERR_CALLBACK_NOT_FN:q4,AVV_ERR_PLUGIN_NOT_VALID:Sle,AVV_ERR_ROOT_PLG_BOOTED:Tle,AVV_ERR_READY_TIMEOUT:Ale}=km(),Cle=WO(),Vm=lN(),g0=F8()("avvio"),B8=Symbol("kAvvio"),Hm=Symbol("kThenifyDoNotWrap");function Ole(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 $ m(i);if(t[s])throw new $ m(s);if(t[l])throw new $ m(l);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:uN.bind(n)}),t[B8]=!0,t[s]=function(u){return typeof u!="function"?n._loadRegistered():(n.after(qm(u,this)),this)},t[l]=function(u){if(u&&typeof u!="function")throw new q4(l,typeof u);return n.ready(u?qm(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new q4(a,typeof u);return n.onClose(Dle(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new q4(o,typeof u);return u?(n.close(q
causes have become circular ... ` ;let r=ly(t);return r?(e.add(t),n+ `
caused by : ` +VN(r,e)):n},Jae=t=>VN(t,new Set),zN=(t,e,n)=>{if(!K4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=ly(t);if(i){e.add(t);let s=typeof t.cause=="function";return r+(s?"":": ")+zN(i,e,s)}else return r},Wae=t=>zN(t,new Set);GN.exports={isErrorLike:K4,getErrorCause:ly,stackWithCauses:Jae,messageWithCauses:Wae}});var oy=k((DPe,JN)=>{"use strict";var Xae=Symbol("circular-ref-tag"),J8=Symbol("pino-raw-err-ref"),KN=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[J8]},set:function(t){this[J8]=t}}});Object.defineProperty(KN,J8,{writable:!0,value:{}});JN.exports={pinoErrProto:KN,pinoErrorSymbols:{seen:Xae,rawSymbol:J8}}});var YN=k((PPe,XN)=>{"use strict";XN.exports=cy;var{messageWithCauses:Yae,stackWithCauses:Qae,isErrorLike:WN}=ay(),{pinoErrProto:Zae,pinoErrorSymbols:e2e}=oy(),{seen:uy}=e2e,{toString:t2e}=Object.prototype;function cy(t){if(!WN(t))return t;t[uy]=void 0;let e=Object.create(Zae);e.type=t2e.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Yae(t),e.stack=Qae(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>cy(n)));for(let n in t)if(e[n]===void 0){let r=t[n];WN(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,uy)&&(e[n]=cy(r)):e[n]=r}return delete t[uy],e.raw=t,e}});var ZN=k((LPe,QN)=>{"use strict";QN.exports=X8;var{isErrorLike:fy}=ay(),{pinoErrProto:n2e,pinoErrorSymbols:r2e}=oy(),{seen:W8}=r2e,{toString:i2e}=Object.prototype;function X8(t){if(!fy(t))return t;t[W8]=void 0;let e=Object.create(n2e);e.type=i2e.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=>X8(n))),fy(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,W8)&&(e.cause=X8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];fy(r)?Object.prototype.hasOwnProperty.call(r,W8)||(e[n]=X8(r)):e[n]=r}return delete t[W8],e.raw=t,e}});var rI=k((FPe,nI)=>{"use strict";nI.exports={mapHttpRequest:s2e,reqSerializer:tI};var py=Symbol("pino-raw-req-ref"),eI=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[py]},set:function(t){this[py]=t}}});Object.defineProperty(eI,py,{writable:!0,value:{}});function tI(t){let e=t.info||t.socket,n=Object.create(eI);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 s2e(t){return{req:tI(t)}}});var aI=k((BPe,lI)=>{"use strict";lI.exports={mapHttpResponse:l2e,resSerializer:sI};var hy=Symbol("pino-raw-res-ref"),iI=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[hy]},set:function(t){this[hy]=t}}});Object.defineProperty(iI,hy,{writable:!0,value:{}});function sI(t){let e=Object.create(iI);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function l2e(t){return{res:sI(t)}}});var my=k((jPe,oI)=>{"use strict";var dy=YN(),a2e=ZN(),Y8=rI(),Q8=aI();oI.exports={err:dy,errWithCause:a2e,mapHttpRequest:Y8.mapHttpRequest,mapHttpResponse:Q8.mapHttpResponse,req:Y8.reqSerializer,res:Q8.resSerializer,wrapErrorSerializer:function(e){return e===dy?e:function(r){return e(dy(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 }
2024-04-15 09:41:50 +08:00
if ( [ o$ { l } ] . length !== 1 ) throw Error ( ) ` )()}catch{throw Error(n(s))}})}}});var Z8=k(( $ Pe,pI)=>{"use strict";pI.exports=/[^.[ \] ]+| \[ ((?:.)*?) \] /g});var dI=k((HPe,hI)=>{"use strict";var c2e=Z8();hI.exports=f2e;function f2e({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,s,l){var a=s.match(c2e).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 yI = k ( ( qPe , mI ) => { "use strict" ; var p2e = Z8 ( ) ; mI . exports = h2e ; function h2e ( { 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-15 09:41:50 +08:00
$ { g2e ( r , e ) }
2024-04-02 15:03:09 +08:00
}
const { censor , secret } = this
2024-04-15 09:41:50 +08:00
$ { d2e ( t , i , s ) }
2024-04-02 15:03:09 +08:00
this . compileRestore ( )
2024-04-15 09:41:50 +08:00
$ { m2e ( n > 0 , i , s ) }
$ { y2e ( e ) }
` ).bind(l);return e===!1&&(a.restore=o=>l.restore(o)),a}function d2e(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=p2e.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-15 09:41:50 +08:00
` )}function m2e(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-15 09:41:50 +08:00
` :""}function y2e(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-15 09:41:50 +08:00
` }function g2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var vy=k((VPe,_I)=>{"use strict";_I.exports={groupRedact:_2e,groupRestore:v2e,nestedRedact:x2e,nestedRestore:E2e};function v2e({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 _2e(t,e,n,r,i){let s=gI(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 E2e(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 x2e(t,e,n,r,i,s,l){let a=gI(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];b2e(t,a,f,n,r,i,s,l)}return t}function gy(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function b2e(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=w2e();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=r2(A,D,S),g=f,m=vI(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=J4(r2(A,D,S),m,e[c]);t.push(P),d[D]=h}else if(E[n]!==h)if(h===void 0&&s!==void 0||gy(E,n)&&h===m)A=r2(A,D,S);else{A=r2(A,D,S);let P=J4(r2(A,n,S+1),m,e[c]);t.push(P),E[n]=h}}}b=null}else{if(m=d[n],A=r2(A,n,S),h=f!==u?m:l?a?s(m,[...r,c,...i]):s(m):s,!(gy(d,n)&&h===m||h===void 0&&s!==void 0)){let N=J4(A,m,e[c]);t.push(N),d[n]=h}d=d[n]}if(typeof d!="object")break}}}function gI(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function vI(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=J4(b,f,E);_.push(g),u[h]=c}else if(t[n]!==c){if(!(c===void 0&&s!==void 0||gy(t,n)&&c===f)){let g=J4(r2(b,n,v+1),f,E);_.push(g),t[n]=c}}}for(let g in t)typeof t[g]=="object"&&(b=r2(b,g,v),vI(t[g],e-1,n,r,i,s,l,a,o,u,c,f,d,h,m,x,b,_,E,v+1))}function w2e(){return{parent:null,key:null,children:[],depth:0}}function r2(t,e,n){if(t.depth===n)return r2(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function J4(t,e,n){let r=t,i=[];do i.push(r.key),r=r.parent;while(r.parent!=null);return{path:i,value:e,target:n}}});var xI=k((zPe,EI)=>{"use strict";var{groupRestore:S2e,nestedRestore:T2e}=vy();EI.exports=A2e;function A2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=C2e(t,r),s=e>0,l=s?{secret:t,groupRestore:S2e,nestedRestore:T2e}:{secret:t};this.restore=Function("o",O2e(i,r,s)).bind(l)}}function C2e(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-15 09:41:50 +08:00
` }).join("")}function O2e(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-15 09:41:50 +08:00
` }});var wI=k((GPe,bI)=>{"use strict";bI.exports=N2e;function N2e(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 AI=k((KPe,TI)=>{"use strict";var SI=fI(),I2e=dI(),R2e=yI(),k2e=xI(),{groupRedact:D2e,nestedRedact:P2e}=vy(),L2e=wI(),F2e=Z8(),B2e=SI(),_y=t=>t;_y.restore=_y;var j2e="[REDACTED]";Ey.rx=F2e;Ey.validator=SI;TI.exports=Ey;function Ey(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 \u 2013 remove option may only be set when serializer is JSON.stringify");let i=r===!0?void 0:"censor"in t?t.censor:j2e,s=typeof i=="function",l=s&&i.length>1;if(e.length===0)return n||_y;B2e({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=I2e({paths:e,censor:i}),c=k2e({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return R2e({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:s,censorFctTakesPath:l},L2e({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:D2e,nestedRedact:P2e,wildcards:a,wcLen:o}))}});var x0=k((JPe,CI)=>{"use strict";var U2e=Symbol("pino.setLevel"),M2e=Symbol("pino.getLevel"), $ 2e=Symbol("pino.levelVal"),H2e=Symbol("pino.levelComp"),q2e=Symbol("pino.useLevelLabels"),V2e=Symbol("pino.useOnlyCustomLevels"),z2e=Symbol("pino.mixin"),G2e=Symbol("pino.lsCache"),K2e=Symbol("pino.chindings"),J2e=Symbol("pino.asJson"),W2e=Symbol("pino.write"),X2e=Symbol("pino.redactFmt"),Y2e=Symbol("pino.time"),Q2e=Symbol("pino.timeSliceIndex"),Z2e=Symbol("pino.stream"),eoe=Symbol("pino.stringify"),toe=Symbol("pino.stringifySafe"),noe=Symbol("pino.stringifiers"),roe=Symbol("pino.end"),ioe=Symbol("pino.formatOpts"),soe=Symbol("pino.messageKey"),loe=Symbol("pino.errorKey"),aoe=Symbol("pino.nestedKey"),ooe=Symbol("pino.nestedKeyStr"),uoe=Symbol("pino.mixinMergeStrategy"),coe=Symbol("pino.msgPrefix"),foe=Symbol("pino.wildcardFirst"),poe=Symbol.for("pino.serializers"),hoe=Symbol.for("pino.formatters"),doe=Symbol.for("pino.hooks"),moe=Symbol.for("pino.metadata");CI.exports={setLevelSym:U2e,getLevelSym:M2e,levelValSym: $ 2e,levelCompSym:H2e,useLevelLabelsSym:q2e,mixinSym:z2e,lsCacheSym:G2e,chindingsSym:K2e,asJsonSym:J2e,writeSym:W2e,serializersSym:poe,redactFmtSym:X2e,timeSym:Y2e,timeSliceIndexSym:Q2e,streamSym:Z2e,stringifySym:eoe,stringifySafeSym:toe,stringifiersSym:noe,endSym:roe,formatOptsSym:ioe,messageKeySym:soe,errorKeySym:loe,nestedKeySym:aoe,wildcardFirstSym:foe,needsMetadataGsym:moe,useOnlyCustomLevelsSym:V2e,formattersSym:hoe,hooksSym:doe,nestedKeyStrSym:ooe,mixinMergeStrategySym:uoe,msgPrefixSym:coe}});var wy=k((WPe,RI)=>{"use strict";var by=AI(),{redactFmtSym:yoe,wildcardFirstSym:e9}=x0(),{rx:xy,validator:goe}=by,OI=goe({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u 2013 redacted paths must be strings",ERR_INVALID_PATH:t=> ` pino \u2013 redact paths array contains an invalid path ( $ { t } ) ` }),NI="[Redacted]",II=!1;function voe(t,e){let{paths:n,censor:r}=_oe(t),i=n.reduce((a,o)=>{xy.lastIndex=0;let u=xy.exec(o),c=xy.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'| ` ) ( . * ) ( ? : "|'|`)$/," $1 "):u[0];if(f===" * "&&(f=e9),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!==e9&&a[f].length===0&&a[f].push(...a[e9]||[]),f===e9&&Object.keys(a).forEach(function(m){a[m]&&a[m].push(h)}),a[f].push(h),a},{}),s={[yoe]:by({paths:n,censor:r,serialize:e,strict:II})},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]=by({paths:i[o],censor:u,serialize:e,strict:II})}return a},s)}function _oe(t){if(Array.isArray(t))return t={paths:t,censor:NI},OI(t),t;let{paths:e,censor:n=NI,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-15 09:41:50 +08:00
$ { _ } ` );let G=Math.min(E.length,l),M=0;for(;M<G-1;M++){let V=a(String(M),E,m,x,b,_);v+=V!==void 0?V:"null",v+=g}let U=a(String(M),E,m,x,b,_);if(v+=U!==void 0?U:"null",E.length-1>l){let V=E.length-l-1;v+= ` $ { g } "... ${q3(V)} not stringified" ` }return b!==""&&(v+= `
2024-04-12 14:29:25 +08:00
$ { 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= ` ,
2024-04-15 09:41:50 +08:00
$ { _ } ` ,N=" ");let P=Math.min(C,l);i&&!Jy(E)&&(A=Ky(A)),m.push(E);for(let G=0;G<P;G++){let M=A[G],U=a(M,E,m,x,b,_);U!==void 0&&(v+= ` $ { D } $ { $2 ( M ) } : $ { N } $ { U } ` ,D=g)}if(C>l){let G=C-l;v+= ` $ { D } "..." : $ { N } "${q3(G)} not stringified" ` ,D=g}return b!==""&&D.length>1&&(v= `
2024-04-02 15:03:09 +08:00
$ { _ } $ { v }
2024-04-15 09:41:50 +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 $ 2(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-15 09:41:50 +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 } "... ${q3(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-15 09:41:50 +08:00
$ { _ } ` ,S=" ");let A="";for(let C of x){let N=o(C,h[C],m,x,b,_);N!==void 0&&(v+= ` $ { A } $ { $2 ( C ) } : $ { S } $ { N } ` ,A=g)}return b!==""&&A.length>1&&(v= `
2024-04-02 15:03:09 +08:00
$ { _ } $ { v }
2024-04-15 09:41:50 +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 $ 2(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= `
2024-04-12 14:29:25 +08:00
$ { b } ` ,D= ` ,
2024-04-15 09:41:50 +08:00
$ { 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 M=u(String(G),h[G],m,x,b);if(N+=M!==void 0?M:"null",h.length-1>l){let U=h.length-l-1;N+= ` $ { D } "... ${q3(U)} not stringified" ` }return N+= `
2024-04-12 14:29:25 +08:00
$ { _ } ` ,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= ` ,
2024-04-15 09:41:50 +08:00
$ { b } ` ,S="",A="",C=Math.min(v,l);Jy(h)&&(S+=DR(h,g,l),E=E.slice(h.length),C-=h.length,A=g),i&&(E=Ky(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 } $ { $2 ( D ) } : $ { P } ` ,A=g)}if(v>l){let N=v-l;S+= ` $ { A } "..." : "${q3(N)} not stringified" ` ,A=g}return A!==""&&(S= `
2024-04-02 15:03:09 +08:00
$ { b } $ { S }
2024-04-15 09:41:50 +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 $ 2(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+= ` , "... ${q3(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);Jy(h)&&(x+=DR(h,",",l),b=b.slice(h.length),v-=h.length,E=","),i&&(b=Ky(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 } $ { $2 ( S ) } : $ { A } ` ,E=",")}if(_>l){let g=_-l;x+= ` $ { E } "..." : "${q3(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,[],Vue(h),x,"")}if(x.length!==0)return u("",d,[],x,"")}return c("",d,[])}return f}});var MR=k((pLe,UR)=>{"use strict";var Yy=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:jR}=c9(),Gue=jR.info;function Kue(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(jR);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,[Yy]:!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=Wue(h.length,e.dedupe);Yue(b,h.length,e.dedupe);b=Xue(b,e.dedupe))if(f=h[b],f.level<=d){if(m!==0&&m!==f.level)break;if(x=f.stream,x[Yy]){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=Gue;let b={stream:d,level:x,levelVal:void 0,id:n++};return h.unshift(b),h.sort(Jue),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,[Yy]:!0}}}function Jue(t,e){return t.level-e.level}function Wue(t,e){return e?t-1:0}function Xue(t,e){return e?t-1:t+1}function Yue(t,e,n){return n?t>=0:t<e}UR.exports=Kue});var ZR=k((hLe,ml)=>{"use strict";var Que=require("os"),JR=my(),Zue=yy(),e0e=wy(),WR=DI(),t0e=kR(),XR=x0(),{configure:n0e}=BR(),{assertDefaultLevelFound:r0e,mappings:YR,genLsCache:i0e,genLevelComparison:s0e,assertLevelComparison:l0e}=Hy(),{DEFAULT_LEVELS:a0e,SORTING_ORDER:o0e}=c9(),{createArgsNormalizer:u0e,asChindings:c0e,buildSafeSonicBoom: $ R,buildFormatters:f0e,stringify:Qy,normalizeDestFileDescriptor:HR,noop:p0e}=u9(),{version:h0e}=qy(),{chindingsSym:qR,redactFmtSym:d0e,serializersSym:VR,timeSym:m0e,timeSliceIndexSym:y0e,streamSym:g0e,stringifySym:zR,stringifySafeSym:Zy,strin
2024-04-02 15:03:09 +08:00
` : `
2024-04-15 09:41:50 +08:00
` ),ne=c0e.bind(null,{[qR]:"",[VR]:l,[GR]:M,[zR]:Qy,[Zy]:D,[KR]:P}),J="";f!==null&&(d===void 0?J=ne(f):J=ne(Object.assign({},f,{name:d})));let W=a instanceof Function?a:a?QR:R0e,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" ` );r0e(h,m,E);let I=YR(m,E);l0e(x);let j=s0e(x);return Object.assign(e,{levels:I,[T0e]:j,[A0e]:E,[g0e]:r,[m0e]:W,[y0e]:re,[zR]:Qy,[Zy]:D,[GR]:M,[_0e]:V,[E0e]:U,[x0e]:o,[b0e]:u,[w0e]:c,[O0e]:c? ` , $ { JSON . stringify ( c ) } : { ` :"",[VR]:l,[S0e]:b,[N0e]:_,[qR]:J,[KR]:P,[C0e]:g,silent:p0e,onChild:C,[I0e]:N}),Object.setPrototypeOf(e,t0e()),i0e(e),e[v0e](h),e}ml.exports=eg;ml.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=HR(t.dest||process.stdout.fd), $ R(t)): $ R({dest:HR(t),minLength:0});ml.exports.transport=Fy();ml.exports.multistream=MR();ml.exports.levels=YR();ml.exports.stdSerializers=B0e;ml.exports.stdTimeFunctions=Object.assign({},WR);ml.exports.symbols=XR;ml.exports.version=h0e;ml.exports.default=eg;ml.exports.pino=eg});var X4=k((dLe,ik)=>{"use strict";var j0e=qN(),p9=ZR(),{serializersSym:ek}=p9.symbols,{FST_ERR_LOG_INVALID_DESTINATION:U0e,FST_ERR_LOG_INVALID_LOGGER:M0e}=Vi();function tk(t){if(t.stream&&t.file)throw new U0e;t.file&&(t.stream=p9.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[ek]&&(t.serializers=Object.assign({},t.serializers,e[ek])),r=e.child({},t),t.logger=e,t.genReqId=n):r=p9(t,t.stream),r}var tg={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:p9.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function $ 0e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function H0e(t){if(!t.logger){let r=j0e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(nk(t.logger))return{logger:tk({logger:t.logger,serializers:Object.assign({},tg,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({},tg,e.serializers),t.logger=e,{logger:tk(t.logger),hasLogger:!0}}function nk(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 M0e(r.join(","))}else return!0}function q0e(t,e,n,r,i){let s={[t.requestIdLogLabel]:r},l=t.childLoggerFactory.call(t.server,e,s,i||{},n);return t.childLoggerFactory!==rk&&nk(l,!0),l}function rk(t,e,n){return t.child(e,n)}ik.exports={createLogger:H0e,createChildLogger:q0e,defaultChildLoggerFactory:rk,serializers:tg,now: $ 0e}});var Y4=k((mLe,sk)=>{"use strict";sk.exports=V0e;function S0(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function V0e(t){if(t=t||{},t.circles)return z0e(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]=S0(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]=S0(a):s[l]=n(a)}return s}function r(i){if(typeof i!="object"||i===null
` :""},this._extScope=e,this._scope=new Hl.Scope({parent:e}),this._nodes=[new yg]}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 cg(e,s,r)),s}const(e,n,r){return this._def(Hl.varKinds.const,e,n,r)}let(e,n,r){return this._def(Hl.varKinds.let,e,n,r)}var(e,n,r){return this._def(Hl.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new g9(e,n,r))}add(e,n){return this._leafNode(new fg(e,Bt.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Qt.nil&&this._leafNode(new mg(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 G3(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 G3(e))}else(){return this._elseNode(new A0)}endIf(){return this._endBlockNode(G3,A0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new gg(e),n)}forRange(e,n,r,i,s=this.opts.es5?Hl.varKinds.var:Hl.varKinds.let){let l=this._scope.toName(e);return this._for(new vg(s,l,n,r),()=>i(l))}forOf(e,n,r,i=Hl.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 v9("of",i,s,n),()=>r(s))}forIn(e,n,r,i=this.opts.es5?Hl.varKinds.var:Hl.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 v9("in",i,s,n),()=>r(s))}endFor(){return this._endBlockNode(K3)}label(e){return this._leafNode(new pg(e))}break(e){return this._leafNode(new hg(e))}return(e){let n=new rc;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rc)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new _g;if(this._blockNode(i),this.code(e),n){let s=this.name("e");this._currNode=i.catch=new ic(s),n(s)}return r&&(this._currNode=i.finally=new sc,this.code(r)),this._endBlockNode(ic,sc)}throw(e){return this._leafNode(new dg(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 nc(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(nc)}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 G3))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=Eg;function J3(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function _9(t,e){return e in
2024-04-12 14:29:25 +08:00
|| ( $ { 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"
2024-04-15 09:41:50 +08:00
|| $ { l } === "boolean" || $ { i } === null ` ).assign(a,(0,Dt._) ` [ $ { i } ] ` )}}}function Z1e({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Dt._) ` $ { e } !== undefined ` ,()=>t.assign((0,Dt._) ` $ { e } [ $ { n } ] ` ,r))}function Cg(t,e,n,r=ac.Correct){let i=r===ac.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===ac.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)}}Ii.checkDataType=Cg;function Og(t,e,n,r){if(t.length===1)return Cg(t[0],e,n,r);let i,s=(0,Rk.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,Cg(l,e,n,r));return i}Ii.checkDataTypes=Og;var e4e={message:({schema:t})=> ` must be $ { t } ` ,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Dt._) ` { type : $ { t } } ` :(0,Dt._) ` { type : $ { e } } ` };function Ng(t){let e=t4e(t);(0,J1e.reportError)(e,e4e)}Ii.reportTypeError=Ng;function t4e(t){let{gen:e,data:n,schema:r}=t,i=(0,Rk.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Lk=k(b9=>{"use strict";Object.defineProperty(b9,"__esModule",{value:!0});b9.assignDefaults=void 0;var I0=ht(),n4e=Pt();function r4e(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)Pk(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,s)=>Pk(t,s,i.default))}b9.assignDefaults=r4e;function Pk(t,e,n){let{gen:r,compositeRule:i,data:s,opts:l}=t;if(n===void 0)return;let a=(0,I0._) ` $ { s } $ { ( 0 , I0 . getProperty ) ( e ) } ` ;if(i){(0,n4e.checkStrictMode)(t, ` default is ignored for : $ { a } ` );return}let o=(0,I0._) ` $ { a } === undefined ` ;l.useDefaults==="empty"&&(o=(0,I0._) ` $ { o } || $ { a } === null || $ { a } === "" ` ),r.if(o,(0,I0._) ` $ { a } = $ { ( 0 , I0 . stringify ) ( n ) } ` )}});var Ri=k(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.validateUnion=tr.validateArray=tr.usePattern=tr.callValidateCode=tr.schemaProperties=tr.allSchemaProperties=tr.noPropertyInData=tr.propertyInData=tr.isOwnProperty=tr.hasPropFunc=tr.reportMissingProp=tr.checkMissingProp=tr.checkReportMissingProp=void 0;var vr=ht(),Ig=Pt(),V2=gl(),i4e=Pt();function s4e(t,e){let{gen:n,data:r,it:i}=t;n.if(kg(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,vr._) ` $ { e } ` },!0),t.error()})}tr.checkReportMissingProp=s4e;function l4e({gen:t,data:e,it:{opts:n}},r,i){return(0,vr.or)(...r.map(s=>(0,vr.and)(kg(t,e,s,n.ownProperties),(0,vr._) ` $ { i } = $ { s } ` )))}tr.checkMissingProp=l4e;function a4e(t,e){t.setParams({missingProperty:e},!0),t.error()}tr.reportMissingProp=a4e;function Fk(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,vr._) ` Object . prototype . hasOwnProperty ` })}tr.hasPropFunc=Fk;function Rg(t,e,n){return(0,vr._) ` $ { Fk ( t ) } . call ( $ { e } , $ { n } ) ` }tr.isOwnProperty=Rg;function o4e(t,e,n,r){let i=(0,vr._) ` $ { e } $ { ( 0 , vr . getProperty ) ( n ) } !== undefined ` ;return r?(0,vr._) ` $ { i } && $ { Rg ( t , e , n ) } ` :i}tr.propertyInData=o4e;function kg(t,e,n,r){let i=(0,vr._) ` $ { e } $ { ( 0 , vr . getProperty ) ( n ) } === undefined ` ;return r?(0,vr.or)(i,(0,vr.not)(Rg(t,e,n))):i}tr.noPropertyInData=kg;function Bk(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}tr.allSchemaProperties=Bk;function u4e(t,e){return Bk(e).filter(n=>!(0,Ig.alwaysValidSchema)(t,e[n]))}tr.schemaProperties=u4e;function c4e({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:s},it:l},a,o,u){let c=u?(0,vr._) ` $ { t } , $ { e } , $ { r } $ { i } ` :e,f=[[V2.default.instancePath,(0,vr.strConcat)(V2.default.instancePath,s)],[V2.default.parentData,l.parentData],[V2.default.parentDataProperty,l.parentDataProperty],[V2.default.rootData,V2.default.rootData]];l.opts.d
2024-04-02 15:03:09 +08:00
missingProperty : $ { r } ,
depsCount : $ { e } ,
2024-04-15 09:41:50 +08:00
deps : $ { n } } ` };var H5e={keyword:"dependencies",type:"object",schemaType:"object",error:va.error,code(t){let[e,n]=q5e(t);WD(t,e),XD(t,n)}};function q5e({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 WD(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,Tc.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,Tc.checkReportMissingProp)(t,u)}):(n.if((0,vv._) ` $ { o } && ( $ { ( 0 , Tc . checkMissingProp ) ( t , a , s ) } ) ` ),(0,Tc.reportMissingProp)(t,s),n.else())}}va.validatePropertyDeps=WD;function XD(t,e=t.schema){let{gen:n,data:r,keyword:i,it:s}=t,l=n.name("valid");for(let a in e)(0, $ 5e.alwaysValidSchema)(s,e[a])||(n.if((0,Tc.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))}va.validateSchemaDeps=XD;va.default=H5e});var ZD=k(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var QD=ht(),V5e=Pt(),z5e={message:"property name must be valid",params:({params:t})=>(0,QD._) ` { propertyName : $ { t . propertyName } } ` },G5e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:z5e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,V5e.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,QD.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};_v.default=G5e});var xv=k(Ev=>{"use strict";Object.defineProperty(Ev,"__esModule",{value:!0});var F9=Ri(),zl=ht(),K5e=gl(),B9=Pt(),J5e={message:"must NOT have additional properties",params:({params:t})=>(0,zl._) ` { additionalProperty : $ { t . additionalProperty } } ` },W5e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:J5e,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,B9.alwaysValidSchema)(l,n))return;let u=(0,F9.allSchemaProperties)(r.properties),c=(0,F9.allSchemaProperties)(r.patternProperties);f(),t.ok((0,zl._) ` $ { s } === $ { K5e . 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,B9.schemaRefOrVal)(l,r.properties,"properties");_=(0,F9.isOwnProperty)(e,E,b)}else u.length?_=(0,zl.or)(...u.map(E=>(0,zl._) ` $ { b } === $ { E } ` )):_=zl.nil;return c.length&&(_=(0,zl.or)(_,...c.map(E=>(0,zl._) ` $ { ( 0 , F9 . usePattern ) ( t , E ) } . test ( $ { b } ) ` ))),(0,zl.not)(_)}function h(b){e.code((0,zl._) ` 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,B9.alwaysValidSchema)(l,n)){let _=e.name("valid");o.removeAdditional==="failing"?(x(b,_,!1),e.if((0,zl.not)(_),()=>{t.reset(),h(b)})):(x(b,_),a||e.if((0,zl.not)(_),()=>e.break()))}}function x(b,_,E){let v={keyword:"additionalProperties",dataProp:b,dataPropType:B9.Type.Str};E===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,_)}}};Ev.default=W5e});var nP=k(wv=>{"use strict";Object.defineProperty(wv,"__esModule",{value:!0});var X5e=D0(),eP=Ri(),bv=Pt(),tP=xv(),Y5e={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&&tP.default.code(new X5e.KeywordCxt(s,tP.default,"additionalProperties"));let l=(0,eP.allSchemaProperties)(n);for(let f of l)s.definedProperties.add(f);s.opts.unevaluated&&l.length&&s.props!==!0&&(s.props=bv.mergeEvaluated.props(e,(0,bv.toHash)(l),s.props));let a=l.filter(f=>!(0,bv.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-15 09:41:50 +08:00
module . exports = $ { t . toString ( ) } ( validator , serializer ) ` }Yv.exports=W8e;Yv.exports.dependencies={Serializer:ig(),Validator:Xv()}});var tL=k((BFe,eL)=>{"use strict";var{dependencies:X8e}=Qv(),{Serializer:Y8e,Validator:FFe}=X8e,Q8e={mode:"standalone"},Z8e=Y8e.restoreFromState(Q8e),e9e=null;eL.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}(e9e,Z8e)});var Nc=k((jFe,sL)=>{"use strict";var nL=require("node:http").STATUS_CODES,t9e=ty(),{kReplyHeaders:nu,kReplyNextErrorHandler:W9,kReplyIsRunningOnErrorHook:n9e,kReplyHasStatusCode:r9e,kRouteContext:iL}=bi(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:i9e,FST_ERR_FAILED_ERROR_SERIALIZATION:s9e}=Vi(),{getSchemaSerializer:l9e}=Q4(),Zv=tL(),a9e={func:u9e,toJSON(){return this.func.name.toString()+"()"}};function o9e(t,e,n){t[n9e]=!1;let r=t[iL];if(t[W9]===!1){rL(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[nu])}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[W9]||r.errorHandler;t[W9]=Object.getPrototypeOf(i),delete t[nu]["content-type"],delete t[nu]["content-length"];let s=i.func;if(!s){t[W9]=!1,rL(e,t,n);return}let l=s(e,t.request,t);l!==void 0&&(l!==null&&typeof l.then=="function"?t9e(l,t):t.send(l))}function u9e(t,e,n){if(f9e(t,n),!n[r9e]||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 rL(t,e,n){let r=e.raw,i=e.statusCode;e[nu]["content-type"]=e[nu]["content-type"]??"application/json; charset=utf-8";let s;try{let l=l9e(e[iL],i,e[nu]["content-type"]);s=l===!1?Zv({error:nL[i+""],code:t.code,message:t.message,statusCode:i}):l(Object.create(t,{error:{value:nL[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=Zv(new s9e(l.message,t.message))}typeof s!="string"&&!Buffer.isBuffer(s)&&(s=Zv(new i9e(typeof s))),e[nu]["content-length"]=""+Buffer.byteLength(s),n(e,s)}function c9e(t=a9e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function f9e(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}sL.exports={buildErrorHandler:c9e,handleError:o9e}});var t7=k((UFe,e7)=>{"use strict";var r_=require("node:stream").finished,p9e=require("node:stream").Readable,{kFourOhFourContext:lL,kPublicRouteContext:aL,kReplyErrorHandlerCalled:mL,kReplyHijacked:Ic,kReplyStartTime:Rc,kReplyEndTime:s_,kReplySerializer:o2,kReplySerializerDefault:Y9,kReplyIsError:Q9,kReplyHeaders:pr,kReplyTrailers:wi,kReplyHasStatusCode:l_,kReplyIsRunningOnErrorHook:a_,kReplyNextErrorHandler:h9e,kDisableRequestLogging:yL,kSchemaResponse:Z9,kReplyCacheSerializeFns:Y2,kSchemaController:e_,kOptions:d9e,kRouteContext: $ t}=bi(),{onSendHookRunner:gL,onResponseHookRunner:m9e,preHandlerHookRunner:y9e,preSerializationHookRunner:g9e}=B2(),oL=sy()[Symbol.for("internals")],v9e=X4(),i_=v9e.now,{handleError:uL}=Nc(),{getSchemaSerializer:_9e}=Q4(),t_={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:E9e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:x9e,FST_ERR_REP_ALREADY_SENT:vL,FST_ERR_REP_SENT_VALUE:b9e,FST_ERR_SEND_INSIDE_ONERR:w9e,FST_ERR_BAD_STATUS_CODE:S9e,FST_ERR_BAD_TRAILER_NAME:T9e,FST_ERR_BAD_TRAILER_VALUE:A9e,FST_ERR_MISSING_SERIALIZATION_FN:C9e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:O9e}=Vi(),{FSTDEP010:N9e,FSTDEP013:I9e,FSTDEP019:R9e,FSTDEP020:k9e}=n2
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-15 09:41:50 +08:00
` ;let a=new yde(e),o=new gde(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-15 09:41:50 +08:00
$ { l } ` ,ajv:o.ajv};let u=new Function("validator","serializer",l);return e.mode==="standalone"?Qv()(u,n,a,o):u(o,a)}var Ede=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],xde=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],bde=["maxLength","minLength","pattern"],wde=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function Sj(t){for(var e of Ede)if(e in t)return"object";for(var e of xde)if(e in t)return"array";for(var e of bde)if(e in t)return"string";for(var e of wde)if(e in t)return"number";return t.type}function Sde(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-15 09:41:50 +08:00
$ { W0 }
2024-04-02 15:03:09 +08:00
json += serializer . asString ( key ) + ':'
2024-04-15 09:41:50 +08:00
$ { ba ( 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-15 09:41:50 +08:00
$ { W0 }
2024-04-02 15:03:09 +08:00
json += serializer . asString ( key ) + ':' + JSON . stringify ( value )
` ;else{let u=e.getPropertyLocation("additionalProperties");i+= `
2024-04-15 09:41:50 +08:00
$ { W0 }
2024-04-02 15:03:09 +08:00
json += serializer . asString ( key ) + ':'
2024-04-15 09:41:50 +08:00
$ { ba ( t , u , "value" ) }
2024-04-02 15:03:09 +08:00
` }return i+= `
}
2024-04-15 09:41:50 +08:00
` ,i}function Tde(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=X0(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!' )
2024-04-12 14:29:25 +08:00
` ,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-15 09:41:50 +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=X0(t,e,c.schema. $ ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+= `
$ { W0 }
2024-04-02 15:03:09 +08:00
json += $ { JSON . stringify ( f + ":" ) }
2024-04-15 09:41:50 +08:00
$ { ba ( t , c , ` obj[ ${ f } ] ` ) }
2024-04-02 15:03:09 +08:00
` ;else{n+= `
if ( obj [ $ { f } ] !== undefined ) {
2024-04-15 09:41:50 +08:00
$ { W0 }
2024-04-02 15:03:09 +08:00
json += $ { JSON . stringify ( f + ":" ) }
2024-04-15 09:41:50 +08:00
$ { ba ( t , c , ` obj[ ${ f } ] ` ) }
2024-04-02 15:03:09 +08:00
}
` ;let d=c.schema.default;d!==void 0&&(n+= `
else {
2024-04-15 09:41:50 +08:00
$ { W0 }
2024-04-02 15:03:09 +08:00
json += $ { JSON . stringify ( f + ":" + JSON . stringify ( d ) ) }
}
2024-04-15 09:41:50 +08:00
` )}}return(r.patternProperties||r.additionalProperties)&&(n+=Sde(t,e)),t.wrapObjects=o,n+= `
2024-04-02 15:03:09 +08:00
return json$ { t . wrapObjects ? " + '}'" : "" }
2024-04-15 09:41:50 +08:00
` ,n}function Tj(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=X0(t,o,l. $ ref).schema}let a=l.type;if(a===void 0&&(a=Sj(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&&Tj(t,e,l,r)}delete r.allOf,r. $ id= ` _ _fjs _merged _$ { wj ++ } ` ,t.refResolver.addSchema(r),e.addMergedSchema(r,r. $ id)}function Ade(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=eE({},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=eE(r,i);let u=e.getPropertyLocation("else");return u.schema=eE(r,s), `
2024-04-02 15:03:09 +08:00
if ( validator . validate ( "${a}" , $ { n } ) ) {
2024-04-15 09:41:50 +08:00
$ { ba ( t , o , n ) }
2024-04-02 15:03:09 +08:00
} else {
2024-04-15 09:41:50 +08:00
$ { ba ( t , u , n ) }
2024-04-02 15:03:09 +08:00
}
2024-04-15 09:41:50 +08:00
` }function Cde(t){return ` ( $ { t } && typeof $ { t } . toJSON === 'function' )
2024-04-02 15:03:09 +08:00
? $ { t } . toJSON ( )
: $ { t }
2024-04-15 09:41:50 +08:00
` }function Aj(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=Oj(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let s= `
2024-04-12 14:29:25 +08:00
` ,l=n.nullable===!0;return s+= `
2024-04-02 15:03:09 +08:00
// ${i}
function $ { r } ( input ) {
2024-04-15 09:41:50 +08:00
const obj = $ { Cde ( "input" ) }
2024-04-12 14:29:25 +08:00
$ { l ? "" : "if (obj === null) return '{}'" }
2024-04-02 15:03:09 +08:00
2024-04-15 09:41:50 +08:00
$ { Tde ( t , e ) }
2024-04-02 15:03:09 +08:00
}
2024-04-15 09:41:50 +08:00
` ,t.functions.push(s),r}function Ode(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema. $ ref&&(r=X0(t,r,r.schema. $ ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let s=Oj(t);t.functionsNamesBySchema.set(n,s);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let a= `
2024-04-12 14:29:25 +08:00
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-15 09:41:50 +08:00
` ),xj==="json-stringify"&&(a+= ` if ( arrayLength && arrayLength >= $ { N7 } ) return JSON . stringify ( obj )
2024-04-02 15:03:09 +08:00
` ),a+= `
let jsonOutput = ''
2024-04-15 09:41:50 +08:00
` ,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=ba(t,r.getPropertyLocation(u), ` obj [ $ { u } ] ` );a+= `
2024-04-02 15:03:09 +08:00
if ( $ { u } < arrayLength ) {
2024-04-15 09:41:50 +08:00
if ( $ { Cj ( 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-15 09:41:50 +08:00
} ` )}else{let u=ba(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-15 09:41:50 +08:00
} ` }return a+=" \n return ` [ $ { jsonOutput } ] ` \n }",t.functions.push(a),s}function Cj(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-15 09:41:50 +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 => Cj ( i , e ) ) . join ( " || " ) } ) ` )}return n}function Oj(t){return"anonymous"+t.functionsCounter++}function Nde(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=Nj(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. \` )
2024-04-15 09:41:50 +08:00
` ,s}function Nj(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 += $ { Aj ( t , e ) } ( $ { n } ) ` ;case"array":return ` json += $ { Ode ( t , e ) } ( $ { n } ) ` ;case void 0:return ` json += JSON . stringify ( $ { n } ) ` ;default:throw new Error( ` $ { r . type } unsupported ` )}}function Ide(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-15 09:41:50 +08:00
` ),s+= ` json += '${JSON.stringify(n.const).replace(vde,"\\' " ) } ' ` ,i&&(s+= `
2024-04-02 15:03:09 +08:00
}
2024-04-15 09:41:50 +08:00
` ),s}function ba(t,e,n){let r=e.schema;if(typeof r=="boolean")return ` json += JSON . stringify ( $ { n } ) ` ;if(r. $ ref&&(e=X0(t,e,r. $ ref),r=e.schema),r.type===void 0){let a=Sj(r);a&&(r.type=a)}if(r.if&&r.then)return Ade(t,e,n);r.allOf&&(Tj(t,e,r,dde(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=Aj(t,e);s+= `
2024-04-02 15:03:09 +08:00
json += '{'
json += $ { c } ( $ { n } )
json += ','
2024-04-15 09:41:50 +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=ba(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-15 09:41:50 +08:00
` ),r.const!==void 0?s+=Ide(e,n):Array.isArray(i)?s+=Nde(t,e,n):s+=Nj(t,e,n),l&&(s+= `
2024-04-02 15:03:09 +08:00
}
2024-04-15 09:41:50 +08:00
` ),s}Y0.exports=nE;Y0.exports.default=nE;Y0.exports.build=nE;Y0.exports.validLargeArrayMechanisms=bj;Y0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var kj=k((KBe,rE)=>{"use strict";var Rde=iE();function Rj(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=Rde();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)}}}rE.exports=Rj;rE.exports.default=Rj});var iE=k((JBe,Kc)=>{"use strict";var kde=Ij();function sE(){return function(e,n){let r=Object.assign({},n,{schema:e});return Dde.bind(null,r)}}function Dde(t,{schema:e}){return t.schema&&e. $ id&&t.schema[e. $ id]&&(t.schema={...t.schema},delete t.schema[e. $ id]),kde(e,t)}Kc.exports=sE;Kc.exports.default=sE;Kc.exports.SerializerSelector=sE;Kc.exports.StandaloneSerializer=kj()});var h2=k(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.checkMetadata=void 0;var Pde=Pt(),Lde={keyword:"metadata",schemaType:"object",code(t){Dj(t);let{gen:e,schema:n,it:r}=t;if((0,Pde.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function Dj({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error( ` JTD : "${e}" cannot be used in this schema location ` )}Jc.checkMetadata=Dj;Jc.default=Lde});var I7=k(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.hasRef=void 0;var Pj=Q3(),Wc=ht(),Fde=J2(),Lj=gl(),Fj=Wg(),Bde=h2(),jde={keyword:"ref",schemaType:"string",code(t){(0,Bde.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,Wc._) ` $ { n } === null ` ),e.if((0,Wc.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 Fde.default(s.opts.uriResolver,"",r, ` No definition $ { r } ` );lE(d)||!s.opts.inlineRefs?u(d):c(d)}function u(f){let d=Pj.compileSchema.call(s.self,new Pj.SchemaEnv({schema:f,root:l,schemaPath: ` / definitions / $ { r } ` })),h=(0,Fj.getValidate)(t,d),m=e.const("_errs",Lj.default.errors);(0,Fj.callRef)(t,h,d,d. $ async),e.assign(a,(0,Wc._) ` $ { m } === $ { Lj . default . errors } ` )}function c(f){let d=e.scopeValue("schema",s.opts.code.source===!0?{ref:f,code:(0,Wc.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:Wc.nil,topSchemaRef:d,errSchemaPath: ` / definitions / $ { r } ` },a)}}};function lE(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&lE(n))return!0}return!1}Xc.hasRef=lE;Xc.default=jde});var oE=k(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});var Ude=/t| \s /i,Mde=/^( \d \d \d \d )-( \d \d )-( \d \d ) $ /, $ de=/^( \d \d ):( \d \d ):( \d \d )(?: \. \d +)?(?:z|([+-] \d \d )(?::?( \d \d ))?) $ /i,Hde=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jj(t,e){let n=t.split(Ude);return n.length===2&&Bj(n[0])&&qde(n[1])||e&&n.length===1&&Bj(n[0])}aE.default=jj;function Bj(t){let e=Mde.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=Hde[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function qde(t){let e= $ de.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}jj.code='require("ajv/dist/runtime/timestamp").default'});var Q0=k(Z2=>{"use strict";Object.defineProperty(Z2,"__esModule",{value:!0});Z2.typeErrorParams=Z2.typeErrorMessage=Z2.typeError=void 0;var Vde=ht();function zde(t){return{message:e=>Uj(e,t),params:e=>Mj(e,t)}}Z2.typeError=zde;function Uj({parentSchema:t},e){return t?.nullable? ` must be $ { e } or null ` : ` must be $ { e } ` }Z2.typeErrorMessage=Uj;function Mj({parentSchema:t},e){return(0,Vde._) ` { type : $ { e } , nullab
` ,r:" \r ",t:" ",'"':'"',"/":"/"," \\ ":" \\ "},lye=97,aye=48;function no(t,e){let n="",r;for(no.message=void 0;r=t[e++],r!=='"';)if(r===" \\ ")if(r=t[e],r in mU)n+=mU[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)-lye+10;else if(r>="0"&&r<="9")l+=r.charCodeAt(0)-aye;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 no.position=e,n;function i(s){no.position=e,no.message=s}}ro.parseJsonString=no;no.message=void 0;no.position=0;no.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var CU=k(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});var oye=EE(),EU=Q3(),at=ht(),uye=J2(),zt=gl(),cye=Ri(),fye=I7(),pye=uE(),CE=yU(),xU=Pt(),hye=oE(),dye={elements:vye,values:_ye,discriminator:xye,properties:gU,optionalProperties:gU,enum:wye,type:bye,ref:Sye};function bU(t,e){let n=EU.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:zt.default.data,parseName:a,char:l.name("c")},u;try{this._compilations.add(t),t.parseName=a,mye(o),l.optimize(this.opts.code.optimize);let c=l.toString();u= ` $ { l . scopeRefs ( zt . default . scope ) } return $ { c } ` ;let d=new Function( ` $ { zt . 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}kE.default=bU;var AE=(0,at._) ` undefined ` ;function mye(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,at._) ` $ { zt . default . json } , $ { zt . default . jsonPos } , $ { zt . default . jsonPart } ` ,!1,()=>{e.let(zt.default.data),e.let(r),e.assign((0,at._) ` $ { n } . message ` ,AE),e.assign((0,at._) ` $ { n } . position ` ,AE),e.assign(zt.default.jsonPos,(0,at._) ` $ { zt . default . jsonPos } || 0 ` ),e.const(zt.default.jsonLen,(0,at._) ` $ { zt . default . json } . length ` ),L7(t),RE(t),e.if(zt.default.jsonPart,()=>{e.assign((0,at._) ` $ { n } . position ` ,zt.default.jsonPos),e.return(zt.default.data)}),e.if((0,at._) ` $ { zt . default . jsonPos } === $ { zt . default . jsonLen } ` ,()=>e.return(zt.default.data)),r1(t)})}function L7(t){let e;for(let n of oye.jtdForms)if(n in t.schema){e=n;break}e?gye(t,dye[e]):NE(t)}var yye=_U(!0,_U(!1,r1));function gye(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);Zc(t,"null",e,()=>n.assign(i,null))}function vye(t){let{gen:e,schema:n,data:r}=t;wa(t,"[");let i=e.let("i",0);e.assign(r,(0,at._) ` [ ] ` ),OE(t,"]",()=>{let s=e.let("el");L7({...t,schema:n.elements,data:s}),e.assign((0,at._) ` $ { r } [ $ { i } ++ ] ` ,s)})}function _ye(t){let{gen:e,schema:n,data:r}=t;wa(t,"{"),e.assign(r,(0,at._) ` { } ` ),OE(t,"}",()=>Eye(t,n.values))}function OE(t,e,n){wU(t,e,n),wa(t,e)}function wU(t,e,n){let{gen:r}=t;r.for((0,at._) ` ; $ { zt . default . jsonPos } < $ { zt . default . jsonLen } && $ { F7 ( 1 ) } !== $ { e } ; ` ,()=>{n(),Zc(t,",",()=>r.break(),i)});function i(){Zc(t,e,()=>{},r1)}}function Eye(t,e){let{gen:n}=t,r=n.let("key");cu({...t,data:r}),wa(t,":"),TU(t,r,e)}function xye(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:s}=r;wa(t,"{"),e.assign(n,(0,at._) ` { } ` );let l=e.const("pos",zt.default.jsonPos),a=e.let("value"),o=e.let("tag");wU(t,"}",()=>{let u=e.let("key");cu({...t,data:u}),wa(t,":"),e.if((0,at._) ` $ { u } === $ { i } ` ,()=>{cu({...t,data:o}),e.assign((0,at._) ` $ { n } [ $ { u } ] ` ,o),e.break()},()=>NE({...t,data:a}))}),e.assign(zt.default.jsonPos,l),e.if((0,at._) ` $ { o } === undefined ` ),v2(t,(0,at.str) ` discriminator tag not found ` );for(let u in s)e.elseIf((0,at._) ` $ { o } === $ { u } ` ),SU({...t,schema:s[u]},i);e.else(),v2(t,(0,at.str) ` discriminator value not in schema ` ),e.endIf()}function gU(t){let{gen:e,data:n}=t;wa(t,"{"),e.assign(n,(0,at._) ` { } ` ),SU(t)}function SU(t,e){let{gen:n,schema:r,data:i}=t,{properties:s,optionalProperties:l,additio
` ).slice(0,2).map(e=>e.trim()).join(" -- ")}function zU(t){return t[Symbol.for("fastify.display-name")]}function GU(t){return!!t[Symbol.for("skip-override")]}function KU(t){let e=n5(t);if(!e)return;let n=e.dependencies;n&&(qE(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{qE(this[VE].indexOf(r)>-1, ` The dependency '${r}' of plugin '${e.name}' is not registered ` )}))}function JU(t){let e=n5(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&HE(this,"Fastify",n.fastify,r),n.reply&&HE(this,"Reply",n.reply,r),n.request&&HE(this,"Request",n.request,r))}var tge={Fastify:Jye,Request:Xye,Reply:Wye};function HE(t,e,n,r){qE(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let s=typeof r=="string"? ` required by '${r}' ` :"";if(!tge[e].call(t,i))throw new Qye(i,s,e)})}function nge(t){let e=n5(t);if(!e)return;let n=e.fastify,r=/-rc.+ $ /.test(this.version);if(!(r===!0&& $ E.gt(this.version, $ E.coerce(n))===!0)&&n&& $ E.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Yye(e.name,n,this.version)}function rge(t){let e=n5(t);if(!e)return;let n=e.name;if(n)return this[VE].push(n),n}function ige(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Zye(e||"anonymous")}function sge(t){let e=rge.call(this,t)||VU(t);return ige.call(this,t,e),nge.call(this,t),JU.call(this,t),KU.call(this,t),GU(t)}zE.exports={getPluginName:VU,getFuncPreview:ege,kRegisteredPlugins:VE,getDisplayName:zU,registerPlugin:sge};zE.exports[Kye]={shouldSkipOverride:GU,getMeta:n5,checkDecorators:JU,checkDependencies:KU}});var j7=k((bje,WU)=>{"use strict";function lge(t,e){let n=e||oge();return t?uge(t,n):n}function age(t,e){return t.genReqId(e)}function oge(){let e=0;return function(){return e=e+1&2147483647, ` req - $ { e . toString ( 36 ) } ` }}function uge(t,e){return function(n){return n.headers[t]||e(n)}}WU.exports={getGenReqId:age,reqIdGenFactory:lge}});var ZU=k((wje,QU)=>{"use strict";var XU=12,cge=0,KE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 fge(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,s=0,l=e,a=XU;e>-1&&e<n;){var o=YU(t[e+1],4),u=YU(t[e+2],0),c=o|u,f=KE[c];if(a=KE[256+a+f],s=s<<6|c&KE[364+f],a===XU)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===cge)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var pge={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 YU(t,e){var n=pge[t];return n===void 0?255:n<<e}QU.exports=fge});var iM=k((Sje,rM)=>{"use strict";var eM=ZU(),tM=/ \+ /g,nM=function(){};nM.prototype=Object.create(null);function hge(t){let e=new nM;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(tM," ")),a&&(r=eM(r)||r),f&&(i=t.slice(l+1,h),c&&(i=i.replace(tM," ")),o&&(i=eM(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}rM.exports=hge});var lM=k((Tje,sM)=>{var Sa=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+ `
2024-04-15 09:41:50 +08:00
` ,n+=OM(l,e+u)}return n}function bge(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function NM(t){return Array.isArray(t)?t.map(e=>NM(e)):typeof t=="symbol"?t.toString():typeof t=="function"?bge(t):t}function wge(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(NM(a));r[l]=o}}return r}function Sge(t){let e="";for(let[n,r]of Object.entries(t))e+= `
\u2022 ( $ { n } ) $ { r } ` ;return e}function Tge(t){let e={...t.opts.constraints},n=e[AM.name];return delete e[AM.name],{...t,method:n,opts:{constraints:e}}}function Age(t){let e= ` ( $ { t . method } ) ` ,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=Sge(t.metaData),e}function Cge(t){return t.reduce((e,n)=>{for(let r of e)if(TM(n.opts.constraints,r.opts.constraints)&&TM(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function Oge(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(Tge)),r=r.map(i=>(i.metaData=wge(i,n),i)),n.method===void 0&&(r=Cge(r)),r.map(Age).join( `
$ { e } ` )}function H7(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[CM]=Oge(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))H7(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let s=Array.from(i.nodePaths).join("|");H7(i,e,n+s,r)}t.wildcardChild&&H7(t.wildcardChild,e,"*",r)}function Nge(t,e){let n={};return H7(t,n,t.prefix,e),OM(n)}IM.exports={prettyPrintTree:Nge}});var DM=k((Fje,kM)=>{"use strict";var Ige= $ 7(),QE=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(Ige.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-15 09:41:50 +08:00
` ))}};kM.exports=QE});var LM=k((Bje,PM)=>{"use strict";var Rge=DM(),J7={STATIC:0,PARAMETRIC:1,WILDCARD:2},q7=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 Rge),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},V7=class extends q7{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 z7(e),this.staticChildren[r]}},z7=class t extends V7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=J7.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 G7(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 K7,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 ( " && " ) } ` )}},G7=class extends V7{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=J7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},K7=class extends q7{constructor(){super(),this.kind=J7.WILDCARD}getNextNode(){return null}};PM.exports={StaticNode:z7,ParametricNode:G7,WildcardNode:K7,NODE_TYPES:J7}});var BM=k((jje,FM)=>{"use strict";var kge=require("assert");function a5(){if(!(this instanceof a5))return new a5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}a5.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};a5.prototype.get=function(t){return this.store[t]};FM.exports={name:"version",mustMatchWhenDerived:!0,storage:a5,validate(t){kge(typeof t=="string","Version should be a string")}}});var UM=k((Uje,jM)=>{"use strict";var Dge=require("assert");function Pge(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for
` )).bind(this)}};MM.exports=ex});var qM=k(( $ je,HM)=>{"use strict";var Bge=["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"];HM.exports=Bge});var GM=k((Hje,zM)=>{"use strict";function VM(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 jge(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);VM(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 Uge(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=VM(s,l);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}zM.exports={safeDecodeURI:jge,safeDecodeURIComponent:Uge}});var lx=k((qje,ZM)=>{"use strict";var qr=require("assert"),Mge=hM(),W7=wM(),rx=R0(),{prettyPrintTree: $ ge}=RM(),{StaticNode:KM,NODE_TYPES:tx}=LM(),Hge= $ M(),u1=qM(),nx= $ 7(),{safeDecodeURI:qge,safeDecodeURIComponent:JM}=GM(),WM=/^https?: \/ \/ .*? \/ /,pu=/( \/ :[^/()]*?) \? ( \/ ?)/;if(!W7(WM))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!W7(pu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Cr(t){if(!(this instanceof Cr))return new Cr(t);t=t||{},this._opts=t,t.defaultRoute?(qr(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(qr(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(qr(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Vge,t.querystringParser?(qr(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Mge.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 Hge(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Cr.prototype.on=function(e,n,r,i,s){typeof r=="function"&&(i!==void 0&&(s=i),i=r,r={}),qr(typeof n=="string","Path should be a string"),qr(n.length>0,"The path could not be empty"),qr(n[0]==="/"||n[0]==="*","The first character of a path should be ` / ` or ` * ` "),qr(typeof i=="function","Handler should be a function");let l=n.match(pu);if(l){qr(n.length===l.index+l[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(pu," $ 1 $ 2"),c=n.replace(pu," $ 2");this.on(e,u,r,i,s),this.on(e,c,r,i,s);return}let a=n;this.ignoreDuplicateSlashes&&(n=ix(n)),this.ignoreTrailingSlash&&(n=sx(n));let o=Array.isArray(e)?e:[e];for(let u of o)qr(typeof u=="string","Method should be a string"),qr(u1.includes(u), ` Method '${u}' is not an http method . ` ),this._on(u,n,r,i,s,a)};Cr.prototype._on=function(e,n,r,i,s){let l={};r.constraints!==void 0&&(qr(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 KM("/"));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-15 09:41:50 +08:00
$ { we } ` ),ge.destroy(se)}function re(se,ge){se.headers["accept-version"]!==void 0&&(se.headers[I_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=fH(P.server,ge),je=uH(P,o,ge,pt),St=new af(pt,null,ge,null,je,P),en=new v5(we,St,je);return s===!1&&je.info({req:St},"incoming request"),a(new X_e(se),St,en)}let Ve= ` { "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":Ve.length}),we.end(Ve)}function j(se,ge,we){if(se!==!1)return function(pt){if(pt){if(a){let St=fH(P.server,ge),en=uH(P,o,ge,St),mt=new af(St,null,ge,null,en,P),It=new v5(we,mt,en);return s===!1&&en.info({req:mt},"incoming request"),a(new W_e,mt,It)}let je='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';we.writeHead(500,{"Content-Type":"application/json","Content-Length":je.length}),we.end(je)}}}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[lo].setValidatorCompiler(se),this}function Je(se){return G('Cannot call "setSchemaErrorFormatter"!'),yH(se),this[Ix]=se.bind(this),this}function Be(se){return G('Cannot call "setSerializerCompiler"!'),this[lo].setSerializerCompiler(se),this}function Re(se){G('Cannot call "setSchemaController"!');let ge=this[lo],we=aH.buildSchemaController(ge,Object.assign({},ge.opts,se));return this[lo]=we,this.getSchema=we.getSchema.bind(we),this.getSchemas=we.getSchemas.bind(we),this}function Te(se){return G('Cannot call "setReplySerializer"!'),this[lH]=se,this}function Pe(se){return G('Cannot call "setErrorHandler"!'),this[lf]=mH(this[lf],se.bind(this)),this}function Ce(se){return G('Cannot call "setChildLoggerFactory"!'),this[kx]=se,this}function gt(se={}){return se.includeMeta=se.includeHooks?se.includeMeta?Px.concat(se.includeMeta):Px:se.includeMeta,d.printRoutes(se)}function lt(se,{rewriteUrl:ge,logger:we}){let Ve;return function(je,St){if(Ve===void 0&&(Ve=se.isAsyncConstraint()),ge){je.originalUrl=je.url;let en=ge.call(C,je);if(typeof en=="string")je.url=en;else{let mt=new lEe(je.url,typeof en);je.destroy(mt)}}se.routing(je,St,j(Ve,je,St))}}function rt(se){return G('Cannot call "setGenReqId"!'),this[Dx]=pH(this[Nx].requestIdHeader,se),this}}of.errorCodes=du;function yH(t){if(typeof t!="function")throw new dH(typeof t);if(t.constructor.name==="AsyncFunction")throw new dH("AsyncFunction")}uf.exports=of;uf.exports.fastify=of;uf.exports.default=of});var VG=k((VMe,qG)=>{"use strict";qG.exports=Error});var GG=k((zMe,zG)=>{"use strict";zG.exports=EvalError});var JG=k((GMe,KG)=>{"use strict";KG.exports=RangeError});var XG=k((KMe,WG)=>{"use strict";WG.exports=ReferenceError});var ww=k((JMe,YG)=>{"use strict";YG.exports=SyntaxError});var G1=k((WMe,QG)=>{"use strict";QG.exports=TypeError});var eK=k((XMe,ZG)=>{"use strict";ZG.exports=URIError});var nK=k((YMe,tK)=>{"use strict";tK.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 sK=k((QMe,iK)=>{"use strict";var rK=typeof Symbol<"u"&&Symbol,aTe=nK();iK.exports=function(){return typeof rK!="function"||typeof Symbol!="function"||typeof rK("foo")!="symbol"||ty
` )>=0)return!1;return!0}function gAe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Fa.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Fa.call(Array(e+1),n)}}function jw(t,e){if(t.length===0)return"";var n= `
` +e.prev+e.base;return n+Fa.call(t,","+n)+ `
` +e.prev}function Up(t,e){var n=Bw(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=So(t,i)?e(t[i],t):""}var s=typeof kw=="function"?kw(t):[],l;if(Q1){l={};for(var a=0;a<s.length;a++)l[" $ "+s[a]]=s[a]}for(var o in t)So(t,o)&&(n&&String(Number(o))===o&&o<t.length||Q1&&l[" $ "+o]instanceof Symbol||(rJ.call(/[^ \w $ ]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof kw=="function")for(var u=0;u<s.length;u++)iJ.call(t,s[u])&&r.push("["+e(s[u])+"]: "+e(t[s[u]],t));return r}});var hJ=k((h $ e,pJ)=>{"use strict";var fJ=Fu(),Z1=HK(),vAe=cJ(),_Ae=G1(),Hp=fJ("%WeakMap%",!0),qp=fJ("%Map%",!0),EAe=Z1("WeakMap.prototype.get",!0),xAe=Z1("WeakMap.prototype.set",!0),bAe=Z1("WeakMap.prototype.has",!0),wAe=Z1("Map.prototype.get",!0),SAe=Z1("Map.prototype.set",!0),TAe=Z1("Map.prototype.has",!0),Hw=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},AAe=function(t,e){var n=Hw(t,e);return n&&n.value},CAe=function(t,e,n){var r=Hw(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},OAe=function(t,e){return!!Hw(t,e)};pJ.exports=function(){var e,n,r,i={assert:function(s){if(!i.has(s))throw new _Ae("Side channel does not contain "+vAe(s))},get:function(s){if(Hp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return EAe(e,s)}else if(qp){if(n)return wAe(n,s)}else if(r)return AAe(r,s)},has:function(s){if(Hp&&s&&(typeof s=="object"||typeof s=="function")){if(e)return bAe(e,s)}else if(qp){if(n)return TAe(n,s)}else if(r)return OAe(r,s);return!1},set:function(s,l){Hp&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new Hp),xAe(e,s,l)):qp?(n||(n=new qp),SAe(n,s,l)):(r||(r={key:{},next:null}),CAe(r,s,l))}};return i}});var Vp=k((d $ e,dJ)=>{"use strict";var NAe=String.prototype.replace,IAe=/%20/g,qw={RFC1738:"RFC1738",RFC3986:"RFC3986"};dJ.exports={default:qw.RFC3986,formatters:{RFC1738:function(t){return NAe.call(t,IAe,"+")},RFC3986:function(t){return String(t)}},RFC1738:qw.RFC1738,RFC3986:qw.RFC3986}});var Gw=k((m $ e,yJ)=>{"use strict";var RAe=Vp(),Vw=Object.prototype.hasOwnProperty,Bu=Array.isArray,Ba=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),kAe=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Bu(r)){for(var i=[],s=0;s<r.length;++s)typeof r[s]<"u"&&i.push(r[s]);n.obj[n.prop]=i}}},mJ=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},DAe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(Bu(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Vw.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 Bu(e)&&!Bu(n)&&(i=mJ(e,r)),Bu(e)&&Bu(n)?(n.forEach(function(s,l){if(Vw.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 Vw.call(s,l)?s[l]=t(s[l],a,r):s[l]=a,s},i)},PAe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},LAe=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}},zw=1024,FAe=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(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",o=0;o<l.length;o+=zw){for(var u=l.length>=zw?l.slice(o,o+zw):l,c=[],f=0;f<u.length;++f){var d=u.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||s===RAe.RFC1738&&(d===40||d===41)){c[c.length]=u.charAt(f);continue}if(d<128){c[c.length]=Ba[d];continue}if(d<2048){c[c.length]=Ba[192|d>>6]+Ba[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=Ba[224|d>>12]+Ba[128|d>>6&63]+Ba[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=Ba[240|d>>18]+Ba[12
` ;cn.DEFAULT_CONTENT_TYPE="application/octet-stream";cn.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=aS.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),gW.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 _Oe))&&(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)):vOe.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"&&lS(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=iS.normalize(e.filepath).replace(/ \\ /g,"/"):e.filename||t.name||t.path?n=iS.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=iS.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=sS.lookup(t.name)),!n&&t.path&&(n=sS.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=sS.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)}};C2.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 bX(t,e){var n=this;C2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),s=HS({},n.options,{socket:r,servername:i?i.replace(/:.* $ /,""):t.host}),l=vNe.connect(0,s);n.sockets[n.sockets.indexOf(r)]=l,e(l)})}function wX(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function HS(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 Ro;process.env.NODE_DEBUG&&/ \b tunnel \b /.test(process.env.NODE_DEBUG)?Ro=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)}:Ro=function(){};u4.debug=Ro});var AX=k((oze,TX)=>{TX.exports=SX()});var VQ=k((AT,CT)=>{(function(t,e){typeof AT=="object"&&typeof CT<"u"?CT.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(AT,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(M){var U=["th","st","nd","rd"],V=M%100;return"["+M+(U[(V-20)%10]||U[V]||U[0])+"]"}},_=function(M,U,V){var ne=String(M);return!ne||ne.length>=U?M:""+Array(U+1-ne.length).join(V)+M},E={s:_,z:function(M){var U=-M.utcOffset(),V=Math.abs(U),ne=Math.floor(V/60),J=V%60;return(U<=0?"+":"-")+_(ne,2,"0")+":"+_(J,2,"0")},m:function M(U,V){if(U.date()<V.date())return-M(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(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:f,w:o,d:a,D:d,h:l,m:s,s:i,ms:r,Q:c}[M]||String(M||"").toLowerCase().replace(/s $ /,"")},u:function(M){return M===void 0}},v="en",g={};g[v]=b;var S=" $ isDayjsObject",A=function(M){return M instanceof P||!(!M||!M[S])},C=function M(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 M(re[0])}else{var I=U.name;g[I]=U,J=I}return!ne&&J&&(v=J),J||!ne&&v},N=function(M,U){if(A(M))return M.clone();var V=typeof U=="object"?U:{};return V.date=M,V.args=arguments,new P(V)},D=E;D.l=C,D.i=A,D.w=function(M,U){return N(M,{locale:U. $ L,utc:U. $ u,x:U. $ x, $ offset:U. $ offset})};var P=function(){function M(V){this. $ L=C(V.locale,null,!0),this.parse(V),this. $ x=this. $ x||V.x||{},this[S]=!0}var U=M.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,j=(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,j)):new Date(re[1],I,re[3]||1,re[4]||0,re[5]||0,re[6]||0,j)}}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)};h4.exports.detectEnvironment=function(){return typeof window<"u"&&window&&!(process&&process.title==="node")?"browser":"node"};h4.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};h4.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}};h4.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 Ku=k((jKe,WQ)=>{var RIe=require("crypto"),kIe=gs()._,d4,DIe=0xdeadbeefcafe,BKe=(DIe&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 PIe(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=PIe;d4=28;xe.prototype.DB=d4;xe.prototype.DM=(1<<d4)-1;xe.prototype.DV=1<<d4;var NT=52;xe.prototype.FV=Math.pow(2,NT);xe.prototype.F1=NT-d4;xe.prototype.F2=2*d4-NT;var LIe="0123456789abcdefghijklmnopqrstuvwxyz",oh=new Array,m4,Ol;m4=48;for(Ol=0;Ol<=9;++Ol)oh[m4++]=Ol;m4=97;for(Ol=10;Ol<36;++Ol)oh[m4++]=Ol;m4=65;for(Ol=10;Ol<36;++Ol)oh[m4++]=Ol;function OT(t){return LIe.charAt(t)}function zQ(t,e){var n=oh[t.charCodeAt(e)];return n??-1}function FIe(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 Zo(t){var e=Zt();return e.fromInt(t),e}function jIe(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:zQ(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 UIe(t,e){this.fromString(t,256,e)}function MIe(t){this.fromString(t,256,!0)}function $ Ie(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function HIe(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=OT(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+=OT(r));return i?s:"0"}function qIe(){var t=Zt();return xe.ZERO.subTo(this,t),t}function VIe(){return this.s<0?this.negate():this}function zIe(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 uh(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 GIe(){return this.t<=0?0:this.DB*(this.t-1)+uh(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 JIe(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 WIe(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[
` +Ch.linebrk(c.buffer.toString("base64"),64)+ `
` +NZ},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=Ch.trimSurroundingText(e,OZ,NZ).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 Ah.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 Ah.Writer({size:r});return i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence(),e.type==="der"?i.buffer:IZ+ `
` +Ch.linebrk(i.buffer.toString("base64"),64)+ `
` +RZ},publicImport: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=Ch.trimSurroundingText(e,IZ,RZ).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 Ah.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)?(Oh.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)?(Oh.exports.publicImport(t,e),!0):!1}}});var jZ=k((rJe,Rh)=>{var Ma=Th().Ber,DZ=gs()._,Nh="1.2.840.113549.1.1.1",Ih=gs(),PZ="-----BEGIN PRIVATE KEY-----",LZ="-----END PRIVATE KEY-----",FZ="-----BEGIN PUBLIC KEY-----",BZ="-----END PUBLIC KEY-----";Rh.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 Ma.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 Ma.Writer({size:u});return f.startSequence(),f.writeInt(0),f.startSequence(),f.writeOID(Nh),f.writeNull(),f.endSequence(),f.writeBuffer(c.buffer,4),f.endSequence(),e.type==="der"?f.buffer:PZ+ `
` +Ih.linebrk(f.buffer.toString("base64"),64)+ `
` +LZ},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=Ih.trimSurroundingText(e,PZ,LZ).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 Ma.Reader(r);s.readSequence(),s.readInt(0);var l=new Ma.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Nh)throw Error("Invalid Public key format");var a=new Ma.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 Ma.Writer({size:r});i.writeByte(0),i.startSequence(),i.writeBuffer(n,2),i.writeInt(t.e),i.endSequence();var s=new Ma.Writer({size:r});return s.startSequence(),s.startSequence(),s.writeOID(Nh),s.writeNull(),s.endSequence(),s.writeBuffer(i.buffer,3),s.endSequence(),e.type==="der"?s.buffer:FZ+ `
` +Ih.linebrk(s.buffer.toString("base64"),64)+ `
` +BZ},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=Ih.trimSurroundingText(e,FZ,BZ).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 Ma.Reader(r);s.readSequence();var l=new Ma.Reader(s.readString(48,!0));if(l.readOID(6,!0)!==Nh)throw Error("Invalid Public key format");var a=new Ma.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)?(Rh.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)?(Rh.exports.publicImport(t,e),!0):!1}}});var UZ=k((lJe,kh)=>{var iJe=gs()._,sJe=gs();kh.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?(kh.exports.privateImport(t,e),!0):(kh.exports.publicImport(t,e),!0):!1}}});var VZ=k((aJe,Dh)=>{var MZ=gs()._, $ Z=gs(),j6=Ku(),HZ="-----BEGIN OPENSSH PRIVATE KEY-----",qZ="-----END OPENSSH PRIVATE KEY-----";Dh.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,Fi(m,Buffer.from("none")),Fi(m,Buffer.from("none")),Fi(m,Buffer.from("")),m.off=m.buf.writeUInt32BE(1,m.off),m.off=m.buf.writeUInt32BE(u,m.off),Fi(m,Buffer.from("ssh-rsa")),Fi(m,r),Fi(m,n),m.off=m.buf.writeUInt32BE(f-47-u,m.off),m.off+=8,Fi(m,Buffer.from("ssh-rsa")),Fi(m,n),Fi(m,r),Fi(m,i),Fi(m,s),Fi(m,l),Fi(m,a),Fi(m,o);let x=1;for(;m.off<f;)m.off=m.buf.writeUInt8(x++,m.off);return e.type==="der"?m.buf:HZ+ `
` + $ Z.linebrk(h.toString("base64"),70)+ `
` +qZ+ `
` },privateImport:function(t,e,n){n=n||{};var r;if(n.type!=="der")if(Buffer.isBuffer(e)&&(e=e.toString("utf8")),MZ.isString(e)){var i= $ Z.trimSurroundingText(e,HZ,qZ).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,Li(s).toString("ascii")!=="none"||Li(s).toString("ascii")!=="none"||Li(s).toString("ascii")!==""||(s.off+=4,s.off+=4,Li(s).toString("ascii")!=="ssh-rsa")||(Li(s),Li(s),s.off+=12,Li(s).toString("ascii")!=="ssh-rsa"))throw Error("Unsupported key type");let l=Li(s),a=Li(s),o=Li(s),u=Li(s),c=Li(s),f=Li(s),d=new j6(o),h=new j6(f),m=new j6(c),x=d.mod(m.subtract(j6.ONE)),b=d.mod(h.subtract(j6.ONE));t.setPrivate(l,a,o,c,f,x.toBuffer(),b.toBuffer(),u),t.sshcomment=Li(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};Fi(s,Buffer.from("ssh-rsa")),Fi(s,n),Fi(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")),MZ.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=Li(i).toString("ascii");if(s!=="ssh-rsa")throw Error("Invalid key type: "+s);let l=Li(i),a=Li(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)?(Dh.exports.privateImport(t,e),!0):/^[ \S \s ]*ssh-rsa \s *(?=(([A-Za-z0-9+/=]+ \s *)+)) \1 [ \S \s ]* $ /g.test(e)?(Dh.exports.publicImport(t,e),!0):!1}};function Li(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 Fi(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}});var GZ=k((uJe,di)=>{var oJe=gs()._;function zZ(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}}di.exports={pkcs1:kZ(),pkcs8:jZ(),components:UZ(),openssh:VZ(),isPrivateExport:function(t){return di.exports[t]&&typeof di.exports[t].privateExport=="function"},isPrivateImport:function(t){return di.exports[t]&&typeof di.exports[t].privateImport=="function"},isPublicExport:function(t){return di.exports[t]&&typeof di.exports[t].publicExport=="function"},isPublicImport:function(t){return di.exports[t]&&typeof di.exports[t].publicImport=="function"},detectAndImport:function(t,e,n){if(n===void 0){for(var r in di.exports)if(typeof di.exports[r].autoImport=="function"&&di.exports[r].autoImport(t,e))return!0}else if(n){var i=zZ(n);if(di.exports[i.scheme])i.keyType==="private"?di.exports[i.scheme].privateImport(t,e,i.keyOpt):di.exports[i.scheme].publicImport(t,e,i.keyOpt);else throw Error("Unsupported key format")}return!1},detectAndExport:function(t,e){if(e){var n=zZ(e);if(di.exports[n.scheme])if(n.keyType==="private"){if(!t.isPrivate())throw Error("This is not private key");return di.exports[n.scheme].privateExport(t,n.keyOpt)}else{if(!t.isPublic())throw Error("This is not public key");return di.exports[n.scheme].publicExport(t,n.keyOpt)}else throw Error("Unsupported key format")}}}});var YZ=k((pJe,XZ)=>{var KZ=require("constants"),Dke=yZ(),cJe=require("crypto"),fJe=Th().Ber,nl=gs()._,Pke=gs(),JZ=Ju(),WZ=GZ();typeof KZ.RSA_NO_PADDING>"u"&&(KZ.RSA_NO_PADDING=3);XZ.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);nl.isObject(a)&&(o=a,a=void 0),this. $ options={signingScheme:n,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:Pke.detectEnvironment(),rsaUtils:this},this.keyPair=new Dke.Key,this. $ cache={},Buffer.isBuffer(l)||nl.isString(l)?this.importKey(l,a):nl.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(nl.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}};w3.NestedError=M6;var CA=class extends M6{};w3.DatabaseError=CA;var OA=class extends M6{};w3.DataError=OA});var DA=k(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.getArrayIndicies=Es.validateArrayIndex=Es.validateArrayIndicies=Es.isInt=Es.ArrayInfo=Es.arrayRegex=void 0;var Sd=w4(),GDe=()=>/^([ \. 0-9a-zA-Z_ $ \- ][0-9a-zA-Z_ \- $ \. ]*) \[ ((?!( \] | \[ )).*|) \] $ /gm;Es.arrayRegex=GDe;var NA={},IA=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,RA(r))this.index=parseInt(r);else if(!this.append)throw new Sd.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(NA[e])return NA[e];let r=(0,Es.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],s="["+r[2].toString()+"]",l=kA(s);return Mre(l),NA[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 Sd.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 Sd.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}};Es.ArrayInfo=IA;function RA(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Es.isInt=RA;function Mre(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")}Es.validateArrayIndicies=Mre;function $ re(t){if(t.length!==0&&!RA(t))throw new Sd.DataError("Only numerical values accepted for array index",200)}Es.validateArrayIndex= $ re;function kA(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]")); $ re(e);let n=e.length+2;return[e,...kA(t.substring(n))]}Es.getArrayIndicies=kA});var Vre=k(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.DBParentData=void 0;var Hre=DA(),qre=w4(),PA=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=Hre.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new qre.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=Hre.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 qre.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]}};Td.DBParentData=PA});var Gre=k((UYe,zre)=>{zre.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):Of(e)?t(e.children):Da(e)?e.data:""},textContent:R1,innerText:Rf,getChildren:Hf,getParent:Hq,getSiblings:qq,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:Db,prevElementSibling:Pb,removeElement:gu,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){gu(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){gu(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){gu(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){gu(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:vf,find:Lb,findOneChild:function(t,e){return e.find(t)},findOne:sb,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=TH(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=TH(t))?vf(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),sb(Vq("id",t),e,n)},getElementsByTagName:T1,getElementsByTagType:function(t,e,n=!0,r=1/0){return vf(kf.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 Sl},compareDocumentPosition:zq,uniqueSort:k1,getFeed:function(t){return(t=cf(DEe,t))?(t.name==="feed"?function(e){var n={type:"atom",items:T1("entry",e=e.children).map(i=>{var s={media:AH(i=i.children)},l=(Rs(s,"id","id",i),Rs(s,"title","title",i),(l=cf("link",i))==null?void 0:l.attribs.href);return l&&(s.link=l),(l=ao("summary",i)||ao("content",i))&&(s.description=l),(l=ao("updated",i))&&(s.pubDate=new Date(l)),s})},r=(Rs(n,"id","id",e),Rs(n,"title","title",e),(r=cf("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),Rs(n,"description","subtitle",e),(r=ao("updated",e))&&(n.updated=new Date(r)),Rs(n,"author","email",e,!0),n}:function(r){var n=(n=(n=cf("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:T1("item",r.children).map(s=>{var l={media:AH(s=s.children)};return Rs(l,"id","guid",s),Rs(l,"title","title",s),Rs(l,"link","link",s),Rs(l,"description","description",s),(s=ao("pubDate",s)||ao("dc:date",s))&&(l.pubDate=new Date(s)),l})},i=(Rs(r,"title","title",n),Rs(r,"link","link",n),Rs(r,"description","description",n),ao("lastBuildDate",n));return i&&(r.updated=new Date(i)),Rs(r,"author","managingEditor",n,!0),r})(t):null}}),A1=function(){return(A1=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 Gq(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function PEe(t,e){return Gq(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,A1(A1(A1({},kb),this==null?void 0:this._options),nb(e??{})))}function LEe(t){return Gq(this,t,A1(A1({},this._options),{xmlMode:!0}))}function z5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=R1(e[r]);return n}function FEe(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,kb,!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-15 09:41:50 +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])"},Qq={};function Zq(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 cb(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 $ x=(t,e,n,r,i)=>{let s=i(e,cb(n),r);return s===Mt.trueFunc?t:s===Mt.falseFunc?Mt.falseFunc:l=>s(l)&&t(l)},Hx={is: $ x,matches: $ x,where: $ x,not(t,e,n,r,i){let s=i(e,cb(n),r);return s===Mt.falseFunc?t:s===Mt.trueFunc?Mt.falseFunc:l=>!s(l)&&t(l)},has(t,e,n,r,i){let s=n.adapter,l=cb(n),a=(l.relativeSelector=!0,e.some(c=>c.some(ob))?[Qq]:void 0),o=i(e,l,a);if(o===Mt.falseFunc)return Mt.falseFunc;let u=function(c,f){return c===Mt.falseFunc?Mt.falseFunc:d=>f.isTag(d)&&c(d)}(o,s);if(a&&o!==Mt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var d=s.getChildren(h),h=c?[...d,...Zq(h,s)]:d;return s.existsOne(u,h)}}return c=>t(c)&&s.existsOne(u,s.getChildren(c))}};function qx(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function txe(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()),YEe[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 Hx)return Hx[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:exe[d];if(typeof x=="string"){if(h!=null)throw new Error( ` Pseudo $ { d } doesn ' t have any arguments ` );let b=Vf(x);return Hx.is(a,b,u,c,f)}if(typeof m=="function")return jH(m,d,h,1),b=>m(b,h)&&a(b);if(d in ub)return ub[d](a,h,u,c);if(d in BH){let b=BH[d];return jH(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=qx(u,s);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=qx(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=qx(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(MH, ` \ r
` )}}).toArray()}}),N5=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}},Hb=(N5.prototype.cheerio="[cheerio object]",N5.prototype.splice=Array.prototype.splice,N5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(N5.prototype, $ Ee,bxe,Oxe,Nxe,Rxe),function(t,e){return(Hb=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)}),kxe=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}Hb(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},I5=function(){return(I5=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)},Dxe=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]),xr=" \u FFFD", $ H=(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||{}),"--"),HH="[CDATA[",qH="doctype",h1="script",Pxe="public",Lxe="system";function dV(t){return 55296<=t&&t<=57343}function mV(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function yV(t){return 64976<=t&&t<=65007||Dxe.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 HV(){throw new Error("setTimeout has not been defined")}function qV(){throw new Error("clearTimeout has not been defined")}var co=HV,fo=qV;function VV(t){if(co===setTimeout)return setTimeout(t,0);if((co===HV||!co)&&setTimeout)return(co=setTimeout)(t,0);try{return co(t,0)}catch{try{return co.call(null,t,0)}catch{return co.call(this,t,0)}}}typeof x2.setTimeout=="function"&&(co=setTimeout),typeof x2.clearTimeout=="function"&&(fo=clearTimeout);var xu,w2=[],N1=!1,Sf=-1;function kbe(){N1&&xu&&(N1=!1,xu.length?w2=xu.concat(w2):Sf=-1,w2.length)&&zV()}function zV(){if(!N1){var t=VV(kbe);N1=!0;for(var e=w2.length;e;){for(xu=w2,w2=[];++Sf<e;)xu&&xu[Sf].run();Sf=-1,e=w2.length}xu=null,N1=!1,function(n){if(fo===clearTimeout)return clearTimeout(n);if((fo===qV||!fo)&&clearTimeout)return(fo=clearTimeout)(n);try{fo(n)}catch{try{return fo.call(null,n)}catch{return fo.call(this,n)}}}(t)}}function GV(t,e){this.fun=t,this.array=e}function Cu(){}GV.prototype.run=function(){this.fun.apply(null,this.array)};var Dbe=Cu,Pbe=Cu,Lbe=Cu,Fbe=Cu,Bbe=Cu,jbe=Cu,Ube=Cu,_1=x2.performance||{},Mbe=_1.now||_1.mozNow||_1.msNow||_1.oNow||_1.webkitNow||function(){return new Date().getTime()}, $ be=new Date,vo={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];w2.push(new GV(t,e)),w2.length!==1||N1||VV(zV)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Dbe,addListener:Pbe,once:Lbe,off:Fbe,removeListener:Bbe,removeAllListeners:jbe,emit:Ube,binding:function(t){throw new Error("process.
\ r \ xA0 ` ,Tq="()[]{}%*-+~/#,:|.<>=!",QV="string",ZV="whitespace",ez="data",tz="block-start",nz="block-end",rz="variable-start",iz="variable-end",sz="comment",lz="left-paren",az="right-paren",oz="left-bracket",uz="right-bracket",cz="left-curly",fz="right-curly",pz="operator",hz="comma",dz="colon",mz="tilde",yz="pipe",gz="float",vz="boolean",Ob="none",_z="symbol",Ez="regex";function ms(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Kbe=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 ms(QV,this._parseString(i),n,r);if(h=this._extract(Sq))return ms(ZV,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-15 09:41:50 +08:00
` ?this.forward():this.back())),ms(nz,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,ms(iz,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 ms(Ez,{body:s,flags:a},n,r)}if(Tq.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch( $ e.indexOf(u,c)!==-1&&(this.forward(), $ e.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=lz;break;case")":o=az;break;case"[":o=oz;break;case"]":o=uz;break;case"{":o=cz;break;case"}":o=fz;break;case",":o=hz;break;case":":o=dz;break;case"~":o=mz;break;case"|":o=yz;break;default:o=pz}return ms(o,i,n,r)}if((h=this._extractUntil(Sq+Tq)).match(/^[-+]?[0-9]+ $ /))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),ms(gz,h+"."+u,n,r)):ms("int",h,n,r);if(h.match(/^(true|false) $ /))return ms(vz,h,n,r);if(h==="none"||h==="null")return ms(Ob,h,n,r);if(h)return ms(_z,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,ms(tz,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,ms(rz,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 ms(m?sz:ez,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+= `
2024-04-12 14:29:25 +08:00
` ;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-15 09:41:50 +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}(),Ye={lex:function(t,e){return new Kbe(t,e)},TOKEN_STRING:QV,TOKEN_WHITESPACE:ZV,TOKEN_DATA:ez,TOKEN_BLOCK_START:tz,TOKEN_BLOCK_END:nz,TOKEN_VARIABLE_START:rz,TOKEN_VARIABLE_END:iz,TOKEN_COMMENT:sz,TOKEN_LEFT_PAREN:lz,TOKEN_RIGHT_PAREN:az,TOKEN_LEFT_BRACKET:oz,TOKEN_RIGHT_BRACKET:uz,TOKEN_LEFT_CURLY:cz,TOKEN_RIGHT_CURLY:fz,TOKEN_OPERATOR:pz,TOKEN_COMMA:hz,TOKEN_COLON:dz,TOKEN_TILDE:mz,TOKEN_PIPE:yz,TOKEN_INT:"int",TOKEN_FLOAT:gz,TOKEN_BOOLEAN:vz,TOKEN_NONE:Ob,TOKEN_SYMBOL:_z,TOKEN_SPECIAL:"special",TOKEN_REGEX:Ez};function Aq(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 zb(t,e,n){return e&&Aq(t.prototype,e),n&&Aq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function xz(t,e){t.prototype=Object.create(e.prototype),bz(t.prototype.constructor=t,e)}function bz(t,e){return(bz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function wz(t,e,n){n=n||{}, $ e.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 xz(s,i),zb(s,[{key:"typename",get:function(){return e}}]),s}(t);return $ e._assign(r.prototype,n),r}var Jbe=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"),wz(this,e,n)},zb(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Wbe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return xz(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),wz(this,n,r)},zb(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(rr),L1={Obj:Jbe,EmitterObj:Wbe};function Cq(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 Gb(t,e,n){return e&&Cq(t.prototype,e),n&&Cq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gf(t,e){t.prototype=Object.create(e.prototype),Sz(t.prototype.constructor=t,e)}function Sz(t,e){return(Sz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function Oq(t,e,n){t instanceof e&&n.push(t),t instanceof ur&&t.findAll(e,n)}var ur=function(t){function e(){return t.apply(this,arguments)||this}Gf(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 Pa?this.children.forEach(function(l){return Oq(l,r,i)}):this.fields.forEach(function(l){return Oq(s[l],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(s){r(i[s],s)})},e}(L1.Obj),Kb=function(t){function e(){return t.apply(this,arguments)||this}return Gf(e,t),Gb(e,[{key:"ty
2024-04-12 14:29:25 +08:00
` );r.forEach(function(i,s){i&&(n&&0<s||!n)&&process.stdout.write(" ".repeat(e)),s=s===r.length-1?"": `
2024-04-15 09:41:50 +08:00
` ,process.stdout.write(i+s)})}var te={Node:ur,Root:Xbe,NodeList:Pa,Value:Kb,Literal:Tz,Symbol:Ybe,Group:Qbe,Array:Zbe,Pair:ewe,Dict:Az,Output:vwe,Capture:_we,TemplateData:Ewe,If:Cz,IfAsync:nwe,InlineIf:rwe,For:Jb,AsyncEach:iwe,AsyncAll:swe,Macro:Oz,Caller:lwe,Import:awe,FromImport:owe,FunCall:Nz,Filter:Iz,FilterAsync:uwe,KeywordArgs:cwe,Block:fwe,Super:pwe,Extends:hwe,Include:dwe,Set:mwe,Switch:ywe,Case:gwe,LookupVal:twe,BinOp:el,In:xwe,Is:bwe,Or:wwe,And:Swe,Not:Twe,Add:Awe,Concat:Cwe,Sub:Owe,Mul:Nwe,Div:Iwe,FloorDiv:Rwe,Mod:kwe,Pow:Dwe,Neg:Pwe,Pos:Lwe,Compare:Fwe,CompareOperand:Bwe,CallExtension:Nb,CallExtensionAsync:jwe,printNodes:function t(e,n){var r,i;n=n||0,m1(e.typename+": ",n),e instanceof Pa?(m1( `
` ),e.children.forEach(function(s){t(s,n+2)})):e instanceof Nb?(m1(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 ur?r.push([l,s]):(i=i||{})[l]=s}),i?m1(JSON.stringify(i,null,2)+ `
` ,null,!0):m1( `
` ),r.forEach(function(a){var l=a[0],a=a[1];m1("["+l+"] =>",n+2),t(a,n+4)}))}};function Rz(t,e){return(Rz=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 Nq=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),Rz(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!==Ye.TOKEN_WHITESPACE)return s=this.peeked,this.peeked=null,s;this.peeked=null}if(s=this.tokens.nextToken(),!i)for(;s&&s.type===Ye.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 $ e.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(Ye.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var s;return i||((s=this.peekToken())||this.fail("unexpected end of file"),s.type!==Ye.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(s=this.nextToken())&&s.type===Ye.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===Ye.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===Ye.TOKEN_COMMA){var a=i.name;for(i.name=new te.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(Ye.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
2024-04-12 14:29:25 +08:00
` )},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 ) ;
2024-04-15 09:41:50 +08:00
` ))},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(/ \u 2028/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(" "+Gwe[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
2024-04-12 14:29:25 +08:00
else { ` ),this._withScopedSyntax(function(){a.compile(i.else_,s),l&&a._emit("cb()")})):l&&(this._emitLine( ` }
2024-04-15 09:41:50 +08:00
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 Xx,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 Xx,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}(L1.Obj),Kwe={compile:function(l,e,n,r,i){var s=new Rq(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(Hwe.transform(Uwe.parse(l,n,i),e,r)),s.getCode()},Compiler:Rq},Jwe=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( $ e.isString(h))return h.split("");if( $ e.isObject(h))return $ e._entries(h||{}).map(function(m){return{key:m[0],value:m[1]}});if( $ e.isArray(h))return h;throw new $ e.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 $ e.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= $ e.repeat(" ",m/2-m%2),m= $ e.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(! $ e.isObject(h))throw new $ e.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 $ e.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||( $ e.isString(v)&&(v=v.toUpperCase()), $ e.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( $ e.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( $ e.escape((h=h??"").toString()))},t.groupby=function(h,m){return $ e.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( `
` ),_= $ e.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? $ e.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:(! $ e.isObject(h)||h instanceof bt.SafeString?h: $ e.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 / >
` ))},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= $ e.isString(h)?i(h): $ e.map(h,function(x){return x})).reverse(), $ e.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? $ e.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= $ e.map(E,function(g){return g}),v= $ e.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&& $ e.isString(g)&& $ e.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-15 09:41:50 +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 $ e.isString(h)?m(h):( $ e.isArray(h)?h: $ e._entries(h)).map(function(_){var b=_[0],_=_[1];return m(b)+"="+m(_)}).join("&")};var a=/^(?: \( |<|<)?(.*?)(?: \. |,| \) | \n |>)? $ /,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 Fz ( 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 Wwe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/ , Yx = function ( t ) { return Wwe . exec ( t ) . slice ( 1 ) } ; function Qx ( ) { 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 ? "/" : "" ) + Fz ( Xb ( t . split ( "/" ) , function ( i ) { return ! ! i } ) , ! e ) . join ( "/" ) || "." } function kq ( t ) { var e = Bz ( t ) , n = Xwe ( t , - 1 ) === "/" ; return ( t = ( t = Fz ( Xb ( t . split ( "/" ) , function ( r ) { return ! ! r } ) , ! e ) . join ( "/" ) ) || e ? t : "." ) && n && ( t += "/" ) , ( e ? "/" : "" ) + t } function Bz ( t ) { return t . charAt ( 0 ) === "/" } var I1 = { extname : function ( t ) { return Yx ( t ) [ 3 ] } , basename : function ( t , e ) { return t = Yx ( t ) [ 2 ] , e && t . substr ( - 1 * e . length ) === e ? t . substr ( 0 , t . length - e . length ) : t } , dirname : function ( n ) { var e = ( n = Yx ( 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 = Qx ( t ) . substr ( 1 ) , e = Qx ( 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 kq ( Xb ( 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 : Bz , normalize : kq , resolve : Qx } ; function Xb ( 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 Xwe = "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 jz ( t , e ) { return ( jz = Object . setPrototypeOf ? Object . setPrototypeOf . bind ( ) : function ( n , r ) { return n . _ _proto _ _ = r , n } ) ( t , e ) } var Yb = function ( t ) { var e ; function n ( ) { return t . apply ( this , arguments ) || this } e = t , ( r = n ) . prototype = Object . create ( e . prototype ) , jz ( r . prototype . constructor = r , e ) ; var r = n . prototype ; return r . resolve = function ( i , s ) { return I1 . resolve ( I1 . dirname ( i ) , s ) } , r . isRelative = function ( i ) { return i . indexOf ( "./" ) === 0 || i . indexOf ( "../" ) === 0 } , n } ( L1 . EmitterObj ) ; function Uz ( t , e ) { return ( Uz = Object . setPrototypeOf ? Object . setPrototypeOf . bind ( ) : function ( n , r ) { return n . _ _proto _ _ = r , n } ) ( t , e ) } var Ywe = 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 ) , Uz ( e . prototype . co
2024-04-02 15:03:09 +08:00
/* [wrapped with `+q+`] */
2024-04-15 09:41:50 +08:00
` )):R}(O,function(R,q){return ni(d,function(Y){var ee="_."+Y[0];q&Y[1]&&!Dl(R,ee)&&R.push(ee)}),R.sort()}(function(){var R=O.match(Yr);return R?R[1].split(ir):[]}(),w)))}function nO(p){var y=0,w=0;return function(){var O=fie(),R=16-(O-w);if(w=O,0<R){if(800<=++y)return arguments[0]}else y=0;return p.apply(n,arguments)}}function _8(p,y){var w=-1,O=p.length,R=O-1;for(y=y===n?O:y;++w<y;){var q=Vd(w,R),Y=p[q];p[q]=p[w],p[w]=Y}return p.length=y,p}var rO=function(){var p=w8(function(w){var O=[];return w.charCodeAt(0)===46&&O.push(""),w.replace(pt,function(R,q,Y,ee){O.push(Y?ee.replace(Qr," $ 1"):q||R)}),O},function(w){return y.size===500&&y.clear(),w}),y=p.cache;return p}();function pa(p){var y;return typeof p=="string"||Xs(p)?p:(y=p+"")=="0"&&1/p==-1/0?"-0":y}function B3(p){if(p!=null){try{return X6.call(p)}catch{}try{return p+""}catch{}}return""}function iO(p){var y;return p instanceof Yt?p.clone():((y=new Ll(p.__wrapped__,p.__chain__)).__actions__=xs(p.__actions__),y.__index__=p.__index__,y.__values__=p.__values__,y)}function sO(p,y,w){var O=p==null?0:p.length;return O?((w=w==null?0:kt(w))<0&&(w=ii(O+w,0)),la(p,yt(y,3),w)):-1}function lO(p,y,w){var O,R=p==null?0:p.length;return R?(O=R-1,w!==n&&(O=kt(w),O=w<0?ii(R+O,0):Ui(O,R-1)),la(p,yt(y,3),O,!0)):-1}function aO(p){return p!=null&&p.length?Oi(p,1):[]}function oO(p){return p&&p.length?p[0]:n}function fl(p){var y=p==null?0:p.length;return y?p[y-1]:n}function uO(p,y){return p&&p.length&&y&&y.length?qd(p,y):p}kd=Ft(function(p,y){return jr(p)?L4(p,Oi(y,1,jr,!0)):[]}),ua=Ft(function(p,y){var w=fl(y);return jr(w)&&(w=n),jr(p)?L4(p,Oi(y,1,jr,!0),yt(w,2)):[]}),R4=Ft(function(p,y){var w=fl(y);return jr(w)&&(w=n),jr(p)?L4(p,Oi(y,1,jr,!0),n,w):[]}),nn=Ft(function(p){var y=pn(p,Wd);return y.length&&y[0]===p[0]?Ud(y):[]}),n0=Ft(function(p){var y=fl(p),w=pn(p,Wd);return y===fl(w)?y=n:w.pop(),w.length&&w[0]===p[0]?Ud(w,yt(y,2)):[]}),Dd=Ft(function(p){var y=fl(p),w=pn(p,Wd);return(y=typeof y=="function"?y:n)&&w.pop(),w.length&&w[0]===p[0]?Ud(w,n,y):[]}),Mi=Ft(uO);var Aie=Xa(function(p,y){var w=p==null?0:p.length,O=Ld(p,y);return bC(p,pn(y,function(R){return Ya(R,w)?+R:R}).sort(kC)),O});function um(p){return p==null?p:hie.call(p)}var Cie=Ft(function(p){return D2(Oi(p,1,jr,!0))}),Oie=Ft(function(p){var y=fl(p);return jr(y)&&(y=n),D2(Oi(p,1,jr,!0),yt(y,2))}),Nie=Ft(function(p){var y=typeof(y=fl(p))=="function"?y:n;return D2(Oi(p,1,jr,!0),n,y)});function cm(p){var y;return p&&p.length?(y=0,p=vi(p,function(w){if(jr(w))return y=ii(w.length,y),!0}),V6(y,function(w){return pn(p,aa(w))})):[]}function cO(p,y){return p&&p.length?(p=cm(p),y==null?p:pn(p,function(w){return gi(y,n,w)})):[]}var Iie=Ft(function(p,y){return jr(p)?L4(p,y):[]}),Rie=Ft(function(p){return Jd(vi(p,jr))}),kie=Ft(function(p){var y=fl(p);return jr(y)&&(y=n),Jd(vi(p,jr),yt(y,2))}),Die=Ft(function(p){var y=typeof(y=fl(p))=="function"?y:n;return Jd(vi(p,jr),n,y)}),Pie=Ft(cm),Lie=Ft(function(p){var y=typeof(y=1<(y=p.length)?p[y-1]:n)=="function"?(p.pop(),y):n;return cO(p,y)});function fO(p){return(p=B(p)).__chain__=!0,p}function E8(p,y){return y(p)}var Fie=Xa(function(p){function y(q){return Ld(q,p)}var w=p.length,O=w?p[0]:0,R=this.__wrapped__;return!(1<w||this.__actions__.length)&&R instanceof Yt&&Ya(O)?((R=R.slice(O,+O+(w?1:0))).__actions__.push({func:E8,args:[y],thisArg:n}),new Ll(R,this.__chain__).thru(function(q){return w&&!q.length&&q.push(n),q})):this.thru(y)}),Bie=p8(function(p,y,w){Yn.call(p,w)?++p[w]:Ja(p,w,1)}),jie=jC(sO),Uie=jC(lO);function pO(p,y){return(Nt(p)?ni:k2)(p,yt(y,3))}function hO(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}:uC)(p,yt(y,3))}var Mie=p8(function(p,y,w){Yn.call(p,w)?p[w].push(y):Ja(p,w,[y])}), $ ie=Ft(function(p,y,w){var O=-1,R=typeof y=="function",q=bs(p)?ye(p.length):[];return k2(p,function(Y){q[++O]=R?gi(y,Y,w):F4(Y,y,w)}),q}),Hie=p8(function(p,y,w){Ja(p,w,y)});function x8(p,y){return(Nt(p)?pn:yC)(p,yt(y,3))}var qie=p8(function(p,y,w){p[w?0:1].push(y)},function(){return[[],[]]}),Vie=Ft(function(p,y){var w;return p==null?[]:(1<(w=y.length)&&os(p,y[0],y[
` ;if(p.replace(de,function(be,Ee,Oe,ot,Fe,Ue){return Oe=Oe||ot,he+=p.slice(ee,Ue).replace(br,KA),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-15 09:41:50 +08:00
_ _p += '`),Oe&&(he+=`' +
( ( _ _t = ( ` +Oe+ ` ) ) == null ? '' : _ _t ) +
2024-04-02 15:03:09 +08:00
'`),ee=Ue+be.length,be}),he+=`' ;
2024-04-15 09:41:50 +08:00
` ,oe=Yn.call(y,"variable")&&y.variable){if(Zn.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-15 09:41:50 +08:00
} ` ,(de=PO(function(){return Ot(q,Ne+"return "+he).apply(n,Y)})).source=he,mm(de))throw de;return de},B.times=function(p,y){if((p=kt(p))<1||u<p)return[];var w=f,O=Ui(p,f);for(y=yt(y),p-=f,O=V6(O,y);++w<p;)y(w);return O},B.toFinite=Za,B.toInteger=kt,B.toLength=SO,B.toLower=function(p){return vn(p).toLowerCase()},B.toNumber=hl,B.toSafeInteger=function(p){return p?P3(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)?Va(p):p&&(y=Ws(y))?L2(w=Pl(p),z6(w,y=Pl(y)),G6(w,y)+1).join(""):p},B.trimEnd=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.slice(0,JA(p)+1):p&&(y=Ws(y))?L2(w=Pl(p),0,G6(w,Pl(y))+1).join(""):p},B.trimStart=function(p,y,w){return(p=vn(p))&&(w||y===n)?p.replace(en,""):p&&(y=Ws(y))?L2(w=Pl(p),z6(w,Pl(y))).join(""):p},B.truncate=function(p,R){var w,Y=30,O="...",R=(Sr(R)&&(w="separator"in R?R.separator:w,Y="length"in R?kt(R.length):Y,O="omission"in R?Ws(R.omission):O),(p=vn(p)).length);if((R=N3(p)?(q=Pl(p)).length:R)<=Y)return p;if((R=Y-Zu(O))<1)return O;var q,Y=q?L2(q,0,R).join(""):p.slice(0,R);if(w!==n)if(q&&(R+=Y.length-R),ym(w)){if(p.slice(R).search(w)){var ee,oe=Y;for((w=w.global?w:I3(w.source,vn(is.exec(w))+"g")).lastIndex=0;ee=w.exec(oe);)var he=ee.index;Y=Y.slice(0,he===n?R:he)}}else p.indexOf(Ws(w),R)!=R&&-1<(q=Y.lastIndexOf(w))&&(Y=Y.slice(0,q));return Y+O},B.unescape=function(p){return(p=vn(p))&>.test(p)?p.replace(Pe,rie):p},B.uniqueId=function(p){var y=++sie;return vn(p)+y},B.upperCase=mse,B.upperFirst=_m,B.each=pO,B.eachRight=hO,B.first=oO,bm(B,(Am={},ca(B,function(p,y){Yn.call(B.prototype,y)||(Am[y]=p)}),Am),{chain:!1}),B.VERSION="4.17.21",ni(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){B[p].placeholder=B}),ni(["drop","take"],function(p,y){Yt.prototype[p]=function(w){w=w===n?1:ii(kt(w),0);var O=this.__filtered__&&!y?new Yt(this):this.clone();return O.__filtered__?O.__takeCount__=Ui(w,O.__takeCount__):O.__views__.push({size:Ui(w,f),type:p+(O.__dir__<0?"Right":"")}),O},Yt.prototype[p+"Right"]=function(w){return this.reverse()[p](w).reverse()}}),ni(["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}}),ni(["head","last"],function(p,y){var w="take"+(y?"Right":"");Yt.prototype[p]=function(){return this[w](1).value()[0]}}),ni(["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(Ss)},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 F4(w,p,y)})}),Yt.prototype.reject=function(p){return this.filter(S8(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)},ca(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,sa([ot],he)),O&&Ne?ot[0]:ot}var ee,oe=this.__wrapped__,he=O?[1]:arguments,Oe=oe instanceof Yt,be=he[0],de=Oe||Nt(oe),Ne=(de&&w&&typeof be=="function"&&be.length!=1&&(Oe=de=!1),this.__chain__),be=!!this.__actions__.length,Ee=q&&!Ne,Oe=Oe&&!be;return!q&&de?(oe=Oe?oe:new Yt(this),(ee=p.apply(oe,he)).__actions__.push({func:E8,args:[Y],thisArg:n}),new Ll(ee,Ne)):Ee&&Oe?p.apply(this,he):(ee=this.thru(Y),Ee?O?ee.value()[0]:ee.value():ee)})}),ni(["pop","push","shift","sort","splice","unshift"],function(p){var y=W6[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=NSe(o,s);u&&l.push(u)}}else l.push(o)}return l.length!==0&&l[0].name==="EXTM3U"||Ke("The EXTM3U tag MUST be the first line."),l}(t,e),r=ISe(n,e);return r.source=t,r}var RSe=["#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"],kSe=["#EXT-X-MEDIA"],pw=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(RSe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(kSe.some(r=>n.startsWith(r)))continue;Ke( ` Redundant item ( $ { n } ) ` )}super.push(n)}else super.push(n);return this.length}};function yw(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 DSe(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 yG(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&&Ke("IV must be a 128-bit unsigned integer"),r.push( ` IV = $ { hG ( t . iv ) } ` )),t.format&&r.push( ` KEYFORMAT = "${t.format}" ` ),t.formatVersion&&r.push( ` KEYFORMATVERSIONS = "${t.formatVersion}" ` ), ` $ { n } : $ { r . join ( "," ) } ` }function PSe(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 = $ { yw ( 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(fp(i))}if(e.video.length>0){r.push( ` VIDEO = "${e.video[0].groupId}" ` );for(let i of e.video)t.push(fp(i))}if(e.subtitles.length>0){r.push( ` SUBTITLES = "${e.subtitles[0].groupId}" ` );for(let i of e.subtitles)t.push(fp(i))}if(ESe().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(fp(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 fp(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 LSe(t,e,n,r,i=1,s=null){let l=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=yG(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 = "${ow(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 : $ { aw ( e . programDateTime ) } ` ),e.dateRange&&t.push(function(u){let c=[ ` ID = "${u.id}" ` ];u.start&&c.push( ` START - DATE = "${aw(u.start)}" ` ),u.end&&c.push( ` END - DATE = "${aw(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 vG="hls_cache",Tp=[],Ru={},l6={},Iu={},Sp="";function FSe(t,e){if(Tp.push(t),Ru[t]=e,Tp.length>5){let n=Tp.shift();BSe(n)}}function BSe(t){delete Ru[t],delete Tp[t],new JSFile(vG+"/"+t).delete()}function jSe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=gw(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=gw(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=gw(t,n.key.uri));return e}async function _G(t,e){let n=md5X(t);if(Ru[n])return Ru[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=jSe(i,mG(s));return FSe(n,{code:r.code,plist:l,key:n,headers:r.headers}),Ru[n]}return{}}async function EG(t,e,n){if(!Ru[t])return{};let i=Ru[t].plist.segments,s=!Iu[t];if(s){Iu[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());Iu[t][f]={file:vG+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in Iu[t]){let f=Iu[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}s&&USe(t,5,n);let l=i[e],a=md5X(l.uri+l.mediaSequenceNumber.toString()),o=Iu[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&&xG(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 xG(t,e,n){if(e.state>=0||!l6[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 USe(t,e,n){Sp&&Sp!=t&&delete l6[Sp],Sp=t,l6[t]=!0;for(let r=0;r<e&&l6[t];r++)new Promise(function(i,s){(async function l(){if(!l6[t]){i();return}let a=Q.pickBy(Iu[t],function(u){return u.state==-1}),o=Q.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await xG(t,o,n),setTimeout(l,5)})()})}function gw(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 bG(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 > ` ) } ) , S t r i n g . r a w ` < ? x m l v e r s i o n = " 1 . 0 " e n c o d i n g = " U T F - 8 " ? > < i > < c h a t s e r v e r > c h a t . b i l i b i l i . c o m < / c h a t s e r v e r > < c h a t i d > 5 2 1 7 5 6 0 2 < / c h a t i d > < m i s s i o n > 0 < / m i s s i o n > < m a x l i m i t > 1 0 0 0 < / m a x l i m i t > < s t a t e > 0 < / s t a t e > < r e a l _ n a m e > 0 < / r e a l _ n a m e > < s o u r c e > k - v < / s o u r c e > ` + e . j o i n ( " " ) + " < / i > " } v a r A p = c l a s s { c o n s t r u c t o r ( ) { t h i s . s i t e U r l = " h t t p s : / / s e a r c h . y o u k u . c o m " , t h i s . r e c o n n e c t T i m e s = 0 , t h i s . m a x R e c o n n e c t T i m e s = 5 , t h i s . j a d e L o g = n e w C a ( t h i s . g e t A p p N a m e ( ) , " D E B U G " ) } g e t A p p N a m e ( ) { r e t u r n " \ u 5 F 3 9 \ u 5 E 5 5 " } g e t H e a d e r ( ) { r e t u r n { " U s e r - A g e n t " : X i , R e f e r e r : t h i s . s i t e U r l + " / " } } a s y n c r e c o n n n e c t ( e , n , r , i , s , l ) { r e t u r n a w a i t t h i s . j a d e L o g . e r r o r ( " \ u 8 B F 7 \ u 6 C 4 2 \ u 5 9 3 1 \ u 8 D 2 5 , \ u 8 B F 7 \ u 6 8 C 0 \ u 6 7 E 5 u r l : " + e + " , \ u 4 E 2 4 \ u 7 9 D 2 \ u 5 4 0 E \ u 9 1 C D \ u 8 B D 5 " ) , b o ( 2 ) , t h i s . r e c o n n e c t T i m e s < t h i s . m a x R e c o n n e c t T i m e s ? ( t h i s . r e c o n n e c t T i m e s = t h i s . r e c o n n e c t T i m e s + 1 , a w a i t t h i s . f e t c h ( e , n , r , i , s , l ) ) : ( a w a i t t h i s . j a d e L o g . e r r o r ( " \ u 8 B F 7 \ u 6 C 4 2 \ u 5 9 3 1 \ u 8 D 2 5 , \ u 9 1 C D \ u 8 F D E \ u 5 9 3 1 \ u 8 D 2 5 " ) , n u l l ) } a s y n c g e t R e s p o n s e ( e , n , r , i , s , l , a ) { r e t u r n a . h e a d e r s . l o c a t i o n ! = = v o i d 0 ? i ? ( a w a i t t h i s . j a d e L o g . d e b u g ( ` \ u 8 F D 4 \ u 5 6 D E \ u 9 1 C D \ u 5 B 9 A \ u 5 4 1 1 \ u 8 F D E \ u 6 3 A 5 : $ { a . h e a d e r s . l o c a t i o n } ` ) , a . h e a d e r s . l o c a t i o n ) : t h i s . f e t c h ( a . h e a d e r s . l o c a t i o n , n , r , i , s , l ) : a . c o n t e n t . l e n g t h > 0 ? ( t h i s . r e c o n n e c t T i m e s = 0 , s ? { c o o k i e : a . h e a d e r s [ " s e t - c o o k i e " ] , c o n t e n t : a . c o n t e n
` ).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||e[n]&&ROe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var kW=Symbol("internals");function E6(t){return t&&String(t).trim().toLowerCase()}function eh(t){return t===!1||t==null?t:le.isArray(t)?t.map(eh):String(t)}function kOe(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 DOe=t=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( t . trim ( ) ) ; function dS ( 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 POe ( t ) { return t . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( e , n , r ) => n . toUpperCase ( ) + r ) } function LOe ( 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 s4 = class { constructor ( e ) { e && this . set ( e ) } set ( e , n , r ) { let i = this ; function s ( a , o , u ) { let c = E6 ( 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 ] = eh ( 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 ( ) ) && ! DOe ( e ) ? l ( RW ( e ) , n ) : e != null && s ( n , e , r ) , this } get ( e , n ) { if ( e = E6 ( e ) , e ) { let r = le . findKey ( this , e ) ; if ( r ) { let i = this [ r ] ; if ( ! n ) return i ; if ( n === ! 0 ) return kOe ( 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 = E6 ( e ) , e ) { let r = le . findKey ( this , e ) ; return ! ! ( r && this [ r ] !== void 0 && ( ! n || dS ( this , this [ r ] , r , n ) ) ) } return ! 1 } delete ( e , n ) { let r = this , i = ! 1 ; function s ( l ) { if ( l = E6 ( l ) , l ) { let a = le . findKey ( r , l ) ; a && ( ! n || dS ( 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 || dS ( 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 ] = eh ( i ) , delete n [ s ] ; return } let a = e ? POe ( s ) : String ( s ) . trim ( ) ; a !== s && delete n [ s ] , n [ a ] = eh ( 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[kW]=this[kW]={accessors:{}}).accessors,i=this.prototype;function s(l){let a=E6(l);r[a]||(LOe(i,l),r[a]=!0)}return le.isArray(e)?e.forEach(s):s(e),this}};s4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(s4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});le.freezeMethods(s4);var pi=s4;function x6(t,e){let n=this||i4,r=e||n,i=pi.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 b6(t){return!!(t&&t.__CANCEL__)}function DW(t,e,n){Xe.call(this,t??"canceled",Xe.ERR_CANCELED,e,n),this.name="CanceledError"}le.inherits(DW,Xe,{__CANCEL__:!0});var ta=DW;function Oo(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Xe("Request failed with status code "+n.status,[Xe.ERR_BAD_REQUEST,Xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mS(t){return/^([a-z][a-z \d + \- .]*:)? \/ \/ /i.test(t)}function yS(t,e){return e?t.replace(/ \/ ? \/ $ /,"")+"/"+e.replace(/^ \/ +/,""):t}function Uu(t,e){return t&&!mS(e)?yS(t,e):e}var nX=Pr(LW(),1),rX=Pr(require("http"),1),iX=Pr(require("https"),1),sX=Pr(require("util"),1),lX=Pr(HW(),1),T2=Pr(require("zlib"),1);var $ u="1.6.7";function O6(t){let e=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(t);return e&&e[1]||""}var QOe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([ \s \S ]*) $ /;function NS(t,e,n){let r=n&&n.Blob||fi.classes.Blob,i=O6(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let s=QOe.exec(t);if(!s)throw new Xe("Invalid URL",Xe.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 Xe("Blob is not supported",Xe.ERR_NOT_SUPPORT);return new r([u],{type:l})}return u}throw new Xe("Unsupported protocol "+i,Xe.ERR_NOT_SUPPORT)}var Hu=Pr(require("stream"),1);var VW=Pr(require("stream"),1);function ZOe(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 qW=ZOe;function eNe(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 th=eNe;var nh=Symbol("internals"),IS=class extends VW.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[nh]={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=th(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let s=0;r.updateProgress=qW(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[nh];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,s=this[nh],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.
` ,rNe=N6.encode(No),iNe=2,kS=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 ) } " ` : "" } $ { No } ` ;i?n=N6.encode(String(n).replace(/ \r ? \n | \r \n ?/g,No)):s+= ` Content - Type : $ { n . type || "application/octet-stream" } $ { No } ` ,this.headers=N6.encode(s+No),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+iNe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;le.isTypedArray(e)?yield e:yield*rh(e),yield rNe}static escapeName(e){return String(e).replace(/[ \r \n "]/g,n=>({" \r ":"%0D"," \n ":"%0A",'"':"%22"})[n])}},sNe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:s=r+"-"+le.generateString(i,nNe)}=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=N6.encode("--"+s+No),a=N6.encode("--"+s+"--"+No+No),o=a.byteLength,u=Array.from(t.entries()).map(([f,d])=>{let h=new kS(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),KW.Readable.from(async function*(){for(let f of u)yield l,yield*f.encode();yield a}())},JW=sNe;var WW=Pr(require("stream"),1),DS=class extends WW.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)}},XW=DS;var lNe=(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,YW=lNe;var QW={flush:T2.default.constants.Z_SYNC_FLUSH,finishFlush:T2.default.constants.Z_SYNC_FLUSH},aNe={flush:T2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:T2.default.constants.BROTLI_OPERATION_FLUSH},ZW=le.isFunction(T2.default.createBrotliDecompress),{http:oNe,https:uNe}=lX.default,cNe=/https:?/,eX=fi.protocols.map(t=>t+":");function fNe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function oX(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,nX.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){oX(s,e,s.href)}}var pNe=typeof process<"u"&&le.kindOf(process)==="process",hNe=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)}),dNe=({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)}},tX=(t,e)=>dNe(le.isObject(t)?t:{address:t,family:e}),uX=pNe&&function(e){return hNe(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=YW(a,re=>le.isArray(re)?re:[re]);a=(re,I,j)=>{W(re,I,(F,L,Je)=>{if(F)return j(F);let Be=le.isArray(L)?L.map(Re=>tX(Re)):[tX(L,Je)];I.all?j(F,Be):j(F,Be[0].address,Be[0].family)})}}let x=new aX.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 ta(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=Uu(e.baseURL,e.url),v=new URL(E,"http://localhost"),g=v.protocol||eX[0];if(g==="data:"){let W;if(f!=="GET")return Oo(r,i,{status:405,
` +s.map(dX).join( `
` ):" "+dX(s[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:PS};function LS(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ta(null,t)}function sh(t){return LS(t),t.headers=pi.from(t.headers),t.data=x6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ih.getAdapter(t.adapter||i4.adapter)(t).then(function(r){return LS(t),r.data=x6.call(t,t.transformResponse,r),r.headers=pi.from(r.headers),r},function(r){return b6(r)||(LS(t),r&&r.response&&(r.response.data=x6.call(t,t.transformResponse,r.response),r.response.headers=pi.from(r.response.headers))),Promise.reject(r)})}var mX=t=>t instanceof pi?t.toJSON():t;function A2(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(mX(u),mX(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 FS={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{FS[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var yX={};FS.transitional=function(e,n,r){function i(s,l){return"[Axios v"+ $ u+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,a)=>{if(e===!1)throw new Xe(i(l," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!yX[l]&&(yX[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 gNe(t,e,n){if(typeof t!="object")throw new Xe("options must be an object",Xe.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 Xe("option "+s+" must be "+o,Xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xe("Unknown option "+s,Xe.ERR_BAD_OPTION)}}var lh={assertOptions:gNe,validators:FS};var Io=lh.validators,a4=class{constructor(e){this.defaults=e,this.interceptors={request:new cS,response:new cS}}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=A2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&lh.assertOptions(r,{silentJSONParsing:Io.transitional(Io.boolean),forcedJSONParsing:Io.transitional(Io.boolean),clarifyTimeoutError:Io.transitional(Io.boolean)},!1),i!=null&&(le.isFunction(i)?n.paramsSerializer={serialize:i}:lh.assertOptions(i,{encode:Io.function,serialize:Io.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=pi.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=[sh.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=sh.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=A2(this.defaults,e);let n=Uu(e.baseURL,e.url);return ju(n,e.params,e.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(e){a4.prototype[e]=function(n,r){return this.request(A2(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(A2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}a4.prototype[e]=n(),a4.prototype[e+"Form"]=n(!0)});var I6=a4;var BS=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 ta(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}}},gX=BS;function jS(t){return function(n){return t.apply(null,n)}}function US(t){return le.isObject(t)&&t.isAxiosError===!0}var MS={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(MS).forEach(([t,e])=>{MS[e]=t});var vX=MS;function _X(t){let e=new I6(t),n=g6(I6.prototype.request,e);return le.extend(n,I
` },timeout:.1}),await dataBase.push(r,qS)}globalThis.localLog={set:async function(t,e,n){ONe(t,e,n)}};function CNe(){qu.default.existsSync("log")||qu.default.mkdirSync("log");let t="log/info.log";return qu.default.existsSync(t)?qu.default.readFileSync(t).toString():(qu.default.writeFileSync(t,""),"")}function ONe(t){qu.default.writeFileSync("log/info.log",CNe()+ `
` +t)}globalThis.req=NNe;async function NNe(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=CX.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=EX(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=IX.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=OX.default.Agent({rejectUnauthorized:!1});let f=await o4(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=INe;function INe(t){return NX.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 RNe=["DEBUG","INFO","WARNING","ERROR"];var c4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=RNe.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/ \/ /g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)), ` $ { this . getTime ( ) } - $ { this . app _name } - $ { e } : $ { n } ` }async log(e){console.debug(e),await req("http://192.168.0.116:8099/upload",{data:{log:e+ `
` },timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Me=class extends qe{constructor(){super(),this.jadeLog=new c4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info(" \u 521D \u 59CB \u 5316",!0);try{await await req("http://192.168.0.116:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug(" \u 8BFB \u 53D6 \u 7F13 \u 5B58 \u 5217 \u 8868 \u 548C \u 4E8C \u 7EA7 \u 83DC \u 5355 \u 6210 \u 529F"):(await this.jadeLog.warning(" \u 8BFB \u 53D6 \u 7F13 \u 5B58 \u 5217 \u 8868 \u 548C \u 4E8C \u 7EA7 \u 83DC \u 5355 \u 5931 \u 8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error(" \u 8BFB \u 53D6 \u 7F13 \u 5B58 \u 5931 \u 8D25, \u 5931 \u 8D25 \u 539F \u 56E0 \u 4E3A:"+r,!1)}}catch(r){await this.jadeLog.error( ` \u521D\u59CB\u5316\u5931\u8D25 , \u5931\u8D25\u539F\u56E0\u4E3A : $ { r } ` )}await this.jadeLog.info(" \u 521D \u 59CB \u 5316 \u 5B8C \u 6210",!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:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return Q.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Q.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info(" \u 6B63 \u 5728 \u 89E3 \u 6790 \u 9996 \u 9875 \u 7C7B \u 522B",!0),await this.setHome(),await this.jadeLog.debug( ` \u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A : $ { this . result . home ( this . classes , [ ] , this . filterObj ) } ` ),await this.jadeLog.info(" \u 9996 \u 9875 \u 7C7B \u 522B \u 89E3 \u 6790 \u 5B8C \u 6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info(" \u 6B63 \u 5728 \u 89E3 \u 6790 \u 9996 \u 9875 \u 5185 \u 5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug( ` \u9996\u9875\u5185\u5BB9\u4E3A : $ { this . result . homeVod ( this . homeVodList ) } ` ),await this.jadeLog.info(" \u 9996 \u 9875 \u 5185 \u 5BB9 \u 89E3 \u 6790 \u 5B8C \u 6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error( ` \u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25 , \u5931\u8D25\u539F\u56E0\u4E3A : $ { e } ` )}}async category(e,n){let r=e.body.id,i=e.body.page,s=!0,l=e.body.filters;if(this.page=parseInt(i),await this.jadeLog.info( ` \u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762 , tid = $ { r } , pg = $ { i } , extend = $ { JSON . stringify ( l ) } ` ),r===" \u 6700 \u 8FD1 \u 66F4 \u 65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,i,s,l),await this.jadeLog.debug( ` \u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A : $ { this . result . category ( this . vodList , this . page , this . count , this . limit , this . total ) } ` ),await this.jadeLog.info(" \u 5206 \u 7C7B \u 9875 \u 9762 \u 89E3 \u 6790 \u 5B8C \u 6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error( ` \u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25 , \u5931\u8D25\u539F\u56E0\u4E3A : $ { a } ` )}}async detail(e,n){await this.jadeLog.debug( ` \u83B7\u53D6\u8BE6\u60C5\u9875\u9762 : $ { JSON . stringify ( e . body ) } ` );let i=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=n
2024-04-12 14:29:25 +08:00
` ).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-15 09:41:50 +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":Eo,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":Eo,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=Yi(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":Xi}}):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:""})}},xn=new JS;var WS=class extends Me{constructor(){super()}getName(){return xn.getName()}getAppName(){return xn.getAppName()}getJSName(){return xn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),await super.init(e,n)}async setClasses(){await xn.setClasses(),this.classes=xn.classes}async setFilterObj(){await xn.setFilterObj(),this.filterObj=xn.filterObj}async setHomeVod(){await xn.setHomeVod(),this.homeVodList=xn.homeVodList}async setCategory(e,n,r,i){await xn.setCategory(e,n,r,i),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,r){await xn.setPlay(e,n,r),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,r){await xn.setSearch(e,n,r),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},Po=new WS;async function JX(t,e){return await Po.init(t,e)}async function WX(t,e){return await Po.home(t,e)}async function zNe(t,e){return await Po.homeVod(t,e)}async function XX(t,e){return await Po.category(t,e)}async function YX(t,e){return await Po.detail(t,e)}async function QX(t,e){return await Po.play(t,e)}async function ZX(t,e){return await Po.search(t,e)}async function GNe(t,e){return await Po.proxy(t,e)}var eY={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",JX),t.post("/home",WX),t.post("/category",XX),t.post("/detail",YX),t.post("/play",QX),t.post("/search",ZX),t.get("/proxy/:what/:ids/:end",GNe)},spider:{init:JX,home:WX,homeVod:zNe,category:XX,detail:YX,play:QX,search:ZX}};var XS=class extends qe{constructor(){super(),this.siteUrl="http://m.dj0898.com"}getName(){return" \u {1F3B5} \u 2503 \u 4E16 \u 7EAADJ \u 97F3 \u 4E50 \u 7F51 \u 2503 \u {1F3B5}"}getAppName(){return" \u 4E16 \u 7EAADJ \u 97F3 \u 4E50 \u 7F51"}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 $ s,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("i
2024-04-12 14:29:25 +08:00
` ),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("[ \u 6536 \u 8D77 \u 90E8 \u 5206]","").replace("[ \u 5C55 \u 5F00 \u 5168 \u 90E8]","").replaceAll(" ","").replaceAll( `
2024-04-15 09:41:50 +08:00
` ,"");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 ke;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=Qe(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!==" \u 9996 \u 9875"){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:" \u 5168 \u 90E8",v:"0"});for(let l of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()===" \u 5168 \u 90E8 \u 7C7B \u 578B"?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:" \u 5168 \u 90E8",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!==" \u 6700 \u 8FD1 \u 66F4 \u 65B0"){let r=this.siteUrl+ ` / vodshow / id / $ { n } . html ` ,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=Qe(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=Qe(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=Qe(l);this.vodList=await this.parseVodShortListFromDoc(a);let o=Ae(/ \$ \( " \. 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=Qe(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=Ae(/<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=Qe(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},Tn=new rT;var iT=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await Tn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await Tn.initCookie(e.server.config.bilicookie),await Tn.spiderInit(e),Tn.cfgObj.code=0,Tn.catOpenStatus=!0,Tn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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=Ae(/名称:(.*?) \n /,l),n.vod_actor=Ae(/主演:(.*?) \n /,l),n.vod_director=Ae(/导演:(.*?) \n /,l),n.vod_area=Ae(/地区:(.*?) \n /,l),n.vod_year=Ae(/年份:(.*?) \n /,l),n.vod_remarks=Ae(/更新:(.*?) \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(" \u 4E0B \u 8F7D"," \u 64AD \u 653E"));let m=[];for(let x of e(o[f]).find("a")){let b=e(x).text().replaceAll(" \u 78C1 \u 529B \u 94FE \u 4E0B \u 8F7D","").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=Qe(e.ajaxtxt),i=r(r("ul")).find("li");for(let s of i){let l=new ke;l.vod_pic=r(s).find("img")[0].attribs["data-original"],l.vod_name=Ae(/《(.*?)》/,r(s).find("img")[0].attribs.alt),l.vod_id=r(s).find("a")[0].attribs.href,l.vod_remarks=" \u 8BC4 \u 5206:"+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 ke;s.vod_id=e(i).find("a")[0].attribs.href,s.vod_name=Ae(/《(.*?)》/,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=Qe(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},Rn=new yT;var gT=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await Rn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await Rn.initCookie(e.server.config.bilicookie),await Rn.spiderInit(e),Rn.cfgObj.code=0,Rn.catOpenStatus=!0,Rn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await Rn.setSearch(e,n,r),this.vodList=Rn.vodList,this.result=Rn.result}async setProxy(e,n){return await Rn.proxy(e,n)}},Jo=new gT;async function pQ(t,e){return await Jo.init(t,e)}async function hQ(t,e){return await Jo.home(t,e)}async function bIe(t,e){return await Jo.homeVod(t,e)}async function dQ(t,e){return await Jo.category(t,e)}async function mQ(t,e){return await Jo.detail(t,e)}async function yQ(t,e){return await Jo.play(t,e)}async function gQ(t,e){return await Jo.search(t,e)}async function wIe(t,e){return await Jo.proxy(t,e)}var vQ={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",pQ),t.post("/home",hQ),t.post("/category",dQ),t.post("/detail",mQ),t.post("/play",yQ),t.post("/search",gQ),t.get("/proxy/:what/:ids/:end",wIe)},spider:{init:pQ,home:hQ,h
` );r.vod_name=i[0].replaceAll(/< \\ ?[^>]+>/g,"").replace(" \u 540D \u 79F0 \u FF1A","");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(" \u 63CF \u 8FF0")>-1&&(r.vod_content=a.replace(" \u 63CF \u 8FF0 \u FF1A","").replaceAll(/< \\ ?[^>]+>/g,"")),a.indexOf(" \u 6807 \u 7B7E \u FF1A")>-1&&(r.type_name=a.replace(" \u {1F3F7} \u 6807 \u 7B7E \u FF1A","")),a.indexOf(" \u 94FE \u 63A5 \u FF1A")>-1&&(l=a.replaceAll(/< \\ ?[^>]+>/g,"").replace(" \u 94FE \u 63A5 \u FF1A",""));try{let a=await Fs([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(" \u 641C \u 7D22 \u 9875 \u 9762 \u 89E3 \u 6790 \u 5931 \u 8D25",!0);else{let a=JSON.parse(l).pageProps.data.data;for(let o of a){let u=new ke;u.vod_id=JSON.stringify(o);let c=o.content.split( `
` );u.vod_name=c[0].replaceAll(/< \\ ?[^>]+>/g,"").replace(" \u 540D \u 79F0 \u FF1A","");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=Qe(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await Bs(e,n,r)}},Dn=new ET;var xT=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await Dn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await Dn.initCookie(e.server.config.bilicookie),await Dn.spiderInit(e),Dn.cfgObj.code=0,Dn.catOpenStatus=!0,Dn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await Dn.setSearch(e,n,r),this.vodList=Dn.vodList,this.result=Dn.result}async setProxy(e,n){return await Dn.proxy(e,n)}},Xo=new xT;async function AQ(t,e){return await Xo.init(t,e)}async function CQ(t,e){return await Xo.home(t,e)}async function AIe(t,e){return await Xo.homeVod(t,e)}async function OQ(t,e){return await Xo.category(t,e)}async function NQ(t,e){return await Xo.detail(t,e)}async function IQ(t,e){return await Xo.play(t,e)}async function RQ(t,e){return await Xo.search(t,e)}async function CIe(t,e){return await Xo.proxy(t,e)}var kQ={meta:{key:Dn.getJSName(),name:Dn.getName(),type:Dn.getType()},api:async t=>{t.post("/init",AQ),t.post("/home",CQ),t.post("/category",OQ),t.post("/detail",NQ),t.post("/play",IQ),t.post("/search",RQ),t.get("/proxy/:what/:ids/:end",CIe)},spider:{init:AQ,home:CQ,homeVod:AIe,category:OQ,detail:NQ,play:IQ,search:RQ}};var bT=class extends qe{constructor(){super(),this.siteUrl="https://www.dygangs.xyz"}getAppName(){return" \u 7535 \u 5F71 \u 6E2F"}getName(){return" \u {1F3D6} \u FE0F \u 2503 \u 7535 \u 5F71 \u 6E2F \u 2503 \u {1F3D6} \u FE0F"}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=" \u 6309 \u 7C7B \u 578B",l={key:s,name:s,value:[]};l.name=s,l.value.push({n:" \u 5168 \u 90E8",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!==" \u 6700 \u 8FD1 \u 66F4 \u 65B0"){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 ke;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=xo+"/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 Ge,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Ae(/◎片 名 (.*?)<br>/,e(r).html()),n.vod_area=Ae(/◎产 地 (.*?)<br>/,e(r).html()),n.vod_year=Ae(/◎年 代 (.*?)<br>/,e(r).html()),n.type_name=Ae(/◎类 别 (.*?)<br>/,e(r).html()),n.vod_remarks=Ae(/◎集 数 (.*?)<br>/,e(r).html());let i=Ae(/◎主 演 (.*?)< \/ p>/s,e(r).html());Q.isEmpty(i)&&(i=Ae(/◎演 员 (.*?)< \/ p>/s,e(r).html()));let s=[];for(let f of i.split( `
` ))s.push(f.replaceAll(" \u 3000 \u 3000 \u 3000 \u 3000 \u 3000","").replaceAll("<br>","").replaceAll(" \u 3000 \u 3000 \u 3000 \u 3000 \u 3000",""));n.vod_actor=s.join("/"),n.vod_director=Ae(/◎导 演 (.*?)<br>/,e(r).html()),n.vod_content=Ae(/◎简 介< \/ p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll( `
` ,""),Q.isEmpty(n.vod_content)&&(n.vod_content=Ae(/◎简 介<br>(.*?)< \/ p>/s,e(r).html()).replaceAll("<p>","").replaceAll( `
` ,""));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(Ae(/【(.*?)】/,f.replaceAll(" \u 4E0B \u 8F7D \u 5730 \u 5740"," \u 78C1 \u 529B \u 94FE \u 63A5")));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. \u 6309 \u 7C7B \u 578B!==void 0&&i. \u 6309 \u 7C7B \u 578B!=="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:" \u 641C \u 7D22",show:"title,zhuyan",tempid:"1"},s=await this.post(r,i,this.getHeader()),l=Qe(s);this.vodList=await this.parseVodShortListFromDocByCategory(l)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),s=Ae(/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":Xi});if(this.playUrl=Ae(/url: '(.*?)',/,a),Q.isEmpty(this.playUrl)){let o=rG(l);this.playUrl=o+Ae(/var main = "(.*?)";/,a)}}else this.playUrl=s}else this.playUrl=n}},Pn=new bT;var wT=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await Pn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await Pn.initCookie(e.server.config.bilicookie),await Pn.spiderInit(e),Pn.cfgObj.code=0,Pn.catOpenStatus=!0,Pn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await Pn.setSearch(e,n,r),this.vodList=Pn.vodList,this.result=Pn.result}async setProxy(e,n){return await Pn.proxy(e,n)}},Yo=new wT;async function DQ(t,e){return await Yo.init(t,e)}async function PQ(t,e){return await Yo.home(t,e)}async function OIe(t,e){return await Yo.homeVod(t,e)}async function LQ(t,e){return await Yo.category(t,e)}async function FQ(t,e){return await Yo.detail(t,e)}async function BQ(t,e){return await Yo.play(t,e)}async function jQ(t,e){return await Yo.search(t,e)}async function NIe(t,e){return await Yo.proxy(t,e)}var UQ={meta:{key:Pn.getJSName(),name:Pn.getName(),type:Pn.getType()},api:async t=>{t.post("/init",DQ),t.post("/home",PQ),t.post("/category",LQ),t.post("/detail",FQ),t.post("/play",BQ),t.post("/search",jQ),t.get("/proxy/:what/:ids/:end",NIe)},spider:{init:DQ,home:PQ,homeVod:OIe,category:LQ,detail:FQ,play:BQ,search:jQ}};var P6="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function p4(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Qo(t,e,n){var r="";let i=e===void 0?!0:e;for(var s=0;s<t;s++){let l=n?p4(P6.length-10,P6.length-1):p4(0,i?P6.length-1:P6.length-11);r+=P6[l]}return r}function ST(){return Qo(8).toLowerCase()+"-"
2024-04-02 15:03:09 +08:00
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7QHUVAUM7yghB0 / 3 qz5C
bWX5YYD0ss + uDtbDz5VkTclop6YnCY + 1 U4aw4z134ljkp / jL0mWnYioZHTTqxXMf
R5q15FcMZnnn / gMZNj1ZR67 / c9ti6WTG0VEr9IdcJgwHwwGak / xQK1Z9htl7TR3Q
WA45MmpCSSgjVvX4bbV43IjdjSZNm8s5efdlLl1Z + 7 uJTR024xizhK5NH0 / uPmR4
O8QEtxO9ha3LMmTYTfERzfNmpfDVdV3Rok4eoTzhHmxgqQ0 / S0S + FgjHiwrCTFlv
NCiDhSemnJT + NIzAnMQX4acL5AYNb5PiDD06ZMrtklTua + USY0gSIrG9LctaYvHR
swIDAQAB
2024-04-15 09:41:50 +08:00
-- -- - END PUBLIC KEY -- -- - ` ,"pkcs8-public-pem",{encryptionScheme:"pkcs1"}), $ T=class extends Me{constructor(){super(),this.siteUrl="https://api.tyun77.cn"}getName(){return" \u {1F452}| \u 9177 \u 4E9177| \u {1F452}"}getAppName(){return" \u 9177 \u 4E9177"}getJSName(){return"kunyu77"}async request(e,n){let r=(0,_d.default)().unix()-lte,i=new URL(e);i.searchParams.append("pcode","010110010"),i.searchParams.append("version",ate),i.searchParams.append("devid",ts.id),i.searchParams.append("package","com.sevenVideo.app.android"),i.searchParams.append("sys","android"),i.searchParams.append("sysver",ts.release),i.searchParams.append("brand",ts.brand),i.searchParams.append("state","on"),i.searchParams.append("model",ts.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=Wu.default.enc.Hex.stringify(Wu.default.MD5(l)).toString().toLowerCase(),o={"User-Agent":n||"okhttp/3.12.0",T:r,TK:a};e.indexOf("getVideoPlayAuth")>0?o["TK-VToken"]=ote.encrypt( ` { "videoId" : "${i.searchParams.get(" videoId ")}" , "timestamp" : "${r}" } ` ,"base64"):e.indexOf("parserUrl")>0&&(o["TK-VToken"]=ote.encrypt( ` { "url" : "${i.searchParams.get(" url ")}" , "timestamp" : "${r}" } ` ,"base64"));let u=await req(i.toString(),{headers:o}),c=u.headers.date,f=(0,_d.default)(c).unix();return lte=(0,_d.default)().unix()-f,JSON.parse(u.content)}async init(e,n){let r=e.server.prefix+"/device";ts=await e.server.db.getObjectDefault(r,{}),ts.id||(ts=HQ(32),ts.id=ts.id.toLowerCase(),ts.ua="Dalvik/2.1.0 (Linux; U; Android "+ts.release+"; "+ts.model+" Build/"+ts.buildId+")",await e.server.db.push(r,ts)),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:" \u 5E74 \u 4EFD",init:""},i=[];i.push({n:" \u 5168 \u 90E8",v:""}),n.y.forEach(u=>{i.push({n:u.name,v:u.value})}),r.value=i;let s={key:"area",name:" \u 5730 \u 533A",init:""},l=[];l.push({n:" \u 5168 \u 90E8",v:""}),n.a.forEach(u=>{l.push({n:u.name,v:u.value})}),s.value=l;let a={key:"category",name:" \u 7C7B \u 578B",init:""},o=[];return o.push({n:" \u 5168 \u 90E8",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!==" \u 6700 \u 8FD1 \u 66F4 \u 65B0"&&(this.filterObj[n]=await this.getFilter())}}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new ke;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 Ge;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=qQ(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=" \u 78C1 \u 529B \u 7EBF \u 8DEF";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 Ge;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Ae(/◎类 别 (.*?)<br>/,l),Q.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Ae(/◎年 代 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_year=Ae(/首播:(.*?)<br>"/,l)),a.vod_area=Ae(/◎产 地 (.*?)<br>/,l),Q.isEmpty(a.vod_year)&&(a.vod_area=Ae(/地区:(.*?)<br>"/,l)),a.vod_remarks=Ae(/◎上映日期 (.*?)<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" \u 64AD \u 653E \u 5730 \u 5740 \u FF08 \u 65E0 \u 63D2 \u 4EF6 \u 6781 \u 901F \u 64AD \u 653E \u FF09":case" \u 64AD \u 653E \u 5730 \u 5740 \u 4E09":r=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case" \u 64AD \u 653E \u 5730 \u 5740 \u FF08 \u 65E0 \u 9700 \u 5B89 \u 88C5 \u 63D2 \u 4EF6 \u FF09":let s=/url: '(.*?)',/gs.exec(i);s.length>1&&(r=s[1]);break;case" \u 64AD \u 653E \u 5730 \u 5740 \u 56DB":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=Qe(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===" \u 7535 \u 89C6 \u 5267"){let o=[{n:" \u 4E0D \u 9650",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:" \u 7C7B \u 578B",value:o}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(Q.isEmpty(e))await this.jadeLog.info(" \u 9996 \u 9875 \u 7C7B \u 522B \u 89E3 \u 6790 \u 5931 \u 8D25",!0);else{let n=Qe(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=Qe(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=Qe(s);this.vodList=await this.parseVodShortListFromDoc(l)}}async setDetail(e){let n=this.site
` ,"").replaceAll(" ","");if(a.indexOf(" \u 65F6 \u 95F4")>-1&&a.indexOf(" \u 6587 \u 4EF6 \u 5939")>-1){let o=a.split(" \u 65F6 \u 95F4"),u=new ke;u.vod_name=o[0],u.vod_remarks=o[1].split(" \u 683C \u 5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll(" \u FEFF","").replaceAll(" \x A0",""),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=Qe(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=Qe(s);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}async setPlay(e,n,r){let i=await Bs(e,n,r);this.playUrl=JSON.parse(i).url}},jn=new WT;var XT=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await jn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await jn.initCookie(e.server.config.bilicookie),await jn.spiderInit(e),jn.cfgObj.code=0,jn.catOpenStatus=!0,jn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await jn.setSearch(e,n,r),this.vodList=jn.vodList,this.result=jn.result}async setProxy(e,n){return await jn.proxy(e,n)}},o3=new XT;async function Ute(t,e){return await o3.init(t,e)}async function Mte(t,e){return await o3.home(t,e)}async function Gke(t,e){return await o3.homeVod(t,e)}async function $ te(t,e){return await o3.category(t,e)}async function Hte(t,e){return await o3.detail(t,e)}async function qte(t,e){return await o3.play(t,e)}async function Vte(t,e){return await o3.search(t,e)}async function Kke(t,e){return await o3.proxy(t,e)}var zte={meta:{key:jn.getJSName(),name:jn.getName(),type:jn.getType()},api:async t=>{t.post("/init",Ute),t.post("/home",Mte),t.post("/category", $ te),t.post("/detail",Hte),t.post("/play",qte),t.post("/search",Vte),t.get("/proxy/:what/:ids/:end",Kke)},spider:{init:Ute,home:Mte,homeVod:Gke,category: $ te,detail:Hte,play:qte,search:Vte}};function Jke(t){return t==="zd"?" \u 6700 \u 5927":t==="yj"?" \u 6C38 \u 4E45":t==="hn"?" \u 725B \u 725B":t==="gs"?" \u 5149 \u 6CE2":t==="sn"?" \u 65B0 \u 6717":t==="wl"?" \u 6DA1 \u 8F6E":t==="lz"?" \u 826F \u 5B50":t==="fs"?"F \u 901F":t==="ff"?" \u 98DE \u 98DE":t==="bd"?" \u 767E \u 5EA6":t==="uk"?" \u 9177U":t==="wj"?" \u 65E0 \u 5929":t==="bj"?" \u 516B \u 6212":t==="tk"?" \u 5929 \u 7A7A":t==="ss"?" \u 901F \u 901F":t==="kb"?" \u 9177 \u 64AD":t==="sd"?" \u 95EA \u 7535":t==="xk"?" \u 770B \u 770B":t==="tp"?" \u 6DD8 \u 6DD8":t==="jy"?" \u 7CBE \u 82F1":t}var YT=class extends qe{constructor(){super(),this.siteUrl="http://cqdb6.com"}getName(){return" \u {1F4FA} \u 250370 \u 770B \u 770B \u 2503 \u {1F4FA}"}getAppName(){return"70 \u 770B \u 770B"}getJSName(){return"kankan70"}getType(){return 3}paraseUrlObject(e){let n=e.split(";"),r
` ,"").replaceAll(" \u 5267 \u 60C5 \u FF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new ke;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=Qe(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=Qe(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(" \u 6309","").replace(" \u FF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=s(o).find("a"),d=0;u===" \u 5267 \u 60C5"?d=3:u===" \u 5E74 \u 4EE3"?d=2:u===" \u 5730 \u 533A"&&(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!==" \u 6700 \u 8FD1 \u 66F4 \u 65B0"&&(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=Qe(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=Ae(/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=Qe(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=Qe(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=Ae(/var my_search='(.*?)';/,i),a=await this.fetch(l,s,this.getHeader());if(!Q.isEmpty(a)){let o=JSON.parse(a.replaceAll(" \u FEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},Un=new YT;var QT=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await Un.setSearch(e,n,r),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},u3=new QT;async function Gte(t,e){return await u3.init(t,e)}async function Kte(t,e){return await u3.home(t,e)}async function Wke(t,e){return await u3.homeVod(t,e)}async function Jte(t,e){return await u3.category(t,e)}async function Wte(t,e){return await u3.detail(t,e)}async function Xte(t,e){return await u3.play(t,e)}async function Yt
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-15 09:41:50 +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=Zte(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=Zte(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/"+oi(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=Yi(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+Yi(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:""})}},Mn=new eA;var tA=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await Mn.setSearch(e,n,r),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},c3=new tA;async function ene(t,e){return await c3.init(t,e)}async function tne(t,e){return await c3.home(t,e)}async function Zke(t,e){return await c3.homeVod(t,e)}async function nne(t,e){return await c3.category(t,e)}async function rne(t,e){return await c3.detail(t,e)}async function ine(t,e){return
` ,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf(" \u 5E74 \u 4EFD")>-1&&(e.vod_year=Ae(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf(" \u 5907 \u 6CE8")>-1){let c=Ae(/备注:(.*?)end/,u);e.vod_remarks=Ae(/备注: \/ (.*?)end/,u)}u.indexOf(" \u 6807 \u 7B7E")>-1&&(e.type_name=Ae(/标签:(.*?)end/,u)),u.indexOf(" \u 5267 \u 60C5")>-1&&(e.vod_content=Ae(/剧情:(.*?)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(Ae(/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(" \u 73A9 \u 5076",""),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:" \u 5168 \u 90E8",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:" \u 5168 \u 90E8",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!==" \u 6700 \u 8FD1 \u 66F4 \u 65B0"){let r=this.siteUrl+ ` / index . php / vodshow / $ { n } -- -- -- -- 1 -- - . html ` ,i=await this.fetch(r,null,this.getHeader());if(i!=null){let s=Qe(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=Qe(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=Qe(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Ae(/ \$ \( " \. 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=Qe(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await Bs(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=Qe(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}},qn=new oA;var uA=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await qn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await qn.initCookie(e.server.config.bilicookie),await qn.spiderInit(e),qn.cfgObj.code=0,qn.catOpenStatus=!0,qn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await qn.setSearch(e,n,r),this.vodList=qn.vodList,this.result=qn.result}async setProxy(e,n){return await qn.proxy(e,n)}},d3=new uA;async function One(t,e){return await d3.init(t,e)}async function Nne(t,e){return await d3.home(t,e)}async function mDe(t,e){return await d3.homeVod(t,e)}async function Ine(t,e){return await d3.category(t,e)}async function Rne(t,e){return await d3.detail(t,e)}async function kne(t,e){return await d3.play(t,e)}async function Dne(t,e){return await d3.search(t,e)}async function yDe(t,e){return await d3.proxy(t,e)}var Pne={meta:{key:qn.getJSName(),name:qn.getName(),type:qn.getType()},api:async t=>{t.post("/init",One),t.post("/home",Nne),t.post("/category",Ine),t.post("/detail",Rne),t.post("/play",kne),t.post("/search",Dne),t.get("/proxy/:what/:ids/:end",yDe)},spider:{init:One,home:Nne,homeVod:mDe,category:Ine,detail:Rne,play:kne,search:Dne}};function bd(t,e){let n=wd();return bd=function(r,i){return r=r-424,
` ;let o=[],u=Ae(Nu,a).split( `
` );for(let f of u){let d=f.match(Nu);Q.isEmpty(d)||o.push(d[1])}let c=await Fs(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Ae(/标签(.*?) \n /,a).replaceAll(" \u FF1A",""),i.vod_content=Ae(/描述(.*?) \n /,a).replaceAll(" \u FF1A",""),i}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),r=[" \u 5F71"," \u 5267","4K"," \u 89C6"," \u 97F3"," \u 6F14"," \u 52A8 \u 6F2B"];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 Bs(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 pA;var hA=class extends Me{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(" \u 963F \u 91CC")>-1||this.getAppName()==="push_agent"?await zn.initAli(e.server.config.alitoken):this.getAppName()===" \u 54D4 \u 54E9 \u 54D4 \u 54E9"&&await zn.initCookie(e.server.config.bilicookie),await zn.spiderInit(e),zn.cfgObj.code=0,zn.catOpenStatus=!0,zn.classes.push({type_name:" \u 6700 \u 8FD1 \u 66F4 \u 65B0",type_id:" \u 6700 \u 8FD1 \u 66F4 \u 65B0"}),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,r){await zn.setSearch(e,n,r),this.vodList=zn.vodList,this.result=zn.result}async setProxy(e,n){return await zn.proxy(e,n)}},y3=new hA;async function Hne(t,e){return await y3.init(t,e)}async function qne(t,e){return await y3.home(t,e)}async function xDe(t,e){return await y3.homeVod(t,e)}async function Vne(t,e){return await y3.category(t,e)}async function zne(t,e){return await y3.detail(t,e)}async function Gne(t,e){return await y3.play(t,e)}async function Kne(t,e){return await y3.search(t,e)}async function bDe(t,e){return await y3.proxy(t,e)}var Jne={meta:{key:zn.getJSName(),name:zn.getName(),type:zn.getType()},api:async t=>{t.post("/init",Hne),t.post("/home",qne),t.post("/category",Vne),t.post("/detail",zne),t.post("/play",Gne),t.post("/search",Kne),t.get("/proxy/:what/:ids/:end",bDe)},spider:{init:Hne,home:qne,homeVod:xDe,category:Vne,detail:zne,play:Gne,search:Kne}};var dA=class extends qe{constructor(){super(),this.siteUrl="https://www.6080yy3.com"}getAppName(){return" \u 65B0 \u 89C6 \u 89C9 \u 5F71 \u 9662"}getName(){return" \u {1F43C} \u 2503 \u 65B0 \u 89C6 \u 89C9 \u 5F71 \u 9662 \u 2503 \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=Ae(/ \/ vodtype \/ (.*?).html/,r.attribs.href),s=r.attribs.title;up(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:" \u 5168 \u 90E8",v:"0"});for(let o of e(n[s]).find("a").slice(1)){let u=Ae(/ \/ 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!==" \u 6700 \u 8FD1 \u 66F4 \u 65B0"){let r=this.siteUrl+ ` / vodsho
` ," ").replaceAll(" \u 6536 \u 8D77","");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(" \u 5938 \u 514B")===-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. \u 5168 \u 90E8 \u 5267 \u 60C5!==void 0&&i. \u 5168 \u 90E8 \u 5267 \u 60C5!=="0"&&(s[l[0]]=i. \u 5168 \u 90E8 \u 5267 \u 60C5),i. \u 5168 \u 90E8 \u 65F6 \u 95F4!==void 0&&i. \u 5168 \u 90E8 \u 65F6 \u 95F4!=="0"&&(s[l[1]]=i. \u 5168 \u 90E8 \u 65F6 \u 95F4),i. \u 5168 \u 90E8 \u 5730 \u 533A!==void 0&&i. \u 5168 \u 90E8 \u 5730 \u 533A!=="0"&&(s[l[2]]=i. \u 5168 \u 90E8 \u 5730 \u 533A),i. \u 65F6 \u 95F4 \u 6392 \u 5E8F!==void 0&&i. \u 65F6 \u 95F4 \u 6392 \u 5E8F!=="0"&&(s[l[3]]=i. \u 65F6 \u 95F4 \u 6392 \u 5E8F);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=We.enc.Utf8.parse("2890"+n+"tB959C"),i=We.enc.Utf8.parse("2F131BE91247866E"),s=We.AES.decrypt(e,r,{iv:i,mode:We.mode.CBC,padding:We.pad.Pkcs7});return We.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(Ae(/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 dA;var mA=class extends Me{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,r){await Gn.setSearch(e,n,r),this.vodList=Gn.vodList,this.result=Gn.result}async setProxy(e,n){return await Gn.proxy(e,n)}},g3=new mA;async function Wne(t,e){return await g3.init(t,e)}async function Xne(t,e){return await g3.home(t,e)}async function wDe(t,e){return await g3.homeVod(t,e)}async function Yne(t,e){return await g3.category(t,e)}async function Qne(t,e){return await g3.detail(t,e)}async function Zne(t,e){return await g3.play(t,e)}async function ere(t,e){return await g3.search(t,e)}async function SDe(t,e){return await g3.proxy(t,e)}var tre={meta:{key:Gn.getJSName(),name:Gn.getName(),type:Gn.getType()},api:async t=>{t.post("/init",Wne),t.post("/home",Xne),t.post("/category",Yne),t.post("/detail",Qne),t.post("/play",Zne),t.post("/search",ere),t.get("/proxy/:what/:ids/:end",SDe)},spider:{init:Wne,home:Xne,homeVod:wDe,category:Yne,detail:Qne,play:Zne,search:ere}};var yA=class extends zo{constructor(){super(),this.siteUrl="https://haiwaikan.com",this
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 } < / B a s e U R L >
< SegmentBase indexRange = "${u}" >
< Initialization range = "${c}" / >
< / S e g m e n t B a s e >
< / R e p r e s e n t a t i o n >
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 }
< / P e r i o d >
2024-04-15 09:41:50 +08:00
< / M P D > ` } a s y n c p r o x y ( e , n ) { l e t r = e [ 0 ] , i = Y i ( e [ 1 ] ) ; i f ( r = = = " d a s h " ) { l e t s = i . s p l i t ( " + " ) , l = s [ 0 ] , a = s [ 1 ] , o = s [ 2 ] , u = t h i s . a p i U r l + ` / x / p l a y e r / p l a y u r l ? a v i d = $ { l } & c i d = $ { a } & q n = $ { o } & f n v a l = 4 0 4 8 & f o u r k = 1 ` , c = " " , f = " " , d = a w a i t t h i s . f e t c h ( u , n u l l , n ) , h = J S O N . p a r s e ( d ) , m = h . d a t a . d a s h , x = m . v i d e o , b = m . a u d i o ; f o r ( l e t E = 0 ; E < x . l e n g t h ; E + + ) { l e t v = x [ E ] ; v . i d . t o S t r i n g ( ) = = = o & & ( c + = t h i s . g e t D a s h M e d i a ( v ) ) } f o r ( l e t E = 0 ; E < b . l e n g t h ; E + + ) { l e t v = b [ E ] ; f o r ( l e t g i n t h i s . v o d _ a u d i o _ i d ) v . i d . t o S t r i n g ( ) = = = g & & ( f + = t h i s . g e t D a s h M e d i a ( v ) ) } l e t _ = t h i s . g e t D a s h ( h , c , f ) ; r e t u r n J S O N . s t r i n g i f y ( { c o d e : 2 0 0 , c o n t e n t : _ , h e a d e r s : { " C o n t e n t - T y p e " : " a p p l i c a t i o n / d a s h + x m l " } } ) } r e t u r n J S O N . s t r i n g i f y ( { c o d e : 5 0 0 , c o n t e n t : " " } ) } } , J n = n e w v A ; v a r _ A = c l a s s e x t e n d s M e { c o n s t r u c t o r ( ) { s u p e r ( ) } g e t N a m e ( ) { r e t u r n J n . g e t N a m e ( ) } g e t A p p N a m e ( ) { r e t u r n J n . g e t A p p N a m e ( ) } g e t J S N a m e ( ) { r e t u r n J n . g e t J S N a m e ( ) } a s y n c i n i t ( e , n ) { d a t a B a s e = e . s e r v e r . d b , t h i s . g e t A p p N a m e ( ) . i n d e x O f ( " \ u 9 6 3 F \ u 9 1 C C " ) > - 1 | | t h i s . g e t A p p N a m e ( ) = = = " p u s h _ a g e n t " ? a w a i t J n . i n i t A l i ( e . s e r v e r . c o n f i g . a l i t o k e n ) : t h i s . g e t A p p N a m e ( ) = = = " \ u 5 4 D 4 \ u 5 4 E 9 \ u 5 4 D 4 \ u 5 4 E 9 " & & a w a i t J n . i n i t C o o k i e ( e . s e r v e r . c o n f i g . b i l i c o o k i e ) , a w a i t J n . s p i d e r I n i t ( e ) , J n . c f g O b j . c o d e = 0 , J n . c a t O p e n S t a t u s = ! 0 , J n . c l a s s e s . p u s h ( { t y p e _ n a m e : " \ u 6 7 0 0 \ u 8 F D 1 \ u 6 6 F 4 \ u 6 5 B 0 " , t y p e _ i d : " \ u 6 7 0 0 \ u 8 F D 1 \ u 6 6 F 4 \ u 6 5 B 0 " } ) , a w a i t s u p e r . i n i t ( e , n ) } a s y n c s e t C l a s s e s ( ) { a w a i t J n . s e t C l a s s e s ( ) , t h i s . c l a s s e s = J n . c l a s s e s } a s y n c s e t F i l t e r O b j ( ) { a w a i t J n . s e t F i l t e r O b j ( ) , t h i s . f i l t e r O b j = J n . f i l t e r O b j } a s y n c s e t H o m e V o d ( ) { a w a i t J n . s e t H o m e V o d ( ) , t h i s . h o m e V o d L i s t = J n . h o m e V o d L i s t } a s y n c s e t C a t e g o r y ( e , n , r , i ) { a w a i t J n . s e t C a t e g o r y ( e , n , r , i ) , t h i s . v o d L i s t = J n . v o d L i s t } a s y n c s e t D e t a i l ( e ) { a w a i t J n . s e t D e t a i l ( e ) , t h i s . v o d D e t a i l = J n . v o d D e t a i l } a s y n c s e t P l a y ( e , n , r ) { a w a i t J n . s e t P l a y ( e , n , r ) , t h i s . p l a y U r l = J n . p l a y U r l , t h i s . r e s u l t = J n . r e s u l t } a s y n c s e t S e a r c h ( e , n , r ) { a w a i t J n . s e t S e a r c h ( e , n , r ) , t h i s . v o d L i s t = J n . v o d L i s t , t h i s . r e s u l t = J n . r e s u l t } a s y n c s e t P r o x y ( e , n ) { r e t u r n a w a i t J n . p r o x y ( e , n ) } } , _ 3 = n e w _ A ; a s y n c f u n c t i o n u r e ( t , e ) { r e t u r n a w a i t _ 3 . i n i t ( t , e ) } a s y n c f u n c t i o n c r e ( t , e ) { r e t u r n a w a i t _ 3 . h o m e ( t , e ) } a s y n c f u n c t i o n C D e ( t , e ) { r e t u r n a w a i t _ 3 . h o m e V o d ( t , e ) } a s y n c f u n c t i o n f r e ( t , e ) { r e t u r n a w a i t _ 3 . c a t e g o r y ( t , e ) } a s y n c f u n c t i o n p r e ( t , e ) { r e t u r n a w a i t _ 3 . d e t a i l ( t , e ) } a s y n c f u n c t i o n h r e ( t , e ) { r e t u r n a w a i t _ 3 . p l a y ( t , e ) } a s y n c f u n c t i o n d r e ( t , e ) { r e t u r n a w a i t _ 3 . s e a r c h ( t , e ) } a s y n c f u n c t i o n O D e ( t , e ) { r e t u r n a w a i t _ 3 . p r o x y ( t , e ) } v a r m r e = { m e t a : { k e y : J n . g e t J S N a m e ( ) , n a m e : J n . g e t N a m e ( ) , t y p e : J n . g e t T y p e ( ) } , a p i : a s y n c t = > { t . p o s t ( " / i n i t " , u r e ) , t . p o s t ( " / h o m e " , c r e ) , t . p o s t ( " / c a t e g o r y " , f r e ) , t . p o s t ( " / d e t a i l " , p r e ) , t . p o s t ( " / p l a y " , h r e ) , t . p o s t ( " / s e a r c h " , d r e ) , t . g e t ( " / p r o x y / : w h a t / : i d s / : e n d " , O D e ) } , s p i d e r : { i n i t : u r e , h o m e : c r e , h o m e V o d : C D e , c a t e g o r y : f r e , d e t a i l : p r e , p l a y : h r e , s e a r c h : d r e } } ; f u n c t i o n N D e ( t , e , n , r ) { l e t i = W e . e n c . U t f 8 . p a r s e ( e | | " P B f A U n T d M j N D e 6 p L " ) , s = W e . e n c . U t f 8 . p a r s e ( n | | " s E N S 6 b V b w S f v n X r j " ) , l ; r e t u r n r ? l = W e . A E S . e n c r y p t ( t , i , { i v : s , m o d e : W e . m o d e . C B C , p a d d i n g : W e . p a d . P k c s 7 } ) : l = W e . A E S . d e c r y p t ( t , i , { i v : s , p a d d i n g : W e . p a d . P k c s 7 } ) . t o S t r i n g ( W e . e n c . U t f 8 ) , l } v a r E A = c l a s s e x t e n d s q e { c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . s i t e U r l = " h t t p s : / / w w w . c z z y 8 8 . c o m " } a s y n c i n i t ( t ) { a w a i t s u p e r . i n i t ( t ) , a w a i t Q i ( t h i s . c f g O b j . t o k e n ) } g e t N a m e ( ) { r e t u r n " \ u { 1 F 3 E D } \ u F E 0 F \ u 2 5 0 3 \ u 5 3 8 2 \ u 9 5 7 F \ u 7 6 F 4 \ u 8 F D E \ u 2 5 0 3 \ u { 1 F 3 E D } \ u F E 0 F " } g e t A p p N a m e ( ) { r e t u r n " \ u 5 3 8 2 \ u 9 5 7 F \ u 7 6 F 4 \ u 8 F D E " } g e t J S N a m e ( ) { r e t u r n " c h a n g z h a n g " } g e t T y p e ( ) { r e t u r n 3 } a s y n c g e t H t m l ( t = t h i s . s i t e U r l , e = t h i s . g e t H e a d e r ( ) ) { l e t r = ( a w a i t t h i s . f e t c h ( t , n u l l , e , ! 1 , ! 0 ) ) . c o n t e n t ; i f ( ! Q . i s E m p t y ( r ) & & r . i n d e x O f ( " \ u 4 E B A \ u 6 7 3 A \ u 9 A 8 C \ u 8 B C 1 " ) = = = - 1 ) r e t u r n Q e ( r ) ; a w a i t t h i s . j a d e L o g . e r r o r ( " h t m l \ u 8 3 B 7 \ u 5 3 D 6 \ u 5 9 3 1 \ u 8 D 2 5 " , ! 0 ) } g e t S e a r c h H e a d e r ( ) { r e t u r n { C o o k i e : " c f _ c l e a r a n c e = o t Y Z b H g 1 s a f C I x k C t Z f y 9 D P K b f 1 G s _ z U s k k V D c 0 M V K M - 1 7 0 7 0 2 6 0 6 3 - 1 - A T O p K n T L v 9 + p v 1 7 1 Y E / r z x N / n m v G N 9 M u c x 7 v p w p 0 k W 2 v Z b / c b t z 5 e 2 m d 2 / y m 7 E E + 9 d T 7 p P B V + k Q O g 9 v J x 2 v 8 c k s = ; m y a n n o u n = 1 ; P H P S E S S I D = 7 3 3 8 6 n o b q u g s 7 r 3 p b 2 l j c s p 5 q 4 " , " U s e r - A g e n t " : " M o z i l l a / 5 . 0 ( i P h o n e ; C P U i P h o n e O S 1 6 _ 3 l i k e M a c O S X ) A p p l e W e b K i t / 6 0 5 . 1 . 1 5 ( K H T M L , l i k e G e c k o ) C r i O S / 1 0 0 . 0 . 4 8 9 6 . 7 7 M o b i l e / 1 5 E 1 4 8 S a f a r i / 6 0 4 . 1 " , C o n n e c t i o n : " k e e p - a l i v e " , H o s t : " w w w . c z z y 5 5 . c o m " } } p a r s e V o d S h o r t F r o m E l e m e n t ( t , e ) { l e t n = n e w k e , r = t ( t ( e ) . f i n d ( " a " ) ) . f i n d ( " i m g " ) [ 0 ] ; r e t u r n n . v o d _ n a m e = r . a t t r i b s . a l t , n . v o d _ p i c = r . a t t r i b s [ " d a t a - o r i g i n a l " ] , n . v o d _ r e m a r k s = t ( t ( t ( e ) . f i n d ( " [ c l a s s = ' h d i n f o ' ] " ) ) . f i n d ( " s p a n " ) ) . t e x t ( ) , n . v o d _ i d = t ( e ) . f i n d ( " a " ) [ 0 ] . a t t
2024-04-02 15:03:09 +08:00
/ * ! B u n d l e d l i c e n s e i n f o r m a t i o n :
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 * )
* /