mirror of
https://github.com/qist/tvbox.git
synced 2026-11-04 02:33:26 +00:00
update FTY
This commit is contained in:
1 parent
a585001061
commit
3f62f96d0d
10 files changed
+528
-165
No files matched your search
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider":"./jar/fan.txt;md5;ccc15f8c3df51befa578c1ce8632359f",
|
||||
"spider":"./jar/fan.txt;md5;2a085160a4140e1697c5d6393901ec7e",
|
||||
"lives":[{"name":"初秋语•ipv4","type":0,"url":"./list.txt","playerType":1,"epg":"http://epg.112114.xyz/?ch={name}&date={date}","logo":"https://epg.112114.xyz/logo/{name}.png"},
|
||||
{"name":"YanG•综合","type":0,"url":"https://github.moeyy.xyz/https://raw.githubusercontent.com/YanG-1989/m3u/main/Gather.m3u","playerType":1,"epg":"http://epg.112114.xyz/?ch={name}&date={date}","logo":"https://epg.112114.xyz/logo/{name}.png"},
|
||||
{"name":"drang•ipv6","type":0,"url":"https://github.moeyy.xyz/https://raw.githubusercontent.com/drangjchen/IPTV/main/M3U/ipv6.m3u","playerType":1,"epg":"http://epg.112114.xyz/?ch={name}&date={date}","logo":"https://epg.112114.xyz/logo/{name}.png"},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider":"./jar/fan.txt;md5;ccc15f8c3df51befa578c1ce8632359f",
|
||||
"spider":"./jar/fan.txt;md5;2a085160a4140e1697c5d6393901ec7e",
|
||||
"wallpaper":"https://深色壁纸.xxooo.cf/",
|
||||
|
||||
"sites":[
|
||||
|
||||
Vendored
+144
-136
@@ -1,28 +1,28 @@
|
||||
var Nte=Object.create;var q8=Object.defineProperty;var Cte=Object.getOwnPropertyDescriptor;var Rte=Object.getOwnPropertyNames;var Ite=Object.getPrototypeOf,kte=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),PA=(t,e)=>{for(var n in e)q8(t,n,{get:e[n],enumerable:!0})},LA=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Rte(e))!kte.call(t,r)&&r!==n&&q8(t,r,{get:()=>e[r],enumerable:!(l=Cte(e,r))||l.enumerable});return t};var Ql=(t,e,n)=>(n=t!=null?Nte(Ite(t)):{},LA(e||!t||!t.__esModule?q8(n,"default",{value:t,enumerable:!0}):n,t)),Dte=t=>LA(q8({},"__esModule",{value:!0}),t);var jA=k((fNe,FA)=>{"use strict";function Pte(t){var e=new t,n=e;function l(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function r(i){n.next=i,n=i}return{get:l,release:r}}FA.exports=Pte});var jd=k((dNe,Fd)=>{"use strict";var Lte=jA();function UA(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 l=Lte(Fte),r=null,i=null,s=0,a=null,u={push:_,drain:X3,saturated:X3,pause:c,paused:!1,get concurrency(){return n},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=x,!u.paused)for(;r&&s<n;)s++,w()},running:o,resume:d,idle:y,length:f,getQueue:m,unshift:S,empty:X3,kill:E,killAndDrain:g,error:v};return u;function o(){return s}function c(){u.paused=!0}function f(){for(var x=r,O=0;x;)x=x.next,O++;return O}function m(){for(var x=r,O=[];x;)O.push(x.value),x=x.next;return O}function d(){if(u.paused)for(u.paused=!1;r&&s<n;)s++,w()}function y(){return s===0&&u.length()===0}function _(x,O){var N=l.get();N.context=t,N.release=w,N.value=x,N.callback=O||X3,N.errorHandler=a,s>=n||u.paused?i?(i.next=N,i=N):(r=N,i=N,u.saturated()):(s++,e.call(t,N.value,N.worked))}function S(x,O){var N=l.get();N.context=t,N.release=w,N.value=x,N.callback=O||X3,N.errorHandler=a,s>=n||u.paused?r?(N.next=r,r=N):(r=N,i=N,u.saturated()):(s++,e.call(t,N.value,N.worked))}function w(x){x&&l.release(x);var O=r;O&&s<=n?u.paused?s--:(i===r&&(i=null),r=O.next,O.next=null,e.call(t,O.value,O.worked),i===null&&u.empty()):--s===0&&u.drain()}function E(){r=null,i=null,u.drain=X3}function g(){r=null,i=null,u.drain(),u.drain=X3}function v(x){a=x}}function X3(){}function Fte(){this.value=null,this.callback=X3,this.next=null,this.release=X3,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,l){var r=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=X3,t.errorHandler&&i(n,s),r.call(t.context,n,l),t.release(t)}}function jte(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function l(c,f){e.call(this,c).then(function(m){f(null,m)},f)}var r=UA(t,l,n),i=r.push,s=r.unshift;return r.push=a,r.unshift=u,r.drained=o,r;function a(c){var f=new Promise(function(m,d){i(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(X3),f}function u(c){var f=new Promise(function(m,d){s(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(X3),f}function o(){if(r.idle())return new Promise(function(m){m()});var c=r.drain,f=new Promise(function(m){r.drain=function(){c(),m()}});return f}}Fd.exports=UA;Fd.exports.promise=jte});var Md=k((hNe,MA)=>{"use strict";var{inherits:Ute,format:Ud}=require("util");function yu(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 l(r,i,s){if(!new.target)return new l(r,i,s);Error.captureStackTrace(this,l),this.code=t,this.message=e,this.name="AvvioError",r&&i&&s?this.message=Ud(e,r,i,s):r&&i?this.message=Ud(e,r,i):r?this.message=Ud(e,r):this.message=e}return l.prototype[Symbol.toStringTag]="Error",l.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},Ute(l,n),l}MA.exports={createError:yu,AVV_ERR_EXPOSE_ALREADY_DEFINED:yu("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:yu("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:yu("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:yu("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:yu("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:yu("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var BA=k((mNe,$A)=>{$A.exports=function t(e,n,l){n===void 0&&(n=""),l||(l={});var r=function(u){var o={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return l.unicode===!1?o[u]:u};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
|
||||
var Mte=Object.create;var J8=Object.defineProperty;var $te=Object.getOwnPropertyDescriptor;var Bte=Object.getOwnPropertyNames;var Hte=Object.getPrototypeOf,Vte=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),UA=(t,e)=>{for(var n in e)J8(t,n,{get:e[n],enumerable:!0})},MA=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Bte(e))!Vte.call(t,r)&&r!==n&&J8(t,r,{get:()=>e[r],enumerable:!(l=$te(e,r))||l.enumerable});return t};var e2=(t,e,n)=>(n=t!=null?Mte(Hte(t)):{},MA(e||!t||!t.__esModule?J8(n,"default",{value:t,enumerable:!0}):n,t)),qte=t=>MA(J8({},"__esModule",{value:!0}),t);var BA=k((xNe,$A)=>{"use strict";function zte(t){var e=new t,n=e;function l(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function r(i){n.next=i,n=i}return{get:l,release:r}}$A.exports=zte});var Md=k((ANe,Ud)=>{"use strict";var Gte=BA();function HA(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 l=Gte(Jte),r=null,i=null,s=0,a=null,u={push:_,drain:W3,saturated:W3,pause:c,paused:!1,get concurrency(){return n},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=x,!u.paused)for(;r&&s<n;)s++,w()},running:o,resume:d,idle:y,length:f,getQueue:m,unshift:S,empty:W3,kill:E,killAndDrain:g,error:v};return u;function o(){return s}function c(){u.paused=!0}function f(){for(var x=r,O=0;x;)x=x.next,O++;return O}function m(){for(var x=r,O=[];x;)O.push(x.value),x=x.next;return O}function d(){if(u.paused)for(u.paused=!1;r&&s<n;)s++,w()}function y(){return s===0&&u.length()===0}function _(x,O){var N=l.get();N.context=t,N.release=w,N.value=x,N.callback=O||W3,N.errorHandler=a,s>=n||u.paused?i?(i.next=N,i=N):(r=N,i=N,u.saturated()):(s++,e.call(t,N.value,N.worked))}function S(x,O){var N=l.get();N.context=t,N.release=w,N.value=x,N.callback=O||W3,N.errorHandler=a,s>=n||u.paused?r?(N.next=r,r=N):(r=N,i=N,u.saturated()):(s++,e.call(t,N.value,N.worked))}function w(x){x&&l.release(x);var O=r;O&&s<=n?u.paused?s--:(i===r&&(i=null),r=O.next,O.next=null,e.call(t,O.value,O.worked),i===null&&u.empty()):--s===0&&u.drain()}function E(){r=null,i=null,u.drain=W3}function g(){r=null,i=null,u.drain(),u.drain=W3}function v(x){a=x}}function W3(){}function Jte(){this.value=null,this.callback=W3,this.next=null,this.release=W3,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,l){var r=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=W3,t.errorHandler&&i(n,s),r.call(t.context,n,l),t.release(t)}}function Kte(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function l(c,f){e.call(this,c).then(function(m){f(null,m)},f)}var r=HA(t,l,n),i=r.push,s=r.unshift;return r.push=a,r.unshift=u,r.drained=o,r;function a(c){var f=new Promise(function(m,d){i(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(W3),f}function u(c){var f=new Promise(function(m,d){s(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(W3),f}function o(){if(r.idle())return new Promise(function(m){m()});var c=r.drain,f=new Promise(function(m){r.drain=function(){c(),m()}});return f}}Ud.exports=HA;Ud.exports.promise=Kte});var Bd=k((ONe,VA)=>{"use strict";var{inherits:Xte,format:$d}=require("util");function vu(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 l(r,i,s){if(!new.target)return new l(r,i,s);Error.captureStackTrace(this,l),this.code=t,this.message=e,this.name="AvvioError",r&&i&&s?this.message=$d(e,r,i,s):r&&i?this.message=$d(e,r,i):r?this.message=$d(e,r):this.message=e}return l.prototype[Symbol.toStringTag]="Error",l.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},Xte(l,n),l}VA.exports={createError:vu,AVV_ERR_EXPOSE_ALREADY_DEFINED:vu("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:vu("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:vu("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:vu("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:vu("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:vu("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var zA=k((NNe,qA)=>{qA.exports=function t(e,n,l){n===void 0&&(n=""),l||(l={});var r=function(u){var o={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return l.unicode===!1?o[u]:u};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
|
||||
`),a=`
|
||||
`+n+(i.length?r("\u2502"):" ")+" ";return n+s.join(a)+`
|
||||
`+i.map(function(u,o){var c=o===i.length-1,f=u.nodes&&u.nodes.length,m=n+(c?" ":r("\u2502"))+" ";return n+r(c?"\u2514":"\u251C")+r("\u2500")+r(f?"\u252C":"\u2500")+" "+t(u,m,l).slice(n.length+2)}).join("")}});var JA=k((yNe,GA)=>{"use strict";var Mte=BA(),HA=Symbol("avvio.TimeTree.untrackNode"),$d=Symbol("avvio.TimeTree.trackNode"),VA=Symbol("avvio.TimeTree.getParent"),qA=Symbol("avvio.TimeTree.getNode"),zA=Symbol("avvio.TimeTree.addNode"),Bd=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[$d](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])}[HA](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)}[VA](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[qA](e){return this.tableId.get(e)}[zA](e,n,l){if(e===null)return this.root={id:"root",label:n,start:l,nodes:[]},this[$d](this.root),this.root.id;let i=this[VA](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:l,label:n,nodes:[]};return i.nodes.push(a),this[$d](a),s}start(e,n,l=Date.now()){return this[zA](e,n,l)}stop(e,n=Date.now()){let l=this[qA](e);l&&(l.stop=n,l.diff=l.stop-l.start||0,this[HA](l))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=l=>(l.label=`${l.label} ${l.diff} ms`,l.nodes.length>0&&(l.nodes=l.nodes.map(r=>e(r))),l),n=e(this.toJSON());return Mte(n)}};GA.exports=Bd});var XA=k((gNe,KA)=>{var Bo=1e3,Ho=Bo*60,Vo=Ho*60,gu=Vo*24,$te=gu*7,Bte=gu*365.25;KA.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Hte(t);if(n==="number"&&isFinite(t))return e.long?qte(t):Vte(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Hte(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]),l=(e[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return n*Bte;case"weeks":case"week":case"w":return n*$te;case"days":case"day":case"d":return n*gu;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Vo;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ho;case"seconds":case"second":case"secs":case"sec":case"s":return n*Bo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Vte(t){var e=Math.abs(t);return e>=gu?Math.round(t/gu)+"d":e>=Vo?Math.round(t/Vo)+"h":e>=Ho?Math.round(t/Ho)+"m":e>=Bo?Math.round(t/Bo)+"s":t+"ms"}function qte(t){var e=Math.abs(t);return e>=gu?z8(t,e,gu,"day"):e>=Vo?z8(t,e,Vo,"hour"):e>=Ho?z8(t,e,Ho,"minute"):e>=Bo?z8(t,e,Bo,"second"):t+" ms"}function z8(t,e,n,l){var r=e>=n*1.5;return Math.round(t/n)+" "+l+(r?"s":"")}});var Hd=k((vNe,WA)=>{function zte(t){n.debug=n,n.default=n,n.coerce=u,n.disable=i,n.enable=r,n.enabled=s,n.humanize=XA(),n.destroy=o,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let m=0;m<c.length;m++)f=(f<<5)-f+c.charCodeAt(m),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,m=null,d,y;function _(...S){if(!_.enabled)return;let w=_,E=Number(new Date),g=E-(f||E);w.diff=g,w.prev=f,w.curr=E,f=E,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let v=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(O,N)=>{if(O==="%%")return"%";v++;let R=n.formatters[N];if(typeof R=="function"){let U=S[v];O=R.call(w,U),S.splice(v,1),v--}return O}),n.formatArgs.call(w,S),(w.log||n.log).apply(w,S)}return _.namespace=c,_.useColors=n.useColors(),_.color=n.selectColor(c),_.extend=l,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(d!==n.namespaces&&(d=n.namespaces,y=n.enabled(c)),y),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function l(c,f){let m=n(this.namespace+(typeof f>"u"?":":f)+c);return m.log=this.log,m}function r(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,m=(typeof c=="string"?c:"").split(/[\s,]+/),d=m.length;for(f=0;f<d;f++)m[f]&&(c=m[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function i(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let f,m;for(f=0,m=n.skips.length;f<m;f++)if(n.skips[f].test(c))return!1;for(f=0,m=n.names.length;f<m;f++)if(n.names[f].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function u(c){return c instanceof Error?c.stack||c.message:c}function o(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),
Line truncated
|
||||
`+i.map(function(u,o){var c=o===i.length-1,f=u.nodes&&u.nodes.length,m=n+(c?" ":r("\u2502"))+" ";return n+r(c?"\u2514":"\u251C")+r("\u2500")+r(f?"\u252C":"\u2500")+" "+t(u,m,l).slice(n.length+2)}).join("")}});var YA=k((CNe,WA)=>{"use strict";var Wte=zA(),GA=Symbol("avvio.TimeTree.untrackNode"),Hd=Symbol("avvio.TimeTree.trackNode"),JA=Symbol("avvio.TimeTree.getParent"),KA=Symbol("avvio.TimeTree.getNode"),XA=Symbol("avvio.TimeTree.addNode"),Vd=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Hd](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])}[GA](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)}[JA](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[KA](e){return this.tableId.get(e)}[XA](e,n,l){if(e===null)return this.root={id:"root",label:n,start:l,nodes:[]},this[Hd](this.root),this.root.id;let i=this[JA](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:l,label:n,nodes:[]};return i.nodes.push(a),this[Hd](a),s}start(e,n,l=Date.now()){return this[XA](e,n,l)}stop(e,n=Date.now()){let l=this[KA](e);l&&(l.stop=n,l.diff=l.stop-l.start||0,this[GA](l))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=l=>(l.label=`${l.label} ${l.diff} ms`,l.nodes.length>0&&(l.nodes=l.nodes.map(r=>e(r))),l),n=e(this.toJSON());return Wte(n)}};WA.exports=Vd});var ZA=k((RNe,QA)=>{var Vo=1e3,qo=Vo*60,zo=qo*60,_u=zo*24,Yte=_u*7,Qte=_u*365.25;QA.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Zte(t);if(n==="number"&&isFinite(t))return e.long?tne(t):ene(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Zte(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]),l=(e[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return n*Qte;case"weeks":case"week":case"w":return n*Yte;case"days":case"day":case"d":return n*_u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*zo;case"minutes":case"minute":case"mins":case"min":case"m":return n*qo;case"seconds":case"second":case"secs":case"sec":case"s":return n*Vo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function ene(t){var e=Math.abs(t);return e>=_u?Math.round(t/_u)+"d":e>=zo?Math.round(t/zo)+"h":e>=qo?Math.round(t/qo)+"m":e>=Vo?Math.round(t/Vo)+"s":t+"ms"}function tne(t){var e=Math.abs(t);return e>=_u?K8(t,e,_u,"day"):e>=zo?K8(t,e,zo,"hour"):e>=qo?K8(t,e,qo,"minute"):e>=Vo?K8(t,e,Vo,"second"):t+" ms"}function K8(t,e,n,l){var r=e>=n*1.5;return Math.round(t/n)+" "+l+(r?"s":"")}});var qd=k((INe,eO)=>{function nne(t){n.debug=n,n.default=n,n.coerce=u,n.disable=i,n.enable=r,n.enabled=s,n.humanize=ZA(),n.destroy=o,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let m=0;m<c.length;m++)f=(f<<5)-f+c.charCodeAt(m),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,m=null,d,y;function _(...S){if(!_.enabled)return;let w=_,E=Number(new Date),g=E-(f||E);w.diff=g,w.prev=f,w.curr=E,f=E,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let v=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(O,N)=>{if(O==="%%")return"%";v++;let R=n.formatters[N];if(typeof R=="function"){let U=S[v];O=R.call(w,U),S.splice(v,1),v--}return O}),n.formatArgs.call(w,S),(w.log||n.log).apply(w,S)}return _.namespace=c,_.useColors=n.useColors(),_.color=n.selectColor(c),_.extend=l,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(d!==n.namespaces&&(d=n.namespaces,y=n.enabled(c)),y),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function l(c,f){let m=n(this.namespace+(typeof f>"u"?":":f)+c);return m.log=this.log,m}function r(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,m=(typeof c=="string"?c:"").split(/[\s,]+/),d=m.length;for(f=0;f<d;f++)m[f]&&(c=m[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function i(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let f,m;for(f=0,m=n.skips.length;f<m;f++)if(n.skips[f].test(c))return!1;for(f=0,m=n.names.length;f<m;f++)if(n.names[f].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function u(c){return c instanceof Error?c.stack||c.message:c}function o(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),
Line truncated
|
||||
`).join(`
|
||||
`+i),t.push(r+"m+"+K8.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=rne()+e+" "+t[0]}function rne(){return x2.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ine(...t){return process.stderr.write(J8.format(...t)+`
|
||||
`)}function sne(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function ane(){return process.env.DEBUG}function une(t){t.inspectOpts={};let e=Object.keys(x2.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=x2.inspectOpts[e[n]]}K8.exports=Hd()(x2);var{formatters:nO}=K8.exports;nO.o=function(t){return this.inspectOpts.colors=this.useColors,J8.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};nO.O=function(t){return this.inspectOpts.colors=this.useColors,J8.inspect(t,this.inspectOpts)}});var X8=k((bNe,qd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?qd.exports=YA():qd.exports=lO()});var rO=k((wNe,Jd)=>{"use strict";var one=jd(),cne=require("events").EventEmitter,pne=require("util").inherits,f2=X8()("avvio"),{AVV_ERR_READY_TIMEOUT:fne}=Md(),zd=Symbol.for("plugin-meta");function dne(t,e){return t[zd]&&t[zd].name?t[zd].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 hne(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function zo(t,e,n,l,r){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=r===void 0?t._timeout:r,this.name=dne(e,n),this.isAfter=l,this.q=one(t,mne,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}pne(zo,cne);zo.prototype.exec=function(t,e){let n=this.func,l=!1,r=this.name;if(this.parent._error&&!this.isAfter){f2("skipping loading of plugin as parent errored and it is not an after",r),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(u){return f2("override errored",r),e(u)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,f2("exec",r);let i,s=u=>{if(l){f2("loading complete",r);return}this._error=u,f2(u?"exec errored":"exec completed",r),l=!0,i&&clearTimeout(i),e(u)};this.timeout>0&&(f2("setting up timeout",r,this.timeout),i=setTimeout(function(){f2("timed out",r),i=null;let u=new fne(r);u.fn=n,s(u)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(f2("exec: resolving promise",r),a.then(()=>process.nextTick(s),u=>process.nextTick(s,u)))};zo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,l)=>{this._error=n,this.q.pause(),n?(f2("rejecting promise",this.name,n),this._promise.reject(n)):(f2("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(l,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=hne(),e=this._promise.promise,this.server?t():this.on("start",t)),e};zo.prototype.enqueue=function(t,e){f2("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};zo.prototype.finish=function(t,e){f2("finish",this.name,t);let n=()=>{this.loaded||(f2("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 l=()=>{if(f2("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let r=()=>{f2("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else f2("delayed",this.name),this.q.drain=()=>{f2("drain",this.name),this.q.drain=yne,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function mne(t,e){let n=this;process.nextTick(Gd.bind(n),t,e)}function Gd(t,e){if(typeof t.func.then=="function"){t.func.then(l=>{typeof l.default=="function"&&(l=l.default),t.func=l,Gd.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,l=>{t.finish(l,r=>{this._current.shift(),e(r)})})}function yne(){}Jd.exports=zo;Jd.exports.loadPlugin=Gd});var oO=k((SNe,Qd)=>{"use strict";var iO=jd(),gne=require("events").EventEmitter,vne=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Kd,AVV_ERR_CALLBACK_NOT_FN:s1,AVV_ERR_PLUGIN_NOT_VALID:_ne,AVV_ERR_ROOT_PLG_BOOTED:Ene,AVV_ERR_READY_TIMEOUT:bne}=Md(),wne=JA(),Yd=rO(),Go=X8()("avvio"),W8=Symbol("kAvvio"),Xd=Symbol("kThenifyDoNotWrap");function Sne(t,e,n){let l=e.expose||{},r=l.use||"use",i=l.after||"after",s=l.ready||"ready",a=l.onClose||"onClose",u=l.close||"close";if(t[r])throw new Kd(r);if(t[i])throw new Kd(i);if(t[s])throw new Kd(s);t[r]=function(o,c){return n.use(o,c),this},Object.defineProperty(t,"then",{get:aO.bind(n)}),t[W8]=!0,t[i]=function(o){return typeof o!="function"?n._loadRegistered():(n.after(Wd(o,this)),this)},t[s]=function(o){if(o&&typeof o!="function")throw new s1(s,typeof o);return n.ready(o?Wd(o,this):void 0)},t[a]=function(o){if(typeof o!="function")throw new s1(a,typeof o);return n.onClose(Nne(o,this)),this},t[u]=function(o){if(o&&typeof o!="function")throw new s1(u,typeof o);return o?(n.close(Wd(o,this)),this):n.close()}}function d2(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof d2)){let l=new d2(t,e,n);return t&&Sne(t,e,l),l}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new wne,this._readyQ=iO(this,uO,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=sO},this._closeQ=iO(this,One,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=sO},this._doStart=null,this._root=new Yd(this,Tne.bind(this),e,!1,0),this._root.once("start",(l,r,i)=>{let s=this.pluginTree.start(null,r,i);this._root.onc
Line truncated
|
||||
causes have become circular...`;let l=dh(t);return l?(e.add(t),n+`
|
||||
caused by: `+HO(l,e)):n},Vle=t=>HO(t,new Set),VO=(t,e,n)=>{if(!c1(t))return"";let l=n?"":t.message||"";if(e.has(t))return l+": ...";let r=dh(t);if(r){e.add(t);let i=typeof t.cause=="function";return l+(i?"":": ")+VO(r,e,i)}else return l},qle=t=>VO(t,new Set);qO.exports={isErrorLike:c1,getErrorCause:dh,stackWithCauses:Vle,messageWithCauses:qle}});var mh=k((FNe,GO)=>{"use strict";var zle=Symbol("circular-ref-tag"),ac=Symbol("pino-raw-err-ref"),zO=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[ac]},set:function(t){this[ac]=t}}});Object.defineProperty(zO,ac,{writable:!0,value:{}});GO.exports={pinoErrProto:zO,pinoErrorSymbols:{seen:zle,rawSymbol:ac}}});var XO=k((jNe,KO)=>{"use strict";KO.exports=gh;var{messageWithCauses:Gle,stackWithCauses:Jle,isErrorLike:JO}=hh(),{pinoErrProto:Kle,pinoErrorSymbols:Xle}=mh(),{seen:yh}=Xle,{toString:Wle}=Object.prototype;function gh(t){if(!JO(t))return t;t[yh]=void 0;let e=Object.create(Kle);e.type=Wle.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Gle(t),e.stack=Jle(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>gh(n)));for(let n in t)if(e[n]===void 0){let l=t[n];JO(l)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(l,yh)&&(e[n]=gh(l)):e[n]=l}return delete t[yh],e.raw=t,e}});var YO=k((UNe,WO)=>{"use strict";WO.exports=oc;var{isErrorLike:vh}=hh(),{pinoErrProto:Yle,pinoErrorSymbols:Qle}=mh(),{seen:uc}=Qle,{toString:Zle}=Object.prototype;function oc(t){if(!vh(t))return t;t[uc]=void 0;let e=Object.create(Yle);e.type=Zle.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=>oc(n))),vh(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,uc)&&(e.cause=oc(t.cause));for(let n in t)if(e[n]===void 0){let l=t[n];vh(l)?Object.prototype.hasOwnProperty.call(l,uc)||(e[n]=oc(l)):e[n]=l}return delete t[uc],e.raw=t,e}});var tN=k((MNe,eN)=>{"use strict";eN.exports={mapHttpRequest:e2e,reqSerializer:ZO};var _h=Symbol("pino-raw-req-ref"),QO=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[_h]},set:function(t){this[_h]=t}}});Object.defineProperty(QO,_h,{writable:!0,value:{}});function ZO(t){let e=t.info||t.socket,n=Object.create(QO);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 l=t.path;n.url=typeof l=="string"?l: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 e2e(t){return{req:ZO(t)}}});var iN=k(($Ne,rN)=>{"use strict";rN.exports={mapHttpResponse:t2e,resSerializer:lN};var Eh=Symbol("pino-raw-res-ref"),nN=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Eh]},set:function(t){this[Eh]=t}}});Object.defineProperty(nN,Eh,{writable:!0,value:{}});function lN(t){let e=Object.create(nN);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function t2e(t){return{res:lN(t)}}});var wh=k((BNe,sN)=>{"use strict";var bh=XO(),n2e=YO(),cc=tN(),pc=iN();sN.exports={err:bh,errWithCause:n2e,mapHttpRequest:cc.mapHttpRequest,mapHttpResponse:pc.mapHttpResponse,req:cc.reqSerializer,res:pc.resSerializer,wrapErrorSerializer:function(e){return e===bh?e:function(l){return e(bh(l))}},wrapRequestSerializer:function(e){return e===cc.reqSerializer?e:function(l){return e(cc.reqSerializer(l))}},wrapResponseSerializer:function(e){return e===pc.resSerializer?e:function(l){return e(pc.resSerializer(l))}}}});var Sh=k((HNe,aN)=>{"use strict";function l2e(t,e){return e}aN.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=l2e;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let l=n.slice(2),r=[];for(let i of l)i&&r.push(i.getFileName());return r}});var oN=k((VNe,uN)=>{"use strict";uN.exports=r2e;function r2e(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=l=>`fast-redact \u2013 Invalid path (${l})`}=t;return function({paths:r}){r.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r
Line truncated
|
||||
`+i),t.push(r+"m+"+Y8.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=mne()+e+" "+t[0]}function mne(){return A2.inspectOpts.hideDate?"":new Date().toISOString()+" "}function yne(...t){return process.stderr.write(W8.format(...t)+`
|
||||
`)}function gne(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function vne(){return process.env.DEBUG}function _ne(t){t.inspectOpts={};let e=Object.keys(A2.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=A2.inspectOpts[e[n]]}Y8.exports=qd()(A2);var{formatters:sO}=Y8.exports;sO.o=function(t){return this.inspectOpts.colors=this.useColors,W8.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};sO.O=function(t){return this.inspectOpts.colors=this.useColors,W8.inspect(t,this.inspectOpts)}});var Q8=k((PNe,Gd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Gd.exports=tO():Gd.exports=aO()});var uO=k((LNe,Xd)=>{"use strict";var Ene=Md(),bne=require("events").EventEmitter,wne=require("util").inherits,h2=Q8()("avvio"),{AVV_ERR_READY_TIMEOUT:Sne}=Bd(),Jd=Symbol.for("plugin-meta");function Tne(t,e){return t[Jd]&&t[Jd].name?t[Jd].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 xne(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Jo(t,e,n,l,r){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=r===void 0?t._timeout:r,this.name=Tne(e,n),this.isAfter=l,this.q=Ene(t,Ane,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}wne(Jo,bne);Jo.prototype.exec=function(t,e){let n=this.func,l=!1,r=this.name;if(this.parent._error&&!this.isAfter){h2("skipping loading of plugin as parent errored and it is not an after",r),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(u){return h2("override errored",r),e(u)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,h2("exec",r);let i,s=u=>{if(l){h2("loading complete",r);return}this._error=u,h2(u?"exec errored":"exec completed",r),l=!0,i&&clearTimeout(i),e(u)};this.timeout>0&&(h2("setting up timeout",r,this.timeout),i=setTimeout(function(){h2("timed out",r),i=null;let u=new Sne(r);u.fn=n,s(u)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(h2("exec: resolving promise",r),a.then(()=>process.nextTick(s),u=>process.nextTick(s,u)))};Jo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,l)=>{this._error=n,this.q.pause(),n?(h2("rejecting promise",this.name,n),this._promise.reject(n)):(h2("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(l,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=xne(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Jo.prototype.enqueue=function(t,e){h2("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Jo.prototype.finish=function(t,e){h2("finish",this.name,t);let n=()=>{this.loaded||(h2("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 l=()=>{if(h2("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let r=()=>{h2("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else h2("delayed",this.name),this.q.drain=()=>{h2("drain",this.name),this.q.drain=One,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function Ane(t,e){let n=this;process.nextTick(Kd.bind(n),t,e)}function Kd(t,e){if(typeof t.func.then=="function"){t.func.then(l=>{typeof l.default=="function"&&(l=l.default),t.func=l,Kd.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,l=>{t.finish(l,r=>{this._current.shift(),e(r)})})}function One(){}Xd.exports=Jo;Xd.exports.loadPlugin=Kd});var dO=k((FNe,eh)=>{"use strict";var oO=Md(),Nne=require("events").EventEmitter,Cne=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Wd,AVV_ERR_CALLBACK_NOT_FN:o1,AVV_ERR_PLUGIN_NOT_VALID:Rne,AVV_ERR_ROOT_PLG_BOOTED:Ine,AVV_ERR_READY_TIMEOUT:kne}=Bd(),Dne=YA(),Zd=uO(),Ko=Q8()("avvio"),Z8=Symbol("kAvvio"),Yd=Symbol("kThenifyDoNotWrap");function Pne(t,e,n){let l=e.expose||{},r=l.use||"use",i=l.after||"after",s=l.ready||"ready",a=l.onClose||"onClose",u=l.close||"close";if(t[r])throw new Wd(r);if(t[i])throw new Wd(i);if(t[s])throw new Wd(s);t[r]=function(o,c){return n.use(o,c),this},Object.defineProperty(t,"then",{get:pO.bind(n)}),t[Z8]=!0,t[i]=function(o){return typeof o!="function"?n._loadRegistered():(n.after(Qd(o,this)),this)},t[s]=function(o){if(o&&typeof o!="function")throw new o1(s,typeof o);return n.ready(o?Qd(o,this):void 0)},t[a]=function(o){if(typeof o!="function")throw new o1(a,typeof o);return n.onClose(Mne(o,this)),this},t[u]=function(o){if(o&&typeof o!="function")throw new o1(u,typeof o);return o?(n.close(Qd(o,this)),this):n.close()}}function m2(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof m2)){let l=new m2(t,e,n);return t&&Pne(t,e,l),l}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new Dne,this._readyQ=oO(this,fO,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=cO},this._closeQ=oO(this,Une,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=cO},this._doStart=null,this._root=new Zd(this,Lne.bind(this),e,!1,0),this._root.once("start",(l,r,i)=>{let s=this.pluginTree.start(null,r,i);this._root.onc
Line truncated
|
||||
causes have become circular...`;let l=mh(t);return l?(e.add(t),n+`
|
||||
caused by: `+GO(l,e)):n},e2e=t=>GO(t,new Set),JO=(t,e,n)=>{if(!d1(t))return"";let l=n?"":t.message||"";if(e.has(t))return l+": ...";let r=mh(t);if(r){e.add(t);let i=typeof t.cause=="function";return l+(i?"":": ")+JO(r,e,i)}else return l},t2e=t=>JO(t,new Set);KO.exports={isErrorLike:d1,getErrorCause:mh,stackWithCauses:e2e,messageWithCauses:t2e}});var gh=k((XNe,WO)=>{"use strict";var n2e=Symbol("circular-ref-tag"),cc=Symbol("pino-raw-err-ref"),XO=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[cc]},set:function(t){this[cc]=t}}});Object.defineProperty(XO,cc,{writable:!0,value:{}});WO.exports={pinoErrProto:XO,pinoErrorSymbols:{seen:n2e,rawSymbol:cc}}});var ZO=k((WNe,QO)=>{"use strict";QO.exports=_h;var{messageWithCauses:l2e,stackWithCauses:r2e,isErrorLike:YO}=yh(),{pinoErrProto:i2e,pinoErrorSymbols:s2e}=gh(),{seen:vh}=s2e,{toString:a2e}=Object.prototype;function _h(t){if(!YO(t))return t;t[vh]=void 0;let e=Object.create(i2e);e.type=a2e.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=l2e(t),e.stack=r2e(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>_h(n)));for(let n in t)if(e[n]===void 0){let l=t[n];YO(l)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(l,vh)&&(e[n]=_h(l)):e[n]=l}return delete t[vh],e.raw=t,e}});var tN=k((YNe,eN)=>{"use strict";eN.exports=fc;var{isErrorLike:Eh}=yh(),{pinoErrProto:u2e,pinoErrorSymbols:o2e}=gh(),{seen:pc}=o2e,{toString:c2e}=Object.prototype;function fc(t){if(!Eh(t))return t;t[pc]=void 0;let e=Object.create(u2e);e.type=c2e.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=>fc(n))),Eh(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,pc)&&(e.cause=fc(t.cause));for(let n in t)if(e[n]===void 0){let l=t[n];Eh(l)?Object.prototype.hasOwnProperty.call(l,pc)||(e[n]=fc(l)):e[n]=l}return delete t[pc],e.raw=t,e}});var iN=k((QNe,rN)=>{"use strict";rN.exports={mapHttpRequest:p2e,reqSerializer:lN};var bh=Symbol("pino-raw-req-ref"),nN=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[bh]},set:function(t){this[bh]=t}}});Object.defineProperty(nN,bh,{writable:!0,value:{}});function lN(t){let e=t.info||t.socket,n=Object.create(nN);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 l=t.path;n.url=typeof l=="string"?l: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 p2e(t){return{req:lN(t)}}});var oN=k((ZNe,uN)=>{"use strict";uN.exports={mapHttpResponse:f2e,resSerializer:aN};var wh=Symbol("pino-raw-res-ref"),sN=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[wh]},set:function(t){this[wh]=t}}});Object.defineProperty(sN,wh,{writable:!0,value:{}});function aN(t){let e=Object.create(sN);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function f2e(t){return{res:aN(t)}}});var Th=k((eCe,cN)=>{"use strict";var Sh=ZO(),d2e=tN(),dc=iN(),hc=oN();cN.exports={err:Sh,errWithCause:d2e,mapHttpRequest:dc.mapHttpRequest,mapHttpResponse:hc.mapHttpResponse,req:dc.reqSerializer,res:hc.resSerializer,wrapErrorSerializer:function(e){return e===Sh?e:function(l){return e(Sh(l))}},wrapRequestSerializer:function(e){return e===dc.reqSerializer?e:function(l){return e(dc.reqSerializer(l))}},wrapResponseSerializer:function(e){return e===hc.resSerializer?e:function(l){return e(hc.resSerializer(l))}}}});var xh=k((tCe,pN)=>{"use strict";function h2e(t,e){return e}pN.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=h2e;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let l=n.slice(2),r=[];for(let i of l)i&&r.push(i.getFileName());return r}});var dN=k((nCe,fN)=>{"use strict";fN.exports=m2e;function m2e(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=l=>`fast-redact \u2013 Invalid path (${l})`}=t;return function({paths:r}){r.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r
Line truncated
|
||||
'use strict'
|
||||
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
|
||||
const \u3007 = null;
|
||||
o${s}
|
||||
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var fc=k((qNe,cN)=>{"use strict";cN.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var fN=k((zNe,pN)=>{"use strict";var i2e=fc();pN.exports=s2e;function s2e({paths:t}){let e=[];var n=0;let l=t.reduce(function(r,i,s){var a=i.match(i2e).map(c=>c.replace(/'|"|`/g,""));let u=i[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let o=a.indexOf("*");if(o>-1){let c=a.slice(0,o),f=c.join("."),m=a.slice(o+1,a.length),d=m.length>0;n++,e.push({before:c,beforeStr:f,after:m,nested:d})}else r[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:u};return r},{});return{wildcards:e,wcLen:n,secret:l}}});var hN=k((GNe,dN)=>{"use strict";var a2e=fc();dN.exports=u2e;function u2e({secret:t,serialize:e,wcLen:n,strict:l,isCensorFct:r,censorFctTakesPath:i},s){let a=Function("o",`
|
||||
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var mc=k((lCe,hN)=>{"use strict";hN.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var yN=k((rCe,mN)=>{"use strict";var y2e=mc();mN.exports=g2e;function g2e({paths:t}){let e=[];var n=0;let l=t.reduce(function(r,i,s){var a=i.match(y2e).map(c=>c.replace(/'|"|`/g,""));let u=i[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let o=a.indexOf("*");if(o>-1){let c=a.slice(0,o),f=c.join("."),m=a.slice(o+1,a.length),d=m.length>0;n++,e.push({before:c,beforeStr:f,after:m,nested:d})}else r[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:u};return r},{});return{wildcards:e,wcLen:n,secret:l}}});var vN=k((iCe,gN)=>{"use strict";var v2e=mc();gN.exports=_2e;function _2e({secret:t,serialize:e,wcLen:n,strict:l,isCensorFct:r,censorFctTakesPath:i},s){let a=Function("o",`
|
||||
if (typeof o !== 'object' || o == null) {
|
||||
${f2e(l,e)}
|
||||
${S2e(l,e)}
|
||||
}
|
||||
const { censor, secret } = this
|
||||
${o2e(t,r,i)}
|
||||
${E2e(t,r,i)}
|
||||
this.compileRestore()
|
||||
${c2e(n>0,r,i)}
|
||||
${p2e(e)}
|
||||
`).bind(s);return e===!1&&(a.restore=u=>s.restore(u)),a}function o2e(t,e,n){return Object.keys(t).map(l=>{let{escPath:r,leadingBracket:i,path:s}=t[l],a=i?1:0,u=i?"":".",o=[];for(var c;(c=a2e.exec(l))!==null;){let[,y]=c,{index:_,input:S}=c;_>a&&o.push(S.substring(0,_-(y?0:1)))}var f=o.map(y=>`o${u}${y}`).join(" && ");f.length===0?f+=`o${u}${l} != null`:f+=` && o${u}${l} != null`;let m=`
|
||||
${b2e(n>0,r,i)}
|
||||
${w2e(e)}
|
||||
`).bind(s);return e===!1&&(a.restore=u=>s.restore(u)),a}function E2e(t,e,n){return Object.keys(t).map(l=>{let{escPath:r,leadingBracket:i,path:s}=t[l],a=i?1:0,u=i?"":".",o=[];for(var c;(c=v2e.exec(l))!==null;){let[,y]=c,{index:_,input:S}=c;_>a&&o.push(S.substring(0,_-(y?0:1)))}var f=o.map(y=>`o${u}${y}`).join(" && ");f.length===0?f+=`o${u}${l} != null`:f+=` && o${u}${l} != null`;let m=`
|
||||
switch (true) {
|
||||
${o.reverse().map(y=>`
|
||||
case o${u}${y} === censor:
|
||||
@@ -43,7 +43,7 @@ caused by: `+HO(l,e)):n},Vle=t=>HO(t,new Set),VO=(t,e,n)=>{if(!c1(t))return"";le
|
||||
}
|
||||
}
|
||||
`}).join(`
|
||||
`)}function c2e(t,e,n){return t===!0?`
|
||||
`)}function b2e(t,e,n){return t===!0?`
|
||||
{
|
||||
const { wildcards, wcLen, groupRedact, nestedRedact } = this
|
||||
for (var i = 0; i < wcLen; i++) {
|
||||
@@ -54,16 +54,16 @@ caused by: `+HO(l,e)):n},Vle=t=>HO(t,new Set),VO=(t,e,n)=>{if(!c1(t))return"";le
|
||||
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
|
||||
}
|
||||
}
|
||||
`:""}function p2e(t){return t===!1?"return o":`
|
||||
`:""}function w2e(t){return t===!1?"return o":`
|
||||
var s = this.serialize(o)
|
||||
this.restore(o)
|
||||
return s
|
||||
`}function f2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var xh=k((JNe,gN)=>{"use strict";gN.exports={groupRedact:h2e,groupRestore:d2e,nestedRedact:y2e,nestedRestore:m2e};function d2e({keys:t,values:e,target:n}){if(n==null)return;let l=t.length;for(var r=0;r<l;r++){let i=t[r];n[i]=e[r]}}function h2e(t,e,n,l,r){let i=mN(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,u=e.length,o=r?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let m=s[f];c[f]=i[m],r?(o[u]=m,i[m]=n(i[m],o)):l?i[m]=n(i[m]):i[m]=n}return{keys:s,values:c,target:i,flat:!0}}function m2e(t){for(let e=0;e<t.length;e++){let{target:n,path:l,value:r}=t[e],i=n;for(let s=l.length-1;s>0;s--)i=i[l[s]];i[l[0]]=r}}function y2e(t,e,n,l,r,i,s){let a=mN(e,n);if(a==null)return;let u=Object.keys(a),o=u.length;for(var c=0;c<o;c++){let f=u[c];g2e(t,a,f,n,l,r,i,s)}return t}function Th(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function g2e(t,e,n,l,r,i,s,a){let u=r.length,o=u-1,c=n;var f=-1,m,d,y,_=null,S=null,w,E,g=!1,v=0,x=0,O=v2e();if(y=m=e[n],typeof m=="object"){for(;m!=null&&++f<u&&(x+=1,n=r[f],_=y,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(g=!0),S=n,f!==o))){if(S){let R=Object.keys(m);for(var N=0;N<R.length;N++){let U=R[N];if(E=m[U],w=n==="*",g)O=Fi(O,U,x),v=f,y=yN(E,v-1,n,l,r,i,s,a,c,m,d,y,w,U,f,o,O,t,e[c],x+1);else if(w||typeof E=="object"&&E!==null&&n in E){if(w?y=E:y=E[n],d=f!==o?y:s?a?i(y,[...l,c,...r]):i(y):i,w){let F=p1(Fi(O,U,x),y,e[c]);t.push(F),m[U]=d}else if(E[n]!==d)if(d===void 0&&i!==void 0||Th(E,n)&&d===y)O=Fi(O,U,x);else{O=Fi(O,U,x);let F=p1(Fi(O,n,x+1),y,e[c]);t.push(F),E[n]=d}}}S=null}else{if(y=m[n],O=Fi(O,n,x),d=f!==o?y:s?a?i(y,[...l,c,...r]):i(y):i,!(Th(m,n)&&d===y||d===void 0&&i!==void 0)){let R=p1(O,y,e[c]);t.push(R),m[n]=d}m=m[n]}if(typeof m!="object")break}}}function mN(t,e){for(var n=-1,l=e.length,r=t;r!=null&&++n<l;)r=r[e[n]];return r}function yN(t,e,n,l,r,i,s,a,u,o,c,f,m,d,y,_,S,w,E,g){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?f=t:f=t[n],c=y!==_?f:s?a?i(f,[...l,u,...r]):i(f):i,m){let v=p1(S,f,E);w.push(v),o[d]=c}else if(t[n]!==c){if(!(c===void 0&&i!==void 0||Th(t,n)&&c===f)){let v=p1(Fi(S,n,g+1),f,E);w.push(v),t[n]=c}}}for(let v in t)typeof t[v]=="object"&&(S=Fi(S,v,g),yN(t[v],e-1,n,l,r,i,s,a,u,o,c,f,m,d,y,_,S,w,E,g+1))}function v2e(){return{parent:null,key:null,children:[],depth:0}}function Fi(t,e,n){if(t.depth===n)return Fi(t.parent,e,n);var l={parent:t,key:e,depth:n,children:[]};return t.children.push(l),l}function p1(t,e,n){let l=t,r=[];do r.push(l.key),l=l.parent;while(l.parent!=null);return{path:r,value:e,target:n}}});var _N=k((KNe,vN)=>{"use strict";var{groupRestore:_2e,nestedRestore:E2e}=xh();vN.exports=b2e;function b2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let l=Object.keys(t),r=w2e(t,l),i=e>0,s=i?{secret:t,groupRestore:_2e,nestedRestore:E2e}:{secret:t};this.restore=Function("o",S2e(r,l,i)).bind(s)}}function w2e(t,e){return e.map(n=>{let{circle:l,escPath:r,leadingBracket:i}=t[n],a=l?`o.${l} = secret[${r}].val`:`o${i?"":"."}${n} = secret[${r}].val`,u=`secret[${r}].val = undefined`;return`
|
||||
`}function S2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var Oh=k((sCe,bN)=>{"use strict";bN.exports={groupRedact:x2e,groupRestore:T2e,nestedRedact:O2e,nestedRestore:A2e};function T2e({keys:t,values:e,target:n}){if(n==null)return;let l=t.length;for(var r=0;r<l;r++){let i=t[r];n[i]=e[r]}}function x2e(t,e,n,l,r){let i=_N(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,u=e.length,o=r?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let m=s[f];c[f]=i[m],r?(o[u]=m,i[m]=n(i[m],o)):l?i[m]=n(i[m]):i[m]=n}return{keys:s,values:c,target:i,flat:!0}}function A2e(t){for(let e=0;e<t.length;e++){let{target:n,path:l,value:r}=t[e],i=n;for(let s=l.length-1;s>0;s--)i=i[l[s]];i[l[0]]=r}}function O2e(t,e,n,l,r,i,s){let a=_N(e,n);if(a==null)return;let u=Object.keys(a),o=u.length;for(var c=0;c<o;c++){let f=u[c];N2e(t,a,f,n,l,r,i,s)}return t}function Ah(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function N2e(t,e,n,l,r,i,s,a){let u=r.length,o=u-1,c=n;var f=-1,m,d,y,_=null,S=null,w,E,g=!1,v=0,x=0,O=C2e();if(y=m=e[n],typeof m=="object"){for(;m!=null&&++f<u&&(x+=1,n=r[f],_=y,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(g=!0),S=n,f!==o))){if(S){let R=Object.keys(m);for(var N=0;N<R.length;N++){let U=R[N];if(E=m[U],w=n==="*",g)O=Ui(O,U,x),v=f,y=EN(E,v-1,n,l,r,i,s,a,c,m,d,y,w,U,f,o,O,t,e[c],x+1);else if(w||typeof E=="object"&&E!==null&&n in E){if(w?y=E:y=E[n],d=f!==o?y:s?a?i(y,[...l,c,...r]):i(y):i,w){let F=h1(Ui(O,U,x),y,e[c]);t.push(F),m[U]=d}else if(E[n]!==d)if(d===void 0&&i!==void 0||Ah(E,n)&&d===y)O=Ui(O,U,x);else{O=Ui(O,U,x);let F=h1(Ui(O,n,x+1),y,e[c]);t.push(F),E[n]=d}}}S=null}else{if(y=m[n],O=Ui(O,n,x),d=f!==o?y:s?a?i(y,[...l,c,...r]):i(y):i,!(Ah(m,n)&&d===y||d===void 0&&i!==void 0)){let R=h1(O,y,e[c]);t.push(R),m[n]=d}m=m[n]}if(typeof m!="object")break}}}function _N(t,e){for(var n=-1,l=e.length,r=t;r!=null&&++n<l;)r=r[e[n]];return r}function EN(t,e,n,l,r,i,s,a,u,o,c,f,m,d,y,_,S,w,E,g){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?f=t:f=t[n],c=y!==_?f:s?a?i(f,[...l,u,...r]):i(f):i,m){let v=h1(S,f,E);w.push(v),o[d]=c}else if(t[n]!==c){if(!(c===void 0&&i!==void 0||Ah(t,n)&&c===f)){let v=h1(Ui(S,n,g+1),f,E);w.push(v),t[n]=c}}}for(let v in t)typeof t[v]=="object"&&(S=Ui(S,v,g),EN(t[v],e-1,n,l,r,i,s,a,u,o,c,f,m,d,y,_,S,w,E,g+1))}function C2e(){return{parent:null,key:null,children:[],depth:0}}function Ui(t,e,n){if(t.depth===n)return Ui(t.parent,e,n);var l={parent:t,key:e,depth:n,children:[]};return t.children.push(l),l}function h1(t,e,n){let l=t,r=[];do r.push(l.key),l=l.parent;while(l.parent!=null);return{path:r,value:e,target:n}}});var SN=k((aCe,wN)=>{"use strict";var{groupRestore:R2e,nestedRestore:I2e}=Oh();wN.exports=k2e;function k2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let l=Object.keys(t),r=D2e(t,l),i=e>0,s=i?{secret:t,groupRestore:R2e,nestedRestore:I2e}:{secret:t};this.restore=Function("o",P2e(r,l,i)).bind(s)}}function D2e(t,e){return e.map(n=>{let{circle:l,escPath:r,leadingBracket:i}=t[n],a=l?`o.${l} = secret[${r}].val`:`o${i?"":"."}${n} = secret[${r}].val`,u=`secret[${r}].val = undefined`;return`
|
||||
if (secret[${r}].val !== undefined) {
|
||||
try { ${a} } catch (e) {}
|
||||
${u}
|
||||
}
|
||||
`}).join("")}function S2e(t,e,n){return`
|
||||
`}).join("")}function P2e(t,e,n){return`
|
||||
const secret = this.secret
|
||||
${n===!0?`
|
||||
const keys = Object.keys(secret)
|
||||
@@ -78,34 +78,34 @@ caused by: `+HO(l,e)):n},Vle=t=>HO(t,new Set),VO=(t,e,n)=>{if(!c1(t))return"";le
|
||||
`:""}
|
||||
${t}
|
||||
return o
|
||||
`}});var bN=k((XNe,EN)=>{"use strict";EN.exports=T2e;function T2e(t){let{secret:e,censor:n,compileRestore:l,serialize:r,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:u}=t,o=[{secret:e,censor:n,compileRestore:l}];return r!==!1&&o.push({serialize:r}),u>0&&o.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:u}),Object.assign(...o)}});var TN=k((WNe,SN)=>{"use strict";var wN=oN(),x2e=fN(),A2e=hN(),O2e=_N(),{groupRedact:N2e,nestedRedact:C2e}=xh(),R2e=bN(),I2e=fc(),k2e=wN(),Ah=t=>t;Ah.restore=Ah;var D2e="[REDACTED]";Oh.rx=I2e;Oh.validator=wN;SN.exports=Oh;function Oh(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,l=t.remove;if(l===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=l===!0?void 0:"censor"in t?t.censor:D2e,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return n||Ah;k2e({paths:e,serialize:n,censor:r});let{wildcards:a,wcLen:u,secret:o}=x2e({paths:e,censor:r}),c=O2e({secret:o,wcLen:u}),f="strict"in t?t.strict:!0;return A2e({secret:o,wcLen:u,serialize:n,strict:f,isCensorFct:i,censorFctTakesPath:s},R2e({secret:o,censor:r,compileRestore:c,serialize:n,groupRedact:N2e,nestedRedact:C2e,wildcards:a,wcLen:u}))}});var Wo=k((YNe,xN)=>{"use strict";var P2e=Symbol("pino.setLevel"),L2e=Symbol("pino.getLevel"),F2e=Symbol("pino.levelVal"),j2e=Symbol("pino.levelComp"),U2e=Symbol("pino.useLevelLabels"),M2e=Symbol("pino.useOnlyCustomLevels"),$2e=Symbol("pino.mixin"),B2e=Symbol("pino.lsCache"),H2e=Symbol("pino.chindings"),V2e=Symbol("pino.asJson"),q2e=Symbol("pino.write"),z2e=Symbol("pino.redactFmt"),G2e=Symbol("pino.time"),J2e=Symbol("pino.timeSliceIndex"),K2e=Symbol("pino.stream"),X2e=Symbol("pino.stringify"),W2e=Symbol("pino.stringifySafe"),Y2e=Symbol("pino.stringifiers"),Q2e=Symbol("pino.end"),Z2e=Symbol("pino.formatOpts"),e3e=Symbol("pino.messageKey"),t3e=Symbol("pino.errorKey"),n3e=Symbol("pino.nestedKey"),l3e=Symbol("pino.nestedKeyStr"),r3e=Symbol("pino.mixinMergeStrategy"),i3e=Symbol("pino.msgPrefix"),s3e=Symbol("pino.wildcardFirst"),a3e=Symbol.for("pino.serializers"),u3e=Symbol.for("pino.formatters"),o3e=Symbol.for("pino.hooks"),c3e=Symbol.for("pino.metadata");xN.exports={setLevelSym:P2e,getLevelSym:L2e,levelValSym:F2e,levelCompSym:j2e,useLevelLabelsSym:U2e,mixinSym:$2e,lsCacheSym:B2e,chindingsSym:H2e,asJsonSym:V2e,writeSym:q2e,serializersSym:a3e,redactFmtSym:z2e,timeSym:G2e,timeSliceIndexSym:J2e,streamSym:K2e,stringifySym:X2e,stringifySafeSym:W2e,stringifiersSym:Y2e,endSym:Q2e,formatOptsSym:Z2e,messageKeySym:e3e,errorKeySym:t3e,nestedKeySym:n3e,wildcardFirstSym:s3e,needsMetadataGsym:c3e,useOnlyCustomLevelsSym:M2e,formattersSym:u3e,hooksSym:o3e,nestedKeyStrSym:l3e,mixinMergeStrategySym:r3e,msgPrefixSym:i3e}});var Rh=k((QNe,CN)=>{"use strict";var Ch=TN(),{redactFmtSym:p3e,wildcardFirstSym:dc}=Wo(),{rx:Nh,validator:f3e}=Ch,AN=f3e({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),ON="[Redacted]",NN=!1;function d3e(t,e){let{paths:n,censor:l}=h3e(t),r=n.reduce((a,u)=>{Nh.lastIndex=0;let o=Nh.exec(u),c=Nh.exec(u),f=o[1]!==void 0?o[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):o[0];if(f==="*"&&(f=dc),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:m}=c,d=`${u.substr(m,u.length-1)}`;return a[f]=a[f]||[],f!==dc&&a[f].length===0&&a[f].push(...a[dc]||[]),f===dc&&Object.keys(a).forEach(function(y){a[y]&&a[y].push(d)}),a[f].push(d),a},{}),i={[p3e]:Ch({paths:n,censor:l,serialize:e,strict:NN})},s=(...a)=>e(typeof l=="function"?l(...a):l);return[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((a,u)=>{if(r[u]===null)a[u]=o=>s(o,[u]);else{let o=typeof l=="function"?(c,f)=>l(c,[u,...f]):l;a[u]=Ch({paths:r[u],censor:o,serialize:e,strict:NN})}return a},i)}function h3e(t){if(Array.isArray(t))return t={paths:t,censor:ON},AN(t),t;let{paths:e,censor:n=ON,remove:l}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return l===!0&&(n=void 0),AN({paths:e,censor:n}),{paths:e,censor:n}}CN.exports=d3e});var IN=k((ZNe,RN)=>{"use strict";var m3e=()=>"",y3e=()=>`,"time":${Date.now()}`,g3e=()=>`,"time":${Math.round(Date.now()/1e3)}`,v3e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;RN.exports={nullTime:m3e,epochTime:y3e,unixTime:g3e,isoTime:v3e}});var DN=k((eCe,kN)=>{"use strict";function _3e(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}kN.exports=E3e;function E3e(t,e,n){var l=n&&n.stringify||_3e,r=1;if(typeof t=="object"&&t!==null){var i=e.length+r;if(i===1)return t;var s=new Array(i);s[0]=l(t);for(var a=1;a<i;a++)s[a]=l(e[a]);return s.join(" ")}if(typeof t!="string")return t;var u=e.length;if(u===0)return t;for(var o="",c=1-r,f=-1,m=t&&t.length||0,d=0;d<m;){if(t.charCodeAt(d)===37&&d+1<m){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(c>=u||e[c]==null)Line truncated
|
||||
`}});var xN=k((uCe,TN)=>{"use strict";TN.exports=L2e;function L2e(t){let{secret:e,censor:n,compileRestore:l,serialize:r,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:u}=t,o=[{secret:e,censor:n,compileRestore:l}];return r!==!1&&o.push({serialize:r}),u>0&&o.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:u}),Object.assign(...o)}});var NN=k((oCe,ON)=>{"use strict";var AN=dN(),F2e=yN(),j2e=vN(),U2e=SN(),{groupRedact:M2e,nestedRedact:$2e}=Oh(),B2e=xN(),H2e=mc(),V2e=AN(),Nh=t=>t;Nh.restore=Nh;var q2e="[REDACTED]";Ch.rx=H2e;Ch.validator=AN;ON.exports=Ch;function Ch(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,l=t.remove;if(l===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=l===!0?void 0:"censor"in t?t.censor:q2e,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return n||Nh;V2e({paths:e,serialize:n,censor:r});let{wildcards:a,wcLen:u,secret:o}=F2e({paths:e,censor:r}),c=U2e({secret:o,wcLen:u}),f="strict"in t?t.strict:!0;return j2e({secret:o,wcLen:u,serialize:n,strict:f,isCensorFct:i,censorFctTakesPath:s},B2e({secret:o,censor:r,compileRestore:c,serialize:n,groupRedact:M2e,nestedRedact:$2e,wildcards:a,wcLen:u}))}});var Qo=k((cCe,CN)=>{"use strict";var z2e=Symbol("pino.setLevel"),G2e=Symbol("pino.getLevel"),J2e=Symbol("pino.levelVal"),K2e=Symbol("pino.levelComp"),X2e=Symbol("pino.useLevelLabels"),W2e=Symbol("pino.useOnlyCustomLevels"),Y2e=Symbol("pino.mixin"),Q2e=Symbol("pino.lsCache"),Z2e=Symbol("pino.chindings"),e3e=Symbol("pino.asJson"),t3e=Symbol("pino.write"),n3e=Symbol("pino.redactFmt"),l3e=Symbol("pino.time"),r3e=Symbol("pino.timeSliceIndex"),i3e=Symbol("pino.stream"),s3e=Symbol("pino.stringify"),a3e=Symbol("pino.stringifySafe"),u3e=Symbol("pino.stringifiers"),o3e=Symbol("pino.end"),c3e=Symbol("pino.formatOpts"),p3e=Symbol("pino.messageKey"),f3e=Symbol("pino.errorKey"),d3e=Symbol("pino.nestedKey"),h3e=Symbol("pino.nestedKeyStr"),m3e=Symbol("pino.mixinMergeStrategy"),y3e=Symbol("pino.msgPrefix"),g3e=Symbol("pino.wildcardFirst"),v3e=Symbol.for("pino.serializers"),_3e=Symbol.for("pino.formatters"),E3e=Symbol.for("pino.hooks"),b3e=Symbol.for("pino.metadata");CN.exports={setLevelSym:z2e,getLevelSym:G2e,levelValSym:J2e,levelCompSym:K2e,useLevelLabelsSym:X2e,mixinSym:Y2e,lsCacheSym:Q2e,chindingsSym:Z2e,asJsonSym:e3e,writeSym:t3e,serializersSym:v3e,redactFmtSym:n3e,timeSym:l3e,timeSliceIndexSym:r3e,streamSym:i3e,stringifySym:s3e,stringifySafeSym:a3e,stringifiersSym:u3e,endSym:o3e,formatOptsSym:c3e,messageKeySym:p3e,errorKeySym:f3e,nestedKeySym:d3e,wildcardFirstSym:g3e,needsMetadataGsym:b3e,useOnlyCustomLevelsSym:W2e,formattersSym:_3e,hooksSym:E3e,nestedKeyStrSym:h3e,mixinMergeStrategySym:m3e,msgPrefixSym:y3e}});var kh=k((pCe,DN)=>{"use strict";var Ih=NN(),{redactFmtSym:w3e,wildcardFirstSym:yc}=Qo(),{rx:Rh,validator:S3e}=Ih,RN=S3e({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),IN="[Redacted]",kN=!1;function T3e(t,e){let{paths:n,censor:l}=x3e(t),r=n.reduce((a,u)=>{Rh.lastIndex=0;let o=Rh.exec(u),c=Rh.exec(u),f=o[1]!==void 0?o[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):o[0];if(f==="*"&&(f=yc),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:m}=c,d=`${u.substr(m,u.length-1)}`;return a[f]=a[f]||[],f!==yc&&a[f].length===0&&a[f].push(...a[yc]||[]),f===yc&&Object.keys(a).forEach(function(y){a[y]&&a[y].push(d)}),a[f].push(d),a},{}),i={[w3e]:Ih({paths:n,censor:l,serialize:e,strict:kN})},s=(...a)=>e(typeof l=="function"?l(...a):l);return[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((a,u)=>{if(r[u]===null)a[u]=o=>s(o,[u]);else{let o=typeof l=="function"?(c,f)=>l(c,[u,...f]):l;a[u]=Ih({paths:r[u],censor:o,serialize:e,strict:kN})}return a},i)}function x3e(t){if(Array.isArray(t))return t={paths:t,censor:IN},RN(t),t;let{paths:e,censor:n=IN,remove:l}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return l===!0&&(n=void 0),RN({paths:e,censor:n}),{paths:e,censor:n}}DN.exports=T3e});var LN=k((fCe,PN)=>{"use strict";var A3e=()=>"",O3e=()=>`,"time":${Date.now()}`,N3e=()=>`,"time":${Math.round(Date.now()/1e3)}`,C3e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;PN.exports={nullTime:A3e,epochTime:O3e,unixTime:N3e,isoTime:C3e}});var jN=k((dCe,FN)=>{"use strict";function R3e(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}FN.exports=I3e;function I3e(t,e,n){var l=n&&n.stringify||R3e,r=1;if(typeof t=="object"&&t!==null){var i=e.length+r;if(i===1)return t;var s=new Array(i);s[0]=l(t);for(var a=1;a<i;a++)s[a]=l(e[a]);return s.join(" ")}if(typeof t!="string")return t;var u=e.length;if(u===0)return t;for(var o="",c=1-r,f=-1,m=t&&t.length||0,d=0;d<m;){if(t.charCodeAt(d)===37&&d+1<m){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(c>=u||e[c]==null)Line truncated
|
||||
${w}`,v=`,
|
||||
${w}`);let te=Math.min(E.length,s),Q=0;for(;Q<te-1;Q++){let ce=a(String(Q),E,y,_,S,w);g+=ce!==void 0?ce:"null",g+=v}let W=a(String(Q),E,y,_,S,w);if(g+=W!==void 0?W:"null",E.length-1>s){let ce=E.length-s-1;g+=`${v}"... ${Eu(ce)} not stringified"`}return S!==""&&(g+=`
|
||||
${w}`);let te=Math.min(E.length,s),Q=0;for(;Q<te-1;Q++){let ce=a(String(Q),E,y,_,S,w);g+=ce!==void 0?ce:"null",g+=v}let W=a(String(Q),E,y,_,S,w);if(g+=W!==void 0?W:"null",E.length-1>s){let ce=E.length-s-1;g+=`${v}"... ${wu(ce)} not stringified"`}return S!==""&&(g+=`
|
||||
${x}`),y.pop(),`[${g}]`}let O=Object.keys(E),N=O.length;if(N===0)return"{}";if(i<y.length+1)return'"[Object]"';let R="",U="";S!==""&&(w+=S,v=`,
|
||||
${w}`,R=" ");let F=Math.min(N,s);r&&!tm(E)&&(O=em(O)),y.push(E);for(let te=0;te<F;te++){let Q=O[te],W=a(Q,E,y,_,S,w);W!==void 0&&(g+=`${U}${vs(Q)}:${R}${W}`,U=v)}if(N>s){let te=N-s;g+=`${U}"...":${R}"${Eu(te)} not stringified"`,U=v}return S!==""&&U.length>1&&(g=`
|
||||
${w}`,R=" ");let F=Math.min(N,s);r&&!lm(E)&&(O=nm(O)),y.push(E);for(let te=0;te<F;te++){let Q=O[te],W=a(Q,E,y,_,S,w);W!==void 0&&(g+=`${U}${Es(Q)}:${R}${W}`,U=v)}if(N>s){let te=N-s;g+=`${U}"...":${R}"${wu(te)} not stringified"`,U=v}return S!==""&&U.length>1&&(g=`
|
||||
${w}${g}
|
||||
${x}`),y.pop(),`{${g}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(E);default:return e?e(E):void 0}}function u(m,d,y,_,S,w){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return vs(d);case"object":{if(d===null)return"null";if(y.indexOf(d)!==-1)return n;let E=w,g="",v=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d),S!==""&&(w+=S,g+=`
|
||||
${x}`),y.pop(),`{${g}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(E);default:return e?e(E):void 0}}function u(m,d,y,_,S,w){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return Es(d);case"object":{if(d===null)return"null";if(y.indexOf(d)!==-1)return n;let E=w,g="",v=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d),S!==""&&(w+=S,g+=`
|
||||
${w}`,v=`,
|
||||
${w}`);let N=Math.min(d.length,s),R=0;for(;R<N-1;R++){let F=u(String(R),d[R],y,_,S,w);g+=F!==void 0?F:"null",g+=v}let U=u(String(R),d[R],y,_,S,w);if(g+=U!==void 0?U:"null",d.length-1>s){let F=d.length-s-1;g+=`${v}"... ${Eu(F)} not stringified"`}return S!==""&&(g+=`
|
||||
${w}`);let N=Math.min(d.length,s),R=0;for(;R<N-1;R++){let F=u(String(R),d[R],y,_,S,w);g+=F!==void 0?F:"null",g+=v}let U=u(String(R),d[R],y,_,S,w);if(g+=U!==void 0?U:"null",d.length-1>s){let F=d.length-s-1;g+=`${v}"... ${wu(F)} not stringified"`}return S!==""&&(g+=`
|
||||
${E}`),y.pop(),`[${g}]`}y.push(d);let x="";S!==""&&(w+=S,v=`,
|
||||
${w}`,x=" ");let O="";for(let N of _){let R=u(N,d[N],y,_,S,w);R!==void 0&&(g+=`${O}${vs(N)}:${x}${R}`,O=v)}return S!==""&&O.length>1&&(g=`
|
||||
${w}`,x=" ");let O="";for(let N of _){let R=u(N,d[N],y,_,S,w);R!==void 0&&(g+=`${O}${Es(N)}:${x}${R}`,O=v)}return S!==""&&O.length>1&&(g=`
|
||||
${w}${g}
|
||||
${E}`),y.pop(),`{${g}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function o(m,d,y,_,S){switch(typeof d){case"string":return vs(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return o(m,d,y,_,S);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let w=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d),S+=_;let R=`
|
||||
${E}`),y.pop(),`{${g}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function o(m,d,y,_,S){switch(typeof d){case"string":return Es(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return o(m,d,y,_,S);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let w=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d),S+=_;let R=`
|
||||
${S}`,U=`,
|
||||
${S}`,F=Math.min(d.length,s),te=0;for(;te<F-1;te++){let W=o(String(te),d[te],y,_,S);R+=W!==void 0?W:"null",R+=U}let Q=o(String(te),d[te],y,_,S);if(R+=Q!==void 0?Q:"null",d.length-1>s){let W=d.length-s-1;R+=`${U}"... ${Eu(W)} not stringified"`}return R+=`
|
||||
${S}`,F=Math.min(d.length,s),te=0;for(;te<F-1;te++){let W=o(String(te),d[te],y,_,S);R+=W!==void 0?W:"null",R+=U}let Q=o(String(te),d[te],y,_,S);if(R+=Q!==void 0?Q:"null",d.length-1>s){let W=d.length-s-1;R+=`${U}"... ${wu(W)} not stringified"`}return R+=`
|
||||
${w}`,y.pop(),`[${R}]`}let E=Object.keys(d),g=E.length;if(g===0)return"{}";if(i<y.length+1)return'"[Object]"';S+=_;let v=`,
|
||||
${S}`,x="",O="",N=Math.min(g,s);tm(d)&&(x+=IC(d,v,s),E=E.slice(d.length),N-=d.length,O=v),r&&(E=em(E)),y.push(d);for(let R=0;R<N;R++){let U=E[R],F=o(U,d[U],y,_,S);F!==void 0&&(x+=`${O}${vs(U)}: ${F}`,O=v)}if(g>s){let R=g-s;x+=`${O}"...": "${Eu(R)} not stringified"`,O=v}return O!==""&&(x=`
|
||||
${S}`,x="",O="",N=Math.min(g,s);lm(d)&&(x+=LC(d,v,s),E=E.slice(d.length),N-=d.length,O=v),r&&(E=nm(E)),y.push(d);for(let R=0;R<N;R++){let U=E[R],F=o(U,d[U],y,_,S);F!==void 0&&(x+=`${O}${Es(U)}: ${F}`,O=v)}if(g>s){let R=g-s;x+=`${O}"...": "${wu(R)} not stringified"`,O=v}return O!==""&&(x=`
|
||||
${S}${x}
|
||||
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function c(m,d,y){switch(typeof d){case"string":return vs(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,y);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d);let v=Math.min(d.length,s),x=0;for(;x<v-1;x++){let N=c(String(x),d[x],y);_+=N!==void 0?N:"null",_+=","}let O=c(String(x),d[x],y);if(_+=O!==void 0?O:"null",d.length-1>s){let N=d.length-s-1;_+=`,"... ${Eu(N)} not stringified"`}return y.pop(),`[${_}]`}let S=Object.keys(d),w=S.length;if(w===0)return"{}";if(i<y.length+1)return'"[Object]"';let E="",g=Math.min(w,s);tm(d)&&(_+=IC(d,",",s),S=S.slice(d.length),g-=d.length,E=","),r&&(S=em(S)),y.push(d);for(let v=0;v<g;v++){let x=S[v],O=c(x,d[x],y);O!==void 0&&(_+=`${E}${vs(x)}:${O}`,E=",")}if(w>s){let v=w-s;_+=`${E}"...":"${Eu(v)} not stringified"`}return y.pop(),`{${_}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function f(m,d,y){if(arguments.length>1){let _="";if(typeof y=="number"?_=" ".repeat(Math.min(y,10)):typeof y=="string"&&(_=y.slice(0,10)),d!=null){if(typeof d=="function")return a("",{"":m},[],d,_,"");if(Array.isArray(d))return u("",m,[],Mie(d),_,"")}if(_.length!==0)return o("",m,[],_,"")}return c("",m,[])}return f}});var UC=k((mCe,jC)=>{"use strict";var rm=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:FC}=Sc(),Bie=FC.info;function Hie(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let l=Object.create(FC);l.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{l[c]=e.levels[c]});let r={write:i,add:a,flushSync:s,end:u,minLevel:0,streams:[],clone:o,[rm]:!0,streamLevels:l};return Array.isArray(t)?t.forEach(a,r):a.call(r,t),t=null,r;function i(c){let f,m=this.lastLevel,{streams:d}=this,y=0,_;for(let S=qie(d.length,e.dedupe);Gie(S,d.length,e.dedupe);S=zie(S,e.dedupe))if(f=d[S],f.level<=m){if(y!==0&&y!==f.level)break;if(_=f.stream,_[rm]){let{lastTime:w,lastMsg:E,lastObj:g,lastLogger:v}=this;_.lastLevel=m,_.lastTime=w,_.lastMsg=E,_.lastObj=g,_.lastLogger=v}_.write(c),e.dedupe&&(y=f.level)}else if(!e.dedupe)break}function s(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return r;let f=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:y}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=y[c.level]:typeof c.level=="number"?_=c.level:_=Bie;let S={stream:m,level:_,levelVal:void 0,id:n++};return d.unshift(S),d.sort(Vie),this.minLevel=d[0].level,r}function u(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function o(c){let f=new Array(this.streams.length);for(let m=0;m<f.length;m++)f[m]={level:c,stream:this.streams[m].stream};return{write:i,add:a,minLevel:c,streams:f,clone:o,flushSync:s,[rm]:!0}}}function Vie(t,e){return t.level-e.level}function qie(t,e){return e?t-1:0}function zie(t,e){return e?t-1:t+1}function Gie(t,e,n){return n?t>=0:t<e}jC.exports=Hie});var YC=k((yCe,W3)=>{"use strict";var Jie=require("os"),GC=wh(),Kie=Sh(),Xie=Rh(),JC=IN(),Wie=RC(),KC=Wo(),{configure:Yie}=LC(),{assertDefaultLevelFound:Qie,mappings:XC,genLsCache:Zie,genLevelComparison:ese,assertLevelComparison:tse}=Xh(),{DEFAULT_LEVELS:nse,SORTING_ORDER:lse}=Sc(),{createArgsNormalizer:rse,asChindings:ise,buildSafeSonicBoom:MC,buildFormatters:sse,stringify:im,normalizeDestFileDescriptor:$C,noop:ase}=wc(),{version:use}=Wh(),{chindingsSym:BC,redactFmtSym:ose,serializersSym:HC,timeSym:cse,timeSliceIndexSym:pse,streamSym:fse,stringifySym:VC,stringifySafeSym:sm,stringifiersSym:qC,setLevelSym:dse,endSym:hse,formatOptsSym:mse,messageKeySym:yse,errorKeySym:gse,nestedKeySym:vse,mixinSym:_se,levelCompSym:Ese,useOnlyCustomLevelsSym:bse,formattersSym:zC,hooksSym:wse,nestedKeyStrSym:Sse,mixinMergeStrategySym:Tse,msgPrefixSym:xse}=KC,{epochTime:WC,nullTime:Ase}=JC,{pid:Ose}=process,Nse=Jie.hostname(),Cse=GC.err,Rse={level:"info",levelComparison:lse.ASC,levels:nse,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Ose,hostname:Nse},serializers:Object.assign(Object.create(null),{err:Cse}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:WC,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Ise=rse(Rse),kse=Object.assign(Object.create(null),GC);function am(...t){let e={},{opts:n,stream:l}=Ise(e,Kie(),...t),{redact:r,crlf:i,s
Line truncated
|
||||
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function c(m,d,y){switch(typeof d){case"string":return Es(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,y);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d);let v=Math.min(d.length,s),x=0;for(;x<v-1;x++){let N=c(String(x),d[x],y);_+=N!==void 0?N:"null",_+=","}let O=c(String(x),d[x],y);if(_+=O!==void 0?O:"null",d.length-1>s){let N=d.length-s-1;_+=`,"... ${wu(N)} not stringified"`}return y.pop(),`[${_}]`}let S=Object.keys(d),w=S.length;if(w===0)return"{}";if(i<y.length+1)return'"[Object]"';let E="",g=Math.min(w,s);lm(d)&&(_+=LC(d,",",s),S=S.slice(d.length),g-=d.length,E=","),r&&(S=nm(S)),y.push(d);for(let v=0;v<g;v++){let x=S[v],O=c(x,d[x],y);O!==void 0&&(_+=`${E}${Es(x)}:${O}`,E=",")}if(w>s){let v=w-s;_+=`${E}"...":"${wu(v)} not stringified"`}return y.pop(),`{${_}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function f(m,d,y){if(arguments.length>1){let _="";if(typeof y=="number"?_=" ".repeat(Math.min(y,10)):typeof y=="string"&&(_=y.slice(0,10)),d!=null){if(typeof d=="function")return a("",{"":m},[],d,_,"");if(Array.isArray(d))return u("",m,[],Wie(d),_,"")}if(_.length!==0)return o("",m,[],_,"")}return c("",m,[])}return f}});var HC=k((NCe,BC)=>{"use strict";var sm=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:$C}=Ac(),Qie=$C.info;function Zie(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let l=Object.create($C);l.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{l[c]=e.levels[c]});let r={write:i,add:a,flushSync:s,end:u,minLevel:0,streams:[],clone:o,[sm]:!0,streamLevels:l};return Array.isArray(t)?t.forEach(a,r):a.call(r,t),t=null,r;function i(c){let f,m=this.lastLevel,{streams:d}=this,y=0,_;for(let S=tse(d.length,e.dedupe);lse(S,d.length,e.dedupe);S=nse(S,e.dedupe))if(f=d[S],f.level<=m){if(y!==0&&y!==f.level)break;if(_=f.stream,_[sm]){let{lastTime:w,lastMsg:E,lastObj:g,lastLogger:v}=this;_.lastLevel=m,_.lastTime=w,_.lastMsg=E,_.lastObj=g,_.lastLogger=v}_.write(c),e.dedupe&&(y=f.level)}else if(!e.dedupe)break}function s(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return r;let f=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:y}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=y[c.level]:typeof c.level=="number"?_=c.level:_=Qie;let S={stream:m,level:_,levelVal:void 0,id:n++};return d.unshift(S),d.sort(ese),this.minLevel=d[0].level,r}function u(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function o(c){let f=new Array(this.streams.length);for(let m=0;m<f.length;m++)f[m]={level:c,stream:this.streams[m].stream};return{write:i,add:a,minLevel:c,streams:f,clone:o,flushSync:s,[sm]:!0}}}function ese(t,e){return t.level-e.level}function tse(t,e){return e?t-1:0}function nse(t,e){return e?t-1:t+1}function lse(t,e,n){return n?t>=0:t<e}BC.exports=Zie});var tR=k((CCe,Y3)=>{"use strict";var rse=require("os"),WC=Th(),ise=xh(),sse=kh(),YC=LN(),ase=PC(),QC=Qo(),{configure:use}=MC(),{assertDefaultLevelFound:ose,mappings:ZC,genLsCache:cse,genLevelComparison:pse,assertLevelComparison:fse}=Yh(),{DEFAULT_LEVELS:dse,SORTING_ORDER:hse}=Ac(),{createArgsNormalizer:mse,asChindings:yse,buildSafeSonicBoom:VC,buildFormatters:gse,stringify:am,normalizeDestFileDescriptor:qC,noop:vse}=xc(),{version:_se}=Qh(),{chindingsSym:zC,redactFmtSym:Ese,serializersSym:GC,timeSym:bse,timeSliceIndexSym:wse,streamSym:Sse,stringifySym:JC,stringifySafeSym:um,stringifiersSym:KC,setLevelSym:Tse,endSym:xse,formatOptsSym:Ase,messageKeySym:Ose,errorKeySym:Nse,nestedKeySym:Cse,mixinSym:Rse,levelCompSym:Ise,useOnlyCustomLevelsSym:kse,formattersSym:XC,hooksSym:Dse,nestedKeyStrSym:Pse,mixinMergeStrategySym:Lse,msgPrefixSym:Fse}=QC,{epochTime:eR,nullTime:jse}=YC,{pid:Use}=process,Mse=rse.hostname(),$se=WC.err,Bse={level:"info",levelComparison:hse.ASC,levels:dse,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Use,hostname:Mse},serializers:Object.assign(Object.create(null),{err:$se}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:eR,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Hse=mse(Bse),Vse=Object.assign(Object.create(null),WC);function om(...t){let e={},{opts:n,stream:l}=Hse(e,ise(),...t),{redact:r,crlf:i,s
Line truncated
|
||||
`:`
|
||||
`),Se=ise.bind(null,{[BC]:"",[HC]:s,[qC]:Q,[VC]:im,[sm]:U,[zC]:F}),se="";f!==null&&(m===void 0?se=Se(f):se=Se(Object.assign({},f,{name:m})));let ee=a instanceof Function?a:a?WC:Ase,me=ee().indexOf(":")+1;if(E&&!y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(R&&typeof R!="string")throw Error(`Unknown msgPrefix type "${typeof R}" - expected "string"`);Qie(d,y,E);let P=XC(y,E);tse(_);let G=ese(_);return Object.assign(e,{levels:P,[Ese]:G,[bse]:E,[fse]:l,[cse]:ee,[pse]:me,[VC]:im,[sm]:U,[qC]:Q,[hse]:ce,[mse]:W,[yse]:u,[gse]:o,[vse]:c,[Sse]:c?`,${JSON.stringify(c)}:{`:"",[HC]:s,[_se]:S,[Tse]:w,[BC]:se,[zC]:F,[wse]:v,silent:ase,onChild:N,[xse]:R}),Object.setPrototypeOf(e,Wie()),Zie(e),e[dse](d),e}W3.exports=am;W3.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=$C(t.dest||process.stdout.fd),MC(t)):MC({dest:$C(t),minLength:0});W3.exports.transport=Vh();W3.exports.multistream=UC();W3.exports.levels=XC();W3.exports.stdSerializers=kse;W3.exports.stdTimeFunctions=Object.assign({},JC);W3.exports.symbols=KC;W3.exports.version=use;W3.exports.default=am;W3.exports.pino=am});var d1=k((gCe,nR)=>{"use strict";var Dse=BO(),xc=YC(),{serializersSym:QC}=xc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:Pse,FST_ERR_LOG_INVALID_LOGGER:Lse}=M2();function ZC(t){if(t.stream&&t.file)throw new Pse;t.file&&(t.stream=xc.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,l=null;return e?(t.logger=void 0,t.genReqId=void 0,e[QC]&&(t.serializers=Object.assign({},t.serializers,e[QC])),l=e.child({},t),t.logger=e,t.genReqId=n):l=xc(t,t.stream),l}var um={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:xc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Fse(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function jse(t){if(!t.logger){let l=Dse;return l.child=()=>l,{logger:l,hasLogger:!1}}if(eR(t.logger))return{logger:ZC({logger:t.logger,serializers:Object.assign({},um,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(l=>{Object.defineProperty(e,l,{value:t.logger[l],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},um,e.serializers),t.logger=e,{logger:ZC(t.logger),hasLogger:!0}}function eR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],l=t?n.filter(r=>!t[r]||typeof t[r]!="function"):n;if(l.length){if(l.length===n.length&&!e)return!1;throw Lse(l.join(","))}else return!0}function Use(t,e,n,l,r){let i={[t.requestIdLogLabel]:l},s=t.childLoggerFactory.call(t.server,e,i,r||{},n);return t.childLoggerFactory!==tR&&eR(s,!0),s}function tR(t,e,n){return t.child(e,n)}nR.exports={createLogger:jse,createChildLogger:Use,defaultChildLoggerFactory:tR,serializers:um,now:Fse}});var h1=k((vCe,lR)=>{"use strict";lR.exports=Mse;function Zo(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Mse(t){if(t=t||{},t.circles)return $se(t);return t.proto?l:n;function e(r,i){for(var s=Object.keys(r),a=new Array(s.length),u=0;u<s.length;u++){var o=s[u],c=r[o];typeof c!="object"||c===null?a[o]=c:c instanceof Date?a[o]=new Date(c):ArrayBuffer.isView(c)?a[o]=Zo(c):a[o]=i(c)}return a}function n(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,n);if(r instanceof Map)return new Map(e(Array.from(r),n));if(r instanceof Set)return new Set(e(Array.from(r),n));var i={};for(var s in r)if(Object.hasOwnProperty.call(r,s)!==!1){var a=r[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=Zo(a):i[s]=n(a)}return i}function l(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,l);if(r instanceof Map)return new Map(e(Array.from(r),l));if(r instanceof Set)return new Set(e(Array.from(r),l));var i={};for(var s in r){var a=r[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),l)):a instanceof Set?i[s]=new Set(e(Array.from(a),l)):ArrayBuffer.isView(a)?i[s]=Zo(a):i[s]=l(a)}return i}}function $se(t){var e=[],n=[];return t.proto?i:r;function l(s,a){for(var u=Object.keys(s),o=new Array(u.length),c=0;c<u.length;c++){var f=u[c],m=s[f];if(typeof m!="object"||m===null)o[f]=m;else if(m instanceof Date)o[f]=new Date(m);else if(ArrayBuffer.isView(m))o[f]=Zo(m);else{var d=e.indexOf(m);d!==-1?o[f]=n[d]:o[f]=a(m)}}return o}function r(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isAr
Line truncated
|
||||
`:""},this._extScope=e,this._scope=new Er.Scope({parent:e}),this._nodes=[new Sm]}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 l=this._extScope.value(e,n);return(this._values[l.prefix]||(this._values[l.prefix]=new Set)).add(l),l}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,l,r){let i=this._scope.toName(n);return l!==void 0&&r&&(this._constants[i.str]=l),this._leafNode(new gm(e,i,l)),i}const(e,n,l){return this._def(Er.varKinds.const,e,n,l)}let(e,n,l){return this._def(Er.varKinds.let,e,n,l)}var(e,n,l){return this._def(Er.varKinds.var,e,n,l)}assign(e,n,l){return this._leafNode(new Rc(e,n,l))}add(e,n){return this._leafNode(new vm(e,It.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Wt.nil&&this._leafNode(new wm(e)),this}object(...e){let n=["{"];for(let[l,r]of e)n.length>1&&n.push(","),n.push(l),(l!==r||this.opts.es5)&&(n.push(":"),(0,Wt.addCodeArg)(n,r));return n.push("}"),new Wt._Code(n)}if(e,n,l){if(this._blockNode(new Su(e)),n&&l)this.code(n).else().code(l).endIf();else if(n)this.code(n).endIf();else if(l)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Su(e))}else(){return this._elseNode(new t0)}endIf(){return this._endBlockNode(Su,t0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Tm(e),n)}forRange(e,n,l,r,i=this.opts.es5?Er.varKinds.var:Er.varKinds.let){let s=this._scope.toName(e);return this._for(new xm(i,s,n,l),()=>r(s))}forOf(e,n,l,r=Er.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Wt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Wt._)`${s}.length`,a=>{this.var(i,(0,Wt._)`${s}[${a}]`),l(i)})}return this._for(new Ic("of",r,i,n),()=>l(i))}forIn(e,n,l,r=this.opts.es5?Er.varKinds.var:Er.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Wt._)`Object.keys(${n})`,l);let i=this._scope.toName(e);return this._for(new Ic("in",r,i,n),()=>l(i))}endFor(){return this._endBlockNode(Tu)}label(e){return this._leafNode(new _m(e))}break(e){return this._leafNode(new Em(e))}return(e){let n=new E1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E1)}try(e,n,l){if(!n&&!l)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Am;if(this._blockNode(r),this.code(e),n){let i=this.name("e");this._currNode=r.catch=new b1(i),n(i)}return l&&(this._currNode=r.finally=new w1,this.code(l)),this._endBlockNode(b1,w1)}throw(e){return this._leafNode(new bm(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 l=this._nodes.length-n;if(l<0||e!==void 0&&l!==e)throw new Error(`CodeGen: wrong number of nodes: ${l} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Wt.nil,l,r){return this._blockNode(new _1(e,n,l)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(_1)}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 l=this._currNode;if(l instanceof e||n&&l 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 Su))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}};It.CodeGen=Om;function xu(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function kc(t,e){return e instanceof Wt._CodeOrName?xu(t,e.names):t}function n0(t,e,n){if(t instanceof Wt.Name)return l(t);if(!r(t))return t;return new Wt._Code(t._items.reduce((i,s)=>(s instanceof Wt.Name&&(s=l(s)),s instanceof Wt._Code?i.push(...s._items):i.push(s),i),[]));function l(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function r(i){return i instanceof Wt._Code&&i._items.some(s=>s instanceof Wt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function sae(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function fR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Wt._)`!${Nm(t)}`}It.not=fR;var aae=dR(It.operators.AND);function uae(...t){return t.reduce(aae)}It.and=uae;var oae=dR(It.operators.OR);function cae(...t){return t.reduce(oae)}It.or=cae;function dR(t){return(e,n)=>e===Wt.nil?n:n===Wt.nil?e:(0,Wt._)`${Nm(e)} ${t} ${Nm(n)}`}function Nm(t){return t instanceof Wt.Name?t:(0,
Line truncated
|
||||
`),Se=yse.bind(null,{[zC]:"",[GC]:s,[KC]:Q,[JC]:am,[um]:U,[XC]:F}),se="";f!==null&&(m===void 0?se=Se(f):se=Se(Object.assign({},f,{name:m})));let ee=a instanceof Function?a:a?eR:jse,me=ee().indexOf(":")+1;if(E&&!y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(R&&typeof R!="string")throw Error(`Unknown msgPrefix type "${typeof R}" - expected "string"`);ose(d,y,E);let P=ZC(y,E);fse(_);let G=pse(_);return Object.assign(e,{levels:P,[Ise]:G,[kse]:E,[Sse]:l,[bse]:ee,[wse]:me,[JC]:am,[um]:U,[KC]:Q,[xse]:ce,[Ase]:W,[Ose]:u,[Nse]:o,[Cse]:c,[Pse]:c?`,${JSON.stringify(c)}:{`:"",[GC]:s,[Rse]:S,[Lse]:w,[zC]:se,[XC]:F,[Dse]:v,silent:vse,onChild:N,[Fse]:R}),Object.setPrototypeOf(e,ase()),cse(e),e[Tse](d),e}Y3.exports=om;Y3.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=qC(t.dest||process.stdout.fd),VC(t)):VC({dest:qC(t),minLength:0});Y3.exports.transport=zh();Y3.exports.multistream=HC();Y3.exports.levels=ZC();Y3.exports.stdSerializers=Vse;Y3.exports.stdTimeFunctions=Object.assign({},YC);Y3.exports.symbols=QC;Y3.exports.version=_se;Y3.exports.default=om;Y3.exports.pino=om});var y1=k((RCe,sR)=>{"use strict";var qse=zO(),Nc=tR(),{serializersSym:nR}=Nc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:zse,FST_ERR_LOG_INVALID_LOGGER:Gse}=$2();function lR(t){if(t.stream&&t.file)throw new zse;t.file&&(t.stream=Nc.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,l=null;return e?(t.logger=void 0,t.genReqId=void 0,e[nR]&&(t.serializers=Object.assign({},t.serializers,e[nR])),l=e.child({},t),t.logger=e,t.genReqId=n):l=Nc(t,t.stream),l}var cm={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:Nc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Jse(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function Kse(t){if(!t.logger){let l=qse;return l.child=()=>l,{logger:l,hasLogger:!1}}if(rR(t.logger))return{logger:lR({logger:t.logger,serializers:Object.assign({},cm,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(l=>{Object.defineProperty(e,l,{value:t.logger[l],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},cm,e.serializers),t.logger=e,{logger:lR(t.logger),hasLogger:!0}}function rR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],l=t?n.filter(r=>!t[r]||typeof t[r]!="function"):n;if(l.length){if(l.length===n.length&&!e)return!1;throw Gse(l.join(","))}else return!0}function Xse(t,e,n,l,r){let i={[t.requestIdLogLabel]:l},s=t.childLoggerFactory.call(t.server,e,i,r||{},n);return t.childLoggerFactory!==iR&&rR(s,!0),s}function iR(t,e,n){return t.child(e,n)}sR.exports={createLogger:Kse,createChildLogger:Xse,defaultChildLoggerFactory:iR,serializers:cm,now:Jse}});var g1=k((ICe,aR)=>{"use strict";aR.exports=Wse;function t0(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Wse(t){if(t=t||{},t.circles)return Yse(t);return t.proto?l:n;function e(r,i){for(var s=Object.keys(r),a=new Array(s.length),u=0;u<s.length;u++){var o=s[u],c=r[o];typeof c!="object"||c===null?a[o]=c:c instanceof Date?a[o]=new Date(c):ArrayBuffer.isView(c)?a[o]=t0(c):a[o]=i(c)}return a}function n(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,n);if(r instanceof Map)return new Map(e(Array.from(r),n));if(r instanceof Set)return new Set(e(Array.from(r),n));var i={};for(var s in r)if(Object.hasOwnProperty.call(r,s)!==!1){var a=r[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=t0(a):i[s]=n(a)}return i}function l(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,l);if(r instanceof Map)return new Map(e(Array.from(r),l));if(r instanceof Set)return new Set(e(Array.from(r),l));var i={};for(var s in r){var a=r[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),l)):a instanceof Set?i[s]=new Set(e(Array.from(a),l)):ArrayBuffer.isView(a)?i[s]=t0(a):i[s]=l(a)}return i}}function Yse(t){var e=[],n=[];return t.proto?i:r;function l(s,a){for(var u=Object.keys(s),o=new Array(u.length),c=0;c<u.length;c++){var f=u[c],m=s[f];if(typeof m!="object"||m===null)o[f]=m;else if(m instanceof Date)o[f]=new Date(m);else if(ArrayBuffer.isView(m))o[f]=t0(m);else{var d=e.indexOf(m);d!==-1?o[f]=n[d]:o[f]=a(m)}}return o}function r(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isAr
Line truncated
|
||||
`:""},this._extScope=e,this._scope=new br.Scope({parent:e}),this._nodes=[new xm]}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 l=this._extScope.value(e,n);return(this._values[l.prefix]||(this._values[l.prefix]=new Set)).add(l),l}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,l,r){let i=this._scope.toName(n);return l!==void 0&&r&&(this._constants[i.str]=l),this._leafNode(new _m(e,i,l)),i}const(e,n,l){return this._def(br.varKinds.const,e,n,l)}let(e,n,l){return this._def(br.varKinds.let,e,n,l)}var(e,n,l){return this._def(br.varKinds.var,e,n,l)}assign(e,n,l){return this._leafNode(new Dc(e,n,l))}add(e,n){return this._leafNode(new Em(e,It.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Wt.nil&&this._leafNode(new Tm(e)),this}object(...e){let n=["{"];for(let[l,r]of e)n.length>1&&n.push(","),n.push(l),(l!==r||this.opts.es5)&&(n.push(":"),(0,Wt.addCodeArg)(n,r));return n.push("}"),new Wt._Code(n)}if(e,n,l){if(this._blockNode(new xu(e)),n&&l)this.code(n).else().code(l).endIf();else if(n)this.code(n).endIf();else if(l)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new xu(e))}else(){return this._elseNode(new l0)}endIf(){return this._endBlockNode(xu,l0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Am(e),n)}forRange(e,n,l,r,i=this.opts.es5?br.varKinds.var:br.varKinds.let){let s=this._scope.toName(e);return this._for(new Om(i,s,n,l),()=>r(s))}forOf(e,n,l,r=br.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Wt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Wt._)`${s}.length`,a=>{this.var(i,(0,Wt._)`${s}[${a}]`),l(i)})}return this._for(new Pc("of",r,i,n),()=>l(i))}forIn(e,n,l,r=this.opts.es5?br.varKinds.var:br.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Wt._)`Object.keys(${n})`,l);let i=this._scope.toName(e);return this._for(new Pc("in",r,i,n),()=>l(i))}endFor(){return this._endBlockNode(Au)}label(e){return this._leafNode(new bm(e))}break(e){return this._leafNode(new wm(e))}return(e){let n=new S1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S1)}try(e,n,l){if(!n&&!l)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Nm;if(this._blockNode(r),this.code(e),n){let i=this.name("e");this._currNode=r.catch=new T1(i),n(i)}return l&&(this._currNode=r.finally=new x1,this.code(l)),this._endBlockNode(T1,x1)}throw(e){return this._leafNode(new Sm(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 l=this._nodes.length-n;if(l<0||e!==void 0&&l!==e)throw new Error(`CodeGen: wrong number of nodes: ${l} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Wt.nil,l,r){return this._blockNode(new w1(e,n,l)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(w1)}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 l=this._currNode;if(l instanceof e||n&&l 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 xu))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}};It.CodeGen=Cm;function Ou(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Lc(t,e){return e instanceof Wt._CodeOrName?Ou(t,e.names):t}function r0(t,e,n){if(t instanceof Wt.Name)return l(t);if(!r(t))return t;return new Wt._Code(t._items.reduce((i,s)=>(s instanceof Wt.Name&&(s=l(s)),s instanceof Wt._Code?i.push(...s._items):i.push(s),i),[]));function l(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function r(i){return i instanceof Wt._Code&&i._items.some(s=>s instanceof Wt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function gae(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function yR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Wt._)`!${Rm(t)}`}It.not=yR;var vae=gR(It.operators.AND);function _ae(...t){return t.reduce(vae)}It.and=_ae;var Eae=gR(It.operators.OR);function bae(...t){return t.reduce(Eae)}It.or=bae;function gR(t){return(e,n)=>e===Wt.nil?n:n===Wt.nil?e:(0,Wt._)`${Rm(e)} ${t} ${Rm(n)}`}function Rm(t){return t instanceof Wt.Name?t:(0,
Line truncated
|
||||
|| (${s} == "string" && ${r} && ${r} == +${r})`).assign(a,(0,Ot._)`+${r}`);return;case"integer":l.elseIf((0,Ot._)`${s} === "boolean" || ${r} === null
|
||||
|| (${s} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(a,(0,Ot._)`+${r}`);return;case"boolean":l.elseIf((0,Ot._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(a,!1).elseIf((0,Ot._)`${r} === "true" || ${r} === 1`).assign(a,!0);return;case"null":l.elseIf((0,Ot._)`${r} === "" || ${r} === 0 || ${r} === false`),l.assign(a,null);return;case"array":l.elseIf((0,Ot._)`${s} === "string" || ${s} === "number"
|
||||
|| ${s} === "boolean" || ${r} === null`).assign(a,(0,Ot._)`[${r}]`)}}}function Kae({gen:t,parentData:e,parentDataProperty:n},l){t.if((0,Ot._)`${e} !== undefined`,()=>t.assign((0,Ot._)`${e}[${n}]`,l))}function Pm(t,e,n,l=T1.Correct){let r=l===T1.Correct?Ot.operators.EQ:Ot.operators.NEQ,i;switch(t){case"null":return(0,Ot._)`${e} ${r} null`;case"array":i=(0,Ot._)`Array.isArray(${e})`;break;case"object":i=(0,Ot._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,Ot._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,Ot._)`typeof ${e} ${r} ${t}`}return l===T1.Correct?i:(0,Ot.not)(i);function s(a=Ot.nil){return(0,Ot.and)((0,Ot._)`typeof ${e} == "number"`,a,n?(0,Ot._)`isFinite(${e})`:Ot.nil)}}A2.checkDataType=Pm;function Lm(t,e,n,l){if(t.length===1)return Pm(t[0],e,n,l);let r,i=(0,CR.toHash)(t);if(i.array&&i.object){let s=(0,Ot._)`typeof ${e} != "object"`;r=i.null?s:(0,Ot._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else r=Ot.nil;i.number&&delete i.integer;for(let s in i)r=(0,Ot.and)(r,Pm(s,e,n,l));return r}A2.checkDataTypes=Lm;var Xae={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ot._)`{type: ${t}}`:(0,Ot._)`{type: ${e}}`};function Fm(t){let e=Wae(t);(0,Vae.reportError)(e,Xae)}A2.reportTypeError=Fm;function Wae(t){let{gen:e,data:n,schema:l}=t,r=(0,CR.schemaRefOrVal)(t,l,"type");return{gen:e,keyword:"type",data:n,schema:l.type,schemaCode:r,schemaValue:r,parentSchema:l,params:{},it:t}}});var DR=k(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.assignDefaults=void 0;var i0=st(),Yae=Nt();function Qae(t,e){let{properties:n,items:l}=t.schema;if(e==="object"&&n)for(let r in n)kR(t,r,n[r].default);else e==="array"&&Array.isArray(l)&&l.forEach((r,i)=>kR(t,i,r.default))}Lc.assignDefaults=Qae;function kR(t,e,n){let{gen:l,compositeRule:r,data:i,opts:s}=t;if(n===void 0)return;let a=(0,i0._)`${i}${(0,i0.getProperty)(e)}`;if(r){(0,Yae.checkStrictMode)(t,`default is ignored for: ${a}`);return}let u=(0,i0._)`${a} === undefined`;s.useDefaults==="empty"&&(u=(0,i0._)`${u} || ${a} === null || ${a} === ""`),l.if(u,(0,i0._)`${a} = ${(0,i0.stringify)(n)}`)}});var O2=k(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.validateUnion=Yn.validateArray=Yn.usePattern=Yn.callValidateCode=Yn.schemaProperties=Yn.allSchemaProperties=Yn.noPropertyInData=Yn.propertyInData=Yn.isOwnProperty=Yn.hasPropFunc=Yn.reportMissingProp=Yn.checkMissingProp=Yn.checkReportMissingProp=void 0;var fl=st(),jm=Nt(),bs=Q3(),Zae=Nt();function eue(t,e){let{gen:n,data:l,it:r}=t;n.if(Mm(n,l,e,r.opts.ownProperties),()=>{t.setParams({missingProperty:(0,fl._)`${e}`},!0),t.error()})}Yn.checkReportMissingProp=eue;function tue({gen:t,data:e,it:{opts:n}},l,r){return(0,fl.or)(...l.map(i=>(0,fl.and)(Mm(t,e,i,n.ownProperties),(0,fl._)`${r} = ${i}`)))}Yn.checkMissingProp=tue;function nue(t,e){t.setParams({missingProperty:e},!0),t.error()}Yn.reportMissingProp=nue;function PR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fl._)`Object.prototype.hasOwnProperty`})}Yn.hasPropFunc=PR;function Um(t,e,n){return(0,fl._)`${PR(t)}.call(${e}, ${n})`}Yn.isOwnProperty=Um;function lue(t,e,n,l){let r=(0,fl._)`${e}${(0,fl.getProperty)(n)} !== undefined`;return l?(0,fl._)`${r} && ${Um(t,e,n)}`:r}Yn.propertyInData=lue;function Mm(t,e,n,l){let r=(0,fl._)`${e}${(0,fl.getProperty)(n)} === undefined`;return l?(0,fl.or)(r,(0,fl.not)(Um(t,e,n))):r}Yn.noPropertyInData=Mm;function LR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Yn.allSchemaProperties=LR;function rue(t,e){return LR(e).filter(n=>!(0,jm.alwaysValidSchema)(t,e[n]))}Yn.schemaProperties=rue;function iue({schemaCode:t,data:e,it:{gen:n,topSchemaRef:l,schemaPath:r,errorPath:i},it:s},a,u,o){let c=o?(0,fl._)`${t}, ${e}, ${l}${r}`:e,f=[[bs.default.instancePath,(0,fl.strConcat)(bs.default.instancePath,i)],[bs.default.parentData,s.parentData],[bs.default.parentDataProperty,s.parentDataProperty],[bs.default.rootData,bs.default.rootData]];s.opts.dynamicRef&&f.push([bs.default.dynamicAnchors,bs.default.dynamicAnchors]);let m=(0,fl._)`${c}, ${n.object(...f)}`;return u!==fl.nil?(0,fl._)`${a}.call(${u}, ${m})`:(0,fl._)`${a}(${m})`}Yn.callValidateCode=iue;var sue=(0,fl._)`new RegExp`;function aue({gen:t,it:{opts:e}},n){let l=e.unicodeRegExp?"u":"",{regExp:r}=e.code,i=r(n,l);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,fl._)`${r.code==="new RegExp"?sue:(0,Zae.useFunc)(t,r)}(${n}, ${l})`})}Yn.usePattern=aue;function uue(t){let{gen:e,data:n,keyword:l,it:r}=t,i=e.name("valid");if(r.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let u=e.const("len",(0,fl._)`${n}.length`);e.forRange("i",0,u,o=>{t.subschema({keyword:l,dataProp:o,dataPropType:jm.Type.Num},i),e.if((0,fl.not)(i),a)})}}Yn.validateArray=uue;function oue(t){let{gen:e,schema:n,keyword:l,it:r}=t;if(!
Line truncated
|
||||
|| ${s} === "boolean" || ${r} === null`).assign(a,(0,Ot._)`[${r}]`)}}}function iue({gen:t,parentData:e,parentDataProperty:n},l){t.if((0,Ot._)`${e} !== undefined`,()=>t.assign((0,Ot._)`${e}[${n}]`,l))}function Fm(t,e,n,l=O1.Correct){let r=l===O1.Correct?Ot.operators.EQ:Ot.operators.NEQ,i;switch(t){case"null":return(0,Ot._)`${e} ${r} null`;case"array":i=(0,Ot._)`Array.isArray(${e})`;break;case"object":i=(0,Ot._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,Ot._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,Ot._)`typeof ${e} ${r} ${t}`}return l===O1.Correct?i:(0,Ot.not)(i);function s(a=Ot.nil){return(0,Ot.and)((0,Ot._)`typeof ${e} == "number"`,a,n?(0,Ot._)`isFinite(${e})`:Ot.nil)}}O2.checkDataType=Fm;function jm(t,e,n,l){if(t.length===1)return Fm(t[0],e,n,l);let r,i=(0,DR.toHash)(t);if(i.array&&i.object){let s=(0,Ot._)`typeof ${e} != "object"`;r=i.null?s:(0,Ot._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else r=Ot.nil;i.number&&delete i.integer;for(let s in i)r=(0,Ot.and)(r,Fm(s,e,n,l));return r}O2.checkDataTypes=jm;var sue={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ot._)`{type: ${t}}`:(0,Ot._)`{type: ${e}}`};function Um(t){let e=aue(t);(0,eue.reportError)(e,sue)}O2.reportTypeError=Um;function aue(t){let{gen:e,data:n,schema:l}=t,r=(0,DR.schemaRefOrVal)(t,l,"type");return{gen:e,keyword:"type",data:n,schema:l.type,schemaCode:r,schemaValue:r,parentSchema:l,params:{},it:t}}});var jR=k(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.assignDefaults=void 0;var a0=st(),uue=Nt();function oue(t,e){let{properties:n,items:l}=t.schema;if(e==="object"&&n)for(let r in n)FR(t,r,n[r].default);else e==="array"&&Array.isArray(l)&&l.forEach((r,i)=>FR(t,i,r.default))}Uc.assignDefaults=oue;function FR(t,e,n){let{gen:l,compositeRule:r,data:i,opts:s}=t;if(n===void 0)return;let a=(0,a0._)`${i}${(0,a0.getProperty)(e)}`;if(r){(0,uue.checkStrictMode)(t,`default is ignored for: ${a}`);return}let u=(0,a0._)`${a} === undefined`;s.useDefaults==="empty"&&(u=(0,a0._)`${u} || ${a} === null || ${a} === ""`),l.if(u,(0,a0._)`${a} = ${(0,a0.stringify)(n)}`)}});var N2=k(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateUnion=Qn.validateArray=Qn.usePattern=Qn.callValidateCode=Qn.schemaProperties=Qn.allSchemaProperties=Qn.noPropertyInData=Qn.propertyInData=Qn.isOwnProperty=Qn.hasPropFunc=Qn.reportMissingProp=Qn.checkMissingProp=Qn.checkReportMissingProp=void 0;var dl=st(),Mm=Nt(),Ss=Z3(),cue=Nt();function pue(t,e){let{gen:n,data:l,it:r}=t;n.if(Bm(n,l,e,r.opts.ownProperties),()=>{t.setParams({missingProperty:(0,dl._)`${e}`},!0),t.error()})}Qn.checkReportMissingProp=pue;function fue({gen:t,data:e,it:{opts:n}},l,r){return(0,dl.or)(...l.map(i=>(0,dl.and)(Bm(t,e,i,n.ownProperties),(0,dl._)`${r} = ${i}`)))}Qn.checkMissingProp=fue;function due(t,e){t.setParams({missingProperty:e},!0),t.error()}Qn.reportMissingProp=due;function UR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,dl._)`Object.prototype.hasOwnProperty`})}Qn.hasPropFunc=UR;function $m(t,e,n){return(0,dl._)`${UR(t)}.call(${e}, ${n})`}Qn.isOwnProperty=$m;function hue(t,e,n,l){let r=(0,dl._)`${e}${(0,dl.getProperty)(n)} !== undefined`;return l?(0,dl._)`${r} && ${$m(t,e,n)}`:r}Qn.propertyInData=hue;function Bm(t,e,n,l){let r=(0,dl._)`${e}${(0,dl.getProperty)(n)} === undefined`;return l?(0,dl.or)(r,(0,dl.not)($m(t,e,n))):r}Qn.noPropertyInData=Bm;function MR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Qn.allSchemaProperties=MR;function mue(t,e){return MR(e).filter(n=>!(0,Mm.alwaysValidSchema)(t,e[n]))}Qn.schemaProperties=mue;function yue({schemaCode:t,data:e,it:{gen:n,topSchemaRef:l,schemaPath:r,errorPath:i},it:s},a,u,o){let c=o?(0,dl._)`${t}, ${e}, ${l}${r}`:e,f=[[Ss.default.instancePath,(0,dl.strConcat)(Ss.default.instancePath,i)],[Ss.default.parentData,s.parentData],[Ss.default.parentDataProperty,s.parentDataProperty],[Ss.default.rootData,Ss.default.rootData]];s.opts.dynamicRef&&f.push([Ss.default.dynamicAnchors,Ss.default.dynamicAnchors]);let m=(0,dl._)`${c}, ${n.object(...f)}`;return u!==dl.nil?(0,dl._)`${a}.call(${u}, ${m})`:(0,dl._)`${a}(${m})`}Qn.callValidateCode=yue;var gue=(0,dl._)`new RegExp`;function vue({gen:t,it:{opts:e}},n){let l=e.unicodeRegExp?"u":"",{regExp:r}=e.code,i=r(n,l);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,dl._)`${r.code==="new RegExp"?gue:(0,cue.useFunc)(t,r)}(${n}, ${l})`})}Qn.usePattern=vue;function _ue(t){let{gen:e,data:n,keyword:l,it:r}=t,i=e.name("valid");if(r.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let u=e.const("len",(0,dl._)`${n}.length`);e.forRange("i",0,u,o=>{t.subschema({keyword:l,dataProp:o,dataPropType:Mm.Type.Num},i),e.if((0,dl.not)(i),a)})}}Qn.validateArray=_ue;function Eue(t){let{gen:e,schema:n,keyword:l,it:r}=t;if(!
Line truncated
|
||||
missingProperty: ${l},
|
||||
depsCount: ${e},
|
||||
deps: ${n}}`};var j0e={keyword:"dependencies",type:"object",schemaType:"object",error:Yr.error,code(t){let[e,n]=U0e(t);JI(t,e),KI(t,n)}};function U0e({schema:t}){let e={},n={};for(let l in t){if(l==="__proto__")continue;let r=Array.isArray(t[l])?e:n;r[l]=t[l]}return[e,n]}function JI(t,e=t.schema){let{gen:n,data:l,it:r}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let u=(0,H1.propertyInData)(n,l,s,r.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),r.allErrors?n.if(u,()=>{for(let o of a)(0,H1.checkReportMissingProp)(t,o)}):(n.if((0,xy._)`${u} && (${(0,H1.checkMissingProp)(t,a,i)})`),(0,H1.reportMissingProp)(t,i),n.else())}}Yr.validatePropertyDeps=JI;function KI(t,e=t.schema){let{gen:n,data:l,keyword:r,it:i}=t,s=n.name("valid");for(let a in e)(0,F0e.alwaysValidSchema)(i,e[a])||(n.if((0,H1.propertyInData)(n,l,a,i.opts.ownProperties),()=>{let u=t.subschema({keyword:r,schemaProp:a},s);t.mergeValidEvaluated(u,s)},()=>n.var(s,!0)),t.ok(s))}Yr.validateSchemaDeps=KI;Yr.default=j0e});var YI=k(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var WI=st(),M0e=Nt(),$0e={message:"property name must be valid",params:({params:t})=>(0,WI._)`{propertyName: ${t.propertyName}}`},B0e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:$0e,code(t){let{gen:e,schema:n,data:l,it:r}=t;if((0,M0e.alwaysValidSchema)(r,n))return;let i=e.name("valid");e.forIn("key",l,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,WI.not)(i),()=>{t.error(!0),r.allErrors||e.break()})}),t.ok(i)}};Ay.default=B0e});var Ny=k(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});var Xc=O2(),Sr=st(),H0e=Q3(),Wc=Nt(),V0e={message:"must NOT have additional properties",params:({params:t})=>(0,Sr._)`{additionalProperty: ${t.additionalProperty}}`},q0e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:V0e,code(t){let{gen:e,schema:n,parentSchema:l,data:r,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=s;if(s.props=!0,u.removeAdditional!=="all"&&(0,Wc.alwaysValidSchema)(s,n))return;let o=(0,Xc.allSchemaProperties)(l.properties),c=(0,Xc.allSchemaProperties)(l.patternProperties);f(),t.ok((0,Sr._)`${i} === ${H0e.default.errors}`);function f(){e.forIn("key",r,S=>{!o.length&&!c.length?y(S):e.if(m(S),()=>y(S))})}function m(S){let w;if(o.length>8){let E=(0,Wc.schemaRefOrVal)(s,l.properties,"properties");w=(0,Xc.isOwnProperty)(e,E,S)}else o.length?w=(0,Sr.or)(...o.map(E=>(0,Sr._)`${S} === ${E}`)):w=Sr.nil;return c.length&&(w=(0,Sr.or)(w,...c.map(E=>(0,Sr._)`${(0,Xc.usePattern)(t,E)}.test(${S})`))),(0,Sr.not)(w)}function d(S){e.code((0,Sr._)`delete ${r}[${S}]`)}function y(S){if(u.removeAdditional==="all"||u.removeAdditional&&n===!1){d(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,Wc.alwaysValidSchema)(s,n)){let w=e.name("valid");u.removeAdditional==="failing"?(_(S,w,!1),e.if((0,Sr.not)(w),()=>{t.reset(),d(S)})):(_(S,w),a||e.if((0,Sr.not)(w),()=>e.break()))}}function _(S,w,E){let g={keyword:"additionalProperties",dataProp:S,dataPropType:Wc.Type.Str};E===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(g,w)}}};Oy.default=q0e});var ek=k(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});var z0e=u0(),QI=O2(),Cy=Nt(),ZI=Ny(),G0e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:l,data:r,it:i}=t;i.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&ZI.default.code(new z0e.KeywordCxt(i,ZI.default,"additionalProperties"));let s=(0,QI.allSchemaProperties)(n);for(let f of s)i.definedProperties.add(f);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Cy.mergeEvaluated.props(e,(0,Cy.toHash)(s),i.props));let a=s.filter(f=>!(0,Cy.alwaysValidSchema)(i,n[f]));if(a.length===0)return;let u=e.name("valid");for(let f of a)o(f)?c(f):(e.if((0,QI.propertyInData)(e,r,f,i.opts.ownProperties)),c(f),i.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(u);function o(f){return i.opts.useDefaults&&!i.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},u)}}};Ry.default=G0e});var rk=k(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});var tk=O2(),Yc=st(),nk=Nt(),lk=Nt(),J0e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:l,parentSchema:r,it:i}=t,{opts:s}=i,a=(0,tk.allSchemaProperties)(n),u=a.filter(_=>(0,nk.alwaysValidSchema)(i,n[_]));if(a.length===0||u.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let o=s.strictSchema&&!s.allowMatchingProperties&&r.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc
Line truncated
|
||||
deps: ${n}}`};var K0e={keyword:"dependencies",type:"object",schemaType:"object",error:Qr.error,code(t){let[e,n]=X0e(t);YI(t,e),QI(t,n)}};function X0e({schema:t}){let e={},n={};for(let l in t){if(l==="__proto__")continue;let r=Array.isArray(t[l])?e:n;r[l]=t[l]}return[e,n]}function YI(t,e=t.schema){let{gen:n,data:l,it:r}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let u=(0,z1.propertyInData)(n,l,s,r.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),r.allErrors?n.if(u,()=>{for(let o of a)(0,z1.checkReportMissingProp)(t,o)}):(n.if((0,Oy._)`${u} && (${(0,z1.checkMissingProp)(t,a,i)})`),(0,z1.reportMissingProp)(t,i),n.else())}}Qr.validatePropertyDeps=YI;function QI(t,e=t.schema){let{gen:n,data:l,keyword:r,it:i}=t,s=n.name("valid");for(let a in e)(0,J0e.alwaysValidSchema)(i,e[a])||(n.if((0,z1.propertyInData)(n,l,a,i.opts.ownProperties),()=>{let u=t.subschema({keyword:r,schemaProp:a},s);t.mergeValidEvaluated(u,s)},()=>n.var(s,!0)),t.ok(s))}Qr.validateSchemaDeps=QI;Qr.default=K0e});var tk=k(Ny=>{"use strict";Object.defineProperty(Ny,"__esModule",{value:!0});var ek=st(),W0e=Nt(),Y0e={message:"property name must be valid",params:({params:t})=>(0,ek._)`{propertyName: ${t.propertyName}}`},Q0e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Y0e,code(t){let{gen:e,schema:n,data:l,it:r}=t;if((0,W0e.alwaysValidSchema)(r,n))return;let i=e.name("valid");e.forIn("key",l,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,ek.not)(i),()=>{t.error(!0),r.allErrors||e.break()})}),t.ok(i)}};Ny.default=Q0e});var Ry=k(Cy=>{"use strict";Object.defineProperty(Cy,"__esModule",{value:!0});var Qc=N2(),Tr=st(),Z0e=Z3(),Zc=Nt(),e4e={message:"must NOT have additional properties",params:({params:t})=>(0,Tr._)`{additionalProperty: ${t.additionalProperty}}`},t4e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:e4e,code(t){let{gen:e,schema:n,parentSchema:l,data:r,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=s;if(s.props=!0,u.removeAdditional!=="all"&&(0,Zc.alwaysValidSchema)(s,n))return;let o=(0,Qc.allSchemaProperties)(l.properties),c=(0,Qc.allSchemaProperties)(l.patternProperties);f(),t.ok((0,Tr._)`${i} === ${Z0e.default.errors}`);function f(){e.forIn("key",r,S=>{!o.length&&!c.length?y(S):e.if(m(S),()=>y(S))})}function m(S){let w;if(o.length>8){let E=(0,Zc.schemaRefOrVal)(s,l.properties,"properties");w=(0,Qc.isOwnProperty)(e,E,S)}else o.length?w=(0,Tr.or)(...o.map(E=>(0,Tr._)`${S} === ${E}`)):w=Tr.nil;return c.length&&(w=(0,Tr.or)(w,...c.map(E=>(0,Tr._)`${(0,Qc.usePattern)(t,E)}.test(${S})`))),(0,Tr.not)(w)}function d(S){e.code((0,Tr._)`delete ${r}[${S}]`)}function y(S){if(u.removeAdditional==="all"||u.removeAdditional&&n===!1){d(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,Zc.alwaysValidSchema)(s,n)){let w=e.name("valid");u.removeAdditional==="failing"?(_(S,w,!1),e.if((0,Tr.not)(w),()=>{t.reset(),d(S)})):(_(S,w),a||e.if((0,Tr.not)(w),()=>e.break()))}}function _(S,w,E){let g={keyword:"additionalProperties",dataProp:S,dataPropType:Zc.Type.Str};E===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(g,w)}}};Cy.default=t4e});var rk=k(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});var n4e=c0(),nk=N2(),Iy=Nt(),lk=Ry(),l4e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:l,data:r,it:i}=t;i.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&lk.default.code(new n4e.KeywordCxt(i,lk.default,"additionalProperties"));let s=(0,nk.allSchemaProperties)(n);for(let f of s)i.definedProperties.add(f);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Iy.mergeEvaluated.props(e,(0,Iy.toHash)(s),i.props));let a=s.filter(f=>!(0,Iy.alwaysValidSchema)(i,n[f]));if(a.length===0)return;let u=e.name("valid");for(let f of a)o(f)?c(f):(e.if((0,nk.propertyInData)(e,r,f,i.opts.ownProperties)),c(f),i.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(u);function o(f){return i.opts.useDefaults&&!i.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},u)}}};ky.default=l4e});var uk=k(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});var ik=N2(),e9=st(),sk=Nt(),ak=Nt(),r4e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:l,parentSchema:r,it:i}=t,{opts:s}=i,a=(0,ik.allSchemaProperties)(n),u=a.filter(_=>(0,sk.alwaysValidSchema)(i,n[_]));if(a.length===0||u.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let o=s.strictSchema&&!s.allowMatchingProperties&&r.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc
Line truncated
|
||||
`,r+=`const validator = Validator.restoreFromState(validatorState)
|
||||
`):r+=`const validator = null
|
||||
`,`
|
||||
@@ -119,7 +119,7 @@ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
|
||||
|
||||
${r}
|
||||
|
||||
module.exports = ${t.toString()}(validator, serializer)`}rg.exports=q1e;rg.exports.dependencies={Serializer:pm(),Validator:lg()}});var Zk=k(($Re,Qk)=>{"use strict";var{dependencies:z1e}=ig(),{Serializer:G1e,Validator:MRe}=z1e,J1e={mode:"standalone"},K1e=G1e.restoreFromState(J1e),X1e=null;Qk.exports=function(e,n){function l(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,u="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(u+=","),u+='"statusCode":',u+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(u+=","),u+='"code":',u+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(u+=","),u+='"error":',u+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(u+=","),u+='"message":',u+=n.asString(s.message)),u+"}"}return l}(X1e,K1e)});var G1=k((BRe,lD)=>{"use strict";var eD=require("node:http").STATUS_CODES,W1e=uh(),{kReplyHeaders:Du,kReplyNextErrorHandler:u9,kReplyIsRunningOnErrorHook:Y1e,kReplyHasStatusCode:Q1e,kRouteContext:nD}=h2(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Z1e,FST_ERR_FAILED_ERROR_SERIALIZATION:e5e}=M2(),{getSchemaSerializer:t5e}=m1(),sg=Zk(),n5e={func:r5e,toJSON(){return this.func.name.toString()+"()"}};function l5e(t,e,n){t[Y1e]=!1;let l=t[nD];if(t[u9]===!1){tD(e,t,function(a,u){try{a.raw.writeHead(a.raw.statusCode,a[Du])}catch(o){a.log.warn({req:a.request,res:a,err:o},o&&o.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(u)});return}let r=t[u9]||l.errorHandler;t[u9]=Object.getPrototypeOf(r),delete t[Du]["content-type"],delete t[Du]["content-length"];let i=r.func;if(!i){t[u9]=!1,tD(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?W1e(s,t):t.send(s))}function r5e(t,e,n){if(s5e(t,n),!n[Q1e]||n.statusCode===200){let l=t.statusCode||t.status;n.code(l>=400?l: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 tD(t,e,n){let l=e.raw,r=e.statusCode;e[Du]["content-type"]=e[Du]["content-type"]??"application/json; charset=utf-8";let i;try{let s=t5e(e[nD],r,e[Du]["content-type"]);i=s===!1?sg({error:eD[r+""],code:t.code,message:t.message,statusCode:r}):s(Object.create(t,{error:{value:eD[r+""]},message:{value:t.message},statusCode:{value:r}}))}catch(s){e.log.error({err:s,statusCode:l.statusCode},"The serializer for the given status code failed"),e.code(500),i=sg(new e5e(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=sg(new Z1e(typeof i))),e[Du]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function i5e(t=n5e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function s5e(t,e){let n=e.raw,l=n.statusCode;l=l>=400?l:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?l=t.status:t.statusCode>=400&&(l=t.statusCode)),n.statusCode=l}lD.exports={buildErrorHandler:i5e,handleError:l5e}});var h9=k((HRe,d9)=>{"use strict";var cg=require("node:stream").finished,a5e=require("node:stream").Readable,{kFourOhFourContext:rD,kPublicRouteContext:iD,kReplyErrorHandlerCalled:dD,kReplyHijacked:J1,kReplyStartTime:K1,kReplyEndTime:fg,kReplySerializer:Bi,kReplySerializerDefault:c9,kReplyIsError:p9,kReplyHeaders:ul,kReplyTrailers:m2,kReplyHasStatusCode:dg,kReplyIsRunningOnErrorHook:hg,kReplyNextErrorHandler:u5e,kDisableRequestLogging:hD,kSchemaResponse:f9,kReplyCacheSerializeFns:Ns,kSchemaController:ag,kOptions:o5e,kRouteContext:jt}=h2(),{onSendHookRunner:mD,onResponseHookRunner:c5e,preHandlerHookRunner:p5e,preSerializationHookRunner:f5e}=hs(),sD=fh()[Symbol.for("internals")],d5e=d1(),pg=d5e.now,{handleError:aD}=G1(),{getSchemaSerializer:h5e}=m1(),ug={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:m5e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:y5e,FST_ERR_REP_ALREADY_SENT:yD,FST_ERR_REP_SENT_VALUE:g5e,FST_ERR_SEND_INSIDE_ONERR:v5e,FST_ERR_BAD_STATUS_CODE:_5e,FST_ERR_BAD_TRAILER_NAME:E5e,FST_ERR_BAD_TRAILER_VALUE:b5e,FST_ERR_MISSING_SERIALIZATION_FN:w5e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:S5e}=M2(),{FSTDEP010:T5e,FSTDEP013:x5e,FSTDEP019:A5e,FSTDEP020:O5e}=Li(),gD=Object.prototype.toString;function ll(t,e,n){this.raw=t,this[Bi]=null,this[dD]=!1,this[p9]=!1,this[hg]=!1,this.request=e,this[ul]={},this[m2]=null,this[dg]=!1,this[K1]=void 0,this.log=n}ll.props=[];Object.defineProperties(ll.prototype,{[jt]:{get(){return this.request[jt]}},context:{get(){return A5e(),this.request[jt]}},elapsedTime:{get(){return this[K1]===void 0?0:(this[fg]||pg())-this[K1]}},server:{get(){return this.request[jt].server}},sent:{enumerable:!0,get(){return(this[J1]||this.raw.writableEnded)===!0},set(t){if(T5e(),t!==!0)throw new g5e;if(this.sent&&this[J1])throw new yD(this.request.url,this.request.method);this[J1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[iD]:{get(){return this.request[iD]}}});ll.prototype.hijack=function(){return this[J1]=!0,this};ll.prototype.send=function(t){if(this[hg]===!0)throw new v5e;if(this.sent)return this.log.warn
Line truncated
|
||||
module.exports = ${t.toString()}(validator, serializer)`}sg.exports=t5e;sg.exports.dependencies={Serializer:dm(),Validator:ig()}});var lD=k((ZRe,nD)=>{"use strict";var{dependencies:n5e}=ag(),{Serializer:l5e,Validator:QRe}=n5e,r5e={mode:"standalone"},i5e=l5e.restoreFromState(r5e),s5e=null;nD.exports=function(e,n){function l(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,u="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(u+=","),u+='"statusCode":',u+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(u+=","),u+='"code":',u+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(u+=","),u+='"error":',u+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(u+=","),u+='"message":',u+=n.asString(s.message)),u+"}"}return l}(s5e,i5e)});var X1=k((eIe,aD)=>{"use strict";var rD=require("node:http").STATUS_CODES,a5e=ch(),{kReplyHeaders:Lu,kReplyNextErrorHandler:p9,kReplyIsRunningOnErrorHook:u5e,kReplyHasStatusCode:o5e,kRouteContext:sD}=y2(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:c5e,FST_ERR_FAILED_ERROR_SERIALIZATION:p5e}=$2(),{getSchemaSerializer:f5e}=v1(),ug=lD(),d5e={func:m5e,toJSON(){return this.func.name.toString()+"()"}};function h5e(t,e,n){t[u5e]=!1;let l=t[sD];if(t[p9]===!1){iD(e,t,function(a,u){try{a.raw.writeHead(a.raw.statusCode,a[Lu])}catch(o){a.log.warn({req:a.request,res:a,err:o},o&&o.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(u)});return}let r=t[p9]||l.errorHandler;t[p9]=Object.getPrototypeOf(r),delete t[Lu]["content-type"],delete t[Lu]["content-length"];let i=r.func;if(!i){t[p9]=!1,iD(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?a5e(s,t):t.send(s))}function m5e(t,e,n){if(g5e(t,n),!n[o5e]||n.statusCode===200){let l=t.statusCode||t.status;n.code(l>=400?l: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 iD(t,e,n){let l=e.raw,r=e.statusCode;e[Lu]["content-type"]=e[Lu]["content-type"]??"application/json; charset=utf-8";let i;try{let s=f5e(e[sD],r,e[Lu]["content-type"]);i=s===!1?ug({error:rD[r+""],code:t.code,message:t.message,statusCode:r}):s(Object.create(t,{error:{value:rD[r+""]},message:{value:t.message},statusCode:{value:r}}))}catch(s){e.log.error({err:s,statusCode:l.statusCode},"The serializer for the given status code failed"),e.code(500),i=ug(new p5e(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=ug(new c5e(typeof i))),e[Lu]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function y5e(t=d5e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function g5e(t,e){let n=e.raw,l=n.statusCode;l=l>=400?l:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?l=t.status:t.statusCode>=400&&(l=t.statusCode)),n.statusCode=l}aD.exports={buildErrorHandler:y5e,handleError:h5e}});var g9=k((tIe,y9)=>{"use strict";var fg=require("node:stream").finished,v5e=require("node:stream").Readable,{kFourOhFourContext:uD,kPublicRouteContext:oD,kReplyErrorHandlerCalled:gD,kReplyHijacked:W1,kReplyStartTime:Y1,kReplyEndTime:hg,kReplySerializer:Vi,kReplySerializerDefault:d9,kReplyIsError:h9,kReplyHeaders:ol,kReplyTrailers:g2,kReplyHasStatusCode:mg,kReplyIsRunningOnErrorHook:yg,kReplyNextErrorHandler:_5e,kDisableRequestLogging:vD,kSchemaResponse:m9,kReplyCacheSerializeFns:Rs,kSchemaController:og,kOptions:E5e,kRouteContext:jt}=y2(),{onSendHookRunner:_D,onResponseHookRunner:b5e,preHandlerHookRunner:w5e,preSerializationHookRunner:S5e}=ys(),cD=hh()[Symbol.for("internals")],T5e=y1(),dg=T5e.now,{handleError:pD}=X1(),{getSchemaSerializer:x5e}=v1(),cg={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:A5e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:O5e,FST_ERR_REP_ALREADY_SENT:ED,FST_ERR_REP_SENT_VALUE:N5e,FST_ERR_SEND_INSIDE_ONERR:C5e,FST_ERR_BAD_STATUS_CODE:R5e,FST_ERR_BAD_TRAILER_NAME:I5e,FST_ERR_BAD_TRAILER_VALUE:k5e,FST_ERR_MISSING_SERIALIZATION_FN:D5e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:P5e}=$2(),{FSTDEP010:L5e,FSTDEP013:F5e,FSTDEP019:j5e,FSTDEP020:U5e}=ji(),bD=Object.prototype.toString;function rl(t,e,n){this.raw=t,this[Vi]=null,this[gD]=!1,this[h9]=!1,this[yg]=!1,this.request=e,this[ol]={},this[g2]=null,this[mg]=!1,this[Y1]=void 0,this.log=n}rl.props=[];Object.defineProperties(rl.prototype,{[jt]:{get(){return this.request[jt]}},context:{get(){return j5e(),this.request[jt]}},elapsedTime:{get(){return this[Y1]===void 0?0:(this[hg]||dg())-this[Y1]}},server:{get(){return this.request[jt].server}},sent:{enumerable:!0,get(){return(this[W1]||this.raw.writableEnded)===!0},set(t){if(L5e(),t!==!0)throw new N5e;if(this.sent&&this[W1])throw new ED(this.request.url,this.request.method);this[W1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[oD]:{get(){return this.request[oD]}}});rl.prototype.hijack=function(){return this[W1]=!0,this};rl.prototype.send=function(t){if(this[yg]===!0)throw new C5e;if(this.sent)return this.log.warn
Line truncated
|
||||
${n.functions.join(`
|
||||
`)}
|
||||
const main = anonymous0
|
||||
@@ -133,9 +133,9 @@ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
|
||||
${n.functions.join(`
|
||||
`)}
|
||||
return main
|
||||
`;let a=new p7e(e),u=new f7e(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);u.addSchema(f,c);let m=n.refResolver.getSchemaDependencies(c);for(let[d,y]of Object.entries(m))u.addSchema(y,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:u,serializer:a,code:`validator
|
||||
`;let a=new w7e(e),u=new S7e(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);u.addSchema(f,c);let m=n.refResolver.getSchemaDependencies(c);for(let[d,y]of Object.entries(m))u.addSchema(y,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:u,serializer:a,code:`validator
|
||||
serializer
|
||||
${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode==="standalone"?ig()(o,n,a,u):o(u,a)}var m7e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],y7e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],g7e=["maxLength","minLength","pattern"],v7e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function wF(t){for(var e of m7e)if(e in t)return"object";for(var e of y7e)if(e in t)return"array";for(var e of g7e)if(e in t)return"string";for(var e of v7e)if(e in t)return"number";return t.type}function _7e(t,e){let n=e.schema,l=Object.keys(n.properties||{}),r=`
|
||||
${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode==="standalone"?ag()(o,n,a,u):o(u,a)}var A7e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],O7e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],N7e=["maxLength","minLength","pattern"],C7e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function AF(t){for(var e of A7e)if(e in t)return"object";for(var e of O7e)if(e in t)return"array";for(var e of N7e)if(e in t)return"string";for(var e of C7e)if(e in t)return"number";return t.type}function R7e(t,e){let n=e.schema,l=Object.keys(n.properties||{}),r=`
|
||||
const propertiesKeys = ${JSON.stringify(l)}
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
if (
|
||||
@@ -146,61 +146,61 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
) continue
|
||||
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let o in s){let c=i.getPropertyLocation(o);r+=`
|
||||
if (/${o.replace(/\\*\//g,"\\/")}/.test(key)) {
|
||||
${T0}
|
||||
${A0}
|
||||
json += serializer.asString(key) + ':'
|
||||
${ti(t,c,"value")}
|
||||
${ni(t,c,"value")}
|
||||
continue
|
||||
}
|
||||
`}let u=e.getPropertyLocation("additionalProperties").schema;if(u!==void 0)if(u===!0)r+=`
|
||||
${T0}
|
||||
${A0}
|
||||
json += serializer.asString(key) + ':' + JSON.stringify(value)
|
||||
`;else{let o=e.getPropertyLocation("additionalProperties");r+=`
|
||||
${T0}
|
||||
${A0}
|
||||
json += serializer.asString(key) + ':'
|
||||
${ti(t,o,"value")}
|
||||
${ni(t,o,"value")}
|
||||
`}return r+=`
|
||||
}
|
||||
`,r}function E7e(t,e){let n="",l=e.schema,r=l.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(l.properties)for(let o of Object.keys(l.properties)){if(r.indexOf(o)===-1)continue;let c=i.getPropertyLocation(o);c.schema.$ref&&(c=x0(t,e,c.schema.$ref));let f=JSON.stringify(o);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
|
||||
`,r}function I7e(t,e){let n="",l=e.schema,r=l.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(l.properties)for(let o of Object.keys(l.properties)){if(r.indexOf(o)===-1)continue;let c=i.getPropertyLocation(o);c.schema.$ref&&(c=O0(t,e,c.schema.$ref));let f=JSON.stringify(o);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
|
||||
`,a.push(o)),s.push(o)}for(let o of r)s.indexOf(o)===-1&&(n+=`if (obj['${o}'] === undefined) throw new Error('"${o}" is required!')
|
||||
`);n+=`
|
||||
let addComma = false
|
||||
let json = '${t.wrapObjects?"{":""}'
|
||||
`;let u=t.wrapObjects;if(t.wrapObjects=!0,l.properties)for(let o of Object.keys(l.properties)){let c=i.getPropertyLocation(o);c.schema.$ref&&(c=x0(t,e,c.schema.$ref));let f=JSON.stringify(o);if(a.indexOf(o)!==-1)n+=`
|
||||
${T0}
|
||||
`;let u=t.wrapObjects;if(t.wrapObjects=!0,l.properties)for(let o of Object.keys(l.properties)){let c=i.getPropertyLocation(o);c.schema.$ref&&(c=O0(t,e,c.schema.$ref));let f=JSON.stringify(o);if(a.indexOf(o)!==-1)n+=`
|
||||
${A0}
|
||||
json += ${JSON.stringify(f+":")}
|
||||
${ti(t,c,`obj[${f}]`)}
|
||||
${ni(t,c,`obj[${f}]`)}
|
||||
`;else{n+=`
|
||||
if (obj[${f}] !== undefined) {
|
||||
${T0}
|
||||
${A0}
|
||||
json += ${JSON.stringify(f+":")}
|
||||
${ti(t,c,`obj[${f}]`)}
|
||||
${ni(t,c,`obj[${f}]`)}
|
||||
}
|
||||
`;let m=c.schema.default;m!==void 0&&(n+=`
|
||||
else {
|
||||
${T0}
|
||||
${A0}
|
||||
json += ${JSON.stringify(f+":"+JSON.stringify(m))}
|
||||
}
|
||||
`)}}return(l.patternProperties||l.additionalProperties)&&(n+=_7e(t,e)),t.wrapObjects=u,n+=`
|
||||
`)}}return(l.patternProperties||l.additionalProperties)&&(n+=R7e(t,e)),t.wrapObjects=u,n+=`
|
||||
return json${t.wrapObjects?" + '}'":""}
|
||||
`,n}function SF(t,e,n,l){let r=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let u=r.getPropertyLocation(i);s=x0(t,u,s.$ref).schema}let a=s.type;if(a===void 0&&(a=wF(s)),a!==void 0){if(l.type!==void 0&&l.type!==a)throw new Error("allOf schemas have different type values");l.type=a}if(s.format!==void 0){if(l.format!==void 0&&l.format!==s.format)throw new Error("allOf schemas have different format values");l.format=s.format}if(s.nullable!==void 0){if(l.nullable!==void 0&&l.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");l.nullable=s.nullable}s.properties!==void 0&&(l.properties===void 0&&(l.properties={}),Object.assign(l.properties,s.properties)),s.additionalProperties!==void 0&&(l.additionalProperties===void 0&&(l.additionalProperties={}),Object.assign(l.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(l.patternProperties===void 0&&(l.patternProperties={}),Object.assign(l.patternProperties,s.patternProperties)),s.required!==void 0&&(l.required===void 0&&(l.required=[]),l.required.push(...s.required)),s.oneOf!==void 0&&(l.oneOf===void 0&&(l.oneOf=[]),l.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(l.anyOf===void 0&&(l.anyOf=[]),l.anyOf.push(...s.anyOf)),s.allOf!==void 0&&SF(t,e,s,l)}delete l.allOf,l.$id=`__fjs_merged_${bF++}`,t.refResolver.addSchema(l),e.addMergedSchema(l,l.$id)}function b7e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let l=av({},e.schema),r=l.then,i=l.else||{additionalProperties:!0};delete l.if,delete l.then,delete l.else;let a=e.getPropertyLocation("if").getSchemaRef(),u=e.getPropertyLocation("then");u.schema=av(l,r);let o=e.getPropertyLocation("else");return o.schema=av(l,i),`
|
||||
`,n}function OF(t,e,n,l){let r=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let u=r.getPropertyLocation(i);s=O0(t,u,s.$ref).schema}let a=s.type;if(a===void 0&&(a=AF(s)),a!==void 0){if(l.type!==void 0&&l.type!==a)throw new Error("allOf schemas have different type values");l.type=a}if(s.format!==void 0){if(l.format!==void 0&&l.format!==s.format)throw new Error("allOf schemas have different format values");l.format=s.format}if(s.nullable!==void 0){if(l.nullable!==void 0&&l.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");l.nullable=s.nullable}s.properties!==void 0&&(l.properties===void 0&&(l.properties={}),Object.assign(l.properties,s.properties)),s.additionalProperties!==void 0&&(l.additionalProperties===void 0&&(l.additionalProperties={}),Object.assign(l.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(l.patternProperties===void 0&&(l.patternProperties={}),Object.assign(l.patternProperties,s.patternProperties)),s.required!==void 0&&(l.required===void 0&&(l.required=[]),l.required.push(...s.required)),s.oneOf!==void 0&&(l.oneOf===void 0&&(l.oneOf=[]),l.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(l.anyOf===void 0&&(l.anyOf=[]),l.anyOf.push(...s.anyOf)),s.allOf!==void 0&&OF(t,e,s,l)}delete l.allOf,l.$id=`__fjs_merged_${xF++}`,t.refResolver.addSchema(l),e.addMergedSchema(l,l.$id)}function k7e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let l=ov({},e.schema),r=l.then,i=l.else||{additionalProperties:!0};delete l.if,delete l.then,delete l.else;let a=e.getPropertyLocation("if").getSchemaRef(),u=e.getPropertyLocation("then");u.schema=ov(l,r);let o=e.getPropertyLocation("else");return o.schema=ov(l,i),`
|
||||
if (validator.validate("${a}", ${n})) {
|
||||
${ti(t,u,n)}
|
||||
${ni(t,u,n)}
|
||||
} else {
|
||||
${ti(t,o,n)}
|
||||
${ni(t,o,n)}
|
||||
}
|
||||
`}function w7e(t){return`(${t} && typeof ${t}.toJSON === 'function')
|
||||
`}function D7e(t){return`(${t} && typeof ${t}.toJSON === 'function')
|
||||
? ${t}.toJSON()
|
||||
: ${t}
|
||||
`}function TF(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let l=AF(t);t.functionsNamesBySchema.set(n,l);let r=e.getSchemaRef();r.startsWith(t.rootSchemaId)&&(r=r.replace(t.rootSchemaId,""));let i=`
|
||||
`}function NF(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let l=RF(t);t.functionsNamesBySchema.set(n,l);let r=e.getSchemaRef();r.startsWith(t.rootSchemaId)&&(r=r.replace(t.rootSchemaId,""));let i=`
|
||||
`,s=n.nullable===!0;return i+=`
|
||||
// ${r}
|
||||
function ${l} (input) {
|
||||
const obj = ${w7e("input")}
|
||||
const obj = ${D7e("input")}
|
||||
${s?"":"if (obj === null) return '{}'"}
|
||||
|
||||
${E7e(t,e)}
|
||||
${I7e(t,e)}
|
||||
}
|
||||
`,t.functions.push(i),l}function S7e(t,e){let n=e.schema,l=e.getPropertyLocation("items");l.schema=l.schema||{},l.schema.$ref&&(l=x0(t,l,l.schema.$ref));let r=l.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=AF(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
|
||||
`,t.functions.push(i),l}function P7e(t,e){let n=e.schema,l=e.getPropertyLocation("items");l.schema=l.schema||{},l.schema.$ref&&(l=O0(t,l,l.schema.$ref));let r=l.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=RF(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
|
||||
function ${i} (obj) {
|
||||
// ${s}
|
||||
`,u=n.nullable===!0;if(a+=`
|
||||
@@ -213,12 +213,12 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
if (arrayLength > ${r.length}) {
|
||||
throw new Error(\`Item at ${r.length} does not match schema definition.\`)
|
||||
}
|
||||
`),_F==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${H9}) return JSON.stringify(obj)
|
||||
`),SF==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${z9}) return JSON.stringify(obj)
|
||||
`),a+=`
|
||||
let jsonOutput = ''
|
||||
`,Array.isArray(r)){for(let o=0;o<r.length;o++){let c=r[o],f=ti(t,l.getPropertyLocation(o),`obj[${o}]`);a+=`
|
||||
`,Array.isArray(r)){for(let o=0;o<r.length;o++){let c=r[o],f=ni(t,l.getPropertyLocation(o),`obj[${o}]`);a+=`
|
||||
if (${o} < arrayLength) {
|
||||
if (${xF(c.type,`[${o}]`)}) {
|
||||
if (${CF(c.type,`[${o}]`)}) {
|
||||
let json = ''
|
||||
${f}
|
||||
jsonOutput += json
|
||||
@@ -235,7 +235,7 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
if (i < arrayLength - 1) {
|
||||
jsonOutput += ','
|
||||
}
|
||||
}`)}else{let o=ti(t,l,"obj[i]");a+=`
|
||||
}`)}else{let o=ni(t,l,"obj[i]");a+=`
|
||||
for (let i = 0; i < arrayLength; i++) {
|
||||
let json = ''
|
||||
${o}
|
||||
@@ -243,7 +243,7 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
if (i < arrayLength - 1) {
|
||||
jsonOutput += ','
|
||||
}
|
||||
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function xF(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
|
||||
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function CF(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
|
||||
obj${e} === null ||
|
||||
obj${e} instanceof Date ||
|
||||
obj${e} instanceof RegExp ||
|
||||
@@ -251,7 +251,7 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
typeof obj${e} === "object" &&
|
||||
typeof obj${e}.toString === "function" &&
|
||||
obj${e}.toString !== Object.prototype.toString
|
||||
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(r=>xF(r,e)).join(" || ")})`)}return n}function AF(t){return"anonymous"+t.functionsCounter++}function T7e(t,e,n){let r=e.schema.type.sort(a=>a==="null"?-1:1),i="";r.forEach((a,u)=>{e.schema={...e.schema,type:a};let o=OF(t,e,n),c=u===0?"if":"else if";switch(a){case"null":i+=`
|
||||
)`;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(r=>CF(r,e)).join(" || ")})`)}return n}function RF(t){return"anonymous"+t.functionsCounter++}function L7e(t,e,n){let r=e.schema.type.sort(a=>a==="null"?-1:1),i="";r.forEach((a,u)=>{e.schema={...e.schema,type:a};let o=IF(t,e,n),c=u===0?"if":"else if";switch(a){case"null":i+=`
|
||||
${c} (${n} === null)
|
||||
${o}
|
||||
`;break;case"string":{i+=`
|
||||
@@ -278,17 +278,17 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
${o}
|
||||
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),i+=`
|
||||
else throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
|
||||
`,i}function OF(t,e,n){let l=e.schema;switch(l.type){case"null":return"json += 'null'";case"string":return l.format==="date-time"?`json += serializer.asDateTime(${n})`:l.format==="date"?`json += serializer.asDate(${n})`:l.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 += ${TF(t,e)}(${n})`;case"array":return`json += ${S7e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${l.type} unsupported`)}}function x7e(t,e){let n=t.schema,l=n.type,r=Array.isArray(l)&&l.includes("null"),i="";return r&&(i+=`
|
||||
`,i}function IF(t,e,n){let l=e.schema;switch(l.type){case"null":return"json += 'null'";case"string":return l.format==="date-time"?`json += serializer.asDateTime(${n})`:l.format==="date"?`json += serializer.asDate(${n})`:l.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 += ${NF(t,e)}(${n})`;case"array":return`json += ${P7e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${l.type} unsupported`)}}function F7e(t,e){let n=t.schema,l=n.type,r=Array.isArray(l)&&l.includes("null"),i="";return r&&(i+=`
|
||||
if (${e} === null) {
|
||||
json += 'null'
|
||||
} else {
|
||||
`),i+=`json += '${JSON.stringify(n.const).replace(d7e,"\\'")}'`,r&&(i+=`
|
||||
`),i+=`json += '${JSON.stringify(n.const).replace(T7e,"\\'")}'`,r&&(i+=`
|
||||
}
|
||||
`),i}function ti(t,e,n){let l=e.schema;if(typeof l=="boolean")return`json += JSON.stringify(${n})`;if(l.$ref&&(e=x0(t,e,l.$ref),l=e.schema),l.type===void 0){let a=wF(l);a&&(l.type=a)}if(l.if&&l.then)return b7e(t,e,n);l.allOf&&(SF(t,e,l,o7e(l)),l=e.schema);let r=l.type,i="";if((r===void 0||r==="object")&&(l.anyOf||l.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),l.type==="object"){t.wrapObjects=!1;let c=TF(t,e);i+=`
|
||||
`),i}function ni(t,e,n){let l=e.schema;if(typeof l=="boolean")return`json += JSON.stringify(${n})`;if(l.$ref&&(e=O0(t,e,l.$ref),l=e.schema),l.type===void 0){let a=AF(l);a&&(l.type=a)}if(l.if&&l.then)return k7e(t,e,n);l.allOf&&(OF(t,e,l,E7e(l)),l=e.schema);let r=l.type,i="";if((r===void 0||r==="object")&&(l.anyOf||l.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),l.type==="object"){t.wrapObjects=!1;let c=NF(t,e);i+=`
|
||||
json += '{'
|
||||
json += ${c}(${n})
|
||||
json += ','
|
||||
`}let a=l.anyOf?"anyOf":"oneOf",u=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=u.getPropertyLocation(c),m=f.getSchemaRef(),d=ti(t,f,n);i+=`
|
||||
`}let a=l.anyOf?"anyOf":"oneOf",u=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=u.getPropertyLocation(c),m=f.getSchemaRef(),d=ni(t,f,n);i+=`
|
||||
${c===0?"if":"else if"}(validator.validate("${m}", ${n}))
|
||||
${d}
|
||||
`}let o=e.getSchemaRef();return o.startsWith(t.rootSchemaId)&&(o=o.replace(t.rootSchemaId,"")),i+=`
|
||||
@@ -299,16 +299,16 @@ ${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode===
|
||||
if (${n} === null) {
|
||||
json += 'null'
|
||||
} else {
|
||||
`),l.const!==void 0?i+=x7e(e,n):Array.isArray(r)?i+=T7e(t,e,n):i+=OF(t,e,n),s&&(i+=`
|
||||
`),l.const!==void 0?i+=F7e(e,n):Array.isArray(r)?i+=L7e(t,e,n):i+=IF(t,e,n),s&&(i+=`
|
||||
}
|
||||
`),i}A0.exports=ov;A0.exports.default=ov;A0.exports.build=ov;A0.exports.validLargeArrayMechanisms=EF;A0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var RF=k((WIe,cv)=>{"use strict";var A7e=pv();function CF(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(l){return t.restoreFunction(l)}};let e=A7e();return function(l,r={}){r.mode="standalone";let i=e(l,r);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}cv.exports=CF;cv.exports.default=CF});var pv=k((YIe,c5)=>{"use strict";var O7e=NF();function fv(){return function(e,n){let l=Object.assign({},n,{schema:e});return N7e.bind(null,l)}}function N7e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),O7e(e,t)}c5.exports=fv;c5.exports.default=fv;c5.exports.SerializerSelector=fv;c5.exports.StandaloneSerializer=RF()});var Gi=k(p5=>{"use strict";Object.defineProperty(p5,"__esModule",{value:!0});p5.checkMetadata=void 0;var C7e=Nt(),R7e={keyword:"metadata",schemaType:"object",code(t){IF(t);let{gen:e,schema:n,it:l}=t;if((0,C7e.alwaysValidSchema)(l,n))return;let r=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},r),t.ok(r)}};function IF({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}p5.checkMetadata=IF;p5.default=R7e});var V9=k(d5=>{"use strict";Object.defineProperty(d5,"__esModule",{value:!0});d5.hasRef=void 0;var kF=Cu(),f5=st(),I7e=xs(),DF=Q3(),PF=ny(),k7e=Gi(),D7e={keyword:"ref",schemaType:"string",code(t){(0,k7e.checkMetadata)(t);let{gen:e,data:n,schema:l,parentSchema:r,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");r.nullable?(e.var(a,(0,f5._)`${n} === null`),e.if((0,f5.not)(a),u)):(e.var(a,!1),u()),t.ok(a);function u(){var f;let m=(f=s.schema.definitions)===null||f===void 0?void 0:f[l];if(!m)throw new I7e.default(i.opts.uriResolver,"",l,`No definition ${l}`);dv(m)||!i.opts.inlineRefs?o(m):c(m)}function o(f){let m=kF.compileSchema.call(i.self,new kF.SchemaEnv({schema:f,root:s,schemaPath:`/definitions/${l}`})),d=(0,PF.getValidate)(t,m),y=e.const("_errs",DF.default.errors);(0,PF.callRef)(t,d,m,m.$async),e.assign(a,(0,f5._)`${y} === ${DF.default.errors}`)}function c(f){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:f,code:(0,f5.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:f5.nil,topSchemaRef:m,errSchemaPath:`/definitions/${l}`},a)}}};function dv(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&dv(n))return!0}return!1}d5.hasRef=dv;d5.default=D7e});var mv=k(hv=>{"use strict";Object.defineProperty(hv,"__esModule",{value:!0});var P7e=/t|\s/i,L7e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,F7e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,j7e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function FF(t,e){let n=t.split(P7e);return n.length===2&&LF(n[0])&&U7e(n[1])||e&&n.length===1&&LF(n[0])}hv.default=FF;function LF(t){let e=L7e.exec(t);if(!e)return!1;let n=+e[1],l=+e[2],r=+e[3];return l>=1&&l<=12&&r>=1&&(r<=j7e[l]||l===2&&r===29&&(n%100===0?n%400===0:n%4===0))}function U7e(t){let e=F7e.exec(t);if(!e)return!1;let n=+e[1],l=+e[2],r=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&l<=59&&r<=59||n-i===23&&l-s===59&&r===60}FF.code='require("ajv/dist/runtime/timestamp").default'});var O0=k(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.typeErrorParams=Rs.typeErrorMessage=Rs.typeError=void 0;var M7e=st();function $7e(t){return{message:e=>jF(e,t),params:e=>UF(e,t)}}Rs.typeError=$7e;function jF({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Rs.typeErrorMessage=jF;function UF({parentSchema:t},e){return(0,M7e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}Rs.typeErrorParams=UF});var yv=k(N0=>{"use strict";Object.defineProperty(N0,"__esModule",{value:!0});N0.intRange=void 0;var P3=st(),B7e=mv(),H7e=Nt(),V7e=Gi(),MF=O0();N0.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var q7e={message:t=>(0,MF.typeErrorMessage)(t,t.schema),params:t=>(0,MF.typeErrorParams)(t,t.schema)};function z7e(t){let{gen:e,data:n,it:l}=t,{timestamp:r,allowDate:i}=l.opts;if(r==="date")return(0,P3._)`${n} instanceof Date `;let s=(0,H7e.useFunc)(e,B7e.default),a=i?(0,P3._)`, true`:P3.nil,u=(0,P3._)`typeof ${n} == "string" && ${s}(${n}${a})`;return r==="string"?u:(0,P3.or)((0,P3._)`${n} instanceof Date`,u)}var G7e={keyword:"type",schemaType:"string",error:q7e,code(t){(0,V7e.checkMetadata)(t);let{data:e,schema:n,parentSchema:l,it:r}=t,i;switch(n){case"boole
Line truncated
|
||||
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},tfe=97,nfe=48;function Ds(t,e){let n="",l;for(Ds.message=void 0;l=t[e++],l!=='"';)if(l==="\\")if(l=t[e],l in dj)n+=dj[l],e++;else if(l==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,l=t[e],l===void 0){r("unexpected end");return}if(l=l.toLowerCase(),l>="a"&&l<="f")s+=l.charCodeAt(0)-tfe+10;else if(l>="0"&&l<="9")s+=l.charCodeAt(0)-nfe;else{r(`unexpected token ${l}`);return}e++}n+=String.fromCharCode(s)}else{r(`unexpected token ${l}`);return}else if(l===void 0){r("unexpected end");return}else if(l.charCodeAt(0)>=32)n+=l;else{r(`unexpected token ${l}`);return}return Ds.position=e,n;function r(i){Ds.position=e,Ds.message=i}}Ps.parseJsonString=Ds;Ds.message=void 0;Ds.position=0;Ds.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var xj=k(Mv=>{"use strict";Object.defineProperty(Mv,"__esModule",{value:!0});var lfe=Ov(),vj=Cu(),tt=st(),rfe=xs(),Ht=Q3(),ife=O2(),sfe=V9(),afe=yv(),Pv=hj(),_j=Nt(),ufe=mv(),ofe={elements:dfe,values:hfe,discriminator:yfe,properties:mj,optionalProperties:mj,enum:vfe,type:gfe,ref:_fe};function Ej(t,e){let n=vj.getCompilingSchema.call(this,t);if(n)return n;let{es5:l,lines:r}=this.opts.code,{ownProperties:i}=this.opts,s=new tt.CodeGen(this.scope,{es5:l,lines:r,ownProperties:i}),a=s.scopeName("parse"),u={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ht.default.data,parseName:a,char:s.name("c")},o;try{this._compilations.add(t),t.parseName=a,cfe(u),s.optimize(this.opts.code.optimize);let c=s.toString();o=`${s.scopeRefs(Ht.default.scope)}return ${c}`;let m=new Function(`${Ht.default.scope}`,o)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(c){throw o&&this.logger.error("Error compiling parser, function code:",o),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}Mv.default=Ej;var Dv=(0,tt._)`undefined`;function cfe(t){let{gen:e,parseName:n,char:l}=t;e.func(n,(0,tt._)`${Ht.default.json}, ${Ht.default.jsonPos}, ${Ht.default.jsonPart}`,!1,()=>{e.let(Ht.default.data),e.let(l),e.assign((0,tt._)`${n}.message`,Dv),e.assign((0,tt._)`${n}.position`,Dv),e.assign(Ht.default.jsonPos,(0,tt._)`${Ht.default.jsonPos} || 0`),e.const(Ht.default.jsonLen,(0,tt._)`${Ht.default.json}.length`),K9(t),Uv(t),e.if(Ht.default.jsonPart,()=>{e.assign((0,tt._)`${n}.position`,Ht.default.jsonPos),e.return(Ht.default.data)}),e.if((0,tt._)`${Ht.default.jsonPos} === ${Ht.default.jsonLen}`,()=>e.return(Ht.default.data)),k0(t)})}function K9(t){let e;for(let n of lfe.jtdForms)if(n in t.schema){e=n;break}e?ffe(t,ofe[e]):Fv(t)}var pfe=gj(!0,gj(!1,k0));function ffe(t,e){let{gen:n,schema:l,data:r}=t;if(!l.nullable)return e(t);y5(t,"null",e,()=>n.assign(r,null))}function dfe(t){let{gen:e,schema:n,data:l}=t;ni(t,"[");let r=e.let("i",0);e.assign(l,(0,tt._)`[]`),Lv(t,"]",()=>{let i=e.let("el");K9({...t,schema:n.elements,data:i}),e.assign((0,tt._)`${l}[${r}++]`,i)})}function hfe(t){let{gen:e,schema:n,data:l}=t;ni(t,"{"),e.assign(l,(0,tt._)`{}`),Lv(t,"}",()=>mfe(t,n.values))}function Lv(t,e,n){bj(t,e,n),ni(t,e)}function bj(t,e,n){let{gen:l}=t;l.for((0,tt._)`;${Ht.default.jsonPos}<${Ht.default.jsonLen} && ${X9(1)}!==${e};`,()=>{n(),y5(t,",",()=>l.break(),r)});function r(){y5(t,e,()=>{},k0)}}function mfe(t,e){let{gen:n}=t,l=n.let("key");Bu({...t,data:l}),ni(t,":"),Sj(t,l,e)}function yfe(t){let{gen:e,data:n,schema:l}=t,{discriminator:r,mapping:i}=l;ni(t,"{"),e.assign(n,(0,tt._)`{}`);let s=e.const("pos",Ht.default.jsonPos),a=e.let("value"),u=e.let("tag");bj(t,"}",()=>{let o=e.let("key");Bu({...t,data:o}),ni(t,":"),e.if((0,tt._)`${o} === ${r}`,()=>{Bu({...t,data:u}),e.assign((0,tt._)`${n}[${o}]`,u),e.break()},()=>Fv({...t,data:a}))}),e.assign(Ht.default.jsonPos,s),e.if((0,tt._)`${u} === undefined`),Yi(t,(0,tt.str)`discriminator tag not found`);for(let o in i)e.elseIf((0,tt._)`${u} === ${o}`),wj({...t,schema:i[o]},r);e.else(),Yi(t,(0,tt.str)`discriminator value not in schema`),e.endIf()}function mj(t){let{gen:e,data:n}=t;ni(t,"{"),e.assign(n,(0,tt._)`{}`),wj(t)}function wj(t,e){let{gen:n,schema:l,data:r}=t,{properties:i,optionalProperties:s,additionalProperties:a}=l;if(Lv(t,"}",()=>{let u=n.let("key");if(Bu({...t,data:u}),ni(t,":"),n.if(!1),yj(t,u,i),yj(t,u,s),e){n.elseIf((0,tt._)`${u} === ${e}`);let o=n.let("tag");Bu({...t,data:o})}n.else(),a?Fv({...t,data:(0,tt._)`${r}[${u}]`}):Yi(t,(0,tt.str)`property ${u} not allowed`),n.endIf()}),i){let u=(0,ife.hasPropFunc)(n),o=(0,tt.and)(...Object.keys(i).map(c=>(0,tt._)`${u}.call(${r}, ${c})`));n.if((0,tt.not)(o),()=>Yi(t,(0,tt.str)`missing required properties`))}}function yj(t,e,n={}){let{gen:l}=t;for(let r in n)l.elseIf((0,tt._)`${e} === ${r}`),Sj(t,e,n[r])}function Sj(t,e,n){K9({...t,schema:n,data:(0,tt._)`${t.data}[${e}]`})}function gfe(t){let{gen:e,schema:n,data:l,self:r}=t;switch(n.type){case"boolean":pfe(t);break;case"string":Bu(t);break;case"timestamp":{Bu(t);let i=(0,_j.useFunc)(e,ufe.default),{allowDate:s,parseDate:a}=r.opts,u=s?(0,tt._)`!${i}(${l}, true)`:(0,tt._)`!${i}(${l})`,o=a?
Line truncated
|
||||
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function Vj(t){return t[Symbol.for("fastify.display-name")]}function qj(t){return!!t[Symbol.for("skip-override")]}function zj(t){let e=_5(t);if(!e)return;let n=e.dependencies;n&&(Wv(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(l=>{Wv(this[Yv].indexOf(l)>-1,`The dependency '${l}' of plugin '${e.name}' is not registered`)}))}function Gj(t){let e=_5(t);if(!e)return;let{decorators:n,name:l}=e;n&&(n.fastify&&Xv(this,"Fastify",n.fastify,l),n.reply&&Xv(this,"Reply",n.reply,l),n.request&&Xv(this,"Request",n.request,l))}var Wfe={Fastify:Vfe,Request:zfe,Reply:qfe};function Xv(t,e,n,l){Wv(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(r=>{let i=typeof l=="string"?` required by '${l}'`:"";if(!Wfe[e].call(t,r))throw new Jfe(r,i,e)})}function Yfe(t){let e=_5(t);if(!e)return;let n=e.fastify,l=/-rc.+$/.test(this.version);if(!(l===!0&&Kv.gt(this.version,Kv.coerce(n))===!0)&&n&&Kv.satisfies(this.version,n,{includePrerelease:l})===!1)throw new Gfe(e.name,n,this.version)}function Qfe(t){let e=_5(t);if(!e)return;let n=e.name;if(n)return this[Yv].push(n),n}function Zfe(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Kfe(e||"anonymous")}function ede(t){let e=Qfe.call(this,t)||Hj(t);return Zfe.call(this,t,e),Yfe.call(this,t),Gj.call(this,t),zj.call(this,t),qj(t)}Qv.exports={getPluginName:Hj,getFuncPreview:Xfe,kRegisteredPlugins:Yv,getDisplayName:Vj,registerPlugin:ede};Qv.exports[Hfe]={shouldSkipOverride:qj,getMeta:_5,checkDecorators:Gj,checkDependencies:zj}});var Y9=k((xke,Jj)=>{"use strict";function tde(t,e){let n=e||lde();return t?rde(t,n):n}function nde(t,e){return t.genReqId(e)}function lde(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function rde(t,e){return function(n){return n.headers[t]||e(n)}}Jj.exports={getGenReqId:nde,reqIdGenFactory:tde}});var Yj=k((Ake,Wj)=>{"use strict";var Kj=12,ide=0,e_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 sde(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,l="",r=0,i=0,s=e,a=Kj;e>-1&&e<n;){var u=Xj(t[e+1],4),o=Xj(t[e+2],0),c=u|o,f=e_[c];if(a=e_[256+a+f],i=i<<6|c&e_[364+f],a===Kj)l+=t.slice(r,s),l+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,r=e+3,e=s=t.indexOf("%",r);else{if(a===ide)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return l+t.slice(r)}var ade={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 Xj(t,e){var n=ade[t];return n===void 0?255:n<<e}Wj.exports=sde});var nU=k((Oke,tU)=>{"use strict";var Qj=Yj(),Zj=/\+/g,eU=function(){};eU.prototype=Object.create(null);function ude(t){let e=new eU;if(typeof t!="string")return e;let n=t.length,l="",r="",i=-1,s=-1,a=!1,u=!1,o=!1,c=!1,f=!1,m=0;for(let d=0;d<n+1;d++)if(m=d!==n?t.charCodeAt(d):38,m===38){if(f=s>i,f||(s=d),l=t.slice(i+1,s),f||l.length>0){o&&(l=l.replace(Zj," ")),a&&(l=Qj(l)||l),f&&(r=t.slice(s+1,d),c&&(r=r.replace(Zj," ")),u&&(r=Qj(r)||r));let y=e[l];y===void 0?e[l]=r:y.pop?y.push(r):e[l]=[y,r]}r="",i=d,s=d,a=!1,u=!1,o=!1,c=!1}else m===61?s<=i?s=d:u=!0:m===43?s>i?c=!0:o=!0:m===37&&(s>i?u=!0:a=!0);return e}tU.exports=ude});var rU=k((Nke,lU)=>{var li=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),ode=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function cde(t){let e=t.length;if(e===0)return"";let n="",l=0,r=0;e:for(;r<e;r++){let i=t.charCodeAt(r);for(;i<128;){if(ode[i]!==1&&(l<r&&(n+=t.slice(l,r)),l=r+1,n+=li[i]),++r===e)break e;i=t.charCodeAt(r)}if(l<r&&(n+=t.slice(l,r)),i<2048){l=r+1,n+=li[192|i>>6]+li[128|i&63];continue}if(i<55296||i>=57344){l=r+1,n+=li[224|i>>12]+li[128|i>>6&63]+li[128|i&63];continue}if(++r,r>=e)throw new Error("URI malformed");let s=t.charCodeAt(r)&1023;l=r+1,i=65536+((i&1023)<<10|s),n+=li[240|i>>18]+li[128|i>>12&63]+li[128|i>>6&63]+li[128|i&63]}return l===0?t:l<e?n+t.slice(l):n}lU.exports={encodeString:cde}});var aU=k((Cke,sU)=>{"use
Line truncated
|
||||
`),i}N0.exports=pv;N0.exports.default=pv;N0.exports.build=pv;N0.exports.validLargeArrayMechanisms=TF;N0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var PF=k((oke,fv)=>{"use strict";var j7e=dv();function DF(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(l){return t.restoreFunction(l)}};let e=j7e();return function(l,r={}){r.mode="standalone";let i=e(l,r);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}fv.exports=DF;fv.exports.default=DF});var dv=k((cke,d5)=>{"use strict";var U7e=kF();function hv(){return function(e,n){let l=Object.assign({},n,{schema:e});return M7e.bind(null,l)}}function M7e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),U7e(e,t)}d5.exports=hv;d5.exports.default=hv;d5.exports.SerializerSelector=hv;d5.exports.StandaloneSerializer=PF()});var Ki=k(h5=>{"use strict";Object.defineProperty(h5,"__esModule",{value:!0});h5.checkMetadata=void 0;var $7e=Nt(),B7e={keyword:"metadata",schemaType:"object",code(t){LF(t);let{gen:e,schema:n,it:l}=t;if((0,$7e.alwaysValidSchema)(l,n))return;let r=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},r),t.ok(r)}};function LF({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}h5.checkMetadata=LF;h5.default=B7e});var G9=k(y5=>{"use strict";Object.defineProperty(y5,"__esModule",{value:!0});y5.hasRef=void 0;var FF=Iu(),m5=st(),H7e=Os(),jF=Z3(),UF=ry(),V7e=Ki(),q7e={keyword:"ref",schemaType:"string",code(t){(0,V7e.checkMetadata)(t);let{gen:e,data:n,schema:l,parentSchema:r,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");r.nullable?(e.var(a,(0,m5._)`${n} === null`),e.if((0,m5.not)(a),u)):(e.var(a,!1),u()),t.ok(a);function u(){var f;let m=(f=s.schema.definitions)===null||f===void 0?void 0:f[l];if(!m)throw new H7e.default(i.opts.uriResolver,"",l,`No definition ${l}`);mv(m)||!i.opts.inlineRefs?o(m):c(m)}function o(f){let m=FF.compileSchema.call(i.self,new FF.SchemaEnv({schema:f,root:s,schemaPath:`/definitions/${l}`})),d=(0,UF.getValidate)(t,m),y=e.const("_errs",jF.default.errors);(0,UF.callRef)(t,d,m,m.$async),e.assign(a,(0,m5._)`${y} === ${jF.default.errors}`)}function c(f){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:f,code:(0,m5.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:m5.nil,topSchemaRef:m,errSchemaPath:`/definitions/${l}`},a)}}};function mv(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&mv(n))return!0}return!1}y5.hasRef=mv;y5.default=q7e});var gv=k(yv=>{"use strict";Object.defineProperty(yv,"__esModule",{value:!0});var z7e=/t|\s/i,G7e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,J7e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,K7e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function $F(t,e){let n=t.split(z7e);return n.length===2&&MF(n[0])&&X7e(n[1])||e&&n.length===1&&MF(n[0])}yv.default=$F;function MF(t){let e=G7e.exec(t);if(!e)return!1;let n=+e[1],l=+e[2],r=+e[3];return l>=1&&l<=12&&r>=1&&(r<=K7e[l]||l===2&&r===29&&(n%100===0?n%400===0:n%4===0))}function X7e(t){let e=J7e.exec(t);if(!e)return!1;let n=+e[1],l=+e[2],r=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&l<=59&&r<=59||n-i===23&&l-s===59&&r===60}$F.code='require("ajv/dist/runtime/timestamp").default'});var C0=k(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.typeErrorParams=ks.typeErrorMessage=ks.typeError=void 0;var W7e=st();function Y7e(t){return{message:e=>BF(e,t),params:e=>HF(e,t)}}ks.typeError=Y7e;function BF({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}ks.typeErrorMessage=BF;function HF({parentSchema:t},e){return(0,W7e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}ks.typeErrorParams=HF});var vv=k(R0=>{"use strict";Object.defineProperty(R0,"__esModule",{value:!0});R0.intRange=void 0;var L3=st(),Q7e=gv(),Z7e=Nt(),epe=Ki(),VF=C0();R0.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var tpe={message:t=>(0,VF.typeErrorMessage)(t,t.schema),params:t=>(0,VF.typeErrorParams)(t,t.schema)};function npe(t){let{gen:e,data:n,it:l}=t,{timestamp:r,allowDate:i}=l.opts;if(r==="date")return(0,L3._)`${n} instanceof Date `;let s=(0,Z7e.useFunc)(e,Q7e.default),a=i?(0,L3._)`, true`:L3.nil,u=(0,L3._)`typeof ${n} == "string" && ${s}(${n}${a})`;return r==="string"?u:(0,L3.or)((0,L3._)`${n} instanceof Date`,u)}var lpe={keyword:"type",schemaType:"string",error:tpe,code(t){(0,epe.checkMetadata)(t);let{data:e,schema:n,parentSchema:l,it:r}=t,i;switch(n){case"boole
Line truncated
|
||||
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},ffe=97,dfe=48;function Ls(t,e){let n="",l;for(Ls.message=void 0;l=t[e++],l!=='"';)if(l==="\\")if(l=t[e],l in gj)n+=gj[l],e++;else if(l==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,l=t[e],l===void 0){r("unexpected end");return}if(l=l.toLowerCase(),l>="a"&&l<="f")s+=l.charCodeAt(0)-ffe+10;else if(l>="0"&&l<="9")s+=l.charCodeAt(0)-dfe;else{r(`unexpected token ${l}`);return}e++}n+=String.fromCharCode(s)}else{r(`unexpected token ${l}`);return}else if(l===void 0){r("unexpected end");return}else if(l.charCodeAt(0)>=32)n+=l;else{r(`unexpected token ${l}`);return}return Ls.position=e,n;function r(i){Ls.position=e,Ls.message=i}}Fs.parseJsonString=Ls;Ls.message=void 0;Ls.position=0;Ls.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var Cj=k(Bv=>{"use strict";Object.defineProperty(Bv,"__esModule",{value:!0});var hfe=Cv(),wj=Iu(),tt=st(),mfe=Os(),Ht=Z3(),yfe=N2(),gfe=G9(),vfe=vv(),Fv=vj(),Sj=Nt(),_fe=gv(),Efe={elements:Tfe,values:xfe,discriminator:Ofe,properties:_j,optionalProperties:_j,enum:Cfe,type:Nfe,ref:Rfe};function Tj(t,e){let n=wj.getCompilingSchema.call(this,t);if(n)return n;let{es5:l,lines:r}=this.opts.code,{ownProperties:i}=this.opts,s=new tt.CodeGen(this.scope,{es5:l,lines:r,ownProperties:i}),a=s.scopeName("parse"),u={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ht.default.data,parseName:a,char:s.name("c")},o;try{this._compilations.add(t),t.parseName=a,bfe(u),s.optimize(this.opts.code.optimize);let c=s.toString();o=`${s.scopeRefs(Ht.default.scope)}return ${c}`;let m=new Function(`${Ht.default.scope}`,o)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(c){throw o&&this.logger.error("Error compiling parser, function code:",o),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}Bv.default=Tj;var Lv=(0,tt._)`undefined`;function bfe(t){let{gen:e,parseName:n,char:l}=t;e.func(n,(0,tt._)`${Ht.default.json}, ${Ht.default.jsonPos}, ${Ht.default.jsonPart}`,!1,()=>{e.let(Ht.default.data),e.let(l),e.assign((0,tt._)`${n}.message`,Lv),e.assign((0,tt._)`${n}.position`,Lv),e.assign(Ht.default.jsonPos,(0,tt._)`${Ht.default.jsonPos} || 0`),e.const(Ht.default.jsonLen,(0,tt._)`${Ht.default.json}.length`),Y9(t),$v(t),e.if(Ht.default.jsonPart,()=>{e.assign((0,tt._)`${n}.position`,Ht.default.jsonPos),e.return(Ht.default.data)}),e.if((0,tt._)`${Ht.default.jsonPos} === ${Ht.default.jsonLen}`,()=>e.return(Ht.default.data)),P0(t)})}function Y9(t){let e;for(let n of hfe.jtdForms)if(n in t.schema){e=n;break}e?Sfe(t,Efe[e]):Uv(t)}var wfe=bj(!0,bj(!1,P0));function Sfe(t,e){let{gen:n,schema:l,data:r}=t;if(!l.nullable)return e(t);_5(t,"null",e,()=>n.assign(r,null))}function Tfe(t){let{gen:e,schema:n,data:l}=t;li(t,"[");let r=e.let("i",0);e.assign(l,(0,tt._)`[]`),jv(t,"]",()=>{let i=e.let("el");Y9({...t,schema:n.elements,data:i}),e.assign((0,tt._)`${l}[${r}++]`,i)})}function xfe(t){let{gen:e,schema:n,data:l}=t;li(t,"{"),e.assign(l,(0,tt._)`{}`),jv(t,"}",()=>Afe(t,n.values))}function jv(t,e,n){xj(t,e,n),li(t,e)}function xj(t,e,n){let{gen:l}=t;l.for((0,tt._)`;${Ht.default.jsonPos}<${Ht.default.jsonLen} && ${Q9(1)}!==${e};`,()=>{n(),_5(t,",",()=>l.break(),r)});function r(){_5(t,e,()=>{},P0)}}function Afe(t,e){let{gen:n}=t,l=n.let("key");Vu({...t,data:l}),li(t,":"),Oj(t,l,e)}function Ofe(t){let{gen:e,data:n,schema:l}=t,{discriminator:r,mapping:i}=l;li(t,"{"),e.assign(n,(0,tt._)`{}`);let s=e.const("pos",Ht.default.jsonPos),a=e.let("value"),u=e.let("tag");xj(t,"}",()=>{let o=e.let("key");Vu({...t,data:o}),li(t,":"),e.if((0,tt._)`${o} === ${r}`,()=>{Vu({...t,data:u}),e.assign((0,tt._)`${n}[${o}]`,u),e.break()},()=>Uv({...t,data:a}))}),e.assign(Ht.default.jsonPos,s),e.if((0,tt._)`${u} === undefined`),Zi(t,(0,tt.str)`discriminator tag not found`);for(let o in i)e.elseIf((0,tt._)`${u} === ${o}`),Aj({...t,schema:i[o]},r);e.else(),Zi(t,(0,tt.str)`discriminator value not in schema`),e.endIf()}function _j(t){let{gen:e,data:n}=t;li(t,"{"),e.assign(n,(0,tt._)`{}`),Aj(t)}function Aj(t,e){let{gen:n,schema:l,data:r}=t,{properties:i,optionalProperties:s,additionalProperties:a}=l;if(jv(t,"}",()=>{let u=n.let("key");if(Vu({...t,data:u}),li(t,":"),n.if(!1),Ej(t,u,i),Ej(t,u,s),e){n.elseIf((0,tt._)`${u} === ${e}`);let o=n.let("tag");Vu({...t,data:o})}n.else(),a?Uv({...t,data:(0,tt._)`${r}[${u}]`}):Zi(t,(0,tt.str)`property ${u} not allowed`),n.endIf()}),i){let u=(0,yfe.hasPropFunc)(n),o=(0,tt.and)(...Object.keys(i).map(c=>(0,tt._)`${u}.call(${r}, ${c})`));n.if((0,tt.not)(o),()=>Zi(t,(0,tt.str)`missing required properties`))}}function Ej(t,e,n={}){let{gen:l}=t;for(let r in n)l.elseIf((0,tt._)`${e} === ${r}`),Oj(t,e,n[r])}function Oj(t,e,n){Y9({...t,schema:n,data:(0,tt._)`${t.data}[${e}]`})}function Nfe(t){let{gen:e,schema:n,data:l,self:r}=t;switch(n.type){case"boolean":wfe(t);break;case"string":Vu(t);break;case"timestamp":{Vu(t);let i=(0,Sj.useFunc)(e,_fe.default),{allowDate:s,parseDate:a}=r.opts,u=s?(0,tt._)`!${i}(${l}, true)`:(0,tt._)`!${i}(${l})`,o=a?
Line truncated
|
||||
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function Jj(t){return t[Symbol.for("fastify.display-name")]}function Kj(t){return!!t[Symbol.for("skip-override")]}function Xj(t){let e=w5(t);if(!e)return;let n=e.dependencies;n&&(Qv(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(l=>{Qv(this[Zv].indexOf(l)>-1,`The dependency '${l}' of plugin '${e.name}' is not registered`)}))}function Wj(t){let e=w5(t);if(!e)return;let{decorators:n,name:l}=e;n&&(n.fastify&&Yv(this,"Fastify",n.fastify,l),n.reply&&Yv(this,"Reply",n.reply,l),n.request&&Yv(this,"Request",n.request,l))}var ade={Fastify:ede,Request:nde,Reply:tde};function Yv(t,e,n,l){Qv(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(r=>{let i=typeof l=="string"?` required by '${l}'`:"";if(!ade[e].call(t,r))throw new rde(r,i,e)})}function ude(t){let e=w5(t);if(!e)return;let n=e.fastify,l=/-rc.+$/.test(this.version);if(!(l===!0&&Wv.gt(this.version,Wv.coerce(n))===!0)&&n&&Wv.satisfies(this.version,n,{includePrerelease:l})===!1)throw new lde(e.name,n,this.version)}function ode(t){let e=w5(t);if(!e)return;let n=e.name;if(n)return this[Zv].push(n),n}function cde(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&ide(e||"anonymous")}function pde(t){let e=ode.call(this,t)||Gj(t);return cde.call(this,t,e),ude.call(this,t),Wj.call(this,t),Xj.call(this,t),Kj(t)}e_.exports={getPluginName:Gj,getFuncPreview:sde,kRegisteredPlugins:Zv,getDisplayName:Jj,registerPlugin:pde};e_.exports[Zfe]={shouldSkipOverride:Kj,getMeta:w5,checkDecorators:Wj,checkDependencies:Xj}});var e7=k((Uke,Yj)=>{"use strict";function fde(t,e){let n=e||hde();return t?mde(t,n):n}function dde(t,e){return t.genReqId(e)}function hde(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function mde(t,e){return function(n){return n.headers[t]||e(n)}}Yj.exports={getGenReqId:dde,reqIdGenFactory:fde}});var tU=k((Mke,eU)=>{"use strict";var Qj=12,yde=0,n_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 gde(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,l="",r=0,i=0,s=e,a=Qj;e>-1&&e<n;){var u=Zj(t[e+1],4),o=Zj(t[e+2],0),c=u|o,f=n_[c];if(a=n_[256+a+f],i=i<<6|c&n_[364+f],a===Qj)l+=t.slice(r,s),l+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,r=e+3,e=s=t.indexOf("%",r);else{if(a===yde)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return l+t.slice(r)}var vde={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 Zj(t,e){var n=vde[t];return n===void 0?255:n<<e}eU.exports=gde});var sU=k(($ke,iU)=>{"use strict";var nU=tU(),lU=/\+/g,rU=function(){};rU.prototype=Object.create(null);function _de(t){let e=new rU;if(typeof t!="string")return e;let n=t.length,l="",r="",i=-1,s=-1,a=!1,u=!1,o=!1,c=!1,f=!1,m=0;for(let d=0;d<n+1;d++)if(m=d!==n?t.charCodeAt(d):38,m===38){if(f=s>i,f||(s=d),l=t.slice(i+1,s),f||l.length>0){o&&(l=l.replace(lU," ")),a&&(l=nU(l)||l),f&&(r=t.slice(s+1,d),c&&(r=r.replace(lU," ")),u&&(r=nU(r)||r));let y=e[l];y===void 0?e[l]=r:y.pop?y.push(r):e[l]=[y,r]}r="",i=d,s=d,a=!1,u=!1,o=!1,c=!1}else m===61?s<=i?s=d:u=!0:m===43?s>i?c=!0:o=!0:m===37&&(s>i?u=!0:a=!0);return e}iU.exports=_de});var uU=k((Bke,aU)=>{var ri=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),Ede=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function bde(t){let e=t.length;if(e===0)return"";let n="",l=0,r=0;e:for(;r<e;r++){let i=t.charCodeAt(r);for(;i<128;){if(Ede[i]!==1&&(l<r&&(n+=t.slice(l,r)),l=r+1,n+=ri[i]),++r===e)break e;i=t.charCodeAt(r)}if(l<r&&(n+=t.slice(l,r)),i<2048){l=r+1,n+=ri[192|i>>6]+ri[128|i&63];continue}if(i<55296||i>=57344){l=r+1,n+=ri[224|i>>12]+ri[128|i>>6&63]+ri[128|i&63];continue}if(++r,r>=e)throw new Error("URI malformed");let s=t.charCodeAt(r)&1023;l=r+1,i=65536+((i&1023)<<10|s),n+=ri[240|i>>18]+ri[128|i>>12&63]+ri[128|i>>6&63]+ri[128|i&63]}return l===0?t:l<e?n+t.slice(l):n}aU.exports={encodeString:bde}});var pU=k((Hke,cU)=>{"use
Line truncated
|
||||
`).join(`
|
||||
`+e+o);n+=e+u+i+f+`
|
||||
`,n+=AU(s,e+o)}return n}function gde(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function OU(t){return Array.isArray(t)?t.map(e=>OU(e)):typeof t=="symbol"?t.toString():typeof t=="function"?gde(t):t}function vde(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),l={},r=e.includeMeta;Array.isArray(r)||(r=Reflect.ownKeys(n));for(let i of r){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let u=JSON.stringify(OU(a));l[s]=u}}return l}function _de(t){let e="";for(let[n,l]of Object.entries(t))e+=`
|
||||
\u2022 (${n}) ${l}`;return e}function Ede(t){let e={...t.opts.constraints},n=e[TU.name];return delete e[TU.name],{...t,method:n,opts:{constraints:e}}}function bde(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=_de(t.metaData),e}function wde(t){return t.reduce((e,n)=>{for(let l of e)if(SU(n.opts.constraints,l.opts.constraints)&&SU(n.metaData,l.metaData))return l.method+=", "+n.method,e;return e.push(n),e},[])}function Sde(t,e,n){let l=t.routes;return n.method===void 0&&(l=l.map(Ede)),l=l.map(r=>(r.metaData=vde(r,n),r)),n.method===void 0&&(l=wde(l)),l.map(bde).join(`
|
||||
${e}`)}function t7(t,e,n,l){if((t.isLeafNode||l.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[xU]=Sde(t,n,l)),n=""),t.staticChildren)for(let r of Object.values(t.staticChildren))t7(r,e,n+r.prefix,l);if(t.parametricChildren)for(let r of Object.values(t.parametricChildren)){let i=Array.from(r.nodePaths).join("|");t7(r,e,n+i,l)}t.wildcardChild&&t7(t.wildcardChild,e,"*",l)}function Tde(t,e){let n={};return t7(t,n,t.prefix,e),AU(n)}NU.exports={prettyPrintTree:Tde}});var IU=k((Mke,RU)=>{"use strict";var xde=e7(),i_=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 l=n.params,r=n.opts.constraints||{},i={params:l,constraints:r,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(l)},s=Object.keys(r);s.length===0&&(this.unconstrainedHandler=i);for(let u of s)this.constraints.includes(u)||(u==="version"?this.constraints.unshift(u):this.constraints.push(u));let a=s.includes(xde.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((u,o)=>Object.keys(u.constraints).length-Object.keys(o.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,r)}_compileCreateParamsObject(e){let n=[];for(let l=0;l<e.length;l++)n.push(`'${e[l]}': paramsArray[${l}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let l=0;l<this.handlers.length;l++){let i=this.handlers[l].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<l,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let l=0;l<this.handlers.length;l++)this.handlers[l].constraints[e]!==void 0&&(n|=1<<l);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let l of this.constraints){let r=e.newStoreForConstraint(l);this.constrainedHandlerStores[l]=r,this._buildConstraintStore(r,l)}let n=[];n.push(`
|
||||
`,n+=RU(s,e+o)}return n}function Nde(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function IU(t){return Array.isArray(t)?t.map(e=>IU(e)):typeof t=="symbol"?t.toString():typeof t=="function"?Nde(t):t}function Cde(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),l={},r=e.includeMeta;Array.isArray(r)||(r=Reflect.ownKeys(n));for(let i of r){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let u=JSON.stringify(IU(a));l[s]=u}}return l}function Rde(t){let e="";for(let[n,l]of Object.entries(t))e+=`
|
||||
\u2022 (${n}) ${l}`;return e}function Ide(t){let e={...t.opts.constraints},n=e[NU.name];return delete e[NU.name],{...t,method:n,opts:{constraints:e}}}function kde(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=Rde(t.metaData),e}function Dde(t){return t.reduce((e,n)=>{for(let l of e)if(OU(n.opts.constraints,l.opts.constraints)&&OU(n.metaData,l.metaData))return l.method+=", "+n.method,e;return e.push(n),e},[])}function Pde(t,e,n){let l=t.routes;return n.method===void 0&&(l=l.map(Ide)),l=l.map(r=>(r.metaData=Cde(r,n),r)),n.method===void 0&&(l=Dde(l)),l.map(kde).join(`
|
||||
${e}`)}function r7(t,e,n,l){if((t.isLeafNode||l.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[CU]=Pde(t,n,l)),n=""),t.staticChildren)for(let r of Object.values(t.staticChildren))r7(r,e,n+r.prefix,l);if(t.parametricChildren)for(let r of Object.values(t.parametricChildren)){let i=Array.from(r.nodePaths).join("|");r7(r,e,n+i,l)}t.wildcardChild&&r7(t.wildcardChild,e,"*",l)}function Lde(t,e){let n={};return r7(t,n,t.prefix,e),RU(n)}kU.exports={prettyPrintTree:Lde}});var LU=k((Qke,PU)=>{"use strict";var Fde=l7(),a_=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 l=n.params,r=n.opts.constraints||{},i={params:l,constraints:r,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(l)},s=Object.keys(r);s.length===0&&(this.unconstrainedHandler=i);for(let u of s)this.constraints.includes(u)||(u==="version"?this.constraints.unshift(u):this.constraints.push(u));let a=s.includes(Fde.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((u,o)=>Object.keys(u.constraints).length-Object.keys(o.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,r)}_compileCreateParamsObject(e){let n=[];for(let l=0;l<e.length;l++)n.push(`'${e[l]}': paramsArray[${l}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let l=0;l<this.handlers.length;l++){let i=this.handlers[l].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<l,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let l=0;l<this.handlers.length;l++)this.handlers[l].constraints[e]!==void 0&&(n|=1<<l);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let l of this.constraints){let r=e.newStoreForConstraint(l);this.constrainedHandlerStores[l]=r,this._buildConstraintStore(r,l)}let n=[];n.push(`
|
||||
let candidates = ${(1<<this.handlers.length)-1}
|
||||
let mask, matches
|
||||
`);for(let l of this.constraints){n.push(`
|
||||
@@ -323,62 +323,62 @@ ${e}`)}function t7(t,e,n,l){if((t.isLeafNode||l.commonPrefix!==!1)&&(n=n||"(empt
|
||||
}
|
||||
if (candidates === 0) return null;
|
||||
`)}for(let l in e.strategies)e.strategies[l].mustMatchWhenDerived&&!this.constraints.includes(l)&&n.push(`if (derivedConstraints.${l} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
|
||||
`))}};RU.exports=i_});var DU=k(($ke,kU)=>{"use strict";var Ade=IU(),a7={STATIC:0,PARAMETRIC:1,WILDCARD:2},n7=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 Ade),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},l7=class extends n7{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let l=this.staticChildren[e.charAt(n)];return l===void 0||!l.matchPrefix(e,n)?null:l}getStaticChild(e,n=0){if(e.length===n)return this;let l=this.findStaticMatchingChild(e,n);return l?l.getStaticChild(e,n+l.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let r=1;for(;r<n.prefix.length;r++)if(e.charCodeAt(r)!==n.prefix.charCodeAt(r)){n=n.split(this,r);break}return n.createStaticChild(e.slice(r))}let l=e.charAt(0);return this.staticChildren[l]=new r7(e),this.staticChildren[l]}},r7=class t extends l7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=a7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,l=this.parametricChildren.find(r=>(r.regex&&r.regex.source)===n);return l||null}createParametricChild(e,n,l){let r=this.getParametricChild(e);return r?(r.nodePaths.add(l),r):(r=new i7(e,n,l),this.parametricChildren.push(r),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),r)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new s7,this.wildcardChild}split(e,n){let l=this.prefix.slice(0,n),r=this.prefix.slice(n);this.prefix=r,this._compilePrefixMatch();let i=new t(l);return i.staticChildren[r.charAt(0)]=this,e.staticChildren[l.charAt(0)]=i,i}getNextNode(e,n,l,r){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&l.push({paramsCount:r,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)l.push({paramsCount:r,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let l=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${l}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},i7=class extends l7{constructor(e,n,l){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=a7.PARAMETRIC,this.nodePaths=new Set([l])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},s7=class extends n7{constructor(){super(),this.kind=a7.WILDCARD}getNextNode(){return null}};kU.exports={StaticNode:r7,ParametricNode:i7,WildcardNode:s7,NODE_TYPES:a7}});var LU=k((Bke,PU)=>{"use strict";var Ode=require("assert");function T5(){if(!(this instanceof T5))return new T5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}T5.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,l,r]=t.split(".");return n=Number(n)||0,l=Number(l)||0,r=Number(r)||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),l>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=l,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),r>=(this.store[`${n}.${l}`]||0)&&(this.maxPatches[`${n}.${l}`]=r,this.store[`${n}.${l}.x`]=e),this.store[`${n}.${l}.${r}`]=e,this};T5.prototype.get=function(t){return this.store[t]};PU.exports={name:"version",mustMatchWhenDerived:!0,storage:T5,validate(t){Ode(typeof t=="string","Version should be a string")}}});var jU=k((Hke,FU)=>{"use strict";var Nde=require("assert");function Cde(){let t={},e=[];return{get:n=>{let l=t[n];if(l)return l;for(let r of e)if(r.host.test(n))return r.value},set:(n,l)=>{n instanceof RegExp?e.push({host:n,value:l}):t[n]=l}}}FU.exports={name:"host",mustMatchWhenDerived:!1,storage:Cde,validate(t){Nde(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var MU=k((Vke,UU)=>{"use strict";var Rde=LU(),Ide=jU(),s_=require("assert"),a_=class{constructor(e){if(this.strategies={version:Rde,host:Ide},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(s_(typeof e.name=="string"&&e.name!=="","strategy.name is required."),s_(e.storage&&typeof e.storage=="function
Line truncated
|
||||
`)).bind(this)}};UU.exports=a_});var BU=k((qke,$U)=>{"use strict";var kde=["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"];$U.exports=kde});var qU=k((zke,VU)=>{"use strict";function HU(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 Dde(t,e){let n=!1,l=!1,r="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let u=t.charCodeAt(s+1),o=t.charCodeAt(s+2);HU(u,o)===null?n=!0:(l=!0,u===50&&o===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){r=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:r,shouldDecodeParam:l}}function Pde(t){let e=t.indexOf("%");if(e===-1)return t;let n="",l=e;for(let r=e;r<t.length;r++)if(t.charCodeAt(r)===37){let i=t.charCodeAt(r+1),s=t.charCodeAt(r+2),a=HU(i,s);n+=t.slice(l,r)+a,l=r+3}return t.slice(0,e)+n+t.slice(l)}VU.exports={safeDecodeURI:Dde,safeDecodeURIComponent:Pde}});var d_=k((Gke,YU)=>{"use strict";var Ml=require("assert"),Lde=pU(),u7=bU(),c_=s0(),{prettyPrintTree:Fde}=CU(),{StaticNode:zU,NODE_TYPES:u_}=DU(),jde=MU(),U0=BU(),o_=e7(),{safeDecodeURI:Ude,safeDecodeURIComponent:GU}=qU(),JU=/^https?:\/\/.*?\//,Vu=/(\/:[^/()]*?)\?(\/?)/;if(!u7(JU))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!u7(Vu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function bl(t){if(!(this instanceof bl))return new bl(t);t=t||{},this._opts=t,t.defaultRoute?(Ml(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Ml(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Ml(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Mde,t.querystringParser?(Ml(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Lde.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 jde(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}bl.prototype.on=function(e,n,l,r,i){typeof l=="function"&&(r!==void 0&&(i=r),r=l,l={}),Ml(typeof n=="string","Path should be a string"),Ml(n.length>0,"The path could not be empty"),Ml(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Ml(typeof r=="function","Handler should be a function");let s=n.match(Vu);if(s){Ml(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let o=n.replace(Vu,"$1$2"),c=n.replace(Vu,"$2");this.on(e,o,l,r,i),this.on(e,c,l,r,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=p_(n)),this.ignoreTrailingSlash&&(n=f_(n));let u=Array.isArray(e)?e:[e];for(let o of u)Ml(typeof o=="string","Method should be a string"),Ml(U0.includes(o),`Method '${o}' is not an http method.`),this._on(o,n,l,r,i,a)};bl.prototype._on=function(e,n,l,r,i){let s={};l.constraints!==void 0&&(Ml(typeof l.constraints=="object"&&l.constraints!==null,"Constraints should be an object"),Object.keys(l.constraints).length!==0&&(s=l.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new zU("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new zU(""),this.trees[e].staticChildren["/"]=m}let u=this.trees[e],o=u.prefix.length,c=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let d=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,y=a.charCodeAt(m)===42;if(d||y||m===a.length&&m!==o){let _=a.slice(o,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),u=u.createStaticChild(_)}if(d){let _=!1,S=[],w=m+1;for(let E=w;;E++){let g=a.charCodeAt(E),v=g===40,x=g===45||g===46,O=g===47||E===a.length;if(v||x||O){let N=a.slice(w,E);if(c.push(N),_=_||v||x,v){let F=WU(a,E),te=a.slice(E,F+1);this.allowUnsafeRegex||Ml(u7(new RegExp(te)),`The regex '${te}' is not safe!`),S.push(XU(te)),E=F+1}else S.push("(.*?)");let R=E;for(;E<a.length;E++){let F=a.charCodeAt(E);if(F===47)break;if(F===58)if(a.charCodeAt(E+1)===58)E++;else break}let U=a.slice(R,E);if(U&
Line truncated
|
||||
`))}};PU.exports=a_});var jU=k((Zke,FU)=>{"use strict";var jde=LU(),c7={STATIC:0,PARAMETRIC:1,WILDCARD:2},i7=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 jde),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},s7=class extends i7{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let l=this.staticChildren[e.charAt(n)];return l===void 0||!l.matchPrefix(e,n)?null:l}getStaticChild(e,n=0){if(e.length===n)return this;let l=this.findStaticMatchingChild(e,n);return l?l.getStaticChild(e,n+l.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let r=1;for(;r<n.prefix.length;r++)if(e.charCodeAt(r)!==n.prefix.charCodeAt(r)){n=n.split(this,r);break}return n.createStaticChild(e.slice(r))}let l=e.charAt(0);return this.staticChildren[l]=new a7(e),this.staticChildren[l]}},a7=class t extends s7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=c7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,l=this.parametricChildren.find(r=>(r.regex&&r.regex.source)===n);return l||null}createParametricChild(e,n,l){let r=this.getParametricChild(e);return r?(r.nodePaths.add(l),r):(r=new u7(e,n,l),this.parametricChildren.push(r),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),r)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new o7,this.wildcardChild}split(e,n){let l=this.prefix.slice(0,n),r=this.prefix.slice(n);this.prefix=r,this._compilePrefixMatch();let i=new t(l);return i.staticChildren[r.charAt(0)]=this,e.staticChildren[l.charAt(0)]=i,i}getNextNode(e,n,l,r){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&l.push({paramsCount:r,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)l.push({paramsCount:r,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let l=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${l}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},u7=class extends s7{constructor(e,n,l){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=c7.PARAMETRIC,this.nodePaths=new Set([l])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},o7=class extends i7{constructor(){super(),this.kind=c7.WILDCARD}getNextNode(){return null}};FU.exports={StaticNode:a7,ParametricNode:u7,WildcardNode:o7,NODE_TYPES:c7}});var MU=k((eDe,UU)=>{"use strict";var Ude=require("assert");function O5(){if(!(this instanceof O5))return new O5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}O5.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,l,r]=t.split(".");return n=Number(n)||0,l=Number(l)||0,r=Number(r)||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),l>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=l,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),r>=(this.store[`${n}.${l}`]||0)&&(this.maxPatches[`${n}.${l}`]=r,this.store[`${n}.${l}.x`]=e),this.store[`${n}.${l}.${r}`]=e,this};O5.prototype.get=function(t){return this.store[t]};UU.exports={name:"version",mustMatchWhenDerived:!0,storage:O5,validate(t){Ude(typeof t=="string","Version should be a string")}}});var BU=k((tDe,$U)=>{"use strict";var Mde=require("assert");function $de(){let t={},e=[];return{get:n=>{let l=t[n];if(l)return l;for(let r of e)if(r.host.test(n))return r.value},set:(n,l)=>{n instanceof RegExp?e.push({host:n,value:l}):t[n]=l}}}$U.exports={name:"host",mustMatchWhenDerived:!1,storage:$de,validate(t){Mde(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var VU=k((nDe,HU)=>{"use strict";var Bde=MU(),Hde=BU(),u_=require("assert"),o_=class{constructor(e){if(this.strategies={version:Bde,host:Hde},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(u_(typeof e.name=="string"&&e.name!=="","strategy.name is required."),u_(e.storage&&typeof e.storage=="function
Line truncated
|
||||
`)).bind(this)}};HU.exports=o_});var zU=k((lDe,qU)=>{"use strict";var Vde=["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"];qU.exports=Vde});var KU=k((rDe,JU)=>{"use strict";function GU(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 qde(t,e){let n=!1,l=!1,r="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let u=t.charCodeAt(s+1),o=t.charCodeAt(s+2);GU(u,o)===null?n=!0:(l=!0,u===50&&o===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){r=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:r,shouldDecodeParam:l}}function zde(t){let e=t.indexOf("%");if(e===-1)return t;let n="",l=e;for(let r=e;r<t.length;r++)if(t.charCodeAt(r)===37){let i=t.charCodeAt(r+1),s=t.charCodeAt(r+2),a=GU(i,s);n+=t.slice(l,r)+a,l=r+3}return t.slice(0,e)+n+t.slice(l)}JU.exports={safeDecodeURI:qde,safeDecodeURIComponent:zde}});var m_=k((iDe,tM)=>{"use strict";var Bl=require("assert"),Gde=mU(),p7=xU(),f_=u0(),{prettyPrintTree:Jde}=DU(),{StaticNode:XU,NODE_TYPES:c_}=jU(),Kde=VU(),$0=zU(),p_=l7(),{safeDecodeURI:Xde,safeDecodeURIComponent:WU}=KU(),YU=/^https?:\/\/.*?\//,zu=/(\/:[^/()]*?)\?(\/?)/;if(!p7(YU))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!p7(zu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function wl(t){if(!(this instanceof wl))return new wl(t);t=t||{},this._opts=t,t.defaultRoute?(Bl(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Bl(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Bl(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Wde,t.querystringParser?(Bl(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Gde.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 Kde(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}wl.prototype.on=function(e,n,l,r,i){typeof l=="function"&&(r!==void 0&&(i=r),r=l,l={}),Bl(typeof n=="string","Path should be a string"),Bl(n.length>0,"The path could not be empty"),Bl(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Bl(typeof r=="function","Handler should be a function");let s=n.match(zu);if(s){Bl(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let o=n.replace(zu,"$1$2"),c=n.replace(zu,"$2");this.on(e,o,l,r,i),this.on(e,c,l,r,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=d_(n)),this.ignoreTrailingSlash&&(n=h_(n));let u=Array.isArray(e)?e:[e];for(let o of u)Bl(typeof o=="string","Method should be a string"),Bl($0.includes(o),`Method '${o}' is not an http method.`),this._on(o,n,l,r,i,a)};wl.prototype._on=function(e,n,l,r,i){let s={};l.constraints!==void 0&&(Bl(typeof l.constraints=="object"&&l.constraints!==null,"Constraints should be an object"),Object.keys(l.constraints).length!==0&&(s=l.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new XU("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new XU(""),this.trees[e].staticChildren["/"]=m}let u=this.trees[e],o=u.prefix.length,c=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let d=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,y=a.charCodeAt(m)===42;if(d||y||m===a.length&&m!==o){let _=a.slice(o,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),u=u.createStaticChild(_)}if(d){let _=!1,S=[],w=m+1;for(let E=w;;E++){let g=a.charCodeAt(E),v=g===40,x=g===45||g===46,O=g===47||E===a.length;if(v||x||O){let N=a.slice(w,E);if(c.push(N),_=_||v||x,v){let F=eM(a,E),te=a.slice(E,F+1);this.allowUnsafeRegex||Bl(p7(new RegExp(te)),`The regex '${te}' is not safe!`),S.push(ZU(te)),E=F+1}else S.push("(.*?)");let R=E;for(;E<a.length;E++){let F=a.charCodeAt(E);if(F===47)break;if(F===58)if(a.charCodeAt(E+1)===58)E++;else break}let U=a.slice(R,E);if(U&
Line truncated
|
||||
Content-Length: ${Te.length}\r
|
||||
Content-Type: application/json\r
|
||||
\r
|
||||
${Te}`),ve.destroy(re)}function me(re,ve){re.headers["accept-version"]!==void 0&&(re.headers[xme]=re.headers["accept-version"],re.headers["accept-version"]=void 0),d.router.lookup(re,ve)}function P(re,ve,Te){if(a){let dt=o$(F.server,ve),Le=a$(F,u,ve,dt),Lt=new _7(dt,null,ve,null,Le,F),Sl=new L5(Te,Lt,Le);return i===!1&&Le.info({req:Lt},"incoming request"),a(new zme(re),Lt,Sl)}let Xe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${re}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Xe.length}),Te.end(Xe)}function G(re,ve,Te){if(re!==!1)return function(dt){if(dt){if(a){let Lt=o$(F.server,ve),Sl=a$(F,u,ve,Lt),Ft=new _7(Lt,null,ve,null,Sl,F),en=new L5(Te,Ft,Sl);return i===!1&&Sl.info({req:Ft},"incoming request"),a(new qme,Ft,en)}let Le='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Le.length}),Te.end(Le)}}}function V(re,ve){return te('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,re,ve,U,m.routeHandler),this}function q(re){return te('Cannot call "setValidatorCompiler"!'),this[Us].setValidatorCompiler(re),this}function el(re){return te('Cannot call "setSchemaErrorFormatter"!'),h$(re),this[j_]=re.bind(this),this}function Tt(re){return te('Cannot call "setSerializerCompiler"!'),this[Us].setSerializerCompiler(re),this}function Qe(re){te('Cannot call "setSchemaController"!');let ve=this[Us],Te=i$.buildSchemaController(ve,Object.assign({},ve.opts,re));return this[Us]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function ft(re){return te('Cannot call "setReplySerializer"!'),this[r$]=re,this}function ze(re){return te('Cannot call "setErrorHandler"!'),this[v7]=d$(this[v7],re.bind(this)),this}function $e(re){return te('Cannot call "setChildLoggerFactory"!'),this[M_]=re,this}function $t(re={}){return re.includeMeta=re.includeHooks?re.includeMeta?B_.concat(re.includeMeta):B_:re.includeMeta,m.printRoutes(re)}function vt(re,{rewriteUrl:ve,logger:Te}){let Xe;return function(Le,Lt){if(Xe===void 0&&(Xe=re.isAsyncConstraint()),ve){Le.originalUrl=Le.url;let Sl=ve.call(N,Le);if(typeof Sl=="string")Le.url=Sl;else{let Ft=new tye(Le.url,typeof Sl);Le.destroy(Ft)}}re.routing(Le,Lt,G(Xe,Le,Lt))}}function Et(re){return te('Cannot call "setGenReqId"!'),this[$_]=c$(this[F_].requestIdHeader,re),this}}E7.errorCodes=zu;function h$(t){if(typeof t!="function")throw new f$(typeof t);if(t.constructor.name==="AsyncFunction")throw new f$("AsyncFunction")}b7.exports=E7;b7.exports.fastify=E7;b7.exports.default=E7});var Bq=k((XPe,$q)=>{"use strict";$q.exports=Error});var Vq=k((WPe,Hq)=>{"use strict";Hq.exports=EvalError});var zq=k((YPe,qq)=>{"use strict";qq.exports=RangeError});var Jq=k((QPe,Gq)=>{"use strict";Gq.exports=ReferenceError});var kb=k((ZPe,Kq)=>{"use strict";Kq.exports=SyntaxError});var w4=k((eLe,Xq)=>{"use strict";Xq.exports=TypeError});var Yq=k((tLe,Wq)=>{"use strict";Wq.exports=URIError});var Zq=k((nLe,Qq)=>{"use strict";Qq.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),l=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var r=42;e[n]=r;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==r||s.enumerable!==!0)return!1}return!0}});var nz=k((lLe,tz)=>{"use strict";var ez=typeof Symbol<"u"&&Symbol,tbe=Zq();tz.exports=function(){return typeof ez!="function"||typeof Symbol!="function"||typeof ez("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:tbe()}});var rz=k((rLe,lz)=>{"use strict";var Db={__proto__:null,foo:{}},nbe=Object;lz.exports=function(){return{__proto__:Db}.foo===Db.foo&&!(Db instanceof nbe)}});var az=k((iLe,sz)=>{"use strict";var lbe="Function.prototype.bind called on incompatible ",rbe=Object.prototype.toString,ibe=Math.max,sbe="[object Function]",iz=function(e,n){for(var l=[],r=0;r<e.length;r+=1)l[r]=e[r];for(var i=0;i<n.length;i+=1)l[i+e.length]=n[i];return l},abe=function(e,n){for(var l=[],r=n||0,i=0;r<e.length;r+=1,i+=1)l[i]=e[r];return l},ube=function(t,e){for(var n="",l=0;l<t.length;l+=1)n+=t[l],l+1<t.length&&(n+=e);return n};sz.exports=function(e){var n=this;if(typeof n!="function"||rbe.apply(n)!==sbe)throw new TypeError(lbe+n);for(var l=abe(arguments,1),r,i=function(){if(this instanceof r){var c=n.apply(this,iz(l,arguments));return Object(c)===c?c:this}return n.apply(e,
Line truncated
|
||||
`)>=0)return!1;return!0}function pwe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=mi.call(Array(t.indent+1)," ");else return null;return{base:n,prev:mi.call(Array(e+1),n)}}function Jb(t,e){if(t.length===0)return"";var n=`
|
||||
`+e.prev+e.base;return n+mi.call(t,","+n)+`
|
||||
`+e.prev}function tf(t,e){var n=Gb(t),l=[];if(n){l.length=t.length;for(var r=0;r<t.length;r++)l[r]=na(t,r)?e(t[r],t):""}var i=typeof Bb=="function"?Bb(t):[],s;if(N4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var u in t)na(t,u)&&(n&&String(Number(u))===u&&u<t.length||N4&&s["$"+u]instanceof Symbol||(eG.call(/[^\w$]/,u)?l.push(e(u,t)+": "+e(t[u],t)):l.push(u+": "+e(t[u],t))));if(typeof Bb=="function")for(var o=0;o<i.length;o++)tG.call(t,i[o])&&l.push("["+e(i[o])+"]: "+e(t[i[o]],t));return l}});var cG=k((vLe,oG)=>{"use strict";var uG=ho(),C4=Mz(),fwe=aG(),dwe=w4(),rf=uG("%WeakMap%",!0),sf=uG("%Map%",!0),hwe=C4("WeakMap.prototype.get",!0),mwe=C4("WeakMap.prototype.set",!0),ywe=C4("WeakMap.prototype.has",!0),gwe=C4("Map.prototype.get",!0),vwe=C4("Map.prototype.set",!0),_we=C4("Map.prototype.has",!0),Yb=function(t,e){for(var n=t,l;(l=n.next)!==null;n=l)if(l.key===e)return n.next=l.next,l.next=t.next,t.next=l,l},Ewe=function(t,e){var n=Yb(t,e);return n&&n.value},bwe=function(t,e,n){var l=Yb(t,e);l?l.value=n:t.next={key:e,next:t.next,value:n}},wwe=function(t,e){return!!Yb(t,e)};oG.exports=function(){var e,n,l,r={assert:function(i){if(!r.has(i))throw new dwe("Side channel does not contain "+fwe(i))},get:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return hwe(e,i)}else if(sf){if(n)return gwe(n,i)}else if(l)return Ewe(l,i)},has:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return ywe(e,i)}else if(sf){if(n)return _we(n,i)}else if(l)return wwe(l,i);return!1},set:function(i,s){rf&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new rf),mwe(e,i,s)):sf?(n||(n=new sf),vwe(n,i,s)):(l||(l={key:{},next:null}),bwe(l,i,s))}};return r}});var af=k((_Le,pG)=>{"use strict";var Swe=String.prototype.replace,Twe=/%20/g,Qb={RFC1738:"RFC1738",RFC3986:"RFC3986"};pG.exports={default:Qb.RFC3986,formatters:{RFC1738:function(t){return Swe.call(t,Twe,"+")},RFC3986:function(t){return String(t)}},RFC1738:Qb.RFC1738,RFC3986:Qb.RFC3986}});var tw=k((ELe,dG)=>{"use strict";var xwe=af(),Zb=Object.prototype.hasOwnProperty,mo=Array.isArray,yi=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Awe=function(e){for(;e.length>1;){var n=e.pop(),l=n.obj[n.prop];if(mo(l)){for(var r=[],i=0;i<l.length;++i)typeof l[i]<"u"&&r.push(l[i]);n.obj[n.prop]=r}}},fG=function(e,n){for(var l=n&&n.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(l[r]=e[r]);return l},Owe=function t(e,n,l){if(!n)return e;if(typeof n!="object"){if(mo(e))e.push(n);else if(e&&typeof e=="object")(l&&(l.plainObjects||l.allowPrototypes)||!Zb.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var r=e;return mo(e)&&!mo(n)&&(r=fG(e,l)),mo(e)&&mo(n)?(n.forEach(function(i,s){if(Zb.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,l):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return Zb.call(i,s)?i[s]=t(i[s],a,l):i[s]=a,i},r)},Nwe=function(e,n){return Object.keys(n).reduce(function(l,r){return l[r]=n[r],l},e)},Cwe=function(t,e,n){var l=t.replace(/\+/g," ");if(n==="iso-8859-1")return l.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(l)}catch{return l}},ew=1024,Rwe=function(e,n,l,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),l==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",u=0;u<s.length;u+=ew){for(var o=s.length>=ew?s.slice(u,u+ew):s,c=[],f=0;f<o.length;++f){var m=o.charCodeAt(f);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===xwe.RFC1738&&(m===40||m===41)){c[c.length]=o.charAt(f);continue}if(m<128){c[c.length]=yi[m];continue}if(m<2048){c[c.length]=yi[192|m>>6]+yi[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=yi[224|m>>12]+yi[128|m>>6&63]+yi[128|m&63];continue}f+=1,m=65536+((m&1023)<<10|o.charCodeAt(f)&1023),c[c.length]=yi[240|m>>18]+yi[128|m>>12&63]+yi[128|m>>6&63]+yi[128|m&63]}a+=c.join("")}return a},Iwe=function(e){for(var n=[{obj:{o:e},prop:"o"}],l=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var o=a[u],c=s[o];typeof c=="object"&&c!==null&&l.indexOf(c)===-1&&(n.push({obj:s,prop:o}),l.push(c))}return Awe(n),e},kwe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Dwe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pwe=function(e,n){return[].concat(e,n)},Lwe=function(e,n){if(mo(e)){for(var l=[],r=0;r<e.length;r+=1)l.push(n(e[r]));return l}return n(e)};dG.exports={arrayToObject:fG,assign:Nwe,combine:Pwe,compact:Iwe,decode:Cwe,encode:Rwe,isBuffer:Dwe,isRegExp:kwe,maybeMap:Lwe,merge:Owe}});var _G=k((bLe,vG)=>{"use strict";var mG=cG(),uf=tw(),D6=af(),Fwe=Object.prototype.hasOwnProperty,yG={brack
Line truncated
|
||||
`;an.DEFAULT_CONTENT_TYPE="application/octet-stream";an.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var l=yw.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),hJ.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,n),i=this._multiPartFooter();l(r),l(e),l(i),this._trackLength(r,e,n)};an.prototype._trackLength=function(t,e,n){var l=0;n.knownLength!=null?l+=+n.knownLength:Buffer.isBuffer(e)?l=e.length:typeof e=="string"&&(l=Buffer.byteLength(e)),this._valueLength+=l,this._overheadLength+=Buffer.byteLength(t)+an.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof dTe))&&(n.knownLength||this._valuesToMeasure.push(e))};an.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)):fTe.stat(t.path,function(n,l){var r;if(n){e(n);return}r=l.size-(t.start?t.start:0),e(null,r)}):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")};an.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var l=this._getContentDisposition(e,n),r=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(l||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&mw(s,n.header);var a;for(var u in s)s.hasOwnProperty(u)&&(a=s[u],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=u+": "+a.join("; ")+an.LINE_BREAK)));return"--"+this.getBoundary()+an.LINE_BREAK+i+an.LINE_BREAK};an.prototype._getContentDisposition=function(t,e){var n,l;return typeof e.filepath=="string"?n=dw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=dw.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=dw.basename(t.client._httpMessage.path||"")),n&&(l='filename="'+n+'"'),l};an.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=hw.lookup(t.name)),!n&&t.path&&(n=hw.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=hw.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=an.DEFAULT_CONTENT_TYPE),n};an.prototype._multiPartFooter=function(){return function(t){var e=an.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};an.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+an.LINE_BREAK};an.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};an.prototype.setBoundary=function(t){this._boundary=t};an.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};an.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,l=this._streams.length;n<l;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(an.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};an.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};an.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};an.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};an.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}hTe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,l){if(n){t(n);return}l.forEach(function(r){e+=r}),t(null,e)})};an.prototype.submit=function(t,e){var n,l,r={method:"post"};return typeof t=="string"?(t=pTe(t),l=mw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(l=mw(t,r),l.port||(l.port=l.protocol=="https:"?443:80)),l.headers=this.getHeaders(t.headers),l.protocol=="https:"?n=cTe.request(l):n=oTe.request(l),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,u=function(o,c){return n.removeListener("error",u),n.removeListener("response",a),e.call(this,o,c)};a=u.bind(this,null),n.on("error",u),n.on("response",a)}}.bind(this)),n};an.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error"
Line truncated
|
||||
`,f.message,f.stack);var m=new Error("tunneling socket could not be established, cause="+f.message);m.code="ECONNRESET",e.request.emit("error",m),l.removeSocket(r)}};ss.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var l=this.requests.shift();l&&this.createSocket(l,function(r){l.request.onSocket(r)})}};function _K(t,e){var n=this;ss.prototype.createSocket.call(n,t,function(l){var r=t.request.getHeader("host"),i=Yw({},n.options,{socket:l,servername:r?r.replace(/:.*$/,""):t.host}),s=fxe.connect(0,i);n.sockets[n.sockets.indexOf(l)]=s,e(s)})}function EK(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Yw(t){for(var e=1,n=arguments.length;e<n;++e){var l=arguments[e];if(typeof l=="object")for(var r=Object.keys(l),i=0,s=r.length;i<s;++i){var a=r[i];l[a]!==void 0&&(t[a]=l[a])}}return t}var oa;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?oa=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)}:oa=function(){};M4.debug=oa});var SK=k((dMe,wK)=>{wK.exports=bK()});var PZ=k(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.removeTrailingChar=So.merge=void 0;var JOe=(...t)=>{let e={};return t.forEach(function(n){var l;for(l in n)l in e&&e[l]===null?e[l]=n[l]:l in e&&Array.isArray(e[l])?e[l]=e[l].concat(n[l]):l in e&&typeof e[l]=="object"?e[l]=(0,So.merge)(e[l],n[l]):e[l]=n[l]}),e};So.merge=JOe;var KOe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;So.removeTrailingChar=KOe});var B4=k(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.DataError=Za.DatabaseError=Za.NestedError=void 0;var Q6=class extends Error{inner;id;constructor(e,n,l){super(e),this.inner=l,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
|
||||
`+this.inner:e}};Za.NestedError=Q6;var xT=class extends Q6{};Za.DatabaseError=xT;var AT=class extends Q6{};Za.DataError=AT});var IT=k(u3=>{"use strict";Object.defineProperty(u3,"__esModule",{value:!0});u3.getArrayIndicies=u3.validateArrayIndex=u3.validateArrayIndicies=u3.isInt=u3.ArrayInfo=u3.arrayRegex=void 0;var Cf=B4(),XOe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;u3.arrayRegex=XOe;var OT={},NT=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let l=n[0]??0;if(this.append=l===""||n[n.length-1]==="",this.indicies=n,CT(l))this.index=parseInt(l);else if(!this.append)throw new Cf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(OT[e])return OT[e];let l=(0,u3.arrayRegex)().exec(e.trim());if(l!=null){let r=l[1],i="["+l[2].toString()+"]",s=RT(i);return LZ(s),OT[e]=new t(r,s)}return null}getIndex(e,n){if(this.append)return-1;let l=this.index;if(l==-1){let r=n?e:e[this.property];return r.length===0?0:r.length-1}return l}getData(e){if(this.append)throw new Cf.DataError("Can't get data when appending",100);let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);return l[n]}setData(e,n){if(this.append){let l=e[this.property];this.indicies.forEach(r=>{r!==""&&(r=+r,r===-1&&(r=l.length-1),l=l[+r])}),l.push(n)}else{let{index:l,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);l===-1?r.push(n):r[l]=n}}delete(e){if(this.append)throw new Cf.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);l.splice(n,1)}isValid(e){let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);return l.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,l=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let r=0;r<this.indicies.length-1;r++){let i=+this.indicies[r];i===-1&&(i=l.length-1),l=l[i]}n===-1&&(n=l.length-1)}return{index:n,dataForProperty:l}}isMultiDimensional(){return this.indicies.length>1}};u3.ArrayInfo=NT;function CT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}u3.isInt=CT;function LZ(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")}u3.validateArrayIndicies=LZ;function FZ(t){if(t.length!==0&&!CT(t))throw new Cf.DataError("Only numerical values accepted for array index",200)}u3.validateArrayIndex=FZ;function RT(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));FZ(e);let n=e.length+2;return[e,...RT(t.substring(n))]}u3.getArrayIndicies=RT});var MZ=k(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.DBParentData=void 0;var jZ=IT(),UZ=B4(),kT=class{parent;data;db;dataPath;constructor(e,n,l,r){this.parent=r,this.data=e,this.db=n,this.dataPath=l}checkArray(e=!1){let n=jZ.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new UZ.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=jZ.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 UZ.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]}};Rf.DBParentData=kT});var BZ=k(($ze,$Z)=>{$Z.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var u;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new t),u=r[i]):(a=s,s=i,u=l),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,u.readers--,u.queue.length&&u.queue[0]())}}();if(u.readers<0||u.queue.length){var f=!1;if(u.queue.push(function(){!f&&u.readers>=0&&(f=!0,u.queue.shift(),u.readers++,s.call(o,c),u.queue.length&&u.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){f||(f=!0,u.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else u.readers++,s.call(a.scope,c)}function n(i,s,a){var u;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new t),u=r[i]):(a=s,s=i,u=l),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,u.readers=0,u.queue.length&&u.queue[0]())}}();if(u.readers||u.queue.length){var f=!1;if(u.queue.push(function(){f||
Line truncated
|
||||
`:t(e.children):$7(e)?t(e.children):fi(e)?e.data:""},textContent:s4,innerText:V7,getChildren:ep,getParent:$B,getSiblings:BB,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:$E,prevElementSibling:BE,removeElement:Ku,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var l=e.next=t.next;if(l&&(l.prev=e),l=e.parent=t.parent){let r=l.children;r[r.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){Ku(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){Ku(e);var n=t.parent,l=t.next;if(e.next=l,((e.prev=t).next=e).parent=n,l){if(l.prev=e,n){let r=n.children;r.splice(r.lastIndexOf(l),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){Ku(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){Ku(e);var n,l=t.parent;l&&(n=l.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=l,e.prev=t.prev,(e.next=t).prev=e},filter:R7,find:HE,findOneChild:function(t,e){return e.find(t)},findOne:fE,existsOne:function t(e,n){return n.some(l=>gt(l)&&(e(l)||t(e,l.children)))},findAll:function(t,e){for(var n=[],l=[e],r=[0];;)if(r[0]>=l[0].length){if(l.length===1)return n;l.shift(),r.shift()}else{let i=l[0][r[0]++];gt(i)&&(t(i)&&n.push(i),0<i.children.length)&&(r.unshift(0),l.unshift(i.children))}},testElement:function(t,e){return!(t=S$(t))||t(e)},getElements:function(t,e,n,l=1/0){return(t=S$(t))?R7(t,e,n,l):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),fE(HB("id",t),e,n)},getElementsByTagName:e4,getElementsByTagType:function(t,e,n=!0,l=1/0){return R7(q7.tag_type(t),e,n,l)},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 l=n.parent;l;l=l.parent)if(t.includes(l)){t.splice(e,1);break}}return t},get DocumentPosition(){return ir},compareDocumentPosition:VB,uniqueSort:a4,getFeed:function(t){return(t=w7(Nye,t))?(t.name==="feed"?function(e){var n={type:"atom",items:e4("entry",e=e.children).map(r=>{var i={media:T$(r=r.children)},s=(E3(i,"id","id",r),E3(i,"title","title",r),(s=w7("link",r))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=Ms("summary",r)||Ms("content",r))&&(i.description=s),(s=Ms("updated",r))&&(i.pubDate=new Date(s)),i})},l=(E3(n,"id","id",e),E3(n,"title","title",e),(l=w7("link",e))==null?void 0:l.attribs.href);return l&&(n.link=l),E3(n,"description","subtitle",e),(l=Ms("updated",e))&&(n.updated=new Date(l)),E3(n,"author","email",e,!0),n}:function(l){var n=(n=(n=w7("channel",l.children))==null?void 0:n.children)!=null?n:[],l={type:l.name.substr(0,3),id:"",items:e4("item",l.children).map(i=>{var s={media:T$(i=i.children)};return E3(s,"id","guid",i),E3(s,"title","title",i),E3(s,"link","link",i),E3(s,"description","description",i),(i=Ms("pubDate",i)||Ms("dc:date",i))&&(s.pubDate=new Date(i)),s})},r=(E3(l,"title","title",n),E3(l,"link","link",n),E3(l,"description","description",n),Ms("lastBuildDate",n));return r&&(l.updated=new Date(r)),E3(l,"author","managingEditor",n,!0),l})(t):null}}),t4=function(){return(t4=Object.assign||function(t){for(var e,n=1,l=arguments.length;n<l;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function qB(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function Cye(t,e){return qB(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,t4(t4(t4({},ME),this==null?void 0:this._options),oE(e??{})))}function Rye(t){return qB(this,t,t4(t4({},this._options),{xmlMode:!0}))}function u6(t){for(var e=t||(this?this.root():[]),n="",l=0;l<e.length;l++)n+=s4(e[l]);return n}function Iye(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,ME,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function kye(){return this(this._root)}function zB(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function Dye(t,e){if(x$(t)&&x$(e)){for(var n=t.length,l=+e.length,r=0;r<l;r++)t[n++]=e[r];return t.length=n,t}}function x$(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Xu,Pye=Object.freeze({__proto__:null,html:Cye,xml:Rye,text:u6,parseHTML:Iye,root:kye,contains:zB,merge:Dye});function pi(t){return t.cheerio!=null}function Cl(t,e){for(var n=t.length,l=0;l<n;l++)e(t[l],l);return t}function V_(e){var e="length"in e?Array.prototype.map.call(e,function(l){return B7(l,!0)}):[B7(e,!0)],n=new ls(e);return e.forEach(function(l){l.parent=n}),e}function dE(t){var e,
Line truncated
|
||||
${Te}`),ve.destroy(re)}function me(re,ve){re.headers["accept-version"]!==void 0&&(re.headers[Fme]=re.headers["accept-version"],re.headers["accept-version"]=void 0),d.router.lookup(re,ve)}function P(re,ve,Te){if(a){let dt=d$(F.server,ve),Le=p$(F,u,ve,dt),Lt=new w7(dt,null,ve,null,Le,F),xl=new U5(Te,Lt,Le);return i===!1&&Le.info({req:Lt},"incoming request"),a(new nye(re),Lt,xl)}let Xe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${re}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Xe.length}),Te.end(Xe)}function G(re,ve,Te){if(re!==!1)return function(dt){if(dt){if(a){let Lt=d$(F.server,ve),xl=p$(F,u,ve,Lt),Ft=new w7(Lt,null,ve,null,xl,F),tn=new U5(Te,Ft,xl);return i===!1&&xl.info({req:Ft},"incoming request"),a(new tye,Ft,tn)}let Le='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Le.length}),Te.end(Le)}}}function V(re,ve){return te('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,re,ve,U,m.routeHandler),this}function q(re){return te('Cannot call "setValidatorCompiler"!'),this[$s].setValidatorCompiler(re),this}function tl(re){return te('Cannot call "setSchemaErrorFormatter"!'),v$(re),this[M_]=re.bind(this),this}function Tt(re){return te('Cannot call "setSerializerCompiler"!'),this[$s].setSerializerCompiler(re),this}function Qe(re){te('Cannot call "setSchemaController"!');let ve=this[$s],Te=o$.buildSchemaController(ve,Object.assign({},ve.opts,re));return this[$s]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function ft(re){return te('Cannot call "setReplySerializer"!'),this[u$]=re,this}function ze(re){return te('Cannot call "setErrorHandler"!'),this[b7]=g$(this[b7],re.bind(this)),this}function $e(re){return te('Cannot call "setChildLoggerFactory"!'),this[B_]=re,this}function $t(re={}){return re.includeMeta=re.includeHooks?re.includeMeta?V_.concat(re.includeMeta):V_:re.includeMeta,m.printRoutes(re)}function vt(re,{rewriteUrl:ve,logger:Te}){let Xe;return function(Le,Lt){if(Xe===void 0&&(Xe=re.isAsyncConstraint()),ve){Le.originalUrl=Le.url;let xl=ve.call(N,Le);if(typeof xl=="string")Le.url=xl;else{let Ft=new fye(Le.url,typeof xl);Le.destroy(Ft)}}re.routing(Le,Lt,G(Xe,Le,Lt))}}function Et(re){return te('Cannot call "setGenReqId"!'),this[H_]=h$(this[U_].requestIdHeader,re),this}}S7.errorCodes=Ju;function v$(t){if(typeof t!="function")throw new y$(typeof t);if(t.constructor.name==="AsyncFunction")throw new y$("AsyncFunction")}T7.exports=S7;T7.exports.fastify=S7;T7.exports.default=S7});var zq=k((uLe,qq)=>{"use strict";qq.exports=Error});var Jq=k((oLe,Gq)=>{"use strict";Gq.exports=EvalError});var Xq=k((cLe,Kq)=>{"use strict";Kq.exports=RangeError});var Yq=k((pLe,Wq)=>{"use strict";Wq.exports=ReferenceError});var Pb=k((fLe,Qq)=>{"use strict";Qq.exports=SyntaxError});var x4=k((dLe,Zq)=>{"use strict";Zq.exports=TypeError});var tz=k((hLe,ez)=>{"use strict";ez.exports=URIError});var lz=k((mLe,nz)=>{"use strict";nz.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),l=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var r=42;e[n]=r;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==r||s.enumerable!==!0)return!1}return!0}});var sz=k((yLe,iz)=>{"use strict";var rz=typeof Symbol<"u"&&Symbol,fbe=lz();iz.exports=function(){return typeof rz!="function"||typeof Symbol!="function"||typeof rz("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:fbe()}});var uz=k((gLe,az)=>{"use strict";var Lb={__proto__:null,foo:{}},dbe=Object;az.exports=function(){return{__proto__:Lb}.foo===Lb.foo&&!(Lb instanceof dbe)}});var pz=k((vLe,cz)=>{"use strict";var hbe="Function.prototype.bind called on incompatible ",mbe=Object.prototype.toString,ybe=Math.max,gbe="[object Function]",oz=function(e,n){for(var l=[],r=0;r<e.length;r+=1)l[r]=e[r];for(var i=0;i<n.length;i+=1)l[i+e.length]=n[i];return l},vbe=function(e,n){for(var l=[],r=n||0,i=0;r<e.length;r+=1,i+=1)l[i]=e[r];return l},_be=function(t,e){for(var n="",l=0;l<t.length;l+=1)n+=t[l],l+1<t.length&&(n+=e);return n};cz.exports=function(e){var n=this;if(typeof n!="function"||mbe.apply(n)!==gbe)throw new TypeError(hbe+n);for(var l=vbe(arguments,1),r,i=function(){if(this instanceof r){var c=n.apply(this,oz(l,arguments));return Object(c)===c?c:this}return n.apply(e,
Line truncated
|
||||
`)>=0)return!1;return!0}function wwe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=yi.call(Array(t.indent+1)," ");else return null;return{base:n,prev:yi.call(Array(e+1),n)}}function Xb(t,e){if(t.length===0)return"";var n=`
|
||||
`+e.prev+e.base;return n+yi.call(t,","+n)+`
|
||||
`+e.prev}function lf(t,e){var n=Kb(t),l=[];if(n){l.length=t.length;for(var r=0;r<t.length;r++)l[r]=ra(t,r)?e(t[r],t):""}var i=typeof Vb=="function"?Vb(t):[],s;if(I4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var u in t)ra(t,u)&&(n&&String(Number(u))===u&&u<t.length||I4&&s["$"+u]instanceof Symbol||(rG.call(/[^\w$]/,u)?l.push(e(u,t)+": "+e(t[u],t)):l.push(u+": "+e(t[u],t))));if(typeof Vb=="function")for(var o=0;o<i.length;o++)iG.call(t,i[o])&&l.push("["+e(i[o])+"]: "+e(t[i[o]],t));return l}});var hG=k((ILe,dG)=>{"use strict";var fG=yo(),k4=Vz(),Swe=pG(),Twe=x4(),af=fG("%WeakMap%",!0),uf=fG("%Map%",!0),xwe=k4("WeakMap.prototype.get",!0),Awe=k4("WeakMap.prototype.set",!0),Owe=k4("WeakMap.prototype.has",!0),Nwe=k4("Map.prototype.get",!0),Cwe=k4("Map.prototype.set",!0),Rwe=k4("Map.prototype.has",!0),Zb=function(t,e){for(var n=t,l;(l=n.next)!==null;n=l)if(l.key===e)return n.next=l.next,l.next=t.next,t.next=l,l},Iwe=function(t,e){var n=Zb(t,e);return n&&n.value},kwe=function(t,e,n){var l=Zb(t,e);l?l.value=n:t.next={key:e,next:t.next,value:n}},Dwe=function(t,e){return!!Zb(t,e)};dG.exports=function(){var e,n,l,r={assert:function(i){if(!r.has(i))throw new Twe("Side channel does not contain "+Swe(i))},get:function(i){if(af&&i&&(typeof i=="object"||typeof i=="function")){if(e)return xwe(e,i)}else if(uf){if(n)return Nwe(n,i)}else if(l)return Iwe(l,i)},has:function(i){if(af&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Owe(e,i)}else if(uf){if(n)return Rwe(n,i)}else if(l)return Dwe(l,i);return!1},set:function(i,s){af&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new af),Awe(e,i,s)):uf?(n||(n=new uf),Cwe(n,i,s)):(l||(l={key:{},next:null}),kwe(l,i,s))}};return r}});var of=k((kLe,mG)=>{"use strict";var Pwe=String.prototype.replace,Lwe=/%20/g,ew={RFC1738:"RFC1738",RFC3986:"RFC3986"};mG.exports={default:ew.RFC3986,formatters:{RFC1738:function(t){return Pwe.call(t,Lwe,"+")},RFC3986:function(t){return String(t)}},RFC1738:ew.RFC1738,RFC3986:ew.RFC3986}});var lw=k((DLe,gG)=>{"use strict";var Fwe=of(),tw=Object.prototype.hasOwnProperty,go=Array.isArray,gi=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),jwe=function(e){for(;e.length>1;){var n=e.pop(),l=n.obj[n.prop];if(go(l)){for(var r=[],i=0;i<l.length;++i)typeof l[i]<"u"&&r.push(l[i]);n.obj[n.prop]=r}}},yG=function(e,n){for(var l=n&&n.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(l[r]=e[r]);return l},Uwe=function t(e,n,l){if(!n)return e;if(typeof n!="object"){if(go(e))e.push(n);else if(e&&typeof e=="object")(l&&(l.plainObjects||l.allowPrototypes)||!tw.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var r=e;return go(e)&&!go(n)&&(r=yG(e,l)),go(e)&&go(n)?(n.forEach(function(i,s){if(tw.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,l):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return tw.call(i,s)?i[s]=t(i[s],a,l):i[s]=a,i},r)},Mwe=function(e,n){return Object.keys(n).reduce(function(l,r){return l[r]=n[r],l},e)},$we=function(t,e,n){var l=t.replace(/\+/g," ");if(n==="iso-8859-1")return l.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(l)}catch{return l}},nw=1024,Bwe=function(e,n,l,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),l==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",u=0;u<s.length;u+=nw){for(var o=s.length>=nw?s.slice(u,u+nw):s,c=[],f=0;f<o.length;++f){var m=o.charCodeAt(f);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===Fwe.RFC1738&&(m===40||m===41)){c[c.length]=o.charAt(f);continue}if(m<128){c[c.length]=gi[m];continue}if(m<2048){c[c.length]=gi[192|m>>6]+gi[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=gi[224|m>>12]+gi[128|m>>6&63]+gi[128|m&63];continue}f+=1,m=65536+((m&1023)<<10|o.charCodeAt(f)&1023),c[c.length]=gi[240|m>>18]+gi[128|m>>12&63]+gi[128|m>>6&63]+gi[128|m&63]}a+=c.join("")}return a},Hwe=function(e){for(var n=[{obj:{o:e},prop:"o"}],l=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var o=a[u],c=s[o];typeof c=="object"&&c!==null&&l.indexOf(c)===-1&&(n.push({obj:s,prop:o}),l.push(c))}return jwe(n),e},Vwe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},qwe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},zwe=function(e,n){return[].concat(e,n)},Gwe=function(e,n){if(go(e)){for(var l=[],r=0;r<e.length;r+=1)l.push(n(e[r]));return l}return n(e)};gG.exports={arrayToObject:yG,assign:Mwe,combine:zwe,compact:Hwe,decode:$we,encode:Bwe,isBuffer:qwe,isRegExp:Vwe,maybeMap:Gwe,merge:Uwe}});var SG=k((PLe,wG)=>{"use strict";var _G=hG(),cf=lw(),F6=of(),Jwe=Object.prototype.hasOwnProperty,EG={brack
Line truncated
|
||||
`;an.DEFAULT_CONTENT_TYPE="application/octet-stream";an.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var l=vw.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),vJ.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,n),i=this._multiPartFooter();l(r),l(e),l(i),this._trackLength(r,e,n)};an.prototype._trackLength=function(t,e,n){var l=0;n.knownLength!=null?l+=+n.knownLength:Buffer.isBuffer(e)?l=e.length:typeof e=="string"&&(l=Buffer.byteLength(e)),this._valueLength+=l,this._overheadLength+=Buffer.byteLength(t)+an.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof TTe))&&(n.knownLength||this._valuesToMeasure.push(e))};an.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)):STe.stat(t.path,function(n,l){var r;if(n){e(n);return}r=l.size-(t.start?t.start:0),e(null,r)}):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")};an.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var l=this._getContentDisposition(e,n),r=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(l||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&gw(s,n.header);var a;for(var u in s)s.hasOwnProperty(u)&&(a=s[u],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=u+": "+a.join("; ")+an.LINE_BREAK)));return"--"+this.getBoundary()+an.LINE_BREAK+i+an.LINE_BREAK};an.prototype._getContentDisposition=function(t,e){var n,l;return typeof e.filepath=="string"?n=mw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=mw.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=mw.basename(t.client._httpMessage.path||"")),n&&(l='filename="'+n+'"'),l};an.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=yw.lookup(t.name)),!n&&t.path&&(n=yw.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=yw.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=an.DEFAULT_CONTENT_TYPE),n};an.prototype._multiPartFooter=function(){return function(t){var e=an.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};an.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+an.LINE_BREAK};an.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};an.prototype.setBoundary=function(t){this._boundary=t};an.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};an.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,l=this._streams.length;n<l;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(an.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};an.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};an.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};an.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};an.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}xTe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,l){if(n){t(n);return}l.forEach(function(r){e+=r}),t(null,e)})};an.prototype.submit=function(t,e){var n,l,r={method:"post"};return typeof t=="string"?(t=wTe(t),l=gw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(l=gw(t,r),l.port||(l.port=l.protocol=="https:"?443:80)),l.headers=this.getHeaders(t.headers),l.protocol=="https:"?n=bTe.request(l):n=ETe.request(l),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,u=function(o,c){return n.removeListener("error",u),n.removeListener("response",a),e.call(this,o,c)};a=u.bind(this,null),n.on("error",u),n.on("response",a)}}.bind(this)),n};an.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error"
Line truncated
|
||||
`,f.message,f.stack);var m=new Error("tunneling socket could not be established, cause="+f.message);m.code="ECONNRESET",e.request.emit("error",m),l.removeSocket(r)}};us.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var l=this.requests.shift();l&&this.createSocket(l,function(r){l.request.onSocket(r)})}};function SK(t,e){var n=this;us.prototype.createSocket.call(n,t,function(l){var r=t.request.getHeader("host"),i=Zw({},n.options,{socket:l,servername:r?r.replace(/:.*$/,""):t.host}),s=Sxe.connect(0,i);n.sockets[n.sockets.indexOf(l)]=s,e(s)})}function TK(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Zw(t){for(var e=1,n=arguments.length;e<n;++e){var l=arguments[e];if(typeof l=="object")for(var r=Object.keys(l),i=0,s=r.length;i<s;++i){var a=r[i];l[a]!==void 0&&(t[a]=l[a])}}return t}var pa;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?pa=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)}:pa=function(){};H4.debug=pa});var OK=k((AMe,AK)=>{AK.exports=xK()});var zZ=k(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.removeTrailingChar=xo.merge=void 0;var sNe=(...t)=>{let e={};return t.forEach(function(n){var l;for(l in n)l in e&&e[l]===null?e[l]=n[l]:l in e&&Array.isArray(e[l])?e[l]=e[l].concat(n[l]):l in e&&typeof e[l]=="object"?e[l]=(0,xo.merge)(e[l],n[l]):e[l]=n[l]}),e};xo.merge=sNe;var aNe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;xo.removeTrailingChar=aNe});var q4=k(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.DataError=tu.DatabaseError=tu.NestedError=void 0;var t8=class extends Error{inner;id;constructor(e,n,l){super(e),this.inner=l,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
|
||||
`+this.inner:e}};tu.NestedError=t8;var CT=class extends t8{};tu.DatabaseError=CT;var RT=class extends t8{};tu.DataError=RT});var LT=k(o3=>{"use strict";Object.defineProperty(o3,"__esModule",{value:!0});o3.getArrayIndicies=o3.validateArrayIndex=o3.validateArrayIndicies=o3.isInt=o3.ArrayInfo=o3.arrayRegex=void 0;var If=q4(),uNe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;o3.arrayRegex=uNe;var IT={},kT=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let l=n[0]??0;if(this.append=l===""||n[n.length-1]==="",this.indicies=n,DT(l))this.index=parseInt(l);else if(!this.append)throw new If.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(IT[e])return IT[e];let l=(0,o3.arrayRegex)().exec(e.trim());if(l!=null){let r=l[1],i="["+l[2].toString()+"]",s=PT(i);return GZ(s),IT[e]=new t(r,s)}return null}getIndex(e,n){if(this.append)return-1;let l=this.index;if(l==-1){let r=n?e:e[this.property];return r.length===0?0:r.length-1}return l}getData(e){if(this.append)throw new If.DataError("Can't get data when appending",100);let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);return l[n]}setData(e,n){if(this.append){let l=e[this.property];this.indicies.forEach(r=>{r!==""&&(r=+r,r===-1&&(r=l.length-1),l=l[+r])}),l.push(n)}else{let{index:l,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);l===-1?r.push(n):r[l]=n}}delete(e){if(this.append)throw new If.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);l.splice(n,1)}isValid(e){let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);return l.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,l=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let r=0;r<this.indicies.length-1;r++){let i=+this.indicies[r];i===-1&&(i=l.length-1),l=l[i]}n===-1&&(n=l.length-1)}return{index:n,dataForProperty:l}}isMultiDimensional(){return this.indicies.length>1}};o3.ArrayInfo=kT;function DT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}o3.isInt=DT;function GZ(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")}o3.validateArrayIndicies=GZ;function JZ(t){if(t.length!==0&&!DT(t))throw new If.DataError("Only numerical values accepted for array index",200)}o3.validateArrayIndex=JZ;function PT(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));JZ(e);let n=e.length+2;return[e,...PT(t.substring(n))]}o3.getArrayIndicies=PT});var WZ=k(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.DBParentData=void 0;var KZ=LT(),XZ=q4(),FT=class{parent;data;db;dataPath;constructor(e,n,l,r){this.parent=r,this.data=e,this.db=n,this.dataPath=l}checkArray(e=!1){let n=KZ.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new XZ.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=KZ.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 XZ.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]}};kf.DBParentData=FT});var QZ=k((aGe,YZ)=>{YZ.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var u;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new t),u=r[i]):(a=s,s=i,u=l),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,u.readers--,u.queue.length&&u.queue[0]())}}();if(u.readers<0||u.queue.length){var f=!1;if(u.queue.push(function(){!f&&u.readers>=0&&(f=!0,u.queue.shift(),u.readers++,s.call(o,c),u.queue.length&&u.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){f||(f=!0,u.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else u.readers++,s.call(a.scope,c)}function n(i,s,a){var u;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new t),u=r[i]):(a=s,s=i,u=l),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,u.readers=0,u.queue.length&&u.queue[0]())}}();if(u.readers||u.queue.length){var f=!1;if(u.queue.push(function(){f||
Line truncated
|
||||
`:t(e.children):V7(e)?t(e.children):di(e)?e.data:""},textContent:u4,innerText:G7,getChildren:lp,getParent:qB,getSiblings:zB,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:HE,prevElementSibling:VE,removeElement:Wu,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var l=e.next=t.next;if(l&&(l.prev=e),l=e.parent=t.parent){let r=l.children;r[r.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){Wu(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){Wu(e);var n=t.parent,l=t.next;if(e.next=l,((e.prev=t).next=e).parent=n,l){if(l.prev=e,n){let r=n.children;r.splice(r.lastIndexOf(l),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){Wu(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){Wu(e);var n,l=t.parent;l&&(n=l.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=l,e.prev=t.prev,(e.next=t).prev=e},filter:D7,find:qE,findOneChild:function(t,e){return e.find(t)},findOne:hE,existsOne:function t(e,n){return n.some(l=>gt(l)&&(e(l)||t(e,l.children)))},findAll:function(t,e){for(var n=[],l=[e],r=[0];;)if(r[0]>=l[0].length){if(l.length===1)return n;l.shift(),r.shift()}else{let i=l[0][r[0]++];gt(i)&&(t(i)&&n.push(i),0<i.children.length)&&(r.unshift(0),l.unshift(i.children))}},testElement:function(t,e){return!(t=O$(t))||t(e)},getElements:function(t,e,n,l=1/0){return(t=O$(t))?D7(t,e,n,l):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),hE(GB("id",t),e,n)},getElementsByTagName:n4,getElementsByTagType:function(t,e,n=!0,l=1/0){return D7(J7.tag_type(t),e,n,l)},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 l=n.parent;l;l=l.parent)if(t.includes(l)){t.splice(e,1);break}}return t},get DocumentPosition(){return sr},compareDocumentPosition:JB,uniqueSort:o4,getFeed:function(t){return(t=x7(Mye,t))?(t.name==="feed"?function(e){var n={type:"atom",items:n4("entry",e=e.children).map(r=>{var i={media:N$(r=r.children)},s=(b3(i,"id","id",r),b3(i,"title","title",r),(s=x7("link",r))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=Bs("summary",r)||Bs("content",r))&&(i.description=s),(s=Bs("updated",r))&&(i.pubDate=new Date(s)),i})},l=(b3(n,"id","id",e),b3(n,"title","title",e),(l=x7("link",e))==null?void 0:l.attribs.href);return l&&(n.link=l),b3(n,"description","subtitle",e),(l=Bs("updated",e))&&(n.updated=new Date(l)),b3(n,"author","email",e,!0),n}:function(l){var n=(n=(n=x7("channel",l.children))==null?void 0:n.children)!=null?n:[],l={type:l.name.substr(0,3),id:"",items:n4("item",l.children).map(i=>{var s={media:N$(i=i.children)};return b3(s,"id","guid",i),b3(s,"title","title",i),b3(s,"link","link",i),b3(s,"description","description",i),(i=Bs("pubDate",i)||Bs("dc:date",i))&&(s.pubDate=new Date(i)),s})},r=(b3(l,"title","title",n),b3(l,"link","link",n),b3(l,"description","description",n),Bs("lastBuildDate",n));return r&&(l.updated=new Date(r)),b3(l,"author","managingEditor",n,!0),l})(t):null}}),l4=function(){return(l4=Object.assign||function(t){for(var e,n=1,l=arguments.length;n<l;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function KB(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function $ye(t,e){return KB(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,l4(l4(l4({},BE),this==null?void 0:this._options),pE(e??{})))}function Bye(t){return KB(this,t,l4(l4({},this._options),{xmlMode:!0}))}function p6(t){for(var e=t||(this?this.root():[]),n="",l=0;l<e.length;l++)n+=u4(e[l]);return n}function Hye(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,BE,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function Vye(){return this(this._root)}function XB(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function qye(t,e){if(C$(t)&&C$(e)){for(var n=t.length,l=+e.length,r=0;r<l;r++)t[n++]=e[r];return t.length=n,t}}function C$(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Yu,zye=Object.freeze({__proto__:null,html:$ye,xml:Bye,text:p6,parseHTML:Hye,root:Vye,contains:XB,merge:qye});function fi(t){return t.cheerio!=null}function Il(t,e){for(var n=t.length,l=0;l<n;l++)e(t[l],l);return t}function z_(e){var e="length"in e?Array.prototype.map.call(e,function(l){return q7(l,!0)}):[q7(e,!0)],n=new is(e);return e.forEach(function(l){l.parent=n}),e}function mE(t){var e,
Line truncated
|
||||
:is(button, input, select, textarea, optgroup, option)[disabled],
|
||||
optgroup[disabled] > option,
|
||||
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
||||
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},WB={};function YB(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 gE(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 K_=(t,e,n,l,r)=>{let i=r(e,gE(n),l);return i===Pt.trueFunc?t:i===Pt.falseFunc?Pt.falseFunc:s=>i(s)&&t(s)},X_={is:K_,matches:K_,where:K_,not(t,e,n,l,r){let i=r(e,gE(n),l);return i===Pt.falseFunc?t:i===Pt.trueFunc?Pt.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,l,r){let i=n.adapter,s=gE(n),a=(s.relativeSelector=!0,e.some(c=>c.some(mE))?[WB]:void 0),u=r(e,s,a);if(u===Pt.falseFunc)return Pt.falseFunc;let o=function(c,f){return c===Pt.falseFunc?Pt.falseFunc:m=>f.isTag(m)&&c(m)}(u,i);if(a&&u!==Pt.trueFunc){let{shouldTestNextSiblings:c=!1}=u;return d=>{if(!t(d))return!1;a[0]=d;var m=i.getChildren(d),d=c?[...m,...YB(d,i)]:m;return i.existsOne(o,d)}}return c=>t(c)&&i.existsOne(o,i.getChildren(c))}};function W_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function Wye(t,e,n,l,r){let{adapter:i,equals:s}=n;switch(e.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.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()),Gye[e.action](t,e,n);case at.Pseudo:return function(a,u,o,c,f){let{name:m,data:d}=u;if(Array.isArray(d)){if(m in X_)return X_[m](a,d,o,c,f);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let y=(u=o.pseudos)==null?void 0:u[m],_=typeof y=="string"?y:Xye[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=np(_);return X_.is(a,S,o,c,f)}if(typeof y=="function")return F$(y,m,d,1),S=>y(S,d)&&a(S);if(m in yE)return yE[m](a,d,o,c);if(m in L$){let S=L$[m];return F$(S,m,d,2),w=>S(w,o,d)&&a(w)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,l,r);case at.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(u){return i.getName(u)===a&&t(u)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(u){let o=u;for(;o=W_(o,i);)if(t(o))return!0;return!1};let a=new WeakSet;return function(u){let o=u;for(;o=W_(o,i);)if(!a.has(o)){if(i.isTag(o)&&t(o))return!0;a.add(o)}return!1}}case"_flexibleDescendant":return function(a){let u=a;do if(t(u))return!0;while(u=W_(u,i));return!1};case at.Parent:return function(a){return i.getChildren(a).some(u=>i.isTag(u)&&t(u))};case at.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case at.Sibling:return function(a){var u=i.getSiblings(a);for(let c=0;c<u.length;c++){var o=u[c];if(s(a,o))break;if(i.isTag(o)&&t(o))return!0}return!1};case at.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var u=i.getSiblings(a);let o;for(let f=0;f<u.length;f++){var c=u[f];if(s(a,c))break;i.isTag(c)&&(o=c)}return!!o&&t(o)};case at.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function QB(t){return t.type===at.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(QB)))}var Yye={type:at.Descendant},Qye={type:"_flexibleDescendant"},Zye={type:at.Pseudo,name:"scope",data:null};function ZB(t,e,n){t.forEach(Vye),n=(s=e.context)!=null?s:n;let l=Array.isArray(n),r=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:u},o){var c=!(o==null||!o.every(f=>{var m=u.isTag(f)&&u.getParent(f);return f===WB||m&&u.isTag(m)}));for(let f of a){if(!(0<f.length&&mE(f[0])&&f[0].type!==at.Descendant)){if(!c||f.some(QB))continue;f.unshift(Yye)}f.unshift(Zye)}})(t,e,r);else if(t.some(a=>0<a.length&&mE(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[u,o]=a;u.type===at.Pseudo&&u.name==="scope"&&(l&&o.type===at.D
Line truncated
|
||||
`)}}):{name:l,value:r.replace(U$,`\r
|
||||
`)}}).toArray()}}),G5=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var l=0;l<t.length;l++)this[l]=t[l];this.length=t.length}},XE=(G5.prototype.cheerio="[cheerio object]",G5.prototype.splice=Array.prototype.splice,G5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(G5.prototype,Fye,gge,Sge,Tge,Age),function(t,e){return(XE=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,l){n.__proto__=l}:function(n,l){for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(n[r]=l[r])}))(t,e)}),Oge=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}XE(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},J5=function(){return(J5=Object.assign||function(t){for(var e,n=1,l=arguments.length;n<l;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Nge=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]),yl="\uFFFD",M$=(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"}(D=D||{}),"--"),$$="[CDATA[",B$="doctype",H0="script",Cge="public",Rge="system";function fH(t){return 55296<=t&&t<=57343}function dH(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function hH(t){return 64976<=t&&t<=65007||Nge.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm
Line truncated
|
||||
`,this.firstUpdate&&(U+=" "),this.message=U+(this.message||""),this.firstUpdate=!1,this},v}function o(w){return n.toString.call(w)==="[object Function]"}function c(w){return n.toString.call(w)==="[object Array]"}function f(w){return n.toString.call(w)==="[object String]"}function m(w){return n.toString.call(w)==="[object Object]"}function d(w){var E=function(g){return g?typeof g=="string"?g.split("."):[g]:[]}(w);return function(g){for(var v=g,x=0;x<E.length;x++){var O=E[x];if(!s(v,O))return;v=v[O]}return v}}function y(w){return Array.prototype.slice.call(w)}function _(w,E,g){return Array.prototype.indexOf.call(w||[],E,g)}function S(w){var E,g=[];for(E in w)s(w,E)&&g.push(E);return g}i.hasOwnProp=s,i._prettifyError=function(w,E,g){return(g=g.Update?g:new i.TemplateError(g)).Update(w),E||(w=g,(g=new Error(w.message)).name=w.name),g},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),i.TemplateError=u,i.escape=function(w){return w.replace(r,a)},i.isFunction=o,i.isArray=c,i.isString=f,i.isObject=m,i.getAttrGetter=d,i.groupBy=function(w,E,g){for(var v={},x=o(E)?E:d(E),O=0;O<w.length;O++){var N=w[O],R=x(N,O);if(R===void 0&&g===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(v[R]||(v[R]=[])).push(N)}return v},i.toArray=y,i.without=function(w){var E=[];if(w)for(var g=w.length,v=y(arguments).slice(1),x=-1;++x<g;)_(v,w[x])===-1&&E.push(w[x]);return E},i.repeat=function(w,E){for(var g="",v=0;v<E;v++)g+=w;return g},i.each=function(w,E,g){if(w!=null){if(e.forEach&&w.forEach===e.forEach)w.forEach(E,g);else if(w.length===+w.length)for(var v=0,x=w.length;v<x;v++)E.call(g,w[v],v,w)}},i.map=function(w,E){var g=[];if(w!=null){if(e.map&&w.map===e.map)return w.map(E);for(var v=0;v<w.length;v++)g[g.length]=E(w[v],v);w.length===+w.length&&(g.length=w.length)}return g},i.asyncIter=function(w,E,g){var v=-1;(function x(){++v<w.length?E(w[v],v,x,g):g()})()},i.asyncFor=function(w,E,g){var v=S(w||{}),x=v.length,O=-1;(function N(){var R=v[++O];O<x?E(R,w[R],O,x,N):g()})()},i.indexOf=_,i.keys=S,i._entries=function(w){return S(w).map(function(E){return[E,w[E]]})},i._values=function(w){return S(w).map(function(E){return w[E]})},i._assign=i.extend=function(w,E){return w=w||{},S(E).forEach(function(g){w[g]=E[g]}),w},i.inOperator=function(w,E){if(c(E)||f(E))return E.indexOf(w)!==-1;if(m(E))return w in E;throw new Error('Cannot use "in" operator to search for "'+w+'" in unexpected types.')}});function MH(){throw new Error("setTimeout has not been defined")}function $H(){throw new Error("clearTimeout has not been defined")}var Hs=MH,Vs=$H;function BH(t){if(Hs===setTimeout)return setTimeout(t,0);if((Hs===MH||!Hs)&&setTimeout)return(Hs=setTimeout)(t,0);try{return Hs(t,0)}catch{try{return Hs.call(null,t,0)}catch{return Hs.call(this,t,0)}}}typeof es.setTimeout=="function"&&(Hs=setTimeout),typeof es.clearTimeout=="function"&&(Vs=clearTimeout);var Qu,ns=[],r4=!1,F7=-1;function Ove(){r4&&Qu&&(r4=!1,Qu.length?ns=Qu.concat(ns):F7=-1,ns.length)&&HH()}function HH(){if(!r4){var t=BH(Ove);r4=!0;for(var e=ns.length;e;){for(Qu=ns,ns=[];++F7<e;)Qu&&Qu[F7].run();F7=-1,e=ns.length}Qu=null,r4=!1,function(n){if(Vs===clearTimeout)return clearTimeout(n);if((Vs===$H||!Vs)&&clearTimeout)return(Vs=clearTimeout)(n);try{Vs(n)}catch{try{return Vs.call(null,n)}catch{return Vs.call(this,n)}}}(t)}}function VH(t,e){this.fun=t,this.array=e}function ro(){}VH.prototype.run=function(){this.fun.apply(null,this.array)};var Nve=ro,Cve=ro,Rve=ro,Ive=ro,kve=ro,Dve=ro,Pve=ro,K0=es.performance||{},Lve=K0.now||K0.mozNow||K0.msNow||K0.oNow||K0.webkitNow||function(){return new Date().getTime()},Fve=new Date,Ws={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];ns.push(new VH(t,e)),ns.length!==1||r4||BH(HH)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Nve,addListener:Cve,once:Rve,off:Ive,removeListener:kve,removeAllListeners:Dve,emit:Pve,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Lve.call(K0),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Fve)/1e3}};function zs(){}function Zn(){Zn.init.call(this)}function qH(t){return t._maxListeners===void 0?Zn.defaultMaxListeners:t._maxListeners}function gB(t,e,n,l){var r,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(r=t._events)?(r.newListener&&(t.emit("newListener",e,n.listener||n),r=t._events),i=r[e]):(r=t._events=new zs,t._eventsCount=0),i?(typeof i=="function"?i=r[e]=l?[n,i]:[i,n]:l?i.unshift(n):i.push(n),!i.warned&&(l=qH(t))&&0<l&&i.length>l&&(i.warned=!0,(l=new Error("Possible EventEm
Line truncated
|
||||
\r\xA0`,SB="()[]{}%*-+~/#,:|.<>=!",XH="string",WH="whitespace",YH="data",QH="block-start",ZH="block-end",eV="variable-start",tV="variable-end",nV="comment",lV="left-paren",rV="right-paren",iV="left-bracket",sV="right-bracket",aV="left-curly",uV="right-curly",oV="operator",cV="comma",pV="colon",fV="tilde",dV="pipe",hV="float",mV="boolean",LE="none",yV="symbol",gV="regex";function s3(t,e,n,l){return{type:t,value:e,lineno:n,colno:l}}var Hve=function(){function t(n,l){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(l=l||{}).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=!!l.trimBlocks,this.lstripBlocks=!!l.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,l=this.colno;if(this.in_code){var r=this.current();if(this.isFinished())return null;if(r==='"'||r==="'")return s3(XH,this._parseString(r),n,l);if(d=this._extract(wB))return s3(WH,d,n,l);if(d=(d=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((r=this.current())===`
|
||||
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},eH={};function tH(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 _E(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 W_=(t,e,n,l,r)=>{let i=r(e,_E(n),l);return i===Pt.trueFunc?t:i===Pt.falseFunc?Pt.falseFunc:s=>i(s)&&t(s)},Y_={is:W_,matches:W_,where:W_,not(t,e,n,l,r){let i=r(e,_E(n),l);return i===Pt.falseFunc?t:i===Pt.trueFunc?Pt.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,l,r){let i=n.adapter,s=_E(n),a=(s.relativeSelector=!0,e.some(c=>c.some(gE))?[eH]:void 0),u=r(e,s,a);if(u===Pt.falseFunc)return Pt.falseFunc;let o=function(c,f){return c===Pt.falseFunc?Pt.falseFunc:m=>f.isTag(m)&&c(m)}(u,i);if(a&&u!==Pt.trueFunc){let{shouldTestNextSiblings:c=!1}=u;return d=>{if(!t(d))return!1;a[0]=d;var m=i.getChildren(d),d=c?[...m,...tH(d,i)]:m;return i.existsOne(o,d)}}return c=>t(c)&&i.existsOne(o,i.getChildren(c))}};function Q_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function age(t,e,n,l,r){let{adapter:i,equals:s}=n;switch(e.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.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()),lge[e.action](t,e,n);case at.Pseudo:return function(a,u,o,c,f){let{name:m,data:d}=u;if(Array.isArray(d)){if(m in Y_)return Y_[m](a,d,o,c,f);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let y=(u=o.pseudos)==null?void 0:u[m],_=typeof y=="string"?y:sge[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=ip(_);return Y_.is(a,S,o,c,f)}if(typeof y=="function")return $$(y,m,d,1),S=>y(S,d)&&a(S);if(m in vE)return vE[m](a,d,o,c);if(m in M$){let S=M$[m];return $$(S,m,d,2),w=>S(w,o,d)&&a(w)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,l,r);case at.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(u){return i.getName(u)===a&&t(u)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(u){let o=u;for(;o=Q_(o,i);)if(t(o))return!0;return!1};let a=new WeakSet;return function(u){let o=u;for(;o=Q_(o,i);)if(!a.has(o)){if(i.isTag(o)&&t(o))return!0;a.add(o)}return!1}}case"_flexibleDescendant":return function(a){let u=a;do if(t(u))return!0;while(u=Q_(u,i));return!1};case at.Parent:return function(a){return i.getChildren(a).some(u=>i.isTag(u)&&t(u))};case at.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case at.Sibling:return function(a){var u=i.getSiblings(a);for(let c=0;c<u.length;c++){var o=u[c];if(s(a,o))break;if(i.isTag(o)&&t(o))return!0}return!1};case at.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var u=i.getSiblings(a);let o;for(let f=0;f<u.length;f++){var c=u[f];if(s(a,c))break;i.isTag(c)&&(o=c)}return!!o&&t(o)};case at.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function nH(t){return t.type===at.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(nH)))}var uge={type:at.Descendant},oge={type:"_flexibleDescendant"},cge={type:at.Pseudo,name:"scope",data:null};function lH(t,e,n){t.forEach(ege),n=(s=e.context)!=null?s:n;let l=Array.isArray(n),r=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:u},o){var c=!(o==null||!o.every(f=>{var m=u.isTag(f)&&u.getParent(f);return f===eH||m&&u.isTag(m)}));for(let f of a){if(!(0<f.length&&gE(f[0])&&f[0].type!==at.Descendant)){if(!c||f.some(nH))continue;f.unshift(uge)}f.unshift(cge)}})(t,e,r);else if(t.some(a=>0<a.length&&gE(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[u,o]=a;u.type===at.Pseudo&&u.name==="scope"&&(l&&o.type===at.D
Line truncated
|
||||
`)}}):{name:l,value:r.replace(H$,`\r
|
||||
`)}}).toArray()}}),X5=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var l=0;l<t.length;l++)this[l]=t[l];this.length=t.length}},YE=(X5.prototype.cheerio="[cheerio object]",X5.prototype.splice=Array.prototype.splice,X5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(X5.prototype,Jye,Nge,Pge,Lge,jge),function(t,e){return(YE=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,l){n.__proto__=l}:function(n,l){for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(n[r]=l[r])}))(t,e)}),Uge=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}YE(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},W5=function(){return(W5=Object.assign||function(t){for(var e,n=1,l=arguments.length;n<l;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Mge=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]),gl="\uFFFD",V$=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(D=D||{}),"--"),q$="[CDATA[",z$="doctype",q0="script",$ge="public",Bge="system";function yH(t){return 55296<=t&&t<=57343}function gH(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function vH(t){return 64976<=t&&t<=65007||Mge.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm
Line truncated
|
||||
`,this.firstUpdate&&(U+=" "),this.message=U+(this.message||""),this.firstUpdate=!1,this},v}function o(w){return n.toString.call(w)==="[object Function]"}function c(w){return n.toString.call(w)==="[object Array]"}function f(w){return n.toString.call(w)==="[object String]"}function m(w){return n.toString.call(w)==="[object Object]"}function d(w){var E=function(g){return g?typeof g=="string"?g.split("."):[g]:[]}(w);return function(g){for(var v=g,x=0;x<E.length;x++){var O=E[x];if(!s(v,O))return;v=v[O]}return v}}function y(w){return Array.prototype.slice.call(w)}function _(w,E,g){return Array.prototype.indexOf.call(w||[],E,g)}function S(w){var E,g=[];for(E in w)s(w,E)&&g.push(E);return g}i.hasOwnProp=s,i._prettifyError=function(w,E,g){return(g=g.Update?g:new i.TemplateError(g)).Update(w),E||(w=g,(g=new Error(w.message)).name=w.name),g},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),i.TemplateError=u,i.escape=function(w){return w.replace(r,a)},i.isFunction=o,i.isArray=c,i.isString=f,i.isObject=m,i.getAttrGetter=d,i.groupBy=function(w,E,g){for(var v={},x=o(E)?E:d(E),O=0;O<w.length;O++){var N=w[O],R=x(N,O);if(R===void 0&&g===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(v[R]||(v[R]=[])).push(N)}return v},i.toArray=y,i.without=function(w){var E=[];if(w)for(var g=w.length,v=y(arguments).slice(1),x=-1;++x<g;)_(v,w[x])===-1&&E.push(w[x]);return E},i.repeat=function(w,E){for(var g="",v=0;v<E;v++)g+=w;return g},i.each=function(w,E,g){if(w!=null){if(e.forEach&&w.forEach===e.forEach)w.forEach(E,g);else if(w.length===+w.length)for(var v=0,x=w.length;v<x;v++)E.call(g,w[v],v,w)}},i.map=function(w,E){var g=[];if(w!=null){if(e.map&&w.map===e.map)return w.map(E);for(var v=0;v<w.length;v++)g[g.length]=E(w[v],v);w.length===+w.length&&(g.length=w.length)}return g},i.asyncIter=function(w,E,g){var v=-1;(function x(){++v<w.length?E(w[v],v,x,g):g()})()},i.asyncFor=function(w,E,g){var v=S(w||{}),x=v.length,O=-1;(function N(){var R=v[++O];O<x?E(R,w[R],O,x,N):g()})()},i.indexOf=_,i.keys=S,i._entries=function(w){return S(w).map(function(E){return[E,w[E]]})},i._values=function(w){return S(w).map(function(E){return w[E]})},i._assign=i.extend=function(w,E){return w=w||{},S(E).forEach(function(g){w[g]=E[g]}),w},i.inOperator=function(w,E){if(c(E)||f(E))return E.indexOf(w)!==-1;if(m(E))return w in E;throw new Error('Cannot use "in" operator to search for "'+w+'" in unexpected types.')}});function VH(){throw new Error("setTimeout has not been defined")}function qH(){throw new Error("clearTimeout has not been defined")}var zs=VH,Gs=qH;function zH(t){if(zs===setTimeout)return setTimeout(t,0);if((zs===VH||!zs)&&setTimeout)return(zs=setTimeout)(t,0);try{return zs(t,0)}catch{try{return zs.call(null,t,0)}catch{return zs.call(this,t,0)}}}typeof ns.setTimeout=="function"&&(zs=setTimeout),typeof ns.clearTimeout=="function"&&(Gs=clearTimeout);var eo,rs=[],s4=!1,M7=-1;function Uve(){s4&&eo&&(s4=!1,eo.length?rs=eo.concat(rs):M7=-1,rs.length)&&GH()}function GH(){if(!s4){var t=zH(Uve);s4=!0;for(var e=rs.length;e;){for(eo=rs,rs=[];++M7<e;)eo&&eo[M7].run();M7=-1,e=rs.length}eo=null,s4=!1,function(n){if(Gs===clearTimeout)return clearTimeout(n);if((Gs===qH||!Gs)&&clearTimeout)return(Gs=clearTimeout)(n);try{Gs(n)}catch{try{return Gs.call(null,n)}catch{return Gs.call(this,n)}}}(t)}}function JH(t,e){this.fun=t,this.array=e}function so(){}JH.prototype.run=function(){this.fun.apply(null,this.array)};var Mve=so,$ve=so,Bve=so,Hve=so,Vve=so,qve=so,zve=so,W0=ns.performance||{},Gve=W0.now||W0.mozNow||W0.msNow||W0.oNow||W0.webkitNow||function(){return new Date().getTime()},Jve=new Date,Qs={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];rs.push(new JH(t,e)),rs.length!==1||s4||zH(GH)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Mve,addListener:$ve,once:Bve,off:Hve,removeListener:Vve,removeAllListeners:qve,emit:zve,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Gve.call(W0),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Jve)/1e3}};function Js(){}function el(){el.init.call(this)}function KH(t){return t._maxListeners===void 0?el.defaultMaxListeners:t._maxListeners}function bB(t,e,n,l){var r,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(r=t._events)?(r.newListener&&(t.emit("newListener",e,n.listener||n),r=t._events),i=r[e]):(r=t._events=new Js,t._eventsCount=0),i?(typeof i=="function"?i=r[e]=l?[n,i]:[i,n]:l?i.unshift(n):i.push(n),!i.warned&&(l=KH(t))&&0<l&&i.length>l&&(i.warned=!0,(l=new Error("Possible EventEm
Line truncated
|
||||
\r\xA0`,OB="()[]{}%*-+~/#,:|.<>=!",ZH="string",eV="whitespace",tV="data",nV="block-start",lV="block-end",rV="variable-start",iV="variable-end",sV="comment",aV="left-paren",uV="right-paren",oV="left-bracket",cV="right-bracket",pV="left-curly",fV="right-curly",dV="operator",hV="comma",mV="colon",yV="tilde",gV="pipe",vV="float",_V="boolean",jE="none",EV="symbol",bV="regex";function a3(t,e,n,l){return{type:t,value:e,lineno:n,colno:l}}var Zve=function(){function t(n,l){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(l=l||{}).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=!!l.trimBlocks,this.lstripBlocks=!!l.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,l=this.colno;if(this.in_code){var r=this.current();if(this.isFinished())return null;if(r==='"'||r==="'")return a3(ZH,this._parseString(r),n,l);if(d=this._extract(AB))return a3(eV,d,n,l);if(d=(d=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((r=this.current())===`
|
||||
`?this.forward():r==="\r"&&(this.forward(),(r=this.current())===`
|
||||
`?this.forward():this.back())),s3(ZH,d,n,l);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,s3(tV,d,n,l);if(r==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return s3(gV,{body:i,flags:a},n,l)}if(SB.indexOf(r)!==-1){this.forward();var u,o=["==","===","!=","!==","<=",">=","//","**"],c=r+this.current();switch(Fe.indexOf(o,c)!==-1&&(this.forward(),Fe.indexOf(o,(r=c)+this.current())!==-1)&&(r=c+this.current(),this.forward()),r){case"(":u=lV;break;case")":u=rV;break;case"[":u=iV;break;case"]":u=sV;break;case"{":u=aV;break;case"}":u=uV;break;case",":u=cV;break;case":":u=pV;break;case"~":u=fV;break;case"|":u=dV;break;default:u=oV}return s3(u,r,n,l)}if((d=this._extractUntil(wB+SB)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),o=this._extract("0123456789"),s3(hV,d+"."+o,n,l)):s3("int",d,n,l);if(d.match(/^(true|false)$/))return s3(mV,d,n,l);if(d==="none"||d==="null")return s3(LE,d,n,l);if(d)return s3(yV,d,n,l);throw new Error("Unexpected value while parsing: "+d)}var f,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,s3(QH,d,n,l);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,s3(eV,d,n,l);var d="",y=!1;for(this._matches(this.tags.COMMENT_START)&&(y=!0,d=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(m))!==null;){if(d+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=d.length){var _=d.slice(-this.colno);if(/^\s+$/.test(_)&&!(d=d.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!y)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(f===null&&y)throw new Error("expected end of comment, got end of file");return s3(y?nV:YH,d,n,l)},e._parseString=function(n){this.forward();for(var l="";!this.isFinished()&&this.current()!==n;){var r=this.current();if(r==="\\")switch(this.forward(),this.current()){case"n":l+=`
|
||||
`?this.forward():this.back())),a3(lV,d,n,l);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,a3(iV,d,n,l);if(r==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return a3(bV,{body:i,flags:a},n,l)}if(OB.indexOf(r)!==-1){this.forward();var u,o=["==","===","!=","!==","<=",">=","//","**"],c=r+this.current();switch(Fe.indexOf(o,c)!==-1&&(this.forward(),Fe.indexOf(o,(r=c)+this.current())!==-1)&&(r=c+this.current(),this.forward()),r){case"(":u=aV;break;case")":u=uV;break;case"[":u=oV;break;case"]":u=cV;break;case"{":u=pV;break;case"}":u=fV;break;case",":u=hV;break;case":":u=mV;break;case"~":u=yV;break;case"|":u=gV;break;default:u=dV}return a3(u,r,n,l)}if((d=this._extractUntil(AB+OB)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),o=this._extract("0123456789"),a3(vV,d+"."+o,n,l)):a3("int",d,n,l);if(d.match(/^(true|false)$/))return a3(_V,d,n,l);if(d==="none"||d==="null")return a3(jE,d,n,l);if(d)return a3(EV,d,n,l);throw new Error("Unexpected value while parsing: "+d)}var f,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,a3(nV,d,n,l);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,a3(rV,d,n,l);var d="",y=!1;for(this._matches(this.tags.COMMENT_START)&&(y=!0,d=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(m))!==null;){if(d+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=d.length){var _=d.slice(-this.colno);if(/^\s+$/.test(_)&&!(d=d.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!y)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(f===null&&y)throw new Error("expected end of comment, got end of file");return a3(y?sV:tV,d,n,l)},e._parseString=function(n){this.forward();for(var l="";!this.isFinished()&&this.current()!==n;){var r=this.current();if(r==="\\")switch(this.forward(),this.current()){case"n":l+=`
|
||||
`;break;case"t":l+=" ";break;case"r":l+="\r";break;default:l+=this.current()}else l+=r;this.forward()}return this.forward(),l},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,l){if(this.isFinished())return null;var r=l.indexOf(this.current());if(n&&r===-1||!n&&r!==-1){var i=this.current();this.forward();for(var s=l.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)i+=this.current(),this.forward(),s=l.indexOf(this.current());return i}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var l=0;l<n;l++)this.forward()},e.forward=function(){this.index++,this.previous()===`
|
||||
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var l=0;l<n;l++)this.back()},e.back=function(){var n;this.index--,this.current()===`
|
||||
`?(this.lineno--,n=this.src.lastIndexOf(`
|
||||
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Ge={lex:function(t,e){return new Hve(t,e)},TOKEN_STRING:XH,TOKEN_WHITESPACE:WH,TOKEN_DATA:YH,TOKEN_BLOCK_START:QH,TOKEN_BLOCK_END:ZH,TOKEN_VARIABLE_START:eV,TOKEN_VARIABLE_END:tV,TOKEN_COMMENT:nV,TOKEN_LEFT_PAREN:lV,TOKEN_RIGHT_PAREN:rV,TOKEN_LEFT_BRACKET:iV,TOKEN_RIGHT_BRACKET:sV,TOKEN_LEFT_CURLY:aV,TOKEN_RIGHT_CURLY:uV,TOKEN_OPERATOR:oV,TOKEN_COMMA:cV,TOKEN_COLON:pV,TOKEN_TILDE:fV,TOKEN_PIPE:dV,TOKEN_INT:"int",TOKEN_FLOAT:hV,TOKEN_BOOLEAN:mV,TOKEN_NONE:LE,TOKEN_SYMBOL:yV,TOKEN_SPECIAL:"special",TOKEN_REGEX:gV};function TB(t,e){for(var n,l=0;l<e.length;l++){var r=e[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?n:String(n),r)}}function QE(t,e,n){return e&&TB(t.prototype,e),n&&TB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function vV(t,e){t.prototype=Object.create(e.prototype),_V(t.prototype.constructor=t,e)}function _V(t,e){return(_V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}function EV(t,e,n){n=n||{},Fe.keys(n).forEach(function(r){n[r]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,u=(this.parent=i,s.apply(this,arguments));return this.parent=a,u}}(t.prototype[r],n[r])});var l=function(r){function i(){return r.apply(this,arguments)||this}return vV(i,r),QE(i,[{key:"typename",get:function(){return e}}]),i}(t);return Fe._assign(l.prototype,n),l}var Vve=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"),EV(this,e,n)},QE(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),qve=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return vV(e,t),e.prototype.init=function(){},e.extend=function(n,l){return typeof n=="object"&&(l=n,n="anonymous"),EV(this,n,l)},QE(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(Zn),c4={Obj:Vve,EmitterObj:qve};function xB(t,e){for(var n,l=0;l<e.length;l++){var r=e[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?n:String(n),r)}}function ZE(t,e,n){return e&&xB(t.prototype,e),n&&xB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function rp(t,e){t.prototype=Object.create(e.prototype),bV(t.prototype.constructor=t,e)}function bV(t,e){return(bV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}function AB(t,e,n){t instanceof e&&n.push(t),t instanceof sl&&t.findAll(e,n)}var sl=function(t){function e(){return t.apply(this,arguments)||this}rp(e,t);var n=e.prototype;return n.init=function(l,r){for(var i=arguments,s=this,a=arguments.length,u=new Array(2<a?a-2:0),o=2;o<a;o++)u[o-2]=arguments[o];this.lineno=l,this.colno=r,this.fields.forEach(function(c,f){s[c]=f=(f=i[f+2])===void 0?null:f})},n.findAll=function(l,r){var i=this;return r=r||[],this instanceof di?this.children.forEach(function(s){return AB(s,l,r)}):this.fields.forEach(function(s){return AB(i[s],l,r)}),r},n.iterFields=function(l){var r=this;this.fields.forEach(function(i){l(r[i],i)})},e}(c4.Obj),eb=function(t){function e(){return t.apply(this,arguments)||this}return rp(e,t),ZE(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(sl),di=function(t){function e(){return t.apply(this,arguments)||this}rp(e,t);var n=e.prototype;return n.init=function(l,r,i){t.prototype.init.call(this,l,r,i||[])},n.addChild=function(l){this.children.push(l)},ZE(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(sl),zve=di.extend("Root"),wV=eb.extend("Literal"),Gve=eb.extend("Symbol"),Jve=di.extend("Group"),Kve=di.extend("Array"),Xve=sl.extend("Pair",{fields:["key","value"]}),SV=di.extend("Dict"),Wve=sl.extend("LookupVal",{fields:["target","val"]}),TV=sl.extend("If",{fields:["cond","body","else_"]}),Yve=TV.extend("IfAsync"),Qve=sl.extend("InlineIf",{fields:["cond","body","else_"]}),tb=sl.extend("For",{fields:["arr","name","body","else_"]}),Zve=tb.extend("AsyncEach"),e_e=tb.extend("AsyncAll"),xV=
Line truncated
|
||||
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Ge={lex:function(t,e){return new Zve(t,e)},TOKEN_STRING:ZH,TOKEN_WHITESPACE:eV,TOKEN_DATA:tV,TOKEN_BLOCK_START:nV,TOKEN_BLOCK_END:lV,TOKEN_VARIABLE_START:rV,TOKEN_VARIABLE_END:iV,TOKEN_COMMENT:sV,TOKEN_LEFT_PAREN:aV,TOKEN_RIGHT_PAREN:uV,TOKEN_LEFT_BRACKET:oV,TOKEN_RIGHT_BRACKET:cV,TOKEN_LEFT_CURLY:pV,TOKEN_RIGHT_CURLY:fV,TOKEN_OPERATOR:dV,TOKEN_COMMA:hV,TOKEN_COLON:mV,TOKEN_TILDE:yV,TOKEN_PIPE:gV,TOKEN_INT:"int",TOKEN_FLOAT:vV,TOKEN_BOOLEAN:_V,TOKEN_NONE:jE,TOKEN_SYMBOL:EV,TOKEN_SPECIAL:"special",TOKEN_REGEX:bV};function NB(t,e){for(var n,l=0;l<e.length;l++){var r=e[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?n:String(n),r)}}function eb(t,e,n){return e&&NB(t.prototype,e),n&&NB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function wV(t,e){t.prototype=Object.create(e.prototype),SV(t.prototype.constructor=t,e)}function SV(t,e){return(SV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}function TV(t,e,n){n=n||{},Fe.keys(n).forEach(function(r){n[r]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,u=(this.parent=i,s.apply(this,arguments));return this.parent=a,u}}(t.prototype[r],n[r])});var l=function(r){function i(){return r.apply(this,arguments)||this}return wV(i,r),eb(i,[{key:"typename",get:function(){return e}}]),i}(t);return Fe._assign(l.prototype,n),l}var e_e=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"),TV(this,e,n)},eb(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),t_e=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return wV(e,t),e.prototype.init=function(){},e.extend=function(n,l){return typeof n=="object"&&(l=n,n="anonymous"),TV(this,n,l)},eb(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(el),f4={Obj:e_e,EmitterObj:t_e};function CB(t,e){for(var n,l=0;l<e.length;l++){var r=e[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?n:String(n),r)}}function tb(t,e,n){return e&&CB(t.prototype,e),n&&CB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ap(t,e){t.prototype=Object.create(e.prototype),xV(t.prototype.constructor=t,e)}function xV(t,e){return(xV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}function RB(t,e,n){t instanceof e&&n.push(t),t instanceof al&&t.findAll(e,n)}var al=function(t){function e(){return t.apply(this,arguments)||this}ap(e,t);var n=e.prototype;return n.init=function(l,r){for(var i=arguments,s=this,a=arguments.length,u=new Array(2<a?a-2:0),o=2;o<a;o++)u[o-2]=arguments[o];this.lineno=l,this.colno=r,this.fields.forEach(function(c,f){s[c]=f=(f=i[f+2])===void 0?null:f})},n.findAll=function(l,r){var i=this;return r=r||[],this instanceof hi?this.children.forEach(function(s){return RB(s,l,r)}):this.fields.forEach(function(s){return RB(i[s],l,r)}),r},n.iterFields=function(l){var r=this;this.fields.forEach(function(i){l(r[i],i)})},e}(f4.Obj),nb=function(t){function e(){return t.apply(this,arguments)||this}return ap(e,t),tb(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(al),hi=function(t){function e(){return t.apply(this,arguments)||this}ap(e,t);var n=e.prototype;return n.init=function(l,r,i){t.prototype.init.call(this,l,r,i||[])},n.addChild=function(l){this.children.push(l)},tb(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(al),n_e=hi.extend("Root"),AV=nb.extend("Literal"),l_e=nb.extend("Symbol"),r_e=hi.extend("Group"),i_e=hi.extend("Array"),s_e=al.extend("Pair",{fields:["key","value"]}),OV=hi.extend("Dict"),a_e=al.extend("LookupVal",{fields:["target","val"]}),NV=al.extend("If",{fields:["cond","body","else_"]}),u_e=NV.extend("IfAsync"),o_e=al.extend("InlineIf",{fields:["cond","body","else_"]}),lb=al.extend("For",{fields:["arr","name","body","else_"]}),c_e=lb.extend("AsyncEach"),p_e=lb.extend("AsyncAll"),CV=
Line truncated
|
||||
`);l.forEach(function(r,i){r&&(n&&0<i||!n)&&process.stdout.write(" ".repeat(e)),i=i===l.length-1?"":`
|
||||
`,process.stdout.write(r+i)})}var X={Node:sl,Root:zve,NodeList:di,Value:eb,Literal:wV,Symbol:Gve,Group:Jve,Array:Kve,Pair:Xve,Dict:SV,Output:d_e,Capture:h_e,TemplateData:m_e,If:TV,IfAsync:Yve,InlineIf:Qve,For:tb,AsyncEach:Zve,AsyncAll:e_e,Macro:xV,Caller:t_e,Import:n_e,FromImport:l_e,FunCall:AV,Filter:OV,FilterAsync:r_e,KeywordArgs:i_e,Block:s_e,Super:a_e,Extends:u_e,Include:o_e,Set:c_e,Switch:p_e,Case:f_e,LookupVal:Wve,BinOp:F3,In:y_e,Is:g_e,Or:v_e,And:__e,Not:E_e,Add:b_e,Concat:w_e,Sub:S_e,Mul:T_e,Div:x_e,FloorDiv:A_e,Mod:O_e,Pow:N_e,Neg:C_e,Pos:R_e,Compare:I_e,CompareOperand:k_e,CallExtension:FE,CallExtensionAsync:D_e,printNodes:function t(e,n){var l,r;n=n||0,q0(e.typename+": ",n),e instanceof di?(q0(`
|
||||
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof FE?(q0(e.extName+"."+e.prop+`
|
||||
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(l=[],r=null,e.iterFields(function(i,s){i instanceof sl?l.push([s,i]):(r=r||{})[s]=i}),r?q0(JSON.stringify(r,null,2)+`
|
||||
`,null,!0):q0(`
|
||||
`),l.forEach(function(a){var s=a[0],a=a[1];q0("["+s+"] =>",n+2),t(a,n+4)}))}};function NV(t,e){return(NV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}X.Node,X.Root,X.NodeList,X.Value,X.Literal,X.Group,X.Pair,X.Dict,X.Output,X.Capture,X.TemplateData,X.If,X.IfAsync,X.InlineIf,X.For,X.AsyncEach,X.AsyncAll,X.Macro,X.Caller,X.Import,X.FromImport,X.FunCall,X.Filter,X.FilterAsync,X.KeywordArgs,X.Block,X.Super,X.Extends,X.Include,X.Switch,X.Case,X.LookupVal,X.BinOp,X.In,X.Is,X.Or,X.And,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.CompareOperand,X.CallExtension,X.CallExtensionAsync,X.printNodes;var OB=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(l=n).prototype=Object.create(e.prototype),NV(l.prototype.constructor=l,e);var l=n.prototype;return l.init=function(r){this.tokens=r,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(r){var i;if(this.peeked){if(r||this.peeked.type!==Ge.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!r)for(;i&&i.type===Ge.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(r){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=r},l.error=function(r,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new Fe.TemplateError(r,i,s)},l.fail=function(r,i,s){throw this.error(r,i,s)},l.skip=function(r){var i=this.nextToken();return!(!i||i.type!==r)||(this.pushToken(i),!1)},l.expect=function(r){var i=this.nextToken();return i.type!==r&&this.fail("expected "+r+", got "+i.type,i.lineno,i.colno),i},l.skipValue=function(r,i){var s=this.nextToken();return!(!s||s.type!==r||s.value!==i)||(this.pushToken(s),!1)},l.skipSymbol=function(r){return this.skipValue(Ge.TOKEN_SYMBOL,r)},l.advanceAfterBlockEnd=function(r){var i;return r||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Ge.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),r=this.nextToken().value),(i=this.nextToken())&&i.type===Ge.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+r+" statement"),i},l.advanceAfterVariableEnd=function(){var r=this.nextToken();r&&r.type===Ge.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=r.value.charAt(r.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(r),this.fail("expected variable end"))},l.parseFor=function(){var r,i,s=this.peekToken();if(this.skipSymbol("for")?(r=new X.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(r=new X.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(r=new X.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),r.name=this.parsePrimary(),r.name instanceof X.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Ge.TOKEN_COMMA){var a=r.name;for(r.name=new X.Array(a.lineno,a.colno),r.name.addChild(a);this.skip(Ge.TOKEN_COMMA);){var u=this.parsePrimary();r.name.addChild(u)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),r.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),r.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),r.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),r},l.parseMacro=function(){var r=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new X.Macro(r.lineno,r.colno,s,i);return this.advanceAfterBlockEnd(r.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},l.parseCall=function(){var r=this.peekToken(),u=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new X.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(r.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new X.Symbol(r.lineno,r.colno,"caller")),u=new X.Caller(r.lineno,r.colno,a,u,s);return(s=i.args.children)[s.length-1]instanceof X.KeywordArgs||s.push(new X.KeywordArgs),s[s.length-1].addChild(new X.Pair(r.lineno,r.colno,a,u)),new X.Output(r.lineno,r.colno,[i])},l.parseWithContext=function(){var r=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",r.lineno,r.colno),i},l.parseImport=function(){var r=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",r.lineno,r.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword
Line truncated
|
||||
`,process.stdout.write(r+i)})}var X={Node:al,Root:n_e,NodeList:hi,Value:nb,Literal:AV,Symbol:l_e,Group:r_e,Array:i_e,Pair:s_e,Dict:OV,Output:T_e,Capture:x_e,TemplateData:A_e,If:NV,IfAsync:u_e,InlineIf:o_e,For:lb,AsyncEach:c_e,AsyncAll:p_e,Macro:CV,Caller:f_e,Import:d_e,FromImport:h_e,FunCall:RV,Filter:IV,FilterAsync:m_e,KeywordArgs:y_e,Block:g_e,Super:v_e,Extends:__e,Include:E_e,Set:b_e,Switch:w_e,Case:S_e,LookupVal:a_e,BinOp:j3,In:O_e,Is:N_e,Or:C_e,And:R_e,Not:I_e,Add:k_e,Concat:D_e,Sub:P_e,Mul:L_e,Div:F_e,FloorDiv:j_e,Mod:U_e,Pow:M_e,Neg:$_e,Pos:B_e,Compare:H_e,CompareOperand:V_e,CallExtension:UE,CallExtensionAsync:q_e,printNodes:function t(e,n){var l,r;n=n||0,G0(e.typename+": ",n),e instanceof hi?(G0(`
|
||||
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof UE?(G0(e.extName+"."+e.prop+`
|
||||
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(l=[],r=null,e.iterFields(function(i,s){i instanceof al?l.push([s,i]):(r=r||{})[s]=i}),r?G0(JSON.stringify(r,null,2)+`
|
||||
`,null,!0):G0(`
|
||||
`),l.forEach(function(a){var s=a[0],a=a[1];G0("["+s+"] =>",n+2),t(a,n+4)}))}};function kV(t,e){return(kV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}X.Node,X.Root,X.NodeList,X.Value,X.Literal,X.Group,X.Pair,X.Dict,X.Output,X.Capture,X.TemplateData,X.If,X.IfAsync,X.InlineIf,X.For,X.AsyncEach,X.AsyncAll,X.Macro,X.Caller,X.Import,X.FromImport,X.FunCall,X.Filter,X.FilterAsync,X.KeywordArgs,X.Block,X.Super,X.Extends,X.Include,X.Switch,X.Case,X.LookupVal,X.BinOp,X.In,X.Is,X.Or,X.And,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.CompareOperand,X.CallExtension,X.CallExtensionAsync,X.printNodes;var IB=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(l=n).prototype=Object.create(e.prototype),kV(l.prototype.constructor=l,e);var l=n.prototype;return l.init=function(r){this.tokens=r,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(r){var i;if(this.peeked){if(r||this.peeked.type!==Ge.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!r)for(;i&&i.type===Ge.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(r){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=r},l.error=function(r,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new Fe.TemplateError(r,i,s)},l.fail=function(r,i,s){throw this.error(r,i,s)},l.skip=function(r){var i=this.nextToken();return!(!i||i.type!==r)||(this.pushToken(i),!1)},l.expect=function(r){var i=this.nextToken();return i.type!==r&&this.fail("expected "+r+", got "+i.type,i.lineno,i.colno),i},l.skipValue=function(r,i){var s=this.nextToken();return!(!s||s.type!==r||s.value!==i)||(this.pushToken(s),!1)},l.skipSymbol=function(r){return this.skipValue(Ge.TOKEN_SYMBOL,r)},l.advanceAfterBlockEnd=function(r){var i;return r||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Ge.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),r=this.nextToken().value),(i=this.nextToken())&&i.type===Ge.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+r+" statement"),i},l.advanceAfterVariableEnd=function(){var r=this.nextToken();r&&r.type===Ge.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=r.value.charAt(r.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(r),this.fail("expected variable end"))},l.parseFor=function(){var r,i,s=this.peekToken();if(this.skipSymbol("for")?(r=new X.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(r=new X.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(r=new X.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),r.name=this.parsePrimary(),r.name instanceof X.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Ge.TOKEN_COMMA){var a=r.name;for(r.name=new X.Array(a.lineno,a.colno),r.name.addChild(a);this.skip(Ge.TOKEN_COMMA);){var u=this.parsePrimary();r.name.addChild(u)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),r.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),r.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),r.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),r},l.parseMacro=function(){var r=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new X.Macro(r.lineno,r.colno,s,i);return this.advanceAfterBlockEnd(r.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},l.parseCall=function(){var r=this.peekToken(),u=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new X.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(r.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new X.Symbol(r.lineno,r.colno,"caller")),u=new X.Caller(r.lineno,r.colno,a,u,s);return(s=i.args.children)[s.length-1]instanceof X.KeywordArgs||s.push(new X.KeywordArgs),s[s.length-1].addChild(new X.Pair(r.lineno,r.colno,a,u)),new X.Output(r.lineno,r.colno,[i])},l.parseWithContext=function(){var r=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",r.lineno,r.colno),i},l.parseImport=function(){var r=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",r.lineno,r.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword
Line truncated
|
||||
`)},l._emitLines=function(){for(var r=this,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];s.forEach(function(u){return r._emitLine(u)})},l._emitFuncBegin=function(r,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+r.lineno+";"),this._emitLine("var colno = "+r.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},l._emitFuncEnd=function(r){r||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},l._addScopeLevel=function(){this._scopeClosers+="})"},l._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},l._withScopedSyntax=function(r){var i=this._scopeClosers;this._scopeClosers="",r.call(this),this._closeScopeLevels(),this._scopeClosers=i},l._makeCallback=function(r){var i=this._tmpid();return"function("+i+(r?","+r:"")+`) {
|
||||
if(`+i+") { cb("+i+"); return; }"},l._tmpid=function(){return this.lastId++,"t_"+this.lastId},l._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},l._compileChildren=function(r,i){var s=this;r.children.forEach(function(a){s.compile(a,i)})},l._compileAggregate=function(r,i,s,a){var u=this;s&&this._emit(s),r.children.forEach(function(o,c){0<c&&u._emit(","),u.compile(o,i)}),a&&this._emit(a)},l._compileExpression=function(r,i){this.assertType(r,X.Literal,X.Symbol,X.Group,X.Array,X.Dict,X.FunCall,X.Caller,X.Filter,X.LookupVal,X.Compare,X.InlineIf,X.In,X.Is,X.And,X.Or,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.NodeList),this.compile(r,i)},l.assertType=function(r){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(u){return r instanceof u})||this.fail("assertType: invalid type: "+r.typename,r.lineno,r.colno)},l.compileCallExtension=function(r,i,s){var a=this,u=r.args,o=r.contentArgs,c=typeof r.autoescape!="boolean"||r.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+r.extName+'")["'+r.prop+'"]('),this._emit("context"),(u||o)&&this._emit(","),u&&(u instanceof X.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),u.children.forEach(function(f,m){a._compileExpression(f,i),m===u.children.length-1&&!o.length||a._emit(",")})),o.length&&o.forEach(function(f,m){var d;0<m&&a._emit(","),f?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),d=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(f,i),a._emitLine("cb(null, "+d+");")}),a._popBuffer(),a._emitLine("return "+d+";"),a._emitLine("}")):a._emit("null")}),s?(r=this._tmpid(),this._emitLine(", "+this._makeCallback(r)),this._emitLine(this.buffer+" += runtime.suppressValue("+r+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
|
||||
`))},l.compileCallExtensionAsync=function(r,i){this.compileCallExtension(r,i,!0)},l.compileNodeList=function(r,i){this._compileChildren(r,i)},l.compileLiteral=function(r){var i;typeof r.value=="string"?(i=(i=(i=(i=(i=(i=r.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):r.value===null?this._emit("null"):this._emit(r.value.toString())},l.compileSymbol=function(r,i){r=r.value,(i=i.lookup(r))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+r+'")')},l.compileGroup=function(r,i){this._compileAggregate(r,i,"(",")")},l.compileArray=function(r,i){this._compileAggregate(r,i,"[","]")},l.compileDict=function(r,i){this._compileAggregate(r,i,"{","}")},l.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof X.Symbol?s=new X.Literal(s.lineno,s.colno,s.value):s instanceof X.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},l.compileInlineIf=function(r,i){this._emit("("),this.compile(r.cond,i),this._emit("?"),this.compile(r.body,i),this._emit(":"),r.else_!==null?this.compile(r.else_,i):this._emit('""'),this._emit(")")},l.compileIn=function(r,i){this._emit("runtime.inOperator("),this.compile(r.left,i),this._emit(","),this.compile(r.right,i),this._emit(")")},l.compileIs=function(r,i){var s=(r.right.name||r.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(r.left,i),r.right.args&&(this._emit(","),this.compile(r.right.args,i)),this._emit(") === true")},l._binOpEmitter=function(r,i,s){this.compile(r.left,i),this._emit(s),this.compile(r.right,i)},l.compileOr=function(r,i){return this._binOpEmitter(r,i," || ")},l.compileAnd=function(r,i){return this._binOpEmitter(r,i," && ")},l.compileAdd=function(r,i){return this._binOpEmitter(r,i," + ")},l.compileConcat=function(r,i){return this._binOpEmitter(r,i,' + "" + ')},l.compileSub=function(r,i){return this._binOpEmitter(r,i," - ")},l.compileMul=function(r,i){return this._binOpEmitter(r,i," * ")},l.compileDiv=function(r,i){return this._binOpEmitter(r,i," / ")},l.compileMod=function(r,i){return this._binOpEmitter(r,i," % ")},l.compileNot=function(r,i){this._emit("!"),this.compile(r.target,i)},l.compileFloorDiv=function(r,i){this._emit("Math.floor("),this.compile(r.left,i),this._emit(" / "),this.compile(r.right,i),this._emit(")")},l.compilePow=function(r,i){this._emit("Math.pow("),this.compile(r.left,i),this._emit(", "),this.compile(r.right,i),this._emit(")")},l.compileNeg=function(r,i){this._emit("-"),this.compile(r.target,i)},l.compilePos=function(r,i){this._emit("+"),this.compile(r.target,i)},l.compileCompare=function(r,i){var s=this;this.compile(r.expr,i),r.ops.forEach(function(a){s._emit(" "+B_e[a.type]+" "),s.compile(a.expr,i)})},l.compileLookupVal=function(r,i){this._emit("runtime.memberLookup(("),this._compileExpression(r.target,i),this._emit("),"),this._compileExpression(r.val,i),this._emit(")")},l._getNodeName=function(r){switch(r.typename){case"Symbol":return r.value;case"FunCall":return"the return value of ("+this._getNodeName(r.name)+")";case"LookupVal":return this._getNodeName(r.target)+'["'+this._getNodeName(r.val)+'"]';case"Literal":return r.value.toString();default:return"--expression--"}},l.compileFunCall=function(r,i){this._emit("(lineno = "+r.lineno+", colno = "+r.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(r.name,i),this._emit(', "'+this._getNodeName(r.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(r.args,i,"[","])"),this._emit(")")},l.compileFilter=function(r,i){var s=r.name;this.assertType(s,X.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emit(")")},l.compileFilterAsync=function(r,i){var s=r.name,a=r.symbol.value;this.assertType(s,X.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},l.compileKeywordArgs=function(r,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(r,i),this._emit(")")},l.compileSet=function(r,i){var s=this,a=[];r.targets.forEach(function(u){u=u.value,(u=i.lookup(u))==null&&(u=s._tmpid(),s._emitLine("var "+u+";")),a.push(u)}),r.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(r.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(r.body,i)),this._emitLine(";"),r.targets.forEach(function(u,o){u=u.value,s._emitLine('frame.set("'+u+'", '+(o=a[o])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+u+'", '+o+");"),s._emitLine("}"),u.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+u+'", '+o+");"),s._emitLine("}"))})},l.compileSwitch=function(r,i){var s=this;this._emit("switch ("),this.compile(r.expr,i),this._emit(") {"),r.cases.forEach(fun
Line truncated
|
||||
`))},l.compileCallExtensionAsync=function(r,i){this.compileCallExtension(r,i,!0)},l.compileNodeList=function(r,i){this._compileChildren(r,i)},l.compileLiteral=function(r){var i;typeof r.value=="string"?(i=(i=(i=(i=(i=(i=r.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):r.value===null?this._emit("null"):this._emit(r.value.toString())},l.compileSymbol=function(r,i){r=r.value,(i=i.lookup(r))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+r+'")')},l.compileGroup=function(r,i){this._compileAggregate(r,i,"(",")")},l.compileArray=function(r,i){this._compileAggregate(r,i,"[","]")},l.compileDict=function(r,i){this._compileAggregate(r,i,"{","}")},l.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof X.Symbol?s=new X.Literal(s.lineno,s.colno,s.value):s instanceof X.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},l.compileInlineIf=function(r,i){this._emit("("),this.compile(r.cond,i),this._emit("?"),this.compile(r.body,i),this._emit(":"),r.else_!==null?this.compile(r.else_,i):this._emit('""'),this._emit(")")},l.compileIn=function(r,i){this._emit("runtime.inOperator("),this.compile(r.left,i),this._emit(","),this.compile(r.right,i),this._emit(")")},l.compileIs=function(r,i){var s=(r.right.name||r.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(r.left,i),r.right.args&&(this._emit(","),this.compile(r.right.args,i)),this._emit(") === true")},l._binOpEmitter=function(r,i,s){this.compile(r.left,i),this._emit(s),this.compile(r.right,i)},l.compileOr=function(r,i){return this._binOpEmitter(r,i," || ")},l.compileAnd=function(r,i){return this._binOpEmitter(r,i," && ")},l.compileAdd=function(r,i){return this._binOpEmitter(r,i," + ")},l.compileConcat=function(r,i){return this._binOpEmitter(r,i,' + "" + ')},l.compileSub=function(r,i){return this._binOpEmitter(r,i," - ")},l.compileMul=function(r,i){return this._binOpEmitter(r,i," * ")},l.compileDiv=function(r,i){return this._binOpEmitter(r,i," / ")},l.compileMod=function(r,i){return this._binOpEmitter(r,i," % ")},l.compileNot=function(r,i){this._emit("!"),this.compile(r.target,i)},l.compileFloorDiv=function(r,i){this._emit("Math.floor("),this.compile(r.left,i),this._emit(" / "),this.compile(r.right,i),this._emit(")")},l.compilePow=function(r,i){this._emit("Math.pow("),this.compile(r.left,i),this._emit(", "),this.compile(r.right,i),this._emit(")")},l.compileNeg=function(r,i){this._emit("-"),this.compile(r.target,i)},l.compilePos=function(r,i){this._emit("+"),this.compile(r.target,i)},l.compileCompare=function(r,i){var s=this;this.compile(r.expr,i),r.ops.forEach(function(a){s._emit(" "+Q_e[a.type]+" "),s.compile(a.expr,i)})},l.compileLookupVal=function(r,i){this._emit("runtime.memberLookup(("),this._compileExpression(r.target,i),this._emit("),"),this._compileExpression(r.val,i),this._emit(")")},l._getNodeName=function(r){switch(r.typename){case"Symbol":return r.value;case"FunCall":return"the return value of ("+this._getNodeName(r.name)+")";case"LookupVal":return this._getNodeName(r.target)+'["'+this._getNodeName(r.val)+'"]';case"Literal":return r.value.toString();default:return"--expression--"}},l.compileFunCall=function(r,i){this._emit("(lineno = "+r.lineno+", colno = "+r.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(r.name,i),this._emit(', "'+this._getNodeName(r.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(r.args,i,"[","])"),this._emit(")")},l.compileFilter=function(r,i){var s=r.name;this.assertType(s,X.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emit(")")},l.compileFilterAsync=function(r,i){var s=r.name,a=r.symbol.value;this.assertType(s,X.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},l.compileKeywordArgs=function(r,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(r,i),this._emit(")")},l.compileSet=function(r,i){var s=this,a=[];r.targets.forEach(function(u){u=u.value,(u=i.lookup(u))==null&&(u=s._tmpid(),s._emitLine("var "+u+";")),a.push(u)}),r.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(r.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(r.body,i)),this._emitLine(";"),r.targets.forEach(function(u,o){u=u.value,s._emitLine('frame.set("'+u+'", '+(o=a[o])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+u+'", '+o+");"),s._emitLine("}"),u.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+u+'", '+o+");"),s._emitLine("}"))})},l.compileSwitch=function(r,i){var s=this;this._emit("switch ("),this.compile(r.expr,i),this._emit(") {"),r.cases.forEach(fun
Line truncated
|
||||
else {`),this._withScopedSyntax(function(){a.compile(r.else_,i),s&&a._emit("cb()")})):s&&(this._emitLine(`}
|
||||
else {`),this._emit("cb()")),this._emitLine("}")},l.compileIfAsync=function(r,i){this._emit("(function(cb) {"),this.compileIf(r,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},l._emitLoopBindings=function(r,i,s,a){var u=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(o){u._emitLine('frame.set("loop.'+o.name+'", '+o.val+");")})},l.compileFor=function(r,i){var s,a,u,o,c=this,f=this._tmpid(),m=this._tmpid(),d=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+d+" = "),this._compileExpression(r.arr,i),this._emitLine(";"),this._emit("if("+d+") {"),this._emitLine(d+" = runtime.fromIterator("+d+");"),r.name instanceof X.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),r.name.children.forEach(function(y,_){var S=c._tmpid();c._emitLine("var "+S+" = "+d+"["+f+"]["+_+"];"),c._emitLine('frame.set("'+y+'", '+d+"["+f+"]["+_+"]);"),i.set(r.name.children[_].value,S)}),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)}),this._emitLine("}"),this._emitLine("} else {"),o=(s=r.name.children)[0],s=s[1],a=this._tmpid(),u=this._tmpid(),i.set(o.value,a),i.set(s.value,u),this._emitLine(f+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+d+").length;"),this._emitLine("for(var "+a+" in "+d+") {"),this._emitLine(f+"++;"),this._emitLine("var "+u+" = "+d+"["+a+"];"),this._emitLine('frame.set("'+o.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+u+");"),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)}),this._emitLine("}")):(o=this._tmpid(),i.set(r.name.value,o),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),this._emitLine("var "+o+" = "+d+"["+f+"];"),this._emitLine('frame.set("'+r.name.value+'", '+o+");"),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)})),this._emitLine("}"),this._emitLine("}"),r.else_&&(this._emitLine("if (!"+m+") {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l._compileAsyncLoop=function(r,i,s){var a,u=this,o=this._tmpid(),c=this._tmpid(),f=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(r.arr,i),this._emitLine(");"),r.name instanceof X.Array?(a=r.name.children.length,this._emit("runtime."+m+"("+f+", "+a+", function("),r.name.children.forEach(function(d){u._emit(d.value+",")}),this._emit(o+","+c+",next) {"),r.name.children.forEach(function(d){d=d.value,i.set(d,d),u._emitLine('frame.set("'+d+'", '+d+");")})):(a=r.name.value,this._emitLine("runtime."+m+"("+f+", 1, function("+a+", "+o+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(r,f,o,c),this._withScopedSyntax(function(){var d;s&&(d=u._pushBuffer()),u.compile(r.body,i),u._emitLine("next("+o+(d?","+d:"")+");"),s&&u._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),r.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l.compileAsyncEach=function(r,i){this._compileAsyncLoop(r,i)},l.compileAsyncAll=function(r,i){this._compileAsyncLoop(r,i,!0)},l._compileMacro=function(r,_){var s=this,a=[],u=null,o="macro_"+this._tmpid(),c=_!==void 0,f=(r.args.children.forEach(function(S,w){w===r.args.children.length-1&&S instanceof X.Dict?u=S:(s.assertType(S,X.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),d=(u&&u.children||[]).map(function(S){return'"'+S.key.value+'"'}),y=c?_.push(!0):new lE,_=(this._emitLines("var "+o+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.join(", ")+"], ","function ("+f.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),y.set(S.value,"l_"+S.value)}),u&&u.children.forEach(function(S){var w=S.key.value;s._emit('frame.set("'+w+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+w+'")'),s._emit(' ? kwargs["'+w+'"] : '),s._compileExpression(S.value,y),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(r.body,y)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine(
Line truncated
|
||||
`))})},l.compileRoot=function(r,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new lE,this._emitFuncBegin(r,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(r,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=r.findAll(X.Block)).forEach(function(u,o){var c=u.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),s._emitFuncBegin(u,"b_"+c),c=new lE,s._emitLine("var frame = frame.push(true);"),s.compile(u.body,c),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(u,o){u="b_"+u.name.value,s._emitLine(u+": "+u+",")}),this._emitLine(`root: root
|
||||
};`)},l.compile=function(r,i){var s=this["compile"+r.typename];s?s.call(this,r,i):this.fail("compile: Cannot compile node: "+r.typename,r.lineno,r.colno)},l.getCode=function(){return this.codebuf.join("")},n}(c4.Obj),H_e={compile:function(s,e,n,l,r){var i=new CB(l,(r=r===void 0?{}:r).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,u){return u(a)},s);return i.compile(j_e.transform(P_e.parse(s,n,r),e,l)),i.getCode()},Compiler:CB},V_e=mt(function(t){function e(d,y){return d==null||d===!1?y:d}function n(d){return d!=d}function l(d){var y=(d=e(d,"")).toLowerCase();return yt.copySafeness(d,y.charAt(0).toUpperCase()+y.slice(1))}function r(d){if(Fe.isString(d))return d.split("");if(Fe.isObject(d))return Fe._entries(d||{}).map(function(y){return{key:y[0],value:y[1]}});if(Fe.isArray(d))return d;throw new Fe.TemplateError("list filter: type not iterable")}function i(d){return function(y,_,S){var w=this,E=w.env.getTest(_=_===void 0?"truthy":_);return Fe.toArray(y).filter(function(g){return E.call(w,g,S)===d})}}function s(d){return yt.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(d,y,_){for(var S=[],w=[],E=0;E<d.length;E++)E%y==0&&w.length&&(S.push(w),w=[]),w.push(d[E]);if(w.length){if(_)for(E=w.length;E<y;E++)w.push(_);S.push(w)}return S},t.capitalize=l,t.center=function(d,y){var _;return(d=e(d,"")).length>=(y=y||80)?d:(y-=d.length,_=Fe.repeat(" ",y/2-y%2),y=Fe.repeat(" ",y/2),yt.copySafeness(d,_+d+y))},t.default=function(d,y,_){return _?d||y:d!==void 0?d:y},t.dictsort=function(d,y,_){if(!Fe.isObject(d))throw new Fe.TemplateError("dictsort filter: val must be an object");var S,w,E=[];for(w in d)E.push([w,d[w]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new Fe.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return E.sort(function(g,v){return g=g[S],v=v[S],y||(Fe.isString(g)&&(g=g.toUpperCase()),Fe.isString(v)&&(v=v.toUpperCase())),v<g?1:g===v?0:-1}),E},t.dump=function(d,y){return JSON.stringify(d,null,y)},t.escape=function(d){return d instanceof yt.SafeString?d:yt.markSafe(Fe.escape((d=d??"").toString()))},t.safe=function(d){return d instanceof yt.SafeString?d:yt.markSafe((d=d??"").toString())},t.first=function(d){return d[0]},t.forceescape=function(d){return yt.markSafe(Fe.escape((d=d??"").toString()))},t.groupby=function(d,y){return Fe.groupBy(d,y,this.env.opts.throwOnUndefined)},t.indent=function(d,E,_){if((d=e(d,""))==="")return"";E=E||4;var S=d.split(`
|
||||
else {`),this._emit("cb()")),this._emitLine("}")},l.compileIfAsync=function(r,i){this._emit("(function(cb) {"),this.compileIf(r,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},l._emitLoopBindings=function(r,i,s,a){var u=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(o){u._emitLine('frame.set("loop.'+o.name+'", '+o.val+");")})},l.compileFor=function(r,i){var s,a,u,o,c=this,f=this._tmpid(),m=this._tmpid(),d=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+d+" = "),this._compileExpression(r.arr,i),this._emitLine(";"),this._emit("if("+d+") {"),this._emitLine(d+" = runtime.fromIterator("+d+");"),r.name instanceof X.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),r.name.children.forEach(function(y,_){var S=c._tmpid();c._emitLine("var "+S+" = "+d+"["+f+"]["+_+"];"),c._emitLine('frame.set("'+y+'", '+d+"["+f+"]["+_+"]);"),i.set(r.name.children[_].value,S)}),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)}),this._emitLine("}"),this._emitLine("} else {"),o=(s=r.name.children)[0],s=s[1],a=this._tmpid(),u=this._tmpid(),i.set(o.value,a),i.set(s.value,u),this._emitLine(f+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+d+").length;"),this._emitLine("for(var "+a+" in "+d+") {"),this._emitLine(f+"++;"),this._emitLine("var "+u+" = "+d+"["+a+"];"),this._emitLine('frame.set("'+o.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+u+");"),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)}),this._emitLine("}")):(o=this._tmpid(),i.set(r.name.value,o),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),this._emitLine("var "+o+" = "+d+"["+f+"];"),this._emitLine('frame.set("'+r.name.value+'", '+o+");"),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)})),this._emitLine("}"),this._emitLine("}"),r.else_&&(this._emitLine("if (!"+m+") {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l._compileAsyncLoop=function(r,i,s){var a,u=this,o=this._tmpid(),c=this._tmpid(),f=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(r.arr,i),this._emitLine(");"),r.name instanceof X.Array?(a=r.name.children.length,this._emit("runtime."+m+"("+f+", "+a+", function("),r.name.children.forEach(function(d){u._emit(d.value+",")}),this._emit(o+","+c+",next) {"),r.name.children.forEach(function(d){d=d.value,i.set(d,d),u._emitLine('frame.set("'+d+'", '+d+");")})):(a=r.name.value,this._emitLine("runtime."+m+"("+f+", 1, function("+a+", "+o+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(r,f,o,c),this._withScopedSyntax(function(){var d;s&&(d=u._pushBuffer()),u.compile(r.body,i),u._emitLine("next("+o+(d?","+d:"")+");"),s&&u._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),r.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l.compileAsyncEach=function(r,i){this._compileAsyncLoop(r,i)},l.compileAsyncAll=function(r,i){this._compileAsyncLoop(r,i,!0)},l._compileMacro=function(r,_){var s=this,a=[],u=null,o="macro_"+this._tmpid(),c=_!==void 0,f=(r.args.children.forEach(function(S,w){w===r.args.children.length-1&&S instanceof X.Dict?u=S:(s.assertType(S,X.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),d=(u&&u.children||[]).map(function(S){return'"'+S.key.value+'"'}),y=c?_.push(!0):new iE,_=(this._emitLines("var "+o+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.join(", ")+"], ","function ("+f.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),y.set(S.value,"l_"+S.value)}),u&&u.children.forEach(function(S){var w=S.key.value;s._emit('frame.set("'+w+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+w+'")'),s._emit(' ? kwargs["'+w+'"] : '),s._compileExpression(S.value,y),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(r.body,y)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine(
Line truncated
|
||||
`))})},l.compileRoot=function(r,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new iE,this._emitFuncBegin(r,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(r,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=r.findAll(X.Block)).forEach(function(u,o){var c=u.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),s._emitFuncBegin(u,"b_"+c),c=new iE,s._emitLine("var frame = frame.push(true);"),s.compile(u.body,c),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(u,o){u="b_"+u.name.value,s._emitLine(u+": "+u+",")}),this._emitLine(`root: root
|
||||
};`)},l.compile=function(r,i){var s=this["compile"+r.typename];s?s.call(this,r,i):this.fail("compile: Cannot compile node: "+r.typename,r.lineno,r.colno)},l.getCode=function(){return this.codebuf.join("")},n}(f4.Obj),Z_e={compile:function(s,e,n,l,r){var i=new DB(l,(r=r===void 0?{}:r).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,u){return u(a)},s);return i.compile(K_e.transform(z_e.parse(s,n,r),e,l)),i.getCode()},Compiler:DB},eEe=mt(function(t){function e(d,y){return d==null||d===!1?y:d}function n(d){return d!=d}function l(d){var y=(d=e(d,"")).toLowerCase();return yt.copySafeness(d,y.charAt(0).toUpperCase()+y.slice(1))}function r(d){if(Fe.isString(d))return d.split("");if(Fe.isObject(d))return Fe._entries(d||{}).map(function(y){return{key:y[0],value:y[1]}});if(Fe.isArray(d))return d;throw new Fe.TemplateError("list filter: type not iterable")}function i(d){return function(y,_,S){var w=this,E=w.env.getTest(_=_===void 0?"truthy":_);return Fe.toArray(y).filter(function(g){return E.call(w,g,S)===d})}}function s(d){return yt.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(d,y,_){for(var S=[],w=[],E=0;E<d.length;E++)E%y==0&&w.length&&(S.push(w),w=[]),w.push(d[E]);if(w.length){if(_)for(E=w.length;E<y;E++)w.push(_);S.push(w)}return S},t.capitalize=l,t.center=function(d,y){var _;return(d=e(d,"")).length>=(y=y||80)?d:(y-=d.length,_=Fe.repeat(" ",y/2-y%2),y=Fe.repeat(" ",y/2),yt.copySafeness(d,_+d+y))},t.default=function(d,y,_){return _?d||y:d!==void 0?d:y},t.dictsort=function(d,y,_){if(!Fe.isObject(d))throw new Fe.TemplateError("dictsort filter: val must be an object");var S,w,E=[];for(w in d)E.push([w,d[w]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new Fe.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return E.sort(function(g,v){return g=g[S],v=v[S],y||(Fe.isString(g)&&(g=g.toUpperCase()),Fe.isString(v)&&(v=v.toUpperCase())),v<g?1:g===v?0:-1}),E},t.dump=function(d,y){return JSON.stringify(d,null,y)},t.escape=function(d){return d instanceof yt.SafeString?d:yt.markSafe(Fe.escape((d=d??"").toString()))},t.safe=function(d){return d instanceof yt.SafeString?d:yt.markSafe((d=d??"").toString())},t.first=function(d){return d[0]},t.forceescape=function(d){return yt.markSafe(Fe.escape((d=d??"").toString()))},t.groupby=function(d,y){return Fe.groupBy(d,y,this.env.opts.throwOnUndefined)},t.indent=function(d,E,_){if((d=e(d,""))==="")return"";E=E||4;var S=d.split(`
|
||||
`),w=Fe.repeat(" ",E),E=S.map(function(g,v){return v!==0||_?""+w+g:g}).join(`
|
||||
`);return yt.copySafeness(d,E)},t.join=function(d,y,_){return y=y||"",(d=_?Fe.map(d,function(S){return S[_]}):d).join(y)},t.last=function(d){return d[d.length-1]},t.length=function(d){return(d=e(d,""))!==void 0?typeof Map=="function"&&d instanceof Map||typeof Set=="function"&&d instanceof Set?d.size:(!Fe.isObject(d)||d instanceof yt.SafeString?d:Fe.keys(d)).length:0},t.list=r,t.lower=function(d){return(d=e(d,"")).toLowerCase()},t.nl2br=function(d){return d==null?"":yt.copySafeness(d,d.replace(/\r\n|\n/g,`<br />
|
||||
`))},t.random=function(d){return d[Math.floor(Math.random()*d.length)]},t.reject=i(!1),t.rejectattr=function(d,y){return d.filter(function(_){return!_[y]})},t.select=i(!0),t.selectattr=function(d,y){return d.filter(function(_){return!!_[y]})},t.replace=function(d,y,_,S){var w=d;if(y instanceof RegExp)return d.replace(y,_);S===void 0&&(S=-1);var E="";if(typeof y=="number")y=""+y;else if(typeof y!="string")return d;if(typeof(d=typeof d=="number"?""+d:d)!="string"&&!(d instanceof yt.SafeString))return d;if(y==="")return E=_+d.split("").join(_)+_,yt.copySafeness(d,E);var g=d.indexOf(y);if(S===0||g===-1)return d;for(var v=0,x=0;-1<g&&(S===-1||x<S);)E+=d.substring(v,g)+_,v=g+y.length,x++,g=d.indexOf(y,v);return v<d.length&&(E+=d.substring(v)),yt.copySafeness(w,E)},t.reverse=function(d){var y;return(y=Fe.isString(d)?r(d):Fe.map(d,function(_){return _})).reverse(),Fe.isString(d)?yt.copySafeness(d,y.join("")):y},t.round=function(d,y,_){return y=y||0,y=Math.pow(10,y),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(d*y)/y},t.slice=function(d,y,_){for(var S=Math.floor(d.length/y),w=d.length%y,E=[],g=0,v=0;v<y;v++){var x=g+v*S;v<w&&g++,x=d.slice(x,g+(v+1)*S),_&&w<=v&&x.push(_),E.push(x)}return E},t.sum=function(d,y,_){return(_=_===void 0?0:_)+(d=y?Fe.map(d,function(S){return S[y]}):d).reduce(function(S,w){return S+w},0)},t.sort=yt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,y,_,S){var w=this,E=Fe.map(E,function(v){return v}),g=Fe.getAttrGetter(S);return E.sort(function(v,x){if(v=S?g(v):v,x=S?g(x):x,w.env.opts.throwOnUndefined&&S&&(v===void 0||x===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&Fe.isString(v)&&Fe.isString(x)&&(v=v.toLowerCase(),x=x.toLowerCase()),v<x?y?1:-1:x<v?y?-1:1:0}),E}),t.string=function(d){return yt.copySafeness(d,d)},t.striptags=function(d,S){var _=s((d=e(d,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
|
||||
`).replace(/\n\n\n+/g,`
|
||||
|
||||
`):_.replace(/\s+/gi," ");return yt.copySafeness(d,S)},t.title=function(d){var y=(d=e(d,"")).split(" ").map(l);return yt.copySafeness(d,y.join(" "))},t.trim=s,t.truncate=function(d,y,_,S){var w=d;return(d=e(d,"")).length<=(y=y||255)?d:(d=_?d.substring(0,y):((_=d.lastIndexOf(" ",y))===-1&&(_=y),d.substring(0,_)),yt.copySafeness(w,d+=S??"..."))},t.upper=function(d){return(d=e(d,"")).toUpperCase()},t.urlencode=function(d){var y=encodeURIComponent;return Fe.isString(d)?y(d):(Fe.isArray(d)?d:Fe._entries(d)).map(function(w){var S=w[0],w=w[1];return y(S)+"="+y(w)}).join("&")};var a=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,u=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,o=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(d,y,_){n(y)&&(y=1/0);var S=_===!0?' rel="nofollow"':"";return d.split(/(\s+)/).filter(function(w){return w&&w.length}).map(function(w){var E=w.match(a),g=(E=E?E[1]:w).substr(0,y);return o.test(E)?'<a href="'+E+'"'+S+">"+g+"</a>":c.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":u.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":w}).join("")},t.wordcount=function(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},t.float=function(d,y){return n(d=parseFloat(d))?y:d},yt.makeMacro(["value","default","base"],[],function(d,y,_){return _===void 0&&(_=10),n(d=parseInt(d,_))?y:d}));t.int=m,t.d=t.default,t.e=t.escape}),Q7={};function DV(t,e){for(var n=0,l=t.length-1;0<=l;l--){var r=t[l];r==="."?t.splice(l,1):r===".."?(t.splice(l,1),n++):n&&(t.splice(l,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var q_e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,rE=function(t){return q_e.exec(t).slice(1)};function iE(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var l=0<=n?arguments[n]:"/";if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");l&&(t=l+"/"+t,e=l.charAt(0)==="/")}return(e?"/":"")+DV(lb(t.split("/"),function(r){return!!r}),!e).join("/")||"."}function RB(t){var e=PV(t),n=z_e(t,-1)==="/";return(t=(t=DV(lb(t.split("/"),function(l){return!!l}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function PV(t){return t.charAt(0)==="/"}var i4={extname:function(t){return rE(t)[3]},basename:function(t,e){return t=rE(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=rE(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(o){for(var c=0;c<o.length&&o[c]==="";c++);for(var f=o.length-1;0<=f&&o[f]==="";f--);return f<c?[]:o.slice(c,f-c+1)}t=iE(t).substr(1),e=iE(e).substr(1);for(var l=n(t.split("/")),r=n(e.split("/")),i=Math.min(l.length,r.length),s=i,a=0;a<i;a++)if(l[a]!==r[a]){s=a;break}for(var u=[],a=s;a<l.length;a++)u.push("..");return(u=u.concat(r.slice(s))).join("/")},join:function(){return RB(lb(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:PV,normalize:RB,resolve:iE};function lb(t,e){if(t.filter)return t.filter(e);for(var n=[],l=0;l<t.length;l++)e(t[l],l,t)&&n.push(t[l]);return n}var z_e="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 LV(t,e){return(LV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var rb=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(l=n).prototype=Object.create(e.prototype),LV(l.prototype.constructor=l,e);var l=n.prototype;return l.resolve=function(r,i){return i4.resolve(i4.dirname(r),i)},l.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},n}(c4.EmitterObj);function FV(t,e){return(FV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var G_e=function(t){var e,n;function l(r){var i;return(i=t.call(this)||this).precompiled=r||{},i}return n=t,(e=l).prototype=Object.create(n.prototype),FV(e.prototype.constructor=e,n),l.prototype.getSource=function(r){return this.precompiled[r]?{src:{type:"code",obj:this.precompiled[r]},path:r}:null},l}(rb);function jV(t,e){t.prototype=Object.create(e.prototype),UV(t.prototype.constructor=t,e)}function UV(t,e){return(UV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var J_e=G_e,K_e=function(t){function e(n,l){var r=t.call(this)||this;return typeof l=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),l=l||{},r.pathsToNames={},r.noCache=!!l.noCache,n?(n=Array.isArray(n)?n:[n],r.searchPaths=n.map(i4.normalize)):r.searchPaths=["."],l.watch,r}return jV(e,t),e.prototype.getSource=function(n){for(var l=null,r=this.searchPaths,i=0;i<r.length;i++){var s=i4.resoLine truncated
|
||||
`):_.replace(/\s+/gi," ");return yt.copySafeness(d,S)},t.title=function(d){var y=(d=e(d,"")).split(" ").map(l);return yt.copySafeness(d,y.join(" "))},t.trim=s,t.truncate=function(d,y,_,S){var w=d;return(d=e(d,"")).length<=(y=y||255)?d:(d=_?d.substring(0,y):((_=d.lastIndexOf(" ",y))===-1&&(_=y),d.substring(0,_)),yt.copySafeness(w,d+=S??"..."))},t.upper=function(d){return(d=e(d,"")).toUpperCase()},t.urlencode=function(d){var y=encodeURIComponent;return Fe.isString(d)?y(d):(Fe.isArray(d)?d:Fe._entries(d)).map(function(w){var S=w[0],w=w[1];return y(S)+"="+y(w)}).join("&")};var a=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,u=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,o=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(d,y,_){n(y)&&(y=1/0);var S=_===!0?' rel="nofollow"':"";return d.split(/(\s+)/).filter(function(w){return w&&w.length}).map(function(w){var E=w.match(a),g=(E=E?E[1]:w).substr(0,y);return o.test(E)?'<a href="'+E+'"'+S+">"+g+"</a>":c.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":u.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":w}).join("")},t.wordcount=function(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},t.float=function(d,y){return n(d=parseFloat(d))?y:d},yt.makeMacro(["value","default","base"],[],function(d,y,_){return _===void 0&&(_=10),n(d=parseInt(d,_))?y:d}));t.int=m,t.d=t.default,t.e=t.escape}),tp={};function jV(t,e){for(var n=0,l=t.length-1;0<=l;l--){var r=t[l];r==="."?t.splice(l,1):r===".."?(t.splice(l,1),n++):n&&(t.splice(l,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var tEe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,sE=function(t){return tEe.exec(t).slice(1)};function aE(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var l=0<=n?arguments[n]:"/";if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");l&&(t=l+"/"+t,e=l.charAt(0)==="/")}return(e?"/":"")+jV(ib(t.split("/"),function(r){return!!r}),!e).join("/")||"."}function PB(t){var e=UV(t),n=nEe(t,-1)==="/";return(t=(t=jV(ib(t.split("/"),function(l){return!!l}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function UV(t){return t.charAt(0)==="/"}var a4={extname:function(t){return sE(t)[3]},basename:function(t,e){return t=sE(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=sE(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(o){for(var c=0;c<o.length&&o[c]==="";c++);for(var f=o.length-1;0<=f&&o[f]==="";f--);return f<c?[]:o.slice(c,f-c+1)}t=aE(t).substr(1),e=aE(e).substr(1);for(var l=n(t.split("/")),r=n(e.split("/")),i=Math.min(l.length,r.length),s=i,a=0;a<i;a++)if(l[a]!==r[a]){s=a;break}for(var u=[],a=s;a<l.length;a++)u.push("..");return(u=u.concat(r.slice(s))).join("/")},join:function(){return PB(ib(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:UV,normalize:PB,resolve:aE};function ib(t,e){if(t.filter)return t.filter(e);for(var n=[],l=0;l<t.length;l++)e(t[l],l,t)&&n.push(t[l]);return n}var nEe="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 MV(t,e){return(MV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var sb=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(l=n).prototype=Object.create(e.prototype),MV(l.prototype.constructor=l,e);var l=n.prototype;return l.resolve=function(r,i){return a4.resolve(a4.dirname(r),i)},l.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},n}(f4.EmitterObj);function $V(t,e){return($V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var lEe=function(t){var e,n;function l(r){var i;return(i=t.call(this)||this).precompiled=r||{},i}return n=t,(e=l).prototype=Object.create(n.prototype),$V(e.prototype.constructor=e,n),l.prototype.getSource=function(r){return this.precompiled[r]?{src:{type:"code",obj:this.precompiled[r]},path:r}:null},l}(sb);function BV(t,e){t.prototype=Object.create(e.prototype),HV(t.prototype.constructor=t,e)}function HV(t,e){return(HV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var rEe=lEe,iEe=function(t){function e(n,l){var r=t.call(this)||this;return typeof l=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),l=l||{},r.pathsToNames={},r.noCache=!!l.noCache,n?(n=Array.isArray(n)?n:[n],r.searchPaths=n.map(a4.normalize)):r.searchPaths=["."],l.watch,r}return BV(e,t),e.prototype.getSource=function(n){for(var l=null,r=this.searchPaths,i=0;i<r.length;i++){var s=a4.resoLine truncated
|
||||
/* [wrapped with `+L+`] */
|
||||
`)):C}(A,function(C,L){return Xl(m,function(z){var K="_."+z[0];L&z[1]&&!pr(C,K)&&C.push(K)}),C.sort()}(function(){var C=A.match(o3);return C?C[1].split(hl):[]}(),b)))}function eA(p){var h=0,b=0;return function(){var A=see(),C=16-(A-b);if(b=A,0<C){if(800<=++h)return arguments[0]}else h=0;return p.apply(n,arguments)}}function k8(p,h){var b=-1,A=p.length,C=A-1;for(h=h===n?A:h;++b<h;){var L=Wf(b,C),z=p[L];p[L]=p[b],p[b]=z}return p.length=h,p}var tA=function(){var p=F8(function(b){var A=[];return b.charCodeAt(0)===46&&A.push(""),b.replace(dt,function(C,L,z,K){A.push(z?K.replace(w2,"$1"):L||C)}),A},function(b){return h.size===500&&h.clear(),b}),h=p.cache;return p}();function zr(p){var h;return typeof p=="string"||k3(p)?p:(h=p+"")=="0"&&1/p==-1/0?"-0":h}function hu(p){if(p!=null){try{return o8.call(p)}catch{}try{return p+""}catch{}}return""}function nA(p){var h;return p instanceof Xt?p.clone():((h=new dr(p.__wrapped__,p.__chain__)).__actions__=c3(p.__actions__),h.__index__=p.__index__,h.__values__=p.__values__,h)}function lA(p,h,b){var A=p==null?0:p.length;return A?((b=b==null?0:At(b))<0&&(b=Yl(A+b,0)),Mr(p,ut(h,3),b)):-1}function rA(p,h,b){var A,C=p==null?0:p.length;return C?(A=C-1,b!==n&&(A=At(b),A=b<0?Yl(C+A,0):P2(A,C-1)),Mr(p,ut(h,3),A,!0)):-1}function iA(p){return p!=null&&p.length?T2(p,1):[]}function sA(p){return p&&p.length?p[0]:n}function G3(p){var h=p==null?0:p.length;return h?p[h-1]:n}function aA(p,h){return p&&p.length&&h&&h.length?Xf(p,h):p}Uf=Rt(function(p,h){return Pl(p)?Q4(p,T2(h,1,Pl,!0)):[]}),Hr=Rt(function(p,h){var b=G3(h);return Pl(b)&&(b=n),Pl(p)?Q4(p,T2(h,1,Pl,!0),ut(b,2)):[]}),K4=Rt(function(p,h){var b=G3(h);return Pl(b)&&(b=n),Pl(p)?Q4(p,T2(h,1,Pl,!0),n,b):[]}),Qt=Rt(function(p){var h=on(p,td);return h.length&&h[0]===p[0]?zf(h):[]}),Io=Rt(function(p){var h=G3(p),b=on(p,td);return h===G3(b)?h=n:b.pop(),b.length&&b[0]===p[0]?zf(b,ut(h,2)):[]}),Mf=Rt(function(p){var h=G3(p),b=on(p,td);return(h=typeof h=="function"?h:n)&&b.pop(),b.length&&b[0]===p[0]?zf(b,n,h):[]}),L2=Rt(aA);var bee=Ci(function(p,h){var b=p==null?0:p.length,A=Bf(p,h);return Ex(p,on(h,function(C){return Ri(C,b)?+C:C}).sort(Rx)),A});function yd(p){return p==null?p:uee.call(p)}var wee=Rt(function(p){return cs(T2(p,1,Pl,!0))}),See=Rt(function(p){var h=G3(p);return Pl(h)&&(h=n),cs(T2(p,1,Pl,!0),ut(h,2))}),Tee=Rt(function(p){var h=typeof(h=G3(p))=="function"?h:n;return cs(T2(p,1,Pl,!0),n,h)});function gd(p){var h;return p&&p.length?(h=0,p=c2(p,function(b){if(Pl(b))return h=Yl(b.length,h),!0}),l8(h,function(b){return on(p,$r(b))})):[]}function uA(p,h){return p&&p.length?(p=gd(p),h==null?p:on(p,function(b){return o2(h,n,b)})):[]}var xee=Rt(function(p,h){return Pl(p)?Q4(p,h):[]}),Aee=Rt(function(p){return ed(c2(p,Pl))}),Oee=Rt(function(p){var h=G3(p);return Pl(h)&&(h=n),ed(c2(p,Pl),ut(h,2))}),Nee=Rt(function(p){var h=typeof(h=G3(p))=="function"?h:n;return ed(c2(p,Pl),n,h)}),Cee=Rt(gd),Ree=Rt(function(p){var h=typeof(h=1<(h=p.length)?p[h-1]:n)=="function"?(p.pop(),h):n;return uA(p,h)});function oA(p){return(p=I(p)).__chain__=!0,p}function D8(p,h){return h(p)}var Iee=Ci(function(p){function h(L){return Bf(L,p)}var b=p.length,A=b?p[0]:0,C=this.__wrapped__;return!(1<b||this.__actions__.length)&&C instanceof Xt&&Ri(A)?((C=C.slice(A,+A+(b?1:0))).__actions__.push({func:D8,args:[h],thisArg:n}),new dr(C,this.__chain__).thru(function(L){return b&&!L.length&&L.push(n),L})):this.thru(h)}),kee=x8(function(p,h,b){Wn.call(p,b)?++p[b]:Oi(p,b,1)}),Dee=Fx(lA),Pee=Fx(rA);function cA(p,h){return(St(p)?Xl:os)(p,ut(h,3))}function pA(p,h){return(St(p)?function(b,A){for(var C=b==null?0:b.length;C--&&A(b[C],C,b)!==!1;);return b}:ax)(p,ut(h,3))}var Lee=x8(function(p,h,b){Wn.call(p,b)?p[b].push(h):Oi(p,b,[h])}),Fee=Rt(function(p,h,b){var A=-1,C=typeof h=="function",L=p3(p)?he(p.length):[];return os(p,function(z){L[++A]=C?o2(h,z,b):Z4(z,h,b)}),L}),jee=x8(function(p,h,b){Oi(p,b,h)});function P8(p,h){return(St(p)?on:hx)(p,ut(h,3))}var Uee=x8(function(p,h,b){p[b?0:1].push(h)},function(){return[[],[]]}),Mee=Rt(function(p,h){var b;return p==null?[]:(1<(b=h.length)&&Z2(p,h[0],h[1])?h=[]:2<b&&Z2(h[0],h[1],h[2])&&(h=[h[0]]),vx(p,T2(h,1),[]))}),L8=_d||function(){return pl.Date.now()};function fA(p,h,b){return h=b?n:h,h=p&&h==null?p.length:h,Ni(p,a,n,n,n,n,h)}function dA(p,h){var b;if(typeof h!="function")throw new V3(l);return p=At(p),function(){return 0<--p&&(b=h.apply(this,arguments)),p<=1&&(h=n),b}}var vd=Rt(function(p,h,b){var A,C=1;return b.length&&(A=Ti(b,jo(vd)),C|=s),Ni(p,C,h,b,A)}),hA=Rt(function(p,h,b){var A,C=3;return b.length&&(A=Ti(b,jo(hA)),C|=s),Ni(h,C,p,b,A)});function mA(p,h,b){var A,C,L,z,K,le,pe=0,fe=!1,Ae=!1,Ee=!0;if(typeof p!="function")throw new V3(l);function _e(We){var rt=A,ct=C;return A=C=n,pe=We,z=p.apply(ct,rt)}function xe(We){var rt=We-le;return le===n||h<=rt||rt<0||Ae&&L<=We-pe}function nt(){var We=L8();if(xe(We))return ke(We);K=r1(nt,function(rt){var ct=h-(rt-le);return Ae?P2(ct,L-(rt-pe)):ct}(We))}function ke(We){return K=n,Ee&&A?_e(We):(A=C=
Line truncated
|
||||
`;if(p.replace(fe,function(Ee,_e,xe,nt,ke,De){return xe=xe||nt,pe+=p.slice(K,De).replace(Vl,zT),_e&&(A=!0,pe+=`' +
|
||||
`)):C}(A,function(C,L){return Yl(m,function(z){var K="_."+z[0];L&z[1]&&!fr(C,K)&&C.push(K)}),C.sort()}(function(){var C=A.match(c3);return C?C[1].split(ml):[]}(),b)))}function rA(p){var h=0,b=0;return function(){var A=gee(),C=16-(A-b);if(b=A,0<C){if(800<=++h)return arguments[0]}else h=0;return p.apply(n,arguments)}}function L8(p,h){var b=-1,A=p.length,C=A-1;for(h=h===n?A:h;++b<h;){var L=Qf(b,C),z=p[L];p[L]=p[b],p[b]=z}return p.length=h,p}var iA=function(){var p=M8(function(b){var A=[];return b.charCodeAt(0)===46&&A.push(""),b.replace(dt,function(C,L,z,K){A.push(z?K.replace(S2,"$1"):L||C)}),A},function(b){return h.size===500&&h.clear(),b}),h=p.cache;return p}();function Gr(p){var h;return typeof p=="string"||D3(p)?p:(h=p+"")=="0"&&1/p==-1/0?"-0":h}function yu(p){if(p!=null){try{return f8.call(p)}catch{}try{return p+""}catch{}}return""}function sA(p){var h;return p instanceof Xt?p.clone():((h=new hr(p.__wrapped__,p.__chain__)).__actions__=p3(p.__actions__),h.__index__=p.__index__,h.__values__=p.__values__,h)}function aA(p,h,b){var A=p==null?0:p.length;return A?((b=b==null?0:At(b))<0&&(b=Zl(A+b,0)),$r(p,ut(h,3),b)):-1}function uA(p,h,b){var A,C=p==null?0:p.length;return C?(A=C-1,b!==n&&(A=At(b),A=b<0?Zl(C+A,0):L2(A,C-1)),$r(p,ut(h,3),A,!0)):-1}function oA(p){return p!=null&&p.length?x2(p,1):[]}function cA(p){return p&&p.length?p[0]:n}function J3(p){var h=p==null?0:p.length;return h?p[h-1]:n}function pA(p,h){return p&&p.length&&h&&h.length?Yf(p,h):p}$f=Rt(function(p,h){return Fl(p)?t1(p,x2(h,1,Fl,!0)):[]}),Vr=Rt(function(p,h){var b=J3(h);return Fl(b)&&(b=n),Fl(p)?t1(p,x2(h,1,Fl,!0),ut(b,2)):[]}),Y4=Rt(function(p,h){var b=J3(h);return Fl(b)&&(b=n),Fl(p)?t1(p,x2(h,1,Fl,!0),n,b):[]}),Qt=Rt(function(p){var h=on(p,ld);return h.length&&h[0]===p[0]?Jf(h):[]}),Do=Rt(function(p){var h=J3(p),b=on(p,ld);return h===J3(b)?h=n:b.pop(),b.length&&b[0]===p[0]?Jf(b,ut(h,2)):[]}),Bf=Rt(function(p){var h=J3(p),b=on(p,ld);return(h=typeof h=="function"?h:n)&&b.pop(),b.length&&b[0]===p[0]?Jf(b,n,h):[]}),F2=Rt(pA);var kee=Ii(function(p,h){var b=p==null?0:p.length,A=Vf(p,h);return Tx(p,on(h,function(C){return ki(C,b)?+C:C}).sort(Px)),A});function vd(p){return p==null?p:_ee.call(p)}var Dee=Rt(function(p){return fs(x2(p,1,Fl,!0))}),Pee=Rt(function(p){var h=J3(p);return Fl(h)&&(h=n),fs(x2(p,1,Fl,!0),ut(h,2))}),Lee=Rt(function(p){var h=typeof(h=J3(p))=="function"?h:n;return fs(x2(p,1,Fl,!0),n,h)});function _d(p){var h;return p&&p.length?(h=0,p=f2(p,function(b){if(Fl(b))return h=Zl(b.length,h),!0}),s8(h,function(b){return on(p,Br(b))})):[]}function fA(p,h){return p&&p.length?(p=_d(p),h==null?p:on(p,function(b){return p2(h,n,b)})):[]}var Fee=Rt(function(p,h){return Fl(p)?t1(p,h):[]}),jee=Rt(function(p){return nd(f2(p,Fl))}),Uee=Rt(function(p){var h=J3(p);return Fl(h)&&(h=n),nd(f2(p,Fl),ut(h,2))}),Mee=Rt(function(p){var h=typeof(h=J3(p))=="function"?h:n;return nd(f2(p,Fl),n,h)}),$ee=Rt(_d),Bee=Rt(function(p){var h=typeof(h=1<(h=p.length)?p[h-1]:n)=="function"?(p.pop(),h):n;return fA(p,h)});function dA(p){return(p=I(p)).__chain__=!0,p}function F8(p,h){return h(p)}var Hee=Ii(function(p){function h(L){return Vf(L,p)}var b=p.length,A=b?p[0]:0,C=this.__wrapped__;return!(1<b||this.__actions__.length)&&C instanceof Xt&&ki(A)?((C=C.slice(A,+A+(b?1:0))).__actions__.push({func:F8,args:[h],thisArg:n}),new hr(C,this.__chain__).thru(function(L){return b&&!L.length&&L.push(n),L})):this.thru(h)}),Vee=N8(function(p,h,b){Yn.call(p,b)?++p[b]:Ci(p,b,1)}),qee=$x(aA),zee=$x(uA);function hA(p,h){return(St(p)?Yl:ps)(p,ut(h,3))}function mA(p,h){return(St(p)?function(b,A){for(var C=b==null?0:b.length;C--&&A(b[C],C,b)!==!1;);return b}:px)(p,ut(h,3))}var Gee=N8(function(p,h,b){Yn.call(p,b)?p[b].push(h):Ci(p,b,[h])}),Jee=Rt(function(p,h,b){var A=-1,C=typeof h=="function",L=f3(p)?he(p.length):[];return ps(p,function(z){L[++A]=C?p2(h,z,b):n1(z,h,b)}),L}),Kee=N8(function(p,h,b){Ci(p,b,h)});function j8(p,h){return(St(p)?on:vx)(p,ut(h,3))}var Xee=N8(function(p,h,b){p[b?0:1].push(h)},function(){return[[],[]]}),Wee=Rt(function(p,h){var b;return p==null?[]:(1<(b=h.length)&&e3(p,h[0],h[1])?h=[]:2<b&&e3(h[0],h[1],h[2])&&(h=[h[0]]),wx(p,x2(h,1),[]))}),U8=bd||function(){return fl.Date.now()};function yA(p,h,b){return h=b?n:h,h=p&&h==null?p.length:h,Ri(p,a,n,n,n,n,h)}function gA(p,h){var b;if(typeof h!="function")throw new q3(l);return p=At(p),function(){return 0<--p&&(b=h.apply(this,arguments)),p<=1&&(h=n),b}}var Ed=Rt(function(p,h,b){var A,C=1;return b.length&&(A=Ai(b,Mo(Ed)),C|=s),Ri(p,C,h,b,A)}),vA=Rt(function(p,h,b){var A,C=3;return b.length&&(A=Ai(b,Mo(vA)),C|=s),Ri(h,C,p,b,A)});function _A(p,h,b){var A,C,L,z,K,le,pe=0,fe=!1,Ae=!1,Ee=!0;if(typeof p!="function")throw new q3(l);function _e(We){var rt=A,ct=C;return A=C=n,pe=We,z=p.apply(ct,rt)}function xe(We){var rt=We-le;return le===n||h<=rt||rt<0||Ae&&L<=We-pe}function nt(){var We=U8();if(xe(We))return ke(We);K=a1(nt,function(rt){var ct=h-(rt-le);return Ae?L2(ct,L-(rt-pe)):ct}(We))}function ke(We){return K=n,Ee&&A?_e(We):(A=C=
Line truncated
|
||||
`;if(p.replace(fe,function(Ee,_e,xe,nt,ke,Pe){return xe=xe||nt,pe+=p.slice(K,Pe).replace(zl,XT),_e&&(A=!0,pe+=`' +
|
||||
__e(`+_e+`) +
|
||||
'`),ke&&(C=!0,pe+=`';
|
||||
`+ke+`;
|
||||
__p += '`),xe&&(pe+=`' +
|
||||
((__t = (`+xe+`)) == null ? '' : __t) +
|
||||
'`),K=De+Ee.length,Ee}),pe+=`';
|
||||
`,le=Wn.call(h,"variable")&&h.variable){if(Tl.test(le))throw new lt("Invalid `variable` option passed into `_.template`")}else pe=`with (obj) {
|
||||
'`),K=Pe+Ee.length,Ee}),pe+=`';
|
||||
`,le=Yn.call(h,"variable")&&h.variable){if(Al.test(le))throw new lt("Invalid `variable` option passed into `_.template`")}else pe=`with (obj) {
|
||||
`+pe+`
|
||||
}
|
||||
`;if(pe=(C?pe.replace(Tt,""):pe).replace(Qe,"$1").replace(ft,"$1;"),pe="function("+(le||"obj")+`) {
|
||||
@@ -387,25 +387,25 @@ __p += '`),xe&&(pe+=`' +
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+pe+`return __p
|
||||
}`,(fe=kA(function(){return wt(L,Ae+"return "+pe).apply(n,z)})).source=pe,wd(fe))throw fe;return fe},I.times=function(p,h){if((p=At(p))<1||o<p)return[];var b=f,A=P2(p,f);for(h=ut(h),p-=f,A=l8(A,h);++b<p;)h(b);return A},I.toFinite=ki,I.toInteger=At,I.toLength=wA,I.toLower=function(p){return hn(p).toLowerCase()},I.toNumber=K3,I.toSafeInteger=function(p){return p?pu(At(p),-9007199254740991,o):p===0?p:0},I.toString=hn,I.toUpper=function(p){return hn(p).toUpperCase()},I.trim=function(p,h,b){return(p=hn(p))&&(b||h===n)?Si(p):p&&(h=I3(h))?fs(b=fr(p),r8(b,h=fr(h)),i8(b,h)+1).join(""):p},I.trimEnd=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.slice(0,GT(p)+1):p&&(h=I3(h))?fs(b=fr(p),0,i8(b,fr(h))+1).join(""):p},I.trimStart=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.replace(Sl,""):p&&(h=I3(h))?fs(b=fr(p),r8(b,fr(h))).join(""):p},I.truncate=function(p,C){var b,z=30,A="...",C=(vl(C)&&(b="separator"in C?C.separator:b,z="length"in C?At(C.length):z,A="omission"in C?I3(C.omission):A),(p=hn(p)).length);if((C=su(p)?(L=fr(p)).length:C)<=z)return p;if((C=z-No(A))<1)return A;var L,z=L?fs(L,0,C).join(""):p.slice(0,C);if(b!==n)if(L&&(C+=z.length-C),Sd(b)){if(p.slice(C).search(b)){var K,le=z;for((b=b.global?b:au(b.source,hn(M3.exec(b))+"g")).lastIndex=0;K=b.exec(le);)var pe=K.index;z=z.slice(0,pe===n?C:pe)}}else p.indexOf(I3(b),C)!=C&&-1<(L=z.lastIndexOf(b))&&(z=z.slice(0,L));return z+A},I.unescape=function(p){return(p=hn(p))&&$t.test(p)?p.replace(ze,QZ):p},I.uniqueId=function(p){var h=++eee;return hn(p)+h},I.upperCase=cte,I.upperFirst=Ad,I.each=cA,I.eachRight=pA,I.first=sA,Cd(I,(Dd={},Vr(I,function(p,h){Wn.call(I.prototype,h)||(Dd[h]=p)}),Dd),{chain:!1}),I.VERSION="4.17.21",Xl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){I[p].placeholder=I}),Xl(["drop","take"],function(p,h){Xt.prototype[p]=function(b){b=b===n?1:Yl(At(b),0);var A=this.__filtered__&&!h?new Xt(this):this.clone();return A.__filtered__?A.__takeCount__=P2(b,A.__takeCount__):A.__views__.push({size:P2(b,f),type:p+(A.__dir__<0?"Right":"")}),A},Xt.prototype[p+"Right"]=function(b){return this.reverse()[p](b).reverse()}}),Xl(["filter","map","takeWhile"],function(p,h){var b=h+1,A=b==1||b==3;Xt.prototype[p]=function(C){var L=this.clone();return L.__iteratees__.push({iteratee:ut(C,3),type:b}),L.__filtered__=L.__filtered__||A,L}}),Xl(["head","last"],function(p,h){var b="take"+(h?"Right":"");Xt.prototype[p]=function(){return this[b](1).value()[0]}}),Xl(["initial","tail"],function(p,h){var b="drop"+(h?"":"Right");Xt.prototype[p]=function(){return this.__filtered__?new Xt(this):this[b](1)}}),Xt.prototype.compact=function(){return this.filter(d3)},Xt.prototype.find=function(p){return this.filter(p).head()},Xt.prototype.findLast=function(p){return this.reverse().find(p)},Xt.prototype.invokeMap=Rt(function(p,h){return typeof p=="function"?new Xt(this):this.map(function(b){return Z4(b,p,h)})}),Xt.prototype.reject=function(p){return this.filter(j8(ut(p)))},Xt.prototype.slice=function(p,h){p=At(p);var b=this;return b.__filtered__&&(0<p||h<0)?new Xt(b):(p<0?b=b.takeRight(-p):p&&(b=b.drop(p)),h!==n?(h=At(h))<0?b.dropRight(-h):b.take(h-p):b)},Xt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Xt.prototype.toArray=function(){return this.take(f)},Vr(Xt.prototype,function(p,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),C=I[A?"take"+(h=="last"?"Right":""):h],L=A||/^find/.test(h);C&&(I.prototype[h]=function(){function z(nt){return nt=C.apply(I,Ur([nt],pe)),A&&Ae?nt[0]:nt}var K,le=this.__wrapped__,pe=A?[1]:arguments,xe=le instanceof Xt,Ee=pe[0],fe=xe||St(le),Ae=(fe&&b&&typeof Ee=="function"&&Ee.length!=1&&(xe=fe=!1),this.__chain__),Ee=!!this.__actions__.length,_e=L&&!Ae,xe=xe&&!Ee;return!L&&fe?(le=xe?le:new Xt(this),(K=p.apply(le,pe)).__actions__.push({func:D8,args:[z],thisArg:n}),new dr(K,Ae)):_e&&xe?p.apply(this,pe):(K=this.thru(z),_e?A?K.value()[0]:K.value():K)})}),Xl(["pop","push","shift","sort","splice","unshift"],function(p){var h=u8[p],b=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",A=/^(?:pop|shift)$/.test(p);I.prototype[p]=function(){var C,L=arguments;return A&&!this.__chain__?(C=this.value(),h.apply(St(C)?C:[],L)):this[b](function(z){return h.apply(St(z)?z:[],L)})}}),Vr(Xt.prototype,function(p,h){var b,A=I[h];A&&(b=A.name+"",Wn.call(Do,b)||(Do[b]=[]),Do[b].push({name:h,func:A}))}),Do[A8(n,2).name]=[{name:"wrapper",func:n}],Xt.prototype.clone=function(){var p=new Xt(this.__wrapped__);return p.__actions__=c3(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=c3(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=c3(this.__views__),p},Xt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Xt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Xt.prototype.value=function(){var p=this.__wrapped__.value(),h=this.__dir__,b=St(p),A=h<0,C=b?p.length:0,L=function(We,rt,ct){for(var ml=-1,Nl=ct.length;++ml<
Line truncated
|
||||
`)){let u=a.trim();if(u)if(u.startsWith("#")){if(u.startsWith("#EXT")){let o=SEe(u,i);o&&s.push(o)}}else s.push(u)}return s.length!==0&&s[0].name==="EXTM3U"||Ve("The EXTM3U tag MUST be the first line."),s}(t,e),l=TEe(n,e);return l.source=t,l}var xEe=["#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"],AEe=["#EXT-X-MEDIA"],bb=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(xEe.some(l=>n.startsWith(l)))super.push(n);else{if(this.includes(n)){if(AEe.some(l=>n.startsWith(l)))continue;Ve(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function xb(t,e){let n=1e3;e&&(n=Math.pow(10,e));let l=Math.round(t*n)/n;return e?l.toFixed(e):l}function OEe(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 dq(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",l=[`METHOD=${t.method}`];return t.uri&&l.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&Ve("IV must be a 128-bit unsigned integer"),l.push(`IV=${cq(t.iv)}`)),t.format&&l.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&l.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${l.join(",")}`}function NEe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",l=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&l.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&l.push(`URI="${e.uri}"`),e.codecs&&l.push(`CODECS="${e.codecs}"`),e.resolution&&l.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&l.push(`FRAME-RATE=${xb(e.frameRate,3)}`),e.hdcpLevel&&l.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){l.push(`AUDIO="${e.audio[0].groupId}"`);for(let r of e.audio)t.push(Op(r))}if(e.video.length>0){l.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)t.push(Op(r))}if(e.subtitles.length>0){l.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)t.push(Op(r))}if(hEe().allowClosedCaptionsNone&&e.closedCaptions.length===0)l.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){l.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let r of e.closedCaptions)t.push(Op(r))}if(e.score&&l.push(`SCORE=${e.score}`),e.allowedCpc){let r=[];for(let{format:i,cpcList:s}of e.allowedCpc)r.push(`${i}:${s.join("/")}`);l.push(`ALLOWED-CPC="${r.join(",")}"`)}e.videoRange&&l.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&l.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&l.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${l.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function Op(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 CEe(t,e,n,l,r=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let o=dq(e.key);o!==n&&(t.push(o),n=o)}if(e.map){let o=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${gb(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);o!==l&&(t.push(o),l=o)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${yb(e.programDateTime)}`),e.dateRange&&t.push(function(o){let c=[`ID="${o.id}"`];o.start&&c.push(`START-DATE="${yb(o.start)}"`),o.end&&c.push(`END-DATE="${yb(o.end)}"`),o.duration&&c.push(`DURATION=${o.duration}`),o.plannedDuration&&c.push(`PLANNED-DURATION=${o.plannedDuration}`),o.classId&&c.push(`CLASS="${o.classId}"`),o.endOnNext&&c.push("END-ON-NEXT=YES");for(let f of Object.keys(o.attributes))f.startsWith("X-")?typeof o.attributes[f]=="number"?c.push(`${f}=${o.attributes[f]}`):c.push(`${f}="${o.attributes[f]}"`):f.startsWith("SCTE35-")&&c.push(`${f}=${cq(o.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(o,c){let f="";for(let m of c)if(m.type==="OUT")f="OUT",o.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")f="IN",o.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let d=m.value?`:${m.value}`:"";o.push(`#${m.tagName}${d}`)}return f}(t,e.markers)),e.parts.length>0&&(s=function(o,c){let f=!1;for(let m of c)if(m.hint){let d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:y,length:_}=m.byterange;d.push(`BYTERANGE-START=${y}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}o.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),f=!0}else{let d=[];d.push(
Line truncated
|
||||
`)}var mq="hls_cache",Bp=[],uo={},S6={},ao={},$p="";function REe(t,e){if(Bp.push(t),uo[t]=e,Bp.length>5){let n=Bp.shift();IEe(n)}}function IEe(t){delete uo[t],delete Bp[t],new JSFile(mq+"/"+t).delete()}function kEe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=Ab(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=Ab(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=Ab(t,n.key.uri));return e}async function yq(t,e){let n=md5X(t);if(uo[n])return uo[n];let l={},r=t;for(;l=await req(r,{headers:e,redirect:0}),l.headers.location;)r=l.headers.location;if(l.code==200){var i=l.content;let s=kEe(r,fq(i));return REe(n,{code:l.code,plist:s,key:n,headers:l.headers}),uo[n]}return{}}async function gq(t,e,n){if(!uo[t])return{};let r=uo[t].plist.segments,i=!ao[t];if(i){ao[t]={};for(let c of r){let f=md5X(c.uri+c.mediaSequenceNumber.toString());ao[t][f]={file:mq+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in ao[t]){let f=ao[t][c];f.index>=e?f.order=f.index-e:f.order=r.length-e+f.index}i&&DEe(t,5,n);let s=r[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),u=ao[t][a];if(u.state==1||u.state==-1){let c=new JSFile(u.file);if(await c.exist())return u.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};u.state=-1}if(u.state==-1&&vq(t,u,n),u.state==0){var o=new JSProxyStream;o.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return u.read=!0,new Promise(async function(f,m){let d=new JSFile(u.file+".dl");await d.open("r"),async function y(){let _=await d.size();if(_>c){var S=await d.read(_-c,c);await o.write(S),c=_}if(u.state==1||u.state<0){o.done(),await d.close(),await d.delete(),u.read=!1,f();return}setTimeout(y,5)}()}),{buffer:3,content:o}}}async function vq(t,e,n){if(e.state>=0||!S6[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let l=new JSFile(e.file+".dl");await l.open("w");let r=await req(e.uri,{buffer:3,headers:n,stream:l,timeout:[5e3,1e4]});if(r.error||r.code>=300){await l.close(),e.read||await l.delete(),e.state=-1;return}await l.close(),e.read?await l.copy(e.file):await l.move(e.file),e.state=1}async function DEe(t,e,n){$p&&$p!=t&&delete S6[$p],$p=t,S6[t]=!0;for(let l=0;l<e&&S6[t];l++)new Promise(function(r,i){(async function s(){if(!S6[t]){r();return}let a=B.pickBy(ao[t],function(o){return o.state==-1}),u=B.minBy(Object.values(a),function(o){return o.order});if(!u){r();return}await vq(t,u,n),setTimeout(s,5)})()})}function Ab(t,e){var n=t.split("/"),l=e.split("/");n.pop();for(var r=0;r<l.length;r++)l[r]!="."&&(l[r]==".."?n.pop():n.push(l[r]));return n.join("/")}function _q(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let l=Number(n[0]),r=n[4];e.push(`<d p="${l},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var Hp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new si(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Gl,Referer:this.siteUrl+"/"}}async reconnnect(e,n,l,r,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),ea(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,l,r,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,l,r,i,s,a){return a.headers.location!==void 0?r?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,l,r,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,l,r,i,s))}async fetch(e,n,l,r=!1,i=!1,s=0){let a=xp(n),u=e;B.isEmpty(a)||(u=e+"?"+a);let o=new h6(u),c;return c=await req(o.toString(),{method:"get",headers:l,buffer:s,data:null}),c.code===201||c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,n,l,r,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${o},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,l,r,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let l=await this.fetch(e,null,n);if(B.isEmpty(l))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Ue(l)}async paLine truncated
|
||||
`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),l=s.substring(r+1).trim(),!(!n||e[n]&&xTe[n])&&(n==="set-cookie"?e[n]?e[n].push(l):e[n]=[l]:e[n]=e[n]?e[n]+", "+l:l)}),e};var CJ=Symbol("internals");function j6(t){return t&&String(t).trim().toLowerCase()}function gf(t){return t===!1||t==null?t:Z.isArray(t)?t.map(gf):String(t)}function ATe(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,l;for(;l=n.exec(t);)e[l[1]]=l[2];return e}var OTe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Sw(t,e,n,l,r){if(Z.isFunction(l))return l.call(this,e,n);if(r&&(e=n),!!Z.isString(e)){if(Z.isString(l))return e.indexOf(l)!==-1;if(Z.isRegExp(l))return l.test(e)}}function NTe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,l)=>n.toUpperCase()+l)}function CTe(t,e){let n=Z.toCamelCase(" "+e);["get","set","has"].forEach(l=>{Object.defineProperty(t,l+n,{value:function(r,i,s){return this[l].call(this,e,r,i,s)},configurable:!0})})}var L4=class{constructor(e){e&&this.set(e)}set(e,n,l){let r=this;function i(a,u,o){let c=j6(u);if(!c)throw new Error("header name must be a non-empty string");let f=Z.findKey(r,c);(!f||r[f]===void 0||o===!0||o===void 0&&r[f]!==!1)&&(r[f||u]=gf(a))}let s=(a,u)=>Z.forEach(a,(o,c)=>i(o,c,u));return Z.isPlainObject(e)||e instanceof this.constructor?s(e,n):Z.isString(e)&&(e=e.trim())&&!OTe(e)?s(NJ(e),n):e!=null&&i(n,e,l),this}get(e,n){if(e=j6(e),e){let l=Z.findKey(this,e);if(l){let r=this[l];if(!n)return r;if(n===!0)return ATe(r);if(Z.isFunction(n))return n.call(this,r,l);if(Z.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=j6(e),e){let l=Z.findKey(this,e);return!!(l&&this[l]!==void 0&&(!n||Sw(this,this[l],l,n)))}return!1}delete(e,n){let l=this,r=!1;function i(s){if(s=j6(s),s){let a=Z.findKey(l,s);a&&(!n||Sw(l,l[a],a,n))&&(delete l[a],r=!0)}}return Z.isArray(e)?e.forEach(i):i(e),r}clear(e){let n=Object.keys(this),l=n.length,r=!1;for(;l--;){let i=n[l];(!e||Sw(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let n=this,l={};return Z.forEach(this,(r,i)=>{let s=Z.findKey(l,i);if(s){n[s]=gf(r),delete n[i];return}let a=e?NTe(i):String(i).trim();a!==i&&delete n[i],n[a]=gf(r),l[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return Z.forEach(this,(l,r)=>{l!=null&&l!==!1&&(n[r]=e&&Z.isArray(l)?l.join(", "):l)}),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 l=new this(e);return n.forEach(r=>l.set(r)),l}static accessor(e){let l=(this[CJ]=this[CJ]={accessors:{}}).accessors,r=this.prototype;function i(s){let a=j6(s);l[a]||(CTe(r,s),l[a]=!0)}return Z.isArray(e)?e.forEach(i):i(e),this}};L4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(L4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(l){this[n]=l}}});Z.freezeMethods(L4);var s2=L4;function U6(t,e){let n=this||P4,l=e||n,r=s2.from(l.headers),i=l.data;return Z.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function M6(t){return!!(t&&t.__CANCEL__)}function RJ(t,e,n){qe.call(this,t??"canceled",qe.ERR_CANCELED,e,n),this.name="CanceledError"}Z.inherits(RJ,qe,{__CANCEL__:!0});var Dr=RJ;function sa(t,e,n){let l=n.config.validateStatus;!n.status||!l||l(n.status)?t(n):e(new qe("Request failed with status code "+n.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function xw(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function go(t,e){return t&&!Tw(e)?xw(t,e):e}var ZJ=Ql(kJ(),1),eK=Ql(require("http"),1),tK=Ql(require("https"),1),nK=Ql(require("util"),1),lK=Ql(MJ(),1),rs=Ql(require("zlib"),1);var _o="1.6.7";function z6(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var GTe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Uw(t,e,n){let l=n&&n.Blob||i2.classes.Blob,r=z6(t);if(e===void 0&&l&&(e=!0),r==="data"){t=r.length?t.slice(r.length+1):t;let i=GTe.exec(t);if(!i)throw new qe("Invalid URL",qe.ERR_INVALID_URL);let s=i[1],a=i[2],u=i[3],o=Buffer.from(decodeURIComponent(u),a?"base64":"utf8");if(e){if(!l)throw new qe("Blob is not supported",qe.ERR_NOT_SUPPORT);return new l([o],{type:s})}return o}throw new qe("Unsupported protocol "+r,qe.ERR_NOT_SUPPORT)}var Eo=Ql(require("stream"),1);var BJ=Ql(require("stream"),1);function JTe(t,e){let n=0,l=1e3/e,r=null;return function(s,a){let u=Date.now();if(s||u-n>l)return r&&(clearTimeout(r),r=null),n=u,t.apply(null,a);r||(r=setTimeout(()=>(r=null,n=Date.now(),t.apply(null,a)),l-(u-n)))}}var $J=JTe;function KTe(t,e){t=t||10;let n=new Array(t),l=new Array(t),r=0,i=0,s;return e=e!==void 0?e:1e3,function(u){let o=Date.now(),c=l[i];s||(s=o),n[r]=u,l[r]=o;let f=i,m=0;for(;f!==r;)m+=n[f++],f=f%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),o-s<e)return;let d=c&&o-c;return d?Math.round(m*1e3/d):void 0}}var vf=KTe;var _f=Symbol("internals"),Mw=class extends BJ.default.Transform{constructor(e){e=Z.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,u)=>!Z.isUndefined(u[a])),super({readableHighWaterMark:e.chunkSize});let n=this,l=this[_f]={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},r=vf(l.ticksRate*e.samplesCount,l.timeWindow);this.on("newListener",a=>{a==="progress"&&(l.isCaptured||(l.isCaptured=!0))});let i=0;l.updateProgress=$J(function(){let u=l.length,o=l.bytesSeen,c=o-i;if(!c||n.destroyed)return;let f=r(c);i=o,process.nextTick(()=>{n.emit("progress",{loaded:o,total:u,progress:u?o/u:void 0,bytes:c,rate:f||void 0,estimated:f&&u&&o<=u?(u-o)/f:void 0})})},l.ticksRate);let s=()=>{l.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[_f];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,l){let r=this,i=this[_f],s=i.maxRate,a=this.readableHighWaterMark,u=i.timeWindow,o=1e3/u,c=s/o,f=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0;function m(y,_){let S=Buffer.byteLength(y);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),r.push(y)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let d=(y,_)=>{let S=Buffer.byteLength(y),w=null,E=a,g,v=0;if(s){let x=Date.now();(!i.ts||(v=x-i.ts)>=u)&&(i.ts=x,g=c-i.bytes,i.bytes=g<0?-g:0,v=0),g=c-i.bytes}if(s){if(g<=0)return setTimeout(()=>{_(null,y)},u-v);g<E&&(E=g)}E&&S>E&&S-E>f&&(w=y.subarray(E),y=y.subarray(0,E)),m(y,w?()=>{process.nextTick(_,null,w)}:_)};d(e,function y(_,S){if(_)return l(_);S?d(S,y):l(null)})}setLength(e){return this[_f].length=+e,this}},$w=Mw;var rK=Ql(require("events"),1);var VJ=require("util"),qJ=require("stream");var{asyncIterator:HJ}=Symbol,XTe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[HJ]?yield*t[HJ]():yield t},Ef=XTe;var WTe=Z.ALPHABET.ALPHA_DIGIT+"-_",G6=new VJ.TextEncoder,aa=`\r
|
||||
`,YTe=G6.encode(aa),QTe=2,Bw=class{constructor(e,n){let{escapeName:l}=this.constructor,r=Z.isString(n),i=`Content-Disposition: form-data; name="${l(e)}"${!r&&n.name?`; filename="${l(n.name)}"`:""}${aa}`;r?n=G6.encode(String(n).replace(/\r?\n|\r\n?/g,aa)):i+=`Content-Type: ${n.type||"application/octet-stream"}${aa}`,this.headers=G6.encode(i+aa),this.contentLength=r?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+QTe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;Z.isTypedArray(e)?yield e:yield*Ef(e),yield YTe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},ZTe=(t,e,n)=>{let{tag:l="form-data-boundary",size:r=25,boundary:i=l+"-"+Z.generateString(r,WTe)}=n||{};if(!Z.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=G6.encode("--"+i+aa),a=G6.encode("--"+i+"--"+aa+aa),u=a.byteLength,o=Array.from(t.entries()).map(([f,m])=>{let d=new Bw(f,m);return u+=d.size,d});u+=s.byteLength*o.length,u=Z.toFiniteNumber(u);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(c["Content-Length"]=u),e&&e(c),qJ.Readable.from(async function*(){for(let f of o)yield s,yield*f.encode();yield a}())},zJ=ZTe;var GJ=Ql(require("stream"),1),Hw=class extends GJ.default.Transform{__transform(e,n,l){this.push(e),l()}_transform(e,n,l){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,n)}this.__transform(e,n,l)}},JJ=Hw;var exe=(t,e)=>Z.isAsyncFn(t)?function(...n){let l=n.pop();t.apply(this,n).then(r=>{try{e?l(null,...e(r)):l(null,r)}catch(i){l(i)}},l)}:t,KJ=exe;var XJ={flush:rs.default.constants.Z_SYNC_FLUSH,finishFlush:rs.default.constants.Z_SYNC_FLUSH},txe={flush:rs.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:rs.default.constants.BROTLI_OPERATION_FLUSH},WJ=Z.isFunction(rs.default.createBrotliDecompress),{http:nxe,https:lxe}=lK.default,rxe=/https:?/,YJ=i2.protocols.map(t=>t+":");function ixe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function iK(t,e,n){let l=e;if(!l&&l!==!1){let r=(0,ZJ.getProxyForUrl)(n);r&&(l=new URL(r))}if(l){if(l.username&&(l.auth=(l.username||"")+":"+(l.password||"")),l.auth){(l.auth.username||l.auth.password)&&(l.auth=(l.auth.username||"")+":"+(l.auth.password||""));let i=Buffer.from(l.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let r=l.hostname||l.host;t.hostname=r,t.host=r,t.port=l.port,t.path=n,l.protocol&&(t.protocol=l.protocol.includes(":")?l.protocol:`${l.protocol}:`)}t.beforeRedirects.proxy=function(i){iK(i,e,i.href)}}var sxe=typeof process<"u"&&Z.kindOf(process)==="process",axe=t=>new Promise((e,n)=>{let l,r,i=(u,o)=>{r||(r=!0,l&&l(u,o))},s=u=>{i(u),e(u)},a=u=>{i(u,!0),n(u)};t(s,a,u=>l=u).catch(a)}),uxe=({address:t,family:e})=>{if(!Z.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},QJ=(t,e)=>uxe(Z.isObject(t)?t:{address:t,family:e}),sK=sxe&&function(e){return axe(async function(l,r,i){let{data:s,lookup:a,family:u}=e,{responseType:o,responseEncoding:c}=e,f=e.method.toUpperCase(),m,d=!1,y;if(a){let ee=KJ(a,me=>Z.isArray(me)?me:[me]);a=(me,P,G)=>{ee(me,P,(V,q,el)=>{if(V)return G(V);let Tt=Z.isArray(q)?q.map(Qe=>QJ(Qe)):[QJ(q,el)];P.all?G(V,Tt):G(V,Tt[0].address,Tt[0].family)})}}let _=new rK.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),_.removeAllListeners()};i((ee,me)=>{m=!0,me&&(d=!0,S())});function w(ee){_.emit("abort",!ee||ee.type?new Dr(null,e,y):ee)}_.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let E=go(e.baseURL,e.url),g=new URL(E,"http://localhost"),v=g.protocol||YJ[0];if(v==="data:"){let ee;if(f!=="GET")return sa(l,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ee=Uw(e.url,o==="blob",{Blob:e.env&&e.env.Blob})}catch(me){throw qe.from(me,qe.ERR_BAD_REQUEST,e)}return o==="text"?(ee=ee.toString(c),(!c||c==="utf8")&&(ee=Z.stripBOM(ee))):o==="stream"&&(ee=Eo.default.Readable.from(ee)),sa(l,r,{data:ee,status:200,statusText:"OK",headers:new s2,config:e})}if(YJ.indexOf(v)===-1)return r(new qe("Unsupported protocol "+v,qe.ERR_BAD_REQUEST,e));let x=s2.from(e.headers).normalize();x.set("User-Agent","axios/"+_o,!1);let O=e.onDownloadProgress,N=e.onUploadProgress,R=e.maxRate,U,F;if(Z.isSpecCompliantForm(s)){let ee=x.getContentType(/boundary=([-_\w\d]{10,70})/i);s=zJ(s,me=>{x.set(me)},{tag:`axios-${_o}-boundary`,boundary:ee&&ee[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)){if(x.set(s.getHeaders()),!x.hasContentLength())try{let ee=await nK.default.promisify(s.getLength).call(s);Number.isFini
Line truncated
|
||||
`+i.map(pK).join(`
|
||||
`):" "+pK(i[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return l},adapters:Vw};function qw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dr(null,t)}function wf(t){return qw(t),t.headers=s2.from(t.headers),t.data=U6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),bf.getAdapter(t.adapter||P4.adapter)(t).then(function(l){return qw(t),l.data=U6.call(t,t.transformResponse,l),l.headers=s2.from(l.headers),l},function(l){return M6(l)||(qw(t),l&&l.response&&(l.response.data=U6.call(t,t.transformResponse,l.response),l.response.headers=s2.from(l.response.headers))),Promise.reject(l)})}var fK=t=>t instanceof s2?t.toJSON():t;function is(t,e){e=e||{};let n={};function l(o,c,f){return Z.isPlainObject(o)&&Z.isPlainObject(c)?Z.merge.call({caseless:f},o,c):Z.isPlainObject(c)?Z.merge({},c):Z.isArray(c)?c.slice():c}function r(o,c,f){if(Z.isUndefined(c)){if(!Z.isUndefined(o))return l(void 0,o,f)}else return l(o,c,f)}function i(o,c){if(!Z.isUndefined(c))return l(void 0,c)}function s(o,c){if(Z.isUndefined(c)){if(!Z.isUndefined(o))return l(void 0,o)}else return l(void 0,c)}function a(o,c,f){if(f in e)return l(o,c);if(f in t)return l(void 0,o)}let u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(o,c)=>r(fK(o),fK(c),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=u[c]||r,m=f(t[c],e[c],c);Z.isUndefined(m)&&f!==a||(n[c]=m)}),n}var zw={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{zw[t]=function(l){return typeof l===t||"a"+(e<1?"n ":" ")+t}});var dK={};zw.transitional=function(e,n,l){function r(i,s){return"[Axios v"+_o+"] Transitional option '"+i+"'"+s+(l?". "+l:"")}return(i,s,a)=>{if(e===!1)throw new qe(r(s," has been removed"+(n?" in "+n:"")),qe.ERR_DEPRECATED);return n&&!dK[s]&&(dK[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function pxe(t,e,n){if(typeof t!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);let l=Object.keys(t),r=l.length;for(;r-- >0;){let i=l[r],s=e[i];if(s){let a=t[i],u=a===void 0||s(a,i,t);if(u!==!0)throw new qe("option "+i+" must be "+u,qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qe("Unknown option "+i,qe.ERR_BAD_OPTION)}}var Sf={assertOptions:pxe,validators:zw};var ua=Sf.validators,j4=class{constructor(e){this.defaults=e,this.interceptors={request:new _w,response:new _w}}async request(e,n){try{return await this._request(e,n)}catch(l){if(l instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;let i=r.stack?r.stack.replace(/^.+\n/,""):"";l.stack?i&&!String(l.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(l.stack+=`
|
||||
`+i):l.stack=i}throw l}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=is(this.defaults,n);let{transitional:l,paramsSerializer:r,headers:i}=n;l!==void 0&&Sf.assertOptions(l,{silentJSONParsing:ua.transitional(ua.boolean),forcedJSONParsing:ua.transitional(ua.boolean),clarifyTimeoutError:ua.transitional(ua.boolean)},!1),r!=null&&(Z.isFunction(r)?n.paramsSerializer={serialize:r}:Sf.assertOptions(r,{encode:ua.function,serialize:ua.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&Z.merge(i.common,i[n.method]);i&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=s2.concat(s,i);let a=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(u=u&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let o=[];this.interceptors.response.forEach(function(_){o.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!u){let y=[wf.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,o),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=wf.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=o.length;f<m;)c=c.then(o[f++],o[f++]);return c}getUri(e){e=is(this.defaults,e);let n=go(e.baseURL,e.url);return yo(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){j4.prototype[e]=function(n,l){return this.request(is(l||{},{method:e,url:n,data:(l||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(l){return function(i,s,a){return this.request(is(a||{},{method:e,headers:l?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}j4.prototype[e]=n(),j4.prototype[e+"Form"]=n(!0)});var J6=j4;var Gw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let l=this;this.promise.then(r=>{if(!l._listeners)return;let i=l._listeners.length;for(;i-- >0;)l._listeners[i](r);l._listeners=null}),this.promise.then=r=>{let i,s=new Promise(a=>{l.subscribe(a),i=a}).then(r);return s.cancel=function(){l.unsubscribe(i)},s},e(function(i,s,a){l.reason||(l.reason=new Dr(i,s,a),n(l.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(r){e=r}),cancel:e}}},hK=Gw;function Jw(t){return function(n){return t.apply(null,n)}}function Kw(t){return Z.isObject(t)&&t.isAxiosError===!0}var Xw={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(Xw).forEach(([t,e])=>{Xw[e]=t});var mK=Xw;function yK(t){let e=new J6(t),n=P6(J6.prototype.request,e);return Z.extend(n,J6.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return yK(is(t,r))},n}var Jl=yK(P4);Jl.Axios=J6;Jl.CanceledError=Dr;Jl.CancelToken=hK;Jl.isCancel=M6;Jl.VERSION=_o;Jl.toFormData=ia;Jl.AxiosError=qe;Jl.Cancel=Jl.CanceledError;Jl.all=function(e){return Promise.all(e)};Jl.spread=Jw;Jl.isAxiosError=Kw;Jl.mergeConfig=is;Jl.AxiosHeaders=s2;Jl.formToJSON=t=>yf(Z.isHTMLForm(t)?new FormData(t):t);Jl.getAdapter=bf.getAdapter;Jl.HttpStatusCode=mK;Jl.default=Jl;var U4=Jl;var{Axios:KUe,AxiosError:XUe,CanceledError:WUe,isCancel:YUe,CancelToken:QUe,VERSION:ZUe,all:eMe,Cancel:tMe,isAxiosError:nMe,spread:lMe,toFormData:gK,AxiosHeaders:rMe,HttpStatusCode:iMe,formToJSON:sMe,getAdapter:aMe,mergeConfig:uMe}=U4;var xK=Ql(require("https"),1),AK=Ql(require("crypto"),1),OK=Ql(SK(),1),Qw={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await _xe(t,e)},set:asy
Line truncated
|
||||
`},timeout:.1}),await dataBase.push(l,Qw)}globalThis.localLog={set:async function(t,e,n){wxe(t,e,n)}};function bxe(){bo.default.existsSync("log")||bo.default.mkdirSync("log");let t="log/info.log";return bo.default.existsSync(t)?bo.default.readFileSync(t).toString():(bo.default.writeFileSync(t,""),"")}function wxe(t){bo.default.writeFileSync("log/info.log",bxe()+`
|
||||
`+t)}globalThis.req=Sxe;async function Sxe(t,e){try{let n=e&&e.data||null,l=e&&e.postType||null,r=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,u=e?e.headers||{}:{};l==="form"?(u["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=TK.default.stringify(n,{encode:!1}))):l==="form-data"&&(u["Content-Type"]="multipart/form-data",n=gK(n));let o=r===1||r===2?"arraybuffer":void 0,c;a?c=OK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=xK.default.Agent({rejectUnauthorized:!1});let f=await U4(t,{responseType:o,method:e&&e.method||"get",headers:u,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!r)typeof n=="object"&&(n=JSON.stringify(n));else{if(r===1)return{code:f.status,headers:m,content:n};if(r===2)return{code:f.status,headers:m,content:n.toString("base64")};if(r===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.status,headers:m,content:n}}catch(n){let l=n.response;try{return{code:l.status,headers:l.headers,content:JSON.stringify(l.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=Txe;function Txe(t){return AK.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let l=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+l+"/"};var xxe=["DEBUG","INFO","WARNING","ERROR"];var $4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=xxe.indexOf(n)}format(e,n){let l=80;switch(e){case"INFO":l=l+1;break;case"WARNING":l=l-2;break;default:break}return n.length<l&&((l-n.length)%2===0?n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-n.length)/2)):n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-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,l){return l&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://127.0.0.1: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 Ce=class extends Pe{constructor(){super(),this.jadeLog=new $4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(l){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l,!1)}}catch(l){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let l=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${l},pg = ${r},extend = ${JSON.stringify(s)}`),l==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(l,r,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Me,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=r,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let l=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${l},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(l,r,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageToD
Line truncated
|
||||
}`,(fe=FA(function(){return wt(L,Ae+"return "+pe).apply(n,z)})).source=pe,Td(fe))throw fe;return fe},I.times=function(p,h){if((p=At(p))<1||o<p)return[];var b=f,A=L2(p,f);for(h=ut(h),p-=f,A=s8(A,h);++b<p;)h(b);return A},I.toFinite=Pi,I.toInteger=At,I.toLength=AA,I.toLower=function(p){return hn(p).toLowerCase()},I.toNumber=X3,I.toSafeInteger=function(p){return p?du(At(p),-9007199254740991,o):p===0?p:0},I.toString=hn,I.toUpper=function(p){return hn(p).toUpperCase()},I.trim=function(p,h,b){return(p=hn(p))&&(b||h===n)?xi(p):p&&(h=k3(h))?hs(b=dr(p),a8(b,h=dr(h)),u8(b,h)+1).join(""):p},I.trimEnd=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.slice(0,WT(p)+1):p&&(h=k3(h))?hs(b=dr(p),0,u8(b,dr(h))+1).join(""):p},I.trimStart=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.replace(xl,""):p&&(h=k3(h))?hs(b=dr(p),a8(b,dr(h))).join(""):p},I.truncate=function(p,C){var b,z=30,A="...",C=(_l(C)&&(b="separator"in C?C.separator:b,z="length"in C?At(C.length):z,A="omission"in C?k3(C.omission):A),(p=hn(p)).length);if((C=uu(p)?(L=dr(p)).length:C)<=z)return p;if((C=z-Ro(A))<1)return A;var L,z=L?hs(L,0,C).join(""):p.slice(0,C);if(b!==n)if(L&&(C+=z.length-C),xd(b)){if(p.slice(C).search(b)){var K,le=z;for((b=b.global?b:ou(b.source,hn($3.exec(b))+"g")).lastIndex=0;K=b.exec(le);)var pe=K.index;z=z.slice(0,pe===n?C:pe)}}else p.indexOf(k3(b),C)!=C&&-1<(L=z.lastIndexOf(b))&&(z=z.slice(0,L));return z+A},I.unescape=function(p){return(p=hn(p))&&$t.test(p)?p.replace(ze,oee):p},I.uniqueId=function(p){var h=++pee;return hn(p)+h},I.upperCase=bte,I.upperFirst=Nd,I.each=hA,I.eachRight=mA,I.first=cA,Id(I,(Ld={},qr(I,function(p,h){Yn.call(I.prototype,h)||(Ld[h]=p)}),Ld),{chain:!1}),I.VERSION="4.17.21",Yl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){I[p].placeholder=I}),Yl(["drop","take"],function(p,h){Xt.prototype[p]=function(b){b=b===n?1:Zl(At(b),0);var A=this.__filtered__&&!h?new Xt(this):this.clone();return A.__filtered__?A.__takeCount__=L2(b,A.__takeCount__):A.__views__.push({size:L2(b,f),type:p+(A.__dir__<0?"Right":"")}),A},Xt.prototype[p+"Right"]=function(b){return this.reverse()[p](b).reverse()}}),Yl(["filter","map","takeWhile"],function(p,h){var b=h+1,A=b==1||b==3;Xt.prototype[p]=function(C){var L=this.clone();return L.__iteratees__.push({iteratee:ut(C,3),type:b}),L.__filtered__=L.__filtered__||A,L}}),Yl(["head","last"],function(p,h){var b="take"+(h?"Right":"");Xt.prototype[p]=function(){return this[b](1).value()[0]}}),Yl(["initial","tail"],function(p,h){var b="drop"+(h?"":"Right");Xt.prototype[p]=function(){return this.__filtered__?new Xt(this):this[b](1)}}),Xt.prototype.compact=function(){return this.filter(h3)},Xt.prototype.find=function(p){return this.filter(p).head()},Xt.prototype.findLast=function(p){return this.reverse().find(p)},Xt.prototype.invokeMap=Rt(function(p,h){return typeof p=="function"?new Xt(this):this.map(function(b){return n1(b,p,h)})}),Xt.prototype.reject=function(p){return this.filter($8(ut(p)))},Xt.prototype.slice=function(p,h){p=At(p);var b=this;return b.__filtered__&&(0<p||h<0)?new Xt(b):(p<0?b=b.takeRight(-p):p&&(b=b.drop(p)),h!==n?(h=At(h))<0?b.dropRight(-h):b.take(h-p):b)},Xt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Xt.prototype.toArray=function(){return this.take(f)},qr(Xt.prototype,function(p,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),C=I[A?"take"+(h=="last"?"Right":""):h],L=A||/^find/.test(h);C&&(I.prototype[h]=function(){function z(nt){return nt=C.apply(I,Mr([nt],pe)),A&&Ae?nt[0]:nt}var K,le=this.__wrapped__,pe=A?[1]:arguments,xe=le instanceof Xt,Ee=pe[0],fe=xe||St(le),Ae=(fe&&b&&typeof Ee=="function"&&Ee.length!=1&&(xe=fe=!1),this.__chain__),Ee=!!this.__actions__.length,_e=L&&!Ae,xe=xe&&!Ee;return!L&&fe?(le=xe?le:new Xt(this),(K=p.apply(le,pe)).__actions__.push({func:F8,args:[z],thisArg:n}),new hr(K,Ae)):_e&&xe?p.apply(this,pe):(K=this.thru(z),_e?A?K.value()[0]:K.value():K)})}),Yl(["pop","push","shift","sort","splice","unshift"],function(p){var h=p8[p],b=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",A=/^(?:pop|shift)$/.test(p);I.prototype[p]=function(){var C,L=arguments;return A&&!this.__chain__?(C=this.value(),h.apply(St(C)?C:[],L)):this[b](function(z){return h.apply(St(z)?z:[],L)})}}),qr(Xt.prototype,function(p,h){var b,A=I[h];A&&(b=A.name+"",Yn.call(Lo,b)||(Lo[b]=[]),Lo[b].push({name:h,func:A}))}),Lo[C8(n,2).name]=[{name:"wrapper",func:n}],Xt.prototype.clone=function(){var p=new Xt(this.__wrapped__);return p.__actions__=p3(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=p3(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=p3(this.__views__),p},Xt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Xt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Xt.prototype.value=function(){var p=this.__wrapped__.value(),h=this.__dir__,b=St(p),A=h<0,C=b?p.length:0,L=function(We,rt,ct){for(var yl=-1,Rl=ct.length;++yl
Line truncated
|
||||
`)){let u=a.trim();if(u)if(u.startsWith("#")){if(u.startsWith("#EXT")){let o=PEe(u,i);o&&s.push(o)}}else s.push(u)}return s.length!==0&&s[0].name==="EXTM3U"||Ve("The EXTM3U tag MUST be the first line."),s}(t,e),l=LEe(n,e);return l.source=t,l}var FEe=["#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"],jEe=["#EXT-X-MEDIA"],Sb=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(FEe.some(l=>n.startsWith(l)))super.push(n);else{if(this.includes(n)){if(jEe.some(l=>n.startsWith(l)))continue;Ve(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function Ob(t,e){let n=1e3;e&&(n=Math.pow(10,e));let l=Math.round(t*n)/n;return e?l.toFixed(e):l}function UEe(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 gq(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",l=[`METHOD=${t.method}`];return t.uri&&l.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&Ve("IV must be a 128-bit unsigned integer"),l.push(`IV=${hq(t.iv)}`)),t.format&&l.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&l.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${l.join(",")}`}function MEe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",l=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&l.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&l.push(`URI="${e.uri}"`),e.codecs&&l.push(`CODECS="${e.codecs}"`),e.resolution&&l.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&l.push(`FRAME-RATE=${Ob(e.frameRate,3)}`),e.hdcpLevel&&l.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){l.push(`AUDIO="${e.audio[0].groupId}"`);for(let r of e.audio)t.push(Cp(r))}if(e.video.length>0){l.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)t.push(Cp(r))}if(e.subtitles.length>0){l.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)t.push(Cp(r))}if(xEe().allowClosedCaptionsNone&&e.closedCaptions.length===0)l.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){l.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let r of e.closedCaptions)t.push(Cp(r))}if(e.score&&l.push(`SCORE=${e.score}`),e.allowedCpc){let r=[];for(let{format:i,cpcList:s}of e.allowedCpc)r.push(`${i}:${s.join("/")}`);l.push(`ALLOWED-CPC="${r.join(",")}"`)}e.videoRange&&l.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&l.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&l.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${l.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function Cp(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 $Ee(t,e,n,l,r=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let o=gq(e.key);o!==n&&(t.push(o),n=o)}if(e.map){let o=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${_b(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);o!==l&&(t.push(o),l=o)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${vb(e.programDateTime)}`),e.dateRange&&t.push(function(o){let c=[`ID="${o.id}"`];o.start&&c.push(`START-DATE="${vb(o.start)}"`),o.end&&c.push(`END-DATE="${vb(o.end)}"`),o.duration&&c.push(`DURATION=${o.duration}`),o.plannedDuration&&c.push(`PLANNED-DURATION=${o.plannedDuration}`),o.classId&&c.push(`CLASS="${o.classId}"`),o.endOnNext&&c.push("END-ON-NEXT=YES");for(let f of Object.keys(o.attributes))f.startsWith("X-")?typeof o.attributes[f]=="number"?c.push(`${f}=${o.attributes[f]}`):c.push(`${f}="${o.attributes[f]}"`):f.startsWith("SCTE35-")&&c.push(`${f}=${hq(o.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(o,c){let f="";for(let m of c)if(m.type==="OUT")f="OUT",o.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")f="IN",o.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let d=m.value?`:${m.value}`:"";o.push(`#${m.tagName}${d}`)}return f}(t,e.markers)),e.parts.length>0&&(s=function(o,c){let f=!1;for(let m of c)if(m.hint){let d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:y,length:_}=m.byterange;d.push(`BYTERANGE-START=${y}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}o.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),f=!0}else{let d=[];d.push(
Line truncated
|
||||
`)}var _q="hls_cache",Vp=[],co={},A6={},oo={},Hp="";function BEe(t,e){if(Vp.push(t),co[t]=e,Vp.length>5){let n=Vp.shift();HEe(n)}}function HEe(t){delete co[t],delete Vp[t],new JSFile(_q+"/"+t).delete()}function VEe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=Nb(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=Nb(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=Nb(t,n.key.uri));return e}async function Eq(t,e){let n=md5X(t);if(co[n])return co[n];let l={},r=t;for(;l=await req(r,{headers:e,redirect:0}),l.headers.location;)r=l.headers.location;if(l.code==200){var i=l.content;let s=VEe(r,yq(i));return BEe(n,{code:l.code,plist:s,key:n,headers:l.headers}),co[n]}return{}}async function bq(t,e,n){if(!co[t])return{};let r=co[t].plist.segments,i=!oo[t];if(i){oo[t]={};for(let c of r){let f=md5X(c.uri+c.mediaSequenceNumber.toString());oo[t][f]={file:_q+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in oo[t]){let f=oo[t][c];f.index>=e?f.order=f.index-e:f.order=r.length-e+f.index}i&&qEe(t,5,n);let s=r[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),u=oo[t][a];if(u.state==1||u.state==-1){let c=new JSFile(u.file);if(await c.exist())return u.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};u.state=-1}if(u.state==-1&&wq(t,u,n),u.state==0){var o=new JSProxyStream;o.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return u.read=!0,new Promise(async function(f,m){let d=new JSFile(u.file+".dl");await d.open("r"),async function y(){let _=await d.size();if(_>c){var S=await d.read(_-c,c);await o.write(S),c=_}if(u.state==1||u.state<0){o.done(),await d.close(),await d.delete(),u.read=!1,f();return}setTimeout(y,5)}()}),{buffer:3,content:o}}}async function wq(t,e,n){if(e.state>=0||!A6[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let l=new JSFile(e.file+".dl");await l.open("w");let r=await req(e.uri,{buffer:3,headers:n,stream:l,timeout:[5e3,1e4]});if(r.error||r.code>=300){await l.close(),e.read||await l.delete(),e.state=-1;return}await l.close(),e.read?await l.copy(e.file):await l.move(e.file),e.state=1}async function qEe(t,e,n){Hp&&Hp!=t&&delete A6[Hp],Hp=t,A6[t]=!0;for(let l=0;l<e&&A6[t];l++)new Promise(function(r,i){(async function s(){if(!A6[t]){r();return}let a=B.pickBy(oo[t],function(o){return o.state==-1}),u=B.minBy(Object.values(a),function(o){return o.order});if(!u){r();return}await wq(t,u,n),setTimeout(s,5)})()})}function Nb(t,e){var n=t.split("/"),l=e.split("/");n.pop();for(var r=0;r<l.length;r++)l[r]!="."&&(l[r]==".."?n.pop():n.push(l[r]));return n.join("/")}function Sq(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let l=Number(n[0]),r=n[4];e.push(`<d p="${l},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var qp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new ai(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Kl,Referer:this.siteUrl+"/"}}async reconnnect(e,n,l,r,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),na(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,l,r,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,l,r,i,s,a){return a.headers.location!==void 0?r?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,l,r,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,l,r,i,s))}async fetch(e,n,l,r=!1,i=!1,s=0){let a=Np(n),u=e;B.isEmpty(a)||(u=e+"?"+a);let o=new g6(u),c;return c=await req(o.toString(),{method:"get",headers:l,buffer:s,data:null}),c.code===201||c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,n,l,r,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${o},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,l,r,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let l=await this.fetch(e,null,n);if(B.isEmpty(l))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return je(l)}async paLine truncated
|
||||
`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),l=s.substring(r+1).trim(),!(!n||e[n]&&FTe[n])&&(n==="set-cookie"?e[n]?e[n].push(l):e[n]=[l]:e[n]=e[n]?e[n]+", "+l:l)}),e};var DJ=Symbol("internals");function $6(t){return t&&String(t).trim().toLowerCase()}function _f(t){return t===!1||t==null?t:Z.isArray(t)?t.map(_f):String(t)}function jTe(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,l;for(;l=n.exec(t);)e[l[1]]=l[2];return e}var UTe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xw(t,e,n,l,r){if(Z.isFunction(l))return l.call(this,e,n);if(r&&(e=n),!!Z.isString(e)){if(Z.isString(l))return e.indexOf(l)!==-1;if(Z.isRegExp(l))return l.test(e)}}function MTe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,l)=>n.toUpperCase()+l)}function $Te(t,e){let n=Z.toCamelCase(" "+e);["get","set","has"].forEach(l=>{Object.defineProperty(t,l+n,{value:function(r,i,s){return this[l].call(this,e,r,i,s)},configurable:!0})})}var U4=class{constructor(e){e&&this.set(e)}set(e,n,l){let r=this;function i(a,u,o){let c=$6(u);if(!c)throw new Error("header name must be a non-empty string");let f=Z.findKey(r,c);(!f||r[f]===void 0||o===!0||o===void 0&&r[f]!==!1)&&(r[f||u]=_f(a))}let s=(a,u)=>Z.forEach(a,(o,c)=>i(o,c,u));return Z.isPlainObject(e)||e instanceof this.constructor?s(e,n):Z.isString(e)&&(e=e.trim())&&!UTe(e)?s(kJ(e),n):e!=null&&i(n,e,l),this}get(e,n){if(e=$6(e),e){let l=Z.findKey(this,e);if(l){let r=this[l];if(!n)return r;if(n===!0)return jTe(r);if(Z.isFunction(n))return n.call(this,r,l);if(Z.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=$6(e),e){let l=Z.findKey(this,e);return!!(l&&this[l]!==void 0&&(!n||xw(this,this[l],l,n)))}return!1}delete(e,n){let l=this,r=!1;function i(s){if(s=$6(s),s){let a=Z.findKey(l,s);a&&(!n||xw(l,l[a],a,n))&&(delete l[a],r=!0)}}return Z.isArray(e)?e.forEach(i):i(e),r}clear(e){let n=Object.keys(this),l=n.length,r=!1;for(;l--;){let i=n[l];(!e||xw(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let n=this,l={};return Z.forEach(this,(r,i)=>{let s=Z.findKey(l,i);if(s){n[s]=_f(r),delete n[i];return}let a=e?MTe(i):String(i).trim();a!==i&&delete n[i],n[a]=_f(r),l[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return Z.forEach(this,(l,r)=>{l!=null&&l!==!1&&(n[r]=e&&Z.isArray(l)?l.join(", "):l)}),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 l=new this(e);return n.forEach(r=>l.set(r)),l}static accessor(e){let l=(this[DJ]=this[DJ]={accessors:{}}).accessors,r=this.prototype;function i(s){let a=$6(s);l[a]||($Te(r,s),l[a]=!0)}return Z.isArray(e)?e.forEach(i):i(e),this}};U4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(U4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(l){this[n]=l}}});Z.freezeMethods(U4);var u2=U4;function B6(t,e){let n=this||j4,l=e||n,r=u2.from(l.headers),i=l.data;return Z.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function H6(t){return!!(t&&t.__CANCEL__)}function PJ(t,e,n){qe.call(this,t??"canceled",qe.ERR_CANCELED,e,n),this.name="CanceledError"}Z.inherits(PJ,qe,{__CANCEL__:!0});var Pr=PJ;function ua(t,e,n){let l=n.config.validateStatus;!n.status||!l||l(n.status)?t(n):e(new qe("Request failed with status code "+n.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Aw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ow(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _o(t,e){return t&&!Aw(e)?Ow(t,e):e}var lK=e2(FJ(),1),rK=e2(require("http"),1),iK=e2(require("https"),1),sK=e2(require("util"),1),aK=e2(VJ(),1),ss=e2(require("zlib"),1);var bo="1.6.7";function K6(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var lxe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function $w(t,e,n){let l=n&&n.Blob||a2.classes.Blob,r=K6(t);if(e===void 0&&l&&(e=!0),r==="data"){t=r.length?t.slice(r.length+1):t;let i=lxe.exec(t);if(!i)throw new qe("Invalid URL",qe.ERR_INVALID_URL);let s=i[1],a=i[2],u=i[3],o=Buffer.from(decodeURIComponent(u),a?"base64":"utf8");if(e){if(!l)throw new qe("Blob is not supported",qe.ERR_NOT_SUPPORT);return new l([o],{type:s})}return o}throw new qe("Unsupported protocol "+r,qe.ERR_NOT_SUPPORT)}var wo=e2(require("stream"),1);var zJ=e2(require("stream"),1);function rxe(t,e){let n=0,l=1e3/e,r=null;return function(s,a){let u=Date.now();if(s||u-n>l)return r&&(clearTimeout(r),r=null),n=u,t.apply(null,a);r||(r=setTimeout(()=>(r=null,n=Date.now(),t.apply(null,a)),l-(u-n)))}}var qJ=rxe;function ixe(t,e){t=t||10;let n=new Array(t),l=new Array(t),r=0,i=0,s;return e=e!==void 0?e:1e3,function(u){let o=Date.now(),c=l[i];s||(s=o),n[r]=u,l[r]=o;let f=i,m=0;for(;f!==r;)m+=n[f++],f=f%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),o-s<e)return;let d=c&&o-c;return d?Math.round(m*1e3/d):void 0}}var Ef=ixe;var bf=Symbol("internals"),Bw=class extends zJ.default.Transform{constructor(e){e=Z.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,u)=>!Z.isUndefined(u[a])),super({readableHighWaterMark:e.chunkSize});let n=this,l=this[bf]={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},r=Ef(l.ticksRate*e.samplesCount,l.timeWindow);this.on("newListener",a=>{a==="progress"&&(l.isCaptured||(l.isCaptured=!0))});let i=0;l.updateProgress=qJ(function(){let u=l.length,o=l.bytesSeen,c=o-i;if(!c||n.destroyed)return;let f=r(c);i=o,process.nextTick(()=>{n.emit("progress",{loaded:o,total:u,progress:u?o/u:void 0,bytes:c,rate:f||void 0,estimated:f&&u&&o<=u?(u-o)/f:void 0})})},l.ticksRate);let s=()=>{l.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[bf];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,l){let r=this,i=this[bf],s=i.maxRate,a=this.readableHighWaterMark,u=i.timeWindow,o=1e3/u,c=s/o,f=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0;function m(y,_){let S=Buffer.byteLength(y);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),r.push(y)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let d=(y,_)=>{let S=Buffer.byteLength(y),w=null,E=a,g,v=0;if(s){let x=Date.now();(!i.ts||(v=x-i.ts)>=u)&&(i.ts=x,g=c-i.bytes,i.bytes=g<0?-g:0,v=0),g=c-i.bytes}if(s){if(g<=0)return setTimeout(()=>{_(null,y)},u-v);g<E&&(E=g)}E&&S>E&&S-E>f&&(w=y.subarray(E),y=y.subarray(0,E)),m(y,w?()=>{process.nextTick(_,null,w)}:_)};d(e,function y(_,S){if(_)return l(_);S?d(S,y):l(null)})}setLength(e){return this[bf].length=+e,this}},Hw=Bw;var uK=e2(require("events"),1);var JJ=require("util"),KJ=require("stream");var{asyncIterator:GJ}=Symbol,sxe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[GJ]?yield*t[GJ]():yield t},wf=sxe;var axe=Z.ALPHABET.ALPHA_DIGIT+"-_",X6=new JJ.TextEncoder,oa=`\r
|
||||
`,uxe=X6.encode(oa),oxe=2,Vw=class{constructor(e,n){let{escapeName:l}=this.constructor,r=Z.isString(n),i=`Content-Disposition: form-data; name="${l(e)}"${!r&&n.name?`; filename="${l(n.name)}"`:""}${oa}`;r?n=X6.encode(String(n).replace(/\r?\n|\r\n?/g,oa)):i+=`Content-Type: ${n.type||"application/octet-stream"}${oa}`,this.headers=X6.encode(i+oa),this.contentLength=r?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+oxe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;Z.isTypedArray(e)?yield e:yield*wf(e),yield uxe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},cxe=(t,e,n)=>{let{tag:l="form-data-boundary",size:r=25,boundary:i=l+"-"+Z.generateString(r,axe)}=n||{};if(!Z.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=X6.encode("--"+i+oa),a=X6.encode("--"+i+"--"+oa+oa),u=a.byteLength,o=Array.from(t.entries()).map(([f,m])=>{let d=new Vw(f,m);return u+=d.size,d});u+=s.byteLength*o.length,u=Z.toFiniteNumber(u);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(c["Content-Length"]=u),e&&e(c),KJ.Readable.from(async function*(){for(let f of o)yield s,yield*f.encode();yield a}())},XJ=cxe;var WJ=e2(require("stream"),1),qw=class extends WJ.default.Transform{__transform(e,n,l){this.push(e),l()}_transform(e,n,l){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,n)}this.__transform(e,n,l)}},YJ=qw;var pxe=(t,e)=>Z.isAsyncFn(t)?function(...n){let l=n.pop();t.apply(this,n).then(r=>{try{e?l(null,...e(r)):l(null,r)}catch(i){l(i)}},l)}:t,QJ=pxe;var ZJ={flush:ss.default.constants.Z_SYNC_FLUSH,finishFlush:ss.default.constants.Z_SYNC_FLUSH},fxe={flush:ss.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ss.default.constants.BROTLI_OPERATION_FLUSH},eK=Z.isFunction(ss.default.createBrotliDecompress),{http:dxe,https:hxe}=aK.default,mxe=/https:?/,tK=a2.protocols.map(t=>t+":");function yxe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function oK(t,e,n){let l=e;if(!l&&l!==!1){let r=(0,lK.getProxyForUrl)(n);r&&(l=new URL(r))}if(l){if(l.username&&(l.auth=(l.username||"")+":"+(l.password||"")),l.auth){(l.auth.username||l.auth.password)&&(l.auth=(l.auth.username||"")+":"+(l.auth.password||""));let i=Buffer.from(l.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let r=l.hostname||l.host;t.hostname=r,t.host=r,t.port=l.port,t.path=n,l.protocol&&(t.protocol=l.protocol.includes(":")?l.protocol:`${l.protocol}:`)}t.beforeRedirects.proxy=function(i){oK(i,e,i.href)}}var gxe=typeof process<"u"&&Z.kindOf(process)==="process",vxe=t=>new Promise((e,n)=>{let l,r,i=(u,o)=>{r||(r=!0,l&&l(u,o))},s=u=>{i(u),e(u)},a=u=>{i(u,!0),n(u)};t(s,a,u=>l=u).catch(a)}),_xe=({address:t,family:e})=>{if(!Z.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},nK=(t,e)=>_xe(Z.isObject(t)?t:{address:t,family:e}),cK=gxe&&function(e){return vxe(async function(l,r,i){let{data:s,lookup:a,family:u}=e,{responseType:o,responseEncoding:c}=e,f=e.method.toUpperCase(),m,d=!1,y;if(a){let ee=QJ(a,me=>Z.isArray(me)?me:[me]);a=(me,P,G)=>{ee(me,P,(V,q,tl)=>{if(V)return G(V);let Tt=Z.isArray(q)?q.map(Qe=>nK(Qe)):[nK(q,tl)];P.all?G(V,Tt):G(V,Tt[0].address,Tt[0].family)})}}let _=new uK.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),_.removeAllListeners()};i((ee,me)=>{m=!0,me&&(d=!0,S())});function w(ee){_.emit("abort",!ee||ee.type?new Pr(null,e,y):ee)}_.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let E=_o(e.baseURL,e.url),g=new URL(E,"http://localhost"),v=g.protocol||tK[0];if(v==="data:"){let ee;if(f!=="GET")return ua(l,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ee=$w(e.url,o==="blob",{Blob:e.env&&e.env.Blob})}catch(me){throw qe.from(me,qe.ERR_BAD_REQUEST,e)}return o==="text"?(ee=ee.toString(c),(!c||c==="utf8")&&(ee=Z.stripBOM(ee))):o==="stream"&&(ee=wo.default.Readable.from(ee)),ua(l,r,{data:ee,status:200,statusText:"OK",headers:new u2,config:e})}if(tK.indexOf(v)===-1)return r(new qe("Unsupported protocol "+v,qe.ERR_BAD_REQUEST,e));let x=u2.from(e.headers).normalize();x.set("User-Agent","axios/"+bo,!1);let O=e.onDownloadProgress,N=e.onUploadProgress,R=e.maxRate,U,F;if(Z.isSpecCompliantForm(s)){let ee=x.getContentType(/boundary=([-_\w\d]{10,70})/i);s=XJ(s,me=>{x.set(me)},{tag:`axios-${bo}-boundary`,boundary:ee&&ee[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)){if(x.set(s.getHeaders()),!x.hasContentLength())try{let ee=await sK.default.promisify(s.getLength).call(s);Number.isFini
Line truncated
|
||||
`+i.map(mK).join(`
|
||||
`):" "+mK(i[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return l},adapters:zw};function Gw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pr(null,t)}function Tf(t){return Gw(t),t.headers=u2.from(t.headers),t.data=B6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Sf.getAdapter(t.adapter||j4.adapter)(t).then(function(l){return Gw(t),l.data=B6.call(t,t.transformResponse,l),l.headers=u2.from(l.headers),l},function(l){return H6(l)||(Gw(t),l&&l.response&&(l.response.data=B6.call(t,t.transformResponse,l.response),l.response.headers=u2.from(l.response.headers))),Promise.reject(l)})}var yK=t=>t instanceof u2?t.toJSON():t;function as(t,e){e=e||{};let n={};function l(o,c,f){return Z.isPlainObject(o)&&Z.isPlainObject(c)?Z.merge.call({caseless:f},o,c):Z.isPlainObject(c)?Z.merge({},c):Z.isArray(c)?c.slice():c}function r(o,c,f){if(Z.isUndefined(c)){if(!Z.isUndefined(o))return l(void 0,o,f)}else return l(o,c,f)}function i(o,c){if(!Z.isUndefined(c))return l(void 0,c)}function s(o,c){if(Z.isUndefined(c)){if(!Z.isUndefined(o))return l(void 0,o)}else return l(void 0,c)}function a(o,c,f){if(f in e)return l(o,c);if(f in t)return l(void 0,o)}let u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(o,c)=>r(yK(o),yK(c),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=u[c]||r,m=f(t[c],e[c],c);Z.isUndefined(m)&&f!==a||(n[c]=m)}),n}var Jw={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Jw[t]=function(l){return typeof l===t||"a"+(e<1?"n ":" ")+t}});var gK={};Jw.transitional=function(e,n,l){function r(i,s){return"[Axios v"+bo+"] Transitional option '"+i+"'"+s+(l?". "+l:"")}return(i,s,a)=>{if(e===!1)throw new qe(r(s," has been removed"+(n?" in "+n:"")),qe.ERR_DEPRECATED);return n&&!gK[s]&&(gK[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function wxe(t,e,n){if(typeof t!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);let l=Object.keys(t),r=l.length;for(;r-- >0;){let i=l[r],s=e[i];if(s){let a=t[i],u=a===void 0||s(a,i,t);if(u!==!0)throw new qe("option "+i+" must be "+u,qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qe("Unknown option "+i,qe.ERR_BAD_OPTION)}}var xf={assertOptions:wxe,validators:Jw};var ca=xf.validators,$4=class{constructor(e){this.defaults=e,this.interceptors={request:new bw,response:new bw}}async request(e,n){try{return await this._request(e,n)}catch(l){if(l instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;let i=r.stack?r.stack.replace(/^.+\n/,""):"";l.stack?i&&!String(l.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(l.stack+=`
|
||||
`+i):l.stack=i}throw l}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=as(this.defaults,n);let{transitional:l,paramsSerializer:r,headers:i}=n;l!==void 0&&xf.assertOptions(l,{silentJSONParsing:ca.transitional(ca.boolean),forcedJSONParsing:ca.transitional(ca.boolean),clarifyTimeoutError:ca.transitional(ca.boolean)},!1),r!=null&&(Z.isFunction(r)?n.paramsSerializer={serialize:r}:xf.assertOptions(r,{encode:ca.function,serialize:ca.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&Z.merge(i.common,i[n.method]);i&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=u2.concat(s,i);let a=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(u=u&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let o=[];this.interceptors.response.forEach(function(_){o.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!u){let y=[Tf.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,o),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=Tf.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=o.length;f<m;)c=c.then(o[f++],o[f++]);return c}getUri(e){e=as(this.defaults,e);let n=_o(e.baseURL,e.url);return vo(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){$4.prototype[e]=function(n,l){return this.request(as(l||{},{method:e,url:n,data:(l||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(l){return function(i,s,a){return this.request(as(a||{},{method:e,headers:l?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}$4.prototype[e]=n(),$4.prototype[e+"Form"]=n(!0)});var W6=$4;var Kw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let l=this;this.promise.then(r=>{if(!l._listeners)return;let i=l._listeners.length;for(;i-- >0;)l._listeners[i](r);l._listeners=null}),this.promise.then=r=>{let i,s=new Promise(a=>{l.subscribe(a),i=a}).then(r);return s.cancel=function(){l.unsubscribe(i)},s},e(function(i,s,a){l.reason||(l.reason=new Pr(i,s,a),n(l.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(r){e=r}),cancel:e}}},vK=Kw;function Xw(t){return function(n){return t.apply(null,n)}}function Ww(t){return Z.isObject(t)&&t.isAxiosError===!0}var Yw={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(Yw).forEach(([t,e])=>{Yw[e]=t});var _K=Yw;function EK(t){let e=new W6(t),n=j6(W6.prototype.request,e);return Z.extend(n,W6.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return EK(as(t,r))},n}var Xl=EK(j4);Xl.Axios=W6;Xl.CanceledError=Pr;Xl.CancelToken=vK;Xl.isCancel=H6;Xl.VERSION=bo;Xl.toFormData=aa;Xl.AxiosError=qe;Xl.Cancel=Xl.CanceledError;Xl.all=function(e){return Promise.all(e)};Xl.spread=Xw;Xl.isAxiosError=Ww;Xl.mergeConfig=as;Xl.AxiosHeaders=u2;Xl.formToJSON=t=>vf(Z.isHTMLForm(t)?new FormData(t):t);Xl.getAdapter=Sf.getAdapter;Xl.HttpStatusCode=_K;Xl.default=Xl;var B4=Xl;var{Axios:aMe,AxiosError:uMe,CanceledError:oMe,isCancel:cMe,CancelToken:pMe,VERSION:fMe,all:dMe,Cancel:hMe,isAxiosError:mMe,spread:yMe,toFormData:bK,AxiosHeaders:gMe,HttpStatusCode:vMe,formToJSON:_Me,getAdapter:EMe,mergeConfig:bMe}=B4;var CK=e2(require("https"),1),RK=e2(require("crypto"),1),IK=e2(OK(),1),eS={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await Rxe(t,e)},set:asy
Line truncated
|
||||
`},timeout:.1}),await dataBase.push(l,eS)}globalThis.localLog={set:async function(t,e,n){Dxe(t,e,n)}};function kxe(){So.default.existsSync("log")||So.default.mkdirSync("log");let t="log/info.log";return So.default.existsSync(t)?So.default.readFileSync(t).toString():(So.default.writeFileSync(t,""),"")}function Dxe(t){So.default.writeFileSync("log/info.log",kxe()+`
|
||||
`+t)}globalThis.req=Pxe;async function Pxe(t,e){try{let n=e&&e.data||null,l=e&&e.postType||null,r=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,u=e?e.headers||{}:{};l==="form"?(u["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=NK.default.stringify(n,{encode:!1}))):l==="form-data"&&(u["Content-Type"]="multipart/form-data",n=bK(n));let o=r===1||r===2?"arraybuffer":void 0,c;a?c=IK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=CK.default.Agent({rejectUnauthorized:!1});let f=await B4(t,{responseType:o,method:e&&e.method||"get",headers:u,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!r)typeof n=="object"&&(n=JSON.stringify(n));else{if(r===1)return{code:f.status,headers:m,content:n};if(r===2)return{code:f.status,headers:m,content:n.toString("base64")};if(r===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.status,headers:m,content:n}}catch(n){let l=n.response;try{return{code:l.status,headers:l.headers,content:JSON.stringify(l.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=Lxe;function Lxe(t){return RK.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let l=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+l+"/"};var Fxe=["DEBUG","INFO","WARNING","ERROR"];var V4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=Fxe.indexOf(n)}format(e,n){let l=80;switch(e){case"INFO":l=l+1;break;case"WARNING":l=l-2;break;default:break}return n.length<l&&((l-n.length)%2===0?n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-n.length)/2)):n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-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,l){return l&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://127.0.0.1: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 Ce=class extends De{constructor(){super(),this.jadeLog=new V4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(l){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l,!1)}}catch(l){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let l=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${l},pg = ${r},extend = ${JSON.stringify(s)}`),l==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(l,r,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Me,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=r,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let l=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${l},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(l,r,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageToD
Line truncated
|
||||
"type": "{{tid}}",
|
||||
"p": "{{pg}}",
|
||||
"area": "{{ext.area|default(0)}}",
|
||||
"year": "{{ext.year|default(0)}}",
|
||||
"sort": "{{ext.sort|default(0)}}",
|
||||
"class": "{{ext.class|default(0)}}"}`,{ext:r,tid:e,pg:n}));console.log(s);let a=await this.request(i,s);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,l){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 r=0;r<this.parse.length;r++)try{let i=this.parse[r],s=await req(i+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=oX(n,JSON.parse(s.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 r=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),i=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+i[1]+"&episodeSid="+i[2]+"&quality=LD",{headers:r}),a=JSON.parse(s.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let r=await this.request(this.siteUrl+"/video.php",{url:n}),i=oX(n,r.data);i.url&&(i.url.indexOf("filename=1.mp4")>-1?this.playUrl=i.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+n2(i.url),{}))}}catch(r){await this.jadeLog.error(r)}}async setSearch(e,n){let l=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(l.data.data)}async proxy(e,n){let l=e[0],r=_2(e[1]);if(l==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${r}`);let i=await req(r,{}),s=i.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),u=r.substr(0,r.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(o,c,f,m){let d=(f.startsWith("http")?"":u)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(o,c,f){let m=(f.startsWith("http")?"":u)+f;return c+a+_2(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(o,c,f){let m=(f.startsWith("http")?"":u)+f;return c+m}),JSON.stringify({code:i.code,content:s,headers:i.headers})}return JSON.stringify({code:500,content:""})}},bn=new oS;var cS=class extends Ce{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await bn.initCookie(e.server.config.bilicookie),await bn.spiderInit(e),bn.cfgObj.code=0,bn.catOpenStatus=!0,bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await bn.setClasses(),this.classes=bn.classes}async setFilterObj(){await bn.setFilterObj(),this.filterObj=bn.filterObj}async setHomeVod(){await bn.setHomeVod(),this.homeVodList=bn.homeVodList}async setCategory(e,n,l,r){await bn.setCategory(e,n,l,r),this.vodList=bn.vodList}async setDetail(e){await bn.setDetail(e),this.vodDetail=bn.vodDetail}async setPlay(e,n,l){await bn.setPlay(e,n,l),this.playUrl=bn.playUrl,this.result=bn.result}async setSearch(e,n,l){await bn.setSearch(e,n,l),this.vodList=bn.vodList,this.result=bn.result}async setProxy(e,n){return await bn.proxy(e,n)}},ya=new cS;async function cX(t,e){return await ya.init(t,e)}async function pX(t,e){return await ya.home(t,e)}async function Mxe(t,e){return await ya.homeVod(t,e)}async function fX(t,e){return await ya.category(t,e)}async function dX(t,e){return await ya.detail(t,e)}async function hX(t,e){return await ya.play(t,e)}async function mX(t,e){return await ya.search(t,e)}async function $xe(t,e){return await ya.proxy(t,e)}var yX={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",cX),t.post("/home",pX),t.post("/category",fX),t.post("/detail",dX),t.post("/play",hX),t.post("/search",mX),t.get("/proxy/:what/:ids/:end",$xe)},spider:{init:cX,home:pX,homeVod:Mxe,category:fX,detail:dX,play:hX,search:mX}};function Bxe(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8"
Line truncated
|
||||
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id=l.url,r.vod_pic=l.thumb,r.vod_remarks=l.time,r.vod_name=l.title,n.push(r)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n("[class=index-list-l]");for(let r of l){let i=n(n(r).find('[class="h1 clearfix"]')[0]).find("a"),s=i[0].attribs.href,a=n(i[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader()),r=[];if(!B.isEmpty(l)){let i=Ue(l),s=i('[class="sy scon clearfix"]').find("dl"),a=0;for(let u of s){let o=i(i(u).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:o,value:[]},f=i(u).find("a"),m=0;o==="\u5267\u60C5"?m=3:o==="\u5E74\u4EE3"?m=2:o==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:i(d).text(),v:y[m]})}r.push(c),a=a+1}}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=this.siteUrl+e,s=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],u=e.split("/")[2],o=we(/var _yu_gda_s="(.*?)";/,s),c={action:a,page:parseInt(n),year:r[2]??"0",area:r[3]??"all",class:r[1]??"0",dect:"",id:u},f=await this.fetch(o,c,this.getHeader());if(f!==null){let m=Ue(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r);let s="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(l)[1],a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let u=this.paraseUrlObject(a);this.vodDetail.vod_play_url=u.play_url,this.vodDetail.vod_play_from=u.play_format}}}async setSearch(e,n){let l=this.siteUrl+"/search.php",r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i={top:10,q:e},s=we(/var my_search='(.*?)';/,r),a=await this.fetch(s,i,this.getHeader());if(!B.isEmpty(a)){let u=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(u)}}}},wn=new pS;var fS=class extends Ce{constructor(){super()}getName(){return wn.getName()}getAppName(){return wn.getAppName()}getJSName(){return wn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await wn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await wn.initCookie(e.server.config.bilicookie),await wn.spiderInit(e),wn.cfgObj.code=0,wn.catOpenStatus=!0,wn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await wn.setClasses(),this.classes=wn.classes}async setFilterObj(){await wn.setFilterObj(),this.filterObj=wn.filterObj}async setHomeVod(){await wn.setHomeVod(),this.homeVodList=wn.homeVodList}async setCategory(e,n,l,r){await wn.setCategory(e,n,l,r),this.vodList=wn.vodList}async setDetail(e){await wn.setDetail(e),this.vodDetail=wn.vodDetail}async setPlay(e,n,l){await wn.setPlay(e,n,l),this.playUrl=wn.playUrl,this.result=wn.result}async setSearch(e,n,l){await wn.setSearch(e,n,l),this.vodList=wn.vodList,this.result=wn.result}async setProxy(e,n){return await wn.proxy(e,n)}},ga=new fS;async function gX(t,e){return await ga.init(t,e)}async function vX(t,e){return await ga.home(t,e)}async function Hxe(t,e){return await ga.homeVod(t,e)}async function _X(t,e){return await ga.category(t,e)}async function EX(t,e){return await ga.detail(t,e)}async function bX(t,e){return await ga.play(t,e)}async function wX(t,e){return await ga.search(t,e)}async function Vxe(t,e){return await ga.proxy(t,e)}var SX={meta:{key:wn.getJSName(),name:wn.getName(),type:wn.getType()},api:async t=>{t.post("/init",gX),t.post("/home",vX),t.post("/category",_X),t.post("/detail",EX),t.post("/play",bX),t.post("/search",wX),t.get("/proxy/:what/:ids/:end",Vxe)},spider:{init:gX,home:vX,homeVod:Hxe,category:_X,detail:EX,play:bX,search:wX}};var dS=class extends ca{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},Sn=new dS;var hS=class extends Ce{constructor(){super()}getName(){return Sn.getName()}getAppName(){return Sn.getAppName()}getJ
Line truncated
|
||||
"class": "{{ext.class|default(0)}}"}`,{ext:r,tid:e,pg:n}));console.log(s);let a=await this.request(i,s);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,l){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 r=0;r<this.parse.length;r++)try{let i=this.parse[r],s=await req(i+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=dX(n,JSON.parse(s.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 r=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),i=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+i[1]+"&episodeSid="+i[2]+"&quality=LD",{headers:r}),a=JSON.parse(s.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let r=await this.request(this.siteUrl+"/video.php",{url:n}),i=dX(n,r.data);i.url&&(i.url.indexOf("filename=1.mp4")>-1?this.playUrl=i.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+r2(i.url),{}))}}catch(r){await this.jadeLog.error(r)}}async setSearch(e,n){let l=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(l.data.data)}async proxy(e,n){let l=e[0],r=b2(e[1]);if(l==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${r}`);let i=await req(r,{}),s=i.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),u=r.substr(0,r.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(o,c,f,m){let d=(f.startsWith("http")?"":u)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(o,c,f){let m=(f.startsWith("http")?"":u)+f;return c+a+b2(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(o,c,f){let m=(f.startsWith("http")?"":u)+f;return c+m}),JSON.stringify({code:i.code,content:s,headers:i.headers})}return JSON.stringify({code:500,content:""})}},bn=new pS;var fS=class extends Ce{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await bn.initCookie(e.server.config.bilicookie),await bn.spiderInit(e),bn.cfgObj.code=0,bn.catOpenStatus=!0,bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await bn.setClasses(),this.classes=bn.classes}async setFilterObj(){await bn.setFilterObj(),this.filterObj=bn.filterObj}async setHomeVod(){await bn.setHomeVod(),this.homeVodList=bn.homeVodList}async setCategory(e,n,l,r){await bn.setCategory(e,n,l,r),this.vodList=bn.vodList}async setDetail(e){await bn.setDetail(e),this.vodDetail=bn.vodDetail}async setPlay(e,n,l){await bn.setPlay(e,n,l),this.playUrl=bn.playUrl,this.result=bn.result}async setSearch(e,n,l){await bn.setSearch(e,n,l),this.vodList=bn.vodList,this.result=bn.result}async setProxy(e,n){return await bn.proxy(e,n)}},va=new fS;async function hX(t,e){return await va.init(t,e)}async function mX(t,e){return await va.home(t,e)}async function Wxe(t,e){return await va.homeVod(t,e)}async function yX(t,e){return await va.category(t,e)}async function gX(t,e){return await va.detail(t,e)}async function vX(t,e){return await va.play(t,e)}async function _X(t,e){return await va.search(t,e)}async function Yxe(t,e){return await va.proxy(t,e)}var EX={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",hX),t.post("/home",mX),t.post("/category",yX),t.post("/detail",gX),t.post("/play",vX),t.post("/search",_X),t.get("/proxy/:what/:ids/:end",Yxe)},spider:{init:hX,home:mX,homeVod:Wxe,category:yX,detail:gX,play:vX,search:_X}};function Qxe(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8"
Line truncated
|
||||
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id=l.url,r.vod_pic=l.thumb,r.vod_remarks=l.time,r.vod_name=l.title,n.push(r)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=je(e),l=n("[class=index-list-l]");for(let r of l){let i=n(n(r).find('[class="h1 clearfix"]')[0]).find("a"),s=i[0].attribs.href,a=n(i[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader()),r=[];if(!B.isEmpty(l)){let i=je(l),s=i('[class="sy scon clearfix"]').find("dl"),a=0;for(let u of s){let o=i(i(u).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:o,value:[]},f=i(u).find("a"),m=0;o==="\u5267\u60C5"?m=3:o==="\u5E74\u4EE3"?m=2:o==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:i(d).text(),v:y[m]})}r.push(c),a=a+1}}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=je(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=this.siteUrl+e,s=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],u=e.split("/")[2],o=we(/var _yu_gda_s="(.*?)";/,s),c={action:a,page:parseInt(n),year:r[2]??"0",area:r[3]??"all",class:r[1]??"0",dect:"",id:u},f=await this.fetch(o,c,this.getHeader());if(f!==null){let m=je(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=je(l);this.vodDetail=await this.parseVodDetailFromDoc(r);let s="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(l)[1],a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let u=this.paraseUrlObject(a);this.vodDetail.vod_play_url=u.play_url,this.vodDetail.vod_play_from=u.play_format}}}async setSearch(e,n){let l=this.siteUrl+"/search.php",r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i={top:10,q:e},s=we(/var my_search='(.*?)';/,r),a=await this.fetch(s,i,this.getHeader());if(!B.isEmpty(a)){let u=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(u)}}}},wn=new dS;var hS=class extends Ce{constructor(){super()}getName(){return wn.getName()}getAppName(){return wn.getAppName()}getJSName(){return wn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await wn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await wn.initCookie(e.server.config.bilicookie),await wn.spiderInit(e),wn.cfgObj.code=0,wn.catOpenStatus=!0,wn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await wn.setClasses(),this.classes=wn.classes}async setFilterObj(){await wn.setFilterObj(),this.filterObj=wn.filterObj}async setHomeVod(){await wn.setHomeVod(),this.homeVodList=wn.homeVodList}async setCategory(e,n,l,r){await wn.setCategory(e,n,l,r),this.vodList=wn.vodList}async setDetail(e){await wn.setDetail(e),this.vodDetail=wn.vodDetail}async setPlay(e,n,l){await wn.setPlay(e,n,l),this.playUrl=wn.playUrl,this.result=wn.result}async setSearch(e,n,l){await wn.setSearch(e,n,l),this.vodList=wn.vodList,this.result=wn.result}async setProxy(e,n){return await wn.proxy(e,n)}},_a=new hS;async function bX(t,e){return await _a.init(t,e)}async function wX(t,e){return await _a.home(t,e)}async function Zxe(t,e){return await _a.homeVod(t,e)}async function SX(t,e){return await _a.category(t,e)}async function TX(t,e){return await _a.detail(t,e)}async function xX(t,e){return await _a.play(t,e)}async function AX(t,e){return await _a.search(t,e)}async function eAe(t,e){return await _a.proxy(t,e)}var OX={meta:{key:wn.getJSName(),name:wn.getName(),type:wn.getType()},api:async t=>{t.post("/init",bX),t.post("/home",wX),t.post("/category",SX),t.post("/detail",TX),t.post("/play",xX),t.post("/search",AX),t.get("/proxy/:what/:ids/:end",eAe)},spider:{init:bX,home:wX,homeVod:Zxe,category:SX,detail:TX,play:xX,search:AX}};var mS=class extends fa{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},Sn=new mS;var yS=class extends Ce{constructor(){super()}getName(){return Sn.getName()}getAppName(){return Sn.getAppName()}getJ
Line truncated
|
||||
<ContentComponent contentType="${f}"/>
|
||||
<Representation id="${n}" bandwidth="${i}" codecs="${r}" mimeType="${a}" ${m} startWithSAP="${s}">
|
||||
<BaseURL>${u}</BaseURL>
|
||||
@@ -418,22 +418,22 @@ function print() { __p += __j.call(arguments, '') }
|
||||
${n}
|
||||
${l}
|
||||
</Period>
|
||||
</MPD>`}async proxy(e,n){let l=e[0],r=_2(e[1]);if(l==="dash"){let i=r.split("+"),s=i[0],a=i[1],u=i[2],o=this.apiUrl+`/x/player/playurl?avid=${s}&cid=${a}&qn=${u}&fnval=4048&fourk=1`,c="",f="",m=await this.fetch(o,null,n),d=JSON.parse(m),y=d.data.dash,_=y.video,S=y.audio;for(let E=0;E<_.length;E++){let g=_[E];g.id.toString()===u&&(c+=this.getDashMedia(g))}for(let E=0;E<S.length;E++){let g=S[E];for(let v in this.vod_audio_id)g.id.toString()===v&&(f+=this.getDashMedia(g))}let w=this.getDash(d,c,f);return JSON.stringify({code:200,content:w,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},xn=new _S;var ES=class extends Ce{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("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),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,l,r){await xn.setCategory(e,n,l,r),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,l){await xn.setPlay(e,n,l),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,l){await xn.setSearch(e,n,l),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},ba=new ES;async function zX(t,e){return await ba.init(t,e)}async function GX(t,e){return await ba.home(t,e)}async function iAe(t,e){return await ba.homeVod(t,e)}async function JX(t,e){return await ba.category(t,e)}async function KX(t,e){return await ba.detail(t,e)}async function XX(t,e){return await ba.play(t,e)}async function WX(t,e){return await ba.search(t,e)}async function sAe(t,e){return await ba.proxy(t,e)}var YX={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",zX),t.post("/home",GX),t.post("/category",JX),t.post("/detail",KX),t.post("/play",XX),t.post("/search",WX),t.get("/proxy/:what/:ids/:end",sAe)},spider:{init:zX,home:GX,homeVod:iAe,category:JX,detail:KX,play:XX,search:WX}};var bS=class extends Pe{constructor(){super(),this.siteUrl="https://www.xb6v.com"}getName(){return"\u{1F9F2}\u2503\u78C1\u529B\u65B06V\u2503\u{1F9F2}"}getAppName(){return"\u78C1\u529B\u65B06V"}getJSName(){return"xb6v"}getType(){return 3}async redirect(e){await this.jadeLog.debug(`\u91CD\u5B9A\u5411\u56DE\u590D\u503C\u4E3A:${e.content}`);let n=/<a HREF=(.*?)>/.exec(e.content);if(n.length>1){let l=this.siteUrl+"/e/search/"+n[1].replaceAll("\\","").replaceAll('"',"");return await this.jadeLog.info(`\u91CD\u5B9A\u5411url\u4E3A:${l}`),await this.fetch(l,null,this.getHeader())}}getActorOrDirector(e,n){return we(e,n).replace(/<br>/g,"").replace(/ ./g,"").replace(/&/g,"").replace(/middot;/g,"\u30FB").replace(/ /g,",").replace(/ /g,",").replace(/ /g,"")}getDescription(e,n){return we(e,n).replace(/<\/?[^>]+>/g,"").replace(/\n/g,"").replace(/&/g,"").replace(/middot;/g,"\u30FB").replace(/ldquo;/g,"\u3010").replace(/rdquo;/g,"\u3011").replace(/ /g,"")}async parseVodShortListFromDoc(e){let n=e("#post_container .post_hover"),l=[];for(let r of n){let i=e(r).find("[class=zoom]")[0],s=new Ne;s.vod_id=i.attribs.href,s.vod_name=i.attribs.title.replaceAll(/<\\?[^>]+>/g,""),s.vod_pic=e(i).find("img")[0].attribs.src,s.vod_remarks=e(r).find('[rel="category tag"]').text().replaceAll(`
|
||||
`,"").replaceAll(" ",""),l.push(s)}return l}async parseVodDetailFromDoc(e){let n=e("#post_content"),l=[],r=[];if(!this.catOpenStatus){let u=0,o="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),m=[];for(let d of f){let y=d.attribs.href,_=d.children[0].data;y.toLowerCase().startsWith("magnet")&&m.push(_+"$"+y)}m.length>0&&(u++,l.push(o+u),r.push(m.join("#")))}}let i=e(e(".mainleft")).find('[class="widget box row"]');for(let u of i){let o=e(u).find("h3").text(),c=[];if(!B.isEmpty(o)){let f=e(u).find("a");for(let m of f)c.push(m.attribs.title+"$"+m.attribs.href);l.push(o),r.push(c.join("#"))}}let s=e(".context").html(),a=new Me;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=we(/◎类 别 (.*?)<br>/,s),B.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=we(/◎年 代 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_year=we(/首播:(.*?)<br>"/,s)),a.vod_area=we(/◎产 地 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_area=we(/地区:(.*?)<br>"/,s)),a.vod_remarks=we(/◎上映日期 (.*?)<br>/,s),a.vod_actor=this.getActorOrDirector(/◎演 员 (.*?)<\/p>/,s),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主 演 (.*?)<\/p>/,s)),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,s)),a.vod_director=this.getActorOrDirector(/◎导 演 (.*?)<br>/,s),B.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,s)),a.vod_content=this.getDescription(/◎简 介(.*?)<hr>/gi,s),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,s)),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简 介(.*?)<br>/gi,s)),a.vod_play_from=l.join("$$$"),a.vod_play_url=r.join("$$$"),a}async parseVodPlayFromDoc(e,n){let l="",r=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":l=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let i=/url: '(.*?)',/gs.exec(r);i.length>1&&(l=i[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let s=/source: "(.*?)",/gs.exec(r);s.length>1&&(l=s[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return l}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n("#menus > li > a");for(let r=0;r<l.length;r++){let i=l[r];if(r<2||r===l.length-1)continue;let s=i.children[0].data,a=i.attribs.href;if(this.classes.push({type_name:s,type_id:a}),s==="\u7535\u89C6\u5267"){let u=[{n:"\u4E0D\u9650",v:""}];for(let o of n(i.next).find("a"))u.push({n:o.children[0].data,v:o.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:u}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(B.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=r.cateId??"",s=this.siteUrl+e+i;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(s+="index_"+n+".html");let a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let u=Ue(a),o=u(".pagination > a");if(o.length>0){let c=o.slice(-1)[0].attribs.href,m=/index_(.*?).html/.exec(c);this.count=parseInt(m[1]);let d=u("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+d.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(u)}}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},i=await this.post(l,r,this.getHeader());if(!B.isEmpty(i)){let s=Ue(i);this.vodList=await this.parseVodShortListFromDoc(s)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){if(n.toLowerCase().startsWith("magnet"))this.playUrl=n;else{let r=this.siteUrl+n,i=await this.fetch(r,null,this.getHeader()),s=Ue(i);this.playUrl=await this.parseVodPlayFromDoc(e,s)}}},An=new bS;var wS=class extends Ce{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJSName(){return An.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await An.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await An.initCookie(e.server.config.bilicookie),await An.spiderInit(e),An.cfgObj.code=0,An.catOpenStatus=!0,An.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),awai
Line truncated
|
||||
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let u=a.split("\u65F6\u95F4"),o=new Ne;o.vod_name=u[0],o.vod_remarks=u[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),o.vod_id=JSON.stringify({name:o.vod_name,remarks:o.vod_remarks,id:i}),l.push(o)}}}return l}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",l={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},r=await this.fetch(n,l,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r),s=await this.parseVodShortListFromDocBySearch(i);s.length>0?e=s[0].vod_id:e=""}}if(!B.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,l,r){let i=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(i[parseInt(e)])}async setSearch(e,n){let l=this.siteUrl+"/search",r={k:e},i=await this.fetch(l,r,this.getHeader());if(!B.isEmpty(i)){let s=Ue(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}},On=new TS;var xS=class extends Ce{constructor(){super()}getName(){return On.getName()}getAppName(){return On.getAppName()}getJSName(){return On.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await On.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await On.initCookie(e.server.config.bilicookie),await On.spiderInit(e),On.cfgObj.code=0,On.catOpenStatus=!0,On.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await On.setClasses(),this.classes=On.classes}async setFilterObj(){await On.setFilterObj(),this.filterObj=On.filterObj}async setHomeVod(){await On.setHomeVod(),this.homeVodList=On.homeVodList}async setCategory(e,n,l,r){await On.setCategory(e,n,l,r),this.vodList=On.vodList}async setDetail(e){await On.setDetail(e),this.vodDetail=On.vodDetail}async setPlay(e,n,l){await On.setPlay(e,n,l),this.playUrl=On.playUrl,this.result=On.result}async setSearch(e,n,l){await On.setSearch(e,n,l),this.vodList=On.vodList,this.result=On.result}async setProxy(e,n){return await On.proxy(e,n)}},Sa=new xS;async function sW(t,e){return await Sa.init(t,e)}async function aW(t,e){return await Sa.home(t,e)}async function dAe(t,e){return await Sa.homeVod(t,e)}async function uW(t,e){return await Sa.category(t,e)}async function oW(t,e){return await Sa.detail(t,e)}async function cW(t,e){return await Sa.play(t,e)}async function pW(t,e){return await Sa.search(t,e)}async function hAe(t,e){return await Sa.proxy(t,e)}var fW={meta:{key:On.getJSName(),name:On.getName(),type:On.getType()},api:async t=>{t.post("/init",sW),t.post("/home",aW),t.post("/category",uW),t.post("/detail",oW),t.post("/play",cW),t.post("/search",pW),t.get("/proxy/:what/:ids/:end",hAe)},spider:{init:sW,home:aW,homeVod:dAe,category:uW,detail:oW,play:cW,search:pW}};var AS=class extends Pe{constructor(){super(),this.siteUrl="https://api.web.360kan.com"}getName(){return"\u{1F94E}\u2503360\u5F71\u89C6\u2503\u{1F94E}"}getAppName(){return"360"}getJSName(){return"sp360"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}async setClasses(){this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic("\u7535\u5F71","1"),this.getTypeDic("\u5267\u96C6","2"),this.getTypeDic("\u7EFC\u827A","3"),this.getTypeDic("\u52A8\u6F2B","4")]}async setFilterObj(){this.filterObj={1:[{key:"cat",name:"\u7C7B\u578B",value:[{n:"\u5168\u90E8",v:""},{n:"\u559C\u5267",v:"\u559C\u5267"},{n:"\u7231\u60C5",v:"\u7231\u60C5"},{n:"\u52A8\u4F5C",v:"\u52A8\u4F5C"},{n:"\u6050\u6016",v:"\u6050\u6016"},{n:"\u79D1\u5E7B",v:"\u79D1\u5E7B"},{n:"\u5267\u60C5",v:"\u5267\u60C5"},{n:"\u72AF\u7F6A",v:"\u72AF\u7F6A"},{n:"\u5947\u5E7B",v:"\u5947\u5E7B"},{n:"\u6218\u4E89",v:"\u6218\u4E89"},{n:"\u60AC\u7591",v:"\u60AC\u7591"},{n:"\u52A8\u753B",v:"\u52A8\u753B"},{n:"\u6587\u827A",v:"\u6587\u827A"},{n:"\u7EAA\u5F55",v:"\u7EAA\u5F55"},{n:"\u4F20\u8BB0",v:"\u4F20\u8BB0"},{n:"\u6B4C\u821E",v:"\u6B4C\u821E"},{n:"\u53E4\u88C5",v:"\u53E4\u88C5"},{n:"\u5386\u53F2",v:"\u5386\u53F2"},{n:"\u60CA\u609A",v:"\u60CA\u609A"},{n:"\u4F26\u7406",v:"\u4F26\u7406"},{n:"\u5176\u4ED6",v:"\u5176\u4ED6"}]},{key:"year",name:"\u5E74\u4EE3",value:[{n:"\u5168\u90E8",v:""},{n:"2024",v:"2024"},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2018",v:"2018"},{n:"2017",v:"2017"},{n:"2016",v:"2016"},{n:"2015",v:"2015"},{n:"2014",v:"2014"},{n:"2013",v:"2013"},{n:"2012",v:"2012"},{n:"2010",v
Line truncated
|
||||
`;n.type_name=e(e(e(r).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=we(/名称:(.*?)\n/,s),n.vod_actor=we(/主演:(.*?)\n/,s),n.vod_director=we(/导演:(.*?)\n/,s),n.vod_area=we(/地区:(.*?)\n/,s),n.vod_year=we(/年份:(.*?)\n/,s),n.vod_remarks=we(/更新:(.*?)\n/,s);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let u=e('[class="article-related download_url"]'),o=[],c=[];for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("h2")).text().replaceAll(n.vod_name,"");o.push(d.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let y=[];for(let _ of e(u[f]).find("a")){let S=e(_).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),w=_.attribs.href;y.push(S+"$"+w)}c.push(y.join("#"))}return n.vod_play_from=o.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],l=Ue(e.ajaxtxt),r=l(l("ul")).find("li");for(let i of r){let s=new Ne;s.vod_pic=l(i).find("img")[0].attribs["data-original"],s.vod_name=we(/《(.*?)》/,l(i).find("img")[0].attribs.alt),s.vod_id=l(i).find("a")[0].attribs.href,s.vod_remarks="\u8BC4\u5206:"+l(l(i).find('[class="rate badge"]')).text(),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e(e('[id="list_all"]').find("ul")).find("li");for(let r of l){let i=new Ne;i.vod_id=e(r).find("a")[0].attribs.href,i.vod_name=we(/《(.*?)》/,e(e(e(r).find('[class="text_info"]')).find("a")[0]).text()),i.vod_pic=e(r).find("img")[0].attribs["data-original"],i.vod_remarks=e(e(r).find('[class="update_time"]')).text(),n.push(i)}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,l,r){let i=this.siteUrl+`/list/${e}-${n}.html`,s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setSearch(e,n){let l=this.siteUrl+"/search/",r={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},i=await this.post(l,r,this.getSearchHeader()),s=Ue(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}},Cn=new NS;var CS=class extends Ce{constructor(){super()}getName(){return Cn.getName()}getAppName(){return Cn.getAppName()}getJSName(){return Cn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Cn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Cn.initCookie(e.server.config.bilicookie),await Cn.spiderInit(e),Cn.cfgObj.code=0,Cn.catOpenStatus=!0,Cn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Cn.setClasses(),this.classes=Cn.classes}async setFilterObj(){await Cn.setFilterObj(),this.filterObj=Cn.filterObj}async setHomeVod(){await Cn.setHomeVod(),this.homeVodList=Cn.homeVodList}async setCategory(e,n,l,r){await Cn.setCategory(e,n,l,r),this.vodList=Cn.vodList}async setDetail(e){await Cn.setDetail(e),this.vodDetail=Cn.vodDetail}async setPlay(e,n,l){await Cn.setPlay(e,n,l),this.playUrl=Cn.playUrl,this.result=Cn.result}async setSearch(e,n,l){await Cn.setSearch(e,n,l),this.vodList=Cn.vodList,this.result=Cn.result}async setProxy(e,n){return await Cn.proxy(e,n)}},xa=new CS;async function EW(t,e){return await xa.init(t,e)}async function bW(t,e){return await xa.home(t,e)}async function gAe(t,e){return await xa.homeVod(t,e)}async function wW(t,e){return await xa.category(t,e)}async function SW(t,e){return await xa.detail(t,e)}async function TW(t,e){return await xa.play(t,e)}async function xW(t,e){return await xa.search(t,e)}async function vAe(t,e){return await xa.proxy(t,e)}var AW={meta:{key:Cn.getJSName(),name:Cn.getName(),type:Cn.getType()},api:async t=>{t.post("/init",EW),t.post("/home",bW),t.post("/category",wW),t.post("/detail",SW),t.post("/play",TW),t.post("/search",xW),t.get("/proxy/:what/:ids/:end",vAe)},spider:{init:EW,home:bW,homeVod:gAe,category:wW,detail:SW,play:TW,search:xW}};var RS=class extends Pe{constructor(){super(),this.siteUrl="https://frodo.douban.com/api/v2",this.apiKey="0ac44ae016490db2204ce0a042db2916",this.UserAgents=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"]}getHeader(){return{Host:"frodo.douban.com",Connection:"Keep-Alive",Referer:
Line truncated
|
||||
`," ").replaceAll(" \u6536\u8D77","");let o=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],m=[];for(let d=0;d<o.length;d++){let _=o[d].attribs["data-dropdown-value"];if(_.indexOf("\u5938\u514B")===-1){f.push(_);let S=[];for(let w of e(c[d]).find("a")){let E=e(w).text(),g=w.attribs.href;S.push(E+"$"+g)}m.push(S.join("#"))}}return l.vod_play_from=f.join("$$$"),l.vod_play_url=m.join("$$$"),l}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=[3,11,1,2];r.\u5168\u90E8\u5267\u60C5!==void 0&&r.\u5168\u90E8\u5267\u60C5!=="0"&&(i[s[0]]=r.\u5168\u90E8\u5267\u60C5),r.\u5168\u90E8\u65F6\u95F4!==void 0&&r.\u5168\u90E8\u65F6\u95F4!=="0"&&(i[s[1]]=r.\u5168\u90E8\u65F6\u95F4),r.\u5168\u90E8\u5730\u533A!==void 0&&r.\u5168\u90E8\u5730\u533A!=="0"&&(i[s[2]]=r.\u5168\u90E8\u5730\u533A),r.\u65F6\u95F4\u6392\u5E8F!==void 0&&r.\u65F6\u95F4\u6392\u5E8F!=="0"&&(i[s[3]]=r.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(u)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let l=He.enc.Utf8.parse("2890"+n+"tB959C"),r=He.enc.Utf8.parse("2F131BE91247866E"),i=He.AES.decrypt(e,l,{iv:r,mode:He.mode.CBC,padding:He.pad.Pkcs7});return He.enc.Utf8.stringify(i)}async setPlay(e,n,l){let i=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(i.indexOf("http")>-1)this.playUrl=i;else{let s="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+i,u=(await this.getHtml(s)).html(),o=JSON.parse(we(/let ConFig = (.*?),box = /,u));this.playUrl=this.uic(o.url,o.config.uid)}}async setSearch(e,n){let l=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,r=await this.fetch(l,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(r))}},In=new kS;var DS=class extends Ce{constructor(){super()}getName(){return In.getName()}getAppName(){return In.getAppName()}getJSName(){return In.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await In.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await In.initCookie(e.server.config.bilicookie),await In.spiderInit(e),In.cfgObj.code=0,In.catOpenStatus=!0,In.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await In.setClasses(),this.classes=In.classes}async setFilterObj(){await In.setFilterObj(),this.filterObj=In.filterObj}async setHomeVod(){await In.setHomeVod(),this.homeVodList=In.homeVodList}async setCategory(e,n,l,r){await In.setCategory(e,n,l,r),this.vodList=In.vodList}async setDetail(e){await In.setDetail(e),this.vodDetail=In.vodDetail}async setPlay(e,n,l){await In.setPlay(e,n,l),this.playUrl=In.playUrl,this.result=In.result}async setSearch(e,n,l){await In.setSearch(e,n,l),this.vodList=In.vodList,this.result=In.result}async setProxy(e,n){return await In.proxy(e,n)}},Oa=new DS;async function PW(t,e){return await Oa.init(t,e)}async function LW(t,e){return await Oa.home(t,e)}async function bAe(t,e){return await Oa.homeVod(t,e)}async function FW(t,e){return await Oa.category(t,e)}async function jW(t,e){return await Oa.detail(t,e)}async function UW(t,e){return await Oa.play(t,e)}async function MW(t,e){return await Oa.search(t,e)}async function wAe(t,e){return await Oa.proxy(t,e)}var $W={meta:{key:In.getJSName(),name:In.getName(),type:In.getType()},api:async t=>{t.post("/init",PW),t.post("/home",LW),t.post("/category",FW),t.post("/detail",jW),t.post("/play",UW),t.post("/search",MW),t.get("/proxy/:what/:ids/:end",wAe)},spider:{init:PW,home:LW,homeVod:bAe,category:FW,detail:jW,play:UW,search:MW}};function SAe(t){return t.replace(/<\/?[^>]+(>|$)/g,"").replace(/&.{1,5};/g,"").replace(/\s{2,}/g," ")}function TAe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}var PS=class extends Pe{constructor(){super(),this.siteUrl="http://ys.changmengyun.com"}getName(){return"\u{1F383}\u2503\u5357\u74DC\u5F71\u89C6\u2503\u{1F383}"}getAppName(){return"\u5357\u74DC\u5F71\u89C6"}getJSName(){return"nangua"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}getHeader(){let e=new Date().getTime().toString();return{version_name:"1.0.6",version_code:"6",package_name:"com.app.nanguatv",sign:He.MD5("c431ea542cee9679#uBFszdEM0oL0JRn@"+e).toString().toLowerCase(),imei:"c431ea542cee9679",timeMillis:e,"User-Agent":"okhttp/4.6.0"}}async setClasses(){let e=JSON.parse(await this.fetch(this.siteUrl+"/api.php/provide/home_nav",null,this.getHeader()));for(let n in e)e[n].name!=="\u7CBE\u9009"&&this.classes.push({type_id:e[n].id,type_name:e[n].name})}async set
Line truncated
|
||||
</MPD>`}async proxy(e,n){let l=e[0],r=b2(e[1]);if(l==="dash"){let i=r.split("+"),s=i[0],a=i[1],u=i[2],o=this.apiUrl+`/x/player/playurl?avid=${s}&cid=${a}&qn=${u}&fnval=4048&fourk=1`,c="",f="",m=await this.fetch(o,null,n),d=JSON.parse(m),y=d.data.dash,_=y.video,S=y.audio;for(let E=0;E<_.length;E++){let g=_[E];g.id.toString()===u&&(c+=this.getDashMedia(g))}for(let E=0;E<S.length;E++){let g=S[E];for(let v in this.vod_audio_id)g.id.toString()===v&&(f+=this.getDashMedia(g))}let w=this.getDash(d,c,f);return JSON.stringify({code:200,content:w,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},xn=new bS;var wS=class extends Ce{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("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),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,l,r){await xn.setCategory(e,n,l,r),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,l){await xn.setPlay(e,n,l),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,l){await xn.setSearch(e,n,l),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},Sa=new wS;async function XX(t,e){return await Sa.init(t,e)}async function WX(t,e){return await Sa.home(t,e)}async function yAe(t,e){return await Sa.homeVod(t,e)}async function YX(t,e){return await Sa.category(t,e)}async function QX(t,e){return await Sa.detail(t,e)}async function ZX(t,e){return await Sa.play(t,e)}async function eW(t,e){return await Sa.search(t,e)}async function gAe(t,e){return await Sa.proxy(t,e)}var tW={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",XX),t.post("/home",WX),t.post("/category",YX),t.post("/detail",QX),t.post("/play",ZX),t.post("/search",eW),t.get("/proxy/:what/:ids/:end",gAe)},spider:{init:XX,home:WX,homeVod:yAe,category:YX,detail:QX,play:ZX,search:eW}};var SS=class extends De{constructor(){super(),this.siteUrl="https://www.xb6v.com"}getName(){return"\u{1F9F2}\u2503\u78C1\u529B\u65B06V\u2503\u{1F9F2}"}getAppName(){return"\u78C1\u529B\u65B06V"}getJSName(){return"xb6v"}getType(){return 3}async redirect(e){await this.jadeLog.debug(`\u91CD\u5B9A\u5411\u56DE\u590D\u503C\u4E3A:${e.content}`);let n=/<a HREF=(.*?)>/.exec(e.content);if(n.length>1){let l=this.siteUrl+"/e/search/"+n[1].replaceAll("\\","").replaceAll('"',"");return await this.jadeLog.info(`\u91CD\u5B9A\u5411url\u4E3A:${l}`),await this.fetch(l,null,this.getHeader())}}getActorOrDirector(e,n){return we(e,n).replace(/<br>/g,"").replace(/ ./g,"").replace(/&/g,"").replace(/middot;/g,"\u30FB").replace(/ /g,",").replace(/ /g,",").replace(/ /g,"")}getDescription(e,n){return we(e,n).replace(/<\/?[^>]+>/g,"").replace(/\n/g,"").replace(/&/g,"").replace(/middot;/g,"\u30FB").replace(/ldquo;/g,"\u3010").replace(/rdquo;/g,"\u3011").replace(/ /g,"")}async parseVodShortListFromDoc(e){let n=e("#post_container .post_hover"),l=[];for(let r of n){let i=e(r).find("[class=zoom]")[0],s=new Ne;s.vod_id=i.attribs.href,s.vod_name=i.attribs.title.replaceAll(/<\\?[^>]+>/g,""),s.vod_pic=e(i).find("img")[0].attribs.src,s.vod_remarks=e(r).find('[rel="category tag"]').text().replaceAll(`
|
||||
`,"").replaceAll(" ",""),l.push(s)}return l}async parseVodDetailFromDoc(e){let n=e("#post_content"),l=[],r=[];if(!this.catOpenStatus){let u=0,o="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),m=[];for(let d of f){let y=d.attribs.href,_=d.children[0].data;y.toLowerCase().startsWith("magnet")&&m.push(_+"$"+y)}m.length>0&&(u++,l.push(o+u),r.push(m.join("#")))}}let i=e(e(".mainleft")).find('[class="widget box row"]');for(let u of i){let o=e(u).find("h3").text(),c=[];if(!B.isEmpty(o)){let f=e(u).find("a");for(let m of f)c.push(m.attribs.title+"$"+m.attribs.href);l.push(o),r.push(c.join("#"))}}let s=e(".context").html(),a=new Me;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=we(/◎类 别 (.*?)<br>/,s),B.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=we(/◎年 代 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_year=we(/首播:(.*?)<br>"/,s)),a.vod_area=we(/◎产 地 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_area=we(/地区:(.*?)<br>"/,s)),a.vod_remarks=we(/◎上映日期 (.*?)<br>/,s),a.vod_actor=this.getActorOrDirector(/◎演 员 (.*?)<\/p>/,s),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主 演 (.*?)<\/p>/,s)),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,s)),a.vod_director=this.getActorOrDirector(/◎导 演 (.*?)<br>/,s),B.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,s)),a.vod_content=this.getDescription(/◎简 介(.*?)<hr>/gi,s),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,s)),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简 介(.*?)<br>/gi,s)),a.vod_play_from=l.join("$$$"),a.vod_play_url=r.join("$$$"),a}async parseVodPlayFromDoc(e,n){let l="",r=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":l=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let i=/url: '(.*?)',/gs.exec(r);i.length>1&&(l=i[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let s=/source: "(.*?)",/gs.exec(r);s.length>1&&(l=s[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return l}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=je(e),l=n("#menus > li > a");for(let r=0;r<l.length;r++){let i=l[r];if(r<2||r===l.length-1)continue;let s=i.children[0].data,a=i.attribs.href;if(this.classes.push({type_name:s,type_id:a}),s==="\u7535\u89C6\u5267"){let u=[{n:"\u4E0D\u9650",v:""}];for(let o of n(i.next).find("a"))u.push({n:o.children[0].data,v:o.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:u}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(B.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=je(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=r.cateId??"",s=this.siteUrl+e+i;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(s+="index_"+n+".html");let a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let u=je(a),o=u(".pagination > a");if(o.length>0){let c=o.slice(-1)[0].attribs.href,m=/index_(.*?).html/.exec(c);this.count=parseInt(m[1]);let d=u("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+d.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(u)}}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},i=await this.post(l,r,this.getHeader());if(!B.isEmpty(i)){let s=je(i);this.vodList=await this.parseVodShortListFromDoc(s)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=je(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){if(n.toLowerCase().startsWith("magnet"))this.playUrl=n;else{let r=this.siteUrl+n,i=await this.fetch(r,null,this.getHeader()),s=je(i);this.playUrl=await this.parseVodPlayFromDoc(e,s)}}},An=new SS;var TS=class extends Ce{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJSName(){return An.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await An.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await An.initCookie(e.server.config.bilicookie),await An.spiderInit(e),An.cfgObj.code=0,An.catOpenStatus=!0,An.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),awai
Line truncated
|
||||
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let u=a.split("\u65F6\u95F4"),o=new Ne;o.vod_name=u[0],o.vod_remarks=u[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),o.vod_id=JSON.stringify({name:o.vod_name,remarks:o.vod_remarks,id:i}),l.push(o)}}}return l}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",l={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},r=await this.fetch(n,l,this.getHeader());if(!B.isEmpty(r)){let i=je(r),s=await this.parseVodShortListFromDocBySearch(i);s.length>0?e=s[0].vod_id:e=""}}if(!B.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,l,r){let i=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(i[parseInt(e)])}async setSearch(e,n){let l=this.siteUrl+"/search",r={k:e},i=await this.fetch(l,r,this.getHeader());if(!B.isEmpty(i)){let s=je(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}async setPlay(e,n,l){let r=await O3(e,n,l);this.playUrl=JSON.parse(r).url}},On=new AS;var OS=class extends Ce{constructor(){super()}getName(){return On.getName()}getAppName(){return On.getAppName()}getJSName(){return On.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await On.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await On.initCookie(e.server.config.bilicookie),await On.spiderInit(e),On.cfgObj.code=0,On.catOpenStatus=!0,On.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await On.setClasses(),this.classes=On.classes}async setFilterObj(){await On.setFilterObj(),this.filterObj=On.filterObj}async setHomeVod(){await On.setHomeVod(),this.homeVodList=On.homeVodList}async setCategory(e,n,l,r){await On.setCategory(e,n,l,r),this.vodList=On.vodList}async setDetail(e){await On.setDetail(e),this.vodDetail=On.vodDetail}async setPlay(e,n,l){await On.setPlay(e,n,l),this.playUrl=On.playUrl,this.result=On.result}async setSearch(e,n,l){await On.setSearch(e,n,l),this.vodList=On.vodList,this.result=On.result}async setProxy(e,n){return await On.proxy(e,n)}},xa=new OS;async function cW(t,e){return await xa.init(t,e)}async function pW(t,e){return await xa.home(t,e)}async function TAe(t,e){return await xa.homeVod(t,e)}async function fW(t,e){return await xa.category(t,e)}async function dW(t,e){return await xa.detail(t,e)}async function hW(t,e){return await xa.play(t,e)}async function mW(t,e){return await xa.search(t,e)}async function xAe(t,e){return await xa.proxy(t,e)}var yW={meta:{key:On.getJSName(),name:On.getName(),type:On.getType()},api:async t=>{t.post("/init",cW),t.post("/home",pW),t.post("/category",fW),t.post("/detail",dW),t.post("/play",hW),t.post("/search",mW),t.get("/proxy/:what/:ids/:end",xAe)},spider:{init:cW,home:pW,homeVod:TAe,category:fW,detail:dW,play:hW,search:mW}};var NS=class extends De{constructor(){super(),this.siteUrl="https://api.web.360kan.com"}getName(){return"\u{1F94E}\u2503360\u5F71\u89C6\u2503\u{1F94E}"}getAppName(){return"360"}getJSName(){return"sp360"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}async setClasses(){this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic("\u7535\u5F71","1"),this.getTypeDic("\u5267\u96C6","2"),this.getTypeDic("\u7EFC\u827A","3"),this.getTypeDic("\u52A8\u6F2B","4")]}async setFilterObj(){this.filterObj={1:[{key:"cat",name:"\u7C7B\u578B",value:[{n:"\u5168\u90E8",v:""},{n:"\u559C\u5267",v:"\u559C\u5267"},{n:"\u7231\u60C5",v:"\u7231\u60C5"},{n:"\u52A8\u4F5C",v:"\u52A8\u4F5C"},{n:"\u6050\u6016",v:"\u6050\u6016"},{n:"\u79D1\u5E7B",v:"\u79D1\u5E7B"},{n:"\u5267\u60C5",v:"\u5267\u60C5"},{n:"\u72AF\u7F6A",v:"\u72AF\u7F6A"},{n:"\u5947\u5E7B",v:"\u5947\u5E7B"},{n:"\u6218\u4E89",v:"\u6218\u4E89"},{n:"\u60AC\u7591",v:"\u60AC\u7591"},{n:"\u52A8\u753B",v:"\u52A8\u753B"},{n:"\u6587\u827A",v:"\u6587\u827A"},{n:"\u7EAA\u5F55",v:"\u7EAA\u5F55"},{n:"\u4F20\u8BB0",v:"\u4F20\u8BB0"},{n:"\u6B4C\u821E",v:"\u6B4C\u821E"},{n:"\u53E4\u88C5",v:"\u53E4\u88C5"},{n:"\u5386\u53F2",v:"\u5386\u53F2"},{n:"\u60CA\u609A",v:"\u60CA\u609A"},{n:"\u4F26\u7406",v:"\u4F26\u7406"},{n:"\u5176\u4ED6",v:"\u5176\u4ED6"}]},{key:"year",name:"\u5E74\u4EE3",value:[{n:"\u5168\u90E8",v:""},{n:"2024",v:"2024"},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2018",v:"2018"},{n:"2017",v:"2017"},{n:"2016",v:"2016"},{n:"2015",v:"2015"},{n:"2014",v:"2014"},{n:"2013",v:"2013"},{n:"2012",v:"2012"},{n:"2010",v
Line truncated
|
||||
`;n.type_name=e(e(e(r).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=we(/名称:(.*?)\n/,s),n.vod_actor=we(/主演:(.*?)\n/,s),n.vod_director=we(/导演:(.*?)\n/,s),n.vod_area=we(/地区:(.*?)\n/,s),n.vod_year=we(/年份:(.*?)\n/,s),n.vod_remarks=we(/更新:(.*?)\n/,s);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let u=e('[class="article-related download_url"]'),o=[],c=[];for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("h2")).text().replaceAll(n.vod_name,"");o.push(d.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let y=[];for(let _ of e(u[f]).find("a")){let S=e(_).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),w=_.attribs.href;y.push(S+"$"+w)}c.push(y.join("#"))}return n.vod_play_from=o.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],l=je(e.ajaxtxt),r=l(l("ul")).find("li");for(let i of r){let s=new Ne;s.vod_pic=l(i).find("img")[0].attribs["data-original"],s.vod_name=we(/《(.*?)》/,l(i).find("img")[0].attribs.alt),s.vod_id=l(i).find("a")[0].attribs.href,s.vod_remarks="\u8BC4\u5206:"+l(l(i).find('[class="rate badge"]')).text(),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e(e('[id="list_all"]').find("ul")).find("li");for(let r of l){let i=new Ne;i.vod_id=e(r).find("a")[0].attribs.href,i.vod_name=we(/《(.*?)》/,e(e(e(r).find('[class="text_info"]')).find("a")[0]).text()),i.vod_pic=e(r).find("img")[0].attribs["data-original"],i.vod_remarks=e(e(r).find('[class="update_time"]')).text(),n.push(i)}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,l,r){let i=this.siteUrl+`/list/${e}-${n}.html`,s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setSearch(e,n){let l=this.siteUrl+"/search/",r={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},i=await this.post(l,r,this.getSearchHeader()),s=je(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}},Cn=new RS;var IS=class extends Ce{constructor(){super()}getName(){return Cn.getName()}getAppName(){return Cn.getAppName()}getJSName(){return Cn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Cn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Cn.initCookie(e.server.config.bilicookie),await Cn.spiderInit(e),Cn.cfgObj.code=0,Cn.catOpenStatus=!0,Cn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Cn.setClasses(),this.classes=Cn.classes}async setFilterObj(){await Cn.setFilterObj(),this.filterObj=Cn.filterObj}async setHomeVod(){await Cn.setHomeVod(),this.homeVodList=Cn.homeVodList}async setCategory(e,n,l,r){await Cn.setCategory(e,n,l,r),this.vodList=Cn.vodList}async setDetail(e){await Cn.setDetail(e),this.vodDetail=Cn.vodDetail}async setPlay(e,n,l){await Cn.setPlay(e,n,l),this.playUrl=Cn.playUrl,this.result=Cn.result}async setSearch(e,n,l){await Cn.setSearch(e,n,l),this.vodList=Cn.vodList,this.result=Cn.result}async setProxy(e,n){return await Cn.proxy(e,n)}},Oa=new IS;async function TW(t,e){return await Oa.init(t,e)}async function xW(t,e){return await Oa.home(t,e)}async function NAe(t,e){return await Oa.homeVod(t,e)}async function AW(t,e){return await Oa.category(t,e)}async function OW(t,e){return await Oa.detail(t,e)}async function NW(t,e){return await Oa.play(t,e)}async function CW(t,e){return await Oa.search(t,e)}async function CAe(t,e){return await Oa.proxy(t,e)}var RW={meta:{key:Cn.getJSName(),name:Cn.getName(),type:Cn.getType()},api:async t=>{t.post("/init",TW),t.post("/home",xW),t.post("/category",AW),t.post("/detail",OW),t.post("/play",NW),t.post("/search",CW),t.get("/proxy/:what/:ids/:end",CAe)},spider:{init:TW,home:xW,homeVod:NAe,category:AW,detail:OW,play:NW,search:CW}};var kS=class extends De{constructor(){super(),this.siteUrl="https://frodo.douban.com/api/v2",this.apiKey="0ac44ae016490db2204ce0a042db2916",this.UserAgents=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"]}getHeader(){return{Host:"frodo.douban.com",Connection:"Keep-Alive",Referer:
Line truncated
|
||||
`," ").replaceAll(" \u6536\u8D77","");let o=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],m=[];for(let d=0;d<o.length;d++){let _=o[d].attribs["data-dropdown-value"];if(_.indexOf("\u5938\u514B")===-1){f.push(_);let S=[];for(let w of e(c[d]).find("a")){let E=e(w).text(),g=w.attribs.href;S.push(E+"$"+g)}m.push(S.join("#"))}}return l.vod_play_from=f.join("$$$"),l.vod_play_url=m.join("$$$"),l}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=[3,11,1,2];r.\u5168\u90E8\u5267\u60C5!==void 0&&r.\u5168\u90E8\u5267\u60C5!=="0"&&(i[s[0]]=r.\u5168\u90E8\u5267\u60C5),r.\u5168\u90E8\u65F6\u95F4!==void 0&&r.\u5168\u90E8\u65F6\u95F4!=="0"&&(i[s[1]]=r.\u5168\u90E8\u65F6\u95F4),r.\u5168\u90E8\u5730\u533A!==void 0&&r.\u5168\u90E8\u5730\u533A!=="0"&&(i[s[2]]=r.\u5168\u90E8\u5730\u533A),r.\u65F6\u95F4\u6392\u5E8F!==void 0&&r.\u65F6\u95F4\u6392\u5E8F!=="0"&&(i[s[3]]=r.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(u)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let l=He.enc.Utf8.parse("2890"+n+"tB959C"),r=He.enc.Utf8.parse("2F131BE91247866E"),i=He.AES.decrypt(e,l,{iv:r,mode:He.mode.CBC,padding:He.pad.Pkcs7});return He.enc.Utf8.stringify(i)}async setPlay(e,n,l){let i=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(i.indexOf("http")>-1)this.playUrl=i;else{let s="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+i,u=(await this.getHtml(s)).html(),o=JSON.parse(we(/let ConFig = (.*?),box = /,u));this.playUrl=this.uic(o.url,o.config.uid)}}async setSearch(e,n){let l=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,r=await this.fetch(l,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(r))}},In=new PS;var LS=class extends Ce{constructor(){super()}getName(){return In.getName()}getAppName(){return In.getAppName()}getJSName(){return In.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await In.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await In.initCookie(e.server.config.bilicookie),await In.spiderInit(e),In.cfgObj.code=0,In.catOpenStatus=!0,In.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await In.setClasses(),this.classes=In.classes}async setFilterObj(){await In.setFilterObj(),this.filterObj=In.filterObj}async setHomeVod(){await In.setHomeVod(),this.homeVodList=In.homeVodList}async setCategory(e,n,l,r){await In.setCategory(e,n,l,r),this.vodList=In.vodList}async setDetail(e){await In.setDetail(e),this.vodDetail=In.vodDetail}async setPlay(e,n,l){await In.setPlay(e,n,l),this.playUrl=In.playUrl,this.result=In.result}async setSearch(e,n,l){await In.setSearch(e,n,l),this.vodList=In.vodList,this.result=In.result}async setProxy(e,n){return await In.proxy(e,n)}},Ca=new LS;async function UW(t,e){return await Ca.init(t,e)}async function MW(t,e){return await Ca.home(t,e)}async function kAe(t,e){return await Ca.homeVod(t,e)}async function $W(t,e){return await Ca.category(t,e)}async function BW(t,e){return await Ca.detail(t,e)}async function HW(t,e){return await Ca.play(t,e)}async function VW(t,e){return await Ca.search(t,e)}async function DAe(t,e){return await Ca.proxy(t,e)}var qW={meta:{key:In.getJSName(),name:In.getName(),type:In.getType()},api:async t=>{t.post("/init",UW),t.post("/home",MW),t.post("/category",$W),t.post("/detail",BW),t.post("/play",HW),t.post("/search",VW),t.get("/proxy/:what/:ids/:end",DAe)},spider:{init:UW,home:MW,homeVod:kAe,category:$W,detail:BW,play:HW,search:VW}};function PAe(t){return t.replace(/<\/?[^>]+(>|$)/g,"").replace(/&.{1,5};/g,"").replace(/\s{2,}/g," ")}function LAe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}var FS=class extends De{constructor(){super(),this.siteUrl="http://ys.changmengyun.com"}getName(){return"\u{1F383}\u2503\u5357\u74DC\u5F71\u89C6\u2503\u{1F383}"}getAppName(){return"\u5357\u74DC\u5F71\u89C6"}getJSName(){return"nangua"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}getHeader(){let e=new Date().getTime().toString();return{version_name:"1.0.6",version_code:"6",package_name:"com.app.nanguatv",sign:He.MD5("c431ea542cee9679#uBFszdEM0oL0JRn@"+e).toString().toLowerCase(),imei:"c431ea542cee9679",timeMillis:e,"User-Agent":"okhttp/4.6.0"}}async setClasses(){let e=JSON.parse(await this.fetch(this.siteUrl+"/api.php/provide/home_nav",null,this.getHeader()));for(let n in e)e[n].name!=="\u7CBE\u9009"&&this.classes.push({type_id:e[n].id,type_name:e[n].name})}async set
Line truncated
|
||||
`),r=[];for(let m of l)B.isEmpty(m.replaceAll(" ","").replaceAll("/",""))||r.push(m.replaceAll(" ","").replaceAll("/",""));n.type_name=r.slice(0,2).join("*");let i=e('[class="video-info-items"]');n.vod_director=e(i[0]).find("a")[0].children[0].data;let s=e(i[1]).find("a"),a=[];for(let m of s)a.push(m.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=r[2],n.vod_remarks=e(e(i[3]).find(".video-info-item")).text(),n.vod_content=e(e(i[5]).find(".video-info-item")).text(),n.vod_area=r[3],n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","").replaceAll(" ","").replaceAll(`
|
||||
`,"");let u=e(e('[class="module-tab-content"]')[0]).find("span"),o=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let m of u)c.push(e(m).text());let f=[];for(let m of o){let d=e(e(m).find('[class="sort-item"]')).find("a"),y=[];for(let _ of d){let S=e(_).text(),w=_.attribs.href,E=S+"$"+w;y.push(E)}f.push(y.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=B.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),l=[];for(let r of n){let i=new Ne;i.vod_id=e(r).find(".video-serial")[0].attribs.href,i.vod_name=e(r).find(".video-serial")[0].attribs.title,i.vod_pic=e(r).find(".module-item-pic > img")[0].attribs["data-src"],i.vod_remarks="",l.push(i)}return l}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n(n('[class="nav-menu-items"]')[0]).find("li");for(let r of l.slice(0,6)){let i=n(n(r).find("span")).text();if(i!=="\u9996\u9875"){let a={type_id:n(r).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:i};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))e(e(n[r]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?i.value.push({n:e(s).text(),v:s.attribs.href.split("/").slice(-1)[0].split(".")[0]}):i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/vodshow/id/${n}.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=Ue(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,l=""){return e!==void 0&&e!=="0"?l+e:n}async getCateUrl(e,n,l){e=this.getExtend(l[1],e);let r=this.getExtend(l[2],"","/area/"),i=this.getExtend(l[3],"","/lang/"),s=this.getExtend(l[4],"","/year/"),a=this.getExtend(l[5],"","/letter/"),u=this.getExtend(l[6],"","/by/");return this.siteUrl+`/vodshow${u}${r}/id/${e}${i}${a}${s}/page/${n}.html`}async setCategory(e,n,l,r){let i=await this.getCateUrl(e,n,r),s=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(s)){let a=Ue(s);this.vodList=await this.parseVodShortListFromDoc(a);let u=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,s);this.limit=72,u.length>0&&(this.total=parseInt(u)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!B.isEmpty(r)){let i=we(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,r),s=JSON.parse(i);this.playUrl=s.url}}async setSearch(e,n){let l=this.siteUrl+`/vodsearch/wd/${e}.html`,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Ln=new $S;var BS=class extends Ce{constructor(){super()}getName(){return Ln.getName()}getAppName(){return Ln.getAppName()}getJSName(){return Ln.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Ln.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Ln.initCookie(e.server.config.bilicookie),await Ln.spiderInit(e),Ln.cfgObj.code=0,Ln.catOpenStatus=!0,Ln.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Ln.setClasses(),this.classes=Ln.classes}async setFilterObj(){await Ln.setFilterObj(),this.filterObj=Ln.filterObj}async setHomeVod(){await Ln.setHomeVod(),this.homeVodList=Ln.homeVodList}async setCategory(e,n,l,r){await Ln.setCategory(e,n,l,r),this.vodList=Ln.vodList}async setDetail(e){await Ln.setDetail(e),this.vodDetail=Ln.vodDetail}async setPlay(e,n,l){await Ln.setPlay(e,n,l),this.playUrl=Ln.playUrl,this.result=Ln.result}async setSearch(e,n,l){await Ln.setSearch(e,n,l),this.vodList=Ln.vodList,this.result=Ln.result}async setProxy(e,n){return await Ln.proxy(e,n)}},Ia=new BS;async function uY(t,e){return await Ia.init(t,e)}async function oY(t,e){return await Ia.home(t,e)}async function IAe(t,e){return await Ia.homeVod(t,e)}async function cY(t,e){return await Ia.category(t,e)}async function pY(t,e){return await Ia.detail(t,e)}async function fY(t,e){return await Ia.play(t,e)}
Line truncated
|
||||
`,""),B.isEmpty(l.vod_pic)&&(l.vod_pic=Zs+"/resources/dygang.jpg"),l}async parseVodShortListFromDoc(e){let n=[],l=e('[class="index-tj-l"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="index-area clearfix"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new Me,l=e('[ class="ct mb clearfix"]');n.vod_pic=e(l).find("img")[0].attribs.src,n.vod_name=we(/◎片 名 (.*?)<br>/,e(l).html()),n.vod_area=we(/◎产 地 (.*?)<br>/,e(l).html()),n.vod_year=we(/◎年 代 (.*?)<br>/,e(l).html()),n.type_name=we(/◎类 别 (.*?)<br>/,e(l).html()),n.vod_remarks=we(/◎集 数 (.*?)<br>/,e(l).html());let r=we(/◎主 演 (.*?)<\/p>/s,e(l).html());B.isEmpty(r)&&(r=we(/◎演 员 (.*?)<\/p>/s,e(l).html()));let i=[];for(let f of r.split(`
|
||||
`,"");let u=e(e('[class="module-tab-content"]')[0]).find("span"),o=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let m of u)c.push(e(m).text());let f=[];for(let m of o){let d=e(e(m).find('[class="sort-item"]')).find("a"),y=[];for(let _ of d){let S=e(_).text(),w=_.attribs.href,E=S+"$"+w;y.push(E)}f.push(y.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=B.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),l=[];for(let r of n){let i=new Ne;i.vod_id=e(r).find(".video-serial")[0].attribs.href,i.vod_name=e(r).find(".video-serial")[0].attribs.title,i.vod_pic=e(r).find(".module-item-pic > img")[0].attribs["data-src"],i.vod_remarks="",l.push(i)}return l}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=je(e),l=n(n('[class="nav-menu-items"]')[0]).find("li");for(let r of l.slice(0,6)){let i=n(n(r).find("span")).text();if(i!=="\u9996\u9875"){let a={type_id:n(r).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:i};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))e(e(n[r]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?i.value.push({n:e(s).text(),v:s.attribs.href.split("/").slice(-1)[0].split(".")[0]}):i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/vodshow/id/${n}.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=je(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=je(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,l=""){return e!==void 0&&e!=="0"?l+e:n}async getCateUrl(e,n,l){e=this.getExtend(l[1],e);let r=this.getExtend(l[2],"","/area/"),i=this.getExtend(l[3],"","/lang/"),s=this.getExtend(l[4],"","/year/"),a=this.getExtend(l[5],"","/letter/"),u=this.getExtend(l[6],"","/by/");return this.siteUrl+`/vodshow${u}${r}/id/${e}${i}${a}${s}/page/${n}.html`}async setCategory(e,n,l,r){let i=await this.getCateUrl(e,n,r),s=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(s)){let a=je(s);this.vodList=await this.parseVodShortListFromDoc(a);let u=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,s);this.limit=72,u.length>0&&(this.total=parseInt(u)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=je(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!B.isEmpty(r)){let i=we(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,r),s=JSON.parse(i);this.playUrl=s.url}}async setSearch(e,n){let l=this.siteUrl+`/vodsearch/wd/${e}.html`,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=je(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Ln=new HS;var VS=class extends Ce{constructor(){super()}getName(){return Ln.getName()}getAppName(){return Ln.getAppName()}getJSName(){return Ln.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Ln.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Ln.initCookie(e.server.config.bilicookie),await Ln.spiderInit(e),Ln.cfgObj.code=0,Ln.catOpenStatus=!0,Ln.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Ln.setClasses(),this.classes=Ln.classes}async setFilterObj(){await Ln.setFilterObj(),this.filterObj=Ln.filterObj}async setHomeVod(){await Ln.setHomeVod(),this.homeVodList=Ln.homeVodList}async setCategory(e,n,l,r){await Ln.setCategory(e,n,l,r),this.vodList=Ln.vodList}async setDetail(e){await Ln.setDetail(e),this.vodDetail=Ln.vodDetail}async setPlay(e,n,l){await Ln.setPlay(e,n,l),this.playUrl=Ln.playUrl,this.result=Ln.result}async setSearch(e,n,l){await Ln.setSearch(e,n,l),this.vodList=Ln.vodList,this.result=Ln.result}async setProxy(e,n){return await Ln.proxy(e,n)}},Da=new VS;async function fY(t,e){return await Da.init(t,e)}async function dY(t,e){return await Da.home(t,e)}async function HAe(t,e){return await Da.homeVod(t,e)}async function hY(t,e){return await Da.category(t,e)}async function mY(t,e){return await Da.detail(t,e)}async function yY(t,e){return await Da.play(t,e)}
Line truncated
|
||||
`,""),B.isEmpty(l.vod_pic)&&(l.vod_pic=ta+"/resources/dygang.jpg"),l}async parseVodShortListFromDoc(e){let n=[],l=e('[class="index-tj-l"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="index-area clearfix"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new Me,l=e('[ class="ct mb clearfix"]');n.vod_pic=e(l).find("img")[0].attribs.src,n.vod_name=we(/◎片 名 (.*?)<br>/,e(l).html()),n.vod_area=we(/◎产 地 (.*?)<br>/,e(l).html()),n.vod_year=we(/◎年 代 (.*?)<br>/,e(l).html()),n.type_name=we(/◎类 别 (.*?)<br>/,e(l).html()),n.vod_remarks=we(/◎集 数 (.*?)<br>/,e(l).html());let r=we(/◎主 演 (.*?)<\/p>/s,e(l).html());B.isEmpty(r)&&(r=we(/◎演 员 (.*?)<\/p>/s,e(l).html()));let i=[];for(let f of r.split(`
|
||||
`))i.push(f.replaceAll("\u3000\u3000\u3000\u3000 \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=i.join("/"),n.vod_director=we(/◎导 演 (.*?)<br>/,e(l).html()),n.vod_content=we(/◎简 介<\/p>(.*?)<br>/s,e(l).html()).replaceAll("<p>","").replaceAll(`
|
||||
`,""),B.isEmpty(n.vod_content)&&(n.vod_content=we(/◎简 介<br>(.*?)<\/p>/s,e(l).html()).replaceAll("<p>","").replaceAll(`
|
||||
`,""));let s=[],a=[],u=e('[class="playfrom tab8 clearfix"]'),o=e('[class="videourl clearfix"]');for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(o[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(l).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(we(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(l).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.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,l,r){let i=this.siteUrl+e;r.\u6309\u7C7B\u578B!==void 0&&r.\u6309\u7C7B\u578B!=="0"&&(i=i+`${r.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(i=i+`index_${n}.html`);let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},i=await this.post(l,r,this.getHeader()),s=Ue(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,l){if(n.indexOf("http")>-1){let r=await this.getHtml(n),i=we(/url: '(.*?)',/,r.html());if(B.isEmpty(i)){let s=r(r('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":Gl});if(this.playUrl=we(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let u=eq(s);this.playUrl=u+we(/var main = "(.*?)";/,a)}}else this.playUrl=i}else this.playUrl=n}},Un=new JS;var KS=class extends Ce{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,l,r){await Un.setCategory(e,n,l,r),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,l){await Un.setPlay(e,n,l),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,l){await Un.setSearch(e,n,l),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},ja=new KS;async function RY(t,e){return await ja.init(t,e)}async function IY(t,e){return await ja.home(t,e)}async function $Ae(t,e){return await ja.homeVod(t,e)}async function kY(t,e){return await ja.category(t,e)}async function DY(t,e){return await ja.detail(t,e)}async function PY(t,e){return await ja.play(t,e)}async function LY(t,e){return await ja.search(t,e)}async function BAe(t,e){return await ja.proxy(t,e)}var FY={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",RY),t.post("/home",IY),t.post("/category",kY),t.post("/detail",DY),t.post("/play",PY),t.post("/search",LY),t.get("/proxy/:what/:ids/:end",BAe)},spider:{init:RY,home:IY,homeVod:$Ae,category:kY,detail:DY,play:PY,search:LY}};var XS=class extends Pe{constructor(){super(),this.siteUrl="https://www.wogg.xyz",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await z2(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),l=[];for(let r of n){let i=new Ne,s=e(r).find(".module-item-cover .module-item-pic a").first();i.vod_id=s.attr("href"),i.vod_name=s.attr("title"),i.vod_pic=e(r).find(".module-item-cover .module-item-pic img").first().attr("data-src"),i.vod_pic.indexOf("img.php?url=")>0&&(i.vod_pic=i.vod_pic.split("img.php?url=")[1]),i.vod_remarks=e(r).find(".module-item-text").first().text(),l.push(i)}return l}async parseVodDetailFromDoc(e){let n=new Me;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let l=e(".video-info-items");n.vod_director=e(l[0]).find("a")[0].children[0].data;let r=e(l[1])
Line truncated
|
||||
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:i,type_name:s};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=Ue(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let o of Object.keys(s))r[o]==="0"?i[s[o]]="":i[s[o]]=r[o];let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(u)){let o=Ue(u);this.vodList=await this.parseVodShortListFromDoc(o);let c=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,u);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,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Mn=new XS;var WS=class extends Ce{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,l,r){await Mn.setCategory(e,n,l,r),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,l){await Mn.setPlay(e,n,l),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n,l){await Mn.setSearch(e,n,l),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},Ua=new WS;async function jY(t,e){return await Ua.init(t,e)}async function UY(t,e){return await Ua.home(t,e)}async function HAe(t,e){return await Ua.homeVod(t,e)}async function MY(t,e){return await Ua.category(t,e)}async function $Y(t,e){return await Ua.detail(t,e)}async function BY(t,e){return await Ua.play(t,e)}async function HY(t,e){return await Ua.search(t,e)}async function VAe(t,e){return await Ua.proxy(t,e)}var VY={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",jY),t.post("/home",UY),t.post("/category",MY),t.post("/detail",$Y),t.post("/play",BY),t.post("/search",HY),t.get("/proxy/:what/:ids/:end",VAe)},spider:{init:jY,home:UY,homeVod:HAe,category:MY,detail:$Y,play:BY,search:HY}};var YS=class extends Pe{constructor(){super(),this.siteUrl="https://www.pansearch.me/"}getName(){return"\u{1F5C2}\uFE0F\u2503\u963F\u91CC\u76D8\u641C\u2503\u{1F5C2}\uFE0F"}getAppName(){return"\u963F\u91CC\u76D8\u641C"}getJSName(){return"pan_search"}getType(){return 3}getSearchHeader(){let e=this.getHeader();return e["x-nextjs-data"]="1",e}async init(e){await super.init(e),await z2(this.cfgObj.token)}async parseVodDetailfromJson(e){let n=JSON.parse(e),l=new Me,r=n.content.split(`
|
||||
`);l.vod_name=r[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let i=new Date(n.time);l.vod_remarks=i.toLocaleDateString().replace(/\//g,"-")+" "+i.toTimeString().substr(0,8),l.vod_pic=n.image;let s="";for(let a of r)a.indexOf("\u63CF\u8FF0")>-1&&(l.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(l.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await x3([s]);l.vod_play_url=a.vod_play_url,l.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 l}async parseVodShortListFromDocBySearch(e,n){let l=[],r=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,i=this.siteUrl+"_next/data/"+r+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(i,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let u of a){let o=new Ne;o.vod_id=JSON.stringify(u);let c=u.content.split(`
|
||||
`);o.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(u.time);o.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),o.vod_pic=u.image,l.push(o)}return l}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let l=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodList=await this.parseVodShortListFromDocBySearch(r,e)}}async play(e,n,l){return await A3(e,n,l)}},$n=new YS;var QS=class extends Ce{constructor(){super()}getName(){return $n.getName()}getAppName(){return $n.getAppName()}getJSName(){return $n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await $n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await $n.initCookie(e.server.config.bilicookie),await $n.spiderInit(e),$n.cfgObj.code=0,$n.catOpenStatus=!0,$n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await $n.setClasses(),this.classes=$n.classes}async setFilterObj(){await $n.setFilterObj(),this.filterObj=$n.filterObj}async setHomeVod(){await $n.setHomeVod(),this.homeVodList=$n.homeVodList}async setCategory(e,n,l,r){await $n.setCategory(e,n,l,r),this.vodList=$n.vodList}async setDetail(e){await $n.setDetail(e),this.vodDetail=$n.vodDetail}async setPlay(e,n,l){await $n.setPlay(e,n,l),this.playUrl=$n.playUrl,this.result=$n.result}async setSearch(e,n,l){await $n.setSearch(e,n,l),this.vodList=$n.vodList,this.result=$n.result}async setProxy(e,n){return await $n.proxy(e,n)}},Ma=new QS;async function qY(t,e){return await Ma.init(t,e)}async function zY(t,e){return await Ma.home(t,e)}async function qAe(t,e){return await Ma.homeVod(t,e)}async function GY(t,e){return await Ma.category(t,e)}async function JY(t,e){return await Ma.detail(t,e)}async function KY(t,e){return await Ma.play(t,e)}async function XY(t,e){return await Ma.search(t,e)}async function zAe(t,e){return await Ma.proxy(t,e)}var WY={meta:{key:$n.getJSName(),name:$n.getName(),type:$n.getType()},api:async t=>{t.post("/init",qY),t.post("/home",zY),t.post("/category",GY),t.post("/detail",JY),t.post("/play",KY),t.post("/search",XY),t.get("/proxy/:what/:ids/:end",zAe)},spider:{init:qY,home:zY,homeVod:qAe,category:GY,detail:JY,play:KY,search:XY}};var GAe=["4k","4K"],ZS=class extends Pe{constructor(){super(),this.siteUrl="https://www.alypw.com"}async init(e){await super.init(e),await z2(this.cfgObj.token)}getName(){return"\u{1F94F}\u200D\u2503\u963F\u91CC\u4E91\u76D8\u5206\u4EAB\u2503\u{1F94F}\u200D"}getAppName(){return"\u963F\u91CC\u4E91\u76D8\u5206\u4EAB"}getJSName(){return"aliyunpanshare"}getType(){return 3}getRemarks(e,n){if(B.isEmpty(e)){for(let l of GAe)if(n.indexOf(l)>-1)return l}else return e}parseVodName(e){let n=we(/\[阿里云盘](.*?) /,e);return e.indexOf("\u5408\u96C6")>-1||(B.isEmpty(n)&&(n=we(/\[阿里云盘](.*?)(/,e)),n.indexOf("[")>-1&&(n=n.split("[")[0]),n.indexOf("\u3010")>-1&&(n=n.split("\u3010")[0]),n==="4K")?"":n}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="hometab"]').find('[class="box"]')).find("li");for(let r of l){let i=e(r).find('[class="imgr"]')[0],s=new Ne;s.vod_id=e(i).find("a")[0].attribs.href;let a=e(i).find("a")[0].attribs.title;s.vod_name=this.parseVodName(a),s.vod_pic=e(r).find("img")[0].attribs.src,s.vod_remarks=this.getRemarks(we(/【(.*?)】/,a),a),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="main container"]'),r=e(e(l).find('[class="list"]')).find("li");r.length===0&&(r=e(l).find("li"));for(let i of r){let s=e(i).find("img")[0].attribs.alt.replaceAll("<strong>","").replaceAll("</strong>",""),a=new Ne;a.vod_id=e(i).find("a")[0].attribs.href,a.vod_name=this.parseVodName(s),a.vod_pic=e(i).find("img")[0].attribs.src,a.vod_remarks=this.getRemarks(we(/【(.*?)】/,s),s),B.isEmpty(a.vod_name)||n.push(a)}return n}async parseVodDetailFromDoc(e){let n=e('[class="mainl"]'),l=e(e(n).find('[class="title"]')[0]).text(),r=new Me;r.vod_name=we(/\[阿里云盘](.*?) /,l),r.vod_remarks=this.getRemarks(we(/【(.*?)】/,l),l);let i=e(n).find('[class="article_content"]');r.vod_pic=e(i).find("p>img")[0].attribs.src;let s=e(i).find("p"),a="";for(let f of s)a=a+e(f).text()+`
|
||||
`;let u=[],o=we(so,a).split(`
|
||||
`);for(let f of o){let m=f.match(so);B.isEmpty(m)||u.push(m[1])}let c=await x3(u);return r.vod_play_url=c.vod_play_url,r.vod_play_from=c.vod_play_from,r.type_name=we(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),r.vod_content=we(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),r}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),l=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let r of n){let i=e(r).text(),s=r.attribs.href,a=!1;for(let u of l)i.indexOf(u)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(i,s))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=e.split(".html")[0]+"_"+n+".html",s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+`/search.php?q=${e}`,r=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(r)}},Bn=new ZS;var eT=class extends Ce{constructor(){super()}getName(){return Bn.getName()}getAppName(){return Bn.getAppName()}getJSName(){return Bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Bn.initCookie(e.server.config.bilicookie),await Bn.spiderInit(e),Bn.cfgObj.code=0,Bn.catOpenStatus=!0,Bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Bn.setClasses(),this.classes=Bn.classes}async setFilterObj(){await Bn.setFilterObj(),this.filterObj=Bn.filterObj}async setHomeVod(){await Bn.setHomeVod(),this.homeVodList=Bn.homeVodList}async setCategory(e,n,l,r){await Bn.setCategory(e,n,l,r),this.vodList=Bn.vodList}async setDetail(e){await Bn.setDetail(e),this.vodDetail=Bn.vodDetail}async setPlay(e,n,l){await Bn.setPlay(e,n,l),this.playUrl=Bn.playUrl,this.result=Bn.result}async setSearch(e,n,l){await Bn.setSearch(e,n,l),this.vodList=Bn.vodList,this.result=Bn.result}async setProxy(e,n){return await Bn.proxy(e,n)}},$a=new eT;async function YY(t,e){return await $a.init(t,e)}async function QY(t,e){return await $a.home(t,e)}async function JAe(t,e){return await $a.homeVod(t,e)}async function ZY(t,e){return await $a.category(t,e)}async function eQ(t,e){return await $a.detail(t,e)}async function tQ(t,e){return await $a.play(t,e)}async function nQ(t,e){return await $a.search(t,e)}async function KAe(t,e){return await $a.proxy(t,e)}var lQ={meta:{key:Bn.getJSName(),name:Bn.getName(),type:Bn.getType()},api:async t=>{t.post("/init",YY),t.post("/home",QY),t.post("/category",ZY),t.post("/detail",eQ),t.post("/play",tQ),t.post("/search",nQ),t.get("/proxy/:what/:ids/:end",KAe)},spider:{init:YY,home:QY,homeVod:JAe,category:ZY,detail:eQ,play:tQ,search:nQ}};var rQ=[19970,19972,19973,19974,19983,19986,19991,19999,2e4,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,null,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,null,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,205
Line truncated
|
||||
`,""));let s=[],a=[],u=e('[class="playfrom tab8 clearfix"]'),o=e('[class="videourl clearfix"]');for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(o[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(l).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(we(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(l).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.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,l,r){let i=this.siteUrl+e;r.\u6309\u7C7B\u578B!==void 0&&r.\u6309\u7C7B\u578B!=="0"&&(i=i+`${r.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(i=i+`index_${n}.html`);let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},i=await this.post(l,r,this.getHeader()),s=je(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,l){if(n.indexOf("http")>-1){let r=await this.getHtml(n),i=we(/url: '(.*?)',/,r.html());if(B.isEmpty(i)){let s=r(r('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":Kl});if(this.playUrl=we(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let u=rq(s);this.playUrl=u+we(/var main = "(.*?)";/,a)}}else this.playUrl=i}else this.playUrl=n}},Un=new XS;var WS=class extends Ce{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,l,r){await Un.setCategory(e,n,l,r),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,l){await Un.setPlay(e,n,l),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,l){await Un.setSearch(e,n,l),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},Ma=new WS;async function PY(t,e){return await Ma.init(t,e)}async function LY(t,e){return await Ma.home(t,e)}async function YAe(t,e){return await Ma.homeVod(t,e)}async function FY(t,e){return await Ma.category(t,e)}async function jY(t,e){return await Ma.detail(t,e)}async function UY(t,e){return await Ma.play(t,e)}async function MY(t,e){return await Ma.search(t,e)}async function QAe(t,e){return await Ma.proxy(t,e)}var $Y={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",PY),t.post("/home",LY),t.post("/category",FY),t.post("/detail",jY),t.post("/play",UY),t.post("/search",MY),t.get("/proxy/:what/:ids/:end",QAe)},spider:{init:PY,home:LY,homeVod:YAe,category:FY,detail:jY,play:UY,search:MY}};var YS=class extends De{constructor(){super(),this.siteUrl="https://www.wogg.xyz",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await G2(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),l=[];for(let r of n){let i=new Ne,s=e(r).find(".module-item-cover .module-item-pic a").first();i.vod_id=s.attr("href"),i.vod_name=s.attr("title"),i.vod_pic=e(r).find(".module-item-cover .module-item-pic img").first().attr("data-src"),i.vod_pic.indexOf("img.php?url=")>0&&(i.vod_pic=i.vod_pic.split("img.php?url=")[1]),i.vod_remarks=e(r).find(".module-item-text").first().text(),l.push(i)}return l}async parseVodDetailFromDoc(e){let n=new Me;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let l=e(".video-info-items");n.vod_director=e(l[0]).find("a")[0].children[0].data;let r=e(l[1])
Line truncated
|
||||
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:i,type_name:s};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=je(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=je(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let o of Object.keys(s))r[o]==="0"?i[s[o]]="":i[s[o]]=r[o];let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(u)){let o=je(u);this.vodList=await this.parseVodShortListFromDoc(o);let c=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,u);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,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=je(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await O3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=je(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Mn=new YS;var QS=class extends Ce{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,l,r){await Mn.setCategory(e,n,l,r),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,l){await Mn.setPlay(e,n,l),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n,l){await Mn.setSearch(e,n,l),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},$a=new QS;async function BY(t,e){return await $a.init(t,e)}async function HY(t,e){return await $a.home(t,e)}async function ZAe(t,e){return await $a.homeVod(t,e)}async function VY(t,e){return await $a.category(t,e)}async function qY(t,e){return await $a.detail(t,e)}async function zY(t,e){return await $a.play(t,e)}async function GY(t,e){return await $a.search(t,e)}async function eOe(t,e){return await $a.proxy(t,e)}var JY={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",BY),t.post("/home",HY),t.post("/category",VY),t.post("/detail",qY),t.post("/play",zY),t.post("/search",GY),t.get("/proxy/:what/:ids/:end",eOe)},spider:{init:BY,home:HY,homeVod:ZAe,category:VY,detail:qY,play:zY,search:GY}};var ZS=class extends De{constructor(){super(),this.siteUrl="https://www.pansearch.me/"}getName(){return"\u{1F5C2}\uFE0F\u2503\u963F\u91CC\u76D8\u641C\u2503\u{1F5C2}\uFE0F"}getAppName(){return"\u963F\u91CC\u76D8\u641C"}getJSName(){return"pan_search"}getType(){return 3}getSearchHeader(){let e=this.getHeader();return e["x-nextjs-data"]="1",e}async init(e){await super.init(e),await G2(this.cfgObj.token)}async parseVodDetailfromJson(e){let n=JSON.parse(e),l=new Me,r=n.content.split(`
|
||||
`);l.vod_name=r[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let i=new Date(n.time);l.vod_remarks=i.toLocaleDateString().replace(/\//g,"-")+" "+i.toTimeString().substr(0,8),l.vod_pic=n.image;let s="";for(let a of r)a.indexOf("\u63CF\u8FF0")>-1&&(l.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(l.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await A3([s]);l.vod_play_url=a.vod_play_url,l.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 l}async parseVodShortListFromDocBySearch(e,n){let l=[],r=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,i=this.siteUrl+"_next/data/"+r+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(i,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let u of a){let o=new Ne;o.vod_id=JSON.stringify(u);let c=u.content.split(`
|
||||
`);o.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(u.time);o.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),o.vod_pic=u.image,l.push(o)}return l}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let l=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(l)){let r=je(l);this.vodList=await this.parseVodShortListFromDocBySearch(r,e)}}async play(e,n,l){return await O3(e,n,l)}},$n=new ZS;var eT=class extends Ce{constructor(){super()}getName(){return $n.getName()}getAppName(){return $n.getAppName()}getJSName(){return $n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await $n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await $n.initCookie(e.server.config.bilicookie),await $n.spiderInit(e),$n.cfgObj.code=0,$n.catOpenStatus=!0,$n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await $n.setClasses(),this.classes=$n.classes}async setFilterObj(){await $n.setFilterObj(),this.filterObj=$n.filterObj}async setHomeVod(){await $n.setHomeVod(),this.homeVodList=$n.homeVodList}async setCategory(e,n,l,r){await $n.setCategory(e,n,l,r),this.vodList=$n.vodList}async setDetail(e){await $n.setDetail(e),this.vodDetail=$n.vodDetail}async setPlay(e,n,l){await $n.setPlay(e,n,l),this.playUrl=$n.playUrl,this.result=$n.result}async setSearch(e,n,l){await $n.setSearch(e,n,l),this.vodList=$n.vodList,this.result=$n.result}async setProxy(e,n){return await $n.proxy(e,n)}},Ba=new eT;async function KY(t,e){return await Ba.init(t,e)}async function XY(t,e){return await Ba.home(t,e)}async function tOe(t,e){return await Ba.homeVod(t,e)}async function WY(t,e){return await Ba.category(t,e)}async function YY(t,e){return await Ba.detail(t,e)}async function QY(t,e){return await Ba.play(t,e)}async function ZY(t,e){return await Ba.search(t,e)}async function nOe(t,e){return await Ba.proxy(t,e)}var eQ={meta:{key:$n.getJSName(),name:$n.getName(),type:$n.getType()},api:async t=>{t.post("/init",KY),t.post("/home",XY),t.post("/category",WY),t.post("/detail",YY),t.post("/play",QY),t.post("/search",ZY),t.get("/proxy/:what/:ids/:end",nOe)},spider:{init:KY,home:XY,homeVod:tOe,category:WY,detail:YY,play:QY,search:ZY}};var lOe=["4k","4K"],tT=class extends De{constructor(){super(),this.siteUrl="https://www.alypw.com"}async init(e){await super.init(e),await G2(this.cfgObj.token)}getName(){return"\u{1F94F}\u200D\u2503\u963F\u91CC\u4E91\u76D8\u5206\u4EAB\u2503\u{1F94F}\u200D"}getAppName(){return"\u963F\u91CC\u4E91\u76D8\u5206\u4EAB"}getJSName(){return"aliyunpanshare"}getType(){return 3}getRemarks(e,n){if(B.isEmpty(e)){for(let l of lOe)if(n.indexOf(l)>-1)return l}else return e}parseVodName(e){let n=we(/\[阿里云盘](.*?) /,e);return e.indexOf("\u5408\u96C6")>-1||(B.isEmpty(n)&&(n=we(/\[阿里云盘](.*?)(/,e)),n.indexOf("[")>-1&&(n=n.split("[")[0]),n.indexOf("\u3010")>-1&&(n=n.split("\u3010")[0]),n==="4K")?"":n}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="hometab"]').find('[class="box"]')).find("li");for(let r of l){let i=e(r).find('[class="imgr"]')[0],s=new Ne;s.vod_id=e(i).find("a")[0].attribs.href;let a=e(i).find("a")[0].attribs.title;s.vod_name=this.parseVodName(a),s.vod_pic=e(r).find("img")[0].attribs.src,s.vod_remarks=this.getRemarks(we(/【(.*?)】/,a),a),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="main container"]'),r=e(e(l).find('[class="list"]')).find("li");r.length===0&&(r=e(l).find("li"));for(let i of r){let s=e(i).find("img")[0].attribs.alt.replaceAll("<strong>","").replaceAll("</strong>",""),a=new Ne;a.vod_id=e(i).find("a")[0].attribs.href,a.vod_name=this.parseVodName(s),a.vod_pic=e(i).find("img")[0].attribs.src,a.vod_remarks=this.getRemarks(we(/【(.*?)】/,s),s),B.isEmpty(a.vod_name)||n.push(a)}return n}async parseVodDetailFromDoc(e){let n=e('[class="mainl"]'),l=e(e(n).find('[class="title"]')[0]).text(),r=new Me;r.vod_name=we(/\[阿里云盘](.*?) /,l),r.vod_remarks=this.getRemarks(we(/【(.*?)】/,l),l);let i=e(n).find('[class="article_content"]');r.vod_pic=e(i).find("p>img")[0].attribs.src;let s=e(i).find("p"),a="";for(let f of s)a=a+e(f).text()+`
|
||||
`;let u=[],o=we(uo,a).split(`
|
||||
`);for(let f of o){let m=f.match(uo);B.isEmpty(m)||u.push(m[1])}let c=await A3(u);return r.vod_play_url=c.vod_play_url,r.vod_play_from=c.vod_play_from,r.type_name=we(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),r.vod_content=we(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),r}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),l=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let r of n){let i=e(r).text(),s=r.attribs.href,a=!1;for(let u of l)i.indexOf(u)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(i,s))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=e.split(".html")[0]+"_"+n+".html",s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,l){let r=await O3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+`/search.php?q=${e}`,r=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(r)}},Bn=new tT;var nT=class extends Ce{constructor(){super()}getName(){return Bn.getName()}getAppName(){return Bn.getAppName()}getJSName(){return Bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Bn.initCookie(e.server.config.bilicookie),await Bn.spiderInit(e),Bn.cfgObj.code=0,Bn.catOpenStatus=!0,Bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Bn.setClasses(),this.classes=Bn.classes}async setFilterObj(){await Bn.setFilterObj(),this.filterObj=Bn.filterObj}async setHomeVod(){await Bn.setHomeVod(),this.homeVodList=Bn.homeVodList}async setCategory(e,n,l,r){await Bn.setCategory(e,n,l,r),this.vodList=Bn.vodList}async setDetail(e){await Bn.setDetail(e),this.vodDetail=Bn.vodDetail}async setPlay(e,n,l){await Bn.setPlay(e,n,l),this.playUrl=Bn.playUrl,this.result=Bn.result}async setSearch(e,n,l){await Bn.setSearch(e,n,l),this.vodList=Bn.vodList,this.result=Bn.result}async setProxy(e,n){return await Bn.proxy(e,n)}},Ha=new nT;async function tQ(t,e){return await Ha.init(t,e)}async function nQ(t,e){return await Ha.home(t,e)}async function rOe(t,e){return await Ha.homeVod(t,e)}async function lQ(t,e){return await Ha.category(t,e)}async function rQ(t,e){return await Ha.detail(t,e)}async function iQ(t,e){return await Ha.play(t,e)}async function sQ(t,e){return await Ha.search(t,e)}async function iOe(t,e){return await Ha.proxy(t,e)}var aQ={meta:{key:Bn.getJSName(),name:Bn.getName(),type:Bn.getType()},api:async t=>{t.post("/init",tQ),t.post("/home",nQ),t.post("/category",lQ),t.post("/detail",rQ),t.post("/play",iQ),t.post("/search",sQ),t.get("/proxy/:what/:ids/:end",iOe)},spider:{init:tQ,home:nQ,homeVod:rOe,category:lQ,detail:rQ,play:iQ,search:sQ}};var uQ=[19970,19972,19973,19974,19983,19986,19991,19999,2e4,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,null,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,null,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,205
Line truncated
|
||||
`)),e.push(r)}return e}async parseVodShortListFromDocBySearch(t){let e=t('[class="show-list"]').find("li"),n=[];for(let l of e){let r=new Ne;r.vod_id=t(l).find("a")[0].attribs.href;let i=t(l).find("img")[0];r.vod_pic=i.attribs.src,r.vod_name=i.attribs.alt,r.vod_remarks=t(t(l).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),r.vod_remarks!=="\u793E\u5904\u7247"&&r.vod_remarks!=="\u793E\u4FDD\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u52A8\u6F2B"&&n.push(r)}return n}async parseVodDetailFromDoc(t){let e=new Me,n=t('[class="detail-pic fn-left"]').find("img")[0];e.vod_pic=n.attribs.src,e.vod_name=n.attribs.alt;let l=t('[class="info fn-clear"]');for(let o of t(l).find("dl")){let c=t(o).text();c.indexOf("\u4E3B\u6F14")>-1&&(e.vod_actor=c.replaceAll("\u4E3B\u6F14\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u72B6\u6001")>-1&&(e.vod_remarks=c.replaceAll("\u72B6\u6001\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u7C7B\u578B")>-1&&(e.type_name=c.replaceAll("\u7C7B\u578B\uFF1A","").replaceAll(`
|
||||
@@ -441,14 +441,22 @@ function print() { __p += __j.call(arguments, '') }
|
||||
`,"")),c.indexOf("\u5BFC\u6F14")>-1&&(e.vod_director=c.replaceAll("\u5BFC\u6F14\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=c.replaceAll("\u5E74\u4EFD\uFF1A","").replaceAll(`
|
||||
`,"")),c.indexOf("\u5267\u60C5")>-1&&(e.vod_content=c.replaceAll("\u5267\u60C5\uFF1A","").replaceAll(`
|
||||
`,""))}let r={},i=t.html(),s=t('[class="play-list"]'),a=1;for(let o of s){let c=`\u64AD\u653E\u8FDE\u63A5-${a}`,f=[];for(let m of t(o).find("a")){let d=m.attribs.title,y=m.attribs.href;f.push(d+"$"+y)}r[c]=f.join("#"),a=a+1}a=1;let u=t('[class="con4"]');for(let o of u){let c=`\u78C1\u529B\u94FE\u63A5-${a}`,f=[],m=c,d=t(t(o).find("div")).find("a")[0].attribs.href;d!=="javascript:void(0);"&&(f.push(m+"$"+d),r[c]=f.join("#"),a=a+1)}return e.vod_play_url=B.values(r).join("$$$"),e.vod_play_from=B.keys(r).join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}getExtend(t){if(t.class!==void 0&&t.class!=="\u5168\u90E8")return t.class}async setCategory(t,e,n,l){let r=this.getExtend(l)??t,i;r===t?i=this.siteUrl+r:parseInt(e)===1?i=this.siteUrl+r:i=this.siteUrl+r+`index${e}.html`;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setPlay(flag,id,flags){if(flag.indexOf("\u78C1\u529B")>-1)this.playUrl=id;else{let idSplitList=id.split("-"),flag_id=parseInt(idSplitList[1]),episode=parseInt(idSplitList[2].split(".")[0]),$=await this.getHtml(this.siteUrl+id),playJsUrl=we(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=we(/var VideoListJson=(.*?),urlinfo=/,playJsContent),playDic=eval(playUrlListStr);if(this.playUrl=playDic[flag_id][1][episode].split("$")[1],this.playUrl.indexOf("m3u8")===-1){let t=await this.fetch(this.playUrl,null,this.getHeader());this.playUrl=we(/url: '(.*?)'/,t)}}}GBKEncode(t){var e=33088;t+="";for(var n=[],l=63,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i<128)n.push(i);else{var s=rQ.indexOf(i);~s?(s+=e,n.push(255&s>>8,255&s)):n.push(l)}}return n}encode(t){let e="";for(let n of t){let l=this.GBKEncode(n);for(let r=0;r<l.length;r++)l[r]="%"+("0"+l[r].toString(16)).substr(-2).toUpperCase();e=e+l.join("")}return e}async setSearch(t,e){let n={searchword:this.encode(t)},l=await this.post(this.siteUrl+"/search.asp",n,this.getHeader(),"form",1),r=Ue(hb(l,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},qt=new tT;async function XAe(t){await qt.init(t)}async function WAe(t){return await qt.home(t)}async function YAe(){return await qt.homeVod()}async function QAe(t,e,n,l){return await qt.category(t,e,n,l)}async function ZAe(t){return await qt.detail(t)}async function eOe(t,e,n){return await qt.play(t,e,n)}async function tOe(t,e){return await qt.search(t,e)}function TVe(){return{init:XAe,home:WAe,homeVod:YAe,category:QAe,detail:ZAe,play:eOe,search:tOe}}var nT=class extends Ce{constructor(){super()}getName(){return qt.getName()}getAppName(){return qt.getAppName()}getJSName(){return qt.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await qt.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await qt.initCookie(e.server.config.bilicookie),await qt.spiderInit(e),qt.cfgObj.code=0,qt.catOpenStatus=!0,qt.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await qt.setClasses(),this.classes=qt.classes}async setFilterObj(){await qt.setFilterObj(),this.filterObj=qt.filterObj}async setHomeVod(){await qt.setHomeVod(),this.homeVodList=qt.homeVodList}async setCategory(e,n,l,r){await qt.setCategory(e,n,l,r),this.vodList=qt.vodList}async setDetail(e){await qt.setDetail(e),this.vodDetail=qt.vodDetail}async setPlay(e,n,l){await qt.setPlay(e,n,l),this.playUrl=qt.playUrl,this.result=qt.result}async setSearch(e,n,l){await qt.setSearch(e,n,l),this.vodList=qt.vodList,this.result=qt.result}async setProxy(e,n){return await qt.proxy(e,n)}},Ba=new nT;async function iQ(t,e){return await Ba.init(t,e)}async function sQ(t,e){return await Ba.home(t,e)}async function nOe(t,e){return await Ba.homeVod(t,e)}async function aQ(t,e){return await Ba.category(t,e)}async function uQ(t,e){return await Ba.detail(t,e)}async function oQ(t,e){return await Ba.play(t,e)}async function cQ(t,e){return await Ba.search(t,e)}async function lOe(t,e){return await Ba.proxy(t,e)}var pQ={meta:{key:qt.getJSName(),name:qt.getName(),type:qt.getType()},api:async t=>{t.post("/init",iQ),t.post("/home",sQ),t.post("/category",aQ),t.post("/detail",uQ),t.post("/play",oQ),t.post("/search",cQ),t.get("/proxy/:what/:ids/:end",lOe)},spider:{init:iQ,home:sQ,homeVod:nOe,category:aQ,detail:uQ,play:oQ,search:cQ}};var lT=class extends Pe{constructor(){super(),this.siteUrl="https://www.cilixiong.com",this.cateObj={"/movie/":"1","/drama/":"2"}}getAppName(){return"\u78C1\u529B\u718A"}getName(){return"\u{1F43B}\u2503\u78C1\u529B\u718A\u2503\u{1F43B}"}getJSName(){return"cilixiong"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e('[class="nav col-12 col-lg-auto me-
Line truncated
|
||||
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(o.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=we(/年份:(.*?)end/,o).replaceAll("/","")),o.indexOf("\u5907\u6CE8")>-1){let c=we(/备注:(.*?)end/,o);e.vod_remarks=we(/备注:\/(.*?)end/,o)}o.indexOf("\u6807\u7B7E")>-1&&(e.type_name=we(/标签:(.*?)end/,o)),o.indexOf("\u5267\u60C5")>-1&&(e.vod_content=we(/剧情:(.*?)end/,o))}let r=t('[class="module-tab-item tab-item"]'),i=t('[class="scroll-content"]'),s=[],a=[];for(let u=0;u<r.length;u++){let o=r[u];s.push(o.attribs["data-dropdown-value"]);let c=[];for(let f of t(i[u]).find("a")){let m=t(f).text(),d=f.attribs.href;c.push(m+"$"+d)}a.push(c.join("#"))}return e.vod_play_from=s.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,l){await this.jadeLog.debug(`extend:${JSON.stringify(l)}`);let r=this.getExtendValue(l,"1"),i=this.getExtendValue(l,"2"),s=this.getExtendValue(l,"3"),a=this.getExtendValue(l,"4"),u=[t.toString(),"",a,r,"",s,"","",e.toString(),"","",i],o=this.siteUrl+"/show/"+u.join("-")+".html",c=await this.getHtml(o);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`,l=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(l)}async setPlay(t,e,n){let l=await this.getHtml(this.siteUrl+e),i="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(we(/var player_aaaa=(.*?)<\/script>/,l.html())).url,s=await await this.fetch(i,null,this.getHeader()),a=s.match(/"url": getVideoInfo\("(.*?)"\),/)[1],u=s.match(/<script>var bt_token = "(.*?)"/)[1],o=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());o=o.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],o=this.decrypt_token_key(o),this.playUrl=await this.getVideoInfo(a,o,u)}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==","w5bDpsOCwqoA","YMKowphwwqc=","ahFuVsK9","w57DtEsbw7k=","w6LDo8Kq","UsKzE8KO","w6xlBFl9","WMOgIXbCiw==","DBhjw5fDhQ==","w6pUwoHCnsOs","ZF7CtsKiHg==","wos4w7wCwr0c","JlXCjlpyw5pMw6s=","TcO1N8K4wqE=","SMOzTcKYRw==","w4HDosOzwrUc","wqxdwqE2wrY=","A8OPGQjChw==","wpkxasOxBQ==","wpIZSA==","VsOnEEvChg==","bMOSZy93","c8OwZsKnRQ==","SsK/wpBHwoQ=","ccOsHVFf","w6ZKYMO8w6rDr8OrCHxdwqtdwrDDksOMccKZwobDpQPDgsOrAMKXF8OMPcOySsKuL8KLwq8vwr/DkjbDqsOCbRrCkcOTTFfDlsKkw7PChCM1wqTDisKawpHDt8KCQRY3w6DDgMKVw6M=","w7hYwq3ClsOa","Fic5wqLDiw==","KcKqHCVV","wqvDucKSwrs/","YcOfQcKPSQ==","wpjClmNRw7U=","wpHClSnCizg=","w4PDh8Kw","JsOYGwnCpw==","w5vDksK8w6sl","U8ORCHt+Rw==","woVxO8OSJQ==","b37Chw/Clw==","w6ViBXZlQg==","UwPCucKQCgU=","UMOeZgs=","MTLCtW7Dq2o=","wqAQwr/DqcOi","DiLDtsOOZsKEbsOrGm03EcKEwr/CplQ=","dzPDnRhP","wplgT8KBwow=","XUzCg8KF","K8KTCcKrCQ==","w6ZKJMOw","LxTCmn/DsA==","wooObcKBw6g=","w5djwofDoTQ=","VMOHeAts","Kw96
Line truncated
|
||||
`,""))}let r={},i=t.html(),s=t('[class="play-list"]'),a=1;for(let o of s){let c=`\u64AD\u653E\u8FDE\u63A5-${a}`,f=[];for(let m of t(o).find("a")){let d=m.attribs.title,y=m.attribs.href;f.push(d+"$"+y)}r[c]=f.join("#"),a=a+1}a=1;let u=t('[class="con4"]');for(let o of u){let c=`\u78C1\u529B\u94FE\u63A5-${a}`,f=[],m=c,d=t(t(o).find("div")).find("a")[0].attribs.href;d!=="javascript:void(0);"&&(f.push(m+"$"+d),r[c]=f.join("#"),a=a+1)}return e.vod_play_url=B.values(r).join("$$$"),e.vod_play_from=B.keys(r).join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}getExtend(t){if(t.class!==void 0&&t.class!=="\u5168\u90E8")return t.class}async setCategory(t,e,n,l){let r=this.getExtend(l)??t,i;r===t?i=this.siteUrl+r:parseInt(e)===1?i=this.siteUrl+r:i=this.siteUrl+r+`index${e}.html`;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setPlay(flag,id,flags){if(flag.indexOf("\u78C1\u529B")>-1)this.playUrl=id;else{let idSplitList=id.split("-"),flag_id=parseInt(idSplitList[1]),episode=parseInt(idSplitList[2].split(".")[0]),$=await this.getHtml(this.siteUrl+id),playJsUrl=we(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=we(/var VideoListJson=(.*?),urlinfo=/,playJsContent),playDic=eval(playUrlListStr);if(this.playUrl=playDic[flag_id][1][episode].split("$")[1],this.playUrl.indexOf("m3u8")===-1){let t=await this.fetch(this.playUrl,null,this.getHeader());this.playUrl=we(/url: '(.*?)'/,t)}}}GBKEncode(t){var e=33088;t+="";for(var n=[],l=63,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i<128)n.push(i);else{var s=uQ.indexOf(i);~s?(s+=e,n.push(255&s>>8,255&s)):n.push(l)}}return n}encode(t){let e="";for(let n of t){let l=this.GBKEncode(n);for(let r=0;r<l.length;r++)l[r]="%"+("0"+l[r].toString(16)).substr(-2).toUpperCase();e=e+l.join("")}return e}async setSearch(t,e){let n={searchword:this.encode(t)},l=await this.post(this.siteUrl+"/search.asp",n,this.getHeader(),"form",1),r=je(yb(l,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},qt=new lT;async function sOe(t){await qt.init(t)}async function aOe(t){return await qt.home(t)}async function uOe(){return await qt.homeVod()}async function oOe(t,e,n,l){return await qt.category(t,e,n,l)}async function cOe(t){return await qt.detail(t)}async function pOe(t,e,n){return await qt.play(t,e,n)}async function fOe(t,e){return await qt.search(t,e)}function jVe(){return{init:sOe,home:aOe,homeVod:uOe,category:oOe,detail:cOe,play:pOe,search:fOe}}var rT=class extends Ce{constructor(){super()}getName(){return qt.getName()}getAppName(){return qt.getAppName()}getJSName(){return qt.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await qt.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await qt.initCookie(e.server.config.bilicookie),await qt.spiderInit(e),qt.cfgObj.code=0,qt.catOpenStatus=!0,qt.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await qt.setClasses(),this.classes=qt.classes}async setFilterObj(){await qt.setFilterObj(),this.filterObj=qt.filterObj}async setHomeVod(){await qt.setHomeVod(),this.homeVodList=qt.homeVodList}async setCategory(e,n,l,r){await qt.setCategory(e,n,l,r),this.vodList=qt.vodList}async setDetail(e){await qt.setDetail(e),this.vodDetail=qt.vodDetail}async setPlay(e,n,l){await qt.setPlay(e,n,l),this.playUrl=qt.playUrl,this.result=qt.result}async setSearch(e,n,l){await qt.setSearch(e,n,l),this.vodList=qt.vodList,this.result=qt.result}async setProxy(e,n){return await qt.proxy(e,n)}},Va=new rT;async function oQ(t,e){return await Va.init(t,e)}async function cQ(t,e){return await Va.home(t,e)}async function dOe(t,e){return await Va.homeVod(t,e)}async function pQ(t,e){return await Va.category(t,e)}async function fQ(t,e){return await Va.detail(t,e)}async function dQ(t,e){return await Va.play(t,e)}async function hQ(t,e){return await Va.search(t,e)}async function hOe(t,e){return await Va.proxy(t,e)}var mQ={meta:{key:qt.getJSName(),name:qt.getName(),type:qt.getType()},api:async t=>{t.post("/init",oQ),t.post("/home",cQ),t.post("/category",pQ),t.post("/detail",fQ),t.post("/play",dQ),t.post("/search",hQ),t.get("/proxy/:what/:ids/:end",hOe)},spider:{init:oQ,home:cQ,homeVod:dOe,category:pQ,detail:fQ,play:dQ,search:hQ}};var iT=class extends De{constructor(){super(),this.siteUrl="https://www.cilixiong.com",this.cateObj={"/movie/":"1","/drama/":"2"}}getAppName(){return"\u78C1\u529B\u718A"}getName(){return"\u{1F43B}\u2503\u78C1\u529B\u718A\u2503\u{1F43B}"}getJSName(){return"cilixiong"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e('[class="nav col-12 col-lg-auto me-
Line truncated
|
||||
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(o.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=we(/年份:(.*?)end/,o).replaceAll("/","")),o.indexOf("\u5907\u6CE8")>-1){let c=we(/备注:(.*?)end/,o);e.vod_remarks=we(/备注:\/(.*?)end/,o)}o.indexOf("\u6807\u7B7E")>-1&&(e.type_name=we(/标签:(.*?)end/,o)),o.indexOf("\u5267\u60C5")>-1&&(e.vod_content=we(/剧情:(.*?)end/,o))}let r=t('[class="module-tab-item tab-item"]'),i=t('[class="scroll-content"]'),s=[],a=[];for(let u=0;u<r.length;u++){let o=r[u];s.push(o.attribs["data-dropdown-value"]);let c=[];for(let f of t(i[u]).find("a")){let m=t(f).text(),d=f.attribs.href;c.push(m+"$"+d)}a.push(c.join("#"))}return e.vod_play_from=s.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,l){await this.jadeLog.debug(`extend:${JSON.stringify(l)}`);let r=this.getExtendValue(l,"1"),i=this.getExtendValue(l,"2"),s=this.getExtendValue(l,"3"),a=this.getExtendValue(l,"4"),u=[t.toString(),"",a,r,"",s,"","",e.toString(),"","",i],o=this.siteUrl+"/show/"+u.join("-")+".html",c=await this.getHtml(o);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`,l=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(l)}async setPlay(t,e,n){let l=await this.getHtml(this.siteUrl+e),i="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(we(/var player_aaaa=(.*?)<\/script>/,l.html())).url,s=await await this.fetch(i,null,this.getHeader()),a=s.match(/"url": getVideoInfo\("(.*?)"\),/)[1],u=s.match(/<script>var bt_token = "(.*?)"/)[1],o=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());o=o.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],o=this.decrypt_token_key(o),this.playUrl=await this.getVideoInfo(a,o,u)}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==","w5bDpsOCwqoA","YMKowphwwqc=","ahFuVsK9","w57DtEsbw7k=","w6LDo8Kq","UsKzE8KO","w6xlBFl9","WMOgIXbCiw==","DBhjw5fDhQ==","w6pUwoHCnsOs","ZF7CtsKiHg==","wos4w7wCwr0c","JlXCjlpyw5pMw6s=","TcO1N8K4wqE=","SMOzTcKYRw==","w4HDosOzwrUc","wqxdwqE2wrY=","A8OPGQjChw==","wpkxasOxBQ==","wpIZSA==","VsOnEEvChg==","bMOSZy93","c8OwZsKnRQ==","SsK/wpBHwoQ=","ccOsHVFf","w6ZKYMO8w6rDr8OrCHxdwqtdwrDDksOMccKZwobDpQPDgsOrAMKXF8OMPcOySsKuL8KLwq8vwr/DkjbDqsOCbRrCkcOTTFfDlsKkw7PChCM1wqTDisKawpHDt8KCQRY3w6DDgMKVw6M=","w7hYwq3ClsOa","Fic5wqLDiw==","KcKqHCVV","wqvDucKSwrs/","YcOfQcKPSQ==","wpjClmNRw7U=","wpHClSnCizg=","w4PDh8Kw","JsOYGwnCpw==","w5vDksK8w6sl","U8ORCHt+Rw==","woVxO8OSJQ==","b37Chw/Clw==","w6ViBXZlQg==","UwPCucKQCgU=","UMOeZgs=","MTLCtW7Dq2o=","wqAQwr/DqcOi","DiLDtsOOZsKEbsOrGm03EcKEwr/CplQ=","dzPDnRhP","wplgT8KBwow=","XUzCg8KF","K8KTCcKrCQ==","w6ZKJMOw","LxTCmn/DsA==","wooObcKBw6g=","w5djwofDoTQ=","VMOHeAts","Kw96
Line truncated
|
||||
|
||||
`;for(;;){let s=await this.getHtml(this.siteUrl+n);if(i+=m4(s('[class="content"]').html().trim().replaceAll("<p>"," ").replaceAll("</p>",`
|
||||
`)),n=s('[id="next_url"]')[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i}}async setSearch(e,n){let l={q:encodeURIComponent(e)},r=await this.fetch(this.siteUrl+"/novel/search",l,this.getHeader()),i=je(r);this.vodList=await this.parseVodShortListFromDocBySearch(i);let s=0}async setPlay(e,n,l){let r=n.split("+");n=r[1];let i=r[0]+`
|
||||
|
||||
`,a=(await this.getHtml(this.siteUrl+"/novel/pagea/"+n))('[class="content"]').text().trim().replaceAll("\u7AE0\u8282\u62A5\u9519 \u5206\u4EAB\u7ED9\u670B\u53CB\uFF1A","").replaceAll(" ","").split(`
|
||||
`),u=[];for(let o of a)B.isEmpty(o.replaceAll(" ",""))||u.push(o.replaceAll(" "," "));i=i+" "+u.join(`
|
||||
|
||||
`),this.playUrl={content:i}}},Gn=new mT;var yT=class extends Ce{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,l,r){await Gn.setCategory(e,n,l,r),this.vodList=Gn.vodList}async setDetail(e){await Gn.setDetail(e),this.vodDetail=Gn.vodDetail}async setPlay(e,n,l){await Gn.setPlay(e,n,l),this.playUrl=Gn.playUrl,this.result=Gn.result}async setSearch(e,n,l){await Gn.setSearch(e,n,l),this.vodList=Gn.vodList,this.result=Gn.result}async setProxy(e,n){return await Gn.proxy(e,n)}},Xa=new yT;async function YQ(t,e){return await Xa.init(t,e)}async function QQ(t,e){return await Xa.home(t,e)}async function DOe(t,e){return await Xa.homeVod(t,e)}async function ZQ(t,e){return await Xa.category(t,e)}async function eZ(t,e){return await Xa.detail(t,e)}async function tZ(t,e){return await Xa.play(t,e)}async function nZ(t,e){return await Xa.search(t,e)}async function POe(t,e){return await Xa.proxy(t,e)}var lZ={meta:{key:Gn.getJSName(),name:Gn.getName(),type:Gn.getType()},api:async t=>{t.post("/init",YQ),t.post("/home",QQ),t.post("/category",ZQ),t.post("/detail",eZ),t.post("/play",tZ),t.post("/search",nZ),t.get("/proxy/:what/:ids/:end",POe)},spider:{init:YQ,home:QQ,homeVod:DOe,category:ZQ,detail:eZ,play:tZ,search:nZ}};function LOe(t){return t.trim().replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}var gT=class extends De{constructor(){super(),this.siteUrl="https://api.bookan.com.cn"}getName(){return"\u{1F3B5}\u2503\u770B\u4E66\u2503\u{1F3B5}"}getAppName(){return"\u770B\u4E66"}getJSName(){return"bookan"}getType(){return 10}async parseVodShortListFromJson(e){let n=[];for(let l of e.list)n.push({book_id:l.id,book_name:l.name,book_pic:l.cover,book_remarks:l.extra.author});return n}async setClasses(){this.classes=[{type_id:"1305",type_name:"\u5C11\u5E74\u8BFB\u7269"},{type_id:"1304",type_name:"\u513F\u7AE5\u6587\u5B66"},{type_id:"1320",type_name:"\u56FD\u5B66\u7ECF\u5178"},{type_id:"1306",type_name:"\u6587\u827A\u5C11\u5E74"},{type_id:"1309",type_name:"\u80B2\u513F\u5FC3\u7ECF"},{type_id:"1310",type_name:"\u5FC3\u7406\u54F2\u5B66"},{type_id:"1307",type_name:"\u9752\u6625\u52B1\u5FD7"},{type_id:"1312",type_name:"\u5386\u53F2\u5C0F\u8BF4"},{type_id:"1303",type_name:"\u6545\u4E8B\u4F1A"},{type_id:"1317",type_name:"\u97F3\u4E50\u620F\u5267"},{type_id:"1319",type_name:"\u76F8\u58F0\u8BC4\u4E66"}]}async setCategory(e,n,l,r){let i=await this.fetch(`${this.siteUrl}/voice/book/list?instance_id=25304&page=${n}&category_id=${e}&num=24`,null,this.getHeader()),s=JSON.parse(i).data;this.vodList=await this.parseVodShortListFromJson(s)}async parseVodDetailfromJson(e){let n={audio:1,type_name:"",book_year:"",book_area:"",book_remarks:"",book_actor:"",book_director:"",book_content:""},l=B.map(e.list,function(r){return LOe(r.title)+"$"+r.file}).join("#");return n.volumes="\u4E66\u5377",n.urls=l,n}async setDetail(e){let n=await this.fetch(`${this.siteUrl}/voice/album/units?album_id=${e}&page=1&num=200&order=1`,null,this.getHeader()),l=JSON.parse(n).data;this.vodDetail=await this.parseVodDetailfromJson(l),this.vodDetail.book_id=e}async play(e,n,l){return JSON.stringify({parse:0,url:n})}async setSearch(e,n){let l=await this.fetch(`https://es.bookan.com.cn/api/v3/voice/book?instanceId=25304&keyword=${e}&pageNum=1&limitNum=20`,null,this.getHeader()),r=JSON.parse(l).data;this.vodList=await this.parseVodShortListFromJson(r)}},Jn=new gT;var vT=class extends Ce{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,l,r){await Jn.setCategory(e,n,l,r),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDe
Line truncated
|
||||
`).trim(),n=i("a.Readpage_down")[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:r+`
|
||||
|
||||
`}}catch{this.playUrl={content:""}}}async search(e,n){let l=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":Qs,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),i=(B.isArray(l.headers["set-cookie"])?l.headers["set-cookie"].join(";;;"):l.headers["set-cookie"]).split(";;;"),s={};for(let c of i){let f=c.trim(),m=f.indexOf("="),d=f.substr(0,m);s[d]=f.substr(m+1,f.indexOf(";")-m-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":Qs,cookie:"hm="+s.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),u=JSON.parse(a.content),o=[];for(let c of u)o.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:o}}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=_2(e[1]);if(l==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+r),s=await this.parseVodDetailFromDoc(i),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:r,"User-Agent":Gl}}):a=await req(s.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:""})}},Jn=new gT;var vT=class extends Ce{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,l,r){await Jn.setCategory(e,n,l,r),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDetail=Jn.vodDetail}async setPlay(e,n,l){await Jn.setPlay(e,n,l),this.playUrl=Jn.playUrl,this.result=Jn.result}async setSearch(e,n,l){await Jn.setSearch(e,n,l),this.vodList=Jn.vodList,this.result=Jn.result}async setProxy(e,n){return await Jn.proxy(e,n)}},Wa=new vT;async function aZ(t,e){return await Wa.init(t,e)}async function uZ(t,e){return await Wa.home(t,e)}async function POe(t,e){return await Wa.homeVod(t,e)}async function oZ(t,e){return await Wa.category(t,e)}async function cZ(t,e){return await Wa.detail(t,e)}async function pZ(t,e){return await Wa.play(t,e)}async function fZ(t,e){return await Wa.search(t,e)}async function LOe(t,e){return await Wa.proxy(t,e)}var dZ={meta:{key:Jn.getJSName(),name:Jn.getName(),type:Jn.getType()},api:async t=>{t.post("/init",aZ),t.post("/home",uZ),t.post("/category",oZ),t.post("/detail",cZ),t.post("/play",pZ),t.post("/search",fZ),t.get("/proxy/:what/:ids/:end",LOe)},spider:{init:aZ,home:uZ,homeVod:POe,category:oZ,detail:cZ,play:pZ,search:fZ}};var _T=class extends Pe{constructor(){super(),this.siteUrl="https://www.diyi69.com"}getAppName(){return"\u516D\u4E5D\u4E66\u5427"}getJSName(){return"liujiushu"}getType(){return 10}getName(){return"\u{1F4DA}\uFE0E\u2503\u516D\u4E5D\u4E66\u5427\u2503\u{1F4DA}\uFE0E"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}parseVodShortFromElement(e,n){let l=new b2,r=e(n).find("a");return l.book_remarks=e(r[2]).text(),l.book_name=e(r[1]).text(),l.book_id=r[0].attribs.href,l.book_pic=e(n).find("img")[0].attribs.src,l}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="flex"]')[0]).find("li");for(let r of l){let i=this.parseVodShortFromElement(e,r);n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.flex > li"),l=[];for(let r of n){let i=new b2;i.book_id=e(r).find("a:first")[0].attribs.href;let s=e(r).find("img:first")[0];i.book_name=s.attribs.title,i.book_pic=s.attribs["data-original"],i.book_remarks=e(e(r).find("em:first")).text(),l.push(i)}return l}async parseVodShortListFromDocBySearch(e){let n=[],l=e("li.searchresult");for(let r of l){let i=new b2,s=e(r).find("a");i.book_remarks=e(s[2]).text(),i.book_name=e(s[1]).text(),i.book_id=s[0].attribs.href,i.book_pic=e(s[0]).find("img")[0].attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e,n){let l=e.html(),r=new Ga;r.book_name=e("[property$=title]")[0].attribs.content,r.book_year=e("[property$=update_time]")[0].attribs.content,r.book_director=e("[property$=autho
Line truncated
|
||||
`}}catch{this.playUrl={content:""}}}async search(e,n){let l=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":ea,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),i=(B.isArray(l.headers["set-cookie"])?l.headers["set-cookie"].join(";;;"):l.headers["set-cookie"]).split(";;;"),s={};for(let c of i){let f=c.trim(),m=f.indexOf("="),d=f.substr(0,m);s[d]=f.substr(m+1,f.indexOf(";")-m-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":ea,cookie:"hm="+s.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),u=JSON.parse(a.content),o=[];for(let c of u)o.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:o}}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=b2(e[1]);if(l==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+r),s=await this.parseVodDetailFromDoc(i),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:r,"User-Agent":Kl}}):a=await req(s.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:""})}},Kn=new bT;var wT=class extends Ce{constructor(){super()}getName(){return Kn.getName()}getAppName(){return Kn.getAppName()}getJSName(){return Kn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Kn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Kn.initCookie(e.server.config.bilicookie),await Kn.spiderInit(e),Kn.cfgObj.code=0,Kn.catOpenStatus=!0,Kn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Kn.setClasses(),this.classes=Kn.classes}async setFilterObj(){await Kn.setFilterObj(),this.filterObj=Kn.filterObj}async setHomeVod(){await Kn.setHomeVod(),this.homeVodList=Kn.homeVodList}async setCategory(e,n,l,r){await Kn.setCategory(e,n,l,r),this.vodList=Kn.vodList}async setDetail(e){await Kn.setDetail(e),this.vodDetail=Kn.vodDetail}async setPlay(e,n,l){await Kn.setPlay(e,n,l),this.playUrl=Kn.playUrl,this.result=Kn.result}async setSearch(e,n,l){await Kn.setSearch(e,n,l),this.vodList=Kn.vodList,this.result=Kn.result}async setProxy(e,n){return await Kn.proxy(e,n)}},Qa=new wT;async function vZ(t,e){return await Qa.init(t,e)}async function _Z(t,e){return await Qa.home(t,e)}async function JOe(t,e){return await Qa.homeVod(t,e)}async function EZ(t,e){return await Qa.category(t,e)}async function bZ(t,e){return await Qa.detail(t,e)}async function wZ(t,e){return await Qa.play(t,e)}async function SZ(t,e){return await Qa.search(t,e)}async function KOe(t,e){return await Qa.proxy(t,e)}var TZ={meta:{key:Kn.getJSName(),name:Kn.getName(),type:Kn.getType()},api:async t=>{t.post("/init",vZ),t.post("/home",_Z),t.post("/category",EZ),t.post("/detail",bZ),t.post("/play",wZ),t.post("/search",SZ),t.get("/proxy/:what/:ids/:end",KOe)},spider:{init:vZ,home:_Z,homeVod:JOe,category:EZ,detail:bZ,play:wZ,search:SZ}};var ST=class extends De{constructor(){super(),this.siteUrl="https://www.diyi69.com"}getAppName(){return"\u516D\u4E5D\u4E66\u5427"}getJSName(){return"liujiushu"}getType(){return 10}getName(){return"\u{1F4DA}\uFE0E\u2503\u516D\u4E5D\u4E66\u5427\u2503\u{1F4DA}\uFE0E"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}parseVodShortFromElement(e,n){let l=new Tl,r=e(n).find("a");return l.book_remarks=e(r[2]).text(),l.book_name=e(r[1]).text(),l.book_id=r[0].attribs.href,l.book_pic=e(n).find("img")[0].attribs.src,l}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="flex"]')[0]).find("li");for(let r of l){let i=this.parseVodShortFromElement(e,r);n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.flex > li"),l=[];for(let r of n){let i=new Tl;i.book_id=e(r).find("a:first")[0].attribs.href;let s=e(r).find("img:first")[0];i.book_name=s.attribs.title,i.book_pic=s.attribs["data-original"],i.book_remarks=e(e(r).find("em:first")).text(),l.push(i)}return l}async parseVodShortListFromDocBySearch(e){let n=[],l=e("li.searchresult");for(let r of l){let i=new Tl,s=e(r).find("a");i.book_remarks=e(s[2]).text(),i.book_name=e(s[1]).text(),i.book_id=s[0].attribs.href,i.book_pic=e(s[0]).find("img")[0].attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e,n){let l=e.html(),r=new Ei;r.book_name=e("[property$=title]")[0].attribs.content,r.book_year=e("[property$=update_time]")[0].attribs.content,r.book_director=e("[property$=autho
Line truncated
|
||||
|
||||
`;for(;;){let s=await this.getHtml(this.siteUrl+n);if(i+=Ap(s('[class="content"]').html().trim().replaceAll("<p>"," ").replaceAll("</p>",`
|
||||
`)),n=s('[id="next_url"]')[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i}}async setSearch(e,n){let l={searchkey:e,searchtype:"all",Submit:""},r=await this.fetch(this.siteUrl+"/search/",l,this.getHeader()),i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=_2(e[1]);if(l==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+r),s=await this.parseVodDetailFromDoc(i),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:r,"User-Agent":Gl}}):a=await req(s.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:""})}},Kn=new _T;var ET=class extends Ce{constructor(){super()}getName(){return Kn.getName()}getAppName(){return Kn.getAppName()}getJSName(){return Kn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Kn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Kn.initCookie(e.server.config.bilicookie),await Kn.spiderInit(e),Kn.cfgObj.code=0,Kn.catOpenStatus=!0,Kn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Kn.setClasses(),this.classes=Kn.classes}async setFilterObj(){await Kn.setFilterObj(),this.filterObj=Kn.filterObj}async setHomeVod(){await Kn.setHomeVod(),this.homeVodList=Kn.homeVodList}async setCategory(e,n,l,r){await Kn.setCategory(e,n,l,r),this.vodList=Kn.vodList}async setDetail(e){await Kn.setDetail(e),this.vodDetail=Kn.vodDetail}async setPlay(e,n,l){await Kn.setPlay(e,n,l),this.playUrl=Kn.playUrl,this.result=Kn.result}async setSearch(e,n,l){await Kn.setSearch(e,n,l),this.vodList=Kn.vodList,this.result=Kn.result}async setProxy(e,n){return await Kn.proxy(e,n)}},Ya=new ET;async function hZ(t,e){return await Ya.init(t,e)}async function mZ(t,e){return await Ya.home(t,e)}async function FOe(t,e){return await Ya.homeVod(t,e)}async function yZ(t,e){return await Ya.category(t,e)}async function gZ(t,e){return await Ya.detail(t,e)}async function vZ(t,e){return await Ya.play(t,e)}async function _Z(t,e){return await Ya.search(t,e)}async function jOe(t,e){return await Ya.proxy(t,e)}var EZ={meta:{key:Kn.getJSName(),name:Kn.getName(),type:Kn.getType()},api:async t=>{t.post("/init",hZ),t.post("/home",mZ),t.post("/category",yZ),t.post("/detail",gZ),t.post("/play",vZ),t.post("/search",_Z),t.get("/proxy/:what/:ids/:end",jOe)},spider:{init:hZ,home:mZ,homeVod:FOe,category:yZ,detail:gZ,play:vZ,search:_Z}};function SZ(t){this._parameters={},this._loadParameters(t||{})}SZ.prototype={_loadParameters:function(t){t instanceof Array?this._loadParametersFromArray(t):typeof t=="object"&&this._loadParametersFromObject(t)},_loadParametersFromArray:function(t){var e;for(e=0;e<t.length;e++)this._loadParametersFromObject(t[e])},_loadParametersFromObject:function(t){var e;for(e in t)if(t.hasOwnProperty(e)){var n=this._getStringFromParameter(t[e]);this._loadParameterValue(e,n)}},_loadParameterValue:function(t,e){var n;if(e instanceof Array){for(n=0;n<e.length;n++){var l=this._getStringFromParameter(e[n]);this._addParameter(t,l)}e.length==0&&this._addParameter(t,"")}else this._addParameter(t,e)},_getStringFromParameter:function(t){var e=t||"";try{(typeof t=="number"||typeof t=="boolean")&&(e=t.toString())}catch{}return e},_addParameter:function(t,e){this._parameters[t]||(this._parameters[t]=[]),this._parameters[t].push(e)},get:function(){return this._parameters}};function UOe(t){return t?decodeURIComponent(t):""}function MOe(t){let e=[],n=[];for(let a in t)e.push(X6(a));e.sort();for(let a=0;a<e.length;a++){let u=e[a];var l,r,i=UOe(u),s=t[i];for(s.sort(),l=0;l<s.length;l++)r=X6(s[l]),n.push(u+"="+r)}return n.join("&")}function bZ(t=10){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let l=0;l<t;l++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function X6(t){return t?encodeURIComponent(t).replace(/[!'()]/g,escape).replace(/\*/g,"%2A"):""}function wZ(t,e,n,l="f3ac5b086f3eab260520d8e3049561e6"){e=e.split("?")[0],e=e.startsWith("http")?e:"https://api.audiomack.com/v1"+e;let r=new SZ(n).get(),i=t.toUpperCase(),s=MOe(r),a=X6(i)+"&"+X6(e)+"&"+X6(s);return He.HmacSHA1(a,l+"&").toString(He.enc.Base64)}var bT=class extends Pe{constructor(){super(),this.siteUrl="https://api.audiomack.com/v1"}getName(){return"\u{1F3B5}\u2503\u97F3\u58F0\u2503\u{1F3B5}"}getAppName(){return"\u97F3\u58F0"}getJSName(){return"audiomack"}getType(){return 10}async parseVodShortListFromJson(e){let n=[];for(let l of e.results.playlists){let r=new b2;r.book_id=l.id,r.book_pic=l.image,r.book_name=l.title,r.book_remarks=l.description,n.push(r)}return n}async setClasses(){this.
Line truncated
|
||||
`;for(;;){let s=await this.getHtml(this.siteUrl+n);if(i+=m4(s('[class="content"]').html().trim().replaceAll("<p>"," ").replaceAll("</p>",`
|
||||
`)),n=s('[id="next_url"]')[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i}}async setSearch(e,n){let l={searchkey:e,searchtype:"all",Submit:""},r=await this.fetch(this.siteUrl+"/search/",l,this.getHeader()),i=je(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=b2(e[1]);if(l==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+r),s=await this.parseVodDetailFromDoc(i),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:r,"User-Agent":Kl}}):a=await req(s.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 ST;var TT=class extends Ce{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("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Xn.initCookie(e.server.config.bilicookie),await Xn.spiderInit(e),Xn.cfgObj.code=0,Xn.catOpenStatus=!0,Xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),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,l,r){await Xn.setCategory(e,n,l,r),this.vodList=Xn.vodList}async setDetail(e){await Xn.setDetail(e),this.vodDetail=Xn.vodDetail}async setPlay(e,n,l){await Xn.setPlay(e,n,l),this.playUrl=Xn.playUrl,this.result=Xn.result}async setSearch(e,n,l){await Xn.setSearch(e,n,l),this.vodList=Xn.vodList,this.result=Xn.result}async setProxy(e,n){return await Xn.proxy(e,n)}},Za=new TT;async function xZ(t,e){return await Za.init(t,e)}async function AZ(t,e){return await Za.home(t,e)}async function XOe(t,e){return await Za.homeVod(t,e)}async function OZ(t,e){return await Za.category(t,e)}async function NZ(t,e){return await Za.detail(t,e)}async function CZ(t,e){return await Za.play(t,e)}async function RZ(t,e){return await Za.search(t,e)}async function WOe(t,e){return await Za.proxy(t,e)}var IZ={meta:{key:Xn.getJSName(),name:Xn.getName(),type:Xn.getType()},api:async t=>{t.post("/init",xZ),t.post("/home",AZ),t.post("/category",OZ),t.post("/detail",NZ),t.post("/play",CZ),t.post("/search",RZ),t.get("/proxy/:what/:ids/:end",WOe)},spider:{init:xZ,home:AZ,homeVod:XOe,category:OZ,detail:NZ,play:CZ,search:RZ}};function PZ(t){this._parameters={},this._loadParameters(t||{})}PZ.prototype={_loadParameters:function(t){t instanceof Array?this._loadParametersFromArray(t):typeof t=="object"&&this._loadParametersFromObject(t)},_loadParametersFromArray:function(t){var e;for(e=0;e<t.length;e++)this._loadParametersFromObject(t[e])},_loadParametersFromObject:function(t){var e;for(e in t)if(t.hasOwnProperty(e)){var n=this._getStringFromParameter(t[e]);this._loadParameterValue(e,n)}},_loadParameterValue:function(t,e){var n;if(e instanceof Array){for(n=0;n<e.length;n++){var l=this._getStringFromParameter(e[n]);this._addParameter(t,l)}e.length==0&&this._addParameter(t,"")}else this._addParameter(t,e)},_getStringFromParameter:function(t){var e=t||"";try{(typeof t=="number"||typeof t=="boolean")&&(e=t.toString())}catch{}return e},_addParameter:function(t,e){this._parameters[t]||(this._parameters[t]=[]),this._parameters[t].push(e)},get:function(){return this._parameters}};function YOe(t){return t?decodeURIComponent(t):""}function QOe(t){let e=[],n=[];for(let a in t)e.push(Q6(a));e.sort();for(let a=0;a<e.length;a++){let u=e[a];var l,r,i=YOe(u),s=t[i];for(s.sort(),l=0;l<s.length;l++)r=Q6(s[l]),n.push(u+"="+r)}return n.join("&")}function kZ(t=10){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let l=0;l<t;l++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function Q6(t){return t?encodeURIComponent(t).replace(/[!'()]/g,escape).replace(/\*/g,"%2A"):""}function DZ(t,e,n,l="f3ac5b086f3eab260520d8e3049561e6"){e=e.split("?")[0],e=e.startsWith("http")?e:"https://api.audiomack.com/v1"+e;let r=new PZ(n).get(),i=t.toUpperCase(),s=QOe(r),a=Q6(i)+"&"+Q6(e)+"&"+Q6(s);return He.HmacSHA1(a,l+"&").toString(He.enc.Base64)}var xT=class extends De{constructor(){super(),this.siteUrl="https://api.audiomack.com/v1"}getName(){return"\u{1F3B5}\u2503\u97F3\u58F0\u2503\u{1F3B5}"}getAppName(){return"\u97F3\u58F0"}getJSName(){return"audiomack"}getType(){return 10}async parseVodShortListFromJson(e){let n=[];for(let l of e.results.playlists){let r=new Tl;r.book_id=l.id,r.book_pic=l.image,r.book_name=l.title,r.book_remarks=l.description,n.push(r)}return n}async setClasses(){this.
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
uri-js/dist/es5/uri.all.js:
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
4c0357154fb6018c7a01bd8623f71eb3
|
||||
721c75cfd56e4ae0b235266d4c411199
|
||||
@@ -1,4 +1,4 @@
|
||||
import {__jsEvalReturn} from './cntv.js';
|
||||
import {__jsEvalReturn} from './ttkan.js';
|
||||
|
||||
import * as Utils from "../lib/utils.js";
|
||||
|
||||
@@ -51,12 +51,12 @@ async function testMusicPlay(vodDetail) {
|
||||
}
|
||||
|
||||
async function test() {
|
||||
let siteKey = 'cntv';
|
||||
let siteType = 3;
|
||||
let siteKey = 'ttkan';
|
||||
let siteType = 10;
|
||||
await spider.init({
|
||||
skey: siteKey, stype: siteType, ext: {
|
||||
"token": "6827db23e5474d02a07fd7431d3d5a5a",
|
||||
"box": "TV",
|
||||
"box": "CatOpen",
|
||||
"code": "1",
|
||||
"from": "cntv",
|
||||
"danmu": true,
|
||||
@@ -67,16 +67,17 @@ async function test() {
|
||||
let classes = JSON.parse(await spider.home(true));
|
||||
console.debug(JSON.stringify(classes))
|
||||
|
||||
// 测试详情
|
||||
let detail1 = JSON.parse(await spider.detail("/novel/chapters/wanxiangzhiwang-tiancantudou"))
|
||||
await testMusicPlay(detail1)
|
||||
|
||||
//测试首页列表
|
||||
let homeVod = JSON.parse(await spider.homeVod())
|
||||
console.debug(JSON.stringify(homeVod));
|
||||
// 测试分类
|
||||
let catePage = JSON.parse(await spider.category("72", "2", undefined, {"live":"101"}));
|
||||
let catePage = JSON.parse(await spider.category("/novel/class/lianzai", "1", undefined, {"sort":"/novel/class/lianzai_efgh"}));
|
||||
console.debug(JSON.stringify(catePage))
|
||||
|
||||
// 测试详情
|
||||
let detail1 = JSON.parse(await spider.detail("live-cctv2-https://app.cctv.com/special/appchannellogo/rectangle/l/cctv1.png?q=75"))
|
||||
await testPlay(detail1)
|
||||
|
||||
// 测试搜索
|
||||
let search_page = JSON.parse(await spider.search("完美世界", false, 1))
|
||||
@@ -85,6 +86,9 @@ async function test() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 测试详情
|
||||
if (search_page.list && search_page.list.length > 0) {
|
||||
for (const k in search_page.list) {
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
/*
|
||||
* @File : ttkan.js
|
||||
* @Author : jade
|
||||
* @Date : 2024/5/10 9:59
|
||||
* @Email : jadehh@1ive.com
|
||||
* @Software : Samples
|
||||
* @Desc :
|
||||
*/
|
||||
import {_, load} from '../lib/cat.js';
|
||||
import * as Utils from "../lib/utils.js";
|
||||
import {Spider} from "./spider.js";
|
||||
import {BookDetail, BookShort} from "../lib/book.js";
|
||||
|
||||
class TTKanSpider extends Spider {
|
||||
constructor() {
|
||||
super();
|
||||
this.siteUrl = "https://cn.ttkan.co"
|
||||
this.apiUrl = "https://cn.ttkan.co/api"
|
||||
}
|
||||
|
||||
getAppName() {
|
||||
return "天天看小说"
|
||||
}
|
||||
|
||||
getJSName() {
|
||||
return "ttkan"
|
||||
}
|
||||
|
||||
getType() {
|
||||
return 10
|
||||
}
|
||||
|
||||
getName() {
|
||||
return "📚︎┃天天看小说┃📚︎"
|
||||
}
|
||||
|
||||
async spiderInit(inReq = null) {
|
||||
if (inReq !== null) {
|
||||
this.jsBase = await js2Proxy(inReq, "img", this.getHeader());
|
||||
} else {
|
||||
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'img/', this.getHeader());
|
||||
}
|
||||
}
|
||||
|
||||
async init(cfg) {
|
||||
await super.init(cfg);
|
||||
await this.spiderInit(null)
|
||||
}
|
||||
|
||||
parseVodShortFromElement($, element) {
|
||||
let bookShort = new BookShort()
|
||||
let bookShortElements = $(element).find("a")
|
||||
bookShort.book_name = bookShortElements[0].attribs["aria-label"]
|
||||
bookShort.book_id = bookShortElements[0].attribs.href
|
||||
if ($(element).find("amp-img").length > 0) {
|
||||
bookShort.book_pic = $(element).find("amp-img")[0].attribs["src"].split("?")[0]
|
||||
}
|
||||
bookShort.book_remarks = $($(element).find("p")[0]).text()
|
||||
return bookShort
|
||||
}
|
||||
|
||||
async parseVodShortListFromDoc($) {
|
||||
let books = []
|
||||
let bookElements = $("[class=\"frame_body\"]").find("[class=\"pure-g\"]").slice(-1)[0]
|
||||
for (const bookElement of bookElements.children) {
|
||||
let bookShort = this.parseVodShortFromElement($, $(bookElement).find("li")[0])
|
||||
books.push(bookShort)
|
||||
}
|
||||
return books
|
||||
}
|
||||
|
||||
async parseVodShortListFromDocByCategory($) {
|
||||
let bookImgElements = $("[class=\"pure-u-xl-1-5 pure-u-lg-1-4 pure-u-md-1-3 pure-u-sm-1-3 pure-u-13-24\"]")
|
||||
let bookMsgElements = $("[class=\"pure-u-xl-4-5 pure-u-lg-3-4 pure-u-md-2-3 pure-u-sm-2-3 pure-u-11-24\"]")
|
||||
let books = [];
|
||||
for (let i = 0; i < bookImgElements.length; i++) {
|
||||
let bookShort = new BookShort()
|
||||
let imgElement = bookImgElements[i]
|
||||
let msgElement = bookMsgElements[i]
|
||||
let element = $(imgElement).find('a')[0]
|
||||
bookShort.book_id = element.attribs.href;
|
||||
const img = $(imgElement).find('amp-img')[0];
|
||||
bookShort.book_name = $(element).text()
|
||||
bookShort.book_pic = img.attribs["src"].split("?")[0]
|
||||
bookShort.book_name = img.attribs["alt"]
|
||||
bookShort.book_remarks = $($(msgElement).find('li').slice(-1)).text().replaceAll("状态:","");
|
||||
books.push(bookShort)
|
||||
}
|
||||
return books
|
||||
}
|
||||
|
||||
async parseVodShortListFromJson(obj) {
|
||||
let books = [];
|
||||
for (const data of obj) {
|
||||
let bookShort = new BookShort()
|
||||
bookShort.book_id = "/novel/chapters/" + data["novel_id"]
|
||||
bookShort.book_name = data["name"]
|
||||
bookShort.book_remarks = "作者:" + data.author
|
||||
bookShort.book_pic = "https://static.ttkan.co/cover/" + data["topic_img"]
|
||||
books.push(bookShort)
|
||||
}
|
||||
return books
|
||||
}
|
||||
|
||||
async parseVodShortListFromDocBySearch($) {
|
||||
let books = []
|
||||
let bookElements = $("[class=\"frame_body\"]").find("[class=\"pure-g\"]").slice(-1)[0]
|
||||
for (const bookElement of bookElements.children) {
|
||||
let bookShort = new BookShort()
|
||||
bookShort.book_id = $(bookElement).find("a")[0].attribs.href
|
||||
bookShort.book_name = $($(bookElement).find("li")[0]).text()
|
||||
bookShort.book_remarks = $($(bookElement).find("li")[1]).text()
|
||||
bookShort.book_pic = $(bookElement).find("amp-img")[0].attribs.src.split("?")[0]
|
||||
books.push(bookShort)
|
||||
}
|
||||
return books
|
||||
}
|
||||
|
||||
async parseVodDetailFromDoc($, id) {
|
||||
let html = $.html()
|
||||
let bookDetail = new BookDetail()
|
||||
let infoElement = $("[class=\"pure-g novel_info\"]")
|
||||
bookDetail.book_pic = $(infoElement).find("amp-img")[0].attribs.src.split("?")[0]
|
||||
let elements = $(infoElement).find("[class=\"pure-u-xl-5-6 pure-u-lg-5-6 pure-u-md-2-3 pure-u-1-2\"]").find("li")
|
||||
bookDetail.book_name = $(elements[0]).text()
|
||||
bookDetail.book_director = $(elements[1]).text().replaceAll("作者:","")
|
||||
bookDetail.book_remarks = $(elements[3]).text().replaceAll("状态:","")
|
||||
bookDetail.book_year= $("[class=\"near_chapter\"]").find("time")[0].attribs.datetime.replaceAll("T"," ").split(".")[0]
|
||||
bookDetail.book_content = $($('[class="description"]')).text().trim()
|
||||
bookDetail.book_id = id
|
||||
const playBook = {};
|
||||
|
||||
const nearElement = $('[class="near_chapter"]').find("a")[0]
|
||||
|
||||
let nearVodItems = []
|
||||
const epName = $(nearElement).text();
|
||||
const page = nearElement.attribs.href.split("&page=").slice(-1)[0]
|
||||
const playUrl = epName + "+" + `${id.replaceAll("/novel/chapters/","")}_${page}.html` ;
|
||||
nearVodItems.push(epName + '$' + playUrl)
|
||||
|
||||
|
||||
const lastestElements = $('[class="chapters_frame"]').find("a")
|
||||
for (const lastestElement of lastestElements){
|
||||
const epName = $(lastestElement).text();
|
||||
const page = lastestElement.attribs.href.split("&page=").slice(-1)[0]
|
||||
const playUrl = epName + "+" + `${id.replaceAll("/novel/chapters/","")}_${page}.html` ;
|
||||
nearVodItems.push(epName + '$' + playUrl)
|
||||
}
|
||||
playBook["最近章节"] = nearVodItems.join("#")
|
||||
let params = {"language":"cn","novel_id":id.replaceAll("/novel/chapters/",""),"__amp_source_origin":encodeURIComponent(this.siteUrl)}
|
||||
let resJSon = JSON.parse(await this.fetch(this.apiUrl + "/nq/amp_novel_chapters" ,params,this.getHeader()))
|
||||
let allVodItems = []
|
||||
for (const data of resJSon["items"]){
|
||||
const epName = data.chapter_name;
|
||||
const playUrl = epName + "+" + `${id.replaceAll("/novel/chapters/","")}_${data.chapter_id}.html` ;
|
||||
allVodItems.push(epName + '$' + playUrl)
|
||||
}
|
||||
playBook["目录"] = allVodItems.join("#")
|
||||
bookDetail.volumes = _.keys(playBook).join('$$$');
|
||||
bookDetail.urls = _.values(playBook).join('$$$');
|
||||
return bookDetail
|
||||
}
|
||||
|
||||
async setClasses() {
|
||||
let $ = await this.getHtml()
|
||||
let navElements = $('div.novel_class_nav > a')
|
||||
for (const element of navElements) {
|
||||
let type_id = element.attribs.href
|
||||
let type_name = $(element).text()
|
||||
this.classes.push(this.getTypeDic(type_name, type_id));
|
||||
}
|
||||
}
|
||||
|
||||
async getFilter($) {
|
||||
let extend_list = []
|
||||
let extend_dic = {"name": "排序", "key": "sort", "value": []}
|
||||
let elements = $('div.rank_nav > a')
|
||||
let sortList = []
|
||||
let isNewSort = false
|
||||
if (elements.length === 0) {
|
||||
elements = $('div.nav_filter_inner > a')
|
||||
isNewSort = true
|
||||
}
|
||||
for (const element of elements) {
|
||||
let type_name = $(element).text()
|
||||
let type_id = element.attribs.href
|
||||
sortList.push(this.getFliterDic(type_name, type_id))
|
||||
}
|
||||
if (isNewSort) {
|
||||
const lastItem = sortList.splice(-1, 1);
|
||||
sortList = lastItem.concat(sortList);
|
||||
}
|
||||
extend_dic["value"] = sortList
|
||||
extend_list.push(extend_dic)
|
||||
return extend_list
|
||||
}
|
||||
|
||||
async setFilterObj() {
|
||||
for (const type_dic of this.classes) {
|
||||
let type_id = type_dic["type_id"]
|
||||
if (type_id !== "最近更新") {
|
||||
let $ = await this.getHtml(this.siteUrl + type_id)
|
||||
this.filterObj[type_id] = await this.getFilter($)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async setHomeVod() {
|
||||
let $ = await this.getHtml()
|
||||
this.homeVodList = await this.parseVodShortListFromDoc($)
|
||||
}
|
||||
|
||||
|
||||
async setDetail(id) {
|
||||
let $ = await this.getHtml(this.siteUrl + id)
|
||||
this.vodDetail = await this.parseVodDetailFromDoc($, id)
|
||||
}
|
||||
|
||||
getExtend(extend) {
|
||||
if (extend["sort"] === undefined) {
|
||||
return "*"
|
||||
}
|
||||
if (extend["sort"] === "全部") {
|
||||
return "*"
|
||||
} else {
|
||||
let value = extend["sort"].replaceAll("/novel/", "").replaceAll("class/", "")
|
||||
if (value.indexOf("_") > -1){
|
||||
return value.split("_").slice(-1)[0]
|
||||
}else{
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async setCategory(tid, pg, filter, extend) {
|
||||
if (tid === "/novel/rank") {
|
||||
tid = extend["sort"] ?? tid
|
||||
let $ = await this.getHtml(this.siteUrl + tid)
|
||||
this.vodList = await this.parseVodShortListFromDocByCategory($)
|
||||
let x = 0
|
||||
} else {
|
||||
let extendFilter = this.getExtend(extend)
|
||||
let limit = 18
|
||||
let params = {
|
||||
"language": "cn",
|
||||
"limit": limit,
|
||||
"type": tid.replaceAll("/novel/", "").replaceAll("class/", ""),
|
||||
"filter": extendFilter,
|
||||
"page": parseInt(pg),
|
||||
"__amp_source_origin": encodeURIComponent(this.siteUrl)
|
||||
}
|
||||
let resJson = JSON.parse(await this.fetch(this.apiUrl + "/nq/amp_novel_list", params, this.getHeader()))
|
||||
this.vodList = await this.parseVodShortListFromJson(resJson["items"])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async setPlay(flag, id, flags) {
|
||||
let id_list = id.split("-")
|
||||
id = id_list[1]
|
||||
let content = id_list[0] + "\n\n"
|
||||
while (true) {
|
||||
let $ = await this.getHtml(this.siteUrl + id)
|
||||
content += Utils.formatContent($("[class=\"content\"]").html().trim().replaceAll("<p>", " ").replaceAll("</p>", "\n"));
|
||||
id = $("[id=\"next_url\"]")[0].attribs.href;
|
||||
if (id.indexOf('_') < 0) break;
|
||||
}
|
||||
this.playUrl = {"content": content}
|
||||
}
|
||||
|
||||
async setSearch(wd, quick) {
|
||||
let params = {"q":encodeURIComponent(wd)}
|
||||
let content = await this.fetch(this.siteUrl + "/novel/search", params, this.getHeader())
|
||||
let $ = load(content)
|
||||
this.vodList = await this.parseVodShortListFromDocBySearch($)
|
||||
let x = 0
|
||||
}
|
||||
async setPlay(flag, id, flags) {
|
||||
let id_list = id.split("+")
|
||||
id = id_list[1]
|
||||
let content = id_list[0] + "\n\n"
|
||||
let $ = await this.getHtml(this.siteUrl + "/novel/pagea/" + id)
|
||||
let bookContentList = $('[class="content"]').text().trim().replaceAll("章节报错 分享给朋友:","").replaceAll(" ","").split("\n")
|
||||
let newBookContentList = []
|
||||
for (const bookContent of bookContentList){
|
||||
if (!_.isEmpty(bookContent.replaceAll(" ",""))){
|
||||
newBookContentList.push(bookContent.replaceAll(" "," "))
|
||||
}
|
||||
}
|
||||
content = content + " " + newBookContentList.join("\n\n")
|
||||
this.playUrl = {"content": content}
|
||||
}
|
||||
}
|
||||
|
||||
let spider = new TTKanSpider()
|
||||
|
||||
async function init(cfg) {
|
||||
await spider.init(cfg)
|
||||
}
|
||||
|
||||
async function home(filter) {
|
||||
return await spider.home(filter)
|
||||
}
|
||||
|
||||
async function homeVod() {
|
||||
return await spider.homeVod()
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
return await spider.category(tid, pg, filter, extend)
|
||||
}
|
||||
|
||||
async function detail(id) {
|
||||
return await spider.detail(id)
|
||||
}
|
||||
|
||||
async function play(flag, id, flags) {
|
||||
return await spider.play(flag, id, flags)
|
||||
}
|
||||
|
||||
async function search(wd, quick) {
|
||||
return await spider.search(wd, quick)
|
||||
}
|
||||
|
||||
async function proxy(segments, headers) {
|
||||
return await spider.proxy(segments, headers)
|
||||
}
|
||||
|
||||
export function __jsEvalReturn() {
|
||||
return {
|
||||
init: init,
|
||||
home: home,
|
||||
homeVod: homeVod,
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
search: search,
|
||||
proxy: proxy
|
||||
};
|
||||
}
|
||||
|
||||
export {spider}
|
||||
@@ -376,6 +376,16 @@
|
||||
},
|
||||
"type": 10
|
||||
},
|
||||
{
|
||||
"key": "ttkan",
|
||||
"name": "📚︎┃天天看小说┃📚︎",
|
||||
"api": "./js/ttkan.js",
|
||||
"timeout": 30,
|
||||
"ext": {
|
||||
"box": "CatOpen"
|
||||
},
|
||||
"type": 10
|
||||
},
|
||||
{
|
||||
"key": "bookan",
|
||||
"name": "🎵┃看书┃🎵",
|
||||
|
||||
+8
-9
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider":"./jar/fan.txt;md5;ccc15f8c3df51befa578c1ce8632359f",
|
||||
"spider":"./jar/fan.txt;md5;2a085160a4140e1697c5d6393901ec7e",
|
||||
"lives":[{"name":"live","type":0,"url":"./tv.txt","playerType":1,"ua":"okhttp/3.15","timeout":20,"epg":"https://epg.112114.xyz/?ch={name}&date={date}","logo":"https://logo.tycng.com/{name}.png"}],
|
||||
"wallpaper":"https://qist.cc/liveing/api.php",
|
||||
"sites":[
|
||||
@@ -12,22 +12,21 @@
|
||||
{"key":"短剧","name":"🌈上头┃短剧","type":3,"api":"csp_Djuu","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"酷看","name":"💡酷看┃秒播","type":3,"api":"csp_Kkys","timeout":15,"searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"原创","name":"☀原创┃无广","type":3,"api":"csp_YCyz","timeout":15,"searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"苹果","name":"🍎苹果┃不卡","type":3,"api":"csp_LiteApple","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"白嫖","name":"👻白飘┃不卡","type":3,"api":"csp_BaiPiao","playerType":2,"searchable":1,"quickSearch":1,"changeable":1,"ext": "https://www.baipiaoys.com:9092/"},
|
||||
{"key":"小点","name":"💥小点┃多线","type":3,"api":"csp_Xdys","searchable":1,"quickSearch":1,"filterable":1,"changeable":0},
|
||||
{"key":"视觉","name":"👓视觉┃多线","type":3,"api":"csp_Xinsj","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.80yy3.com/"},
|
||||
{"key":"厂长","name":"📔厂长┃不卡","type":3,"api":"csp_NewCz","timeout":15,"playerType":2,"searchable":1,"quickSearch":1,"changeable":1,"ext": "https://www.czys.top/"},
|
||||
{"key":"视觉","name":"👓视觉┃多线","type":3,"api":"csp_Xinsj","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.80yy3.com/"},
|
||||
{"key":"南瓜","name":"🎃南瓜┃多线","type":3,"api":"csp_NanGua","timeout":15,"playerType":2,"searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"苹果","name":"🍎苹果┃不卡","type":3,"api":"csp_LiteApple","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"糯米","name":"🍙糯米┃秒播","type":3,"api":"csp_Nmys","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"./FTY/nmys.json"},
|
||||
{"key":"低端","name":"⏮️低端┃外剧","type":3,"api":"csp_Ddrk","playerType":"2","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"小点","name":"💥小点┃多线","type":3,"api":"csp_Xdys","searchable":1,"quickSearch":1,"filterable":1,"changeable":0},
|
||||
{"key":"热播","name":"📺热播┃多线","type":3,"api":"csp_AppTT","timeout":15,"playerType":2,"searchable":1,"quickSearch":1,"changeable":1,"ext":"AO7TcBkd8I/B5wQc4Qma+pU="},
|
||||
{"key":"毛驴","name":"🍓毛驴┃多线","type":3,"api":"csp_MLYS","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.maolvys.com/"},
|
||||
{"key":"萌米","name":"👀萌米┃多线","type":3,"api":"csp_AppTT","timeout":15,"playerType":1,"ext":"AO7TcBkd8Iifux0Y8Qze6tVlMg=="},
|
||||
{"key":"比特","name":"🍄比特┃秒播","type":3,"api":"csp_Bttwoo","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"贱贱","name":"🐭贱贱┃P2P","type":3,"searchable":1,"quickSearch":1,"changeable":1,"playerType":"1","api":"./FTY/drpy2.min.js","ext":"./FTY/jp.js"},
|
||||
{"key":"zxzj","name":"🍊在线┃外剧","type":3,"api":"csp_Zxzj","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.zxzjhd.com/"},
|
||||
{"key":"低端","name":"⏮️低端┃外剧","type":3,"api":"csp_Ddrk","playerType":"2","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"毛驴","name":"🍓毛驴┃多线","type":3,"api":"csp_MLYS","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.maolvys.com/"},
|
||||
{"key":"比特","name":"🍄比特┃秒播","type":3,"api":"csp_Bttwoo","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"Lib","name": "🌟立播┃无广","type": 3,"api": "csp_Libvio","timeout":15,"searchable": 1,"quickSearch": 1,"changeable":1,"ext":"https://www.libvio.pw/"},
|
||||
{"key":"Auete","name":"🏝奥特┃无广","type": 3,"api":"csp_Auete","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://auete.pro/"},
|
||||
{"key":"贱贱","name":"🐭贱贱┃P2P","type":3,"searchable":1,"quickSearch":1,"changeable":1,"playerType":"1","api":"./FTY/drpy2.min.js","ext":"./FTY/jp.js"},
|
||||
{"key":"新6V","name":"🧲新6V┃磁力","type":3,"api":"csp_SixV","searchable":1,"quickSearch":1,"changeable":0,"ext": "http://www.xb6v.com/"},
|
||||
{"key":"Dm84","name":"🚌巴士┃动漫","type":3,"api":"csp_Dm84","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"Ying","name":"💮樱花┃动漫","type":3,"api":"csp_Ying","searchable":1,"quickSearch":1,"changeable":1},
|
||||
|
||||
BIN
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider":"./jar/fan.txt;md5;ccc15f8c3df51befa578c1ce8632359f",
|
||||
"spider":"./jar/fan.txt;md5;2a085160a4140e1697c5d6393901ec7e",
|
||||
"lives":[
|
||||
{"name":"live","type":0,"url":"https://epg.pw/test_channels.m3u","playerType":1,"ua":"okhttp/3.15","timeout":20,"epg":"https://epg.112114.xyz/?ch={name}&date={date}","logo":"https://epg.112114.xyz/logo/{name}.png"},
|
||||
{"name":"ipv6","type":0,"url":"./tvboxtv.txt","playerType":1,"ua":"okhttp/3.15","timeout":20,"epg":"https://epg.112114.xyz/?ch={name}&date={date}","logo":"https://epg.112114.xyz/logo/{name}.png"}
|
||||
@@ -15,22 +15,21 @@
|
||||
{"key":"短剧","name":"🌈上头┃短剧","type":3,"api":"csp_Djuu","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"酷看","name":"💡酷看┃秒播","type":3,"api":"csp_Kkys","timeout":15,"searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"原创","name":"☀原创┃无广","type":3,"api":"csp_YCyz","timeout":15,"searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"苹果","name":"🍎苹果┃不卡","type":3,"api":"csp_LiteApple","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"白嫖","name":"👻白飘┃不卡","type":3,"api":"csp_BaiPiao","playerType":2,"searchable":1,"quickSearch":1,"changeable":1,"ext": "https://www.baipiaoys.com:9092/"},
|
||||
{"key":"小点","name":"💥小点┃多线","type":3,"api":"csp_Xdys","searchable":1,"quickSearch":1,"filterable":1,"changeable":0},
|
||||
{"key":"视觉","name":"👓视觉┃多线","type":3,"api":"csp_Xinsj","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.80yy3.com/"},
|
||||
{"key":"厂长","name":"📔厂长┃不卡","type":3,"api":"csp_NewCz","timeout":15,"playerType":2,"searchable":1,"quickSearch":1,"changeable":1,"ext": "https://www.czys.top/"},
|
||||
{"key":"视觉","name":"👓视觉┃多线","type":3,"api":"csp_Xinsj","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.80yy3.com/"},
|
||||
{"key":"南瓜","name":"🎃南瓜┃多线","type":3,"api":"csp_NanGua","timeout":15,"playerType":2,"searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"苹果","name":"🍎苹果┃不卡","type":3,"api":"csp_LiteApple","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"糯米","name":"🍙糯米┃秒播","type":3,"api":"csp_Nmys","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"./FTY/nmys.json"},
|
||||
{"key":"低端","name":"⏮️低端┃外剧","type":3,"api":"csp_Ddrk","playerType":"2","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"小点","name":"💥小点┃多线","type":3,"api":"csp_Xdys","searchable":1,"quickSearch":1,"filterable":1,"changeable":0},
|
||||
{"key":"热播","name":"📺热播┃多线","type":3,"api":"csp_AppTT","timeout":15,"playerType":2,"searchable":1,"quickSearch":1,"changeable":1,"ext":"AO7TcBkd8I/B5wQc4Qma+pU="},
|
||||
{"key":"毛驴","name":"🍓毛驴┃多线","type":3,"api":"csp_MLYS","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.maolvys.com/"},
|
||||
{"key":"萌米","name":"👀萌米┃多线","type":3,"api":"csp_AppTT","timeout":15,"playerType":1,"ext":"AO7TcBkd8Iifux0Y8Qze6tVlMg=="},
|
||||
{"key":"比特","name":"🍄比特┃秒播","type":3,"api":"csp_Bttwoo","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"贱贱","name":"🐭贱贱┃P2P","type":3,"searchable":1,"quickSearch":1,"changeable":1,"playerType":"1","api":"./FTY/drpy2.min.js","ext":"./FTY/jp.js"},
|
||||
{"key":"zxzj","name":"🍊在线┃外剧","type":3,"api":"csp_Zxzj","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.zxzjhd.com/"},
|
||||
{"key":"低端","name":"⏮️低端┃外剧","type":3,"api":"csp_Ddrk","playerType":"2","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"毛驴","name":"🍓毛驴┃多线","type":3,"api":"csp_MLYS","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://www.maolvys.com/"},
|
||||
{"key":"比特","name":"🍄比特┃秒播","type":3,"api":"csp_Bttwoo","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"Lib","name": "🌟立播┃无广","type": 3,"api": "csp_Libvio","timeout":15,"searchable": 1,"quickSearch": 1,"changeable":1,"ext":"https://www.libvio.pw/"},
|
||||
{"key":"Auete","name":"🏝奥特┃无广","type": 3,"api":"csp_Auete","timeout":15,"searchable":1,"quickSearch":1,"changeable":1,"ext":"https://auete.pro/"},
|
||||
{"key":"贱贱","name":"🐭贱贱┃P2P","type":3,"searchable":1,"quickSearch":1,"changeable":1,"playerType":"1","api":"./FTY/drpy2.min.js","ext":"./FTY/jp.js"},
|
||||
{"key":"新6V","name":"🧲新6V┃磁力","type":3,"api":"csp_SixV","searchable":1,"quickSearch":1,"changeable":0,"ext": "http://www.xb6v.com/"},
|
||||
{"key":"Dm84","name":"🚌巴士┃动漫","type":3,"api":"csp_Dm84","searchable":1,"quickSearch":1,"changeable":1},
|
||||
{"key":"Ying","name":"💮樱花┃动漫","type":3,"api":"csp_Ying","searchable":1,"quickSearch":1,"changeable":1},
|
||||
|
||||
Reference in new issue
Block a user