Delete 139cloud/caiyun-1.0.0-alpha.7.mjs

This commit is contained in:
hlt1995 authored and GitHub committed 2025-11-08 09:38:17 +08:00
1 parent 5c7e5f5fe1
commit ba9dc30c05
1 file changed
-491
-491
View File
@@ -1,491 +0,0 @@
import{createRequire}from'module';if(!globalThis.require)globalThis.require=createRequire(import.meta.url);
var n2=Object.create;var Ya=Object.defineProperty;var o2=Object.getOwnPropertyDescriptor;var u2=Object.getOwnPropertyNames;var c2=Object.getPrototypeOf,l2=Object.prototype.hasOwnProperty;var M=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var k=(s,e)=>()=>(s&&(e=s(s=0)),e);var O=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),pr=(s,e)=>{for(var t in e)Ya(s,t,{get:e[t],enumerable:!0})},rf=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u2(e))!l2.call(s,r)&&r!==t&&Ya(s,r,{get:()=>e[r],enumerable:!(i=o2(e,r))||i.enumerable});return s};var Dt=(s,e,t)=>(t=s!=null?n2(c2(s)):{},rf(e||!s||!s.__esModule?Ya(t,"default",{value:s,enumerable:!0}):t,s)),p2=s=>rf(Ya({},"__esModule",{value:!0}),s);var h=k(()=>{});var hr,h2,d2,uu,cu,af,ui,nf,of,dr=k(()=>{h();hr="12.0.1",h2="7.15.3",d2="8.3.3.20250521",uu=`1|127.0.0.1|1|${hr}|Xiaomi|22041216C||02-00-00-00-00-00|android 14|1080X2360|zh||||032|0|`,cu=`||9|${h2}|firefox|139.0|||linux unknow||zh-CN|||`,af=`||11|${d2}|PC|TGktMjAyNDA5MTcxMDA2||| Windows 11 (11.0)|1920X1020|Q2hpbmVzZSAoU2ltcGxpZmllZCk=|||`,ui=uu,nf="Mozilla/5.0 (Linux; Android 14; 22041216C Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/128.0.6613.88 Mobile Safari/537.36",of="1"});var Yt,ci,Qa,Za,lu,pu,fr,kt,en,qe=k(()=>{h();Yt="https://caiyun.feixin.10086.cn",ci="https://caiyun.feixin.10086.cn/market",Qa="https://html5.mail.10086.cn/mw2/together/s",Za="https://caiyun.feixin.10086.cn/market/lanternriddles/answeredPuzzles",lu="https://ai.yun.139.com",pu="https://yun.139.com/mrpInfo/ycloud/aixt",fr="https://cpactiv.buy.139.com/cloudphone-market",kt={AI_CLOUND_NUM:"ai_cloud_num",USER_ID:"user_id",SHARE_FIND:"share_find"},en={web:"10000034",pc:"10200153",android:"10000023"}});function uf(s){return s.post("https://personal-kd-njs.yun.139.com/hcy/file/list",{pageInfo:{pageSize:100,pageCursor:null},orderBy:"updated_at",orderDirection:"DESC",parentFileId:"/",imageThumbnailStyleList:["Small","Large"]},{headers:{"x-yun-api-version":"v1","x-yun-app-channel":"10000034","x-yun-client-info":"||9|7.13.6|edge||||linux unknow||zh-CN|||ZWRnZQ==||"}})}function cf(s,e,t){return s.post("https://yun.139.com/orchestration/personalCloud/catalog/v1.0/getDisk",{commonAccountInfo:{account:String(e)},catalogID:t,catalogType:-1,sortDirection:1,catalogSortType:0,contentSortType:0,filterType:0,startNumber:1,endNumber:100})}function hu({channelSrc:s="10000023",opType:e}){let t={"x-yun-api-version":"v1","x-yun-app-channel":s,"x-yun-op-type":"1"};if(s===en.pc)return console.log(`使用 PC 客户端上传文件,channelSrc: ${s}, opType: ${e}`),{...t,"x-yun-market-source":"001","x-yun-module-type":"100","x-yun-op-type":"1","x-yun-svc-type":"1","x-yun-client-info":af,"User-Agent":"Mozilla/5.0"};if(s===en.android){let i=e==="backup"?2:1;return{...t,"x-huawei-channelSrc":s,"x-yun-client-info":uu,"x-yun-op-type":i.toString(),"x-yun-sub-op-type":(i*100).toString()}}return{...t,"x-huawei-channelSrc":s||en.web,"x-yun-client-info":cu,"x-yun-device-id":cu}}function lf(s,{name:e,parentFileId:t,contentHash:i,size:r,channelSrc:a,opType:n}){return s.post("https://personal-kd-njs.yun.139.com/hcy/file/create",{parentFileId:t||"/",name:e,type:"file",size:r,fileRenameMode:"auto_rename",contentHash:i,contentHashAlgorithm:"SHA256",contentType:"application/oct-stream",parallelUpload:!1,partInfos:[{parallelHashCtx:{partOffset:0},partNumber:1,partSize:r}]},{headers:{...hu({channelSrc:a,opType:n})}})}function pf(s,{channelSrc:e,fileId:t,uploadId:i,contentHash:r,opType:a}){return s.post("https://personal-kd-njs.yun.139.com/hcy/file/complete",{fileId:t,uploadId:i,contentHash:r,contentHashAlgorithm:"SHA256"},{headers:{...hu({channelSrc:e,opType:a})}})}function hf(s,e,t){return s.put(e,t,{headers:{"content-type":"application/octet-stream",origin:"https://yun.139.com",referer:"https://yun.139.com/"},clearHeaders:!0,hooks:[]})}function df(s,e){return s.post("https://personal-kd-njs.yun.139.com/hcy/recyclebin/batchTrash",{fileIds:e},{headers:{...hu({channelSrc:"10000034"})}})}var tn=k(()=>{h();dr();qe()});function Ke(s,e="-"){return Array.isArray(s)?s.map(t=>Ke(t,e)).join(e):Array.from({length:s}).map(()=>Math.floor(Math.random()*16).toString(16)).join("")}function ut(s,e=s){return Math.floor(Math.random()*(e-s)+s)}function ff(s){return Array.from({length:s}).reduce(e=>{let t=Math.floor(Math.random()*62);return e+String.fromCharCode(t+(t<10?48:t<36?55:61))},"")}function mf(s,e){if(!s.match)return"";let t=s.match(`<${e}>(.*)</${e}>`);return t?t[1]:""}async function sn(s,e,t){let i=s.length;for(let r=0;r<i;r++){let a=s[r];await e(a),r<i-1&&t&&await t()}}function du(s,e,t){return Reflect.has(s,e)?Reflect.set(s,e,Reflect.get(s,e).concat(t)):Reflect.set(s,e,t)}function rn(s){s=s.replace("Basic ",""),s=f2(s);let e=BufferLine truncated
`)),r.args.push(`
`+r.additional.join(`
`)),delete r.additional),r.type=typeof r.type=="string"?r.type.toLowerCase():"log",r.tag=typeof r.tag=="string"?r.tag:"";let a=(o=!1)=>{let u=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&u>0){let c=[...this._lastLog.object.args];u>1&&c.push(`(repeated ${u} times)`),this._log({...this._lastLog.object,args:c}),this._lastLog.count=1}o&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);let n=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,n<this.options.throttle)try{let o=JSON.stringify([r.type,r.tag,r.args]),u=this._lastLog.serialized===o;if(this._lastLog.serialized=o,u&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(a,this.options.throttle);return}}catch{}a(!0)}_log(e){for(let t of this.options.reporters)t.log(e,{options:this.options})}};_e.prototype.add=_e.prototype.addReporter;_e.prototype.remove=_e.prototype.removeReporter;_e.prototype.clear=_e.prototype.removeReporter;_e.prototype.withScope=_e.prototype.withTag;_e.prototype.mock=_e.prototype.mockTypes;_e.prototype.pause=_e.prototype.pauseLogs;_e.prototype.resume=_e.prototype.resumeLogs});import{formatWithOptions as im}from"node:util";import{sep as V2}from"node:path";function ju(s,e){let t=process.cwd()+V2;return s.split(`
`).splice(e.split(`
`).length).map(r=>r.trim().replace("file://","").replace(t,""))}function W2(s,e){return(e.__write||e.write).call(e,s)}var Au,yr,rm=k(()=>{h();Au=s=>s?`[${s}]`:"",yr=class{formatStack(e,t,i){let r=" ".repeat((i?.errorLevel||0)+1);return r+ju(e,t).join(`
${r}`)}formatError(e,t){let i=e.message??im(t,e),r=e.stack?this.formatStack(e.stack,i,t):"",a=t?.errorLevel||0,n=a>0?`${" ".repeat(a)}[cause]: `:"",o=e.cause?`
`+this.formatError(e.cause,{...t,errorLevel:a+1}):"";return n+i+`
`+r+o}formatArgs(e,t){let i=e.map(r=>r&&typeof r.stack=="string"?this.formatError(r,t):r);return im(t,...i)}formatDate(e,t){return t.date?e.toLocaleTimeString():""}filterAndJoin(e){return e.filter(Boolean).join(" ")}formatLogObj(e,t){let i=this.formatArgs(e.args,t);return e.type==="box"?`
`+[Au(e.tag),e.title&&e.title,...i.split(`
`)].filter(Boolean).map(r=>" > "+r).join(`
`)+`
`:this.filterAndJoin([Au(e.type),Au(e.tag),i])}log(e,t){let i=this.formatLogObj(e,{columns:t.options.stdout.columns||0,...t.options.formatOptions});return W2(i+`
`,e.level<2?t.options.stderr||process.stderr:t.options.stdout||process.stdout)}}});import*as hn from"node:tty";function cm(s,e,t,i,r=e.slice(0,Math.max(0,s))+i,a=e.slice(Math.max(0,s+t.length)),n=a.indexOf(t)){return r+(n<0?a:cm(n,a,t,i))}function eS(s,e,t,i,r){return s<0?t+e+i:t+cm(s,e,i,r)+i}function tS(s,e,t=s,i=s.length+1){return r=>r||!(r===""||r===void 0)?eS((""+r).indexOf(e,i),r,s,e,t):""}function re(s,e,t){return tS(`\x1B[${s}m`,`\x1B[${e}m`,t)}function sS(s=Z2){return s?am:Object.fromEntries(Object.keys(am).map(e=>[e,String]))}function iS(s,e="reset"){return Xe[s]||Xe[e]}function fs(s){return s.replace(new RegExp(rS,"g"),"")}function lm(s,e={}){let t={...e,style:{...aS,...e.style}},i=s.split(`
`),r=[],a=iS(t.style.borderColor),n={...typeof t.style.borderStyle=="string"?nm[t.style.borderStyle]||nm.solid:t.style.borderStyle};if(a)for(let m in n)n[m]=a(n[m]);let o=t.style.padding%2===0?t.style.padding:t.style.padding+1,u=i.length+o,c=Math.max(...i.map(m=>fs(m).length),t.title?fs(t.title).length:0)+o,l=c+o,p=t.style.marginLeft>0?" ".repeat(t.style.marginLeft):"";if(t.style.marginTop>0&&r.push("".repeat(t.style.marginTop)),t.title){let m=a?a(t.title):t.title,f=n.h.repeat(Math.floor((c-fs(t.title).length)/2)),g=n.h.repeat(c-fs(t.title).length-fs(f).length+o);r.push(`${p}${n.tl}${f}${m}${g}${n.tr}`)}else r.push(`${p}${n.tl}${n.h.repeat(l)}${n.tr}`);let d=t.style.valign==="center"?Math.floor((u-i.length)/2):t.style.valign==="top"?u-i.length-o:u-i.length;for(let m=0;m<u;m++)if(m<d||m>=d+i.length)r.push(`${p}${n.v}${" ".repeat(l)}${n.v}`);else{let f=i[m-d],g=" ".repeat(o),y=" ".repeat(c-fs(f).length);r.push(`${p}${n.v}${g}${f}${y}${n.v}`)}return r.push(`${p}${n.bl}${n.h.repeat(l)}${n.br}`),t.style.marginBottom>0&&r.push("".repeat(t.style.marginBottom)),r.join(`
`)}var ms,om,G2,K2,J2,X2,um,Y2,Q2,Z2,am,Xe,rS,nm,aS,pm=k(()=>{h();({env:ms={},argv:om=[],platform:G2=""}=typeof process>"u"?{}:process),K2="NO_COLOR"in ms||om.includes("--no-color"),J2="FORCE_COLOR"in ms||om.includes("--color"),X2=G2==="win32",um=ms.TERM==="dumb",Y2=hn&&hn.isatty&&hn.isatty(1)&&ms.TERM&&!um,Q2="CI"in ms&&("GITHUB_ACTIONS"in ms||"GITLAB_CI"in ms||"CIRCLECI"in ms),Z2=!K2&&(J2||X2&&!um||Y2||Q2);am={reset:re(0,0),bold:re(1,22,"\x1B[22m\x1B[1m"),dim:re(2,22,"\x1B[22m\x1B[2m"),italic:re(3,23),underline:re(4,24),inverse:re(7,27),hidden:re(8,28),strikethrough:re(9,29),black:re(30,39),red:re(31,39),green:re(32,39),yellow:re(33,39),blue:re(34,39),magenta:re(35,39),cyan:re(36,39),white:re(37,39),gray:re(90,39),bgBlack:re(40,49),bgRed:re(41,49),bgGreen:re(42,49),bgYellow:re(43,49),bgBlue:re(44,49),bgMagenta:re(45,49),bgCyan:re(46,49),bgWhite:re(47,49),blackBright:re(90,39),redBright:re(91,39),greenBright:re(92,39),yellowBright:re(93,39),blueBright:re(94,39),magentaBright:re(95,39),cyanBright:re(96,39),whiteBright:re(97,39),bgBlackBright:re(100,49),bgRedBright:re(101,49),bgGreenBright:re(102,49),bgYellowBright:re(103,49),bgBlueBright:re(104,49),bgMagentaBright:re(105,49),bgCyanBright:re(106,49),bgWhiteBright:re(107,49)};Xe=sS();rS=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");nm={solid:{tl:"┌",tr:"┐",bl:"└",br:"┘",h:"─",v:"│"},double:{tl:"╔",tr:"╗",bl:"╚",br:"╝",h:"═",v:"║"},doubleSingle:{tl:"╓",tr:"╖",bl:"╙",br:"╜",h:"─",v:"║"},doubleSingleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"║"},singleThick:{tl:"┏",tr:"┓",bl:"┗",br:"┛",h:"━",v:"┃"},singleDouble:{tl:"╒",tr:"╕",bl:"╘",br:"╛",h:"═",v:"│"},singleDoubleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"═",v:"│"},rounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"│"}},aS={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var _m={};pr(_m,{kCancel:()=>Fm,prompt:()=>Im});import vt,{stdin as nS,stdout as oS}from"node:process";import hm from"node:readline";import{WriteStream as uS}from"node:tty";function cS(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function lS(){if(dm)return Pu;dm=1;let s="\x1B",e=`${s}[`,t="\x07",i={to(n,o){return o?`${e}${o+1};${n+1}H`:`${e}${n+1}G`},move(n,o){let u="";return n<0?u+=`${e}${-n}D`:n>0&&(u+=`${e}${n}C`),o<0?u+=`${e}${-o}A`:o>0&&(u+=`${e}${o}B`),u},up:(n=1)=>`${e}${n}A`,down:(n=1)=>`${e}${n}B`,forward:(n=1)=>`${e}${n}C`,backward:(n=1)=>`${e}${n}D`,nextLine:(n=1)=>`${e}E`.repeat(n),prevLine:(n=1)=>`${e}F`.repeat(n),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:`${s}7`,restore:`${s}8`},r={up:(n=1)=>`${e}S`.repeat(n),down:(n=1)=>`${e}T`.repeat(n)},a={screen:`${e}2J`,up:(n=1)=>`${e}1J`.repeat(n),down:(n=1)=>`${e}J`.repeat(n),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(n){let o="";for(let u=0;u<n;u++)o+=this.line+(u<n-1?i.up():"");return n&&(o+=i.left),o}};return Pu={cursor:i,scroll:r,erase:a,beep:t},Pu}function pS(){if(fm)return dn.exports;fm=1;let s=process||{},e=s.argv||[],t=s.env||{},i=!(t.NO_COLOR||e.includes("--no-color"))&&(!!t.FORCE_COLOR||e.includes("--color")||s.platform==="win32"||(s.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),r=(o,u,c=o)=>l=>{let p=""+l,d=p.indexOf(u,o.length);return~d?o+a(p,u,c,d)+u:o+p+u},a=(o,u,c,l)=>{let p="",d=0;do p+=o.substring(d,l)+c,d=l+u.length,l=o.indexOf(u,d);while(~l);return p+o.substring(d)},n=(o=i)=>{let u=o?r:()=>String;return{isColorSupported:o,reset:u("\x1B[0m","\x1B[0m"),bold:u("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:u("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:u("\x1B[3m","\x1B[23m"),underline:u("\x1B[4m","\x1B[24m"),inverse:u("\x1B[7m","\x1B[27m"),hidden:u("\x1B[8m","\x1B[28m"),strikethrough:u("\x1B[9m","\x1B[29m"),black:u("\x1B[30m","\x1B[39m"),red:u("\x1B[31m","\x1B[39m"),green:u("\x1B[32m","\x1B[39m"),yellow:u("\x1B[33m","\x1B[39m"),blue:u("\x1B[34m","\x1B[39m"),magenta:u("\x1B[35m","\x1B[39m"),cyan:u("\x1B[36m","\x1B[39m"),white:u("\x1B[37m","\x1B[39m"),gray:u("\x1B[90m","\x1B[39m"),bgBlack:u("\x1B[40m","\x1B[49m"),bgRed:u("\x1B[41m","\x1B[49m"),bgGreen:u("\x1B[42m","\x1B[49m"),bgYellow:u("\x1B[43m","\x1B[49m"),bgBlue:u("\x1B[44m","\x1B[49m"),bgMagenta:u("\x1B[45m","\x1B[49m"),bgCyan:u("\x1B[46m","\x1B[49m"),bgWhite:u("\x1B[47m","\x1B[49m"),blackBright:u("\x1B[90m","\x1B[39m"),redBright:u("\x1B[91m","\x1B[39m"),greenBright:u("\x1B[92m","\x1B[39m"),yellowBright:u("\x1B[93m","\x1B[39m"),blueBright:u("\x1B[94m","\x1B[39m"),magentaBright:u("\x1B[95m","\x1B[39m"),cyanBright:u("\x1B[96m","\x1B[39m"),whiteBright:u("\x1B[97m","\x1B[39m"),bgBlackBright:u("\x1B[100m","\x1B[49m"),bgRedBright:u("\x1B[101m","\x1B[49m"),bgGreenBright:u("\x1B[102m","\x1B[49m"),bgYellowBright:u("\x1B[103m","\x1B[49m"),bgBlueBright:u("\x1B[10 Line truncated
`).split(`
`).map(i=>SS(i,e,t)).join(`
`)}function Pm(s,e){if(typeof s=="string")return mn.aliases.get(s)===e;for(let t of s)if(t!==void 0&&Pm(t,e))return!0;return!1}function jS(s,e){if(s===e)return;let t=s.split(`
`),i=e.split(`
`),r=[];for(let a=0;a<Math.max(t.length,i.length);a++)t[a]!==i[a]&&r.push(a);return r}function fn(s,e){let t=s;t.isTTY&&t.setRawMode(e)}function LS(){return vt.platform!=="win32"?vt.env.TERM!=="linux":!!vt.env.CI||!!vt.env.WT_SESSION||!!vt.env.TERMINUS_SUBLIME||vt.env.ConEmuTask==="{cmd::Cmder}"||vt.env.TERM_PROGRAM==="Terminus-Sublime"||vt.env.TERM_PROGRAM==="vscode"||vt.env.TERM==="xterm-256color"||vt.env.TERM==="alacritty"||vt.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function Im(s,e={}){let t=i=>{if(typeof i!="symbol"||i.toString()!=="Symbol(clack:cancel)")return i;switch(e.cancel){case"reject":{let r=new Error("Prompt cancelled.");throw r.name="ConsolaPromptCancelledError",Error.captureStackTrace&&Error.captureStackTrace(r,Im),r}case"undefined":return;case"null":return null;case"symbol":return Fm;default:case"default":return e.default??e.initial}};if(!e.type||e.type==="text")return await VS({message:s,defaultValue:e.default,placeholder:e.placeholder,initialValue:e.initial}).then(t);if(e.type==="confirm")return await WS({message:s,initialValue:e.initial}).then(t);if(e.type==="select")return await GS({message:s,options:e.options.map(i=>typeof i=="string"?{value:i,label:i}:i),initialValue:e.initial}).then(t);if(e.type==="multiselect")return await KS({message:s,options:e.options.map(i=>typeof i=="string"?{value:i,label:i}:i),required:e.required,initialValues:e.initial}).then(t);throw new Error(`Unknown prompt type: ${e.type}`)}var Pu,dm,Et,dn,fm,hS,z,fS,Sm,mS,gS,yS,xS,Fu,mm,gm,ym,ve,bS,wS,kS,gn,vS,Mu,Am,ES,jm,Ru,xm,bm,CS,Iu,TS,SS,AS,mn,Dm,PS,FS,ct,di,_u,IS,_S,km,NS,BS,OS,vm,Nu,Bu,zS,Ct,MS,RS,qS,US,xe,fi,Ou,Lu,HS,Em,$S,yn,zu,VS,WS,GS,KS,Fm,Nm=k(()=>{h();Et=lS(),dn={exports:{}};hS=pS(),z=cS(hS);fS=dS();Sm={exports:{}};(function(s){var e={};s.exports=e,e.eastAsianWidth=function(i){var r=i.charCodeAt(0),a=i.length==2?i.charCodeAt(1):0,n=r;return 55296<=r&&r<=56319&&56320<=a&&a<=57343&&(r&=1023,a&=1023,n=r<<10|a,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924< Line truncated
`)];for(let[c,l]of u.entries()){if(i+=l,gn.has(l)){let{groups:d}=new RegExp(`(?:\\${Am}(?<code>\\d+)m|\\${Ru}(?<uri>.*)${Mu})`).exec(u.slice(c).join(""))||{groups:{}};if(d.code!==void 0){let m=Number.parseFloat(d.code);r=m===vS?void 0:m}else d.uri!==void 0&&(a=d.uri.length===0?void 0:d.uri)}let p=kS.codes.get(Number(r));u[c+1]===`
`?(a&&(i+=bm("")),r&&p&&(i+=xm(p))):l===`
`&&(r&&p&&(i+=xm(r)),a&&(i+=bm(a)))}return i};AS=["up","down","left","right","space","enter","cancel"],mn={actions:new Set(AS),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");Dm=Symbol("clack:cancel");PS=Object.defineProperty,FS=(s,e,t)=>e in s?PS(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ct=(s,e,t)=>(FS(s,typeof e!="symbol"?e+"":e,t),t),di=class{constructor(e,t=!0){ct(this,"input"),ct(this,"output"),ct(this,"_abortSignal"),ct(this,"rl"),ct(this,"opts"),ct(this,"_render"),ct(this,"_track",!1),ct(this,"_prevFrame",""),ct(this,"_subscribers",new Map),ct(this,"_cursor",0),ct(this,"state","initial"),ct(this,"error",""),ct(this,"value");let{input:i=nS,output:r=oS,render:a,signal:n,...o}=e;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=a.bind(this),this._track=t,this._abortSignal=n,this.input=i,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let i=this._subscribers.get(e)??[];i.push(t),this._subscribers.set(e,i)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let i=this._subscribers.get(e)??[],r=[];for(let a of i)a.cb(...t),a.once&&r.push(()=>i.splice(i.indexOf(a),1));for(let a of r)a()}prompt(){return new Promise((e,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(Dm);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let i=new uS(0);i._write=(r,a,n)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),n()},this.input.pipe(i),this.rl=hm.createInterface({input:this.input,output:i,tabSize:2,prompt:"",escapeCodeTimeout:50}),hm.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),fn(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(Et.cursor.show),this.output.off("resize",this.render),fn(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(Et.cursor.show),this.output.off("resize",this.render),fn(this.input,!1),e(Dm)})})}onKeypress(e,t){if(this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&mn.aliases.has(t.name)&&this.emit("cursor",mn.aliases.get(t.name)),mn.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),t?.name==="return"){if(this.opts.validate){let i=this.opts.validate(this.value);i&&(this.error=i instanceof Error?i.message:i,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Pm([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
`),fn(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=wm(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
`).length-1;this.output.write(Et.cursor.move(-999,e*-1))}render(){let e=wm(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(Et.cursor.hide);else{let t=jS(this._prevFrame,e);if(this.restoreCursor(),t&&t?.length===1){let i=t[0];this.output.write(Et.cursor.move(0,i)),this.output.write(Et.erase.lines(1));let r=e.split(`
`);this.output.write(r[i]),this._prevFrame=e,this.output.write(Et.cursor.move(0,r.length-i-1));return}if(t&&t?.length>1){let i=t[0];this.output.write(Et.cursor.move(0,i)),this.output.write(Et.erase.down());let r=e.split(`
`).slice(i);this.output.write(r.join(`
`)),this._prevFrame=e;return}this.output.write(Et.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},_u=class extends di{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write(Et.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},IS=Object.defineProperty,_S=(s,e,t)=>e in s?IS(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,km=(s,e,t)=>(_S(s,typeof e!="symbol"?e+"":e,t),t),NS=class extends di{constructor(s){super(s,!1),km(this,"options"),km(this,"cursor",0),this.options=s.options,this.value=[...s.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===s.cursorAt),0),this.on("key",e=>{e==="a"&&this.toggleAll()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let s=this.value.length===this.options.length;this.value=s?[]:this.options.map(e=>e.value)}toggleValue(){let s=this.value.includes(this._value);this.value=s?this.value.filter(e=>e!==this._value):[...this.value,this._value]}},BS=Object.defineProperty,OS=(s,e,t)=>e in s?BS(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,vm=(s,e,t)=>(OS(s,typeof e!="symbol"?e+"":e,t),t),Nu=class extends di{constructor(e){super(e,!1),vm(this,"options"),vm(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},Bu=class extends di{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}█`;let e=this.value.slice(0,this.cursor),[t,...i]=this.value.slice(this.cursor);return`${e}${z.inverse(t)}${i.join("")}`}get cursor(){return this._cursor}constructor(e){super(e),this.on("finalize",()=>{this.value||(this.value=e.defaultValue)})}};zS=LS(),Ct=(s,e)=>zS?s:e,MS=Ct("❯",">"),RS=Ct("■","x"),qS=Ct("▲","x"),US=Ct("✔","√"),xe=Ct(""),fi=Ct(""),Ou=Ct("●",">"),Lu=Ct("○"," "),HS=Ct("◻","[•]"),Em=Ct("◼","[+]"),$S=Ct("◻","[ ]"),yn=s=>{switch(s){case"initial":case"active":return z.cyan(MS);case"cancel":return z.red(RS);case"error":return z.yellow(qS);case"submit":return z.green(US)}},zu=s=>{let{cursor:e,options:t,style:i}=s,r=s.maxItems??Number.POSITIVE_INFINITY,a=Math.max(process.stdout.rows-4,0),n=Math.min(a,Math.max(r,5)),o=0;e>=o+n-3?o=Math.max(Math.min(e-n+3,t.length-n),0):e<o+2&&(o=Math.max(e-2,0));let u=n<t.length&&o>0,c=n<t.length&&o+n<t.length;return t.slice(o,o+n).map((l,p,d)=>{let m=p===0&&u,f=p===d.length-1&&c;return m||f?z.dim("..."):i(l,p+o===e)})},VS=s=>new Bu({validate:s.validate,placeholder:s.placeholder,defaultValue:s.defaultValue,initialValue:s.initialValue,render(){let e=`${z.gray(xe)}
${yn(this.state)} ${s.message}
`,t=s.placeholder?z.inverse(s.placeholder[0])+z.dim(s.placeholder.slice(1)):z.inverse(z.hidden("_")),i=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}
${z.yellow(xe)} ${i}
${z.yellow(fi)} ${z.yellow(this.error)}
`;case"submit":return`${e}${z.gray(xe)} ${z.dim(this.value||s.placeholder)}`;case"cancel":return`${e}${z.gray(xe)} ${z.strikethrough(z.dim(this.value??""))}${this.value?.trim()?`
${z.gray(xe)}`:""}`;default:return`${e}${z.cyan(xe)} ${i}
${z.cyan(fi)}
`}}}).prompt(),WS=s=>{let e=s.active??"Yes",t=s.inactive??"No";return new _u({active:e,inactive:t,initialValue:s.initialValue??!0,render(){let i=`${z.gray(xe)}
${yn(this.state)} ${s.message}
`,r=this.value?e:t;switch(this.state){case"submit":return`${i}${z.gray(xe)} ${z.dim(r)}`;case"cancel":return`${i}${z.gray(xe)} ${z.strikethrough(z.dim(r))}
${z.gray(xe)}`;default:return`${i}${z.cyan(xe)} ${this.value?`${z.green(Ou)} ${e}`:`${z.dim(Lu)} ${z.dim(e)}`} ${z.dim("/")} ${this.value?`${z.dim(Lu)} ${z.dim(t)}`:`${z.green(Ou)} ${t}`}
${z.cyan(fi)}
`}}}).prompt()},GS=s=>{let e=(t,i)=>{let r=t.label??String(t.value);switch(i){case"selected":return`${z.dim(r)}`;case"active":return`${z.green(Ou)} ${r} ${t.hint?z.dim(`(${t.hint})`):""}`;case"cancelled":return`${z.strikethrough(z.dim(r))}`;default:return`${z.dim(Lu)} ${z.dim(r)}`}};return new Nu({options:s.options,initialValue:s.initialValue,render(){let t=`${z.gray(xe)}
${yn(this.state)} ${s.message}
`;switch(this.state){case"submit":return`${t}${z.gray(xe)} ${e(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${z.gray(xe)} ${e(this.options[this.cursor],"cancelled")}
${z.gray(xe)}`;default:return`${t}${z.cyan(xe)} ${zu({cursor:this.cursor,options:this.options,maxItems:s.maxItems,style:(i,r)=>e(i,r?"active":"inactive")}).join(`
${z.cyan(xe)} `)}
${z.cyan(fi)}
`}}}).prompt()},KS=s=>{let e=(t,i)=>{let r=t.label??String(t.value);return i==="active"?`${z.cyan(HS)} ${r} ${t.hint?z.dim(`(${t.hint})`):""}`:i==="selected"?`${z.green(Em)} ${z.dim(r)}`:i==="cancelled"?`${z.strikethrough(z.dim(r))}`:i==="active-selected"?`${z.green(Em)} ${r} ${t.hint?z.dim(`(${t.hint})`):""}`:i==="submitted"?`${z.dim(r)}`:`${z.dim($S)} ${z.dim(r)}`};return new NS({options:s.options,initialValues:s.initialValues,required:s.required??!0,cursorAt:s.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
${z.reset(z.dim(`Press ${z.gray(z.bgWhite(z.inverse(" space ")))} to select, ${z.gray(z.bgWhite(z.inverse(" enter ")))} to submit`))}`},render(){let t=`${z.gray(xe)}
${yn(this.state)} ${s.message}
`,i=(r,a)=>{let n=this.value.includes(r.value);return a&&n?e(r,"active-selected"):n?e(r,"selected"):e(r,a?"active":"inactive")};switch(this.state){case"submit":return`${t}${z.gray(xe)} ${this.options.filter(({value:r})=>this.value.includes(r)).map(r=>e(r,"submitted")).join(z.dim(", "))||z.dim("none")}`;case"cancel":{let r=this.options.filter(({value:a})=>this.value.includes(a)).map(a=>e(a,"cancelled")).join(z.dim(", "));return`${t}${z.gray(xe)} ${r.trim()?`${r}
${z.gray(xe)}`:""}`}case"error":{let r=this.error.split(`
`).map((a,n)=>n===0?`${z.yellow(fi)} ${z.yellow(a)}`:` ${a}`).join(`
`);return`${t+z.yellow(xe)} ${zu({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:i}).join(`
${z.yellow(xe)} `)}
${r}
`}default:return`${t}${z.cyan(xe)} ${zu({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:i}).join(`
${z.cyan(xe)} `)}
${z.cyan(fi)}
`}}}).prompt()};`${z.gray(xe)}`;Fm=Symbol.for("cancel")});var Um={};pr(Um,{Consola:()=>_e,LogLevels:()=>Be,LogTypes:()=>pn,consola:()=>IA,createConsola:()=>qm,default:()=>IA});import Bm from"node:process";function YS(){if(globalThis.process?.env)for(let s of XS){let e=s[1]||s[0];if(globalThis.process?.env[e])return{name:s[0].toLowerCase(),...s[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}function Rs(s){return s?s!=="false":!1}function pA(){let s=lA.find(e=>e[0]);if(s)return{name:s[1]}}function dA({onlyFirst:s=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,s?void 0:"g")}function mA(s){if(typeof s!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(fA,"")}function gA(s){return s===161||s===164||s===167||s===168||s===170||s===173||s===174||s>=176&&s<=180||s>=182&&s<=186||s>=188&&s<=191||s===198||s===208||s===215||s===216||s>=222&&s<=225||s===230||s>=232&&s<=234||s===236||s===237||s===240||s===242||s===243||s>=247&&s<=250||s===252||s===254||s===257||s===273||s===275||s===283||s===294||s===295||s===299||s>=305&&s<=307||s===312||s>=319&&s<=322||s===324||s>=328&&s<=331||s===333||s===338||s===339||s===358||s===359||s===363||s===462||s===464||s===466||s===468||s===470||s===472||s===474||s===476||s===593||s===609||s===708||s===711||s>=713&&s<=715||s===717||s===720||s>=728&&s<=731||s===733||s===735||s>=768&&s<=879||s>=913&&s<=929||s>=931&&s<=937||s>=945&&s<=961||s>=963&&s<=969||s===1025||s>=1040&&s<=1103||s===1105||s===8208||s>=8211&&s<=8214||s===8216||s===8217||s===8220||s===8221||s>=8224&&s<=8226||s>=8228&&s<=8231||s===8240||s===8242||s===8243||s===8245||s===8251||s===8254||s===8308||s===8319||s>=8321&&s<=8324||s===8364||s===8451||s===8453||s===8457||s===8467||s===8470||s===8481||s===8482||s===8486||s===8491||s===8531||s===8532||s>=8539&&s<=8542||s>=8544&&s<=8555||s>=8560&&s<=8569||s===8585||s>=8592&&s<=8601||s===8632||s===8633||s===8658||s===8660||s===8679||s===8704||s===8706||s===8707||s===8711||s===8712||s===8715||s===8719||s===8721||s===8725||s===8730||s>=8733&&s<=8736||s===8739||s===8741||s>=8743&&s<=8748||s===8750||s>=8756&&s<=8759||s===8764||s===8765||s===8776||s===8780||s===8786||s===8800||s===8801||s>=8804&&s<=8807||s===8810||s===8811||s===8814||s===8815||s===8834||s===8835||s===8838||s===8839||s===8853||s===8857||s===8869||s===8895||s===8978||s>=9312&&s<=9449||s>=9451&&s<=9547||s>=9552&&s<=9587||s>=9600&&s<=9615||s>=9618&&s<=9621||s===9632||s===9633||s>=9635&&s<=9641||s===9650||s===9651||s===9654||s===9655||s===9660||s===9661||s===9664||s===9665||s>=9670&&s<=9672||s===9675||s>=9678&&s<=9681||s>=9698&&s<=9701||s===9711||s===9733||s===9734||s===9737||s===9742||s===9743||s===9756||s===9758||s===9792||s===9794||s===9824||s===9825||s>=9827&&s<=9829||s>=9831&&s<=9834||s===9836||s===9837||s===9839||s===9886||s===9887||s===9919||s>=9926&&s<=9933||s>=9935&&s<=9939||s>=9941&&s<=9953||s===9955||s===9960||s===9961||s>=9963&&s<=9969||s===9972||s>=9974&&s<=9977||s===9979||s===9980||s===9982||s===9983||s===10045||s>=10102&&s<=10111||s>=11094&&s<=11097||s>=12872&&s<=12879||s>=57344&&s<=63743||s>=65024&&s<=65039||s===65533||s>=127232&&s<=127242||s>=127248&&s<=127277||s>=127280&&s<=127337||s>=127344&&s<=127373||s===127375||s===127376||s>=127387&&s<=127404||s>=917760&&s<=917999||s>=983040&&s<=1048573||s>=1048576&&s<=1114109}function yA(s){return s===12288||s>=65281&&s<=65376||s>=65504&&s<=65510}function xA(s){return s>=4352&&s<=4447||s===8986||s===8987||s===9001||s===9002||s>=9193&&s<=9196||s===9200||s===9203||s===9725||s===9726||s===9748||s===9749||s>=9776&&s<=9783||s>=9800&&s<=9811||s===9855||s>=9866&&s<=9871||s===9875||s===9889||s===9898||s===9899||s===9917||s===9918||s===9924||s===9925||s===9934||s===9940||s===9962||s===9970||s===9971||s===9973||s===9978||s===9981||s===9989||s===9994||s===9995||s===10024||s===10060||s===10062||s>=10067&&s<=10069||s===10071||s>=10133&&s<=10135||s===10160||s===10175||s===11035||s===11036||s===11088||s===11093||s>=11904&&s<=11929||s>=11931&&s<=12019||s>=12032&&s<=12245||s>=12272&&s<=12287||s>=12289&&s<=12350||s>=12353&&s<=12438||s>=12441&&s<=12543||s>=12549&&s<=12591||s>=12593&&s<=12686||s>=12688&&s<=12773||s>=12783&&s<=12830||s>=12832&&s<=12871||s>=12880&&s<=42124||s>=42128&&s<=42182||s>=43360&&s<=43388||s>=44032&&s<=55203||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65106||s>=65108&&s<=65126||s>=65128&&s<=65131||s>=94176&&s<=94180||s===94192||s===94193||s>=94208&&s<=100343||s>=100352&&s<=101589||s>=101631&&s<=101640||s>=110576&&s<=110579||s>=110581&&s<=110587||s===110589||s===110590||s>=110592&&s<=110882||s===110898||s>=110928&&s<=110930||s===110933||s>=110948&&s<=110951||s>=110960&&s<=111355||s>=119552&&s<=119638||s>=119648&&s<=119670|Line truncated
${r}`+ju(e,t).map(a=>" "+a.replace(/^at +/,n=>Xe.gray(n)).replace(/\((.+)\)/,(n,o)=>`(${Xe.cyan(o)})`)).join(`
${r}`)}formatType(e,t,i){let r=TA[e.type]||SA[e.level]||"gray";if(t)return PA(r)(Xe.black(` ${e.type.toUpperCase()} `));let a=typeof Lm[e.type]=="string"?Lm[e.type]:e.icon||e.type;return a?jA(r)(a):""}formatLogObj(e,t){let[i,...r]=this.formatArgs(e.args,t).split(`
`);if(e.type==="box")return lm(xn(i+(r.length>0?`
`+r.join(`
`):"")),{title:e.title?xn(e.title):void 0,style:e.style});let a=this.formatDate(e.date,t),n=a&&Xe.gray(a),o=e.badge??e.level<2,u=this.formatType(e,o,t),c=e.tag?Xe.gray(e.tag):"",l,p=this.filterAndJoin([u,xn(i)]),d=this.filterAndJoin(t.columns?[c,n]:[c]),m=(t.columns||0)-zm(p)-zm(d)-2;if(l=m>0&&(t.columns||0)>=80?p+" ".repeat(m)+d:(d?`${Xe.gray(`[${d}]`)} `:"")+p,l+=xn(r.length>0?`
`+r.join(`
`):""),e.type==="trace"){let f=new Error("Trace: "+e.message);l+=this.formatStack(f.stack||"",f.message)}return o?`
`+l+`
`:l}};IA=qm()});import{createCipheriv as dq,createDecipheriv as fq,createHash as _A,randomBytes as mq,randomUUID as $m}from"node:crypto";function wr(s){return new Promise(e=>setTimeout(()=>e(s),s))}async function qs(s){let{createConsola:e,consola:t}=await Promise.resolve().then(()=>(Hm(),Um));return t.options.level=5,e({level:5,reporters:[{log:({type:i,args:r,level:a,date:n})=>{if(s&&s.pushData){let o=r.reduce((u,c)=>`${u} ${c}`,"").substring(1);s.pushData.push({msg:o,type:i,level:a,date:n})}t[i].apply(t,r)}}]})}function Wm(s,e){return _A(s).update(e).digest("hex")}function Gm(s){return Wm("sha256",s)}function $u(s){return Wm("md5",s)}async function wn({pushData:s,message:e,sendNotify:t,createRequest:i}){if(s.length&&e){if(e.onlyError&&!s.some(a=>a.type==="error"))return;let r=s.filter(a=>a.level<4).map(a=>`[${a.type} ${a.date.toLocaleTimeString()}]${a.msg}`).join(`
`);r&&await t({logger:await qs(),http:{fetch:a=>i().request(a)}},e,e.title||"asign 运行推送",r)}}function Km(s){return(0,Vm.default)(s).format("YYYY-MM-DD HH:mm:ss")}function NA(s,e,t,i,r=""){let a=i===1?"seedMdYYLIZfbCxg":"sekaMdYYLIZfbCfm";return $u(a+s+e+t+r+a)}function ys(s,e=1,t){let i=$m(),r=$m();return{"x-request-id":i,"x-timestamp":s.toString(),"x-nonce":r,"x-signature":NA(i,s,r,e,t)}}var Vm,lt=k(()=>{h();Vm=Dt(Lf(),1);em()});async function BA(s,{name:e,parentFileId:t,channelSrc:i,size:r,ext:a,contentHash:n,...o}){try{r||(r=ut(1,1e3)),e||(e="asign-"+Ke(4)+(a||".png"));let{data:u,code:c,message:l,success:p}=await lf(s.http,{name:e,parentFileId:t,contentHash:n,size:r,channelSrc:i,...o});if(!p)return s.logger.error("上传文件请求失败",c,l),{};let{exist:d,rapidUpload:m,uploadId:f,fileId:g,partInfos:y}=u;return d?(s.logger.debug("文件已存在"),{}):m?(s.logger.debug("急速上传"),du(s.store,"files",[g]),{fileId:g}):{uploadId:f,fileId:g,uploadUrl:y[0].uploadUrl}}catch(u){s.logger.error("上传文件请求异常",u)}return{}}async function Vu(s,e,t){try{let i=Gm(t),r=typeof t=="string"?t.length:t.byteLength,{uploadUrl:a,uploadId:n,fileId:o}=await BA(s,{...e,contentHash:i,size:r});if(!a||!o)return!1;s.logger.debug("别着急,文件上传中。。。");let u=await hf(s.http,a,t);if(a.includes("<"))return s.logger.error("上传文件失败",u),!1;du(s.store,"files",[o]),s.logger.debug("上传文件成功 1");let{success:c,code:l,message:p}=await pf(s.http,{fileId:o,uploadId:n,contentHash:i,channelSrc:e.channelSrc,...e});return c?(s.logger.debug("上传文件成功 2"),!0):(s.logger.error("上传文件失败",l,p),!1)}catch(i){s.logger.error("上传文件异常",i)}return!1}async function xs(s,e){try{let t=Ke(32);return await Vu(s,{...e,parentFileId:"/"},t)}catch(t){s.logger.error("uploadRandomFile 异常",t)}}function Jm(){return"/"}var Xm=k(()=>{h();Pe();lt();tn()});var Dr=k(()=>{h();Nf();Of();Xm()});async function Ym(s,e,t){await HA(s,e.id,e.currstep)&&(await zA(s,e),t.push(e.id),await s.sleep(500))}async function OA(s,e,t){switch(e.id===434&&(s.store.shareCount=eg(e.name),s.logger.debug("shareCount",s.store.shareCount)),e.groupid){case"beiyong1":if(await Ym(s,e,t),e.name.includes("上传")&&(e.name.includes("图")||e.name.includes("照"))){s.logger.debug("尝试完成",e.name),await xs(s);return}case"month":if(e.marketname==="sign_in_3"&&s.store.curMonthBackup===!1&&new Date().getDate()<20){s.logger.debug("跳过任务(未开启备份)",e.name);return}default:{if(jf[e.id]){await Ym(s,e,t);return}if(!Pf.includes(e.id)){await kr(s,e.id);return}}}}function eg(s){return+s.replace("分享文件得云朵<span id='share_title'>","").replace("/7</span>","")}function LA(s,e){let t=eg(e);t>s.store.shareCount&&s.logger.success("分享文件有好礼",t,"天")}async function Wu(s){s.logger.start("------【任务列表】------");let e=await Qm(s),t=[];e.sort((r,a)=>r.id-a.id);for(let r of e)s.config.tasks?.skipTasks?.includes(r.id)||r.state==="FINISH"||r.enable!==1||await OA(s,r,t);let i=[1021];for(let r of await Qm(s)){if(i.includes(r.id))continue;if(r.id===434){LA(s,r.name);continue}r.id===481&&r.currstep===2&&await kr(s,481,"randomCloudTask"),r.id===478&&r.state!=="FINISH"&&await kr(s,478,"randomCloudTask");let a=n=>s.logger.fail(n,`请前往${Ef(r.marketname)}手动完成${Cf(r.groupid)}:${r.name}(${r.id})`);if(t.includes(r.id)){if(r.state==="FINISH"){s.logger.success("成功",r.name);continue}if(r.id===522){r.process===0?a("失败"):s.logger.info(r.name,"本月已经完成",r.process,"次");continue}a("失败");continue}(r.groupid==="month"||r.groupid==="day"||r.groupid==="cloudEmail")&&r.state!=="FINISH"&&a("未完成")}}async function zA(s,e){let t=MA(s);switch(e.id){case 110:case 522:return await t[e.id]?.(s,e.process);default:return await t[e.id]?.(s,e)}}function MA(s){return{113:async e=>{await yu(e),nn(1e3),await xs(e,{channelSrc:"10200153"})},106:e=>xs(e),107:UA,434:KA,110:s.node&&s.node.uploadTask,522:qA,1021:RA}}async function Qm(s){let e=await Zm(s,"sign_in_3"),t=await Zm(s,"newsign_139mail");return e.concat(t)}async function RA(s,e){try{let{out:t}=e.button;if(!t)return;if(t.canReceive===1){s.logger.debug("可以领取通知奖励",e.id),await ie(s,s.api.receiveTask,"领取邮件通知奖励",e.id);return}t.day&&s.logger.debug("邮箱通知已经开启",t.day,"天")}catch(t){s.logger.error("邮件通知异常",t)}}async function qA(s,e){s.logger.info("开始执行每月100次上传任务");for(let t=0;t<s.config.tasks.每月上传任务单日数量&&!(e>=100);t++)await xs(s),await s.sleep(500)}async function Zm(s,e="sign_in_3"){let t=await ie(s,s.api.getTaskList,"获取任务列表",e);return Object.values(t).flat()}async function UA(s){if(!s.config.token){s.logger.info("未配置 authToken,跳过云笔记任务执行");return}let{headers:e}=await xu(s);if(!e||!e.app_auth){s.logger.info("获取鉴权信息失败,跳过云笔记任务执行");return}try{let t=Ke(32);await s.a Line truncated
`).reverse(),n=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split(`
`).reverse();for(;n.length>0&&n[0]===a[0];)a.shift();this.stack=`${this.stack.slice(0,r)}${a.reverse().join(`
`)}${n.reverse().join(`
`)}`}}},vn=class extends Ee{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}},bs=class extends Ee{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}},En=class extends Ee{constructor(e,t){super(e.message,e,t),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}},Tr=class extends Ee{constructor(e,t){super(e.message,e,t),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}},Sr=class extends Ee{timings;event;constructor(e,t,i){super(e.message,e,i),this.name="TimeoutError",this.event=e.event,this.timings=t}},Ar=class extends Ee{constructor(e,t){super(e.message,e,t),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}},Cn=class extends Ee{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}},Tn=class extends Ee{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}}});var ky=O((bc,wc)=>{"use strict";h();Object.defineProperty(bc,"__esModule",{value:!0});function GP(s){return s.encrypted}var xc=(s,e)=>{let t;typeof e=="function"?t={connect:e}:t=e;let i=typeof t.connect=="function",r=typeof t.secureConnect=="function",a=typeof t.close=="function",n=()=>{i&&t.connect(),GP(s)&&r&&(s.authorized?t.secureConnect():s.authorizationError||s.once("secureConnect",t.secureConnect)),a&&s.once("close",t.close)};s.writable&&!s.connecting?n():s.connecting?s.once("connect",n):s.destroyed&&a&&t.close(s._hadError)};bc.default=xc;wc.exports=xc;wc.exports.default=xc});import{errorMonitor as KP}from"events";import{types as JP}from"util";var vy,XP,Ey,Cy=k(()=>{h();vy=Dt(ky(),1),XP=s=>{if(s.timings)return s.timings;let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};s.timings=e;let t=n=>{n.once(KP,()=>{e.error=Date.now(),e.phases.total=e.error-e.start})};t(s);let i=()=>{e.abort=Date.now(),e.phases.total=e.abort-e.start};s.prependOnceListener("abort",i);let r=n=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,JP.isProxy(n))return;let o=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};n.prependOnceListener("lookup",o),(0,vy.default)(n,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(n.removeListener("lookup",o),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};s.socket?r(s.socket):s.prependOnceListener("socket",r);let a=()=>{e.upload=Date.now(),e.phases.request=e.upload-(e.secureConnect??e.connect)};return s.writableFinished?a():s.prependOnceListener("finish",a),s.prependOnceListener("response",n=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,n.timings=e,t(n),n.prependOnceListener("end",()=>{s.off("abort",i),n.off("aborted",i),!e.phases.total&&(e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start)}),n.prependOnceListener("aborted",i)}),e},Ey=XP});function kc(s,e){if(e={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...e},typeof e.defaultProtocol=="string"&&!e.defaultProtocol.endsWith(":")&&(e.defaultProtocol=`${e.defaultProtocol}:`),s=s.trim(),/^data:/i.test(s))return tF(s,e);if(eF(s))return s;let t=s.startsWith("//");!t&&/^\.*\//.test(s)||(s=s.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let r=new URL(s);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&r.protocol==="https:"&&(r.protocol="http:"),e.forceHttps&&r.protocol==="http:"&&(r.protocol="https:"),e.stripAuthentication&&(r.username="",r.password=""),e.stripHash?r.hash="":e.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){let n=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,o=0,u="";for(;;){let l=n.exec(r.pathname);if(!l)break;let p=l[0],d=l.index,m=r.pathname.slice(o,d);u+=m.replace(/\/{2,}/g,"/"),u+=p,o=d+p.length}let c=r.pathname.slice(o,r.pathname.length);u+=c.replace(/\/{2,}/g,"/"),r.pathname=u}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=r.pathname.split("/"),o=n[n.length-1];Dc(o,e.removeDirectoryIndex)&&(n=n.slice(0,-1),r.pathname=n.slice(1).join("/")+"/")}if(Line truncated
`||e===`
`&&i[t-1]!=="\r"?`\r
`:e),GF=s=>Object.prototype.toString.call(s).slice(8,-1).toLowerCase();KF=s=>new Proxy(s,{get:(e,t)=>wx(e,t),has:(e,t)=>wx(e,t)!==void 0}),Or=s=>!!(s&&es(s.constructor)&&s[Symbol.toStringTag]==="FormData"&&es(s.append)&&es(s.getAll)&&es(s.entries)&&es(s[Symbol.iterator])),Dx=s=>String(s).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),vi=s=>!!(s&&typeof s=="object"&&es(s.constructor)&&s[Symbol.toStringTag]==="File"&&es(s.stream)&&s.name!=null),JF={enableAdditionalHeaders:!1},In={writable:!1,configurable:!1},Cx=class{constructor(s,e,t){if(Mt(this,Bn),Mt(this,zc),Mt(this,ws,`\r
`),Mt(this,Ir,void 0),Mt(this,_n,void 0),Mt(this,_r,"-".repeat(2)),Mt(this,$s,new TextEncoder),Mt(this,Nr,void 0),Mt(this,Br,void 0),Mt(this,Nn,void 0),!Or(s))throw new TypeError("Expected first argument to be a FormData instance.");let i;if(bx(e)?t=e:i=e,i||(i=WF()),typeof i!="string")throw new TypeError("Expected boundary argument to be a string.");if(t&&!bx(t))throw new TypeError("Expected options argument to be an object.");Fr(this,Br,Array.from(s.entries())),Fr(this,Nn,{...JF,...t}),Fr(this,Ir,Ce(this,$s).encode(Ce(this,ws))),Fr(this,_n,Ce(this,Ir).byteLength),this.boundary=`form-data-boundary-${i}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Fr(this,Nr,Ce(this,$s).encode(`${Ce(this,_r)}${this.boundary}${Ce(this,_r)}${Ce(this,ws).repeat(2)}`));let r={"Content-Type":this.contentType},a=Lc(this,zc,Ex).call(this);a&&(this.contentLength=a,r["Content-Length"]=a),this.headers=KF(Object.freeze(r)),Object.defineProperties(this,{boundary:In,contentType:In,contentLength:In,headers:In})}*values(){for(let[s,e]of Ce(this,Br)){let t=vi(e)?e:Ce(this,$s).encode(vx(e));yield Lc(this,Bn,Rc).call(this,s,t),yield t,yield Ce(this,Ir)}yield Ce(this,Nr)}async*encode(){for(let s of this.values())vi(s)?yield*VF(s.stream()):yield*kx(s)}[Symbol.iterator](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};ws=new WeakMap;Ir=new WeakMap;_n=new WeakMap;_r=new WeakMap;$s=new WeakMap;Nr=new WeakMap;Br=new WeakMap;Nn=new WeakMap;Bn=new WeakSet;Rc=function(s,e){let t="";if(t+=`${Ce(this,_r)}${this.boundary}${Ce(this,ws)}`,t+=`Content-Disposition: form-data; name="${Dx(s)}"`,vi(e)&&(t+=`; filename="${Dx(e.name)}"${Ce(this,ws)}`,t+=`Content-Type: ${e.type||"application/octet-stream"}`),Ce(this,Nn).enableAdditionalHeaders===!0){let i=vi(e)?e.size:e.byteLength;i!=null&&!isNaN(i)&&(t+=`${Ce(this,ws)}Content-Length: ${i}`)}return Ce(this,$s).encode(`${t}${Ce(this,ws).repeat(2)}`)};zc=new WeakSet;Ex=function(){let s=0;for(let[e,t]of Ce(this,Br)){let i=vi(t)?t:Ce(this,$s).encode(vx(t)),r=vi(i)?i.size:i.byteLength;if(r==null||isNaN(r))return;s+=Lc(this,Bn,Rc).call(this,e,i).byteLength,s+=r,s+=Ce(this,_n)}return String(s+Ce(this,Nr).byteLength)}});function Lr(s){return v.nodeStream(s)&&v.function(s.getBoundary)}var Uc=k(()=>{h();Qt()});import{Buffer as XF}from"node:buffer";import{promisify as YF}from"node:util";async function Hc(s,e){if(e&&"content-length"in e)return Number(e["content-length"]);if(!s)return 0;if(v.string(s))return XF.byteLength(s);if(v.buffer(s))return s.length;if(Lr(s))return YF(s.getLength.bind(s))()}var Tx=k(()=>{h();Qt();Uc()});function zr(s,e,t){let i={};for(let r of t){let a=(...n)=>{e.emit(r,...n)};i[r]=a,s.on(r,a)}return()=>{for(let[r,a]of Object.entries(i))s.off(r,a)}}var $c=k(()=>{h()});function Vc(){let s=[];return{once(e,t,i){e.once(t,i),s.push({origin:e,event:t,fn:i})},unhandleAll(){for(let e of s){let{origin:t,event:i,fn:r}=e;t.removeListener(i,r)}s.length=0}}}var Sx=k(()=>{h()});import QF from"node:net";function Wc(s,e,t){if(Ax in s)return ZF;s[Ax]=!0;let i=[],{once:r,unhandleAll:a}=Vc(),n=new Map,o=(y,w,T)=>{let S=setTimeout(w,y,y,T);S.unref?.();let E=()=>{n.set(T,!0),clearTimeout(S)};return i.push(E),E},{host:u,hostname:c}=t,l=(y,w)=>{setTimeout(()=>{n.has(w)||s.destroy(new Mr(y,w))},0)},p=()=>{for(let y of i)y();a()};if(s.once("error",y=>{if(p(),s.listenerCount("error")===0)throw y}),e.request!==void 0){let y=o(e.request,l,"request");r(s,"response",w=>{r(w,"end",y)})}if(e.socket!==void 0){let{socket:y}=e,w=()=>{l(y,"socket")};s.setTimeout(y,w),i.push(()=>{s.removeListener("timeout",w)})}let d=e.lookup!==void 0,m=e.connect!==void 0,f=e.secureConnect!==void 0,g=e.send!==void 0;return(d||m||f||g)&&r(s,"socket",y=>{let{socketPath:w}=s;if(y.connecting){let T=!!(w??QF.isIP(c??u??"")!==0);if(d&&!T&&y.address().address===void 0){let S=o(e.lookup,l,"lookup");r(y,"lookup",S)}if(m){let S=()=>o(e.connect,l,"connect");T?r(y,"connect",S()):r(y,"lookup",E=>{E===null&&r(y,"connect",S())})}f&&t.protocol==="https:"&&r(y,"connect",()=>{let S=o(e.secureConnect,l,"secureConnect");r(y,"secureConnect",S)})}if(g){let T=()=>o(e.send,l,"send");y.connecting?r(y,"connect",()=>{r(s,"upload-complete",T())}):r(s,"upload-complete",T())}}),e.response!==void 0&&r(s,"upload-complete",()=>{let y=o(e.response,l,"response");r(s,"response",y)}),e.read!==void 0&&r(s,"response",y=>{let w=o(e.read,l,"read");r(y,"end",w)}),p}var Ax,ZF,Mr,jx=k(()=>{h();Sx();Ax=Symbol("reentry"),ZF=()=>{},Mr=class extends Error{event;code;constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),this.event=t,this.name="TimeoutError",this.code="ETIMEDOUT"}}});function Gc(s){s=s;let e={protocol:s.protocol,hostname:v.string(s.hostname)&&s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,host:s.host,hash:s.hash,search:s.search,pathname:s.pathname,href:s.href,path:`${s.pathname||""}${s.search||""}`};return v.string(s.port)&&s.port.length>0&&(e.port=Number(s.port)),(s.username||s.password)&&(e.auth=`${s.username||""}:${s.paLine truncated
`;return Object.keys(s).forEach((i,r)=>{t+=Z6(i,s[i]),r<e.length-1&&(t+=","),t+=`
`}),t+="}",t}function Z6(s,e){let t=" ",i=`${t}'${s}': [Object: null prototype] {
`;return Object.keys(e).forEach((r,a,n)=>{i+=e8(r,e[r]),a<n.length-1&&(i+=","),i+=`
`}),i+=`${t}}`,i}function e8(s,e){let t=" ",i=`${t}'${s}': [Object: null prototype] {
`;return Object.keys(e).forEach((r,a,n)=>{let o=e[r];i+=` ${r}: ${o.inspect()}`,a<n.length-1&&(i+=","),i+=`
`}),i+=`${t}}`,i}pp.inspectFallback=Dk});var Sk=O($t=>{"use strict";h();var t8=Object.prototype.toString;function vk(s){return typeof s=="function"}function Ek(s){return Ck(s)&&s!==""}function s8(s){return Tk(s,Date)&&a8(s.getTime())}function i8(s){return s===""||s instanceof String&&s.toString()===""}function Ck(s){return typeof s=="string"||s instanceof String}function hp(s){return t8.call(s)==="[object Object]"}function Tk(s,e){try{return s instanceof e}catch{return!1}}function r8(s){return Ek(s)||hp(s)&&"hostname"in s&&"pathname"in s&&"protocol"in s||Tk(s,URL)}function a8(s){return typeof s=="number"&&s%1===0}function n8(s,e,t){if(vk(e)||(t=e,e=null),hp(t)||(t={Error:"Failed Check"}),!s)if(e)e(new la(t));else throw new la(t)}var la=class extends Error{constructor(...e){super(...e)}};$t.ParameterError=la;$t.isFunction=vk;$t.isNonEmptyString=Ek;$t.isDate=s8;$t.isEmptyString=i8;$t.isString=Ck;$t.isObject=hp;$t.isUrlStringOrObject=r8;$t.validate=n8});var jk=O((dZ,Ak)=>{h();Ak.exports="4.1.4"});var Gk=O(Fe=>{"use strict";h();var Pk=(X0(),p2(J0)),o8=ck(),yp=sp(),Lk=rp().Store,zk=kk().MemoryCookieStore,Mk=up().pathMatch,se=Sk(),Rk=jk(),{fromCallback:qk}=np(),{getCustomInspectSymbol:u8}=lp(),c8=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/,Fk=/[\x00-\x1F]/,Ik=[`
`,"\r","\0"],l8=/[\x20-\x3A\x3C-\x7E]+/,p8=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/,h8={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},dp=2147483647e3,d8=0,_k='Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"';function Nk(s){se.validate(se.isNonEmptyString(s),s);let e=String(s).toLowerCase();return e==="none"||e==="lax"||e==="strict"?e:null}var Xs=Object.freeze({SILENT:"silent",STRICT:"strict",DISABLED:"unsafe-disabled"}),f8=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/,m8=`
\\[?(?:
(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|
(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|
(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|
(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|
(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|
(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|
(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|
(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))
)(?:%[0-9a-zA-Z]{1,})?\\]?
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),Uk=new RegExp(`^${m8}$`);function fp(s,e,t,i){let r=0;for(;r<s.length;){let a=s.charCodeAt(r);if(a<=47||a>=58)break;r++}return r<e||r>t||!i&&r!=s.length?null:parseInt(s.substr(0,r),10)}function g8(s){let e=s.split(":"),t=[0,0,0];if(e.length!==3)return null;for(let i=0;i<3;i++){let r=i==2,a=fp(e[i],1,2,r);if(a===null)return null;t[i]=a}return t}function y8(s){s=String(s).substr(0,3).toLowerCase();let e=h8[s];return e>=0?e:null}function pa(s){if(!s)return;let e=s.split(p8);if(!e)return;let t=null,i=null,r=null,a=null,n=null,o=null;for(let u=0;u<e.length;u++){let c=e[u].trim();if(!c.length)continue;let l;if(r===null&&(l=g8(c),l)){t=l[0],i=l[1],r=l[2];continue}if(a===null&&(l=fp(c,1,2,!0),l!==null)){a=l;continue}if(n===null&&(l=y8(c),l!==null)){n=l;continue}o===null&&(l=fp(c,2,4,!0),l!==null&&(o=l,o>=70&&o<=99?o+=1900:o>=0&&o<=69&&(o+=2e3)))}if(!(a===null||n===null||o===null||r===null||a<1||a>31||o<1601||t>23||i>59||r>59))return new Date(Date.UTC(o,n,a,t,i,r))}function Hk(s){return se.validate(se.isDate(s),s),s.toUTCString()}function qi(s){return s==null?null:(s=s.trim().replace(/^\./,""),Uk.test(s)&&(s=s.replace("[","").replace("]","")),Pk&&/[^\u0001-\u007f]/.test(s)&&(s=Pk.toASCII(s)),s.toLowerCase())}function mp(s,e,t){if(s==null||e==null)return null;if(t!==!1&&(s=qi(s),e=qi(e)),s==e)return!0;let i=s.lastIndexOf(e);return!(i<=0||s.length!==e.length+i||s.substr(i-1,1)!=="."||f8.test(s))}function $k(s){if(!s||s.substr(0,1)!=="/")return"/";if(s==="/")return s;let e=s.lastIndexOf("/");return e===0?"/":s.slice(0,e)}function x8(s){if(se.isEmptyString(s))return s;for(let e=0;e<Ik.length;e++){let t=s.indexOf(Ik[e]);t!==-1&&(s=s.substr(0,t))}return s}function b8(s,e){s=x8(s),se.validate(se.isString(s),s);let t=s.indexOf("=");if(e)t===0&&(s=s.substr(1),t=s.indexOf("="));else if(t<=0)return;let i,r;if(t<=0?(i="",r=s.trim()):(i=s.substr(0,t).trim(),r=s.substr(t+1).trim()),Fk.test(i)||Fk.test(r))return;let a=new Oe;return a.key=i,a.value=r,a}function Vk(s,e){if((!e||typeof e!="object")&&(e={}),se.isEmptyString(s)||!se.isString(s))return null;s=s.trim();let t=s.indexOf(";"),i=t===-1?s:s.substr(0,t),r=b8(i,!!e.loose);if(!r)return;if(t===-1)return r;let a=s.slice(t+1).trim();if(a.length===0)return r;let n=a.split(";");for(;n.length;){let o=n.shift().trim();if(o.length===0)continue;let u=o.indexOf("="),c,l;switch(u===-1?(c=o,l=null):(c=o.substr(0,u),l=o.substr(u+1)),c=c.trim().toLowerCase(),l&&(l=l.trim()),c){case"expires":if(l){let d=pa(l);d&&(r.expires=d)}break;case"max-age":if(l&&/^-?[0-9]+$/.test(l)){let d=parseInt(l,10);r.setMaxAge(d)}break;case"domain":if(l){let d=l.trim().replace(/^\./,"");d&&(r.domain=d.toLowerCase())}break;case"path":r.path=l&&l[0]==="/"?l:null;break;case"secure":r.secure=!0;break;case"httponly":r.httpOnly=!0;break;case"samesite":switch(l?l.toLowerCase():""){case"strict":r.sameSite="strict";break;case"lax":r.sameSite="lax";break;case"none":r.sameSite="none";break;default:r.sameSite=void 0;break}break;default:r.extensions=r.extensions||[],r.extensions.push(o);break}}return r}function w8(s){return se.validate(se.isObject(s),s),!s.key.startsWith("__Secure-")||s.secure}function D8(s){return se.validate(se.isObject(s)),!s.key.startsWith("__Host-")||s.secure&&s.hostOnly&&s.path!=null&&s.path==="/"}function Wk(s){let e;try{e=JSON.parse(s)}catch(t){return t}return e}function fo(s){if(!s||se.isEmptyString(s))return null;let e;if(typeof s=="string"){if(e=Wk(s),e instanceof Error)return null}else e=s;let t=new Oe;for(let i=0;i<Oe.serializableProperties.length;i++){let r=Oe.serializableProperties[i];e[r]===void 0||e[r]===ha[r]||(r==="expires"||r==="creation"||r==="lastAccessed"?e[r]===null?t[r]=null:t[r]=e[r]=="Infinity"?"Infinity":new Date(e[r]):t[r]=e[r])}return t}function gp(s,e){se.validate(se.isObject(s),s),se.validate(se.isObject(e),e);let t=0,i=s.path?s.path.length:0;if(t=(e.path?e.path.length:0)-i,t!==0)return t;let a=s.creation?s.creation.getTime():dp,n=e.creation?e.creation.getTime():dp;return t=a-n,t!==0||(t=s.creationIndex-e.creationIndex),t}function k8(s){if(se.validate(se.isString(s)),s==="/")return["/"];let e=[s];for(;s.length>1;){let t=s.lastIndexOf("/");if(t===0)break;s=s.substr(0,t),e.push(s)}return e.push("/"),e}function Bk(s){if(s instanceof Object)return s;try{s=decodeURI(s)}catch{}return o8(s)}var ha={key:"",value:"",expires:"Infinity",maxAge:null,domain:null,path:null,secure:!1,httpOnly:!1,extensions:null,hostOnly:null,pathIsDefault:null,creation:null,lastAccessed:null,sameSite:void 0},Oe=class s{constructor(e={}){let t=u8();t&&(this[t]=this.inspect),Object.assign(this,ha,e),this.creation=this.creation||new Date,Object.defineProperty(this,"creationIndex",{configurable:!1,enumerable:!1,writable:!0,value:++s.cookiesCreated})}inspect(){let e=Date.now(),t=this.hostOnly!=null?this.hostOnly:"?",i=this.creation?`${e-this.creation.getTime()}ms`:"?",r=this.lastAccessed?`${e-this.lastAccessed.getTime()}ms`:"?";return`Cookie="${this.toString()};Line truncated
`).filter(t=>t.startsWith("data"));for(let t of e)return JSON.parse(t.replace("data:",""))}function vv(s){return{async addChat(e,t){let i=await s.post(`${lu}/api/outer/assistant/chat/add`,{userId:t,sessionId:"",content:{dialogue:e,prompt:"",timestamp:yf(),commands:"",resourceType:"0",resourceId:"",dialogueType:"0",sourceChannel:"101",extInfo:'{"h5Version":"1.3.0"}',imageSortType:1},applicationType:"chat",applicationId:""},{headers:{"x-yun-client-info":ui,"Content-Type":"application/json",accept:"text/event-stream","x-yun-api-version":"v4",Origin:"https://yun.139.com","X-Requested-With":"com.chinamobile.mcloud",Referer:"https://yun.139.com/"}});return pO(i)},submitAccredit(){return s.post(`${lu}/api/outer/assistant/accredit/submit`,{sourceBusiness:1},{headers:{"x-yun-api-version":"v1","x-yun-app-channel":"101","x-yun-client-info":ui}})}}}var Ev=k(()=>{h();dr();Pe();qe()});function Cv(s){return{getBackupGift(){return s.get(`${ci}/backupgift/info`)},receiveBackupGift(){return s.get(`${ci}/backupgift/receive`)}}}var Tv=k(()=>{h();qe()});function Sv(s){let e="https://caiyun.feixin.10086.cn";return{beinviteHecheng1T(t,i){return s.get(`${e}/market/signin/hecheng1T/beinvite?inviter=${i||""}`,{headers:{...ys(t),referer:"https://caiyun.feixin.10086.cn:7071/portal/synthesisonet/index.html?sourceid=1005"}})},finishHecheng1T(t){return s.get(`${e}/market/signin/hecheng1T/finish?flag=true`,{headers:{...ys(t),referer:"https://caiyun.feixin.10086.cn:7071/portal/synthesisonet/index.html?sourceid=1005"}})},getHecheng1T(){return s.get(`${e}/market/signin/hecheng1T/info`)},exchangeHecheng1T(t){return s.get(`${e}/market/signin/hecheng1T/exchange?num=${t}`)}}}var Av=k(()=>{h();lt()});function jv(s){function e(t,i,r){return s.post(`${Qa}?func=together:${t}&sid=${i}&behaviorData=&rnd=${Math.random()}&cguid=2348352175888&k=5921&comefrom=2066`,r)}return{mailChatTask(t,i){return e("mailChatTask",t,`<object>
<string name="content">你是位猜灯谜大师,请根据我提供的灯谜谜面,创作对应谜底,返回的格式要求:需要返回谜面和谜底,灯谜谜面为:${i}</string>
<string name="clientId">10109</string>
<string name="configId">707</string>
<string name="model">blian</string>
<string name="talkType">1</string>
<string name="createSession" />
<string name="title">猜灯谜——${i}</string>
<string name="defaultQuestion">{&quot;question&quot;:&quot;${i}&quot;,&quot;orderTip&quot;:&quot;猜灯谜&quot;,&quot;businessCode&quot;:&quot;14&quot;}</string>
<string name="userActiveType">0</string>
</object>`)},mailChatMsg(t,i){return e("mailChatMsg",t,`<object>
<string name="taskId">${i}</string>
<string name="model">blian</string>
</object>`)}}}var Pv=k(()=>{h();qe()});function Fv(s){return{getMsgPushOn(){return s.get(`${ci}/msgPushOn/task/status`)},obtainMsgPushOn(){return s.post(`${ci}/msgPushOn/task/obtain`,{type:2})}}}var Iv=k(()=>{h();qe()});function _v(s){let e="https://mrp.mcloud.139.com/market/",t=e+"signin/";return{getTaskExpansion(){return s.get(`${t}page/taskExpansion`)},receiveTaskExpansion(i){return s.get(`${t}page/receiveTaskExpansion?acceptDate=${i}`)},exchange(i,r=""){return s.get(`${t}page/exchange?prizeId=${i}&client=app&clientVersion=${hr}&smsCode=${r}`)},receivePrizeDetails(i){return s.get(`${t}page/receivePrizeDetails?prizeId=${i}&marketId=sign_in_3_ex`)},exchangeList(){return s.get(`${t}page/exchangeList`)},getVerCode(i){return s.post(`${e}api/smsVerCode/getVerCode`,{prizeId:i,marketName:"sign_in_3_ex",templateId:"800"})}}}var Nv=k(()=>{h();dr()});function Np(s){let e="https://happy.mail.10086.cn/jsp/cn/garden";return{login(t,i){return s.get(`${e}/login/caiyunsso.do?token=${t}&account=${i}&targetSourceId=001208&sourceid=1014&enableShare=1`,{followRedirect:!1,native:!0})},checkinInfo(){return s.get(`${e}/task/checkinInfo.do`)},initTree(){return s.get(`${e}/user/initTree.do`)},getTaskList(t={}){return s.get(`${e}/task/taskList.do?clientType=PE`,{headers:t})},getTaskStateList(t={}){return s.get(`${e}/task/taskState.do`,{headers:t})},checkin(){return s.get(`${e}/task/checkin.do`)},clickCartoon(t){return s.get(`${e}/user/clickCartoon.do?cartoonType=${t}`)},doTask(t,i={}){return s.get(`${e}/task/doTask.do?taskId=${t}`,{headers:i})},givenWater(t,i={}){return s.get(`${e}/task/givenWater.do?taskId=${t}`,{headers:i})},getCartoons(t={}){return s.get(`${e}/user/gotCartoons.do`,{headers:t})},getInviteCode(){return s.get(`${e}/friend/inviteCode.do`)},getBackupUser(){return s.get(`${e}/friend/backupUser.do`)},inviteFriend(t,i="backup"){return s.get(`${e}/wx/inviteFriend.do?inviteCode=${t}&inviteType=${i}&clientName=HCY`)},watering(){return s.get(`${e}/user/watering.do?isFast=1`)},openBox(){return s.get(`${e}/prize/openBox.do`)},waterFriend(t){return s.get(`${e}/user/waterFriend.do?treeId=${t}`)}}}var Bv=k(()=>{h()});function Bp(s){let e="https://yun.139.com",t="https://caiyun.feixin.10086.cn",i="https://mrp.mcloud.139.com",r="https://mnote.caiyun.feixin.10086.cn";return{querySpecToken(a,n="001005"){return s.post(`${e}/orchestration/auth-rebuild/token/v1.0/querySpecToken`,{toSourceId:n,account:String(a),commonAccountInfo:{account:String(a),accountType:1}},{headers:{referer:"https://yun.139.com/w/",accept:"application/json, text/plain, */*","content-type":"application/json;charset=UTF-8","accept-language":"zh-CN,zh;q=0.9"}})},authTokenRefresh(a,n){return s.post("https://aas.caiyun.feixin.10086.cn/tellin/authTokenRefresh.do",`<?xml version="1.0" encoding="utf-8"?><root><token>${a}</token><account>${n}</account><clienttype>656</clienttype></root>`,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},responseType:"text"})},async getNoteAuthToken(a,n){let o=await s.post("https://note.mcloud.139.com/noteServer/api/authTokenRefresh.do",{authToken:a,userPhone:String(n)},{headers:{APP_CP:"android",APP_NUMBER:String(n),CP_VERSION:"3.2.0","x-huawei-channelsrc":"10001400","User-Agent":"mobile"},native:!0});return{body:o.body,headers:o.headers}},syncNoteBook(a){return s.post(`${r}/noteServer/api/syncNotebook.do `,{addNotebooks:[],delNotebooks:[],updateNotebooks:[]},{headers:{APP_CP:"pc",CP_VERSION:"7.7.1.20240115",...a}})},createNote(a,n,o,u,c=[]){return s.post(`${r}/noteServer/api/createNote.do`,{archived:0,attachmentdir:"",attachmentdirid:"",attachments:[],contentid:"",contents:[{data:"<span></span>",noteId:a,sortOrder:0,type:"TEXT"}],cp:"",createtime:String(Date.now()),description:"",expands:{noteType:0},landMark:[],latlng:"",location:"",noteid:a,remindtime:"",remindtype:0,revision:"1",system:"",tags:c,title:n,topmost:"0",updatetime:String(Date.now()),userphone:String(o),version:"",visitTime:String(Date.now())},{headers:{APP_CP:"pc",APP_NUMBER:String(o),CP_VERSION:"7.7.1.20240115",...u}})},deleteNote(a,n){return s.post(`${r}/noteServer/api/moveToRecycleBin.do`,{noteids:[{noteid:a}]},{headers:{APP_CP:"pc",CP_VERSION:"7.7.1.20240115",...n}})},tyrzLogin(a){return s.get(`${t}/portal/auth/tyrzLogin.action?ssoToken=${a}`)},signInInfo(){return s.get(`${t}/market/signin/page/info?client=app`)},singInMultiple(){return s.get(`${t}/market/signin/page/multiple`)},getDrawInWx(){return s.get(`${t}/market/playoffic/drawInfo`)},drawInWx(){return s.get(`${t}/market/playoffic/draw`)},signInfoInWx(){return s.get(`${t}/market/playoffic/followSignInfo?isWx=true`)},clickTask(a,n="task"){return s.get(`${i}/market/signin/task/click?key=${n}&id=${a}`)},getTaskList(a="sign_in_3"){return s.get(`${i}/market/signin/task/taskList?marketname=${a}&clientVersion=`)},receive(){return s.get(`${i}/market/signin/page/receive`)},receiveTask(a){return s.get(`${t}/market/signin/page/receiveTask?taskId=${a}`)},shake(){return s.post(`${t}/market/shake-seLine truncated
<object>
<string name="clientId">10804</string>
<string name="version">9</string>
<string name="loginType">7</string>
<string name="token">${a}</string>
</object>`)},..._v(s),...Fv(s),...Cv(s),...Dv(s),...jv(s),...vv(s),...Sv(s)}}var Ov=k(()=>{h();Pe();kv();Ev();Tv();Av();Pv();Iv();Nv();Bv()});async function Lv(s,e){s.logger.start("------【兑换奖品】------");let t;try{if(!e||!e.length)return;let i=await hO(s);for(let r of e){let a=i.find(n=>n.prizeId===r);await fO(s,r,a)&&(t=`兑换${a.prizeName}成功`),await s.sleep(300)}}catch(i){s.logger.error("兑换奖品",i)}return t}async function hO(s){return Object.entries(await ie(s,s.api.exchangeList,{name:"获取兑换列表",isArray:!0})).flatMap(e=>e[1])}async function Op(s,e,t,i){try{let{code:r,msg:a}=await s.api.exchange(e,i);if(r===0)return s.logger.success(`兑换${t}成功,第三方会员请在本月底之前手动领取`),!0;if(r===2301){s.logger.fail("本月已经兑换过了");return}if(r===610){s.logger.warn(`兑换${t}失败,${r},${a},请手动登录 APP 后重试`);return}s.logger.fail(`兑换${t}失败,${r},${a}`)}catch(r){s.logger.error("兑换"+t,r)}}function dO({logger:s,store:e},{prizeName:t,pOrder:i,limit:r,dailyRemainderCount:a,count:n}){if(r===2){s.info(`${t},本月已经兑换过了`);return}if(r===4){s.info(`${t},本月本组已兑换,下月再来`);return}if(a<=0){s.info(`${t},今日已经兑换完`);return}if(n<=0){s.info(`${t},本年度已经兑换完`);return}if(e.totalCloud<i){s.fail(`${t},云朵可能不够哦`);return}return!0}async function fO(s,e,t,i=""){if(!dO(s,t))return;let r=await mO(s,e);if(r&&r.verifycode===0){s.logger.fail("需要短信验证");return}return s.logger.debug(`${t.prizeName},开始兑换`),await Op(s,e,t.prizeName,i)}async function mO(s,e){try{let{code:t,msg:i,result:r}=await s.api.receivePrizeDetails(e);if(t===0)return r;s.logger.fail(`获取领取奖品详情失败,${t},${i}`)}catch(t){s.logger.error("获取领取奖品详情异常",t)}}var zv=k(()=>{h();Je()});var Uv={};pr(Uv,{createApi:()=>Bp,createGardenApi:()=>Np,createNewAuth:()=>ln,deleteFiles:()=>Mv,exchangeApi:()=>Op,exchangeTask:()=>Lv,getJwtToken:()=>cn,run:()=>Lp,tasks:()=>yO});async function Mv(s,e){try{s.logger.debug(`删除文件${e.join(",")}`);let{message:t,code:i,success:r}=await df(s.http,e);if(r)return s.logger.success("删除文件成功"),!0;s.logger.error("删除文件失败",i,t)}catch(t){s.logger.error("删除文件失败",t)}}async function gO(s){let{shakePrizeconfig:e,shakeRecommend:t}=await ie(s,s.api.shake,"摇一摇");if(t)return s.logger.debug(t.explain||t.img);if(e)return s.logger.info(e.title+e.name)}async function Rv(s){s.logger.start("------【摇一摇】------");let{delay:e,num:t}=s.config.shake;for(let i=0;i<t;i++)await gO(s),i<t-1&&await s.sleep(e*1e3)}async function qv(s){await dv(s),s.logger.debug("------【搽屁股】------");try{if(s.store&&s.store.files)return await Mv(s,s.store.files);s.logger.debug("你没有屁,,,,不是, 您还没拉呢")}catch(e){s.logger.error("afterTask 异常",e)}}async function Lp(s){let{config:e}=s,t=[Ap,_p,jp,Pp,Wu,Ip,Rv,Hi,Sp,Gu];e&&(e.garden&&e.garden.enable&&t.push(Dp),e.aiRedPack&&e.aiRedPack.enable&&(t.push(bu),t.push(gu)),e.云朵大作战&&e.云朵大作战.开启&&t.push(kp),e.盲盒&&e.盲盒.开启&&t.push(bp),e.cloudPhoneRedpack&&e.cloudPhoneRedpack.enable&&t.push(wp));for(let i of t)await i(s),await s.sleep(1e3);await qv(s)}var yO,go=k(()=>{h();tn();Af();tg();sg();Jk();sv();nv();Tp();Dr();hv();fv();xv();Fp();wv();Je();Ov();gr();zv();yO={appTask:Wu,backupGiftTask:Gu,blindboxTask:bp,hc1Task:kp,msgPushOnTask:Sp,receive:Hi,shakeTask:Rv,shareFindTask:Ip,aiRedPackTask:bu,aiCloudTask:gu,signIn:Ap,signInWx:jp,taskExpansionTask:_p,wxDraw:Pp,gardenTask:Dp,cloudPhoneRedpackTask:wp,afterTask:qv}});var $v=O(zp=>{h();var Hv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");zp.encode=function(s){if(0<=s&&s<Hv.length)return Hv[s];throw new TypeError("Must be between 0 and 63: "+s)};zp.decode=function(s){var e=65,t=90,i=97,r=122,a=48,n=57,o=43,u=47,c=26,l=52;return e<=s&&s<=t?s-e:i<=s&&s<=r?s-i+c:a<=s&&s<=n?s-a+l:s==o?62:s==u?63:-1}});var qp=O(Rp=>{h();var Vv=$v(),Mp=5,Wv=1<<Mp,Gv=Wv-1,Kv=Wv;function xO(s){return s<0?(-s<<1)+1:(s<<1)+0}function bO(s){var e=(s&1)===1,t=s>>1;return e?-t:t}Rp.encode=function(e){var t="",i,r=xO(e);do i=r&Gv,r>>>=Mp,r>0&&(i|=Kv),t+=Vv.encode(i);while(r>0);return t};Rp.decode=function(e,t,i){var r=e.length,a=0,n=0,o,u;do{if(t>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Vv.decode(e.charCodeAt(t++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(u&Kv),u&=Gv,a=a+(u<<n),n+=Mp}while(o);i.value=bO(a),i.rest=t}});var Vi=O(Le=>{h();function wO(s,e,t){if(e in s)return s[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}Le.getArg=wO;var Jv=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,DO=/^data:.+\,.+$/;function da(s){var e=s.match(Jv);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Le.urlParse=da;function $i(s){var e="";return s.scheLine truncated
- Did you mean \`export { '${s}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:s})=>`'${s==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:s})=>`Unsyntactic ${s==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:s})=>`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${s}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:s})=>`Expected number in radix ${s}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:s})=>`Escape sequence in keyword ${s}.`,InvalidIdentifier:({identifierName:s})=>`Invalid identifier ${s}.`,InvalidLhs:({ancestor:s})=>`Invalid left-hand side in ${Eo(s)}.`,InvalidLhsBinding:({ancestor:s})=>`Binding invalid left-hand side in ${Eo(s)}.`,InvalidLhsOptionalChaining:({ancestor:s})=>`Invalid optional chaining in the left-hand side of ${Eo(s)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:s})=>`Unexpected character '${s}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:s})=>`Private name #${s} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:s})=>`Label '${s}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:s})=>`This experimental syntax requires enabling the parser plugin: ${s.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:s})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${s.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:s})=>`Duplicate key "${s}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:s})=>`An export name cannot include a lone surrogate, found '\\u${s.toString(16)}'.`,ModuleExportUndefined:({localName:s})=>`Export '${s}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:s})=>`Private names are only allowed in property accesses (\`obj.#${s}\`) or in \`in\` expressions (\`#${s} in obj\`).`,PrivateNameRedeclaration:({identifierName:s})=>`Duplicate private name #${s}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allLine truncated
`,++t,m===13&&e.charCodeAt(t)===10&&++t,++r,p=i=t):a.unterminated(n,o,u):++t}return{pos:t,str:c,firstInvalidLoc:l,lineStart:i,curLine:r,containsInvalid:!!l}}function TL(s,e,t,i){return s==="template"?e===96||e===36&&t.charCodeAt(i+1)===123:e===(s==="double"?34:39)}function SL(s,e,t,i,r,a){let n=!r;e++;let o=c=>({pos:e,ch:c,lineStart:t,curLine:i}),u=s.charCodeAt(e++);switch(u){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:e}=oh(s,e,t,i,2,!1,n,a),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=M1(s,e,t,i,n,a),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(e)===10&&++e;case 10:t=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(e-1,t,i);default:if(u>=48&&u<=55){let c=e-1,p=/^[0-7]+/.exec(s.slice(c,e+2))[0],d=parseInt(p,8);d>255&&(p=p.slice(0,-1),d=parseInt(p,8)),e+=p.length-1;let m=s.charCodeAt(e);if(p!=="0"||m===56||m===57){if(r)return o(null);a.strictNumericEscape(c,t,i)}return o(String.fromCharCode(d))}return o(String.fromCharCode(u))}}function oh(s,e,t,i,r,a,n,o){let u=e,c;return{n:c,pos:e}=z1(s,e,t,i,16,r,a,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(u,t,i):e=u-1),{code:c,pos:e}}function z1(s,e,t,i,r,a,n,o,u,c){let l=e,p=r===16?D1.hex:D1.decBinOct,d=r===16?vo.hex:r===10?vo.dec:r===8?vo.oct:vo.bin,m=!1,f=0;for(let g=0,y=a??1/0;g<y;++g){let w=s.charCodeAt(e),T;if(w===95&&o!=="bail"){let S=s.charCodeAt(e-1),E=s.charCodeAt(e+1);if(o){if(Number.isNaN(E)||!d(E)||p.has(S)||p.has(E)){if(c)return{n:null,pos:e};u.unexpectedNumericSeparator(e,t,i)}}else{if(c)return{n:null,pos:e};u.numericSeparatorInEscapeSequence(e,t,i)}++e;continue}if(w>=97?T=w-97+10:w>=65?T=w-65+10:CL(w)?T=w-48:T=1/0,T>=r){if(T<=9&&c)return{n:null,pos:e};if(T<=9&&u.invalidDigit(e,t,i,r))T=0;else if(n)T=0,m=!0;else break}++e,f=f*r+T}return e===l||a!=null&&e-l!==a||m?{n:null,pos:e}:{n:f,pos:e}}function M1(s,e,t,i,r,a){let n=s.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=oh(s,e,t,i,s.indexOf("}",e)-e,!0,r,a),++e,o!==null&&o>1114111)if(r)a.invalidCodePoint(e,t,i);else return{code:null,pos:e}}else({code:o,pos:e}=oh(s,e,t,i,4,!1,r,a));return{code:o,pos:e}}function xa(s,e,t){return new Wt(t,s-e,s)}var AL=new Set([103,109,115,105,121,117,100,118]),Vt=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new Qi(e.startLoc,e.endLoc)}},uh=class extends ah{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(i,r,a,n)=>this.optionFlags&2048?(this.raise(D.InvalidDigit,xa(i,r,a),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(D.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(D.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(D.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(D.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(i,r,a)=>{this.recordStrictModeErrors(D.StrictNumericEscape,xa(i,r,a))},unterminated:(i,r,a)=>{throw this.raise(D.UnterminatedString,xa(i-1,r,a))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(D.StrictNumericEscape),unterminated:(i,r,a)=>{throw this.raise(D.UnterminatedTemplate,xa(i,r,a))}}),this.state=new nh,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new Vt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Yp.lastIndex=e,Yp.test(this.input)?Yp.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Qp.lastIndex=e,Qp.test(this.input)?Qp.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let i=this.input.charCodeAt(e);(i&64512)===56320&&(t=65536+((t&1023)<<10)+(i&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,i])=>this.raise(t,i)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.st Line truncated
`:`\r
`):r=String.fromCharCode(i),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(t){let i="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(D.UnterminatedString,this.state.startLoc);let a=this.input.charCodeAt(this.state.pos);if(a===t)break;a===38?(i+=this.input.slice(r,this.state.pos),i+=this.jsxReadEntity(),r=this.state.pos):Xi(a)?(i+=this.input.slice(r,this.state.pos),i+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}i+=this.input.slice(r,this.state.pos++),this.finishToken(134,i)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let i=10;this.codePointAtPos(this.state.pos)===120&&(i=16,++this.state.pos);let r=this.readInt(i,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let i=0,r=!1;for(;i++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(r){let a=this.input.slice(t,this.state.pos),n=RL[a];if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t,i=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(Ji(t)||t===45);this.finishToken(141,this.input.slice(i,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(141)?t.name=this.state.value:Th(this.state.type)?t.name=_s(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,i=this.jsxParseIdentifier();if(!this.eat(14))return i;let r=this.startNodeAt(t);return r.namespace=i,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,i=this.jsxParseNamespacedName();if(i.type==="JSXNamespacedName")return i;for(;this.eat(16);){let r=this.startNodeAt(t);r.object=i,r.property=this.jsxParseIdentifier(),i=this.finishNode(r,"JSXMemberExpression")}return i}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(de.brace),this.next(),t=this.jsxParseExpressionContainer(t,de.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(ei.AttributeIsEmpty,t),t;case 143:case 134:return this.parseExprAtom();default:throw this.raise(ei.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(de.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,i){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();t.expression=r}return this.setContext(i),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){let t=this.startNode();return this.match(5)?(this.setContext(de.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(de.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t){let i=this.startNodeAt(t);return this.eat(144)?this.finishNode(i,"JSXOpeningFragment"):(i.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(i))}jsxParseOpeningElementAfterName(t){let i=[];for(;!this.match(56)&&!this.match(144);)i.push(this.jsxParseAttribute());return t.attributes=i,t.selfClosing=this.eat(56),this.expect(144),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){let i=this.startNodeAt(t);return this.eat(144)?this.finishNode(i,"JSXClosingFragment"):(i.name=this.jsxParseElementName(),this.expect(144),this.finishNode(i,"JSXClosingElement"))}jsxParseElementAt(t){let i=this.startNodeAt(t),r=[],a=this.jsxParseOpeningElementAt(t),n=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case 143:if(t=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(t);break e}r.push(this.jsxParseElementAt(t));break;case 142:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(de.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,de.j_expr));break}default:this.unexpected()}Is(a)&&!Is(n)&&n!==null?this.raise(ei.MissingClosingTagFragment,n):!Is(a)&&Is(n)?this.raise(ei.MissingClosingTagElement,n,{openingTagName:Ki(a.name)}):!Is(a)&&!Is(n)&&Ki(n.name)!==Ki(a.name)&&this.raise(ei.MissingClosingTagElement,n,{openingTagName:Ki(a.name)})}if(Is(a)?(i.openingFragment=a,i.closingFragment=n):(i.openingElement=a,i.closingElement=n),i.children=r,this.match(47))throw this.raise(ei.UnwrappedAdjacentJSXElements,this.state.startLoc);return Is(a)?this.finishNode(i,"JSXFrag Line truncated
`),cooked:a===null?null:a.slice(1,c)},o.tail=u,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,et(this.state.lastTokEndLoc,c)),p}parseTemplate(e){let t=this.startNode(),i=this.parseTemplateElement(e),r=[i],a=[];for(;!i.tail;)a.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(e));return t.expressions=a,t.quasis=r,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,i,r){i&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=!1,o=!0,u=this.startNode();for(u.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(u);break}let l;t?l=this.parseBindingProperty():(l=this.parsePropertyDefinition(r),n=this.checkProto(l,i,n,r)),i&&!this.isObjectProperty(l)&&l.type!=="SpreadElement"&&this.raise(D.InvalidRecordProperty,l),l.shorthand&&this.addExtra(l,"shorthand",!0),u.properties.push(l)}this.next(),this.state.inFSharpPipelineDirectBody=a;let c="ObjectExpression";return t?c="ObjectPattern":i&&(c="RecordExpression"),this.finishNode(u,c)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(D.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let i=this.startNode(),r=!1,a=!1,n;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(i.decorators=t,t=[]),i.method=!1,e&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(i);let u=this.state.containsEsc;if(this.parsePropertyName(i,e),!o&&!u&&this.maybeAsyncOrAccessorProp(i)){let{key:c}=i,l=c.name;l==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(i)),(l==="get"||l==="set")&&(a=!0,this.resetPreviousNodeTrailingComments(c),i.kind=l,this.match(55)&&(o=!0,this.raise(D.AccessorIsGenerator,this.state.curPosition(),{kind:l}),this.next()),this.parsePropertyName(i))}return this.parseObjPropValue(i,n,o,r,!1,a,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let i=this.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e);r.length!==i&&this.raise(e.kind==="get"?D.BadGetterArity:D.BadSetterArity,e),e.kind==="set"&&((t=r[r.length-1])==null?void 0:t.type)==="RestElement"&&this.raise(D.BadSetterRestParameter,e)}parseObjectMethod(e,t,i,r,a){if(a){let n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(i||t||this.match(10))return r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,i,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,i,r){if(e.shorthand=!1,this.eat(14))return e.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(e,"ObjectProperty");if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),i)e.value=this.parseMaybeDefault(t,ls(e.key));else if(this.match(29)){let a=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=a):this.raise(D.InvalidCoverInitializedName,a),e.value=this.parseMaybeDefault(t,ls(e.key))}else e.value=ls(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,i,r,a,n,o){let u=this.parseObjectMethod(e,i,r,a,n)||this.parseObjectProperty(e,t,a,o);return u||this.unexpected(),u}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:i,value:r}=this.state,a;if(At(i))a=this.parseIdentifier(!0);else switch(i){case 135:a=this.parseNumericLiteral(r);break;case 134:a=this.parseStringLiteral(r);break;case 136:a=this.parseBigIntLiteral(r);break;case 139:{let n=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=n):this.raise(D.UnexpectedPrivateField,n),a=this.parsePrivateName();break}default:if(i===137){a=this.parseDecimalLiteral(r);break}this.unexpected()}e.key=a,i!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,i,r,a,n,o=!1){this.initFunction(e,i),e.generator=t,this.scope.enter(18|(o?64:0)|(a?32:0)),this.prodParam.enter(To(i,e.generator)),this.parseFunctionParams(e,r);let u=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),u}parseArrayLike(e,t,i,r){i&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startN Line truncated
`).trim();t.push(a),i+=r}return t.join(`\r
`).trim()}var pd=class extends YM{constructor(e){super(),this.options=e||{},this.options.lineLength!==!1&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,t,i){if(t!=="buffer"&&(e=Buffer.from(e,t)),!e||!e.length)return setImmediate(i);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let r=this._curLine+cd(e);if(this.options.lineLength){r=ld(r,this.options.lineLength);let a=r.lastIndexOf(`
`);a<0?(this._curLine=r,r=""):a===r.length-1?this._curLine="":(this._curLine=r.substr(a+1),r=r.substr(0,a+1))}r&&(this.outputBytes+=r.length,this.push(Buffer.from(r,"ascii"))),setImmediate(i)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=cd(this._remainingBytes)),this._curLine&&(this._curLine=ld(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}};FC.exports={encode:cd,wrap:ld,Encoder:pd}});var md=O((Bie,_C)=>{"use strict";h();var QM=M("stream").Transform;function dd(s){typeof s=="string"&&(s=Buffer.from(s,"utf-8"));let e=[[9],[10],[13],[32,60],[62,126]],t="",i;for(let r=0,a=s.length;r<a;r++){if(i=s[r],ZM(i,e)&&!((i===32||i===9)&&(r===a-1||s[r+1]===10||s[r+1]===13))){t+=String.fromCharCode(i);continue}t+="="+(i<16?"0":"")+i.toString(16).toUpperCase()}return t}function IC(s,e){if(s=(s||"").toString(),e=e||76,s.length<=e)return s;let t=0,i=s.length,r,a,n,o=Math.floor(e/3),u="";for(;t<i;){if(n=s.substr(t,e),r=n.match(/\r\n/)){n=n.substr(0,r.index+r[0].length),u+=n,t+=n.length;continue}if(n.substr(-1)===`
`){u+=n,t+=n.length;continue}else if(r=n.substr(-o).match(/\n.*?$/)){n=n.substr(0,n.length-(r[0].length-1)),u+=n,t+=n.length;continue}else if(n.length>e-o&&(r=n.substr(-o).match(/[ \t.,!?][^ \t.,!?]*$/)))n=n.substr(0,n.length-(r[0].length-1));else if(n.match(/[=][\da-f]{0,2}$/i))for((r=n.match(/[=][\da-f]{0,1}$/i))&&(n=n.substr(0,n.length-r[0].length));n.length>3&&n.length<i-t&&!n.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(r=n.match(/[=][\da-f]{2}$/gi))&&(a=parseInt(r[0].substr(1,2),16),!(a<128||(n=n.substr(0,n.length-3),a>=192))););t+n.length<i&&n.substr(-1)!==`
`?(n.length===e&&n.match(/[=][\da-f]{2}$/i)?n=n.substr(0,n.length-3):n.length===e&&(n=n.substr(0,n.length-1)),t+=n.length,n+=`=\r
`):t+=n.length,u+=n}return u}function ZM(s,e){for(let t=e.length-1;t>=0;t--)if(e[t].length&&(e[t].length===1&&s===e[t][0]||e[t].length===2&&s>=e[t][0]&&s<=e[t][1]))return!0;return!1}var fd=class extends QM{constructor(e){super(),this.options=e||{},this.options.lineLength!==!1&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,t,i){let r;if(t!=="buffer"&&(e=Buffer.from(e,t)),!e||!e.length)return i();this.inputBytes+=e.length,this.options.lineLength?(r=this._curLine+dd(e),r=IC(r,this.options.lineLength),r=r.replace(/(^|\n)([^\n]*)$/,(a,n,o)=>(this._curLine=o,n)),r&&(this.outputBytes+=r.length,this.push(r))):(r=dd(e),this.outputBytes+=r.length,this.push(r,"ascii")),i()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}};_C.exports={encode:dd,wrap:IC,Encoder:fd}});var Wa=O((Lie,BC)=>{"use strict";h();var Va=hd(),e5=md(),NC=ad();BC.exports={isPlainText(s,e){return!(typeof s!="string"||(e?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(s))},hasLongerLines(s,e){return s.length>128*1024?!0:new RegExp("^.{"+(e+1)+",}","m").test(s)},encodeWord(s,e,t){e=(e||"Q").toString().toUpperCase().trim().charAt(0),t=t||0;let i,r="UTF-8";if(t&&t>7+r.length&&(t-=7+r.length),e==="Q"?i=e5.encode(s).replace(/[^a-z0-9!*+\-/=]/gi,a=>{let n=a.charCodeAt(0).toString(16).toUpperCase();return a===" "?"_":"="+(n.length===1?"0"+n:n)}):e==="B"&&(i=typeof s=="string"?s:Va.encode(s),t=t?Math.max(3,(t-t%4)/4*3):0),t&&(e!=="B"?i:Va.encode(s)).length>t)if(e==="Q")i=this.splitMimeEncodedString(i,t).join("?= =?"+r+"?"+e+"?");else{let a=[],n="";for(let o=0,u=i.length;o<u;o++){let c=i.charAt(o);/[\ud83c\ud83d\ud83e]/.test(c)&&o<u-1&&(c+=i.charAt(++o)),Buffer.byteLength(n+c)<=t||o===0?n+=c:(a.push(Va.encode(n)),n=c)}n&&a.push(Va.encode(n)),a.length>1?i=a.join("?= =?"+r+"?"+e+"?"):i=a.join("")}else e==="B"&&(i=Va.encode(s));return"=?"+r+"?"+e+"?"+i+(i.substr(-2)==="?="?"":"?=")},encodeWords(s,e,t,i){t=t||0;let r,a=s.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!a)return s;if(i)return this.encodeWord(s,e,t);let n=s.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!n)return s;let o=a.index+(a[0].match(/[^\s]/)||{index:0}).index,u=n.index+(n[1]||"").length;return r=(o?s.substr(0,o):"")+this.encodeWord(s.substring(o,u),e||"Q",t)+(u<s.length?s.substr(u):""),r},buildHeaderValue(s){let e=[];return Object.keys(s.params||{}).forEach(t=>{let i=s.params[t];!this.isPlainText(i,!0)||i.length>=75?this.buildHeaderParam(t,i,50).forEach(r=>{!/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(r.value)||r.key.substr(-1)==="*"?e.push(r.key+"="+r.value):e.push(r.key+"="+JSON.stringify(r.value))}):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i)?e.push(t+"="+JSON.stringify(i)):e.push(t+"="+i)}),s.value+(e.length?"; "+e.join("; "):"")},buildHeaderParam(s,e,t){let i=[],r=typeof e=="string"?e:(e||"").toString(),a,n,o,u,c=0,l,p;if(t=t||50,this.isPlainText(e,!0)){if(r.length<=t)return[{key:s,value:r}];r=r.replace(new RegExp(".{"+t+"}","g"),d=>(i.push({line:d}),"")),r&&i.push({line:r})}else{if(/[\uD800-\uDBFF]/.test(r)){for(a=[],l=0,p=r.length;l<p;l++)n=r.charAt(l),o=n.charCodeAt(0),o>=55296&&o<=56319&&l<p-1?(n+=r.charAt(l+1),a.push(n),l++):a.push(n);r=a}u="utf-8''";let d=!0;for(c=0,l=0,p=r.length;l<p;l++){if(n=r[l],d)n=this.safeEncodeURIComponent(n);else if(n=n===" "?n:this.safeEncodeURIComponent(n),n!==r[l])if((this.safeEncodeURIComponent(u)+n).length>=t)i.push({line:u,encoded:d}),u="",c=l-1;else{d=!0,l=c,u="";continue}(u+n).length>=t?(i.push({line:u,encoded:d}),u=n=r[l]===" "?" ":this.safeEncodeURIComponent(r[l]),n===r[l]?(d=!1,c=l-1):d=!0):u+=n}u&&i.push({line:u,encoded:d})}return i.map((d,m)=>({key:s+"*"+m+(d.encoded?"*":""),value:d.line}))},parseHeaderValue(s){let e={value:!1,params:{}},t=!1,i="",r="value",a=!1,n=!1,o;for(let u=0,c=s.length;u<c;u++)if(o=s.charAt(u),r==="key"){if(o==="="){t=i.trim().toLowerCase(),r="value",i="";continue}i+=o}else{if(n)i+=o;else if(o==="\\"){n=!0;continue}else a&&o===a?a=!1:!a&&o==='"'?a=o:!a&&o===";"?(t===!1?e.value=i.trim():e.params[t]=i.trim(),r="key",i=""):i+=o;n=!1}return r==="value"?t===!1?e.value=i.trim():e.params[t]=i.trim():i.trim()&&(e.params[i.trim().toLowerCase()]=""),Object.keys(e.params).forEach(u=>{let c,l,p,d;(p=u.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(c=u.substr(0,p.index),l=Number(p[2]||p[3])||0,(!e.params[c]||typeof e.params[c]!="object")&&(e.params[c]={charset:!1,values:[]}),d=e.params[u],l===0&&p[0].substr(-1)==="*"&&(p=d.match(/^([^']*)'[^']*'(.*)$/))&&(e.params[c].charset=p[1]||"iso-8859-1",d=p[2]),e.params[c].values[l]=d,delete e.params[u])}),Object.keys(e.params).forEach(u=>{let c;e.params[u]&&Array.isArray(e.params[u].values)&&(c=e.params[u].values.map(l=>l||"").join(""),e.params[u].charset?e.params[u]="=?"+e.params[u].charset+"?Q?"+c.replace(/[=?_\s]/g,l=>{let p=l.charCodeAt(0).toString(16);return l===" "?"_":"%"+(p.length<2?"0":"")+p}).replace(/%/g,"=")+"?=":e.params[u Line truncated
`)}return a},splitMimeEncodedString:(s,e)=>{let t,i,r,a,n=[];for(e=Math.max(e||0,12);s.length;){for(t=s.substr(0,e),(i=t.match(/[=][0-9A-F]?$/i))&&(t=t.substr(0,i.index)),a=!1;!a;)a=!0,(i=s.substr(t.length).match(/^[=]([0-9A-F]{2})/i))&&(r=parseInt(i[1],16),r<194&&r>127&&(t=t.substr(0,t.length-3),a=!1));t.length&&n.push(t),s=s.substr(t.length)}return n},encodeURICharComponent:s=>{let e="",t=s.charCodeAt(0).toString(16).toUpperCase();if(t.length%2&&(t="0"+t),t.length>2)for(let i=0,r=t.length/2;i<r;i++)e+="%"+t.substr(i,2);else e+="%"+t;return e},safeEncodeURIComponent(s){s=(s||"").toString();try{s=encodeURIComponent(s)}catch{return s.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return s.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,e=>this.encodeURICharComponent(e))}}});var zC=O((Mie,LC)=>{"use strict";h();function t5(s){let e=!1,t="text",i,r=[],a={address:[],comment:[],group:[],text:[]},n,o;for(n=0,o=s.length;n<o;n++){let u=s[n],c=n?s[n-1]:null;if(u.type==="operator")switch(u.value){case"<":t="address";break;case"(":t="comment";break;case":":t="group",e=!0;break;default:t="text";break}else u.value&&(t==="address"&&(u.value=u.value.replace(/^[^<]*<\s*/,"")),c&&c.noBreak&&a[t].length?a[t][a[t].length-1]+=u.value:a[t].push(u.value))}if(!a.text.length&&a.comment.length&&(a.text=a.comment,a.comment=[]),e)a.text=a.text.join(" "),r.push({name:a.text||i&&i.name,group:a.group.length?OC(a.group.join(",")):[]});else{if(!a.address.length&&a.text.length){for(n=a.text.length-1;n>=0;n--)if(a.text[n].match(/^[^@\s]+@[^@\s]+$/)){a.address=a.text.splice(n,1);break}let u=function(c){return a.address.length?c:(a.address=[c.trim()]," ")};if(!a.address.length)for(n=a.text.length-1;n>=0&&(a.text[n]=a.text[n].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,u).trim(),!a.address.length);n--);}if(!a.text.length&&a.comment.length&&(a.text=a.comment,a.comment=[]),a.address.length>1&&(a.text=a.text.concat(a.address.splice(1))),a.text=a.text.join(" "),a.address=a.address.join(" "),!a.address&&e)return[];i={address:a.address||a.text||"",name:a.text||a.address||""},i.address===i.name&&((i.address||"").match(/@/)?i.name="":i.address=""),r.push(i)}return r}var gd=class{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let t=0,i=this.str.length;t<i;t++){let r=this.str.charAt(t),a=t<i-1?this.str.charAt(t+1):null;this.checkChar(r,a)}return this.list.forEach(t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)}),e}checkChar(e,t){if(!this.escaped){if(e===this.operatorExpecting){this.node={type:"operator",value:e},t&&![" "," ","\r",`
`,",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",this.escaped=!1;return}else if(!this.operatorExpecting&&e in this.operators){this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],this.escaped=!1;return}else if(['"',"'"].includes(this.operatorExpecting)&&e==="\\"){this.escaped=!0;return}}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),e===`
`&&(e=" "),(e.charCodeAt(0)>=33||[" "," "].includes(e))&&(this.node.value+=e),this.escaped=!1}};function OC(s,e){e=e||{};let i=new gd(s).tokenize(),r=[],a=[],n=[];if(i.forEach(o=>{o.type==="operator"&&(o.value===","||o.value===";")?(a.length&&r.push(a),a=[]):a.push(o)}),a.length&&r.push(a),r.forEach(o=>{o=t5(o),o.length&&(n=n.concat(o))}),e.flatten){let o=[],u=c=>{c.forEach(l=>{if(l.group)return u(l.group);o.push(l)})};return u(n),o}return n}LC.exports=OC});var RC=O((qie,MC)=>{"use strict";h();var s5=M("stream").Transform,yd=class extends s5{constructor(){super(),this.lastByte=!1}_transform(e,t,i){e.length&&(this.lastByte=e[e.length-1]),this.push(e),i()}_flush(e){return this.lastByte===10?e():this.lastByte===13?(this.push(Buffer.from(`
`)),e()):(this.push(Buffer.from(`\r
`)),e())}};MC.exports=yd});var bd=O((Hie,qC)=>{"use strict";h();var i5=M("stream"),r5=i5.Transform,xd=class extends r5{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,i){let r,a=0;for(let n=0,o=e.length;n<o;n++)e[n]===10&&(n&&e[n-1]!==13||!n&&this.lastByte!==13)&&(n>a&&(r=e.slice(a,n),this.push(r)),this.push(Buffer.from(`\r
`)),a=n+1);a&&a<e.length?(r=e.slice(a),this.push(r)):a||this.push(e),this.lastByte=e[e.length-1],i()}};qC.exports=xd});var HC=O((Vie,UC)=>{"use strict";h();var a5=M("stream"),n5=a5.Transform,wd=class extends n5{constructor(e){super(e),this.options=e||{}}_transform(e,t,i){let r,a=0;for(let n=0,o=e.length;n<o;n++)e[n]===13&&(r=e.slice(a,n),a=n+1,this.push(r));a&&a<e.length?(r=e.slice(a),this.push(r)):a||this.push(e),i()}};UC.exports=wd});var vd=O((Gie,$C)=>{"use strict";h();var Dd=M("crypto"),o5=M("fs"),u5=ud(),Ga=M("stream").PassThrough,c5=rt(),_t=Wa(),l5=md(),p5=hd(),h5=zC(),d5=Ha(),f5=RC(),m5=bd(),g5=HC(),kd=class s{constructor(e,t){this.nodeCounter=0,t=t||{},this.baseBoundary=t.baseBoundary||Dd.randomBytes(8).toString("hex"),this.boundaryPrefix=t.boundaryPrefix||"--_NmP",this.disableFileAccess=!!t.disableFileAccess,this.disableUrlAccess=!!t.disableUrlAccess,this.normalizeHeaderKey=t.normalizeHeaderKey,this.date=new Date,this.rootNode=t.rootNode||this,this.keepBcc=!!t.keepBcc,t.filename&&(this.filename=t.filename,e||(e=_t.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(t.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=t.parentNode,this.hostname=t.hostname,this.newline=t.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],e&&this.setHeader("Content-Type",e)}createChild(e,t){!t&&typeof e=="object"&&(t=e,e=void 0);let i=new s(e,t);return this.appendChild(i),i}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach((t,i)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[i]=e)}),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let i=!1,r;if(!t&&e&&typeof e=="object")return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach(a=>{this.setHeader(a.key,a.value)}):Object.keys(e).forEach(a=>{this.setHeader(a,e[a])}),this;e=this._normalizeHeaderKey(e),r={key:e,value:t};for(let a=0,n=this._headers.length;a<n;a++)this._headers[a].key===e&&(i?(this._headers.splice(a,1),a--,n--):(this._headers[a]=r,i=!0));return i||this._headers.push(r),this}addHeader(e,t){return!t&&e&&typeof e=="object"?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach(i=>{this.addHeader(i.key,i.value)}):Object.keys(e).forEach(i=>{this.addHeader(i,e[i])}),this):Array.isArray(t)?(t.forEach(i=>{this.addHeader(e,i)}),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,i=this._headers.length;t<i;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,typeof this.content.pipe=="function"?(this._contentErrorHandler=t=>{this.content.removeListener("error",this._contentErrorHandler),this.content=t},this.content.once("error",this._contentErrorHandler)):typeof this.content=="string"&&(this._isPlainText=_t.isPlainText(this.content),this._isPlainText&&_t.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise((o,u)=>{e=c5.callbackPromise(o,u)}));let i=this.createReadStream(),r=[],a=0,n=!1;return i.on("readable",()=>{let o;for(;(o=i.read())!==null;)r.push(o),a+=o.length}),i.once("error",o=>{if(!n)return n=!0,e(o)}),i.once("end",o=>{if(!n)return n=!0,o&&o.length&&(r.push(o),a+=o.length),e(null,Buffer.concat(r,a))}),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),(!e||!["base64","quoted-printable"].includes(e))&&(/^text\//i.test(t)?this._isPlainText&&!this._hasLongLines?e="7bit":typeof this.content=="string"||this.content instanceof Buffer?e=this._getTextEncoding(this.content)==="Q"?"quoted-printable":"base64":e=this.textEncoding==="B"?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let i=this._headers.length-2;i>=0;i--){let r=this._headers[i];r.key==="Content-Type"&&(this._headers.splice(i,1),this._head Line truncated
`)}createReadStream(e){e=e||{};let t=new Ga(e),i=t,r;this.stream(t,e,a=>{if(a){i.emit("error",a);return}t.end()});for(let a=0,n=this._transforms.length;a<n;a++)r=typeof this._transforms[a]=="function"?this._transforms[a]():this._transforms[a],i.once("error",o=>{r.emit("error",o)}),i=i.pipe(r);r=new f5,i.once("error",a=>{r.emit("error",a)}),i=i.pipe(r);for(let a=0,n=this._processFuncs.length;a<n;a++)r=this._processFuncs[a],i=r(i);if(this.newline){let n=["win","windows","dos",`\r
`].includes(this.newline.toString().toLowerCase())?new m5:new g5,o=i.pipe(n);return i.on("error",u=>o.emit("error",u)),o}return i}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,i){let r=this.getTransferEncoding(),a,n,o=!1,u=p=>{o||(o=!0,i(p))},c=()=>{let p=0,d=()=>{if(p>=this.childNodes.length)return e.write(`\r
--`+this.boundary+`--\r
`),u();let m=this.childNodes[p++];e.write((p>1?`\r
`:"")+"--"+this.boundary+`\r
`),m.stream(e,t,f=>{if(f)return u(f);setImmediate(d)})};if(this.multipart)setImmediate(d);else return u()},l=()=>{if(this.content){if(Object.prototype.toString.call(this.content)==="[object Error]")return u(this.content);typeof this.content.pipe=="function"&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=d=>u(d),this.content.once("error",this._contentErrorHandler));let p=()=>{["quoted-printable","base64"].includes(r)?(a=new(r==="base64"?p5:l5).Encoder(t),a.pipe(e,{end:!1}),a.once("end",c),a.once("error",d=>u(d)),n=this._getStream(this.content),n.pipe(a)):(n=this._getStream(this.content),n.pipe(e,{end:!1}),n.once("end",c)),n.once("error",d=>u(d))};if(this.content._resolve){let d=[],m=0,f=!1,g=this._getStream(this.content);g.on("error",y=>{f||(f=!0,u(y))}),g.on("readable",()=>{let y;for(;(y=g.read())!==null;)d.push(y),m+=y.length}),g.on("end",()=>{f||(f=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(d,m),setImmediate(p))})}else setImmediate(p);return}else return setImmediate(c)};this._raw?setImmediate(()=>{if(Object.prototype.toString.call(this._raw)==="[object Error]")return u(this._raw);typeof this._raw.pipe=="function"&&this._raw.removeListener("error",this._contentErrorHandler);let p=this._getStream(this._raw);p.pipe(e,{end:!1}),p.on("error",d=>e.emit("error",d)),p.on("end",c)}):(e.write(this.buildHeaders()+`\r
\r
`),setImmediate(l))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter(r=>r&&r.address),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach(r=>{e[r]&&this._convertAddresses(this._parseAddresses(e[r]),this._envelope.to)}),this._envelope.to=this._envelope.to.map(r=>r.address).filter(r=>r);let i=["to","cc","bcc","from"];return Object.keys(e).forEach(r=>{i.includes(r)||(this._envelope[r]=e[r])}),this}getAddresses(){let e={};return this._headers.forEach(t=>{let i=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(i)&&(Array.isArray(e[i])||(e[i]=[]),this._convertAddresses(this._parseAddresses(t.value),e[i]))}),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach(t=>{let i=[];t.key==="From"||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),i),i.length&&i[0]&&(e.from=i[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)}),e.to=e.to.map(t=>t.address),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&typeof this._raw.pipe=="function"&&(this._contentErrorHandler=t=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=t},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let t;return e._resolvedValue?(t=new Ga,setImmediate(()=>{try{t.end(e._resolvedValue)}catch(i){t.emit("error",i)}}),t):typeof e.pipe=="function"?e:e&&typeof e.path=="string"&&!e.href?this.disableFileAccess?(t=new Ga,setImmediate(()=>t.emit("error",new Error("File access rejected for "+e.path))),t):o5.createReadStream(e.path):e&&typeof e.href=="string"?this.disableUrlAccess?(t=new Ga,setImmediate(()=>t.emit("error",new Error("Url access rejected for "+e.href))),t):d5(e.href,{headers:e.httpHeaders}):(t=new Ga,setImmediate(()=>{try{t.end(e||"")}catch(i){t.emit("error",i)}}),t)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map(t=>t&&t.address?(t.address=this._normalizeAddress(t.address),t.name=t.name||"",[t]):h5(t)))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,t=>t.toUpperCase()).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=/^multipart\//i.test(this.contentType)?this.contentType.substr(this.contentType.indexOf("/")+1):!1,this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e),e){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return t=(t||"").toString().replace(/\r?\n|\r/g," "),t.charAt(0)!=="<"&&(t="<"+t),t.charAt(t.length-1)!==">"&&(t=t+">"),t;case"References":return t=[].concat.apply([],[].concat(t||"").map(i=>(i=(i||"").toString().replace(/\r?\n|\r/g," ").trim(),i.replace(/<[^>]*>/g,r=>r.replace(/\s/g,"")).split(/\s+/)))).map(i=>(i.charAt(0)!=="<"&&(i="<"+i),i.charAt(i.length-1)!==">"&&(i=i+">"),i)),t.join(" ").trim();case"Date":return Object.prototype.toString.call(t)==="[object Date]"?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let i=[];return t=t||[],[].concat(e||[]).forEach(r=>{if(r.address)r.address=this._normalizeAddress(r.address),r.name?r.name&&i.push(`${this._encodeAddressName(r.name)} <${r.address}>`):i.push(r.address.indexOf(" ")>=0?`<${r.address}>`:`${r.address}`),r.address&&(t.filter(a=>a.address===r.address).length||t.push(r));else if(r.group){let a=(r.group.length?this._convertAddresses(r.group,t):"").trim();i.push(`${this._encodeAddressName(r.name)}:${a};`)}}),i.join(", ")}_normalizeAddress(e){e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim();let t=e.lastIndexOf("@");if(t<0)return e;let i=e.substr(0,t),r=e.substr(t+1),a;try{a=u5.toASCII(r.toLowerCase())}catch{}return i.indexOf(" ")>=0&&(i.charAt(0)!=='"'&&(i='"'+i),i.substr(-1)!=='"'&&(i=i+'"')),`${i}@${a}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':_t.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return _t.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t=this.textEncoding,i,r; Line truncated
`+e[t],e.splice(t,1));return e.filter(t=>t.trim()).map(t=>({key:t.substr(0,t.indexOf(":")).trim().toLowerCase(),line:t}))}};GC.exports=Td});var XC=O((Zie,JC)=>{"use strict";h();var b5=M("stream").Transform,w5=M("crypto"),Sd=class extends b5{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=w5.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=e.debug?[]:!1}updateHash(e){let t,i="",r="file";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(r==="file"&&(o===10||o===13))){if(r==="file"&&(o===9||o===32))r="line";else if(!(r==="line"&&(o===9||o===32))){if((r==="file"||r==="line")&&(r="body",n===e.length-1))break}}if(n===0){if(r==="file"&&(!this.remainder||/[\r\n]$/.test(this.remainder))||r==="line"&&(!this.remainder||/[ \t]$/.test(this.remainder))){this.remainder+=e.toString("binary");return}else if(r==="line"||r==="file"){i=e.toString("binary"),e=!1;break}}if(r==="body"){i=e.slice(n+1).toString("binary"),e=e.slice(0,n+1);break}}let a=!!this.remainder;if(e&&!a){for(let n=0,o=e.length;n<o;n++)if(n&&e[n]===10&&e[n-1]!==13){a=!0;break}else if(n&&e[n]===13&&e[n-1]===32){a=!0;break}else if(n&&e[n]===32&&e[n-1]===32){a=!0;break}else if(e[n]===9){a=!0;break}}a?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=i,t=t.replace(/\r?\n/g,`
`).replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,`\r
`),e=Buffer.from(t,"binary")):i&&(this.remainder=i),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,i){if(!e||!e.length)return i();typeof e=="string"&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),i()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from(`\r
`)),this.byteLength||this.push(Buffer.from(`\r
`)),this.emit("hash",this.bodyHash.digest("base64"),this.debug?Buffer.concat(this._debugBody):!1),e()}};JC.exports=Sd});var ZC=O((tre,Ad)=>{"use strict";h();var D5=ud(),k5=Wa(),v5=M("crypto");Ad.exports=(s,e,t,i)=>{i=i||{};let a=i.headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",n=YC(s,a,i.skipFields),o=E5(i.domainName,i.keySelector,n.fieldNames,e,t),u,c;n.headers+="dkim-signature:"+QC(o),u=v5.createSign(("rsa-"+e).toUpperCase()),u.update(n.headers);try{c=u.sign(i.privateKey,"base64")}catch{return!1}return o+c.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,`$&\r
`).trim()};Ad.exports.relaxedHeaders=YC;function E5(s,e,t,i,r){let a=["v=1","a=rsa-"+i,"c=relaxed/relaxed","d="+D5.toASCII(s),"q=dns/txt","s="+e,"bh="+r,"h="+t].join("; ");return k5.foldLines("DKIM-Signature: "+a,76)+`;\r
b=`}function YC(s,e,t){let i=new Set,r=new Set,a=new Map;(t||"").toLowerCase().split(":").forEach(u=>{r.add(u.trim())}),(e||"").toLowerCase().split(":").filter(u=>!r.has(u.trim())).forEach(u=>{i.add(u.trim())});for(let u=s.length-1;u>=0;u--){let c=s[u];i.has(c.key)&&!a.has(c.key)&&a.set(c.key,QC(c.line))}let n=[],o=[];return i.forEach(u=>{a.has(u)&&(o.push(u),n.push(u+":"+a.get(u)))}),{headers:n.join(`\r
`)+`\r
`,fieldNames:o.join(":")}}function QC(s){return s.substr(s.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}});var tT=O((ire,eT)=>{"use strict";h();var C5=KC(),T5=XC(),S5=ZC(),jd=M("stream").PassThrough,Pd=M("fs"),A5=M("path"),j5=M("crypto"),P5="sha256",F5=128*1024,Fd=class{constructor(e,t,i,r){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||F5,this.hashAlgo=this.options.hashAlgo||P5,this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=this.cacheDir?A5.join(this.cacheDir,"message."+Date.now()+"-"+j5.randomBytes(14).toString("hex")):!1,this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=i,this.output=r,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",a=>{this.hasErrored=!0,this.cleanup(),r.emit("error",a)})}cleanup(){!this.cache||!this.cachePath||Pd.unlink(this.cachePath,()=>!1)}createReadCache(){this.cache=Pd.createReadStream(this.cachePath),this.cache.once("error",e=>{this.cleanup(),this.output.emit("error",e)}),this.cache.once("close",()=>{this.cleanup()}),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(this.output.write(e)===!1)return this.output.once("drain",()=>{this.sendNextChunk()});setImmediate(()=>this.sendNextChunk())}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate(()=>this.sendNextChunk());let i=this.keys[e++],r=S5(this.headers,this.hashAlgo,this.bodyHash,{domainName:i.domainName,keySelector:i.keySelector,privateKey:i.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return r&&this.output.write(Buffer.from(r+`\r
`)),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=Pd.createWriteStream(this.cachePath),this.cache.once("error",e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",()=>{for(;this.relaxedBody.read()!==null;);}),this.hasErrored=!0,this.output.emit("error",e)}),this.cache.once("close",()=>{this.sendSignedOutput()}),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new C5,this.relaxedBody=new T5({hashAlgo:this.hashAlgo}),this.parser.on("headers",e=>{this.headers=e}),this.relaxedBody.on("hash",e=>{this.bodyHash=e}),this.relaxedBody.on("readable",()=>{let e;if(!this.cache){for(;(e=this.relaxedBody.read())!==null;)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()}}),this.relaxedBody.on("end",()=>{this.cache||this.sendSignedOutput()}),this.parser.pipe(this.relaxedBody),setImmediate(()=>this.input.pipe(this.parser))}},Id=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let i=new jd,r=e,a=!1;Buffer.isBuffer(e)?(a=e,r=new jd):typeof e=="string"&&(a=Buffer.from(e),r=new jd);let n=this.options;t&&Object.keys(t).length&&(n={},Object.keys(this.options||{}).forEach(u=>{n[u]=this.options[u]}),Object.keys(t||{}).forEach(u=>{u in n||(n[u]=t[u])}));let o=new Fd(n,this.keys,r,i);return setImmediate(()=>{o.signStream(),a&&setImmediate(()=>{r.end(a)})}),i}};eT.exports=Id});var nT=O((are,aT)=>{"use strict";h();var sT=M("net"),iT=M("tls"),I5=M("url");function rT(s,e,t,i){let r=I5.parse(s),a,n,o;a={host:r.hostname,port:Number(r.port)?Number(r.port):r.protocol==="https:"?443:80},r.protocol==="https:"?(a.rejectUnauthorized=!1,n=iT.connect.bind(iT)):n=sT.connect.bind(sT);let u=!1,c=p=>{if(!u){u=!0;try{o.destroy()}catch{}i(p)}},l=()=>{let p=new Error("Proxy socket timed out");p.code="ETIMEDOUT",c(p)};o=n(a,()=>{if(u)return;let p={Host:t+":"+e,Connection:"close"};r.auth&&(p["Proxy-Authorization"]="Basic "+Buffer.from(r.auth).toString("base64")),o.write("CONNECT "+t+":"+e+` HTTP/1.1\r
`+Object.keys(p).map(f=>f+": "+p[f]).join(`\r
`)+`\r
\r
`);let d="",m=f=>{let g,y;if(!u&&(d+=f.toString("binary"),g=d.match(/\r\n\r\n/))){if(o.removeListener("data",m),y=d.substr(g.index+g[0].length),d=d.substr(0,g.index),y&&o.unshift(Buffer.from(y,"binary")),u=!0,g=d.match(/^HTTP\/\d+\.\d+ (\d+)/i),!g||(g[1]||"").charAt(0)!=="2"){try{o.destroy()}catch{}return i(new Error("Invalid response from proxy"+(g&&": "+g[1]||"")))}return o.removeListener("error",c),o.removeListener("timeout",l),o.setTimeout(0),i(null,o)}};o.on("data",m)}),o.setTimeout(rT.timeout||30*1e3),o.on("timeout",l),o.once("error",c)}aT.exports=rT});var cT=O((ore,uT)=>{"use strict";h();var oT=rt(),_5=vd(),cr=Wa(),_d=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let i=e.options||{},r=e._defaults||{};Object.keys(t).forEach(a=>{this.data[a]=t[a]}),this.data.headers=this.data.headers||{},Object.keys(r).forEach(a=>{a in this.data?a==="headers"&&Object.keys(r.headers).forEach(n=>{n in this.data.headers||(this.data.headers[n]=r.headers[n])}):this.data[a]=r[a]}),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach(a=>{a in i&&(this.data[a]=i[a])})}resolveContent(...e){return oT.resolveContent(...e)}resolveAll(e){let t=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach((u,c)=>{t.push([this.data.alternatives,c])}),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach((u,c)=>{u.filename||(u.filename=(u.path||u.href||"").split("/").pop().split("?").shift()||"attachment-"+(c+1),u.filename.indexOf(".")<0&&(u.filename+="."+cr.detectExtension(u.contentType))),u.contentType||(u.contentType=cr.detectMimeType(u.filename||u.path||u.href||"bin")),t.push([this.data.attachments,c])});let i=new _5;["from","to","cc","bcc","sender","replyTo"].forEach(u=>{let c;this.message?c=[].concat(i._parseAddresses(this.message.getHeader(u==="replyTo"?"reply-to":u))||[]):this.data[u]&&(c=[].concat(i._parseAddresses(this.data[u])||[])),c&&c.length?this.data[u]=c:u in this.data&&(this.data[u]=null)}),["from","sender"].forEach(u=>{this.data[u]&&(this.data[u]=this.data[u].shift())});let n=0,o=()=>{if(n>=t.length)return e(null,this.data);let u=t[n++];if(!u[0]||!u[0][u[1]])return o();oT.resolveContent(...u,(c,l)=>{if(c)return e(c);let p={content:l};u[0][u[1]]&&typeof u[0][u[1]]=="object"&&!Buffer.isBuffer(u[0][u[1]])&&Object.keys(u[0][u[1]]).forEach(d=>{!(d in p)&&!["content","path","href","raw"].includes(d)&&(p[d]=u[0][u[1]][d])}),u[0][u[1]]=p,o()})};setImmediate(()=>o())}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),i=this.message.messageId();this.resolveAll((r,a)=>r?e(r):(a.envelope=t,a.messageId=i,["html","text","watchHtml","amp"].forEach(n=>{a[n]&&a[n].content&&(typeof a[n].content=="string"?a[n]=a[n].content:Buffer.isBuffer(a[n].content)&&(a[n]=a[n].content.toString()))}),a.icalEvent&&Buffer.isBuffer(a.icalEvent.content)&&(a.icalEvent.content=a.icalEvent.content.toString("base64"),a.icalEvent.encoding="base64"),a.alternatives&&a.alternatives.length&&a.alternatives.forEach(n=>{n&&n.content&&Buffer.isBuffer(n.content)&&(n.content=n.content.toString("base64"),n.encoding="base64")}),a.attachments&&a.attachments.length&&a.attachments.forEach(n=>{n&&n.content&&Buffer.isBuffer(n.content)&&(n.content=n.content.toString("base64"),n.encoding="base64")}),a.normalizedHeaders={},Object.keys(a.headers||{}).forEach(n=>{let o=[].concat(a.headers[n]||[]).shift();o=o&&o.value||o,o&&(["references","in-reply-to","message-id","content-id"].includes(n)&&(o=this.message._encodeHeaderValue(n,o)),a.normalizedHeaders[n]=o)}),a.list&&typeof a.list=="object"&&this._getListHeaders(a.list).forEach(o=>{a.normalizedHeaders[o.key]=o.value.map(u=>u&&u.value||u).join(", ")}),a.references&&(a.normalizedHeaders.references=this.message._encodeHeaderValue("references",a.references)),a.inReplyTo&&(a.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",a.inReplyTo)),e(null,a)))}setMailerHeader(){!this.message||!this.data.xMailer||this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(!(!this.message||!this.data.priority))switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low");break;default:}}setListHeaders(){!this.message||!this.data.list||typeof this.data.list!="object"||this.data.list&&typeof this.data.list=="object"&&this._getListHeaders(this.data.list).forEach(e=>{e.value.forEach(t=>{this.message.addHeader(e.key,t)})})}_getListHeaders(e){return Object.keys(e).map(t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map(i=>({prepared:!0,foldLines:!0,value:[].concat(i|| Line truncated
`)),u=n+1);a?(u<e.length&&(c=e.slice(u),r.push(c),a+=c.length),this.outByteCount+=a,this.push(Buffer.concat(r,a))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],i()}_flush(e){let t;this.lastByte===10?t=Buffer.from(`.\r
`):this.lastByte===13?t=Buffer.from(`
.\r
`):t=Buffer.from(`\r
.\r
`),this.outByteCount+=t.length,this.push(t),e()}};fT.exports=Od});var Zo=O((dre,DT)=>{"use strict";h();var W5=It(),G5=M("events").EventEmitter,gT=M("net"),yT=M("tls"),K5=M("os"),xT=M("crypto"),J5=mT(),bT=M("stream").PassThrough,hs=rt(),X5=2*60*1e3,wT=10*60*1e3,Y5=30*1e3,Q5=30*1e3,Ld=class extends G5{constructor(e){super(e),this.id=xT.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=e||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:gT.isIP(this.host)?!1:this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,typeof this.options.secure>"u"&&this.port===465&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=hs.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach(t=>{let i=(t||"").toString().trim().toUpperCase();i&&this.customAuth.set(i,this.options.customAuth[t])}),this.version=W5.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=t=>this._onData(t),this._onSocketError=t=>this._onError(t,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if(typeof e=="function"){this.once("connect",()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()});let r=this._isDestroyedMessage("connect");if(r)return e(this._formatError(r,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||Q5};this.options.localAddress&&(t.localAddress=this.options.localAddress);let i=()=>{this._connectionTimeout=setTimeout(()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")},this.options.connectionTimeout||X5),this._socket.on("error",this._onSocketError)};if(this.options.connection){this._socket=this.options.connection,i(),this.secureConnection&&!this.alreadySecured?setImmediate(()=>this._upgradeConnection(r=>{if(r){this._onError(new Error("Error initiating TLS - "+(r.message||r)),"ETLS",!1,"CONN");return}this._onConnect()})):setImmediate(()=>this._onConnect());return}else return this.options.socket?(this._socket=this.options.socket,hs.resolveHostname(t,(r,a)=>{if(r)return setImmediate(()=>this._onError(r,"EDNS",!1,"CONN"));this.logger.debug({tnx:"dns",source:t.host,resolved:a.host,cached:!!a.cached},"Resolved %s as %s [cache %s]",t.host,a.host,a.cached?"hit":"miss"),Object.keys(a).forEach(n=>{n.charAt(0)!=="_"&&a[n]&&(t[n]=a[n])});try{this._socket.connect(this.port,this.host,()=>{this._socket.setKeepAlive(!0),this._onConnect()}),i()}catch(n){return setImmediate(()=>this._onError(n,"ECONNECTION",!1,"CONN"))}})):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach(r=>{t[r]=this.options.tls[r]}),this.servername&&!t.servername&&(t.servername=this.servername),hs.resolveHostname(t,(r,a)=>{if(r)return setImmediate(()=>this._onError(r,"EDNS",!1,"CONN"));this.logger.debug({tnx:"dns",source:t.host,resolved:a.host,cached:!!a.cached},"Resolved %s as %s [cache %s]",t.host,a.host,a.cached?"hit":"miss"),Object.keys(a).forEach(n=>{n.charAt(0)!=="_"&&a[n]&&(t[n]=a[n])});try{this._socket=yT.connect(t,()=>{this._socket.setKeepAlive(!0),this._onConnect()}),i()}catch(n){return setImmediate(()=>this._onError(n,"ECONNECTION",!1,"CONN"))}})):hs.resolveHostname(t,(r,a)=>{if(r)return setImmediate(()=>this._onError(r,"EDNS",!1,"CONN"));this.logger.debug({tnx:"dns",source:t.host,resolved:a.host,cached:!!a.cached},"Resolved %s as %s [cache %s]",t.host,a.host,a.cached?"hit":"miss"),Object.keys(a).forEach(n=>{n.charAt(0)!=="_"&&a[n]&&(t[n]=a[n])});try{this._socket=gT.connect(t,()=>{this._socket.setKeepAlive(!0),this._onConnect()}),i()}catch(n){return setImmediate(()=>this._onError(n,"ECONNECTION",!1,"CONN"))}})}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";this.stage==="init"&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch{}this._destroy()}login(e,t){let i=this._isDestroyedMessage("login"); Line truncated
`).pop()))){this._responseQueue[this._responseQueue.length-1]+=`
`+i[a];continue}this._responseQueue.push(i[a])}this._responseQueue.length&&(r=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(r.split(`
`).pop()))||this._processResponse()}_onError(e,t,i,r){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),!this._destroyed&&(e=this._formatError(e,t,i,r),this.logger.error(i,e.message),this.emit("error",e),this.close())}_formatError(e,t,i,r){let a;/Error\]$/i.test(Object.prototype.toString.call(e))?a=e:a=new Error(e),t&&t!=="Error"&&(a.code=t),i&&(a.response=i,a.message+=": "+i);let n=typeof i=="string"&&Number((i.match(/^\d+/)||[])[0])||!1;return n&&(a.responseCode=n),r&&(a.command=r),a}_onClose(){let e=!1;if(this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed)return this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN");if(![this._actionGreeting,this.close].includes(this._responseActions[0])&&!this._destroyed)return this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN");if(/^[45]\d{2}\b/.test(e))return this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN");this._destroy()}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,i={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach(r=>{i[r]=this.options.tls[r]}),this.servername&&!i.servername&&(i.servername=this.servername),this.upgrading=!0;try{this._socket=yT.connect(i,()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0)))}catch(r){return e(r)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||wT),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split(`
`).pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate(()=>this._processResponse());let t=this._responseActions.shift();if(typeof t=="function")t.call(this,e),setImmediate(()=>this._processResponse());else return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN")}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+`\r
`,"utf-8"))}}_setEnvelope(e,t){let i=[],r=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map(a=>(a&&a.address||a||"").toString().trim()),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(r=!0);for(let a=0,n=this._envelope.to.length;a<n;a++){if(!this._envelope.to[a]||/[\r\n<>]/.test(this._envelope.to[a]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[a]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[a])&&(r=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(a){return t(this._formatError("Invalid DSN "+a.message,"EENVELOPE",!1,"API"))}this._responseActions.push(a=>{this._actionMAIL(a,t)}),r&&this._supportedExtensions.includes("SMTPUTF8")&&(i.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(i.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&i.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&i.push("RET="+hs.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&i.push("ENVID="+hs.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(i.length?" "+i.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL";break}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let i=(e.envid||e.id||"").toString()||null,r=e.notify||null;if(r){typeof r=="string"&&(r=r.split(",")),r=r.map(u=>u.trim().toUpperCase());let n=["NEVER","SUCCESS","FAILURE","DELAY"];if(r.filter(u=>!n.includes(u)).length||r.length>1&&r.includes("NEVER"))throw new Error("notify: "+JSON.stringify(r.join(",")));r=r.join(",")}let a=(e.recipient||e.orcpt||"").toString()||null;return a&&a.indexOf(";")<0&&(a="rfc822;"+a),{ret:t,envid:i,notify:r,orcpt:a}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+hs.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+hs.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t=new J5,i;return this.options.lmtp?this._envelope.accepted.forEach((r,a)=>{let n=a===this._envelope.accepted.length-1;this._responseActions.push(o=>{this._actionLMTPStream(r,n,o,e)})}):this._responseActions.push(r=>{this._actionSMTPStream(r,e)}),t.pipe(this._socket,{end:!1}),this.options.debug&&(i=new bT,i.on("readable",()=>{let r;for(;r=i.read();)this.logger.debug({tnx:"message"},r.toString("binary").replace(/\r?\n$/,""))}),t.pipe(i)),t.once("end",()=>{this.logger.info({tnx:"message",inByteCount:t.inByteCount,outByteCount:t.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",t.outByteCount,t.inByteCount)}),t}_actionGreeting(e){if(clearTimeout(this._greetingTimeout),e.substr(0,3)!=="220"){this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN");return}this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name))}_actionLHLO(e){if(e.charAt(0)!=="2"){this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO");return}this._actionEHLO(e)}_actionEHLO(e){let t;if(e.substr(0,3)==="421"){this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO");return}if(e.charAt(0)!=="2"){if(this.options.requireTLS){this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO");return}this._responseActions.push(this._actionHELO),this._sendCommand("HELO "+this.name);return}if(this._ehloLines=e.split(/\r?\n/).map(i=>i.replace(/^\d+[ -]/,"").trim()).filter(i=>i).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS)){this._sendCommand("STARTTLS"),this._responseActions.push(this._actionSTARTTLS);return}/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("P Line truncated
`].includes((e.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),r=e.message.messageId(),a,n,o;if([].concat(i.from||[]).concat(i.to||[]).some(l=>/^-/.test(l)))return t(new Error("Can not send mail. Invalid envelope addresses."));this.args?a=["-i"].concat(this.args).concat(i.to):a=["-i"].concat(i.from?["-f",i.from]:[]).concat(i.to);let c=l=>{if(!o&&(o=!0,typeof t=="function"))return l?t(l):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:r,response:"Messages queued for delivery"})};try{n=this._spawn(this.path,a)}catch(l){return this.logger.error({err:l,tnx:"spawn",messageId:r},"Error occurred while spawning sendmail. %s",l.message),c(l)}if(n){n.on("error",d=>{this.logger.error({err:d,tnx:"spawn",messageId:r},"Error occurred when sending message %s. %s",r,d.message),c(d)}),n.once("exit",d=>{if(!d)return c();let m;d===127?m=new Error("Sendmail command not found, process exited with code "+d):m=new Error("Sendmail exited with code "+d),this.logger.error({err:m,tnx:"stdin",messageId:r},"Error sending message %s to sendmail. %s",r,m.message),c(m)}),n.once("close",c),n.stdin.on("error",d=>{this.logger.error({err:d,tnx:"stdin",messageId:r},"Error occurred when piping message %s to sendmail. %s",r,d.message),c(d)});let l=[].concat(i.to||[]);l.length>3&&l.push("...and "+l.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:r},"Sending message %s to <%s>",r,l.join(", "));let p=e.message.createReadStream();p.once("error",d=>{this.logger.error({err:d,tnx:"stdin",messageId:r},"Error occurred when generating message %s. %s",r,d.message),n.kill("SIGINT"),c(d)}),p.pipe(n.stdin)}else return c(new Error("sendmail was not found"))}};NT.exports=Wd});var LT=O((Are,OT)=>{"use strict";h();var x9=It(),b9=rt(),Gd=class{constructor(e){e=e||{},this.options=e||{},this.name="StreamTransport",this.version=x9.version,this.logger=b9.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos",`\r
`].includes((e.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),r=e.message.messageId(),a=[].concat(i.to||[]);a.length>3&&a.push("...and "+a.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:r},"Sending message %s to <%s> using %s line breaks",r,a.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate(()=>{let n;try{n=e.message.createReadStream()}catch(c){return this.logger.error({err:c,tnx:"send",messageId:r},"Creating send stream failed for %s. %s",r,c.message),t(c)}if(!this.options.buffer)return n.once("error",c=>{this.logger.error({err:c,tnx:"send",messageId:r},"Failed creating message for %s. %s",r,c.message)}),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:r,message:n});let o=[],u=0;n.on("readable",()=>{let c;for(;(c=n.read())!==null;)o.push(c),u+=c.length}),n.once("error",c=>(this.logger.error({err:c,tnx:"send",messageId:r},"Failed creating message for %s. %s",r,c.message),t(c))),n.on("end",()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:r,message:Buffer.concat(o,u)}))})}};OT.exports=Gd});var MT=O((Pre,zT)=>{"use strict";h();var w9=It(),D9=rt(),Kd=class{constructor(e){e=e||{},this.options=e||{},this.name="JSONTransport",this.version=w9.version,this.logger=D9.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),r=e.message.messageId(),a=[].concat(i.to||[]);a.length>3&&a.push("...and "+a.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:r},"Composing JSON structure of %s to <%s>",r,a.join(", ")),setImmediate(()=>{e.normalize((n,o)=>n?(this.logger.error({err:n,tnx:"send",messageId:r},"Failed building JSON structure for %s. %s",r,n.message),t(n)):(delete o.envelope,delete o.normalizedHeaders,t(null,{envelope:i,messageId:r,message:this.options.skipEncoding?o:JSON.stringify(o)})))})}};zT.exports=Kd});var UT=O((Ire,qT)=>{"use strict";h();var k9=M("events"),v9=It(),RT=rt(),E9=bd(),Jd=class extends k9{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=v9.version,this.logger=RT.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate(()=>{this.idling&&this.emit("idle")})}send(e,t){if(this.connections>=this.maxConnections)return this.idling=!1,this.pending.push({mail:e,callback:t});if(!this._checkSendingRate())return this.idling=!1,this.pending.push({mail:e,callback:t});this._send(e,(...i)=>{setImmediate(()=>t(...i)),this._sent()})}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length){this.idling||(this.idling=!0,this.emit("idle"));return}let e=this.pending.shift();this._send(e.mail,(...t)=>{setImmediate(()=>e.callback(...t)),this._sent()})}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let r=this.rateMessages.length-1;r>=0;r--)this.rateMessages[r].ts>=e-this.rateInterval&&(!t||this.rateMessages[r].ts<t)&&(t=this.rateMessages[r].ts),this.rateMessages[r].ts<e-this.rateInterval&&!this.rateMessages[r].pending&&this.rateMessages.splice(r,1);if(this.rateMessages.length<this.sendingRate)return!0;let i=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout(()=>this._checkRatedQueue(),e-i);try{this.sendingRateTTL.unref()}catch{}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let i={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(i);let r=e.data.envelope||e.message.getEnvelope(),a=e.message.messageId(),n=[].concat(r.to||[]);n.length>3&&n.push("...and "+n.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:a},"Sending message %s to <%s>",a,n.join(", "));let o=u=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&typeof e.data._dkim.skipFields=="string"?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let c=e.message.createReadStream(),l=c.pipe(new E9),p=[],d=0;l.on("readable",()=>{let m;for(;(m=l.read())!==null;)p.push(m),d+=m.length}),c.once("error",m=>l.emit("error",m)),l.once("error",m=>{u(m)}),l.once("end",()=>u(null,Buffer.concat(p,d)))};setImmediate(()=>o((u,c)=>{if(u)return this.logger.error({err:u,tnx:"send",messageId:a},"Failed creating message for %s. %s",a,u.message),i.pending=!1,t(u);let l={RawMessage:{Data:c},Source:r.from,Destinations:r.to};Object.keys(e.data.ses||{}).forEach(f=>{l[f]=e.data.ses[f]});let p=(this.ses.aws?this.ses.ses:this.ses)||{},d=this.ses.aws||{};(f=>p.config&&typeof p.config.region=="function"?p.config.region().then(g=>f(null,g)).catch(g=>f(g)):f(null,p.config&&p.config.region||"us-east-1"))((f,g)=>{(f Line truncated
To: invalid@invalid\r
Subject: Invalid\r
\r
Invalid`},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise((o,u)=>{e=RT.callbackPromise(o,u)}));let n=o=>o&&(o.code||o.Code)!=="InvalidParameterValue"?e(o):e(null,!0);return typeof i.send=="function"&&r.SendRawEmailCommand?(a.RawMessage.Data=Buffer.from(a.RawMessage.Data),i.send(new r.SendRawEmailCommand(a),n)):i.sendRawEmail(a,n),t}};qT.exports=Jd});var WT=O((Nre,su)=>{"use strict";h();var C9=dT(),VT=rt(),T9=FT(),S9=_T(),A9=BT(),j9=LT(),P9=MT(),F9=UT(),I9=Ha(),HT=It(),_9=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),N9=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),$T=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,B9=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase()),Xa=!1;su.exports.createTransport=function(s,e){let t,i,r;return(typeof s=="object"&&typeof s.send!="function"||typeof s=="string"&&/^(smtps?|direct):/i.test(s))&&((t=typeof s=="string"?s:s.url)?i=VT.parseConnectionUrl(t):i=s,i.pool?s=new T9(i):i.sendmail?s=new A9(i):i.streamTransport?s=new j9(i):i.jsonTransport?s=new P9(i):i.SES?s=new F9(i):s=new S9(i)),r=new C9(s,i,e),r};su.exports.createTestAccount=function(s,e){let t;if(!e&&typeof s=="function"&&(e=s,s=!1),e||(t=new Promise((u,c)=>{e=VT.callbackPromise(u,c)})),B9&&Xa)return setImmediate(()=>e(null,Xa)),t;s=s||_9;let i=[],r=0,a={},n={requestor:HT.name,version:HT.version};$T&&(a.Authorization="Bearer "+$T);let o=I9(s+"/user",{contentType:"application/json",method:"POST",headers:a,body:Buffer.from(JSON.stringify(n))});return o.on("readable",()=>{let u;for(;(u=o.read())!==null;)i.push(u),r+=u.length}),o.once("error",u=>e(u)),o.once("end",()=>{let u=Buffer.concat(i,r),c,l;try{c=JSON.parse(u.toString())}catch(p){l=p}if(l)return e(l);if(c.status!=="success"||c.error)return e(new Error(c.error||"Request failed"));delete c.status,Xa=c,e(null,Xa)}),t};su.exports.getTestMessageUrl=function(s){if(!s||!s.response)return!1;let e=new Map;return s.response.replace(/\[([^\]]+)\]$/,(t,i)=>{i.replace(/\b([A-Z0-9]+)=([^\s]+)/g,(r,a,n)=>{e.set(a,n)})}),e.has("STATUS")&&e.has("MSGID")?(Xa.web||N9)+"/message/"+e.get("MSGID"):!1}});var JT=O((Ore,KT)=>{"use strict";h();var Xd=M("https"),Yd=M("http"),{URL:GT}=M("url"),Qd=class extends Yd.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...r}=e;super(r),this.proxy=typeof t=="string"?new GT(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let r=(this.proxy.protocol==="http:"?Yd:Xd).request(i);r.once("connect",(a,n,o)=>{r.removeAllListeners(),n.removeAllListeners(),a.statusCode===200?t(null,n):(n.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null))}),r.once("timeout",()=>{r.destroy(new Error("Proxy timeout"))}),r.once("error",a=>{r.removeAllListeners(),t(a,null)}),r.end()}},Zd=class extends Xd.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...r}=e;super(r),this.proxy=typeof t=="string"?new GT(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let r=(this.proxy.protocol==="http:"?Yd:Xd).request(i);r.once("connect",(a,n,o)=>{if(r.removeAllListeners(),n.removeAllListeners(),a.statusCode===200){let u=super.createConnection({...e,socket:n});t(null,u)}else n.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null)}),r.once("timeout",()=>{r.destroy(new Error("Proxy timeout"))}),r.once("error",a=>{r.removeAllListeners(),t(a,null)}),r.end()}};KT.exports={HttpProxyAgent:Qd,HttpsProxyAgent:Zd}});var XT={};pr(XT,{HttpProxyAgent:()=>L9,HttpsProxyAgent:()=>z9,default:()=>O9});var iu,O9,L9,z9,YT=k(()=>{h();iu=Dt(JT(),1),O9=iu.default,L9=iu.default.HttpProxyAgent,z9=iu.default.HttpsProxyAgent});h();go();Pe();h();h();lt();h();var Wo=Dt(f1(),1),nE=Dt(V1(),1);function ft(s){var e=s.use(Te),t=e.Type,i=e.builtInTypes,r=i.number;function a(c){return t.from(l=>r.check(l Line truncated
`}function G1(s,e,t){return s&&gE.call(s,e)?s[e]:t}function Bz(...s){let e={},t=s.length;for(let i=0;i<t;++i){let r=Object.keys(s[i]),a=r.length;for(let n=0;n<a;++n)e[r[n]]=!0}return e}function me(s,e){return s.line-e.line||s.column-e.column}function Bs(s){return{line:s.line,column:s.column}}function Oz(s,e){if(s){if(!e)return s}else return e||null;let t=new W1(s),i=new W1(e),r=new _z({file:e.file,sourceRoot:e.sourceRoot}),a={};return i.eachMapping(function(n){let o=t.originalPositionFor({line:n.originalLine,column:n.originalColumn}),u=o.source;if(u===null)return;r.addMapping({source:u,original:Bs(o),generated:{line:n.generatedLine,column:n.generatedColumn},name:n.name});let c=t.sourceContentFor(u);c&&!gE.call(a,u)&&(a[u]=c,r.setSourceContent(u,c))}),r.toJSON()}function yE(s,e){if(!s.loc)return null;let t={start:s.loc.start,end:s.loc.end};function i(r){_h(t,r.loc)}return s.declaration&&s.declaration.decorators&&Go(s)&&s.declaration.decorators.forEach(i),me(t.start,t.end)<0&&(t.start=Bs(t.start),e.skipSpaces(t.start,!1,!0),me(t.start,t.end)<0&&(t.end=Bs(t.end),e.skipSpaces(t.end,!0,!0))),s.comments&&s.comments.forEach(i),t}function _h(s,e){s&&e&&(me(e.start,s.start)<0&&(s.start=e.start),me(s.end,e.end)<0&&(s.end=e.end))}function Hh(s,e){let t=s.loc;if(t&&(t.start.line<1&&(t.start.line=1),t.end.line<1&&(t.end.line=1)),s.type==="File"&&(t.start=e.firstPos(),t.end=e.lastPos()),Lz(s,e),zz(s,e),t&&s.decorators)s.decorators.forEach(function(i){_h(t,i.loc)});else if(s.declaration&&Go(s)){s.declaration.loc=null;let i=s.declaration.decorators;i&&i.forEach(function(r){_h(t,r.loc)})}else if(_o.MethodDefinition&&_o.MethodDefinition.check(s)||_o.Property.check(s)&&(s.method||s.shorthand))s.value.loc=null,_o.FunctionExpression.check(s.value)&&(s.value.id=null);else if(s.type==="ObjectTypeProperty"){let i=s.loc,r=i&&i.end;r&&(r=Bs(r),e.prevPos(r)&&e.charAt(r)===","&&(r=e.skipSpaces(r,!0,!0))&&(i.end=r))}}function Lz(s,e){if(s.type!=="ForStatement")return;function t(i){let r=i&&i.loc,a=r&&r.start,n=r&&Bs(r.end);for(;a&&n&&me(a,n)<0&&(e.prevPos(n),e.charAt(n)===";");)r.end.line=n.line,r.end.column=n.column}t(s.init),t(s.test),t(s.update)}function zz(s,e){if(s.type==="TemplateLiteral"&&s.quasis.length!==0){if(s.loc){let t=Bs(s.loc.start),i=s.quasis[0];me(i.loc.start,t)<0&&(i.loc.start=t);let r=Bs(s.loc.end),a=s.quasis[s.quasis.length-1];me(r,a.loc.end)<0&&(a.loc.end=r)}s.expressions.forEach(function(t,i){let r=e.skipSpaces(t.loc.start,!0,!1);if(e.prevPos(r)&&e.charAt(r)==="{"&&e.prevPos(r)&&e.charAt(r)==="$"){let n=s.quasis[i];me(r,n.loc.end)<0&&(n.loc.end=r)}let a=e.skipSpaces(t.loc.end,!1,!1);if(e.charAt(a)==="}"){let n=s.quasis[i+1];me(n.loc.start,a)<0&&(n.loc.start=a)}})}}function Go(s){if(s)switch(s.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function xE(s){let e=s.getParentNode();return s.getName()==="declaration"&&Go(e)?e:null}function _a(s,e){let t=s.trailingComma;return typeof t=="object"?!!t[e]:!!t}var Nh={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:Nz(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},Mz=Nh.hasOwnProperty;function Ko(s){let e=s||Nh;function t(i){return Mz.call(e,i)?e[i]:Nh[i]}return{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas"),tokens:!!t("tokens")}}var Bh=class s{constructor(e,t,i=t){this.sourceLines=e,this.sourceLoc=t,this.targetLoc=i}slice(e,t,i=e.lastPos()){let r=this.sourceLines,a=this.sourceLoc,n=this.targetLoc;function o(u){let c=a[u],l=n[u],p=t;return u==="end"&&(p=i),Rz(r,c,e,l,p)}if(me(t,n.start)<=0)if(me(n.end,i)<=0)n={start:Ns(n.start,t.line,t.column),end:Ns(n.end,t.line,t.column)};else{if(me(i,n.start)<=0)return null;a={start:a.start,end:o("end")},n={start:Ns(n.start,t.line,t.column),end:Ns(i,t.line,t.column)}}else{if(me(n.end,t)<=0)return null;me(n.end,i)<=0?(a={start:o("start"),end:a.end},n={start:{line:1,column:0},end:Ns(n.end,t.line,t.column)}):(a={start:o("start"),end:o("end")},n={start:{line:1,column:0},end:Ns(i,t.line,t.column)})}return new s(this.sourceLines,a,n)}add(e,t){return new s(this.sourceLines,this.sourceLoc,{start:K1(this.targetLoc.start,e,t),end:K1(this.targetLoc.end,e,t)})}subtract(e,t){return new s Line truncated
`:i>=a.length?"":a.charAt(i)}charAt(e){let t=e.line,i=e.column,r=this,a=r.infos,n=a[t-1],o=i;if(typeof n>"u"||o<0)return"";let u=this.getIndentAt(t);return o<u?" ":(o+=n.sliceStart-u,o===n.sliceEnd&&t<this.length?`
`:o>=n.sliceEnd?"":n.line.charAt(o))}stripMargin(e,t){if(e===0)return this;if(t&&this.length===1)return this;let i=new s(this.infos.map(function(r,a){return r.line&&(a>0||!t)&&(r={...r,indent:Math.max(0,r.indent-e)}),r}));if(this.mappings.length>0){let r=i.mappings;this.mappings.forEach(function(a){r.push(a.indent(e,t,!0))})}return i}indent(e){if(e===0)return this;let t=new s(this.infos.map(function(i){return i.line&&!i.locked&&(i={...i,indent:i.indent+e}),i}));if(this.mappings.length>0){let i=t.mappings;this.mappings.forEach(function(r){i.push(r.indent(e))})}return t}indentTail(e){if(e===0)return this;if(this.length<2)return this;let t=new s(this.infos.map(function(i,r){return r>0&&i.line&&!i.locked&&(i={...i,indent:i.indent+e}),i}));if(this.mappings.length>0){let i=t.mappings;this.mappings.forEach(function(r){i.push(r.indent(e,!0))})}return t}lockIndentTail(){return this.length<2?this:new s(this.infos.map((e,t)=>({...e,locked:t>0})))}getIndentAt(e){return Math.max(this.infos[e-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let e=[],t=0;for(let a=1,n=this.length;a<=n;++a){let o=this.infos[a-1],u=o.line.slice(o.sliceStart,o.sliceEnd);if(sr(u))continue;let c=Math.abs(o.indent-t);e[c]=~~e[c]+1,t=o.indent}let i=-1,r=2;for(let a=1;a<e.length;a+=1)Oh.call(e,a)&&e[a]>i&&(i=e[a],r=a);return this.cachedTabWidth=r}startsWithComment(){if(this.infos.length===0)return!1;let e=this.infos[0],t=e.sliceStart,i=e.sliceEnd,r=e.line.slice(t,i).trim();return r.length===0||r.slice(0,2)==="//"||r.slice(0,2)==="/*"}isOnlyWhitespace(){return sr(this.toString())}isPrecededOnlyByWhitespace(e){let t=this.infos[e.line-1],i=Math.max(t.indent,0),r=e.column-i;if(r<=0)return!0;let a=t.sliceStart,n=Math.min(a+r,t.sliceEnd),o=t.line.slice(a,n);return sr(o)}getLineLength(e){let t=this.infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart}nextPos(e,t=!1){let i=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(i)?(e.column+=1,t?!!this.skipSpaces(e,!1,!0):!0):i<this.length?(e.line+=1,e.column=0,t?!!this.skipSpaces(e,!1,!0):!0):!1}prevPos(e,t=!1){let i=e.line,r=e.column;if(r<1){if(i-=1,i<1)return!1;r=this.getLineLength(i)}else r=Math.min(r-1,this.getLineLength(i));return e.line=i,e.column=r,t?!!this.skipSpaces(e,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(e,t=!1,i=!1){if(e?e=i?e:{line:e.line,column:e.column}:t?e=this.lastPos():e=this.firstPos(),t){for(;this.prevPos(e);)if(!sr(this.charAt(e))&&this.nextPos(e))return e;return null}else{for(;sr(this.charAt(e));)if(!this.nextPos(e))return null;return e}}trimLeft(){let e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):ii}trimRight(){let e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):ii}trim(){let e=this.skipSpaces(this.firstPos(),!1,!0);if(e===null)return ii;let t=this.skipSpaces(this.lastPos(),!0,!0);return t===null?ii:this.slice(e,t)}eachPos(e,t=this.firstPos(),i=!1){let r=this.firstPos();if(t&&(r.line=t.line,r.column=t.column),!(i&&!this.skipSpaces(r,!1,!0)))do e.call(this,r);while(this.nextPos(r,i))}bootstrapSlice(e,t){let i=this.toString().split(Lh).slice(e.line-1,t.line);return i.length>0&&(i.push(i.pop().slice(0,t.column)),i[0]=i[0].slice(e.column)),j(i.join(`
`))}slice(e,t){if(!t){if(!e)return this;t=this.lastPos()}if(!e)throw new Error("cannot slice with end but not start");let i=this.infos.slice(e.line-1,t.line);e.line===t.line?i[0]=ir(i[0],e.column,t.column):(i[0]=ir(i[0],e.column),i.push(ir(i.pop(),0,t.column)));let r=new s(i);if(this.mappings.length>0){let a=r.mappings;this.mappings.forEach(function(n){let o=n.slice(this,e,t);o&&a.push(o)},this)}return r}bootstrapSliceString(e,t,i){return this.slice(e,t).toString(i)}sliceString(e=this.firstPos(),t=this.lastPos(),i){let{tabWidth:r,useTabs:a,reuseWhitespace:n,lineTerminator:o}=Ko(i),u=[];for(let c=e.line;c<=t.line;++c){let l=this.infos[c-1];c===e.line?c===t.line?l=ir(l,e.column,t.column):l=ir(l,e.column):c===t.line&&(l=ir(l,0,t.column));let p=Math.max(l.indent,0),d=l.line.slice(0,l.sliceStart);if(n&&sr(d)&&bE(d,r)===p){u.push(l.line.slice(0,l.sliceEnd));continue}let m=0,f=p;a&&(m=Math.floor(p/r),f-=m*r);let g="";m>0&&(g+=new Array(m+1).join(" ")),f>0&&(g+=new Array(f+1).join(" ")),g+=l.line.slice(l.sliceStart,l.sliceEnd),u.push(g)}return u.join(o)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(e){let t=this,i=[],r=[],a;function n(c){if(c!==null){if(a){let l=c.infos[0],p=new Array(l.indent+1).join(" "),d=i.length,m=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+p+l.line.slice(l.sliceStart,l.sliceEnd),a.locked=a.locked||l.locked,a.sliceEnd=a.line.length,c.mappings.length>0&&c.mappings.forEach(function(f){r.push(f.add(d,m))})}else c.mappings.length>0&&r.push.apply(r,c.mappings);c.infos.forEach(function(l,p){(!a||p>0)&&(a={...l},i.push(a))})}}function o(c,l){l>0&&n(t),n(c)}if(e.map(function(c){let l=j(c);return l.isEmpty()?null:l}).forEach((c,l)=>{t.isEmpty()?n(c):o(c,l)}),i.length<1)return ii;let u=new s(i);return u.mappings=r,u}concat(...e){let t=[this];return t.push.apply(t,e),ii.join(t)}},Lo={},Oh=Lo.hasOwnProperty,Hz=10;function bE(s,e){let t=0,i=s.length;for(let r=0;r<i;++r)switch(s.charCodeAt(r)){case 9:{let a=Math.ceil(t/e)*e;a===t?t+=e:t=a;break}case 11:case 12:case 13:case 65279:break;case 32:default:t+=1;break}return t}var $z=/^\s*/,Lh=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function j(s,e){if(s instanceof nr)return s;s+="";let t=e&&e.tabWidth,i=s.indexOf(" ")<0,r=!e&&i&&s.length<=Hz;if(r&&Oh.call(Lo,s))return Lo[s];let a=new nr(s.split(Lh).map(function(n){let o=$z.exec(n)[0];return{line:n,indent:bE(o,t),locked:!1,sliceStart:o.length,sliceEnd:n.length}}),Ko(e).sourceFileName);return r&&(Lo[s]=a),a}function sr(s){return!/\S/.test(s)}function ir(s,e,t){let i=s.sliceStart,r=s.sliceEnd,a=Math.max(s.indent,0),n=a+r-i;return typeof t>"u"&&(t=n),e=Math.max(e,0),t=Math.min(t,n),t=Math.max(t,e),t<a?(a=t,r=i):r-=n-t,n=t,n-=e,e<a?a-=e:(e-=a,a=0,i+=e),s.indent===a&&s.sliceStart===i&&s.sliceEnd===r?s:{line:s.line,indent:a,locked:!1,sliceStart:i,sliceEnd:r}}function C(s){return ii.join(s)}var ii=j(""),or=Pt,wE=Ft.array,Vz=Ft.object,J1=new WeakMap;function DE(s,e,t){if(!s)return t;if(Hh(s,e),t){if(or.Node.check(s)&&or.SourceLocation.check(s.loc)){let r=t.length-1;for(;r>=0;--r){let a=t[r];if(a&&a.loc&&me(a.loc.end,s.loc.start)<=0)break}return t.splice(r+1,0,s),t}}else{let r=J1.get(s);if(r)return r}let i;if(wE.check(s))i=Object.keys(s);else if(Vz.check(s))i=jz(s);else return t;t||J1.set(s,t=[]);for(let r=0,a=i.length;r<a;++r)DE(s[i[r]],e,t);return t}function kE(s,e,t){let i=DE(s,t),r=0,a=i&&i.length,n,o;for(;typeof a=="number"&&r<a;){let u=r+a>>1,c=i[u];if(me(c.loc.start,e.loc.start)<=0&&me(e.loc.end,c.loc.end)<=0){kE(e.enclosingNode=c,e,t);return}if(me(c.loc.end,e.loc.start)<=0){n=c,r=u+1;continue}if(me(e.loc.end,c.loc.start)<=0){o=c,a=u;continue}throw new Error("Comment location overlaps with node location")}n&&(e.precedingNode=n),o&&(e.followingNode=o)}function Wz(s,e,t){if(!wE.check(s))return;let i=[];s.forEach(function(r){r.loc.lines=t,kE(e,r,t);let a=r.precedingNode,n=r.enclosingNode,o=r.followingNode;if(a&&o){let u=i.length;u>0&&i[u-1].followingNode!==r.followingNode&&Sa(i,t),i.push(r)}else if(a)Sa(i,t),EE(a,r);else if(o)Sa(i,t),vE(o,r);else if(n)Sa(i,t),Gz(n,r);else throw new Error("AST contains no nodes at all?")}),Sa(i,t),s.forEach(function(r){delete r.precedingNode,delete r.enclosingNode,delete r.followingNode})}function Sa(s,e){let t=s.length;if(t===0)return;let i=s[0].precedingNode,r=s[0].followingNode,a=r.loc.start,n=t,o;for(;n>0;--n){o=s[n-1];let u=e.sliceString(o.loc.end,a);if(/\S/.test(u))break;a=o.loc.start}for(;n<=t&&(o=s[n])&&(o.type==="Line"||o.type==="CommentLine")&&o.loc.start.column>r.loc.start.column;)++n;if(n){let{enclosingNode:u}=s[n-1];u?.type==="CallExpression"&&--n}s.forEach(function(u,c){c<n?EE(i,u):vE(r,u)}),s.length=0}function $h(s,e){(s.comments||(s.comments=[])).push(e)}function vE(s,e){e.leading=!0,e.trailing=!1,$h(s,e)}function Gz(s,e){e.leading=!1,e.trailing=!1,$h(s,e)}function EE(s,e){e.leading=!1,e.trailing=!0,$h(s,e)}function Kz(s,e){let t=s.getValue();or.Comment.assert(t);let i=t.loc,r=i&&i.lines,a=[e(s)];if(t.trailin Line truncated
`);else if(r instanceof nr){let n=r.slice(i.end,r.skipSpaces(i.end)||r.lastPos());n.length===1?a.push(n):a.push(new Array(n.length).join(`
`))}else a.push(`
`);return C(a)}function Jz(s,e){let t=s.getValue(s);or.Comment.assert(t);let i=t.loc,r=i&&i.lines,a=[];if(r instanceof nr){let n=r.skipSpaces(i.start,!0)||r.firstPos(),o=r.slice(n,i.start);o.length===1?a.push(o):a.push(new Array(o.length).join(`
`))}return a.push(e(s)),C(a)}function X1(s,e){let t=s.getValue(),i=e(s),r=or.Node.check(t)&&ps(t,"comments");if(!r||r.length===0)return i;let a=[],n=[i];return s.each(function(o){let u=o.getValue(),c=ps(u,"leading"),l=ps(u,"trailing");c||l&&!(or.Statement.check(t)||u.type==="Block"||u.type==="CommentBlock")?a.push(Kz(o,e)):l&&n.push(Jz(o,e))},"comments"),a.push.apply(a,n),C(a)}var Xz=Ma,Yz=Ft.object,Qz=Ft.array;function Zz(s,e){e=Ko(e);let t=j(s,e),i=t.toString({tabWidth:e.tabWidth,reuseWhitespace:!1,useTabs:!1}),r=[],a=e.parser.parse(i,{jsx:!0,loc:!0,locations:!0,range:e.range,comment:!0,onComment:r,tolerant:G1(e,"tolerant",!0),ecmaVersion:6,sourceType:G1(e,"sourceType","module")}),n=Array.isArray(a.tokens)?a.tokens:!1;delete a.tokens,n.forEach(function(l){typeof l.value!="string"&&(l.value=t.sliceString(l.loc.start,l.loc.end))}),Array.isArray(a.comments)&&(r=a.comments,delete a.comments),a.loc?Hh(a,t):a.loc={start:t.firstPos(),end:t.lastPos()},a.loc.lines=t,a.loc.indent=0;let o,u;a.type==="Program"?(u=a,o=Xz.file(a,e.sourceFileName||null),o.loc={start:t.firstPos(),end:t.lastPos(),lines:t,indent:0}):a.type==="File"&&(o=a,u=o.program),e.tokens&&(o.tokens=n);let c=yE({type:u.type,loc:u.loc,body:[],comments:r},t);return u.loc.start=c.start,u.loc.end=c.end,Wz(r,u.body.length?o.program:o,t),new CE(t,n).copy(o)}var CE=function(e,t){this.lines=e,this.tokens=t,this.startTokenIndex=0,this.endTokenIndex=t.length,this.indent=0,this.seen=new Map},TE=CE.prototype;TE.copy=function(s){if(this.seen.has(s))return this.seen.get(s);if(Qz.check(s)){let c=new Array(s.length);return this.seen.set(s,c),s.forEach(function(l,p){c[p]=this.copy(l)},this),c}if(!Yz.check(s))return s;Hh(s,this.lines);let e=Object.create(Object.getPrototypeOf(s),{original:{value:s,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(s,e);let t=s.loc,i=this.indent,r=i,a=this.startTokenIndex,n=this.endTokenIndex;t&&((s.type==="Block"||s.type==="Line"||s.type==="CommentBlock"||s.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(t.start))&&(r=this.indent=t.start.column),t.lines=this.lines,t.tokens=this.tokens,t.indent=r,this.findTokenRange(t));let o=Object.keys(s),u=o.length;for(let c=0;c<u;++c){let l=o[c];l==="loc"||l==="tokens"&&s.type==="File"?e[l]=s[l]:e[l]=this.copy(s[l])}return this.indent=i,this.startTokenIndex=a,this.endTokenIndex=n,e};TE.findTokenRange=function(s){for(;this.startTokenIndex>0;){let e=s.tokens[this.startTokenIndex];if(me(s.start,e.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<s.tokens.length;){let e=s.tokens[this.endTokenIndex];if(me(e.loc.end,s.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let e=s.tokens[this.startTokenIndex];if(me(e.loc.start,s.start)<0)++this.startTokenIndex;else break}for(s.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let e=s.tokens[this.endTokenIndex-1];if(me(s.end,e.loc.end)<0)--this.endTokenIndex;else break}s.end.token=this.endTokenIndex};var De=Pt,e4=Ft.array,t4=Ft.number,zh={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(s,e){s.forEach(function(t){zh[t]=e})});var jt=function(e){this.stack=[e]},Ue=jt.prototype;jt.from=function(s){if(s instanceof jt)return s.copy();if(s instanceof Fz){let e=Object.create(jt.prototype),t=[s.value];for(let i;i=s.parentPath;s=i)t.push(s.name,i.value);return e.stack=t.reverse(),e}return new jt(s)};Ue.copy=function(){let e=Object.create(jt.prototype);return e.stack=this.stack.slice(0),e};Ue.getName=function(){let e=this.stack,t=e.length;return t>1?e[t-2]:null};Ue.getValue=function(){let e=this.stack;return e[e.length-1]};Ue.valueIsDuplicate=function(){let s=this.stack,e=s.length-1;return s.lastIndexOf(s[e],e-1)>=0};function SE(s,e){let t=s.stack;for(let i=t.length-1;i>=0;i-=2){let r=t[i];if(De.Node.check(r)&&--e<0)return r}return null}Ue.getNode=function(e=0){return SE(this,~~e)};Ue.getParentNode=function(e=0){return SE(this,~~e+1)};Ue.getRootValue=function(){let e=this.stack;return e.length%2===0?e[1]:e[0]};Ue.call=function(e){let t=this.stack,i=t.length,r=t[i-1],a=arguments.length;for(let o=1;o<a;++o){let u=arguments[o];r=r[u],t.push(u,r)}let n=e(this);return t.length=i,n};Ue.each=function(e){let t=this.stack,i=t.length,r=t[i-1],a=arguments.length;for(let n=1;n<a;++n){let o=arguments[n];r=r[o],t.push(o,r)}for(let n=0;n<r.length;++n)n in r&&(t.push(n,r[n]),e(this),t.length-=2);t.length=i};Ue.map=function(e){let t=this.stack,i=t.length,r=t[i-1],a=arguments.length;for(let o=1;o<a;++o){let u=arguments[o];r=r[u],t.push(u,r)}let n=new Array(r.length);for(let o=0;o<r.length;++o)o in r&&(t.push(o,r[o]),n[o]=e(this,o),t.length-=2);return t.length=i,n};Ue.hasParens=function(){let s=this.getNode(),e=this.getPrevToken(s);if(!e)return!1;let t=this.getNextToken(s);return t?!!(e.value==="("&&(t.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&& Line truncated
`)},"directives"),i.interpreter&&r.push(s.call(t,"interpreter")),r.push(s.call(a=>rr(a,e,t),"body")),C(r);case"Noop":case"EmptyStatement":return j("");case"ExpressionStatement":return C([s.call(t,"expression"),";"]);case"ParenthesizedExpression":return C(["(",s.call(t,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return j(" ").join([s.call(t,"left"),i.operator,s.call(t,"right")]);case"AssignmentPattern":return C([s.call(t,"left")," = ",s.call(t,"right")]);case"MemberExpression":case"OptionalMemberExpression":{r.push(s.call(t,"object"));let a=s.call(t,"property"),n=ps(i,"optional");return i.computed?r.push(n?"?.[":"[",a,"]"):r.push(n?"?.":".",a),C(r)}case"ChainExpression":return s.call(t,"expression");case"MetaProperty":return C([s.call(t,"meta"),".",s.call(t,"property")]);case"BindExpression":return i.object&&r.push(s.call(t,"object")),r.push("::",s.call(t,"callee")),C(r);case"Path":return j(".").join(i.body);case"Identifier":return C([j(i.name,e),i.optional?"?":"",s.call(t,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return C(["...",s.call(t,"argument"),s.call(t,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return i.declare&&r.push("declare "),i.async&&r.push("async "),r.push("function"),i.generator&&r.push("*"),i.id?r.push(" ",s.call(t,"id"),s.call(t,"typeParameters")):i.typeParameters&&r.push(s.call(t,"typeParameters")),r.push("(",Gt(s,e,t),")",s.call(t,"returnType")),i.body&&r.push(" ",s.call(t,"body")),C(r);case"ArrowFunctionExpression":return i.async&&r.push("async "),i.typeParameters&&r.push(s.call(t,"typeParameters")),!e.arrowParensAlways&&i.params.length===1&&!i.rest&&i.params[0].type==="Identifier"&&!i.params[0].typeAnnotation&&!i.returnType?r.push(s.call(t,"params",0)):r.push("(",Gt(s,e,t),")",s.call(t,"returnType")),r.push(" => ",s.call(t,"body")),C(r);case"MethodDefinition":return Ph(s,e,t);case"YieldExpression":return r.push("yield"),i.delegate&&r.push("*"),i.argument&&r.push(" ",s.call(t,"argument")),C(r);case"AwaitExpression":return r.push("await"),i.all&&r.push("*"),i.argument&&r.push(" ",s.call(t,"argument")),C(r);case"ModuleExpression":return C([`module {
`,s.call(t,"body").indent(e.tabWidth),`
}`]);case"ModuleDeclaration":return r.push("module",s.call(t,"id")),i.source?r.push("from",s.call(t,"source")):r.push(s.call(t,"body")),j(" ").join(r);case"ImportSpecifier":return i.importKind&&i.importKind!=="value"&&r.push(i.importKind+" "),i.imported?(r.push(s.call(t,"imported")),i.local&&i.local.name!==i.imported.name&&r.push(" as ",s.call(t,"local"))):i.id&&(r.push(s.call(t,"id")),i.name&&r.push(" as ",s.call(t,"name"))),C(r);case"ExportSpecifier":return i.exportKind&&i.exportKind!=="value"&&r.push(i.exportKind+" "),i.local?(r.push(s.call(t,"local")),i.exported&&i.exported.name!==i.local.name&&r.push(" as ",s.call(t,"exported"))):i.id&&(r.push(s.call(t,"id")),i.name&&r.push(" as ",s.call(t,"name"))),C(r);case"ExportBatchSpecifier":return j("*");case"ImportNamespaceSpecifier":return r.push("* as "),i.local?r.push(s.call(t,"local")):i.id&&r.push(s.call(t,"id")),C(r);case"ImportDefaultSpecifier":return i.local?s.call(t,"local"):s.call(t,"id");case"TSExportAssignment":return C(["export = ",s.call(t,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return iE(s,e,t);case"ExportAllDeclaration":return r.push("export *"),i.exported&&r.push(" as ",s.call(t,"exported")),r.push(" from ",s.call(t,"source"),";"),C(r);case"TSNamespaceExportDeclaration":return r.push("export as namespace ",s.call(t,"id")),zo(C(r));case"ExportNamespaceSpecifier":return C(["* as ",s.call(t,"exported")]);case"ExportDefaultSpecifier":return s.call(t,"exported");case"Import":return j("import",e);case"ImportExpression":return C(["import(",s.call(t,"source"),")"]);case"ImportDeclaration":{if(r.push("import "),i.importKind&&i.importKind!=="value"&&r.push(i.importKind+" "),i.specifiers&&i.specifiers.length>0){let a=[],n=[];if(s.each(function(o){let u=o.getValue();u.type==="ImportSpecifier"?n.push(t(o)):(u.type==="ImportDefaultSpecifier"||u.type==="ImportNamespaceSpecifier")&&a.push(t(o))},"specifiers"),a.forEach((o,u)=>{u>0&&r.push(", "),r.push(o)}),n.length>0){let o=j(", ").join(n);o.getLineLength(1)>e.wrapColumn&&(o=C([j(`,
`).join(n).indent(e.tabWidth),","])),a.length>0&&r.push(", "),o.length>1?r.push(`{
`,o,`
}`):e.objectCurlySpacing?r.push("{ ",o," }"):r.push("{",o,"}")}r.push(" from ")}return r.push(s.call(t,"source"),NE(s,e,t),";"),C(r)}case"ImportAttribute":return C([s.call(t,"key"),": ",s.call(t,"value")]);case"StaticBlock":r.push("static ");case"BlockStatement":{let a=s.call(n=>rr(n,e,t),"body");return a.isEmpty()&&(!i.directives||i.directives.length===0)?(r.push("{}"),C(r)):(r.push(`{
`),i.directives&&s.each(function(n){r.push(zo(t(n).indent(e.tabWidth)),i.directives.length>1||!a.isEmpty()?`
`:"")},"directives"),r.push(a.indent(e.tabWidth)),r.push(`
}`),C(r))}case"ReturnStatement":{if(r.push("return"),i.argument){let a=s.call(t,"argument");a.startsWithComment()||a.length>1&&Ae.JSXElement&&Ae.JSXElement.check(i.argument)?r.push(` (
`,a.indent(e.tabWidth),`
)`):r.push(" ",a)}return r.push(";"),C(r)}case"CallExpression":case"OptionalCallExpression":return r.push(s.call(t,"callee")),i.typeParameters&&r.push(s.call(t,"typeParameters")),i.typeArguments&&r.push(s.call(t,"typeArguments")),ps(i,"optional")&&r.push("?."),r.push(sE(s,e,t)),C(r);case"RecordExpression":r.push("#");case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":{let a=i.type==="ObjectTypeAnnotation",n=e.flowObjectCommas?",":a?";":",",o=[],u=!1;a&&(o.push("indexers","callProperties"),i.internalSlots!=null&&o.push("internalSlots")),o.push("properties");let c=0;o.forEach(function(g){c+=i[g].length});let l=a&&c===1||c===0,p=i.exact?"{|":"{",d=i.exact?"|}":"}";r.push(l?p:p+`
`);let m=r.length-1,f=0;if(o.forEach(function(g){s.each(function(y){let w=t(y);l||(w=w.indent(e.tabWidth));let T=!a&&w.length>1;T&&u&&r.push(`
`),r.push(w),f<c-1?(r.push(n+(T?`
`:`
`)),u=!T):(c!==1&&a||!l&&_a(e,"objects")&&y.getValue().type!=="RestElement")&&r.push(n),f++},g)}),i.inexact){let g=j("...",e);l?(c>0&&r.push(n," "),r.push(g)):r.push(`
`,g.indent(e.tabWidth))}return r.push(l?d:`
`+d),f!==0&&l&&e.objectCurlySpacing&&(r[m]=p+" ",r[r.length-1]=" "+d),i.typeAnnotation&&r.push(s.call(t,"typeAnnotation")),C(r)}case"PropertyPattern":return C([s.call(t,"key"),": ",s.call(t,"pattern")]);case"ObjectProperty":case"Property":{if(i.method||i.kind==="get"||i.kind==="set")return Ph(s,e,t);if(i.shorthand&&i.value.type==="AssignmentPattern")return s.call(t,"value");let a=s.call(t,"key");return i.computed?r.push("[",a,"]"):r.push(a),(!i.shorthand||i.key.name!==i.value.name)&&r.push(": ",s.call(t,"value")),C(r)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return Ph(s,e,t);case"PrivateName":return C(["#",s.call(t,"id")]);case"Decorator":return C(["@",s.call(t,"expression")]);case"TupleExpression":r.push("#");case"ArrayExpression":case"ArrayPattern":{let n=i.elements.length,o=s.map(t,"elements"),c=j(", ").join(o).getLineLength(1)<=e.wrapColumn;return c?e.arrayBracketSpacing?r.push("[ "):r.push("["):r.push(`[
`),s.each(function(l){let p=l.getName();if(!l.getValue())r.push(",");else{let m=o[p];c?p>0&&r.push(" "):m=m.indent(e.tabWidth),r.push(m),(p<n-1||!c&&_a(e,"arrays"))&&r.push(","),c||r.push(`
`)}},"elements"),c&&e.arrayBracketSpacing?r.push(" ]"):r.push("]"),i.typeAnnotation&&r.push(s.call(t,"typeAnnotation")),C(r)}case"SequenceExpression":return j(", ").join(s.map(t,"expressions"));case"ThisExpression":return j("this");case"Super":return j("super");case"NullLiteral":return j("null");case"RegExpLiteral":return j(ar(i)||`/${i.pattern}/${i.flags||""}`,e);case"BigIntLiteral":return j(ar(i)||i.value+"n",e);case"NumericLiteral":return j(ar(i)||i.value,e);case"DecimalLiteral":return j(ar(i)||i.value+"m",e);case"StringLiteral":return j(Pa(i.value,e));case"BooleanLiteral":case"Literal":return j(ar(i)||(typeof i.value=="string"?Pa(i.value,e):i.value),e);case"Directive":return s.call(t,"value");case"DirectiveLiteral":return j(ar(i)||Pa(i.value,e),e);case"InterpreterDirective":return j(`#!${i.value}
`,e);case"ModuleSpecifier":if(i.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return j(Pa(i.value,e),e);case"UnaryExpression":return r.push(i.operator),/[a-z]$/.test(i.operator)&&r.push(" "),r.push(s.call(t,"argument")),C(r);case"UpdateExpression":return r.push(s.call(t,"argument"),i.operator),i.prefix&&r.reverse(),C(r);case"ConditionalExpression":return C([s.call(t,"test")," ? ",s.call(t,"consequent")," : ",s.call(t,"alternate")]);case"NewExpression":return r.push("new ",s.call(t,"callee")),i.typeParameters&&r.push(s.call(t,"typeParameters")),i.typeArguments&&r.push(s.call(t,"typeArguments")),i.arguments&&r.push(sE(s,e,t)),C(r);case"VariableDeclaration":{i.declare&&r.push("declare "),r.push(i.kind," ");let a=0,n=s.map(function(u){let c=t(u);return a=Math.max(c.length,a),c},"declarations");a===1?r.push(j(", ").join(n)):n.length>1?r.push(j(`,
`).join(n).indentTail(i.kind.length+1)):r.push(n[0]);let o=s.getParentNode();return!Ae.ForStatement.check(o)&&!Ae.ForInStatement.check(o)&&!(Ae.ForOfStatement&&Ae.ForOfStatement.check(o))&&!(Ae.ForAwaitStatement&&Ae.ForAwaitStatement.check(o))&&r.push(";"),C(r)}case"VariableDeclarator":return i.init?j(" = ").join([s.call(t,"id"),s.call(t,"init")]):s.call(t,"id");case"WithStatement":return C(["with (",s.call(t,"object"),") ",s.call(t,"body")]);case"IfStatement":{let a=si(s.call(t,"consequent"),e);return r.push("if (",s.call(t,"test"),")",a),i.alternate&&r.push(rE(a)?" else":`
else`,si(s.call(t,"alternate"),e)),C(r)}case"ForStatement":{let a=s.call(t,"init"),n=a.length>1?`;
`:"; ",o="for (",u=j(n).join([a,s.call(t,"test"),s.call(t,"update")]).indentTail(o.length),c=C([o,u,")"]),l=si(s.call(t,"body"),e);return r.push(c),c.length>1&&(r.push(`
`),l=l.trimLeft()),r.push(l),C(r)}case"WhileStatement":return C(["while (",s.call(t,"test"),")",si(s.call(t,"body"),e)]);case"ForInStatement":return C([i.each?"for each (":"for (",s.call(t,"left")," in ",s.call(t,"right"),")",si(s.call(t,"body"),e)]);case"ForOfStatement":case"ForAwaitStatement":return r.push("for "),(i.await||i.type==="ForAwaitStatement")&&r.push("await "),r.push("(",s.call(t,"left")," of ",s.call(t,"right"),")",si(s.call(t,"body"),e)),C(r);case"DoWhileStatement":{let a=C(["do",si(s.call(t,"body"),e)]);return r.push(a),rE(a)?r.push(" while"):r.push(`
while`),r.push(" (",s.call(t,"test"),");"),C(r)}case"DoExpression":{let a=s.call(n=>rr(n,e,t),"body");return C([`do {
`,a.indent(e.tabWidth),`
}`])}case"BreakStatement":return r.push("break"),i.label&&r.push(" ",s.call(t,"label")),r.push(";"),C(r);case"ContinueStatement":return r.push("continue"),i.label&&r.push(" ",s.call(t,"label")),r.push(";"),C(r);case"LabeledStatement":return C([s.call(t,"label"),`:
`,s.call(t,"body")]);case"TryStatement":return r.push("try ",s.call(t,"block")),i.handler?r.push(" ",s.call(t,"handler")):i.handlers&&s.each(function(a){r.push(" ",t(a))},"handlers"),i.finalizer&&r.push(" finally ",s.call(t,"finalizer")),C(r);case"CatchClause":return r.push("catch "),i.param&&r.push("(",s.call(t,"param")),i.guard&&r.push(" if ",s.call(t,"guard")),i.param&&r.push(") "),r.push(s.call(t,"body")),C(r);case"ThrowStatement":return C(["throw ",s.call(t,"argument"),";"]);case"SwitchStatement":return C(["switch (",s.call(t,"discriminant"),`) {
`,j(`
`).join(s.map(t,"cases")),`
}`]);case"SwitchCase":return i.test?r.push("case ",s.call(t,"test"),":"):r.push("default:"),i.consequent.length>0&&r.push(`
`,s.call(a=>rr(a,e,t),"consequent").indent(e.tabWidth)),C(r);case"DebuggerStatement":return j("debugger;");case"JSXAttribute":return r.push(s.call(t,"name")),i.value&&r.push("=",s.call(t,"value")),C(r);case"JSXIdentifier":return j(i.name,e);case"JSXNamespacedName":return j(":").join([s.call(t,"namespace"),s.call(t,"name")]);case"JSXMemberExpression":return j(".").join([s.call(t,"object"),s.call(t,"property")]);case"JSXSpreadAttribute":return C(["{...",s.call(t,"argument"),"}"]);case"JSXSpreadChild":return C(["{...",s.call(t,"expression"),"}"]);case"JSXExpressionContainer":return C(["{",s.call(t,"expression"),"}"]);case"JSXElement":case"JSXFragment":{let a="opening"+(i.type==="JSXElement"?"Element":"Fragment"),n="closing"+(i.type==="JSXElement"?"Element":"Fragment"),o=s.call(t,a);if(i[a].selfClosing)return o;let u=C(s.map(function(l){let p=l.getValue();if(Ae.Literal.check(p)&&typeof p.value=="string"){if(/\S/.test(p.value))return p.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(p.value))return`
`}return t(l)},"children")).indentTail(e.tabWidth),c=s.call(t,n);return C([o,u,c])}case"JSXOpeningElement":{r.push("<",s.call(t,"name"));let a=[];s.each(function(u){a.push(" ",t(u))},"attributes");let n=C(a);return(n.length>1||n.getLineLength(1)>e.wrapColumn)&&(a.forEach(function(u,c){u===" "&&(a[c]=`
`)}),n=C(a).indentTail(e.tabWidth)),r.push(n,i.selfClosing?" />":">"),C(r)}case"JSXClosingElement":return C(["</",s.call(t,"name"),">"]);case"JSXOpeningFragment":return j("<>");case"JSXClosingFragment":return j("</>");case"JSXText":return j(i.value,e);case"JSXEmptyExpression":return j("");case"TypeAnnotatedIdentifier":return C([s.call(t,"annotation")," ",s.call(t,"identifier")]);case"ClassBody":return i.body.length===0?j("{}"):C([`{
`,s.call(a=>rr(a,e,t),"body").indent(e.tabWidth),`
}`]);case"ClassPropertyDefinition":return r.push("static ",s.call(t,"definition")),Ae.MethodDefinition.check(i.definition)||r.push(";"),C(r);case"ClassProperty":{i.declare&&r.push("declare ");let a=i.accessibility||i.access;typeof a=="string"&&r.push(a," "),i.static&&r.push("static "),i.abstract&&r.push("abstract "),i.readonly&&r.push("readonly ");let n=s.call(t,"key");return i.computed&&(n=C(["[",n,"]"])),i.variance&&(n=C([ja(s,t),n])),r.push(n),i.optional&&r.push("?"),i.definite&&r.push("!"),i.typeAnnotation&&r.push(s.call(t,"typeAnnotation")),i.value&&r.push(" = ",s.call(t,"value")),r.push(";"),C(r)}case"ClassPrivateProperty":return i.static&&r.push("static "),r.push(s.call(t,"key")),i.typeAnnotation&&r.push(s.call(t,"typeAnnotation")),i.value&&r.push(" = ",s.call(t,"value")),r.push(";"),C(r);case"ClassAccessorProperty":return r.push(..._E(i),"accessor "),i.computed?r.push("[",s.call(t,"key"),"]"):r.push(s.call(t,"key")),i.optional&&r.push("?"),i.definite&&r.push("!"),i.typeAnnotation&&r.push(s.call(t,"typeAnnotation")),i.value&&r.push(" = ",s.call(t,"value")),r.push(";"),C(r);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return i.declare&&r.push("declare "),i.abstract&&r.push("abstract "),r.push("class"),i.id&&r.push(" ",s.call(t,"id")),i.typeParameters&&r.push(s.call(t,"typeParameters")),i.superClass&&r.push(" extends ",s.call(t,"superClass"),s.call(t,"superTypeParameters")),i.extends&&i.extends.length>0&&r.push(" extends ",j(", ").join(s.map(t,"extends"))),i.implements&&i.implements.length>0&&r.push(" implements ",j(", ").join(s.map(t,"implements"))),r.push(" ",s.call(t,"body")),i.type==="DeclareClass"?Aa(s,r):C(r);case"TemplateElement":return j(i.value.raw,e).lockIndentTail();case"TemplateLiteral":{let a=s.map(t,"expressions");return r.push("`"),s.each(function(n){let o=n.getName();r.push(t(n)),o<a.length&&r.push("${",a[o],"}")},"quasis"),r.push("`"),C(r).lockIndentTail()}case"TaggedTemplateExpression":return C([s.call(t,"tag"),s.call(t,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"Flow":case"FlowType":case"FlowPredicate":case"MemberTypeAnnotation":case"Type":case"TSHasOptionalTypeParameterInstantiation":case"TSHasOptionalTypeParameters":case"TSHasOptionalTypeAnnotation":case"ChainElement":throw new Error("unprintable type: "+JSON.stringify(i.type));case"CommentBlock":case"Block":return C(["/*",j(i.value,e),"*/"]);case"CommentLine":case"Line":return C(["//",j(i.value,e)]);case"TypeAnnotation":return i.typeAnnotation?(i.typeAnnotation.type!=="FunctionTypeAnnotation"&&r.push(": "),r.push(s.call(t,"typeAnnotation")),C(r)):j("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return j("*",e);case"EmptyTypeAnnotation":return j("empty",e);case"AnyTypeAnnotation":return j("any",e);case"MixedTypeAnnotation":return j("mixed",e);case"ArrayTypeAnnotation":return C([s.call(t,"elementType"),"[]"]);case"TupleTypeAnnotation":{let a=s.map(t,"types"),o=j(", ").join(a).getLineLength(1)<=e.wrapColumn;return o?e.arrayBracketSpacing?r.push("[ "):r.push("["):r.push(`[
`),s.each(function(u){let c=u.getName();if(!u.getValue())r.push(",");else{let p=a[c];o?c>0&&r.push(" "):p=p.indent(e.tabWidth),r.push(p),(c<i.types.length-1||!o&&_a(e,"arrays"))&&r.push(","),o||r.push(`
`)}},"types"),o&&e.arrayBracketSpacing?r.push(" ]"):r.push("]"),C(r)}case"BooleanTypeAnnotation":return j("boolean",e);case"BooleanLiteralTypeAnnotation":return j(""+i.value,e);case"InterfaceTypeAnnotation":return r.push("interface"),i.extends&&i.extends.length>0&&r.push(" extends ",j(", ").join(s.map(t,"extends"))),r.push(" ",s.call(t,"body")),C(r);case"DeclareFunction":return Aa(s,["function ",s.call(t,"id"),";"]);case"DeclareModule":return Aa(s,["module ",s.call(t,"id")," ",s.call(t,"body")]);case"DeclareModuleExports":return Aa(s,["module.exports",s.call(t,"typeAnnotation")]);case"DeclareVariable":return Aa(s,["var ",s.call(t,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return C(["declare ",iE(s,e,t)]);case"EnumDeclaration":return C(["enum ",s.call(t,"id"),s.call(t,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(i.type==="EnumSymbolBody"||i.explicitType)&&r.push(" of ",i.type.slice(4,-4).toLowerCase()),r.push(` {
`,j(`
`).join(s.map(t,"members")).indent(e.tabWidth),`
}`),C(r);case"EnumDefaultedMember":return C([s.call(t,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return C([s.call(t,"id")," = ",s.call(t,"init"),","]);case"InferredPredicate":return j("%checks",e);case"DeclaredPredicate":return C(["%checks(",s.call(t,"value"),")"]);case"FunctionTypeAnnotation":{let a=s.getParentNode(0),n=!(Ae.ObjectTypeCallProperty.check(a)||Ae.ObjectTypeInternalSlot.check(a)&&a.method||Ae.DeclareFunction.check(s.getParentNode(2)));n&&!Ae.FunctionTypeParam.check(a)&&!Ae.TypeAlias.check(a)&&r.push(": ");let u=!!i.typeParameters,c=u||i.params.length!==1||i.params[0].name;return r.push(u?s.call(t,"typeParameters"):"",c?"(":"",Gt(s,e,t),c?")":""),i.returnType&&r.push(n?" => ":": ",s.call(t,"returnType")),C(r)}case"FunctionTypeParam":{let a=s.call(t,"name");return r.push(a),i.optional&&r.push("?"),a.infos[0].line&&r.push(": "),r.push(s.call(t,"typeAnnotation")),C(r)}case"GenericTypeAnnotation":return C([s.call(t,"id"),s.call(t,"typeParameters")]);case"DeclareInterface":r.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":return i.declare&&r.push("declare "),r.push("interface ",s.call(t,"id"),s.call(t,"typeParameters")," "),i.extends&&i.extends.length>0&&r.push("extends ",j(", ").join(s.map(t,"extends"))," "),i.body&&r.push(s.call(t,"body")),C(r);case"ClassImplements":case"InterfaceExtends":return C([s.call(t,"id"),s.call(t,"typeParameters")]);case"IntersectionTypeAnnotation":return j(" & ").join(s.map(t,"types"));case"NullableTypeAnnotation":return C(["?",s.call(t,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return j("null",e);case"ThisTypeAnnotation":return j("this",e);case"NumberTypeAnnotation":return j("number",e);case"ObjectTypeCallProperty":return s.call(t,"value");case"ObjectTypeIndexer":return i.static&&r.push("static "),r.push(ja(s,t),"["),i.id&&r.push(s.call(t,"id"),": "),r.push(s.call(t,"key"),"]: ",s.call(t,"value")),C(r);case"ObjectTypeProperty":return C([ja(s,t),s.call(t,"key"),i.optional?"?":"",": ",s.call(t,"value")]);case"ObjectTypeInternalSlot":return C([i.static?"static ":"","[[",s.call(t,"id"),"]]",i.optional?"?":"",i.value.type!=="FunctionTypeAnnotation"?": ":"",s.call(t,"value")]);case"QualifiedTypeIdentifier":return C([s.call(t,"qualification"),".",s.call(t,"id")]);case"StringLiteralTypeAnnotation":return j(Pa(i.value,e),e);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return j(JSON.stringify(i.value),e);case"BigIntLiteralTypeAnnotation":return j(i.raw,e);case"StringTypeAnnotation":return j("string",e);case"DeclareTypeAlias":r.push("declare ");case"TypeAlias":return C(["type ",s.call(t,"id"),s.call(t,"typeParameters")," = ",s.call(t,"right"),";"]);case"DeclareOpaqueType":r.push("declare ");case"OpaqueType":return r.push("opaque type ",s.call(t,"id"),s.call(t,"typeParameters")),i.supertype&&r.push(": ",s.call(t,"supertype")),i.impltype&&r.push(" = ",s.call(t,"impltype")),r.push(";"),C(r);case"TypeCastExpression":return C(["(",s.call(t,"expression"),s.call(t,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return C(["<",j(", ").join(s.map(t,"params")),">"]);case"Variance":return i.kind==="plus"?j("+"):i.kind==="minus"?j("-"):j("");case"TypeParameter":return i.variance&&r.push(ja(s,t)),r.push(s.call(t,"name")),i.bound&&r.push(s.call(t,"bound")),i.default&&r.push("=",s.call(t,"default")),C(r);case"TypeofTypeAnnotation":return C([j("typeof ",e),s.call(t,"argument")]);case"IndexedAccessType":case"OptionalIndexedAccessType":return C([s.call(t,"objectType"),i.optional?"?.":"","[",s.call(t,"indexType"),"]"]);case"UnionTypeAnnotation":return j(" | ").join(s.map(t,"types"));case"VoidTypeAnnotation":return j("void",e);case"NullTypeAnnotation":return j("null",e);case"SymbolTypeAnnotation":return j("symbol",e);case"BigIntTypeAnnotation":return j("bigint",e);case"TSType":throw new Error("unprintable type: "+JSON.stringify(i.type));case"TSNumberKeyword":return j("number",e);case"TSBigIntKeyword":return j("bigint",e);case"TSObjectKeyword":return j("object",e);case"TSBooleanKeyword":return j("boolean",e);case"TSStringKeyword":return j("string",e);case"TSSymbolKeyword":return j("symbol",e);case"TSAnyKeyword":return j("any",e);case"TSVoidKeyword":return j("void",e);case"TSIntrinsicKeyword":return j("intrinsic",e);case"TSThisType":return j("this",e);case"TSNullKeyword":return j("null",e);case"TSUndefinedKeyword":return j("undefined",e);case"TSUnknownKeyword":return j("unknown",e);case"TSNeverKeyword":return j("never",e);case"TSArrayType":return C([s.call(t,"elementType"),"[]"]);case"TSLiteralType":return s.call(t,"literal");case"TSUnionType":return j(" | ").join(s.map(t,"types"));case"TSIntersectionType":return j(" & ").join(s.map(t,"types"));case"TSConditionalType":return r.push(s.call(t,"checkType")," extends ",s.call(t,"extendsType")," ? ",s.call(t,"trueType")," : ",s.call(t,"falseType")),C(r);case"TSInferType":return r.push("infer ",s.call(t,"typeParameter")),C( Line truncated
`,C(r).indent(e.tabWidth),`
}`]);case"TSTupleType":return C(["[",j(", ").join(s.map(t,"elementTypes")),"]"]);case"TSNamedTupleMember":return r.push(s.call(t,"label")),i.optional&&r.push("?"),r.push(": ",s.call(t,"elementType")),C(r);case"TSRestType":return C(["...",s.call(t,"typeAnnotation")]);case"TSOptionalType":return C([s.call(t,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return C([s.call(t,"objectType"),"[",s.call(t,"indexType"),"]"]);case"TSTypeOperator":return C([s.call(t,"operator")," ",s.call(t,"typeAnnotation")]);case"TSTypeLiteral":{let a=j(`
`).join(s.map(t,"members").map(n=>La(n)!==";"?n.concat(";"):n));return a.isEmpty()?j("{}",e):(r.push(`{
`,a.indent(e.tabWidth),`
}`),C(r))}case"TSEnumMember":return r.push(s.call(t,"id")),i.initializer&&r.push(" = ",s.call(t,"initializer")),C(r);case"TSTypeQuery":return C(["typeof ",s.call(t,"exprName")]);case"TSParameterProperty":return i.accessibility&&r.push(i.accessibility," "),i.export&&r.push("export "),i.static&&r.push("static "),i.readonly&&r.push("readonly "),r.push(s.call(t,"parameter")),C(r);case"TSTypeReference":return C([s.call(t,"typeName"),s.call(t,"typeParameters")]);case"TSQualifiedName":return C([s.call(t,"left"),".",s.call(t,"right")]);case"TSAsExpression":case"TSSatisfiesExpression":{let a=s.call(t,"expression");return r.push(a,i.type==="TSSatisfiesExpression"?" satisfies ":" as ",s.call(t,"typeAnnotation")),C(r)}case"TSTypeCastExpression":return C([s.call(t,"expression"),s.call(t,"typeAnnotation")]);case"TSNonNullExpression":return C([s.call(t,"expression"),"!"]);case"TSTypeAnnotation":return C([": ",s.call(t,"typeAnnotation")]);case"TSIndexSignature":return C([i.readonly?"readonly ":"","[",s.map(t,"parameters"),"]",s.call(t,"typeAnnotation")]);case"TSPropertySignature":return r.push(ja(s,t),i.readonly?"readonly ":""),i.computed?r.push("[",s.call(t,"key"),"]"):r.push(s.call(t,"key")),r.push(i.optional?"?":"",s.call(t,"typeAnnotation")),C(r);case"TSMethodSignature":return i.computed?r.push("[",s.call(t,"key"),"]"):r.push(s.call(t,"key")),i.optional&&r.push("?"),r.push(s.call(t,"typeParameters"),"(",Gt(s,e,t),")",s.call(t,"typeAnnotation")),C(r);case"TSTypePredicate":return i.asserts&&r.push("asserts "),r.push(s.call(t,"parameterName")),i.typeAnnotation&&r.push(" is ",s.call(t,"typeAnnotation","typeAnnotation")),C(r);case"TSCallSignatureDeclaration":return C([s.call(t,"typeParameters"),"(",Gt(s,e,t),")",s.call(t,"typeAnnotation")]);case"TSConstructSignatureDeclaration":return i.typeParameters?r.push("new",s.call(t,"typeParameters")):r.push("new "),r.push("(",Gt(s,e,t),")",s.call(t,"typeAnnotation")),C(r);case"TSTypeAliasDeclaration":return C([i.declare?"declare ":"","type ",s.call(t,"id"),s.call(t,"typeParameters")," = ",s.call(t,"typeAnnotation"),";"]);case"TSTypeParameter":{r.push(s.call(t,"name"));let a=s.getParentNode(0),n=Ae.TSMappedType.check(a);return i.constraint&&r.push(n?" in ":" extends ",s.call(t,"constraint")),i.default&&r.push(" = ",s.call(t,"default")),C(r)}case"TSTypeAssertion":return r.push("<",s.call(t,"typeAnnotation"),"> ",s.call(t,"expression")),C(r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return C(["<",j(", ").join(s.map(t,"params")),">"]);case"TSEnumDeclaration":{r.push(i.declare?"declare ":"",i.const?"const ":"","enum ",s.call(t,"id"));let a=j(`,
`).join(s.map(t,"members"));return a.isEmpty()?r.push(" {}"):r.push(` {
`,a.indent(e.tabWidth),`
}`),C(r)}case"TSExpressionWithTypeArguments":return C([s.call(t,"expression"),s.call(t,"typeParameters")]);case"TSInterfaceBody":{let a=j(`
`).join(s.map(t,"body").map(n=>La(n)!==";"?n.concat(";"):n));return a.isEmpty()?j("{}",e):C([`{
`,a.indent(e.tabWidth),`
}`])}case"TSImportType":return r.push("import(",s.call(t,"argument"),")"),i.qualifier&&r.push(".",s.call(t,"qualifier")),i.typeParameters&&r.push(s.call(t,"typeParameters")),C(r);case"TSImportEqualsDeclaration":return i.isExport&&r.push("export "),r.push("import ",s.call(t,"id")," = ",s.call(t,"moduleReference")),zo(C(r));case"TSExternalModuleReference":return C(["require(",s.call(t,"expression"),")"]);case"TSModuleDeclaration":return s.getParentNode().type==="TSModuleDeclaration"?r.push("."):(i.declare&&r.push("declare "),i.global||(i.id.type==="StringLiteral"||i.id.type==="Literal"&&typeof i.id.value=="string"||i.loc&&i.loc.lines&&i.id.loc&&i.loc.lines.sliceString(i.loc.start,i.id.loc.start).indexOf("module")>=0?r.push("module "):r.push("namespace "))),r.push(s.call(t,"id")),i.body&&(r.push(" "),r.push(s.call(t,"body"))),C(r);case"TSModuleBlock":{let a=s.call(n=>rr(n,e,t),"body");return a.isEmpty()?r.push("{}"):r.push(`{
`,a.indent(e.tabWidth),`
}`),C(r)}case"TSInstantiationExpression":return r.push(s.call(t,"expression"),s.call(t,"typeParameters")),C(r);case"V8IntrinsicIdentifier":return C(["%",s.call(t,"name")]);case"TopicReference":return j("#");case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(i.type))}}function f4(s,e){let t=[],i=s.getValue();return i.decorators&&i.decorators.length>0&&!xE(s)?s.each(function(r){t.push(e(r),`
`)},"decorators"):Go(i)&&i.declaration&&i.declaration.decorators&&s.each(function(r){t.push(e(r),`
`)},"declaration","decorators"),C(t)}function rr(s,e,t){let i=[];s.each(function(o){let u=o.getValue();u&&(u.type==="EmptyStatement"&&!(u.comments&&u.comments.length>0)||(Ae.Comment.check(u)||Ae.Statement.check(u)||Vh.assert(u),i.push({node:u,printed:t(o)})))});let r=null,a=i.length,n=[];return i.forEach(function(o,u){let c=o.printed,l=o.node,p=c.length>1,d=u>0,m=u<a-1,f,g,y=l&&l.loc&&l.loc.lines,w=y&&e.reuseWhitespace&&yE(l,y);if(d)if(w){let T=y.skipSpaces(w.start,!0),S=T?T.line:1,E=w.start.line-S;f=Array(E+1).join(`
`)}else f=p?`
`:`
`;else f="";if(m)if(w){let T=y.skipSpaces(w.end),E=(T?T.line:y.length)-w.end.line;g=Array(E+1).join(`
`)}else g=p?`
`:`
`;else g="";n.push(m4(r,f),c),m?r=g:g&&n.push(g)}),C(n)}function m4(s,e){if(!s&&!e)return j("");if(!s)return j(e);if(!e)return j(s);let t=j(s),i=j(e);return i.length>t.length?i:t}function _E(s){let e=[];s.declare&&e.push("declare ");let t=s.accessibility||s.access;return typeof t=="string"&&e.push(t," "),s.static&&e.push("static "),s.override&&e.push("override "),s.abstract&&e.push("abstract "),s.readonly&&e.push("readonly "),e}function Ph(s,e,t){let i=s.getNode(),r=i.kind,a=[],n=i.value;Ae.FunctionExpression.check(n)||(n=i),a.push(..._E(i)),n.async&&a.push("async "),n.generator&&a.push("*"),(r==="get"||r==="set")&&a.push(r," ");let o=s.call(t,"key");return i.computed&&(o=C(["[",o,"]"])),a.push(o),i.optional&&a.push("?"),i===n?(a.push(s.call(t,"typeParameters"),"(",Gt(s,e,t),")",s.call(t,"returnType")),i.body?a.push(" ",s.call(t,"body")):a.push(";")):(a.push(s.call(t,"value","typeParameters"),"(",s.call(u=>Gt(u,e,t),"value"),")",s.call(t,"value","returnType")),n.body?a.push(" ",s.call(t,"value","body")):a.push(";")),C(a)}function sE(s,e,t){let i=s.map(t,"arguments"),r=_a(e,"parameters"),a=j(", ").join(i);return a.getLineLength(1)>e.wrapColumn?(a=j(`,
`).join(i),C([`(
`,a.indent(e.tabWidth),r?`,
)`:`
)`])):C(["(",a,")"])}function Gt(s,e,t){let i=s.getValue(),r,a=[];i.params?(r=i.params,a=s.map(t,"params")):i.parameters&&(r=i.parameters,a=s.map(t,"parameters")),i.defaults&&s.each(function(o){let u=o.getName(),c=a[u];c&&o.getValue()&&(a[u]=C([c," = ",t(o)]))},"defaults"),i.rest&&a.push(C(["...",s.call(t,"rest")]));let n=j(", ").join(a);return n.length>1||n.getLineLength(1)>e.wrapColumn?(n=j(`,
`).join(a),_a(e,"parameters")&&!i.rest&&r[r.length-1].type!=="RestElement"?n=C([n,`,
`]):n=C([n,`
`]),C([`
`,n.indent(e.tabWidth)])):n}function NE(s,e,t){let i=s.getValue();if(i.assertions&&i.assertions.length>0){let r=[" assert {"],a=s.map(t,"assertions"),n=j(", ").join(a);return n.length>1||n.getLineLength(1)>e.wrapColumn?r.push(`
`,j(`,
`).join(a).indent(e.tabWidth),`
}`):r.push(" ",n," }"),C(r)}return j("")}function iE(s,e,t){let i=s.getValue(),r=["export "];i.exportKind&&i.exportKind==="type"&&(i.declaration||r.push("type "));let a=e.objectCurlySpacing;if(Ae.Declaration.assert(i),(i.default||i.type==="ExportDefaultDeclaration")&&r.push("default "),i.declaration)r.push(s.call(t,"declaration"));else if(i.specifiers){if(i.specifiers.length===1&&i.specifiers[0].type==="ExportBatchSpecifier")r.push("*");else if(i.specifiers.length===0)r.push("{}");else if(i.specifiers[0].type==="ExportDefaultSpecifier"){let o=[],u=[];if(s.each(function(c){c.getValue().type==="ExportDefaultSpecifier"?o.push(t(c)):u.push(t(c))},"specifiers"),o.forEach((c,l)=>{l>0&&r.push(", "),r.push(c)}),u.length>0){let c=j(", ").join(u);c.getLineLength(1)>e.wrapColumn&&(c=C([j(`,
`).join(u).indent(e.tabWidth),","])),o.length>0&&r.push(", "),c.length>1?r.push(`{
`,c,`
}`):e.objectCurlySpacing?r.push("{ ",c," }"):r.push("{",c,"}")}}else r.push(a?"{ ":"{",j(", ").join(s.map(t,"specifiers")),a?" }":"}");i.source&&r.push(" from ",s.call(t,"source"),NE(s,e,t))}let n=C(r);return La(n)!==";"&&!(i.declaration&&(i.declaration.type==="FunctionDeclaration"||i.declaration.type==="ClassDeclaration"||i.declaration.type==="TSModuleDeclaration"||i.declaration.type==="TSInterfaceDeclaration"||i.declaration.type==="TSEnumDeclaration"))&&(n=C([n,";"])),n}function Aa(s,e){return xE(s)||e.unshift("declare "),C(e)}function ja(s,e){return s.call(function(t){let i=t.getValue();return i?i==="plus"?j("+"):i==="minus"?j("-"):e(t):j("")},"variance")}function si(s,e){return s.length>1?C([" ",s]):C([`
`,zo(s).indent(e.tabWidth)])}function La(s){let e=s.lastPos();do{let t=s.charAt(e);if(/\S/.test(t))return t}while(s.prevPos(e))}function rE(s){return La(s)==="}"}function No(s){return s.replace(/['"]/g,e=>e==='"'?"'":'"')}function ar(s){let e=ps(s,"value"),t=ps(s,"extra");if(t&&typeof t.raw=="string"&&e==t.rawValue)return t.raw;if(s.type==="Literal"){let i=s.raw;if(typeof i=="string"&&e==i)return i}}function Bo(s){return JSON.stringify(s).replace(/[\u2028\u2029]/g,function(e){return"\\u"+e.charCodeAt(0).toString(16)})}function Pa(s,e){switch(Vh.assert(s),e.quote){case"auto":{let t=Bo(s),i=No(Bo(No(s)));return t.length>i.length?i:t}case"single":return No(Bo(No(s)));case"double":default:return Bo(s)}}function zo(s){let e=La(s);return!e||`
};`.indexOf(e)<0?C([s,";"]):s}function g4(s,e){return new h4(e).print(s)}var Oo;function y4(){if(Oo)return Oo;let s=x4();return Oo={parse(e,t){return nE.parse(e,{...s,...t})}},Oo}function x4(){return{sourceType:"module",strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic","jsx","typescript"]}}var b4=Object.defineProperty,w4=(s,e,t)=>e in s?b4(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,aE=(s,e,t)=>(w4(s,typeof e!="symbol"?e+"":e,t),t),st=class extends Error{constructor(e,t){if(super(""),aE(this,"rawMessage"),aE(this,"options"),this.name="MagicastError",this.rawMessage=e,this.options=t,t?.ast&&t?.code&&t.ast.loc){let{line:i,column:r}=t.ast.loc.start,a=t.code.split(`
`),n=Math.max(0,i-3),o=Math.min(a.length,i+3),u=a.slice(n,o).map((c,l)=>(c=`${(n+l+1).toString().padStart(3," ")} | ${c}`,n+l===i-1&&(c+=`
${" ".repeat(6+r)}^`),c));e+=`
${u.join(`
`)}
`}this.message=e}},D4=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),BE=new Set(["string","number","boolean","bigint","symbol","undefined"]),Ie=Ma;function k4(s){return/^[$A-Z_a-z][\w$]*$/.test(s)}var Wh="__magicast_proxy";function bt(s,e=new Set){if(s===void 0)return Ie.identifier("undefined");if(s===null)return Ie.literal(null);if(BE.has(typeof s))return Ie.literal(s);if(e.has(s))throw new st("Can not serialize circular reference");if(e.add(s),s[Wh])return s.$ast;if(s instanceof RegExp){let t=Ie.regExpLiteral(s.source,s.flags);return delete t.extra.raw,t}return s instanceof Set?Ie.newExpression(Ie.identifier("Set"),[Ie.arrayExpression([...s].map(t=>bt(t,e)))]):s instanceof Date?Ie.newExpression(Ie.identifier("Date"),[Ie.literal(s.toISOString())]):s instanceof Map?Ie.newExpression(Ie.identifier("Map"),[Ie.arrayExpression([...s].map(([t,i])=>Ie.arrayExpression([bt(t,e),bt(i,e)])))]):Array.isArray(s)?Ie.arrayExpression(s.map(t=>bt(t,e))):typeof s=="object"?Ie.objectExpression(Object.entries(s).map(([t,i])=>Ie.property("init",/^[$A-Z_a-z][\w$]*$/g.test(t)?Ie.identifier(t):Ie.literal(t),bt(i,e)))):Ie.literal(s)}function v4(s,e={}){let t=e;return t[Wh]=!0,t.$ast=s,t.$type||(t.$type="object"),t}var E4={enumerable:!0,configurable:!0};function wt(s,e,t){let i=v4(s,e);return new Proxy({},{ownKeys(){return Object.keys(i).filter(r=>r!==Wh&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return E4},has(r,a){return a in i},...t,get(r,a,n){if(a in i)return i[a];if(t.get)return t.get(r,a,n)},set(r,a,n,o){return a in i?(i[a]=n,!0):t.set?t.set(r,a,n,o):!1}})}var dt=Ma,Fh=new WeakMap;function C4(s,e,t){if(Fh.has(e))return Fh.get(e);let i=wt(e,{get $declaration(){return s},get imported(){return e.type==="ImportDefaultSpecifier"?"default":e.type==="ImportNamespaceSpecifier"?"*":e.imported.type==="Identifier"?e.imported.name:e.imported.value},set imported(r){if(e.type!=="ImportSpecifier")throw new st("Changing import name is not yet implemented");e.imported.type==="Identifier"?e.imported.name=r:e.imported.value=r},get local(){return e.local.name},set local(r){e.local.name=r},get from(){return s.source.value},set from(r){if(r===s.source.value)return;s.specifiers=s.specifiers.filter(n=>n!==e),s.specifiers.length===0&&(t.body=t.body.filter(n=>n!==s));let a=t.body.find(n=>n.type==="ImportDeclaration"&&n.source.value===r);a?a.specifiers.push(e):t.body.unshift(dt.importDeclaration([e],dt.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Fh.set(e,i),i}function T4(s,e){let t=()=>{let n=[];for(let o of s.body)if(o.type==="ImportDeclaration")for(let u of o.specifiers)n.push(C4(o,u,s));return n},i=(n,o,u)=>{let c=t(),l=c.find(f=>f.local===n),p=o.local||n;if(l)return l.imported=o.imported,l.local=p,l.from=o.from,!0;let d=o.imported==="default"?dt.importDefaultSpecifier(dt.identifier(p)):o.imported==="*"?dt.importNamespaceSpecifier(dt.identifier(p)):dt.importSpecifier(dt.identifier(o.imported),dt.identifier(p)),m=c.find(f=>f.from===o.from)?.$declaration;if(m)m.specifiers.push(d);else if(u==="prepend"||c.length===0)s.body.unshift(dt.importDeclaration([d],dt.stringLiteral(o.from)));else{let f=c.at(-1).$declaration,g=s.body.indexOf(f);s.body.splice(g+1,0,dt.importDeclaration([d],dt.stringLiteral(o.from)))}return!0},r=n=>{let o=t().find(l=>l.local===n);if(!o)return!1;let u=o.$declaration,c=o.$ast;return u.specifiers=u.specifiers.filter(l=>l!==c),u.specifiers.length===0&&(s.body=s.body.filter(l=>l!==u)),!0};return wt(s,{$type:"imports",$add(n){i(n.local||n.imported,n,"prepend")},$prepend(n){i(n.local||n.imported,n,"prepend")},$append(n){i(n.local||n.imported,n,"append")},get $items(){return t()},toJSON(){return t().reduce((n,o)=>(n[o.local]=o,n),{})}},{get(n,o){return t().find(u=>u.local===o)},set(n,o,u){return i(o,u,"prepend")},deleteProperty(n,o){return r(o)},ownKeys(){return t().map(n=>n.local)},has(n,o){return t().some(u=>u.local===o)}})}function Jo(s,e,t){let i=a=>e[a],r=(a,n)=>{e[a]=n};return wt(s,{$type:"array",push(a){e.push(bt(a))},pop(){return nt(e.pop(),t)},unshift(a){e.unshift(bt(a))},shift(){return nt(e.shift(),t)},splice(a,n,...o){return e.splice(a,n,...o.map(c=>bt(c))).map(c=>nt(c,t))},find(a){return e.map(n=>nt(n,t)).find(a)},findIndex(a){return e.map(n=>nt(n,t)).findIndex(a)},includes(a){return e.map(n=>nt(n,t)).includes(a)},toJSON(){return e.map(a=>nt(a,t))}},{get(a,n){if(n==="length")return e.length;if(n===Symbol.iterator)return function*(){for(let c of e)yield nt(c,t)};if(typeof n=="symbol")return;let o=+n;if(Number.isNaN(o))return;let u=i(o);if(u)return nt(u,t)},set(a,n,o){if(typeof n=="symbol")return!1;let u=+n;return Number.isNaN(u)?!1:(r(u,bt(o)),!0)},deleteProperty(a,n){if(typeof n=="symbol")return!1;let o=+n;return Number.isNaN(o)?!1:(e[o]=bt(void 0),!0)},ownKeys(){return["length",...e.map((a,n)=>n.toString())]}})}function S4(s,e){if("elements Line truncated
`),p=!1;for(let d of l){let m=d.trim();if(m.length!==0){if(t.wrapColumn&&d.length>n&&(n=d.length),t.indent){let f=d.match(/^\s+/)?.[0]||"";f.length>0&&(f.length>0&&f.length<i&&(i=f.length),f[0]===" "?r++:f.length>0&&r--)}if(m.at(-1)===";"?a++:m.length>0&&a--,t.quote||t.arrowParens){let f=m.matchAll(u);for(let g of f)if(g.groups)for(let y in c)g.groups[y]&&c[y]++}t.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?o++:o--),p=m.endsWith(","))}}return{wrapColumn:n,useTabs:r>0,tabWidth:i,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:a>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...e}}function Xo(s,e){let t=Zz(s,{parser:e?.parser||y4(),...e});return L4(t,s)}function Ra(s,e={}){let t=s.$ast||s,i=e.format===!1||!("$code"in s)?{}:z4(s.$code,e.format),{code:r,map:a}=g4(t,{...e,...i});return{code:r,map:a}}async function OE(s){let e=await import(s);return e.default||e}function LE(s,e,t){let i=Xo(s),r=i.exports.default.$ast,a=r?.name?i.exports[r.name]:i.exports.default;return ds(a,e,t),Ra(i).code}h();lt();function Yo(s){return new Function("$env",`const $ENV = $env;return ${s}`)(process.env)}function zE(s,e,t){let i=Xo(`export default ${s}`);ds(i.exports.default,e,t);let{code:r}=Ra(i);return r.replace("export default ","").replace(/;$/g,"")}h();lt();import{readFileSync as M4,writeFileSync as R4}from"node:fs";import{extname as q4}from"node:path";function U4(s,e,t){let i=M4(s,"utf8");switch(q4(s)){case".json":{let r=Yo(i);return ds(r,e,t),JSON.stringify(r,null,2)}case".json5":return zE(i,e,t);case".js":case".ts":case".mjs":case".mts":case".cjs":case".cts":return LE(i,e,t);default:return}}function ME(s,e,t){try{let i=U4(s,e,t);i&&R4(s,i)}catch(i){return console.error(i),i}}import{existsSync as RE,readFileSync as H4}from"node:fs";import{dirname as qE,extname as UE,join as $4}from"node:path";import{fileURLToPath as V4}from"node:url";var W4=qE(V4(import.meta.url));function G4(){try{if([".js",".mjs",".cjs"].find(s=>s===UE(process.argv[1])))return qE(process.argv[1])}catch{}return W4}function K4(){let s=process.cwd(),e=["asign.json","asign.json5","asign.config.js","asign.config.mjs","asign.config.cjs"],t=G4(),i=[s,`${s}/config`,t,`${t}/config`];for(let r of i)for(let a of e)if(RE($4(r,a)))return`${r}/${a}`}async function J4(s){switch(UE(s)){case".json":case".json5":return Yo(H4(s,"utf8"));case".js":case".mjs":case".cjs":return await OE(s);default:return}}async function HE(s){if(s&&!RE(s))throw new Error("找不到配置文件");let e=s||K4();if(!e)throw new Error("找不到配置文件");let t=await J4(e);return{path:e,config:t}}lt();h();go();h();var $E={shake:{enable:!0,num:15,delay:2},garden:{enable:!1,inviteCodes:[],开启果园助力:!1},aiRedPack:{enable:!0},backupWaitTime:20,tasks:{skipTasks:[],每月上传任务单日数量:5},catalog:"/",cloudPhoneRedpack:{enable:!1},是否打印今日云朵:!0,剩余多少天刷新token:10,微信抽奖:{次数:1,间隔:500},云朵大作战:{开启:!1,目标排名:500,开启兑换:!1,邀请用户:[],游戏时间:300},盲盒:{开启:!0},文件获取方式:1};dr();h();import{unlinkSync as pM,writeFileSync as hM}from"node:fs";h();Qu();h();function X4(s){return!s||typeof s.then!="function"?Promise.resolve(s):s}function Ne(s,...e){try{return X4(s(...e))}catch(t){return Promise.reject(t)}}function Y4(s){let e=typeof s;return s===null||e!=="object"&&e!=="function"}function Q4(s){let e=Object.getPrototypeOf(s);return!e||e.isPrototypeOf(Object)}function qa(s){if(Y4(s))return String(s);if(Q4(s)||Array.isArray(s))return JSON.stringify(s);if(typeof s.toJSON=="function")return qa(s.toJSON());throw new Error("[unstorage] Cannot stringify value!")}var Gh="base64:";function VE(s){return typeof s=="string"?s:Gh+eM(s)}function WE(s){return typeof s!="string"||!s.startsWith(Gh)?s:Z4(s.slice(Gh.length))}function Z4(s){return globalThis.Buffer?Buffer.from(s,"base64"):Uint8Array.from(globalThis.atob(s),e=>e.codePointAt(0))}function eM(s){return globalThis.Buffer?Buffer.from(s).toString("base64"):globalThis.btoa(String.fromCodePoint(...s))}var tM=["has","hasItem","get","getItem","getItemRaw","set","setItem","setItemRaw","del","remove","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function Kh(s,e){if(e=ur(e),!e)return s;let t={...s};for(let i of tM)t[i]=(r="",...a)=>s[i](e+r,...a);return t.getKeys=(i="",...r)=>s.getKeys(e+i,...r).then(a=>a.map(n=>n.slice(e.length))),t}function it(s){return s&&s.split("?")[0]?.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,"")||""}function GE(...s){return it(s.join(":"))}function ur(s){return s=it(s),s?s+":":""}function KE(s,e){if(e===void 0)return!0;let t=0,i=s.indexOf(":");for(;i>-1;)t++,i=s.indexOf(":",i+1);return t<=e}function JE(s,e){return e?s.startsWith(e)&&s[s.length-1]!=="$":s[s.length-1]!=="$"}var sM="memory",iM=()=>{let s=new Map;return{name:sM,getInstance:()=>s,hasItem(e){return s.has(e)},getItem(e){return s.get(e Line truncated
`),...t}})}async function xM(s,{msgtype:e="text",touser:t="@all",agentid:i,corpid:r,corpsecret:a,...n},o,u){try{let{access_token:c}=await s.http.fetch({url:"https://qyapi.weixin.qq.com/cgi-bin/gettoken",method:"POST",data:{corpid:r,corpsecret:a},headers:{"Content-Type":"application/json"}});return Os(s,"企业微信推送",{url:`https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${c}`,data:{touser:t,msgtype:e,agentid:i,[e]:{content:`${o}
${u}`},...n}})}catch(c){s.logger.error("企业微信推送失败"),s.logger.error(c)}}async function bM(s,{url:e,msgtype:t="text",...i},r,a){return Os(s,"企业微信Bot推送",{url:e,data:{msgtype:t,[t]:{content:`${r}
${a}`},...i}})}async function wM(s,{apiHost:e="api.telegram.org",token:t,disable_web_page_preview:i=!0,agent:r,...a},n,o){return Os(s,"Telegram Bot 推送",{url:`https://${e}/bot${t}/sendMessage`,data:{disable_web_page_preview:i,...a,text:`${n}
${o}`},agent:r})}async function DM(s,{key:e,level:t="passive",...i},r,a){return Os(s,"Bark ios 推送",{url:`https://api.day.app/${e}`,data:{body:a,title:r,level:t,...i}})}async function kM(s,{key:e,sid:t,query:i,msgtype:r="text",...a},n,o){let u=new URLSearchParams({key:e,sid:t});return i&&Object.entries(i).forEach(([c,l])=>{u.append(c,String(l))}),Os(s,"Bark ios 推送",{url:`https://api.2im.cn/push?${u.toString()}`,data:{msgtype:r,content:o,title:n,...a}})}async function vM(s,{token:e,secret:t,...i},r,a){let n="";if(t){let{createHmac:o}=await import("node:crypto"),u=Date.now(),c=o("sha256",t).update(u.toString()+`
`+t).digest("base64");n=`&timestamp=${u}&sign=${encodeURIComponent(c)}`}return Os(s,"钉钉推送",{url:`https://oapi.dingtalk.com/robot/send?access_token=${e}${n}`,data:{msgtype:"text",text:{content:` ${r}
${a}`},...i},headers:{"content-type":"application/json"}})}function uC(){return{pushplus:gM,serverChan:yM,workWeixin:xM,workWeixinBot:bM,tgBot:wM,bark:DM,twoIm:kM,customPost:mM,dingTalk:vM}}async function M9({logger:s},e,t,i){try{if(!e||!e.pass||!e.from||!e.host)return;let{createTransport:r}=await Promise.resolve().then(()=>Dt(WT(),1)),a=Number(e.port)||465,o=await r({host:e.host,port:a,secure:a===465,auth:{user:e.from,pass:e.pass}}).sendMail({from:`${t} <${e.from}>`,to:e.to,subject:t,headers:{"Content-Type":"text/plain; charset=utf-8"},text:i.replace(/\n/g,`\r
`)});s.info(`邮件消息已发送: ${o.messageId}`)}catch(r){s.error("邮件消息发送失败",r)}}async function ru(s,e,t,i){let r={email:M9,...uC()};for(let[a,n]of Object.entries(e)){let o=r[a];!o||!e||(await q9(s,n),await o(s,n,t,i))}}async function R9(s){let{HttpsProxyAgent:e}=await Promise.resolve().then(()=>(YT(),XT));return{https:new e({maxSockets:256,scheduling:"lifo",proxy:s})}}async function q9(s,e){if(typeof e.proxy=="string")try{e.agent=await R9(e.proxy)}catch(t){s.logger.error(t)}}lt();Yu();h();Pe();Ui();import{randomBytes as U9}from"node:crypto";function H9(s){let e=U9(16);return{randomBuffer:e,fileMd5:s.node.myMD5(e.toString("hex")),fileSize:209715216}}async function $9(s){let e=H9(s),t={digest:e.fileMd5,contentSize:e.fileSize,manualRename:2,ext:".mp4",createTime:mr()};s.logger.debug(new Date().toLocaleString(),JSON.stringify(t)),await V9(s,s.config.catalog,t,e.randomBuffer)&&s.logger.debug("上传成功")}async function QT(s,e){if(li()){s.logger.debug("当前环境为WPS,不支持上传文件");return}s.logger.debug("已经上传",e,"字节");let t=1025-Math.floor(e/1024/1024);s.logger.debug("需要上传",t,"MB");for(let i=0;i<t;i+=200)await $9(s),t-200>0&&await s.sleep(3e3)}async function V9(s,e,{ext:t=".png",digest:i=Ke(32).toUpperCase(),contentSize:r=ut(1,1e3),manualRename:a=2,contentName:n="asign-"+Ke(4)+t,createTime:o=mr()}={},u){try{s.logger.warn("未实现功能")}catch(c){s.logger.error("上传文件异常",c)}return!1}h();import{Buffer as au}from"node:buffer";import{createCipheriv as W9,randomBytes as G9}from"node:crypto";function K9(s,e){let t=W9("aes-128-cbc",au.from("xuL97!x7GGxG%8V4","utf-8"),e);return au.concat([t.update(s,"utf-8"),t.final()])}function ZT(s){let e=G9(16);return au.from(au.concat([e,K9(s,e)]).toString("base64"),"utf-8").toString("base64")}h();import{Buffer as J9}from"node:buffer";function zs(s,e){var t=(s&65535)+(e&65535),i=(s>>16)+(e>>16)+(t>>16);return i<<16|t&65535}function X9(s,e){return s<<e|s>>>32-e}function nu(s,e,t,i,r,a){return zs(X9(zs(zs(e,s),zs(i,a)),r),t)}function $e(s,e,t,i,r,a,n){return nu(e&t|~e&i,s,e,r,a,n)}function Ve(s,e,t,i,r,a,n){return nu(e&i|t&~i,s,e,r,a,n)}function We(s,e,t,i,r,a,n){return nu(e^t^i,s,e,r,a,n)}function Ge(s,e,t,i,r,a,n){return nu(t^(e|~i),s,e,r,a,n)}function Y9(s,e,t,i,r){let a,n,o,u,c;for(c=0;c<s.length;c+=16)a=e,n=t,o=i,u=r,e=$e(e,t,i,r,s[c],7,-680876936),r=$e(r,e,t,i,s[c+1],12,-389564586),i=$e(i,r,e,t,s[c+2],17,606105819),t=$e(t,i,r,e,s[c+3],22,-1044525330),e=$e(e,t,i,r,s[c+4],7,-176418897),r=$e(r,e,t,i,s[c+5],12,1200080426),i=$e(i,r,e,t,s[c+6],17,-1473231341),t=$e(t,i,r,e,s[c+7],22,-45705983),e=$e(e,t,i,r,s[c+8],7,1770035416),r=$e(r,e,t,i,s[c+9],12,-1958414417),i=$e(i,r,e,t,s[c+10],17,-42063),t=$e(t,i,r,e,s[c+11],22,-1990404162),e=$e(e,t,i,r,s[c+12],7,1804603682),r=$e(r,e,t,i,s[c+13],12,-40341101),i=$e(i,r,e,t,s[c+14],17,-1502002290),t=$e(t,i,r,e,s[c+15],22,1236535329),e=Ve(e,t,i,r,s[c+1],5,-165796510),r=Ve(r,e,t,i,s[c+6],9,-1069501632),i=Ve(i,r,e,t,s[c+11],14,643717713),t=Ve(t,i,r,e,s[c],20,-373897302),e=Ve(e,t,i,r,s[c+5],5,-701558691),r=Ve(r,e,t,i,s[c+10],9,38016083),i=Ve(i,r,e,t,s[c+15],14,-660478335),t=Ve(t,i,r,e,s[c+4],20,-405537848),e=Ve(e,t,i,r,s[c+9],5,568446438),r=Ve(r,e,t,i,s[c+14],9,-1019803690),i=Ve(i,r,e,t,s[c+3],14,-187363961),t=Ve(t,i,r,e,s[c+8],20,1163531501),e=Ve(e,t,i,r,s[c+13],5,-1444681467),r=Ve(r,e,t,i,s[c+2],9,-51403784),i=Ve(i,r,e,t,s[c+7],14,1735328473),t=Ve(t,i,r,e,s[c+12],20,-1926607734),e=We(e,t,i,r,s[c+5],4,-378558),r=We(r,e,t,i,s[c+8],11,-2022574463),i=We(i,r,e,t,s[c+11],16,1839030562),t=We(t,i,r,e,s[c+14],23,-35309556),e=We(e,t,i,r,s[c+1],4,-1530992060),r=We(r,e,t,i,s[c+4],11,1272893353),i=We(i,r,e,t,s[c+7],16,-155497632),t=We(t,i,r,e,s[c+10],23,-1094730640),e=We(e,t,i,r,s[c+13],4,681279174),r=We(r,e,t,i,s[c],11,-358537222),i=We(i,r,e,t,s[c+3],16,-722521979),t=We(t,i,r,e,s[c+6],23,76029189),e=We(e,t,i,r,s[c+9],4,-640364487),r=We(r,e,t,i,s[c+12],11,-421815835),i=We(i,r,e,t,s[c+15],16,530742520),t=We(t,i,r,e,s[c+2],23,-995338651),e=Ge(e,t,i,r,s[c],6,-198630844),r=Ge(r,e,t,i,s[c+7],10,1126891415),i=Ge(i,r,e,t,s[c+14],15,-1416354905),t=Ge(t,i,r,e,s[c+5],21,-57434055),e=Ge(e,t,i,r,s[c+12],6,1700485571),r=Ge(r,e,t,i,s[c+3],10,-1894986606),i=Ge(i,r,e,t,s[c+10],15,-1051523),t=Ge(t,i,r,e,s[c+1],21,-2054922799),e=Ge(e,t,i,r,s[c+8],6,1873313359),r=Ge(r,e,t,i,s[c+15],10,-30611744),i=Ge(i,r,e,t,s[c+6],15,-1560198380),t=Ge(t,i,r,e,s[c+13],21,1309151649),e=Ge(e,t,i,r,s[c+4],6,-145523070),r=Ge(r,e,t,i,s[c+11],10,-1120210379),i=Ge(i,r,e,t,s[c+2],15,718787259),t=Ge(t,i,r,e,s[c+9],21,-343485551),e=zs(e,a),t=zs(t,n),i=zs(i,o),r=zs(r,u);return[e,t,i,r]}function Q9(s,e,t=!0,i={a:1732584193,b:-271733879,c:-1732584194,d:271733878},r=0){return t&&(s[e>>5]|=128<<e%32,s[(e+64>>>9<<4)+14]=e+r),Y9(s,i.a,i.b,i.c,i.d)}function Z9(s,e=0,t={a:1732584193,b:-271733879,c:-1732584194,d:271733878}){return t7(e7(Q9(s7(decodeURIComponent(s)),s.length*8,!0,t,e)))}function e7(s){let e="",t=s.length*32;for(let i=0;i<t;i+=8)e+ Line truncated
`),{newAuth:a,$:t}}async function w7(s){return bf(s)||xf(s)?await ef(s):s}async function Gae(s){let{config:e,path:t,message:i}=await w7(s),r=[{level:3,type:"info",date:new Date,msg:"☁️☁️☁️☁️☁️☁️☁️☁️"}],a=await qs({pushData:r});if(r.push({level:3,type:"info",date:new Date,msg:"当前版本 0.5.11-rc.2"}),!e||!e.length)return a.error("未找到配置文件/变量");let{expiredAuth:n}=await k7(e,a,t);await D7(n,i),await ou({pushData:r,message:i})}async function D7(s,e){s.length&&await ou({pushData:[{level:0,type:"error",date:new Date,msg:"存在账号过期,请重新登录"},...s.map(t=>({level:3,type:"info",date:new Date,msg:t}))],message:{...e,title:"账号过期推送"}})}async function k7(s,e,t){let i=[];for(let r=0;r<s.length;r++){let a=s[r];if(!a.auth){e.error("该配置中不存在 auth");continue}try{let{newAuth:n,$:o,isNoLogin:u}=await b7(a,{logger:e});if(u){i.push(o?.config?.phone);continue}n&&ME(t,["caiyun",r,"auth"],n)}catch(n){e.error(n)}}return{expiredAuth:i}}export{k7 as _run,qs as createLogger,w7 as getConfig,oi as init,ef as loadConfig,b7 as main,D7 as pushExpiredAuth,ou as pushMessage,Gae as run,f7 as runHc1t,wr as sleep,s2 as useExchange,o7 as useMultiExchange};
/*! Bundled license information:
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
tough-cookie/lib/pubsuffix-psl.js:
(*!
* Copyright (c) 2018, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*)
tough-cookie/lib/store.js:
(*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*)
tough-cookie/lib/permuteDomain.js:
(*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*)
tough-cookie/lib/pathMatch.js:
(*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*)
tough-cookie/lib/memstore.js:
(*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*)
tough-cookie/lib/cookie.js:
(*!
* Copyright (c) 2015-2020, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*)
*/