@nexlylab/widget 1.32.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +66 -0
  2. package/dist/INSTALL.txt +3 -0
  3. package/dist/runtime/1.32.14/chunks/ClickToLoadEmbed-CDdotCS8-W2yBrg7b.js +2 -0
  4. package/dist/runtime/1.32.14/chunks/PanelInfoVideo-BKn3ucAb-BrU-Qlul.js +3 -0
  5. package/dist/runtime/1.32.14/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +3 -0
  6. package/dist/runtime/1.32.14/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +2 -0
  7. package/dist/runtime/1.32.14/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +2 -0
  8. package/dist/runtime/1.32.14/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js +28 -0
  9. package/dist/runtime/1.32.14/chunks/assistant-link-components-MZWf5ty7-C44wlQAi.js +2 -0
  10. package/dist/runtime/1.32.14/chunks/assistant-link-policy-DWaWTnGr-Cc-yj-a-.js +2 -0
  11. package/dist/runtime/1.32.14/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +2 -0
  12. package/dist/runtime/1.32.14/chunks/block-rating-DH7mp-_R-CoiP5C2K.js +2 -0
  13. package/dist/runtime/1.32.14/chunks/external-url-LRu_ntew-CJQjg_od.js +2 -0
  14. package/dist/runtime/1.32.14/chunks/index-1o6W5wiJ-I68tb-d3.js +2 -0
  15. package/dist/runtime/1.32.14/chunks/index-B1ef1IlE-QeFj7CR9.js +2 -0
  16. package/dist/runtime/1.32.14/chunks/index-B8aKMeg5-BLxOZxZv.js +2 -0
  17. package/dist/runtime/1.32.14/chunks/index-B9ozeox8-oy07dUaV.js +6 -0
  18. package/dist/runtime/1.32.14/chunks/index-BD-jPdzs-ZRnEJoQe.js +2 -0
  19. package/dist/runtime/1.32.14/chunks/index-BPDIV1BN-DINkyYvc.js +2 -0
  20. package/dist/runtime/1.32.14/chunks/index-BSoCdILD-D6wzHiS0.js +2 -0
  21. package/dist/runtime/1.32.14/chunks/index-BcsmWDTX-Dw9WA5Ac.js +2 -0
  22. package/dist/runtime/1.32.14/chunks/index-BljIlfbh-D9I6jaso.js +2 -0
  23. package/dist/runtime/1.32.14/chunks/index-BnKOhYKk-CkemNrch.js +4 -0
  24. package/dist/runtime/1.32.14/chunks/index-Bu9Gh6Nc-BfWdQCT7.js +2 -0
  25. package/dist/runtime/1.32.14/chunks/index-BvlAsO4n-DbuSZfeK.js +2 -0
  26. package/dist/runtime/1.32.14/chunks/index-BylVnv7X-DBhSkJ7i.js +2 -0
  27. package/dist/runtime/1.32.14/chunks/index-C1WD1dlq-Dm9kbc85.js +2 -0
  28. package/dist/runtime/1.32.14/chunks/index-C262wwK4-DpyhuXqd.js +2 -0
  29. package/dist/runtime/1.32.14/chunks/index-C6_8JGpJ-BqZmEVev.js +2 -0
  30. package/dist/runtime/1.32.14/chunks/index-C75hX_dj-VhJcCfAC.js +2 -0
  31. package/dist/runtime/1.32.14/chunks/index-CMFQhtEe-BcW8HKb8.js +2 -0
  32. package/dist/runtime/1.32.14/chunks/index-CNJUK2bK-C0OfCXUx.js +50 -0
  33. package/dist/runtime/1.32.14/chunks/index-Chy2Zmo5-CiRb-0NX.js +2 -0
  34. package/dist/runtime/1.32.14/chunks/index-CmYYEi7N-Dr1V6OGz.js +2 -0
  35. package/dist/runtime/1.32.14/chunks/index-CqV8rHvG-DS9JaGVN.js +2 -0
  36. package/dist/runtime/1.32.14/chunks/index-CwbUW6dx-BLBDoJCM.js +2 -0
  37. package/dist/runtime/1.32.14/chunks/index-Czz6Gyh_-C3bBvEcm.js +2 -0
  38. package/dist/runtime/1.32.14/chunks/index-D-ZhVFzi-A3rpkVmQ.js +6 -0
  39. package/dist/runtime/1.32.14/chunks/index-D72orqXX-C_0Ll4qr.js +2 -0
  40. package/dist/runtime/1.32.14/chunks/index-D9grn5WJ-Dp5AxBD4.js +2 -0
  41. package/dist/runtime/1.32.14/chunks/index-DDEE3QfX-3B-eE3K7.js +2 -0
  42. package/dist/runtime/1.32.14/chunks/index-DMQkz1bV-BuMYksln.js +272 -0
  43. package/dist/runtime/1.32.14/chunks/index-DO0-ht8E-DUgMllqN.js +2 -0
  44. package/dist/runtime/1.32.14/chunks/index-DPNGQF5b-_M0CWPEY.js +2 -0
  45. package/dist/runtime/1.32.14/chunks/index-DP_6HfDM-DAdxCQyi.js +2 -0
  46. package/dist/runtime/1.32.14/chunks/index-DTVlG27U-DP0QKkgf.js +2 -0
  47. package/dist/runtime/1.32.14/chunks/index-DZADUAKv-DPfvWVuj.js +2 -0
  48. package/dist/runtime/1.32.14/chunks/index-DZKtK9hT-DQBGsPwB.js +2 -0
  49. package/dist/runtime/1.32.14/chunks/index-Dh0aThiP-Aqz1AnQ5.js +2 -0
  50. package/dist/runtime/1.32.14/chunks/index-Dkv5YXXW-pkywvGDF.js +2 -0
  51. package/dist/runtime/1.32.14/chunks/index-DphwDFW6-C9wFr7fa.js +2 -0
  52. package/dist/runtime/1.32.14/chunks/index-Dt6OpItC-R_xuAEQV.js +2 -0
  53. package/dist/runtime/1.32.14/chunks/index-Gi-3UOyp-DuzPeEIz.js +2 -0
  54. package/dist/runtime/1.32.14/chunks/index-IW3aNe-y-W1lJrIDD.js +2 -0
  55. package/dist/runtime/1.32.14/chunks/index-V1EfdiK7-bdo5pwX-.js +4 -0
  56. package/dist/runtime/1.32.14/chunks/index-csHaX5dv-BpgnWlB8.js +2 -0
  57. package/dist/runtime/1.32.14/chunks/index-hHQjRGar-TEMHje2B.js +2 -0
  58. package/dist/runtime/1.32.14/chunks/index-k-jZV_MQ-H31PHMqm.js +2 -0
  59. package/dist/runtime/1.32.14/chunks/index-qpVhJY7A-Cgivx3vY.js +4 -0
  60. package/dist/runtime/1.32.14/chunks/index-uM4Y0lxc-Dsa9X9U7.js +2 -0
  61. package/dist/runtime/1.32.14/chunks/index.modern-CioVZ357-BA5NTOmY.js +6 -0
  62. package/dist/runtime/1.32.14/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +2 -0
  63. package/dist/runtime/1.32.14/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +2 -0
  64. package/dist/runtime/1.32.14/nexly.js +61 -0
  65. package/dist/v1.js +6 -0
  66. package/package.json +36 -0
