@gnai/message-content-renderer 0.1.3 → 0.1.4

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.
@@ -1 +1 @@
1
- .vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;inset:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff;border-radius:4px}.vjs-tree-node.is-highlight .vjs-tree-node-actions,.vjs-tree-node:hover .vjs-tree-node-actions{display:block}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node .vjs-tree-node-actions{display:none;position:absolute;right:0;top:0;padding:0 4px;background-color:#e6f7ff;border-radius:4px}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item{cursor:pointer}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item:hover{color:#1890ff}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark .vjs-tree-node-actions,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.image-viewer[data-v-92c159ee]{position:fixed;inset:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2000;padding:32px;cursor:zoom-out}.close-button[data-v-92c159ee]{position:fixed;top:24px;right:24px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;border-radius:50%;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);z-index:2001}.close-button[data-v-92c159ee]:hover{background:#000c;transform:scale(1.1)}.close-button svg[data-v-92c159ee]{width:24px;height:24px}.viewer-content[data-v-92c159ee]{max-width:90%;max-height:90%;display:flex;align-items:center;justify-content:center;cursor:default}.viewer-content img[data-v-92c159ee]{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px;box-shadow:0 8px 32px #00000080}.viewer-enter-active[data-v-92c159ee],.viewer-leave-active[data-v-92c159ee]{transition:opacity .2s cubic-bezier(.4,0,.2,1)}.viewer-enter-from[data-v-92c159ee],.viewer-leave-to[data-v-92c159ee]{opacity:0}@media(max-width:768px){.image-viewer[data-v-92c159ee]{padding:16px}.close-button[data-v-92c159ee]{top:16px;right:16px;width:40px;height:40px}.close-button svg[data-v-92c159ee]{width:20px;height:20px}.viewer-content img[data-v-92c159ee]{border-radius:6px}}.content-text[data-v-a6c720b9]{font-size:15px;line-height:1.6;color:#1d1d1f;background:#fff;border-radius:10px;padding:10px 14px;display:inline-block;max-width:100%}.content-text[data-v-a6c720b9] p{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-a6c720b9] p:last-child{margin-bottom:0}.content-text[data-v-a6c720b9] code{background:#fff;padding:2px 6px;border-radius:4px;font-family:Courier New,monospace;font-size:14px}.content-text[data-v-a6c720b9] pre{background:#fff;padding:16px;border-radius:10px;overflow-x:auto;margin:8px 0}.content-text[data-v-a6c720b9] pre code{background:none;padding:0}.content-text[data-v-a6c720b9] a{color:#007aff;text-decoration:none}.content-text[data-v-a6c720b9] a:hover{text-decoration:underline}.content-text[data-v-a6c720b9] ul,.content-text[data-v-a6c720b9] ol{margin:8px 0;padding-left:32px}.content-text[data-v-a6c720b9] blockquote{border-left:4px solid #d2d2d7;padding-left:16px;margin:8px 0;color:#6e6e73}.content-text.role-user[data-v-a6c720b9]{background:#007aff;color:#fff}.content-text.role-user[data-v-a6c720b9] a{color:#fff}.content-file[data-v-24190b61]{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid #d2d2d7;border-radius:10px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.content-file[data-v-24190b61]:hover{background:#f5f5f7;border-color:#007aff}.content-file .file-icon[data-v-24190b61]{width:20px;height:20px;color:#6e6e73}.content-file .file-name[data-v-24190b61]{font-size:14px;color:#1d1d1f;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-file .download-icon[data-v-24190b61]{width:16px;height:16px;color:#007aff}@media(max-width:768px){.content-file .file-name[data-v-24190b61]{max-width:150px}}.message-image[data-v-24952cda]{display:block;max-width:300px;width:auto;height:220px;border-radius:10px;object-fit:cover;cursor:pointer;transition:transform .2s cubic-bezier(.4,0,.2,1)}.message-image[data-v-24952cda]:hover{transform:scale(1.02)}.message-image.is-full-width[data-v-24952cda]{width:100%;max-width:100%}@media(max-width:768px){.message-image[data-v-24952cda]{max-width:200px;height:180px}}.message-video[data-v-28c3e763]{display:block;max-width:100%;height:220px;border-radius:10px}.message-video.is-full-width[data-v-28c3e763]{width:100%}@media(max-width:768px){.message-video[data-v-28c3e763]{height:180px}}.message-audio[data-v-c0d42074]{max-width:100%;height:40px}.message-content-renderer[data-v-adfc2d98]{display:inline-flex;max-width:100%}.content-user-message[data-v-adfc2d98]{display:flex;flex-direction:column;gap:16px;align-items:flex-end}.files-grid[data-v-adfc2d98]{display:inline-flex;flex-direction:column;align-items:flex-end;gap:8px}.content-medialib .json-viewer[data-v-adfc2d98]{background:#fff;padding:16px;border-radius:10px;font-size:13px;max-height:400px;overflow:auto}
1
+ .vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;inset:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff;border-radius:4px}.vjs-tree-node.is-highlight .vjs-tree-node-actions,.vjs-tree-node:hover .vjs-tree-node-actions{display:block}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node .vjs-tree-node-actions{display:none;position:absolute;right:0;top:0;padding:0 4px;background-color:#e6f7ff;border-radius:4px}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item{cursor:pointer}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item:hover{color:#1890ff}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark .vjs-tree-node-actions,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.image-viewer[data-v-92c159ee]{position:fixed;inset:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2000;padding:32px;cursor:zoom-out}.close-button[data-v-92c159ee]{position:fixed;top:24px;right:24px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;border-radius:50%;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);z-index:2001}.close-button[data-v-92c159ee]:hover{background:#000c;transform:scale(1.1)}.close-button svg[data-v-92c159ee]{width:24px;height:24px}.viewer-content[data-v-92c159ee]{max-width:90%;max-height:90%;display:flex;align-items:center;justify-content:center;cursor:default}.viewer-content img[data-v-92c159ee]{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px;box-shadow:0 8px 32px #00000080}.viewer-enter-active[data-v-92c159ee],.viewer-leave-active[data-v-92c159ee]{transition:opacity .2s cubic-bezier(.4,0,.2,1)}.viewer-enter-from[data-v-92c159ee],.viewer-leave-to[data-v-92c159ee]{opacity:0}@media(max-width:768px){.image-viewer[data-v-92c159ee]{padding:16px}.close-button[data-v-92c159ee]{top:16px;right:16px;width:40px;height:40px}.close-button svg[data-v-92c159ee]{width:20px;height:20px}.viewer-content img[data-v-92c159ee]{border-radius:6px}}.content-text[data-v-a6c720b9]{font-size:15px;line-height:1.6;color:#1d1d1f;background:#fff;border-radius:10px;padding:10px 14px;display:inline-block;max-width:100%}.content-text[data-v-a6c720b9] p{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-a6c720b9] p:last-child{margin-bottom:0}.content-text[data-v-a6c720b9] code{background:#fff;padding:2px 6px;border-radius:4px;font-family:Courier New,monospace;font-size:14px}.content-text[data-v-a6c720b9] pre{background:#fff;padding:16px;border-radius:10px;overflow-x:auto;margin:8px 0}.content-text[data-v-a6c720b9] pre code{background:none;padding:0}.content-text[data-v-a6c720b9] a{color:#007aff;text-decoration:none}.content-text[data-v-a6c720b9] a:hover{text-decoration:underline}.content-text[data-v-a6c720b9] ul,.content-text[data-v-a6c720b9] ol{margin:8px 0;padding-left:32px}.content-text[data-v-a6c720b9] blockquote{border-left:4px solid #d2d2d7;padding-left:16px;margin:8px 0;color:#6e6e73}.content-text.role-user[data-v-a6c720b9]{background:#007aff;color:#fff}.content-text.role-user[data-v-a6c720b9] a{color:#fff}.content-file[data-v-24190b61]{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid #d2d2d7;border-radius:10px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.content-file[data-v-24190b61]:hover{background:#f5f5f7;border-color:#007aff}.content-file .file-icon[data-v-24190b61]{width:20px;height:20px;color:#6e6e73}.content-file .file-name[data-v-24190b61]{font-size:14px;color:#1d1d1f;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-file .download-icon[data-v-24190b61]{width:16px;height:16px;color:#007aff}@media(max-width:768px){.content-file .file-name[data-v-24190b61]{max-width:150px}}.message-image[data-v-24952cda]{display:block;max-width:300px;width:auto;height:220px;border-radius:10px;object-fit:cover;cursor:pointer;transition:transform .2s cubic-bezier(.4,0,.2,1)}.message-image[data-v-24952cda]:hover{transform:scale(1.02)}.message-image.is-full-width[data-v-24952cda]{width:100%;max-width:100%}@media(max-width:768px){.message-image[data-v-24952cda]{max-width:200px;height:180px}}.message-video[data-v-28c3e763]{display:block;max-width:100%;height:220px;border-radius:10px}.message-video.is-full-width[data-v-28c3e763]{width:100%}@media(max-width:768px){.message-video[data-v-28c3e763]{height:180px}}.message-audio[data-v-c0d42074]{max-width:100%;height:40px}.message-content-renderer[data-v-c620f628]{display:inline-flex;max-width:100%}.content-user-message[data-v-c620f628]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.files-grid[data-v-c620f628]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px}.role-user .content-user-message[data-v-c620f628],.role-user .files-grid[data-v-c620f628]{align-items:flex-end}.content-medialib .json-viewer[data-v-c620f628]{background:#fff;padding:16px;border-radius:10px;font-size:13px;max-height:400px;overflow:auto}
@@ -5161,7 +5161,7 @@ const _c = {
5161
5161
  }, null, 8, ["show", "image-url"])
5162
5162
  ], 2));
5163
5163
  }
