@snf/access-qa-bot 3.7.5 โ 3.8.0
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.
- package/dist/access-qa-bot.js +8914 -4714
- package/dist/access-qa-bot.js.map +1 -1
- package/dist/access-qa-bot.standalone.js +88 -58
- package/dist/access-qa-bot.standalone.js.map +1 -1
- package/dist/access-qa-bot.umd.cjs +101 -71
- package/dist/access-qa-bot.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,64 +1,94 @@
|
|
|
1
|
-
(function(Ue,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react/jsx-runtime"),require("react"),require("react-dom/client"),require("react-dom/server"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom/client","react-dom/server","react-dom"],P):(Ue=typeof globalThis<"u"?globalThis:Ue||self,P(Ue.AccessQABot={},Ue.jsxRuntime,Ue.React,Ue.ReactDOMClient,Ue.ReactDOMServer,Ue.ReactDOM))})(this,function(Ue,P,f,ru,hi,mi){"use strict";function yi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=yi(f),vi={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_AGENT_ENDPOINT:"https://qa.access-ci.org/api/v1",VITE_ALLOW_ANON_ACCESS:"true",VITE_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",VITE_NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",VITE_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",VITE_TURNSTILE_SITE_KEY:"0x4AAAAAAC2toq7FThjGplVx"};function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dn.apply(null,arguments)}function qr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}typeof SuppressedError=="function"&&SuppressedError;const we={AUDIO_BUTTON:"audio-button",NOTIFICATION_BUTTON:"notification-button",CLOSE_CHAT_BUTTON:"close-chat-button",SEND_MESSAGE_BUTTON:"send-button",VOICE_MESSAGE_BUTTON:"voice-button",FILE_ATTACHMENT_BUTTON:"file-attachment-button",EMOJI_PICKER_BUTTON:"emoji-button"},Wr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%201000%201000'%3e%3crect%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3cg%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-99%20362)%20scale(3.4003)'/%3e%3cpath%20d='M0%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(180%20106%20386)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-46%20282)%20scale(3.4003)'/%3e%3cpath%20d='M19%2065h4l5%204v1H14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-3%20240)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(236%20175)%20scale(3.4003)'/%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20139%20600)%20scale(3.4003)'/%3e%3cpath%20d='M184%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20219%20548)%20scale(3.4003)'/%3e%3cpath%20d='M175%2065h4l5%204v1h-14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20262%20505)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(767%20175)%20scale(3.4003)'/%3e%3crect%20width='116.7'%20height='70'%20x='-58.4'%20y='-35'%20rx='31.5'%20ry='31.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20877)%20scale(3.4003)'/%3e%3crect%20width='60'%20height='20'%20x='-30'%20y='-10'%20rx='3'%20ry='3'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='translate(502%20728)%20scale(3.4003)'/%3e%3ccircle%20r='75'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20473)%20scale(3.4003)'/%3e%3crect%20width='129.4'%20height='82.3'%20x='-64.7'%20y='-41.1'%20rx='37'%20ry='37'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23fff;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3crect%20width='108'%20height='68.6'%20x='-54'%20y='-34.3'%20rx='30.9'%20ry='30.9'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(415%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(591%20464)%20scale(3.4003)'/%3e%3crect%20width='96'%20height='53.2'%20x='-48'%20y='-26.6'%20rx='23.9'%20ry='23.9'%20style='stroke:%23162334;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(503%20875)%20scale(3.4003)'/%3e%3cpath%20stroke-linecap='round'%20d='m68%20215%207-15M81%20222l-7-22M81%20222l7-14M101%20208H87M114%20219l-7-24M113%20219l13-22M131%20214l-5-17M148%20214h-18M69%20214H51M100%20209l7-15'%20style='stroke:%23a478fc;stroke-width:3;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:10;is-custom-font:none;font-file-url:none;fill:none;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3c/g%3e%3c/svg%3e",Yr=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},ve.createElement("path",{d:"m478 113-13 2-4 1h4l14-2c10-2 35-2 42-1l6 3 3 1c3 0-4-3-8-5-7-1-34-1-44 1m56 6 8 6c7 5 20 17 20 19s7 12 8 12l-3-6-4-6c0-3-15-17-25-24-5-3-8-4-4-1m-198 16-9 1a512 512 0 0 1 9-1m-180 30a412 412 0 0 0-23 4 167 167 0 0 0-32 8 439 439 0 0 1 46-9 304 304 0 0 1 11-2l6-1h-8m369 8 4 3-7-6c-1 0 0 2 3 3m-439 9c-7 3-18 13-18 15l6-5c5-5 9-8 14-10l6-4-8 4m442 12-10 11-7 6 7-6c7-5 14-14 13-16l-3 5M65 205l-1 11c0 9 0 10 4 17 5 10 7 12 22 11 10 0 15 0 38-5l5-1-6 1-16 2-21 2c-13 1-16-1-21-10-3-5-4-6-4-15l1-12c1-4 1-5-1-1m335 1c3 0 3 1 3 3l-2 6c-2 5-35 39-76 80-53 51-120 117-138 137-21 24-22 25-22 27 0 3 6 9 9 9 4 0 14-8 38-27a5073 5073 0 0 1 15-16 1421 1421 0 0 0-17 15l-31 25-6 2-4-3c-3-3-3-4-2-6 3-8 79-85 160-163 57-57 79-80 79-86 0-2-3-4-7-4-2 0-2 0 1 1m165 18c-9 17-25 32-57 53l-10 8 16-11 12-8c15-10 27-22 39-39 5-7 6-8 4-8l-4 5m-221 2a199 199 0 0 0-19 10 183 183 0 0 1 27-12c0-1-1-1-8 2m-34 16c-3 3-2 3 2 0l1-2-3 2m151 3-1 2 2-2c3-3 2-3-1 0m-16 12-11 10a281 281 0 0 0 11-10m-24 18-7 5-7 5-42 31c-10 7-24 19-22 19l7-6 16-12a343 343 0 0 0 35-25 573 573 0 0 0 20-17m-187 0-2 2 4-2 3-2-5 2m-14 6-3 2 4-1 4-3-5 2m-7 3-8 4-18 8 18-7 7-3 3-1c1-2 0-2-2-1m254 24a2672 2672 0 0 1-71 54 601 601 0 0 0 39-29 1352 1352 0 0 1 32-25m-291-8-2 2 4-2 3-2-5 2m-13 5-2 2h3c5-3 4-4-1-2m-19 9-7 3-13 6c-10 5-13 7-14 10-3 4-2 5 1 0 2-3 5-5 14-9l13-6 12-6-6 2m178 36c-17 12-21 16-21 17a390 390 0 0 1 20-17m-206 34 1 4 1 3 1 5 2 8 1 5v-6l-1-8-2-5-1-4-1-2c-1-2-1-2-1 0m222 23-9 7a683 683 0 0 0-56 44 261 261 0 0 0-26 20 1345 1345 0 0 0-46 34c-6 3-7 3-19 3-11 0-12 0-18-3-8-4-10-8-17-20l-5-10 4 10c5 10 12 18 19 22 4 2 6 2 17 2 13 0 14 0 21-3l26-19 42-33a2183 2183 0 0 0 43-34 643 643 0 0 1 24-20",fill:"#fff",fillRule:"evenodd"}),ve.createElement("path",{d:"M478 114a620 620 0 0 1-39 6l-21 3a5481 5481 0 0 0-19 3 870 870 0 0 1-54 8l-1 1-6 1-12 2-13 2a992 992 0 0 0-76 12 400 400 0 0 1-45 8l-6 1-5 1h-3l-3 1-2 1-26 4-13 2-17 3c-23 5-33 9-43 19-7 8-9 13-9 27 0 8 1 9 4 14 5 9 8 11 21 10l21-2a1133 1133 0 0 1 23-4 659 659 0 0 0 74-14l3-1h3l3-1h3l2-1 2-1h3l2-1h2l24-5 38-7a2100 2100 0 0 1 93-18l3-1 10-1a2082 2082 0 0 1 120-17l2 1c2 0 8 5 8 7l1 2 1 6c0 4 0 6-3 10-2 4-16 16-18 16l-7 5-10 8a1070 1070 0 0 0-11 7 113 113 0 0 1-20 14l-2 2-3 2-2 2h-1a154 154 0 0 1-28 21l-5 4-5 4a573 573 0 0 1-50 37 175 175 0 0 0-24 18l-1 2-2 1-2 1-2 1-1 1-12 10a396 396 0 0 0-32 25l-8 6-6 5-9 7a326 326 0 0 1-25 20l-13 12a5073 5073 0 0 0-17 15c-24 20-34 27-39 27-2 0-8-6-8-9 0-2 1-3 22-27 18-20 85-86 138-137 41-41 74-75 76-80l2-6c0-2 0-3-2-3l-7 1a233 233 0 0 1-26 9l-1 1-1 1h-1l-1 1h-2l-3 2-1 1h-2l-3 2h-1l-5 2-22 10-9 4-4 2-5 2-10 4-2 1-2 1-2 1-13 6a334 334 0 0 1-38 17 75 75 0 0 0-14 6l-5 2-4 1-2 1-3 2-7 3-16 6a247 247 0 0 0-32 14l-1 1h-2l-1 1h-2l-1 1-12 6a103 103 0 0 0-27 15l-2 5-1 1v11l1 5 1 5 1 4c0 3 0 4 2 4v3l1 3 1 2 2 10 1 4 1 5 2 10 2 8 1 4 1 4c3 3 9 25 11 38l1 7v2l1 4v1l1 1v2l1 2 1 3v1l5 10c7 13 9 16 17 20 6 3 7 3 18 3 12 0 13 0 19-3 8-4 11-6 26-18a1345 1345 0 0 1 85-67 683 683 0 0 1 50-39l12-9a513 513 0 0 1 44-33 201 201 0 0 0 22-17 2270 2270 0 0 0 73-54 158 158 0 0 0 58-59c2 0 3-9 4-27l-1-19-1-4-1-6-1-3-4-6-4-6c0-2-6-8-13-14a77 77 0 0 0-28-18c-6-1-34-1-43 1"}))),Vr=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M765-321q0 117-84 196-83 80-200 80-118 0-200-80t-83-196v-392q0-85 61-144 61-58 146-58 86 0 147 58 61 59 61 144v374q0 54-39 92-39 37-93 37-55 0-93-37-38-38-38-92v-372h110v372q0 9 6 14t15 5q8 0 15-5t7-14v-374q0-39-29-66t-68-27q-40 0-69 27t-29 66v392q0 71 51 119t122 48q71 0 122-48t51-119v-426h111v426Z"}))),wi=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M125-165v-113h77v-273q0-93 55-167 56-75 146-100v-19q0-32 22-55 23-23 55-23t55 23q22 23 22 55v19q90 25 146 99 56 73 56 168v273h77v113H125ZM480-32q-38 0-66-27-27-27-27-66h186q0 39-27 66t-66 27Z"}))),bi=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M137-190v-113h78v-253q0-41 11-79 11-39 35-71l-9 150h10L17-802l74-74L873-92l-74 74-175-172H137Zm609-149L319-769q20-15 41-25t44-16v-28q0-32 22-54t54-22q32 0 55 22t22 54v28q85 23 137 94t52 160v217ZM481-47q-38 0-65-27t-27-65h184q0 38-27 65t-65 27Z"}))),Ei=f.forwardRef((e,t)=>ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},ve.createElement("g",{strokeLinecap:"round",strokeWidth:10},ve.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),Ci=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),Pi=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M480-372q-61 0-105-43-43-43-43-105v-240q0-61 43-105 43-43 105-43 61 0 105 43 43 44 43 105v240q0 62-43 105t-105 43ZM425-76v-122q-121-16-197-108t-76-214h109q0 91 64 154t155 63q91 0 155-63t64-154h109q0 122-77 214T534-198v122H425Z"}))),Si=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"m763-343-80-79q8-20 13-44 5-23 5-54h109q0 49-11 95t-36 82ZM625-482 336-770v-2q3-56 45-96t101-40q62 0 105 43t43 105v249l-1 17q-1 7-4 12ZM427-76v-122q-120-16-196-108-77-92-77-214h109q0 91 64 154t155 63q43 0 80-14 37-15 67-41l78 79q-35 32-78 53t-93 28v122H427Zm362 27L41-796l75-75 748 748-75 74Z"}))),Kr=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M625-511q29 0 50-21t20-50q0-29-20-50-21-20-50-20t-50 20-20 50q0 29 20 50 21 21 50 21Zm-290 0q29 0 50-21t20-49q0-30-20-50t-50-21q-29 0-50 20-20 21-20 50 0 30 20 50 21 21 50 21Zm145 268q75 0 137-43t85-115H258q24 72 85 115 62 43 137 43Zm0 198q-90 0-170-34-79-34-138-93T79-310q-34-80-34-170t34-170q34-79 93-138t138-93q80-34 170-34t170 34q79 34 138 93t93 138q34 80 34 170t-34 170q-34 79-93 138T650-79q-80 34-170 34Zm0-435Zm0 322q134 0 228-94t94-228q0-134-94-228t-228-94q-134 0-228 94t-94 228q0 134 94 228t228 94Z"}))),ki=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M553-64v-108q107-27 173-113 67-87 67-197 0-109-67-195T553-789v-108q152 26 249 144 97 117 97 271 0 155-97 273T553-64ZM61-335v-290h176l236-237v764L237-335H61Zm492 28v-346q51 23 82 70t31 103-31 103q-31 47-82 70Z"}))),Di=f.forwardRef((e,t)=>ve.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ve.createElement("path",{d:"M807-15 700-123q-33 21-71 37-38 15-80 22v-108q20-4 38-12l35-17-153-154v257L234-335H57v-290h144L10-818l74-75L882-90l-75 75Zm37-264-80-79q13-30 19-60 7-31 7-64 0-109-68-195-67-86-173-112v-108q152 26 249 144 98 117 98 271 0 55-14 107-13 51-38 96ZM661-462 549-575v-78q51 23 83 70 31 47 31 103l-1 9-1 9ZM469-655 366-759l103-103v207Z"}))),Xr={general:{primaryColor:"#42b0c5",secondaryColor:"#491d8d",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",showHeader:!0,showFooter:!0,showInputRow:!0,actionDisabledIcon:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2042%2042'%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:4'%20d='M17%209a8%208%200%200%201-8%208%208%208%200%200%201-8-8%208%208%200%200%201%208-8%208%208%200%200%201%208%208Zm0%200'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:10'%20d='M14.66%2014.66%203.34%203.34'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3c/svg%3e",embedded:!1,flowStartTrigger:"ON_LOAD"},tooltip:{mode:"CLOSE",text:"Talk to me! ๐"},chatButton:{icon:Yr},header:{title:P.jsx("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/","_blank","noopener,noreferrer"),children:"Tan Jin"}),showAvatar:!0,avatar:Wr,buttons:[we.NOTIFICATION_BUTTON,we.AUDIO_BUTTON,we.CLOSE_CHAT_BUTTON],closeChatIcon:Ei},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:wi,iconDisabled:bi,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAA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00A+/8yAPv//f/8/83/+v+w/+T/sf/j/9b/AQACACoAIgAtAEIAHwBPAAEAQADe/xcA0v/k/+X/t/8IAKv/IgC//yEA6/8EACMA9/9PAPf/VAD+/zcA+/8JAPn/1P8AALf/6f+w/+P/zf////j/HAAdAC0APgAfAEsABwBCAOP/IADV/+//2v/B//3/rP8PALv/GADd/xEAFgABAEMABABaAP//QgACABcA+//n/wAAwP/w/67/4v+///3/6f8WABcAKQA0ACIARgAQAEcA8f8pANn/9f/U/87/7f+v/wgAtP8RANP/FgANAAIAOQACAFQA/f9HAAAAIAABAO3//P/E/wEAs//q/7n/9P/i/wYAEQAZADEAJABBABMASAAAADEA3/8CANL/1v/g/7H/AACy/w8Axf8ZAPv/CQAzAAIAVQD//1AAAAAsAAIA9v/7/8r/AwC2//P/tf/m/+H/AwADABEAKQApADoAHgBHAAgAPADr/wkA1//f/93/vP/6/7L/CgDA/x4A7/8hACkAAgBPAPz/UgD1/zIABAAEAPz/0v/5/7f/AACy//H/2f/+/wEAAAAkABUAMwAdADoAEQA9APD/EADU//L/1P/H/+z/tf8LALv/HADk/ygAGgADAEMA//9TAPn/QAAAABAAAQDc//z/wf8DALD/7P/Q//z/9/8HABoAFgA3ACMAMAAOADwA+P8ZANv/+P/Y/9H/5v+8/wUAu/8WANf/HgAMAAoAPQABAFMA/f9HAP7/HwAEAN//+v/H/wMAs//2/8r/8//y/wMADgAQAC4AIwAyABMAJwD8/xcA3v8LANP/5v/f/8j/AgC4/w4A1P8eAAQACgAxAAEAUgD+/0gA/v8nAAIA8f/5/8r/BAC6/+3/wP/l/+b/AQAIABkAIwArAC4AIAAoAAkAGADj/w0A0f/r/9//0P8DAL3/CgDN/xkA//8IACUAAgBJAAAATwD+/ysAAQD7//3/z/8DAMT/+f/K/+L/5P/1////EgAcACYALgApAC4ACwAcAPL/EADZ//L/1f/U//f/uv8KAMX/DwDu/wcAHwADAEUABgBNAAEANQAAAAYAAQDf////xf/+/9P/4f/b//X/9v8LAA4AGAAl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/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:ki,iconDisabled:Di},chatHistory:{disabled:!1,maxEntries:30,storageKey:"rcb-history",storageType:"LOCAL_STORAGE",viewChatHistoryButtonText:"Load Chat History โณ",chatHistoryLineBreakText:"----- Previous Chat History -----",autoLoad:!1},chatInput:{disabled:!1,allowNewline:!1,enabledPlaceholderText:"Type your message...",disabledPlaceholderText:"",showCharacterCount:!1,characterLimit:-1,botDelay:1e3,sendButtonIcon:Ci,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[we.VOICE_MESSAGE_BUTTON,we.SEND_MESSAGE_BUTTON]},chatWindow:{showScrollbar:!1,showTypingIndicator:!0,autoJumpToBottom:!1,showMessagePrompt:!0,messagePromptText:"New Messages โ",messagePromptOffset:30,defaultOpen:!1},sensitiveInput:{maskInTextArea:!0,maskInUserBubble:!0,asterisksCount:10,hideInUserBubble:!1},userBubble:{animate:!0,showAvatar:!1,avatar:"data:image/svg+xml,%3csvg%20width='140'%20height='140'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cy='60.044'%20cx='70'%20fill='%235c5c5c'%20r='29'/%3e%3cpath%20d='m16.36%20156.186-.01-30.5c-.005-16.844%2024.168-30.507%2053.991-30.516%2029.823-.009%2054.004%2013.64%2054.01%2030.484l.008%2030.5-108%20.032z'%20fill='%235c5c5c'/%3e%3c/svg%3e",simulateStream:!1,streamSpeed:30},botBubble:{animate:!0,showAvatar:!1,avatar:Wr,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:Pi,iconDisabled:Si},footer:{text:P.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[P.jsx("span",{children:"Powered By "},0),P.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:P.jsx(Yr,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),P.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[we.FILE_ATTACHMENT_BUTTON,we.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:Vr,iconDisabled:Vr,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Kr,iconDisabled:Kr,list:["๐","๐","๐","๐
","๐","๐","๐","๐","๐คฃ","๐","๐ฅฐ","๐ฅณ","๐","๐","๐","โญ๏ธ"]},toast:{maxCount:3,forbidOnMax:!1,dismissOnClick:!0},event:{rcbPreInjectMessage:!1,rcbPostInjectMessage:!1,rcbStartSimulateStreamMessage:!1,rcbStopSimulateStreamMessage:!1,rcbStartStreamMessage:!1,rcbChunkStreamMessage:!1,rcbStopStreamMessage:!1,rcbRemoveMessage:!1,rcbSaveChatHistory:!1,rcbLoadChatHistory:!1,rcbToggleChatWindow:!1,rcbStartSpeakAudio:!1,rcbToggleAudio:!1,rcbToggleNotifications:!1,rcbToggleVoice:!1,rcbChangePath:!1,rcbShowToast:!1,rcbDismissToast:!1,rcbUserSubmitText:!1,rcbUserUploadFile:!1,rcbTextAreaChangeValue:!1,rcbPreLoadChatBot:!1,rcbPostLoadChatBot:!1,rcbPreProcessBlock:!1,rcbPostProcessBlock:!1},ariaLabel:{chatButton:"open chat",audioButton:"toggle audio",closeChatButton:"close chat",emojiButton:"emoji picker",fileAttachmentButton:"upload file",notificationButton:"toggle notifications",sendButton:"send message",voiceButton:"toggle voice",inputTextArea:"input text area"},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!0}},Jr=f.createContext({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),te=()=>f.useContext(Jr),Bi=({children:e,settings:t=Xr,setSyncedSettings:r,syncedSettingsRef:n})=>P.jsx(Jr.Provider,{value:{settings:t,setSyncedSettings:r,syncedSettingsRef:n},children:e}),Zr={tooltipStyle:{},notificationBadgeStyle:{},chatWindowStyle:{},headerStyle:{},bodyStyle:{},chatInputContainerStyle:{},chatInputAreaStyle:{},chatInputAreaFocusedStyle:{},chatInputAreaDisabledStyle:{},userBubbleStyle:{},botBubbleStyle:{},botOptionStyle:{},botOptionHoveredStyle:{},botCheckboxRowStyle:{},botCheckboxNextStyle:{},botCheckMarkStyle:{},botCheckMarkSelectedStyle:{},characterLimitStyle:{},characterLimitReachedStyle:{},chatHistoryLineBreakStyle:{},chatMessagePromptStyle:{},chatMessagePromptHoveredStyle:{},footerStyle:{},loadingSpinnerStyle:{},mediaDisplayContainerStyle:{},chatButtonStyle:{},chatButtonHoveredStyle:{},chatHistoryButtonStyle:{},chatHistoryButtonHoveredStyle:{},sendButtonStyle:{},sendButtonHoveredStyle:{},sendButtonDisabledStyle:{},audioButtonStyle:{},audioButtonDisabledStyle:{},closeChatButtonStyle:{},emojiButtonStyle:{},emojiButtonDisabledStyle:{},fileAttachmentButtonStyle:{},fileAttachmentButtonDisabledStyle:{},notificationButtonStyle:{},notificationButtonDisabledStyle:{},voiceButtonStyle:{},voiceButtonDisabledStyle:{},chatIconStyle:{},audioIconStyle:{},audioIconDisabledStyle:{},closeChatIconStyle:{},emojiIconStyle:{},emojiIconDisabledStyle:{},fileAttachmentIconStyle:{},fileAttachmentIconDisabledStyle:{},notificationIconStyle:{},notificationIconDisabledStyle:{},voiceIconStyle:{},voiceIconDisabledStyle:{},sendIconStyle:{},sendIconDisabledStyle:{},sendIconHoveredStyle:{},rcbTypingIndicatorContainerStyle:{},rcbTypingIndicatorDotStyle:{},toastPromptContainerStyle:{},toastPromptStyle:{},toastPromptHoveredStyle:{}},$r=f.createContext({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),ue=()=>f.useContext($r),xi=({children:e,styles:t=Zr,setSyncedStyles:r,syncedStylesRef:n})=>P.jsx($r.Provider,{value:{styles:t,setSyncedStyles:r,syncedStylesRef:n},children:e}),Ii=({buttons:e})=>{var t,r,n,o,A,a,s;const{settings:i}=te(),{styles:l}=ue(),c={backgroundImage:`linear-gradient(to right, ${(t=i.general)==null?void 0:t.secondaryColor},
|
|
2
|
-
${(r=i.general)==null?void 0:r.primaryColor})`,...l.headerStyle};return P.jsxs("div",{style:c,className:"rcb-chat-header-container",children:[P.jsxs("div",{className:"rcb-chat-header",children:[((n=i.header)==null?void 0:n.showAvatar)&&P.jsx("div",{style:{backgroundImage:`url("${(o=i.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),f.isValidElement((A=i.header)==null?void 0:A.title)?(a=i.header)==null?void 0:a.title:P.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(s=i.header)==null?void 0:s.title})]}),P.jsx("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((d,u)=>P.jsx(f.Fragment,{children:d},u))})]})},eo=f.createContext({}),Ce=()=>f.useContext(eo),Ti=({children:e,botIdRef:t,flowRef:r})=>{const n=f.useRef(null),o=f.useRef(""),A=f.useRef(null),a=f.useRef(new Map),s=f.useRef(null),i=f.useRef(""),l=f.useRef(!1),c=f.useRef(null),d=f.useRef(null),u=f.useRef(null);return P.jsx(eo.Provider,{value:{botIdRef:t,flowRef:r,inputRef:n,timeoutIdRef:A,streamMessageMap:a,chatBodyRef:s,paramsInputRef:i,keepVoiceOnRef:l,audioContextRef:c,audioBufferRef:d,gainNodeRef:u,prevInputRef:o},children:e})},je=e=>{const[t,r]=f.useState(e),n=f.useRef(e);return[t,o=>{const A=typeof o=="function"?o(n.current):o;n.current=A,r(A)},n]},to=f.createContext({}),ke=()=>f.useContext(to),Qi=({children:e,settings:t})=>{var r,n,o,A,a,s;const[i,l,c]=je(!1),[d,u,p]=je(((r=t==null?void 0:t.chatWindow)==null?void 0:r.defaultOpen)??!1),[g,v,h]=je(((n=t==null?void 0:t.audio)==null?void 0:n.defaultToggledOn)??!1),[w,E,m]=je(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[C,k,S]=je(((A=t==null?void 0:t.notification)==null?void 0:A.defaultToggledOn)??!0),[D,I]=f.useState(!1),[Q,x]=f.useState(!1),[O,B,_]=je(!1),[U,N,F]=je(!0),[M,L,y]=je(!1),[V,b]=f.useState(!1),[R,K]=f.useState(!1),[Y,$]=f.useState(0),[de,oe]=f.useState(0),[He,Se]=f.useState(!1),[xe,Je]=f.useState(((a=window.visualViewport)==null?void 0:a.height)??window.innerHeight),[j,G]=f.useState(((s=window.visualViewport)==null?void 0:s.width)??window.innerWidth);return P.jsx(to.Provider,{value:{isBotTyping:i,setSyncedIsBotTyping:l,syncedIsBotTypingRef:c,isChatWindowOpen:d,setSyncedIsChatWindowOpen:u,syncedIsChatWindowOpenRef:p,audioToggledOn:g,setSyncedAudioToggledOn:v,syncedAudioToggledOnRef:h,voiceToggledOn:w,setSyncedVoiceToggledOn:E,syncedVoiceToggledOnRef:m,notificationsToggledOn:C,setSyncedNotificationsToggledOn:k,syncedNotificationsToggledOnRef:S,isLoadingChatHistory:D,setIsLoadingChatHistory:I,hasChatHistoryLoaded:Q,setHasChatHistoryLoaded:x,isScrolling:O,setSyncedIsScrolling:B,syncedIsScrollingRef:_,textAreaDisabled:U,setSyncedTextAreaDisabled:N,syncedTextAreaDisabledRef:F,textAreaSensitiveMode:M,setSyncedTextAreaSensitiveMode:L,syncedTextAreaSensitiveModeRef:y,hasInteractedPage:V,setHasInteractedPage:b,hasFlowStarted:R,setHasFlowStarted:K,unreadCount:Y,setUnreadCount:$,inputLength:de,setInputLength:oe,blockAllowsAttachment:He,setBlockAllowsAttachment:Se,viewportHeight:xe,setViewportHeight:Je,viewportWidth:j,setViewportWidth:G},children:e})};var z=(e=>(e.START_SPEAK_AUDIO="rcb-start-speak-audio",e.TOGGLE_AUDIO="rcb-toggle-audio",e.TOGGLE_NOTIFICATIONS="rcb-toggle-notifications",e.TOGGLE_VOICE="rcb-toggle-voice",e.TOGGLE_CHAT_WINDOW="rcb-toggle-chat-window",e.PRE_INJECT_MESSAGE="rcb-pre-inject-message",e.POST_INJECT_MESSAGE="rcb-post-inject-message",e.START_SIMULATE_STREAM_MESSAGE="rcb-start-simulate-stream-message",e.STOP_SIMULATE_STREAM_MESSAGE="rcb-stop-simulate-stream-message",e.START_STREAM_MESSAGE="rcb-start-stream-message",e.CHUNK_STREAM_MESSAGE="rcb-chunk-stream-message",e.STOP_STREAM_MESSAGE="rcb-stop-stream-message",e.REMOVE_MESSAGE="rcb-remove-message",e.SAVE_CHAT_HISTORY="rcb-save-chat-history",e.LOAD_CHAT_HISTORY="rcb-load-chat-history",e.CHANGE_PATH="rcb-change-path",e.SHOW_TOAST="rcb-show-toast",e.DISMISS_TOAST="rcb-dismiss-toast",e.USER_SUBMIT_TEXT="rcb-user-submit-text",e.USER_UPLOAD_FILE="rcb-user-upload-file",e.TEXT_AREA_CHANGE_VALUE="rcb-text-area-change-value",e.PRE_LOAD_CHATBOT="rcb-pre-load-chatbot",e.POST_LOAD_CHATBOT="rcb-post-load-chatbot",e.PRE_PROCESS_BLOCK="rcb-pre-process-block",e.POST_PROCESS_BLOCK="rcb-post-process-block",e))(z||{});const Mi={[z.START_SPEAK_AUDIO]:!0,[z.TOGGLE_AUDIO]:!0,[z.TOGGLE_VOICE]:!0,[z.TOGGLE_NOTIFICATIONS]:!0,[z.TOGGLE_CHAT_WINDOW]:!0,[z.PRE_INJECT_MESSAGE]:!0,[z.POST_INJECT_MESSAGE]:!1,[z.PRE_LOAD_CHATBOT]:!0,[z.POST_LOAD_CHATBOT]:!1,[z.START_SIMULATE_STREAM_MESSAGE]:!0,[z.STOP_SIMULATE_STREAM_MESSAGE]:!1,[z.START_STREAM_MESSAGE]:!0,[z.CHUNK_STREAM_MESSAGE]:!0,[z.STOP_STREAM_MESSAGE]:!0,[z.REMOVE_MESSAGE]:!0,[z.SAVE_CHAT_HISTORY]:!0,[z.LOAD_CHAT_HISTORY]:!0,[z.CHANGE_PATH]:!0,[z.SHOW_TOAST]:!0,[z.DISMISS_TOAST]:!0,[z.USER_SUBMIT_TEXT]:!0,[z.USER_UPLOAD_FILE]:!0,[z.TEXT_AREA_CHANGE_VALUE]:!0,[z.PRE_PROCESS_BLOCK]:!0,[z.POST_PROCESS_BLOCK]:!0},zn=async(e,t,r)=>{const n=new CustomEvent(e,{detail:t,cancelable:Mi[e]});return n.data=r,n.promises=[],window.dispatchEvent(n),await Promise.all(n.promises),n},no=f.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),Vt=()=>f.useContext(no),_i=({children:e})=>{const[t,r,n]=je([]);return P.jsx(no.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:n},children:e})},Ze=()=>{const{botIdRef:e}=Ce(),{syncedPathsRef:t}=Vt(),r=f.useCallback(()=>t.current.length>0?t.current.at(-1)??null:null,[]),n=f.useCallback(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:f.useCallback(async(o,A)=>{const a={botId:e.current,currPath:r(),prevPath:n()};return await zn(o,a,A)},[e])}},Ge=()=>{const{settings:e}=te(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,viewportHeight:n,setViewportHeight:o,viewportWidth:A,setViewportWidth:a,setUnreadCount:s,setSyncedIsBotTyping:i,setSyncedIsScrolling:l,syncedIsBotTypingRef:c,syncedIsChatWindowOpenRef:d}=ke(),{chatBodyRef:u}=Ce(),{dispatchRcbEvent:p}=Ze(),g=f.useCallback(()=>{if(!u.current)return!1;const m=u.current.getBoundingClientRect(),C=window.innerHeight??document.documentElement.clientHeight,k=window.innerWidth??document.documentElement.clientWidth;return m.top>=0&&m.left>=0&&m.bottom<=C&&m.right<=k},[u]),v=f.useCallback(async m=>{var C;m!==d.current&&((C=e.event)!=null&&C.rcbToggleChatWindow&&(await p(z.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||r(k=>(k||s(0),!k)))},[d]),h=f.useCallback(async m=>{m!==c.current&&i(C=>!C)},[c]),w=f.useCallback((m,C,k,S)=>(m/=S/2)<1?k/2*m*m+C:-k/2*(--m*(m-2)-1)+C,[]),E=f.useCallback((m=0)=>{if(!u.current)return;const C=u.current.scrollHeight-u.current.clientHeight;if(m<=0)return u.current.scrollTop=C,void l(!1);const k=u.current.scrollTop,S=C-k;let D=0;const I=()=>{if(!u.current)return;D+=20;const Q=w(D,k,S,m);u.current.scrollTop=Q,D<m?requestAnimationFrame(I):l(!1)};I()},[u]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,toggleChatWindow:v,viewportHeight:n,setViewportHeight:o,viewportWidth:A,setViewportWidth:a,toggleIsBotTyping:h,scrollToBottom:E,getIsChatBotVisible:g}},Oi=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),{unreadCount:A,isScrolling:a}=ke(),{chatBodyRef:s}=Ce(),{scrollToBottom:i}=Ge(),[l,c]=f.useState(!1),d={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return P.jsx("div",{className:"rcb-message-prompt-container "+(s.current&&((u=n.chatWindow)!=null&&u.showMessagePrompt)&&a&&A>0?"visible":"hidden"),children:P.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?d:{...o.chatMessagePromptStyle},onMouseDown:p=>{p.preventDefault(),i(600)},className:"rcb-message-prompt-text",children:(r=n.chatWindow)==null?void 0:r.messagePromptText})});var u},ro=f.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),jn=()=>f.useContext(ro),Ni=({children:e})=>{const[t,r,n]=je([]);return P.jsx(ro.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:n},children:e})},Li=({message:e,isNewSender:t})=>{var r,n,o,A,a,s;const{settings:i}=te(),{styles:l}=ue(),c=typeof e.content=="string",d=e.content,u=e.contentWrapper?P.jsx(e.contentWrapper,{children:d}):d,p={backgroundColor:(r=i.general)==null?void 0:r.primaryColor,color:"#fff",maxWidth:(n=i.userBubble)!=null&&n.showAvatar?"65%":"70%",...l.userBubbleStyle},g=(o=i.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",v=((A=i.userBubble)==null?void 0:A.showAvatar)&&t,h="rcb-user-message"+(!t&&(a=i.userBubble)!=null&&a.showAvatar?" rcb-user-message-offset":"");return P.jsxs("div",{className:"rcb-user-message-container",children:[c?P.jsx("div",{style:p,className:`${h} ${g}`,children:u}):P.jsx(P.Fragment,{children:u}),v&&P.jsx("div",{style:{backgroundImage:`url("${(s=i.userBubble)==null?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},Hi=({message:e,isNewSender:t})=>{var r,n,o,A,a,s;const{settings:i}=te(),{styles:l}=ue(),c=typeof e.content=="string",d=e.content,u=e.contentWrapper?P.jsx(e.contentWrapper,{children:d}):d,p={backgroundColor:(r=i.general)==null?void 0:r.secondaryColor,color:"#fff",maxWidth:(n=i.botBubble)!=null&&n.showAvatar?"65%":"70%",...l.botBubbleStyle},g=(o=i.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",v=((A=i.botBubble)==null?void 0:A.showAvatar)&&t,h="rcb-bot-message"+(!t&&(a=i.botBubble)!=null&&a.showAvatar?" rcb-bot-message-offset":"");return P.jsxs("div",{className:"rcb-bot-message-container",children:[v&&P.jsx("div",{style:{backgroundImage:`url("${(s=i.botBubble)==null?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),c?P.jsx("div",{style:p,className:`${h} ${g}`,children:u}):P.jsx(P.Fragment,{children:u})]})},Ui=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),A=(e=n.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return P.jsxs("div",{className:"rcb-bot-message-container",children:[((t=n.botBubble)==null?void 0:t.showAvatar)&&P.jsx("div",{style:{backgroundImage:`url("${(r=n.botBubble)==null?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),P.jsx("div",{onMouseDown:a=>{a.preventDefault()},className:`rcb-bot-message ${A}`,children:P.jsxs("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[P.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),P.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),P.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},Fi=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),{messages:A}=jn(),{scrollToBottom:a}=Ge(),{isBotTyping:s,syncedIsScrollingRef:i}=ke(),{chatBodyRef:l}=Ce(),c={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=n.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return f.useEffect(()=>{i.current||a()},[(t=l.current)==null?void 0:t.scrollHeight]),P.jsxs("div",{style:c,className:"rcb-chat-body-container",ref:l,children:[A.map((d,u)=>{const p=(g=>g===0||A[g].sender!==A[g-1].sender)(u);return d.sender.toUpperCase()==="USER"?P.jsx(Li,{message:d,isNewSender:p},u):d.sender.toUpperCase()==="BOT"?P.jsx(Hi,{message:d,isNewSender:p},u):P.jsx("div",{children:d.content},u)}),s&&((r=n.chatWindow)==null?void 0:r.showTypingIndicator)&&P.jsx(Ui,{}),P.jsx(Oi,{})]})},Ri=({checkboxes:e,checkedItems:t,path:r})=>{var n,o,A,a,s,i,l,c,d,u,p;const{settings:g}=te(),{styles:v}=ue(),{paths:h}=Vt(),{handleSubmitText:w}=Qt(),[E,m]=f.useState(new Set),[C,k]=f.useState(!1),S={cursor:C?`url("${(n=g.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(o=g.general)==null?void 0:o.primaryColor,borderColor:(A=g.general)==null?void 0:A.primaryColor,...v.botCheckboxRowStyle},D={cursor:C||E.size<e.min?`url("${(a=g.general)==null?void 0:a.actionDisabledIcon}"), auto`:"pointer",color:(s=g.general)==null?void 0:s.primaryColor,borderColor:(i=g.general)==null?void 0:i.primaryColor,...v.botCheckboxNextStyle},I={cursor:C?`url("${(l=g.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...v.botCheckMarkStyle},Q={cursor:C?`url("${(c=g.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(d=g.general)==null?void 0:d.primaryColor,backgroundColor:(u=g.general)==null?void 0:u.primaryColor,...v.botCheckMarkSelectedStyle};return f.useEffect(()=>{h.length>0&&h[h.length-1]!==r&&k(!e.reusable)},[h]),P.jsxs("div",{className:"rcb-checkbox-container "+((p=g.botBubble)!=null&&p.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(x=>P.jsx("div",{onMouseDown:O=>{O.preventDefault(),(B=>{C||m(_=>{const U=new Set(_);if(U.has(B))t.delete(B),U.delete(B);else{if(E.size==e.max)return _;t.add(B),U.add(B)}return U})})(x)},style:S,className:"rcb-checkbox-row-container",children:P.jsxs("div",{className:"rcb-checkbox-row",children:[P.jsx("div",{style:E.has(x)?Q:I,className:"rcb-checkbox-mark"}),P.jsx("div",{className:"rcb-checkbox-label",children:x})]})},x)),P.jsx("div",{style:D,className:"rcb-checkbox-next-button",onMouseDown:x=>{var O;if(x.preventDefault(),C||E.size<e.min)return;const B=Array.from(t).join(", ");let _;k(!e.reusable),_=e.sendOutput!=null?e.sendOutput:((O=g.chatInput)==null?void 0:O.sendCheckboxOutput)??!0,w(B,_)}})]})},zi=async(e,t)=>{const r=e.checkboxes;if(!r)return;let n;if(typeof r=="function"?(n=r(t),n instanceof Promise&&(n=await n)):n=r,Array.isArray(n)&&(n={items:n}),!("items"in n)||n.items.length==0)return;n.min==null&&(n.min=1),n.max==null&&(n.max=n.items.length),n.min>n.max&&(n.min=n.max),n.reusable==null&&(n.reusable=!1);const o=new Set,A=t.currPath,a=P.jsx(Ri,{checkboxes:n,checkedItems:o,path:A});await t.injectMessage(a)},ji=async(e,t)=>{const r=e.function;if(!r)return;const n=r(t);return n instanceof Promise?await n:n},Gi=async(e,t,r)=>{const n=e.message;if(!n)return;if(typeof n=="string")return void(n.trim()!==""&&(r?await t.simulateStreamMessage(n):await t.injectMessage(n)));let o=n(t);o instanceof Promise&&(o=await o),typeof o=="string"&&o.trim()!==""&&(r?await t.simulateStreamMessage(o):await t.injectMessage(o))},qi=({options:e,path:t})=>{var r,n,o,A,a,s;const{settings:i}=te(),{styles:l}=ue(),{paths:c}=Vt(),{handleSubmitText:d}=Qt(),[u,p]=f.useState([]),[g,v]=f.useState(!1),h={cursor:g?`url("${(r=i.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(n=i.general)==null?void 0:n.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...l.botOptionStyle},w={color:"#fff",borderColor:(A=i.general)==null?void 0:A.primaryColor,backgroundColor:(a=i.general)==null?void 0:a.primaryColor,...l.botOptionHoveredStyle};return f.useEffect(()=>{c.length>0&&c[c.length-1]!==t&&v(!e.reusable)},[c]),P.jsx("div",{className:"rcb-options-container "+((s=i.botBubble)!=null&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((E,m)=>{const C=u[m]&&!g;return P.jsx("div",{className:"rcb-options",style:C?w:h,onMouseEnter:()=>(k=>{p(S=>{const D=[...S];return D[k]=!0,D})})(m),onMouseLeave:()=>(k=>{p(S=>{const D=[...S];return D[k]=!1,D})})(m),onMouseDown:k=>{var S;if(k.preventDefault(),g)return;let D;v(!e.reusable),D=e.sendOutput!=null?e.sendOutput:((S=i.chatInput)==null?void 0:S.sendOptionOutput)??!0,d(E,D)},children:E},E)})})},Wi=async(e,t)=>{const r=e.options;if(!r)return;let n;if(typeof r=="function"?(n=r(t),n instanceof Promise&&(n=await n)):n=r,Array.isArray(n)&&(n={items:n}),!("items"in n)||n.items.length==0)return;n.reusable==null&&(n.reusable=!1);const o=t.currPath,A=P.jsx(qi,{options:n,path:o});await t.injectMessage(A)},Yi=async(e,t)=>{const r=e.component;if(r){if(typeof r=="function"){let n=r(t);return n instanceof Promise&&(n=await n),n?void await t.injectMessage(n):void 0}await t.injectMessage(r)}},Vi=async(e,t,r,n)=>{const o=e.transition;let A;if(typeof o=="function"?(A=o(t),A instanceof Promise&&(A=await A)):A=o,typeof A=="number"&&(A={duration:A}),!A||A instanceof Promise||A.duration==null||typeof A.duration!="number")return;A.interruptable==null&&(A.interruptable=!1);const a=setTimeout(async()=>{const s=await n(e);s&&await Ao(s,t)},A.duration);A.interruptable&&(r.current=a)},Ki=async(e,t,r)=>{const n=e.chatDisabled;if(n==null)return;let o;typeof n=="function"?(o=n(t),o instanceof Promise&&(o=await o)):o=n,r(o)},oo=async(e,t,r)=>{const n=e.isSensitive;if(!n)return void r(!1);let o;typeof n=="function"?(o=n(t),o instanceof Promise&&(o=await o)):o=n,r(o)},Ao=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const r=Object.keys(e);for(const n of r)n==="function"&&await ji(e,t);r.includes("path")&&await(async(n,o)=>{const A=n.path;if(!A)return!1;if(typeof A=="string")return await o.goToPath(A),!0;let a=A(o);if(a instanceof Promise&&(a=await a),!a)return!1;const s=a;return await o.goToPath(s),!0})(e,t)},Xi=()=>{var e;const{settings:t}=te(),{styles:r}=ue();return P.jsx("div",{className:"rcb-line-break-container",children:P.jsx("div",{style:{...r.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:(e=t.chatHistory)==null?void 0:e.chatHistoryLineBreakText})})},Ji=()=>{var e;const{settings:t}=te(),{styles:r}=ue(),n={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return P.jsx("div",{className:"rcb-spinner-container",children:P.jsx("div",{style:n,className:"rcb-spinner"})})},fn=()=>{try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=crypto.getRandomValues(new Uint8Array(1))[0]%16;return(t==="x"?r:3&r|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},gt=(e,t)=>({id:fn(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let ht,io=!1,pn="rcb-history",gn=30,so=!1,hn=[];const Kt=()=>hn,Gn=e=>{ao(e),hn=e},ao=e=>{ht&&ht.setItem(pn,JSON.stringify(e))},qn=e=>{var t,r,n,o,A;ht=((r=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:r.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,pn=(n=e.chatHistory)==null?void 0:n.storageKey,gn=(o=e.chatHistory)==null?void 0:o.maxEntries,so=(A=e.chatHistory)==null?void 0:A.disabled,hn=(a=>{if(a!=null)try{return JSON.parse(a)}catch{return[]}return[]})(ht.getItem(pn))},Zi=e=>f.isValidElement(e.content)?structuredClone({id:e.id,content:hi.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,lo=(e,t,r)=>{const n=new DOMParser().parseFromString(e,"text/html");return Array.from(n.body.childNodes).map((o,A)=>{var a;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const s=o.tagName.toLowerCase();let i=Array.from(o.attributes).reduce((l,c)=>{const d=c.name.toLowerCase();if(d==="style"){const u=c.value.split(";").filter(g=>g.trim()!==""),p={};u.forEach(g=>{const[v,h]=g.split(":").map(E=>E.trim()),w=v.replace(/-([a-z])/g,(E,m)=>m.toUpperCase());p[w]=h}),l[d]=p}else s!=="audio"&&s!=="video"||d!=="controls"||c.value!==""?l[d]=c.value:l[d]="true";return l},{});if(Object.prototype.hasOwnProperty.call(i,"class")){const l=o.classList;i.className=l.toString(),delete i.class,(a=t.botBubble)!=null&&a.showAvatar&&(i=$i(l,i)),i=es(l,i,t,r),i=ts(l,i,t,r),i=ns(l,i,t,r),i=rs(l,i,t,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(s))return f.createElement(s,{key:A,...i});{const l=lo(o.innerHTML,t,r);return f.createElement(s,{key:A,...i},...l)}}})},$i=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),es=(e,t,r,n)=>{var o,A,a,s,i;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=n.botOptionStyle)==null?void 0:o.color)??((A=r.general)==null?void 0:A.primaryColor),borderColor:((a=n.botOptionStyle)==null?void 0:a.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botOptionStyle}),t},ts=(e,t,r,n)=>{var o,A,a,s,i;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=n.botCheckboxRowStyle)==null?void 0:o.color)??((A=r.general)==null?void 0:A.primaryColor),borderColor:((a=n.botCheckboxRowStyle)==null?void 0:a.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botCheckboxRowStyle}),t},ns=(e,t,r,n)=>{var o,A,a,s,i;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=n.botCheckboxNextStyle)==null?void 0:o.color)??((A=r.general)==null?void 0:A.primaryColor),borderColor:((a=n.botCheckboxNextStyle)==null?void 0:a.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botCheckboxNextStyle}),t},rs=(e,t,r,n)=>{var o,A;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:(o=r.general)==null?void 0:o.primaryColor,maxWidth:(A=r.userBubble)!=null&&A.showAvatar?"65%":"70%",...n.mediaDisplayContainerStyle}),t},Wn=()=>{const{settings:e}=te(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:r,hasInteractedPage:n,unreadCount:o,setUnreadCount:A,syncedNotificationsToggledOnRef:a}=ke(),{audioBufferRef:s,audioContextRef:i,gainNodeRef:l}=Ce(),{dispatchRcbEvent:c}=Ze(),d=f.useCallback(async()=>{var p,g;const v=(p=e.notification)==null?void 0:p.sound;i.current=new AudioContext;const h=i.current.createGain();let w;if(h.gain.value=((g=e.notification)==null?void 0:g.volume)??.2,l.current=h,v!=null&&v.startsWith("data:audio")){const E=atob(v.split(",")[1]),m=new ArrayBuffer(E.length),C=new Uint8Array(m);for(let k=0;k<E.length;k++)C[k]=E.charCodeAt(k);w=m}else w=await(await fetch(v)).arrayBuffer();s.current=await i.current.decodeAudioData(w)},[e.notification]),u=f.useCallback(()=>{var p;if((p=e.notification)!=null&&p.disabled||!a.current||!n||!i.current||!s.current)return;const g=i.current.createBufferSource();g.buffer=s.current,g.connect(l.current).connect(i.current.destination),g.start()},[e.notification,a,n,i,s,l]);return{unreadCount:o,setUnreadCount:A,notificationsToggledOn:t,toggleNotifications:f.useCallback(async p=>{var g;p!==a.current&&((g=e.event)!=null&&g.rcbToggleNotifications&&(await c(z.TOGGLE_NOTIFICATIONS,{currState:a.current,newState:!a.current})).defaultPrevented||r(v=>!v))},[a]),playNotificationSound:u,setUpNotifications:d}},os=(e,t)=>{var r,n,o,A;((a,s,i,l,c)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const d=new window.SpeechSynthesisUtterance;d.text=a,d.lang=s,d.rate=l,d.volume=c;let u=!1;for(const p of i){const g=window.speechSynthesis.getVoices().find(v=>v.name===p);if(g){d.voice=g,window.speechSynthesis.speak(d),u=!0;break}}u||window.speechSynthesis.speak(d)})(t,(r=e.audio)==null?void 0:r.language,(n=e.audio)==null?void 0:n.voiceNames,(o=e.audio)==null?void 0:o.rate,(A=e.audio)==null?void 0:A.volume)},co=()=>{const{settings:e}=te(),{audioToggledOn:t,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:n}=ke(),{dispatchRcbEvent:o}=Ze(),A=f.useCallback(async s=>{var i;s!==n.current&&((i=e.event)!=null&&i.rcbToggleAudio&&(await o(z.TOGGLE_AUDIO,{currState:n.current,newState:!n.current})).defaultPrevented||r(l=>!l))},[n]),a=f.useCallback(async s=>{var i,l;if((i=e.audio)!=null&&i.disabled||!n.current)return;let c=s;if((l=e.event)!=null&&l.rcbStartSpeakAudio){const d=await o(z.START_SPEAK_AUDIO,{textToRead:c});if(d.defaultPrevented)return;c=d.data.textToRead}os(e,c)},[e,n]);return{audioToggledOn:t,speakAudio:a,toggleAudio:A}},St=()=>{var e,t,r;const{settings:n}=te(),{messages:o,setSyncedMessages:A,syncedMessagesRef:a}=jn(),{setSyncedIsBotTyping:s,setUnreadCount:i,syncedIsScrollingRef:l,syncedIsChatWindowOpenRef:c}=ke(),{streamMessageMap:d,chatBodyRef:u,paramsInputRef:p}=Ce(),{scrollToBottom:g,getIsChatBotVisible:v}=Ge(),{dispatchRcbEvent:h}=Ze(),{speakAudio:w}=co(),{playNotificationSound:E}=Wn(),m=f.useCallback(async B=>{var _,U;if((_=n.event)!=null&&_.rcbSaveChatHistory){const N=await h(z.SAVE_CHAT_HISTORY,{messages:B});if(N.defaultPrevented)return;B=((U=N.data)==null?void 0:U.messages)??B}await(async N=>{if(so||!ht)return;const F=[];for(let L=N.length-1;L>=0;L--){const y=N[L];if(y.sender.toUpperCase()!=="SYSTEM"&&(y.content!==""&&F.unshift(y),F.length===gn))break}let M=F.map(Zi);if(!io&&M.length<gn){const L=gn-M.length;M=[...hn.slice(-L),...M]}ao(M)})(B)},[h,(e=n.event)==null?void 0:e.rcbSaveChatHistory]),C=f.useCallback((B,_=!1)=>{var U,N;m(B);let F=!0;const M=B[B.length-1];if(!M)return;const L=M.sender.toUpperCase();L==="USER"&&(F=!1),(U=n.general)!=null&&U.embedded&&v()&&(F=!1),(c.current&&!l.current||_)&&(F=!1),F&&E(),!_&&(L!=="USER"&&(N=n.chatWindow)!=null&&N.autoJumpToBottom||L==="USER"||!l.current)&&setTimeout(()=>g(),1)},[n,u,c,l,E,g,v]),k=f.useCallback(async(B,_="BOT",U=null)=>{var N,F,M,L,y;if(typeof B!="string")throw new Error("Content must be of type string to simulate stream.");_=_.toUpperCase();let V=gt(B,_);if((N=n.event)!=null&&N.rcbStartSimulateStreamMessage){const oe=await h(z.START_SIMULATE_STREAM_MESSAGE,{message:V});if(oe.defaultPrevented)return null;U=oe.data.simulateStreamChunker||U,V=oe.data.message}s(!1);let b=30;b=_==="BOT"?(F=n.botBubble)==null?void 0:F.streamSpeed:(M=n.userBubble)==null?void 0:M.streamSpeed;const R={...V,content:""};A(oe=>[...oe,R]),C(a.current);let K=V.content;U&&(K=U(K));let Y=0;const $=K.length;V.sender.toUpperCase()==="BOT"&&(c.current||(L=n.general)!=null&&L.embedded)&&typeof V.content=="string"&&V.content.trim()!==""&&w(V.content);const de=new Promise(oe=>{const He=setInterval(()=>{if(Y>=$)return clearInterval(He),void oe();A(Se=>{const xe=[...Se];for(let Je=xe.length-1;Je>=0;Je--)if(xe[Je].id===R.id){const j=K[Y];j&&(R.content+=j,xe[Je]=R),Y++;break}return xe})},b)});return(l.current||!c.current)&&i(oe=>oe+1),await de,m(a.current),(y=n.event)!=null&&y.rcbStopSimulateStreamMessage&&await h(z.STOP_SIMULATE_STREAM_MESSAGE,{message:V}),_==="USER"&&(p.current=B),V},[n,h,C,a,p,s,i,c,w]),S=f.useCallback(async(B,_="BOT")=>{var U,N,F;_=_.toUpperCase();let M=gt(B,_);if((U=n.event)!=null&&U.rcbPreInjectMessage){const L=await h(z.PRE_INJECT_MESSAGE,{message:M});if(L.defaultPrevented)return null;M=L.data.message}return M.sender.toUpperCase()==="BOT"&&(c.current||(N=n.general)!=null&&N.embedded)&&typeof M.content=="string"&&M.content.trim()!==""&&w(M.content),(l.current||!c.current)&&i(L=>L+1),(F=n.event)!=null&&F.rcbPostInjectMessage&&await h(z.POST_INJECT_MESSAGE,{message:M}),A(L=>[...L,M]),C(a.current),_==="USER"&&typeof B=="string"&&(p.current=B),M},[n,h,C,p,a,c,w,i]),D=f.useCallback(async B=>{var _;let U=a.current.find(M=>M.id===B),N=null,F=!1;return U||(N=Kt(),U=N.find(M=>M.id===B),U&&(F=!0)),!U||(_=n.event)!=null&&_.rcbRemoveMessage&&(await h(z.REMOVE_MESSAGE,{message:U})).defaultPrevented?null:F?(N&&Gn(N.filter(M=>M.id!==B)),U):(A(M=>M.filter(L=>L.id!==B)),C(a.current),i(M=>Math.max(M-1,0)),U)},[h,(t=n.event)==null?void 0:t.rcbRemoveMessage,C,a,i,Kt,Gn]),I=f.useCallback(async(B,_="BOT")=>{var U,N;if(_=_.toUpperCase(),!d.current.has(_)){const M=gt(B,_);return(U=n.event)!=null&&U.rcbStartStreamMessage&&(await h(z.START_STREAM_MESSAGE,{message:M})).defaultPrevented?null:(s(!1),A(L=>[...L,M]),C(a.current),d.current.set(_,M.id),(l.current||!c.current)&&i(L=>L+1),M)}const F={...gt(B,_),id:d.current.get(_)};return(N=n.event)!=null&&N.rcbChunkStreamMessage&&(await h(z.CHUNK_STREAM_MESSAGE,{message:F})).defaultPrevented?null:(A(M=>M.map(L=>L.id===F.id?F:L)),C(a.current,!0),F)},[h,n.event,C,a,s,i,d]),Q=f.useCallback(async(B="BOT")=>{var _;if(B=B.toUpperCase(),!d.current.has(B))return!0;const U=d.current.get(B);let N;for(let F=0;F<3;F++){const M=a.current.find(L=>L.id===U);M&&(N=M),await new Promise(L=>setTimeout(L,20))}return((_=n.event)==null||!_.rcbStopStreamMessage||!(await h(z.STOP_STREAM_MESSAGE,{message:N})).defaultPrevented)&&(d.current.delete(B),m(a.current),B==="USER"&&typeof(N==null?void 0:N.content)=="string"&&(p.current=N.content),!0)},[h,(r=n.event)==null?void 0:r.rcbStopStreamMessage,d,p]),x=f.useCallback(B=>{const _=typeof B=="function"?B(a.current):B;A(_),C(_)},[C,a]),O=f.useCallback((B,_,U=0)=>{var N;const F=a.current,M=B?B.toUpperCase():null,L=[];let y=U;for(let V=F.length-1;V>=0;V--){const b=F[V];if(!M||((N=b==null?void 0:b.sender)==null?void 0:N.toUpperCase())===M){if(y>0){y--;continue}if(L.push(b),_!==void 0&&L.length===_)break}}return L.length>0?L:null},[a]);return{simulateStreamMessage:k,injectMessage:S,removeMessage:D,streamMessage:I,endStreamMessage:Q,replaceMessages:x,getMessages:O,messages:o}};let Yn,et,mn,mt=!1,tt=null;const Vn=()=>{if(!Yn){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Yn=e!=null?new e:null}return Yn},As=(e,t,r,n,o,A)=>{var a,s,i;const l=Vn();if(!l)return;if(!mt)try{mt=!0,l.lang=(a=e.voice)==null?void 0:a.language,l.start()}catch{}const c=(s=e.voice)==null?void 0:s.timeoutPeriod,d=(i=e.voice)==null?void 0:i.autoSendPeriod;l.onresult=u=>{var p,g;clearTimeout(et),et=null,clearTimeout(mn);const v=u.results[u.results.length-1][0].transcript;if(A.current){const h=(p=e.chatInput)==null?void 0:p.characterLimit,w=A.current.value+v;h!=null&&h>=0&&w.length>h?n(w.slice(0,h)):n(w),o(A.current.value.length)}c&&(et=setTimeout(async()=>await Xn(t,A),c)),(g=e.voice)!=null&&g.autoSendDisabled||(mn=setTimeout(r,d))},l.onend=()=>{mt?(l.start(),!et&&c&&(et=setTimeout(async()=>await Xn(t,A),c))):(clearTimeout(et),et=null,clearTimeout(mn))},c&&(et=setTimeout(async()=>await Xn(t,A),c))},is=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(r=>{if(tt=new MediaRecorder(r),!mt)try{mt=!0,tt.start()}catch{}tt.ondataavailable=n=>{t.current&&t.current.push(n.data)},tt.onstop=()=>{e(),r.getTracks().forEach(n=>n.stop())}}).catch(r=>{console.error("Unable to use microphone:",r)})},Kn=()=>{const e=Vn();e&&(mt=!1,e&&e.stop(),tt&&tt.state!=="inactive"&&(tt.stop(),tt=null),clearTimeout(et),et=null,clearTimeout(mn))},Xn=async(e,t)=>{var r;(r=t.current)!=null&&r.disabled||await e(),Kn()},Jn=()=>{const{settings:e}=te(),{voiceToggledOn:t,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:n}=ke(),{dispatchRcbEvent:o}=Ze(),A=f.useCallback(async s=>{var i;s!==n.current&&((i=e.event)!=null&&i.rcbToggleVoice&&(await o(z.TOGGLE_VOICE,{currState:n.current,newState:!n.current})).defaultPrevented||r(l=>!l))},[n]),a=f.useCallback(s=>{((i,l)=>{var c,d,u;const p=Vn();(c=l.voice)!=null&&c.disabled||(d=l.chatInput)==null||!d.blockSpam||!p||(i&&!mt?(mt=!0,(u=l.voice)!=null&&u.sendAsAudio?tt==null||tt.start():p.start()):i||Kn())})(s,e)},[e]);return{voiceToggledOn:t,toggleVoice:A,syncVoice:a}},kt=()=>{var e;const{settings:t}=te(),{inputLength:r,setInputLength:n,textAreaDisabled:o,setSyncedTextAreaDisabled:A,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:i,syncedTextAreaSensitiveModeRef:l}=ke(),{inputRef:c,chatBodyRef:d,prevInputRef:u}=Ce(),{dispatchRcbEvent:p}=Ze(),{getIsChatBotVisible:g}=Ge(),v=f.useCallback(async S=>{var D,I,Q;if(i.current&&c.current)c.current.value="";else if(c.current&&u.current!==null){const x=(D=t.chatInput)==null?void 0:D.characterLimit,O=(I=t.chatInput)!=null&&I.allowNewline?S:S.replace(/\n/g," ");if(x!=null&&x>=0&&O.length>x?c.current.value=O.slice(0,x):c.current.value=O,(Q=t.event)!=null&&Q.rcbTextAreaChangeValue&&(await p(z.TEXT_AREA_CHANGE_VALUE,{currValue:c.current.value,prevValue:u.current})).defaultPrevented)return void(c.current.value=u.current);u.current=c.current.value}},[i,c,u,t,p]),h=f.useCallback(S=>{var D;(D=c.current)!=null&&D.disabled||setTimeout(()=>{var I,Q,x;(I=t.general)!=null&&I.embedded?g()&&((Q=c.current)==null||Q.focus()):S!=="start"&&((x=c.current)==null||x.focus())},100)},[c,(e=t.general)==null?void 0:e.embedded,d,g]),w=f.useCallback(()=>{c.current&&c.current.focus()},[]),E=f.useCallback(()=>{c.current&&c.current.blur()},[]),m=f.useCallback(()=>c&&c.current?c.current.value:"",[]),C=f.useCallback(S=>{S!==i.current&&A(D=>!D)},[i]),k=f.useCallback(S=>{S!==l.current&&s(D=>!D)},[l]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:A,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,inputLength:r,setInputLength:n,getTextAreaValue:m,setTextAreaValue:v,updateTextAreaFocus:h,focusTextArea:w,blurTextArea:E,toggleTextAreaDisabled:C,toggleTextAreaSensitiveMode:k}},uo=f.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),fo=()=>f.useContext(uo),ss=({children:e})=>{const[t,r,n]=je([]);return P.jsx(uo.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:n},children:e})},Tt=()=>{const{settings:e}=te(),{toasts:t,setSyncedToasts:r,syncedToastsRef:n}=fo(),{dispatchRcbEvent:o}=Ze(),A=f.useCallback(async(i,l)=>{var c,d,u,p;let g=null;if(n.current.length>=(((c=e.toast)==null?void 0:c.maxCount)??3)){if((d=e.toast)!=null&&d.forbidOnMax)return null;g=fn();let h={id:g,content:i,timeout:l};if((u=e.event)!=null&&u.rcbShowToast){const w=await o(z.SHOW_TOAST,{toast:h});if(w.defaultPrevented)return null;h=w.data.toast}return r(w=>[...w.slice(1),h]),g}g=fn();let v={id:g,content:i,timeout:l};if((p=e.event)!=null&&p.rcbShowToast){const h=await o(z.SHOW_TOAST,{toast:v});if(h.defaultPrevented)return null;v=h.data.toast}return r(h=>[...h,v]),g},[e,o]),a=f.useCallback(async i=>{var l;const c=n.current.find(d=>d.id===i);return!c||(l=e.event)!=null&&l.rcbDismissToast&&(await o(z.DISMISS_TOAST,{toast:c})).defaultPrevented?null:(r(d=>d.filter(u=>u.id!==i)),i)},[o]),s=f.useCallback(i=>{const l=typeof i=="function"?i(n.current):i;r(l)},[n]);return{showToast:A,dismissToast:a,toasts:t,replaceToasts:s}},yn=()=>{var e,t,r,n,o;const{settings:A}=te(),{paths:a,setSyncedPaths:s,syncedPathsRef:i}=Vt(),{flowRef:l,streamMessageMap:c,paramsInputRef:d,keepVoiceOnRef:u,timeoutIdRef:p}=Ce(),{setSyncedIsBotTyping:g,setSyncedTextAreaDisabled:v,setSyncedTextAreaSensitiveMode:h,blockAllowsAttachment:w,setBlockAllowsAttachment:E}=ke(),{dispatchRcbEvent:m}=Ze(),{endStreamMessage:C,injectMessage:k,removeMessage:S,simulateStreamMessage:D,streamMessage:I}=St(),{showToast:Q,dismissToast:x}=Tt(),{toggleChatWindow:O}=Ge(),{updateTextAreaFocus:B,setTextAreaValue:_}=kt(),{syncVoice:U}=Jn(),N=f.useCallback(async b=>{var R;if((R=A.event)!=null&&R.rcbPostProcessBlock){const K=await m(z.POST_PROCESS_BLOCK,{block:b});if(K.defaultPrevented)return null;b=K.data.block}return b},[(e=A.event)==null?void 0:e.rcbPostProcessBlock,m]),F=f.useCallback(async(b,R)=>{var K,Y,$,de;if(!b)return;let oe=l.current[b];if(!oe)return void g(!1);if((K=A.event)!=null&&K.rcbPreProcessBlock){const Se=await m(z.PRE_PROCESS_BLOCK,{block:oe});if(Se.defaultPrevented)return;oe=Se.data.block}g(!0),(Y=A.chatInput)!=null&&Y.blockSpam&&v(!0),h(!1);const He={prevPath:R,currPath:b,goToPath:y,setTextAreaValue:_,userInput:d.current,endStreamMessage:C,injectMessage:k,removeMessage:S,simulateStreamMessage:D,streamMessage:I,toggleChatWindow:O,showToast:Q,dismissToast:x};await(async(Se,xe,Je,j,G,ae,ne)=>{if(!Se)throw new Error("Block is not valid.");for(const me of Object.keys(Se))switch(me){case"message":await Gi(Se,xe,Je);break;case"options":await Wi(Se,xe);break;case"checkboxes":await zi(Se,xe);break;case"component":await Yi(Se,xe);break;case"chatDisabled":await Ki(Se,xe,G);break;case"isSensitive":await oo(Se,xe,ae);break;case"transition":await Vi(Se,xe,j,ne)}})(oe,He,(($=A.botBubble)==null?void 0:$.simulateStream)??!1,p,v,h,N),g(!1),"chatDisabled"in oe||v((de=A.chatInput)==null?void 0:de.disabled),"isSensitive"in oe||h(!1),E(typeof oe.file=="function"),B(b),U(u.current&&!oe.chatDisabled),b!==R&&c.current.clear()},[l,B,U,(t=A.botBubble)==null?void 0:t.simulateStream,(r=A.chatInput)==null?void 0:r.disabled,d,C,k,S,D,I,O,Q,x,u,c]),M=f.useCallback(()=>i.current.length>0?i.current.at(-1)??null:null,[]),L=f.useCallback(()=>i.current.length>1?i.current.at(-2)??null:null,[]),y=f.useCallback(async b=>{var R;const K=M(),Y=L();return((R=A.event)==null||!R.rcbChangePath||!(await m(z.CHANGE_PATH,{currPath:K,prevPath:Y,nextPath:b})).defaultPrevented)&&(s($=>[...$,b]),await F(b,K),!0)},[(n=A.chatInput)==null?void 0:n.blockSpam,(o=A.event)==null?void 0:o.rcbChangePath,F,m]),V=f.useCallback(b=>{const R=typeof b=="function"?b(i.current):b;s(R)},[i]);return{getCurrPath:M,getPrevPath:L,goToPath:y,blockAllowsAttachment:w,setBlockAllowsAttachment:E,paths:a,replacePaths:V,firePostProcessBlockEvent:N}},Qt=()=>{var e,t,r,n;const{settings:o}=te(),{endStreamMessage:A,injectMessage:a,removeMessage:s,simulateStreamMessage:i,streamMessage:l}=St(),{syncedPathsRef:c}=Vt(),{getCurrPath:d,getPrevPath:u,goToPath:p,firePostProcessBlockEvent:g}=yn(),{setSyncedTextAreaSensitiveMode:v,setSyncedTextAreaDisabled:h,setSyncedIsBotTyping:w,setBlockAllowsAttachment:E,setInputLength:m,syncedVoiceToggledOnRef:C,syncedTextAreaSensitiveModeRef:k}=ke(),{flowRef:S,inputRef:D,keepVoiceOnRef:I,paramsInputRef:Q,timeoutIdRef:x}=Ce(),{showToast:O,dismissToast:B}=Tt(),{dispatchRcbEvent:_}=Ze(),{syncVoice:U}=Jn(),{setTextAreaValue:N}=kt(),{toggleChatWindow:F}=Ge(),M=f.useCallback(async y=>{var V,b,R,K,Y,$;const de=d();if(de&&S.current[de]){if(k.current){if((V=o==null?void 0:o.sensitiveInput)!=null&&V.hideInUserBubble)return;if((b=o==null?void 0:o.sensitiveInput)!=null&&b.maskInUserBubble)return void((R=o.userBubble)!=null&&R.simulateStream?await i("*".repeat(((K=o.sensitiveInput)==null?void 0:K.asterisksCount)??10),"USER"):await a("*".repeat(((Y=o.sensitiveInput)==null?void 0:Y.asterisksCount)??10),"USER"))}($=o.userBubble)!=null&&$.simulateStream?await i(y,"USER"):await a(y,"USER")}},[S,d,o,a,i,k]),L=f.useCallback(async(y,V=!0)=>{var b,R;if((y=y.trim())==="")return;V&&await M(y),x.current&&clearTimeout(x.current),D.current&&(N(""),m(0));const K=d();if(!K)return;let Y=S.current[K];const $=await g(Y);$&&((b=o.chatInput)!=null&&b.blockSpam&&h(!0),I.current=C.current,U(!1),setTimeout(()=>{w(!0)},400),v(!1),setTimeout(async()=>{var de;const oe={prevPath:u(),currPath:d(),goToPath:p,setTextAreaValue:N,userInput:Q.current,injectMessage:a,simulateStreamMessage:i,streamMessage:l,removeMessage:s,endStreamMessage:A,toggleChatWindow:F,showToast:O,dismissToast:B},He=c.current.length;await Ao($,oe),c.current.length===He&&(h("chatDisabled"in Y?!!Y.chatDisabled:!((de=o.chatInput)==null||!de.disabled)),oo(Y,oe,v),E(typeof Y.file=="function"),U(I.current),w(!1))},(R=o.chatInput)==null?void 0:R.botDelay))},[x,(e=o.chatInput)==null?void 0:e.blockSpam,(t=o.chatInput)==null?void 0:t.botDelay,(r=o.chatInput)==null?void 0:r.disabled,I,C,U,M,u,d,p,a,i,l,s,A,F,O,B,S]);return{handleSubmitText:f.useCallback(async(y,V=!0)=>{var b,R;y=y??((b=D.current)==null?void 0:b.value),!((R=o.event)!=null&&R.rcbUserSubmitText&&(await _(z.USER_SUBMIT_TEXT,{inputText:y,sendInChat:V})).defaultPrevented||!d())&&L(y,V)},[_,d,L,D,(n=o.event)==null?void 0:n.rcbUserSubmitText])}},vn=()=>{var e;const{settings:t}=te();return f.useMemo(()=>{var r;if(typeof window>"u"||!window.navigator)return!1;if((r=t.device)==null||!r.applyMobileOptimizations)return!0;const n=navigator.userAgent,o=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n),A=window.innerWidth>=768;return o&&A},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},as=({buttons:e})=>{var t,r,n,o,A,a,s,i,l,c,d;const u=vn(),{settings:p}=te(),{styles:g}=ue(),{textAreaDisabled:v,textAreaSensitiveMode:h,inputLength:w,hasFlowStarted:E,setHasFlowStarted:m,setInputLength:C}=ke(),{inputRef:k}=Ce(),[S,D]=f.useState(!1),[I,Q]=f.useState(!1),{handleSubmitText:x}=Qt(),{setTextAreaValue:O}=kt(),B={boxSizing:u?"content-box":"border-box",...g.chatInputAreaStyle},_={outline:v?"":"none",boxShadow:v?"":`0 0 5px ${(t=p.general)==null?void 0:t.primaryColor}`,boxSizing:u?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaFocusedStyle},U={cursor:`url("${(r=p.general)==null?void 0:r.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:u?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaDisabledStyle},N={color:"#989898",...g.characterLimitStyle},F={color:"#ff0000",...g.characterLimitReachedStyle},M=v?(n=p.chatInput)==null?void 0:n.disabledPlaceholderText:(o=p.chatInput)==null?void 0:o.enabledPlaceholderText,L=()=>{v||D(!0)},y=()=>{D(!1)},V=()=>{Q(!0)},b=()=>{Q(!1)},R=async Y=>{var $;if(!I&&Y.key==="Enter"){if(Y.shiftKey)return void(($=p.chatInput)!=null&&$.allowNewline||Y.preventDefault());Y.preventDefault(),await x()}},K=Y=>{k.current&&(O(Y.target.value),C(k.current.value.length))};return P.jsxs("div",{"aria-label":((A=p.ariaLabel)==null?void 0:A.inputTextArea)??"input text area",role:"textbox",onMouseDown:Y=>{var $;Y.stopPropagation(),!E&&(($=p.general)==null?void 0:$.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&m(!0)},style:{...g.chatInputContainerStyle},className:"rcb-chat-input",children:[h&&(a=p.sensitiveInput)!=null&&a.maskInTextArea?P.jsx("input",{ref:k,type:"password",className:"rcb-chat-input-textarea",style:v?U:S?_:B,placeholder:M,onChange:K,onKeyDown:R,onFocus:L,onBlur:y,onCompositionStart:V,onCompositionEnd:b}):P.jsx("textarea",{ref:k,style:v?U:S?_:B,rows:1,className:"rcb-chat-input-textarea",placeholder:M,onChange:K,onKeyDown:R,onFocus:L,onBlur:y,onCompositionStart:V,onCompositionEnd:b}),P.jsxs(P.Fragment,{children:[e==null?void 0:e.map((Y,$)=>P.jsx(f.Fragment,{children:Y},$)),((s=p.chatInput)==null?void 0:s.showCharacterCount)&&((i=p.chatInput)==null?void 0:i.characterLimit)!=null&&((l=p.chatInput)==null?void 0:l.characterLimit)>0&&P.jsxs("div",{className:"rcb-chat-input-char-counter",style:w>=((c=p.chatInput)==null?void 0:c.characterLimit)?F:N,children:[w,"/",(d=p.chatInput)==null?void 0:d.characterLimit]})]})]})},ls=({buttons:e})=>{var t;const{settings:r}=te(),{styles:n}=ue();return P.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...n.footerStyle},className:"rcb-chat-footer-container",children:[P.jsx("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,A)=>P.jsx(f.Fragment,{children:o},A))}),P.jsx("span",{children:(t=r.footer)==null?void 0:t.text})]})},cs=()=>{var e,t,r,n,o,A,a;const{settings:s}=te(),{styles:i}=ue(),{unreadCount:l}=ke(),{isChatWindowOpen:c,toggleChatWindow:d}=Ge(),[u,p]=f.useState(!1),g={backgroundImage:`linear-gradient(to right, ${(e=s.general)==null?void 0:e.secondaryColor},
|
|
3
|
-
${(t=s.general)==null?void 0:t.primaryColor})`,...i.chatButtonStyle},v={transform:"scale(1.05)",...g,...i.chatButtonHoveredStyle},h={backgroundImage:`url(${(r=s.chatButton)==null?void 0:r.icon})`,fill:"#fff",width:75,height:75,...i.chatIconStyle};return P.jsx(P.Fragment,{children:!((n=s.general)!=null&&n.embedded)&&P.jsxs("div",{"aria-label":((o=s.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:u?v:g,className:"rcb-toggle-button "+(c?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)},onClick:()=>d(!0),children:[(()=>{var w;const E=(w=s.chatButton)==null?void 0:w.icon;return E&&typeof E!="string"?E&&P.jsx("span",{className:"rcb-toggle-icon",children:P.jsx(E,{style:h})}):P.jsx("span",{className:"rcb-toggle-icon",style:h})})(),!((A=s.notification)!=null&&A.disabled)&&((a=s.notification)==null?void 0:a.showCount)&&P.jsx("span",{style:{...i.notificationBadgeStyle},className:"rcb-badge",children:l})]})})},us=()=>{var e,t,r,n,o,A;const a=vn(),{settings:s}=te(),{styles:i}=ue(),{chatBodyRef:l}=Ce(),{isChatWindowOpen:c,toggleChatWindow:d}=Ge(),[u,p]=f.useState(!1),[g,v]=f.useState(!1),[h,w]=f.useState(0);f.useEffect(()=>{var C,k,S;const D=(C=s.tooltip)==null?void 0:C.mode;if(D==="ALWAYS")if(a){let I;I=c?(((k=l.current)==null?void 0:k.offsetWidth)??375)-(typeof((S=i.chatButtonStyle)==null?void 0:S.width)=="number"?i.chatButtonStyle.width:75):0,w(I),p(!0)}else p(!c);else D==="NEVER"?p(!1):D==="START"?g?p(!1):(v(!0),p(!0)):D==="CLOSE"&&p(!c)},[c,a,g,(e=i.chatButtonStyle)==null?void 0:e.width,(t=s.tooltip)==null?void 0:t.mode]);const E={transform:`translateX(-${h}px)`,right:(((r=i.chatButtonStyle)==null?void 0:r.width)??75)+40,bottom:30,backgroundColor:(n=s.general)==null?void 0:n.secondaryColor,color:"#fff",...i.tooltipStyle},m={borderColor:`transparent transparent transparent ${E.backgroundColor}`};return P.jsx(P.Fragment,{children:!((o=s.general)!=null&&o.embedded)&&P.jsxs("div",{"data-testid":"chat-tooltip",style:E,className:"rcb-chat-tooltip "+(u?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>d(!0),children:[P.jsx("span",{children:(A=s.tooltip)==null?void 0:A.text}),P.jsx("span",{className:"rcb-chat-tooltip-tail",style:m})]})})},ds=({id:e,content:t,timeout:r})=>{var n,o;const{settings:A}=te(),{styles:a}=ue(),[s]=f.useState({toastPromptStyle:{...a.toastPromptStyle},toastPromptHoveredStyle:{...a.toastPromptHoveredStyle}}),{dismissToast:i}=Tt(),[l,c]=f.useState(!1),d={color:(n=A.general)==null?void 0:n.primaryColor,borderColor:(o=A.general)==null?void 0:o.primaryColor,...s.toastPromptHoveredStyle};return f.useEffect(()=>{if(r){const u=setTimeout(()=>{i(e)},r);return()=>clearTimeout(u)}},[e,i,r]),typeof t=="string"?P.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?d:s.toastPromptStyle,onMouseDown:async u=>{var p;(p=A.toast)!=null&&p.dismissOnClick&&(u.preventDefault(),await i(e))},className:"rcb-toast-prompt",children:t}):P.jsx(P.Fragment,{children:t})},fs=()=>{var e,t,r,n,o,A,a,s,i,l,c,d;const{styles:u}=ue(),{toasts:p}=fo(),g={bottom:`calc(${typeof((e=u.footerStyle)==null?void 0:e.height)=="number"?`${(t=u.footerStyle)==null?void 0:t.height}px`:((r=u.footerStyle)==null?void 0:r.height)??"50px"} + ${typeof((n=u.chatInputContainerStyle)==null?void 0:n.height)=="number"?`${(o=u.chatInputContainerStyle)==null?void 0:o.height}px`:((A=u.chatInputContainerStyle)==null?void 0:A.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((a=u.chatWindowStyle)==null?void 0:a.width)=="number"?`${(s=u.chatWindowStyle)==null?void 0:s.width}px`:((i=u.chatWindowStyle)==null?void 0:i.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((l=u.chatWindowStyle)==null?void 0:l.width)=="number"?`${(c=u.chatWindowStyle)==null?void 0:c.width}px`:((d=u.chatWindowStyle)==null?void 0:d.width)??"375px"} - 50px)`,...u.toastPromptContainerStyle};return P.jsx("div",{className:"rcb-toast-prompt-container",style:g,children:p.map(v=>P.jsx(ds,{id:v.id,content:v.content,timeout:v.timeout},v.id))})},po=({file:e,fileType:t,fileUrl:r})=>{var n,o,A;const{settings:a}=te(),{styles:s}=ue(),i={backgroundColor:(n=a.general)==null?void 0:n.primaryColor,maxWidth:(o=a.userBubble)!=null&&o.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return P.jsx(P.Fragment,{children:r?P.jsxs(P.Fragment,{children:[t==="image"&&r&&P.jsx("div",{style:i,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:P.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&r&&P.jsx("div",{style:i,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:P.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[P.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&r&&P.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(A=a.userBubble)!=null&&A.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[P.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):P.jsx(P.Fragment,{})})},go=async e=>{if(!e)return{fileType:null,fileUrl:null};const t=e.type.split("/")[0];if(!["image","video","audio"].includes(t))return{fileType:null,fileUrl:null};try{return{fileType:t,fileUrl:await new Promise((r,n)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>n(new Error("File reading failed")),o.readAsDataURL(e)})}}catch(r){return console.error(r),{fileType:null,fileUrl:null}}},ps=()=>{var e,t,r,n,o,A;const{settings:a}=te(),{styles:s}=ue(),{injectMessage:i,simulateStreamMessage:l,streamMessage:c,removeMessage:d,endStreamMessage:u}=St(),{getCurrPath:p,getPrevPath:g,goToPath:v,blockAllowsAttachment:h}=yn(),{flowRef:w,inputRef:E}=Ce(),m=w.current,{showToast:C,dismissToast:k}=Tt(),{dispatchRcbEvent:S}=Ze(),{toggleChatWindow:D}=Ge(),{setTextAreaValue:I}=kt(),{handleSubmitText:Q}=Qt(),x={cursor:`url("${(e=a.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},O={backgroundImage:`url(${(t=a.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},B={backgroundImage:`url(${(r=a.fileAttachment)==null?void 0:r.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return P.jsxs("label",{"aria-label":((n=a.ariaLabel)==null?void 0:n.fileAttachmentButton)??"upload file",role:"button",className:h?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:h?{...s.fileAttachmentButtonStyle}:x,children:[P.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async _=>{var U,N,F,M;const L=_.target.files;if(!L)return;const y=Array.from(L);if(_.target.value="",(U=a.event)!=null&&U.rcbUserUploadFile&&(await S(z.USER_UPLOAD_FILE,{files:y})).defaultPrevented)return;const V=p();if(!V)return;const b=m[V];if(!b)return;const R=b.file;if(R!=null){const K=[];for(let Y=0;Y<y.length;Y++){if(K.push(y[Y].name),(N=a.fileAttachment)==null||!N.showMediaDisplay)continue;const $=await go(y[Y]);!$.fileType||!$.fileUrl||await i(P.jsx(po,{file:y[Y],fileType:$.fileType,fileUrl:$.fileUrl}),"USER")}await Q("๐ "+K.join(", "),(F=a.fileAttachment)==null?void 0:F.sendFileName),await R({userInput:(M=E.current)==null?void 0:M.value,prevPath:g(),currPath:p(),goToPath:v,setTextAreaValue:I,injectMessage:i,simulateStreamMessage:l,streamMessage:c,removeMessage:d,endStreamMessage:u,toggleChatWindow:D,showToast:C,dismissToast:k,files:y})}},multiple:(o=a.fileAttachment)==null?void 0:o.multiple,accept:(A=a.fileAttachment)==null?void 0:A.accept,disabled:!h}),(()=>{var _,U;const N=h?(_=a.fileAttachment)==null?void 0:_.icon:(U=a.fileAttachment)==null?void 0:U.iconDisabled;return N&&typeof N!="string"?N&&P.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:P.jsx(N,{style:h?O:B})}):P.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:h?O:B})})()]})},gs=()=>{var e,t,r,n,o,A;const{settings:a}=te(),{styles:s}=ue(),{syncedTextAreaDisabledRef:i}=ke(),{inputRef:l}=Ce(),{textAreaDisabled:c,setTextAreaValue:d}=kt(),u=f.useRef(null),p=f.useRef(null),[g,v]=f.useState(!1),h={cursor:`url("${(e=a.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.emojiButtonStyle,...s.emojiButtonDisabledStyle},w={backgroundImage:`url(${(t=a.emoji)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.emojiIconStyle},E={backgroundImage:`url(${(r=a.emoji)==null?void 0:r.icon})`,fill:"#a6a6a6",...s.emojiIconStyle,...s.emojiIconDisabledStyle};return f.useEffect(()=>{const m=k=>{const S=k.composedPath();u.current&&!S.includes(u.current)&&p.current&&!S.includes(p.current)&&v(!1)},C=()=>{(()=>{if(u.current&&p.current){const k=p.current.getBoundingClientRect(),S=u.current.offsetHeight,D=k.top-S-8;u.current.style.left=`${k.left}px`,u.current.style.top=`${D}px`}})()};return document.addEventListener("mousedown",m),window.addEventListener("resize",C),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("resize",C)}},[]),P.jsxs(P.Fragment,{children:[P.jsx("div",{"aria-label":((n=a.ariaLabel)==null?void 0:n.emojiButton)??"emoji picker",role:"button",ref:p,className:c?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:c?h:{...s.emojiButtonStyle},onMouseDown:m=>{m.preventDefault(),i.current?v(!1):v(C=>!C)},children:(()=>{var m,C;const k=c?(m=a.emoji)==null?void 0:m.iconDisabled:(C=a.emoji)==null?void 0:C.icon;return k&&typeof k!="string"?k&&P.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:P.jsx(k,{style:c?E:w})}):P.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:c?E:w})})()}),g&&P.jsx("div",{className:"rcb-emoji-button-popup",ref:u,children:(A=(o=a.emoji)==null?void 0:o.list)==null?void 0:A.map((m,C)=>P.jsx("span",{className:"rcb-emoji",onMouseDown:k=>((S,D)=>{S.preventDefault(),l.current&&(d(l.current.value+D),setTimeout(()=>{const I=l.current;if(I){I.focus();const Q=I.value.length;I.setSelectionRange(Q,Q)}},50)),v(!1)})(k,m),children:m},C))})]})},hs=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),{audioToggledOn:A,toggleAudio:a}=co(),s={backgroundImage:`url(${(e=n.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},i={backgroundImage:`url(${(t=n.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return P.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async l=>{l.preventDefault(),await a()},style:A?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var l,c;const d=A?(l=n.audio)==null?void 0:l.icon:(c=n.audio)==null?void 0:c.iconDisabled;return d&&typeof d!="string"?d&&P.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:P.jsx(d,{style:A?s:i,"data-testid":"rcb-audio-icon-svg"})}):P.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:A?s:i})})()})},ms=()=>{var e,t;const{settings:r}=te(),{styles:n}=ue(),{toggleChatWindow:o}=Ge(),A={backgroundImage:`url(${(e=r.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...n.closeChatIconStyle};return P.jsx("div",{"aria-label":((t=r.ariaLabel)==null?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:a=>{a.stopPropagation(),o(!1)},style:{...n.closeChatButtonStyle},children:(()=>{var a;const s=(a=r.header)==null?void 0:a.closeChatIcon;return s&&typeof s!="string"?s&&P.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:P.jsx(s,{style:A})}):P.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:A})})()})},ys=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),{notificationsToggledOn:A,toggleNotifications:a}=(()=>{const{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:d}=Wn();return{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:d}})(),s={backgroundImage:`url(${(e=n.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},i={backgroundImage:`url(${(t=n.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return P.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async l=>{l.preventDefault(),await a()},style:A?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var l,c;const d=A?(l=n.notification)==null?void 0:l.icon:(c=n.notification)==null?void 0:c.iconDisabled;return d&&typeof d!="string"?d&&P.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:P.jsx(d,{style:A?s:i,"data-testid":"rcb-notification-icon-svg"})}):P.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:A?s:i})})()})},vs=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),{injectMessage:A}=St(),{inputRef:a}=Ce(),{voiceToggledOn:s,toggleVoice:i}=Jn(),{setInputLength:l,setTextAreaValue:c,textAreaDisabled:d}=kt(),{handleSubmitText:u}=Qt(),p=f.useRef([]),[g,v]=f.useState(!1);f.useEffect(()=>{var C;(C=n.voice)!=null&&C.sendAsAudio?(m(),p.current=[]):u()},[g]),f.useEffect(()=>{s?((C,k,S,D,I,Q,x)=>{var O;(O=C.voice)!=null&&O.sendAsAudio?is(S,Q):As(C,k,S,D,I,x)})(n,i,E,c,l,p,a):Kn()},[s]);const h={backgroundImage:`url(${(e=n.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},w={backgroundImage:`url(${(t=n.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},E=()=>{v(C=>!C)},m=async()=>{const C=new Blob(p.current,{type:"audio/wav"}),k=new File([C],"voice-input.wav",{type:"audio/wav"}),S=await go(k);!S.fileType||!S.fileUrl||await A(P.jsx(po,{file:k,fileType:S.fileType,fileUrl:S.fileUrl}),"USER")};return P.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.voiceButton)??"toggle voice",role:"button",onMouseDown:async C=>{C.preventDefault(),!d&&await i()},style:s&&!d?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:s&&!d?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var C,k;const S=s?(C=n.voice)==null?void 0:C.icon:(k=n.voice)==null?void 0:k.iconDisabled;return S&&typeof S!="string"?S&&P.jsx("span",{className:"rcb-voice-icon "+(s&&!d?"on":""),children:P.jsx(S,{style:s&&!d?h:w})}):P.jsx("span",{className:"rcb-voice-icon"+(s&&!d?"-on":""),"data-testid":"rcb-voice-icon",style:s&&!d?h:w})})()})},ws=()=>{var e,t,r,n,o,A,a,s;const{settings:i}=te(),{styles:l}=ue(),{textAreaDisabled:c}=ke(),[d,u]=f.useState(!1),{handleSubmitText:p}=Qt(),g={backgroundColor:(e=i.general)==null?void 0:e.primaryColor,...l.sendButtonStyle},v={cursor:`url("${(t=i.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(r=i.general)==null?void 0:r.primaryColor,...l.sendButtonStyle,...l.sendButtonDisabledStyle},h={backgroundColor:(n=i.general)==null?void 0:n.secondaryColor,...l.sendButtonStyle,...l.sendButtonHoveredStyle},w={backgroundImage:`url(${(o=i.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle},E={backgroundImage:`url(${(A=i.chatInput)==null?void 0:A.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconDisabledStyle},m={backgroundImage:`url(${(a=i.chatInput)==null?void 0:a.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconHoveredStyle};return P.jsx("div",{"aria-label":((s=i.ariaLabel)==null?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onMouseDown:async C=>{C==null||C.preventDefault(),!c&&await p()},style:c?v:d?h:g,className:"rcb-send-button",children:(()=>{var C;const k=(C=i.chatInput)==null?void 0:C.sendButtonIcon;return k&&typeof k!="string"?k&&P.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:P.jsx(k,{style:c?E:d?m:w})}):P.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:c?E:d?m:w})})()})},bs=(e,t)=>{var r,n,o,A,a,s,i,l,c;const d={[we.AUDIO_BUTTON]:(r=e.audio)==null?void 0:r.disabled,[we.CLOSE_CHAT_BUTTON]:(n=e.general)==null?void 0:n.embedded,[we.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[we.FILE_ATTACHMENT_BUTTON]:(A=e.fileAttachment)==null?void 0:A.disabled,[we.NOTIFICATION_BUTTON]:(a=e.notification)==null?void 0:a.disabled,[we.SEND_MESSAGE_BUTTON]:!1,[we.VOICE_MESSAGE_BUTTON]:(s=e.voice)==null?void 0:s.disabled},u={},p=g=>g?g.map(v=>{if(typeof v=="string"){if((h=>Object.values(we).includes(h))(v)&&!d[v]){if(u[v])return u[v];const h=t[v];if(typeof h=="function"){const w=h();return u[v]=w,w}return null}return null}return v}).filter(v=>v!==null):[];return{header:p((i=e.header)==null?void 0:i.buttons),chatInput:p((l=e.chatInput)==null?void 0:l.buttons),footer:p((c=e.footer)==null?void 0:c.buttons)}},Es=()=>{const{settings:e}=te(),t=f.useMemo(()=>({[we.CLOSE_CHAT_BUTTON]:()=>P.jsx(ms,{}),[we.AUDIO_BUTTON]:()=>P.jsx(hs,{}),[we.NOTIFICATION_BUTTON]:()=>P.jsx(ys,{}),[we.EMOJI_PICKER_BUTTON]:()=>P.jsx(gs,{}),[we.FILE_ATTACHMENT_BUTTON]:()=>P.jsx(ps,{}),[we.SEND_MESSAGE_BUTTON]:()=>P.jsx(ws,{}),[we.VOICE_MESSAGE_BUTTON]:()=>P.jsx(vs,{})}),[]),{header:r,chatInput:n,footer:o}=f.useMemo(()=>bs(e,t),[e,t]);return{headerButtons:f.useMemo(()=>r,[r]),chatInputButtons:f.useMemo(()=>n,[n]),footerButtons:f.useMemo(()=>o,[o])}},Zn=()=>{const{settings:e}=te(),{styles:t}=ue(),{setSyncedMessages:r,syncedMessagesRef:n}=jn(),{isLoadingChatHistory:o,setIsLoadingChatHistory:A,hasChatHistoryLoaded:a,setHasChatHistoryLoaded:s}=ke(),{chatBodyRef:i}=Ce(),{dispatchRcbEvent:l}=Ze(),c=f.useCallback(async()=>{var d,u;const p=Kt();if(!p||(d=e.event)!=null&&d.rcbLoadChatHistory&&(await l(z.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;A(!0);const g=((u=i.current)==null?void 0:u.scrollHeight)??0;((v,h,w,E,m,C,k,S,D)=>{var I;if(io=!0,w!=null)try{const Q=gt(P.jsx(Ji,{}),"SYSTEM"),x=m.current.slice(1);E([Q,...x]);const O=w.map(B=>{if(B.type==="object"){const _=lo(B.content,v,h);return{...B,content:_}}return B});setTimeout(()=>{var B;const _=m.current.slice(1);let U=(B=v.chatHistory)!=null&&B.autoLoad?gt(P.jsx(P.Fragment,{}),"SYSTEM"):gt(P.jsx(Xi,{}),"SYSTEM");E([...O,U,..._]),D(!0)},500),setTimeout(()=>{if(!C.current)return;const{scrollHeight:B}=C.current,_=B-k;C.current.scrollTop+=_,S(!1)},510)}catch{ht.removeItem((I=v.chatHistory)==null?void 0:I.storageKey)}})(e,t,p,r,n,i,g,A,s)},[e,t,l,n,i,A,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:A,hasChatHistoryLoaded:a,showChatHistory:c}},Cs=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=ue(),{showChatHistory:A}=Zn(),[a,s]=f.useState(!1),i={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return P.jsx("div",{className:"rcb-view-history-container",children:P.jsx("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:a?i:{...o.chatHistoryButtonStyle},onMouseDown:l=>{l.preventDefault(),A()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:P.jsx("p",{children:(r=n.chatHistory)==null?void 0:r.viewChatHistoryButtonText})})})},Ps=()=>{var e,t,r,n;const o=vn(),{settings:A}=te(),{replaceMessages:a}=St(),{isBotTyping:s,isChatWindowOpen:i,setUnreadCount:l,setSyncedIsChatWindowOpen:c,setSyncedTextAreaDisabled:d,setSyncedAudioToggledOn:u,setSyncedVoiceToggledOn:p,setSyncedIsScrolling:g,syncedIsScrollingRef:v,syncedIsChatWindowOpenRef:h}=ke(),{chatBodyRef:w}=Ce(),{viewportHeight:E,setViewportHeight:m,setViewportWidth:C,scrollToBottom:k}=Ge(),{setUpNotifications:S}=Wn(),{handleFirstInteraction:D}=(()=>{var O;const{settings:B}=te(),{hasInteractedPage:_,setHasInteractedPage:U,hasFlowStarted:N,setHasFlowStarted:F}=ke(),M=f.useCallback(()=>{var L;if(U(!0),!N&&((L=B.general)==null?void 0:L.flowStartTrigger)==="ON_PAGE_INTERACT"&&F(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const y=new window.SpeechSynthesisUtterance;y.text="",y.onend=()=>{window.removeEventListener("click",M),window.removeEventListener("keydown",M),window.removeEventListener("touchstart",M)},window.speechSynthesis.speak(y)},[N,(O=B.general)==null?void 0:O.flowStartTrigger]);return{hasInteractedPage:_,handleFirstInteraction:M}})(),{showChatHistory:I}=Zn(),Q=f.useRef(0),x=f.useRef(!1);f.useEffect(()=>(window.addEventListener("click",D),window.addEventListener("keydown",D),window.addEventListener("touchstart",D),()=>{window.removeEventListener("click",D),window.removeEventListener("keydown",D),window.removeEventListener("touchstart",D)}),[]),f.useEffect(()=>{const O=w.current;if(!O)return;const B=()=>{x.current||(x.current=!0,requestAnimationFrame(()=>{var _,U;if(!O)return;const{scrollTop:N,clientHeight:F,scrollHeight:M}=O,L=N+F<M-(((_=A.chatWindow)==null?void 0:_.messagePromptOffset)??30);g(L),v.current=L,L||(N+F>=M-1&&(O.scrollTop=M-F-1),(h.current||(U=A.general)!=null&&U.embedded)&&l(0)),x.current=!1}))};return O.addEventListener("wheel",B,{passive:!0}),O.addEventListener("touchmove",B,{passive:!0}),()=>{O.removeEventListener("wheel",B),O.removeEventListener("touchmove",B)}},[]),f.useEffect(()=>{var O,B,_;d((O=A.chatInput)==null?void 0:O.disabled),c((B=A.chatWindow)==null?void 0:B.defaultOpen),u((_=A.audio)==null?void 0:_.defaultToggledOn),setTimeout(()=>{var U;p((U=A.voice)==null?void 0:U.defaultToggledOn)},1)},[]),f.useEffect(()=>{var O;(O=A.notification)!=null&&O.disabled||S()},[(e=A.notification)==null?void 0:e.disabled]),f.useEffect(()=>{!v.current&&w!=null&&w.current&&k()},[s]),f.useEffect(()=>{var O,B;if((O=A.chatHistory)!=null&&O.disabled)ht&&ht.removeItem(pn);else if(qn(A),Kt().length>0){const _=gt(P.jsx(Cs,{}),"SYSTEM");a([_]),(B=A.chatHistory)!=null&&B.autoLoad&&I()}},[(t=A.chatHistory)==null?void 0:t.storageKey,(r=A.chatHistory)==null?void 0:r.maxEntries,(n=A.chatHistory)==null?void 0:n.disabled]),f.useEffect(()=>{var O;o||(O=A.general)!=null&&O.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",B=>{if(!B.target)return;const{x:_,y:U,width:N,height:F}=B.target.boundingRect;_==0&&U==0&&N==0&&F==0?(setTimeout(()=>{var M;m((M=window.visualViewport)==null?void 0:M.height)},101),setTimeout(()=>{var M,L;E!=((M=window.visualViewport)==null?void 0:M.height)&&m((L=window.visualViewport)==null?void 0:L.height)},1001)):setTimeout(()=>{var M;m(((M=window.visualViewport)==null?void 0:M.height)-F)},101)}))},[o]),f.useEffect(()=>{var O,B,_,U;if(o)return;i&&(m((O=window.visualViewport)==null?void 0:O.height),C((B=window.visualViewport)==null?void 0:B.width));const N=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),F=()=>Q.current=window.scrollY,M=()=>{var y,V;m((y=window.visualViewport)==null?void 0:y.height),C((V=window.visualViewport)==null?void 0:V.width)},L=()=>{var y;window.removeEventListener("scroll",N),window.removeEventListener("scroll",F),(y=window.visualViewport)==null||y.removeEventListener("resize",M)};return i?(L(),document.body.style.position="fixed",window.addEventListener("scroll",N),(_=window.visualViewport)==null||_.addEventListener("resize",M)):(document.body.style.position="static",L(),window.scrollTo({top:Q.current,left:0,behavior:"auto"}),window.addEventListener("scroll",F),(U=window.visualViewport)==null||U.removeEventListener("resize",M)),L},[i,o])},Ss="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",ks="2592000",ho="RCB_THEME_CACHE_DATA",mo=async(e,t)=>{const{id:r,version:n,baseUrl:o=Ss,cacheDuration:A=ks}=t,a=n||await(async(w,E)=>{const m=`${E}/${w}/meta.json`;try{const C=await fetch(m);return C.ok?(await C.json()).version:(console.error(`Failed to fetch meta.json from ${m}`),null)}catch(C){return console.error(`Failed to fetch meta.json from ${m}`,C),null}})(r,o);if(!a)return console.error(`Unable to find version for theme: ${r}`),{settings:{},inlineStyles:{},cssStylesText:""};const s=((w,E,m)=>{const C=localStorage.getItem(`${ho}_${w}_${E}`);if(!C)return null;try{const k=JSON.parse(C),S=new Date().getTime(),D=Math.floor(S/1e3);return k.cacheDate+m>=D?k:null}catch(k){return console.error(`Unable to fetch cache for ${w}`,k),null}})(r,a,A);if(s){const w=yo(e,s.cssStylesText);return{settings:s.settings,inlineStyles:s.inlineStyles,cssStylesText:w}}const i=`${o}/${r}/${a}/styles.css`,l=`${o}/${r}/${a}/settings.json`,c=`${o}/${r}/${a}/styles.json`;let d="";const u=await fetch(i);u.ok?d=await u.text():console.info(`Could not fetch styles.css from ${i}`);const p=await fetch(l);let g={};p.ok?g=await p.json():console.info(`Could not fetch settings.json from ${l}`);const v=await fetch(c);let h={};return v.ok?h=await v.json():console.info(`Could not fetch styles.json from ${c}`),((w,E,m,C,k)=>{const S=new Date().getTime(),D={settings:m,inlineStyles:C,cssStylesText:k,cacheDate:Math.floor(S/1e3)};localStorage.setItem(`${ho}_${w}_${E}`,JSON.stringify(D))})(r,a,g,h,d),{settings:g,inlineStyles:h,cssStylesText:yo(e,d)}},yo=(e,t)=>t.split(new RegExp("(?<=})")).map(r=>{const n=r.trim();return n.startsWith("@import")||n.startsWith("@keyframes")||n.startsWith("@media")?n:n?`#${e} ${n}`:""}).join(`
|
|
4
|
-
`),
|
|
1
|
+
(function(Ze,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react/jsx-runtime"),require("react"),require("react-dom/client"),require("react-dom/server"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom/client","react-dom/server","react-dom"],D):(Ze=typeof globalThis<"u"?globalThis:Ze||self,D(Ze.AccessQABot={},Ze.jsxRuntime,Ze.React,Ze.ReactDOMClient,Ze.ReactDOMServer,Ze.ReactDOM))})(this,function(Ze,D,v,Vm,rA,oA){"use strict";function iA(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const De=iA(v),sA={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ALLOW_ANON_ACCESS:"true",VITE_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",VITE_TURNSTILE_SITE_KEY:"0x4AAAAAACyJamk8FS7-RSMr"};function Jn(){return Jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jn.apply(null,arguments)}function Li(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}typeof SuppressedError=="function"&&SuppressedError;const Te={AUDIO_BUTTON:"audio-button",NOTIFICATION_BUTTON:"notification-button",CLOSE_CHAT_BUTTON:"close-chat-button",SEND_MESSAGE_BUTTON:"send-button",VOICE_MESSAGE_BUTTON:"voice-button",FILE_ATTACHMENT_BUTTON:"file-attachment-button",EMOJI_PICKER_BUTTON:"emoji-button"},Ni="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%201000%201000'%3e%3crect%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3cg%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-99%20362)%20scale(3.4003)'/%3e%3cpath%20d='M0%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(180%20106%20386)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-46%20282)%20scale(3.4003)'/%3e%3cpath%20d='M19%2065h4l5%204v1H14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-3%20240)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(236%20175)%20scale(3.4003)'/%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20139%20600)%20scale(3.4003)'/%3e%3cpath%20d='M184%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20219%20548)%20scale(3.4003)'/%3e%3cpath%20d='M175%2065h4l5%204v1h-14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20262%20505)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(767%20175)%20scale(3.4003)'/%3e%3crect%20width='116.7'%20height='70'%20x='-58.4'%20y='-35'%20rx='31.5'%20ry='31.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20877)%20scale(3.4003)'/%3e%3crect%20width='60'%20height='20'%20x='-30'%20y='-10'%20rx='3'%20ry='3'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='translate(502%20728)%20scale(3.4003)'/%3e%3ccircle%20r='75'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20473)%20scale(3.4003)'/%3e%3crect%20width='129.4'%20height='82.3'%20x='-64.7'%20y='-41.1'%20rx='37'%20ry='37'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23fff;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3crect%20width='108'%20height='68.6'%20x='-54'%20y='-34.3'%20rx='30.9'%20ry='30.9'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(415%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(591%20464)%20scale(3.4003)'/%3e%3crect%20width='96'%20height='53.2'%20x='-48'%20y='-26.6'%20rx='23.9'%20ry='23.9'%20style='stroke:%23162334;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(503%20875)%20scale(3.4003)'/%3e%3cpath%20stroke-linecap='round'%20d='m68%20215%207-15M81%20222l-7-22M81%20222l7-14M101%20208H87M114%20219l-7-24M113%20219l13-22M131%20214l-5-17M148%20214h-18M69%20214H51M100%20209l7-15'%20style='stroke:%23a478fc;stroke-width:3;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:10;is-custom-font:none;font-file-url:none;fill:none;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3c/g%3e%3c/svg%3e",Fi=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},De.createElement("path",{d:"m478 113-13 2-4 1h4l14-2c10-2 35-2 42-1l6 3 3 1c3 0-4-3-8-5-7-1-34-1-44 1m56 6 8 6c7 5 20 17 20 19s7 12 8 12l-3-6-4-6c0-3-15-17-25-24-5-3-8-4-4-1m-198 16-9 1a512 512 0 0 1 9-1m-180 30a412 412 0 0 0-23 4 167 167 0 0 0-32 8 439 439 0 0 1 46-9 304 304 0 0 1 11-2l6-1h-8m369 8 4 3-7-6c-1 0 0 2 3 3m-439 9c-7 3-18 13-18 15l6-5c5-5 9-8 14-10l6-4-8 4m442 12-10 11-7 6 7-6c7-5 14-14 13-16l-3 5M65 205l-1 11c0 9 0 10 4 17 5 10 7 12 22 11 10 0 15 0 38-5l5-1-6 1-16 2-21 2c-13 1-16-1-21-10-3-5-4-6-4-15l1-12c1-4 1-5-1-1m335 1c3 0 3 1 3 3l-2 6c-2 5-35 39-76 80-53 51-120 117-138 137-21 24-22 25-22 27 0 3 6 9 9 9 4 0 14-8 38-27a5073 5073 0 0 1 15-16 1421 1421 0 0 0-17 15l-31 25-6 2-4-3c-3-3-3-4-2-6 3-8 79-85 160-163 57-57 79-80 79-86 0-2-3-4-7-4-2 0-2 0 1 1m165 18c-9 17-25 32-57 53l-10 8 16-11 12-8c15-10 27-22 39-39 5-7 6-8 4-8l-4 5m-221 2a199 199 0 0 0-19 10 183 183 0 0 1 27-12c0-1-1-1-8 2m-34 16c-3 3-2 3 2 0l1-2-3 2m151 3-1 2 2-2c3-3 2-3-1 0m-16 12-11 10a281 281 0 0 0 11-10m-24 18-7 5-7 5-42 31c-10 7-24 19-22 19l7-6 16-12a343 343 0 0 0 35-25 573 573 0 0 0 20-17m-187 0-2 2 4-2 3-2-5 2m-14 6-3 2 4-1 4-3-5 2m-7 3-8 4-18 8 18-7 7-3 3-1c1-2 0-2-2-1m254 24a2672 2672 0 0 1-71 54 601 601 0 0 0 39-29 1352 1352 0 0 1 32-25m-291-8-2 2 4-2 3-2-5 2m-13 5-2 2h3c5-3 4-4-1-2m-19 9-7 3-13 6c-10 5-13 7-14 10-3 4-2 5 1 0 2-3 5-5 14-9l13-6 12-6-6 2m178 36c-17 12-21 16-21 17a390 390 0 0 1 20-17m-206 34 1 4 1 3 1 5 2 8 1 5v-6l-1-8-2-5-1-4-1-2c-1-2-1-2-1 0m222 23-9 7a683 683 0 0 0-56 44 261 261 0 0 0-26 20 1345 1345 0 0 0-46 34c-6 3-7 3-19 3-11 0-12 0-18-3-8-4-10-8-17-20l-5-10 4 10c5 10 12 18 19 22 4 2 6 2 17 2 13 0 14 0 21-3l26-19 42-33a2183 2183 0 0 0 43-34 643 643 0 0 1 24-20",fill:"#fff",fillRule:"evenodd"}),De.createElement("path",{d:"M478 114a620 620 0 0 1-39 6l-21 3a5481 5481 0 0 0-19 3 870 870 0 0 1-54 8l-1 1-6 1-12 2-13 2a992 992 0 0 0-76 12 400 400 0 0 1-45 8l-6 1-5 1h-3l-3 1-2 1-26 4-13 2-17 3c-23 5-33 9-43 19-7 8-9 13-9 27 0 8 1 9 4 14 5 9 8 11 21 10l21-2a1133 1133 0 0 1 23-4 659 659 0 0 0 74-14l3-1h3l3-1h3l2-1 2-1h3l2-1h2l24-5 38-7a2100 2100 0 0 1 93-18l3-1 10-1a2082 2082 0 0 1 120-17l2 1c2 0 8 5 8 7l1 2 1 6c0 4 0 6-3 10-2 4-16 16-18 16l-7 5-10 8a1070 1070 0 0 0-11 7 113 113 0 0 1-20 14l-2 2-3 2-2 2h-1a154 154 0 0 1-28 21l-5 4-5 4a573 573 0 0 1-50 37 175 175 0 0 0-24 18l-1 2-2 1-2 1-2 1-1 1-12 10a396 396 0 0 0-32 25l-8 6-6 5-9 7a326 326 0 0 1-25 20l-13 12a5073 5073 0 0 0-17 15c-24 20-34 27-39 27-2 0-8-6-8-9 0-2 1-3 22-27 18-20 85-86 138-137 41-41 74-75 76-80l2-6c0-2 0-3-2-3l-7 1a233 233 0 0 1-26 9l-1 1-1 1h-1l-1 1h-2l-3 2-1 1h-2l-3 2h-1l-5 2-22 10-9 4-4 2-5 2-10 4-2 1-2 1-2 1-13 6a334 334 0 0 1-38 17 75 75 0 0 0-14 6l-5 2-4 1-2 1-3 2-7 3-16 6a247 247 0 0 0-32 14l-1 1h-2l-1 1h-2l-1 1-12 6a103 103 0 0 0-27 15l-2 5-1 1v11l1 5 1 5 1 4c0 3 0 4 2 4v3l1 3 1 2 2 10 1 4 1 5 2 10 2 8 1 4 1 4c3 3 9 25 11 38l1 7v2l1 4v1l1 1v2l1 2 1 3v1l5 10c7 13 9 16 17 20 6 3 7 3 18 3 12 0 13 0 19-3 8-4 11-6 26-18a1345 1345 0 0 1 85-67 683 683 0 0 1 50-39l12-9a513 513 0 0 1 44-33 201 201 0 0 0 22-17 2270 2270 0 0 0 73-54 158 158 0 0 0 58-59c2 0 3-9 4-27l-1-19-1-4-1-6-1-3-4-6-4-6c0-2-6-8-13-14a77 77 0 0 0-28-18c-6-1-34-1-43 1"}))),Hi=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M765-321q0 117-84 196-83 80-200 80-118 0-200-80t-83-196v-392q0-85 61-144 61-58 146-58 86 0 147 58 61 59 61 144v374q0 54-39 92-39 37-93 37-55 0-93-37-38-38-38-92v-372h110v372q0 9 6 14t15 5q8 0 15-5t7-14v-374q0-39-29-66t-68-27q-40 0-69 27t-29 66v392q0 71 51 119t122 48q71 0 122-48t51-119v-426h111v426Z"}))),aA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M125-165v-113h77v-273q0-93 55-167 56-75 146-100v-19q0-32 22-55 23-23 55-23t55 23q22 23 22 55v19q90 25 146 99 56 73 56 168v273h77v113H125ZM480-32q-38 0-66-27-27-27-27-66h186q0 39-27 66t-66 27Z"}))),lA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M137-190v-113h78v-253q0-41 11-79 11-39 35-71l-9 150h10L17-802l74-74L873-92l-74 74-175-172H137Zm609-149L319-769q20-15 41-25t44-16v-28q0-32 22-54t54-22q32 0 55 22t22 54v28q85 23 137 94t52 160v217ZM481-47q-38 0-65-27t-27-65h184q0 38-27 65t-65 27Z"}))),cA=v.forwardRef((e,t)=>De.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},De.createElement("g",{strokeLinecap:"round",strokeWidth:10},De.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),AA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),uA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M480-372q-61 0-105-43-43-43-43-105v-240q0-61 43-105 43-43 105-43 61 0 105 43 43 44 43 105v240q0 62-43 105t-105 43ZM425-76v-122q-121-16-197-108t-76-214h109q0 91 64 154t155 63q91 0 155-63t64-154h109q0 122-77 214T534-198v122H425Z"}))),dA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"m763-343-80-79q8-20 13-44 5-23 5-54h109q0 49-11 95t-36 82ZM625-482 336-770v-2q3-56 45-96t101-40q62 0 105 43t43 105v249l-1 17q-1 7-4 12ZM427-76v-122q-120-16-196-108-77-92-77-214h109q0 91 64 154t155 63q43 0 80-14 37-15 67-41l78 79q-35 32-78 53t-93 28v122H427Zm362 27L41-796l75-75 748 748-75 74Z"}))),Ri=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M625-511q29 0 50-21t20-50q0-29-20-50-21-20-50-20t-50 20-20 50q0 29 20 50 21 21 50 21Zm-290 0q29 0 50-21t20-49q0-30-20-50t-50-21q-29 0-50 20-20 21-20 50 0 30 20 50 21 21 50 21Zm145 268q75 0 137-43t85-115H258q24 72 85 115 62 43 137 43Zm0 198q-90 0-170-34-79-34-138-93T79-310q-34-80-34-170t34-170q34-79 93-138t138-93q80-34 170-34t170 34q79 34 138 93t93 138q34 80 34 170t-34 170q-34 79-93 138T650-79q-80 34-170 34Zm0-435Zm0 322q134 0 228-94t94-228q0-134-94-228t-228-94q-134 0-228 94t-94 228q0 134 94 228t228 94Z"}))),fA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M553-64v-108q107-27 173-113 67-87 67-197 0-109-67-195T553-789v-108q152 26 249 144 97 117 97 271 0 155-97 273T553-64ZM61-335v-290h176l236-237v764L237-335H61Zm492 28v-346q51 23 82 70t31 103-31 103q-31 47-82 70Z"}))),pA=v.forwardRef((e,t)=>De.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},De.createElement("path",{d:"M807-15 700-123q-33 21-71 37-38 15-80 22v-108q20-4 38-12l35-17-153-154v257L234-335H57v-290h144L10-818l74-75L882-90l-75 75Zm37-264-80-79q13-30 19-60 7-31 7-64 0-109-68-195-67-86-173-112v-108q152 26 249 144 98 117 98 271 0 55-14 107-13 51-38 96ZM661-462 549-575v-78q51 23 83 70 31 47 31 103l-1 9-1 9ZM469-655 366-759l103-103v207Z"}))),zi={general:{primaryColor:"#42b0c5",secondaryColor:"#491d8d",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",showHeader:!0,showFooter:!0,showInputRow:!0,actionDisabledIcon:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2042%2042'%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:4'%20d='M17%209a8%208%200%200%201-8%208%208%208%200%200%201-8-8%208%208%200%200%201%208-8%208%208%200%200%201%208%208Zm0%200'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:10'%20d='M14.66%2014.66%203.34%203.34'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3c/svg%3e",embedded:!1,flowStartTrigger:"ON_LOAD"},tooltip:{mode:"CLOSE",text:"Talk to me! ๐"},chatButton:{icon:Fi},header:{title:D.jsx("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/","_blank","noopener,noreferrer"),children:"Tan Jin"}),showAvatar:!0,avatar:Ni,buttons:[Te.NOTIFICATION_BUTTON,Te.AUDIO_BUTTON,Te.CLOSE_CHAT_BUTTON],closeChatIcon:cA},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:aA,iconDisabled:lA,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/wEA/f8AAAIA//8GAP7//v/+//b/AQD//wQADgD///3/9/8FAPr/6/8EABAACQD9/wIA/P/5/w4A///t/wQA/P8LAB0ACQD5////AQD2/+7/AgD6//r//v/z/xIA9f8oAAMA4f8OANz/EQAdAAAA5P/w/2MAAQDq/w0A1/8bALz/BgDb/+j/lQD9/yMABAACAA0Alf8NAKr/CwCMAPD/QwDq/wkA9v+g/wgAk/8QAD0ABgAWAAQAMwD7/9T/8//f//z/JwAEAOL/DwBxAAwAzf/+/xUA8v+O//H/fAD5/xUA+/9m//P/yf/r/y8ACAAbAEQA3f9AAAcB9f/p/sD/+QHv/8/9EQCv+ez/j+v8/3pS7/83By4AF6Go/7PNjgDMEn7/Sk0NAeEfIv+9DCwAKfuY/9fRAv2A3mjzfQg/Ft3fzTQE703jljkirPskFOdBEUYzORerLDvvDg7C6dcbwNJj/b/CisId8XfblBZS/oYksP1YRdoQJjjDJbwGNSTX66wU48FG8Iu1eM+/5ITdKwGN8jUTGfehN3oUszrBH7kmdhFKB+YNheG6B9fOivltwZ38JMcC66z7o9pJNBnxgTdvCjIvJg+GG7MMlQUJFJL5hCZ61IQap7895EXN8Msh6NjdpxE07wU5Nf+kRH8Q2TrWHZkYhSYj5ygQgMu19dK86/YRw8j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OwDY/yIA1v/m/+T/t/8NAJr/KQCp/ykA6f8NACsA7v9bANv/XgDz/0UABwAQABUA1f8BALH/7/+u/+T/xf/0/+7/GwAfAC4APgAiAFUACABDANr/KgDW//D/4f+6/woAo/8kAKX/KwDh/xQAGQDz/1sA3P9aAOz/QgACACIAAgDn/wIAv//1/6n/6f+///L/3f8VAA4ALgA0ACYAVQAOAEgA6/8wANL/AQDc/8b/+f+k/x0Anf8oAND/HwAMAPf/SADw/2AA8v9KAPX/KgD3//H/+P/F//z/rv/i/7r/6v/Z/wYABwAoADAAKQBOABkATAD0/zQA1P8PANv/0//v/6//FwCi/ywAxP8oAPn//v82APT/WwD4/00A+/8yAPv//f/8/83/+v+w/+T/sf/j/9b/AQACACoAIgAtAEIAHwBPAAEAQADe/xcA0v/k/+X/t/8IAKv/IgC//yEA6/8EACMA9/9PAPf/VAD+/zcA+/8JAPn/1P8AALf/6f+w/+P/zf////j/HAAdAC0APgAfAEsABwBCAOP/IADV/+//2v/B//3/rP8PALv/GADd/xEAFgABAEMABABaAP//QgACABcA+//n/wAAwP/w/67/4v+///3/6f8WABcAKQA0ACIARgAQAEcA8f8pANn/9f/U/87/7f+v/wgAtP8RANP/FgANAAIAOQACAFQA/f9HAAAAIAABAO3//P/E/wEAs//q/7n/9P/i/wYAEQAZADEAJABBABMASAAAADEA3/8CANL/1v/g/7H/AACy/w8Axf8ZAPv/CQAzAAIAVQD//1AAAAAsAAIA9v/7/8r/AwC2//P/tf/m/+H/AwADABEAKQApADoAHgBHAAgAPADr/wkA1//f/93/vP/6/7L/CgDA/x4A7/8hACkAAgBPAPz/UgD1/zIABAAEAPz/0v/5/7f/AACy//H/2f/+/wEAAAAkABUAMwAdADoAEQA9APD/EADU//L/1P/H/+z/tf8LALv/HADk/ygAGgADAEMA//9TAPn/QAAAABAAAQDc//z/wf8DALD/7P/Q//z/9/8HABoAFgA3ACMAMAAOADwA+P8ZANv/+P/Y/9H/5v+8/wUAu/8WANf/HgAMAAoAPQABAFM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d//3/6P8CAAYA/f8YAAwALwAZACUA9v8bAPj/AwDq/+r/7P/S//7/1/8EAOX/CQD6//7/GQAFAC8AAQApAAEAGQACAAMAAgDm/wEAzv8BANv//v/p/wIA//8BABMABQArACAALAABAB4A8f8NAOv/7v/m/9n/+P/R/wMA4f8OAPT/AQATAAMAKwAHACoAAwAbAAMABQADAO7/AQDU/wEA2f8AAOL////3////EgAAACUAGgAvAAUAHQD2/xIA9f/0//T/3P/4/8///f/h/wIA7f8AAAoAAQApAAQALQADACAAAgAPAP//9P///9r//f/T/wAA3f/9//D/AQAQAP//HAAHAC8ACQAfAPv/GAD+//f/+P/j/wEA0v/+/9n/AADq/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:fA,iconDisabled:pA},chatHistory:{disabled:!1,maxEntries:30,storageKey:"rcb-history",storageType:"LOCAL_STORAGE",viewChatHistoryButtonText:"Load Chat History โณ",chatHistoryLineBreakText:"----- Previous Chat History -----",autoLoad:!1},chatInput:{disabled:!1,allowNewline:!1,enabledPlaceholderText:"Type your message...",disabledPlaceholderText:"",showCharacterCount:!1,characterLimit:-1,botDelay:1e3,sendButtonIcon:AA,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[Te.VOICE_MESSAGE_BUTTON,Te.SEND_MESSAGE_BUTTON]},chatWindow:{showScrollbar:!1,showTypingIndicator:!0,autoJumpToBottom:!1,showMessagePrompt:!0,messagePromptText:"New Messages โ",messagePromptOffset:30,defaultOpen:!1},sensitiveInput:{maskInTextArea:!0,maskInUserBubble:!0,asterisksCount:10,hideInUserBubble:!1},userBubble:{animate:!0,showAvatar:!1,avatar:"data:image/svg+xml,%3csvg%20width='140'%20height='140'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cy='60.044'%20cx='70'%20fill='%235c5c5c'%20r='29'/%3e%3cpath%20d='m16.36%20156.186-.01-30.5c-.005-16.844%2024.168-30.507%2053.991-30.516%2029.823-.009%2054.004%2013.64%2054.01%2030.484l.008%2030.5-108%20.032z'%20fill='%235c5c5c'/%3e%3c/svg%3e",simulateStream:!1,streamSpeed:30},botBubble:{animate:!0,showAvatar:!1,avatar:Ni,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:uA,iconDisabled:dA},footer:{text:D.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[D.jsx("span",{children:"Powered By "},0),D.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:D.jsx(Fi,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),D.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[Te.FILE_ATTACHMENT_BUTTON,Te.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:Hi,iconDisabled:Hi,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Ri,iconDisabled:Ri,list:["๐","๐","๐","๐
","๐","๐","๐","๐","๐คฃ","๐","๐ฅฐ","๐ฅณ","๐","๐","๐","โญ๏ธ"]},toast:{maxCount:3,forbidOnMax:!1,dismissOnClick:!0},event:{rcbPreInjectMessage:!1,rcbPostInjectMessage:!1,rcbStartSimulateStreamMessage:!1,rcbStopSimulateStreamMessage:!1,rcbStartStreamMessage:!1,rcbChunkStreamMessage:!1,rcbStopStreamMessage:!1,rcbRemoveMessage:!1,rcbSaveChatHistory:!1,rcbLoadChatHistory:!1,rcbToggleChatWindow:!1,rcbStartSpeakAudio:!1,rcbToggleAudio:!1,rcbToggleNotifications:!1,rcbToggleVoice:!1,rcbChangePath:!1,rcbShowToast:!1,rcbDismissToast:!1,rcbUserSubmitText:!1,rcbUserUploadFile:!1,rcbTextAreaChangeValue:!1,rcbPreLoadChatBot:!1,rcbPostLoadChatBot:!1,rcbPreProcessBlock:!1,rcbPostProcessBlock:!1},ariaLabel:{chatButton:"open chat",audioButton:"toggle audio",closeChatButton:"close chat",emojiButton:"emoji picker",fileAttachmentButton:"upload file",notificationButton:"toggle notifications",sendButton:"send message",voiceButton:"toggle voice",inputTextArea:"input text area"},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!0}},Ui=v.createContext({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),se=()=>v.useContext(Ui),hA=({children:e,settings:t=zi,setSyncedSettings:n,syncedSettingsRef:r})=>D.jsx(Ui.Provider,{value:{settings:t,setSyncedSettings:n,syncedSettingsRef:r},children:e}),ji={tooltipStyle:{},notificationBadgeStyle:{},chatWindowStyle:{},headerStyle:{},bodyStyle:{},chatInputContainerStyle:{},chatInputAreaStyle:{},chatInputAreaFocusedStyle:{},chatInputAreaDisabledStyle:{},userBubbleStyle:{},botBubbleStyle:{},botOptionStyle:{},botOptionHoveredStyle:{},botCheckboxRowStyle:{},botCheckboxNextStyle:{},botCheckMarkStyle:{},botCheckMarkSelectedStyle:{},characterLimitStyle:{},characterLimitReachedStyle:{},chatHistoryLineBreakStyle:{},chatMessagePromptStyle:{},chatMessagePromptHoveredStyle:{},footerStyle:{},loadingSpinnerStyle:{},mediaDisplayContainerStyle:{},chatButtonStyle:{},chatButtonHoveredStyle:{},chatHistoryButtonStyle:{},chatHistoryButtonHoveredStyle:{},sendButtonStyle:{},sendButtonHoveredStyle:{},sendButtonDisabledStyle:{},audioButtonStyle:{},audioButtonDisabledStyle:{},closeChatButtonStyle:{},emojiButtonStyle:{},emojiButtonDisabledStyle:{},fileAttachmentButtonStyle:{},fileAttachmentButtonDisabledStyle:{},notificationButtonStyle:{},notificationButtonDisabledStyle:{},voiceButtonStyle:{},voiceButtonDisabledStyle:{},chatIconStyle:{},audioIconStyle:{},audioIconDisabledStyle:{},closeChatIconStyle:{},emojiIconStyle:{},emojiIconDisabledStyle:{},fileAttachmentIconStyle:{},fileAttachmentIconDisabledStyle:{},notificationIconStyle:{},notificationIconDisabledStyle:{},voiceIconStyle:{},voiceIconDisabledStyle:{},sendIconStyle:{},sendIconDisabledStyle:{},sendIconHoveredStyle:{},rcbTypingIndicatorContainerStyle:{},rcbTypingIndicatorDotStyle:{},toastPromptContainerStyle:{},toastPromptStyle:{},toastPromptHoveredStyle:{}},qi=v.createContext({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),ye=()=>v.useContext(qi),gA=({children:e,styles:t=ji,setSyncedStyles:n,syncedStylesRef:r})=>D.jsx(qi.Provider,{value:{styles:t,setSyncedStyles:n,syncedStylesRef:r},children:e}),mA=({buttons:e})=>{var t,n,r,o,i,s,a;const{settings:l}=se(),{styles:A}=ye(),c={backgroundImage:`linear-gradient(to right, ${(t=l.general)==null?void 0:t.secondaryColor},
|
|
2
|
+
${(n=l.general)==null?void 0:n.primaryColor})`,...A.headerStyle};return D.jsxs("div",{style:c,className:"rcb-chat-header-container",children:[D.jsxs("div",{className:"rcb-chat-header",children:[((r=l.header)==null?void 0:r.showAvatar)&&D.jsx("div",{style:{backgroundImage:`url("${(o=l.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),v.isValidElement((i=l.header)==null?void 0:i.title)?(s=l.header)==null?void 0:s.title:D.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(a=l.header)==null?void 0:a.title})]}),D.jsx("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((d,u)=>D.jsx(v.Fragment,{children:d},u))})]})},Wi=v.createContext({}),Le=()=>v.useContext(Wi),yA=({children:e,botIdRef:t,flowRef:n})=>{const r=v.useRef(null),o=v.useRef(""),i=v.useRef(null),s=v.useRef(new Map),a=v.useRef(null),l=v.useRef(""),A=v.useRef(!1),c=v.useRef(null),d=v.useRef(null),u=v.useRef(null);return D.jsx(Wi.Provider,{value:{botIdRef:t,flowRef:n,inputRef:r,timeoutIdRef:i,streamMessageMap:s,chatBodyRef:a,paramsInputRef:l,keepVoiceOnRef:A,audioContextRef:c,audioBufferRef:d,gainNodeRef:u,prevInputRef:o},children:e})},it=e=>{const[t,n]=v.useState(e),r=v.useRef(e);return[t,o=>{const i=typeof o=="function"?o(r.current):o;r.current=i,n(i)},r]},Gi=v.createContext({}),Re=()=>v.useContext(Gi),vA=({children:e,settings:t})=>{var n,r,o,i,s,a;const[l,A,c]=it(!1),[d,u,f]=it(((n=t==null?void 0:t.chatWindow)==null?void 0:n.defaultOpen)??!1),[p,w,h]=it(((r=t==null?void 0:t.audio)==null?void 0:r.defaultToggledOn)??!1),[b,x,g]=it(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[k,S,E]=it(((i=t==null?void 0:t.notification)==null?void 0:i.defaultToggledOn)??!0),[B,C]=v.useState(!1),[M,T]=v.useState(!1),[Q,I,O]=it(!1),[z,L,_]=it(!0),[F,H,m]=it(!1),[W,y]=v.useState(!1),[V,X]=v.useState(!1),[Z,$]=v.useState(0),[he,Ae]=v.useState(0),[Je,Qe]=v.useState(!1),[He,G]=v.useState(((s=window.visualViewport)==null?void 0:s.height)??window.innerHeight),[K,fe]=v.useState(((a=window.visualViewport)==null?void 0:a.width)??window.innerWidth);return D.jsx(Gi.Provider,{value:{isBotTyping:l,setSyncedIsBotTyping:A,syncedIsBotTypingRef:c,isChatWindowOpen:d,setSyncedIsChatWindowOpen:u,syncedIsChatWindowOpenRef:f,audioToggledOn:p,setSyncedAudioToggledOn:w,syncedAudioToggledOnRef:h,voiceToggledOn:b,setSyncedVoiceToggledOn:x,syncedVoiceToggledOnRef:g,notificationsToggledOn:k,setSyncedNotificationsToggledOn:S,syncedNotificationsToggledOnRef:E,isLoadingChatHistory:B,setIsLoadingChatHistory:C,hasChatHistoryLoaded:M,setHasChatHistoryLoaded:T,isScrolling:Q,setSyncedIsScrolling:I,syncedIsScrollingRef:O,textAreaDisabled:z,setSyncedTextAreaDisabled:L,syncedTextAreaDisabledRef:_,textAreaSensitiveMode:F,setSyncedTextAreaSensitiveMode:H,syncedTextAreaSensitiveModeRef:m,hasInteractedPage:W,setHasInteractedPage:y,hasFlowStarted:V,setHasFlowStarted:X,unreadCount:Z,setUnreadCount:$,inputLength:he,setInputLength:Ae,blockAllowsAttachment:Je,setBlockAllowsAttachment:Qe,viewportHeight:He,setViewportHeight:G,viewportWidth:K,setViewportWidth:fe},children:e})};var Y=(e=>(e.START_SPEAK_AUDIO="rcb-start-speak-audio",e.TOGGLE_AUDIO="rcb-toggle-audio",e.TOGGLE_NOTIFICATIONS="rcb-toggle-notifications",e.TOGGLE_VOICE="rcb-toggle-voice",e.TOGGLE_CHAT_WINDOW="rcb-toggle-chat-window",e.PRE_INJECT_MESSAGE="rcb-pre-inject-message",e.POST_INJECT_MESSAGE="rcb-post-inject-message",e.START_SIMULATE_STREAM_MESSAGE="rcb-start-simulate-stream-message",e.STOP_SIMULATE_STREAM_MESSAGE="rcb-stop-simulate-stream-message",e.START_STREAM_MESSAGE="rcb-start-stream-message",e.CHUNK_STREAM_MESSAGE="rcb-chunk-stream-message",e.STOP_STREAM_MESSAGE="rcb-stop-stream-message",e.REMOVE_MESSAGE="rcb-remove-message",e.SAVE_CHAT_HISTORY="rcb-save-chat-history",e.LOAD_CHAT_HISTORY="rcb-load-chat-history",e.CHANGE_PATH="rcb-change-path",e.SHOW_TOAST="rcb-show-toast",e.DISMISS_TOAST="rcb-dismiss-toast",e.USER_SUBMIT_TEXT="rcb-user-submit-text",e.USER_UPLOAD_FILE="rcb-user-upload-file",e.TEXT_AREA_CHANGE_VALUE="rcb-text-area-change-value",e.PRE_LOAD_CHATBOT="rcb-pre-load-chatbot",e.POST_LOAD_CHATBOT="rcb-post-load-chatbot",e.PRE_PROCESS_BLOCK="rcb-pre-process-block",e.POST_PROCESS_BLOCK="rcb-post-process-block",e))(Y||{});const wA={[Y.START_SPEAK_AUDIO]:!0,[Y.TOGGLE_AUDIO]:!0,[Y.TOGGLE_VOICE]:!0,[Y.TOGGLE_NOTIFICATIONS]:!0,[Y.TOGGLE_CHAT_WINDOW]:!0,[Y.PRE_INJECT_MESSAGE]:!0,[Y.POST_INJECT_MESSAGE]:!1,[Y.PRE_LOAD_CHATBOT]:!0,[Y.POST_LOAD_CHATBOT]:!1,[Y.START_SIMULATE_STREAM_MESSAGE]:!0,[Y.STOP_SIMULATE_STREAM_MESSAGE]:!1,[Y.START_STREAM_MESSAGE]:!0,[Y.CHUNK_STREAM_MESSAGE]:!0,[Y.STOP_STREAM_MESSAGE]:!0,[Y.REMOVE_MESSAGE]:!0,[Y.SAVE_CHAT_HISTORY]:!0,[Y.LOAD_CHAT_HISTORY]:!0,[Y.CHANGE_PATH]:!0,[Y.SHOW_TOAST]:!0,[Y.DISMISS_TOAST]:!0,[Y.USER_SUBMIT_TEXT]:!0,[Y.USER_UPLOAD_FILE]:!0,[Y.TEXT_AREA_CHANGE_VALUE]:!0,[Y.PRE_PROCESS_BLOCK]:!0,[Y.POST_PROCESS_BLOCK]:!0},qr=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:wA[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},Vi=v.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),Pn=()=>v.useContext(Vi),bA=({children:e})=>{const[t,n,r]=it([]);return D.jsx(Vi.Provider,{value:{paths:t,setSyncedPaths:n,syncedPathsRef:r},children:e})},gt=()=>{const{botIdRef:e}=Le(),{syncedPathsRef:t}=Pn(),n=v.useCallback(()=>t.current.length>0?t.current.at(-1)??null:null,[]),r=v.useCallback(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:v.useCallback(async(o,i)=>{const s={botId:e.current,currPath:n(),prevPath:r()};return await qr(o,s,i)},[e])}},st=()=>{const{settings:e}=se(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,viewportHeight:r,setViewportHeight:o,viewportWidth:i,setViewportWidth:s,setUnreadCount:a,setSyncedIsBotTyping:l,setSyncedIsScrolling:A,syncedIsBotTypingRef:c,syncedIsChatWindowOpenRef:d}=Re(),{chatBodyRef:u}=Le(),{dispatchRcbEvent:f}=gt(),p=v.useCallback(()=>{if(!u.current)return!1;const g=u.current.getBoundingClientRect(),k=window.innerHeight??document.documentElement.clientHeight,S=window.innerWidth??document.documentElement.clientWidth;return g.top>=0&&g.left>=0&&g.bottom<=k&&g.right<=S},[u]),w=v.useCallback(async g=>{var k;g!==d.current&&((k=e.event)!=null&&k.rcbToggleChatWindow&&(await f(Y.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||n(S=>(S||a(0),!S)))},[d]),h=v.useCallback(async g=>{g!==c.current&&l(k=>!k)},[c]),b=v.useCallback((g,k,S,E)=>(g/=E/2)<1?S/2*g*g+k:-S/2*(--g*(g-2)-1)+k,[]),x=v.useCallback((g=0)=>{if(!u.current)return;const k=u.current.scrollHeight-u.current.clientHeight;if(g<=0)return u.current.scrollTop=k,void A(!1);const S=u.current.scrollTop,E=k-S;let B=0;const C=()=>{if(!u.current)return;B+=20;const M=b(B,S,E,g);u.current.scrollTop=M,B<g?requestAnimationFrame(C):A(!1)};C()},[u]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,toggleChatWindow:w,viewportHeight:r,setViewportHeight:o,viewportWidth:i,setViewportWidth:s,toggleIsBotTyping:h,scrollToBottom:x,getIsChatBotVisible:p}},kA=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),{unreadCount:i,isScrolling:s}=Re(),{chatBodyRef:a}=Le(),{scrollToBottom:l}=st(),[A,c]=v.useState(!1),d={color:(e=r.general)==null?void 0:e.primaryColor,borderColor:(t=r.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return D.jsx("div",{className:"rcb-message-prompt-container "+(a.current&&((u=r.chatWindow)!=null&&u.showMessagePrompt)&&s&&i>0?"visible":"hidden"),children:D.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:A?d:{...o.chatMessagePromptStyle},onMouseDown:f=>{f.preventDefault(),l(600)},className:"rcb-message-prompt-text",children:(n=r.chatWindow)==null?void 0:n.messagePromptText})});var u},Yi=v.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),Wr=()=>v.useContext(Yi),xA=({children:e})=>{const[t,n,r]=it([]);return D.jsx(Yi.Provider,{value:{messages:t,setSyncedMessages:n,syncedMessagesRef:r},children:e})},EA=({message:e,isNewSender:t})=>{var n,r,o,i,s,a;const{settings:l}=se(),{styles:A}=ye(),c=typeof e.content=="string",d=e.content,u=e.contentWrapper?D.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:(n=l.general)==null?void 0:n.primaryColor,color:"#fff",maxWidth:(r=l.userBubble)!=null&&r.showAvatar?"65%":"70%",...A.userBubbleStyle},p=(o=l.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",w=((i=l.userBubble)==null?void 0:i.showAvatar)&&t,h="rcb-user-message"+(!t&&(s=l.userBubble)!=null&&s.showAvatar?" rcb-user-message-offset":"");return D.jsxs("div",{className:"rcb-user-message-container",children:[c?D.jsx("div",{style:f,className:`${h} ${p}`,children:u}):D.jsx(D.Fragment,{children:u}),w&&D.jsx("div",{style:{backgroundImage:`url("${(a=l.userBubble)==null?void 0:a.avatar}")`},className:"rcb-message-user-avatar"})]})},CA=({message:e,isNewSender:t})=>{var n,r,o,i,s,a;const{settings:l}=se(),{styles:A}=ye(),c=typeof e.content=="string",d=e.content,u=e.contentWrapper?D.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:(n=l.general)==null?void 0:n.secondaryColor,color:"#fff",maxWidth:(r=l.botBubble)!=null&&r.showAvatar?"65%":"70%",...A.botBubbleStyle},p=(o=l.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",w=((i=l.botBubble)==null?void 0:i.showAvatar)&&t,h="rcb-bot-message"+(!t&&(s=l.botBubble)!=null&&s.showAvatar?" rcb-bot-message-offset":"");return D.jsxs("div",{className:"rcb-bot-message-container",children:[w&&D.jsx("div",{style:{backgroundImage:`url("${(a=l.botBubble)==null?void 0:a.avatar}")`},className:"rcb-message-bot-avatar"}),c?D.jsx("div",{style:f,className:`${h} ${p}`,children:u}):D.jsx(D.Fragment,{children:u})]})},SA=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),i=(e=r.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return D.jsxs("div",{className:"rcb-bot-message-container",children:[((t=r.botBubble)==null?void 0:t.showAvatar)&&D.jsx("div",{style:{backgroundImage:`url("${(n=r.botBubble)==null?void 0:n.avatar}")`},className:"rcb-message-bot-avatar"}),D.jsx("div",{onMouseDown:s=>{s.preventDefault()},className:`rcb-bot-message ${i}`,children:D.jsxs("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[D.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),D.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),D.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},PA=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),{messages:i}=Wr(),{scrollToBottom:s}=st(),{isBotTyping:a,syncedIsScrollingRef:l}=Re(),{chatBodyRef:A}=Le(),c={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=r.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return v.useEffect(()=>{l.current||s()},[(t=A.current)==null?void 0:t.scrollHeight]),D.jsxs("div",{style:c,className:"rcb-chat-body-container",ref:A,children:[i.map((d,u)=>{const f=(p=>p===0||i[p].sender!==i[p-1].sender)(u);return d.sender.toUpperCase()==="USER"?D.jsx(EA,{message:d,isNewSender:f},u):d.sender.toUpperCase()==="BOT"?D.jsx(CA,{message:d,isNewSender:f},u):D.jsx("div",{children:d.content},u)}),a&&((n=r.chatWindow)==null?void 0:n.showTypingIndicator)&&D.jsx(SA,{}),D.jsx(kA,{})]})},DA=({checkboxes:e,checkedItems:t,path:n})=>{var r,o,i,s,a,l,A,c,d,u,f;const{settings:p}=se(),{styles:w}=ye(),{paths:h}=Pn(),{handleSubmitText:b}=ln(),[x,g]=v.useState(new Set),[k,S]=v.useState(!1),E={cursor:k?`url("${(r=p.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(o=p.general)==null?void 0:o.primaryColor,borderColor:(i=p.general)==null?void 0:i.primaryColor,...w.botCheckboxRowStyle},B={cursor:k||x.size<e.min?`url("${(s=p.general)==null?void 0:s.actionDisabledIcon}"), auto`:"pointer",color:(a=p.general)==null?void 0:a.primaryColor,borderColor:(l=p.general)==null?void 0:l.primaryColor,...w.botCheckboxNextStyle},C={cursor:k?`url("${(A=p.general)==null?void 0:A.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...w.botCheckMarkStyle},M={cursor:k?`url("${(c=p.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(d=p.general)==null?void 0:d.primaryColor,backgroundColor:(u=p.general)==null?void 0:u.primaryColor,...w.botCheckMarkSelectedStyle};return v.useEffect(()=>{h.length>0&&h[h.length-1]!==n&&S(!e.reusable)},[h]),D.jsxs("div",{className:"rcb-checkbox-container "+((f=p.botBubble)!=null&&f.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(T=>D.jsx("div",{onMouseDown:Q=>{Q.preventDefault(),(I=>{k||g(O=>{const z=new Set(O);if(z.has(I))t.delete(I),z.delete(I);else{if(x.size==e.max)return O;t.add(I),z.add(I)}return z})})(T)},style:E,className:"rcb-checkbox-row-container",children:D.jsxs("div",{className:"rcb-checkbox-row",children:[D.jsx("div",{style:x.has(T)?M:C,className:"rcb-checkbox-mark"}),D.jsx("div",{className:"rcb-checkbox-label",children:T})]})},T)),D.jsx("div",{style:B,className:"rcb-checkbox-next-button",onMouseDown:T=>{var Q;if(T.preventDefault(),k||x.size<e.min)return;const I=Array.from(t).join(", ");let O;S(!e.reusable),O=e.sendOutput!=null?e.sendOutput:((Q=p.chatInput)==null?void 0:Q.sendCheckboxOutput)??!0,b(I,O)}})]})},IA=async(e,t)=>{const n=e.checkboxes;if(!n)return;let r;if(typeof n=="function"?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||r.items.length==0)return;r.min==null&&(r.min=1),r.max==null&&(r.max=r.items.length),r.min>r.max&&(r.min=r.max),r.reusable==null&&(r.reusable=!1);const o=new Set,i=t.currPath,s=D.jsx(DA,{checkboxes:r,checkedItems:o,path:i});await t.injectMessage(s)},BA=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},TA=async(e,t,n)=>{const r=e.message;if(!r)return;if(typeof r=="string")return void(r.trim()!==""&&(n?await t.simulateStreamMessage(r):await t.injectMessage(r)));let o=r(t);o instanceof Promise&&(o=await o),typeof o=="string"&&o.trim()!==""&&(n?await t.simulateStreamMessage(o):await t.injectMessage(o))},MA=({options:e,path:t})=>{var n,r,o,i,s,a;const{settings:l}=se(),{styles:A}=ye(),{paths:c}=Pn(),{handleSubmitText:d}=ln(),[u,f]=v.useState([]),[p,w]=v.useState(!1),h={cursor:p?`url("${(n=l.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(r=l.general)==null?void 0:r.primaryColor,borderColor:(o=l.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...A.botOptionStyle},b={color:"#fff",borderColor:(i=l.general)==null?void 0:i.primaryColor,backgroundColor:(s=l.general)==null?void 0:s.primaryColor,...A.botOptionHoveredStyle};return v.useEffect(()=>{c.length>0&&c[c.length-1]!==t&&w(!e.reusable)},[c]),D.jsx("div",{className:"rcb-options-container "+((a=l.botBubble)!=null&&a.showAvatar?"rcb-options-offset":""),children:e.items.map((x,g)=>{const k=u[g]&&!p;return D.jsx("div",{className:"rcb-options",style:k?b:h,onMouseEnter:()=>(S=>{f(E=>{const B=[...E];return B[S]=!0,B})})(g),onMouseLeave:()=>(S=>{f(E=>{const B=[...E];return B[S]=!1,B})})(g),onMouseDown:S=>{var E;if(S.preventDefault(),p)return;let B;w(!e.reusable),B=e.sendOutput!=null?e.sendOutput:((E=l.chatInput)==null?void 0:E.sendOptionOutput)??!0,d(x,B)},children:x},x)})})},QA=async(e,t)=>{const n=e.options;if(!n)return;let r;if(typeof n=="function"?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||r.items.length==0)return;r.reusable==null&&(r.reusable=!1);const o=t.currPath,i=D.jsx(MA,{options:r,path:o});await t.injectMessage(i)},OA=async(e,t)=>{const n=e.component;if(n){if(typeof n=="function"){let r=n(t);return r instanceof Promise&&(r=await r),r?void await t.injectMessage(r):void 0}await t.injectMessage(n)}},_A=async(e,t,n,r)=>{const o=e.transition;let i;if(typeof o=="function"?(i=o(t),i instanceof Promise&&(i=await i)):i=o,typeof i=="number"&&(i={duration:i}),!i||i instanceof Promise||i.duration==null||typeof i.duration!="number")return;i.interruptable==null&&(i.interruptable=!1);const s=setTimeout(async()=>{const a=await r(e);a&&await Xi(a,t)},i.duration);i.interruptable&&(n.current=s)},LA=async(e,t,n)=>{const r=e.chatDisabled;if(r==null)return;let o;typeof r=="function"?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},Ki=async(e,t,n)=>{const r=e.isSensitive;if(!r)return void n(!1);let o;typeof r=="function"?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},Xi=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const n=Object.keys(e);for(const r of n)r==="function"&&await BA(e,t);n.includes("path")&&await(async(r,o)=>{const i=r.path;if(!i)return!1;if(typeof i=="string")return await o.goToPath(i),!0;let s=i(o);if(s instanceof Promise&&(s=await s),!s)return!1;const a=s;return await o.goToPath(a),!0})(e,t)},NA=()=>{var e;const{settings:t}=se(),{styles:n}=ye();return D.jsx("div",{className:"rcb-line-break-container",children:D.jsx("div",{style:{...n.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:(e=t.chatHistory)==null?void 0:e.chatHistoryLineBreakText})})},FA=()=>{var e;const{settings:t}=se(),{styles:n}=ye(),r={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...n.loadingSpinnerStyle};return D.jsx("div",{className:"rcb-spinner-container",children:D.jsx("div",{style:r,className:"rcb-spinner"})})},Zn=()=>{try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=crypto.getRandomValues(new Uint8Array(1))[0]%16;return(t==="x"?n:3&n|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},Lt=(e,t)=>({id:Zn(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let Nt,Ji=!1,$n="rcb-history",er=30,Zi=!1,tr=[];const Dn=()=>tr,Gr=e=>{$i(e),tr=e},$i=e=>{Nt&&Nt.setItem($n,JSON.stringify(e))},Vr=e=>{var t,n,r,o,i;Nt=((n=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:n.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,$n=(r=e.chatHistory)==null?void 0:r.storageKey,er=(o=e.chatHistory)==null?void 0:o.maxEntries,Zi=(i=e.chatHistory)==null?void 0:i.disabled,tr=(s=>{if(s!=null)try{return JSON.parse(s)}catch{return[]}return[]})(Nt.getItem($n))},HA=e=>v.isValidElement(e.content)?structuredClone({id:e.id,content:rA.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,es=(e,t,n)=>{const r=new DOMParser().parseFromString(e,"text/html");return Array.from(r.body.childNodes).map((o,i)=>{var s;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const a=o.tagName.toLowerCase();let l=Array.from(o.attributes).reduce((A,c)=>{const d=c.name.toLowerCase();if(d==="style"){const u=c.value.split(";").filter(p=>p.trim()!==""),f={};u.forEach(p=>{const[w,h]=p.split(":").map(x=>x.trim()),b=w.replace(/-([a-z])/g,(x,g)=>g.toUpperCase());f[b]=h}),A[d]=f}else a!=="audio"&&a!=="video"||d!=="controls"||c.value!==""?A[d]=c.value:A[d]="true";return A},{});if(Object.prototype.hasOwnProperty.call(l,"class")){const A=o.classList;l.className=A.toString(),delete l.class,(s=t.botBubble)!=null&&s.showAvatar&&(l=RA(A,l)),l=zA(A,l,t,n),l=UA(A,l,t,n),l=jA(A,l,t,n),l=qA(A,l,t,n)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(a))return v.createElement(a,{key:i,...l});{const A=es(o.innerHTML,t,n);return v.createElement(a,{key:i,...l},...A)}}})},RA=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),zA=(e,t,n,r)=>{var o,i,s,a,l;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=r.botOptionStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((s=r.botOptionStyle)==null?void 0:s.color)??((a=n.general)==null?void 0:a.primaryColor),cursor:`url("${(l=n.general)==null?void 0:l.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},UA=(e,t,n,r)=>{var o,i,s,a,l;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=r.botCheckboxRowStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((s=r.botCheckboxRowStyle)==null?void 0:s.color)??((a=n.general)==null?void 0:a.primaryColor),cursor:`url("${(l=n.general)==null?void 0:l.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},jA=(e,t,n,r)=>{var o,i,s,a,l;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=r.botCheckboxNextStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((s=r.botCheckboxNextStyle)==null?void 0:s.color)??((a=n.general)==null?void 0:a.primaryColor),cursor:`url("${(l=n.general)==null?void 0:l.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},qA=(e,t,n,r)=>{var o,i;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:(o=n.general)==null?void 0:o.primaryColor,maxWidth:(i=n.userBubble)!=null&&i.showAvatar?"65%":"70%",...r.mediaDisplayContainerStyle}),t},Yr=()=>{const{settings:e}=se(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:n,hasInteractedPage:r,unreadCount:o,setUnreadCount:i,syncedNotificationsToggledOnRef:s}=Re(),{audioBufferRef:a,audioContextRef:l,gainNodeRef:A}=Le(),{dispatchRcbEvent:c}=gt(),d=v.useCallback(async()=>{var f,p;const w=(f=e.notification)==null?void 0:f.sound;l.current=new AudioContext;const h=l.current.createGain();let b;if(h.gain.value=((p=e.notification)==null?void 0:p.volume)??.2,A.current=h,w!=null&&w.startsWith("data:audio")){const x=atob(w.split(",")[1]),g=new ArrayBuffer(x.length),k=new Uint8Array(g);for(let S=0;S<x.length;S++)k[S]=x.charCodeAt(S);b=g}else b=await(await fetch(w)).arrayBuffer();a.current=await l.current.decodeAudioData(b)},[e.notification]),u=v.useCallback(()=>{var f;if((f=e.notification)!=null&&f.disabled||!s.current||!r||!l.current||!a.current)return;const p=l.current.createBufferSource();p.buffer=a.current,p.connect(A.current).connect(l.current.destination),p.start()},[e.notification,s,r,l,a,A]);return{unreadCount:o,setUnreadCount:i,notificationsToggledOn:t,toggleNotifications:v.useCallback(async f=>{var p;f!==s.current&&((p=e.event)!=null&&p.rcbToggleNotifications&&(await c(Y.TOGGLE_NOTIFICATIONS,{currState:s.current,newState:!s.current})).defaultPrevented||n(w=>!w))},[s]),playNotificationSound:u,setUpNotifications:d}},WA=(e,t)=>{var n,r,o,i;((s,a,l,A,c)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const d=new window.SpeechSynthesisUtterance;d.text=s,d.lang=a,d.rate=A,d.volume=c;let u=!1;for(const f of l){const p=window.speechSynthesis.getVoices().find(w=>w.name===f);if(p){d.voice=p,window.speechSynthesis.speak(d),u=!0;break}}u||window.speechSynthesis.speak(d)})(t,(n=e.audio)==null?void 0:n.language,(r=e.audio)==null?void 0:r.voiceNames,(o=e.audio)==null?void 0:o.rate,(i=e.audio)==null?void 0:i.volume)},ts=()=>{const{settings:e}=se(),{audioToggledOn:t,setSyncedAudioToggledOn:n,syncedAudioToggledOnRef:r}=Re(),{dispatchRcbEvent:o}=gt(),i=v.useCallback(async a=>{var l;a!==r.current&&((l=e.event)!=null&&l.rcbToggleAudio&&(await o(Y.TOGGLE_AUDIO,{currState:r.current,newState:!r.current})).defaultPrevented||n(A=>!A))},[r]),s=v.useCallback(async a=>{var l,A;if((l=e.audio)!=null&&l.disabled||!r.current)return;let c=a;if((A=e.event)!=null&&A.rcbStartSpeakAudio){const d=await o(Y.START_SPEAK_AUDIO,{textToRead:c});if(d.defaultPrevented)return;c=d.data.textToRead}WA(e,c)},[e,r]);return{audioToggledOn:t,speakAudio:s,toggleAudio:i}},Xt=()=>{var e,t,n;const{settings:r}=se(),{messages:o,setSyncedMessages:i,syncedMessagesRef:s}=Wr(),{setSyncedIsBotTyping:a,setUnreadCount:l,syncedIsScrollingRef:A,syncedIsChatWindowOpenRef:c}=Re(),{streamMessageMap:d,chatBodyRef:u,paramsInputRef:f}=Le(),{scrollToBottom:p,getIsChatBotVisible:w}=st(),{dispatchRcbEvent:h}=gt(),{speakAudio:b}=ts(),{playNotificationSound:x}=Yr(),g=v.useCallback(async I=>{var O,z;if((O=r.event)!=null&&O.rcbSaveChatHistory){const L=await h(Y.SAVE_CHAT_HISTORY,{messages:I});if(L.defaultPrevented)return;I=((z=L.data)==null?void 0:z.messages)??I}await(async L=>{if(Zi||!Nt)return;const _=[];for(let H=L.length-1;H>=0;H--){const m=L[H];if(m.sender.toUpperCase()!=="SYSTEM"&&(m.content!==""&&_.unshift(m),_.length===er))break}let F=_.map(HA);if(!Ji&&F.length<er){const H=er-F.length;F=[...tr.slice(-H),...F]}$i(F)})(I)},[h,(e=r.event)==null?void 0:e.rcbSaveChatHistory]),k=v.useCallback((I,O=!1)=>{var z,L;g(I);let _=!0;const F=I[I.length-1];if(!F)return;const H=F.sender.toUpperCase();H==="USER"&&(_=!1),(z=r.general)!=null&&z.embedded&&w()&&(_=!1),(c.current&&!A.current||O)&&(_=!1),_&&x(),!O&&(H!=="USER"&&(L=r.chatWindow)!=null&&L.autoJumpToBottom||H==="USER"||!A.current)&&setTimeout(()=>p(),1)},[r,u,c,A,x,p,w]),S=v.useCallback(async(I,O="BOT",z=null)=>{var L,_,F,H,m;if(typeof I!="string")throw new Error("Content must be of type string to simulate stream.");O=O.toUpperCase();let W=Lt(I,O);if((L=r.event)!=null&&L.rcbStartSimulateStreamMessage){const Ae=await h(Y.START_SIMULATE_STREAM_MESSAGE,{message:W});if(Ae.defaultPrevented)return null;z=Ae.data.simulateStreamChunker||z,W=Ae.data.message}a(!1);let y=30;y=O==="BOT"?(_=r.botBubble)==null?void 0:_.streamSpeed:(F=r.userBubble)==null?void 0:F.streamSpeed;const V={...W,content:""};i(Ae=>[...Ae,V]),k(s.current);let X=W.content;z&&(X=z(X));let Z=0;const $=X.length;W.sender.toUpperCase()==="BOT"&&(c.current||(H=r.general)!=null&&H.embedded)&&typeof W.content=="string"&&W.content.trim()!==""&&b(W.content);const he=new Promise(Ae=>{const Je=setInterval(()=>{if(Z>=$)return clearInterval(Je),void Ae();i(Qe=>{const He=[...Qe];for(let G=He.length-1;G>=0;G--)if(He[G].id===V.id){const K=X[Z];K&&(V.content+=K,He[G]=V),Z++;break}return He})},y)});return(A.current||!c.current)&&l(Ae=>Ae+1),await he,g(s.current),(m=r.event)!=null&&m.rcbStopSimulateStreamMessage&&await h(Y.STOP_SIMULATE_STREAM_MESSAGE,{message:W}),O==="USER"&&(f.current=I),W},[r,h,k,s,f,a,l,c,b]),E=v.useCallback(async(I,O="BOT")=>{var z,L,_;O=O.toUpperCase();let F=Lt(I,O);if((z=r.event)!=null&&z.rcbPreInjectMessage){const H=await h(Y.PRE_INJECT_MESSAGE,{message:F});if(H.defaultPrevented)return null;F=H.data.message}return F.sender.toUpperCase()==="BOT"&&(c.current||(L=r.general)!=null&&L.embedded)&&typeof F.content=="string"&&F.content.trim()!==""&&b(F.content),(A.current||!c.current)&&l(H=>H+1),(_=r.event)!=null&&_.rcbPostInjectMessage&&await h(Y.POST_INJECT_MESSAGE,{message:F}),i(H=>[...H,F]),k(s.current),O==="USER"&&typeof I=="string"&&(f.current=I),F},[r,h,k,f,s,c,b,l]),B=v.useCallback(async I=>{var O;let z=s.current.find(F=>F.id===I),L=null,_=!1;return z||(L=Dn(),z=L.find(F=>F.id===I),z&&(_=!0)),!z||(O=r.event)!=null&&O.rcbRemoveMessage&&(await h(Y.REMOVE_MESSAGE,{message:z})).defaultPrevented?null:_?(L&&Gr(L.filter(F=>F.id!==I)),z):(i(F=>F.filter(H=>H.id!==I)),k(s.current),l(F=>Math.max(F-1,0)),z)},[h,(t=r.event)==null?void 0:t.rcbRemoveMessage,k,s,l,Dn,Gr]),C=v.useCallback(async(I,O="BOT")=>{var z,L;if(O=O.toUpperCase(),!d.current.has(O)){const F=Lt(I,O);return(z=r.event)!=null&&z.rcbStartStreamMessage&&(await h(Y.START_STREAM_MESSAGE,{message:F})).defaultPrevented?null:(a(!1),i(H=>[...H,F]),k(s.current),d.current.set(O,F.id),(A.current||!c.current)&&l(H=>H+1),F)}const _={...Lt(I,O),id:d.current.get(O)};return(L=r.event)!=null&&L.rcbChunkStreamMessage&&(await h(Y.CHUNK_STREAM_MESSAGE,{message:_})).defaultPrevented?null:(i(F=>F.map(H=>H.id===_.id?_:H)),k(s.current,!0),_)},[h,r.event,k,s,a,l,d]),M=v.useCallback(async(I="BOT")=>{var O;if(I=I.toUpperCase(),!d.current.has(I))return!0;const z=d.current.get(I);let L;for(let _=0;_<3;_++){const F=s.current.find(H=>H.id===z);F&&(L=F),await new Promise(H=>setTimeout(H,20))}return((O=r.event)==null||!O.rcbStopStreamMessage||!(await h(Y.STOP_STREAM_MESSAGE,{message:L})).defaultPrevented)&&(d.current.delete(I),g(s.current),I==="USER"&&typeof(L==null?void 0:L.content)=="string"&&(f.current=L.content),!0)},[h,(n=r.event)==null?void 0:n.rcbStopStreamMessage,d,f]),T=v.useCallback(I=>{const O=typeof I=="function"?I(s.current):I;i(O),k(O)},[k,s]),Q=v.useCallback((I,O,z=0)=>{var L;const _=s.current,F=I?I.toUpperCase():null,H=[];let m=z;for(let W=_.length-1;W>=0;W--){const y=_[W];if(!F||((L=y==null?void 0:y.sender)==null?void 0:L.toUpperCase())===F){if(m>0){m--;continue}if(H.push(y),O!==void 0&&H.length===O)break}}return H.length>0?H:null},[s]);return{simulateStreamMessage:S,injectMessage:E,removeMessage:B,streamMessage:C,endStreamMessage:M,replaceMessages:T,getMessages:Q,messages:o}};let Kr,vt,nr,Ft=!1,wt=null;const Xr=()=>{if(!Kr){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Kr=e!=null?new e:null}return Kr},GA=(e,t,n,r,o,i)=>{var s,a,l;const A=Xr();if(!A)return;if(!Ft)try{Ft=!0,A.lang=(s=e.voice)==null?void 0:s.language,A.start()}catch{}const c=(a=e.voice)==null?void 0:a.timeoutPeriod,d=(l=e.voice)==null?void 0:l.autoSendPeriod;A.onresult=u=>{var f,p;clearTimeout(vt),vt=null,clearTimeout(nr);const w=u.results[u.results.length-1][0].transcript;if(i.current){const h=(f=e.chatInput)==null?void 0:f.characterLimit,b=i.current.value+w;h!=null&&h>=0&&b.length>h?r(b.slice(0,h)):r(b),o(i.current.value.length)}c&&(vt=setTimeout(async()=>await Zr(t,i),c)),(p=e.voice)!=null&&p.autoSendDisabled||(nr=setTimeout(n,d))},A.onend=()=>{Ft?(A.start(),!vt&&c&&(vt=setTimeout(async()=>await Zr(t,i),c))):(clearTimeout(vt),vt=null,clearTimeout(nr))},c&&(vt=setTimeout(async()=>await Zr(t,i),c))},VA=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(n=>{if(wt=new MediaRecorder(n),!Ft)try{Ft=!0,wt.start()}catch{}wt.ondataavailable=r=>{t.current&&t.current.push(r.data)},wt.onstop=()=>{e(),n.getTracks().forEach(r=>r.stop())}}).catch(n=>{console.error("Unable to use microphone:",n)})},Jr=()=>{const e=Xr();e&&(Ft=!1,e&&e.stop(),wt&&wt.state!=="inactive"&&(wt.stop(),wt=null),clearTimeout(vt),vt=null,clearTimeout(nr))},Zr=async(e,t)=>{var n;(n=t.current)!=null&&n.disabled||await e(),Jr()},$r=()=>{const{settings:e}=se(),{voiceToggledOn:t,setSyncedVoiceToggledOn:n,syncedVoiceToggledOnRef:r}=Re(),{dispatchRcbEvent:o}=gt(),i=v.useCallback(async a=>{var l;a!==r.current&&((l=e.event)!=null&&l.rcbToggleVoice&&(await o(Y.TOGGLE_VOICE,{currState:r.current,newState:!r.current})).defaultPrevented||n(A=>!A))},[r]),s=v.useCallback(a=>{((l,A)=>{var c,d,u;const f=Xr();(c=A.voice)!=null&&c.disabled||(d=A.chatInput)==null||!d.blockSpam||!f||(l&&!Ft?(Ft=!0,(u=A.voice)!=null&&u.sendAsAudio?wt==null||wt.start():f.start()):l||Jr())})(a,e)},[e]);return{voiceToggledOn:t,toggleVoice:i,syncVoice:s}},Jt=()=>{var e;const{settings:t}=se(),{inputLength:n,setInputLength:r,textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:s,setSyncedTextAreaSensitiveMode:a,syncedTextAreaDisabledRef:l,syncedTextAreaSensitiveModeRef:A}=Re(),{inputRef:c,chatBodyRef:d,prevInputRef:u}=Le(),{dispatchRcbEvent:f}=gt(),{getIsChatBotVisible:p}=st(),w=v.useCallback(async E=>{var B,C,M;if(l.current&&c.current)c.current.value="";else if(c.current&&u.current!==null){const T=(B=t.chatInput)==null?void 0:B.characterLimit,Q=(C=t.chatInput)!=null&&C.allowNewline?E:E.replace(/\n/g," ");if(T!=null&&T>=0&&Q.length>T?c.current.value=Q.slice(0,T):c.current.value=Q,(M=t.event)!=null&&M.rcbTextAreaChangeValue&&(await f(Y.TEXT_AREA_CHANGE_VALUE,{currValue:c.current.value,prevValue:u.current})).defaultPrevented)return void(c.current.value=u.current);u.current=c.current.value}},[l,c,u,t,f]),h=v.useCallback(E=>{var B;(B=c.current)!=null&&B.disabled||setTimeout(()=>{var C,M,T;(C=t.general)!=null&&C.embedded?p()&&((M=c.current)==null||M.focus()):E!=="start"&&((T=c.current)==null||T.focus())},100)},[c,(e=t.general)==null?void 0:e.embedded,d,p]),b=v.useCallback(()=>{c.current&&c.current.focus()},[]),x=v.useCallback(()=>{c.current&&c.current.blur()},[]),g=v.useCallback(()=>c&&c.current?c.current.value:"",[]),k=v.useCallback(E=>{E!==l.current&&i(B=>!B)},[l]),S=v.useCallback(E=>{E!==A.current&&a(B=>!B)},[A]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:s,setSyncedTextAreaSensitiveMode:a,inputLength:n,setInputLength:r,getTextAreaValue:g,setTextAreaValue:w,updateTextAreaFocus:h,focusTextArea:b,blurTextArea:x,toggleTextAreaDisabled:k,toggleTextAreaSensitiveMode:S}},ns=v.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),rs=()=>v.useContext(ns),YA=({children:e})=>{const[t,n,r]=it([]);return D.jsx(ns.Provider,{value:{toasts:t,setSyncedToasts:n,syncedToastsRef:r},children:e})},an=()=>{const{settings:e}=se(),{toasts:t,setSyncedToasts:n,syncedToastsRef:r}=rs(),{dispatchRcbEvent:o}=gt(),i=v.useCallback(async(l,A)=>{var c,d,u,f;let p=null;if(r.current.length>=(((c=e.toast)==null?void 0:c.maxCount)??3)){if((d=e.toast)!=null&&d.forbidOnMax)return null;p=Zn();let h={id:p,content:l,timeout:A};if((u=e.event)!=null&&u.rcbShowToast){const b=await o(Y.SHOW_TOAST,{toast:h});if(b.defaultPrevented)return null;h=b.data.toast}return n(b=>[...b.slice(1),h]),p}p=Zn();let w={id:p,content:l,timeout:A};if((f=e.event)!=null&&f.rcbShowToast){const h=await o(Y.SHOW_TOAST,{toast:w});if(h.defaultPrevented)return null;w=h.data.toast}return n(h=>[...h,w]),p},[e,o]),s=v.useCallback(async l=>{var A;const c=r.current.find(d=>d.id===l);return!c||(A=e.event)!=null&&A.rcbDismissToast&&(await o(Y.DISMISS_TOAST,{toast:c})).defaultPrevented?null:(n(d=>d.filter(u=>u.id!==l)),l)},[o]),a=v.useCallback(l=>{const A=typeof l=="function"?l(r.current):l;n(A)},[r]);return{showToast:i,dismissToast:s,toasts:t,replaceToasts:a}},rr=()=>{var e,t,n,r,o;const{settings:i}=se(),{paths:s,setSyncedPaths:a,syncedPathsRef:l}=Pn(),{flowRef:A,streamMessageMap:c,paramsInputRef:d,keepVoiceOnRef:u,timeoutIdRef:f}=Le(),{setSyncedIsBotTyping:p,setSyncedTextAreaDisabled:w,setSyncedTextAreaSensitiveMode:h,blockAllowsAttachment:b,setBlockAllowsAttachment:x}=Re(),{dispatchRcbEvent:g}=gt(),{endStreamMessage:k,injectMessage:S,removeMessage:E,simulateStreamMessage:B,streamMessage:C}=Xt(),{showToast:M,dismissToast:T}=an(),{toggleChatWindow:Q}=st(),{updateTextAreaFocus:I,setTextAreaValue:O}=Jt(),{syncVoice:z}=$r(),L=v.useCallback(async y=>{var V;if((V=i.event)!=null&&V.rcbPostProcessBlock){const X=await g(Y.POST_PROCESS_BLOCK,{block:y});if(X.defaultPrevented)return null;y=X.data.block}return y},[(e=i.event)==null?void 0:e.rcbPostProcessBlock,g]),_=v.useCallback(async(y,V)=>{var X,Z,$,he;if(!y)return;let Ae=A.current[y];if(!Ae)return void p(!1);if((X=i.event)!=null&&X.rcbPreProcessBlock){const Qe=await g(Y.PRE_PROCESS_BLOCK,{block:Ae});if(Qe.defaultPrevented)return;Ae=Qe.data.block}p(!0),(Z=i.chatInput)!=null&&Z.blockSpam&&w(!0),h(!1);const Je={prevPath:V,currPath:y,goToPath:m,setTextAreaValue:O,userInput:d.current,endStreamMessage:k,injectMessage:S,removeMessage:E,simulateStreamMessage:B,streamMessage:C,toggleChatWindow:Q,showToast:M,dismissToast:T};await(async(Qe,He,G,K,fe,oe,ve)=>{if(!Qe)throw new Error("Block is not valid.");for(const me of Object.keys(Qe))switch(me){case"message":await TA(Qe,He,G);break;case"options":await QA(Qe,He);break;case"checkboxes":await IA(Qe,He);break;case"component":await OA(Qe,He);break;case"chatDisabled":await LA(Qe,He,fe);break;case"isSensitive":await Ki(Qe,He,oe);break;case"transition":await _A(Qe,He,K,ve)}})(Ae,Je,(($=i.botBubble)==null?void 0:$.simulateStream)??!1,f,w,h,L),p(!1),"chatDisabled"in Ae||w((he=i.chatInput)==null?void 0:he.disabled),"isSensitive"in Ae||h(!1),x(typeof Ae.file=="function"),I(y),z(u.current&&!Ae.chatDisabled),y!==V&&c.current.clear()},[A,I,z,(t=i.botBubble)==null?void 0:t.simulateStream,(n=i.chatInput)==null?void 0:n.disabled,d,k,S,E,B,C,Q,M,T,u,c]),F=v.useCallback(()=>l.current.length>0?l.current.at(-1)??null:null,[]),H=v.useCallback(()=>l.current.length>1?l.current.at(-2)??null:null,[]),m=v.useCallback(async y=>{var V;const X=F(),Z=H();return((V=i.event)==null||!V.rcbChangePath||!(await g(Y.CHANGE_PATH,{currPath:X,prevPath:Z,nextPath:y})).defaultPrevented)&&(a($=>[...$,y]),await _(y,X),!0)},[(r=i.chatInput)==null?void 0:r.blockSpam,(o=i.event)==null?void 0:o.rcbChangePath,_,g]),W=v.useCallback(y=>{const V=typeof y=="function"?y(l.current):y;a(V)},[l]);return{getCurrPath:F,getPrevPath:H,goToPath:m,blockAllowsAttachment:b,setBlockAllowsAttachment:x,paths:s,replacePaths:W,firePostProcessBlockEvent:L}},ln=()=>{var e,t,n,r;const{settings:o}=se(),{endStreamMessage:i,injectMessage:s,removeMessage:a,simulateStreamMessage:l,streamMessage:A}=Xt(),{syncedPathsRef:c}=Pn(),{getCurrPath:d,getPrevPath:u,goToPath:f,firePostProcessBlockEvent:p}=rr(),{setSyncedTextAreaSensitiveMode:w,setSyncedTextAreaDisabled:h,setSyncedIsBotTyping:b,setBlockAllowsAttachment:x,setInputLength:g,syncedVoiceToggledOnRef:k,syncedTextAreaSensitiveModeRef:S}=Re(),{flowRef:E,inputRef:B,keepVoiceOnRef:C,paramsInputRef:M,timeoutIdRef:T}=Le(),{showToast:Q,dismissToast:I}=an(),{dispatchRcbEvent:O}=gt(),{syncVoice:z}=$r(),{setTextAreaValue:L}=Jt(),{toggleChatWindow:_}=st(),F=v.useCallback(async m=>{var W,y,V,X,Z,$;const he=d();if(he&&E.current[he]){if(S.current){if((W=o==null?void 0:o.sensitiveInput)!=null&&W.hideInUserBubble)return;if((y=o==null?void 0:o.sensitiveInput)!=null&&y.maskInUserBubble)return void((V=o.userBubble)!=null&&V.simulateStream?await l("*".repeat(((X=o.sensitiveInput)==null?void 0:X.asterisksCount)??10),"USER"):await s("*".repeat(((Z=o.sensitiveInput)==null?void 0:Z.asterisksCount)??10),"USER"))}($=o.userBubble)!=null&&$.simulateStream?await l(m,"USER"):await s(m,"USER")}},[E,d,o,s,l,S]),H=v.useCallback(async(m,W=!0)=>{var y,V;if((m=m.trim())==="")return;W&&await F(m),T.current&&clearTimeout(T.current),B.current&&(L(""),g(0));const X=d();if(!X)return;let Z=E.current[X];const $=await p(Z);$&&((y=o.chatInput)!=null&&y.blockSpam&&h(!0),C.current=k.current,z(!1),setTimeout(()=>{b(!0)},400),w(!1),setTimeout(async()=>{var he;const Ae={prevPath:u(),currPath:d(),goToPath:f,setTextAreaValue:L,userInput:M.current,injectMessage:s,simulateStreamMessage:l,streamMessage:A,removeMessage:a,endStreamMessage:i,toggleChatWindow:_,showToast:Q,dismissToast:I},Je=c.current.length;await Xi($,Ae),c.current.length===Je&&(h("chatDisabled"in Z?!!Z.chatDisabled:!((he=o.chatInput)==null||!he.disabled)),Ki(Z,Ae,w),x(typeof Z.file=="function"),z(C.current),b(!1))},(V=o.chatInput)==null?void 0:V.botDelay))},[T,(e=o.chatInput)==null?void 0:e.blockSpam,(t=o.chatInput)==null?void 0:t.botDelay,(n=o.chatInput)==null?void 0:n.disabled,C,k,z,F,u,d,f,s,l,A,a,i,_,Q,I,E]);return{handleSubmitText:v.useCallback(async(m,W=!0)=>{var y,V;m=m??((y=B.current)==null?void 0:y.value),!((V=o.event)!=null&&V.rcbUserSubmitText&&(await O(Y.USER_SUBMIT_TEXT,{inputText:m,sendInChat:W})).defaultPrevented||!d())&&H(m,W)},[O,d,H,B,(r=o.event)==null?void 0:r.rcbUserSubmitText])}},or=()=>{var e;const{settings:t}=se();return v.useMemo(()=>{var n;if(typeof window>"u"||!window.navigator)return!1;if((n=t.device)==null||!n.applyMobileOptimizations)return!0;const r=navigator.userAgent,o=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r),i=window.innerWidth>=768;return o&&i},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},KA=({buttons:e})=>{var t,n,r,o,i,s,a,l,A,c,d;const u=or(),{settings:f}=se(),{styles:p}=ye(),{textAreaDisabled:w,textAreaSensitiveMode:h,inputLength:b,hasFlowStarted:x,setHasFlowStarted:g,setInputLength:k}=Re(),{inputRef:S}=Le(),[E,B]=v.useState(!1),[C,M]=v.useState(!1),{handleSubmitText:T}=ln(),{setTextAreaValue:Q}=Jt(),I={boxSizing:u?"content-box":"border-box",...p.chatInputAreaStyle},O={outline:w?"":"none",boxShadow:w?"":`0 0 5px ${(t=f.general)==null?void 0:t.primaryColor}`,boxSizing:u?"content-box":"border-box",...p.chatInputAreaStyle,...p.chatInputAreaFocusedStyle},z={cursor:`url("${(n=f.general)==null?void 0:n.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:u?"content-box":"border-box",...p.chatInputAreaStyle,...p.chatInputAreaDisabledStyle},L={color:"#989898",...p.characterLimitStyle},_={color:"#ff0000",...p.characterLimitReachedStyle},F=w?(r=f.chatInput)==null?void 0:r.disabledPlaceholderText:(o=f.chatInput)==null?void 0:o.enabledPlaceholderText,H=()=>{w||B(!0)},m=()=>{B(!1)},W=()=>{M(!0)},y=()=>{M(!1)},V=async Z=>{var $;if(!C&&Z.key==="Enter"){if(Z.shiftKey)return void(($=f.chatInput)!=null&&$.allowNewline||Z.preventDefault());Z.preventDefault(),await T()}},X=Z=>{S.current&&(Q(Z.target.value),k(S.current.value.length))};return D.jsxs("div",{"aria-label":((i=f.ariaLabel)==null?void 0:i.inputTextArea)??"input text area",role:"textbox",onMouseDown:Z=>{var $;Z.stopPropagation(),!x&&(($=f.general)==null?void 0:$.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&g(!0)},style:{...p.chatInputContainerStyle},className:"rcb-chat-input",children:[h&&(s=f.sensitiveInput)!=null&&s.maskInTextArea?D.jsx("input",{ref:S,type:"password",className:"rcb-chat-input-textarea",style:w?z:E?O:I,placeholder:F,onChange:X,onKeyDown:V,onFocus:H,onBlur:m,onCompositionStart:W,onCompositionEnd:y}):D.jsx("textarea",{ref:S,style:w?z:E?O:I,rows:1,className:"rcb-chat-input-textarea",placeholder:F,onChange:X,onKeyDown:V,onFocus:H,onBlur:m,onCompositionStart:W,onCompositionEnd:y}),D.jsxs(D.Fragment,{children:[e==null?void 0:e.map((Z,$)=>D.jsx(v.Fragment,{children:Z},$)),((a=f.chatInput)==null?void 0:a.showCharacterCount)&&((l=f.chatInput)==null?void 0:l.characterLimit)!=null&&((A=f.chatInput)==null?void 0:A.characterLimit)>0&&D.jsxs("div",{className:"rcb-chat-input-char-counter",style:b>=((c=f.chatInput)==null?void 0:c.characterLimit)?_:L,children:[b,"/",(d=f.chatInput)==null?void 0:d.characterLimit]})]})]})},XA=({buttons:e})=>{var t;const{settings:n}=se(),{styles:r}=ye();return D.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...r.footerStyle},className:"rcb-chat-footer-container",children:[D.jsx("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,i)=>D.jsx(v.Fragment,{children:o},i))}),D.jsx("span",{children:(t=n.footer)==null?void 0:t.text})]})},JA=()=>{var e,t,n,r,o,i,s;const{settings:a}=se(),{styles:l}=ye(),{unreadCount:A}=Re(),{isChatWindowOpen:c,toggleChatWindow:d}=st(),[u,f]=v.useState(!1),p={backgroundImage:`linear-gradient(to right, ${(e=a.general)==null?void 0:e.secondaryColor},
|
|
3
|
+
${(t=a.general)==null?void 0:t.primaryColor})`,...l.chatButtonStyle},w={transform:"scale(1.05)",...p,...l.chatButtonHoveredStyle},h={backgroundImage:`url(${(n=a.chatButton)==null?void 0:n.icon})`,fill:"#fff",width:75,height:75,...l.chatIconStyle};return D.jsx(D.Fragment,{children:!((r=a.general)!=null&&r.embedded)&&D.jsxs("div",{"aria-label":((o=a.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:u?w:p,className:"rcb-toggle-button "+(c?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onClick:()=>d(!0),children:[(()=>{var b;const x=(b=a.chatButton)==null?void 0:b.icon;return x&&typeof x!="string"?x&&D.jsx("span",{className:"rcb-toggle-icon",children:D.jsx(x,{style:h})}):D.jsx("span",{className:"rcb-toggle-icon",style:h})})(),!((i=a.notification)!=null&&i.disabled)&&((s=a.notification)==null?void 0:s.showCount)&&D.jsx("span",{style:{...l.notificationBadgeStyle},className:"rcb-badge",children:A})]})})},ZA=()=>{var e,t,n,r,o,i;const s=or(),{settings:a}=se(),{styles:l}=ye(),{chatBodyRef:A}=Le(),{isChatWindowOpen:c,toggleChatWindow:d}=st(),[u,f]=v.useState(!1),[p,w]=v.useState(!1),[h,b]=v.useState(0);v.useEffect(()=>{var k,S,E;const B=(k=a.tooltip)==null?void 0:k.mode;if(B==="ALWAYS")if(s){let C;C=c?(((S=A.current)==null?void 0:S.offsetWidth)??375)-(typeof((E=l.chatButtonStyle)==null?void 0:E.width)=="number"?l.chatButtonStyle.width:75):0,b(C),f(!0)}else f(!c);else B==="NEVER"?f(!1):B==="START"?p?f(!1):(w(!0),f(!0)):B==="CLOSE"&&f(!c)},[c,s,p,(e=l.chatButtonStyle)==null?void 0:e.width,(t=a.tooltip)==null?void 0:t.mode]);const x={transform:`translateX(-${h}px)`,right:(((n=l.chatButtonStyle)==null?void 0:n.width)??75)+40,bottom:30,backgroundColor:(r=a.general)==null?void 0:r.secondaryColor,color:"#fff",...l.tooltipStyle},g={borderColor:`transparent transparent transparent ${x.backgroundColor}`};return D.jsx(D.Fragment,{children:!((o=a.general)!=null&&o.embedded)&&D.jsxs("div",{"data-testid":"chat-tooltip",style:x,className:"rcb-chat-tooltip "+(u?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>d(!0),children:[D.jsx("span",{children:(i=a.tooltip)==null?void 0:i.text}),D.jsx("span",{className:"rcb-chat-tooltip-tail",style:g})]})})},$A=({id:e,content:t,timeout:n})=>{var r,o;const{settings:i}=se(),{styles:s}=ye(),[a]=v.useState({toastPromptStyle:{...s.toastPromptStyle},toastPromptHoveredStyle:{...s.toastPromptHoveredStyle}}),{dismissToast:l}=an(),[A,c]=v.useState(!1),d={color:(r=i.general)==null?void 0:r.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,...a.toastPromptHoveredStyle};return v.useEffect(()=>{if(n){const u=setTimeout(()=>{l(e)},n);return()=>clearTimeout(u)}},[e,l,n]),typeof t=="string"?D.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:A?d:a.toastPromptStyle,onMouseDown:async u=>{var f;(f=i.toast)!=null&&f.dismissOnClick&&(u.preventDefault(),await l(e))},className:"rcb-toast-prompt",children:t}):D.jsx(D.Fragment,{children:t})},eu=()=>{var e,t,n,r,o,i,s,a,l,A,c,d;const{styles:u}=ye(),{toasts:f}=rs(),p={bottom:`calc(${typeof((e=u.footerStyle)==null?void 0:e.height)=="number"?`${(t=u.footerStyle)==null?void 0:t.height}px`:((n=u.footerStyle)==null?void 0:n.height)??"50px"} + ${typeof((r=u.chatInputContainerStyle)==null?void 0:r.height)=="number"?`${(o=u.chatInputContainerStyle)==null?void 0:o.height}px`:((i=u.chatInputContainerStyle)==null?void 0:i.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((s=u.chatWindowStyle)==null?void 0:s.width)=="number"?`${(a=u.chatWindowStyle)==null?void 0:a.width}px`:((l=u.chatWindowStyle)==null?void 0:l.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((A=u.chatWindowStyle)==null?void 0:A.width)=="number"?`${(c=u.chatWindowStyle)==null?void 0:c.width}px`:((d=u.chatWindowStyle)==null?void 0:d.width)??"375px"} - 50px)`,...u.toastPromptContainerStyle};return D.jsx("div",{className:"rcb-toast-prompt-container",style:p,children:f.map(w=>D.jsx($A,{id:w.id,content:w.content,timeout:w.timeout},w.id))})},os=({file:e,fileType:t,fileUrl:n})=>{var r,o,i;const{settings:s}=se(),{styles:a}=ye(),l={backgroundColor:(r=s.general)==null?void 0:r.primaryColor,maxWidth:(o=s.userBubble)!=null&&o.showAvatar?"65%":"70%",...a.mediaDisplayContainerStyle};return D.jsx(D.Fragment,{children:n?D.jsxs(D.Fragment,{children:[t==="image"&&n&&D.jsx("div",{style:l,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:D.jsx("img",{src:n,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&n&&D.jsx("div",{style:l,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:D.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[D.jsx("source",{src:n,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&n&&D.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(i=s.userBubble)!=null&&i.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[D.jsx("source",{src:n,type:e.type}),"Your browser does not support the audio tag."]})]}):D.jsx(D.Fragment,{})})},is=async e=>{if(!e)return{fileType:null,fileUrl:null};const t=e.type.split("/")[0];if(!["image","video","audio"].includes(t))return{fileType:null,fileUrl:null};try{return{fileType:t,fileUrl:await new Promise((n,r)=>{const o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(new Error("File reading failed")),o.readAsDataURL(e)})}}catch(n){return console.error(n),{fileType:null,fileUrl:null}}},tu=()=>{var e,t,n,r,o,i;const{settings:s}=se(),{styles:a}=ye(),{injectMessage:l,simulateStreamMessage:A,streamMessage:c,removeMessage:d,endStreamMessage:u}=Xt(),{getCurrPath:f,getPrevPath:p,goToPath:w,blockAllowsAttachment:h}=rr(),{flowRef:b,inputRef:x}=Le(),g=b.current,{showToast:k,dismissToast:S}=an(),{dispatchRcbEvent:E}=gt(),{toggleChatWindow:B}=st(),{setTextAreaValue:C}=Jt(),{handleSubmitText:M}=ln(),T={cursor:`url("${(e=s.general)==null?void 0:e.actionDisabledIcon}"), auto`,...a.fileAttachmentButtonStyle,...a.fileAttachmentButtonDisabledStyle},Q={backgroundImage:`url(${(t=s.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...a.fileAttachmentIconStyle},I={backgroundImage:`url(${(n=s.fileAttachment)==null?void 0:n.icon})`,fill:"#a6a6a6",...a.fileAttachmentIconStyle,...a.fileAttachmentIconDisabledStyle};return D.jsxs("label",{"aria-label":((r=s.ariaLabel)==null?void 0:r.fileAttachmentButton)??"upload file",role:"button",className:h?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:h?{...a.fileAttachmentButtonStyle}:T,children:[D.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async O=>{var z,L,_,F;const H=O.target.files;if(!H)return;const m=Array.from(H);if(O.target.value="",(z=s.event)!=null&&z.rcbUserUploadFile&&(await E(Y.USER_UPLOAD_FILE,{files:m})).defaultPrevented)return;const W=f();if(!W)return;const y=g[W];if(!y)return;const V=y.file;if(V!=null){const X=[];for(let Z=0;Z<m.length;Z++){if(X.push(m[Z].name),(L=s.fileAttachment)==null||!L.showMediaDisplay)continue;const $=await is(m[Z]);!$.fileType||!$.fileUrl||await l(D.jsx(os,{file:m[Z],fileType:$.fileType,fileUrl:$.fileUrl}),"USER")}await M("๐ "+X.join(", "),(_=s.fileAttachment)==null?void 0:_.sendFileName),await V({userInput:(F=x.current)==null?void 0:F.value,prevPath:p(),currPath:f(),goToPath:w,setTextAreaValue:C,injectMessage:l,simulateStreamMessage:A,streamMessage:c,removeMessage:d,endStreamMessage:u,toggleChatWindow:B,showToast:k,dismissToast:S,files:m})}},multiple:(o=s.fileAttachment)==null?void 0:o.multiple,accept:(i=s.fileAttachment)==null?void 0:i.accept,disabled:!h}),(()=>{var O,z;const L=h?(O=s.fileAttachment)==null?void 0:O.icon:(z=s.fileAttachment)==null?void 0:z.iconDisabled;return L&&typeof L!="string"?L&&D.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:D.jsx(L,{style:h?Q:I})}):D.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:h?Q:I})})()]})},nu=()=>{var e,t,n,r,o,i;const{settings:s}=se(),{styles:a}=ye(),{syncedTextAreaDisabledRef:l}=Re(),{inputRef:A}=Le(),{textAreaDisabled:c,setTextAreaValue:d}=Jt(),u=v.useRef(null),f=v.useRef(null),[p,w]=v.useState(!1),h={cursor:`url("${(e=s.general)==null?void 0:e.actionDisabledIcon}"), auto`,...a.emojiButtonStyle,...a.emojiButtonDisabledStyle},b={backgroundImage:`url(${(t=s.emoji)==null?void 0:t.icon})`,fill:"#a6a6a6",...a.emojiIconStyle},x={backgroundImage:`url(${(n=s.emoji)==null?void 0:n.icon})`,fill:"#a6a6a6",...a.emojiIconStyle,...a.emojiIconDisabledStyle};return v.useEffect(()=>{const g=S=>{const E=S.composedPath();u.current&&!E.includes(u.current)&&f.current&&!E.includes(f.current)&&w(!1)},k=()=>{(()=>{if(u.current&&f.current){const S=f.current.getBoundingClientRect(),E=u.current.offsetHeight,B=S.top-E-8;u.current.style.left=`${S.left}px`,u.current.style.top=`${B}px`}})()};return document.addEventListener("mousedown",g),window.addEventListener("resize",k),()=>{document.removeEventListener("mousedown",g),window.removeEventListener("resize",k)}},[]),D.jsxs(D.Fragment,{children:[D.jsx("div",{"aria-label":((r=s.ariaLabel)==null?void 0:r.emojiButton)??"emoji picker",role:"button",ref:f,className:c?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:c?h:{...a.emojiButtonStyle},onMouseDown:g=>{g.preventDefault(),l.current?w(!1):w(k=>!k)},children:(()=>{var g,k;const S=c?(g=s.emoji)==null?void 0:g.iconDisabled:(k=s.emoji)==null?void 0:k.icon;return S&&typeof S!="string"?S&&D.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:D.jsx(S,{style:c?x:b})}):D.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:c?x:b})})()}),p&&D.jsx("div",{className:"rcb-emoji-button-popup",ref:u,children:(i=(o=s.emoji)==null?void 0:o.list)==null?void 0:i.map((g,k)=>D.jsx("span",{className:"rcb-emoji",onMouseDown:S=>((E,B)=>{E.preventDefault(),A.current&&(d(A.current.value+B),setTimeout(()=>{const C=A.current;if(C){C.focus();const M=C.value.length;C.setSelectionRange(M,M)}},50)),w(!1)})(S,g),children:g},k))})]})},ru=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),{audioToggledOn:i,toggleAudio:s}=ts(),a={backgroundImage:`url(${(e=r.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},l={backgroundImage:`url(${(t=r.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return D.jsx("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.audioButton)??"toggle audio",role:"button",onMouseDown:async A=>{A.preventDefault(),await s()},style:i?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var A,c;const d=i?(A=r.audio)==null?void 0:A.icon:(c=r.audio)==null?void 0:c.iconDisabled;return d&&typeof d!="string"?d&&D.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:D.jsx(d,{style:i?a:l,"data-testid":"rcb-audio-icon-svg"})}):D.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:i?a:l})})()})},ou=()=>{var e,t;const{settings:n}=se(),{styles:r}=ye(),{toggleChatWindow:o}=st(),i={backgroundImage:`url(${(e=n.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...r.closeChatIconStyle};return D.jsx("div",{"aria-label":((t=n.ariaLabel)==null?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:s=>{s.stopPropagation(),o(!1)},style:{...r.closeChatButtonStyle},children:(()=>{var s;const a=(s=n.header)==null?void 0:s.closeChatIcon;return a&&typeof a!="string"?a&&D.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:D.jsx(a,{style:i})}):D.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:i})})()})},iu=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),{notificationsToggledOn:i,toggleNotifications:s}=(()=>{const{notificationsToggledOn:A,toggleNotifications:c,playNotificationSound:d}=Yr();return{notificationsToggledOn:A,toggleNotifications:c,playNotificationSound:d}})(),a={backgroundImage:`url(${(e=r.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},l={backgroundImage:`url(${(t=r.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return D.jsx("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.notificationButton)??"toggle notifications",role:"button",onMouseDown:async A=>{A.preventDefault(),await s()},style:i?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var A,c;const d=i?(A=r.notification)==null?void 0:A.icon:(c=r.notification)==null?void 0:c.iconDisabled;return d&&typeof d!="string"?d&&D.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:D.jsx(d,{style:i?a:l,"data-testid":"rcb-notification-icon-svg"})}):D.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:i?a:l})})()})},su=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),{injectMessage:i}=Xt(),{inputRef:s}=Le(),{voiceToggledOn:a,toggleVoice:l}=$r(),{setInputLength:A,setTextAreaValue:c,textAreaDisabled:d}=Jt(),{handleSubmitText:u}=ln(),f=v.useRef([]),[p,w]=v.useState(!1);v.useEffect(()=>{var k;(k=r.voice)!=null&&k.sendAsAudio?(g(),f.current=[]):u()},[p]),v.useEffect(()=>{a?((k,S,E,B,C,M,T)=>{var Q;(Q=k.voice)!=null&&Q.sendAsAudio?VA(E,M):GA(k,S,E,B,C,T)})(r,l,x,c,A,f,s):Jr()},[a]);const h={backgroundImage:`url(${(e=r.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},b={backgroundImage:`url(${(t=r.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},x=()=>{w(k=>!k)},g=async()=>{const k=new Blob(f.current,{type:"audio/wav"}),S=new File([k],"voice-input.wav",{type:"audio/wav"}),E=await is(S);!E.fileType||!E.fileUrl||await i(D.jsx(os,{file:S,fileType:E.fileType,fileUrl:E.fileUrl}),"USER")};return D.jsx("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.voiceButton)??"toggle voice",role:"button",onMouseDown:async k=>{k.preventDefault(),!d&&await l()},style:a&&!d?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:a&&!d?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var k,S;const E=a?(k=r.voice)==null?void 0:k.icon:(S=r.voice)==null?void 0:S.iconDisabled;return E&&typeof E!="string"?E&&D.jsx("span",{className:"rcb-voice-icon "+(a&&!d?"on":""),children:D.jsx(E,{style:a&&!d?h:b})}):D.jsx("span",{className:"rcb-voice-icon"+(a&&!d?"-on":""),"data-testid":"rcb-voice-icon",style:a&&!d?h:b})})()})},au=()=>{var e,t,n,r,o,i,s,a;const{settings:l}=se(),{styles:A}=ye(),{textAreaDisabled:c}=Re(),[d,u]=v.useState(!1),{handleSubmitText:f}=ln(),p={backgroundColor:(e=l.general)==null?void 0:e.primaryColor,...A.sendButtonStyle},w={cursor:`url("${(t=l.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(n=l.general)==null?void 0:n.primaryColor,...A.sendButtonStyle,...A.sendButtonDisabledStyle},h={backgroundColor:(r=l.general)==null?void 0:r.secondaryColor,...A.sendButtonStyle,...A.sendButtonHoveredStyle},b={backgroundImage:`url(${(o=l.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...A.sendIconStyle},x={backgroundImage:`url(${(i=l.chatInput)==null?void 0:i.sendButtonIcon})`,fill:"#fff",...A.sendIconStyle,...A.sendIconDisabledStyle},g={backgroundImage:`url(${(s=l.chatInput)==null?void 0:s.sendButtonIcon})`,fill:"#fff",...A.sendIconStyle,...A.sendIconHoveredStyle};return D.jsx("div",{"aria-label":((a=l.ariaLabel)==null?void 0:a.sendButton)??"send message",role:"button",onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onMouseDown:async k=>{k==null||k.preventDefault(),!c&&await f()},style:c?w:d?h:p,className:"rcb-send-button",children:(()=>{var k;const S=(k=l.chatInput)==null?void 0:k.sendButtonIcon;return S&&typeof S!="string"?S&&D.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:D.jsx(S,{style:c?x:d?g:b})}):D.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:c?x:d?g:b})})()})},lu=(e,t)=>{var n,r,o,i,s,a,l,A,c;const d={[Te.AUDIO_BUTTON]:(n=e.audio)==null?void 0:n.disabled,[Te.CLOSE_CHAT_BUTTON]:(r=e.general)==null?void 0:r.embedded,[Te.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[Te.FILE_ATTACHMENT_BUTTON]:(i=e.fileAttachment)==null?void 0:i.disabled,[Te.NOTIFICATION_BUTTON]:(s=e.notification)==null?void 0:s.disabled,[Te.SEND_MESSAGE_BUTTON]:!1,[Te.VOICE_MESSAGE_BUTTON]:(a=e.voice)==null?void 0:a.disabled},u={},f=p=>p?p.map(w=>{if(typeof w=="string"){if((h=>Object.values(Te).includes(h))(w)&&!d[w]){if(u[w])return u[w];const h=t[w];if(typeof h=="function"){const b=h();return u[w]=b,b}return null}return null}return w}).filter(w=>w!==null):[];return{header:f((l=e.header)==null?void 0:l.buttons),chatInput:f((A=e.chatInput)==null?void 0:A.buttons),footer:f((c=e.footer)==null?void 0:c.buttons)}},cu=()=>{const{settings:e}=se(),t=v.useMemo(()=>({[Te.CLOSE_CHAT_BUTTON]:()=>D.jsx(ou,{}),[Te.AUDIO_BUTTON]:()=>D.jsx(ru,{}),[Te.NOTIFICATION_BUTTON]:()=>D.jsx(iu,{}),[Te.EMOJI_PICKER_BUTTON]:()=>D.jsx(nu,{}),[Te.FILE_ATTACHMENT_BUTTON]:()=>D.jsx(tu,{}),[Te.SEND_MESSAGE_BUTTON]:()=>D.jsx(au,{}),[Te.VOICE_MESSAGE_BUTTON]:()=>D.jsx(su,{})}),[]),{header:n,chatInput:r,footer:o}=v.useMemo(()=>lu(e,t),[e,t]);return{headerButtons:v.useMemo(()=>n,[n]),chatInputButtons:v.useMemo(()=>r,[r]),footerButtons:v.useMemo(()=>o,[o])}},eo=()=>{const{settings:e}=se(),{styles:t}=ye(),{setSyncedMessages:n,syncedMessagesRef:r}=Wr(),{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:s,setHasChatHistoryLoaded:a}=Re(),{chatBodyRef:l}=Le(),{dispatchRcbEvent:A}=gt(),c=v.useCallback(async()=>{var d,u;const f=Dn();if(!f||(d=e.event)!=null&&d.rcbLoadChatHistory&&(await A(Y.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;i(!0);const p=((u=l.current)==null?void 0:u.scrollHeight)??0;((w,h,b,x,g,k,S,E,B)=>{var C;if(Ji=!0,b!=null)try{const M=Lt(D.jsx(FA,{}),"SYSTEM"),T=g.current.slice(1);x([M,...T]);const Q=b.map(I=>{if(I.type==="object"){const O=es(I.content,w,h);return{...I,content:O}}return I});setTimeout(()=>{var I;const O=g.current.slice(1);let z=(I=w.chatHistory)!=null&&I.autoLoad?Lt(D.jsx(D.Fragment,{}),"SYSTEM"):Lt(D.jsx(NA,{}),"SYSTEM");x([...Q,z,...O]),B(!0)},500),setTimeout(()=>{if(!k.current)return;const{scrollHeight:I}=k.current,O=I-S;k.current.scrollTop+=O,E(!1)},510)}catch{Nt.removeItem((C=w.chatHistory)==null?void 0:C.storageKey)}})(e,t,f,n,r,l,p,i,a)},[e,t,A,r,l,i,a]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:s,showChatHistory:c}},Au=()=>{var e,t,n;const{settings:r}=se(),{styles:o}=ye(),{showChatHistory:i}=eo(),[s,a]=v.useState(!1),l={color:(e=r.general)==null?void 0:e.primaryColor,borderColor:(t=r.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return D.jsx("div",{className:"rcb-view-history-container",children:D.jsx("div",{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},style:s?l:{...o.chatHistoryButtonStyle},onMouseDown:A=>{A.preventDefault(),i()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:D.jsx("p",{children:(n=r.chatHistory)==null?void 0:n.viewChatHistoryButtonText})})})},uu=()=>{var e,t,n,r;const o=or(),{settings:i}=se(),{replaceMessages:s}=Xt(),{isBotTyping:a,isChatWindowOpen:l,setUnreadCount:A,setSyncedIsChatWindowOpen:c,setSyncedTextAreaDisabled:d,setSyncedAudioToggledOn:u,setSyncedVoiceToggledOn:f,setSyncedIsScrolling:p,syncedIsScrollingRef:w,syncedIsChatWindowOpenRef:h}=Re(),{chatBodyRef:b}=Le(),{viewportHeight:x,setViewportHeight:g,setViewportWidth:k,scrollToBottom:S}=st(),{setUpNotifications:E}=Yr(),{handleFirstInteraction:B}=(()=>{var Q;const{settings:I}=se(),{hasInteractedPage:O,setHasInteractedPage:z,hasFlowStarted:L,setHasFlowStarted:_}=Re(),F=v.useCallback(()=>{var H;if(z(!0),!L&&((H=I.general)==null?void 0:H.flowStartTrigger)==="ON_PAGE_INTERACT"&&_(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const m=new window.SpeechSynthesisUtterance;m.text="",m.onend=()=>{window.removeEventListener("click",F),window.removeEventListener("keydown",F),window.removeEventListener("touchstart",F)},window.speechSynthesis.speak(m)},[L,(Q=I.general)==null?void 0:Q.flowStartTrigger]);return{hasInteractedPage:O,handleFirstInteraction:F}})(),{showChatHistory:C}=eo(),M=v.useRef(0),T=v.useRef(!1);v.useEffect(()=>(window.addEventListener("click",B),window.addEventListener("keydown",B),window.addEventListener("touchstart",B),()=>{window.removeEventListener("click",B),window.removeEventListener("keydown",B),window.removeEventListener("touchstart",B)}),[]),v.useEffect(()=>{const Q=b.current;if(!Q)return;const I=()=>{T.current||(T.current=!0,requestAnimationFrame(()=>{var O,z;if(!Q)return;const{scrollTop:L,clientHeight:_,scrollHeight:F}=Q,H=L+_<F-(((O=i.chatWindow)==null?void 0:O.messagePromptOffset)??30);p(H),w.current=H,H||(L+_>=F-1&&(Q.scrollTop=F-_-1),(h.current||(z=i.general)!=null&&z.embedded)&&A(0)),T.current=!1}))};return Q.addEventListener("wheel",I,{passive:!0}),Q.addEventListener("touchmove",I,{passive:!0}),()=>{Q.removeEventListener("wheel",I),Q.removeEventListener("touchmove",I)}},[]),v.useEffect(()=>{var Q,I,O;d((Q=i.chatInput)==null?void 0:Q.disabled),c((I=i.chatWindow)==null?void 0:I.defaultOpen),u((O=i.audio)==null?void 0:O.defaultToggledOn),setTimeout(()=>{var z;f((z=i.voice)==null?void 0:z.defaultToggledOn)},1)},[]),v.useEffect(()=>{var Q;(Q=i.notification)!=null&&Q.disabled||E()},[(e=i.notification)==null?void 0:e.disabled]),v.useEffect(()=>{!w.current&&b!=null&&b.current&&S()},[a]),v.useEffect(()=>{var Q,I;if((Q=i.chatHistory)!=null&&Q.disabled)Nt&&Nt.removeItem($n);else if(Vr(i),Dn().length>0){const O=Lt(D.jsx(Au,{}),"SYSTEM");s([O]),(I=i.chatHistory)!=null&&I.autoLoad&&C()}},[(t=i.chatHistory)==null?void 0:t.storageKey,(n=i.chatHistory)==null?void 0:n.maxEntries,(r=i.chatHistory)==null?void 0:r.disabled]),v.useEffect(()=>{var Q;o||(Q=i.general)!=null&&Q.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",I=>{if(!I.target)return;const{x:O,y:z,width:L,height:_}=I.target.boundingRect;O==0&&z==0&&L==0&&_==0?(setTimeout(()=>{var F;g((F=window.visualViewport)==null?void 0:F.height)},101),setTimeout(()=>{var F,H;x!=((F=window.visualViewport)==null?void 0:F.height)&&g((H=window.visualViewport)==null?void 0:H.height)},1001)):setTimeout(()=>{var F;g(((F=window.visualViewport)==null?void 0:F.height)-_)},101)}))},[o]),v.useEffect(()=>{var Q,I,O,z;if(o)return;l&&(g((Q=window.visualViewport)==null?void 0:Q.height),k((I=window.visualViewport)==null?void 0:I.width));const L=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),_=()=>M.current=window.scrollY,F=()=>{var m,W;g((m=window.visualViewport)==null?void 0:m.height),k((W=window.visualViewport)==null?void 0:W.width)},H=()=>{var m;window.removeEventListener("scroll",L),window.removeEventListener("scroll",_),(m=window.visualViewport)==null||m.removeEventListener("resize",F)};return l?(H(),document.body.style.position="fixed",window.addEventListener("scroll",L),(O=window.visualViewport)==null||O.addEventListener("resize",F)):(document.body.style.position="static",H(),window.scrollTo({top:M.current,left:0,behavior:"auto"}),window.addEventListener("scroll",_),(z=window.visualViewport)==null||z.removeEventListener("resize",F)),H},[l,o])},du="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",fu="2592000",ss="RCB_THEME_CACHE_DATA",as=async(e,t)=>{const{id:n,version:r,baseUrl:o=du,cacheDuration:i=fu}=t,s=r||await(async(b,x)=>{const g=`${x}/${b}/meta.json`;try{const k=await fetch(g);return k.ok?(await k.json()).version:(console.error(`Failed to fetch meta.json from ${g}`),null)}catch(k){return console.error(`Failed to fetch meta.json from ${g}`,k),null}})(n,o);if(!s)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const a=((b,x,g)=>{const k=localStorage.getItem(`${ss}_${b}_${x}`);if(!k)return null;try{const S=JSON.parse(k),E=new Date().getTime(),B=Math.floor(E/1e3);return S.cacheDate+g>=B?S:null}catch(S){return console.error(`Unable to fetch cache for ${b}`,S),null}})(n,s,i);if(a){const b=ls(e,a.cssStylesText);return{settings:a.settings,inlineStyles:a.inlineStyles,cssStylesText:b}}const l=`${o}/${n}/${s}/styles.css`,A=`${o}/${n}/${s}/settings.json`,c=`${o}/${n}/${s}/styles.json`;let d="";const u=await fetch(l);u.ok?d=await u.text():console.info(`Could not fetch styles.css from ${l}`);const f=await fetch(A);let p={};f.ok?p=await f.json():console.info(`Could not fetch settings.json from ${A}`);const w=await fetch(c);let h={};return w.ok?h=await w.json():console.info(`Could not fetch styles.json from ${c}`),((b,x,g,k,S)=>{const E=new Date().getTime(),B={settings:g,inlineStyles:k,cssStylesText:S,cacheDate:Math.floor(E/1e3)};localStorage.setItem(`${ss}_${b}_${x}`,JSON.stringify(B))})(n,s,p,h,d),{settings:p,inlineStyles:h,cssStylesText:ls(e,d)}},ls=(e,t)=>t.split(new RegExp("(?<=})")).map(n=>{const r=n.trim();return r.startsWith("@import")||r.startsWith("@keyframes")||r.startsWith("@media")?r:r?`#${e} ${r}`:""}).join(`
|
|
4
|
+
`),pu=async(e,t,n,r)=>{var o,i;let s=ir(zi),a=ir(ji),l="";if(r!=null)if(Array.isArray(r))for(const A of r){const c=await as(e,A);s=bt(c.settings,s),a=bt(c.inlineStyles,a),l+=c.cssStylesText}else{const A=await as(e,r);s=bt(A.settings,s),a=bt(A.inlineStyles,a),l+=A.cssStylesText}return t!=null&&(s=bt(t,s)),n!=null&&(a=bt(n,a)),((o=s.chatInput)==null?void 0:o.botDelay)!=null&&((i=s.chatInput)==null?void 0:i.botDelay)<500&&(s.chatInput.botDelay=500),{settings:s,inlineStyles:a,cssStylesText:l}},bt=(e,t)=>{const n=[{source:e,target:t}];for(;n.length;){const r=n.pop();if(r==null)continue;const{source:o,target:i}=r;for(const s of Object.keys(o)){const a=s;if(v.isValidElement(o[a]))i[a]=o[a];else if(typeof o[a]!="object"||o[a]===null||Array.isArray(o[a]))try{i[a]=o[a]}catch{}else(typeof i[a]!="object"||i[a]===null)&&(i[a]={}),n.push({source:o[a],target:i[a]})}}return t},ir=e=>{if(e===null||typeof e!="object")return e;const t=Array.isArray(e)?[]:{},n=[{source:e,target:t}],r=new WeakMap;for(r.set(e,t);n.length;){const o=n.pop();if(o==null)continue;const{source:i,target:s}=o;for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=i[a];if(l&&typeof l=="object")if(r.has(l))s[a]=r.get(l);else{const A=Array.isArray(l)?[]:{};r.set(l,A),s[a]=A,n.push({source:l,target:A})}else s[a]=l}}return t},cs=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:n}=se(),r=v.useCallback(i=>{!i||Object.keys(i).length===0||t(ir(bt(i,e)))},[e]),o=v.useCallback(i=>{const s=typeof i=="function"?i(n.current):i;t(s)},[n]);return{settings:e,replaceSettings:o,updateSettings:r}},As=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:n}=ye(),r=v.useCallback(i=>{!i||Object.keys(i).length===0||t(ir(bt(i,e)))},[e]),o=v.useCallback(i=>{const s=typeof i=="function"?i(n.current):i;t(s)},[n]);return{styles:e,replaceStyles:o,updateStyles:r}},hu=({plugins:e,slots:t})=>{var n,r;const o=or(),{settings:i}=se(),{styles:s}=ye(),{hasFlowStarted:a,setHasFlowStarted:l}=Re(),{inputRef:A}=Le(),{viewportHeight:c,viewportWidth:d,isChatWindowOpen:u}=st(),{goToPath:f}=rr(),{headerButtons:p,chatInputButtons:w,footerButtons:h}=cu();uu(),(x=>{const{updateSettings:g}=cs(),{updateStyles:k}=As(),S=x==null?void 0:x.map(E=>E());v.useEffect(()=>{let E={},B={};S==null||S.forEach(C=>{C!=null&&C.settings&&Object.keys(C==null?void 0:C.settings).length!==0&&(E=bt(C.settings,E)),C!=null&&C.styles&&Object.keys(C==null?void 0:C.styles).length!==0&&(B=bt(C.styles,B))}),g(E),k(B)},[])})(e),v.useEffect(()=>{var x;(a||((x=i.general)==null?void 0:x.flowStartTrigger)==="ON_LOAD")&&f("start")},[a,(n=i.general)==null?void 0:n.flowStartTrigger]);const b=v.useMemo(()=>{var x;const g="rcb-chatbot-global ";return(x=i.general)!=null&&x.embedded?g+"rcb-window-embedded":u?g+"rcb-window-open":g+"rcb-window-close"},[i,u]);return D.jsx(D.Fragment,{children:(()=>{var x,g;return o&&((x=i.device)==null?void 0:x.desktopEnabled)||!o&&((g=i.device)==null?void 0:g.mobileEnabled)})()&&D.jsxs("div",{onMouseDown:x=>{var g,k;!a&&((g=i.general)==null?void 0:g.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&l(!0),o?(k=A.current)==null||k.blur():x==null||x.preventDefault()},className:b,children:[D.jsx(ZA,{}),D.jsx(JA,{}),u&&!o&&!((r=i.general)!=null&&r.embedded)&&D.jsxs(D.Fragment,{children:[D.jsx("style",{children:`
|
|
5
5
|
html {
|
|
6
6
|
overflow: hidden !important;
|
|
7
7
|
touch-action: none !important;
|
|
8
8
|
scroll-behavior: auto !important;
|
|
9
9
|
}
|
|
10
|
-
`}),
|
|
10
|
+
`}),D.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),D.jsx("div",{style:(()=>{var x,g;return o||(x=i.general)!=null&&x.embedded?(g=i.general)!=null&&g.embedded?{...s.chatWindowStyle}:{...s.chatWindowStyle,zIndex:1e4}:{...s.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${d}px`,height:`${c}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var x,g,k;const S=(t==null?void 0:t.chatBotHeader)||mA,E=(t==null?void 0:t.chatBotBody)||PA,B=(t==null?void 0:t.chatBotInput)||KA,C=(t==null?void 0:t.chatBotFooter)||XA;return D.jsxs(D.Fragment,{children:[((x=i.general)==null?void 0:x.showHeader)&&D.jsx(S,{buttons:p}),D.jsx(E,{}),D.jsx(eu,{}),((g=i.general)==null?void 0:g.showInputRow)&&D.jsx(B,{buttons:w}),((k=i.general)==null?void 0:k.showFooter)&&D.jsx(C,{buttons:h})]})})()})]})})},us=v.createContext(void 0),ds=()=>v.useContext(us),fs=({children:e})=>{var t;const n=v.useRef(""),r=v.useRef({}),[o,i,s]=it({}),[a,l,A]=it({}),[c,d]=v.useState(!1);return v.useEffect(()=>{d(!0)},[]),c?D.jsx("div",{style:{fontFamily:(t=o.general)==null?void 0:t.fontFamily},children:D.jsx(us.Provider,{value:{loadConfig:async(u,f,p,w,h,b)=>{n.current=u,r.current=f;const x=await pu(u,p,w,h);b.current&&(b.current.textContent=x.cssStylesText),i(x.settings),l(x.inlineStyles)}},children:D.jsx(hA,{settings:o,setSyncedSettings:i,syncedSettingsRef:s,children:D.jsx(gA,{styles:a,setSyncedStyles:l,syncedStylesRef:A,children:D.jsx(YA,{children:D.jsx(yA,{botIdRef:n,flowRef:r,children:D.jsx(bA,{children:D.jsx(vA,{settings:o,children:D.jsx(xA,{children:e})})})})})})})})}):null},gu=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,setConfigLoaded:s,styleRootRef:a})=>{const l=v.useMemo(()=>e,[]),A=ds(),{flowRef:c}=Le();return c&&c.current!==t&&(c.current=t),v.useEffect(()=>{(async()=>{var d,u;(d=n.event)!=null&&d.rcbPreLoadChatBot&&(await qr(Y.PRE_LOAD_CHATBOT,{botId:l,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i})).defaultPrevented||(A!=null&&A.loadConfig&&(await A.loadConfig(l,t,n,r,o,a),s(!0)),(u=n.event)!=null&&u.rcbPostLoadChatBot&&qr(Y.POST_LOAD_CHATBOT,{botId:l,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i}))})()},[o]),null},to=["Quickstart","API Docs","Examples","Github","Discord"],mu={start:{message:"Hello, I am Tan Jin ๐! Welcome to React ChatBotify, I'm excited that you are using our chatbot ๐!",transition:{duration:1e3},chatDisabled:!0,path:"show_options"},show_options:{message:"It looks like you have not set up a conversation flow yet. No worries! Here are a few helpful things you can check out to get started:",options:to,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:to,path:"process_options"},unknown_input:{message:"Sorry, I do not understand your message ๐ข! If you require further assistance, you may click on the Github option and open an issue there or visit our discord.",options:to,path:"process_options"},process_options:{transition:{duration:0},path:e=>{let t="";switch(e.userInput){case"Quickstart":t="https://react-chatbotify.com/docs/introduction/quickstart/";break;case"API Docs":t="https://react-chatbotify.com/docs/api/bot_options";break;case"Examples":t="https://react-chatbotify.com/docs/examples/basic_form";break;case"Github":t="https://github.com/react-chatbotify/react-chatbotify/";break;case"Discord":t="https://discord.gg/6R4DK4G5Zh";break;default:return"unknown_input"}return e.injectMessage("Sit tight! I'll send you right there!"),setTimeout(()=>{window.open(t)},1e3),"repeat"}},repeat:{transition:{duration:3e3},path:"prompt_again"}},yu=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,slots:s})=>{const a=v.useMemo(()=>e||"rcb-"+Zn(),[]),l=t&&Object.keys(t).length!==0?t:mu,A=n||{},c=r||{},d=i||[],[u,f]=v.useState(!1),p=ds(),w=v.useRef(null),[h,b]=v.useState(o||[]);v.useEffect(()=>{o&&b(o)},[o]);const x=()=>D.jsxs(D.Fragment,{children:[D.jsx(gu,{styleRootRef:w,id:a,flow:l,settings:A,styles:c,themes:h,plugins:d,setConfigLoaded:f}),u&&D.jsx(hu,{plugins:i,slots:s})]});return D.jsxs(p==null?fs:D.Fragment,{children:[D.jsx("style",{ref:w}),D.jsx("div",{id:a,children:x()})]})},vu=()=>{const{getBotId:e}=(()=>{const{botIdRef:t}=Le();return{getBotId:v.useCallback(()=>t.current,[t])}})();return{getBotId:e}},sr=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:n}=(()=>{const{replaceMessages:r}=Xt(),{replacePaths:o,goToPath:i}=rr(),{replaceToasts:s}=an(),{hasFlowStarted:a}=Re(),{flowRef:l,timeoutIdRef:A}=Le(),{settings:c}=se();return{hasFlowStarted:a,restartFlow:v.useCallback(async()=>{Vr(c),A.current&&clearTimeout(A.current),r([]),s([]),o([]),await i("start")},[A,c,r,s,o,Vr,i]),getFlow:v.useCallback(()=>(l==null?void 0:l.current)??{},[l])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:n}},ar=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:s,getMessages:a}=Xt();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:s,getMessages:a}},ut=(e,t)=>{const{getBotId:n}=vu();v.useEffect(()=>{const r=o=>{o.detail.botId===n()&&t(o)};return window.addEventListener(e,r),()=>{window.removeEventListener(e,r)}},[n,e,t])},ps=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=cs();return{settings:e,replaceSettings:t,updateSettings:n}},hs=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:s,blurTextArea:a}=Jt();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:s,blurTextArea:a}},gs=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=eo();return{showChatHistory:e,getHistoryMessages:Dn,setHistoryMessages:Gr,hasChatHistoryLoaded:t}},no={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function Zt(e){return t=>{no[t]={...e,...no[t]}}}["address","main","div","figure","p","pre"].forEach(Zt({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Zt({content:8,type:73})),["p","pre"].forEach(Zt({content:8,type:65})),["s","small","span","del","ins"].forEach(Zt({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(Zt({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(Zt({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(Zt({type:89}));const ro=Object.freeze(no),wu=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],bu=Object.keys(ro).filter(e=>e!=="canvas"&&e!=="iframe"),ms=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,tabindex:1,target:1,title:1,type:1,width:1}),ku=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function lr(){return lr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lr.apply(this,arguments)}function ys({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){const i=o;return r?v.createElement(i,lr({className:t},e)):v.createElement(i,lr({className:t},e),n)}class xu{attribute(t,n){return n}node(t,n){return n}}function Eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*!
|
|
11
11
|
* escape-html
|
|
12
12
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
13
13
|
* Copyright(c) 2015 Andreas Lubbe
|
|
14
14
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
15
15
|
* MIT Licensed
|
|
16
|
-
*/var
|
|
17
|
-
`);return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`),n=n.replace(/\n/g,"<br/>"),n}createContainer(e){var t;const r=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Gs)();if(!r)return;const n=(t=this.props.containerTagName)!==null&&t!==void 0?t:"body",o=n==="body"||n==="fragment"?r.body:r.createElement(n);if(e.match(Rs)){if(process.env.NODE_ENV!=="production")throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Hs(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,r={};let n=0;return e.nodeType===1&&e.attributes&&([...e.attributes].forEach(o=>{const{name:A,value:a}=o,s=A.toLowerCase(),i=Do[s]||Do[A];if(!this.isSafe(e)||!s.match(zs)&&(!t&&(!i||i===2)||s.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l=s==="style"?this.extractStyleAttribute(e):a;i===4?l=!0:i===3?l=Number.parseFloat(String(l)):i!==5&&(l=String(l)),r[Os[s]||s]=this.applyAttributeFilters(s,l),n+=1}),n!==0)?r:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(r=>{const n=e.style[r];(typeof n=="string"||typeof n=="number")&&(t[r.replace(/-([a-z])/g,(o,A)=>String(A).toUpperCase())]=n)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return tr[e]?{...t,...tr[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(t!=null&&t.startsWith("#"))return!0;const r=e.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:r,noHtmlExceptMatchers:n,allowElements:o,transform:A,transformOnlyAllowList:a}=this.props;let s=[],i="";return[...e.childNodes].forEach(l=>{if(l.nodeType===1){const d=l.nodeName.toLowerCase(),u=this.getTagConfig(d);i&&(s.push(i),i="");const p=this.applyNodeFilters(d,l);if(!p)return;let g;if(A&&(!a||this.isTagAllowed(d))){this.keyIndex+=1;const v=this.keyIndex;g=this.parseNode(p,u);const h=A(p,g,u);if(h===null)return;if(typeof h<"u")return void s.push(f.cloneElement(h,{key:v}));this.keyIndex=v-1}if(this.banned.has(d))return;if(r||n&&d!=="br"||!this.isTagAllowed(d)||!o&&!this.canRenderChild(t,u))s=[...s,...this.parseNode(p,u.tagName?u:t)];else{var c;this.keyIndex+=1;const v=this.extractAttributes(p),h={tagName:d};v&&(h.attributes=v),u.void&&(h.selfClose=u.void),s.push(f.createElement(Bo,{...h,key:this.keyIndex},(c=g)!==null&&c!==void 0?c:this.parseNode(p,u)))}}else if(l.nodeType===3){const d=r&&!n?l.textContent:this.applyMatchers(l.textContent||"",t);Array.isArray(d)?s=[...s,...d]:i+=d}}),i&&s.push(i),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const r=[];let n=e,o=null;for(;o=n.match(js);){const[A,a]=o,s=o.index,i=A.includes("/");if(process.env.NODE_ENV!=="production"&&!t[a])throw new Error(`Token "${a}" found but no matching element to replace with.`);s>0&&(r.push(n.slice(0,s)),n=n.slice(s));const{children:l,matcher:c,props:d}=t[a];let u;if(i)u=A.length,r.push(c.createElement(l,d));else{const p=n.match(new RegExp(`{{{/${a}}}}`));if(process.env.NODE_ENV!=="production"&&!p)throw new Error(`Closing token missing for interpolated element "${a}".`);u=p.index+p[0].length,r.push(c.createElement(this.replaceTokens(n.slice(A.length,p.index),t),d))}n=n.slice(u)}return n.length>0&&r.push(n),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function qs(e){var t;const{attributes:r,className:n,containerTagName:o,content:A,emptyContent:a,parsedContent:s,tagName:i,noWrap:l}=e,c=(t=o??i)!==null&&t!==void 0?t:"span",d=c==="fragment"||l;let u;if(s)u=s;else{const p=new To(A??"",e).parse();p.length>0&&(u=p)}return u||(u=a),d?f.createElement(f.Fragment,null,u):f.createElement(Bo,{attributes:r,className:n,tagName:c},u)}function Ws(e){const{attributes:t,className:r,content:n="",disableFilters:o=!1,disableMatchers:A=!1,emptyContent:a=null,filters:s=[],matchers:i=[],onAfterParse:l=null,onBeforeParse:c=null,tagName:d="span",noWrap:u=!1,...p}=e,g=A?[]:i,v=o?[]:s,h=c?[c]:[],w=l?[l]:[];g.forEach(k=>{k.onBeforeParse&&h.push(k.onBeforeParse.bind(k)),k.onAfterParse&&w.push(k.onAfterParse.bind(k))});const E=h.reduce((k,S)=>{const D=S(k,e);if(process.env.NODE_ENV!=="production"&&typeof D!="string")throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return D},n??""),m=new To(E,p,g,v),C=w.reduce((k,S)=>{const D=S(k,e);if(process.env.NODE_ENV!=="production"&&!Array.isArray(D))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return D},m.parse());return f.createElement(qs,{attributes:t,className:r,containerTagName:e.containerTagName,emptyContent:a,noWrap:u,parsedContent:C.length===0?void 0:C,tagName:d})}const Ys=({children:e})=>P.jsx("div",{style:{whiteSpace:"normal"},children:P.jsx(Ws,{content:typeof e=="string"?e:""})}),Vs={autoConfig:!0},Qo=(e,t,r)=>{var n;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&(((n=o.renderHtml)==null?void 0:n.map(A=>A.toUpperCase()).includes(r))??!1)},Ks=e=>{const t=[];let r="",n=!1;for(let o=0;o<e.length;o++){const A=e[o];A==="<"?n?(t.push(r),r=A):(n=!0,r=A):A===">"?(r+=A,t.push(r),r="",n=!1):n?r+=A:t.push(A)}return r!==""&&t.push(r),t},Xs=e=>{const{getFlow:t}=bn(),{messages:r,replaceMessages:n}=Xt(),{settings:o}=Po(),{hasChatHistoryLoaded:A}=ko(),a={...e,...Vs},s=a.htmlComponent?a.htmlComponent:Ys;f.useEffect(()=>{var c,d;if(A){const u=[...r];for(let p=0;p<u.length&&p<(((c=o.chatHistory)==null?void 0:c.maxEntries)??30);p++){const g=u[p];(d=g.tags)!=null&&d.includes("rcb-html-renderer-plugin:parsed")&&(g.contentWrapper=s)}n(u)}},[A]);const i=async c=>{var d;const u=(d=c.data.message)==null?void 0:d.sender.toUpperCase();typeof c.data.message.content=="string"&&Qo(c,t(),u)&&(c.type==="rcb-start-simulate-stream-message"&&(c.data.simulateStreamChunker=Ks),c.data.message.contentWrapper=s,c.data.message.tags||(c.data.message.tags=[]),c.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Ve(z.PRE_INJECT_MESSAGE,i),Ve(z.CHUNK_STREAM_MESSAGE,i),Ve(z.START_STREAM_MESSAGE,i),Ve(z.START_SIMULATE_STREAM_MESSAGE,i),Ve(z.START_SPEAK_AUDIO,async c=>{Qo(c,t(),"BOT")&&(c.data.textToRead=(d=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(d,"text/html").body.textContent||"":d.replace(/<\/?[^>]+(>|$)/g,""))(c.data.textToRead))});const l={name:"@rcb-plugins/html-renderer"};return a!=null&&a.autoConfig&&(l.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),l},Js=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$s={};function Mo(e,t){return($s.jsx?Zs:Js).test(e)}const ea=/[ \t\n\f\r]/g;function _o(e){return e.replace(ea,"")===""}class Jt{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}function Oo(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new Jt(r,n,t)}function nr(e){return e.toLowerCase()}Jt.prototype.property={},Jt.prototype.normal={},Jt.prototype.space=null;class Ke{constructor(t,r){this.property=t,this.attribute=r}}Ke.prototype.space=null,Ke.prototype.boolean=!1,Ke.prototype.booleanish=!1,Ke.prototype.overloadedBoolean=!1,Ke.prototype.number=!1,Ke.prototype.commaSeparated=!1,Ke.prototype.spaceSeparated=!1,Ke.prototype.commaOrSpaceSeparated=!1,Ke.prototype.mustUseProperty=!1,Ke.prototype.defined=!1;let ta=0;const ee=Bt(),Pe=Bt(),No=Bt(),H=Bt(),ge=Bt(),Mt=Bt(),qe=Bt();function Bt(){return 2**++ta}const rr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Pe,commaOrSpaceSeparated:qe,commaSeparated:Mt,number:H,overloadedBoolean:No,spaceSeparated:ge},Symbol.toStringTag,{value:"Module"})),or=Object.keys(rr);class Ar extends Ke{constructor(t,r,n,o){let A=-1;if(super(t,r),Lo(this,"space",o),typeof n=="number")for(;++A<or.length;){const a=or[A];Lo(this,or[A],(n&rr[a])===rr[a])}}}function Lo(e,t,r){r&&(e[t]=r)}Ar.prototype.defined=!0;const na={}.hasOwnProperty;function _t(e){const t={},r={};let n;for(n in e.properties)if(na.call(e.properties,n)){const o=e.properties[n],A=new Ar(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(A.mustUseProperty=!0),t[n]=A,r[nr(n)]=n,r[nr(A.attribute)]=n}return new Jt(t,r,e.space)}const Ho=_t({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Uo=_t({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Fo(e,t){return t in e?e[t]:t}function Ro(e,t){return Fo(e,t.toLowerCase())}const zo=_t({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ro,properties:{xmlns:null,xmlnsXLink:null}}),jo=_t({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Pe,ariaAutoComplete:null,ariaBusy:Pe,ariaChecked:Pe,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:ge,ariaCurrent:null,ariaDescribedBy:ge,ariaDetails:null,ariaDisabled:Pe,ariaDropEffect:ge,ariaErrorMessage:null,ariaExpanded:Pe,ariaFlowTo:ge,ariaGrabbed:Pe,ariaHasPopup:null,ariaHidden:Pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ge,ariaLevel:H,ariaLive:null,ariaModal:Pe,ariaMultiLine:Pe,ariaMultiSelectable:Pe,ariaOrientation:null,ariaOwns:ge,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Pe,ariaReadOnly:Pe,ariaRelevant:null,ariaRequired:Pe,ariaRoleDescription:ge,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Pe,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null}}),ra=_t({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ro,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mt,acceptCharset:ge,accessKey:ge,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:ge,autoFocus:ee,autoPlay:ee,blocking:ge,capture:null,charSet:null,checked:ee,cite:null,className:ge,cols:H,colSpan:null,content:null,contentEditable:Pe,controls:ee,controlsList:ge,coords:H|Mt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:No,draggable:Pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:ge,height:H,hidden:ee,high:H,href:null,hrefLang:null,htmlFor:ge,httpEquiv:ge,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:ge,itemRef:ge,itemScope:ee,itemType:ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:H,pattern:null,ping:ge,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:ge,required:ee,reversed:ee,rows:H,rowSpan:H,sandbox:ge,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Pe,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ge,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Pe,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:H,security:null,unselectable:null}}),oa=_t({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:Fo,properties:{about:qe,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:ge,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Mt,g2:Mt,glyphName:Mt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qe,rev:qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qe,requiredFeatures:qe,requiredFonts:qe,requiredFormats:qe,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qe,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Aa=/^data[-\w.:]+$/i,Go=/-[a-z]/g,ia=/[A-Z]/g;function sa(e){return"-"+e.toLowerCase()}function aa(e){return e.charAt(1).toUpperCase()}const la={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"},ca=Oo([Uo,Ho,zo,jo,ra],"html"),ir=Oo([Uo,Ho,zo,jo,oa],"svg");function qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sr,Wo,Yo,Ot={},ua=function(){if(Yo)return Ot;Yo=1;var e=Ot&&Ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=function(r,n){var o=null;if(!r||typeof r!="string")return o;var A=(0,t.default)(r),a=typeof n=="function";return A.forEach(function(s){if(s.type==="declaration"){var i=s.property,l=s.value;a?n(i,l,s):l&&((o=o||{})[i]=l)}}),o};var t=e(function(){if(Wo)return sr;Wo=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,A=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function d(u){return u?u.replace(l,c):c}return sr=function(u,p){if(typeof u!="string")throw new TypeError("First argument must be a string");if(!u)return[];p=p||{};var g=1,v=1;function h(Q){var x=Q.match(n);x&&(g+=x.length);var O=Q.lastIndexOf(`
|
|
21
|
-
`);v=~O?Q.length-O:v+Q.length}function w(){var Q={line:g,column:v};return function(x){return x.position=new E(Q),k(),x}}function E(Q){this.start=Q,this.end={line:g,column:v},this.source=p.source}function m(Q){var x=new Error(p.source+":"+g+":"+v+": "+Q);if(x.reason=Q,x.filename=p.source,x.line=g,x.column=v,x.source=u,!p.silent)throw x}function C(Q){var x=Q.exec(u);if(x){var O=x[0];return h(O),u=u.slice(O.length),x}}function k(){C(o)}function S(Q){var x;for(Q=Q||[];x=D();)x!==!1&&Q.push(x);return Q}function D(){var Q=w();if(u.charAt(0)=="/"&&u.charAt(1)=="*"){for(var x=2;c!=u.charAt(x)&&(u.charAt(x)!="*"||u.charAt(x+1)!="/");)++x;if(x+=2,c===u.charAt(x-1))return m("End of comment missing");var O=u.slice(2,x-2);return v+=2,h(O),u=u.slice(x),v+=2,Q({type:"comment",comment:O})}}function I(){var Q=w(),x=C(A);if(x){if(D(),!C(a))return m("property missing ':'");var O=C(s),B=Q({type:"declaration",property:d(x[0].replace(r,c)),value:O?d(O[0].replace(r,c)):c});return C(i),B}}return E.prototype.content=u,k(),function(){var Q,x=[];for(S(x);Q=I();)Q!==!1&&(x.push(Q),S(x));return x}()},sr}());return Ot}();const Vo=qo(ua),da=Vo.default||Vo,Ko=Xo("end"),ar=Xo("start");function Xo(e){return function(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Zt(e){return e&&typeof e=="object"?"position"in e||"type"in e?Jo(e.position):"start"in e||"end"in e?Jo(e):"line"in e||"column"in e?lr(e):"":""}function lr(e){return Zo(e&&e.line)+":"+Zo(e&&e.column)}function Jo(e){return lr(e&&e.start)+"-"+lr(e&&e.end)}function Zo(e){return e&&typeof e=="number"?e:1}class Ne extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",A={},a=!1;if(r&&(A="line"in r&&"column"in r||"start"in r&&"end"in r?{place:r}:"type"in r?{ancestors:[r],place:r.position}:{...r}),typeof t=="string"?o=t:!A.cause&&t&&(a=!0,o=t.message,A.cause=t),!A.ruleId&&!A.source&&typeof n=="string"){const i=n.indexOf(":");i===-1?A.ruleId=n:(A.source=n.slice(0,i),A.ruleId=n.slice(i+1))}if(!A.place&&A.ancestors&&A.ancestors){const i=A.ancestors[A.ancestors.length-1];i&&(A.place=i.position)}const s=A.place&&"start"in A.place?A.place.start:A.place;this.ancestors=A.ancestors||void 0,this.cause=A.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Zt(A.place)||"1:1",this.place=A.place||void 0,this.reason=this.message,this.ruleId=A.ruleId||void 0,this.source=A.source||void 0,this.stack=a&&A.cause&&typeof A.cause.stack=="string"?A.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ne.prototype.file="",Ne.prototype.name="",Ne.prototype.reason="",Ne.prototype.message="",Ne.prototype.stack="",Ne.prototype.column=void 0,Ne.prototype.line=void 0,Ne.prototype.ancestors=void 0,Ne.prototype.cause=void 0,Ne.prototype.fatal=void 0,Ne.prototype.place=void 0,Ne.prototype.ruleId=void 0,Ne.prototype.source=void 0;const cr={}.hasOwnProperty,fa=new Map,pa=/[A-Z]/g,ga=/-([a-z])/g,ha=new Set(["table","tbody","thead","tfoot","tr"]),ma=new Set(["td","th"]),$o="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ya(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=function(a,s){return i;function i(l,c,d,u){const p=Array.isArray(d.children),g=ar(l);return s(c,d,u,p,{columnNumber:g?g.column-1:void 0,fileName:a,lineNumber:g?g.line:void 0},void 0)}}(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=function(a,s,i){return l;function l(c,d,u,p){const g=Array.isArray(u.children)?i:s;return p?g(d,u,p):g(d,u)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ir:ca,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},A=eA(o,e,void 0);return A&&typeof A!="string"?A:o.create(e,o.Fragment,{children:A||void 0},void 0)}function eA(e,t,r){return t.type==="element"?function(n,o,A){const a=n.schema;let s=a;o.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=ir,n.schema=s),n.ancestors.push(o);const i=nA(n,o.tagName,!1),l=function(d,u){const p={};let g,v;for(v in u.properties)if(v!=="children"&&cr.call(u.properties,v)){const h=va(d,v,u.properties[v]);if(h){const[w,E]=h;d.tableCellAlignToStyle&&w==="align"&&typeof E=="string"&&ma.has(u.tagName)?g=E:p[w]=E}}return g&&((p.style||(p.style={}))[d.stylePropertyNameCase==="css"?"text-align":"textAlign"]=g),p}(n,o);let c=dr(n,o);return ha.has(o.tagName)&&(c=c.filter(function(d){return typeof d!="string"||!function(u){return typeof u=="object"?u.type==="text"&&_o(u.value):_o(u)}(d)})),tA(n,l,i,o),ur(l,c),n.ancestors.pop(),n.schema=a,n.create(o,i,l,A)}(e,t,r):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(n,o){if(o.data&&o.data.estree&&n.evaluater){const A=o.data.estree.body[0];return A.type,n.evaluater.evaluateExpression(A.expression)}$t(n,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(n,o,A){const a=n.schema;let s=a;o.name==="svg"&&a.space==="html"&&(s=ir,n.schema=s),n.ancestors.push(o);const i=o.name===null?n.Fragment:nA(n,o.name,!0),l=function(d,u){const p={};for(const g of u.attributes)if(g.type==="mdxJsxExpressionAttribute")if(g.data&&g.data.estree&&d.evaluater){const v=g.data.estree.body[0];v.type;const h=v.expression;h.type;const w=h.properties[0];w.type,Object.assign(p,d.evaluater.evaluateExpression(w.argument))}else $t(d,u.position);else{const v=g.name;let h;if(g.value&&typeof g.value=="object")if(g.value.data&&g.value.data.estree&&d.evaluater){const w=g.value.data.estree.body[0];w.type,h=d.evaluater.evaluateExpression(w.expression)}else $t(d,u.position);else h=g.value===null||g.value;p[v]=h}return p}(n,o),c=dr(n,o);return tA(n,l,i,o),ur(l,c),n.ancestors.pop(),n.schema=a,n.create(o,i,l,A)}(e,t,r):t.type==="mdxjsEsm"?function(n,o){if(o.data&&o.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(o.data.estree);$t(n,o.position)}(e,t):t.type==="root"?function(n,o,A){const a={};return ur(a,dr(n,o)),n.create(o,n.Fragment,a,A)}(e,t,r):t.type==="text"?function(n,o){return o.value}(0,t):void 0}function tA(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function ur(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function dr(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:fa;for(;++n<t.children.length;){const A=t.children[n];let a;if(e.passKeys){const i=A.type==="element"?A.tagName:A.type==="mdxJsxFlowElement"||A.type==="mdxJsxTextElement"?A.name:void 0;if(i){const l=o.get(i)||0;a=i+"-"+l,o.set(i,l+1)}}const s=eA(e,A,a);s!==void 0&&r.push(s)}return r}function va(e,t,r){const n=function(o,A){const a=nr(A);let s=A,i=Ke;if(a in o.normal)return o.property[o.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&Aa.test(A)){if(A.charAt(4)==="-"){const l=A.slice(5).replace(Go,aa);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=A.slice(4);if(!Go.test(l)){let c=l.replace(ia,sa);c.charAt(0)!=="-"&&(c="-"+c),A="data"+c}}i=Ar}return new i(s,A)}(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?function(o){const A={};return(o[o.length-1]===""?[...o,""]:o).join((A.padRight?" ":"")+","+(A.padLeft===!1?"":" ")).trim()}(r):function(o){return o.join(" ").trim()}(r)),n.property==="style"){let o=typeof r=="object"?r:function(A,a){const s={};try{da(a,i)}catch(l){if(!A.ignoreInvalidStyle){const c=l,d=new Ne("Cannot parse `style` attribute",{ancestors:A.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=A.filePath||void 0,d.url=$o+"#cannot-parse-style-attribute",d}}return s;function i(l,c){let d=l;d.slice(0,2)!=="--"&&(d.slice(0,4)==="-ms-"&&(d="ms-"+d.slice(4)),d=d.replace(ga,ba)),s[d]=c}}(e,String(r));return e.stylePropertyNameCase==="css"&&(o=function(A){const a={};let s;for(s in A)cr.call(A,s)&&(a[wa(s)]=A[s]);return a}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?la[n.property]||n.property:n.attribute,r]}}function nA(e,t,r){let n;if(r)if(t.includes(".")){const o=t.split(".");let A,a=-1;for(;++a<o.length;){const s=Mo(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};A=A?{type:"MemberExpression",object:A,property:s,computed:!(!a||s.type!=="Literal"),optional:!1}:s}n=A}else n=Mo(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else n={type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return cr.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);$t(e)}function $t(e,t){const r=new Ne("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=$o+"#cannot-handle-mdx-estrees-without-createevaluater",r}function wa(e){let t=e.replace(pa,Ea);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ba(e,t){return t.toUpperCase()}function Ea(e){return"-"+e.toLowerCase()}const fr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Cn={};function rA(e,t,r){if(function(n){return!(!n||typeof n!="object")}(e)){if("value"in e)return e.type!=="html"||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return oA(e.children,t,r)}return Array.isArray(e)?oA(e,t,r):""}function oA(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=rA(e[o],t,r);return n.join("")}const AA=document.createElement("i");function pr(e){const t="&"+e+";";AA.innerHTML=t;const r=AA.textContent;return(r.charCodeAt(r.length-1)!==59||e==="semi")&&r!==t&&r}function rt(e,t,r,n){const o=e.length;let A,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,r=r>0?r:0,n.length<1e4)A=Array.from(n),A.unshift(t,r),e.splice(...A);else for(r&&e.splice(t,r);a<n.length;)A=n.slice(a,a+1e4),A.unshift(t,0),e.splice(...A),a+=1e4,t+=1e4}function Xe(e,t){return e.length>0?(rt(e,e.length,0,t),e):t}const iA={}.hasOwnProperty;function Ca(e){const t={};let r=-1;for(;++r<e.length;)Pa(t,e[r]);return t}function Pa(e,t){let r;for(r in t){const n=(iA.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let A;if(o)for(A in o){iA.call(n,A)||(n[A]=[]);const a=o[A];Sa(n[A],Array.isArray(a)?a:a?[a]:[])}}}function Sa(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);rt(e,0,0,n)}function sA(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||(65535&r)==65534||r>1114111?"๏ฟฝ":String.fromCodePoint(r)}function Nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ot=yt(/[A-Za-z]/),We=yt(/[\dA-Za-z]/),ka=yt(/[#-'*+\--9=?A-Z^-~]/);function gr(e){return e!==null&&(e<32||e===127)}const hr=yt(/\d/),Da=yt(/[\dA-Fa-f]/),Ba=yt(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function Fe(e){return e!==null&&(e<0||e===32)}function se(e){return e===-2||e===-1||e===32}const xa=yt(new RegExp("\\p{P}|\\p{S}","u")),Ia=yt(/\s/);function yt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Lt(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const A=e.charCodeAt(r);let a="";if(A===37&&We(e.charCodeAt(r+1))&&We(e.charCodeAt(r+2)))o=2;else if(A<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(A))||(a=String.fromCharCode(A));else if(A>55295&&A<57344){const s=e.charCodeAt(r+1);A<56320&&s>56319&&s<57344?(a=String.fromCharCode(A,s),o=1):a="๏ฟฝ"}else a=String.fromCharCode(A);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+o+1,a=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function he(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let A=0;return function(s){return se(s)?(e.enter(r),a(s)):t(s)};function a(s){return se(s)&&A++<o?(e.consume(s),a):(e.exit(r),t(s))}}const Ta={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(A){return A===null?void e.consume(A):(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),he(e,t,"linePrefix"))},function(A){return e.enter("paragraph"),n(A)});let r;return t;function n(A){const a=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=a),r=a,o(A)}function o(A){return A===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(A)):Z(A)?(e.consume(A),e.exit("chunkText"),n):(e.consume(A),o)}}},Qa={tokenize:function(e){const t=this,r=[];let n,o,A,a=0;return s;function s(m){if(a<r.length){const C=r[a];return t.containerState=C[1],e.attempt(C[0].continuation,i,l)(m)}return l(m)}function i(m){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&E();const C=t.events.length;let k,S=C;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){k=t.events[S][1].end;break}w(a);let D=C;for(;D<t.events.length;)t.events[D][1].end={...k},D++;return rt(t.events,S+1,0,t.events.slice(C)),t.events.length=D,l(m)}return s(m)}function l(m){if(a===r.length){if(!n)return u(m);if(n.currentConstruct&&n.currentConstruct.concrete)return g(m);t.interrupt=!(!n.currentConstruct||n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(aA,c,d)(m)}function c(m){return n&&E(),w(a),u(m)}function d(m){return t.parser.lazy[t.now().line]=a!==r.length,A=t.now().offset,g(m)}function u(m){return t.containerState={},e.attempt(aA,p,g)(m)}function p(m){return a++,r.push([t.currentConstruct,t.containerState]),u(m)}function g(m){return m===null?(n&&E(),w(0),void e.consume(m)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:o}),v(m))}function v(m){return m===null?(h(e.exit("chunkFlow"),!0),w(0),void e.consume(m)):Z(m)?(e.consume(m),h(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(m),v)}function h(m,C){const k=t.sliceStream(m);if(C&&k.push(null),m.previous=o,o&&(o.next=m),o=m,n.defineSkip(m.start),n.write(k),t.parser.lazy[m.start.line]){let S=n.events.length;for(;S--;)if(n.events[S][1].start.offset<A&&(!n.events[S][1].end||n.events[S][1].end.offset>A))return;const D=t.events.length;let I,Q,x=D;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){if(I){Q=t.events[x][1].end;break}I=!0}for(w(a),S=D;S<t.events.length;)t.events[S][1].end={...Q},S++;rt(t.events,x+1,0,t.events.slice(D)),t.events.length=S}}function w(m){let C=r.length;for(;C-- >m;){const k=r[C];t.containerState=k[1],k[0].exit.call(t,e)}r.length=m}function E(){n.write([null]),o=void 0,n=void 0,t.containerState._closeFlow=void 0}}},aA={tokenize:function(e,t,r){return he(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function lA(e){return e===null||Fe(e)||Ia(e)?1:xa(e)?2:void 0}function mr(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const A=e[o].resolveAll;A&&!n.includes(A)&&(t=A(t,r),n.push(A))}return t}const yr={name:"attention",resolveAll:function(e,t){let r,n,o,A,a,s,i,l,c=-1;for(;++c<e.length;)if(e[c][0]==="enter"&&e[c][1].type==="attentionSequence"&&e[c][1]._close){for(r=c;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[c][1]).charCodeAt(0)){if((e[r][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d={...e[r][1].end},u={...e[c][1].start};cA(d,-s),cA(u,s),A={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:u},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[c][1].start}},n={type:s>1?"strong":"emphasis",start:{...A.start},end:{...a.end}},e[r][1].end={...A.start},e[c][1].start={...a.end},i=[],e[r][1].end.offset-e[r][1].start.offset&&(i=Xe(i,[["enter",e[r][1],t],["exit",e[r][1],t]])),i=Xe(i,[["enter",n,t],["enter",A,t],["exit",A,t],["enter",o,t]]),i=Xe(i,mr(t.parser.constructs.insideSpan.null,e.slice(r+1,c),t)),i=Xe(i,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",n,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,i=Xe(i,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,rt(e,r-1,c-r+3,i),c=r+i.length-l-2;break}}for(c=-1;++c<e.length;)e[c][1].type==="attentionSequence"&&(e[c][1].type="data");return e},tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=lA(n);let A;return function(s){return A=s,e.enter("attentionSequence"),a(s)};function a(s){if(s===A)return e.consume(s),a;const i=e.exit("attentionSequence"),l=lA(s),c=!l||l===2&&o||r.includes(s),d=!o||o===2&&l||r.includes(n);return i._open=!!(A===42?c:c&&(o||!d)),i._close=!!(A===42?d:d&&(l||!c)),t(s)}}};function cA(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ma={name:"autolink",tokenize:function(e,t,r){let n=0;return function(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(u){return ot(u)?(e.consume(u),A):u===64?r(u):i(u)}function A(u){return u===43||u===45||u===46||We(u)?(n=1,a(u)):i(u)}function a(u){return u===58?(e.consume(u),n=0,s):(u===43||u===45||u===46||We(u))&&n++<32?(e.consume(u),a):(n=0,i(u))}function s(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||gr(u)?r(u):(e.consume(u),s)}function i(u){return u===64?(e.consume(u),l):ka(u)?(e.consume(u),i):r(u)}function l(u){return We(u)?c(u):r(u)}function c(u){return u===46?(e.consume(u),n=0,l):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):d(u)}function d(u){if((u===45||We(u))&&n++<63){const p=u===45?d:c;return e.consume(u),p}return r(u)}}},Pn={partial:!0,tokenize:function(e,t,r){return function(o){return se(o)?he(e,n,"linePrefix")(o):n(o)};function n(o){return o===null||Z(o)?t(o):r(o)}}},uA={continuation:{tokenize:function(e,t,r){const n=this;return function(A){return se(A)?he(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):o(A)};function o(A){return e.attempt(uA,t,r)(A)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(A){if(A===62){const a=n.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(A),e.exit("blockQuoteMarker"),o}return r(A)};function o(A){return se(A)?(e.enter("blockQuotePrefixWhitespace"),e.consume(A),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(A))}}},dA={name:"characterEscape",tokenize:function(e,t,r){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),n};function n(o){return Ba(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}},fA={name:"characterReference",tokenize:function(e,t,r){const n=this;let o,A,a=0;return function(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s};function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),i):(e.enter("characterReferenceValue"),o=31,A=We,l(c))}function i(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,A=Da,l):(e.enter("characterReferenceValue"),o=7,A=hr,l(c))}function l(c){if(c===59&&a){const d=e.exit("characterReferenceValue");return A!==We||pr(n.sliceSerialize(d))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(c)}return A(c)&&a++<o?(e.consume(c),l):r(c)}}},pA={partial:!0,tokenize:function(e,t,r){const n=this;return function(A){return A===null?r(A):(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),o)};function o(A){return n.parser.lazy[n.now().line]?r(A):t(A)}}},gA={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){const n=this,o={partial:!0,tokenize:function(m,C,k){let S=0;return D;function D(B){return m.enter("lineEnding"),m.consume(B),m.exit("lineEnding"),I}function I(B){return m.enter("codeFencedFence"),se(B)?he(m,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):Q(B)}function Q(B){return B===A?(m.enter("codeFencedFenceSequence"),x(B)):k(B)}function x(B){return B===A?(S++,m.consume(B),x):S>=s?(m.exit("codeFencedFenceSequence"),se(B)?he(m,O,"whitespace")(B):O(B)):k(B)}function O(B){return B===null||Z(B)?(m.exit("codeFencedFence"),C(B)):k(B)}}};let A,a=0,s=0;return function(m){return function(C){const k=n.events[n.events.length-1];return a=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,A=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),i(C)}(m)};function i(m){return m===A?(s++,e.consume(m),i):s<3?r(m):(e.exit("codeFencedFenceSequence"),se(m)?he(e,l,"whitespace")(m):l(m))}function l(m){return m===null||Z(m)?(e.exit("codeFencedFence"),n.interrupt?t(m):e.check(pA,p,E)(m)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===null||Z(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(m)):se(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,d,"whitespace")(m)):m===96&&m===A?r(m):(e.consume(m),c)}function d(m){return m===null||Z(m)?l(m):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===null||Z(m)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(m)):m===96&&m===A?r(m):(e.consume(m),u)}function p(m){return e.attempt(o,E,g)(m)}function g(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),v}function v(m){return a>0&&se(m)?he(e,h,"linePrefix",a+1)(m):h(m)}function h(m){return m===null||Z(m)?e.check(pA,p,E)(m):(e.enter("codeFlowValue"),w(m))}function w(m){return m===null||Z(m)?(e.exit("codeFlowValue"),h(m)):(e.consume(m),w)}function E(m){return e.exit("codeFenced"),t(m)}}},vr={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(i){return e.enter("codeIndented"),he(e,o,"linePrefix",5)(i)};function o(i){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?A(i):r(i)}function A(i){return i===null?s(i):Z(i)?e.attempt(_a,A,s)(i):(e.enter("codeFlowValue"),a(i))}function a(i){return i===null||Z(i)?(e.exit("codeFlowValue"),A(i)):(e.consume(i),a)}function s(i){return e.exit("codeIndented"),t(i)}}},_a={partial:!0,tokenize:function(e,t,r){const n=this;return o;function o(a){return n.parser.lazy[n.now().line]?r(a):Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):he(e,A,"linePrefix",5)(a)}function A(a){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Z(a)?o(a):r(a)}}},Oa={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,r,n=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[n][1].type!=="lineEnding"&&e[n][1].type!=="space")){for(t=o;++t<n;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[n][1].type="codeTextPadding",o+=2,n-=2;break}}for(t=o-1,n++;++t<=n;)r===void 0?t!==n&&e[t][1].type!=="lineEnding"&&(r=t):(t===n||e[t][1].type==="lineEnding")&&(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},tokenize:function(e,t,r){let n,o,A=0;return function(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)};function a(c){return c===96?(e.consume(c),A++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?r(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),n=0,l(c)):Z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),i(c))}function i(c){return c===null||c===32||c===96||Z(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),i)}function l(c){return c===96?(e.consume(c),n++,l):n===A?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",i(c))}}};class Na{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const o=r||0;this.setCursor(Math.trunc(t));const A=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return n&&en(this.left,n),A.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),en(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),en(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);en(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);en(this.left,r.reverse())}}}function en(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function hA(e){const t={};let r,n,o,A,a,s,i,l=-1;const c=new Na(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(r=c.get(l),l&&r[1].type==="chunkFlow"&&c.get(l-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,La(c,l)),l=t[l],i=!0);else if(r[1]._container){for(o=l,n=void 0;o--;)if(A=c.get(o),A[1].type==="lineEnding"||A[1].type==="lineEndingBlank")A[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),A[1].type="lineEnding",n=o);else if(A[1].type!=="linePrefix")break;n&&(r[1].end={...c.get(n)[1].start},a=c.slice(n,l),a.unshift(r),c.splice(n,l-n+1,a))}}return rt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!i}function La(e,t){const r=e.get(t)[1],n=e.get(t)[2];let o=t-1;const A=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,i=[],l={};let c,d,u=-1,p=r,g=0,v=0;const h=[v];for(;p;){for(;e.get(++o)[1]!==p;);A.push(o),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=r;++u<s.length;)s[u][0]==="exit"&&s[u-1][0]==="enter"&&s[u][1].type===s[u-1][1].type&&s[u][1].start.line!==s[u][1].end.line&&(v=u+1,h.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):h.pop(),u=h.length;u--;){const w=s.slice(h[u],h[u+1]),E=A.pop();i.push([E,E+w.length-1]),e.splice(E,2,w)}for(i.reverse(),u=-1;++u<i.length;)l[g+i[u][0]]=g+i[u][1],g+=i[u][1]-i[u][0]-1;return l}const Ha={resolve:function(e){return hA(e),e},tokenize:function(e,t){let r;return function(a){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(a)};function n(a){return a===null?o(a):Z(a)?e.check(Ua,A,o)(a):(e.consume(a),n)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function A(a){return e.consume(a),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},Ua={partial:!0,tokenize:function(e,t,r){const n=this;return function(A){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),he(e,o,"linePrefix")};function o(A){if(A===null||Z(A))return r(A);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(A):e.interrupt(n.parser.constructs.flow,r,t)(A)}}};function mA(e,t,r,n,o,A,a,s,i){const l=i||Number.POSITIVE_INFINITY;let c=0;return function(h){return h===60?(e.enter(n),e.enter(o),e.enter(A),e.consume(h),e.exit(A),d):h===null||h===32||h===41||gr(h)?r(h):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(h))};function d(h){return h===62?(e.enter(A),e.consume(h),e.exit(A),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===62?(e.exit("chunkString"),e.exit(s),d(h)):h===null||h===60||Z(h)?r(h):(e.consume(h),h===92?p:u)}function p(h){return h===60||h===62||h===92?(e.consume(h),u):u(h)}function g(h){return c||h!==null&&h!==41&&!Fe(h)?c<l&&h===40?(e.consume(h),c++,g):h===41?(e.consume(h),c--,g):h===null||h===32||h===40||gr(h)?r(h):(e.consume(h),h===92?v:g):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(h))}function v(h){return h===40||h===41||h===92?(e.consume(h),g):g(h)}}function yA(e,t,r,n,o,A){const a=this;let s,i=0;return function(u){return e.enter(n),e.enter(o),e.consume(u),e.exit(o),e.enter(A),l};function l(u){return i>999||u===null||u===91||u===93&&!s||u===94&&!i&&"_hiddenFootnoteSupport"in a.parser.constructs?r(u):u===93?(e.exit(A),e.enter(o),e.consume(u),e.exit(o),e.exit(n),t):Z(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(u){return u===null||u===91||u===93||Z(u)||i++>999?(e.exit("chunkString"),l(u)):(e.consume(u),s||(s=!se(u)),u===92?d:c)}function d(u){return u===91||u===92||u===93?(e.consume(u),i++,c):c(u)}}function vA(e,t,r,n,o,A){let a;return function(d){return d===34||d===39||d===40?(e.enter(n),e.enter(o),e.consume(d),e.exit(o),a=d===40?41:d,s):r(d)};function s(d){return d===a?(e.enter(o),e.consume(d),e.exit(o),e.exit(n),t):(e.enter(A),i(d))}function i(d){return d===a?(e.exit(A),s(a)):d===null?r(d):Z(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),he(e,i,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(d))}function l(d){return d===a||d===null||Z(d)?(e.exit("chunkString"),i(d)):(e.consume(d),d===92?c:l)}function c(d){return d===a||d===92?(e.consume(d),l):l(d)}}function tn(e,t){let r;return function n(o){return Z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):se(o)?he(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const Fa={name:"definition",tokenize:function(e,t,r){const n=this;let o;return function(d){return e.enter("definition"),function(u){return yA.call(n,e,A,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}(d)};function A(d){return o=Nt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),a):r(d)}function a(d){return Fe(d)?tn(e,s)(d):s(d)}function s(d){return mA(e,i,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function i(d){return e.attempt(Ra,l,l)(d)}function l(d){return se(d)?he(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Z(d)?(e.exit("definition"),n.parser.defined.push(o),t(d)):r(d)}}},Ra={partial:!0,tokenize:function(e,t,r){return function(a){return Fe(a)?tn(e,n)(a):r(a)};function n(a){return vA(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return se(a)?he(e,A,"whitespace")(a):A(a)}function A(a){return a===null||Z(a)?t(a):r(a)}}},za={name:"hardBreakEscape",tokenize:function(e,t,r){return function(o){return e.enter("hardBreakEscape"),e.consume(o),n};function n(o){return Z(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}},ja={name:"headingAtx",resolve:function(e,t){let r,n,o=e.length-2,A=3;return e[A][1].type==="whitespace"&&(A+=2),o-2>A&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(A===o-1||o-4>A&&e[o-2][1].type==="whitespace")&&(o-=A+1===o?2:4),o>A&&(r={type:"atxHeadingText",start:e[A][1].start,end:e[o][1].end},n={type:"chunkText",start:e[A][1].start,end:e[o][1].end,contentType:"text"},rt(e,A,o-A+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(i){return e.enter("atxHeading"),function(l){return e.enter("atxHeadingSequence"),o(l)}(i)};function o(i){return i===35&&n++<6?(e.consume(i),o):i===null||Fe(i)?(e.exit("atxHeadingSequence"),A(i)):r(i)}function A(i){return i===35?(e.enter("atxHeadingSequence"),a(i)):i===null||Z(i)?(e.exit("atxHeading"),t(i)):se(i)?he(e,A,"whitespace")(i):(e.enter("atxHeadingText"),s(i))}function a(i){return i===35?(e.consume(i),a):(e.exit("atxHeadingSequence"),A(i))}function s(i){return i===null||i===35||Fe(i)?(e.exit("atxHeadingText"),A(i)):(e.consume(i),s)}}},Ga=["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"],wA=["pre","script","style","textarea"],qa={concrete:!0,name:"htmlFlow",resolveTo:function(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},tokenize:function(e,t,r){const n=this;let o,A,a,s,i;return function(b){return function(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),l}(b)};function l(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),A=!0,p):b===63?(e.consume(b),o=3,n.interrupt?t:L):ot(b)?(e.consume(b),a=String.fromCharCode(b),g):r(b)}function c(b){return b===45?(e.consume(b),o=2,d):b===91?(e.consume(b),o=5,s=0,u):ot(b)?(e.consume(b),o=4,n.interrupt?t:L):r(b)}function d(b){return b===45?(e.consume(b),n.interrupt?t:L):r(b)}function u(b){return b==="CDATA[".charCodeAt(s++)?(e.consume(b),s===6?n.interrupt?t:x:u):r(b)}function p(b){return ot(b)?(e.consume(b),a=String.fromCharCode(b),g):r(b)}function g(b){if(b===null||b===47||b===62||Fe(b)){const R=b===47,K=a.toLowerCase();return R||A||!wA.includes(K)?Ga.includes(a.toLowerCase())?(o=6,R?(e.consume(b),v):n.interrupt?t(b):x(b)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(b):A?h(b):w(b)):(o=1,n.interrupt?t(b):x(b))}return b===45||We(b)?(e.consume(b),a+=String.fromCharCode(b),g):r(b)}function v(b){return b===62?(e.consume(b),n.interrupt?t:x):r(b)}function h(b){return se(b)?(e.consume(b),h):I(b)}function w(b){return b===47?(e.consume(b),I):b===58||b===95||ot(b)?(e.consume(b),E):se(b)?(e.consume(b),w):I(b)}function E(b){return b===45||b===46||b===58||b===95||We(b)?(e.consume(b),E):m(b)}function m(b){return b===61?(e.consume(b),C):se(b)?(e.consume(b),m):w(b)}function C(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(e.consume(b),i=b,k):se(b)?(e.consume(b),C):S(b)}function k(b){return b===i?(e.consume(b),i=null,D):b===null||Z(b)?r(b):(e.consume(b),k)}function S(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||Fe(b)?m(b):(e.consume(b),S)}function D(b){return b===47||b===62||se(b)?w(b):r(b)}function I(b){return b===62?(e.consume(b),Q):r(b)}function Q(b){return b===null||Z(b)?x(b):se(b)?(e.consume(b),Q):r(b)}function x(b){return b===45&&o===2?(e.consume(b),U):b===60&&o===1?(e.consume(b),N):b===62&&o===4?(e.consume(b),y):b===63&&o===3?(e.consume(b),L):b===93&&o===5?(e.consume(b),M):!Z(b)||o!==6&&o!==7?b===null||Z(b)?(e.exit("htmlFlowData"),O(b)):(e.consume(b),x):(e.exit("htmlFlowData"),e.check(Wa,V,O)(b))}function O(b){return e.check(Ya,B,V)(b)}function B(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),_}function _(b){return b===null||Z(b)?O(b):(e.enter("htmlFlowData"),x(b))}function U(b){return b===45?(e.consume(b),L):x(b)}function N(b){return b===47?(e.consume(b),a="",F):x(b)}function F(b){if(b===62){const R=a.toLowerCase();return wA.includes(R)?(e.consume(b),y):x(b)}return ot(b)&&a.length<8?(e.consume(b),a+=String.fromCharCode(b),F):x(b)}function M(b){return b===93?(e.consume(b),L):x(b)}function L(b){return b===62?(e.consume(b),y):b===45&&o===2?(e.consume(b),L):x(b)}function y(b){return b===null||Z(b)?(e.exit("htmlFlowData"),V(b)):(e.consume(b),y)}function V(b){return e.exit("htmlFlow"),t(b)}}},Wa={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Pn,t,r)}}},Ya={partial:!0,tokenize:function(e,t,r){const n=this;return function(A){return Z(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),o):r(A)};function o(A){return n.parser.lazy[n.now().line]?r(A):t(A)}}},Va={name:"htmlText",tokenize:function(e,t,r){const n=this;let o,A,a;return function(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),s};function s(y){return y===33?(e.consume(y),i):y===47?(e.consume(y),C):y===63?(e.consume(y),E):ot(y)?(e.consume(y),D):r(y)}function i(y){return y===45?(e.consume(y),l):y===91?(e.consume(y),A=0,p):ot(y)?(e.consume(y),w):r(y)}function l(y){return y===45?(e.consume(y),u):r(y)}function c(y){return y===null?r(y):y===45?(e.consume(y),d):Z(y)?(a=c,F(y)):(e.consume(y),c)}function d(y){return y===45?(e.consume(y),u):c(y)}function u(y){return y===62?N(y):y===45?d(y):c(y)}function p(y){return y==="CDATA[".charCodeAt(A++)?(e.consume(y),A===6?g:p):r(y)}function g(y){return y===null?r(y):y===93?(e.consume(y),v):Z(y)?(a=g,F(y)):(e.consume(y),g)}function v(y){return y===93?(e.consume(y),h):g(y)}function h(y){return y===62?N(y):y===93?(e.consume(y),h):g(y)}function w(y){return y===null||y===62?N(y):Z(y)?(a=w,F(y)):(e.consume(y),w)}function E(y){return y===null?r(y):y===63?(e.consume(y),m):Z(y)?(a=E,F(y)):(e.consume(y),E)}function m(y){return y===62?N(y):E(y)}function C(y){return ot(y)?(e.consume(y),k):r(y)}function k(y){return y===45||We(y)?(e.consume(y),k):S(y)}function S(y){return Z(y)?(a=S,F(y)):se(y)?(e.consume(y),S):N(y)}function D(y){return y===45||We(y)?(e.consume(y),D):y===47||y===62||Fe(y)?I(y):r(y)}function I(y){return y===47?(e.consume(y),N):y===58||y===95||ot(y)?(e.consume(y),Q):Z(y)?(a=I,F(y)):se(y)?(e.consume(y),I):N(y)}function Q(y){return y===45||y===46||y===58||y===95||We(y)?(e.consume(y),Q):x(y)}function x(y){return y===61?(e.consume(y),O):Z(y)?(a=x,F(y)):se(y)?(e.consume(y),x):I(y)}function O(y){return y===null||y===60||y===61||y===62||y===96?r(y):y===34||y===39?(e.consume(y),o=y,B):Z(y)?(a=O,F(y)):se(y)?(e.consume(y),O):(e.consume(y),_)}function B(y){return y===o?(e.consume(y),o=void 0,U):y===null?r(y):Z(y)?(a=B,F(y)):(e.consume(y),B)}function _(y){return y===null||y===34||y===39||y===60||y===61||y===96?r(y):y===47||y===62||Fe(y)?I(y):(e.consume(y),_)}function U(y){return y===47||y===62||Fe(y)?I(y):r(y)}function N(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):r(y)}function F(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),M}function M(y){return se(y)?he(e,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):L(y)}function L(y){return e.enter("htmlTextData"),a(y)}}},wr={name:"labelEnd",resolveAll:function(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const o=n.type==="labelImage"?4:2;n.type="data",t+=o}}return e.length!==r.length&&rt(e,0,e.length,r),e},resolveTo:function(e,t){let r,n,o,A,a=e.length,s=0;for(;a--;)if(r=e[a][1],n){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[a][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(o){if(e[a][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(n=a,r.type!=="labelLink")){s=2;break}}else r.type==="labelEnd"&&(o=a);const i={type:e[n][1].type==="labelLink"?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[o-2][1].start}};return A=[["enter",i,t],["enter",l,t]],A=Xe(A,e.slice(n+1,n+s+3)),A=Xe(A,[["enter",c,t]]),A=Xe(A,mr(t.parser.constructs.insideSpan.null,e.slice(n+s+4,o-3),t)),A=Xe(A,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),A=Xe(A,e.slice(o+1)),A=Xe(A,[["exit",i,t]]),rt(e,n,e.length,A),e},tokenize:function(e,t,r){const n=this;let o,A,a=n.events.length;for(;a--;)if((n.events[a][1].type==="labelImage"||n.events[a][1].type==="labelLink")&&!n.events[a][1]._balanced){o=n.events[a][1];break}return function(d){return o?o._inactive?c(d):(A=n.parser.defined.includes(Nt(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),s):r(d)};function s(d){return d===40?e.attempt(Ka,l,A?l:c)(d):d===91?e.attempt(Xa,l,A?i:c)(d):A?l(d):c(d)}function i(d){return e.attempt(Ja,l,c)(d)}function l(d){return t(d)}function c(d){return o._balanced=!0,r(d)}}},Ka={tokenize:function(e,t,r){return function(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),n};function n(c){return Fe(c)?tn(e,o)(c):o(c)}function o(c){return c===41?l(c):mA(e,A,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function A(c){return Fe(c)?tn(e,s)(c):l(c)}function a(c){return r(c)}function s(c){return c===34||c===39||c===40?vA(e,i,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):l(c)}function i(c){return Fe(c)?tn(e,l)(c):l(c)}function l(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):r(c)}}},Xa={tokenize:function(e,t,r){const n=this;return function(a){return yA.call(n,e,o,A,"reference","referenceMarker","referenceString")(a)};function o(a){return n.parser.defined.includes(Nt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(a):r(a)}function A(a){return r(a)}}},Ja={tokenize:function(e,t,r){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),n};function n(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}},Za={name:"labelStartImage",resolveAll:wr.resolveAll,tokenize:function(e,t,r){const n=this;return function(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o};function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),A):r(a)}function A(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}},$a={name:"labelStartLink",resolveAll:wr.resolveAll,tokenize:function(e,t,r){const n=this;return function(A){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(A),e.exit("labelMarker"),e.exit("labelLink"),o};function o(A){return A===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(A):t(A)}}},br={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),he(e,t,"linePrefix")}}},Sn={name:"thematicBreak",tokenize:function(e,t,r){let n,o=0;return function(s){return e.enter("thematicBreak"),function(i){return n=i,A(i)}(s)};function A(s){return s===n?(e.enter("thematicBreakSequence"),a(s)):o>=3&&(s===null||Z(s))?(e.exit("thematicBreak"),t(s)):r(s)}function a(s){return s===n?(e.consume(s),o++,a):(e.exit("thematicBreakSequence"),se(s)?he(e,A,"whitespace")(s):A(s))}}},Re={continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Pn,function(A){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,he(e,t,"listItemIndent",n.containerState.size+1)(A)},function(A){return n.containerState.furtherBlankLines||!se(A)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(A)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(tl,t,o)(A))});function o(A){return n.containerState._closeFlow=!0,n.interrupt=void 0,he(e,e.attempt(Re,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){const n=this,o=n.events[n.events.length-1];let A=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(u){const p=n.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||u===n.containerState.marker:hr(u)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(Sn,r,i)(u):i(u);if(!n.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(u)}return r(u)};function s(u){return hr(u)&&++a<10?(e.consume(u),s):(!n.interrupt||a<2)&&(n.containerState.marker?u===n.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),i(u)):r(u)}function i(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||u,e.check(Pn,n.interrupt?r:l,e.attempt(el,d,c))}function l(u){return n.containerState.initialBlankLine=!0,A++,d(u)}function c(u){return se(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),d):r(u)}function d(u){return n.containerState.size=A+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}},el={partial:!0,tokenize:function(e,t,r){const n=this;return he(e,function(o){const A=n.events[n.events.length-1];return!se(o)&&A&&A[1].type==="listItemPrefixWhitespace"?t(o):r(o)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tl={partial:!0,tokenize:function(e,t,r){const n=this;return he(e,function(o){const A=n.events[n.events.length-1];return A&&A[1].type==="listItemIndent"&&A[2].sliceSerialize(A[1],!0).length===n.containerState.size?t(o):r(o)},"listItemIndent",n.containerState.size+1)}},bA={name:"setextUnderline",resolveTo:function(e,t){let r,n,o,A=e.length;for(;A--;)if(e[A][0]==="enter"){if(e[A][1].type==="content"){r=A;break}e[A][1].type==="paragraph"&&(n=A)}else e[A][1].type==="content"&&e.splice(A,1),!o&&e[A][1].type==="definition"&&(o=A);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",o?(e.splice(n,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,r){const n=this;let o;return function(s){let i,l=n.events.length;for(;l--;)if(n.events[l][1].type!=="lineEnding"&&n.events[l][1].type!=="linePrefix"&&n.events[l][1].type!=="content"){i=n.events[l][1].type==="paragraph";break}return n.parser.lazy[n.now().line]||!n.interrupt&&!i?r(s):(e.enter("setextHeadingLine"),o=s,function(c){return e.enter("setextHeadingLineSequence"),A(c)}(s))};function A(s){return s===o?(e.consume(s),A):(e.exit("setextHeadingLineSequence"),se(s)?he(e,a,"lineSuffix")(s):a(s))}function a(s){return s===null||Z(s)?(e.exit("setextHeadingLine"),t(s)):r(s)}}},nl={tokenize:function(e){const t=this,r=e.attempt(Pn,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r)},e.attempt(this.parser.constructs.flowInitial,n,he(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Ha,n)),"linePrefix")));return r;function n(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(o)}}},rl={resolveAll:CA()},ol=EA("string"),Al=EA("text");function EA(e){return{resolveAll:CA(e==="text"?il:void 0),tokenize:function(t){const r=this,n=this.parser.constructs[e],o=t.attempt(n,A,a);return A;function A(l){return i(l)?o(l):a(l)}function a(l){if(l!==null)return t.enter("data"),t.consume(l),s;t.consume(l)}function s(l){return i(l)?(t.exit("data"),o(l)):(t.consume(l),s)}function i(l){if(l===null)return!0;const c=n[l];let d=-1;if(c)for(;++d<c.length;){const u=c[d];if(!u.previous||u.previous.call(r,r.previous))return!0}return!1}}}}function CA(e){return function(t,r){let n,o=-1;for(;++o<=t.length;)n===void 0?t[o]&&t[o][1].type==="data"&&(n=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==n+2&&(t[n][1].end=t[o-1][1].end,t.splice(n+2,o-n-2),o=n+2),n=void 0);return e?e(t,r):t}}function il(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],o=t.sliceStream(n);let A,a=o.length,s=-1,i=0;for(;a--;){const l=o[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)i++,s--;if(s)break;s=-1}else if(l===-2)A=!0,i++;else if(l!==-1){a++;break}}if(i){const l={type:r===e.length||A||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}const sl={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:uA},al={91:Fa},ll={[-2]:vr,[-1]:vr,32:vr},cl={35:ja,42:Sn,45:[bA,Sn],60:qa,61:bA,95:Sn,96:gA,126:gA},ul={38:fA,92:dA},dl={[-5]:br,[-4]:br,[-3]:br,33:Za,38:fA,42:yr,60:[Ma,Va],91:$a,92:[za,dA],93:wr,95:yr,96:Oa},fl={null:[yr,rl]},pl=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:al,disable:{null:[]},document:sl,flow:cl,flowInitial:ll,insideSpan:fl,string:ul,text:dl},Symbol.toStringTag,{value:"Module"}));function gl(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},A=[];let a=[],s=[];const i={attempt:v(function(E,m){h(E,m.from)}),check:v(g),consume:function(E){Z(E)?(n.line++,n.column=1,n.offset+=E===-3?2:1,w()):E!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=E},enter:function(E,m){const C=m||{};return C.type=E,C.start=u(),l.events.push(["enter",C,l]),s.push(C),C},exit:function(E){const m=s.pop();return m.end=u(),l.events.push(["exit",m,l]),m},interrupt:v(g,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(E){o[E.line]=E.column,w()},events:[],now:u,parser:e,previous:null,sliceSerialize:function(E,m){return function(C,k){let S=-1;const D=[];let I;for(;++S<C.length;){const Q=C[S];let x;if(typeof Q=="string")x=Q;else switch(Q){case-5:x="\r";break;case-4:x=`
|
|
22
|
-
`;break;case-3:
|
|
23
|
-
`;break;case-2:x=k?" ":" ";break;case-1:if(!k&&I)continue;x=" ";break;default:x=String.fromCharCode(Q)}I=Q===-2,D.push(x)}return D.join("")}(d(E),m)},sliceStream:d,write:function(E){return a=Xe(a,E),function(){let m;for(;n._index<a.length;){const C=a[n._index];if(typeof C=="string")for(m=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===m&&n._bufferIndex<C.length;)p(C.charCodeAt(n._bufferIndex));else p(C)}}(),a[a.length-1]!==null?[]:(h(t,0),l.events=mr(A,l.events,l),l.events)}};let c=t.tokenize.call(l,i);return t.resolveAll&&A.push(t),l;function d(E){return function(m,C){const k=C.start._index,S=C.start._bufferIndex,D=C.end._index,I=C.end._bufferIndex;let Q;if(k===D)Q=[m[k].slice(S,I)];else{if(Q=m.slice(k,D),S>-1){const x=Q[0];typeof x=="string"?Q[0]=x.slice(S):Q.shift()}I>0&&Q.push(m[D].slice(0,I))}return Q}(a,E)}function u(){const{_bufferIndex:E,_index:m,line:C,column:k,offset:S}=n;return{_bufferIndex:E,_index:m,line:C,column:k,offset:S}}function p(E){c=c(E)}function g(E,m){m.restore()}function v(E,m){return function(C,k,S){let D,I,Q,x;return Array.isArray(C)?O(C):"tokenize"in C?O([C]):function(N){return F;function F(M){const L=M!==null&&N[M],y=M!==null&&N.null;return O([...Array.isArray(L)?L:L?[L]:[],...Array.isArray(y)?y:y?[y]:[]])(M)}}(C);function O(N){return D=N,I=0,N.length===0?S:B(N[I])}function B(N){return function(F){return x=function(){const M=u(),L=l.previous,y=l.currentConstruct,V=l.events.length,b=Array.from(s);return{from:V,restore:R};function R(){n=M,l.previous=L,l.currentConstruct=y,l.events.length=V,s=b,w()}}(),Q=N,N.partial||(l.currentConstruct=N),N.name&&l.parser.constructs.disable.null.includes(N.name)?U():N.tokenize.call(m?Object.assign(Object.create(l),m):l,i,_,U)(F)}}function _(N){return E(Q,x),k}function U(N){return x.restore(),++I<D.length?B(D[I]):S}}}function h(E,m){E.resolveAll&&!A.includes(E)&&A.push(E),E.resolve&&rt(l.events,m,l.events.length-m,E.resolve(l.events.slice(m),l)),E.resolveTo&&(l.events=E.resolveTo(l.events,l))}function w(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}const PA=/[\0\t\n\r]/g,hl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ml(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),o=n===120||n===88;return sA(r.slice(o?2:1),o?16:10)}return pr(r)||e}const SA={}.hasOwnProperty;function yl(e,t,r){return typeof t!="string"&&(r=t,t=void 0),function(n){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ee),autolinkProtocol:B,autolinkEmail:B,atxHeading:i(le),blockQuote:i(G),characterEscape:B,characterReference:B,codeFenced:i(ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(ae,l),codeText:i(ne,l),codeTextData:B,data:B,codeFlowValue:B,definition:i(me),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(fe),hardBreakEscape:i(Me),hardBreakTrailing:i(Me),htmlFlow:i(De,l),htmlFlowData:B,htmlText:i(De,l),htmlTextData:B,image:i(Ft),label:l,link:i(Ee),listItem:i(be),listItemValue:v,listOrdered:i($e,g),listUnordered:i($e),paragraph:i(dt),reference:de,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(le),strong:i(Rt),thematicBreak:i(st)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:j,autolinkProtocol:Je,blockQuote:d(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:He,characterReferenceMarkerNumeric:He,characterReferenceValue:Se,characterReference:xe,codeFenced:d(m),codeFencedFence:E,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:_,codeIndented:d(C),codeText:d(L),codeTextData:_,data:_,definition:d(),definitionDestinationString:D,definitionLabelString:k,definitionTitleString:S,emphasis:d(),hardBreakEscape:d(N),hardBreakTrailing:d(N),htmlFlow:d(F),htmlFlowData:_,htmlText:d(M),htmlTextData:_,image:d(V),label:R,labelText:b,lineEnding:U,link:d(y),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:oe,resourceDestinationString:K,resourceTitleString:Y,resource:$,setextHeading:d(O),setextHeadingLineSequence:x,setextHeadingText:Q,strong:d(),thematicBreak:d()}};kA(o,(n||{}).mdastExtensions||[]);const A={};return a;function a(T){let q={type:"root",children:[]};const X={stack:[q],tokenStack:[],config:o,enter:c,exit:u,buffer:l,resume:p,data:A},W=[];let re=-1;for(;++re<T.length;)(T[re][1].type==="listOrdered"||T[re][1].type==="listUnordered")&&(T[re][0]==="enter"?W.push(re):re=s(T,W.pop(),re));for(re=-1;++re<T.length;){const Ae=o[T[re][0]];SA.call(Ae,T[re][1].type)&&Ae[T[re][1].type].call(Object.assign({sliceSerialize:T[re][2].sliceSerialize},X),T[re][1])}if(X.tokenStack.length>0){const Ae=X.tokenStack[X.tokenStack.length-1];(Ae[1]||DA).call(X,void 0,Ae[0])}for(q.position={start:vt(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:vt(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re<o.transforms.length;)q=o.transforms[re](q)||q;return q}function s(T,q,X){let W,re,Ae,Ye,ye=q-1,ce=-1,_e=!1;for(;++ye<=X;){const ie=T[ye];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ie[0]==="enter"?ce++:ce--,Ye=void 0;break;case"lineEndingBlank":ie[0]==="enter"&&(W&&!Ye&&!ce&&!Ae&&(Ae=ye),Ye=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ye=void 0}if(!ce&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||ce===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(W){let pe=ye;for(re=void 0;pe--;){const Oe=T[pe];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;re&&(T[re][1].type="lineEndingBlank",_e=!0),Oe[1].type="lineEnding",re=pe}else if(Oe[1].type!=="linePrefix"&&Oe[1].type!=="blockQuotePrefix"&&Oe[1].type!=="blockQuotePrefixWhitespace"&&Oe[1].type!=="blockQuoteMarker"&&Oe[1].type!=="listItemIndent")break}Ae&&(!re||Ae<re)&&(W._spread=!0),W.end=Object.assign({},re?T[re][1].start:ie[1].end),T.splice(re||ye,0,["exit",W,ie[2]]),ye++,X++}if(ie[1].type==="listItemPrefix"){const pe={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};W=pe,T.splice(ye,0,["enter",pe,ie[2]]),ye++,X++,Ae=void 0,Ye=!0}}}return T[q][1]._spread=_e,X}function i(T,q){return X;function X(W){c.call(this,T(W),W),q&&q.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(T,q,X){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([q,X||void 0]),T.position={start:vt(q.start),end:void 0}}function d(T){return q;function q(X){T&&T.call(this,X),u.call(this,X)}}function u(T,q){const X=this.stack.pop(),W=this.tokenStack.pop();if(!W)throw new Error("Cannot close `"+T.type+"` ("+Zt({start:T.start,end:T.end})+"): itโs not open");W[0].type!==T.type&&(q?q.call(this,T,W[0]):(W[1]||DA).call(this,T,W[0])),X.position.end=vt(T.end)}function p(){return function(T){return rA(T,typeof Cn.includeImageAlt!="boolean"||Cn.includeImageAlt,typeof Cn.includeHtml!="boolean"||Cn.includeHtml)}(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(T){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0)}function h(){const T=this.resume();this.stack[this.stack.length-1].lang=T}function w(){const T=this.resume();this.stack[this.stack.length-1].meta=T}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/(\r?\n|\r)$/g,"")}function k(T){const q=this.resume(),X=this.stack[this.stack.length-1];X.label=q,X.identifier=Nt(this.sliceSerialize(T)).toLowerCase()}function S(){const T=this.resume();this.stack[this.stack.length-1].title=T}function D(){const T=this.resume();this.stack[this.stack.length-1].url=T}function I(T){const q=this.stack[this.stack.length-1];if(!q.depth){const X=this.sliceSerialize(T).length;q.depth=X}}function Q(){this.data.setextHeadingSlurpLineEnding=!0}function x(T){this.stack[this.stack.length-1].depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function B(T){const q=this.stack[this.stack.length-1].children;let X=q[q.length-1];(!X||X.type!=="text")&&(X=zt(),X.position={start:vt(T.start),end:void 0},q.push(X)),this.stack.push(X)}function _(T){const q=this.stack.pop();q.value+=this.sliceSerialize(T),q.position.end=vt(T.end)}function U(T){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak)return q.children[q.children.length-1].position.end=vt(T.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(q.type)&&(B.call(this,T),_.call(this,T))}function N(){this.data.atHardBreak=!0}function F(){const T=this.resume();this.stack[this.stack.length-1].value=T}function M(){const T=this.resume();this.stack[this.stack.length-1].value=T}function L(){const T=this.resume();this.stack[this.stack.length-1].value=T}function y(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=q,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function V(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=q,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function b(T){const q=this.sliceSerialize(T),X=this.stack[this.stack.length-2];X.label=function(W){return W.replace(hl,ml)}(q),X.identifier=Nt(q).toLowerCase()}function R(){const T=this.stack[this.stack.length-1],q=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const W=T.children;X.children=W}else X.alt=q}function K(){const T=this.resume();this.stack[this.stack.length-1].url=T}function Y(){const T=this.resume();this.stack[this.stack.length-1].title=T}function $(){this.data.inReference=void 0}function de(){this.data.referenceType="collapsed"}function oe(T){const q=this.resume(),X=this.stack[this.stack.length-1];X.label=q,X.identifier=Nt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function He(T){this.data.characterReferenceType=T.type}function Se(T){const q=this.sliceSerialize(T),X=this.data.characterReferenceType;let W;X?(W=sA(q,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=pr(q),this.stack[this.stack.length-1].value+=W}function xe(T){this.stack.pop().position.end=vt(T.end)}function Je(T){_.call(this,T),this.stack[this.stack.length-1].url=this.sliceSerialize(T)}function j(T){_.call(this,T),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(T)}function G(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function ne(){return{type:"inlineCode",value:""}}function me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:0,children:[]}}function Me(){return{type:"break"}}function De(){return{type:"html",value:""}}function Ft(){return{type:"image",title:null,url:"",alt:null}}function Ee(){return{type:"link",title:null,url:"",children:[]}}function $e(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function be(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function Rt(){return{type:"strong",children:[]}}function zt(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}(r)(function(n){for(;!hA(n););return n}(function(n){const o={constructs:Ca([pl,...(n||{}).extensions||[]]),content:A(Ta),defined:[],document:A(Qa),flow:A(nl),lazy:{},string:A(ol),text:A(Al)};return o;function A(a){return function(s){return gl(o,a,s)}}}(r).document().write(function(){let n,o=1,A="",a=!0;return function(s,i,l){const c=[];let d,u,p,g,v;for(s=A+(typeof s=="string"?s.toString():new TextDecoder(i||void 0).decode(s)),p=0,A="",a&&(s.charCodeAt(0)===65279&&p++,a=void 0);p<s.length;){if(PA.lastIndex=p,d=PA.exec(s),g=d&&d.index!==void 0?d.index:s.length,v=s.charCodeAt(g),!d){A=s.slice(p);break}if(v===10&&p===g&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),p<g&&(c.push(s.slice(p,g)),o+=g-p),v){case 0:c.push(65533),o++;break;case 9:for(u=4*Math.ceil(o/4),c.push(-2);o++<u;)c.push(-1);break;case 10:c.push(-4),o=1;break;default:n=!0,o=1}p=g+1}return l&&(n&&c.push(-5),A&&c.push(A),c.push(null)),c}}()(e,t,!0))))}function vt(e){return{line:e.line,column:e.column,offset:e.offset}}function kA(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?kA(e,n):vl(e,n)}}function vl(e,t){let r;for(r in t)if(SA.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function DA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zt({start:t.start,end:t.end})+") is still open")}function wl(e){const t=this;t.parser=function(r){return yl(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function BA(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const o=e.all(t),A=o[0];A&&A.type==="text"?A.value="["+A.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=n:o.push({type:"text",value:n}),o}function xA(e){return e.spread??e.children.length>1}function bl(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),o=0;const A=[];for(;n;)A.push(IA(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return A.push(IA(t.slice(o),o>0,!1)),A.join("")}function IA(e,t,r){let n=0,o=e.length;if(t){let A=e.codePointAt(n);for(;A===9||A===32;)n++,A=e.codePointAt(n)}if(r){let A=e.codePointAt(o-1);for(;A===9||A===32;)o--,A=e.codePointAt(o-1)}return o>n?e.slice(n,o):""}const El={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
24
|
-
`}]},code:function(e,t){const
|
|
25
|
-
`:"",
|
|
26
|
-
`}),c.type!=="element"||c.tagName!=="p"||o?
|
|
27
|
-
`});const
|
|
28
|
-
`});++
|
|
29
|
-
`}),
|
|
30
|
-
`}),
|
|
31
|
-
`},{type:"element",tagName:"ol",properties:{},children:
|
|
32
|
-
`}]}}(
|
|
33
|
-
`},o),A}function Nl(e,t){return e&&"run"in e?async function(r,n){const o=UA(r,{file:n,...t});await e.run(o,n)}:function(r,n){return UA(r,{file:n,...e||t})}}function FA(e){if(e)throw e}var Cr,RA,Ll=function(){if(RA)return Cr;RA=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=function(i){return typeof Array.isArray=="function"?Array.isArray(i):t.call(i)==="[object Array]"},A=function(i){if(!i||t.call(i)!=="[object Object]")return!1;var l,c=e.call(i,"constructor"),d=i.constructor&&i.constructor.prototype&&e.call(i.constructor.prototype,"isPrototypeOf");if(i.constructor&&!c&&!d)return!1;for(l in i);return typeof l>"u"||e.call(i,l)},a=function(i,l){r&&l.name==="__proto__"?r(i,l.name,{enumerable:!0,configurable:!0,value:l.newValue,writable:!0}):i[l.name]=l.newValue},s=function(i,l){if(l==="__proto__"){if(!e.call(i,l))return;if(n)return n(i,l).value}return i[l]};return Cr=function i(){var l,c,d,u,p,g,v=arguments[0],h=1,w=arguments.length,E=!1;for(typeof v=="boolean"&&(E=v,v=arguments[1]||{},h=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});h<w;++h)if((l=arguments[h])!=null)for(c in l)d=s(v,c),v!==(u=s(l,c))&&(E&&u&&(A(u)||(p=o(u)))?(p?(p=!1,g=d&&o(d)?d:[]):g=d&&A(d)?d:{},a(v,{name:c,newValue:i(E,g,u)})):typeof u<"u"&&a(v,{name:c,newValue:u}));return v},Cr}();const Pr=qo(Ll);function Sr(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 Hl(){const e=[],t={run:function(...r){let n=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function A(a,...s){const i=e[++n];let l=-1;if(a)o(a);else{for(;++l<r.length;)(s[l]===null||s[l]===void 0)&&(s[l]=r[l]);r=s,i?function(c,d){let u;return p;function p(...h){const w=c.length>h.length;let E;w&&h.push(g);try{E=c.apply(this,h)}catch(m){if(w&&u)throw m;return g(m)}w||(E&&E.then&&typeof E.then=="function"?E.then(v,g):E instanceof Error?g(E):v(E))}function g(h,...w){u||(u=!0,d(h,...w))}function v(h){g(null,h)}}(i,A)(...s):o(null,...s)}})(null,...r)},use:function(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}const At={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rn(e);let r,n=0,o=-1,A=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;A--;)if(e.codePointAt(A)===47){if(r){n=A+1;break}}else o<0&&(r=!0,o=A+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;A--;)if(e.codePointAt(A)===47){if(r){n=A+1;break}}else a<0&&(r=!0,a=A+1),s>-1&&(e.codePointAt(A)===t.codePointAt(s--)?s<0&&(o=A):(s=-1,o=a));return n===o?o=a:o<0&&(o=e.length),e.slice(n,o)},dirname:function(e){if(rn(e),e.length===0)return".";let t,r=-1,n=e.length;for(;--n;)if(e.codePointAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)},extname:function(e){rn(e);let t,r=e.length,n=-1,o=0,A=-1,a=0;for(;r--;){const s=e.codePointAt(r);if(s!==47)n<0&&(t=!0,n=r+1),s===46?A<0?A=r:a!==1&&(a=1):A>-1&&(a=-1);else if(t){o=r+1;break}}return A<0||n<0||a===0||a===1&&A===n-1&&A===o+1?"":e.slice(A,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)rn(e[r]),e[r]&&(t=t===void 0?e[r]:t+"/"+e[r]);return t===void 0?".":function(n){rn(n);const o=n.codePointAt(0)===47;let A=function(a,s){let i,l,c="",d=0,u=-1,p=0,g=-1;for(;++g<=a.length;){if(g<a.length)i=a.codePointAt(g);else{if(i===47)break;i=47}if(i===47){if(u!==g-1&&p!==1)if(u!==g-1&&p===2){if(c.length<2||d!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(l=c.lastIndexOf("/"),l!==c.length-1){l<0?(c="",d=0):(c=c.slice(0,l),d=c.length-1-c.lastIndexOf("/")),u=g,p=0;continue}}else if(c.length>0){c="",d=0,u=g,p=0;continue}}s&&(c=c.length>0?c+"/..":"..",d=2)}else c.length>0?c+="/"+a.slice(u+1,g):c=a.slice(u+1,g),d=g-u-1;u=g,p=0}else i===46&&p>-1?p++:p=-1}return c}(n,!o);return A.length===0&&!o&&(A="."),A.length>0&&n.codePointAt(n.length-1)===47&&(A+="/"),o?"/"+A:A}(t)},sep:"/"};function rn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ul={cwd:function(){return"/"}};function kr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Fl(e){if(typeof e=="string")e=new URL(e);else if(!kr(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 function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=t.pathname;let n=-1;for(;++n<r.length;)if(r.codePointAt(n)===37&&r.codePointAt(n+1)===50){const o=r.codePointAt(n+2);if(o===70||o===102){const A=new TypeError("File URL path must not include encoded / characters");throw A.code="ERR_INVALID_FILE_URL_PATH",A}}return decodeURIComponent(r)}(e)}const Dr=["history","path","basename","stem","extname","dirname"];class zA{constructor(t){let r;var n;r=t?kr(t)?{path:t}:typeof t=="string"||(n=t)&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n?{value:t}:t:{},this.cwd="cwd"in r?"":Ul.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,A=-1;for(;++A<Dr.length;){const a=Dr[A];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}for(o in r)Dr.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?At.basename(this.path):void 0}set basename(t){xr(t,"basename"),Br(t,"basename"),this.path=At.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?At.dirname(this.path):void 0}set dirname(t){jA(this.basename,"dirname"),this.path=At.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?At.extname(this.path):void 0}set extname(t){if(Br(t,"extname"),jA(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=At.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kr(t)&&(t=Fl(t)),xr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?At.basename(this.path,this.extname):void 0}set stem(t){xr(t,"stem"),Br(t,"stem"),this.path=At.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const o=this.message(t,r,n);throw o.fatal=!0,o}info(t,r,n){const o=this.message(t,r,n);return o.fatal=void 0,o}message(t,r,n){const o=new Ne(t,r,n);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Br(e,t){if(e&&e.includes(At.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+At.sep+"`")}function xr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jA(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Rl=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},zl={}.hasOwnProperty;class Ir extends Rl{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Hl()}copy(){const t=new Ir;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Pr(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Mr("data",this.frozen),this.namespace[t]=r,this):zl.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Mr("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const o=r.call(t,...n);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=In(t),n=this.parser||this.Parser;return Tr("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Tr("process",this.parser||this.Parser),Qr("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(A,a){const s=In(t),i=n.parse(s);function l(c,d){c||!d?a(c):A?A(d):r(void 0,d)}n.run(i,s,function(c,d,u){if(c||!d||!u)return l(c);const p=d,g=n.stringify(p,u);var v;typeof(v=g)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(v)?u.value=g:u.result=g,l(c,u)})}}processSync(t){let r,n=!1;return this.freeze(),Tr("processSync",this.parser||this.Parser),Qr("processSync",this.compiler||this.Compiler),this.process(t,function(o,A){n=!0,FA(o),r=A}),qA("processSync","process",n),r}run(t,r,n){GA(t),this.freeze();const o=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?A(void 0,n):new Promise(A);function A(a,s){const i=In(r);o.run(t,i,function(l,c,d){const u=c||t;l?s(l):a?a(u):n(void 0,u,d)})}}runSync(t,r){let n,o=!1;return this.run(t,r,function(A,a){FA(A),n=a,o=!0}),qA("runSync","run",o),n}stringify(t,r){this.freeze();const n=In(r),o=this.compiler||this.Compiler;return Qr("stringify",o),GA(t),o(t,n)}use(t,...r){const n=this.attachers,o=this.namespace;if(Mr("use",this.frozen),t!=null)if(typeof t=="function")i(t,r);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?s(t):a(t)}return this;function A(l){if(typeof l=="function")i(l,[]);else{if(typeof l!="object")throw new TypeError("Expected usable value, not `"+l+"`");if(Array.isArray(l)){const[c,...d]=l;i(c,d)}else a(l)}}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(o.settings=Pr(!0,o.settings,l.settings))}function s(l){let c=-1;if(l!=null){if(!Array.isArray(l))throw new TypeError("Expected a list of plugins, not `"+l+"`");for(;++c<l.length;)A(l[c])}}function i(l,c){let d=-1,u=-1;for(;++d<n.length;)if(n[d][0]===l){u=d;break}if(u===-1)n.push([l,...c]);else if(c.length>0){let[p,...g]=c;const v=n[u][1];Sr(v)&&Sr(p)&&(p=Pr(!0,v,p)),n[u]=[l,p,...g]}}}}const jl=new Ir().freeze();function Tr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Mr(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 GA(e){if(!Sr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qA(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function In(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new zA(e)}const WA=[],YA={allowDangerousHtml:!0},Gl=/^(https?|ircs?|mailto|xmpp)$/i,ql=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Wl(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",o=e.className,A=e.components,a=e.disallowedElements,s=e.rehypePlugins||WA,i=e.remarkPlugins||WA,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...YA}:YA,c=e.skipHtml,d=e.unwrapDisallowed,u=e.urlTransform||Yl,p=jl().use(wl).use(i).use(Nl,l).use(s),g=new zA;typeof n=="string"&&(g.value=n);for(const w of ql)Object.hasOwn(e,w.from)&&(w.from,w.to&&w.to,w.id);const v=p.parse(g);let h=p.runSync(v,g);return o&&(h={type:"element",tagName:"div",properties:{className:o},children:h.type==="root"?h.children:[h]}),LA(h,function(w,E,m){if(w.type==="raw"&&m&&typeof E=="number")return c?m.children.splice(E,1):m.children[E]={type:"text",value:w.value},E;if(w.type==="element"){let C;for(C in fr)if(Object.hasOwn(fr,C)&&Object.hasOwn(w.properties,C)){const k=w.properties[C],S=fr[C];(S===null||S.includes(w.tagName))&&(w.properties[C]=u(String(k||""),C,w))}}if(w.type==="element"){let C=t?!t.includes(w.tagName):!!a&&a.includes(w.tagName);if(!C&&r&&typeof E=="number"&&(C=!r(w,E,m)),C&&m&&typeof E=="number")return d&&w.children?m.children.splice(E,1,...w.children):m.children.splice(E,1),E}}),ya(h,{Fragment:P.Fragment,components:A,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0})}function Yl(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||r!==-1&&t>r||n!==-1&&t>n||Gl.test(e.slice(0,t))?e:""}const Vl=({children:e})=>P.jsx("div",{style:{whiteSpace:"normal"},children:P.jsx(Wl,{components:{p:({...t})=>P.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>P.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>P.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>P.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:r})=>t?P.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:r}):P.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:P.jsx("code",{children:r})}),blockquote:({...t})=>P.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),Kl={autoConfig:!0},Xl=e=>()=>(t=>{const{getFlow:r}=bn(),{messages:n,replaceMessages:o}=Xt(),{settings:A}=Po(),{hasChatHistoryLoaded:a}=ko(),s={...t,...Kl},i=s.markdownComponent?s.markdownComponent:Vl;f.useEffect(()=>{var d,u;if(a){const p=[...n];for(let g=0;g<p.length&&g<(((d=A.chatHistory)==null?void 0:d.maxEntries)??30);g++){const v=p[g];(u=v.tags)!=null&&u.includes("rcb-markdown-renderer-plugin:parsed")&&(v.contentWrapper=i)}o(p)}},[a]);const l=async d=>{var u;const p=(u=d.data.message)==null?void 0:u.sender.toUpperCase();((g,v,h)=>{var w;if(typeof g.data.message.content!="string"||!g.detail.currPath)return!1;const E=v[g.detail.currPath];return!!E&&(((w=E.renderMarkdown)==null?void 0:w.map(m=>m.toUpperCase()).includes(h))??!1)})(d,r(),p)&&(d.data.message.contentWrapper=i,d.data.message.tags||(d.data.message.tags=[]),d.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Ve(z.PRE_INJECT_MESSAGE,l),Ve(z.CHUNK_STREAM_MESSAGE,l),Ve(z.START_STREAM_MESSAGE,l),Ve(z.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return s!=null&&s.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),Tn={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},VA=(e,t,r="validateTextInput")=>{var n;if((n=e.detail)==null||!n.currPath)return;const o=t[e.detail.currPath];if(!o)return;const A=o[r];return typeof A=="function"?A:void 0},Jl=e=>{const{showToast:t}=(()=>{const{showToast:d,dismissToast:u,toasts:p,replaceToasts:g}=Tt();return{showToast:d,dismissToast:u,toasts:p,replaceToasts:g}})(),{getFlow:r}=bn(),{styles:n,updateStyles:o,replaceStyles:A}=(()=>{const{styles:d,replaceStyles:u,updateStyles:p}=wo();return{styles:d,replaceStyles:u,updateStyles:p}})(),a=(d=>({...Tn,...d,promptBaseColors:{...Tn.promptBaseColors},promptHoveredColors:{...Tn.promptHoveredColors},textAreaHighlightColors:{...Tn.textAreaHighlightColors}}))(e),[s,i]=f.useState(0),l=f.useRef({});Ve(z.USER_SUBMIT_TEXT,d=>{const u=d,p=VA(u,r(),"validateTextInput");if(!p)return;const g=p(u.data.inputText);if(g!=null&&g.success||d.preventDefault(),!g.promptContent)return;s===0&&(l.current=structuredClone(n));const v=((h,w)=>{const E=h.promptType??"info";let m={};return w.advancedStyles&&(m=w.advancedStyles[E]),w.promptBaseColors&&(m.toastPromptStyle={color:w.promptBaseColors[E],borderColor:w.promptBaseColors[E]}),w.promptHoveredColors&&(m.toastPromptHoveredStyle={color:w.promptHoveredColors[E],borderColor:w.promptHoveredColors[E]}),w.textAreaHighlightColors&&(h.highlightTextArea??!0)&&(m.chatInputAreaStyle={boxShadow:`${w.textAreaHighlightColors[E]} 0px 0px 5px`}),m})(g,a);o(v),t(g.promptContent,g.promptDuration??3e3),i(h=>h+1)}),Ve(z.USER_UPLOAD_FILE,d=>{var u,p;const g=d,v=(p=(u=g.data)==null?void 0:u.files)==null?void 0:p[0];if(!v)return console.error("No file uploaded."),void d.preventDefault();const h=VA(g,r(),"validateFileInput");if(!h)return void console.error("Validator not found for file input.");const w=h(v);if(!w.success)return console.error("Validation failed:",w),w.promptContent&&t(w.promptContent,w.promptDuration??3e3),void d.preventDefault();console.log("Validation successful:",w)}),Ve(z.DISMISS_TOAST,()=>{i(d=>d-1)}),f.useEffect(()=>{s===0&&setTimeout(()=>{A(l.current)})},[s,A]);const c={name:"@rcb-plugins/input-validator"};return a.autoConfig&&(c.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),c},KA=f.forwardRef((e,t)=>{let{embedded:r,currentOpen:n,enabled:o,onSetEnabled:A}=e;const a=Xt(),s=(()=>{const{isChatWindowOpen:c,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:p,getIsChatBotVisible:g}=Ge();return{isChatWindowOpen:c,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:p,getIsChatBotVisible:g}})(),i=f.useRef(!1),l=f.useRef(!1);return f.useEffect(()=>{!r&&s&&s.toggleChatWindow&&(i.current===n||l.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(n)},0),i.current=n!=null&&n),l.current=!1)},[n,r,s]),f.useEffect(()=>{const c=()=>{l.current=!0};return window.addEventListener("rcb-toggle-chat-window",c),()=>window.removeEventListener("rcb-toggle-chat-window",c)}),f.useImperativeHandle(t,()=>({addMessage:c=>{a&&a.injectMessage&&a.injectMessage(c)},openChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:c=>{A&&A(c)}}),[a,s,r,A]),null});KA.displayName="BotController";const XA=f.createContext(null),Zl=e=>{let{trackEvent:t,children:r}=e;const n=f.useRef(t);return n.current=t,f.createElement(XA.Provider,{value:{trackEvent:o=>n.current(o)}},r)},JA=()=>f.useContext(XA)||{trackEvent:()=>{}},ZA=e=>{let{loginUrl:t,className:r="",style:n,isHeaderButton:o=!1}=e;const{trackEvent:A}=JA(),a=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return f.createElement(f.Fragment,null,o&&f.createElement("style",null,`
|
|
16
|
+
*/var vs,ws;const Cu=Eu(function(){if(ws)return vs;ws=1;var e=/["'&<>]/;return vs=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",s=0,a=0;for(s=r.index;s<n.length;s++){switch(n.charCodeAt(s)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}a!==s&&(i+=n.substring(a,s)),a=s+1,i+=o}return a!==s?i+n.substring(a,s):i}}());function Mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Su=/(url|image|image-set)\(/i;class Pu extends xu{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Su)&&delete n[r]}),n}}const Du=/^<(!doctype|(html|head|body)(\s|>))/i,Iu=/^(aria-|data-|\w+:)/iu,Bu=/{{{(\w+)\/?}}}/;function Tu(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let bs=class{constructor(e,t={},n=[],r=[]){var o;if(Mt(this,"allowed",void 0),Mt(this,"banned",void 0),Mt(this,"blocked",void 0),Mt(this,"container",void 0),Mt(this,"content",[]),Mt(this,"props",void 0),Mt(this,"matchers",void 0),Mt(this,"filters",void 0),Mt(this,"keyIndex",void 0),process.env.NODE_ENV!=="production"&&e&&typeof e!="string")throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new Pu],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set((o=t.allowList)!==null&&o!==void 0?o:bu),this.banned=new Set(wu),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((n,r)=>n!==null&&typeof r.attribute=="function"?r.attribute(e,n):n,t)}applyNodeFilters(e,t){return this.filters.reduce((n,r)=>n!==null&&typeof r.node=="function"?r.node(e,n):n,t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,s=null;return this.matchers.forEach(a=>{const l=a.asTag().toLowerCase(),A=this.getTagConfig(l);if(r[a.inverseName]||!this.isTagAllowed(l)||!this.canRenderChild(t,A))return;let c="";for(;o&&(s=a.match(o));){const{index:d,length:u,match:f,valid:p,void:w,...h}=s,b=a.propName+String(i);d>0&&(c+=o.slice(0,d)),p?(c+=w?`{{{${b}/}}}`:`{{{${b}}}}${f}{{{/${b}}}}`,this.keyIndex+=1,i+=1,n[b]={children:f,matcher:a,props:{...r,...h,key:this.keyIndex}}):c+=f,a.greedy?(o=c+o.slice(d+u),c=""):o=o.slice(d+(u||f.length))}a.greedy||(o=c+o)}),i===0?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,`
|
|
17
|
+
`);return r=r.replace(/\n{3,}/g,`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
`),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Tu)();if(!n)return;const r=(t=this.props.containerTagName)!==null&&t!==void 0?t:"body",o=r==="body"||r==="fragment"?n.body:n.createElement(r);if(e.match(Du)){if(process.env.NODE_ENV!=="production")throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Cu(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return e.nodeType===1&&e.attributes&&([...e.attributes].forEach(o=>{const{name:i,value:s}=o,a=i.toLowerCase(),l=ms[a]||ms[i];if(!this.isSafe(e)||!a.match(Iu)&&(!t&&(!l||l===2)||a.startsWith("on")||s.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let A=a==="style"?this.extractStyleAttribute(e):s;l===4?A=!0:l===3?A=Number.parseFloat(String(A)):l!==5&&(A=String(A)),n[ku[a]||a]=this.applyAttributeFilters(a,A),r+=1}),r!==0)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];(typeof r=="string"||typeof r=="number")&&(t[n.replace(/-([a-z])/g,(o,i)=>String(i).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return ro[e]?{...t,...ro[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(t!=null&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return n===":"||n==="http:"||n==="https:"||n==="mailto:"||n==="tel:"}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:i,transformOnlyAllowList:s}=this.props;let a=[],l="";return[...e.childNodes].forEach(A=>{if(A.nodeType===1){const d=A.nodeName.toLowerCase(),u=this.getTagConfig(d);l&&(a.push(l),l="");const f=this.applyNodeFilters(d,A);if(!f)return;let p;if(i&&(!s||this.isTagAllowed(d))){this.keyIndex+=1;const w=this.keyIndex;p=this.parseNode(f,u);const h=i(f,p,u);if(h===null)return;if(typeof h<"u")return void a.push(v.cloneElement(h,{key:w}));this.keyIndex=w-1}if(this.banned.has(d))return;if(n||r&&d!=="br"||!this.isTagAllowed(d)||!o&&!this.canRenderChild(t,u))a=[...a,...this.parseNode(f,u.tagName?u:t)];else{var c;this.keyIndex+=1;const w=this.extractAttributes(f),h={tagName:d};w&&(h.attributes=w),u.void&&(h.selfClose=u.void),a.push(v.createElement(ys,{...h,key:this.keyIndex},(c=p)!==null&&c!==void 0?c:this.parseNode(f,u)))}}else if(A.nodeType===3){const d=n&&!r?A.textContent:this.applyMatchers(A.textContent||"",t);Array.isArray(d)?a=[...a,...d]:l+=d}}),l&&a.push(l),a}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(Bu);){const[i,s]=o,a=o.index,l=i.includes("/");if(process.env.NODE_ENV!=="production"&&!t[s])throw new Error(`Token "${s}" found but no matching element to replace with.`);a>0&&(n.push(r.slice(0,a)),r=r.slice(a));const{children:A,matcher:c,props:d}=t[s];let u;if(l)u=i.length,n.push(c.createElement(A,d));else{const f=r.match(new RegExp(`{{{/${s}}}}`));if(process.env.NODE_ENV!=="production"&&!f)throw new Error(`Closing token missing for interpolated element "${s}".`);u=f.index+f[0].length,n.push(c.createElement(this.replaceTokens(r.slice(i.length,f.index),t),d))}r=r.slice(u)}return r.length>0&&n.push(r),n.length===0?"":n.length===1&&typeof n[0]=="string"?n[0]:n}};function Mu(e){var t;const{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:A}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",d=c==="fragment"||A;let u;if(a)u=a;else{const f=new bs(i??"",e).parse();f.length>0&&(u=f)}return u||(u=s),d?v.createElement(v.Fragment,null,u):v.createElement(ys,{attributes:n,className:r,tagName:c},u)}function Qu(e){const{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:A=null,onBeforeParse:c=null,tagName:d="span",noWrap:u=!1,...f}=e,p=i?[]:l,w=o?[]:a,h=c?[c]:[],b=A?[A]:[];p.forEach(S=>{S.onBeforeParse&&h.push(S.onBeforeParse.bind(S)),S.onAfterParse&&b.push(S.onAfterParse.bind(S))});const x=h.reduce((S,E)=>{const B=E(S,e);if(process.env.NODE_ENV!=="production"&&typeof B!="string")throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return B},r??""),g=new bs(x,f,p,w),k=b.reduce((S,E)=>{const B=E(S,e);if(process.env.NODE_ENV!=="production"&&!Array.isArray(B))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return B},g.parse());return v.createElement(Mu,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:u,parsedContent:k.length===0?void 0:k,tagName:d})}const Ou=({children:e})=>D.jsx("div",{style:{whiteSpace:"normal"},children:D.jsx(Qu,{content:typeof e=="string"?e:""})}),_u={autoConfig:!0},ks=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&(((r=o.renderHtml)==null?void 0:r.map(i=>i.toUpperCase()).includes(n))??!1)},Lu=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const i=e[o];i==="<"?r?(t.push(n),n=i):(r=!0,n=i):i===">"?(n+=i,t.push(n),n="",r=!1):r?n+=i:t.push(i)}return n!==""&&t.push(n),t},Nu=e=>{const{getFlow:t}=sr(),{messages:n,replaceMessages:r}=ar(),{settings:o}=ps(),{hasChatHistoryLoaded:i}=gs(),s={...e,..._u},a=s.htmlComponent?s.htmlComponent:Ou;v.useEffect(()=>{var c,d;if(i){const u=[...n];for(let f=0;f<u.length&&f<(((c=o.chatHistory)==null?void 0:c.maxEntries)??30);f++){const p=u[f];(d=p.tags)!=null&&d.includes("rcb-html-renderer-plugin:parsed")&&(p.contentWrapper=a)}r(u)}},[i]);const l=async c=>{var d;const u=(d=c.data.message)==null?void 0:d.sender.toUpperCase();typeof c.data.message.content=="string"&&ks(c,t(),u)&&(c.type==="rcb-start-simulate-stream-message"&&(c.data.simulateStreamChunker=Lu),c.data.message.contentWrapper=a,c.data.message.tags||(c.data.message.tags=[]),c.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};ut(Y.PRE_INJECT_MESSAGE,l),ut(Y.CHUNK_STREAM_MESSAGE,l),ut(Y.START_STREAM_MESSAGE,l),ut(Y.START_SIMULATE_STREAM_MESSAGE,l),ut(Y.START_SPEAK_AUDIO,async c=>{ks(c,t(),"BOT")&&(c.data.textToRead=(d=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(d,"text/html").body.textContent||"":d.replace(/<\/?[^>]+(>|$)/g,""))(c.data.textToRead))});const A={name:"@rcb-plugins/html-renderer"};return s!=null&&s.autoConfig&&(A.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),A},Fu=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hu=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ru={};function xs(e,t){return(Ru.jsx?Hu:Fu).test(e)}const zu=/[ \t\n\f\r]/g;function Es(e){return e.replace(zu,"")===""}class In{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}function Cs(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new In(n,r,t)}function oo(e){return e.toLowerCase()}In.prototype.property={},In.prototype.normal={},In.prototype.space=null;class dt{constructor(t,n){this.property=t,this.attribute=n}}dt.prototype.space=null,dt.prototype.boolean=!1,dt.prototype.booleanish=!1,dt.prototype.overloadedBoolean=!1,dt.prototype.number=!1,dt.prototype.commaSeparated=!1,dt.prototype.spaceSeparated=!1,dt.prototype.commaOrSpaceSeparated=!1,dt.prototype.mustUseProperty=!1,dt.prototype.defined=!1;let Uu=0;const ie=$t(),Ne=$t(),Ss=$t(),U=$t(),xe=$t(),cn=$t(),at=$t();function $t(){return 2**++Uu}const io=Object.freeze(Object.defineProperty({__proto__:null,boolean:ie,booleanish:Ne,commaOrSpaceSeparated:at,commaSeparated:cn,number:U,overloadedBoolean:Ss,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),so=Object.keys(io);class ao extends dt{constructor(t,n,r,o){let i=-1;if(super(t,n),Ps(this,"space",o),typeof r=="number")for(;++i<so.length;){const s=so[i];Ps(this,so[i],(r&io[s])===io[s])}}}function Ps(e,t,n){n&&(e[t]=n)}ao.prototype.defined=!0;const ju={}.hasOwnProperty;function An(e){const t={},n={};let r;for(r in e.properties)if(ju.call(e.properties,r)){const o=e.properties[r],i=new ao(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[oo(r)]=r,n[oo(i.attribute)]=r}return new In(t,n,e.space)}const Ds=An({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Is=An({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Bs(e,t){return t in e?e[t]:t}function Ts(e,t){return Bs(e,t.toLowerCase())}const Ms=An({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ts,properties:{xmlns:null,xmlnsXLink:null}}),Qs=An({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:xe,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:U,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:xe,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Ne,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null}}),qu=An({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ts,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cn,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:ie,allowPaymentRequest:ie,allowUserMedia:ie,alt:null,as:null,async:ie,autoCapitalize:null,autoComplete:xe,autoFocus:ie,autoPlay:ie,blocking:xe,capture:null,charSet:null,checked:ie,cite:null,className:xe,cols:U,colSpan:null,content:null,contentEditable:Ne,controls:ie,controlsList:xe,coords:U|cn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ie,defer:ie,dir:null,dirName:null,disabled:ie,download:Ss,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ie,formTarget:null,headers:xe,height:U,hidden:ie,high:U,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:ie,inputMode:null,integrity:null,is:null,isMap:ie,itemId:null,itemProp:xe,itemRef:xe,itemScope:ie,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ie,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ie,muted:ie,name:null,nonce:null,noModule:ie,noValidate:ie,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:ie,optimum:U,pattern:null,ping:xe,placeholder:null,playsInline:ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ie,referrerPolicy:null,rel:xe,required:ie,reversed:ie,rows:U,rowSpan:U,sandbox:xe,scope:null,scoped:ie,seamless:ie,selected:ie,shadowRootClonable:ie,shadowRootDelegatesFocus:ie,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ie,useMap:null,value:Ne,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ie,declare:ie,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ie,noHref:ie,noShade:ie,noWrap:ie,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ie,disableRemotePlayback:ie,prefix:null,property:null,results:U,security:null,unselectable:null}}),Wu=An({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:Bs,properties:{about:at,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:xe,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:cn,g2:cn,glyphName:cn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:at,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:at,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:at,rev:at,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:at,requiredFeatures:at,requiredFonts:at,requiredFormats:at,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:at,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:at,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:at,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Gu=/^data[-\w.:]+$/i,Os=/-[a-z]/g,Vu=/[A-Z]/g;function Yu(e){return"-"+e.toLowerCase()}function Ku(e){return e.charAt(1).toUpperCase()}const Xu={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"},Ju=Cs([Is,Ds,Ms,Qs,qu],"html"),lo=Cs([Is,Ds,Ms,Qs,Wu],"svg");function _s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var co,Ls,Ns,un={},Zu=function(){if(Ns)return un;Ns=1;var e=un&&un.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(un,"__esModule",{value:!0}),un.default=function(n,r){var o=null;if(!n||typeof n!="string")return o;var i=(0,t.default)(n),s=typeof r=="function";return i.forEach(function(a){if(a.type==="declaration"){var l=a.property,A=a.value;s?r(l,A,a):A&&((o=o||{})[l]=A)}}),o};var t=e(function(){if(Ls)return co;Ls=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,A=/^\s+|\s+$/g,c="";function d(u){return u?u.replace(A,c):c}return co=function(u,f){if(typeof u!="string")throw new TypeError("First argument must be a string");if(!u)return[];f=f||{};var p=1,w=1;function h(M){var T=M.match(r);T&&(p+=T.length);var Q=M.lastIndexOf(`
|
|
21
|
+
`);w=~Q?M.length-Q:w+M.length}function b(){var M={line:p,column:w};return function(T){return T.position=new x(M),S(),T}}function x(M){this.start=M,this.end={line:p,column:w},this.source=f.source}function g(M){var T=new Error(f.source+":"+p+":"+w+": "+M);if(T.reason=M,T.filename=f.source,T.line=p,T.column=w,T.source=u,!f.silent)throw T}function k(M){var T=M.exec(u);if(T){var Q=T[0];return h(Q),u=u.slice(Q.length),T}}function S(){k(o)}function E(M){var T;for(M=M||[];T=B();)T!==!1&&M.push(T);return M}function B(){var M=b();if(u.charAt(0)=="/"&&u.charAt(1)=="*"){for(var T=2;c!=u.charAt(T)&&(u.charAt(T)!="*"||u.charAt(T+1)!="/");)++T;if(T+=2,c===u.charAt(T-1))return g("End of comment missing");var Q=u.slice(2,T-2);return w+=2,h(Q),u=u.slice(T),w+=2,M({type:"comment",comment:Q})}}function C(){var M=b(),T=k(i);if(T){if(B(),!k(s))return g("property missing ':'");var Q=k(a),I=M({type:"declaration",property:d(T[0].replace(n,c)),value:Q?d(Q[0].replace(n,c)):c});return k(l),I}}return x.prototype.content=u,S(),function(){var M,T=[];for(E(T);M=C();)M!==!1&&(T.push(M),E(T));return T}()},co}());return un}();const Fs=_s(Zu),$u=Fs.default||Fs,Hs=Rs("end"),Ao=Rs("start");function Rs(e){return function(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Bn(e){return e&&typeof e=="object"?"position"in e||"type"in e?zs(e.position):"start"in e||"end"in e?zs(e):"line"in e||"column"in e?uo(e):"":""}function uo(e){return Us(e&&e.line)+":"+Us(e&&e.column)}function zs(e){return uo(e&&e.start)+"-"+uo(e&&e.end)}function Us(e){return e&&typeof e=="number"?e:1}class We extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},s=!1;if(n&&(i="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),typeof t=="string"?o=t:!i.cause&&t&&(s=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=a?a.line:void 0,this.name=Bn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}We.prototype.file="",We.prototype.name="",We.prototype.reason="",We.prototype.message="",We.prototype.stack="",We.prototype.column=void 0,We.prototype.line=void 0,We.prototype.ancestors=void 0,We.prototype.cause=void 0,We.prototype.fatal=void 0,We.prototype.place=void 0,We.prototype.ruleId=void 0,We.prototype.source=void 0;const fo={}.hasOwnProperty,ed=new Map,td=/[A-Z]/g,nd=/-([a-z])/g,rd=new Set(["table","tbody","thead","tfoot","tr"]),od=new Set(["td","th"]),js="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function id(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(s,a){return l;function l(A,c,d,u){const f=Array.isArray(d.children),p=Ao(A);return a(c,d,u,f,{columnNumber:p?p.column-1:void 0,fileName:s,lineNumber:p?p.line:void 0},void 0)}}(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=function(s,a,l){return A;function A(c,d,u,f){const p=Array.isArray(u.children)?l:a;return f?p(d,u,f):p(d,u)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?lo:Ju,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=qs(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function qs(e,t,n){return t.type==="element"?function(r,o,i){const s=r.schema;let a=s;o.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=lo,r.schema=a),r.ancestors.push(o);const l=Gs(r,o.tagName,!1),A=function(d,u){const f={};let p,w;for(w in u.properties)if(w!=="children"&&fo.call(u.properties,w)){const h=sd(d,w,u.properties[w]);if(h){const[b,x]=h;d.tableCellAlignToStyle&&b==="align"&&typeof x=="string"&&od.has(u.tagName)?p=x:f[b]=x}}return p&&((f.style||(f.style={}))[d.stylePropertyNameCase==="css"?"text-align":"textAlign"]=p),f}(r,o);let c=ho(r,o);return rd.has(o.tagName)&&(c=c.filter(function(d){return typeof d!="string"||!function(u){return typeof u=="object"?u.type==="text"&&Es(u.value):Es(u)}(d)})),Ws(r,A,l,o),po(A,c),r.ancestors.pop(),r.schema=s,r.create(o,l,A,i)}(e,t,n):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(r,o){if(o.data&&o.data.estree&&r.evaluater){const i=o.data.estree.body[0];return i.type,r.evaluater.evaluateExpression(i.expression)}Tn(r,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(r,o,i){const s=r.schema;let a=s;o.name==="svg"&&s.space==="html"&&(a=lo,r.schema=a),r.ancestors.push(o);const l=o.name===null?r.Fragment:Gs(r,o.name,!0),A=function(d,u){const f={};for(const p of u.attributes)if(p.type==="mdxJsxExpressionAttribute")if(p.data&&p.data.estree&&d.evaluater){const w=p.data.estree.body[0];w.type;const h=w.expression;h.type;const b=h.properties[0];b.type,Object.assign(f,d.evaluater.evaluateExpression(b.argument))}else Tn(d,u.position);else{const w=p.name;let h;if(p.value&&typeof p.value=="object")if(p.value.data&&p.value.data.estree&&d.evaluater){const b=p.value.data.estree.body[0];b.type,h=d.evaluater.evaluateExpression(b.expression)}else Tn(d,u.position);else h=p.value===null||p.value;f[w]=h}return f}(r,o),c=ho(r,o);return Ws(r,A,l,o),po(A,c),r.ancestors.pop(),r.schema=s,r.create(o,l,A,i)}(e,t,n):t.type==="mdxjsEsm"?function(r,o){if(o.data&&o.data.estree&&r.evaluater)return r.evaluater.evaluateProgram(o.data.estree);Tn(r,o.position)}(e,t):t.type==="root"?function(r,o,i){const s={};return po(s,ho(r,o)),r.create(o,r.Fragment,s,i)}(e,t,n):t.type==="text"?function(r,o){return o.value}(0,t):void 0}function Ws(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function po(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ho(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:ed;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const A=o.get(l)||0;s=l+"-"+A,o.set(l,A+1)}}const a=qs(e,i,s);a!==void 0&&n.push(a)}return n}function sd(e,t,n){const r=function(o,i){const s=oo(i);let a=i,l=dt;if(s in o.normal)return o.property[o.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&Gu.test(i)){if(i.charAt(4)==="-"){const A=i.slice(5).replace(Os,Ku);a="data"+A.charAt(0).toUpperCase()+A.slice(1)}else{const A=i.slice(4);if(!Os.test(A)){let c=A.replace(Vu,Yu);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}l=ao}return new l(a,i)}(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(o){const i={};return(o[o.length-1]===""?[...o,""]:o).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}(n):function(o){return o.join(" ").trim()}(n)),r.property==="style"){let o=typeof n=="object"?n:function(i,s){const a={};try{$u(s,l)}catch(A){if(!i.ignoreInvalidStyle){const c=A,d=new We("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=i.filePath||void 0,d.url=js+"#cannot-parse-style-attribute",d}}return a;function l(A,c){let d=A;d.slice(0,2)!=="--"&&(d.slice(0,4)==="-ms-"&&(d="ms-"+d.slice(4)),d=d.replace(nd,ld)),a[d]=c}}(e,String(n));return e.stylePropertyNameCase==="css"&&(o=function(i){const s={};let a;for(a in i)fo.call(i,a)&&(s[ad(a)]=i[a]);return s}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Xu[r.property]||r.property:r.attribute,n]}}function Gs(e,t,n){let r;if(n)if(t.includes(".")){const o=t.split(".");let i,s=-1;for(;++s<o.length;){const a=xs(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};i=i?{type:"MemberExpression",object:i,property:a,computed:!(!s||a.type!=="Literal"),optional:!1}:a}r=i}else r=xs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return fo.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tn(e)}function Tn(e,t){const n=new We("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=js+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ad(e){let t=e.replace(td,cd);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ld(e,t){return t.toUpperCase()}function cd(e){return"-"+e.toLowerCase()}const go={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},cr={};function Vs(e,t,n){if(function(r){return!(!r||typeof r!="object")}(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 Ys(e.children,t,n)}return Array.isArray(e)?Ys(e,t,n):""}function Ys(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Vs(e[o],t,n);return r.join("")}const Ks=document.createElement("i");function mo(e){const t="&"+e+";";Ks.innerHTML=t;const n=Ks.textContent;return(n.charCodeAt(n.length-1)!==59||e==="semi")&&n!==t&&n}function kt(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function ft(e,t){return e.length>0?(kt(e,e.length,0,t),e):t}const Xs={}.hasOwnProperty;function Ad(e){const t={};let n=-1;for(;++n<e.length;)ud(t,e[n]);return t}function ud(e,t){let n;for(n in t){const r=(Xs.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Xs.call(r,i)||(r[i]=[]);const s=o[i];dd(r[i],Array.isArray(s)?s:s?[s]:[])}}}function dd(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kt(e,0,0,r)}function Js(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||!(65535&~n)||(65535&n)==65534||n>1114111?"๏ฟฝ":String.fromCodePoint(n)}function dn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xt=Ht(/[A-Za-z]/),lt=Ht(/[\dA-Za-z]/),fd=Ht(/[#-'*+\--9=?A-Z^-~]/);function yo(e){return e!==null&&(e<32||e===127)}const vo=Ht(/\d/),pd=Ht(/[\dA-Fa-f]/),hd=Ht(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function $e(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const gd=Ht(new RegExp("\\p{P}|\\p{S}","u")),md=Ht(/\s/);function Ht(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function fn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&<(e.charCodeAt(n+1))&<(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const a=e.charCodeAt(n+1);i<56320&&a>56319&&a<57344?(s=String.fromCharCode(i,a),o=1):s="๏ฟฝ"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ee(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(a){return de(a)?(e.enter(n),s(a)):t(a)};function s(a){return de(a)&&i++<o?(e.consume(a),s):(e.exit(n),t(a))}}const yd={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(i){return i===null?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ee(e,t,"linePrefix"))},function(i){return e.enter("paragraph"),r(i)});let n;return t;function r(i){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(i)}function o(i){return i===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(i)):re(i)?(e.consume(i),e.exit("chunkText"),r):(e.consume(i),o)}}},vd={tokenize:function(e){const t=this,n=[];let r,o,i,s=0;return a;function a(g){if(s<n.length){const k=n[s];return t.containerState=k[1],e.attempt(k[0].continuation,l,A)(g)}return A(g)}function l(g){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&x();const k=t.events.length;let S,E=k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){S=t.events[E][1].end;break}b(s);let B=k;for(;B<t.events.length;)t.events[B][1].end={...S},B++;return kt(t.events,E+1,0,t.events.slice(k)),t.events.length=B,A(g)}return a(g)}function A(g){if(s===n.length){if(!r)return u(g);if(r.currentConstruct&&r.currentConstruct.concrete)return p(g);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zs,c,d)(g)}function c(g){return r&&x(),b(s),u(g)}function d(g){return t.parser.lazy[t.now().line]=s!==n.length,i=t.now().offset,p(g)}function u(g){return t.containerState={},e.attempt(Zs,f,p)(g)}function f(g){return s++,n.push([t.currentConstruct,t.containerState]),u(g)}function p(g){return g===null?(r&&x(),b(0),void e.consume(g)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),w(g))}function w(g){return g===null?(h(e.exit("chunkFlow"),!0),b(0),void e.consume(g)):re(g)?(e.consume(g),h(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(g),w)}function h(g,k){const S=t.sliceStream(g);if(k&&S.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(S),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const B=t.events.length;let C,M,T=B;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(C){M=t.events[T][1].end;break}C=!0}for(b(s),E=B;E<t.events.length;)t.events[E][1].end={...M},E++;kt(t.events,T+1,0,t.events.slice(B)),t.events.length=E}}function b(g){let k=n.length;for(;k-- >g;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=g}function x(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Zs={tokenize:function(e,t,n){return Ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function $s(e){return e===null||$e(e)||md(e)?1:gd(e)?2:void 0}function wo(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const bo={name:"attention",resolveAll:function(e,t){let n,r,o,i,s,a,l,A,c=-1;for(;++c<e.length;)if(e[c][0]==="enter"&&e[c][1].type==="attentionSequence"&&e[c][1]._close){for(n=c;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d={...e[n][1].end},u={...e[c][1].start};ea(d,-a),ea(u,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:u},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[n][1].end={...i.start},e[c][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=ft(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=ft(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=ft(l,wo(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=ft(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,l=ft(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,kt(e,n-1,c-n+3,l),c=n+l.length-A-2;break}}for(c=-1;++c<e.length;)e[c][1].type==="attentionSequence"&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=$s(r);let i;return function(a){return i=a,e.enter("attentionSequence"),s(a)};function s(a){if(a===i)return e.consume(a),s;const l=e.exit("attentionSequence"),A=$s(a),c=!A||A===2&&o||n.includes(a),d=!o||o===2&&A||n.includes(r);return l._open=!!(i===42?c:c&&(o||!d)),l._close=!!(i===42?d:d&&(A||!c)),t(a)}}};function ea(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wd={name:"autolink",tokenize:function(e,t,n){let r=0;return function(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(u){return xt(u)?(e.consume(u),i):u===64?n(u):l(u)}function i(u){return u===43||u===45||u===46||lt(u)?(r=1,s(u)):l(u)}function s(u){return u===58?(e.consume(u),r=0,a):(u===43||u===45||u===46||lt(u))&&r++<32?(e.consume(u),s):(r=0,l(u))}function a(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||yo(u)?n(u):(e.consume(u),a)}function l(u){return u===64?(e.consume(u),A):fd(u)?(e.consume(u),l):n(u)}function A(u){return lt(u)?c(u):n(u)}function c(u){return u===46?(e.consume(u),r=0,A):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):d(u)}function d(u){if((u===45||lt(u))&&r++<63){const f=u===45?d:c;return e.consume(u),f}return n(u)}}},Ar={partial:!0,tokenize:function(e,t,n){return function(o){return de(o)?Ee(e,r,"linePrefix")(o):r(o)};function r(o){return o===null||re(o)?t(o):n(o)}}},ta={continuation:{tokenize:function(e,t,n){const r=this;return function(i){return de(i)?Ee(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)};function o(i){return e.attempt(ta,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(i){if(i===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return n(i)};function o(i){return de(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}},na={name:"characterEscape",tokenize:function(e,t,n){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r};function r(o){return hd(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}},ra={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,s=0;return function(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a};function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=lt,A(c))}function l(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=pd,A):(e.enter("characterReferenceValue"),o=7,i=vo,A(c))}function A(c){if(c===59&&s){const d=e.exit("characterReferenceValue");return i!==lt||mo(r.sliceSerialize(d))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(c)}return i(c)&&s++<o?(e.consume(c),A):n(c)}}},oa={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},ia={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(g,k,S){let E=0;return B;function B(I){return g.enter("lineEnding"),g.consume(I),g.exit("lineEnding"),C}function C(I){return g.enter("codeFencedFence"),de(I)?Ee(g,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):M(I)}function M(I){return I===i?(g.enter("codeFencedFenceSequence"),T(I)):S(I)}function T(I){return I===i?(E++,g.consume(I),T):E>=a?(g.exit("codeFencedFenceSequence"),de(I)?Ee(g,Q,"whitespace")(I):Q(I)):S(I)}function Q(I){return I===null||re(I)?(g.exit("codeFencedFence"),k(I)):S(I)}}};let i,s=0,a=0;return function(g){return function(k){const S=r.events[r.events.length-1];return s=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,i=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(k)}(g)};function l(g){return g===i?(a++,e.consume(g),l):a<3?n(g):(e.exit("codeFencedFenceSequence"),de(g)?Ee(e,A,"whitespace")(g):A(g))}function A(g){return g===null||re(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(oa,f,x)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(g))}function c(g){return g===null||re(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(g)):de(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ee(e,d,"whitespace")(g)):g===96&&g===i?n(g):(e.consume(g),c)}function d(g){return g===null||re(g)?A(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===null||re(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(g)):g===96&&g===i?n(g):(e.consume(g),u)}function f(g){return e.attempt(o,x,p)(g)}function p(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),w}function w(g){return s>0&&de(g)?Ee(e,h,"linePrefix",s+1)(g):h(g)}function h(g){return g===null||re(g)?e.check(oa,f,x)(g):(e.enter("codeFlowValue"),b(g))}function b(g){return g===null||re(g)?(e.exit("codeFlowValue"),h(g)):(e.consume(g),b)}function x(g){return e.exit("codeFenced"),t(g)}}},ko={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(l){return e.enter("codeIndented"),Ee(e,o,"linePrefix",5)(l)};function o(l){const A=r.events[r.events.length-1];return A&&A[1].type==="linePrefix"&&A[2].sliceSerialize(A[1],!0).length>=4?i(l):n(l)}function i(l){return l===null?a(l):re(l)?e.attempt(bd,i,a)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||re(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),s)}function a(l){return e.exit("codeIndented"),t(l)}}},bd={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):Ee(e,i,"linePrefix",5)(s)}function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):re(s)?o(s):n(s)}}},kd={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,n,r=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[r][1].type!=="lineEnding"&&e[r][1].type!=="space")){for(t=o;++t<r;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}}for(t=o-1,r++;++t<=r;)n===void 0?t!==r&&e[t][1].type!=="lineEnding"&&(n=t):(t===r||e[t][1].type==="lineEnding")&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)};function s(c){return c===96?(e.consume(c),i++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(o=e.enter("codeTextSequence"),r=0,A(c)):re(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(c))}function l(c){return c===null||c===32||c===96||re(c)?(e.exit("codeTextData"),a(c)):(e.consume(c),l)}function A(c){return c===96?(e.consume(c),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",l(c))}}};class xd{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Mn(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Mn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Mn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mn(this.left,n.reverse())}}}function Mn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function sa(e){const t={};let n,r,o,i,s,a,l,A=-1;const c=new xd(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&n[1].type==="chunkFlow"&&c.get(A-1)[1].type==="listItemPrefix"&&(a=n[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Ed(c,A)),A=t[A],l=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if(i[1].type!=="linePrefix")break;r&&(n[1].end={...c.get(r)[1].start},s=c.slice(r,A),s.unshift(n),c.splice(r,A-r+1,s))}}return kt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function Ed(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,l=[],A={};let c,d,u=-1,f=n,p=0,w=0;const h=[w];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++u<a.length;)a[u][0]==="exit"&&a[u-1][0]==="enter"&&a[u][1].type===a[u-1][1].type&&a[u][1].start.line!==a[u][1].end.line&&(w=u+1,h.push(w),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),u=h.length;u--;){const b=a.slice(h[u],h[u+1]),x=i.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),u=-1;++u<l.length;)A[p+l[u][0]]=p+l[u][1],p+=l[u][1]-l[u][0]-1;return A}const Cd={resolve:function(e){return sa(e),e},tokenize:function(e,t){let n;return function(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(s)};function r(s){return s===null?o(s):re(s)?e.check(Sd,i,o)(s):(e.consume(s),r)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Sd={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ee(e,o,"linePrefix")};function o(i){if(i===null||re(i))return n(i);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function aa(e,t,n,r,o,i,s,a,l){const A=l||Number.POSITIVE_INFINITY;let c=0;return function(h){return h===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(h),e.exit(i),d):h===null||h===32||h===41||yo(h)?n(h):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(h))};function d(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===62?(e.exit("chunkString"),e.exit(a),d(h)):h===null||h===60||re(h)?n(h):(e.consume(h),h===92?f:u)}function f(h){return h===60||h===62||h===92?(e.consume(h),u):u(h)}function p(h){return c||h!==null&&h!==41&&!$e(h)?c<A&&h===40?(e.consume(h),c++,p):h===41?(e.consume(h),c--,p):h===null||h===32||h===40||yo(h)?n(h):(e.consume(h),h===92?w:p):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(h))}function w(h){return h===40||h===41||h===92?(e.consume(h),p):p(h)}}function la(e,t,n,r,o,i){const s=this;let a,l=0;return function(u){return e.enter(r),e.enter(o),e.consume(u),e.exit(o),e.enter(i),A};function A(u){return l>999||u===null||u===91||u===93&&!a||u===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(u):u===93?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(u){return u===null||u===91||u===93||re(u)||l++>999?(e.exit("chunkString"),A(u)):(e.consume(u),a||(a=!de(u)),u===92?d:c)}function d(u){return u===91||u===92||u===93?(e.consume(u),l++,c):c(u)}}function ca(e,t,n,r,o,i){let s;return function(d){return d===34||d===39||d===40?(e.enter(r),e.enter(o),e.consume(d),e.exit(o),s=d===40?41:d,a):n(d)};function a(d){return d===s?(e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):(e.enter(i),l(d))}function l(d){return d===s?(e.exit(i),a(s)):d===null?n(d):re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ee(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(d))}function A(d){return d===s||d===null||re(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?c:A)}function c(d){return d===s||d===92?(e.consume(d),A):A(d)}}function Qn(e,t){let n;return function r(o){return re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):de(o)?Ee(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Pd={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(d){return e.enter("definition"),function(u){return la.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}(d)};function i(d){return o=dn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),s):n(d)}function s(d){return $e(d)?Qn(e,a)(d):a(d)}function a(d){return aa(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function l(d){return e.attempt(Dd,A,A)(d)}function A(d){return de(d)?Ee(e,c,"whitespace")(d):c(d)}function c(d){return d===null||re(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}},Dd={partial:!0,tokenize:function(e,t,n){return function(s){return $e(s)?Qn(e,r)(s):n(s)};function r(s){return ca(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return de(s)?Ee(e,i,"whitespace")(s):i(s)}function i(s){return s===null||re(s)?t(s):n(s)}}},Id={name:"hardBreakEscape",tokenize:function(e,t,n){return function(o){return e.enter("hardBreakEscape"),e.consume(o),r};function r(o){return re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}},Bd={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return e[i][1].type==="whitespace"&&(i+=2),o-2>i&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(i===o-1||o-4>i&&e[o-2][1].type==="whitespace")&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},kt(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(l){return e.enter("atxHeading"),function(A){return e.enter("atxHeadingSequence"),o(A)}(l)};function o(l){return l===35&&r++<6?(e.consume(l),o):l===null||$e(l)?(e.exit("atxHeadingSequence"),i(l)):n(l)}function i(l){return l===35?(e.enter("atxHeadingSequence"),s(l)):l===null||re(l)?(e.exit("atxHeading"),t(l)):de(l)?Ee(e,i,"whitespace")(l):(e.enter("atxHeadingText"),a(l))}function s(l){return l===35?(e.consume(l),s):(e.exit("atxHeadingSequence"),i(l))}function a(l){return l===null||l===35||$e(l)?(e.exit("atxHeadingText"),i(l)):(e.consume(l),a)}}},Td=["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"],Aa=["pre","script","style","textarea"],Md={concrete:!0,name:"htmlFlow",resolveTo:function(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},tokenize:function(e,t,n){const r=this;let o,i,s,a,l;return function(y){return function(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),A}(y)};function A(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),i=!0,f):y===63?(e.consume(y),o=3,r.interrupt?t:H):xt(y)?(e.consume(y),s=String.fromCharCode(y),p):n(y)}function c(y){return y===45?(e.consume(y),o=2,d):y===91?(e.consume(y),o=5,a=0,u):xt(y)?(e.consume(y),o=4,r.interrupt?t:H):n(y)}function d(y){return y===45?(e.consume(y),r.interrupt?t:H):n(y)}function u(y){return y==="CDATA[".charCodeAt(a++)?(e.consume(y),a===6?r.interrupt?t:T:u):n(y)}function f(y){return xt(y)?(e.consume(y),s=String.fromCharCode(y),p):n(y)}function p(y){if(y===null||y===47||y===62||$e(y)){const V=y===47,X=s.toLowerCase();return V||i||!Aa.includes(X)?Td.includes(s.toLowerCase())?(o=6,V?(e.consume(y),w):r.interrupt?t(y):T(y)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):i?h(y):b(y)):(o=1,r.interrupt?t(y):T(y))}return y===45||lt(y)?(e.consume(y),s+=String.fromCharCode(y),p):n(y)}function w(y){return y===62?(e.consume(y),r.interrupt?t:T):n(y)}function h(y){return de(y)?(e.consume(y),h):C(y)}function b(y){return y===47?(e.consume(y),C):y===58||y===95||xt(y)?(e.consume(y),x):de(y)?(e.consume(y),b):C(y)}function x(y){return y===45||y===46||y===58||y===95||lt(y)?(e.consume(y),x):g(y)}function g(y){return y===61?(e.consume(y),k):de(y)?(e.consume(y),g):b(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),l=y,S):de(y)?(e.consume(y),k):E(y)}function S(y){return y===l?(e.consume(y),l=null,B):y===null||re(y)?n(y):(e.consume(y),S)}function E(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||$e(y)?g(y):(e.consume(y),E)}function B(y){return y===47||y===62||de(y)?b(y):n(y)}function C(y){return y===62?(e.consume(y),M):n(y)}function M(y){return y===null||re(y)?T(y):de(y)?(e.consume(y),M):n(y)}function T(y){return y===45&&o===2?(e.consume(y),z):y===60&&o===1?(e.consume(y),L):y===62&&o===4?(e.consume(y),m):y===63&&o===3?(e.consume(y),H):y===93&&o===5?(e.consume(y),F):!re(y)||o!==6&&o!==7?y===null||re(y)?(e.exit("htmlFlowData"),Q(y)):(e.consume(y),T):(e.exit("htmlFlowData"),e.check(Qd,W,Q)(y))}function Q(y){return e.check(Od,I,W)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),O}function O(y){return y===null||re(y)?Q(y):(e.enter("htmlFlowData"),T(y))}function z(y){return y===45?(e.consume(y),H):T(y)}function L(y){return y===47?(e.consume(y),s="",_):T(y)}function _(y){if(y===62){const V=s.toLowerCase();return Aa.includes(V)?(e.consume(y),m):T(y)}return xt(y)&&s.length<8?(e.consume(y),s+=String.fromCharCode(y),_):T(y)}function F(y){return y===93?(e.consume(y),H):T(y)}function H(y){return y===62?(e.consume(y),m):y===45&&o===2?(e.consume(y),H):T(y)}function m(y){return y===null||re(y)?(e.exit("htmlFlowData"),W(y)):(e.consume(y),m)}function W(y){return e.exit("htmlFlow"),t(y)}}},Qd={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Ar,t,n)}}},Od={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):n(i)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},_d={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,s;return function(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),a};function a(m){return m===33?(e.consume(m),l):m===47?(e.consume(m),k):m===63?(e.consume(m),x):xt(m)?(e.consume(m),B):n(m)}function l(m){return m===45?(e.consume(m),A):m===91?(e.consume(m),i=0,f):xt(m)?(e.consume(m),b):n(m)}function A(m){return m===45?(e.consume(m),u):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),d):re(m)?(s=c,_(m)):(e.consume(m),c)}function d(m){return m===45?(e.consume(m),u):c(m)}function u(m){return m===62?L(m):m===45?d(m):c(m)}function f(m){return m==="CDATA[".charCodeAt(i++)?(e.consume(m),i===6?p:f):n(m)}function p(m){return m===null?n(m):m===93?(e.consume(m),w):re(m)?(s=p,_(m)):(e.consume(m),p)}function w(m){return m===93?(e.consume(m),h):p(m)}function h(m){return m===62?L(m):m===93?(e.consume(m),h):p(m)}function b(m){return m===null||m===62?L(m):re(m)?(s=b,_(m)):(e.consume(m),b)}function x(m){return m===null?n(m):m===63?(e.consume(m),g):re(m)?(s=x,_(m)):(e.consume(m),x)}function g(m){return m===62?L(m):x(m)}function k(m){return xt(m)?(e.consume(m),S):n(m)}function S(m){return m===45||lt(m)?(e.consume(m),S):E(m)}function E(m){return re(m)?(s=E,_(m)):de(m)?(e.consume(m),E):L(m)}function B(m){return m===45||lt(m)?(e.consume(m),B):m===47||m===62||$e(m)?C(m):n(m)}function C(m){return m===47?(e.consume(m),L):m===58||m===95||xt(m)?(e.consume(m),M):re(m)?(s=C,_(m)):de(m)?(e.consume(m),C):L(m)}function M(m){return m===45||m===46||m===58||m===95||lt(m)?(e.consume(m),M):T(m)}function T(m){return m===61?(e.consume(m),Q):re(m)?(s=T,_(m)):de(m)?(e.consume(m),T):C(m)}function Q(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),o=m,I):re(m)?(s=Q,_(m)):de(m)?(e.consume(m),Q):(e.consume(m),O)}function I(m){return m===o?(e.consume(m),o=void 0,z):m===null?n(m):re(m)?(s=I,_(m)):(e.consume(m),I)}function O(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||$e(m)?C(m):(e.consume(m),O)}function z(m){return m===47||m===62||$e(m)?C(m):n(m)}function L(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function _(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),F}function F(m){return de(m)?Ee(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):H(m)}function H(m){return e.enter("htmlTextData"),s(m)}}},xo={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&kt(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[s][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(o){if(e[s][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=s,n.type!=="labelLink")){a=2;break}}else n.type==="labelEnd"&&(o=s);const l={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},A={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",A,t]],i=ft(i,e.slice(r+1,r+a+3)),i=ft(i,[["enter",c,t]]),i=ft(i,wo(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=ft(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=ft(i,e.slice(o+1)),i=ft(i,[["exit",l,t]]),kt(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,s=r.events.length;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return function(d){return o?o._inactive?c(d):(i=r.parser.defined.includes(dn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),a):n(d)};function a(d){return d===40?e.attempt(Ld,A,i?A:c)(d):d===91?e.attempt(Nd,A,i?l:c)(d):i?A(d):c(d)}function l(d){return e.attempt(Fd,A,c)(d)}function A(d){return t(d)}function c(d){return o._balanced=!0,n(d)}}},Ld={tokenize:function(e,t,n){return function(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),r};function r(c){return $e(c)?Qn(e,o)(c):o(c)}function o(c){return c===41?A(c):aa(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function i(c){return $e(c)?Qn(e,a)(c):A(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?ca(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):A(c)}function l(c){return $e(c)?Qn(e,A)(c):A(c)}function A(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}},Nd={tokenize:function(e,t,n){const r=this;return function(s){return la.call(r,e,o,i,"reference","referenceMarker","referenceString")(s)};function o(s){return r.parser.defined.includes(dn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function i(s){return n(s)}}},Fd={tokenize:function(e,t,n){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r};function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}},Hd={name:"labelStartImage",resolveAll:xo.resolveAll,tokenize:function(e,t,n){const r=this;return function(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o};function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):n(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}},Rd={name:"labelStartLink",resolveAll:xo.resolveAll,tokenize:function(e,t,n){const r=this;return function(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o};function o(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}},Eo={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ee(e,t,"linePrefix")}}},ur={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(a){return e.enter("thematicBreak"),function(l){return r=l,i(l)}(a)};function i(a){return a===r?(e.enter("thematicBreakSequence"),s(a)):o>=3&&(a===null||re(a))?(e.exit("thematicBreak"),t(a)):n(a)}function s(a){return a===r?(e.consume(a),o++,s):(e.exit("thematicBreakSequence"),de(a)?Ee(e,i,"whitespace")(a):i(a))}}},et={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ar,function(i){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,"listItemIndent",r.containerState.size+1)(i)},function(i){return r.containerState.furtherBlankLines||!de(i)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(i)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ud,t,o)(i))});function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(et,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return function(u){const f=r.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!r.containerState.marker||u===r.containerState.marker:vo(u)){if(r.containerState.type||(r.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(ur,n,l)(u):l(u);if(!r.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(u)}return n(u)};function a(u){return vo(u)&&++s<10?(e.consume(u),a):(!r.interrupt||s<2)&&(r.containerState.marker?u===r.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),l(u)):n(u)}function l(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||u,e.check(Ar,r.interrupt?n:A,e.attempt(zd,d,c))}function A(u){return r.containerState.initialBlankLine=!0,i++,d(u)}function c(u){return de(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),d):n(u)}function d(u){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}},zd={partial:!0,tokenize:function(e,t,n){const r=this;return Ee(e,function(o){const i=r.events[r.events.length-1];return!de(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):n(o)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Ud={partial:!0,tokenize:function(e,t,n){const r=this;return Ee(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(o):n(o)},"listItemIndent",r.containerState.size+1)}},ua={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){n=i;break}e[i][1].type==="paragraph"&&(r=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(a){let l,A=r.events.length;for(;A--;)if(r.events[A][1].type!=="lineEnding"&&r.events[A][1].type!=="linePrefix"&&r.events[A][1].type!=="content"){l=r.events[A][1].type==="paragraph";break}return r.parser.lazy[r.now().line]||!r.interrupt&&!l?n(a):(e.enter("setextHeadingLine"),o=a,function(c){return e.enter("setextHeadingLineSequence"),i(c)}(a))};function i(a){return a===o?(e.consume(a),i):(e.exit("setextHeadingLineSequence"),de(a)?Ee(e,s,"lineSuffix")(a):s(a))}function s(a){return a===null||re(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}},jd={tokenize:function(e){const t=this,n=e.attempt(Ar,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,Ee(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Cd,r)),"linePrefix")));return n;function r(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(o)}}},qd={resolveAll:fa()},Wd=da("string"),Gd=da("text");function da(e){return{resolveAll:fa(e==="text"?Vd:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,s);return i;function i(A){return l(A)?o(A):s(A)}function s(A){if(A!==null)return t.enter("data"),t.consume(A),a;t.consume(A)}function a(A){return l(A)?(t.exit("data"),o(A)):(t.consume(A),a)}function l(A){if(A===null)return!0;const c=r[A];let d=-1;if(c)for(;++d<c.length;){const u=c[d];if(!u.previous||u.previous.call(n,n.previous))return!0}return!1}}}}function fa(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)r===void 0?t[o]&&t[o][1].type==="data"&&(r=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Vd(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],o=t.sliceStream(r);let i,s=o.length,a=-1,l=0;for(;s--;){const A=o[s];if(typeof A=="string"){for(a=A.length;A.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(A===-2)i=!0,l++;else if(A!==-1){s++;break}}if(l){const A={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...A.start},r.start.offset===r.end.offset?Object.assign(r,A):(e.splice(n,0,["enter",A,t],["exit",A,t]),n+=2)}n++}return e}const Yd={42:et,43:et,45:et,48:et,49:et,50:et,51:et,52:et,53:et,54:et,55:et,56:et,57:et,62:ta},Kd={91:Pd},Xd={[-2]:ko,[-1]:ko,32:ko},Jd={35:Bd,42:ur,45:[ua,ur],60:Md,61:ua,95:ur,96:ia,126:ia},Zd={38:ra,92:na},$d={[-5]:Eo,[-4]:Eo,[-3]:Eo,33:Hd,38:ra,42:bo,60:[wd,_d],91:Rd,92:[Id,na],93:xo,95:bo,96:kd},ef={null:[bo,qd]},tf=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Kd,disable:{null:[]},document:Yd,flow:Jd,flowInitial:Xd,insideSpan:ef,string:Zd,text:$d},Symbol.toStringTag,{value:"Module"}));function nf(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let s=[],a=[];const l={attempt:w(function(x,g){h(x,g.from)}),check:w(p),consume:function(x){re(x)?(r.line++,r.column=1,r.offset+=x===-3?2:1,b()):x!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),A.previous=x},enter:function(x,g){const k=g||{};return k.type=x,k.start=u(),A.events.push(["enter",k,A]),a.push(k),k},exit:function(x){const g=a.pop();return g.end=u(),A.events.push(["exit",g,A]),g},interrupt:w(p,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(x){o[x.line]=x.column,b()},events:[],now:u,parser:e,previous:null,sliceSerialize:function(x,g){return function(k,S){let E=-1;const B=[];let C;for(;++E<k.length;){const M=k[E];let T;if(typeof M=="string")T=M;else switch(M){case-5:T="\r";break;case-4:T=`
|
|
22
|
+
`;break;case-3:T=`\r
|
|
23
|
+
`;break;case-2:T=S?" ":" ";break;case-1:if(!S&&C)continue;T=" ";break;default:T=String.fromCharCode(M)}C=M===-2,B.push(T)}return B.join("")}(d(x),g)},sliceStream:d,write:function(x){return s=ft(s,x),function(){let g;for(;r._index<s.length;){const k=s[r._index];if(typeof k=="string")for(g=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===g&&r._bufferIndex<k.length;)f(k.charCodeAt(r._bufferIndex));else f(k)}}(),s[s.length-1]!==null?[]:(h(t,0),A.events=wo(i,A.events,A),A.events)}};let c=t.tokenize.call(A,l);return t.resolveAll&&i.push(t),A;function d(x){return function(g,k){const S=k.start._index,E=k.start._bufferIndex,B=k.end._index,C=k.end._bufferIndex;let M;if(S===B)M=[g[S].slice(E,C)];else{if(M=g.slice(S,B),E>-1){const T=M[0];typeof T=="string"?M[0]=T.slice(E):M.shift()}C>0&&M.push(g[B].slice(0,C))}return M}(s,x)}function u(){const{_bufferIndex:x,_index:g,line:k,column:S,offset:E}=r;return{_bufferIndex:x,_index:g,line:k,column:S,offset:E}}function f(x){c=c(x)}function p(x,g){g.restore()}function w(x,g){return function(k,S,E){let B,C,M,T;return Array.isArray(k)?Q(k):"tokenize"in k?Q([k]):function(L){return _;function _(F){const H=F!==null&&L[F],m=F!==null&&L.null;return Q([...Array.isArray(H)?H:H?[H]:[],...Array.isArray(m)?m:m?[m]:[]])(F)}}(k);function Q(L){return B=L,C=0,L.length===0?E:I(L[C])}function I(L){return function(_){return T=function(){const F=u(),H=A.previous,m=A.currentConstruct,W=A.events.length,y=Array.from(a);return{from:W,restore:V};function V(){r=F,A.previous=H,A.currentConstruct=m,A.events.length=W,a=y,b()}}(),M=L,L.partial||(A.currentConstruct=L),L.name&&A.parser.constructs.disable.null.includes(L.name)?z():L.tokenize.call(g?Object.assign(Object.create(A),g):A,l,O,z)(_)}}function O(L){return x(M,T),S}function z(L){return T.restore(),++C<B.length?I(B[C]):E}}}function h(x,g){x.resolveAll&&!i.includes(x)&&i.push(x),x.resolve&&kt(A.events,g,A.events.length-g,x.resolve(A.events.slice(g),A)),x.resolveTo&&(A.events=x.resolveTo(A.events,A))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const pa=/[\0\t\n\r]/g,rf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function of(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return Js(n.slice(o?2:1),o?16:10)}return mo(n)||e}const ha={}.hasOwnProperty;function sf(e,t,n){return typeof t!="string"&&(n=t,t=void 0),function(r){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(rt),autolinkProtocol:I,autolinkEmail:I,atxHeading:l(Ie),blockQuote:l(fe),characterEscape:I,characterReference:I,codeFenced:l(oe),codeFencedFenceInfo:A,codeFencedFenceMeta:A,codeIndented:l(oe,A),codeText:l(ve,A),codeTextData:I,data:I,codeFlowValue:I,definition:l(me),definitionDestinationString:A,definitionLabelString:A,definitionTitleString:A,emphasis:l(ge),hardBreakEscape:l(Oe),hardBreakTrailing:l(Oe),htmlFlow:l(Dt,A),htmlFlowData:I,htmlText:l(Dt,A),htmlTextData:I,image:l(Me),label:A,link:l(rt),listItem:l(yt),listItemValue:w,listOrdered:l(ke,p),listUnordered:l(ke),paragraph:l(qt),reference:he,referenceString:A,resourceDestinationString:A,resourceTitleString:A,setextHeading:l(Ie),strong:l(Wt),thematicBreak:l(ot)},exit:{atxHeading:d(),atxHeadingSequence:C,autolink:d(),autolinkEmail:K,autolinkProtocol:G,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:Je,characterReferenceMarkerNumeric:Je,characterReferenceValue:Qe,characterReference:He,codeFenced:d(g),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:O,codeIndented:d(k),codeText:d(H),codeTextData:O,data:O,definition:d(),definitionDestinationString:B,definitionLabelString:S,definitionTitleString:E,emphasis:d(),hardBreakEscape:d(L),hardBreakTrailing:d(L),htmlFlow:d(_),htmlFlowData:O,htmlText:d(F),htmlTextData:O,image:d(W),label:V,labelText:y,lineEnding:z,link:d(m),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ae,resourceDestinationString:X,resourceTitleString:Z,resource:$,setextHeading:d(Q),setextHeadingLineSequence:T,setextHeadingText:M,strong:d(),thematicBreak:d()}};ga(o,(r||{}).mdastExtensions||[]);const i={};return s;function s(P){let R={type:"root",children:[]};const N={stack:[R],tokenStack:[],config:o,enter:c,exit:u,buffer:A,resume:f,data:i},J=[];let q=-1;for(;++q<P.length;)(P[q][1].type==="listOrdered"||P[q][1].type==="listUnordered")&&(P[q][0]==="enter"?J.push(q):q=a(P,J.pop(),q));for(q=-1;++q<P.length;){const pe=o[P[q][0]];ha.call(pe,P[q][1].type)&&pe[P[q][1].type].call(Object.assign({sliceSerialize:P[q][2].sliceSerialize},N),P[q][1])}if(N.tokenStack.length>0){const pe=N.tokenStack[N.tokenStack.length-1];(pe[1]||ma).call(N,void 0,pe[0])}for(R.position={start:Rt(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Rt(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<o.transforms.length;)R=o.transforms[q](R)||R;return R}function a(P,R,N){let J,q,pe,we,le=R-1,Se=-1,Be=!1;for(;++le<=N;){const ne=P[le];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ne[0]==="enter"?Se++:Se--,we=void 0;break;case"lineEndingBlank":ne[0]==="enter"&&(J&&!we&&!Se&&!pe&&(pe=le),we=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:we=void 0}if(!Se&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||Se===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(J){let _e=le;for(q=void 0;_e--;){const Pe=P[_e];if(Pe[1].type==="lineEnding"||Pe[1].type==="lineEndingBlank"){if(Pe[0]==="exit")continue;q&&(P[q][1].type="lineEndingBlank",Be=!0),Pe[1].type="lineEnding",q=_e}else if(Pe[1].type!=="linePrefix"&&Pe[1].type!=="blockQuotePrefix"&&Pe[1].type!=="blockQuotePrefixWhitespace"&&Pe[1].type!=="blockQuoteMarker"&&Pe[1].type!=="listItemIndent")break}pe&&(!q||pe<q)&&(J._spread=!0),J.end=Object.assign({},q?P[q][1].start:ne[1].end),P.splice(q||le,0,["exit",J,ne[2]]),le++,N++}if(ne[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};J=_e,P.splice(le,0,["enter",_e,ne[2]]),le++,N++,pe=void 0,we=!0}}}return P[R][1]._spread=Be,N}function l(P,R){return N;function N(J){c.call(this,P(J),J),R&&R.call(this,J)}}function A(){this.stack.push({type:"fragment",children:[]})}function c(P,R,N){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([R,N||void 0]),P.position={start:Rt(R.start),end:void 0}}function d(P){return R;function R(N){P&&P.call(this,N),u.call(this,N)}}function u(P,R){const N=this.stack.pop(),J=this.tokenStack.pop();if(!J)throw new Error("Cannot close `"+P.type+"` ("+Bn({start:P.start,end:P.end})+"): itโs not open");J[0].type!==P.type&&(R?R.call(this,P,J[0]):(J[1]||ma).call(this,P,J[0])),N.position.end=Rt(P.end)}function f(){return function(P){return Vs(P,typeof cr.includeImageAlt!="boolean"||cr.includeImageAlt,typeof cr.includeHtml!="boolean"||cr.includeHtml)}(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function w(P){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0)}function h(){const P=this.resume();this.stack[this.stack.length-1].lang=P}function b(){const P=this.resume();this.stack[this.stack.length-1].meta=P}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const P=this.resume();this.stack[this.stack.length-1].value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const P=this.resume();this.stack[this.stack.length-1].value=P.replace(/(\r?\n|\r)$/g,"")}function S(P){const R=this.resume(),N=this.stack[this.stack.length-1];N.label=R,N.identifier=dn(this.sliceSerialize(P)).toLowerCase()}function E(){const P=this.resume();this.stack[this.stack.length-1].title=P}function B(){const P=this.resume();this.stack[this.stack.length-1].url=P}function C(P){const R=this.stack[this.stack.length-1];if(!R.depth){const N=this.sliceSerialize(P).length;R.depth=N}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function T(P){this.stack[this.stack.length-1].depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function I(P){const R=this.stack[this.stack.length-1].children;let N=R[R.length-1];(!N||N.type!=="text")&&(N=ht(),N.position={start:Rt(P.start),end:void 0},R.push(N)),this.stack.push(N)}function O(P){const R=this.stack.pop();R.value+=this.sliceSerialize(P),R.position.end=Rt(P.end)}function z(P){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak)return R.children[R.children.length-1].position.end=Rt(P.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(R.type)&&(I.call(this,P),O.call(this,P))}function L(){this.data.atHardBreak=!0}function _(){const P=this.resume();this.stack[this.stack.length-1].value=P}function F(){const P=this.resume();this.stack[this.stack.length-1].value=P}function H(){const P=this.resume();this.stack[this.stack.length-1].value=P}function m(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=R,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function W(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=R,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function y(P){const R=this.sliceSerialize(P),N=this.stack[this.stack.length-2];N.label=function(J){return J.replace(rf,of)}(R),N.identifier=dn(R).toLowerCase()}function V(){const P=this.stack[this.stack.length-1],R=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const J=P.children;N.children=J}else N.alt=R}function X(){const P=this.resume();this.stack[this.stack.length-1].url=P}function Z(){const P=this.resume();this.stack[this.stack.length-1].title=P}function $(){this.data.inReference=void 0}function he(){this.data.referenceType="collapsed"}function Ae(P){const R=this.resume(),N=this.stack[this.stack.length-1];N.label=R,N.identifier=dn(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function Je(P){this.data.characterReferenceType=P.type}function Qe(P){const R=this.sliceSerialize(P),N=this.data.characterReferenceType;let J;N?(J=Js(R,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=mo(R),this.stack[this.stack.length-1].value+=J}function He(P){this.stack.pop().position.end=Rt(P.end)}function G(P){O.call(this,P),this.stack[this.stack.length-1].url=this.sliceSerialize(P)}function K(P){O.call(this,P),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(P)}function fe(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function ve(){return{type:"inlineCode",value:""}}function me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function rt(){return{type:"link",title:null,url:"",children:[]}}function ke(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function yt(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function qt(){return{type:"paragraph",children:[]}}function Wt(){return{type:"strong",children:[]}}function ht(){return{type:"text",value:""}}function ot(){return{type:"thematicBreak"}}}(n)(function(r){for(;!sa(r););return r}(function(r){const o={constructs:Ad([tf,...(r||{}).extensions||[]]),content:i(yd),defined:[],document:i(vd),flow:i(jd),lazy:{},string:i(Wd),text:i(Gd)};return o;function i(s){return function(a){return nf(o,s,a)}}}(n).document().write(function(){let r,o=1,i="",s=!0;return function(a,l,A){const c=[];let d,u,f,p,w;for(a=i+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),f=0,i="",s&&(a.charCodeAt(0)===65279&&f++,s=void 0);f<a.length;){if(pa.lastIndex=f,d=pa.exec(a),p=d&&d.index!==void 0?d.index:a.length,w=a.charCodeAt(p),!d){i=a.slice(f);break}if(w===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(a.slice(f,p)),o+=p-f),w){case 0:c.push(65533),o++;break;case 9:for(u=4*Math.ceil(o/4),c.push(-2);o++<u;)c.push(-1);break;case 10:c.push(-4),o=1;break;default:r=!0,o=1}f=p+1}return A&&(r&&c.push(-5),i&&c.push(i),c.push(null)),c}}()(e,t,!0))))}function Rt(e){return{line:e.line,column:e.column,offset:e.offset}}function ga(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ga(e,r):af(e,r)}}function af(e,t){let n;for(n in t)if(ha.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ma(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Bn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Bn({start:t.start,end:t.end})+") is still open")}function lf(e){const t=this;t.parser=function(n){return sf(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ya(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 o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=r:o.push({type:"text",value:r}),o}function va(e){return e.spread??e.children.length>1}function cf(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(wa(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(wa(t.slice(o),o>0,!1)),i.join("")}function wa(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===9||i===32;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Af={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
24
|
+
`}]},code:function(e,t){const n=t.value?t.value+`
|
|
25
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=fn(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const A={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,A),e.applyData(t,A)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ya(e,t);const o={src:fn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:fn(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)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ya(e,t);const o={href:fn(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:fn(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(c){let d=!1;if(c.type==="list"){d=c.spread||!1;const u=c.children;let f=-1;for(;!d&&++f<u.length;)d=va(u[f])}return d}(n):va(t),i={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(o||a!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
26
|
+
`}),c.type!=="element"||c.tagName!=="p"||o?s.push(c):s.push(...c.children)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
|
|
27
|
+
`});const A={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const s=r[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),o.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Ao(t.children[1]),l=Hs(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),o.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,s=i?i.length:t.children.length;let a=-1;const l=[];for(;++a<s;){const c=t.children[a],d={},u=i?i[a]:void 0;u&&(d.align=u);let f={type:"element",tagName:o,properties:d,children:[]};c&&(f.children=e.all(c),e.patch(c,f),f=e.applyData(c,f)),l.push(f)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:cf(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:dr,yaml:dr,definition:dr,footnoteDefinition:dr};function dr(){}const ba=typeof self=="object"?self:globalThis,ka=e=>((t,n)=>{const r=(i,s)=>(t.set(s,i),i),o=i=>{if(t.has(i))return t.get(i);const[s,a]=n[i];switch(s){case 0:case-1:return r(a,i);case 1:{const l=r([],i);for(const A of a)l.push(o(A));return l}case 2:{const l=r({},i);for(const[A,c]of a)l[o(A)]=o(c);return l}case 3:return r(new Date(a),i);case 4:{const{source:l,flags:A}=a;return r(new RegExp(l,A),i)}case 5:{const l=r(new Map,i);for(const[A,c]of a)l.set(o(A),o(c));return l}case 6:{const l=r(new Set,i);for(const A of a)l.add(o(A));return l}case 7:{const{name:l,message:A}=a;return r(new ba[l](A),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return r(new DataView(l),a)}}return r(new ba[s](a),i)};return o})(new Map,e)(0),pn="",{toString:uf}={},{keys:df}=Object,On=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=uf.call(e).slice(8,-1);switch(n){case"Array":return[1,pn];case"Object":return[2,pn];case"Date":return[3,pn];case"RegExp":return[4,pn];case"Map":return[5,pn];case"Set":return[6,pn];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fr=([e,t])=>e===0&&(t==="function"||t==="symbol"),xa=(e,{json:t,lossy:n}={})=>{const r=[];return((o,i,s,a)=>{const l=(c,d)=>{const u=a.push(c)-1;return s.set(d,u),u},A=c=>{if(s.has(c))return s.get(c);let[d,u]=On(c);switch(d){case 0:{let p=c;switch(u){case"bigint":d=8,p=c.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return l([-1],c)}return l([d,p],c)}case 1:{if(u){let h=c;return u==="DataView"?h=new Uint8Array(c.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(c)),l([u,[...h]],c)}const p=[],w=l([d,p],c);for(const h of c)p.push(A(h));return w}case 2:{if(u)switch(u){case"BigInt":return l([u,c.toString()],c);case"Boolean":case"Number":case"String":return l([u,c.valueOf()],c)}if(i&&"toJSON"in c)return A(c.toJSON());const p=[],w=l([d,p],c);for(const h of df(c))(o||!fr(On(c[h])))&&p.push([A(h),A(c[h])]);return w}case 3:return l([d,c.toISOString()],c);case 4:{const{source:p,flags:w}=c;return l([d,{source:p,flags:w}],c)}case 5:{const p=[],w=l([d,p],c);for(const[h,b]of c)(o||!fr(On(h))&&!fr(On(b)))&&p.push([A(h),A(b)]);return w}case 6:{const p=[],w=l([d,p],c);for(const h of c)(o||!fr(On(h)))&&p.push(A(h));return w}}const{message:f}=c;return l([d,{name:u,message:f}],c)};return A})(!(t||n),!!t,new Map,r)(e),r},pr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ka(xa(e,t)):structuredClone(e):(e,t)=>ka(xa(e,t));function ff(e,t){const n=[{type:"text",value:"โฉ"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function pf(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Ea=function(e){if(e==null)return hf;if(typeof e=="function")return hr(e);if(typeof e=="object")return Array.isArray(e)?function(t){const n=[];let r=-1;for(;++r<t.length;)n[r]=Ea(t[r]);return hr(o);function o(...i){let s=-1;for(;++s<n.length;)if(n[s].apply(this,i))return!0;return!1}}(e):function(t){const n=t;return hr(r);function r(o){const i=o;let s;for(s in t)if(i[s]!==n[s])return!1;return!0}}(e);if(typeof e=="string")return function(t){return hr(n);function n(r){return r&&r.type===t}}(e);throw new Error("Expected function, string, or object as test")};function hr(e){return function(t,n,r){return!(!function(o){return o!==null&&typeof o=="object"&&"type"in o}(t)||!e.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function hf(){return!0}const Ca=[],gf=!0,Sa=!1;function mf(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Ea(o),s=r?-1:1;(function a(l,A,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(u,"name",{value:"node ("+l.type+(f?"<"+f+">":"")+")"})}return u;function u(){let f,p,w,h=Ca;if((!t||i(l,A,c[c.length-1]||void 0))&&(h=function(b){return Array.isArray(b)?b:typeof b=="number"?[gf,b]:b==null?Ca:[b]}(n(l,c)),h[0]===Sa))return h;if("children"in l&&l.children){const b=l;if(b.children&&h[0]!=="skip")for(p=(r?b.children.length:-1)+s,w=c.concat(b);p>-1&&p<b.children.length;){const x=b.children[p];if(f=a(x,p,w)(),f[0]===Sa)return f;p=typeof f[1]=="number"?f[1]:p+s}}return h}})(e,void 0,[])()}function Pa(e,t,n,r){let o,i,s;typeof t=="function"?(i=void 0,s=t,o=n):(i=t,s=n,o=r),mf(e,i,function(a,l){const A=l[l.length-1],c=A?A.children.indexOf(a):void 0;return s(a,c,A)},o)}const Co={}.hasOwnProperty,yf={};function vf(e,t){const n=t||yf,r=new Map,o=new Map,i=new Map,s={...Af,...n.handlers},a={all:function(l){const A=[];if("children"in l){const c=l.children;let d=-1;for(;++d<c.length;){const u=a.one(c[d],l);if(u){if(d&&c[d-1].type==="break"&&(!Array.isArray(u)&&u.type==="text"&&(u.value=Da(u.value)),!Array.isArray(u)&&u.type==="element")){const f=u.children[0];f&&f.type==="text"&&(f.value=Da(f.value))}Array.isArray(u)?A.push(...u):A.push(u)}}}return A},applyData:bf,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:s,one:function(l,A){const c=l.type,d=a.handlers[c];if(Co.call(a.handlers,c)&&d)return d(a,l,A);if(a.options.passThrough&&a.options.passThrough.includes(c)){if("children"in l){const{children:u,...f}=l,p=pr(f);return p.children=a.all(l),p}return pr(l)}return(a.options.unknownHandler||kf)(a,l,A)},options:n,patch:wf,wrap:xf};return Pa(e,function(l){if(l.type==="definition"||l.type==="footnoteDefinition"){const A=l.type==="definition"?r:o,c=String(l.identifier).toUpperCase();A.has(c)||A.set(c,l)}}),a}function wf(e,t){e.position&&(t.position=function(n){const r=Ao(n),o=Hs(n);if(r&&o)return{start:r,end:o}}(e))}function bf(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&i&&Object.assign(n.properties,pr(i)),"children"in n&&n.children&&o!=null&&(n.children=o)}return n}function kf(e,t){const n=t.data||{},r=!("value"in t)||Co.call(n,"hProperties")||Co.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function xf(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
28
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
29
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
30
|
+
`}),n}function Da(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ia(e,t){const n=vf(e,t),r=n.one(e,void 0),o=function(s){const a=typeof s.options.clobberPrefix=="string"?s.options.clobberPrefix:"user-content-",l=s.options.footnoteBackContent||ff,A=s.options.footnoteBackLabel||pf,c=s.options.footnoteLabel||"Footnotes",d=s.options.footnoteLabelTagName||"h2",u=s.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<s.footnoteOrder.length;){const w=s.footnoteById.get(s.footnoteOrder[p]);if(!w)continue;const h=s.all(w),b=String(w.identifier).toUpperCase(),x=fn(b.toLowerCase());let g=0;const k=[],S=s.footnoteCounts.get(b);for(;S!==void 0&&++g<=S;){k.length>0&&k.push({type:"text",value:" "});let C=typeof l=="string"?l:l(p,g);typeof C=="string"&&(C={type:"text",value:C}),k.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+x+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof A=="string"?A:A(p,g),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const E=h[h.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const C=E.children[E.children.length-1];C&&C.type==="text"?C.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else h.push(...k);const B={type:"element",tagName:"li",properties:{id:a+"fn-"+x},children:s.wrap(h,!0)};s.patch(w,B),f.push(B)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:d,properties:{...pr(u),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
|
|
31
|
+
`},{type:"element",tagName:"ol",properties:{},children:s.wrap(f,!0)},{type:"text",value:`
|
|
32
|
+
`}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
33
|
+
`},o),i}function Ef(e,t){return e&&"run"in e?async function(n,r){const o=Ia(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Ia(n,{file:r,...e||t})}}function Ba(e){if(e)throw e}var So,Ta,Cf=function(){if(Ta)return So;Ta=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var A,c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;for(A in l);return typeof A>"u"||e.call(l,A)},s=function(l,A){n&&A.name==="__proto__"?n(l,A.name,{enumerable:!0,configurable:!0,value:A.newValue,writable:!0}):l[A.name]=A.newValue},a=function(l,A){if(A==="__proto__"){if(!e.call(l,A))return;if(r)return r(l,A).value}return l[A]};return So=function l(){var A,c,d,u,f,p,w=arguments[0],h=1,b=arguments.length,x=!1;for(typeof w=="boolean"&&(x=w,w=arguments[1]||{},h=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});h<b;++h)if((A=arguments[h])!=null)for(c in A)d=a(w,c),w!==(u=a(A,c))&&(x&&u&&(i(u)||(f=o(u)))?(f?(f=!1,p=d&&o(d)?d:[]):p=d&&i(d)?d:{},s(w,{name:c,newValue:l(x,p,u)})):typeof u<"u"&&s(w,{name:c,newValue:u}));return w},So}();const Po=_s(Cf);function Do(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 Sf(){const e=[],t={run:function(...n){let r=-1;const o=n.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function i(s,...a){const l=e[++r];let A=-1;if(s)o(s);else{for(;++A<n.length;)(a[A]===null||a[A]===void 0)&&(a[A]=n[A]);n=a,l?function(c,d){let u;return f;function f(...h){const b=c.length>h.length;let x;b&&h.push(p);try{x=c.apply(this,h)}catch(g){if(b&&u)throw g;return p(g)}b||(x&&x.then&&typeof x.then=="function"?x.then(w,p):x instanceof Error?p(x):w(x))}function p(h,...b){u||(u=!0,d(h,...b))}function w(h){p(null,h)}}(l,i)(...a):o(null,...a)}})(null,...n)},use:function(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Et={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_n(e);let n,r=0,o=-1,i=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=s));return r===o?o=s:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(_n(e),e.length===0)return".";let t,n=-1,r=e.length;for(;--r;)if(e.codePointAt(r)===47){if(t){n=r;break}}else t||(t=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)},extname:function(e){_n(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(a!==47)r<0&&(t=!0,r=n+1),a===46?i<0?i=n:s!==1&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}return i<0||r<0||s===0||s===1&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)_n(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":function(r){_n(r);const o=r.codePointAt(0)===47;let i=function(s,a){let l,A,c="",d=0,u=-1,f=0,p=-1;for(;++p<=s.length;){if(p<s.length)l=s.codePointAt(p);else{if(l===47)break;l=47}if(l===47){if(u!==p-1&&f!==1)if(u!==p-1&&f===2){if(c.length<2||d!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(A=c.lastIndexOf("/"),A!==c.length-1){A<0?(c="",d=0):(c=c.slice(0,A),d=c.length-1-c.lastIndexOf("/")),u=p,f=0;continue}}else if(c.length>0){c="",d=0,u=p,f=0;continue}}a&&(c=c.length>0?c+"/..":"..",d=2)}else c.length>0?c+="/"+s.slice(u+1,p):c=s.slice(u+1,p),d=p-u-1;u=p,f=0}else l===46&&f>-1?f++:f=-1}return c}(r,!o);return i.length===0&&!o&&(i="."),i.length>0&&r.codePointAt(r.length-1)===47&&(i+="/"),o?"/"+i:i}(t)},sep:"/"};function _n(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Pf={cwd:function(){return"/"}};function Io(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Df(e){if(typeof e=="string")e=new URL(e);else if(!Io(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 function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const n=t.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const o=n.codePointAt(r+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}(e)}const Bo=["history","path","basename","stem","extname","dirname"];class Ma{constructor(t){let n;var r;n=t?Io(t)?{path:t}:typeof t=="string"||(r=t)&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r?{value:t}:t:{},this.cwd="cwd"in n?"":Pf.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,i=-1;for(;++i<Bo.length;){const s=Bo[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}for(o in n)Bo.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Et.basename(this.path):void 0}set basename(t){Mo(t,"basename"),To(t,"basename"),this.path=Et.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Et.dirname(this.path):void 0}set dirname(t){Qa(this.basename,"dirname"),this.path=Et.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Et.extname(this.path):void 0}set extname(t){if(To(t,"extname"),Qa(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Et.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Io(t)&&(t=Df(t)),Mo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Et.basename(this.path,this.extname):void 0}set stem(t){Mo(t,"stem"),To(t,"stem"),this.path=Et.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new We(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function To(e,t){if(e&&e.includes(Et.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Et.sep+"`")}function Mo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Qa(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const If=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Bf={}.hasOwnProperty;class Qo extends If{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Sf()}copy(){const t=new Qo;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Po(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Lo("data",this.frozen),this.namespace[t]=n,this):Bf.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gr(t),r=this.parser||this.Parser;return Oo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Oo("process",this.parser||this.Parser),_o("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){const a=gr(t),l=r.parse(a);function A(c,d){c||!d?s(c):i?i(d):n(void 0,d)}r.run(l,a,function(c,d,u){if(c||!d||!u)return A(c);const f=d,p=r.stringify(f,u);var w;typeof(w=p)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(w)?u.value=p:u.result=p,A(c,u)})}}processSync(t){let n,r=!1;return this.freeze(),Oo("processSync",this.parser||this.Parser),_o("processSync",this.compiler||this.Compiler),this.process(t,function(o,i){r=!0,Ba(o),n=i}),_a("processSync","process",r),n}run(t,n,r){Oa(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,a){const l=gr(n);o.run(t,l,function(A,c,d){const u=c||t;A?a(A):s?s(u):r(void 0,u,d)})}}runSync(t,n){let r,o=!1;return this.run(t,n,function(i,s){Ba(i),r=s,o=!0}),_a("runSync","run",o),r}stringify(t,n){this.freeze();const r=gr(n),o=this.compiler||this.Compiler;return _o("stringify",o),Oa(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Lo("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?a(t):s(t)}return this;function i(A){if(typeof A=="function")l(A,[]);else{if(typeof A!="object")throw new TypeError("Expected usable value, not `"+A+"`");if(Array.isArray(A)){const[c,...d]=A;l(c,d)}else s(A)}}function s(A){if(!("plugins"in A)&&!("settings"in A))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(A.plugins),A.settings&&(o.settings=Po(!0,o.settings,A.settings))}function a(A){let c=-1;if(A!=null){if(!Array.isArray(A))throw new TypeError("Expected a list of plugins, not `"+A+"`");for(;++c<A.length;)i(A[c])}}function l(A,c){let d=-1,u=-1;for(;++d<r.length;)if(r[d][0]===A){u=d;break}if(u===-1)r.push([A,...c]);else if(c.length>0){let[f,...p]=c;const w=r[u][1];Do(w)&&Do(f)&&(f=Po(!0,w,f)),r[u]=[A,f,...p]}}}}const Tf=new Qo().freeze();function Oo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _o(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lo(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 Oa(e){if(!Do(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _a(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gr(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new Ma(e)}const La=[],Na={allowDangerousHtml:!0},Mf=/^(https?|ircs?|mailto|xmpp)$/i,Qf=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Of(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,s=e.disallowedElements,a=e.rehypePlugins||La,l=e.remarkPlugins||La,A=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Na}:Na,c=e.skipHtml,d=e.unwrapDisallowed,u=e.urlTransform||_f,f=Tf().use(lf).use(l).use(Ef,A).use(a),p=new Ma;typeof r=="string"&&(p.value=r);for(const b of Qf)Object.hasOwn(e,b.from)&&(b.from,b.to&&b.to,b.id);const w=f.parse(p);let h=f.runSync(w,p);return o&&(h={type:"element",tagName:"div",properties:{className:o},children:h.type==="root"?h.children:[h]}),Pa(h,function(b,x,g){if(b.type==="raw"&&g&&typeof x=="number")return c?g.children.splice(x,1):g.children[x]={type:"text",value:b.value},x;if(b.type==="element"){let k;for(k in go)if(Object.hasOwn(go,k)&&Object.hasOwn(b.properties,k)){const S=b.properties[k],E=go[k];(E===null||E.includes(b.tagName))&&(b.properties[k]=u(String(S||""),k,b))}}if(b.type==="element"){let k=t?!t.includes(b.tagName):!!s&&s.includes(b.tagName);if(!k&&n&&typeof x=="number"&&(k=!n(b,x,g)),k&&g&&typeof x=="number")return d&&b.children?g.children.splice(x,1,...b.children):g.children.splice(x,1),x}}),id(h,{Fragment:D.Fragment,components:i,ignoreInvalidStyle:!0,jsx:D.jsx,jsxs:D.jsxs,passKeys:!0,passNode:!0})}function _f(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Mf.test(e.slice(0,t))?e:""}const Lf=({children:e})=>D.jsx("div",{style:{whiteSpace:"normal"},children:D.jsx(Of,{components:{p:({...t})=>D.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>D.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>D.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>D.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:n})=>t?D.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:n}):D.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:D.jsx("code",{children:n})}),blockquote:({...t})=>D.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),Nf={autoConfig:!0},Ff=e=>()=>(t=>{const{getFlow:n}=sr(),{messages:r,replaceMessages:o}=ar(),{settings:i}=ps(),{hasChatHistoryLoaded:s}=gs(),a={...t,...Nf},l=a.markdownComponent?a.markdownComponent:Lf;v.useEffect(()=>{var d,u;if(s){const f=[...r];for(let p=0;p<f.length&&p<(((d=i.chatHistory)==null?void 0:d.maxEntries)??30);p++){const w=f[p];(u=w.tags)!=null&&u.includes("rcb-markdown-renderer-plugin:parsed")&&(w.contentWrapper=l)}o(f)}},[s]);const A=async d=>{var u;const f=(u=d.data.message)==null?void 0:u.sender.toUpperCase();((p,w,h)=>{var b;if(typeof p.data.message.content!="string"||!p.detail.currPath)return!1;const x=w[p.detail.currPath];return!!x&&(((b=x.renderMarkdown)==null?void 0:b.map(g=>g.toUpperCase()).includes(h))??!1)})(d,n(),f)&&(d.data.message.contentWrapper=l,d.data.message.tags||(d.data.message.tags=[]),d.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};ut(Y.PRE_INJECT_MESSAGE,A),ut(Y.CHUNK_STREAM_MESSAGE,A),ut(Y.START_STREAM_MESSAGE,A),ut(Y.START_SIMULATE_STREAM_MESSAGE,A);const c={name:"@rcb-plugins/markdown-renderer"};return a!=null&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),mr={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},Fa=(e,t,n="validateTextInput")=>{var r;if((r=e.detail)==null||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[n];return typeof i=="function"?i:void 0},Hf=e=>{const{showToast:t}=(()=>{const{showToast:d,dismissToast:u,toasts:f,replaceToasts:p}=an();return{showToast:d,dismissToast:u,toasts:f,replaceToasts:p}})(),{getFlow:n}=sr(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:d,replaceStyles:u,updateStyles:f}=As();return{styles:d,replaceStyles:u,updateStyles:f}})(),s=(d=>({...mr,...d,promptBaseColors:{...mr.promptBaseColors},promptHoveredColors:{...mr.promptHoveredColors},textAreaHighlightColors:{...mr.textAreaHighlightColors}}))(e),[a,l]=v.useState(0),A=v.useRef({});ut(Y.USER_SUBMIT_TEXT,d=>{const u=d,f=Fa(u,n(),"validateTextInput");if(!f)return;const p=f(u.data.inputText);if(p!=null&&p.success||d.preventDefault(),!p.promptContent)return;a===0&&(A.current=structuredClone(r));const w=((h,b)=>{const x=h.promptType??"info";let g={};return b.advancedStyles&&(g=b.advancedStyles[x]),b.promptBaseColors&&(g.toastPromptStyle={color:b.promptBaseColors[x],borderColor:b.promptBaseColors[x]}),b.promptHoveredColors&&(g.toastPromptHoveredStyle={color:b.promptHoveredColors[x],borderColor:b.promptHoveredColors[x]}),b.textAreaHighlightColors&&(h.highlightTextArea??!0)&&(g.chatInputAreaStyle={boxShadow:`${b.textAreaHighlightColors[x]} 0px 0px 5px`}),g})(p,s);o(w),t(p.promptContent,p.promptDuration??3e3),l(h=>h+1)}),ut(Y.USER_UPLOAD_FILE,d=>{var u,f;const p=d,w=(f=(u=p.data)==null?void 0:u.files)==null?void 0:f[0];if(!w)return console.error("No file uploaded."),void d.preventDefault();const h=Fa(p,n(),"validateFileInput");if(!h)return void console.error("Validator not found for file input.");const b=h(w);if(!b.success)return console.error("Validation failed:",b),b.promptContent&&t(b.promptContent,b.promptDuration??3e3),void d.preventDefault();console.log("Validation successful:",b)}),ut(Y.DISMISS_TOAST,()=>{l(d=>d-1)}),v.useEffect(()=>{a===0&&setTimeout(()=>{i(A.current)})},[a,i]);const c={name:"@rcb-plugins/input-validator"};return s.autoConfig&&(c.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),c};function Ym(){}function Km(){}const Rf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uf={};function Ha(e,t){return(Uf.jsx?zf:Rf).test(e)}const jf=/[ \t\n\f\r]/g;function Ra(e){return e.replace(jf,"")===""}class Ln{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}function za(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ln(n,r,t)}function No(e){return e.toLowerCase()}Ln.prototype.normal={},Ln.prototype.property={},Ln.prototype.space=void 0;class tt{constructor(t,n){this.attribute=n,this.property=t}}tt.prototype.attribute="",tt.prototype.booleanish=!1,tt.prototype.boolean=!1,tt.prototype.commaOrSpaceSeparated=!1,tt.prototype.commaSeparated=!1,tt.prototype.defined=!1,tt.prototype.mustUseProperty=!1,tt.prototype.number=!1,tt.prototype.overloadedBoolean=!1,tt.prototype.property="",tt.prototype.spaceSeparated=!1,tt.prototype.space=void 0;let qf=0;const ae=en(),Fe=en(),Fo=en(),j=en(),Ce=en(),hn=en(),ct=en();function en(){return 2**++qf}var Ho=Object.freeze({__proto__:null,boolean:ae,booleanish:Fe,commaOrSpaceSeparated:ct,commaSeparated:hn,number:j,overloadedBoolean:Fo,spaceSeparated:Ce});const Ro=Object.keys(Ho);class zo extends tt{constructor(t,n,r,o){let i=-1;if(super(t,n),Ua(this,"space",o),typeof r=="number")for(;++i<Ro.length;){const s=Ro[i];Ua(this,Ro[i],(r&Ho[s])===Ho[s])}}}function Ua(e,t,n){n&&(e[t]=n)}function gn(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new zo(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[No(r)]=r,n[No(i.attribute)]=r}return new Ln(t,n,e.space)}zo.prototype.defined=!0;const ja=gn({properties:{ariaActiveDescendant:null,ariaAtomic:Fe,ariaAutoComplete:null,ariaBusy:Fe,ariaChecked:Fe,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Ce,ariaCurrent:null,ariaDescribedBy:Ce,ariaDetails:null,ariaDisabled:Fe,ariaDropEffect:Ce,ariaErrorMessage:null,ariaExpanded:Fe,ariaFlowTo:Ce,ariaGrabbed:Fe,ariaHasPopup:null,ariaHidden:Fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ce,ariaLevel:j,ariaLive:null,ariaModal:Fe,ariaMultiLine:Fe,ariaMultiSelectable:Fe,ariaOrientation:null,ariaOwns:Ce,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Fe,ariaReadOnly:Fe,ariaRelevant:null,ariaRequired:Fe,ariaRoleDescription:Ce,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Fe,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase()});function qa(e,t){return t in e?e[t]:t}function Wa(e,t){return qa(e,t.toLowerCase())}const Wf=gn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hn,acceptCharset:Ce,accessKey:Ce,action:null,allow:null,allowFullScreen:ae,allowPaymentRequest:ae,allowUserMedia:ae,alt:null,as:null,async:ae,autoCapitalize:null,autoComplete:Ce,autoFocus:ae,autoPlay:ae,blocking:Ce,capture:null,charSet:null,checked:ae,cite:null,className:Ce,cols:j,colSpan:null,content:null,contentEditable:Fe,controls:ae,controlsList:Ce,coords:j|hn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ae,defer:ae,dir:null,dirName:null,disabled:ae,download:Fo,draggable:Fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ae,formTarget:null,headers:Ce,height:j,hidden:Fo,high:j,href:null,hrefLang:null,htmlFor:Ce,httpEquiv:Ce,id:null,imageSizes:null,imageSrcSet:null,inert:ae,inputMode:null,integrity:null,is:null,isMap:ae,itemId:null,itemProp:Ce,itemRef:Ce,itemScope:ae,itemType:Ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ae,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ae,muted:ae,name:null,nonce:null,noModule:ae,noValidate:ae,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:ae,optimum:j,pattern:null,ping:Ce,placeholder:null,playsInline:ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ae,referrerPolicy:null,rel:Ce,required:ae,reversed:ae,rows:j,rowSpan:j,sandbox:Ce,scope:null,scoped:ae,seamless:ae,selected:ae,shadowRootClonable:ae,shadowRootDelegatesFocus:ae,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ae,useMap:null,value:Fe,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ce,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ae,declare:ae,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ae,noHref:ae,noShade:ae,noWrap:ae,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Fe,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ae,disableRemotePlayback:ae,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:Wa}),Gf=gn({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"},properties:{about:ct,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Ce,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:hn,g2:hn,glyphName:hn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ct,rev:ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ct,requiredFeatures:ct,requiredFonts:ct,requiredFormats:ct,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ct,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qa}),Ga=gn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Va=gn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wa}),Ya=gn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Vf={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"},Yf=/[A-Z]/g,Ka=/-[a-z]/g,Kf=/^data[-\w.:]+$/i;function Xf(e){return"-"+e.toLowerCase()}function Jf(e){return e.charAt(1).toUpperCase()}const Zf=za([ja,Wf,Ga,Va,Ya],"html"),Uo=za([ja,Gf,Ga,Va,Ya],"svg");var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jo={},Ja=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$f=/\n/g,ep=/^\s*/,tp=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,np=/^:\s*/,rp=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,op=/^[;\s]*/,ip=/^\s+|\s+$/g,tn="";function Za(e){return e?e.replace(ip,tn):tn}var sp=yr&&yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jo,"__esModule",{value:!0}),jo.default=function(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,ap.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var s=i.property,a=i.value;o?t(s,a,i):a&&((n=n||{})[s]=a)}}),n};var ap=sp(function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(f){var p=f.match($f);p&&(n+=p.length);var w=f.lastIndexOf(`
|
|
34
|
+
`);r=~w?f.length-w:r+f.length}function i(){var f={line:n,column:r};return function(p){return p.position=new s(f),A(),p}}function s(f){this.start=f,this.end={line:n,column:r},this.source=t.source}function a(f){var p=new Error(t.source+":"+n+":"+r+": "+f);if(p.reason=f,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function l(f){var p=f.exec(e);if(p){var w=p[0];return o(w),e=e.slice(w.length),p}}function A(){l(ep)}function c(f){var p;for(f=f||[];p=d();)p!==!1&&f.push(p);return f}function d(){var f=i();if(e.charAt(0)=="/"&&e.charAt(1)=="*"){for(var p=2;tn!=e.charAt(p)&&(e.charAt(p)!="*"||e.charAt(p+1)!="/");)++p;if(p+=2,tn===e.charAt(p-1))return a("End of comment missing");var w=e.slice(2,p-2);return r+=2,o(w),e=e.slice(p),r+=2,f({type:"comment",comment:w})}}function u(){var f=i(),p=l(tp);if(p){if(d(),!l(np))return a("property missing ':'");var w=l(rp),h=f({type:"declaration",property:Za(p[0].replace(Ja,tn)),value:w?Za(w[0].replace(Ja,tn)):tn});return l(op),h}}return s.prototype.content=e,A(),function(){var f,p=[];for(c(p);f=u();)f!==!1&&(p.push(f),c(p));return p}()}),vr={};Object.defineProperty(vr,"__esModule",{value:!0}),vr.camelCase=void 0;var lp=/^--[a-zA-Z0-9_-]+$/,cp=/-([a-z])/g,Ap=/^[^-]+$/,up=/^-(webkit|moz|ms|o|khtml)-/,dp=/^-(ms)-/,fp=function(e,t){return t.toUpperCase()},$a=function(e,t){return"".concat(t,"-")};vr.camelCase=function(e,t){return t===void 0&&(t={}),function(n){return!n||Ap.test(n)||lp.test(n)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(dp,$a):e.replace(up,$a)).replace(cp,fp))};var pp=(yr&&yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(jo),hp=vr;function qo(e,t){var n={};return e&&typeof e=="string"&&(0,pp.default)(e,function(r,o){r&&o&&(n[(0,hp.camelCase)(r,t)]=o)}),n}qo.default=qo;var gp=Xa(qo);const el=tl("end"),Wo=tl("start");function tl(e){return function(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Nn(e){return e&&typeof e=="object"?"position"in e||"type"in e?nl(e.position):"start"in e||"end"in e?nl(e):"line"in e||"column"in e?Go(e):"":""}function Go(e){return rl(e&&e.line)+":"+rl(e&&e.column)}function nl(e){return Go(e&&e.start)+"-"+Go(e&&e.end)}function rl(e){return e&&typeof e=="number"?e:1}class Ge extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},s=!1;if(n&&(i="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),typeof t=="string"?o=t:!i.cause&&t&&(s=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Nn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ge.prototype.file="",Ge.prototype.name="",Ge.prototype.reason="",Ge.prototype.message="",Ge.prototype.stack="",Ge.prototype.column=void 0,Ge.prototype.line=void 0,Ge.prototype.ancestors=void 0,Ge.prototype.cause=void 0,Ge.prototype.fatal=void 0,Ge.prototype.place=void 0,Ge.prototype.ruleId=void 0,Ge.prototype.source=void 0;const Vo={}.hasOwnProperty,mp=new Map,yp=/[A-Z]/g,vp=new Set(["table","tbody","thead","tfoot","tr"]),wp=new Set(["td","th"]),ol="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(s,a){return l;function l(A,c,d,u){const f=Array.isArray(d.children),p=Wo(A);return a(c,d,u,f,{columnNumber:p?p.column-1:void 0,fileName:s,lineNumber:p?p.line:void 0},void 0)}}(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=function(s,a,l){return A;function A(c,d,u,f){const p=Array.isArray(u.children)?l:a;return f?p(d,u,f):p(d,u)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Uo:Zf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=il(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function il(e,t,n){return t.type==="element"?function(r,o,i){const s=r.schema;let a=s;o.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=Uo,r.schema=a),r.ancestors.push(o);const l=al(r,o.tagName,!1),A=function(d,u){const f={};let p,w;for(w in u.properties)if(w!=="children"&&Vo.call(u.properties,w)){const h=kp(d,w,u.properties[w]);if(h){const[b,x]=h;d.tableCellAlignToStyle&&b==="align"&&typeof x=="string"&&wp.has(u.tagName)?p=x:f[b]=x}}return p&&((f.style||(f.style={}))[d.stylePropertyNameCase==="css"?"text-align":"textAlign"]=p),f}(r,o);let c=Ko(r,o);return vp.has(o.tagName)&&(c=c.filter(function(d){return typeof d!="string"||!(typeof(u=d)=="object"?u.type==="text"&&Ra(u.value):Ra(u));var u})),sl(r,A,l,o),Yo(A,c),r.ancestors.pop(),r.schema=s,r.create(o,l,A,i)}(e,t,n):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(r,o){if(o.data&&o.data.estree&&r.evaluater){const i=o.data.estree.body[0];return i.type,r.evaluater.evaluateExpression(i.expression)}Fn(r,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(r,o,i){const s=r.schema;let a=s;o.name==="svg"&&s.space==="html"&&(a=Uo,r.schema=a),r.ancestors.push(o);const l=o.name===null?r.Fragment:al(r,o.name,!0),A=function(d,u){const f={};for(const p of u.attributes)if(p.type==="mdxJsxExpressionAttribute")if(p.data&&p.data.estree&&d.evaluater){const w=p.data.estree.body[0];w.type;const h=w.expression;h.type;const b=h.properties[0];b.type,Object.assign(f,d.evaluater.evaluateExpression(b.argument))}else Fn(d,u.position);else{const w=p.name;let h;if(p.value&&typeof p.value=="object")if(p.value.data&&p.value.data.estree&&d.evaluater){const b=p.value.data.estree.body[0];b.type,h=d.evaluater.evaluateExpression(b.expression)}else Fn(d,u.position);else h=p.value===null||p.value;f[w]=h}return f}(r,o),c=Ko(r,o);return sl(r,A,l,o),Yo(A,c),r.ancestors.pop(),r.schema=s,r.create(o,l,A,i)}(e,t,n):t.type==="mdxjsEsm"?function(r,o){if(o.data&&o.data.estree&&r.evaluater)return r.evaluater.evaluateProgram(o.data.estree);Fn(r,o.position)}(e,t):t.type==="root"?function(r,o,i){const s={};return Yo(s,Ko(r,o)),r.create(o,r.Fragment,s,i)}(e,t,n):t.type==="text"?function(r,o){return o.value}(0,t):void 0}function sl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yo(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ko(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:mp;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const A=o.get(l)||0;s=l+"-"+A,o.set(l,A+1)}}const a=il(e,i,s);a!==void 0&&n.push(a)}return n}function kp(e,t,n){const r=function(o,i){const s=No(i);let a=i,l=tt;if(s in o.normal)return o.property[o.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&Kf.test(i)){if(i.charAt(4)==="-"){const A=i.slice(5).replace(Ka,Jf);a="data"+A.charAt(0).toUpperCase()+A.slice(1)}else{const A=i.slice(4);if(!Ka.test(A)){let c=A.replace(Yf,Xf);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}l=zo}return new l(a,i)}(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(o){const i={};return(o[o.length-1]===""?[...o,""]:o).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}(n):n.join(" ").trim()),r.property==="style"){let o=typeof n=="object"?n:function(i,s){try{return gp(s,{reactCompat:!0})}catch(a){if(i.ignoreInvalidStyle)return{};const l=a,A=new Ge("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw A.file=i.filePath||void 0,A.url=ol+"#cannot-parse-style-attribute",A}}(e,String(n));return e.stylePropertyNameCase==="css"&&(o=function(i){const s={};let a;for(a in i)Vo.call(i,a)&&(s[xp(a)]=i[a]);return s}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Vf[r.property]||r.property:r.attribute,n]}}function al(e,t,n){let r;if(n)if(t.includes(".")){const o=t.split(".");let i,s=-1;for(;++s<o.length;){const a=Ha(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};i=i?{type:"MemberExpression",object:i,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=i}else r=Ha(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Vo.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fn(e)}function Fn(e,t){const n=new Ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ol+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xp(e){let t=e.replace(yp,Ep);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ep(e){return"-"+e.toLowerCase()}const Xo={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wr={};function Jo(e,t){return ll(e,typeof wr.includeImageAlt!="boolean"||wr.includeImageAlt,typeof wr.includeHtml!="boolean"||wr.includeHtml)}function ll(e,t,n){if(function(r){return!!(r&&typeof r=="object")}(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 cl(e.children,t,n)}return Array.isArray(e)?cl(e,t,n):""}function cl(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ll(e[o],t,n);return r.join("")}const Al=document.createElement("i");function Zo(e){const t="&"+e+";";Al.innerHTML=t;const n=Al.textContent;return(n.charCodeAt(n.length-1)!==59||e==="semi")&&n!==t&&n}function At(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function pt(e,t){return e.length>0?(At(e,e.length,0,t),e):t}const ul={}.hasOwnProperty;function dl(e){const t={};let n=-1;for(;++n<e.length;)Cp(t,e[n]);return t}function Cp(e,t){let n;for(n in t){const r=(ul.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){ul.call(r,i)||(r[i]=[]);const s=o[i];Sp(r[i],Array.isArray(s)?s:s?[s]:[])}}}function Sp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);At(e,0,0,r)}function fl(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||!(65535&~n)||(65535&n)==65534||n>1114111?"๏ฟฝ":String.fromCodePoint(n)}function mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ke=zt(/[A-Za-z]/),Ve=zt(/[\dA-Za-z]/),Pp=zt(/[#-'*+\--9=?A-Z^-~]/);function br(e){return e!==null&&(e<32||e===127)}const $o=zt(/\d/),Dp=zt(/[\dA-Fa-f]/),Ip=zt(/[!-/:-@[-`{-~]/);function ee(e){return e!==null&&e<-2}function be(e){return e!==null&&(e<0||e===32)}function ce(e){return e===-2||e===-1||e===32}const kr=zt(new RegExp("\\p{P}|\\p{S}","u")),nn=zt(/\s/);function zt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function mn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&Ve(e.charCodeAt(n+1))&&Ve(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const a=e.charCodeAt(n+1);i<56320&&a>56319&&a<57344?(s=String.fromCharCode(i,a),o=1):s="๏ฟฝ"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function ue(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(a){return ce(a)?(e.enter(n),s(a)):t(a)};function s(a){return ce(a)&&i++<o?(e.consume(a),s):(e.exit(n),t(a))}}const Bp={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(i){return i===null?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ue(e,t,"linePrefix"))},function(i){return e.enter("paragraph"),r(i)});let n;return t;function r(i){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(i)}function o(i){return i===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(i)):ee(i)?(e.consume(i),e.exit("chunkText"),r):(e.consume(i),o)}}},Tp={tokenize:function(e){const t=this,n=[];let r,o,i,s=0;return a;function a(g){if(s<n.length){const k=n[s];return t.containerState=k[1],e.attempt(k[0].continuation,l,A)(g)}return A(g)}function l(g){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&x();const k=t.events.length;let S,E=k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){S=t.events[E][1].end;break}b(s);let B=k;for(;B<t.events.length;)t.events[B][1].end={...S},B++;return At(t.events,E+1,0,t.events.slice(k)),t.events.length=B,A(g)}return a(g)}function A(g){if(s===n.length){if(!r)return u(g);if(r.currentConstruct&&r.currentConstruct.concrete)return p(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pl,c,d)(g)}function c(g){return r&&x(),b(s),u(g)}function d(g){return t.parser.lazy[t.now().line]=s!==n.length,i=t.now().offset,p(g)}function u(g){return t.containerState={},e.attempt(pl,f,p)(g)}function f(g){return s++,n.push([t.currentConstruct,t.containerState]),u(g)}function p(g){return g===null?(r&&x(),b(0),void e.consume(g)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),w(g))}function w(g){return g===null?(h(e.exit("chunkFlow"),!0),b(0),void e.consume(g)):ee(g)?(e.consume(g),h(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(g),w)}function h(g,k){const S=t.sliceStream(g);if(k&&S.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(S),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const B=t.events.length;let C,M,T=B;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(C){M=t.events[T][1].end;break}C=!0}for(b(s),E=B;E<t.events.length;)t.events[E][1].end={...M},E++;At(t.events,T+1,0,t.events.slice(B)),t.events.length=E}}function b(g){let k=n.length;for(;k-- >g;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=g}function x(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},pl={tokenize:function(e,t,n){return ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function yn(e){return e===null||be(e)||nn(e)?1:kr(e)?2:void 0}function xr(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const ei={name:"attention",resolveAll:function(e,t){let n,r,o,i,s,a,l,A,c=-1;for(;++c<e.length;)if(e[c][0]==="enter"&&e[c][1].type==="attentionSequence"&&e[c][1]._close){for(n=c;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d={...e[n][1].end},u={...e[c][1].start};hl(d,-a),hl(u,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:u},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[n][1].end={...i.start},e[c][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=pt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=pt(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=pt(l,xr(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=pt(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,l=pt(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,At(e,n-1,c-n+3,l),c=n+l.length-A-2;break}}for(c=-1;++c<e.length;)e[c][1].type==="attentionSequence"&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=yn(r);let i;return function(a){return i=a,e.enter("attentionSequence"),s(a)};function s(a){if(a===i)return e.consume(a),s;const l=e.exit("attentionSequence"),A=yn(a),c=!A||A===2&&o||n.includes(a),d=!o||o===2&&A||n.includes(r);return l._open=!!(i===42?c:c&&(o||!d)),l._close=!!(i===42?d:d&&(A||!c)),t(a)}}};function hl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Mp={name:"autolink",tokenize:function(e,t,n){let r=0;return function(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(u){return Ke(u)?(e.consume(u),i):u===64?n(u):l(u)}function i(u){return u===43||u===45||u===46||Ve(u)?(r=1,s(u)):l(u)}function s(u){return u===58?(e.consume(u),r=0,a):(u===43||u===45||u===46||Ve(u))&&r++<32?(e.consume(u),s):(r=0,l(u))}function a(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||br(u)?n(u):(e.consume(u),a)}function l(u){return u===64?(e.consume(u),A):Pp(u)?(e.consume(u),l):n(u)}function A(u){return Ve(u)?c(u):n(u)}function c(u){return u===46?(e.consume(u),r=0,A):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):d(u)}function d(u){if((u===45||Ve(u))&&r++<63){const f=u===45?d:c;return e.consume(u),f}return n(u)}}},Hn={partial:!0,tokenize:function(e,t,n){return function(o){return ce(o)?ue(e,r,"linePrefix")(o):r(o)};function r(o){return o===null||ee(o)?t(o):n(o)}}},gl={continuation:{tokenize:function(e,t,n){const r=this;return function(i){return ce(i)?ue(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)};function o(i){return e.attempt(gl,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(i){if(i===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return n(i)};function o(i){return ce(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}},ml={name:"characterEscape",tokenize:function(e,t,n){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r};function r(o){return Ip(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}},yl={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,s=0;return function(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a};function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=Ve,A(c))}function l(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Dp,A):(e.enter("characterReferenceValue"),o=7,i=$o,A(c))}function A(c){if(c===59&&s){const d=e.exit("characterReferenceValue");return i!==Ve||Zo(r.sliceSerialize(d))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(c)}return i(c)&&s++<o?(e.consume(c),A):n(c)}}},vl={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},wl={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(g,k,S){let E=0;return B;function B(I){return g.enter("lineEnding"),g.consume(I),g.exit("lineEnding"),C}function C(I){return g.enter("codeFencedFence"),ce(I)?ue(g,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):M(I)}function M(I){return I===i?(g.enter("codeFencedFenceSequence"),T(I)):S(I)}function T(I){return I===i?(E++,g.consume(I),T):E>=a?(g.exit("codeFencedFenceSequence"),ce(I)?ue(g,Q,"whitespace")(I):Q(I)):S(I)}function Q(I){return I===null||ee(I)?(g.exit("codeFencedFence"),k(I)):S(I)}}};let i,s=0,a=0;return function(g){return function(k){const S=r.events[r.events.length-1];return s=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,i=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(k)}(g)};function l(g){return g===i?(a++,e.consume(g),l):a<3?n(g):(e.exit("codeFencedFenceSequence"),ce(g)?ue(e,A,"whitespace")(g):A(g))}function A(g){return g===null||ee(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(vl,f,x)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(g))}function c(g){return g===null||ee(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(g)):ce(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ue(e,d,"whitespace")(g)):g===96&&g===i?n(g):(e.consume(g),c)}function d(g){return g===null||ee(g)?A(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===null||ee(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(g)):g===96&&g===i?n(g):(e.consume(g),u)}function f(g){return e.attempt(o,x,p)(g)}function p(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),w}function w(g){return s>0&&ce(g)?ue(e,h,"linePrefix",s+1)(g):h(g)}function h(g){return g===null||ee(g)?e.check(vl,f,x)(g):(e.enter("codeFlowValue"),b(g))}function b(g){return g===null||ee(g)?(e.exit("codeFlowValue"),h(g)):(e.consume(g),b)}function x(g){return e.exit("codeFenced"),t(g)}}},ti={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(l){return e.enter("codeIndented"),ue(e,o,"linePrefix",5)(l)};function o(l){const A=r.events[r.events.length-1];return A&&A[1].type==="linePrefix"&&A[2].sliceSerialize(A[1],!0).length>=4?i(l):n(l)}function i(l){return l===null?a(l):ee(l)?e.attempt(Qp,i,a)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||ee(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),s)}function a(l){return e.exit("codeIndented"),t(l)}}},Qp={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):ue(e,i,"linePrefix",5)(s)}function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):ee(s)?o(s):n(s)}}},Op={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,n,r=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[r][1].type!=="lineEnding"&&e[r][1].type!=="space")){for(t=o;++t<r;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}}for(t=o-1,r++;++t<=r;)n===void 0?t!==r&&e[t][1].type!=="lineEnding"&&(n=t):t!==r&&e[t][1].type!=="lineEnding"||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)};function s(c){return c===96?(e.consume(c),i++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(o=e.enter("codeTextSequence"),r=0,A(c)):ee(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(c))}function l(c){return c===null||c===32||c===96||ee(c)?(e.exit("codeTextData"),a(c)):(e.consume(c),l)}function A(c){return c===96?(e.consume(c),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",l(c))}}};class _p{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Rn(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Rn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Rn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Rn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Rn(this.left,n.reverse())}}}function Rn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function bl(e){const t={};let n,r,o,i,s,a,l,A=-1;const c=new _p(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&n[1].type==="chunkFlow"&&c.get(A-1)[1].type==="listItemPrefix"&&(a=n[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Lp(c,A)),A=t[A],l=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if(i[1].type!=="linePrefix"&&i[1].type!=="listItemIndent")break;r&&(n[1].end={...c.get(r)[1].start},s=c.slice(r,A),s.unshift(n),c.splice(r,A-r+1,s))}}return At(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function Lp(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],A={};let c,d,u=-1,f=n,p=0,w=0;const h=[w];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++u<a.length;)a[u][0]==="exit"&&a[u-1][0]==="enter"&&a[u][1].type===a[u-1][1].type&&a[u][1].start.line!==a[u][1].end.line&&(w=u+1,h.push(w),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),u=h.length;u--;){const b=a.slice(h[u],h[u+1]),x=i.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),u=-1;++u<l.length;)A[p+l[u][0]]=p+l[u][1],p+=l[u][1]-l[u][0]-1;return A}const Np={resolve:function(e){return bl(e),e},tokenize:function(e,t){let n;return function(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(s)};function r(s){return s===null?o(s):ee(s)?e.check(Fp,i,o)(s):(e.consume(s),r)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Fp={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ue(e,o,"linePrefix")};function o(i){if(i===null||ee(i))return n(i);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function kl(e,t,n,r,o,i,s,a,l){const A=l||Number.POSITIVE_INFINITY;let c=0;return function(h){return h===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(h),e.exit(i),d):h===null||h===32||h===41||br(h)?n(h):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(h))};function d(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===62?(e.exit("chunkString"),e.exit(a),d(h)):h===null||h===60||ee(h)?n(h):(e.consume(h),h===92?f:u)}function f(h){return h===60||h===62||h===92?(e.consume(h),u):u(h)}function p(h){return c||h!==null&&h!==41&&!be(h)?c<A&&h===40?(e.consume(h),c++,p):h===41?(e.consume(h),c--,p):h===null||h===32||h===40||br(h)?n(h):(e.consume(h),h===92?w:p):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(h))}function w(h){return h===40||h===41||h===92?(e.consume(h),p):p(h)}}function xl(e,t,n,r,o,i){const s=this;let a,l=0;return function(u){return e.enter(r),e.enter(o),e.consume(u),e.exit(o),e.enter(i),A};function A(u){return l>999||u===null||u===91||u===93&&!a||u===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(u):u===93?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):ee(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(u){return u===null||u===91||u===93||ee(u)||l++>999?(e.exit("chunkString"),A(u)):(e.consume(u),a||(a=!ce(u)),u===92?d:c)}function d(u){return u===91||u===92||u===93?(e.consume(u),l++,c):c(u)}}function El(e,t,n,r,o,i){let s;return function(d){return d===34||d===39||d===40?(e.enter(r),e.enter(o),e.consume(d),e.exit(o),s=d===40?41:d,a):n(d)};function a(d){return d===s?(e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):(e.enter(i),l(d))}function l(d){return d===s?(e.exit(i),a(s)):d===null?n(d):ee(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ue(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(d))}function A(d){return d===s||d===null||ee(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?c:A)}function c(d){return d===s||d===92?(e.consume(d),A):A(d)}}function zn(e,t){let n;return function r(o){return ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ce(o)?ue(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Hp={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(d){return e.enter("definition"),function(u){return xl.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}(d)};function i(d){return o=mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),s):n(d)}function s(d){return be(d)?zn(e,a)(d):a(d)}function a(d){return kl(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function l(d){return e.attempt(Rp,A,A)(d)}function A(d){return ce(d)?ue(e,c,"whitespace")(d):c(d)}function c(d){return d===null||ee(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}},Rp={partial:!0,tokenize:function(e,t,n){return function(s){return be(s)?zn(e,r)(s):n(s)};function r(s){return El(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ce(s)?ue(e,i,"whitespace")(s):i(s)}function i(s){return s===null||ee(s)?t(s):n(s)}}},zp={name:"hardBreakEscape",tokenize:function(e,t,n){return function(o){return e.enter("hardBreakEscape"),e.consume(o),r};function r(o){return ee(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}},Up={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return e[i][1].type==="whitespace"&&(i+=2),o-2>i&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(i===o-1||o-4>i&&e[o-2][1].type==="whitespace")&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},At(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(l){return e.enter("atxHeading"),function(A){return e.enter("atxHeadingSequence"),o(A)}(l)};function o(l){return l===35&&r++<6?(e.consume(l),o):l===null||be(l)?(e.exit("atxHeadingSequence"),i(l)):n(l)}function i(l){return l===35?(e.enter("atxHeadingSequence"),s(l)):l===null||ee(l)?(e.exit("atxHeading"),t(l)):ce(l)?ue(e,i,"whitespace")(l):(e.enter("atxHeadingText"),a(l))}function s(l){return l===35?(e.consume(l),s):(e.exit("atxHeadingSequence"),i(l))}function a(l){return l===null||l===35||be(l)?(e.exit("atxHeadingText"),i(l)):(e.consume(l),a)}}},jp=["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"],Cl=["pre","script","style","textarea"],qp={concrete:!0,name:"htmlFlow",resolveTo:function(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},tokenize:function(e,t,n){const r=this;let o,i,s,a,l;return function(y){return function(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),A}(y)};function A(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),i=!0,f):y===63?(e.consume(y),o=3,r.interrupt?t:H):Ke(y)?(e.consume(y),s=String.fromCharCode(y),p):n(y)}function c(y){return y===45?(e.consume(y),o=2,d):y===91?(e.consume(y),o=5,a=0,u):Ke(y)?(e.consume(y),o=4,r.interrupt?t:H):n(y)}function d(y){return y===45?(e.consume(y),r.interrupt?t:H):n(y)}function u(y){return y==="CDATA[".charCodeAt(a++)?(e.consume(y),a===6?r.interrupt?t:T:u):n(y)}function f(y){return Ke(y)?(e.consume(y),s=String.fromCharCode(y),p):n(y)}function p(y){if(y===null||y===47||y===62||be(y)){const V=y===47,X=s.toLowerCase();return V||i||!Cl.includes(X)?jp.includes(s.toLowerCase())?(o=6,V?(e.consume(y),w):r.interrupt?t(y):T(y)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):i?h(y):b(y)):(o=1,r.interrupt?t(y):T(y))}return y===45||Ve(y)?(e.consume(y),s+=String.fromCharCode(y),p):n(y)}function w(y){return y===62?(e.consume(y),r.interrupt?t:T):n(y)}function h(y){return ce(y)?(e.consume(y),h):C(y)}function b(y){return y===47?(e.consume(y),C):y===58||y===95||Ke(y)?(e.consume(y),x):ce(y)?(e.consume(y),b):C(y)}function x(y){return y===45||y===46||y===58||y===95||Ve(y)?(e.consume(y),x):g(y)}function g(y){return y===61?(e.consume(y),k):ce(y)?(e.consume(y),g):b(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),l=y,S):ce(y)?(e.consume(y),k):E(y)}function S(y){return y===l?(e.consume(y),l=null,B):y===null||ee(y)?n(y):(e.consume(y),S)}function E(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||be(y)?g(y):(e.consume(y),E)}function B(y){return y===47||y===62||ce(y)?b(y):n(y)}function C(y){return y===62?(e.consume(y),M):n(y)}function M(y){return y===null||ee(y)?T(y):ce(y)?(e.consume(y),M):n(y)}function T(y){return y===45&&o===2?(e.consume(y),z):y===60&&o===1?(e.consume(y),L):y===62&&o===4?(e.consume(y),m):y===63&&o===3?(e.consume(y),H):y===93&&o===5?(e.consume(y),F):!ee(y)||o!==6&&o!==7?y===null||ee(y)?(e.exit("htmlFlowData"),Q(y)):(e.consume(y),T):(e.exit("htmlFlowData"),e.check(Wp,W,Q)(y))}function Q(y){return e.check(Gp,I,W)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),O}function O(y){return y===null||ee(y)?Q(y):(e.enter("htmlFlowData"),T(y))}function z(y){return y===45?(e.consume(y),H):T(y)}function L(y){return y===47?(e.consume(y),s="",_):T(y)}function _(y){if(y===62){const V=s.toLowerCase();return Cl.includes(V)?(e.consume(y),m):T(y)}return Ke(y)&&s.length<8?(e.consume(y),s+=String.fromCharCode(y),_):T(y)}function F(y){return y===93?(e.consume(y),H):T(y)}function H(y){return y===62?(e.consume(y),m):y===45&&o===2?(e.consume(y),H):T(y)}function m(y){return y===null||ee(y)?(e.exit("htmlFlowData"),W(y)):(e.consume(y),m)}function W(y){return e.exit("htmlFlow"),t(y)}}},Wp={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Hn,t,n)}}},Gp={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return ee(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):n(i)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},Vp={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,s;return function(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),a};function a(m){return m===33?(e.consume(m),l):m===47?(e.consume(m),k):m===63?(e.consume(m),x):Ke(m)?(e.consume(m),B):n(m)}function l(m){return m===45?(e.consume(m),A):m===91?(e.consume(m),i=0,f):Ke(m)?(e.consume(m),b):n(m)}function A(m){return m===45?(e.consume(m),u):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),d):ee(m)?(s=c,_(m)):(e.consume(m),c)}function d(m){return m===45?(e.consume(m),u):c(m)}function u(m){return m===62?L(m):m===45?d(m):c(m)}function f(m){return m==="CDATA[".charCodeAt(i++)?(e.consume(m),i===6?p:f):n(m)}function p(m){return m===null?n(m):m===93?(e.consume(m),w):ee(m)?(s=p,_(m)):(e.consume(m),p)}function w(m){return m===93?(e.consume(m),h):p(m)}function h(m){return m===62?L(m):m===93?(e.consume(m),h):p(m)}function b(m){return m===null||m===62?L(m):ee(m)?(s=b,_(m)):(e.consume(m),b)}function x(m){return m===null?n(m):m===63?(e.consume(m),g):ee(m)?(s=x,_(m)):(e.consume(m),x)}function g(m){return m===62?L(m):x(m)}function k(m){return Ke(m)?(e.consume(m),S):n(m)}function S(m){return m===45||Ve(m)?(e.consume(m),S):E(m)}function E(m){return ee(m)?(s=E,_(m)):ce(m)?(e.consume(m),E):L(m)}function B(m){return m===45||Ve(m)?(e.consume(m),B):m===47||m===62||be(m)?C(m):n(m)}function C(m){return m===47?(e.consume(m),L):m===58||m===95||Ke(m)?(e.consume(m),M):ee(m)?(s=C,_(m)):ce(m)?(e.consume(m),C):L(m)}function M(m){return m===45||m===46||m===58||m===95||Ve(m)?(e.consume(m),M):T(m)}function T(m){return m===61?(e.consume(m),Q):ee(m)?(s=T,_(m)):ce(m)?(e.consume(m),T):C(m)}function Q(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),o=m,I):ee(m)?(s=Q,_(m)):ce(m)?(e.consume(m),Q):(e.consume(m),O)}function I(m){return m===o?(e.consume(m),o=void 0,z):m===null?n(m):ee(m)?(s=I,_(m)):(e.consume(m),I)}function O(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||be(m)?C(m):(e.consume(m),O)}function z(m){return m===47||m===62||be(m)?C(m):n(m)}function L(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function _(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),F}function F(m){return ce(m)?ue(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):H(m)}function H(m){return e.enter("htmlTextData"),s(m)}}},ni={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&At(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[s][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(o){if(e[s][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=s,n.type!=="labelLink")){a=2;break}}else n.type==="labelEnd"&&(o=s);const l={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},A={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",A,t]],i=pt(i,e.slice(r+1,r+a+3)),i=pt(i,[["enter",c,t]]),i=pt(i,xr(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=pt(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=pt(i,e.slice(o+1)),i=pt(i,[["exit",l,t]]),At(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,s=r.events.length;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return function(d){return o?o._inactive?c(d):(i=r.parser.defined.includes(mt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),a):n(d)};function a(d){return d===40?e.attempt(Yp,A,i?A:c)(d):d===91?e.attempt(Kp,A,i?l:c)(d):i?A(d):c(d)}function l(d){return e.attempt(Xp,A,c)(d)}function A(d){return t(d)}function c(d){return o._balanced=!0,n(d)}}},Yp={tokenize:function(e,t,n){return function(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),r};function r(c){return be(c)?zn(e,o)(c):o(c)}function o(c){return c===41?A(c):kl(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function i(c){return be(c)?zn(e,a)(c):A(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?El(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):A(c)}function l(c){return be(c)?zn(e,A)(c):A(c)}function A(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}},Kp={tokenize:function(e,t,n){const r=this;return function(s){return xl.call(r,e,o,i,"reference","referenceMarker","referenceString")(s)};function o(s){return r.parser.defined.includes(mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function i(s){return n(s)}}},Xp={tokenize:function(e,t,n){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r};function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}},Jp={name:"labelStartImage",resolveAll:ni.resolveAll,tokenize:function(e,t,n){const r=this;return function(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o};function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):n(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}},Zp={name:"labelStartLink",resolveAll:ni.resolveAll,tokenize:function(e,t,n){const r=this;return function(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o};function o(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}},ri={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ue(e,t,"linePrefix")}}},Er={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(a){return e.enter("thematicBreak"),function(l){return r=l,i(l)}(a)};function i(a){return a===r?(e.enter("thematicBreakSequence"),s(a)):o>=3&&(a===null||ee(a))?(e.exit("thematicBreak"),t(a)):n(a)}function s(a){return a===r?(e.consume(a),o++,s):(e.exit("thematicBreakSequence"),ce(a)?ue(e,i,"whitespace")(a):i(a))}}},nt={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Hn,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ue(e,t,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!ce(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(eh,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ue(e,e.attempt(nt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return function(u){const f=r.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!r.containerState.marker||u===r.containerState.marker:$o(u)){if(r.containerState.type||(r.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(Er,n,l)(u):l(u);if(!r.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(u)}return n(u)};function a(u){return $o(u)&&++s<10?(e.consume(u),a):(!r.interrupt||s<2)&&(r.containerState.marker?u===r.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),l(u)):n(u)}function l(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||u,e.check(Hn,r.interrupt?n:A,e.attempt($p,d,c))}function A(u){return r.containerState.initialBlankLine=!0,i++,d(u)}function c(u){return ce(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),d):n(u)}function d(u){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}},$p={partial:!0,tokenize:function(e,t,n){const r=this;return ue(e,function(o){const i=r.events[r.events.length-1];return!ce(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):n(o)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},eh={partial:!0,tokenize:function(e,t,n){const r=this;return ue(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(o):n(o)},"listItemIndent",r.containerState.size+1)}},Sl={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){n=i;break}e[i][1].type==="paragraph"&&(r=i)}else e[i][1].type==="content"&&e.splice(i,1),o||e[i][1].type!=="definition"||(o=i);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(a){let l,A=r.events.length;for(;A--;)if(r.events[A][1].type!=="lineEnding"&&r.events[A][1].type!=="linePrefix"&&r.events[A][1].type!=="content"){l=r.events[A][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||l)?(e.enter("setextHeadingLine"),o=a,function(c){return e.enter("setextHeadingLineSequence"),i(c)}(a)):n(a)};function i(a){return a===o?(e.consume(a),i):(e.exit("setextHeadingLineSequence"),ce(a)?ue(e,s,"lineSuffix")(a):s(a))}function s(a){return a===null||ee(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}},th={tokenize:function(e){const t=this,n=e.attempt(Hn,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,ue(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Np,r)),"linePrefix")));return n;function r(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(o)}}},nh={resolveAll:Dl()},rh=Pl("string"),oh=Pl("text");function Pl(e){return{resolveAll:Dl(e==="text"?ih:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,s);return i;function i(A){return l(A)?o(A):s(A)}function s(A){if(A!==null)return t.enter("data"),t.consume(A),a;t.consume(A)}function a(A){return l(A)?(t.exit("data"),o(A)):(t.consume(A),a)}function l(A){if(A===null)return!0;const c=r[A];let d=-1;if(c)for(;++d<c.length;){const u=c[d];if(!u.previous||u.previous.call(n,n.previous))return!0}return!1}}}}function Dl(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)r===void 0?t[o]&&t[o][1].type==="data"&&(r=o,o++):t[o]&&t[o][1].type==="data"||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function ih(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],o=t.sliceStream(r);let i,s=o.length,a=-1,l=0;for(;s--;){const A=o[s];if(typeof A=="string"){for(a=A.length;A.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(A===-2)i=!0,l++;else if(A!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const A={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...A.start},r.start.offset===r.end.offset?Object.assign(r,A):(e.splice(n,0,["enter",A,t],["exit",A,t]),n+=2)}n++}return e}var sh=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Hp},disable:{null:[]},document:{42:nt,43:nt,45:nt,48:nt,49:nt,50:nt,51:nt,52:nt,53:nt,54:nt,55:nt,56:nt,57:nt,62:gl},flow:{35:Up,42:Er,45:[Sl,Er],60:qp,61:Sl,95:Er,96:wl,126:wl},flowInitial:{[-2]:ti,[-1]:ti,32:ti},insideSpan:{null:[ei,nh]},string:{38:yl,92:ml},text:{[-5]:ri,[-4]:ri,[-3]:ri,33:Jp,38:yl,42:ei,60:[Mp,Vp],91:Zp,92:[zp,ml],93:ni,95:ei,96:Op}});function ah(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let s=[],a=[];const l={attempt:h(function(g,k){b(g,k.from)}),check:h(w),consume:function(g){ee(g)?(r.line++,r.column=1,r.offset+=g===-3?2:1,x()):g!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),A.previous=g},enter:function(g,k){const S=k||{};return S.type=g,S.start=u(),A.events.push(["enter",S,A]),a.push(S),S},exit:function(g){const k=a.pop();return k.end=u(),A.events.push(["exit",k,A]),k},interrupt:h(w,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(g){o[g.line]=g.column,x()},events:[],now:u,parser:e,previous:null,sliceSerialize:function(g,k){return function(S,E){let B=-1;const C=[];let M;for(;++B<S.length;){const T=S[B];let Q;if(typeof T=="string")Q=T;else switch(T){case-5:Q="\r";break;case-4:Q=`
|
|
35
|
+
`;break;case-3:Q=`\r
|
|
36
|
+
`;break;case-2:Q=E?" ":" ";break;case-1:if(!E&&M)continue;Q=" ";break;default:Q=String.fromCharCode(T)}M=T===-2,C.push(Q)}return C.join("")}(d(g),k)},sliceStream:d,write:function(g){return s=pt(s,g),f(),s[s.length-1]!==null?[]:(b(t,0),A.events=xr(i,A.events,A),A.events)}};let c=t.tokenize.call(A,l);return t.resolveAll&&i.push(t),A;function d(g){return function(k,S){const E=S.start._index,B=S.start._bufferIndex,C=S.end._index,M=S.end._bufferIndex;let T;if(E===C)T=[k[E].slice(B,M)];else{if(T=k.slice(E,C),B>-1){const Q=T[0];typeof Q=="string"?T[0]=Q.slice(B):T.shift()}M>0&&T.push(k[C].slice(0,M))}return T}(s,g)}function u(){const{_bufferIndex:g,_index:k,line:S,column:E,offset:B}=r;return{_bufferIndex:g,_index:k,line:S,column:E,offset:B}}function f(){let g;for(;r._index<s.length;){const k=s[r._index];if(typeof k=="string")for(g=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===g&&r._bufferIndex<k.length;)p(k.charCodeAt(r._bufferIndex));else p(k)}}function p(g){c=c(g)}function w(g,k){k.restore()}function h(g,k){return function(S,E,B){let C,M,T,Q;return Array.isArray(S)?I(S):"tokenize"in S?I([S]):function(_){return F;function F(H){const m=H!==null&&_[H],W=H!==null&&_.null;return I([...Array.isArray(m)?m:m?[m]:[],...Array.isArray(W)?W:W?[W]:[]])(H)}}(S);function I(_){return C=_,M=0,_.length===0?B:O(_[M])}function O(_){return function(F){return Q=function(){const H=u(),m=A.previous,W=A.currentConstruct,y=A.events.length,V=Array.from(a);return{from:y,restore:X};function X(){r=H,A.previous=m,A.currentConstruct=W,A.events.length=y,a=V,x()}}(),T=_,_.partial||(A.currentConstruct=_),_.name&&A.parser.constructs.disable.null.includes(_.name)?L():_.tokenize.call(k?Object.assign(Object.create(A),k):A,l,z,L)(F)}}function z(_){return g(T,Q),E}function L(_){return Q.restore(),++M<C.length?O(C[M]):B}}}function b(g,k){g.resolveAll&&!i.includes(g)&&i.push(g),g.resolve&&At(A.events,k,A.events.length-k,g.resolve(A.events.slice(k),A)),g.resolveTo&&(A.events=g.resolveTo(A.events,A))}function x(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Il=/[\0\t\n\r]/g,lh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ch(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return fl(n.slice(o?2:1),o?16:10)}return Zo(n)||e}const Bl={}.hasOwnProperty;function Ah(e,t,n){return typeof t!="string"&&(n=t,t=void 0),function(r){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(rt),autolinkProtocol:I,autolinkEmail:I,atxHeading:l(Ie),blockQuote:l(fe),characterEscape:I,characterReference:I,codeFenced:l(oe),codeFencedFenceInfo:A,codeFencedFenceMeta:A,codeIndented:l(oe,A),codeText:l(ve,A),codeTextData:I,data:I,codeFlowValue:I,definition:l(me),definitionDestinationString:A,definitionLabelString:A,definitionTitleString:A,emphasis:l(ge),hardBreakEscape:l(Oe),hardBreakTrailing:l(Oe),htmlFlow:l(Dt,A),htmlFlowData:I,htmlText:l(Dt,A),htmlTextData:I,image:l(Me),label:A,link:l(rt),listItem:l(yt),listItemValue:w,listOrdered:l(ke,p),listUnordered:l(ke),paragraph:l(qt),reference:he,referenceString:A,resourceDestinationString:A,resourceTitleString:A,setextHeading:l(Ie),strong:l(Wt),thematicBreak:l(ot)},exit:{atxHeading:d(),atxHeadingSequence:C,autolink:d(),autolinkEmail:K,autolinkProtocol:G,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:Je,characterReferenceMarkerNumeric:Je,characterReferenceValue:Qe,characterReference:He,codeFenced:d(g),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:O,codeIndented:d(k),codeText:d(H),codeTextData:O,data:O,definition:d(),definitionDestinationString:B,definitionLabelString:S,definitionTitleString:E,emphasis:d(),hardBreakEscape:d(L),hardBreakTrailing:d(L),htmlFlow:d(_),htmlFlowData:O,htmlText:d(F),htmlTextData:O,image:d(W),label:V,labelText:y,lineEnding:z,link:d(m),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ae,resourceDestinationString:X,resourceTitleString:Z,resource:$,setextHeading:d(Q),setextHeadingLineSequence:T,setextHeadingText:M,strong:d(),thematicBreak:d()}};Tl(o,(r||{}).mdastExtensions||[]);const i={};return s;function s(P){let R={type:"root",children:[]};const N={stack:[R],tokenStack:[],config:o,enter:c,exit:u,buffer:A,resume:f,data:i},J=[];let q=-1;for(;++q<P.length;)(P[q][1].type==="listOrdered"||P[q][1].type==="listUnordered")&&(P[q][0]==="enter"?J.push(q):q=a(P,J.pop(),q));for(q=-1;++q<P.length;){const pe=o[P[q][0]];Bl.call(pe,P[q][1].type)&&pe[P[q][1].type].call(Object.assign({sliceSerialize:P[q][2].sliceSerialize},N),P[q][1])}if(N.tokenStack.length>0){const pe=N.tokenStack[N.tokenStack.length-1];(pe[1]||Ml).call(N,void 0,pe[0])}for(R.position={start:Ut(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Ut(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<o.transforms.length;)R=o.transforms[q](R)||R;return R}function a(P,R,N){let J,q,pe,we,le=R-1,Se=-1,Be=!1;for(;++le<=N;){const ne=P[le];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ne[0]==="enter"?Se++:Se--,we=void 0;break;case"lineEndingBlank":ne[0]==="enter"&&(!J||we||Se||pe||(pe=le),we=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:we=void 0}if(!Se&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||Se===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(J){let _e=le;for(q=void 0;_e--;){const Pe=P[_e];if(Pe[1].type==="lineEnding"||Pe[1].type==="lineEndingBlank"){if(Pe[0]==="exit")continue;q&&(P[q][1].type="lineEndingBlank",Be=!0),Pe[1].type="lineEnding",q=_e}else if(Pe[1].type!=="linePrefix"&&Pe[1].type!=="blockQuotePrefix"&&Pe[1].type!=="blockQuotePrefixWhitespace"&&Pe[1].type!=="blockQuoteMarker"&&Pe[1].type!=="listItemIndent")break}pe&&(!q||pe<q)&&(J._spread=!0),J.end=Object.assign({},q?P[q][1].start:ne[1].end),P.splice(q||le,0,["exit",J,ne[2]]),le++,N++}if(ne[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};J=_e,P.splice(le,0,["enter",_e,ne[2]]),le++,N++,pe=void 0,we=!0}}}return P[R][1]._spread=Be,N}function l(P,R){return N;function N(J){c.call(this,P(J),J),R&&R.call(this,J)}}function A(){this.stack.push({type:"fragment",children:[]})}function c(P,R,N){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([R,N||void 0]),P.position={start:Ut(R.start),end:void 0}}function d(P){return R;function R(N){P&&P.call(this,N),u.call(this,N)}}function u(P,R){const N=this.stack.pop(),J=this.tokenStack.pop();if(!J)throw new Error("Cannot close `"+P.type+"` ("+Nn({start:P.start,end:P.end})+"): itโs not open");J[0].type!==P.type&&(R?R.call(this,P,J[0]):(J[1]||Ml).call(this,P,J[0])),N.position.end=Ut(P.end)}function f(){return Jo(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function w(P){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0)}function h(){const P=this.resume();this.stack[this.stack.length-1].lang=P}function b(){const P=this.resume();this.stack[this.stack.length-1].meta=P}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const P=this.resume();this.stack[this.stack.length-1].value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const P=this.resume();this.stack[this.stack.length-1].value=P.replace(/(\r?\n|\r)$/g,"")}function S(P){const R=this.resume(),N=this.stack[this.stack.length-1];N.label=R,N.identifier=mt(this.sliceSerialize(P)).toLowerCase()}function E(){const P=this.resume();this.stack[this.stack.length-1].title=P}function B(){const P=this.resume();this.stack[this.stack.length-1].url=P}function C(P){const R=this.stack[this.stack.length-1];if(!R.depth){const N=this.sliceSerialize(P).length;R.depth=N}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function T(P){this.stack[this.stack.length-1].depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function I(P){const R=this.stack[this.stack.length-1].children;let N=R[R.length-1];N&&N.type==="text"||(N=ht(),N.position={start:Ut(P.start),end:void 0},R.push(N)),this.stack.push(N)}function O(P){const R=this.stack.pop();R.value+=this.sliceSerialize(P),R.position.end=Ut(P.end)}function z(P){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak)return R.children[R.children.length-1].position.end=Ut(P.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(R.type)&&(I.call(this,P),O.call(this,P))}function L(){this.data.atHardBreak=!0}function _(){const P=this.resume();this.stack[this.stack.length-1].value=P}function F(){const P=this.resume();this.stack[this.stack.length-1].value=P}function H(){const P=this.resume();this.stack[this.stack.length-1].value=P}function m(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=R,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function W(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=R,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function y(P){const R=this.sliceSerialize(P),N=this.stack[this.stack.length-2];N.label=function(J){return J.replace(lh,ch)}(R),N.identifier=mt(R).toLowerCase()}function V(){const P=this.stack[this.stack.length-1],R=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const J=P.children;N.children=J}else N.alt=R}function X(){const P=this.resume();this.stack[this.stack.length-1].url=P}function Z(){const P=this.resume();this.stack[this.stack.length-1].title=P}function $(){this.data.inReference=void 0}function he(){this.data.referenceType="collapsed"}function Ae(P){const R=this.resume(),N=this.stack[this.stack.length-1];N.label=R,N.identifier=mt(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function Je(P){this.data.characterReferenceType=P.type}function Qe(P){const R=this.sliceSerialize(P),N=this.data.characterReferenceType;let J;N?(J=fl(R,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=Zo(R),this.stack[this.stack.length-1].value+=J}function He(P){this.stack.pop().position.end=Ut(P.end)}function G(P){O.call(this,P),this.stack[this.stack.length-1].url=this.sliceSerialize(P)}function K(P){O.call(this,P),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(P)}function fe(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function ve(){return{type:"inlineCode",value:""}}function me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function rt(){return{type:"link",title:null,url:"",children:[]}}function ke(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function yt(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function qt(){return{type:"paragraph",children:[]}}function Wt(){return{type:"strong",children:[]}}function ht(){return{type:"text",value:""}}function ot(){return{type:"thematicBreak"}}}(n)(function(r){for(;!bl(r););return r}(function(r){const o={constructs:dl([sh,...(r||{}).extensions||[]]),content:i(Bp),defined:[],document:i(Tp),flow:i(th),lazy:{},string:i(rh),text:i(oh)};return o;function i(s){return function(a){return ah(o,s,a)}}}(n).document().write(function(){let r,o=1,i="",s=!0;return function(a,l,A){const c=[];let d,u,f,p,w;for(a=i+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),f=0,i="",s&&(a.charCodeAt(0)===65279&&f++,s=void 0);f<a.length;){if(Il.lastIndex=f,d=Il.exec(a),p=d&&d.index!==void 0?d.index:a.length,w=a.charCodeAt(p),!d){i=a.slice(f);break}if(w===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(a.slice(f,p)),o+=p-f),w){case 0:c.push(65533),o++;break;case 9:for(u=4*Math.ceil(o/4),c.push(-2);o++<u;)c.push(-1);break;case 10:c.push(-4),o=1;break;default:r=!0,o=1}f=p+1}return A&&(r&&c.push(-5),i&&c.push(i),c.push(null)),c}}()(e,t,!0))))}function Ut(e){return{line:e.line,column:e.column,offset:e.offset}}function Tl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Tl(e,r):uh(e,r)}}function uh(e,t){let n;for(n in t)if(Bl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ml(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Nn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Nn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Nn({start:t.start,end:t.end})+") is still open")}function dh(e){const t=this;t.parser=function(n){return Ah(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ql(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 o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=r:o.push({type:"text",value:r}),o}function Ol(e){const t=e.spread;return t??e.children.length>1}function fh(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(_l(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(_l(t.slice(o),o>0,!1)),i.join("")}function _l(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===9||i===32;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const ph={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
37
|
+
`}]},code:function(e,t){const n=t.value?t.value+`
|
|
38
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=mn(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const A={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,A),e.applyData(t,A)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ql(e,t);const o={src:mn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:mn(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)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ql(e,t);const o={href:mn(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:mn(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(c){let d=!1;if(c.type==="list"){d=c.spread||!1;const u=c.children;let f=-1;for(;!d&&++f<u.length;)d=Ol(u[f])}return d}(n):Ol(t),i={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(o||a!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
39
|
+
`}),c.type!=="element"||c.tagName!=="p"||o?s.push(c):s.push(...c.children)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
|
|
40
|
+
`});const A={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const s=r[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),o.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Wo(t.children[1]),l=el(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),o.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,s=i?i.length:t.children.length;let a=-1;const l=[];for(;++a<s;){const c=t.children[a],d={},u=i?i[a]:void 0;u&&(d.align=u);let f={type:"element",tagName:o,properties:d,children:[]};c&&(f.children=e.all(c),e.patch(c,f),f=e.applyData(c,f)),l.push(f)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:fh(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Cr,yaml:Cr,definition:Cr,footnoteDefinition:Cr};function Cr(){}const Ll=typeof self=="object"?self:globalThis,Nl=e=>((t,n)=>{const r=(i,s)=>(t.set(s,i),i),o=i=>{if(t.has(i))return t.get(i);const[s,a]=n[i];switch(s){case 0:case-1:return r(a,i);case 1:{const l=r([],i);for(const A of a)l.push(o(A));return l}case 2:{const l=r({},i);for(const[A,c]of a)l[o(A)]=o(c);return l}case 3:return r(new Date(a),i);case 4:{const{source:l,flags:A}=a;return r(new RegExp(l,A),i)}case 5:{const l=r(new Map,i);for(const[A,c]of a)l.set(o(A),o(c));return l}case 6:{const l=r(new Set,i);for(const A of a)l.add(o(A));return l}case 7:{const{name:l,message:A}=a;return r(new Ll[l](A),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return r(new DataView(l),a)}}return r(new Ll[s](a),i)};return o})(new Map,e)(0),vn="",{toString:hh}={},{keys:gh}=Object,Un=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=hh.call(e).slice(8,-1);switch(n){case"Array":return[1,vn];case"Object":return[2,vn];case"Date":return[3,vn];case"RegExp":return[4,vn];case"Map":return[5,vn];case"Set":return[6,vn];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Sr=([e,t])=>e===0&&(t==="function"||t==="symbol"),Fl=(e,{json:t,lossy:n}={})=>{const r=[];return((o,i,s,a)=>{const l=(c,d)=>{const u=a.push(c)-1;return s.set(d,u),u},A=c=>{if(s.has(c))return s.get(c);let[d,u]=Un(c);switch(d){case 0:{let p=c;switch(u){case"bigint":d=8,p=c.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return l([-1],c)}return l([d,p],c)}case 1:{if(u){let h=c;return u==="DataView"?h=new Uint8Array(c.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(c)),l([u,[...h]],c)}const p=[],w=l([d,p],c);for(const h of c)p.push(A(h));return w}case 2:{if(u)switch(u){case"BigInt":return l([u,c.toString()],c);case"Boolean":case"Number":case"String":return l([u,c.valueOf()],c)}if(i&&"toJSON"in c)return A(c.toJSON());const p=[],w=l([d,p],c);for(const h of gh(c))!o&&Sr(Un(c[h]))||p.push([A(h),A(c[h])]);return w}case 3:return l([d,c.toISOString()],c);case 4:{const{source:p,flags:w}=c;return l([d,{source:p,flags:w}],c)}case 5:{const p=[],w=l([d,p],c);for(const[h,b]of c)(o||!Sr(Un(h))&&!Sr(Un(b)))&&p.push([A(h),A(b)]);return w}case 6:{const p=[],w=l([d,p],c);for(const h of c)!o&&Sr(Un(h))||p.push(A(h));return w}}const{message:f}=c;return l([d,{name:u,message:f}],c)};return A})(!(t||n),!!t,new Map,r)(e),r};var Pr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Nl(Fl(e,t)):structuredClone(e):(e,t)=>Nl(Fl(e,t));function mh(e,t){const n=[{type:"text",value:"โฉ"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function yh(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Dr=function(e){if(e==null)return vh;if(typeof e=="function")return Ir(e);if(typeof e=="object")return Array.isArray(e)?function(t){const n=[];let r=-1;for(;++r<t.length;)n[r]=Dr(t[r]);return Ir(o);function o(...i){let s=-1;for(;++s<n.length;)if(n[s].apply(this,i))return!0;return!1}}(e):function(t){const n=t;return Ir(r);function r(o){const i=o;let s;for(s in t)if(i[s]!==n[s])return!1;return!0}}(e);if(typeof e=="string")return function(t){return Ir(n);function n(r){return r&&r.type===t}}(e);throw new Error("Expected function, string, or object as test")};function Ir(e){return function(t,n,r){return!!(function(o){return o!==null&&typeof o=="object"&&"type"in o}(t)&&e.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function vh(){return!0}const Hl=[],wh=!0,oi=!1;function Rl(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Dr(o),s=r?-1:1;(function a(l,A,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(u,"name",{value:"node ("+l.type+(f?"<"+f+">":"")+")"})}return u;function u(){let f,p,w,h=Hl;if((!t||i(l,A,c[c.length-1]||void 0))&&(h=function(b){return Array.isArray(b)?b:typeof b=="number"?[wh,b]:b==null?Hl:[b]}(n(l,c)),h[0]===oi))return h;if("children"in l&&l.children){const b=l;if(b.children&&h[0]!=="skip")for(p=(r?b.children.length:-1)+s,w=c.concat(b);p>-1&&p<b.children.length;){const x=b.children[p];if(f=a(x,p,w)(),f[0]===oi)return f;p=typeof f[1]=="number"?f[1]:p+s}}return h}})(e,void 0,[])()}function ii(e,t,n,r){let o,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,o=n):(i=t,s=n,o=r),Rl(e,i,function(a,l){const A=l[l.length-1],c=A?A.children.indexOf(a):void 0;return s(a,c,A)},o)}const si={}.hasOwnProperty,bh={};function kh(e,t){e.position&&(t.position=function(n){const r=Wo(n),o=el(n);if(r&&o)return{start:r,end:o}}(e))}function xh(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&i&&Object.assign(n.properties,Pr(i)),"children"in n&&n.children&&o!=null&&(n.children=o)}return n}function Eh(e,t){const n=t.data||{},r=!("value"in t)||si.call(n,"hProperties")||si.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Ch(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
41
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
42
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
43
|
+
`}),n}function zl(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ul(e,t){const n=function(s,a){const l=a||bh,A=new Map,c=new Map,d=new Map,u={...ph,...l.handlers},f={all:function(p){const w=[];if("children"in p){const h=p.children;let b=-1;for(;++b<h.length;){const x=f.one(h[b],p);if(x){if(b&&h[b-1].type==="break"&&(Array.isArray(x)||x.type!=="text"||(x.value=zl(x.value)),!Array.isArray(x)&&x.type==="element")){const g=x.children[0];g&&g.type==="text"&&(g.value=zl(g.value))}Array.isArray(x)?w.push(...x):w.push(x)}}}return w},applyData:xh,definitionById:A,footnoteById:c,footnoteCounts:d,footnoteOrder:[],handlers:u,one:function(p,w){const h=p.type,b=f.handlers[h];if(si.call(f.handlers,h)&&b)return b(f,p,w);if(f.options.passThrough&&f.options.passThrough.includes(h)){if("children"in p){const{children:x,...g}=p,k=Pr(g);return k.children=f.all(p),k}return Pr(p)}return(f.options.unknownHandler||Eh)(f,p,w)},options:l,patch:kh,wrap:Ch};return ii(s,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const w=p.type==="definition"?A:c,h=String(p.identifier).toUpperCase();w.has(h)||w.set(h,p)}}),f}(e,t),r=n.one(e,void 0),o=function(s){const a=typeof s.options.clobberPrefix=="string"?s.options.clobberPrefix:"user-content-",l=s.options.footnoteBackContent||mh,A=s.options.footnoteBackLabel||yh,c=s.options.footnoteLabel||"Footnotes",d=s.options.footnoteLabelTagName||"h2",u=s.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<s.footnoteOrder.length;){const w=s.footnoteById.get(s.footnoteOrder[p]);if(!w)continue;const h=s.all(w),b=String(w.identifier).toUpperCase(),x=mn(b.toLowerCase());let g=0;const k=[],S=s.footnoteCounts.get(b);for(;S!==void 0&&++g<=S;){k.length>0&&k.push({type:"text",value:" "});let C=typeof l=="string"?l:l(p,g);typeof C=="string"&&(C={type:"text",value:C}),k.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+x+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof A=="string"?A:A(p,g),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const E=h[h.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const C=E.children[E.children.length-1];C&&C.type==="text"?C.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else h.push(...k);const B={type:"element",tagName:"li",properties:{id:a+"fn-"+x},children:s.wrap(h,!0)};s.patch(w,B),f.push(B)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:d,properties:{...Pr(u),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
|
|
44
|
+
`},{type:"element",tagName:"ol",properties:{},children:s.wrap(f,!0)},{type:"text",value:`
|
|
45
|
+
`}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
46
|
+
`},o),i}function Sh(e,t){return e&&"run"in e?async function(n,r){const o=Ul(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Ul(n,{file:r,...e||t})}}function jl(e){if(e)throw e}var Br=Object.prototype.hasOwnProperty,ql=Object.prototype.toString,Wl=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Vl=function(e){return typeof Array.isArray=="function"?Array.isArray(e):ql.call(e)==="[object Array]"},Yl=function(e){if(!e||ql.call(e)!=="[object Object]")return!1;var t,n=Br.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Br.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return t===void 0||Br.call(e,t)},Kl=function(e,t){Wl&&t.name==="__proto__"?Wl(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Xl=function(e,t){if(t==="__proto__"){if(!Br.call(e,t))return;if(Gl)return Gl(e,t).value}return e[t]},Ph=function e(){var t,n,r,o,i,s,a=arguments[0],l=1,A=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<A;++l)if((t=arguments[l])!=null)for(n in t)r=Xl(a,n),a!==(o=Xl(t,n))&&(c&&o&&(Yl(o)||(i=Vl(o)))?(i?(i=!1,s=r&&Vl(r)?r:[]):s=r&&Yl(r)?r:{},Kl(a,{name:n,newValue:e(c,s,o)})):o!==void 0&&Kl(a,{name:n,newValue:o}));return a},ai=Xa(Ph);function li(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 Dh(){const e=[],t={run:function(...n){let r=-1;const o=n.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function i(s,...a){const l=e[++r];let A=-1;if(s)o(s);else{for(;++A<n.length;)a[A]!==null&&a[A]!==void 0||(a[A]=n[A]);n=a,l?function(c,d){let u;return f;function f(...h){const b=c.length>h.length;let x;b&&h.push(p);try{x=c.apply(this,h)}catch(g){if(b&&u)throw g;return p(g)}b||(x&&x.then&&typeof x.then=="function"?x.then(w,p):x instanceof Error?p(x):w(x))}function p(h,...b){u||(u=!0,d(h,...b))}function w(h){p(null,h)}}(l,i)(...a):o(null,...a)}})(null,...n)},use:function(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Ct={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jn(e);let n,r=0,o=-1,i=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=s));return r===o?o=s:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(jn(e),e.length===0)return".";let t,n=-1,r=e.length;for(;--r;)if(e.codePointAt(r)===47){if(t){n=r;break}}else t||(t=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)},extname:function(e){jn(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(a!==47)r<0&&(t=!0,r=n+1),a===46?i<0?i=n:s!==1&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}return i<0||r<0||s===0||s===1&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)jn(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":function(r){jn(r);const o=r.codePointAt(0)===47;let i=function(s,a){let l,A,c="",d=0,u=-1,f=0,p=-1;for(;++p<=s.length;){if(p<s.length)l=s.codePointAt(p);else{if(l===47)break;l=47}if(l===47){if(!(u===p-1||f===1))if(u!==p-1&&f===2){if(c.length<2||d!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(A=c.lastIndexOf("/"),A!==c.length-1){A<0?(c="",d=0):(c=c.slice(0,A),d=c.length-1-c.lastIndexOf("/")),u=p,f=0;continue}}else if(c.length>0){c="",d=0,u=p,f=0;continue}}a&&(c=c.length>0?c+"/..":"..",d=2)}else c.length>0?c+="/"+s.slice(u+1,p):c=s.slice(u+1,p),d=p-u-1;u=p,f=0}else l===46&&f>-1?f++:f=-1}return c}(r,!o);return i.length!==0||o||(i="."),i.length>0&&r.codePointAt(r.length-1)===47&&(i+="/"),o?"/"+i:i}(t)},sep:"/"};function jn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ih={cwd:function(){return"/"}};function ci(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Bh(e){if(typeof e=="string")e=new URL(e);else if(!ci(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 function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const n=t.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const o=n.codePointAt(r+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}(e)}const Ai=["history","path","basename","stem","extname","dirname"];class Jl{constructor(t){let n;n=t?ci(t)?{path:t}:typeof t=="string"||function(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}(t)?{value:t}:t:{},this.cwd="cwd"in n?"":Ih.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Ai.length;){const i=Ai[o];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}for(r in n)Ai.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?Ct.basename(this.path):void 0}set basename(t){di(t,"basename"),ui(t,"basename"),this.path=Ct.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ct.dirname(this.path):void 0}set dirname(t){Zl(this.basename,"dirname"),this.path=Ct.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ct.extname(this.path):void 0}set extname(t){if(ui(t,"extname"),Zl(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ct.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ci(t)&&(t=Bh(t)),di(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ct.basename(this.path,this.extname):void 0}set stem(t){di(t,"stem"),ui(t,"stem"),this.path=Ct.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Ge(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ui(e,t){if(e&&e.includes(Ct.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ct.sep+"`")}function di(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Zl(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Th=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Mh={}.hasOwnProperty;class fi extends Th{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Dh()}copy(){const t=new fi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ai(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(gi("data",this.frozen),this.namespace[t]=n,this):Mh.call(this.namespace,t)&&this.namespace[t]||void 0:t?(gi("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Tr(t),r=this.parser||this.Parser;return pi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pi("process",this.parser||this.Parser),hi("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){const a=Tr(t),l=r.parse(a);function A(c,d){c||!d?s(c):i?i(d):n(void 0,d)}r.run(l,a,function(c,d,u){if(c||!d||!u)return A(c);const f=d,p=r.stringify(f,u);var w;typeof(w=p)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(w)?u.value=p:u.result=p,A(c,u)})}}processSync(t){let n,r=!1;return this.freeze(),pi("processSync",this.parser||this.Parser),hi("processSync",this.compiler||this.Compiler),this.process(t,function(o,i){r=!0,jl(o),n=i}),ec("processSync","process",r),n}run(t,n,r){$l(t),this.freeze();const o=this.transformers;return r||typeof n!="function"||(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,a){const l=Tr(n);o.run(t,l,function(A,c,d){const u=c||t;A?a(A):s?s(u):r(void 0,u,d)})}}runSync(t,n){let r,o=!1;return this.run(t,n,function(i,s){jl(i),r=s,o=!0}),ec("runSync","run",o),r}stringify(t,n){this.freeze();const r=Tr(n),o=this.compiler||this.Compiler;return hi("stringify",o),$l(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(gi("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?a(t):s(t)}return this;function i(A){if(typeof A=="function")l(A,[]);else{if(typeof A!="object")throw new TypeError("Expected usable value, not `"+A+"`");if(Array.isArray(A)){const[c,...d]=A;l(c,d)}else s(A)}}function s(A){if(!("plugins"in A)&&!("settings"in A))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(A.plugins),A.settings&&(o.settings=ai(!0,o.settings,A.settings))}function a(A){let c=-1;if(A!=null){if(!Array.isArray(A))throw new TypeError("Expected a list of plugins, not `"+A+"`");for(;++c<A.length;)i(A[c])}}function l(A,c){let d=-1,u=-1;for(;++d<r.length;)if(r[d][0]===A){u=d;break}if(u===-1)r.push([A,...c]);else if(c.length>0){let[f,...p]=c;const w=r[u][1];li(w)&&li(f)&&(f=ai(!0,w,f)),r[u]=[A,f,...p]}}}}const Qh=new fi().freeze();function pi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gi(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 $l(e){if(!li(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ec(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tr(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new Jl(e)}const tc=[],nc={allowDangerousHtml:!0},Oh=/^(https?|ircs?|mailto|xmpp)$/i,_h=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Lh(e){const t=function(r){const o=r.rehypePlugins||tc,i=r.remarkPlugins||tc,s=r.remarkRehypeOptions?{...r.remarkRehypeOptions,...nc}:nc;return Qh().use(dh).use(i).use(Sh,s).use(o)}(e),n=function(r){const o=r.children||"",i=new Jl;return typeof o=="string"&&(i.value=o),i}(e);return function(r,o){const i=o.allowedElements,s=o.allowElement,a=o.components,l=o.disallowedElements,A=o.skipHtml,c=o.unwrapDisallowed,d=o.urlTransform||Nh;for(const f of _h)Object.hasOwn(o,f.from)&&(f.from,f.to&&f.to,f.id,void 0);return o.className&&(r={type:"element",tagName:"div",properties:{className:o.className},children:r.type==="root"?r.children:[r]}),ii(r,u),bp(r,{Fragment:D.Fragment,components:a,ignoreInvalidStyle:!0,jsx:D.jsx,jsxs:D.jsxs,passKeys:!0,passNode:!0});function u(f,p,w){if(f.type==="raw"&&w&&typeof p=="number")return A?w.children.splice(p,1):w.children[p]={type:"text",value:f.value},p;if(f.type==="element"){let h;for(h in Xo)if(Object.hasOwn(Xo,h)&&Object.hasOwn(f.properties,h)){const b=f.properties[h],x=Xo[h];(x===null||x.includes(f.tagName))&&(f.properties[h]=d(String(b||""),h,f))}}if(f.type==="element"){let h=i?!i.includes(f.tagName):!!l&&l.includes(f.tagName);if(!h&&s&&typeof p=="number"&&(h=!s(f,p,w)),h&&w&&typeof p=="number")return c&&f.children?w.children.splice(p,1,...f.children):w.children.splice(p,1),p}}}(t.runSync(t.parse(n),n),e)}function Nh(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Oh.test(e.slice(0,t))?e:""}function rc(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function Fh(e,t,n){const r=Dr((n||{}).ignore||[]),o=function(a){const l=[];if(!Array.isArray(a))throw new TypeError("Expected find and replace tuple or list of tuples");const A=!a[0]||Array.isArray(a[0])?a:[a];let c=-1;for(;++c<A.length;){const d=A[c];l.push([Hh(d[0]),Rh(d[1])])}return l}(t);let i=-1;for(;++i<o.length;)Rl(e,"text",s);function s(a,l){let A,c=-1;for(;++c<l.length;){const d=l[c],u=A?A.children:void 0;if(r(d,u?u.indexOf(d):void 0,A))return;A=d}if(A)return function(d,u){const f=u[u.length-1],p=o[i][0],w=o[i][1];let h=0;const b=f.children.indexOf(d);let x=!1,g=[];p.lastIndex=0;let k=p.exec(d.value);for(;k;){const S=k.index,E={index:k.index,input:k.input,stack:[...u,d]};let B=w(...k,E);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?p.lastIndex=S+1:(h!==S&&g.push({type:"text",value:d.value.slice(h,S)}),Array.isArray(B)?g.push(...B):B&&g.push(B),h=S+k[0].length,x=!0),!p.global)break;k=p.exec(d.value)}return x?(h<d.value.length&&g.push({type:"text",value:d.value.slice(h)}),f.children.splice(b,1,...g)):g=[d],b+g.length}(a,l)}}function Hh(e){return typeof e=="string"?new RegExp(function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Rh(e){return typeof e=="function"?e:function(){return e}}const mi="phrasing",yi=["autolink","link","image","label"];function zh(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vi(e){this.config.enter.autolinkProtocol.call(this,e)}function Uh(e){this.config.exit.autolinkProtocol.call(this,e)}function jh(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function qh(e){this.config.exit.autolinkEmail.call(this,e)}function Wh(e){this.exit(e)}function Gh(e){Fh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Vh],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Yh]],{ignore:["link","linkReference"]})}function Vh(e,t,n,r,o){let i="";if(!oc(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(l){const A=l.split(".");return!(A.length<2||A[A.length-1]&&(/_/.test(A[A.length-1])||!/[a-zA-Z\d]/.test(A[A.length-1]))||A[A.length-2]&&(/_/.test(A[A.length-2])||!/[a-zA-Z\d]/.test(A[A.length-2])))}(n)))return!1;const s=function(l){const A=/[!"&'),.:;<>?\]}]+$/.exec(l);if(!A)return[l,void 0];l=l.slice(0,A.index);let c=A[0],d=c.indexOf(")");const u=rc(l,"(");let f=rc(l,")");for(;d!==-1&&u>f;)l+=c.slice(0,d+1),c=c.slice(d+1),d=c.indexOf(")"),f++;return[l,c]}(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Yh(e,t,n,r){return!(!oc(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function oc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nn(n)||kr(n))&&(!t||n!==47)}function Kh(){this.buffer()}function Xh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Jh(){this.buffer()}function Zh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $h(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eg(e){this.exit(e)}function tg(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ng(e){this.exit(e)}function ic(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),a(),s(),i+=o.move("]"),i}function rg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(n,r,o,i){const s=o.createTracker(i);let a=s.move("[^");const l=o.enter("footnoteDefinition"),A=o.enter("label");return a+=s.move(o.safe(o.associationId(n),{before:a,after:"]"})),A(),a+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),a+=s.move((t?`
|
|
47
|
+
`:" ")+o.indentLines(o.containerFlow(n,s.current()),t?sc:og))),l(),a},footnoteReference:ic},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function og(e,t,n){return t===0?e:sc(e,t,n)}function sc(e,t,n){return(n?"":" ")+e}ic.peek=function(){return"["};const ig=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sg(e){this.enter({type:"delete",children:[]},e)}function ag(e){this.exit(e)}function ac(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let s=o.move("~~");return s+=n.containerPhrasing(e,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function lg(e){return e.length}function cg(e){return e==null?"":String(e)}function lc(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}function Ag(e,t,n){return">"+(n?"":" ")+e}function ug(e,t){return cc(e,t.inConstruct,!0)&&!cc(e,t.notInConstruct,!1)}function cc(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 Ac(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
48
|
+
`&&ug(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
49
|
+
`}function dg(e,t,n){return(n?"":" ")+e}function wi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Mr(e,t,n){const r=yn(e),o=yn(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function uc(e,t,n,r){const o=function(p){const w=p.options.emphasis||"*";if(w!=="*"&&w!=="_")throw new Error("Cannot serialize emphasis with `"+w+"` for `options.emphasis`, expected `*`, or `_`");return w}(n),i=n.enter("emphasis"),s=n.createTracker(r),a=s.move(o);let l=s.move(n.containerPhrasing(e,{after:o,before:a,...s.current()}));const A=l.charCodeAt(0),c=Mr(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(l=qn(A)+l.slice(1));const d=l.charCodeAt(l.length-1),u=Mr(r.after.charCodeAt(0),d,o);u.inside&&(l=l.slice(0,-1)+qn(d));const f=s.move(o);return i(),n.attentionEncodeSurroundingInfo={after:u.outside,before:c.outside},a+l+f}function dc(e){return e.value||""}function fc(e,t,n,r){const o=wi(n),i=o==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let A=l.move("![");return A+=l.move(n.safe(e.alt,{before:A,after:"]",...l.current()})),A+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=l.move("<"),A+=l.move(n.safe(e.url,{before:A,after:">",...l.current()})),A+=l.move(">")):(a=n.enter("destinationRaw"),A+=l.move(n.safe(e.url,{before:A,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${i}`),A+=l.move(" "+o),A+=l.move(n.safe(e.title,{before:A,after:o,...l.current()})),A+=l.move(o),a()),A+=l.move(")"),s(),A}function pc(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const A=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(A+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=c,i(),o!=="full"&&A&&A===d?o==="shortcut"?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function hc(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const s=n.unsafe[i],a=n.compilePattern(s);let l;if(s.atBreak)for(;l=a.exec(r);){let A=l.index;r.charCodeAt(A)===10&&r.charCodeAt(A-1)===13&&A--,r=r.slice(0,A)+" "+r.slice(l.index+1)}}return o+r+o}function gc(e,t){const n=Jo(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function mc(e,t,n,r){const o=wi(n),i=o==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(gc(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),l=n.enter("label");let A=s.move("[");return A+=s.move(n.containerPhrasing(e,{before:A,after:"](",...s.current()})),A+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(l=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),A+=s.move(" "+o),A+=s.move(n.safe(e.title,{before:A,after:o,...s.current()})),A+=s.move(o),l()),A+=s.move(")"),a(),A}function yc(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const A=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(A+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=c,i(),o!=="full"&&A&&A===d?o==="shortcut"?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function bi(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 vc(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}ac.peek=function(){return"~"},uc.peek=function(e,t,n){return n.options.emphasis||"*"},dc.peek=function(){return"<"},fc.peek=function(){return"!"},pc.peek=function(){return"!"},hc.peek=function(){return"`"},mc.peek=function(e,t,n){return gc(e,n)?"<":"["},yc.peek=function(){return"["};const fg=Dr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wc(e,t,n,r){const o=function(p){const w=p.options.strong||"*";if(w!=="*"&&w!=="_")throw new Error("Cannot serialize strong with `"+w+"` for `options.strong`, expected `*`, or `_`");return w}(n),i=n.enter("strong"),s=n.createTracker(r),a=s.move(o+o);let l=s.move(n.containerPhrasing(e,{after:o,before:a,...s.current()}));const A=l.charCodeAt(0),c=Mr(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(l=qn(A)+l.slice(1));const d=l.charCodeAt(l.length-1),u=Mr(r.after.charCodeAt(0),d,o);u.inside&&(l=l.slice(0,-1)+qn(d));const f=s.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:u.outside,before:c.outside},a+l+f}wc.peek=function(e,t,n){return n.options.strong||"*"};const bc={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),Ag);return o(),s},break:Ac,code:function(e,t,n,r){const o=function(d){const u=d.options.fence||"`";if(u!=="`"&&u!=="~")throw new Error("Cannot serialize code with `"+u+"` for `options.fence`, expected `` ` `` or `~`");return u}(n),i=e.value||"",s=o==="`"?"GraveAccent":"Tilde";if(function(d,u){return!!(u.options.fences===!1&&d.value&&!d.lang&&/[^ \r\n]/.test(d.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(d.value))}(e,n)){const d=n.enter("codeIndented"),u=n.indentLines(i,dg);return d(),u}const a=n.createTracker(r),l=o.repeat(Math.max(function(d,u){const f=String(d);let p=f.indexOf(u),w=p,h=0,b=0;if(typeof u!="string")throw new TypeError("Expected substring");for(;p!==-1;)p===w?++h>b&&(b=h):h=1,w=p+u.length,p=f.indexOf(u,w);return b}(i,o)+1,3)),A=n.enter("codeFenced");let c=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
|
|
50
|
+
`,encode:["`"],...a.current()})),d()}return c+=a.move(`
|
|
51
|
+
`),i&&(c+=a.move(i+`
|
|
52
|
+
`)),c+=a.move(l),A(),c},definition:function(e,t,n,r){const o=wi(n),i=o==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let A=l.move("[");return A+=l.move(n.safe(n.associationId(e),{before:A,after:"]",...l.current()})),A+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=l.move("<"),A+=l.move(n.safe(e.url,{before:A,after:">",...l.current()})),A+=l.move(">")):(a=n.enter("destinationRaw"),A+=l.move(n.safe(e.url,{before:A,after:e.title?" ":`
|
|
53
|
+
`,...l.current()}))),a(),e.title&&(a=n.enter(`title${i}`),A+=l.move(" "+o),A+=l.move(n.safe(e.title,{before:A,after:o,...l.current()})),A+=l.move(o),a()),s(),A},emphasis:uc,hardBreak:Ac,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(c,d){let u=!1;return ii(c,function(f){if("value"in f&&/\r?\n|\r/.test(f.value)||f.type==="break")return u=!0,oi}),!!((!c.depth||c.depth<3)&&Jo(c)&&(d.options.setext||u))}(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),u=n.containerPhrasing(e,{...i.current(),before:`
|
|
54
|
+
`,after:`
|
|
55
|
+
`});return d(),c(),u+`
|
|
56
|
+
`+(o===1?"=":"-").repeat(u.length-(Math.max(u.lastIndexOf("\r"),u.lastIndexOf(`
|
|
57
|
+
`))+1))}const s="#".repeat(o),a=n.enter("headingAtx"),l=n.enter("phrasing");i.move(s+" ");let A=n.containerPhrasing(e,{before:"# ",after:`
|
|
58
|
+
`,...i.current()});return/^[\t ]/.test(A)&&(A=qn(A.charCodeAt(0))+A.slice(1)),A=A?s+" "+A:s,n.options.closeAtx&&(A+=" "+s),l(),a(),A},html:dc,image:fc,imageReference:pc,inlineCode:hc,link:mc,linkReference:yc,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?function(c){const d=c.options.bulletOrdered||".";if(d!=="."&&d!==")")throw new Error("Cannot serialize items with `"+d+"` for `options.bulletOrdered`, expected `.` or `)`");return d}(n):bi(n);const a=e.ordered?s==="."?")":".":function(c){const d=bi(c),u=c.options.bulletOther;if(!u)return d==="*"?"-":"*";if(u!=="*"&&u!=="+"&&u!=="-")throw new Error("Cannot serialize items with `"+u+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(u===d)throw new Error("Expected `bullet` (`"+d+"`) and `bulletOther` (`"+u+"`) to be different");return u}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const c=e.children?e.children[0]:void 0;if(s!=="*"&&s!=="-"||!c||c.children&&c.children[0]||n.stack[n.stack.length-1]!=="list"||n.stack[n.stack.length-2]!=="listItem"||n.stack[n.stack.length-3]!=="list"||n.stack[n.stack.length-4]!=="listItem"||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(l=!0),vc(n)===s&&c){let d=-1;for(;++d<e.children.length;){const u=e.children[d];if(u&&u.type==="listItem"&&u.children&&u.children[0]&&u.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const A=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),A},listItem:function(e,t,n,r){const o=function(c){const d=c.options.listItemIndent||"one";if(d!=="tab"&&d!=="one"&&d!=="mixed")throw new Error("Cannot serialize items with `"+d+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return d}(n);let i=n.bulletCurrent||bi(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(r);a.move(i+" ".repeat(s-i.length)),a.shift(s);const l=n.enter("listItem"),A=n.indentLines(n.containerFlow(e,a.current()),function(c,d,u){return d?(u?"":" ".repeat(s))+c:(u?i:i+" ".repeat(s-i.length))+c});return l(),A},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),o(),s},root:function(e,t,n,r){return(e.children.some(function(i){return fg(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:wc,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(vc(n)+(n.options.ruleSpaces?" ":"")).repeat(function(o){const i=o.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function pg(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function hg(e){this.exit(e),this.data.inTable=void 0}function gg(e){this.enter({type:"tableRow",children:[]},e)}function ki(e){this.exit(e)}function kc(e){this.enter({type:"tableCell",children:[]},e)}function mg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,yg));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function yg(e,t){return t==="|"?t:e}function vg(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
59
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(A,c,d){let u=bc.inlineCode(A,c,d);return d.stack.includes("tableCell")&&(u=u.replace(/\|/g,"\\$&")),u},table:function(A,c,d,u){return a(function(f,p,w){const h=f.children;let b=-1;const x=[],g=p.enter("table");for(;++b<h.length;)x[b]=l(h[b],p,w);return g(),x}(A,d,u),A.align)},tableCell:s,tableRow:function(A,c,d,u){const f=l(A,d,u),p=a([f]);return p.slice(0,p.indexOf(`
|
|
60
|
+
`))}}};function s(A,c,d,u){const f=d.enter("tableCell"),p=d.enter("phrasing"),w=d.containerPhrasing(A,{...u,before:i,after:i});return p(),f(),w}function a(A,c){return function(d,u){const f=u||{},p=(f.align||[]).concat(),w=f.stringLength||lg,h=[],b=[],x=[],g=[];let k=0,S=-1;for(;++S<d.length;){const T=[],Q=[];let I=-1;for(d[S].length>k&&(k=d[S].length);++I<d[S].length;){const O=cg(d[S][I]);if(f.alignDelimiters!==!1){const z=w(O);Q[I]=z,(g[I]===void 0||z>g[I])&&(g[I]=z)}T.push(O)}b[S]=T,x[S]=Q}let E=-1;if(typeof p=="object"&&"length"in p)for(;++E<k;)h[E]=lc(p[E]);else{const T=lc(p);for(;++E<k;)h[E]=T}E=-1;const B=[],C=[];for(;++E<k;){const T=h[E];let Q="",I="";T===99?(Q=":",I=":"):T===108?Q=":":T===114&&(I=":");let O=f.alignDelimiters===!1?1:Math.max(1,g[E]-Q.length-I.length);const z=Q+"-".repeat(O)+I;f.alignDelimiters!==!1&&(O=Q.length+O+I.length,O>g[E]&&(g[E]=O),C[E]=O),B[E]=z}b.splice(1,0,B),x.splice(1,0,C),S=-1;const M=[];for(;++S<b.length;){const T=b[S],Q=x[S];E=-1;const I=[];for(;++E<k;){const O=T[E]||"";let z="",L="";if(f.alignDelimiters!==!1){const _=g[E]-(Q[E]||0),F=h[E];F===114?z=" ".repeat(_):F===99?_%2?(z=" ".repeat(_/2+.5),L=" ".repeat(_/2-.5)):(z=" ".repeat(_/2),L=z):L=" ".repeat(_)}f.delimiterStart===!1||E||I.push("|"),f.padding===!1||f.alignDelimiters===!1&&O===""||f.delimiterStart===!1&&!E||I.push(" "),f.alignDelimiters!==!1&&I.push(z),I.push(O),f.alignDelimiters!==!1&&I.push(L),f.padding!==!1&&I.push(" "),f.delimiterEnd===!1&&E===k-1||I.push("|")}M.push(f.delimiterEnd===!1?I.join("").replace(/ +$/,""):I.join(""))}return M.join(`
|
|
61
|
+
`)}(A,{align:c,alignDelimiters:r,padding:n,stringLength:o})}function l(A,c,d){const u=A.children;let f=-1;const p=[],w=c.enter("tableRow");for(;++f<u.length;)p[f]=s(u[f],0,c,d);return w(),p}}function xc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function wg(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];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i,s=-1;for(;++s<o.length;){const a=o[s];if(a.type==="paragraph"){i=a;break}}i===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 bg(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(s);let l=bc.listItem(e,t,n,{...r,...a.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(A){return A+s})),l}const kg={tokenize:function(e,t,n){let r=0;return function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)};function o(i){return i===null?n(i):t(i)}},partial:!0},Ec={tokenize:function(e,t,n){let r,o,i;return s;function s(A){return A===46||A===95?e.check(Sc,l,a)(A):A===null||be(A)||nn(A)||A!==45&&kr(A)?l(A):(i=!0,e.consume(A),s)}function a(A){return A===95?r=!0:(o=r,r=void 0),e.consume(A),s}function l(A){return o||r||!i?n(A):t(A)}},partial:!0},Cc={tokenize:function(e,t){let n=0,r=0;return o;function o(s){return s===40?(n++,e.consume(s),o):s===41&&r<n?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Sc,t,i)(s):s===null||be(s)||nn(s)?t(s):(e.consume(s),o)}function i(s){return s===41&&r++,e.consume(s),o}},partial:!0},Sc={tokenize:function(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),i):a===93?(e.consume(a),o):a===60||a===null||be(a)||nn(a)?t(a):n(a)}function o(a){return a===null||a===40||a===91||be(a)||nn(a)?t(a):r(a)}function i(a){return Ke(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):Ke(a)?(e.consume(a),s):n(a)}},partial:!0},xg={tokenize:function(e,t,n){return function(o){return e.consume(o),r};function r(o){return Ve(o)?n(o):t(o)}},partial:!0},Pc={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(i){return i!==87&&i!==119||!Ic.call(r,r.previous)||Ei(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kg,e.attempt(Ec,e.attempt(Cc,o),n),n)(i))};function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}},previous:Ic},Dc={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(c){return(c===72||c===104)&&Bc.call(r,r.previous)&&!Ei(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(c),e.consume(c),s):n(c)};function s(c){if(Ke(c)&&o.length<5)return o+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=o.toLowerCase();if(d==="http"||d==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),i?l:(i=!0,a)):n(c)}function l(c){return c===null||br(c)||be(c)||nn(c)||kr(c)?n(c):e.attempt(Ec,e.attempt(Cc,A),n)(c)}function A(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}},previous:Bc},Qt={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(c){return!xi(c)||!Tc.call(r,r.previous)||Ei(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))};function s(c){return xi(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(xg,A,l)(c):c===45||c===95||Ve(c)?(i=!0,e.consume(c),a):A(c)}function l(c){return e.consume(c),o=!0,a}function A(c){return i&&o&&Ke(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}},previous:Tc},St={};let rn=48;for(;rn<123;)St[rn]=Qt,rn++,rn===58?rn=65:rn===91&&(rn=97);function Ic(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||be(e)}function Bc(e){return!Ke(e)}function Tc(e){return!(e===47||xi(e))}function xi(e){return e===43||e===45||e===46||e===95||Ve(e)}function Ei(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}St[43]=Qt,St[45]=Qt,St[46]=Qt,St[95]=Qt,St[72]=[Qt,Dc],St[104]=[Qt,Dc],St[87]=[Qt,Pc],St[119]=[Qt,Pc];const Eg={tokenize:function(e,t,n){const r=this;return ue(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(o):n(o)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Cg(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;o--;){const a=r.events[o][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return function(a){if(!s||!s._balanced)return n(a);const l=mt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function Sg(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Pg(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0;return function(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a};function a(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(c){if(s>999||c===93&&!i||c===null||c===91||be(c))return n(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return o.includes(mt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return be(c)||(i=!0),s++,e.consume(c),c===92?A:l}function A(c){return c===91||c===92||c===93?(e.consume(c),s++,l):l(c)}}function Dg(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s,a=0;return function(f){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(f){return f===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",A):n(f)}function A(f){if(a>999||f===93&&!s||f===null||f===91||be(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteDefinitionLabelString");return i=mt(r.sliceSerialize(p)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return be(f)||(s=!0),a++,e.consume(f),f===92?c:A}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,A):A(f)}function d(f){return f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o.includes(i)||o.push(i),ue(e,u,"gfmFootnoteDefinitionWhitespace")):n(f)}function u(f){return t(f)}}function Ig(e,t,n){return e.check(Hn,t,e.attempt(Eg,t,n))}function Bg(e){e.exit("gfmFootnoteDefinition")}function Tg(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(r,o,i){const s=this.previous,a=this.events;let l=0;return function(c){return s===126&&a[a.length-1][1].type!=="characterEscape"?i(c):(r.enter("strikethroughSequenceTemporary"),A(c))};function A(c){const d=yn(s);if(c===126)return l>1?i(c):(r.consume(c),l++,A);if(l<2&&!t)return i(c);const u=r.exit("strikethroughSequenceTemporary"),f=yn(c);return u._open=!f||f===2&&!!d,u._close=!d||d===2&&!!f,o(c)}},resolveAll:function(r,o){let i=-1;for(;++i<r.length;)if(r[i][0]==="enter"&&r[i][1].type==="strikethroughSequenceTemporary"&&r[i][1]._close){let s=i;for(;s--;)if(r[s][0]==="exit"&&r[s][1].type==="strikethroughSequenceTemporary"&&r[s][1]._open&&r[i][1].end.offset-r[i][1].start.offset===r[s][1].end.offset-r[s][1].start.offset){r[i][1].type="strikethroughSequence",r[s][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},r[s][1].start),end:Object.assign({},r[i][1].end)},l={type:"strikethroughText",start:Object.assign({},r[s][1].end),end:Object.assign({},r[i][1].start)},A=[["enter",a,o],["enter",r[s][1],o],["exit",r[s][1],o],["enter",l,o]],c=o.parser.constructs.insideSpan.null;c&&At(A,A.length,0,xr(c,r.slice(s+1,i),o)),At(A,A.length,0,[["exit",l,o],["enter",r[i][1],o],["exit",r[i][1],o],["exit",a,o]]),At(r,s-1,i-s+3,A),i=s+A.length-2;break}}for(i=-1;++i<r.length;)r[i][1].type==="strikethroughSequenceTemporary"&&(r[i][1].type="data");return r}};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Mg{constructor(){this.map=[]}add(t,n,r){(function(o,i,s,a){let l=0;if(!(s===0&&a.length===0)){for(;l<o.map.length;){if(o.map[l][0]===i)return o.map[l][1]+=s,void o.map[l][2].push(...a);l+=1}o.map.push([i,s,a])}})(this,t,n,r)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[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]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function Qg(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Og(e,t,n){const r=this;let o,i=0,s=0;return function(C){let M=r.events.length-1;for(;M>-1;){const I=r.events[M][1].type;if(I!=="lineEnding"&&I!=="linePrefix")break;M--}const T=M>-1?r.events[M][1].type:null,Q=T==="tableHead"||T==="tableRow"?k:a;return Q===k&&r.parser.lazy[r.now().line]?n(C):Q(C)};function a(C){return e.enter("tableHead"),e.enter("tableRow"),function(M){return M===124||(o=!0,s+=1),l(M)}(C)}function l(C){return C===null?n(C):ee(C)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),d):n(C):ce(C)?ue(e,l,"whitespace")(C):(s+=1,o&&(o=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),A(C)))}function A(C){return C===null||C===124||be(C)?(e.exit("data"),l(C)):(e.consume(C),C===92?c:A)}function c(C){return C===92||C===124?(e.consume(C),A):A(C)}function d(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),o=!1,ce(C)?ue(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):u(C))}function u(C){return C===45||C===58?p(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),f):g(C)}function f(C){return ce(C)?ue(e,p,"whitespace")(C):p(C)}function p(C){return C===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),w):C===45?(s+=1,w(C)):C===null||ee(C)?x(C):g(C)}function w(C){return C===45?(e.enter("tableDelimiterFiller"),h(C)):g(C)}function h(C){return C===45?(e.consume(C),h):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(C))}function b(C){return ce(C)?ue(e,x,"whitespace")(C):x(C)}function x(C){return C===124?u(C):(C===null||ee(C))&&o&&i===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):g(C)}function g(C){return n(C)}function k(C){return e.enter("tableRow"),S(C)}function S(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),S):C===null||ee(C)?(e.exit("tableRow"),t(C)):ce(C)?ue(e,S,"whitespace")(C):(e.enter("data"),E(C))}function E(C){return C===null||C===124||be(C)?(e.exit("data"),S(C)):(e.consume(C),C===92?B:E)}function B(C){return C===92||C===124?(e.consume(C),E):E(C)}}function _g(e,t){let n,r,o,i=-1,s=!0,a=0,l=[0,0,0,0],A=[0,0,0,0],c=!1,d=0;const u=new Mg;for(;++i<e.length;){const f=e[i],p=f[1];f[0]==="enter"?p.type==="tableHead"?(c=!1,d!==0&&(Mc(u,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},u.add(i,0,[["enter",n,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(s=!0,o=void 0,l=[0,0,0,0],A=[0,i+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},u.add(i,0,[["enter",r,t]])),a=p.type==="tableDelimiterRow"?2:r?3:1):!a||p.type!=="data"&&p.type!=="tableDelimiterMarker"&&p.type!=="tableDelimiterFiller"?p.type==="tableCellDivider"&&(s?s=!1:(l[1]!==0&&(A[0]=A[1],o=Qr(u,t,l,a,void 0,o)),l=A,A=[l[1],i,0,0])):(s=!1,A[2]===0&&(l[1]!==0&&(A[0]=A[1],o=Qr(u,t,l,a,void 0,o),l=[0,0,0,0]),A[2]=i)):p.type==="tableHead"?(c=!0,d=i):p.type==="tableRow"||p.type==="tableDelimiterRow"?(d=i,l[1]!==0?(A[0]=A[1],o=Qr(u,t,l,a,i,o)):A[1]!==0&&(o=Qr(u,t,A,a,i,o)),a=0):!a||p.type!=="data"&&p.type!=="tableDelimiterMarker"&&p.type!=="tableDelimiterFiller"||(A[3]=i)}for(d!==0&&Mc(u,t,d,n,r),u.consume(t.events),i=-1;++i<t.events.length;){const f=t.events[i];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Qg(t.events,i))}return e}function Qr(e,t,n,r,o,i){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData";n[0]!==0&&(i.end=Object.assign({},wn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=wn(t.events,n[1]);if(i={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const l=wn(t.events,n[2]),A=wn(t.events,n[3]),c={type:"tableContent",start:Object.assign({},l),end:Object.assign({},A)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const d=t.events[n[2]],u=t.events[n[3]];if(d[1].end=Object.assign({},u[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const f=n[2]+1,p=n[3]-n[2]-1;e.add(f,p,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return o!==void 0&&(i.end=Object.assign({},wn(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Mc(e,t,n,r,o){const i=[],s=wn(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function wn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Lg={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)};function o(a){return be(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),i):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),i):n(a)}function i(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return ee(a)?t(a):ce(a)?e.check({tokenize:Ng},t,n)(a):n(a)}}};function Ng(e,t,n){return ue(e,function(r){return r===null?n(r):t(r)},"whitespace")}const Fg={};function Hg(e){const t=e||Fg,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(s){return dl([{text:St},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Dg,continuation:{tokenize:Ig},exit:Bg}},text:{91:{name:"gfmFootnoteCall",tokenize:Pg},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cg,resolveTo:Sg}}},Tg(s),{flow:{null:{name:"table",tokenize:Og,resolveAll:_g}}},{text:{91:Lg}}])}(t)),o.push([{transforms:[Gh],enter:{literalAutolink:zh,literalAutolinkEmail:vi,literalAutolinkHttp:vi,literalAutolinkWww:vi},exit:{literalAutolink:Wh,literalAutolinkEmail:qh,literalAutolinkHttp:Uh,literalAutolinkWww:jh}},{enter:{gfmFootnoteCallString:Kh,gfmFootnoteCall:Xh,gfmFootnoteDefinitionLabelString:Jh,gfmFootnoteDefinition:Zh},exit:{gfmFootnoteCallString:$h,gfmFootnoteCall:eg,gfmFootnoteDefinitionLabelString:tg,gfmFootnoteDefinition:ng}},{canContainEols:["delete"],enter:{strikethrough:sg},exit:{strikethrough:ag}},{enter:{table:pg,tableData:kc,tableHeader:kc,tableRow:gg},exit:{codeText:mg,table:hg,tableData:ki,tableHeader:ki,tableRow:ki}},{exit:{taskListCheckValueChecked:xc,taskListCheckValueUnchecked:xc,paragraph:wg}}]),i.push(function(s){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:mi,notInConstruct:yi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:mi,notInConstruct:yi},{character:":",before:"[ps]",after:"\\/",inConstruct:mi,notInConstruct:yi}]},rg(s),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ig}],handlers:{delete:ac}},vg(s),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bg}}]}}(t))}const Qc="rgba(0, 0, 0, 0.3)",Rg={p:e=>{let{children:t}=e;return v.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},t)},ul:e=>{let{children:t}=e;return v.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},t)},ol:e=>{let{children:t}=e;return v.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},t)},li:e=>{let{children:t}=e;return v.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},t)},code:e=>{let{className:t,children:n}=e;return/\blanguage-/.test(t||"")?v.createElement("pre",{style:{backgroundColor:Qc,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},v.createElement("code",null,n)):v.createElement("code",{style:{backgroundColor:Qc,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},n)},blockquote:e=>{let{children:t}=e;return v.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},t)},a:e=>{let{children:t,href:n}=e;return v.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},t)},table:e=>{let{children:t}=e;return v.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},t)},th:e=>{let{children:t}=e;return v.createElement("th",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",fontWeight:600,color:"#fff",backgroundColor:"rgba(255, 255, 255, 0.15)",overflowWrap:"normal",wordBreak:"normal"}},t)},td:e=>{let{children:t}=e;return v.createElement("td",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",color:"#fff",overflowWrap:"normal",wordBreak:"normal"}},t)}},zg=e=>{let{children:t}=e;return v.createElement("div",{style:{whiteSpace:"normal"}},v.createElement(Lh,{remarkPlugins:[Hg],components:Rg},typeof t=="string"?t:""))},Oc=v.forwardRef((e,t)=>{let{embedded:n,currentOpen:r,enabled:o,onSetEnabled:i}=e;const s=ar(),a=(()=>{const{isChatWindowOpen:c,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:f,getIsChatBotVisible:p}=st();return{isChatWindowOpen:c,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:f,getIsChatBotVisible:p}})(),l=v.useRef(!1),A=v.useRef(!1);return v.useEffect(()=>{!n&&a&&a.toggleChatWindow&&(l.current===r||A.current||(setTimeout(()=>{a&&a.toggleChatWindow&&a.toggleChatWindow(r)},0),l.current=r!=null&&r),A.current=!1)},[r,n,a]),v.useEffect(()=>{const c=()=>{A.current=!0};return window.addEventListener("rcb-toggle-chat-window",c),()=>window.removeEventListener("rcb-toggle-chat-window",c)}),v.useImperativeHandle(t,()=>({addMessage:c=>{s&&s.injectMessage&&s.injectMessage(c)},openChat:()=>{!n&&a&&a.toggleChatWindow&&a.toggleChatWindow(!0)},closeChat:()=>{!n&&a&&a.toggleChatWindow&&a.toggleChatWindow(!1)},toggleChat:()=>{!n&&a&&a.toggleChatWindow&&a.toggleChatWindow()},setBotEnabled:c=>{i&&i(c)}}),[s,a,n,i]),null});Oc.displayName="BotController";const _c=v.createContext(null),Ug=e=>{let{trackEvent:t,children:n}=e;const r=v.useRef(t);return r.current=t,v.createElement(_c.Provider,{value:{trackEvent:o=>r.current(o)}},n)},Lc=()=>v.useContext(_c)||{trackEvent:()=>{}},Nc=e=>{let{loginUrl:t,className:n="",style:r,isHeaderButton:o=!1}=e;const{trackEvent:i}=Lc(),s=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return v.createElement(v.Fragment,null,o&&v.createElement("style",null,`
|
|
34
62
|
.rcb-chat-header-container .qa-bot-header-login-button:hover {
|
|
35
63
|
background-color: #0000001a !important;
|
|
36
64
|
opacity: 1 !important;
|
|
37
65
|
}
|
|
38
|
-
`),f.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${r}`,style:Object.assign(Object.assign({},a),n),onClick:()=>{A({type:"chatbot_login_clicked",loginUrl:t})}},"Log In"))},$l=()=>f.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},f.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},f.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),f.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Ie=[];for(let e=0;e<256;++e)Ie.push((e+256).toString(16).slice(1));let _r;const ec=new Uint8Array(16);var $A={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ei(e,t,r){var o;if($A.randomUUID&&!e)return $A.randomUUID();const n=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!_r){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");_r=crypto.getRandomValues.bind(crypto)}return _r(ec)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(A,a=0){return(Ie[A[a+0]]+Ie[A[a+1]]+Ie[A[a+2]]+Ie[A[a+3]]+"-"+Ie[A[a+4]]+Ie[A[a+5]]+"-"+Ie[A[a+6]]+Ie[A[a+7]]+"-"+Ie[A[a+8]]+Ie[A[a+9]]+"-"+Ie[A[a+10]]+Ie[A[a+11]]+Ie[A[a+12]]+Ie[A[a+13]]+Ie[A[a+14]]+Ie[A[a+15]]).toLowerCase()}(n)}function xt(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const tc="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",nc="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",rc="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",oc="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",Ac="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",ic="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",sc=()=>{xt()&&console.log("%c QA Bot Core %c v0.2.35 ",Ac,ic)},Qn=function(e){if(xt()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log(`%c[Session]%c ${e}`,tc,"",...r)}},it=function(e){if(xt()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log(`%c[History]%c ${e}`,nc,"",...r)}},ac=(e,t)=>{xt()&&console.log(`%c[Message]%c ${e}`,rc,"",t)},on=function(e){if(xt()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log(`%c[Turnstile]%c ${e}`,oc,"",...r)}},ti=function(){console.warn(...arguments)},Be=function(){console.error(...arguments)},ni="qa_bot_session_messages",ri=()=>`qa_bot_session_${ei()}`,An=()=>{try{const e=localStorage.getItem(ni);return e?JSON.parse(e):{}}catch{return{}}},lc=(e,t,r,n,o)=>{const A=An();if(!A[e]&&(A[e]={messages:[],startedAt:new Date().toISOString(),preview:""},it("NEW session created",{sessionId:e.slice(-12)})),A[e].messages.some(l=>l.id===t))return void it("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n});const a={id:t,content:r,sender:n,type:o,timestamp:Date.now()};A[e].messages.push(a),it("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n,totalInSession:A[e].messages.length});const s=A[e].messages,i=s.find(l=>{var c;return l.sender.toLowerCase()==="bot"&&((c=l.content)===null||c===void 0?void 0:c.trim())&&l.content.length>=100});if(i){const l=i.content;A[e].preview=l.slice(0,50)+(l.length>50?"...":"")}else{const l=s.find(c=>{var d;return c.sender.toLowerCase()==="user"&&((d=c.content)===null||d===void 0?void 0:d.trim())});if(l&&!A[e].preview){const c=l.content;A[e].preview=c.slice(0,50)+(c.length>50?"...":"")}}(l=>{var c;const d=()=>Object.values(l).reduce((u,p)=>u+p.messages.length,0);for(;d()>100&&Object.keys(l).length>1;){const u=(c=Object.entries(l).sort((p,g)=>{let[,v]=p,[,h]=g;return new Date(v.startedAt).getTime()-new Date(h.startedAt).getTime()})[0])===null||c===void 0?void 0:c[0];if(!u)break;delete l[u]}localStorage.setItem(ni,JSON.stringify(l))})(A),it("STORAGE state",{ourSessions:Object.keys(A).length,ourTotalMessages:Object.values(A).reduce((l,c)=>l+c.messages.length,0)})},oi=e=>{var t,r;return(r=(t=An()[e])===null||t===void 0?void 0:t.messages.length)!==null&&r!==void 0?r:0},cc=e=>{const t=An()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},Ai=f.createContext(void 0),uc=e=>{let{children:t,getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:A}=e;return f.createElement(Ai.Provider,{value:{getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:A}},t)},Or=()=>{const e=f.useContext(Ai);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},dc=()=>{const[e,t]=f.useState(!1),[r,n]=f.useState([]),[o,A]=f.useState(null),[a,s]=f.useState(0),i=f.useRef(null),l=f.useRef(null),{replaceMessages:c}=Xt(),{toggleTextAreaDisabled:d}=So(),{setSessionId:u,getSessionId:p}=Or();f.useEffect(()=>{var v,h;const w=m=>{i.current&&!i.current.contains(m.target)&&l.current&&!l.current.contains(m.target)&&t(!1)},E=(h=(v=i.current)===null||v===void 0?void 0:v.getRootNode())!==null&&h!==void 0?h:document;return e&&E.addEventListener("mousedown",w),()=>{E.removeEventListener("mousedown",w)}},[e]);const g=v=>{var h;const w=p();if(it("RESTORE requested",{targetSession:v.slice(-12),currentSession:w==null?void 0:w.slice(-12)}),v===w)return it("RESTORE skipped - already on this session"),void t(!1);const E=(k=>{var S;return((S=An()[k])===null||S===void 0?void 0:S.messages)||[]})(v).filter(k=>{var S;return(S=k.content)===null||S===void 0?void 0:S.trim()});it("Stored messages from our localStorage",{count:E.length,ids:E.map(k=>k.id.slice(-8))});const m=E.map(k=>({id:k.id,content:k.content,sender:k.sender.toUpperCase(),type:k.type||"string",timestamp:new Date(k.timestamp).toISOString()}));var C;u(v),it("Session ID updated",{newSession:v.slice(-12)}),c(m),it("replaceMessages called",{count:m.length}),C=(h=l.current)===null||h===void 0?void 0:h.getRootNode(),setTimeout(()=>{const k=(C||document).querySelector(".rcb-chat-body-container");k&&k.querySelectorAll(".rcb-bot-message").forEach(S=>{var D;let I=S.innerHTML,Q=!1;I.includes("](")&&(I=I.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),Q=!0),I.includes("<a href=")&&(I=I.replace(/<a\s+href=["']([^"']+)["'][^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),(I.includes("<a ")||!((D=S.textContent)===null||D===void 0)&&D.includes("<a href="))&&(S.textContent||"").includes("<a href=")&&(I=I.replace(/<a\s+href="([^"]+)"[^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),Q&&(S.innerHTML=I)})},50),d(!1),it("Chat input enabled after restore"),t(!1)};return f.createElement("div",{style:{position:"relative"}},f.createElement("button",{ref:l,className:"history-button",onClick:()=>{if(!e&&(n((()=>{const v=An();return Object.entries(v).map(h=>{let[w,E]=h;return Object.assign({sessionId:w},E)}).sort((h,w)=>new Date(w.startedAt).getTime()-new Date(h.startedAt).getTime())})()),l.current)){const v=l.current.closest(".rcb-chat-window");if(v){const h=v.getBoundingClientRect(),w=l.current.getBoundingClientRect();A(h.width+3),s(h.right-w.right-18+4)}}t(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},f.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},f.createElement("circle",{cx:"12",cy:"12",r:"10"}),f.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&f.createElement("div",{ref:i,role:"menu",style:{position:"absolute",right:a?`-${a}px`:"-18px",top:"100%",marginTop:"8px",width:o?`${o}px`:"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},r.length===0?f.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(v=>f.createElement("button",{key:v.sessionId,role:"menuitem",onClick:()=>g(v.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:h=>{h.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"}},f.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},v.preview||"New conversation"),f.createElement("span",{style:{fontSize:"12px",color:"#888"}},(h=>{const w=new Date(h),E=new Date().getTime()-w.getTime(),m=Math.floor(E/864e5);return m===0?w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):m===1?"Yesterday":m<7?w.toLocaleDateString([],{weekday:"short"}):w.toLocaleDateString([],{month:"short",day:"numeric"})})(v.startedAt))))))},ii=e=>{var{width:t=24,height:r=24,color:n="currentColor",children:o}=e,A=qr(e,["width","height","color","children"]);return f.createElement("svg",dn({xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},A),o)},fc=e=>f.createElement(ii,e,f.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),pc=()=>{const{restartFlow:e}=bn(),{setTextAreaValue:t}=So(),{messages:r}=Xt(),{getSessionId:n,resetSession:o,clearResettingFlag:A}=Or(),{trackEvent:a}=JA();return f.createElement("button",{onClick:async()=>{const s=n(),i=s?oi(s):0;a({type:"chatbot_new_chat",previousMessageCount:i}),o(),await t(""),await e(),setTimeout(()=>{A()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:s=>{s.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:s=>{s.target.style.backgroundColor="var(--primaryColor, #107180)"}},f.createElement(fc,{width:16,height:16}),"New Chat")};function Nr(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(Nr).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return Nr(t.children)}return""}const gc=()=>{const{getSessionId:e}=Or(),t=f.useCallback(r=>{var n;const o=(n=r.data)===null||n===void 0?void 0:n.message;if(!(o!=null&&o.id))return;const A=o.sender,a=o.type||"string";let s;if(s=typeof o.content=="string"?o.content:Nr(o.content),ac("TRACKED",{id:o.id,sender:A,content:s.substring(0,50)+(s.length>50?"...":"")}),s.includes("rcb-options-container")||!s.trim())return;const i=e();lc(i,o.id,s,A,a)},[e]);return f.useEffect(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},hc=()=>(f.useEffect(()=>{const e=A=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(A.key))return;const a=document.activeElement;if(a&&(a.tagName==="INPUT"||a.tagName==="TEXTAREA"||a.contentEditable==="true"||a.classList.contains("rcb-chat-input-textarea")))return;const s=document.querySelector(".rcb-chat-window");if(!s)return;const i=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(d=>d.offsetParent!==null);if(i.length>0){const d=i[i.length-1].querySelector(".rcb-checkbox-container");if(d&&d.offsetParent!==null){const u=Array.from(d.querySelectorAll(".rcb-checkbox-row-container")),p=d.querySelector(".rcb-checkbox-next-button");if(u.length>0){const g=[...u];return p&&g.push(p),void((v,h)=>{v.preventDefault();let w=-1;for(let m=0;m<h.length;m++)if(h[m]===document.activeElement||h[m].contains(document.activeElement)){w=m;break}w===-1&&(w=0);let E=w;switch(v.key){case"ArrowDown":case"ArrowRight":E=w<h.length-1?w+1:0;break;case"ArrowUp":case"ArrowLeft":E=w>0?w-1:h.length-1;break;case"Home":E=0;break;case"End":E=h.length-1;break;case"Enter":case" ":{const m=h[w],C=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void m.dispatchEvent(C)}default:return}h[E].focus(),h[E].setAttribute("tabindex","0"),h[E].classList.add("keyboard-focused"),h.forEach((m,C)=>{C!==E&&(m.setAttribute("tabindex","-1"),m.classList.remove("keyboard-focused"))})})(A,g)}}}let l=[];if(i.length>0){const d=i[i.length-1],u=Array.from(d.querySelectorAll(".rcb-options-container")).filter(p=>p.offsetParent!==null);if(u.length>0){const p=u[u.length-1];l=Array.from(p.querySelectorAll(".rcb-options"))}}if(l.length===0)return;const c=l.findIndex(d=>d===document.activeElement);switch(A.key){case"ArrowDown":case"ArrowRight":{let d;A.preventDefault(),d=c<l.length-1?c+1:0,l[d].setAttribute("tabindex","0"),l.forEach((u,p)=>{p!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[d].classList.add("keyboard-focused"),l[d].focus();break}case"ArrowUp":case"ArrowLeft":{let d;A.preventDefault(),d=c>0?c-1:l.length-1,l[d].setAttribute("tabindex","0"),l.forEach((u,p)=>{p!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[d].classList.add("keyboard-focused"),l[d].focus();break}case"Enter":case" ":if(A.preventDefault(),document.activeElement&&l.includes(document.activeElement)){const d=document.activeElement;if(d.classList.contains("rcb-checkbox-row-container")||d.closest(".rcb-checkbox-row-container")){const u=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});d.dispatchEvent(u);const p=d.querySelector(".rcb-checkbox-label"),g=p?p.textContent:d.textContent||"checkbox",v=d.querySelector(".rcb-checkbox-mark"),h=v&&v.style.backgroundColor?"checked":"unchecked";t(`${g} ${h}`)}else{const u=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});d.dispatchEvent(u);const p=d.textContent||d.innerText;t(`Selected: ${p}`)}}break;case"Home":A.preventDefault(),l.length>0&&(l[0].setAttribute("tabindex","0"),l.forEach((d,u)=>{u!==0&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[0].classList.add("keyboard-focused"),l[0].focus());break;case"End":if(A.preventDefault(),l.length>0){const d=l.length-1;l[d].setAttribute("tabindex","0"),l.forEach((u,p)=>{p!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[d].classList.add("keyboard-focused"),l[d].focus()}}},t=A=>{const a=document.createElement("div");a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true"),a.className="sr-only",a.textContent=A,document.body.appendChild(a),setTimeout(()=>{document.body.contains(a)&&document.body.removeChild(a)},1e3)},r=(A=null)=>{let a=A;if(a||(a=document.querySelector(".rcb-chat-window"),a||(a=document.querySelector('[class*="rcb-chat"]')),a||(a=document.querySelector(".qa-bot"))),!a)return;const s=a.closest(".embedded-qa-bot")!==null,i=Array.from(a.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(i.length===0)return;const l=i[i.length-1],c=Array.from(l.querySelectorAll(".rcb-options-container")).filter(u=>u.offsetParent!==null);let d=[];if(c.length>0){const u=c[c.length-1];d=Array.from(u.querySelectorAll(".rcb-options"))}if(d.length===0){let u=l.querySelector(".rcb-checkbox-container");if(!u&&a&&(u=a.querySelector(".rcb-checkbox-container")),u&&u.offsetParent!==null){const p=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")).filter(g=>g.offsetParent!==null&&g.style.display!=="none");if(p.length>0){const g=u.querySelector(".rcb-checkbox-next-button"),v=[...p];if(g&&g.offsetParent!==null&&v.push(g),v.forEach((h,w)=>{h.setAttribute("tabindex",w===0?"0":"-1"),w===0?h.classList.add("keyboard-focused"):h.classList.remove("keyboard-focused")}),p.length>1){u.querySelectorAll(".keyboard-nav-hint").forEach(w=>w.remove());const h=document.createElement("div");h.className="keyboard-nav-hint",h.textContent="Use arrow keys โ to navigate, Enter to select/deselect, or click any option",h.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(h,u.firstChild)}return void setTimeout(()=>{v[0]&&v[0].offsetParent!==null&&!s&&v[0].focus()},150)}}}if(d.length>0){if(d.forEach((u,p)=>{const g=p===0?"0":"-1";u.setAttribute("tabindex",g),u.setAttribute("role","option"),u.setAttribute("aria-posinset",p+1),u.setAttribute("aria-setsize",d.length),p===0?u.classList.add("keyboard-focused"):u.classList.remove("keyboard-focused")}),d.length>1){const u=c.length>0?c[c.length-1]:null;if(u){u.querySelectorAll(".keyboard-nav-hint").forEach(g=>g.remove());const p=document.createElement("div");p.className="keyboard-nav-hint",p.textContent="Use arrow keys โ to navigate, Enter to select, or click any option",p.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(p,u.firstChild)}}else{const u=c.length>0?c[c.length-1]:null;u&&u.querySelectorAll(".keyboard-nav-hint").forEach(p=>p.remove())}setTimeout(()=>{d[0]&&d[0].offsetParent!==null&&!s&&(d[0].focus(),d.length>1&&t(`${d.length} options available. Use arrow keys to navigate.`))},200)}},n=new MutationObserver(A=>{A.forEach(a=>{var s,i;if(a.type==="childList"){const l=Array.from(a.addedNodes),c=l.some(u=>{var p,g,v,h;return u.nodeType===Node.ELEMENT_NODE&&(((p=u.classList)==null?void 0:p.contains("rcb-options-container"))||((g=u.classList)==null?void 0:g.contains("rcb-options"))||((v=u.querySelector)==null?void 0:v.call(u,".rcb-options-container"))||((h=u.querySelector)==null?void 0:h.call(u,".rcb-options")))}),d=l.some(u=>{var p,g;return u.nodeType===Node.ELEMENT_NODE&&(((p=u.classList)==null?void 0:p.contains("rcb-checkbox-container"))||((g=u.querySelector)==null?void 0:g.call(u,".rcb-checkbox-container")))});if(c||d){let u=a.target;for(;u&&!((s=u.classList)!=null&&s.contains("qa-bot"))&&!((i=u.classList)!=null&&i.contains("rcb-chat-window"));)u=u.parentElement;(u||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(p=>{p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused")}),setTimeout(()=>r(u),100)}}})});n.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),r();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(A=>{const a=A.querySelectorAll(".rcb-options-container .rcb-options").length>0,s=A.querySelectorAll(".rcb-checkbox-row-container").length>0;if(a){const i=A.querySelectorAll(".rcb-options[tabindex]").length;A.querySelectorAll(".rcb-options").length>i&&r(A)}if(s){const i=A.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;A.querySelectorAll(".rcb-checkbox-row-container").length>i&&r(A)}})},1e3);return()=>{document.removeEventListener("keydown",e),n.disconnect(),clearInterval(o)}},[]),null);let si=!1,Mn=null;function ai(){return si?Promise.resolve():Mn||(Mn=new Promise((e,t)=>{const r=document.createElement("script");r.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",r.async=!0,r.onload=()=>{si=!0,on("Script loaded"),e()},r.onerror=()=>{Mn=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(r)}),Mn)}const sn=e=>{if(!e||typeof e!="string")return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),r=>{let n=r,o="";const A=n.match(/([.,;:!?]+)$/);return A&&(o=A[1],n=n.slice(0,-o.length)),`[${n}](${n})${o}`}),t},mc=e=>{let{siteKey:t,onVerify:r,onError:n,loginUrl:o}=e;const A=f.useRef(null),a=f.useRef(null),s=f.useRef(!1),i=f.useRef(null),l=f.useRef(null),[c,d]=f.useState(!1),[u,p]=f.useState(0),g=f.useRef("widget_error"),v=f.useRef(null),h=o&&o!=="/login",w=f.useCallback(()=>{const C=window.turnstile;if(i.current&&(C!=null&&C.remove)){try{C.remove(i.current)}catch{}i.current=null}},[]),E=f.useCallback(()=>{var C;w(),c?n==null||n(g.current,(C=v.current)!==null&&C!==void 0?C:void 0):n==null||n("user_cancelled")},[n,w,c]);f.useEffect(()=>()=>{w()},[w]),f.useEffect(()=>{var C;return l.current=document.activeElement,(C=a.current)===null||C===void 0||C.focus(),()=>{l.current&&typeof l.current.focus=="function"&&l.current.focus()}},[]),f.useEffect(()=>{const C=k=>{if(k.key==="Escape")return k.preventDefault(),void E();if(k.key==="Tab"&&a.current){const S=a.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(S.length===0)return;const D=S[0],I=S[S.length-1];k.shiftKey&&document.activeElement===D?(k.preventDefault(),I.focus()):k.shiftKey||document.activeElement!==I||(k.preventDefault(),D.focus())}};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[E]),f.useEffect(()=>{s.current||!A.current||c||(s.current=!0,ai().then(()=>{const C=window.turnstile;if(!C||!A.current)return Be("Turnstile API not available after script load"),g.current="api_unavailable",void d(!0);i.current=C.render(A.current,{sitekey:t,callback:k=>{on("Visible challenge completed"),r(k)},"error-callback":k=>(Be("Turnstile challenge failed:",k),v.current=k,g.current="widget_error",w(),d(!0),!0),"expired-callback":()=>{Be("Turnstile token expired"),g.current="token_expired",w(),d(!0)}})}).catch(C=>{Be("Failed to load Turnstile script:",C),g.current="script_load_failed",d(!0)}))},[t,r,c]);const m=f.createElement(f.Fragment,null,f.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),f.createElement("div",{ref:a,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},f.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),c?f.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},u===0?f.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",h&&f.createElement(f.Fragment,null,", or"," ",f.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):f.createElement(f.Fragment,null,f.createElement("p",{style:{margin:"0 0 8px 0"}},"Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."),f.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",h&&f.createElement(f.Fragment,null," ",f.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),f.createElement("div",{style:{display:"flex",gap:"8px"}},f.createElement("button",{type:"button",onClick:()=>{w(),s.current=!1,p(C=>C+1),d(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),f.createElement("button",{type:"button",onClick:E,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):f.createElement(f.Fragment,null,f.createElement("div",{ref:A,style:{borderRadius:"8px",overflow:"hidden"}}),f.createElement("button",{type:"button",onClick:E,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return mi.createPortal(m,document.body)};function li(e){const{confidence:t,tools_used:r,metadata:n}=e;if(!(t||r&&r.length!==0))return"";const o=[];return t&&o.push(`โข Confidence: ${t}`),r&&r.length>0&&o.push(`โข Tools used: ${r.join(", ")}`),n!=null&&n.agent&&o.push(`โข Agent: ${n.agent}`),`---
|
|
66
|
+
`),v.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:Object.assign(Object.assign({},s),r),onClick:()=>{i({type:"chatbot_login_clicked",loginUrl:t})}},"Log In"))},jg=()=>v.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},v.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},v.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),v.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Ue=[];for(let e=0;e<256;++e)Ue.push((e+256).toString(16).slice(1));let Ci;const qg=new Uint8Array(16);var Fc={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Hc(e,t,n){var o;if(Fc.randomUUID&&!e)return Fc.randomUUID();const r=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!Ci){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ci=crypto.getRandomValues.bind(crypto)}return Ci(qg)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(i,s=0){return(Ue[i[s+0]]+Ue[i[s+1]]+Ue[i[s+2]]+Ue[i[s+3]]+"-"+Ue[i[s+4]]+Ue[i[s+5]]+"-"+Ue[i[s+6]]+Ue[i[s+7]]+"-"+Ue[i[s+8]]+Ue[i[s+9]]+"-"+Ue[i[s+10]]+Ue[i[s+11]]+Ue[i[s+12]]+Ue[i[s+13]]+Ue[i[s+14]]+Ue[i[s+15]]).toLowerCase()}(r)}function on(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const Wg="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",Gg="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",Vg="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",Yg="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",Kg="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Xg="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Jg=()=>{on()&&console.log("%c QA Bot Core %c v0.4.0 ",Kg,Xg)},Or=function(e){if(on()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Session]%c ${e}`,Wg,"",...n)}},Pt=function(e){if(on()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[History]%c ${e}`,Gg,"",...n)}},Zg=(e,t)=>{on()&&console.log(`%c[Message]%c ${e}`,Vg,"",t)},Wn=function(e){if(on()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Turnstile]%c ${e}`,Yg,"",...n)}},Rc=function(){console.warn(...arguments)},ze=function(){console.error(...arguments)},zc="qa_bot_session_messages",Uc=()=>`qa_bot_session_${Hc()}`,Gn=()=>{try{const e=localStorage.getItem(zc);return e?JSON.parse(e):{}}catch{return{}}},$g=(e,t,n,r,o)=>{const i=Gn();if(!i[e]&&(i[e]={messages:[],startedAt:new Date().toISOString(),preview:""},Pt("NEW session created",{sessionId:e.slice(-12)})),i[e].messages.some(A=>A.id===t))return void Pt("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const s={id:t,content:n,sender:r,type:o,timestamp:Date.now()};i[e].messages.push(s),Pt("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const a=i[e].messages,l=a.find(A=>{var c;return A.sender.toLowerCase()==="bot"&&((c=A.content)===null||c===void 0?void 0:c.trim())&&A.content.length>=100});if(l){const A=l.content;i[e].preview=A.slice(0,50)+(A.length>50?"...":"")}else{const A=a.find(c=>{var d;return c.sender.toLowerCase()==="user"&&((d=c.content)===null||d===void 0?void 0:d.trim())});if(A&&!i[e].preview){const c=A.content;i[e].preview=c.slice(0,50)+(c.length>50?"...":"")}}(A=>{var c;const d=()=>Object.values(A).reduce((u,f)=>u+f.messages.length,0);for(;d()>100&&Object.keys(A).length>1;){const u=(c=Object.entries(A).sort((f,p)=>{let[,w]=f,[,h]=p;return new Date(w.startedAt).getTime()-new Date(h.startedAt).getTime()})[0])===null||c===void 0?void 0:c[0];if(!u)break;delete A[u]}localStorage.setItem(zc,JSON.stringify(A))})(i),Pt("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((A,c)=>A+c.messages.length,0)})},jc=e=>{var t,n;return(n=(t=Gn()[e])===null||t===void 0?void 0:t.messages.length)!==null&&n!==void 0?n:0},em=e=>{const t=Gn()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},qc=v.createContext(void 0),tm=e=>{let{children:t,getSessionId:n,setSessionId:r,resetSession:o,clearResettingFlag:i}=e;return v.createElement(qc.Provider,{value:{getSessionId:n,setSessionId:r,resetSession:o,clearResettingFlag:i}},t)},Si=()=>{const e=v.useContext(qc);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Wc=()=>{const[e,t]=v.useState(!1),[n,r]=v.useState([]),[o,i]=v.useState(null),[s,a]=v.useState(0),l=v.useRef(null),A=v.useRef(null),{replaceMessages:c}=ar(),{toggleTextAreaDisabled:d}=hs(),{setSessionId:u,getSessionId:f}=Si();v.useEffect(()=>{var w,h;const b=g=>{l.current&&!l.current.contains(g.target)&&A.current&&!A.current.contains(g.target)&&t(!1)},x=(h=(w=l.current)===null||w===void 0?void 0:w.getRootNode())!==null&&h!==void 0?h:document;return e&&x.addEventListener("mousedown",b),()=>{x.removeEventListener("mousedown",b)}},[e]);const p=w=>{var h;const b=f();if(Pt("RESTORE requested",{targetSession:w.slice(-12),currentSession:b==null?void 0:b.slice(-12)}),w===b)return Pt("RESTORE skipped - already on this session"),void t(!1);const x=(k=>{var S;return((S=Gn()[k])===null||S===void 0?void 0:S.messages)||[]})(w).filter(k=>{var S;return(S=k.content)===null||S===void 0?void 0:S.trim()});Pt("Stored messages from our localStorage",{count:x.length,ids:x.map(k=>k.id.slice(-8))});const g=x.map(k=>({id:k.id,content:k.content,sender:k.sender.toUpperCase(),type:k.type||"string",timestamp:new Date(k.timestamp).toISOString()}));u(w),Pt("Session ID updated",{newSession:w.slice(-12)}),c(g),Pt("replaceMessages called",{count:g.length}),(k=>{setTimeout(()=>{const S=(k||document).querySelector(".rcb-chat-body-container");S&&S.querySelectorAll(".rcb-bot-message").forEach(E=>{var B;let C=E.innerHTML,M=!1;C.includes("](")&&(C=C.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),M=!0),C.includes("<a href=")&&(C=C.replace(/<a\s+href=["']([^"']+)["'][^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),M=!0),(C.includes("<a ")||!((B=E.textContent)===null||B===void 0)&&B.includes("<a href="))&&(E.textContent||"").includes("<a href=")&&(C=C.replace(/<a\s+href="([^"]+)"[^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),M=!0),M&&(E.innerHTML=C)})},50)})((h=A.current)===null||h===void 0?void 0:h.getRootNode()),d(!1),Pt("Chat input enabled after restore"),t(!1)};return v.createElement("div",{style:{position:"relative"}},v.createElement("button",{ref:A,className:"history-button",onClick:()=>{if(!e&&(r((()=>{const w=Gn();return Object.entries(w).map(h=>{let[b,x]=h;return Object.assign({sessionId:b},x)}).sort((h,b)=>new Date(b.startedAt).getTime()-new Date(h.startedAt).getTime())})()),A.current)){const w=A.current.closest(".rcb-chat-window");if(w){const h=w.getBoundingClientRect(),b=A.current.getBoundingClientRect();i(h.width+3),a(h.right-b.right-18+4)}}t(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},v.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},v.createElement("circle",{cx:"12",cy:"12",r:"10"}),v.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&v.createElement("div",{ref:l,role:"menu",style:{position:"absolute",right:s?`-${s}px`:"-18px",top:"100%",marginTop:"8px",width:o?`${o}px`:"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},n.length===0?v.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):n.map(w=>v.createElement("button",{key:w.sessionId,role:"menuitem",onClick:()=>p(w.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:h=>{h.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"}},v.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},w.preview||"New conversation"),v.createElement("span",{style:{fontSize:"12px",color:"#888"}},(h=>{const b=new Date(h),x=new Date().getTime()-b.getTime(),g=Math.floor(x/864e5);return g===0?b.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g===1?"Yesterday":g<7?b.toLocaleDateString([],{weekday:"short"}):b.toLocaleDateString([],{month:"short",day:"numeric"})})(w.startedAt))))))},Gc=e=>{var{width:t=24,height:n=24,color:r="currentColor",children:o}=e,i=Li(e,["width","height","color","children"]);return v.createElement("svg",Jn({xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},i),o)},nm=e=>v.createElement(Gc,e,v.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),rm=()=>{const{restartFlow:e}=sr(),{setTextAreaValue:t}=hs(),{getSessionId:n,resetSession:r,clearResettingFlag:o}=Si(),{trackEvent:i}=Lc();return v.createElement("button",{onClick:async()=>{const s=n(),a=s?jc(s):0;i({type:"chatbot_new_chat",previousMessageCount:a}),r(),await t(""),await e(),setTimeout(()=>{o()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:s=>{s.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:s=>{s.target.style.backgroundColor="var(--primaryColor, #107180)"}},v.createElement(nm,{width:16,height:16}),"New Chat")};function Pi(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(Pi).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return Pi(t.children)}return""}const om=()=>{const{getSessionId:e}=Si(),t=v.useCallback(n=>{var r;const o=(r=n.data)===null||r===void 0?void 0:r.message;if(!(o!=null&&o.id))return;const i=o.sender,s=o.type||"string";let a;if(a=typeof o.content=="string"?o.content:Pi(o.content),Zg("TRACKED",{id:o.id,sender:i,content:a.substring(0,50)+(a.length>50?"...":"")}),a.includes("rcb-options-container")||!a.trim())return;const l=e();$g(l,o.id,a,i,s)},[e]);return v.useEffect(()=>(window.addEventListener("rcb-pre-inject-message",t),window.addEventListener("rcb-stop-stream-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t),window.removeEventListener("rcb-stop-stream-message",t)}),[t]),null},im=()=>(v.useEffect(()=>{const e=i=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(i.key))return;const s=document.activeElement;if(s&&(s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.contentEditable==="true"||s.classList.contains("rcb-chat-input-textarea")))return;const a=document.querySelector(".rcb-chat-window");if(!a)return;const l=Array.from(a.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(d=>d.offsetParent!==null);if(l.length>0){const d=l[l.length-1].querySelector(".rcb-checkbox-container");if(d&&d.offsetParent!==null){const u=Array.from(d.querySelectorAll(".rcb-checkbox-row-container")),f=d.querySelector(".rcb-checkbox-next-button");if(u.length>0){const p=[...u];return f&&p.push(f),void((w,h)=>{w.preventDefault();let b=-1;for(let g=0;g<h.length;g++)if(h[g]===document.activeElement||h[g].contains(document.activeElement)){b=g;break}b===-1&&(b=0);let x=b;switch(w.key){case"ArrowDown":case"ArrowRight":x=b<h.length-1?b+1:0;break;case"ArrowUp":case"ArrowLeft":x=b>0?b-1:h.length-1;break;case"Home":x=0;break;case"End":x=h.length-1;break;case"Enter":case" ":{const g=h[b],k=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void g.dispatchEvent(k)}default:return}h[x].focus(),h[x].setAttribute("tabindex","0"),h[x].classList.add("keyboard-focused"),h.forEach((g,k)=>{k!==x&&(g.setAttribute("tabindex","-1"),g.classList.remove("keyboard-focused"))})})(i,p)}}}let A=[];if(l.length>0){const d=l[l.length-1],u=Array.from(d.querySelectorAll(".rcb-options-container")).filter(f=>f.offsetParent!==null);if(u.length>0){const f=u[u.length-1];A=Array.from(f.querySelectorAll(".rcb-options"))}}if(A.length===0)return;const c=A.findIndex(d=>d===document.activeElement);switch(i.key){case"ArrowDown":case"ArrowRight":{let d;i.preventDefault(),d=c<A.length-1?c+1:0,A[d].setAttribute("tabindex","0"),A.forEach((u,f)=>{f!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),A[d].classList.add("keyboard-focused"),A[d].focus();break}case"ArrowUp":case"ArrowLeft":{let d;i.preventDefault(),d=c>0?c-1:A.length-1,A[d].setAttribute("tabindex","0"),A.forEach((u,f)=>{f!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),A[d].classList.add("keyboard-focused"),A[d].focus();break}case"Enter":case" ":if(i.preventDefault(),document.activeElement&&A.includes(document.activeElement)){const d=document.activeElement;if(d.classList.contains("rcb-checkbox-row-container")||d.closest(".rcb-checkbox-row-container")){const u=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});d.dispatchEvent(u);const f=d.querySelector(".rcb-checkbox-label"),p=f?f.textContent:d.textContent||"checkbox",w=d.querySelector(".rcb-checkbox-mark"),h=w&&w.style.backgroundColor?"checked":"unchecked";t(`${p} ${h}`)}else{const u=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});d.dispatchEvent(u);const f=d.textContent||d.innerText;t(`Selected: ${f}`)}}break;case"Home":i.preventDefault(),A.length>0&&(A[0].setAttribute("tabindex","0"),A.forEach((d,u)=>{u!==0&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),A[0].classList.add("keyboard-focused"),A[0].focus());break;case"End":if(i.preventDefault(),A.length>0){const d=A.length-1;A[d].setAttribute("tabindex","0"),A.forEach((u,f)=>{f!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),A[d].classList.add("keyboard-focused"),A[d].focus()}}},t=i=>{const s=document.createElement("div");s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),s.className="sr-only",s.textContent=i,document.body.appendChild(s),setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},1e3)},n=(i=null)=>{let s=i;if(s||(s=document.querySelector(".rcb-chat-window"),s||(s=document.querySelector('[class*="rcb-chat"]')),s||(s=document.querySelector(".qa-bot"))),!s)return;const a=s.closest(".embedded-qa-bot")!==null,l=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(l.length===0)return;const A=l[l.length-1],c=Array.from(A.querySelectorAll(".rcb-options-container")).filter(u=>u.offsetParent!==null);let d=[];if(c.length>0){const u=c[c.length-1];d=Array.from(u.querySelectorAll(".rcb-options"))}if(d.length===0){let u=A.querySelector(".rcb-checkbox-container");if(!u&&s&&(u=s.querySelector(".rcb-checkbox-container")),u&&u.offsetParent!==null){const f=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")).filter(p=>p.offsetParent!==null&&p.style.display!=="none");if(f.length>0){const p=u.querySelector(".rcb-checkbox-next-button"),w=[...f];if(p&&p.offsetParent!==null&&w.push(p),w.forEach((h,b)=>{h.setAttribute("tabindex",b===0?"0":"-1"),b===0?h.classList.add("keyboard-focused"):h.classList.remove("keyboard-focused")}),f.length>1){u.querySelectorAll(".keyboard-nav-hint").forEach(b=>b.remove());const h=document.createElement("div");h.className="keyboard-nav-hint",h.textContent="Use arrow keys โ to navigate, Enter to select/deselect, or click any option",h.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(h,u.firstChild)}return void setTimeout(()=>{w[0]&&w[0].offsetParent!==null&&!a&&w[0].focus()},150)}}}if(d.length>0){if(d.forEach((u,f)=>{const p=f===0?"0":"-1";u.setAttribute("tabindex",p),u.setAttribute("role","option"),u.setAttribute("aria-posinset",f+1),u.setAttribute("aria-setsize",d.length),f===0?u.classList.add("keyboard-focused"):u.classList.remove("keyboard-focused")}),d.length>1){const u=c.length>0?c[c.length-1]:null;if(u){u.querySelectorAll(".keyboard-nav-hint").forEach(p=>p.remove());const f=document.createElement("div");f.className="keyboard-nav-hint",f.textContent="Use arrow keys โ to navigate, Enter to select, or click any option",f.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(f,u.firstChild)}}else{const u=c.length>0?c[c.length-1]:null;u&&u.querySelectorAll(".keyboard-nav-hint").forEach(f=>f.remove())}setTimeout(()=>{d[0]&&d[0].offsetParent!==null&&!a&&(d[0].focus(),d.length>1&&t(`${d.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(i=>{i.forEach(s=>{var a,l;if(s.type==="childList"){const A=Array.from(s.addedNodes),c=A.some(u=>{var f,p,w,h;return u.nodeType===Node.ELEMENT_NODE&&(((f=u.classList)==null?void 0:f.contains("rcb-options-container"))||((p=u.classList)==null?void 0:p.contains("rcb-options"))||((w=u.querySelector)==null?void 0:w.call(u,".rcb-options-container"))||((h=u.querySelector)==null?void 0:h.call(u,".rcb-options")))}),d=A.some(u=>{var f,p;return u.nodeType===Node.ELEMENT_NODE&&(((f=u.classList)==null?void 0:f.contains("rcb-checkbox-container"))||((p=u.querySelector)==null?void 0:p.call(u,".rcb-checkbox-container")))});if(c||d){let u=s.target;for(;u&&!((a=u.classList)!=null&&a.contains("qa-bot"))&&!((l=u.classList)!=null&&l.contains("rcb-chat-window"));)u=u.parentElement;(u||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(f=>{f.setAttribute("tabindex","-1"),f.classList.remove("keyboard-focused")}),setTimeout(()=>n(u),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(i=>{const s=i.querySelectorAll(".rcb-options-container .rcb-options").length>0,a=i.querySelectorAll(".rcb-checkbox-row-container").length>0;if(s){const l=i.querySelectorAll(".rcb-options[tabindex]").length;i.querySelectorAll(".rcb-options").length>l&&n(i)}if(a){const l=i.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;i.querySelectorAll(".rcb-checkbox-row-container").length>l&&n(i)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}},[]),null);let Vc=!1,_r=null;function Yc(){return Vc?Promise.resolve():_r||(_r=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.onload=()=>{Vc=!0,Wn("Script loaded"),e()},n.onerror=()=>{_r=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),_r)}const Vn=e=>{if(!e||typeof e!="string")return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),n=>{let r=n,o="";const i=r.match(/([.,;:!?]+)$/);return i&&(o=i[1],r=r.slice(0,-o.length)),`[${r}](${r})${o}`}),t},sm=e=>{let{siteKey:t,onVerify:n,onError:r,loginUrl:o}=e;const i=v.useRef(null),s=v.useRef(null),a=v.useRef(!1),l=v.useRef(null),A=v.useRef(null),[c,d]=v.useState(!1),[u,f]=v.useState(0),p=v.useRef("widget_error"),w=v.useRef(null),h=o&&o!=="/login",b=v.useCallback(()=>{const k=window.turnstile;if(l.current&&(k!=null&&k.remove)){try{k.remove(l.current)}catch{}l.current=null}},[]),x=v.useCallback(()=>{var k;b(),c?r==null||r(p.current,(k=w.current)!==null&&k!==void 0?k:void 0):r==null||r("user_cancelled")},[r,b,c]);v.useEffect(()=>()=>{b()},[b]),v.useEffect(()=>{var k;return A.current=document.activeElement,(k=s.current)===null||k===void 0||k.focus(),()=>{A.current&&typeof A.current.focus=="function"&&A.current.focus()}},[]),v.useEffect(()=>{const k=S=>{if(S.key==="Escape")return S.preventDefault(),void x();if(S.key==="Tab"&&s.current){const E=s.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(E.length===0)return;const B=E[0],C=E[E.length-1];S.shiftKey&&document.activeElement===B?(S.preventDefault(),C.focus()):S.shiftKey||document.activeElement!==C||(S.preventDefault(),B.focus())}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[x]),v.useEffect(()=>{a.current||!i.current||c||(a.current=!0,Yc().then(()=>{const k=window.turnstile;if(!k||!i.current)return ze("Turnstile API not available after script load"),p.current="api_unavailable",void d(!0);l.current=k.render(i.current,{sitekey:t,callback:S=>{Wn("Visible challenge completed"),n(S)},"error-callback":S=>(ze("Turnstile challenge failed:",S),w.current=S,p.current="widget_error",b(),d(!0),!0),"expired-callback":()=>{ze("Turnstile token expired"),p.current="token_expired",b(),d(!0)}})}).catch(k=>{ze("Failed to load Turnstile script:",k),p.current="script_load_failed",d(!0)}))},[t,n,c,b]);const g=v.createElement(v.Fragment,null,v.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),v.createElement("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},v.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),c?v.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},u===0?v.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",h&&v.createElement(v.Fragment,null,", or"," ",v.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):v.createElement(v.Fragment,null,v.createElement("p",{style:{margin:"0 0 8px 0"}},"Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."),v.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",h&&v.createElement(v.Fragment,null," ",v.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),v.createElement("div",{style:{display:"flex",gap:"8px"}},v.createElement("button",{type:"button",onClick:()=>{b(),a.current=!1,f(k=>k+1),d(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),v.createElement("button",{type:"button",onClick:x,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):v.createElement(v.Fragment,null,v.createElement("div",{ref:i,style:{borderRadius:"8px",overflow:"hidden"}}),v.createElement("button",{type:"button",onClick:x,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return oA.createPortal(g,document.body)};function Kc(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&n.length!==0))return"";const o=[];return t&&o.push(`โข Confidence: ${t}`),n&&n.length>0&&o.push(`โข Tools used: ${n.join(", ")}`),r!=null&&r.agent&&o.push(`โข Agent: ${r.agent}`),`---
|
|
39
67
|
${o.join(`
|
|
40
|
-
`)}`}function
|
|
68
|
+
`)}`}function am(e){let{getState:t,onResubmit:n,trackEvent:r,loginUrl:o}=e;var i,s;const[a,l]=v.useState(null),[A,c]=v.useState(0),d=t(),u=(i=sA)!==null&&i!==void 0?i:{},f=u.VITE_FORCE_TURNSTILE_WIDGET==="true",p=(s=d.siteKey)!==null&&s!==void 0?s:f?u.VITE_TURNSTILE_SITE_KEY:null;return p&&(f||a!==p)?v.createElement(sm,{key:A,siteKey:p,loginUrl:o,onVerify:async w=>{const h=p;d.token=w,r==null||r({type:"chatbot_turnstile_completed"}),await n(w)==="needs_another_challenge"?c(b=>b+1):l(h)},onError:(w,h)=>{var b;const x=(b=d.pendingQuery)===null||b===void 0?void 0:b.queryId,g=p;d.token=null,d.pendingQuery=null,d.needsChallenge=!1,d.siteKey=null,l(g),r==null||r({type:"chatbot_turnstile_error",queryId:x,failureReason:w,cloudflareErrorCode:h})}}):null}const lm="#1a5b6e",cm="#107180",Am="Arial, sans-serif",Xc="Q&A Bot",um="/chat-icon.svg",dm="Type your question here...",fm="Select an option to continue",pm=!1,hm="Ask me a question!",Jc="/login",gm={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},Di=v.forwardRef((e,t)=>{var n,r,o;const{apiKey:i,qaEndpoint:s,ratingEndpoint:a,agentRatingEndpoint:l,welcomeMessage:A,open:c,onOpenChange:d,isLoggedIn:u,allowAnonAccess:f=!1,actingUser:p,primaryColor:w,secondaryColor:h,botName:b,logo:x,placeholder:g,errorMessage:k,embedded:S,footerText:E,footerLink:B,tooltipText:C,loginUrl:M,turnstileSiteKey:T,backendId:Q,resourceContext:I,customFlow:O,onAnalyticsEvent:z}=e,L=v.useRef(`bot_${Math.random().toString(36).substr(2,9)}`);v.useEffect(()=>{Jg()},[]);const _=v.useRef(null);_.current===null&&(_.current=Uc(),Or("CREATED",_.current));const F=v.useRef(!1),H=v.useRef({getSessionId:()=>_.current,isResetting:()=>F.current}),m=v.useRef(null),W=function(G,K){const[fe,oe]=v.useState(null),[ve,me]=v.useState("idle"),ge=v.useRef(null),Ie=v.useRef(null),Oe=v.useRef(!0),Dt=v.useCallback(()=>{const Me=window.turnstile;if(Ie.current&&(Me!=null&&Me.remove)){try{Me.remove(Ie.current)}catch{}Ie.current=null}ge.current&&(ge.current.remove(),ge.current=null)},[]);return v.useEffect(()=>{if(Oe.current=!0,!G)return me("idle"),void oe(null);me("loading");const Me=document.createElement("div");return Me.style.position="fixed",Me.style.left="-9999px",Me.style.top="-9999px",Me.style.width="0",Me.style.height="0",Me.style.overflow="hidden",Me.setAttribute("aria-hidden","true"),document.body.appendChild(Me),ge.current=Me,Yc().then(()=>{if(!Oe.current)return;const rt=window.turnstile;if(!rt||!ge.current)return ze("Turnstile API not available for silent verification"),me("failed"),void(K==null||K({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const ke=rt.render(ge.current,{sitekey:G,execution:"render","refresh-expired":"auto",callback:yt=>{Oe.current&&(Wn("Silent verification succeeded"),oe(yt),me("verified"))},"error-callback":yt=>!Oe.current||(ze("Turnstile silent verification failed:",yt),oe(null),me("failed"),K==null||K({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:yt}),!0),"expired-callback":()=>{Oe.current&&(Wn("Token expired, awaiting refresh"),oe(null),me("loading"))}});Ie.current=ke}).catch(rt=>{Oe.current&&(ze("Failed to load Turnstile script for silent verification:",rt),me("failed"),K==null||K({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{Oe.current=!1,Dt()}},[G,Dt]),{token:fe,status:ve,reset:v.useCallback(()=>{const Me=window.turnstile;Ie.current&&(Me!=null&&Me.reset)&&(oe(null),me("loading"),Me.reset(Ie.current),Wn("Token consumed, resetting widget for fresh token"))},[])}}(T,G=>{var K;(K=m.current)===null||K===void 0||K.call(m,G)}),y=v.useRef(null);y.current=W.token;const[V,X]=v.useState(u);v.useEffect(()=>{X(u)},[u]);const Z=S!==void 0?S:pm,$=v.useCallback(G=>{var K;z&&z(Object.assign(Object.assign({},G),{timestamp:Date.now(),sessionId:(K=_.current)!==null&&K!==void 0?K:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:Z}))},[z,Z]);v.useEffect(()=>{m.current=G=>$(G)},[$]);const he=v.useMemo(()=>{const G=Object.assign({},gm);G.general=Object.assign(Object.assign({},G.general),{primaryColor:w||lm,secondaryColor:h||cm,fontFamily:Am,embedded:Z});const K=V===!1?[v.createElement(Wc,{key:"history-button"}),v.createElement(Nc,{key:"login-button",loginUrl:M||Jc,isHeaderButton:!0})]:[v.createElement(Wc,{key:"history-button"}),v.createElement(jg,{key:"user-icon"})];G.header={title:v.createElement("span",{style:{fontSize:14,fontWeight:500}},b||Xc),showAvatar:!0,avatar:x||um,buttons:[...K,Te.CLOSE_CHAT_BUTTON]},G.chatInput=Object.assign(Object.assign({},G.chatInput),{disabled:!1,enabledPlaceholderText:g||dm,disabledPlaceholderText:k||fm}),G.tooltip=Object.assign(Object.assign({},G.tooltip),{text:C||hm});const fe=E?B?v.createElement("a",{href:B,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},E):v.createElement("span",{key:"footer-text"},E):null;return G.footer={text:fe??void 0,buttons:[v.createElement(rm,{key:"new-chat-button"})]},G.chatWindow=Object.assign(Object.assign({},G.chatWindow),{defaultOpen:!!Z}),G.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},G},[w,h,b,x,g,k,Z,C,V,M,E,B]),Ae=v.useRef(null),Je=function(G){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v.useMemo(()=>{const oe=(ve,me)=>{if(G.current){const ge=getComputedStyle(G.current).getPropertyValue(ve);if(ge&&ge.trim()!=="")return ge.trim();if(G.current.parentElement){const Ie=getComputedStyle(G.current.parentElement).getPropertyValue(ve);if(Ie&&Ie.trim()!=="")return Ie.trim()}}return me};return{primaryColor:oe("--primaryColor",K.primaryColor),secondaryColor:oe("--secondaryColor",K.secondaryColor),fontFamily:oe("--fontFamily",K.fontFamily)}},[G,K])}(Ae,he.general);((G,K)=>{v.useEffect(()=>{K.current&&(G?K.current.classList.add("bot-logged-in"):K.current.classList.remove("bot-logged-in"))},[G,K])})(V!==!1,Ae),(G=>{let{settings:K,themeColors:fe}=G;v.useEffect(()=>{fe&&(Object.entries(fe).forEach(oe=>{let[ve,me]=oe;me&&document.documentElement.style.setProperty(`--${ve}`,me)}),fe.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",fe.primaryColor),fe.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",fe.secondaryColor))},[fe]),v.useEffect(()=>{var oe,ve;!((oe=K.header)===null||oe===void 0)&&oe.title&&typeof K.header.title=="string"&&(K.header.title=v.createElement("div",{key:"header-title"},v.createElement("h1",{className:"sr-only"},K.header.title),v.createElement("span",{"aria-hidden":"true"},K.header.title))),K.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},K.chatHistory={disabled:!0},K.chatButton=Object.assign(Object.assign({},K.chatButton),{icon:(ve=K.header)===null||ve===void 0?void 0:ve.avatar}),K.event=Object.assign(Object.assign({},K.event),{rcbToggleChatWindow:!0})},[K])})({settings:he,themeColors:Je});const Qe=v.useMemo(()=>{const G=(fe=>{let{endpoint:oe,ratingEndpoint:ve,agentRatingEndpoint:me,apiKey:ge,sessionId:Ie,isResetting:Oe=()=>!1,isLoggedIn:Dt,allowAnonAccess:Me=!1,loginUrl:rt="/login",trackEvent:ke,getTurnstileToken:yt,resetTurnstileToken:qt,backendId:Wt,resourceContext:ht}=fe;if(Dt===!1&&!Me)return ke==null||ke({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:v.createElement(Nc,{loginUrl:rt}),chatDisabled:!0,path:"qa_loop"}};let ot=null,P=null,R=!1;const N={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let J=null;if(!oe)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async q=>{var pe;J=q.injectMessage.bind(q);const{userInput:we}=q;if((!Oe||!Oe())&&we&&we.trim()!==""){if(we==="๐ Helpful"||we==="๐ Not helpful"){if(ot){const le=we==="๐ Helpful",Se=P==="agent"?me:ve;if(Se)try{const Be={"Content-Type":"application/json"};ge&&(Be["X-API-KEY"]=ge);const ne=Ie();ne&&(Be["X-Session-ID"]=ne,Be["X-Query-ID"]=ot),await fetch(Se,{method:"POST",headers:Be,credentials:"include",body:JSON.stringify(P==="agent"?{query_id:ot,rating:le?"helpful":"not_helpful",session_id:ne}:{sessionId:ne,queryId:ot,rating:le?1:0})}),ke==null||ke({type:"chatbot_rating_sent",queryId:ot,rating:le?"helpful":"not_helpful"})}catch(Be){ze("Error sending feedback:",Be)}}return"Thanks for the feedback!"}try{const le=Hc();ot=le,ke==null||ke({type:"chatbot_question_sent",queryId:le,questionLength:we.length});const Se={"Content-Type":"application/json"};ge&&(Se["X-API-KEY"]=ge);const Be=Ie();Be&&(Se["X-Session-ID"]=Be,Se["X-Query-ID"]=le),Se["X-Origin"]=ht||"access";const ne={query:we,question_id:le};Be&&(ne.session_id=Be),Wt&&(ne._backend=Wt),ht&&(ne.rp_name=ht,ne.resource_context=ht);const _e=yt==null?void 0:yt();_e&&(ne.turnstile_token=_e),Or("SENT to API",{session_id:Be,question_id:le});const Pe=Date.now(),Gt=await fetch(oe,{method:"POST",headers:Se,credentials:"include",body:JSON.stringify(ne)});if(!Gt.ok)throw new Error(`API returned ${Gt.status}`);if((Gt.headers.get("content-type")||"").includes("text/event-stream")){qt==null||qt();const Ur=(pe=Gt.body)===null||pe===void 0?void 0:pe.getReader();if(!Ur)throw new Error("Response body is not readable");const _i=new TextDecoder;let Bt="",_t="",Yt=!1;try{for(;;){const{done:Kt,value:Tt}=await Ur.read();if(Kt)break;Bt+=_i.decode(Tt,{stream:!0});let En=Bt.indexOf(`
|
|
41
69
|
|
|
42
|
-
`);for(;
|
|
43
|
-
`))
|
|
70
|
+
`);for(;En!==-1;){const Wm=Bt.slice(0,En);Bt=Bt.slice(En+2);let Cn,Sn="",jr="";for(const Ye of Wm.split(`
|
|
71
|
+
`))Ye.startsWith("event: ")?Sn=Ye.slice(7):Ye.startsWith("data: ")&&(jr=Ye.slice(6));if(Sn&&jr){try{Cn=JSON.parse(jr)}catch{Rc("Failed to parse SSE data:",jr),En=Bt.indexOf(`
|
|
44
72
|
|
|
45
|
-
`);continue}if(
|
|
73
|
+
`);continue}if(Sn==="status"){const Ye=Cn.message||"Processing...";await q.streamMessage(`_${Ye}_`,"BOT"),Yt=!0}else if(Sn==="token"){_t+=Cn.content||"";const Ye=Vn(_t);await q.streamMessage(Ye,"BOT")}else if(Sn==="done"){const Ye=Cn.metadata||{};if(P=Ye.rating_target||null,R=Ye.is_final_response===!0,_t)await q.endStreamMessage("BOT");else{const nA=Cn.response||"";if(nA){const Gm=Vn(nA);await q.streamMessage(Gm,"BOT"),Yt=!0}Yt&&await q.endStreamMessage("BOT")}}else if(Sn==="error"){const Ye=Cn.message||"An error occurred";ze("SSE error event:",Ye),Yt?(await q.streamMessage(Ye,"BOT"),await q.endStreamMessage("BOT")):await q.injectMessage(Ye)}En=Bt.indexOf(`
|
|
46
74
|
|
|
47
|
-
`)}else
|
|
75
|
+
`)}else En=Bt.indexOf(`
|
|
48
76
|
|
|
49
|
-
`)}}
|
|
77
|
+
`)}}Yt&&await q.endStreamMessage("BOT")}catch(Kt){if(ze("Error reading SSE stream:",Kt),!Yt)throw Kt;await q.streamMessage("I had trouble completing the response. Please try again.","BOT"),await q.endStreamMessage("BOT")}const xn=Date.now()-Pe;return void(ke==null||ke({type:"chatbot_answer_received",queryId:le,responseTimeMs:xn,success:!0,responseLength:_t.length}))}const Rr=Date.now()-Pe,It=await Gt.json();if(It.requires_turnstile)return ke==null||ke({type:"chatbot_turnstile_shown",queryId:le}),N.siteKey=It.site_key,N.pendingQuery={query:we,sessionId:Be,queryId:le},N.needsChallenge=!0,"One moment โ verifying your sessionโฆ";qt==null||qt();const kn=It.response||It.answer||It.text||It.message;if(!kn)throw new Error("Invalid response format from API");const zr=It.metadata||{};P=zr.rating_target||null,R=zr.is_final_response===!0;const Ot=Vn(kn),Vt=on()?Kc(It):"",Xn=Vt?`${Ot}
|
|
50
78
|
|
|
51
|
-
${
|
|
79
|
+
${Vt}`:Ot;return await q.injectMessage(Xn),void(ke==null||ke({type:"chatbot_answer_received",queryId:le,responseTimeMs:Rr,success:!0,responseLength:kn.length,hasMetadata:!!Vt}))}catch(le){return ze("Error in Q&A flow:",le),ke==null||ke({type:"chatbot_answer_error",queryId:ot??void 0,errorType:le instanceof Error?le.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:q=>Oe&&Oe()||q.userInput==="๐ Helpful"||q.userInput==="๐ Not helpful"||N.needsChallenge?[]:R&&P&&(P==="agent"?me:ve)?["๐ Helpful","๐ Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:v.createElement(am,{getState:()=>N,onResubmit:async q=>{var pe;if(!N.pendingQuery||!J)return ze("Turnstile resubmit called without pending query or injectMessage"),"error";try{const we={"Content-Type":"application/json"};ge&&(we["X-API-KEY"]=ge),N.pendingQuery.sessionId&&(we["X-Session-ID"]=N.pendingQuery.sessionId,we["X-Query-ID"]=N.pendingQuery.queryId),we["X-Origin"]=ht||"access";const le={query:N.pendingQuery.query,question_id:N.pendingQuery.queryId,turnstile_token:q};N.pendingQuery.sessionId&&(le.session_id=N.pendingQuery.sessionId),Wt&&(le._backend=Wt),ht&&(le.rp_name=ht,le.resource_context=ht);const Se=await fetch(oe,{method:"POST",headers:we,credentials:"include",body:JSON.stringify(le)}),Be=N.pendingQuery.queryId;if(!Se.ok)throw new Error(`API returned ${Se.status} after Turnstile`);if((Se.headers.get("content-type")||"").includes("text/event-stream")){const kn=(pe=Se.body)===null||pe===void 0?void 0:pe.getReader();if(!kn)throw new Error("Response body is not readable");const zr=new TextDecoder;let Ot="",Vt="",Xn={};for(;;){const{done:_i,value:Bt}=await kn.read();if(_i)break;Ot+=zr.decode(Bt,{stream:!0});let _t=Ot.indexOf(`
|
|
52
80
|
|
|
53
|
-
`);for(;
|
|
54
|
-
`))
|
|
81
|
+
`);for(;_t!==-1;){const Yt=Ot.slice(0,_t);Ot=Ot.slice(_t+2);let xn="",Kt="";for(const Tt of Yt.split(`
|
|
82
|
+
`))Tt.startsWith("event: ")?xn=Tt.slice(7):Tt.startsWith("data: ")&&(Kt=Tt.slice(6));if(xn&&Kt)try{const Tt=JSON.parse(Kt);xn==="token"?Vt+=Tt.content||"":xn==="done"&&(Xn=Tt.metadata||{})}catch{}_t=Ot.indexOf(`
|
|
55
83
|
|
|
56
|
-
`)}}if(
|
|
84
|
+
`)}}if(N.token=null,N.pendingQuery=null,N.needsChallenge=!1,N.siteKey=null,!Vt)throw new Error("No content received from stream");P=Xn.rating_target||null,R=Xn.is_final_response===!0,ot=Be;const Ur=Vn(Vt);return await J(Ur),ke==null||ke({type:"chatbot_answer_received",queryId:Be,success:!0,responseLength:Vt.length}),"success"}const ne=await Se.json();if(ne.requires_turnstile)return N.siteKey=ne.site_key,N.token=null,await J("Still verifying โ please complete the challenge again."),"needs_another_challenge";N.token=null,N.pendingQuery=null,N.needsChallenge=!1,N.siteKey=null;const _e=ne.response||ne.answer||ne.text||ne.message;if(!_e)throw new Error("Invalid response format from API");const Pe=ne.metadata||{};P=Pe.rating_target||null,R=Pe.is_final_response===!0,ot=Be;const Gt=Vn(_e),Rr=on()?Kc(ne):"",It=Rr?`${Gt}
|
|
57
85
|
|
|
58
|
-
${Hn}`:bt;return await re(at),be==null||be({type:"chatbot_answer_received",queryId:ie,success:!0,responseLength:Oe.length}),"success"}catch(ye){return Be("Error resubmitting after Turnstile:",ye),W.token=null,W.pendingQuery=null,W.needsChallenge=!1,W.siteKey=null,await(re==null?void 0:re("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:be,loginUrl:$e}),path:"qa_loop"}}})({endpoint:a,ratingEndpoint:s,agentRatingEndpoint:l,apiKey:A,sessionId:y.current.getSessionId,isResetting:y.current.isResetting,isLoggedIn:K,allowAnonAccess:g,loginUrl:x||ui,trackEvent:de,getTurnstileToken:()=>R.current,resetTurnstileToken:()=>b.reset(),backendId:B,resourceContext:_});return Object.assign(Object.assign({start:{message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},j),U||{})},[A,a,s,l,c,K,g,x,U,v,de,_,B]),Je=f.useMemo(()=>{return[()=>Xs(G),Xl(),()=>Jl(j)];var j,G},[]);return f.useEffect(()=>{const j=()=>{const ae=document.querySelector(".rcb-chat-window");if(!ae)return;const ne=ae.querySelector(".rcb-send-button");ne&&(ne.hasAttribute("tabindex")||ne.setAttribute("tabindex","0"),ne.hasAttribute("data-keyboard-enabled")||(ne.setAttribute("data-keyboard-enabled","true"),ne.addEventListener("keydown",me=>{if(me.key==="Enter"||me.key===" "){me.preventDefault();const fe=ne&&Object.keys(ne).find(Me=>Me.startsWith("__reactProps"));if(fe){const Me=ne[fe],De=Me==null?void 0:Me.onMouseDown;if(De&&typeof De=="function")return void De(me)}const le=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});ne.dispatchEvent(le)}})))},G=setInterval(j,1e3);return j(),()=>clearInterval(G)},[]),hc(),f.useEffect(()=>{const j=He.current;if(!j)return;const G=ae=>{var ne,me,fe;const le=(me=(ne=ae.target).closest)===null||me===void 0?void 0:me.call(ne,"a");le&&le.closest(".rcb-chat-body-container")&&(le.classList.contains("qa-bot-login-button")||le.closest(".rcb-options-container")||de({type:"chatbot_link_clicked",linkUrl:le.href,linkText:((fe=le.textContent)===null||fe===void 0?void 0:fe.trim())||""}))};return j.addEventListener("click",G),()=>j.removeEventListener("click",G)},[de]),f.useEffect(()=>{if(!$){const j=G=>{const ae=G.data.newState;u==null||u(ae);const ne=M.current;de(ae?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:ne?oi(ne):0,durationMs:ne?cc(ne):0})};return window.addEventListener("rcb-toggle-chat-window",j),()=>{window.removeEventListener("rcb-toggle-chat-window",j)}}},[$,u,de]),f.createElement("div",{className:"qa-bot "+(!((r=oe.general)===null||r===void 0)&&r.embedded?"embedded-qa-bot":""),ref:He,role:"region","aria-label":`${E||ci}${!((n=oe.general)===null||n===void 0)&&n.embedded?" - Embedded":""}`},f.createElement(uc,{getSessionId:()=>M.current,setSessionId:j=>{const G=M.current;M.current=j,Qn("RESTORED",`${G==null?void 0:G.slice(-12)} -> ${j.slice(-12)}`)},resetSession:()=>{const j=M.current;L.current=!0,M.current=ri(),Qn("RESET",`${j==null?void 0:j.slice(-12)} -> ${M.current.slice(-12)}`)},clearResettingFlag:()=>{L.current=!1}},f.createElement(Zl,{trackEvent:de},f.createElement(Co,null,f.createElement("div",null,f.createElement(gc,null),f.createElement(KA,{ref:t,embedded:((o=oe.general)===null||o===void 0?void 0:o.embedded)||!1,currentOpen:d||!1,enabled:K!==!1,onSetEnabled:j=>Y(!!j&&void 0)}),f.createElement(Ts,{key:`chatbot-${F.current}-${K}`,settings:oe,flow:xe,plugins:Je}),f.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),f.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});Lr.displayName="QABot";const Bc=()=>{const[e,t]=f.useState(!1),r=()=>typeof navigator<"u"&&navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!r())throw new Error("Screen capture is not available in this environment");try{t(!0);const n=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),o=document.createElement("video");o.srcObject=n,await new Promise(c=>{o.onloadedmetadata=()=>{o.play(),c()}});const A=document.createElement("canvas");A.width=o.videoWidth,A.height=o.videoHeight;const a=A.getContext("2d");if(!a)throw new Error("Could not get canvas context");a.drawImage(o,0,0,A.width,A.height);const s=await new Promise(c=>A.toBlob(c,"image/png"));if(!s)throw new Error("Could not create image blob");const i=new Date().toISOString().replace(/[:.]/g,"-"),l=new File([s],`screenshot-${i}.png`,{type:"image/png"});return n.getTracks().forEach(c=>c.stop()),t(!1),l}catch(n){throw Be("Error capturing screenshot:",n),t(!1),n}},isCapturing:e,isScreenCaptureAvailable:r()}},xc=e=>f.createElement(ii,e,f.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),f.createElement("polyline",{points:"17 8 12 3 7 8"}),f.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Ic=e=>new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{if(typeof n.result!="string")return void r(new Error(`Failed to read file ${e.name}`));const o=n.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},n.onerror=()=>r(new Error(`Failed to read file ${e.name}`)),n.readAsDataURL(e)}),Tc=e=>Promise.all(e.map(Ic)),Qc=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,_n=e=>{let{onFileUpload:t,maxSizeMB:r=10,acceptedTypes:n="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:A}=e;const[a,s]=f.useState(!1),[i,l]=f.useState([]),[c,d]=f.useState(null),u=f.useRef(null),{captureScreenshot:p,isCapturing:g,isScreenCaptureAvailable:v}=Bc(),h=S=>{const D=document.createElement("div");D.setAttribute("aria-live","assertive"),D.setAttribute("aria-atomic","true"),D.className="sr-only",D.textContent=S,document.body.appendChild(D),setTimeout(()=>document.body.removeChild(D),1e3)},w=S=>{if(!S||S.length===0)return void ti("FileUploadComponent: No valid files provided to handleFiles");let D;try{D=Array.from(S)}catch(O){return Be("FileUploadComponent: Error converting files to array:",O),void h("Error processing selected files. Please try again.")}const I=[...i,...D];l(I);const Q=D.length,x=D.map(O=>O.name).join(", ");h(`${Q} file${Q>1?"s":""} selected: ${x}`),setTimeout(()=>{const O=document.querySelector(".rcb-chat-content");O&&(O.scrollTop=O.scrollHeight)},100),t&&t(I)},E=S=>{S.preventDefault(),S.stopPropagation(),S.type==="dragenter"||S.type==="dragover"?s(!0):S.type==="dragleave"&&s(!1)},m=()=>{try{u.current&&u.current.click()}catch(S){Be("FileUploadComponent: Error in handleButtonClick:",S),h("Error opening file selection dialog. Please try again.")}},C=()=>{d(null)},k=o&&v;return f.createElement("div",{className:`file-upload-container ${A||""}`,style:{padding:"16px",margin:"8px 0"}},k&&f.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},f.createElement("button",{onClick:S=>{S.preventDefault(),(async()=>{try{const D=await p();w([D]),h("Screenshot captured successfully")}catch{h("Error capturing screenshot. Please try again.")}})()},disabled:g,"aria-describedby":"screenshot-help","aria-label":g?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:g?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},f.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},f.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),f.createElement("circle",{cx:"12",cy:"13",r:"4"})),g?"Taking screenshot...":"Take screenshot..."),f.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),f.createElement("div",{className:"file-upload-dropzone "+(a?"active":""),onDragEnter:E,onDragLeave:E,onDragOver:E,onDrop:S=>{var D;S.preventDefault(),S.stopPropagation(),s(!1);try{!((D=S.dataTransfer)===null||D===void 0)&&D.files&&S.dataTransfer.files.length>0&&w(S.dataTransfer.files)}catch(I){Be("FileUploadComponent: Error in handleDrop:",I),h("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:S=>{S.key!=="Enter"&&S.key!==" "||(S.preventDefault(),m())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:a?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},f.createElement("input",{ref:u,type:"file",className:"file-input",onChange:S=>{var D;try{!((D=S.target)===null||D===void 0)&&D.files&&S.target.files.length>0&&w(S.target.files)}catch(I){Be("FileUploadComponent: Error in handleFileSelect:",I),h("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:n}),f.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},f.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},f.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},f.createElement(xc,null),f.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),f.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",r,"MB each)")),i.length>0&&f.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},f.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),i.map((S,D)=>f.createElement("span",{key:D,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:I=>{I.stopPropagation(),(Q=>{d(Q)})(S)}},f.createElement("span",{onClick:I=>{I.stopPropagation(),(Q=>{const x=i.filter((O,B)=>B!==Q);l(x),t&&t(x)})(D)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${S.name}`},"ร"),S.name," (",Qc(S.size),")"))))),(()=>{if(!c)return null;const S=c.type.startsWith("image/"),D=c.type.startsWith("text/"),I=c.type==="application/pdf";return f.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:C},f.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:Q=>Q.stopPropagation()},f.createElement("button",{onClick:C,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"ร"),f.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},c.name),S&&f.createElement("img",{src:URL.createObjectURL(c),alt:c.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),D&&f.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(c)),I&&f.createElement("iframe",{src:URL.createObjectURL(c),style:{width:"100%",height:"70vh",border:"none"},title:c.name}),!S&&!D&&!I&&f.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Mc(e,t){if(!t||Object.keys(t).length===0)return e;const r={};for(const[n,o]of Object.entries(e)){let A=Object.assign({},o);if(A.chatDisabled===void 0){const a=!(!A.options&&!A.checkboxes);A.chatDisabled=a}r[n]=A}return r}function On(e){return async t=>{const r=await e(t);await t.injectMessage(r)}}const _c=f.forwardRef((e,t)=>{var{defaultOpen:r}=e,n=qr(e,["defaultOpen"]);const[o,A]=f.useState(r||!1),a=f.useRef(null);return f.useImperativeHandle(t,()=>({addMessage:s=>{var i;(i=a.current)===null||i===void 0||i.addMessage(s)},setBotEnabled:s=>{var i;(i=a.current)===null||i===void 0||i.setBotEnabled(s)},openChat:()=>{var s;A(!0),(s=a.current)===null||s===void 0||s.openChat()},closeChat:()=>{var s;A(!1),(s=a.current)===null||s===void 0||s.closeChat()},toggleChat:()=>{var s;A(i=>!i),(s=a.current)===null||s===void 0||s.toggleChat()}}),[]),f.createElement(Lr,dn({ref:a},n,{open:o,onOpenChange:A}))});_c.displayName="ProgrammaticQABot";const ze={QA_ENDPOINT:"https://qa-bot-proxy.netlify.app/api/chat",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",BACKEND_ID:"access",AGENT_ENDPOINT:"https://qa.access-ci.org/api/v1",get CAPABILITIES_ENDPOINT(){return`${this.AGENT_ENDPOINT}/capabilities`},get AGENT_RATING_ENDPOINT(){return`${this.AGENT_ENDPOINT}/rating`},METRICS_API_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/api/",METRICS_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/rating/",METRICS_QUESTIONS_URL:"https://metrics.access-ci.org/qa_bot_faq",NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",DEFAULT_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",TURNSTILE_SITE_KEY:"0x4AAAAAAC2toq7FThjGplVx",ALLOW_ANON_ACCESS:!0},wt={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:`Hello! I can answer questions about ACCESS resources, allocations, and more. Choose an option below or just type your question.
|
|
86
|
+
${Rr}`:Gt;return await J(It),ke==null||ke({type:"chatbot_answer_received",queryId:Be,success:!0,responseLength:_e.length}),"success"}catch(we){return ze("Error resubmitting after Turnstile:",we),N.token=null,N.pendingQuery=null,N.needsChallenge=!1,N.siteKey=null,await(J==null?void 0:J("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:ke,loginUrl:rt}),path:"qa_loop"}}})({endpoint:s,ratingEndpoint:a,agentRatingEndpoint:l,apiKey:i,sessionId:H.current.getSessionId,isResetting:H.current.isResetting,isLoggedIn:V,allowAnonAccess:f,loginUrl:M||Jc,trackEvent:$,getTurnstileToken:()=>y.current,resetTurnstileToken:()=>W.reset(),backendId:Q,resourceContext:I});return Object.assign(Object.assign({start:{message:A,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},G),O||{})},[i,s,a,l,A,V,f,M,O,p,$,I,Q]),He=v.useMemo(()=>{return[()=>Nu(K),Ff({markdownComponent:zg}),()=>Hf(G)];var G,K},[]);return v.useEffect(()=>{const G=()=>{const fe=document.querySelector(".rcb-chat-window");if(!fe)return;const oe=fe.querySelector(".rcb-send-button");oe&&(oe.hasAttribute("tabindex")||oe.setAttribute("tabindex","0"),oe.hasAttribute("data-keyboard-enabled")||(oe.setAttribute("data-keyboard-enabled","true"),oe.addEventListener("keydown",ve=>{if(ve.key==="Enter"||ve.key===" "){ve.preventDefault();const me=oe&&Object.keys(oe).find(Ie=>Ie.startsWith("__reactProps"));if(me){const Ie=oe[me],Oe=Ie==null?void 0:Ie.onMouseDown;if(Oe&&typeof Oe=="function")return void Oe(ve)}const ge=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});oe.dispatchEvent(ge)}})))},K=setInterval(G,1e3);return G(),()=>clearInterval(K)},[]),im(),v.useEffect(()=>{const G=Ae.current;if(!G)return;const K=fe=>{var oe,ve,me;const ge=(ve=(oe=fe.target).closest)===null||ve===void 0?void 0:ve.call(oe,"a");ge&&ge.closest(".rcb-chat-body-container")&&(ge.classList.contains("qa-bot-login-button")||ge.closest(".rcb-options-container")||$({type:"chatbot_link_clicked",linkUrl:ge.href,linkText:((me=ge.textContent)===null||me===void 0?void 0:me.trim())||""}))};return G.addEventListener("click",K),()=>G.removeEventListener("click",K)},[$]),v.useEffect(()=>{if(!Z){const G=K=>{const fe=K.data.newState;d==null||d(fe);const oe=_.current;$(fe?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:oe?jc(oe):0,durationMs:oe?em(oe):0})};return window.addEventListener("rcb-toggle-chat-window",G),()=>{window.removeEventListener("rcb-toggle-chat-window",G)}}},[Z,d,$]),v.createElement("div",{className:"qa-bot "+(!((n=he.general)===null||n===void 0)&&n.embedded?"embedded-qa-bot":""),ref:Ae,role:"region","aria-label":`${b||Xc}${!((r=he.general)===null||r===void 0)&&r.embedded?" - Embedded":""}`},v.createElement(tm,{getSessionId:()=>_.current,setSessionId:G=>{const K=_.current;_.current=G,Or("RESTORED",`${K==null?void 0:K.slice(-12)} -> ${G.slice(-12)}`)},resetSession:()=>{const G=_.current;F.current=!0,_.current=Uc(),Or("RESET",`${G==null?void 0:G.slice(-12)} -> ${_.current.slice(-12)}`)},clearResettingFlag:()=>{F.current=!1}},v.createElement(Ug,{trackEvent:$},v.createElement(fs,null,v.createElement("div",null,v.createElement(om,null),v.createElement(Oc,{ref:t,embedded:((o=he.general)===null||o===void 0?void 0:o.embedded)||!1,currentOpen:c||!1,enabled:V!==!1,onSetEnabled:G=>X(!!G&&void 0)}),v.createElement(yu,{key:`chatbot-${L.current}-${V}`,settings:he,flow:Qe,plugins:He}),v.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),v.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});Di.displayName="QABot";const mm=()=>{const[e,t]=v.useState(!1),n=()=>typeof navigator<"u"&&navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const r=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),o=document.createElement("video");o.srcObject=r,await new Promise(c=>{o.onloadedmetadata=()=>{o.play(),c()}});const i=document.createElement("canvas");i.width=o.videoWidth,i.height=o.videoHeight;const s=i.getContext("2d");if(!s)throw new Error("Could not get canvas context");s.drawImage(o,0,0,i.width,i.height);const a=await new Promise(c=>i.toBlob(c,"image/png"));if(!a)throw new Error("Could not create image blob");const l=new Date().toISOString().replace(/[:.]/g,"-"),A=new File([a],`screenshot-${l}.png`,{type:"image/png"});return r.getTracks().forEach(c=>c.stop()),t(!1),A}catch(r){throw ze("Error capturing screenshot:",r),t(!1),r}},isCapturing:e,isScreenCaptureAvailable:n()}},ym=e=>v.createElement(Gc,e,v.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),v.createElement("polyline",{points:"17 8 12 3 7 8"}),v.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),vm=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string")return void n(new Error(`Failed to read file ${e.name}`));const o=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)}),wm=e=>Promise.all(e.map(vm)),bm=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Lr=e=>{let{onFileUpload:t,maxSizeMB:n=10,acceptedTypes:r="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:i}=e;const[s,a]=v.useState(!1),[l,A]=v.useState([]),[c,d]=v.useState(null),u=v.useRef(null),{captureScreenshot:f,isCapturing:p,isScreenCaptureAvailable:w}=mm(),h=E=>{const B=document.createElement("div");B.setAttribute("aria-live","assertive"),B.setAttribute("aria-atomic","true"),B.className="sr-only",B.textContent=E,document.body.appendChild(B),setTimeout(()=>document.body.removeChild(B),1e3)},b=E=>{if(!E||E.length===0)return void Rc("FileUploadComponent: No valid files provided to handleFiles");let B;try{B=Array.from(E)}catch(Q){return ze("FileUploadComponent: Error converting files to array:",Q),void h("Error processing selected files. Please try again.")}const C=[...l,...B];A(C);const M=B.length,T=B.map(Q=>Q.name).join(", ");h(`${M} file${M>1?"s":""} selected: ${T}`),setTimeout(()=>{const Q=document.querySelector(".rcb-chat-content");Q&&(Q.scrollTop=Q.scrollHeight)},100),t&&t(C)},x=E=>{E.preventDefault(),E.stopPropagation(),E.type==="dragenter"||E.type==="dragover"?a(!0):E.type==="dragleave"&&a(!1)},g=()=>{try{u.current&&u.current.click()}catch(E){ze("FileUploadComponent: Error in handleButtonClick:",E),h("Error opening file selection dialog. Please try again.")}},k=()=>{d(null)},S=o&&w;return v.createElement("div",{className:`file-upload-container ${i||""}`,style:{padding:"16px",margin:"8px 0"}},S&&v.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},v.createElement("button",{onClick:E=>{E.preventDefault(),(async()=>{try{const B=await f();b([B]),h("Screenshot captured successfully")}catch{h("Error capturing screenshot. Please try again.")}})()},disabled:p,"aria-describedby":"screenshot-help","aria-label":p?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:p?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},v.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),v.createElement("circle",{cx:"12",cy:"13",r:"4"})),p?"Taking screenshot...":"Take screenshot..."),v.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),v.createElement("div",{className:"file-upload-dropzone "+(s?"active":""),onDragEnter:x,onDragLeave:x,onDragOver:x,onDrop:E=>{var B;E.preventDefault(),E.stopPropagation(),a(!1);try{!((B=E.dataTransfer)===null||B===void 0)&&B.files&&E.dataTransfer.files.length>0&&b(E.dataTransfer.files)}catch(C){ze("FileUploadComponent: Error in handleDrop:",C),h("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:E=>{E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),g())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:s?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},v.createElement("input",{ref:u,type:"file",className:"file-input",onChange:E=>{var B;try{!((B=E.target)===null||B===void 0)&&B.files&&E.target.files.length>0&&b(E.target.files)}catch(C){ze("FileUploadComponent: Error in handleFileSelect:",C),h("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:r}),v.createElement("div",{className:"upload-content",onClick:g,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},v.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},v.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},v.createElement(ym,null),v.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),v.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",n,"MB each)")),l.length>0&&v.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},v.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),l.map((E,B)=>v.createElement("span",{key:B,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:C=>{C.stopPropagation(),(M=>{d(M)})(E)}},v.createElement("span",{onClick:C=>{C.stopPropagation(),(M=>{const T=l.filter((Q,I)=>I!==M);A(T),t&&t(T)})(B)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${E.name}`},"ร"),E.name," (",bm(E.size),")"))))),(()=>{if(!c)return null;const E=c.type.startsWith("image/"),B=c.type.startsWith("text/"),C=c.type==="application/pdf";return v.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:k},v.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:M=>M.stopPropagation()},v.createElement("button",{onClick:k,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"ร"),v.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},c.name),E&&v.createElement("img",{src:URL.createObjectURL(c),alt:c.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),B&&v.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(c)),C&&v.createElement("iframe",{src:URL.createObjectURL(c),style:{width:"100%",height:"70vh",border:"none"},title:c.name}),!E&&!B&&!C&&v.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function km(e,t){if(!t||Object.keys(t).length===0)return e;const n={};for(const[r,o]of Object.entries(e)){let i=Object.assign({},o);if(i.chatDisabled===void 0){const s=!(!i.options&&!i.checkboxes);i.chatDisabled=s}n[r]=i}return n}function Nr(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const xm=v.forwardRef((e,t)=>{var{defaultOpen:n}=e,r=Li(e,["defaultOpen"]);const[o,i]=v.useState(n||!1),s=v.useRef(null);return v.useImperativeHandle(t,()=>({addMessage:a=>{var l;(l=s.current)===null||l===void 0||l.addMessage(a)},setBotEnabled:a=>{var l;(l=s.current)===null||l===void 0||l.setBotEnabled(a)},openChat:()=>{var a;i(!0),(a=s.current)===null||a===void 0||a.openChat()},closeChat:()=>{var a;i(!1),(a=s.current)===null||a===void 0||a.closeChat()},toggleChat:()=>{var a;i(l=>!l),(a=s.current)===null||a===void 0||a.toggleChat()}}),[]),v.createElement(Di,Jn({ref:s},r,{open:o,onOpenChange:i}))});xm.displayName="ProgrammaticQABot";const Xe={QA_ENDPOINT:"https://qa-bot-proxy.netlify.app/api/chat",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",BACKEND_ID:"access",AGENT_ENABLED:!1,AGENT_ENDPOINT:"http://localhost:8000/api/v1",get CAPABILITIES_ENDPOINT(){return`${this.AGENT_ENDPOINT}/capabilities`},get AGENT_RATING_ENDPOINT(){return`${this.AGENT_ENDPOINT}/rating`},METRICS_API_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/api/",METRICS_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/rating/",METRICS_QUESTIONS_URL:"https://metrics.access-ci.org/qa_bot_faq",NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",DEFAULT_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",TURNSTILE_SITE_KEY:"0x4AAAAAACyJamk8FS7-RSMr",ALLOW_ANON_ACCESS:!0},Zc=`<em>AI-powered responses may not always be accurate. Don't share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,jt={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:`Hello! Ask me about ACCESS resources, allocations, and more.
|
|
59
87
|
|
|
60
|
-
|
|
61
|
-
|
|
88
|
+
${Zc}`,LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! ๐"};function Em(){return`Hello! Ask me about this resource โ software, storage, running jobs, logging in, and more.
|
|
89
|
+
|
|
90
|
+
${Zc}`}const $c={SESSION_ID:"access-qa-bot-session-id"};function Cm({welcome:e,setTicketForm:t,trackEvent:n}){return{start:{message:e,renderHtml:["BOT"],options:["Ask a question","Open a help ticket","Report a security issue","Ask about metrics"],chatDisabled:!1,path:r=>{const o=r.userInput;switch(n({type:"chatbot_menu_selected",selection:o}),o){case"Ask a question":return"qa_prompt";case"Open a help ticket":return t({}),"help_ticket";case"Report a security issue":return t({}),n({type:"chatbot_security_started"}),"security_incident";case"Ask about metrics":return"metrics_intro";default:return"qa_loop"}}},qa_prompt:{message:"What would you like to ask?",chatDisabled:!1,path:"qa_loop"}}}let Ii=null;function Sm(e){Ii=e}function te(){return Ii?Ii.ticketForm||{}:(console.warn("Form context not available, returning empty form"),{})}function je(e={}){const t=te();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function Bi(e){return e&&e.length>0?`
|
|
91
|
+
Attachments: ${e.length} file(s) attached`:""}const bn={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function Pm(e,t="support",n=[]){const o={support:bn.SUPPORT,general_help:bn.SUPPORT,loginAccess:bn.LOGIN_ACCESS,loginProvider:bn.LOGIN_PROVIDER,security:bn.SECURITY}[t]||bn.SUPPORT,s={serviceDeskId:t==="security"?3:2,requestTypeId:o,requestFieldValues:{...e}};return n.length>0&&(s.attachments=await wm(n)),s}async function Dm(e,t){var o,i;const r=`${Xe.NETLIFY_BASE_URL}/api/v1/${t}`;try{const s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){let l="";try{const A=await s.text();try{const c=JSON.parse(A);l=c.message||c.error||A}catch{l=A}}catch{l=`HTTP ${s.status} ${s.statusText}`}return s.status===403?l="The ticket service is temporarily unavailable. Please try again later or contact support directly.":s.status===404?l="Ticket service not found. Please try again later.":s.status===500?l="Server error. Please try again later.":s.status===401&&(l="Authentication error with the ticket service. Please contact support."),{success:!1,status:s.status,error:l}}const a=await s.json();return{success:!0,ticketKey:(o=a.data)==null?void 0:o.ticketKey,ticketUrl:(i=a.data)==null?void 0:i.ticketUrl}}catch(s){return{success:!1,error:s instanceof Error?s.message:"Unknown error"}}}async function Fr(e,t,n=[]){try{const r=await Pm(e,t,n);return await Dm(r,t==="security"?"security-incidents":"tickets")}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function Ti(e,t="ticket"){return e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.
|
|
62
92
|
|
|
63
93
|
Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
|
|
64
94
|
|
|
@@ -68,50 +98,50 @@ Our support team will review your request and respond accordingly. Thank you for
|
|
|
68
98
|
|
|
69
99
|
Please try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.
|
|
70
100
|
|
|
71
|
-
Please try again or contact our support team directly.`}function
|
|
101
|
+
Please try again or contact our support team directly.`}function Hr(e){return!e||e.trim()===""?{success:!1,promptContent:"Email is required",promptDuration:3e3,promptType:"error"}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address",promptDuration:3e3,promptType:"error"}}function Yn(){return()=>({success:!0})}function Kn(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function Im({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(a,l=[])=>{o=await Fr(a,"loginAccess",l),o.success?(t(A=>({...A,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"access_login",success:!0,ticketKey:o.ticketKey})):(t(A=>({...A,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"access_login",errorType:o.error||"unknown"}))};return{access_help:{message:`If you're having trouble logging into the ACCESS website, here are some common issues:
|
|
72
102
|
|
|
73
103
|
โข Make sure you're using a supported browser (Chrome, Firefox, Safari)
|
|
74
104
|
โข Clear your browser cookies and cache
|
|
75
105
|
โข Check if you're using the correct identity provider
|
|
76
106
|
|
|
77
|
-
Would you like to submit a help ticket for ACCESS login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],path:
|
|
107
|
+
Would you like to submit a help ticket for ACCESS login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],path:a=>a.userInput==="Yes, let's create a ticket"?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:a=>{const l=te();t({...l,description:a.userInput,email:n.email||l.email,name:n.name||l.name,accessId:n.accessId||l.accessId}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"description"})},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],function:a=>{const l=te();t({...l,identityProvider:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"identity_provider"})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],function:a=>{const l=te();t({...l,browser:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"browser"})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:a=>{const l=te();t({...l,wantsAttachment:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"attachment_choice"})},path:a=>{if(a.userInput==="Yes")return"access_login_upload";const l=je(n);return l.email?l.name?l.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_upload:{message:"Please upload your screenshot.",component:D.jsx(Lr,{onFileUpload:a=>{t(l=>({...l,uploadedFiles:a})),a.forEach(l=>{r({type:"chatbot_file_uploaded",fileType:l.type||"unknown",fileSize:l.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const a=te();t({...a,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"file_upload"})},path:()=>{const a=je(n);return a.email?a.name?a.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:Hr,function:a=>{const l=te();t({...l,email:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"email"})},path:()=>{const a=je(n);return a.name?a.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:a=>{const l=te();t({...l,name:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"name"})},path:()=>je(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Yn(),function:a=>{const l=te();t({...l,accessId:Kn(a.userInput)}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"access_id"})},path:"access_login_summary"},access_login_summary:{message:a=>{const l=te(),A=je(n),c=Bi(l.uploadedFiles);let d=A.accessId;return a.prevPath==="access_login_accessid"&&a.userInput&&(d=a.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:
|
|
78
108
|
|
|
79
|
-
Name: ${
|
|
80
|
-
Email: ${
|
|
109
|
+
Name: ${A.name||"Not provided"}
|
|
110
|
+
Email: ${A.email||"Not provided"}
|
|
81
111
|
ACCESS ID: ${d||"Not provided"}
|
|
82
|
-
Identity Provider: ${
|
|
83
|
-
Browser: ${
|
|
84
|
-
Issue Description: ${
|
|
112
|
+
Identity Provider: ${l.identityProvider||"Not provided"}
|
|
113
|
+
Browser: ${l.browser||"Not provided"}
|
|
114
|
+
Issue Description: ${l.description||"Not provided"}${c}
|
|
85
115
|
|
|
86
|
-
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],renderHtml:["BOT","USER"],function:async
|
|
116
|
+
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],renderHtml:["BOT","USER"],function:async a=>{if(a.userInput==="Submit Ticket"){const l=te(),A=je(n),c={email:A.email||"",name:A.name||"",accessId:A.accessId||"",description:l.description||"",identityProvider:l.identityProvider||"",browser:l.browser||""};await i(c,l.uploadedFiles||[])}},path:a=>a.userInput==="Submit Ticket"?"access_login_success":"start"},access_login_success:{message:Nr(()=>Ti(o,"ACCESS login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}function Bm({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(a,l=[])=>{o=await Fr(a,"loginProvider",l),o.success?(t(A=>({...A,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"resource_login",success:!0,ticketKey:o.ticketKey})):(t(A=>({...A,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"resource_login",errorType:o.error||"unknown"}))};return{resource_help:{message:`If you're having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:
|
|
87
117
|
|
|
88
118
|
โข Ensure your allocation is active
|
|
89
119
|
โข Confirm you have the correct username for that resource
|
|
90
120
|
โข Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance
|
|
91
121
|
|
|
92
|
-
Would you like to submit a help ticket for resource provider login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],renderHtml:["BOT"],path:
|
|
122
|
+
Would you like to submit a help ticket for resource provider login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],renderHtml:["BOT"],path:a=>a.userInput==="Yes, let's create a ticket"?"resource_login_resource":"start"},resource_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],function:a=>{const l=te();t({...l,resource:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"resource_selection"})},path:"resource_login_userid"},resource_login_userid:{message:"What is your user ID at the resource?",function:a=>{const l=te();t({...l,userIdResource:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"user_id"})},path:"resource_login_description"},resource_login_description:{message:"Please describe the issue you're having logging in.",function:a=>{const l=te();t({...l,description:a.userInput,email:n.email||l.email,name:n.name||l.name,accessId:n.accessId||l.accessId}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"description"})},path:"resource_login_attachment"},resource_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:a=>{const l=te();t({...l,wantsAttachment:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"attachment_choice"})},path:a=>{if(a.userInput==="Yes")return"resource_login_upload";const l=je(n);return l.email?l.name?l.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_upload:{message:"Please upload your screenshot.",component:D.jsx(Lr,{onFileUpload:a=>{t(l=>({...l,uploadedFiles:a})),a.forEach(l=>{r({type:"chatbot_file_uploaded",fileType:l.type||"unknown",fileSize:l.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const a=te();t({...a,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"file_upload"})},path:()=>{const a=je(n);return a.email?a.name?a.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_email:{message:"What is your email?",validateTextInput:Hr,function:a=>{const l=te();t({...l,email:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"email"})},path:()=>{const a=je(n);return a.name?a.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name"}},resource_login_name:{message:"What is your name?",function:a=>{const l=te();t({...l,name:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"name"})},path:()=>je(n).accessId?"resource_login_summary":"resource_login_accessid"},resource_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Yn(),function:a=>{const l=te();t({...l,accessId:Kn(a.userInput)}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"access_id"})},path:"resource_login_summary"},resource_login_summary:{message:a=>{const l=te(),A=je(n),c=Bi(l.uploadedFiles);let d=A.accessId;return a.prevPath==="resource_login_accessid"&&a.userInput&&(d=a.userInput),`Thank you for providing your resource login issue details. Here's a summary:
|
|
93
123
|
|
|
94
|
-
Name: ${
|
|
95
|
-
Email: ${
|
|
124
|
+
Name: ${A.name||"Not provided"}
|
|
125
|
+
Email: ${A.email||"Not provided"}
|
|
96
126
|
ACCESS ID: ${d||"Not provided"}
|
|
97
|
-
Resource: ${
|
|
98
|
-
Resource User ID: ${
|
|
99
|
-
Issue Description: ${
|
|
127
|
+
Resource: ${l.resource||"Not provided"}
|
|
128
|
+
Resource User ID: ${l.userIdResource||"Not provided"}
|
|
129
|
+
Issue Description: ${l.description||"Not provided"}${c}
|
|
100
130
|
|
|
101
|
-
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const i=J(),l=Te(r),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",accessResource:i.resource||"",description:i.description||"",userIdAtResource:i.userIdResource||""};await A(c,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:On(()=>Fr(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Rc=[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],zc=["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"];function jc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const A=async(s,i=[])=>{o=await Nn(s,"support",i),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,submissionError:o.error})),n({type:"chatbot_ticket_error",ticketType:"general_help",errorType:o.error||"unknown"}))};return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:s=>{const i=J();t({...i,summary:s.userInput,email:r.email||i.email,name:r.name||i.name,accessId:r.accessId||i.accessId}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"title"})},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],function:s=>{const i=J();t({...i,category:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"category"})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:s=>{const i=J();t({...i,description:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"description"})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],function:s=>{const i=J();t({...i,wantsAttachment:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"attachment_choice"})},path:s=>s.userInput==="Yes"?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:P.jsx(_n,{onFileUpload:s=>{t(i=>({...i,uploadedFiles:s})),s.forEach(i=>{n({type:"chatbot_file_uploaded",fileType:i.type||"unknown",fileSize:i.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=J();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"file_upload"})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],function:s=>{const i=J();t({...i,involvesResource:s.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_choice"})},path:s=>s.userInput==="Yes"?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:zc,function:s=>{const i=J();t({...i,resourceDetails:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_selection"})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const i=J();t({...i,userIdAtResource:ln(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_user_id"})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:Rc,min:0,max:5},function:s=>{const i=J();t({...i,keywords:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"keywords"})},path:s=>s.userInput&&s.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:s=>{const i=J(),l=i.keywords||[],c=s.userInput,u=(Array.isArray(l)?[...l]:String(l).split(",").map(g=>g.trim())).filter(g=>g!=="I don't see a relevant keyword"),p=u.length>0?[...u,c].join(", "):c;t({...i,keywords:p,suggestedKeyword:c}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"additional_keywords"})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],function:s=>{const i=J();t({...i,priority:s.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const s=Te(r);return s.email?s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"}},general_help_email:{message:"What is your email address?",validateTextInput:Ln,function:s=>{const i=J();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const s=Te(r);return s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"}},general_help_name:{message:"What is your name?",function:s=>{const i=J();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>Te(r).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const i=J();t({...i,accessId:ln(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"access_id"})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:s=>{const i=J(),l=Te(r),c=Ur(i.uploadedFiles);let d=l.accessId;s.prevPath==="general_help_accessid"&&s.userInput&&(d=s.userInput);let u="";return i.involvesResource==="yes"&&(u=`
|
|
102
|
-
Resource: ${
|
|
103
|
-
User ID at Resource: ${
|
|
131
|
+
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async a=>{if(a.userInput==="Submit Ticket"){const l=te(),A=je(n),c={email:A.email||"",name:A.name||"",accessId:A.accessId||"",accessResource:l.resource||"",description:l.description||"",userIdAtResource:l.userIdResource||""};await i(c,l.uploadedFiles||[])}},path:a=>a.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:Nr(()=>Ti(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Tm=[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],Mm=["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"];function Qm({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(a,l=[])=>{o=await Fr(a,"support",l),o.success?(t(A=>({...A,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(A=>({...A,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"general_help",errorType:o.error||"unknown"}))};return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:a=>{const l=te();t({...l,summary:a.userInput,email:n.email||l.email,name:n.name||l.name,accessId:n.accessId||l.accessId}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"title"})},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],function:a=>{const l=te();t({...l,category:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"category"})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:a=>{const l=te();t({...l,description:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"description"})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],function:a=>{const l=te();t({...l,wantsAttachment:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"attachment_choice"})},path:a=>a.userInput==="Yes"?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:D.jsx(Lr,{onFileUpload:a=>{t(l=>({...l,uploadedFiles:a})),a.forEach(l=>{r({type:"chatbot_file_uploaded",fileType:l.type||"unknown",fileSize:l.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const a=te();t({...a,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"file_upload"})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],function:a=>{const l=te();t({...l,involvesResource:a.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_choice"})},path:a=>a.userInput==="Yes"?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:Mm,function:a=>{const l=te();t({...l,resourceDetails:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_selection"})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:Yn(),function:a=>{const l=te();t({...l,userIdAtResource:Kn(a.userInput)}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_user_id"})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:Tm,min:0,max:5},function:a=>{const l=te();t({...l,keywords:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"keywords"})},path:a=>a.userInput&&a.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:a=>{const l=te(),A=l.keywords||[],c=a.userInput,u=(Array.isArray(A)?[...A]:String(A).split(",").map(p=>p.trim())).filter(p=>p!=="I don't see a relevant keyword"),f=u.length>0?[...u,c].join(", "):c;t({...l,keywords:f,suggestedKeyword:c}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"additional_keywords"})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],function:a=>{const l=te();t({...l,priority:a.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const a=je(n);return a.email?a.name?a.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"}},general_help_email:{message:"What is your email address?",validateTextInput:Hr,function:a=>{const l=te();t({...l,email:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const a=je(n);return a.name?a.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"}},general_help_name:{message:"What is your name?",function:a=>{const l=te();t({...l,name:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>je(n).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Yn(),function:a=>{const l=te();t({...l,accessId:Kn(a.userInput)}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"access_id"})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:a=>{const l=te(),A=je(n),c=Bi(l.uploadedFiles);let d=A.accessId;a.prevPath==="general_help_accessid"&&a.userInput&&(d=a.userInput);let u="";return l.involvesResource==="yes"&&(u=`
|
|
132
|
+
Resource: ${l.resourceDetails||"Not specified"}`,l.userIdAtResource&&(u+=`
|
|
133
|
+
User ID at Resource: ${l.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:
|
|
104
134
|
|
|
105
|
-
Name: ${
|
|
106
|
-
Email: ${
|
|
135
|
+
Name: ${A.name||"Not provided"}
|
|
136
|
+
Email: ${A.email||"Not provided"}
|
|
107
137
|
ACCESS ID: ${d||"Not provided"}
|
|
108
|
-
Issue Summary: ${
|
|
109
|
-
Category: ${
|
|
110
|
-
Priority: ${
|
|
111
|
-
Keywords: ${
|
|
112
|
-
Issue Description: ${
|
|
138
|
+
Issue Summary: ${l.summary||"Not provided"}
|
|
139
|
+
Category: ${l.category||"Not provided"}
|
|
140
|
+
Priority: ${l.priority||"Not provided"}
|
|
141
|
+
Keywords: ${l.keywords||"Not provided"}
|
|
142
|
+
Issue Description: ${l.description||"Not provided"}${u}${c}
|
|
113
143
|
|
|
114
|
-
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async
|
|
144
|
+
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async a=>{if(a.userInput==="Submit Ticket"){const l=te(),A=je(n),c={email:A.email||"",summary:l.summary||"General Support Ticket",description:l.description||"",priority:l.priority||"medium",accessId:A.accessId||"",name:A.name||"",issueType:l.category||"",hasResourceProblem:l.involvesResource==="yes"?"Yes":"No",userIdAtResource:l.userIdAtResource||"",resourceName:l.resourceDetails||"",keywords:l.keywords||"",noRelevantKeyword:l.suggestedKeyword?"checked":"",suggestedKeyword:l.suggestedKeyword||""};await i(c,l.uploadedFiles||[])}},path:a=>a.userInput==="Submit Ticket"?"general_help_success":"start"},general_help_success:{message:Nr(()=>Ti(o,"support ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Om={"Logging into ACCESS website":"access_login","Logging into a resource":"resource_login","Another question":"general_help"};function _m({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){const o=Im({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}),i=Bm({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}),s=Qm({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],function:a=>{t(l=>({...l,ticketType:a.userInput})),r({type:"chatbot_ticket_started",ticketType:Om[a.userInput]||a.userInput})},path:a=>a.userInput==="Logging into ACCESS website"?"access_help":a.userInput==="Logging into a resource"?"resource_help":a.userInput==="Another question"?"general_help_summary_subject":"help_ticket"},...o,...i,...s}}function sn(e){const t=te();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function Lm(e){return e?e.success?e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.
|
|
115
145
|
|
|
116
146
|
Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
|
|
117
147
|
|
|
@@ -121,14 +151,14 @@ Our cybersecurity team will review your report and respond accordingly. Thank yo
|
|
|
121
151
|
|
|
122
152
|
Please try again or contact our cybersecurity team directly.`:`We apologize, but there was an error submitting your security incident report.
|
|
123
153
|
|
|
124
|
-
Please try again or contact our cybersecurity team directly.`}function
|
|
154
|
+
Please try again or contact our cybersecurity team directly.`}function Nm({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null,i=null;const s=async(l,A=[],c)=>{i=await Fr(l,"security",A),i.success?(t(d=>({...d,ticketKey:i.ticketKey,ticketUrl:i.ticketUrl})),r({type:"chatbot_security_submitted",success:!0,priority:c||"unknown",ticketKey:i.ticketKey})):(t(d=>({...d,submissionError:i.error})),r({type:"chatbot_ticket_error",ticketType:"security",errorType:i.error||"unknown"}))};return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:l=>{const A=te();t({...A,summary:l.userInput,email:n.email||A.email,name:n.name||A.name,accessId:n.accessId||A.accessId}),r({type:"chatbot_ticket_step",ticketType:"security",step:"summary"})},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],function:l=>{const A=te();t({...A,priority:l.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"security",step:"priority"})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:l=>{const A=te();t({...A,description:l.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"description"})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],function:l=>{const A=te();t({...A,wantsAttachment:l.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"attachment_choice"})},path:l=>l.userInput==="Yes"?"security_upload":"security_contact_check"},security_upload:{message:"Please upload your files.",component:D.jsx(Lr,{onFileUpload:l=>{t(A=>({...A,uploadedFiles:l})),l.forEach(A=>{r({type:"chatbot_file_uploaded",fileType:A.type||"unknown",fileSize:A.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const l=te();t({...l,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"security",step:"file_upload"})},path:"security_contact_check"},security_contact_check:{message:()=>{const l=sn(n);return l.name&&l.email&&l.accessId?`I have your contact information:
|
|
125
155
|
|
|
126
|
-
Name: ${
|
|
127
|
-
Email: ${
|
|
128
|
-
ACCESS ID: ${
|
|
156
|
+
Name: ${l.name}
|
|
157
|
+
Email: ${l.email}
|
|
158
|
+
ACCESS ID: ${l.accessId}
|
|
129
159
|
|
|
130
|
-
Is this correct?`:"I need your contact information."},options:()=>{const
|
|
131
|
-
Attachments: ${
|
|
160
|
+
Is this correct?`:"I need your contact information."},options:()=>{const l=sn(n);return l.name&&l.email&&l.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:()=>{const l=sn(n);return!!(l.name&&l.email&&l.accessId)},path:l=>l.userInput==="Yes, that's correct"?"security_summary":l.userInput==="Let me update it"?"security_name":"security_email"},security_email:{message:"What is your email address?",validateTextInput:Hr,function:l=>{const A=te();t({...A,email:l.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"email"})},path:()=>{const l=sn(n);return l.name?l.accessId?"security_summary":"security_accessid":"security_name"}},security_name:{message:"What is your name?",function:l=>{const A=te();t({...A,name:l.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"name"})},path:()=>{const l=sn(n);return l.email?l.accessId?"security_summary":"security_accessid":"security_email"}},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Yn(),function:l=>{const A=Kn(l.userInput);o=A;const c=te();t({...c,accessId:A}),r({type:"chatbot_ticket_step",ticketType:"security",step:"access_id"})},path:"security_summary"},security_summary:{message:()=>{const l=te(),A=sn(n),c={...l,name:A.name||l.name,email:A.email||l.email,accessId:o||A.accessId||l.accessId};let d="";l.uploadedFiles&&l.uploadedFiles.length>0&&(d=`
|
|
161
|
+
Attachments: ${l.uploadedFiles.length} file(s) attached`);const u=c.accessId||"Not provided";return`Here's a summary of your security incident report:
|
|
132
162
|
|
|
133
163
|
Summary: ${c.summary||"Not provided"}
|
|
134
164
|
Priority: ${c.priority||"Not provided"}
|
|
@@ -137,9 +167,9 @@ Email: ${c.email||"Not provided"}
|
|
|
137
167
|
ACCESS ID: ${u}
|
|
138
168
|
Description: ${c.description||"Not provided"}${d}
|
|
139
169
|
|
|
140
|
-
Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async
|
|
170
|
+
Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async l=>{if(l.userInput==="Submit Security Report"){const A=te(),c=sn(n),d={...A,name:c.name||A.name,email:c.email||A.email,accessId:o||c.accessId||A.accessId},u={summary:d.summary||"",priority:d.priority||"",description:d.description||"",name:d.name||"",email:d.email||"",accessId:d.accessId||""};await s(u,A.uploadedFiles||[],d.priority)}},path:l=>l.userInput==="Submit Security Report"?"security_success":"start"},security_success:{message:Nr(()=>Lm(i)),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const qe=[];for(let e=0;e<256;++e)qe.push((e+256).toString(16).slice(1));function Fm(e,t=0){return(qe[e[t+0]]+qe[e[t+1]]+qe[e[t+2]]+qe[e[t+3]]+"-"+qe[e[t+4]]+qe[e[t+5]]+"-"+qe[e[t+6]]+qe[e[t+7]]+"-"+qe[e[t+8]]+qe[e[t+9]]+"-"+qe[e[t+10]]+qe[e[t+11]]+qe[e[t+12]]+qe[e[t+13]]+qe[e[t+14]]+qe[e[t+15]]).toLowerCase()}let Mi;const Hm=new Uint8Array(16);function Rm(){if(!Mi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Mi=crypto.getRandomValues.bind(crypto)}return Mi(Hm)}const eA={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Qi(e,t,n){var o;if(eA.randomUUID&&!e)return eA.randomUUID();e=e||{};const r=e.random??((o=e.rng)==null?void 0:o.call(e))??Rm();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Fm(r)}function oy(e){return e}function zm({sessionId:e,apiKey:t,trackEvent:n}){let r=null;return{metrics_intro:{message:`Please type your question about usage and performance metrics (XDMoD) below. You can see some <a target="_blank" href="${Xe.METRICS_QUESTIONS_URL}">examples here</a>.
|
|
141
171
|
|
|
142
|
-
<em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async o=>{const{userInput:
|
|
172
|
+
<em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async o=>{const{userInput:i}=o;if(i==="๐ Helpful"||i==="๐ Not helpful"){if(t&&e&&r){const a={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":r,"X-Feedback":i==="๐ Helpful"?"1":"0"};try{await fetch(Xe.METRICS_RATING_ENDPOINT,{method:"POST",headers:a})}catch(l){console.error("Error sending metrics feedback:",l)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}else try{const s=Qi();r=s,n({type:"chatbot_metrics_question_sent",queryId:s});const a={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":s},c=(await(await fetch(Xe.METRICS_API_ENDPOINT,{method:"POST",headers:a,body:JSON.stringify({query:i})})).json()).response,d=c;return await o.injectMessage(d),setTimeout(async()=>{await o.injectMessage("Ask another question about usage and performance metrics (XDMoD) or start a new chat.")},100),null}catch(s){return console.error("Error in metrics flow:",s),"I'm sorry, there was an error processing your question. Please try again."}},renderMarkdown:["BOT"],options:o=>o.userInput==="๐ Helpful"||o.userInput==="๐ Not helpful"?[]:["๐ Helpful","๐ Not helpful"],chatDisabled:!1,path:"metrics_loop"}}}function Um(){if(typeof window>"u")return Qi();let e=localStorage.getItem($c.SESSION_ID);return e||(e=Qi(),localStorage.setItem($c.SESSION_ID,e)),e}const tA="access-qa-bot-shadow-overrides",jm=`
|
|
143
173
|
.rcb-checkbox-container {
|
|
144
174
|
display: flex !important;
|
|
145
175
|
flex-wrap: wrap !important;
|
|
@@ -292,5 +322,5 @@ Would you like to submit this security incident report?`},options:["Submit Secur
|
|
|
292
322
|
display: inline !important;
|
|
293
323
|
margin: 0 !important;
|
|
294
324
|
}
|
|
295
|
-
`;function
|
|
325
|
+
`;function qm(e){if(!e)return;const t=e.getRootNode();if(!(t instanceof ShadowRoot)||t.getElementById(tA))return;const n=document.createElement("style");n.id=tA,n.textContent=jm,t.appendChild(n)}const Oi=v.forwardRef((e,t)=>{const{apiKey:n=Xe.DEFAULT_API_KEY,isLoggedIn:r=!1,loginUrl:o=jt.LOGIN_URL,userEmail:i,userName:s,accessId:a,actingUser:l,ringEffect:A,defaultOpen:c,onClose:d,open:u,onOpenChange:f,embedded:p=!1,welcome:w,qaEndpoint:h,ratingEndpoint:b,agentEndpoint:x,backendId:g,resourceContext:k,onAnalyticsEvent:S}=e,E=Xe.AGENT_ENABLED,B=g||Xe.BACKEND_ID,C=v.useRef(null),M=v.useRef(null),[T,Q]=v.useState({}),[I,O]=v.useState(()=>E?null:{categories:[],is_authenticated:!1}),z=v.useMemo(()=>({email:i,name:s,accessId:a}),[i,s,a]);v.useEffect(()=>{qm(M.current)},[]),v.useEffect(()=>{Sm({ticketForm:T,setTicketForm:Q})},[T]);const L=x||Xe.AGENT_ENDPOINT,_=k?`${L}/capabilities?resource_context=${encodeURIComponent(k)}`:`${L}/capabilities`,F=`${L}/rating`;v.useEffect(()=>{E&&L.includes("localhost")&&!window.location.hostname.includes("localhost")&&console.warn("[AccessQABot] VITE_AGENT_ENDPOINT not set โ agent requests will go to localhost. Set VITE_AGENT_ENDPOINT in your environment."),Xe.ALLOW_ANON_ACCESS&&!Xe.TURNSTILE_SITE_KEY&&console.warn("[AccessQABot] Anonymous access is enabled without Turnstile. Set VITE_TURNSTILE_SITE_KEY for bot protection, or disable VITE_ALLOW_ANON_ACCESS.")},[L,E]),v.useEffect(()=>{if(!E)return;let X=!1;async function Z(){try{const $=await fetch(_,{credentials:"include"});if(!$.ok)throw new Error(`Capabilities API returned ${$.status}`);const he=await $.json();X||O(he)}catch($){console.warn("Failed to fetch capabilities:",$),X||O({categories:[],is_authenticated:!1})}}return Z(),()=>{X=!0}},[E,_,r]),v.useEffect(()=>{if(!E||!r)return;let X=!1;const Z=`${L}/capabilities/personalized`;async function $(){try{const he=await fetch(Z,{credentials:"include"});if(!he.ok)return;const Ae=await he.json();X||console.debug("Personalized context loaded:",Ae)}catch{}}return $(),()=>{X=!0}},[E,L,r]),v.useImperativeHandle(t,()=>({addMessage:X=>{var Z,$;($=(Z=C.current)==null?void 0:Z.addMessage)==null||$.call(Z,X)}}));const H=w||(I==null?void 0:I.welcome_message)||(k?Em():jt.WELCOME_MESSAGE),m=v.useMemo(()=>Um(),[]),W=v.useCallback(X=>{S&&S({...X,type:X.type,timestamp:X.timestamp??Date.now(),sessionId:X.sessionId??m})},[S,m]),y=v.useCallback(X=>{S&&S({...X,type:X.type,timestamp:typeof X.timestamp=="number"?X.timestamp:Date.now(),sessionId:typeof X.sessionId=="string"?X.sessionId:m})},[S,m]),V=v.useMemo(()=>{const X=Cm({welcome:H,setTicketForm:Q,trackEvent:W}),Z=_m({ticketForm:{},setTicketForm:Q,userInfo:z,trackEvent:W}),$=Nm({ticketForm:{},setTicketForm:Q,userInfo:z,trackEvent:W}),he=zm({sessionId:m,apiKey:n,trackEvent:W}),Ae={...X,...Z,...$,...he};return km(Ae,{disableOnOptions:!0})},[H,z,m,n,r,W,I]);return I?D.jsx("div",{ref:M,children:D.jsx(Di,{ref:C,isLoggedIn:r,allowAnonAccess:Xe.ALLOW_ANON_ACCESS,actingUser:l,onAnalyticsEvent:y,apiKey:n,qaEndpoint:h||Xe.QA_ENDPOINT,ratingEndpoint:b||Xe.RATING_ENDPOINT,backendId:B,...E?{capabilitiesEndpoint:_,agentRatingEndpoint:F}:{},botName:jt.BOT_NAME,logo:jt.LOGO,primaryColor:jt.PRIMARY_COLOR,secondaryColor:jt.SECONDARY_COLOR,welcomeMessage:H,tooltipText:jt.TOOLTIP,turnstileSiteKey:Xe.TURNSTILE_SITE_KEY||void 0,loginUrl:o,open:u,onOpenChange:f,embedded:p,footerText:"AI-powered ยท Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",resourceContext:k,customFlow:V})}):D.jsx("div",{ref:M})});Oi.displayName="AccessQABot",Ze.API_CONFIG=Xe,Ze.AccessQABot=Oi,Ze.BOT_CONFIG=jt,Ze.QABot=Oi,Object.defineProperty(Ze,Symbol.toStringTag,{value:"Module"})});
|
|
296
326
|
//# sourceMappingURL=access-qa-bot.umd.cjs.map
|