@@ -0,0 +1,28 @@
1
+ import{M as Le}from"../nexly.js";import{e as Ne}from"./_commonjsHelpers-C6fGbg64-BC8KDfbh.js";const Qt=["http","https","mailto","tel"];function Zr(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Qt.length;){const o=Qt[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}var Xt,Yt;function Jr(){return Yt||(Yt=1,Xt=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}),Xt}var Gr=Jr();const $n=Ne(Gr);function _e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kt(e.position):"start"in e||"end"in e?Kt(e):"line"in e||"column"in e?Ct(e):""}function Ct(e){return Zt(e&&e.line)+":"+Zt(e&&e.column)}function Kt(e){return Ct(e&&e.start)+"-"+Ct(e&&e.end)}function Zt(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const l=r.indexOf(":");l===-1?i[1]=r:(i[0]=r.slice(0,l),i[1]=r.slice(l+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=_e(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.fatal=null;ie.prototype.column=null;ie.prototype.line=null;ie.prototype.source=null;ie.prototype.ruleId=null;ie.prototype.position=null;const pe={basename:eo,dirname:to,extname:no,join:ro,sep:"/"};function eo(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');He(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),u>-1&&(e.charCodeAt(i)===t.charCodeAt(u--)?u<0&&(r=i):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function to(e){if(He(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function no(e){He(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const u=e.charCodeAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ro(...e){let t=-1,n;for(;++t<e.length;)He(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":oo(n)}function oo(e){He(e);const t=e.charCodeAt(0)===47;let n=io(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function io(e,t){let n="",r=0,i=-1,o=0,l=-1,u,s;for(;++l<=e.length;){if(l<e.length)u=e.charCodeAt(l);else{if(u===47)break;u=47}if(u===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function He(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lo={cwd:uo};function uo(){return"/"}function St(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function ao(e){if(typeof e=="string")e=new URL(e);else if(!St(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return so(e)}function so(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ot=["history","path","basename","stem","extname","dirname"];class Wn{constructor(t){let n;t?typeof t=="string"||co(t)?n={value:t}:St(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=lo.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<ot.length;){const o=ot[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ot.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(t){St(t)&&(t=ao(t)),lt(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Jt(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){lt(t,"basename"),it(t,"basename"),this.path=pe.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if(it(t,"extname"),Jt(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pe.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){lt(t,"stem"),it(t,"stem"),this.path=pe.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const i=new ie(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=null,i}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}}function it(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function lt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Jt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function co(e){return $n(e)}function Gt(e){if(e)throw e}var ut,en;function fo(){if(en)return ut;en=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):t.call(s)==="[object Array]"},o=function(s){if(!s||t.call(s)!=="[object Object]")return!1;var c=e.call(s,"constructor"),f=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!c&&!f)return!1;var a;for(a in s);return typeof a>"u"||e.call(s,a)},l=function(s,c){n&&c.name==="__proto__"?n(s,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):s[c.name]=c.newValue},u=function(s,c){if(c==="__proto__")if(e.call(s,c)){if(r)return r(s,c).value}else return;return s[c]};return ut=function s(){var c,f,a,d,p,x,m=arguments[0],y=1,k=arguments.length,F=!1;for(typeof m=="boolean"&&(F=m,m=arguments[1]||{},y=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});y<k;++y)if(c=arguments[y],c!=null)for(f in c)a=u(m,f),d=u(c,f),m!==d&&(F&&d&&(o(d)||(p=i(d)))?(p?(p=!1,x=a&&i(a)?a:[]):x=a&&o(a)?a:{},l(m,{name:f,newValue:s(F,x,d)})):typeof d<"u"&&l(m,{name:f,newValue:d}));return m},ut}var po=fo();const tn=Ne(po);function Ft(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ho(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...i);function u(s,...c){const f=e[++o];let a=-1;if(s){l(s);return}for(;++a<i.length;)(c[a]===null||c[a]===void 0)&&(c[a]=i[a]);i=c,f?go(f,u)(...c):l(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function go(e,t){let n;return r;function r(...l){const u=e.length>l.length;let s;u&&l.push(i);try{s=e.apply(this,l)}catch(c){const f=c;if(u&&n)throw f;return i(f)}u||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...u){n||(n=!0,t(l,...u))}function o(l){i(null,l)}}const mo=Xn().freeze(),Qn={}.hasOwnProperty;function Xn(){const e=ho(),t=[];let n={},r,i=-1;return o.data=l,o.Parser=void 0,o.Compiler=void 0,o.freeze=u,o.attachers=t,o.use=s,o.parse=c,o.stringify=f,o.run=a,o.runSync=d,o.process=p,o.processSync=x,o;function o(){const m=Xn();let y=-1;for(;++y<t.length;)m.use(...t[y]);return m.data(tn(!0,{},n)),m}function l(m,y){return typeof m=="string"?arguments.length===2?(ct("data",r),n[m]=y,o):Qn.call(n,m)&&n[m]||null:m?(ct("data",r),n=m,o):n}function u(){if(r)return o;for(;++i<t.length;){const[m,...y]=t[i];if(y[0]===!1)continue;y[0]===!0&&(y[0]=void 0);const k=m.call(o,...y);typeof k=="function"&&e.use(k)}return r=!0,i=Number.POSITIVE_INFINITY,o}function s(m,...y){let k;if(ct("use",r),m!=null)if(typeof m=="function")I(m,...y);else if(typeof m=="object")Array.isArray(m)?P(m):C(m);else throw new TypeError("Expected usable value, not `"+m+"`");return k&&(n.settings=Object.assign(n.settings||{},k)),o;function F(b){if(typeof b=="function")I(b);else if(typeof b=="object")if(Array.isArray(b)){const[E,...j]=b;I(E,...j)}else C(b);else throw new TypeError("Expected usable value, not `"+b+"`")}function C(b){P(b.plugins),b.settings&&(k=Object.assign(k||{},b.settings))}function P(b){let E=-1;if(b!=null)if(Array.isArray(b))for(;++E<b.length;){const j=b[E];F(j)}else throw new TypeError("Expected a list of plugins, not `"+b+"`")}function I(b,E){let j=-1,H;for(;++j<t.length;)if(t[j][0]===b){H=t[j];break}H?(Ft(H[1])&&Ft(E)&&(E=tn(!0,H[1],E)),H[1]=E):t.push([...arguments])}}function c(m){o.freeze();const y=je(m),k=o.Parser;return at("parse",k),nn(k,"parse")?new k(String(y),y).parse():k(String(y),y)}function f(m,y){o.freeze();const k=je(y),F=o.Compiler;return st("stringify",F),rn(m),nn(F,"compile")?new F(m,k).compile():F(m,k)}function a(m,y,k){if(rn(m),o.freeze(),!k&&typeof y=="function"&&(k=y,y=void 0),!k)return new Promise(F);F(null,k);function F(C,P){e.run(m,je(y),I);function I(b,E,j){E=E||m,b?P(b):C?C(E):k(null,E,j)}}}function d(m,y){let k,F;return o.run(m,y,C),on("runSync","run",F),k;function C(P,I){Gt(P),k=I,F=!0}}function p(m,y){if(o.freeze(),at("process",o.Parser),st("process",o.Compiler),!y)return new Promise(k);k(null,y);function k(F,C){const P=je(m);o.run(o.parse(P),P,(b,E,j)=>{if(b||!E||!j)I(b);else{const H=o.stringify(E,j);H==null||(xo(H)?j.value=H:j.result=H),I(b,j)}});function I(b,E){b||!E?C(b):F?F(E):y(null,E)}}}function x(m){let y;o.freeze(),at("processSync",o.Parser),st("processSync",o.Compiler);const k=je(m);return o.process(k,F),on("processSync","process",y),k;function F(C){y=!0,Gt(C)}}}function nn(e,t){return typeof e=="function"&&e.prototype&&(yo(e.prototype)||t in e.prototype)}function yo(e){let t;for(t in e)if(Qn.call(e,t))return!0;return!1}function at(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function st(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function ct(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rn(e){if(!Ft(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function on(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function je(e){return ko(e)?e:new Wn(e)}function ko(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xo(e){return typeof e=="string"||$n(e)}const bo={};function vo(e,t){const n=bo,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Yn(e,r,i)}function Yn(e,t,n){if(wo(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ln(e.children,t,n)}return Array.isArray(e)?ln(e,t,n):""}function ln(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Yn(e[i],t,n);return r.join("")}function wo(e){return!!(e&&typeof e=="object")}function re(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function oe(e,t){return e.length>0?(re(e,e.length,0,t),e):t}const un={}.hasOwnProperty;function Kn(e){const t={};let n=-1;for(;++n<e.length;)Co(t,e[n]);return t}function Co(e,t){let n;for(n in t){const r=(un.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){un.call(r,o)||(r[o]=[]);const l=i[o];So(r[o],Array.isArray(l)?l:l?[l]:[])}}}function So(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);re(e,0,0,r)}const Fo=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ee=ve(/[A-Za-z]/),G=ve(/[\dA-Za-z]/),Ao=ve(/[#-'*+\--9=?A-Z^-~]/);function Ye(e){return e!==null&&(e<32||e===127)}const At=ve(/\d/),Eo=ve(/[\dA-Fa-f]/),Do=ve(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function $(e){return e!==null&&(e<0||e===32)}function N(e){return e===-2||e===-1||e===32}const Je=ve(Fo),Se=ve(/\s/);function ve(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function U(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return N(s)?(e.enter(n),u(s)):t(s)}function u(s){return N(s)&&o++<i?(e.consume(s),u):(e.exit(n),t(s))}}const To={tokenize:Oo};function Oo(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),o(u)}function o(u){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return z(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),l)}}const Lo={tokenize:Po},an={tokenize:Io};function Po(e){const t=this,n=[];let r=0,i,o,l;return u;function u(C){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,s,c)(C)}return c(C)}function s(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&F();const P=t.events.length;let I=P,b;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){b=t.events[I][1].end;break}k(r);let E=P;for(;E<t.events.length;)t.events[E][1].end=Object.assign({},b),E++;return re(t.events,I+1,0,t.events.slice(P)),t.events.length=E,c(C)}return u(C)}function c(C){if(r===n.length){if(!i)return d(C);if(i.currentConstruct&&i.currentConstruct.concrete)return x(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(an,f,a)(C)}function f(C){return i&&F(),k(r),d(C)}function a(C){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,x(C)}function d(C){return t.containerState={},e.attempt(an,p,x)(C)}function p(C){return r++,n.push([t.currentConstruct,t.containerState]),d(C)}function x(C){if(C===null){i&&F(),k(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(C)}function m(C){if(C===null){y(e.exit("chunkFlow"),!0),k(0),e.consume(C);return}return z(C)?(e.consume(C),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(C),m)}function y(C,P){const I=t.sliceStream(C);if(P&&I.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(I),t.parser.lazy[C.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const E=t.events.length;let j=E,H,v;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(H){v=t.events[j][1].end;break}H=!0}for(k(r),b=E;b<t.events.length;)t.events[b][1].end=Object.assign({},v),b++;re(t.events,j+1,0,t.events.slice(E)),t.events.length=b}}function k(C){let P=n.length;for(;P-- >C;){const I=n[P];t.containerState=I[1],I[0].exit.call(t,e)}n.length=C}function F(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Io(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ke(e){if(e===null||$(e)||Se(e))return 1;if(Je(e))return 2}function Ge(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Et={name:"attention",tokenize:Mo,resolveAll:zo};function zo(e,t){let n=-1,r,i,o,l,u,s,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const a=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);sn(a,-s),sn(d,s),l={type:s>1?"strongSequence":"emphasisSequence",start:a,end:Object.assign({},e[r][1].end)},u={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},u.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=oe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=oe(c,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),c=oe(c,Ge(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=oe(c,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=oe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,re(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Mo(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ke(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),u(s)}function u(s){if(s===o)return e.consume(s),u;const c=e.exit("attentionSequence"),f=Ke(s),a=!f||f===2&&i||n.includes(s),d=!i||i===2&&f||n.includes(r);return c._open=!!(o===42?a:a&&(i||!d)),c._close=!!(o===42?d:d&&(f||!a)),t(s)}}function sn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ro={name:"autolink",tokenize:jo};function jo(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return ee(p)?(e.consume(p),l):c(p)}function l(p){return p===43||p===45||p===46||G(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||G(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ye(p)?n(p):(e.consume(p),s)}function c(p){return p===64?(e.consume(p),f):Ao(p)?(e.consume(p),c):n(p)}function f(p){return G(p)?a(p):n(p)}function a(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||G(p))&&r++<63){const x=p===45?d:a;return e.consume(p),x}return n(p)}}const Ue={tokenize:_o,partial:!0};function _o(e,t,n){return r;function r(o){return N(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?t(o):n(o)}}const Zn={name:"blockQuote",tokenize:Bo,continuation:{tokenize:No},exit:Ho};function Bo(e,t,n){const r=this;return i;function i(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return N(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function No(e,t,n){const r=this;return i;function i(l){return N(l)?U(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Zn,t,n)(l)}}function Ho(e){e.exit("blockQuote")}const Jn={name:"characterEscape",tokenize:Uo};function Uo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Do(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const cn=document.createElement("i");function Pt(e){const t="&"+e+";";cn.innerHTML=t;const n=cn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const Gn={name:"characterReference",tokenize:Vo};function Vo(e,t,n){const r=this;let i=0,o,l;return u;function u(a){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),s}function s(a){return a===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(a),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,l=G,f(a))}function c(a){return a===88||a===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(a),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Eo,f):(e.enter("characterReferenceValue"),o=7,l=At,f(a))}function f(a){if(a===59&&i){const d=e.exit("characterReferenceValue");return l===G&&!Pt(r.sliceSerialize(d))?n(a):(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(a)&&i++<o?(e.consume(a),f):n(a)}}const fn={tokenize:$o,partial:!0},pn={name:"codeFenced",tokenize:qo,concrete:!0};function qo(e,t,n){const r=this,i={tokenize:I,partial:!0};let o=0,l=0,u;return s;function s(b){return c(b)}function c(b){const E=r.events[r.events.length-1];return o=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,u=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===u?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),N(b)?U(e,a,"whitespace")(b):a(b))}function a(b){return b===null||z(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(fn,m,P)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),a(b)):N(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,p,"whitespace")(b)):b===96&&b===u?n(b):(e.consume(b),d)}function p(b){return b===null||z(b)?a(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),a(b)):b===96&&b===u?n(b):(e.consume(b),x)}function m(b){return e.attempt(i,P,y)(b)}function y(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return o>0&&N(b)?U(e,F,"linePrefix",o+1)(b):F(b)}function F(b){return b===null||z(b)?e.check(fn,m,P)(b):(e.enter("codeFlowValue"),C(b))}function C(b){return b===null||z(b)?(e.exit("codeFlowValue"),F(b)):(e.consume(b),C)}function P(b){return e.exit("codeFenced"),t(b)}function I(b,E,j){let H=0;return v;function v(R){return b.enter("lineEnding"),b.consume(R),b.exit("lineEnding"),D}function D(R){return b.enter("codeFencedFence"),N(R)?U(b,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):T(R)}function T(R){return R===u?(b.enter("codeFencedFenceSequence"),L(R)):j(R)}function L(R){return R===u?(H++,b.consume(R),L):H>=l?(b.exit("codeFencedFenceSequence"),N(R)?U(b,O,"whitespace")(R):O(R)):j(R)}function O(R){return R===null||z(R)?(b.exit("codeFencedFence"),E(R)):j(R)}}}function $o(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ft={name:"codeIndented",tokenize:Qo},Wo={tokenize:Xo,partial:!0};function Qo(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),U(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):n(c)}function l(c){return c===null?s(c):z(c)?e.attempt(Wo,l,s)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||z(c)?(e.exit("codeFlowValue"),l(c)):(e.consume(c),u)}function s(c){return e.exit("codeIndented"),t(c)}}function Xo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):z(l)?i(l):n(l)}}const Yo={name:"codeText",tokenize:Jo,resolve:Ko,previous:Zo};function Ko(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Zo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jo(e,t,n){let r=0,i,o;return l;function l(a){return e.enter("codeText"),e.enter("codeTextSequence"),u(a)}function u(a){return a===96?(e.consume(a),r++,u):(e.exit("codeTextSequence"),s(a))}function s(a){return a===null?n(a):a===32?(e.enter("space"),e.consume(a),e.exit("space"),s):a===96?(o=e.enter("codeTextSequence"),i=0,f(a)):z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(a))}function c(a){return a===null||a===32||a===96||z(a)?(e.exit("codeTextData"),s(a)):(e.consume(a),c)}function f(a){return a===96?(e.consume(a),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(a)):(o.type="codeTextData",c(a))}}function er(e){const t={};let n=-1,r,i,o,l,u,s,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Go(e,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(l=e[o],l[1].type==="lineEnding"||l[1].type==="lineEndingBlank");)l[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),u=e.slice(i,n),u.unshift(r),re(e,i,n-i+1,u))}}return!c}function Go(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],l=n._tokenizer||r.parser[n.contentType](n.start),u=l.events,s=[],c={};let f,a,d=-1,p=n,x=0,m=0;const y=[m];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),a&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),a=p,p=p.next}for(p=n;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(m=d+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const k=u.slice(y[d],y[d+1]),F=o.pop();s.unshift([F,F+k.length-1]),re(e,F,2,k)}for(d=-1;++d<s.length;)c[x+s[d][0]]=x+s[d][1],x+=s[d][1]-s[d][0]-1;return c}const ei={tokenize:ri,resolve:ni},ti={tokenize:oi,partial:!0};function ni(e){return er(e),e}function ri(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?o(u):z(u)?e.check(ti,l,o)(u):(e.consume(u),i)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function oi(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(l){if(l===null||z(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function tr(e,t,n,r,i,o,l,u,s){const c=s||Number.POSITIVE_INFINITY;let f=0;return a;function a(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),d):k===null||k===32||k===41||Ye(k)?n(k):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),m(k))}function d(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(u),d(k)):k===null||k===60||z(k)?n(k):(e.consume(k),k===92?x:p)}function x(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function m(k){return!f&&(k===null||k===41||$(k))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(k)):f<c&&k===40?(e.consume(k),f++,m):k===41?(e.consume(k),f--,m):k===null||k===32||k===40||Ye(k)?n(k):(e.consume(k),k===92?y:m)}function y(k){return k===40||k===41||k===92?(e.consume(k),m):m(k)}}function nr(e,t,n,r,i,o){const l=this;let u=0,s;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return u>999||p===null||p===91||p===93&&!s||p===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),a(p))}function a(p){return p===null||p===91||p===93||z(p)||u++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!N(p)),p===92?d:a)}function d(p){return p===91||p===92||p===93?(e.consume(p),u++,a):a(p)}}function rr(e,t,n,r,i,o){let l;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,s):n(d)}function s(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),c(d))}function c(d){return d===l?(e.exit(o),s(l)):d===null?n(d):z(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),U(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||z(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?a:f)}function a(d){return d===l||d===92?(e.consume(d),f):f(d)}}function Be(e,t){let n;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):N(i)?U(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function ce(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ii={name:"definition",tokenize:ui},li={tokenize:ai,partial:!0};function ui(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return nr.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return $(p)?Be(e,c)(p):c(p)}function c(p){return tr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(li,a,a)(p)}function a(p){return N(p)?U(e,d,"whitespace")(p):d(p)}function d(p){return p===null||z(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ai(e,t,n){return r;function r(u){return $(u)?Be(e,i)(u):n(u)}function i(u){return rr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return N(u)?U(e,l,"whitespace")(u):l(u)}function l(u){return u===null||z(u)?t(u):n(u)}}const si={name:"hardBreakEscape",tokenize:ci};function ci(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return z(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const fi={name:"headingAtx",tokenize:di,resolve:pi};function pi(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},re(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function di(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||$(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||z(f)?(e.exit("atxHeading"),t(f)):N(f)?U(e,u,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),u(f))}function c(f){return f===null||f===35||$(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),c)}}const hi=["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"],dn=["pre","script","style","textarea"],gi={name:"htmlFlow",tokenize:xi,resolveTo:ki,concrete:!0},mi={tokenize:vi,partial:!0},yi={tokenize:bi,partial:!0};function ki(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xi(e,t,n){const r=this;let i,o,l,u,s;return c;function c(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),d):g===47?(e.consume(g),o=!0,m):g===63?(e.consume(g),i=3,r.interrupt?t:h):ee(g)?(e.consume(g),l=String.fromCharCode(g),y):n(g)}function d(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,u=0,x):ee(g)?(e.consume(g),i=4,r.interrupt?t:h):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:h):n(g)}function x(g){const se="CDATA[";return g===se.charCodeAt(u++)?(e.consume(g),u===se.length?r.interrupt?t:T:x):n(g)}function m(g){return ee(g)?(e.consume(g),l=String.fromCharCode(g),y):n(g)}function y(g){if(g===null||g===47||g===62||$(g)){const se=g===47,Ae=l.toLowerCase();return!se&&!o&&dn.includes(Ae)?(i=1,r.interrupt?t(g):T(g)):hi.includes(l.toLowerCase())?(i=6,se?(e.consume(g),k):r.interrupt?t(g):T(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?F(g):C(g))}return g===45||G(g)?(e.consume(g),l+=String.fromCharCode(g),y):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:T):n(g)}function F(g){return N(g)?(e.consume(g),F):v(g)}function C(g){return g===47?(e.consume(g),v):g===58||g===95||ee(g)?(e.consume(g),P):N(g)?(e.consume(g),C):v(g)}function P(g){return g===45||g===46||g===58||g===95||G(g)?(e.consume(g),P):I(g)}function I(g){return g===61?(e.consume(g),b):N(g)?(e.consume(g),I):C(g)}function b(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),s=g,E):N(g)?(e.consume(g),b):j(g)}function E(g){return g===s?(e.consume(g),s=null,H):g===null||z(g)?n(g):(e.consume(g),E)}function j(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||$(g)?I(g):(e.consume(g),j)}function H(g){return g===47||g===62||N(g)?C(g):n(g)}function v(g){return g===62?(e.consume(g),D):n(g)}function D(g){return g===null||z(g)?T(g):N(g)?(e.consume(g),D):n(g)}function T(g){return g===45&&i===2?(e.consume(g),K):g===60&&i===1?(e.consume(g),Z):g===62&&i===4?(e.consume(g),ae):g===63&&i===3?(e.consume(g),h):g===93&&i===5?(e.consume(g),he):z(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(mi,ge,L)(g)):g===null||z(g)?(e.exit("htmlFlowData"),L(g)):(e.consume(g),T)}function L(g){return e.check(yi,O,ge)(g)}function O(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),R}function R(g){return g===null||z(g)?L(g):(e.enter("htmlFlowData"),T(g))}function K(g){return g===45?(e.consume(g),h):T(g)}function Z(g){return g===47?(e.consume(g),l="",ue):T(g)}function ue(g){if(g===62){const se=l.toLowerCase();return dn.includes(se)?(e.consume(g),ae):T(g)}return ee(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ue):T(g)}function he(g){return g===93?(e.consume(g),h):T(g)}function h(g){return g===62?(e.consume(g),ae):g===45&&i===2?(e.consume(g),h):T(g)}function ae(g){return g===null||z(g)?(e.exit("htmlFlowData"),ge(g)):(e.consume(g),ae)}function ge(g){return e.exit("htmlFlow"),t(g)}}function bi(e,t,n){const r=this;return i;function i(l){return z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function vi(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ue,t,n)}}const wi={name:"htmlText",tokenize:Ci};function Ci(e,t,n){const r=this;let i,o,l;return u;function u(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),s}function s(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),I):h===63?(e.consume(h),C):ee(h)?(e.consume(h),j):n(h)}function c(h){return h===45?(e.consume(h),f):h===91?(e.consume(h),o=0,x):ee(h)?(e.consume(h),F):n(h)}function f(h){return h===45?(e.consume(h),p):n(h)}function a(h){return h===null?n(h):h===45?(e.consume(h),d):z(h)?(l=a,Z(h)):(e.consume(h),a)}function d(h){return h===45?(e.consume(h),p):a(h)}function p(h){return h===62?K(h):h===45?d(h):a(h)}function x(h){const ae="CDATA[";return h===ae.charCodeAt(o++)?(e.consume(h),o===ae.length?m:x):n(h)}function m(h){return h===null?n(h):h===93?(e.consume(h),y):z(h)?(l=m,Z(h)):(e.consume(h),m)}function y(h){return h===93?(e.consume(h),k):m(h)}function k(h){return h===62?K(h):h===93?(e.consume(h),k):m(h)}function F(h){return h===null||h===62?K(h):z(h)?(l=F,Z(h)):(e.consume(h),F)}function C(h){return h===null?n(h):h===63?(e.consume(h),P):z(h)?(l=C,Z(h)):(e.consume(h),C)}function P(h){return h===62?K(h):C(h)}function I(h){return ee(h)?(e.consume(h),b):n(h)}function b(h){return h===45||G(h)?(e.consume(h),b):E(h)}function E(h){return z(h)?(l=E,Z(h)):N(h)?(e.consume(h),E):K(h)}function j(h){return h===45||G(h)?(e.consume(h),j):h===47||h===62||$(h)?H(h):n(h)}function H(h){return h===47?(e.consume(h),K):h===58||h===95||ee(h)?(e.consume(h),v):z(h)?(l=H,Z(h)):N(h)?(e.consume(h),H):K(h)}function v(h){return h===45||h===46||h===58||h===95||G(h)?(e.consume(h),v):D(h)}function D(h){return h===61?(e.consume(h),T):z(h)?(l=D,Z(h)):N(h)?(e.consume(h),D):H(h)}function T(h){return h===null||h===60||h===61||h===62||h===96?n(h):h===34||h===39?(e.consume(h),i=h,L):z(h)?(l=T,Z(h)):N(h)?(e.consume(h),T):(e.consume(h),O)}function L(h){return h===i?(e.consume(h),i=void 0,R):h===null?n(h):z(h)?(l=L,Z(h)):(e.consume(h),L)}function O(h){return h===null||h===34||h===39||h===60||h===61||h===96?n(h):h===47||h===62||$(h)?H(h):(e.consume(h),O)}function R(h){return h===47||h===62||$(h)?H(h):n(h)}function K(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),t):n(h)}function Z(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ue}function ue(h){return N(h)?U(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):he(h)}function he(h){return e.enter("htmlTextData"),l(h)}}const It={name:"labelEnd",tokenize:Ti,resolveTo:Di,resolveAll:Ei},Si={tokenize:Oi},Fi={tokenize:Li},Ai={tokenize:Pi};function Ei(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function Di(e,t){let n=e.length,r=0,i,o,l,u;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[l][1].end)},f={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[l-2][1].start)};return u=[["enter",s,t],["enter",c,t]],u=oe(u,e.slice(o+1,o+r+3)),u=oe(u,[["enter",f,t]]),u=oe(u,Ge(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),u=oe(u,[["exit",f,t],e[l-2],e[l-1],["exit",c,t]]),u=oe(u,e.slice(l+1)),u=oe(u,[["exit",s,t]]),re(e,o,e.length,u),e}function Ti(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return u;function u(d){return o?o._inactive?a(d):(l=r.parser.defined.includes(ce(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),s):n(d)}function s(d){return d===40?e.attempt(Si,f,l?f:a)(d):d===91?e.attempt(Fi,f,l?c:a)(d):l?f(d):a(d)}function c(d){return e.attempt(Ai,f,a)(d)}function f(d){return t(d)}function a(d){return o._balanced=!0,n(d)}}function Oi(e,t,n){return r;function r(a){return e.enter("resource"),e.enter("resourceMarker"),e.consume(a),e.exit("resourceMarker"),i}function i(a){return $(a)?Be(e,o)(a):o(a)}function o(a){return a===41?f(a):tr(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(a)}function l(a){return $(a)?Be(e,s)(a):f(a)}function u(a){return n(a)}function s(a){return a===34||a===39||a===40?rr(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(a):f(a)}function c(a){return $(a)?Be(e,f)(a):f(a)}function f(a){return a===41?(e.enter("resourceMarker"),e.consume(a),e.exit("resourceMarker"),e.exit("resource"),t):n(a)}}function Li(e,t,n){const r=this;return i;function i(u){return nr.call(r,e,o,l,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function Pi(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Ii={name:"labelStartImage",tokenize:zi,resolveAll:It.resolveAll};function zi(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Mi={name:"labelStartLink",tokenize:Ri,resolveAll:It.resolveAll};function Ri(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const pt={name:"lineEnding",tokenize:ji};function ji(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,t,"linePrefix")}}const Xe={name:"thematicBreak",tokenize:_i};function _i(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),l(c)}function l(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||z(c))?(e.exit("thematicBreak"),t(c)):n(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),N(c)?U(e,u,"whitespace")(c):u(c))}}const te={name:"list",tokenize:Hi,continuation:{tokenize:Ui},exit:qi},Bi={tokenize:$i,partial:!0},Ni={tokenize:Vi,partial:!0};function Hi(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return u;function u(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:At(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xe,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return At(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ue,r.interrupt?n:f,e.attempt(Bi,d,a))}function f(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function a(p){return N(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ui(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ue,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!N(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ni,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(te,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Vi(e,t,n){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function qi(e){e.exit(this.containerState.type)}function $i(e,t,n){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!N(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const hn={name:"setextUnderline",tokenize:Qi,resolveTo:Wi};function Wi(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=l,e.push(["exit",l,t]),e}function Qi(e,t,n){const r=this;let i;return o;function o(c){let f=r.events.length,a;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){a=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||a)?(e.enter("setextHeadingLine"),i=c,l(c)):n(c)}function l(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),N(c)?U(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||z(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Xi={tokenize:Yi};function Yi(e){const t=this,n=e.attempt(Ue,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ei,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ki={resolveAll:ir()},Zi=or("string"),Ji=or("text");function or(e){return{tokenize:t,resolveAll:ir(e==="text"?Gi:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,u);return l;function l(f){return c(f)?o(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return c(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function c(f){if(f===null)return!0;const a=i[f];let d=-1;if(a)for(;++d<a.length;){const p=a[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function ir(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Gi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,u=0,s;for(;o--;){const c=i[o];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(c===-2)s=!0,u++;else if(c!==-1){o++;break}}if(u){const c={type:n===e.length||s||u<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_index:r.start._index+o,_bufferIndex:o?l:r.start._bufferIndex+l},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function el(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let l=[],u=[];const s={consume:F,enter:C,exit:P,attempt:E(I),check:E(b),interrupt:E(b,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:x,defineSkip:m,write:a};let f=t.tokenize.call(c,s);return t.resolveAll&&o.push(t),c;function a(D){return l=oe(l,D),y(),l[l.length-1]!==null?[]:(j(t,0),c.events=Ge(o,c.events,c),c.events)}function d(D,T){return nl(p(D),T)}function p(D){return tl(l,D)}function x(){const{line:D,column:T,offset:L,_index:O,_bufferIndex:R}=r;return{line:D,column:T,offset:L,_index:O,_bufferIndex:R}}function m(D){i[D.line]=D.column,v()}function y(){let D;for(;r._index<l.length;){const T=l[r._index];if(typeof T=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<T.length;)k(T.charCodeAt(r._bufferIndex));else k(T)}}function k(D){f=f(D)}function F(D){z(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,v()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=D}function C(D,T){const L=T||{};return L.type=D,L.start=x(),c.events.push(["enter",L,c]),u.push(L),L}function P(D){const T=u.pop();return T.end=x(),c.events.push(["exit",T,c]),T}function I(D,T){j(D,T.from)}function b(D,T){T.restore()}function E(D,T){return L;function L(O,R,K){let Z,ue,he,h;return Array.isArray(O)?ge(O):"tokenize"in O?ge([O]):ae(O);function ae(J){return Ee;function Ee(xe){const De=xe!==null&&J[xe],Te=xe!==null&&J.null,nt=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return ge(nt)(xe)}}function ge(J){return Z=J,ue=0,J.length===0?K:g(J[ue])}function g(J){return Ee;function Ee(xe){return h=H(),he=J,J.partial||(c.currentConstruct=J),J.name&&c.parser.constructs.disable.null.includes(J.name)?Ae():J.tokenize.call(T?Object.assign(Object.create(c),T):c,s,se,Ae)(xe)}}function se(J){return D(he,h),R}function Ae(J){return h.restore(),++ue<Z.length?g(Z[ue]):K}}}function j(D,T){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&re(c.events,T,c.events.length-T,D.resolve(c.events.slice(T),c)),D.resolveTo&&(c.events=D.resolveTo(c.events,c))}function H(){const D=x(),T=c.previous,L=c.currentConstruct,O=c.events.length,R=Array.from(u);return{restore:K,from:O};function K(){r=D,c.previous=T,c.currentConstruct=L,c.events.length=O,u=R,v()}}function v(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tl(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function nl(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
2
+ `;break}case-3:{l=`\r
3
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}const rl={42:te,43:te,45:te,48:te,49:te,50:te,51:te,52:te,53:te,54:te,55:te,56:te,57:te,62:Zn},ol={91:ii},il={[-2]:ft,[-1]:ft,32:ft},ll={35:fi,42:Xe,45:[hn,Xe],60:gi,61:hn,95:Xe,96:pn,126:pn},ul={38:Gn,92:Jn},al={[-5]:pt,[-4]:pt,[-3]:pt,33:Ii,38:Gn,42:Et,60:[Ro,wi],91:Mi,92:[si,Jn],93:It,95:Et,96:Yo},sl={null:[Et,Ki]},cl={null:[42,95]},fl={null:[]},pl=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cl,contentInitial:ol,disable:fl,document:rl,flow:ll,flowInitial:il,insideSpan:sl,string:ul,text:al},Symbol.toStringTag,{value:"Module"}));function dl(e){const t=Kn([pl,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:t,content:r(To),document:r(Lo),flow:r(Xi),string:r(Zi),text:r(Ji)};return n;function r(i){return o;function o(l){return el(n,i,l)}}}const gn=/[\0\t\n\r]/g;function hl(){let e=1,t="",n=!0,r;return i;function i(o,l,u){const s=[];let c,f,a,d,p;for(o=t+o.toString(l),a=0,t="",n&&(o.charCodeAt(0)===65279&&a++,n=void 0);a<o.length;){if(gn.lastIndex=a,c=gn.exec(o),d=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(d),!c){t=o.slice(a);break}if(p===10&&a===d&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),a<d&&(s.push(o.slice(a,d)),e+=d-a),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}a=d+1}return u&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function gl(e){for(;!er(e););return e}function lr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const ml=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ur(e){return e.replace(ml,yl)}function yl(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return lr(n.slice(i?2:1),i?16:10)}return Pt(n)||e}const ar={}.hasOwnProperty,kl=(function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),xl(n)(gl(dl(n).document().write(hl()(e,t,!0))))});function xl(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u($t),autolinkProtocol:D,autolinkEmail:D,atxHeading:u(Ut),blockQuote:u(nt),characterEscape:D,characterReference:D,codeFenced:u(Ht),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(Ht,s),codeText:u(Ur,s),codeTextData:D,data:D,codeFlowValue:D,definition:u(Vr),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(qr),hardBreakEscape:u(Vt),hardBreakTrailing:u(Vt),htmlFlow:u(qt,s),htmlFlowData:D,htmlText:u(qt,s),htmlTextData:D,image:u($r),label:s,link:u($t),listItem:u(Wr),listItemValue:x,listOrdered:u(Wt,p),listUnordered:u(Wt),paragraph:u(Qr),reference:Ae,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(Ut),strong:u(Xr),thematicBreak:u(Kr)},exit:{atxHeading:f(),atxHeadingSequence:E,autolink:f(),autolinkEmail:Te,autolinkProtocol:De,blockQuote:f(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:xe,codeFenced:f(F),codeFencedFence:k,codeFencedFenceInfo:m,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:f(C),codeText:f(Z),codeTextData:T,data:T,definition:f(),definitionDestinationString:b,definitionLabelString:P,definitionTitleString:I,emphasis:f(),hardBreakEscape:f(O),hardBreakTrailing:f(O),htmlFlow:f(R),htmlFlowData:T,htmlText:f(K),htmlTextData:T,image:f(he),label:ae,labelText:h,lineEnding:L,link:f(ue),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:J,resourceDestinationString:ge,resourceTitleString:g,resource:se,setextHeading:f(v),setextHeadingLineSequence:H,setextHeadingText:j,strong:f(),thematicBreak:f()}};sr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let A={type:"root",children:[]};const M={stack:[A],tokenStack:[],config:t,enter:c,exit:a,buffer:s,resume:d,setData:o,getData:l},q=[];let W=-1;for(;++W<w.length;)if(w[W][1].type==="listOrdered"||w[W][1].type==="listUnordered")if(w[W][0]==="enter")q.push(W);else{const fe=q.pop();W=i(w,fe,W)}for(W=-1;++W<w.length;){const fe=t[w[W][0]];ar.call(fe,w[W][1].type)&&fe[w[W][1].type].call(Object.assign({sliceSerialize:w[W][2].sliceSerialize},M),w[W][1])}if(M.tokenStack.length>0){const fe=M.tokenStack[M.tokenStack.length-1];(fe[1]||mn).call(M,void 0,fe[0])}for(A.position={start:be(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:be(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<t.transforms.length;)A=t.transforms[W](A)||A;return A}function i(w,A,M){let q=A-1,W=-1,fe=!1,we,me,Me,Re;for(;++q<=M;){const X=w[q];if(X[1].type==="listUnordered"||X[1].type==="listOrdered"||X[1].type==="blockQuote"?(X[0]==="enter"?W++:W--,Re=void 0):X[1].type==="lineEndingBlank"?X[0]==="enter"&&(we&&!Re&&!W&&!Me&&(Me=q),Re=void 0):X[1].type==="linePrefix"||X[1].type==="listItemValue"||X[1].type==="listItemMarker"||X[1].type==="listItemPrefix"||X[1].type==="listItemPrefixWhitespace"||(Re=void 0),!W&&X[0]==="enter"&&X[1].type==="listItemPrefix"||W===-1&&X[0]==="exit"&&(X[1].type==="listUnordered"||X[1].type==="listOrdered")){if(we){let rt=q;for(me=void 0;rt--;){const ye=w[rt];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;me&&(w[me][1].type="lineEndingBlank",fe=!0),ye[1].type="lineEnding",me=rt}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}Me&&(!me||Me<me)&&(we._spread=!0),we.end=Object.assign({},me?w[me][1].start:X[1].end),w.splice(me||q,0,["exit",we,X[2]]),q++,M++}X[1].type==="listItemPrefix"&&(we={type:"listItem",_spread:!1,start:Object.assign({},X[1].start),end:void 0},w.splice(q,0,["enter",we,X[2]]),q++,M++,Me=void 0,Re=!0)}}return w[A][1]._spread=fe,M}function o(w,A){n[w]=A}function l(w){return n[w]}function u(w,A){return M;function M(q){c.call(this,w(q),q),A&&A.call(this,q)}}function s(){this.stack.push({type:"fragment",children:[]})}function c(w,A,M){return this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([A,M]),w.position={start:be(A.start)},w}function f(w){return A;function A(M){w&&w.call(this,M),a.call(this,M)}}function a(w,A){const M=this.stack.pop(),q=this.tokenStack.pop();if(q)q[0].type!==w.type&&(A?A.call(this,w,q[0]):(q[1]||mn).call(this,w,q[0]));else throw new Error("Cannot close `"+w.type+"` ("+_e({start:w.start,end:w.end})+"): it’s not open");return M.position.end=be(w.end),M}function d(){return vo(this.stack.pop())}function p(){o("expectingFirstListItemValue",!0)}function x(w){if(l("expectingFirstListItemValue")){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(w),10),o("expectingFirstListItemValue")}}function m(){const w=this.resume(),A=this.stack[this.stack.length-1];A.lang=w}function y(){const w=this.resume(),A=this.stack[this.stack.length-1];A.meta=w}function k(){l("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function F(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function C(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/(\r?\n|\r)$/g,"")}function P(w){const A=this.resume(),M=this.stack[this.stack.length-1];M.label=A,M.identifier=ce(this.sliceSerialize(w)).toLowerCase()}function I(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function b(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function E(w){const A=this.stack[this.stack.length-1];if(!A.depth){const M=this.sliceSerialize(w).length;A.depth=M}}function j(){o("setextHeadingSlurpLineEnding",!0)}function H(w){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(w).charCodeAt(0)===61?1:2}function v(){o("setextHeadingSlurpLineEnding")}function D(w){const A=this.stack[this.stack.length-1];let M=A.children[A.children.length-1];(!M||M.type!=="text")&&(M=Yr(),M.position={start:be(w.start)},A.children.push(M)),this.stack.push(M)}function T(w){const A=this.stack.pop();A.value+=this.sliceSerialize(w),A.position.end=be(w.end)}function L(w){const A=this.stack[this.stack.length-1];if(l("atHardBreak")){const M=A.children[A.children.length-1];M.position.end=be(w.end),o("atHardBreak");return}!l("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(A.type)&&(D.call(this,w),T.call(this,w))}function O(){o("atHardBreak",!0)}function R(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function K(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function Z(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function ue(){const w=this.stack[this.stack.length-1];if(l("inReference")){const A=l("referenceType")||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;o("referenceType")}function he(){const w=this.stack[this.stack.length-1];if(l("inReference")){const A=l("referenceType")||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;o("referenceType")}function h(w){const A=this.sliceSerialize(w),M=this.stack[this.stack.length-2];M.label=ur(A),M.identifier=ce(A).toLowerCase()}function ae(){const w=this.stack[this.stack.length-1],A=this.resume(),M=this.stack[this.stack.length-1];if(o("inReference",!0),M.type==="link"){const q=w.children;M.children=q}else M.alt=A}function ge(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function g(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function se(){o("inReference")}function Ae(){o("referenceType","collapsed")}function J(w){const A=this.resume(),M=this.stack[this.stack.length-1];M.label=A,M.identifier=ce(this.sliceSerialize(w)).toLowerCase(),o("referenceType","full")}function Ee(w){o("characterReferenceType",w.type)}function xe(w){const A=this.sliceSerialize(w),M=l("characterReferenceType");let q;M?(q=lr(A,M==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):q=Pt(A);const W=this.stack.pop();W.value+=q,W.position.end=be(w.end)}function De(w){T.call(this,w);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(w)}function Te(w){T.call(this,w);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(w)}function nt(){return{type:"blockquote",children:[]}}function Ht(){return{type:"code",lang:null,meta:null,value:""}}function Ur(){return{type:"inlineCode",value:""}}function Vr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qr(){return{type:"emphasis",children:[]}}function Ut(){return{type:"heading",depth:void 0,children:[]}}function Vt(){return{type:"break"}}function qt(){return{type:"html",value:""}}function $r(){return{type:"image",title:null,url:"",alt:null}}function $t(){return{type:"link",title:null,url:"",children:[]}}function Wt(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Wr(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Qr(){return{type:"paragraph",children:[]}}function Xr(){return{type:"strong",children:[]}}function Yr(){return{type:"text",value:""}}function Kr(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function sr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sr(e,r):bl(e,r)}}function bl(e,t){let n;for(n in t)if(ar.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function mn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_e({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_e({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_e({start:t.start,end:t.end})+") is still open")}function vl(e){Object.assign(this,{Parser:t=>{const n=this.data("settings");return kl(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function wl(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Cl(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
4
+ `}]}function Sl(e,t){const n=t.value?t.value+`
5
+ `:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Fl(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Al(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ie(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&G(e.charCodeAt(n+1))&&G(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function cr(e,t){const n=String(t.identifier).toUpperCase(),r=Ie(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const l=e.footnoteCounts[n],u={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)}function El(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},cr(e,{type:"footnoteReference",identifier:i,position:t.position})}function Dl(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tl(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function fr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Ol(e,t){const n=e.definition(t.identifier);if(!n)return fr(e,t);const r={src:Ie(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function Ll(e,t){const n={src:Ie(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Pl(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Il(e,t){const n=e.definition(t.identifier);if(!n)return fr(e,t);const r={href:Ie(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function zl(e,t){const n={href:Ie(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ml(e,t,n){const r=e.all(t),i=n?Rl(n):pr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let a;f&&f.type==="element"&&f.tagName==="p"?a=f:(a={type:"element",tagName:"p",properties:{},children:[]},r.unshift(a)),a.children.length>0&&a.children.unshift({type:"text",value:" "}),a.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
6
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
7
+ `});const c={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,c),e.applyData(t,c)}function Rl(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=pr(n[r])}return t}function pr(e){return e.spread??e.children.length>1}function jl(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function _l(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bl(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Nl(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const zt=dr("start"),Mt=dr("end");function Hl(e){return{start:zt(e),end:Mt(e)}}function dr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function Ul(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=zt(t.children[1]),s=Mt(t.children[t.children.length-1]);u.line&&s.line&&(l.position={start:u,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Vl(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let u=-1;const s=[];for(;++u<l;){const f=t.children[u],a={},d=o?o[u]:void 0;d&&(a.align=d);let p={type:"element",tagName:i,properties:a,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(t,p)),s.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)}function ql(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yn=9,kn=32;function $l(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(xn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(xn(t.slice(i),i>0,!1)),o.join("")}function xn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===yn||o===kn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===yn||o===kn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Wl(e,t){const n={type:"text",value:$l(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ql(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Xl={blockquote:wl,break:Cl,code:Sl,delete:Fl,emphasis:Al,footnoteReference:cr,footnote:El,heading:Dl,html:Tl,imageReference:Ol,image:Ll,inlineCode:Pl,linkReference:Il,link:zl,listItem:Ml,list:jl,paragraph:_l,root:Bl,strong:Nl,table:Ul,tableCell:ql,tableRow:Vl,text:Wl,thematicBreak:Ql,toml:qe,yaml:qe,definition:qe,footnoteDefinition:qe};function qe(){return null}const Rt=(function(e){if(e==null)return Jl;if(typeof e=="string")return Zl(e);if(typeof e=="object")return Array.isArray(e)?Yl(e):Kl(e);if(typeof e=="function")return et(e);throw new Error("Expected function, string, or object as test")});function Yl(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rt(e[n]);return et(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function Kl(e){return et(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function Zl(e){return et(t);function t(n){return n&&n.type===e}}function et(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function Jl(){return!0}const Gl=!0,bn=!1,eu="skip",hr=(function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const i=Rt(t),o=r?-1:1;l(e,void 0,[])();function l(u,s,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(a,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return a;function a(){let d=[],p,x,m;if((!t||i(u,s,c[c.length-1]||null))&&(d=tu(n(u,c)),d[0]===bn))return d;if(u.children&&d[0]!==eu)for(x=(r?u.children.length:-1)+o,m=c.concat(u);x>-1&&x<u.children.length;){if(p=l(u.children[x],x,m)(),p[0]===bn)return p;x=typeof p[1]=="number"?p[1]:x+o}return d}}});function tu(e){return Array.isArray(e)?e:typeof e=="number"?[Gl,e]:[e]}const jt=(function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),hr(e,t,i,r);function i(o,l){const u=l[l.length-1];return n(o,u?u.children.indexOf(o):null,u)}});function nu(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const vn={}.hasOwnProperty;function ru(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return jt(e,"definition",r=>{const i=wn(r.identifier);i&&!vn.call(t,i)&&(t[i]=r)}),n;function n(r){const i=wn(r);return i&&vn.call(t,i)?t[i]:null}}function wn(e){return String(e||"").toUpperCase()}const Ze={}.hasOwnProperty;function ou(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return l.dangerous=r,l.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,l.footnoteLabel=n.footnoteLabel||"Footnotes",l.footnoteLabelTagName=n.footnoteLabelTagName||"h2",l.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},l.footnoteBackLabel=n.footnoteBackLabel||"Back to content",l.unknownHandler=n.unknownHandler,l.passThrough=n.passThrough,l.handlers={...Xl,...n.handlers},l.definition=ru(e),l.footnoteById=i,l.footnoteOrder=[],l.footnoteCounts={},l.patch=iu,l.applyData=lu,l.one=u,l.all=s,l.wrap=au,l.augment=o,jt(e,"footnoteDefinition",c=>{const f=String(c.identifier).toUpperCase();Ze.call(i,f)||(i[f]=c)}),l;function o(c,f){if(c&&"data"in c&&c.data){const a=c.data;a.hName&&(f.type!=="element"&&(f={type:"element",tagName:"",properties:{},children:[]}),f.tagName=a.hName),f.type==="element"&&a.hProperties&&(f.properties={...f.properties,...a.hProperties}),"children"in f&&f.children&&a.hChildren&&(f.children=a.hChildren)}if(c){const a="type"in c?c:{position:c};nu(a)||(f.position={start:zt(a),end:Mt(a)})}return f}function l(c,f,a,d){return Array.isArray(a)&&(d=a,a={}),o(c,{type:"element",tagName:f,properties:a||{},children:d||[]})}function u(c,f){return gr(l,c,f)}function s(c){return _t(l,c)}}function iu(e,t){e.position&&(t.position=Hl(e))}function lu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function gr(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Ze.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:_t(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):uu(e,t)}function _t(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i<r.length;){const o=gr(e,r[i],t);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){const l=o.children[0];l&&l.type==="text"&&(l.value=l.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function uu(e,t){const n=t.data||{},r="value"in t&&!(Ze.call(n,"hProperties")||Ze.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:_t(e,t)};return e.patch(t,r),e.applyData(t,r)}function au(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
8
+ `});++r<e.length;)r&&n.push({type:"text",value:`
9
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
10
+ `}),n}function su(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const i=e.all(r),o=String(r.identifier).toUpperCase(),l=Ie(o.toLowerCase());let u=0;const s=[];for(;++u<=e.footnoteCounts[o];){const a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+l+(u>1?"-"+u:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};u>1&&a.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(u)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(a)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const a=c.children[c.children.length-1];a&&a.type==="text"?a.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const f={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+l},children:e.wrap(i,!0)};e.patch(r,f),t.push(f)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
11
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:`
12
+ `}]}}function mr(e,t){const n=ou(e,t),r=n.one(e,null),i=su(n);return i&&r.children.push({type:"text",value:`
13
+ `},i),Array.isArray(r)?{type:"root",children:r}:r}const cu=(function(e,t){return e&&"run"in e?fu(e,t):pu(e||t)});function fu(e,t){return(n,r,i)=>{e.run(mr(n,t),r,o=>{i(o)})}}function pu(e){return t=>mr(t,e)}var dt={exports:{}},ht,Cn;function du(){if(Cn)return ht;Cn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ht=e,ht}var gt,Sn;function hu(){if(Sn)return gt;Sn=1;var e=du();function t(){}function n(){}return n.resetWarningCache=t,gt=function(){function r(l,u,s,c,f,a){if(a!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},gt}var Fn;function gu(){return Fn||(Fn=1,dt.exports=hu()()),dt.exports}var mu=gu();const _=Ne(mu);class Ve{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ve.prototype.property={};Ve.prototype.normal={};Ve.prototype.space=null;function yr(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ve(n,r,t)}function Dt(e){return e.toLowerCase()}class le{constructor(t,n){this.property=t,this.attribute=n}}le.prototype.space=null;le.prototype.boolean=!1;le.prototype.booleanish=!1;le.prototype.overloadedBoolean=!1;le.prototype.number=!1;le.prototype.commaSeparated=!1;le.prototype.spaceSeparated=!1;le.prototype.commaOrSpaceSeparated=!1;le.prototype.mustUseProperty=!1;le.prototype.defined=!1;let yu=0;const B=Fe(),Y=Fe(),kr=Fe(),S=Fe(),Q=Fe(),Pe=Fe(),ne=Fe();function Fe(){return 2**++yu}const Tt=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:Y,commaOrSpaceSeparated:ne,commaSeparated:Pe,number:S,overloadedBoolean:kr,spaceSeparated:Q},Symbol.toStringTag,{value:"Module"})),mt=Object.keys(Tt);class Bt extends le{constructor(t,n,r,i){let o=-1;if(super(t,n),An(this,"space",i),typeof r=="number")for(;++o<mt.length;){const l=mt[o];An(this,mt[o],(r&Tt[l])===Tt[l])}}}Bt.prototype.defined=!0;function An(e,t,n){n&&(e[t]=n)}const ku={}.hasOwnProperty;function ze(e){const t={},n={};let r;for(r in e.properties)if(ku.call(e.properties,r)){const i=e.properties[r],o=new Bt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Dt(r)]=r,n[Dt(o.attribute)]=r}return new Ve(t,n,e.space)}const xr=ze({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),br=ze({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function vr(e,t){return t in e?e[t]:t}function wr(e,t){return vr(e,t.toLowerCase())}const Cr=ze({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:wr,properties:{xmlns:null,xmlnsXLink:null}}),Sr=ze({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:Q,ariaCurrent:null,ariaDescribedBy:Q,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:Q,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:Q,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Q,ariaLevel:S,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:Q,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:Q,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:Y,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null}}),xu=ze({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:wr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pe,acceptCharset:Q,accessKey:Q,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:Q,autoFocus:B,autoPlay:B,blocking:Q,capture:null,charSet:null,checked:B,cite:null,className:Q,cols:S,colSpan:null,content:null,contentEditable:Y,controls:B,controlsList:Q,coords:S|Pe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:kr,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:Q,height:S,hidden:B,high:S,href:null,hrefLang:null,htmlFor:Q,httpEquiv:Q,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:Q,itemRef:Q,itemScope:B,itemType:Q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:B,optimum:S,pattern:null,ping:Q,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:Q,required:B,reversed:B,rows:S,rowSpan:S,sandbox:Q,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:Y,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Q,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:B,disableRemotePlayback:B,prefix:null,property:null,results:S,security:null,unselectable:null}}),bu=ze({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:vr,properties:{about:ne,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:Q,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pe,g2:Pe,glyphName:Pe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),vu=/^data[-\w.:]+$/i,En=/-[a-z]/g,wu=/[A-Z]/g;function Cu(e,t){const n=Dt(t);let r=t,i=le;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vu.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(En,Fu);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!En.test(o)){let l=o.replace(wu,Su);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Bt}return new i(r,t)}function Su(e){return"-"+e.toLowerCase()}function Fu(e){return e.charAt(1).toUpperCase()}const Dn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Au=yr([br,xr,Cr,Sr,xu],"html"),Eu=yr([br,xr,Cr,Sr,bu],"svg");function Du(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{jt(t,"element",(n,r,i)=>{const o=i;let l;if(e.allowedElements?l=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(n.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(n,r,o)),l&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var Tn={exports:{}},V={},On;function Tu(){if(On)return V;On=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function m(y){if(typeof y=="object"&&y!==null){var k=y.$$typeof;switch(k){case e:switch(y=y.type,y){case n:case i:case r:case c:case f:return y;default:switch(y=y&&y.$$typeof,y){case u:case l:case s:case d:case a:case o:return y;default:return k}}case t:return k}}}return V.ContextConsumer=l,V.ContextProvider=o,V.Element=e,V.ForwardRef=s,V.Fragment=n,V.Lazy=d,V.Memo=a,V.Portal=t,V.Profiler=i,V.StrictMode=r,V.Suspense=c,V.SuspenseList=f,V.isAsyncMode=function(){return!1},V.isConcurrentMode=function(){return!1},V.isContextConsumer=function(y){return m(y)===l},V.isContextProvider=function(y){return m(y)===o},V.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},V.isForwardRef=function(y){return m(y)===s},V.isFragment=function(y){return m(y)===n},V.isLazy=function(y){return m(y)===d},V.isMemo=function(y){return m(y)===a},V.isPortal=function(y){return m(y)===t},V.isProfiler=function(y){return m(y)===i},V.isStrictMode=function(y){return m(y)===r},V.isSuspense=function(y){return m(y)===c},V.isSuspenseList=function(y){return m(y)===f},V.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===i||y===r||y===c||y===f||y===p||typeof y=="object"&&y!==null&&(y.$$typeof===d||y.$$typeof===a||y.$$typeof===o||y.$$typeof===l||y.$$typeof===s||y.$$typeof===x||y.getModuleId!==void 0)},V.typeOf=m,V}var Ln;function Ou(){return Ln||(Ln=1,Tn.exports=Tu()),Tn.exports}var Lu=Ou();const Pu=Ne(Lu);function Iu(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function zu(e){return e.join(" ").trim()}function Mu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var $e={exports:{}},yt,Pn;function Ru(){if(Pn)return yt;Pn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,s=`
14
+ `,c="/",f="*",a="",d="comment",p="declaration";yt=function(m,y){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];y=y||{};var k=1,F=1;function C(L){var O=L.match(t);O&&(k+=O.length);var R=L.lastIndexOf(s);F=~R?L.length-R:F+L.length}function P(){var L={line:k,column:F};return function(O){return O.position=new I(L),j(),O}}function I(L){this.start=L,this.end={line:k,column:F},this.source=y.source}I.prototype.content=m;function b(L){var O=new Error(y.source+":"+k+":"+F+": "+L);if(O.reason=L,O.filename=y.source,O.line=k,O.column=F,O.source=m,!y.silent)throw O}function E(L){var O=L.exec(m);if(O){var R=O[0];return C(R),m=m.slice(R.length),O}}function j(){E(n)}function H(L){var O;for(L=L||[];O=v();)O!==!1&&L.push(O);return L}function v(){var L=P();if(!(c!=m.charAt(0)||f!=m.charAt(1))){for(var O=2;a!=m.charAt(O)&&(f!=m.charAt(O)||c!=m.charAt(O+1));)++O;if(O+=2,a===m.charAt(O-1))return b("End of comment missing");var R=m.slice(2,O-2);return F+=2,C(R),m=m.slice(O),F+=2,L({type:d,comment:R})}}function D(){var L=P(),O=E(r);if(O){if(v(),!E(i))return b("property missing ':'");var R=E(o),K=L({type:p,property:x(O[0].replace(e,a)),value:R?x(R[0].replace(e,a)):a});return E(l),K}}function T(){var L=[];H(L);for(var O;O=D();)O!==!1&&(L.push(O),H(L));return L}return j(),T()};function x(m){return m?m.replace(u,a):a}return yt}var In;function ju(){if(In)return $e.exports;In=1;var e=Ru();function t(n,r){var i=null;if(!n||typeof n!="string")return i;for(var o,l=e(n),u=typeof r=="function",s,c,f=0,a=l.length;f<a;f++)o=l[f],s=o.property,c=o.value,u?r(s,c,o):c&&(i||(i={}),i[s]=c);return i}return $e.exports=t,$e.exports.default=t,$e.exports}var _u=ju();const Bu=Ne(_u),Ot={}.hasOwnProperty,Nu=new Set(["table","thead","tbody","tfoot","tr"]);function Fr(e,t){const n=[];let r=-1,i;for(;++r<t.children.length;)i=t.children[r],i.type==="element"?n.push(Hu(e,i,r,t)):i.type==="text"?(t.type!=="element"||!Nu.has(t.tagName)||!Iu(i))&&n.push(i.value):i.type==="raw"&&!e.options.skipHtml&&n.push(i.value);return n}function Hu(e,t,n,r){const i=e.options,o=i.transformLinkUri===void 0?Zr:i.transformLinkUri,l=e.schema,u=t.tagName,s={};let c=l,f;if(l.space==="html"&&u==="svg"&&(c=Eu,e.schema=c),t.properties)for(f in t.properties)Ot.call(t.properties,f)&&Vu(s,f,t.properties[f],e);(u==="ol"||u==="ul")&&e.listDepth++;const a=Fr(e,t);(u==="ol"||u==="ul")&&e.listDepth--,e.schema=l;const d=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&Ot.call(i.components,u)?i.components[u]:u,x=typeof p=="string"||p===Le.Fragment;if(!Pu.isValidElementType(p))throw new TypeError(`Component for name \`${u}\` not defined or is not renderable`);if(s.key=n,u==="a"&&i.linkTarget&&(s.target=typeof i.linkTarget=="function"?i.linkTarget(String(s.href||""),t.children,typeof s.title=="string"?s.title:null):i.linkTarget),u==="a"&&o&&(s.href=o(String(s.href||""),t.children,typeof s.title=="string"?s.title:null)),!x&&u==="code"&&r.type==="element"&&r.tagName!=="pre"&&(s.inline=!0),!x&&(u==="h1"||u==="h2"||u==="h3"||u==="h4"||u==="h5"||u==="h6")&&(s.level=Number.parseInt(u.charAt(1),10)),u==="img"&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),typeof s.title=="string"?s.title:null)),!x&&u==="li"&&r.type==="element"){const m=Uu(t);s.checked=m&&m.properties?!!m.properties.checked:null,s.index=kt(r,t),s.ordered=r.tagName==="ol"}return!x&&(u==="ol"||u==="ul")&&(s.ordered=u==="ol",s.depth=e.listDepth),(u==="td"||u==="th")&&(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),x||(s.isHeader=u==="th")),!x&&u==="tr"&&r.type==="element"&&(s.isHeader=r.tagName==="thead"),i.sourcePos&&(s["data-sourcepos"]=Wu(d)),!x&&i.rawSourcePos&&(s.sourcePosition=t.position),!x&&i.includeElementIndex&&(s.index=kt(r,t),s.siblingCount=kt(r)),x||(s.node=t),a.length>0?Le.createElement(p,s,a):Le.createElement(p,s)}function Uu(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function kt(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function Vu(e,t,n,r){const i=Cu(r.schema,t);let o=n;o==null||o!==o||(Array.isArray(o)&&(o=i.commaSeparated?Mu(o):zu(o)),i.property==="style"&&typeof o=="string"&&(o=qu(o)),i.space&&i.property?e[Ot.call(Dn,i.property)?Dn[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function qu(e){const t={};try{Bu(e,n)}catch{}return t;function n(r,i){const o=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[o.replace(/-([a-z])/g,$u)]=i}}function $u(e,t){return t.toUpperCase()}function Wu(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const zn={}.hasOwnProperty,Qu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",We={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Xu(e){for(const o in We)if(zn.call(We,o)&&zn.call(e,o)){const l=We[o];console.warn(`[react-markdown] Warning: please ${l.to?`use \`${l.to}\` instead of`:"remove"} \`${o}\` (see <${Qu}#${l.id}> for more info)`),delete We[o]}const t=mo().use(vl).use(e.remarkPlugins||[]).use(cu,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(Du,e),n=new Wn;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=Le.createElement(Le.Fragment,{},Fr({options:e,schema:Au,listDepth:0},r));return e.className&&(i=Le.createElement("div",{className:e.className},i)),i}Xu.propTypes={children:_.string,className:_.string,allowElement:_.func,allowedElements:_.arrayOf(_.string),disallowedElements:_.arrayOf(_.string),unwrapDisallowed:_.bool,remarkPlugins:_.arrayOf(_.oneOfType([_.object,_.func,_.arrayOf(_.oneOfType([_.bool,_.string,_.object,_.func,_.arrayOf(_.any)]))])),rehypePlugins:_.arrayOf(_.oneOfType([_.object,_.func,_.arrayOf(_.oneOfType([_.bool,_.string,_.object,_.func,_.arrayOf(_.any)]))])),sourcePos:_.bool,rawSourcePos:_.bool,skipHtml:_.bool,includeElementIndex:_.bool,transformLinkUri:_.oneOfType([_.func,_.bool]),linkTarget:_.oneOfType([_.func,_.string]),transformImageUri:_.func,components:_.object};const Yu=["http:","https:","mailto:","tel:"],Mn="https://placeholder.invalid";function _s(e){let t=e;try{t=decodeURIComponent(e)}catch{}try{const n=new URL(t,Mn);return n.origin===Mn||Yu.includes(n.protocol)?e:null}catch{return null}}const Ku={tokenize:na,partial:!0},Ar={tokenize:ra,partial:!0},Er={tokenize:oa,partial:!0},Dr={tokenize:ia,partial:!0},Zu={tokenize:la,partial:!0},Tr={tokenize:ea,previous:Lr},Or={tokenize:ta,previous:Pr},ke={tokenize:Gu,previous:Ir},de={},Ju={text:de};let Ce=48;for(;Ce<123;)de[Ce]=ke,Ce++,Ce===58?Ce=65:Ce===91&&(Ce=97);de[43]=ke;de[45]=ke;de[46]=ke;de[95]=ke;de[72]=[ke,Or];de[104]=[ke,Or];de[87]=[ke,Tr];de[119]=[ke,Tr];function Gu(e,t,n){const r=this;let i,o;return l;function l(a){return!Lt(a)||!Ir.call(r,r.previous)||Nt(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(a))}function u(a){return Lt(a)?(e.consume(a),u):a===64?(e.consume(a),s):n(a)}function s(a){return a===46?e.check(Zu,f,c)(a):a===45||a===95||G(a)?(o=!0,e.consume(a),s):f(a)}function c(a){return e.consume(a),i=!0,s}function f(a){return o&&i&&ee(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}}function ea(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Lr.call(r,r.previous)||Nt(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ku,e.attempt(Ar,e.attempt(Er,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function ta(e,t,n){const r=this;let i="",o=!1;return l;function l(a){return(a===72||a===104)&&Pr.call(r,r.previous)&&!Nt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(a),e.consume(a),u):n(a)}function u(a){if(ee(a)&&i.length<5)return i+=String.fromCodePoint(a),e.consume(a),u;if(a===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(a),s}return n(a)}function s(a){return a===47?(e.consume(a),o?c:(o=!0,s)):n(a)}function c(a){return a===null||Ye(a)||$(a)||Se(a)||Je(a)?n(a):e.attempt(Ar,e.attempt(Er,f),n)(a)}function f(a){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(a)}}function na(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function ra(e,t,n){let r,i,o;return l;function l(c){return c===46||c===95?e.check(Dr,s,u)(c):c===null||$(c)||Se(c)||c!==45&&Je(c)?s(c):(o=!0,e.consume(c),l)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),l}function s(c){return i||r||!o?n(c):t(c)}}function oa(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Dr,t,o)(l):l===null||$(l)||Se(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function ia(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),i):u===60||u===null||$(u)||Se(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||$(u)||Se(u)?t(u):r(u)}function o(u){return ee(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):ee(u)?(e.consume(u),l):n(u)}}function la(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return G(o)?n(o):t(o)}}function Lr(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||$(e)}function Pr(e){return!ee(e)}function Ir(e){return!(e===47||Lt(e))}function Lt(e){return e===43||e===45||e===46||e===95||G(e)}function Nt(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ua={tokenize:ga,partial:!0};function aa(){return{document:{91:{tokenize:pa,continuation:{tokenize:da},exit:ha}},text:{91:{tokenize:fa},93:{add:"after",tokenize:sa,resolveTo:ca}}}}function sa(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return u;function u(s){if(!l||!l._balanced)return n(s);const c=ce(r.sliceSerialize({start:l.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function ca(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function fa(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(a){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),s}function s(a){return a!==94?n(a):(e.enter("gfmFootnoteCallMarker"),e.consume(a),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(a){if(o>999||a===93&&!l||a===null||a===91||$(a))return n(a);if(a===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(ce(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return $(a)||(l=!0),o++,e.consume(a),a===92?f:c}function f(a){return a===91||a===92||a===93?(e.consume(a),o++,c):c(a)}}function pa(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return s;function s(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(x)}function f(x){if(l>999||x===93&&!u||x===null||x===91||$(x))return n(x);if(x===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return o=ce(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return $(x)||(u=!0),l++,e.consume(x),x===92?a:f}function a(x){return x===91||x===92||x===93?(e.consume(x),l++,f):f(x)}function d(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(o)||i.push(o),U(e,p,"gfmFootnoteDefinitionWhitespace")):n(x)}function p(x){return t(x)}}function da(e,t,n){return e.check(Ue,t,e.attempt(ua,t,n))}function ha(e){e.exit("gfmFootnoteDefinition")}function ga(e,t,n){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function ma(e){let t=(e||{}).singleTilde;const n={tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(o,l){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let s=u;for(;s--;)if(o[s][0]==="exit"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[s][1].end.offset-o[s][1].start.offset){o[u][1].type="strikethroughSequence",o[s][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[s][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[s][1].end),end:Object.assign({},o[u][1].start)},a=[["enter",c,l],["enter",o[s][1],l],["exit",o[s][1],l],["enter",f,l]],d=l.parser.constructs.insideSpan.null;d&&re(a,a.length,0,Ge(d,o.slice(s+1,u),l)),re(a,a.length,0,[["exit",f,l],["enter",o[u][1],l],["exit",o[u][1],l],["exit",c,l]]),re(o,s-1,u-s+3,a),u=s+a.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function i(o,l,u){const s=this.previous,c=this.events;let f=0;return a;function a(p){return s===126&&c[c.length-1][1].type!=="characterEscape"?u(p):(o.enter("strikethroughSequenceTemporary"),d(p))}function d(p){const x=Ke(s);if(p===126)return f>1?u(p):(o.consume(p),f++,d);if(f<2&&!t)return u(p);const m=o.exit("strikethroughSequenceTemporary"),y=Ke(p);return m._open=!y||y===2&&!!x,m._close=!x||x===2&&!!y,l(p)}}}class ya{constructor(){this.map=[]}add(t,n,r){ka(this,t,n,r)}consume(t){if(this.map.sort((o,l)=>o[0]-l[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function ka(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function xa(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}const ba={flow:{null:{tokenize:va,resolveAll:wa}}};function va(e,t,n){const r=this;let i=0,o=0,l;return u;function u(v){let D=r.events.length-1;for(;D>-1;){const O=r.events[D][1].type;if(O==="lineEnding"||O==="linePrefix")D--;else break}const T=D>-1?r.events[D][1].type:null,L=T==="tableHead"||T==="tableRow"?b:s;return L===b&&r.parser.lazy[r.now().line]?n(v):L(v)}function s(v){return e.enter("tableHead"),e.enter("tableRow"),c(v)}function c(v){return v===124||(l=!0,o+=1),f(v)}function f(v){return v===null?n(v):z(v)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):n(v):N(v)?U(e,f,"whitespace")(v):(o+=1,l&&(l=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),a(v)))}function a(v){return v===null||v===124||$(v)?(e.exit("data"),f(v)):(e.consume(v),v===92?d:a)}function d(v){return v===92||v===124?(e.consume(v),a):a(v)}function p(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(e.enter("tableDelimiterRow"),l=!1,N(v)?U(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):x(v))}function x(v){return v===45||v===58?y(v):v===124?(l=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),m):I(v)}function m(v){return N(v)?U(e,y,"whitespace")(v):y(v)}function y(v){return v===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):v===45?(o+=1,k(v)):v===null||z(v)?P(v):I(v)}function k(v){return v===45?(e.enter("tableDelimiterFiller"),F(v)):I(v)}function F(v){return v===45?(e.consume(v),F):v===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(v))}function C(v){return N(v)?U(e,P,"whitespace")(v):P(v)}function P(v){return v===124?x(v):v===null||z(v)?!l||i!==o?I(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(v)):I(v)}function I(v){return n(v)}function b(v){return e.enter("tableRow"),E(v)}function E(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),E):v===null||z(v)?(e.exit("tableRow"),t(v)):N(v)?U(e,E,"whitespace")(v):(e.enter("data"),j(v))}function j(v){return v===null||v===124||$(v)?(e.exit("data"),E(v)):(e.consume(v),v===92?H:j)}function H(v){return v===92||v===124?(e.consume(v),j):j(v)}}function wa(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,s=0,c,f,a;const d=new ya;for(;++n<e.length;){const p=e[n],x=p[1];p[0]==="enter"?x.type==="tableHead"?(u=!1,s!==0&&(Rn(d,t,s,c,f),f=void 0,s=0),c={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},d.add(n,0,[["enter",c,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,a=void 0,o=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},d.add(n,0,[["enter",f,t]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],a=Qe(d,t,o,i,void 0,a),o=[0,0,0,0]),l[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],a=Qe(d,t,o,i,void 0,a)),o=l,l=[o[1],n,0,0])):x.type==="tableHead"?(u=!0,s=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],a=Qe(d,t,o,i,n,a)):l[1]!==0&&(a=Qe(d,t,l,i,n,a)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&Rn(d,t,s,c,f),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=xa(t.events,n))}return e}function Qe(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},Oe(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Oe(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=Oe(t.events,n[2]),f=Oe(t.events,n[3]),a={type:u,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",a,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,m=n[3]-n[2]-1;e.add(x,m,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return i!==void 0&&(o.end=Object.assign({},Oe(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Rn(e,t,n,r,i){const o=[],l=Oe(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Oe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Ca={tokenize:Fa},Sa={text:{91:Ca}};function Fa(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return $(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(s)}function u(s){return z(s)?t(s):N(s)?e.check({tokenize:Aa},t,n)(s):n(s)}}function Aa(e,t,n){return U(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Ea(e){return Kn([Ju,aa(),ma(e),ba,Sa])}function jn(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Da(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Ta={}.hasOwnProperty,Oa=(function(e,t,n,r){let i,o;typeof t=="string"||t instanceof RegExp?(o=[[t,n]],i=r):(o=t,i=n),i||(i={});const l=Rt(i.ignore||[]),u=La(o);let s=-1;for(;++s<u.length;)hr(e,"text",c);return e;function c(a,d){let p=-1,x;for(;++p<d.length;){const m=d[p];if(l(m,x?x.children.indexOf(m):void 0,x))return;x=m}if(x)return f(a,d)}function f(a,d){const p=d[d.length-1],x=u[s][0],m=u[s][1];let y=0;const k=p.children.indexOf(a);let F=!1,C=[];x.lastIndex=0;let P=x.exec(a.value);for(;P;){const I=P.index,b={index:P.index,input:P.input,stack:[...d,a]};let E=m(...P,b);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E!==!1&&(y!==I&&C.push({type:"text",value:a.value.slice(y,I)}),Array.isArray(E)?C.push(...E):E&&C.push(E),y=I+P[0].length,F=!0),!x.global)break;P=x.exec(a.value)}return F?(y<a.value.length&&C.push({type:"text",value:a.value.slice(y)}),p.children.splice(k,1,...C)):C=[a],k+C.length}});function La(e){const t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([_n(e[n][0]),Bn(e[n][1])])}else{let n;for(n in e)Ta.call(e,n)&&t.push([_n(n),Bn(e[n])])}return t}function _n(e){return typeof e=="string"?new RegExp(Da(e),"g"):e}function Bn(e){return typeof e=="function"?e:()=>e}const xt="phrasing",bt=["autolink","link","image","label"],Pa={transforms:[Ba],enter:{literalAutolink:za,literalAutolinkEmail:vt,literalAutolinkHttp:vt,literalAutolinkWww:vt},exit:{literalAutolink:_a,literalAutolinkEmail:ja,literalAutolinkHttp:Ma,literalAutolinkWww:Ra}},Ia={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xt,notInConstruct:bt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xt,notInConstruct:bt},{character:":",before:"[ps]",after:"\\/",inConstruct:xt,notInConstruct:bt}]};function za(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vt(e){this.config.enter.autolinkProtocol.call(this,e)}function Ma(e){this.config.exit.autolinkProtocol.call(this,e)}function Ra(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function ja(e){this.config.exit.autolinkEmail.call(this,e)}function _a(e){this.exit(e)}function Ba(e){Oa(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Na],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Ha]],{ignore:["link","linkReference"]})}function Na(e,t,n,r,i){let o="";if(!zr(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Ua(n)))return!1;const l=Va(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function Ha(e,t,n,r){return!zr(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ua(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Va(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=jn(e,"(");let o=jn(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function zr(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Se(n)||Je(n))&&(!t||n!==47)}function Mr(e){return e.label||!e.identifier?e.label||"":ur(e.identifier)}function qa(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),l=[];let u=-1;for(r.push(-1);++u<i.length;){const s=i[u];r[r.length-1]=u,l.push(o.move(t.handle(s,e,t,{before:`
15
+ `,after:`
16
+ `,...o.current()}))),s.type!=="list"&&(t.bulletLastUsed=void 0),u<i.length-1&&l.push(o.move($a(s,i[u+1],e,t)))}return r.pop(),l.join("")}function $a(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
17
+ `.repeat(1+o);if(o===!1)return`
18
+
19
+ <!---->
20
+
21
+ `}return`
22
+
23
+ `}const Wa=/\r?\n|\r/g;function Qa(e,t){const n=[];let r=0,i=0,o;for(;o=Wa.exec(e);)l(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return l(e.slice(r)),n.join("");function l(u){n.push(t(u,i,!u))}}function Rr(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Xa(e,t){return Nn(e,t.inConstruct,!0)&&!Nn(e,t.notInConstruct,!1)}function Nn(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jr(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],l={};let u=-1;for(;++u<e.unsafe.length;){const f=e.unsafe[u];if(!Xa(e.stack,f))continue;const a=Rr(f);let d;for(;d=a.exec(r);){const p="before"in f||!!f.atBreak,x="after"in f,m=d.index+(p?d[1].length:0);i.includes(m)?(l[m].before&&!p&&(l[m].before=!1),l[m].after&&!x&&(l[m].after=!1)):(i.push(m),l[m]={before:p,after:x})}}i.sort(Ya);let s=n.before?n.before.length:0;const c=r.length-(n.after?n.after.length:0);for(u=-1;++u<i.length;){const f=i[u];f<s||f>=c||f+1<c&&i[u+1]===f+1&&l[f].after&&!l[f+1].before&&!l[f+1].after||i[u-1]===f-1&&l[f].before&&!l[f-1].before&&!l[f-1].after||(s!==f&&o.push(Hn(r.slice(s,f),"\\")),s=f,/[!-/:-@[-`{-~]/.test(r.charAt(f))&&(!n.encode||!n.encode.includes(r.charAt(f)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(f).toString(16).toUpperCase()+";"),s++))}return o.push(Hn(r.slice(s,c),n.after)),o.join("")}function Ya(e,t){return e-t}function Hn(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let l=-1,u=0,s;for(;s=n.exec(o);)r.push(s.index);for(;++l<r.length;)u!==r[l]&&i.push(e.slice(u,r[l])),i.push("\\"),u=r[l];return i.push(e.slice(u)),i.join("")}function tt(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:s,current:l,shift:u};function l(){return{now:{line:i,column:o},lineShift:r}}function u(c){r+=c}function s(c){const f=c||"",a=f.split(/\r?\n|\r/g),d=a[a.length-1];return i+=a.length-1,o=a.length===1?o+d.length:1+d.length+r,f}}_r.peek=ls;function Ka(){return{enter:{gfmFootnoteDefinition:Ja,gfmFootnoteDefinitionLabelString:Ga,gfmFootnoteCall:ns,gfmFootnoteCallString:rs},exit:{gfmFootnoteDefinition:ts,gfmFootnoteDefinitionLabelString:es,gfmFootnoteCall:is,gfmFootnoteCallString:os}}}function Za(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:us,footnoteReference:_r}}}function Ja(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ga(){this.buffer()}function es(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ce(this.sliceSerialize(e)).toLowerCase()}function ts(e){this.exit(e)}function ns(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rs(){this.buffer()}function os(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ce(this.sliceSerialize(e)).toLowerCase()}function is(e){this.exit(e)}function _r(e,t,n,r){const i=tt(r);let o=i.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=i.move(jr(n,Mr(e),{...i.current(),before:o,after:"]"})),u(),l(),o+=i.move("]"),o}function ls(){return"["}function us(e,t,n,r){const i=tt(r);let o=i.move("[^");const l=n.enter("footnoteDefinition"),u=n.enter("label");return o+=i.move(jr(n,Mr(e),{...i.current(),before:o,after:"]"})),u(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(Qa(qa(e,n,i.current()),as)),l(),o}function as(e,t,n){return t===0?e:(n?"":" ")+e}function Br(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let l=-1,u=n.before;r.push(-1);let s=t.createTracker(n);for(;++l<i.length;){const c=i[l];let f;if(r[r.length-1]=l,l+1<i.length){let a=t.handle.handlers[i[l+1].type];a&&a.peek&&(a=a.peek),f=a?a(i[l+1],e,t,{before:"",after:"",...s.current()}).charAt(0):""}else f=n.after;o.length>0&&(u==="\r"||u===`
24
+ `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),u=" ",s=t.createTracker(n),s.move(o.join(""))),o.push(s.move(t.handle(c,e,t,{...s.current(),before:u,after:f}))),u=o[o.length-1].slice(-1)}return r.pop(),o.join("")}const ss=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Nr.peek=hs;const cs={canContainEols:["delete"],enter:{strikethrough:ps},exit:{strikethrough:ds}},fs={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ss}],handlers:{delete:Nr}};function ps(e){this.enter({type:"delete",children:[]},e)}function ds(e){this.exit(e)}function Nr(e,t,n,r){const i=tt(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=Br(e,n,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function hs(){return"~"}Hr.peek=gs;function Hr(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],u=Rr(l);let s;if(l.atBreak)for(;s=u.exec(r);){let c=s.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(s.index+1)}}return i+r+i}function gs(){return"`"}function ms(e){return e.length}function ys(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ms,o=[],l=[],u=[],s=[];let c=0,f=-1;for(;++f<e.length;){const m=[],y=[];let k=-1;for(e[f].length>c&&(c=e[f].length);++k<e[f].length;){const F=ks(e[f][k]);if(n.alignDelimiters!==!1){const C=i(F);y[k]=C,(s[k]===void 0||C>s[k])&&(s[k]=C)}m.push(F)}l[f]=m,u[f]=y}let a=-1;if(typeof r=="object"&&"length"in r)for(;++a<c;)o[a]=Un(r[a]);else{const m=Un(r);for(;++a<c;)o[a]=m}a=-1;const d=[],p=[];for(;++a<c;){const m=o[a];let y="",k="";m===99?(y=":",k=":"):m===108?y=":":m===114&&(k=":");let F=n.alignDelimiters===!1?1:Math.max(1,s[a]-y.length-k.length);const C=y+"-".repeat(F)+k;n.alignDelimiters!==!1&&(F=y.length+F+k.length,F>s[a]&&(s[a]=F),p[a]=F),d[a]=C}l.splice(1,0,d),u.splice(1,0,p),f=-1;const x=[];for(;++f<l.length;){const m=l[f],y=u[f];a=-1;const k=[];for(;++a<c;){const F=m[a]||"";let C="",P="";if(n.alignDelimiters!==!1){const I=s[a]-(y[a]||0),b=o[a];b===114?C=" ".repeat(I):b===99?I%2?(C=" ".repeat(I/2+.5),P=" ".repeat(I/2-.5)):(C=" ".repeat(I/2),P=C):P=" ".repeat(I)}n.delimiterStart!==!1&&!a&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||a)&&k.push(" "),n.alignDelimiters!==!1&&k.push(C),k.push(F),n.alignDelimiters!==!1&&k.push(P),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||a!==c-1)&&k.push("|")}x.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return x.join(`
25
+ `)}function ks(e){return e==null?"":String(e)}function Un(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const xs={enter:{table:bs,tableData:Vn,tableHeader:Vn,tableRow:ws},exit:{codeText:Cs,table:vs,tableData:wt,tableHeader:wt,tableRow:wt}};function bs(e){const t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function vs(e){this.exit(e),this.setData("inTable")}function ws(e){this.enter({type:"tableRow",children:[]},e)}function wt(e){this.exit(e)}function Vn(e){this.enter({type:"tableCell",children:[]},e)}function Cs(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Ss));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function Ss(e,t){return t==="|"?t:e}function Fs(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
26
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:l,tableRow:u,tableCell:s,inlineCode:d}};function l(p,x,m,y){return c(f(p,m,y),p.align)}function u(p,x,m,y){const k=a(p,m,y),F=c([k]);return F.slice(0,F.indexOf(`
27
+ `))}function s(p,x,m,y){const k=m.enter("tableCell"),F=m.enter("phrasing"),C=Br(p,m,{...y,before:o,after:o});return F(),k(),C}function c(p,x){return ys(p,{align:x,alignDelimiters:r,padding:n,stringLength:i})}function f(p,x,m){const y=p.children;let k=-1;const F=[],C=x.enter("table");for(;++k<y.length;)F[k]=a(y[k],x,m);return C(),F}function a(p,x,m){const y=p.children;let k=-1;const F=[],C=x.enter("tableRow");for(;++k<y.length;)F[k]=s(y[k],p,x,m);return C(),F}function d(p,x,m){let y=Hr(p,x,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function As(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Es(e){const t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ds(e,t,n,r){const i=Es(n);let o=n.bulletCurrent||As(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),f);return s(),c;function f(a,d,p){return d?(p?"":" ".repeat(l))+a:(p?o:o+" ".repeat(l-o.length))+a}}const Ts={exit:{taskListCheckValueChecked:qn,taskListCheckValueUnchecked:qn,paragraph:Ls}},Os={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ps}};function qn(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function Ls(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const u=i[o];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ps(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=tt(r);o&&u.move(l);let s=Ds(e,t,n,{...r,...u.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),s;function c(f){return f+l}}function Is(){return[Pa,Ka(),cs,xs,Ts]}function zs(e){return{extensions:[Ia,Za(),fs,Fs(e),Os]}}function Ms(e={}){const t=this.data();n("micromarkExtensions",Ea(e)),n("fromMarkdownExtensions",Is()),n("toMarkdownExtensions",zs(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}const Bs=["p","br","strong","em","del","a","code","pre","ul","ol","li","input","h1","h2","h3","h4","h5","h6","blockquote","hr","table","thead","tbody","tr","th","td"],Ns=[Ms];export{mo as L,vl as N,_s as a,Ns as c,Ms as l,Bs as s,Xu as x};
28
+ //# sourceMappingURL=allowed-elements-BXnLJV1S-C-_lr2zm.js.map
@@ -0,0 +1,2 @@
1
+ import{j as r}from"../nexly.js";import{u as s}from"./assistant-link-policy-DWaWTnGr-Cc-yj-a-.js";function c(o={}){const n=o.allowedHosts??[];return{a:({href:e,title:l,children:t})=>{const i=r.jsx(r.Fragment,{children:t});return s(e,n)?r.jsx("a",{href:e,title:l,target:"_blank",rel:"noopener noreferrer nofollow",children:t}):i}}}export{c as f};
2
+ //# sourceMappingURL=assistant-link-components-MZWf5ty7-C44wlQAi.js.map
@@ -0,0 +1,2 @@
1
+ import{t as l}from"../nexly.js";function i(r){const e=r.trim().toLowerCase().replace(/^\.+|\.+$/g,"");return e==="*"?"":e}function a(r,e){const t=r.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;for(const s of e){const n=i(s);if(n&&(t===n||t.endsWith(`.${n}`)))return!0}return!1}function u(r,e){if(!r||e.length===0)return!1;const[t,s]=l(()=>new URL(r));if(s||!t)return!1;if(t.protocol==="http:"||t.protocol==="https:")return a(t.hostname,e);if(t.protocol==="mailto:"){const n=t.pathname.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.every(o=>{const f=o.lastIndexOf("@");return f===-1?!1:a(o.slice(f+1),e)})}return!1}export{a,u};
2
+ //# sourceMappingURL=assistant-link-policy-DWaWTnGr-Cc-yj-a-.js.map
@@ -0,0 +1,2 @@
1
+ const r={"G-Miner":"rank_name.g_miner",Miner:"rank_name.miner",Developer:"rank_name.developer","Team Leader":"rank_name.team_leader",Manager:"rank_name.manager","Senior Manager":"rank_name.senior_manager","Vice President":"rank_name.vice_president",President:"rank_name.president",Chairman:"rank_name.chairman"};function m(e,a){const n=r[e];return n?a(n):e}export{m};
2
+ //# sourceMappingURL=block-helpers-Cg_zAqG6-DnN2COvk.js.map
@@ -0,0 +1,2 @@
1
+ import{r,j as a,b as X}from"../nexly.js";const de=240,R=30,ue=n=>n<=3?"low":"high",pe=n=>`block_feedback.chip.${n}`;Object.fromEntries([{key:"numbers_wrong",labelEn:"The numbers look wrong"},{key:"too_generic",labelEn:"Too generic"},{key:"hard_to_understand",labelEn:"Hard to understand"},{key:"not_relevant",labelEn:"Not relevant to me"},{key:"accurate",labelEn:"Accurate numbers"},{key:"clear",labelEn:"Clear and easy to follow"},{key:"actionable",labelEn:"I know what to do next"},{key:"saves_time",labelEn:"Saves me time"},{key:"not_my_situation",labelEn:"Doesn't fit my situation"},{key:"where_to_start",labelEn:"Don't know where to start"},{key:"concrete_steps",labelEn:"Concrete steps"},{key:"matches_my_data",labelEn:"Matches my data"},{key:"motivating",labelEn:"Motivates me to act"},{key:"data_stale",labelEn:"Data looks outdated"},{key:"dashboard_mismatch",labelEn:"Differs from my dashboard"},{key:"threshold_unclear",labelEn:"The threshold isn't clear"},{key:"no_next_step",labelEn:"No hint what to do next"},{key:"warned_in_time",labelEn:"Warned me in time"},{key:"clear_threshold",labelEn:"Clear threshold and deadline"},{key:"branch_detail",labelEn:"Not enough branch detail"},{key:"how_to_use",labelEn:"Not sure how to use this"},{key:"comparison_weak",labelEn:"Comparison not helpful"},{key:"see_growth",labelEn:"I can see where my team grows"},{key:"recognize_team",labelEn:"Helps me recognize my team"},{key:"week_over_week",labelEn:"Useful week-over-week view"},{key:"payout_mismatch",labelEn:"Doesn't match my payout"},{key:"assumptions_unclear",labelEn:"Assumptions aren't clear"},{key:"no_what_if",labelEn:"No what-if scenarios"},{key:"currency_unclear",labelEn:"Currency or rate unclear"},{key:"matches_payout",labelEn:"Matches my payout"},{key:"helps_planning",labelEn:"Helps me plan the cycle"},{key:"too_late",labelEn:"Came too late"},{key:"no_context",labelEn:"Not enough context"},{key:"other_topics",labelEn:"I'd prefer other topics"},{key:"spot_on",labelEn:"Spot-on topic"},{key:"learned",labelEn:"I learned something"},{key:"on_time",labelEn:"Right on time"},{key:"want_to_join",labelEn:"Makes me want to join in"},{key:"needs_example",labelEn:"No example"},{key:"too_long",labelEn:"Too long"},{key:"bad_formatting",labelEn:"Badly formatted"},{key:"good_example",labelEn:"Good example"}].map(n=>[n.key,n]));const he={low:["numbers_wrong","too_generic","hard_to_understand","not_relevant"],high:["accurate","clear","actionable","saves_time"]},q={low:["payout_mismatch","assumptions_unclear","no_what_if","currency_unclear"],high:["matches_payout","helps_planning","clear","accurate"]},be={"daily-action-plan":{low:["not_my_situation","numbers_wrong","too_generic","where_to_start"],high:["concrete_steps","matches_my_data","saves_time","motivating"]},"rank-advancement-roadmap":{low:["data_stale","dashboard_mismatch","threshold_unclear","no_next_step"],high:["warned_in_time","clear_threshold","actionable","accurate"]},"network-growth":{low:["branch_detail","data_stale","how_to_use","comparison_weak"],high:["see_growth","recognize_team","week_over_week","motivating"]},"mlm-calculator":q,"commission-forecast":q,"social-insights":{low:["not_relevant","too_late","no_context","other_topics"],high:["spot_on","learned","on_time","want_to_join"]},learning:{low:["hard_to_understand","needs_example","too_long","bad_formatting"],high:["clear","good_example","learned","actionable"]}};function me(n,o){return(be[n]??he)[ue(o)]}function Q(n){const o=n.trim().match(/\S+/g);return o?o.length:0}const ye=[1,2,3,4,5],M=96,_e=20;function fe(n){let o=n.slice(0,de);if(Q(o)>R){let c=0,d=0,p=!1;for(;d<o.length;){const _=/\s/.test(o.charAt(d));if(!_&&!p&&(c++,p=!0,c>R))break;_&&(p=!1),d++}o=o.slice(0,d).trimEnd()}return o}function ge({promptLogId:n,blockSlug:o,sectionKey:c,subjectType:d,subjectId:p,ariaKey:_,onRated:Z,onFeedbackCycleDone:z,settleInPlace:v=!1,baseUrl:H,apiKey:F,jwt:K,t:l,promptKey:ee,compact:s=!1,className:te,previewMode:L=!1}){const[m,E]=r.useState(null),[ae,j]=r.useState(!1),[$,S]=r.useState(null),[f,k]=r.useState("none"),i=f==="settled",[g,A]=r.useState([]),[C,O]=r.useState(""),[oe,B]=r.useState(!1),N=r.useRef(null),T=r.useRef(z);T.current=z;const w=r.useRef(!1),P=r.useRef(!1);r.useEffect(()=>()=>{P.current&&!w.current&&(w.current=!0,T.current?.())},[]),r.useEffect(()=>{if(!(f!=="done"||v))return N.current=setTimeout(()=>{E(null),S(null),A([]),O(""),k("none"),w.current||(w.current=!0,T.current?.())},2500),()=>{N.current&&clearTimeout(N.current)}},[f,v]);const h=n?"ai":o?"block":null;if(!h||!K)return null;const ne=ee??(s?"block_rating.prompt_section":"block_rating.prompt"),u=m!==null||ae,W=m??0,re=!u&&$!==null?$:W,U=s?15:18,J=d&&p?{subjectType:d,subjectId:p}:{},Y={"Content-Type":"application/json",...F?{"X-API-Key":F}:{},Authorization:`Bearer ${K}`},le=async e=>{if(u)return;if(L){E(e),k(h==="block"?"chips":"done");return}j(!0);const t=h==="ai"?"/api/widget/ai-feedback":"/api/widget/block-feedback",b=h==="ai"?{promptLogId:n,rating:e}:{blockSlug:o,rating:e,...c?{sectionKey:c}:{},...J},[y,ce]=await X(fetch(`${H}${t}`,{method:"POST",headers:Y,body:JSON.stringify(b)}));if(ce){j(!1);return}(y.ok||y.status===409)&&(E(e),k(h==="block"&&y.ok?"chips":"done"),P.current=!0,Z?.()),j(!1)},I=()=>k(v?"settled":"done"),se=e=>A(t=>t.includes(e)?t.filter(b=>b!==e):[...t,e]),ie=e=>{O(fe(e.target.value));const t=e.target;t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,M)}px`,t.style.overflowY=t.scrollHeight>M?"auto":"hidden"},D=Q(C),x=!oe&&!i&&(g.length>0||D>0),G=async()=>{if(!x)return;if(L){I();return}B(!0);const e=C.trim(),t={blockSlug:o,...c?{sectionKey:c}:{},...J,...g.length?{categories:g}:{},...e?{feedback:e}:{}},[b,y]=await X(fetch(`${H}/api/widget/block-feedback`,{method:"PUT",headers:Y,body:JSON.stringify(t)}));if(y){B(!1);return}(b.ok||b.status===404)&&I(),B(!1)},V=(f==="chips"||i)&&h==="block"&&m!==null&&o?me(o,m):[];return a.jsxs("div",{className:["es-block__rating",s?"es-block__rating--compact":"",te].filter(Boolean).join(" "),"data-es-no-read":!0,style:{display:"flex",alignItems:"center",gap:s?6:8,flexWrap:"wrap",...s?{marginTop:10,paddingTop:8,borderTop:"1px solid var(--es-color-border, rgba(0, 0, 0, 0.1))"}:{marginBottom:12}},children:[a.jsx("span",{className:"es-block__rating-label",style:{fontSize:s?12:13,color:"var(--es-color-on-surface-muted, #4B5563)"},children:l(m?"support_chat.feedback_thanks":ne)}),a.jsx("div",{className:"es-block__rating-stars",role:"radiogroup","aria-label":l(_??"support_chat.rate_aria"),style:{display:"inline-flex",alignItems:"center",gap:4},onMouseLeave:()=>!u&&S(null),children:ye.map(e=>{const t=e<=re;return a.jsx("button",{type:"button",role:"radio","aria-checked":e===W,"aria-label":l("support_chat.rate_star",{count:e}),disabled:u,onMouseEnter:()=>!u&&S(e),onClick:()=>le(e),style:{background:"none",border:"none",padding:0,cursor:u?"default":"pointer",lineHeight:0,color:"var(--es-color-warning, #9C5300)",opacity:u&&!t?.4:1,transition:"opacity 150ms ease-out"},children:a.jsx("svg",{width:U,height:U,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{display:"block"},children:a.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})},e)})}),V.length>0&&a.jsxs("div",{className:"es-block__rating-followup",style:{flexBasis:"100%",display:"flex",flexDirection:"column",gap:6,marginTop:2},children:[a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:V.map(e=>{const t=g.includes(e);return a.jsx("button",{type:"button","aria-pressed":t,disabled:i,onClick:()=>se(e),style:{font:"inherit",fontSize:s?11.5:12,fontWeight:t?600:400,padding:"3px 10px",borderRadius:999,cursor:i?"default":"pointer",border:t?"1px solid var(--es-color-primary, #2563EB)":"1px solid var(--es-color-control-border, #6B7280)",background:t?"var(--es-color-primary-muted, rgba(37, 99, 235, 0.08))":"var(--es-color-surface-elevated, #f5f5f5)",color:t?"var(--es-color-primary-on-muted, #1D4ED8)":"var(--es-color-on-surface-muted, #4B5563)",transition:"border-color 120ms ease, color 120ms ease"},children:l(pe(e))},e)})}),a.jsxs("div",{style:{display:"flex",gap:6,alignItems:"flex-end"},children:[a.jsx("textarea",{rows:1,value:C,disabled:i,onChange:ie,onKeyDown:e=>{e.key==="Enter"&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),G())},placeholder:l("block_feedback.own_words"),"aria-label":l("block_feedback.input_aria"),style:{flex:1,resize:"none",font:"inherit",fontSize:s?12:13,lineHeight:1.45,padding:"6px 10px",borderRadius:10,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",minHeight:32,maxHeight:M,overflowY:"hidden"}}),a.jsx("button",{type:"button","aria-label":l("block_feedback.send_aria"),disabled:!x,onClick:()=>{G()},style:{border:"none",borderRadius:10,width:32,height:32,flex:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:x?"pointer":"default",background:"var(--es-color-primary, #2563EB)",color:"var(--es-color-on-primary, #FFFFFF)",opacity:x?1:.35,transition:"opacity 150ms ease-out"},children:a.jsxs("svg",{width:14,height:14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{display:"block"},children:[a.jsx("path",{d:"M22 2 11 13"}),a.jsx("path",{d:"M22 2 15 22l-4-9-9-4 20-7z"})]})})]}),a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[a.jsx("span",{"aria-live":"polite","data-es-no-read":!0,style:{fontSize:11,fontVariantNumeric:"tabular-nums",color:"var(--es-color-on-surface-muted, #4B5563)",visibility:D>=_e?"visible":"hidden"},children:l("block_feedback.counter",{count:D,max:R})}),a.jsx("button",{type:"button",disabled:i,onClick:I,style:{background:"none",border:"none",padding:0,font:"inherit",fontSize:11,cursor:i?"default":"pointer",color:"var(--es-color-on-surface-muted, #4B5563)",visibility:i?"hidden":"visible"},children:l("block_feedback.skip")})]})]})]})}export{ge as C};
2
+ //# sourceMappingURL=block-rating-DH7mp-_R-CoiP5C2K.js.map
@@ -0,0 +1,2 @@
1
+ import{t as r}from"../nexly.js";import{a as u}from"./allowed-elements-BXnLJV1S-C-_lr2zm.js";const p=["https://external-url-probe.invalid/probe","http://external-url-probe.invalid/probe"];function i(t){return t.length>0&&!/^\.+$/.test(t)}function o(t){if(typeof t!="string"||t.length===0||u(t)===null)return null;const[n]=r(()=>new URL(t));return n===null||n.protocol!=="http:"&&n.protocol!=="https:"||!p.every(l=>{const[e]=r(()=>new URL(t,l));return e!==null&&e.href===n.href})||!i(n.hostname)?null:n}function f(t){return o(t)?.href??null}function h(t){return o(t)?.host??""}export{h as c,f as p};
2
+ //# sourceMappingURL=external-url-LRu_ntew-CJQjg_od.js.map
@@ -0,0 +1,2 @@
1
+ import{j as e,Q as l}from"../nexly.js";const m={slug:"demo-services",name:"DEMO — Services",version:"0.1.0",category:"content",configSchema:{properties:{items:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"}},required:["title"]},default:[]}}},defaultConfig:{items:[]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function d(r){return Array.isArray(r)?r.flatMap(t=>{if(typeof t!="object"||t===null)return[];const s=t,c=typeof s.title=="string"?s.title.trim():"";if(!c)return[];const o=typeof s.description=="string"&&s.description.trim().length>0?s.description.trim():void 0;return[{title:c,description:o}]}):[]}function p({data:r,config:t,i18n:s}){const c=s?.t??(i=>i),o=d(r?.items??t?.items);return o.length===0?e.jsx(l,{blockType:"demo-services",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-block__empty",children:c("demoServices.empty")})})}):e.jsx(l,{blockType:"demo-services",children:e.jsx("div",{className:"es-block__body es-demosvc",children:e.jsx("ul",{className:"es-demosvc__list",children:o.map((i,n)=>e.jsxs("li",{className:"es-demosvc__item",children:[e.jsx("span",{className:"es-demosvc__ordinal","aria-hidden":"true",children:n+1}),e.jsxs("div",{className:"es-demosvc__text",children:[e.jsx("h3",{className:"es-demosvc__title",children:i.title}),i.description&&e.jsx("p",{className:"es-demosvc__desc",children:i.description})]})]},n))})})})}export{p as Component,m as manifest};
2
+ //# sourceMappingURL=index-1o6W5wiJ-I68tb-d3.js.map
@@ -0,0 +1,2 @@
1
+ import{r as P,j as s,Q as m}from"../nexly.js";const n=28,u=2*Math.PI*n;function w({data:t,config:g,actions:h,metadata:N,i18n:_}){const i=_?.t??(e=>e),b=g.mode??t.mode??"basic",p=t.report,a=t.aiPitch,[v,x]=P.useState("idle");if(!p&&!t.error)return s.jsx(m,{blockType:"product-sales-intel",children:s.jsx("div",{className:"psi-block",children:s.jsxs("div",{className:"psi-pv-card",children:[s.jsxs("div",{className:"psi-ring-container",children:[s.jsx("svg",{className:"psi-ring-svg",width:72,height:72,viewBox:"0 0 72 72",children:s.jsx("circle",{className:"psi-ring-track",cx:36,cy:36,r:n})}),s.jsxs("div",{className:"psi-ring-label",children:[s.jsx("span",{className:"psi-ring-pct",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"0%"}),s.jsx("span",{className:"psi-ring-sub",children:"PV"})]})]}),s.jsxs("div",{className:"psi-pv-info",children:[s.jsx("div",{className:"psi-pv-title",children:i("product_sales_intel.personal_volume")}),s.jsx("div",{className:"psi-pv-amount",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"—"}),s.jsx("div",{className:"psi-pv-target",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:N?.dataQuality==="none"?i("product_sales_intel.signin_prompt"):i("product_sales_intel.loading")})]})]})})});if(t.error||!p)return s.jsx(m,{blockType:"product-sales-intel",children:s.jsx("p",{style:{color:"var(--es-color-error, #AD2C26)",fontSize:13},children:i("product_sales_intel.load_error")})});const{pvSummary:c,products:l,topProduct:r}=p,y=u-u*c.progressPct/100,j=l[0]?.pvPoints??1,f=()=>{a&&(navigator.clipboard.writeText(a).catch(()=>{}),x("copied"),h?.emit?.("psi:pitchCopied",{pitch:a}),setTimeout(()=>x("idle"),2e3))},o=e=>{h?.emit?.("psi:productSelected",{productId:e.productId,name:e.name})};return s.jsx(m,{blockType:"product-sales-intel",children:s.jsxs("div",{className:"psi-block",children:[s.jsxs("div",{className:"psi-pv-card",children:[s.jsxs("div",{className:"psi-ring-container",children:[s.jsxs("svg",{className:"psi-ring-svg",width:72,height:72,viewBox:"0 0 72 72",children:[s.jsx("circle",{className:"psi-ring-track",cx:36,cy:36,r:n}),s.jsx("circle",{className:"psi-ring-fill",cx:36,cy:36,r:n,strokeDasharray:u,strokeDashoffset:y})]}),s.jsxs("div",{className:"psi-ring-label",children:[s.jsxs("span",{className:"psi-ring-pct",children:[c.progressPct,"%"]}),s.jsx("span",{className:"psi-ring-sub",children:"PV"})]})]}),s.jsxs("div",{className:"psi-pv-info",children:[s.jsx("div",{className:"psi-pv-title",children:i("product_sales_intel.personal_volume")}),s.jsx("div",{className:"psi-pv-amount",children:c.personalVolume.toLocaleString()}),s.jsx("div",{className:"psi-pv-target",children:i("product_sales_intel.target_label",{value:c.pvTarget.toLocaleString()})}),c.gapToPv>0&&s.jsx("div",{className:"psi-pv-gap",children:i("product_sales_intel.pv_to_go",{value:c.gapToPv.toLocaleString()})})]})]}),r&&s.jsxs("div",{className:"psi-top-product",onClick:()=>o(r),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),o(r))},tabIndex:0,role:"button",children:[s.jsx("span",{className:"psi-top-label",children:i("product_sales_intel.top_product")}),s.jsx("span",{className:"psi-top-name",children:r.name}),s.jsxs("span",{className:"psi-top-badge",children:[r.pvPoints," PV"]})]}),b==="pro"&&l.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"psi-section-title",children:i("product_sales_intel.all_products",{count:l.length})}),s.jsx("div",{className:"psi-product-list",children:l.map(e=>{const k=j>0?Math.round(e.pvPoints/j*100):0;return s.jsxs("div",{className:"psi-product-row",onClick:()=>o(e),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o(e))},tabIndex:0,role:"button",children:[s.jsxs("div",{className:"psi-product-header",children:[s.jsx("span",{className:"psi-product-name",children:e.name}),s.jsxs("div",{className:"psi-product-stats",children:[s.jsx("span",{className:"psi-product-stat",children:i("product_sales_intel.units_sold",{count:e.unitsSold})}),s.jsxs("span",{className:"psi-product-stat",children:["$",e.revenue.toLocaleString()]}),s.jsxs("span",{className:"psi-product-pv",children:[e.pvPoints," PV"]})]})]}),s.jsx("div",{className:"psi-product-bar-track",children:s.jsx("div",{className:"psi-product-bar-fill",style:{width:`${k}%`}})})]},e.productId)})})]}),a&&s.jsxs("div",{className:"psi-pitch-box",children:[s.jsxs("div",{className:"psi-pitch-header",children:[s.jsx("span",{className:"psi-pitch-label",children:i("product_sales_intel.ai_coach_label")}),s.jsx("button",{className:`psi-copy-btn${v==="copied"?" psi-copied":""}`,onClick:f,children:v==="copied"?`✓ ${i("common.copied")}`:i("common.copy")})]}),s.jsx("p",{className:"psi-pitch-text",children:a})]})]})})}const C={slug:"product-sales-intel",name:"Product Sales Intelligence",version:"1.0.0",category:"data",requiredService:"product-sales-intel",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:260,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"product-sales-intel",inputSchema:{type:"object",properties:{report:{type:"object"},aiPitch:{type:"string"},mode:{type:"string"}},required:["report","mode"]}},events:{emits:[{name:"psi:productSelected",description:"User clicked on a product in the list"},{name:"psi:pitchCopied",description:"User copied the AI product pitch"}]}};export{w as Component,w as ProductSalesIntelBlock,C as manifest};
2
+ //# sourceMappingURL=index-B1ef1IlE-QeFj7CR9.js.map
@@ -0,0 +1,2 @@
1
+ import{r as l,j as e,Q as d}from"../nexly.js";const b={slug:"demo-ticket-form",name:"DEMO — Report an issue",version:"0.1.0",category:"interactive",configSchema:{properties:{categories:{type:"array",items:{type:"string"},default:[]}}},defaultConfig:{categories:[]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function f(a){if(typeof a!="string")return null;const t=a.trim();if(!t||/\s/.test(t))return null;const s=t.indexOf("@");return s>0&&s<t.length-1?t:null}function g(a){return Array.isArray(a)?a.flatMap(t=>typeof t=="string"&&t.trim().length>0?[t.trim()]:[]):[]}function j({config:a,i18n:t}){const s=t?.t??(i=>i),o=g(a?.categories),n=f(a?.supportEmail),[m,u]=l.useState(o[0]??""),[c,r]=l.useState(""),[k,p]=l.useState(!1),h=c.trim().length>0,_=l.useCallback(()=>{c.trim().length!==0&&(p(!0),r(""))},[c]);return k?e.jsx(d,{blockType:"demo-ticket-form",children:e.jsx("div",{className:"es-block__body es-demoticket es-demoticket--done",children:e.jsxs("div",{className:"es-demoticket__done",children:[e.jsx("span",{className:"es-demoticket__done-mark","aria-hidden":"true",children:"✓"}),e.jsx("p",{className:"es-demoticket__done-text",children:n?s("demoTicket.sentTo",{email:n}):s("demoTicket.sent")})]})})}):e.jsx(d,{blockType:"demo-ticket-form",children:e.jsxs("div",{className:"es-block__body es-demoticket",children:[e.jsxs("div",{className:"es-demoticket__fields",children:[o.length>0&&e.jsxs("label",{className:"es-demoticket__field",children:[e.jsx("span",{className:"es-demoticket__label",children:s("demoTicket.category")}),e.jsx("select",{className:"es-demoticket__select",value:m,onChange:i=>u(i.target.value),children:o.map(i=>e.jsx("option",{value:i,children:i},i))})]}),e.jsxs("label",{className:"es-demoticket__field es-demoticket__field--grow",children:[e.jsx("span",{className:"es-demoticket__label",children:s("demoTicket.message")}),e.jsx("textarea",{className:"es-demoticket__textarea",value:c,onChange:i=>r(i.target.value),placeholder:s("demoTicket.placeholder")})]})]}),e.jsx("button",{type:"button",className:"es-demoticket__submit",onClick:_,disabled:!h,children:s("demoTicket.submit")})]})})}export{j as Component,b as manifest};
2
+ //# sourceMappingURL=index-B8aKMeg5-BLxOZxZv.js.map
@@ -0,0 +1,6 @@
1
+ import{r as s,j as e,a as De,b as te,Q as it}from"../nexly.js";import{x as Ke,s as Oe,c as Ue,a as We}from"./allowed-elements-BXnLJV1S-C-_lr2zm.js";import{H as ot,P as ct}from"./use-deferred-rating-XlgCUwcY-DDVOwURi.js";import{r as Fe}from"./inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js";import"./_commonjsHelpers-C6fGbg64-BC8KDfbh.js";const Nt={slug:"chat",name:"Chat",version:"1.0.0",category:"interactive",requiredService:"chat-bot",configSchema:{properties:{placeholder:{type:"string",default:""},welcomeMessage:{type:"string",default:""}}},defaultConfig:{placeholder:"",welcomeMessage:""},dataContract:{serviceSlug:"chat-bot",inputSchema:{type:"object",properties:{message:{type:"string",description:"AI response text"},suggestions:{type:"array",items:{type:"string"},description:"Suggested follow-up questions"}},required:["message"]},previewDataOverride:{message:"Hello! I can help you find the perfect product. What are you looking for today?",suggestions:["Show me trending items","Compare prices for me","Find deals under $50"]}},fields:[{id:"placeholder",type:"localized-text",label:"Input placeholder",default:"",placeholder:'Leave empty to use translated default (e.g. "Type a message...")',group:"Content"},{id:"welcomeMessage",type:"localized-text",label:"Welcome message",default:"",placeholder:'Leave empty to use translated default (e.g. "Hi! How can I help you?")',group:"Content"},{id:"showSuggestions",type:"toggle",label:"Show suggestions",default:!0,group:"Behavior"}],events:{emits:[{name:"chat:messageSent",description:"User sent a message"},{name:"chat:messageReceived",description:"AI response received"}],listens:[{name:"chat:clearHistory",description:"Clear chat history"}]},sizing:{minWidth:240,preferredHeight:"fill",scrollable:!0},supportedPlacements:["main","fullscreen"]},lt=["audio/webm;codecs=opus","audio/webm","audio/mp4"];function ut(){return typeof navigator>"u"||typeof window>"u"?!1:typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof window.MediaRecorder<"u"}function dt(){if(typeof window>"u"||typeof window.MediaRecorder>"u")return;const o=typeof window.MediaRecorder.isTypeSupported=="function";for(const i of lt)if(!o||window.MediaRecorder.isTypeSupported(i))return i}function ht({baseUrl:o,apiKey:i,jwt:n,language:p,onTranscript:w,t:b,disabled:y=!1,streaming:j,voiceStream:g,baseText:U,onText:S}){const[r]=s.useState(ut),[u,m]=s.useState("idle"),[G,H]=s.useState(null),[f,z]=s.useState("idle"),I=!!(j&&g&&U&&S),$=s.useRef(null),E=s.useRef(null),k=s.useRef([]),F=s.useRef(!0);s.useEffect(()=>()=>{F.current=!1},[]);const d=s.useRef({baseUrl:o,apiKey:i,jwt:n,language:p,onTranscript:w});s.useEffect(()=>{d.current={baseUrl:o,apiKey:i,jwt:n,language:p,onTranscript:w}},[o,i,n,p,w]);const c=s.useCallback(()=>{E.current?.getTracks().forEach(_=>_.stop()),E.current=null,$.current=null,k.current=[]},[]);s.useEffect(()=>c,[c]);const h=s.useRef(()=>{});h.current=()=>{I&&(f==="connecting"||f==="listening")&&g?.stop()},s.useEffect(()=>()=>h.current(),[]);const T=s.useCallback(async _=>{const{baseUrl:V,apiKey:C,jwt:M,language:v,onTranscript:J}=d.current,R=new FormData;R.append("audio",_,"recording.webm"),R.append("language",v);const Q={};C&&(Q["X-API-Key"]=C),M&&(Q.Authorization=`Bearer ${M}`);const ee=await fetch(`${V}/api/widget/transcribe`,{method:"POST",headers:Q,credentials:"include",body:R});if(!ee.ok){const ae=new Error(`HTTP ${ee.status}`);throw ae.status=ee.status,ae}const le=await ee.json();J(le.text??"")},[]),K=s.useCallback(async()=>{H(null);let _;try{_=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{m("error"),H("voice.permission_denied");return}const V=dt();let C;try{C=V?new MediaRecorder(_,{mimeType:V}):new MediaRecorder(_)}catch{_.getTracks().forEach(M=>M.stop()),m("error"),H("voice.error_generic");return}E.current=_,$.current=C,k.current=[],C.ondataavailable=M=>{M.data&&M.data.size>0&&k.current.push(M.data)},C.onstop=async()=>{const M=C.mimeType||V||"audio/webm",v=new Blob(k.current,{type:M});if(c(),v.size===0){m("idle");return}m("transcribing");try{if(await T(v),!F.current)return;m("idle"),H(null)}catch(J){if(!F.current)return;const R=J.status;m("error"),H(R===413?"voice.error_too_large":"voice.error_generic")}},C.start(),m("recording")},[c,T]),ce=s.useCallback(()=>{const _=$.current;_&&_.state!=="inactive"?_.stop():(c(),m("idle"))},[c]),se=s.useCallback(()=>{r&&(I?f==="connecting"||f==="listening"?(g.stop(),z("idle")):(H(null),g.start({language:p,baseText:U,onText:S,onState:_=>z(_),onError:_=>{H(_),z("error")}})):u==="recording"?ce():(u==="idle"||u==="error")&&K())},[r,I,f,u,p,U,S,g,K,ce]);if(!r)return null;const L=I?f==="connecting"||f==="listening":u==="recording",D=!I&&u==="transcribing",ge=I?f==="error":u==="error",q=b(L?"voice.stop":"voice.start"),me=G?b(G):D?b("voice.transcribing"):q,Z=["es-chat__mic",L&&"es-chat__mic--recording",D&&"es-chat__mic--transcribing",ge&&"es-chat__mic--error"].filter(Boolean).join(" ");return e.jsx("button",{type:"button",className:Z,onClick:se,disabled:D||y,"aria-label":q,"aria-pressed":L,title:me,children:D?e.jsx("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"es-chat__mic-spinner","aria-hidden":"true",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):L?e.jsx("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}):e.jsxs("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}),e.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),e.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]})})}function pt({size:o=16}){return e.jsxs("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polyline",{points:"12 6 12 12 16 14"})]})}function gt({size:o=18}){return e.jsxs("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 5H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"})]})}function mt({size:o=13}){return e.jsxs("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"m2 2 20 20"}),e.jsx("path",{d:"M8.5 8.5 7 10a5 5 0 0 0 7 7l1.5-1.5"}),e.jsx("path",{d:"M15.5 15.5 17 14a5 5 0 0 0-7-7l-1.5 1.5"})]})}function ft({value:o,onChange:i,disabled:n,t:p}){const[w,b]=s.useState(null),y=o??0,j=!n&&w!==null?w:y;return e.jsxs("div",{className:"es-chat__rating-group",children:[e.jsx("div",{className:"es-chat__rating",role:"radiogroup","aria-label":p("support_chat.rate_aria"),onMouseLeave:()=>!n&&b(null),children:[1,2,3,4,5].map(g=>{const U=g<=j;return e.jsx("button",{type:"button",role:"radio","aria-checked":g===y,"aria-label":p("support_chat.rate_star",{count:g}),disabled:n,onMouseEnter:()=>!n&&b(g),onFocus:()=>!n&&b(g),onBlur:()=>!n&&b(null),onClick:()=>!n&&i?.(g),className:`es-chat__rating-star${U?" es-chat__rating-star--filled":""}${n?" es-chat__rating-star--disabled":""}`,children:e.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:U?"currentColor":"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})},g)})}),e.jsx("span",{className:"es-chat__rating-label","aria-live":"polite",children:j>0?p(`support_chat.rate_label_${j}`):""})]})}function ze(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}const _t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,bt=45e3,yt=/https?:\/\/\S+/i;function xt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}}function jt(o){let i=null;const n=[];for(const p of o.split(`
2
+ `))p.startsWith("event:")?i=p.slice(6).trim():p.startsWith("data:")&&n.push(p.slice(5).trimStart());return{event:i,data:n.join(`
3
+ `)}}function It({config:o,actions:i,baseUrl:n,i18n:p,auth:w,externalContext:b,productId:y,sessionId:j,sessionMessages:g,readOnly:U}){const S=U===!0,r=p?.t??(t=>t),u=b?.apiKey??"",m=p?.currentLanguage??"en",G=De(o.placeholder,m,{t:r,fallbackKey:"chat.input_placeholder",enDefault:"Type a message..."}),H=De(o.welcomeMessage,m,{t:r,fallbackKey:"chat.empty_state",enDefault:["Hi! How can I help you?","Hello! How can I help you?"]}),f=typeof o._draft=="string"?o._draft:void 0,z=typeof o._draftContext=="string"?o._draftContext:void 0,I=o._autoSend===!0,$=Array.isArray(o._quickChips)?o._quickChips:[],E=JSON.stringify($),k=s.useRef(w?.jwt);s.useEffect(()=>{k.current=w?.jwt},[w?.jwt]);const F=b?.voice,d=!!F?.enabled&&(F?.languages??[]).includes(m),[c,h]=s.useState(()=>g?.map(t=>({id:t.id,role:t.role,text:t.content}))??[]),[T,K]=s.useState(""),[ce,se]=s.useState([]),[L,D]=s.useState(!1),[ge,q]=s.useState(null),[me,Z]=s.useState(!1),{containerRef:_,isPinned:V,scrollToBottom:C,stickToBottom:M}=ot(),v=s.useRef(null),J=s.useRef(null),R=s.useRef(j??ze()),Q=s.useRef(g&&g.length>0?j??null:null),ee=s.useRef(null),le=s.useRef(void 0),ae=s.useRef(!1);s.useEffect(()=>{i.emit("chat:session",{sessionId:R.current})},[i]),s.useEffect(()=>{M()},[c,L,M]);const be=s.useCallback(()=>{const t=v.current;if(!t)return;const a=t.closest(".es-block")?.clientHeight??0,l=a>0?Math.round(a*.4):120;t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,l)}px`,t.style.overflowY=t.scrollHeight>l?"auto":"hidden"},[]);s.useLayoutEffect(()=>{be()},[T,be]);const re=s.useCallback(()=>{ae.current&&(ae.current=!1,i.emit("chat:draftConsumed",void 0))},[i]),ne=s.useCallback(async t=>{const a=t.trim();if(!a||L)return;re();const l=le.current;le.current=void 0,se([]),Z(!1),J.current?.abort(),J.current=new AbortController;const A=yt.test(a),B=`user-${Date.now()}`,X={id:B,role:"user",text:a,...A?{linkStatus:"reading",linkFailedCount:0}:{}};h(x=>[...x,X]);const O=()=>{A&&h(x=>x.map(W=>W.id===B&&W.linkStatus==="reading"?{...W,linkStatus:"done"}:W))};C(),K(""),D(!0),q(null),v.current&&(v.current.style.height="auto");const N=c.map(x=>({role:x.role,content:x.text})),Te=await w?.ensureValidToken?.()??k.current,st={"Content-Type":"application/json",...u?{"X-API-Key":u}:{},...Te?{Authorization:`Bearer ${Te}`}:{}},ue=`assistant-${Date.now()}`;let ie="",Le=!1,xe=!1;const Ae=()=>{xe||(xe=!0,q(ue),h(x=>[...x,{id:ue,role:"assistant",text:ie}]))},Be=R.current,Pe=_t.test(Be)?Be:void 0,He=xt(),[je,ke]=await te(fetch(`${n}/api/widget/chat-bot/stream`,{method:"POST",headers:st,body:JSON.stringify({text:a,history:N,...Pe?{sessionId:Pe}:{},...y?{productId:y}:{},...He?{timeZone:He}:{},...l?{blockContext:l}:{}}),signal:J.current.signal}));if(ke){if(ke instanceof Error&&ke.name==="AbortError"){O();return}D(!1),q(null),O(),h(x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}]);return}if(!je.ok||!je.body){D(!1),q(null),O(),h(x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}]);return}const at=je.body.getReader(),rt=new TextDecoder;let de="",_e;const Me=()=>{_e&&clearTimeout(_e),_e=void 0},Re=()=>{Me(),_e=setTimeout(()=>{J.current?.abort(),D(!1),q(null),O()},bt)},[,ve]=await te((async()=>{for(Re();;){const{done:x,value:W}=await at.read();if(Re(),x)break;de+=rt.decode(W,{stream:!0});let we;for(;(we=de.indexOf(`
4
+
5
+ `))!==-1;){const nt=de.slice(0,we);de=de.slice(we+2);const{event:he,data:pe}=jt(nt);if(!(!he||!pe)){if(he==="start"){const P=JSON.parse(pe);P.sessionId&&P.sessionId!==R.current&&(R.current=P.sessionId,Q.current=P.sessionId,i.emit("chat:session",{sessionId:P.sessionId}))}else if(he==="token"){const P=JSON.parse(pe);ie+=P.value??"",Ae();const Se=ie;h(Ce=>Ce.map(Y=>Y.id===ue?{...Y,text:Se}:Y))}else if(he==="meta"){const P=JSON.parse(pe);Le=!0;const Se=P.assistantMessage?.content??ie,Ce=Array.isArray(P.pastedLinks)?P.pastedLinks.filter(Y=>Y.status&&Y.status!=="ok").length:0;Ae(),h(Y=>Y.map(oe=>oe.id===ue?{...oe,text:Se,promptLogId:P.logId}:oe.id===B&&oe.linkStatus==="reading"?{...oe,linkStatus:"done",linkFailedCount:Ce}:oe))}else if(he==="error"){const P=JSON.parse(pe);throw new Error(P.message??"Stream error")}}}}if(!Le&&!ie)throw new Error("Stream ended before completion")})());if(Me(),D(!1),q(null),O(),ve){if(ve instanceof Error&&ve.name==="AbortError"||ie)return;h(xe?x=>x.map(W=>W.id===ue?{...W,text:r("chat.error_message"),promptLogId:void 0}:W):x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}])}},[L,i,c,r,u,n,y,C,w,re]),ye=s.useCallback(()=>{const t=b?.voiceStream;t?.getState&&t.getState()!=="idle"&&t.stop(),ne(T)},[ne,T,b]);s.useEffect(()=>{const t=b?.voiceStream;t?.getState&&t.getState()!=="idle"&&t.stop()},[j]);const qe=s.useCallback(t=>{if(t.autoSend){ne(t.message);return}se([]),K(""),re(),v.current&&(v.current.style.height="auto",v.current.focus())},[ne,re]);s.useEffect(()=>{if(!(f!==void 0||$.length>0))return;const t=`${f}${z??""}${String(I)}${E}`;if(ee.current!==t){if(ee.current=t,ae.current=!0,le.current=z,I&&f!==void 0){se([]),ne(f);return}se($),f!==void 0&&(K(f),v.current&&v.current.focus())}},[f,z,I,E,ne]);const Je=s.useCallback(t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),ye())},[ye]),Xe=s.useCallback(t=>{re(),K(t.target.value)},[re]),Qe=s.useCallback(t=>{const a=t.trim();a&&(K(l=>l?`${l} ${a}`:a),requestAnimationFrame(()=>{v.current?.focus()}))},[]);s.useEffect(()=>()=>J.current?.abort(),[]),s.useEffect(()=>i.on("chat:clearHistory",t=>{const a=t;h([]),Z(!1);const l=a?.sessionId??ze();R.current=l,Q.current=l,i.emit("chat:session",{sessionId:l})}),[i]);const Ye=s.useCallback(async()=>{const t=k.current,[a,l]=await te(fetch(`${n}/api/chat/sessions/new`,{method:"POST",headers:{...u?{"X-API-Key":u}:{},...t?{Authorization:`Bearer ${t}`}:{}}}));if(!l&&a.ok){const[A,B]=await te(a.json());if(!B&&A.success&&A.data?.sessionId){i.emit("chat:clearHistory",{sessionId:A.data.sessionId});return}}i.emit("chat:clearHistory",void 0)},[i,u,n]),Ge=s.useCallback(()=>{i.emit("chat:showHistory",void 0)},[i]),fe=s.useCallback(async t=>{R.current=t,i.emit("chat:session",{sessionId:t}),h([]),Z(!1),D(!0);const a=k.current,[l,A]=await te(fetch(`${n}/api/chat/sessions/${encodeURIComponent(t)}/messages?limit=50`,{headers:{...u?{"X-API-Key":u}:{},...a?{Authorization:`Bearer ${a}`}:{}}}));if(D(!1),A||!l.ok){Z(!0);return}const[B,X]=await te(l.json());if(X){Z(!0);return}const O=B.data?.messages??[];h(O.map(N=>({id:N.id,role:N.role,text:N.content,promptLogId:N.promptLogId??void 0,rating:N.userScore??null}))),Q.current=t,C("auto")},[i,u,n,C]);s.useEffect(()=>i.on("chat:select-session",t=>{const{sessionId:a}=t;!a||a===Q.current||fe(a)}),[i,fe]);const Ze=s.useCallback(()=>{fe(R.current)},[fe]),Ie=s.useRef(c);s.useEffect(()=>{Ie.current=c},[c]);const Ve=s.useCallback(({messageId:t,rating:a},{keepalive:l})=>{const A=Ie.current.find(B=>B.id===t);!A||!A.promptLogId||!k.current||(h(B=>B.map(X=>X.id===t?{...X,rating:a,ratingPending:!0}:X)),(async()=>{const[B,X]=await te(fetch(`${n}/api/widget/ai-feedback`,{method:"POST",keepalive:l,headers:{"Content-Type":"application/json",...u?{"X-API-Key":u}:{},Authorization:`Bearer ${k.current}`},body:JSON.stringify({promptLogId:A.promptLogId,rating:a})}));if(X||!(B.ok||B.status===409)){h(O=>O.map(N=>N.id===t?{...N,rating:null,ratingPending:!1}:N));return}h(O=>O.map(N=>N.id===t?{...N,rating:a,ratingPending:!1}:N))})())},[u,n]),{pending:$e,rate:Ee,undo:et}=ct({submit:Ve}),tt=s.useCallback((t,a)=>{const l=c.find(A=>A.id===t);!l||!l.promptLogId||l.ratingPending||!k.current||Ee(t,a)},[c,Ee]);return e.jsxs(it,{blockType:"chat",children:[e.jsxs("div",{className:"es-chat__header",children:[e.jsx("span",{className:"es-chat__header-title",children:r("chat.chat")}),e.jsxs("div",{className:"es-chat__header-actions",children:[e.jsx("button",{type:"button",className:"es-chat__action-btn","aria-label":r("chat.new_session_button"),title:r("chat.new_session_button"),onClick:Ye,children:e.jsx(gt,{size:18})}),e.jsx("button",{type:"button",className:"es-chat__action-btn","aria-label":r("chat.history_button"),title:r("chat.history_button"),onClick:Ge,children:e.jsx(pt,{size:16})})]})]}),e.jsxs("div",{className:"es-block__body es-chat__body",children:[e.jsxs("div",{className:"es-chat__messages",ref:_,children:[c.length===0&&!me&&!L&&e.jsx("div",{className:"es-chat__welcome",children:H}),me&&e.jsxs("div",{className:"es-chat__load-error",role:"alert",children:[e.jsx("span",{className:"es-chat__load-error-text",children:r("chat.load_session_error")}),e.jsx("button",{type:"button",className:"es-chat__load-error-retry",onClick:Ze,children:r("chat.retry")})]}),c.map(t=>e.jsxs("div",{className:`es-chat__bubble es-chat__bubble--${t.role}${t.id===ge?" es-chat__bubble--streaming":""}`,children:[t.role==="assistant"?e.jsx("div",{className:"es-chat__bubble-text es-chat__bubble-text--md",children:e.jsx(Ke,{remarkPlugins:[...Ue],allowedElements:[...Oe],transformLinkUri:a=>We(a)??"",transformImageUri:()=>"",components:Fe,children:t.text})}):e.jsx("div",{className:"es-chat__bubble-text",children:t.text}),t.role==="user"&&t.linkStatus==="reading"&&e.jsxs("div",{className:"es-chat__link-status",role:"status",children:[e.jsx("span",{className:"es-chat__link-status-spinner","aria-hidden":"true"}),e.jsx("span",{className:"es-chat__link-status-text",children:r("chat.reading_link")})]}),t.role==="user"&&t.linkStatus==="done"&&(t.linkFailedCount??0)>0&&e.jsxs("div",{className:"es-chat__link-status es-chat__link-status--failed",children:[e.jsx(mt,{size:13}),e.jsx("span",{className:"es-chat__link-status-text",children:r("chat.link_unreadable")})]}),t.role==="assistant"&&t.promptLogId&&k.current&&(()=>{const a=$e?.messageId===t.id?$e.rating:null;return e.jsxs("div",{className:"es-chat__feedback",children:[e.jsx("span",{className:"es-chat__feedback-label",children:t.rating&&a===null?r("chat.feedback_thanks"):r("support_chat.rate_aria")}),e.jsx(ft,{value:a??t.rating??null,onChange:l=>tt(t.id,l),disabled:a===null&&(!!t.rating||t.ratingPending),t:r}),a!==null&&e.jsxs("div",{className:"es-chat__rating-undo",role:"status",children:[e.jsx("span",{className:"es-chat__rating-undo-text",children:r("support_chat.rating_undo_toast",{rating:a})}),e.jsx("button",{type:"button",className:"es-chat__rating-undo-btn",onClick:et,children:r("support_chat.rating_undo_button")})]})]})})()]},t.id)),L&&ge===null&&e.jsxs("div",{className:"es-chat__typing","aria-label":r("chat.typing_aria"),children:[e.jsx("span",{className:"es-chat__typing-dot"}),e.jsx("span",{className:"es-chat__typing-dot"}),e.jsx("span",{className:"es-chat__typing-dot"})]})]}),!V&&c.length>0&&e.jsxs("button",{type:"button",className:"es-chat__jump",onClick:()=>C(),"aria-label":r("chat.jump_to_latest"),title:r("chat.jump_to_latest"),children:[e.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 5v14"}),e.jsx("path",{d:"m19 12-7 7-7-7"})]}),e.jsx("span",{className:"es-chat__jump-label",children:r("chat.jump_to_latest")})]})]}),e.jsxs("div",{className:"es-block__footer es-chat__footer",children:[ce.length>0&&e.jsx("div",{className:"es-chat__chips",role:"group","aria-label":r("chat.quick_actions_aria"),children:ce.map((t,a)=>e.jsx("button",{type:"button",className:"es-chat__chip",onClick:()=>qe(t),disabled:L||S,children:t.labelKey?r(t.labelKey):t.label},`${t.labelKey??t.label}-${a}`))}),e.jsx("div",{className:"es-chat__disclaimer",children:r("chat.disclaimer")}),e.jsxs("div",{className:"es-chat__input-row",children:[e.jsx("textarea",{ref:v,className:"es-chat__textarea",value:T,onChange:Xe,onKeyDown:Je,placeholder:G,rows:1,maxLength:2e3,disabled:L||S,"aria-label":r("chat.input_aria")}),d&&!S&&e.jsx(ht,{baseUrl:n,apiKey:u,jwt:k.current,language:m,onTranscript:Qe,t:r,streaming:F?.streaming,voiceStream:b?.voiceStream,baseText:()=>T,onText:t=>{if(K(t.length>2e3?t.slice(0,2e3):t),t.length>=2e3){const a=b?.voiceStream;a?.getState&&a.getState()!=="idle"&&a.stop()}requestAnimationFrame(()=>{be(),v.current?.focus()})}}),e.jsx("button",{className:"es-chat__send",onClick:ye,disabled:!T.trim()||L||S,type:"button","aria-label":r("chat.send_aria"),children:L?e.jsx("span",{className:"es-chat__send-loading","aria-hidden":"true",children:"⋯"}):e.jsx("span",{"aria-hidden":"true",children:"➤"})})]})]})]})}const Ne=50;function $t({sessionId:o,baseUrl:i,jwt:n,isOpen:p,onToggle:w,i18n:b}){const y=b?.t??(d=>d),j=p!==void 0,[g,U]=s.useState(!1),S=j?p:g,[r,u]=s.useState([]),[m,G]=s.useState(null),[H,f]=s.useState(!1),[z,I]=s.useState(null),$=s.useRef(!1),E=s.useCallback(async d=>{if(n){f(!0),I(null);try{const c=`${i}/api/chat/sessions/${o}/messages?limit=${Ne}&offset=${d}`,h=await fetch(c,{headers:{Authorization:`Bearer ${n}`},credentials:"include"});if(!h.ok)throw new Error(`HTTP ${h.status}`);const T=await h.json();if(!T.success)throw new Error(y("chat_history.error"));u(K=>d===0?T.data.messages:[...T.data.messages,...K]),G(T.data.pagination)}catch(c){I(c instanceof Error?c.message:y("chat_history.error"))}finally{f(!1)}}},[i,n,o,y]),k=s.useCallback(()=>{j?w?.():U(d=>{const c=!d;return c&&!$.current&&($.current=!0,E(0)),c})},[j,w,E]),F=s.useCallback(()=>{if(!m)return;const d=Math.max(0,m.total-m.offset-Ne-Ne);E(d)},[E,m]);return s.useEffect(()=>{j&&S&&!$.current&&n&&($.current=!0,E(0))},[j,S,n,E]),s.useEffect(()=>{$.current=!1,u([]),G(null),I(null),S&&n&&($.current=!0,E(0))},[o,n]),e.jsxs("div",{className:"es-chat-history",children:[!j&&e.jsxs("button",{className:"es-chat-history__toggle",type:"button","aria-expanded":S,onClick:k,disabled:!n,children:[e.jsx("span",{className:"es-chat-history__toggle-icon",children:S?"▲":"▼"}),y("chat_history.toggle")]}),S&&e.jsxs("div",{className:"es-chat-history__panel",children:[H&&e.jsxs("div",{className:"es-chat-history__loading",role:"status","aria-label":y("chat_history.loading_aria"),children:[e.jsx("span",{className:"es-chat-history__dot"}),e.jsx("span",{className:"es-chat-history__dot"}),e.jsx("span",{className:"es-chat-history__dot"})]}),z&&!H&&e.jsx("div",{className:"es-chat-history__error",role:"alert",children:z}),!H&&!z&&e.jsxs(e.Fragment,{children:[m?.hasMore&&e.jsx("button",{className:"es-chat-history__load-more",type:"button",onClick:F,"aria-label":y("chat_history.load_older_aria"),children:y("chat_history.load_older")}),e.jsxs("div",{className:"es-chat-history__messages",role:"log","aria-live":"polite","aria-label":y("chat_history.panel_aria"),children:[r.length===0&&e.jsx("div",{className:"es-chat-history__empty",children:y("chat_history.empty")}),r.filter(d=>d.role!=="system").map(d=>e.jsx("div",{className:`es-chat-history__bubble es-chat-history__bubble--${d.role}`,children:d.role==="assistant"?e.jsx("div",{className:"es-chat-history__bubble-md",children:e.jsx(Ke,{remarkPlugins:[...Ue],allowedElements:[...Oe],transformLinkUri:c=>We(c)??"",transformImageUri:()=>"",components:Fe,children:d.content})}):d.content},d.id))]})]})]})]})}export{$t as ChatHistoryBlock,It as Component,Nt as manifest};
6
+ //# sourceMappingURL=index-B9ozeox8-oy07dUaV.js.map