5164
- }), jc = /* @__PURE__ */ xu(Mc, [["__scopeId", "data-v-adfc2d98"]]);
5164
+ }), jc = /* @__PURE__ */ xu(Mc, [["__scopeId", "data-v-c620f628"]]);
5165
5165
  export {
5166
5166
  Cc as ImageViewer,
5167
5167
  jc as MessageContentRenderer
@@ -15,4 +15,4 @@
15
15
  `),e=e.replace(K0,"�"),u.src=e}function X0(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function un(u){const e=u.tokens;for(let t=0,n=e.length;t<n;t++){const r=e[t];r.type==="inline"&&u.md.inline.parse(r.content,u.md,u.env,r.children)}}function en(u){return/^<a[>\s]/i.test(u)}function tn(u){return/^<\/a\s*>/i.test(u)}function nn(u){const e=u.tokens;if(u.md.options.linkify)for(let t=0,n=e.length;t<n;t++){if(e[t].type!=="inline"||!u.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let c=r.length-1;c>=0;c--){const i=r[c];if(i.type==="link_close"){for(c--;r[c].level!==i.level&&r[c].type!=="link_open";)c--;continue}if(i.type==="html_inline"&&(en(i.content)&&o>0&&o--,tn(i.content)&&o++),!(o>0)&&i.type==="text"&&u.md.linkify.test(i.content)){const a=i.content;let s=u.md.linkify.match(a);const l=[];let f=i.level,x=0;s.length>0&&s[0].index===0&&c>0&&r[c-1].type==="text_special"&&(s=s.slice(1));for(let m=0;m<s.length;m++){const d=s[m].url,D=u.md.normalizeLink(d);if(!u.md.validateLink(D))continue;let g=s[m].text;s[m].schema?s[m].schema==="mailto:"&&!/^mailto:/i.test(g)?g=u.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=u.md.normalizeLinkText(g):g=u.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");const w=s[m].index;if(w>x){const C=new u.Token("text","",0);C.content=a.slice(x,w),C.level=f,l.push(C)}const v=new u.Token("link_open","a",1);v.attrs=[["href",D]],v.level=f++,v.markup="linkify",v.info="auto",l.push(v);const F=new u.Token("text","",0);F.content=g,F.level=f,l.push(F);const h=new u.Token("link_close","a",-1);h.level=--f,h.markup="linkify",h.info="auto",l.push(h),x=s[m].lastIndex}if(x<a.length){const m=new u.Token("text","",0);m.content=a.slice(x),m.level=f,l.push(m)}e[t].children=r=Ve(r,c,l)}}}}const Ze=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,rn=/\((c|tm|r)\)/i,on=/\((c|tm|r)\)/ig,cn={c:"©",r:"®",tm:"™"};function an(u,e){return cn[e.toLowerCase()]}function sn(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&(n.content=n.content.replace(on,an)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function ln(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&Ze.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function fn(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(rn.test(u.tokens[e].content)&&sn(u.tokens[e].children),Ze.test(u.tokens[e].content)&&ln(u.tokens[e].children))}const dn=/['"]/,Ge=/['"]/g,We="’";function Mu(u,e,t){return u.slice(0,e)+t+u.slice(e+1)}function hn(u,e){let t;const n=[];for(let r=0;r<u.length;r++){const o=u[r],c=u[r].level;for(t=n.length-1;t>=0&&!(n[t].level<=c);t--);if(n.length=t+1,o.type!=="text")continue;let i=o.content,a=0,s=i.length;u:for(;a<s;){Ge.lastIndex=a;const l=Ge.exec(i);if(!l)break;let f=!0,x=!0;a=l.index+1;const m=l[0]==="'";let d=32;if(l.index-1>=0)d=i.charCodeAt(l.index-1);else for(t=r-1;t>=0&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t--)if(u[t].content){d=u[t].content.charCodeAt(u[t].content.length-1);break}let D=32;if(a<s)D=i.charCodeAt(a);else for(t=r+1;t<u.length&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t++)if(u[t].content){D=u[t].content.charCodeAt(0);break}const g=vu(d)||Cu(String.fromCharCode(d)),w=vu(D)||Cu(String.fromCharCode(D)),v=yu(d),F=yu(D);if(F?f=!1:w&&(v||g||(f=!1)),v?x=!1:g&&(F||w||(x=!1)),D===34&&l[0]==='"'&&d>=48&&d<=57&&(x=f=!1),f&&x&&(f=g,x=w),!f&&!x){m&&(o.content=Mu(o.content,l.index,We));continue}if(x)for(t=n.length-1;t>=0;t--){let h=n[t];if(n[t].level<c)break;if(h.single===m&&n[t].level===c){h=n[t];let C,p;m?(C=e.md.options.quotes[2],p=e.md.options.quotes[3]):(C=e.md.options.quotes[0],p=e.md.options.quotes[1]),o.content=Mu(o.content,l.index,p),u[h.token].content=Mu(u[h.token].content,h.pos,C),a+=p.length-1,h.token===r&&(a+=C.length-1),i=o.content,s=i.length,n.length=t;continue u}}f?n.push({token:r,pos:l.index,single:m,level:c}):x&&m&&(o.content=Mu(o.content,l.index,We))}}}function pn(u){if(u.md.options.typographer)for(let e=u.tokens.length-1;e>=0;e--)u.tokens[e].type!=="inline"||!dn.test(u.tokens[e].content)||hn(u.tokens[e].children,u)}function bn(u){let e,t;const n=u.tokens,r=n.length;for(let o=0;o<r;o++){if(n[o].type!=="inline")continue;const c=n[o].children,i=c.length;for(e=0;e<i;e++)c[e].type==="text_special"&&(c[e].type="text");for(e=t=0;e<i;e++)c[e].type==="text"&&e+1<i&&c[e+1].type==="text"?c[e+1].content=c[e].content+c[e+1].content:(e!==t&&(c[t]=c[e]),t++);e!==t&&(c.length=t)}}const ee=[["normalize",Y0],["block",X0],["inline",un],["linkify",nn],["replacements",fn],["smartquotes",pn],["text_join",bn]];function te(){this.ruler=new H;for(let u=0;u<ee.length;u++)this.ruler.push(ee[u][0],ee[u][1])}te.prototype.process=function(u){const e=this.ruler.getRules("");for(let t=0,n=e.length;t<n;t++)e[t](u)},te.prototype.State=Ue;function uu(u,e,t,n){this.src=u,this.md=e,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,c=0,i=0,a=0,s=r.length,l=!1;c<s;c++){const f=r.charCodeAt(c);if(!l)if(M(f)){i++,f===9?a+=4-a%4:a++;continue}else l=!0;(f===10||c===s-1)&&(f!==10&&c++,this.bMarks.push(o),this.eMarks.push(c),this.tShift.push(i),this.sCount.push(a),this.bsCount.push(0),l=!1,i=0,a=0,o=c+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}uu.prototype.push=function(u,e,t){const n=new J(u,e,t);return n.block=!0,t<0&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},uu.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},uu.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},uu.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const n=this.src.charCodeAt(e);if(!M(n))break}return e},uu.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!M(this.src.charCodeAt(--e)))return e+1;return e},uu.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},uu.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},uu.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const o=new Array(t-e);for(let c=0,i=e;i<t;i++,c++){let a=0;const s=this.bMarks[i];let l=s,f;for(i+1<t||r?f=this.eMarks[i]+1:f=this.eMarks[i];l<f&&a<n;){const x=this.src.charCodeAt(l);if(M(x))x===9?a+=4-(a+this.bsCount[i])%4:a++;else if(l-s<this.tShift[i])a++;else break;l++}a>n?o[c]=new Array(a-n+1).join(" ")+this.src.slice(l,f):o[c]=this.src.slice(l,f)}return o.join("")},uu.prototype.Token=J;const mn=65536;function ne(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];return u.src.slice(t,n)}function Qe(u){const e=[],t=u.length;let n=0,r=u.charCodeAt(n),o=!1,c=0,i="";for(;n<t;)r===124&&(o?(i+=u.substring(c,n-1),c=n):(e.push(i+u.substring(c,n)),i="",c=n+1)),o=r===92,n++,r=u.charCodeAt(n);return e.push(i+u.substring(c)),e}function xn(u,e,t,n){if(e+2>t)return!1;let r=e+1;if(u.sCount[r]<u.blkIndent||u.sCount[r]-u.blkIndent>=4)return!1;let o=u.bMarks[r]+u.tShift[r];if(o>=u.eMarks[r])return!1;const c=u.src.charCodeAt(o++);if(c!==124&&c!==45&&c!==58||o>=u.eMarks[r])return!1;const i=u.src.charCodeAt(o++);if(i!==124&&i!==45&&i!==58&&!M(i)||c===45&&M(i))return!1;for(;o<u.eMarks[r];){const h=u.src.charCodeAt(o);if(h!==124&&h!==45&&h!==58&&!M(h))return!1;o++}let a=ne(u,e+1),s=a.split("|");const l=[];for(let h=0;h<s.length;h++){const C=s[h].trim();if(!C){if(h===0||h===s.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?l.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?l.push("left"):l.push("")}if(a=ne(u,e).trim(),a.indexOf("|")===-1||u.sCount[e]-u.blkIndent>=4)return!1;s=Qe(a),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop();const f=s.length;if(f===0||f!==l.length)return!1;if(n)return!0;const x=u.parentType;u.parentType="table";const m=u.md.block.ruler.getRules("blockquote"),d=u.push("table_open","table",1),D=[e,0];d.map=D;const g=u.push("thead_open","thead",1);g.map=[e,e+1];const w=u.push("tr_open","tr",1);w.map=[e,e+1];for(let h=0;h<s.length;h++){const C=u.push("th_open","th",1);l[h]&&(C.attrs=[["style","text-align:"+l[h]]]);const p=u.push("inline","",0);p.content=s[h].trim(),p.children=[],u.push("th_close","th",-1)}u.push("tr_close","tr",-1),u.push("thead_close","thead",-1);let v,F=0;for(r=e+2;r<t&&!(u.sCount[r]<u.blkIndent);r++){let h=!1;for(let p=0,_=m.length;p<_;p++)if(m[p](u,r,t,!0)){h=!0;break}if(h||(a=ne(u,r).trim(),!a)||u.sCount[r]-u.blkIndent>=4||(s=Qe(a),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop(),F+=f-s.length,F>mn))break;if(r===e+2){const p=u.push("tbody_open","tbody",1);p.map=v=[e+2,0]}const C=u.push("tr_open","tr",1);C.map=[r,r+1];for(let p=0;p<f;p++){const _=u.push("td_open","td",1);l[p]&&(_.attrs=[["style","text-align:"+l[p]]]);const E=u.push("inline","",0);E.content=s[p]?s[p].trim():"",E.children=[],u.push("td_close","td",-1)}u.push("tr_close","tr",-1)}return v&&(u.push("tbody_close","tbody",-1),v[1]=r),u.push("table_close","table",-1),D[1]=r,u.parentType=x,u.line=r,!0}function gn(u,e,t){if(u.sCount[e]-u.blkIndent<4)return!1;let n=e+1,r=n;for(;n<t;){if(u.isEmpty(n)){n++;continue}if(u.sCount[n]-u.blkIndent>=4){n++,r=n;continue}break}u.line=r;const o=u.push("code_block","code",0);return o.content=u.getLines(e,r,4+u.blkIndent,!1)+`
16
16
  `,o.map=[e,u.line],!0}function _n(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||r+3>o)return!1;const c=u.src.charCodeAt(r);if(c!==126&&c!==96)return!1;let i=r;r=u.skipChars(r,c);let a=r-i;if(a<3)return!1;const s=u.src.slice(i,r),l=u.src.slice(r,o);if(c===96&&l.indexOf(String.fromCharCode(c))>=0)return!1;if(n)return!0;let f=e,x=!1;for(;f++,!(f>=t||(r=i=u.bMarks[f]+u.tShift[f],o=u.eMarks[f],r<o&&u.sCount[f]<u.blkIndent));)if(u.src.charCodeAt(r)===c&&!(u.sCount[f]-u.blkIndent>=4)&&(r=u.skipChars(r,c),!(r-i<a)&&(r=u.skipSpaces(r),!(r<o)))){x=!0;break}a=u.sCount[e],u.line=f+(x?1:0);const m=u.push("fence","code",0);return m.info=l,m.content=u.getLines(e+1,f,a,!0),m.markup=s,m.map=[e,u.line],!0}function kn(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];const c=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==62)return!1;if(n)return!0;const i=[],a=[],s=[],l=[],f=u.md.block.ruler.getRules("blockquote"),x=u.parentType;u.parentType="blockquote";let m=!1,d;for(d=e;d<t;d++){const F=u.sCount[d]<u.blkIndent;if(r=u.bMarks[d]+u.tShift[d],o=u.eMarks[d],r>=o)break;if(u.src.charCodeAt(r++)===62&&!F){let C=u.sCount[d]+1,p,_;u.src.charCodeAt(r)===32?(r++,C++,_=!1,p=!0):u.src.charCodeAt(r)===9?(p=!0,(u.bsCount[d]+C)%4===3?(r++,C++,_=!1):_=!0):p=!1;let E=C;for(i.push(u.bMarks[d]),u.bMarks[d]=r;r<o;){const I=u.src.charCodeAt(r);if(M(I))I===9?E+=4-(E+u.bsCount[d]+(_?1:0))%4:E++;else break;r++}m=r>=o,a.push(u.bsCount[d]),u.bsCount[d]=u.sCount[d]+1+(p?1:0),s.push(u.sCount[d]),u.sCount[d]=E-C,l.push(u.tShift[d]),u.tShift[d]=r-u.bMarks[d];continue}if(m)break;let h=!1;for(let C=0,p=f.length;C<p;C++)if(f[C](u,d,t,!0)){h=!0;break}if(h){u.lineMax=d,u.blkIndent!==0&&(i.push(u.bMarks[d]),a.push(u.bsCount[d]),l.push(u.tShift[d]),s.push(u.sCount[d]),u.sCount[d]-=u.blkIndent);break}i.push(u.bMarks[d]),a.push(u.bsCount[d]),l.push(u.tShift[d]),s.push(u.sCount[d]),u.sCount[d]=-1}const D=u.blkIndent;u.blkIndent=0;const g=u.push("blockquote_open","blockquote",1);g.markup=">";const w=[e,0];g.map=w,u.md.block.tokenize(u,e,d);const v=u.push("blockquote_close","blockquote",-1);v.markup=">",u.lineMax=c,u.parentType=x,w[1]=u.line;for(let F=0;F<l.length;F++)u.bMarks[F+e]=i[F],u.tShift[F+e]=l[F],u.sCount[F+e]=s[F],u.bsCount[F+e]=a[F];return u.blkIndent=D,!0}function yn(u,e,t,n){const r=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let o=u.bMarks[e]+u.tShift[e];const c=u.src.charCodeAt(o++);if(c!==42&&c!==45&&c!==95)return!1;let i=1;for(;o<r;){const s=u.src.charCodeAt(o++);if(s!==c&&!M(s))return!1;s===c&&i++}if(i<3)return!1;if(n)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(i+1).join(String.fromCharCode(c)),!0}function Je(u,e){const t=u.eMarks[e];let n=u.bMarks[e]+u.tShift[e];const r=u.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<t){const o=u.src.charCodeAt(n);if(!M(o))return-1}return n}function Ke(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];let r=t;if(r+1>=n)return-1;let o=u.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=n)return-1;if(o=u.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<n&&(o=u.src.charCodeAt(r),!M(o))?-1:r}function Cn(u,e){const t=u.level+2;for(let n=e+2,r=u.tokens.length-2;n<r;n++)u.tokens[n].level===t&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function vn(u,e,t,n){let r,o,c,i,a=e,s=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let l=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(l=!0);let f,x,m;if((m=Ke(u,a))>=0){if(f=!0,c=u.bMarks[a]+u.tShift[a],x=Number(u.src.slice(c,m-1)),l&&x!==1)return!1}else if((m=Je(u,a))>=0)f=!1;else return!1;if(l&&u.skipSpaces(m)>=u.eMarks[a])return!1;if(n)return!0;const d=u.src.charCodeAt(m-1),D=u.tokens.length;f?(i=u.push("ordered_list_open","ol",1),x!==1&&(i.attrs=[["start",x]])):i=u.push("bullet_list_open","ul",1);const g=[a,0];i.map=g,i.markup=String.fromCharCode(d);let w=!1;const v=u.md.block.ruler.getRules("list"),F=u.parentType;for(u.parentType="list";a<t;){o=m,r=u.eMarks[a];const h=u.sCount[a]+m-(u.bMarks[a]+u.tShift[a]);let C=h;for(;o<r;){const P=u.src.charCodeAt(o);if(P===9)C+=4-(C+u.bsCount[a])%4;else if(P===32)C++;else break;o++}const p=o;let _;p>=r?_=1:_=C-h,_>4&&(_=1);const E=h+_;i=u.push("list_item_open","li",1),i.markup=String.fromCharCode(d);const I=[a,0];i.map=I,f&&(i.info=u.src.slice(c,m-1));const B=u.tight,j=u.tShift[a],O=u.sCount[a],q=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=E,u.tight=!0,u.tShift[a]=p-u.bMarks[a],u.sCount[a]=C,p>=r&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,a,t,!0),(!u.tight||w)&&(s=!1),w=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=q,u.tShift[a]=j,u.sCount[a]=O,u.tight=B,i=u.push("list_item_close","li",-1),i.markup=String.fromCharCode(d),a=u.line,I[1]=a,a>=t||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let Q=!1;for(let P=0,nu=v.length;P<nu;P++)if(v[P](u,a,t,!0)){Q=!0;break}if(Q)break;if(f){if(m=Ke(u,a),m<0)break;c=u.bMarks[a]+u.tShift[a]}else if(m=Je(u,a),m<0)break;if(d!==u.src.charCodeAt(m-1))break}return f?i=u.push("ordered_list_close","ol",-1):i=u.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(d),g[1]=a,u.line=a,u.parentType=F,s&&Cn(u,D),!0}function En(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e],c=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==91)return!1;function i(v){const F=u.lineMax;if(v>=F||u.isEmpty(v))return null;let h=!1;if(u.sCount[v]-u.blkIndent>3&&(h=!0),u.sCount[v]<0&&(h=!0),!h){const _=u.md.block.ruler.getRules("reference"),E=u.parentType;u.parentType="reference";let I=!1;for(let B=0,j=_.length;B<j;B++)if(_[B](u,v,F,!0)){I=!0;break}if(u.parentType=E,I)return null}const C=u.bMarks[v]+u.tShift[v],p=u.eMarks[v];return u.src.slice(C,p+1)}let a=u.src.slice(r,o+1);o=a.length;let s=-1;for(r=1;r<o;r++){const v=a.charCodeAt(r);if(v===91)return!1;if(v===93){s=r;break}else if(v===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(v===92&&(r++,r<o&&a.charCodeAt(r)===10)){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}}if(s<0||a.charCodeAt(s+1)!==58)return!1;for(r=s+2;r<o;r++){const v=a.charCodeAt(r);if(v===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(!M(v))break}const l=u.md.helpers.parseLinkDestination(a,r,o);if(!l.ok)return!1;const f=u.md.normalizeLink(l.str);if(!u.md.validateLink(f))return!1;r=l.pos;const x=r,m=c,d=r;for(;r<o;r++){const v=a.charCodeAt(r);if(v===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(!M(v))break}let D=u.md.helpers.parseLinkTitle(a,r,o);for(;D.can_continue;){const v=i(c);if(v===null)break;a+=v,r=o,o=a.length,c++,D=u.md.helpers.parseLinkTitle(a,r,o,D)}let g;for(r<o&&d!==r&&D.ok?(g=D.str,r=D.pos):(g="",r=x,c=m);r<o;){const v=a.charCodeAt(r);if(!M(v))break;r++}if(r<o&&a.charCodeAt(r)!==10&&g)for(g="",r=x,c=m;r<o;){const v=a.charCodeAt(r);if(!M(v))break;r++}if(r<o&&a.charCodeAt(r)!==10)return!1;const w=Lu(a.slice(1,s));return w?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[w]>"u"&&(u.env.references[w]={title:g,href:f}),u.line=c),!0):!1}const Dn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fn="[a-zA-Z_:][a-zA-Z0-9:._-]*",An="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Ye="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+Fn+"(?:\\s*=\\s*"+An+")?)")+"*\\s*\\/?>",Xe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",wn="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Sn="<[?][\\s\\S]*?[?]>",Tn="<![A-Za-z][^>]*>",Bn="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",In=new RegExp("^(?:"+Ye+"|"+Xe+"|"+wn+"|"+Sn+"|"+Tn+"|"+Bn+")"),Nn=new RegExp("^(?:"+Ye+"|"+Xe+")"),xu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Dn.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Nn.source+"\\s*$"),/^$/,!1]];function On(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(r)!==60)return!1;let c=u.src.slice(r,o),i=0;for(;i<xu.length&&!xu[i][0].test(c);i++);if(i===xu.length)return!1;if(n)return xu[i][2];let a=e+1;if(!xu[i][1].test(c)){for(;a<t&&!(u.sCount[a]<u.blkIndent);a++)if(r=u.bMarks[a]+u.tShift[a],o=u.eMarks[a],c=u.src.slice(r,o),xu[i][1].test(c)){c.length!==0&&a++;break}}u.line=a;const s=u.push("html_block","",0);return s.map=[e,a],s.content=u.getLines(e,a,u.blkIndent,!0),!0}function Ln(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.src.charCodeAt(r);if(c!==35||r>=o)return!1;let i=1;for(c=u.src.charCodeAt(++r);c===35&&r<o&&i<=6;)i++,c=u.src.charCodeAt(++r);if(i>6||r<o&&!M(c))return!1;if(n)return!0;o=u.skipSpacesBack(o,r);const a=u.skipCharsBack(o,35,r);a>r&&M(u.src.charCodeAt(a-1))&&(o=a),u.line=e+1;const s=u.push("heading_open","h"+String(i),1);s.markup="########".slice(0,i),s.map=[e,u.line];const l=u.push("inline","",0);l.content=u.src.slice(r,o).trim(),l.map=[e,u.line],l.children=[];const f=u.push("heading_close","h"+String(i),-1);return f.markup="########".slice(0,i),!0}function Mn(u,e,t){const n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const r=u.parentType;u.parentType="paragraph";let o=0,c,i=e+1;for(;i<t&&!u.isEmpty(i);i++){if(u.sCount[i]-u.blkIndent>3)continue;if(u.sCount[i]>=u.blkIndent){let m=u.bMarks[i]+u.tShift[i];const d=u.eMarks[i];if(m<d&&(c=u.src.charCodeAt(m),(c===45||c===61)&&(m=u.skipChars(m,c),m=u.skipSpaces(m),m>=d))){o=c===61?1:2;break}}if(u.sCount[i]<0)continue;let x=!1;for(let m=0,d=n.length;m<d;m++)if(n[m](u,i,t,!0)){x=!0;break}if(x)break}if(!o)return!1;const a=u.getLines(e,i,u.blkIndent,!1).trim();u.line=i+1;const s=u.push("heading_open","h"+String(o),1);s.markup=String.fromCharCode(c),s.map=[e,u.line];const l=u.push("inline","",0);l.content=a,l.map=[e,u.line-1],l.children=[];const f=u.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(c),u.parentType=r,!0}function Pn(u,e,t){const n=u.md.block.ruler.getRules("paragraph"),r=u.parentType;let o=e+1;for(u.parentType="paragraph";o<t&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3||u.sCount[o]<0)continue;let s=!1;for(let l=0,f=n.length;l<f;l++)if(n[l](u,o,t,!0)){s=!0;break}if(s)break}const c=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o;const i=u.push("paragraph_open","p",1);i.map=[e,u.line];const a=u.push("inline","",0);return a.content=c,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=r,!0}const Pu=[["table",xn,["paragraph","reference"]],["code",gn],["fence",_n,["paragraph","reference","blockquote","list"]],["blockquote",kn,["paragraph","reference","blockquote","list"]],["hr",yn,["paragraph","reference","blockquote","list"]],["list",vn,["paragraph","reference","blockquote"]],["reference",En],["html_block",On,["paragraph","reference","blockquote"]],["heading",Ln,["paragraph","reference","blockquote"]],["lheading",Mn],["paragraph",Pn]];function ju(){this.ruler=new H;for(let u=0;u<Pu.length;u++)this.ruler.push(Pu[u][0],Pu[u][1],{alt:(Pu[u][2]||[]).slice()})}ju.prototype.tokenize=function(u,e,t){const n=this.ruler.getRules(""),r=n.length,o=u.md.options.maxNesting;let c=e,i=!1;for(;c<t&&(u.line=c=u.skipEmptyLines(c),!(c>=t||u.sCount[c]<u.blkIndent));){if(u.level>=o){u.line=t;break}const a=u.line;let s=!1;for(let l=0;l<r;l++)if(s=n[l](u,c,t,!1),s){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");u.tight=!i,u.isEmpty(u.line-1)&&(i=!0),c=u.line,c<t&&u.isEmpty(c)&&(i=!0,c++,u.line=c)}},ju.prototype.parse=function(u,e,t,n){if(!u)return;const r=new this.State(u,e,t,n);this.tokenize(r,r.line,r.lineMax)},ju.prototype.State=uu;function Eu(u,e,t,n){this.src=u,this.env=t,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Eu.prototype.pushPending=function(){const u=new J("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u},Eu.prototype.push=function(u,e,t){this.pending&&this.pushPending();const n=new J(u,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n},Eu.prototype.scanDelims=function(u,e){const t=this.posMax,n=this.src.charCodeAt(u),r=u>0?this.src.charCodeAt(u-1):32;let o=u;for(;o<t&&this.src.charCodeAt(o)===n;)o++;const c=o-u,i=o<t?this.src.charCodeAt(o):32,a=vu(r)||Cu(String.fromCharCode(r)),s=vu(i)||Cu(String.fromCharCode(i)),l=yu(r),f=yu(i),x=!f&&(!s||l||a),m=!l&&(!a||f||s);return{can_open:x&&(e||!m||a),can_close:m&&(e||!x||s),length:c}},Eu.prototype.Token=J;function jn(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function zn(u,e){let t=u.pos;for(;t<u.posMax&&!jn(u.src.charCodeAt(t));)t++;return t===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,t)),u.pos=t,!0)}const Rn=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function qn(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;const t=u.pos,n=u.posMax;if(t+3>n||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const r=u.pending.match(Rn);if(!r)return!1;const o=r[1],c=u.md.linkify.matchAtStart(u.src.slice(t-o.length));if(!c)return!1;let i=c.url;if(i.length<=o.length)return!1;i=i.replace(/\*+$/,"");const a=u.md.normalizeLink(i);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-o.length);const s=u.push("link_open","a",1);s.attrs=[["href",a]],s.markup="linkify",s.info="auto";const l=u.push("text","",0);l.content=u.md.normalizeLinkText(i);const f=u.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return u.pos+=i.length-o.length,!0}function $n(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const n=u.pending.length-1,r=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&u.pending.charCodeAt(o-1)===32;)o--;u.pending=u.pending.slice(0,o),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t<r&&M(u.src.charCodeAt(t));)t++;return u.pos=t,!0}const re=[];for(let u=0;u<256;u++)re.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){re[u.charCodeAt(0)]=1});function Vn(u,e){let t=u.pos;const n=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let r=u.src.charCodeAt(t);if(r===10){for(e||u.push("hardbreak","br",0),t++;t<n&&(r=u.src.charCodeAt(t),!!M(r));)t++;return u.pos=t,!0}let o=u.src[t];if(r>=55296&&r<=56319&&t+1<n){const i=u.src.charCodeAt(t+1);i>=56320&&i<=57343&&(o+=u.src[t+1],t++)}const c="\\"+o;if(!e){const i=u.push("text_special","",0);r<256&&re[r]!==0?i.content=o:i.content=c,i.markup=c,i.info="escape"}return u.pos=t+1,!0}function Hn(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=u.posMax;for(;t<o&&u.src.charCodeAt(t)===96;)t++;const c=u.src.slice(r,t),i=c.length;if(u.backticksScanned&&(u.backticks[i]||0)<=r)return e||(u.pending+=c),u.pos+=i,!0;let a=t,s;for(;(s=u.src.indexOf("`",a))!==-1;){for(a=s+1;a<o&&u.src.charCodeAt(a)===96;)a++;const l=a-s;if(l===i){if(!e){const f=u.push("code_inline","code",0);f.markup=c,f.content=u.src.slice(t,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[l]=s}return u.backticksScanned=!0,e||(u.pending+=c),u.pos+=i,!0}function Un(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==126)return!1;const r=u.scanDelims(u.pos,!0);let o=r.length;const c=String.fromCharCode(n);if(o<2)return!1;let i;o%2&&(i=u.push("text","",0),i.content=c,o--);for(let a=0;a<o;a+=2)i=u.push("text","",0),i.content=c+c,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return u.pos+=r.length,!0}function ut(u,e){let t;const n=[],r=e.length;for(let o=0;o<r;o++){const c=e[o];if(c.marker!==126||c.end===-1)continue;const i=e[c.end];t=u.tokens[c.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=u.tokens[i.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",u.tokens[i.token-1].type==="text"&&u.tokens[i.token-1].content==="~"&&n.push(i.token-1)}for(;n.length;){const o=n.pop();let c=o+1;for(;c<u.tokens.length&&u.tokens[c].type==="s_close";)c++;c--,o!==c&&(t=u.tokens[c],u.tokens[c]=u.tokens[o],u.tokens[o]=t)}}function Zn(u){const e=u.tokens_meta,t=u.tokens_meta.length;ut(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&ut(u,e[n].delimiters)}const et={tokenize:Un,postProcess:Zn};function Gn(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==95&&n!==42)return!1;const r=u.scanDelims(u.pos,n===42);for(let o=0;o<r.length;o++){const c=u.push("text","",0);c.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:r.length,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return u.pos+=r.length,!0}function tt(u,e){const t=e.length;for(let n=t-1;n>=0;n--){const r=e[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],c=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=u.tokens[r.token];a.type=c?"strong_open":"em_open",a.tag=c?"strong":"em",a.nesting=1,a.markup=c?i+i:i,a.content="";const s=u.tokens[o.token];s.type=c?"strong_close":"em_close",s.tag=c?"strong":"em",s.nesting=-1,s.markup=c?i+i:i,s.content="",c&&(u.tokens[e[n-1].token].content="",u.tokens[e[r.end+1].token].content="",n--)}}function Wn(u){const e=u.tokens_meta,t=u.tokens_meta.length;tt(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&tt(u,e[n].delimiters)}const nt={tokenize:Gn,postProcess:Wn};function Qn(u,e){let t,n,r,o,c="",i="",a=u.pos,s=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;const l=u.pos,f=u.posMax,x=u.pos+1,m=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(m<0)return!1;let d=m+1;if(d<f&&u.src.charCodeAt(d)===40){for(s=!1,d++;d<f&&(t=u.src.charCodeAt(d),!(!M(t)&&t!==10));d++);if(d>=f)return!1;if(a=d,r=u.md.helpers.parseLinkDestination(u.src,d,u.posMax),r.ok){for(c=u.md.normalizeLink(r.str),u.md.validateLink(c)?d=r.pos:c="",a=d;d<f&&(t=u.src.charCodeAt(d),!(!M(t)&&t!==10));d++);if(r=u.md.helpers.parseLinkTitle(u.src,d,u.posMax),d<f&&a!==d&&r.ok)for(i=r.str,d=r.pos;d<f&&(t=u.src.charCodeAt(d),!(!M(t)&&t!==10));d++);}(d>=f||u.src.charCodeAt(d)!==41)&&(s=!0),d++}if(s){if(typeof u.env.references>"u")return!1;if(d<f&&u.src.charCodeAt(d)===91?(a=d+1,d=u.md.helpers.parseLinkLabel(u,d),d>=0?n=u.src.slice(a,d++):d=m+1):d=m+1,n||(n=u.src.slice(x,m)),o=u.env.references[Lu(n)],!o)return u.pos=l,!1;c=o.href,i=o.title}if(!e){u.pos=x,u.posMax=m;const D=u.push("link_open","a",1),g=[["href",c]];D.attrs=g,i&&g.push(["title",i]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=d,u.posMax=f,!0}function Jn(u,e){let t,n,r,o,c,i,a,s,l="";const f=u.pos,x=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const m=u.pos+2,d=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(d<0)return!1;if(o=d+1,o<x&&u.src.charCodeAt(o)===40){for(o++;o<x&&(t=u.src.charCodeAt(o),!(!M(t)&&t!==10));o++);if(o>=x)return!1;for(s=o,i=u.md.helpers.parseLinkDestination(u.src,o,u.posMax),i.ok&&(l=u.md.normalizeLink(i.str),u.md.validateLink(l)?o=i.pos:l=""),s=o;o<x&&(t=u.src.charCodeAt(o),!(!M(t)&&t!==10));o++);if(i=u.md.helpers.parseLinkTitle(u.src,o,u.posMax),o<x&&s!==o&&i.ok)for(a=i.str,o=i.pos;o<x&&(t=u.src.charCodeAt(o),!(!M(t)&&t!==10));o++);else a="";if(o>=x||u.src.charCodeAt(o)!==41)return u.pos=f,!1;o++}else{if(typeof u.env.references>"u")return!1;if(o<x&&u.src.charCodeAt(o)===91?(s=o+1,o=u.md.helpers.parseLinkLabel(u,o),o>=0?r=u.src.slice(s,o++):o=d+1):o=d+1,r||(r=u.src.slice(m,d)),c=u.env.references[Lu(r)],!c)return u.pos=f,!1;l=c.href,a=c.title}if(!e){n=u.src.slice(m,d);const D=[];u.md.inline.parse(n,u.md,u.env,D);const g=u.push("image","img",0),w=[["src",l],["alt",""]];g.attrs=w,g.children=D,g.content=n,a&&w.push(["title",a])}return u.pos=o,u.posMax=x,!0}const Kn=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Yn=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Xn(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const n=u.pos,r=u.posMax;for(;;){if(++t>=r)return!1;const c=u.src.charCodeAt(t);if(c===60)return!1;if(c===62)break}const o=u.src.slice(n+1,t);if(Yn.test(o)){const c=u.md.normalizeLink(o);if(!u.md.validateLink(c))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",c]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=o.length+2,!0}if(Kn.test(o)){const c=u.md.normalizeLink("mailto:"+o);if(!u.md.validateLink(c))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",c]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=o.length+2,!0}return!1}function ur(u){return/^<a[>\s]/i.test(u)}function er(u){return/^<\/a\s*>/i.test(u)}function tr(u){const e=u|32;return e>=97&&e<=122}function nr(u,e){if(!u.md.options.html)return!1;const t=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=t)return!1;const r=u.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!tr(r))return!1;const o=u.src.slice(n).match(In);if(!o)return!1;if(!e){const c=u.push("html_inline","",0);c.content=o[0],ur(c.content)&&u.linkLevel++,er(c.content)&&u.linkLevel--}return u.pos+=o[0].length,!0}const rr=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,or=/^&([a-z][a-z0-9]{1,31});/i;function cr(u,e){const t=u.pos,n=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=n)return!1;if(u.src.charCodeAt(t+1)===35){const o=u.src.slice(t).match(rr);if(o){if(!e){const c=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),i=u.push("text_special","",0);i.content=ue(c)?Ou(c):Ou(65533),i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}else{const o=u.src.slice(t).match(or);if(o){const c=$e(o[0]);if(c!==o[0]){if(!e){const i=u.push("text_special","",0);i.content=c,i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}}return!1}function rt(u){const e={},t=u.length;if(!t)return;let n=0,r=-2;const o=[];for(let c=0;c<t;c++){const i=u[c];if(o.push(0),(u[n].marker!==i.marker||r!==i.token-1)&&(n=c),r=i.token,i.length=i.length||0,!i.close)continue;e.hasOwnProperty(i.marker)||(e[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=e[i.marker][(i.open?3:0)+i.length%3];let s=n-o[n]-1,l=s;for(;s>a;s-=o[s]+1){const f=u[s];if(f.marker===i.marker&&f.open&&f.end<0){let x=!1;if((f.close||i.open)&&(f.length+i.length)%3===0&&(f.length%3!==0||i.length%3!==0)&&(x=!0),!x){const m=s>0&&!u[s-1].open?o[s-1]+1:0;o[c]=c-s+m,o[s]=m,i.open=!1,f.end=c,f.close=!1,l=-1,r=-2;break}}}l!==-1&&(e[i.marker][(i.open?3:0)+(i.length||0)%3]=l)}}function ir(u){const e=u.tokens_meta,t=u.tokens_meta.length;rt(u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&rt(e[n].delimiters)}function ar(u){let e,t,n=0;const r=u.tokens,o=u.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&n--,r[e].level=n,r[e].nesting>0&&n++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const oe=[["text",zn],["linkify",qn],["newline",$n],["escape",Vn],["backticks",Hn],["strikethrough",et.tokenize],["emphasis",nt.tokenize],["link",Qn],["image",Jn],["autolink",Xn],["html_inline",nr],["entity",cr]],ce=[["balance_pairs",ir],["strikethrough",et.postProcess],["emphasis",nt.postProcess],["fragments_join",ar]];function Du(){this.ruler=new H;for(let u=0;u<oe.length;u++)this.ruler.push(oe[u][0],oe[u][1]);this.ruler2=new H;for(let u=0;u<ce.length;u++)this.ruler2.push(ce[u][0],ce[u][1])}Du.prototype.skipToken=function(u){const e=u.pos,t=this.ruler.getRules(""),n=t.length,r=u.md.options.maxNesting,o=u.cache;if(typeof o[e]<"u"){u.pos=o[e];return}let c=!1;if(u.level<r){for(let i=0;i<n;i++)if(u.level++,c=t[i](u,!0),u.level--,c){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;c||u.pos++,o[e]=u.pos},Du.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,n=u.posMax,r=u.md.options.maxNesting;for(;u.pos<n;){const o=u.pos;let c=!1;if(u.level<r){for(let i=0;i<t;i++)if(c=e[i](u,!1),c){if(o>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()},Du.prototype.parse=function(u,e,t,n){const r=new this.State(u,e,t,n);this.tokenize(r);const o=this.ruler2.getRules(""),c=o.length;for(let i=0;i<c;i++)o[i](r)},Du.prototype.State=Eu;function sr(u){const e={};u=u||{},e.src_Any=Pe.source,e.src_Cc=je.source,e.src_Z=Re.source,e.src_P=Ju.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function ie(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function zu(u){return Object.prototype.toString.call(u)}function lr(u){return zu(u)==="[object String]"}function fr(u){return zu(u)==="[object Object]"}function dr(u){return zu(u)==="[object RegExp]"}function ot(u){return zu(u)==="[object Function]"}function hr(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const ct={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function pr(u){return Object.keys(u||{}).reduce(function(e,t){return e||ct.hasOwnProperty(t)},!1)}const br={"http:":{validate:function(u,e,t){const n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},mr="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",xr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function gr(u){u.__index__=-1,u.__text_cache__=""}function _r(u){return function(e,t){const n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function it(){return function(u,e){e.normalize(u)}}function Ru(u){const e=u.re=sr(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(mr),t.push(e.src_xn),e.src_tlds=t.join("|");function n(i){return i.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const r=[];u.__compiled__={};function o(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(u.__schemas__).forEach(function(i){const a=u.__schemas__[i];if(a===null)return;const s={validate:null,link:null};if(u.__compiled__[i]=s,fr(a)){dr(a.validate)?s.validate=_r(a.validate):ot(a.validate)?s.validate=a.validate:o(i,a),ot(a.normalize)?s.normalize=a.normalize:a.normalize?o(i,a):s.normalize=it();return}if(lr(a)){r.push(i);return}o(i,a)}),r.forEach(function(i){u.__compiled__[u.__schemas__[i]]&&(u.__compiled__[i].validate=u.__compiled__[u.__schemas__[i]].validate,u.__compiled__[i].normalize=u.__compiled__[u.__schemas__[i]].normalize)}),u.__compiled__[""]={validate:null,normalize:it()};const c=Object.keys(u.__compiled__).filter(function(i){return i.length>0&&u.__compiled__[i]}).map(hr).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),gr(u)}function kr(u,e){const t=u.__index__,n=u.__last_index__,r=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=r,this.text=r,this.url=r}function ae(u,e){const t=new kr(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function U(u,e){if(!(this instanceof U))return new U(u,e);e||pr(u)&&(e=u,u={}),this.__opts__=ie({},ct,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ie({},br,u),this.__compiled__={},this.__tlds__=xr,this.__tlds_replaced__=!1,this.re={},Ru(this)}U.prototype.add=function(e,t){return this.__schemas__[e]=t,Ru(this),this},U.prototype.set=function(e){return this.__opts__=ie(this.__opts__,e),this},U.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,o,c,i,a,s,l;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],a.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=e.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(c=n.index+n[1].length,(this.__index__<0||c<this.__index__)&&(this.__schema__="",this.__index__=c,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(c=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||c<this.__index__||c===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=i))),this.__index__>=0},U.prototype.pretest=function(e){return this.re.pretest.test(e)},U.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},U.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(ae(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(ae(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},U.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,ae(this,0)):null},U.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,r,o){return n!==o[r-1]}).reverse(),Ru(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Ru(this),this)},U.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},U.prototype.onCompile=function(){};const gu=2147483647,eu=36,se=1,Fu=26,yr=38,Cr=700,at=72,st=128,lt="-",vr=/^xn--/,Er=/[^\0-\x7F]/,Dr=/[\x2E\u3002\uFF0E\uFF61]/g,Fr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},le=eu-se,tu=Math.floor,fe=String.fromCharCode;function fu(u){throw new RangeError(Fr[u])}function Ar(u,e){const t=[];let n=u.length;for(;n--;)t[n]=e(u[n]);return t}function ft(u,e){const t=u.split("@");let n="";t.length>1&&(n=t[0]+"@",u=t[1]),u=u.replace(Dr,".");const r=u.split("."),o=Ar(r,e).join(".");return n+o}function dt(u){const e=[];let t=0;const n=u.length;for(;t<n;){const r=u.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){const o=u.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const wr=u=>String.fromCodePoint(...u),Sr=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:eu},ht=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},pt=function(u,e,t){let n=0;for(u=t?tu(u/Cr):u>>1,u+=tu(u/e);u>le*Fu>>1;n+=eu)u=tu(u/le);return tu(n+(le+1)*u/(u+yr))},bt=function(u){const e=[],t=u.length;let n=0,r=st,o=at,c=u.lastIndexOf(lt);c<0&&(c=0);for(let i=0;i<c;++i)u.charCodeAt(i)>=128&&fu("not-basic"),e.push(u.charCodeAt(i));for(let i=c>0?c+1:0;i<t;){const a=n;for(let l=1,f=eu;;f+=eu){i>=t&&fu("invalid-input");const x=Sr(u.charCodeAt(i++));x>=eu&&fu("invalid-input"),x>tu((gu-n)/l)&&fu("overflow"),n+=x*l;const m=f<=o?se:f>=o+Fu?Fu:f-o;if(x<m)break;const d=eu-m;l>tu(gu/d)&&fu("overflow"),l*=d}const s=e.length+1;o=pt(n-a,s,a==0),tu(n/s)>gu-r&&fu("overflow"),r+=tu(n/s),n%=s,e.splice(n++,0,r)}return String.fromCodePoint(...e)},mt=function(u){const e=[];u=dt(u);const t=u.length;let n=st,r=0,o=at;for(const a of u)a<128&&e.push(fe(a));const c=e.length;let i=c;for(c&&e.push(lt);i<t;){let a=gu;for(const l of u)l>=n&&l<a&&(a=l);const s=i+1;a-n>tu((gu-r)/s)&&fu("overflow"),r+=(a-n)*s,n=a;for(const l of u)if(l<n&&++r>gu&&fu("overflow"),l===n){let f=r;for(let x=eu;;x+=eu){const m=x<=o?se:x>=o+Fu?Fu:x-o;if(f<m)break;const d=f-m,D=eu-m;e.push(fe(ht(m+d%D,0))),f=tu(d/D)}e.push(fe(ht(f,0))),o=pt(r,s,i===c),r=0,++i}++r,++n}return e.join("")},xt={version:"2.3.1",ucs2:{decode:dt,encode:wr},decode:bt,encode:mt,toASCII:function(u){return ft(u,function(e){return Er.test(e)?"xn--"+mt(e):e})},toUnicode:function(u){return ft(u,function(e){return vr.test(e)?bt(e.slice(4).toLowerCase()):e})}},Tr={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Br=/^(vbscript|javascript|file|data):/,Ir=/^data:image\/(gif|png|jpeg|webp);/;function Nr(u){const e=u.trim().toLowerCase();return Br.test(e)?Ir.test(e):!0}const gt=["http:","https:","mailto:"];function Or(u){const e=Qu(u,!0);if(e.hostname&&(!e.protocol||gt.indexOf(e.protocol)>=0))try{e.hostname=xt.toASCII(e.hostname)}catch{}return ku(Wu(e))}function Lr(u){const e=Qu(u,!0);if(e.hostname&&(!e.protocol||gt.indexOf(e.protocol)>=0))try{e.hostname=xt.toUnicode(e.hostname)}catch{}return pu(Wu(e),pu.defaultChars+"%")}function W(u,e){if(!(this instanceof W))return new W(u,e);e||Xu(u)||(e=u||{},u="default"),this.inline=new Du,this.block=new ju,this.core=new te,this.renderer=new mu,this.linkify=new U,this.validateLink=Nr,this.normalizeLink=Or,this.normalizeLinkText=Lr,this.utils=U0,this.helpers=Nu({},Q0),this.options={},this.configure(u),e&&this.set(e)}W.prototype.set=function(u){return Nu(this.options,u),this},W.prototype.configure=function(u){const e=this;if(Xu(u)){const t=u;if(u=Tr[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this},W.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},W.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},W.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this},W.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens},W.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)},W.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},W.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var Mr={207:(u,e,t)=>{u.exports=t(452)},452:u=>{var e=(function(t){var n,r=Object.prototype,o=r.hasOwnProperty,c=typeof Symbol=="function"?Symbol:{},i=c.iterator||"@@iterator",a=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function l(y,k,T){return Object.defineProperty(y,k,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[k]}try{l({},"")}catch{l=function(k,T,N){return k[T]=N}}function f(y,k,T,N){var S=k&&k.prototype instanceof v?k:v,$=Object.create(S.prototype),V=new Q(N||[]);return $._invoke=(function(Y,cu,L){var G=m;return function(ru,n0){if(G===D)throw new Error("Generator is already running");if(G===g){if(ru==="throw")throw n0;return nu()}for(L.method=ru,L.arg=n0;;){var r0=L.delegate;if(r0){var Se=j(r0,L);if(Se){if(Se===w)continue;return Se}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(G===m)throw G=g,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);G=D;var Bu=x(Y,cu,L);if(Bu.type==="normal"){if(G=L.done?g:d,Bu.arg===w)continue;return{value:Bu.arg,done:L.done}}Bu.type==="throw"&&(G=g,L.method="throw",L.arg=Bu.arg)}}})(y,T,V),$}function x(y,k,T){try{return{type:"normal",arg:y.call(k,T)}}catch(N){return{type:"throw",arg:N}}}t.wrap=f;var m="suspendedStart",d="suspendedYield",D="executing",g="completed",w={};function v(){}function F(){}function h(){}var C={};l(C,i,(function(){return this}));var p=Object.getPrototypeOf,_=p&&p(p(P([])));_&&_!==r&&o.call(_,i)&&(C=_);var E=h.prototype=v.prototype=Object.create(C);function I(y){["next","throw","return"].forEach((function(k){l(y,k,(function(T){return this._invoke(k,T)}))}))}function B(y,k){function T(S,$,V,Y){var cu=x(y[S],y,$);if(cu.type!=="throw"){var L=cu.arg,G=L.value;return G&&typeof G=="object"&&o.call(G,"__await")?k.resolve(G.__await).then((function(ru){T("next",ru,V,Y)}),(function(ru){T("throw",ru,V,Y)})):k.resolve(G).then((function(ru){L.value=ru,V(L)}),(function(ru){return T("throw",ru,V,Y)}))}Y(cu.arg)}var N;this._invoke=function(S,$){function V(){return new k((function(Y,cu){T(S,$,Y,cu)}))}return N=N?N.then(V,V):V()}}function j(y,k){var T=y.iterator[k.method];if(T===n){if(k.delegate=null,k.method==="throw"){if(y.iterator.return&&(k.method="return",k.arg=n,j(y,k),k.method==="throw"))return w;k.method="throw",k.arg=new TypeError("The iterator does not provide a 'throw' method")}return w}var N=x(T,y.iterator,k.arg);if(N.type==="throw")return k.method="throw",k.arg=N.arg,k.delegate=null,w;var S=N.arg;return S?S.done?(k[y.resultName]=S.value,k.next=y.nextLoc,k.method!=="return"&&(k.method="next",k.arg=n),k.delegate=null,w):S:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,w)}function O(y){var k={tryLoc:y[0]};1 in y&&(k.catchLoc=y[1]),2 in y&&(k.finallyLoc=y[2],k.afterLoc=y[3]),this.tryEntries.push(k)}function q(y){var k=y.completion||{};k.type="normal",delete k.arg,y.completion=k}function Q(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(O,this),this.reset(!0)}function P(y){if(y){var k=y[i];if(k)return k.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,N=function S(){for(;++T<y.length;)if(o.call(y,T))return S.value=y[T],S.done=!1,S;return S.value=n,S.done=!0,S};return N.next=N}}return{next:nu}}function nu(){return{value:n,done:!0}}return F.prototype=h,l(E,"constructor",h),l(h,"constructor",F),F.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(y){var k=typeof y=="function"&&y.constructor;return!!k&&(k===F||(k.displayName||k.name)==="GeneratorFunction")},t.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,h):(y.__proto__=h,l(y,s,"GeneratorFunction")),y.prototype=Object.create(E),y},t.awrap=function(y){return{__await:y}},I(B.prototype),l(B.prototype,a,(function(){return this})),t.AsyncIterator=B,t.async=function(y,k,T,N,S){S===void 0&&(S=Promise);var $=new B(f(y,k,T,N),S);return t.isGeneratorFunction(k)?$:$.next().then((function(V){return V.done?V.value:$.next()}))},I(E),l(E,s,"Generator"),l(E,i,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(y){var k=[];for(var T in y)k.push(T);return k.reverse(),function N(){for(;k.length;){var S=k.pop();if(S in y)return N.value=S,N.done=!1,N}return N.done=!0,N}},t.values=P,Q.prototype={constructor:Q,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(q),!y)for(var k in this)k.charAt(0)==="t"&&o.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=n)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var k=this;function T(cu,L){return $.type="throw",$.arg=y,k.next=cu,L&&(k.method="next",k.arg=n),!!L}for(var N=this.tryEntries.length-1;N>=0;--N){var S=this.tryEntries[N],$=S.completion;if(S.tryLoc==="root")return T("end");if(S.tryLoc<=this.prev){var V=o.call(S,"catchLoc"),Y=o.call(S,"finallyLoc");if(V&&Y){if(this.prev<S.catchLoc)return T(S.catchLoc,!0);if(this.prev<S.finallyLoc)return T(S.finallyLoc)}else if(V){if(this.prev<S.catchLoc)return T(S.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return T(S.finallyLoc)}}}},abrupt:function(y,k){for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T];if(N.tryLoc<=this.prev&&o.call(N,"finallyLoc")&&this.prev<N.finallyLoc){var S=N;break}}S&&(y==="break"||y==="continue")&&S.tryLoc<=k&&k<=S.finallyLoc&&(S=null);var $=S?S.completion:{};return $.type=y,$.arg=k,S?(this.method="next",this.next=S.finallyLoc,w):this.complete($)},complete:function(y,k){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&k&&(this.next=k),w},finish:function(y){for(var k=this.tryEntries.length-1;k>=0;--k){var T=this.tryEntries[k];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),q(T),w}},catch:function(y){for(var k=this.tryEntries.length-1;k>=0;--k){var T=this.tryEntries[k];if(T.tryLoc===y){var N=T.completion;if(N.type==="throw"){var S=N.arg;q(T)}return S}}throw new Error("illegal catch attempt")},delegateYield:function(y,k,T){return this.delegate={iterator:P(y),resultName:k,nextLoc:T},this.method==="next"&&(this.arg=n),w}},t})(u.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},_t={};function K(u){var e=_t[u];if(e!==void 0)return e.exports;var t=_t[u]={exports:{}};return Mr[u](t,t.exports,K),t.exports}K.n=u=>{var e=u&&u.__esModule?()=>u.default:()=>u;return K.d(e,{a:e}),e},K.d=(u,e)=>{for(var t in e)K.o(e,t)&&!K.o(u,t)&&Object.defineProperty(u,t,{enumerable:!0,get:e[t]})},K.o=(u,e)=>Object.prototype.hasOwnProperty.call(u,e);var kt={};function de(u,e){(e==null||e>u.length)&&(e=u.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=u[t];return n}function yt(u,e){if(u){if(typeof u=="string")return de(u,e);var t=Object.prototype.toString.call(u).slice(8,-1);return t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set"?Array.from(u):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?de(u,e):void 0}}function qu(u){return(function(e){if(Array.isArray(e))return de(e)})(u)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(u)||yt(u)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
17
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Au(u,e,t){return e in u?Object.defineProperty(u,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):u[e]=t,u}K.d(kt,{A:()=>$r});const A=(Ct={Fragment:()=>ou.Fragment,computed:()=>ou.computed,createTextVNode:()=>ou.createTextVNode,createVNode:()=>ou.createVNode,defineComponent:()=>ou.defineComponent,reactive:()=>ou.reactive,ref:()=>ou.ref,watch:()=>ou.watch,watchEffect:()=>ou.watchEffect},he={},K.d(he,Ct),he),Pr=(0,A.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var u=this.data,e=this.onClick;return(0,A.createVNode)("span",{class:"vjs-tree-brackets",onClick:e},[u])}}),jr=(0,A.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(u,e){var t=e.emit;return{uiType:(0,A.computed)((function(){return u.isMultiple?"checkbox":"radio"})),model:(0,A.computed)({get:function(){return u.checked},set:function(n){return t("update:modelValue",n)}})}},render:function(){var u=this.uiType,e=this.model,t=this.$emit;return(0,A.createVNode)("label",{class:["vjs-check-controller",e?"is-checked":""],onClick:function(n){return n.stopPropagation()}},[(0,A.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(u)},null),(0,A.createVNode)("input",{checked:e,class:"vjs-check-controller-original is-".concat(u),type:u,onChange:function(){return t("change",e)}},null)])}}),zr=(0,A.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var u=this.nodeType,e=this.onClick,t=u==="objectStart"||u==="arrayStart";return t||u==="objectCollapsed"||u==="arrayCollapsed"?(0,A.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(t?"open":"close"),onClick:e},[(0,A.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,A.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var Ct,he;function pe(u){return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(u)}function vt(u){return Object.prototype.toString.call(u).slice(8,-1).toLowerCase()}function du(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(arguments.length>3?arguments[3]:void 0)||{},r=n.key,o=n.index,c=n.type,i=c===void 0?"content":c,a=n.showComma,s=a!==void 0&&a,l=n.length,f=l===void 0?1:l,x=vt(u);if(x==="array"){var m=Et(u.map((function(g,w,v){return du(g,"".concat(e,"[").concat(w,"]"),t+1,{index:w,showComma:w!==v.length-1,length:f,type:i})})));return[du("[",e,t,{showComma:!1,key:r,length:u.length,type:"arrayStart"})[0]].concat(m,du("]",e,t,{showComma:s,length:u.length,type:"arrayEnd"})[0])}if(x==="object"){var d=Object.keys(u),D=Et(d.map((function(g,w,v){return du(u[g],/^[a-zA-Z_]\w*$/.test(g)?"".concat(e,".").concat(g):"".concat(e,'["').concat(g,'"]'),t+1,{key:g,showComma:w!==v.length-1,length:f,type:i})})));return[du("{",e,t,{showComma:!1,key:r,index:o,length:d.length,type:"objectStart"})[0]].concat(D,du("}",e,t,{showComma:s,length:d.length,type:"objectEnd"})[0])}return[{content:u,level:t,key:r,index:o,path:e,showComma:s,length:f,type:i}]}function Et(u){if(typeof Array.prototype.flat=="function")return u.flat();for(var e=qu(u),t=[];e.length;){var n=e.shift();Array.isArray(n)?e.unshift.apply(e,qu(n)):t.push(n)}return t}function be(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(u==null)return u;if(u instanceof Date)return new Date(u);if(u instanceof RegExp)return new RegExp(u);if(pe(u)!=="object")return u;if(e.get(u))return e.get(u);if(Array.isArray(u)){var t=u.map((function(o){return be(o,e)}));return e.set(u,t),t}var n={};for(var r in u)n[r]=be(u[r],e);return e.set(u,n),n}function Dt(u,e,t,n,r,o,c){try{var i=u[o](c),a=i.value}catch(s){return void t(s)}i.done?e(a):Promise.resolve(a).then(n,r)}var Rr=K(207),Ft=K.n(Rr);function At(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable}))),t.push.apply(t,n)}return t}function wt(u){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?At(Object(t),!0).forEach((function(n){Au(u,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):At(Object(t)).forEach((function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(t,n))}))}return u}var St={data:{type:[String,Number,Boolean,Array,Object],default:null},rootPath:{type:String,default:"root"},indent:{type:Number,default:2},showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,renderNodeActions:{type:[Boolean,Function],default:void 0},selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},theme:{type:String,default:"light"},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onNodeMouseover:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}};const qr=(0,A.defineComponent)({name:"TreeNode",props:wt(wt({},St),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(u,e){var t=e.emit,n=(0,A.computed)((function(){return vt(u.node.content)})),r=(0,A.computed)((function(){return"vjs-value vjs-value-".concat(n.value)})),o=(0,A.computed)((function(){return u.showDoubleQuotes?'"'.concat(u.node.key,'"'):u.node.key})),c=(0,A.computed)((function(){return u.selectableType==="multiple"})),i=(0,A.computed)((function(){return u.selectableType==="single"})),a=(0,A.computed)((function(){return u.nodeSelectable(u.node)&&(c.value||i.value)})),s=(0,A.reactive)({editing:!1}),l=function(p){var _,E,I=(E=(_=p.target)===null||_===void 0?void 0:_.value)==="null"?null:E==="undefined"?void 0:E==="true"||E!=="false"&&(E[0]+E[E.length-1]==='""'||E[0]+E[E.length-1]==="''"?E.slice(1,-1):typeof Number(E)=="number"&&!isNaN(Number(E))||E==="NaN"?Number(E):E);t("valueChange",I,u.node.path)},f=(0,A.computed)((function(){var p,_=(p=u.node)===null||p===void 0?void 0:p.content;return _===null?_="null":_===void 0&&(_="undefined"),n.value==="string"?'"'.concat(_,'"'):_+""})),x=function(){var p=u.renderNodeValue;return p?p({node:u.node,defaultValue:f.value}):f.value},m=function(){t("bracketsClick",!u.collapsed,u.node)},d=function(){t("iconClick",!u.collapsed,u.node)},D=function(){t("selectedChange",u.node)},g=function(){t("nodeClick",u.node),a.value&&u.selectOnClickNode&&t("selectedChange",u.node)},w=function(){t("nodeMouseover",u.node)},v=function(p){if(u.editable&&!s.editing){s.editing=!0;var _=function E(I){var B;I.target!==p.target&&((B=I.target)===null||B===void 0?void 0:B.parentElement)!==p.target&&(s.editing=!1,document.removeEventListener("click",E))};document.removeEventListener("click",_),document.addEventListener("click",_)}},F=(function(){var p=(0,A.ref)(!1),_=(function(){var E,I=(E=Ft().mark((function B(j){return Ft().wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return O.prev=0,O.next=3,navigator.clipboard.writeText(j);case 3:p.value=!0,setTimeout((function(){p.value=!1}),300),O.next=10;break;case 7:O.prev=7,O.t0=O.catch(0),console.error("[vue-json-pretty] Copy failed: ",O.t0);case 10:case"end":return O.stop()}}),B,null,[[0,7]])})),function(){var B=this,j=arguments;return new Promise((function(O,q){var Q=E.apply(B,j);function P(y){Dt(Q,O,q,P,nu,"next",y)}function nu(y){Dt(Q,O,q,P,nu,"throw",y)}P(void 0)}))});return function(B){return I.apply(this,arguments)}})();return{copy:_}})().copy,h=function(){var p=u.node,_=p.key,E=p.path,I=u.rootPath,B=new Function("data","return data".concat(E.slice(I.length)))(u.data),j=JSON.stringify(_?Au({},_,B):B,null,2);F(j)},C=function(){var p=u.renderNodeActions;if(!p)return null;var _={copy:h};return typeof p=="function"?p({node:u.node,defaultActions:_}):(0,A.createVNode)("span",{onClick:h,class:"vjs-tree-node-actions-item"},[(0,A.createTextVNode)("copy")])};return function(){var p,_=u.node;return(0,A.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":u.showSelectController,"has-carets":u.showIcon,"is-highlight":u.highlightSelectedNode&&u.checked,dark:u.theme==="dark"},onClick:g,onMouseover:w,style:u.style},[u.showLineNumber&&(0,A.createVNode)("span",{class:"vjs-node-index"},[_.id+1]),u.showSelectController&&a.value&&_.type!=="objectEnd"&&_.type!=="arrayEnd"&&(0,A.createVNode)(jr,{isMultiple:c.value,checked:u.checked,onChange:D},null),(0,A.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(_.level)).map((function(E,I){return(0,A.createVNode)("div",{key:I,class:{"vjs-indent-unit":!0,"has-line":u.showLine}},[Array.from(Array(u.indent)).map((function(){return(0,A.createVNode)(A.Fragment,null,[(0,A.createTextVNode)(" ")])}))])})),u.showIcon&&(0,A.createVNode)(zr,{nodeType:_.type,onClick:d},null)]),_.key&&(0,A.createVNode)("span",{class:"vjs-key"},[(p=u.renderNodeKey,p?p({node:u.node,defaultKey:o.value||""}):o.value),(0,A.createVNode)("span",{class:"vjs-colon"},[":".concat(u.showKeyValueSpace?" ":"")])]),(0,A.createVNode)("span",null,[_.type!=="content"&&_.content?(0,A.createVNode)(Pr,{data:_.content.toString(),onClick:m},null):(0,A.createVNode)("span",{class:r.value,onClick:!u.editable||u.editableTrigger&&u.editableTrigger!=="click"?void 0:v,onDblclick:u.editable&&u.editableTrigger==="dblclick"?v:void 0},[u.editable&&s.editing?(0,A.createVNode)("input",{value:f.value,onChange:l,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):x()]),_.showComma&&(0,A.createVNode)("span",null,[","]),u.showLength&&u.collapsed&&(0,A.createVNode)("span",{class:"vjs-comment"},[(0,A.createTextVNode)(" // "),_.length,(0,A.createTextVNode)(" items ")])]),u.renderNodeActions&&(0,A.createVNode)("span",{class:"vjs-tree-node-actions"},[C()])])}}});function Tt(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable}))),t.push.apply(t,n)}return t}function Z(u){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(t),!0).forEach((function(n){Au(u,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):Tt(Object(t)).forEach((function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(t,n))}))}return u}const $r=(0,A.defineComponent)({name:"Tree",props:Z(Z({},St),{},{collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function},theme:{type:String,default:"light"}}),slots:["renderNodeKey","renderNodeValue","renderNodeActions"],emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(u,e){var t=e.emit,n=e.slots,r=(0,A.ref)(),o=(0,A.computed)((function(){return du(u.data,u.rootPath)})),c=function(h,C){return o.value.reduce((function(p,_){var E,I=_.level>=h||_.length>=C,B=(E=u.pathCollapsible)===null||E===void 0?void 0:E.call(u,_);return _.type!=="objectStart"&&_.type!=="arrayStart"||!I&&!B?p:Z(Z({},p),{},Au({},_.path,1))}),{})},i=(0,A.reactive)({translateY:0,visibleData:null,hiddenPaths:c(u.deep,u.collapsedNodeLength)}),a=(0,A.computed)((function(){for(var h=null,C=[],p=o.value.length,_=0;_<p;_++){var E=Z(Z({},o.value[_]),{},{id:_}),I=i.hiddenPaths[E.path];if(h&&h.path===E.path){var B=h.type==="objectStart",j=Z(Z(Z({},E),h),{},{showComma:E.showComma,content:B?"{...}":"[...]",type:B?"objectCollapsed":"arrayCollapsed"});h=null,C.push(j)}else{if(I&&!h){h=E;continue}if(h)continue;C.push(E)}}return C})),s=(0,A.computed)((function(){var h=u.selectedValue;return h&&u.selectableType==="multiple"&&Array.isArray(h)?h:[h]})),l=(0,A.computed)((function(){return!u.selectableType||u.selectOnClickNode||u.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."})),f=function(){var h=a.value;if(u.virtual){var C,p=u.height/u.itemHeight,_=((C=r.value)===null||C===void 0?void 0:C.scrollTop)||0,E=Math.floor(_/u.itemHeight),I=E<0?0:E+p>h.length?h.length-p:E;I<0&&(I=0);var B=I+p;i.translateY=I*u.itemHeight,i.visibleData=h.filter((function(j,O){return O>=I&&O<B}))}else i.visibleData=h},x=function(){f()},m=function(h){var C,p,_=h.path,E=u.selectableType;if(E==="multiple"){var I=s.value.findIndex((function(q){return q===_})),B=qu(s.value);I!==-1?B.splice(I,1):B.push(_),t("update:selectedValue",B),t("selectedChange",B,qu(s.value))}else if(E==="single"&&s.value[0]!==_){var j=(C=s.value,p=1,(function(q){if(Array.isArray(q))return q})(C)||(function(q,Q){var P=q==null?null:typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(P!=null){var nu,y,k=[],T=!0,N=!1;try{for(P=P.call(q);!(T=(nu=P.next()).done)&&(k.push(nu.value),!Q||k.length!==Q);T=!0);}catch(S){N=!0,y=S}finally{try{T||P.return==null||P.return()}finally{if(N)throw y}}return k}})(C,p)||yt(C,p)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],O=_;t("update:selectedValue",O),t("selectedChange",O,j)}},d=function(h){t("nodeClick",h)},D=function(h){t("nodeMouseover",h)},g=function(h,C){if(h)i.hiddenPaths=Z(Z({},i.hiddenPaths),{},Au({},C,1));else{var p=Z({},i.hiddenPaths);delete p[C],i.hiddenPaths=p}},w=function(h,C){u.collapsedOnClickBrackets&&g(h,C.path),t("bracketsClick",h,C)},v=function(h,C){g(h,C.path),t("iconClick",h,C)},F=function(h,C){var p=be(u.data),_=u.rootPath;new Function("data","val","data".concat(C.slice(_.length),"=val"))(p,h),t("update:data",p)};return(0,A.watchEffect)((function(){l.value&&(function(h){throw new Error("[VueJSONPretty] ".concat(h))})(l.value)})),(0,A.watchEffect)((function(){a.value&&f()})),(0,A.watch)((function(){return u.deep}),(function(h){h&&(i.hiddenPaths=c(h,u.collapsedNodeLength))})),(0,A.watch)((function(){return u.collapsedNodeLength}),(function(h){h&&(i.hiddenPaths=c(u.deep,h))})),function(){var h,C,p,_,E=(h=u.renderNodeKey)!==null&&h!==void 0?h:n.renderNodeKey,I=(C=u.renderNodeValue)!==null&&C!==void 0?C:n.renderNodeValue,B=(p=(_=u.renderNodeActions)!==null&&_!==void 0?_:n.renderNodeActions)!==null&&p!==void 0&&p,j=i.visibleData&&i.visibleData.map((function(O){return(0,A.createVNode)(qr,{key:O.id,data:u.data,rootPath:u.rootPath,indent:u.indent,node:O,collapsed:!!i.hiddenPaths[O.path],theme:u.theme,showDoubleQuotes:u.showDoubleQuotes,showLength:u.showLength,checked:s.value.includes(O.path),selectableType:u.selectableType,showLine:u.showLine,showLineNumber:u.showLineNumber,showSelectController:u.showSelectController,selectOnClickNode:u.selectOnClickNode,nodeSelectable:u.nodeSelectable,highlightSelectedNode:u.highlightSelectedNode,editable:u.editable,editableTrigger:u.editableTrigger,showIcon:u.showIcon,showKeyValueSpace:u.showKeyValueSpace,renderNodeKey:E,renderNodeValue:I,renderNodeActions:B,onNodeClick:d,onNodeMouseover:D,onBracketsClick:w,onIconClick:v,onSelectedChange:m,onValueChange:F,style:u.itemHeight&&u.itemHeight!==20?{lineHeight:"".concat(u.itemHeight,"px")}:{}},null)}));return(0,A.createVNode)("div",{ref:r,class:{"vjs-tree":!0,"is-virtual":u.virtual,dark:u.theme==="dark"},onScroll:u.virtual?x:void 0,style:u.showLineNumber?Z({paddingLeft:"".concat(12*Number(o.value.length.toString().length),"px")},u.style):u.style},[u.virtual?(0,A.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(u.height,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(a.value.length*u.itemHeight,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(i.translateY,"px)")}},[j])])]):j])}}});var Vr=kt.A;const Bt=/^[a-z0-9]+(-[a-z0-9]+)*$/,$u=(u,e,t,n="")=>{const r=u.split(":");if(u.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;n=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const i=r.pop(),a=r.pop(),s={provider:r.length>0?r[0]:n,prefix:a,name:i};return e&&!Vu(s)?null:s}const o=r[0],c=o.split("-");if(c.length>1){const i={provider:n,prefix:c.shift(),name:c.join("-")};return e&&!Vu(i)?null:i}if(t&&n===""){const i={provider:n,prefix:"",name:o};return e&&!Vu(i,t)?null:i}return null},Vu=(u,e)=>u?!!((e&&u.prefix===""||u.prefix)&&u.name):!1,It=Object.freeze({left:0,top:0,width:16,height:16}),Hu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Uu=Object.freeze({...It,...Hu}),me=Object.freeze({...Uu,body:"",hidden:!1});function Hr(u,e){const t={};!u.hFlip!=!e.hFlip&&(t.hFlip=!0),!u.vFlip!=!e.vFlip&&(t.vFlip=!0);const n=((u.rotate||0)+(e.rotate||0))%4;return n&&(t.rotate=n),t}function Nt(u,e){const t=Hr(u,e);for(const n in me)n in Hu?n in u&&!(n in t)&&(t[n]=Hu[n]):n in e?t[n]=e[n]:n in u&&(t[n]=u[n]);return t}function Ur(u,e){const t=u.icons,n=u.aliases||Object.create(null),r=Object.create(null);function o(c){if(t[c])return r[c]=[];if(!(c in r)){r[c]=null;const i=n[c]&&n[c].parent,a=i&&o(i);a&&(r[c]=[i].concat(a))}return r[c]}return Object.keys(t).concat(Object.keys(n)).forEach(o),r}function Zr(u,e,t){const n=u.icons,r=u.aliases||Object.create(null);let o={};function c(i){o=Nt(n[i]||r[i],o)}return c(e),t.forEach(c),Nt(u,o)}function Ot(u,e){const t=[];if(typeof u!="object"||typeof u.icons!="object")return t;u.not_found instanceof Array&&u.not_found.forEach(r=>{e(r,null),t.push(r)});const n=Ur(u);for(const r in n){const o=n[r];o&&(e(r,Zr(u,r,o)),t.push(r))}return t}const Gr={provider:"",aliases:{},not_found:{},...It};function xe(u,e){for(const t in e)if(t in u&&typeof u[t]!=typeof e[t])return!1;return!0}function Lt(u){if(typeof u!="object"||u===null)return null;const e=u;if(typeof e.prefix!="string"||!u.icons||typeof u.icons!="object"||!xe(u,Gr))return null;const t=e.icons;for(const r in t){const o=t[r];if(!r||typeof o.body!="string"||!xe(o,me))return null}const n=e.aliases||Object.create(null);for(const r in n){const o=n[r],c=o.parent;if(!r||typeof c!="string"||!t[c]&&!n[c]||!xe(o,me))return null}return e}const Mt=Object.create(null);function Wr(u,e){return{provider:u,prefix:e,icons:Object.create(null),missing:new Set}}function _u(u,e){const t=Mt[u]||(Mt[u]=Object.create(null));return t[e]||(t[e]=Wr(u,e))}function Pt(u,e){return Lt(e)?Ot(e,(t,n)=>{n?u.icons[t]=n:u.missing.add(t)}):[]}function Qr(u,e,t){try{if(typeof t.body=="string")return u.icons[e]={...t},!0}catch{}return!1}let wu=!1;function jt(u){return typeof u=="boolean"&&(wu=u),wu}function Jr(u){const e=typeof u=="string"?$u(u,!0,wu):u;if(e){const t=_u(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function Kr(u,e){const t=$u(u,!0,wu);if(!t)return!1;const n=_u(t.provider,t.prefix);return e?Qr(n,t.name,e):(n.missing.add(t.name),!0)}function Yr(u,e){if(typeof u!="object")return!1;if(typeof e!="string"&&(e=u.provider||""),wu&&!e&&!u.prefix){let r=!1;return Lt(u)&&(u.prefix="",Ot(u,(o,c)=>{Kr(o,c)&&(r=!0)})),r}const t=u.prefix;if(!Vu({prefix:t,name:"a"}))return!1;const n=_u(e,t);return!!Pt(n,u)}const zt=Object.freeze({width:null,height:null}),Rt=Object.freeze({...zt,...Hu}),Xr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uo=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qt(u,e,t){if(e===1)return u;if(t=t||100,typeof u=="number")return Math.ceil(u*e*t)/t;if(typeof u!="string")return u;const n=u.split(Xr);if(n===null||!n.length)return u;const r=[];let o=n.shift(),c=uo.test(o);for(;;){if(c){const i=parseFloat(o);isNaN(i)?r.push(o):r.push(Math.ceil(i*e*t)/t)}else r.push(o);if(o=n.shift(),o===void 0)return r.join("");c=!c}}function eo(u,e="defs"){let t="";const n=u.indexOf("<"+e);for(;n>=0;){const r=u.indexOf(">",n),o=u.indexOf("</"+e);if(r===-1||o===-1)break;const c=u.indexOf(">",o);if(c===-1)break;t+=u.slice(r+1,o).trim(),u=u.slice(0,n).trim()+u.slice(c+1)}return{defs:t,content:u}}function to(u,e){return u?"<defs>"+u+"</defs>"+e:e}function no(u,e,t){const n=eo(u);return to(n.defs,e+n.content+t)}const ro=u=>u==="unset"||u==="undefined"||u==="none";function oo(u,e){const t={...Uu,...u},n={...Rt,...e},r={left:t.left,top:t.top,width:t.width,height:t.height};let o=t.body;[t,n].forEach(D=>{const g=[],w=D.hFlip,v=D.vFlip;let F=D.rotate;w?v?F+=2:(g.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),g.push("scale(-1 1)"),r.top=r.left=0):v&&(g.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),g.push("scale(1 -1)"),r.top=r.left=0);let h;switch(F<0&&(F-=Math.floor(F/4)*4),F=F%4,F){case 1:h=r.height/2+r.top,g.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:g.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:h=r.width/2+r.left,g.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}F%2===1&&(r.left!==r.top&&(h=r.left,r.left=r.top,r.top=h),r.width!==r.height&&(h=r.width,r.width=r.height,r.height=h)),g.length&&(o=no(o,'<g transform="'+g.join(" ")+'">',"</g>"))});const c=n.width,i=n.height,a=r.width,s=r.height;let l,f;c===null?(f=i===null?"1em":i==="auto"?s:i,l=qt(f,a/s)):(l=c==="auto"?a:c,f=i===null?qt(l,s/a):i==="auto"?s:i);const x={},m=(D,g)=>{ro(g)||(x[D]=g.toString())};m("width",l),m("height",f);const d=[r.left,r.top,a,s];return x.viewBox=d.join(" "),{attributes:x,viewBox:d,body:o}}const co=/\sid="(\S+)"/g,io="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ao=0;function so(u,e=io){const t=[];let n;for(;n=co.exec(u);)t.push(n[1]);if(!t.length)return u;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const c=typeof e=="function"?e(o):e+(ao++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");u=u.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+c+r+"$3")}),u=u.replace(new RegExp(r,"g"),""),u}const ge=Object.create(null);function lo(u,e){ge[u]=e}function _e(u){return ge[u]||ge[""]}function ke(u){let e;if(typeof u.resources=="string")e=[u.resources];else if(e=u.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:u.path||"/",maxURL:u.maxURL||500,rotate:u.rotate||750,timeout:u.timeout||5e3,random:u.random===!0,index:u.index||0,dataAfterTimeout:u.dataAfterTimeout!==!1}}const ye=Object.create(null),Su=["https://api.simplesvg.com","https://api.unisvg.com"],Zu=[];for(;Su.length>0;)Su.length===1||Math.random()>.5?Zu.push(Su.shift()):Zu.push(Su.pop());ye[""]=ke({resources:["https://api.iconify.design"].concat(Zu)});function fo(u,e){const t=ke(e);return t===null?!1:(ye[u]=t,!0)}function Ce(u){return ye[u]}let $t=(()=>{let u;try{if(u=fetch,typeof u=="function")return u}catch{}})();function ho(u,e){const t=Ce(u);if(!t)return 0;let n;if(!t.maxURL)n=0;else{let r=0;t.resources.forEach(c=>{r=Math.max(r,c.length)});const o=e+".json?icons=";n=t.maxURL-r-t.path.length-o.length}return n}function po(u){return u===404}const bo=(u,e,t)=>{const n=[],r=ho(u,e),o="icons";let c={type:o,provider:u,prefix:e,icons:[]},i=0;return t.forEach((a,s)=>{i+=a.length+1,i>=r&&s>0&&(n.push(c),c={type:o,provider:u,prefix:e,icons:[]},i=a.length),c.icons.push(a)}),n.push(c),n};function mo(u){if(typeof u=="string"){const e=Ce(u);if(e)return e.path}return"/"}const xo={prepare:bo,send:(u,e,t)=>{if(!$t){t("abort",424);return}let n=mo(e.provider);switch(e.type){case"icons":{const o=e.prefix,i=e.icons.join(","),a=new URLSearchParams({icons:i});n+=o+".json?"+a.toString();break}case"custom":{const o=e.uri;n+=o.slice(0,1)==="/"?o.slice(1):o;break}default:t("abort",400);return}let r=503;$t(u+n).then(o=>{const c=o.status;if(c!==200){setTimeout(()=>{t(po(c)?"abort":"next",c)});return}return r=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?t("abort",o):t("next",r)});return}setTimeout(()=>{t("success",o)})}).catch(()=>{t("next",r)})}};function go(u){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);u.sort((r,o)=>r.provider!==o.provider?r.provider.localeCompare(o.provider):r.prefix!==o.prefix?r.prefix.localeCompare(o.prefix):r.name.localeCompare(o.name));let n={provider:"",prefix:"",name:""};return u.forEach(r=>{if(n.name===r.name&&n.prefix===r.prefix&&n.provider===r.provider)return;n=r;const o=r.provider,c=r.prefix,i=r.name,a=t[o]||(t[o]=Object.create(null)),s=a[c]||(a[c]=_u(o,c));let l;i in s.icons?l=e.loaded:c===""||s.missing.has(i)?l=e.missing:l=e.pending;const f={provider:o,prefix:c,name:i};l.push(f)}),e}function Vt(u,e){u.forEach(t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter(r=>r.id!==e))})}function _o(u){u.pendingCallbacksFlag||(u.pendingCallbacksFlag=!0,setTimeout(()=>{u.pendingCallbacksFlag=!1;const e=u.loaderCallbacks?u.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const n=u.provider,r=u.prefix;e.forEach(o=>{const c=o.icons,i=c.pending.length;c.pending=c.pending.filter(a=>{if(a.prefix!==r)return!0;const s=a.name;if(u.icons[s])c.loaded.push({provider:n,prefix:r,name:s});else if(u.missing.has(s))c.missing.push({provider:n,prefix:r,name:s});else return t=!0,!0;return!1}),c.pending.length!==i&&(t||Vt([u],o.id),o.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),o.abort))})}))}let ko=0;function yo(u,e,t){const n=ko++,r=Vt.bind(null,t,n);if(!e.pending.length)return r;const o={id:n,icons:e,callback:u,abort:r};return t.forEach(c=>{(c.loaderCallbacks||(c.loaderCallbacks=[])).push(o)}),r}function Co(u,e=!0,t=!1){const n=[];return u.forEach(r=>{const o=typeof r=="string"?$u(r,e,t):r;o&&n.push(o)}),n}var vo={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Eo(u,e,t,n){const r=u.resources.length,o=u.random?Math.floor(Math.random()*r):u.index;let c;if(u.random){let p=u.resources.slice(0);for(c=[];p.length>1;){const _=Math.floor(Math.random()*p.length);c.push(p[_]),p=p.slice(0,_).concat(p.slice(_+1))}c=c.concat(p)}else c=u.resources.slice(o).concat(u.resources.slice(0,o));const i=Date.now();let a="pending",s=0,l,f=null,x=[],m=[];typeof n=="function"&&m.push(n);function d(){f&&(clearTimeout(f),f=null)}function D(){a==="pending"&&(a="aborted"),d(),x.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),x=[]}function g(p,_){_&&(m=[]),typeof p=="function"&&m.push(p)}function w(){return{startTime:i,payload:e,status:a,queriesSent:s,queriesPending:x.length,subscribe:g,abort:D}}function v(){a="failed",m.forEach(p=>{p(void 0,l)})}function F(){x.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),x=[]}function h(p,_,E){const I=_!=="success";switch(x=x.filter(B=>B!==p),a){case"pending":break;case"failed":if(I||!u.dataAfterTimeout)return;break;default:return}if(_==="abort"){l=E,v();return}if(I){l=E,x.length||(c.length?C():v());return}if(d(),F(),!u.random){const B=u.resources.indexOf(p.resource);B!==-1&&B!==u.index&&(u.index=B)}a="completed",m.forEach(B=>{B(E)})}function C(){if(a!=="pending")return;d();const p=c.shift();if(p===void 0){if(x.length){f=setTimeout(()=>{d(),a==="pending"&&(F(),v())},u.timeout);return}v();return}const _={status:"pending",resource:p,callback:(E,I)=>{h(_,E,I)}};x.push(_),s++,f=setTimeout(C,u.rotate),t(p,e,_.callback)}return setTimeout(C),w}function Ht(u){const e={...vo,...u};let t=[];function n(){t=t.filter(i=>i().status==="pending")}function r(i,a,s){const l=Eo(e,i,a,(f,x)=>{n(),s&&s(f,x)});return t.push(l),l}function o(i){return t.find(a=>i(a))||null}return{query:r,find:o,setIndex:i=>{e.index=i},getIndex:()=>e.index,cleanup:n}}function Ut(){}const ve=Object.create(null);function Do(u){if(!ve[u]){const e=Ce(u);if(!e)return;const t=Ht(e),n={config:e,redundancy:t};ve[u]=n}return ve[u]}function Fo(u,e,t){let n,r;if(typeof u=="string"){const o=_e(u);if(!o)return t(void 0,424),Ut;r=o.send;const c=Do(u);c&&(n=c.redundancy)}else{const o=ke(u);if(o){n=Ht(o);const c=u.resources?u.resources[0]:"",i=_e(c);i&&(r=i.send)}}return!n||!r?(t(void 0,424),Ut):n.query(e,r,t)().abort}function Zt(){}function Ao(u){u.iconsLoaderFlag||(u.iconsLoaderFlag=!0,setTimeout(()=>{u.iconsLoaderFlag=!1,_o(u)}))}function wo(u){const e=[],t=[];return u.forEach(n=>{(n.match(Bt)?e:t).push(n)}),{valid:e,invalid:t}}function Tu(u,e,t){function n(){const r=u.pendingIcons;e.forEach(o=>{r&&r.delete(o),u.icons[o]||u.missing.add(o)})}if(t&&typeof t=="object")try{if(!Pt(u,t).length){n();return}}catch(r){console.error(r)}n(),Ao(u)}function Gt(u,e){u instanceof Promise?u.then(t=>{e(t)}).catch(()=>{e(null)}):e(u)}function So(u,e){u.iconsToLoad?u.iconsToLoad=u.iconsToLoad.concat(e).sort():u.iconsToLoad=e,u.iconsQueueFlag||(u.iconsQueueFlag=!0,setTimeout(()=>{u.iconsQueueFlag=!1;const{provider:t,prefix:n}=u,r=u.iconsToLoad;if(delete u.iconsToLoad,!r||!r.length)return;const o=u.loadIcon;if(u.loadIcons&&(r.length>1||!o)){Gt(u.loadIcons(r,n,t),l=>{Tu(u,r,l)});return}if(o){r.forEach(l=>{const f=o(l,n,t);Gt(f,x=>{const m=x?{prefix:n,icons:{[l]:x}}:null;Tu(u,[l],m)})});return}const{valid:c,invalid:i}=wo(r);if(i.length&&Tu(u,i,null),!c.length)return;const a=n.match(Bt)?_e(t):null;if(!a){Tu(u,c,null);return}a.prepare(t,n,c).forEach(l=>{Fo(t,l,f=>{Tu(u,l.icons,f)})})}))}const To=(u,e)=>{const t=Co(u,!0,jt()),n=go(t);if(!n.pending.length){let a=!0;return e&&setTimeout(()=>{a&&e(n.loaded,n.missing,n.pending,Zt)}),()=>{a=!1}}const r=Object.create(null),o=[];let c,i;return n.pending.forEach(a=>{const{provider:s,prefix:l}=a;if(l===i&&s===c)return;c=s,i=l,o.push(_u(s,l));const f=r[s]||(r[s]=Object.create(null));f[l]||(f[l]=[])}),n.pending.forEach(a=>{const{provider:s,prefix:l,name:f}=a,x=_u(s,l),m=x.pendingIcons||(x.pendingIcons=new Set);m.has(f)||(m.add(f),r[s][l].push(f))}),o.forEach(a=>{const s=r[a.provider][a.prefix];s.length&&So(a,s)}),e?yo(e,n,o):Zt};function Bo(u,e){const t={...u};for(const n in e){const r=e[n],o=typeof r;n in zt?(r===null||r&&(o==="string"||o==="number"))&&(t[n]=r):o===typeof t[n]&&(t[n]=n==="rotate"?r%4:r)}return t}const Io=/[\s,]+/;function No(u,e){e.split(Io).forEach(t=>{switch(t.trim()){case"horizontal":u.hFlip=!0;break;case"vertical":u.vFlip=!0;break}})}function Oo(u,e=0){const t=u.replace(/^-?[0-9.]*/,"");function n(r){for(;r<0;)r+=4;return r%4}if(t===""){const r=parseInt(u);return isNaN(r)?0:n(r)}else if(t!==u){let r=0;switch(t){case"%":r=25;break;case"deg":r=90}if(r){let o=parseFloat(u.slice(0,u.length-t.length));return isNaN(o)?0:(o=o/r,o%1===0?n(o):0)}}return e}function Lo(u,e){let t=u.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)t+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+u+"</svg>"}function Mo(u){return u.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Po(u){return"data:image/svg+xml,"+Mo(u)}function jo(u){return'url("'+Po(u)+'")'}const Wt={...Rt,inline:!1},zo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ro={display:"inline-block"},Ee={backgroundColor:"currentColor"},Qt={backgroundColor:"transparent"},Jt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Kt={webkitMask:Ee,mask:Ee,background:Qt};for(const u in Kt){const e=Kt[u];for(const t in Jt)e[u+t]=Jt[t]}const Gu={};["horizontal","vertical"].forEach(u=>{const e=u.slice(0,1)+"Flip";Gu[u+"-flip"]=e,Gu[u.slice(0,1)+"-flip"]=e,Gu[u+"Flip"]=e});function Yt(u){return u+(u.match(/^[-0-9.]+$/)?"px":"")}const Xt=(u,e)=>{const t=Bo(Wt,e),n={...zo},r=e.mode||"svg",o={},c=e.style,i=typeof c=="object"&&!(c instanceof Array)?c:{};for(let D in e){const g=e[D];if(g!==void 0)switch(D){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":t[D]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&No(t,g);break;case"color":o.color=g;break;case"rotate":typeof g=="string"?t[D]=Oo(g):typeof g=="number"&&(t[D]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete n["aria-hidden"];break;default:{const w=Gu[D];w?(g===!0||g==="true"||g===1)&&(t[w]=!0):Wt[D]===void 0&&(n[D]=g)}}}const a=oo(u,t),s=a.attributes;if(t.inline&&(o.verticalAlign="-0.125em"),r==="svg"){n.style={...o,...i},Object.assign(n,s);let D=0,g=e.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),n.innerHTML=so(a.body,g?()=>g+"ID"+D++:"iconifyVue"),b.h("svg",n)}const{body:l,width:f,height:x}=u,m=r==="mask"||(r==="bg"?!1:l.indexOf("currentColor")!==-1),d=Lo(l,{...s,width:f+"",height:x+""});return n.style={...o,"--svg":jo(d),width:Yt(s.width),height:Yt(s.height),...Ro,...m?Ee:Qt,...i},b.h("span",n)};if(jt(!0),lo("",xo),typeof document<"u"&&typeof window<"u"){const u=window;if(u.IconifyPreload!==void 0){const e=u.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Yr(n))&&console.error(t)}catch{console.error(t)}})}if(u.IconifyProviders!==void 0){const e=u.IconifyProviders;if(typeof e=="object"&&e!==null)for(let t in e){const n="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if(typeof r!="object"||!r||r.resources===void 0)continue;fo(t,r)||console.error(n)}catch{console.error(n)}}}}const qo={...Uu,body:""},De=b.defineComponent((u,{emit:e})=>{const t=b.ref(null);function n(){t.value&&(t.value.abort?.(),t.value=null)}const r=b.ref(!!u.ssr),o=b.ref(""),c=b.shallowRef(null);function i(){const s=u.icon;if(typeof s=="object"&&s!==null&&typeof s.body=="string")return o.value="",{data:s};let l;if(typeof s!="string"||(l=$u(s,!1,!0))===null)return null;let f=Jr(l);if(!f){const d=t.value;return(!d||d.name!==s)&&(f===null?t.value={name:s}:t.value={name:s,abort:To([l],a)}),null}n(),o.value!==s&&(o.value=s,b.nextTick(()=>{e("load",s)}));const x=u.customise;if(x){f=Object.assign({},f);const d=x(f.body,l.name,l.prefix,l.provider);typeof d=="string"&&(f.body=d)}const m=["iconify"];return l.prefix!==""&&m.push("iconify--"+l.prefix),l.provider!==""&&m.push("iconify--"+l.provider),{data:f,classes:m}}function a(){const s=i();s?s.data!==c.value?.data&&(c.value=s):c.value=null}return r.value?a():b.onMounted(()=>{r.value=!0,a()}),b.watch(()=>u.icon,a),b.onUnmounted(n),()=>{const s=c.value;if(!s)return Xt(qo,u);let l=u;return s.classes&&(l={...u,class:s.classes.join(" ")}),Xt({...Uu,...s.data},l)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]}),$o=["src","alt"],Vo=b.defineComponent({__name:"ImageViewer",props:{show:{type:Boolean},imageUrl:{},alt:{}},emits:["close"],setup(u){return(e,t)=>(b.openBlock(),b.createBlock(b.Teleport,{to:"body"},[b.createVNode(b.Transition,{name:"viewer"},{default:b.withCtx(()=>[u.show?(b.openBlock(),b.createElementBlock("div",{key:0,class:"image-viewer",onClick:t[2]||(t[2]=n=>e.$emit("close"))},[b.createElementVNode("div",{class:"close-button",onClick:t[0]||(t[0]=b.withModifiers(n=>e.$emit("close"),["stop"]))},[b.createVNode(b.unref(De),{icon:"mdi:close"})]),b.createElementVNode("div",{class:"viewer-content",onClick:t[1]||(t[1]=b.withModifiers(()=>{},["stop"]))},[b.createElementVNode("img",{src:u.imageUrl,alt:u.alt},null,8,$o)])])):b.createCommentVNode("",!0)]),_:1})]))}}),hu=(u,e)=>{const t=u.__vccOpts||u;for(const[n,r]of e)t[n]=r;return t},u0=hu(Vo,[["__scopeId","data-v-92c159ee"]]),Ho=["innerHTML"],e0=hu(b.defineComponent({__name:"MessageTextContent",props:{html:{},role:{}},setup(u){const t=u.role;return(n,r)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["content-text",b.unref(t)?`role-${b.unref(t)}`:""]),innerHTML:u.html},null,10,Ho))}}),[["__scopeId","data-v-a6c720b9"]]),Uo={class:"file-name"},Fe=hu(b.defineComponent({__name:"MessageFileContent",props:{name:{}},emits:["click"],setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("div",{class:"content-file",onClick:t[0]||(t[0]=n=>e.$emit("click"))},[b.createVNode(b.unref(De),{icon:"mdi:file-document-outline",class:"file-icon"}),b.createElementVNode("span",Uo,b.toDisplayString(u.name),1),b.createVNode(b.unref(De),{icon:"mdi:download",class:"download-icon"})]))}}),[["__scopeId","data-v-24190b61"]]),Zo=["src"],Ae=hu(b.defineComponent({__name:"MessageImageContent",props:{src:{},fullWidth:{type:Boolean}},emits:["click"],setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("img",{src:u.src,alt:"图片",class:b.normalizeClass(["message-image",{"is-full-width":u.fullWidth}]),onClick:t[0]||(t[0]=n=>e.$emit("click"))},null,10,Zo))}}),[["__scopeId","data-v-24952cda"]]),Go=["src"],t0=hu(b.defineComponent({__name:"MessageVideoContent",props:{src:{},fullWidth:{type:Boolean}},setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("video",{controls:"",src:u.src,class:b.normalizeClass(["message-video",{"is-full-width":u.fullWidth}])}," 您的浏览器不支持视频播放 ",10,Go))}}),[["__scopeId","data-v-28c3e763"]]),Wo=["src"],we=hu(b.defineComponent({__name:"MessageAudioContent",props:{src:{}},setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("audio",{controls:"",src:u.src,class:"message-audio"}," 您的浏览器不支持音频播放 ",8,Wo))}}),[["__scopeId","data-v-c0d42074"]]),Qo={key:1,class:"content-user-message"},Jo={key:1,class:"files-grid"},Ko={key:5,class:"content-medialib"},Yo=hu(b.defineComponent({__name:"MessageContentRenderer",props:{content:{},role:{}},setup(u){const e=u,t=b.computed(()=>e.role?`role-${e.role}`:""),n=b.computed(()=>{const h=e.content;return typeof h=="string"?{type:"text",content:h}:h});function r(h){return!("type"in h)}const o=new W({html:!0,linkify:!0,typographer:!0}),c=b.computed(()=>!r(n.value)&&n.value.type==="text"?o.render(n.value.content):""),i=b.ref(!1),a=b.ref("");function s(){r(n.value)||(n.value.type==="image"?(a.value=n.value.content,i.value=!0):n.value.type==="medialib"&&v.value==="image"&&(a.value=g.value,i.value=!0))}function l(h){a.value=h,i.value=!0}function f(h){try{const _=new URL(h).pathname.split("/");return _[_.length-1]||"未知文件"}catch{return"未知文件"}}function x(){r(n.value)||window.open(n.value.content,"_blank")}function m(h){window.open(h,"_blank")}function d(h){if(!h)return"file";const C=h.toLowerCase();return C.match(/\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv)$/)?"video":C.match(/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/)?"image":C.match(/\.(mp3|wav|ogg|aac|flac|m4a)$/)?"audio":"file"}const D=b.computed(()=>{if(!r(n.value)&&n.value.type==="medialib")try{return JSON.parse(n.value.content)}catch{return null}return null}),g=b.computed(()=>D.value?.file_url||""),w=b.computed(()=>D.value?.file_name||f(g.value)),v=b.computed(()=>{if(!g.value)return"json";const h=g.value.toLowerCase();return h.match(/\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv)$/)?"video":h.match(/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/)?"image":h.match(/\.(mp3|wav|ogg|aac|flac|m4a)$/)?"audio":"file"});function F(){g.value&&window.open(g.value,"_blank")}return(h,C)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["message-content-renderer",t.value])},[!r(n.value)&&n.value.type==="text"?(b.openBlock(),b.createBlock(e0,{key:0,html:c.value,role:u.role},null,8,["html","role"])):r(n.value)?(b.openBlock(),b.createElementBlock("div",Qo,[n.value.texts&&n.value.texts.length>0?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(n.value.texts,(p,_)=>(b.openBlock(),b.createBlock(e0,{key:`text-${_}`,html:b.unref(o).render(p),role:u.role},null,8,["html","role"]))),128)):b.createCommentVNode("",!0),n.value.files&&n.value.files.length>0?(b.openBlock(),b.createElementBlock("div",Jo,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(n.value.files,(p,_)=>(b.openBlock(),b.createElementBlock("div",{key:`file-${_}`},[d(p)==="image"?(b.openBlock(),b.createBlock(Ae,{key:0,src:p,"full-width":!0,onClick:E=>l(p)},null,8,["src","onClick"])):d(p)==="video"?(b.openBlock(),b.createBlock(t0,{key:1,src:p,"full-width":!0},null,8,["src"])):d(p)==="audio"?(b.openBlock(),b.createBlock(we,{key:2,src:p},null,8,["src"])):(b.openBlock(),b.createBlock(Fe,{key:3,name:f(p),onClick:E=>m(p)},null,8,["name","onClick"]))]))),128))])):b.createCommentVNode("",!0)])):!r(n.value)&&n.value.type==="file"?(b.openBlock(),b.createBlock(Fe,{key:2,name:f(n.value.content),onClick:x},null,8,["name"])):!r(n.value)&&n.value.type==="image"?(b.openBlock(),b.createBlock(Ae,{key:3,src:n.value.content,onClick:s},null,8,["src"])):!r(n.value)&&n.value.type==="voice"?(b.openBlock(),b.createBlock(we,{key:4,src:n.value.content},null,8,["src"])):!r(n.value)&&n.value.type==="medialib"?(b.openBlock(),b.createElementBlock("div",Ko,[v.value==="video"?(b.openBlock(),b.createBlock(t0,{key:0,src:g.value,"full-width":!0},null,8,["src"])):v.value==="image"?(b.openBlock(),b.createBlock(Ae,{key:1,src:g.value,onClick:s},null,8,["src"])):v.value==="audio"?(b.openBlock(),b.createBlock(we,{key:2,src:g.value},null,8,["src"])):v.value==="file"?(b.openBlock(),b.createBlock(Fe,{key:3,name:w.value,onClick:F},null,8,["name"])):(b.openBlock(),b.createBlock(b.unref(Vr),{key:4,data:D.value,deep:3,class:"json-viewer"},null,8,["data"]))])):b.createCommentVNode("",!0),b.createVNode(u0,{show:i.value,"image-url":a.value,onClose:C[0]||(C[0]=p=>i.value=!1)},null,8,["show","image-url"])],2))}}),[["__scopeId","data-v-adfc2d98"]]);iu.ImageViewer=u0,iu.MessageContentRenderer=Yo,Object.defineProperty(iu,Symbol.toStringTag,{value:"Module"})}));
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],O=_;t("update:selectedValue",O),t("selectedChange",O,j)}},d=function(h){t("nodeClick",h)},D=function(h){t("nodeMouseover",h)},g=function(h,C){if(h)i.hiddenPaths=Z(Z({},i.hiddenPaths),{},Au({},C,1));else{var p=Z({},i.hiddenPaths);delete p[C],i.hiddenPaths=p}},w=function(h,C){u.collapsedOnClickBrackets&&g(h,C.path),t("bracketsClick",h,C)},v=function(h,C){g(h,C.path),t("iconClick",h,C)},F=function(h,C){var p=be(u.data),_=u.rootPath;new Function("data","val","data".concat(C.slice(_.length),"=val"))(p,h),t("update:data",p)};return(0,A.watchEffect)((function(){l.value&&(function(h){throw new Error("[VueJSONPretty] ".concat(h))})(l.value)})),(0,A.watchEffect)((function(){a.value&&f()})),(0,A.watch)((function(){return u.deep}),(function(h){h&&(i.hiddenPaths=c(h,u.collapsedNodeLength))})),(0,A.watch)((function(){return u.collapsedNodeLength}),(function(h){h&&(i.hiddenPaths=c(u.deep,h))})),function(){var h,C,p,_,E=(h=u.renderNodeKey)!==null&&h!==void 0?h:n.renderNodeKey,I=(C=u.renderNodeValue)!==null&&C!==void 0?C:n.renderNodeValue,B=(p=(_=u.renderNodeActions)!==null&&_!==void 0?_:n.renderNodeActions)!==null&&p!==void 0&&p,j=i.visibleData&&i.visibleData.map((function(O){return(0,A.createVNode)(qr,{key:O.id,data:u.data,rootPath:u.rootPath,indent:u.indent,node:O,collapsed:!!i.hiddenPaths[O.path],theme:u.theme,showDoubleQuotes:u.showDoubleQuotes,showLength:u.showLength,checked:s.value.includes(O.path),selectableType:u.selectableType,showLine:u.showLine,showLineNumber:u.showLineNumber,showSelectController:u.showSelectController,selectOnClickNode:u.selectOnClickNode,nodeSelectable:u.nodeSelectable,highlightSelectedNode:u.highlightSelectedNode,editable:u.editable,editableTrigger:u.editableTrigger,showIcon:u.showIcon,showKeyValueSpace:u.showKeyValueSpace,renderNodeKey:E,renderNodeValue:I,renderNodeActions:B,onNodeClick:d,onNodeMouseover:D,onBracketsClick:w,onIconClick:v,onSelectedChange:m,onValueChange:F,style:u.itemHeight&&u.itemHeight!==20?{lineHeight:"".concat(u.itemHeight,"px")}:{}},null)}));return(0,A.createVNode)("div",{ref:r,class:{"vjs-tree":!0,"is-virtual":u.virtual,dark:u.theme==="dark"},onScroll:u.virtual?x:void 0,style:u.showLineNumber?Z({paddingLeft:"".concat(12*Number(o.value.length.toString().length),"px")},u.style):u.style},[u.virtual?(0,A.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(u.height,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(a.value.length*u.itemHeight,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(i.translateY,"px)")}},[j])])]):j])}}});var Vr=kt.A;const Bt=/^[a-z0-9]+(-[a-z0-9]+)*$/,$u=(u,e,t,n="")=>{const r=u.split(":");if(u.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;n=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const i=r.pop(),a=r.pop(),s={provider:r.length>0?r[0]:n,prefix:a,name:i};return e&&!Vu(s)?null:s}const o=r[0],c=o.split("-");if(c.length>1){const i={provider:n,prefix:c.shift(),name:c.join("-")};return e&&!Vu(i)?null:i}if(t&&n===""){const i={provider:n,prefix:"",name:o};return e&&!Vu(i,t)?null:i}return null},Vu=(u,e)=>u?!!((e&&u.prefix===""||u.prefix)&&u.name):!1,It=Object.freeze({left:0,top:0,width:16,height:16}),Hu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Uu=Object.freeze({...It,...Hu}),me=Object.freeze({...Uu,body:"",hidden:!1});function Hr(u,e){const t={};!u.hFlip!=!e.hFlip&&(t.hFlip=!0),!u.vFlip!=!e.vFlip&&(t.vFlip=!0);const n=((u.rotate||0)+(e.rotate||0))%4;return n&&(t.rotate=n),t}function Nt(u,e){const t=Hr(u,e);for(const n in me)n in Hu?n in u&&!(n in t)&&(t[n]=Hu[n]):n in e?t[n]=e[n]:n in u&&(t[n]=u[n]);return t}function Ur(u,e){const t=u.icons,n=u.aliases||Object.create(null),r=Object.create(null);function o(c){if(t[c])return r[c]=[];if(!(c in r)){r[c]=null;const i=n[c]&&n[c].parent,a=i&&o(i);a&&(r[c]=[i].concat(a))}return r[c]}return Object.keys(t).concat(Object.keys(n)).forEach(o),r}function Zr(u,e,t){const n=u.icons,r=u.aliases||Object.create(null);let o={};function c(i){o=Nt(n[i]||r[i],o)}return c(e),t.forEach(c),Nt(u,o)}function Ot(u,e){const t=[];if(typeof u!="object"||typeof u.icons!="object")return t;u.not_found instanceof Array&&u.not_found.forEach(r=>{e(r,null),t.push(r)});const n=Ur(u);for(const r in n){const o=n[r];o&&(e(r,Zr(u,r,o)),t.push(r))}return t}const Gr={provider:"",aliases:{},not_found:{},...It};function xe(u,e){for(const t in e)if(t in u&&typeof u[t]!=typeof e[t])return!1;return!0}function Lt(u){if(typeof u!="object"||u===null)return null;const e=u;if(typeof e.prefix!="string"||!u.icons||typeof u.icons!="object"||!xe(u,Gr))return null;const t=e.icons;for(const r in t){const o=t[r];if(!r||typeof o.body!="string"||!xe(o,me))return null}const n=e.aliases||Object.create(null);for(const r in n){const o=n[r],c=o.parent;if(!r||typeof c!="string"||!t[c]&&!n[c]||!xe(o,me))return null}return e}const Mt=Object.create(null);function Wr(u,e){return{provider:u,prefix:e,icons:Object.create(null),missing:new Set}}function _u(u,e){const t=Mt[u]||(Mt[u]=Object.create(null));return t[e]||(t[e]=Wr(u,e))}function Pt(u,e){return Lt(e)?Ot(e,(t,n)=>{n?u.icons[t]=n:u.missing.add(t)}):[]}function Qr(u,e,t){try{if(typeof t.body=="string")return u.icons[e]={...t},!0}catch{}return!1}let wu=!1;function jt(u){return typeof u=="boolean"&&(wu=u),wu}function Jr(u){const e=typeof u=="string"?$u(u,!0,wu):u;if(e){const t=_u(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function Kr(u,e){const t=$u(u,!0,wu);if(!t)return!1;const n=_u(t.provider,t.prefix);return e?Qr(n,t.name,e):(n.missing.add(t.name),!0)}function Yr(u,e){if(typeof u!="object")return!1;if(typeof e!="string"&&(e=u.provider||""),wu&&!e&&!u.prefix){let r=!1;return Lt(u)&&(u.prefix="",Ot(u,(o,c)=>{Kr(o,c)&&(r=!0)})),r}const t=u.prefix;if(!Vu({prefix:t,name:"a"}))return!1;const n=_u(e,t);return!!Pt(n,u)}const zt=Object.freeze({width:null,height:null}),Rt=Object.freeze({...zt,...Hu}),Xr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uo=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qt(u,e,t){if(e===1)return u;if(t=t||100,typeof u=="number")return Math.ceil(u*e*t)/t;if(typeof u!="string")return u;const n=u.split(Xr);if(n===null||!n.length)return u;const r=[];let o=n.shift(),c=uo.test(o);for(;;){if(c){const i=parseFloat(o);isNaN(i)?r.push(o):r.push(Math.ceil(i*e*t)/t)}else r.push(o);if(o=n.shift(),o===void 0)return r.join("");c=!c}}function eo(u,e="defs"){let t="";const n=u.indexOf("<"+e);for(;n>=0;){const r=u.indexOf(">",n),o=u.indexOf("</"+e);if(r===-1||o===-1)break;const c=u.indexOf(">",o);if(c===-1)break;t+=u.slice(r+1,o).trim(),u=u.slice(0,n).trim()+u.slice(c+1)}return{defs:t,content:u}}function to(u,e){return u?"<defs>"+u+"</defs>"+e:e}function no(u,e,t){const n=eo(u);return to(n.defs,e+n.content+t)}const ro=u=>u==="unset"||u==="undefined"||u==="none";function oo(u,e){const t={...Uu,...u},n={...Rt,...e},r={left:t.left,top:t.top,width:t.width,height:t.height};let o=t.body;[t,n].forEach(D=>{const g=[],w=D.hFlip,v=D.vFlip;let F=D.rotate;w?v?F+=2:(g.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),g.push("scale(-1 1)"),r.top=r.left=0):v&&(g.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),g.push("scale(1 -1)"),r.top=r.left=0);let h;switch(F<0&&(F-=Math.floor(F/4)*4),F=F%4,F){case 1:h=r.height/2+r.top,g.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:g.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:h=r.width/2+r.left,g.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}F%2===1&&(r.left!==r.top&&(h=r.left,r.left=r.top,r.top=h),r.width!==r.height&&(h=r.width,r.width=r.height,r.height=h)),g.length&&(o=no(o,'<g transform="'+g.join(" ")+'">',"</g>"))});const c=n.width,i=n.height,a=r.width,s=r.height;let l,f;c===null?(f=i===null?"1em":i==="auto"?s:i,l=qt(f,a/s)):(l=c==="auto"?a:c,f=i===null?qt(l,s/a):i==="auto"?s:i);const x={},m=(D,g)=>{ro(g)||(x[D]=g.toString())};m("width",l),m("height",f);const d=[r.left,r.top,a,s];return x.viewBox=d.join(" "),{attributes:x,viewBox:d,body:o}}const co=/\sid="(\S+)"/g,io="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ao=0;function so(u,e=io){const t=[];let n;for(;n=co.exec(u);)t.push(n[1]);if(!t.length)return u;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const c=typeof e=="function"?e(o):e+(ao++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");u=u.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+c+r+"$3")}),u=u.replace(new RegExp(r,"g"),""),u}const ge=Object.create(null);function lo(u,e){ge[u]=e}function _e(u){return ge[u]||ge[""]}function ke(u){let e;if(typeof u.resources=="string")e=[u.resources];else if(e=u.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:u.path||"/",maxURL:u.maxURL||500,rotate:u.rotate||750,timeout:u.timeout||5e3,random:u.random===!0,index:u.index||0,dataAfterTimeout:u.dataAfterTimeout!==!1}}const ye=Object.create(null),Su=["https://api.simplesvg.com","https://api.unisvg.com"],Zu=[];for(;Su.length>0;)Su.length===1||Math.random()>.5?Zu.push(Su.shift()):Zu.push(Su.pop());ye[""]=ke({resources:["https://api.iconify.design"].concat(Zu)});function fo(u,e){const t=ke(e);return t===null?!1:(ye[u]=t,!0)}function Ce(u){return ye[u]}let $t=(()=>{let u;try{if(u=fetch,typeof u=="function")return u}catch{}})();function ho(u,e){const t=Ce(u);if(!t)return 0;let n;if(!t.maxURL)n=0;else{let r=0;t.resources.forEach(c=>{r=Math.max(r,c.length)});const o=e+".json?icons=";n=t.maxURL-r-t.path.length-o.length}return n}function po(u){return u===404}const bo=(u,e,t)=>{const n=[],r=ho(u,e),o="icons";let c={type:o,provider:u,prefix:e,icons:[]},i=0;return t.forEach((a,s)=>{i+=a.length+1,i>=r&&s>0&&(n.push(c),c={type:o,provider:u,prefix:e,icons:[]},i=a.length),c.icons.push(a)}),n.push(c),n};function mo(u){if(typeof u=="string"){const e=Ce(u);if(e)return e.path}return"/"}const xo={prepare:bo,send:(u,e,t)=>{if(!$t){t("abort",424);return}let n=mo(e.provider);switch(e.type){case"icons":{const o=e.prefix,i=e.icons.join(","),a=new URLSearchParams({icons:i});n+=o+".json?"+a.toString();break}case"custom":{const o=e.uri;n+=o.slice(0,1)==="/"?o.slice(1):o;break}default:t("abort",400);return}let r=503;$t(u+n).then(o=>{const c=o.status;if(c!==200){setTimeout(()=>{t(po(c)?"abort":"next",c)});return}return r=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?t("abort",o):t("next",r)});return}setTimeout(()=>{t("success",o)})}).catch(()=>{t("next",r)})}};function go(u){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);u.sort((r,o)=>r.provider!==o.provider?r.provider.localeCompare(o.provider):r.prefix!==o.prefix?r.prefix.localeCompare(o.prefix):r.name.localeCompare(o.name));let n={provider:"",prefix:"",name:""};return u.forEach(r=>{if(n.name===r.name&&n.prefix===r.prefix&&n.provider===r.provider)return;n=r;const o=r.provider,c=r.prefix,i=r.name,a=t[o]||(t[o]=Object.create(null)),s=a[c]||(a[c]=_u(o,c));let l;i in s.icons?l=e.loaded:c===""||s.missing.has(i)?l=e.missing:l=e.pending;const f={provider:o,prefix:c,name:i};l.push(f)}),e}function Vt(u,e){u.forEach(t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter(r=>r.id!==e))})}function _o(u){u.pendingCallbacksFlag||(u.pendingCallbacksFlag=!0,setTimeout(()=>{u.pendingCallbacksFlag=!1;const e=u.loaderCallbacks?u.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const n=u.provider,r=u.prefix;e.forEach(o=>{const c=o.icons,i=c.pending.length;c.pending=c.pending.filter(a=>{if(a.prefix!==r)return!0;const s=a.name;if(u.icons[s])c.loaded.push({provider:n,prefix:r,name:s});else if(u.missing.has(s))c.missing.push({provider:n,prefix:r,name:s});else return t=!0,!0;return!1}),c.pending.length!==i&&(t||Vt([u],o.id),o.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),o.abort))})}))}let ko=0;function yo(u,e,t){const n=ko++,r=Vt.bind(null,t,n);if(!e.pending.length)return r;const o={id:n,icons:e,callback:u,abort:r};return t.forEach(c=>{(c.loaderCallbacks||(c.loaderCallbacks=[])).push(o)}),r}function Co(u,e=!0,t=!1){const n=[];return u.forEach(r=>{const o=typeof r=="string"?$u(r,e,t):r;o&&n.push(o)}),n}var vo={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Eo(u,e,t,n){const r=u.resources.length,o=u.random?Math.floor(Math.random()*r):u.index;let c;if(u.random){let p=u.resources.slice(0);for(c=[];p.length>1;){const _=Math.floor(Math.random()*p.length);c.push(p[_]),p=p.slice(0,_).concat(p.slice(_+1))}c=c.concat(p)}else c=u.resources.slice(o).concat(u.resources.slice(0,o));const i=Date.now();let a="pending",s=0,l,f=null,x=[],m=[];typeof n=="function"&&m.push(n);function d(){f&&(clearTimeout(f),f=null)}function D(){a==="pending"&&(a="aborted"),d(),x.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),x=[]}function g(p,_){_&&(m=[]),typeof p=="function"&&m.push(p)}function w(){return{startTime:i,payload:e,status:a,queriesSent:s,queriesPending:x.length,subscribe:g,abort:D}}function v(){a="failed",m.forEach(p=>{p(void 0,l)})}function F(){x.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),x=[]}function h(p,_,E){const I=_!=="success";switch(x=x.filter(B=>B!==p),a){case"pending":break;case"failed":if(I||!u.dataAfterTimeout)return;break;default:return}if(_==="abort"){l=E,v();return}if(I){l=E,x.length||(c.length?C():v());return}if(d(),F(),!u.random){const B=u.resources.indexOf(p.resource);B!==-1&&B!==u.index&&(u.index=B)}a="completed",m.forEach(B=>{B(E)})}function C(){if(a!=="pending")return;d();const p=c.shift();if(p===void 0){if(x.length){f=setTimeout(()=>{d(),a==="pending"&&(F(),v())},u.timeout);return}v();return}const _={status:"pending",resource:p,callback:(E,I)=>{h(_,E,I)}};x.push(_),s++,f=setTimeout(C,u.rotate),t(p,e,_.callback)}return setTimeout(C),w}function Ht(u){const e={...vo,...u};let t=[];function n(){t=t.filter(i=>i().status==="pending")}function r(i,a,s){const l=Eo(e,i,a,(f,x)=>{n(),s&&s(f,x)});return t.push(l),l}function o(i){return t.find(a=>i(a))||null}return{query:r,find:o,setIndex:i=>{e.index=i},getIndex:()=>e.index,cleanup:n}}function Ut(){}const ve=Object.create(null);function Do(u){if(!ve[u]){const e=Ce(u);if(!e)return;const t=Ht(e),n={config:e,redundancy:t};ve[u]=n}return ve[u]}function Fo(u,e,t){let n,r;if(typeof u=="string"){const o=_e(u);if(!o)return t(void 0,424),Ut;r=o.send;const c=Do(u);c&&(n=c.redundancy)}else{const o=ke(u);if(o){n=Ht(o);const c=u.resources?u.resources[0]:"",i=_e(c);i&&(r=i.send)}}return!n||!r?(t(void 0,424),Ut):n.query(e,r,t)().abort}function Zt(){}function Ao(u){u.iconsLoaderFlag||(u.iconsLoaderFlag=!0,setTimeout(()=>{u.iconsLoaderFlag=!1,_o(u)}))}function wo(u){const e=[],t=[];return u.forEach(n=>{(n.match(Bt)?e:t).push(n)}),{valid:e,invalid:t}}function Tu(u,e,t){function n(){const r=u.pendingIcons;e.forEach(o=>{r&&r.delete(o),u.icons[o]||u.missing.add(o)})}if(t&&typeof t=="object")try{if(!Pt(u,t).length){n();return}}catch(r){console.error(r)}n(),Ao(u)}function Gt(u,e){u instanceof Promise?u.then(t=>{e(t)}).catch(()=>{e(null)}):e(u)}function So(u,e){u.iconsToLoad?u.iconsToLoad=u.iconsToLoad.concat(e).sort():u.iconsToLoad=e,u.iconsQueueFlag||(u.iconsQueueFlag=!0,setTimeout(()=>{u.iconsQueueFlag=!1;const{provider:t,prefix:n}=u,r=u.iconsToLoad;if(delete u.iconsToLoad,!r||!r.length)return;const o=u.loadIcon;if(u.loadIcons&&(r.length>1||!o)){Gt(u.loadIcons(r,n,t),l=>{Tu(u,r,l)});return}if(o){r.forEach(l=>{const f=o(l,n,t);Gt(f,x=>{const m=x?{prefix:n,icons:{[l]:x}}:null;Tu(u,[l],m)})});return}const{valid:c,invalid:i}=wo(r);if(i.length&&Tu(u,i,null),!c.length)return;const a=n.match(Bt)?_e(t):null;if(!a){Tu(u,c,null);return}a.prepare(t,n,c).forEach(l=>{Fo(t,l,f=>{Tu(u,l.icons,f)})})}))}const To=(u,e)=>{const t=Co(u,!0,jt()),n=go(t);if(!n.pending.length){let a=!0;return e&&setTimeout(()=>{a&&e(n.loaded,n.missing,n.pending,Zt)}),()=>{a=!1}}const r=Object.create(null),o=[];let c,i;return n.pending.forEach(a=>{const{provider:s,prefix:l}=a;if(l===i&&s===c)return;c=s,i=l,o.push(_u(s,l));const f=r[s]||(r[s]=Object.create(null));f[l]||(f[l]=[])}),n.pending.forEach(a=>{const{provider:s,prefix:l,name:f}=a,x=_u(s,l),m=x.pendingIcons||(x.pendingIcons=new Set);m.has(f)||(m.add(f),r[s][l].push(f))}),o.forEach(a=>{const s=r[a.provider][a.prefix];s.length&&So(a,s)}),e?yo(e,n,o):Zt};function Bo(u,e){const t={...u};for(const n in e){const r=e[n],o=typeof r;n in zt?(r===null||r&&(o==="string"||o==="number"))&&(t[n]=r):o===typeof t[n]&&(t[n]=n==="rotate"?r%4:r)}return t}const Io=/[\s,]+/;function No(u,e){e.split(Io).forEach(t=>{switch(t.trim()){case"horizontal":u.hFlip=!0;break;case"vertical":u.vFlip=!0;break}})}function Oo(u,e=0){const t=u.replace(/^-?[0-9.]*/,"");function n(r){for(;r<0;)r+=4;return r%4}if(t===""){const r=parseInt(u);return isNaN(r)?0:n(r)}else if(t!==u){let r=0;switch(t){case"%":r=25;break;case"deg":r=90}if(r){let o=parseFloat(u.slice(0,u.length-t.length));return isNaN(o)?0:(o=o/r,o%1===0?n(o):0)}}return e}function Lo(u,e){let t=u.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)t+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+u+"</svg>"}function Mo(u){return u.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Po(u){return"data:image/svg+xml,"+Mo(u)}function jo(u){return'url("'+Po(u)+'")'}const Wt={...Rt,inline:!1},zo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ro={display:"inline-block"},Ee={backgroundColor:"currentColor"},Qt={backgroundColor:"transparent"},Jt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Kt={webkitMask:Ee,mask:Ee,background:Qt};for(const u in Kt){const e=Kt[u];for(const t in Jt)e[u+t]=Jt[t]}const Gu={};["horizontal","vertical"].forEach(u=>{const e=u.slice(0,1)+"Flip";Gu[u+"-flip"]=e,Gu[u.slice(0,1)+"-flip"]=e,Gu[u+"Flip"]=e});function Yt(u){return u+(u.match(/^[-0-9.]+$/)?"px":"")}const Xt=(u,e)=>{const t=Bo(Wt,e),n={...zo},r=e.mode||"svg",o={},c=e.style,i=typeof c=="object"&&!(c instanceof Array)?c:{};for(let D in e){const g=e[D];if(g!==void 0)switch(D){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":t[D]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&No(t,g);break;case"color":o.color=g;break;case"rotate":typeof g=="string"?t[D]=Oo(g):typeof g=="number"&&(t[D]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete n["aria-hidden"];break;default:{const w=Gu[D];w?(g===!0||g==="true"||g===1)&&(t[w]=!0):Wt[D]===void 0&&(n[D]=g)}}}const a=oo(u,t),s=a.attributes;if(t.inline&&(o.verticalAlign="-0.125em"),r==="svg"){n.style={...o,...i},Object.assign(n,s);let D=0,g=e.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),n.innerHTML=so(a.body,g?()=>g+"ID"+D++:"iconifyVue"),b.h("svg",n)}const{body:l,width:f,height:x}=u,m=r==="mask"||(r==="bg"?!1:l.indexOf("currentColor")!==-1),d=Lo(l,{...s,width:f+"",height:x+""});return n.style={...o,"--svg":jo(d),width:Yt(s.width),height:Yt(s.height),...Ro,...m?Ee:Qt,...i},b.h("span",n)};if(jt(!0),lo("",xo),typeof document<"u"&&typeof window<"u"){const u=window;if(u.IconifyPreload!==void 0){const e=u.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Yr(n))&&console.error(t)}catch{console.error(t)}})}if(u.IconifyProviders!==void 0){const e=u.IconifyProviders;if(typeof e=="object"&&e!==null)for(let t in e){const n="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if(typeof r!="object"||!r||r.resources===void 0)continue;fo(t,r)||console.error(n)}catch{console.error(n)}}}}const qo={...Uu,body:""},De=b.defineComponent((u,{emit:e})=>{const t=b.ref(null);function n(){t.value&&(t.value.abort?.(),t.value=null)}const r=b.ref(!!u.ssr),o=b.ref(""),c=b.shallowRef(null);function i(){const s=u.icon;if(typeof s=="object"&&s!==null&&typeof s.body=="string")return o.value="",{data:s};let l;if(typeof s!="string"||(l=$u(s,!1,!0))===null)return null;let f=Jr(l);if(!f){const d=t.value;return(!d||d.name!==s)&&(f===null?t.value={name:s}:t.value={name:s,abort:To([l],a)}),null}n(),o.value!==s&&(o.value=s,b.nextTick(()=>{e("load",s)}));const x=u.customise;if(x){f=Object.assign({},f);const d=x(f.body,l.name,l.prefix,l.provider);typeof d=="string"&&(f.body=d)}const m=["iconify"];return l.prefix!==""&&m.push("iconify--"+l.prefix),l.provider!==""&&m.push("iconify--"+l.provider),{data:f,classes:m}}function a(){const s=i();s?s.data!==c.value?.data&&(c.value=s):c.value=null}return r.value?a():b.onMounted(()=>{r.value=!0,a()}),b.watch(()=>u.icon,a),b.onUnmounted(n),()=>{const s=c.value;if(!s)return Xt(qo,u);let l=u;return s.classes&&(l={...u,class:s.classes.join(" ")}),Xt({...Uu,...s.data},l)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]}),$o=["src","alt"],Vo=b.defineComponent({__name:"ImageViewer",props:{show:{type:Boolean},imageUrl:{},alt:{}},emits:["close"],setup(u){return(e,t)=>(b.openBlock(),b.createBlock(b.Teleport,{to:"body"},[b.createVNode(b.Transition,{name:"viewer"},{default:b.withCtx(()=>[u.show?(b.openBlock(),b.createElementBlock("div",{key:0,class:"image-viewer",onClick:t[2]||(t[2]=n=>e.$emit("close"))},[b.createElementVNode("div",{class:"close-button",onClick:t[0]||(t[0]=b.withModifiers(n=>e.$emit("close"),["stop"]))},[b.createVNode(b.unref(De),{icon:"mdi:close"})]),b.createElementVNode("div",{class:"viewer-content",onClick:t[1]||(t[1]=b.withModifiers(()=>{},["stop"]))},[b.createElementVNode("img",{src:u.imageUrl,alt:u.alt},null,8,$o)])])):b.createCommentVNode("",!0)]),_:1})]))}}),hu=(u,e)=>{const t=u.__vccOpts||u;for(const[n,r]of e)t[n]=r;return t},u0=hu(Vo,[["__scopeId","data-v-92c159ee"]]),Ho=["innerHTML"],e0=hu(b.defineComponent({__name:"MessageTextContent",props:{html:{},role:{}},setup(u){const t=u.role;return(n,r)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["content-text",b.unref(t)?`role-${b.unref(t)}`:""]),innerHTML:u.html},null,10,Ho))}}),[["__scopeId","data-v-a6c720b9"]]),Uo={class:"file-name"},Fe=hu(b.defineComponent({__name:"MessageFileContent",props:{name:{}},emits:["click"],setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("div",{class:"content-file",onClick:t[0]||(t[0]=n=>e.$emit("click"))},[b.createVNode(b.unref(De),{icon:"mdi:file-document-outline",class:"file-icon"}),b.createElementVNode("span",Uo,b.toDisplayString(u.name),1),b.createVNode(b.unref(De),{icon:"mdi:download",class:"download-icon"})]))}}),[["__scopeId","data-v-24190b61"]]),Zo=["src"],Ae=hu(b.defineComponent({__name:"MessageImageContent",props:{src:{},fullWidth:{type:Boolean}},emits:["click"],setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("img",{src:u.src,alt:"图片",class:b.normalizeClass(["message-image",{"is-full-width":u.fullWidth}]),onClick:t[0]||(t[0]=n=>e.$emit("click"))},null,10,Zo))}}),[["__scopeId","data-v-24952cda"]]),Go=["src"],t0=hu(b.defineComponent({__name:"MessageVideoContent",props:{src:{},fullWidth:{type:Boolean}},setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("video",{controls:"",src:u.src,class:b.normalizeClass(["message-video",{"is-full-width":u.fullWidth}])}," 您的浏览器不支持视频播放 ",10,Go))}}),[["__scopeId","data-v-28c3e763"]]),Wo=["src"],we=hu(b.defineComponent({__name:"MessageAudioContent",props:{src:{}},setup(u){return(e,t)=>(b.openBlock(),b.createElementBlock("audio",{controls:"",src:u.src,class:"message-audio"}," 您的浏览器不支持音频播放 ",8,Wo))}}),[["__scopeId","data-v-c0d42074"]]),Qo={key:1,class:"content-user-message"},Jo={key:1,class:"files-grid"},Ko={key:5,class:"content-medialib"},Yo=hu(b.defineComponent({__name:"MessageContentRenderer",props:{content:{},role:{}},setup(u){const e=u,t=b.computed(()=>e.role?`role-${e.role}`:""),n=b.computed(()=>{const h=e.content;return typeof h=="string"?{type:"text",content:h}:h});function r(h){return!("type"in h)}const o=new W({html:!0,linkify:!0,typographer:!0}),c=b.computed(()=>!r(n.value)&&n.value.type==="text"?o.render(n.value.content):""),i=b.ref(!1),a=b.ref("");function s(){r(n.value)||(n.value.type==="image"?(a.value=n.value.content,i.value=!0):n.value.type==="medialib"&&v.value==="image"&&(a.value=g.value,i.value=!0))}function l(h){a.value=h,i.value=!0}function f(h){try{const _=new URL(h).pathname.split("/");return _[_.length-1]||"未知文件"}catch{return"未知文件"}}function x(){r(n.value)||window.open(n.value.content,"_blank")}function m(h){window.open(h,"_blank")}function d(h){if(!h)return"file";const C=h.toLowerCase();return C.match(/\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv)$/)?"video":C.match(/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/)?"image":C.match(/\.(mp3|wav|ogg|aac|flac|m4a)$/)?"audio":"file"}const D=b.computed(()=>{if(!r(n.value)&&n.value.type==="medialib")try{return JSON.parse(n.value.content)}catch{return null}return null}),g=b.computed(()=>D.value?.file_url||""),w=b.computed(()=>D.value?.file_name||f(g.value)),v=b.computed(()=>{if(!g.value)return"json";const h=g.value.toLowerCase();return h.match(/\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv)$/)?"video":h.match(/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/)?"image":h.match(/\.(mp3|wav|ogg|aac|flac|m4a)$/)?"audio":"file"});function F(){g.value&&window.open(g.value,"_blank")}return(h,C)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["message-content-renderer",t.value])},[!r(n.value)&&n.value.type==="text"?(b.openBlock(),b.createBlock(e0,{key:0,html:c.value,role:u.role},null,8,["html","role"])):r(n.value)?(b.openBlock(),b.createElementBlock("div",Qo,[n.value.texts&&n.value.texts.length>0?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(n.value.texts,(p,_)=>(b.openBlock(),b.createBlock(e0,{key:`text-${_}`,html:b.unref(o).render(p),role:u.role},null,8,["html","role"]))),128)):b.createCommentVNode("",!0),n.value.files&&n.value.files.length>0?(b.openBlock(),b.createElementBlock("div",Jo,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(n.value.files,(p,_)=>(b.openBlock(),b.createElementBlock("div",{key:`file-${_}`},[d(p)==="image"?(b.openBlock(),b.createBlock(Ae,{key:0,src:p,"full-width":!0,onClick:E=>l(p)},null,8,["src","onClick"])):d(p)==="video"?(b.openBlock(),b.createBlock(t0,{key:1,src:p,"full-width":!0},null,8,["src"])):d(p)==="audio"?(b.openBlock(),b.createBlock(we,{key:2,src:p},null,8,["src"])):(b.openBlock(),b.createBlock(Fe,{key:3,name:f(p),onClick:E=>m(p)},null,8,["name","onClick"]))]))),128))])):b.createCommentVNode("",!0)])):!r(n.value)&&n.value.type==="file"?(b.openBlock(),b.createBlock(Fe,{key:2,name:f(n.value.content),onClick:x},null,8,["name"])):!r(n.value)&&n.value.type==="image"?(b.openBlock(),b.createBlock(Ae,{key:3,src:n.value.content,onClick:s},null,8,["src"])):!r(n.value)&&n.value.type==="voice"?(b.openBlock(),b.createBlock(we,{key:4,src:n.value.content},null,8,["src"])):!r(n.value)&&n.value.type==="medialib"?(b.openBlock(),b.createElementBlock("div",Ko,[v.value==="video"?(b.openBlock(),b.createBlock(t0,{key:0,src:g.value,"full-width":!0},null,8,["src"])):v.value==="image"?(b.openBlock(),b.createBlock(Ae,{key:1,src:g.value,onClick:s},null,8,["src"])):v.value==="audio"?(b.openBlock(),b.createBlock(we,{key:2,src:g.value},null,8,["src"])):v.value==="file"?(b.openBlock(),b.createBlock(Fe,{key:3,name:w.value,onClick:F},null,8,["name"])):(b.openBlock(),b.createBlock(b.unref(Vr),{key:4,data:D.value,deep:3,class:"json-viewer"},null,8,["data"]))])):b.createCommentVNode("",!0),b.createVNode(u0,{show:i.value,"image-url":a.value,onClose:C[0]||(C[0]=p=>i.value=!1)},null,8,["show","image-url"])],2))}}),[["__scopeId","data-v-c620f628"]]);iu.ImageViewer=u0,iu.MessageContentRenderer=Yo,Object.defineProperty(iu,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnai/message-content-renderer",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/message-content-renderer.umd.js",