@limetech/lime-elements 40.6.3 → 40.7.1

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 (46) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-dock-button.cjs.entry.js +2 -4
  4. package/dist/cjs/limel-file-viewer.cjs.entry.js +476 -116
  5. package/dist/cjs/limel-markdown.cjs.entry.js +2 -2
  6. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-tab-bar.cjs.entry.js +37 -14
  8. package/dist/cjs/limel-tab-panel.cjs.entry.js +7 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{markdown-exporter-C-UW43FF.js → markdown-exporter-VtX_2D1d.js} +40 -11
  11. package/dist/cjs/{markdown-parser-ssDij8_l.js → markdown-parser-BYtTHL4W.js} +11 -3
  12. package/dist/collection/components/dock/dock-button/dock-button.css +13 -0
  13. package/dist/collection/components/dock/dock-button/dock-button.js +1 -3
  14. package/dist/collection/components/tab-bar/tab-bar.css +79 -27
  15. package/dist/collection/components/tab-bar/tab-bar.js +60 -15
  16. package/dist/collection/components/tab-panel/tab-panel.css +9 -0
  17. package/dist/collection/components/tab-panel/tab-panel.js +27 -1
  18. package/dist/esm/lime-elements.js +1 -1
  19. package/dist/esm/limel-dock-button.entry.js +2 -4
  20. package/dist/esm/limel-file-viewer.entry.js +476 -116
  21. package/dist/esm/limel-markdown.entry.js +2 -2
  22. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  23. package/dist/esm/limel-tab-bar.entry.js +37 -14
  24. package/dist/esm/limel-tab-panel.entry.js +7 -2
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/{markdown-exporter-DblYRMhY.js → markdown-exporter-tb8ft8Gq.js} +40 -11
  27. package/dist/esm/{markdown-parser-CAPDx7i8.js → markdown-parser-DFP65EFu.js} +11 -3
  28. package/dist/lime-elements/lime-elements.esm.js +1 -1
  29. package/dist/lime-elements/p-14a28a08.entry.js +1 -0
  30. package/dist/lime-elements/{p-22fd1c87.entry.js → p-21ab902a.entry.js} +1 -1
  31. package/dist/lime-elements/p-6e3a4482.entry.js +1 -0
  32. package/dist/lime-elements/p-9088acea.entry.js +1 -0
  33. package/dist/lime-elements/{p-05038bbb.entry.js → p-91a572c8.entry.js} +1 -1
  34. package/dist/lime-elements/p-Bgn2bikC.js +1 -0
  35. package/dist/lime-elements/p-C0wwdPYT.js +7 -0
  36. package/dist/lime-elements/p-aa897903.entry.js +1 -0
  37. package/dist/types/components/tab-bar/tab-bar.d.ts +17 -4
  38. package/dist/types/components/tab-panel/tab-panel.d.ts +6 -0
  39. package/dist/types/components.d.ts +48 -10
  40. package/package.json +6 -6
  41. package/dist/lime-elements/p-2e33d2a4.entry.js +0 -1
  42. package/dist/lime-elements/p-Bvyt2bmV.js +0 -1
  43. package/dist/lime-elements/p-I0PrvthC.js +0 -7
  44. package/dist/lime-elements/p-a550ba18.entry.js +0 -1
  45. package/dist/lime-elements/p-b35a912c.entry.js +0 -1
  46. package/dist/lime-elements/p-f3cae1e7.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as r,F as i,a as s}from"./p-BU9IJqli.js";import{t as o}from"./p-B3YP9GOq.js";import{d as n,u as a,r as l,a as c,v as u,b as h}from"./p-_UXAljNc.js";import{I as f}from"./p-N9vxZMhe.js";import"./p-ChagAaNf.js";import"./p-B85MJLTf.js";function p(t,e){const r=t||e;return r&&{pdf:"pdf",jpg:"image",jpeg:"image",heic:"image",bmp:"image",png:"image",gif:"image",svg:"image",svgz:"image",ep:"image",eps:"image",avi:"video",flv:"video",h264:"video",mov:"video",mp4:"video",mwv:"video",mkv:"video",mp3:"audio",wav:"audio",wma:"audio",ogg:"audio",txt:"text",json:"text",html:"text",xml:"text",eml:"email",doc:"office",docx:"office",odt:"office",dot:"office",dotx:"office",docm:"office",dotm:"office",pot:"office",ppt:"office",pptx:"office",odp:"office",potx:"office",potm:"office",pps:"office",ppsx:"office",ppsm:"office",pptm:"office",ppam:"office",pages:"office",xls:"office",xlsx:"office",xlsm:"office",xlsb:"office",ods:"office",csv:"office",numbers:"office"}[r.split(".").pop().toLowerCase()]||"unknown"}class d{constructor(t){this.requestFullscreen=()=>{this.enter&&this.enter()},this.exitFullscreen=()=>{this.exit&&this.exit.bind(window.document)()},this.toggle=()=>{const t=window.document;t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement?this.exitFullscreen():this.requestFullscreen()},this.enter=t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen,this.enter&&(this.enter=this.enter.bind(t));const e=window.document;this.exit=e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen}isSupported(){return!!this.enter}}const m=new TextEncoder,g=t=>32===t||9===t,b=new Uint8Array(256);for(let t=0;t<64;t++)b["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;function w(t){let e=t.length;for(;e>0&&"="===t.charAt(e-1);)e--;e%4==1&&e--;const r=e%4,i=3*Math.floor(e/4)+(r?r-1:0),s=new ArrayBuffer(i),o=new Uint8Array(s);let n=0;for(let r=0;r<e;r+=4){let e=b[t.charCodeAt(r)],s=b[t.charCodeAt(r+1)],a=b[t.charCodeAt(r+2)],l=b[t.charCodeAt(r+3)];o[n++]=e<<2|s>>4,n<i&&(o[n++]=(15&s)<<4|a>>2),n<i&&(o[n++]=(3&a)<<6|63&l)}return s}const v=new Map([["iso88598i","iso-8859-8"],["iso88598e","iso-8859-8"],["shiftjis","shift_jis"],["windows31j","shift_jis"],["mskanji","shift_jis"],["eucjp","euc-jp"],["iso2022jp","iso-2022-jp"],["iso2022jp1","iso-2022-jp"],["iso2022jp2","iso-2022-jp"],["junet","iso-2022-jp"],["euckr","euc-kr"],["uhc","euc-kr"],["tis620","windows-874"]]),y=new Map([["932","shift_jis"],["936","gbk"],["949","euc-kr"],["950","big5"],["874","windows-874"],["51932","euc-jp"],["50220","iso-2022-jp"],["50221","iso-2022-jp"],["50222","iso-2022-jp"]]),x=/^(?:cp|windows|ms|ibm)(\d+)$/,q=new Set(["unicode-1-1-utf-8 unicode11utf8 unicode20utf8 utf-8 utf8 x-unicode20utf8","866 cp866 csibm866 ibm866","csisolatin2 iso-8859-2 iso-ir-101 iso8859-2 iso88592 iso_8859-2 iso_8859-2:1987 l2 latin2","csisolatin3 iso-8859-3 iso-ir-109 iso8859-3 iso88593 iso_8859-3 iso_8859-3:1988 l3 latin3","csisolatin4 iso-8859-4 iso-ir-110 iso8859-4 iso88594 iso_8859-4 iso_8859-4:1988 l4 latin4","csisolatincyrillic cyrillic iso-8859-5 iso-ir-144 iso8859-5 iso88595 iso_8859-5 iso_8859-5:1988","arabic asmo-708 csiso88596e csiso88596i csisolatinarabic ecma-114 iso-8859-6 iso-8859-6-e","iso-8859-6-i iso-ir-127 iso8859-6 iso88596 iso_8859-6 iso_8859-6:1987","csisolatingreek ecma-118 elot_928 greek greek8 iso-8859-7 iso-ir-126 iso8859-7 iso88597 iso_8859-7","iso_8859-7:1987 sun_eu_greek","csiso88598e csisolatinhebrew hebrew iso-8859-8 iso-8859-8-e iso-ir-138 iso8859-8 iso88598 iso_8859-8","iso_8859-8:1988 visual","csiso88598i iso-8859-8-i logical","csisolatin6 iso-8859-10 iso-ir-157 iso8859-10 iso885910 l6 latin6","iso-8859-13 iso8859-13 iso885913","iso-8859-14 iso8859-14 iso885914","csisolatin9 iso-8859-15 iso8859-15 iso885915 iso_8859-15 l9","iso-8859-16","cskoi8r koi koi8 koi8-r koi8_r","koi8-ru koi8-u","csmacintosh mac macintosh x-mac-roman","dos-874 iso-8859-11 iso8859-11 iso885911 tis-620 windows-874","cp1250 windows-1250 x-cp1250","cp1251 windows-1251 x-cp1251","ansi_x3.4-1968 ascii cp1252 cp819 csisolatin1 ibm819 iso-8859-1 iso-ir-100 iso8859-1 iso88591","iso_8859-1 iso_8859-1:1987 l1 latin1 us-ascii windows-1252 x-cp1252","cp1253 windows-1253 x-cp1253","cp1254 csisolatin5 iso-8859-9 iso-ir-148 iso8859-9 iso88599 iso_8859-9 iso_8859-9:1989 l5 latin5","windows-1254 x-cp1254","cp1255 windows-1255 x-cp1255","cp1256 windows-1256 x-cp1256","cp1257 windows-1257 x-cp1257","cp1258 windows-1258 x-cp1258","x-mac-cyrillic x-mac-ukrainian","chinese csgb2312 csiso58gb231280 gb2312 gb_2312 gb_2312-80 gbk iso-ir-58 x-gbk","gb18030","big5 big5-hkscs cn-big5 csbig5 x-x-big5","cseucpkdfmtjapanese euc-jp x-euc-jp","csiso2022jp iso-2022-jp","csshiftjis ms932 ms_kanji shift-jis shift_jis sjis windows-31j x-sjis","cseuckr csksc56011987 euc-kr iso-ir-149 korean ks_c_5601-1987 ks_c_5601-1989 ksc5601 ksc_5601","windows-949","csiso2022kr hz-gb-2312 iso-2022-cn iso-2022-cn-ext iso-2022-kr replacement","unicodefffe utf-16be","csunicode iso-10646-ucs-2 ucs-2 unicode unicodefeff utf-16 utf-16le","x-user-defined"].join(" ").split(" ")),k=new Map;function E(t){if(!q.has(t))return null;let e=k.get(t);if(void 0===e){e=null;try{e=new TextDecoder(t)}catch{}k.set(t,e)}return e}const A=new TextDecoder;function D(t){const e=E(t=(t||"utf8").trim().toLowerCase());if(e)return e;const r=function(t){return t.replace(/^(?:x-ms-|x-|cs)/,"").replace(/[\s._-]+/g,"")}(t),i=r.match(x);return E(i&&y.get(i[1])||v.get(r)||r)}function S(t){return D(t)||E("windows-1252")||A}function L(t,e=A){const r=t instanceof Uint8Array?t:new Uint8Array(t);return function(t){for(let e=0;e<t.length;){const r=t[e];if(r<128){e++;continue}let i;if(r>=194&&r<=223)i=1;else if(r>=224&&r<=239)i=2;else{if(!(r>=240&&r<=244))return!1;i=3}if(e+i>=t.length)return!1;const s=t[e+1];if(s<(224===r?160:240===r?144:128)||s>(237===r?159:244===r?143:191))return!1;for(let r=2;r<=i;r++)if(128!=(192&t[e+r]))return!1;e+=i+1}return!0}(r)?e.decode(r):S("windows-1252").decode(r)}function T(t,e){const r=D(e);return r?r.decode(t):L(t)}const j=/charset\s*=\s*["']?\s*([^\s"';>]+)/,R=new Set(["utf-16le","utf-16be"]);async function N(t){if("arrayBuffer"in t)return await t.arrayBuffer();const e=new FileReader;return new Promise(((r,i)=>{e.onload=()=>{r(e.result)},e.onerror=()=>{i(e.error)},e.readAsArrayBuffer(t)}))}function U(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-97+10:t>=65&&t<=70?t-65+10:-1}function B(t){return t.replace(/[\r\n]+/g," ")}function C(t,e,r){let i,s=t.indexOf("*");if(s>=0&&(t=t.slice(0,s)),"Q"===(e=e.toUpperCase())){r=r.replace(/=\s+([0-9a-fA-F])/g,"=$1").replace(/[_\s]/g," ");let t=m.encode(r),e=[];for(let r=0,i=t.length;r<i;r++){let s=t[r];if(r<=i-2&&61===s){let i=U(t[r+1]),s=U(t[r+2]);if(i>=0&&s>=0){e.push(i<<4|s),r+=2;continue}}e.push(s)}i=new ArrayBuffer(e.length);let s=new DataView(i);for(let t=0,r=e.length;t<r;t++)s.setUint8(t,e[t])}else i="B"===e?w(r.replace(/[^a-zA-Z0-9\+\/=]+/g,"")):m.encode(r);return B(T(i,t))}const $="=\\?([^?\\s]+)\\?([QqBb])\\?([^?]*)\\?=",V=new RegExp($,"g"),I=/^[ \t\r\n]+$/,z=new RegExp(`^(?:${$}\\s*)+$`);function O(t,e){const r=t.encoding.toUpperCase();return t.charset===e.charset&&r===e.encoding.toUpperCase()&&("B"!==r||t.encodedText.length%4==0&&!/=$/.test(t.encodedText))}function _(t,e){let r="",i=null;for(let s=0;s<t.length;s++){const o=t[s];if(void 0===o.text)i&&e&&O(i,o)?i.encodedText+=o.encodedText:(i&&(r+=C(i.charset,i.encoding,i.encodedText)),i={charset:o.charset,encoding:o.encoding,encodedText:o.encodedText});else{const e=t[s+1];if(i&&e&&void 0===e.text&&I.test(o.text))continue;i&&(r+=C(i.charset,i.encoding,i.encodedText),i=null),r+=o.text}}return i&&(r+=C(i.charset,i.encoding,i.encodedText)),r}function G(t){const e=function(t){const e=[];V.lastIndex=0;let r,i=0;for(;r=V.exec(t);)r.index>i&&e.push({text:t.substring(i,r.index)}),e.push({charset:r[1],encoding:r[2],encodedText:r[3]}),i=r.index+r[0].length;return i<t.length&&e.push({text:t.substring(i)}),e}((t||"").toString()),r=_(e,!0);return r.indexOf("�")<0?r:_(e,!1)}function M(t,e){e=e||"utf-8";let r=[];for(let e=0;e<t.length;e++){let i=t.charAt(e);const s="%"===i?U(t.charCodeAt(e+1)):-1,o=s>=0?U(t.charCodeAt(e+2)):-1;if(o>=0)r.push(s<<4|o),e+=2;else if(i.charCodeAt(0)>126){const t=m.encode(i);for(let e=0;e<t.length;e++)r.push(t[e])}else r.push(i.charCodeAt(0))}const i=new ArrayBuffer(r.length),s=new DataView(i);for(let t=0,e=r.length;t<e;t++)s.setUint8(t,r[t]);return T(i,e)}class H{constructor(){this.chunks=[],this.runBuffer=null,this.runStart=0,this.runEnd=0,this.pendingLineBreak=null}continuesRun(t){return t.buffer===this.runBuffer&&t.byteOffset===this.runEnd}flushRun(){this.runBuffer&&this.runEnd>this.runStart&&this.chunks.push(new Uint8Array(this.runBuffer,this.runStart,this.runEnd-this.runStart)),this.runBuffer=null}update(t,e){const r=this.pendingLineBreak;r&&this.continuesRun(r)&&t.buffer===this.runBuffer&&t.byteOffset===this.runEnd+r.byteLength||(this.flushRun(),r&&this.chunks.push(r),this.runBuffer=t.buffer,this.runStart=t.byteOffset),this.runEnd=t.byteOffset+t.byteLength,this.pendingLineBreak=e}finalize(t=!1){const e=this.pendingLineBreak;return!t&&e&&(this.continuesRun(e)?this.runEnd+=e.byteLength:(this.flushRun(),this.chunks.push(e))),this.flushRun(),N(new Blob(this.chunks,{type:"application/octet-stream"}))}}class P{constructor(t){this.decoder=(t=t||{}).decoder||new TextDecoder,this.maxChunkSize=102400,this.chunks=[],this.remainder=""}pushChunk(t){t.length&&this.chunks.push(w(t))}flushRemainder(){this.pushChunk(this.remainder),this.remainder=""}update(t){const e=this.decoder.decode(t).replace(/[^a-zA-Z0-9+/=]+/g,"").split(/=+/);for(let t=0;t<e.length;t++)this.remainder+=e[t],t<e.length-1&&this.flushRemainder();if(this.remainder.length>=this.maxChunkSize){const t=4*Math.floor(this.remainder.length/4);this.pushChunk(this.remainder.substring(0,t)),this.remainder=this.remainder.substring(t)}}finalize(){return this.flushRemainder(),N(new Blob(this.chunks,{type:"application/octet-stream"}))}}class F{constructor(){this.maxChunkSize=102400,this.buffer=new Uint8Array(this.maxChunkSize),this.bufferPos=0,this.chunks=[],this.pendingLineBreak=null}writeLineBreak(){this.pendingLineBreak&&this.writeBytes(this.pendingLineBreak,0,this.pendingLineBreak.length)}writeByte(t){this.bufferPos>=this.buffer.length&&this.flushBuffer(),this.buffer[this.bufferPos++]=t}writeBytes(t,e,r){for(;e<r;){this.bufferPos>=this.buffer.length&&this.flushBuffer();const i=Math.min(r-e,this.buffer.length-this.bufferPos);this.buffer.set(t.subarray(e,e+i),this.bufferPos),this.bufferPos+=i,e+=i}}flushBuffer(){this.bufferPos&&(this.chunks.push(this.buffer.slice(0,this.bufferPos)),this.bufferPos=0)}update(t,e){this.writeLineBreak();let r=t.length;for(;r>0&&g(t[r-1]);)r--;const i=r>0&&61===t[r-1];i&&r--;let s=0;for(let e=0;e<r;e++){if(61!==t[e]||e+2>=r)continue;const i=U(t[e+1]),o=U(t[e+2]);i<0||o<0||(this.writeBytes(t,s,e),this.writeByte(i<<4|o),e+=2,s=e+1)}this.writeBytes(t,s,r),this.pendingLineBreak=i?null:e}finalize(t=!1){return t||this.writeLineBreak(),this.flushBuffer(),N(new Blob(this.chunks,{type:"application/octet-stream"}))}}const J=new TextDecoder("utf-8",{ignoreBOM:!0}),Y=t=>{let e=0,r=t.length;for(;e<r&&g(t.charCodeAt(e));)e++;for(;r>e&&g(t.charCodeAt(r-1));)r--;return t.slice(e,r)},Z=/^[!-9;-~]+[ \t]*:/,Q=new Set(["content-type","content-transfer-encoding","content-disposition","content-id","content-description"]);class K{constructor(t){if(this.options=t,this.postalMime=t.postalMime,this.postalMime.partCount++,this.postalMime.partCount>t.maxPartCount)throw new Error(`Maximum MIME part count of ${t.maxPartCount} parts exceeded`);if(this.childNodes=[],this.finalizedChildCount=0,t.parentNode){if(this.parentNode=t.parentNode,this.depth=this.parentNode.depth+1,this.depth>t.maxNestingDepth)throw new Error(`Maximum MIME nesting depth of ${t.maxNestingDepth} levels exceeded`);t.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.lastLineBlank=!1;const e="digest"===(t.parentMultipartType||null)?"message/rfc822":"text/plain";this.contentType={value:e,parsed:{value:e,params:{}},multipart:!1},this.contentTransferEncoding={value:"8bit",encoding:""},this.contentDisposition={value:"",parsed:{value:"",params:{}}},this.headers=[],this.rawHeaderLines=[],this.contentDecoder=null,this.content=null}setupContentDecoder(t){this.contentDecoder=/base64/i.test(t)?new P:/quoted-printable/i.test(t)?new F:new H}async finalize(t=!1){if("finished"===this.state)return;"header"===this.state&&this.endHeaders();let e=this.postalMime.boundaries;for(let t=e.length-1;t>=0;t--)if(e[t].node===this){e.splice(t,1);break}await this.finalizeChildNodes(t),this.content=this.contentDecoder?await this.contentDecoder.finalize(t):null,this.contentDecoder=null,this.state="finished"}async finalizeChildNodes(t=!1){for(;this.finalizedChildCount<this.childNodes.length;)await this.childNodes[this.finalizedChildCount++].finalize(t)}stripComments(t){let e="",r=0,i=!1,s=!1,o=-1,n=!1,a=!1;const l=t=>{e+=t,a=" "===t||"\t"===t};for(let c=0;c<t.length;c++){const u=t.charAt(c);if(i)0===r&&l(u),i=!1;else if("\\"!==u)if('"'!==u||0!==r){if(!s){if("("===u&&(!n||!e.length||a)){0===r&&(o=c),r++;continue}if(")"===u&&r>0){r--;continue}0===r&&("="===u?n=!0:";"===u&&(n=!1))}0===r&&l(u)}else s=!s,l(u);else i=!0,0===r&&l(u)}return 0===r||t.indexOf(";",o)<0?e:t}parseStructuredHeader(t){t=this.stripComments(t);let e,r={value:"",params:{}},i=!1,s="",o="value",n="",a=!1,l=!1,c=!1;const u=()=>{s.length&&(s+=n),n=""},h=t=>{u(),s+=t},f=()=>{const t=s;return s="",n="",a=!1,t},p=(t,e)=>{t&&!Object.prototype.hasOwnProperty.call(r.params,t)&&(r.params[t]=e)},d=()=>{const t=f();!1===i?r.value=t:p(i,t)},m=()=>{p(f().trim().toLowerCase(),"")};for(let r=0,p=t.length;r<p;r++)switch(e=t.charAt(r),o){case"key":if("="===e){i=f().trim().toLowerCase(),o="value";break}if(";"===e){m();break}s+=e;break;case"value":if(a&&";"!==e){c=!1;break}if(c)h(e);else{if(l&&"\\"===e){c=!0;continue}l&&e===l?(l=!1,a=!0):l||'"'!==e?l||";"!==e?l||" "!==e&&"\t"!==e?h(e):n+=e:(d(),o="key"):(l=e,u())}c=!1}return"value"===o?d():m(),r.value&&(r.value=r.value.toLowerCase()),function(t){let e=new Map;Object.keys(t.params).forEach((r=>{let i=r.match(/\*((\d+)\*?)?$/);if(!i)return;let s=r.slice(0,i.index).toLowerCase(),o=Number(i[2])||0,n=e.get(s);n||(n={charset:null,values:[]},e.set(s,n));let a=t.params[r],l="*"===i[0].charAt(i[0].length-1);0===o&&l&&(i=a.match(/^([^']*)'[^']*'(.*)$/))&&(n.charset=i[1]||"utf-8",a=i[2]),n.values.push({nr:o,value:a,encoded:l}),delete t.params[r]})),e.forEach(((e,r)=>{if(Object.prototype.hasOwnProperty.call(t.params,r))return;let i="",s="";for(let t of e.values.sort(((t,e)=>t.nr-e.nr)))t.encoded?s+=t.value:(s&&(i+=M(s,e.charset),s=""),i+=t.value);s&&(i+=M(s,e.charset)),t.params[r]=i}))}(r),r}decodeFlowedText(t,e){const r=[];let i=!1,s=0;const o=t.split("\n");for(let t=0;t<o.length;t++){const n=o[t];let a=0;for(;62===n.charCodeAt(a);)a++;const l=32===n.charCodeAt(a)?a+1:a,c=n.slice(l),u="-- "===c;i&&a===s&&!u?(e&&(r[r.length-1]=r[r.length-1].slice(0,-1)),r.push(c)):(t&&r.push("\n"),r.push(a?n:c)),i=!u&&c.endsWith(" "),s=a}return r.join("")}getTextContent(){if(!this.content)return"";let t=function(t,e,r){const i=new Uint8Array(t);if(e)return T(i,e);const s=r?function(t){const e=A.decode(t.subarray(0,1024)).toLowerCase();let r=0;for(;(r=e.indexOf("<meta",r))>=0;){let t=e.indexOf(">",r);t<0&&(t=e.length);const i=j.exec(e.slice(r,t));if(i)return i[1];r=t}return null}(i):null,o=s?D(s):null;return!o||R.has(o.encoding)?L(i):("x-user-defined"===o.encoding?S("windows-1252"):o).decode(i)}(this.content,this.contentType.parsed.params.charset,"text/html"===this.contentType.parsed.value).replace(/\r\n/g,"\n");return/^flowed$/i.test(this.contentType.parsed.params.format)&&(t=this.decodeFlowedText(t,/^yes$/i.test(this.contentType.parsed.params.delsp))),t}processHeaders(){let t=[];for(let e of this.headerLines)t.length&&/^[ \t]/.test(e)?t[t.length-1].push(e):t.push([e]);let e=new Set;for(let r of t){let t=r.join("\n"),i=t.indexOf(":"),s=Y(i<0?t:t.slice(0,i));this.rawHeaderLines.push({key:s.toLowerCase(),line:t});let o=r.join("");i=o.indexOf(":");let n=Y(i<0?o:o.slice(0,i)),a=i<0?"":Y(B(o.slice(i+1)));this.headers.push({key:n.toLowerCase(),originalKey:n,value:a});const l=n.toLowerCase();if(Q.has(l)&&!e.has(l))switch(e.add(l),l){case"content-type":this.contentType.value=a;break;case"content-transfer-encoding":this.contentTransferEncoding.value=a;break;case"content-disposition":this.contentDisposition.value=a;break;case"content-id":this.contentId=a;break;case"content-description":this.contentDescription=a}}this.contentType.parsed=this.parseStructuredHeader(this.contentType.value),this.contentType.multipart=!!/^multipart\//i.test(this.contentType.parsed.value)&&this.contentType.parsed.value.slice(this.contentType.parsed.value.indexOf("/")+1),this.contentType.multipart&&!this.contentType.parsed.params.boundary&&(this.contentType.parsed.value="text/plain",this.contentType.multipart=!1),this.contentType.multipart&&this.postalMime.boundaries.push({value:m.encode(this.contentType.parsed.params.boundary),node:this}),this.contentDisposition.parsed=this.parseStructuredHeader(this.contentDisposition.value),this.contentTransferEncoding.encoding=(this.stripComments(this.contentTransferEncoding.value).toLowerCase().match(/[\w-]+/)||[""])[0],this.setupContentDecoder(this.contentTransferEncoding.encoding)}endHeaders(){this.state="body",this.processHeaders()}feed(t,e){switch(this.state){case"header":{if(!t.length)return this.endHeaders(),!1;if(this.postalMime.headerSize+=t.length,this.postalMime.headerSize>this.options.maxHeadersSize)throw new Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);const e=L(t,J);if(this.lastLineBlank&&!g(t[0])&&!Z.test(e))return this.headerLines.pop(),this.endHeaders(),!0;this.headerLines.push(e),this.lastLineBlank=(t=>t.every(g))(t);break}case"body":this.contentDecoder&&this.contentDecoder.update(t,e)}return!1}}const W={"&AElig":"Æ","&AElig;":"Æ","&AMP":"&","&AMP;":"&","&Aacute":"Á","&Aacute;":"Á","&Abreve;":"Ă","&Acirc":"Â","&Acirc;":"Â","&Acy;":"А","&Afr;":"𝔄","&Agrave":"À","&Agrave;":"À","&Alpha;":"Α","&Amacr;":"Ā","&And;":"⩓","&Aogon;":"Ą","&Aopf;":"𝔸","&ApplyFunction;":"⁡","&Aring":"Å","&Aring;":"Å","&Ascr;":"𝒜","&Assign;":"≔","&Atilde":"Ã","&Atilde;":"Ã","&Auml":"Ä","&Auml;":"Ä","&Backslash;":"∖","&Barv;":"⫧","&Barwed;":"⌆","&Bcy;":"Б","&Because;":"∵","&Bernoullis;":"ℬ","&Beta;":"Β","&Bfr;":"𝔅","&Bopf;":"𝔹","&Breve;":"˘","&Bscr;":"ℬ","&Bumpeq;":"≎","&CHcy;":"Ч","&COPY":"©","&COPY;":"©","&Cacute;":"Ć","&Cap;":"⋒","&CapitalDifferentialD;":"ⅅ","&Cayleys;":"ℭ","&Ccaron;":"Č","&Ccedil":"Ç","&Ccedil;":"Ç","&Ccirc;":"Ĉ","&Cconint;":"∰","&Cdot;":"Ċ","&Cedilla;":"¸","&CenterDot;":"·","&Cfr;":"ℭ","&Chi;":"Χ","&CircleDot;":"⊙","&CircleMinus;":"⊖","&CirclePlus;":"⊕","&CircleTimes;":"⊗","&ClockwiseContourIntegral;":"∲","&CloseCurlyDoubleQuote;":"”","&CloseCurlyQuote;":"’","&Colon;":"∷","&Colone;":"⩴","&Congruent;":"≡","&Conint;":"∯","&ContourIntegral;":"∮","&Copf;":"ℂ","&Coproduct;":"∐","&CounterClockwiseContourIntegral;":"∳","&Cross;":"⨯","&Cscr;":"𝒞","&Cup;":"⋓","&CupCap;":"≍","&DD;":"ⅅ","&DDotrahd;":"⤑","&DJcy;":"Ђ","&DScy;":"Ѕ","&DZcy;":"Џ","&Dagger;":"‡","&Darr;":"↡","&Dashv;":"⫤","&Dcaron;":"Ď","&Dcy;":"Д","&Del;":"∇","&Delta;":"Δ","&Dfr;":"𝔇","&DiacriticalAcute;":"´","&DiacriticalDot;":"˙","&DiacriticalDoubleAcute;":"˝","&DiacriticalGrave;":"`","&DiacriticalTilde;":"˜","&Diamond;":"⋄","&DifferentialD;":"ⅆ","&Dopf;":"𝔻","&Dot;":"¨","&DotDot;":"⃜","&DotEqual;":"≐","&DoubleContourIntegral;":"∯","&DoubleDot;":"¨","&DoubleDownArrow;":"⇓","&DoubleLeftArrow;":"⇐","&DoubleLeftRightArrow;":"⇔","&DoubleLeftTee;":"⫤","&DoubleLongLeftArrow;":"⟸","&DoubleLongLeftRightArrow;":"⟺","&DoubleLongRightArrow;":"⟹","&DoubleRightArrow;":"⇒","&DoubleRightTee;":"⊨","&DoubleUpArrow;":"⇑","&DoubleUpDownArrow;":"⇕","&DoubleVerticalBar;":"∥","&DownArrow;":"↓","&DownArrowBar;":"⤓","&DownArrowUpArrow;":"⇵","&DownBreve;":"̑","&DownLeftRightVector;":"⥐","&DownLeftTeeVector;":"⥞","&DownLeftVector;":"↽","&DownLeftVectorBar;":"⥖","&DownRightTeeVector;":"⥟","&DownRightVector;":"⇁","&DownRightVectorBar;":"⥗","&DownTee;":"⊤","&DownTeeArrow;":"↧","&Downarrow;":"⇓","&Dscr;":"𝒟","&Dstrok;":"Đ","&ENG;":"Ŋ","&ETH":"Ð","&ETH;":"Ð","&Eacute":"É","&Eacute;":"É","&Ecaron;":"Ě","&Ecirc":"Ê","&Ecirc;":"Ê","&Ecy;":"Э","&Edot;":"Ė","&Efr;":"𝔈","&Egrave":"È","&Egrave;":"È","&Element;":"∈","&Emacr;":"Ē","&EmptySmallSquare;":"◻","&EmptyVerySmallSquare;":"▫","&Eogon;":"Ę","&Eopf;":"𝔼","&Epsilon;":"Ε","&Equal;":"⩵","&EqualTilde;":"≂","&Equilibrium;":"⇌","&Escr;":"ℰ","&Esim;":"⩳","&Eta;":"Η","&Euml":"Ë","&Euml;":"Ë","&Exists;":"∃","&ExponentialE;":"ⅇ","&Fcy;":"Ф","&Ffr;":"𝔉","&FilledSmallSquare;":"◼","&FilledVerySmallSquare;":"▪","&Fopf;":"𝔽","&ForAll;":"∀","&Fouriertrf;":"ℱ","&Fscr;":"ℱ","&GJcy;":"Ѓ","&GT":">","&GT;":">","&Gamma;":"Γ","&Gammad;":"Ϝ","&Gbreve;":"Ğ","&Gcedil;":"Ģ","&Gcirc;":"Ĝ","&Gcy;":"Г","&Gdot;":"Ġ","&Gfr;":"𝔊","&Gg;":"⋙","&Gopf;":"𝔾","&GreaterEqual;":"≥","&GreaterEqualLess;":"⋛","&GreaterFullEqual;":"≧","&GreaterGreater;":"⪢","&GreaterLess;":"≷","&GreaterSlantEqual;":"⩾","&GreaterTilde;":"≳","&Gscr;":"𝒢","&Gt;":"≫","&HARDcy;":"Ъ","&Hacek;":"ˇ","&Hat;":"^","&Hcirc;":"Ĥ","&Hfr;":"ℌ","&HilbertSpace;":"ℋ","&Hopf;":"ℍ","&HorizontalLine;":"─","&Hscr;":"ℋ","&Hstrok;":"Ħ","&HumpDownHump;":"≎","&HumpEqual;":"≏","&IEcy;":"Е","&IJlig;":"IJ","&IOcy;":"Ё","&Iacute":"Í","&Iacute;":"Í","&Icirc":"Î","&Icirc;":"Î","&Icy;":"И","&Idot;":"İ","&Ifr;":"ℑ","&Igrave":"Ì","&Igrave;":"Ì","&Im;":"ℑ","&Imacr;":"Ī","&ImaginaryI;":"ⅈ","&Implies;":"⇒","&Int;":"∬","&Integral;":"∫","&Intersection;":"⋂","&InvisibleComma;":"⁣","&InvisibleTimes;":"⁢","&Iogon;":"Į","&Iopf;":"𝕀","&Iota;":"Ι","&Iscr;":"ℐ","&Itilde;":"Ĩ","&Iukcy;":"І","&Iuml":"Ï","&Iuml;":"Ï","&Jcirc;":"Ĵ","&Jcy;":"Й","&Jfr;":"𝔍","&Jopf;":"𝕁","&Jscr;":"𝒥","&Jsercy;":"Ј","&Jukcy;":"Є","&KHcy;":"Х","&KJcy;":"Ќ","&Kappa;":"Κ","&Kcedil;":"Ķ","&Kcy;":"К","&Kfr;":"𝔎","&Kopf;":"𝕂","&Kscr;":"𝒦","&LJcy;":"Љ","&LT":"<","&LT;":"<","&Lacute;":"Ĺ","&Lambda;":"Λ","&Lang;":"⟪","&Laplacetrf;":"ℒ","&Larr;":"↞","&Lcaron;":"Ľ","&Lcedil;":"Ļ","&Lcy;":"Л","&LeftAngleBracket;":"⟨","&LeftArrow;":"←","&LeftArrowBar;":"⇤","&LeftArrowRightArrow;":"⇆","&LeftCeiling;":"⌈","&LeftDoubleBracket;":"⟦","&LeftDownTeeVector;":"⥡","&LeftDownVector;":"⇃","&LeftDownVectorBar;":"⥙","&LeftFloor;":"⌊","&LeftRightArrow;":"↔","&LeftRightVector;":"⥎","&LeftTee;":"⊣","&LeftTeeArrow;":"↤","&LeftTeeVector;":"⥚","&LeftTriangle;":"⊲","&LeftTriangleBar;":"⧏","&LeftTriangleEqual;":"⊴","&LeftUpDownVector;":"⥑","&LeftUpTeeVector;":"⥠","&LeftUpVector;":"↿","&LeftUpVectorBar;":"⥘","&LeftVector;":"↼","&LeftVectorBar;":"⥒","&Leftarrow;":"⇐","&Leftrightarrow;":"⇔","&LessEqualGreater;":"⋚","&LessFullEqual;":"≦","&LessGreater;":"≶","&LessLess;":"⪡","&LessSlantEqual;":"⩽","&LessTilde;":"≲","&Lfr;":"𝔏","&Ll;":"⋘","&Lleftarrow;":"⇚","&Lmidot;":"Ŀ","&LongLeftArrow;":"⟵","&LongLeftRightArrow;":"⟷","&LongRightArrow;":"⟶","&Longleftarrow;":"⟸","&Longleftrightarrow;":"⟺","&Longrightarrow;":"⟹","&Lopf;":"𝕃","&LowerLeftArrow;":"↙","&LowerRightArrow;":"↘","&Lscr;":"ℒ","&Lsh;":"↰","&Lstrok;":"Ł","&Lt;":"≪","&Map;":"⤅","&Mcy;":"М","&MediumSpace;":" ","&Mellintrf;":"ℳ","&Mfr;":"𝔐","&MinusPlus;":"∓","&Mopf;":"𝕄","&Mscr;":"ℳ","&Mu;":"Μ","&NJcy;":"Њ","&Nacute;":"Ń","&Ncaron;":"Ň","&Ncedil;":"Ņ","&Ncy;":"Н","&NegativeMediumSpace;":"​","&NegativeThickSpace;":"​","&NegativeThinSpace;":"​","&NegativeVeryThinSpace;":"​","&NestedGreaterGreater;":"≫","&NestedLessLess;":"≪","&NewLine;":"\n","&Nfr;":"𝔑","&NoBreak;":"⁠","&NonBreakingSpace;":" ","&Nopf;":"ℕ","&Not;":"⫬","&NotCongruent;":"≢","&NotCupCap;":"≭","&NotDoubleVerticalBar;":"∦","&NotElement;":"∉","&NotEqual;":"≠","&NotEqualTilde;":"≂̸","&NotExists;":"∄","&NotGreater;":"≯","&NotGreaterEqual;":"≱","&NotGreaterFullEqual;":"≧̸","&NotGreaterGreater;":"≫̸","&NotGreaterLess;":"≹","&NotGreaterSlantEqual;":"⩾̸","&NotGreaterTilde;":"≵","&NotHumpDownHump;":"≎̸","&NotHumpEqual;":"≏̸","&NotLeftTriangle;":"⋪","&NotLeftTriangleBar;":"⧏̸","&NotLeftTriangleEqual;":"⋬","&NotLess;":"≮","&NotLessEqual;":"≰","&NotLessGreater;":"≸","&NotLessLess;":"≪̸","&NotLessSlantEqual;":"⩽̸","&NotLessTilde;":"≴","&NotNestedGreaterGreater;":"⪢̸","&NotNestedLessLess;":"⪡̸","&NotPrecedes;":"⊀","&NotPrecedesEqual;":"⪯̸","&NotPrecedesSlantEqual;":"⋠","&NotReverseElement;":"∌","&NotRightTriangle;":"⋫","&NotRightTriangleBar;":"⧐̸","&NotRightTriangleEqual;":"⋭","&NotSquareSubset;":"⊏̸","&NotSquareSubsetEqual;":"⋢","&NotSquareSuperset;":"⊐̸","&NotSquareSupersetEqual;":"⋣","&NotSubset;":"⊂⃒","&NotSubsetEqual;":"⊈","&NotSucceeds;":"⊁","&NotSucceedsEqual;":"⪰̸","&NotSucceedsSlantEqual;":"⋡","&NotSucceedsTilde;":"≿̸","&NotSuperset;":"⊃⃒","&NotSupersetEqual;":"⊉","&NotTilde;":"≁","&NotTildeEqual;":"≄","&NotTildeFullEqual;":"≇","&NotTildeTilde;":"≉","&NotVerticalBar;":"∤","&Nscr;":"𝒩","&Ntilde":"Ñ","&Ntilde;":"Ñ","&Nu;":"Ν","&OElig;":"Œ","&Oacute":"Ó","&Oacute;":"Ó","&Ocirc":"Ô","&Ocirc;":"Ô","&Ocy;":"О","&Odblac;":"Ő","&Ofr;":"𝔒","&Ograve":"Ò","&Ograve;":"Ò","&Omacr;":"Ō","&Omega;":"Ω","&Omicron;":"Ο","&Oopf;":"𝕆","&OpenCurlyDoubleQuote;":"“","&OpenCurlyQuote;":"‘","&Or;":"⩔","&Oscr;":"𝒪","&Oslash":"Ø","&Oslash;":"Ø","&Otilde":"Õ","&Otilde;":"Õ","&Otimes;":"⨷","&Ouml":"Ö","&Ouml;":"Ö","&OverBar;":"‾","&OverBrace;":"⏞","&OverBracket;":"⎴","&OverParenthesis;":"⏜","&PartialD;":"∂","&Pcy;":"П","&Pfr;":"𝔓","&Phi;":"Φ","&Pi;":"Π","&PlusMinus;":"±","&Poincareplane;":"ℌ","&Popf;":"ℙ","&Pr;":"⪻","&Precedes;":"≺","&PrecedesEqual;":"⪯","&PrecedesSlantEqual;":"≼","&PrecedesTilde;":"≾","&Prime;":"″","&Product;":"∏","&Proportion;":"∷","&Proportional;":"∝","&Pscr;":"𝒫","&Psi;":"Ψ","&QUOT":'"',"&QUOT;":'"',"&Qfr;":"𝔔","&Qopf;":"ℚ","&Qscr;":"𝒬","&RBarr;":"⤐","&REG":"®","&REG;":"®","&Racute;":"Ŕ","&Rang;":"⟫","&Rarr;":"↠","&Rarrtl;":"⤖","&Rcaron;":"Ř","&Rcedil;":"Ŗ","&Rcy;":"Р","&Re;":"ℜ","&ReverseElement;":"∋","&ReverseEquilibrium;":"⇋","&ReverseUpEquilibrium;":"⥯","&Rfr;":"ℜ","&Rho;":"Ρ","&RightAngleBracket;":"⟩","&RightArrow;":"→","&RightArrowBar;":"⇥","&RightArrowLeftArrow;":"⇄","&RightCeiling;":"⌉","&RightDoubleBracket;":"⟧","&RightDownTeeVector;":"⥝","&RightDownVector;":"⇂","&RightDownVectorBar;":"⥕","&RightFloor;":"⌋","&RightTee;":"⊢","&RightTeeArrow;":"↦","&RightTeeVector;":"⥛","&RightTriangle;":"⊳","&RightTriangleBar;":"⧐","&RightTriangleEqual;":"⊵","&RightUpDownVector;":"⥏","&RightUpTeeVector;":"⥜","&RightUpVector;":"↾","&RightUpVectorBar;":"⥔","&RightVector;":"⇀","&RightVectorBar;":"⥓","&Rightarrow;":"⇒","&Ropf;":"ℝ","&RoundImplies;":"⥰","&Rrightarrow;":"⇛","&Rscr;":"ℛ","&Rsh;":"↱","&RuleDelayed;":"⧴","&SHCHcy;":"Щ","&SHcy;":"Ш","&SOFTcy;":"Ь","&Sacute;":"Ś","&Sc;":"⪼","&Scaron;":"Š","&Scedil;":"Ş","&Scirc;":"Ŝ","&Scy;":"С","&Sfr;":"𝔖","&ShortDownArrow;":"↓","&ShortLeftArrow;":"←","&ShortRightArrow;":"→","&ShortUpArrow;":"↑","&Sigma;":"Σ","&SmallCircle;":"∘","&Sopf;":"𝕊","&Sqrt;":"√","&Square;":"□","&SquareIntersection;":"⊓","&SquareSubset;":"⊏","&SquareSubsetEqual;":"⊑","&SquareSuperset;":"⊐","&SquareSupersetEqual;":"⊒","&SquareUnion;":"⊔","&Sscr;":"𝒮","&Star;":"⋆","&Sub;":"⋐","&Subset;":"⋐","&SubsetEqual;":"⊆","&Succeeds;":"≻","&SucceedsEqual;":"⪰","&SucceedsSlantEqual;":"≽","&SucceedsTilde;":"≿","&SuchThat;":"∋","&Sum;":"∑","&Sup;":"⋑","&Superset;":"⊃","&SupersetEqual;":"⊇","&Supset;":"⋑","&THORN":"Þ","&THORN;":"Þ","&TRADE;":"™","&TSHcy;":"Ћ","&TScy;":"Ц","&Tab;":"\t","&Tau;":"Τ","&Tcaron;":"Ť","&Tcedil;":"Ţ","&Tcy;":"Т","&Tfr;":"𝔗","&Therefore;":"∴","&Theta;":"Θ","&ThickSpace;":"  ","&ThinSpace;":" ","&Tilde;":"∼","&TildeEqual;":"≃","&TildeFullEqual;":"≅","&TildeTilde;":"≈","&Topf;":"𝕋","&TripleDot;":"⃛","&Tscr;":"𝒯","&Tstrok;":"Ŧ","&Uacute":"Ú","&Uacute;":"Ú","&Uarr;":"↟","&Uarrocir;":"⥉","&Ubrcy;":"Ў","&Ubreve;":"Ŭ","&Ucirc":"Û","&Ucirc;":"Û","&Ucy;":"У","&Udblac;":"Ű","&Ufr;":"𝔘","&Ugrave":"Ù","&Ugrave;":"Ù","&Umacr;":"Ū","&UnderBar;":"_","&UnderBrace;":"⏟","&UnderBracket;":"⎵","&UnderParenthesis;":"⏝","&Union;":"⋃","&UnionPlus;":"⊎","&Uogon;":"Ų","&Uopf;":"𝕌","&UpArrow;":"↑","&UpArrowBar;":"⤒","&UpArrowDownArrow;":"⇅","&UpDownArrow;":"↕","&UpEquilibrium;":"⥮","&UpTee;":"⊥","&UpTeeArrow;":"↥","&Uparrow;":"⇑","&Updownarrow;":"⇕","&UpperLeftArrow;":"↖","&UpperRightArrow;":"↗","&Upsi;":"ϒ","&Upsilon;":"Υ","&Uring;":"Ů","&Uscr;":"𝒰","&Utilde;":"Ũ","&Uuml":"Ü","&Uuml;":"Ü","&VDash;":"⊫","&Vbar;":"⫫","&Vcy;":"В","&Vdash;":"⊩","&Vdashl;":"⫦","&Vee;":"⋁","&Verbar;":"‖","&Vert;":"‖","&VerticalBar;":"∣","&VerticalLine;":"|","&VerticalSeparator;":"❘","&VerticalTilde;":"≀","&VeryThinSpace;":" ","&Vfr;":"𝔙","&Vopf;":"𝕍","&Vscr;":"𝒱","&Vvdash;":"⊪","&Wcirc;":"Ŵ","&Wedge;":"⋀","&Wfr;":"𝔚","&Wopf;":"𝕎","&Wscr;":"𝒲","&Xfr;":"𝔛","&Xi;":"Ξ","&Xopf;":"𝕏","&Xscr;":"𝒳","&YAcy;":"Я","&YIcy;":"Ї","&YUcy;":"Ю","&Yacute":"Ý","&Yacute;":"Ý","&Ycirc;":"Ŷ","&Ycy;":"Ы","&Yfr;":"𝔜","&Yopf;":"𝕐","&Yscr;":"𝒴","&Yuml;":"Ÿ","&ZHcy;":"Ж","&Zacute;":"Ź","&Zcaron;":"Ž","&Zcy;":"З","&Zdot;":"Ż","&ZeroWidthSpace;":"​","&Zeta;":"Ζ","&Zfr;":"ℨ","&Zopf;":"ℤ","&Zscr;":"𝒵","&aacute":"á","&aacute;":"á","&abreve;":"ă","&ac;":"∾","&acE;":"∾̳","&acd;":"∿","&acirc":"â","&acirc;":"â","&acute":"´","&acute;":"´","&acy;":"а","&aelig":"æ","&aelig;":"æ","&af;":"⁡","&afr;":"𝔞","&agrave":"à","&agrave;":"à","&alefsym;":"ℵ","&aleph;":"ℵ","&alpha;":"α","&amacr;":"ā","&amalg;":"⨿","&amp":"&","&amp;":"&","&and;":"∧","&andand;":"⩕","&andd;":"⩜","&andslope;":"⩘","&andv;":"⩚","&ang;":"∠","&ange;":"⦤","&angle;":"∠","&angmsd;":"∡","&angmsdaa;":"⦨","&angmsdab;":"⦩","&angmsdac;":"⦪","&angmsdad;":"⦫","&angmsdae;":"⦬","&angmsdaf;":"⦭","&angmsdag;":"⦮","&angmsdah;":"⦯","&angrt;":"∟","&angrtvb;":"⊾","&angrtvbd;":"⦝","&angsph;":"∢","&angst;":"Å","&angzarr;":"⍼","&aogon;":"ą","&aopf;":"𝕒","&ap;":"≈","&apE;":"⩰","&apacir;":"⩯","&ape;":"≊","&apid;":"≋","&apos;":"'","&approx;":"≈","&approxeq;":"≊","&aring":"å","&aring;":"å","&ascr;":"𝒶","&ast;":"*","&asymp;":"≈","&asympeq;":"≍","&atilde":"ã","&atilde;":"ã","&auml":"ä","&auml;":"ä","&awconint;":"∳","&awint;":"⨑","&bNot;":"⫭","&backcong;":"≌","&backepsilon;":"϶","&backprime;":"‵","&backsim;":"∽","&backsimeq;":"⋍","&barvee;":"⊽","&barwed;":"⌅","&barwedge;":"⌅","&bbrk;":"⎵","&bbrktbrk;":"⎶","&bcong;":"≌","&bcy;":"б","&bdquo;":"„","&becaus;":"∵","&because;":"∵","&bemptyv;":"⦰","&bepsi;":"϶","&bernou;":"ℬ","&beta;":"β","&beth;":"ℶ","&between;":"≬","&bfr;":"𝔟","&bigcap;":"⋂","&bigcirc;":"◯","&bigcup;":"⋃","&bigodot;":"⨀","&bigoplus;":"⨁","&bigotimes;":"⨂","&bigsqcup;":"⨆","&bigstar;":"★","&bigtriangledown;":"▽","&bigtriangleup;":"△","&biguplus;":"⨄","&bigvee;":"⋁","&bigwedge;":"⋀","&bkarow;":"⤍","&blacklozenge;":"⧫","&blacksquare;":"▪","&blacktriangle;":"▴","&blacktriangledown;":"▾","&blacktriangleleft;":"◂","&blacktriangleright;":"▸","&blank;":"␣","&blk12;":"▒","&blk14;":"░","&blk34;":"▓","&block;":"█","&bne;":"=⃥","&bnequiv;":"≡⃥","&bnot;":"⌐","&bopf;":"𝕓","&bot;":"⊥","&bottom;":"⊥","&bowtie;":"⋈","&boxDL;":"╗","&boxDR;":"╔","&boxDl;":"╖","&boxDr;":"╓","&boxH;":"═","&boxHD;":"╦","&boxHU;":"╩","&boxHd;":"╤","&boxHu;":"╧","&boxUL;":"╝","&boxUR;":"╚","&boxUl;":"╜","&boxUr;":"╙","&boxV;":"║","&boxVH;":"╬","&boxVL;":"╣","&boxVR;":"╠","&boxVh;":"╫","&boxVl;":"╢","&boxVr;":"╟","&boxbox;":"⧉","&boxdL;":"╕","&boxdR;":"╒","&boxdl;":"┐","&boxdr;":"┌","&boxh;":"─","&boxhD;":"╥","&boxhU;":"╨","&boxhd;":"┬","&boxhu;":"┴","&boxminus;":"⊟","&boxplus;":"⊞","&boxtimes;":"⊠","&boxuL;":"╛","&boxuR;":"╘","&boxul;":"┘","&boxur;":"└","&boxv;":"│","&boxvH;":"╪","&boxvL;":"╡","&boxvR;":"╞","&boxvh;":"┼","&boxvl;":"┤","&boxvr;":"├","&bprime;":"‵","&breve;":"˘","&brvbar":"¦","&brvbar;":"¦","&bscr;":"𝒷","&bsemi;":"⁏","&bsim;":"∽","&bsime;":"⋍","&bsol;":"\\","&bsolb;":"⧅","&bsolhsub;":"⟈","&bull;":"•","&bullet;":"•","&bump;":"≎","&bumpE;":"⪮","&bumpe;":"≏","&bumpeq;":"≏","&cacute;":"ć","&cap;":"∩","&capand;":"⩄","&capbrcup;":"⩉","&capcap;":"⩋","&capcup;":"⩇","&capdot;":"⩀","&caps;":"∩︀","&caret;":"⁁","&caron;":"ˇ","&ccaps;":"⩍","&ccaron;":"č","&ccedil":"ç","&ccedil;":"ç","&ccirc;":"ĉ","&ccups;":"⩌","&ccupssm;":"⩐","&cdot;":"ċ","&cedil":"¸","&cedil;":"¸","&cemptyv;":"⦲","&cent":"¢","&cent;":"¢","&centerdot;":"·","&cfr;":"𝔠","&chcy;":"ч","&check;":"✓","&checkmark;":"✓","&chi;":"χ","&cir;":"○","&cirE;":"⧃","&circ;":"ˆ","&circeq;":"≗","&circlearrowleft;":"↺","&circlearrowright;":"↻","&circledR;":"®","&circledS;":"Ⓢ","&circledast;":"⊛","&circledcirc;":"⊚","&circleddash;":"⊝","&cire;":"≗","&cirfnint;":"⨐","&cirmid;":"⫯","&cirscir;":"⧂","&clubs;":"♣","&clubsuit;":"♣","&colon;":":","&colone;":"≔","&coloneq;":"≔","&comma;":",","&commat;":"@","&comp;":"∁","&compfn;":"∘","&complement;":"∁","&complexes;":"ℂ","&cong;":"≅","&congdot;":"⩭","&conint;":"∮","&copf;":"𝕔","&coprod;":"∐","&copy":"©","&copy;":"©","&copysr;":"℗","&crarr;":"↵","&cross;":"✗","&cscr;":"𝒸","&csub;":"⫏","&csube;":"⫑","&csup;":"⫐","&csupe;":"⫒","&ctdot;":"⋯","&cudarrl;":"⤸","&cudarrr;":"⤵","&cuepr;":"⋞","&cuesc;":"⋟","&cularr;":"↶","&cularrp;":"⤽","&cup;":"∪","&cupbrcap;":"⩈","&cupcap;":"⩆","&cupcup;":"⩊","&cupdot;":"⊍","&cupor;":"⩅","&cups;":"∪︀","&curarr;":"↷","&curarrm;":"⤼","&curlyeqprec;":"⋞","&curlyeqsucc;":"⋟","&curlyvee;":"⋎","&curlywedge;":"⋏","&curren":"¤","&curren;":"¤","&curvearrowleft;":"↶","&curvearrowright;":"↷","&cuvee;":"⋎","&cuwed;":"⋏","&cwconint;":"∲","&cwint;":"∱","&cylcty;":"⌭","&dArr;":"⇓","&dHar;":"⥥","&dagger;":"†","&daleth;":"ℸ","&darr;":"↓","&dash;":"‐","&dashv;":"⊣","&dbkarow;":"⤏","&dblac;":"˝","&dcaron;":"ď","&dcy;":"д","&dd;":"ⅆ","&ddagger;":"‡","&ddarr;":"⇊","&ddotseq;":"⩷","&deg":"°","&deg;":"°","&delta;":"δ","&demptyv;":"⦱","&dfisht;":"⥿","&dfr;":"𝔡","&dharl;":"⇃","&dharr;":"⇂","&diam;":"⋄","&diamond;":"⋄","&diamondsuit;":"♦","&diams;":"♦","&die;":"¨","&digamma;":"ϝ","&disin;":"⋲","&div;":"÷","&divide":"÷","&divide;":"÷","&divideontimes;":"⋇","&divonx;":"⋇","&djcy;":"ђ","&dlcorn;":"⌞","&dlcrop;":"⌍","&dollar;":"$","&dopf;":"𝕕","&dot;":"˙","&doteq;":"≐","&doteqdot;":"≑","&dotminus;":"∸","&dotplus;":"∔","&dotsquare;":"⊡","&doublebarwedge;":"⌆","&downarrow;":"↓","&downdownarrows;":"⇊","&downharpoonleft;":"⇃","&downharpoonright;":"⇂","&drbkarow;":"⤐","&drcorn;":"⌟","&drcrop;":"⌌","&dscr;":"𝒹","&dscy;":"ѕ","&dsol;":"⧶","&dstrok;":"đ","&dtdot;":"⋱","&dtri;":"▿","&dtrif;":"▾","&duarr;":"⇵","&duhar;":"⥯","&dwangle;":"⦦","&dzcy;":"џ","&dzigrarr;":"⟿","&eDDot;":"⩷","&eDot;":"≑","&eacute":"é","&eacute;":"é","&easter;":"⩮","&ecaron;":"ě","&ecir;":"≖","&ecirc":"ê","&ecirc;":"ê","&ecolon;":"≕","&ecy;":"э","&edot;":"ė","&ee;":"ⅇ","&efDot;":"≒","&efr;":"𝔢","&eg;":"⪚","&egrave":"è","&egrave;":"è","&egs;":"⪖","&egsdot;":"⪘","&el;":"⪙","&elinters;":"⏧","&ell;":"ℓ","&els;":"⪕","&elsdot;":"⪗","&emacr;":"ē","&empty;":"∅","&emptyset;":"∅","&emptyv;":"∅","&emsp13;":" ","&emsp14;":" ","&emsp;":" ","&eng;":"ŋ","&ensp;":" ","&eogon;":"ę","&eopf;":"𝕖","&epar;":"⋕","&eparsl;":"⧣","&eplus;":"⩱","&epsi;":"ε","&epsilon;":"ε","&epsiv;":"ϵ","&eqcirc;":"≖","&eqcolon;":"≕","&eqsim;":"≂","&eqslantgtr;":"⪖","&eqslantless;":"⪕","&equals;":"=","&equest;":"≟","&equiv;":"≡","&equivDD;":"⩸","&eqvparsl;":"⧥","&erDot;":"≓","&erarr;":"⥱","&escr;":"ℯ","&esdot;":"≐","&esim;":"≂","&eta;":"η","&eth":"ð","&eth;":"ð","&euml":"ë","&euml;":"ë","&euro;":"€","&excl;":"!","&exist;":"∃","&expectation;":"ℰ","&exponentiale;":"ⅇ","&fallingdotseq;":"≒","&fcy;":"ф","&female;":"♀","&ffilig;":"ffi","&fflig;":"ff","&ffllig;":"ffl","&ffr;":"𝔣","&filig;":"fi","&fjlig;":"fj","&flat;":"♭","&fllig;":"fl","&fltns;":"▱","&fnof;":"ƒ","&fopf;":"𝕗","&forall;":"∀","&fork;":"⋔","&forkv;":"⫙","&fpartint;":"⨍","&frac12":"½","&frac12;":"½","&frac13;":"⅓","&frac14":"¼","&frac14;":"¼","&frac15;":"⅕","&frac16;":"⅙","&frac18;":"⅛","&frac23;":"⅔","&frac25;":"⅖","&frac34":"¾","&frac34;":"¾","&frac35;":"⅗","&frac38;":"⅜","&frac45;":"⅘","&frac56;":"⅚","&frac58;":"⅝","&frac78;":"⅞","&frasl;":"⁄","&frown;":"⌢","&fscr;":"𝒻","&gE;":"≧","&gEl;":"⪌","&gacute;":"ǵ","&gamma;":"γ","&gammad;":"ϝ","&gap;":"⪆","&gbreve;":"ğ","&gcirc;":"ĝ","&gcy;":"г","&gdot;":"ġ","&ge;":"≥","&gel;":"⋛","&geq;":"≥","&geqq;":"≧","&geqslant;":"⩾","&ges;":"⩾","&gescc;":"⪩","&gesdot;":"⪀","&gesdoto;":"⪂","&gesdotol;":"⪄","&gesl;":"⋛︀","&gesles;":"⪔","&gfr;":"𝔤","&gg;":"≫","&ggg;":"⋙","&gimel;":"ℷ","&gjcy;":"ѓ","&gl;":"≷","&glE;":"⪒","&gla;":"⪥","&glj;":"⪤","&gnE;":"≩","&gnap;":"⪊","&gnapprox;":"⪊","&gne;":"⪈","&gneq;":"⪈","&gneqq;":"≩","&gnsim;":"⋧","&gopf;":"𝕘","&grave;":"`","&gscr;":"ℊ","&gsim;":"≳","&gsime;":"⪎","&gsiml;":"⪐","&gt":">","&gt;":">","&gtcc;":"⪧","&gtcir;":"⩺","&gtdot;":"⋗","&gtlPar;":"⦕","&gtquest;":"⩼","&gtrapprox;":"⪆","&gtrarr;":"⥸","&gtrdot;":"⋗","&gtreqless;":"⋛","&gtreqqless;":"⪌","&gtrless;":"≷","&gtrsim;":"≳","&gvertneqq;":"≩︀","&gvnE;":"≩︀","&hArr;":"⇔","&hairsp;":" ","&half;":"½","&hamilt;":"ℋ","&hardcy;":"ъ","&harr;":"↔","&harrcir;":"⥈","&harrw;":"↭","&hbar;":"ℏ","&hcirc;":"ĥ","&hearts;":"♥","&heartsuit;":"♥","&hellip;":"…","&hercon;":"⊹","&hfr;":"𝔥","&hksearow;":"⤥","&hkswarow;":"⤦","&hoarr;":"⇿","&homtht;":"∻","&hookleftarrow;":"↩","&hookrightarrow;":"↪","&hopf;":"𝕙","&horbar;":"―","&hscr;":"𝒽","&hslash;":"ℏ","&hstrok;":"ħ","&hybull;":"⁃","&hyphen;":"‐","&iacute":"í","&iacute;":"í","&ic;":"⁣","&icirc":"î","&icirc;":"î","&icy;":"и","&iecy;":"е","&iexcl":"¡","&iexcl;":"¡","&iff;":"⇔","&ifr;":"𝔦","&igrave":"ì","&igrave;":"ì","&ii;":"ⅈ","&iiiint;":"⨌","&iiint;":"∭","&iinfin;":"⧜","&iiota;":"℩","&ijlig;":"ij","&imacr;":"ī","&image;":"ℑ","&imagline;":"ℐ","&imagpart;":"ℑ","&imath;":"ı","&imof;":"⊷","&imped;":"Ƶ","&in;":"∈","&incare;":"℅","&infin;":"∞","&infintie;":"⧝","&inodot;":"ı","&int;":"∫","&intcal;":"⊺","&integers;":"ℤ","&intercal;":"⊺","&intlarhk;":"⨗","&intprod;":"⨼","&iocy;":"ё","&iogon;":"į","&iopf;":"𝕚","&iota;":"ι","&iprod;":"⨼","&iquest":"¿","&iquest;":"¿","&iscr;":"𝒾","&isin;":"∈","&isinE;":"⋹","&isindot;":"⋵","&isins;":"⋴","&isinsv;":"⋳","&isinv;":"∈","&it;":"⁢","&itilde;":"ĩ","&iukcy;":"і","&iuml":"ï","&iuml;":"ï","&jcirc;":"ĵ","&jcy;":"й","&jfr;":"𝔧","&jmath;":"ȷ","&jopf;":"𝕛","&jscr;":"𝒿","&jsercy;":"ј","&jukcy;":"є","&kappa;":"κ","&kappav;":"ϰ","&kcedil;":"ķ","&kcy;":"к","&kfr;":"𝔨","&kgreen;":"ĸ","&khcy;":"х","&kjcy;":"ќ","&kopf;":"𝕜","&kscr;":"𝓀","&lAarr;":"⇚","&lArr;":"⇐","&lAtail;":"⤛","&lBarr;":"⤎","&lE;":"≦","&lEg;":"⪋","&lHar;":"⥢","&lacute;":"ĺ","&laemptyv;":"⦴","&lagran;":"ℒ","&lambda;":"λ","&lang;":"⟨","&langd;":"⦑","&langle;":"⟨","&lap;":"⪅","&laquo":"«","&laquo;":"«","&larr;":"←","&larrb;":"⇤","&larrbfs;":"⤟","&larrfs;":"⤝","&larrhk;":"↩","&larrlp;":"↫","&larrpl;":"⤹","&larrsim;":"⥳","&larrtl;":"↢","&lat;":"⪫","&latail;":"⤙","&late;":"⪭","&lates;":"⪭︀","&lbarr;":"⤌","&lbbrk;":"❲","&lbrace;":"{","&lbrack;":"[","&lbrke;":"⦋","&lbrksld;":"⦏","&lbrkslu;":"⦍","&lcaron;":"ľ","&lcedil;":"ļ","&lceil;":"⌈","&lcub;":"{","&lcy;":"л","&ldca;":"⤶","&ldquo;":"“","&ldquor;":"„","&ldrdhar;":"⥧","&ldrushar;":"⥋","&ldsh;":"↲","&le;":"≤","&leftarrow;":"←","&leftarrowtail;":"↢","&leftharpoondown;":"↽","&leftharpoonup;":"↼","&leftleftarrows;":"⇇","&leftrightarrow;":"↔","&leftrightarrows;":"⇆","&leftrightharpoons;":"⇋","&leftrightsquigarrow;":"↭","&leftthreetimes;":"⋋","&leg;":"⋚","&leq;":"≤","&leqq;":"≦","&leqslant;":"⩽","&les;":"⩽","&lescc;":"⪨","&lesdot;":"⩿","&lesdoto;":"⪁","&lesdotor;":"⪃","&lesg;":"⋚︀","&lesges;":"⪓","&lessapprox;":"⪅","&lessdot;":"⋖","&lesseqgtr;":"⋚","&lesseqqgtr;":"⪋","&lessgtr;":"≶","&lesssim;":"≲","&lfisht;":"⥼","&lfloor;":"⌊","&lfr;":"𝔩","&lg;":"≶","&lgE;":"⪑","&lhard;":"↽","&lharu;":"↼","&lharul;":"⥪","&lhblk;":"▄","&ljcy;":"љ","&ll;":"≪","&llarr;":"⇇","&llcorner;":"⌞","&llhard;":"⥫","&lltri;":"◺","&lmidot;":"ŀ","&lmoust;":"⎰","&lmoustache;":"⎰","&lnE;":"≨","&lnap;":"⪉","&lnapprox;":"⪉","&lne;":"⪇","&lneq;":"⪇","&lneqq;":"≨","&lnsim;":"⋦","&loang;":"⟬","&loarr;":"⇽","&lobrk;":"⟦","&longleftarrow;":"⟵","&longleftrightarrow;":"⟷","&longmapsto;":"⟼","&longrightarrow;":"⟶","&looparrowleft;":"↫","&looparrowright;":"↬","&lopar;":"⦅","&lopf;":"𝕝","&loplus;":"⨭","&lotimes;":"⨴","&lowast;":"∗","&lowbar;":"_","&loz;":"◊","&lozenge;":"◊","&lozf;":"⧫","&lpar;":"(","&lparlt;":"⦓","&lrarr;":"⇆","&lrcorner;":"⌟","&lrhar;":"⇋","&lrhard;":"⥭","&lrm;":"‎","&lrtri;":"⊿","&lsaquo;":"‹","&lscr;":"𝓁","&lsh;":"↰","&lsim;":"≲","&lsime;":"⪍","&lsimg;":"⪏","&lsqb;":"[","&lsquo;":"‘","&lsquor;":"‚","&lstrok;":"ł","&lt":"<","&lt;":"<","&ltcc;":"⪦","&ltcir;":"⩹","&ltdot;":"⋖","&lthree;":"⋋","&ltimes;":"⋉","&ltlarr;":"⥶","&ltquest;":"⩻","&ltrPar;":"⦖","&ltri;":"◃","&ltrie;":"⊴","&ltrif;":"◂","&lurdshar;":"⥊","&luruhar;":"⥦","&lvertneqq;":"≨︀","&lvnE;":"≨︀","&mDDot;":"∺","&macr":"¯","&macr;":"¯","&male;":"♂","&malt;":"✠","&maltese;":"✠","&map;":"↦","&mapsto;":"↦","&mapstodown;":"↧","&mapstoleft;":"↤","&mapstoup;":"↥","&marker;":"▮","&mcomma;":"⨩","&mcy;":"м","&mdash;":"—","&measuredangle;":"∡","&mfr;":"𝔪","&mho;":"℧","&micro":"µ","&micro;":"µ","&mid;":"∣","&midast;":"*","&midcir;":"⫰","&middot":"·","&middot;":"·","&minus;":"−","&minusb;":"⊟","&minusd;":"∸","&minusdu;":"⨪","&mlcp;":"⫛","&mldr;":"…","&mnplus;":"∓","&models;":"⊧","&mopf;":"𝕞","&mp;":"∓","&mscr;":"𝓂","&mstpos;":"∾","&mu;":"μ","&multimap;":"⊸","&mumap;":"⊸","&nGg;":"⋙̸","&nGt;":"≫⃒","&nGtv;":"≫̸","&nLeftarrow;":"⇍","&nLeftrightarrow;":"⇎","&nLl;":"⋘̸","&nLt;":"≪⃒","&nLtv;":"≪̸","&nRightarrow;":"⇏","&nVDash;":"⊯","&nVdash;":"⊮","&nabla;":"∇","&nacute;":"ń","&nang;":"∠⃒","&nap;":"≉","&napE;":"⩰̸","&napid;":"≋̸","&napos;":"ʼn","&napprox;":"≉","&natur;":"♮","&natural;":"♮","&naturals;":"ℕ","&nbsp":" ","&nbsp;":" ","&nbump;":"≎̸","&nbumpe;":"≏̸","&ncap;":"⩃","&ncaron;":"ň","&ncedil;":"ņ","&ncong;":"≇","&ncongdot;":"⩭̸","&ncup;":"⩂","&ncy;":"н","&ndash;":"–","&ne;":"≠","&neArr;":"⇗","&nearhk;":"⤤","&nearr;":"↗","&nearrow;":"↗","&nedot;":"≐̸","&nequiv;":"≢","&nesear;":"⤨","&nesim;":"≂̸","&nexist;":"∄","&nexists;":"∄","&nfr;":"𝔫","&ngE;":"≧̸","&nge;":"≱","&ngeq;":"≱","&ngeqq;":"≧̸","&ngeqslant;":"⩾̸","&nges;":"⩾̸","&ngsim;":"≵","&ngt;":"≯","&ngtr;":"≯","&nhArr;":"⇎","&nharr;":"↮","&nhpar;":"⫲","&ni;":"∋","&nis;":"⋼","&nisd;":"⋺","&niv;":"∋","&njcy;":"њ","&nlArr;":"⇍","&nlE;":"≦̸","&nlarr;":"↚","&nldr;":"‥","&nle;":"≰","&nleftarrow;":"↚","&nleftrightarrow;":"↮","&nleq;":"≰","&nleqq;":"≦̸","&nleqslant;":"⩽̸","&nles;":"⩽̸","&nless;":"≮","&nlsim;":"≴","&nlt;":"≮","&nltri;":"⋪","&nltrie;":"⋬","&nmid;":"∤","&nopf;":"𝕟","&not":"¬","&not;":"¬","&notin;":"∉","&notinE;":"⋹̸","&notindot;":"⋵̸","&notinva;":"∉","&notinvb;":"⋷","&notinvc;":"⋶","&notni;":"∌","&notniva;":"∌","&notnivb;":"⋾","&notnivc;":"⋽","&npar;":"∦","&nparallel;":"∦","&nparsl;":"⫽⃥","&npart;":"∂̸","&npolint;":"⨔","&npr;":"⊀","&nprcue;":"⋠","&npre;":"⪯̸","&nprec;":"⊀","&npreceq;":"⪯̸","&nrArr;":"⇏","&nrarr;":"↛","&nrarrc;":"⤳̸","&nrarrw;":"↝̸","&nrightarrow;":"↛","&nrtri;":"⋫","&nrtrie;":"⋭","&nsc;":"⊁","&nsccue;":"⋡","&nsce;":"⪰̸","&nscr;":"𝓃","&nshortmid;":"∤","&nshortparallel;":"∦","&nsim;":"≁","&nsime;":"≄","&nsimeq;":"≄","&nsmid;":"∤","&nspar;":"∦","&nsqsube;":"⋢","&nsqsupe;":"⋣","&nsub;":"⊄","&nsubE;":"⫅̸","&nsube;":"⊈","&nsubset;":"⊂⃒","&nsubseteq;":"⊈","&nsubseteqq;":"⫅̸","&nsucc;":"⊁","&nsucceq;":"⪰̸","&nsup;":"⊅","&nsupE;":"⫆̸","&nsupe;":"⊉","&nsupset;":"⊃⃒","&nsupseteq;":"⊉","&nsupseteqq;":"⫆̸","&ntgl;":"≹","&ntilde":"ñ","&ntilde;":"ñ","&ntlg;":"≸","&ntriangleleft;":"⋪","&ntrianglelefteq;":"⋬","&ntriangleright;":"⋫","&ntrianglerighteq;":"⋭","&nu;":"ν","&num;":"#","&numero;":"№","&numsp;":" ","&nvDash;":"⊭","&nvHarr;":"⤄","&nvap;":"≍⃒","&nvdash;":"⊬","&nvge;":"≥⃒","&nvgt;":">⃒","&nvinfin;":"⧞","&nvlArr;":"⤂","&nvle;":"≤⃒","&nvlt;":"<⃒","&nvltrie;":"⊴⃒","&nvrArr;":"⤃","&nvrtrie;":"⊵⃒","&nvsim;":"∼⃒","&nwArr;":"⇖","&nwarhk;":"⤣","&nwarr;":"↖","&nwarrow;":"↖","&nwnear;":"⤧","&oS;":"Ⓢ","&oacute":"ó","&oacute;":"ó","&oast;":"⊛","&ocir;":"⊚","&ocirc":"ô","&ocirc;":"ô","&ocy;":"о","&odash;":"⊝","&odblac;":"ő","&odiv;":"⨸","&odot;":"⊙","&odsold;":"⦼","&oelig;":"œ","&ofcir;":"⦿","&ofr;":"𝔬","&ogon;":"˛","&ograve":"ò","&ograve;":"ò","&ogt;":"⧁","&ohbar;":"⦵","&ohm;":"Ω","&oint;":"∮","&olarr;":"↺","&olcir;":"⦾","&olcross;":"⦻","&oline;":"‾","&olt;":"⧀","&omacr;":"ō","&omega;":"ω","&omicron;":"ο","&omid;":"⦶","&ominus;":"⊖","&oopf;":"𝕠","&opar;":"⦷","&operp;":"⦹","&oplus;":"⊕","&or;":"∨","&orarr;":"↻","&ord;":"⩝","&order;":"ℴ","&orderof;":"ℴ","&ordf":"ª","&ordf;":"ª","&ordm":"º","&ordm;":"º","&origof;":"⊶","&oror;":"⩖","&orslope;":"⩗","&orv;":"⩛","&oscr;":"ℴ","&oslash":"ø","&oslash;":"ø","&osol;":"⊘","&otilde":"õ","&otilde;":"õ","&otimes;":"⊗","&otimesas;":"⨶","&ouml":"ö","&ouml;":"ö","&ovbar;":"⌽","&par;":"∥","&para":"¶","&para;":"¶","&parallel;":"∥","&parsim;":"⫳","&parsl;":"⫽","&part;":"∂","&pcy;":"п","&percnt;":"%","&period;":".","&permil;":"‰","&perp;":"⊥","&pertenk;":"‱","&pfr;":"𝔭","&phi;":"φ","&phiv;":"ϕ","&phmmat;":"ℳ","&phone;":"☎","&pi;":"π","&pitchfork;":"⋔","&piv;":"ϖ","&planck;":"ℏ","&planckh;":"ℎ","&plankv;":"ℏ","&plus;":"+","&plusacir;":"⨣","&plusb;":"⊞","&pluscir;":"⨢","&plusdo;":"∔","&plusdu;":"⨥","&pluse;":"⩲","&plusmn":"±","&plusmn;":"±","&plussim;":"⨦","&plustwo;":"⨧","&pm;":"±","&pointint;":"⨕","&popf;":"𝕡","&pound":"£","&pound;":"£","&pr;":"≺","&prE;":"⪳","&prap;":"⪷","&prcue;":"≼","&pre;":"⪯","&prec;":"≺","&precapprox;":"⪷","&preccurlyeq;":"≼","&preceq;":"⪯","&precnapprox;":"⪹","&precneqq;":"⪵","&precnsim;":"⋨","&precsim;":"≾","&prime;":"′","&primes;":"ℙ","&prnE;":"⪵","&prnap;":"⪹","&prnsim;":"⋨","&prod;":"∏","&profalar;":"⌮","&profline;":"⌒","&profsurf;":"⌓","&prop;":"∝","&propto;":"∝","&prsim;":"≾","&prurel;":"⊰","&pscr;":"𝓅","&psi;":"ψ","&puncsp;":" ","&qfr;":"𝔮","&qint;":"⨌","&qopf;":"𝕢","&qprime;":"⁗","&qscr;":"𝓆","&quaternions;":"ℍ","&quatint;":"⨖","&quest;":"?","&questeq;":"≟","&quot":'"',"&quot;":'"',"&rAarr;":"⇛","&rArr;":"⇒","&rAtail;":"⤜","&rBarr;":"⤏","&rHar;":"⥤","&race;":"∽̱","&racute;":"ŕ","&radic;":"√","&raemptyv;":"⦳","&rang;":"⟩","&rangd;":"⦒","&range;":"⦥","&rangle;":"⟩","&raquo":"»","&raquo;":"»","&rarr;":"→","&rarrap;":"⥵","&rarrb;":"⇥","&rarrbfs;":"⤠","&rarrc;":"⤳","&rarrfs;":"⤞","&rarrhk;":"↪","&rarrlp;":"↬","&rarrpl;":"⥅","&rarrsim;":"⥴","&rarrtl;":"↣","&rarrw;":"↝","&ratail;":"⤚","&ratio;":"∶","&rationals;":"ℚ","&rbarr;":"⤍","&rbbrk;":"❳","&rbrace;":"}","&rbrack;":"]","&rbrke;":"⦌","&rbrksld;":"⦎","&rbrkslu;":"⦐","&rcaron;":"ř","&rcedil;":"ŗ","&rceil;":"⌉","&rcub;":"}","&rcy;":"р","&rdca;":"⤷","&rdldhar;":"⥩","&rdquo;":"”","&rdquor;":"”","&rdsh;":"↳","&real;":"ℜ","&realine;":"ℛ","&realpart;":"ℜ","&reals;":"ℝ","&rect;":"▭","&reg":"®","&reg;":"®","&rfisht;":"⥽","&rfloor;":"⌋","&rfr;":"𝔯","&rhard;":"⇁","&rharu;":"⇀","&rharul;":"⥬","&rho;":"ρ","&rhov;":"ϱ","&rightarrow;":"→","&rightarrowtail;":"↣","&rightharpoondown;":"⇁","&rightharpoonup;":"⇀","&rightleftarrows;":"⇄","&rightleftharpoons;":"⇌","&rightrightarrows;":"⇉","&rightsquigarrow;":"↝","&rightthreetimes;":"⋌","&ring;":"˚","&risingdotseq;":"≓","&rlarr;":"⇄","&rlhar;":"⇌","&rlm;":"‏","&rmoust;":"⎱","&rmoustache;":"⎱","&rnmid;":"⫮","&roang;":"⟭","&roarr;":"⇾","&robrk;":"⟧","&ropar;":"⦆","&ropf;":"𝕣","&roplus;":"⨮","&rotimes;":"⨵","&rpar;":")","&rpargt;":"⦔","&rppolint;":"⨒","&rrarr;":"⇉","&rsaquo;":"›","&rscr;":"𝓇","&rsh;":"↱","&rsqb;":"]","&rsquo;":"’","&rsquor;":"’","&rthree;":"⋌","&rtimes;":"⋊","&rtri;":"▹","&rtrie;":"⊵","&rtrif;":"▸","&rtriltri;":"⧎","&ruluhar;":"⥨","&rx;":"℞","&sacute;":"ś","&sbquo;":"‚","&sc;":"≻","&scE;":"⪴","&scap;":"⪸","&scaron;":"š","&sccue;":"≽","&sce;":"⪰","&scedil;":"ş","&scirc;":"ŝ","&scnE;":"⪶","&scnap;":"⪺","&scnsim;":"⋩","&scpolint;":"⨓","&scsim;":"≿","&scy;":"с","&sdot;":"⋅","&sdotb;":"⊡","&sdote;":"⩦","&seArr;":"⇘","&searhk;":"⤥","&searr;":"↘","&searrow;":"↘","&sect":"§","&sect;":"§","&semi;":";","&seswar;":"⤩","&setminus;":"∖","&setmn;":"∖","&sext;":"✶","&sfr;":"𝔰","&sfrown;":"⌢","&sharp;":"♯","&shchcy;":"щ","&shcy;":"ш","&shortmid;":"∣","&shortparallel;":"∥","&shy":"­","&shy;":"­","&sigma;":"σ","&sigmaf;":"ς","&sigmav;":"ς","&sim;":"∼","&simdot;":"⩪","&sime;":"≃","&simeq;":"≃","&simg;":"⪞","&simgE;":"⪠","&siml;":"⪝","&simlE;":"⪟","&simne;":"≆","&simplus;":"⨤","&simrarr;":"⥲","&slarr;":"←","&smallsetminus;":"∖","&smashp;":"⨳","&smeparsl;":"⧤","&smid;":"∣","&smile;":"⌣","&smt;":"⪪","&smte;":"⪬","&smtes;":"⪬︀","&softcy;":"ь","&sol;":"/","&solb;":"⧄","&solbar;":"⌿","&sopf;":"𝕤","&spades;":"♠","&spadesuit;":"♠","&spar;":"∥","&sqcap;":"⊓","&sqcaps;":"⊓︀","&sqcup;":"⊔","&sqcups;":"⊔︀","&sqsub;":"⊏","&sqsube;":"⊑","&sqsubset;":"⊏","&sqsubseteq;":"⊑","&sqsup;":"⊐","&sqsupe;":"⊒","&sqsupset;":"⊐","&sqsupseteq;":"⊒","&squ;":"□","&square;":"□","&squarf;":"▪","&squf;":"▪","&srarr;":"→","&sscr;":"𝓈","&ssetmn;":"∖","&ssmile;":"⌣","&sstarf;":"⋆","&star;":"☆","&starf;":"★","&straightepsilon;":"ϵ","&straightphi;":"ϕ","&strns;":"¯","&sub;":"⊂","&subE;":"⫅","&subdot;":"⪽","&sube;":"⊆","&subedot;":"⫃","&submult;":"⫁","&subnE;":"⫋","&subne;":"⊊","&subplus;":"⪿","&subrarr;":"⥹","&subset;":"⊂","&subseteq;":"⊆","&subseteqq;":"⫅","&subsetneq;":"⊊","&subsetneqq;":"⫋","&subsim;":"⫇","&subsub;":"⫕","&subsup;":"⫓","&succ;":"≻","&succapprox;":"⪸","&succcurlyeq;":"≽","&succeq;":"⪰","&succnapprox;":"⪺","&succneqq;":"⪶","&succnsim;":"⋩","&succsim;":"≿","&sum;":"∑","&sung;":"♪","&sup1":"¹","&sup1;":"¹","&sup2":"²","&sup2;":"²","&sup3":"³","&sup3;":"³","&sup;":"⊃","&supE;":"⫆","&supdot;":"⪾","&supdsub;":"⫘","&supe;":"⊇","&supedot;":"⫄","&suphsol;":"⟉","&suphsub;":"⫗","&suplarr;":"⥻","&supmult;":"⫂","&supnE;":"⫌","&supne;":"⊋","&supplus;":"⫀","&supset;":"⊃","&supseteq;":"⊇","&supseteqq;":"⫆","&supsetneq;":"⊋","&supsetneqq;":"⫌","&supsim;":"⫈","&supsub;":"⫔","&supsup;":"⫖","&swArr;":"⇙","&swarhk;":"⤦","&swarr;":"↙","&swarrow;":"↙","&swnwar;":"⤪","&szlig":"ß","&szlig;":"ß","&target;":"⌖","&tau;":"τ","&tbrk;":"⎴","&tcaron;":"ť","&tcedil;":"ţ","&tcy;":"т","&tdot;":"⃛","&telrec;":"⌕","&tfr;":"𝔱","&there4;":"∴","&therefore;":"∴","&theta;":"θ","&thetasym;":"ϑ","&thetav;":"ϑ","&thickapprox;":"≈","&thicksim;":"∼","&thinsp;":" ","&thkap;":"≈","&thksim;":"∼","&thorn":"þ","&thorn;":"þ","&tilde;":"˜","&times":"×","&times;":"×","&timesb;":"⊠","&timesbar;":"⨱","&timesd;":"⨰","&tint;":"∭","&toea;":"⤨","&top;":"⊤","&topbot;":"⌶","&topcir;":"⫱","&topf;":"𝕥","&topfork;":"⫚","&tosa;":"⤩","&tprime;":"‴","&trade;":"™","&triangle;":"▵","&triangledown;":"▿","&triangleleft;":"◃","&trianglelefteq;":"⊴","&triangleq;":"≜","&triangleright;":"▹","&trianglerighteq;":"⊵","&tridot;":"◬","&trie;":"≜","&triminus;":"⨺","&triplus;":"⨹","&trisb;":"⧍","&tritime;":"⨻","&trpezium;":"⏢","&tscr;":"𝓉","&tscy;":"ц","&tshcy;":"ћ","&tstrok;":"ŧ","&twixt;":"≬","&twoheadleftarrow;":"↞","&twoheadrightarrow;":"↠","&uArr;":"⇑","&uHar;":"⥣","&uacute":"ú","&uacute;":"ú","&uarr;":"↑","&ubrcy;":"ў","&ubreve;":"ŭ","&ucirc":"û","&ucirc;":"û","&ucy;":"у","&udarr;":"⇅","&udblac;":"ű","&udhar;":"⥮","&ufisht;":"⥾","&ufr;":"𝔲","&ugrave":"ù","&ugrave;":"ù","&uharl;":"↿","&uharr;":"↾","&uhblk;":"▀","&ulcorn;":"⌜","&ulcorner;":"⌜","&ulcrop;":"⌏","&ultri;":"◸","&umacr;":"ū","&uml":"¨","&uml;":"¨","&uogon;":"ų","&uopf;":"𝕦","&uparrow;":"↑","&updownarrow;":"↕","&upharpoonleft;":"↿","&upharpoonright;":"↾","&uplus;":"⊎","&upsi;":"υ","&upsih;":"ϒ","&upsilon;":"υ","&upuparrows;":"⇈","&urcorn;":"⌝","&urcorner;":"⌝","&urcrop;":"⌎","&uring;":"ů","&urtri;":"◹","&uscr;":"𝓊","&utdot;":"⋰","&utilde;":"ũ","&utri;":"▵","&utrif;":"▴","&uuarr;":"⇈","&uuml":"ü","&uuml;":"ü","&uwangle;":"⦧","&vArr;":"⇕","&vBar;":"⫨","&vBarv;":"⫩","&vDash;":"⊨","&vangrt;":"⦜","&varepsilon;":"ϵ","&varkappa;":"ϰ","&varnothing;":"∅","&varphi;":"ϕ","&varpi;":"ϖ","&varpropto;":"∝","&varr;":"↕","&varrho;":"ϱ","&varsigma;":"ς","&varsubsetneq;":"⊊︀","&varsubsetneqq;":"⫋︀","&varsupsetneq;":"⊋︀","&varsupsetneqq;":"⫌︀","&vartheta;":"ϑ","&vartriangleleft;":"⊲","&vartriangleright;":"⊳","&vcy;":"в","&vdash;":"⊢","&vee;":"∨","&veebar;":"⊻","&veeeq;":"≚","&vellip;":"⋮","&verbar;":"|","&vert;":"|","&vfr;":"𝔳","&vltri;":"⊲","&vnsub;":"⊂⃒","&vnsup;":"⊃⃒","&vopf;":"𝕧","&vprop;":"∝","&vrtri;":"⊳","&vscr;":"𝓋","&vsubnE;":"⫋︀","&vsubne;":"⊊︀","&vsupnE;":"⫌︀","&vsupne;":"⊋︀","&vzigzag;":"⦚","&wcirc;":"ŵ","&wedbar;":"⩟","&wedge;":"∧","&wedgeq;":"≙","&weierp;":"℘","&wfr;":"𝔴","&wopf;":"𝕨","&wp;":"℘","&wr;":"≀","&wreath;":"≀","&wscr;":"𝓌","&xcap;":"⋂","&xcirc;":"◯","&xcup;":"⋃","&xdtri;":"▽","&xfr;":"𝔵","&xhArr;":"⟺","&xharr;":"⟷","&xi;":"ξ","&xlArr;":"⟸","&xlarr;":"⟵","&xmap;":"⟼","&xnis;":"⋻","&xodot;":"⨀","&xopf;":"𝕩","&xoplus;":"⨁","&xotime;":"⨂","&xrArr;":"⟹","&xrarr;":"⟶","&xscr;":"𝓍","&xsqcup;":"⨆","&xuplus;":"⨄","&xutri;":"△","&xvee;":"⋁","&xwedge;":"⋀","&yacute":"ý","&yacute;":"ý","&yacy;":"я","&ycirc;":"ŷ","&ycy;":"ы","&yen":"¥","&yen;":"¥","&yfr;":"𝔶","&yicy;":"ї","&yopf;":"𝕪","&yscr;":"𝓎","&yucy;":"ю","&yuml":"ÿ","&yuml;":"ÿ","&zacute;":"ź","&zcaron;":"ž","&zcy;":"з","&zdot;":"ż","&zeetrf;":"ℨ","&zeta;":"ζ","&zfr;":"𝔷","&zhcy;":"ж","&zigrarr;":"⇝","&zopf;":"𝕫","&zscr;":"𝓏","&zwj;":"‍","&zwnj;":"‌"},X=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function tt(t){return t.trim().replace(/[<>"'?&]/g,(t=>{let e=t.charCodeAt(0).toString(16);return e.length<2&&(e="0"+e),"&#x"+e.toUpperCase()+";"}))}const et=/[\n\r\u2028\u2029]/g;function rt(t,e){let r=1/0,i=null;return s=>((s<r||i&&s>i.index)&&(e.lastIndex=s,i=e.exec(t),r=s),i)}function it(t,e,r){const i=t.lastIndexOf(">")+1;return t.slice(0,i).replace(e,r)+t.slice(i)}function st(t,e,r,i){const s=[];let o=0,n=0;for(;;){e.lastIndex=n;const a=e.exec(t);if(!a)break;const l=a.index,c=t.indexOf(">",l);if(c<0)break;r.lastIndex=l;const u=r.exec(t);u?(s.push(t.slice(o,l),i(...u)),o=n=l+u[0].length):n=c+1}return s.push(t.slice(o)),s.join("")}function ot(t,e,r,i,s,o){const n=rt(t,/>/g),a=rt(t,i),l=rt(t,et),c=[];let u=0,h=0;for(;;){e.lastIndex=h;const i=e.exec(t);if(!i)break;const f=i.index;h=f+1;let p=f+i[0].length;if(r){const t=n(p);if(!t)break;p=t.index+1}const d=a(p);if(!d)break;const m=l(p);if(m&&m.index<d.index)continue;let g=d.index+d[0].length;if(s){const t=n(g);if(!t)break;g=t.index+1}c.push(t.slice(u,f),o),u=h=g}return c.push(t.slice(u)),c.join("")}function nt(t,e){const r=t.search(et),i=Math.min(r<0?t.length:r,t.lastIndexOf(">"));let s,o=-1;for(e.lastIndex=0;(s=e.exec(t))&&s.index<i;)o=s.index;return o<0?t:t.slice(t.indexOf(">",o)+1)}function at(t,e){const r=function(t){return Math.max(t.lastIndexOf("\n"),t.lastIndexOf("\r"),t.lastIndexOf("\u2028"),t.lastIndexOf("\u2029"))}(t);e.lastIndex=r<0?0:t.lastIndexOf(">",r)+1;const i=e.exec(t);return i&&i.index<t.lastIndexOf(">")?t.slice(0,i.index):t}function lt(t){if("undefined"==typeof Intl)return t;const e=new Date(t);return isNaN(e.getTime())?t:new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).format(e)}function ct(t){let e=[],r=(t,i)=>{if(i&&e.push(", "),t.group){let i=";";e.push(`${t.name}:`),t.group.forEach(r),e.push(i)}else e.push(function(t){return(t.name?[t.name,`<${t.address}>`]:[t.address]).join(" ")}(t))};return t.forEach(r),e.join("")}function ut(t){let e=[],r=(t,i)=>{if(i&&e.push('<span class="postal-email-address-separator">, </span>'),t.group){let i=`<span class="postal-email-address-group">${tt(t.name)}:</span>`,s='<span class="postal-email-address-group">;</span>';e.push(i),t.group.forEach(r),e.push(s)}else e.push(function(t){return`<a href="mailto:${tt(t.address)}" class="postal-email-address">${tt(t.name||`<${t.address}>`)}</a>`}(t))};return t.forEach(r),e.join(" ")}const ht=/\s/,ft=/^("(?:[^"\\]|\\[\s\S])*"@\S+)(?:\s+([\s\S]+))?$/,pt=/^[^@\s]+@[^@\s]+$/,dt=/^[^@\s]+@\S+$/,mt=/\s*\b[^@\s]+@[^\s]+\b\s*/y;function gt(t){return 32===t||t>=9&&t<=13||160===t||5760===t||t>=8192&&t<=8202||8232===t||8233===t||8239===t||8287===t||12288===t||65279===t}function bt(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95===t}function wt(t,e){return bt(t.charCodeAt(e-1))!==bt(t.charCodeAt(e))}function vt(t,e,r){for(let i=e;i<r;i++)if(64===t.charCodeAt(i))return i;return-1}function yt(t){const e=t.length;let r=0;for(;r<e;){for(;r<e&&gt(t.charCodeAt(r));)r++;if(r>=e)break;const i=r;let s=r;for(;s<e&&!gt(t.charCodeAt(s));)s++;let o=vt(t,i,s);if(o>=0){let e=-1;for(let r=s;r>i;r--)if(wt(t,r)){e=r;break}let r=i;for(;e>=0&&o>=0;){if(o>r&&s>o+1&&e>o+1)for(let e=r;e<o;e++)if(wt(t,e)){if(e>i)return e;let r=i;for(;r>0&&gt(t.charCodeAt(r-1));)r--;return r}r=o+1,o=vt(t,r,s)}}r=s}return-1}function xt(t){const e=[];let r="",i="",s=0,o="",n="";for(let a=0,l=t.length;a<l;a++){const c=t.charAt(a);if(s)"\\"===c&&a<l-1?i+=t.charAt(++a):"("===c?(s++,i+=c):")"!==c||--s?i+=c:(e.push(i.trim()),i="","@"!==n&&"@"!==t.charAt(a+1)&&(r+=" ",n=" "));else{if(o){if("\\"===c&&'"'===o&&a<l-1){r+=c+t.charAt(++a),n=t.charAt(a);continue}c===o&&(o="")}else if('"'===c)o='"';else if("["===c)o="]";else if("("===c){s=1;continue}r+=c,n=c}}return s&&e.push(i.trim()),{address:r.trim(),comments:e.filter((t=>t))}}function qt(t,e){let r,i,s=!1,o="text",n=[],a={address:[],comment:[],group:[],text:[],textWasQuoted:[]},l=!1;const c={address:"",comment:"",group:"",text:""};for(r=0,i=t.length;r<i;r++){let e=t[r],i=r?t[r-1]:null;if("operator"===e.type)switch(e.value){case"<":o="address",l=!1;break;case"(":o="comment",l=!1;break;case":":o="group",s=!0,l=!1;break;case'"':l=!l,o="text";break;default:o="text",l=!1}else if(e.value){const s=r>1?t[r-2]:null,n="operator"===i?.type&&'"'===i.value&&!!i.noBreak&&"operator"===s?.type&&'"'===s.value;"address"===o&&(e.value=e.value.replace(/^[^<]*<\s*/,"")),i&&i.noBreak&&a[o].length&&(")"!==i.value||"@"===c[o]||"@"===e.value.charAt(0))?(a[o][a[o].length-1]+=e.value,"text"===o&&l&&(a.textWasQuoted[a.textWasQuoted.length-1]=!0)):(a[o].push(e.value),"text"===o&&a.textWasQuoted.push(l||n)),c[o]=e.value.charAt(e.value.length-1)}}if(!a.text.length&&a.comment.length&&(a.text=a.comment,a.comment=[]),s){const t=a.text.join(" ");let r=[];a.group.length&&At(a.group.join(","),e+1).forEach((t=>{if(t.group)for(const e of t.group)r.push(e);else r.push(t)})),n.push({name:G(t),group:r})}else{const t=[],i=[];for(const e of a.address){if(e.indexOf("(")<0){i.push(e);continue}const r=xt(e);for(const e of r.comments)t.push(e);r.address&&i.push(r.address)}if(a.address=i,!a.address.length&&a.text.length){for(r=a.text.length-1;r>=0;r--)if(!a.textWasQuoted[r]&&pt.test(a.text[r])){a.address=a.text.splice(r,1),a.textWasQuoted.splice(r,1);break}if(!a.address.length)for(r=a.text.length-1;r>=0;r--)if(!a.textWasQuoted[r]){const t=a.text[r],e=yt(t);if(e>=0){mt.lastIndex=e;const i=mt.exec(t);if(i){a.address=[i[0].trim()],a.text[r]=(t.slice(0,e)+" "+t.slice(e+i[0].length)).trim();break}}a.text[r]=t.trim()}}!a.text.length&&a.comment.length&&(a.text=a.comment,a.comment=[]),a.address.length>1&&(a.text=a.text.concat(a.address.splice(1)));const s=!a.address.length&&a.textWasQuoted.some((t=>t));let o=a.text.join(" "),l=a.address.join(" ");if(!l&&(u=o.trim(),z.test(u))){const t=G(o);if(!s&&function(t){let e=-1,r=-1;for(let i=0;i<t.length;i++){const s=t.charAt(i);if("<"===s)e=i+1,r=-1;else if(">"===s){if(r>=0&&r<i-1)return!0;e=-1,r=-1}else"@"===s&&e>=0&&r<0&&i>e&&(r=i)}return!1}(t)){const r=At(t,e+1);if(r.length)return r}return[{address:"",name:t}]}s&&o.indexOf("@")>=0&&(l=function(t){const e=t.lastIndexOf("@");if(e<0)return t;const r=t.substring(0,e);return/^[^\s"(),:;<>@[\\\]]+$/.test(r)||/^"(?:[^"\\]|\\[\s\S])*"$/.test(r)?t:'"'+r.replace(/["\\]/g,"\\$&")+'"@'+t.substring(e+1)}(o),o=""),({address:l,text:o}=function(t,e){if(!ht.test(t))return{address:t,text:e};let r;const i=t.match(ft);if(i){if(!i[2])return{address:t,text:e};t=i[1],r=[i[2]]}else{if(t.indexOf('"')>=0)return{address:t,text:e};const i=t.split(/\s+/);let s=i.findIndex((t=>pt.test(t)));if(s<0&&(s=i.findIndex((t=>dt.test(t)))),s<0)return{address:t,text:e};t=i.splice(s,1)[0],r=i}return{address:t,text:[e,...r].filter((t=>t)).join(" ")}}(l,o)),!o&&t.length&&(o=t.join(" "));const c=o||l||"",h={address:l||o||"",name:G(c)};h.address!==c&&h.address!==h.name||(h.address.match(/@/)?h.name="":h.address=""),n.push(h)}var u;return n}class kt{constructor(t){this.str=(t||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.inDomainLiteral=!1,this.afterAt=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let t=[];for(let t=0,e=this.str.length;t<e;t++){let r=this.str.charAt(t),i=t<e-1?this.str.charAt(t+1):null;this.checkChar(r,i)}return this.list.forEach((e=>{e.value=(e.value||"").toString().trim(),e.value&&t.push(e)})),t}checkChar(t,e){if(this.escaped||this.operatorExpecting||(!this.inDomainLiteral&&"["===t&&this.afterAt?this.inDomainLiteral=!0:!this.inDomainLiteral||"]"!==t&&","!==t&&";"!==t||(this.inDomainLiteral=!1)),this.escaped);else{if(t===this.operatorExpecting)return this.node={type:"operator",value:t},e&&![" ","\t","\r","\n",",",";"].includes(e)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,")"!==t&&(this.afterAt=!1),this.operatorExpecting="",void(this.escaped=!1);if(!(this.operatorExpecting||this.inDomainLiteral&&":"===t)&&t in this.operators)return this.node={type:"operator",value:t},this.list.push(this.node),this.node=null,"("!==t&&(this.afterAt=!1),this.operatorExpecting=this.operators[t],void(this.escaped=!1);if(('"'===this.operatorExpecting||")"===this.operatorExpecting)&&"\\"===t)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===t&&(t=" "),(t.charCodeAt(0)>=33||[" ","\t"].includes(t))&&(this.node.value+=t,this.operatorExpecting||" "===t||"\t"===t||(this.afterAt="@"===t)),this.escaped=!1}}const Et=50;function At(t,e){if(e>Et)return[];let r=new kt(t).tokenize(),i=[],s=[];const o=[];r.forEach((t=>{"operator"!==t.type||","!==t.value&&";"!==t.value?s.push(t):(s.length&&i.push(s),s=[])})),s.length&&i.push(s);for(const t of i)for(const r of qt(t,e))o.push(r);const n=[];for(let t=o.length-1;t>=0;t--){const e=o[t],r=n.length?n[n.length-1]:null;r&&""===e.address&&e.name&&!e.group&&r.address&&r.name?r.name=e.name+", "+r.name:n.push(e)}return n.reverse()}function Dt(t){return At(t,0)}function St(t){let e="";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(t),s=i.byteLength,o=s%3,n=s-o;let a,l,c,u,h;for(let t=0;t<n;t+=3)h=i[t]<<16|i[t+1]<<8|i[t+2],a=(16515072&h)>>18,l=(258048&h)>>12,c=(4032&h)>>6,u=63&h,e+=r[a]+r[l]+r[c]+r[u];return 1===o?(h=i[n],a=(252&h)>>2,l=(3&h)<<4,e+=r[a]+r[l]+"=="):2===o&&(h=i[n]<<8|i[n+1],a=(64512&h)>>10,l=(1008&h)>>4,c=(15&h)<<2,e+=r[a]+r[l]+r[c]+"="),e}function Lt(t,e,r){return"subMessage"===t.type?"html"===e?function(t){let e=[];return t.from&&e.push(`<div class="postal-email-header-key">From</div><div class="postal-email-header-value">${ut([t.from])}</div>`),t.subject&&e.push(`<div class="postal-email-header-key">Subject</div><div class="postal-email-header-value postal-email-header-subject">${tt(t.subject)}</div>`),t.date&&e.push(`<div class="postal-email-header-key">Date</div><div class="postal-email-header-value postal-email-header-date" data-date="${tt(t.date)}">${tt(lt(t.date))}</div>`),t.to&&t.to.length&&e.push(`<div class="postal-email-header-key">To</div><div class="postal-email-header-value">${ut(t.to)}</div>`),t.cc&&t.cc.length&&e.push(`<div class="postal-email-header-key">Cc</div><div class="postal-email-header-value">${ut(t.cc)}</div>`),t.bcc&&t.bcc.length&&e.push(`<div class="postal-email-header-key">Bcc</div><div class="postal-email-header-value">${ut(t.bcc)}</div>`),`<div class="postal-email-header">${e.length?'<div class="postal-email-header-row">':""}${e.join('</div>\n<div class="postal-email-header-row">')}${e.length?"</div>":""}</div>`}(t.value):function(t){let e=[];t.from&&e.push({key:"From",val:ct([t.from])}),t.subject&&e.push({key:"Subject",val:t.subject}),t.date&&e.push({key:"Date",val:lt(t.date)}),t.to&&t.to.length&&e.push({key:"To",val:ct(t.to)}),t.cc&&t.cc.length&&e.push({key:"Cc",val:ct(t.cc)}),t.bcc&&t.bcc.length&&e.push({key:"Bcc",val:ct(t.bcc)});let r=e.map((t=>t.key.length)).reduce(((t,e)=>e>t?e:t),0);const i=e.flatMap((t=>{let e=r-t.key.length,i=`${t.key}: ${" ".repeat(e)}`,s=`${" ".repeat(t.key.length+1)} ${" ".repeat(e)}`;return function(t,e){e=e||76;let r,i,s=0,o=(t=(t||"").toString()).length,n="";for(;s<o;){if(r=t.slice(s,s+e),r.length<e){n+=r;break}(i=r.match(/^[^\n\r]*(\r?\n|\r)/))?(r=i[0],n+=r,s+=r.length):((i=r.match(/(\s+)[^\s]*$/))&&i[0].length-(i[1]||"").length<r.length?r=r.slice(0,r.length-(i[0].length-(i[1]||"").length)):(i=t.slice(s+r.length).match(/^[^\s]+(\s*)/))&&(r+=i[0].slice(0,i[0].length-0)),n+=r,s+=r.length,s<o&&(n+="\r\n"))}return n}(t.val,80).split(/\r?\n/).map((t=>t.trim())).map(((t,e)=>`${e?s:i}${t}`))}));let s=i.map((t=>t.length)).reduce(((t,e)=>e>t?e:t),0),o="-".repeat(s);return`\n${o}\n${i.join("\n")}\n${o}\n`}(t.value):r?"html"===e?"<div>"+tt(t.value).replace(/\n/g,"<br />")+"</div>":(i=it(i=ot(i=(i=t.value).replace(/\r?\n/g,""),/<!--/g,!1,/-->/g,!1," "),/<br\b[^>]*>/gi,"\n"),i=nt(i=ot(i=it(i,/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi,"\n\n"),/<script\b/gi,!0,/<\/script\b/gi,!0," "),/<body\b/gi),i=nt(i,/<\/head\b/gi),i=at(i=nt(i,/<!doctype\b/gi),/<\/body\b/gi),i=it(i=st(i=at(i,/<\/html\b/gi),/<a\b/gi,/<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/iy,((t,e)=>` (${e}) `)),/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi,""),i=it(i=st(i,/<li\b/gi,/<li\b[^>]*>[\n\u0001\s]*/iy,(()=>"* ")),/<hr\b[^>]*>/g,"\n-------------\n"),function(t){return t.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi,((t,e)=>{if("string"==typeof W[t])return W[t];if("#"!==e.charAt(0)||";"!==t.charAt(t.length-1))return t;let r;r="x"===e.charAt(1).toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);let i="";return 0===r||r>=55296&&r<=57343||r>1114111?"�":(r=X.get(r)??r,r>65535&&(r-=65536,i+=String.fromCharCode(r>>>10&1023|55296),r=56320|1023&r),i+=String.fromCharCode(r),i)}))}(i=(i=it(i,/<[^>]*>/g," ")).replace(/\u0001/g,"\n").replace(/[ \t]+/g," ").replace(/^\s+$/gm,"").replace(/\n\n+/g,"\n\n").replace(/^\n+/,"\n").replace(/\n+$/,"\n"))):t.value;var i}const Tt=new Uint8Array([10]);function jt(t,e,r){if(null==t)return e;if("number"!=typeof t||!Number.isInteger(t)||t<0)throw new TypeError(`${r} must be a non-negative integer`);return t}class Rt{static async parse(t,e){return new Rt(e).parse(t)}constructor(t){this.options=t||{},this.mimeOptions={maxNestingDepth:jt(this.options.maxNestingDepth,256,"maxNestingDepth"),maxHeadersSize:jt(this.options.maxHeadersSize,2097152,"maxHeadersSize"),maxPartCount:jt(this.options.maxPartCount,1e4,"maxPartCount")},this.maxRfc822NestingDepth=jt(this.options.maxRfc822NestingDepth,10,"maxRfc822NestingDepth"),this.rfc822NestingDepth=0,this.headerSize=0,this.partCount=0,this.root=this.currentNode=new K({postalMime:this,...this.mimeOptions}),this.boundaries=[],this.textContent={},this.textMap=new Map,this.textTypes=new Set,this.attachments=[],this.forceRfc822Attachments=!1,this.attachmentEncoding=(this.options.attachmentEncoding||"").toString().replace(/[-_\s]/g,"").trim().toLowerCase()||"arraybuffer",this.started=!1}async finalize(){await this.root.finalize()}async processLine(t,e,r){let i=this.boundaries;if(i.length&&t.length>2&&45===t[0]&&45===t[1])for(let e=i.length-1;e>=0;e--){let s=i[e];if(t.length<s.value.length+2)continue;let o=!0;for(let e=0;e<s.value.length;e++)if(t[e+2]!==s.value[e]){o=!1;break}if(!o)continue;let n=s.value.length+2,a=!1;t.length>=s.value.length+4&&45===t[s.value.length+2]&&45===t[s.value.length+3]&&(a=!0,n=s.value.length+4);let l=!0;for(let e=n;e<t.length;e++)if(!g(t[e])){l=!1;break}if(l)return a?(await s.node.finalize(!0),this.currentNode=s.node.parentNode||this.root):(await s.node.finalizeChildNodes(!0),this.currentNode=new K({postalMime:this,parentNode:s.node,parentMultipartType:s.node.contentType.multipart,...this.mimeOptions})),r?this.finalize():void 0}return this.currentNode.feed(t,e)?this.processLine(t,e,r):r?this.finalize():void 0}readLine(){let t=this.readPos,e=this.readPos;for(;this.readPos<this.av.length;){const r=this.av[this.readPos++];if(13!==r&&10!==r&&(e=this.readPos),10===r)return{bytes:new Uint8Array(this.buf,t,e-t),lineBreak:this.av.subarray(e,this.readPos),done:this.readPos>=this.av.length}}return{bytes:new Uint8Array(this.buf,t,e-t),lineBreak:Tt,done:this.readPos>=this.av.length}}addTextEntry(t,e,r){let i=this.textMap.get(t);i||(i={},this.textMap.set(t,i));const s=i[e]||[];i[e]=s,s.push(r),this.textTypes.add(e)}async collectNode(t,e,r){if(t.contentType.multipart)"alternative"===t.contentType.multipart?e=t:"related"===t.contentType.multipart&&(r=!0);else{const i=this.isInlineMessageRfc822(t),s=i&&this.rfc822NestingDepth>=this.maxRfc822NestingDepth;i&&!s?await this.collectSubMessage(t):this.isInlineTextNode(t)?this.addTextEntry(e||t,"text/html"===t.contentType.parsed.value?"html":"plain",{type:"text",value:t.getTextContent()}):t.content&&this.collectAttachment(t,t.content,r,s)}for(let i of t.childNodes)await this.collectNode(i,e,r)}async collectSubMessage(t){const e=new Rt({...this.mimeOptions,maxRfc822NestingDepth:this.maxRfc822NestingDepth,attachmentEncoding:"arraybuffer"});e.rfc822NestingDepth=this.rfc822NestingDepth+1;const r=t.subMessage=await e.parse(t.content||new ArrayBuffer(0));!r.text&&r.html||this.addTextEntry(t,"plain",{type:"subMessage",value:r}),r.html&&this.addTextEntry(t,"html",{type:"subMessage",value:r}),e.textMap.forEach(((t,e)=>{this.textMap.set(e,t)}));for(let t of r.attachments)this.attachments.push(t)}collectAttachment(t,e,r,i){const s=t.contentDisposition.parsed.params.filename||t.contentType.parsed.params.name||null,o={filename:s?G(B(s)):null,mimeType:t.contentType.parsed.value,disposition:t.contentDisposition.parsed.value||null};switch(r&&t.contentId&&!i&&(o.related=!0),i&&(o.rfc822DepthExceeded=!0),t.contentDescription&&(o.description=G(t.contentDescription)),t.contentId&&(o.contentId=t.contentId),t.contentType.parsed.value){case"text/calendar":case"application/ics":{t.contentType.parsed.params.method&&(o.method=t.contentType.parsed.params.method.toString().toUpperCase().trim());const e=t.getTextContent();let r=e.length;for(;r>0&&10===e.charCodeAt(r-1);)r--;o.content=m.encode(e.slice(0,r)+"\n");break}default:o.content=e}this.attachments.push(o)}renderTextContent(){const t={};this.textMap.forEach((e=>{this.textTypes.forEach((r=>{const i=t[r]||[];t[r]=i;const s=e[r],o=s||e["html"===r?"plain":"html"]||[];for(const t of o)i.push(Lt(t,r,!s))}))})),Object.keys(t).forEach((e=>{this.textContent[e]=t[e].join("\n")}))}isInlineTextNode(t){if("attachment"===t.contentDisposition.parsed.value)return!1;switch(t.contentType.parsed.value){case"text/html":case"text/plain":return!0;default:return!1}}isInlineMessageRfc822(t){return!this.forceRfc822Attachments&&"message/rfc822"===t.contentType.parsed.value&&"inline"===(t.contentDisposition.parsed.value||(this.options.rfc822Attachments?"attachment":"inline"))}hasReportParts(){let t=!1,e=r=>{r.contentType.multipart||["message/delivery-status","message/feedback-report"].includes(r.contentType.parsed.value)&&(t=!0);for(let t of r.childNodes)e(t)};return e(this.root),t}async resolveStream(t){let e=0,r=[];const i=t.getReader();for(;;){const{done:t,value:s}=await i.read();if(t)break;r.push(s),e+=s.length}const s=new Uint8Array(e);let o=0;for(let t of r)s.set(t,o),o+=t.length;return s}async resolveInput(t){let e=t;var r;return(r=e)&&"function"==typeof r.getReader&&(e=await this.resolveStream(e)),e=e||new ArrayBuffer(0),"string"==typeof e&&(e=m.encode(e)),function(t){return t instanceof Blob||"[object Blob]"===Object.prototype.toString.call(t)}(e)&&(e=await N(e)),ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e}buildMessage(){const t=this.root.headers,e={headers:t.map((t=>({key:t.key,originalKey:t.originalKey,value:t.value})))};for(const r of["from","sender"]){const i=t.find((t=>t.key===r));if(i&&i.value){const t=Dt(i.value);t&&t.length&&(e[r]=t[0])}}for(const[r,i]of[["delivered-to","deliveredTo"],["return-path","returnPath"]]){const s=t.find((t=>t.key===r));if(s&&s.value){const t=Dt(s.value);t&&t.length&&t[0].address&&(e[i]=t[0].address)}}for(const[r,i]of[["to","to"],["cc","cc"],["bcc","bcc"],["reply-to","replyTo"]]){const s=[];for(const e of t)if(e.key===r&&e.value)for(const t of Dt(e.value))s.push(t);s.length&&(e[i]=s)}for(const[r,i]of[["subject","subject"],["message-id","messageId"],["in-reply-to","inReplyTo"],["references","references"]]){const s=t.find((t=>t.key===r));s&&s.value&&(e[i]=G(s.value))}let r=t.find((t=>"date"===t.key));if(r){let t=new Date(r.value);e.date="Invalid Date"===t.toString()?r.value:t.toISOString()}return this.textContent.html&&(e.html=this.textContent.html),this.textContent.plain&&(e.text=this.textContent.plain),e.attachments=this.attachments,e.headerLines=this.root.rawHeaderLines.slice(),e}encodeAttachments(){switch(this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let t of this.attachments)t.content&&"string"!=typeof t.content&&(t.content=St(t.content),t.encoding="base64");break;case"utf8":{let t=new TextDecoder("utf8");for(let e of this.attachments)e.content&&"string"!=typeof e.content&&(e.content=t.decode(e.content),e.encoding="utf8");break}default:throw new Error("Unknown attachment encoding")}}async parse(t){if(this.started)throw new Error("Can not reuse parser, create a new PostalMime object");for(this.started=!0,this.buf=await this.resolveInput(t),this.av=new Uint8Array(this.buf),this.readPos=0;this.readPos<this.av.length;){const t=this.readLine();await this.processLine(t.bytes,t.lineBreak,t.done)}this.forceRfc822Attachments=Boolean(this.options.forceRfc822Attachments)||this.hasReportParts(),await this.collectNode(this.root,!1,!1),this.renderTextContent();const e=this.buildMessage();return this.encodeAttachments(),e}}var Nt,Ut,Bt,Ct,$t,Vt,It;const zt=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp","image/bmp","image/x-icon","image/vnd.microsoft.icon"]);const Ot=null!==(Ut=null===(Nt=n.protocols)||void 0===Nt?void 0:Nt.src)&&void 0!==Ut?Ut:[],_t=Object.assign(Object.assign({},n),{clobberPrefix:"",protocols:Object.assign(Object.assign({},n.protocols),{src:[...Ot,"data"]}),attributes:Object.assign(Object.assign({},n.attributes),{table:[...null!==(Bt=n.attributes.table)&&void 0!==Bt?Bt:[],"cellPadding","cellSpacing","border","dir","width","height"],font:["color","size","face"],meta:["charset","content","name"],colgroup:[...null!==(Ct=n.attributes.colgroup)&&void 0!==Ct?Ct:[],"span"],col:[...null!==($t=n.attributes.col)&&void 0!==$t?$t:[],"width","span"],"*":[...null!==(Vt=n.attributes["*"])&&void 0!==Vt?Vt:[],"style","className","id","dataRemoteSrc"]}),tagNames:[...null!==(It=n.tagNames)&&void 0!==It?It:[],"html","head","body","title","meta","style","colgroup","col","center","font"]});function Gt(t){const e=[/behavior\s*:/gi,/expression\s*\(/gi,/-moz-binding\s*:/gi,/vbscript\s*:/gi,/javascript\s*:/gi];let r=t;for(const t of e)r=r.replaceAll(t,"");return r=r.replaceAll(/@import\s+(?:url\([^)]{0,2000}\)|[^;]{0,2000});?/gi,""),r=r.replaceAll(/url\(\s{0,50}(?:"([^"]{0,2000})"|'([^']{0,2000})'|([^"')\s]{1,2000}))\s{0,50}\)/gi,((t,e,r,i)=>{var s,o;return(t=>{const e=t.trim().toLowerCase();return!!(e.startsWith("data:")||e.startsWith("cid:")||e.startsWith("#"))||!e.startsWith("//")&&!/^[a-z][a-z0-9+.-]*:/i.test(e)})((null!==(o=null!==(s=null!=e?e:r)&&void 0!==s?s:i)&&void 0!==o?o:"").trim())?t:'url("")'})),r}async function Mt(t){const e=await async function(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch email (${e.status} ${e.statusText})`);return await e.arrayBuffer()}catch(e){const r=e instanceof Error?e.message:String(e);throw new Error(`Failed to load email from ${t}: ${r}`,{cause:e})}}(t),r=await async function(t,e){try{return await Rt.parse(e,{attachmentEncoding:"arraybuffer"})}catch(e){const r=e instanceof Error?e.message:String(e);throw new Error(`Failed to parse email from ${t}: ${r}`,{cause:e})}}(t,e),i={subject:r.subject||void 0,from:Wt(r.from),to:Kt(r.to),cc:Kt(r.cc),date:Ht(r,"date")||r.date||void 0},{attachments:s,cidUrlById:o}=function(t){const e=[],r=new Map,i=t.attachments||[];for(const t of i){const i=Pt(t.contentId),o=Boolean(i)&&"attachment"!==t.disposition||t.related||"inline"===t.disposition,n=(s=t.content)instanceof ArrayBuffer?new Uint8Array(s):ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):void 0;if(!o){e.push({filename:t.filename||void 0,mimeType:t.mimeType||void 0,size:null==n?void 0:n.byteLength});continue}const a=Boolean(n);if(!i||!a){e.push({filename:t.filename||void 0,mimeType:t.mimeType||"application/octet-stream",size:null==n?void 0:n.byteLength});continue}const l=Jt(t.mimeType,n,t.filename),c=Ft(n);r.set(i,`data:${l};base64,${c}`)}var s;return{attachments:e,cidUrlById:r}}(r);return s.length>0&&(i.attachments=s),await async function(t,e,r){const i=(e.html||"").trim();if(i){const e=function(t,e){return 0===e.size?t:t.replaceAll(/(src\s*=\s*["']?)cid:([^"'\s>]+)(["']?)/gi,((t,r,i,s)=>{const o=Pt(function(t){try{return decodeURIComponent(t)}catch(e){return t}}(i)),n=e.get(o);return n?`${r}${n}${s}`:t}))}(i,r);t.bodyHtml=await async function(t){const e=await a().use(l).use(c,_t).use((()=>t=>{u(t,"element",(t=>{!function(t){var e;if((null==t?void 0:t.tagName)&&((null===(e=t.properties)||void 0===e?void 0:e.style)&&"string"==typeof t.properties.style&&(t.properties.style=Gt(t.properties.style)),"style"===t.tagName&&Array.isArray(t.children)))for(const e of t.children)"text"===(null==e?void 0:e.type)&&"string"==typeof e.value&&(e.value=Gt(e.value))}(t),function(t){var e;if(!(null==t?void 0:t.tagName)||"img"!==t.tagName)return;const r=null===(e=t.properties)||void 0===e?void 0:e.src;if("string"!=typeof r)return;const i=function(t){const e=t.trim();if(!e)return;if(!e.toLowerCase().startsWith("data:"))return;const r=function(t){var e;const r=/^data:([^;,]+)(?:;charset=[^;,]+)?(?:;base64)?,/i.exec(t);return(null===(e=null==r?void 0:r[1])||void 0===e?void 0:e.toLowerCase())||void 0}(e);return r&&zt.has(r)?e:void 0}(r);if(i)return t.properties.src=i,void delete t.properties.dataRemoteSrc;const s=function(t){const e=t.trim(),r=e.toLowerCase();if(r.startsWith("http://")||r.startsWith("https://"))return e}(r);if(s)return t.properties.dataRemoteSrc=s,void delete t.properties.src;delete t.properties.src}(t)}))})).use(h).process(t);return e.toString()}(e)}else t.bodyText=(e.text||"").trim()||void 0}(i,r,o),i}function Ht(t,e){const r=(t.headers||[]).find((t=>t.key===e.toLowerCase()));return(null==r?void 0:r.value)||void 0}function Pt(t){if(!t)return"";let e=t.trim();return e.toLowerCase().startsWith("cid:")&&(e=e.slice(4).trim()),e.startsWith("<")&&(e=e.slice(1)),e.endsWith(">")&&(e=e.slice(0,-1)),e.trim()}function Ft(t){if("function"==typeof btoa){let e="";for(const r of t)e+=String.fromCharCode(r);return btoa(e)}return Buffer.from(t).toString("base64")}function Jt(t,e,r){const i="string"==typeof t?t.trim().toLowerCase():"",s=function(t){var e,r,i,s,o;return null!==(o=null!==(s=null!==(i=null!==(r=null!==(e=function(t){if(Yt(t,[137,80,78,71,13,10,26,10]))return"image/png"}(t))&&void 0!==e?e:function(t){if(Yt(t,[255,216,255]))return"image/jpeg"}(t))&&void 0!==r?r:function(t){const e=Zt(t,0,6);if("GIF87a"===e||"GIF89a"===e)return"image/gif"}(t))&&void 0!==i?i:function(t){const e=Zt(t,0,4),r=Zt(t,8,12);if("RIFF"===e&&"WEBP"===r)return"image/webp"}(t))&&void 0!==s?s:function(t){if(Yt(t,[0,0,1,0]))return"image/x-icon"}(t))&&void 0!==o?o:function(t){if(t.length<5)return;const e=new TextDecoder("utf-8",{fatal:!1}).decode(t.slice(0,Math.min(t.length,256))).trimStart().toLowerCase();return e.startsWith("<svg")||e.startsWith("<?xml")&&e.includes("<svg")?"image/svg+xml":void 0}(t)}(e);if(i.startsWith("image/")){if(o=i,!(n=s)||o===n||"image/jpg"===o&&"image/jpeg"===n||"image/vnd.microsoft.icon"===o&&"image/x-icon"===n)return i;if(s)return s}var o,n;if(s)return s;const a=function(t){const e=null==t?void 0:t.trim().toLowerCase();if(!e||!e.includes("."))return;return{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",ico:"image/x-icon",bmp:"image/bmp"}[e.slice(e.lastIndexOf(".")+1)]}(r);return a||i||"application/octet-stream"}function Yt(t,e){return!(t.length<e.length)&&e.every(((e,r)=>t[r]===e))}function Zt(t,e,r){return t.length<r?"":String.fromCodePoint(...t.slice(e,r))}function Qt(t){return"string"==typeof t&&t.length>0}function Kt(t){if(!t)return;const e=(Array.isArray(t)?t:[t]).map((t=>Wt(t))).filter(Qt);return e.length>0?e.join(", "):void 0}function Wt(t){if(!t)return;if(Array.isArray(t))return Kt(t);if(t.group&&Array.isArray(t.group)){const e=(t.name||"").trim(),r=t.group.map((t=>Wt(t))).filter(Qt).join(", ");return e&&r?`${e}: ${r}`:e||r||void 0}const e=(t.name||"").trim(),r=(t.address||"").trim();if(e&&r){const t=function(t){if(!t)return"";if(!t.includes(",")&&!t.includes('"'))return t;return`"${t.replaceAll("\\","\\\\").replaceAll('"',String.raw`\"`)}"`}(e);return`${t} <${r}>`}return e||r||void 0}const Xt=class{constructor(s){t(this,s),this.action=e(this,"action",7),this.allowFullscreen=!1,this.allowOpenInNewTab=!1,this.allowDownload=!1,this.language="en",this.officeViewer="microsoft-office",this.isFullscreen=!1,this.loading=!0,this.fileUrl="",this.renderPdf=()=>[r("div",{class:"action-menu-for-pdf-files"},this.renderActionMenu()),r("iframe",{src:this.sanitizeUrl(this.fileUrl),loading:"lazy"})],this.renderImage=()=>{var t;return r(i,null,this.renderButtons(),r(f,{image:{src:this.sanitizeUrl(this.fileUrl),alt:null!==(t=this.alt)&&void 0!==t?t:"",referrerpolicy:"no-referrer"}}))},this.renderVideo=()=>r("video",{controls:!0},r("source",{src:this.sanitizeUrl(this.fileUrl)})),this.renderAudio=()=>r("audio",{controls:!0},r("source",{src:this.sanitizeUrl(this.fileUrl)})),this.renderText=()=>{const t=[this.renderNoFileSupportMessage(!1)];return[this.renderButtons(),r("object",{data:this.sanitizeUrl(this.fileUrl),type:"text/plain"},t)]},this.renderEmail=()=>this.email?[this.renderButtons(),r("limel-email-viewer",{email:this.email,fallbackUrl:this.sanitizeUrl(this.fileUrl),language:this.language},r("div",{slot:"fallback"},this.renderNoFileSupportMessage(!1)))]:this.renderFileNotFoundMessage(),this.renderOffice=()=>[r("div",{class:"action-menu-for-office-files"},this.renderActionMenu()),r("iframe",{src:this.getOfficeViewerUrl()+encodeURIComponent(this.sanitizeUrl(this.fileUrl))+"&embedded=true",loading:"lazy"})],this.isOfficeFileAccessibleViaURL=()=>"office"===this.fileType&&!(this.fileUrl.startsWith("http://")||this.fileUrl.startsWith("https://")),this.getOfficeViewerUrl=()=>({"microsoft-office":"https://view.officeapps.live.com/op/embed.aspx?src=","google-drive":"https://docs.google.com/gview?url="}[this.officeViewer]),this.renderNoFileSupportMessage=(t=!0)=>r("div",{class:"no-support",role:"alert"},r("h1",null,"⚠️"),r("p",null,this.getTranslation("file-viewer.message.unsupported-filetype")),r("p",{style:{textAlign:"center",margin:"0 auto"}},this.getTranslation("file-viewer.message.try-other-options")),t&&this.renderDownloadButton()),this.renderFileNotFoundMessage=()=>r("div",{class:"no-support",role:"alert"},r("h1",null,"⚠️"),r("p",null,this.getTranslation("file-viewer.message.file-not-found"))),this.renderButtons=()=>r("div",{class:"buttons"},this.renderActionMenu(),this.renderToggleFullscreenButton(),this.renderDownloadButton(),this.renderOpenInNewTabButton()),this.renderToggleFullscreenButton=()=>{if(!this.allowFullscreen||!this.fullscreen.isSupported())return;const t=this.isFullscreen?"multiply":"fit_to_width",e=this.getTranslation(this.isFullscreen?"file-viewer.exit-fullscreen":"file-viewer.open-in-fullscreen");return[r("button",{class:"button--toggle-fullscreen",id:"tooltip-toggle-fullscreen",role:"button",onClick:this.handleToggleFullscreen},r("limel-icon",{name:t}),r("limel-tooltip",{label:e,elementId:"tooltip-toggle-fullscreen",openDirection:"left"}))]},this.renderDownloadButton=()=>{var t;if(this.allowDownload&&!this.isFullscreen)return r("a",{class:"button--download",id:"tooltip-download",role:"button",download:null!==(t=this.filename)&&void 0!==t?t:"",href:this.sanitizeUrl(this.fileUrl),target:"_blank"},r("limel-icon",{name:"download_2"}),r("limel-tooltip",{label:this.getTranslation("file-viewer.download"),elementId:"tooltip-download",openDirection:"left"}))},this.renderOpenInNewTabButton=()=>{if(this.allowOpenInNewTab&&!this.isFullscreen)return r("a",{class:"button--new-tab",id:"tooltip-new-tab",role:"button",href:this.sanitizeUrl(this.fileUrl),target:"_blank",rel:"noopener noreferrer"},r("limel-icon",{name:"external_link"}),r("limel-tooltip",{label:this.getTranslation("file-viewer.open-in-new-tab"),elementId:"tooltip-new-tab",openDirection:"left"}))},this.renderActionMenu=()=>{if(this.actions&&!this.isFullscreen)return r("limel-menu",{class:"action-menu",items:this.actions,onSelect:this.emitOnAction,"open-direction":"left"},r("button",{class:"button--action",id:"tooltip-more",role:"button",slot:"trigger"},r("limel-icon",{name:"menu_2"}),r("limel-tooltip",{label:this.getTranslation("file-viewer.more-actions"),elementId:"tooltip-more",openDirection:"left"})))},this.createURL=async t=>{this.revokePdfBlobUrl();const e={pdf:this.loadPdf,email:this.loadEmail}[t]||this.loadDefault;try{await e()}finally{this.loading=!1}},this.loadPdf=async()=>{const t=await fetch(this.url);if(!t.ok)throw new Error(`Failed to load PDF (${t.status} ${t.statusText})`);const e=await t.blob();this.fileUrl=URL.createObjectURL(e),this.pdfBlobUrl=this.fileUrl},this.loadEmail=async()=>{try{this.email=await Mt(this.url),this.fileUrl=this.url}catch(t){this.email=void 0,this.fileUrl=""}},this.loadDefault=async()=>{this.fileUrl=this.url},this.handleToggleFullscreen=()=>{this.fullscreen.isSupported()&&(this.fullscreen.toggle(),this.isFullscreen=!this.isFullscreen)},this.emitOnAction=t=>{t.stopPropagation(),this.action.emit(t.detail)},this.fullscreen=new d(this.HostElement)}disconnectedCallback(){void 0!==this.revokeAnimationFrame&&cancelAnimationFrame(this.revokeAnimationFrame),this.revokeAnimationFrame=requestAnimationFrame((()=>{this.revokePdfBlobUrl(),this.revokeAnimationFrame=void 0}))}connectedCallback(){void 0!==this.revokeAnimationFrame&&(cancelAnimationFrame(this.revokeAnimationFrame),this.revokeAnimationFrame=void 0)}async componentWillLoad(){this.fileType=p(this.filename,this.url),await this.createURL(this.fileType)}render(){return this.isOfficeFileAccessibleViaURL?this.loading?r("limel-spinner",{size:"x-small",limeBranded:!1}):this.renderFileViewer():this.renderNoFileSupportMessage()}async watchUrl(t,e){t!==e&&(this.loading=!0,this.fileType=p(this.filename,this.fileUrl),await this.createURL(this.fileType))}renderFileViewer(){return({pdf:this.renderPdf,image:this.renderImage,video:this.renderVideo,audio:this.renderAudio,text:this.renderText,email:this.renderEmail,office:this.renderOffice}[this.fileType]||this.renderNoFileSupportMessage)()}revokePdfBlobUrl(){this.pdfBlobUrl&&(URL.revokeObjectURL(this.pdfBlobUrl),this.pdfBlobUrl=void 0)}sanitizeUrl(t){if(!(null==t?void 0:t.trim()))return"";try{const e=new URL(t,window.location.href);return["http:","https:","blob:"].includes(e.protocol)?e.href:""}catch(t){return""}}getTranslation(t){return o.get(t,this.language)}get HostElement(){return s(this)}static get watchers(){return{url:[{watchUrl:0}]}}};Xt.style='@charset "UTF-8";.buttons{position:absolute;z-index:1;bottom:0.25rem;right:0.25rem;display:flex;flex-direction:column;gap:0.25rem}@media (pointer: coarse){.buttons{gap:0.5rem}}.no-support{display:flex;flex-direction:column;gap:0.5rem;align-items:center;border:1px dashed rgb(var(--contrast-600));border-radius:0.5rem;padding:1.25rem}.no-support h1,.no-support p{margin:0}[class^=button--]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}[class^=button--]:hover,[class^=button--]:focus,[class^=button--]:focus-visible{will-change:color, background-color, box-shadow, transform}[class^=button--]:hover,[class^=button--]:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}[class^=button--]:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}[class^=button--]:hover,[class^=button--]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}[class^=button--]:focus{outline:none}[class^=button--]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}[class^=button--]{display:flex;align-items:center;justify-content:center;border-radius:50%;width:var(--limel-file-viewer-size-of-buttons);height:var(--limel-file-viewer-size-of-buttons);background-color:rgba(var(--contrast-100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}[class^=button--] limel-icon{transition:color 0.2s ease;width:1.25rem;color:rgb(var(--contrast-1200))}[class^=button--]:hover limel-icon{color:rgb(var(--contrast-1400))}.action-menu-for-pdf-files,.action-menu-for-office-files{position:absolute;right:0.75rem}.action-menu-for-pdf-files{bottom:0.75rem}.action-menu-for-office-files{top:0.75rem}:host{--limel-file-viewer-size-of-buttons:2rem;isolation:isolate;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:100%}*{box-sizing:border-box}img,video,audio,object,iframe{max-height:100%;max-width:100%;box-sizing:border-box}iframe{border:none;width:100%;height:100%;min-height:20rem}img{min-width:7rem;object-fit:contain}video{width:100%;height:auto}audio{width:100%}object{width:100%;height:100%}object[type="application/pdf"]{min-height:20rem}object[type="text/plain"]{border-radius:0.25rem;padding-right:var(--limel-file-viewer-size-of-buttons);overflow-y:auto}:host(:fullscreen){background-color:rgb(var(--color-gray-darker))}:host(:fullscreen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}:host(:-webkit-full-screen){background-color:rgb(var(--color-gray-darker))}:host(:-webkit-full-screen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}';export{Xt as limel_file_viewer}
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as e}from"./p-BU9IJqli.js";import{c as i}from"./p-BrjD-ITe.js";const r=class{constructor(r){t(this,r),this.itemSelected=o(this,"itemSelected",7),this.menuOpen=o(this,"menuOpen",7),this.close=o(this,"close",7),this.expanded=!1,this.useMobileLayout=!1,this.isOpen=!1,this.renderNotification=()=>{if(void 0!==this.item.badge)return e("limel-badge",{label:this.item.badge})},this.openPopover=t=>{t.stopPropagation(),this.isOpen=!0,this.menuOpen.emit(this.item)},this.setCustomComponentElement=t=>{this.customComponentElement=t},this.onPopoverClose=()=>{this.isOpen=!1,this.close.emit()},this.handleClick=t=>{t.stopPropagation(),this.itemSelected.emit(this.item)},this.focusCustomComponentElement=t=>{var o,e,i;const r=t.find((t=>t.target===this.customComponentElement));(null==r?void 0:r.isIntersecting)&&(null===(e=null===(o=this.customComponentElement)||void 0===o?void 0:o.shadowRoot)||void 0===e?void 0:e.delegatesFocus)&&(null===(i=this.customComponentElement)||void 0===i||i.focus())},this.getOpenDirection=()=>this.useMobileLayout?"top":"right",this.tooltipId=i()}render(){var t,o;return(null===(o=null===(t=this.item)||void 0===t?void 0:t.dockMenu)||void 0===o?void 0:o.componentName)?this.renderPopover():this.renderButton(this.handleClick)}openWatcher(){this.isOpen&&!this.intersectionObserver&&(this.intersectionObserver=new IntersectionObserver(this.focusCustomComponentElement),this.intersectionObserver.observe(this.customComponentElement))}disconnectedCallback(){var t;null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.intersectionObserver=void 0}renderPopover(){var t;const o=null===(t=this.item)||void 0===t?void 0:t.dockMenu.componentName;return e("limel-popover",{openDirection:this.useMobileLayout?"top":"right-start",open:this.isOpen||this.item.dockMenu.menuOpen,onClose:this.onPopoverClose},this.renderButton(this.openPopover,"trigger"),e(o,Object.assign({ref:this.setCustomComponentElement},this.item.dockMenu.props||{},{onClose:this.onPopoverClose})))}renderButton(t,o){var i;return e("button",{slot:o,tabindex:"0",id:this.tooltipId,type:"button",class:{button:!0,selected:null===(i=this.item)||void 0===i?void 0:i.selected},onClick:t,"aria-live":"polite"},this.renderIcon(),this.renderLabel(),this.renderTooltip(),this.renderNotification())}renderIcon(){if(this.item.icon)return e("limel-icon",{name:this.item.icon,class:"icon"})}renderLabel(){return e("span",{class:"text"},this.item.label)}renderTooltip(){return!this.expanded&&this.item.label?e("limel-tooltip",{elementId:this.tooltipId,label:this.item.label,helperLabel:this.item.helperLabel,openDirection:this.getOpenDirection()}):this.expanded&&this.item.helperLabel?e("limel-tooltip",{elementId:this.tooltipId,label:this.item.helperLabel,openDirection:this.getOpenDirection()}):void 0}static get watchers(){return{isOpen:[{openWatcher:0}]}}};r.style='@charset "UTF-8";button.button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;isolation:isolate;position:relative;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-dock-item-text-color);background-color:var(--dock-background-color)}button.button:hover,button.button:focus,button.button:focus-visible{will-change:color, background-color, box-shadow, transform}button.button:hover,button.button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.button:hover{box-shadow:var(--button-shadow-hovered)}button.button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}button.button:hover,button.button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.button:focus{outline:none}button.button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.button{box-sizing:border-box;display:flex;align-items:center;width:100%;height:var(--dock-item-height);border-radius:0.375rem;font-size:var(--limel-theme-default-font-size);padding:0 0.5rem;min-width:var(--dock-item-height)}button.button:hover{z-index:1}button.button.selected{color:var(--limel-dock-item-text-color--selected);background-color:var(--dock-item-background-color--selected, rgb(var(--contrast-200)));box-shadow:var(--button-shadow-inset)}button.button.selected:focus-visible{box-shadow:var(--button-shadow-inset), var(--shadow-depth-8-focused)}button.button.selected .icon{color:var(--limel-dock-item-text--selected)}limel-popover{display:grid;grid-template-columns:100%}limel-popover button[slot=trigger][aria-expanded=true]{box-shadow:var(--button-shadow-inset)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-left:0.5rem;padding-right:0.75rem}limel-dock-button:not([expanded]) .text{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}.icon{flex-shrink:0;width:calc(var(--dock-item-height) - 1rem);height:calc(var(--dock-item-height) - 1rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}limel-badge{position:absolute;top:-0.125rem;right:-0.125rem}.icon{position:relative}.icon:before{text-align:center;pointer-events:none;position:absolute;inset:0;background-color:var(--dock-background-color, rgb(var(--contrast-100)));background-position:center;background-repeat:no-repeat;background-size:contain;background-image:var(--limel-custom-home-icon);content:var(--limel-custom-home-icon-enabler)}.button.selected .icon:before{background-color:var(--dock-item-background-color--selected, rgb(var(--contrast-200)))}';export{r as limel_dock_button}
@@ -1 +1 @@
1
- import{r as e,h as t,H as r}from"./p-BU9IJqli.js";import{m as o}from"./p-I0PrvthC.js";import{g as a}from"./p-Dnt5w_Bp.js";import{d as n}from"./p-_UXAljNc.js";import{a as l}from"./p-BQoih_t0.js";import"./p-B85MJLTf.js";class i{constructor(e){this.handleIntersection=e=>{for(const t of e){if(!t.isIntersecting)continue;const e=t.target,r=e.dataset.src;r&&(e.setAttribute("src",r),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}var s;const d=new Map(Object.entries(null!==(s=n.protocols)&&void 0!==s?s:{}).map((([e,t])=>[e,new Set(t)])));function m(e,t){for(const r of t){const t=e.getAttribute(r);if(!t)continue;const o=c(t);if(void 0===o)continue;const a=f(o);e[b(r)]=a}}function c(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function h(e,t){const r=e.trim(),o=r.indexOf(":");if(-1===o||/[?#/]/.test(r.slice(0,o)))return!0;const a=r.slice(0,o).toLowerCase();return t.has(a)}function f(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(f);const t=Object.assign({},e);for(const e of Object.keys(t)){const r=d.get(e);r&&"string"==typeof t[e]&&!h(t[e],r)?(console.warn(`limel-markdown: Removed unsafe URL from "${e}" during sanitization.`),delete t[e]):"object"==typeof t[e]&&null!==t[e]&&(t[e]=f(t[e]))}return t}function b(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}var u,g="undefined"==typeof document?void 0:document,p=!!g&&"content"in g.createElement("template"),v=!!g&&g.createRange&&"createContextualFragment"in g.createRange();function w(e,t){var r,o,a=e.nodeName,n=t.nodeName;return a===n||(r=a.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?a===n.toUpperCase():o<=90&&r>=97&&n===a.toUpperCase())}function k(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var y={OPTION:function(e,t){var r=e.parentNode;if(r){var o=r.nodeName.toUpperCase();"OPTGROUP"===o&&(o=(r=r.parentNode)&&r.nodeName.toUpperCase()),"SELECT"!==o||r.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}k(e,t,"selected")},INPUT:function(e,t){k(e,t,"checked"),k(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var o=e.firstChild;if(o){var a=o.nodeValue;if(a==r||!r&&a==e.placeholder)return;o.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r,o,a=-1,n=0,l=e.firstChild;l;)if("OPTGROUP"===(o=l.nodeName&&l.nodeName.toUpperCase()))(l=(r=l).firstChild)||(l=r.nextSibling,r=null);else{if("OPTION"===o){if(l.hasAttribute("selected")){a=n;break}n++}!(l=l.nextSibling)&&r&&(l=r.nextSibling,r=null)}e.selectedIndex=a}}};function j(){}function x(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var z=function(e,t,r){if(r||(r={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName){var o=t;(t=g.createElement("html")).innerHTML=o}else if("BODY"===e.nodeName){var a=t;(t=g.createElement("html")).innerHTML=a;var n=t.querySelector("body");n&&(t=n)}else l=(l=t).trim(),t=p?function(e){var t=g.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(l):v?function(e){return u||(u=g.createRange()).selectNode(g.body),u.createContextualFragment(e).childNodes[0]}(l):function(e){var t=g.createElement("body");return t.innerHTML=e,t.childNodes[0]}(l);else 11===t.nodeType&&(t=t.firstElementChild);var l,i=r.getNodeKey||x,s=r.onBeforeNodeAdded||j,d=r.onNodeAdded||j,m=r.onBeforeElUpdated||j,c=r.onElUpdated||j,h=r.onBeforeNodeDiscarded||j,f=r.onNodeDiscarded||j,b=r.onBeforeElChildrenUpdated||j,k=r.skipFromChildren||j,z=r.addChild||function(e,t){return e.appendChild(t)},C=!0===r.childrenOnly,O=Object.create(null),N=[];function T(e){N.push(e)}function q(e,t){if(1===e.nodeType)for(var r=e.firstChild;r;){var o=void 0;t&&(o=i(r))?T(o):(f(r),r.firstChild&&q(r,t)),r=r.nextSibling}}function M(e,t,r){!1!==h(e)&&(t&&t.removeChild(e),f(e),q(e,r))}function P(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var r=i(t);r&&(O[r]=t),P(t),t=t.nextSibling}}function E(e){d(e);for(var t=e.firstChild;t;){var r=t.nextSibling,o=i(t);if(o){var a=O[o];a&&w(t,a)?(t.parentNode.replaceChild(a,t),H(a,t)):E(t)}else E(t);t=r}}function H(e,t,r){var o=i(t);if(o&&delete O[o],!r){var a=m(e,t);if(!1===a)return;if(a instanceof HTMLElement&&P(e=a),function(e,t){var r,o,a,n,l=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var i=l.length-1;i>=0;i--)o=(r=l[i]).name,n=r.value,(a=r.namespaceURI)?e.getAttributeNS(a,o=r.localName||o)!==n&&("xmlns"===r.prefix&&(o=r.name),e.setAttributeNS(a,o,n)):e.getAttribute(o)!==n&&e.setAttribute(o,n);for(var s=e.attributes,d=s.length-1;d>=0;d--)o=(r=s[d]).name,(a=r.namespaceURI)?t.hasAttributeNS(a,o=r.localName||o)||e.removeAttributeNS(a,o):t.hasAttribute(o)||e.removeAttribute(o)}}(e,t),c(e),!1===b(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var r,o,a,n,l,d=k(e,t),m=t.firstChild,c=e.firstChild;e:for(;m;){for(n=m.nextSibling,r=i(m);!d&&c;){if(a=c.nextSibling,m.isSameNode&&m.isSameNode(c)){m=n,c=a;continue e}o=i(c);var h=c.nodeType,f=void 0;if(h===m.nodeType&&(1===h?(r?r!==o&&((l=O[r])?a===l?f=!1:(e.insertBefore(l,c),o?T(o):M(c,e,!0),o=i(c=l)):f=!1):o&&(f=!1),(f=!1!==f&&w(c,m))&&H(c,m)):3!==h&&8!=h||(f=!0,c.nodeValue!==m.nodeValue&&(c.nodeValue=m.nodeValue))),f){m=n,c=a;continue e}o?T(o):M(c,e,!0),c=a}if(r&&(l=O[r])&&w(l,m))d||z(e,l),H(l,m);else{var b=s(m);!1!==b&&(b&&(m=b),m.actualize&&(m=m.actualize(e.ownerDocument||g)),z(e,m),E(m))}m=n,c=a}!function(e,t,r){for(;t;){var o=t.nextSibling;(r=i(t))?T(r):M(t,e,!0),t=o}}(e,c,o);var u=y[e.nodeName];u&&u(e,t)}(e,t):y.TEXTAREA(e,t)}P(e);var I,L,S=e,A=S.nodeType,R=t.nodeType;if(!C)if(1===A)1===R?w(e,t)||(f(e),S=function(e,t){for(var r=e.firstChild;r;){var o=r.nextSibling;t.appendChild(r),r=o}return t}(e,(I=t.nodeName,(L=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==L?g.createElementNS(L,I):g.createElement(I)))):S=t;else if(3===A||8===A){if(R===A)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)f(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(H(S,t,C),N)for(var B=0,U=N.length;B<U;B++){var D=O[N[B]];D&&M(D,D.parentNode,!1)}}return!C&&S!==e&&e.parentNode&&(S.actualize&&(S=S.actualize(e.ownerDocument||g)),e.parentNode.replaceChild(S,e)),S};const C=[{tagName:"limel-chip",attributes:["text","icon","link","badge","disabled","readonly","selected","type","size"]},{tagName:"limel-icon",attributes:["name","size","badge"]},{tagName:"limel-badge",attributes:["label"]},{tagName:"limel-callout",attributes:["heading","icon","type"]},{tagName:"limel-linear-progress",attributes:["value","indeterminate"]},{tagName:"limel-circular-progress",attributes:["value","max-value","prefix","suffix","size","display-percentage-colors"]},{tagName:"limel-spinner",attributes:["size"]},{tagName:"limel-info-tile",attributes:["value","icon","label","prefix","suffix","badge"]}],O=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.adaptColorContrast=!1,this.imageIntersectionObserver=null}async toMarkdown(){await this.rendering;const{exportMarkdown:e}=await import("./p-Bvyt2bmV.js");return e(this.rootElement,this.cachedCombinedWhitelist)}textChanged(){return this.rendering=this.renderMarkdown(),this.rendering}async renderMarkdown(){try{this.cleanupImageIntersectionObserver(),this.cachedCombinedWhitelist&&this.whitelist===this.cachedConsumerWhitelist||(this.cachedConsumerWhitelist=this.whitelist,this.cachedCombinedWhitelist=function(e,t){if(!(null==t?void 0:t.length))return e.map((e=>Object.assign(Object.assign({},e),{attributes:[...e.attributes]})));const r=new Map;for(const o of[...e,...t]){const e=r.get(o.tagName);if(e)for(const t of o.attributes)e.add(t);else r.set(o.tagName,new Set(o.attributes))}return[...r].map((([e,t])=>({tagName:e,attributes:[...t]})))}(C,this.whitelist));const e=this.cachedCombinedWhitelist,t=await o(this.value,{forceHardLineBreaks:!0,whitelist:e,lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});!function(e,t=""){try{z(e,`<div>${t}</div>`,{childrenOnly:!0})}catch(r){console.warn("morphdom failed, falling back to innerHTML:",r),e.innerHTML=t}}(this.rootElement,t),function(e,t){if(e&&(null==t?void 0:t.length))for(const r of t){const t=e.querySelectorAll(r.tagName);for(const e of t)m(e,r.attributes)}}(this.rootElement,e),this.adaptColorContrast&&l(this.rootElement),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleWhitelistChange(){return this.textChanged()}handleRemoveEmptyParagraphsChange(){return this.textChanged()}handleAdaptColorContrastChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(r,{key:"cb9496c27479dce2acf8005bff7c780190f923ba"},t("div",{key:"a48bd187c4b08db7d7b2e105fe4b1c92089d1a57",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new i(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],whitelist:[{handleWhitelistChange:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}],adaptColorContrast:[{handleAdaptColorContrastChange:0}]}}};O.style='@charset "UTF-8";pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:inherit}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:last-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul>li{margin-left:0.75rem}ul>li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{position:relative;margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) th p,:host(limel-markdown:not(.no-table-styles)) th li,:host(limel-markdown:not(.no-table-styles)) th a,:host(limel-markdown:not(.no-table-styles)) td p,:host(limel-markdown:not(.no-table-styles)) td li,:host(limel-markdown:not(.no-table-styles)) td a{word-break:normal;overflow-wrap:normal}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto !important}';export{O as limel_markdown}
1
+ import{r as e,h as t,H as r}from"./p-BU9IJqli.js";import{m as o}from"./p-C0wwdPYT.js";import{g as a}from"./p-Dnt5w_Bp.js";import{d as n}from"./p-_UXAljNc.js";import{a as l}from"./p-BQoih_t0.js";import"./p-B85MJLTf.js";class i{constructor(e){this.handleIntersection=e=>{for(const t of e){if(!t.isIntersecting)continue;const e=t.target,r=e.dataset.src;r&&(e.setAttribute("src",r),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}var s;const d=new Map(Object.entries(null!==(s=n.protocols)&&void 0!==s?s:{}).map((([e,t])=>[e,new Set(t)])));function m(e,t){for(const r of t){const t=e.getAttribute(r);if(!t)continue;const o=c(t);if(void 0===o)continue;const a=f(o);e[b(r)]=a}}function c(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function h(e,t){const r=e.trim(),o=r.indexOf(":");if(-1===o||/[?#/]/.test(r.slice(0,o)))return!0;const a=r.slice(0,o).toLowerCase();return t.has(a)}function f(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(f);const t=Object.assign({},e);for(const e of Object.keys(t)){const r=d.get(e);r&&"string"==typeof t[e]&&!h(t[e],r)?(console.warn(`limel-markdown: Removed unsafe URL from "${e}" during sanitization.`),delete t[e]):"object"==typeof t[e]&&null!==t[e]&&(t[e]=f(t[e]))}return t}function b(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}var u,g="undefined"==typeof document?void 0:document,p=!!g&&"content"in g.createElement("template"),v=!!g&&g.createRange&&"createContextualFragment"in g.createRange();function w(e,t){var r,o,a=e.nodeName,n=t.nodeName;return a===n||(r=a.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?a===n.toUpperCase():o<=90&&r>=97&&n===a.toUpperCase())}function k(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var y={OPTION:function(e,t){var r=e.parentNode;if(r){var o=r.nodeName.toUpperCase();"OPTGROUP"===o&&(o=(r=r.parentNode)&&r.nodeName.toUpperCase()),"SELECT"!==o||r.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}k(e,t,"selected")},INPUT:function(e,t){k(e,t,"checked"),k(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var o=e.firstChild;if(o){var a=o.nodeValue;if(a==r||!r&&a==e.placeholder)return;o.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r,o,a=-1,n=0,l=e.firstChild;l;)if("OPTGROUP"===(o=l.nodeName&&l.nodeName.toUpperCase()))(l=(r=l).firstChild)||(l=r.nextSibling,r=null);else{if("OPTION"===o){if(l.hasAttribute("selected")){a=n;break}n++}!(l=l.nextSibling)&&r&&(l=r.nextSibling,r=null)}e.selectedIndex=a}}};function j(){}function x(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var z=function(e,t,r){if(r||(r={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName){var o=t;(t=g.createElement("html")).innerHTML=o}else if("BODY"===e.nodeName){var a=t;(t=g.createElement("html")).innerHTML=a;var n=t.querySelector("body");n&&(t=n)}else l=(l=t).trim(),t=p?function(e){var t=g.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(l):v?function(e){return u||(u=g.createRange()).selectNode(g.body),u.createContextualFragment(e).childNodes[0]}(l):function(e){var t=g.createElement("body");return t.innerHTML=e,t.childNodes[0]}(l);else 11===t.nodeType&&(t=t.firstElementChild);var l,i=r.getNodeKey||x,s=r.onBeforeNodeAdded||j,d=r.onNodeAdded||j,m=r.onBeforeElUpdated||j,c=r.onElUpdated||j,h=r.onBeforeNodeDiscarded||j,f=r.onNodeDiscarded||j,b=r.onBeforeElChildrenUpdated||j,k=r.skipFromChildren||j,z=r.addChild||function(e,t){return e.appendChild(t)},C=!0===r.childrenOnly,O=Object.create(null),T=[];function N(e){T.push(e)}function q(e,t){if(1===e.nodeType)for(var r=e.firstChild;r;){var o=void 0;t&&(o=i(r))?N(o):(f(r),r.firstChild&&q(r,t)),r=r.nextSibling}}function M(e,t,r){!1!==h(e)&&(t&&t.removeChild(e),f(e),q(e,r))}function P(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var r=i(t);r&&(O[r]=t),P(t),t=t.nextSibling}}function E(e){d(e);for(var t=e.firstChild;t;){var r=t.nextSibling,o=i(t);if(o){var a=O[o];a&&w(t,a)?(t.parentNode.replaceChild(a,t),H(a,t)):E(t)}else E(t);t=r}}function H(e,t,r){var o=i(t);if(o&&delete O[o],!r){var a=m(e,t);if(!1===a)return;if(a instanceof HTMLElement&&P(e=a),function(e,t){var r,o,a,n,l=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var i=l.length-1;i>=0;i--)o=(r=l[i]).name,n=r.value,(a=r.namespaceURI)?e.getAttributeNS(a,o=r.localName||o)!==n&&("xmlns"===r.prefix&&(o=r.name),e.setAttributeNS(a,o,n)):e.getAttribute(o)!==n&&e.setAttribute(o,n);for(var s=e.attributes,d=s.length-1;d>=0;d--)o=(r=s[d]).name,(a=r.namespaceURI)?t.hasAttributeNS(a,o=r.localName||o)||e.removeAttributeNS(a,o):t.hasAttribute(o)||e.removeAttribute(o)}}(e,t),c(e),!1===b(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var r,o,a,n,l,d=k(e,t),m=t.firstChild,c=e.firstChild;e:for(;m;){for(n=m.nextSibling,r=i(m);!d&&c;){if(a=c.nextSibling,m.isSameNode&&m.isSameNode(c)){m=n,c=a;continue e}o=i(c);var h=c.nodeType,f=void 0;if(h===m.nodeType&&(1===h?(r?r!==o&&((l=O[r])?a===l?f=!1:(e.insertBefore(l,c),o?N(o):M(c,e,!0),o=i(c=l)):f=!1):o&&(f=!1),(f=!1!==f&&w(c,m))&&H(c,m)):3!==h&&8!=h||(f=!0,c.nodeValue!==m.nodeValue&&(c.nodeValue=m.nodeValue))),f){m=n,c=a;continue e}o?N(o):M(c,e,!0),c=a}if(r&&(l=O[r])&&w(l,m))d||z(e,l),H(l,m);else{var b=s(m);!1!==b&&(b&&(m=b),m.actualize&&(m=m.actualize(e.ownerDocument||g)),z(e,m),E(m))}m=n,c=a}!function(e,t,r){for(;t;){var o=t.nextSibling;(r=i(t))?N(r):M(t,e,!0),t=o}}(e,c,o);var u=y[e.nodeName];u&&u(e,t)}(e,t):y.TEXTAREA(e,t)}P(e);var I,L,S=e,A=S.nodeType,R=t.nodeType;if(!C)if(1===A)1===R?w(e,t)||(f(e),S=function(e,t){for(var r=e.firstChild;r;){var o=r.nextSibling;t.appendChild(r),r=o}return t}(e,(I=t.nodeName,(L=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==L?g.createElementNS(L,I):g.createElement(I)))):S=t;else if(3===A||8===A){if(R===A)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)f(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(H(S,t,C),T)for(var B=0,U=T.length;B<U;B++){var D=O[T[B]];D&&M(D,D.parentNode,!1)}}return!C&&S!==e&&e.parentNode&&(S.actualize&&(S=S.actualize(e.ownerDocument||g)),e.parentNode.replaceChild(S,e)),S};const C=[{tagName:"limel-chip",attributes:["text","icon","link","badge","disabled","readonly","selected","type","size"]},{tagName:"limel-icon",attributes:["name","size","badge"]},{tagName:"limel-badge",attributes:["label"]},{tagName:"limel-callout",attributes:["heading","icon","type"]},{tagName:"limel-linear-progress",attributes:["value","indeterminate"]},{tagName:"limel-circular-progress",attributes:["value","max-value","prefix","suffix","size","display-percentage-colors"]},{tagName:"limel-spinner",attributes:["size"]},{tagName:"limel-info-tile",attributes:["value","icon","label","prefix","suffix","badge"]}],O=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.adaptColorContrast=!1,this.imageIntersectionObserver=null}async toMarkdown(){await this.rendering;const{exportMarkdown:e}=await import("./p-Bgn2bikC.js");return e(this.rootElement,this.cachedCombinedWhitelist)}textChanged(){return this.rendering=this.renderMarkdown(),this.rendering}async renderMarkdown(){try{this.cleanupImageIntersectionObserver(),this.cachedCombinedWhitelist&&this.whitelist===this.cachedConsumerWhitelist||(this.cachedConsumerWhitelist=this.whitelist,this.cachedCombinedWhitelist=function(e,t){if(!(null==t?void 0:t.length))return e.map((e=>Object.assign(Object.assign({},e),{attributes:[...e.attributes]})));const r=new Map;for(const o of[...e,...t]){const e=r.get(o.tagName);if(e)for(const t of o.attributes)e.add(t);else r.set(o.tagName,new Set(o.attributes))}return[...r].map((([e,t])=>({tagName:e,attributes:[...t]})))}(C,this.whitelist));const e=this.cachedCombinedWhitelist,t=await o(this.value,{forceHardLineBreaks:!0,whitelist:e,lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});!function(e,t=""){try{z(e,`<div>${t}</div>`,{childrenOnly:!0})}catch(r){console.warn("morphdom failed, falling back to innerHTML:",r),e.innerHTML=t}}(this.rootElement,t),function(e,t){if(e&&(null==t?void 0:t.length))for(const r of t){const t=e.querySelectorAll(r.tagName);for(const e of t)m(e,r.attributes)}}(this.rootElement,e),this.adaptColorContrast&&l(this.rootElement),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleWhitelistChange(){return this.textChanged()}handleRemoveEmptyParagraphsChange(){return this.textChanged()}handleAdaptColorContrastChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(r,{key:"cb9496c27479dce2acf8005bff7c780190f923ba"},t("div",{key:"a48bd187c4b08db7d7b2e105fe4b1c92089d1a57",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new i(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],whitelist:[{handleWhitelistChange:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}],adaptColorContrast:[{handleAdaptColorContrastChange:0}]}}};O.style='@charset "UTF-8";pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:inherit}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:last-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul>li{margin-left:0.75rem}ul>li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{position:relative;margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) th p,:host(limel-markdown:not(.no-table-styles)) th li,:host(limel-markdown:not(.no-table-styles)) th a,:host(limel-markdown:not(.no-table-styles)) td p,:host(limel-markdown:not(.no-table-styles)) td li,:host(limel-markdown:not(.no-table-styles)) td a{word-break:normal;overflow-wrap:normal}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto !important}';export{O as limel_markdown}