@nocobase/plugin-workflow-mailer 2.4.0-alpha.1 → 2.4.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/externalVersion.js +6 -6
  2. package/dist/node_modules/joi/dist/joi-browser.min.js +1 -1
  3. package/dist/node_modules/joi/lib/index.js +1 -1
  4. package/dist/node_modules/joi/lib/messages.js +35 -6
  5. package/dist/node_modules/joi/lib/types/keys.js +18 -1
  6. package/dist/node_modules/joi/lib/types/link.js +18 -2
  7. package/dist/node_modules/joi/lib/types/string.js +2 -2
  8. package/dist/node_modules/joi/package.json +1 -1
  9. package/dist/node_modules/nodemailer/dist/cjs/addressparser/index.d.ts +59 -0
  10. package/dist/node_modules/nodemailer/dist/cjs/addressparser/index.js +790 -0
  11. package/dist/node_modules/nodemailer/dist/cjs/base64/index.d.ts +36 -0
  12. package/dist/node_modules/nodemailer/dist/cjs/base64/index.js +119 -0
  13. package/dist/node_modules/nodemailer/dist/cjs/dkim/index.d.ts +52 -0
  14. package/dist/node_modules/nodemailer/dist/cjs/dkim/index.js +228 -0
  15. package/dist/node_modules/nodemailer/dist/cjs/dkim/message-parser.d.ts +48 -0
  16. package/dist/node_modules/nodemailer/dist/cjs/dkim/message-parser.js +180 -0
  17. package/dist/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.d.ts +36 -0
  18. package/dist/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.js +148 -0
  19. package/dist/node_modules/nodemailer/dist/cjs/dkim/sign.d.ts +52 -0
  20. package/dist/node_modules/nodemailer/dist/cjs/dkim/sign.js +165 -0
  21. package/dist/node_modules/nodemailer/dist/cjs/errors.d.ts +96 -0
  22. package/dist/node_modules/nodemailer/dist/cjs/errors.js +70 -0
  23. package/dist/node_modules/nodemailer/dist/cjs/fetch/cookies.d.ts +107 -0
  24. package/dist/node_modules/nodemailer/dist/cjs/fetch/cookies.js +282 -0
  25. package/dist/node_modules/nodemailer/dist/cjs/fetch/index.d.ts +65 -0
  26. package/dist/node_modules/nodemailer/dist/cjs/fetch/index.js +384 -0
  27. package/dist/node_modules/nodemailer/dist/cjs/json-transport/index.d.ts +64 -0
  28. package/dist/node_modules/nodemailer/dist/cjs/json-transport/index.js +99 -0
  29. package/dist/node_modules/nodemailer/dist/cjs/mail-composer/index.d.ts +174 -0
  30. package/dist/node_modules/nodemailer/dist/cjs/mail-composer/index.js +613 -0
  31. package/dist/node_modules/nodemailer/dist/cjs/mailer/index.d.ts +237 -0
  32. package/dist/node_modules/nodemailer/dist/cjs/mailer/index.js +415 -0
  33. package/dist/node_modules/nodemailer/dist/cjs/mailer/mail-message.d.ts +97 -0
  34. package/dist/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +342 -0
  35. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/index.d.ts +161 -0
  36. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/index.js +787 -0
  37. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/mime-types.d.ts +2 -0
  38. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/mime-types.js +2103 -0
  39. package/dist/node_modules/nodemailer/dist/cjs/mime-node/index.d.ts +333 -0
  40. package/dist/node_modules/nodemailer/dist/cjs/mime-node/index.js +1493 -0
  41. package/dist/node_modules/nodemailer/dist/cjs/mime-node/last-newline.d.ts +5 -0
  42. package/dist/node_modules/nodemailer/dist/cjs/mime-node/last-newline.js +32 -0
  43. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-unix.d.ts +9 -0
  44. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-unix.js +40 -0
  45. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-windows.d.ts +10 -0
  46. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-windows.js +47 -0
  47. package/dist/node_modules/nodemailer/dist/cjs/nodemailer.d.ts +124 -0
  48. package/dist/node_modules/nodemailer/dist/cjs/nodemailer.js +1 -0
  49. package/dist/node_modules/nodemailer/dist/cjs/package-info.d.ts +3 -0
  50. package/dist/node_modules/nodemailer/dist/cjs/package-info.js +7 -0
  51. package/dist/node_modules/nodemailer/dist/cjs/package.json +3 -0
  52. package/dist/node_modules/nodemailer/dist/cjs/punycode/index.d.ts +73 -0
  53. package/dist/node_modules/nodemailer/{lib → dist/cjs}/punycode/index.js +63 -112
  54. package/dist/node_modules/nodemailer/dist/cjs/qp/index.d.ts +32 -0
  55. package/dist/node_modules/nodemailer/dist/cjs/qp/index.js +207 -0
  56. package/dist/node_modules/nodemailer/dist/cjs/sendmail-transport/index.d.ts +69 -0
  57. package/dist/node_modules/nodemailer/dist/cjs/sendmail-transport/index.js +210 -0
  58. package/dist/node_modules/nodemailer/dist/cjs/ses-transport/index.d.ts +112 -0
  59. package/dist/node_modules/nodemailer/dist/cjs/ses-transport/index.js +252 -0
  60. package/dist/node_modules/nodemailer/dist/cjs/shared/index.d.ts +260 -0
  61. package/dist/node_modules/nodemailer/dist/cjs/shared/index.js +680 -0
  62. package/dist/node_modules/nodemailer/dist/cjs/shared/objects.d.ts +23 -0
  63. package/dist/node_modules/nodemailer/dist/cjs/shared/objects.js +43 -0
  64. package/dist/node_modules/nodemailer/dist/cjs/shared/url.d.ts +21 -0
  65. package/dist/node_modules/nodemailer/dist/cjs/shared/url.js +255 -0
  66. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.d.ts +15 -0
  67. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.js +108 -0
  68. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.d.ts +47 -0
  69. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.js +189 -0
  70. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/index.d.ts +416 -0
  71. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/index.js +1837 -0
  72. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/index.d.ts +133 -0
  73. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/index.js +569 -0
  74. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.d.ts +62 -0
  75. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.js +257 -0
  76. package/dist/node_modules/nodemailer/dist/cjs/smtp-transport/index.d.ts +156 -0
  77. package/dist/node_modules/nodemailer/dist/cjs/smtp-transport/index.js +371 -0
  78. package/dist/node_modules/nodemailer/dist/cjs/stream-transport/index.d.ts +65 -0
  79. package/dist/node_modules/nodemailer/dist/cjs/stream-transport/index.js +146 -0
  80. package/dist/node_modules/nodemailer/dist/cjs/well-known/index.d.ts +35 -0
  81. package/dist/node_modules/nodemailer/dist/cjs/well-known/index.js +41 -0
  82. package/dist/node_modules/nodemailer/dist/cjs/well-known/services.d.ts +2 -0
  83. package/dist/node_modules/nodemailer/dist/cjs/well-known/services.js +674 -0
  84. package/dist/node_modules/nodemailer/dist/cjs/xoauth2/index.d.ts +201 -0
  85. package/dist/node_modules/nodemailer/dist/cjs/xoauth2/index.js +426 -0
  86. package/dist/node_modules/nodemailer/dist/esm/addressparser/index.d.ts +59 -0
  87. package/dist/node_modules/nodemailer/dist/esm/addressparser/index.js +786 -0
  88. package/dist/node_modules/nodemailer/dist/esm/base64/index.d.ts +36 -0
  89. package/dist/node_modules/nodemailer/{lib → dist/esm}/base64/index.js +39 -68
  90. package/dist/node_modules/nodemailer/dist/esm/dkim/index.d.ts +52 -0
  91. package/dist/node_modules/nodemailer/{lib → dist/esm}/dkim/index.js +62 -92
  92. package/dist/node_modules/nodemailer/dist/esm/dkim/message-parser.d.ts +48 -0
  93. package/dist/node_modules/nodemailer/dist/esm/dkim/message-parser.js +176 -0
  94. package/dist/node_modules/nodemailer/dist/esm/dkim/relaxed-body.d.ts +36 -0
  95. package/dist/node_modules/nodemailer/dist/esm/dkim/relaxed-body.js +141 -0
  96. package/dist/node_modules/nodemailer/dist/esm/dkim/sign.d.ts +52 -0
  97. package/dist/node_modules/nodemailer/dist/esm/dkim/sign.js +125 -0
  98. package/dist/node_modules/nodemailer/dist/esm/errors.d.ts +96 -0
  99. package/dist/node_modules/nodemailer/dist/esm/errors.js +67 -0
  100. package/dist/node_modules/nodemailer/dist/esm/fetch/cookies.d.ts +107 -0
  101. package/dist/node_modules/nodemailer/dist/esm/fetch/cookies.js +242 -0
  102. package/dist/node_modules/nodemailer/dist/esm/fetch/index.d.ts +65 -0
  103. package/dist/node_modules/nodemailer/dist/esm/fetch/index.js +344 -0
  104. package/dist/node_modules/nodemailer/dist/esm/json-transport/index.d.ts +64 -0
  105. package/dist/node_modules/nodemailer/dist/esm/json-transport/index.js +62 -0
  106. package/dist/node_modules/nodemailer/dist/esm/mail-composer/index.d.ts +174 -0
  107. package/dist/node_modules/nodemailer/{lib → dist/esm}/mail-composer/index.js +283 -275
  108. package/dist/node_modules/nodemailer/dist/esm/mailer/index.d.ts +237 -0
  109. package/dist/node_modules/nodemailer/{lib → dist/esm}/mailer/index.js +151 -205
  110. package/dist/node_modules/nodemailer/dist/esm/mailer/mail-message.d.ts +97 -0
  111. package/dist/node_modules/nodemailer/{lib → dist/esm}/mailer/mail-message.js +111 -125
  112. package/dist/node_modules/nodemailer/dist/esm/mime-funcs/index.d.ts +161 -0
  113. package/dist/node_modules/nodemailer/dist/esm/mime-funcs/index.js +738 -0
  114. package/dist/node_modules/nodemailer/dist/esm/mime-funcs/mime-types.d.ts +2 -0
  115. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-funcs/mime-types.js +43 -49
  116. package/dist/node_modules/nodemailer/dist/esm/mime-node/index.d.ts +333 -0
  117. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/index.js +576 -437
  118. package/dist/node_modules/nodemailer/dist/esm/mime-node/last-newline.d.ts +5 -0
  119. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/last-newline.js +4 -10
  120. package/dist/node_modules/nodemailer/dist/esm/mime-node/le-unix.d.ts +9 -0
  121. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/le-unix.js +7 -15
  122. package/dist/node_modules/nodemailer/dist/esm/mime-node/le-windows.d.ts +10 -0
  123. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/le-windows.js +6 -16
  124. package/dist/node_modules/nodemailer/dist/esm/nodemailer.d.ts +124 -0
  125. package/dist/node_modules/nodemailer/dist/esm/nodemailer.js +166 -0
  126. package/dist/node_modules/nodemailer/dist/esm/package-info.d.ts +3 -0
  127. package/dist/node_modules/nodemailer/dist/esm/package-info.js +4 -0
  128. package/dist/node_modules/nodemailer/dist/esm/package.json +3 -0
  129. package/dist/node_modules/nodemailer/dist/esm/punycode/index.d.ts +73 -0
  130. package/dist/node_modules/nodemailer/dist/esm/punycode/index.js +405 -0
  131. package/dist/node_modules/nodemailer/dist/esm/qp/index.d.ts +32 -0
  132. package/dist/node_modules/nodemailer/{lib → dist/esm}/qp/index.js +59 -77
  133. package/dist/node_modules/nodemailer/dist/esm/sendmail-transport/index.d.ts +69 -0
  134. package/dist/node_modules/nodemailer/dist/esm/sendmail-transport/index.js +170 -0
  135. package/dist/node_modules/nodemailer/dist/esm/ses-transport/index.d.ts +112 -0
  136. package/dist/node_modules/nodemailer/dist/esm/ses-transport/index.js +212 -0
  137. package/dist/node_modules/nodemailer/dist/esm/shared/index.d.ts +260 -0
  138. package/dist/node_modules/nodemailer/dist/esm/shared/index.js +631 -0
  139. package/dist/node_modules/nodemailer/dist/esm/shared/objects.d.ts +23 -0
  140. package/dist/node_modules/nodemailer/dist/esm/shared/objects.js +38 -0
  141. package/dist/node_modules/nodemailer/dist/esm/shared/url.d.ts +21 -0
  142. package/dist/node_modules/nodemailer/dist/esm/shared/url.js +214 -0
  143. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.d.ts +15 -0
  144. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.js +103 -0
  145. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.d.ts +47 -0
  146. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.js +149 -0
  147. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/index.d.ts +416 -0
  148. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/index.js +1797 -0
  149. package/dist/node_modules/nodemailer/dist/esm/smtp-pool/index.d.ts +133 -0
  150. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-pool/index.js +195 -314
  151. package/dist/node_modules/nodemailer/dist/esm/smtp-pool/pool-resource.d.ts +62 -0
  152. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-pool/pool-resource.js +70 -107
  153. package/dist/node_modules/nodemailer/dist/esm/smtp-transport/index.d.ts +156 -0
  154. package/dist/node_modules/nodemailer/dist/esm/smtp-transport/index.js +331 -0
  155. package/dist/node_modules/nodemailer/dist/esm/stream-transport/index.d.ts +65 -0
  156. package/dist/node_modules/nodemailer/dist/esm/stream-transport/index.js +106 -0
  157. package/dist/node_modules/nodemailer/dist/esm/well-known/index.d.ts +35 -0
  158. package/dist/node_modules/nodemailer/{lib → dist/esm}/well-known/index.js +12 -23
  159. package/dist/node_modules/nodemailer/dist/esm/well-known/services.d.ts +2 -0
  160. package/dist/node_modules/nodemailer/dist/esm/well-known/services.js +671 -0
  161. package/dist/node_modules/nodemailer/dist/esm/xoauth2/index.d.ts +201 -0
  162. package/dist/node_modules/nodemailer/dist/esm/xoauth2/index.js +386 -0
  163. package/dist/node_modules/nodemailer/dist/well-known/services.json +640 -0
  164. package/dist/node_modules/nodemailer/package.json +1 -1
  165. package/package.json +4 -4
  166. package/dist/node_modules/nodemailer/.gitattributes +0 -6
  167. package/dist/node_modules/nodemailer/.ncurc.js +0 -7
  168. package/dist/node_modules/nodemailer/.prettierrc.js +0 -8
  169. package/dist/node_modules/nodemailer/lib/addressparser/index.js +0 -313
  170. package/dist/node_modules/nodemailer/lib/dkim/message-parser.js +0 -155
  171. package/dist/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
  172. package/dist/node_modules/nodemailer/lib/dkim/sign.js +0 -117
  173. package/dist/node_modules/nodemailer/lib/fetch/cookies.js +0 -281
  174. package/dist/node_modules/nodemailer/lib/fetch/index.js +0 -274
  175. package/dist/node_modules/nodemailer/lib/json-transport/index.js +0 -82
  176. package/dist/node_modules/nodemailer/lib/mime-funcs/index.js +0 -625
  177. package/dist/node_modules/nodemailer/lib/nodemailer.js +0 -1
  178. package/dist/node_modules/nodemailer/lib/sendmail-transport/index.js +0 -210
  179. package/dist/node_modules/nodemailer/lib/ses-transport/index.js +0 -349
  180. package/dist/node_modules/nodemailer/lib/shared/index.js +0 -688
  181. package/dist/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -108
  182. package/dist/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +0 -143
  183. package/dist/node_modules/nodemailer/lib/smtp-connection/index.js +0 -1825
  184. package/dist/node_modules/nodemailer/lib/smtp-transport/index.js +0 -416
  185. package/dist/node_modules/nodemailer/lib/stream-transport/index.js +0 -135
  186. package/dist/node_modules/nodemailer/lib/well-known/services.json +0 -343
  187. package/dist/node_modules/nodemailer/lib/xoauth2/index.js +0 -376
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},604:e=>{e.exports=require("node:dns")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},4492:e=>{e.exports=require("node:stream")},1764:e=>{e.exports=require("node:tls")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},5628:e=>{e.exports=require("node:zlib")},1778:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function _quoteLocalPart(e){const t=e.lastIndexOf("@");if(t<0){return e}const i=e.substr(0,t);if(/^[^\s"(),:;<>@[\\\]]+$/.test(i)||/^"(?:[^"\\]|\\[\s\S])*"$/.test(i)){return e}return'"'+i.replace(/["\\]/g,"\\$&")+'"@'+e.substr(t+1)}const i=/\s/;const n=/^("(?:[^"\\]|\\[\s\S])*"@\S+)(?:\s+([\s\S]+))?$/;const a=/^[^@\s]+@[^@\s]+$/;const s=/^[^@\s]+@\S+$/;const o=/\s*\b[^@\s]+@[^\s]+\b\s*/y;function _isSpaceCode(e){return e===32||e>=9&&e<=13||e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function _isWordCode(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95}function _isBoundary(e,t){return _isWordCode(e.charCodeAt(t-1))!==_isWordCode(e.charCodeAt(t))}function _indexOfAt(e,t,i){for(let n=t;n<i;n++){if(e.charCodeAt(n)===64){return n}}return-1}function _looseAddressStart(e){const t=e.length;let i=0;while(i<t){while(i<t&&_isSpaceCode(e.charCodeAt(i))){i++}if(i>=t){break}const n=i;let a=i;while(a<t&&!_isSpaceCode(e.charCodeAt(a))){a++}let s=_indexOfAt(e,n,a);if(s>=0){let t=-1;for(let i=a;i>n;i--){if(_isBoundary(e,i)){t=i;break}}let i=n;while(t>=0&&s>=0){if(s>i&&a>s+1&&t>s+1){for(let t=i;t<s;t++){if(_isBoundary(e,t)){if(t>n){return t}let i=n;while(i>0&&_isSpaceCode(e.charCodeAt(i-1))){i--}return i}}}i=s+1;s=_indexOfAt(e,i,a)}}i=a}return-1}function _recoverAddrSpec(e){if(!i.test(e.address)){return}let t;let o;const r=e.address.match(n);if(r){if(!r[2]){return}t=r[1];o=[r[2]]}else{if(e.address.indexOf('"')>=0){return}const i=e.address.split(/\s+/);let n=i.findIndex((e=>a.test(e)));if(n<0){n=i.findIndex((e=>s.test(e)))}if(n<0){return}t=i.splice(n,1)[0];o=i}e.address=t;e.text=[e.text].concat(o).filter((e=>e)).join(" ")}function _stripAddressComments(e){const t=[];let i="";let n="";let a=0;let s="";let o="";for(let r=0,c=e.length;r<c;r++){const l=e.charAt(r);if(a){if(l==="\\"&&r<c-1){n+=e.charAt(++r)}else if(l==="("){a++;n+=l}else if(l===")"&&!--a){t.push(n.trim());n="";if(o!=="@"&&e.charAt(r+1)!=="@"){i+=" ";o=" "}}else{n+=l}continue}if(s){if(l==="\\"&&s==='"'&&r<c-1){i+=l+e.charAt(++r);o=e.charAt(r);continue}if(l===s){s=""}}else if(l==='"'){s='"'}else if(l==="["){s="]"}else if(l==="("){a=1;continue}i+=l;o=l}if(a){t.push(n.trim())}return{address:i.trim(),comments:t.filter((e=>e))}}function _handleAddress(e,t){let i=false;let n="text";const s=[];const r={address:[],comment:[],group:[],text:[],textWasQuoted:[]};let c=false;const l={address:"",comment:"",group:"",text:""};for(let t=0,a=e.length;t<a;t++){const a=e[t];const s=t?e[t-1]:null;if(a.type==="operator"){switch(a.value){case"<":n="address";c=false;break;case"(":n="comment";c=false;break;case":":n="group";i=true;c=false;break;case'"':c=!c;n="text";break;default:n="text";c=false;break}}else if(a.value){const i=t>1?e[t-2]:null;const o=s?.type==="operator"&&s.value==='"'&&!!s.noBreak&&i?.type==="operator"&&i.value==='"';if(n==="address"){a.value=a.value.replace(/^[^<]*<\s*/,"")}const p=r[n];const d=s&&s.noBreak&&p.length&&(s.value!==")"||l[n]==="@"||a.value.charAt(0)==="@");if(d){r[n][r[n].length-1]+=a.value;if(a.value){l[n]=a.value.charAt(a.value.length-1)}if(n==="text"&&c){r.textWasQuoted[r.textWasQuoted.length-1]=true}}else{r[n].push(a.value);l[n]=a.value.charAt(a.value.length-1);if(n==="text"){r.textWasQuoted.push(c||o)}}}}if(!r.text.length&&r.comment.length){r.text=r.comment;r.comment=[]}if(i){r.text=r.text.join(" ");let e=[];if(r.group.length){const i=_parseAddressList(r.group.join(","),t+1);i.forEach((t=>{if(t.group){e=e.concat(t.group)}else{e.push(t)}}))}s.push({name:r.text||"",group:e})}else{const e=[];const t=[];for(const i of r.address){if(i.indexOf("(")<0){t.push(i);continue}const n=_stripAddressComments(i);for(const t of n.comments){e.push(t)}if(n.address){t.push(n.address)}}r.address=t;if(!r.address.length&&r.text.length){for(let e=r.text.length-1;e>=0;e--){if(!r.textWasQuoted[e]&&a.test(r.text[e])){r.address=r.text.splice(e,1);r.textWasQuoted.splice(e,1);break}}if(!r.address.length){let e=false;for(let t=r.text.length-1;t>=0;t--){if(!r.textWasQuoted[t]){const i=r.text[t];let n=i;const a=_looseAddressStart(i);if(a>=0){o.lastIndex=a;const t=o.exec(i);if(t){r.address=[t[0].trim()];e=true;n=i.slice(0,a)+" "+i.slice(a+t[0].length)}}r.text[t]=n.trim();if(e){break}}}}}if(!r.text.length&&r.comment.length){r.text=r.comment;r.comment=[]}if(r.address.length>1){r.text=r.text.concat(r.address.splice(1))}const i=!r.address.length&&r.textWasQuoted.some((e=>e));r.text=r.text.join(" ");r.address=r.address.join(" ");if(i&&r.text.indexOf("@")>=0){r.address=_quoteLocalPart(r.text);r.text=""}_recoverAddrSpec(r);if(!r.text&&e.length){r.text=e.join(" ")}const n={address:r.address||r.text||"",name:r.text||r.address||""};if(n.address===n.name){if(/@/.test(n.address||"")){n.name=""}else{n.address=""}}s.push(n)}return s}class Tokenizer{constructor(e){this.str=(e||"").toString();this.operatorCurrent="";this.operatorExpecting="";this.node=null;this.escaped=false;this.inDomainLiteral=false;this.afterAt=false;this.list=[];this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){const e=[];for(let e=0,t=this.str.length;e<t;e++){const i=this.str.charAt(e);const n=e<t-1?this.str.charAt(e+1):null;this.checkChar(i,n)}this.list.forEach((t=>{t.value=(t.value||"").toString().trim();if(t.value){e.push(t)}}));return e}checkChar(e,t){if(!this.escaped&&!this.operatorExpecting){if(!this.inDomainLiteral&&e==="["&&this.afterAt){this.inDomainLiteral=true}else if(this.inDomainLiteral&&(e==="]"||e===","||e===";")){this.inDomainLiteral=false}}if(this.escaped){}else if(e===this.operatorExpecting){this.node={type:"operator",value:e};if(t&&![" ","\t","\r","\n",",",";"].includes(t)){this.node.noBreak=true}this.list.push(this.node);this.node=null;if(e!==")"){this.afterAt=false}this.operatorExpecting="";this.escaped=false;return}else if(!this.operatorExpecting&&!(this.inDomainLiteral&&e===":")&&e in this.operators){this.node={type:"operator",value:e};this.list.push(this.node);this.node=null;if(e!=="("){this.afterAt=false}this.operatorExpecting=this.operators[e];this.escaped=false;return}else if(['"',"'"].includes(this.operatorExpecting)&&e==="\\"){this.escaped=true;return}if(!this.node){this.node={type:"text",value:""};this.list.push(this.node)}if(e==="\n"){e=" "}if(e.charCodeAt(0)>=33||[" ","\t"].includes(e)){this.node.value+=e;if(!this.operatorExpecting&&e!==" "&&e!=="\t"){this.afterAt=e==="@"}}this.escaped=false}}const r=50;function _parseAddressList(e,t){if(t>r){return[]}const i=new Tokenizer(e);const n=i.tokenize();const a=[];let s=[];const o=[];n.forEach((e=>{if(e.type==="operator"&&(e.value===","||e.value===";")){if(s.length){a.push(s)}s=[]}else{s.push(e)}}));if(s.length){a.push(s)}a.forEach((e=>{const i=_handleAddress(e,t);for(let e=0;e<i.length;e++){o.push(i[e])}}));const c=[];for(let e=o.length-1;e>=0;e--){const t=o[e];const i=c.length?c[c.length-1]:null;if(i&&t.address===""&&t.name&&!t.group&&i.address&&i.name){i.name=t.name+", "+i.name}else{c.push(t)}}c.reverse();return c}function addressparser(e,t){const i=_parseAddressList(e,0);if(t?.flatten){const e=[];const walkAddressList=t=>{t.forEach((t=>{if(t.group){return walkAddressList(t.group)}e.push(t)}))};walkAddressList(i);return e}return i}t["default"]=addressparser;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},3429:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t.Encoder=void 0;t.encode=encode;t.wrap=wrap;const n=i(4492);function encode(e){if(typeof e==="string"){e=Buffer.from(e,"utf-8")}return e.toString("base64")}function wrap(e,t){e=(e||"").toString();t=Math.max(Number(t)||76,1);if(e.length<=t){return e}const i=[];let n=0;const a=t*1024;const s=new RegExp(".{"+t+"}","g");while(n<e.length){const t=e.substr(n,a).replace(s,"$&\r\n").trim();i.push(t);n+=a}return i.join("\r\n").trim()}class Encoder extends n.Transform{constructor(e){super();this.options=e||{};if(this.options.lineLength!==false){this.options.lineLength=this.options.lineLength||76}this._curLine="";this._remainingBytes=false;this.inputBytes=0;this.outputBytes=0}_transform(e,t,i){let n=t!=="buffer"?Buffer.from(e,t):e;if(!n||!n.length){setImmediate(i);return}this.inputBytes+=n.length;if(this._remainingBytes&&this._remainingBytes.length){n=Buffer.concat([this._remainingBytes,n],this._remainingBytes.length+n.length);this._remainingBytes=false}if(n.length%3){this._remainingBytes=n.slice(n.length-n.length%3);n=n.slice(0,n.length-n.length%3)}else{this._remainingBytes=false}let a=this._curLine+encode(n);if(this.options.lineLength){a=wrap(a,this.options.lineLength);const e=a.lastIndexOf("\n");if(e<0){this._curLine=a;a=""}else if(e===a.length-1){this._curLine=""}else{this._curLine=a.substring(e+1);a=a.substring(0,e+1)}}if(a){this.outputBytes+=a.length;this.push(Buffer.from(a,"ascii"))}setImmediate(i)}_flush(e){if(this._remainingBytes&&this._remainingBytes.length){this._curLine+=encode(this._remainingBytes)}if(this._curLine){this._curLine=wrap(this._curLine,this.options.lineLength);this.outputBytes+=this._curLine.length;this.push(Buffer.from(this._curLine,"ascii"));this._curLine=""}e()}}t.Encoder=Encoder},8445:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=n(i(3620));const s=n(i(121));const o=n(i(5523));const r=i(4492);const c=n(i(7561));const l=n(i(9411));const p=n(i(6005));const d=i(7071);const u="sha256";const h=10*1024*1024;class DKIMSigner{constructor(e,t,i,n){this.options=e||{};this.keys=t;this.cacheTreshold=Number(this.options.cacheTreshold)||h;this.hashAlgo=this.options.hashAlgo||u;this.cacheDir=this.options.cacheDir||false;this.chunks=[];this.chunklen=0;this.readPos=0;this.cachePath=this.cacheDir?l.default.join(this.cacheDir,"message."+Date.now()+"-"+p.default.randomBytes(14).toString("hex")):false;this.cache=false;this.headers=false;this.bodyHash=false;this.parser=false;this.relaxedBody=false;this.input=i;this.output=n;this.output.usingCache=false;this.hasErrored=false;this.input.on("error",(e=>{this.hasErrored=true;this.cleanup();n.emit("error",e)}))}cleanup(){if(!this.cache||!this.cachePath){return}c.default.unlink(this.cachePath,(()=>false))}createReadCache(){this.cache=c.default.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){if(!this.cache){this.output.end();return}return this.createReadCache()}const e=this.chunks[this.readPos++];if(this.output.write(e)===false){this.output.once("drain",(()=>{this.sendNextChunk()}));return}setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0;const signNextKey=()=>{if(e>=this.keys.length){this.output.write(this.parser.rawHeaders);setImmediate((()=>this.sendNextChunk()));return}const t=this.keys[e++];let i;try{i=(0,o.default)(this.headers,this.hashAlgo,this.bodyHash,{domainName:t.domainName,keySelector:t.keySelector,privateKey:t.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields})}catch(e){this.hasErrored=true;this.cleanup();this.output.emit("error",e);return}if(i){this.output.write(Buffer.from(i+"\r\n"))}setImmediate(signNextKey)};if(this.bodyHash&&this.headers){return signNextKey()}this.output.write(this.parser.rawHeaders);this.sendNextChunk()}createWriteCache(){this.output.usingCache=true;this.cache=c.default.createWriteStream(this.cachePath);this.cache.once("error",(e=>{this.cleanup();this.relaxedBody.unpipe(this.cache);this.relaxedBody.on("readable",(()=>{while(this.relaxedBody.read()!==null){}}));this.hasErrored=true;this.output.emit("error",e)}));this.cache.once("close",(()=>{this.sendSignedOutput()}));this.relaxedBody.removeAllListeners("readable");this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new a.default;this.relaxedBody=new s.default({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){return}while((e=this.relaxedBody.read())!==null){this.chunks.push(e);this.chunklen+=e.length;if(this.chunklen>=this.cacheTreshold&&this.cachePath){return this.createWriteCache()}}}));this.relaxedBody.on("end",(()=>{if(this.cache){return}this.sendSignedOutput()}));this.parser.pipe(this.relaxedBody);setImmediate((()=>this.input.pipe(this.parser)))}}class DKIM{constructor(e){this.options=e||{};this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){const i=new r.PassThrough;let n=e;let a=false;if(Buffer.isBuffer(e)){a=e;n=new r.PassThrough}else if(typeof e==="string"){a=Buffer.from(e);n=new r.PassThrough}let s=this.options;if(t&&Object.keys(t).length){s=(0,d.copyOwnKeys)({},t);(0,d.copyOwnKeys)(s,this.options)}const c=new DKIMSigner(s,this.keys,n,i);setImmediate((()=>{try{c.signStream()}catch(e){i.emit("error",o.default.unsupportedHashAlgoError(c.hashAlgo));return}if(a){setImmediate((()=>{n.end(a)}))}}));return i}}t["default"]=DKIM;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},3620:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});const n=i(4492);function _trimFieldName(e){let t=0;let i=e.length;while(t<i&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9)){t++}while(i>t&&(e.charCodeAt(i-1)===32||e.charCodeAt(i-1)===9)){i--}return e.slice(t,i)}class MessageParser extends n.Transform{constructor(e){super(e);this.lastBytes=Buffer.alloc(4);this.headersParsed=false;this.headerBytes=0;this.headerChunks=[];this.rawHeaders=false;this.bodySize=0}updateLastBytes(e){const t=this.lastBytes.length;const i=Math.min(e.length,t);for(let e=0,n=t-i;e<n;e++){this.lastBytes[e]=this.lastBytes[e+i]}for(let n=1;n<=i;n++){this.lastBytes[t-n]=e[e.length-n]}}checkHeaders(e){if(this.headersParsed){return true}const t=this.lastBytes.length;let i=0;for(let n=0,a=this.lastBytes.length+e.length;n<a;n++){let a;if(n<t){a=this.lastBytes[n]}else{a=e[n-t]}if(a===10&&n){const a=n-1<t?this.lastBytes[n-1]:e[n-1-t];const s=n>1?n-2<t?this.lastBytes[n-2]:e[n-2-t]:false;if(a===10){this.headersParsed=true;i=n-t+1;this.headerBytes+=i;break}else if(a===13&&s===10){this.headersParsed=true;i=n-t+1;this.headerBytes+=i;break}}}if(this.headersParsed){this.headerChunks.push(e.slice(0,i));this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes);this.headerChunks=null;this.emit("headers",this.parseHeaders());if(e.length>i){const t=e.slice(i);this.bodySize+=t.length;setImmediate((()=>this.push(t)))}return false}this.headerBytes+=e.length;this.headerChunks.push(e);this.updateLastBytes(e);return false}_transform(e,t,i){if(!e||!e.length){return i()}if(typeof e==="string"){e=Buffer.from(e,t)}let n;try{n=this.checkHeaders(e)}catch(e){return i(e)}if(n){this.bodySize+=e.length;this.push(e)}setImmediate(i)}_flush(e){if(this.headerChunks){this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes);this.headerChunks=null;this.emit("headers",this.parseHeaders())}e()}parseHeaders(){const e=(this.rawHeaders||Buffer.alloc(0)).toString("binary").split(/\r?\n/);const t=[];for(const i of e){if(t.length&&/^[ \t]/.test(i)){t[t.length-1]+="\n"+i}else{t.push(i)}}return t.filter((e=>/[^ \t\r]/.test(e))).map((e=>({key:_trimFieldName(e.substr(0,e.indexOf(":"))).toLowerCase(),line:e})))}}t["default"]=MessageParser;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},121:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=i(4492);const s=n(i(6005));const o=13;const r=10;const c=32;const l=9;const p=Buffer.from("\r\n");const d=Buffer.alloc(4096,p);class RelaxedBody extends a.Transform{constructor(e){super();e=e||{};this.bodyHash=s.default.createHash(e.hashAlgo||"sha256");this.byteLength=0;this.debug=e.debug;this._debugBody=e.debug?[]:false;this._lineHasContent=false;this._pendingWsp=false;this._pendingCr=false;this._pendingEmptyLines=0}_hashCanonical(e){if(!e.length){return}this.bodyHash.update(e);if(this._debugBody){this._debugBody.push(Buffer.from(e))}}_hashEmptyLines(){while(this._pendingEmptyLines>0){const e=Math.min(this._pendingEmptyLines,d.length/2);this._hashCanonical(d.subarray(0,e*2));this._pendingEmptyLines-=e}}_emitContent(e,t,i){if(!this._lineHasContent){if(this._pendingEmptyLines){this._hashCanonical(e.subarray(0,t));t=0;this._hashEmptyLines()}this._lineHasContent=true}if(this._pendingWsp){e[t++]=c;this._pendingWsp=false}e[t++]=i;return t}updateHash(e,t){const i=Buffer.allocUnsafe(e.length*2+2);let n=0;for(let t=0;t<e.length;t++){const a=e[t];if(a===r){if(this._lineHasContent){i[n++]=o;i[n++]=r;this._lineHasContent=false}else{this._pendingEmptyLines++}this._pendingWsp=false;this._pendingCr=false;continue}if(this._pendingCr){n=this._emitContent(i,n,o);this._pendingCr=false}if(a===o){this._pendingCr=true}else if(a===c||a===l){this._pendingWsp=true}else{n=this._emitContent(i,n,a)}}if(t&&this._pendingCr){n=this._emitContent(i,n,o);this._pendingCr=false}this._hashCanonical(i.subarray(0,n))}_transform(e,t,i){if(!e||!e.length){return i()}if(typeof e==="string"){e=Buffer.from(e,t)}this.updateHash(e);this.byteLength+=e.length;this.push(e);i()}_flush(e){this.updateHash(Buffer.alloc(0),true);if(this._lineHasContent){this._hashCanonical(p)}this.emit("hash",this.bodyHash.digest("base64"),this.debug?Buffer.concat(this._debugBody):false);e()}}t["default"]=RelaxedBody;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},5523:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(i(9146));const c=s(i(8720));const l=o(i(6005));const p=s(i(7952));function unsupportedHashAlgoError(e){const t=new Error('Unsupported DKIM hash algorithm "'+e+'"');t.code=p.ECONFIG;return t}function sign(e,t,i,n){n=n||{};const a="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";const s=n.headerFieldNames||a;const o=relaxedHeaders(e,s,n.skipFields);const r=generateDKIMHeader(n.domainName,n.keySelector,o.fieldNames,t,i);o.headers+="dkim-signature:"+relaxedHeaderLine(r);let c;try{c=l.default.createSign(("rsa-"+t).toUpperCase())}catch(e){throw unsupportedHashAlgoError(t)}c.update(o.headers,"latin1");let p;try{p=c.sign(n.privateKey,"base64")}catch(e){return false}return r+p.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()}sign.relaxedHeaders=relaxedHeaders;sign.unsupportedHashAlgoError=unsupportedHashAlgoError;t["default"]=sign;function generateDKIMHeader(e,t,i,n,a){const cleanTagValue=e=>(e||"").toString().replace(/[\x00-\x1f\x7f;=]/g,"");const s=["v=1","a=rsa-"+n,"c=relaxed/relaxed","d="+r.toASCII(cleanTagValue(e)),"q=dns/txt","s="+cleanTagValue(t),"bh="+a,"h="+cleanTagValue(i)].join("; ");return c.foldLines("DKIM-Signature: "+s,76)+";\r\n b="}function relaxedHeaders(e,t,i){const n=new Set;const a=new Set;const s=new Map;(i||"").toLowerCase().split(":").forEach((e=>{a.add(e.trim())}));(t||"").toLowerCase().split(":").filter((e=>!a.has(e.trim()))).forEach((e=>{n.add(e.trim())}));for(let t=e.length-1;t>=0;t--){const i=e[t];if(n.has(i.key)&&!s.has(i.key)){s.set(i.key,relaxedHeaderLine(i.line))}}const o=[];const r=[];n.forEach((e=>{if(s.has(e)){r.push(e);o.push(e+":"+s.get(e))}}));return{headers:o.join("\r\n")+"\r\n",fieldNames:r.join(":")}}function relaxedHeaderLine(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/[ \t]+/g," ").replace(/^ | $/g,"")}e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},7952:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.EFETCH=t.EURLACCESS=t.EFILEACCESS=t.EPROXY=t.ECONFIG=t.ESES=t.ESENDMAIL=t.EMAXRECIPIENTS=t.EMAXLIMIT=t.EOAUTH2=t.ENOAUTH=t.EAUTH=t.ESTREAM=t.EMESSAGE=t.EENVELOPE=t.EPROTOCOL=t.EREQUIRETLS=t.ETLS=t.EDNS=t.ESOCKET=t.ETIMEDOUT=t.ECONNECTION=t.ERROR_CODES=void 0;t.ERROR_CODES={ECONNECTION:"Connection closed unexpectedly",ETIMEDOUT:"Connection or operation timed out",ESOCKET:"Socket-level error",EDNS:"DNS resolution failed",ETLS:"TLS handshake or STARTTLS failed",EREQUIRETLS:"REQUIRETLS not supported by server (RFC 8689)",EPROTOCOL:"Invalid SMTP server response",EENVELOPE:"Invalid mail envelope (sender or recipients)",EMESSAGE:"Message delivery error",ESTREAM:"Stream processing error",EAUTH:"Authentication failed",ENOAUTH:"Authentication credentials not provided",EOAUTH2:"OAuth2 token generation or refresh error",EMAXLIMIT:"Pool resource limit reached (max messages per connection)",EMAXRECIPIENTS:"Recipient count exceeds maxRecipients",ESENDMAIL:"Sendmail command error",ESES:"AWS SES transport error",ECONFIG:"Invalid configuration",EPROXY:"Proxy connection error",EFILEACCESS:"File access rejected (disableFileAccess is set)",EURLACCESS:"URL access rejected (disableUrlAccess is set)",EFETCH:"HTTP fetch error"};t.ECONNECTION="ECONNECTION";t.ETIMEDOUT="ETIMEDOUT";t.ESOCKET="ESOCKET";t.EDNS="EDNS";t.ETLS="ETLS";t.EREQUIRETLS="EREQUIRETLS";t.EPROTOCOL="EPROTOCOL";t.EENVELOPE="EENVELOPE";t.EMESSAGE="EMESSAGE";t.ESTREAM="ESTREAM";t.EAUTH="EAUTH";t.ENOAUTH="ENOAUTH";t.EOAUTH2="EOAUTH2";t.EMAXLIMIT="EMAXLIMIT";t.EMAXRECIPIENTS="EMAXRECIPIENTS";t.ESENDMAIL="ESENDMAIL";t.ESES="ESES";t.ECONFIG="ECONFIG";t.EPROXY="EPROXY";t.EFILEACCESS="EFILEACCESS";t.EURLACCESS="EURLACCESS";t.EFETCH="EFETCH"},7671:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(7503));const c=s(i(8112));const l=1800;class Cookies{constructor(e){this.options=e||{};this.cookies=[]}set(e,t){const i=c.parse(t||"");const n=this.parse(e);let a;if(n.domain){a=n.domain.replace(/^\./,"");if(i.hostname.length<a.length||a.indexOf(".")<0||a.endsWith(".")||r.default.isIP(i.hostname)||!("."+i.hostname).endsWith("."+a)){n.domain=i.hostname}}else{n.domain=i.hostname}if(!n.path){n.path=this.getPath(i.pathname)}if(!n.expires){n.expires=new Date(Date.now()+(Number(this.options.sessionTimeout||l)||l)*1e3)}return this.add(n)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){const t=[];for(let i=this.cookies.length-1;i>=0;i--){const n=this.cookies[i];if(this.isExpired(n)){this.cookies.splice(i,1);continue}if(this.match(n,e)){t.unshift(n)}}return t}parse(e){const t={};(e||"").toString().split(";").forEach((e=>{const i=e.split("=");const n=i.shift().trim().toLowerCase();let a=i.join("=").trim();let s;if(!n){return}switch(n){case"expires":{const e=new Date(a);if(e.toString()!=="Invalid Date"){t.expires=e}break}case"path":t.path=a;break;case"domain":s=a.toLowerCase();if(s.length&&s.charAt(0)!=="."){s="."+s}t.domain=s;break;case"max-age":t.expires=new Date(Date.now()+(Number(a)||0)*1e3);break;case"secure":t.secure=true;break;case"httponly":t.httponly=true;break;default:if(!t.name){t.name=n;t.value=a}}}));return t}match(e,t){const i=c.parse(t||"");if(i.hostname!==e.domain&&(e.domain.charAt(0)!=="."||("."+i.hostname).substr(-e.domain.length)!==e.domain)){return false}const n=i.pathname||"/";const a=e.path;const s=n===a||n.startsWith(a)&&(a.endsWith("/")||n.charAt(a.length)==="/");if(!s){return false}if(e.secure&&i.protocol!=="https:"){return false}return true}add(e){if(!e||!e.name){return false}for(let t=0,i=this.cookies.length;t<i;t++){if(this.compare(this.cookies[t],e)){if(this.isExpired(e)){this.cookies.splice(t,1);return false}this.cookies[t]=e;return true}}if(!this.isExpired(e)){this.cookies.push(e)}return true}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly===t.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){const t=(e||"/").split("/");t.pop();const i=t.join("/").trim();if(i.charAt(0)!=="/"){return"/"}return i}}t["default"]=Cookies;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},9923:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(8849));const c=o(i(2286));const l=s(i(8112));const p=o(i(5628));const d=i(4492);const u=o(i(7671));const h=s(i(7009));const m=o(i(7503));const f=s(i(7952));const g=i(7071);const x=5;const v=60*1e3;const b=64*1024*1024;const _=["ALPNProtocols","ca","cert","checkServerIdentity","ciphers","crl","dhparam","ecdhCurve","honorCipherOrder","key","maxVersion","minVersion","passphrase","pfx","rejectUnauthorized","secureContext","secureOptions","secureProtocol","servername","sessionIdContext","sigalgs"];function parseFetchUrl(e){let t;try{t=l.parse(e)}catch(e){return false}if(t.protocol!=="http:"&&t.protocol!=="https:"){return false}return t}function nmfetch(e,t){t=t||{};t.fetchRes=t.fetchRes||new d.PassThrough;t.cookies=t.cookies||new u.default;t.redirects=t.redirects||0;t.maxRedirects=isNaN(t.maxRedirects)?x:t.maxRedirects;const i=t.fetchRes;const n=parseFetchUrl(e);if(!n){if(t.body&&typeof t.body.destroy==="function"){t.body.on("error",(()=>false));t.body.destroy()}setImmediate((()=>{const t=new Error("Unsupported protocol for URL "+e);t.code=f.EFETCH;t.sourceUrl=e;i.emit("error",t)}));return i}if(t.cookie){[].concat(t.cookie||[]).forEach((i=>{t.cookies.set(i,e)}));t.cookie=false}let a=(t.method||"").toString().trim().toUpperCase()||"GET";let s=false;let o;let y;const w=n.protocol==="https:"?c.default:r.default;const E={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+h.version};Object.keys(t.headers||{}).forEach((e=>{if((0,g.isProtoKey)(e.toLowerCase().trim())){return}E[e.toLowerCase().trim()]=t.headers[e]}));if(t.userAgent){E["user-agent"]=t.userAgent}if(n.auth){E.Authorization="Basic "+Buffer.from(n.auth).toString("base64")}if(o=t.cookies.get(e)){E.cookie=o}if(t.body){if(t.contentType!==false){E["Content-Type"]=t.contentType||"application/x-www-form-urlencoded"}if(typeof t.body.pipe==="function"){E["Transfer-Encoding"]="chunked";y=t.body;y.on("error",(t=>{if(s){return}s=true;t.code=f.EFETCH;t.sourceUrl=e;i.emit("error",t)}))}else{if(t.body instanceof Buffer){y=t.body}else if(typeof t.body==="object"){try{y=Buffer.from(Object.keys(t.body).map((e=>{const i=t.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(i)})).join("&"))}catch(t){s=true;t.code=f.EFETCH;t.sourceUrl=e;setImmediate((()=>i.emit("error",t)));return i}}else{y=Buffer.from(t.body.toString().trim())}E["Content-Type"]=t.contentType||"application/x-www-form-urlencoded";E["Content-Length"]=y.length}a=(t.method||"").toString().trim().toUpperCase()||"POST"}let k;const S={method:a,host:n.hostname,path:n.path,port:n.port?n.port:n.protocol==="https:"?443:80,headers:E,rejectUnauthorized:true,agent:false};if(t.tls){Object.keys(t.tls).forEach((e=>{if(_.includes(e)){S[e]=t.tls[e]}}))}if(n.protocol==="https:"&&n.hostname&&n.hostname!==S.host&&!m.default.isIP(n.hostname)&&!S.servername){S.servername=n.hostname}try{k=w.request(S)}catch(t){s=true;setImmediate((()=>{t.code=f.EFETCH;t.sourceUrl=e;i.emit("error",t)}));return i}const fail=(t,n=e)=>{if(s){return}s=true;t.code=f.EFETCH;t.sourceUrl=n;i.emit("error",t);k.abort()};const O=typeof t.timeout==="number"&&t.timeout>=0?t.timeout:v;if(O){k.setTimeout(O,(()=>fail(new Error("Request Timeout"))))}k.on("error",(e=>fail(e)));k.on("response",(a=>{let o;if(s){return}switch(a.headers["content-encoding"]){case"gzip":case"deflate":o=p.default.createUnzip();break}if(a.headers["set-cookie"]){[].concat(a.headers["set-cookie"]||[]).forEach((i=>{t.cookies.set(i,e)}))}if([301,302,303,307,308].includes(a.statusCode)&&a.headers.location){t.redirects++;if(t.redirects>t.maxRedirects){return fail(new Error("Maximum redirect count exceeded"))}t.method="GET";t.body=false;let i;try{i=l.resolve(e,a.headers.location)}catch(e){i=a.headers.location}const o=parseFetchUrl(i);if(!o){return fail(new Error("Unsupported protocol for URL "+i),i)}const r=o.hostname!==n.hostname;const c=n.protocol==="https:"&&o.protocol==="http:";if(t.headers&&(r||c)){const e=["authorization","cookie","proxy-authorization"];Object.keys(t.headers).forEach((i=>{if(e.includes(i.toLowerCase())){delete t.headers[i]}}))}s=true;a.resume();k.abort();return nmfetch(i,t)}i.statusCode=a.statusCode;i.headers=a.headers;if(a.statusCode>=300&&!t.allowErrorResponse){return fail(new Error("Invalid status code "+a.statusCode))}a.on("error",(e=>fail(e)));const r=typeof t.maxBytes==="number"&&t.maxBytes>0?t.maxBytes:b;const c=o||a;let d=0;c.on("data",(e=>{d+=e.length;if(d<=r||s){return}c.unpipe(i);fail(new Error("Response size exceeds the allowed "+r+" bytes"))}));if(o){a.pipe(o).pipe(i);o.on("error",(e=>fail(e)))}else{a.pipe(i)}}));setImmediate((()=>{if(y){try{if(typeof y.pipe==="function"){return y.pipe(k)}k.write(y)}catch(e){return fail(e)}}k.end()}));return i}nmfetch.Cookies=u.default;nmfetch.DEFAULT_TIMEOUT=v;t["default"]=nmfetch;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},621:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});const o=s(i(7009));const r=s(i(9119));class JSONTransport{constructor(e){e=e||{};this.options=e;this.name="JSONTransport";this.version=o.version;this.logger=r.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=true;const i=e.message.getEnvelope();const n=e.message.messageId();const a=[].concat(i.to||[]);if(a.length>3){a.push("...and "+a.splice(2).length+" more")}this.logger.info({tnx:"send",messageId:n},"Composing JSON structure of %s to <%s>",n,a.join(", "));setImmediate((()=>{e.normalize(((e,a)=>{if(e){this.logger.error({err:e,tnx:"send",messageId:n},"Failed building JSON structure for %s. %s",n,e.message);return t(e)}delete a.envelope;delete a.normalizedHeaders;return t(null,{envelope:i,messageId:n,message:this.options.skipEncoding?a:JSON.stringify(a)})}))}))}}t["default"]=JSONTransport;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},8688:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(7312));const c=s(i(8720));const l=i(9119);function isContentObject(e){const t=e;return typeof e==="object"&&!!(t.content||t.path||t.href||t.raw)}class MailComposer{constructor(e){this.mail=e||{};this.message=false}compile(){this._alternatives=this.getAlternatives();this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop();this._attachments=this.getAttachments(!!this._htmlNode);this._useRelated=!!(this._htmlNode&&this._attachments.related.length);this._useAlternative=this._alternatives.length>1;this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&this._attachments.attached.length===1;if(this.mail.raw){this.message=new r.default("message/rfc822",{newline:this.mail.newline,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess}).setRaw(this.mail.raw)}else if(this._useMixed){this.message=this._createMixed()}else if(this._useAlternative){this.message=this._createAlternative()}else if(this._useRelated){this.message=this._createRelated()}else{this.message=this._createContentNode(false,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""})}if(this.mail.headers){this.message.addHeader(this.mail.headers)}["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{const t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));if(this.mail[t]){this.message.setHeader(e,this.mail[t])}}));if(this.mail.envelope){this.message.setEnvelope(this.mail.envelope)}this.message.messageId();return this.message}getAttachments(e){let t;const i=[].concat(this.mail.attachments||[]).map(((e,t)=>{if(/^data:/i.test(e.path||e.href)){e=this._processDataUrl(e)}const i=e.contentType||c.detectMimeType(e.filename||e.path||e.href||"bin");const n=/^image\//i.test(i);const a=/^message\//i.test(i);const s=e.contentDisposition||(a||n&&e.cid?"inline":"attachment");let o;if("contentTransferEncoding"in e){o=e.contentTransferEncoding}else if(a){o="8bit"}else{o="base64"}const r={contentType:i,contentDisposition:s,contentTransferEncoding:o};if(e.filename){r.filename=e.filename}else if(!a&&e.filename!==false){r.filename=(e.path||e.href||"").split(/[/\\]/).pop().split("?").shift()||"attachment-"+(t+1);if(r.filename.indexOf(".")<0){r.filename+="."+c.detectExtension(r.contentType)}}if(/^https?:\/\//i.test(e.path)){e.href=e.path;e.path=undefined}if(e.cid){r.cid=e.cid}if(e.raw){r.raw=e.raw}else if(e.path){r.content={path:e.path}}else if(e.href){r.content={href:e.href,httpHeaders:e.httpHeaders,tls:e.tls}}else{r.content=e.content||""}if(e.encoding){r.encoding=e.encoding}if(e.headers){r.headers=e.headers}return r}));if(this.mail.icalEvent){t=Object.assign({},this._getIcalEvent());t.contentType="application/ics";if(!t.headers){t.headers={}}t.filename=t.filename||"invite.ics";t.headers["Content-Disposition"]="attachment";t.headers["Content-Transfer-Encoding"]="base64"}if(!e){return{attached:i.concat(t||[]),related:[]}}return{attached:i.filter((e=>!e.cid)).concat(t||[]),related:i.filter((e=>!!e.cid))}}_getIcalEvent(){if(!this._icalEvent){let e;if(isContentObject(this.mail.icalEvent)){e=(0,l.copyOwnKeys)({},this.mail.icalEvent)}else{e={content:this.mail.icalEvent}}if(/^data:/i.test(e.path||e.href)){e=this._processDataUrl(e)}if(/^https?:\/\//i.test(e.path)){e.href=e.path;e.path=undefined}if(!e.raw){if(e.path){e.content={path:e.path};e.path=undefined}else if(e.href){e.content={href:e.href,httpHeaders:e.httpHeaders,tls:e.tls};e.href=undefined}}if(e.content&&typeof e.content==="object"){e.content._resolve=true}this._icalEvent=e}return this._icalEvent}getAlternatives(){const e=[];let t,i,n,a,s;if(this.mail.text){if(isContentObject(this.mail.text)){t=this.mail.text}else{t={content:this.mail.text}}t.contentType="text/plain; charset=utf-8"}if(this.mail.watchHtml){if(isContentObject(this.mail.watchHtml)){n=this.mail.watchHtml}else{n={content:this.mail.watchHtml}}n.contentType="text/watch-html; charset=utf-8"}if(this.mail.amp){if(isContentObject(this.mail.amp)){a=this.mail.amp}else{a={content:this.mail.amp}}a.contentType="text/x-amp-html; charset=utf-8"}if(this.mail.icalEvent){s=Object.assign({},this._getIcalEvent());s.filename=false;s.contentType="text/calendar; charset=utf-8; method="+(s.method||"PUBLISH").toString().trim().toUpperCase();if(!s.headers){s.headers={}}}if(this.mail.html){if(isContentObject(this.mail.html)){i=this.mail.html}else{i={content:this.mail.html}}i.contentType="text/html; charset=utf-8"}[].concat(t||[]).concat(n||[]).concat(a||[]).concat(i||[]).concat(s||[]).concat(this.mail.alternatives||[]).forEach((t=>{if(/^data:/i.test(t.path||t.href)){t=this._processDataUrl(t)}const i={contentType:t.contentType||c.detectMimeType(t.filename||t.path||t.href||"txt"),contentTransferEncoding:t.contentTransferEncoding};if(t.filename){i.filename=t.filename}if(/^https?:\/\//i.test(t.path)){t.href=t.path;t.path=undefined}if(t.raw){i.raw=t.raw}else if(t.path){i.content={path:t.path}}else if(t.href){i.content={href:t.href,httpHeaders:t.httpHeaders,tls:t.tls}}else{i.content=t.content||""}if(t.encoding){i.encoding=t.encoding}if(t.headers){i.headers=t.headers}e.push(i)}));return e}_createMixed(e){const t=e?e.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r.default("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline});if(this._useAlternative){this._createAlternative(t)}else if(this._useRelated){this._createRelated(t)}[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{if(!this._useRelated||e!==this._htmlNode){this._createContentNode(t,e)}}));return t}_createAlternative(e){const t=e?e.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r.default("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline});this._alternatives.forEach((e=>{if(this._useRelated&&this._htmlNode===e){this._createRelated(t)}else{this._createContentNode(t,e)}}));return t}_createRelated(e){const t=e?e.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r.default('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline});this._createContentNode(t,this._htmlNode);this._attachments.related.forEach((e=>this._createContentNode(t,e)));return t}_createContentNode(e,t){t=t||{};t.content=t.content||"";const i=(t.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");const n=e?e.createChild(t.contentType,{filename:t.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r.default(t.contentType,{filename:t.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline});if(t.headers){n.addHeader(t.headers)}if(t.cid){n.setHeader("Content-Id","<"+t.cid.replace(/[<>]/g,"")+">")}if(t.contentTransferEncoding){n.setHeader("Content-Transfer-Encoding",t.contentTransferEncoding)}else if(this.mail.encoding&&/^text\//i.test(t.contentType)){n.setHeader("Content-Transfer-Encoding",this.mail.encoding)}if(!/^text\//i.test(t.contentType)||t.contentDisposition){n.setHeader("Content-Disposition",t.contentDisposition||(t.cid&&/^image\//i.test(t.contentType)?"inline":"attachment"))}if(typeof t.content==="string"&&!["utf8","usascii","ascii"].includes(i)){t.content=Buffer.from(t.content,i)}if(t.raw){n.setRaw(t.raw)}else{n.setContent(t.content)}return n}_processDataUrl(e){const t=e.path||e.href;if(!t||typeof t!=="string"){return e}if(!t.startsWith("data:")){return e}if(t.length>52428800){let i="application/octet-stream";const n=t.indexOf(",");if(n>0&&n<200){const e=t.substring(5,n);const a=e.split(";");if(a[0]&&a[0].includes("/")){i=a[0].trim()}}return Object.assign((0,l.copyOwnKeys)({},e),{path:false,href:false,content:Buffer.alloc(0),contentType:e.contentType||i})}let i;try{i=(0,l.parseDataURI)(t)}catch(t){return e}if(!i){return e}e.content=i.data;e.contentType=e.contentType||i.contentType;if("path"in e){e.path=false}if("href"in e){e.href=false}return e}}t["default"]=MailComposer;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},5759:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(5673);const c=s(i(9119));const l=s(i(3585));const p=o(i(8688));const d=o(i(8445));const u=o(i(6225));const h=s(i(7952));const m=o(i(7261));const f=s(i(8112));const g=s(i(7009));const x=o(i(7592));const v=o(i(7503));const b=o(i(604));const _=o(i(6005));const y=1e5;class Mail extends r.EventEmitter{constructor(e,t,i){super();this.options=t||{};this._defaults=i||{};this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]};this._userPlugins={compile:[],stream:[]};this.meta=new Map;this.dkim=this.options.dkim?new d.default(this.options.dkim):false;this.transporter=e;this.transporter.mailer=this;this.logger=c.getLogger(this.options,{component:this.options.component||"mail"});this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString());if(typeof this.transporter.on==="function"){this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)}));this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message);this.emit("error",e)}));this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}));this.transporter.on("clear",((...e)=>{this.emit("clear",...e)}))}["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>{if(typeof this.transporter[e]==="function"){if(e==="verify"&&typeof this.getSocket==="function"){this.transporter.getSocket=this.getSocket;this.getSocket=false}return this.transporter[e](...t)}this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e);return false}}));if(this.options.proxy&&typeof this.options.proxy==="string"){this.setupProxy(this.options.proxy)}}use(e,t){e=(e||"").toString();if(!this._userPlugins.hasOwnProperty(e)){this._userPlugins[e]=[t]}else{this._userPlugins[e].push(t)}return this}sendMail(e,t=null){let i;if(!t){i=new Promise(((e,i)=>{t=c.callbackPromise(e,i)}))}const n=t;if(typeof this.getSocket==="function"){this.transporter.getSocket=this.getSocket;this.getSocket=false}const a=new x.default(this,e);this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version);this._processPlugins("compile",a,(e=>{if(e){this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message);return n(e)}let t;try{a.message=new p.default(a.data).compile();a.setMailerHeader();a.setPriorityHeaders();a.setListHeaders();t=a.message.getEnvelope().to.length}catch(e){this.logger.error({err:e,tnx:"transport",action:"send"},"Compile Error: %s",e.message);return n(e)}const i=a.data.maxRecipients===undefined?y:a.data.maxRecipients;if(i&&t>i){const e=new Error(`Message has ${t} recipients, which is over the ${i} allowed by maxRecipients`);e.code=h.EMAXRECIPIENTS;this.logger.error({err:e,tnx:"transport",action:"send"},"Send Error: %s",e.message);return n(e)}this._processPlugins("stream",a,(e=>{if(e){this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message);return n(e)}if(a.data.dkim||this.dkim){a.message.processFunc((e=>{const t=a.data.dkim?new d.default(a.data.dkim):this.dkim;this.logger.debug({tnx:"DKIM",messageId:a.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length);return t.sign(e,a.data._dkim)}))}this.transporter.send(a,((...e)=>{if(e[0]){this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message)}n(...e)}))}))}));return i}getVersionString(){return m.default.format("%s (%s; +%s; %s/%s)",g.name,g.version,g.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,i){e=(e||"").toString();if(!this._userPlugins.hasOwnProperty(e)){return i()}const n=this._userPlugins[e]||[];const a=this._defaultPlugins[e]||[];if(n.length){this.logger.debug({tnx:"transaction",pluginCount:n.length,step:e},"Using %s plugins for %s",n.length,e)}if(n.length+a.length===0){return i()}let s=0;let o="default";const processPlugins=()=>{let e=o==="default"?a:n;if(s>=e.length){if(o==="default"&&n.length){o="user";s=0;e=n}else{return i()}}const r=e[s++];r(t,(e=>{if(e){return i(e)}processPlugins()}))};processPlugins()}setupProxy(e){const t=f.parse(e);this.getSocket=(e,i)=>{const n=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+n)){return this.meta.get("proxy_handler_"+n)(t,e,i)}switch(n){case"http":case"https":(0,u.default)(t.href,e.port,e.host,this.options.tls||{},((e,t)=>{if(e){return i(e)}return i(null,{connection:t})}));return;case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module")){let e=new Error("Socks module not loaded");e.code=h.EPROXY;return i(e)}const connect=n=>{const a=!!this.meta.get("proxy_socks_module").SocksClient;const s=a?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module");const o=Number(t.protocol.replace(/\D/g,""))||5;const r={proxy:{ipaddress:n,port:Number(t.port),type:o},[a?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.username||t.password){const e=t.username||"";const i=t.password||"";if(a){r.proxy.userId=e;r.proxy.password=i}else if(o===4){r.userid=e}else{r.authentication={username:e,password:i}}}s.createConnection(r,((e,t)=>{if(e){return i(e)}return i(null,{connection:t.socket||t})}))};if(v.default.isIP(t.hostname)){return connect(t.hostname)}return b.default.resolve(t.hostname,((e,t)=>{if(e){return i(e)}connect(Array.isArray(t)?t[0]:t)}))}}let a=new Error("Unknown proxy configuration");a.code=h.EPROXY;i(a)}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html){return t()}e.resolveContent(e.data,"html",{disableFileAccess:e.data.disableFileAccess,disableUrlAccess:e.data.disableUrlAccess},((i,n)=>{if(i){return t(i)}let a=0;n=(n||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,i,n,s)=>{const o=_.default.randomBytes(10).toString("hex")+"@localhost";if(!e.data.attachments){e.data.attachments=[]}if(!Array.isArray(e.data.attachments)){e.data.attachments=[].concat(e.data.attachments||[])}e.data.attachments.push({path:n,cid:o,filename:"image-"+ ++a+"."+l.detectExtension(s)});return i+"cid:"+o}));e.data.html=n;t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}}t["default"]=Mail;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},7592:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(i(9119));const c=o(i(7312));const l=s(i(8720));const hasOwn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);class MailMessage{constructor(e,t){this.mailer=e;this.data={};this.message=null;t=t||{};const i=e.options||{};const n=e._defaults||{};r.copyOwnKeys(this.data,t);this.data.headers=this.data.headers||{};r.copyOwnKeys(this.data,n,(e=>hasOwn(this.data,e)));r.copyOwnKeys(this.data.headers,n.headers,(e=>hasOwn(this.data.headers,e)));["disableFileAccess","disableUrlAccess","normalizeHeaderKey","maxRecipients"].forEach((e=>{if(e in i){this.data[e]=i[e]}}));["disableFileAccess","disableUrlAccess"].forEach((e=>{if(!(e in i)&&hasOwn(n,e)){this.data[e]=this.data[e]||n[e]}}))}resolveContent(e,t,i,n){if(!n&&typeof i==="function"){n=i;i=false}i=i||{};const a={disableFileAccess:this.data.disableFileAccess||i.disableFileAccess,disableUrlAccess:this.data.disableUrlAccess||i.disableUrlAccess};return r.resolveContent(e,t,a,n)}resolveAll(e){const t=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];if(this.data.alternatives&&this.data.alternatives.length){this.data.alternatives.forEach(((e,i)=>{t.push([this.data.alternatives,i])}))}if(this.data.attachments&&this.data.attachments.length){this.data.attachments.forEach(((e,i)=>{if(!e.filename){e.filename=(e.path||e.href||"").split(/[/\\]/).pop().split("?").shift()||"attachment-"+(i+1);if(e.filename.indexOf(".")<0){e.filename+="."+l.detectExtension(e.contentType)}}if(!e.contentType){e.contentType=l.detectMimeType(e.filename||e.path||e.href||"bin")}t.push([this.data.attachments,i])}))}const i=new c.default;const n=["from","to","cc","bcc","sender","replyTo"];n.forEach((e=>{let t;if(this.message){t=[].concat(i._parseAddresses(this.message.getHeader(e==="replyTo"?"reply-to":e))||[])}else if(this.data[e]){t=[].concat(i._parseAddresses(this.data[e])||[])}if(t&&t.length){this.data[e]=t}else if(e in this.data){this.data[e]=null}}));const a=["from","sender"];a.forEach((e=>{if(this.data[e]){this.data[e]=this.data[e].shift()}}));let s=0;const resolveNext=()=>{if(s>=t.length){return e(null,this.data)}const i=t[s++];if(!i[0]||!i[0][i[1]]){return resolveNext()}r.resolveContent(...i,{disableFileAccess:this.data.disableFileAccess,disableUrlAccess:this.data.disableUrlAccess},((t,n)=>{if(t){return e(t)}const a={content:n};if(i[0][i[1]]&&typeof i[0][i[1]]==="object"&&!Buffer.isBuffer(i[0][i[1]])){r.copyOwnKeys(a,i[0][i[1]],(e=>e in a||["content","path","href","raw"].includes(e)))}i[0][i[1]]=a;resolveNext()}))};setImmediate((()=>resolveNext()))}normalize(e){const t=this.message.getEnvelope();const i=this.message.messageId();this.resolveAll(((n,a)=>{if(n){return e(n)}a.envelope=t;a.messageId=i;["html","text","watchHtml","amp"].forEach((e=>{if(a[e]&&a[e].content){if(typeof a[e].content==="string"){a[e]=a[e].content}else if(Buffer.isBuffer(a[e].content)){a[e]=a[e].content.toString()}}}));if(a.icalEvent&&Buffer.isBuffer(a.icalEvent.content)){a.icalEvent.content=a.icalEvent.content.toString("base64");a.icalEvent.encoding="base64"}if(a.alternatives&&a.alternatives.length){a.alternatives.forEach((e=>{if(e&&e.content&&Buffer.isBuffer(e.content)){e.content=e.content.toString("base64");e.encoding="base64"}}))}if(a.attachments&&a.attachments.length){a.attachments.forEach((e=>{if(e&&e.content&&Buffer.isBuffer(e.content)){e.content=e.content.toString("base64");e.encoding="base64"}}))}a.normalizedHeaders={};Object.keys(a.headers||{}).forEach((e=>{if(r.isProtoKey(e)){return}let t=[].concat(a.headers[e]||[]).shift();t=t&&t.value||t;if(t){if(["references","in-reply-to","message-id","content-id"].includes(e)){t=this.message._encodeHeaderValue(e,t)}a.normalizedHeaders[e]=t}}));if(a.list&&typeof a.list==="object"){const e=this._getListHeaders(a.list);e.forEach((e=>{a.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")}))}if(a.references){a.normalizedHeaders.references=this.message._encodeHeaderValue("references",a.references)}if(a.inReplyTo){a.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",a.inReplyTo)}return e(null,a)}))}setMailerHeader(){if(!this.message||!this.data.xMailer){return}this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(!this.message||!this.data.priority){return}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(){if(!this.message||!this.data.list||typeof this.data.list!=="object"){return}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((e=>({prepared:true,foldLines:true,value:[].concat(e||[]).map((e=>{if(typeof e==="string"){e={url:e}}if(e&&e.url){let i=(e.comment||"").toString().replace(/\r?\n|\r/g," ");const n=!l.isPlainText(i)||/\x7f/.test(i);if(t.toLowerCase().trim()==="id"){i=n?l.encodeWord(i):l.quoteString(i);return(e.comment?i+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+:\/{0,2}/,"<")}i=n?l.encodeWord(i):i.replace(/[()\\]/g,"\\$&");return this._formatListUrl(e.url)+(e.comment?" ("+i+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){e=e.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"").replace(/[\s<]+|[\s>]+/g,"");if(/^(https?|mailto|ftp):/.test(e)){return"<"+e+">"}if(/^[^@]+@[^@]+$/.test(e)){return"<mailto:"+e+">"}return"<http://"+e+">"}}t["default"]=MailMessage;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},8720:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});t.isPlainText=isPlainText;t.quoteString=quoteString;t.hasLongerLines=hasLongerLines;t.encodeWord=encodeWord;t.encodeWords=encodeWords;t.buildHeaderValue=buildHeaderValue;t.buildHeaderParam=buildHeaderParam;t.parseHeaderValue=parseHeaderValue;t.detectExtension=detectExtension;t.detectMimeType=detectMimeType;t.foldLines=foldLines;t.splitMimeEncodedString=splitMimeEncodedString;t.encodeURICharComponent=encodeURICharComponent;t.safeEncodeURIComponent=safeEncodeURIComponent;const o=s(i(3429));const r=s(i(7605));const c=s(i(3585));const l=i(7071);function isPlainText(e,t){const i=t?/[\x00-\x1f\x7f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/;return typeof e==="string"&&!i.test(e)}function quoteString(e){return'"'+(e||"").toString().replace(/["\\]/g,"\\$&")+'"'}function hasLongerLines(e,t){if(e.length>128*1024){return true}return new RegExp("^.{"+(t+1)+",}","m").test(e)}function encodeWord(e,t,i){t=(t||"Q").toString().toUpperCase().trim().charAt(0);i=i||0;let n;const a="UTF-8";if(i&&i>7+a.length){i-=7+a.length}if(t==="Q"){n=r.encode(e).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{const t=e.charCodeAt(0).toString(16).toUpperCase();if(e===" "){return"_"}return"="+(t.length===1?"0"+t:t)}))}else if(t==="B"){n=typeof e==="string"?e:e.toString("utf-8");i=i?Math.max(3,(i-i%4)/4*3):0}if(i&&(t!=="B"?n:o.encode(e)).length>i){if(t==="Q"){n=splitMimeEncodedString(n,i).join("?= =?"+a+"?"+t+"?")}else{const e=[];let s="";for(let t=0,a=n.length;t<a;t++){let a=n.charAt(t);if(/[\ud800-\udbff]/.test(a)&&/[\udc00-\udfff]/.test(n.charAt(t+1))){a+=n.charAt(++t)}if(Buffer.byteLength(s+a)<=i||t===0){s+=a}else{e.push(o.encode(s));s=a}}if(s){e.push(o.encode(s))}if(e.length>1){n=e.join("?= =?"+a+"?"+t+"?")}else{n=e.join("")}}}else if(t==="B"){n=o.encode(e)}return"=?"+a+"?"+t+"?"+n+(n.substr(-2)==="?="?"":"?=")}function encodeWords(e,t,i,n){i=i||0;const a=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!a){return e}if(n){return encodeWord(e,t,i)}const s=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!s){return e}const o=a.index+(a[0].match(/[^\s]/)||{index:0}).index;const r=s.index+(s[1]||"").length;return(o?e.substr(0,o):"")+encodeWord(e.substring(o,r),t||"Q",i)+(r<e.length?e.substr(r):"")}function buildHeaderValue(e){const t=[];Object.keys(e.params||{}).forEach((i=>{const n=e.params[i];const a=i.replace(/[\x00-\x1f\x7f]/g,"");if(!isPlainText(n,true)||n.length>=75){buildHeaderParam(a,n,50).forEach((e=>{if(!/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)||e.key.substr(-1)==="*"){t.push(e.key+"="+e.value)}else{t.push(e.key+"="+JSON.stringify(e.value))}}))}else if(!n.length||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(n)){t.push(a+"="+JSON.stringify(n))}else{t.push(a+"="+n)}}));const i=typeof e.value==="string"?e.value.replace(/[\x00-\x1f\x7f]/g,""):e.value;return i+(t.length?"; "+t.join("; "):"")}function buildHeaderParam(e,t,i){const n=[];let a=typeof t==="string"?t:(t||"").toString();let s;let o;let r=0;let c,l;i=i||50;if(isPlainText(t,true)){if(a.length<=i){return[{key:e,value:a}]}a=a.replace(new RegExp(".{"+i+"}","g"),(e=>{n.push({line:e});return""}));if(a){n.push({line:a})}}else{if(/[\uD800-\uDBFF]/.test(a)){const e=[];for(c=0,l=a.length;c<l;c++){s=a.charAt(c);if(/[\ud800-\udbff]/.test(s)&&/[\udc00-\udfff]/.test(a.charAt(c+1))){s+=a.charAt(c+1);e.push(s);c++}else{e.push(s)}}a=e}o="utf-8''";let e=true;r=0;for(c=0,l=a.length;c<l;c++){s=a[c];if(e){s=safeEncodeURIComponent(s)}else{s=s===" "?s:safeEncodeURIComponent(s);if(s!==a[c]){if((safeEncodeURIComponent(o)+s).length>=i){n.push({line:o,encoded:e});o="";e=true}else{e=true;c=r;o="";continue}}}if((o+s).length>=i){n.push({line:o,encoded:e});o=s=a[c]===" "?" ":safeEncodeURIComponent(a[c]);if(s===a[c]){e=false;r=c-1}else{e=true}}else{o+=s}}if(o){n.push({line:o,encoded:e})}}return n.map(((t,i)=>({key:e+"*"+i+(t.encoded?"*":""),value:t.line})))}const p=/^[^\x00-\x20\x7f()<>@,;:\\"/[\]?=]+$/;function _isParamName(e){return!!e&&!(0,l.isProtoKey)(e)}function parseHeaderValue(e){const t={value:"",params:{}};const setParam=(e,i)=>{e=e.toLowerCase();if(_isParamName(e)&&!Object.prototype.hasOwnProperty.call(t.params,e)){t.params[e]=i}};let i=false;let n="";let a="value";let s=false;let o=false;let r;let c="";let l=false;const flushSpace=()=>{if(n.length){n+=c}c=""};const addChr=e=>{flushSpace();n+=e};const takeValue=()=>{const e=n;n="";c="";l=false;return e};const storeValue=()=>{const e=takeValue();if(i===false){t.value=e}else{setParam(i,e)}};const storeEmptyKey=()=>{setParam(takeValue().trim(),"")};for(let t=0,p=e.length;t<p;t++){r=e.charAt(t);if(a==="key"){if(r==="="){i=takeValue().trim();a="value";continue}if(r===";"){storeEmptyKey();continue}n+=r}else{if(l&&r!==";"){o=false;continue}if(o){addChr(r)}else if(s&&r==="\\"){o=true;continue}else if(s&&r===s){s=false;l=true}else if(!s&&r==='"'){s=r;flushSpace()}else if(!s&&r===";"){storeValue();a="key"}else if(!s&&(r===" "||r==="\t")){c+=r}else{addChr(r)}o=false}}if(a==="value"){storeValue()}else{storeEmptyKey()}const d=new Map;Object.keys(t.params).forEach((e=>{const i=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/);if(!i){return}const n=e.substr(0,i.index);const a=Number(i[2]||i[3])||0;const s=i[0].substr(-1)==="*";let o=t.params[e];delete t.params[e];if(!_isParamName(n)){return}let r=d.get(n);if(!r){r={charset:false,sections:[]};d.set(n,r)}const c=a===0&&s?o.match(/^([^']*)'[^']*'(.*)$/):null;if(c){r.charset=p.test(c[1])?c[1]:"iso-8859-1";o=c[2]}r.sections.push({nr:a,value:o,encoded:s})}));d.forEach(((e,i)=>{if(Object.prototype.hasOwnProperty.call(t.params,i)){return}e.sections.sort(((e,t)=>e.nr-t.nr));if(!e.charset){t.params[i]=e.sections.map((e=>e.value)).join("");return}t.params[i]="=?"+e.charset+"?Q?"+e.sections.map(_encodeContinuationSection).join("")+"?="}));return t}function _encodeContinuationSection(e){const t=e.encoded?/[=?_\s]/g:/[=?_\s%]/g;return e.value.replace(t,(e=>{const t=e.charCodeAt(0).toString(16);if(e===" "){return"_"}return"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")}function detectExtension(e){return c.detectExtension(e)}function detectMimeType(e){return c.detectMimeType(e)}function foldLines(e,t,i){e=(e||"").toString();t=t||76;let n=0;const a=e.length;let s="";let o,r;while(n<a){o=e.substr(n,t);if(o.length<t){s+=o;break}if(r=o.match(/^[^\n\r]*(\r?\n|\r)/)){o=r[0];s+=o;n+=o.length;continue}else if((r=o.match(/(\s+)[^\s]*$/))&&r[0].length-(i?(r[1]||"").length:0)<o.length){o=o.substr(0,o.length-(r[0].length-(i?(r[1]||"").length:0)))}else if(r=e.substr(n+o.length).match(/^[^\s]+(\s*)/)){o=o+r[0].substr(0,r[0].length-(!i?(r[1]||"").length:0))}s+=o;n+=o.length;if(n<a){s+="\r\n"}}return s}function splitMimeEncodedString(e,t){const i=[];let n,a,s,o,r;t=Math.max(t||0,12);while(e.length){n=e.substr(0,t);if(s=n.match(/[=][0-9A-F]?$/i)){n=n.substr(0,s.index)}a=n.length?n:e.substr(0,t);r=false;while(!r&&n.length){r=true;if(s=e.substr(n.length).match(/^[=]([0-9A-F]{2})/i)){o=parseInt(s[1],16);if(o<194&&o>127){n=n.substr(0,n.length-3);r=false}}}if(!n.length){n=a}i.push(n);e=e.substr(n.length)}return i}function encodeURICharComponent(e){let t="";let i=e.charCodeAt(0).toString(16).toUpperCase();if(i.length%2){i="0"+i}if(i.length>2){for(let e=0,n=i.length/2;e<n;e++){t+="%"+i.substr(e,2)}}else{t+="%"+i}return t}function safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){e=encodeURIComponent(Buffer.from(e,"utf-8").toString("utf-8"))}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>encodeURICharComponent(e)))}},3585:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.detectMimeType=detectMimeType;t.detectExtension=detectExtension;const a=n(i(9411));const s="application/octet-stream";const o="bin";const r=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]);const c=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);function detectMimeType(e){if(!e){return s}const t=a.default.parse(e);const i=(t.ext.substr(1)||t.name||"").split("?").shift().trim().toLowerCase();const n=c.has(i)?c.get(i):s;if(Array.isArray(n)){return n[0]}return n}function detectExtension(e){if(!e){return o}const t=e.toLowerCase().trim().split("/");const i=t.shift().trim();const n=t.join("/").trim();if(r.has(i+"/"+n)){const e=r.get(i+"/"+n);if(Array.isArray(e)){return e[0]}return e}switch(i){case"text":return"txt";default:return"bin"}}},7312:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(6005));const c=o(i(7561));const l=s(i(9146));const p=i(4492);const d=s(i(9119));const u=o(i(1041));const h=s(i(8720));const m=s(i(7605));const f=s(i(3429));const g=o(i(1778));const x=o(i(9923));const v=s(i(7952));const b=o(i(4398));const _=o(i(7));const y=o(i(9700));const w=["From","Sender","To","Cc","Bcc","Reply-To","Date","References"];const E="[A-Za-z0-9!#$%&'*+\\-/=?^_`{|}~\\x80-\\uFFFF]";const k=new RegExp("^"+E+"+(?:\\."+E+"+)*$");const S=/^"(?:[^"\\]|\\[\s\S])*"$/;const O=/^[^\s"(),:;<>@[\\\]]+@[^\s"(),:;<>@[\\\]]+$/;const A=/[/\\?#%\x00-\x20\x7F]/;function normalizeDomain(e,t){const i=t?u.default.domainToUnicode:u.default.domainToASCII;if(typeof i==="function"&&!A.test(e)){const t=i(e);if(t){return t}}return t?l.toUnicode(e):l.toASCII(e)}function _stripBoundaryControls(e){return e.replace(/[\x00-\x1f\x7f]+/g,"")}class MimeNode{constructor(e,t){this.nodeCounter=0;t=t||{};this.baseBoundary=_stripBoundaryControls(t.baseBoundary||r.default.randomBytes(8).toString("hex"));this.boundaryPrefix=_stripBoundaryControls(t.boundaryPrefix||"--_NmP");this.disableFileAccess=!!t.disableFileAccess;this.disableUrlAccess=!!t.disableUrlAccess;this.normalizeHeaderKey=t.normalizeHeaderKey;this.date=t.parentNode?null:new Date;this.rootNode=t.rootNode||this;this.keepBcc=!!t.keepBcc;if(t.filename){this.filename=t.filename;if(!e){e=h.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=false;this._hasLongLines=false;this._envelope=false;this._raw=false;this._transforms=[];this._processFuncs=[];if(e){this.setHeader("Content-Type",e)}}createChild(e,t){if(!t&&typeof e==="object"){t=e;e=undefined}const i=new MimeNode(e,t);this.appendChild(i);return i}appendChild(e){if(e.parentNode&&e.parentNode!==this){e.remove()}if(e.rootNode!==this.rootNode){e.rootNode=this.rootNode;e._nodeId=++this.rootNode.nodeCounter}e.parentNode=this;this.childNodes.push(e);return e}replace(e){if(e===this){return this}this.parentNode.childNodes.forEach(((t,i)=>{if(t===this){e.rootNode=this.rootNode;e.parentNode=this.parentNode;e._nodeId=this._nodeId;this.rootNode=this;this.parentNode=undefined;e.parentNode.childNodes[i]=e}}));return e}remove(){if(!this.parentNode){return this}for(let e=this.parentNode.childNodes.length-1;e>=0;e--){if(this.parentNode.childNodes[e]===this){this.parentNode.childNodes.splice(e,1);this.parentNode=undefined;this.rootNode=this;return this}}}setHeader(e,t){let i=false;if(!t&&e&&typeof e==="object"){if(e.key&&"value"in e){this.setHeader(e.key,e.value)}else if(Array.isArray(e)){e.forEach((e=>{this.setHeader(e.key,e.value)}))}else{Object.keys(e).forEach((t=>{this.setHeader(t,e[t])}))}return this}e=this._normalizeHeaderKey(e);const n={key:e,value:t};for(let t=0,a=this._headers.length;t<a;t++){if(this._headers[t].key===e){if(!i){this._headers[t]=n;i=true}else{this._headers.splice(t,1);t--;a--}}}if(!i){this._headers.push(n)}return this}addHeader(e,t){if(!t&&e&&typeof e==="object"){if(e.key&&e.value){this.addHeader(e.key,e.value)}else if(Array.isArray(e)){e.forEach((e=>{this.addHeader(e.key,e.value)}))}else{Object.keys(e).forEach((t=>{this.addHeader(t,e[t])}))}return this}else if(Array.isArray(t)){t.forEach((t=>{this.addHeader(e,t)}));return this}this._headers.push({key:this._normalizeHeaderKey(e),value:t});return 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){this.content=e;if(typeof this.content.pipe==="function"){this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler);this.content=e};this.content.once("error",this._contentErrorHandler)}else if(typeof this.content==="string"){this._isPlainText=h.isPlainText(this.content);if(this._isPlainText&&h.hasLongerLines(this.content,76)){this._hasLongLines=true}}return this}build(e){let t;if(!e){t=new Promise(((t,i)=>{e=d.callbackPromise(t,i)}))}const i=e;const n=this.createReadStream();const a=[];let s=0;let o=false;n.on("readable",(()=>{let e;while((e=n.read())!==null){a.push(e);s+=e.length}}));n.once("error",(e=>{if(o){return}o=true;return i(e)}));n.once("end",(e=>{if(o){return}o=true;if(e&&e.length){a.push(e);s+=e.length}return i(null,Buffer.concat(a,s))}));return t}getTransferEncoding(){let e=false;const t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();if(this.content){e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim();if(!e||!["base64","quoted-printable"].includes(e)){if(/^text\//i.test(t)){if(this._isPlainText&&!this._hasLongLines){e="7bit"}else if(typeof this.content==="string"||this.content instanceof Buffer){e=this._getTextEncoding(this.content)==="Q"?"quoted-printable":"base64"}else{e=this.textEncoding==="B"?"base64":"quoted-printable"}}else if(!/^(multipart|message)\//i.test(t)){e=e||"base64"}}}return e}buildHeaders(){const e=this.getTransferEncoding();const t=[];if(e){this.setHeader("Content-Transfer-Encoding",e)}if(this.filename&&!this.getHeader("Content-Disposition")){this.setHeader("Content-Disposition","attachment")}if(this.rootNode===this){if(!this.getHeader("Date")){this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000"))}this.messageId();if(!this.getHeader("MIME-Version")){this.setHeader("MIME-Version","1.0")}for(let e=this._headers.length-2;e>=0;e--){const t=this._headers[e];if(t.key==="Content-Type"){this._headers.splice(e,1);this._headers.push(t)}}}this._headers.forEach((e=>{let i=e.key;let n=e.value;let a;let s;const o={};const r=w;if(n&&typeof n==="object"&&!r.includes(i)){d.copyOwnKeys(o,n,(e=>e==="value"));n=(n.value||"").toString();if(!n.trim()){return}}if(o.prepared){if(o.foldLines){t.push(h.foldLines(i+": "+n))}else{t.push(i+": "+n)}return}switch(e.key){case"Content-Disposition":a=h.parseHeaderValue(n);if(this.filename){a.params.filename=this.filename}n=h.buildHeaderValue(a);break;case"Content-Type":a=h.parseHeaderValue(n);a.value=(a.value||"").toString().replace(/[\x00-\x1f\x7f]/g,"");this._handleContentType(a);if(a.value.match(/^text\/plain\b/)&&typeof this.content==="string"&&/[\u0080-\uFFFF]/.test(this.content)){a.params.charset="utf-8"}n=h.buildHeaderValue(a);if(this.filename){s=/[\x00-\x1f\x7f]/.test(this.filename)?h.encodeWord(this.filename,this._getTextEncoding(this.filename),52):this._encodeWords(this.filename);if(s!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(s)){s=JSON.stringify(s)}n+="; name="+s}break;case"Bcc":if(!this.keepBcc){return}break}n=this._encodeHeaderValue(i,n);if(!(n||"").toString().trim()){return}if(typeof this.normalizeHeaderKey==="function"){const e=this.normalizeHeaderKey(i,n);const t=typeof e==="string"?e.replace(/[\x00-\x1f\x7f]/g,""):"";if(t){i=t}}t.push(h.foldLines(i+": "+n,76))}));return t.join("\r\n")}createReadStream(e){e=e||{};const t=new p.PassThrough(e);let i=t;let n;this.stream(t,e,(e=>{if(e){i.emit("error",e);return}t.end()}));for(let e=0,t=this._transforms.length;e<t;e++){n=typeof this._transforms[e]==="function"?this._transforms[e]():this._transforms[e];i.once("error",(e=>{n.emit("error",e)}));i=i.pipe(n)}n=new b.default;i.once("error",(e=>{n.emit("error",e)}));i=i.pipe(n);for(let e=0,t=this._processFuncs.length;e<t;e++){n=this._processFuncs[e];i=n(i)}if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase());const t=e?new _.default:new y.default;const n=i.pipe(t);i.on("error",(e=>n.emit("error",e)));return n}return i}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,i){const n=this.getTransferEncoding();let a;let s;let o=false;const callback=e=>{if(o){return}o=true;i(e)};const finalize=()=>{let i=0;const processChildNode=()=>{if(i>=this.childNodes.length){e.write("\r\n--"+this.boundary+"--\r\n");return callback()}const n=this.childNodes[i++];e.write((i>1?"\r\n":"")+"--"+this.boundary+"\r\n");n.stream(e,t,(e=>{if(e){return callback(e)}setImmediate(processChildNode)}))};if(this.multipart){setImmediate(processChildNode)}else{return callback()}};const sendContent=()=>{if(this.content){if(Object.prototype.toString.call(this.content)==="[object Error]"){return callback(this.content)}if(typeof this.content.pipe==="function"){this.content.removeListener("error",this._contentErrorHandler);this._contentErrorHandler=e=>callback(e);this.content.once("error",this._contentErrorHandler)}const createStream=()=>{if(["quoted-printable","base64"].includes(n)){a=new(n==="base64"?f:m).Encoder(t);a.pipe(e,{end:false});a.once("end",finalize);a.once("error",(e=>callback(e)));s=this._getStream(this.content);s.pipe(a)}else{s=this._getStream(this.content);s.pipe(e,{end:false});s.once("end",finalize)}s.once("error",(e=>callback(e)))};if(this.content._resolve){const e=[];let t=0;let i=false;const n=this._getStream(this.content);n.on("error",(e=>{if(i){return}i=true;callback(e)}));n.on("readable",(()=>{let i;while((i=n.read())!==null){e.push(i);t+=i.length}}));n.on("end",(()=>{if(i){return}i=true;this.content._resolve=false;this.content._resolvedValue=Buffer.concat(e,t);setImmediate(createStream)}))}else{setImmediate(createStream)}return}return setImmediate(finalize)};if(this._raw){setImmediate((()=>{if(Object.prototype.toString.call(this._raw)==="[object Error]"){return callback(this._raw)}if(typeof this._raw.pipe==="function"){this._raw.removeListener("error",this._contentErrorHandler)}const t=this._getStream(this._raw);t.pipe(e,{end:false});t.on("error",(t=>e.emit("error",t)));t.on("end",finalize)}))}else{e.write(this.buildHeaders()+"\r\n\r\n");setImmediate(sendContent)}}setEnvelope(e){let t;this._envelope={from:false,to:[]};if(e.from){t=[];this._convertAddresses(this._parseEnvelopeAddresses(e.from),t);t=t.filter((e=>e&&e.address));if(t.length&&t[0]){this._envelope.from=t[0].address}}const i=new Set;const n=[];["to","cc","bcc"].forEach((t=>{if(e[t]){this._convertAddresses(this._parseEnvelopeAddresses(e[t]),n,i)}}));this._envelope.to=n.map((e=>e.address)).filter((e=>e));const a=["to","cc","bcc","from"];d.copyOwnKeys(this._envelope,e,(e=>a.includes(e)));return this}getAddresses(){const e={};const t=new Map;this._headers.forEach((i=>{const n=i.key.toLowerCase();if(["from","sender","reply-to","to","cc","bcc"].includes(n)){if(!Array.isArray(e[n])){e[n]=[];t.set(n,new Set)}this._convertAddresses(this._parseAddresses(i.value),e[n],t.get(n))}}));return e}getEnvelope(){if(this._envelope){return this._envelope}const e={from:false,to:[]};const t=new Set;const i=[];this._headers.forEach((n=>{const a=[];if(n.key==="From"||!e.from&&["Reply-To","Sender"].includes(n.key)){this._convertAddresses(this._parseAddresses(n.value),a);if(a.length&&a[0]){e.from=a[0].address}}else if(["To","Cc","Bcc"].includes(n.key)){this._convertAddresses(this._parseAddresses(n.value),i,t)}}));e.to=i.map((e=>e.address));return e}messageId(){let e=this.getHeader("Message-ID");if(!e){e=this._generateMessageId();this.setHeader("Message-ID",e)}return e}setRaw(e){this._raw=e;if(this._raw&&typeof this._raw.pipe==="function"){this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler);this._raw=e};this._raw.once("error",this._contentErrorHandler)}return this}_accessDisabled(e){let t=this;while(t){if(t[e]){return true}t=t.parentNode}return false}_getStream(e){let t;if(e._resolvedValue){t=new p.PassThrough;setImmediate((()=>{try{t.end(e._resolvedValue)}catch(e){t.emit("error",e)}}));return t}if(typeof e.pipe==="function"){return e}if(e&&typeof e.path==="string"&&!e.href){if(this._accessDisabled("disableFileAccess")){t=new p.PassThrough;setImmediate((()=>{const i=new Error("File access rejected for "+e.path);i.code=v.EFILEACCESS;t.emit("error",i)}));return t}return c.default.createReadStream(e.path)}if(e&&typeof e.href==="string"){if(this._accessDisabled("disableUrlAccess")){t=new p.PassThrough;setImmediate((()=>{const i=new Error("Url access rejected for "+e.href);i.code=v.EURLACCESS;t.emit("error",i)}));return t}return(0,x.default)(e.href,{headers:e.httpHeaders,tls:e.tls})}t=new p.PassThrough;setImmediate((()=>{try{t.end(e||"")}catch(e){t.emit("error",e)}}));return t}_parseAddresses(e){const t=[];const i=new WeakSet;const n=[];const enter=e=>{if(!i.has(e)){i.add(e);n.push({list:e,pos:0})}};enter(Array.isArray(e)?e:[e]);while(n.length){const e=n[n.length-1];if(e.pos>=e.list.length){n.pop();continue}const i=e.list[e.pos++];if(Array.isArray(i)){enter(i);continue}if(i&&i.address){const e=this._normalizeAddress(i.address);if(e===i.address&&typeof i.name==="string"){t.push(i);continue}const n=d.copyOwnKeys({},i);n.address=e;n.name=i.name||"";t.push(n);continue}const a=this._normalizeParsedAddresses((0,g.default)(i));for(let e=0;e<a.length;e++){t.push(a[e])}}return t}_normalizeParsedAddresses(e){e.forEach((e=>{if(e.address){e.address=this._normalizeAddress(e.address)}else if(e.group){this._normalizeParsedAddresses(e.group)}}));return e}_parseEnvelopeAddresses(e){return this._parseAddresses(e).map((e=>{if(e.address||e.group||!e.name||/[\s@]/.test(e.name)){return e}return{address:this._normalizeAddress(e.name),name:""}}))}_normalizeHeaderKey(e){e=(e||"").toString().replace(/\r?\n|\r/g," ").replace(/[\x00-\x1f\x7f]/g,"").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features");return e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase();this.multipart=/^multipart\//i.test(this.contentType)?this.contentType.substr(this.contentType.indexOf("/")+1):false;if(this.multipart){const t=_stripBoundaryControls(e.params.boundary||this.boundary||"");this.boundary=e.params.boundary=t||_stripBoundaryControls(this._generateBoundary())}else{this.boundary=false}}_generateBoundary(){return _stripBoundaryControls(this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary)+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){e=this._normalizeHeaderKey(e);switch(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":t=(t||"").toString().replace(/\r?\n|\r/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"");if(t.charAt(0)!=="<"){t="<"+t}if(t.charAt(t.length-1)!==">"){t=t+">"}return t;case"References":t=[].concat.apply([],[].concat(t||"").map((e=>{e=(e||"").toString().replace(/\r?\n|\r/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"").trim();return e.replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)}))).map((e=>{if(e.charAt(0)!=="<"){e="<"+e}if(e.charAt(e.length-1)!==">"){e=e+">"}return e}));return t.join(" ").trim();case"Date":if(Object.prototype.toString.call(t)==="[object Date]"){return t.toUTCString().replace(/GMT/,"+0000")}t=(t||"").toString().replace(/\r?\n|\r/g," ");return this._encodeHeaderText(t);case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:t=(t||"").toString().replace(/\r?\n|\r/g," ");return this._encodeHeaderText(t)}}_convertAddresses(e,t,i){const n=[];t=t||[];if(!i){i=new Set;for(let e=0;e<t.length;e++){i.add(t[e].address)}}[].concat(e||[]).forEach((e=>{if(e.address){e.address=this._normalizeAddress(e.address);if(!e.name){n.push(O.test(e.address)?e.address:`<${e.address}>`)}else{n.push(`${this._encodeAddressName(e.name)} <${e.address}>`)}if(!i.has(e.address)){i.add(e.address);t.push(e)}}else if(e.group){const a=(e.group.length?this._convertAddresses(e.group,t,i):"").trim();n.push(`${this._encodeAddressName(e.name)}:${a};`)}}));return n.join(", ")}_normalizeAddress(e){e=(e||"").toString().replace(/[\x00-\x1F\x7F<>]+/g," ").trim();if(!e){return e}const t=e.lastIndexOf("@");if(t<0){return this._normalizeLocalPart(e)}const i=e.substr(0,t);const n=e.substr(t+1);let a=n;const s=/[\x80-\uFFFF]/.test(i);try{a=normalizeDomain(n.toLowerCase(),s)}catch(e){}return`${this._normalizeLocalPart(i)}@${a}`}_normalizeLocalPart(e){if(k.test(e)||S.test(e)){return e}return h.quoteString(e)}_encodeAddressName(e){if(!/^[\w ]*$/.test(e)){if(/^[\x20-\x7e]*$/.test(e)){return h.quoteString(e)}else{return h.encodeWord(e,this._getTextEncoding(e),52)}}return e}_encodeHeaderText(e){return/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/.test(e)?h.encodeWord(e,this._getTextEncoding(e),52):this._encodeWords(e)}_encodeWords(e){return h.encodeWords(e,this._getTextEncoding(e),52,true)}_getTextEncoding(e){e=(e||"").toString();if(this.textEncoding){return this.textEncoding}let t=0;let i=0;for(let n=0,a=e.length;n<a;n++){const a=e.charCodeAt(n);if(a>=0&&a<=8||a===11||a===12||a>=14&&a<=31||a>=128){t++}else if(a>=65&&a<=90||a>=97&&a<=122){i++}}return t<i?"Q":"B"}_generateMessageId(){return"<"+[2,2,2,6].reduce(((e,t)=>e+"-"+r.default.randomBytes(t).toString("hex")),r.default.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}t["default"]=MimeNode;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},4398:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});const n=i(4492);class LastNewline extends n.Transform{constructor(){super();this.lastByte=false}_transform(e,t,i){if(e.length){this.lastByte=e[e.length-1]}this.push(e);i()}_flush(e){if(this.lastByte===10){return e()}if(this.lastByte===13){this.push(Buffer.from("\n"));return e()}this.push(Buffer.from("\r\n"));return e()}}t["default"]=LastNewline;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},9700:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});const n=i(4492);class LeUnix extends n.Transform{constructor(e){super(e)}_transform(e,t,i){let n;let a=0;for(let t=0,i=e.length;t<i;t++){if(e[t]===13){n=e.slice(a,t);a=t+1;this.push(n)}}if(a&&a<e.length){n=e.slice(a);this.push(n)}else if(!a){this.push(e)}i()}}t["default"]=LeUnix;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},7:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});const n=i(4492);class LeWindows extends n.Transform{constructor(e){super(e);this.lastByte=false}_transform(e,t,i){let n;let a=0;for(let t=0,i=e.length;t<i;t++){if(e[t]===10){if(t&&e[t-1]!==13||!t&&this.lastByte!==13){if(t>a){n=e.slice(a,t);this.push(n)}this.push(Buffer.from("\r\n"));a=t+1}}}if(a&&a<e.length){n=e.slice(a);this.push(n)}else if(!a){this.push(e)}this.lastByte=e[e.length-1];i()}}t["default"]=LeWindows;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},2356:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createTransport=createTransport;t.createTestAccount=createTestAccount;t.getTestMessageUrl=getTestMessageUrl;const r=o(i(5759));const c=s(i(9119));const l=o(i(902));const p=o(i(7578));const d=o(i(258));const u=o(i(3957));const h=o(i(621));const m=o(i(6879));const f=s(i(7952));const g=o(i(9923));const x=s(i(7009));const v=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,"");const b=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,"");const _=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null;const y=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let w=false;function createTransport(e,t){let i;if(typeof e==="object"&&typeof e.send!=="function"||typeof e==="string"&&/^(smtps?|direct):/i.test(e)){const t=typeof e==="string"?e:e.url;if(t){const n=c.parseConnectionUrl(t);i=typeof e==="object"?c.assign(false,c.copyOwnKeys({},e,(e=>e==="url")),n):n}else{i=e}if(i.pool){e=new l.default(i)}else if(i.sendmail){e=new d.default(i)}else if(i.streamTransport){e=new u.default(i)}else if(i.jsonTransport){e=new h.default(i)}else if(i.SES){const t=i.SES;if(t.ses&&t.aws){const e=new Error("Using legacy SES configuration, expecting @aws-sdk/client-sesv2, see https://nodemailer.com/transports/ses/");e.code=f.ECONFIG;throw e}e=new m.default(i)}else{e=new p.default(i)}}return new r.default(e,i,t)}function createTestAccount(e,t){let i;if(!t&&typeof e==="function"){t=e;e=false}if(!t){i=new Promise(((e,i)=>{t=c.callbackPromise(e,i)}))}const n=t;if(y&&w){setImmediate((()=>n(null,w)));return i}e=e||v;const a=[];let s=0;const o={};const r={requestor:x.name,version:x.version};if(_){o.Authorization="Bearer "+_}const l={contentType:"application/json",method:"POST",headers:o,body:Buffer.from(JSON.stringify(r))};if(/^https:/i.test(e)){l.tls={rejectUnauthorized:true}}const p=(0,g.default)(e+"/user",l);p.on("readable",(()=>{let e;while((e=p.read())!==null){a.push(e);s+=e.length}}));p.once("error",(e=>n(e)));p.once("end",(()=>{const e=Buffer.concat(a,s);let t;try{t=JSON.parse(e.toString())}catch(e){return n(e)}if(t.status!=="success"||t.error){return n(new Error(t.error||"Request failed"))}delete t.status;w=t;n(null,w)}));return i}function getTestMessageUrl(e){if(!e||!e.response){return false}const t=new Map;const i=e.response.toString();if(i.length>2&&i.charAt(i.length-1)==="]"){const e=i.indexOf("[",i.lastIndexOf("]",i.length-2)+1);if(e>=0&&e<i.length-2){const n=i.substring(e+1,i.length-1);n.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,i,n)=>{t.set(i,n);return e}))}}if(t.has("STATUS")&&t.has("MSGID")){return(w&&w.web||b)+"/message/"+t.get("MSGID")}return false}const E={createTransport:createTransport,createTestAccount:createTestAccount,getTestMessageUrl:getTestMessageUrl};t["default"]=E;Object.defineProperty(t,"default",{value:t,enumerable:false,writable:true,configurable:true})},7009:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.homepage=t.version=t.name=void 0;t.name="nodemailer";t.version="10.0.14";t.homepage="https://nodemailer.com/"},9146:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.toUnicode=t.toASCII=t.encode=t.decode=t.ucs2=t.version=void 0;const i=2147483647;const n=36;const a=1;const s=26;const o=38;const r=700;const c=72;const l=128;const p="-";const d=/^xn--/;const u=/[^\0-\x7F]/;const h=/[\x2E\u3002\uFF0E\uFF61]/g;const m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};const f=n-a;const g=Math.floor;const x=String.fromCharCode;function error(e){throw new RangeError(m[e])}function map(e,t){const i=[];let n=e.length;while(n--){i[n]=t(e[n])}return i}function mapDomain(e,t){const i=e.split("@");let n="";if(i.length>1){n=i[0]+"@";e=i[1]}e=e.replace(h,".");const a=e.split(".");const s=map(a,t).join(".");return n+s}function ucs2decode(e){const t=[];let i=0;const n=e.length;while(i<n){const a=e.charCodeAt(i++);if(a>=55296&&a<=56319&&i<n){const n=e.charCodeAt(i++);if((n&64512)==56320){t.push(((a&1023)<<10)+(n&1023)+65536)}else{t.push(a);i--}}else{t.push(a)}}return t}const ucs2encode=e=>String.fromCodePoint(...e);const basicToDigit=function(e){if(e>=48&&e<58){return 26+(e-48)}if(e>=65&&e<91){return e-65}if(e>=97&&e<123){return e-97}return n};const digitToBasic=function(e,t){return e+22+75*Number(e<26)-(Number(t!=0)<<5)};const adapt=function(e,t,i){let a=0;e=i?g(e/r):e>>1;e+=g(e/t);for(;e>f*s>>1;a+=n){e=g(e/f)}return g(a+(f+1)*e/(e+o))};const decode=function(e){const t=[];const o=e.length;let r=0;let d=l;let u=c;let h=e.lastIndexOf(p);if(h<0){h=0}for(let i=0;i<h;++i){if(e.charCodeAt(i)>=128){error("not-basic")}t.push(e.charCodeAt(i))}for(let c=h>0?h+1:0;c<o;){const l=r;for(let t=1,l=n;;l+=n){if(c>=o){error("invalid-input")}const p=basicToDigit(e.charCodeAt(c++));if(p>=n){error("invalid-input")}if(p>g((i-r)/t)){error("overflow")}r+=p*t;const d=l<=u?a:l>=u+s?s:l-u;if(p<d){break}const h=n-d;if(t>g(i/h)){error("overflow")}t*=h}const p=t.length+1;u=adapt(r-l,p,l==0);if(g(r/p)>i-d){error("overflow")}d+=g(r/p);r%=p;t.splice(r++,0,d)}return String.fromCodePoint(...t)};t.decode=decode;const encode=function(e){const t=[];const o=ucs2decode(e);const r=o.length;let d=l;let u=0;let h=c;for(const e of o){if(e<128){t.push(x(e))}}const m=t.length;let f=m;if(m){t.push(p)}while(f<r){let e=i;for(const t of o){if(t>=d&&t<e){e=t}}const r=f+1;if(e-d>g((i-u)/r)){error("overflow")}u+=(e-d)*r;d=e;for(const e of o){if(e<d&&++u>i){error("overflow")}if(e===d){let e=u;for(let i=n;;i+=n){const o=i<=h?a:i>=h+s?s:i-h;if(e<o){break}const r=e-o;const c=n-o;t.push(x(digitToBasic(o+r%c,0)));e=g(r/c)}t.push(x(digitToBasic(e,0)));h=adapt(u,r,f===m);u=0;++f}}++u;++d}return t.join("")};t.encode=encode;const toUnicode=function(e){return mapDomain(e,(function(e){return d.test(e)?decode(e.slice(4).toLowerCase()):e}))};t.toUnicode=toUnicode;const toASCII=function(e){return mapDomain(e,(function(e){return u.test(e)?"xn--"+encode(e):e}))};t.toASCII=toASCII;t.version="2.3.1";t.ucs2={decode:ucs2decode,encode:ucs2encode}},7605:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t.Encoder=void 0;t.encode=encode;t.wrap=wrap;const n=i(4492);const a=4;const s=[[9],[10],[13],[32,60],[62,126]];function encode(e){if(typeof e==="string"){e=Buffer.from(e,"utf-8")}let t="";let i;for(let n=0,a=e.length;n<a;n++){i=e[n];if(checkRanges(i,s)&&!((i===32||i===9)&&(n===a-1||e[n+1]===10||e[n+1]===13))){t+=String.fromCharCode(i);continue}t+="="+(i<16?"0":"")+i.toString(16).toUpperCase()}return t}function wrap(e,t){e=(e||"").toString();t=Math.max(Number(t)||76,a);if(e.length<=t){return e}let i=0;const n=e.length;let s,o,r;const c=Math.floor(t/3);let l="";while(i<n){r=e.substr(i,t);if(s=r.match(/\r\n/)){r=r.substr(0,s.index+s[0].length);l+=r;i+=r.length;continue}if(r.substr(-1)==="\n"){l+=r;i+=r.length;continue}if(s=r.substr(-c).match(/\n.*?$/)){r=r.substr(0,r.length-(s[0].length-1));l+=r;i+=r.length;continue}if(r.length>t-c&&(s=r.substr(-c).match(/[ \t.,!?][^ \t.,!?]*$/))){r=r.substr(0,r.length-(s[0].length-1))}else if(r.match(/[=][\da-f]{0,2}$/i)){if(s=r.match(/[=][\da-f]{0,1}$/i)){r=r.substr(0,r.length-s[0].length)}while(r.length>3&&r.length<n-i&&!r.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(s=r.match(/[=][\da-f]{2}$/gi))){o=parseInt(s[0].substr(1,2),16);if(o<128){break}r=r.substr(0,r.length-3);if(o>=192){break}}}if(!r.length){r=e.substr(i,t)}if(i+r.length<n&&r.substr(-1)!=="\n"){if(r.length===t&&r.match(/[=][\da-f]{2}$/i)){r=r.substr(0,r.length-3)}else if(r.length===t){r=r.substr(0,r.length-1)}i+=r.length;r+="=\r\n"}else{i+=r.length}l+=r}return l}function checkRanges(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(!n.length){continue}if(n.length===1&&e===n[0]){return true}if(n.length===2&&e>=n[0]&&e<=n[1]){return true}}return false}class Encoder extends n.Transform{constructor(e){super();this.options=e||{};if(this.options.lineLength!==false){this.options.lineLength=this.options.lineLength||76}this._curLine="";this.inputBytes=0;this.outputBytes=0}_transform(e,t,i){let n;if(t!=="buffer"){e=Buffer.from(e,t)}if(!e||!e.length){return i()}this.inputBytes+=e.length;if(this.options.lineLength){n=this._curLine+encode(e);n=wrap(n,this.options.lineLength);n=n.replace(/(^|\n)([^\n]*)$/,((e,t,i)=>{this._curLine=i;return t}));if(n){this.outputBytes+=n.length;this.push(n)}}else{n=encode(e);this.outputBytes+=n.length;this.push(n,"ascii")}i()}_flush(e){if(this._curLine){this.outputBytes+=this._curLine.length;this.push(this._curLine,"ascii")}e()}}t.Encoder=Encoder},258:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(7718);const c=s(i(7009));const l=s(i(9119));const p=s(i(7952));const d=o(i(7));const u=o(i(9700));class SendmailTransport{constructor(e){e=e||{};this._spawn=r.spawn;this.options=e;this.name="Sendmail";this.version=c.version;this.path="sendmail";this.args=false;this.logger=l.getLogger(this.options,{component:this.options.component||"sendmail"});if(typeof e==="string"){this.path=e}else if(typeof e==="object"){if(e.path){this.path=e.path}if(Array.isArray(e.args)){this.args=e.args}}this.winbreak=["win","windows","dos","\r\n"].includes((e.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=true;const i=e.message.getEnvelope();const n=e.message.messageId();let a;const s=[].concat(i.from||[]).concat(i.to||[]).some((e=>/^"?-/.test(e)));if(s){const e=new Error("Can not send mail. Invalid envelope addresses.");e.code=p.ESENDMAIL;return t(e)}const o=this.args?["-i"].concat(this.args).concat(i.to):["-i"].concat(i.from?["-f",i.from]:[]).concat(i.to);const callback=e=>{if(a){return}a=true;if(typeof t==="function"){if(e){return t(e)}return t(null,{envelope:i,messageId:n,response:"Messages queued for delivery"})}};let r;try{r=this._spawn(this.path,o)}catch(e){this.logger.error({err:e,tnx:"spawn",messageId:n},"Error occurred while spawning sendmail. %s",e.message);return callback(e)}if(r){r.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:n},"Error occurred when sending message %s. %s",n,e.message);callback(e)}));r.once("exit",(e=>{if(!e){return callback()}const t=new Error(e===127?"Sendmail command not found, process exited with code "+e:"Sendmail exited with code "+e);t.code=p.ESENDMAIL;this.logger.error({err:t,tnx:"stdin",messageId:n},"Error sending message %s to sendmail. %s",n,t.message);callback(t)}));r.once("close",callback);r.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:n},"Error occurred when piping message %s to sendmail. %s",n,e.message);callback(e)}));const t=[].concat(i.to||[]);if(t.length>3){t.push("...and "+t.splice(2).length+" more")}this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s>",n,t.join(", "));const a=e.message.createReadStream();let s=a;if(this.options.newline){s=a.pipe(this.winbreak?new d.default:new u.default);a.once("error",(e=>s.emit("error",e)))}s.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:n},"Error occurred when generating message %s. %s",n,e.message);r.kill("SIGINT");callback(e)}));s.pipe(r.stdin)}else{const e=new Error("sendmail was not found");e.code=p.ESENDMAIL;return callback(e)}}}t["default"]=SendmailTransport;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},6879:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(5673));const c=s(i(7009));const l=s(i(9119));const p=s(i(7952));const d=o(i(7));const u=o(i(7312));function tagSesError(e){if(e&&typeof e==="object"&&!e.code){e.code=p.ESES}return e}class SESTransport extends r.default{constructor(e){super();if(!e||!e.SES||!e.SES.sesClient){const e=new Error("Missing SES configuration, expecting { sesClient, SendEmailCommand } from @aws-sdk/client-sesv2, see https://nodemailer.com/transports/ses/");e.code=p.ECONFIG;throw e}this.options=e;this.ses=this.options.SES;this.name="SESTransport";this.version=c.version;this.logger=l.getLogger(this.options,{component:this.options.component||"ses-transport"})}getRegion(e){if(this.ses.sesClient.config&&typeof this.ses.sesClient.config.region==="function"){this.ses.sesClient.config.region().then((t=>e(null,t)),(t=>e(t)));return}return e(null,false)}send(e,t){let i=e.message._headers.find((e=>/^from$/i.test(e.key)));if(i){const e=new u.default("text/plain");i=e._convertAddresses(e._parseAddresses(i.value))}const n=e.message.getEnvelope();const a=e.message.messageId();const s=[].concat(n.to||[]);if(s.length>3){s.push("...and "+s.splice(2).length+" more")}this.logger.info({tnx:"send",messageId:a},"Sending message %s to <%s>",a,s.join(", "));const getRawMessage=t=>{if(!e.data._dkim){e.data._dkim={}}if(e.data._dkim.skipFields&&typeof e.data._dkim.skipFields==="string"){e.data._dkim.skipFields+=":date:message-id"}else{e.data._dkim.skipFields="date:message-id"}const i=e.message.createReadStream();const n=i.pipe(new d.default);const a=[];let s=0;n.on("readable",(()=>{let e;while((e=n.read())!==null){a.push(e);s+=e.length}}));i.once("error",(e=>n.emit("error",e)));n.once("error",(e=>t(e)));n.once("end",(()=>t(null,Buffer.concat(a,s))))};setImmediate((()=>getRawMessage(((s,o)=>{if(s){this.logger.error({err:s,tnx:"send",messageId:a},"Failed creating message for %s. %s",a,s.message);return t(s)}const r=l.copyOwnKeys({Content:{Raw:{Data:o}},FromEmailAddress:i||n.from,Destination:{ToAddresses:n.to}},e.data.ses);this.getRegion(((e,i)=>{if(e||!i){i="us-east-1"}let s;try{const e=new this.ses.SendEmailCommand(r);s=this.ses.sesClient.send(e)}catch(e){tagSesError(e);this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",a,e.message);setImmediate((()=>t(e)));return}s.then((e=>{if(i==="us-east-1"){i="email"}const a={envelope:{from:n.from,to:n.to},messageId:"<"+e.MessageId+(!/@/.test(e.MessageId)?"@"+i+".amazonses.com":"")+">",response:e.MessageId,raw:o};setImmediate((()=>t(null,a)))})).catch((e=>{tagSesError(e);this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",a,e.message);setImmediate((()=>t(e)))}))}))}))))}verify(e){let t;if(!e){t=new Promise(((t,i)=>{e=l.callbackPromise(t,i)}))}const i=e;const cb=e=>{if(e&&!["InvalidParameterValue","MessageRejected"].includes(e.code||e.Code||e.name)){return i(tagSesError(e))}return i(null,true)};const n={Content:{Raw:{Data:Buffer.from("From: <invalid@invalid>\r\nTo: <invalid@invalid>\r\n Subject: Invalid\r\n\r\nInvalid")}},FromEmailAddress:"invalid@invalid",Destination:{ToAddresses:["invalid@invalid"]}};this.getRegion((()=>{let e;try{const t=new this.ses.SendEmailCommand(n);e=this.ses.sesClient.send(t)}catch(e){setImmediate((()=>cb(e)));return}e.then((()=>setImmediate((()=>cb(null))))).catch((e=>setImmediate((()=>cb(e)))))}));return t}}t["default"]=SESTransport;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},9119:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.encodeXText=t.assign=t.parseDataURI=t.callbackPromise=t.getLogger=t._logFunc=t.parseConnectionUrl=t.resolveHostname=t.dnsCache=t.networkInterfaces=t._resetCacheCleanup=t._lastCacheCleanup=t.copyOwnKeys=t.isProtoKey=void 0;t.resolveContent=resolveContent;const r=s(i(8112));const c=o(i(7261));const l=o(i(7561));const p=o(i(9923));const d=s(i(7952));const u=i(7071);Object.defineProperty(t,"isProtoKey",{enumerable:true,get:function(){return u.isProtoKey}});Object.defineProperty(t,"copyOwnKeys",{enumerable:true,get:function(){return u.copyOwnKeys}});const h=o(i(604));const m=o(i(7503));const f=o(i(612));const g=5*60*1e3;const x=30*1e3;const v=1e3;let b=0;const _lastCacheCleanup=()=>b;t._lastCacheCleanup=_lastCacheCleanup;const _resetCacheCleanup=()=>{b=0};t._resetCacheCleanup=_resetCacheCleanup;try{t.networkInterfaces=f.default.networkInterfaces()}catch(e){}const isFamilySupported=(e,i)=>{const n=Object.values(t.networkInterfaces||{}).flat();if(!n.length){return true}return n.filter((e=>!e.internal||i)).some((t=>t.family==="IPv"+e||t.family===e))};const resolve=(e,t,i,n)=>{i=i||{};if(!isFamilySupported(e,i.allowInternalNetworkInterfaces)){return n(null,[])}const a=h.default.Resolver?new h.default.Resolver(i):h.default;a["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case h.default.NODATA:case h.default.NOTFOUND:case h.default.NOTIMP:case h.default.SERVFAIL:case h.default.CONNREFUSED:case h.default.REFUSED:case"EAI_AGAIN":return n(null,[])}return n(e)}return n(null,Array.isArray(t)?t:[].concat(t||[]))}))};t.dnsCache=new Map;const formatDNSValue=(e,t)=>{if(!e){return Object.assign({},t||{})}const i=e.addresses||[];const n=i.length>0?i[Math.floor(Math.random()*i.length)]:null;return Object.assign({host:n,_addresses:i},t||{})};const resolveHostname=(e,i)=>{e=e||{};if(!e.host&&e.servername){e.host=e.servername}if(!e.host||m.default.isIP(e.host)){const t={addresses:[e.host]};return i(null,formatDNSValue(t,{servername:e.servername||false,cached:false}))}const n=e.host;const a=e.servername||n;let s;if(t.dnsCache.has(e.host)){s=t.dnsCache.get(e.host);const n=Date.now();if(n-b>x){b=n;for(const[e,i]of t.dnsCache.entries()){if(i.expires&&i.expires<n){t.dnsCache.delete(e)}}if(t.dnsCache.size>v){const e=Math.floor(v*.1);const i=Array.from(t.dnsCache.keys()).slice(0,e);i.forEach((e=>t.dnsCache.delete(e)))}}if(!s.expires||s.expires>=n){return i(null,formatDNSValue(s.value,{servername:a,cached:true}))}}let o=[];let r=[];let c=null;let l=null;resolve(4,e.host,e,((p,d)=>{if(p){c=p}else{o=d||[]}resolve(6,n,e,((p,d)=>{if(p){l=p}else{r=d||[]}const u=o.concat(r);if(u.length){const s={addresses:u};t.dnsCache.set(n,{value:s,expires:Date.now()+(e.dnsTtl||g)});return i(null,formatDNSValue(s,{servername:a,cached:false}))}if(c&&l){if(s){t.dnsCache.set(n,{value:s.value,expires:Date.now()+(e.dnsTtl||g)});return i(null,formatDNSValue(s.value,{servername:a,cached:true,error:c}))}}try{h.default.lookup(n,{all:true},((o,r)=>{if(o){if(s){t.dnsCache.set(n,{value:s.value,expires:Date.now()+(e.dnsTtl||g)});return i(null,formatDNSValue(s.value,{servername:a,cached:true,error:o}))}return i(o)}const c=r?r.filter((e=>isFamilySupported(e.family))).map((e=>e.address)):[];if(r&&r.length&&!c.length){console.warn(`Failed to resolve IPv${r[0].family} addresses with current network`)}if(!c.length&&s){return i(null,formatDNSValue(s.value,{servername:a,cached:true}))}const l={addresses:c.length?c:[n]};t.dnsCache.set(n,{value:l,expires:Date.now()+(e.dnsTtl||g)});return i(null,formatDNSValue(l,{servername:a,cached:false}))}))}catch(o){if(s){t.dnsCache.set(n,{value:s.value,expires:Date.now()+(e.dnsTtl||g)});return i(null,formatDNSValue(s.value,{servername:a,cached:true,error:o}))}return i(c||l||o)}}))}))};t.resolveHostname=resolveHostname;const parseConnectionUrl=e=>{e=e||"";const t={};const i=r.parse(e,true);switch(i.protocol){case"smtp:":t.secure=false;break;case"smtps:":t.secure=true;break;case"direct:":t.direct=true;break}if(!isNaN(i.port)&&Number(i.port)){t.port=Number(i.port)}if(i.hostname){t.host=i.hostname}if(i.username||i.password){t.auth={user:i.username||"",pass:i.password||""}}Object.keys(i.query||{}).forEach((e=>{let n=t;let a=e;let s=i.query[e];if(!isNaN(s)){s=Number(s)}switch(s){case"true":s=true;break;case"false":s=false;break}if(e.indexOf("tls.")===0){a=e.substr(4);if(!t.tls){t.tls={}}n=t.tls}else if(e.indexOf(".")>=0){return}if(!(0,u.isProtoKey)(a)&&!(a in n)){n[a]=s}}));return t};t.parseConnectionUrl=parseConnectionUrl;const _logFunc=(e,t,i,n,a,...s)=>{const o=Object.assign({},i||{},n||{});delete o.level;let r=t;if(typeof e[r]!=="function"){r=["info","debug","log","trace","warn","error"].find((t=>typeof e[t]==="function"))}if(r){e[r](o,a,...s)}};t._logFunc=_logFunc;const getLogger=(e,i)=>{e=e||{};const n={};const a=["trace","debug","info","warn","error","fatal"];if(!e.logger){a.forEach((e=>{n[e]=()=>false}));return n}const s=e.logger===true?createDefaultLogger(a):e.logger;a.forEach((e=>{n[e]=(...n)=>{const a=typeof n[0]==="string"?undefined:n.shift();(0,t._logFunc)(s,e,i,a,...n)}}));return n};t.getLogger=getLogger;const callbackPromise=(e,t)=>function(...i){const n=i.shift();if(n){t(n)}else{e(...i)}};t.callbackPromise=callbackPromise;const parseDataURI=e=>{if(typeof e!=="string"){return null}if(!e.startsWith("data:")){return null}const t=e.indexOf(",");if(t===-1){return null}const i=e.substring(t+1);const n=e.substring("data:".length,t);let a;const s=n.split(";");if(s.length>0){const e=s[s.length-1].toLowerCase().trim();if(["base64","utf8","utf-8"].includes(e)&&e.indexOf("=")===-1){a=e;s.pop()}}const o=s.length>0?s.shift():"application/octet-stream";const r={};for(let e=0;e<s.length;e++){const t=s[e];const i=t.indexOf("=");if(i>0){const e=t.substring(0,i).trim();const n=t.substring(i+1).trim();if(e&&!(0,u.isProtoKey)(e)){r[e]=n}}}let c;try{if(a==="base64"){c=Buffer.from(i,"base64")}else{try{c=Buffer.from(decodeURIComponent(i))}catch(e){c=Buffer.from(i)}}}catch(e){c=Buffer.alloc(0)}return{data:c,encoding:a||null,contentType:o||"application/octet-stream",params:r}};t.parseDataURI=parseDataURI;function resolveContent(e,i,n,a){if(!a&&typeof n==="function"){a=n;n=false}n=n||{};let s;if(!a){s=new Promise(((e,i)=>{a=(0,t.callbackPromise)(e,i)}))}resolveContentValue(e,i,n,a);return s}function resolveContentValue(e,i,n,a){let s=e&&e[i]&&e[i].content||e[i];const o=(typeof e[i]==="object"&&e[i].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!s){return a(null,s)}if(typeof s==="object"){if(typeof s.pipe==="function"){return resolveStream(s,((t,n)=>{if(t){return a(t)}if(e[i].content){e[i].content=n}else{e[i]=n}a(null,n)}))}else if(/^data:/i.test(s.path||s.href)){const e=(0,t.parseDataURI)(s.path||s.href);return a(null,e&&e.data?e.data:Buffer.alloc(0))}else if(s.href||/^https?:\/\//i.test(s.path)){const e=s.href||s.path;if(n.disableUrlAccess){setImmediate((()=>{const t=new Error("Url access rejected for "+e);t.code=d.EURLACCESS;a(t)}));return}return resolveStream((0,p.default)(e,{headers:s.httpHeaders,tls:s.tls}),a)}else if(s.path){if(n.disableFileAccess){setImmediate((()=>{const e=new Error("File access rejected for "+s.path);e.code=d.EFILEACCESS;a(e)}));return}return resolveStream(l.default.createReadStream(s.path),a)}}if(typeof e[i].content==="string"&&!["utf8","usascii","ascii"].includes(o)){s=Buffer.from(e[i].content,o)}setImmediate((()=>a(null,s)))}const assign=function(...e){const t=e.shift()||{};e.forEach((e=>{Object.keys(e||{}).forEach((i=>{if((0,u.isProtoKey)(i)){return}if(["tls","auth"].includes(i)&&e[i]&&typeof e[i]==="object"){t[i]=(0,u.copyOwnKeys)(t[i]||{},e[i])}else{t[i]=e[i]}}))}));return t};t.assign=assign;const encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e)){return e}const t=Buffer.from(e);let i="";for(let e=0,n=t.length;e<n;e++){const n=t[e];if(n<33||n>126||n===43||n===61){i+="+"+(n<16?"0":"")+n.toString(16).toUpperCase()}else{i+=String.fromCharCode(n)}}return i};t.encodeXText=encodeXText;function resolveStream(e,t){let i=false;const n=[];let a=0;e.on("error",(e=>{if(i){return}i=true;t(e)}));e.on("readable",(()=>{let t;while((t=e.read())!==null){n.push(t);a+=t.length}}));e.on("end",(()=>{if(i){return}i=true;let e;try{e=Buffer.concat(n,a)}catch(e){return t(e)}t(null,e)}))}function createDefaultLogger(e){const t=e.reduce(((e,t)=>Math.max(e,t.length)),0);const i=new Map;e.forEach((e=>{let n=e.toUpperCase();if(n.length<t){n+=" ".repeat(t-n.length)}i.set(e,n)}));const print=(e,t,n,...a)=>{let s="";if(t){if(t.tnx==="server"){s="S: "}else if(t.tnx==="client"){s="C: "}if(t.sid){s="["+t.sid+"] "+s}if(t.cid){s="[#"+t.cid+"] "+s}}n=c.default.format(n,...a);n.split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),i.get(e),s+t)}))};const n={};e.forEach((e=>{n[e]=print.bind(null,e)}));return n}},7071:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.copyOwnKeys=t.isProtoKey=void 0;const isProtoKey=e=>e==="__proto__";t.isProtoKey=isProtoKey;const copyOwnKeys=(e,i,n)=>{Object.keys(i||{}).forEach((a=>{if((0,t.isProtoKey)(a)||n&&n(a)){return}e[a]=i[a]}));return e};t.copyOwnKeys=copyOwnKeys},8112:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.resolve=t.parse=void 0;const r=o(i(7503));const c=o(i(1041));const l=s(i(9146));const p=/^([a-zA-Z][a-zA-Z0-9+.-]*:)(?!\/\/)([\s\S]+)$/;const d=/^[\x00-\x20]+|[\x00-\x20]+$/g;const u=/^[\x00-\x20\u00a0\ufeff]+/;const h=/^([a-zA-Z0-9+.-]+:)?[\\/]{2}([^\\/?#]*)/;const m=/[\x00-\x20#/:<>?@[\\\]^|\x7f]/;const f=/[\x00-\x1f\x7f]/;function invalidUrl(e){const t=new TypeError("Invalid URL");t.code="ERR_INVALID_URL";t.input=e;return t}function legacyParse(e,t,i,n){const a=c.default.parse(e,t,n);const s=h.exec(e.replace(u,""));if(s&&(s[1]||a.hostname!==null)){const e=s[2].slice(s[2].lastIndexOf("@")+1);if(!e||f.test(e)||(a.host||"").toLowerCase()!==l.toASCII(e.toLowerCase())){throw i}if(e.charAt(0)==="["&&!r.default.isIPv6(e.slice(1,e.indexOf("]")))){throw i}}else if(a.hostname!==null){throw i}const o=a.auth===null||a.auth===undefined?null:a.auth.split(":");const p=a;p.username=o?o.shift():null;p.password=o&&o.length?o.join(":"):null;return p}function safeDecode(e){try{return decodeURIComponent(e)}catch(t){return e}}function normalizeHostname(e,t){const i=e||"";if(!i){return""}if(i.charAt(0)==="["&&i.charAt(i.length-1)==="]"){return i.slice(1,-1)}const n=safeDecode(i);const a=m.test(n)?"":c.default.domainToASCII(n);if(!a){throw invalidUrl(t)}return a}const parse=(e,t)=>{e=(e||"").replace(d,"");const i=p.exec(e);const n=i?i[1]+"//"+i[2]:e;let a;try{a=new URL(n)}catch(e){return legacyParse(n,t,e)}const s=normalizeHostname(a.hostname,a.href);const o=a.port||null;const r=a.pathname||null;const c=a.search||null;let l=null;let u=null;let h=null;if(a.username||a.password){u=safeDecode(a.username);h=a.password?safeDecode(a.password):null;l=u+(h!==null?":"+h:"")}let m;if(t){const e=Object.create(null);a.searchParams.forEach(((t,i)=>{if(Object.prototype.hasOwnProperty.call(e,i)){const n=e[i];if(Array.isArray(n)){n.push(t)}else{e[i]=[n,t]}}else{e[i]=t}}));m=e}else{m=c?c.slice(1):null}return{protocol:a.protocol||null,host:a.host||null,hostname:s,port:o,pathname:r,search:c,path:(r||"")+(c||"")||null,href:a.href,auth:l,username:u,password:h,query:m}};t.parse=parse;const resolve=(e,t)=>{try{return new URL(t,e).href}catch(i){legacyParse(e,false,i,true);legacyParse(t,false,i,true);return c.default.resolve(e,t)}};t.resolve=resolve},6084:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});const n=i(4492);const a=Buffer.from("\n");const s=Buffer.from("\n.");const o=Buffer.from("\r");const r=Buffer.from(".");class DataStream extends n.Transform{constructor(e){super(e);this.options=e||{};this.inByteCount=0;this.outByteCount=0;this.lastByte=false}_transform(e,t,i){const n=[];let c=0;let l,p,d=0;let u;if(!e||!e.length){return i()}if(typeof e==="string"){e=Buffer.from(e)}this.inByteCount+=e.length;for(l=0,p=e.length;l<p;l++){const t=e[l];const i=l?e[l-1]:this.lastByte;let p=false;if(i===13&&t!==10){p=t===46?s:a}else if(t===10&&i!==13){p=o}else if(t===46&&(i===10||i===false)){p=r}if(p){if(l>d){u=e.slice(d,l);n.push(u);c+=u.length}n.push(p);c+=p.length;d=l}}if(n.length){if(d<e.length){u=e.slice(d);n.push(u);c+=u.length}this.outByteCount+=c;this.push(Buffer.concat(n,c))}else{this.outByteCount+=e.length;this.push(e)}this.lastByte=e[e.length-1];i()}_flush(e){let t;if(this.lastByte===10){t=Buffer.from(".\r\n")}else if(this.lastByte===13){t=Buffer.from("\n.\r\n")}else{t=Buffer.from("\r\n.\r\n")}this.outByteCount+=t.length;this.push(t);e()}}t["default"]=DataStream;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},6225:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(7503));const c=o(i(1764));const l=s(i(8112));const p=s(i(7952));const d=64*1024;function httpProxyClient(e,t,i,n,a){if(typeof n==="function"){a=n;n={}}n=n||{};const s=a;t=Number(t)||0;if(!t||/[\r\n]/.test(i)){const e=new Error("Invalid proxy destination");e.code=p.EPROXY;setImmediate((()=>s(e)));return}const o=l.parse(e);const u={host:o.hostname,port:Number(o.port)?Number(o.port):o.protocol==="https:"?443:80};let h;if(o.protocol==="https:"){u.rejectUnauthorized=n.rejectUnauthorized!==false;h=c.default.connect.bind(c.default)}else{h=r.default.connect.bind(r.default)}let m;let f=false;const tempSocketErr=e=>{if(f){return}f=true;try{m.destroy()}catch(e){}s(e)};const timeoutErr=()=>{const e=new Error("Proxy socket timed out");e.code="ETIMEDOUT";tempSocketErr(e)};m=h(u,(()=>{if(f){return}const e={Host:i+":"+t,Connection:"close"};if(o.auth){e["Proxy-Authorization"]="Basic "+Buffer.from(o.auth).toString("base64")}m.write("CONNECT "+i+":"+t+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");const n=[];let a=0;let r="";const onSocketData=e=>{let t;if(f){return}const i=r+e.toString("binary");const o=i.indexOf("\r\n\r\n");n.push(e);a+=e.length;r=i.slice(-3);if(o>=0){m.removeListener("data",onSocketData);const e=a-i.length+o;const r=Buffer.concat(n,a).toString("binary");const c=r.substr(0,e);const l=r.substr(e+4);if(l){m.unshift(Buffer.from(l,"binary"))}f=true;t=c.match(/^HTTP\/\d+\.\d+ (\d+)/i);if(!t||(t[1]||"").charAt(0)!=="2"){try{m.destroy()}catch(e){}const e=new Error("Invalid response from proxy"+(t&&": "+t[1]||""));e.code=p.EPROXY;return s(e)}m.removeListener("error",tempSocketErr);m.removeListener("timeout",timeoutErr);m.setTimeout(0);return s(null,m)}if(a>d){m.removeListener("data",onSocketData);const e=new Error("Proxy response headers too large");e.code=p.EPROXY;return tempSocketErr(e)}};m.on("data",onSocketData)}));m.setTimeout(httpProxyClient.timeout||30*1e3);m.on("timeout",timeoutErr);m.once("error",tempSocketErr)}t["default"]=httpProxyClient;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},972:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(i(7009));const c=i(5673);const l=o(i(7503));const p=o(i(1764));const d=o(i(612));const u=o(i(6005));const h=o(i(6084));const m=i(4492);const f=s(i(9119));const g=2*60*1e3;const x=10*60*1e3;const v=30*1e3;const b=30*1e3;const TEARDOWN_NOOP=()=>{};const _=1024*1024;function decodeServerResponse(e){if(!e){return e}const t=Buffer.from(e,"binary").toString("utf8");return t.includes("�")?e:t}function isPartialResponse(e){return isPartialLine(e.slice(e.lastIndexOf("\n")+1))}function isPartialLine(e){return/^\d+-/.test(e)}class SMTPConnection extends c.EventEmitter{constructor(e){super(e);this.id=u.default.randomBytes(8).toString("base64").replace(/\W/g,"");this.stage="init";this.options=e||{};if(this.options.requireTLS&&(this.options.ignoreTLS||this.options.opportunisticTLS)){this.options=Object.assign({},this.options,{ignoreTLS:false,opportunisticTLS:false})}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:!l.default.isIP(this.host)?this.host:false;this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||false;if(typeof this.options.secure==="undefined"&&this.port===465){this.secureConnection=true}this.name=(this.options.name||this._getHostname()).toString().replace(/[\r\n]+/g,"");this.logger=f.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id});this.customAuth=new Map;for(const e of Object.keys(this.options.customAuth||{})){const t=(e||"").toString().trim().toUpperCase();if(t){this.customAuth.set(t,this.options.customAuth[e])}}this.version=r.version;this.authenticated=false;this.destroyed=false;this.secure=!!this.secureConnection;this._remainder="";this._responseQueue=[];this._responsePartial=false;this.lastServerResponse=false;this._socket=false;this._supportedAuth=[];this.allowsAuth=false;this._envelope=false;this._supportedExtensions=[];this._maxAllowedSize=0;this._responseActions=[];this._recipientQueue=[];this._greetingTimeout=false;this._connectionTimeout=false;this._destroyed=false;this._closing=false;this._currentDataStream=false;this._pendingSend=false;this._connectCallback=false;this._onSocketData=e=>this._onData(e);this._onSocketError=e=>this._onError(e,"ESOCKET",false,"CONN");this._onSocketClose=()=>this._onClose();this._onSocketEnd=()=>this._onEnd();this._onSocketTimeout=()=>this._onTimeout();this._onConnectionSocketError=e=>this._onConnectionError(e,"ESOCKET");this._connectionAttemptId=0}connect(e){if(typeof e==="function"){this._connectCallback=e;this.once("connect",(()=>{this._connectCallback=false;this.logger.debug({tnx:"smtp"},"SMTP handshake finished");e()}));const t=this._isDestroyedMessage("connect");if(t){return e(this._formatError(t,"ECONNECTION",false,"CONN"))}}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||b};if(this.options.localAddress){t.localAddress=this.options.localAddress}if(this.options.connection){this._socket=this.options.connection;this._setupConnectionHandlers();if(this.secureConnection&&!this.alreadySecured){setImmediate((()=>this._upgradeConnection((e=>{if(e){this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",false,"CONN");return}this._onConnect()}))))}else{setImmediate((()=>this._onConnect()))}return}else if(this.options.socket){this._socket=this.options.socket;return this._resolveAndConnect(t,(e=>{try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(true);if(this.secureConnection&&!this.alreadySecured){return this._upgradeConnection((e=>{if(e){this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",false,"CONN");return}this._onConnect()}))}this._onConnect()}));this._setupConnectionHandlers()}catch(e){setImmediate((()=>this._onError(e,"ECONNECTION",false,"CONN")));return}}))}else{if(this.secureConnection){Object.assign(t,this.options.tls||{});if(this.servername&&!t.servername){t.servername=this.servername}}return this._resolveAndConnect(t,(e=>{this._fallbackAddresses=(e._addresses||[]).filter((e=>e!==t.host));this._connectOpts=Object.assign({},t);this._connectToHost(t,this.secureConnection)}))}}_resolveAndConnect(e,t){return f.resolveHostname(e,((i,n)=>{if(i){return setImmediate((()=>this._onError(i,"EDNS",false,"CONN")))}this.logger.debug({tnx:"dns",source:e.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",e.host,n.host,n.cached?"hit":"miss");for(const t of Object.keys(n)){if(t.charAt(0)!=="_"&&n[t]){e[t]=n[t]}}t(n)}))}_connectToHost(e,t){if(this._destroyed||this._closing){return}this._connectionAttemptId++;const i=this._connectionAttemptId;const n=t?p.default.connect:l.default.connect;try{this._socket=n(e,(()=>{if(this._connectionAttemptId!==i){return}this._socket.setKeepAlive(true);this._onConnect()}));this._setupConnectionHandlers()}catch(e){setImmediate((()=>this._onError(e,"ECONNECTION",false,"CONN")));return}}_setupConnectionHandlers(){this._connectionTimeout=setTimeout((()=>{this._onConnectionError("Connection timeout","ETIMEDOUT")}),this.options.connectionTimeout||g);this._socket.on("error",this._onConnectionSocketError)}_onConnectionError(e,t){clearTimeout(this._connectionTimeout);const i=this._fallbackAddresses&&this._fallbackAddresses.length&&this.stage==="init"&&!this._destroyed;if(!i){this._onError(e,t,false,"CONN");return}const n=this._fallbackAddresses.shift();this.logger.info({tnx:"network",failedHost:this._connectOpts.host,nextHost:n,error:e.message||e},"Connection to %s failed, trying %s",this._connectOpts.host,n);if(this._socket){try{this._socket.removeListener("error",this._onConnectionSocketError);this._socket.on("error",TEARDOWN_NOOP);this._socket.destroy()}catch(e){}this._socket=null}this._connectOpts.host=n;this._connectToHost(this._connectOpts,this.secureConnection)}quit(){this._sendCommand("QUIT");this._responseActions.push(this.close)}close(){clearTimeout(this._connectionTimeout);clearTimeout(this._greetingTimeout);this._responseActions=[];if(this._closing){return}this._closing=true;const e=this.stage==="init"?"destroy":"end";this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);const t=this._socket&&this._socket.socket||this._socket;if(this._currentDataStream){try{this._currentDataStream.unpipe(this._socket)}catch(e){}this._currentDataStream=false}if(this._pendingSend){const{stream:e,onStreamError:t}=this._pendingSend;if(e){e.removeListener("error",t);e.on("error",TEARDOWN_NOOP)}this._pendingSend=false}if(t&&!t.destroyed){try{t.setTimeout(0);t.removeListener("data",this._onSocketData);t.removeListener("timeout",this._onSocketTimeout);t.removeListener("close",this._onSocketClose);t.removeListener("end",this._onSocketEnd);t.removeListener("error",this._onSocketError);t.removeListener("error",this._onConnectionSocketError);t.on("error",TEARDOWN_NOOP);t[e]()}catch(e){}}this._destroy()}login(e,t){const i=this._isDestroyedMessage("login");if(i){return t(this._formatError(i,"ECONNECTION",false,"API"))}this._auth=e||{};this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||false;const n=!!this._auth.oauth2||this.customAuth.has("XOAUTH2");if(!this._authMethod&&this._auth.oauth2&&!this._auth.credentials){this._authMethod="XOAUTH2"}else if(!this._authMethod||this._authMethod==="XOAUTH2"&&!this._auth.oauth2){const e=this._supportedAuth.find((e=>e!=="XOAUTH2"||n));this._authMethod=(e||"PLAIN").toUpperCase().trim()}if((this._authMethod!=="XOAUTH2"||this.customAuth.has("XOAUTH2"))&&(!this._auth.credentials||!this._auth.credentials.user||!this._auth.credentials.pass)){if(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)){this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}else{return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",false,"API"))}}if(this.customAuth.has(this._authMethod)){const e=this.customAuth.get(this._authMethod);let i;let n=false;const resolve=()=>{if(n){return}n=true;this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user));this.authenticated=true;t(null,true)};const reject=e=>{if(n){return}n=true;t(this._formatError(e,"EAUTH",i,"AUTH "+this._authMethod))};const sendCommand=(e,t)=>{let n;if(!t){n=new Promise(((e,i)=>{t=f.callbackPromise(e,i)}))}this._responseActions.push((n=>{i=n;let a=n.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/);let s={command:e,response:n};if(a){s.status=Number(a[1])||0;if(a[2]){s.code=a[2]}s.text=n.substr(a[0].length)}else{s.text=n;s.status=0}t(null,s)}));setImmediate((()=>this._sendCommand(e)));return n};const a=e({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||false,sendCommand:sendCommand,resolve:resolve,reject:reject});if(a&&typeof a.catch==="function"){a.then(resolve).catch(reject)}return}switch(this._authMethod){case"XOAUTH2":this._handleXOauth2Token(false,t);return;case"LOGIN":this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)}));this._sendCommand("AUTH LOGIN");return;case"PLAIN":this._responseActions.push((e=>{this._actionAUTHComplete(e,t)}));this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+"/* secret */","utf-8").toString("base64"));return;case"CRAM-MD5":this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)}));this._sendCommand("AUTH CRAM-MD5");return}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",false,"API"))}send(e,t,i){let n=false;const callback=(e,t)=>{if(n){return}n=true;if(this._pendingSend&&this._pendingSend.callback===callback){this._pendingSend=false}i(e,t)};if(!t){return callback(this._formatError("Empty message","EMESSAGE",false,"API"))}const a=this._isDestroyedMessage("send message");if(a){return callback(this._formatError(a,"ECONNECTION",false,"API"))}if(this._maxAllowedSize&&e.size>this._maxAllowedSize){setImmediate((()=>{callback(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",false,"MAIL FROM"))}));return}const s={callback:callback,stream:false,onStreamError:e=>callback(this._formatError(e,"ESTREAM",false,"API"))};if(typeof t.on==="function"){s.stream=t;s.stream.on("error",s.onStreamError)}this._pendingSend=s;const o=Date.now();this._setEnvelope(e,((e,i)=>{if(e){const i=new m.PassThrough;if(typeof t.pipe==="function"){t.pipe(i)}else{i.write(t);i.end()}return callback(e)}const n=Date.now();const a=this._createSendStream(((e,t)=>{if(e){return callback(e)}const s=i;s.envelopeTime=n-o;s.messageTime=Date.now()-n;s.messageSize=a.outByteCount;s.response=t;return callback(null,s)}));if(typeof t.pipe==="function"){t.pipe(a)}else{a.write(t);a.end()}}))}reset(e){const t=this._isDestroyedMessage("reset");if(t){return e(this._formatError(t,"ECONNECTION",false,"API"))}this._sendCommand("RSET");this._responseActions.push((t=>{if(t.charAt(0)!=="2"){return e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET"))}this._envelope=false;return e(null,true)}))}_onConnect(){const e=this._socket;clearTimeout(this._connectionTimeout);this.logger.info({tnx:"network",localAddress:e.localAddress,localPort:e.localPort,remoteAddress:e.remoteAddress,remotePort:e.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",e.remoteAddress,e.remotePort);if(this._destroyed){this.close();return}this.stage="connected";e.removeListener("data",this._onSocketData);e.removeListener("timeout",this._onSocketTimeout);e.removeListener("close",this._onSocketClose);e.removeListener("end",this._onSocketEnd);e.removeListener("error",this._onConnectionSocketError);e.removeListener("error",this._onSocketError);e.on("error",this._onSocketError);e.on("data",this._onSocketData);e.once("close",this._onSocketClose);e.once("end",this._onSocketEnd);e.setTimeout(this.options.socketTimeout||x);e.on("timeout",this._onSocketTimeout);this._greetingTimeout=setTimeout((()=>{if(this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting){this._onError("Greeting never received","ETIMEDOUT",false,"CONN")}}),this.options.greetingTimeout||v);this._responseActions.push(this._actionGreeting);e.resume()}_onData(e){if(this._destroyed||!e||!e.length){return}const t=this.options.maxResponseSize||_;const i=e.toString("binary");if(!i.includes("\n")){this._remainder+=i;if(this._remainder.length>t){return this._onResponseTooLarge()}return}const n=(this._remainder+i).split(/\r?\n/);this._remainder=n.pop();for(let e=0,i=n.length;e<i;e++){if(this._responsePartial){this._responseQueue[this._responseQueue.length-1]+="\n"+n[e]}else{this._responseQueue.push(n[e])}this._responsePartial=isPartialLine(n[e]);if(this._responsePartial&&this._responseQueue[this._responseQueue.length-1].length>t){return this._onResponseTooLarge()}}if(this._remainder.length>t){return this._onResponseTooLarge()}if(this._responsePartial){return}this._processResponse()}_onResponseTooLarge(){this._remainder="";this._responseQueue=[];this._responsePartial=false;this._onError(new Error("Server response exceeds maximum allowed size"),"EPROTOCOL",false,"CONN")}_onError(e,t,i,n){clearTimeout(this._connectionTimeout);clearTimeout(this._greetingTimeout);if(this._destroyed){return}e=this._formatError(e,t,i,n);const a=["ETIMEDOUT","ESOCKET","ECONNECTION"];if(a.includes(e.code)){this.logger.warn(i,e.message)}else{this.logger.error(i,e.message)}const s=this._pendingSend;this.emit("error",e);this.close();if(s){s.callback(e)}}_formatError(e,t,i,n){let a;if(/Error\]$/i.test(Object.prototype.toString.call(e))){a=e}else{a=new Error(e)}if(t&&t!=="Error"){a.code=t}if(i){a.response=i;a.message+=": "+i}const s=typeof i==="string"&&Number((i.match(/^\d+/)||[])[0])||false;if(s){a.responseCode=s}if(n){a.command=n}return a}_onClose(){let e=false;if(this._remainder&&this._remainder.trim()){this.lastServerResponse=e=decodeServerResponse(this._remainder.trim());if(this.options.debug||this.options.transactionLog){this.logger.debug({tnx:"server"},e)}}this.logger.info({tnx:"network"},"Connection closed");const t=typeof e==="string"&&/^[45]\d{2}[ -]/.test(e)?e:false;if(this.upgrading&&!this._destroyed){return this._onError(new Error("Connection closed unexpectedly"),"ETLS",t,"CONN")}if(!t&&this._responseActions[0]===this._actionGreeting&&this._connectCallback&&!this._destroyed){const e=this._connectCallback;this._connectCallback=false;const t=this._formatError(new Error("Connection closed unexpectedly"),"ECONNECTION",false,"CONN");this.logger.warn({tnx:"network"},t.message);e(t);this.close();return}if(t||this._responseActions[0]!==this.close&&!this._destroyed){return this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",t,"CONN")}this._destroy()}_onEnd(){if(this._socket&&!this._socket.destroyed){this._socket.end()}}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",false,"CONN")}_destroy(){if(this._destroyed){return}this._destroyed=true;this.destroyed=true;clearTimeout(this._connectionTimeout);clearTimeout(this._greetingTimeout);this._connectionTimeout=false;this._greetingTimeout=false;this.emit("end")}_upgradeConnection(e){this._remainder="";this._responseQueue=[];this._responsePartial=false;const t=this._socket;t.removeListener("data",this._onSocketData);t.removeListener("timeout",this._onSocketTimeout);const i=Object.assign({socket:t,host:this.host},this.options.tls||{});if(this.servername&&!i.servername){i.servername=this.servername}const removePlainSocketListeners=()=>{t.removeListener("close",this._onSocketClose);t.removeListener("end",this._onSocketEnd);t.removeListener("error",this._onSocketError);t.removeListener("error",this._onConnectionSocketError)};this.upgrading=true;try{this._socket=p.default.connect(i,(()=>{this.secure=true;this.upgrading=false;this._socket.on("data",this._onSocketData);removePlainSocketListeners();return e(null,true)}))}catch(t){removePlainSocketListeners();return e(t)}this._socket.on("error",this._onSocketError);this._socket.once("close",this._onSocketClose);this._socket.once("end",this._onSocketEnd);this._socket.setTimeout(this.options.socketTimeout||x);this._socket.on("timeout",this._onSocketTimeout);t.resume()}_processResponse(){if(!this._responseQueue.length){return false}const e=(this._responseQueue.shift()||"").toString();if(!e.trim()){setImmediate((()=>this._processResponse()));return}if(isPartialResponse(e)){this._responseQueue.unshift(e);return}const t=this.lastServerResponse=decodeServerResponse(e);if(this.options.debug||this.options.transactionLog){this.logger.debug({tnx:"server"},t.replace(/\r?\n$/,""))}const i=this._responseActions.shift();if(typeof i==="function"){i.call(this,t);setImmediate((()=>this._processResponse()))}else{return this._onError(new Error("Unexpected Response"),"EPROTOCOL",t,"CONN")}}_sendCommand(e,t){if(this._destroyed){return}const i=this._socket;if(i.destroyed){return this.close()}if(this.options.debug||this.options.transactionLog){this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,""))}i.write(Buffer.from(e+"\r\n","utf-8"))}_setEnvelope(e,t){const i=[];let n=false;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((e=>(e&&e.address||e||"").toString().trim()));if(!this._envelope.to.length){return t(this._formatError("No recipients defined","EENVELOPE",false,"API"))}if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from)){return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",false,"API"))}if(/[\x80-\uFFFF]/.test(this._envelope.from)){n=true}for(let e=0,i=this._envelope.to.length;e<i;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e])){return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",false,"API"))}if(/[\x80-\uFFFF]/.test(this._envelope.to[e])){n=true}}this._envelope.rcptQueue=[].concat(this._envelope.to||[]);this._envelope.rejected=[];this._envelope.rejectedErrors=[];this._envelope.accepted=[];if(this._envelope.dsn){try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",false,"API"))}}if(this._envelope.requireTLSExtensionEnabled){if(!this.secure){return t(this._formatError("REQUIRETLS can only be used over TLS connections (RFC 8689)","EREQUIRETLS",false,"MAIL FROM"))}if(!this._supportedExtensions.includes("REQUIRETLS")){return t(this._formatError("Server does not support REQUIRETLS extension (RFC 8689)","EREQUIRETLS",false,"MAIL FROM"))}}this._responseActions.push((e=>{this._actionMAIL(e,t)}));if(n&&this._supportedExtensions.includes("SMTPUTF8")){i.push("SMTPUTF8");this._usingSmtpUtf8=true}if(this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")){i.push("BODY=8BITMIME");this._using8BitMime=true}if(this._envelope.size&&this._supportedExtensions.includes("SIZE")){const e=Number(this._envelope.size)||0;if(e>0){i.push("SIZE="+e)}}if(this._envelope.dsn&&this._supportedExtensions.includes("DSN")){if(this._envelope.dsn.ret){i.push("RET="+f.encodeXText(this._envelope.dsn.ret))}if(this._envelope.dsn.envid){i.push("ENVID="+f.encodeXText(this._envelope.dsn.envid))}}if(this._envelope.requireTLSExtensionEnabled){i.push("REQUIRETLS")}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))}const i=(e.envid||e.id||"").toString()||null;let n=e.notify||null;if(n){if(typeof n==="string"){n=n.split(",")}n=n.map((e=>e.trim().toUpperCase()));const e=["NEVER","SUCCESS","FAILURE","DELAY"];const t=n.filter((t=>!e.includes(t)));if(t.length||n.length>1&&n.includes("NEVER")){throw new Error("notify: "+JSON.stringify(n.join(",")))}n=n.join(",")}let a=(e.recipient||e.orcpt||"").toString()||null;if(a&&a.indexOf(";")<0){a="rfc822;"+a}return{ret:t,envid:i,notify:n,orcpt:a}}_getDsnRcptToArgs(){const e=this._envelope;const t=[];if(e.dsn&&this._supportedExtensions.includes("DSN")){if(e.dsn.notify){t.push("NOTIFY="+f.encodeXText(e.dsn.notify))}if(e.dsn.orcpt){t.push("ORCPT="+f.encodeXText(e.dsn.orcpt))}}return t.length?" "+t.join(" "):""}_createSendStream(e){const t=this._envelope;const i=new h.default;if(this.options.lmtp){t.accepted.forEach(((i,n)=>{const a=n===t.accepted.length-1;this._responseActions.push((t=>{this._actionLMTPStream(i,a,t,e)}))}))}else{this._responseActions.push((t=>{this._actionSMTPStream(t,e)}))}this._currentDataStream=i;i.pipe(this._socket,{end:false});if(this.options.debug){const e=new m.PassThrough;e.on("readable",(()=>{let t;while(t=e.read()){this.logger.debug({tnx:"message"},t.toString("binary").replace(/\r?\n$/,""))}}));i.pipe(e)}i.once("end",(()=>{if(this._currentDataStream===i){this._currentDataStream=false}this.logger.info({tnx:"message",inByteCount:i.inByteCount,outByteCount:i.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",i.outByteCount,i.inByteCount)}));return i}_actionGreeting(e){clearTimeout(this._greetingTimeout);if(e.substr(0,3)!=="220"){this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN");return}if(this.options.lmtp){this._responseActions.push(this._actionLHLO);this._sendCommand("LHLO "+this.name)}else{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}this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1);if(!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS)){this._sendCommand("STARTTLS");this._responseActions.push(this._actionSTARTTLS);return}if(/[ -]SMTPUTF8\b/im.test(e)){this._supportedExtensions.push("SMTPUTF8")}if(/[ -]DSN\b/im.test(e)){this._supportedExtensions.push("DSN")}if(/[ -]8BITMIME\b/im.test(e)){this._supportedExtensions.push("8BITMIME")}if(/[ -]REQUIRETLS\b/im.test(e)){this._supportedExtensions.push("REQUIRETLS")}if(/[ -]PIPELINING\b/im.test(e)){this._supportedExtensions.push("PIPELINING")}if(/[ -]AUTH\b/i.test(e)){this.allowsAuth=true}const i=new Set;for(const e of this._ehloLines){const t=/^AUTH[\s=](.*)/i.exec(e);if(t){for(const e of t[1].split(/[\s=]+/)){i.add(e.toUpperCase())}}}for(const e of["PLAIN","LOGIN","CRAM-MD5","XOAUTH2"]){if(i.has(e)){this._supportedAuth.push(e)}}if(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im)){this._supportedExtensions.push("SIZE");this._maxAllowedSize=Number(t[1])||0}this.emit("connect")}_actionHELO(e){if(e.charAt(0)!=="2"){this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO");return}this.allowsAuth=true;this.emit("connect")}_actionSTARTTLS(e){if(e.charAt(0)!=="2"){if(this.options.opportunisticTLS){this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted");this.emit("connect");return}this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");return}this._upgradeConnection(((e,t)=>{if(e){this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",false,"STARTTLS");return}this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS");if(t){if(this.options.lmtp){this._responseActions.push(this._actionLHLO);this._sendCommand("LHLO "+this.name)}else{this._responseActions.push(this._actionEHLO);this._sendCommand("EHLO "+this.name)}}else{this.emit("connect")}}))}_actionAUTH_LOGIN_USER(e,t){if(!/^334[ -]/.test(e)){t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"));return}this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)}));this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))}_actionAUTH_CRAM_MD5(e,t){const i=e.match(/^334\s+(.+)$/);if(!i){return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"))}const n=Buffer.from(i[1],"base64").toString("ascii");const a=u.default.createHmac("md5",this._auth.credentials.pass);a.update(n);const s=this._auth.credentials.user+" "+a.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)}));this._sendCommand(Buffer.from(s).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/)){return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"))}this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user));this.authenticated=true;t(null,true)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e)){return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"))}this._responseActions.push((e=>{this._actionAUTHComplete(e,t)}));this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,i){if(!i&&typeof t==="function"){i=t;t=false}if(e.substr(0,3)==="334"){this._responseActions.push((e=>{if(t||this._authMethod!=="XOAUTH2"){this._actionAUTHComplete(e,true,i)}else{setImmediate((()=>this._handleXOauth2Token(true,i)))}}));this._sendCommand("");return}if(e.charAt(0)!=="2"){this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user));return i(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))}this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user));this.authenticated=true;i(null,true)}_actionMAIL(e,t){const i=this._envelope;if(Number(e.charAt(0))!==2){const n=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(i.from)?"Internationalized mailbox name not allowed":"Mail command failed";return t(this._formatError(n,"EENVELOPE",e,"MAIL FROM"))}if(!i.rcptQueue.length){return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",false,"API"))}this._recipientQueue=[];const n=this._supportedExtensions.includes("PIPELINING");do{const e=i.rcptQueue.shift();this._recipientQueue.push(e);this._responseActions.push((e=>{this._actionRCPT(e,t)}));this._sendCommand("RCPT TO:<"+e+">"+this._getDsnRcptToArgs())}while(n&&i.rcptQueue.length)}_actionRCPT(e,t){const i=this._envelope;let n;const a=this._recipientQueue.shift();if(Number(e.charAt(0))!==2){const t=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(a)?"Internationalized mailbox name not allowed":"Recipient command failed";i.rejected.push(a);n=this._formatError(t,"EENVELOPE",e,"RCPT TO");n.recipient=a;i.rejectedErrors.push(n)}else{i.accepted.push(a)}if(!i.rcptQueue.length&&!this._recipientQueue.length){if(i.rejected.length<i.to.length){this._responseActions.push((e=>{this._actionDATA(e,t)}));this._sendCommand("DATA")}else{const a=i.rejectedErrors.find((e=>e.responseCode&&e.responseCode<500));const s=a?.response??e;n=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",s,"RCPT TO");n.rejected=i.rejected;n.rejectedErrors=i.rejectedErrors;return t(n)}}else if(i.rcptQueue.length){const e=i.rcptQueue.shift();this._recipientQueue.push(e);this._responseActions.push((e=>{this._actionRCPT(e,t)}));this._sendCommand("RCPT TO:<"+e+">"+this._getDsnRcptToArgs())}}_actionDATA(e,t){const i=this._envelope;if(!/^[23]/.test(e)){return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"))}const n={accepted:i.accepted,rejected:i.rejected};if(this._ehloLines&&this._ehloLines.length){n.ehlo=this._ehloLines}if(i.rejectedErrors.length){n.rejectedErrors=i.rejectedErrors}t(null,n)}_actionSMTPStream(e,t){if(Number(e.charAt(0))!==2){return t(this._formatError("Message failed","EMESSAGE",e,"DATA"))}return t(null,e)}_actionLMTPStream(e,t,i,n){const a=this._envelope;let s;if(Number(i.charAt(0))!==2){s=this._formatError("Message failed for recipient "+e,"EMESSAGE",i,"DATA");s.recipient=e;a.rejected.push(e);a.rejectedErrors.push(s);for(let t=0,i=a.accepted.length;t<i;t++){if(a.accepted[t]===e){a.accepted.splice(t,1)}}}if(t){return n(null,i)}}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((i,n)=>{if(i){this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user));return t(this._formatError(i,"EAUTH",false,"AUTH XOAUTH2"))}this._responseActions.push((i=>{this._actionAUTHComplete(i,e,t)}));this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(n),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed){return"Cannot "+e+" - smtp connection is already destroyed."}if(this._socket){if(this._socket.destroyed){return"Cannot "+e+" - smtp connection socket is already destroyed."}if(!this._socket.writable){return"Cannot "+e+" - smtp connection socket is already half-closed."}}}_getHostname(){let e;try{e=d.default.hostname()||""}catch(t){e="localhost"}if(!e||e.indexOf(".")<0){e="[127.0.0.1]"}if(e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)){e="["+e+"]"}return e}}t["default"]=SMTPConnection;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},902:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(5673);const c=o(i(4789));const l=o(i(972));const p=o(i(2110));const d=s(i(9119));const u=s(i(7952));const h=s(i(7009));const m=50;const f=2e3;class SMTPPool extends r.EventEmitter{constructor(e){super();e=e||{};if(typeof e==="string"){e={url:e}}let t;let i=e.service;if(typeof e.getSocket==="function"){this.getSocket=e.getSocket}if(e.url){t=d.parseConnectionUrl(e.url);i=i||t.service}this.options=d.assign(false,e,t,i&&(0,p.default)(i));this.options.maxConnections=this.options.maxConnections||5;this.options.maxMessages=this.options.maxMessages||100;this.options.maxRequeues=typeof this.options.maxRequeues==="number"?this.options.maxRequeues:5;this.logger=d.getLogger(this.options,{component:this.options.component||"smtp-pool"});this.name="SMTP (pool)";this.version=h.version+"[client:"+h.version+"]";this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:false,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0};this._closed=false;this._queue=[];this._connections=[];this._connectionCounter=0;this.idling=true;setImmediate((()=>{if(this.idling){this.emit("idle")}}))}getSocket(e,t){setImmediate((()=>t(null,false)))}send(e,t){if(this._closed){const e=new Error("Connection pool was closed");e.code=u.ECONNECTION;setImmediate((()=>t(e)));return false}this._queue.push({mail:e,requeueAttempts:0,callback:t});if(this.idling&&this._queue.length>=this.options.maxConnections){this.idling=false}setImmediate((()=>this._processMessages()));return true}close(){let e;const t=this._connections.length;this._closed=true;this._clearRateLimit();if(!t&&!this._queue.length){return}for(let i=t-1;i>=0;i--){if(this._connections[i]&&this._connections[i].available){e=this._connections[i];e.close();this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id)}}if(t&&!this._connections.length){this.logger.debug({tnx:"connection"},"All connections removed")}if(!this._queue.length){return}const invokeCallbacks=()=>{if(!this._queue.length){this.logger.debug({tnx:"connection"},"Pending queue entries cleared");return}const e=this._queue.shift();if(e&&typeof e.callback==="function"){try{e.callback(new Error("Connection pool was closed"))}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error: %s",e.message)}}setImmediate(invokeCallbacks)};setImmediate(invokeCallbacks)}_processMessages(){if(this._closed){return}if(!this._queue.length){if(!this.idling){this.idling=true;this.emit("idle")}return}let e=this._connections.find((e=>e.available));if(!e&&this._connections.length<this.options.maxConnections){e=this._createConnection()}if(!e){this.idling=false;return}if(!this.idling&&this._queue.length<this.options.maxConnections){this.idling=true;this.emit("idle")}const t=e.queueEntry=this._queue.shift();t.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,"");e.available=false;this.logger.debug({tnx:"pool",cid:e.id,messageId:t.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",t.messageId,e.id,e.messages+1);if(this._rateLimit.limit){this._rateLimit.counter++;if(!this._rateLimit.checkpoint){this._rateLimit.checkpoint=Date.now()}}e.send(t.mail,((i,n)=>{if(t===e.queueEntry){try{t.callback(i,n)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=false}}))}_createConnection(){const e=new c.default(this);e.id=++this._connectionCounter;this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id);e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id);if(this._closed){this.close()}else{this._processMessages()}}));e.once("error",(t=>{if(t.code!==u.EMAXLIMIT){this.logger.warn({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message)}else{this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id)}if(e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=false}this._removeConnection(e);this._continueProcessing()}));e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id);this._removeConnection(e);if(e.queueEntry){setTimeout((()=>{let t=0;if(e.queueEntry){if(this._shouldRequeuOnConnectionClose(e.queueEntry)){t=this._requeueEntryOnConnectionClose(e)}else{this._failDeliveryOnConnectionClose(e)}}if(t){setTimeout((()=>this._continueProcessing()),t)}else{this._continueProcessing()}}),50)}else{if(!this._closed&&this.idling&&!this._connections.length){this.emit("clear")}this._continueProcessing()}}));this._connections.push(e);return e}_shouldRequeuOnConnectionClose(e){if(this.options.maxRequeues<0){return true}return e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{const t=new Error("Reached maximum number of retries after connection was closed");t.code=u.ECONNECTION;e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=false}}_requeueEntryOnConnectionClose(e){const t=Math.min(m*2**e.queueEntry.requeueAttempts,f);e.queueEntry.requeueAttempts+=1;this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts);this._queue.unshift(e.queueEntry);e.queueEntry=false;return t}_continueProcessing(){if(this._closed){this.close()}else{setTimeout((()=>this._processMessages()),100)}}_removeConnection(e){const t=this._connections.indexOf(e);if(t!==-1){this._connections.splice(t,1)}}_checkRateLimit(e){if(!this._rateLimit.limit){return e()}const t=Date.now();if(this._rateLimit.counter<this._rateLimit.limit){return e()}this._rateLimit.waiting.push(e);if(this._rateLimit.checkpoint<=t-this._rateLimit.delta){return this._clearRateLimit()}if(!this._rateLimit.timeout){this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint));this._rateLimit.checkpoint=t}}_clearRateLimit(){clearTimeout(this._rateLimit.timeout);this._rateLimit.timeout=null;this._rateLimit.counter=0;this._rateLimit.checkpoint=false;while(this._rateLimit.waiting.length){const e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let t;if(!e){t=new Promise(((t,i)=>{e=d.callbackPromise(t,i)}))}const i=e;const n=new c.default(this).auth;this.getSocket(this.options,((e,t)=>{if(e){return i(e)}let a=this.options;if(t&&t.connection){this.logger.info({tnx:"proxy",remoteAddress:t.connection.remoteAddress,remotePort:t.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",t.connection.remoteAddress,t.connection.remotePort,a.host||"",a.port||"");a=Object.assign(d.assign(false,a),t)}const s=new l.default(a);let o=false;s.once("error",(e=>{if(o){return}o=true;s.close();return i(e)}));s.once("end",(()=>{if(o){return}o=true;return i(new Error("Connection closed"))}));const finalize=()=>{if(o){return}o=true;s.quit();return i(null,true)};s.connect((e=>{if(o){return}if(e){o=true;s.close();return i(e)}if(n&&(s.allowsAuth||a.forceAuth)){s.login(n,(e=>{if(o){return}if(e){o=true;s.close();return i(e)}finalize()}))}else if(!n&&s.allowsAuth&&a.forceAuth){const e=new Error("Authentication info was not provided");e.code=u.ENOAUTH;o=true;s.close();return i(e)}else{finalize()}}))}));return t}}t["default"]=SMTPPool;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},4789:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=o(i(972));const c=i(9119);const l=o(i(2031));const p=s(i(7952));const d=i(5673);class PoolResource extends d.EventEmitter{constructor(e){super();this.pool=e;this.options=e.options;this.logger=this.pool.logger;if(this.options.auth){switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{const e=new l.default(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback;this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"};e.on("token",(e=>this.pool.mailer.emit("token",e)));e.on("error",(e=>this._fail(e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass){break}this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||false}}}this._connection=false;this._connected=false;this.messages=0;this.available=true;this._failed=false}_fail(e){if(this._failed){return}this._failed=true;this.emit("error",e)}connect(e){this.pool.getSocket(this.options,((t,i)=>{if(t){this._fail(t);return e(t)}let n=false;let a=this.options;if(i&&i.connection){this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,a.host||"",a.port||"");a=Object.assign((0,c.assign)(false,a),i)}this.connection=new r.default(a);this.connection.on("error",(t=>{this._fail(t);if(n){return}n=true;return e(t)}));this.connection.once("end",(()=>{this.close();n=true}));this.connection.connect((t=>{if(n){return}if(t){n=true;return}if(this.auth&&(this.connection.allowsAuth||a.forceAuth)){this.connection.login(this.auth,(t=>{if(n){return}n=true;if(t){this.connection.close();this._fail(t);return e(t)}this._connected=true;e(null,true)}))}else{n=true;this._connected=true;return e(null,true)}}))}))}send(e,t){if(!this._connected){return this.connect((i=>{if(i){return t(i)}return this.send(e,t)}))}const i=e.message.getEnvelope();const n=e.message.messageId();const a=[].concat(i.to||[]);if(a.length>3){a.push("...and "+a.splice(2).length+" more")}this.logger.info({tnx:"send",messageId:n,cid:this.id},"Sending message %s using #%s to <%s>",n,this.id,a.join(", "));if(e.data.dsn){i.dsn=e.data.dsn}if(e.data.requireTLSExtensionEnabled){i.requireTLSExtensionEnabled=e.data.requireTLSExtensionEnabled}this.connection.send(i,e.message.createReadStream(),((e,a)=>{this.messages++;if(e){this.connection.close();this._fail(e);return t(e)}a.envelope={from:i.from,to:i.to};a.messageId=n;setImmediate((()=>{if(this.messages>=this.options.maxMessages){const e=new Error("Resource exhausted");e.code=p.EMAXLIMIT;this.connection.close();this._fail(e)}else{this.pool._checkRateLimit((()=>{this.available=true;this.emit("available")}))}}));t(null,a)}))}close(){this._connected=false;if(this.auth&&this.auth.oauth2){this.auth.oauth2.removeAllListeners()}if(this.connection){this.connection.close()}this.emit("close")}}t["default"]=PoolResource;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},7578:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(5673);const c=o(i(972));const l=o(i(2110));const p=s(i(9119));const d=o(i(2031));const u=s(i(7952));const h=s(i(7009));class SMTPTransport extends r.EventEmitter{constructor(e){super();e=e||{};if(typeof e==="string"){e={url:e}}let t;let i=e.service;if(typeof e.getSocket==="function"){this.getSocket=e.getSocket}if(e.url){t=p.parseConnectionUrl(e.url);i=i||t.service}this.options=p.assign(false,e,t,i&&(0,l.default)(i));this.logger=p.getLogger(this.options,{component:this.options.component||"smtp-transport"});this.name="SMTP";this.version=h.version+"[client:"+h.version+"]";if(this.options.auth){this.auth=this.getAuth({})}}getSocket(e,t){setImmediate((()=>t(null,false)))}getAuth(e){if(!e){if(this.auth&&this.auth.oauth2&&this.mailer){this.auth.oauth2.provisionCallback=this.mailer.get("oauth2_provision_cb")||this.auth.oauth2.provisionCallback}return this.auth}const t=Object.assign({},this.options.auth&&typeof this.options.auth==="object"?this.options.auth:{},typeof e==="object"?e:{});if(Object.keys(t).length===0){return false}switch((t.type||"").toString().toUpperCase()){case"OAUTH2":{if(!t.service&&!t.user){return false}const e=new d.default(t,this.logger);e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback;e.on("token",(e=>this.mailer.emit("token",e)));e.on("error",(e=>this.emit("error",e)));return{type:"OAUTH2",user:t.user,oauth2:e,method:"XOAUTH2"}}default:return{type:(t.type||"").toString().toUpperCase()||"LOGIN",user:t.user,credentials:{user:t.user||"",pass:t.pass,options:t.options},method:(t.method||"").trim().toUpperCase()||this.options.authMethod||false}}}send(e,t){this.getSocket(this.options,((i,n)=>{if(i){return t(i)}let a=false;let s=this.options;if(n&&n.connection){this.logger.info({tnx:"proxy",remoteAddress:n.connection.remoteAddress,remotePort:n.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",n.connection.remoteAddress,n.connection.remotePort,s.host||"",s.port||"");s=Object.assign(p.assign(false,s),n)}const o=new c.default(s);let r;const cleanupPerCallAuth=()=>{if(r&&r!==this.auth&&r.oauth2){r.oauth2.removeAllListeners()}r=null};o.once("error",(e=>{if(a){return}a=true;cleanupPerCallAuth();o.close();return t(e)}));const sendMessage=()=>{const i=e.message.getEnvelope();const n=e.message.messageId();const s=[].concat(i.to||[]);if(s.length>3){s.push("...and "+s.splice(2).length+" more")}if(e.data.dsn){i.dsn=e.data.dsn}if(e.data.requireTLSExtensionEnabled){i.requireTLSExtensionEnabled=e.data.requireTLSExtensionEnabled}this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s>",n,s.join(", "));o.send(i,e.message.createReadStream(),((e,s)=>{if(a){return}a=true;cleanupPerCallAuth();o.close();if(e){this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",n,e.message);return t(e)}s.envelope={from:i.from,to:i.to};s.messageId=n;try{return t(null,s)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",n,e.message)}}))};o.connect((i=>{if(a){return}if(i){a=true;o.close();return t(i)}r=this.getAuth(e.data.auth);if(r&&(o.allowsAuth||s.forceAuth)){o.login(r,(e=>{cleanupPerCallAuth();if(a){return}if(e){a=true;o.close();return t(e)}sendMessage()}))}else{sendMessage()}}))}))}verify(e){let t;if(!e){t=new Promise(((t,i)=>{e=p.callbackPromise(t,i)}))}const i=e;this.getSocket(this.options,((e,t)=>{if(e){return i(e)}let n=this.options;if(t&&t.connection){this.logger.info({tnx:"proxy",remoteAddress:t.connection.remoteAddress,remotePort:t.connection.remotePort,destHost:n.host||"",destPort:n.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",t.connection.remoteAddress,t.connection.remotePort,n.host||"",n.port||"");n=Object.assign(p.assign(false,n),t)}const a=new c.default(n);let s=false;let o;const cleanupPerCallAuth=()=>{if(o&&o!==this.auth&&o.oauth2){o.oauth2.removeAllListeners()}o=null};a.once("error",(e=>{if(s){return}s=true;cleanupPerCallAuth();a.close();return i(e)}));a.once("end",(()=>{if(s){return}s=true;cleanupPerCallAuth();return i(new Error("Connection closed"))}));const finalize=()=>{if(s){return}s=true;cleanupPerCallAuth();a.quit();return i(null,true)};a.connect((e=>{if(s){return}if(e){s=true;a.close();return i(e)}o=this.getAuth({});if(o&&(a.allowsAuth||n.forceAuth)){a.login(o,(e=>{cleanupPerCallAuth();if(s){return}if(e){s=true;a.close();return i(e)}finalize()}))}else if(!o&&a.allowsAuth&&n.forceAuth){const e=new Error("Authentication info was not provided");e.code=u.ENOAUTH;s=true;cleanupPerCallAuth();a.close();return i(e)}else{finalize()}}))}));return t}close(){if(this.auth&&this.auth.oauth2){this.auth.oauth2.removeAllListeners()}this.emit("close")}}t["default"]=SMTPTransport;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},3957:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(i(7009));const c=s(i(9119));const l=o(i(7));const p=o(i(9700));class StreamTransport{constructor(e){e=e||{};this.options=e;this.name="StreamTransport";this.version=r.version;this.logger=c.getLogger(this.options,{component:this.options.component||"stream-transport"});this.winbreak=["win","windows","dos","\r\n"].includes((e.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=true;const i=e.message.getEnvelope();const n=e.message.messageId();const a=[].concat(i.to||[]);if(a.length>3){a.push("...and "+a.splice(2).length+" more")}this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s> using %s line breaks",n,a.join(", "),this.winbreak?"<CR><LF>":"<LF>");setImmediate((()=>{let a;try{a=e.message.createReadStream();if(this.options.newline){const e=a;a=e.pipe(this.winbreak?new l.default:new p.default);e.once("error",(e=>a.emit("error",e)))}}catch(e){this.logger.error({err:e,tnx:"send",messageId:n},"Creating send stream failed for %s. %s",n,e.message);return t(e)}if(!this.options.buffer){a.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:n},"Failed creating message for %s. %s",n,e.message)}));return t(null,{envelope:i,messageId:n,message:a})}const s=[];let o=0;a.on("readable",(()=>{let e;while((e=a.read())!==null){s.push(e);o+=e.length}}));a.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:n},"Failed creating message for %s. %s",n,e.message);return t(e)}));a.on("end",(()=>t(null,{envelope:i,messageId:n,message:Buffer.concat(s,o)})))}))}}t["default"]=StreamTransport;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},2110:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=wellKnown;const n=i(8096);const a={};Object.keys(n.services).forEach((e=>{const t=n.services[e];const i=normalizeService(t);a[normalizeKey(e)]=i;[].concat(t.aliases||[]).forEach((e=>{a[normalizeKey(e)]=i}));[].concat(t.domains||[]).forEach((e=>{a[normalizeKey(e)]=i}))}));function normalizeKey(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function normalizeService(e){const t={};Object.keys(e).forEach((i=>{if(!["domains","aliases"].includes(i)){t[i]=e[i]}}));return t}function wellKnown(e){e=normalizeKey(e.split("@").pop());return a[e]||false}e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})},8096:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.services=void 0;t.services={126:{description:"126 Mail (NetEase)",host:"smtp.126.com",port:465,secure:true},163:{description:"163 Mail (NetEase)",host:"smtp.163.com",port:465,secure:true},"1und1":{description:"1&1 Mail (German hosting provider)",host:"smtp.1und1.de",port:465,secure:true,authMethod:"LOGIN"},Aliyun:{description:"Alibaba Cloud Mail",domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:true},AliyunQiye:{description:"Alibaba Cloud Enterprise Mail",host:"smtp.qiye.aliyun.com",port:465,secure:true},AOL:{description:"AOL Mail",domains:["aol.com"],host:"smtp.aol.com",port:587},Aruba:{description:"Aruba PEC (Italian email provider)",domains:["aruba.it","pec.aruba.it"],aliases:["Aruba PEC"],host:"smtps.aruba.it",port:465,secure:true,authMethod:"LOGIN"},Bluewin:{description:"Bluewin (Swiss email provider)",host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},BOL:{description:"BOL Mail (Brazilian provider)",domains:["bol.com.br"],host:"smtp.bol.com.br",port:587,requireTLS:true},DebugMail:{description:"DebugMail (email testing service)",host:"debugmail.io",port:25},Disroot:{description:"Disroot (privacy-focused provider)",domains:["disroot.org"],host:"disroot.org",port:587,secure:false,authMethod:"LOGIN"},DynectEmail:{description:"Dyn Email Delivery",aliases:["Dynect"],host:"smtp.dynect.net",port:25},ElasticEmail:{description:"Elastic Email",aliases:["Elastic Email"],host:"smtp.elasticemail.com",port:465,secure:true},Ethereal:{description:"Ethereal Email (email testing service)",aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail:{description:"FastMail",domains:["fastmail.com","fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:true},"Feishu Mail":{description:"Feishu Mail (Lark)",aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:true},"Forward Email":{description:"Forward Email (email forwarding service)",aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:true},GandiMail:{description:"Gandi Mail",aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail:{description:"Gmail",aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:true},GmailWorkspace:{description:"Gmail Workspace",aliases:["Google Workspace Mail"],host:"smtp-relay.gmail.com",port:465,secure:true},GMX:{description:"GMX Mail",domains:["gmx.com","gmx.net","gmx.de"],host:"mail.gmx.com",port:587},Godaddy:{description:"GoDaddy Email (US)",host:"smtpout.secureserver.net",port:25},GodaddyAsia:{description:"GoDaddy Email (Asia)",host:"smtp.asia.secureserver.net",port:25},GodaddyEurope:{description:"GoDaddy Email (Europe)",host:"smtp.europe.secureserver.net",port:25},"hot.ee":{description:"Hot.ee (Estonian email provider)",host:"mail.hot.ee"},Hotmail:{description:"Outlook.com / Hotmail",aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud:{description:"iCloud Mail",aliases:["Me","Mac"],domains:["icloud.com","me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak:{description:"Infomaniak Mail (Swiss hosting provider)",host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},KolabNow:{description:"KolabNow (secure email service)",domains:["kolabnow.com"],aliases:["Kolab"],host:"smtp.kolabnow.com",port:465,secure:true,authMethod:"LOGIN"},Loopia:{description:"Loopia (Swedish hosting provider)",host:"mailcluster.loopia.se",port:465},Loops:{description:"Loops",host:"smtp.loops.so",port:587},"mail.ee":{description:"Mail.ee (Estonian email provider)",host:"smtp.mail.ee"},"Mail.ru":{description:"Mail.ru",host:"smtp.mail.ru",port:465,secure:true},"Mailcatch.app":{description:"Mailcatch (email testing service)",host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:{description:"MailDev (local email testing)",port:1025,ignoreTLS:true},MailerSend:{description:"MailerSend",host:"smtp.mailersend.net",port:587},Mailgun:{description:"Mailgun",host:"smtp.mailgun.org",port:465,secure:true},Mailjet:{description:"Mailjet",host:"in.mailjet.com",port:587},Mailosaur:{description:"Mailosaur (email testing service)",host:"mailosaur.io",port:25},MailSenpai:{description:"MailSenpai (SMTP Senpai, EU)",host:"relay.mailsenpai.com",port:2525,secure:false},Mailtrap:{description:"Mailtrap",host:"live.smtp.mailtrap.io",port:587},Mandrill:{description:"Mandrill (by Mailchimp)",host:"smtp.mandrillapp.com",port:587},Naver:{description:"Naver Mail (Korean email provider)",host:"smtp.naver.com",port:587},OhMySMTP:{description:"OhMySMTP (email delivery service)",host:"smtp.ohmysmtp.com",port:587,secure:false},One:{description:"One.com Email",host:"send.one.com",port:465,secure:true},OpenMailBox:{description:"OpenMailBox",aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:true},Outlook365:{description:"Microsoft 365 / Office 365",host:"smtp.office365.com",port:587,secure:false},Postmark:{description:"Postmark",aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},Proton:{description:"Proton Mail",aliases:["ProtonMail","Proton.me","Protonmail.com","Protonmail.ch"],domains:["proton.me","protonmail.com","pm.me","protonmail.ch"],host:"smtp.protonmail.ch",port:587,requireTLS:true},"qiye.aliyun":{description:"Alibaba Mail Enterprise Edition",host:"smtp.mxhichina.com",port:"465",secure:true},QQ:{description:"QQ Mail",domains:["qq.com"],host:"smtp.qq.com",port:465,secure:true},QQex:{description:"QQ Enterprise Mail",aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:true},Resend:{description:"Resend",host:"smtp.resend.com",port:465,secure:true},Runbox:{description:"Runbox (Norwegian email provider)",domains:["runbox.com"],host:"smtp.runbox.com",port:465,secure:true},SendCloud:{description:"SendCloud (Chinese email delivery)",host:"smtp.sendcloud.net",port:2525},SendGrid:{description:"SendGrid",host:"smtp.sendgrid.net",port:587},SendinBlue:{description:"Brevo (formerly Sendinblue)",aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse:{description:"SendPulse",host:"smtp-pulse.com",port:465,secure:true},SES:{description:"AWS SES US East (N. Virginia)",host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:true},"SES-AP-NORTHEAST-1":{description:"AWS SES Asia Pacific (Tokyo)",host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:true},"SES-AP-NORTHEAST-2":{description:"AWS SES Asia Pacific (Seoul)",host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:true},"SES-AP-NORTHEAST-3":{description:"AWS SES Asia Pacific (Osaka)",host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:true},"SES-AP-SOUTH-1":{description:"AWS SES Asia Pacific (Mumbai)",host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:true},"SES-AP-SOUTHEAST-1":{description:"AWS SES Asia Pacific (Singapore)",host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:true},"SES-AP-SOUTHEAST-2":{description:"AWS SES Asia Pacific (Sydney)",host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:true},"SES-CA-CENTRAL-1":{description:"AWS SES Canada (Central)",host:"email-smtp.ca-central-1.amazonaws.com",port:465,secure:true},"SES-EU-CENTRAL-1":{description:"AWS SES Europe (Frankfurt)",host:"email-smtp.eu-central-1.amazonaws.com",port:465,secure:true},"SES-EU-NORTH-1":{description:"AWS SES Europe (Stockholm)",host:"email-smtp.eu-north-1.amazonaws.com",port:465,secure:true},"SES-EU-WEST-1":{description:"AWS SES Europe (Ireland)",host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:true},"SES-EU-WEST-2":{description:"AWS SES Europe (London)",host:"email-smtp.eu-west-2.amazonaws.com",port:465,secure:true},"SES-EU-WEST-3":{description:"AWS SES Europe (Paris)",host:"email-smtp.eu-west-3.amazonaws.com",port:465,secure:true},"SES-SA-EAST-1":{description:"AWS SES South America (São Paulo)",host:"email-smtp.sa-east-1.amazonaws.com",port:465,secure:true},"SES-US-EAST-1":{description:"AWS SES US East (N. Virginia)",host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:true},"SES-US-EAST-2":{description:"AWS SES US East (Ohio)",host:"email-smtp.us-east-2.amazonaws.com",port:465,secure:true},"SES-US-GOV-EAST-1":{description:"AWS SES GovCloud (US-East)",host:"email-smtp.us-gov-east-1.amazonaws.com",port:465,secure:true},"SES-US-GOV-WEST-1":{description:"AWS SES GovCloud (US-West)",host:"email-smtp.us-gov-west-1.amazonaws.com",port:465,secure:true},"SES-US-WEST-1":{description:"AWS SES US West (N. California)",host:"email-smtp.us-west-1.amazonaws.com",port:465,secure:true},"SES-US-WEST-2":{description:"AWS SES US West (Oregon)",host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:true},Seznam:{description:"Seznam Email (Czech email provider)",aliases:["Seznam Email"],domains:["seznam.cz","email.cz","post.cz","spoluzaci.cz"],host:"smtp.seznam.cz",port:465,secure:true},SMTP2GO:{description:"SMTP2GO",host:"mail.smtp2go.com",port:2525},Sparkpost:{description:"SparkPost",aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:false},Tipimail:{description:"Tipimail (email delivery service)",host:"smtp.tipimail.com",port:587},TurboSMTP:{description:"TurboSMTP",host:"pro.turbo-smtp.com",port:465,secure:true},"TurboSMTP-EU":{description:"TurboSMTP (EU region)",host:"pro.eu.turbo-smtp.com",port:465,secure:true},Tutanota:{description:"Tutanota (Tuta Mail)",domains:["tutanota.com","tuta.com","tutanota.de","tuta.io"],host:"smtp.tutanota.com",port:465,secure:true},Yahoo:{description:"Yahoo Mail",domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:true},Yandex:{description:"Yandex Mail",domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:true},Zimbra:{description:"Zimbra Mail Server",aliases:["Zimbra Collaboration"],host:"smtp.zimbra.com",port:587,requireTLS:true},Zoho:{description:"Zoho Mail",host:"smtp.zoho.com",port:465,secure:true,authMethod:"LOGIN"}}},2031:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(n===undefined)n=i;var a=Object.getOwnPropertyDescriptor(t,i);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[i]}}}Object.defineProperty(e,n,a)}:function(e,t,i,n){if(n===undefined)n=i;e[n]=t[i]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[t.length]=i;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=ownKeys(e),s=0;s<i.length;s++)if(i[s]!=="default")n(t,e,i[s]);a(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=i(4492);const c=o(i(9923));const l=o(i(6005));const p=s(i(9119));const d=s(i(7952));class XOAuth2 extends r.Stream{constructor(e,t){super();this.options=e||{};this.configError=false;if(e&&e.serviceClient){if(!e.privateKey||!e.user){const e=new Error('Options "privateKey" and "user" are required for service account!');e.code=d.EOAUTH2;this.configError=e}const t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||5*60}this.logger=p.getLogger({logger:t},{component:this.options.component||"OAuth2"});this.provisionCallback=typeof this.options.provisionCallback==="function"?this.options.provisionCallback:false;this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token";this.options.customHeaders=this.options.customHeaders||{};this.options.customParams=this.options.customParams||{};this.accessToken=this.options.accessToken||false;if(this.options.expires&&Number(this.options.expires)){this.expires=this.options.expires}else{const e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+e*1e3||0}this.renewing=false;this.renewalQueue=[]}getToken(e,t){const i=t;if(this.configError){return i(this.configError)}if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now())){this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"reuse"},"Reusing existing access token for %s",this.options.user);return t(null,this.accessToken)}if(!this.provisionCallback&&!this.options.refreshToken&&!this.options.serviceClient){if(this.accessToken){this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"reuse"},"Reusing existing access token (no refresh capability) for %s",this.options.user);return t(null,this.accessToken)}this.logger.error({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Cannot renew access token for %s: No refresh mechanism available",this.options.user);const e=new Error("Can't create new access token for user");e.code=d.EOAUTH2;return i(e)}if(this.renewing){this.renewalQueue.push({renew:e,callback:i});return}this.renewing=true;const generateCallback=(e,t)=>{this.renewalQueue.forEach((i=>i.callback(e,t)));this.renewalQueue=[];this.renewing=false;if(e){this.logger.error({err:e,tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user)}else{this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user)}i(e,t)};if(this.provisionCallback){this.provisionCallback(this.options.user,!!e,((e,t,i)=>{if(!e&&t){this.accessToken=t;this.expires=i||0}generateCallback(e,t)}))}else{this.generateToken(generateCallback)}}updateToken(e,t){this.accessToken=e;t=Math.max(Number(t)||0,0);this.expires=t&&Date.now()+t*1e3||0;this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){const t=e;let i;let n;if(this.options.serviceClient){const e=Math.floor(Date.now()/1e3);const a={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:e,exp:e+this.options.serviceRequestTimeout};let s;try{s=this.jwtSignRS256(a)}catch(e){const i=new Error("Can't generate token. Check your auth options");i.code=d.EOAUTH2;return t(i)}i={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:s};n={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:a}}else{if(!this.options.refreshToken){const e=new Error("Can't create new access token for user");e.code=d.EOAUTH2;return t(e)}i={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"};n={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.assign(i,this.options.customParams);Object.assign(n,this.options.customParams);this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(n));this.postRequest(this.options.accessUrl,i,this.options,((i,n)=>{let a;if(i){return t(i)}try{a=JSON.parse(n.toString())}catch(e){return t(e)}if(!a||typeof a!=="object"){this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(n||"").toString());const e=new Error("Invalid authentication response");e.code=d.EOAUTH2;return t(e)}const s=Object.assign({},a);if(s.access_token){s.access_token=(s.access_token||"").toString().substr(0,6)+"..."}this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(s));if(a.error){let e=a.error;if(a.error_description){e+=": "+a.error_description}if(a.error_uri){e+=" ("+a.error_uri+")"}const i=new Error(e);i.code=d.EOAUTH2;return t(i)}if(a.access_token){this.updateToken(a.access_token,a.expires_in);return e(null,this.accessToken)}const o=new Error("No access token");o.code=d.EOAUTH2;return t(o)}))}buildXOAuth2Token(e){const t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,t,i,n){let a=false;const s=[];let o=0;const r={method:"post",headers:i.customHeaders,body:t,allowErrorResponse:true,timeout:i.requestTimeout};if(/^https:/i.test(e)){r.tls=Object.assign({rejectUnauthorized:true},i.tls||{})}const l=(0,c.default)(e,r);l.on("readable",(()=>{let e;while((e=l.read())!==null){s.push(e);o+=e.length}}));l.once("error",(e=>{if(a){return}a=true;return n(e)}));l.once("end",(()=>{if(a){return}a=true;return n(null,Buffer.concat(s,o))}))}toBase64URL(e){if(typeof e==="string"){e=Buffer.from(e)}return e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){const t=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");const i=l.default.createSign("RSA-SHA256").update(t).sign(this.options.privateKey);return t+"."+this.toBase64URL(i)}}t["default"]=XOAuth2;e.exports=t.default;Object.defineProperty(e.exports,"default",{value:t.default,enumerable:false,writable:true,configurable:true})}};var t={};function __nccwpck_require__(i){var n=t[i];if(n!==undefined){return n.exports}var a=t[i]={exports:{}};var s=true;try{e[i].call(a.exports,a,a.exports,__nccwpck_require__);s=false}finally{if(s)delete t[i]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(2356);module.exports=i})();